12 #include <QTextStream> 13 #include <QXmlStreamWriter> 32 m_maxPointSize (document.modelPointMatch().maxPointSize()),
33 m_paletteColorAccepted (document.modelPointMatch().paletteColorAccepted()),
34 m_paletteColorCandidate (document.modelPointMatch().paletteColorCandidate()),
35 m_paletteColorRejected (document.modelPointMatch().paletteColorRejected())
40 m_maxPointSize (other.maxPointSize()),
41 m_paletteColorAccepted (other.paletteColorAccepted()),
42 m_paletteColorCandidate (other.paletteColorCandidate()),
43 m_paletteColorRejected (other.paletteColorRejected())
63 QXmlStreamAttributes attributes = reader.attributes();
76 while ((reader.tokenType() != QXmlStreamReader::EndElement) ||
87 reader.raiseError (QObject::tr (
"Cannot read point match data"));
93 return m_maxPointSize;
98 return m_paletteColorAccepted;
103 return m_paletteColorCandidate;
108 return m_paletteColorRejected;
112 QTextStream &str)
const 114 str << indentation <<
"DocumentModelPointMatch\n";
118 str << indentation <<
"minPointSeparation=" << m_minPointSeparation <<
"\n";
119 str << indentation <<
"maxPointSize=" << m_maxPointSize <<
"\n";
120 str << indentation <<
"colorAccepted=" <<
colorPaletteToString (m_paletteColorAccepted) <<
"\n";
121 str << indentation <<
"colorCandidate=" <<
colorPaletteToString (m_paletteColorCandidate) <<
"\n";
122 str << indentation <<
"colorRejected=" <<
colorPaletteToString (m_paletteColorRejected) <<
"\n";
137 writer.writeEndElement();
Model for DlgSettingsPointMatch and CmdSettingsPointMatch.
QXmlStreamReader::TokenType loadNextFromReader(QXmlStreamReader &reader)
Load next token from xml reader.
const QString DOCUMENT_SERIALIZE_POINT_MATCH
const double DEFAULT_MIN_POINT_SEPARATION
QString colorPaletteToString(ColorPalette colorPalette)
const QString INDENTATION_DELTA
const QString DOCUMENT_SERIALIZE_POINT_MATCH_COLOR_CANDIDATE_STRING
const QString DOCUMENT_SERIALIZE_POINT_MATCH_COLOR_ACCEPTED
void setPaletteColorCandidate(ColorPalette paletteColorCandidate)
Set method for candidate color.
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
#define LOG4CPP_INFO_S(logger)
DocumentModelPointMatch & operator=(const DocumentModelPointMatch &other)
Assignment constructor.
const ColorPalette DEFAULT_COLOR_CANDIDATE
const QString DOCUMENT_SERIALIZE_POINT_MATCH_POINT_SIZE
ColorPalette paletteColorCandidate() const
Get method for candidate color.
void setMaxPointSize(double maxPointSize)
Set method for max point size.
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
const ColorPalette DEFAULT_COLOR_ACCEPTED
ColorPalette paletteColorAccepted() const
Get method for accepted color.
DocumentModelPointMatch()
Default constructor.
Storage of one imported image and the data attached to that image.
const QString DOCUMENT_SERIALIZE_POINT_MATCH_COLOR_ACCEPTED_STRING
void setPaletteColorRejected(ColorPalette paletteColorRejected)
Set method for rejected color.
log4cpp::Category * mainCat
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
const QString DOCUMENT_SERIALIZE_POINT_MATCH_COLOR_REJECTED
const double DEFAULT_MAX_POINT_SIZE
const QString DOCUMENT_SERIALIZE_POINT_MATCH_COLOR_CANDIDATE
const QString DOCUMENT_SERIALIZE_POINT_MATCH_COLOR_REJECTED_STRING
ColorPalette paletteColorRejected() const
Get method for rejected color.
const ColorPalette DEFAULT_COLOR_REJECTED
double maxPointSize() const
Get method for max point size.
void setPaletteColorAccepted(ColorPalette paletteColorAccepted)
Set method for accepted color.