Computer Assited Medical Intervention Tool Kit  version 4.1
List of all members
camitk::FrameExplorer Class Reference

Explorer window, display the list of all data currently opened in the application. More...

#include <FrameExplorer.h>

Inherits camitk::Viewer.

General

 FrameExplorer ()
 Construtor. More...
 
 ~FrameExplorer () override=default
 Destructor. More...
 
static FrameExplorergetInstance ()
 returns the unique instance of ActionViewer More...
 

Inherited from Viewer

unsigned int numberOfViewedComponent () override
 
void refresh (Viewer *whoIsAsking=nullptr) override
 refresh the explorer (can be interesting to know which other viewer is calling this) More...
 
QWidget * getWidget (QWidget *parent) override
 get the explorer widget (QTreeWidget). More...
 
virtual QWidget * getPreferenceWidget (QWidget *parent)
 get the explorer preference widget (widget where all preferences can be modified). More...
 
void selectionChanged ()
 slot called whenever the selection changed in the explorer More...
 

QTreeWidget and QTreeWidgetItem management

instanciate a new QTreeWidgetItem using names and properties from the InterfaceNode, and using parent

QTreeWidget * explorerTree
 the list view More...
 
QTreeWidgetItem * getNewItem (QTreeWidgetItem *parent, Component *)
 
QTreeWidgetItem * add (QTreeWidgetItem *, Component *)
 recursively add the Component in the tree explorer and return the QTreeWidgetItem of the InterfaceNode More...
 
void add (Component *comp)
 Add the given Component to the explorer (at top level) and automatically create children Component items. More...
 
void remove ()
 clear the tree explorer More...
 

Additional Inherited Members

- Signals inherited from camitk::Viewer
void selectionChanged ()
 this signal is emitted when the current selection was changed by the viewer More...
 
- Public Member Functions inherited from camitk::Viewer
virtual QMenu * getMenu ()
 get the viewer menu (returns NULL by default, i.e. there are no default edit menu) More...
 
virtual QObject * getPropertyObject ()
 get the viewer property object (returns NULL by default, i.e. there are no property to edit) More...
 
virtual QToolBar * getToolBar ()
 get the viewer toolbar (returns NULL by default, i.e. there are no default toolbar) More...
 
virtual void refreshInterfaceNode (Component *comp)
 Update the whole tree of the representation of the Component. More...
 
 Viewer (QString name)
 default constructor More...
 
 ~Viewer () override=default
 default destructor More...
 
- Protected Member Functions inherited from camitk::Viewer
void clearSelection ()
 clear the selection More...
 
void selectionChanged (ComponentList &compSet)
 The selection has changed to the given ComponentList. More...
 
void selectionChanged (Component *comp)
 the selection has changed to be just one comp More...
 

Detailed Description

Explorer window, display the list of all data currently opened in the application.

All objects are displayed in a QListView widget and can be selected (single/multiple selection is available).

explorer.png
The component explorer viewer.

This viewer also manages a singleton (THE CamiTK explorer). See getInstance() for more information. You do not have to use it, but it is convienent (and sometimes preferable) to use this instance instead of creating your own one.

Constructor & Destructor Documentation

◆ FrameExplorer()

camitk::FrameExplorer::FrameExplorer ( )

Construtor.

References explorerTree.

Referenced by getInstance().

◆ ~FrameExplorer()

camitk::FrameExplorer::~FrameExplorer ( )
overridedefault

Destructor.

Member Function Documentation

◆ add() [1/2]

QTreeWidgetItem * camitk::FrameExplorer::add ( QTreeWidgetItem *  parent,
Component abstractNode 
)
private

◆ add() [2/2]

void camitk::FrameExplorer::add ( Component comp)
private

Add the given Component to the explorer (at top level) and automatically create children Component items.

Parameters
compThe Component to add in the tree view.

References add(), explorerTree, camitk::Component::getFrame(), and camitk::InterfaceFrame::getParentFrame().

◆ getInstance()

FrameExplorer * camitk::FrameExplorer::getInstance ( )
static

returns the unique instance of ActionViewer

References FrameExplorer().

◆ getNewItem()

QTreeWidgetItem * camitk::FrameExplorer::getNewItem ( QTreeWidgetItem *  parent,
Component abstractNode 
)
private

◆ getPreferenceWidget()

QWidget * camitk::FrameExplorer::getPreferenceWidget ( QWidget *  parent)
virtual

get the explorer preference widget (widget where all preferences can be modified).

Parameters
parentthe parent widget for the preference widget

◆ getWidget()

QWidget * camitk::FrameExplorer::getWidget ( QWidget *  parent)
overridevirtual

get the explorer widget (QTreeWidget).

Parameters
parentthe parent widget for the viewer widget

Implements camitk::Viewer.

References explorerTree, and selectionChanged().

◆ numberOfViewedComponent()

unsigned int camitk::FrameExplorer::numberOfViewedComponent ( )
overridevirtual

returns the number of Component that are displayed by this viewer

Implements camitk::Viewer.

◆ refresh()

void camitk::FrameExplorer::refresh ( Viewer whoIsAsking = nullptr)
overridevirtual

refresh the explorer (can be interesting to know which other viewer is calling this)

Implements camitk::Viewer.

References add(), explorerTree, and camitk::Application::getAllComponents().

Referenced by selectionChanged().

◆ remove()

void camitk::FrameExplorer::remove ( )
private

clear the tree explorer

References explorerTree.

◆ selectionChanged

void camitk::FrameExplorer::selectionChanged ( )
privateslot

slot called whenever the selection changed in the explorer

References refresh().

Referenced by getWidget().

Member Data Documentation

◆ explorerTree

QTreeWidget* camitk::FrameExplorer::explorerTree
private

the list view

Referenced by add(), FrameExplorer(), getWidget(), refresh(), and remove().


The documentation for this class was generated from the following files: