31 QPointF posClickGraph;
34 double rGraph = posClickGraph.y();
37 QPointF posOriginGraph (0, 0);
39 posOriginGraph = QPointF (0, modelCoords.
originRadius());
42 QPointF posScreen0, posScreen90;
81 m_graphicsItem->setSpanAngle (0);
82 m_graphicsItem->setRotation (qRadiansToDegrees (angleRotation));
83 m_graphicsItem->setPos (m_posOriginScreen);
87 m_graphicsItem->setPen (QPen (color,
91 scene.addItem (m_graphicsItem);
96 delete m_graphicsItem;
97 delete m_graphicsItemRelay;
102 double distanceLow =
magnitude (posScreen - m_posRadialLow);
103 double distanceHigh =
magnitude (posScreen - m_posRadialHigh);
105 return qMin (distanceLow, distanceHigh);
115 m_posTangentialHigh - m_posOriginScreen,
116 m_graphicsItem->rect().width () / m_graphicsItem->rect().height(),
QColor ColorPaletteToQColor(ColorPalette color)
Class for collecting and then displaying debug information computed during constant R ellipse calcula...
void display(QGraphicsScene &scene, const DocumentModelCoords &modelCoords, const Transformation &transformation)
Display member variable values on scene.
Compute endpoints for polar centipedes.
QPointF posScreenConstantRForLowT(double radius) const
Screen point for R value of circle/coordinate intersection in the decreasing T direction.
void ellipseScreenConstantRForTHighLowAngles(const Transformation &transformation, const QPointF &posClickScreen, double &angleRotation, QRectF &rectBounding, CentipedeDebugPolar &DebugPolar)
Ellipse for R value of circle/coordinate intersection. Start/span angles are calculated separately.
void posScreenConstantRHighLow(double radiusAboutClick, QPointF &posLow, QPointF &posHigh) const
Return two points (posLow and posHigh) where circle around posClickScreen intersects constant-radiusA...
QPointF posScreenConstantRForHighT(double radius) const
Screen point for R value of circle/coordinate intersection in the increasing T direction.
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.
CentipedeSegmentConstantREllipse(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.
virtual ~CentipedeSegmentConstantREllipse()
void signalUpdateAngles(QPointF posTangentialLow, QPointF posTangentialCenter, QPointF posTangentialHigh, double widthToHeight, double scaling)
Send new geometry for later updating.
Model for DlgSettingsCoords and CmdSettingsCoords.
CoordScale coordScaleYRadius() const
Get method for linear/log scale on y/radius.
double originRadius() const
Get method for origin radius in polar mode.
Model for managing the coordinate values corresponding Guidelines.
double creationCircleRadius() const
Get method for creation circle radius in pixels.
Enable postponed geometry changes for GraphicsArcItem, using a signal to trigger this class to update...
Draw an arc as an ellipse but without lines from the center to the start and end points.
Add point and line handling to generic QGraphicsScene.
double magnitude(const QPointF &vec)
Norm of vector.