7#include "CallbackAddPointsInCurvesGraphs.h"
8#include "CallbackCheckAddPointAxis.h"
9#include "CallbackCheckEditPointAxis.h"
10#include "CallbackNextOrdinal.h"
11#include "CallbackRemovePointsInCurvesGraphs.h"
12#include "CoordSystem.h"
14#include "CurvesGraphs.h"
15#include "CurveStyles.h"
16#include "DocumentSerialize.h"
17#include "EngaugeAssert.h"
21#include "OrdinalGenerator.h"
28#include <QtToString.h>
29#include <QXmlStreamReader>
30#include <QXmlStreamWriter>
31#include "SettingsForGraph.h"
32#include "Transformation.h"
36const int FOUR_BYTES = 4;
39 m_curveAxes (new
Curve (AXIS_CURVE_NAME,
43 m_documentAxesPointsRequired (documentAxesPointsRequired)
45 LOG4CPP_INFO_S ((*mainCat)) <<
"CoordSystem::CoordSystem";
49 DEFAULT_GRAPH_CURVE_NAME);
65 const QPointF &posGraph,
70 Point point (AXIS_CURVE_NAME,
79 LOG4CPP_INFO_S ((*mainCat)) <<
"CoordSystem::addPointAxisWithGeneratedIdentifier"
80 <<
" ordinal=" << ordinal
81 <<
" posScreen=" << QPointFToString (posScreen).toLatin1 ().data ()
82 <<
" posGraph=" << QPointFToString (posGraph).toLatin1 ().data ()
83 <<
" identifier=" << identifier.toLatin1 ().data ();
87 const QPointF &posGraph,
88 const QString &identifier,
92 Point point (AXIS_CURVE_NAME,
100 LOG4CPP_INFO_S ((*mainCat)) <<
"CoordSystem::addPointAxisWithSpecifiedIdentifier"
101 <<
" ordinal=" << ordinal
102 <<
" posScreen=" << QPointFToString (posScreen).toLatin1 ().data ()
103 <<
" posGraph=" << QPointFToString (posGraph).toLatin1 ().data ()
104 <<
" identifier=" << identifier.toLatin1 ().data ();
108 const QPointF &posScreen,
112 Point point (curveName,
119 LOG4CPP_INFO_S ((*mainCat)) <<
"CoordSystem::addPointGraphWithGeneratedIdentifier"
120 <<
" ordinal=" << ordinal
121 <<
" posScreen=" << QPointFToString (posScreen).toLatin1 ().data ()
122 <<
" identifier=" << identifier.toLatin1 ().data ();
126 const QPointF &posScreen,
127 const QString &identifier,
130 Point point (curveName,
136 LOG4CPP_INFO_S ((*mainCat)) <<
"CoordSystem::addPointGraphWithSpecifiedIdentifier"
137 <<
" ordinal=" << ordinal
138 <<
" posScreen=" << QPointFToString (posScreen).toLatin1 ().data ()
139 <<
" identifier=" << identifier.toLatin1 ().data ();
146 Functor2wRet<const QString &, const Point &, CallbackSearchReturn> ftorWithCallback = functor_ret (ftor,
152bool CoordSystem::bytesIndicatePreVersion6 (
const QByteArray &bytes)
const
154 QByteArray preVersion6MagicNumber;
155 preVersion6MagicNumber.resize (FOUR_BYTES);
158 preVersion6MagicNumber[0] =
'\x00';
159 preVersion6MagicNumber[1] =
'\x00';
160 preVersion6MagicNumber[2] =
'\xCA';
161 preVersion6MagicNumber[3] =
'\xFE';
163 return (bytes == preVersion6MagicNumber);
167 const QPointF &posGraph,
169 QString &errorMessage,
172 LOG4CPP_INFO_S ((*mainCat)) <<
"CoordSystem::checkAddPointAxis"
173 <<
" posScreen=" << QPointFToString (posScreen).toLatin1 ().data ()
174 <<
" posGraph=" << QPointFToString (posGraph).toLatin1 ().data ();
179 m_documentAxesPointsRequired,
182 Functor2wRet<const QString &, const Point &, CallbackSearchReturn> ftorWithCallback = functor_ret (ftor,
191 const QPointF &posScreen,
192 const QPointF &posGraph,
194 QString &errorMessage)
196 LOG4CPP_INFO_S ((*mainCat)) <<
"CoordSystem::checkEditPointAxis"
197 <<
" posGraph=" << QPointFToString (posGraph).toLatin1 ().data ();
203 m_documentAxesPointsRequired);
205 Functor2wRet<const QString &, const Point &, CallbackSearchReturn> ftorWithCallback = functor_ret (ftor,
215 ENGAUGE_CHECK_PTR (m_curveAxes);
222 if (curveName == AXIS_CURVE_NAME) {
235 if (curveName == AXIS_CURVE_NAME) {
248 return m_curvesGraphs;
262 const QString &identifier)
264 LOG4CPP_INFO_S ((*mainCat)) <<
"CoordSystem::editPointAxis posGraph=("
265 << posGraph.x () <<
", " << posGraph.y () <<
") identifier="
266 << identifier.toLatin1 ().data ();
274 return m_curveAxes->
isXOnly (pointIdentifier);
279 ENGAUGE_CHECK_PTR (m_curveAxes);
286 ENGAUGE_CHECK_PTR (m_curveAxes);
292 const Functor2wRet<const Point &, const Point &, CallbackSearchReturn> &ftorWithCallback)
const
294 if (curveName == AXIS_CURVE_NAME) {
304 ENGAUGE_CHECK_PTR (m_curveAxes);
311 ENGAUGE_CHECK_PTR (m_curveAxes);
318 LOG4CPP_INFO_S ((*mainCat)) <<
"CoordSystem::loadCurvesFile";
326 LOG4CPP_INFO_S ((*mainCat)) <<
"CoordSystem::loadPreVersion6";
329 double dbl, radius = 0.0;
332 m_documentAxesPointsRequired = DOCUMENT_AXES_POINTS_REQUIRED_3;
339 str >> (
double &) radius;
358 m_modelExport.
setHeader((ExportHeader) int32);
359 if (version >= 5.2) {
361 if (m_modelCoords.
coordsType() == COORDS_TYPE_CARTESIAN) {
365 if (m_modelCoords.
coordsType() == COORDS_TYPE_POLAR) {
456 m_curveAxes =
new Curve (str);
457 Curve curveScale (str);
468 LOG4CPP_INFO_S ((*mainCat)) <<
"CoordSystem::loadVersion6";
470 m_documentAxesPointsRequired = DOCUMENT_AXES_POINTS_REQUIRED_3;
473 while (!reader.atEnd() &&
474 !reader.hasError()) {
475 QXmlStreamReader::TokenType tokenType = loadNextFromReader(reader);
477 if ((reader.name() == DOCUMENT_SERIALIZE_DOCUMENT) &&
478 (tokenType == QXmlStreamReader::EndElement)) {
485 if (tokenType == QXmlStreamReader::StartElement) {
488 QString tag = reader.name().toString();
489 if (tag == DOCUMENT_SERIALIZE_AXES_CHECKER){
490 m_modelAxesChecker.
loadXml (reader);
491 }
else if (tag == DOCUMENT_SERIALIZE_COORDS) {
492 m_modelCoords.
loadXml (reader);
493 }
else if (tag == DOCUMENT_SERIALIZE_CURVE) {
494 m_curveAxes =
new Curve (reader);
495 }
else if (tag == DOCUMENT_SERIALIZE_CURVES_GRAPHS) {
496 m_curvesGraphs.
loadXml (reader);
497 }
else if (tag == DOCUMENT_SERIALIZE_DIGITIZE_CURVE) {
498 m_modelDigitizeCurve.
loadXml (reader);
499 }
else if (tag == DOCUMENT_SERIALIZE_EXPORT) {
500 m_modelExport.
loadXml (reader);
501 }
else if (tag == DOCUMENT_SERIALIZE_GENERAL || tag == DOCUMENT_SERIALIZE_COMMON) {
502 m_modelGeneral.
loadXml (reader);
503 }
else if (tag == DOCUMENT_SERIALIZE_GRID_REMOVAL) {
504 m_modelGridRemoval.
loadXml (reader);
505 }
else if (tag == DOCUMENT_SERIALIZE_IMAGE) {
506 ENGAUGE_ASSERT (
false);
507 }
else if (tag == DOCUMENT_SERIALIZE_POINT_MATCH) {
508 m_modelPointMatch.
loadXml (reader);
509 }
else if (tag == DOCUMENT_SERIALIZE_SEGMENTS) {
510 m_modelSegments.
loadXml (reader);
512 m_successfulRead =
false;
513 m_reasonForUnsuccessfulRead = QString (
"%1 '%2' %3")
514 .arg (QObject::tr (
"Unexpected xml token"))
516 .arg (
"encountered");
524 DocumentAxesPointsRequired documentAxesPointsRequired)
526 LOG4CPP_INFO_S ((*mainCat)) <<
"CoordSystem::loadVersion7";
528 m_documentAxesPointsRequired = documentAxesPointsRequired;
531 while (!reader.atEnd() &&
532 !reader.hasError()) {
533 QXmlStreamReader::TokenType tokenType = loadNextFromReader(reader);
535 if ((reader.name() == DOCUMENT_SERIALIZE_COORD_SYSTEM) &&
536 (tokenType == QXmlStreamReader::EndElement)) {
543 if (tokenType == QXmlStreamReader::StartElement) {
546 QString tag = reader.name().toString();
547 if (tag == DOCUMENT_SERIALIZE_AXES_CHECKER){
548 m_modelAxesChecker.
loadXml (reader);
549 }
else if (tag == DOCUMENT_SERIALIZE_COORDS) {
550 m_modelCoords.
loadXml (reader);
551 }
else if (tag == DOCUMENT_SERIALIZE_CURVE) {
552 m_curveAxes =
new Curve (reader);
553 }
else if (tag == DOCUMENT_SERIALIZE_CURVES_GRAPHS) {
554 m_curvesGraphs.
loadXml (reader);
555 }
else if (tag == DOCUMENT_SERIALIZE_DIGITIZE_CURVE) {
556 m_modelDigitizeCurve.
loadXml (reader);
557 }
else if (tag == DOCUMENT_SERIALIZE_EXPORT) {
558 m_modelExport.
loadXml (reader);
559 }
else if (tag == DOCUMENT_SERIALIZE_GENERAL || tag == DOCUMENT_SERIALIZE_COMMON) {
560 m_modelGeneral.
loadXml (reader);
561 }
else if (tag == DOCUMENT_SERIALIZE_GRID_REMOVAL) {
562 m_modelGridRemoval.
loadXml (reader);
563 }
else if (tag == DOCUMENT_SERIALIZE_IMAGE) {
564 ENGAUGE_ASSERT (
false);
565 }
else if (tag == DOCUMENT_SERIALIZE_POINT_MATCH) {
566 m_modelPointMatch.
loadXml (reader);
567 }
else if (tag == DOCUMENT_SERIALIZE_SEGMENTS) {
568 m_modelSegments.
loadXml (reader);
570 m_successfulRead =
false;
571 m_reasonForUnsuccessfulRead = QString (
"Unexpected xml token '%1' encountered").arg (tag);
580 return m_modelAxesChecker;
593 return m_modelCoords;
606 return m_modelDigitizeCurve;
611 return m_modelExport;
616 return m_modelGeneral;
621 return m_modelGridRemoval;
626 return m_modelPointMatch;
631 return m_modelSegments;
635 const QPointF &deltaScreen)
640 ENGAUGE_ASSERT (curve != 0);
649 Functor2wRet<const QString &, const Point &, CallbackSearchReturn> ftorWithCallback = functor_ret (ftor,
652 if (curveName == AXIS_CURVE_NAME) {
680 QTextStream str (&text);
684 std::cerr << text.toLatin1().data();
688 QTextStream &str)
const
690 str << indentation <<
"Graph\n";
692 indentation += INDENTATION_DELTA;
722 ENGAUGE_ASSERT (!m_successfulRead);
724 return m_reasonForUnsuccessfulRead;
729 LOG4CPP_INFO_S ((*mainCat)) <<
"CoordSystem::removePointAxis identifier=" << identifier.toLatin1 ().data ();
736 LOG4CPP_INFO_S ((*mainCat)) <<
"CoordSystem::removePointGraph identifier=" << identifier.toLatin1 ().data ();
745 Functor2wRet<const QString &, const Point &, CallbackSearchReturn> ftorWithCallback = functor_ret (ftor,
753 writer.writeStartElement(DOCUMENT_SERIALIZE_COORD_SYSTEM);
756 m_modelGeneral.
saveXml (writer);
757 m_modelCoords.
saveXml (writer);
758 m_modelDigitizeCurve.
saveXml (writer);
759 m_modelExport.
saveXml (writer);
760 m_modelAxesChecker.
saveXml (writer);
761 m_modelGridRemoval.
saveXml (writer);
762 m_modelPointMatch.
saveXml (writer);
763 m_modelSegments.
saveXml (writer);
765 m_curvesGraphs.
saveXml (writer);
766 writer.writeEndElement();
771 LOG4CPP_INFO_S ((*mainCat)) <<
"CoordSystem::setCurvesGraphs";
784 ColorFilterSettingsList::const_iterator itr;
789 QString curveName = itr.key();
806 QStringList::iterator itr;
807 for (itr = curveNames.begin(); itr != curveNames.end(); itr++) {
809 QString curveName = *itr;
849 return m_successfulRead;
854 LOG4CPP_INFO_S ((*mainCat)) <<
"CoordSystem::updatePointOrdinals";
Callback that is used when iterating through a read-only CurvesGraphs to add corresponding points in ...
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
Callback for sanity checking the screen and graph coordinates of an axis point, before it is added to...
bool isError() const
True if an error occurred during iteration.
QString errorMessage() const
Error message that explains the problem indicated by isError.
Callback for sanity checking the screen and graph coordinates of an axis point that is in the axes cu...
bool isError() const
True if an error occurred during iteration.
QString errorMessage() const
Error message that explains the problem indicated by isError.
Callback for computing the next ordinal for a new point.
double nextOrdinal() const
Computed next ordinal.
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
Callback that is used when iterating through a read-only CurvesGraphs to remove corresponding points ...
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
Color filter parameters for one curve. For a class, this is handled the same as LineStyle and PointSt...
static ColorFilterSettings defaultFilter()
Initial default for any Curve.
virtual bool loadCurvesFile(const QString &curvesFile)
Load the curve names in the specified Engauge file into the current graph. This is called near the en...
virtual CurveStyles modelCurveStyles() const
Get method for CurveStyles.
virtual void print() const
Debugging method for printing directly from symbolic debugger.
virtual void updatePointOrdinals(const Transformation &transformation)
Update point ordinals after point addition/removal or dragging.
virtual void addPointGraphWithGeneratedIdentifier(const QString &curveName, const QPointF &posScreen, QString &generatedIentifier, double ordinal)
Add a single graph point with a generated point identifier.
virtual DocumentModelGridRemoval modelGridRemoval() const
Get method for DocumentModelGridRemoval.
virtual QPointF positionScreen(const QString &pointIdentifier) const
See Curve::positionScreen.
void loadPreVersion6(QDataStream &str, double version)
Load from file in pre-version 6 format.
virtual DocumentModelPointMatch modelPointMatch() const
Get method for DocumentModelPointMatch.
virtual void setCurvesGraphs(const CurvesGraphs &curvesGraphs)
Let CmdAbstract classes overwrite CurvesGraphs.
virtual int curvesGraphsNumPoints(const QString &curveName) const
See CurvesGraphs::curvesGraphsNumPoints.
virtual void movePoint(const QString &pointIdentifier, const QPointF &deltaScreen)
See Curve::movePoint.
virtual DocumentModelCoords modelCoords() const
Get method for DocumentModelCoords.
virtual void setModelExport(const DocumentModelExportFormat &modelExport)
Set method for DocumentModelExportFormat.
virtual void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
virtual void setModelAxesChecker(const DocumentModelAxesChecker &modelAxesChecker)
Set method for DocumentModelAxesChecker.
virtual void removePointGraph(const QString &identifier)
Perform the opposite of addPointGraph.
void setModelPointMatch(const DocumentModelPointMatch &modelPointMatch)
Set method for DocumentModelPointMatch.
virtual void checkAddPointAxis(const QPointF &posScreen, const QPointF &posGraph, bool &isError, QString &errorMessage, bool isXOnly)
Check before calling addPointAxis. Also returns the next available ordinal number (to prevent clashes...
CoordSystem(DocumentAxesPointsRequired documentAxesPointsRequired)
Single constructor.
virtual void iterateThroughCurvesPointsGraphs(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
See Curve::iterateThroughCurvePoints, for all the graphs curves.
virtual void addPointsInCurvesGraphs(CurvesGraphs &curvesGraphs)
Add all points identified in the specified CurvesGraphs. See also removePointsInCurvesGraphs.
virtual void editPointAxis(const QPointF &posGraph, const QString &identifier)
Edit the graph coordinates of a single axis point. Call this after checkAddPointAxis to guarantee suc...
virtual void removePointsInCurvesGraphs(CurvesGraphs &curvesGraphs)
Remove all points identified in the specified CurvesGraphs. See also addPointsInCurvesGraphs.
virtual QPointF positionGraph(const QString &pointIdentifier) const
See Curve::positionGraph.
virtual void iterateThroughCurvePointsAxes(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
See Curve::iterateThroughCurvePoints, for the axes curve.
bool isXOnly(const QString &pointIdentifier) const
Return true if y coordinate is undefined, otherwise x coordinae is undefined in DOCUMENT_AXES_POINT_R...
virtual DocumentModelDigitizeCurve modelDigitizeCurve() const
Get method for DocumentModelDigitizeCurve.
virtual DocumentModelAxesChecker modelAxesChecker() const
Get method for DocumentModelAxesChecker.
virtual DocumentModelGeneral modelGeneral() const
Get method for DocumentModelGeneral.
virtual DocumentModelSegments modelSegments() const
Get method for DocumentModelSegments.
virtual void setModelGeneral(const DocumentModelGeneral &modelGeneral)
Set method for DocumentModelGeneral.
virtual DocumentModelColorFilter modelColorFilter() const
Get method for DocumentModelColorFilter.
void loadVersion7(QXmlStreamReader &reader, DocumentAxesPointsRequired documentAxesPointsRequired)
Load from file in version 7 format.
virtual Curve * curveForCurveName(const QString &curveName)
See CurvesGraphs::curveForCurveName, although this also works for AXIS_CURVE_NAME.
virtual void addPointAxisWithGeneratedIdentifier(const QPointF &posScreen, const QPointF &posGraph, QString &identifier, double ordinal, bool isXOnly)
Add a single axis point with a generated point identifier.
virtual void removePointAxis(const QString &identifier)
Perform the opposite of addPointAxis.
virtual const Curve & curveAxes() const
Get method for axis curve.
virtual void setModelSegments(const DocumentModelSegments &modelSegments)
Set method for DocumentModelSegments.
virtual QStringList curvesGraphsNames() const
See CurvesGraphs::curvesGraphsNames.
virtual int nextOrdinalForCurve(const QString &curveName) const
Default next ordinal value for specified curve.
virtual void addGraphCurveAtEnd(const QString &curveName)
Add new graph curve to the list of existing graph curves.
virtual const CurvesGraphs & curvesGraphs() const
Make all Curves available, read only, for CmdAbstract classes only.
virtual void setModelCoords(const DocumentModelCoords &modelCoords)
Set method for DocumentModelCoords.
virtual void saveXml(QXmlStreamWriter &writer) const
Save graph to xml.
virtual void iterateThroughCurveSegments(const QString &curveName, const Functor2wRet< const Point &, const Point &, CallbackSearchReturn > &ftorWithCallback) const
See Curve::iterateThroughCurveSegments, for any axes or graph curve.
virtual QString reasonForUnsuccessfulRead() const
Return an informative text message explaining why startup loading failed. Applies if successfulRead r...
virtual void checkEditPointAxis(const QString &pointIdentifier, const QPointF &posScreen, const QPointF &posGraph, bool &isError, QString &errorMessage)
Check before calling editPointAxis.
void loadVersion6(QXmlStreamReader &reader)
Load from file in version 6 format.
virtual void setModelGridRemoval(const DocumentModelGridRemoval &modelGridRemoval)
Set method for DocumentModelGridRemoval.
virtual void setModelCurveStyles(const CurveStyles &modelCurveStyles)
Set method for CurveStyles.
virtual void addPointAxisWithSpecifiedIdentifier(const QPointF &posScreen, const QPointF &posGraph, const QString &identifier, double ordinal, bool isXOnly)
Add a single axis point with the specified point identifier.
virtual void setModelDigitizeCurve(const DocumentModelDigitizeCurve &modelDigitizeCurve)
Set method for DocumentModelDigitizeCurve.
virtual void setModelColorFilter(const DocumentModelColorFilter &modelColorFilter)
Set method for DocumentModelColorFilter.
virtual DocumentModelExportFormat modelExport() const
Get method for DocumentModelExportFormat.
virtual bool successfulRead() const
Return true if startup loading succeeded. If the loading failed then reasonForUnsuccessfulRed will ex...
virtual void addPointGraphWithSpecifiedIdentifier(const QString &curveName, const QPointF &posScreen, const QString &identifier, double ordinal)
Add a single graph point with the specified point identifer. Note that PointStyle is not applied to t...
Container for LineStyle and PointStyle for one Curve.
Model for DlgSettingsCurveProperties and CmdSettingsCurveProperties.
CurveStyle curveStyle(const QString &curveName) const
CurveStyle in specified curve.
QStringList curveNames() const
List of all curve names.
Container for one set of digitized Points.
void addPoint(Point point)
Add Point to this Curve.
bool isXOnly(const QString &pointIdentifier) const
Determine if specified point has just x coordinate. Otherwise has just y coordinate,...
void saveXml(QXmlStreamWriter &writer) const
Serialize curve.
void movePoint(const QString &pointIdentifier, const QPointF &deltaScreen)
Translate the position of a point by the specified distance vector.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
void setCurveStyle(const CurveStyle &curveStyle)
Set curve style.
void removePoint(const QString &identifier)
Perform the opposite of addPointAtEnd.
void setColorFilterSettings(const ColorFilterSettings &colorFilterSettings)
Set color filter.
QPointF positionScreen(const QString &pointIdentifier) const
Return the position, in screen coordinates, of the specified Point.
void editPoint(const QPointF &posGraph, const QString &identifier)
Edit the graph coordinates of an axis point. This method does not apply to a graph point.
void iterateThroughCurvePoints(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback) const
Apply functor to Points on Curve.
QPointF positionGraph(const QString &pointIdentifier) const
Return the position, in graph coordinates, of the specified Point.
void iterateThroughCurveSegments(const Functor2wRet< const Point &, const Point &, CallbackSearchReturn > &ftorWithCallback) const
Apply functor to successive Points, as line segments, on Curve. This could be a bit slow.
int numPoints() const
Number of points.
Container for all graph curves. The axes point curve is external to this class.
void saveXml(QXmlStreamWriter &writer) const
Serialize curves.
Curve * curveForCurveName(const QString &curveName)
Return the axis or graph curve for the specified curve name.
void addGraphCurveAtEnd(Curve curve)
Append new graph Curve to end of Curve list.
int curvesGraphsNumPoints(const QString &curveName) const
Point count.
void loadXml(QXmlStreamReader &reader)
Load from serialized xml post-version 5 file.
int numCurves() const
Current number of graphs curves.
void loadPreVersion6(QDataStream &str)
Load from serialized binary pre-version 6 file.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
void updatePointOrdinals(const Transformation &transformation)
Update point ordinals to be consistent with their CurveStyle and x/theta coordinate.
void iterateThroughCurveSegments(const QString &curveNameWanted, const Functor2wRet< const Point &, const Point &, CallbackSearchReturn > &ftorWithCallback) const
Apply functor to segments on the specified axis or graph Curve.
void removePoint(const QString &pointIdentifier)
Remove the Point from its Curve.
QStringList curvesGraphsNames() const
List of graph curve names.
void addPoint(const Point &point)
Append new Point to the specified Curve.
void iterateThroughCurvesPoints(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
Apply functor to Points on all of the Curves.
Model for DlgSettingsAxesChecker and CmdSettingsAxesChecker.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
Model for DlgSettingsColorFilter and CmdSettingsColorFilter.
const ColorFilterSettingsList & colorFilterSettingsList() const
Get method for copying all color filters in one step.
Model for DlgSettingsCoords and CmdSettingsCoords.
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
void setOriginRadius(double originRadius)
Set method for origin radius in polar mode.
void setCoordUnitsRadius(CoordUnitsNonPolarTheta coordUnits)
Set method for radius units.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
void setCoordsType(CoordsType coordsType)
Set method for coordinates type.
CoordsType coordsType() const
Get method for coordinates type.
void setCoordScaleXTheta(CoordScale coordScale)
Set method for linear/log scale on x/theta.
void setCoordScaleYRadius(CoordScale coordScale)
Set method for linear/log scale on y/radius.
void setCoordUnitsTheta(CoordUnitsPolarTheta coordUnits)
Set method for theta units.
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
Model for DlgSettingsDigitizeCurve and CmdSettingsDigitizeCurve.
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
Model for DlgSettingsGeneral and CmdSettingsGeneral.
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
Model for DlgSettingsGridRemoval and CmdSettingsGridRemoval. The settings are unstable until the user...
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
void setCloseDistance(double closeDistance)
Set method for close distance.
void setStopY(double stopY)
Set method for y stop.
void setCountX(int countX)
Set method for x count.
void setGridCoordDisableY(GridCoordDisable gridCoordDisable)
Set method for y coord parameter to disable.
void setStable()
Set the stable flag to true. This public version has no argument since it cannot be undone.
void setGridCoordDisableX(GridCoordDisable gridCoordDisable)
Set method for x coord parameter to disable.
void setStepX(double stepX)
Set method for x step.
void setStopX(double stopX)
Set method for x stop.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
void setStartY(double startY)
Set method for y start.
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
void setRemoveDefinedGridLines(bool removeDefinedGridLines)
Set method for removing defined grid lines.
void setStepY(double stepY)
Set method for y step.
void setStartX(double startX)
Set method for x start.
void setCountY(int countY)
Set method for y count.
Model for DlgSettingsPointMatch and CmdSettingsPointMatch.
void setMaxPointSize(double maxPointSize)
Set method for max point size.
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
void setPaletteColorCandidate(ColorPalette paletteColorCandidate)
Set method for candidate color.
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
void setPaletteColorAccepted(ColorPalette paletteColorAccepted)
Set method for accepted color.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
void setPaletteColorRejected(ColorPalette paletteColorRejected)
Set method for rejected color.
Model for DlgSettingsSegments and CmdSettingsSegments.
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
void setPointSeparation(double pointSeparation)
Set method for point separation.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
void setLineColor(ColorPalette lineColor)
Set method for line color.
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
void setLineWidth(double lineWidth)
Set method for line width.
void setMinLength(double minLength)
Set method for min length.
Details for a specific Line.
static LineStyle defaultGraphCurve(int index)
Initial default for index'th graph curve.
Details for a specific Point.
static PointStyle defaultGraphCurve(int index)
Initial default for index'th graph curve.
Class that represents one digitized point. The screen-to-graph coordinate transformation is always ex...
static QString curveNameFromPointIdentifier(const QString &pointIdentifier)
Parse the curve name from the specified point identifier. This does the opposite of uniqueIdentifierG...
QString identifier() const
Unique identifier for a specific Point.
Manage storage and retrieval of the settings for the curves.
QString defaultCurveName(int indexOneBased, const QString &defaultName) const
Default graph name for the specified curve index.