fw4spl
action/SCreateActivity.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2016-2017.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #ifndef __ACTIVITIES_ACTION_SCREATEACTIVITY_HPP__
8 #define __ACTIVITIES_ACTION_SCREATEACTIVITY_HPP__
9 
10 #include "activities/config.hpp"
11 
12 #include <fwActivities/registry/Activities.hpp>
13 #include <fwActivities/registry/ActivityMsg.hpp>
14 
15 #include <fwData/Vector.hpp>
16 
17 #include <fwGui/IActionSrv.hpp>
18 
19 namespace activities
20 {
21 namespace action
22 {
23 
59 class ACTIVITIES_CLASS_API SCreateActivity : public ::fwGui::IActionSrv
60 {
61 
62 public:
63 
65 
67  ACTIVITIES_API SCreateActivity() noexcept;
68 
70  ACTIVITIES_API virtual ~SCreateActivity() noexcept;
71 
76  ACTIVITIES_API static const ::fwCom::Signals::SignalKeyType s_ACTIVITY_SELECTED_SIG;
77  typedef ::fwCom::Signal< void ( ::fwMedData::ActivitySeries::sptr ) > ActivitySelectedSignalType;
78 
79  ACTIVITIES_API static const ::fwCom::Signals::SignalKeyType s_ACTIVITY_ID_SELECTED_SIG;
80  typedef ::fwCom::Signal< void (std::string) > ActivityIDSelectedSignalType;
82 
83 protected:
84 
86  virtual void starting() override;
87 
89  virtual void stopping() override;
90 
94  virtual void updating() override;
95 
100  virtual void configuring() override;
101 
102  typedef std::vector< std::string > KeysType;
103 
104 private:
105 
110  void launchActivity(::fwMedData::ActivitySeries::sptr activitySeries);
111 
112  typedef ::fwActivities::registry::Activities::ActivitiesType ActivityInfoContainer;
113 
115  ::fwActivities::registry::ActivityInfo show( const ActivityInfoContainer& infos );
116 
118  ActivityInfoContainer getEnabledActivities(const ActivityInfoContainer& infos);
119 
124  std::string m_filterMode;
125 
127  KeysType m_keys;
128 
130  ActivityIDSelectedSignalType::sptr m_sigActivityIDSelected;
131 
133  ActivitySelectedSignalType::sptr m_sigActivitySelected;
134 };
135 
136 } // namespace action
137 } // namespace activities
138 
139 #endif // __ACTIVITIES_ACTION_SCREATEACTIVITY_HPP__
Contains fwAtomsFilter::registry details.
Namespace containing medical data.
Namespace containing fw4spl communication tools.
Definition: DumpEditor.hpp:30
STL namespace.
Defines the service interface managing the menu items.
Definition: IActionSrv.hpp:24
The namespace activities contains helpers and services allowing to launch activities.
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
Namespace containing activities data and builder.
This action launchs an activity according to the given configuration.