Engauge Digitizer  2
DlgSettingsCurveProperties.h
1 #ifndef DLG_SETTINGS_CURVE_PROPERTIES_H
2 #define DLG_SETTINGS_CURVE_PROPERTIES_H
3 
4 #include "CurveStyles.h"
5 #include "DlgSettingsAbstractBase.h"
6 
7 class GraphicsPoint;
8 class QComboBox;
9 class QGraphicsScene;
10 class QGridLayout;
11 class QGroupBox;
12 class QSpinBox;
13 class ViewPreview;
14 
17 {
18  Q_OBJECT;
19 
20 public:
23  virtual ~DlgSettingsCurveProperties();
24 
25  virtual QWidget *createSubPanel ();
26  virtual void load (CmdMediator &cmdMediator);
27 
29  void setCurveName (const QString &curveName);
30 
31 private slots:
32  void slotCurveName(const QString &);
33  void slotLineColor(const QString &);
34  void slotLineType(const QString &);
35  void slotLineWidth(int);
36  void slotPointColor(const QString &);
37  void slotPointLineWidth (int);
38  void slotPointRadius(int);
39  void slotPointShape(const QString &);
40 
41 protected:
42  virtual void handleOk ();
43 
44 private:
45 
46  void createCurveName (QGridLayout *layout, int &row);
47  void createLine (QGridLayout *layout, int &row);
48  void createPoint (QGridLayout *layout, int &row);
49  void createPreview (QGridLayout *layout, int &row);
50  void drawLine (bool isRelation,
51  const LineStyle &lineStyle);
52  void drawPoints (const PointStyle &pointStyle);
53  void loadForCurveName(const QString &curveName);
54  void resetSceneRectangle();
55  void updateControls();
56  void updatePreview();
57 
58  QComboBox *m_cmbCurveName;
59 
60  QGroupBox *m_groupPoint;
61  QComboBox *m_cmbPointShape;
62  QSpinBox *m_spinPointRadius;
63  QSpinBox *m_spinPointLineWidth;
64  QComboBox *m_cmbPointColor;
65 
66  QGroupBox *m_groupLine;
67  QSpinBox *m_spinLineWidth;
68  QComboBox *m_cmbLineColor;
69  QComboBox *m_cmbLineType;
70 
71  QGraphicsScene *m_scenePreview;
72  ViewPreview *m_viewPreview;
73 
74  CurveStyles *m_modelCurveStylesBefore;
75  CurveStyles *m_modelCurveStylesAfter;
76 
77  bool m_isDirty;
78 };
79 
80 #endif // DLG_SETTINGS_CURVE_PROPERTIES_H
void setCurveName(const QString &curveName)
Load information for the specified curve name. When called externally, the load method must have been...
Model for DlgSettingsCurveProperties and CmdSettingsCurveProperties.
Definition: CurveStyles.h:16
virtual void load(CmdMediator &cmdMediator)
Load settings from Document.
DlgSettingsCurveProperties(MainWindow &mainWindow)
Single constructor.
virtual void handleOk()
Process slotOk.
Class that modifies QGraphicsView to automatically expand/shrink the view to fit the window...
Definition: ViewPreview.h:8
Details for a specific Point.
Definition: PointStyle.h:14
virtual QWidget * createSubPanel()
Create dialog-specific panel to which base class will add Ok and Cancel buttons.
Details for a specific Line.
Definition: LineStyle.h:13
Graphics item for drawing a circular or polygonal Point.
Definition: GraphicsPoint.h:33
Dialog for editing curve properties settings.
Command queue stack.
Definition: CmdMediator.h:16
Abstract base class for all Settings dialogs.
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.