Class: QgsCptCityBrowserModel

class qgis.core.QgsCptCityBrowserModel(parent: QObject = None, archive: QgsCptCityArchive = QgsCptCityArchive.defaultArchive(), Type: QgsCptCityBrowserModel.ViewType = QgsCptCityBrowserModel.Authors)

Bases: PyQt5.QtCore.QAbstractItemModel

Parameters
  • parent (QObject = None) –

  • archive (QgsCptCityArchive = QgsCptCityArchive.defaultArchive()) –

  • Type

Authors = 0
List = 2
Selections = 1
class ViewType

Bases: int

addRootItems(self)
QgsCptCityBrowserModel.beginInsertColumns(self, QModelIndex, int, int)
beginInsertItems(self, parent: QgsCptCityDataItem, first: int, last: int)
Parameters
QgsCptCityBrowserModel.beginInsertRows(self, QModelIndex, int, int)
QgsCptCityBrowserModel.beginMoveColumns(self, QModelIndex, int, int, QModelIndex, int) -> bool
QgsCptCityBrowserModel.beginMoveRows(self, QModelIndex, int, int, QModelIndex, int) -> bool
QgsCptCityBrowserModel.beginRemoveColumns(self, QModelIndex, int, int)
beginRemoveItems(self, parent: QgsCptCityDataItem, first: int, last: int)
Parameters
QgsCptCityBrowserModel.beginRemoveRows(self, QModelIndex, int, int)
beginResetModel(self)
canFetchMore(self, parent: QModelIndex) → bool
Parameters

parent (QModelIndex) –

Return type

bool

QgsCptCityBrowserModel.changePersistentIndex(self, QModelIndex, QModelIndex)
changePersistentIndexList(self, Iterable[QModelIndex], Iterable[QModelIndex])
childEvent(self, QChildEvent)
columnCount(self, parent: QModelIndex = QModelIndex()) → int
Parameters

parent (QModelIndex = QModelIndex()) –

Return type

int

connectItem(self, item: QgsCptCityDataItem)
Parameters

item (QgsCptCityDataItem) –

connectNotify(self, QMetaMethod)
QgsCptCityBrowserModel.createIndex(self, int, int, object: object = 0) -> QModelIndex
customEvent(self, QEvent)
data(self, index: QModelIndex, role: int = Qt.DisplayRole) → Any
Parameters
  • index (QModelIndex) –

  • role (int = Qt.DisplayRole) –

Return type

Any

dataItem(self, idx: QModelIndex)QgsCptCityDataItem

virtual bool dropMimeData( const QMimeData * data, Qt.DropAction action, int row, int column, const QModelIndex & parent ); */

Parameters

idx (QModelIndex) –

Return type

QgsCptCityDataItem

QgsCptCityBrowserModel.decodeData(self, int, int, QModelIndex, QDataStream) -> bool
disconnectNotify(self, QMetaMethod)
encodeData(self, Iterable[QModelIndex], QDataStream)
endInsertColumns(self)
endInsertItems(self)
endInsertRows(self)
endMoveColumns(self)
endMoveRows(self)
endRemoveColumns(self)
endRemoveItems(self)
endRemoveRows(self)
endResetModel(self)
fetchMore(self, parent: QModelIndex)
Parameters

parent (QModelIndex) –

findItem(self, item: QgsCptCityDataItem, parent: QgsCptCityDataItem = None) → QModelIndex
Parameters
Return type

QModelIndex

findPath(self, path: str) → QModelIndex

Returns index of a path

Parameters

path (str) –

Return type

QModelIndex

flags(self, index: QModelIndex) → Qt.ItemFlags
Parameters

index (QModelIndex) –

Return type

Qt.ItemFlags

hasChildren(self, parent: QModelIndex = QModelIndex()) → bool
Parameters

parent (QModelIndex = QModelIndex()) –

Return type

bool

headerData(self, section: int, orientation: Qt.Orientation, role: int = Qt.DisplayRole) → Any
Parameters
  • section (int) –

  • orientation (Qt.Orientation) –

  • role (int = Qt.DisplayRole) –

Return type

Any

index(self, row: int, column: int, parent: QModelIndex = QModelIndex()) → QModelIndex
Parameters
  • row (int) –

  • column (int) –

  • parent (QModelIndex = QModelIndex()) –

Return type

QModelIndex

isSignalConnected(self, QMetaMethod) → bool
parent(self, index: QModelIndex) → QModelIndex
Parameters

index (QModelIndex) –

Return type

QModelIndex

persistentIndexList(self) → List[QModelIndex]
receivers(self, PYQT_SIGNAL) → int
refresh(self, path: str)

refresh(self, index: QModelIndex = QModelIndex())

Parameters

path (str) –

reload(self)
removeRootItems(self)
resetInternalData(self)
rowCount(self, parent: QModelIndex = QModelIndex()) → int
Parameters

parent (QModelIndex = QModelIndex()) –

Return type

int

sender(self) → QObject
senderSignalIndex(self) → int
timerEvent(self, QTimerEvent)