qudi.util.models.DictTableModel

class qudi.util.models.DictTableModel(headers: str | Sequence[str])[source]

Bases: PySide2.QtCore.QAbstractTableModel

Qt model storing a table in dictionaries

__init__(headers: str | Sequence[str])[source]

Methods

__init__(headers)

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, event)

children(self)

clear()

columnCount([parent])

Returns the number of data fields (columns)

connect(...)

connectNotify(self, signal)

copy()

createIndex(-> PySide2.QtCore.QModelIndex)

customEvent(self, event)

data(index, role)

Get data from model for a given cell.

decodeData(self, row, column, parent, stream)

deleteLater(self)

disconnect(...)

disconnectNotify(self, signal)

dropMimeData(self, data, action, row, ...)

dumpObjectInfo(self)

dumpObjectTree(self)

dynamicPropertyNames(self)

emit(self, arg__1, *args)

encodeData(self, indexes, stream)

endInsertColumns(self)

endInsertRows(self)

endMoveColumns(self)

endMoveRows(self)

endRemoveColumns(self)

endRemoveRows(self)

endResetModel(self)

event(self, event)

eventFilter(self, watched, event)

fetchMore(self, parent)

findChild(self, arg__1[, arg__2])

findChildren(...)

flags([index])

Determines what can be done with the given indexed cell.

get(*args)

Get value for key from dictionary.

get_index_by_key(key)

Get row index for dict key.

get_key_by_index(n)

Get a dict key by index number

hasChildren(self, parent)

hasIndex(self, row, column[, parent])

headerData(section, orientation[, role])

Data for the table view headers

index(self, row, column[, parent])

inherits(self, classname)

insertColumn(self, column[, parent])

insertColumns(self, column, count[, parent])

insertRow(self, row[, parent])

insertRows(self, row, count[, parent])

installEventFilter(self, filterObj)

isSignalConnected(self, signal)

isWidgetType(self)

isWindowType(self)

itemData(self, index)

items()

keys()

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)

objectName(self)

parent(-> PySide2.QtCore.QObject)

persistentIndexList(self)

pop(*args)

Remove key from dictionary.

property(self, name)

receivers(self, signal)

registerUserData()

removeColumn(self, column[, parent])

removeColumns(self, column, count[, parent])

removeEventFilter(self, obj)

removeRow(self, row[, parent])

removeRows(self, row, count[, parent])

resetInternalData(self)

revert(self)

roleNames(self)

rowCount([parent])

Returns the number of stored items (rows)

sender(self)

senderSignalIndex(self)

setData(self, index, value[, role])

setHeaderData(self, section, orientation, value)

setItemData(self, index, roles)

setObjectName(self, name)

setParent(self, parent)

setProperty(self, name, value)

sibling(self, row, column, idx)

signalsBlocked(self)

sort(self, column[, order])

span(self, index)

startTimer(self, interval[, timerType])

submit(self)

supportedDragActions(self)

supportedDropActions(self)

thread(self)

timerEvent(self, event)

tr(self, arg__1[, arg__2, arg__3])

update(*args, **kwargs)

values()

Attributes

HorizontalSortHint

NoLayoutChangeHint

VerticalSortHint

columnsAboutToBeInserted

columnsAboutToBeMoved

columnsAboutToBeRemoved

columnsInserted

columnsMoved

columnsRemoved

dataChanged

destroyed

headerDataChanged

layoutAboutToBeChanged

layoutChanged

modelAboutToBeReset

modelReset

objectNameChanged

rowsAboutToBeInserted

rowsAboutToBeMoved

rowsAboutToBeRemoved

rowsInserted

rowsMoved

rowsRemoved

staticMetaObject

class CheckIndexOption

Bases: builtins.object

DoNotUseParent = PySide2.QtCore.QAbstractItemModel.CheckIndexOption.DoNotUseParent
IndexIsValid = PySide2.QtCore.QAbstractItemModel.CheckIndexOption.IndexIsValid
NoOption = PySide2.QtCore.QAbstractItemModel.CheckIndexOption.NoOption
ParentIsInvalid = PySide2.QtCore.QAbstractItemModel.CheckIndexOption.ParentIsInvalid
name

