15 #ifndef QGSCOLORBUTTON_H 16 #define QGSCOLORBUTTON_H 18 #include <QColorDialog> 19 #include <QPushButton> 20 #include <QTemporaryFile> 34 Q_PROPERTY(
QString colorDialogTitle READ colorDialogTitle WRITE setColorDialogTitle )
35 Q_PROPERTY(
bool acceptLiveUpdates READ acceptLiveUpdates WRITE setAcceptLiveUpdates )
36 Q_PROPERTY(
QColor color READ color WRITE setColor )
38 Q_PROPERTY(
QColorDialog::ColorDialogOptions colorDialogOptions READ colorDialogOptions WRITE setColorDialogOptions )
57 void setColor( const
QColor &color );
70 void setColorDialogOptions( const
QColorDialog::ColorDialogOptions& cdo );
84 void setColorDialogTitle( const
QString& cdt );
96 bool acceptLiveUpdates() {
return mAcceptLiveUpdates; }
121 void colorChanged(
const QColor &color );
126 static const QPixmap& transpBkgrd();
162 bool mAcceptLiveUpdates;
166 QPoint mDragStartPosition;
191 bool colorFromMimeData(
const QMimeData *mimeData,
QColor &resultColor );
210 void stopPicking(
QPointF eventPos,
bool sampleColor =
true );
213 void onButtonClicked();
218 void setValidColor(
const QColor& newColor );
typedef ColorDialogOptions