8.6.8.2.14. 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
setEditorData
setModelData
- staticMetaObject = PySide6.QtCore.QMetaObject("BooleanDelegate" inherits "QStyledItemDelegate": )
- 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.
- drawPrimitive(element, option, painter, widget=None)[source]
Draw a line across the entire row rather than just the column we’re hovering over. This may not always work depending on global style - for instance I think it won’t work on OSX.
- staticMetaObject = PySide6.QtCore.QMetaObject("MyStyle" inherits "QProxyStyle": )
- class pymodaq_gui.utils.widgets.table.SpinBoxDelegate(parent=None, decimals=4, min=-1000000.0, max=1000000.0, units=None)[source]
Bases:
QStyledItemDelegateMethods
createEditor
setEditorData
setModelData
- staticMetaObject = PySide6.QtCore.QMetaObject("SpinBoxDelegate" inherits "QStyledItemDelegate": )
- 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
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):type value:(strorfloatorintor):param value: :type value:(strorfloatorintor)clear
columnCount
data
dropMimeData
flags
get_data
get_data_all
headerData
insertRows
insert_data
is_checked
removeRows
remove_row
rowCount
setData
set_data_all
supportedDropActions
- 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):type value:(strorfloatorintor):param value: :type value:(strorfloatorintor)- Returns:
bool
- Return type:
True if value is valid for the given rowandcol
- property raw_data
- staticMetaObject = PySide6.QtCore.QMetaObject("TableModel" inherits "QAbstractTableModel": )
- class pymodaq_gui.utils.widgets.table.TableModelTabular(data, axes_name=None, **kwargs)[source]
Bases:
TableModelTable Model for the Model/View Qt framework dedicated to the Tabular scan mode
Methods
validate_data(row, col, value)make sure the values and signs of the start, stop and step values are "correct" :type row:
(int) row within the table that istobe changed:param row: :type row:(int) row within the table that istobe changed:type col:(int) col within the table that istobe changed:param col: :type col:(int) col within the table that istobe changed:type value:(float) new value for the value defined by rowandcol:param value: :type value:(float) new value for the value defined by rowandcoladd_data
load_txt
remove_data
save_txt
- validate_data(row, col, value)[source]
make sure the values and signs of the start, stop and step values are “correct” :type row:
(int) row within the table that istobe changed:param row: :type row:(int) row within the table that istobe changed:type col:(int) col within the table that istobe changed:param col: :type col:(int) col within the table that istobe changed:type value:(float) new value for the value defined by rowandcol:param value: :type value:(float) new value for the value defined by rowandcol- Returns:
bool
- Return type:
True is the new value is fine (change some other values if needed) otherwise False
- staticMetaObject = PySide6.QtCore.QMetaObject("TableModelTabular" inherits "TableModel": )
- class pymodaq_gui.utils.widgets.table.TableModelTabularReadOnly(data, axes_name=None, **kwargs)[source]
Bases:
TableModelTabularMethods
setData
- staticMetaObject = PySide6.QtCore.QMetaObject("TableModelTabularReadOnly" inherits "TableModelTabular": )