Engauge Digitizer  2
DlgSettingsGridRemoval.h
1 #ifndef DLG_SETTINGS_GRID_REMOVAL_H
2 #define DLG_SETTINGS_GRID_REMOVAL_H
3 
4 #include "DlgSettingsAbstractBase.h"
5 
7 class QCheckBox;
8 class QComboBox;
9 class QDoubleValidator;
10 class QGraphicsScene;
11 class QGridLayout;
12 class QHBoxLayout;
13 class QLineEdit;
14 class ViewPreview;
15 
18 {
19  Q_OBJECT;
20 
21 public:
24  virtual ~DlgSettingsGridRemoval();
25 
26  virtual QWidget *createSubPanel ();
27  virtual void load (CmdMediator &cmdMediator);
28 
29 private slots:
30  void slotRemoveGridLines (int);
31  void slotCloseDistance(const QString &);
32 
33  void slotDisableX(const QString &);
34  void slotCountX(const QString &);
35  void slotStartX(const QString &);
36  void slotStepX(const QString &);
37  void slotStopX(const QString &);
38 
39  void slotDisableY(const QString &);
40  void slotCountY(const QString &);
41  void slotStartY(const QString &);
42  void slotStepY(const QString &);
43  void slotStopY(const QString &);
44 
45  void slotRemoveParallel (int);
46 
47 protected:
48  virtual void handleOk ();
49 
50 private:
51 
52  void createRemoveGridLines (QGridLayout *layout, int &row);
53  void createRemoveGridLinesX (QGridLayout *layoutGridLines, int &row);
54  void createRemoveGridLinesY (QGridLayout *layoutGridLines, int &row);
55  void createRemoveParallel (QGridLayout *layout, int &row);
56  void createPreview (QGridLayout *layout, int &row);
57  void updateControls ();
58  void updatePreview();
59 
60  QCheckBox *m_chkRemoveGridLines;
61  QLineEdit *m_editCloseDistance;
62  QDoubleValidator *m_validatorCloseDistance;
63 
64  QComboBox *m_cmbDisableX;
65  QLineEdit *m_editCountX;
66  QLineEdit *m_editStartX;
67  QLineEdit *m_editStepX;
68  QLineEdit *m_editStopX;
69  QDoubleValidator *m_validatorCountX;
70  QDoubleValidator *m_validatorStartX;
71  QDoubleValidator *m_validatorStepX;
72  QDoubleValidator *m_validatorStopX;
73 
74  QComboBox *m_cmbDisableY;
75  QLineEdit *m_editCountY;
76  QLineEdit *m_editStartY;
77  QLineEdit *m_editStepY;
78  QLineEdit *m_editStopY;
79  QDoubleValidator *m_validatorCountY;
80  QDoubleValidator *m_validatorStartY;
81  QDoubleValidator *m_validatorStepY;
82  QDoubleValidator *m_validatorStopY;
83 
84  QCheckBox *m_chkRemoveParallel;
85 
86  QGraphicsScene *m_scenePreview;
87  ViewPreview *m_viewPreview;
88 
89  DocumentModelGridRemoval *m_modelGridRemovalBefore;
90  DocumentModelGridRemoval *m_modelGridRemovalAfter;
91 };
92 
93 #endif // DLG_SETTINGS_GRID_REMOVAL_H
virtual void load(CmdMediator &cmdMediator)
Load settings from Document.
Dialog for editing grid removal settings.
virtual void handleOk()
Process slotOk.
DlgSettingsGridRemoval(MainWindow &mainWindow)
Single constructor.
Class that modifies QGraphicsView to automatically expand/shrink the view to fit the window...
Definition: ViewPreview.h:8
Command queue stack.
Definition: CmdMediator.h:16
Abstract base class for all Settings dialogs.
virtual QWidget * createSubPanel()
Create dialog-specific panel to which base class will add Ok and Cancel buttons.
Model for DlgSettingsGridRemoval and CmdSettingsGridRemoval. The settings are unstable until the user...
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:60
CmdMediator & cmdMediator()
Provide access to Document information wrapped inside CmdMediator.