anatomist  5.1.2
3D neuroimaging data viewer
wControl.h
Go to the documentation of this file.
1 /* This software and supporting documentation are distributed by
2  * Institut Federatif de Recherche 49
3  * CEA/NeuroSpin, Batiment 145,
4  * 91191 Gif-sur-Yvette cedex
5  * France
6  *
7  * This software is governed by the CeCILL-B license under
8  * French law and abiding by the rules of distribution of free software.
9  * You can use, modify and/or redistribute the software under the
10  * terms of the CeCILL-B license as circulated by CEA, CNRS
11  * and INRIA at the following URL "http://www.cecill.info".
12  *
13  * As a counterpart to the access to the source code and rights to copy,
14  * modify and redistribute granted by the license, users are provided only
15  * with a limited warranty and the software's author, the holder of the
16  * economic rights, and the successive licensors have only limited
17  * liability.
18  *
19  * In this respect, the user's attention is drawn to the risks associated
20  * with loading, using, modifying and/or developing or reproducing the
21  * software by the user in light of its specific status of free software,
22  * that may mean that it is complicated to manipulate, and that also
23  * therefore means that it is reserved for developers and experienced
24  * professionals having in-depth computer knowledge. Users are therefore
25  * encouraged to load and test the software's suitability as regards their
26  * requirements in conditions enabling the security of their systems and/or
27  * data to be ensured and, more generally, to use and operate it in the
28  * same conditions as regards security.
29  *
30  * The fact that you are presently reading this means that you have had
31  * knowledge of the CeCILL-B license and that you accept its terms.
32  */
33 
34 
35 #ifndef ANA_CONTROL_WCONTROL_H
36 #define ANA_CONTROL_WCONTROL_H
37 
38 
40 #include <qmainwindow.h>
41 #include <string>
42 #include <map>
43 #include <set>
44 
45 namespace anatomist
46 {
47  class AWindow;
48  class AObject;
49  class MObject;
50  class AControlMenuHandler;
51  class Referential;
52 }
53 
54 
60 class ControlWindow : public QMainWindow
61 {
62  Q_OBJECT
63 
64 public:
66  virtual ~ControlWindow();
67 
74  anatomist::AObject* obj );
76 
77  std::set<anatomist::AObject *> selectedObjects();
78  std::set<anatomist::AWindow*> selectedWindows();
79  std::set<int> SelectedWinGroups() const;
91  bool ViewingRefColors() const;
93  void enableRefWinMenu( bool );
94  void enableLoadRefMenu( bool );
95  void enablePreferencesMenu( bool );
96  void enableFusionMenu( bool );
97  void enableGroupMenu( bool );
98  bool logoEnabled() const;
99  void loadObject( const std::string& filter, const std::string& caption );
105  void enableClose( bool );
106  bool closeEnabled() const;
107  void setWindowTypeVisible( int type, bool visible=true );
108  bool hasObject( anatomist::AObject * obj ) const;
109 
111 
112 public slots:
114  void loadObject();
115  void saveSettings();
119  void openWindow( int type );
120  void openWindow( QAction* ac );
122  void dropOnWindowIcon( int type, QDropEvent* ev );
123  void dragEnterOnWindowIcon( int type, QDragEnterEvent* ev );
124  void dragMoveOnWindowIcon( int type, QDragMoveEvent* ev );
125  void openAxial();
126  void openSagittal();
127  void openCoronal();
128  void openOblique();
129  void open3D();
130  void openBrowser();
131  void openRefWin();
134  void closeWindows();
135  void linkWindows();
139  void reload();
140  void groupObjects();
148  void about();
149  void help();
150  void graphParams();
151  void quit();
154  void enableLogo( bool );
160  void modulesList();
161  void aimsInfo();
165  void clearAll();
166 
167 protected:
168  void closeEvent(QCloseEvent *event);
169  virtual void createMenu();
170  virtual void createIcons();
171  virtual void drawContents();
172  virtual void createTitle();
173  void setLanguage( const std::string & poFilename );
174 
176 
177  static std::string _baseTitle;
179 
180 protected slots:
181  void objectTreeRightClick( anatomist::AObject*, const QPoint & );
182 
183 private:
184  struct Private;
185  Private *d;
186 };
187 
188 
189 #endif
#define slots
The ControlWindow class is the Anatomist control window.
Definition: wControl.h:61
std::set< int > SelectedWinGroups() const
void openAxial()
void chooseWinReferential()
same as chooseReferential() but for windows only
void openSagittal()
bool ViewingRefColors() const
Are reference colors markers visible ?
static std::string _baseTitle
Definition: wControl.h:177
virtual void createTitle()
void ToggleRefColorsView()
void registerSubObject(anatomist::MObject *parent, anatomist::AObject *obj)
void loadObject(const std::string &filter, const std::string &caption)
void windowTreeClick()
void objectTreeDblClick()
void objectTreeRightClick(anatomist::AObject *, const QPoint &)
void BuildObjectMenu()
void openCoronal()
void openBrowser()
void UpdateToggleMenus()
void openOblique()
std::set< anatomist::AWindow * > selectedWindows()
void registerWindow(anatomist::AWindow *win)
void linkWindows()
void saveWindowsConfig()
void enableGroupMenu(bool)
void iconifyWindows()
void NotifyObjectChange(anatomist::AObject *obj)
anatomist::Referential * defaultWindowsReferential() const
void setLanguage(const std::string &poFilename)
void fusionObjects()
void modulesList()
void UpdateMenus()
Definition: wControl.h:113
void UpdateWindowMenu()
void restoreWindows()
anatomist::AControlMenuHandler * menuHandler()
Definition: wControl.h:89
virtual void createMenu()
void SelectWindow(anatomist::AWindow *win)
void addObjectsInWindows()
void unregisterObject(anatomist::AObject *obj)
void closeEvent(QCloseEvent *event)
void replayScenario()
void groupObjects()
void enableFusionMenu(bool)
bool closeEnabled() const
void dragMoveOnWindowIcon(int type, QDragMoveEvent *ev)
void removeObjects()
anatomist::Referential * defaultObjectsReferential() const
anatomist::AControlMenuHandler * _menu
Definition: wControl.h:175
void closeWindows()
void registerObject(anatomist::AObject *obj)
void enableLoadRefMenu(bool)
void openBlockView()
void viewRefColors()
void windowTreeDblClick(anatomist::AWindow *)
void dropOnWindowIcon(int type, QDropEvent *ev)
drop event on windows buttons
void enableLogo(bool)
virtual void drawContents()
bool hasObject(anatomist::AObject *obj) const
void languageEnglish()
void openWindow(int type)
opens a window of type ID type
void enablePreferencesMenu(bool)
void graphParams()
void SelectObject(anatomist::AObject *obj)
void ResizeWindow(anatomist::AWindow *win)
virtual void createIcons()
void enableClose(bool)
allows or forbids closing the control window
void chooseReferential()
void languageFrench()
void UnselectAllWindows()
void enableRefWinMenu(bool)
void loadObject()
void objectTreeClick()
void UpdateObjectMenu()
void deleteObjects()
void openWindow(QAction *ac)
bool logoEnabled() const
void UnselectAllObjects()
static ControlWindow * _theControlWindow
Definition: wControl.h:178
std::set< anatomist::AObject * > selectedObjects()
void unregisterWindow(anatomist::AWindow *win)
void dragEnterOnWindowIcon(int type, QDragEnterEvent *ev)
void clearAll()
clears all objects / windows / refs / transfos to reset the application
void setDefaultObjectsReferential(anatomist::Referential *)
void openThreeViews()
void openConstraintEditor()
void NotifyWindowChange(anatomist::AWindow *win)
void setWindowTypeVisible(int type, bool visible=true)
void saveSettings()
void openRefWin()
static ControlWindow * theControlWindow()
Definition: wControl.h:110
void setDefaultWindowsReferential(anatomist::Referential *)
virtual ~ControlWindow()
void openPreferencesWin()
void reloadPalettes()
Base Anatomist object (abstract)
Definition: Object.h:96
Abstract base class Anatomist window.
Definition: Window.h:58
Multi-object : base abstract class for objects that contain others.
Definition: MObject.h:235
Referential: marker for transformations, with an associated color.
Definition: Referential.h:55