16 #ifndef QGSSTYLEITEMSLISTWIDGET_H
17 #define QGSSTYLEITEMSLISTWIDGET_H
19 #include "ui_qgsstyleitemslistwidgetbase.h"
23 #include <QStyledItemDelegate>
38 explicit QgsReadOnlyStyleModel(
QgsStyleModel *sourceModel, QObject *parent =
nullptr );
39 explicit QgsReadOnlyStyleModel(
QgsStyle *style, QObject *parent =
nullptr );
41 #if QT_VERSION >= QT_VERSION_CHECK(5, 13, 0)
45 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
46 QVariant data(
const QModelIndex &index,
int role )
const override;
57 class QgsStyleModelDelegate :
public QStyledItemDelegate
66 QgsStyleModelDelegate( QObject *parent );
68 QSize sizeHint(
const QStyleOptionViewItem &option,
const QModelIndex &index )
const override;
69 void paint( QPainter *painter,
const QStyleOptionViewItem &option,
const QModelIndex &index )
const override;
113 void setEntityTypes(
const QList<QgsStyle::StyleEntity> &filters )
SIP_SKIP;
133 QString currentTagFilter()
const;
142 QMenu *advancedMenu();
153 void setAdvancedMenu( QMenu *menu );
162 void showAdvancedButton(
bool enabled );
169 QString currentItemName()
const;
179 void showEvent( QShowEvent *event )
override;
210 void groupsCombo_currentIndexChanged(
int index );
211 void updateModelFilters();
212 void onSelectionChanged(
const QModelIndex &index );
213 void populateGroups();
214 void openStyleManager();
219 QgsStyleModelDelegate *mDelegate =
nullptr;
220 bool mUpdatingGroups =
false;
A model which contains entities from multiple QgsStyle databases.
A QAbstractItemModel subclass for showing symbol and color ramp entities contained within a QgsStyle ...
A QSortFilterProxyModel subclass for showing filtered symbol and color ramps entries from a QgsStyle ...
StyleEntity
Enum for Entities involved in a style.
GeometryType
The geometry types are used to group QgsWkbTypes::Type in a coarse way.