RTC Toolkit 6.1.0-pre1
Loading...
Searching...
No Matches
gui.repository_panel.RepositoryPanel._TreeViewDelegate Class Reference

This helper delegate is used in the tree view to allow editing only certain scalar types. More...

Inheritance diagram for gui.repository_panel.RepositoryPanel._TreeViewDelegate:

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ __init__()

gui.repository_panel.RepositoryPanel._TreeViewDelegate.__init__ ( self,
* args,
** kwargs )

Member Function Documentation

◆ createEditor()

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.

◆ setEditorData()

gui.repository_panel.RepositoryPanel._TreeViewDelegate.setEditorData ( self,
editor,
index )

Fills the editor widget with current data from the given model index.

◆ setModelData()

gui.repository_panel.RepositoryPanel._TreeViewDelegate.setModelData ( self,
editor,
model,
index )

Updates the model at the given index with modified data from the editor widget.


The documentation for this class was generated from the following file: