7 #include "CmdMediator.h"
8 #include "CmdSettingsCurveProperties.h"
9 #include "ColorPalette.h"
10 #include "DlgSettingsCurveProperties.h"
11 #include "EngaugeAssert.h"
12 #include "EnumsToQt.h"
13 #include "GeometryWindow.h"
14 #include "GraphicsPoint.h"
15 #include "GraphicsPointFactory.h"
16 #include "GraphicsView.h"
18 #include "MainWindow.h"
22 #include <QGraphicsRectItem>
23 #include <QGraphicsScene>
24 #include <QGridLayout>
28 #include <QListWidget>
31 #include <QPushButton>
33 #include <QSpacerItem>
37 #include "SettingsForGraph.h"
39 #include "SplinePair.h"
41 #include "ViewPreview.h"
45 const QString CONNECT_AS_FUNCTION_SMOOTH_STR (
"Function - Smooth");
46 const QString CONNECT_AS_FUNCTION_STRAIGHT_STR (
"Function - Straight");
47 const QString CONNECT_AS_RELATION_SMOOTH_STR (
"Relation - Smooth");
48 const QString CONNECT_AS_RELATION_STRAIGHT_STR (
"Relation - Straight");
50 const double PREVIEW_WIDTH = 100.0;
51 const double PREVIEW_HEIGHT = 100.0;
52 const int MINIMUM_HEIGHT = 500;
54 const QPointF POS_LEFT (PREVIEW_WIDTH / 3.0,
55 PREVIEW_HEIGHT * 2.0 / 3.0);
56 const QPointF POS_CENTER (PREVIEW_WIDTH / 2.0,
57 PREVIEW_HEIGHT / 3.0);
58 const QPointF POS_RIGHT (2.0 * PREVIEW_WIDTH / 3.0,
59 PREVIEW_HEIGHT * 2.0 / 3.0);
63 "DlgSettingsCurveProperties",
65 m_modelMainWindow (mainWindow.modelMainWindow()),
66 m_scenePreview (nullptr),
67 m_viewPreview (nullptr),
68 m_modelCurveStylesBefore (nullptr),
69 m_modelCurveStylesAfter (nullptr)
71 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::DlgSettingsCurveProperties";
76 setMinimumWidth (740);
79 DlgSettingsCurveProperties::~DlgSettingsCurveProperties()
81 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::~DlgSettingsCurveProperties";
84 void DlgSettingsCurveProperties::createCurveName (QGridLayout *layout,
87 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::createCurveName";
89 QLabel *labelCurveName =
new QLabel (QString (
"%1:").arg (tr (
"Curve Name")));
90 layout->addWidget (labelCurveName, row, 1);
92 m_cmbCurveName =
new QComboBox ();
93 m_cmbCurveName->setWhatsThis (tr (
"Name of the curve that is currently selected for editing"));
94 connect (m_cmbCurveName, SIGNAL (activated (
const QString &)),
this, SLOT (slotCurveName (
const QString &)));
95 layout->addWidget (m_cmbCurveName, row++, 2);
98 void DlgSettingsCurveProperties::createLine (QGridLayout *layout,
101 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::createLine";
103 m_groupLine =
new QGroupBox (tr (
"Line"));
104 layout->addWidget (m_groupLine, row++, 2);
106 QGridLayout *layoutGroup =
new QGridLayout;
107 m_groupLine->setLayout (layoutGroup);
109 QLabel *labelLineWidth =
new QLabel (QString (
"%1:").arg (tr (
"Width")));
110 layoutGroup->addWidget (labelLineWidth, 0, 0);
112 m_spinLineWidth =
new QSpinBox (m_groupLine);
113 m_spinLineWidth->setWhatsThis (tr (
"Select a width for the lines drawn between points.\n\n"
114 "This applies only to graph curves. No lines are ever drawn between axis points."));
115 m_spinLineWidth->setMinimum(1);
116 connect (m_spinLineWidth, SIGNAL (valueChanged (
int)),
this, SLOT (slotLineWidth (
int)));
117 layoutGroup->addWidget (m_spinLineWidth, 0, 1);
119 QLabel *labelLineColor =
new QLabel (QString (
"%1:").arg (tr (
"Color")));
120 layoutGroup->addWidget (labelLineColor, 1, 0);
122 m_cmbLineColor =
new QComboBox (m_groupLine);
123 m_cmbLineColor->setWhatsThis (tr (
"Select a color for the lines drawn between points.\n\n"
124 "This applies only to graph curves. No lines are ever drawn between axis points."));
126 connect (m_cmbLineColor, SIGNAL (activated (
const QString &)),
this, SLOT (slotLineColor (
const QString &)));
127 layoutGroup->addWidget (m_cmbLineColor, 1, 1);
129 QLabel *labelLineType =
new QLabel (QString (
"%1:").arg (tr (
"Connect as")));
130 layoutGroup->addWidget (labelLineType, 2, 0);
132 m_cmbLineType =
new QComboBox (m_groupLine);
133 m_cmbLineType->addItem (CONNECT_AS_FUNCTION_STRAIGHT_STR, QVariant (CONNECT_AS_FUNCTION_STRAIGHT));
134 m_cmbLineType->addItem (CONNECT_AS_FUNCTION_SMOOTH_STR, QVariant (CONNECT_AS_FUNCTION_SMOOTH));
135 m_cmbLineType->addItem (CONNECT_AS_RELATION_STRAIGHT_STR, QVariant (CONNECT_AS_RELATION_STRAIGHT));
136 m_cmbLineType->addItem (CONNECT_AS_RELATION_SMOOTH_STR, QVariant (CONNECT_AS_RELATION_SMOOTH));
137 m_cmbLineType->setWhatsThis (tr (
"Select rule for connecting points with lines.\n\n"
138 "If the curve is connected as a single-valued function then the points are ordered by "
139 "increasing value of the independent variable.\n\n"
140 "If the curve is connected as a closed contour, then the points are ordered by age, except for "
141 "points placed along an existing line. Any point placed on top of any existing line is inserted "
142 "between the two endpoints of that line - as if its age was between the ages of the two "
144 "Lines are drawn between successively ordered points.\n\n"
145 "Straight curves are drawn with straight lines between successive points. Smooth curves are drawn "
146 "with smooth lines between successive points, using natural cubic splines of (x,y) pairs versus "
147 "scalar ordinal (t) values.\n\n"
148 "This applies only to graph curves. No lines are ever drawn between axis points."));
149 connect (m_cmbLineType, SIGNAL (activated (
const QString &)),
this, SLOT (slotLineType (
const QString &)));
150 layoutGroup->addWidget (m_cmbLineType, 2, 1);
153 void DlgSettingsCurveProperties::createPoint (QGridLayout *layout,
156 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::createPoint";
158 m_groupPoint =
new QGroupBox (tr (
"Point"));
159 layout->addWidget (m_groupPoint, row++, 1);
161 QGridLayout *layoutGroup =
new QGridLayout;
162 m_groupPoint->setLayout (layoutGroup);
164 QLabel *labelPointShape =
new QLabel(QString (
"%1:").arg (tr (
"Shape")));
165 layoutGroup->addWidget (labelPointShape, 0, 0);
167 m_cmbPointShape =
new QComboBox (m_groupPoint);
168 m_cmbPointShape->setWhatsThis (tr (
"Select a shape for the points"));
169 m_cmbPointShape->addItem (pointShapeToString (POINT_SHAPE_CIRCLE),
171 m_cmbPointShape->addItem (pointShapeToString (POINT_SHAPE_CROSS),
173 m_cmbPointShape->addItem (pointShapeToString (POINT_SHAPE_DIAMOND),
174 POINT_SHAPE_DIAMOND);
175 m_cmbPointShape->addItem (pointShapeToString (POINT_SHAPE_SQUARE),
177 m_cmbPointShape->addItem (pointShapeToString (POINT_SHAPE_TRIANGLE),
178 POINT_SHAPE_TRIANGLE);
179 m_cmbPointShape->addItem (pointShapeToString (POINT_SHAPE_X),
181 connect (m_cmbPointShape, SIGNAL (activated (
const QString &)),
this, SLOT (slotPointShape (
const QString &)));
182 layoutGroup->addWidget (m_cmbPointShape, 0, 1);
184 QLabel *labelPointRadius =
new QLabel (QString (
"%1:").arg (tr (
"Radius")));
185 layoutGroup->addWidget (labelPointRadius, 1, 0);
187 m_spinPointRadius =
new QSpinBox (m_groupPoint);
188 m_spinPointRadius->setWhatsThis (tr (
"Select a radius, in pixels, for the points"));
189 m_spinPointRadius->setMinimum (1);
190 connect (m_spinPointRadius, SIGNAL (valueChanged (
int)),
this, SLOT (slotPointRadius (
int)));
191 layoutGroup->addWidget (m_spinPointRadius, 1, 1);
193 QLabel *labelPointLineWidth =
new QLabel (QString (
"%1:").arg (tr (
"Line width")));
194 layoutGroup->addWidget (labelPointLineWidth, 2, 0);
196 m_spinPointLineWidth =
new QSpinBox (m_groupPoint);
197 m_spinPointLineWidth->setWhatsThis (tr (
"Select a line width, in pixels, for the points.\n\n"
198 "A larger width results in a thicker line, with the exception of a value of zero "
199 "which always results in a line that is one pixel wide (which is easy to see even "
200 "when zoomed far out)"));
201 m_spinPointLineWidth->setMinimum (0);
202 connect (m_spinPointLineWidth, SIGNAL (valueChanged (
int)),
this, SLOT (slotPointLineWidth (
int)));
203 layoutGroup->addWidget (m_spinPointLineWidth, 2, 1);
205 QLabel *labelPointColor =
new QLabel (QString (
"%1:").arg (tr (
"Color")));
206 layoutGroup->addWidget (labelPointColor, 3, 0);
208 m_cmbPointColor =
new QComboBox (m_groupPoint);
209 m_cmbPointColor->setWhatsThis (tr (
"Select a color for the line used to draw the point shapes"));
211 connect (m_cmbPointColor, SIGNAL (activated (
const QString &)),
this, SLOT (slotPointColor (
const QString &)));
212 layoutGroup->addWidget (m_cmbPointColor, 3, 1);
217 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::createOptionalSaveDefault";
219 m_btnSaveDefault =
new QPushButton (
"Save As Default");
220 m_btnSaveDefault->setWhatsThis (tr (
"Save the visible curve settings for use as future defaults, according to the curve name selection.\n\n"
221 "If the visible settings are for the axes curve, then they will be used for future "
222 "axes curves, until new settings are saved as the defaults.\n\n"
223 "If the visible settings are for the Nth graph curve in the curve list, then they will be used for future "
224 "graph curves that are also the Nth graph curve in their curve list, until new settings are saved as the defaults."));
225 connect (m_btnSaveDefault, SIGNAL (released ()),
this, SLOT (slotSaveDefault ()));
226 layout->addWidget (m_btnSaveDefault, 0, Qt::AlignLeft);
229 void DlgSettingsCurveProperties::createPreview (QGridLayout *layout,
232 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::createPreview";
234 QLabel *labelPreview =
new QLabel (tr (
"Preview"));
235 layout->addWidget (labelPreview, row++, 0, 1, 4);
237 m_scenePreview =
new QGraphicsScene (
this);
239 ViewPreview::VIEW_ASPECT_RATIO_ONE_TO_ONE,
241 m_viewPreview->setWhatsThis (tr (
"Preview window that shows how current settings affect the points and line of the selected curve.\n\n"
242 "The X coordinate is in the horizontal direction, and the Y coordinate is in the vertical direction. A "
243 "function can have only one Y value, at most, for any X value, but a relation can have multiple Y values "
244 "for one X value."));
245 m_viewPreview->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
246 m_viewPreview->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
248 m_viewPreview->setRenderHint (QPainter::Antialiasing);
250 layout->addWidget (m_viewPreview, row++, 0, 1, 4);
255 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::createSubPanel";
257 QWidget *subPanel =
new QWidget ();
258 QGridLayout *layout =
new QGridLayout (subPanel);
259 subPanel->setLayout (layout);
262 createCurveName (layout, row);
264 int rowLeft = row, rowRight = row++;
265 createPoint (layout, rowLeft);
266 createLine (layout, rowRight);
267 createPreview (layout, row);
269 layout->setColumnStretch(0, 1);
270 layout->setColumnStretch(1, 0);
271 layout->setColumnStretch(2, 0);
272 layout->setColumnStretch(3, 1);
274 layout->setRowStretch (0, 1);
279 void DlgSettingsCurveProperties::drawLine (
bool isRelation,
282 const double Z_LINE = -1.0;
286 QPointF p0 (POS_LEFT), p1 (POS_CENTER), p2 (POS_RIGHT);
299 vector<SplinePair> xy;
308 path.cubicTo (QPointF (spline.p1(0).x(),
310 QPointF (spline.p2(0).x(),
313 path.cubicTo (QPointF (spline.p1(1).x(),
315 QPointF (spline.p2(1).x(),
324 QGraphicsPathItem *line =
new QGraphicsPathItem (path);
325 line->setPen (QPen (QBrush (ColorPaletteToQColor (lineStyle.
paletteColor())),
327 line->setZValue (Z_LINE);
328 m_scenePreview->addItem (line);
331 void DlgSettingsCurveProperties::drawPoints (
const PointStyle &pointStyle)
333 const QString NULL_IDENTIFIER;
343 NULL_GEOMETRY_WINDOW);
351 NULL_GEOMETRY_WINDOW);
359 NULL_GEOMETRY_WINDOW);
365 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::handleOk";
367 ENGAUGE_CHECK_PTR (m_modelCurveStylesBefore);
368 ENGAUGE_CHECK_PTR (m_modelCurveStylesAfter);
372 *m_modelCurveStylesBefore,
373 *m_modelCurveStylesAfter);
381 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::load";
386 delete m_modelCurveStylesBefore;
387 delete m_modelCurveStylesAfter;
394 m_cmbCurveName->clear ();
395 m_cmbCurveName->addItem (AXIS_CURVE_NAME);
397 QStringList::const_iterator itr;
398 for (itr = curveNames.begin (); itr != curveNames.end (); itr++) {
400 QString curveName = *itr;
401 m_cmbCurveName->addItem (curveName);
404 loadForCurveName (
mainWindow().selectedGraphCurve());
410 void DlgSettingsCurveProperties::loadForCurveName (
const QString &curveName)
412 int indexCurveName = m_cmbCurveName->findText(curveName);
413 ENGAUGE_ASSERT (indexCurveName >= 0);
414 m_cmbCurveName->setCurrentIndex(indexCurveName);
416 int indexPointShape = m_cmbPointShape->findData (QVariant (m_modelCurveStylesAfter->
pointShape (curveName)));
417 ENGAUGE_ASSERT (indexPointShape >= 0);
418 m_cmbPointShape->setCurrentIndex (indexPointShape);
420 m_spinPointRadius->setValue (m_modelCurveStylesAfter->
pointRadius(curveName));
421 m_spinPointLineWidth->setValue (m_modelCurveStylesAfter->
pointLineWidth(curveName));
423 int indexPointColor = m_cmbPointColor->findData (QVariant (m_modelCurveStylesAfter->
pointColor(curveName)));
424 ENGAUGE_ASSERT (indexPointColor >= 0);
425 m_cmbPointColor->setCurrentIndex (indexPointColor);
427 int indexLineColor = m_cmbLineColor->findData (QVariant (m_modelCurveStylesAfter->
lineColor(curveName)));
428 ENGAUGE_ASSERT (indexLineColor >= 0);
429 m_cmbLineColor->setCurrentIndex (indexLineColor);
431 m_spinLineWidth->setValue (m_modelCurveStylesAfter->
lineWidth(curveName));
433 int indexCurveConnectAs = m_cmbLineType->findData (QVariant (m_modelCurveStylesAfter->
lineConnectAs (curveName)));
434 if (indexCurveConnectAs >= 0) {
436 m_cmbLineType->setCurrentIndex (indexCurveConnectAs);
440 m_cmbLineColor->setEnabled (curveName != AXIS_CURVE_NAME);
441 m_spinLineWidth->setEnabled (curveName != AXIS_CURVE_NAME);
442 m_cmbLineType->setEnabled (curveName != AXIS_CURVE_NAME);
448 void DlgSettingsCurveProperties::resetSceneRectangle ()
453 qFloor (PREVIEW_WIDTH),
454 qFloor (PREVIEW_HEIGHT));
456 QGraphicsRectItem *itemPerimeter =
new QGraphicsRectItem(rect);
457 itemPerimeter->setVisible(
false);
458 m_scenePreview->addItem (itemPerimeter);
459 m_viewPreview->centerOn (QPointF (0.0, 0.0));
464 m_cmbCurveName->setCurrentText (curveName);
465 loadForCurveName (curveName);
471 setMinimumHeight (MINIMUM_HEIGHT);
475 void DlgSettingsCurveProperties::slotCurveName(
const QString &curveName)
477 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::slotCurveName";
482 if (!curveName.isEmpty () && (m_modelCurveStylesAfter !=
nullptr)) {
484 loadForCurveName (curveName);
488 void DlgSettingsCurveProperties::slotLineColor(
const QString &lineColor)
490 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::slotLineColor color=" << lineColor.toLatin1().data();
494 m_modelCurveStylesAfter->
setLineColor(m_cmbCurveName->currentText(),
495 static_cast<ColorPalette
> (m_cmbLineColor->currentData().toInt()));
500 void DlgSettingsCurveProperties::slotLineWidth(
int width)
502 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::slotLineWidth width=" << width;
506 m_modelCurveStylesAfter->
setLineWidth(m_cmbCurveName->currentText(),
512 void DlgSettingsCurveProperties::slotLineType(
const QString &lineType)
514 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::slotLineType lineType=" << lineType.toLatin1().data();
519 static_cast<CurveConnectAs
> (m_cmbLineType->currentData().toInt ()));
524 void DlgSettingsCurveProperties::slotPointColor(
const QString &pointColor)
526 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::slotPointColor pointColor=" << pointColor.toLatin1().data();
530 m_modelCurveStylesAfter->
setPointColor(m_cmbCurveName->currentText(),
531 static_cast<ColorPalette
> (m_cmbPointColor->currentData().toInt ()));
536 void DlgSettingsCurveProperties::slotPointLineWidth(
int lineWidth)
538 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::slotPointLineWidth lineWidth=" << lineWidth;
548 void DlgSettingsCurveProperties::slotPointRadius(
int radius)
550 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::slotPointRadius radius=" << radius;
554 m_modelCurveStylesAfter->
setPointRadius(m_cmbCurveName->currentText(),
560 void DlgSettingsCurveProperties::slotPointShape(
const QString &)
562 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::slotPointShape";
566 m_modelCurveStylesAfter->
setPointShape(m_cmbCurveName->currentText(),
567 static_cast<PointShape
> (m_cmbPointShape->currentData().toInt ()));
572 void DlgSettingsCurveProperties::slotSaveDefault()
574 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::slotSaveDefault";
576 QString curve = m_cmbCurveName->currentText ();
578 QSettings settings (SETTINGS_ENGAUGE, SETTINGS_DIGITIZER);
579 if (curve == AXIS_CURVE_NAME) {
581 settings.beginGroup (SETTINGS_GROUP_CURVE_AXES);
587 settings.beginGroup (groupName);
591 settings.setValue (SETTINGS_CURVE_POINT_SHAPE,
593 settings.setValue (SETTINGS_CURVE_LINE_COLOR,
594 m_modelCurveStylesAfter->
lineColor(curve));
595 settings.setValue (SETTINGS_CURVE_LINE_CONNECT_AS,
597 settings.setValue (SETTINGS_CURVE_LINE_WIDTH,
598 m_modelCurveStylesAfter->
lineWidth(curve));
599 settings.setValue (SETTINGS_CURVE_POINT_COLOR,
601 settings.setValue (SETTINGS_CURVE_POINT_LINE_WIDTH,
603 settings.setValue (SETTINGS_CURVE_POINT_RADIUS,
605 settings.endGroup ();
608 void DlgSettingsCurveProperties::updateControls()
610 bool isGoodState = !m_spinPointRadius->text().isEmpty () &&
611 !m_spinPointLineWidth->text().isEmpty () &&
612 !m_spinLineWidth->text().isEmpty ();
613 m_cmbCurveName->setEnabled (isGoodState);
614 enableOk (isGoodState && m_isDirty);
617 void DlgSettingsCurveProperties::updatePreview()
619 m_scenePreview->clear();
621 QString currentCurve = m_cmbCurveName->currentText();
627 bool isRelation = (lineStyle.
curveConnectAs() == CONNECT_AS_RELATION_SMOOTH ||
630 drawPoints (pointStyle);
631 drawLine (isRelation,
634 resetSceneRectangle();
void setLineColor(const QString &curveName, ColorPalette lineColor)
Set method for line color in specified curve.
Manage storage and retrieval of the settings for the curves.
Factor for generating GraphicsPointAbstractBase class objects.
void setLineConnectAs(const QString &curveName, CurveConnectAs curveConnectAs)
Set method for connect as method for lines in specified curve.
void setCurveName(const QString &curveName)
Load information for the specified curve name. When called externally, the load method must have been...
void setLineWidth(const QString &curveName, int width)
Set method for line width in specified curve.
unsigned int width() const
Width of line.
Cubic interpolation given independent and dependent value vectors.
void setPointLineWidth(const QString &curveName, int width)
Set method for curve point perimeter line width.
Model for DlgSettingsCurveProperties and CmdSettingsCurveProperties.
void setCmdMediator(CmdMediator &cmdMediator)
Store CmdMediator for easy access by the leaf class.
LineStyle lineStyle() const
Get method for LineStyle.
int pointRadius(const QString &curveName) const
Get method for curve point radius.
virtual void load(CmdMediator &cmdMediator)
Load settings from Document.
Command for DlgSettingsCurveProperties.
PointStyle pointStyle() const
Get method for PointStyle.
DlgSettingsCurveProperties(MainWindow &mainWindow)
Single constructor.
Window that displays the geometry information, as a table, for the current curve. ...
virtual void handleOk()
Process slotOk.
void finishPanel(QWidget *subPanel, int minimumWidth=MINIMUM_DIALOG_WIDTH, int minimumHeightOrZero=0)
Add Ok and Cancel buttons to subpanel to get the whole dialog.
void setPointStyle(const PointStyle &pointStyle)
Update the point style.
int lineWidth(const QString &curveName) const
Get method for line width in specified curve.
QString groupNameForNthCurve(int indexOneBased) const
Return the group name, that appears in the settings file/registry, for the specified curve index...
GraphicsPoint * createPoint(QGraphicsScene &scene, const QString &identifier, const QPointF &posScreen, const PointStyle &pointStyle, GeometryWindow *geometryWindow)
Create circle or polygon point according to the PointStyle.
ColorPalette lineColor(const QString &curveName) const
Get method for line color in specified curve.
Class that modifies QGraphicsView to automatically expand/shrink the view to fit the window...
Details for a specific Point.
virtual QWidget * createSubPanel()
Create dialog-specific panel to which base class will add Ok and Cancel buttons.
CurveConnectAs lineConnectAs(const QString &curveName) const
Get method for connect as method for lines in specified curve.
virtual void createOptionalSaveDefault(QHBoxLayout *layout)
Let subclass define an optional Save As Default button.
void populateColorComboWithoutTransparent(QComboBox &combo)
Add colors in color palette to combobox, without transparent entry at end.
Details for a specific Line.
PointShape pointShape(const QString &curveName) const
Get method for curve point shape.
Graphics item for drawing a circular or polygonal Point.
ColorPalette pointColor(const QString &curveName) const
Get method for curve point color in specified curve.
void setPointRadius(const QString &curveName, int radius)
Set method for curve point radius.
static int MINIMUM_PREVIEW_HEIGHT
Dialog layout constant that guarantees preview has sufficent room.
int pointLineWidth(const QString &curveName) const
Get method for curve point line width.
void enableOk(bool enable)
Let leaf subclass control the Ok button.
ColorPalette paletteColor() const
Line color.
CurveStyle curveStyle(const QString &curveName) const
CurveStyle in specified curve.
void populateColorComboWithTransparent(QComboBox &combo)
Add colors in color palette to combobox, with transparent entry at end.
virtual void setSmallDialogs(bool smallDialogs)
If false then dialogs have a minimum size so all controls are visible.
Abstract base class for all Settings dialogs.
CurveConnectAs curveConnectAs() const
Get method for connect type.
void setPointShape(const QString &curveName, PointShape shape)
Set method for curve point shape in specified curve.
MainWindow & mainWindow()
Get method for MainWindow.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Single X/Y pair for cubic spline interpolation initialization and calculations.
CmdMediator & cmdMediator()
Provide access to Document information wrapped inside CmdMediator.
void setPointColor(const QString &curveName, ColorPalette curveColor)
Set method curve point color in specified curve.