![]() |
Computer Assited Medical Intervention Tool Kit
|
ActionViewer is the viewer used to manage the actions. More...
#include <ActionViewer.h>
Inheritance diagram for camitk::ActionViewer:Public Member Functions | |
| ActionViewer () | |
| constructor | |
| void | embedActionWidget (Action *) |
| embed an action widget in the stacked widget | |
| virtual QWidget * | getWidget (QWidget *parent=NULL) |
| get the viewer widget. | |
| virtual unsigned int | numberOfViewedComponent () |
| returns the number of Component that are displayed by this viewer | |
| virtual void | refresh (Viewer *whoIsAsking=NULL) |
| refresh the view (can be interesting to know which other viewer is calling this) | |
| void | setSearchPanelVisible (bool) |
| show/hide the search panel (hidden by default) | |
| virtual | ~ActionViewer () |
| destructor | |
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) | |
| virtual QObject * | getPropertyObject () |
| get the viewer property object (returns NULL by default, i.e. there are no property to edit) | |
| virtual QToolBar * | getToolBar () |
| get the viewer toolbar (returns NULL by default, i.e. there are no default toolbar) | |
| virtual void | refreshInterfaceNode (Component *comp) |
| Update the whole tree of the representation of the Component. | |
| Viewer (QString name) | |
| default constructor | |
| virtual | ~Viewer () |
| default destructor | |
Static Public Member Functions | |
| static ActionViewer * | getActionViewer () |
| returns the unique instance oh ActionViewer | |
Protected Slots | |
| void | changeFamily () |
| Method used to change the action family selected. | |
| void | changeName () |
| Method used to change the action selected. | |
| void | changeTag () |
| Method used to change the tag. | |
Static Protected Attributes | |
| static ActionViewer * | actionViewer |
| the singleton ActionViewer instance | |
Private Types | |
| enum | UpdateReason { ActionFamilyChanged, ActionNameChanged, ActionTagChanged, ViewerRefresh } |
| Enum the different fields of the action viewwer. More... | |
Private Member Functions | |
| void | updateActionViewer (UpdateReason) |
| method used to update the viewer for a given update field | |
Private Attributes | |
| Action * | action |
| Current action. | |
| QStackedWidget * | actionWidgetStack |
| actions stacked widget of the viewer | |
| 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 | |
| QComboBox * | familyComboBox |
| Family combo box. | |
| QWidget * | myWidget |
| Main action widget of the viewer. | |
| QComboBox * | nameComboBox |
| Action name combo box. | |
| QFrame * | searchFramePanel |
| the search panel | |
| QLineEdit * | tagLineEdit |
| action tags line edit | |
| QMap< ComponentList, Action * > | widgetHistory |
| this map stores the list of selected component and the corresponding stack index of their embedded action | |
Additional Inherited Members | |
Signals inherited from camitk::Viewer | |
| void | selectionChanged () |
| this signal is emitted when the current selection was changed by the viewer | |
Protected Member Functions inherited from camitk::Viewer | |
| void | clearSelection () |
| clear the selection | |
| void | selectionChanged (ComponentList &compSet) |
| The selection has changed to the given ComponentList. | |
| void | selectionChanged (Component *comp) |
| the selection has changed to be just one comp | |
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.
|
private |
| camitk::ActionViewer::ActionViewer | ( | ) |
constructor
References actionWidgetStack, familyComboBox, myWidget, nameComboBox, and searchFramePanel.
Referenced by getActionViewer().
|
virtual |
destructor
|
protectedslot |
Method used to change the action family selected.
References ActionFamilyChanged, and updateActionViewer().
Referenced by setSearchPanelVisible().
|
protectedslot |
Method used to change the action selected.
References action, ActionNameChanged, camitk::Application::getAction(), nameComboBox, and updateActionViewer().
Referenced by setSearchPanelVisible().
|
protectedslot |
Method used to change the tag.
References ActionTagChanged, and updateActionViewer().
Referenced by setSearchPanelVisible().
| void camitk::ActionViewer::embedActionWidget | ( | Action * | action | ) |
embed an action widget in the stacked widget
References ActionFamilyChanged, actionWidgetStack, familyComboBox, camitk::Action::getFamily(), camitk::Action::getName(), camitk::Application::getSelectedComponents(), getWidget(), camitk::Action::getWidget(), nameComboBox, updateActionViewer(), and widgetHistory.
Referenced by camitk::Action::trigger().
|
static |
returns the unique instance oh ActionViewer
References ActionViewer(), and actionViewer.
Referenced by camitk::Action::trigger().
|
virtual |
get the viewer widget.
| parent | the parent widget for the viewer widget |
Implements camitk::Viewer.
References actionWidgetStack, emptyActionWidgetIndex, familyComboBox, myWidget, nameComboBox, searchFramePanel, tagLineEdit, and widgetHistory.
Referenced by embedActionWidget().
|
inlinevirtual |
returns the number of Component that are displayed by this viewer
Implements camitk::Viewer.
|
virtual |
refresh the view (can be interesting to know which other viewer is calling this)
Implements camitk::Viewer.
References updateActionViewer(), and ViewerRefresh.
| void camitk::ActionViewer::setSearchPanelVisible | ( | bool | visibility | ) |
show/hide the search panel (hidden by default)
References changeFamily(), changeName(), changeTag(), familyComboBox, nameComboBox, searchFramePanel, and tagLineEdit.
|
private |
method used to update the viewer for a given update field
References camitk::ACTION(), action, ActionFamilyChanged, ActionNameChanged, ActionTagChanged, actionWidgetStack, emptyActionWidgetIndex, camitk::FAMILY(), familyComboBox, camitk::Application::getActions(), camitk::Action::getFamily(), camitk::Action::getName(), camitk::Application::getSelectedComponents(), camitk::Action::getTag(), myWidget, nameComboBox, tagLineEdit, camitk::Action::trigger(), ViewerRefresh, and widgetHistory.
Referenced by changeFamily(), changeName(), changeTag(), embedActionWidget(), and refresh().
|
private |
Current action.
Referenced by changeName(), and updateActionViewer().
|
staticprotected |
the singleton ActionViewer instance
the register containing all the viewers (static instanciation, global variable, but global only for this file)
Referenced by getActionViewer().
|
private |
actions stacked widget of the viewer
Referenced by ActionViewer(), embedActionWidget(), getWidget(), and updateActionViewer().
|
private |
index of the empty widget, used when no action is active or when no action has been used for the currently selected components
Referenced by getWidget(), and updateActionViewer().
|
private |
Family combo box.
Referenced by ActionViewer(), embedActionWidget(), getWidget(), setSearchPanelVisible(), and updateActionViewer().
|
private |
Main action widget of the viewer.
Referenced by ActionViewer(), getWidget(), and updateActionViewer().
|
private |
Action name combo box.
Referenced by ActionViewer(), changeName(), embedActionWidget(), getWidget(), setSearchPanelVisible(), and updateActionViewer().
|
private |
the search panel
Referenced by ActionViewer(), getWidget(), and setSearchPanelVisible().
|
private |
action tags line edit
Referenced by getWidget(), setSearchPanelVisible(), and updateActionViewer().
|
private |
this map stores the list of selected component and the corresponding stack index of their embedded action
Referenced by embedActionWidget(), getWidget(), and updateActionViewer().
1.8.1.2