Engauge Digitizer  2
 All Classes Functions Variables Typedefs Enumerations Friends Pages
MainWindowModel.h
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 
10 #include "DocumentModelAbstractBase.h"
11 #include "ImportCropping.h"
12 #include "MainTitleBarFormat.h"
13 #include <QLocale>
14 #include <QString>
15 #include "ZoomControl.h"
16 #include "ZoomFactorInitial.h"
17 
18 class QTextStream;
19 
20 extern bool DEFAULT_DRAG_DROP_EXPORT;
21 extern int DEFAULT_SIGNIFICANT_DIGITS;
22 extern bool DEFAULT_SMALL_DIALOGS;
23 extern bool DEFAULT_IMAGE_REPLACE_RENAMES_DOCUMENT;
24 
30 {
31 public:
34 
36  MainWindowModel(const MainWindowModel &other);
37 
40 
42  bool dragDropExport () const;
43 
44  virtual void loadXml(QXmlStreamReader &reader);
45 
47  double highlightOpacity() const;
48 
50  bool imageReplaceRenamesDocument () const;
51 
53  ImportCropping importCropping () const;
54 
56  QLocale locale() const;
57 
59  MainTitleBarFormat mainTitleBarFormat () const;
60 
62  int maximumGridLines () const;
63 
65  int pdfResolution () const;
66 
68  void printStream (QString indentation,
69  QTextStream &str) const;
70 
71  virtual void saveXml(QXmlStreamWriter &writer) const;
72 
74  void setDragDropExport (bool dragDropExport);
75 
77  void setHighlightOpacity (double highlightOpacity);
78 
80  void setImageReplaceRenamesDocument (bool imageReplaceRenamesDocument);
81 
83  void setImportCropping (ImportCropping importCropping);
84 
86  void setLocale (QLocale::Language language,
87  QLocale::Country country);
88 
90  void setLocale (const QLocale &locale);
91 
93  void setMainTitleBarFormat (MainTitleBarFormat mainTitleBarFormat);
94 
96  void setMaximumGridLines (int maximumGridLines);
97 
99  void setPdfResolution (int resolution);
100 
103 
105  void setSmallDialogs (bool smallDialogs);
106 
108  void setZoomControl (ZoomControl zoomControl);
109 
111  void setZoomFactorInitial (ZoomFactorInitial zoomFactorInitial);
112 
114  int significantDigits () const;
115 
117  bool smallDialogs () const;
118 
120  ZoomControl zoomControl () const;
121 
123  ZoomFactorInitial zoomFactorInitial () const;
124 
125 private:
126 
127  QLocale m_locale;
128  ZoomControl m_zoomControl;
129  ZoomFactorInitial m_zoomFactorInitial;
130  MainTitleBarFormat m_mainTitleBarFormat;
131  int m_pdfResolution;
132  ImportCropping m_importCropping;
133  int m_maximumGridLines;
134  double m_highlightOpacity;
135  bool m_smallDialogs;
136  bool m_dragDropExport;
137  int m_significantDigits;
138  bool m_imageReplaceRenamesDocument;
139 };
140 
141 #endif // MAIN_WINDOW_MODEL_H
MainWindowModel & operator=(const MainWindowModel &other)
Assignment constructor.
bool imageReplaceRenamesDocument() const
Get method for image replaces renames document.
Abstract base class for document models. This class enforces a common interface for the leaf subclass...
void setDragDropExport(bool dragDropExport)
Set method for drag and drop export.
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
void setSignificantDigits(int significantDigits)
Set method for significant digits.
MainTitleBarFormat mainTitleBarFormat() const
Get method for MainWindow titlebar filename format.
void setHighlightOpacity(double highlightOpacity)
Set method for highlight opacity.
void setLocale(QLocale::Language language, QLocale::Country country)
Set method for locale given attributes.
int maximumGridLines() const
Maximum number of grid lines.
MainWindowModel()
Default constructor.
bool dragDropExport() const
Get method for drag and drop export.
bool smallDialogs() const
Get method for small dialogs flag.
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
int significantDigits() const
Get method for significant digits.
ZoomControl zoomControl() const
Get method for zoom control.
Model for DlgSettingsMainWindow.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
void setMaximumGridLines(int maximumGridLines)
Set method for maximum number of grid lines.
double highlightOpacity() const
Get method for highlight opacity.
int pdfResolution() const
Get method for resolution of imported PDF files, in dots per inch.
void setZoomControl(ZoomControl zoomControl)
Set method for zoom control.
void setMainTitleBarFormat(MainTitleBarFormat mainTitleBarFormat)
Set method for MainWindow titlebar filename format.
void setZoomFactorInitial(ZoomFactorInitial zoomFactorInitial)
Set method for initial zoom factor.
void setImageReplaceRenamesDocument(bool imageReplaceRenamesDocument)
Set method for image replace renames document.
ZoomFactorInitial zoomFactorInitial() const
Get method for initial zoom factor.
void setSmallDialogs(bool smallDialogs)
Set method for small dialogs flag.
ImportCropping importCropping() const
Get method for import cropping.
QLocale locale() const
Get method for locale.
void setPdfResolution(int resolution)
Set method for resolution of imported PDF files, in dots per inch.
void setImportCropping(ImportCropping importCropping)
Set method for import cropping.