Engauge Digitizer 2
Loading...
Searching...
No Matches
DocumentModelGridDisplay.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 DOCUMENT_MODEL_GRID_DISPLAY
8#define DOCUMENT_MODEL_GRID_DISPLAY
9
10#include "ColorPalette.h"
12#include "GridCoordDisable.h"
13
14class Document;
15class QTextStream;
16
22{
23public:
26
28 DocumentModelGridDisplay(const Document &document);
29
32
35
37 unsigned int countX () const;
38
40 unsigned int countY () const;
41
44
47
49 unsigned int lineWidth() const;
50
51 virtual void loadXml(QXmlStreamReader &reader);
52
55
57 void printStream (QString indentation,
58 QTextStream &str) const;
59
60 virtual void saveXml(QXmlStreamWriter &writer) const;
61
63 void setCountX (unsigned int countX);
64
66 void setCountY (unsigned int countY);
67
70
73
75 void setLineWidth (unsigned int lineWidth);
76
79
81 void setStable (bool stable);
82
84 void setStartX (double startX);
85
87 void setStartY (double yStart);
88
90 void setStepX (double stepX);
91
93 void setStepY (double yStep);
94
96 void setStopX (double stopX);
97
99 void setStopY (double yStop);
100
103 bool stable() const;
104
106 double startX () const;
107
109 double startY () const;
110
112 double stepX () const;
113
115 double stepY () const;
116
118 double stopX () const;
119
121 double stopY () const;
122
123private:
124
125 bool m_stable;
126 GridCoordDisable m_disableX;
127 unsigned int m_countX;
128 double m_startX;
129 double m_stepX;
130 double m_stopX;
131
132 GridCoordDisable m_disableY;
133 unsigned int m_countY;
134 double m_startY;
135 double m_stepY;
136 double m_stopY;
137
138 ColorPalette m_paletteColor;
139 unsigned int m_lineWidth;
140};
141
142#endif // DOCUMENT_MODEL_GRID_DISPLAY
ColorPalette
GridCoordDisable
DocumentModelAbstractBase()
Single constructor.
GridCoordDisable disableY() const
Get method for y grid line disabled variable.
unsigned int countX() const
Get method for x grid line count.
void setPaletteColor(ColorPalette paletteColor)
Set method for color.
double startX() const
Get method for x grid line lower bound (inclusive).
GridCoordDisable disableX() const
Get method for x grid line disabled variable.
unsigned int countY() const
Get method for y grid line count.
double stepX() const
Get method for x grid line increment.
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
DocumentModelGridDisplay & operator=(const DocumentModelGridDisplay &other)
Assignment constructor.
void setStepX(double stepX)
Set method for x grid line increment.
double stopX() const
Get method for x grid line upper bound (inclusive).
double stopY() const
Get method for y grid line upper bound (inclusive).
bool stable() const
Get method for stable flag.
void setStepY(double yStep)
Set method for y grid line increment.
void setStopX(double stopX)
Set method for x grid line upper bound (inclusive).
void setLineWidth(unsigned int lineWidth)
Set method for line width.
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
void setDisableX(GridCoordDisable disableX)
Set method for x grid line disabled variable.
ColorPalette paletteColor() const
Get method for color.
void setStopY(double yStop)
Set method for y grid line upper bound (inclusive).
void setDisableY(GridCoordDisable disableY)
Set method for y grid line disabled variable.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
double stepY() const
Get method for y grid line increment.
void setCountX(unsigned int countX)
Set method for x grid line count.
void setStartX(double startX)
Set method for x grid line lower bound (inclusive).
void setStable(bool stable)
Set method for stable flag.
double startY() const
Get method for y grid line lower bound (inclusive).
DocumentModelGridDisplay()
Default constructor.
void setStartY(double yStart)
Set method for y grid line lower bound (inclusive).
void setCountY(unsigned int countY)
Set method for y grid line count.
unsigned int lineWidth() const
Get method for line width.
Storage of one imported image and the data attached to that image.
Definition Document.h:44