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

Class that represents one digitized point. The screen-to-graph coordinate transformation is always external to this class. More...

#include <Point.h>

Public Member Functions

 Point ()
 Default constructor so this class can be used inside a container.
 
 Point (const QString &curveName, const QPointF &posScreen)
 Constructor for Checker temporary points, before real point gets added.
 
 Point (const QString &curveName, const QPointF &posScreen, const QPointF &posGraph, bool isXOnly)
 Constructor for temporary point used to pre-check transformation points, before real point gets added.
 
 Point (const QString &curveName, const QString &identifier, const QPointF &posScreen, const QPointF &posGraph, double ordinal, bool isXOnly)
 Constructor for axis points with identifier (after redo). The position, in screen coordinates, applies to the center of the Point.
 
 Point (const QString &curveName, const QPointF &posScreen, const QPointF &posGraph, double ordinal, bool isXOnly)
 Constructor for axis points without identifier (after redo). The position, in screen coordinates, applies to the center of the Point.
 
 Point (const QString &curveName, const QString &identifier, const QPointF &posScreen, double ordinal)
 Constructor for graph points with identifier (after redo)
 
 Point (const QString &curveName, const QPointF &posScreen, double ordinal)
 Constructor for graph points without identifier (after redo)
 
 Point (QXmlStreamReader &reader)
 Constructor when loading from serialized xml.
 
Pointoperator= (const Point &point)
 Assignment constructor.
 
 Point (const Point &point)
 Copy constructor.
 
bool hasOrdinal () const
 True if ordinal is defined.
 
bool hasPosGraph () const
 True if graph position is defined.
 
QString identifier () const
 Unique identifier for a specific Point.
 
bool isXOnly () const
 In DOCUMENT_AXES_POINTS_REQUIRED_4 modes, this is true/false if y/x coordinate is undefined.
 
bool isAxisPoint () const
 True if point is an axis point. This is used only for sanity checks.
 
double ordinal (ApplyHasCheck applyHasCheck=KEEP_HAS_CHECK) const
 Get method for ordinal. Skip check if copying one instance to another.
 
QPointF posGraph (ApplyHasCheck applyHasCheck=KEEP_HAS_CHECK) const
 Accessor for graph position. Skip check if copying one instance to another.
 
QPointF posScreen () const
 Accessor for screen position.
 
void printStream (QString indentation, QTextStream &str) const
 Debugging method that supports print method of this class and printStream method of some other class(es)
 
void saveXml (QXmlStreamWriter &writer) const
 Serialize to stream.
 
void setCurveName (const QString &curveName)
 Update the point identifer to match the specified curve name.
 
void setOrdinal (double ordinal)
 Set the ordinal used for ordering Points.
 
void setPosGraph (const QPointF &posGraph)
 Set method for position in graph coordinates.
 
void setPosScreen (const QPointF &posScreen)
 Set method for position in screen coordinates.
 

Static Public Member Functions

static QString curveNameFromPointIdentifier (const QString &pointIdentifier)
 Parse the curve name from the specified point identifier. This does the opposite of uniqueIdentifierGenerator.
 
static unsigned int identifierIndex ()
 Return the current index for storage in case we need to reset it later while performing a Redo.
 
static void setIdentifierIndex (unsigned int identifierIndex)
 Reset the current index while performing a Redo.
 
static QString temporaryPointIdentifier ()
 Point identifier for temporary point that is used by DigitzeStateAxis.
 
static double UNDEFINED_ORDINAL ()
 Get method for undefined ordinal constant.
 

Detailed Description

Class that represents one digitized point. The screen-to-graph coordinate transformation is always external to this class.

Definition at line 23 of file Point.h.

Constructor & Destructor Documentation

◆ Point() [1/9]

Point::Point ( )

Default constructor so this class can be used inside a container.

Definition at line 29 of file Point.cpp.

◆ Point() [2/9]

Point::Point ( const QString &  curveName,
const QPointF &  posScreen 
)

Constructor for Checker temporary points, before real point gets added.

The position, in screen coordinates, applies to the center of the Point

Definition at line 33 of file Point.cpp.

◆ Point() [3/9]

Point::Point ( const QString &  curveName,
const QPointF &  posScreen,
const QPointF &  posGraph,
bool  isXOnly 
)

Constructor for temporary point used to pre-check transformation points, before real point gets added.

The position, in screen coordinates, applies to the center of the Point

Definition at line 52 of file Point.cpp.

◆ Point() [4/9]

Point::Point ( const QString &  curveName,
const QString &  identifier,
const QPointF &  posScreen,
const QPointF &  posGraph,
double  ordinal,
bool  isXOnly 
)

Constructor for axis points with identifier (after redo). The position, in screen coordinates, applies to the center of the Point.

