|
QGIS API Documentation 4.1.0-Master (3b8ef1f72a3)
|
A QSortFilterProxyModel subclass for showing filtered symbol and color ramps entries from a QgsStyle database. More...
#include <qgsstylemodel.h>

Public Slots | |
| void | setFilterString (const QString &filter) |
| Sets a filter string, such that only symbol entities with names matching the specified string will be shown. | |
Public Member Functions | |
| QgsStyleProxyModel (QgsCombinedStyleModel *model, QObject *parent=nullptr) | |
| Constructor for QgsStyleProxyModel, using the specified source combined model and parent object. | |
| QgsStyleProxyModel (QgsStyle *style, QObject *parent=nullptr) | |
| Constructor for QgsStyleProxyModel, for the specified style and parent object. | |
| QgsStyleProxyModel (QgsStyleModel *model, QObject *parent=nullptr) | |
| Constructor for QgsStyleProxyModel, using the specified source model and parent object. | |
| void | addDesiredIconSize (QSize size) |
| Adds an additional icon size to generate for Qt::DecorationRole data. | |
| void | addTargetScreenProperties (const QgsScreenProperties &properties) |
| Adds additional target screen properties to use when generating icons for Qt::DecorationRole data. | |
| QgsStyle::StyleEntity | entityFilter () const |
| Returns the style entity type filter. | |
| bool | entityFilterEnabled () const |
Returns true if filtering by entity type is enabled. | |
| bool | favoritesOnly () const |
Returns true if the model is showing only favorited entities. | |
| bool | filterAcceptsRow (int source_row, const QModelIndex &source_parent) const override |
| QString | filterString () const |
| Returns the current filter string, if set. | |
| Qgis::GeometryType | layerType () const |
| Returns the layer type filter, or Qgis::GeometryType::Unknown if no layer type filter is present. | |
| bool | lessThan (const QModelIndex &left, const QModelIndex &right) const override |
| Qgis::MaterialRenderingTechnique | renderingTechnique () const |
| Returns the rendering technique filter. | |
| bool | renderingTechniqueFilterEnabled () const |
Returns true if filtering by material rendering technique is enabled. | |
| void | setEntityFilter (QgsStyle::StyleEntity filter) |
| Sets the style entity type filter. | |
| void | setEntityFilterEnabled (bool enabled) |
| Sets whether filtering by entity type is enabled. | |
| void | setEntityFilters (const QList< QgsStyle::StyleEntity > &filters) |
| Sets the style entity type filters. | |
| void | setFavoritesOnly (bool favoritesOnly) |
| Sets whether the model should show only favorited entities. | |
| void | setLayerType (Qgis::GeometryType type) |
| Sets the layer type filter. | |
| void | setRenderingTechnique (Qgis::MaterialRenderingTechnique technique) |
| Sets the rendering technique filter. | |
| void | setRenderingTechniqueFilterEnabled (bool enabled) |
| Sets whether filtering by material rendering technique is enabled. | |
| void | setSmartGroupId (int id) |
| Sets a smart group id to filter style entities by. | |
| void | setSymbolType (Qgis::SymbolType type) |
| Sets the symbol type filter. | |
| void | setSymbolTypeFilterEnabled (bool enabled) |
| Sets whether filtering by symbol type is enabled. | |
| void | setTagId (int id) |
| Sets a tag id to filter style entities by. | |
| void | setTagString (const QString &tag) |
| Sets a tag to filter style entities by. | |
| int | smartGroupId () const |
| Returns the smart group id used to filter style entities by. | |
| Qgis::SymbolType | symbolType () const |
| Returns the symbol type filter. | |
| bool | symbolTypeFilterEnabled () const |
Returns true if filtering by symbol type is enabled. | |
| int | tagId () const |
| Returns the tag id used to filter style entities by. | |
| QString | tagString () const |
| Returns the tag string used to filter style entities by. | |
A QSortFilterProxyModel subclass for showing filtered symbol and color ramps entries from a QgsStyle database.
Definition at line 263 of file qgsstylemodel.h.
|
explicit |
Constructor for QgsStyleProxyModel, for the specified style and parent object.
The style object must exist for the lifetime of this model.
Definition at line 886 of file qgsstylemodel.cpp.
|
explicit |
Constructor for QgsStyleProxyModel, using the specified source model and parent object.
The source model object must exist for the lifetime of this model.
Definition at line 943 of file qgsstylemodel.cpp.
|
explicit |
Constructor for QgsStyleProxyModel, using the specified source combined model and parent object.
The source model object must exist for the lifetime of this model.
Definition at line 952 of file qgsstylemodel.cpp.
| void QgsStyleProxyModel::addDesiredIconSize | ( | QSize | size | ) |
Adds an additional icon size to generate for Qt::DecorationRole data.
This allows style icons to be generated at an icon size which corresponds exactly to the view's icon size in which this model is used.
Definition at line 1097 of file qgsstylemodel.cpp.
| void QgsStyleProxyModel::addTargetScreenProperties | ( | const QgsScreenProperties & | properties | ) |
Adds additional target screen properties to use when generating icons for Qt::DecorationRole data.
This allows style icons to be generated at an icon device pixel ratio and DPI which corresponds exactly to the view's screen properties in which this model is used.
Definition at line 1105 of file qgsstylemodel.cpp.
| QgsStyle::StyleEntity QgsStyleProxyModel::entityFilter | ( | ) | const |
Returns the style entity type filter.
true. Definition at line 1226 of file qgsstylemodel.cpp.
| bool QgsStyleProxyModel::entityFilterEnabled | ( | ) | const |
Returns true if filtering by entity type is enabled.
Definition at line 1215 of file qgsstylemodel.cpp.
| bool QgsStyleProxyModel::favoritesOnly | ( | ) | const |
Returns true if the model is showing only favorited entities.
Definition at line 1086 of file qgsstylemodel.cpp.
|
override |
Definition at line 960 of file qgsstylemodel.cpp.
|
inline |
Returns the current filter string, if set.
Definition at line 298 of file qgsstylemodel.h.
| Qgis::GeometryType QgsStyleProxyModel::layerType | ( | ) | const |
Returns the layer type filter, or Qgis::GeometryType::Unknown if no layer type filter is present.
This setting has an effect on label settings entities and 3d symbols only.
Definition at line 1124 of file qgsstylemodel.cpp.
|
override |
Definition at line 1067 of file qgsstylemodel.cpp.
| Qgis::MaterialRenderingTechnique QgsStyleProxyModel::renderingTechnique | ( | ) | const |
Returns the rendering technique filter.
true, and has no effect on non-material entities (i.e. color ramps).Definition at line 929 of file qgsstylemodel.cpp.
| bool QgsStyleProxyModel::renderingTechniqueFilterEnabled | ( | ) | const |
Returns true if filtering by material rendering technique is enabled.
Definition at line 1135 of file qgsstylemodel.cpp.
| void QgsStyleProxyModel::setEntityFilter | ( | QgsStyle::StyleEntity | filter | ) |
Sets the style entity type filter.
true.Definition at line 1231 of file qgsstylemodel.cpp.
| void QgsStyleProxyModel::setEntityFilterEnabled | ( | bool | enabled | ) |
Sets whether filtering by entity type is enabled.
If enabled is false, then the value of entityFilter() will have no effect on the model filtering.
Definition at line 1220 of file qgsstylemodel.cpp.
| void QgsStyleProxyModel::setEntityFilters | ( | const QList< QgsStyle::StyleEntity > & | filters | ) |
Sets the style entity type filters.
true. Definition at line 1237 of file qgsstylemodel.cpp.
| void QgsStyleProxyModel::setFavoritesOnly | ( | bool | favoritesOnly | ) |
Sets whether the model should show only favorited entities.
Definition at line 1091 of file qgsstylemodel.cpp.
|
slot |
Sets a filter string, such that only symbol entities with names matching the specified string will be shown.
Definition at line 1079 of file qgsstylemodel.cpp.
| void QgsStyleProxyModel::setLayerType | ( | Qgis::GeometryType | type | ) |
Sets the layer type filter.
Set type to Qgis::GeometryType::Unknown if no layer type filter is desired.
Definition at line 1129 of file qgsstylemodel.cpp.
| void QgsStyleProxyModel::setRenderingTechnique | ( | Qgis::MaterialRenderingTechnique | technique | ) |
Sets the rendering technique filter.
true.Definition at line 934 of file qgsstylemodel.cpp.
| void QgsStyleProxyModel::setRenderingTechniqueFilterEnabled | ( | bool | enabled | ) |
Sets whether filtering by material rendering technique is enabled.
If enabled is false, then the value of renderingTechnique() will have no effect on the model filtering. This has no effect on non-material entities (i.e. color ramps).
Definition at line 1140 of file qgsstylemodel.cpp.
| void QgsStyleProxyModel::setSmartGroupId | ( | int | id | ) |
Sets a smart group id to filter style entities by.
Only entities within the given smart group will be shown in the model.
Set id to -1 to disable smart group filtering.
Definition at line 1182 of file qgsstylemodel.cpp.
| void QgsStyleProxyModel::setSymbolType | ( | Qgis::SymbolType | type | ) |
Sets the symbol type filter.
true.Definition at line 1209 of file qgsstylemodel.cpp.
| void QgsStyleProxyModel::setSymbolTypeFilterEnabled | ( | bool | enabled | ) |
Sets whether filtering by symbol type is enabled.
If enabled is false, then the value of symbolType() will have no effect on the model filtering. This has no effect on non-symbol entities (i.e. color ramps).
Definition at line 1118 of file qgsstylemodel.cpp.
| void QgsStyleProxyModel::setTagId | ( | int | id | ) |
Sets a tag id to filter style entities by.
Only entities with the given tag will be shown in the model.
Set id to -1 to disable tag filtering.
Definition at line 1149 of file qgsstylemodel.cpp.
| void QgsStyleProxyModel::setTagString | ( | const QString & | tag | ) |
Sets a tag to filter style entities by.
Only entities with the given tag will be shown in the model.
Set tag to an empty string to disable tag filtering.
Definition at line 1170 of file qgsstylemodel.cpp.
| int QgsStyleProxyModel::smartGroupId | ( | ) | const |
Returns the smart group id used to filter style entities by.
If returned value is -1, then no smart group filtering is being conducted.
Definition at line 1199 of file qgsstylemodel.cpp.
| Qgis::SymbolType QgsStyleProxyModel::symbolType | ( | ) | const |
Returns the symbol type filter.
true, and has no effect on non-symbol entities (i.e. color ramps).Definition at line 1204 of file qgsstylemodel.cpp.
| bool QgsStyleProxyModel::symbolTypeFilterEnabled | ( | ) | const |
Returns true if filtering by symbol type is enabled.
Definition at line 1113 of file qgsstylemodel.cpp.
| int QgsStyleProxyModel::tagId | ( | ) | const |
Returns the tag id used to filter style entities by.
If returned value is -1, then no tag filtering is being conducted.
Definition at line 1165 of file qgsstylemodel.cpp.
| QString QgsStyleProxyModel::tagString | ( | ) | const |
Returns the tag string used to filter style entities by.
If returned value is empty, then no tag filtering is being conducted.
Definition at line 1177 of file qgsstylemodel.cpp.