hlcc 2.0.0-beta2+pre1
|
Implementation of the mainwindow.ui file. More...
Public Member Functions | |
def | __init__ (self) |
Initialization and QMainWindow Methods ##. | |
def | closeEvent (self, event) |
Not to be confused with actionExit, this method is special. | |
def | on_actionExit_triggered (self) |
Action Slots implementation ##. | |
def | on_actionManual_triggered (self) |
Slot that auto-connects to the actionManual. | |
def | on_actionWhats_This_triggered (self) |
Slot that auto-connects to the actionWhats_This. | |
def | on_actionAbout_Application_triggered (self) |
Slot that auto-connects to the actionAbout_Application. | |
def | on_actionAbout_ESO_triggered (self) |
Slot that auto-connects to the actionAbout_ESO. | |
def | on_actionLicenses_triggered (self) |
Slot that auto-connects to the actionLicenses. | |
def | on_actionHmsDms_triggered (self) |
Slot that auto-connects to the actionHmsDms. | |
def | on_actionDegrees_triggered (self) |
Slot that auto-connects to the actionDegrees. | |
def | on_actionRadians_triggered (self) |
Slot that auto-connects to the actionRadians. | |
def | on_actionTelescopeState_triggered (self) |
Slot that auto-connects to the actionTelescopeState. | |
def | on_actionServerConnect_triggered (self) |
Server (dis)connection slots ##. | |
def | on_actionServerDisconnect_triggered (self) |
Slot that auto-connects to the QAction actionServerDisconnect. | |
def | on_actionServerAutoconnect_triggered (self) |
Slot that auto-connects to the QAction actionServerAutoconnect. | |
def | on_server_connection_changed (self, state) |
Slot that connects to each QProcess instanciated based on the process configured. | |
Public Attributes | |
ui | |
active_tool_processes | |
launcherMenu | |
telescopeStateDialog | |
Protected Member Functions | |
def | _init_gui (self) |
In some cases, widgets are not ready for modification until init is done. | |
def | _init_polling (self) |
The widgets model do not update automatically, a polling option must be added as an attribute. | |
Implementation of the mainwindow.ui file.
Since the UI file indicates that its root is a QMainWindow, then this class should also inherit from it. We should also call explicitly its parent constructors.
The implementation for this class also includes slots for actions, and management of the closeEvent.
def telsimui.applicationwindow.ApplicationWindow.__init__ | ( | self | ) |
Initialization and QMainWindow Methods ##.
ApplicattionWindow/MainWindow main entrypoint
|
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 |
The widgets model do not update automatically, a polling option must be added as an attribute.
Initialize the polling feature based on the configure URIs to be monitor
def telsimui.applicationwindow.ApplicationWindow.closeEvent | ( | self, | |
event | |||
) |
Not to be confused with actionExit, this method is special.
Instead of using signals to know when an application is closed, we can override the closeEvent method from the QApplication class, and determine here what will happen when the window is closed. In this case, we are just forwarding the event to its parent class. This is useful when disconnection from server or prevention of current work needs to be implemented.
event | Event received from Qt event pump type of event: QtCore.QEvent |
def telsimui.applicationwindow.ApplicationWindow.on_actionAbout_Application_triggered | ( | self | ) |
Slot that auto-connects to the actionAbout_Application.
actionAbout_Application is not declared in the code, but in the mainwindow.ui.
def telsimui.applicationwindow.ApplicationWindow.on_actionAbout_ESO_triggered | ( | self | ) |
Slot that auto-connects to the actionAbout_ESO.
actionAbout_ESO is not declared in the code, but in the mainwindow.ui.
def telsimui.applicationwindow.ApplicationWindow.on_actionDegrees_triggered | ( | self | ) |
Slot that auto-connects to the actionDegrees.
actionDegrees is not declared in the code, but in the mainwindow.ui.
def telsimui.applicationwindow.ApplicationWindow.on_actionExit_triggered | ( | self | ) |
Action Slots implementation ##.
Slot that auto-connects to the actionExit. actionExit is not declared in the code, but in the mainwindow.ui.
It is up to the developer to implement its behaviour. In this case we call qApp.exit(), where qApp is a global reference to the TaurusApplication or QApplication.
The actionExit must be manually triggered by the user, through a menu, toolbar button.
def telsimui.applicationwindow.ApplicationWindow.on_actionHmsDms_triggered | ( | self | ) |
Slot that auto-connects to the actionHmsDms.
actionHmsDms is not declared in the code, but in the mainwindow.ui.
def telsimui.applicationwindow.ApplicationWindow.on_actionLicenses_triggered | ( | self | ) |
Slot that auto-connects to the actionLicenses.
actionLicenses is not declared in the code, but in the mainwindow.ui.
def telsimui.applicationwindow.ApplicationWindow.on_actionManual_triggered | ( | self | ) |
Slot that auto-connects to the actionManual.
actionManual is not declared in the code, but in the mainwindow.ui.
def telsimui.applicationwindow.ApplicationWindow.on_actionRadians_triggered | ( | self | ) |
Slot that auto-connects to the actionRadians.
actionRadians is not declared in the code, but in the mainwindow.ui.
def telsimui.applicationwindow.ApplicationWindow.on_actionServerAutoconnect_triggered | ( | self | ) |
Slot that auto-connects to the QAction actionServerAutoconnect.
actionServerAutoconnect is not declared in the code, but in the mainwindow.ui.
def telsimui.applicationwindow.ApplicationWindow.on_actionServerConnect_triggered | ( | self | ) |
Server (dis)connection slots ##.
Slot that auto-connects to the QAction actionServerConnect. actionServerConnect is not declared in the code, but in the mainwindow.ui.
def telsimui.applicationwindow.ApplicationWindow.on_actionServerDisconnect_triggered | ( | self | ) |
Slot that auto-connects to the QAction actionServerDisconnect.
actionServerDisconnect is not declared in the code, but in the mainwindow.ui.
def telsimui.applicationwindow.ApplicationWindow.on_actionTelescopeState_triggered | ( | self | ) |
Slot that auto-connects to the actionTelescopeState.
actionTelescopeState will create a new window with the QeStateList Widget inside.
def telsimui.applicationwindow.ApplicationWindow.on_actionWhats_This_triggered | ( | self | ) |
Slot that auto-connects to the actionWhats_This.
actionWhats_This is not declared in the code, but in the mainwindow.ui.
def telsimui.applicationwindow.ApplicationWindow.on_server_connection_changed | ( | self, | |
state | |||
) |
Slot that connects to each QProcess instanciated based on the process configured.
It handles the visibility and permissions to change pages/widgets inside the main_window instance. All this analyses is based on all facades connections status.
state | Connection status from the QProcess that emitted the signal |
telsimui.applicationwindow.ApplicationWindow.active_tool_processes |
telsimui.applicationwindow.ApplicationWindow.launcherMenu |
telsimui.applicationwindow.ApplicationWindow.telescopeStateDialog |
telsimui.applicationwindow.ApplicationWindow.ui |