#include <vabstractarc.h>
Public Member Functions | |
VAbstractArc (const GOType &type, const quint32 &idObject=null_id, const Draw &mode=Draw::Calculation) | |
VAbstractArc (const GOType &type, const VPointF ¢er, qreal f1, const QString &formulaF1, qreal f2, const QString &formulaF2, quint32 idObject=0, Draw mode=Draw::Calculation) | |
VAbstractArc (const GOType &type, const VPointF ¢er, qreal f1, qreal f2, quint32 idObject=0, Draw mode=Draw::Calculation) | |
VAbstractArc (const GOType &type, const QString &formulaLength, const VPointF ¢er, qreal f1, const QString &formulaF1, quint32 idObject=0, Draw mode=Draw::Calculation) | |
VAbstractArc (const GOType &type, const VPointF ¢er, qreal f1, quint32 idObject=0, Draw mode=Draw::Calculation) | |
VAbstractArc (const VAbstractArc &arc) | |
virtual | ~VAbstractArc () |
VAbstractArc & | operator= (const VAbstractArc &arc) |
void | Swap (VAbstractArc &arc) Q_DECL_NOTHROW |
QString | GetFormulaF1 () const |
void | SetFormulaF1 (const QString &formula, qreal value) |
virtual qreal | GetStartAngle () const Q_DECL_OVERRIDE |
QString | GetFormulaF2 () const |
void | SetFormulaF2 (const QString &formula, qreal value) |
virtual qreal | GetEndAngle () const Q_DECL_OVERRIDE |
virtual VPointF | GetCenter () const |
void | SetCenter (const VPointF &point) |
QString | GetFormulaLength () const |
void | SetFormulaLength (const QString &formula, qreal value) |
virtual void | setId (const quint32 &id) Q_DECL_OVERRIDE |
setId set id object. More... | |
virtual QString | NameForHistory (const QString &toolName) const Q_DECL_OVERRIDE |
bool | IsFlipped () const |
qreal | AngleArc () const |
Public Member Functions inherited from VAbstractCurve | |
VAbstractCurve (const GOType &type, const quint32 &idObject=null_id, const Draw &mode=Draw::Calculation) | |
VAbstractCurve (const VAbstractCurve &curve) | |
virtual | ~VAbstractCurve () Q_DECL_OVERRIDE |
VAbstractCurve & | operator= (const VAbstractCurve &curve) |
void | Swap (VAbstractCurve &curve) Q_DECL_NOTHROW |
virtual QVector< QPointF > | getPoints () const =0 |
QVector< QPointF > | GetSegmentPoints (const QPointF &begin, const QPointF &end, bool reverse=false) const |
virtual QPainterPath | GetPath () const |
virtual qreal | GetLength () const =0 |
qreal | GetLengthByPoint (const QPointF &point) const |
virtual QVector< QPointF > | IntersectLine (const QLineF &line) const |
IntersectLine return list of points for real intersection with line. More... | |
virtual bool | IsIntersectLine (const QLineF &line) const |
bool | isPointOnCurve (const QPointF &p) const |
quint32 | GetDuplicate () const |
void | SetDuplicate (quint32 number) |
QString | getLineColor () const |
void | setLineColor (const QString &color) |
QString | GetPenStyle () const |
void | SetPenStyle (const QString &penStyle) |
QString | getLineWeight () const |
getLineWeight return weight of the lines More... | |
void | setLineWeight (const QString &lineWeight) |
setLineWeight set weight of the lines More... | |
QPointF | getFirstPoint () |
QPointF | getLastPoint () |
virtual QVector< DirectionArrow > | DirectionArrows () const |
Public Member Functions inherited from VGObject | |
VGObject () | |
VGObject default constructor. More... | |
VGObject (const GOType &type, const quint32 &idObject=0, const Draw &mode=Draw::Calculation) | |
VGObject constructor. More... | |
VGObject (const VGObject &obj) | |
VGObject copy constructor. More... | |
virtual | ~VGObject () |
VGObject & | operator= (const VGObject &obj) |
operator = assignment operator. More... | |
void | Swap (VGObject &obj) Q_DECL_NOTHROW |
quint32 | getIdObject () const |
getIdObject return parent id. More... | |
void | setIdObject (const quint32 &value) |
setIdObject set parent id. More... | |
virtual QString | name () const |
name return name graphical object. More... | |
void | setName (const QString &name) |
setName set name graphical object. More... | |
Draw | getMode () const |
getMode return mode creation. More... | |
void | setMode (const Draw &value) |
setMode set mode creation. More... | |
GOType | getType () const |
getType return object type. More... | |
void | setType (const GOType &type) |
quint32 | id () const |
id return id object. More... | |
quint32 | getIdTool () const |
Protected Member Functions | |
void | SetFlipped (bool value) |
virtual void | FindF2 (qreal length)=0 |
void | SetFormulaLength (const QString &formula) |
Protected Member Functions inherited from VAbstractCurve | |
virtual void | CreateName ()=0 |
Private Attributes | |
QSharedDataPointer< VAbstractArcData > | d |
Additional Inherited Members | |
Static Public Member Functions inherited from VAbstractCurve | |
static QVector< QPointF > | GetSegmentPoints (const QVector< QPointF > &points, const QPointF &begin, const QPointF &end, bool reverse=false) |
static bool | isPointOnCurve (const QVector< QPointF > &points, const QPointF &p) |
static qreal | PathLength (const QVector< QPointF > &path) |
static QVector< QPointF > | CurveIntersectLine (const QVector< QPointF > &points, const QLineF &line) |
static QPainterPath | ShowDirection (const QVector< DirectionArrow > &arrows, qreal width) |
Static Public Member Functions inherited from VGObject | |
static QLineF | BuildLine (const QPointF &p1, const qreal &length, const qreal &angle) |
static QPointF | BuildRay (const QPointF &firstPoint, const qreal &angle, const QRectF &scRect) |
static QLineF | BuildAxis (const QPointF &p, const qreal &angle, const QRectF &scRect) |
static QLineF | BuildAxis (const QPointF &p1, const QPointF &p2, const QRectF &scRect) |
static int | ContactPoints (const QPointF &p, const QPointF ¢er, qreal radius, QPointF &p1, QPointF &p2) |
static QPointF | LineIntersectRect (const QRectF &rec, const QLineF &line) |
LineIntersectRect find point intersection line and rect. More... | |
static int | IntersectionCircles (const QPointF &c1, double r1, const QPointF &c2, double r2, QPointF &p1, QPointF &p2) |
static qint32 | LineIntersectCircle (const QPointF ¢er, qreal radius, const QLineF &line, QPointF &p1, QPointF &p2) |
LineIntersectCircle find point intersection line and circle. More... | |
static QPointF | ClosestPoint (const QLineF &line, const QPointF &point) |
ClosestPoint find point projection of point onto line. More... | |
static QPointF | addVector (const QPointF &p, const QPointF &p1, const QPointF &p2, qreal k) |
static void | LineCoefficients (const QLineF &line, qreal *a, qreal *b, qreal *c) |
LineCoefficients coefficient for equation of segment. Segment equestion ax+by+c=0. More... | |
static bool | IsPointOnLineSegment (const QPointF &t, const QPointF &p1, const QPointF &p2) |
IsPointOnLineSegment Check if the point is on the line segment. More... | |
static bool | IsPointOnLineviaPDP (const QPointF &t, const QPointF &p1, const QPointF &p2) |
IsPointOnLineviaPDP use the perp dot product (PDP) way. More... | |
template<typename T > | |
static QVector< T > | GetReversePoints (const QVector< T > &points) |
GetReversePoint return revers container of points. More... | |
static int | GetLengthContour (const QVector< QPointF > &contour, const QVector< QPointF > &newPoints) |
GetLengthContour return length of contour. More... | |
Static Public Attributes inherited from VAbstractCurve | |
static const qreal | lengthCurveDirectionArrow = 14 |
Static Public Attributes inherited from VGObject | |
static const double | accuracyPointOnLine = (0.1555 / 25.4) * 96.0 |
Static Protected Member Functions inherited from VGObject | |
static QTransform | flipTransform (const QLineF &axis) |
Definition at line 67 of file vabstractarc.h.
|
explicit |
Definition at line 71 of file vabstractarc.cpp.
VAbstractArc::VAbstractArc | ( | const GOType & | type, |
const VPointF & | center, | ||
qreal | f1, | ||
const QString & | formulaF1, | ||
qreal | f2, | ||
const QString & | formulaF2, | ||
quint32 | idObject = 0 , |
||
Draw | mode = Draw::Calculation |
||
) |
Definition at line 76 of file vabstractarc.cpp.
VAbstractArc::VAbstractArc | ( | const GOType & | type, |
const VPointF & | center, | ||
qreal | f1, | ||
qreal | f2, | ||
quint32 | idObject = 0 , |
||
Draw | mode = Draw::Calculation |
||
) |
Definition at line 83 of file vabstractarc.cpp.
VAbstractArc::VAbstractArc | ( | const GOType & | type, |
const QString & | formulaLength, | ||
const VPointF & | center, | ||
qreal | f1, | ||
const QString & | formulaF1, | ||
quint32 | idObject = 0 , |
||
Draw | mode = Draw::Calculation |
||
) |
Definition at line 89 of file vabstractarc.cpp.
VAbstractArc::VAbstractArc | ( | const GOType & | type, |
const VPointF & | center, | ||
qreal | f1, | ||
quint32 | idObject = 0 , |
||
Draw | mode = Draw::Calculation |
||
) |
Definition at line 96 of file vabstractarc.cpp.
|
explicit |
Definition at line 102 of file vabstractarc.cpp.
|
virtual |
Definition at line 120 of file vabstractarc.cpp.
qreal VAbstractArc::AngleArc | ( | ) | const |
Definition at line 217 of file vabstractarc.cpp.
References GetEndAngle(), GetStartAngle(), IsFlipped(), and VFuzzyComparePossibleNulls().
Referenced by VArc::GetLength(), and VArc::getPoints().
|
protectedpure virtual |
Implemented in VEllipticalArc, and VArc.
Referenced by SetFormulaLength().
|
virtual |
Reimplemented in VEllipticalArc.
Definition at line 162 of file vabstractarc.cpp.
References d.
Referenced by VArc::CreateName(), VArc::CutArc(), VToolPointFromArcAndTangent::FindPoint(), VToolPointOfIntersectionArcs::FindPoint(), VisToolPointFromArcAndTangent::FindRays(), VArc::Flip(), VEllipticalArc::Flip(), VEllipticalArc::GetCenter(), VArc::GetP1(), VArc::GetP2(), VEllipticalArc::getPoint(), VArc::getPoints(), VEllipticalArc::getPoints(), VArc::Move(), VEllipticalArc::Move(), NameForHistory(), DialogArc::pointNameChanged(), DialogArcWithLength::pointNameChanged(), VArc::Rotate(), and VEllipticalArc::Rotate().
|
virtual |
Implements VAbstractCurve.
Reimplemented in VEllipticalArc.
Definition at line 156 of file vabstractarc.cpp.
References d.
Referenced by AngleArc(), VArc::CutArc(), VEllipticalArc::Flip(), VArc::GetP2(), VEllipticalArc::GetP2(), VEllipticalArc::getRealEndAngle(), VEllipticalArc::Move(), and VEllipticalArc::Rotate().
QString VAbstractArc::GetFormulaF1 | ( | ) | const |
Definition at line 124 of file vabstractarc.cpp.
References d.
Referenced by VEllipticalArc::CutArc(), and VArc::CutArc().
QString VAbstractArc::GetFormulaF2 | ( | ) | const |
Definition at line 143 of file vabstractarc.cpp.
References d.
Referenced by VEllipticalArc::CutArc(), and VArc::CutArc().
QString VAbstractArc::GetFormulaLength | ( | ) | const |
Definition at line 174 of file vabstractarc.cpp.
References d.
|
virtual |
Implements VAbstractCurve.
Reimplemented in VEllipticalArc.
Definition at line 137 of file vabstractarc.cpp.
References d.
Referenced by AngleArc(), VArc::CutArc(), VArc::FindF2(), VEllipticalArc::Flip(), VArc::GetP1(), VEllipticalArc::GetP1(), VEllipticalArc::getPoints(), VEllipticalArc::Move(), and VEllipticalArc::Rotate().
bool VAbstractArc::IsFlipped | ( | ) | const |
Definition at line 211 of file vabstractarc.cpp.
References d.
Referenced by AngleArc(), VArc::CutArc(), VArc::FindF2(), VArc::Flip(), VEllipticalArc::Flip(), VArc::GetLength(), VEllipticalArc::GetLength(), VArc::getPoints(), VArc::Move(), VEllipticalArc::Move(), VArc::Rotate(), and VEllipticalArc::Rotate().
|
virtual |
Implements VAbstractCurve.
Definition at line 194 of file vabstractarc.cpp.
References GetCenter(), VAbstractCurve::GetDuplicate(), VGObject::id(), VGObject::name(), and NULL_ID.
VAbstractArc & VAbstractArc::operator= | ( | const VAbstractArc & | arc | ) |
Definition at line 108 of file vabstractarc.cpp.
References d, and VAbstractCurve::operator=().
Referenced by VArc::operator=(), and VEllipticalArc::operator=().
void VAbstractArc::SetCenter | ( | const VPointF & | point | ) |
Definition at line 168 of file vabstractarc.cpp.
References d.
|
protected |
Definition at line 242 of file vabstractarc.cpp.
References d.
Referenced by VArc::CutArc(), VArc::FindF2(), VEllipticalArc::FindF2(), VArc::Flip(), VEllipticalArc::Flip(), VArc::Move(), VEllipticalArc::Move(), VArc::Rotate(), and VEllipticalArc::Rotate().
void VAbstractArc::SetFormulaF1 | ( | const QString & | formula, |
qreal | value | ||
) |
Definition at line 130 of file vabstractarc.cpp.
References d.
void VAbstractArc::SetFormulaF2 | ( | const QString & | formula, |
qreal | value | ||
) |
Definition at line 149 of file vabstractarc.cpp.
References d.
Referenced by VArc::FindF2(), and VEllipticalArc::FindF2().
|
protected |
Definition at line 248 of file vabstractarc.cpp.
References d.
void VAbstractArc::SetFormulaLength | ( | const QString & | formula, |
qreal | value | ||
) |
Definition at line 180 of file vabstractarc.cpp.
Referenced by VEllipticalArc::FindF2().
|
virtual |
setId set id object.
id | id. |
Reimplemented from VGObject.
Definition at line 187 of file vabstractarc.cpp.
References VAbstractCurve::CreateName(), and VGObject::setId().
void VAbstractArc::Swap | ( | VAbstractArc & | arc | ) |
Definition at line 67 of file vabstractarc.cpp.
References VAbstractCurve::Swap().
Referenced by VArc::Swap(), and VEllipticalArc::Swap().
|
private |
Definition at line 122 of file vabstractarc.h.
Referenced by GetCenter(), GetEndAngle(), GetFormulaF1(), GetFormulaF2(), GetFormulaLength(), GetStartAngle(), IsFlipped(), operator=(), SetCenter(), SetFlipped(), SetFormulaF1(), SetFormulaF2(), and SetFormulaLength().