diff options
author | Treeki <treeki@gmail.com> | 2012-09-04 19:56:58 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-09-04 19:56:58 +0200 |
commit | f8c66ff96ae2417e744b2d46daa8577d642b9c9f (patch) | |
tree | f04bbf67442df5ec4fa8b97a58b39d1d842b37c7 /lscolorpicker.h | |
parent | 07e0eeb5ad9f81a62032aa37c0cfef84a9f6ed5c (diff) | |
download | LayoutStudio-f8c66ff96ae2417e744b2d46daa8577d642b9c9f.tar.gz LayoutStudio-f8c66ff96ae2417e744b2d46daa8577d642b9c9f.zip |
pulled the colour picker out into a LSColorPicker widget
Diffstat (limited to '')
-rw-r--r-- | lscolorpicker.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lscolorpicker.h b/lscolorpicker.h new file mode 100644 index 0000000..7f16c57 --- /dev/null +++ b/lscolorpicker.h @@ -0,0 +1,27 @@ +#ifndef LSCOLORPICKER_H +#define LSCOLORPICKER_H + +#include <QToolButton> + +class LSColorPicker : public QToolButton +{ + Q_OBJECT +public: + explicit LSColorPicker(QWidget *parent = 0); + + QColor color() const { return m_color; } + void setColor(QColor newCol); + +private: + QColor m_color; + +private slots: + void tryAndChoose(); + void refreshButton(); + +signals: + void colorPicked(QColor newCol, QColor oldCol); + +}; + +#endif // LSCOLORPICKER_H |