LibrePCB Developers Documentation
BGI_Plane Class Referencefinal

The BGI_Plane class. More...

#include <bgi_plane.h>

Inherits QGraphicsItem.

+ Collaboration diagram for BGI_Plane:

Classes

struct  VertexHandle
 

Public Member Functions

 BGI_Plane ()=delete
 
 BGI_Plane (const BGI_Plane &other)=delete
 
 BGI_Plane (BI_Plane &plane, const IF_GraphicsLayerProvider &lp, std::shared_ptr< const QSet< const NetSignal * > > highlightedNetSignals) noexcept
 
virtual ~BGI_Plane () noexcept
 
int getLineIndexAtPosition (const Point &pos) const noexcept
 
QVector< int > getVertexIndicesAtPosition (const Point &pos) const noexcept
 
BI_PlanegetPlane () noexcept
 
QVariant itemChange (GraphicsItemChange change, const QVariant &value) noexcept override
 
QRectF boundingRect () const noexcept override
 
QPainterPath shape () const noexcept override
 
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) noexcept override
 
BGI_Planeoperator= (const BGI_Plane &rhs)=delete
 

Private Member Functions

void planeEdited (const BI_Plane &obj, BI_Plane::Event event) noexcept
 
void layerEdited (const GraphicsLayer &layer, GraphicsLayer::Event event) noexcept
 
void updateOutlineAndFragments () noexcept
 
void updateLayer () noexcept
 
void updateVisibility () noexcept
 
void updateBoundingRectMargin () noexcept
 

Private Attributes

BI_PlanemPlane
 
const IF_GraphicsLayerProvidermLayerProvider
 
std::shared_ptr< const QSet< const NetSignal * > > mHighlightedNetSignals
 
std::shared_ptr< GraphicsLayermLayer
 
QRectF mBoundingRect
 
qreal mBoundingRectMarginPx
 
QPainterPath mShape
 
QPainterPath mOutline
 
QVector< QPainterPath > mAreas
 
qreal mLineWidthPx
 
qreal mVertexHandleRadiusPx
 
QVector< VertexHandlemVertexHandles
 
BI_Plane::OnEditedSlot mOnEditedSlot
 
GraphicsLayer::OnEditedSlot mOnLayerEditedSlot
 

Detailed Description

The BGI_Plane class.

Constructor & Destructor Documentation

◆ BGI_Plane() [1/3]

BGI_Plane ( )
delete

◆ BGI_Plane() [2/3]

BGI_Plane ( const BGI_Plane other)
delete

◆ BGI_Plane() [3/3]

BGI_Plane ( BI_Plane plane,
const IF_GraphicsLayerProvider lp,
std::shared_ptr< const QSet< const NetSignal * > >  highlightedNetSignals 
)
noexcept

◆ ~BGI_Plane()

~BGI_Plane ( )
virtualnoexcept

Member Function Documentation

◆ getLineIndexAtPosition()

int getLineIndexAtPosition ( const Point pos) const
noexcept

Get the line segment at a specific position

Parameters
posThe position to check for lines.
Returns
The index of the vertex after the line under the cursor. So for the first line segment, index 1 is returned. If no line is located under the specified position, -1 is returned.
+ Here is the call graph for this function:

◆ getVertexIndicesAtPosition()

QVector< int > getVertexIndicesAtPosition ( const Point pos) const
noexcept

Get the vertices at a specific position

Parameters
posThe position to check for vertices.
Returns
All indices of the vertices at the specified position.
+ Here is the call graph for this function:

◆ getPlane()

BI_Plane & getPlane ( )
inlinenoexcept

◆ itemChange()

QVariant itemChange ( GraphicsItemChange  change,
const QVariant &  value 
)
overridenoexcept

◆ boundingRect()

QRectF boundingRect ( ) const
inlineoverridenoexcept

◆ shape()

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

◆ paint()

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

◆ operator=()

BGI_Plane & operator= ( const BGI_Plane rhs)
delete

◆ planeEdited()

void planeEdited ( const BI_Plane obj,
BI_Plane::Event  event 
)
privatenoexcept

◆ layerEdited()

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

◆ updateOutlineAndFragments()

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

◆ updateLayer()

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

◆ updateVisibility()

void updateVisibility ( )
privatenoexcept

◆ updateBoundingRectMargin()

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

Member Data Documentation

◆ mPlane

BI_Plane& mPlane
private

◆ mLayerProvider

const IF_GraphicsLayerProvider& mLayerProvider
private

◆ mHighlightedNetSignals

std::shared_ptr<const QSet<const NetSignal*> > mHighlightedNetSignals
private

◆ mLayer

std::shared_ptr<GraphicsLayer> mLayer
private

◆ mBoundingRect

QRectF mBoundingRect
private

◆ mBoundingRectMarginPx

qreal mBoundingRectMarginPx
private

◆ mShape

QPainterPath mShape
private

◆ mOutline

QPainterPath mOutline
private

◆ mAreas

QVector<QPainterPath> mAreas
private

◆ mLineWidthPx

qreal mLineWidthPx
private

◆ mVertexHandleRadiusPx

qreal mVertexHandleRadiusPx
private

◆ mVertexHandles

QVector<VertexHandle> mVertexHandles
private

◆ mOnEditedSlot

BI_Plane::OnEditedSlot mOnEditedSlot
private

◆ mOnLayerEditedSlot

GraphicsLayer::OnEditedSlot mOnLayerEditedSlot
private

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