KiCad PCB EDA Suite
Loading...
Searching...
No Matches
GEOM_SYNCER Class Referenceabstract

A class that operates over a list of BOUND_CONTROLs and keeps them in sync with a PCB_SHAPE. More...

Inheritance diagram for GEOM_SYNCER:
ARC_GEOM_SYNCER BEZIER_GEOM_SYNCER CIRCLE_GEOM_SYNCER LINE_GEOM_SYNCER RECTANGLE_GEOM_SYNCER

Public Member Functions

 GEOM_SYNCER (PCB_SHAPE &aShape, std::vector< BOUND_CONTROL > &aBoundCtrls)
 
void BindCtrls (size_t aFrom, size_t aTo, std::function< void()> aCb)
 
void SetShape (PCB_SHAPE &aShape)
 
virtual bool Validate (wxArrayString &aErrs) const
 

Protected Member Functions

virtual void updateAll ()=0
 
wxTextCtrl * GetCtrl (size_t aIndex) const
 
int GetIntValue (size_t aIndex) const
 
EDA_ANGLE GetAngleValue (size_t aIndex) const
 
void ChangeValue (size_t aIndex, int aValue)
 
void ChangeAngleValue (size_t aIndex, const EDA_ANGLE &aValue)
 
PCB_SHAPEGetShape ()
 
const PCB_SHAPEGetShape () const
 

Private Attributes

PCB_SHAPEm_shape
 
std::vector< BOUND_CONTROL > & m_boundCtrls
 

Detailed Description

A class that operates over a list of BOUND_CONTROLs and keeps them in sync with a PCB_SHAPE.

Exactly how that is done depends on the kind of shape.

Inherit from this class and implement the relvant update functions and listen for changes on the right controls for each mode (e.g. edit line segment by endpoints).

Definition at line 61 of file pcbnew/dialogs/dialog_shape_properties.cpp.

Constructor & Destructor Documentation

◆ GEOM_SYNCER()

GEOM_SYNCER::GEOM_SYNCER ( PCB_SHAPE aShape,
std::vector< BOUND_CONTROL > &  aBoundCtrls 
)
inline

Definition at line 64 of file pcbnew/dialogs/dialog_shape_properties.cpp.

Member Function Documentation

◆ BindCtrls()

void GEOM_SYNCER::BindCtrls ( size_t  aFrom,
size_t  aTo,
std::function< void()>  aCb 
)
inline

◆ ChangeAngleValue()

void GEOM_SYNCER::ChangeAngleValue ( size_t  aIndex,
const EDA_ANGLE aValue 
)
inlineprotected

◆ ChangeValue()

◆ GetAngleValue()

EDA_ANGLE GEOM_SYNCER::GetAngleValue ( size_t  aIndex) const
inlineprotected

◆ GetCtrl()

wxTextCtrl * GEOM_SYNCER::GetCtrl ( size_t  aIndex) const
inlineprotected

Definition at line 95 of file pcbnew/dialogs/dialog_shape_properties.cpp.

References m_boundCtrls.

◆ GetIntValue()

◆ GetShape() [1/2]

◆ GetShape() [2/2]

const PCB_SHAPE & GEOM_SYNCER::GetShape ( ) const
inlineprotected

Definition at line 127 of file pcbnew/dialogs/dialog_shape_properties.cpp.

References m_shape.

◆ SetShape()

void GEOM_SYNCER::SetShape ( PCB_SHAPE aShape)
inline

Definition at line 84 of file pcbnew/dialogs/dialog_shape_properties.cpp.

References m_shape, and updateAll().

◆ updateAll()

virtual void GEOM_SYNCER::updateAll ( )
protectedpure virtual

◆ Validate()

virtual bool GEOM_SYNCER::Validate ( wxArrayString &  aErrs) const
inlinevirtual

Member Data Documentation

◆ m_boundCtrls

std::vector<BOUND_CONTROL>& GEOM_SYNCER::m_boundCtrls
private

◆ m_shape

PCB_SHAPE& GEOM_SYNCER::m_shape
private

Definition at line 130 of file pcbnew/dialogs/dialog_shape_properties.cpp.

Referenced by GetShape(), and SetShape().


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