Engauge Digitizer 2
Loading...
Searching...
No Matches
GridLine.h
Go to the documentation of this file.
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 GRID_LINE_H
8#define GRID_LINE_H
9
10#include <QList>
11
12class QGraphicsItem;
13class QGraphicsScene;
14class QPen;
15
16typedef QList<QGraphicsItem *> SegmentContainer;
17
21{
22public:
24 GridLine ();
25 virtual ~GridLine ();
26
28 GridLine (const GridLine &other);
29
32
34 void add (QGraphicsItem *item);
35
37 void setPen (const QPen &pen);
38
40 void setVisible (bool visible);
41
42private:
43
44 SegmentContainer m_segments;
45};
46
47#endif // GRID_LINE_H
QList< QGraphicsItem * > SegmentContainer
Definition GridLine.h:16
void setPen(const QPen &pen)
Set the pen style.
Definition GridLine.cpp:50
GridLine & operator=(GridLine &other)
Assignment constructor. This will assert if called since copying of pointer containers is problematic...
Definition GridLine.cpp:37
void add(QGraphicsItem *item)
Add graphics item which represents one segment of the line.
Definition GridLine.cpp:45
void setVisible(bool visible)
Set each grid line as visible or hidden.
Definition GridLine.cpp:68
virtual ~GridLine()
Definition GridLine.cpp:25
GridLine()
Default constructor for storage in containers.
Definition GridLine.cpp:15