!! processed by numpydoc !!

values = {'DoNotUseParent': PySide2.QtCore.QAbstractItemModel.CheckIndexOption.DoNotUseParent, 'IndexIsValid': PySide2.QtCore.QAbstractItemModel.CheckIndexOption.IndexIsValid, 'NoOption': PySide2.QtCore.QAbstractItemModel.CheckIndexOption.NoOption, 'ParentIsInvalid': PySide2.QtCore.QAbstractItemModel.CheckIndexOption.ParentIsInvalid}
class CheckIndexOptions

Bases: builtins.object

HorizontalSortHint = PySide2.QtCore.QAbstractItemModel.LayoutChangeHint.HorizontalSortHint
class LayoutChangeHint

Bases: builtins.object

HorizontalSortHint = PySide2.QtCore.QAbstractItemModel.LayoutChangeHint.HorizontalSortHint
NoLayoutChangeHint = PySide2.QtCore.QAbstractItemModel.LayoutChangeHint.NoLayoutChangeHint
VerticalSortHint = PySide2.QtCore.QAbstractItemModel.LayoutChangeHint.VerticalSortHint
name

!! processed by numpydoc !!

values = {'HorizontalSortHint': PySide2.QtCore.QAbstractItemModel.LayoutChangeHint.HorizontalSortHint, 'NoLayoutChangeHint': PySide2.QtCore.QAbstractItemModel.LayoutChangeHint.NoLayoutChangeHint, 'VerticalSortHint': PySide2.QtCore.QAbstractItemModel.LayoutChangeHint.VerticalSortHint}
NoLayoutChangeHint = PySide2.QtCore.QAbstractItemModel.LayoutChangeHint.NoLayoutChangeHint
VerticalSortHint = PySide2.QtCore.QAbstractItemModel.LayoutChangeHint.VerticalSortHint
beginInsertColumns(self, parent: PySide2.QtCore.QModelIndex, first: int, last: int) None
beginInsertRows(self, parent: PySide2.QtCore.QModelIndex, first: int, last: int) None
beginMoveColumns(self, sourceParent: PySide2.QtCore.QModelIndex, sourceFirst: int, sourceLast: int, destinationParent: PySide2.QtCore.QModelIndex, destinationColumn: int) bool
beginMoveRows(self, sourceParent: PySide2.QtCore.QModelIndex, sourceFirst: int, sourceLast: int, destinationParent: PySide2.QtCore.QModelIndex, destinationRow: int) bool
beginRemoveColumns(self, parent: PySide2.QtCore.QModelIndex, first: int, last: int) None
beginRemoveRows(self, parent: PySide2.QtCore.QModelIndex, first: int, last: int) None
beginResetModel(self) None
blockSignals(self, b: bool) bool
buddy(self, index: PySide2.QtCore.QModelIndex) PySide2.QtCore.QModelIndex
canDropMimeData(self, data: PySide2.QtCore.QMimeData, action: PySide2.QtCore.Qt.DropAction, row: int, column: int, parent: PySide2.QtCore.QModelIndex) bool
canFetchMore(self, parent: PySide2.QtCore.QModelIndex) bool
changePersistentIndex(self, from_: PySide2.QtCore.QModelIndex, to: PySide2.QtCore.QModelIndex) None
changePersistentIndexList(self, from_: List[int], to: List[int]) None
checkIndex(self, index: PySide2.QtCore.QModelIndex, options: PySide2.QtCore.QAbstractItemModel.CheckIndexOptions = Instance(PySide2.QtCore.QAbstractItemModel.CheckIndexOptions.NoOption)) bool
childEvent(self, event: PySide2.QtCore.QChildEvent) None
children(self) List[PySide2.QtCore.QObject]
clear()[source]
columnCount(parent: QModelIndex | None = None) int[source]

Returns the number of data fields (columns)

columnsAboutToBeInserted

!! processed by numpydoc !!

