|
Computer Assited Medical Intervention Tool Kit
version 5.0
|
|
Go to the documentation of this file.
26 #ifndef ACTIONVIEWER_H
27 #define ACTIONVIEWER_H
33 #include <Component.h>
38 #include <QVBoxLayout>
39 #include <QPushButton>
40 #include <QStackedWidget>
78 virtual void refresh(Viewer* whoIsAsking =
nullptr)
override;
86 virtual void setSearchPanelVisible(
bool);
101 enum UpdateReason {ActionFamilyChanged, ActionNameChanged, ActionTagChanged, ViewerRefresh};
115 QComboBox* familyComboBox;
118 QComboBox* nameComboBox;
124 QLineEdit* tagLineEdit;
127 QStackedWidget* actionWidgetStack;
130 QFrame* searchFramePanel;
133 int emptyActionWidgetIndex;
136 QMap<camitk::ComponentList, camitk::Action*> widgetHistory;
143 #endif // ACTIONVIEWER_H
virtual QWidget * getWidget() override
get the viewer widget
Definition: ActionViewer.cpp:70
camitk::ComponentList currentlySelected
Used to evaluate modification of the list while execution.
Definition: ActionViewer.h:162
void changeTag()
Method used to change the tag.
Definition: ActionViewer.cpp:146
void setDescription(QString)
set the viewer's description
Definition: Viewer.cpp:104
void changeName()
Method used to change the action selected.
Definition: ActionViewer.cpp:140
virtual ~ActionViewer()
destructor
Definition: ActionViewer.cpp:60
virtual void setSearchPanelVisible(bool)
show/hide the search panel (hidden by default)
Definition: ActionViewer.cpp:120
void changeFamily()
Method used to change the action family selected.
Definition: ActionViewer.cpp:151
void setComponents(QStringList)
set the list of component class names managed by this viewer
Definition: Viewer.cpp:94
QComboBox * nameComboBox
Action name combo box.
Definition: ActionViewer.h:141
QString getName() const
get the name of the action
Definition: Action.h:338
QFrame * searchFramePanel
the search panel
Definition: ActionViewer.h:153
QWidget * myWidget
Main action widget of the viewer.
Definition: ActionViewer.h:135
QList< Action * > ActionList
A list of Action.
Definition: CamiTKAPI.h:136
void updateSearchPanel(UpdateReason)
method used to update the viewer for a given update field
Definition: ActionViewer.cpp:178
void setIcon(QPixmap icon)
set the default icon for the viewer extension
Definition: Viewer.cpp:84
@ ActionNameChanged
Definition: ActionViewer.h:124
void updateTargets()
update the target list using the currently selected components
Definition: Action.cpp:171
QString getFamily() const
the name of the family in which this action is associated
Definition: Action.h:353
QLineEdit * tagLineEdit
action tags line edit
Definition: ActionViewer.h:147
@ ActionFamilyChanged
Definition: ActionViewer.h:124
Action class is an abstract class that enables you to build a action (generally on a component)....
Definition: Action.h:231
virtual void updateActionWidget(camitk::Action *)
embed an action widget in the stacked widget if needed
Definition: ActionViewer.cpp:316
QMap< camitk::ComponentList, camitk::Action * > widgetHistory
this map stores the list of selected component and the corresponding stack index of their embedded ac...
Definition: ActionViewer.h:159
#define ACTIONVIEWER_API
Definition: ActionViewerAPI.h:54
camitk::Action::ApplyStatus trigger(QWidget *parent=nullptr)
This method triggers the action.
Definition: Action.cpp:218
ActionViewer is the viewer used to manage the actions.
Definition: ActionViewer.h:63
virtual void refresh(Viewer *whoIsAsking=nullptr) override
refresh the view (can be interesting to know which other viewer is calling this)
Definition: ActionViewer.cpp:64
bool getEmbedded() const
argument use to know if the widget is embedded or not
Definition: Action.h:366
QList< Component * > ComponentList
A list of Component.
Definition: CamiTKAPI.h:127
@ ActionTagChanged
Definition: ActionViewer.h:124
QStackedWidget * actionWidgetStack
actions stacked widget of the viewer
Definition: ActionViewer.h:150
QStringList getTag() const
the name of the tag called this action
Definition: Action.h:361
Viewer is an abstract class that is the base class for all viewers.
Definition: Viewer.h:180
UpdateReason
Enum the different fields of the action viewwer.
Definition: ActionViewer.h:124
virtual QWidget * getWidget()=0
get the viewer widget.
int emptyActionWidgetIndex
index of the empty widget, used when no action is active or when no action has been used for the curr...
Definition: ActionViewer.h:156
camitk::Action * action
Current action.
Definition: ActionViewer.h:144
bool operator<(const ComponentList &l1, const ComponentList &l2)
Definition: ActionViewer.cpp:156
virtual void refresh(Viewer *whoIsAsking=nullptr)=0
refresh the view (can be interesting to know which other viewer is calling this)
virtual QWidget * getWidget()
This method has to be redefined in your Action only if:
Definition: Action.cpp:185
@ ViewerRefresh
Definition: ActionViewer.h:124
QComboBox * familyComboBox
Family combo box.
Definition: ActionViewer.h:138
Q_INVOKABLE ActionViewer(QString name)
Definition: ActionViewer.cpp:44
Definition: Action.cpp:35