src/addObjectDialog.h

changeset 183
f1b8cb53d2a2
child 198
f246725199dc
equal deleted inserted replaced
182:9374fea8f77f 183:f1b8cb53d2a2
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 ZZ_ADDOBJECTDIALOG_H
20 #define ZZ_ADDOBJECTDIALOG_H
21
22 #include "gui.h"
23 #include "radiobox.h"
24 #include <qdialog.h>
25 #include <qlineedit.h>
26 #include <qdialogbuttonbox.h>
27 #include <qcheckbox.h>
28 #include <qspinbox.h>
29 #include <qlabel.h>
30 #include <qradiobutton.h>
31 #include <qlistwidget.h>
32 #include <qtreewidget.h>
33
34 class AddObjectDialog : public QDialog {
35 Q_OBJECT
36
37 public:
38 AddObjectDialog (const LDObject::Type type, LDObject* obj, QWidget* parent = null);
39 static void staticDialog (const LDObject::Type 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 RadioBox* rb_bfcType;
54
55 // Subfile stuff
56 QTreeWidget* tw_subfileList;
57 QLineEdit* le_subfileName;
58 QLabel* lb_subfileName;
59
60 // Radial stuff
61 QCheckBox* cb_radHiRes;
62 RadioBox* rb_radType;
63 QSpinBox* sb_radSegments, *sb_radRingNum;
64 QLabel* lb_radType, *lb_radResolution, *lb_radSegments,
65 *lb_radRingNum;
66
67 QLineEdit* le_matrix;
68
69 QDialogButtonBox* bbx_buttons;
70
71 private:
72 void setButtonBackground (QPushButton* button, short color);
73 char* currentSubfileName ();
74
75 short dColor;
76
77 private slots:
78 void slot_colorButtonClicked ();
79 void slot_radialTypeChanged (int type);
80 void slot_subfileTypeChanged ();
81 };
82
83 #endif // ZZ_ADDOBJECTDIALOG_H

mercurial