Computer Assisted Medical Intervention Tool Kit  version 5.1
ImpMainWindow.h
Go to the documentation of this file.
1/*****************************************************************************
2 * $CAMITK_LICENCE_BEGIN$
3 *
4 * CamiTK - Computer Assisted Medical Intervention ToolKit
5 * (c) 2001-2023 Univ. Grenoble Alpes, CNRS, Grenoble INP, TIMC, 38000 Grenoble, France
6 *
7 * Visit http://camitk.imag.fr for more information
8 *
9 * This file is part of CamiTK.
10 *
11 * CamiTK is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * CamiTK is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
22 *
23 * $CAMITK_LICENCE_END$
24 ****************************************************************************/
25
26
27#ifndef IMP_MAINWINDOW_H
28#define IMP_MAINWINDOW_H
29
30
31// -- Core stuff
32#include <MainWindow.h>
33#include <Application.h>
34
44 Q_OBJECT
45
46public:
47
52
54 void aboutToShow() override;
55
57 virtual ~ImpMainWindow();
58
61
66 virtual void addDockViewer(Qt::DockWidgetArea, camitk::Viewer*) override final;
67
72 virtual void setCentralViewer(camitk::Viewer*) override final;
73
75 virtual void redirectToConsole(bool) override;
77
78public slots:
79
83 void openDataDirectory(QString plugin);
85
89 virtual void refresh() override;
91
96
98 void showToolbar(bool);
99
101 void toggleMenuBar();
102
104 void resetWindows();
105
107 void showStatusBar(bool);
108
110 void saveHistoryAsSCXML();
111
113
117 void editSettings();
118
120
121protected:
122
126 void updateViewMenu();
127
130
133
135 void updateActionStates();
136
138 void initActions();
140
142 QToolBar* mainToolbar;
143
144private:
145
148
150 void initMenuBar();
151
155 void initToolBar();
157
160
161 QMenu* fileMenu;
162 QMenu* fileOpenDataDirectoryMenu;
163 QAction* fileOpen;
164 QAction* fileClose;
165 QAction* fileCloseAll;
166 QAction* fileSave;
167 QAction* fileSaveAs;
168 QAction* fileSaveAll;
169 QAction* fileQuit;
170
173
174 QMenu* viewMenu;
175 QAction* viewMenuBar;
176 QAction* viewStatusBar;
177 QAction* viewResetWindows;
179
183 QAction* editApplicationSettings;
184 QAction* editClearSelection;
185 QAction* saveHistory;
187
190
195 QMenu* actionMenu;
196
200 QAction* helpAboutApp;
201
203 QAction* helpShowConsole;
205
209 QAction* changeLanguage;
211
214
216 QList<QAction*> recentDocumentActions;
217
219 QAction* recentDocumentSeparator;
220
222
223
224private slots:
225
227 void openRecentDocuments();
228
229};
230
231#endif //IMP_MAINWINDOW_H
232
This Class describes the "historical" imp application.
Definition: ImpMainWindow.h:43
void toggleMenuBar()
show or hide the menu bar
Definition: ImpMainWindow.cpp:412
virtual void redirectToConsole(bool) override
use or not the application console (overriden to add an action to show the console window)
Definition: ImpMainWindow.cpp:623
void updateActionStates()
set the current QAction enable state depending on the current selection
Definition: ImpMainWindow.cpp:355
virtual ~ImpMainWindow()
destructor
Definition: ImpMainWindow.cpp:137
void updateOpenDirectoryMenu()
update the open data directory menu depending on registered plugins
Definition: ImpMainWindow.cpp:674
void editSettings()
Definition: ImpMainWindow.cpp:593
virtual void setCentralViewer(camitk::Viewer *) override final
set the central Viewer of the application.
Definition: ImpMainWindow.cpp:172
void openDataDirectory(QString plugin)
Definition: ImpMainWindow.cpp:481
void initActions()
initializes all QActions of the application
Definition: ImpMainWindow.cpp:179
virtual void refresh() override
Definition: ImpMainWindow.cpp:154
void aboutToShow() override
overriden from MainWindow to automatically load last opened document if needed
Definition: ImpMainWindow.cpp:141
void updateViewMenu()
Definition: ImpMainWindow.cpp:514
QToolBar * mainToolbar
the main toolbar
Definition: ImpMainWindow.h:142
void resetWindows()
reset all windows in their initial state
Definition: ImpMainWindow.cpp:432
void saveHistoryAsSCXML()
Save the history of action as a SCXML file.
Definition: ImpMainWindow.cpp:669
void updateRecentDocumentsMenu()
update the recent document menu
Definition: ImpMainWindow.cpp:648
void showToolbar(bool)
show or hide the toolbar
Definition: ImpMainWindow.cpp:407
void showStatusBar(bool)
show or hide the status bar
Definition: ImpMainWindow.cpp:427
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 ...
Definition: ImpMainWindow.cpp:165
ImpMainWindow()
Definition: ImpMainWindow.cpp:62
This class is the base class for your application.
Definition: MainWindow.h:66
Viewer is an abstract class that is the base class for all viewers.
Definition: Viewer.h:180