krita
kis_color_cup.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef KIS_COLOR_CUP_H
00020 #define KIS_COLOR_CUP_H
00021
00022 #include <qpushbutton.h>
00023 #include <qcolor.h>
00024 #include <qframe.h>
00025
00026 #include <koffice_export.h>
00027
00028 class QSize;
00029 class QPainter;
00030 class QWidget;
00031 class KHSSelector;
00032 class KValueSelector;
00033
00034 class KisColorPopup : public QFrame {
00035
00036 Q_OBJECT
00037
00038 public:
00039
00040 KisColorPopup(QColor color, QWidget * w, const char * name);
00041 virtual ~KisColorPopup() {};
00042
00043 signals:
00044
00045 void changed(const QColor &);
00046
00047 private:
00048
00049 KHSSelector * m_khsSelector;
00050 KValueSelector * m_valueSelector;
00051
00052 QColor m_color;
00053 };
00054
00055 class KRITAUI_EXPORT KisColorCup : public QPushButton {
00056
00057 Q_OBJECT
00058
00059 public:
00060
00061 KisColorCup(QWidget * parent, const char * name = 0);
00062
00063 virtual ~KisColorCup() {};
00064
00065 QColor color() { return m_color; };
00066
00067 signals:
00068
00069 void changed(const QColor &);
00070
00071 public:
00072
00073 QSize sizeHint() const;
00074
00075 public slots:
00076
00077 void setColor(const QColor & c);
00078
00079
00080 private slots:
00081
00082 void slotClicked();
00083
00084 protected:
00085
00086 virtual void drawButtonLabel( QPainter *p );
00087
00088 private:
00089
00090 KisColorPopup * m_popup;
00091 QColor m_color;
00092 };
00093
00094 #endif
|