Engauge Digitizer 2
Loading...
Searching...
No Matches
GeometryStrategyContext Class Reference

Class for that manages geometry strategies. More...

#include <GeometryStrategyContext.h>

Collaboration diagram for GeometryStrategyContext:
Collaboration graph

Public Member Functions

 GeometryStrategyContext ()
 Single constructor.
virtual ~GeometryStrategyContext ()
void calculateGeometry (const Points &points, const DocumentModelCoords &modelCoords, const DocumentModelGeneral &modelGeneral, const MainWindowModel &modelMainWindow, const Transformation &transformation, CurveConnectAs connectAs, QString &funcArea, QString &polyArea, QVector< QString > &x, QVector< QString > &y, QVector< bool > &isPotentialExportAmbiguity, QVector< QString > &distanceGraphForward, QVector< QString > &distancePercentForward, QVector< QString > &distanceGraphBackward, QVector< QString > &distancePercentBackward) const
 Calculate geometry parameters.

Detailed Description

Class for that manages geometry strategies.

Definition at line 21 of file GeometryStrategyContext.h.

Constructor & Destructor Documentation

◆ GeometryStrategyContext()

GeometryStrategyContext::GeometryStrategyContext ( )

Single constructor.

Definition at line 17 of file GeometryStrategyContext.cpp.

18{
19 m_strategies.insert (CONNECT_AS_FUNCTION_SMOOTH , new GeometryStrategyFunctionSmooth ());
20 m_strategies.insert (CONNECT_AS_FUNCTION_STRAIGHT, new GeometryStrategyFunctionStraight ());
21 m_strategies.insert (CONNECT_AS_RELATION_SMOOTH , new GeometryStrategyRelationSmooth ());
22 m_strategies.insert (CONNECT_AS_RELATION_STRAIGHT, new GeometryStrategyRelationStraight ());
23}
@ CONNECT_AS_FUNCTION_STRAIGHT
@ CONNECT_AS_RELATION_STRAIGHT
@ CONNECT_AS_RELATION_SMOOTH
@ CONNECT_AS_FUNCTION_SMOOTH

◆ ~GeometryStrategyContext()

GeometryStrategyContext::~GeometryStrategyContext ( )
virtual

Definition at line 25 of file GeometryStrategyContext.cpp.

26{
27 qDeleteAll (m_strategies);
28}

Member Function Documentation

◆ calculateGeometry()

void GeometryStrategyContext::calculateGeometry ( const Points & points,
const DocumentModelCoords & modelCoords,
const DocumentModelGeneral & modelGeneral,
const MainWindowModel & modelMainWindow,
const Transformation & transformation,
CurveConnectAs connectAs,
QString & funcArea,
QString & polyArea,
QVector< QString > & x,
QVector< QString > & y,
QVector< bool > & isPotentialExportAmbiguity,
QVector< QString > & distanceGraphForward,
QVector< QString > & distancePercentForward,
QVector< QString > & distanceGraphBackward,
QVector< QString > & distancePercentBackward ) const

Calculate geometry parameters.

Definition at line 30 of file GeometryStrategyContext.cpp.

45{
46 if (transformation.transformIsDefined()) {
47
48 m_strategies [connectAs]->calculateGeometry (points,
49 modelCoords,
50 modelGeneral,
51 modelMainWindow,
52 transformation,
53 funcArea,
54 polyArea,
55 x,
56 y,
57 isPotentialExportAmbiguity,
58 distanceGraphForward,
59 distancePercentForward,
60 distanceGraphBackward,
61 distancePercentBackward);
62 }
63}
bool transformIsDefined() const
Transform is defined when at least three axis points have been digitized.

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