Computer Assited Medical Intervention Tool Kit  version 3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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-2014 UJF-Grenoble 1, CNRS, TIMC-IMAG UMR 5525 (GMCAO)
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>
42  Q_OBJECT
43 
44 public:
45 
49  ImpMainWindow();
50 
52  void aboutToShow();
53 
55  virtual ~ImpMainWindow();
56 
59 
64  virtual void addDockViewer(Qt::DockWidgetArea, camitk::Viewer*);
65 
70  virtual void setCentralViewer(camitk::Viewer*);
71 
73  virtual void redirectToConsole(bool);
75 
76 public slots:
77 
81  void openDirectory(QAction *);
83 
87  virtual void refresh();
89 
93 
96  void showToolbar(bool);
97 
99  void showMenuBar(bool);
100 
102  void resetWindows();
103 
105  void showStatusBar(bool);
106 
108  void saveHistoryAsSCXML();
109 
111 
113  void editSettings();
116 
118 
119 protected:
121  void updateViewMenu();
122 
127 
131 
133  void updateActionStates();
137 
139  void initActions();
140 
142  QToolBar *mainToolbar;
143 
145  virtual void initSettings();
146 
147 private:
148 
150 
153  void initMenuBar();
154 
158  void initToolBar();
160 
162 
164  QMenu *fileMenu;
166  QAction *fileOpen;
167  QAction *fileClose;
168  QAction *fileCloseAll;
169  QAction *fileSave;
170  QAction *fileSaveAs;
171  QAction *fileSaveAll;
172  QAction *fileQuit;
173 
175 
177  QMenu *viewMenu;
178  QAction *viewMenuBar;
179  QAction *viewStatusBar;
182 
184  QAction *editApplicationSettings;
188  QAction *saveHistory;
190 
192 
198  QMenu *actionMenu;
199 
201  QAction *helpAboutApp;
204 
206  QAction *helpShowConsole;
208 
213 
215  QList<QAction*> recentDocumentActions;
216 
219 
221 
222 
223 private slots:
224 
226  void openRecentDocuments();
227 
228 };
229 
230 #endif //IMP_MAINWINDOW_H
231 
QMenu * fileOpenDataDirectoryMenu
Definition: ImpMainWindow.h:165
QMenu * actionMenu
the actionMenu.
Definition: ImpMainWindow.h:198
QAction * fileSave
Definition: ImpMainWindow.h:169
void updateViewMenu()
update the viewer's menu
void saveHistoryAsSCXML()
Save the history of action as a SCXML file.
void aboutToShow()
overriden from MainWindow to automatically load last opened document if needed
void initMenuBar()
initMenuBar creates the menu_bar and inserts the menuitems
bool autoLoadLastOpened
Definition: ImpMainWindow.h:212
QAction * viewResetWindows
Definition: ImpMainWindow.h:180
QAction * saveHistory
Definition: ImpMainWindow.h:188
Viewer is an abstract viewer.
Definition: Viewer.h:55
virtual void refresh()
QAction * editApplicationSettings
Definition: ImpMainWindow.h:186
void openRecentDocuments()
open a given recent document
This Class is the base class for your application.
Definition: MainWindow.h:62
QAction * helpAboutApp
Definition: ImpMainWindow.h:203
QAction * fileSaveAs
Definition: ImpMainWindow.h:170
QMenu * fileMenu
file_menu contains all items of the menubar entry "File"
Definition: ImpMainWindow.h:164
void updateOpenDirectoryMenu()
void updateRecentDocumentsMenu()
update the recent document menu
QAction * recentDocumentSeparator
the separator between the last file menu action and the recent document actions
Definition: ImpMainWindow.h:218
virtual void initSettings()
init ImpMainWindow specific settings (e.g. autoLoadLastOpened)
void resetWindows()
reset all windows in their initial state
void openDirectory(QAction *)
QAction * viewStatusBar
Definition: ImpMainWindow.h:179
QAction * viewMenuBar
Definition: ImpMainWindow.h:178
void showStatusBar(bool)
show or hide the status bar
void showToolbar(bool)
show or hide the toolbar
virtual void redirectToConsole(bool)
use or not the application console (overriden to add an action to show the console window) ...
QToolBar * mainToolbar
the main toolbar
Definition: ImpMainWindow.h:142
QAction * fileSaveAll
Definition: ImpMainWindow.h:171
QAction * fileOpen
Definition: ImpMainWindow.h:166
virtual void addDockViewer(Qt::DockWidgetArea, camitk::Viewer *)
add a Viewer to the application as a docking widget and specify where it has to be docked MainWindow ...
QAction * helpShowConsole
action for the show console
Definition: ImpMainWindow.h:206
void initActions()
initializes all QActions of the application
void showMenuBar(bool)
show or hide the menu bar
QMenu * viewMenu
view_menu contains all items of the menubar entry "View"
Definition: ImpMainWindow.h:177
void updateActionStates()
virtual void setCentralViewer(camitk::Viewer *)
set the central Viewer of the application.
void initToolBar()
this creates the toolbars.
QAction * fileQuit
Definition: ImpMainWindow.h:172
This Class describes the "historical" imp application.
Definition: ImpMainWindow.h:41
QAction * fileClose
Definition: ImpMainWindow.h:167
virtual ~ImpMainWindow()
destructor
QList< QAction * > recentDocumentActions
list of all the possible recent documents actions
Definition: ImpMainWindow.h:215
void editSettings()
QAction * editClearSelection
Definition: ImpMainWindow.h:187
QAction * fileCloseAll
Definition: ImpMainWindow.h:168