|
open_iA 2024.7
|
Application main window; implementation of iAMainWindow interface. More...
#include <mainwindow.h>
Public Slots | |
| void | loadLayout () |
| void | slicerSettings () |
Signals | |
| void | closing () |
| void | fullScreenToggled () |
Signals inherited from iAMainWindow | |
| void | childChanged () |
| Triggered whenever the active child window has changed. | |
| void | childCreated (iAMdiChild *) |
| Triggered whenever a new iAMdiChild instance is created. | |
| void | styleChanged () |
| Triggered whenever the user has changed the style of the program (bright/dark/...) via the preferences. | |
Public Member Functions | |
| MainWindow (QString const &appName, QString const &version, QString const &buildInformation, QString const &splashImage, QSplashScreen &splashScreen, iADockWidgetWrapper *dwJobs) | |
| ~MainWindow () override | |
| template<typename T > | |
| T * | activeChild () |
| Get the active child window of type T. | |
| QMdiSubWindow * | activeChild () override |
| Return the QMdiSubWindow for the current child. | |
| iAMdiChild * | activeMdiChild () override |
| Provides access to the currently active mdi child, if such is available. | |
| void | addActionIcon (QAction *action, QString const &iconName) override |
| add an icon to an action (and keep the action for that icon up-to-date if the style changes | |
| void | addRecentFile (const QString &fileName) |
| add a file to the list of recently loaded/saved files | |
| QMdiSubWindow * | addSubWindow (QWidget *child) override |
| add a new widget as sub window in the mdi area, and return the respective mdi subwindow. | |
| bool | brightMode () const |
| whether the current qss theme is bright mode (true) or dark mode (false) | |
| template<typename T > | |
| QList< T * > | childList (QMdiArea::WindowOrder order=QMdiArea::CreationOrder) |
| Get the list of current child windows of type T. | |
| void | closeAllSubWindows () override |
| Close all child windows (with a question whether sure if a child has modified data) | |
| void | closeMdiChild (iAMdiChild *child) override |
| Close a child window. | |
| iAMdiChild * | createMdiChild (bool unsavedChanges) override |
| Create a new child window. | |
| iAPreferences const & | defaultPreferences () const override |
| retrieve the default preferences. | |
| QMenu * | editMenu () override |
| Get the File menu (can be used by modules to append entries to it). | |
| QMenu * | fileMenu () override |
| Get the File menu (can be used by modules to append entries to it). | |
| QMenu * | filtersMenu () override |
| Get the Filters menu (can be used by modules to append entries to it). | |
| QMenu * | helpMenu () override |
| Get the Help menu (can be used by modules to append entries to it). | |
| void | loadFile (QString const &fileName, std::shared_ptr< iAChildSource > childSrc, std::shared_ptr< iAFileIO > io=nullptr) override |
| see iAMainWindow::loadFile | |
| void | loadFiles (QStringList fileNames, std::shared_ptr< iAChildSource > childSrc) |
| Opens multiple files in an existing or new window. | |
| void | makeActionChildDependent (QAction *action) override |
| retrieve default renderer settings. | |
| QList< iAMdiChild * > | mdiChildList () override |
| Get the list of current MdiChild windows. | |
| QList< QString > | mdiWindowTitles () |
| Get list of the titles of currently open MdiChild windows. | |
| iAModuleDispatcher & | moduleDispatcher () const override |
| retrieve the module dispatcher | |
| QString const & | path () const override |
| Retrieve current directory path (the "working folder") | |
| iAMdiChild * | secondNonActiveChild () override |
| Provides access to a second loaded mdi child, if such is available. | |
| void | setPath (QString const &p) override |
| Set current directory path (the "working folder") | |
| QMenu * | toolsMenu () override |
| Get the Tools menu (can be used by modules to append entries to it). | |
| void | updateInteractionModeControls (int mode) |
| void | updateMagicLens2DCheckState (bool enabled) |
Static Public Member Functions | |
| static int | runGUI (int argc, char *argv[], QString const &appName, QString const &version, QString const &buildInformation, QString const &splashPath, QString const &iconPath) |
Static Public Member Functions inherited from iAMainWindow | |
| static iAMainWindow * | get () |
| Access to the main window (more or less singleton);. | |
Additional Inherited Members | |
Static Protected Attributes inherited from iAMainWindow | |
| static iAMainWindow * | m_mainWnd = nullptr |
| the one main window | |
Application main window; implementation of iAMainWindow interface.
| MainWindow::MainWindow | ( | QString const & | appName, |
| QString const & | version, | ||
| QString const & | buildInformation, | ||
| QString const & | splashImage, | ||
| QSplashScreen & | splashScreen, | ||
| iADockWidgetWrapper * | dwJobs ) |
|
override |
|
virtual |
Get the active child window of type T.
Implements iAMainWindow.
|
overridevirtual |
Return the QMdiSubWindow for the current child.
Implements iAMainWindow.
|
overridevirtual |
Provides access to the currently active mdi child, if such is available.
Implements iAMainWindow.
|
overridevirtual |
add an icon to an action (and keep the action for that icon up-to-date if the style changes
Implements iAMainWindow.
| void MainWindow::addRecentFile | ( | const QString & | fileName | ) |
add a file to the list of recently loaded/saved files
|
overridevirtual |
add a new widget as sub window in the mdi area, and return the respective mdi subwindow.
Implements iAMainWindow.
| bool MainWindow::brightMode | ( | ) | const |
whether the current qss theme is bright mode (true) or dark mode (false)
| QList< T * > MainWindow::childList | ( | QMdiArea::WindowOrder | order = QMdiArea::CreationOrder | ) |
Get the list of current child windows of type T.
|
overridevirtual |
Close all child windows (with a question whether sure if a child has modified data)
Implements iAMainWindow.
|
overridevirtual |
Close a child window.
Implements iAMainWindow.
|
signal |
|
overridevirtual |
Create a new child window.
Implements iAMainWindow.
|
overridevirtual |
retrieve the default preferences.
Implements iAMainWindow.
|
overridevirtual |
Get the File menu (can be used by modules to append entries to it).
Implements iAMainWindow.
|
overridevirtual |
Get the File menu (can be used by modules to append entries to it).
Implements iAMainWindow.
|
overridevirtual |
Get the Filters menu (can be used by modules to append entries to it).
Implements iAMainWindow.
|
signal |
|
overridevirtual |
Get the Help menu (can be used by modules to append entries to it).
Implements iAMainWindow.
|
overridevirtual |
| io | determine a specific IO to use for loading the file |
Implements iAMainWindow.
| void MainWindow::loadFiles | ( | QStringList | fileNames, |
| std::shared_ptr< iAChildSource > | childSrc ) |
Opens multiple files in an existing or new window.
| fileNames | the list of the file names of the files to load |
| childSrc | a source for a child window to load the files into. If nullptr, a new window is created for each file |
|
slot |
|
overridevirtual |
retrieve default renderer settings.
mark a QAction (typically added to filters or tools menu by a module) as depending on an MDI child window being open and active
Implements iAMainWindow.
|
overridevirtual |
Get the list of current MdiChild windows.
Implements iAMainWindow.
| QList< QString > MainWindow::mdiWindowTitles | ( | ) |
Get list of the titles of currently open MdiChild windows.
|
overridevirtual |
retrieve the module dispatcher
Implements iAMainWindow.
|
overridevirtual |
Retrieve current directory path (the "working folder")
Implements iAMainWindow.
|
static |
|
overridevirtual |
Provides access to a second loaded mdi child, if such is available.
Will throw an error if none is available or more than two are loaded.
Implements iAMainWindow.
|
overridevirtual |
Set current directory path (the "working folder")
Implements iAMainWindow.
|
slot |
|
overridevirtual |
Get the Tools menu (can be used by modules to append entries to it).
Implements iAMainWindow.
| void MainWindow::updateInteractionModeControls | ( | int | mode | ) |
| void MainWindow::updateMagicLens2DCheckState | ( | bool | enabled | ) |