Engauge Digitizer 2
Loading...
Searching...
No Matches
DlgSettingsCurveProperties.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_CURVE_PROPERTIES_H
8#define DLG_SETTINGS_CURVE_PROPERTIES_H
9
10#include "CurveStyles.h"
12#include "MainWindowModel.h"
13
14class GraphicsPoint;
15class QComboBox;
16class QGraphicsScene;
17class QGridLayout;
18class QGroupBox;
19class QSpinBox;
20class ViewPreview;
21
24{
25 Q_OBJECT;
26
27public:
31
32 virtual void createOptionalSaveDefault (QHBoxLayout *layout);
33 virtual QWidget *createSubPanel ();
34 virtual void load (CmdMediator &cmdMediator);
35
37 void setCurveName (const QString &curveName);
38 virtual void setSmallDialogs (bool smallDialogs);
39
40private slots:
41 void slotCurveName(const QString &);
42 void slotLineColor(const QString &);
43 void slotLineType(const QString &);
44 void slotLineWidth(int);
45 void slotPointColor(const QString &);
46 void slotPointLineWidth (int);
47 void slotPointRadius(int);
48 void slotPointShape(const QString &);
49 void slotSaveDefault();
50
51protected:
52 virtual void handleOk ();
53
54private:
55
56 void createCurveName (QGridLayout *layout, int &row);
57 void createLine (QGridLayout *layout, int &row);
58 void createPoint (QGridLayout *layout, int &row);
59 void createPreview (QGridLayout *layout, int &row);
60 void drawLine (bool isRelation,
61 const LineStyle &lineStyle);
62 void drawPoints (const PointStyle &pointStyle);
63 void loadForCurveName(const QString &curveName);
64 void resetSceneRectangle();
65 void updateControls();
66 void updatePreview();
67
68 MainWindowModel m_modelMainWindow;
69
70 QComboBox *m_cmbCurveName;
71
72 QGroupBox *m_groupPoint;
73 QComboBox *m_cmbPointShape;
74 QSpinBox *m_spinPointRadius;
75 QSpinBox *m_spinPointLineWidth;
76 QComboBox *m_cmbPointColor;
77
78 QGroupBox *m_groupLine;
79 QSpinBox *m_spinLineWidth;
80 QComboBox *m_cmbLineColor;
81 QComboBox *m_cmbLineType;
82
83 QPushButton *m_btnSaveDefault;
84
85 QGraphicsScene *m_scenePreview;
86 ViewPreview *m_viewPreview;
87
88 CurveStyles *m_modelCurveStylesBefore;
89 CurveStyles *m_modelCurveStylesAfter;
90
91 bool m_isDirty;
92};
93
94#endif // DLG_SETTINGS_CURVE_PROPERTIES_H
Command queue stack.
Definition CmdMediator.h:24
Model for DlgSettingsCurveProperties and CmdSettingsCurveProperties.
Definition CurveStyles.h:23
Abstract base class for all Settings dialogs.
CmdMediator & cmdMediator()
Provide access to Document information wrapped inside CmdMediator.
MainWindow & mainWindow()
Get method for MainWindow.
Dialog for editing curve properties settings.
DlgSettingsCurveProperties(MainWindow &mainWindow)
Single constructor.
virtual void handleOk()
Process slotOk.
virtual void setSmallDialogs(bool smallDialogs)
If false then dialogs have a minimum size so all controls are visible.
void setCurveName(const QString &curveName)
Load information for the specified curve name. When called externally, the load method must have been...
virtual void createOptionalSaveDefault(QHBoxLayout *layout)
Let subclass define an optional Save As Default button.
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.
Graphics item for drawing a circular or polygonal Point.
Details for a specific Line.
Definition LineStyle.h:20
Model for DlgSettingsMainWindow.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Definition MainWindow.h:92
Details for a specific Point.
Definition PointStyle.h:21
Class that modifies QGraphicsView to automatically expand/shrink the view to fit the window,...
Definition ViewPreview.h:15