Class: QgsDatabaseSchemaItem

class qgis.core.QgsDatabaseSchemaItem

Bases: QgsDataCollectionItem

A Collection that represents a database schema item

New in version 3.16.

QgsDatabaseSchemaItem(parent: QgsDataItem, name: str, path: str = ‘’, providerKey: str = ‘’) Constructor for QgsDatabaseSchemaItem, with the specified parent item.

The name argument specifies the text to show in the model for the item. A translated string should be used wherever appropriate.

The path argument gives the item path in the browser tree. The path string can take any form, but QgsSchemaItem items pointing to different logical locations should always use a different item path.

The optional providerKey string can be used to specify the key for the QgsDataItemProvider that created this item.

Methods

childEvent

connectNotify

customEvent

databaseConnection

rtype:

QgsAbstractDatabaseProviderConnection

deferredDelete

The item is scheduled to be deleted.

disconnectNotify

homeDirIcon

Shared home directory icon.

iconDataCollection

Returns the standard browser data collection icon.

isSignalConnected

openDirIcon

Shared open directory icon.

populate

receivers

refresh

Refresh the items from a specified list of child items.

sender

senderSignalIndex

timerEvent

updateIcon

Will request a repaint of this icon.

childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
databaseConnection(self) QgsAbstractDatabaseProviderConnection
Return type:

QgsAbstractDatabaseProviderConnection

deferredDelete(self) bool

The item is scheduled to be deleted. E.g. if deleteLater() is called when item is in Populating state (createChildren() running in another thread), the deferredDelete() returns True and item will be deleted once Populating finished. Items with slow reateChildren() (for example network or database based) may check during createChildren() if deferredDelete() returns True and return from createChildren() immediately because result will be useless.

disconnectNotify(self, QMetaMethod)
homeDirIcon(fillColor: QColor | Qt.GlobalColor | QGradient = QColor(), strokeColor: QColor | Qt.GlobalColor | QGradient = QColor()) QIcon

Shared home directory icon.

Since QGIS 3.20 the optional fillColor and strokeColor arguments can be used to specify a fill and stroke color for the icon.

New in version 3.4.

iconDataCollection() QIcon

Returns the standard browser data collection icon.

See also

iconDir()

Return type:

QIcon

isSignalConnected(self, QMetaMethod) bool
openDirIcon(fillColor: QColor | Qt.GlobalColor | QGradient = QColor(), strokeColor: QColor | Qt.GlobalColor | QGradient = QColor()) QIcon

Shared open directory icon.

Since QGIS 3.20 the optional fillColor and strokeColor arguments can be used to specify a fill and stroke color for the icon.

New in version 3.4.

populate(self, children: Iterable[QgsDataItem])
populate(self, foreground: bool = False) None
receivers(self, PYQT_SIGNAL) int
refresh(self, children: Iterable[QgsDataItem])

Refresh the items from a specified list of child items.

refresh(self)

sender(self) QObject
senderSignalIndex(self) int
timerEvent(self, QTimerEvent)
updateIcon(self)

Will request a repaint of this icon.

New in version 3.0.