Engauge Digitizer 2
Loading...
Searching...
No Matches
DlgSettingsGridDisplay.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_DISPLAY_H
8#define DLG_SETTINGS_GRID_DISPLAY_H
9
11#include "GridLines.h"
12
13class ButtonWhatsThis;
15class QCheckBox;
16class QComboBox;
17class QDoubleValidator;
18class QGraphicsScene;
19class QGridLayout;
20class QGroupBox;
21class QHBoxLayout;
22class QLabel;
23class QLineEdit;
24class QSpinBox;
25class ViewPreview;
26
29{
30 Q_OBJECT;
31
32public:
36
37 virtual void createOptionalSaveDefault (QHBoxLayout *layout);
38 virtual QWidget *createSubPanel ();
39 virtual void load (CmdMediator &cmdMediator);
40 virtual void setSmallDialogs (bool smallDialogs);
41
42private slots:
43
44 void slotColor (const QString &);
45 void slotLineWidth (int);
46
47 void slotDisableX(const QString &);
48 void slotCountX(const QString &);
49 void slotStartX(const QString &);
50 void slotStepX(const QString &);
51 void slotStopX(const QString &);
52
53 void slotDisableY(const QString &);
54 void slotCountY(const QString &);
55 void slotStartY(const QString &);
56 void slotStepY(const QString &);
57 void slotStopY(const QString &);
58
59 void slotWhatsThis();
60
61protected:
62 virtual void handleOk ();
63
64private:
65
66 void createDisplayCommon (QGridLayout *layout, int &row);
67 void createDisplayGridLinesX (QGridLayout *layoutGridLines, int &row);
68 void createDisplayGridLinesY (QGridLayout *layoutGridLines, int &row);
69 void createPreview (QGridLayout *layout, int &row);
70 bool textItemsAreValid () const;
71 bool textItemsDoNotBreakLineCountLimit ();
72 void updateControls ();
73 void updateDisplayedVariableX ();
74 void updateDisplayedVariableY ();
75 void updatePreview();
76
77 ButtonWhatsThis *m_btnWhatsThis;
78
79 QGroupBox *m_groupX;
80 QComboBox *m_cmbDisableX;
81 QLineEdit *m_editCountX;
82 QLineEdit *m_editStartX;
83 QLineEdit *m_editStepX;
84 QLineEdit *m_editStopX;
85 QDoubleValidator *m_validatorCountX;
86 QDoubleValidator *m_validatorStartX;
87 QDoubleValidator *m_validatorStepX;
88 QDoubleValidator *m_validatorStopX;
89
90 QGroupBox *m_groupY;
91 QComboBox *m_cmbDisableY;
92 QLineEdit *m_editCountY;
93 QLineEdit *m_editStartY;
94 QLineEdit *m_editStepY;
95 QLineEdit *m_editStopY;
96 QDoubleValidator *m_validatorCountY;
97 QDoubleValidator *m_validatorStartY;
98 QDoubleValidator *m_validatorStepY;
99 QDoubleValidator *m_validatorStopY;
100
101 QLabel *m_labelLimitWarning;
102
103 QComboBox *m_cmbColor;
104 QSpinBox *m_spinLineWidth;
105
106 GridLines m_gridLines;
107
108 QGraphicsScene *m_scenePreview;
109 ViewPreview *m_viewPreview;
110
111 DocumentModelGridDisplay *m_modelGridDisplayBefore;
112 DocumentModelGridDisplay *m_modelGridDisplayAfter;
113};
114
115#endif // DLG_SETTINGS_GRID_DISPLAY_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 setSmallDialogs(bool smallDialogs)
If false then dialogs have a minimum size so all controls are visible.
virtual QWidget * createSubPanel()
Create dialog-specific panel to which base class will add Ok and Cancel buttons.
virtual void load(CmdMediator &cmdMediator)
Load settings from Document.
DlgSettingsGridDisplay(MainWindow &mainWindow)
Single constructor.
virtual void handleOk()
Process slotOk.
virtual void createOptionalSaveDefault(QHBoxLayout *layout)
Let subclass define an optional Save As Default button.
Model for DlgSettingsGridDisplay and CmdSettingsGridDisplay.
Container class for GridLine objects.
Definition GridLines.h:19
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