fw4spl
SViewportInteractor.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 __SCENE2D_ADAPTOR_SVIEWPORTINTERACTOR_HPP__
8 #define __SCENE2D_ADAPTOR_SVIEWPORTINTERACTOR_HPP__
9 
10 #include "scene2D/config.hpp"
11 
12 #include <fwRenderQt/IAdaptor.hpp>
13 
14 namespace scene2D
15 {
16 namespace adaptor
17 {
18 
30 class SCENE2D_CLASS_API SViewportInteractor : public ::fwRenderQt::IAdaptor
31 {
32 
33 public:
34 
36 
37  SCENE2D_API SViewportInteractor() noexcept;
38 
39  SCENE2D_API ~SViewportInteractor() noexcept;
40 
41 protected:
42 
43  SCENE2D_API void configuring() override;
44 
45  SCENE2D_API void starting() override;
46 
47  SCENE2D_API void updating() override;
48 
49  SCENE2D_API void stopping() override;
50 
51  SCENE2D_API void processInteraction( ::fwRenderQt::data::Event& _event ) override;
52 
53  SCENE2D_API void zoom( bool zoomIn );
54 
55 private:
56 
57  bool m_viewportIsTranslated;
58  ::fwRenderQt::data::Coord m_lastCoordEvent;
59 };
60 
61 } // namespace adaptor
62 } // namespace scene2D
63 
64 #endif // __SCENE2D_ADAPTOR_SVIEWPORTINTERACTOR_HPP__
Root class for all scene2d adaptors.
This bundles contains data and services used to display a 2D Qt scene.
Adaptor implementation that manages the camera on the view.
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
The namespace fwRenderQt contains classes for rendering with Qt.
Definition: Axis.hpp:12