24 |
24 |
25 class LDColor; |
25 class LDColor; |
26 class Ui_ColorSelUI; |
26 class Ui_ColorSelUI; |
27 class QGraphicsScene; |
27 class QGraphicsScene; |
28 |
28 |
29 class ColorSelector : public QDialog |
29 class ColorSelector : public QDialog { |
30 { |
|
31 Q_OBJECT |
30 Q_OBJECT |
32 READ_PROPERTY( LDColor*, sel, setSelection ) |
31 READ_PROPERTY (LDColor*, sel, setSelection) |
33 |
32 |
34 public: |
33 public: |
35 explicit ColorSelector( short defval = -1, QWidget* parent = null ); |
34 explicit ColorSelector (short defval = -1, QWidget* parent = null); |
36 virtual ~ColorSelector(); |
35 virtual ~ColorSelector(); |
37 static bool getColor( short& val, short defval = -1, QWidget* parent = null ); |
36 static bool getColor (short& val, short defval = -1, QWidget* parent = null); |
38 |
37 |
39 protected: |
38 protected: |
40 void mousePressEvent( QMouseEvent* event ); |
39 void mousePressEvent (QMouseEvent* event); |
41 void resizeEvent( QResizeEvent* ev ); |
40 void resizeEvent (QResizeEvent* ev); |
42 |
41 |
43 private: |
42 private: |
44 Ui_ColorSelUI* ui; |
43 Ui_ColorSelUI* ui; |
45 QGraphicsScene* m_scene; |
44 QGraphicsScene* m_scene; |
46 bool m_firstResize; |
45 bool m_firstResize; |