|
RTC Toolkit 6.0.0
|
The main GUI window class of the rtctkConfigTool. More...
Public Member Functions | |
| __init__ (self, Operations operations, parent=None, *args, **kwargs) | |
| Initialise the main window object. | |
| persistent_repo_changed (self, start_index, end_index, roles) | |
| Qt slot that enables the commit button whenever the Persistent Configuration Repository model is changed. | |
| runtime_repo_changed (self, start_index, end_index, roles) | |
| Qt slot that enables the commit button whenever the Runtime Configuration Repository model is changed. | |
| on_actionReconnect_triggered (self) | |
| Closes the current connection to the Persistent and Runtime Configuration Repositories and connects to the repositories from scratch. | |
| on_actionExit_triggered (self) | |
| Method to handle menu exit from the application. | |
| on_actionValidate_triggered (self) | |
| Runs validation logic to check the structure and contents of the persistent configuration repository is correct. | |
| closeEvent (self, event) | |
| This method is called when a window is closed. | |
| __init__ (self, cfg, RtcDeploymentData deployment_data, RtcDeploymentControl deployment_control, OldbClient oldb, parent=None) | |
| Initializes the MainWindow object, and received the references to the required comms classes. | |
| on_rtcOverview_logs_requested (self, str comp_name) | |
| Slot the logs_requested signal from the RrtOverview widget. | |
| on_actionShowAllRTClogs_triggered (self) | |
| Slot that is executed from the menu entry Show All RTC Logs. | |
| closeEvent (self, event) | |
| We override the closeEvent. | |
| on_actionExit_triggered (self) | |
| Method to handle menu exit from the application. | |
| on_actionShowErrorDialogs_triggered (self, bool new_value) | |
| Matches the state of the QAction actionShowErrorDialogs that appears in the Menu of the application to the state of the global TaurusMessageBox. | |
| handle_protect_message_box_stateChanged (self, Qt.CheckState new_value) | |
| Matches the stateChanged signal from the global TaurusMessageBox to the QAction actionShowErrorDialogs that is part of the Menu of the application. | |
| setItemFactories (self, dict include=None, dict exclude=None) | |
| Sets and collects Item Factories plugins. | |
| handle_rtcOverview_uriChanged (self, str new_uri) | |
| Reacts to changes in the currently selected RTC Component. | |
| handle_rtcOverview_uri_removed (self, str uri) | |
| Reacts to removals from the RTC Component list. | |
Public Attributes | |
| ui = Ui_MainWindow() | |
| on_actionReconnect_triggered | |
| handle_rtcOverview_uriChanged | |
| handle_rtcOverview_uri_removed | |
| handle_protect_message_box_stateChanged = taurus.qt.qtgui.dialog.taurusmessagebox._PROTECT_MESSAGE_BOX | |
Protected Member Functions | |
| _setup_repositories (self) | |
| _init_gui (self) | |
| In some cases, widgets are not ready for modification until init is done. | |
Protected Attributes | |
| _runtime_repo_model = None | |
| _persistent_repo_model = None | |
| _operations = operations | |
| _logger = CiiLogManager.get_logger(__name__) | |
| _cfg = cfg | |
| RtcDeploymentData | _deployment_data = deployment_data |
| RtcDeploymentControl | _deployment_control = deployment_control |
| OldbClient | _oldb = oldb |
| dict | _commands_uri_index_dict = {} |
| list | _item_factories = [] |
The main GUI window class of the rtctkConfigTool.
Implementation of the mainwindow.ui design.
It provides the logic for the widgets interactions, creates the comms objects, and forwards the calls to said comms classes.
| gui.main_window.MainWindow.__init__ | ( | self, | |
| Operations | operations, | ||
| parent = None, | |||
| * | args, | ||
| ** | kwargs ) |
Initialise the main window object.
This will create the necessary user interface widgets, repository adapters and data model objects. The created data models are then attached to the view widgets and needed Qt signals connected.
| operations | Should be an instance of the Operations class. |
| parent | The optional parent Qt widget object. |
| args | Additional arguments passed to QMainWindow. |
| kwargs | Additional keyword arguments passed to QMainWindow. |
| gui.main_window.MainWindow.__init__ | ( | self, | |
| cfg, | |||
| RtcDeploymentData | deployment_data, | ||
| RtcDeploymentControl | deployment_control, | ||
| OldbClient | oldb, | ||
| parent = None ) |
Initializes the MainWindow object, and received the references to the required comms classes.
| [in] | cfg | It is used to access the Persistent Configuration. |
| [in] | deployment_data | An RtcDeploymentData realized class. It is used to query the RTC of the available components and their URIs. |
| [in] | deployment_control | An RtcDeploymentControl realised class. Used to start and stop RTC processes. |
| [in] | oldb | OLDB client |
| [in] | parent | Reference of the parent widget. Needed by Qt. |
|
protected |
In some cases, widgets are not ready for modification until init is done.
This can be workaround by invoking another method at the end of init.
|
protected |
| gui.main_window.MainWindow.closeEvent | ( | self, | |
| event ) |
This method is called when a window is closed.
Here we execute whatever is needed to properly shutdown the application. At the end, call the parent's closeEvent in order to propagate the event.
| event | QEvent generated by Qt that informs the widget of the request to close it. |
| gui.main_window.MainWindow.closeEvent | ( | self, | |
| event ) |
We override the closeEvent.
This method is called when a window is closed. Here we execute whatever we need to nicely shutdown the application. At the end we call the parents closeEvent, in order to propagate the event.
| [in] | event | QEvent generated by Qt that informs the widget of the request to close the widget. |
| gui.main_window.MainWindow.handle_protect_message_box_stateChanged | ( | self, | |
| Qt.CheckState | new_value ) |
Matches the stateChanged signal from the global TaurusMessageBox to the QAction actionShowErrorDialogs that is part of the Menu of the application.
| [in] | new_value | Checked state (Qt.CheckState) from the TaurusMessageBox. |
| gui.main_window.MainWindow.handle_rtcOverview_uri_removed | ( | self, | |
| str | uri ) |
Reacts to removals from the RTC Component list.
| uri | The RR URI of the removed component. |
| gui.main_window.MainWindow.handle_rtcOverview_uriChanged | ( | self, | |
| str | new_uri ) |
Reacts to changes in the currently selected RTC Component.
| [in] | new_uri | The RR URI of the selected component. |
| gui.main_window.MainWindow.on_actionExit_triggered | ( | self | ) |
Method to handle menu exit from the application.
Instructs the application to close all its windows. Each window should implement proper shutdown procedures. In the case, this results in a forwarded call to the closeEvent() method that is overridden below.
| gui.main_window.MainWindow.on_actionExit_triggered | ( | self | ) |
Method to handle menu exit from the application.
We instruct the application to close all its windows. Each window should implement proper shutdown procedures. In the case of this class (TaurusMainAppWindow), this results in a forwarded call to the closeEvent() method overridden below.
| gui.main_window.MainWindow.on_actionReconnect_triggered | ( | self | ) |
Closes the current connection to the Persistent and Runtime Configuration Repositories and connects to the repositories from scratch.
| gui.main_window.MainWindow.on_actionShowAllRTClogs_triggered | ( | self | ) |
Slot that is executed from the menu entry Show All RTC Logs.
| gui.main_window.MainWindow.on_actionShowErrorDialogs_triggered | ( | self, | |
| bool | new_value ) |
Matches the state of the QAction actionShowErrorDialogs that appears in the Menu of the application to the state of the global TaurusMessageBox.
| [in] | new_value | Boolean that indicates the new toggled state of the QAction. |
| gui.main_window.MainWindow.on_actionValidate_triggered | ( | self | ) |
Runs validation logic to check the structure and contents of the persistent configuration repository is correct.
| gui.main_window.MainWindow.on_rtcOverview_logs_requested | ( | self, | |
| str | comp_name ) |
Slot the logs_requested signal from the RrtOverview widget.
That signal is raised when a the LogsButton of a component is pressed. This slots will react by showing the logs associated to that component, raising the Logs Dock Widget, and changing the Logs Dock Widget title to show the name of the file.
If comp_name is empty, then it clears the logs widget.
| [in] | comp_name | Component name |
| gui.main_window.MainWindow.persistent_repo_changed | ( | self, | |
| start_index, | |||
| end_index, | |||
| roles ) |
Qt slot that enables the commit button whenever the Persistent Configuration Repository model is changed.
| gui.main_window.MainWindow.runtime_repo_changed | ( | self, | |
| start_index, | |||
| end_index, | |||
| roles ) |
Qt slot that enables the commit button whenever the Runtime Configuration Repository model is changed.
| gui.main_window.MainWindow.setItemFactories | ( | self, | |
| dict | include = None, | ||
| dict | exclude = None ) |
Sets and collects Item Factories plugins.
Item Factories are plugins as defined in the Taurus Plugin documentation, for the taurus.form.item_factories python wheel entrypoint.
| [in] | include | Inclusion rules as defined in a dictionary. |
| [in] | exclude | Exclusion rules as defined in a dictionary. |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| gui.main_window.MainWindow.handle_protect_message_box_stateChanged = taurus.qt.qtgui.dialog.taurusmessagebox._PROTECT_MESSAGE_BOX |
| gui.main_window.MainWindow.handle_rtcOverview_uri_removed |
| gui.main_window.MainWindow.handle_rtcOverview_uriChanged |
| gui.main_window.MainWindow.on_actionReconnect_triggered |
| gui.main_window.MainWindow.ui = Ui_MainWindow() |