Engauge Digitizer 2
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Document Class Reference

Storage of one imported image and the data attached to that image. More...

#include <Document.h>

Collaboration diagram for Document:
Collaboration graph

Public Member Functions

 Document (const QImage &image)
 Constructor for imported images and dragged images. Only one coordinate system is create - others are added later externally.
 
 Document (const QString &fileName)
 Constructor for opened Documents, and error report files. The specified file is opened and read.
 
void addCoordSystems (unsigned int numberCoordSystemToAdd)
 Add some number (0 or more) of additional coordinate systems.
 
void addGraphCurveAtEnd (const QString &curveName)
 Add new graph curve to the list of existing graph curves.
 
void addPointAxisWithGeneratedIdentifier (const QPointF &posScreen, const QPointF &posGraph, QString &identifier, double ordinal, bool isXOnly)
 Add a single axis point with a generated point identifier.
 
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.
 
void addPointGraphWithGeneratedIdentifier (const QString &curveName, const QPointF &posScreen, QString &generatedIentifier, double ordinal)
 Add a single graph point with a generated point identifier.
 
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 Document.
 
void addPointsInCurvesGraphs (CurvesGraphs &curvesGraphs)
 Add all points identified in the specified CurvesGraphs. See also removePointsInCurvesGraphs.
 
void addScaleWithGeneratedIdentifier (const QPointF &posScreen0, const QPointF &posScreen1, double scaleLength, QString &identifier0, QString &identifier1, double ordinal0, double ordinal1)
 Add scale with a generated point identifier.
 
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 checkEditPointAxis (const QString &pointIdentifier, const QPointF &posScreen, const QPointF &posGraph, bool &isError, QString &errorMessage)
 Check before calling editPointAxis.
 
const CoordSystemcoordSystem () const
 Currently active CoordSystem.
 
unsigned int coordSystemCount () const
 Number of CoordSystem.
 
CoordSystemIndex coordSystemIndex () const
 Index of current active CoordSystem.
 
const CurvecurveAxes () const
 Get method for axis curve.
 
const CurvecurveForCurveName (const QString &curveName) const
 See CurvesGraphs::curveForCurveNames, although this also works for AXIS_CURVE_NAME.
 
const CurvesGraphscurvesGraphs () const
 Make all Curves available, read only, for CmdAbstract classes only.
 
QStringList curvesGraphsNames () const
 See CurvesGraphs::curvesGraphsNames.
 
int curvesGraphsNumPoints (const QString &curveName) const
 See CurvesGraphs::curvesGraphsNumPoints.
 
DocumentAxesPointsRequired documentAxesPointsRequired () const
 Get method for DocumentAxesPointsRequired.
 
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.
 
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.
 
void initializeGridDisplay (const Transformation &transformation)
 Initialize grid display. This is called immediately after the transformation has been defined for the first time.
 
bool isXOnly (const QString &pointIdentifier) const
 See Curve::isXOnly.
 
