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