Class: QgsFieldsItem¶
- class qgis.core.QgsFieldsItem(parent: QgsDataItem, path: str, connectionUri: str, providerKey: str, schema: str, tableName: str)¶
Bases:
QgsDataItem
Constructor for
QgsFieldsItem
, with the specifiedparent
item.The
path
argument gives the item path in the browser tree. Thepath
string can take any form, butQgsDataItem
items pointing to different logical locations should always use a different itempath
. TheconnectionUri
argument is the connection part of the layer URI that it is used internally to create a connection and retrieve fields information. TheproviderKey
string can be used to specify the key for theQgsDataItemProvider
that created this item. Theschema
andtableName
are used to retrieve the layer and field information from theconnectionUri
.A collection of field items with some internal logic to retrieve the fields and a the vector layer instance from a connection URI, the schema and the table name.
Methods
Returns the connection URI
- rtype
object
The item is scheduled to be deleted.
- rtype
QIcon
Creates and returns a (possibly NULL) layer from the connection URI and schema/table information
Refresh the items from a specified list of child items.
Returns the schema name
Returns the table name
Returns the (possibly NULL) properties of the table this fields belong to.
Will request a repaint of this icon.
- childEvent(self, QChildEvent)¶
- connectNotify(self, QMetaMethod)¶
- connectionUri(self) → str¶
Returns the connection URI
- Return type
str
- createChildren(self) → object¶
- Return type
object
- customEvent(self, QEvent)¶
- 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), thedeferredDelete()
returnsTrue
and item will be deleted once Populating finished. Items with slowreateChildren()
(for example network or database based) may check duringcreateChildren()
ifdeferredDelete()
returnsTrue
and return fromcreateChildren()
immediately because result will be useless.
- disconnectNotify(self, QMetaMethod)¶
- icon(self) → QIcon¶
- Return type
QIcon
- isSignalConnected(self, QMetaMethod) → bool¶
- layer(self) → QgsVectorLayer¶
Creates and returns a (possibly NULL) layer from the connection URI and schema/table information
- Return type
- populate(self, children: object)¶
- populate(self, foreground: bool = False) → None
- receivers(self, PYQT_SIGNAL) → int¶
- refresh(self, children: object)¶
Refresh the items from a specified list of child items.
refresh(self)
- schema(self) → str¶
Returns the schema name
- Return type
str
- sender(self) → QObject¶
- senderSignalIndex(self) → int¶
- tableName(self) → str¶
Returns the table name
- Return type
str
- tableProperty(self) → QgsAbstractDatabaseProviderConnection.TableProperty¶
Returns the (possibly NULL) properties of the table this fields belong to.
New in version 3.16.
- timerEvent(self, QTimerEvent)¶
- updateIcon(self)¶
Will request a repaint of this icon.
New in version 3.0.