Engauge Digitizer  2
DocumentModelGridDisplay.h
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"
11 #include "DocumentModelAbstractBase.h"
12 #include "GridCoordDisable.h"
13 
14 class Document;
15 class QTextStream;
16 
19 {
20 public:
23 
25  DocumentModelGridDisplay(const Document &document);
26 
29 
32 
34  unsigned int countX () const;
35 
37  unsigned int countY () const;
38 
40  GridCoordDisable disableX () const;
41 
43  GridCoordDisable disableY () const;
44 
45  virtual void loadXml(QXmlStreamReader &reader);
46 
48  ColorPalette paletteColor() const;
49 
51  void printStream (QString indentation,
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 
63  void setDisableX (GridCoordDisable disableX);
64 
66  void setDisableY (GridCoordDisable disableY);
67 
69  void setPaletteColor(ColorPalette paletteColor);
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 
114 private:
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
void setStartX(double startX)
Set method for x grid line lower bound (inclusive).
GridCoordDisable disableY() const
Get method for y grid line disabled variable.
Abstract base class for document models. This class enforces a common interface for the leaf subclass...
Model for DlgSettingsGridDisplay and CmdSettingsGridDisplay.
void setCountY(unsigned int countY)
Set method for y grid line count.
void setStepX(double stepX)
Set method for x grid line increment.
unsigned int countX() const
Get method for x grid line count.
DocumentModelGridDisplay()
Default constructor.
void setStepY(double yStep)
Set method for y grid line increment.
bool stable() const
Get method for stable flag.
unsigned int countY() const
Get method for y grid line count.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
void setStable(bool stable)
Set method for stable flag.
GridCoordDisable disableX() const
Get method for x grid line disabled variable.
DocumentModelGridDisplay & operator=(const DocumentModelGridDisplay &other)
Assignment constructor.
void setStopX(double stopX)
Set method for x grid line upper bound (inclusive).
double stopY() const
Get method for y grid line upper bound (inclusive).
void setDisableX(GridCoordDisable disableX)
Set method for x grid line disabled variable.
double stopX() const
Get method for x grid line upper bound (inclusive).
ColorPalette paletteColor() const
Get method for color.
void setStopY(double yStop)
Set method for y grid line upper bound (inclusive).
Storage of one imported image and the data attached to that image.
Definition: Document.h:41
void setDisableY(GridCoordDisable disableY)
Set method for y grid line disabled variable.
double startY() const
Get method for y grid line lower bound (inclusive).
void setCountX(unsigned int countX)
Set method for x grid line count.
void setStartY(double yStart)
Set method for y grid line lower bound (inclusive).
double stepY() const
Get method for y grid line increment.
double startX() const
Get method for x grid line lower bound (inclusive).
double stepX() const
Get method for x grid line increment.
void setPaletteColor(ColorPalette paletteColor)
Set method for color.
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.