Seamly2D
Code documentation
VScenePoint Class Reference

#include <vscenepoint.h>

Inheritance diagram for VScenePoint:
Collaboration diagram for VScenePoint:

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

VGraphicsSimpleTextItemm_pointName
 
VScaledLinem_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)
 

Detailed Description

Definition at line 64 of file vscenepoint.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
Type 

Definition at line 70 of file vscenepoint.h.

Constructor & Destructor Documentation

◆ VScenePoint()

VScenePoint::VScenePoint ( const QColor &  lineColor,
QGraphicsItem *  parent = nullptr 
)
explicit

Definition at line 67 of file vscenepoint.cpp.

References m_pointLeader, VScaledLine::setBasicWidth(), and widthHairLine.

◆ ~VScenePoint()

virtual VScenePoint::~VScenePoint ( )
virtualdefault

Member Function Documentation

◆ hoverEnterEvent()

void VScenePoint::hoverEnterEvent ( QGraphicsSceneHoverEvent *  event)
protectedvirtual

◆ hoverLeaveEvent()

void VScenePoint::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  event)
protectedvirtual

◆ isOnlyPoint()

bool VScenePoint::isOnlyPoint ( ) const
protected

Definition at line 156 of file vscenepoint.cpp.

References m_onlyPoint.

Referenced by setPointPen().

◆ paint()

void VScenePoint::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget = nullptr 
)
virtual

Reimplemented in VToolLinePoint, and DoubleLinePointTool.

Definition at line 86 of file vscenepoint.cpp.

References sceneScale().

Referenced by DoubleLinePointTool::paint(), and VToolLinePoint::paint().

◆ refreshLeader()

◆ refreshPointGeometry()

◆ setOnlyPoint()

void VScenePoint::setOnlyPoint ( bool  value)
protected

Definition at line 148 of file vscenepoint.cpp.

References m_onlyPoint, m_pointLeader, and m_pointName.

◆ setPointColor()

void VScenePoint::setPointColor ( const QString &  value)
protected

◆ setPointPen()

void VScenePoint::setPointPen ( qreal  scale)
private

◆ type()

Member Data Documentation

◆ m_isHovered

◆ m_onlyPoint

bool VScenePoint::m_onlyPoint
protected

m_pointColor color of point.

Definition at line 83 of file vscenepoint.h.

Referenced by isOnlyPoint(), setOnlyPoint(), and setPointPen().

◆ m_pointColor

QColor VScenePoint::m_pointColor
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().

◆ m_pointLeader

VScaledLine* VScenePoint::m_pointLeader
protected

namePoint point text.

Definition at line 81 of file vscenepoint.h.

Referenced by refreshLeader(), VToolSinglePoint::SetEnabled(), setOnlyPoint(), and VScenePoint().

◆ m_pointName

◆ m_showPointName

bool VScenePoint::m_showPointName
protected

Definition at line 85 of file vscenepoint.h.

Referenced by refreshLeader(), and refreshPointGeometry().


The documentation for this class was generated from the following files: