Computer Assisted Medical Intervention Tool Kit  version 5.2
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-2024 Univ. Grenoble Alpes, CNRS, Grenoble INP - UGA, 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:
67 
68  Q_INVOKABLE FrameExplorer(QString);
69 
71  ~FrameExplorer() override = default;
72 
77  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
#define FRAMEEXPLORER_API
Definition: FrameExplorerAPI.h:54
Frame Explorer window, display the hierachy of the frames of all the data currently opened in the app...
Definition: FrameExplorer.h:60
~FrameExplorer() override=default
Destructor.
A Component represents something that could be included in the explorer view, the interactive 3D view...
Definition: sdk/libraries/core/component/Component.h:303
Viewer is an abstract class that is the base class for all viewers.
Definition: Viewer.h:181
virtual QWidget * getWidget()=0
get the viewer widget.
virtual void refresh(Viewer *whoIsAsking=nullptr)=0
refresh the view (can be interesting to know which other viewer is calling this)
Definition: Action.cpp:36