Seamly2D
Code documentation
ArrowedLineItem Class Reference

#include <scalesceneitems.h>

Inheritance diagram for ArrowedLineItem:
Collaboration diagram for ArrowedLineItem:

Public Types

enum  { Type = UserType + static_cast<int>(Vis::ArrowedLineItem) }
 

Public Member Functions

 ArrowedLineItem (QGraphicsItem *parent=nullptr)
 
 ArrowedLineItem (const QLineF &line, QGraphicsItem *parent=nullptr)
 
virtual ~ArrowedLineItem ()=default
 
virtual int type () const Q_DECL_OVERRIDE
 
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=nullptr) Q_DECL_OVERRIDE
 

Private Member Functions

void drawArrow (const QLineF &axis, QPainterPath &path, const qreal &arrow_size)
 

Private Attributes

VCurvePathItemm_arrows
 

Detailed Description

Definition at line 84 of file scalesceneitems.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
Type 

Definition at line 92 of file scalesceneitems.h.

Constructor & Destructor Documentation

◆ ArrowedLineItem() [1/2]

ArrowedLineItem::ArrowedLineItem ( QGraphicsItem *  parent = nullptr)
explicit

Definition at line 94 of file scalesceneitems.cpp.

◆ ArrowedLineItem() [2/2]

ArrowedLineItem::ArrowedLineItem ( const QLineF &  line,
QGraphicsItem *  parent = nullptr 
)

Definition at line 100 of file scalesceneitems.cpp.

◆ ~ArrowedLineItem()

virtual ArrowedLineItem::~ArrowedLineItem ( )
virtualdefault

Member Function Documentation

◆ drawArrow()

void ArrowedLineItem::drawArrow ( const QLineF &  axis,
QPainterPath &  path,
const qreal &  arrow_size 
)
private

Definition at line 142 of file scalesceneitems.cpp.

Referenced by paint().

◆ paint()

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

Definition at line 106 of file scalesceneitems.cpp.

References drawArrow(), m_arrows, scaleWidth(), sceneScale(), and widthMainLine.

◆ type()

virtual int ArrowedLineItem::type ( ) const
inlinevirtual

Definition at line 91 of file scalesceneitems.h.

References VScaledLine::Type.

Member Data Documentation

◆ m_arrows

VCurvePathItem* ArrowedLineItem::m_arrows
private

Definition at line 100 of file scalesceneitems.h.

Referenced by paint().


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