void iterateThroughCurvePointsAxes (const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
 See Curve::iterateThroughCurvePoints, for the axes curve.
 
void iterateThroughCurvePointsAxes (const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback) const
 See Curve::iterateThroughCurvePoints, for the axes curve.
 
void iterateThroughCurveSegments (const QString &curveName, const Functor2wRet< const Point &, const Point &, CallbackSearchReturn > &ftorWithCallback) const
 See Curve::iterateThroughCurveSegments, for any axes or graph curve.
 
void iterateThroughCurvesPointsGraphs (const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
 See Curve::iterateThroughCurvePoints, for all the graphs curves.
 
void iterateThroughCurvesPointsGraphs (const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback) const
 See Curve::iterateThroughCurvePoints, for all the graphs curves.
 
bool loadCurvesFile (const QString &curvesFile)
 Load the curve names in the specified Engauge file into the current document. This is called near the end of the import process only.
 
DocumentModelAxesChecker modelAxesChecker () const
 Get method for DocumentModelAxesChecker.
 
DocumentModelColorFilter modelColorFilter () const
 Get method for DocumentModelColorFilter.
 
DocumentModelCoords modelCoords () const
 Get method for DocumentModelCoords.
 
CurveStyles modelCurveStyles () const
 Get method for CurveStyles.
 
DocumentModelDigitizeCurve modelDigitizeCurve () const
 Get method for DocumentModelDigitizeCurve.
 
DocumentModelExportFormat modelExport () const
 Get method for DocumentModelExportFormat.
 
DocumentModelGeneral modelGeneral () const
 Get method for DocumentModelGeneral.
 
DocumentModelGridDisplay modelGridDisplay () const
 Get method for DocumentModelGridDisplay.
 
DocumentModelGridRemoval modelGridRemoval () const
 Get method for DocumentModelGridRemoval.
 
DocumentModelPointMatch modelPointMatch () const
 Get method for DocumentModelPointMatch.
 
DocumentModelSegments modelSegments () const
 Get method for DocumentModelSegments.
 
void movePoint (const QString &pointIdentifier, const QPointF &deltaScreen)
 See Curve::movePoint.
 
int nextOrdinalForCurve (const QString &curveName) const
 Default next ordinal value for specified curve.
 
QPixmap pixmap () const
 Return the image that is being digitized.
 
QPointF positionGraph (const QString &pointIdentifier) const
 See Curve::positionGraph.
 
QPointF positionScreen (const QString &pointIdentifier) const
 See Curve::positionScreen.
 
void print () const
 Debugging method for printing directly from symbolic debugger.
 
void printStream (QString indentation, QTextStream &str) const
 Debugging method that supports print method of this class and printStream method of some other class(es)
 
QString reasonForUnsuccessfulRead () const
 Return an informative text message explaining why startup loading failed. Applies if successfulRead returns false.
 
void removePointAxis (const QString &identifier)
 Perform the opposite of addPointAxis.
 
void removePointGraph (const QString &identifier)
 Perform the opposite of addPointGraph.
 
void removePointsInCurvesGraphs (CurvesGraphs &curvesGraphs)
 Remove all points identified in the specified CurvesGraphs. See also addPointsInCurvesGraphs.
 
void saveXml (QXmlStreamWriter &writer) const
 Save document to xml.
 
QString selectedCurveName () const
 Currently selected curve name. This is used to set the selected curve combobox in MainWindow.
 
void setCoordSystemIndex (CoordSystemIndex coordSystemIndex)
 Set the index of current active CoordSystem.
 
void setCurveAxes (const Curve &curveAxes)
 Let CmdAbstract classes overwrite axes Curve.
 
void setCurvesGraphs (const CurvesGraphs &curvesGraphs)
 Let CmdAbstract classes overwrite CurvesGraphs.
 
void setDocumentAxesPointsRequired (DocumentAxesPointsRequired documentAxesPointsRequired)
 Set the number of axes points required.
 
void setModelAxesChecker (const DocumentModelAxesChecker &modelAxesChecker)
 Set method for DocumentModelAxesChecker.
 
void setModelColorFilter (const DocumentModelColorFilter &modelColorFilter)
 Set method for DocumentModelColorFilter.
 
void setModelCoords (const DocumentModelCoords &modelCoords)
 Set method for DocumentModelCoords.
 
void setModelCurveStyles (const CurveStyles &modelCurveStyles)
 Set method for CurveStyles.
 
void setModelDigitizeCurve (const DocumentModelDigitizeCurve &modelDigitizeCurve)
 Set method for DocumentModelDigitizeCurve.
 
void setModelExport (const DocumentModelExportFormat &modelExport)
 Set method for DocumentModelExportFormat.
 
void setModelGeneral (const DocumentModelGeneral &modelGeneral)
 Set method for DocumentModelGeneral.
 
void setModelGridDisplay (const DocumentModelGridDisplay &modelGridDisplay)
 Set method for DocumentModelGridDisplay.
 
void setModelGridRemoval (const DocumentModelGridRemoval &modelGridRemoval)
 Set method for DocumentModelGridRemoval.
 
void setModelPointMatch (const DocumentModelPointMatch &modelPointMatch)
 Set method for DocumentModelPointMatch.
 
void setModelSegments (const DocumentModelSegments &modelSegments)
 Set method for DocumentModelSegments.
 
void setPixmap (const QImage &image)
 Set method for the background pixmap.
 
void setSelectedCurveName (const QString &selectedCurveName)
 Save curve name that is selected for the current coordinate system, for the next time the coordinate system reappears.
 
bool successfulRead () const
 Return true if startup loading succeeded. If the loading failed then reasonForUnsuccessfulRed will explain why.
 
void updatePointOrdinals (const Transformation &transformation)
 Update point ordinals after point addition/removal or dragging.
 

Detailed Description

Storage of one imported image and the data attached to that image.

Definition at line 41 of file Document.h.

Constructor & Destructor Documentation

◆ Document() [1/2]

Document::Document ( const QImage & image)

Constructor for imported images and dragged images. Only one coordinate system is create - others are added later externally.

Definition at line 53 of file Document.cpp.

53 :
54 m_name ("untitled"),
55 m_documentAxesPointsRequired (DOCUMENT_AXES_POINTS_REQUIRED_3)
56{
57 LOG4CPP_INFO_S ((*mainCat)) << "Document::Document"
58 << " image=" << image.width() << "x" << image.height();
59
60 m_coordSystemContext.addCoordSystems(NOMINAL_COORD_SYSTEM_COUNT);
61
62 m_successfulRead = true; // Reading from QImage always succeeds, resulting in empty Document
63
64 m_pixmap.convertFromImage (image);
65}
@ DOCUMENT_AXES_POINTS_REQUIRED_3
const int NOMINAL_COORD_SYSTEM_COUNT
Definition Document.cpp:44
log4cpp::Category * mainCat
Definition Logger.cpp:14
void addCoordSystems(unsigned int numberCoordSystemToAdd)
Add specified number of coordinate systems to the original one created by the constructor.
#define LOG4CPP_INFO_S(logger)
Definition convenience.h:18

◆ Document() [2/2]

Document::Document ( const QString & fileName)

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

Definition at line 67 of file Document.cpp.

67 :
68 m_name (fileName),
69 m_documentAxesPointsRequired (DOCUMENT_AXES_POINTS_REQUIRED_3)
70{
71 LOG4CPP_INFO_S ((*mainCat)) << "Document::Document"
72 << " fileName=" << fileName.toLatin1().data();
73
74 m_successfulRead = true;
75
76 // Grab first few bytes to determine the version number
78 if (fileVersion.open(QIODevice::ReadOnly)) {
79
81 fileVersion.close ();
82
83 if (bytesIndicatePreVersion6 (bytesStart)) {
84
85 QFile *file = new QFile (fileName);
86 if (file->open (QIODevice::ReadOnly)) {
88
89 m_coordSystemContext.addCoordSystems(NOMINAL_COORD_SYSTEM_COUNT);
90 loadPreVersion6 (str);
91
92 } else {
93
94 m_successfulRead = false;
95 m_reasonForUnsuccessfulRead = QObject::tr ("Operating system says file is not readable");
96
97 }
98 } else {
99
100 QFile *file = new QFile (fileName);
101 if (file->open (QIODevice::ReadOnly | QIODevice::Text)) {
102
103 int version = versionFromFile (file);
104 switch (version)
105 {
106 case VERSION_6:
107 loadVersion6 (file);
108 break;
109
110 case VERSION_7:
111 case VERSION_8:
112 case VERSION_9:
113 case VERSION_10:
114 case VERSION_11:
115 case VERSION_12:
116 loadVersions7AndUp (file);
117 break;
118
119 default:
120 m_successfulRead = false;
121 m_reasonForUnsuccessfulRead = QString ("Engauge %1 %2 %3 %4 Engauge")
122 .arg (VERSION_NUMBER)
123 .arg (QObject::tr ("cannot read newer files from version"))
124 .arg (version)
125 .arg (QObject::tr ("of"));
126 break;
127 }
128
129 // Close and deactivate
130 file->close ();
131 delete file;
132 file = nullptr;
133
134 } else {
135
136 m_successfulRead = false;
137 m_reasonForUnsuccessfulRead = QObject::tr ("Operating system says file is not readable");
138 }
139 }
140 } else {
141 fileVersion.close ();
142 m_successfulRead = false;
143 m_reasonForUnsuccessfulRead = QString ("%1 '%2' %3")
144 .arg (QObject::tr ("File"))
145 .arg (fileName)
146 .arg (QObject::tr ("was not found"));
147 }
148}
const int FOUR_BYTES
const int INNER_RADIUS_MIN
const int VERSION_11
Definition Document.cpp:50
const int VERSION_6
Definition Document.cpp:45
const int VERSION_9
Definition Document.cpp:48
const int VERSION_8
Definition Document.cpp:47
const int VERSION_7
Definition Document.cpp:46
const int VERSION_12
Definition Document.cpp:51
const int VERSION_10
Definition Document.cpp:49
const char * VERSION_NUMBER
Definition Version.cpp:12

Member Function Documentation

◆ addCoordSystems()

void Document::addCoordSystems ( unsigned int numberCoordSystemToAdd)

Add some number (0 or more) of additional coordinate systems.

This is only safe to call during import and before any changes have been made to the Document

Definition at line 150 of file Document.cpp.

151{
152 LOG4CPP_INFO_S ((*mainCat)) << "Document::addCoordSystems"
153 << " toAdd=" << numberCoordSystemToAdd;
154
155 m_coordSystemContext.addCoordSystems(numberCoordSystemToAdd);
156}

◆ addGraphCurveAtEnd()

void Document::addGraphCurveAtEnd ( const QString & curveName)

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

Definition at line 158 of file Document.cpp.

159{
160 LOG4CPP_INFO_S ((*mainCat)) << "Document::addGraphCurveAtEnd";
161
162 m_coordSystemContext.addGraphCurveAtEnd (curveName);
163}
virtual void addGraphCurveAtEnd(const QString &curveName)
Add new graph curve to the list of existing graph curves.

◆ addPointAxisWithGeneratedIdentifier()

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

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 point has only an x coordinate

Definition at line 165 of file Document.cpp.

170{
171 LOG4CPP_INFO_S ((*mainCat)) << "Document::addPointAxisWithGeneratedIdentifier";
172
173 m_coordSystemContext.addPointAxisWithGeneratedIdentifier(posScreen,
174 posGraph,
175 identifier,
176 ordinal,
177 isXOnly);
178}
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.
bool isXOnly(const QString &pointIdentifier) const
See Curve::isXOnly.
Definition Document.cpp:444

◆ addPointAxisWithSpecifiedIdentifier()

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

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 point has only an x coordinate

Definition at line 180 of file Document.cpp.

185{
186 LOG4CPP_INFO_S ((*mainCat)) << "Document::addPointAxisWithSpecifiedIdentifier";
187
188 m_coordSystemContext.addPointAxisWithSpecifiedIdentifier(posScreen,
189 posGraph,
190 identifier,
191 ordinal,
192 isXOnly);
193}
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.

◆ addPointGraphWithGeneratedIdentifier()

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

Add a single graph point with a generated point identifier.

Definition at line 195 of file Document.cpp.

199{
200 LOG4CPP_INFO_S ((*mainCat)) << "Document::addPointGraphWithGeneratedIdentifier";
201
202 m_coordSystemContext.addPointGraphWithGeneratedIdentifier(curveName,
203 posScreen,
204 identifier,
205 ordinal);
206}
virtual void addPointGraphWithGeneratedIdentifier(const QString &curveName, const QPointF &posScreen, QString &generatedIentifier, double ordinal)
Add a single graph point with a generated point identifier.

◆ addPointGraphWithSpecifiedIdentifier()

void Document::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 Document.

Definition at line 208 of file Document.cpp.

212{
213 LOG4CPP_INFO_S ((*mainCat)) << "Document::addPointGraphWithSpecifiedIdentifier";
214
215 m_coordSystemContext.addPointGraphWithSpecifiedIdentifier(curveName,
216 posScreen,
217 identifier,
218 ordinal);
219}
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...

◆ addPointsInCurvesGraphs()

void Document::addPointsInCurvesGraphs ( CurvesGraphs & curvesGraphs)

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

Definition at line 221 of file Document.cpp.

222{
223 LOG4CPP_INFO_S ((*mainCat)) << "Document::addPointsInCurvesGraphs";
224
225 m_coordSystemContext.addPointsInCurvesGraphs(curvesGraphs);
226}
virtual void addPointsInCurvesGraphs(CurvesGraphs &curvesGraphs)
Add all points identified in the specified CurvesGraphs. See also removePointsInCurvesGraphs.
const CurvesGraphs & curvesGraphs() const
Make all Curves available, read only, for CmdAbstract classes only.
Definition Document.cpp:342

◆ addScaleWithGeneratedIdentifier()

void Document::addScaleWithGeneratedIdentifier ( const QPointF & posScreen0,
const QPointF & posScreen1,
double scaleLength,
QString & identifier0,
QString & identifier1,
double ordinal0,
double ordinal1 )

Add scale with a generated point identifier.

Call this after checkAddPointAxis to guarantee success in this call.

Parameters
posScreen0Screen coordinates of first point from QGraphicsView
posScreen1Screen coordinates of second point from QGraphicsView
scaleLengthScale bar length in graph coordinates
identifier0Identifier for first new axis point
identifier1Identifier for second new axis point
ordinal0Unique, for curve, ordinal number of first point
ordinal1Unique, for curve, ordinal number of second point

Definition at line 228 of file Document.cpp.

235{
236 LOG4CPP_INFO_S ((*mainCat)) << "Document::addScaleWithGeneratedIdentifier";
237
238 const bool IS_X_ONLY = false;
239
241 QPointF (0, 0),
243 ordinal0,
244 IS_X_ONLY);
246 QPointF (scaleLength, 0),
248 ordinal1,
249 IS_X_ONLY);
250}

