Computer Assisted Medical Intervention Tool Kit  version 6.0
Loading...
Searching...
No Matches
ImpMainWindow Class Reference

This Class describes the "historical" imp application. More...

#include <ImpMainWindow.h>

Public Slots

file menu slot
void openDataDirectory (QString plugin)
viewers' slot
virtual void refresh () override
View menu slots
Note
everything that is linked to the InteractiveViewer has to be managed by the view (in case there is more than one InteractiveViewer)
void toggleMenuBar ()
 show or hide the menu bar
void resetWindows ()
 reset all windows in their initial state
void showStatusBar (bool)
 show or hide the status bar
void saveHistoryAsSCXML ()
 Save the history of action as a SCXML file.
Edit menu slots
void editSettings ()
Public Slots inherited from camitk::MainWindow
virtual void refresh ()
void show ()
 inherited from QWidget, just to refresh all viewers

Public Member Functions

general
 ImpMainWindow ()
void aboutToShow () override
 overriden from MainWindow to automatically load last opened document if needed
virtual ~ImpMainWindow ()
 destructor
open a top-level component
virtual void addDockViewer (Qt::DockWidgetArea, camitk::Viewer *) override final
 add a Viewer to the application as a docking widget and specify where it has to be docked MainWindow takes the hand on the Viewer (it will be deleted when MainWindow is deleted).
virtual void setCentralViewer (camitk::Viewer *) override final
 set the central Viewer of the application.
virtual void redirectToConsole (bool) override
 use or not the application console (overriden to add an action to show the console window)
Public Member Functions inherited from camitk::MainWindow
 MainWindow (QString title)
 Constructor, the window title can be changed here, it is inconsistent to use setWindowTitle().
 ~MainWindow () override
 destructor
QString getName () const
 Get the main window title.
void setWindowSubtitle (QString)
 The subtitle is situated at the end of the title, on the title bar, is helps for example showing which file is currently selected.
QProgressBar * getProgressBar ()
 similar as statusBar() from QMainWindow but for the progress bar
void showStatusBar (bool)
 show the status bar (by default it is hidden)
void showConsole (bool)
 get the console window
bool getConsoleVisibility ()
 get the visibility state of the console (
virtual void initSettings ()
void saveSettings ()
 Save MainWindow's settings into Application::settings.
virtual void showDockViewer (Viewer *, bool)
 set the visibility for the given docked viewer
void refreshViewers ()
 Method uses to refresh all the viewer of the Main Window.
virtual ViewergetCentralViewer () const

initialization/update methods

void updateViewMenu ()
void updateOpenDirectoryMenu ()
 update the open data directory menu depending on registered plugins
void updateRecentDocumentsMenu ()
 update the recent document menu
void updateActionStates ()
 set the current QAction enable state depending on the current selection, also update the dev menu
void initActions ()
 initializes all QActions of the application

Additional Inherited Members

Protected Member Functions inherited from camitk::MainWindow
void closeEvent (QCloseEvent *) override
 overriden from QMainWindow, just connect to slotFileQuit
void dragEnterEvent (QDragEnterEvent *event) override
 called when a drag event started on the main window, accept drag only if file is MIME type text/uri-list
void dragLeaveEvent (QDragLeaveEvent *event) override
 called when the mouse leaves the widgets area during a drag/drop operation
void dragMoveEvent (QDragMoveEvent *event) override
 called when the mouse moves inside the widgets area during a drag/drop operation
void dropEvent (QDropEvent *event) override
 just call open with the dragged uri
Protected Attributes inherited from camitk::MainWindow
ViewercentralViewer
 The actual central Viewer.
QList< Viewer * > viewers
QMap< Viewer *, QDockWidget * > dockWidgetMap
 the map that gives the corresponding QDockWidget for a given Viewer

Detailed Description

This Class describes the "historical" imp application.

It is a classical desktop application, with menubar and statusbar.

Constructor & Destructor Documentation

◆ ImpMainWindow()

◆ ~ImpMainWindow()

ImpMainWindow::~ImpMainWindow ( )
virtual

destructor

Member Function Documentation

◆ aboutToShow()

void ImpMainWindow::aboutToShow ( )
overridevirtual

◆ addDockViewer()

void ImpMainWindow::addDockViewer ( Qt::DockWidgetArea dockingArea,
camitk::Viewer * theViewer )
finaloverridevirtual

add a Viewer to the application as a docking widget and specify where it has to be docked MainWindow takes the hand on the Viewer (it will be deleted when MainWindow is deleted).

This method calls addViewer(...).

Reimplemented from camitk::MainWindow.

References camitk::MainWindow::addDockViewer(), and updateViewMenu().

Referenced by ImpMainWindow(), and updateViewMenu().

◆ editSettings

void ImpMainWindow::editSettings ( )
slot

◆ initActions()

void ImpMainWindow::initActions ( )
protected

initializes all QActions of the application

References camitk::Application::getActions().

Referenced by ImpMainWindow().

◆ openDataDirectory

void ImpMainWindow::openDataDirectory ( QString plugin)
slot

open a data directory, "called" from the fileOpenDataDirectoryMenu

References camitk::Application::getLastUsedDirectory(), camitk::MainWindow::getProgressBar(), camitk::Application::openDirectory(), and refresh().

Referenced by updateOpenDirectoryMenu().

◆ redirectToConsole()

void ImpMainWindow::redirectToConsole ( bool visible)
overridevirtual

use or not the application console (overriden to add an action to show the console window)

Reimplemented from camitk::MainWindow.

References camitk::MainWindow::redirectToConsole().

◆ refresh

void ImpMainWindow::refresh ( )
overridevirtualslot

this slot is connected to all the viewers selectionChanged() signal, this will call the refresh method of all viewers but whoIsAsking

References camitk::MainWindow::refresh(), updateActionStates(), and updateRecentDocumentsMenu().

Referenced by openDataDirectory().

◆ resetWindows

void ImpMainWindow::resetWindows ( )
slot

reset all windows in their initial state

References camitk::MainWindow::dockWidgetMap, camitk::Application::getViewer(), and showStatusBar().

◆ saveHistoryAsSCXML

void ImpMainWindow::saveHistoryAsSCXML ( )
slot

Save the history of action as a SCXML file.

References camitk::Application::saveHistoryAsSCXML().

◆ setCentralViewer()

void ImpMainWindow::setCentralViewer ( camitk::Viewer * theViewer)
finaloverridevirtual

set the central Viewer of the application.

MainWindow takes the hand on the Viewer (it will be deleted when MainWindow is deleted) This method calls addViewer(...).

Reimplemented from camitk::MainWindow.

References camitk::MainWindow::setCentralViewer(), and updateViewMenu().

Referenced by ImpMainWindow(), and updateViewMenu().

◆ showStatusBar

void ImpMainWindow::showStatusBar ( bool b)
slot

show or hide the status bar

References camitk::MainWindow::showStatusBar().

Referenced by ImpMainWindow(), and resetWindows().

◆ toggleMenuBar

void ImpMainWindow::toggleMenuBar ( )
slot

show or hide the menu bar

References CAMITK_WARNING.

◆ updateActionStates()

void ImpMainWindow::updateActionStates ( )
protected

◆ updateOpenDirectoryMenu()

void ImpMainWindow::updateOpenDirectoryMenu ( )
protected

update the open data directory menu depending on registered plugins

References camitk::ExtensionManager::getDataDirectoryExtNames(), and openDataDirectory().

Referenced by editSettings().

◆ updateRecentDocumentsMenu()

void ImpMainWindow::updateRecentDocumentsMenu ( )
protected

◆ updateViewMenu()


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