Slicer  5.3
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Types | Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes
qSlicerMainWindow Class Reference

#include <Base/QTApp/qSlicerMainWindow.h>

Inheritance diagram for qSlicerMainWindow:
Inheritance graph
[legend]
Collaboration diagram for qSlicerMainWindow:
Collaboration graph
[legend]

Public Types

typedef QMainWindow Superclass
 

Public Slots

virtual void addFileToRecentFiles (const qSlicerIO::IOProperties &fileProperties)
 
virtual void on_CopyAction_triggered ()
 
virtual void on_CutAction_triggered ()
 
virtual void on_EditApplicationSettingsAction_triggered ()
 
virtual void on_EditPlayMacroAction_triggered ()
 
virtual void on_EditRecordMacroAction_triggered ()
 
virtual void on_EditRedoAction_triggered ()
 
virtual void on_EditUndoAction_triggered ()
 
virtual void on_FavoriteModulesChanged ()
 Refresh favorite modules toolbar from application settings. More...
 
virtual void on_FileAddDataAction_triggered ()
 
virtual void on_FileAddTransformAction_triggered ()
 
virtual void on_FileAddVolumeAction_triggered ()
 
virtual void on_FileCloseSceneAction_triggered ()
 
virtual void on_FileExitAction_triggered ()
 
virtual void on_FileFavoriteModulesAction_triggered ()
 
virtual void on_FileImportSceneAction_triggered ()
 
virtual void on_FileLoadDataAction_triggered ()
 
virtual void on_FileLoadSceneAction_triggered ()
 
virtual void on_FileSaveSceneAction_triggered ()
 
virtual void on_LoadDICOMAction_triggered ()
 
virtual void on_ModuleHomeAction_triggered ()
 
virtual void on_PasteAction_triggered ()
 
virtual void on_SDBSaveToDirectoryAction_triggered ()
 
virtual void on_SDBSaveToMRBAction_triggered ()
 
virtual void on_ShowStatusBarAction_triggered (bool)
 
virtual void on_ViewExtensionsManagerAction_triggered ()
 
virtual void on_WindowErrorLogAction_triggered ()
 
virtual void on_WindowToolbarsResetToDefaultAction_triggered ()
 
virtual void onFileRecentLoadedActionTriggered ()
 
virtual void onLayoutActionTriggered (QAction *action)
 
virtual void onLayoutCompareActionTriggered (QAction *action)
 
virtual void onLayoutCompareGridActionTriggered (QAction *action)
 
virtual void onLayoutCompareWidescreenActionTriggered (QAction *action)
 
virtual void onPythonConsoleToggled (bool)
 
virtual void restoreGUIState (bool force=false)
 
virtual void restoreToolbars ()
 
virtual void saveGUIState (bool force=false)
 
virtual void setHomeModuleCurrent ()
 
virtual void setLayout (int)
 Set the view layout. More...
 
virtual void setLayoutMaximizedViewNode (vtkMRMLAbstractViewNode *)
 
virtual void setLayoutNumberOfCompareViewColumns (int)
 
virtual void setLayoutNumberOfCompareViewRows (int)
 

Signals

void initialWindowShown ()
 

Public Member Functions

Q_INVOKABLE ctkErrorLogWidget * errorLogWidget () const
 
Q_INVOKABLE vtkMRMLAbstractViewNodelayoutMaximizedViewNode ()
 Return the view node that is temporarily shown maximized in the view layout. More...
 
Q_INVOKABLE qSlicerModuleSelectorToolBarmoduleSelector () const
 
 qSlicerMainWindow (QWidget *parent=nullptr)
 
 ~qSlicerMainWindow () override
 

Protected Slots

virtual void onFileSaved (const qSlicerIO::IOProperties &fileProperties)
 
virtual void onLayoutChanged (int)
 
virtual void onModuleAboutToBeUnloaded (const QString &moduleName)
 
virtual void onModuleLoaded (const QString &moduleName)
 
virtual void onMRMLSceneModified (vtkObject *)
 
virtual void onNewFileLoaded (const qSlicerIO::IOProperties &fileProperties)
 
virtual void onWarningsOrErrorsOccurred (ctkErrorLogLevel::LogLevel logLevel)
 
