8.6.8.2.14. pymodaq_gui.utils.widgets.table module

class pymodaq_gui.utils.widgets.table.BooleanDelegate[source]

Bases: QStyledItemDelegate

TO implement custom widget editor for cells in a tableview

Methods

createEditor

setEditorData

setModelData

createEditor(parent, option, index)[source]
setEditorData(editor, index)[source]
setModelData(editor, model, index)[source]
staticMetaObject = PySide6.QtCore.QMetaObject("BooleanDelegate" inherits "QStyledItemDelegate": )
class pymodaq_gui.utils.widgets.table.MyStyle[source]

Bases: QProxyStyle

Methods

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: QStyledItemDelegate

Methods

createEditor

setEditorData

setModelData

createEditor(parent, option, index)[source]
setEditorData(editor, index)[source]
setModelData(editor, model, index)[source]
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: (str or float or int or ) :param value: :type value: (str or float or int or )

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

clear()[source]
columnCount(*args, **kwargs)[source]
data(index, role)[source]
dropMimeData(data, action, row, column, parent)[source]
flags(index)[source]
get_data(row, col=None)[source]
get_data_all()[source]
headerData(section, orientation, role)[source]
insertRows(row, count, parent)[source]
insert_data(row, data)[source]
is_checked(row)[source]
removeRows(row, count, parent)[source]
remove_row(row)[source]
rowCount(*args, **kwargs)[source]
setData(index, value, role)[source]
set_data_all(data)[source]
supportedDropActions()[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) :type value: (str or float or int or ) :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
staticMetaObject = PySide6.QtCore.QMetaObject("TableModel" inherits "QAbstractTableModel": )
class pymodaq_gui.utils.widgets.table.TableView(*args, **kwargs)[source]

Bases: QTableView

Methods

setupview

setupview()[source]
staticMetaObject = PySide6.QtCore.QMetaObject("TableView" inherits "QTableView": )