Engauge Digitizer  2
 All Classes Files Functions Variables Enumerations Enumerator Friends Pages
GridLine.h
1 #ifndef GRID_LINE_H
2 #define GRID_LINE_H
3 
4 #include <QList>
5 
6 class QGraphicsItem;
7 class QGraphicsScene;
8 class QPen;
9 
10 typedef QList<QGraphicsItem *> SegmentContainer;
11 
14 class GridLine
15 {
16 public:
18  GridLine ();
19  virtual ~GridLine ();
20 
22  GridLine (const GridLine &other);
23 
25  GridLine &operator= (GridLine &other);
26 
28  void add (QGraphicsItem *item);
29 
31  void setPen (const QPen &pen);
32 
34  void setVisible (bool visible);
35 
36 private:
37 
38  SegmentContainer m_segments;
39 };
40 
41 #endif // GRID_LINE_H
GridLine()
Default constructor for storage in containers.
Definition: GridLine.cpp:14
GridLine & operator=(GridLine &other)
Assignment constructor. This will assert if called since copying of pointer containers is problematic...
Definition: GridLine.cpp:35
void setPen(const QPen &pen)
Set the pen style.
Definition: GridLine.cpp:47
Single grid line drawn a straight or curved line.
Definition: GridLine.h:14
void setVisible(bool visible)
Set each grid line as visible or hidden.
Definition: GridLine.cpp:65
void add(QGraphicsItem *item)
Add graphics item which represents one segment of the line.
Definition: GridLine.cpp:42