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
12class ButtonWhatsThis;
14class QCheckBox;
15class QComboBox;
16class QDoubleValidator;
17class QGraphicsScene;
18class QGridLayout;
19class QHBoxLayout;
20class QLineEdit;
21class ViewPreview;
22
25{
26 Q_OBJECT;
27
28public:
32
33 virtual void createOptionalSaveDefault (QHBoxLayout *layout);
34 virtual QWidget *createSubPanel ();
35 virtual void load (CmdMediator &cmdMediator);
36 virtual void setSmallDialogs (bool smallDialogs);
37
38private slots:
39 void slotRemoveGridLines (int);
40 void slotCloseDistance(const QString &);
41
42 void slotDisableX(const QString &);
43 void slotCountX(const QString &);
44 void slotStartX(const QString &);
45 void slotStepX(const QString &);
46 void slotStopX(const QString &);
47
48 void slotDisableY(const QString &);
49 void slotCountY(const QString &);
50 void slotStartY(const QString &);
51 void slotStepY(const QString &);
52 void slotStopY(const QString &);
53
54 void slotWhatsThis();
55
56protected:
57 virtual void handleOk ();
58
59private:
60
61 void createRemoveGridLines (QGridLayout *layout, int &row);
62 void createRemoveGridLinesX (QGridLayout *layoutGridLines, int &row);
63 void createRemoveGridLinesY (QGridLayout *layoutGridLines, int &row);
64 void createPreview (QGridLayout *layout, int &row);
65 void updateControls ();
66 void updateDisplayedVariableX ();
67 void updateDisplayedVariableY ();
68 void updatePreview();
69
70 ButtonWhatsThis *m_btnWhatsThis;
71
72 QCheckBox *m_chkRemoveGridLines;
73 QLineEdit *m_editCloseDistance;
74 QDoubleValidator *m_validatorCloseDistance;
75
76 QComboBox *m_cmbDisableX;
77 QLineEdit *m_editCountX;
78 QLineEdit *m_editStartX;
79 QLineEdit *m_editStepX;
80 QLineEdit *m_editStopX;
81 QDoubleValidator *m_validatorCountX;
82 QDoubleValidator *m_validatorStartX;
83 QDoubleValidator *m_validatorStepX;
84 QDoubleValidator *m_validatorStopX;
85
86 QComboBox *m_cmbDisableY;
87 QLineEdit *m_editCountY;
88 QLineEdit *m_editStartY;
89 QLineEdit *m_editStepY;
90 QLineEdit *m_editStopY;
91 QDoubleValidator *m_validatorCountY;
92 QDoubleValidator *m_validatorStartY;
93 QDoubleValidator *m_validatorStepY;
94 QDoubleValidator *m_validatorStopY;
95
96 QGraphicsScene *m_scenePreview;
97 ViewPreview *m_viewPreview;
98
99 DocumentModelGridRemoval *m_modelGridRemovalBefore;
100 DocumentModelGridRemoval *m_modelGridRemovalAfter;
101};
102
103#endif // DLG_SETTINGS_GRID_REMOVAL_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.
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.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Definition MainWindow.h:95
Class that modifies QGraphicsView to automatically expand/shrink the view to fit the window,...
Definition ViewPreview.h:15