17#ifndef QGSCOLORDIALOG_H
18#define QGSCOLORDIALOG_H
20#include "ui_qgscolordialog.h"
26#include <QColorDialog>
39class GUI_EXPORT
QgsColorDialog :
public QDialog,
private Ui::QgsColorDialogBase
62 void setTitle(
const QString &title );
79 static QColor
getColor(
const QColor &initialColor, QWidget *parent,
const QString &title = QString(),
bool allowOpacity =
false );
102 void mButtonBox_accepted();
103 void mButtonBox_rejected();
104 void mButtonBox_clicked( QAbstractButton *button );
109 QColor mPreviousColor;
111 bool mAllowOpacity =
true;
QColor color() const
Returns the current color for the dialog.
void setColor(const QColor &color)
Sets the current color for the dialog.
void currentColorChanged(const QColor &color)
Emitted when the dialog's color changes.
void setAllowOpacity(bool allowOpacity)
Sets whether opacity modification (transparency) is permitted for the color dialog.
void closeEvent(QCloseEvent *e) override
static QColor getColor(const QColor &initialColor, QWidget *parent, const QString &title=QString(), bool allowOpacity=false)
Returns a color selection from a color dialog.
QgsColorDialog(QWidget *parent=nullptr, Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags, const QColor &color=QColor())
Create a new color picker dialog.
void setTitle(const QString &title)
Sets the title for the color dialog.