8.5.6.1.6. pymodaq_gui.utils.widgets.table module
- class pymodaq_gui.utils.widgets.table.BooleanDelegate[source]
Bases:
QStyledItemDelegateTO implement custom widget editor for cells in a tableview
Methods
createEditor(self, parent, option, index)setEditorData(self, editor, index)setModelData(self, editor, model, index)
- class pymodaq_gui.utils.widgets.table.MyStyle[source]
Bases:
QProxyStyleMethods
drawPrimitive(element, option, painter[, widget])Draw a line across the entire row rather than just the column we're hovering over.
- class pymodaq_gui.utils.widgets.table.SpinBoxDelegate(parent=None, decimals=4, min=-1000000.0, max=1000000.0, units=None)[source]
Bases:
QStyledItemDelegateMethods
createEditor(self, parent, option, index)setEditorData(self, editor, index)setModelData(self, editor, model, index)
- class pymodaq_gui.utils.widgets.table.TableModel(data, header, editable=True, parent=None, show_checkbox=False, cast=<class 'float'>)[source]
Bases:
QAbstractTableModel- Attributes:
- raw_data
Methods
columnCount(self[, parent])data(self, index[, role])dropMimeData(self, data, action, row, ...)flags(self, index)headerData(self, section, orientation[, role])insertRows(self, row, count[, parent])removeRows(self, row, count[, parent])rowCount(self[, parent])setData(self, index, value[, role])supportedDropActions(self)validate_data(row, col, value)to be subclassed in order to validate ranges of values for the cell defined by index :param index: :type index: (QModelIndex) :param value: :type value: (str or float or int or ...)
clear
get_data
get_data_all
insert_data
is_checked
remove_row
set_data_all
- dropMimeData(self, data: QMimeData | None, action: Qt.DropAction, row: int, column: int, parent: QModelIndex) bool[source]
- headerData(self, section: int, orientation: Qt.Orientation, role: int = Qt.DisplayRole) Any[source]
- validate_data(row, col, value)[source]
to be subclassed in order to validate ranges of values for the cell defined by index :param index: :type index: (QModelIndex) :param value: :type value: (str or float or int or …)
- Returns:
bool
- Return type:
True if value is valid for the given row and col
- property raw_data