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> 30 #include <QPushButton> 32 #include <QSpacerItem> 36 #include "SettingsForGraph.h" 38 #include "SplinePair.h" 40 #include "ViewPreview.h" 44 const QString CONNECT_AS_FUNCTION_SMOOTH_STR (
"Function - Smooth");
45 const QString CONNECT_AS_FUNCTION_STRAIGHT_STR (
"Function - Straight");
46 const QString CONNECT_AS_RELATION_SMOOTH_STR (
"Relation - Smooth");
47 const QString CONNECT_AS_RELATION_STRAIGHT_STR (
"Relation - Straight");
49 const double PREVIEW_WIDTH = 100.0;
50 const double PREVIEW_HEIGHT = 100.0;
51 const int MINIMUM_HEIGHT = 500;
53 const QPointF POS_LEFT (PREVIEW_WIDTH / 3.0,
54 PREVIEW_HEIGHT * 2.0 / 3.0);
55 const QPointF POS_CENTER (PREVIEW_WIDTH / 2.0,
56 PREVIEW_HEIGHT / 3.0);
57 const QPointF POS_RIGHT (2.0 * PREVIEW_WIDTH / 3.0,
58 PREVIEW_HEIGHT * 2.0 / 3.0);
62 "DlgSettingsCurveProperties",
64 m_modelMainWindow (mainWindow.modelMainWindow()),
67 m_modelCurveStylesBefore (0),
68 m_modelCurveStylesAfter (0)
70 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::DlgSettingsCurveProperties";
75 setMinimumWidth (740);
78 DlgSettingsCurveProperties::~DlgSettingsCurveProperties()
80 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::~DlgSettingsCurveProperties";
83 void DlgSettingsCurveProperties::createCurveName (QGridLayout *layout,
86 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::createCurveName";
88 QLabel *labelCurveName =
new QLabel (tr (
"Curve Name:"));
89 layout->addWidget (labelCurveName, row, 1);
91 m_cmbCurveName =
new QComboBox ();
92 m_cmbCurveName->setWhatsThis (tr (
"Name of the curve that is currently selected for editing"));
93 connect (m_cmbCurveName, SIGNAL (activated (
const QString &)),
this, SLOT (slotCurveName (
const QString &)));
94 layout->addWidget (m_cmbCurveName, row++, 2);
97 void DlgSettingsCurveProperties::createLine (QGridLayout *layout,
100 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::createLine";
102 m_groupLine =
new QGroupBox (tr (
"Line"));
103 layout->addWidget (m_groupLine, row++, 2);
105 QGridLayout *layoutGroup =
new QGridLayout;
106 m_groupLine->setLayout (layoutGroup);
108 QLabel *labelLineWidth =
new QLabel (tr (
"Width:"));
109 layoutGroup->addWidget (labelLineWidth, 0, 0);
111 m_spinLineWidth =
new QSpinBox (m_groupLine);
112 m_spinLineWidth->setWhatsThis (tr (
"Select a width for the lines drawn between points.\n\n" 113 "This applies only to graph curves. No lines are ever drawn between axis points."));
114 m_spinLineWidth->setMinimum(1);
115 connect (m_spinLineWidth, SIGNAL (valueChanged (
int)),
this, SLOT (slotLineWidth (
int)));
116 layoutGroup->addWidget (m_spinLineWidth, 0, 1);
118 QLabel *labelLineColor =
new QLabel (tr (
"Color:"));
119 layoutGroup->addWidget (labelLineColor, 1, 0);
121 m_cmbLineColor =
new QComboBox (m_groupLine);
122 m_cmbLineColor->setWhatsThis (tr (
"Select a color for the lines drawn between points.\n\n" 123 "This applies only to graph curves. No lines are ever drawn between axis points."));
125 connect (m_cmbLineColor, SIGNAL (activated (
const QString &)),
this, SLOT (slotLineColor (
const QString &)));
126 layoutGroup->addWidget (m_cmbLineColor, 1, 1);
128 QLabel *labelLineType =
new QLabel (tr (
"Connect as:"));
129 layoutGroup->addWidget (labelLineType, 2, 0);
131 m_cmbLineType =
new QComboBox (m_groupLine);
132 m_cmbLineType->addItem (CONNECT_AS_FUNCTION_STRAIGHT_STR, QVariant (CONNECT_AS_FUNCTION_STRAIGHT));
133 m_cmbLineType->addItem (CONNECT_AS_FUNCTION_SMOOTH_STR, QVariant (CONNECT_AS_FUNCTION_SMOOTH));
134 m_cmbLineType->addItem (CONNECT_AS_RELATION_STRAIGHT_STR, QVariant (CONNECT_AS_RELATION_STRAIGHT));
135 m_cmbLineType->addItem (CONNECT_AS_RELATION_SMOOTH_STR, QVariant (CONNECT_AS_RELATION_SMOOTH));
136 m_cmbLineType->setWhatsThis (tr (
"Select rule for connecting points with lines.\n\n" 137 "If the curve is connected as a single-valued function then the points are ordered by " 138 "increasing value of the independent variable.\n\n" 139 "If the curve is connected as a closed contour, then the points are ordered by age, except for " 140 "points placed along an existing line. Any point placed on top of any existing line is inserted " 141 "between the two endpoints of that line - as if its age was between the ages of the two " 143 "Lines are drawn between successively ordered points.\n\n" 144 "Straight curves are drawn with straight lines between successive points. Smooth curves are drawn " 145 "with smooth lines between successive points.\n\n" 146 "This applies only to graph curves. No lines are ever drawn between axis points."));
147 connect (m_cmbLineType, SIGNAL (activated (
const QString &)),
this, SLOT (slotLineType (
const QString &)));
148 layoutGroup->addWidget (m_cmbLineType, 2, 1);
151 void DlgSettingsCurveProperties::createPoint (QGridLayout *layout,
154 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::createPoint";
156 m_groupPoint =
new QGroupBox (tr (
"Point"));
157 layout->addWidget (m_groupPoint, row++, 1);
159 QGridLayout *layoutGroup =
new QGridLayout;
160 m_groupPoint->setLayout (layoutGroup);
162 QLabel *labelPointShape =
new QLabel(tr (
"Shape:"));
163 layoutGroup->addWidget (labelPointShape, 0, 0);
165 m_cmbPointShape =
new QComboBox (m_groupPoint);
166 m_cmbPointShape->setWhatsThis (tr (
"Select a shape for the points"));
167 m_cmbPointShape->addItem (pointShapeToString (POINT_SHAPE_CIRCLE),
169 m_cmbPointShape->addItem (pointShapeToString (POINT_SHAPE_CROSS),
171 m_cmbPointShape->addItem (pointShapeToString (POINT_SHAPE_DIAMOND),
172 POINT_SHAPE_DIAMOND);
173 m_cmbPointShape->addItem (pointShapeToString (POINT_SHAPE_SQUARE),
175 m_cmbPointShape->addItem (pointShapeToString (POINT_SHAPE_TRIANGLE),
176 POINT_SHAPE_TRIANGLE);
177 m_cmbPointShape->addItem (pointShapeToString (POINT_SHAPE_X),
179 connect (m_cmbPointShape, SIGNAL (activated (
const QString &)),
this, SLOT (slotPointShape (
const QString &)));
180 layoutGroup->addWidget (m_cmbPointShape, 0, 1);
182 QLabel *labelPointRadius =
new QLabel (tr (
"Radius:"));
183 layoutGroup->addWidget (labelPointRadius, 1, 0);
185 m_spinPointRadius =
new QSpinBox (m_groupPoint);
186 m_spinPointRadius->setWhatsThis (tr (
"Select a radius, in pixels, for the points"));
187 m_spinPointRadius->setMinimum (1);
188 connect (m_spinPointRadius, SIGNAL (valueChanged (
int)),
this, SLOT (slotPointRadius (
int)));
189 layoutGroup->addWidget (m_spinPointRadius, 1, 1);
191 QLabel *labelPointLineWidth =
new QLabel (tr (
"Line width:"));
192 layoutGroup->addWidget (labelPointLineWidth, 2, 0);
194 m_spinPointLineWidth =
new QSpinBox (m_groupPoint);
195 m_spinPointLineWidth->setWhatsThis (tr (
"Select a line width, in pixels, for the points.\n\n" 196 "A larger width results in a thicker line, with the exception of a value of zero " 197 "which always results in a line that is one pixel wide (which is easy to see even " 198 "when zoomed far out)"));
199 m_spinPointLineWidth->setMinimum (0);
200 connect (m_spinPointLineWidth, SIGNAL (valueChanged (
int)),
this, SLOT (slotPointLineWidth (
int)));
201 layoutGroup->addWidget (m_spinPointLineWidth, 2, 1);
203 QLabel *labelPointColor =
new QLabel (tr (
"Color:"));
204 layoutGroup->addWidget (labelPointColor, 3, 0);
206 m_cmbPointColor =
new QComboBox (m_groupPoint);
207 m_cmbPointColor->setWhatsThis (tr (
"Select a color for the line used to draw the point shapes"));
209 connect (m_cmbPointColor, SIGNAL (activated (
const QString &)),
this, SLOT (slotPointColor (
const QString &)));
210 layoutGroup->addWidget (m_cmbPointColor, 3, 1);
215 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::createOptionalSaveDefault";
217 m_btnSaveDefault =
new QPushButton (
"Save As Default");
218 m_btnSaveDefault->setWhatsThis (tr (
"Save the visible curve settings for use as future defaults, according to the curve name selection.\n\n" 219 "If the visible settings are for the axes curve, then they will be used for future " 220 "axes curves, until new settings are saved as the defaults.\n\n" 221 "If the visible settings are for the Nth graph curve in the curve list, then they will be used for future " 222 "graph curves that are also the Nth graph curve in their curve list, until new settings are saved as the defaults."));
223 connect (m_btnSaveDefault, SIGNAL (released ()),
this, SLOT (slotSaveDefault ()));
224 layout->addWidget (m_btnSaveDefault, 0, Qt::AlignLeft);
227 void DlgSettingsCurveProperties::createPreview (QGridLayout *layout,
230 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::createPreview";
232 QLabel *labelPreview =
new QLabel (tr (
"Preview"));
233 layout->addWidget (labelPreview, row++, 0, 1, 4);
235 m_scenePreview =
new QGraphicsScene (
this);
237 ViewPreview::VIEW_ASPECT_RATIO_ONE_TO_ONE,
239 m_viewPreview->setWhatsThis (tr (
"Preview window that shows how current settings affect the points and line of the selected curve.\n\n" 240 "The X coordinate is in the horizontal direction, and the Y coordinate is in the vertical direction. A " 241 "function can have only one Y value, at most, for any X value, but a relation can have multiple Y values " 242 "for one X value."));
243 m_viewPreview->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
244 m_viewPreview->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
246 m_viewPreview->setRenderHint (QPainter::Antialiasing);
248 layout->addWidget (m_viewPreview, row++, 0, 1, 4);
253 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::createSubPanel";
255 QWidget *subPanel =
new QWidget ();
256 QGridLayout *layout =
new QGridLayout (subPanel);
257 subPanel->setLayout (layout);
260 createCurveName (layout, row);
262 int rowLeft = row, rowRight = row++;
263 createPoint (layout, rowLeft);
264 createLine (layout, rowRight);
265 createPreview (layout, row);
267 layout->setColumnStretch(0, 1);
268 layout->setColumnStretch(1, 0);
269 layout->setColumnStretch(2, 0);
270 layout->setColumnStretch(3, 1);
272 layout->setRowStretch (0, 1);
277 void DlgSettingsCurveProperties::drawLine (
bool isRelation,
280 const double Z_LINE = -1.0;
284 QPointF p0 (POS_LEFT), p1 (POS_CENTER), p2 (POS_RIGHT);
297 vector<SplinePair> xy;
306 path.cubicTo (QPointF (spline.
p1(0).
x(),
308 QPointF (spline.
p2(0).
x(),
311 path.cubicTo (QPointF (spline.
p1(1).
x(),
313 QPointF (spline.
p2(1).
x(),
322 QGraphicsPathItem *line =
new QGraphicsPathItem (path);
323 line->setPen (QPen (QBrush (ColorPaletteToQColor (lineStyle.
paletteColor())),
325 line->setZValue (Z_LINE);
326 m_scenePreview->addItem (line);
329 void DlgSettingsCurveProperties::drawPoints (
const PointStyle &pointStyle)
331 const QString NULL_IDENTIFIER;
341 NULL_GEOMETRY_WINDOW);
349 NULL_GEOMETRY_WINDOW);
357 NULL_GEOMETRY_WINDOW);
363 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::handleOk";
365 ENGAUGE_CHECK_PTR (m_modelCurveStylesBefore);
366 ENGAUGE_CHECK_PTR (m_modelCurveStylesAfter);
370 *m_modelCurveStylesBefore,
371 *m_modelCurveStylesAfter);
379 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::load";
384 if (m_modelCurveStylesBefore != 0) {
385 delete m_modelCurveStylesBefore;
387 if (m_modelCurveStylesAfter != 0) {
388 delete m_modelCurveStylesAfter;
396 m_cmbCurveName->clear ();
397 m_cmbCurveName->addItem (AXIS_CURVE_NAME);
399 QStringList::const_iterator itr;
400 for (itr = curveNames.begin (); itr != curveNames.end (); itr++) {
402 QString curveName = *itr;
403 m_cmbCurveName->addItem (curveName);
406 loadForCurveName (
mainWindow().selectedGraphCurve());
412 void DlgSettingsCurveProperties::loadForCurveName (
const QString &curveName)
414 int indexCurveName = m_cmbCurveName->findText(curveName);
415 ENGAUGE_ASSERT (indexCurveName >= 0);
416 m_cmbCurveName->setCurrentIndex(indexCurveName);
418 int indexPointShape = m_cmbPointShape->findData (QVariant (m_modelCurveStylesAfter->
pointShape (curveName)));
419 ENGAUGE_ASSERT (indexPointShape >= 0);
420 m_cmbPointShape->setCurrentIndex (indexPointShape);
422 m_spinPointRadius->setValue (m_modelCurveStylesAfter->
pointRadius(curveName));
423 m_spinPointLineWidth->setValue (m_modelCurveStylesAfter->
pointLineWidth(curveName));
425 int indexPointColor = m_cmbPointColor->findData (QVariant (m_modelCurveStylesAfter->
pointColor(curveName)));
426 ENGAUGE_ASSERT (indexPointColor >= 0);
427 m_cmbPointColor->setCurrentIndex (indexPointColor);
429 int indexLineColor = m_cmbLineColor->findData (QVariant (m_modelCurveStylesAfter->
lineColor(curveName)));
430 ENGAUGE_ASSERT (indexLineColor >= 0);
431 m_cmbLineColor->setCurrentIndex (indexLineColor);
433 m_spinLineWidth->setValue (m_modelCurveStylesAfter->
lineWidth(curveName));
435 int indexCurveConnectAs = m_cmbLineType->findData (QVariant (m_modelCurveStylesAfter->
lineConnectAs (curveName)));
436 if (indexCurveConnectAs >= 0) {
438 m_cmbLineType->setCurrentIndex (indexCurveConnectAs);
442 m_cmbLineColor->setEnabled (curveName != AXIS_CURVE_NAME);
443 m_spinLineWidth->setEnabled (curveName != AXIS_CURVE_NAME);
444 m_cmbLineType->setEnabled (curveName != AXIS_CURVE_NAME);
450 void DlgSettingsCurveProperties::resetSceneRectangle ()
458 QGraphicsRectItem *itemPerimeter =
new QGraphicsRectItem(rect);
459 itemPerimeter->setVisible(
false);
460 m_scenePreview->addItem (itemPerimeter);
461 m_viewPreview->centerOn (QPointF (0.0, 0.0));
466 m_cmbCurveName->setCurrentText (curveName);
467 loadForCurveName (curveName);
473 setMinimumHeight (MINIMUM_HEIGHT);
477 void DlgSettingsCurveProperties::slotCurveName(
const QString &curveName)
479 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::slotCurveName";
484 if (!curveName.isEmpty () && (m_modelCurveStylesAfter != 0)) {
486 loadForCurveName (curveName);
490 void DlgSettingsCurveProperties::slotLineColor(
const QString &lineColor)
492 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::slotLineColor color=" << lineColor.toLatin1().data();
496 m_modelCurveStylesAfter->
setLineColor(m_cmbCurveName->currentText(),
497 (ColorPalette) m_cmbLineColor->currentData().toInt());
502 void DlgSettingsCurveProperties::slotLineWidth(
int width)
504 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::slotLineWidth width=" << width;
508 m_modelCurveStylesAfter->
setLineWidth(m_cmbCurveName->currentText(),
514 void DlgSettingsCurveProperties::slotLineType(
const QString &lineType)
516 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::slotLineType lineType=" << lineType.toLatin1().data();
521 (CurveConnectAs) m_cmbLineType->currentData().toInt ());
526 void DlgSettingsCurveProperties::slotPointColor(
const QString &pointColor)
528 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::slotPointColor pointColor=" << pointColor.toLatin1().data();
532 m_modelCurveStylesAfter->
setPointColor(m_cmbCurveName->currentText(),
533 (ColorPalette) m_cmbPointColor->currentData().toInt ());
538 void DlgSettingsCurveProperties::slotPointLineWidth(
int lineWidth)
540 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::slotPointLineWidth lineWidth=" << lineWidth;
550 void DlgSettingsCurveProperties::slotPointRadius(
int radius)
552 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::slotPointRadius radius=" << radius;
556 m_modelCurveStylesAfter->
setPointRadius(m_cmbCurveName->currentText(),
562 void DlgSettingsCurveProperties::slotPointShape(
const QString &)
564 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::slotPointShape";
568 m_modelCurveStylesAfter->
setPointShape(m_cmbCurveName->currentText(),
569 (PointShape) m_cmbPointShape->currentData().toInt ());
574 void DlgSettingsCurveProperties::slotSaveDefault()
576 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsCurveProperties::slotSaveDefault";
578 QString curve = m_cmbCurveName->currentText ();
580 QSettings settings (SETTINGS_ENGAUGE, SETTINGS_DIGITIZER);
581 if (curve == AXIS_CURVE_NAME) {
583 settings.beginGroup (SETTINGS_GROUP_CURVE_AXES);
589 settings.beginGroup (groupName);
593 settings.setValue (SETTINGS_CURVE_POINT_SHAPE,
595 settings.setValue (SETTINGS_CURVE_LINE_COLOR,
596 m_modelCurveStylesAfter->
lineColor(curve));
597 settings.setValue (SETTINGS_CURVE_LINE_CONNECT_AS,
599 settings.setValue (SETTINGS_CURVE_LINE_WIDTH,
600 m_modelCurveStylesAfter->
lineWidth(curve));
601 settings.setValue (SETTINGS_CURVE_POINT_COLOR,
603 settings.setValue (SETTINGS_CURVE_POINT_LINE_WIDTH,
605 settings.setValue (SETTINGS_CURVE_POINT_RADIUS,
607 settings.endGroup ();
610 void DlgSettingsCurveProperties::updateControls()
612 bool isGoodState = !m_spinPointRadius->text().isEmpty () &&
613 !m_spinPointLineWidth->text().isEmpty () &&
614 !m_spinLineWidth->text().isEmpty ();
615 m_cmbCurveName->setEnabled (isGoodState);
616 enableOk (isGoodState && m_isDirty);
619 void DlgSettingsCurveProperties::updatePreview()
621 m_scenePreview->clear();
623 QString currentCurve = m_cmbCurveName->currentText();
629 bool isRelation = (lineStyle.
curveConnectAs() == CONNECT_AS_RELATION_SMOOTH ||
632 drawPoints (pointStyle);
633 drawLine (isRelation,
636 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.
double y() const
Get method for y.
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.
SplinePair p2(unsigned int i) const
Bezier p2 control point for specified interval. P0 is m_xy[i] and P3 is m_xy[i+1].
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...
SplinePair p1(unsigned int i) const
Bezier p1 control point for specified interval. P0 is m_xy[i] and P3 is m_xy[i+1].
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.
double x() const
Get method for x.
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.