Computer Assited Medical Intervention Tool Kit  version 5.0
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-2021 Univ. Grenoble Alpes, CNRS, Grenoble INP, TIMC, 38000 Grenoble, France
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 #include "FrameExplorerAPI.h"
31 
32 // -- Core stuff
33 #include <Viewer.h>
34 
35 // -- QT stuff
36 #include <QTreeWidget>
37 #include <QTreeWidgetItem>
38 
39 namespace camitk {
40 // -- Core stuff classes
41 class InterfaceFrame;
42 }
43 
61  Q_OBJECT
62 
63 public:
66 
68  Q_INVOKABLE FrameExplorer(QString);
69 
71  ~FrameExplorer() override = default;
72 
75  void refresh(Viewer* whoIsAsking = nullptr) override;
78 
80  QWidget* getWidget() override;
81 
82 private slots :
83 
85  void frameSelectionChanged();
86 
87 private:
88 
92  QTreeWidgetItem* getNewItem(QTreeWidgetItem* parent, camitk::Component*);
93 
95  QTreeWidgetItem* add(QTreeWidgetItem*, camitk::Component*);
96 
100  void add(camitk::Component* comp);
101 
103  void remove();
104 
105 
107  QTreeWidget* explorerTree;
109 
110 };
111 
112 #endif
FrameExplorer::refresh
void refresh(Viewer *whoIsAsking=nullptr) override
Definition: FrameExplorer.cpp:70
camitk::Viewer::setDescription
void setDescription(QString)
set the viewer's description
Definition: Viewer.cpp:104
FrameExplorer::getNewItem
QTreeWidgetItem * getNewItem(QTreeWidgetItem *parent, camitk::Component *)
Definition: FrameExplorer.cpp:88
FrameExplorer
Frame Explorer window, display the hierachy of the frames of all the data currently opened in the app...
Definition: FrameExplorer.h:60
FrameExplorer::remove
void remove()
clear the tree explorer
Definition: FrameExplorer.cpp:149
FrameExplorer::getWidget
QWidget * getWidget() override
get the frame explorer widget (QTreeWidget)
Definition: FrameExplorer.cpp:45
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::Viewer::setIcon
void setIcon(QPixmap icon)
set the default icon for the viewer extension
Definition: Viewer.cpp:84
camitk::Viewer::getName
QString getName() const
get the name of the viewer
Definition: Viewer.h:200
camitk::InterfaceFrame::getFrameName
virtual const QString & getFrameName() const =0
Hierarchy accessors / Modifyers.
FrameExplorer::explorerTree
QTreeWidget * explorerTree
the list view
Definition: FrameExplorer.h:107
FrameExplorer::FrameExplorer
Q_INVOKABLE FrameExplorer(QString)
Construtor.
Definition: FrameExplorer.cpp:38
FRAMEEXPLORER_API
#define FRAMEEXPLORER_API
Definition: FrameExplorerAPI.h:54
camitk::Component::getName
QString getName() const override
get the name to be displayed
Definition: sdk/libraries/core/component/Component.h:907
camitk::InterfaceFrame
This class describes what are the methods to implement in order to manage a Component position in spa...
Definition: InterfaceFrame.h:64
FrameExplorerAPI.h
camitk::ComponentList
QList< Component * > ComponentList
A list of Component.
Definition: CamiTKAPI.h:127
camitk::InterfaceFrame::getParentFrame
virtual InterfaceFrame * getParentFrame() const =0
Get the parent frame.
camitk::Component::setVisibility
virtual void setVisibility(QString, bool)
set the visibility inside the viewer of the given name (the viewer needs to be a registered viewer)
Definition: sdk/libraries/core/component/Component.cpp:224
camitk::Viewer
Viewer is an abstract class that is the base class for all viewers.
Definition: Viewer.h:180
camitk::Viewer::getWidget
virtual QWidget * getWidget()=0
get the viewer widget.
Viewer.h
camitk::Viewer::refresh
virtual void refresh(Viewer *whoIsAsking=nullptr)=0
refresh the view (can be interesting to know which other viewer is calling this)
FrameExplorer::add
QTreeWidgetItem * add(QTreeWidgetItem *, camitk::Component *)
recursively add the Component in the tree explorer and return the QTreeWidgetItem of the InterfaceNod...
Definition: FrameExplorer.cpp:112
FrameExplorer::frameSelectionChanged
void frameSelectionChanged()
slot called whenever the selection changed in the explorer
Definition: FrameExplorer.cpp:156
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:302
Application.h
camitk
Definition: Action.cpp:35
camitk::Component::getFrame
InterfaceFrame * getFrame()
get the associated frame
Definition: sdk/libraries/core/component/Component.h:917