#include <MainWindow.hpp>
|
bool | _acceptedCloseEvent |
|
QLabel * | _pathLabel |
|
WizardEngine * | _wizard |
|
QLayout * | _wizardLayout |
|
QWidget * | _wizardPane |
|
A single instance of the MainWindow class is created and shown during application startup in the main() function. As the name implies, the class represents the application's main (and only) window. It provides the application menu and a status bar, and it hosts the wizard that guides the user through the creation and editing of SMILE datasets.
◆ MainWindow()
MainWindow::MainWindow |
( |
| ) |
|
The default (and only) constructor creates the GUI for the main window, including the application menu, a status bar, and the areas hosting the wizard. It also creates appropriate actions and connections to support the top-level events.
◆ browseUrl
void MainWindow::browseUrl |
( |
| ) |
|
|
slot |
This function assumes that it is called from a signal, and that the sender QObject has a property named "URL" of type QString. The function retrieves the value of that property and then opens the specified URL in the user's default browser.
◆ closeEvent()
void MainWindow::closeEvent |
( |
QCloseEvent * |
event | ) |
|
|
overrideprotected |
This function is invoked when the user attempts to close the main window or to quit the application. If there are any unsaved changes, the function offers the user a chance to cancel the close or quit operation. Otherwise, or if the user decides to quit anyway, the function stores the main window's position and size for future reference and allows the application to exit.
◆ contextMenuEvent()
void MainWindow::contextMenuEvent |
( |
QContextMenuEvent * |
event | ) |
|
|
overrideprotected |
This function is invoked when the user ctrl-clicks or right-clicks in the window. It creates and shows a context menu with help options opening a relevant URL in the default browser.
◆ keyPressEvent()
void MainWindow::keyPressEvent |
( |
QKeyEvent * |
event | ) |
|
|
overrideprotected |
This function is invoked for key presses that aren't handled in a sub-pane. It handles the keyboard shortcuts for the advance and retreat actions.
◆ readSettings()
void MainWindow::readSettings |
( |
| ) |
|
|
private |
This function positions and resizes the main window according to the settings saved during the previous session.
◆ replaceWizardPane
void MainWindow::replaceWizardPane |
( |
| ) |
|
|
slot |
This function replaced the wizard pane displayed in the central area by a pane newly retrieved from the wizard engine.
◆ updateDirtyState
void MainWindow::updateDirtyState |
( |
| ) |
|
|
slot |
This function updates the window title bar to reflect the current dirty state, which can be retrieved from the wizard engine.
◆ updateTitle
void MainWindow::updateTitle |
( |
| ) |
|
|
slot |
This function updates the window title to reflect the current filename, which can be retrieved from the wizard engine.
◆ writeSettings()
void MainWindow::writeSettings |
( |
| ) |
|
|
private |
This function saves the current position and size of the main window so that the information can be used to reproduce the same configuration in a future session.
The documentation for this class was generated from the following file: