41 void paint( QPainter *painter,
const QStyleOptionViewItem &option,
const QModelIndex &index )
const override;
42 QSize sizeHint(
const QStyleOptionViewItem &option,
const QModelIndex &index )
const override;
43 bool editorEvent( QEvent *event, QAbstractItemModel *model,
const QStyleOptionViewItem &option,
const QModelIndex &index )
override;
50 QWidget *mParent =
nullptr;
56 QPixmap transparentBackground()
const;
82 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex() )
const override;
83 QModelIndex parent(
const QModelIndex &index )
const override;
84 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
85 int columnCount(
const QModelIndex &parent = QModelIndex() )
const override;
86 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole )
const override;
87 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
88 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole )
override;
89 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole )
const override;
90 Qt::DropActions supportedDropActions()
const override;
91 QStringList mimeTypes()
const override;
92 bool removeRows(
int row,
int count,
const QModelIndex &parent = QModelIndex() )
override;
93 bool insertRows(
int row,
int count,
const QModelIndex &parent = QModelIndex() )
override;
94 QMimeData *mimeData(
const QModelIndexList &indexes )
const override;
95 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent )
override;
109 void setScheme(
QgsColorScheme *scheme,
const QString &context = QString(),
const QColor &baseColor = QColor() );
131 void addColor(
const QColor &color,
const QString &label = QString(),
bool allowDuplicate =
false );
180 bool saveColorsToScheme();
187 bool importColorsFromGpl( QFile &file );
194 bool exportColorsToGpl( QFile &file );
200 bool isDirty()
const;
217 void setScheme(
QgsColorScheme *scheme,
const QString &context = QString(),
const QColor &baseColor = QColor() );
222 void removeSelection();
230 void addColor(
const QColor &color,
const QString &label = QString(),
bool allowDuplicate =
false );
248 void showImportColorsDialog();
254 void showExportColorsDialog();
266 void keyPressEvent( QKeyEvent *event )
override;
268 void mousePressEvent( QMouseEvent *event )
override;
270 void mouseReleaseEvent( QMouseEvent *event )
override;
277 QPoint mDragStartPosition;