fw4spl
SManageLandmark.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 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 __UIMEASUREMENT_SMANAGELANDMARK_HPP__
8 #define __UIMEASUREMENT_SMANAGELANDMARK_HPP__
9 
10 #include "uiMeasurement/config.hpp"
11 
12 #include <fwCom/Slot.hpp>
13 
14 #include <fwDataTools/PickingInfo.hpp>
15 
16 #include <fwServices/IController.hpp>
17 
18 namespace uiMeasurement
19 {
38 class UIMEASUREMENT_CLASS_API SManageLandmark : public ::fwServices::IController
39 {
40 public:
41 
43 
47  UIMEASUREMENT_API SManageLandmark() noexcept;
48 
52  virtual ~SManageLandmark() noexcept
53  {
54  }
55 
60  UIMEASUREMENT_API static const ::fwCom::Slots::SlotKeyType s_CREATE_LANDMARK_SLOT;
61  UIMEASUREMENT_API static const ::fwCom::Slots::SlotKeyType s_CLEAR_SLOT;
63 
64 protected:
65 
69  UIMEASUREMENT_API void configuring() override;
70 
72  UIMEASUREMENT_API void starting() override;
73 
75  UIMEASUREMENT_API void stopping() override;
76 
78  UIMEASUREMENT_API void updating() override;
79 
80 private:
81 
83  void createLandmark(::fwDataTools::PickingInfo info);
84 
86  void clearPointlist();
87 
88  size_t m_counter;
89 
90 };
91 
92 } //namespace uiMeasurement
93 
94 #endif // __UIMEASUREMENT_SMANAGELANDMARK_HPP__
The namespace uiMeasurement contains actions to add/show/remove distances and landmarks.
Definition: AddDistance.hpp:13
This interface defines control service API. Does nothing particularly, can be considered as a default...
Definition: IController.hpp:23
Structure to store picking information.
Definition: PickingInfo.hpp:20
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
SManageLandmark adds a point into a pointlist on ctrl-left click.