Class: QgsStyleProxyModel¶
-
class
qgis.core.
QgsStyleProxyModel
(style: QgsStyle, parent: QObject = None)¶ Bases:
PyQt5.QtCore.QSortFilterProxyModel
Constructor for QgsStyleProxyModel, for the specified
style
andparent
object.The
style
object must exist for the lifetime of this model.A QSortFilterProxyModel subclass for showing filtered symbol and color ramps entries from a QgsStyle database.
See also
New in version 3.4: Enums
Methods
Adds an additional icon
size
to generate for Qt.DecorationRole data.Returns the style entity type filter.
Returns true if filtering by entity type is enabled.
Returns true if the model is showing only favorited entities.
Returns the current filter string, if set.
Sets the style entity type
filter
.Sets whether filtering by entity type is
enabled
.Sets whether the model should show only favorited entities.
Sets a
filter
string, such that only symbol entities with names matching the specified string will be shown.Sets a smart group
id
to filter style entities by.Sets the symbol
type
filter.Sets whether filtering by symbol type is
enabled
.Sets a tag
id
to filter style entities by.Returns the smart group id used to filter style entities by.
Returns the symbol type filter.
Returns true if filtering by symbol type is enabled.
Returns the tag id used to filter style entities by.
Signals
Attributes
-
addDesiredIconSize
(self, size: QSize)¶ 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.
-
beginInsertColumns
()¶
-
beginInsertRows
()¶
-
beginMoveColumns
()¶
-
beginMoveRows
()¶
-
beginRemoveColumns
()¶
-
beginRemoveRows
()¶
-
beginResetModel
()¶
-
changePersistentIndex
()¶
-
changePersistentIndexList
()¶
-
childEvent
()¶
-
connectNotify
()¶
-
createIndex
()¶
-
customEvent
()¶
-
decodeData
()¶
-
disconnectNotify
()¶
-
encodeData
()¶
-
endInsertColumns
()¶
-
endInsertRows
()¶
-
endMoveColumns
()¶
-
endMoveRows
()¶
-
endRemoveColumns
()¶
-
endRemoveRows
()¶
-
endResetModel
()¶
-
entityFilter
(self) → QgsStyle.StyleEntity¶ Returns the style entity type filter.
Note
This filter is only active if entityFilterEnabled() is true.
See also
-
entityFilterEnabled
(self) → bool¶ Returns true if filtering by entity type is enabled.
See also
See also
-
favoritesOnly
(self) → bool¶ Returns true if the model is showing only favorited entities.
See also
-
filterAcceptsColumn
()¶
-
filterAcceptsRow
(self, source_row: int, source_parent: QModelIndex) → bool¶
-
filterString
(self) → str¶ Returns the current filter string, if set.
See also
-
invalidateFilter
()¶
-
isSignalConnected
()¶
-
lessThan
()¶
-
persistentIndexList
()¶
-
receivers
()¶
-
resetInternalData
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setEntityFilter
(self, filter: QgsStyle.StyleEntity)¶ Sets the style entity type
filter
.Note
This filter is only active if entityFilterEnabled() is true.
See also
-
setEntityFilterEnabled
(self, enabled: bool)¶ 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.See also
See also
-
setFavoritesOnly
(self, favoritesOnly: bool)¶ Sets whether the model should show only favorited entities.
See also
-
setFilterString
(self, filter: str)¶ Sets a
filter
string, such that only symbol entities with names matching the specified string will be shown.See also
-
setSmartGroupId
(self, id: int)¶ 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.See also
-
setSymbolType
(self, type: QgsSymbol.SymbolType)¶ Sets the symbol
type
filter.Note
This filter is only active if symbolTypeFilterEnabled() is true.
See also
-
setSymbolTypeFilterEnabled
(self, enabled: bool)¶ 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).See also
See also
-
setTagId
(self, id: int)¶ 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.See also
-
smartGroupId
(self) → int¶ Returns the smart group id used to filter style entities by.
If returned value is -1, then no smart group filtering is being conducted.
See also
-
symbolType
(self) → QgsSymbol.SymbolType¶ Returns the symbol type filter.
Note
This filter is only active if symbolTypeFilterEnabled() is true, and has no effect on non-symbol entities (i.e. color ramps).
See also
-
symbolTypeFilterEnabled
(self) → bool¶ Returns true if filtering by symbol type is enabled.
See also
See also
-
tagId
(self) → int¶ Returns the tag id used to filter style entities by.
If returned value is -1, then no tag filtering is being conducted.
See also
-
timerEvent
()¶
-