13#include <QXmlStreamWriter>
24 m_removeDefinedGridLines (false),
46 m_removeDefinedGridLines (false),
62 m_stable (document.modelGridRemoval().
stable()),
64 m_closeDistance (document.modelGridRemoval().
closeDistance()),
66 m_countX (document.modelGridRemoval().
countX()),
67 m_startX (document.modelGridRemoval().
startX()),
68 m_stepX (document.modelGridRemoval().
stepX()),
69 m_stopX (document.modelGridRemoval().
stopX()),
71 m_countY (document.modelGridRemoval().
countY()),
72 m_startY (document.modelGridRemoval().
startY()),
73 m_stepY (document.modelGridRemoval().
stepY()),
74 m_stopY (document.modelGridRemoval().
stopY())
85 m_stepX (other.
stepX()),
86 m_stopX (other.
stopX()),
90 m_stepY (other.
stepY()),
91 m_stopY (other.
stopY())
101 m_countX = other.
countX();
102 m_startX = other.
startX();
103 m_stepX = other.
stepX();
104 m_stopX = other.
stopX();
106 m_countY = other.
countY();
107 m_startY = other.
startY();
108 m_stepY = other.
stepY();
109 m_stopY = other.
stopY();
116 return m_closeDistance;
131 return m_gridCoordDisableX;
136 return m_gridCoordDisableY;
145 QXmlStreamAttributes attributes = reader.attributes();
180 while ((reader.tokenType() != QXmlStreamReader::EndElement) ||
183 if (reader.atEnd()) {
191 reader.raiseError (QObject::tr (
"Cannot read grid removal data"));
196 QTextStream &str)
const
198 str << indentation <<
"DocumentModelGridRemoval\n";
202 str << indentation <<
"stable=" << (m_stable ?
"true" :
"false") <<
"\n";
203 str << indentation <<
"removeDefinedGridLines=" << (m_removeDefinedGridLines ?
"true" :
"false") <<
"\n";
204 str << indentation <<
"closeDistance=" << m_closeDistance <<
"\n";
206 str << indentation <<
"countX=" << m_countX <<
"\n";
207 str << indentation <<
"startX=" << m_startX <<
"\n";
208 str << indentation <<
"stepX=" << m_stepX <<
"\n";
209 str << indentation <<
"stopX=" << m_stopX <<
"\n";
211 str << indentation <<
"countY=" << m_countY <<
"\n";
212 str << indentation <<
"startY=" << m_startY <<
"\n";
213 str << indentation <<
"stepY=" << m_stepY <<
"\n";
214 str << indentation <<
"stopY=" << m_stopY <<
"\n";
219 return m_removeDefinedGridLines;
247 writer.writeEndElement();
267 m_gridCoordDisableX = gridCoordDisable;
272 m_gridCoordDisableY = gridCoordDisable;
const double DEFAULT_NON_COUNT
const double CLOSE_DISTANCE_DEFAULT
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_STABLE
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_STEP_X
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_STEP_Y
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_COUNT_X
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_START_X
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_STOP_X
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_COORD_DISABLE_Y
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_COORD_DISABLE_Y_STRING
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_CLOSE_DISTANCE
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_START_Y
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_DEFINED_GRID_LINES
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_STOP_Y
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_COUNT_Y
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_COORD_DISABLE_X
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_COORD_DISABLE_X_STRING
const QString DOCUMENT_SERIALIZE_BOOL_TRUE
const QString DOCUMENT_SERIALIZE_BOOL_FALSE
QString gridCoordDisableToString(GridCoordDisable gridCoordDisable)
@ GRID_COORD_DISABLE_COUNT
log4cpp::Category * mainCat
const QString INDENTATION_DELTA
QXmlStreamReader::TokenType loadNextFromReader(QXmlStreamReader &reader)
Load next token from xml reader.
double closeDistance() const
Get method for close distance.
GridCoordDisable gridCoordDisableX() const
Get method for x coord parameter to disable.
bool removeDefinedGridLines() const
Get method for removing defined grid lines.
double stopX() const
Get method for x stop.
GridCoordDisable gridCoordDisableY() const
Get method for y coord parameter to disable.
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
void setCloseDistance(double closeDistance)
Set method for close distance.
void setStopY(double stopY)
Set method for y stop.
double startX() const
Get method for x start.
void setCountX(int countX)
Set method for x count.
double stopY() const
Get method for y stop.
void setGridCoordDisableY(GridCoordDisable gridCoordDisable)
Set method for y coord parameter to disable.
double stepX() const
Get method for x step.
DocumentModelGridRemoval & operator=(const DocumentModelGridRemoval &other)
Assignment constructor.
void setStable()
Set the stable flag to true. This public version has no argument since it cannot be undone.
void setGridCoordDisableX(GridCoordDisable gridCoordDisable)
Set method for x coord parameter to disable.
void setStepX(double stepX)
Set method for x step.
void setStopX(double stopX)
Set method for x stop.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
void setStartY(double startY)
Set method for y start.
double stepY() const
Get method for y step.
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
int countY() const
Get method for y count.
int countX() const
Get method for x count.
double startY() const
Get method for y start.
void setRemoveDefinedGridLines(bool removeDefinedGridLines)
Set method for removing defined grid lines.
bool stable() const
Get method for stable flag.
void setStepY(double stepY)
Set method for y step.
DocumentModelGridRemoval()
Default constructor.
void setStartX(double startX)
Set method for x start.
void setCountY(int countY)
Set method for y count.
Storage of one imported image and the data attached to that image.
#define LOG4CPP_INFO_S(logger)