◆ checkAddPointAxis()

void Document::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)

Definition at line 268 of file Document.cpp.

273{
274 LOG4CPP_INFO_S ((*mainCat)) << "Document::checkAddPointAxis";
275
276 m_coordSystemContext.checkAddPointAxis(posScreen,
277 posGraph,
278 isError,
279 errorMessage,
280 isXOnly,
281 m_documentAxesPointsRequired);
282}
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...

◆ checkEditPointAxis()

void Document::checkEditPointAxis ( const QString & pointIdentifier,
const QPointF & posScreen,
const QPointF & posGraph,
bool & isError,
QString & errorMessage )

Check before calling editPointAxis.

Definition at line 284 of file Document.cpp.

289{
290 LOG4CPP_INFO_S ((*mainCat)) << "Document::checkEditPointAxis";
291
292 m_coordSystemContext.checkEditPointAxis(pointIdentifier,
293 posScreen,
294 posGraph,
295 isError,
296 errorMessage,
297 m_documentAxesPointsRequired);
298}
virtual void checkEditPointAxis(const QString &pointIdentifier, const QPointF &posScreen, const QPointF &posGraph, bool &isError, QString &errorMessage, DocumentAxesPointsRequired documentAxesPointsRequired)
Check before calling editPointAxis.

◆ coordSystem()

const CoordSystem & Document::coordSystem ( ) const

Currently active CoordSystem.

Definition at line 300 of file Document.cpp.

