7 #include "gui/action/SConfigLauncher.hpp" 9 #include <fwCom/Signal.hxx> 10 #include <fwCom/Slots.hxx> 12 #include <fwServices/macros.hpp> 13 #include <fwServices/registry/Proxy.hpp> 15 #include <boost/make_unique.hpp> 26 const ::fwCom::Signals::SignalKeyType SConfigLauncher::s_LAUNCHED_SIG =
"launched";
28 static const ::fwCom::Slots::SlotKeyType s_STOP_CONFIG_SLOT =
"stopConfig";
30 static const std::string s_CLOSE_CONFIG_CHANNEL_ID =
"CLOSE_CONFIG_CHANNEL";
36 m_configLauncher = ::boost::make_unique< ::fwServices::helper::ConfigLauncher>();
38 m_sigLaunched = newSignal<LaunchedSignalType>(s_LAUNCHED_SIG);
72 m_configLauncher->parseConfig(this->
getConfigTree(), this->getSptr());
84 ::fwServices::helper::ConfigLauncher::FieldAdaptorType replaceMap;
86 m_configLauncher->startConfig(this->getSptr(), replaceMap);
87 m_sigLaunched->asyncEmit();
105 if (m_configLauncher->configIsRunning())
107 m_configLauncher->stopConfig();
109 proxies->disconnect(
m_proxychannel, this->slot(s_STOP_CONFIG_SLOT));
virtual GUI_API ~SConfigLauncher() noexcept
Destructor. Do nothing.
virtual void stopping() override
This method launches the IAction::stopping method.
FWGUI_API void actionServiceStarting()
Method called when the action service is starting.
std::string m_proxychannel
Name of the channel used to connect stopConfig slot to the config frame closing.
static FWSERVICES_API Proxy::sptr getDefault()
Returns an instance of Proxy.
The namespace gui contains the basic services to build the application IHM.
FWGUI_API void actionServiceStopping()
Method called when the action service is stopping.
virtual GUI_API void setIsActive(bool isActive) override
Set the action service is activated/disable.
virtual void starting() override
This method launches the IAction::starting method.
This action starts/stops a template configuration.
Defines the service interface managing the menu items.
virtual void updating() override
Starts the view and initialize the operator.
virtual FWGUI_API void setIsActive(bool isActive)
Set the action service is active/inactive.
FWGUI_API void initialize()
Initialize the action.
virtual void configuring() override
Declare the configuration to associate with an operator type and a view config.
GUI_API SConfigLauncher() noexcept
Constructor. Do nothing.
void stopConfig()
Slot: stop the config.
FWSERVICES_API ConfigType getConfigTree() const
Return the configuration, in an boost property tree.