void setExtensionUpdatesAvailable (bool updateAvailable)
 

Protected Member Functions

void changeEvent (QEvent *event) override
 
void closeEvent (QCloseEvent *event) override
 
virtual void disclaimer ()
 Open a popup to warn the user Slicer is not for clinical use. More...
 
void dragEnterEvent (QDragEnterEvent *event) override
 
void dropEvent (QDropEvent *event) override
 
bool eventFilter (QObject *object, QEvent *event) override
 
virtual void pythonConsoleInitialDisplay ()
 Open Python console if it was requested. More...
 
 qSlicerMainWindow (qSlicerMainWindowPrivate *pimpl, QWidget *parent)
 
virtual void setupMenuActions ()
 Connect MainWindow action with slots defined in MainWindowCore. More...
 
void showEvent (QShowEvent *event) override
 

Protected Attributes

QScopedPointer< qSlicerMainWindowPrivate > d_ptr
 

Detailed Description

Definition at line 43 of file qSlicerMainWindow.h.

Member Typedef Documentation

◆ Superclass

typedef QMainWindow qSlicerMainWindow::Superclass

Definition at line 47 of file qSlicerMainWindow.h.

Constructor & Destructor Documentation

◆ qSlicerMainWindow() [1/2]

qSlicerMainWindow::qSlicerMainWindow ( QWidget *  parent = nullptr)

◆ ~qSlicerMainWindow()

qSlicerMainWindow::~qSlicerMainWindow ( )
override

◆ qSlicerMainWindow() [2/2]

qSlicerMainWindow::qSlicerMainWindow ( qSlicerMainWindowPrivate *  pimpl,
QWidget *  parent 
)
protected

Member Function Documentation

◆ addFileToRecentFiles

virtual void qSlicerMainWindow::addFileToRecentFiles ( const qSlicerIO::IOProperties fileProperties)
virtualslot

◆ changeEvent()

void qSlicerMainWindow::changeEvent ( QEvent *  event)
overrideprotected

◆ closeEvent()

void qSlicerMainWindow::closeEvent ( QCloseEvent *  event)
overrideprotected

◆ disclaimer()

virtual void qSlicerMainWindow::disclaimer ( )
protectedvirtual

Open a popup to warn the user Slicer is not for clinical use.

◆ dragEnterEvent()

void qSlicerMainWindow::dragEnterEvent ( QDragEnterEvent *  event)
overrideprotected

Forward the dragEnterEvent to the IOManager which will decide if it could accept a drag/drop or not.

See also
dropEvent()

◆ dropEvent()

void qSlicerMainWindow::dropEvent ( QDropEvent *  event)
overrideprotected

Forward the dropEvent to the IOManager.

See also
dragEnterEvent()

◆ errorLogWidget()

Q_INVOKABLE ctkErrorLogWidget* qSlicerMainWindow::errorLogWidget ( ) const

Return a pointer to the error log widget.

See also
moduleSelector(), pythonConsole()

◆ eventFilter()

bool qSlicerMainWindow::eventFilter ( QObject *  object,
QEvent *  event 
)
overrideprotected

Reimplemented to catch activationChange/show/hide events. More specifically it allows to:

  1. update the state of the errorLog and python console QAction when associated dialog are visible or not.
  2. set the state of ErrorLog button based on the activation state of the error log dialog.

◆ initialWindowShown

void qSlicerMainWindow::initialWindowShown ( )
signal

Emitted when the window is first shown to the user.

See also
showEvent(QShowEvent *)

◆ layoutMaximizedViewNode()

Q_INVOKABLE vtkMRMLAbstractViewNode* qSlicerMainWindow::layoutMaximizedViewNode ( )

Return the view node that is temporarily shown maximized in the view layout.

◆ moduleSelector()

Q_INVOKABLE qSlicerModuleSelectorToolBar* qSlicerMainWindow::moduleSelector ( ) const

Return a pointer to the module selector toolbar that can change the current module.

See also
pythonConsole(), errorLogWidget()

◆ on_CopyAction_triggered

virtual void qSlicerMainWindow::on_CopyAction_triggered ( )
virtualslot

◆ on_CutAction_triggered

virtual void qSlicerMainWindow::on_CutAction_triggered ( )
virtualslot

