src/addObjectDialog.h

changeset 655
b376645315ab
child 739
152b33a6d51b
equal deleted inserted replaced
654:a74f2ff353b8 655:b376645315ab
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 #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
32 class AddObjectDialog : public QDialog
33 {
34 Q_OBJECT
35
36 public:
37 AddObjectDialog (const LDObject::Type type, LDObject* obj, QWidget* parent = null);
38 static void staticDialog (const LDObject::Type type, LDObject* obj);
39
40 QLabel* lb_typeIcon;
41
42 // Comment line edit
43 QLineEdit* le_comment;
44
45 // Coordinate edits for.. anything with coordinates, really.
46 QDoubleSpinBox* dsb_coords[12];
47
48 // Color selection dialog button
49 QPushButton* pb_color;
50
51 // BFC-related widgets
52 RadioGroup* rb_bfcType;
53
54 // Subfile stuff
55 QTreeWidget* tw_subfileList;
56 QLineEdit* le_subfileName;
57 QLabel* lb_subfileName;
58 QLineEdit* le_matrix;
59
60 private:
61 void setButtonBackground (QPushButton* button, int color);
62 QString currentSubfileName();
63
64 int colnum;
65
66 private slots:
67 void slot_colorButtonClicked();
68 void slot_subfileTypeChanged();
69 };

mercurial