fw4spl
SBoxWidget.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 __VISUVTKADAPTOR_SBOXWIDGET_HPP__
8 #define __VISUVTKADAPTOR_SBOXWIDGET_HPP__
9 
10 #ifndef ANDROID
11 
12 #include "visuVTKAdaptor/config.hpp"
13 
14 #include <fwRenderVTK/IAdaptor.hpp>
15 
16 class vtkTransform;
17 class vtkBoxWidget2;
18 class vtkCommand;
19 
20 namespace visuVTKAdaptor
21 {
22 
43 class VISUVTKADAPTOR_CLASS_API SBoxWidget : public ::fwRenderVTK::IAdaptor
44 {
45 public:
46 
48 
49  VISUVTKADAPTOR_API SBoxWidget() noexcept;
50  VISUVTKADAPTOR_API virtual ~SBoxWidget() noexcept;
51 
52  VISUVTKADAPTOR_API void updateFromVtk();
53 
54 protected:
55 
56  VISUVTKADAPTOR_API void configuring() override;
57  VISUVTKADAPTOR_API void starting() override;
58  VISUVTKADAPTOR_API void updating() override;
59  VISUVTKADAPTOR_API void stopping() override;
60 
67  VISUVTKADAPTOR_API virtual KeyConnectionsMap getAutoConnections() const override;
68 
69  vtkTransform* m_transform;
70 
71 private:
72 
73  vtkBoxWidget2* m_vtkBoxWidget;
74  vtkCommand* m_boxWidgetCommand;
75 
76  double m_scaleFactor;
77  bool m_enableScaling;
78 };
79 
80 } // namespace visuVTKAdaptor
81 
82 #endif // ANDROID
83 
84 #endif // __VISUVTKADAPTOR_SBOXWIDGET_HPP__
85 
This class is a helper to define the connections of a service and its data.
Definition: IService.hpp:454
The namespace visuVTKAdaptor contains the list of adaptors available for the generic scene...
Displays a box widget that updates the associated TransformationMatrix3D.
Definition: SBoxWidget.hpp:43
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.