Computer Assited Medical Intervention Tool Kit  version 4.1
FrameExplorer.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * $CAMITK_LICENCE_BEGIN$
3  *
4  * CamiTK - Computer Assisted Medical Intervention ToolKit
5  * (c) 2001-2018 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 
26 
27 #ifndef FRAMEEXPLORER_H
28 #define FRAMEEXPLORER_H
29 
30 // -- Core stuff
31 #include "Viewer.h"
32 
33 // -- QT stuff
34 #include <QTreeWidget>
35 #include <QTreeWidgetItem>
36 
37 namespace camitk {
38 // -- Core stuff classes
39 class InterfaceFrame;
40 
55 class CAMITK_API FrameExplorer : public Viewer {
56  Q_OBJECT
57 
58 public:
61 
63  FrameExplorer();
64 
66  ~FrameExplorer() override = default;
67 
69  static FrameExplorer* getInstance();
71 
74  unsigned int numberOfViewedComponent() override;
77 
79  void refresh(Viewer* whoIsAsking = nullptr) override;
80 
82  QWidget* getWidget(QWidget* parent) override;
83 
85  virtual QWidget* getPreferenceWidget(QWidget* parent);
86 
87 public slots :
88 
89 private slots :
90 
92  void selectionChanged();
93 
94 private:
95 
99  QTreeWidgetItem* getNewItem(QTreeWidgetItem* parent, Component*);
100 
102  QTreeWidgetItem* add(QTreeWidgetItem*, Component*);
103 
107  void add(Component* comp);
108 
110  void remove();
111 
112 
114  QTreeWidget* explorerTree;
116 
117 };
118 
119 }
120 
121 
122 #endif
camitk::InterfaceFrame::getChildrenFrame
virtual const QVector< InterfaceFrame * > & getChildrenFrame() const =0
Get the Children Frames from the current Frame in the Frame Hierarchy The Frame hierarchy may not be ...
FrameExplorer.h
camitk::InterfaceFrame::getFrameName
virtual const QString & getFrameName() const =0
Hierarchy accessors / Modifyers.
camitk::Component::setVisibility
virtual void setVisibility(Viewer *, bool)
set the visibility for a viewer
Definition: sdk/libraries/core/component/Component.cpp:276
camitk::Component::getName
QString getName() const override
get the name to be displayed
Definition: sdk/libraries/core/component/Component.h:849
camitk::InterfaceFrame
This class describes what are the methods to implement in order to manage a Component position in spa...
Definition: InterfaceFrame.h:64
camitk::FrameExplorer::FrameExplorer
FrameExplorer()
Construtor.
Definition: FrameExplorer.cpp:59
camitk::ComponentList
QList< Component * > ComponentList
A list of Component.
Definition: CamiTKAPI.h:89
camitk::InterfaceFrame::getParentFrame
virtual InterfaceFrame * getParentFrame() const =0
Get the parent frame.
Component
A component is something that composed something and could also be a part of something.
Definition: modeling/libraries/pml/Component.h:48
Viewer.h
camitk::refresh
void refresh()
refresh the display
camitk::Component
A Component represents something that could be included in the explorer view, the interactive 3D view...
Definition: sdk/libraries/core/component/Component.h:298
Application.h
CAMITK_API
#define CAMITK_API
Definition: CamiTKAPI.h:49
camitk
Definition: Action.cpp:36
camitk::Component::getFrame
virtual InterfaceFrame * getFrame()
get the associated frame
Definition: sdk/libraries/core/component/Component.h:859