Class: QgsSvgSelectorListModel¶
- class qgis.gui.QgsSvgSelectorListModel¶
Bases:
PyQt5.QtCore.QAbstractListModel
A model for displaying SVG files with a preview icon. 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.
QgsSvgSelectorListModel(parent: QObject, iconSize: int = 30) Constructor for
QgsSvgSelectorListModel
. All SVGs in folders from the application SVG search paths will be shown.- Parameters:
parent – parent object
iconSize – desired size of SVG icons to create
QgsSvgSelectorListModel(parent: QObject, path: 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
- param index:
- param parent:
- beginInsertColumns(self, QModelIndex, int, int)¶
- beginInsertRows(self, QModelIndex, int, int)¶
- beginMoveColumns(self, QModelIndex, int, int, QModelIndex, int) bool ¶
- beginMoveRows(self, QModelIndex, int, int, QModelIndex, int) bool ¶
- beginRemoveColumns(self, QModelIndex, int, int)¶
- beginRemoveRows(self, QModelIndex, int, int)¶
- beginResetModel(self)¶
- changePersistentIndex(self, QModelIndex, QModelIndex)¶
- changePersistentIndexList(self, Iterable[QModelIndex], Iterable[QModelIndex])¶
- childEvent(self, QChildEvent)¶
- connectNotify(self, QMetaMethod)¶
- createIndex(self, int, int, object: object = 0) QModelIndex ¶
- customEvent(self, QEvent)¶
- data(self, index: QModelIndex, role: int = Qt.DisplayRole) Any ¶
- Parameters:
index (QModelIndex) –
role (int = Qt.DisplayRole) –
- Return type:
Any
- decodeData(self, int, int, QModelIndex, QDataStream) bool ¶
- disconnectNotify(self, QMetaMethod)¶
- encodeData(self, Iterable[QModelIndex], QDataStream)¶
- endInsertColumns(self)¶
- endInsertRows(self)¶
- endMoveColumns(self)¶
- endMoveRows(self)¶
- endRemoveColumns(self)¶
- endRemoveRows(self)¶
- endResetModel(self)¶
- isSignalConnected(self, QMetaMethod) bool ¶
- persistentIndexList(self) List[QModelIndex] ¶
- receivers(self, PYQT_SIGNAL) int ¶
- resetInternalData(self)¶
- rowCount(self, parent: QModelIndex = QModelIndex()) int ¶
- Parameters:
parent (QModelIndex = QModelIndex()) –
- Return type:
int
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- timerEvent(self, QTimerEvent)¶