Computer Assited Medical Intervention Tool Kit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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-2013 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>
33 #include <Explorer.h>
34 #include <PropertyExplorer.h>
35 
36 using namespace camitk;
37 
38 // -- QT stuff classes
39 // class QTextEdit;
40 // class QProgressBar;
41 
46 class ImpMainWindow : public MainWindow {
47  Q_OBJECT
48 
49 public:
50 
54  ImpMainWindow();
55 
57  void aboutToShow();
58 
60  virtual ~ImpMainWindow();
61 
64 
69  virtual void addDockViewer(Qt::DockWidgetArea, Viewer*);
70 
75  virtual void setCentralViewer(Viewer*);
76 
78  virtual void redirectToConsole(bool);
80 
81 public slots:
82 
86  void openDirectory(QAction *);
88 
92  virtual void refresh();
94 
98 
99 
101  void showToolbar(bool);
102 
104  void showMenuBar(bool);
105 
107  void resetWindows();
108 
110  void showStatusBar(bool);
111 
113 
115 
116 
117  void editSettings();
118 
120 
121 protected:
123  void updateViewMenu();
124 
126 
127 
128  void updateOpenDirectoryMenu();
129 
131  void updateRecentDocumentsMenu();
133 
135 
136 
137  void updateActionStates();
139 
141  void initActions();
142 
144  QToolBar *mainToolbar;
145 
147  virtual void initSettings();
148 
149 private:
150 
152 
153 
155  void initMenuBar();
156 
160  void initToolBar();
162 
168 
170 
171 
172  QMenu *fileMenu;
174  QAction *fileOpen;
175  QAction *fileClose;
176  QAction *fileCloseAll;
177  QAction *fileSave;
178  QAction *fileSaveAs;
179  QAction *fileSaveAll;
180  QAction *fileQuit;
181 
183 
184 
185  QMenu *viewMenu;
186  QAction *viewMenuBar;
187  QAction *viewStatusBar;
190 
192 
193 
197 
199 
200 
205  QMenu *actionMenu;
206 
208 
209 
210  QAction *helpAboutApp;
211 
213  QAction *helpShowConsole;
215 
220 
222  QList<QAction*> recentDocumentActions;
223 
226 
228 private slots:
229 
231  void openRecentDocuments();
232 
233 };
234 
235 #endif //IMP_MAINWINDOW_H
236