Class: QgsFavoritesItem¶
Contains various Favorites directories
Class Hierarchy¶
Base classes¶
A Collection: logical collection of layers or subcollections, e.g. GRASS location/mapset, database? wms source?  | 
|
Base class for all items in the model.  | 
|
Methods
Adds a new directory to the favorites group.  | 
|
Removes an existing directory from the favorites group.  | 
|
Renames the stored favorite with corresponding path a new name.  | 
Static Methods
Icon for favorites group  | 
- class qgis.core.QgsFavoritesItem[source]¶
 Bases:
QgsDataCollectionItem- __init__(parent: QgsDataItem | None, name: str | None, path: str | None = '')
 Constructor for QgsFavoritesItem. Accepts a path argument specifying the file path associated with the item.
- Parameters:
 parent (Optional[QgsDataItem])
name (Optional[str])
path (Optional[str] = '')
- addDirectory(self, directory: str | None, name: str | None = '')[source]¶
 Adds a new
directoryto the favorites group.If
nameis specified, it will be used as the favorite’s name. Otherwise the name will be set to matchdirectory.See also
- Parameters:
 directory (Optional[str])
name (Optional[str] = '')
- removeDirectory(self, item: QgsDirectoryItem | None)[source]¶
 Removes an existing directory from the favorites group.
See also
- Parameters:
 item (Optional[QgsDirectoryItem])