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

This widget provides viewing and editing capabilities for a model derived from RepositoryModel. More...

Inheritance diagram for gui.repository_panel.RepositoryPanel:

Classes

class  _MapperDelegate
 This helper delegate is used to work around a crash caused by a bug when Ndarray objects interact with a Qt Property via a QDataWidgetMapper. More...
 
class  _TreeViewDelegate
 This helper delegate is used in the tree view to allow editing only certain scalar types. More...
 

Public Member Functions

 __init__ (self, parent=None, *args, **kwargs)
 Initialise the RepositoryPanel widget.
 
 get_model (self)
 Returns the data model object used by the various child view widgets.
 
 set_model (self, RepositoryModel model)
 Sets the data model object to use in the various child view widgets.
 
 get_operations (self)
 Return the command line interface operations object being used.
 
 set_operations (self, Operations operations)
 Sets the command line interface operations object to use.
 
 new_cached_values (self)
 Qt slot that enables the commit button whenever the repository model has changed.
 
 commit_complete (self, errors)
 Qt slot for handling commit completion or errors.
 
 row_changed (self, current, previous)
 Qt slot that updates the current edit widgets to display and use depending on the datapoint type currently selected in the tree view.
 
 data_model_changed (self, top_left, bottom_right, roles)
 Handles changes to the type column by updating the edit panel with row_changed.
 
 metadata_model_changed (self)
 Updates the selected node with the current metadata from the metadata panel.
 
 on_addButton_clicked (self)
 Qt slot to add a new datapoint when the "Add" button is pressed.
 
 on_removeButton_clicked (self)
 Qt slot to remove the currently selected datapoint when the "Remove" button is pressed.
 
 on_commitButton_clicked (self)
 Qt slot to save all modified datapoints back to the repository.
 
 on_readButton_clicked (self)
 Qt slot to download the currently selected datapoint to local files when the "Read" button is pressed.
 
 on_writeButton_clicked (self)
 Qt slot to upload data to the currently selected datapoint from local files when the "Write" button is pressed.
 
 on_metadataButton_clicked (self)
 Qt slot to show/hide metadataPanel with MetadataEdit widget.
 
 on_tree_view_menu_requested (self, point)
 Display the context menu for the node at the given position and prepare the available actions in the menu, based on the selected node.
 
 add_node_action (self)
 Open the data point dialog and create a data point if the dialog is accepted.
 
 remove_node_action (self, QModelIndex index)
 Remove the node represented by the given model index from the tree.
 
 show_symlink_dialog (self, DataPointPath path=None, DataPointPath symlink_target=None)
 Open the symlink dialog and create a symlink if the dialog is accepted.
 
 on_plainTextEdit_textChanged (self)
 Qt slot to submit changes from the string editing panel to the data model.
 
 on_checkBox_clicked (self)
 Qt slot to submit changes to the data model when the checkbox for boolean values is clicked.
 
 on_qeMatrixView_commitData (self, editor)
 Qt slot to submit changes to the data model when the MatrixEdit control has made changes to the ndarray data.
 
 on_matrixStringEdit_commit_data (self, editor)
 Qt slot to submit changes to the data model when the MatrixStringEdit control has made changes to the ndarray data.
 
 on_integerEdit_commit_data (self, editor)
 Qt slot to submit changes to the data model when the IntegerEdit control has made changes to the integer value.
 
 on_floatEdit_commit_data (self, editor)
 Qt slot to submit changes to the data model when the FloatEdit control has made changes to the floating-point value.
 
 on_vectorStringEdit_commit_data (self, editor)
 Qt slot to submit changes to the data model when the VectorStringEdit control has made changes to the ndarray data.
 
 on_qeVectorView_commitData (self, editor)
 Qt slot to submit changes to the data model when the VectorEdit control has made changes to the ndarray data.
 

Public Attributes

 ui = Ui_RepositoryPanel()
 
 on_tree_view_menu_requested
 
 metadata_model_changed
 
 row_changed
 
 data_model_changed
 
 new_cached_values
 
 commit_complete
 
 on_addButton_clicked
 

Static Public Attributes

int STATUS_UPDATE_TIMEOUT = 15000
 
 status_update = Signal(str, int)
 Signal for status message updates sent to the status bar.
 

Protected Attributes

 _operations = None
 
 _selected_node_index = None
 
 _data_mapper = QDataWidgetMapper()
 

Static Protected Attributes

int _blank_page_index
 
int _bool_edit_page_index
 
int _binary_edit_page_index
 
int _string_edit_page_index
 
int _int_edit_page_index
 
