LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 noexceptoverride
 
QPainterPath shape () const noexceptoverride
 
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) noexceptoverride
 
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 ( const LineGraphicsItem other)
delete
LineGraphicsItem ( QGraphicsItem *  parent = nullptr)
explicitnoexcept
~LineGraphicsItem ( )
noexcept

Member Function Documentation

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
inlineoverridenoexcept
QPainterPath shape ( ) const
inlineoverridenoexcept
void paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget = 0 
)
overridenoexcept
LineGraphicsItem& operator= ( const LineGraphicsItem rhs)
delete
void layerEdited ( const GraphicsLayer layer,
GraphicsLayer::Event  event 
)
privatenoexcept
void updateBoundingRectAndShape ( )
privatenoexcept

+ Here is the call graph for this function:

Member Data Documentation

const GraphicsLayer* mLayer
private
QPen mPen
private
QPen mPenHighlighted
private
QLineF mLine
private
QRectF mBoundingRect
private
QPainterPath mShape
private
GraphicsLayer::OnEditedSlot mOnLayerEditedSlot
private

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