Engauge Digitizer 2
DlgSettingsGridRemoval.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_GRID_REMOVAL_H
8#define DLG_SETTINGS_GRID_REMOVAL_H
9
10#include "DlgSettingsAbstractBase.h"
11
13class QCheckBox;
14class QComboBox;
15class QDoubleValidator;
16class QGraphicsScene;
17class QGridLayout;
18class QHBoxLayout;
19class QLineEdit;
20class ViewPreview;
21
24{
25 Q_OBJECT;
26
27public:
31
32 virtual void createOptionalSaveDefault (QHBoxLayout *layout);
33 virtual QWidget *createSubPanel ();
34 virtual void load (CmdMediator &cmdMediator);
35
36private slots:
37 void slotRemoveGridLines (int);
38 void slotCloseDistance(const QString &);
39
40 void slotDisableX(const QString &);
41 void slotCountX(const QString &);
42 void slotStartX(const QString &);
43 void slotStepX(const QString &);
44 void slotStopX(const QString &);
45
46 void slotDisableY(const QString &);
47 void slotCountY(const QString &);
48 void slotStartY(const QString &);
49 void slotStepY(const QString &);
50 void slotStopY(const QString &);
51
52protected:
53 virtual void handleOk ();
54
55private:
56
57 void createRemoveGridLines (QGridLayout *layout, int &row);
58 void createRemoveGridLinesX (QGridLayout *layoutGridLines, int &row);
59 void createRemoveGridLinesY (QGridLayout *layoutGridLines, int &row);
60 void createPreview (QGridLayout *layout, int &row);
61 void updateControls ();
62 void updatePreview();
63
64 QCheckBox *m_chkRemoveGridLines;
65 QLineEdit *m_editCloseDistance;
66 QDoubleValidator *m_validatorCloseDistance;
67
68 QComboBox *m_cmbDisableX;
69 QLineEdit *m_editCountX;
70 QLineEdit *m_editStartX;
71 QLineEdit *m_editStepX;
72 QLineEdit *m_editStopX;
73 QDoubleValidator *m_validatorCountX;
74 QDoubleValidator *m_validatorStartX;
75 QDoubleValidator *m_validatorStepX;
76 QDoubleValidator *m_validatorStopX;
77
78 QComboBox *m_cmbDisableY;
79 QLineEdit *m_editCountY;
80 QLineEdit *m_editStartY;
81 QLineEdit *m_editStepY;
82 QLineEdit *m_editStopY;
83 QDoubleValidator *m_validatorCountY;
84 QDoubleValidator *m_validatorStartY;
85 QDoubleValidator *m_validatorStepY;
86 QDoubleValidator *m_validatorStopY;
87
88 QGraphicsScene *m_scenePreview;
89 ViewPreview *m_viewPreview;
90
91 DocumentModelGridRemoval *m_modelGridRemovalBefore;
92 DocumentModelGridRemoval *m_modelGridRemovalAfter;
93};
94
95#endif // DLG_SETTINGS_GRID_REMOVAL_H
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 grid removal settings.
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.
virtual void handleOk()
Process slotOk.
virtual void createOptionalSaveDefault(QHBoxLayout *layout)
Let subclass define an optional Save As Default button.
DlgSettingsGridRemoval(MainWindow &mainWindow)
Single constructor.
Model for DlgSettingsGridRemoval and CmdSettingsGridRemoval. The settings are unstable until the user...
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Definition: MainWindow.h:78
Class that modifies QGraphicsView to automatically expand/shrink the view to fit the window,...
Definition: ViewPreview.h:15