int _float_edit_page_index
 
int _vector_edit_page_index
 
int _vector_string_edit_page_index
 
int _matrix_edit_page_index
 
int _matrix_string_edit_page_index
 
dict _type_to_edit_page_map
 

Detailed Description

This widget provides viewing and editing capabilities for a model derived from RepositoryModel.

Constructor & Destructor Documentation

◆ __init__()

gui.repository_panel.RepositoryPanel.__init__ ( self,
parent = None,
* args,
** kwargs )

Initialise the RepositoryPanel widget.

Parameters
parentThe optional parent Qt widget object.
argsAdditional positional arguments passed onto the base class.
kwargsAdditional keyword arguments passed onto the base class.

Member Function Documentation

◆ add_node_action()

gui.repository_panel.RepositoryPanel.add_node_action ( self)

Open the data point dialog and create a data point if the dialog is accepted.

◆ commit_complete()

gui.repository_panel.RepositoryPanel.commit_complete ( self,
errors )

Qt slot for handling commit completion or errors.

◆ data_model_changed()

gui.repository_panel.RepositoryPanel.data_model_changed ( self,
top_left,
bottom_right,
roles )

Handles changes to the type column by updating the edit panel with row_changed.

◆ get_model()

gui.repository_panel.RepositoryPanel.get_model ( self)

Returns the data model object used by the various child view widgets.

◆ get_operations()

gui.repository_panel.RepositoryPanel.get_operations ( self)

Return the command line interface operations object being used.

◆ metadata_model_changed()

gui.repository_panel.RepositoryPanel.metadata_model_changed ( self)

Updates the selected node with the current metadata from the metadata panel.

Retrieves the edited metadata from the metadata model and applies it to the selected node using the metadata item data role.

◆ new_cached_values()

gui.repository_panel.RepositoryPanel.new_cached_values ( self)

Qt slot that enables the commit button whenever the repository model has changed.

◆ on_addButton_clicked()

gui.repository_panel.RepositoryPanel.on_addButton_clicked ( self)

Qt slot to add a new datapoint when the "Add" button is pressed.

◆ on_checkBox_clicked()

gui.repository_panel.RepositoryPanel.on_checkBox_clicked ( self)

Qt slot to submit changes to the data model when the checkbox for boolean values is clicked.

◆ on_commitButton_clicked()

gui.repository_panel.RepositoryPanel.on_commitButton_clicked ( self)

Qt slot to save all modified datapoints back to the repository.

◆ on_floatEdit_commit_data()

gui.repository_panel.RepositoryPanel.on_floatEdit_commit_data ( self,
editor )

Qt slot to submit changes to the data model when the FloatEdit control has made changes to the floating-point value.

◆ on_integerEdit_commit_data()

gui.repository_panel.RepositoryPanel.on_integerEdit_commit_data ( self,
editor )

Qt slot to submit changes to the data model when the IntegerEdit control has made changes to the integer value.

◆ on_matrixStringEdit_commit_data()

gui.repository_panel.RepositoryPanel.on_matrixStringEdit_commit_data ( self,
editor )

Qt slot to submit changes to the data model when the MatrixStringEdit control has made changes to the ndarray data.

◆ on_metadataButton_clicked()

gui.repository_panel.RepositoryPanel.on_metadataButton_clicked ( self)

Qt slot to show/hide metadataPanel with MetadataEdit widget.

◆ on_plainTextEdit_textChanged()

gui.repository_panel.RepositoryPanel.on_plainTextEdit_textChanged ( self)

Qt slot to submit changes from the string editing panel to the data model.

This only occurs if the edit widget has focus and contains text modifications.

◆ on_qeMatrixView_commitData()

gui.repository_panel.RepositoryPanel.on_qeMatrixView_commitData ( self,
editor )

Qt slot to submit changes to the data model when the MatrixEdit control has made changes to the ndarray data.

◆ on_qeVectorView_commitData()

gui.repository_panel.RepositoryPanel.on_qeVectorView_commitData ( self,
editor )

Qt slot to submit changes to the data model when the VectorEdit control has made changes to the ndarray data.

◆ on_readButton_clicked()

gui.repository_panel.RepositoryPanel.on_readButton_clicked ( self)

Qt slot to download the currently selected datapoint to local files when the "Read" button is pressed.

This is equivalent to the command line interface "read" sub-command.

◆ on_removeButton_clicked()

gui.repository_panel.RepositoryPanel.on_removeButton_clicked ( self)

Qt slot to remove the currently selected datapoint when the "Remove" button is pressed.

◆ on_tree_view_menu_requested()

