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

ActionViewer is the viewer used to manage the actions. More...

#include <ActionViewer.h>

Inherits camitk::Viewer.

Public Member Functions

Inherited from Viewer
unsigned int numberOfViewedComponent ()
 returns the number of Component that are displayed by this viewer More...
 
void refresh (Viewer *whoIsAsking=nullptr) override
 refresh the view (can be interesting to know which other viewer is calling this) More...
 
QWidget * getWidget (QWidget *parent=nullptr) override
 get the viewer widget. 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...
 

General

 ActionViewer ()
 
 ~ActionViewer () override=default
 destructor More...
 
static ActionViewergetInstance ()
 returns the unique instance of ActionViewer More...
 

Specific to the Action viewer

enum  UpdateReason { ActionFamilyChanged, ActionNameChanged, ActionTagChanged, ViewerRefresh }
 Enum the different fields of the action viewwer. More...
 
QWidget * myWidget
 Main action widget of the viewer. More...
 
QComboBox * familyComboBox
 Family combo box. More...
 
QComboBox * nameComboBox
 Action name combo box. More...
 
Actionaction
 Current action. More...
 
QLineEdit * tagLineEdit
 action tags line edit More...
 
QStackedWidget * actionWidgetStack
 actions stacked widget of the viewer More...
 
QFrame * searchFramePanel
 the search panel More...
 
int emptyActionWidgetIndex
 index of the empty widget, used when no action is active or when no action has been used for the currently selected components More...
 
QMap< ComponentList, Action * > widgetHistory
 this map stores the list of selected component and the corresponding stack index of their embedded action More...
 
ComponentList currentlySelected
 Used to evaluate modification of the list while execution. More...
 
void embedActionWidget (Action *)
 embed an action widget in the stacked widget More...
 
void setSearchPanelVisible (bool)
 show/hide the search panel (hidden by default) More...
 
void changeName ()
 Method used to change the action selected. More...
 
void changeFamily ()
 Method used to change the action family selected. More...
 
void changeTag ()
 Method used to change the tag. More...
 
void updateActionViewer (UpdateReason)
 method used to update the viewer for a given update field 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...
 
- Protected Member Functions inherited from camitk::Viewer
void clearSelection ()
 clear the selection More...
 
void selectionChanged (Component *comp)
 the selection has changed to be just one comp More...
 
void selectionChanged (ComponentList &compSet)
 The selection has changed to the given ComponentList. More...
 

Detailed Description

ActionViewer is the viewer used to manage the actions.

By default all action widgets are displayed in this viewer widget (in the stackedWidget). There is also a search panel to find an action to apply to the currently selected component. The search panel is not not shown by default. Use setSearchPanelVisible(true) to show it.

This viewer also manages a singleton (THE CamiTK action viewer). 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.

Member Enumeration Documentation

◆ UpdateReason

Enum the different fields of the action viewwer.

Enumerator
ActionFamilyChanged 
ActionNameChanged 
ActionTagChanged 
ViewerRefresh 

Constructor & Destructor Documentation

◆ ActionViewer()

camitk::ActionViewer::ActionViewer ( )

constructor

◆ ~ActionViewer()

camitk::ActionViewer::~ActionViewer ( )
overridedefault

destructor

Member Function Documentation

◆ changeFamily

void camitk::ActionViewer::changeFamily ( )
protectedslot

Method used to change the action family selected.

◆ changeName

void camitk::ActionViewer::changeName ( )
protectedslot

Method used to change the action selected.

◆ changeTag

void camitk::ActionViewer::changeTag ( )
protectedslot

Method used to change the tag.

◆ embedActionWidget()

void camitk::ActionViewer::embedActionWidget ( Action action)

embed an action widget in the stacked widget

◆ getInstance()

ActionViewer * camitk::ActionViewer::getInstance ( )
static

returns the unique instance of ActionViewer

◆ getWidget()

QWidget * camitk::ActionViewer::getWidget ( QWidget *  parent = nullptr)
overridevirtual

get the viewer widget.

Parameters
parentthe parent widget for the viewer widget

Implements camitk::Viewer.

◆ numberOfViewedComponent()

unsigned int camitk::ActionViewer::numberOfViewedComponent ( )
inlinevirtual

returns the number of Component that are displayed by this viewer

Implements camitk::Viewer.

◆ refresh()

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

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

Implements camitk::Viewer.

◆ setSearchPanelVisible()

void camitk::ActionViewer::setSearchPanelVisible ( bool  visibility)

show/hide the search panel (hidden by default)

◆ updateActionViewer()

void camitk::ActionViewer::updateActionViewer ( UpdateReason  reason)
private

method used to update the viewer for a given update field

References camitk::Action::getName().

Member Data Documentation

◆ action

Action* camitk::ActionViewer::action
private

Current action.

◆ actionWidgetStack

QStackedWidget* camitk::ActionViewer::actionWidgetStack
private

actions stacked widget of the viewer

◆ currentlySelected

ComponentList camitk::ActionViewer::currentlySelected
private

Used to evaluate modification of the list while execution.

◆ emptyActionWidgetIndex

int camitk::ActionViewer::emptyActionWidgetIndex
private

index of the empty widget, used when no action is active or when no action has been used for the currently selected components

◆ familyComboBox

QComboBox* camitk::ActionViewer::familyComboBox
private

Family combo box.

◆ myWidget

QWidget* camitk::ActionViewer::myWidget
private

Main action widget of the viewer.

◆ nameComboBox

QComboBox* camitk::ActionViewer::nameComboBox
private

Action name combo box.

◆ searchFramePanel

QFrame* camitk::ActionViewer::searchFramePanel
private

the search panel

◆ tagLineEdit

QLineEdit* camitk::ActionViewer::tagLineEdit
private

action tags line edit

◆ widgetHistory

QMap<ComponentList, Action*> camitk::ActionViewer::widgetHistory
private

this map stores the list of selected component and the corresponding stack index of their embedded action


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