LibrePCB Developers Documentation
LineGraphicsItem Class Referencefinal

The LineGraphicsItem class. More...

#include <linegraphicsitem.h>

Inherits QGraphicsItem.

+ Collaboration diagram for LineGraphicsItem:

Public Member Functions

 LineGraphicsItem (const LineGraphicsItem &other)=delete
 
 LineGraphicsItem (QGraphicsItem *parent=nullptr) noexcept
 
virtual ~LineGraphicsItem () noexcept
 
void setPosition (const Point &pos) noexcept
 
void setRotation (const Angle &rot) noexcept
 
void setLine (const Point &p1, const Point &p2) noexcept
 
void setLineWidth (const UnsignedLength &width) noexcept
 
void setLayer (const std::shared_ptr< GraphicsLayer > &layer) noexcept
 
QRectF boundingRect () const noexcept override
 
QPainterPath shape () const noexcept override
 
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) noexcept override
 
LineGraphicsItemoperator= (const LineGraphicsItem &rhs)=delete
 

Private Member Functions

void layerEdited (const GraphicsLayer &layer, GraphicsLayer::Event event) noexcept
 
void updateBoundingRectAndShape () noexcept
 

Private Attributes

std::shared_ptr< GraphicsLayermLayer
 
QPen mPen
 
QPen mPenHighlighted
 
QLineF mLine
 
QRectF mBoundingRect
 
QPainterPath mShape
 
GraphicsLayer::OnEditedSlot mOnLayerEditedSlot
 

Detailed Description

The LineGraphicsItem class.

Constructor & Destructor Documentation

◆ LineGraphicsItem() [1/2]

LineGraphicsItem ( const LineGraphicsItem other)
delete

◆ LineGraphicsItem() [2/2]

LineGraphicsItem ( QGraphicsItem *  parent = nullptr)
explicitnoexcept

◆ ~LineGraphicsItem()

~LineGraphicsItem ( )
virtualnoexcept

Member Function Documentation

◆ setPosition()

void setPosition ( const Point pos)
noexcept

◆ setRotation()

void setRotation ( const Angle rot)
noexcept

◆ setLine()

void setLine ( const Point p1,
const Point p2 
)
noexcept

◆ setLineWidth()

void setLineWidth ( const UnsignedLength width)
noexcept

◆ setLayer()

void setLayer ( const std::shared_ptr< GraphicsLayer > &  layer)
noexcept

◆ boundingRect()

QRectF boundingRect ( ) const
inlineoverridenoexcept

◆ shape()

QPainterPath shape ( ) const
overridenoexcept

◆ paint()

void paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget = 0 
)
overridenoexcept

◆ operator=()

LineGraphicsItem & operator= ( const LineGraphicsItem rhs)
delete

◆ layerEdited()

void layerEdited ( const GraphicsLayer layer,
GraphicsLayer::Event  event 
)
privatenoexcept

◆ updateBoundingRectAndShape()

void updateBoundingRectAndShape ( )
privatenoexcept
+ Here is the call graph for this function:

Member Data Documentation

◆ mLayer

std::shared_ptr<GraphicsLayer> mLayer
private

◆ mPen

QPen mPen
private

◆ mPenHighlighted

QPen mPenHighlighted
private

◆ mLine

QLineF mLine
private

◆ mBoundingRect

QRectF mBoundingRect
private

◆ mShape

QPainterPath mShape
private

◆ mOnLayerEditedSlot

GraphicsLayer::OnEditedSlot mOnLayerEditedSlot
private

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