Engauge Digitizer 2
Loading...
Searching...
No Matches
DlgSettingsMainWindow.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 DLG_SETTINGS_MAIN_WINDOW_H
8#define DLG_SETTINGS_MAIN_WINDOW_H
9
11#include <QLocale>
12#include <QString>
13#include <QStringList>
14
15class QCheckBox;
16class QComboBox;
17class QDoubleSpinBox;
18class QGridLayout;
19class QPushButton;
20class QSpinBox;
21class MainWindowModel;
22
25{
27
28public:
31 virtual ~DlgSettingsMainWindow();
32
34 virtual QWidget *createSubPanel ();
35 virtual void load (CmdMediator &cmdMediator); // Not used. Use loadMainWindowModel instead
36
39 const MainWindowModel &modelMainWindow);
40 virtual void setSmallDialogs (bool smallDialogs);
41
42private slots:
43 void slotDragDropExport (bool);
44 void slotGuidelineColor (const QString &);
45 void slotHighlightOpacity (double);
46 void slotImageReplaceRenamesDocument (bool);
47 void slotImportCropping (int index);
48 void slotLocale (int index);
49 void slotMaximumExportedPointsPerCurve (int limit);
50 void slotMaximumGridLines (int limit);
51 void slotPdfResolution (const QString);
52 void slotRecentFileClear ();
53 void slotSignificantDigits (int);
54 void slotSmallDialogs(bool);
55 void slotTitleBarFormat(bool);
56 void slotZoomControl (const QString);
57 void slotZoomFactor (const QString);
58
59protected:
60 virtual void handleOk ();
61
62private:
63
64 void createControls (QGridLayout *layout,
65 int &row);
66 QStringList gatherQmFilenames () const;
67 void updateControls();
68
69 QComboBox *m_cmbZoomFactor;
70 QComboBox *m_cmbZoomControl;
71 QComboBox *m_cmbLocale;
72 QComboBox *m_cmbImportCropping;
73 QPushButton *m_btnRecentClear;
74 QCheckBox *m_chkTitleBarFormat;
75 QComboBox *m_cmbPdfResolution;
76 QSpinBox *m_spinMaximumGridLines;
77 QSpinBox *m_spinMaximumExportedPointsPerCurve;
78 QDoubleSpinBox *m_spinHighlightOpacity;
79 QCheckBox *m_chkSmallDialogs;
80 QCheckBox *m_chkDragDropExport;
81 QSpinBox *m_spinSignificantDigits;
82 QCheckBox *m_chkImageReplaceRenamesDocument;
83 QComboBox *m_cmbGuidelineColor;
84
85 MainWindowModel *m_modelMainWindowBefore;
86 MainWindowModel *m_modelMainWindowAfter;
87};
88
89#endif // DLG_SETTINGS_MAIN_WINDOW_H
const int INNER_RADIUS_MIN
Command queue stack.
Definition CmdMediator.h:24
Abstract base class for all Settings dialogs.
CmdMediator & cmdMediator()
Provide access to Document information wrapped inside CmdMediator.
MainWindow & mainWindow()
Get method for MainWindow.
Dialog for editing main window settings, which are entirely independent of all documents.
void loadMainWindowModel(CmdMediator &cmdMediator, const MainWindowModel &modelMainWindow)
Replaced load method since the main window settings are independent of document, unlike other DlgSett...
virtual void createOptionalSaveDefault(QHBoxLayout *layout)
Let subclass define an optional Save As Default button.
DlgSettingsMainWindow(MainWindow &mainWindow)
Single constructor.
virtual void setSmallDialogs(bool smallDialogs)
If false then dialogs have a minimum size so all controls are visible.
virtual void handleOk()
Process slotOk.
virtual void load(CmdMediator &cmdMediator)
Load settings from Document.
virtual QWidget * createSubPanel()
Create dialog-specific panel to which base class will add Ok and Cancel buttons.
Model for DlgSettingsMainWindow.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Definition MainWindow.h:96