Seamly2D
Code documentation
VSimplePoint Class Reference

#include <vsimplepoint.h>

Inheritance diagram for VSimplePoint:
Collaboration diagram for VSimplePoint:

Public Types

enum  { Type = UserType + static_cast<int>(Vis::SimplePoint) }
 
- Public Types inherited from VScenePoint
enum  { Type = UserType + static_cast<int>(Vis::ScenePoint) }
 

Public Slots

void deletePoint ()
 
void pointChosen ()
 
void pointSelected (bool selected)
 
void pointnameChangedPosition (const QPointF &pos)
 

Signals

void Choosed (quint32 id)
 Choosed send id when clicked. More...
 
void Selected (bool selected, quint32 id)
 
void nameChangedPosition (const QPointF &pos, quint32 id)
 
- Signals inherited from VAbstractSimple
void showContextMenu (QGraphicsSceneContextMenuEvent *event, quint32 id=null_id)
 
void Delete ()
 

Public Member Functions

 VSimplePoint (quint32 id, const QColor &currentColor, QObject *parent=nullptr)
 
virtual ~VSimplePoint ()=default
 
virtual int type () const Q_DECL_OVERRIDE
 
void SetVisualizationMode (bool value)
 
bool IsVisualizationMode () const
 
void SetPointHighlight (bool value)
 
void SetEnabled (bool enabled)
 
void EnableToolMove (bool move)
 
void allowTextHover (bool enabled)
 
void allowTextSelectable (bool enabled)
 
virtual void ToolSelectionType (const SelectionType &type) Q_DECL_OVERRIDE
 
void setOnlyPoint (bool value)
 
bool isOnlyPoint () const
 
- Public Member Functions inherited from VAbstractSimple
 VAbstractSimple (quint32 id, QObject *parent=nullptr)
 
virtual ~VAbstractSimple ()=default
 
GOType GetType () const
 
void SetType (const GOType &value)
 
- Public Member Functions inherited from VScenePoint
 VScenePoint (const QColor &lineColor, QGraphicsItem *parent=nullptr)
 
virtual ~VScenePoint ()=default
 
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 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 void keyReleaseEvent (QKeyEvent *event) Q_DECL_OVERRIDE
 
virtual QVariant itemChange (GraphicsItemChange change, const QVariant &value) Q_DECL_OVERRIDE
 
virtual void contextMenuEvent (QGraphicsSceneContextMenuEvent *event) Q_DECL_OVERRIDE
 
- Protected Member Functions inherited from VScenePoint
void setOnlyPoint (bool value)
 
bool isOnlyPoint () const
 
void setPointColor (const QString &value)
 

Private Attributes

bool m_visualizationMode
 
bool m_alwaysHovered
 

Additional Inherited Members

- Protected Attributes inherited from VAbstractSimple
quint32 id
 id spline id. More...
 
SelectionType selectionType
 
GOType type
 
- Protected Attributes inherited from VScenePoint
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
 

Detailed Description

Definition at line 72 of file vsimplepoint.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
Type 

Definition at line 80 of file vsimplepoint.h.

Constructor & Destructor Documentation

◆ VSimplePoint()

◆ ~VSimplePoint()

virtual VSimplePoint::~VSimplePoint ( )
virtualdefault

Member Function Documentation

◆ allowTextHover()

void VSimplePoint::allowTextHover ( bool  enabled)

◆ allowTextSelectable()

void VSimplePoint::allowTextSelectable ( bool  enabled)

◆ Choosed

void VSimplePoint::Choosed ( quint32  id)
signal

◆ contextMenuEvent()

void VSimplePoint::contextMenuEvent ( QGraphicsSceneContextMenuEvent *  event)
protectedvirtual

Definition at line 258 of file vsimplepoint.cpp.

References VAbstractSimple::showContextMenu().

Referenced by VSimplePoint().

◆ deletePoint

void VSimplePoint::deletePoint ( )
slot

