fw4spl
editor/SCreateActivity.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2016-2018.
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 #pragma once
8 
9 #include "activities/config.hpp"
10 
11 #include <fwActivities/registry/Activities.hpp>
12 #include <fwActivities/registry/ActivityMsg.hpp>
13 
14 #include <fwGui/editor/IEditor.hpp>
15 
16 #include <QButtonGroup>
17 #include <QObject>
18 #include <QPointer>
19 
20 namespace activities
21 {
22 namespace editor
23 {
24 
57 class ACTIVITIES_CLASS_API SCreateActivity : public QObject,
59 {
60 Q_OBJECT;
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_ID_SELECTED_SIG;
77  typedef ::fwCom::Signal< void (std::string) > ActivityIDSelectedSignalType;
78 
79  ACTIVITIES_API static const ::fwCom::Signals::SignalKeyType s_LOAD_REQUESTED_SIG;
80  typedef ::fwCom::Signal< void () > LoadRequestedSignalType;
82 
83 protected:
84 
86  virtual void configuring() override;
87 
89  virtual void starting() override;
90 
92  virtual void stopping() override;
93 
95  virtual void updating() override;
96 
97  typedef std::vector< std::string > KeysType;
98 
99 private Q_SLOTS:
100 
101  void onClicked(int id);
102 
103 private:
104 
109  void launchActivity(::fwMedData::ActivitySeries::sptr activitySeries);
110 
111  typedef ::fwActivities::registry::Activities::ActivitiesType ActivityInfoContainer;
112 
114  ActivityInfoContainer getEnabledActivities(const ActivityInfoContainer& infos);
115 
120  std::string m_filterMode;
121 
123  KeysType m_keys;
124 
126  ActivityInfoContainer m_activitiesInfo;
127 
129  QPointer<QButtonGroup> m_buttonGroup;
130 };
131 
132 } // namespace editor
133 } // namespace activities
Contains fwAtomsFilter::registry details.
Namespace containing medical data.
Namespace containing fw4spl communication tools.
Definition: DumpEditor.hpp:30
Defines the service interface managing the editor service for object.
Definition: IEditor.hpp:25
This editor launchs an activity according to the given configuration.
STL namespace.
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.