pyface.data_view.value_types.bool_value module¶
- class pyface.data_view.value_types.bool_value.BoolValue[source]¶
Bases:
AbstractValueType
Value that presents a boolean value via checked state.
- true_text = Str()¶
The text to display next to a True value.
- false_text = Str()¶
The text to display next to a False value.
- has_editor_value(model, row, column)[source]¶
BoolValues don’t use editors, but have always-on checkbox.
- Parameters
model (AbstractDataModel) – The data model holding the data.
row (sequence of int) – The row in the data model being queried.
column (sequence of int) – The column in the data model being queried.
- Returns
has_editor_value – Whether or not the value is editable.
- Return type
- get_text(model, row, column)[source]¶
The textual representation of the underlying value.
- Parameters
model (AbstractDataModel) – The data model holding the data.
row (sequence of int) – The row in the data model being queried.
column (sequence of int) – The column in the data model being queried.
- Returns
text – The textual representation of the underlying value.
- Return type
- has_check_state(model, row, column)[source]¶
Whether or not the value has checked state.
The default implementation returns True.
- Parameters
model (AbstractDataModel) – The data model holding the data.
row (sequence of int) – The row in the data model being queried.
column (sequence of int) – The column in the data model being queried.
- Returns
has_check_state – Whether or not the value has a checked state.
- Return type
- set_check_state(model, row, column, check_state)[source]¶
Set the boolean value from the check state.
- Parameters
model (AbstractDataModel) – The data model holding the data.
row (sequence of int) – The row in the data model being set.
column (sequence of int) – The column in the data model being set.
check_state ("checked" or "unchecked") – The check state being set.
- Raises
DataViewSetError – If the value cannot be set.