Engauge Digitizer 2
Loading...
Searching...
No Matches
CoordSystemContext.cpp
Go to the documentation of this file.
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
8#include "EngaugeAssert.h"
9#include "Logger.h"
10
12
14 m_coordSystemIndex (DEFAULT_COORD_SYSTEM_INDEX)
15{
16 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::CoordSystemContext";
17}
18
20{
21 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::~CoordSystemContext";
22
23 qDeleteAll (m_coordSystems);
24}
25
26void CoordSystemContext::addCoordSystems(unsigned int numberCoordSystemToAdd)
27{
28 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::addCoordSystems"
29 << " numberToAdd=" << numberCoordSystemToAdd;
30
31 // The CoordSystem vector is populated with defaults here
32 for (unsigned int i = 0; i < numberCoordSystemToAdd; i++) {
33 m_coordSystems.push_back (new CoordSystem ());
34 }
35}
36
37void CoordSystemContext::addGraphCurveAtEnd (const QString &curveName)
38{
39 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::addGraphCurveAtEnd";
40
41 m_coordSystems [signed (m_coordSystemIndex)]->addGraphCurveAtEnd(curveName);
42}
43
45 const QPointF &posGraph,
46 QString &identifier,
47 double ordinal,
48 bool isXOnly)
49{
50 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::addPointAxisWithGeneratedIdentifier";
51
52 m_coordSystems [signed (m_coordSystemIndex)]->addPointAxisWithGeneratedIdentifier(posScreen,
53 posGraph,
54 identifier,
55 ordinal,
56 isXOnly);
57}
58
60 const QPointF &posGraph,
61 const QString &identifier,
62 double ordinal,
63 bool isXOnly)
64{
65 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::addPointAxisWithSpecifiedIdentifier";
66
67 m_coordSystems [signed (m_coordSystemIndex)]->addPointAxisWithSpecifiedIdentifier(posScreen,
68 posGraph,
69 identifier,
70 ordinal,
71 isXOnly);
72}
73
75 const QPointF &posScreen,
76 QString &generatedIdentifier,
77 double ordinal)
78{
79 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::addPointGraphWithGeneratedIdentifier";
80
81 m_coordSystems [signed (m_coordSystemIndex)]->addPointGraphWithGeneratedIdentifier(curveName,
82 posScreen,
83 generatedIdentifier,
84 ordinal);
85}
86
88 const QPointF &posScreen,
89 const QString &identifier,
90 double ordinal)
91{
92 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::addPointGraphWithSpecifiedIdentifier";
93
94 m_coordSystems [signed (m_coordSystemIndex)]->addPointGraphWithSpecifiedIdentifier(curveName,
95 posScreen,
96 identifier,
97 ordinal);
98}
99
101{
102 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::addPointsInCurvesGraphs";
103
104 m_coordSystems [signed (m_coordSystemIndex)]->addPointsInCurvesGraphs(curvesGraphs);
105}
106
107void CoordSystemContext::checkAddPointAxis (const QPointF &posScreen,
108 const QPointF &posGraph,
109 bool &isError,
110 QString &errorMessage,
111 bool isXOnly,
112 DocumentAxesPointsRequired documentAxesPointsRequired)
113{
114 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::checkAddPointAxis";
115
116 m_coordSystems [signed (m_coordSystemIndex)]->checkAddPointAxis(posScreen,
117 posGraph,
118 isError,
119 errorMessage,
120 isXOnly,
121 documentAxesPointsRequired);
122}
123
124void CoordSystemContext::checkEditPointAxis (const QString &pointIdentifier,
125 const QPointF &posScreen,
126 const QPointF &posGraph,
127 bool &isError,
128 QString &errorMessage,
129 DocumentAxesPointsRequired documentAxesPointsRequired)
130{
131 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::checkEditPointAxis";
132
133 m_coordSystems [signed (m_coordSystemIndex)]->checkEditPointAxis(pointIdentifier,
134 posScreen,
135 posGraph,
136 isError,
137 errorMessage,
138 documentAxesPointsRequired);
139}
140
142{
143 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::coordSystem";
144
145 return *(m_coordSystems [signed (m_coordSystemIndex)]);
146}
147
149{
150 return unsigned (m_coordSystems.count());
151}
152
154{
155 return m_coordSystemIndex;
156}
157
159{
160 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::curveAxes";
161
162 return m_coordSystems [signed (m_coordSystemIndex)]->curveAxes();
163}
164
166{
167 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::curveForCurveName";
168
169 return m_coordSystems [signed (m_coordSystemIndex)]->curveForCurveName(curveName);
170}
171
172const Curve *CoordSystemContext::curveForCurveName (const QString &curveName) const
173{
174 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::curveForCurveName";
175
176 return m_coordSystems [signed (m_coordSystemIndex)]->curveForCurveName(curveName);
177}
178
180{
181 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::curvesGraphs";
182
183 return m_coordSystems [signed (m_coordSystemIndex)]->curvesGraphs();
184}
185
187{
188 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::curvesGraphsNames";
189
190 return m_coordSystems [signed (m_coordSystemIndex)]->curvesGraphsNames();
191}
192
193int CoordSystemContext::curvesGraphsNumPoints (const QString &curveName) const
194{
195 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::curvesGraphsNumPoints";
196
197 return m_coordSystems [signed (m_coordSystemIndex)]->curvesGraphsNumPoints(curveName);
198}
199
200void CoordSystemContext::editPointAxis (const QPointF &posGraph,
201 const QString &identifier)
202{
203 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::editPointAxis";
204
205 m_coordSystems [signed (m_coordSystemIndex)]->editPointAxis(posGraph,
206 identifier);
207}
208
210 bool isY,
211 double x,
212 double y,
213 const QStringList &identifiers,
214 const Transformation &transformation)
215{
216 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::editPointGraph";
217
218 m_coordSystems [signed (m_coordSystemIndex)]->editPointGraph (isX,
219 isY,
220 x,
221 y,
222 identifiers,
223 transformation);
224}
225
226bool CoordSystemContext::isXOnly (const QString &pointIdentifier) const
227{
228 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::isXOnly";
229
230 return m_coordSystems [signed (m_coordSystemIndex)]->isXOnly (pointIdentifier);
231}
232
233void CoordSystemContext::iterateThroughCurvePointsAxes (const Functor2wRet<const QString &, const Point &, CallbackSearchReturn> &ftorWithCallback)
234{
235 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::iterateThroughCurvePointsAxes";
236
237 m_coordSystems [signed (m_coordSystemIndex)]->iterateThroughCurvePointsAxes(ftorWithCallback);
238}
239
240void CoordSystemContext::iterateThroughCurvePointsAxes (const Functor2wRet<const QString &, const Point &, CallbackSearchReturn> &ftorWithCallback) const
241{
242 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::iterateThroughCurvePointsAxes";
243
244 m_coordSystems [signed (m_coordSystemIndex)]->iterateThroughCurvePointsAxes(ftorWithCallback);
245}
246
248 const Functor2wRet<const Point &, const Point &, CallbackSearchReturn> &ftorWithCallback) const
249{
250 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::iterateThroughCurveSegments";
251
252 m_coordSystems [signed (m_coordSystemIndex)]->iterateThroughCurveSegments(curveName,
253 ftorWithCallback);
254}
255
256void CoordSystemContext::iterateThroughCurvesPointsGraphs (const Functor2wRet<const QString &, const Point &, CallbackSearchReturn> &ftorWithCallback)
257{
258 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::iterateThroughCurvesPointsGraphs";
259
260 m_coordSystems [signed (m_coordSystemIndex)]->iterateThroughCurvesPointsGraphs(ftorWithCallback);
261}
262
263void CoordSystemContext::iterateThroughCurvesPointsGraphs (const Functor2wRet<const QString &, const Point &, CallbackSearchReturn> &ftorWithCallback) const
264{
265 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::iterateThroughCurvesPointsGraphs";
266
267 m_coordSystems [signed (m_coordSystemIndex)]->iterateThroughCurvesPointsGraphs(ftorWithCallback);
268}
269
270bool CoordSystemContext::loadCurvesFile (const QString &curvesFile)
271{
272 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::loadCurvesFile";
273
274 return m_coordSystems [signed (m_coordSystemIndex)]->loadCurvesFile (curvesFile);
275}
276
278 double version,
279 DocumentAxesPointsRequired &documentAxesPointsRequired)
280{
281 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::loadPreVersion6";
282
283 m_coordSystems [signed (m_coordSystemIndex)]->loadPreVersion6 (str,
284 version,
285 documentAxesPointsRequired);
286}
287
288void CoordSystemContext::loadVersion6 (QXmlStreamReader &reader,
289 DocumentAxesPointsRequired &documentAxesPointsRequired)
290{
291 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::loadVersion6";
292
293 m_coordSystems [signed (m_coordSystemIndex)]->loadVersion6 (reader,
294 documentAxesPointsRequired);
295}
296
297void CoordSystemContext::loadVersions7AndUp (QXmlStreamReader &reader)
298{
299 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::loadVersion7AndUp";
300
301 int indexLast = m_coordSystems.count() - 1;
302 m_coordSystems [indexLast]->loadVersions7AndUp (reader);
303}
304
306{
307 LOG4CPP_DEBUG_S ((*mainCat)) << "CoordSystemContext::modelAxesChecker";
308
309 return m_coordSystems [signed (m_coordSystemIndex)]->modelAxesChecker();
310}
311
313{
314 LOG4CPP_DEBUG_S ((*mainCat)) << "CoordSystemContext::modelColorFilter";
315
316 return m_coordSystems [signed (m_coordSystemIndex)]->modelColorFilter();
317}
318
320{
321 LOG4CPP_DEBUG_S ((*mainCat)) << "CoordSystemContext::modelCoords";
322
323 return m_coordSystems [signed (m_coordSystemIndex)]->modelCoords();
324}
325
327{
328 LOG4CPP_DEBUG_S ((*mainCat)) << "CoordSystemContext::modelCurveStyles";
329
330 return m_coordSystems [signed (m_coordSystemIndex)]->modelCurveStyles();
331}
332
334{
335 LOG4CPP_DEBUG_S ((*mainCat)) << "CoordSystemContext::modelDigitizeCurve";
336
337 return m_coordSystems [signed (m_coordSystemIndex)]->modelDigitizeCurve();
338}
339
341{
342 LOG4CPP_DEBUG_S ((*mainCat)) << "CoordSystemContext::modelExport";
343
344 return m_coordSystems [signed (m_coordSystemIndex)]->modelExport();
345}
346
348{
349 LOG4CPP_DEBUG_S ((*mainCat)) << "CoordSystemContext::modelGeneral";
350
351 return m_coordSystems [signed (m_coordSystemIndex)]->modelGeneral();
352}
353
355{
356 LOG4CPP_DEBUG_S ((*mainCat)) << "CoordSystemContext::modelGridDisplay";
357
358 return m_coordSystems [signed (m_coordSystemIndex)]->modelGridDisplay();
359}
360
362{
363 LOG4CPP_DEBUG_S ((*mainCat)) << "CoordSystemContext::modelGridRemoval";
364
365 return m_coordSystems [signed (m_coordSystemIndex)]->modelGridRemoval();
366}
367
369{
370 LOG4CPP_DEBUG_S ((*mainCat)) << "CoordSystemContext::modelGuideline";
371
372 return m_coordSystems [signed (m_coordSystemIndex)]->modelGuideline();
373}
374
376{
377 LOG4CPP_DEBUG_S ((*mainCat)) << "CoordSystemContext::modelPointMatch";
378
379 return m_coordSystems [signed (m_coordSystemIndex)]->modelPointMatch();
380}
381
383{
384 LOG4CPP_DEBUG_S ((*mainCat)) << "CoordSystemContext::modelSegments";
385
386 return m_coordSystems [signed (m_coordSystemIndex)]->modelSegments();
387}
388
389void CoordSystemContext::movePoint (const QString &pointIdentifier,
390 const QPointF &deltaScreen)
391{
392 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::movePoint";
393
394 return m_coordSystems [signed (m_coordSystemIndex)]->movePoint(pointIdentifier,
395 deltaScreen);
396}
397
398int CoordSystemContext::nextOrdinalForCurve (const QString &curveName) const
399{
400 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::nextOrdinalForCurve";
401
402 return m_coordSystems [signed (m_coordSystemIndex)]->nextOrdinalForCurve(curveName);
403}
404
405QPointF CoordSystemContext::positionGraph (const QString &pointIdentifier) const
406{
407 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::positionGraph";
408
409 return m_coordSystems [signed (m_coordSystemIndex)]->positionGraph(pointIdentifier);
410}
411
412QPointF CoordSystemContext::positionScreen (const QString &pointIdentifier) const
413{
414 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::addGraphCurveAtEnd";
415
416 return m_coordSystems [signed (m_coordSystemIndex)]->positionScreen(pointIdentifier);
417}
418
420{
421 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::print";
422
423 return m_coordSystems [signed (m_coordSystemIndex)]->print();
424}
425
426void CoordSystemContext::printStream (QString indentation,
427 QTextStream &str) const
428{
429 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::printStream";
430
431 m_coordSystems [signed (m_coordSystemIndex)]->printStream(indentation,
432 str);
433}
434
436{
437 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::reasonForUnsuccessfulRead";
438
439 return m_coordSystems [signed (m_coordSystemIndex)]->reasonForUnsuccessfulRead();
440}
441
442void CoordSystemContext::removePointAxis (const QString &identifier)
443{
444 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::removePointAxis";
445
446 m_coordSystems [signed (m_coordSystemIndex)]->removePointAxis(identifier);
447}
448
449void CoordSystemContext::removePointGraph (const QString &identifier)
450{
451 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::removePointGraph";
452
453 m_coordSystems [signed (m_coordSystemIndex)]->removePointGraph(identifier);
454}
455
457{
458 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::removePointsInCurvesGraphs";
459
460 m_coordSystems [signed (m_coordSystemIndex)]->removePointsInCurvesGraphs(curvesGraphs);
461}
462
463void CoordSystemContext::saveXml (QXmlStreamWriter &writer) const
464{
465 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::saveXml";
466
467 for (int index = 0; index < m_coordSystems.count(); index++) {
468 m_coordSystems [index]->saveXml (writer);
469 }
470}
471
473{
474 return m_coordSystems [signed (m_coordSystemIndex)]->selectedCurveName();
475}
476
478{
479 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::setCoordSystemIndex"
480 << " index=" << coordSystemIndex;
481
482 ENGAUGE_ASSERT(coordSystemIndex < unsigned (m_coordSystems.count()));
483
484 m_coordSystemIndex = coordSystemIndex;
485}
486
488{
489 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::setCurveAxes";
490
491 m_coordSystems [signed (m_coordSystemIndex)]->setCurveAxes(curveAxes);
492}
493
495{
496 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::setCurvesGraphs";
497
498 m_coordSystems [signed (m_coordSystemIndex)]->setCurvesGraphs(curvesGraphs);
499}
500
502{
503 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::setModelAxesChecker";
504
505 m_coordSystems [signed (m_coordSystemIndex)]->setModelAxesChecker(modelAxesChecker);
506}
507
509{
510 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::setModelColorFilter";
511
512 m_coordSystems [signed (m_coordSystemIndex)]->setModelColorFilter(modelColorFilter);
513}
514
516{
517 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::setModelCoords";
518
519 m_coordSystems [signed (m_coordSystemIndex)]->setModelCoords(modelCoords);
520}
521
523{
524 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::setModelCurveStyles";
525
526 m_coordSystems [signed (m_coordSystemIndex)]->setModelCurveStyles(modelCurveStyles);
527}
528
530{
531 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::setModelDigitizeCurve";
532
533 m_coordSystems [signed (m_coordSystemIndex)]->setModelDigitizeCurve(modelDigitizeCurve);
534}
535
537{
538 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::setModelExport";
539
540 m_coordSystems [signed (m_coordSystemIndex)]->setModelExport (modelExport);
541}
542
544{
545 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::setModelGeneral";
546
547 m_coordSystems [signed (m_coordSystemIndex)]->setModelGeneral(modelGeneral);
548}
549
551{
552 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::setModelGridDisplay";
553
554 m_coordSystems [signed (m_coordSystemIndex)]->setModelGridDisplay(modelGridDisplay);
555}
556
558{
559 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::setModelGridRemoval";
560
561 m_coordSystems [signed (m_coordSystemIndex)]->setModelGridRemoval(modelGridRemoval);
562}
563
565{
566 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::setModelGuideline";
567
568 m_coordSystems [signed (m_coordSystemIndex)]->setModelGuideline(modelGuideline);
569}
570
572{
573 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::setModelPointMatch";
574
575 m_coordSystems [signed (m_coordSystemIndex)]->setModelPointMatch(modelPointMatch);
576}
577
579{
580 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::setModelSegments";
581
582 m_coordSystems [signed (m_coordSystemIndex)]->setModelSegments(modelSegments);
583}
584
586{
587 m_coordSystems [signed (m_coordSystemIndex)]->setSelectedCurveName(selectedCurveName);
588}
589
591{
592 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::successfulRead";
593
594 return m_coordSystems [signed (m_coordSystemIndex)]->successfulRead();
595}
596
598{
599 LOG4CPP_INFO_S ((*mainCat)) << "CoordSystemContext::updatePointOrdinals";
600
601 m_coordSystems [signed (m_coordSystemIndex)]->updatePointOrdinals(transformation);
602}
const CoordSystemIndex DEFAULT_COORD_SYSTEM_INDEX
unsigned int CoordSystemIndex
Zero-based index for identifying CoordSystem instantiations.
#define ENGAUGE_ASSERT(cond)
Drop in replacement for Q_ASSERT.
log4cpp::Category * mainCat
Definition Logger.cpp:14
unsigned int coordSystemCount() const
Number of CoordSystem.
void loadVersions7AndUp(QXmlStreamReader &reader)
Load one CoordSystem from file in version 7 format or newer, into the most recent CoordSystem which w...
virtual void addPointGraphWithSpecifiedIdentifier(const QString &curveName, const QPointF &posScreen, const QString &identifier, double ordinal)
Add a single graph point with the specified point identifier. Note that PointStyle is not applied to ...
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.
const CoordSystem & coordSystem() const
Current CoordSystem.
virtual void setSelectedCurveName(const QString &selectedCurveName)
Save curve name that is selected for the current coordinate system, for the next time the coordinate ...
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.
void loadPreVersion6(QDataStream &str, double version, DocumentAxesPointsRequired &documentAxesPointsRequired)
Load from file in pre-version 6 format.
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.
void loadVersion6(QXmlStreamReader &reader, DocumentAxesPointsRequired &documentAxesPointsRequired)
Load from file in version 6 format, into the single CoordSystem.
virtual int curvesGraphsNumPoints(const QString &curveName) const
See CurvesGraphs::curvesGraphsNumPoints.
virtual QPointF positionScreen(const QString &pointIdentifier) const
See Curve::positionScreen.
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...
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 DocumentModelGuideline modelGuideline() const
Get method for DocumentModelGuideline.
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 void setCurvesGraphs(const CurvesGraphs &curvesGraphs)
Let CmdAbstract classes overwrite CurvesGraphs. Applies to current coordinate system.
virtual QString reasonForUnsuccessfulRead() const
Return an informative text message explaining why startup loading failed. Applies if successfulRead r...
virtual void saveXml(QXmlStreamWriter &writer) const
Save graph to xml.
virtual DocumentModelGridDisplay modelGridDisplay() const
Get method for DocumentModelGridDisplay.
virtual void setModelExport(const DocumentModelExportFormat &modelExport)
Set method for DocumentModelExportFormat.
virtual void removePointGraph(const QString &identifier)
Perform the opposite of addPointGraph.
void addCoordSystems(unsigned int numberCoordSystemToAdd)
Add specified number of coordinate systems to the original one created by the constructor.
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...
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 void setCurveAxes(const Curve &curveAxes)
Let CmdAbstract classes overwrite axes Curve. Applies to current coordinate system.
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 void setModelGuideline(const DocumentModelGuideline &modelGuideline)
Set method for DocumentModelGuideline.
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.
virtual void setModelGridDisplay(const DocumentModelGridDisplay &modelGridDisplay)
Set method for DocumentModelGridDisplay.
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 checkEditPointAxis(const QString &pointIdentifier, const QPointF &posScreen, const QPointF &posGraph, bool &isError, QString &errorMessage, DocumentAxesPointsRequired documentAxesPointsRequired)
Check before calling editPointAxis.
virtual QString selectedCurveName() const
Currently selected curve name. This is used to set the selected curve combobox in MainWindow.
virtual void iterateThroughCurvesPointsGraphs(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
See Curve::iterateThroughCurvePoints, for all the graphs curves.
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:44
Model for DlgSettingsCurveProperties and CmdSettingsCurveProperties.
Definition CurveStyles.h:23
Container for one set of digitized Points.
Definition Curve.h:34
Container for all graph curves. The axes point curve is external to this class.
QStringList curvesGraphsNames() const
List of graph curve names.
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 DlgSettingsGridDisplay and CmdSettingsGridDisplay.
Model for DlgSettingsGridRemoval and CmdSettingsGridRemoval.
Model for managing the coordinate values corresponding Guidelines.
Model for DlgSettingsPointMatch and CmdSettingsPointMatch.
Model for DlgSettingsSegments and CmdSettingsSegments.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
Affine transformation between screen and graph coordinates, based on digitized axis points.
#define LOG4CPP_INFO_S(logger)
Definition convenience.h:18
#define LOG4CPP_DEBUG_S(logger)
Definition convenience.h:20