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;
81 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex() )
const override;
82 QModelIndex parent(
const QModelIndex &index )
const override;
83 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
84 int columnCount(
const QModelIndex &parent = QModelIndex() )
const override;
85 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole )
const override;
86 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
87 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole )
override;
88 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole )
const override;
89 Qt::DropActions supportedDropActions()
const override;
90 QStringList mimeTypes()
const override;
91 bool removeRows(
int row,
int count,
const QModelIndex &parent = QModelIndex() )
override;
92 bool insertRows(
int row,
int count,
const QModelIndex &parent = QModelIndex() )
override;
93 QMimeData *mimeData(
const QModelIndexList &indexes )
const override;
94 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent )
override;
108 void setScheme(
QgsColorScheme *scheme,
const QString &context = QString(),
const QColor &baseColor = QColor() );
130 void addColor(
const QColor &color,
const QString &label = QString(),
bool allowDuplicate =
false );
177 bool saveColorsToScheme();
184 bool importColorsFromGpl( QFile &file );
191 bool exportColorsToGpl( QFile &file );
197 bool isDirty()
const;
214 void setScheme(
QgsColorScheme *scheme,
const QString &context = QString(),
const QColor &baseColor = QColor() );
219 void removeSelection();
227 void addColor(
const QColor &color,
const QString &label = QString(),
bool allowDuplicate =
false );
245 void showImportColorsDialog();
251 void showExportColorsDialog();
262 void keyPressEvent( QKeyEvent *event )
override;
264 void mousePressEvent( QMouseEvent *event )
override;
266 void mouseReleaseEvent( QMouseEvent *event )
override;
273 QPoint mDragStartPosition;