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

Container for one set of digitized Points. More...

#include <Curve.h>

Public Member Functions

 Curve (const QString &curveName, const ColorFilterSettings &colorFilterSettings, const CurveStyle &curveStyle)
 Constructor from scratch.
 
 Curve (QDataStream &str)
 Constructor from serialized binary pre-version 6 file.
 
 Curve (QXmlStreamReader &reader)
 Constructor for use when loading from serialized xml.
 
 Curve (const Curve &curve)
 Copy constructor. Copying a Curve only helps for making a copy, since access to any Points inside must be via functor.
 
Curveoperator= (const Curve &curve)
 Assignment constructor.
 
void addPoint (Point point)
 Add Point to this Curve.
 
ColorFilterSettings colorFilterSettings () const
 Return the color filter.
 
QString curveName () const
 Name of this Curve.
 
CurveStyle curveStyle () const
 Return the curve style.
 
void editPoint (const QPointF &posGraph, const QString &identifier)
 Edit the graph coordinates of an axis point. This method does not apply to a graph point.
 
void exportToClipboard (const QHash< QString, bool > &selectedHash, const Transformation &transformation, QTextStream &strCsv, QTextStream &strHtml, CurvesGraphs &curvesGraphs) const
 Export points in this Curve found in the specified point list.
 
bool isXOnly (const QString &pointIdentifier) const
 Determine if specified point has just x coordinate. Otherwise has just y coordinate, or both x and y coordinates.
 
void iterateThroughCurvePoints (const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback) const
 Apply functor to Points on Curve.
 
void iterateThroughCurveSegments (const Functor2wRet< const Point &, const Point &, CallbackSearchReturn > &ftorWithCallback) const
 Apply functor to successive Points, as line segments, on Curve. This could be a bit slow.
 
void movePoint (const QString &pointIdentifier, const QPointF &deltaScreen)
 Translate the position of a point by the specified distance vector.
 
int numPoints () const
 Number of points.
 
const Points points () const
 Return a shallow copy of the Points.
 
QPointF positionGraph (const QString &pointIdentifier) const
 Return the position, in graph coordinates, of the specified Point.
 
QPointF positionScreen (const QString &pointIdentifier) const
 Return the position, in screen coordinates, of the specified Point.
 
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 removePoint (const QString &identifier)
 Perform the opposite of addPointAtEnd.
 
void saveXml (QXmlStreamWriter &writer) const
 Serialize curve.
 
void setColorFilterSettings (const ColorFilterSettings &colorFilterSettings)
 Set color filter.
 
void setCurveName (const QString &curveName)
 Change the curve name.
 
void setCurveStyle (const CurveStyle &curveStyle)
 Set curve style.
 
void updatePointOrdinals (const Transformation &transformation)
 See CurveGraphs::updatePointOrdinals.
 

Detailed Description

Container for one set of digitized Points.

Definition at line 32 of file Curve.h.

Constructor & Destructor Documentation

◆ Curve() [1/4]

Curve::Curve ( const QString &  curveName,
const ColorFilterSettings colorFilterSettings,
const CurveStyle curveStyle 
)

Constructor from scratch.

Definition at line 32 of file Curve.cpp.

◆ Curve() [2/4]

Curve::Curve ( QDataStream &  str)

Constructor from serialized binary pre-version 6 file.

Definition at line 49 of file Curve.cpp.

◆ Curve() [3/4]

Curve::Curve ( QXmlStreamReader &  reader)

Constructor for use when loading from serialized xml.

Definition at line 108 of file Curve.cpp.

◆ Curve() [4/4]

Curve::Curve ( const Curve curve)

Copy constructor. Copying a Curve only helps for making a copy, since access to any Points inside must be via functor.

Definition at line 41 of file Curve.cpp.

Member Function Documentation

◆ addPoint()

void Curve::addPoint ( Point  point)

Add Point to this Curve.

Definition at line 123 of file Curve.cpp.

◆ colorFilterSettings()

ColorFilterSettings Curve::colorFilterSettings ( ) const

Return the color filter.

Definition at line 128 of file Curve.cpp.

◆ curveName()

QString Curve::curveName ( ) const

Name of this Curve.

Definition at line 133 of file Curve.cpp.

◆ curveStyle()

CurveStyle Curve::curveStyle ( ) const

Return the curve style.

Definition at line 138 of file Curve.cpp.

◆ editPoint()

void Curve::editPoint ( const QPointF &  posGraph,
const QString &  identifier 
)

Edit the graph coordinates of an axis point. This method does not apply to a graph point.

Definition at line 143 of file Curve.cpp.

◆ exportToClipboard()

void Curve::exportToClipboard ( const QHash< QString, bool > &  selectedHash,
const Transformation transformation,
QTextStream &  strCsv,
QTextStream &  strHtml,
CurvesGraphs curvesGraphs 
) const

Export points in this Curve found in the specified point list.

Definition at line 160 of file Curve.cpp.

◆ isXOnly()

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

Determine if specified point has just x coordinate. Otherwise has just y coordinate, or both x and y coordinates.

Definition at line 225 of file Curve.cpp.

◆ iterateThroughCurvePoints()

void Curve::iterateThroughCurvePoints ( const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &  ftorWithCallback) const

Apply functor to Points on Curve.

Definition at line 242 of file Curve.cpp.

◆ iterateThroughCurveSegments()

void Curve::iterateThroughCurveSegments ( const Functor2wRet< const Point &, const Point &, CallbackSearchReturn > &  ftorWithCallback) const

Apply functor to successive Points, as line segments, on Curve. This could be a bit slow.

Definition at line 257 of file Curve.cpp.

◆ movePoint()

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

Translate the position of a point by the specified distance vector.

Definition at line 364 of file Curve.cpp.

◆ numPoints()

int Curve::numPoints ( ) const

Number of points.

Definition at line 373 of file Curve.cpp.

◆ operator=()

Curve & Curve::operator= ( const Curve curve)

Assignment constructor.

Definition at line 113 of file Curve.cpp.

◆ points()

const Points Curve::points ( ) const

Return a shallow copy of the Points.

Definition at line 392 of file Curve.cpp.

◆ positionGraph()

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

Return the position, in graph coordinates, of the specified Point.

Definition at line 397 of file Curve.cpp.

◆ positionScreen()

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

Return the position, in screen coordinates, of the specified Point.

Definition at line 414 of file Curve.cpp.

◆ printStream()

void Curve::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 431 of file Curve.cpp.

◆ removePoint()

void Curve::removePoint ( const QString &  identifier)

Perform the opposite of addPointAtEnd.

Definition at line 451 of file Curve.cpp.

◆ saveXml()

void Curve::saveXml ( QXmlStreamWriter &  writer) const

Serialize curve.

Definition at line 464 of file Curve.cpp.

◆ setColorFilterSettings()

void Curve::setColorFilterSettings ( const ColorFilterSettings colorFilterSettings)

Set color filter.

Definition at line 487 of file Curve.cpp.

◆ setCurveName()

void Curve::setCurveName ( const QString &  curveName)

Change the curve name.

Definition at line 492 of file Curve.cpp.

◆ setCurveStyle()

void Curve::setCurveStyle ( const CurveStyle curveStyle)

Set curve style.

Definition at line 504 of file Curve.cpp.

◆ updatePointOrdinals()

void Curve::updatePointOrdinals ( const Transformation transformation)

See CurveGraphs::updatePointOrdinals.

Same algorithm as GraphicsLineForCurve::updatePointOrdinalsAfterDrag, although graph coordinates of points have been updated before this is called so the graph coordinates are not updated by this method

Definition at line 509 of file Curve.cpp.


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