KDEUI
kcolorcombo.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef KCOLORCOMBO_H
00028 #define KCOLORCOMBO_H
00029
00030 #include <QtGui/QComboBox>
00031 #include <QtCore/QList>
00032
00033 #include <kdeui_export.h>
00034
00035 class KColorComboPrivate;
00036
00043 class KDEUI_EXPORT KColorCombo : public QComboBox
00044 {
00045 Q_OBJECT
00046 Q_PROPERTY( QColor color READ color WRITE setColor )
00047 Q_PROPERTY( QList<QColor> colors READ colors WRITE setColors )
00048
00049 public:
00053 explicit KColorCombo(QWidget *parent = 0);
00054 ~KColorCombo();
00055
00059 void setColor( const QColor &col );
00063 QColor color() const;
00064
00069 bool isCustomColor() const;
00070
00077 void setColors(const QList<QColor> &colors );
00078
00083 QList<QColor> colors() const;
00084
00088 void showEmptyList();
00089
00090 Q_SIGNALS:
00094 void activated( const QColor &col );
00098 void highlighted( const QColor &col );
00099
00100 protected:
00101 virtual void paintEvent(QPaintEvent *event);
00102
00103 private:
00104 friend class KColorComboPrivate;
00105 KColorComboPrivate *const d;
00106
00107 Q_DISABLE_COPY(KColorCombo)
00108
00109 Q_PRIVATE_SLOT(d, void _k_slotActivated(int))
00110 Q_PRIVATE_SLOT(d, void _k_slotHighlighted(int))
00111 };
00112
00113 #endif // KCOLORCOMBO_H