Engauge Digitizer 2
Loading...
Searching...
No Matches
CoordSystemContext.cpp
1/******************************************************************************************************
2 * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5 ******************************************************************************************************/
6
7#include "CoordSystemContext.h"
8#include "EngaugeAssert.h"
9#include "Logger.h"
10
11const CoordSystemIndex DEFAULT_COORD_SYSTEM_INDEX = 0;
12
14 m_coordSystemIndex (DEFAULT_COORD_SYSTEM_INDEX)
15{
16 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::CoordSystemContext";
17}
18
19CoordSystemContext::~CoordSystemContext()
20{
21 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::~CoordSystemContext";
22
23 for (int i = 0; i < m_coordSystems.count(); i++) {
24 CoordSystem *coordSystem = m_coordSystems.at (i);
25 delete coordSystem;
26 }
27
28 m_coordSystems.clear ();
29 m_coordSystemIndex = 0;
30}
31
32void CoordSystemContext::addCoordSystems(DocumentAxesPointsRequired documentAxesPointsRequired,
33 unsigned int numberCoordSystemToAdd)
34{
35 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::addCoordSystems"
36 << " numberToAdd=" << numberCoordSystemToAdd;
37
38 // The CoordSystem vector is populated with defaults here
39 for (unsigned int i = 0; i < numberCoordSystemToAdd; i++) {
40 m_coordSystems.push_back (new CoordSystem (documentAxesPointsRequired));
41 }
42}
43
44void CoordSystemContext::addGraphCurveAtEnd (const QString &curveName)
45{
46 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::addGraphCurveAtEnd";
47
48 m_coordSystems [m_coordSystemIndex]->addGraphCurveAtEnd(curveName);
49}
50
52 const QPointF &posGraph,
53 QString &identifier,
54 double ordinal,
55 bool isXOnly)
56{
57 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::addPointAxisWithGeneratedIdentifier";
58
59 m_coordSystems [m_coordSystemIndex]->addPointAxisWithGeneratedIdentifier(posScreen,
60 posGraph,
61 identifier,
62 ordinal,
63 isXOnly);
64}
65
67 const QPointF &posGraph,
68 const QString &identifier,
69 double ordinal,
70 bool isXOnly)
71{
72 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::addPointAxisWithSpecifiedIdentifier";
73
74 m_coordSystems [m_coordSystemIndex]->addPointAxisWithSpecifiedIdentifier(posScreen,
75 posGraph,
76 identifier,
77 ordinal,
78 isXOnly);
79}
80
82 const QPointF &posScreen,
83 QString &generatedIdentifier,
84 double ordinal)
85{
86 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::addPointGraphWithGeneratedIdentifier";
87
88 m_coordSystems [m_coordSystemIndex]->addPointGraphWithGeneratedIdentifier(curveName,
89 posScreen,
90 generatedIdentifier,
91 ordinal);
92}
93
95 const QPointF &posScreen,
96 const QString &identifier,
97 double ordinal)
98{
99 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::addPointGraphWithSpecifiedIdentifier";
100
101 m_coordSystems [m_coordSystemIndex]->addPointGraphWithSpecifiedIdentifier(curveName,
102 posScreen,
103 identifier,
104 ordinal);
105}
106
108{
109 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::addPointsInCurvesGraphs";
110
111 m_coordSystems [m_coordSystemIndex]->addPointsInCurvesGraphs(curvesGraphs);
112}
113
114void CoordSystemContext::checkAddPointAxis (const QPointF &posScreen,
115 const QPointF &posGraph,
116 bool &isError,
117 QString &errorMessage,
118 bool isXOnly)
119{
120 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::checkAddPointAxis";
121
122 m_coordSystems [m_coordSystemIndex]->checkAddPointAxis(posScreen,
123 posGraph,
124 isError,
125 errorMessage,
126 isXOnly);
127}
128
129void CoordSystemContext::checkEditPointAxis (const QString &pointIdentifier,
130 const QPointF &posScreen,
131 const QPointF &posGraph,
132 bool &isError,
133 QString &errorMessage)
134{
135 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::checkEditPointAxis";
136
137 m_coordSystems [m_coordSystemIndex]->checkEditPointAxis(pointIdentifier,
138 posScreen,
139 posGraph,
140 isError,
141 errorMessage);
142}
143
145{
146 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::coordSystem";
147
148 return *(m_coordSystems [m_coordSystemIndex]);
149}
150
152{
153 return m_coordSystems.count();
154}
155
157{
158 return m_coordSystemIndex;
159}
160
162{
163 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::curveAxes";
164
165 return m_coordSystems [m_coordSystemIndex]->curveAxes();
166}
167
169{
170 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::curveForCurveName";
171
172 return m_coordSystems [m_coordSystemIndex]->curveForCurveName(curveName);
173}
174
175const Curve *CoordSystemContext::curveForCurveName (const QString &curveName) const
176{
177 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::curveForCurveName";
178
179 return m_coordSystems [m_coordSystemIndex]->curveForCurveName(curveName);
180}
181
183{
184 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::curvesGraphs";
185
186 return m_coordSystems [m_coordSystemIndex]->curvesGraphs();
187}
188
190{
191 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::curvesGraphsNames";
192
193 return m_coordSystems [m_coordSystemIndex]->curvesGraphsNames();
194}
195
196int CoordSystemContext::curvesGraphsNumPoints (const QString &curveName) const
197{
198 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::curvesGraphsNumPoints";
199
200 return m_coordSystems [m_coordSystemIndex]->curvesGraphsNumPoints(curveName);
201}
202
203void CoordSystemContext::editPointAxis (const QPointF &posGraph,
204 const QString &identifier)
205{
206 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::editPointAxis";
207
208 m_coordSystems [m_coordSystemIndex]->editPointAxis(posGraph,
209 identifier);
210}
211
212bool CoordSystemContext::isXOnly (const QString &pointIdentifier) const
213{
214 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::isXOnly";
215
216 return m_coordSystems [m_coordSystemIndex]->isXOnly (pointIdentifier);
217}
218
219void CoordSystemContext::iterateThroughCurvePointsAxes (const Functor2wRet<const QString &, const Point &, CallbackSearchReturn> &ftorWithCallback)
220{
221 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::iterateThroughCurvePointsAxes";
222
223 m_coordSystems [m_coordSystemIndex]->iterateThroughCurvePointsAxes(ftorWithCallback);
224}
225
226void CoordSystemContext::iterateThroughCurvePointsAxes (const Functor2wRet<const QString &, const Point &, CallbackSearchReturn> &ftorWithCallback) const
227{
228 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::iterateThroughCurvePointsAxes";
229
230 m_coordSystems [m_coordSystemIndex]->iterateThroughCurvePointsAxes(ftorWithCallback);
231}
232
234 const Functor2wRet<const Point &, const Point &, CallbackSearchReturn> &ftorWithCallback) const
235{
236 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::iterateThroughCurveSegments";
237
238 m_coordSystems [m_coordSystemIndex]->iterateThroughCurveSegments(curveName,
239 ftorWithCallback);
240}
241
242void CoordSystemContext::iterateThroughCurvesPointsGraphs (const Functor2wRet<const QString &, const Point &, CallbackSearchReturn> &ftorWithCallback)
243{
244 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::iterateThroughCurvesPointsGraphs";
245
246 m_coordSystems [m_coordSystemIndex]->iterateThroughCurvesPointsGraphs(ftorWithCallback);
247}
248
249void CoordSystemContext::iterateThroughCurvesPointsGraphs (const Functor2wRet<const QString &, const Point &, CallbackSearchReturn> &ftorWithCallback) const
250{
251 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::iterateThroughCurvesPointsGraphs";
252
253 m_coordSystems [m_coordSystemIndex]->iterateThroughCurvesPointsGraphs(ftorWithCallback);
254}
255
256bool CoordSystemContext::loadCurvesFile (const QString &curvesFile)
257{
258 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::loadCurvesFile";
259
260 return m_coordSystems [m_coordSystemIndex]->loadCurvesFile (curvesFile);
261}
262
264 double version)
265{
266 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::loadPreVersion6";
267
268 m_coordSystems [m_coordSystemIndex]->loadPreVersion6 (str,
269 version);
270}
271
272void CoordSystemContext::loadVersion6 (QXmlStreamReader &reader)
273{
274 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::loadVersion6";
275
276 m_coordSystems [m_coordSystemIndex]->loadVersion6 (reader);
277}
278
279void CoordSystemContext::loadVersion7 (QXmlStreamReader &reader,
280 DocumentAxesPointsRequired documentAxesPointsRequired)
281{
282 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::loadVersion7";
283
284 int indexLast = m_coordSystems.count() - 1;
285 m_coordSystems [indexLast]->loadVersion7 (reader,
286 documentAxesPointsRequired);
287}
288
290{
291 LOG4CPP_DEBUG_S ((*mainCat)) << "CoordSystemContext::modelAxesChecker";
292
293 return m_coordSystems [m_coordSystemIndex]->modelAxesChecker();
294}
295
297{
298 LOG4CPP_DEBUG_S ((*mainCat)) << "CoordSystemContext::modelColorFilter";
299
300 return m_coordSystems [m_coordSystemIndex]->modelColorFilter();
301}
302
304{
305 LOG4CPP_DEBUG_S ((*mainCat)) << "CoordSystemContext::modelCoords";
306
307 return m_coordSystems [m_coordSystemIndex]->modelCoords();
308}
309
311{
312 LOG4CPP_DEBUG_S ((*mainCat)) << "CoordSystemContext::modelCurveStyles";
313
314 return m_coordSystems [m_coordSystemIndex]->modelCurveStyles();
315}
316
318{
319 LOG4CPP_DEBUG_S ((*mainCat)) << "CoordSystemContext::modelDigitizeCurve";
320
321 return m_coordSystems [m_coordSystemIndex]->modelDigitizeCurve();
322}
323
325{
326 LOG4CPP_DEBUG_S ((*mainCat)) << "CoordSystemContext::modelExport";
327
328 return m_coordSystems [m_coordSystemIndex]->modelExport();
329}
330
332{
333 LOG4CPP_DEBUG_S ((*mainCat)) << "CoordSystemContext::modelGeneral";
334
335 return m_coordSystems [m_coordSystemIndex]->modelGeneral();
336}
337
339{
340 LOG4CPP_DEBUG_S ((*mainCat)) << "CoordSystemContext::modelGridRemoval";
341
342 return m_coordSystems [m_coordSystemIndex]->modelGridRemoval();
343}
344
346{
347 LOG4CPP_DEBUG_S ((*mainCat)) << "CoordSystemContext::modelPointMatch";
348
349 return m_coordSystems [m_coordSystemIndex]->modelPointMatch();
350}
351
353{
354 LOG4CPP_DEBUG_S ((*mainCat)) << "CoordSystemContext::modelSegments";
355
356 return m_coordSystems [m_coordSystemIndex]->modelSegments();
357}
358
359void CoordSystemContext::movePoint (const QString &pointIdentifier,
360 const QPointF &deltaScreen)
361{
362 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::movePoint";
363
364 return m_coordSystems [m_coordSystemIndex]->movePoint(pointIdentifier,
365 deltaScreen);
366}
367
368int CoordSystemContext::nextOrdinalForCurve (const QString &curveName) const
369{
370 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::nextOrdinalForCurve";
371
372 return m_coordSystems [m_coordSystemIndex]->nextOrdinalForCurve(curveName);
373}
374
375QPointF CoordSystemContext::positionGraph (const QString &pointIdentifier) const
376{
377 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::positionGraph";
378
379 return m_coordSystems [m_coordSystemIndex]->positionGraph(pointIdentifier);
380}
381
382QPointF CoordSystemContext::positionScreen (const QString &pointIdentifier) const
383{
384 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::addGraphCurveAtEnd";
385
386 return m_coordSystems [m_coordSystemIndex]->positionScreen(pointIdentifier);
387}
388
390{
391 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::print";
392
393 return m_coordSystems [m_coordSystemIndex]->print();
394}
395
396void CoordSystemContext::printStream (QString indentation,
397 QTextStream &str) const
398{
399 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::printStream";
400
401 m_coordSystems [m_coordSystemIndex]->printStream(indentation,
402 str);
403}
404
406{
407 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::reasonForUnsuccessfulRead";
408
409 return m_coordSystems [m_coordSystemIndex]->reasonForUnsuccessfulRead();
410}
411
412void CoordSystemContext::removePointAxis (const QString &identifier)
413{
414 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::removePointAxis";
415
416 m_coordSystems [m_coordSystemIndex]->removePointAxis(identifier);
417}
418
419void CoordSystemContext::removePointGraph (const QString &identifier)
420{
421 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::removePointGraph";
422
423 m_coordSystems [m_coordSystemIndex]->removePointGraph(identifier);
424}
425
427{
428 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::removePointsInCurvesGraphs";
429
430 m_coordSystems [m_coordSystemIndex]->removePointsInCurvesGraphs(curvesGraphs);
431}
432
433void CoordSystemContext::saveXml (QXmlStreamWriter &writer) const
434{
435 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::saveXml";
436
437 for (int index = 0; index < m_coordSystems.count(); index++) {
438 m_coordSystems [index]->saveXml (writer);
439 }
440}
441
442void CoordSystemContext::setCoordSystemIndex(CoordSystemIndex coordSystemIndex)
443{
444 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::setCoordSystemIndex"
445 << " index=" << coordSystemIndex;
446
447 ENGAUGE_ASSERT(coordSystemIndex < (unsigned int) m_coordSystems.count());
448
449 m_coordSystemIndex = coordSystemIndex;
450}
451
453{
454 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::setCurvesGraphs";
455
456 m_coordSystems [m_coordSystemIndex]->setCurvesGraphs(curvesGraphs);
457}
458
459void CoordSystemContext::setCurvesGraphs (CoordSystemIndex coordSystemIndex,
460 const CurvesGraphs &curvesGraphs)
461{
462 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::setCurvesGraphs";
463
464 m_coordSystems [coordSystemIndex]->setCurvesGraphs(curvesGraphs);
465}
466
468{
469 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::setModelAxesChecker";
470
471 m_coordSystems [m_coordSystemIndex]->setModelAxesChecker(modelAxesChecker);
472}
473
475{
476 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::setModelColorFilter";
477
478 m_coordSystems [m_coordSystemIndex]->setModelColorFilter(modelColorFilter);
479}
480
482{
483 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::setModelCoords";
484
485 m_coordSystems [m_coordSystemIndex]->setModelCoords(modelCoords);
486}
487
489{
490 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::setModelCurveStyles";
491
492 m_coordSystems [m_coordSystemIndex]->setModelCurveStyles(modelCurveStyles);
493}
494
496{
497 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::setModelDigitizeCurve";
498
499 m_coordSystems [m_coordSystemIndex]->setModelDigitizeCurve(modelDigitizeCurve);
500}
501
503{
504 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::setModelExport";
505
506 m_coordSystems [m_coordSystemIndex]->setModelExport (modelExport);
507}
508
510{
511 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::setModelGeneral";
512
513 m_coordSystems [m_coordSystemIndex]->setModelGeneral(modelGeneral);
514}
515
517{
518 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::setModelGridRemoval";
519
520 m_coordSystems [m_coordSystemIndex]->setModelGridRemoval(modelGridRemoval);
521}
522
524{
525 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::setModelPointMatch";
526
527 m_coordSystems [m_coordSystemIndex]->setModelPointMatch(modelPointMatch);
528}
529
531{
532 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::setModelSegments";
533
534 m_coordSystems [m_coordSystemIndex]->setModelSegments(modelSegments);
535}
536
538{
539 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::successfulRead";
540
541 return m_coordSystems [m_coordSystemIndex]->successfulRead();
542}
543
545{
546 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::updatePointOrdinals";
547
548 m_coordSystems [m_coordSystemIndex]->updatePointOrdinals(transformation);
549}
unsigned int coordSystemCount() const
Number of CoordSystem.
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...
virtual DocumentModelColorFilter modelColorFilter() const
Get method for DocumentModelColorFilter.
CoordSystemIndex coordSystemIndex() const
Index of current CoordSystem.
virtual void setModelCurveStyles(const CurveStyles &modelCurveStyles)
Set method for CurveStyles.
virtual CurveStyles modelCurveStyles() const
Get method for CurveStyles.
virtual void setModelAxesChecker(const DocumentModelAxesChecker &modelAxesChecker)
Set method for DocumentModelAxesChecker.
virtual void iterateThroughCurvePointsAxes(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
See Curve::iterateThroughCurvePoints, for the axes curve.
virtual const CurvesGraphs & curvesGraphs() const
Make all Curves available, read only, for CmdAbstract classes only.
void setCurvesGraphs(CoordSystemIndex coordSystemIndex, const CurvesGraphs &curvesGraphs)
Applies to current coordinate system.
const CoordSystem & coordSystem() const
Current CoordSystem.
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 editPointAxis(const QPointF &posGraph, const QString &identifier)
Edit the graph coordinates of a single axis point. Call this after checkAddPointAxis to guarantee suc...
void setModelPointMatch(const DocumentModelPointMatch &modelPointMatch)
Set method for DocumentModelPointMatch.
virtual void setModelGeneral(const DocumentModelGeneral &modelGeneral)
Set method for DocumentModelGeneral.
virtual void setModelColorFilter(const DocumentModelColorFilter &modelColorFilter)
Set method for DocumentModelColorFilter.
virtual const Curve & curveAxes() const
Get method for axis curve.
virtual void addPointsInCurvesGraphs(CurvesGraphs &curvesGraphs)
Add all points identified in the specified CurvesGraphs. See also removePointsInCurvesGraphs.
virtual void setModelCoords(const DocumentModelCoords &modelCoords)
Set method for DocumentModelCoords.
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.
CoordSystemContext()
Default constructor for constructing from opened file.
virtual DocumentModelAxesChecker modelAxesChecker() const
Get method for DocumentModelAxesChecker.
virtual void print() const
Debugging method for printing directly from symbolic debugger.
virtual int curvesGraphsNumPoints(const QString &curveName) const
See CurvesGraphs::curvesGraphsNumPoints.
void loadVersion6(QXmlStreamReader &reader)
Load from file in version 6 format, into the single CoordSystem.
virtual QPointF positionScreen(const QString &pointIdentifier) const
See Curve::positionScreen.
bool isXOnly(const QString &pointIdentifier) const
True/false if y/x value is empty.
virtual void setModelSegments(const DocumentModelSegments &modelSegments)
Set method for DocumentModelSegments.
virtual DocumentModelDigitizeCurve modelDigitizeCurve() const
Get method for DocumentModelDigitizeCurve.
virtual DocumentModelCoords modelCoords() const
Get method for DocumentModelCoords.
virtual Curve * curveForCurveName(const QString &curveName)
See CurvesGraphs::curveForCurveName, although this also works for AXIS_CURVE_NAME.
virtual int nextOrdinalForCurve(const QString &curveName) const
Default next ordinal value for specified curve.
virtual DocumentModelSegments modelSegments() const
Get method for DocumentModelSegments.
virtual DocumentModelExportFormat modelExport() const
Get method for DocumentModelExportFormat.
virtual void addGraphCurveAtEnd(const QString &curveName)
Add new graph curve to the list of existing graph curves.
virtual void movePoint(const QString &pointIdentifier, const QPointF &deltaScreen)
See Curve::movePoint.
virtual QString reasonForUnsuccessfulRead() const
Return an informative text message explaining why startup loading failed. Applies if successfulRead r...
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...
void loadVersion7(QXmlStreamReader &reader, DocumentAxesPointsRequired documentAxesPointsRequired)
Load one CoordSystem from file in version 7 format, into the most recent CoordSystem which was just c...
void addCoordSystems(DocumentAxesPointsRequired documentAxesPointsRequired, unsigned int numberCoordSystemToAdd)
Add specified number of coordinate systems to the original one created by the constructor.
virtual void saveXml(QXmlStreamWriter &writer) const
Save graph to xml.
virtual void setModelExport(const DocumentModelExportFormat &modelExport)
Set method for DocumentModelExportFormat.
virtual void removePointGraph(const QString &identifier)
Perform the opposite of addPointGraph.
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 void checkEditPointAxis(const QString &pointIdentifier, const QPointF &posScreen, const QPointF &posGraph, bool &isError, QString &errorMessage)
Check before calling editPointAxis.
void setCoordSystemIndex(CoordSystemIndex coordSystemIndex)
Index of current CoordSystem.
virtual bool successfulRead() const
Return true if startup loading succeeded. If the loading failed then reasonForUnsuccessfulRed will ex...
virtual DocumentModelGridRemoval modelGridRemoval() const
Get method for DocumentModelGridRemoval.
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 DocumentModelPointMatch modelPointMatch() const
Get method for DocumentModelPointMatch.
virtual QStringList curvesGraphsNames() const
See CurvesGraphs::curvesGraphsNames.
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 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 removePointsInCurvesGraphs(CurvesGraphs &curvesGraphs)
Remove all points identified in the specified CurvesGraphs. See also addPointsInCurvesGraphs.
virtual void removePointAxis(const QString &identifier)
Perform the opposite of addPointAxis.
virtual void iterateThroughCurvesPointsGraphs(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
See Curve::iterateThroughCurvePoints, for all the graphs curves.
void loadPreVersion6(QDataStream &str, double version)
Load from file in pre-version 6 format.
virtual void setModelGridRemoval(const DocumentModelGridRemoval &modelGridRemoval)
Set method for DocumentModelGridRemoval.
virtual DocumentModelGeneral modelGeneral() const
Get method for DocumentModelGeneral.
virtual QPointF positionGraph(const QString &pointIdentifier) const
See Curve::positionGraph.
virtual void setModelDigitizeCurve(const DocumentModelDigitizeCurve &modelDigitizeCurve)
Set method for DocumentModelDigitizeCurve.
Storage of data belonging to one coordinate system.
Definition CoordSystem.h:41
Model for DlgSettingsCurveProperties and CmdSettingsCurveProperties.
Definition CurveStyles.h:23
Container for one set of digitized Points.
Definition Curve.h:33
Container for all graph curves. The axes point curve is external to this class.
Model for DlgSettingsAxesChecker and CmdSettingsAxesChecker.
Model for DlgSettingsColorFilter and CmdSettingsColorFilter.
Model for DlgSettingsCoords and CmdSettingsCoords.
Model for DlgSettingsDigitizeCurve and CmdSettingsDigitizeCurve.
Model for DlgSettingsExportFormat and CmdSettingsExportFormat.
Model for DlgSettingsGeneral and CmdSettingsGeneral.
Model for DlgSettingsGridRemoval and CmdSettingsGridRemoval. The settings are unstable until the user...
Model for DlgSettingsPointMatch and CmdSettingsPointMatch.
Model for DlgSettingsSegments and CmdSettingsSegments.
Affine transformation between screen and graph coordinates, based on digitized axis points.