Class: QgsCptCityBrowserModel

A custom item model for display of CPT City color palettes.

Class Hierarchy

Inheritance diagram of qgis.core.QgsCptCityBrowserModel

Base classes

QAbstractItemModel

QObject

Methods

addRootItems

beginInsertItems

beginRemoveItems

connectItem

dataItem

Returns the data item corresponding to the given index.

endInsertItems

endRemoveItems

findItem

findPath

Returns index of a path

refresh

Refresh the item specified by path

reload

Reload the whole model

removeRootItems

Attributes

Authors

List

Selections

class qgis.core.QgsCptCityBrowserModel[source]

Bases: QAbstractItemModel

Authors = 0
List = 2
Selections = 1
class ViewType

Bases: int

addRootItems(self)[source]
beginInsertItems(self, parent: QgsCptCityDataItem | None, first: int, last: int)[source]
Parameters:
beginRemoveItems(self, parent: QgsCptCityDataItem | None, first: int, last: int)[source]
Parameters:
connectItem(self, item: QgsCptCityDataItem | None)[source]
Parameters:

item (Optional[QgsCptCityDataItem])

dataItem(self, idx: QModelIndex) QgsCptCityDataItem | None[source]

Returns the data item corresponding to the given index.

Parameters:

idx (QModelIndex)

Return type:

Optional[QgsCptCityDataItem]

endInsertItems(self)[source]
endRemoveItems(self)[source]
findItem(self, item: QgsCptCityDataItem | None, parent: QgsCptCityDataItem | None = None) QModelIndex[source]
Parameters:
Return type:

QModelIndex

findPath(self, path: str | None) QModelIndex[source]

Returns index of a path

Parameters:

path (Optional[str])

Return type:

QModelIndex

refresh(self, path: str | None)[source]

Refresh the item specified by path

Parameters:

path (Optional[str])

refresh(self, index: QModelIndex = QModelIndex())[source]

Refresh item children

Parameters:

index (QModelIndex = QModelIndex())

reload(self)[source]

Reload the whole model

removeRootItems(self)[source]