Engauge Digitizer  2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
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. More...
 
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. More...
 

Detailed Description

Class for that manages geometry strategies.

Definition at line 21 of file GeometryStrategyContext.h.

Constructor & Destructor Documentation

GeometryStrategyContext::GeometryStrategyContext ( )

Single constructor.

Definition at line 17 of file GeometryStrategyContext.cpp.

18 {
19  m_strategies.insert (CONNECT_AS_FUNCTION_SMOOTH , new GeometryStrategyFunctionSmooth ());
21  m_strategies.insert (CONNECT_AS_RELATION_SMOOTH , new GeometryStrategyRelationSmooth ());
23 }
Calculate for line through the points that is smoothly connected as a function.
Calculate for line through the points that is straightly connected as a function. ...
Calculate for line through the points that is smoothly connected as a relation.
Calculate for line through the points that is straightly connected as a relation. ...
GeometryStrategyContext::~GeometryStrategyContext ( )
virtual

Definition at line 25 of file GeometryStrategyContext.cpp.

26 {
27  qDeleteAll (m_strategies);
28 }

Member Function Documentation

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: