Engauge Digitizer  2
DocumentModelGridRemoval.h
1 #ifndef DOCUMENT_MODEL_GRID_REMOVAL_H
2 #define DOCUMENT_MODEL_GRID_REMOVAL_H
3 
4 #include "DocumentModelAbstractBase.h"
5 #include "GridCoordDisable.h"
6 
7 class Document;
8 class QTextStream;
9 
12 {
13 public:
16 
19  double startY,
20  double stepX,
21  double stepY,
22  int countX,
23  int countY);
24 
26  DocumentModelGridRemoval(const Document &document);
27 
30 
33 
35  double closeDistance() const;
36 
38  int countX() const;
39 
41  int countY() const;
42 
44  GridCoordDisable gridCoordDisableX () const;
45 
47  GridCoordDisable gridCoordDisableY () const;
48 
49  virtual void loadXml(QXmlStreamReader &reader);
50 
52  void printStream (QString indentation,
53  QTextStream &str) const;
54 
56  bool removeDefinedGridLines () const;
57 
58  virtual void saveXml(QXmlStreamWriter &writer) const;
59 
61  void setCloseDistance (double closeDistance);
62 
64  void setCountX(int countX);
65 
67  void setCountY(int countY);
68 
70  void setGridCoordDisableX (GridCoordDisable gridCoordDisable);
71 
73  void setGridCoordDisableY (GridCoordDisable gridCoordDisable);
74 
76  void setRemoveDefinedGridLines (bool removeDefinedGridLines);
77 
79  void setStable ();
80 
82  void setStartX(double startX);
83 
85  void setStartY(double startY);
86 
88  void setStepX(double stepX);
89 
91  void setStepY(double stepY);
92 
94  void setStopX(double stopX);
95 
97  void setStopY(double stopY);
98 
101  bool stable() const;
102 
104  double startX() const;
105 
107  double startY() const;
108 
110  double stepX() const;
111 
113  double stepY() const;
114 
116  double stopX() const;
117 
119  double stopY() const;
120 
121 private:
122 
123  void setStable (bool stable); // Private version is for initialization
124 
125  bool m_stable;
126  bool m_removeDefinedGridLines;
127  double m_closeDistance;
128  GridCoordDisable m_gridCoordDisableX;
129  int m_countX;
130  double m_startX;
131  double m_stepX;
132  double m_stopX;
133  GridCoordDisable m_gridCoordDisableY;
134  int m_countY;
135  double m_startY;
136  double m_stepY;
137  double m_stopY;
138 };
139 
140 #endif // DOCUMENT_MODEL_GRID_REMOVAL_H
double closeDistance() const
Get method for close distance.
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
Abstract base class for document models. This class enforces a common interface for the leaf subclass...
DocumentModelGridRemoval()
Default constructor.
bool removeDefinedGridLines() const
Get method for removing defined grid lines.
void setCloseDistance(double closeDistance)
Set method for close distance.
double startY() const
Get method for y start.
void setCountX(int countX)
Set method for x count.
void setStopY(double stopY)
Set method for y stop.
void setStartY(double startY)
Set method for y start.
GridCoordDisable gridCoordDisableX() const
Get method for x coord parameter to disable.
void setStepY(double stepY)
Set method for y step.
bool stable() const
Get method for stable flag.
double stepY() const
Get method for y step.
GridCoordDisable gridCoordDisableY() const
Get method for y coord parameter to disable.
void setStartX(double startX)
Set method for x start.
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
DocumentModelGridRemoval & operator=(const DocumentModelGridRemoval &other)
Assignment constructor.
void setCountY(int countY)
Set method for y count.
void setStepX(double stepX)
Set method for x step.
double stopX() const
Get method for x stop.
void setRemoveDefinedGridLines(bool removeDefinedGridLines)
Set method for removing defined grid lines.
double startX() const
Get method for x start.
double stopY() const
Get method for y stop.
Storage of one imported image and the data attached to that image.
Definition: Document.h:28
void setGridCoordDisableY(GridCoordDisable gridCoordDisable)
Set method for y coord parameter to disable.
void setGridCoordDisableX(GridCoordDisable gridCoordDisable)
Set method for x coord parameter to disable.
int countX() const
Get method for x count.
int countY() const
Get method for y count.
double stepX() const
Get method for x step.
void setStable()
Set the stable flag to true. This public version has no argument since it cannot be undone...
Model for DlgSettingsGridRemoval and CmdSettingsGridRemoval. The settings are unstable until the user...
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
void setStopX(double stopX)
Set method for x stop.