Engauge Digitizer 2
Loading...
Searching...
No Matches
CentipedePairCartesian.h
Go to the documentation of this file.
1/******************************************************************************************************
2 * (C) 2020 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5 ******************************************************************************************************/
6
7#ifndef CENTIPEDE_PAIR_CARTESIAN_H
8#define CENTIPEDE_PAIR_CARTESIAN_H
9
11#include <QPointF>
12
15class GraphicsScene;
16class Transformation;
17
65{
66public:
69 const Transformation &transformation,
70 const DocumentModelGuideline &modelGuideline,
71 const DocumentModelCoords &modelCoords,
72 const QPointF &posScreen);
74
76 bool done (const QPointF &posScreen);
77
79 void move (const QPointF &posScreen);
80
82 bool selectedXTFinal () const;
83
85 double valueFinal () const;
86
87private:
89
91 bool updateFinalValues (const QPointF &posScreen);
92
93 DocumentModelGuideline m_modelGuideline;
94 CentipedeSegmentAbstract *m_centipedeXT;
95 CentipedeSegmentAbstract *m_centipedeYR;
96 QPointF m_posScreenStart;
97 QPointF m_posGraphStart;
98
99 // Final values
100 bool m_selectedXTFinal;
101 double m_valueFinal;
102};
103
104#endif // CENTIPEDE_PAIR_CARTESIAN_H
void move(const QPointF &posScreen)
Follow cursor move.
bool selectedXTFinal() const
True if XT is final selection, otherwise false if YR is final selection.
double valueFinal() const
Final XT or YT (depending on selectedXTFinal) value.
bool done(const QPointF &posScreen)
True if cursor has moved far enough that the CentipedePairCartesian has finished and should be remove...
CentipedePairCartesian(GraphicsScene &scene, const Transformation &transformation, const DocumentModelGuideline &modelGuideline, const DocumentModelCoords &modelCoords, const QPointF &posScreen)
Constructor with individual coordinates.
Line segment along one of the two coordinate directions (X/T or Y/R).
Model for DlgSettingsCoords and CmdSettingsCoords.
Model for managing the coordinate values corresponding Guidelines.
Add point and line handling to generic QGraphicsScene.
Affine transformation between screen and graph coordinates, based on digitized axis points.