Engauge Digitizer  2
DlgSettingsAxesChecker.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_AXES_CHECKER_H
8 #define DLG_SETTINGS_AXES_CHECKER_H
9 
10 #include "DlgSettingsAbstractBase.h"
11 
14 class Checker;
15 class QAbstractButton;
16 class QButtonGroup;
17 class QComboBox;
18 class QGraphicsScene;
19 class QGridLayout;
20 class QRadioButton;
21 class ViewPreview;
22 
25 {
26  Q_OBJECT;
27 
28 public:
31  virtual ~DlgSettingsAxesChecker();
32 
33  virtual void createOptionalSaveDefault (QHBoxLayout *layout);
34  virtual QWidget *createSubPanel ();
35  virtual void load (CmdMediator &cmdMediator);
36  virtual void setSmallDialogs (bool smallDialogs);
37 
38 private slots:
39  void slotGroupMode (QAbstractButton*);
40  void slotLineColor(const QString &);
41  void slotSeconds (const QString &);
42 
43 protected:
44  virtual void handleOk ();
45 
46 private:
47 
48  void createControls (QGridLayout *layout, int &row);
49  void createPoints ();
50  void createPreview (QGridLayout *layout, int &row);
51  void updateControls();
52  void updatePreview();
53 
54  QButtonGroup *m_groupMode;
55  QRadioButton *m_btnNever;
56  QRadioButton *m_btnNSeconds;
57  QRadioButton *m_btnForever;
58 
59  QComboBox *m_cmbSeconds; // Seconds when HIGHLIGHT_MODE_N_SECONDS is applied
60 
61  QComboBox *m_cmbLineColor;
62 
63  QGraphicsScene *m_scenePreview;
64  ViewPreview *m_viewPreview;
65  Checker *m_checker;
66 
67  DocumentModelAxesChecker *m_modelAxesCheckerBefore;
68  DocumentModelAxesChecker *m_modelAxesCheckerAfter;
69  DocumentModelCoords *m_modelCoords;
70 };
71 
72 #endif // DLG_SETTINGS_AXES_CHECKER_H
Box shape that is drawn through the three axis points, to temporarily (usually) or permanently (rarel...
Definition: Checker.h:33
virtual void load(CmdMediator &cmdMediator)
Load settings from Document.
Class that modifies QGraphicsView to automatically expand/shrink the view to fit the window...
Definition: ViewPreview.h:14
virtual void setSmallDialogs(bool smallDialogs)
If false then dialogs have a minimum size so all controls are visible.
Model for DlgSettingsCoords and CmdSettingsCoords.
virtual void createOptionalSaveDefault(QHBoxLayout *layout)
Let subclass define an optional Save As Default button.
virtual QWidget * createSubPanel()
Create dialog-specific panel to which base class will add Ok and Cancel buttons.
virtual void handleOk()
Process slotOk.
Model for DlgSettingsAxesChecker and CmdSettingsAxesChecker.
Command queue stack.
Definition: CmdMediator.h:23
Abstract base class for all Settings dialogs.
DlgSettingsAxesChecker(MainWindow &mainWindow)
Single constructor.
Dialog for editing axes checker settings.
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:89
CmdMediator & cmdMediator()
Provide access to Document information wrapped inside CmdMediator.