zz_colorSelectDialog.h

Tue, 16 Apr 2013 03:49:06 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Tue, 16 Apr 2013 03:49:06 +0300
changeset 112
fa2f00081357
parent 104
6e29bb0e83c5
child 135
c243df39913e
permissions
-rw-r--r--

Added object list representation for radials

48
113eb6446c61 Color dialog almost up and running. Need to make it actually selectable now. TODO: make it read LDConfig.ldr
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
1 /*
113eb6446c61 Color dialog almost up and running. Need to make it actually selectable now. TODO: make it read LDConfig.ldr
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: 49
diff changeset
3 * Copyright (C) 2013 Santeri Piippo
48
113eb6446c61 Color dialog almost up and running. Need to make it actually selectable now. TODO: make it read LDConfig.ldr
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
4 *
113eb6446c61 Color dialog almost up and running. Need to make it actually selectable now. TODO: make it read LDConfig.ldr
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
5 * This program is free software: you can redistribute it and/or modify
113eb6446c61 Color dialog almost up and running. Need to make it actually selectable now. TODO: make it read LDConfig.ldr
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
6 * it under the terms of the GNU General Public License as published by
113eb6446c61 Color dialog almost up and running. Need to make it actually selectable now. TODO: make it read LDConfig.ldr
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
7 * the Free Software Foundation, either version 3 of the License, or
113eb6446c61 Color dialog almost up and running. Need to make it actually selectable now. TODO: make it read LDConfig.ldr
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
8 * (at your option) any later version.
113eb6446c61 Color dialog almost up and running. Need to make it actually selectable now. TODO: make it read LDConfig.ldr
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
9 *
113eb6446c61 Color dialog almost up and running. Need to make it actually selectable now. TODO: make it read LDConfig.ldr
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
10 * This program is distributed in the hope that it will be useful,
113eb6446c61 Color dialog almost up and running. Need to make it actually selectable now. TODO: make it read LDConfig.ldr
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
113eb6446c61 Color dialog almost up and running. Need to make it actually selectable now. TODO: make it read LDConfig.ldr
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
113eb6446c61 Color dialog almost up and running. Need to make it actually selectable now. TODO: make it read LDConfig.ldr
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
13 * GNU General Public License for more details.
113eb6446c61 Color dialog almost up and running. Need to make it actually selectable now. TODO: make it read LDConfig.ldr
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
14 *
113eb6446c61 Color dialog almost up and running. Need to make it actually selectable now. TODO: make it read LDConfig.ldr
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License
113eb6446c61 Color dialog almost up and running. Need to make it actually selectable now. TODO: make it read LDConfig.ldr
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
113eb6446c61 Color dialog almost up and running. Need to make it actually selectable now. TODO: make it read LDConfig.ldr
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
17 */
113eb6446c61 Color dialog almost up and running. Need to make it actually selectable now. TODO: make it read LDConfig.ldr
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
18
113eb6446c61 Color dialog almost up and running. Need to make it actually selectable now. TODO: make it read LDConfig.ldr
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
19 #include <qdialog.h>
113eb6446c61 Color dialog almost up and running. Need to make it actually selectable now. TODO: make it read LDConfig.ldr
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
20 #include <qdialogbuttonbox.h>
49
242f6ea0f5e5 Finished with the color selection dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 48
diff changeset
21 #include <qgraphicsscene.h>
242f6ea0f5e5 Finished with the color selection dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 48
diff changeset
22 #include <qlabel.h>
104
6e29bb0e83c5 GL picking stuff
Santeri Piippo <crimsondusk64@gmail.com>
parents: 49
diff changeset
23 #include "common.h"
48
113eb6446c61 Color dialog almost up and running. Need to make it actually selectable now. TODO: make it read LDConfig.ldr
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
24
113eb6446c61 Color dialog almost up and running. Need to make it actually selectable now. TODO: make it read LDConfig.ldr
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
25 class ColorSelectDialog : public QDialog {
49
242f6ea0f5e5 Finished with the color selection dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 48
diff changeset
26 Q_OBJECT
242f6ea0f5e5 Finished with the color selection dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 48
diff changeset
27
48
113eb6446c61 Color dialog almost up and running. Need to make it actually selectable now. TODO: make it read LDConfig.ldr
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
28 public:
104
6e29bb0e83c5 GL picking stuff
Santeri Piippo <crimsondusk64@gmail.com>
parents: 49
diff changeset
29 explicit ColorSelectDialog (short dDefault = -1, QWidget* parent = null);
6e29bb0e83c5 GL picking stuff
Santeri Piippo <crimsondusk64@gmail.com>
parents: 49
diff changeset
30 static bool staticDialog (short& dValue, short dDefault = -1, QWidget* parent = null);
48
113eb6446c61 Color dialog almost up and running. Need to make it actually selectable now. TODO: make it read LDConfig.ldr
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
31
113eb6446c61 Color dialog almost up and running. Need to make it actually selectable now. TODO: make it read LDConfig.ldr
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
32 QGraphicsScene* qScene;
113eb6446c61 Color dialog almost up and running. Need to make it actually selectable now. TODO: make it read LDConfig.ldr
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
33 QGraphicsView* qView;
49
242f6ea0f5e5 Finished with the color selection dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 48
diff changeset
34 QLabel* qColorInfo;
48
113eb6446c61 Color dialog almost up and running. Need to make it actually selectable now. TODO: make it read LDConfig.ldr
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
35 QDialogButtonBox* qButtons;
49
242f6ea0f5e5 Finished with the color selection dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 48
diff changeset
36 short dSelColor;
242f6ea0f5e5 Finished with the color selection dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 48
diff changeset
37
242f6ea0f5e5 Finished with the color selection dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 48
diff changeset
38 private:
242f6ea0f5e5 Finished with the color selection dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 48
diff changeset
39 void drawScene ();
242f6ea0f5e5 Finished with the color selection dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 48
diff changeset
40 void drawColorInfo ();
242f6ea0f5e5 Finished with the color selection dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 48
diff changeset
41
242f6ea0f5e5 Finished with the color selection dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 48
diff changeset
42 private slots:
242f6ea0f5e5 Finished with the color selection dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents: 48
diff changeset
43 void mousePressEvent (QMouseEvent* event);
48
113eb6446c61 Color dialog almost up and running. Need to make it actually selectable now. TODO: make it read LDConfig.ldr
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
44 };

mercurial