◆ on_EditApplicationSettingsAction_triggered

virtual void qSlicerMainWindow::on_EditApplicationSettingsAction_triggered ( )
virtualslot

◆ on_EditPlayMacroAction_triggered

virtual void qSlicerMainWindow::on_EditPlayMacroAction_triggered ( )
virtualslot

◆ on_EditRecordMacroAction_triggered

virtual void qSlicerMainWindow::on_EditRecordMacroAction_triggered ( )
virtualslot

◆ on_EditRedoAction_triggered

virtual void qSlicerMainWindow::on_EditRedoAction_triggered ( )
virtualslot

◆ on_EditUndoAction_triggered

virtual void qSlicerMainWindow::on_EditUndoAction_triggered ( )
virtualslot

◆ on_FavoriteModulesChanged

virtual void qSlicerMainWindow::on_FavoriteModulesChanged ( )
virtualslot

Refresh favorite modules toolbar from application settings.

◆ on_FileAddDataAction_triggered

virtual void qSlicerMainWindow::on_FileAddDataAction_triggered ( )
virtualslot

◆ on_FileAddTransformAction_triggered

virtual void qSlicerMainWindow::on_FileAddTransformAction_triggered ( )
virtualslot

◆ on_FileAddVolumeAction_triggered

virtual void qSlicerMainWindow::on_FileAddVolumeAction_triggered ( )
virtualslot

◆ on_FileCloseSceneAction_triggered

virtual void qSlicerMainWindow::on_FileCloseSceneAction_triggered ( )
virtualslot

◆ on_FileExitAction_triggered

virtual void qSlicerMainWindow::on_FileExitAction_triggered ( )
virtualslot

◆ on_FileFavoriteModulesAction_triggered

virtual void qSlicerMainWindow::on_FileFavoriteModulesAction_triggered ( )
virtualslot

◆ on_FileImportSceneAction_triggered

virtual void qSlicerMainWindow::on_FileImportSceneAction_triggered ( )
virtualslot

◆ on_FileLoadDataAction_triggered

virtual void qSlicerMainWindow::on_FileLoadDataAction_triggered ( )
virtualslot

◆ on_FileLoadSceneAction_triggered

virtual void qSlicerMainWindow::on_FileLoadSceneAction_triggered ( )
virtualslot

◆ on_FileSaveSceneAction_triggered

virtual void qSlicerMainWindow::on_FileSaveSceneAction_triggered ( )
virtualslot

◆ on_LoadDICOMAction_triggered

virtual void qSlicerMainWindow::on_LoadDICOMAction_triggered ( )
virtualslot

◆ on_ModuleHomeAction_triggered

virtual void qSlicerMainWindow::on_ModuleHomeAction_triggered ( )
virtualslot

◆ on_PasteAction_triggered

virtual void qSlicerMainWindow::on_PasteAction_triggered ( )
virtualslot

◆ on_SDBSaveToDirectoryAction_triggered

virtual void qSlicerMainWindow::on_SDBSaveToDirectoryAction_triggered ( )
virtualslot

◆ on_SDBSaveToMRBAction_triggered

virtual void qSlicerMainWindow::on_SDBSaveToMRBAction_triggered ( )
virtualslot

◆ on_ShowStatusBarAction_triggered

virtual void qSlicerMainWindow::on_ShowStatusBarAction_triggered ( bool  )
virtualslot

◆ on_ViewExtensionsManagerAction_triggered

virtual void qSlicerMainWindow::on_ViewExtensionsManagerAction_triggered ( )
virtualslot

◆ on_WindowErrorLogAction_triggered

virtual void qSlicerMainWindow::on_WindowErrorLogAction_triggered ( )
virtualslot

◆ on_WindowToolbarsResetToDefaultAction_triggered

virtual void qSlicerMainWindow::on_WindowToolbarsResetToDefaultAction_triggered ( )
virtualslot

◆ onFileRecentLoadedActionTriggered

virtual void qSlicerMainWindow::onFileRecentLoadedActionTriggered ( )
virtualslot

◆ onFileSaved

virtual void qSlicerMainWindow::onFileSaved ( const qSlicerIO::IOProperties fileProperties)
protectedvirtualslot

