open_iA 2021.08
A tool for the visual analysis and processing of volumetric datasets, with a focus on industrial computed tomography.
Public Slots | Signals | Public Member Functions | Static Public Member Functions | List of all members
MainWindow Class Reference

Application main window, provides access to all global graphical user interface elements. More...

#include <mainwindow.h>

Inheritance diagram for MainWindow:
[legend]
Collaboration diagram for MainWindow:
[legend]

Public Slots

void loadLayout ()
 

Signals

void closing ()
 
void fullScreenToggled ()
 
- Signals inherited from iAMainWindow
void histogramAvailable ()
 
void styleChanged ()
 

Public Member Functions

 MainWindow (QString const &appName, QString const &version, QString const &buildInformation, QString const &splashImage)
 
 ~MainWindow () override
 
template<typename T >
T * activeChild ()
 Get the active child window of type T. More...
 
QMdiSubWindow * activeChild () override
 Return the QMdiSubWindow for the current child. More...
 
iAMdiChildactiveMdiChild () override
 Provides access to the currently active mdi child, if such is available. More...
 
QMdiSubWindow * addSubWindow (QWidget *child) override
 add a new widget as sub window in the mdi area, and return the respective mdi subwindow. More...
 
bool brightMode () const override
 whether the current qss theme is bright mode (true) or dark mode (false) More...
 
template<typename T >
QList< T * > childList (QMdiArea::WindowOrder order=QMdiArea::CreationOrder)
 Get the list of current child windows of type T. More...
 
void closeAllSubWindows () override
 Close all child windows (with a question whether sure if a child has modified data) More...
 
void closeMdiChild (iAMdiChild *child) override
 Close a child window. More...
 
iAMdiChildcreateMdiChild (bool unsavedChanges) override
 Create a new child window. More...
 
QString const & currentFile () const override
 
iAPreferences const & defaultPreferences () const
 
QMenu * fileMenu () override
 Get the File menu (can be used by modules to append entries to it). More...
 
QMenu * filtersMenu () override
 Get the Filters menu (can be used by modules to append entries to it). More...
 
QMenu * helpMenu () override
 Get the Help menu (can be used by modules to append entries to it). More...
 
void loadArguments (int argc, char **argv)
 
bool loadCamera (iAXmlSettings &xml)
 
void loadFile (QString const &fileName)
 
void loadFile (QString fileName, bool isStack) override
 load the file under the given filename in a new child window More...
 
void loadFiles (QStringList fileNames)
 
void loadPreferences (QDomNode preferencesNode)
 
void loadRenderSettings (QDomNode renderSettingsNode)
 
void loadSlicerSettings (QDomNode slicerSettingsNode)
 
void loadSliceViews (QDomNode sliceViewsNode)
 
void makeActionChildDependent (QAction *action) override
 mark a QAction (typically added to filters or tools menu by a module) as depending on an MDI child window being open and active More...
 
QList< iAMdiChild * > mdiChildList () override
 Get the list of current MdiChild windows. More...
 
QList< QString > mdiWindowTitles ()
 Get list of the titles of currently open MdiChild windows. More...
 
iAModuleDispatchermoduleDispatcher () const override
 retrieve the module dispatcher More...
 
QString const & path () const override
 Retrieve current directory path (the "working folder") More...
 
void saveCamera (iAXmlSettings &xml)
 
void savePreferences (iAXmlSettings &xml)
 
void saveRenderSettings (iAXmlSettings &xml)
 
void saveSlicerSettings (iAXmlSettings &xml)
 
void saveSliceView (QDomDocument &doc, QDomNode &sliceViewsNode, vtkCamera *ren, QString const &elemStr)
 
void saveSliceViews (iAXmlSettings &xml)
 
void saveTransferFunction (QDomDocument &doc, iATransferFunction *transferFunction)
 
iAMdiChildsecondNonActiveChild () override
 Provides access to a second loaded mdi child, if such is available. More...
 
void setCurrentFile (const QString &fileName)
 
void setPath (QString const &p) override
 Set current directory path (the "working folder") More...
 
QMenu * toolsMenu () override
 Get the Tools menu (can be used by modules to append entries to it). More...
 