301{
302 LOG4CPP_INFO_S ((*mainCat)) << "Document::coordSystem";
303
304 return m_coordSystemContext.coordSystem();
305}
const CoordSystem & coordSystem() const
Current CoordSystem.

◆ coordSystemCount()

unsigned int Document::coordSystemCount ( ) const

Number of CoordSystem.

Definition at line 307 of file Document.cpp.

308{
309 LOG4CPP_INFO_S ((*mainCat)) << "Document::coordSystemCount";
310
311 return m_coordSystemContext.coordSystemCount();
312}
unsigned int coordSystemCount() const
Number of CoordSystem.

◆ coordSystemIndex()

CoordSystemIndex Document::coordSystemIndex ( ) const

Index of current active CoordSystem.

Definition at line 314 of file Document.cpp.

315{
316 LOG4CPP_INFO_S ((*mainCat)) << "Document::coordSystemIndex";
317
318 return m_coordSystemContext.coordSystemIndex();
319}
CoordSystemIndex coordSystemIndex() const
Index of current CoordSystem.

◆ curveAxes()

const Curve & Document::curveAxes ( ) const

Get method for axis curve.

Definition at line 321 of file Document.cpp.

322{
323 LOG4CPP_INFO_S ((*mainCat)) << "Document::curveAxes";
324
325 return m_coordSystemContext.curveAxes();
326}
virtual const Curve & curveAxes() const
Get method for axis curve.

◆ curveForCurveName()

const Curve * Document::curveForCurveName ( const QString & curveName) const

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

Definition at line 335 of file Document.cpp.

336{
337 LOG4CPP_INFO_S ((*mainCat)) << "Document::curveForCurveName";
338
339 return m_coordSystemContext.curveForCurveName (curveName);
340}
virtual Curve * curveForCurveName(const QString &curveName)
See CurvesGraphs::curveForCurveName, although this also works for AXIS_CURVE_NAME.

◆ curvesGraphs()

const CurvesGraphs & Document::curvesGraphs ( ) const

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

Definition at line 342 of file Document.cpp.

343{
344 LOG4CPP_INFO_S ((*mainCat)) << "Document::curvesGraphs";
345
346 return m_coordSystemContext.curvesGraphs();
347}
virtual const CurvesGraphs & curvesGraphs() const
Make all Curves available, read only, for CmdAbstract classes only.

◆ curvesGraphsNames()

QStringList Document::curvesGraphsNames ( ) const

See CurvesGraphs::curvesGraphsNames.

Definition at line 349 of file Document.cpp.

350{
351 LOG4CPP_INFO_S ((*mainCat)) << "Document::curvesGraphsNames";
352
353 return m_coordSystemContext.curvesGraphsNames();
354}
virtual QStringList curvesGraphsNames() const
See CurvesGraphs::curvesGraphsNames.

◆ curvesGraphsNumPoints()

int Document::curvesGraphsNumPoints ( const QString & curveName) const

See CurvesGraphs::curvesGraphsNumPoints.

Definition at line 356 of file Document.cpp.

357{
358 LOG4CPP_INFO_S ((*mainCat)) << "Document::curvesGraphsNumPoints";
359
360 return m_coordSystemContext.curvesGraphsNumPoints(curveName);
361}
virtual int curvesGraphsNumPoints(const QString &curveName) const
See CurvesGraphs::curvesGraphsNumPoints.

◆ documentAxesPointsRequired()

DocumentAxesPointsRequired Document::documentAxesPointsRequired ( ) const

Get method for DocumentAxesPointsRequired.

Definition at line 363 of file Document.cpp.

364{
365 return m_documentAxesPointsRequired;
366}

◆ editPointAxis()

void Document::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.

Definition at line 368 of file Document.cpp.

370{
371 LOG4CPP_INFO_S ((*mainCat)) << "Document::editPointAxis";
372
373 m_coordSystemContext.editPointAxis(posGraph,
374 identifier);
375}
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...

◆ editPointGraph()

void Document::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.

Definition at line 377 of file Document.cpp.

383{
384 LOG4CPP_INFO_S ((*mainCat)) << "Document::editPointCurve";
385
386 m_coordSystemContext.editPointGraph (isX,
387 isY,
388 x,
389 y,
391 transformation);
392}
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.

◆ initializeGridDisplay()

void Document::initializeGridDisplay ( const Transformation & transformation)

Initialize grid display. This is called immediately after the transformation has been defined for the first time.

Definition at line 411 of file Document.cpp.

