LibrePCB Developers Documentation
OriginCrossGraphicsItem Class Referencefinal

The OriginCrossGraphicsItem class. More...

#include <origincrossgraphicsitem.h>

Inherits QGraphicsItem.

+ Collaboration diagram for OriginCrossGraphicsItem:

Public Member Functions

 OriginCrossGraphicsItem (const OriginCrossGraphicsItem &other)=delete
 
 OriginCrossGraphicsItem (QGraphicsItem *parent=nullptr) noexcept
 
virtual ~OriginCrossGraphicsItem () noexcept
 
void setPosition (const Point &pos) noexcept
 
void setRotation (const Angle &rot) noexcept
 
void setSize (const UnsignedLength &size) 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
 
OriginCrossGraphicsItemoperator= (const OriginCrossGraphicsItem &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
 
UnsignedLength mSize
 
QLineF mLineH
 
QLineF mLineV
 
QRectF mBoundingRect
 
QPainterPath mShape
 
GraphicsLayer::OnEditedSlot mOnLayerEditedSlot
 

Detailed Description

Constructor & Destructor Documentation

◆ OriginCrossGraphicsItem() [1/2]

◆ OriginCrossGraphicsItem() [2/2]

OriginCrossGraphicsItem ( QGraphicsItem *  parent = nullptr)
explicitnoexcept

◆ ~OriginCrossGraphicsItem()

~OriginCrossGraphicsItem ( )
virtualnoexcept

Member Function Documentation

◆ setPosition()

void setPosition ( const Point pos)
noexcept

◆ setRotation()

void setRotation ( const Angle rot)
noexcept

◆ setSize()

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

◆ setLayer()

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

◆ boundingRect()

QRectF boundingRect ( ) const
inlineoverridenoexcept
+ Here is the call graph for this function:

◆ shape()

QPainterPath shape ( ) const
overridenoexcept
+ Here is the caller 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=()

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

◆ layerEdited()

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

◆ updateBoundingRectAndShape()

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

Member Data Documentation

◆ mLayer

std::shared_ptr<GraphicsLayer> mLayer
private

◆ mPen

QPen mPen
private

◆ mPenHighlighted

QPen mPenHighlighted
private

◆ mSize

UnsignedLength mSize
private

◆ mLineH

QLineF mLineH
private

◆ mLineV

QLineF mLineV
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: