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 ButtonWhatsThis;
15class GraphicsPoint;
16class QComboBox;
17class QGraphicsScene;
18class QGridLayout;
19class QGroupBox;
20class QSpinBox;
21class ViewPreview;
22
25{
26 Q_OBJECT;
27
28public:
32
33 virtual void createOptionalSaveDefault (QHBoxLayout *layout);
34 virtual QWidget *createSubPanel ();
35 virtual void load (CmdMediator &cmdMediator);
36
38 void setCurveName (const QString &curveName);
39 virtual void setSmallDialogs (bool smallDialogs);
40
41private slots:
42 void slotCurveName(const QString &);
43 void slotLineColor(const QString &);
44 void slotLineType(const QString &);
45 void slotLineWidth(int);
46 void slotPointColor(const QString &);
47 void slotPointLineWidth (int);
48 void slotPointRadius(int);
49 void slotPointShape(const QString &);
50 void slotSaveDefault();
51 void slotWhatsThis();
52
53protected:
54 virtual void handleOk ();
55
56private:
57
58 void createCurveName (QGridLayout *layout, int &row);
59 void createLine (QGridLayout *layout, int &row);
60 void createPoint (QGridLayout *layout, int &row);
61 void createPreview (QGridLayout *layout, int &row);
62 void drawLine (bool isRelation,
63 const LineStyle &lineStyle);
64 void drawPoints (const PointStyle &pointStyle);
65 void loadForCurveName(const QString &curveName);
66 void resetSceneRectangle();
67 void updateControls();
68 void updatePreview();
69
70 ButtonWhatsThis *m_btnWhatsThis;
71
72 MainWindowModel m_modelMainWindow;
73
74 QComboBox *m_cmbCurveName;
75
76 QGroupBox *m_groupPoint;
77 QComboBox *m_cmbPointShape;
78 QSpinBox *m_spinPointRadius;
79 QSpinBox *m_spinPointLineWidth;
80 QComboBox *m_cmbPointColor;
81
82 QGroupBox *m_groupLine;
83 QSpinBox *m_spinLineWidth;
84 QComboBox *m_cmbLineColor;
85 QComboBox *m_cmbLineType;
86
87 QPushButton *m_btnSaveDefault;
88
89 QGraphicsScene *m_scenePreview;
90 ViewPreview *m_viewPreview;
91
92 CurveStyles *m_modelCurveStylesBefore;
93 CurveStyles *m_modelCurveStylesAfter;
94
95 bool m_isDirty;
96};
97
98#endif // DLG_SETTINGS_CURVE_PROPERTIES_H
Unobtrusive button to trigger QWhatsThis since some operating systems (Linux Mint) do not show WhatsT...
Command queue stack.
Definition CmdMediator.h:24
Model for DlgSettingsCurveProperties and CmdSettingsCurveProperties.
Definition CurveStyles.h:23
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.
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:95
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