1 /* |
|
2 * LDForge: LDraw parts authoring CAD |
|
3 * Copyright (C) 2013, 2014 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 LDFORGE_ADDOBJECTDIALOG_H |
|
20 #define LDFORGE_ADDOBJECTDIALOG_H |
|
21 |
|
22 #include <QDialog> |
|
23 #include "ldtypes.h" |
|
24 |
|
25 class QTreeWidgetItem; |
|
26 class QLineEdit; |
|
27 class RadioGroup; |
|
28 class QCheckBox; |
|
29 class QSpinBox; |
|
30 class QLabel; |
|
31 class QTreeWidget; |
|
32 class QDoubleSpinBox; |
|
33 |
|
34 class AddObjectDialog : public QDialog |
|
35 { |
|
36 Q_OBJECT |
|
37 |
|
38 public: |
|
39 AddObjectDialog (const LDObject::Type type, LDObject* obj, QWidget* parent = null); |
|
40 static void staticDialog (const LDObject::Type type, LDObject* obj); |
|
41 |
|
42 QLabel* lb_typeIcon; |
|
43 |
|
44 // Comment line edit |
|
45 QLineEdit* le_comment; |
|
46 |
|
47 // Coordinate edits for.. anything with coordinates, really. |
|
48 QDoubleSpinBox* dsb_coords[12]; |
|
49 |
|
50 // Color selection dialog button |
|
51 QPushButton* pb_color; |
|
52 |
|
53 // BFC-related widgets |
|
54 RadioGroup* rb_bfcType; |
|
55 |
|
56 // Subfile stuff |
|
57 QTreeWidget* tw_subfileList; |
|
58 QLineEdit* le_subfileName; |
|
59 QLabel* lb_subfileName; |
|
60 QLineEdit* le_matrix; |
|
61 |
|
62 private: |
|
63 void setButtonBackground (QPushButton* button, int color); |
|
64 QString currentSubfileName(); |
|
65 |
|
66 int colnum; |
|
67 |
|
68 private slots: |
|
69 void slot_colorButtonClicked(); |
|
70 void slot_subfileTypeChanged(); |
|
71 }; |
|
72 |
|
73 #endif // LDFORGE_ADDOBJECTDIALOG_H |
|