Engauge Digitizer  2
DlgSettingsGeneral.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 DLG_SETTINGS_GENERAL_H
8 #define DLG_SETTINGS_GENERAL_H
9 
10 #include "DlgSettingsAbstractBase.h"
11 
13 class QGridLayout;
14 class QPushButton;
15 class QSpinBox;
16 
19 {
20  Q_OBJECT;
21 
22 public:
25  virtual ~DlgSettingsGeneral();
26 
27  virtual void createOptionalSaveDefault (QHBoxLayout *layout);
28  virtual QWidget *createSubPanel ();
29  virtual void load (CmdMediator &cmdMediator);
30  virtual void setSmallDialogs (bool smallDialogs);
31 
32 private slots:
33  void slotCursorSize (int);
34  void slotExtraPrecision (int);
35  void slotSaveDefault();
36 
37 protected:
38  virtual void handleOk ();
39 
40 private:
41 
42  void createControls (QGridLayout *layout,
43  int &row);
44  void updateControls();
45 
46  QSpinBox *m_spinCursorSize;
47  QSpinBox *m_spinExtraPrecision;
48 
49  QPushButton *m_btnSaveDefault;
50 
51  DocumentModelGeneral *m_modelGeneralBefore;
52  DocumentModelGeneral *m_modelGeneralAfter;
53 };
54 
55 #endif // DLG_SETTINGS_GENERAL_H
Model for DlgSettingsGeneral and CmdSettingsGeneral.
virtual void setSmallDialogs(bool smallDialogs)
If false then dialogs have a minimum size so all controls are visible.
virtual void handleOk()
Process slotOk.
DlgSettingsGeneral(MainWindow &mainWindow)
Single constructor.
virtual void createOptionalSaveDefault(QHBoxLayout *layout)
Let subclass define an optional Save As Default button.
virtual QWidget * createSubPanel()
Create dialog-specific panel to which base class will add Ok and Cancel buttons.
Dialog for editing general settings.
Command queue stack.
Definition: CmdMediator.h:23
Abstract base class for all Settings dialogs.
virtual void load(CmdMediator &cmdMediator)
Load settings from Document.
MainWindow & mainWindow()
Get method for MainWindow.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Definition: MainWindow.h:89
CmdMediator & cmdMediator()
Provide access to Document information wrapped inside CmdMediator.