Class: QgsSvgSelectorFilterModel¶
- class qgis.gui.QgsSvgSelectorFilterModel¶
Bases:
PyQt5.QtCore.QSortFilterProxyModel
A model for displaying SVG files with a preview icon which can be filtered by file name. Population of the model is performed in a background thread to ensure that initial creation of the model is responsive and does not block the GUI.
Added in version 3.20.
QgsSvgSelectorFilterModel(parent: Optional[QObject], path: Optional[str] = ‘’, iconSize: int = 30) Constructor for creating a model for SVG files in a specific path.
- Parameters:
parent – parent object
path – initial path, which is recursively searched
iconSize –
desired size of SVG icons to create
Methods
- beginInsertColumns(self, parent: QModelIndex, first: int, last: int)¶
- beginInsertRows(self, parent: QModelIndex, first: int, last: int)¶
- beginMoveColumns(self, sourceParent: QModelIndex, sourceFirst: int, sourceLast: int, destinationParent: QModelIndex, destinationColumn: int) bool ¶
- beginMoveRows(self, sourceParent: QModelIndex, sourceFirst: int, sourceLast: int, destinationParent: QModelIndex, destinationRow: int) bool ¶
- beginRemoveColumns(self, parent: QModelIndex, first: int, last: int)¶
- beginRemoveRows(self, parent: QModelIndex, first: int, last: int)¶
- beginResetModel(self)¶
- changePersistentIndex(self, from_: QModelIndex, to: QModelIndex)¶
- changePersistentIndexList(self, from_: Iterable[QModelIndex], to: Iterable[QModelIndex])¶
- childEvent(self, a0: QChildEvent | None)¶
- connectNotify(self, signal: QMetaMethod)¶
- createIndex(self, row: int, column: int, object: Any = None) QModelIndex ¶
- customEvent(self, a0: QEvent | None)¶
- decodeData(self, row: int, column: int, parent: QModelIndex, stream: QDataStream) bool ¶
- disconnectNotify(self, signal: QMetaMethod)¶
- encodeData(self, indexes: Iterable[QModelIndex], stream: QDataStream)¶
- endInsertColumns(self)¶
- endInsertRows(self)¶
- endMoveColumns(self)¶
- endMoveRows(self)¶
- endRemoveColumns(self)¶
- endRemoveRows(self)¶
- endResetModel(self)¶
- filterAcceptsColumn(self, source_column: int, source_parent: QModelIndex) bool ¶
- filterAcceptsRow(self, source_row: int, source_parent: QModelIndex) bool ¶
- invalidateFilter(self)¶
- isSignalConnected(self, signal: QMetaMethod) bool ¶
- lessThan(self, left: QModelIndex, right: QModelIndex) bool ¶
- persistentIndexList(self) List[QModelIndex] ¶
- receivers(self, signal: PYQT_SIGNAL) int ¶
- resetInternalData(self)¶
- sender(self) QObject | None ¶
- senderSignalIndex(self) int ¶
- timerEvent(self, a0: QTimerEvent | None)¶