zz_ldrawPathDialog.h

changeset 179
f98391b179ab
child 180
16306e69a895
equal deleted inserted replaced
178:bc30a6d59f7c 179:f98391b179ab
1 /*
2 * LDForge: LDraw parts authoring CAD
3 * Copyright (C) 2013 Santeri Piippo
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 #ifndef LDRAWPATHDIALOG_H
20 #define LDRAWPATHDIALOG_H
21
22 #include <qdialog.h>
23 #include "common.h"
24
25 class QLabel;
26 class QLineEdit;
27 class QDialogButtonBox;
28
29 class LDrawPathDialog : public QDialog {
30 Q_OBJECT
31
32 public:
33 explicit LDrawPathDialog (QWidget* parent = null, Qt::WindowFlags f = 0);
34 str path () const;
35 void setPath (str path);
36 void (*callback ()) () const { return m_callback; }
37 void setCallback (void (*callback) ()) { m_callback = callback; }
38
39 private:
40 Q_DISABLE_COPY (LDrawPathDialog)
41
42 QLabel* lb_resolution;
43 QLineEdit* le_path;
44 QPushButton* btn_findPath, *btn_tryConfigure, *btn_exit;
45 QDialogButtonBox* dbb_buttons;
46 void (*m_callback) ();
47
48 QPushButton* okButton ();
49
50 private slots:
51 void slot_findPath ();
52 void slot_tryConfigure ();
53 void slot_exit ();
54 };
55
56 #endif // LDRAWPATHDIALOG_H

mercurial