Engauge Digitizer 2
Loading...
Searching...
No Matches
MainWindowModel.h
Go to the documentation of this file.
1/******************************************************************************************************
2 * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5 ******************************************************************************************************/
6
7#ifndef MAIN_WINDOW_MODEL_H
8#define MAIN_WINDOW_MODEL_H
9
11#include "ImportCropping.h"
12#include "LoadViews.h"
13#include "MainTitleBarFormat.h"
14#include <QLocale>
15#include <QString>
16#include "ZoomControl.h"
17#include "ZoomFactorInitial.h"
18
19class QTextStream;
20
21extern const bool DEFAULT_DRAG_DROP_EXPORT;
22extern const int DEFAULT_SIGNIFICANT_DIGITS;
23extern const bool DEFAULT_SMALL_DIALOGS;
26extern const LoadViews DEFAULT_LOAD_VIEWS;
27
33{
34public:
37
39 MainWindowModel(const MainWindowModel &other);
40
43
45 bool dragDropExport () const;
46
48 double highlightOpacity() const;
49
51 bool imageReplaceRenamesDocument () const;
52
55
57 LoadViews loadViews () const;
58
59 virtual void loadXml(QXmlStreamReader &reader);
60
62 QLocale locale() const;
63
66
69
71 int maximumGridLines () const;
72
74 int pdfResolution () const;
75
77 void printStream (QString indentation,
78 QTextStream &str) const;
79
80 virtual void saveXml(QXmlStreamWriter &writer) const;
81
84
87
90
93
96
98 void setLocale (QLocale::Language language,
99 QLocale::Country country);
100
102 void setLocale (const QLocale &locale);
103
106
109
112
114 void setPdfResolution (int resolution);
115
118
120 void setSmallDialogs (bool smallDialogs);
121
124
127
129 int significantDigits () const;
130
132 bool smallDialogs () const;
133
135 ZoomControl zoomControl () const;
136
139
140private:
141
142 QLocale m_locale;
143 ZoomControl m_zoomControl;
144 ZoomFactorInitial m_zoomFactorInitial;
145 MainTitleBarFormat m_mainTitleBarFormat;
146 int m_pdfResolution;
147 ImportCropping m_importCropping;
148 LoadViews m_loadViews;
149 int m_maximumGridLines;
150 double m_highlightOpacity;
151 bool m_smallDialogs;
152 bool m_dragDropExport;
153 int m_significantDigits;
154 bool m_imageReplaceRenamesDocument;
155 int m_maximumExportedPointsPerCurve; // Too many points causes unacceptable delays so this is the limit
156};
157
158#endif // MAIN_WINDOW_MODEL_H
ImportCropping
LoadViews
Options for loading view states.
Definition LoadViews.h:13
MainTitleBarFormat
Format format in MainWindow title bar.
const bool DEFAULT_SMALL_DIALOGS
const int DEFAULT_MAXIMUM_EXPORTED_POINTS_PER_CURVE
const LoadViews DEFAULT_LOAD_VIEWS
const bool DEFAULT_IMAGE_REPLACE_RENAMES_DOCUMENT
const int DEFAULT_SIGNIFICANT_DIGITS
const bool DEFAULT_DRAG_DROP_EXPORT
ZoomControl
Definition ZoomControl.h:10
ZoomFactorInitial
DocumentModelAbstractBase()
Single constructor.
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.
LoadViews loadViews() const
Get method for how to load views.
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 setLoadViews(LoadViews loadViews)
Set method for how to load views.
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.
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.