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