fw4spl
SSeriesSignal.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 <fwCom/Signal.hpp>
12 #include <fwCom/Signals.hpp>
13 #include <fwCom/Slot.hpp>
14 #include <fwCom/Slots.hpp>
15 
16 #include <fwMedData/Series.hpp>
17 #include <fwMedData/SeriesDB.hpp>
18 
19 #include <fwServices/IController.hpp>
20 
21 namespace activities
22 {
23 
60 class ACTIVITIES_CLASS_API SSeriesSignal : public ::fwServices::IController
61 {
62 
63 public:
64 
66 
68  ACTIVITIES_API SSeriesSignal() noexcept;
69 
71  ACTIVITIES_API virtual ~SSeriesSignal() noexcept;
72 
73  ACTIVITIES_API static const ::fwCom::Slots::SlotKeyType s_REPORT_SERIES_SLOT;
74 
75  typedef ::fwCom::Signal< void ( ::fwMedData::Series::sptr ) > SeriesAddedSignalType;
76  ACTIVITIES_API static const ::fwCom::Signals::SignalKeyType s_SERIES_ADDED_SIG;
77 
85  ACTIVITIES_API virtual KeyConnectionsType getObjSrvConnections() const override;
86 
87 protected:
88 
90  virtual void starting() override;
91 
93  virtual void stopping() override;
94 
96  virtual void updating() override;
97 
99  virtual void configuring() override;
100 
108  ACTIVITIES_API KeyConnectionsMap getAutoConnections() const override;
109 
110 private:
111 
112  typedef std::vector< std::string > TypesType;
113 
118  void reportSeries(::fwMedData::SeriesDB::ContainerType addedSeries);
119 
124  std::string m_filterMode;
125 
127  TypesType m_types;
128 
130  SeriesAddedSignalType::sptr m_sigSeriesAdded;
131 
132 };
133 
134 } // gui
This class is a helper to define the connections of a service and its data.
Definition: IService.hpp:454
Namespace containing medical data.
Namespace containing fw4spl communication tools.
Definition: DumpEditor.hpp:30
This service emits a signal for each added series (the signal contains the added series) ...
STL namespace.
This interface defines control service API. Does nothing particularly, can be considered as a default...
Definition: IController.hpp:23
The namespace activities contains helpers and services allowing to launch activities.
::fwCom::helper::SigSlotConnection::KeyConnectionsType KeyConnectionsType
Returns proposals to connect service slots to associated object signals, this method is used for obj/...
Definition: IService.hpp:449
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.