void updateInteractionModeControls (int mode)
 
void updateMagicLens2DCheckState (bool enabled)
 
iAMdiChildresultChild (QString const &title) override
 
iAMdiChildresultChild (int childInd, QString const &title) override
 
iAMdiChildresultChild (iAMdiChild *oldChild, QString const &title) override
 

Static Public Member Functions

static void initResources ()
 
static int runGUI (int argc, char *argv[], QString const &appName, QString const &version, QString const &buildInformation, QString const &splashPath, QString const &iconPath)
 

Detailed Description

Application main window, provides access to all global graphical user interface elements.

Constructor & Destructor Documentation

◆ MainWindow()

MainWindow::MainWindow ( QString const &  appName,
QString const &  version,
QString const &  buildInformation,
QString const &  splashImage 
)

◆ ~MainWindow()

MainWindow::~MainWindow ( )
override

Member Function Documentation

◆ activeChild() [1/2]

template<typename T >
T * MainWindow::activeChild
virtual

Get the active child window of type T.

Implements iAMainWindow.

◆ activeChild() [2/2]

QMdiSubWindow * MainWindow::activeChild ( )
overridevirtual

Return the QMdiSubWindow for the current child.

Implements iAMainWindow.

◆ activeMdiChild()

iAMdiChild * MainWindow::activeMdiChild ( )
overridevirtual

Provides access to the currently active mdi child, if such is available.

Returns
pointer to the currently active mdi child, or nullptr if no child is currently open

Implements iAMainWindow.

◆ addSubWindow()

QMdiSubWindow * MainWindow::addSubWindow ( QWidget *  child)
overridevirtual

add a new widget as sub window in the mdi area, and return the respective mdi subwindow.

Implements iAMainWindow.

◆ brightMode()

bool MainWindow::brightMode ( ) const
overridevirtual

whether the current qss theme is bright mode (true) or dark mode (false)

Implements iAMainWindow.

◆ childList()

template<typename T >
QList< T * > MainWindow::childList ( QMdiArea::WindowOrder  order = QMdiArea::CreationOrder)

Get the list of current child windows of type T.

◆ closeAllSubWindows()

void MainWindow::closeAllSubWindows ( )
overridevirtual

Close all child windows (with a question whether sure if a child has modified data)

Implements iAMainWindow.

◆ closeMdiChild()

void MainWindow::closeMdiChild ( iAMdiChild child)
overridevirtual

Close a child window.

Implements iAMainWindow.

◆ closing

void MainWindow::closing ( )
signal

◆ createMdiChild()

iAMdiChild * MainWindow::createMdiChild ( bool  unsavedChanges)
overridevirtual

Create a new child window.

Implements iAMainWindow.

◆ currentFile()

QString const & MainWindow::currentFile ( ) const
overridevirtual
Deprecated:
. Use a specific mdichilds, or even better, an mdichilds dlg_modalities methods instead!

Implements iAMainWindow.

◆ defaultPreferences()

iAPreferences const & MainWindow::defaultPreferences ( ) const

◆ fileMenu()

QMenu * MainWindow::fileMenu ( )
overridevirtual

Get the File menu (can be used by modules to append entries to it).

Implements iAMainWindow.

◆ filtersMenu()

QMenu * MainWindow::filtersMenu ( )
overridevirtual

Get the Filters menu (can be used by modules to append entries to it).

Implements iAMainWindow.

◆ fullScreenToggled

void MainWindow::fullScreenToggled ( )
signal

◆ helpMenu()

QMenu * MainWindow::helpMenu ( )
overridevirtual

Get the Help menu (can be used by modules to append entries to it).

Implements iAMainWindow.

◆ initResources()

void MainWindow::initResources ( )
static

◆ loadArguments()

void MainWindow::loadArguments ( int  argc,
char **  argv 
)

◆ loadCamera()

bool MainWindow::loadCamera ( iAXmlSettings xml)

◆ loadFile() [1/2]

void MainWindow::loadFile ( QString const &  fileName)

◆ loadFile() [2/2]

void MainWindow::loadFile ( QString  fileName,
bool  isStack 
)
overridevirtual

