Class: QgsFavoritesItem

class qgis.core.QgsFavoritesItem(parent: QgsDataItem, name: str, path: str = '')

Bases: qgis._core.QgsDataCollectionItem

Constructor for QgsFavoritesItem. Accepts a path argument specifying the file path associated with the item.

Contains various Favorites directories

New in version 3.0: Methods

addDirectory Adds a new directory to the favorites group.
childEvent
connectNotify
createChildren
customEvent
deferredDelete
disconnectNotify
homeDirIcon
iconFavorites Icon for favorites group
isSignalConnected
openDirIcon
populate
receivers
refresh
removeDirectory Removes an existing directory from the favorites group.
renameFavorite Renames the stored favorite with corresponding path a new name.
sender
senderSignalIndex
sortKey
timerEvent
updateIcon

Signals

Attributes

addDirectory(self, directory: str, name: str = '')

Adds a new directory to the favorites group.

If name is specified, it will be used as the favorite’s name. Otherwise the name will be set to match directory.

childEvent()
connectNotify()
createChildren(self) → object
customEvent()
deferredDelete()
disconnectNotify()
homeDirIcon()
iconFavorites() → QIcon

Icon for favorites group

isSignalConnected()
openDirIcon()
populate()
receivers()
refresh()
removeDirectory(self, item: QgsDirectoryItem)

Removes an existing directory from the favorites group.

See also

addDirectory()

renameFavorite(self, path: str, name: str)

Renames the stored favorite with corresponding path a new name.

sender()
senderSignalIndex()
sortKey(self) → Any
timerEvent()
updateIcon()