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 ButtonWhatsThis;
16class QCheckBox;
17class QComboBox;
18class QDoubleSpinBox;
19class QGridLayout;
20class QPushButton;
21class QSpinBox;
22class MainWindowModel;
23
26{
27 Q_OBJECT;
28
29public:
32 virtual ~DlgSettingsMainWindow();
33
34 virtual void createOptionalSaveDefault (QHBoxLayout *layout);
35 virtual QWidget *createSubPanel ();
36 virtual void load (CmdMediator &cmdMediator); // Not used. Use loadMainWindowModel instead
37
40 const MainWindowModel &modelMainWindow);
41 virtual void setSmallDialogs (bool smallDialogs);
42
43private slots:
44 void slotDragDropExport (bool);
45 void slotHighlightOpacity (double);
46 void slotImageReplaceRenamesDocument (bool);
47 void slotImportCropping (int index);
48 void slotLoadViews (int index);
49 void slotLocale (int index);
50 void slotMaximumExportedPointsPerCurve (int limit);
51 void slotMaximumGridLines (int limit);
52 void slotPdfResolution (const QString);
53 void slotRecentFileClear ();
54 void slotSignificantDigits (int);
55 void slotSmallDialogs(bool);
56 void slotTitleBarFormat(bool);
57 void slotWhatsThis();
58 void slotZoomControl (const QString);
59 void slotZoomFactor (const QString);
60
61protected:
62 virtual void handleOk ();
63
64private:
65
66 void createControls (QGridLayout *layout,
67 int &row);
68 QStringList gatherQmFilenames () const;
69 void updateControls();
70
71 ButtonWhatsThis *m_btnWhatsThis;
72
73 QComboBox *m_cmbZoomFactor;
74 QComboBox *m_cmbZoomControl;
75 QComboBox *m_cmbLocale;
76 QComboBox *m_cmbImportCropping;
77 QComboBox *m_cmbLoadViews;
78 QPushButton *m_btnRecentClear;
79 QCheckBox *m_chkTitleBarFormat;
80 QComboBox *m_cmbPdfResolution;
81 QSpinBox *m_spinMaximumGridLines;
82 QSpinBox *m_spinMaximumExportedPointsPerCurve;
83 QDoubleSpinBox *m_spinHighlightOpacity;
84 QCheckBox *m_chkSmallDialogs;
85 QCheckBox *m_chkDragDropExport;
86 QSpinBox *m_spinSignificantDigits;
87 QCheckBox *m_chkImageReplaceRenamesDocument;
88
89 MainWindowModel *m_modelMainWindowBefore;
90 MainWindowModel *m_modelMainWindowAfter;
91};
92
93#endif // DLG_SETTINGS_MAIN_WINDOW_H
Unobtrusive button to trigger QWhatsThis since some operating systems (Linux Mint) do not show WhatsT...
Command queue stack.
Definition CmdMediator.h:24
DlgSettingsAbstractBase(const QString &title, const QString &dialogName, MainWindow &mainWindow)
Single constructor.
CmdMediator & cmdMediator()
Provide access to Document information wrapped inside CmdMediator.
MainWindow & mainWindow()
Get method for MainWindow.
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:95