412{
413 LOG4CPP_INFO_S ((*mainCat)) << "Document::initializeGridDisplay";
414
415 ENGAUGE_ASSERT (!m_coordSystemContext.modelGridDisplay().stable());
416
417 // Get graph coordinate bounds
418 CallbackBoundingRects ftor (m_documentAxesPointsRequired,
419 transformation);
420
423
425
426 // Initialize. Note that if there are no graph points then these next steps have no effect
427 bool isEmpty;
428 QPointF boundingRectGraphMin = ftor.boundingRectGraphMin (isEmpty);
429 QPointF boundingRectGraphMax = ftor.boundingRectGraphMax (isEmpty);
430 if (!isEmpty) {
431
433
434 DocumentModelGridDisplay modelGridDisplay = gridInitializer.initializeWithWidePolarCoverage (boundingRectGraphMin,
435 boundingRectGraphMax,
436 modelCoords(),
437 transformation,
438 m_pixmap.size ());
439
440 m_coordSystemContext.setModelGridDisplay (modelGridDisplay);
441 }
442}
#define ENGAUGE_ASSERT(cond)
Drop in replacement for Q_ASSERT if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS) define ENGAUGE...
Callback for computing the bounding rectangles of the screen and graph coordinates of the points in t...
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
virtual DocumentModelGridDisplay modelGridDisplay() const
Get method for DocumentModelGridDisplay.
virtual void setModelGridDisplay(const DocumentModelGridDisplay &modelGridDisplay)
Set method for DocumentModelGridDisplay.
Model for DlgSettingsGridDisplay and CmdSettingsGridDisplay.
bool stable() const
Get method for stable flag.
void iterateThroughCurvePointsAxes(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
See Curve::iterateThroughCurvePoints, for the axes curve.
Definition Document.cpp:449
DocumentModelCoords modelCoords() const
Get method for DocumentModelCoords.
Definition Document.cpp:695
DocumentModelGridDisplay modelGridDisplay() const
Get method for DocumentModelGridDisplay.
Definition Document.cpp:730
This class initializes the count, start, step and stop parameters for one coordinate (either x/theta ...

◆ isXOnly()

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

See Curve::isXOnly.

Definition at line 444 of file Document.cpp.

445{
446 return m_coordSystemContext.isXOnly (pointIdentifier);
447}
bool isXOnly(const QString &pointIdentifier) const
True/false if y/x value is empty.

◆ iterateThroughCurvePointsAxes() [1/2]

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

See Curve::iterateThroughCurvePoints, for the axes curve.

Definition at line 449 of file Document.cpp.

450{
451 LOG4CPP_INFO_S ((*mainCat)) << "Document::iterateThroughCurvePointsAxes";
452
454}
virtual void iterateThroughCurvePointsAxes(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
See Curve::iterateThroughCurvePoints, for the axes curve.

◆ iterateThroughCurvePointsAxes() [2/2]

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

See Curve::iterateThroughCurvePoints, for the axes curve.

Definition at line 456 of file Document.cpp.

457{
458 LOG4CPP_INFO_S ((*mainCat)) << "Document::iterateThroughCurvePointsAxes";
459
461}

◆ iterateThroughCurveSegments()

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

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

Definition at line 463 of file Document.cpp.

465{
466 LOG4CPP_INFO_S ((*mainCat)) << "Document::iterateThroughCurveSegments";
467
468 m_coordSystemContext.iterateThroughCurveSegments(curveName,
470}
virtual void iterateThroughCurveSegments(const QString &curveName, const Functor2wRet< const Point &, const Point &, CallbackSearchReturn > &ftorWithCallback) const
See Curve::iterateThroughCurveSegments, for any axes or graph curve.

◆ iterateThroughCurvesPointsGraphs() [1/2]

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

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

Definition at line 472 of file Document.cpp.

473{
474 LOG4CPP_INFO_S ((*mainCat)) << "Document::iterateThroughCurvesPointsGraphs";
475
477}
virtual void iterateThroughCurvesPointsGraphs(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
See Curve::iterateThroughCurvePoints, for all the graphs curves.

◆ iterateThroughCurvesPointsGraphs() [2/2]

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

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

Definition at line 479 of file Document.cpp.

480{
481 LOG4CPP_INFO_S ((*mainCat)) << "Document::iterateThroughCurvesPointsGraphs";
482
484}

◆ loadCurvesFile()

bool Document::loadCurvesFile ( const QString & curvesFile)

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

◆ modelAxesChecker()

DocumentModelAxesChecker Document::modelAxesChecker ( ) const

Get method for DocumentModelAxesChecker.

Definition at line 681 of file Document.cpp.

682{
683 LOG4CPP_DEBUG_S ((*mainCat)) << "Document::modelAxesChecker";
684
685 return m_coordSystemContext.modelAxesChecker();
686}
virtual DocumentModelAxesChecker modelAxesChecker() const
Get method for DocumentModelAxesChecker.
#define LOG4CPP_DEBUG_S(logger)
Definition convenience.h:20

◆ modelColorFilter()

DocumentModelColorFilter Document::modelColorFilter ( ) const

Get method for DocumentModelColorFilter.

Definition at line 688 of file Document.cpp.

689{
690 LOG4CPP_DEBUG_S ((*mainCat)) << "Document::modelColorFilter";
691
692 return m_coordSystemContext.modelColorFilter();
693}
virtual DocumentModelColorFilter modelColorFilter() const
Get method for DocumentModelColorFilter.

◆ modelCoords()

DocumentModelCoords Document::modelCoords ( ) const

Get method for DocumentModelCoords.

Definition at line 695 of file Document.cpp.

696{
697 LOG4CPP_DEBUG_S ((*mainCat)) << "Document::modelCoords";
698
699 return m_coordSystemContext.modelCoords();
700}
virtual DocumentModelCoords modelCoords() const
Get method for DocumentModelCoords.

◆ modelCurveStyles()

CurveStyles Document::modelCurveStyles ( ) const

Get method for CurveStyles.

Definition at line 702 of file Document.cpp.

703{
704 LOG4CPP_DEBUG_S ((*mainCat)) << "Document::modelCurveStyles";
705
706 return m_coordSystemContext.modelCurveStyles();
707}
virtual CurveStyles modelCurveStyles() const
Get method for CurveStyles.

◆ modelDigitizeCurve()

DocumentModelDigitizeCurve Document::modelDigitizeCurve ( ) const

Get method for DocumentModelDigitizeCurve.

Definition at line 709 of file Document.cpp.

710{
711 LOG4CPP_DEBUG_S ((*mainCat)) << "Document::modelDigitizeCurve";
712
713 return m_coordSystemContext.modelDigitizeCurve();
714}
virtual DocumentModelDigitizeCurve modelDigitizeCurve() const
Get method for DocumentModelDigitizeCurve.

◆ modelExport()

DocumentModelExportFormat Document::modelExport ( ) const

Get method for DocumentModelExportFormat.

Definition at line 716 of file Document.cpp.

717{
718 LOG4CPP_DEBUG_S ((*mainCat)) << "Document::modelExport";
719
720 return m_coordSystemContext.modelExport();
721}
virtual DocumentModelExportFormat modelExport() const
Get method for DocumentModelExportFormat.

◆ modelGeneral()

DocumentModelGeneral Document::modelGeneral ( ) const

Get method for DocumentModelGeneral.

Definition at line 723 of file Document.cpp.

724{
725 LOG4CPP_DEBUG_S ((*mainCat)) << "Document::modelGeneral";
726
727 return m_coordSystemContext.modelGeneral();
728}
virtual DocumentModelGeneral modelGeneral() const
Get method for DocumentModelGeneral.

◆ modelGridDisplay()

DocumentModelGridDisplay Document::modelGridDisplay ( ) const

Get method for DocumentModelGridDisplay.

Definition at line 730 of file Document.cpp.

731{
732 LOG4CPP_DEBUG_S ((*mainCat)) << "Document::modelGridDisplay";
733
734 return m_coordSystemContext.modelGridDisplay();
735}

◆ modelGridRemoval()

DocumentModelGridRemoval Document::modelGridRemoval ( ) const

Get method for DocumentModelGridRemoval.

Definition at line 737 of file Document.cpp.

738{
739 LOG4CPP_DEBUG_S ((*mainCat)) << "Document::modelGridRemoval";
740
741 return m_coordSystemContext.modelGridRemoval();
742}
virtual DocumentModelGridRemoval modelGridRemoval() const
Get method for DocumentModelGridRemoval.

◆ modelPointMatch()

DocumentModelPointMatch Document::modelPointMatch ( ) const

Get method for DocumentModelPointMatch.

Definition at line 744 of file Document.cpp.

745{
746 LOG4CPP_DEBUG_S ((*mainCat)) << "Document::modelPointMatch";
747
748 return m_coordSystemContext.modelPointMatch();
749}
virtual DocumentModelPointMatch modelPointMatch() const
Get method for DocumentModelPointMatch.

◆ modelSegments()

DocumentModelSegments Document::modelSegments ( ) const

Get method for DocumentModelSegments.

Definition at line 751 of file Document.cpp.

752{
753 LOG4CPP_DEBUG_S ((*mainCat)) << "Document::modelSegments";
754
755 return m_coordSystemContext.modelSegments();
756}
virtual DocumentModelSegments modelSegments() const
Get method for DocumentModelSegments.

◆ movePoint()

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

See Curve::movePoint.

Definition at line 758 of file Document.cpp.

760{
761 m_coordSystemContext.movePoint (pointIdentifier,
763}
virtual void movePoint(const QString &pointIdentifier, const QPointF &deltaScreen)
See Curve::movePoint.

◆ nextOrdinalForCurve()

int Document::nextOrdinalForCurve ( const QString & curveName) const

Default next ordinal value for specified curve.

Definition at line 765 of file Document.cpp.

766{
767 LOG4CPP_INFO_S ((*mainCat)) << "Document::nextOrdinalForCurve";
768
769 return m_coordSystemContext.nextOrdinalForCurve(curveName);
770}
virtual int nextOrdinalForCurve(const QString &curveName) const
Default next ordinal value for specified curve.

◆ pixmap()

QPixmap Document::pixmap ( ) const

Return the image that is being digitized.

Definition at line 817 of file Document.cpp.

818{
819 return m_pixmap;
820}

◆ positionGraph()

QPointF Document::positionGraph ( const QString & pointIdentifier) const

See Curve::positionGraph.

Definition at line 822 of file Document.cpp.

823{
824 return m_coordSystemContext.positionGraph(pointIdentifier);
825}
virtual QPointF positionGraph(const QString &pointIdentifier) const
See Curve::positionGraph.

◆ positionScreen()

QPointF Document::positionScreen ( const QString & pointIdentifier) const

See Curve::positionScreen.

Definition at line 827 of file Document.cpp.

828{
829 return m_coordSystemContext.positionScreen(pointIdentifier);
830}
virtual QPointF positionScreen(const QString &pointIdentifier) const
See Curve::positionScreen.

◆ print()

void Document::print ( ) const

Debugging method for printing directly from symbolic debugger.

Definition at line 832 of file Document.cpp.

833{
836
837 printStream ("",
838 str);
839 std::cerr << text.toLatin1().data();
840}
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
Definition Document.cpp:842

◆ printStream()

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

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

Definition at line 842 of file Document.cpp.

844{
845 str << indentation << "Document\n";
846
848
849 str << indentation << "name=" << m_name << "\n";
850 str << indentation << "pixmap=" << m_pixmap.width() << "x" << m_pixmap.height() << "\n";
851
852 m_coordSystemContext.printStream(indentation,
853 str);
854}
const QString INDENTATION_DELTA
virtual void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...

◆ reasonForUnsuccessfulRead()

QString Document::reasonForUnsuccessfulRead ( ) const

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

Definition at line 856 of file Document.cpp.

857{
858 ENGAUGE_ASSERT (!m_successfulRead);
859
860 return m_reasonForUnsuccessfulRead;
861}

◆ removePointAxis()

void Document::removePointAxis ( const QString & identifier)

Perform the opposite of addPointAxis.

Definition at line 863 of file Document.cpp.

864{
865 LOG4CPP_INFO_S ((*mainCat)) << "Document::removePointAxis";
866
867 m_coordSystemContext.removePointAxis(identifier);
868}
virtual void removePointAxis(const QString &identifier)
Perform the opposite of addPointAxis.

◆ removePointGraph()

void Document::removePointGraph ( const QString & identifier)

Perform the opposite of addPointGraph.

Definition at line 870 of file Document.cpp.

871{
872 LOG4CPP_INFO_S ((*mainCat)) << "Document::removePointGraph";
873
874 m_coordSystemContext.removePointGraph(identifier);
875}
virtual void removePointGraph(const QString &identifier)
Perform the opposite of addPointGraph.

◆ removePointsInCurvesGraphs()

void Document::removePointsInCurvesGraphs ( CurvesGraphs & curvesGraphs)

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

Definition at line 877 of file Document.cpp.

878{
879 LOG4CPP_INFO_S ((*mainCat)) << "Document::removePointsInCurvesGraphs";
880
881 m_coordSystemContext.removePointsInCurvesGraphs(curvesGraphs);
882}
virtual void removePointsInCurvesGraphs(CurvesGraphs &curvesGraphs)
Remove all points identified in the specified CurvesGraphs. See also addPointsInCurvesGraphs.

◆ saveXml()

void Document::saveXml ( QXmlStreamWriter & writer) const

Save document to xml.

Definition at line 884 of file Document.cpp.

885{
886 writer.writeStartElement(DOCUMENT_SERIALIZE_DOCUMENT);
887
888 // Version number is tacked onto DOCUMENT_SERIALIZE_DOCUMENT since the alternative (creating a new start element)
889 // causes the code to complain during loading
891
892 // Number of axes points required
893 writer.writeAttribute(DOCUMENT_SERIALIZE_AXES_POINTS_REQUIRED, QString::number (m_documentAxesPointsRequired));
894
895 // Serialize the Document image. That binary data is encoded as base64
897 QDataStream str (&array, QIODevice::WriteOnly);
898 QImage img = m_pixmap.toImage ();
899 str << img;
900 writer.writeStartElement(DOCUMENT_SERIALIZE_IMAGE);
901
902 // Image width and height are explicitly inserted for error reports, since the CDATA is removed
903 // but we still want the image size for reconstructing the error(s)
904 writer.writeAttribute(DOCUMENT_SERIALIZE_IMAGE_WIDTH, QString::number (img.width()));
905 writer.writeAttribute(DOCUMENT_SERIALIZE_IMAGE_HEIGHT, QString::number (img.height()));
906
907 writer.writeCDATA (array.toBase64 ());
908 writer.writeEndElement();
909
910 m_coordSystemContext.saveXml (writer);
911}
const QString DOCUMENT_SERIALIZE_AXES_POINTS_REQUIRED
const QString DOCUMENT_SERIALIZE_IMAGE
const QString DOCUMENT_SERIALIZE_IMAGE_HEIGHT
const QString DOCUMENT_SERIALIZE_IMAGE_WIDTH
const QString DOCUMENT_SERIALIZE_DOCUMENT
const QString DOCUMENT_SERIALIZE_APPLICATION_VERSION_NUMBER
virtual void saveXml(QXmlStreamWriter &writer) const
Save graph to xml.

◆ selectedCurveName()

QString Document::selectedCurveName ( ) const

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

Definition at line 913 of file Document.cpp.

914{
915 return m_coordSystemContext.selectedCurveName();
916}
virtual QString selectedCurveName() const
Currently selected curve name. This is used to set the selected curve combobox in MainWindow.

◆ setCoordSystemIndex()

void Document::setCoordSystemIndex ( CoordSystemIndex coordSystemIndex)

Set the index of current active CoordSystem.

Definition at line 918 of file Document.cpp.

919{
920 LOG4CPP_INFO_S ((*mainCat)) << "Document::setCoordSystemIndex";
921
922 m_coordSystemContext.setCoordSystemIndex (coordSystemIndex);
923}
void setCoordSystemIndex(CoordSystemIndex coordSystemIndex)
Index of current CoordSystem.
CoordSystemIndex coordSystemIndex() const
Index of current active CoordSystem.
Definition Document.cpp:314

◆ setCurveAxes()

void Document::setCurveAxes ( const Curve & curveAxes)

Let CmdAbstract classes overwrite axes Curve.

Definition at line 925 of file Document.cpp.

926{
927 LOG4CPP_INFO_S ((*mainCat)) << "Document::setCurveAxes";
928
929 m_coordSystemContext.setCurveAxes (curveAxes);
930}
virtual void setCurveAxes(const Curve &curveAxes)
Let CmdAbstract classes overwrite axes Curve. Applies to current coordinate system.
const Curve & curveAxes() const
Get method for axis curve.
Definition Document.cpp:321

◆ setCurvesGraphs()

void Document::setCurvesGraphs ( const CurvesGraphs & curvesGraphs)

Let CmdAbstract classes overwrite CurvesGraphs.

Definition at line 932 of file Document.cpp.

933{
934 LOG4CPP_INFO_S ((*mainCat)) << "Document::setCurvesGraphs";
935
936 m_coordSystemContext.setCurvesGraphs(curvesGraphs);
937}
virtual void setCurvesGraphs(const CurvesGraphs &curvesGraphs)
Let CmdAbstract classes overwrite CurvesGraphs. Applies to current coordinate system.

◆ setDocumentAxesPointsRequired()

void Document::setDocumentAxesPointsRequired ( DocumentAxesPointsRequired documentAxesPointsRequired)

Set the number of axes points required.

This is called during the Document creation process, after imported images have been previewed or loaded files have had at least some xml parsing

Definition at line 939 of file Document.cpp.

940{
941 LOG4CPP_INFO_S ((*mainCat)) << "Document::setDocumentAxesPointsRequired";
942
943 m_documentAxesPointsRequired = documentAxesPointsRequired;
944
946
947 overrideGraphDefaultsWithMapDefaults ();
948 }
949}
@ DOCUMENT_AXES_POINTS_REQUIRED_2
DocumentAxesPointsRequired documentAxesPointsRequired() const
Get method for DocumentAxesPointsRequired.
Definition Document.cpp:363

◆ setModelAxesChecker()

void Document::setModelAxesChecker ( const DocumentModelAxesChecker & modelAxesChecker)

Set method for DocumentModelAxesChecker.

Definition at line 951 of file Document.cpp.

952{
953 LOG4CPP_INFO_S ((*mainCat)) << "Document::setModelAxesChecker";
954
955 m_coordSystemContext.setModelAxesChecker(modelAxesChecker);
956}
virtual void setModelAxesChecker(const DocumentModelAxesChecker &modelAxesChecker)
Set method for DocumentModelAxesChecker.
DocumentModelAxesChecker modelAxesChecker() const
Get method for DocumentModelAxesChecker.
Definition Document.cpp:681

◆ setModelColorFilter()

void Document::setModelColorFilter ( const DocumentModelColorFilter & modelColorFilter)

Set method for DocumentModelColorFilter.

Definition at line 958 of file Document.cpp.

959{
960 LOG4CPP_INFO_S ((*mainCat)) << "Document::setModelColorFilter";
961
962 // Save the CurveFilter for each Curve
963 ColorFilterSettingsList::const_iterator itr;
964 for (itr = modelColorFilter.colorFilterSettingsList().constBegin ();
966 itr++) {
967
968 QString curveName = itr.key();
969 const ColorFilterSettings &colorFilterSettings = itr.value();
970
971 Curve *curve = curveForCurveName (curveName);
972 curve->setColorFilterSettings (colorFilterSettings);
973 }
974}
Color filter parameters for one curve. For a class, this is handled the same as LineStyle and PointSt...
Container for one set of digitized Points.
Definition Curve.h:34
const ColorFilterSettingsList & colorFilterSettingsList() const
Get method for copying all color filters in one step.
DocumentModelColorFilter modelColorFilter() const
Get method for DocumentModelColorFilter.
Definition Document.cpp:688
const Curve * curveForCurveName(const QString &curveName) const
See CurvesGraphs::curveForCurveNames, although this also works for AXIS_CURVE_NAME.
Definition Document.cpp:335

◆ setModelCoords()

void Document::setModelCoords ( const DocumentModelCoords & modelCoords)

Set method for DocumentModelCoords.

Definition at line 976 of file Document.cpp.

977{
978 LOG4CPP_INFO_S ((*mainCat)) << "Document::setModelCoords";
979
980 m_coordSystemContext.setModelCoords(modelCoords);
981}
virtual void setModelCoords(const DocumentModelCoords &modelCoords)
Set method for DocumentModelCoords.

◆ setModelCurveStyles()

void Document::setModelCurveStyles ( const CurveStyles & modelCurveStyles)

Set method for CurveStyles.

Definition at line 983 of file Document.cpp.

984{
985 LOG4CPP_INFO_S ((*mainCat)) << "Document::setModelCurveStyles";
986
987 // Save the LineStyle and PointStyle for each Curve
989 QStringList::iterator itr;
990 for (itr = curveNames.begin(); itr != curveNames.end(); itr++) {
991
992 QString curveName = *itr;
993 const CurveStyle &curveStyle = modelCurveStyles.curveStyle (curveName);
994
995 Curve *curve = curveForCurveName (curveName);
996 curve->setCurveStyle (curveStyle);
997 }
998}
Container for LineStyle and PointStyle for one Curve.
Definition CurveStyle.h:19
CurveStyle curveStyle(const QString &curveName) const
CurveStyle in specified curve.
QStringList curveNames() const
List of all curve names.
CurveStyles modelCurveStyles() const
Get method for CurveStyles.
Definition Document.cpp:702

◆ setModelDigitizeCurve()

void Document::setModelDigitizeCurve ( const DocumentModelDigitizeCurve & modelDigitizeCurve)

Set method for DocumentModelDigitizeCurve.

Definition at line 1000 of file Document.cpp.

1001{
1002 LOG4CPP_INFO_S ((*mainCat)) << "Document::setModelDigitizeCurve";
1003
1004 m_coordSystemContext.setModelDigitizeCurve(modelDigitizeCurve);
1005}
virtual void setModelDigitizeCurve(const DocumentModelDigitizeCurve &modelDigitizeCurve)
Set method for DocumentModelDigitizeCurve.
DocumentModelDigitizeCurve modelDigitizeCurve() const
Get method for DocumentModelDigitizeCurve.
Definition Document.cpp:709

◆ setModelExport()

void Document::setModelExport ( const DocumentModelExportFormat & modelExport)

Set method for DocumentModelExportFormat.

Definition at line 1007 of file Document.cpp.

1008{
1009 LOG4CPP_INFO_S ((*mainCat)) << "Document::setModelExport";
1010
1011 m_coordSystemContext.setModelExport (modelExport);
1012}
virtual void setModelExport(const DocumentModelExportFormat &modelExport)
Set method for DocumentModelExportFormat.
DocumentModelExportFormat modelExport() const
Get method for DocumentModelExportFormat.
Definition Document.cpp:716

◆ setModelGeneral()

void Document::setModelGeneral ( const DocumentModelGeneral & modelGeneral)

Set method for DocumentModelGeneral.

Definition at line 1014 of file Document.cpp.

1015{
1016 LOG4CPP_INFO_S ((*mainCat)) << "Document::setModelGeneral";
1017
1018 m_coordSystemContext.setModelGeneral(modelGeneral);
1019}
virtual void setModelGeneral(const DocumentModelGeneral &modelGeneral)
Set method for DocumentModelGeneral.
DocumentModelGeneral modelGeneral() const
Get method for DocumentModelGeneral.
Definition Document.cpp:723

◆ setModelGridDisplay()

void Document::setModelGridDisplay ( const DocumentModelGridDisplay & modelGridDisplay)

Set method for DocumentModelGridDisplay.

Definition at line 1021 of file Document.cpp.

1022{
1023 LOG4CPP_INFO_S ((*mainCat)) << "Document::setModelGridDisplay";
1024
1025 m_coordSystemContext.setModelGridDisplay(modelGridDisplay);
1026}

◆ setModelGridRemoval()

void Document::setModelGridRemoval ( const DocumentModelGridRemoval & modelGridRemoval)

Set method for DocumentModelGridRemoval.

Definition at line 1028 of file Document.cpp.

1029{
1030 LOG4CPP_INFO_S ((*mainCat)) << "Document::setModelGridRemoval";
1031
1032 m_coordSystemContext.setModelGridRemoval(modelGridRemoval);
1033}
virtual void setModelGridRemoval(const DocumentModelGridRemoval &modelGridRemoval)
Set method for DocumentModelGridRemoval.
DocumentModelGridRemoval modelGridRemoval() const
Get method for DocumentModelGridRemoval.
Definition Document.cpp:737

◆ setModelPointMatch()

void Document::setModelPointMatch ( const DocumentModelPointMatch & modelPointMatch)

Set method for DocumentModelPointMatch.

Definition at line 1035 of file Document.cpp.

1036{
1037 LOG4CPP_INFO_S ((*mainCat)) << "Document::setModelPointMatch";
1038
1039 m_coordSystemContext.setModelPointMatch(modelPointMatch);
1040}
void setModelPointMatch(const DocumentModelPointMatch &modelPointMatch)
Set method for DocumentModelPointMatch.
DocumentModelPointMatch modelPointMatch() const
Get method for DocumentModelPointMatch.
Definition Document.cpp:744

◆ setModelSegments()

void Document::setModelSegments ( const DocumentModelSegments & modelSegments)

Set method for DocumentModelSegments.

Definition at line 1042 of file Document.cpp.

1043{
1044 LOG4CPP_INFO_S ((*mainCat)) << "Document::setModelSegments";
1045
1046 m_coordSystemContext.setModelSegments (modelSegments);
1047}
virtual void setModelSegments(const DocumentModelSegments &modelSegments)
Set method for DocumentModelSegments.
DocumentModelSegments modelSegments() const
Get method for DocumentModelSegments.
Definition Document.cpp:751

◆ setPixmap()

void Document::setPixmap ( const QImage & image)

Set method for the background pixmap.

Definition at line 1049 of file Document.cpp.

1050{
1051 LOG4CPP_INFO_S ((*mainCat)) << "Document::setPixmap";
1052
1053 m_pixmap = QPixmap::fromImage (image);
1054}

◆ setSelectedCurveName()

void Document::setSelectedCurveName ( const QString & selectedCurveName)

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

Definition at line 1056 of file Document.cpp.

1057{
1058 m_coordSystemContext.setSelectedCurveName (selectedCurveName);
1059}
virtual void setSelectedCurveName(const QString &selectedCurveName)
Save curve name that is selected for the current coordinate system, for the next time the coordinate ...
QString selectedCurveName() const
Currently selected curve name. This is used to set the selected curve combobox in MainWindow.
Definition Document.cpp:913

◆ successfulRead()

bool Document::successfulRead ( ) const

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

Definition at line 1061 of file Document.cpp.

1062{
1063 return m_successfulRead;
1064}

◆ updatePointOrdinals()

void Document::updatePointOrdinals ( const Transformation & transformation)

Update point ordinals after point addition/removal or dragging.

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

Definition at line 1066 of file Document.cpp.

1067{
1068 LOG4CPP_INFO_S ((*mainCat)) << "Document::updatePointOrdinals";
1069
1070 m_coordSystemContext.updatePointOrdinals(transformation);
1071}
virtual void updatePointOrdinals(const Transformation &transformation)
Update point ordinals after point addition/removal or dragging.

The documentation for this class was generated from the following files: