47 #ifndef QTCOLORPICKER_H
48 #define QTCOLORPICKER_H
49 #include <QtGui/QPushButton>
50 #include <QtCore/QString>
51 #include <QtGui/QColor>
53 #include <QtGui/QLabel>
54 #include <QtCore/QEvent>
55 #include <QtGui/QFocusEvent>
58 # if !defined(QT_QTCOLORPICKER_EXPORT) && !defined(QT_QTCOLORPICKER_IMPORT)
59 # define QT_QTCOLORPICKER_EXPORT
60 # elif defined(QT_QTCOLORPICKER_IMPORT)
61 # if defined(QT_QTCOLORPICKER_EXPORT)
62 # undef QT_QTCOLORPICKER_EXPORT
64 # define QT_QTCOLORPICKER_EXPORT __declspec(dllimport)
65 # elif defined(QT_QTCOLORPICKER_EXPORT)
66 # undef QT_QTCOLORPICKER_EXPORT
67 # define QT_QTCOLORPICKER_EXPORT __declspec(dllexport)
70 # define QT_QTCOLORPICKER_EXPORT
79 Q_PROPERTY(
bool colorDialog READ colorDialogEnabled WRITE setColorDialogEnabled)
83 int columns = -1,
bool enableColorDialog =
true);
87 void insertColor(
const QColor &color,
const QString &text = QString::null,
int index = -1);
89 QColor currentColor()
const;
91 QColor color(
int index)
const;
93 void setColorDialogEnabled(
bool enabled);
94 bool colorDialogEnabled()
const;
96 void setStandardColors();
98 static QColor getColor(
const QPoint &pos,
bool allowCustomColors =
true);
101 void setCurrentColor(
const QColor &col);
104 void colorChanged(
const QColor &);
107 void paintEvent(QPaintEvent *e);
110 void buttonPressed(
bool toggled);
bool firstInserted
Definition: qtcolorpicker.h:118
ColorPickerPopup * popup
Definition: qtcolorpicker.h:114
#define QT_QTCOLORPICKER_EXPORT
Definition: qtcolorpicker.h:70
The QtColorPicker class provides a widget for selecting colors from a popup color grid...
Definition: qtcolorpicker.h:75
bool dirty
Definition: qtcolorpicker.h:117
bool withColorDialog
Definition: qtcolorpicker.h:116
QColor col
Definition: qtcolorpicker.h:115