open_iA 2024.9
Loading...
Searching...
No Matches
iAMainWindow Class Referenceabstract

Abstract interface class for the application's main window, provides access to all global graphical user interface elements. More...

#include <iAMainWindow.h>

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

Signals

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

virtual QMdiSubWindow * activeChild ()=0
 Return the QMdiSubWindow for the current child.
 
virtual iAMdiChildactiveMdiChild ()=0
 Provides access to the currently active mdi child, if such is available.
 
virtual void addActionIcon (QAction *action, QString const &iconName)=0
 add an icon to an action (and keep the action for that icon up-to-date if the style changes
 
virtual QMdiSubWindow * addSubWindow (QWidget *child)=0
 add a new widget as sub window in the mdi area, and return the respective mdi subwindow.
 
virtual void closeAllSubWindows ()=0
 Close all child windows (with a question whether sure if a child has modified data)
 
virtual void closeMdiChild (iAMdiChild *child)=0
 Close a child window.
 
virtual iAMdiChildcreateMdiChild (bool unsavedChanges)=0
 Create a new child window.
 
virtual iAPreferences const & defaultPreferences () const =0
 retrieve the default preferences.
 
virtual QMenu * editMenu ()=0
 Get the File menu (can be used by modules to append entries to it).
 
virtual QMenu * fileMenu ()=0
 Get the File menu (can be used by modules to append entries to it).
 
virtual QMenu * filtersMenu ()=0
 Get the Filters menu (can be used by modules to append entries to it).
 
virtual QMenu * helpMenu ()=0
 Get the Help menu (can be used by modules to append entries to it).
 
virtual void loadFile (QString const &fileName, std::shared_ptr< iAChildSource > childSrc=nullptr, std::shared_ptr< iAFileIO > io=nullptr)=0
 Load a file, either into an existing child window or creating a new one.
 
virtual void makeActionChildDependent (QAction *action)=0
 retrieve default renderer settings.
 
virtual QList< iAMdiChild * > mdiChildList ()=0
 Get the list of current MdiChild windows.
 
virtual iAModuleDispatchermoduleDispatcher () const =0
 retrieve the module dispatcher
 
virtual QString const & path () const =0
 Retrieve current directory path (the "working folder")
 
virtual void setPath (QString const &p)=0
 Set current directory path (the "working folder")
 
virtual QMenu * toolsMenu ()=0
 Get the Tools menu (can be used by modules to append entries to it).
 

Static Public Member Functions

static iAMainWindowget ()
 Access to the main window (more or less singleton);.
 

Static Protected Attributes

static iAMainWindowm_mainWnd = nullptr
 the one main window
 

Detailed Description

Abstract interface class for the application's main window, provides access to all global graphical user interface elements.

Member Function Documentation

◆ activeChild()

virtual QMdiSubWindow * iAMainWindow::activeChild ( )
pure virtual

Return the QMdiSubWindow for the current child.

Implemented in MainWindow, and MainWindow.

◆ activeMdiChild()

virtual iAMdiChild * iAMainWindow::activeMdiChild ( )
pure virtual

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

Implemented in MainWindow.

◆ addActionIcon()

virtual void iAMainWindow::addActionIcon ( QAction * action,
QString const & iconName )
pure virtual

add an icon to an action (and keep the action for that icon up-to-date if the style changes

Implemented in MainWindow.

◆ addSubWindow()

virtual QMdiSubWindow * iAMainWindow::addSubWindow ( QWidget * child)
pure virtual

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

Implemented in MainWindow.

◆ childChanged

void iAMainWindow::childChanged ( )
signal

Triggered whenever the active child window has changed.

Use for example to adapt UI's depending on the current child (toolbars etc.)

◆ childCreated

void iAMainWindow::childCreated ( iAMdiChild * )
signal

Triggered whenever a new iAMdiChild instance is created.

◆ closeAllSubWindows()

virtual void iAMainWindow::closeAllSubWindows ( )
pure virtual

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

Implemented in MainWindow.

◆ closeMdiChild()

virtual void iAMainWindow::closeMdiChild ( iAMdiChild * child)
pure virtual

Close a child window.

Implemented in MainWindow.

◆ createMdiChild()

virtual iAMdiChild * iAMainWindow::createMdiChild ( bool unsavedChanges)
pure virtual

Create a new child window.

Implemented in MainWindow.

◆ defaultPreferences()

virtual iAPreferences const & iAMainWindow::defaultPreferences ( ) const
pure virtual

retrieve the default preferences.

Implemented in MainWindow.

◆ editMenu()

virtual QMenu * iAMainWindow::editMenu ( )
pure virtual

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

Implemented in MainWindow.

◆ fileMenu()

virtual QMenu * iAMainWindow::fileMenu ( )
pure virtual

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

Implemented in MainWindow.

◆ filtersMenu()

virtual QMenu * iAMainWindow::filtersMenu ( )
pure virtual

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

Implemented in MainWindow.

◆ get()

iAMainWindow * iAMainWindow::get ( )
static

Access to the main window (more or less singleton);.

◆ helpMenu()

virtual QMenu * iAMainWindow::helpMenu ( )
pure virtual

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

Implemented in MainWindow.

◆ loadFile()

virtual void iAMainWindow::loadFile ( QString const & fileName,
std::shared_ptr< iAChildSource > childSrc = nullptr,
std::shared_ptr< iAFileIO > io = nullptr )
pure virtual

Load a file, either into an existing child window or creating a new one.

Parameters
fileNamethe name of the file (project or dataset) to load
childSrcsource for the child to put the file into; see iAChildSource
iothe file io to be used when loading the file. If left at default value nullptr, the iAFileTypeRegistry will be consulted to create an io fitting for the given filename

Implemented in MainWindow.

◆ makeActionChildDependent()

virtual void iAMainWindow::makeActionChildDependent ( QAction * action)
pure virtual

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

Implemented in MainWindow.

◆ mdiChildList()

virtual QList< iAMdiChild * > iAMainWindow::mdiChildList ( )
pure virtual

Get the list of current MdiChild windows.

Implemented in MainWindow.

◆ moduleDispatcher()

virtual iAModuleDispatcher & iAMainWindow::moduleDispatcher ( ) const
pure virtual

retrieve the module dispatcher

Implemented in MainWindow.

◆ path()

virtual QString const & iAMainWindow::path ( ) const
pure virtual

Retrieve current directory path (the "working folder")

Implemented in MainWindow.

◆ setPath()

virtual void iAMainWindow::setPath ( QString const & p)
pure virtual

Set current directory path (the "working folder")

Implemented in MainWindow.

◆ styleChanged

void iAMainWindow::styleChanged ( )
signal

Triggered whenever the user has changed the style of the program (bright/dark/...) via the preferences.

◆ toolsMenu()

virtual QMenu * iAMainWindow::toolsMenu ( )
pure virtual

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

Implemented in MainWindow.

Member Data Documentation

◆ m_mainWnd

iAMainWindow * iAMainWindow::m_mainWnd = nullptr
staticprotected

the one main window


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