Engauge Digitizer  2
Public Member Functions | List of all members
CoordSystem Class Reference

Storage of data belonging to one coordinate system. More...

#include <CoordSystem.h>

Inheritance diagram for CoordSystem:
Inheritance graph
Collaboration diagram for CoordSystem:
Collaboration graph

Public Member Functions

 CoordSystem ()
 Single constructor. More...
 
 ~CoordSystem ()
 
 CoordSystem (const QString &fileName)
 Constructor for opened Graphs, and error report files. The specified file is opened and read. More...
 
virtual void addGraphCurveAtEnd (const QString &curveName)
 Add new graph curve to the list of existing graph curves. More...
 
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. More...
 
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. More...
 
virtual void addPointGraphWithGeneratedIdentifier (const QString &curveName, const QPointF &posScreen, QString &generatedIentifier, double ordinal)
 Add a single graph point with a generated point identifier. More...
 
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 the point within the Graph. More...
 
virtual void addPointsInCurvesGraphs (CurvesGraphs &curvesGraphs)
 Add all points identified in the specified CurvesGraphs. See also removePointsInCurvesGraphs. More...
 
virtual void checkAddPointAxis (const QPointF &posScreen, const QPointF &posGraph, bool &isError, QString &errorMessage, bool isXOnly, DocumentAxesPointsRequired documentAxesPointsRequired)
 Check before calling addPointAxis. Also returns the next available ordinal number (to prevent clashes) More...
 
virtual void checkEditPointAxis (const QString &pointIdentifier, const QPointF &posScreen, const QPointF &posGraph, bool &isError, QString &errorMessage, DocumentAxesPointsRequired documentAxesPointsRequired)
 Check before calling editPointAxis. More...
 
virtual const CurvecurveAxes () const
 Get method for axis curve. More...
 
virtual CurvecurveForCurveName (const QString &curveName)
 See CurvesGraphs::curveForCurveName, although this also works for AXIS_CURVE_NAME. More...
 
virtual const CurvecurveForCurveName (const QString &curveName) const
 See CurvesGraphs::curveForCurveNames, although this also works for AXIS_CURVE_NAME. More...
 
virtual const CurvesGraphscurvesGraphs () const
 Make all Curves available, read only, for CmdAbstract classes only. More...
 
virtual QStringList curvesGraphsNames () const
 See CurvesGraphs::curvesGraphsNames. More...
 
virtual int curvesGraphsNumPoints (const QString &curveName) const
 See CurvesGraphs::curvesGraphsNumPoints. More...
 
virtual void editPointAxis (const QPointF &posGraph, const QString &identifier)
 Edit the graph coordinates of a single axis point. Call this after checkAddPointAxis to guarantee success in this call. More...
 
virtual void editPointGraph (bool isX, bool isY, double x, double y, const QStringList &identifiers, const Transformation &transformation)
 Edit the graph coordinates of one or more graph points. More...
 
bool isXOnly (const QString &pointIdentifier) const
 Return true if y coordinate is undefined, otherwise x coordinae is undefined in DOCUMENT_AXES_POINT_REQUIRE_4 mode. More...
 