gui.repository_panel.RepositoryPanel.on_tree_view_menu_requested ( self,
point )

Display the context menu for the node at the given position and prepare the available actions in the menu, based on the selected node.

◆ on_vectorStringEdit_commit_data()

gui.repository_panel.RepositoryPanel.on_vectorStringEdit_commit_data ( self,
editor )

Qt slot to submit changes to the data model when the VectorStringEdit control has made changes to the ndarray data.

◆ on_writeButton_clicked()

gui.repository_panel.RepositoryPanel.on_writeButton_clicked ( self)

Qt slot to upload data to the currently selected datapoint from local files when the "Write" button is pressed.

This is equivalent to the command line interface "write" sub-command.

◆ remove_node_action()

gui.repository_panel.RepositoryPanel.remove_node_action ( self,
QModelIndex index )

Remove the node represented by the given model index from the tree.

◆ row_changed()

gui.repository_panel.RepositoryPanel.row_changed ( self,
current,
previous )

Qt slot that updates the current edit widgets to display and use depending on the datapoint type currently selected in the tree view.

◆ set_model()

gui.repository_panel.RepositoryPanel.set_model ( self,
RepositoryModel model )

Sets the data model object to use in the various child view widgets.

Parameters
modelA model deriving from RepositoryModel representing the repository data.

◆ set_operations()

gui.repository_panel.RepositoryPanel.set_operations ( self,
Operations operations )

Sets the command line interface operations object to use.

Parameters
operationsShould be an instance of the Operations class.

◆ show_symlink_dialog()

gui.repository_panel.RepositoryPanel.show_symlink_dialog ( self,
DataPointPath path = None,
DataPointPath symlink_target = None )

Open the symlink dialog and create a symlink if the dialog is accepted.

Member Data Documentation

◆ _binary_edit_page_index

int gui.repository_panel.RepositoryPanel._binary_edit_page_index
staticprotected

◆ _blank_page_index

gui.repository_panel.RepositoryPanel._blank_page_index
staticprotected

◆ _bool_edit_page_index

int gui.repository_panel.RepositoryPanel._bool_edit_page_index
staticprotected

◆ _data_mapper

gui.repository_panel.RepositoryPanel._data_mapper = QDataWidgetMapper()
protected

◆ _float_edit_page_index

int gui.repository_panel.RepositoryPanel._float_edit_page_index
staticprotected

◆ _int_edit_page_index

int gui.repository_panel.RepositoryPanel._int_edit_page_index
staticprotected

◆ _matrix_edit_page_index

int gui.repository_panel.RepositoryPanel._matrix_edit_page_index
staticprotected

◆ _matrix_string_edit_page_index

int gui.repository_panel.RepositoryPanel._matrix_string_edit_page_index
staticprotected

◆ _operations

gui.repository_panel.RepositoryPanel._operations = None
protected

◆ _selected_node_index

gui.repository_panel.RepositoryPanel._selected_node_index = None
protected

◆ _string_edit_page_index

int gui.repository_panel.RepositoryPanel._string_edit_page_index
staticprotected

◆ _type_to_edit_page_map

dict gui.repository_panel.RepositoryPanel._type_to_edit_page_map
staticprotected

◆ _vector_edit_page_index

int gui.repository_panel.RepositoryPanel._vector_edit_page_index
staticprotected

◆ _vector_string_edit_page_index

int gui.repository_panel.RepositoryPanel._vector_string_edit_page_index
staticprotected

◆ commit_complete

gui.repository_panel.RepositoryPanel.commit_complete

◆ data_model_changed

gui.repository_panel.RepositoryPanel.data_model_changed

◆ metadata_model_changed

gui.repository_panel.RepositoryPanel.metadata_model_changed

◆ new_cached_values

gui.repository_panel.RepositoryPanel.new_cached_values

◆ on_addButton_clicked

gui.repository_panel.RepositoryPanel.on_addButton_clicked

◆ on_tree_view_menu_requested

gui.repository_panel.RepositoryPanel.on_tree_view_menu_requested

◆ row_changed

gui.repository_panel.RepositoryPanel.row_changed

◆ status_update

gui.repository_panel.RepositoryPanel.status_update = Signal(str, int)
static

Signal for status message updates sent to the status bar.

These signals are sent after various actions associated with the panel's buttons have been completed.

◆ STATUS_UPDATE_TIMEOUT

gui.repository_panel.RepositoryPanel.STATUS_UPDATE_TIMEOUT = 15000
static

◆ ui

gui.repository_panel.RepositoryPanel.ui = Ui_RepositoryPanel()

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