Subgroup: Project

Class: QgsProjectItem

class qgis.core.QgsProjectItem

Bases: qgis._core.QgsDataItem

Data item that can be used to represent QGIS projects.

Methods

acceptDrop Returns whether the item accepts drag and dropped layers - e.g.
actions Returns the list of actions available for this item.
addChildItem Inserts a new child item.
blockSignals
capabilities2
childEvent
children
childrenCreated
connectNotify
createChildren Create children.
customEvent
deferredDelete
deleteChildItem Removes and deletes a child item, emitting relevant signals to the model.
deleteLater deleteLater(self)
depopulate Remove children recursively and set as not populated.
disconnect
disconnectNotify
dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
equal Returns true if this item is equal to another item (by testing item type and path).
event
eventFilter
findChild findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject
findChildren findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject]
findItem
handleDoubleClick Called when a user double clicks on the item.
handleDrop Attempts to process the mime data dropped on this item.
hasChildren
hasDragEnabled
icon
inherits
installEventFilter
isSignalConnected
isWidgetType
isWindowType
killTimer
menus Returns the list of menus available for this item.
metaObject
mimeUri Return mime URI for the data item.
moveToThread Move object and all its descendants to thread
name Returns the name of the item (the displayed text for the item).
objectName
paramWidget
parent Get item parent.
path
pathComponent Create path component replacing path separators
populate
property
pyqtConfigure Each keyword argument is either the name of a Qt property or a Qt signal.
receivers
refresh
refreshConnections Refresh connections: update GUI and emit signal
removeChildItem Removes a child item and returns it without deleting it.
removeEventFilter
rowCount
sender
senderSignalIndex
setCapabilities Sets the capabilities for the data item.
setCrs Writes the selected crs into data source.
setIcon
setIconName
setName Sets the name of the item (the displayed text for the item).
setObjectName
setParent Set item parent and connect / disconnect parent to / from item signals.
setPath
setProperty
setSortKey Sets a custom sorting key for the item.
setState Set item state.
setToolTip
signalsBlocked
sortKey Returns the sorting key for the item.
startTimer
state

New in version 2.8.

thread
timerEvent
toolTip
tr
type
updateIcon

Attributes

Collapse
Collection
Custom
Directory
Error
Fast
Favorites
Fertile
Layer
NoCapabilities
NotPopulated
Populated
Populating
Project
SetCrs
beginInsertItems beginInsertItems(self, QgsDataItem, int, int) [signal]
beginRemoveItems beginRemoveItems(self, QgsDataItem, int, int) [signal]
connectionsChanged Emitted when the provider’s connections of the child items have changed
dataChanged dataChanged(self, QgsDataItem) [signal]
destroyed destroyed(self, QObject = None) [signal]
endInsertItems endInsertItems(self) [signal]
endRemoveItems endRemoveItems(self) [signal]
objectNameChanged objectNameChanged(self, str) [signal]
stateChanged stateChanged(self, QgsDataItem, QgsDataItem.State) [signal]
staticMetaObject
childEvent()
connectNotify()
customEvent()
deferredDelete()
disconnectNotify()
hasDragEnabled(self) → bool
isSignalConnected()
populate()
receivers()
refresh()
sender()
senderSignalIndex()
timerEvent()
updateIcon()