#include <vscenepoint.h>
Public Types | |
enum | { Type = UserType + static_cast<int>(Vis::ScenePoint) } |
Public Member Functions | |
VScenePoint (const QColor &lineColor, QGraphicsItem *parent=nullptr) | |
virtual | ~VScenePoint ()=default |
virtual int | type () const Q_DECL_OVERRIDE |
virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=nullptr) Q_DECL_OVERRIDE |
virtual void | refreshPointGeometry (const VPointF &point) |
void | refreshLeader () |
Protected Member Functions | |
virtual void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) Q_DECL_OVERRIDE |
virtual void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event) Q_DECL_OVERRIDE |
void | setOnlyPoint (bool value) |
bool | isOnlyPoint () const |
void | setPointColor (const QString &value) |
Protected Attributes | |
VGraphicsSimpleTextItem * | m_pointName |
VScaledLine * | m_pointLeader |
namePoint point text. More... | |
QColor | m_pointColor |
pointL line that we see if Text is moved too away from point. More... | |
bool | m_onlyPoint |
m_pointColor color of point. More... | |
bool | m_isHovered |
bool | m_showPointName |
Private Member Functions | |
void | setPointPen (qreal scale) |
Definition at line 64 of file vscenepoint.h.
anonymous enum |
Enumerator | |
---|---|
Type |
Definition at line 70 of file vscenepoint.h.
|
explicit |
Definition at line 67 of file vscenepoint.cpp.
References m_pointLeader, VScaledLine::setBasicWidth(), and widthHairLine.
|
virtualdefault |
|
protectedvirtual |
Reimplemented in VSimplePoint, VToolSinglePoint, VToolBasePoint, VToolLinePoint, DoubleLinePointTool, and VNodePoint.
Definition at line 167 of file vscenepoint.cpp.
References m_isHovered.
Referenced by VNodePoint::hoverEnterEvent(), and VToolSinglePoint::hoverEnterEvent().
|
protectedvirtual |
Reimplemented in VSimplePoint, VToolBasePoint, VToolLinePoint, and DoubleLinePointTool.
Definition at line 174 of file vscenepoint.cpp.
References m_isHovered.
Referenced by DoubleLinePointTool::hoverLeaveEvent(), VToolLinePoint::hoverLeaveEvent(), and VToolBasePoint::hoverLeaveEvent().
|
protected |
Definition at line 156 of file vscenepoint.cpp.
References m_onlyPoint.
Referenced by setPointPen().
|
virtual |
Reimplemented in VToolLinePoint, and DoubleLinePointTool.
Definition at line 86 of file vscenepoint.cpp.
References sceneScale().
Referenced by DoubleLinePointTool::paint(), and VToolLinePoint::paint().
void VScenePoint::refreshLeader | ( | ) |
Definition at line 181 of file vscenepoint.cpp.
References VGObject::LineIntersectCircle(), VGObject::LineIntersectRect(), m_pointLeader, m_pointName, m_showPointName, Mm, scaledRadius(), sceneScale(), and ToPixel().
Referenced by refreshPointGeometry(), VToolSinglePoint::setPointNamePosition(), and VNodePoint::setPointNamePosition().
|
virtual |
Definition at line 127 of file vscenepoint.cpp.
References VPointF::isShowPointName(), m_pointColor, m_pointName, m_showPointName, VPointF::mx(), VPointF::my(), VGObject::name(), refreshLeader(), VGraphicsSimpleTextItem::setPosition(), and VGraphicsSimpleTextItem::setTextColor().
Referenced by VAbstractOperation::FullUpdateFromFile(), VToolDoublePoint::FullUpdateFromFile(), VToolBasePoint::FullUpdateFromFile(), VToolSinglePoint::FullUpdateFromFile(), VNodePoint::FullUpdateFromFile(), VAbstractOperation::InitOperatedObjects(), VToolCut::RefreshGeometry(), DoubleLinePointTool::RefreshGeometry(), VToolLinePoint::RefreshGeometry(), PieceAnchorPointVisual::RefreshGeometry(), VisToolInternalPath::RefreshGeometry(), VAbstractOperation::setPointNamePosition(), VToolDoublePoint::setPointNamePosition(), VAbstractOperation::setPointNameVisiblity(), VToolDoublePoint::setPointNameVisiblity(), VToolSinglePoint::setPointNameVisiblity(), VNodePoint::setPointNameVisiblity(), VNodePoint::VNodePoint(), and VToolDoublePoint::VToolDoublePoint().
|
protected |
Definition at line 148 of file vscenepoint.cpp.
References m_onlyPoint, m_pointLeader, and m_pointName.
|
protected |
Definition at line 161 of file vscenepoint.cpp.
References m_pointColor.
Referenced by DoubleLinePointTool::DoubleLinePointTool(), DoubleLinePointTool::RefreshGeometry(), VToolLinePoint::RefreshGeometry(), and VToolLinePoint::VToolLinePoint().
|
private |
Definition at line 211 of file vscenepoint.cpp.
References correctColor(), isOnlyPoint(), m_isHovered, m_onlyPoint, m_pointColor, qApp, scaleWidth(), widthHairLine, and widthMainLine.
|
inlinevirtual |
Reimplemented in VSimplePoint, VNodePoint, VToolTriangle, VToolSinglePoint, VToolPointOfIntersectionCurves, VToolPointOfIntersectionArcs, VToolPointOfContact, VToolPointFromArcAndTangent, VToolLineIntersect, VToolBasePoint, VToolShoulderPoint, VToolNormal, VToolLinePoint, VToolLineIntersectAxis, VToolHeight, VToolEndLine, VToolCurveIntersectAxis, VToolBisector, VToolAlongLine, DoubleLinePointTool, VToolCutSplinePath, VToolCutSpline, VToolCutArc, VToolCut, PointIntersectXYTool, IntersectCircleTangentTool, and IntersectCirclesTool.
Definition at line 69 of file vscenepoint.h.
References Type.
|
protected |
Definition at line 84 of file vscenepoint.h.
Referenced by hoverEnterEvent(), VSimplePoint::hoverEnterEvent(), hoverLeaveEvent(), VSimplePoint::hoverLeaveEvent(), VSimplePoint::SetPointHighlight(), and setPointPen().
|
protected |
m_pointColor color of point.
Definition at line 83 of file vscenepoint.h.
Referenced by isOnlyPoint(), setOnlyPoint(), and setPointPen().
|
protected |
pointL line that we see if Text is moved too away from point.
Definition at line 82 of file vscenepoint.h.
Referenced by refreshPointGeometry(), setPointColor(), setPointPen(), VSimplePoint::VSimplePoint(), and VToolAlongLine::VToolAlongLine().
|
protected |
namePoint point text.
Definition at line 81 of file vscenepoint.h.
Referenced by refreshLeader(), VToolSinglePoint::SetEnabled(), setOnlyPoint(), and VScenePoint().
|
protected |
Definition at line 80 of file vscenepoint.h.
Referenced by VToolSinglePoint::allowTextHover(), VNodePoint::allowTextHover(), VSimplePoint::allowTextHover(), VToolSinglePoint::allowTextSelectable(), VNodePoint::allowTextSelectable(), VSimplePoint::allowTextSelectable(), VToolSinglePoint::Disable(), VNodePoint::EnableToolMove(), VSimplePoint::EnableToolMove(), VToolSinglePoint::EnableToolMove(), VToolSinglePoint::itemChange(), VSimplePoint::itemChange(), refreshLeader(), refreshPointGeometry(), VSimplePoint::SetEnabled(), setOnlyPoint(), VToolSinglePoint::setPointNamePosition(), VNodePoint::setPointNamePosition(), VToolSinglePoint::ToolSelectionType(), VSimplePoint::ToolSelectionType(), VNodePoint::VNodePoint(), and VSimplePoint::VSimplePoint().
|
protected |
Definition at line 85 of file vscenepoint.h.
Referenced by refreshLeader(), and refreshPointGeometry().