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
 
 ~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 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

const 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 ( )
noexcept

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
+ Here is the call graph for this function:

◆ setLineWidth()

void setLineWidth ( const UnsignedLength width)
noexcept
+ Here is the call graph for this function:

◆ setLayer()

void setLayer ( const GraphicsLayer layer)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ boundingRect()

QRectF boundingRect ( ) const
inlineoverridenoexcept

◆ shape()

QPainterPath shape ( ) const
inlineoverridenoexcept
+ Here is the call graph for this function:

◆ paint()

void paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget = 0 
)
overridenoexcept
+ Here is the caller graph for this function:

◆ operator=()

LineGraphicsItem& operator= ( const LineGraphicsItem rhs)
delete
+ Here is the caller graph for this function:

◆ layerEdited()

void layerEdited ( const GraphicsLayer layer,
GraphicsLayer::Event  event 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateBoundingRectAndShape()

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

Member Data Documentation

◆ mLayer

const 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: