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
19{
20public:
23
25 DocumentModelGridDisplay(const Document &document);
26
29
32
34 unsigned int countX () const;
35
37 unsigned int countY () const;
38
41
44
45 virtual void loadXml(QXmlStreamReader &reader);
46
49
52 QTextStream &str) const;
53
54 virtual void saveXml(QXmlStreamWriter &writer) const;
55
57 void setCountX (unsigned int countX);
58
60 void setCountY (unsigned int countY);
61
64
67
70
72 void setStable (bool stable);
73
75 void setStartX (double startX);
76
78 void setStartY (double yStart);
79
81 void setStepX (double stepX);
82
84 void setStepY (double yStep);
85
87 void setStopX (double stopX);
88
90 void setStopY (double yStop);
91
94 bool stable() const;
95
97 double startX () const;
98
100 double startY () const;
101
103 double stepX () const;
104
106 double stepY () const;
107
109 double stopX () const;
110
112 double stopY () const;
113
114private:
115
116 bool m_stable;
117 GridCoordDisable m_disableX;
118 unsigned int m_countX;
119 double m_startX;
120 double m_stepX;
121 double m_stopX;
122
123 GridCoordDisable m_disableY;
124 unsigned int m_countY;
125 double m_startY;
126 double m_stepY;
127 double m_stopY;
128
129 ColorPalette m_paletteColor;
130};
131
132#endif // DOCUMENT_MODEL_GRID_DISPLAY
ColorPalette
const int INNER_RADIUS_MIN
GridCoordDisable
Abstract base class for document models. This class enforces a common interface for the leaf subclass...
Model for DlgSettingsGridDisplay and CmdSettingsGridDisplay.
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).
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.
Storage of one imported image and the data attached to that image.
Definition Document.h:42