darfix.gui.utils.data_path_completer.DataPathModel#
- class darfix.gui.utils.data_path_completer.DataPathModel(parent=None, allowed_keywords=(), display_dataset=True)[source]#
Bases:
QStandardItemModel
Model that provide HDF5 file tree combined with some reserved keywords. Keywords must be provided as ‘{my_keyword}’.
At the moment there is two types of keywords: * root keywords ({scan}, {first_scan}, {last_scan}’) * leaf keywords (‘{detector}’)
- Parameters:
parent (QObject | None)
allowed_keywords (tuple)
display_dataset (bool)
- class CheckIndexOption(value)#
Bases:
IntEnum
An enumeration.
- DoNotUseParent = 2#
- IndexIsValid = 1#
- NoOption = 0#
- ParentIsInvalid = 4#
- as_integer_ratio()#
Return integer ratio.
Return a pair of integers, whose ratio is exactly equal to the original int and with a positive denominator.
>>> (10).as_integer_ratio() (10, 1) >>> (-10).as_integer_ratio() (-10, 1) >>> (0).as_integer_ratio() (0, 1)
- bit_length()#
Number of bits necessary to represent self in binary.
>>> bin(37) '0b100101' >>> (37).bit_length() 6
- conjugate()#
Returns self, the complex conjugate of any int.
- denominator#
the denominator of a rational number in lowest terms
- from_bytes(byteorder, *, signed=False)#
Return the integer represented by the given array of bytes.
- bytes
Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of built-in objects that support the buffer protocol.
- byteorder
The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.
- signed
Indicates whether two’s complement is used to represent the integer.
- imag#
the imaginary part of a complex number
- numerator#
the numerator of a rational number in lowest terms
- real#
the real part of a complex number
- to_bytes(length, byteorder, *, signed=False)#
Return an array of bytes representing an integer.
- length
Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes.
- byteorder
The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.
- signed
Determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.
- class CheckIndexOptions#
- class CheckIndexOptions(f: QAbstractItemModel.CheckIndexOptions | QAbstractItemModel.CheckIndexOption)
- class CheckIndexOptions(a0: QAbstractItemModel.CheckIndexOptions)
Bases:
simplewrapper
- HorizontalSortHint = 2#
- class LayoutChangeHint#
Bases:
int
- NoLayoutChangeHint = 0#
- VerticalSortHint = 1#
- appendColumn(self, items: Iterable[QStandardItem])#
- appendRow(self, items: Iterable[QStandardItem])#
- appendRow(self, aitem: QStandardItem | None) None
- beginInsertColumns(self, parent: QModelIndex, first: int, last: int)#
- beginInsertRows(self, parent: QModelIndex, first: int, last: int)#
- beginMoveColumns(self, sourceParent: QModelIndex, sourceFirst: int, sourceLast: int, destinationParent: QModelIndex, destinationColumn: int) bool #
- beginMoveRows(self, sourceParent: QModelIndex, sourceFirst: int, sourceLast: int, destinationParent: QModelIndex, destinationRow: int) bool #
- beginRemoveColumns(self, parent: QModelIndex, first: int, last: int)#
- beginRemoveRows(self, parent: QModelIndex, first: int, last: int)#
- beginResetModel(self)#
- blockSignals(self, b: bool) bool #
- buddy(self, index: QModelIndex) QModelIndex #
- canDropMimeData(self, data: QMimeData | None, action: Qt.DropAction, row: int, column: int, parent: QModelIndex) bool #
- canFetchMore(self, parent: QModelIndex) bool #
- changePersistentIndex(self, from_: QModelIndex, to: QModelIndex)#
- changePersistentIndexList(self, from_: Iterable[QModelIndex], to: Iterable[QModelIndex])#
- checkIndex(self, index: QModelIndex, options: QAbstractItemModel.CheckIndexOptions | QAbstractItemModel.CheckIndexOption = QAbstractItemModel.CheckIndexOption.NoOption) bool #
- childEvent(self, a0: QChildEvent | None)#
- children(self) List[QObject] #
- clear(self)#
- clearItemData(self, index: QModelIndex) bool #
- columnCount(self, parent: QModelIndex = QModelIndex()) int #
- columnsAboutToBeInserted#
columnsAboutToBeInserted(self, parent: QModelIndex, first: int, last: int) [signal]
- columnsAboutToBeMoved#
columnsAboutToBeMoved(self, sourceParent: QModelIndex, sourceStart: int, sourceEnd: int, destinationParent: QModelIndex, destinationColumn: int) [signal]
- columnsAboutToBeRemoved#
columnsAboutToBeRemoved(self, parent: QModelIndex, first: int, last: int) [signal]
- columnsInserted#
columnsInserted(self, parent: QModelIndex, first: int, last: int) [signal]
- columnsMoved#
columnsMoved(self, parent: QModelIndex, start: int, end: int, destination: QModelIndex, column: int) [signal]
- columnsRemoved#
columnsRemoved(self, parent: QModelIndex, first: int, last: int) [signal]
- connectNotify(self, signal: QMetaMethod)#
- createIndex(self, row: int, column: int, object: Any = None) QModelIndex #
- customEvent(self, a0: QEvent | None)#
- dataChanged#
dataChanged(self, topLeft: QModelIndex, bottomRight: QModelIndex, roles: Iterable[int] = []) [signal]
- decodeData(self, row: int, column: int, parent: QModelIndex, stream: QDataStream) bool #
- deleteLater(self)#
- destroyed#
destroyed(self, object: Optional[QObject] = None) [signal]
- disconnect(a0: QMetaObject.Connection) bool #
- disconnect(self) None
- disconnectNotify(self, signal: QMetaMethod)#
- dropMimeData(self, data: QMimeData | None, action: Qt.DropAction, row: int, column: int, parent: QModelIndex) bool #
- dumpObjectInfo(self)#
- dumpObjectTree(self)#
- dynamicPropertyNames(self) List[QByteArray] #
- encodeData(self, indexes: Iterable[QModelIndex], stream: QDataStream)#
- endInsertColumns(self)#
- endInsertRows(self)#
- endMoveColumns(self)#
- endMoveRows(self)#
- endRemoveColumns(self)#
- endRemoveRows(self)#
- endResetModel(self)#
- event(self, a0: QEvent | None) bool #
- eventFilter(self, a0: QObject | None, a1: QEvent | None) bool #
- fetchMore(self, parent: QModelIndex)#
- findChild(self, type: Type[QObjectT], name: str | None = '', options: Qt.FindChildOptions | Qt.FindChildOption = Qt.FindChildrenRecursively) QObjectT #
- findChild(self, types: Tuple[Type[QObjectT], ...], name: str | None = '', options: Qt.FindChildOptions | Qt.FindChildOption = Qt.FindChildrenRecursively) QObjectT
- findChildren(self, type: Type[QObjectT], name: str | None = '', options: Qt.FindChildOptions | Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObjectT] #
- findChildren(self, types: Tuple[Type[QObjectT], ...], name: str | None = '', options: Qt.FindChildOptions | Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObjectT]
- findChildren(self, type: Type[QObjectT], regExp: QRegExp, options: Qt.FindChildOptions | Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObjectT]
- findChildren(self, types: Tuple[Type[QObjectT], ...], regExp: QRegExp, options: Qt.FindChildOptions | Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObjectT]
- findChildren(self, type: Type[QObjectT], re: QRegularExpression, options: Qt.FindChildOptions | Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObjectT]
- findChildren(self, types: Tuple[Type[QObjectT], ...], re: QRegularExpression, options: Qt.FindChildOptions | Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObjectT]
- findItems(self, text: str | None, flags: Qt.MatchFlags | Qt.MatchFlag = Qt.MatchExactly, column: int = 0) List[QStandardItem] #
- flags(self, index: QModelIndex) Qt.ItemFlags #
- hasChildren(self, parent: QModelIndex = QModelIndex()) bool #
- hasIndex(self, row: int, column: int, parent: QModelIndex = QModelIndex()) bool #
- headerData(self, section: int, orientation: Qt.Orientation, role: int = Qt.DisplayRole) Any #
- headerDataChanged#
headerDataChanged(self, orientation: Qt.Orientation, first: int, last: int) [signal]
- horizontalHeaderItem(self, column: int) QStandardItem | None #
- index(self, row: int, column: int, parent: QModelIndex = QModelIndex()) QModelIndex #
- indexFromItem(self, item: QStandardItem | None) QModelIndex #
- inherits(self, classname: str | None) bool #
- insertColumn(self, column: int, items: Iterable[QStandardItem])#
- insertColumn(self, column: int, parent: QModelIndex = QModelIndex()) bool
- insertColumns(self, column: int, count: int, parent: QModelIndex = QModelIndex()) bool #
- insertRow(self, row: int, items: Iterable[QStandardItem])#
- insertRow(self, arow: int, aitem: QStandardItem | None) None
- insertRow(self, row: int, parent: QModelIndex = QModelIndex()) bool
- insertRows(self, row: int, count: int, parent: QModelIndex = QModelIndex()) bool #
- installEventFilter(self, a0: QObject | None)#
- invisibleRootItem(self) QStandardItem | None #
- isSignalConnected(self, signal: QMetaMethod) bool #
- isWidgetType(self) bool #
- isWindowType(self) bool #
- item(self, row: int, column: int = 0) QStandardItem | None #
- itemChanged#
itemChanged(self, item: Optional[QStandardItem]) [signal]
- itemData(self, index: QModelIndex) Dict[int, Any] #
- itemFromIndex(self, index: QModelIndex) QStandardItem | None #
- itemPrototype(self) QStandardItem | None #
- killTimer(self, id: int)#
- layoutAboutToBeChanged#
layoutAboutToBeChanged(self, parents: Iterable[QPersistentModelIndex] = [], hint: QAbstractItemModel.LayoutChangeHint = QAbstractItemModel.NoLayoutChangeHint) [signal]
- layoutChanged#
layoutChanged(self, parents: Iterable[QPersistentModelIndex] = [], hint: QAbstractItemModel.LayoutChangeHint = QAbstractItemModel.NoLayoutChangeHint) [signal]
- match(self, start: QModelIndex, role: int, value: Any, hits: int = 1, flags: Qt.MatchFlags | Qt.MatchFlag = Qt.MatchStartsWith | Qt.MatchWrap) List[QModelIndex] #
- metaObject(self) QMetaObject | None #
- mimeData(self, indexes: Iterable[QModelIndex]) QMimeData | None #
- mimeTypes(self) List[str] #
- modelAboutToBeReset#
modelAboutToBeReset(self) [signal]
- modelReset#
modelReset(self) [signal]
- moveColumn(self, sourceParent: QModelIndex, sourceColumn: int, destinationParent: QModelIndex, destinationChild: int) bool #
- moveColumns(self, sourceParent: QModelIndex, sourceColumn: int, count: int, destinationParent: QModelIndex, destinationChild: int) bool #
- moveRow(self, sourceParent: QModelIndex, sourceRow: int, destinationParent: QModelIndex, destinationChild: int) bool #
- moveRows(self, sourceParent: QModelIndex, sourceRow: int, count: int, destinationParent: QModelIndex, destinationChild: int) bool #
- moveToThread(self, thread: QThread | None)#
- objectName(self) str #
- objectNameChanged#
objectNameChanged(self, objectName: Optional[str]) [signal]
- parent(self, child: QModelIndex) QModelIndex #
- parent(self) QObject | None
- persistentIndexList(self) List[QModelIndex] #
- property(self, name: str | None) Any #
- 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.
- receivers(self, signal: PYQT_SIGNAL) int #
- removeColumn(self, column: int, parent: QModelIndex = QModelIndex()) bool #
- removeColumns(self, column: int, count: int, parent: QModelIndex = QModelIndex()) bool #
- removeEventFilter(self, a0: QObject | None)#
- removeRow(self, row: int, parent: QModelIndex = QModelIndex()) bool #
- removeRows(self, row: int, count: int, parent: QModelIndex = QModelIndex()) bool #
- resetInternalData(self)#
- revert(self)#
- roleNames(self) Dict[int, QByteArray] #
- rowCount(self, parent: QModelIndex = QModelIndex()) int #
- rowsAboutToBeInserted#
rowsAboutToBeInserted(self, parent: QModelIndex, first: int, last: int) [signal]
- rowsAboutToBeMoved#
rowsAboutToBeMoved(self, sourceParent: QModelIndex, sourceStart: int, sourceEnd: int, destinationParent: QModelIndex, destinationRow: int) [signal]
- rowsAboutToBeRemoved#
rowsAboutToBeRemoved(self, parent: QModelIndex, first: int, last: int) [signal]
- rowsInserted#
rowsInserted(self, parent: QModelIndex, first: int, last: int) [signal]
- rowsMoved#
rowsMoved(self, parent: QModelIndex, start: int, end: int, destination: QModelIndex, row: int) [signal]
- rowsRemoved#
rowsRemoved(self, parent: QModelIndex, first: int, last: int) [signal]
- sender(self) QObject | None #
- senderSignalIndex(self) int #
- setColumnCount(self, columns: int)#
- setData(self, index: QModelIndex, value: Any, role: int = Qt.EditRole) bool #
- setHeaderData(self, section: int, orientation: Qt.Orientation, value: Any, role: int = Qt.EditRole) bool #
- setHorizontalHeaderItem(self, column: int, item: QStandardItem | None)#
- setHorizontalHeaderLabels(self, labels: Iterable[str | None])#
- setItem(self, row: int, column: int, item: QStandardItem | None)#
- setItem(self, arow: int, aitem: QStandardItem | None) None
- setItemData(self, index: QModelIndex, roles: Dict[int, Any]) bool #
- setItemPrototype(self, item: QStandardItem | None)#
- setItemRoleNames(self, roleNames: Dict[int, QByteArray | bytes | bytearray])#
- setObjectName(self, name: str | None)#
- setParent(self, a0: QObject | None)#
- setProperty(self, name: str | None, value: Any) bool #
- setRowCount(self, rows: int)#
- setSortRole(self, role: int)#
- setVerticalHeaderItem(self, row: int, item: QStandardItem | None)#
- setVerticalHeaderLabels(self, labels: Iterable[str | None])#
- sibling(self, row: int, column: int, idx: QModelIndex) QModelIndex #
- signalsBlocked(self) bool #
- sort(self, column: int, order: Qt.SortOrder = Qt.AscendingOrder)#
- sortRole(self) int #
- span(self, index: QModelIndex) QSize #
- startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int #
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>#
- submit(self) bool #
- supportedDragActions(self) Qt.DropActions #
- supportedDropActions(self) Qt.DropActions #
- takeColumn(self, column: int) List[QStandardItem] #
- takeHorizontalHeaderItem(self, column: int) QStandardItem | None #
- takeItem(self, row: int, column: int = 0) QStandardItem | None #
- takeRow(self, row: int) List[QStandardItem] #
- takeVerticalHeaderItem(self, row: int) QStandardItem | None #
- thread(self) QThread | None #
- timerEvent(self, a0: QTimerEvent | None)#
- tr(self, sourceText: str | None, disambiguation: str | None = None, n: int = -1) str #
- verticalHeaderItem(self, row: int) QStandardItem | None #