7 #ifndef __FWGUI_IACTIONSRV_HPP__ 8 #define __FWGUI_IACTIONSRV_HPP__ 10 #include "fwGui/config.hpp" 11 #include "fwGui/registrar/ActionRegistrar.hpp" 13 #include <fwCom/Signals.hpp> 14 #include <fwCom/Slots.hpp> 16 #include <fwServices/IService.hpp> 59 static const ::fwCom::Slots::SlotKeyType s_SET_VISIBLE_SLOT;
89 FWGUI_API
void actionServiceStopping();
93 FWGUI_API
void actionServiceStarting();
96 FWGUI_API
virtual void setIsActive(
bool isActive);
99 FWGUI_API
virtual void activate();
102 FWGUI_API
virtual void deactivate();
105 FWGUI_API
bool getIsActive()
const;
110 return m_activeStateValue;
114 FWGUI_API
virtual void setIsExecutable(
bool isExecutable);
117 FWGUI_API
virtual void setExecutable();
120 FWGUI_API
virtual void setInexecutable();
123 FWGUI_API
bool getIsExecutable()
const;
126 FWGUI_API
void setVisible(
bool isVisible);
129 FWGUI_API
void show();
132 FWGUI_API
void hide();
135 FWGUI_API
bool isVisible()
const;
145 FWGUI_API
bool confirmAction();
151 FWGUI_API
virtual ~IActionSrv();
153 typedef ::fwRuntime::ConfigurationElement::sptr ConfigurationType;
180 FWGUI_API
void initialize();
184 ::fwGui::registrar::ActionRegistrar::sptr m_registrar;
187 bool m_activeStateValue;
191 bool m_confirmAction;
192 std::string m_confirmMessage;
193 std::string m_defaultButton;
196 EnabledSignalType::sptr m_sigEnabled;
198 DisabledSignalType::sptr m_sigDisabled;
200 CheckedSignalType::sptr m_sigChecked;
202 UncheckedSignalType::sptr m_sigUnchecked;
213 m_action.lock()->setIsExecutable(
false);
217 m_action.lock()->setIsExecutable(
true);
220 IActionSrv::wptr m_action;
Base class for all services.
The namespace fwGui contains the base interface for IHM services.
static const ::fwCom::Signals::SignalKeyType s_DISABLED_SIG
Signal emitted when action is enabled.
static const ::fwCom::Signals::SignalKeyType s_CHECKED_SIG
Signal emitted when action is enabled.
Defines the service interface managing the menu items.
static const ::fwCom::Slots::SlotKeyType s_SET_INEXECUTABLE_SLOT
Slot to disable the action.
static const ::fwCom::Slots::SlotKeyType s_HIDE_SLOT
Slot to disable the action.
static const ::fwCom::Slots::SlotKeyType s_SET_EXECUTABLE_SLOT
Slot to enable the action.
static const ::fwCom::Slots::SlotKeyType s_SET_IS_ACTIVE_SLOT
Slot to activate/deactivate the action.
::fwCom::Signal< void()> CheckedSignalType
Signal emitted when action is checked.
bool getActiveStateValue() const
Return true if action 'check' feedback is inverted.
static const ::fwCom::Signals::SignalKeyType s_UNCHECKED_SIG
Signal emitted when action is enabled.
static const ::fwCom::Slots::SlotKeyType s_DEACTIVATE_SLOT
Slot to desactivate the action.
#define fwCoreAllowSharedFromThis()
Generate getSptr and getConstSptr methods.
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
::fwCom::Signal< void()> DisabledSignalType
Signal emitted when action is disabled.
static const ::fwCom::Slots::SlotKeyType s_ACTIVATE_SLOT
Slot to activate the action.
static const ::fwCom::Slots::SlotKeyType s_SHOW_SLOT
Slot to disable the action.
::fwCom::Signal< void()> UncheckedSignalType
Signal emitted when action is unchecked.
static const ::fwCom::Signals::SignalKeyType s_ENABLED_SIG
Signal emitted when action is enabled.
static const ::fwCom::Slots::SlotKeyType s_SET_IS_EXECUTABLE_SLOT
Slot to enable/disable the action.