◆ onLayoutActionTriggered

virtual void qSlicerMainWindow::onLayoutActionTriggered ( QAction *  action)
virtualslot

◆ onLayoutChanged

virtual void qSlicerMainWindow::onLayoutChanged ( int  )
protectedvirtualslot

◆ onLayoutCompareActionTriggered

virtual void qSlicerMainWindow::onLayoutCompareActionTriggered ( QAction *  action)
virtualslot

◆ onLayoutCompareGridActionTriggered

virtual void qSlicerMainWindow::onLayoutCompareGridActionTriggered ( QAction *  action)
virtualslot

◆ onLayoutCompareWidescreenActionTriggered

virtual void qSlicerMainWindow::onLayoutCompareWidescreenActionTriggered ( QAction *  action)
virtualslot

◆ onModuleAboutToBeUnloaded

virtual void qSlicerMainWindow::onModuleAboutToBeUnloaded ( const QString &  moduleName)
protectedvirtualslot

◆ onModuleLoaded

virtual void qSlicerMainWindow::onModuleLoaded ( const QString &  moduleName)
protectedvirtualslot

◆ onMRMLSceneModified

virtual void qSlicerMainWindow::onMRMLSceneModified ( vtkObject *  )
protectedvirtualslot

◆ onNewFileLoaded

virtual void qSlicerMainWindow::onNewFileLoaded ( const qSlicerIO::IOProperties fileProperties)
protectedvirtualslot

◆ onPythonConsoleToggled

virtual void qSlicerMainWindow::onPythonConsoleToggled ( bool  )
virtualslot

◆ onWarningsOrErrorsOccurred

virtual void qSlicerMainWindow::onWarningsOrErrorsOccurred ( ctkErrorLogLevel::LogLevel  logLevel)
protectedvirtualslot

◆ pythonConsoleInitialDisplay()

virtual void qSlicerMainWindow::pythonConsoleInitialDisplay ( )
protectedvirtual

Open Python console if it was requested.

◆ restoreGUIState

virtual void qSlicerMainWindow::restoreGUIState ( bool  force = false)
virtualslot

Read GUI state from application settings and update the user interface accordingly.

See also
saveGUIState()

◆ restoreToolbars

virtual void qSlicerMainWindow::restoreToolbars ( )
virtualslot

◆ saveGUIState

virtual void qSlicerMainWindow::saveGUIState ( bool  force = false)
virtualslot

Write GUI state to application settings.

GUI state includes:

  • main window state and geometry (only if MainWindow/geometry application setting is enabled or force argument is set to true)
  • current view layout ID
  • favorite modules
  • recently loaded files
See also
restoreGUIState()

◆ setExtensionUpdatesAvailable

void qSlicerMainWindow::setExtensionUpdatesAvailable ( bool  updateAvailable)
protectedslot

◆ setHomeModuleCurrent

virtual void qSlicerMainWindow::setHomeModuleCurrent ( )
virtualslot

◆ setLayout

virtual void qSlicerMainWindow::setLayout ( int  )
virtualslot

Set the view layout.

◆ setLayoutMaximizedViewNode

virtual void qSlicerMainWindow::setLayoutMaximizedViewNode ( vtkMRMLAbstractViewNode )
virtualslot

Makes a view displayed maximized (taking the entire area) of the view layout. Setting the value to nullptr restores the original view layout.

◆ setLayoutNumberOfCompareViewColumns

virtual void qSlicerMainWindow::setLayoutNumberOfCompareViewColumns ( int  )
virtualslot

◆ setLayoutNumberOfCompareViewRows

virtual void qSlicerMainWindow::setLayoutNumberOfCompareViewRows ( int  )
virtualslot

◆ setupMenuActions()

virtual void qSlicerMainWindow::setupMenuActions ( )
protectedvirtual

Connect MainWindow action with slots defined in MainWindowCore.

◆ showEvent()

void qSlicerMainWindow::showEvent ( QShowEvent *  event)
overrideprotected

Member Data Documentation

◆ d_ptr

QScopedPointer<qSlicerMainWindowPrivate> qSlicerMainWindow::d_ptr
protected

Definition at line 199 of file qSlicerMainWindow.h.


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