Engauge Digitizer 2
Loading...
Searching...
No Matches
CentipedeSegmentConstantTRadial.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_SEGMENT_CONSTANT_T_RADIAL_H
8#define CENTIPEDE_SEGMENT_CONSTANT_T_RADIAL_H
9
11#include "DocumentModelCoords.h"
12
14class GraphicsScene;
15class QGraphicsLineItem;
16
19{
20 Q_OBJECT;
21
22public:
25 const DocumentModelCoords &modelCoords,
28 const QPointF &posClickScreen);
30
31 virtual double distanceToClosestEndpoint (const QPointF &posScreen) const;
32 virtual void updateRadius (double radius);
33
34signals:
35
37 void signalUpdateEndpoints (QPointF start,
38 QPointF end);
39
40private:
42
43 QGraphicsLineItem *m_graphicsItem;
44 GraphicsLineItemRelay *m_graphicsItemRelay;
45
46 // Two points where circle around click point intersects constant coordinate line. Due to symmetry about
47 // the click circle center (for affine transformation), we do not need the center
48 QPointF m_posLow;
49 QPointF m_posHigh;
50};
51
52#endif // CENTIPEDE_SEGMENT_CONSTANT_T_RADIAL_H
QPointF posClickScreen() const
Center of circle in screen coordinates.
CentipedeSegmentAbstract(const DocumentModelGuideline &modelGuideline, const Transformation &transformation, const QPointF &posClickScreen)
Constructor with individual coordinates.
const DocumentModelGuideline & modelGuideline() const
Settings.
Transformation transformation() const
Transformation which is static through the entire lifetime of the Centipede class instances.
void signalUpdateEndpoints(QPointF start, QPointF end)
Send new geometry for later updating.
CentipedeSegmentConstantTRadial(GraphicsScene &scene, const DocumentModelCoords &modelCoords, const DocumentModelGuideline &modelGuideline, const Transformation &transformation, const QPointF &posClickScreen)
Constructor with individual coordinates.
virtual double distanceToClosestEndpoint(const QPointF &posScreen) const
Return distance to closest endpoint.
virtual void updateRadius(double radius)
Update geometry to reflect cursor movement.
Model for DlgSettingsCoords and CmdSettingsCoords.
Model for managing the coordinate values corresponding Guidelines.
Enable postponed geometry changes for QGraphicsLineItem, using a signal to trigger this class to upda...
Add point and line handling to generic QGraphicsScene.
Affine transformation between screen and graph coordinates, based on digitized axis points.