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_HOURGLASS),
176 POINT_SHAPE_HOURGLASS);
177 m_cmbPointShape->addItem (pointShapeToString (POINT_SHAPE_SQUARE),
179 m_cmbPointShape->addItem (pointShapeToString (POINT_SHAPE_TRIANGLE),
180 POINT_SHAPE_TRIANGLE);
181 m_cmbPointShape->addItem (pointShapeToString (POINT_SHAPE_TRIANGLE2),
182 POINT_SHAPE_TRIANGLE2);
183 m_cmbPointShape->addItem (pointShapeToString (POINT_SHAPE_X),
185 connect (m_cmbPointShape, SIGNAL (activated (
const QString &)),
this, SLOT (slotPointShape (
const QString &)));
186 layoutGroup->addWidget (m_cmbPointShape, 0, 1);
188 QLabel *labelPointRadius =
new QLabel (QString (
"%1:").arg (tr (
"Radius")));
189 layoutGroup->addWidget (labelPointRadius, 1, 0);
191 m_spinPointRadius =
new QSpinBox (m_groupPoint);
192 m_spinPointRadius->setWhatsThis (tr (
"Select a radius, in pixels, for the points"));
193 m_spinPointRadius->setMinimum (1);
194 connect (m_spinPointRadius, SIGNAL (valueChanged (
int)),
this, SLOT (slotPointRadius (
int)));
195 layoutGroup->addWidget (m_spinPointRadius, 1, 1);
197 QLabel *labelPointLineWidth =
new QLabel (QString (
"%1:").arg (tr (
"Line width")));
198 layoutGroup->addWidget (labelPointLineWidth, 2, 0);
200 m_spinPointLineWidth =
new QSpinBox (m_groupPoint);
201 m_spinPointLineWidth->setWhatsThis (tr (
"Select a line width, in pixels, for the points.\n\n" 202 "A larger width results in a thicker line, with the exception of a value of zero " 203 "which always results in a line that is one pixel wide (which is easy to see even " 204 "when zoomed far out)"));
205 m_spinPointLineWidth->setMinimum (0);
206 connect (m_spinPointLineWidth, SIGNAL (valueChanged (
int)),
this, SLOT (slotPointLineWidth (
int)));
207 layoutGroup->addWidget (m_spinPointLineWidth, 2, 1);
209 QLabel *labelPointColor =
new QLabel (QString (
"%1:").arg (tr (
"Color")));
210 layoutGroup->addWidget (labelPointColor, 3, 0);
212 m_cmbPointColor =
new QComboBox (m_groupPoint);
213 m_cmbPointColor->setWhatsThis (tr (
"Select a color for the line used to draw the point shapes"));
215 connect (m_cmbPointColor, SIGNAL (activated (
const QString &)),
this, SLOT (slotPointColor (
const QString &)));
216 layoutGroup->addWidget (m_cmbPointColor, 3, 1);
221 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::createOptionalSaveDefault";
223 m_btnSaveDefault =
new QPushButton (
"Save As Default");
224 m_btnSaveDefault->setWhatsThis (tr (
"Save the visible curve settings for use as future defaults, according to the curve name selection.\n\n" 225 "If the visible settings are for the axes curve, then they will be used for future " 226 "axes curves, until new settings are saved as the defaults.\n\n" 227 "If the visible settings are for the Nth graph curve in the curve list, then they will be used for future " 228 "graph curves that are also the Nth graph curve in their curve list, until new settings are saved as the defaults."));
229 connect (m_btnSaveDefault, SIGNAL (released ()),
this, SLOT (slotSaveDefault ()));
230 layout->addWidget (m_btnSaveDefault, 0, Qt::AlignLeft);
233 void DlgSettingsCurveProperties::createPreview (QGridLayout *layout,
236 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::createPreview";
238 QLabel *labelPreview =
new QLabel (tr (
"Preview"));
239 layout->addWidget (labelPreview, row++, 0, 1, 4);
241 m_scenePreview =
new QGraphicsScene (
this);
243 ViewPreview::VIEW_ASPECT_RATIO_ONE_TO_ONE,
245 m_viewPreview->setWhatsThis (tr (
"Preview window that shows how current settings affect the points and line of the selected curve.\n\n" 246 "The X coordinate is in the horizontal direction, and the Y coordinate is in the vertical direction. A " 247 "function can have only one Y value, at most, for any X value, but a relation can have multiple Y values " 248 "for one X value."));
249 m_viewPreview->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
250 m_viewPreview->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
252 m_viewPreview->setRenderHint (QPainter::Antialiasing);
254 layout->addWidget (m_viewPreview, row++, 0, 1, 4);
259 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::createSubPanel";
261 QWidget *subPanel =
new QWidget ();
262 QGridLayout *layout =
new QGridLayout (subPanel);
263 subPanel->setLayout (layout);
266 createCurveName (layout, row);
268 int rowLeft = row, rowRight = row++;
269 createPoint (layout, rowLeft);
270 createLine (layout, rowRight);
271 createPreview (layout, row);
273 layout->setColumnStretch(0, 1);
274 layout->setColumnStretch(1, 0);
275 layout->setColumnStretch(2, 0);
276 layout->setColumnStretch(3, 1);
278 layout->setRowStretch (0, 1);
283 void DlgSettingsCurveProperties::drawLine (
bool isRelation,
286 const double Z_LINE = -1.0;
290 QPointF p0 (POS_LEFT), p1 (POS_CENTER), p2 (POS_RIGHT);
303 vector<SplinePair> xy;
312 path.cubicTo (QPointF (spline.p1(0).x(),
314 QPointF (spline.p2(0).x(),
317 path.cubicTo (QPointF (spline.p1(1).x(),
319 QPointF (spline.p2(1).x(),
328 QGraphicsPathItem *line =
new QGraphicsPathItem (path);
329 line->setPen (QPen (QBrush (ColorPaletteToQColor (lineStyle.
paletteColor())),
331 line->setZValue (Z_LINE);
332 m_scenePreview->addItem (line);
335 void DlgSettingsCurveProperties::drawPoints (
const PointStyle &pointStyle)
337 const QString NULL_IDENTIFIER;
347 NULL_GEOMETRY_WINDOW);
355 NULL_GEOMETRY_WINDOW);
363 NULL_GEOMETRY_WINDOW);
369 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::handleOk";
371 ENGAUGE_CHECK_PTR (m_modelCurveStylesBefore);
372 ENGAUGE_CHECK_PTR (m_modelCurveStylesAfter);
376 *m_modelCurveStylesBefore,
377 *m_modelCurveStylesAfter);
385 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::load";
390 delete m_modelCurveStylesBefore;
391 delete m_modelCurveStylesAfter;
398 m_cmbCurveName->clear ();
399 m_cmbCurveName->addItem (AXIS_CURVE_NAME);
401 QStringList::const_iterator itr;
402 for (itr = curveNames.begin (); itr != curveNames.end (); itr++) {
404 QString curveName = *itr;
405 m_cmbCurveName->addItem (curveName);
408 loadForCurveName (
mainWindow().selectedGraphCurve());
414 void DlgSettingsCurveProperties::loadForCurveName (
const QString &curveName)
416 int indexCurveName = m_cmbCurveName->findText(curveName);
417 ENGAUGE_ASSERT (indexCurveName >= 0);
418 m_cmbCurveName->setCurrentIndex(indexCurveName);
420 int indexPointShape = m_cmbPointShape->findData (QVariant (m_modelCurveStylesAfter->
pointShape (curveName)));
421 ENGAUGE_ASSERT (indexPointShape >= 0);
422 m_cmbPointShape->setCurrentIndex (indexPointShape);
424 m_spinPointRadius->setValue (m_modelCurveStylesAfter->
pointRadius(curveName));
425 m_spinPointLineWidth->setValue (m_modelCurveStylesAfter->
pointLineWidth(curveName));
427 int indexPointColor = m_cmbPointColor->findData (QVariant (m_modelCurveStylesAfter->
pointColor(curveName)));
428 ENGAUGE_ASSERT (indexPointColor >= 0);
429 m_cmbPointColor->setCurrentIndex (indexPointColor);
431 int indexLineColor = m_cmbLineColor->findData (QVariant (m_modelCurveStylesAfter->
lineColor(curveName)));
432 ENGAUGE_ASSERT (indexLineColor >= 0);
433 m_cmbLineColor->setCurrentIndex (indexLineColor);
435 m_spinLineWidth->setValue (m_modelCurveStylesAfter->
lineWidth(curveName));
437 int indexCurveConnectAs = m_cmbLineType->findData (QVariant (m_modelCurveStylesAfter->
lineConnectAs (curveName)));
438 if (indexCurveConnectAs >= 0) {
440 m_cmbLineType->setCurrentIndex (indexCurveConnectAs);
444 m_cmbLineColor->setEnabled (curveName != AXIS_CURVE_NAME);
445 m_spinLineWidth->setEnabled (curveName != AXIS_CURVE_NAME);
446 m_cmbLineType->setEnabled (curveName != AXIS_CURVE_NAME);
452 void DlgSettingsCurveProperties::resetSceneRectangle ()
457 qFloor (PREVIEW_WIDTH),
458 qFloor (PREVIEW_HEIGHT));
460 QGraphicsRectItem *itemPerimeter =
new QGraphicsRectItem(rect);
461 itemPerimeter->setVisible(
false);
462 m_scenePreview->addItem (itemPerimeter);
463 m_viewPreview->centerOn (QPointF (0.0, 0.0));
468 m_cmbCurveName->setCurrentText (curveName);
469 loadForCurveName (curveName);
475 setMinimumHeight (MINIMUM_HEIGHT);
479 void DlgSettingsCurveProperties::slotCurveName(
const QString &curveName)
481 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::slotCurveName";
486 if (!curveName.isEmpty () && (m_modelCurveStylesAfter !=
nullptr)) {
488 loadForCurveName (curveName);
492 void DlgSettingsCurveProperties::slotLineColor(
const QString &lineColor)
494 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::slotLineColor color=" << lineColor.toLatin1().data();
498 m_modelCurveStylesAfter->
setLineColor(m_cmbCurveName->currentText(),
499 static_cast<ColorPalette> (m_cmbLineColor->currentData().toInt()));
504 void DlgSettingsCurveProperties::slotLineWidth(
int width)
506 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::slotLineWidth width=" << width;
510 m_modelCurveStylesAfter->
setLineWidth(m_cmbCurveName->currentText(),
516 void DlgSettingsCurveProperties::slotLineType(
const QString &lineType)
518 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::slotLineType lineType=" << lineType.toLatin1().data();
523 static_cast<CurveConnectAs> (m_cmbLineType->currentData().toInt ()));
528 void DlgSettingsCurveProperties::slotPointColor(
const QString &pointColor)
530 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::slotPointColor pointColor=" << pointColor.toLatin1().data();
534 m_modelCurveStylesAfter->
setPointColor(m_cmbCurveName->currentText(),
535 static_cast<ColorPalette> (m_cmbPointColor->currentData().toInt ()));
540 void DlgSettingsCurveProperties::slotPointLineWidth(
int lineWidth)
542 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::slotPointLineWidth lineWidth=" << lineWidth;
552 void DlgSettingsCurveProperties::slotPointRadius(
int radius)
554 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::slotPointRadius radius=" << radius;
558 m_modelCurveStylesAfter->
setPointRadius(m_cmbCurveName->currentText(),
564 void DlgSettingsCurveProperties::slotPointShape(
const QString &)
566 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::slotPointShape";
570 m_modelCurveStylesAfter->
setPointShape(m_cmbCurveName->currentText(),
571 static_cast<PointShape> (m_cmbPointShape->currentData().toInt ()));
576 void DlgSettingsCurveProperties::slotSaveDefault()
578 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::slotSaveDefault";
580 QString curve = m_cmbCurveName->currentText ();
582 QSettings settings (SETTINGS_ENGAUGE, SETTINGS_DIGITIZER);
583 if (curve == AXIS_CURVE_NAME) {
585 settings.beginGroup (SETTINGS_GROUP_CURVE_AXES);
591 settings.beginGroup (groupName);
595 settings.setValue (SETTINGS_CURVE_POINT_SHAPE,
597 settings.setValue (SETTINGS_CURVE_LINE_COLOR,
598 m_modelCurveStylesAfter->
lineColor(curve));
599 settings.setValue (SETTINGS_CURVE_LINE_CONNECT_AS,
601 settings.setValue (SETTINGS_CURVE_LINE_WIDTH,
602 m_modelCurveStylesAfter->
lineWidth(curve));
603 settings.setValue (SETTINGS_CURVE_POINT_COLOR,
605 settings.setValue (SETTINGS_CURVE_POINT_LINE_WIDTH,
607 settings.setValue (SETTINGS_CURVE_POINT_RADIUS,
609 settings.endGroup ();
612 void DlgSettingsCurveProperties::updateControls()
614 bool isGoodState = !m_spinPointRadius->text().isEmpty () &&
615 !m_spinPointLineWidth->text().isEmpty () &&
616 !m_spinLineWidth->text().isEmpty ();
617 m_cmbCurveName->setEnabled (isGoodState);
618 enableOk (isGoodState && m_isDirty);
621 void DlgSettingsCurveProperties::updatePreview()
623 m_scenePreview->clear();
625 QString currentCurve = m_cmbCurveName->currentText();
631 bool isRelation = (lineStyle.
curveConnectAs() == CONNECT_AS_RELATION_SMOOTH ||
634 drawPoints (pointStyle);
635 drawLine (isRelation,
638 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.
CurveStyle curveStyle(const QString &curveName) const
CurveStyle in specified curve.
Factor for generating GraphicsPointAbstractBase class objects.
CurveConnectAs curveConnectAs() const
Get method for connect type.
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.
Cubic interpolation given independent and dependent value vectors.
void setPointLineWidth(const QString &curveName, int width)
Set method for curve point perimeter line width.
unsigned int width() const
Width of line.
Model for DlgSettingsCurveProperties and CmdSettingsCurveProperties.
int lineWidth(const QString &curveName) const
Get method for line width in specified curve.
PointStyle pointStyle() const
Get method for PointStyle.
void setCmdMediator(CmdMediator &cmdMediator)
Store CmdMediator for easy access by the leaf class.
virtual void load(CmdMediator &cmdMediator)
Load settings from Document.
Command for DlgSettingsCurveProperties.
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.
GraphicsPoint * createPoint(QGraphicsScene &scene, const QString &identifier, const QPointF &posScreen, const PointStyle &pointStyle, GeometryWindow *geometryWindow)
Create circle or polygon point according to the PointStyle.
PointShape pointShape(const QString &curveName) const
Get method for curve point shape.
ColorPalette pointColor(const QString &curveName) const
Get method for curve point color in specified curve.
ColorPalette paletteColor() const
Line color.
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.
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.
LineStyle lineStyle() const
Get method for LineStyle.
int pointRadius(const QString &curveName) const
Get method for curve point radius.
Details for a specific Line.
Graphics item for drawing a circular or polygonal Point.
void setPointRadius(const QString &curveName, int radius)
Set method for curve point radius.
CurveConnectAs lineConnectAs(const QString &curveName) const
Get method for connect as method for lines in specified curve.
static int MINIMUM_PREVIEW_HEIGHT
Dialog layout constant that guarantees preview has sufficent room.
void enableOk(bool enable)
Let leaf subclass control the Ok button.
QString groupNameForNthCurve(int indexOneBased) const
Return the group name, that appears in the settings file/registry, for the specified curve index.
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.
ColorPalette lineColor(const QString &curveName) const
Get method for line color in specified curve.
int pointLineWidth(const QString &curveName) const
Get method for curve point line width.
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.