src/dialogs/externalprogrampathdialog.h

Mon, 06 Mar 2017 00:41:13 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Mon, 06 Mar 2017 00:41:13 +0200
changeset 1197
e22cba39230a
parent 1116
3b1d2cc6603e
child 1326
69a90bd2dba2
permissions
-rw-r--r--

Fixed NewPartDialog leaking the memory allocated by the user interface.

655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
1 /*
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
2 * LDForge: LDraw parts authoring CAD
1072
9ce9496427f2 Happy new year 2017!
Teemu Piippo <teemu@hecknology.net>
parents: 1051
diff changeset
3 * Copyright (C) 2013 - 2017 Teemu Piippo
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
4 *
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
5 * This program is free software: you can redistribute it and/or modify
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
6 * it under the terms of the GNU General Public License as published by
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
7 * the Free Software Foundation, either version 3 of the License, or
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
8 * (at your option) any later version.
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
9 *
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
10 * This program is distributed in the hope that it will be useful,
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
13 * GNU General Public License for more details.
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
14 *
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
17 */
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
18
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
19 #pragma once
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
20 #include <QDialog>
1116
3b1d2cc6603e Moved dialogs.cpp to dialogs/externalprogrampathdialog.cpp
Teemu Piippo <teemu@hecknology.net>
parents: 1115
diff changeset
21 #include "../main.h"
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
22
1115
117e4880666e Cleaned up ExternalProgramPathDialog
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
23 /*
117e4880666e Cleaned up ExternalProgramPathDialog
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
24 * Prompts the user for a path to an external program.
117e4880666e Cleaned up ExternalProgramPathDialog
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
25 */
117e4880666e Cleaned up ExternalProgramPathDialog
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
26 class ExternalProgramPathDialog : public QDialog
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
27 {
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
28 Q_OBJECT
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
29
794
c254ddc6618b - source reformat
Santeri Piippo <crimsondusk64@gmail.com>
parents: 789
diff changeset
30 public:
1115
117e4880666e Cleaned up ExternalProgramPathDialog
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
31 explicit ExternalProgramPathDialog(QString programName, QWidget* parent = nullptr, Qt::WindowFlags f = 0);
117e4880666e Cleaned up ExternalProgramPathDialog
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
32 ~ExternalProgramPathDialog();
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
33
1115
117e4880666e Cleaned up ExternalProgramPathDialog
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
34 Q_SLOT void findPath();
117e4880666e Cleaned up ExternalProgramPathDialog
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
35 QString path() const;
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
36
794
c254ddc6618b - source reformat
Santeri Piippo <crimsondusk64@gmail.com>
parents: 789
diff changeset
37 private:
1115
117e4880666e Cleaned up ExternalProgramPathDialog
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
38 class Ui_ExtProgPath& ui;
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
39 };

mercurial