buffalo_panel.app.gui.SimulationModel
- class buffalo_panel.app.gui.SimulationModel(data)[source]
Bases:
QStandardItemModelModel to represent and edit simulation structure in a TreeView.
Methods
appendColumn(self, items)beginInsertColumns(self, parent, first, last)beginInsertRows(self, parent, first, last)beginMoveColumns(self, sourceParent, ...)beginMoveRows(self, sourceParent, ...)beginRemoveColumns(self, parent, first, last)beginRemoveRows(self, parent, first, last)beginResetModel(self)blockSignals(self, b)buddy(self, index)canDropMimeData(self, data, action, row, ...)canFetchMore(self, parent)changePersistentIndex(self, from_, to)changePersistentIndexList(self, from_, to)checkIndex(self, index[, options])childEvent(self, a0)children(self)clear(self)clearItemData(self, index)columnCount(self[, parent])connectNotify(self, signal)createIndex(self, row, column[, object])customEvent(self, a0)data(self, index[, role])decodeData(self, row, column, parent, stream)deleteLater(self)disconnect(-> bool)disconnectNotify(self, signal)dropMimeData(self, data, action, row, ...)dumpObjectInfo(self)dumpObjectTree(self)dynamicPropertyNames(self)encodeData(self, indexes, stream)endInsertColumns(self)endInsertRows(self)endMoveColumns(self)endMoveRows(self)endRemoveColumns(self)endRemoveRows(self)endResetModel(self)event(self, a0)eventFilter(self, a0, a1)fetchMore(self, parent)findChild(-> QObjectT)findChildren(...)findItems(self, text[, flags, column])flags(self, index)hasChildren(self[, parent])hasIndex(self, row, column[, parent])headerData(self, section, orientation[, role])horizontalHeaderItem(self, column)index(self, row, column[, parent])indexFromItem(self, item)inherits(self, classname)insertColumn())insertColumns(self, column, count[, parent])insertRow(-> None ))insertRows(self, row, count[, parent])installEventFilter(self, a0)invisibleRootItem(self)isQmlExposed(self)isQuickItemType(self)isSignalConnected(self, signal)isWidgetType(self)isWindowType(self)item(self, row[, column])itemData(self, index)itemFromIndex(self, index)itemPrototype(self)killTimer(self, id)match(self, start, role, value[, hits, flags])metaObject(self)mimeData(self, indexes)mimeTypes(self)moveColumn(self, sourceParent, sourceColumn, ...)moveColumns(self, sourceParent, ...)moveRow(self, sourceParent, sourceRow, ...)moveRows(self, sourceParent, sourceRow, ...)moveToThread(self, thread)multiData(self, index, roleDataSpan)objectName(self)parent(-> QModelIndex)persistentIndexList(self)populate(data, parent[, node])Populate the tree model from nested case-schema data.
property(self, name)pyqtConfigure(...)Each keyword argument is either the name of a Qt property or a Qt signal.
receivers(self, signal)removeColumn(self, column[, parent])removeColumns(self, column, count[, parent])removeEventFilter(self, a0)removeRow(self, row[, parent])removeRows(self, row, count[, parent])resetInternalData(self)revert(self)roleNames(self)rowCount(self[, parent])sender(self)senderSignalIndex(self)setColumnCount(self, columns)setData(self, index, value[, role])setHeaderData(self, section, orientation, value)setHorizontalHeaderItem(self, column, item)setHorizontalHeaderLabels(self, labels)setItem()setItemData(self, index, roles)setItemPrototype(self, item)setItemRoleNames(self, roleNames)setObjectName(self, name)setParent(self, a0)setProperty(self, name, value)setRowCount(self, rows)setSortRole(self, role)setVerticalHeaderItem(self, row, item)setVerticalHeaderLabels(self, labels)sibling(self, row, column, idx)signalsBlocked(self)sort(self, column[, order])sortRole(self)span(self, index)startTimer(self, interval[, timerType])submit(self)supportedDragActions(self)supportedDropActions(self)takeColumn(self, column)takeHorizontalHeaderItem(self, column)takeItem(self, row[, column])takeRow(self, row)takeVerticalHeaderItem(self, row)thread(self)timerEvent(self, a0)tr(sourceText[, disambiguation, n])verticalHeaderItem(self, row)- populate(data, parent, node=None)[source]
Populate the tree model from nested case-schema data.
This method recursively traverses the input data, creating tree nodes and attaching metadata role information used by editors.
- Parameters:
data (
dict[str,Any] | list[Any] | str | float) – The current branch or leaf of the data structure.parent (
QtGui.QStandardItem) – The item to which new children should be attached.node (
SchemaClassTree | SchemaFieldTree | None, optional) – The schema definition for this branch.
- classmethod appendColumn(self, items: Iterable[QStandardItem])
- classmethod appendRow(self, items: Iterable[QStandardItem])
- classmethod appendRow(self, aitem: QStandardItem | None) None
- classmethod beginInsertColumns(self, parent: QModelIndex, first: int, last: int)
- classmethod beginInsertRows(self, parent: QModelIndex, first: int, last: int)
- classmethod beginMoveColumns(self, sourceParent: QModelIndex, sourceFirst: int, sourceLast: int, destinationParent: QModelIndex, destinationColumn: int) bool
- classmethod beginMoveRows(self, sourceParent: QModelIndex, sourceFirst: int, sourceLast: int, destinationParent: QModelIndex, destinationRow: int) bool
- classmethod beginRemoveColumns(self, parent: QModelIndex, first: int, last: int)
- classmethod beginRemoveRows(self, parent: QModelIndex, first: int, last: int)
- classmethod beginResetModel(self)
- classmethod blockSignals(self, b: bool) bool
- classmethod buddy(self, index: QModelIndex) QModelIndex
- classmethod canDropMimeData(self, data: QMimeData | None, action: Qt.DropAction, row: int, column: int, parent: QModelIndex) bool
- classmethod canFetchMore(self, parent: QModelIndex) bool
- classmethod changePersistentIndex(self, from_: QModelIndex, to: QModelIndex)
- classmethod changePersistentIndexList(self, from_: Iterable[QModelIndex], to: Iterable[QModelIndex])
- classmethod checkIndex(self, index: QModelIndex, options: QAbstractItemModel.CheckIndexOption = QAbstractItemModel.CheckIndexOption.NoOption) bool
- classmethod childEvent(self, a0: QChildEvent | None)
- classmethod children(self) list[QObject]
- classmethod clear(self)
- classmethod clearItemData(self, index: QModelIndex) bool
- classmethod columnCount(self, parent: QModelIndex = QModelIndex()) int
- classmethod connectNotify(self, signal: QMetaMethod)
- classmethod createIndex(self, row: int, column: int, object: Any = None) QModelIndex
- classmethod customEvent(self, a0: QEvent | None)
- classmethod data(self, index: QModelIndex, role: int = Qt.DisplayRole) Any
- classmethod decodeData(self, row: int, column: int, parent: QModelIndex, stream: QDataStream) bool
- classmethod deleteLater(self)
- classmethod disconnect(a0: QMetaObject.Connection) bool
- classmethod disconnect(self) None
- classmethod disconnectNotify(self, signal: QMetaMethod)
- classmethod dropMimeData(self, data: QMimeData | None, action: Qt.DropAction, row: int, column: int, parent: QModelIndex) bool
- classmethod dumpObjectInfo(self)
- classmethod dumpObjectTree(self)
- classmethod dynamicPropertyNames(self) list[QByteArray]
- classmethod encodeData(self, indexes: Iterable[QModelIndex], stream: QDataStream)
- classmethod endInsertColumns(self)
- classmethod endInsertRows(self)
- classmethod endMoveColumns(self)
- classmethod endMoveRows(self)
- classmethod endRemoveColumns(self)
- classmethod endRemoveRows(self)
- classmethod endResetModel(self)
- classmethod event(self, a0: QEvent | None) bool
- classmethod eventFilter(self, a0: QObject | None, a1: QEvent | None) bool
- classmethod fetchMore(self, parent: QModelIndex)
- classmethod findChild(self, type: type[QObjectT], name: str | None = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObjectT
- classmethod findChild(self, types: tuple[type[QObjectT], ...], name: str | None = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObjectT
- classmethod findChildren(self, type: type[QObjectT], name: str | None = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) list[QObjectT]
- classmethod findChildren(self, types: tuple[type[QObjectT], ...], name: str | None = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) list[QObjectT]
- classmethod findChildren(self, type: type[QObjectT], re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) list[QObjectT]
- classmethod findChildren(self, types: tuple[type[QObjectT], ...], re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) list[QObjectT]
- classmethod findItems(self, text: str | None, flags: Qt.MatchFlag = Qt.MatchExactly, column: int = 0) list[QStandardItem]
- classmethod flags(self, index: QModelIndex) Qt.ItemFlag
- classmethod hasChildren(self, parent: QModelIndex = QModelIndex()) bool
- classmethod hasIndex(self, row: int, column: int, parent: QModelIndex = QModelIndex()) bool
- classmethod headerData(self, section: int, orientation: Qt.Orientation, role: int = Qt.DisplayRole) Any
- classmethod horizontalHeaderItem(self, column: int) QStandardItem | None
- classmethod index(self, row: int, column: int, parent: QModelIndex = QModelIndex()) QModelIndex
- classmethod indexFromItem(self, item: QStandardItem | None) QModelIndex
- classmethod inherits(self, classname: str) bool
- classmethod insertColumn(self, column: int, items: Iterable[QStandardItem])
- classmethod insertColumn(self, column: int, parent: QModelIndex = QModelIndex()) bool
- classmethod insertColumns(self, column: int, count: int, parent: QModelIndex = QModelIndex()) bool
- classmethod insertRow(self, row: int, items: Iterable[QStandardItem])
- classmethod insertRow(self, arow: int, aitem: QStandardItem | None) None
- classmethod insertRow(self, row: int, parent: QModelIndex = QModelIndex()) bool
- classmethod insertRows(self, row: int, count: int, parent: QModelIndex = QModelIndex()) bool
- classmethod installEventFilter(self, a0: QObject | None)
- classmethod invisibleRootItem(self) QStandardItem | None
- classmethod isQmlExposed(self) bool
- classmethod isQuickItemType(self) bool
- classmethod isSignalConnected(self, signal: QMetaMethod) bool
- classmethod isWidgetType(self) bool
- classmethod isWindowType(self) bool
- classmethod item(self, row: int, column: int = 0) QStandardItem | None
- classmethod itemData(self, index: QModelIndex) dict[int, Any]
- classmethod itemFromIndex(self, index: QModelIndex) QStandardItem | None
- classmethod itemPrototype(self) QStandardItem | None
- classmethod killTimer(self, id: int)
- classmethod match(self, start: QModelIndex, role: int, value: Any, hits: int = 1, flags: Qt.MatchFlag = Qt.MatchFlags(Qt.MatchStartsWith | Qt.MatchWrap)) list[QModelIndex]
- classmethod metaObject(self) QMetaObject | None
- classmethod mimeData(self, indexes: Iterable[QModelIndex]) QMimeData | None
- classmethod mimeTypes(self) list[str]
- classmethod moveColumn(self, sourceParent: QModelIndex, sourceColumn: int, destinationParent: QModelIndex, destinationChild: int) bool
- classmethod moveColumns(self, sourceParent: QModelIndex, sourceColumn: int, count: int, destinationParent: QModelIndex, destinationChild: int) bool
- classmethod moveRow(self, sourceParent: QModelIndex, sourceRow: int, destinationParent: QModelIndex, destinationChild: int) bool
- classmethod moveRows(self, sourceParent: QModelIndex, sourceRow: int, count: int, destinationParent: QModelIndex, destinationChild: int) bool
- classmethod moveToThread(self, thread: QThread | None)
- classmethod multiData(self, index: QModelIndex, roleDataSpan: QModelRoleDataSpan)
- classmethod objectName(self) str
- classmethod parent(self, child: QModelIndex) QModelIndex
- classmethod parent(self) QObject | None
- classmethod persistentIndexList(self) list[QModelIndex]
- classmethod property(self, name: str) Any
- classmethod pyqtConfigure(...)
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
- classmethod receivers(self, signal: PYQT_SIGNAL) int
- classmethod removeColumn(self, column: int, parent: QModelIndex = QModelIndex()) bool
- classmethod removeColumns(self, column: int, count: int, parent: QModelIndex = QModelIndex()) bool
- classmethod removeEventFilter(self, a0: QObject | None)
- classmethod removeRow(self, row: int, parent: QModelIndex = QModelIndex()) bool
- classmethod removeRows(self, row: int, count: int, parent: QModelIndex = QModelIndex()) bool
- classmethod resetInternalData(self)
- classmethod revert(self)
- classmethod roleNames(self) dict[int, QByteArray]
- classmethod rowCount(self, parent: QModelIndex = QModelIndex()) int
- classmethod sender(self) QObject | None
- classmethod senderSignalIndex(self) int
- classmethod setColumnCount(self, columns: int)
- classmethod setData(self, index: QModelIndex, value: Any, role: int = Qt.EditRole) bool
- classmethod setHeaderData(self, section: int, orientation: Qt.Orientation, value: Any, role: int = Qt.EditRole) bool
- classmethod setHorizontalHeaderItem(self, column: int, item: QStandardItem | None)
- classmethod setHorizontalHeaderLabels(self, labels: Iterable[str | None])
- classmethod setItem(self, row: int, column: int, item: QStandardItem | None)
- classmethod setItem(self, arow: int, aitem: QStandardItem | None) None
- classmethod setItemData(self, index: QModelIndex, roles: dict[int, Any]) bool
- classmethod setItemPrototype(self, item: QStandardItem | None)
- classmethod setItemRoleNames(self, roleNames: dict[int, QByteArray | bytes | bytearray | memoryview])
- classmethod setObjectName(self, name: QByteArray | bytes | bytearray | memoryview | str | None)
- classmethod setParent(self, a0: QObject | None)
- classmethod setProperty(self, name: str, value: Any) bool
- classmethod setRowCount(self, rows: int)
- classmethod setSortRole(self, role: int)
- classmethod setVerticalHeaderItem(self, row: int, item: QStandardItem | None)
- classmethod setVerticalHeaderLabels(self, labels: Iterable[str | None])
- classmethod sibling(self, row: int, column: int, idx: QModelIndex) QModelIndex
- classmethod signalsBlocked(self) bool
- classmethod sort(self, column: int, order: Qt.SortOrder = Qt.AscendingOrder)
- classmethod sortRole(self) int
- classmethod span(self, index: QModelIndex) QSize
- classmethod startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
- classmethod submit(self) bool
- classmethod supportedDragActions(self) Qt.DropAction
- classmethod supportedDropActions(self) Qt.DropAction
- classmethod takeColumn(self, column: int) list[QStandardItem]
- classmethod takeHorizontalHeaderItem(self, column: int) QStandardItem | None
- classmethod takeItem(self, row: int, column: int = 0) QStandardItem | None
- classmethod takeRow(self, row: int) list[QStandardItem]
- classmethod takeVerticalHeaderItem(self, row: int) QStandardItem | None
- classmethod thread(self) QThread | None
- classmethod timerEvent(self, a0: QTimerEvent | None)
- classmethod tr(sourceText: str, disambiguation: str = None, n: int = -1) str
- classmethod verticalHeaderItem(self, row: int) QStandardItem | None