16#ifndef QGSSTYLEITEMSLISTWIDGET_H
17#define QGSSTYLEITEMSLISTWIDGET_H
19#include "ui_qgsstyleitemslistwidgetbase.h"
24#include <QStyledItemDelegate>
38 explicit QgsReadOnlyStyleModel( QgsStyleModel *sourceModel, QObject *parent =
nullptr );
39 explicit QgsReadOnlyStyleModel( QgsStyle *style, QObject *parent =
nullptr );
40 explicit QgsReadOnlyStyleModel( QgsCombinedStyleModel *style, QObject *parent =
nullptr );
42 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
43 QVariant data(
const QModelIndex &index,
int role )
const override;
53class QgsStyleModelDelegate :
public QStyledItemDelegate
61 QgsStyleModelDelegate( QObject *parent );
63 QSize sizeHint(
const QStyleOptionViewItem &option,
const QModelIndex &index )
const override;
64 void paint( QPainter *painter,
const QStyleOptionViewItem &option,
const QModelIndex &index )
const override;
171 void showEvent( QShowEvent *event )
override;
202 void groupsCombo_currentIndexChanged(
int index );
203 void updateModelFilters();
204 void onSelectionChanged(
const QModelIndex &index,
const QModelIndex &previous );
205 void populateGroups();
206 void openStyleManager();
211 QgsStyleModelDelegate *mDelegate =
nullptr;
212 bool mUpdatingGroups =
false;
GeometryType
The geometry types are used to group Qgis::WkbType in a coarse way.
A model which contains entities from multiple QgsStyle databases.
A QSortFilterProxyModel subclass for showing filtered symbol and color ramps entries from a QgsStyle ...
A database of saved style entities, including symbols, color ramps, text formats and others.
StyleEntity
Enum for Entities involved in a style.