|
RTC Toolkit 6.0.0
|
This helper delegate is used in the tree view to allow editing only certain scalar types. More...
Public Member Functions | |
| __init__ (self, *args, **kwargs) | |
| createEditor (self, parent, option, index) | |
| Create an editor widget only for certain scalar types and return None for all other cases. | |
| setEditorData (self, editor, index) | |
| Fills the editor widget with current data from the given model index. | |
| setModelData (self, editor, model, index) | |
| Updates the model at the given index with modified data from the editor widget. | |
Public Member Functions inherited from gui.repository_panel.RepositoryPanel._CustomDelegate | |
| __init__ (self, *args, **kwargs) | |
Static Public Attributes | |
| tuple | integer_types |
| tuple | floating_point_types |
| tuple | other_scalar_types |
This helper delegate is used in the tree view to allow editing only certain scalar types.
The setEditorData and setModelData are specialised to improve the user experience when interacting with the tree view during editing. For example, the current type of the datapoint is automatically selected in the TypeComboBox, and we avoid updating the model if the data did not actually change to prevent the Commit button from becoming enabled.
| gui.repository_panel.RepositoryPanel._TreeViewDelegate.__init__ | ( | self, | |
| * | args, | ||
| ** | kwargs ) |
| gui.repository_panel.RepositoryPanel._TreeViewDelegate.createEditor | ( | self, | |
| parent, | |||
| option, | |||
| index ) |
Create an editor widget only for certain scalar types and return None for all other cases.
This will effectively prevent modifications of matrix and vector types in the tree view. In addition, map modifications of the model's "type" column to a combobox.
| gui.repository_panel.RepositoryPanel._TreeViewDelegate.setEditorData | ( | self, | |
| editor, | |||
| index ) |
Fills the editor widget with current data from the given model index.
Reimplemented from gui.repository_panel.RepositoryPanel._CustomDelegate.
| gui.repository_panel.RepositoryPanel._TreeViewDelegate.setModelData | ( | self, | |
| editor, | |||
| model, | |||
| index ) |
Updates the model at the given index with modified data from the editor widget.
Reimplemented from gui.repository_panel.RepositoryPanel._CustomDelegate.
|
static |
|
static |
|
static |