src/colorSelectDialog.h

changeset 183
f1b8cb53d2a2
child 202
a027f6fc6141
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 COLORSELECTOR_H
20 #define COLORSELECTOR_H
21
22 #include <qdialog.h>
23 #include <qdialogbuttonbox.h>
24 #include <qgraphicsscene.h>
25 #include <qlabel.h>
26 #include "common.h"
27
28 class ColorSelectDialog : public QDialog {
29 Q_OBJECT
30
31 public:
32 explicit ColorSelectDialog (short defval = -1, QWidget* parent = null);
33 static bool staticDialog (short& val, short defval = -1, QWidget* parent = null);
34
35 QGraphicsScene* gs_scene;
36 QGraphicsView* gv_view;
37 QLabel* lb_colorInfo;
38 QDialogButtonBox* bbx_buttons;
39 short selColor;
40
41 private:
42 void drawScene ();
43 void drawColorInfo ();
44
45 private slots:
46 void mousePressEvent (QMouseEvent* event);
47 };
48
49 #endif // COLORSELECTOR_H

mercurial