virtual void iterateThroughCurvePointsAxes (const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
 See Curve::iterateThroughCurvePoints, for the axes curve. More...
 
virtual void iterateThroughCurvePointsAxes (const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback) const
 See Curve::iterateThroughCurvePoints, for the axes curve. More...
 
virtual void iterateThroughCurveSegments (const QString &curveName, const Functor2wRet< const Point &, const Point &, CallbackSearchReturn > &ftorWithCallback) const
 See Curve::iterateThroughCurveSegments, for any axes or graph curve. More...
 
virtual void iterateThroughCurvesPointsGraphs (const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
 See Curve::iterateThroughCurvePoints, for all the graphs curves. More...
 
virtual void iterateThroughCurvesPointsGraphs (const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback) const
 See Curve::iterateThroughCurvePoints, for all the graphs curves. More...
 
virtual bool loadCurvesFile (const QString &curvesFile)
 Load the curve names in the specified Engauge file into the current graph. This is called near the end of the import process only. More...
 
void loadPreVersion6 (QDataStream &str, double version, DocumentAxesPointsRequired &documentAxesPointsRequired)
 Load from file in pre-version 6 format. Number of axes points is read in and passed to Document. More...
 
void loadVersion6 (QXmlStreamReader &reader, DocumentAxesPointsRequired &documentAxesPointsRequired)
 Load from file in version 6 format. Number of axes points is read in and passed to Document. More...
 
void loadVersions7AndUp (QXmlStreamReader &reader)
 Load from file in versions 7 and 8 formats. Number of axes points is already defined at Document level. More...
 
virtual DocumentModelAxesChecker modelAxesChecker () const
 Get method for DocumentModelAxesChecker. More...
 
virtual DocumentModelColorFilter modelColorFilter () const
 Get method for DocumentModelColorFilter. More...
 
virtual DocumentModelCoords modelCoords () const
 Get method for DocumentModelCoords. More...
 
virtual CurveStyles modelCurveStyles () const
 Get method for CurveStyles. More...
 
virtual DocumentModelDigitizeCurve modelDigitizeCurve () const
 Get method for DocumentModelDigitizeCurve. More...
 
virtual DocumentModelExportFormat modelExport () const
 Get method for DocumentModelExportFormat. More...
 
virtual DocumentModelGeneral modelGeneral () const
 Get method for DocumentModelGeneral. More...
 
virtual DocumentModelGridDisplay modelGridDisplay () const
 Get method for DocumentModelGridDisplay. More...
 
virtual DocumentModelGridRemoval modelGridRemoval () const
 Get method for DocumentModelGridRemoval. More...
 
virtual DocumentModelPointMatch modelPointMatch () const
 Get method for DocumentModelPointMatch. More...
 
virtual DocumentModelSegments modelSegments () const
 Get method for DocumentModelSegments. More...
 
virtual void movePoint (const QString &pointIdentifier, const QPointF &deltaScreen)
 See Curve::movePoint. More...
 
virtual int nextOrdinalForCurve (const QString &curveName) const
 Default next ordinal value for specified curve. More...
 
virtual QPointF positionGraph (const QString &pointIdentifier) const
 See Curve::positionGraph. More...
 
virtual QPointF positionScreen (const QString &pointIdentifier) const
 See Curve::positionScreen. More...
 
virtual void print () const
 Debugging method for printing directly from symbolic debugger. More...
 
virtual void printStream (QString indentation, QTextStream &str) const
 Debugging method that supports print method of this class and printStream method of some other class(es) More...
 
virtual QString reasonForUnsuccessfulRead () const
 Return an informative text message explaining why startup loading failed. Applies if successfulRead returns false. More...
 
virtual void removePointAxis (const QString &identifier)
 Perform the opposite of addPointAxis. More...
 
virtual void removePointGraph (const QString &identifier)
 Perform the opposite of addPointGraph. More...
 
virtual void removePointsInCurvesGraphs (CurvesGraphs &curvesGraphs)
 Remove all points identified in the specified CurvesGraphs. See also addPointsInCurvesGraphs. More...
 
virtual void saveXml (QXmlStreamWriter &writer) const
 Save graph to xml. More...
 
virtual QString selectedCurveName () const
 Currently selected curve name. This is used to set the selected curve combobox in MainWindow. More...
 
virtual void setCurveAxes (const Curve &curveAxes)
 Let CmdAbstract classes overwrite axes Curve. Applies to current coordinate system. More...
 
virtual void setCurvesGraphs (const CurvesGraphs &curvesGraphs)
 Let CmdAbstract classes overwrite CurvesGraphs. Applies to current coordinate system. More...
 
virtual void setModelAxesChecker (const DocumentModelAxesChecker &modelAxesChecker)
 Set method for DocumentModelAxesChecker. More...
 
virtual void setModelColorFilter (const DocumentModelColorFilter &modelColorFilter)
 Set method for DocumentModelColorFilter. More...
 
virtual void setModelCoords (const DocumentModelCoords &modelCoords)
 Set method for DocumentModelCoords. More...
 
virtual void setModelCurveStyles (const CurveStyles &modelCurveStyles)
 Set method for CurveStyles. More...
 
virtual void setModelDigitizeCurve (const DocumentModelDigitizeCurve &modelDigitizeCurve)
 Set method for DocumentModelDigitizeCurve. More...
 
virtual void setModelExport (const DocumentModelExportFormat &modelExport)
 Set method for DocumentModelExportFormat. More...
 
virtual void setModelGeneral (const DocumentModelGeneral &modelGeneral)
 Set method for DocumentModelGeneral. More...
 
virtual void setModelGridDisplay (const DocumentModelGridDisplay &modelGridDisplay)
 Set method for DocumentModelGridDisplay. More...
 
virtual void setModelGridRemoval (const DocumentModelGridRemoval &modelGridRemoval)
 Set method for DocumentModelGridRemoval. More...
 
void setModelPointMatch (const DocumentModelPointMatch &modelPointMatch)
 Set method for DocumentModelPointMatch. More...
 
virtual void setModelSegments (const DocumentModelSegments &modelSegments)
 Set method for DocumentModelSegments. More...
 
virtual void setSelectedCurveName (const QString &selectedCurveName)
 Save curve name that is selected for the current coordinate system, for the next time the coordinate system reappears. More...
 
virtual bool successfulRead () const
 Return true if startup loading succeeded. If the loading failed then reasonForUnsuccessfulRed will explain why. More...
 
virtual void updatePointOrdinals (const Transformation &transformation)
 Update point ordinals after point addition/removal or dragging. More...
 
- Public Member Functions inherited from CoordSystemInterface
 CoordSystemInterface ()
 Single constructor. More...
 
virtual ~CoordSystemInterface ()
 

Detailed Description

Storage of data belonging to one coordinate system.

There can be one or more coordinate systems per graph, and one or more graphs in the image belonging to a Document

Definition at line 41 of file CoordSystem.h.

Constructor & Destructor Documentation

◆ CoordSystem() [1/2]

CoordSystem::CoordSystem ( )

Single constructor.

Definition at line 39 of file CoordSystem.cpp.

39  :
40  m_curveAxes (new Curve (AXIS_CURVE_NAME,
44 {
45  LOG4CPP_INFO_S ((*mainCat)) << "CoordSystem::CoordSystem";
46 
47  SettingsForGraph settingsForGraph;
48 
49  // Create one curve, or as many curve as specified in the configuration file, whichever is greater
50  for (int indexOneBased = 1; indexOneBased <= settingsForGraph.numberOfCurvesForImport (); indexOneBased++) {
51 
52  QString curveName = settingsForGraph.defaultCurveName (indexOneBased,
54  m_curvesGraphs.addGraphCurveAtEnd (Curve (curveName,
57  PointStyle::defaultGraphCurve (m_curvesGraphs.numCurves ()))));
58 
59  resetSelectedCurveNameIfNecessary ();
60  }
61 }

◆ ~CoordSystem()

CoordSystem::~CoordSystem ( )

Definition at line 63 of file CoordSystem.cpp.

64 {
65  delete m_curveAxes;
66 }

◆ CoordSystem() [2/2]

CoordSystem::CoordSystem ( const QString &  fileName)

Constructor for opened Graphs, and error report files. The specified file is opened and read.

Member Function Documentation

◆ addGraphCurveAtEnd()

void CoordSystem::addGraphCurveAtEnd ( const QString &  curveName)
virtual

Add new graph curve to the list of existing graph curves.

Implements CoordSystemInterface.

Definition at line 68 of file CoordSystem.cpp.

69 {
70  m_curvesGraphs.addGraphCurveAtEnd (Curve (curveName,
73  PointStyle::defaultGraphCurve(m_curvesGraphs.numCurves()))));
74 
75  resetSelectedCurveNameIfNecessary ();
76 }

◆ addPointAxisWithGeneratedIdentifier()

void CoordSystem::addPointAxisWithGeneratedIdentifier ( const QPointF &  posScreen,
const QPointF &  posGraph,
QString &  identifier,
double  ordinal,
bool  isXOnly 
)
virtual

Add a single axis point with a generated point identifier.

Call this after checkAddPointAxis to guarantee success in this call.

Parameters
posScreenScreen coordinates from QGraphicsView
posGraphGraph coordiantes from user
identifierIdentifier for new axis point
ordinalUnique, for curve, ordinal number
isXOnlyTrue if graph coordinates have only x coordinate

Implements CoordSystemInterface.

Definition at line 78 of file CoordSystem.cpp.

83 {
84  Point point (AXIS_CURVE_NAME,
85  posScreen,
86  posGraph,
87  ordinal,
88  isXOnly);
89  m_curveAxes->addPoint (point);
90 
91  identifier = point.identifier();
92 
93  LOG4CPP_INFO_S ((*mainCat)) << "CoordSystem::addPointAxisWithGeneratedIdentifier"
94  << " ordinal=" << ordinal
95  << " posScreen=" << QPointFToString (posScreen).toLatin1 ().data ()
96  << " posGraph=" << QPointFToString (posGraph).toLatin1 ().data ()
97  << " identifier=" << identifier.toLatin1 ().data ();
98 }

◆ addPointAxisWithSpecifiedIdentifier()

void CoordSystem::addPointAxisWithSpecifiedIdentifier ( const QPointF &  posScreen,
const QPointF &  posGraph,
const QString &  identifier,
double  ordinal,
bool  isXOnly 
)
virtual

Add a single axis point with the specified point identifier.

Call this after checkAddPointAxis to guarantee success in this call.

Parameters
posScreenScreen coordinates from QGraphicsView
posGraphGraph coordiantes from user
identifierIdentifier for new axis point
ordinalUnique, for curve, ordinal number
isXOnlyTrue if graph coordinates have only x coordinate

Implements CoordSystemInterface.

Definition at line 100 of file CoordSystem.cpp.

105 {
106  Point point (AXIS_CURVE_NAME,
107  identifier,
108  posScreen,
109  posGraph,
110  ordinal,
111  isXOnly);
112  m_curveAxes->addPoint (point);
113 
114  LOG4CPP_INFO_S ((*mainCat)) << "CoordSystem::addPointAxisWithSpecifiedIdentifier"
115  << " ordinal=" << ordinal
116  << " posScreen=" << QPointFToString (posScreen).toLatin1 ().data ()
117  << " posGraph=" << QPointFToString (posGraph).toLatin1 ().data ()
118  << " identifier=" << identifier.toLatin1 ().data ();
119 }

◆ addPointGraphWithGeneratedIdentifier()

void CoordSystem::addPointGraphWithGeneratedIdentifier ( const QString &  curveName,
const QPointF &  posScreen,
QString &  generatedIentifier,
double  ordinal 
)
virtual

Add a single graph point with a generated point identifier.

Implements CoordSystemInterface.

Definition at line 121 of file CoordSystem.cpp.

125 {
126  Point point (curveName,
127  posScreen,
128  ordinal);
129  m_curvesGraphs.addPoint (point);
130 
131  identifier = point.identifier();
132 
133  LOG4CPP_INFO_S ((*mainCat)) << "CoordSystem::addPointGraphWithGeneratedIdentifier"
134  << " ordinal=" << ordinal
135  << " posScreen=" << QPointFToString (posScreen).toLatin1 ().data ()
136  << " identifier=" << identifier.toLatin1 ().data ();
137 }

◆ addPointGraphWithSpecifiedIdentifier()

void CoordSystem::addPointGraphWithSpecifiedIdentifier ( const QString &  curveName,
const QPointF &  posScreen,
const QString &  identifier,
double  ordinal 
)
virtual

Add a single graph point with the specified point identifer. Note that PointStyle is not applied to the point within the Graph.

Implements CoordSystemInterface.

Definition at line 139 of file CoordSystem.cpp.

143 {
144  Point point (curveName,
145  identifier,
146  posScreen,
147  ordinal);
148  m_curvesGraphs.addPoint (point);
149 
150  LOG4CPP_INFO_S ((*mainCat)) << "CoordSystem::addPointGraphWithSpecifiedIdentifier"
151  << " ordinal=" << ordinal
152  << " posScreen=" << QPointFToString (posScreen).toLatin1 ().data ()
153  << " identifier=" << identifier.toLatin1 ().data ();
154 }

◆ addPointsInCurvesGraphs()

void CoordSystem::addPointsInCurvesGraphs ( CurvesGraphs curvesGraphs)
virtual

Add all points identified in the specified CurvesGraphs. See also removePointsInCurvesGraphs.

Implements CoordSystemInterface.

Definition at line 156 of file CoordSystem.cpp.

157 {
158  CallbackAddPointsInCurvesGraphs ftor (*this);
159 
160  Functor2wRet<const QString &, const Point &, CallbackSearchReturn> ftorWithCallback = functor_ret (ftor,
162 
163  curvesGraphs.iterateThroughCurvesPoints (ftorWithCallback);
164 }

◆ checkAddPointAxis()

void CoordSystem::checkAddPointAxis ( const QPointF &  posScreen,
const QPointF &  posGraph,
bool &  isError,
QString &  errorMessage,
bool  isXOnly,
DocumentAxesPointsRequired  documentAxesPointsRequired 
)
virtual

Check before calling addPointAxis. Also returns the next available ordinal number (to prevent clashes)

Implements CoordSystemInterface.

Definition at line 180 of file CoordSystem.cpp.

186 {
187  LOG4CPP_INFO_S ((*mainCat)) << "CoordSystem::checkAddPointAxis"
188  << " posScreen=" << QPointFToString (posScreen).toLatin1 ().data ()
189  << " posGraph=" << QPointFToString (posGraph).toLatin1 ().data ();
190 
191  CallbackCheckAddPointAxis ftor (m_modelCoords,
192  posScreen,
193  posGraph,
194  documentAxesPointsRequired,
195  isXOnly);
196 
197  Functor2wRet<const QString &, const Point &, CallbackSearchReturn> ftorWithCallback = functor_ret (ftor,
199  m_curveAxes->iterateThroughCurvePoints (ftorWithCallback);
200 
201  isError = ftor.isError ();
202  errorMessage = ftor.errorMessage ();
203 }

◆ checkEditPointAxis()

void CoordSystem::checkEditPointAxis ( const QString &  pointIdentifier,
const QPointF &  posScreen,
const QPointF &  posGraph,
bool &  isError,
QString &  errorMessage,
DocumentAxesPointsRequired  documentAxesPointsRequired 
)
virtual

Check before calling editPointAxis.

Implements CoordSystemInterface.

Definition at line 205 of file CoordSystem.cpp.

211 {
212  LOG4CPP_INFO_S ((*mainCat)) << "CoordSystem::checkEditPointAxis"
213  << " posGraph=" << QPointFToString (posGraph).toLatin1 ().data ();
214 
215  CallbackCheckEditPointAxis ftor (m_modelCoords,
216  pointIdentifier,
217  posScreen,
218  posGraph,
219  documentAxesPointsRequired);
220 
221  Functor2wRet<const QString &, const Point &, CallbackSearchReturn> ftorWithCallback = functor_ret (ftor,
223  m_curveAxes->iterateThroughCurvePoints (ftorWithCallback);
224 
225  isError = ftor.isError ();
226  errorMessage = ftor.errorMessage ();
227 }

◆ curveAxes()

const Curve & CoordSystem::curveAxes ( ) const
virtual

Get method for axis curve.

Implements CoordSystemInterface.

Definition at line 229 of file CoordSystem.cpp.

230 {
231  ENGAUGE_CHECK_PTR (m_curveAxes);
232 
233  return *m_curveAxes;
234 }

◆ curveForCurveName() [1/2]

Curve * CoordSystem::curveForCurveName ( const QString &  curveName)
virtual

See CurvesGraphs::curveForCurveName, although this also works for AXIS_CURVE_NAME.

Implements CoordSystemInterface.

Definition at line 236 of file CoordSystem.cpp.

237 {
238  if (curveName == AXIS_CURVE_NAME) {
239 
240  return m_curveAxes;
241 
242  } else {
243 
244  return m_curvesGraphs.curveForCurveName (curveName);
245 
246  }
247 }

◆ curveForCurveName() [2/2]

const Curve * CoordSystem::curveForCurveName ( const QString &  curveName) const
virtual

See CurvesGraphs::curveForCurveNames, although this also works for AXIS_CURVE_NAME.

Implements CoordSystemInterface.

Definition at line 249 of file CoordSystem.cpp.

250 {
251  if (curveName == AXIS_CURVE_NAME) {
252 
253  return m_curveAxes;
254 
255  } else {
256 
257  return m_curvesGraphs.curveForCurveName (curveName);
258 
259  }
260 }

◆ curvesGraphs()

const CurvesGraphs & CoordSystem::curvesGraphs ( ) const
virtual

Make all Curves available, read only, for CmdAbstract classes only.

Implements CoordSystemInterface.

Definition at line 262 of file CoordSystem.cpp.

263 {
264  return m_curvesGraphs;
265 }

◆ curvesGraphsNames()

QStringList CoordSystem::curvesGraphsNames ( ) const
virtual

See CurvesGraphs::curvesGraphsNames.

Implements CoordSystemInterface.

Definition at line 267 of file CoordSystem.cpp.

268 {
269  return m_curvesGraphs.curvesGraphsNames();
270 }

◆ curvesGraphsNumPoints()

int CoordSystem::curvesGraphsNumPoints ( const QString &  curveName) const
virtual

See CurvesGraphs::curvesGraphsNumPoints.

Implements CoordSystemInterface.

Definition at line 272 of file CoordSystem.cpp.

273 {
274  return m_curvesGraphs.curvesGraphsNumPoints(curveName);
275 }

◆ editPointAxis()

void CoordSystem::editPointAxis ( const QPointF &  posGraph,
const QString &  identifier 
)
virtual

Edit the graph coordinates of a single axis point. Call this after checkAddPointAxis to guarantee success in this call.

Implements CoordSystemInterface.

Definition at line 277 of file CoordSystem.cpp.

279 {
280  LOG4CPP_INFO_S ((*mainCat)) << "CoordSystem::editPointAxis"
281  << " posGraph=(" << posGraph.x () << ", " << posGraph.y () << ") identifier="
282  << " identifier=" << identifier.toLatin1 ().data ();
283 
284  m_curveAxes->editPointAxis (posGraph,
285  identifier);
286 }

◆ editPointGraph()

void CoordSystem::editPointGraph ( bool  isX,
bool  isY,
double  x,
double  y,
const QStringList &  identifiers,
const Transformation transformation 
)
virtual

Edit the graph coordinates of one or more graph points.

Implements CoordSystemInterface.

Definition at line 288 of file CoordSystem.cpp.

294 {
295  LOG4CPP_INFO_S ((*mainCat)) << "CoordSystem::editPointGraph posGraph=("
296  << " x=" << (isX ? QString::number (x).toLatin1().data() : "")
297  << " y=" << (isY ? QString::number (y).toLatin1().data() : "")
298  << ") identifiers=" << identifiers.join(" ").toLatin1 ().data ();
299 
300  m_curvesGraphs.editPointGraph (isX,
301  isY,
302  x,
303  y,
304  identifiers,
305  transformation);
306 }

◆ isXOnly()

bool CoordSystem::isXOnly ( const QString &  pointIdentifier) const

Return true if y coordinate is undefined, otherwise x coordinae is undefined in DOCUMENT_AXES_POINT_REQUIRE_4 mode.

Applies to axes points only

Definition at line 336 of file CoordSystem.cpp.

337 {
338  return m_curveAxes->isXOnly (pointIdentifier);
339 }

◆ iterateThroughCurvePointsAxes() [1/2]

void CoordSystem::iterateThroughCurvePointsAxes ( const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &  ftorWithCallback)
virtual

See Curve::iterateThroughCurvePoints, for the axes curve.

Implements CoordSystemInterface.

Definition at line 341 of file CoordSystem.cpp.

342 {
343  ENGAUGE_CHECK_PTR (m_curveAxes);
344 
345  m_curveAxes->iterateThroughCurvePoints (ftorWithCallback);
346 }

◆ iterateThroughCurvePointsAxes() [2/2]

void CoordSystem::iterateThroughCurvePointsAxes ( const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &  ftorWithCallback) const
virtual

See Curve::iterateThroughCurvePoints, for the axes curve.

Implements CoordSystemInterface.

Definition at line 348 of file CoordSystem.cpp.

349 {
350  ENGAUGE_CHECK_PTR (m_curveAxes);
351 
352  m_curveAxes->iterateThroughCurvePoints (ftorWithCallback);
353 }

◆ iterateThroughCurveSegments()

void CoordSystem::iterateThroughCurveSegments ( const QString &  curveName,
const Functor2wRet< const Point &, const Point &, CallbackSearchReturn > &  ftorWithCallback 
) const
virtual

See Curve::iterateThroughCurveSegments, for any axes or graph curve.

Implements CoordSystemInterface.

Definition at line 355 of file CoordSystem.cpp.

357 {
358  if (curveName == AXIS_CURVE_NAME) {
359  m_curveAxes->iterateThroughCurveSegments(ftorWithCallback);
360  } else {
361  m_curvesGraphs.iterateThroughCurveSegments(curveName,
362  ftorWithCallback);
363  }
364 }

◆ iterateThroughCurvesPointsGraphs() [1/2]

void CoordSystem::iterateThroughCurvesPointsGraphs ( const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &  ftorWithCallback)
virtual

See Curve::iterateThroughCurvePoints, for all the graphs curves.

Implements CoordSystemInterface.

Definition at line 366 of file CoordSystem.cpp.

367 {
368  ENGAUGE_CHECK_PTR (m_curveAxes);
369 
370  m_curvesGraphs.iterateThroughCurvesPoints (ftorWithCallback);
371 }

◆ iterateThroughCurvesPointsGraphs() [2/2]

void CoordSystem::iterateThroughCurvesPointsGraphs ( const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &  ftorWithCallback) const
virtual

See Curve::iterateThroughCurvePoints, for all the graphs curves.

Implements CoordSystemInterface.

Definition at line 373 of file CoordSystem.cpp.

374 {
375  ENGAUGE_CHECK_PTR (m_curveAxes);
376 
377  m_curvesGraphs.iterateThroughCurvesPoints (ftorWithCallback);
378 }

◆ loadCurvesFile()

bool CoordSystem::loadCurvesFile ( const QString &  curvesFile)
virtual

Load the curve names in the specified Engauge file into the current graph. This is called near the end of the import process only.

Implements CoordSystemInterface.

Definition at line 380 of file CoordSystem.cpp.

381 {
382  LOG4CPP_INFO_S ((*mainCat)) << "CoordSystem::loadCurvesFile";
383 
384  return true;
385 }

◆ loadPreVersion6()

void CoordSystem::loadPreVersion6 ( QDataStream &  str,
double  version,
DocumentAxesPointsRequired documentAxesPointsRequired 
)

Load from file in pre-version 6 format. Number of axes points is read in and passed to Document.

Definition at line 387 of file CoordSystem.cpp.

390 {
391  LOG4CPP_INFO_S ((*mainCat)) << "CoordSystem::loadPreVersion6";
392 
393  qint32 int32;
394  double dbl, radius = 0.0;
395  QString st;
396 
397  str >> st; // CurveCmbText selection
398  str >> st; // MeasureCmbText selection
399  str >> int32;
400  m_modelCoords.setCoordsType(static_cast<CoordsType> (int32));
401  if (version >= 3) {
402  str >> static_cast<double &> (radius);
403  }
404  m_modelCoords.setOriginRadius(radius);
405  str >> int32;
407  m_modelCoords.setCoordUnitsTheta(static_cast<CoordUnitsPolarTheta> (int32));
408  str >> int32;
409  m_modelCoords.setCoordScaleXTheta(static_cast<CoordScale> (int32));
410  str >> int32;
411  m_modelCoords.setCoordScaleYRadius(static_cast<CoordScale> (int32));
412 
413  str >> int32;
414  m_modelExport.setDelimiter(static_cast<ExportDelimiter> (int32));
415  str >> int32;
416  m_modelExport.setLayoutFunctions(static_cast<ExportLayoutFunctions> (int32));
417  str >> int32;
418  m_modelExport.setPointsSelectionFunctions(static_cast<ExportPointsSelectionFunctions> (int32));
420  m_modelExport.setPointsIntervalUnitsFunctions(static_cast<ExportPointsIntervalUnits> (int32));
421  m_modelExport.setPointsIntervalUnitsRelations(static_cast<ExportPointsIntervalUnits> (int32));
422  str >> int32;
423  m_modelExport.setHeader(static_cast<ExportHeader> (int32));
424  if (version >= 5.1) {
425  str >> st; // X label
426  if (m_modelCoords.coordsType() == COORDS_TYPE_CARTESIAN) {
427  m_modelExport.setXLabel(st);
428  }
429  str >> st; // Theta label
430  if (m_modelCoords.coordsType() == COORDS_TYPE_POLAR) {
431  m_modelExport.setXLabel(st);
432  }
433  }
434 
435  // Stable flag in m_modelGridRemoval is set below after points are read in
436  str >> int32; // Remove thin lines parallel to axes
437  str >> dbl; // Thin thickness
438  str >> int32;
439  m_modelGridRemoval.setRemoveDefinedGridLines(int32);
440  str >> int32; // Initialized
441  str >> int32;
442  m_modelGridRemoval.setCountX(int32);
443  str >> int32;
444  m_modelGridRemoval.setCountY(int32);
445  str >> int32;
446  m_modelGridRemoval.setGridCoordDisableX(static_cast<GridCoordDisable> (int32));
447  str >> int32;
448  m_modelGridRemoval.setGridCoordDisableY(static_cast<GridCoordDisable> (int32));
449  str >> dbl;
450  m_modelGridRemoval.setStartX(dbl);
451  str >> dbl;
452  m_modelGridRemoval.setStartY(dbl);
453  str >> dbl;
454  m_modelGridRemoval.setStepX(dbl);
455  str >> dbl;
456  m_modelGridRemoval.setStepY(dbl);
457  str >> dbl;
458  m_modelGridRemoval.setStopX(dbl);
459  str >> dbl;
460  m_modelGridRemoval.setStopY(dbl);
461  str >> dbl;
462  m_modelGridRemoval.setCloseDistance(dbl);
463  str >> int32; // Boolean remove color flag
464  if (version >= 5) {
465  QColor color;
466  str >> color;
467  } else {
468  str >> int32; // Rgb color
469  }
470  str >> int32; // Foreground threshold low
471  str >> int32; // Foreground threshold high
472  str >> dbl; // Gap separation
473 
474  str >> int32;
475  m_modelGridDisplay.setStable(int32);
476  str >> int32;
477  m_modelGridDisplay.setCountX(unsigned (int32));
478  str >> int32;
479  m_modelGridDisplay.setCountY(unsigned (int32));
480  str >> int32;
481  m_modelGridDisplay.setDisableX(static_cast<GridCoordDisable> (int32));
482  str >> int32;
483  m_modelGridDisplay.setDisableY(static_cast<GridCoordDisable> (int32));
484  str >> dbl;
485  m_modelGridDisplay.setStartX (dbl);
486  str >> dbl;
487  m_modelGridDisplay.setStartY (dbl);
488  str >> dbl;
489  m_modelGridDisplay.setStepX (dbl);
490  str >> dbl;
491  m_modelGridDisplay.setStepY (dbl);
492  str >> dbl;
493  m_modelGridDisplay.setStopX (dbl);
494  str >> dbl;
495  m_modelGridDisplay.setStopY (dbl);
496 
497  initializeUnsetGridRemovalFromGridDisplay (version);
498 
499  str >> int32;
500  m_modelSegments.setMinLength(int32);
501  str >> int32;
502  m_modelSegments.setPointSeparation(int32);
503  str >> int32;
504  m_modelSegments.setLineWidth(int32);
505  str >> int32;
506  m_modelSegments.setLineColor(static_cast<ColorPalette> (int32));
507 
508  str >> int32; // Point separation
509  str >> int32;
510  m_modelPointMatch.setMaxPointSize(int32);
511  str >> int32;
512  m_modelPointMatch.setPaletteColorAccepted(static_cast<ColorPalette> (int32));
513  str >> int32;
514  m_modelPointMatch.setPaletteColorRejected(static_cast<ColorPalette> (int32));
515  if (version < 4) {
516  m_modelPointMatch.setPaletteColorCandidate(COLOR_PALETTE_BLUE);
517  } else {
518  str >> int32;
519  m_modelPointMatch.setPaletteColorCandidate(static_cast<ColorPalette> (int32));
520  }
521 
522  str >> int32; // Discretize method
523  str >> int32; // Intensity threshold low
524  str >> int32; // Intensity threshold high
525  str >> int32; // Foreground threshold low
526  str >> int32; // Foreground threshold high
527  str >> int32; // Hue threshold low
528  str >> int32; // Hue threshold high
529  str >> int32; // Saturation threshold low
530  str >> int32; // Saturation threshold high
531  str >> int32; // Value threshold low
532  str >> int32; // Value threshold high
533 
534  // Old versions have two Curve objects for 3 point axes and 2 point scales. New version picks one Curve
535  Curve *curveAxesIn = new Curve (str);
536  Curve *curveScaleIn = new Curve (str);
537  if (curveScaleIn->numPoints() == 2) {
538  // Nondefault case is map with scale bar
539  documentAxesPointsRequired = DOCUMENT_AXES_POINTS_REQUIRED_2;
540  delete m_curveAxes;
541  m_curveAxes = curveScaleIn;
542  m_curveAxes->setCurveName (AXIS_CURVE_NAME); // Override existing "Scale" name
543  delete curveAxesIn;
544  } else {
545  // Default case is graph with axes
546  documentAxesPointsRequired = DOCUMENT_AXES_POINTS_REQUIRED_3;
547  delete m_curveAxes;
548  m_curveAxes = curveAxesIn;
549  delete curveScaleIn;
550  }
551  m_curvesGraphs.loadPreVersion6 (str);
552 
553  // Information from curves and points can affect some data structures that were (mostly) set earlier
554  if (m_curveAxes->numPoints () >= documentAxesPointsRequired) {
555  m_modelGridRemoval.setStable();
556  }
557 
558  resetSelectedCurveNameIfNecessary ();
559 }

◆ loadVersion6()

void CoordSystem::loadVersion6 ( QXmlStreamReader &  reader,
DocumentAxesPointsRequired documentAxesPointsRequired 
)

Load from file in version 6 format. Number of axes points is read in and passed to Document.

Definition at line 561 of file CoordSystem.cpp.

563 {
564  LOG4CPP_INFO_S ((*mainCat)) << "CoordSystem::loadVersion6";
565 
566  documentAxesPointsRequired = DOCUMENT_AXES_POINTS_REQUIRED_3;
567 
568  // Import from xml. Loop to end of data or error condition occurs, whichever is first
569  while (!reader.atEnd() &&
570  !reader.hasError()) {
571  QXmlStreamReader::TokenType tokenType = loadNextFromReader(reader);
572 
573  if ((reader.name() == DOCUMENT_SERIALIZE_DOCUMENT) &&
574  (tokenType == QXmlStreamReader::EndElement)) {
575 
576  // Exit out of loop immediately
577  break;
578  }
579 
580  // Iterate to next StartElement
581  if (tokenType == QXmlStreamReader::StartElement) {
582 
583  // This is a StartElement, so process it
584  QString tag = reader.name().toString();
586  m_modelAxesChecker.loadXml (reader);
587  } else if (tag == DOCUMENT_SERIALIZE_COORDS) {
588  m_modelCoords.loadXml (reader);
589  } else if (tag == DOCUMENT_SERIALIZE_CURVE) {
590  delete m_curveAxes;
591  m_curveAxes = new Curve (reader);
592  } else if (tag == DOCUMENT_SERIALIZE_CURVES_GRAPHS) {
593  m_curvesGraphs.loadXml (reader);
594  } else if (tag == DOCUMENT_SERIALIZE_DIGITIZE_CURVE) {
595  m_modelDigitizeCurve.loadXml (reader);
596  } else if (tag == DOCUMENT_SERIALIZE_EXPORT) {
597  m_modelExport.loadXml (reader);
598  } else if (tag == DOCUMENT_SERIALIZE_GENERAL || tag == DOCUMENT_SERIALIZE_COMMON) {
599  m_modelGeneral.loadXml (reader);
600  } else if (tag == DOCUMENT_SERIALIZE_GRID_REMOVAL) {
601  m_modelGridRemoval.loadXml (reader);
602  } else if (tag == DOCUMENT_SERIALIZE_IMAGE) {
603  ENGAUGE_ASSERT (false); // The image should have been read before this method was called
604  } else if (tag == DOCUMENT_SERIALIZE_POINT_MATCH) {
605  m_modelPointMatch.loadXml (reader);
606  } else if (tag == DOCUMENT_SERIALIZE_SEGMENTS) {
607  m_modelSegments.loadXml (reader);
608  } else {
609  m_successfulRead = false;
610  m_reasonForUnsuccessfulRead = QString ("%1 '%2' %3")
611  .arg (QObject::tr ("Unexpected xml token"))
612  .arg (tag)
613  .arg ("encountered");
614  break;
615  }
616  }
617  }
618 
619  resetSelectedCurveNameIfNecessary ();
620 }

◆ loadVersions7AndUp()

void CoordSystem::loadVersions7AndUp ( QXmlStreamReader &  reader)

Load from file in versions 7 and 8 formats. Number of axes points is already defined at Document level.

Definition at line 622 of file CoordSystem.cpp.

623 {
624  LOG4CPP_INFO_S ((*mainCat)) << "CoordSystem::loadVersions7AndUp";
625 
626  // Import from xml. Loop to end of data or error condition occurs, whichever is first
627  while (!reader.atEnd() &&
628  !reader.hasError()) {
629  QXmlStreamReader::TokenType tokenType = loadNextFromReader(reader);
630 
631  if ((reader.name() == DOCUMENT_SERIALIZE_COORD_SYSTEM) &&
632  (tokenType == QXmlStreamReader::EndElement)) {
633 
634  // Exit out of loop immediately
635  break;
636  }
637 
638  // Iterate to next StartElement
639  if (tokenType == QXmlStreamReader::StartElement) {
640 
641  // This is a StartElement, so process it
642  QString tag = reader.name().toString();
644  m_modelAxesChecker.loadXml (reader);
645  } else if (tag == DOCUMENT_SERIALIZE_COORDS) {
646  m_modelCoords.loadXml (reader);
647  } else if (tag == DOCUMENT_SERIALIZE_CURVE) {
648  delete m_curveAxes;
649  m_curveAxes = new Curve (reader);
650  } else if (tag == DOCUMENT_SERIALIZE_CURVES_GRAPHS) {
651  m_curvesGraphs.loadXml (reader);
652  } else if (tag == DOCUMENT_SERIALIZE_DIGITIZE_CURVE) {
653  m_modelDigitizeCurve.loadXml (reader);
654  } else if (tag == DOCUMENT_SERIALIZE_EXPORT) {
655  m_modelExport.loadXml (reader);
656  } else if (tag == DOCUMENT_SERIALIZE_GENERAL || tag == DOCUMENT_SERIALIZE_COMMON) {
657  m_modelGeneral.loadXml (reader);
658  } else if (tag == DOCUMENT_SERIALIZE_GRID_DISPLAY) {
659  m_modelGridDisplay.loadXml (reader);
660  } else if (tag == DOCUMENT_SERIALIZE_GRID_REMOVAL) {
661  m_modelGridRemoval.loadXml (reader);
662  } else if (tag == DOCUMENT_SERIALIZE_IMAGE) {
663  ENGAUGE_ASSERT (false); // The image should have been read before this method was called
664  } else if (tag == DOCUMENT_SERIALIZE_POINT_MATCH) {
665  m_modelPointMatch.loadXml (reader);
666  } else if (tag == DOCUMENT_SERIALIZE_SEGMENTS) {
667  m_modelSegments.loadXml (reader);
668  } else {
669  m_successfulRead = false;
670  m_reasonForUnsuccessfulRead = QString ("Unexpected xml token '%1' encountered").arg (tag);
671  break;
672  }
673  }
674  }
675 
676  resetSelectedCurveNameIfNecessary ();
677 }

◆ modelAxesChecker()

DocumentModelAxesChecker CoordSystem::modelAxesChecker ( ) const
virtual

Get method for DocumentModelAxesChecker.

Implements CoordSystemInterface.

Definition at line 679 of file CoordSystem.cpp.

680 {
681  return m_modelAxesChecker;
682 }

◆ modelColorFilter()

DocumentModelColorFilter CoordSystem::modelColorFilter ( ) const
virtual

Get method for DocumentModelColorFilter.

Implements CoordSystemInterface.

Definition at line 684 of file CoordSystem.cpp.

685 {
686  // Construct a curve-specific model
688 
689  return modelColorFilter;
690 }

◆ modelCoords()

DocumentModelCoords CoordSystem::modelCoords ( ) const
virtual

Get method for DocumentModelCoords.

Implements CoordSystemInterface.

Definition at line 692 of file CoordSystem.cpp.

693 {
694  return m_modelCoords;
695 }

◆ modelCurveStyles()

CurveStyles CoordSystem::modelCurveStyles ( ) const
virtual

Get method for CurveStyles.

Implements CoordSystemInterface.

Definition at line 697 of file CoordSystem.cpp.

698 {
699  // Construct a curve-specific model
701 
702  return modelCurveStyles;
703 }

◆ modelDigitizeCurve()

DocumentModelDigitizeCurve CoordSystem::modelDigitizeCurve ( ) const
virtual

Get method for DocumentModelDigitizeCurve.

Implements CoordSystemInterface.

Definition at line 705 of file CoordSystem.cpp.

706 {
707  return m_modelDigitizeCurve;
708 }

◆ modelExport()

DocumentModelExportFormat CoordSystem::modelExport ( ) const
virtual

Get method for DocumentModelExportFormat.

Implements CoordSystemInterface.

Definition at line 710 of file CoordSystem.cpp.

711 {
712  return m_modelExport;
713 }

◆ modelGeneral()

DocumentModelGeneral CoordSystem::modelGeneral ( ) const
virtual

Get method for DocumentModelGeneral.

Implements CoordSystemInterface.

Definition at line 715 of file CoordSystem.cpp.

716 {
717  return m_modelGeneral;
718 }

◆ modelGridDisplay()

DocumentModelGridDisplay CoordSystem::modelGridDisplay ( ) const
virtual

Get method for DocumentModelGridDisplay.

Implements CoordSystemInterface.

Definition at line 720 of file CoordSystem.cpp.

721 {
722  return m_modelGridDisplay;
723 }

◆ modelGridRemoval()

DocumentModelGridRemoval CoordSystem::modelGridRemoval ( ) const
virtual

Get method for DocumentModelGridRemoval.

Implements CoordSystemInterface.

Definition at line 725 of file CoordSystem.cpp.

726 {
727  return m_modelGridRemoval;
728 }

◆ modelPointMatch()

DocumentModelPointMatch CoordSystem::modelPointMatch ( ) const
virtual

Get method for DocumentModelPointMatch.

Implements CoordSystemInterface.

Definition at line 730 of file CoordSystem.cpp.

731 {
732  return m_modelPointMatch;
733 }

◆ modelSegments()

DocumentModelSegments CoordSystem::modelSegments ( ) const
virtual

Get method for DocumentModelSegments.

Implements CoordSystemInterface.

Definition at line 735 of file CoordSystem.cpp.

736 {
737  return m_modelSegments;
738 }

◆ movePoint()

void CoordSystem::movePoint ( const QString &  pointIdentifier,
const QPointF &  deltaScreen 
)
virtual

See Curve::movePoint.

Implements CoordSystemInterface.

Definition at line 740 of file CoordSystem.cpp.

742 {
743  QString curveName = Point::curveNameFromPointIdentifier (pointIdentifier);
744 
745  Curve *curve = curveForCurveName (curveName);
746  ENGAUGE_CHECK_PTR (curve);
747  curve->movePoint (pointIdentifier,
748  deltaScreen);
749 }

◆ nextOrdinalForCurve()

int CoordSystem::nextOrdinalForCurve ( const QString &  curveName) const
virtual

Default next ordinal value for specified curve.

Implements CoordSystemInterface.

Definition at line 751 of file CoordSystem.cpp.

752 {
753  CallbackNextOrdinal ftor (curveName);
754 
755  Functor2wRet<const QString &, const Point &, CallbackSearchReturn> ftorWithCallback = functor_ret (ftor,
757 
758  if (curveName == AXIS_CURVE_NAME) {
759  m_curveAxes->iterateThroughCurvePoints (ftorWithCallback);
760  } else {
761  m_curvesGraphs.iterateThroughCurvesPoints (ftorWithCallback);
762  }
763 
764  return qFloor (ftor.nextOrdinal ());
765 }

◆ positionGraph()

QPointF CoordSystem::positionGraph ( const QString &  pointIdentifier) const
virtual

See Curve::positionGraph.

Implements CoordSystemInterface.

Definition at line 767 of file CoordSystem.cpp.

768 {
769  QString curveName = Point::curveNameFromPointIdentifier (pointIdentifier);
770 
771  const Curve *curve = curveForCurveName (curveName);
772  return curve->positionGraph (pointIdentifier);
773 }

◆ positionScreen()

QPointF CoordSystem::positionScreen ( const QString &  pointIdentifier) const
virtual

See Curve::positionScreen.

Implements CoordSystemInterface.

Definition at line 775 of file CoordSystem.cpp.

776 {
777  QString curveName = Point::curveNameFromPointIdentifier (pointIdentifier);
778 
779  const Curve *curve = curveForCurveName (curveName);
780  return curve->positionScreen (pointIdentifier);
781 }

◆ print()

void CoordSystem::print ( ) const
virtual

Debugging method for printing directly from symbolic debugger.

Implements CoordSystemInterface.

Definition at line 783 of file CoordSystem.cpp.

784 {
785  QString text;
786  QTextStream str (&text);
787 
788  printStream ("",
789  str);
790  std::cerr << text.toLatin1().data();
791 }

◆ printStream()

void CoordSystem::printStream ( QString  indentation,
QTextStream &  str 
) const
virtual

Debugging method that supports print method of this class and printStream method of some other class(es)

Implements CoordSystemInterface.

Definition at line 793 of file CoordSystem.cpp.

795 {
796  str << indentation << "Graph\n";
797 
798  indentation += INDENTATION_DELTA;
799 
800  // str << indentation << "name=" << m_name << "\n";
801  // str << indentation << "pixmap=" << m_pixmap.width() << "x" << m_pixmap.height() << "\n";
802 
803  m_curveAxes->printStream (indentation,
804  str);
805  m_curvesGraphs.printStream (indentation,
806  str);
807 
808  m_modelAxesChecker.printStream (indentation,
809  str);
810  m_modelCoords.printStream (indentation,
811  str);
812  m_modelDigitizeCurve.printStream (indentation,
813  str);
814  m_modelExport.printStream (indentation,
815  str);
816  m_modelGeneral.printStream (indentation,
817  str);
818  m_modelGridDisplay.printStream (indentation,
819  str);
820  m_modelGridRemoval.printStream (indentation,
821  str);
822  m_modelPointMatch.printStream (indentation,
823  str);
824  m_modelSegments.printStream (indentation,
825  str);
826 }

◆ reasonForUnsuccessfulRead()

QString CoordSystem::reasonForUnsuccessfulRead ( ) const
virtual

Return an informative text message explaining why startup loading failed. Applies if successfulRead returns false.

Implements CoordSystemInterface.

Definition at line 828 of file CoordSystem.cpp.

829 {
830  ENGAUGE_ASSERT (!m_successfulRead);
831 
832  return m_reasonForUnsuccessfulRead;
833 }

◆ removePointAxis()

void CoordSystem::removePointAxis ( const QString &  identifier)
virtual

Perform the opposite of addPointAxis.

Implements CoordSystemInterface.

Definition at line 835 of file CoordSystem.cpp.

836 {
837  LOG4CPP_INFO_S ((*mainCat)) << "CoordSystem::removePointAxis identifier=" << identifier.toLatin1 ().data ();
838 
839  m_curveAxes->removePoint (identifier);
840 }

◆ removePointGraph()

void CoordSystem::removePointGraph ( const QString &  identifier)
virtual

Perform the opposite of addPointGraph.

Implements CoordSystemInterface.

Definition at line 842 of file CoordSystem.cpp.

843 {
844  LOG4CPP_INFO_S ((*mainCat)) << "CoordSystem::removePointGraph identifier=" << identifier.toLatin1 ().data ();
845 
846  m_curvesGraphs.removePoint (identifier);
847 }

◆ removePointsInCurvesGraphs()

void CoordSystem::removePointsInCurvesGraphs ( CurvesGraphs curvesGraphs)
virtual

Remove all points identified in the specified CurvesGraphs. See also addPointsInCurvesGraphs.

Implements CoordSystemInterface.

Definition at line 849 of file CoordSystem.cpp.

850 {
852 
853  Functor2wRet<const QString &, const Point &, CallbackSearchReturn> ftorWithCallback = functor_ret (ftor,
855 
856  curvesGraphs.iterateThroughCurvesPoints (ftorWithCallback);
857 }

◆ saveXml()

void CoordSystem::saveXml ( QXmlStreamWriter &  writer) const
virtual

Save graph to xml.

Implements CoordSystemInterface.

Definition at line 870 of file CoordSystem.cpp.

871 {
872  writer.writeStartElement(DOCUMENT_SERIALIZE_COORD_SYSTEM);
873 
874  // Serialize the Document variables
875  m_modelGeneral.saveXml (writer);
876  m_modelCoords.saveXml (writer);
877  m_modelDigitizeCurve.saveXml (writer);
878  m_modelExport.saveXml (writer);
879  m_modelAxesChecker.saveXml (writer);
880  m_modelGridDisplay.saveXml (writer);
881  m_modelGridRemoval.saveXml (writer);
882  m_modelPointMatch.saveXml (writer);
883  m_modelSegments.saveXml (writer);
884  m_curveAxes->saveXml (writer);
885  m_curvesGraphs.saveXml (writer);
886  writer.writeEndElement();
887 }

◆ selectedCurveName()

QString CoordSystem::selectedCurveName ( ) const
virtual

Currently selected curve name. This is used to set the selected curve combobox in MainWindow.

Implements CoordSystemInterface.

Definition at line 889 of file CoordSystem.cpp.

890 {
891  return m_selectedCurveName;
892 }

◆ setCurveAxes()

void CoordSystem::setCurveAxes ( const Curve curveAxes)
virtual

Let CmdAbstract classes overwrite axes Curve. Applies to current coordinate system.

Implements CoordSystemInterface.

Definition at line 894 of file CoordSystem.cpp.

895 {
896  LOG4CPP_INFO_S ((*mainCat)) << "CoordSystem::setCurveAxes";
897 
898  delete m_curveAxes;
899 
900  m_curveAxes = new Curve (curveAxes);
901 }

◆ setCurvesGraphs()

void CoordSystem::setCurvesGraphs ( const CurvesGraphs curvesGraphs)
virtual

Let CmdAbstract classes overwrite CurvesGraphs. Applies to current coordinate system.

Implements CoordSystemInterface.

Definition at line 903 of file CoordSystem.cpp.

904 {
905  LOG4CPP_INFO_S ((*mainCat)) << "CoordSystem::setCurvesGraphs";
906 
907  m_curvesGraphs = curvesGraphs;
908 
909  resetSelectedCurveNameIfNecessary ();
910 }

◆ setModelAxesChecker()

void CoordSystem::setModelAxesChecker ( const DocumentModelAxesChecker modelAxesChecker)
virtual

Set method for DocumentModelAxesChecker.

Implements CoordSystemInterface.

Definition at line 912 of file CoordSystem.cpp.

913 {
914  m_modelAxesChecker = modelAxesChecker;
915 }

◆ setModelColorFilter()

void CoordSystem::setModelColorFilter ( const DocumentModelColorFilter modelColorFilter)
virtual

Set method for DocumentModelColorFilter.

Implements CoordSystemInterface.

Definition at line 917 of file CoordSystem.cpp.

918 {
919  // Save the CurveFilter for each Curve
920  ColorFilterSettingsList::const_iterator itr;
921  for (itr = modelColorFilter.colorFilterSettingsList().constBegin ();
922  itr != modelColorFilter.colorFilterSettingsList().constEnd();
923  itr++) {
924 
925  QString curveName = itr.key();
926  const ColorFilterSettings &colorFilterSettings = itr.value();
927 
928  Curve *curve = curveForCurveName (curveName);
929  curve->setColorFilterSettings (colorFilterSettings);
930  }
931 }

◆ setModelCoords()

void CoordSystem::setModelCoords ( const DocumentModelCoords modelCoords)
virtual

Set method for DocumentModelCoords.

Implements CoordSystemInterface.

Definition at line 933 of file CoordSystem.cpp.

934 {
935  m_modelCoords = modelCoords;
936 }

◆ setModelCurveStyles()

void CoordSystem::setModelCurveStyles ( const CurveStyles modelCurveStyles)
virtual

Set method for CurveStyles.

Implements CoordSystemInterface.

Definition at line 938 of file CoordSystem.cpp.

939 {
940  // Save the LineStyle and PointStyle for each Curve
941  QStringList curveNames = modelCurveStyles.curveNames();
942  QStringList::iterator itr;
943  for (itr = curveNames.begin(); itr != curveNames.end(); itr++) {
944 
945  QString curveName = *itr;
946  const CurveStyle &curveStyle = modelCurveStyles.curveStyle (curveName);
947 
948  Curve *curve = curveForCurveName (curveName);
949  curve->setCurveStyle (curveStyle);
950  }
951 }

◆ setModelDigitizeCurve()

void CoordSystem::setModelDigitizeCurve ( const DocumentModelDigitizeCurve modelDigitizeCurve)
virtual

Set method for DocumentModelDigitizeCurve.

Implements CoordSystemInterface.

Definition at line 953 of file CoordSystem.cpp.

954 {
955  m_modelDigitizeCurve = modelDigitizeCurve;
956 }

◆ setModelExport()

void CoordSystem::setModelExport ( const DocumentModelExportFormat modelExport)
virtual

Set method for DocumentModelExportFormat.

Implements CoordSystemInterface.

Definition at line 958 of file CoordSystem.cpp.

959 {
960  m_modelExport = modelExport;
961 }

◆ setModelGeneral()

void CoordSystem::setModelGeneral ( const DocumentModelGeneral modelGeneral)
virtual

Set method for DocumentModelGeneral.

Implements CoordSystemInterface.

Definition at line 963 of file CoordSystem.cpp.

964 {
965  m_modelGeneral = modelGeneral;
966 }

◆ setModelGridDisplay()

void CoordSystem::setModelGridDisplay ( const DocumentModelGridDisplay modelGridDisplay)
virtual

Set method for DocumentModelGridDisplay.

Implements CoordSystemInterface.

Definition at line 968 of file CoordSystem.cpp.

969 {
970  m_modelGridDisplay = modelGridDisplay;
971 }

◆ setModelGridRemoval()

void CoordSystem::setModelGridRemoval ( const DocumentModelGridRemoval modelGridRemoval)
virtual

Set method for DocumentModelGridRemoval.

Implements CoordSystemInterface.

Definition at line 973 of file CoordSystem.cpp.

974 {
975  m_modelGridRemoval = modelGridRemoval;
976 }

◆ setModelPointMatch()

void CoordSystem::setModelPointMatch ( const DocumentModelPointMatch modelPointMatch)
virtual

Set method for DocumentModelPointMatch.

Implements CoordSystemInterface.

Definition at line 978 of file CoordSystem.cpp.

979 {
980  m_modelPointMatch = modelPointMatch;
981 }

◆ setModelSegments()

void CoordSystem::setModelSegments ( const DocumentModelSegments modelSegments)
virtual

Set method for DocumentModelSegments.

Implements CoordSystemInterface.

Definition at line 983 of file CoordSystem.cpp.

984 {
985  m_modelSegments = modelSegments;
986 }

◆ setSelectedCurveName()

void CoordSystem::setSelectedCurveName ( const QString &  selectedCurveName)
virtual

Save curve name that is selected for the current coordinate system, for the next time the coordinate system reappears.

Implements CoordSystemInterface.

Definition at line 988 of file CoordSystem.cpp.

989 {
990  m_selectedCurveName = selectedCurveName;
991 }

◆ successfulRead()

bool CoordSystem::successfulRead ( ) const
virtual

Return true if startup loading succeeded. If the loading failed then reasonForUnsuccessfulRed will explain why.

Implements CoordSystemInterface.

Definition at line 993 of file CoordSystem.cpp.

994 {
995  return m_successfulRead;
996 }

◆ updatePointOrdinals()

void CoordSystem::updatePointOrdinals ( const Transformation transformation)
virtual

Update point ordinals after point addition/removal or dragging.

See GraphicsScene::updatePointOrdinalsAfterDrag. Graph coordinates of point must be up to date

Implements CoordSystemInterface.

Definition at line 998 of file CoordSystem.cpp.

999 {
1000  LOG4CPP_INFO_S ((*mainCat)) << "CoordSystem::updatePointOrdinals";
1001 
1002  // The graph coordinates of all points in m_curvesGraphs must have already been updated at this point. See applyTransformation
1003  m_curvesGraphs.updatePointOrdinals (transformation);
1004 }

The documentation for this class was generated from the following files:
Curve::iterateThroughCurvePoints
void iterateThroughCurvePoints(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback) const
Apply functor to Points on Curve.
Definition: Curve.cpp:301
LineStyle::defaultGraphCurve
static LineStyle defaultGraphCurve(int index)
Initial default for index'th graph curve.
Definition: LineStyle.cpp:84
CoordSystem::modelGridDisplay
virtual DocumentModelGridDisplay modelGridDisplay() const
Get method for DocumentModelGridDisplay.
Definition: CoordSystem.cpp:720
CoordSystem::modelGeneral
virtual DocumentModelGeneral modelGeneral() const
Get method for DocumentModelGeneral.
Definition: CoordSystem.cpp:715
CurvesGraphs::saveXml
void saveXml(QXmlStreamWriter &writer) const
Serialize curves.
Definition: CurvesGraphs.cpp:270
DocumentModelGeneral::saveXml
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
Definition: DocumentModelGeneral.cpp:107
DocumentModelExportFormat::saveXml
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
Definition: DocumentModelExportFormat.cpp:296
DocumentModelPointMatch::loadXml
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
Definition: DocumentModelPointMatch.cpp:56
DocumentModelGridRemoval::setStartX
void setStartX(double startX)
Set method for x start.
Definition: DocumentModelGridRemoval.cpp:289
DOCUMENT_SERIALIZE_COORD_SYSTEM
const QString DOCUMENT_SERIALIZE_COORD_SYSTEM
DOCUMENT_SERIALIZE_POINT_MATCH
const QString DOCUMENT_SERIALIZE_POINT_MATCH
DOCUMENT_SERIALIZE_EXPORT
const QString DOCUMENT_SERIALIZE_EXPORT
DocumentModelExportFormat::setDelimiter
void setDelimiter(ExportDelimiter exportDelimiter)
Set method for delimiter.
Definition: DocumentModelExportFormat.cpp:342
CurvesGraphs::iterateThroughCurvesPoints
void iterateThroughCurvesPoints(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
Apply functor to Points on all of the Curves.
Definition: CurvesGraphs.cpp:152
DocumentModelCoords::loadXml
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
Definition: DocumentModelCoords.cpp:129
DOCUMENT_SERIALIZE_GRID_REMOVAL
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL
CurveStyles::curveStyle
CurveStyle curveStyle(const QString &curveName) const
CurveStyle in specified curve.
Definition: CurveStyles.cpp:78
DocumentModelDigitizeCurve::printStream
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
Definition: DocumentModelDigitizeCurve.cpp:111
CallbackRemovePointsInCurvesGraphs::callback
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
Definition: CallbackRemovePointsInCurvesGraphs.cpp:17
AXIS_CURVE_NAME
const QString AXIS_CURVE_NAME
CurvesGraphs::iterateThroughCurveSegments
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.
Definition: CurvesGraphs.cpp:134
DocumentModelAxesChecker::saveXml
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
Definition: DocumentModelAxesChecker.cpp:111
DocumentModelAxesChecker::loadXml
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
Definition: DocumentModelAxesChecker.cpp:67
DocumentModelCoords::setCoordScaleXTheta
void setCoordScaleXTheta(CoordScale coordScale)
Set method for linear/log scale on x/theta.
Definition: DocumentModelCoords.cpp:226
DOCUMENT_SERIALIZE_CURVE
const QString DOCUMENT_SERIALIZE_CURVE
DocumentModelGridRemoval::setRemoveDefinedGridLines
void setRemoveDefinedGridLines(bool removeDefinedGridLines)
Set method for removing defined grid lines.
Definition: DocumentModelGridRemoval.cpp:274
CallbackAddPointsInCurvesGraphs
Callback that is used when iterating through a read-only CurvesGraphs to add corresponding points in ...
Definition: CallbackAddPointsInCurvesGraphs.h:16
DocumentModelGeneral::loadXml
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
Definition: DocumentModelGeneral.cpp:65
DocumentModelSegments::setLineColor
void setLineColor(ColorPalette lineColor)
Set method for line color.
Definition: DocumentModelSegments.cpp:139
Curve::setColorFilterSettings
void setColorFilterSettings(const ColorFilterSettings &colorFilterSettings)
Set color filter.
Definition: Curve.cpp:546
DocumentModelGridDisplay::setStepY
void setStepY(double yStep)
Set method for y grid line increment.
Definition: DocumentModelGridDisplay.cpp:252
Curve::setCurveStyle
void setCurveStyle(const CurveStyle &curveStyle)
Set curve style.
Definition: Curve.cpp:563
PointStyle::defaultGraphCurve
static PointStyle defaultGraphCurve(int index)
Initial default for index'th graph curve.
Definition: PointStyle.cpp:88
Curve::removePoint
void removePoint(const QString &identifier)
Perform the opposite of addPointAtEnd.
Definition: Curve.cpp:510
DocumentModelGridRemoval::setStartY
void setStartY(double startY)
Set method for y start.
Definition: DocumentModelGridRemoval.cpp:294
SettingsForGraph
Manage storage and retrieval of the settings for the curves.
Definition: SettingsForGraph.h:12
SettingsForGraph::defaultCurveName
QString defaultCurveName(int indexOneBased, const QString &defaultName) const
Default graph name for the specified curve index.
Definition: SettingsForGraph.cpp:16
CurvesGraphs::editPointGraph
void editPointGraph(bool isX, bool isY, double x, double y, const QStringList &identifiers, const Transformation &transformation)
Set the x and/or y coordinate values of the specified points.
Definition: CurvesGraphs.cpp:96
DocumentModelCoords::printStream
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
Definition: DocumentModelCoords.cpp:180
CoordSystem::modelSegments
virtual DocumentModelSegments modelSegments() const
Get method for DocumentModelSegments.
Definition: CoordSystem.cpp:735
DOCUMENT_SERIALIZE_GRID_DISPLAY
const QString DOCUMENT_SERIALIZE_GRID_DISPLAY
DocumentModelGeneral::printStream
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
Definition: DocumentModelGeneral.cpp:96
DocumentModelDigitizeCurve::saveXml
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
Definition: DocumentModelDigitizeCurve.cpp:124
DOCUMENT_SERIALIZE_AXES_CHECKER
const QString DOCUMENT_SERIALIZE_AXES_CHECKER
DocumentModelPointMatch::printStream
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
Definition: DocumentModelPointMatch.cpp:110
DocumentModelGridDisplay::loadXml
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
Definition: DocumentModelGridDisplay.cpp:105
CurvesGraphs::loadXml
void loadXml(QXmlStreamReader &reader)
Load from serialized xml post-version 5 file.
Definition: CurvesGraphs.cpp:197
DocumentModelGridDisplay::printStream
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
Definition: DocumentModelGridDisplay.cpp:163
COORDS_TYPE_POLAR
Definition: CoordsType.h:16
CoordSystem::modelAxesChecker
virtual DocumentModelAxesChecker modelAxesChecker() const
Get method for DocumentModelAxesChecker.
Definition: CoordSystem.cpp:679
Curve::positionScreen
QPointF positionScreen(const QString &pointIdentifier) const
Return the position, in screen coordinates, of the specified Point.
Definition: Curve.cpp:473
DocumentModelExportFormat::setXLabel
void setXLabel(const QString &xLabel)
Set method for x label.
Definition: DocumentModelExportFormat.cpp:397
DocumentModelDigitizeCurve::loadXml
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
Definition: DocumentModelDigitizeCurve.cpp:74
DocumentModelExportFormat::setPointsSelectionRelations
void setPointsSelectionRelations(ExportPointsSelectionRelations exportPointsSelectionRelations)
Set method for point selection for relations.
Definition: DocumentModelExportFormat.cpp:392
DocumentModelCoords::setCoordScaleYRadius
void setCoordScaleYRadius(CoordScale coordScale)
Set method for linear/log scale on y/radius.
Definition: DocumentModelCoords.cpp:231
DOCUMENT_AXES_POINTS_REQUIRED_2
Definition: DocumentAxesPointsRequired.h:15
CurveStyles::curveNames
QStringList curveNames() const
List of all curve names.
Definition: CurveStyles.cpp:66
DocumentModelGridDisplay::setStable
void setStable(bool stable)
Set method for stable flag.
Definition: DocumentModelGridDisplay.cpp:232
DOCUMENT_SERIALIZE_DOCUMENT
const QString DOCUMENT_SERIALIZE_DOCUMENT
DocumentModelCoords::setOriginRadius
void setOriginRadius(double originRadius)
Set method for origin radius in polar mode.
Definition: DocumentModelCoords.cpp:271
DocumentModelGridDisplay::setStartX
void setStartX(double startX)
Set method for x grid line lower bound (inclusive).
Definition: DocumentModelGridDisplay.cpp:237
ColorFilterSettings
Color filter parameters for one curve. For a class, this is handled the same as LineStyle and PointSt...
Definition: ColorFilterSettings.h:18
Curve
Container for one set of digitized Points.
Definition: Curve.h:32
COLOR_PALETTE_BLUE
Definition: ColorPalette.h:16
DOCUMENT_SERIALIZE_COMMON
const QString DOCUMENT_SERIALIZE_COMMON
CoordSystem::curvesGraphs
virtual const CurvesGraphs & curvesGraphs() const
Make all Curves available, read only, for CmdAbstract classes only.
Definition: CoordSystem.cpp:262
DocumentModelGridDisplay::setStepX
void setStepX(double stepX)
Set method for x grid line increment.
Definition: DocumentModelGridDisplay.cpp:247
DocumentModelSegments::loadXml
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
Definition: DocumentModelSegments.cpp:73
DocumentModelColorFilter
Model for DlgSettingsColorFilter and CmdSettingsColorFilter.
Definition: DocumentModelColorFilter.h:20
DocumentModelExportFormat::printStream
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
Definition: DocumentModelExportFormat.cpp:263
DocumentModelGridRemoval::setStable
void setStable()
Set the stable flag to true. This public version has no argument since it cannot be undone.
Definition: DocumentModelGridRemoval.cpp:279
CoordSystem::printStream
virtual void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
Definition: CoordSystem.cpp:793
CurvesGraphs::printStream
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
Definition: CurvesGraphs.cpp:246
CallbackRemovePointsInCurvesGraphs
Callback that is used when iterating through a read-only CurvesGraphs to remove corresponding points ...
Definition: CallbackRemovePointsInCurvesGraphs.h:16
DocumentModelGridRemoval::setCloseDistance
void setCloseDistance(double closeDistance)
Set method for close distance.
Definition: DocumentModelGridRemoval.cpp:249
DocumentModelPointMatch::setMaxPointSize
void setMaxPointSize(double maxPointSize)
Set method for max point size.
Definition: DocumentModelPointMatch.cpp:139
CurvesGraphs::removePoint
void removePoint(const QString &pointIdentifier)
Remove the Point from its Curve.
Definition: CurvesGraphs.cpp:262
DocumentModelCoords::saveXml
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
Definition: DocumentModelCoords.cpp:199
DocumentModelGridDisplay::setDisableX
void setDisableX(GridCoordDisable disableX)
Set method for x grid line disabled variable.
Definition: DocumentModelGridDisplay.cpp:217
Curve::editPointAxis
void editPointAxis(const QPointF &posGraph, const QString &identifier)
Edit the graph coordinates of an axis point. This method does not apply to a graph point.
Definition: Curve.cpp:154
DocumentModelGridRemoval::printStream
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
Definition: DocumentModelGridRemoval.cpp:194
CurveStyle
Container for LineStyle and PointStyle for one Curve.
Definition: CurveStyle.h:17
DocumentModelExportFormat::setPointsIntervalUnitsFunctions
void setPointsIntervalUnitsFunctions(ExportPointsIntervalUnits pointsIntervalUnitsFunctions)
Set method for points interval units for functions.
Definition: DocumentModelExportFormat.cpp:377
DocumentModelExportFormat::loadXml
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
Definition: DocumentModelExportFormat.cpp:139
DocumentModelGridRemoval::loadXml
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
Definition: DocumentModelGridRemoval.cpp:138
DEFAULT_GRAPH_CURVE_NAME
const QString DEFAULT_GRAPH_CURVE_NAME
Curve::setCurveName
void setCurveName(const QString &curveName)
Change the curve name.
Definition: Curve.cpp:551
COORD_UNITS_NON_POLAR_THETA_NUMBER
Definition: CoordUnitsNonPolarTheta.h:17
ENGAUGE_CHECK_PTR
#define ENGAUGE_CHECK_PTR(ptr)
#endif
Definition: EngaugeAssert.h:26
CoordSystem::modelPointMatch
virtual DocumentModelPointMatch modelPointMatch() const
Get method for DocumentModelPointMatch.
Definition: CoordSystem.cpp:730
DocumentModelSegments::setMinLength
void setMinLength(double minLength)
Set method for min length.
Definition: DocumentModelSegments.cpp:149
Curve::movePoint
void movePoint(const QString &pointIdentifier, const QPointF &deltaScreen)
Translate the position of a point by the specified distance vector.
Definition: Curve.cpp:423
DocumentModelGridDisplay::setStartY
void setStartY(double yStart)
Set method for y grid line lower bound (inclusive).
Definition: DocumentModelGridDisplay.cpp:242
CallbackNextOrdinal::callback
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
Definition: CallbackNextOrdinal.cpp:18
DocumentModelCoords::setCoordUnitsTheta
void setCoordUnitsTheta(CoordUnitsPolarTheta coordUnits)
Set method for theta units.
Definition: DocumentModelCoords.cpp:251
COORDS_TYPE_CARTESIAN
Definition: CoordsType.h:15
ColorFilterSettings::defaultFilter
static ColorFilterSettings defaultFilter()
Initial default for any Curve.
Definition: ColorFilterSettings.cpp:128
DOCUMENT_SERIALIZE_IMAGE
const QString DOCUMENT_SERIALIZE_IMAGE
CoordSystem::modelExport
virtual DocumentModelExportFormat modelExport() const
Get method for DocumentModelExportFormat.
Definition: CoordSystem.cpp:710
Curve::numPoints
int numPoints() const
Number of points.
Definition: Curve.cpp:432
Curve::iterateThroughCurveSegments
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.
Definition: Curve.cpp:316
CoordSystem::curveForCurveName
virtual Curve * curveForCurveName(const QString &curveName)
See CurvesGraphs::curveForCurveName, although this also works for AXIS_CURVE_NAME.
Definition: CoordSystem.cpp:236
LOG4CPP_INFO_S
#define LOG4CPP_INFO_S(logger)
Definition: convenience.h:18
CurvesGraphs::curvesGraphsNames
QStringList curvesGraphsNames() const
List of graph curve names.
Definition: CurvesGraphs.cpp:67
Curve::printStream
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
Definition: Curve.cpp:490
LineStyle::defaultAxesCurve
static LineStyle defaultAxesCurve()
Initial default for axes curve.
Definition: LineStyle.cpp:68
CoordSystem::isXOnly
bool isXOnly(const QString &pointIdentifier) const
Return true if y coordinate is undefined, otherwise x coordinae is undefined in DOCUMENT_AXES_POINT_R...
Definition: CoordSystem.cpp:336
DocumentModelPointMatch::setPaletteColorCandidate
void setPaletteColorCandidate(ColorPalette paletteColorCandidate)
Set method for candidate color.
Definition: DocumentModelPointMatch.cpp:149
Curve::addPoint
void addPoint(const Point &point)
Add Point to this Curve.
Definition: Curve.cpp:134
DOCUMENT_SERIALIZE_GENERAL
const QString DOCUMENT_SERIALIZE_GENERAL
DocumentModelGridRemoval::setStepY
void setStepY(double stepY)
Set method for y step.
Definition: DocumentModelGridRemoval.cpp:304
CurvesGraphs::curvesGraphsNumPoints
int curvesGraphsNumPoints(const QString &curveName) const
Point count.
Definition: CurvesGraphs.cpp:81
CoordSystem::modelDigitizeCurve
virtual DocumentModelDigitizeCurve modelDigitizeCurve() const
Get method for DocumentModelDigitizeCurve.
Definition: CoordSystem.cpp:705
CoordSystem::modelCoords
virtual DocumentModelCoords modelCoords() const
Get method for DocumentModelCoords.
Definition: CoordSystem.cpp:692
CoordSystem::modelCurveStyles
virtual CurveStyles modelCurveStyles() const
Get method for CurveStyles.
Definition: CoordSystem.cpp:697
DocumentModelCoords::setCoordUnitsRadius
void setCoordUnitsRadius(CoordUnitsNonPolarTheta coordUnits)
Set method for radius units.
Definition: DocumentModelCoords.cpp:246
DocumentModelGridDisplay::setStopX
void setStopX(double stopX)
Set method for x grid line upper bound (inclusive).
Definition: DocumentModelGridDisplay.cpp:257
DocumentModelGridRemoval::saveXml
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
Definition: DocumentModelGridRemoval.cpp:221
CoordSystem::curveAxes
virtual const Curve & curveAxes() const
Get method for axis curve.
Definition: CoordSystem.cpp:229
CurvesGraphs::loadPreVersion6
void loadPreVersion6(QDataStream &str)
Load from serialized binary pre-version 6 file.
Definition: CurvesGraphs.cpp:172
CurvesGraphs::addPoint
void addPoint(const Point &point)
Append new Point to the specified Curve.
Definition: CurvesGraphs.cpp:29
DocumentModelCoords::setCoordsType
void setCoordsType(CoordsType coordsType)
Set method for coordinates type.
Definition: DocumentModelCoords.cpp:236
mainCat
log4cpp::Category * mainCat
Definition: Logger.cpp:14
DocumentModelExportFormat::setPointsSelectionFunctions
void setPointsSelectionFunctions(ExportPointsSelectionFunctions exportPointsSelectionFunctions)
Set method for point selection for functions.
Definition: DocumentModelExportFormat.cpp:387
DocumentModelSegments::setLineWidth
void setLineWidth(double lineWidth)
Set method for line width.
Definition: DocumentModelSegments.cpp:144
DocumentModelExportFormat::setHeader
void setHeader(ExportHeader exportHeader)
Set method for header.
Definition: DocumentModelExportFormat.cpp:352
DocumentModelExportFormat::setLayoutFunctions
void setLayoutFunctions(ExportLayoutFunctions exportLayoutFunctions)
Set method for functions layout.
Definition: DocumentModelExportFormat.cpp:357
CoordSystem::selectedCurveName
virtual QString selectedCurveName() const
Currently selected curve name. This is used to set the selected curve combobox in MainWindow.
Definition: CoordSystem.cpp:889
DocumentModelGridRemoval::setStepX
void setStepX(double stepX)
Set method for x step.
Definition: DocumentModelGridRemoval.cpp:299
Curve::isXOnly
bool isXOnly(const QString &pointIdentifier) const
Determine if specified point has just x coordinate. Otherwise has just y coordinate,...
Definition: Curve.cpp:285
PointStyle::defaultAxesCurve
static PointStyle defaultAxesCurve()
Initial default for axes curve.
Definition: PointStyle.cpp:67
DocumentModelSegments::printStream
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
Definition: DocumentModelSegments.cpp:104
DOCUMENT_SERIALIZE_COORDS
const QString DOCUMENT_SERIALIZE_COORDS
DocumentModelGridDisplay::setStopY
void setStopY(double yStop)
Set method for y grid line upper bound (inclusive).
Definition: DocumentModelGridDisplay.cpp:262
CurvesGraphs::curveForCurveName
Curve * curveForCurveName(const QString &curveName)
Return the axis or graph curve for the specified curve name.
Definition: CurvesGraphs.cpp:37
INDENTATION_DELTA
const QString INDENTATION_DELTA
Point
Class that represents one digitized point. The screen-to-graph coordinate transformation is always ex...
Definition: Point.h:24
CurvesGraphs::numCurves
int numCurves() const
Current number of graphs curves.
Definition: CurvesGraphs.cpp:241
DOCUMENT_SERIALIZE_CURVES_GRAPHS
const QString DOCUMENT_SERIALIZE_CURVES_GRAPHS
CurvesGraphs::updatePointOrdinals
void updatePointOrdinals(const Transformation &transformation)
Update point ordinals to be consistent with their CurveStyle and x/theta coordinate.
Definition: CurvesGraphs.cpp:286
DOCUMENT_AXES_POINTS_REQUIRED_3
Definition: DocumentAxesPointsRequired.h:13
CurvesGraphs::addGraphCurveAtEnd
void addGraphCurveAtEnd(const Curve &curve)
Append new graph Curve to end of Curve list.
Definition: CurvesGraphs.cpp:24
Curve::positionGraph
QPointF positionGraph(const QString &pointIdentifier) const
Return the position, in graph coordinates, of the specified Point.
Definition: Curve.cpp:456
CoordSystem::modelColorFilter
virtual DocumentModelColorFilter modelColorFilter() const
Get method for DocumentModelColorFilter.
Definition: CoordSystem.cpp:684
DocumentModelSegments::setPointSeparation
void setPointSeparation(double pointSeparation)
Set method for point separation.
Definition: DocumentModelSegments.cpp:154
DocumentModelGridDisplay::saveXml
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
Definition: DocumentModelGridDisplay.cpp:184
DocumentModelGridRemoval::setCountX
void setCountX(int countX)
Set method for x count.
Definition: DocumentModelGridRemoval.cpp:254
DocumentModelGridRemoval::setCountY
void setCountY(int countY)
Set method for y count.
Definition: DocumentModelGridRemoval.cpp:259
CallbackCheckEditPointAxis
Callback for sanity checking the screen and graph coordinates of an axis point that is in the axes cu...
Definition: CallbackCheckEditPointAxis.h:17
DocumentModelGridDisplay::setDisableY
void setDisableY(GridCoordDisable disableY)
Set method for y grid line disabled variable.
Definition: DocumentModelGridDisplay.cpp:222
CurveStyles
Model for DlgSettingsCurveProperties and CmdSettingsCurveProperties.
Definition: CurveStyles.h:21
DocumentModelGridRemoval::setStopX
void setStopX(double stopX)
Set method for x stop.
Definition: DocumentModelGridRemoval.cpp:309
CallbackAxisPointsAbstract::callback
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
Definition: CallbackAxisPointsAbstract.cpp:78
DOCUMENT_SERIALIZE_SEGMENTS
const QString DOCUMENT_SERIALIZE_SEGMENTS
DOCUMENT_SERIALIZE_DIGITIZE_CURVE
const QString DOCUMENT_SERIALIZE_DIGITIZE_CURVE
CoordSystem::modelGridRemoval
virtual DocumentModelGridRemoval modelGridRemoval() const
Get method for DocumentModelGridRemoval.
Definition: CoordSystem.cpp:725
DocumentModelCoords::coordsType
CoordsType coordsType() const
Get method for coordinates type.
Definition: DocumentModelCoords.cpp:94
DocumentModelExportFormat::setPointsIntervalUnitsRelations
void setPointsIntervalUnitsRelations(ExportPointsIntervalUnits pointsIntervalUnitsRelations)
Set method for points interval units for relations.
Definition: DocumentModelExportFormat.cpp:382
QPointFToString
QString QPointFToString(const QPointF &pos)
Definition: QtToString.cpp:17
DocumentModelGridRemoval::setGridCoordDisableY
void setGridCoordDisableY(GridCoordDisable gridCoordDisable)
Set method for y coord parameter to disable.
Definition: DocumentModelGridRemoval.cpp:269
DocumentModelGridRemoval::setStopY
void setStopY(double stopY)
Set method for y stop.
Definition: DocumentModelGridRemoval.cpp:314
DocumentModelSegments::saveXml
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
Definition: DocumentModelSegments.cpp:118
DocumentModelGridDisplay::setCountX
void setCountX(unsigned int countX)
Set method for x grid line count.
Definition: DocumentModelGridDisplay.cpp:207
loadNextFromReader
QXmlStreamReader::TokenType loadNextFromReader(QXmlStreamReader &reader)
Load next token from xml reader.
Definition: Xml.cpp:14
DocumentModelColorFilter::colorFilterSettingsList
const ColorFilterSettingsList & colorFilterSettingsList() const
Get method for copying all color filters in one step.
Definition: DocumentModelColorFilter.cpp:77
DocumentModelGridDisplay::setCountY
void setCountY(unsigned int countY)
Set method for y grid line count.
Definition: DocumentModelGridDisplay.cpp:212
ENGAUGE_ASSERT
#define ENGAUGE_ASSERT(cond)
Drop in replacement for Q_ASSERT if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS) define ENGAUGE...
Definition: EngaugeAssert.h:19
CallbackAddPointsInCurvesGraphs::callback
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
Definition: CallbackAddPointsInCurvesGraphs.cpp:17
DocumentModelPointMatch::setPaletteColorAccepted
void setPaletteColorAccepted(ColorPalette paletteColorAccepted)
Set method for accepted color.
Definition: DocumentModelPointMatch.cpp:144
SettingsForGraph::numberOfCurvesForImport
int numberOfCurvesForImport() const
Return the number of curve names to be generated. Value is maximum of 1 and the number in the configu...
Definition: SettingsForGraph.cpp:43
CallbackCheckAddPointAxis
Callback for sanity checking the screen and graph coordinates of an axis point, before it is added to...
Definition: CallbackCheckAddPointAxis.h:17
DocumentModelAxesChecker::printStream
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
Definition: DocumentModelAxesChecker.cpp:99
EXPORT_POINTS_SELECTION_RELATIONS_RAW
Definition: ExportPointsSelectionRelations.h:16
DocumentModelPointMatch::setPaletteColorRejected
void setPaletteColorRejected(ColorPalette paletteColorRejected)
Set method for rejected color.
Definition: DocumentModelPointMatch.cpp:154
Point::curveNameFromPointIdentifier
static QString curveNameFromPointIdentifier(const QString &pointIdentifier)
Parse the curve name from the specified point identifier. This does the opposite of uniqueIdentifierG...
Definition: Point.cpp:227
DocumentModelGridRemoval::setGridCoordDisableX
void setGridCoordDisableX(GridCoordDisable gridCoordDisable)
Set method for x coord parameter to disable.
Definition: DocumentModelGridRemoval.cpp:264
DocumentModelPointMatch::saveXml
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
Definition: DocumentModelPointMatch.cpp:124
Curve::saveXml
void saveXml(QXmlStreamWriter &writer) const
Serialize curve.
Definition: Curve.cpp:523
CallbackNextOrdinal
Callback for computing the next ordinal for a new point.
Definition: CallbackNextOrdinal.h:16