fw4spl
scene2D/include/scene2D/adaptor/SLine.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_SLINE_HPP__
8 #define __SCENE2D_ADAPTOR_SLINE_HPP__
9 
10 #include "scene2D/config.hpp"
11 
12 #include <fwRenderQt/IAdaptor.hpp>
13 
14 namespace scene2D
15 {
16 namespace adaptor
17 {
18 
41 class SCENE2D_CLASS_API SLine : public ::fwRenderQt::IAdaptor
42 {
43 
44 public:
46 
48  SCENE2D_API SLine() noexcept;
49 
51  SCENE2D_API virtual ~SLine() noexcept;
52 
53 protected:
54 
55  SCENE2D_API void configuring() override;
56 
58  SCENE2D_API void starting() override;
59 
61  SCENE2D_API void updating() override;
62 
64  SCENE2D_API void stopping() override;
65 
66 private:
67 
69  void draw();
70 
72  float m_x1, m_x2, m_y1, m_y2;
73 
75  QPen m_pen;
76 
78  QGraphicsItemGroup* m_layer;
79 };
80 
81 } // namespace adaptor
82 } // namespace scene2D
83 
84 #endif // __SCENE2D_ADAPTOR_SLINE_HPP__
85 
Root class for all scene2d adaptors.
Line adaptor. Draw a line on the scene2D.
This bundles contains data and services used to display a 2D Qt scene.
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.