19#include <QXmlStreamWriter>
52 m_locale (
other.locale()),
53 m_zoomControl (
other.zoomControl()),
54 m_zoomFactorInitial (
other.zoomFactorInitial()),
55 m_mainTitleBarFormat (
other.mainTitleBarFormat()),
56 m_pdfResolution (
other.pdfResolution()),
57 m_importCropping (
other.importCropping()),
58 m_maximumGridLines (
other.maximumGridLines()),
59 m_highlightOpacity (
other.highlightOpacity()),
60 m_smallDialogs (
other.smallDialogs()),
61 m_dragDropExport (
other.dragDropExport()),
62 m_significantDigits (
other.significantDigits()),
63 m_imageReplaceRenamesDocument (
other.imageReplaceRenamesDocument()),
64 m_maximumExportedPointsPerCurve (
other.maximumExportedPointsPerCurve ()),
65 m_guidelineColor (
other.guidelineColor ())
71 m_locale =
other.locale();
72 m_zoomControl =
other.zoomControl();
73 m_zoomFactorInitial =
other.zoomFactorInitial();
74 m_mainTitleBarFormat =
other.mainTitleBarFormat();
75 m_pdfResolution =
other.pdfResolution();
76 m_importCropping =
other.importCropping();
77 m_maximumGridLines =
other.maximumGridLines();
78 m_highlightOpacity =
other.highlightOpacity();
79 m_smallDialogs =
other.smallDialogs();
80 m_dragDropExport =
other.dragDropExport();
81 m_significantDigits =
other.significantDigits();
82 m_imageReplaceRenamesDocument =
other.imageReplaceRenamesDocument();
83 m_maximumExportedPointsPerCurve =
other.maximumExportedPointsPerCurve();
84 m_guidelineColor =
other.guidelineColor ();
91 return m_dragDropExport;
96 return m_guidelineColor;
101 return m_highlightOpacity;
106 return m_imageReplaceRenamesDocument;
111 return m_importCropping;
121 while ((
reader.tokenType() != QXmlStreamReader::EndElement) ||
131 reader.raiseError (QObject::tr (
"Cannot read main window data"));
142 return m_mainTitleBarFormat;
147 return m_maximumExportedPointsPerCurve;
152 return m_maximumGridLines;
157 return m_pdfResolution;
169 str <<
indentation <<
"zoomFactorInitial=" << m_zoomFactorInitial <<
"\n";
173 str <<
indentation <<
"pdfResolution=" << m_pdfResolution <<
"\n";
175 str <<
indentation <<
"maximumGridLines=" << m_maximumGridLines <<
"\n";
176 str <<
indentation <<
"highlightOpacity=" << m_highlightOpacity <<
"\n";
177 str <<
indentation <<
"smallDialogs=" << (m_smallDialogs ?
"yes" :
"no") <<
"\n";
178 str <<
indentation <<
"dragDropExport=" << (m_dragDropExport ?
"yes" :
"no") <<
"\n";
179 str <<
indentation <<
"significantDigits=" << m_significantDigits <<
"\n";
180 str <<
indentation <<
"imageReplaceRenamesDocument=" << (m_imageReplaceRenamesDocument ?
"yes" :
"no") <<
"\n";
181 str <<
indentation <<
"maximumExportedPointsPerCurve=" << m_maximumExportedPointsPerCurve <<
"\n";
276 return m_significantDigits;
281 return m_smallDialogs;
286 return m_zoomControl;
291 return m_zoomFactorInitial;
QString colorPaletteToString(ColorPalette colorPalette)
const int INNER_RADIUS_MIN
const QString DOCUMENT_SERIALIZE_MAIN_WINDOW
const double DEFAULT_HIGHLIGHT_OPACITY
const int DEFAULT_MAXIMUM_GRID_LINES
Default for maximum number of grid lines.
const ImportCropping DEFAULT_IMPORT_CROPPING
log4cpp::Category * mainCat
const QString INDENTATION_DELTA
MainTitleBarFormat
Format format in MainWindow title bar.
@ MAIN_TITLE_BAR_FORMAT_NO_PATH
@ MAIN_TITLE_BAR_FORMAT_PATH
Filename without path.
const bool DEFAULT_SMALL_DIALOGS
const ColorPalette DEFAULT_GUIDELINE_COLOR
const int DEFAULT_MAXIMUM_EXPORTED_POINTS_PER_CURVE
const QLocale::NumberOption HIDE_GROUP_SEPARATOR
const bool DEFAULT_IMAGE_REPLACE_RENAMES_DOCUMENT
const int DEFAULT_SIGNIFICANT_DIGITS
const bool DEFAULT_DRAG_DROP_EXPORT
int DEFAULT_IMPORT_PDF_RESOLUTION
QXmlStreamReader::TokenType loadNextFromReader(QXmlStreamReader &reader)
Load next token from xml reader.
@ ZOOM_CONTROL_MENU_WHEEL_PLUSMINUS
const ZoomFactorInitial DEFAULT_ZOOM_FACTOR_INITIAL
static QString importCroppingToString(ImportCropping importCropping)
Option as string for display to user.
Model for DlgSettingsMainWindow.
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
void setSmallDialogs(bool smallDialogs)
Set method for small dialogs flag.
QLocale locale() const
Get method for locale.
MainWindowModel()
Default constructor.
void setGuidelineColor(ColorPalette guidelineColor)
Set method for guideline color.
void setImageReplaceRenamesDocument(bool imageReplaceRenamesDocument)
Set method for image replace renames document.
MainWindowModel & operator=(const MainWindowModel &other)
Assignment constructor.
bool dragDropExport() const
Get method for drag and drop export.
bool imageReplaceRenamesDocument() const
Get method for image replaces renames document.
ZoomFactorInitial zoomFactorInitial() const
Get method for initial zoom factor.
void setImportCropping(ImportCropping importCropping)
Set method for import cropping.
void setMaximumExportedPointsPerCurve(int maximumExportedPointsPerCurve)
Set method for maximum number of exported points per curve.
ImportCropping importCropping() const
Get method for import cropping.
bool smallDialogs() const
Get method for small dialogs flag.
void setMainTitleBarFormat(MainTitleBarFormat mainTitleBarFormat)
Set method for MainWindow titlebar filename format.
void setDragDropExport(bool dragDropExport)
Set method for drag and drop export.
double highlightOpacity() const
Get method for highlight opacity.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
void setZoomControl(ZoomControl zoomControl)
Set method for zoom control.
void setMaximumGridLines(int maximumGridLines)
Set method for maximum number of grid lines.
ZoomControl zoomControl() const
Get method for zoom control.
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
void setPdfResolution(int resolution)
Set method for resolution of imported PDF files, in dots per inch.
int maximumGridLines() const
Get method for maximum number of grid lines.
int significantDigits() const
Get method for significant digits.
ColorPalette guidelineColor() const
Get method for guideline color.
void setZoomFactorInitial(ZoomFactorInitial zoomFactorInitial)
Set method for initial zoom factor.
MainTitleBarFormat mainTitleBarFormat() const
Get method for MainWindow titlebar filename format.
void setHighlightOpacity(double highlightOpacity)
Set method for highlight opacity.
int maximumExportedPointsPerCurve() const
Get method for maximum number of exported points per curve.
void setLocale(QLocale::Language language, QLocale::Country country)
Set method for locale given attributes.
int pdfResolution() const
Get method for resolution of imported PDF files, in dots per inch.
void setSignificantDigits(int significantDigits)
Set method for significant digits.
#define LOG4CPP_INFO_S(logger)