#include <vsimplecurve.h>
Public Types | |
| enum | { Type = UserType + static_cast<int>(Vis::SimpleCurve) } |
Public Types inherited from VCurvePathItem | |
| enum | { Type = UserType + static_cast<int>(Vis::CurvePathItem) } |
Public Slots | |
| void | CurveChoosed () |
| void | CurveSelected (bool selected) |
Signals | |
| void | Choosed (quint32 id) |
| Choosed send id when clicked. More... | |
| void | Selected (bool selected, quint32 id) |
Signals inherited from VAbstractSimple | |
| void | showContextMenu (QGraphicsSceneContextMenuEvent *event, quint32 id=null_id) |
| void | Delete () |
Public Member Functions | |
| VSimpleCurve (quint32 id, const QSharedPointer< VAbstractCurve > &curve, QObject *parent=nullptr) | |
| virtual | ~VSimpleCurve () Q_DECL_EQ_DEFAULT |
| virtual int | type () const Q_DECL_OVERRIDE |
| void | RefreshGeometry (const QSharedPointer< VAbstractCurve > &curve) |
Public Member Functions inherited from VAbstractSimple | |
| VAbstractSimple (quint32 id, QObject *parent=nullptr) | |
| virtual | ~VAbstractSimple ()=default |
| virtual void | ToolSelectionType (const SelectionType &type) |
| GOType | GetType () const |
| void | SetType (const GOType &value) |
Public Member Functions inherited from VCurvePathItem | |
| VCurvePathItem (QGraphicsItem *parent=nullptr) | |
| virtual | ~VCurvePathItem ()=default |
| virtual QPainterPath | shape () const Q_DECL_OVERRIDE |
| virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=nullptr) Q_DECL_OVERRIDE |
| void | SetDirectionArrows (const QVector< QPair< QLineF, QLineF >> &arrows) |
| void | SetPoints (const QVector< QPointF > &points) |
Protected Member Functions | |
| virtual void | mousePressEvent (QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE |
| virtual void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE |
| virtual void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) Q_DECL_OVERRIDE |
| virtual void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event) Q_DECL_OVERRIDE |
| virtual QVariant | itemChange (GraphicsItemChange change, const QVariant &value) Q_DECL_OVERRIDE |
| virtual void | contextMenuEvent (QGraphicsSceneContextMenuEvent *event) Q_DECL_OVERRIDE |
| virtual void | keyReleaseEvent (QKeyEvent *event) Q_DECL_OVERRIDE |
| virtual void | ScalePenWidth () Q_DECL_OVERRIDE |
Private Attributes | |
| QSharedPointer< VAbstractCurve > | m_curve |
| bool | m_isHovered |
Additional Inherited Members | |
Protected Attributes inherited from VAbstractSimple | |
| quint32 | id |
| id spline id. More... | |
| SelectionType | selectionType |
| GOType | type |
Definition at line 72 of file vsimplecurve.h.
| anonymous enum |
| Enumerator | |
|---|---|
| Type | |
Definition at line 80 of file vsimplecurve.h.
| VSimpleCurve::VSimpleCurve | ( | quint32 | id, |
| const QSharedPointer< VAbstractCurve > & | curve, | ||
| QObject * | parent = nullptr |
||
| ) |
Definition at line 73 of file vsimplecurve.cpp.
|
virtual |
|
signal |
Choosed send id when clicked.
| id | point id. |
Referenced by CurveChoosed(), VAbstractOperation::InitCurve(), mousePressEvent(), and mouseReleaseEvent().
|
protectedvirtual |
Definition at line 182 of file vsimplecurve.cpp.
References VAbstractSimple::showContextMenu().
|
slot |
Definition at line 102 of file vsimplecurve.cpp.
References Choosed().
|
slot |
Definition at line 108 of file vsimplecurve.cpp.
References Selected().
|
protectedvirtual |
Definition at line 152 of file vsimplecurve.cpp.
References m_curve, m_isHovered, and VCurvePathItem::SetDirectionArrows().
|
protectedvirtual |
Definition at line 163 of file vsimplecurve.cpp.
References m_isHovered, and VCurvePathItem::SetDirectionArrows().
|
protectedvirtual |
Definition at line 171 of file vsimplecurve.cpp.
References Selected().
|
protectedvirtual |
Definition at line 188 of file vsimplecurve.cpp.
References VAbstractSimple::Delete().
|
protectedvirtual |
Definition at line 114 of file vsimplecurve.cpp.
References ByMouseRelease, Choosed(), and VAbstractSimple::selectionType.
|
protectedvirtual |
Definition at line 139 of file vsimplecurve.cpp.
References ByMouseRelease, Choosed(), and VAbstractSimple::selectionType.
| void VSimpleCurve::RefreshGeometry | ( | const QSharedPointer< VAbstractCurve > & | curve | ) |
Definition at line 85 of file vsimplecurve.cpp.
References m_curve, m_isHovered, VCurvePathItem::SetDirectionArrows(), and VCurvePathItem::SetPoints().
Referenced by VAbstractOperation::FullUpdateFromFile().
|
protectedvirtual |
Reimplemented from VCurvePathItem.
Definition at line 202 of file vsimplecurve.cpp.
References correctColor(), lineTypeToPenStyle(), m_curve, m_isHovered, Mm, qApp, scaleWidth(), sceneScale(), ToPixel(), and widthMainLine.
|
signal |
Referenced by CurveSelected(), VAbstractOperation::InitCurve(), and itemChange().
|
inlinevirtual |
|
private |
Definition at line 108 of file vsimplecurve.h.
Referenced by hoverEnterEvent(), RefreshGeometry(), and ScalePenWidth().
|
private |
Definition at line 109 of file vsimplecurve.h.
Referenced by hoverEnterEvent(), hoverLeaveEvent(), RefreshGeometry(), and ScalePenWidth().