Definition at line 78 of file Point.cpp.

◆ Point() [5/9]

Point::Point ( const QString &  curveName,
const QPointF &  posScreen,
const QPointF &  posGraph,
double  ordinal,
bool  isXOnly 
)

Constructor for axis points without identifier (after redo). The position, in screen coordinates, applies to the center of the Point.

Definition at line 106 of file Point.cpp.

◆ Point() [6/9]

Point::Point ( const QString &  curveName,
const QString &  identifier,
const QPointF &  posScreen,
double  ordinal 
)

Constructor for graph points with identifier (after redo)

Definition at line 133 of file Point.cpp.

◆ Point() [7/9]

Point::Point ( const QString &  curveName,
const QPointF &  posScreen,
double  ordinal 
)

Constructor for graph points without identifier (after redo)

Definition at line 157 of file Point.cpp.

◆ Point() [8/9]

Point::Point ( QXmlStreamReader &  reader)

Constructor when loading from serialized xml.

Definition at line 177 of file Point.cpp.

◆ Point() [9/9]

Point::Point ( const Point point)

Copy constructor.

Definition at line 182 of file Point.cpp.

Member Function Documentation

◆ curveNameFromPointIdentifier()

QString Point::curveNameFromPointIdentifier ( const QString &  pointIdentifier)
static

Parse the curve name from the specified point identifier. This does the opposite of uniqueIdentifierGenerator.

Definition at line 227 of file Point.cpp.

◆ hasOrdinal()

bool Point::hasOrdinal ( ) const

True if ordinal is defined.

Definition at line 246 of file Point.cpp.

◆ hasPosGraph()

bool Point::hasPosGraph ( ) const

True if graph position is defined.

Definition at line 251 of file Point.cpp.

◆ identifier()

QString Point::identifier ( ) const

Unique identifier for a specific Point.

Definition at line 256 of file Point.cpp.

◆ identifierIndex()

unsigned int Point::identifierIndex ( )
static

Return the current index for storage in case we need to reset it later while performing a Redo.

Definition at line 261 of file Point.cpp.

◆ isAxisPoint()

bool Point::isAxisPoint ( ) const

True if point is an axis point. This is used only for sanity checks.

Definition at line 269 of file Point.cpp.

◆ isXOnly()

bool Point::isXOnly ( ) const

In DOCUMENT_AXES_POINTS_REQUIRED_4 modes, this is true/false if y/x coordinate is undefined.

Definition at line 274 of file Point.cpp.

◆ operator=()

Point & Point::operator= ( const Point point)

Assignment constructor.

Definition at line 204 of file Point.cpp.

◆ ordinal()

double Point::ordinal ( ApplyHasCheck  applyHasCheck = KEEP_HAS_CHECK) const

Get method for ordinal. Skip check if copying one instance to another.

Definition at line 374 of file Point.cpp.

◆ posGraph()

QPointF Point::posGraph ( ApplyHasCheck  applyHasCheck = KEEP_HAS_CHECK) const

Accessor for graph position. Skip check if copying one instance to another.

Definition at line 383 of file Point.cpp.

◆ posScreen()

QPointF Point::posScreen ( ) const

Accessor for screen position.

Definition at line 392 of file Point.cpp.

◆ printStream()

void Point::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 397 of file Point.cpp.

◆ saveXml()

void Point::saveXml ( QXmlStreamWriter &  writer) const

Serialize to stream.

Definition at line 420 of file Point.cpp.

◆ setCurveName()

void Point::setCurveName ( const QString &  curveName)

Update the point identifer to match the specified curve name.

Definition at line 453 of file Point.cpp.

◆ setIdentifierIndex()

void Point::setIdentifierIndex ( unsigned int  identifierIndex)
static

Reset the current index while performing a Redo.

Definition at line 460 of file Point.cpp.

◆ setOrdinal()

void Point::setOrdinal ( double  ordinal)

Set the ordinal used for ordering Points.

Definition at line 468 of file Point.cpp.

◆ setPosGraph()

void Point::setPosGraph ( const QPointF &  posGraph)

Set method for position in graph coordinates.

Definition at line 478 of file Point.cpp.

◆ setPosScreen()

void Point::setPosScreen ( const QPointF &  posScreen)

Set method for position in screen coordinates.

Definition at line 492 of file Point.cpp.

◆ temporaryPointIdentifier()

QString Point::temporaryPointIdentifier ( )
static

Point identifier for temporary point that is used by DigitzeStateAxis.

Definition at line 501 of file Point.cpp.

◆ UNDEFINED_ORDINAL()

static double Point::UNDEFINED_ORDINAL ( )
inlinestatic

Get method for undefined ordinal constant.

Definition at line 132 of file Point.h.


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