13 #include <QTextStream> 15 #include <QXmlStreamWriter> 37 m_cursorSize (document.modelGeneral().cursorSize()),
38 m_extraPrecision (document.modelGeneral().extraPrecision())
43 m_cursorSize (other.cursorSize()),
44 m_extraPrecision (other.extraPrecision())
63 return m_extraPrecision;
72 QXmlStreamAttributes attributes = reader.attributes();
81 while ((reader.tokenType() != QXmlStreamReader::EndElement) ||
93 reader.raiseError (QObject::tr (
"Cannot read general data"));
98 QTextStream &str)
const 100 str << indentation <<
"DocumentModelGeneral\n";
104 str << indentation <<
"cursorSize=" << m_cursorSize <<
"\n";
105 str << indentation <<
"extraPrecision=" << m_extraPrecision <<
"\n";
115 writer.writeEndElement();
Model for DlgSettingsGeneral and CmdSettingsGeneral.
QXmlStreamReader::TokenType loadNextFromReader(QXmlStreamReader &reader)
Load next token from xml reader.
void setCursorSize(int cursorSize)
Set method for effective cursor size.
const QString INDENTATION_DELTA
const QString SETTINGS_DIGITIZER
#define LOG4CPP_INFO_S(logger)
const QString DOCUMENT_SERIALIZE_GENERAL
const QString DOCUMENT_SERIALIZE_GENERAL_CURSOR_SIZE
const QString DOCUMENT_SERIALIZE_GENERAL_EXTRA_PRECISION
DocumentModelGeneral()
Default constructor.
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
int cursorSize() const
Get method for effective cursor size.
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
const QString SETTINGS_ENGAUGE
Storage of one imported image and the data attached to that image.
const QString SETTINGS_GENERAL_EXTRA_PRECISION
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_COMMON
const int DEFAULT_EXTRA_PRECISION
void setExtraPrecision(int extraPrecision)
Set method for extra digits of precision.
int extraPrecision() const
Get method for extra digits of precsion.
const QString SETTINGS_GROUP_GENERAL
const QString SETTINGS_GENERAL_CURSOR_SIZE
DocumentModelGeneral & operator=(const DocumentModelGeneral &other)
Assignment constructor.
const int DEFAULT_CURSOR_SIZE