From f8c66ff96ae2417e744b2d46daa8577d642b9c9f Mon Sep 17 00:00:00 2001 From: Treeki Date: Tue, 4 Sep 2012 19:56:58 +0200 Subject: pulled the colour picker out into a LSColorPicker widget --- lscolorpicker.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 lscolorpicker.h (limited to 'lscolorpicker.h') 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 + +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 -- cgit v1.2.3