Engauge Digitizer  2
GhostPath.cpp
1 /******************************************************************************************************
2  * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3  * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4  * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5  ******************************************************************************************************/
6 
7 #include "GhostPath.h"
8 
9 GhostPath::GhostPath(const QPainterPath &path,
10  const QPen &pen,
11  const QBrush &brush) :
12  m_path (path),
13  m_pen (pen),
14  m_brush (brush)
15 {
16 }
17 
19  m_path (other.path ()),
20  m_pen (other.pen()),
21  m_brush (other.brush ())
22 {
23 }
24 
26 {
27  m_path = other.path();
28  m_pen = other.pen();
29  m_brush = other.brush();
30 
31  return *this;
32 }
33 
34 GhostPath::~GhostPath()
35 {
36 }
37 
38 QBrush GhostPath::brush() const
39 {
40  return m_brush;
41 }
42 
43 QPainterPath GhostPath::path() const
44 {
45  return m_path;
46 }
47 
48 QPen GhostPath::pen() const
49 {
50  return m_pen;
51 }
QBrush brush() const
Get method for brush.
Definition: GhostPath.cpp:38
Ghost for a QGraphicsPathItem.
Definition: GhostPath.h:15
GhostPath(const QPainterPath &path, const QPen &pen, const QBrush &brush)
Initial constructor.
Definition: GhostPath.cpp:9
QPainterPath path() const
Get method for path.
Definition: GhostPath.cpp:43
QPen pen() const
Get method for pen.
Definition: GhostPath.cpp:48
GhostPath & operator=(const GhostPath &other)
Assignment operator.
Definition: GhostPath.cpp:25