Engauge Digitizer  2
Ghosts.h
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 #ifndef GHOSTS_H
8 #define GHOSTS_H
9 
10 #include "GhostEllipse.h"
11 #include "GhostPath.h"
12 #include "GhostPolygon.h"
13 #include <QList>
14 #include <QPainterPath>
15 #include <QPolygonF>
16 #include <QRectF>
17 
18 class QGraphicsScene;
19 
26 class Ghosts
27 {
28  public:
31  ~Ghosts();
32 
34  unsigned int coordSystemIndexToBeRestored() const;
35 
37  void captureGraphicsItems (QGraphicsScene &scene);
38 
40  void createGhosts (QGraphicsScene &scene);
41 
43  void destroyGhosts (QGraphicsScene &scene);
44 
45  private:
46  Ghosts();
47 
48  unsigned int m_coordSystemIndexToBeRestored;
49 
50  QList<GhostEllipse> m_ellipses;
51  QList<GhostPath> m_paths;
52  QList<GhostPolygon> m_polygons;
53 };
54 
55 #endif // GHOSTS_H
void createGhosts(QGraphicsScene &scene)
Create ghosts from the path/rect/polygon lists.
Definition: Ghosts.cpp:78
unsigned int coordSystemIndexToBeRestored() const
Coordinate system index that was active before the ghosts.
Definition: Ghosts.cpp:73
Class for showing points and lines for all coordinate systems simultaneously, even though the code no...
Definition: Ghosts.h:26
void captureGraphicsItems(QGraphicsScene &scene)
Take a snapshot of the graphics items.
Definition: Ghosts.cpp:26
void destroyGhosts(QGraphicsScene &scene)
Destory ghosts. Called at end of algorithm.
Definition: Ghosts.cpp:119