Go to the documentation of this file.
17 #include <QTextStream>
19 #include <QXmlStreamWriter>
48 m_locale (other.locale()),
49 m_zoomControl (other.zoomControl()),
50 m_zoomFactorInitial (other.zoomFactorInitial()),
51 m_mainTitleBarFormat (other.mainTitleBarFormat()),
52 m_pdfResolution (other.pdfResolution()),
53 m_importCropping (other.importCropping()),
54 m_maximumGridLines (other.maximumGridLines()),
55 m_highlightOpacity (other.highlightOpacity()),
56 m_smallDialogs (other.smallDialogs()),
57 m_dragDropExport (other.dragDropExport()),
58 m_significantDigits (other.significantDigits()),
59 m_imageReplaceRenamesDocument (other.imageReplaceRenamesDocument())
83 return m_dragDropExport;
88 return m_highlightOpacity;
93 return m_imageReplaceRenamesDocument;
98 return m_importCropping;
108 while ((reader.tokenType() != QXmlStreamReader::EndElement) ||
111 if (reader.atEnd()) {
118 reader.raiseError (QObject::tr (
"Cannot read main window data"));
129 return m_mainTitleBarFormat;
134 return m_maximumGridLines;
139 return m_pdfResolution;
143 QTextStream &str)
const
145 str << indentation <<
"MainWindowModel\n";
149 str << indentation <<
"locale=" << m_locale.name() <<
"\n";
150 str << indentation <<
"zoomControl=" << m_zoomControl <<
"\n";
151 str << indentation <<
"zoomFactorInitial=" << m_zoomFactorInitial <<
"\n";
155 str << indentation <<
"pdfResolution=" << m_pdfResolution <<
"\n";
157 str << indentation <<
"maximumGridLines=" << m_maximumGridLines <<
"\n";
158 str << indentation <<
"highlightOpacity=" << m_highlightOpacity <<
"\n";
159 str << indentation <<
"smallDialogs=" << (m_smallDialogs ?
"yes" :
"no") <<
"\n";
160 str << indentation <<
"dragDropExport=" << (m_dragDropExport ?
"yes" :
"no") <<
"\n";
161 str << indentation <<
"significantDigits=" << m_significantDigits <<
"\n";
162 str << indentation <<
"imageReplaceRenamesDocument=" << (m_imageReplaceRenamesDocument ?
"yes" :
"no") <<
"\n";
170 writer.writeEndElement();
194 QLocale::Country country)
221 m_pdfResolution = resolution;
246 return m_significantDigits;
251 return m_smallDialogs;
256 return m_zoomControl;
261 return m_zoomFactorInitial;
void setZoomFactorInitial(ZoomFactorInitial zoomFactorInitial)
Set method for initial zoom factor.
const ZoomFactorInitial DEFAULT_ZOOM_FACTOR_INITIAL
const QLocale::NumberOption HIDE_GROUP_SEPARATOR
void setSignificantDigits(int significantDigits)
Set method for significant digits.
void setPdfResolution(int resolution)
Set method for resolution of imported PDF files, in dots per inch.
const int DEFAULT_MAXIMUM_GRID_LINES
Default for maximum number of grid lines.
double highlightOpacity() const
Get method for highlight opacity.
void setHighlightOpacity(double highlightOpacity)
Set method for highlight opacity.
int significantDigits() const
Get method for significant digits.
void setZoomControl(ZoomControl zoomControl)
Set method for zoom control.
void setDragDropExport(bool dragDropExport)
Set method for drag and drop export.
bool DEFAULT_DRAG_DROP_EXPORT
void setLocale(QLocale::Language language, QLocale::Country country)
Set method for locale given attributes.
bool DEFAULT_IMAGE_REPLACE_RENAMES_DOCUMENT
MainWindowModel()
Default constructor.
MainTitleBarFormat mainTitleBarFormat() const
Get method for MainWindow titlebar filename format.
void setSmallDialogs(bool smallDialogs)
Set method for small dialogs flag.
Model for DlgSettingsMainWindow.
void setMainTitleBarFormat(MainTitleBarFormat mainTitleBarFormat)
Set method for MainWindow titlebar filename format.
MainWindowModel & operator=(const MainWindowModel &other)
Assignment constructor.
void setImportCropping(ImportCropping importCropping)
Set method for import cropping.
ImportCropping importCropping() const
Get method for import cropping.
static QString importCroppingToString(ImportCropping importCropping)
Option as string for display to user.
const ImportCropping DEFAULT_IMPORT_CROPPING
bool smallDialogs() const
Get method for small dialogs flag.
int DEFAULT_IMPORT_PDF_RESOLUTION
const double DEFAULT_HIGHLIGHT_OPACITY
#define LOG4CPP_INFO_S(logger)
void setMaximumGridLines(int maximumGridLines)
Set method for maximum number of grid lines.
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
bool imageReplaceRenamesDocument() const
Get method for image replaces renames document.
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
QLocale locale() const
Get method for locale.
int maximumGridLines() const
Maximum number of grid lines.
int DEFAULT_SIGNIFICANT_DIGITS
MainTitleBarFormat
Format format in MainWindow title bar.
void setImageReplaceRenamesDocument(bool imageReplaceRenamesDocument)
Set method for image replace renames document.
log4cpp::Category * mainCat
bool DEFAULT_SMALL_DIALOGS
bool dragDropExport() const
Get method for drag and drop export.
ZoomFactorInitial zoomFactorInitial() const
Get method for initial zoom factor.
const QString INDENTATION_DELTA
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
int pdfResolution() const
Get method for resolution of imported PDF files, in dots per inch.
QXmlStreamReader::TokenType loadNextFromReader(QXmlStreamReader &reader)
Load next token from xml reader.
const QString DOCUMENT_SERIALIZE_MAIN_WINDOW
ZoomControl zoomControl() const
Get method for zoom control.