Subgroup: Layout
Class: QgsLayoutModel¶
-
class
qgis.core.
QgsLayoutModel
¶ Bases:
PyQt5.QtCore.QAbstractItemModel
A model for items attached to a layout. The model also maintains the z-order for the layout, and must be notified whenever item stacking changes.
Internally, QgsLayoutModel maintains two lists. One contains a complete list of all items for the layout, ordered by their position within the z-order stack.
The second list contains only items which are currently displayed in the layout’s scene. It is used as a cache of the last known stacking order, so that the model can compare the current stacking of items in the layout to the last known state, and emit the corresponding signals as required.
New in version 3.0: Methods
beginInsertColumns
beginInsertRows
beginMoveColumns
beginMoveRows
beginRemoveColumns
beginRemoveRows
beginResetModel
blockSignals
buddy
canDropMimeData
canFetchMore
changePersistentIndex
changePersistentIndexList
childEvent
children
columnCount
connectNotify
createIndex
customEvent
data
decodeData
deleteLater
disconnect
disconnectNotify
dropMimeData
dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
encodeData
endInsertColumns
endInsertRows
endMoveColumns
endMoveRows
endRemoveColumns
endRemoveRows
endResetModel
event
eventFilter
fetchMore
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] flags
hasChildren
hasIndex
headerData
index
indexForItem
Returns the QModelIndex corresponding to a QgsLayoutItem
item
andcolumn
, if possible.inherits
insertColumn
insertColumns
insertRow
insertRows
installEventFilter
isSignalConnected
isWidgetType
isWindowType
itemData
itemFromIndex
Returns the QgsLayoutItem corresponding to a QModelIndex index
, if possible.killTimer
match
metaObject
mimeData
mimeTypes
moveColumn
moveColumns
moveRow
moveRows
moveToThread
objectName
parent
persistentIndexList
property
pyqtConfigure
Each keyword argument is either the name of a Qt property or a Qt signal. receivers
removeColumn
removeColumns
removeEventFilter
removeRow
removeRows
resetInternalData
revert
roleNames
rowCount
sender
senderSignalIndex
setData
setHeaderData
setItemData
setObjectName
setParent
setProperty
sibling
signalsBlocked
sort
span
startTimer
submit
supportedDragActions
supportedDropActions
thread
timerEvent
tr
Attributes
HorizontalSortHint
ItemId
LockStatus
NoLayoutChangeHint
VerticalSortHint
Visibility
columnsAboutToBeInserted
columnsAboutToBeInserted(self, QModelIndex, int, int) [signal] columnsAboutToBeMoved
columnsAboutToBeMoved(self, QModelIndex, int, int, QModelIndex, int) [signal] columnsAboutToBeRemoved
columnsAboutToBeRemoved(self, QModelIndex, int, int) [signal] columnsInserted
columnsInserted(self, QModelIndex, int, int) [signal] columnsMoved
columnsMoved(self, QModelIndex, int, int, QModelIndex, int) [signal] columnsRemoved
columnsRemoved(self, QModelIndex, int, int) [signal] dataChanged
dataChanged(self, QModelIndex, QModelIndex, Iterable[int] = []) [signal] destroyed
destroyed(self, QObject = None) [signal] layoutAboutToBeChanged
layoutAboutToBeChanged(self, object = QList<QPersistentModelIndex>(), QAbstractItemModel.LayoutChangeHint = QAbstractItemModel.NoLayoutChangeHint) [signal] layoutChanged
layoutChanged(self, Iterable[QPersistentModelIndex] = [], QAbstractItemModel.LayoutChangeHint = QAbstractItemModel.NoLayoutChangeHint) [signal] modelAboutToBeReset
modelAboutToBeReset(self) [signal] modelReset
modelReset(self) [signal] objectNameChanged
objectNameChanged(self, str) [signal] rowsAboutToBeInserted
rowsAboutToBeInserted(self, QModelIndex, int, int) [signal] rowsAboutToBeMoved
rowsAboutToBeMoved(self, QModelIndex, int, int, QModelIndex, int) [signal] rowsAboutToBeRemoved
rowsAboutToBeRemoved(self, QModelIndex, int, int) [signal] rowsInserted
rowsInserted(self, QModelIndex, int, int) [signal] rowsMoved
rowsMoved(self, QModelIndex, int, int, QModelIndex, int) [signal] rowsRemoved
rowsRemoved(self, QModelIndex, int, int) [signal] staticMetaObject
-
class
Columns
¶ Bases:
int
-
ItemId
= 2¶
-
LockStatus
= 1¶
-
Visibility
= 0¶
-
beginInsertColumns
()¶
-
beginInsertRows
()¶
-
beginMoveColumns
()¶
-
beginMoveRows
()¶
-
beginRemoveColumns
()¶
-
beginRemoveRows
()¶
-
beginResetModel
()¶
-
changePersistentIndex
()¶
-
changePersistentIndexList
()¶
-
childEvent
()¶
-
columnCount
(self, parent: QModelIndex = QModelIndex()) → int¶
-
connectNotify
()¶
-
createIndex
()¶
-
customEvent
()¶
-
data
(self, index: QModelIndex, role: int) → Any¶
-
decodeData
()¶
-
disconnectNotify
()¶
-
dropMimeData
(self, data: QMimeData, action: Qt.DropAction, row: int, column: int, parent: QModelIndex) → bool¶
-
encodeData
()¶
-
endInsertColumns
()¶
-
endInsertRows
()¶
-
endMoveColumns
()¶
-
endMoveRows
()¶
-
endRemoveColumns
()¶
-
endRemoveRows
()¶
-
endResetModel
()¶
-
flags
(self, index: QModelIndex) → Qt.ItemFlags¶
-
headerData
(self, section: int, orientation: Qt.Orientation, role: int = Qt.DisplayRole) → Any¶
-
index
(self, row: int, column: int, parent: QModelIndex = QModelIndex()) → QModelIndex¶
-
indexForItem
(self, item: QgsLayoutItem, column: int = 0) → QModelIndex¶ Returns the QModelIndex corresponding to a
QgsLayoutItem
item
andcolumn
, if possible.See also
-
isSignalConnected
()¶
-
itemFromIndex
(self, index: QModelIndex) → QgsLayoutItem¶ Returns the QgsLayoutItem corresponding to a QModelIndex
index
, if possible.See also
-
mimeData
(self, indexes: object) → QMimeData¶
-
mimeTypes
(self) → List[str]¶
-
parent
(self, index: QModelIndex) → QModelIndex¶
-
persistentIndexList
()¶
-
receivers
()¶
-
removeRows
(self, row: int, count: int, parent: QModelIndex = QModelIndex()) → bool¶
-
resetInternalData
()¶
-
rowCount
(self, parent: QModelIndex = QModelIndex()) → int¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setData
(self, index: QModelIndex, value: Any, role: int) → bool¶
-
supportedDropActions
(self) → Qt.DropActions¶
-
timerEvent
()¶
-
class