columnsAboutToBeMoved

!! processed by numpydoc !!

columnsAboutToBeRemoved

!! processed by numpydoc !!

columnsInserted

!! processed by numpydoc !!

columnsMoved

!! processed by numpydoc !!

columnsRemoved

!! processed by numpydoc !!

static connect(arg__1: PySide2.QtCore.QObject, arg__2: bytes, arg__3: Callable, type: PySide2.QtCore.Qt.ConnectionType = PySide2.QtCore.Qt.ConnectionType.AutoConnection) bool
static connect(self, arg__1: bytes, arg__2: Callable, type: PySide2.QtCore.Qt.ConnectionType = PySide2.QtCore.Qt.ConnectionType.AutoConnection) bool
static connect(self, arg__1: bytes, arg__2: PySide2.QtCore.QObject, arg__3: bytes, type: PySide2.QtCore.Qt.ConnectionType = PySide2.QtCore.Qt.ConnectionType.AutoConnection) bool
static connect(self, sender: PySide2.QtCore.QObject, signal: bytes, member: bytes, type: PySide2.QtCore.Qt.ConnectionType = PySide2.QtCore.Qt.ConnectionType.AutoConnection) PySide2.QtCore.QMetaObject.Connection
static connect(sender: PySide2.QtCore.QObject, signal: PySide2.QtCore.QMetaMethod, receiver: PySide2.QtCore.QObject, method: PySide2.QtCore.QMetaMethod, type: PySide2.QtCore.Qt.ConnectionType = PySide2.QtCore.Qt.ConnectionType.AutoConnection) PySide2.QtCore.QMetaObject.Connection
static connect(sender: PySide2.QtCore.QObject, signal: bytes, receiver: PySide2.QtCore.QObject, member: bytes, type: PySide2.QtCore.Qt.ConnectionType = PySide2.QtCore.Qt.ConnectionType.AutoConnection) PySide2.QtCore.QMetaObject.Connection
connectNotify(self, signal: PySide2.QtCore.QMetaMethod) None
copy()[source]
createIndex(self, row: int, column: int, id: int = 0) PySide2.QtCore.QModelIndex
createIndex(self, row: int, column: int, ptr: object) PySide2.QtCore.QModelIndex
customEvent(self, event: PySide2.QtCore.QEvent) None
data(index: ~PySide2.QtCore.QModelIndex, role: <class 'PySide2.QtCore.Qt.ItemDataRole'>) Any[source]

Get data from model for a given cell. Data can have a role that affects display. Re-Implement in subclass in order to support anything else than the 2 default columns.

dataChanged

!! processed by numpydoc !!

decodeData(self, row: int, column: int, parent: PySide2.QtCore.QModelIndex, stream: PySide2.QtCore.QDataStream) bool
deleteLater(self) None
destroyed

!! processed by numpydoc !!

static disconnect(arg__1: PySide2.QtCore.QMetaObject.Connection) bool
static disconnect(arg__1: PySide2.QtCore.QObject, arg__2: bytes, arg__3: Callable) bool
static disconnect(self, arg__1: bytes, arg__2: Callable) bool
static disconnect(self, receiver: PySide2.QtCore.QObject, member: Optional[bytes] = None) bool
static disconnect(self, signal: bytes, receiver: PySide2.QtCore.QObject, member: bytes) bool
static disconnect(sender: PySide2.QtCore.QObject, signal: PySide2.QtCore.QMetaMethod, receiver: PySide2.QtCore.QObject, member: PySide2.QtCore.QMetaMethod) bool
static disconnect(sender: PySide2.QtCore.QObject, signal: bytes, receiver: PySide2.QtCore.QObject, member: bytes) bool
disconnectNotify(self, signal: PySide2.QtCore.QMetaMethod) None
dropMimeData(self, data: PySide2.QtCore.QMimeData, action: PySide2.QtCore.Qt.DropAction, row: int, column: int, parent: PySide2.QtCore.QModelIndex) bool
dumpObjectInfo(self) None
dumpObjectTree(self) None
dynamicPropertyNames(self) List[PySide2.QtCore.QByteArray]
emit(self, arg__1: bytes, *args: None) bool
encodeData(self, indexes: List[int], stream: PySide2.QtCore.QDataStream) None
endInsertColumns(self) None
endInsertRows(self) None
endMoveColumns(self) None
endMoveRows(self) None
endRemoveColumns(self) None
endRemoveRows(self) None
endResetModel(self) None
event(self, event: PySide2.QtCore.QEvent) bool
eventFilter(self, watched: PySide2.QtCore.QObject, event: PySide2.QtCore.QEvent) bool
fetchMore(self, parent: PySide2.QtCore.QModelIndex) None
findChild(self, arg__1: type, arg__2: str = '') object
findChildren(self, arg__1: type, arg__2: PySide2.QtCore.QRegExp) Iterable
findChildren(self, arg__1: type, arg__2: PySide2.QtCore.QRegularExpression) Iterable
findChildren(self, arg__1: type, arg__2: str = '') Iterable
flags(index: QModelIndex | None = None) ItemFlags[source]

