Engauge Digitizer  2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
10 #include "ColorPalette.h"
12 #include "ImportCropping.h"
13 #include "MainTitleBarFormat.h"
14 #include <QLocale>
15 #include <QString>
16 #include "ZoomControl.h"
17 #include "ZoomFactorInitial.h"
18 
19 class QTextStream;
20 
21 extern bool DEFAULT_DRAG_DROP_EXPORT;
23 extern bool DEFAULT_SMALL_DIALOGS;
25 
31 {
32 public:
35 
37  MainWindowModel(const MainWindowModel &other);
38 
41 
43  bool dragDropExport () const;
44 
46  double highlightOpacity() const;
47 
49  bool imageReplaceRenamesDocument () const;
50 
53 
54  virtual void loadXml(QXmlStreamReader &reader);
55 
57  QLocale locale() const;
58 
61 
63  int maximumGridLines () const;
64 
66  int pdfResolution () const;
67 
69  void printStream (QString indentation,
70  QTextStream &str) const;
71 
72  virtual void saveXml(QXmlStreamWriter &writer) const;
73 
75  void setDragDropExport (bool dragDropExport);
76 
78  void setHighlightOpacity (double highlightOpacity);
79 
81  void setImageReplaceRenamesDocument (bool imageReplaceRenamesDocument);
82 
84  void setImportCropping (ImportCropping importCropping);
85 
87  void setLocale (QLocale::Language language,
88  QLocale::Country country);
89 
91  void setLocale (const QLocale &locale);
92 
94  void setMainTitleBarFormat (MainTitleBarFormat mainTitleBarFormat);
95 
97  void setMaximumGridLines (int maximumGridLines);
98 
100  void setPdfResolution (int resolution);
101 
104 
106  void setSmallDialogs (bool smallDialogs);
107 
110 
113 
115  int significantDigits () const;
116 
118  bool smallDialogs () const;
119 
121  ZoomControl zoomControl () const;
122 
125 
126 private:
127 
128  QLocale m_locale;
129  ZoomControl m_zoomControl;
130  ZoomFactorInitial m_zoomFactorInitial;
131  MainTitleBarFormat m_mainTitleBarFormat;
132  int m_pdfResolution;
133  ImportCropping m_importCropping;
134  int m_maximumGridLines;
135  double m_highlightOpacity;
136  bool m_smallDialogs;
137  bool m_dragDropExport;
138  int m_significantDigits;
139  bool m_imageReplaceRenamesDocument;
140 };
141 
142 #endif // MAIN_WINDOW_MODEL_H
MainTitleBarFormat
Format format in MainWindow title bar.
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.
ZoomFactorInitial
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.
bool DEFAULT_DRAG_DROP_EXPORT
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.
bool DEFAULT_SMALL_DIALOGS
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.
bool DEFAULT_IMAGE_REPLACE_RENAMES_DOCUMENT
int pdfResolution() const
Get method for resolution of imported PDF files, in dots per inch.
ZoomControl
Definition: ZoomControl.h:10
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.
int DEFAULT_SIGNIFICANT_DIGITS
ImportCropping
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.