7 #include <fwTools/fwID.hpp> 8 #include <fwServices/IService.hpp> 9 #include <fwServices/macros.hpp> 11 #include "fwGui/IActionSrv.hpp" 12 #include "fwGui/ActionCallbackBase.hpp" 14 #include <fwServices/op/Get.hpp> 21 const ActionCallbackBase::RegistryKeyType ActionCallbackBase::REGISTRY_KEY =
"::fwGui::ActionCallback";
47 ::fwServices::IService::sptr service = ::fwServices::get( m_sid );
48 OSLM_ASSERT(
"Service "<<m_sid<<
" not instanced.", service);
57 ::fwServices::IService::sptr service = ::fwServices::get( m_sid );
58 OSLM_ASSERT(
"Service "<<m_sid<<
" not instanced.", service);
59 ::fwGui::IActionSrv::sptr action = ::fwGui::IActionSrv::dynamicCast(service);
60 OSLM_ASSERT(
"Service "<<m_sid<<
" is not an action.", action);
61 checked = (checked == action->getActiveStateValue());
62 if (action->getIsActive() != checked)
64 action->setIsActive(checked);
#define OSLM_ASSERT(message, cond)
work like 'assert' from 'cassert', with in addition a message logged by spylog (with FATAL loglevel) ...
The namespace fwGui contains the base interface for IHM services.
FWGUI_API ActionCallbackBase()
Constructor.
virtual FWGUI_API void setSID(std::string sid)
Sets service ID updated in executed method.
virtual FWGUI_API void check(bool checked)
Called method when callback is checked.
virtual FWGUI_API void execute() override
Called method when callback is executed.
virtual FWGUI_API ~ActionCallbackBase()
Destructor. Do nothing.