LibrePCB Developers Documentation
Loading...
Searching...
No Matches
BGI_Zone Class Referencefinal

The BGI_Zone class. More...

#include <bgi_zone.h>

Inherits QGraphicsItemGroup.

+ Collaboration diagram for BGI_Zone:

Public Member Functions

 BGI_Zone ()=delete
 
 BGI_Zone (const BGI_Zone &other)=delete
 
 BGI_Zone (BI_Zone &zone, const IF_GraphicsLayerProvider &lp) noexcept
 
virtual ~BGI_Zone () noexcept
 
BI_ZonegetZone () noexcept
 
const PrimitiveZoneGraphicsItemgetGraphicsItem () const noexcept
 
int getLineIndexAtPosition (const Point &pos) const noexcept
 
QVector< int > getVertexIndicesAtPosition (const Point &pos) const noexcept
 
QPainterPath shape () const noexcept override
 
BGI_Zoneoperator= (const BGI_Zone &rhs)=delete
 

Private Member Functions

void zoneEdited (const BI_Zone &obj, BI_Zone::Event event) noexcept
 
QVariant itemChange (GraphicsItemChange change, const QVariant &value) noexcept override
 
void updateZValue () noexcept
 
void updateEditable () noexcept
 

Private Attributes

BI_ZonemZone
 
QScopedPointer< PrimitiveZoneGraphicsItemmGraphicsItem
 
BI_Zone::OnEditedSlot mOnEditedSlot
 

Detailed Description

The BGI_Zone class.

Constructor & Destructor Documentation

◆ BGI_Zone() [1/3]

BGI_Zone ( )
delete

◆ BGI_Zone() [2/3]

BGI_Zone ( const BGI_Zone other)
delete

◆ BGI_Zone() [3/3]

BGI_Zone ( BI_Zone zone,
const IF_GraphicsLayerProvider lp 
)
noexcept

◆ ~BGI_Zone()

~BGI_Zone ( )
virtualnoexcept

Member Function Documentation

◆ getZone()

BI_Zone & getZone ( )
inlinenoexcept

◆ getGraphicsItem()

const PrimitiveZoneGraphicsItem & getGraphicsItem ( ) const
inlinenoexcept

◆ 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.

◆ 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.

◆ shape()

QPainterPath shape ( ) const
overridenoexcept

◆ operator=()

BGI_Zone & operator= ( const BGI_Zone rhs)
delete

◆ zoneEdited()

void zoneEdited ( const BI_Zone obj,
BI_Zone::Event  event 
)
privatenoexcept

◆ itemChange()

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

◆ updateZValue()

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

◆ updateEditable()

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

Member Data Documentation

◆ mZone

BI_Zone& mZone
private

◆ mGraphicsItem

QScopedPointer<PrimitiveZoneGraphicsItem> mGraphicsItem
private

◆ mOnEditedSlot

BI_Zone::OnEditedSlot mOnEditedSlot
private

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