zz_addObjectDialog.h

Tue, 16 Apr 2013 14:36:56 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Tue, 16 Apr 2013 14:36:56 +0300
changeset 113
bbaa40226ec9
parent 111
125e8031dbf1
child 135
c243df39913e
permissions
-rw-r--r--

Radial saving and reading from files

39
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
1 /*
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
2 * LDForge: LDraw parts authoring CAD
104
6e29bb0e83c5 GL picking stuff
Santeri Piippo <crimsondusk64@gmail.com>
parents: 72
diff changeset
3 * Copyright (C) 2013 Santeri Piippo
39
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
4 *
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
5 * This program is free software: you can redistribute it and/or modify
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
6 * it under the terms of the GNU General Public License as published by
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
7 * the Free Software Foundation, either version 3 of the License, or
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
8 * (at your option) any later version.
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
9 *
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
10 * This program is distributed in the hope that it will be useful,
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
13 * GNU General Public License for more details.
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
14 *
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
17 */
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
18
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
19 #ifndef __ZZ_ADDOBJECTDIALOG_H__
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
20 #define __ZZ_ADDOBJECTDIALOG_H__
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
21
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
22 #include "gui.h"
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
23 #include <qdialog.h>
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
24 #include <qlineedit.h>
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
25 #include <qdialogbuttonbox.h>
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
26 #include <qlabel.h>
40
215b9f8f0cd7 Added triangle, quad and condline to the add object dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 39
diff changeset
27 #include <qspinbox.h>
51
94c434a56961 Added color selectors for the add object dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 40
diff changeset
28 #include <qpushbutton.h>
111
125e8031dbf1 Added the radial type, this one sure has been on my wishlist for a while. :)
Santeri Piippo <crimsondusk64@gmail.com>
parents: 104
diff changeset
29 #include <qcombobox.h>
39
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
30
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
31 class AddObjectDialog : public QDialog {
51
94c434a56961 Added color selectors for the add object dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 40
diff changeset
32 Q_OBJECT
94c434a56961 Added color selectors for the add object dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 40
diff changeset
33
39
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
34 public:
104
6e29bb0e83c5 GL picking stuff
Santeri Piippo <crimsondusk64@gmail.com>
parents: 72
diff changeset
35 AddObjectDialog (const LDObjectType_e type, QWidget* parent = null);
39
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
36 static void staticDialog (const LDObjectType_e type, ForgeWindow* window);
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
37
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
38 QLabel* qTypeIcon;
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
39
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
40 // -- COMMENT --
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
41 QLineEdit* qCommentLine;
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
42
40
215b9f8f0cd7 Added triangle, quad and condline to the add object dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 39
diff changeset
43 // Coordinate edits for.. anything with coordinates, really.
215b9f8f0cd7 Added triangle, quad and condline to the add object dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 39
diff changeset
44 QDoubleSpinBox* qaCoordinates[12];
215b9f8f0cd7 Added triangle, quad and condline to the add object dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 39
diff changeset
45
51
94c434a56961 Added color selectors for the add object dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 40
diff changeset
46 // Color selection dialog button
94c434a56961 Added color selectors for the add object dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 40
diff changeset
47 QPushButton* qColorButton;
94c434a56961 Added color selectors for the add object dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 40
diff changeset
48
111
125e8031dbf1 Added the radial type, this one sure has been on my wishlist for a while. :)
Santeri Piippo <crimsondusk64@gmail.com>
parents: 104
diff changeset
49 // Radial stuff
125e8031dbf1 Added the radial type, this one sure has been on my wishlist for a while. :)
Santeri Piippo <crimsondusk64@gmail.com>
parents: 104
diff changeset
50 QComboBox* qRadialType, *qRadialResolution;
125e8031dbf1 Added the radial type, this one sure has been on my wishlist for a while. :)
Santeri Piippo <crimsondusk64@gmail.com>
parents: 104
diff changeset
51 QSpinBox* qRadialSegments, *qRadialRingNum;
125e8031dbf1 Added the radial type, this one sure has been on my wishlist for a while. :)
Santeri Piippo <crimsondusk64@gmail.com>
parents: 104
diff changeset
52 QLabel* qRadialTypeLabel, *qRadialResolutionLabel, *qRadialSegmentsLabel,
125e8031dbf1 Added the radial type, this one sure has been on my wishlist for a while. :)
Santeri Piippo <crimsondusk64@gmail.com>
parents: 104
diff changeset
53 *qRadialRingNumLabel;
125e8031dbf1 Added the radial type, this one sure has been on my wishlist for a while. :)
Santeri Piippo <crimsondusk64@gmail.com>
parents: 104
diff changeset
54
39
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
55 QDialogButtonBox* qButtons;
51
94c434a56961 Added color selectors for the add object dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 40
diff changeset
56
94c434a56961 Added color selectors for the add object dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 40
diff changeset
57 private:
72
5755c02d89f0 Added LDConfig.ldr parsing. All colors now available as long as LDConfig.ldr is provided.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 51
diff changeset
58 void setButtonBackground (QPushButton* qButton, short dColor);
51
94c434a56961 Added color selectors for the add object dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 40
diff changeset
59
94c434a56961 Added color selectors for the add object dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 40
diff changeset
60 short dColor;
94c434a56961 Added color selectors for the add object dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 40
diff changeset
61
94c434a56961 Added color selectors for the add object dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 40
diff changeset
62 private slots:
94c434a56961 Added color selectors for the add object dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 40
diff changeset
63 void slot_colorButtonClicked ();
111
125e8031dbf1 Added the radial type, this one sure has been on my wishlist for a while. :)
Santeri Piippo <crimsondusk64@gmail.com>
parents: 104
diff changeset
64 void slot_radialTypeChanged (int dType);
39
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
65 };
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
66
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
67 #endif // __ZZ_ADDOBJECTDIALOG_H__

mercurial