fw4spl
SSlotCaller.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-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 __GUI_ACTION_SSLOTCALLER_HPP__
8 #define __GUI_ACTION_SSLOTCALLER_HPP__
9 
10 #include "gui/config.hpp"
11 
12 #include <fwCom/Slots.hpp>
13 
14 #include <fwGui/IActionSrv.hpp>
15 
16 #include <fwServices/IService.hpp>
17 
18 #include <vector>
19 
20 namespace gui
21 {
22 namespace action
23 {
24 
38 class GUI_CLASS_API SSlotCaller : public ::fwGui::IActionSrv
39 {
40 
41 public:
42 
44  typedef ::fwRuntime::ConfigurationElement::sptr ConfigurationType;
45 
46  typedef std::string HasSlotIDType;
47  typedef std::pair< HasSlotIDType, ::fwCom::Slots::SlotKeyType> SlotInfoType;
48  typedef std::vector< SlotInfoType > SlotInfoContainerType;
49 
51  GUI_API SSlotCaller() noexcept;
52 
54  GUI_API virtual ~SSlotCaller() noexcept;
55 
56 protected:
57 
59  GUI_API virtual void info(std::ostream& _sstream ) override;
60 
62  GUI_API void updating() override;
63 
65  GUI_API void configuring() override;
66 
67  GUI_API virtual void starting() override;
68 
69  GUI_API virtual void stopping() override;
70 
71  // Vector representing slots
72  SlotInfoContainerType m_slotInfos;
73 };
74 
75 } // namespace action
76 } // namespace gui
77 
78 #endif /*__GUI_ACTION_SSLOTCALLER_HPP__*/
Run a slot given by HasSlot id and slot key.
Definition: SSlotCaller.hpp:38
The namespace gui contains the basic services to build the application IHM.
STL namespace.
Defines the service interface managing the menu items.
Definition: IActionSrv.hpp:24
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.