fw4spl
S2DWheel.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 __VISUVTKADAPTOR_S2DWHEEL_HPP__
8 #define __VISUVTKADAPTOR_S2DWHEEL_HPP__
9 
10 #include "visuVTKAdaptor/config.hpp"
11 
12 #include <fwCom/Signal.hpp>
13 
14 #include <fwRenderVTK/IAdaptor.hpp>
15 #include <fwRenderVTK/vtk/fwVtkWheelWidget.hpp>
16 
17 #include <fwVtkIO/helper/vtkLambdaCommand.hpp>
18 
19 #include <vtkSmartPointer.h>
20 
21 namespace visuVTKAdaptor
22 {
23 
44 class VISUVTKADAPTOR_CLASS_API S2DWheel : public ::fwRenderVTK::IAdaptor
45 {
46 public:
47 
49 
50  typedef ::fwCom::Signal<void (double, double, double)> WheelUpdatedSignalType;
51 
53  VISUVTKADAPTOR_API S2DWheel() noexcept;
54 
56  VISUVTKADAPTOR_API virtual ~S2DWheel() noexcept;
57 
58 protected:
59 
60  VISUVTKADAPTOR_API virtual void configuring() override;
61 
63  VISUVTKADAPTOR_API virtual void starting() override;
64 
66  VISUVTKADAPTOR_API virtual void updating() override;
67 
69  VISUVTKADAPTOR_API virtual void stopping() override;
70 
71 private:
72 
74  VISUVTKADAPTOR_API void updateVisibility ( bool isVisible );
75 
77  vtkSmartPointer< fwVtkWheelWidget > m_wheelWidget;
78 
80  vtkSmartPointer< ::fwVtkIO::helper::vtkLambdaCommand > m_resizeCallback;
81 
83  WheelUpdatedSignalType::sptr m_wheelUpdatedSignal;
84 
86  bool m_visible;
87 };
88 
89 } // namespace visuVTKAdaptor
90 
91 #endif // __VISUVTKADAPTOR_S2DWHEEL_HPP__
The namespace visuVTKAdaptor contains the list of adaptors available for the generic scene...
Implements the interactions with the wheel widget.
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
Render a rotatable 2D wheel in screen-space.
Definition: S2DWheel.hpp:44