17 #ifndef QGSCOLORDIALOG_H 18 #define QGSCOLORDIALOG_H 20 #include <QColorDialog> 21 #include "ui_qgscolordialog.h" 36 class GUI_EXPORT
QgsColorDialog :
public QDialog,
private Ui::QgsColorDialogBase
50 const QColor &color = QColor() );
62 void setTitle(
const QString &title );
70 void setAllowOpacity(
const bool allowOpacity );
81 static QColor getColor(
const QColor &initialColor, QWidget *parent,
const QString &title = QString(),
82 const bool allowOpacity =
false );
90 void currentColorChanged(
const QColor &color );
98 void setColor(
const QColor &color );
102 void closeEvent( QCloseEvent *e )
override;
106 void mButtonBox_accepted();
107 void mButtonBox_rejected();
108 void mButtonBox_clicked( QAbstractButton *button );
114 QColor mPreviousColor;
116 bool mAllowOpacity =
true;
125 #endif // #ifndef QGSCOLORDIALOG_H
A custom QGIS dialog for selecting a color.