load the file under the given filename in a new child window

Implements iAMainWindow.

◆ loadFiles()

void MainWindow::loadFiles ( QStringList  fileNames)

◆ loadLayout

void MainWindow::loadLayout ( )
slot

◆ loadPreferences()

void MainWindow::loadPreferences ( QDomNode  preferencesNode)

◆ loadRenderSettings()

void MainWindow::loadRenderSettings ( QDomNode  renderSettingsNode)

◆ loadSlicerSettings()

void MainWindow::loadSlicerSettings ( QDomNode  slicerSettingsNode)

◆ loadSliceViews()

void MainWindow::loadSliceViews ( QDomNode  sliceViewsNode)

◆ makeActionChildDependent()

void MainWindow::makeActionChildDependent ( QAction *  action)
overridevirtual

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.

◆ mdiChildList()

QList< iAMdiChild * > MainWindow::mdiChildList ( )
overridevirtual

Get the list of current MdiChild windows.

Implements iAMainWindow.

◆ mdiWindowTitles()

QList< QString > MainWindow::mdiWindowTitles ( )

Get list of the titles of currently open MdiChild windows.

◆ moduleDispatcher()

iAModuleDispatcher & MainWindow::moduleDispatcher ( ) const
overridevirtual

retrieve the module dispatcher

Implements iAMainWindow.

◆ path()

QString const & MainWindow::path ( ) const
overridevirtual

Retrieve current directory path (the "working folder")

Implements iAMainWindow.

◆ resultChild() [1/3]

iAMdiChild * MainWindow::resultChild ( iAMdiChild oldChild,
QString const &  title 
)
overridevirtual

Implements iAMainWindow.

◆ resultChild() [2/3]

iAMdiChild * MainWindow::resultChild ( int  childInd,
QString const &  title 
)
overridevirtual

Implements iAMainWindow.

◆ resultChild() [3/3]

iAMdiChild * MainWindow::resultChild ( QString const &  title)
overridevirtual

Get access to result child with the given title. (depending on preferences, this will either open a new mdi child window, or reuse the currently active one)

Implements iAMainWindow.

◆ runGUI()

int MainWindow::runGUI ( int  argc,
char *  argv[],
QString const &  appName,
QString const &  version,
QString const &  buildInformation,
QString const &  splashPath,
QString const &  iconPath 
)
static

◆ saveCamera()

void MainWindow::saveCamera ( iAXmlSettings xml)

◆ savePreferences()

void MainWindow::savePreferences ( iAXmlSettings xml)

◆ saveRenderSettings()

void MainWindow::saveRenderSettings ( iAXmlSettings xml)

◆ saveSlicerSettings()

void MainWindow::saveSlicerSettings ( iAXmlSettings xml)

◆ saveSliceView()

void MainWindow::saveSliceView ( QDomDocument &  doc,
QDomNode &  sliceViewsNode,
vtkCamera *  ren,
QString const &  elemStr 
)

◆ saveSliceViews()

void MainWindow::saveSliceViews ( iAXmlSettings xml)

◆ saveTransferFunction()

void MainWindow::saveTransferFunction ( QDomDocument &  doc,
iATransferFunction transferFunction 
)

◆ secondNonActiveChild()

iAMdiChild * MainWindow::secondNonActiveChild ( )
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.

Deprecated:
instead of this method, in filters, use the facilities provided in iAFilter (via the requiredInputs parameter to the constructor) to specify multiple inputs

Implements iAMainWindow.

◆ setCurrentFile()

void MainWindow::setCurrentFile ( const QString &  fileName)

◆ setPath()

void MainWindow::setPath ( QString const &  p)
overridevirtual

Set current directory path (the "working folder")

Implements iAMainWindow.

◆ toolsMenu()

QMenu * MainWindow::toolsMenu ( )
overridevirtual

Get the Tools menu (can be used by modules to append entries to it).

Implements iAMainWindow.

◆ updateInteractionModeControls()

void MainWindow::updateInteractionModeControls ( int  mode)

◆ updateMagicLens2DCheckState()

void MainWindow::updateMagicLens2DCheckState ( bool  enabled)

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