Determines what can be done with the given indexed cell.

get(*args)[source]

Get value for key from dictionary.

@param args: value for key, optional default return value

@return value: value for key from dict

get_index_by_key(key: Any) int[source]

Get row index for dict key.

Warning: Row index for a key changes when keys with lower index are removed.

get_key_by_index(n: int) Any[source]

Get a dict key by index number

hasChildren(self, parent: PySide2.QtCore.QModelIndex) bool
hasIndex(self, row: int, column: int, parent: PySide2.QtCore.QModelIndex = Invalid(PySide2.QtCore.QModelIndex)) bool
headerData(section: int, orientation: <class 'PySide2.QtCore.Qt.Orientation'>, role: <class 'PySide2.QtCore.Qt.ItemDataRole'> | None = PySide2.QtCore.Qt.ItemDataRole.DisplayRole) Any[source]

Data for the table view headers

headerDataChanged

!! processed by numpydoc !!

index(self, row: int, column: int, parent: PySide2.QtCore.QModelIndex = Invalid(PySide2.QtCore.QModelIndex)) PySide2.QtCore.QModelIndex
inherits(self, classname: bytes) bool
insertColumn(self, column: int, parent: PySide2.QtCore.QModelIndex = Invalid(PySide2.QtCore.QModelIndex)) bool
insertColumns(self, column: int, count: int, parent: PySide2.QtCore.QModelIndex = Invalid(PySide2.QtCore.QModelIndex)) bool
insertRow(self, row: int, parent: PySide2.QtCore.QModelIndex = Invalid(PySide2.QtCore.QModelIndex)) bool
insertRows(self, row: int, count: int, parent: PySide2.QtCore.QModelIndex = Invalid(PySide2.QtCore.QModelIndex)) bool
installEventFilter(self, filterObj: PySide2.QtCore.QObject) None
isSignalConnected(self, signal: PySide2.QtCore.QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
itemData(self, index: PySide2.QtCore.QModelIndex) Dict[int, Any]
items()[source]
keys()[source]
killTimer(self, id: int) None
layoutAboutToBeChanged

!! processed by numpydoc !!

layoutChanged

!! processed by numpydoc !!

match(self, start: PySide2.QtCore.QModelIndex, role: int, value: Any, hits: int = 1, flags: PySide2.QtCore.Qt.MatchFlags = Instance(Qt.MatchFlags(Qt.MatchStartsWith | Qt.MatchWrap))) List[int]
metaObject(self) PySide2.QtCore.QMetaObject
mimeData(self, indexes: List[int]) PySide2.QtCore.QMimeData
mimeTypes(self) List[str]
modelAboutToBeReset

!! processed by numpydoc !!

modelReset

!! processed by numpydoc !!

moveColumn(self, sourceParent: PySide2.QtCore.QModelIndex, sourceColumn: int, destinationParent: PySide2.QtCore.QModelIndex, destinationChild: int) bool
moveColumns(self, sourceParent: PySide2.QtCore.QModelIndex, sourceColumn: int, count: int, destinationParent: PySide2.QtCore.QModelIndex, destinationChild: int) bool
moveRow(self, sourceParent: PySide2.QtCore.QModelIndex, sourceRow: int, destinationParent: PySide2.QtCore.QModelIndex, destinationChild: int) bool
moveRows(self, sourceParent: PySide2.QtCore.QModelIndex, sourceRow: int, count: int, destinationParent: PySide2.QtCore.QModelIndex, destinationChild: int) bool
moveToThread(self, thread: PySide2.QtCore.QThread) None
objectName(self) str
objectNameChanged

!! processed by numpydoc !!

parent(self) PySide2.QtCore.QObject
parent(self, child: PySide2.QtCore.QModelIndex) PySide2.QtCore.QModelIndex
persistentIndexList(self) List[int]
pop(*args)[source]

Remove key from dictionary.

@param args: dict key to remove, optional default return value

@return value: value removed from dict

property(self, name: bytes) Any
receivers(self, signal: bytes) int
static registerUserData() int
removeColumn(self, column: int, parent: PySide2.QtCore.QModelIndex = Invalid(PySide2.QtCore.QModelIndex)) bool
removeColumns(self, column: int, count: int, parent: PySide2.QtCore.QModelIndex = Invalid(PySide2.QtCore.QModelIndex)) bool
removeEventFilter(self, obj: PySide2.QtCore.QObject) None
removeRow(self, row: int, parent: PySide2.QtCore.QModelIndex = Invalid(PySide2.QtCore.QModelIndex)) bool
removeRows(self, row: int, count: int, parent: PySide2.QtCore.QModelIndex = Invalid(PySide2.QtCore.QModelIndex)) bool
resetInternalData(self) None
revert(self) None
roleNames(self) Dict[int, PySide2.QtCore.QByteArray]
rowCount(parent: QModelIndex | None = None) int[source]

Returns the number of stored items (rows)

rowsAboutToBeInserted

!! processed by numpydoc !!

rowsAboutToBeMoved

!! processed by numpydoc !!

rowsAboutToBeRemoved

!! processed by numpydoc !!

rowsInserted

!! processed by numpydoc !!

rowsMoved

!! processed by numpydoc !!

rowsRemoved

!! processed by numpydoc !!

sender(self) PySide2.QtCore.QObject
senderSignalIndex(self) int
setData(self, index: PySide2.QtCore.QModelIndex, value: Any, role: int = PySide2.QtCore.Qt.ItemDataRole.EditRole) bool
setHeaderData(self, section: int, orientation: PySide2.QtCore.Qt.Orientation, value: Any, role: int = PySide2.QtCore.Qt.ItemDataRole.EditRole) bool
setItemData(self, index: PySide2.QtCore.QModelIndex, roles: Dict[int, Any]) bool
setObjectName(self, name: str) None
setParent(self, parent: PySide2.QtCore.QObject) None
setProperty(self, name: bytes, value: Any) bool
sibling(self, row: int, column: int, idx: PySide2.QtCore.QModelIndex) PySide2.QtCore.QModelIndex
signalsBlocked(self) bool
sort(self, column: int, order: PySide2.QtCore.Qt.SortOrder = PySide2.QtCore.Qt.SortOrder.AscendingOrder) None
span(self, index: PySide2.QtCore.QModelIndex) PySide2.QtCore.QSize
startTimer(self, interval: int, timerType: PySide2.QtCore.Qt.TimerType = PySide2.QtCore.Qt.TimerType.CoarseTimer) int
staticMetaObject = <PySide2.QtCore.QMetaObject object>
submit(self) bool
supportedDragActions(self) PySide2.QtCore.Qt.DropActions
supportedDropActions(self) PySide2.QtCore.Qt.DropActions
thread(self) PySide2.QtCore.QThread
timerEvent(self, event: PySide2.QtCore.QTimerEvent) None
tr(self, arg__1: bytes, arg__2: bytes = b'', arg__3: int = -1) str
update(*args, **kwargs)[source]
values()[source]