Engauge Digitizer 2
Loading...
Searching...
No Matches
DlgSettingsGridRemoval.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_GRID_REMOVAL_H
8#define DLG_SETTINGS_GRID_REMOVAL_H
9
11
13class QCheckBox;
14class QComboBox;
15class QDoubleValidator;
16class QGraphicsScene;
17class QGridLayout;
18class QHBoxLayout;
19class QLineEdit;
20class ViewPreview;
21
24{
26
27public:
31
33 virtual QWidget *createSubPanel ();
34 virtual void load (CmdMediator &cmdMediator);
35 virtual void setSmallDialogs (bool smallDialogs);
36
37private slots:
38 void slotRemoveGridLines (int);
39 void slotCloseDistance(const QString &);
40
41 void slotDisableX(const QString &);
42 void slotCountX(const QString &);
43 void slotStartX(const QString &);
44 void slotStepX(const QString &);
45 void slotStopX(const QString &);
46
47 void slotDisableY(const QString &);
48 void slotCountY(const QString &);
49 void slotStartY(const QString &);
50 void slotStepY(const QString &);
51 void slotStopY(const QString &);
52
53protected:
54 virtual void handleOk ();
55
56private:
57
58 void createRemoveGridLines (QGridLayout *layout, int &row);
59 void createRemoveGridLinesX (QGridLayout *layoutGridLines, int &row);
60 void createRemoveGridLinesY (QGridLayout *layoutGridLines, int &row);
61 void createPreview (QGridLayout *layout, int &row);
62 void updateControls ();
63 void updateDisplayedVariableX ();
64 void updateDisplayedVariableY ();
65 void updatePreview();
66
67 QCheckBox *m_chkRemoveGridLines;
68 QLineEdit *m_editCloseDistance;
69 QDoubleValidator *m_validatorCloseDistance;
70
71 QComboBox *m_cmbDisableX;
72 QLineEdit *m_editCountX;
73 QLineEdit *m_editStartX;
74 QLineEdit *m_editStepX;
75 QLineEdit *m_editStopX;
76 QDoubleValidator *m_validatorCountX;
77 QDoubleValidator *m_validatorStartX;
78 QDoubleValidator *m_validatorStepX;
79 QDoubleValidator *m_validatorStopX;
80
81 QComboBox *m_cmbDisableY;
82 QLineEdit *m_editCountY;
83 QLineEdit *m_editStartY;
84 QLineEdit *m_editStepY;
85 QLineEdit *m_editStopY;
86 QDoubleValidator *m_validatorCountY;
87 QDoubleValidator *m_validatorStartY;
88 QDoubleValidator *m_validatorStepY;
89 QDoubleValidator *m_validatorStopY;
90
91 QGraphicsScene *m_scenePreview;
92 ViewPreview *m_viewPreview;
93
94 DocumentModelGridRemoval *m_modelGridRemovalBefore;
95 DocumentModelGridRemoval *m_modelGridRemovalAfter;
96};
97
98#endif // DLG_SETTINGS_GRID_REMOVAL_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 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.
virtual void setSmallDialogs(bool smallDialogs)
If false then dialogs have a minimum size so all controls are visible.
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:92
Class that modifies QGraphicsView to automatically expand/shrink the view to fit the window,...
Definition ViewPreview.h:15