Engauge Digitizer  2
 All Classes Files Functions Variables Enumerations Enumerator Friends Pages
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 
31 private slots:
32  void slotCursorSize (int);
33  void slotExtraPrecision (int);
34  void slotSaveDefault();
35 
36 protected:
37  virtual void handleOk ();
38 
39 private:
40 
41  void createControls (QGridLayout *layout,
42  int &row);
43  void updateControls();
44 
45  QSpinBox *m_spinCursorSize;
46  QSpinBox *m_spinExtraPrecision;
47 
48  QPushButton *m_btnSaveDefault;
49 
50  DocumentModelGeneral *m_modelGeneralBefore;
51  DocumentModelGeneral *m_modelGeneralAfter;
52 };
53 
54 #endif // DLG_SETTINGS_GENERAL_H
Model for DlgSettingsGeneral and CmdSettingsGeneral.
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:82
CmdMediator & cmdMediator()
Provide access to Document information wrapped inside CmdMediator.