Engauge Digitizer  2
GridLines.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_LINES_H
8 #define GRID_LINES_H
9 
10 #include "GridLine.h"
11 #include <QList>
12 
13 class QPen;
14 
15 typedef QList<GridLine*> GridLinesContainer;
16 
18 class GridLines
19 {
20  public:
22  GridLines();
23 
25  ~GridLines();
26 
28  void add (GridLine *gridLine);
29 
31  void clear ();
32 
34  void setPen (const QPen &pen);
35 
37  void setVisible (bool visible);
38 
39  private:
40 
41  GridLinesContainer m_gridLinesContainer;
42 
43 };
44 
45 #endif // GRID_LINES_H
~GridLines()
Destructor deallocates memory.
Definition: GridLines.cpp:14
void clear()
Deallocate and remove all grid lines.
Definition: GridLines.cpp:24
void setPen(const QPen &pen)
Set the pen style of each grid line.
Definition: GridLines.cpp:34
Container class for GridLine objects.
Definition: GridLines.h:18
void setVisible(bool visible)
Make all grid lines visible or hidden.
Definition: GridLines.cpp:41
GridLines()
Single constructor.
Definition: GridLines.cpp:10
void add(GridLine *gridLine)
Add specified grid line. Ownership of all allocated QGraphicsItems is passed to new GridLine...
Definition: GridLines.cpp:19
Single grid line drawn a straight or curved line.
Definition: GridLine.h:20
QList< GridLine * > GridLinesContainer
Definition: GridLines.h:13