12 #include <QTextStream>
13 #include <QXmlStreamWriter>
24 m_removeDefinedGridLines (false),
46 m_removeDefinedGridLines (false),
52 m_stopX (startX + (countX - 1.0) * stepX),
57 m_stopY (startY + (countY - 1.0) * stepY)
62 m_stable (document.modelGridRemoval().stable()),
63 m_removeDefinedGridLines (document.modelGridRemoval().removeDefinedGridLines()),
64 m_closeDistance (document.modelGridRemoval().closeDistance()),
65 m_gridCoordDisableX (document.modelGridRemoval().gridCoordDisableX()),
66 m_countX (document.modelGridRemoval().countX()),
67 m_startX (document.modelGridRemoval().startX()),
68 m_stepX (document.modelGridRemoval().stepX()),
69 m_stopX (document.modelGridRemoval().stopX()),
70 m_gridCoordDisableY (document.modelGridRemoval().gridCoordDisableY()),
71 m_countY (document.modelGridRemoval().countY()),
72 m_startY (document.modelGridRemoval().startY()),
73 m_stepY (document.modelGridRemoval().stepY()),
74 m_stopY (document.modelGridRemoval().stopY())
79 m_stable (other.stable()),
80 m_removeDefinedGridLines (other.removeDefinedGridLines()),
81 m_closeDistance (other.closeDistance()),
82 m_gridCoordDisableX (other.gridCoordDisableX()),
83 m_countX (other.countX()),
84 m_startX (other.startX()),
85 m_stepX (other.stepX()),
86 m_stopX (other.stopX()),
87 m_gridCoordDisableY (other.gridCoordDisableX()),
88 m_countY (other.countY()),
89 m_startY (other.startY()),
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;
232 DOCUMENT_SERIALIZE_BOOL_FALSE);
247 writer.writeEndElement();
267 m_gridCoordDisableX = gridCoordDisable;
272 m_gridCoordDisableY = gridCoordDisable;
double closeDistance() const
Get method for close distance.
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_STABLE
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_STEP_X
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
QXmlStreamReader::TokenType loadNextFromReader(QXmlStreamReader &reader)
Load next token from xml reader.
DocumentModelGridRemoval()
Default constructor.
bool removeDefinedGridLines() const
Get method for removing defined grid lines.
void setCloseDistance(double closeDistance)
Set method for close distance.
const QString INDENTATION_DELTA
double startY() const
Get method for y start.
void setCountX(int countX)
Set method for x count.
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_COUNT_X
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_START_X
void setStopY(double stopY)
Set method for y stop.
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_COORD_DISABLE_X_STRING
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_COUNT_Y
QString gridCoordDisableToString(GridCoordDisable gridCoordDisable)
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_STEP_Y
#define LOG4CPP_INFO_S(logger)
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.
const QString DOCUMENT_SERIALIZE_BOOL_TRUE
bool stable() const
Get method for stable flag.
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_STOP_X
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.
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_START_Y
DocumentModelGridRemoval & operator=(const DocumentModelGridRemoval &other)
Assignment constructor.
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_DEFINED_GRID_LINES
void setCountY(int countY)
Set method for y count.
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_CLOSE_DISTANCE
const QString DOCUMENT_SERIALIZE_BOOL_FALSE
void setStepX(double stepX)
Set method for x step.
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_COORD_DISABLE_Y
double stopX() const
Get method for x stop.
const double DEFAULT_NON_COUNT
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_STOP_Y
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.
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.
log4cpp::Category * mainCat
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...
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_COORD_DISABLE_Y_STRING
const double CLOSE_DISTANCE_DEFAULT
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL
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.
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL_COORD_DISABLE_X