#include <vistoolmove.h>
Public Types | |
| enum | { Type = UserType + static_cast<int>(Vis::ToolMove) } |
Public Types inherited from VisOperation | |
| enum | { Type = UserType + static_cast<int>(Vis::ToolRotation) } |
Public Types inherited from VisLine | |
| enum | { Type = UserType + static_cast<int>(Vis::Line) } |
Public Types inherited from VScaledLine | |
| enum | { Type = UserType + static_cast<int>(Vis::ScaledLine) } |
Public Member Functions | |
| VisToolMove (const VContainer *data, QGraphicsItem *parent=nullptr) | |
| virtual | ~VisToolMove () |
| virtual void | RefreshGeometry () Q_DECL_OVERRIDE |
| QString | Angle () const |
| void | SetAngle (const QString &expression) |
| QString | Rotation () const |
| void | setRotation (const QString &expression) |
| QString | Length () const |
| qreal | LengthValue () const |
| void | SetLength (const QString &expression) |
| void | setOriginPointId (quint32 value) |
| virtual int | type () const Q_DECL_OVERRIDE |
Public Member Functions inherited from VisOperation | |
| VisOperation (const VContainer *data, QGraphicsItem *parent=nullptr) | |
| virtual | ~VisOperation () |
| void | setObjects (QVector< quint32 > objects) |
| virtual void | VisualMode (const quint32 &pointId=NULL_ID) Q_DECL_OVERRIDE |
Public Member Functions inherited from VisLine | |
| VisLine (const VContainer *data, QGraphicsItem *parent=nullptr) | |
| virtual | ~VisLine ()=default |
Public Member Functions inherited from Visualization | |
| Visualization (const VContainer *data) | |
| virtual | ~Visualization () Q_DECL_EQ_DEFAULT |
| void | setObject1Id (const quint32 &value) |
| void | setLineStyle (const Qt::PenStyle &value) |
| void | setLineWeight (const QString &value) |
| void | setScenePos (const QPointF &value) |
| void | setMainColor (const QColor &value) |
| const VContainer * | getData () const |
| void | setData (const VContainer *data) |
| Mode | GetMode () const |
| void | SetMode (const Mode &value) |
| QString | CurrentToolTip () const |
Public Member Functions inherited from VScaledLine | |
| VScaledLine (QGraphicsItem *parent=nullptr) | |
| VScaledLine (const QLineF &line, QGraphicsItem *parent=nullptr) | |
| virtual | ~VScaledLine ()=default |
| virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=nullptr) Q_DECL_OVERRIDE |
| qreal | GetBasicWidth () const |
| void | setBasicWidth (const qreal &value) |
Private Member Functions | |
| template<class Item > | |
| QGraphicsPathItem * | AddOriginCurve (quint32 id, int &i) |
| template<class Item > | |
| int | AddDestinationCurve (qreal angle, qreal length, quint32 id, int i, qreal rotationAngle, const QPointF &rotationOrigin) |
| void | createOriginObjects (int &iPoint, int &iCurve) |
| void | createRotatedObjects (int &iPoint, int &iCurve, qreal length, qreal angle, qreal rotationAngle, const QPointF &rotationOrigin) |
Private Attributes | |
| qreal | angle |
| qreal | length |
| qreal | rotationAngle |
| VScaledEllipse * | originPointItem |
| VScaledEllipse * | rotationOriginPointItem |
| VScaledEllipse * | rotationFinishPointItem |
| ArrowedLineItem * | moveLineItem |
| VScaledLine * | rotationLineItem |
| QPointF | m_origin |
| QPointF | m_rotationPoint |
Additional Inherited Members | |
Public Slots inherited from Visualization | |
| void | mousePos (const QPointF &scenePos) |
Signals inherited from Visualization | |
| void | ToolTip (const QString &toolTip) |
Static Public Member Functions inherited from VisLine | |
| static qreal | CorrectAngle (const qreal &angle) |
Static Public Member Functions inherited from Visualization | |
| static qreal | FindLength (const QString &expression, const QHash< QString, QSharedPointer< VInternalVariable > > *vars) |
| static qreal | FindVal (const QString &expression, const QHash< QString, QSharedPointer< VInternalVariable > > *vars) |
Protected Member Functions inherited from VisOperation | |
| VScaledEllipse * | GetPoint (quint32 i, const QColor &color) |
| VCurvePathItem * | GetCurve (quint32 i, const QColor &color) |
| template<class Item > | |
| int | addFlippedCurve (const QPointF &firstPoint, const QPointF &secondPoint, quint32 id, int i) |
| void | refreshMirroredObjects (const QPointF &firstPoint, const QPointF &secondPoint) |
Protected Member Functions inherited from VisLine | |
| QPointF | Ray (const QPointF &firstPoint, const qreal &angle) const |
| QPointF | Ray (const QPointF &firstPoint) const |
| QLineF | Axis (const QPointF &p, const qreal &angle) const |
| QLineF | Axis (const QPointF &p1, const QPointF &p2) const |
| virtual void | initPen () Q_DECL_OVERRIDE |
| virtual void | AddOnScene () Q_DECL_OVERRIDE |
| void | DrawRay (VScaledLine *lineItem, const QPointF &p, const QPointF &pTangent, const QColor &color, Qt::PenStyle style) |
Protected Member Functions inherited from Visualization | |
| VScaledEllipse * | InitPoint (const QColor &color, QGraphicsItem *parent, qreal z=0) const |
| void | DrawPoint (QGraphicsEllipseItem *point, const QPointF &pos, const QColor &color, Qt::PenStyle style=Qt::SolidLine) |
| virtual void | DrawLine (VScaledLine *lineItem, const QLineF &line, const QColor &color, const qreal &lineWeight, Qt::PenStyle style=Qt::SolidLine) |
| void | DrawPath (VCurvePathItem *pathItem, const QPainterPath &path, const QColor &color, Qt::PenStyle style=Qt::SolidLine, const qreal &weight=0.35, Qt::PenCapStyle cap=Qt::SquareCap) |
| void | DrawPath (VCurvePathItem *pathItem, const QPainterPath &path, const QVector< DirectionArrow > &directionArrows, const QColor &color, Qt::PenStyle style=Qt::SolidLine, const qreal &weight=0.35, Qt::PenCapStyle cap=Qt::SquareCap) |
| void | drawArrowedLine (ArrowedLineItem *item, const QLineF &line, const QColor &color, Qt::PenStyle style=Qt::SolidLine) |
| void | drawArrow (const QLineF &axis, QPainterPath &path, const qreal &arrow_size) |
| template<typename Item > | |
| void | addItem (Item *item) |
| template<class Item > | |
| Item * | InitItem (const QColor &color, QGraphicsItem *parent) |
Static Protected Member Functions inherited from Visualization | |
| static VScaledEllipse * | GetPointItem (QVector< VScaledEllipse * > &points, quint32 i, const QColor &color, QGraphicsItem *parent) |
Protected Attributes inherited from VisOperation | |
| QVector< quint32 > | objects |
| QColor | supportColor2 |
| QColor | supportColor3 |
| QVector< VScaledEllipse * > | points |
| QVector< VCurvePathItem * > | curves |
Protected Attributes inherited from Visualization | |
| const VContainer * | data |
| QPointF | scenePos |
| QColor | mainColor |
| QColor | supportColor |
| Qt::PenStyle | lineStyle |
| qreal | lineWeight |
| quint32 | object1Id |
| QString | toolTip |
| Mode | mode |
Definition at line 69 of file vistoolmove.h.
| anonymous enum |
| Enumerator | |
|---|---|
| Type | |
Definition at line 91 of file vistoolmove.h.
|
explicit |
Definition at line 88 of file vistoolmove.cpp.
|
virtual |
Definition at line 115 of file vistoolmove.cpp.
|
private |
Definition at line 297 of file vistoolmove.cpp.
References angle, Visualization::data, Visualization::DrawPath(), VisOperation::GetCurve(), Item, length, Visualization::lineWeight, rotationAngle, and Visualization::supportColor.
|
private |
Definition at line 283 of file vistoolmove.cpp.
References Visualization::data, Visualization::DrawPath(), VisOperation::GetCurve(), Visualization::lineWeight, and VisOperation::supportColor2.
| QString VisToolMove::Angle | ( | ) | const |
Definition at line 233 of file vistoolmove.cpp.
References moveLineItem.
Referenced by DialogMove::ShowDialog().
|
private |
Definition at line 315 of file vistoolmove.cpp.
References AllCurves, Arc, CubicBezier, CubicBezierPath, Curve, Visualization::data, EllipticalArc, VContainer::GeometricObject(), VContainer::GetGObject(), Path, Point, Spline, SplinePath, and Unknown.
Referenced by RefreshGeometry().
|
private |
Definition at line 381 of file vistoolmove.cpp.
References AllCurves, Arc, CubicBezier, CubicBezierPath, Curve, Visualization::data, EllipticalArc, VContainer::GeometricObject(), VContainer::GetGObject(), Path, Point, Spline, SplinePath, and Unknown.
Referenced by RefreshGeometry().
| QString VisToolMove::Length | ( | ) | const |
Definition at line 257 of file vistoolmove.cpp.
References LengthValue().
Referenced by DialogMove::ShowDialog().
| qreal VisToolMove::LengthValue | ( | ) | const |
Definition at line 263 of file vistoolmove.cpp.
References moveLineItem, and qApp.
Referenced by Length(), and DialogMove::ShowDialog().
|
virtual |
Implements Visualization.
Definition at line 120 of file vistoolmove.cpp.
References angle, VGObject::BuildLine(), VisLine::CorrectAngle(), createOriginObjects(), createRotatedObjects(), Visualization::data, Visualization::drawArrowedLine(), Visualization::DrawLine(), Visualization::DrawPoint(), VContainer::GeometricObject(), length, Visualization::lineWeight, m_origin, m_rotationPoint, moveLineItem, NULL_ID, Visualization::object1Id, VisOperation::objects, originPointItem, qApp, VisLine::Ray(), rotationAngle, rotationFinishPointItem, rotationLineItem, rotationOriginPointItem, scaledRadius(), Visualization::scenePos, sceneScale(), VisOperation::supportColor2, VisOperation::supportColor3, Visualization::toolTip, UnitsToStr(), and VFuzzyComparePossibleNulls().
Referenced by DialogMove::ChosenObject(), DialogMove::originChanged(), DialogMove::SaveData(), VToolMove::SetVisualization(), and DialogMove::ShowDialog().
| QString VisToolMove::Rotation | ( | ) | const |
Definition at line 245 of file vistoolmove.cpp.
References rotationLineItem.
Referenced by DialogMove::ShowDialog().
| void VisToolMove::SetAngle | ( | const QString & | expression | ) |
Definition at line 239 of file vistoolmove.cpp.
References angle, Visualization::data, and Visualization::FindVal().
Referenced by DialogMove::SaveData(), DialogMove::SetAngle(), VToolMove::SetVisualization(), and DialogMove::ShowDialog().
| void VisToolMove::SetLength | ( | const QString & | expression | ) |
Definition at line 270 of file vistoolmove.cpp.
References Visualization::data, Visualization::FindLength(), and length.
Referenced by DialogMove::SaveData(), DialogMove::SetLength(), VToolMove::SetVisualization(), and DialogMove::ShowDialog().
| void VisToolMove::setOriginPointId | ( | quint32 | value | ) |
Definition at line 276 of file vistoolmove.cpp.
References Visualization::object1Id.
Referenced by DialogMove::ChosenObject(), DialogMove::originChanged(), DialogMove::SaveData(), DialogMove::setOriginPointId(), VToolMove::SetVisualization(), and DialogMove::ShowDialog().
| void VisToolMove::setRotation | ( | const QString & | expression | ) |
Definition at line 251 of file vistoolmove.cpp.
References Visualization::data, Visualization::FindVal(), and rotationAngle.
Referenced by DialogMove::SaveData(), DialogMove::setRotation(), and VToolMove::SetVisualization().
|
inlinevirtual |
|
private |
Definition at line 95 of file vistoolmove.h.
Referenced by AddDestinationCurve(), RefreshGeometry(), and SetAngle().
|
private |
Definition at line 96 of file vistoolmove.h.
Referenced by AddDestinationCurve(), RefreshGeometry(), and SetLength().
|
private |
Definition at line 103 of file vistoolmove.h.
Referenced by RefreshGeometry().
|
private |
Definition at line 104 of file vistoolmove.h.
Referenced by RefreshGeometry().
|
private |
Definition at line 101 of file vistoolmove.h.
Referenced by Angle(), LengthValue(), and RefreshGeometry().
|
private |
Definition at line 98 of file vistoolmove.h.
Referenced by RefreshGeometry().
|
private |
Definition at line 97 of file vistoolmove.h.
Referenced by AddDestinationCurve(), RefreshGeometry(), and setRotation().
|
private |
Definition at line 100 of file vistoolmove.h.
Referenced by RefreshGeometry().
|
private |
Definition at line 102 of file vistoolmove.h.
Referenced by RefreshGeometry(), and Rotation().
|
private |
Definition at line 99 of file vistoolmove.h.
Referenced by RefreshGeometry().