Definition at line 141 of file vsimplepoint.cpp.

References VAbstractSimple::Delete().

Referenced by VSimplePoint().

◆ EnableToolMove()

void VSimplePoint::EnableToolMove ( bool  move)

◆ hoverEnterEvent()

void VSimplePoint::hoverEnterEvent ( QGraphicsSceneHoverEvent *  event)
protectedvirtual

Reimplemented from VScenePoint.

Definition at line 213 of file vsimplepoint.cpp.

References VScenePoint::m_isHovered.

◆ hoverLeaveEvent()

void VSimplePoint::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  event)
protectedvirtual

Reimplemented from VScenePoint.

Definition at line 220 of file vsimplepoint.cpp.

References m_alwaysHovered, and VScenePoint::m_isHovered.

◆ isOnlyPoint()

bool VScenePoint::isOnlyPoint

Definition at line 91 of file vscenepoint.cpp.

◆ IsVisualizationMode()

bool VSimplePoint::IsVisualizationMode ( ) const

Definition at line 96 of file vsimplepoint.cpp.

References m_visualizationMode.

◆ itemChange()

QVariant VSimplePoint::itemChange ( GraphicsItemChange  change,
const QVariant &  value 
)
protectedvirtual

Definition at line 244 of file vsimplepoint.cpp.

References VScenePoint::m_pointName, and Selected().

◆ keyReleaseEvent()

void VSimplePoint::keyReleaseEvent ( QKeyEvent *  event)
protectedvirtual

Definition at line 230 of file vsimplepoint.cpp.

References VAbstractSimple::Delete().

◆ mousePressEvent()

void VSimplePoint::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
protectedvirtual

◆ mouseReleaseEvent()

void VSimplePoint::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event)
protectedvirtual

◆ nameChangedPosition

void VSimplePoint::nameChangedPosition ( const QPointF &  pos,
quint32  id 
)
signal

◆ pointChosen

void VSimplePoint::pointChosen ( )
slot

Definition at line 147 of file vsimplepoint.cpp.

References Choosed().

Referenced by VSimplePoint().

◆ pointnameChangedPosition

void VSimplePoint::pointnameChangedPosition ( const QPointF &  pos)
slot

Definition at line 159 of file vsimplepoint.cpp.

References nameChangedPosition().

Referenced by VSimplePoint().

◆ pointSelected

void VSimplePoint::pointSelected ( bool  selected)
slot

Definition at line 153 of file vsimplepoint.cpp.

Referenced by VSimplePoint().

◆ Selected

void VSimplePoint::Selected ( bool  selected,
quint32  id 
)
signal

◆ SetEnabled()

void VSimplePoint::SetEnabled ( bool  enabled)

◆ setOnlyPoint()

void VScenePoint::setOnlyPoint

◆ SetPointHighlight()

void VSimplePoint::SetPointHighlight ( bool  value)

Definition at line 102 of file vsimplepoint.cpp.

References m_alwaysHovered, and VScenePoint::m_isHovered.

Referenced by VisPath::GetPoint().

◆ SetVisualizationMode()

void VSimplePoint::SetVisualizationMode ( bool  value)

Definition at line 89 of file vsimplepoint.cpp.

References m_visualizationMode.

Referenced by VisPath::GetPoint().

◆ ToolSelectionType()

void VSimplePoint::ToolSelectionType ( const SelectionType type)
virtual

◆ type()

virtual int VSimplePoint::type ( ) const
inlinevirtual

Reimplemented from VScenePoint.

Definition at line 79 of file vsimplepoint.h.

References Type.

Referenced by ToolSelectionType().

Member Data Documentation

◆ m_alwaysHovered

bool VSimplePoint::m_alwaysHovered
private

Definition at line 124 of file vsimplepoint.h.

Referenced by hoverLeaveEvent(), and SetPointHighlight().

◆ m_visualizationMode

bool VSimplePoint::m_visualizationMode
private

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