Computer Assited Medical Intervention Tool Kit  version 4.0
PropertyExplorer.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * $CAMITK_LICENCE_BEGIN$
3  *
4  * CamiTK - Computer Assisted Medical Intervention ToolKit
5  * (c) 2001-2016 Univ. Grenoble Alpes, 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 #ifndef PROPERTYEXPLORER_H
26 #define PROPERTYEXPLORER_H
27 
28 // -- Core stuff
29 #include "Viewer.h"
30 #include "ObjectController.h"
31 #include "ActionViewer.h"
32 #include "PropertyObject.h"
33 
34 // -- QT stuff
35 #include <qteditorfactory.h>
36 #include <QtTreePropertyBrowser>
37 #include <QtButtonPropertyBrowser>
38 #include <QtGroupBoxPropertyBrowser>
39 
40 // -- QT stuff classes
41 class QTabWidget;
42 class QPushButton;
43 class QWidget;
44 
45 namespace camitk {
46 
47 
48 class ObjectController;
49 
85  Q_OBJECT
86  Q_ENUMS(camitk::ObjectController::ViewMode) // so that it can be used in property editor
87 
88 public:
94 
96  virtual ~PropertyExplorer();
97 
99  static PropertyExplorer* getInstance();
101 
104  virtual unsigned int numberOfViewedComponent();
107 
109  virtual void refresh(Viewer *whoIsAsking = NULL);
110 
112  virtual QWidget * getWidget(QWidget * parent = NULL);
113 
115  virtual QObject * getPropertyObject();
117 
120 
124  void selectWidget(QWidget* widget);
125 
129  void selectIndex(unsigned int index);
130 
132 
133 
134 private:
135 
138  QTabWidget *tabWidget;
139  QPushButton *revertButton;
140  QPushButton *applyButton;
141 
144 
148 
153 
158 
163  bool eventFilter(QObject *object, QEvent *event);
164 
168  void createProperties();
169 
171 
175  void clear();
176 
177 private slots:
178 
184  void updateTabIndexToDisplay(int index);
185 };
186 }
187 #endif
QPushButton * applyButton
Definition: PropertyExplorer.h:140
Viewer is an abstract viewer.
Definition: Viewer.h:55
QPushButton * revertButton
Definition: PropertyExplorer.h:139
Definition: Action.cpp:40
ObjectController * theController
the widgets
Definition: PropertyExplorer.h:137
Component * currentComponent
the viewed Component
Definition: PropertyExplorer.h:143
A Component represents something that could be included in the explorer view, the interactive 3D view...
Definition: sdk/libraries/core/component/Component.h:299
#define CAMITK_API
Definition: CamiTKAPI.h:49
This class describes a property object.
Definition: PropertyObject.h:50
Property * viewModeProperty
The CamiTK property that stands for the ObjectController view mode.
Definition: PropertyExplorer.h:157
PropertyObject * propertyObject
The property object that holds the properties of this viewer.
Definition: PropertyExplorer.h:152
QTabWidget * tabWidget
Definition: PropertyExplorer.h:138
The property explorer.
Definition: PropertyExplorer.h:84
ViewMode
The property browser can be shown in different view mode.
Definition: ObjectController.h:172
Definition: objectcontroller.h:47
The object controller class.
Definition: ObjectController.h:162
This class describes a property that can be used in components and actions or any class that needs to...
Definition: Property.h:260