Expose footprint ID, description and keywords to property system.

This commit is contained in:
Jeff Young 2022-06-01 12:47:03 +01:00
parent 38bc653ce9
commit dee22a31d9
2 changed files with 13 additions and 5 deletions

View File

@ -2635,10 +2635,15 @@ static struct FOOTPRINT_DESC
propMgr.AddProperty( new PROPERTY<FOOTPRINT, int>( _HKI( "Solderpaste Margin Override" ),
&FOOTPRINT::SetLocalSolderPasteMargin, &FOOTPRINT::GetLocalSolderPasteMargin,
PROPERTY_DISPLAY::DISTANCE ) );
propMgr.AddProperty( new PROPERTY<FOOTPRINT,
double>( _HKI( "Solderpaste Margin Ratio Override" ),
&FOOTPRINT::SetLocalSolderPasteMarginRatio,
&FOOTPRINT::GetLocalSolderPasteMarginRatio ) );
// TODO zone connection, FPID?
propMgr.AddProperty( new PROPERTY<FOOTPRINT, double>( _HKI( "Solderpaste Margin Ratio Override" ),
&FOOTPRINT::SetLocalSolderPasteMarginRatio,
&FOOTPRINT::GetLocalSolderPasteMarginRatio ) );
propMgr.AddProperty( new PROPERTY<FOOTPRINT, wxString>( _HKI( "Library ID" ),
&FOOTPRINT::SetFPIDAsString, &FOOTPRINT::GetFPIDAsString ) );
propMgr.AddProperty( new PROPERTY<FOOTPRINT, wxString>( _HKI( "Description" ),
&FOOTPRINT::SetDescription, &FOOTPRINT::GetDescription ) );
propMgr.AddProperty( new PROPERTY<FOOTPRINT, wxString>( _HKI( "Keywords" ),
&FOOTPRINT::SetKeywords, &FOOTPRINT::GetKeywords ) );
// TODO zone connection
}
} _FOOTPRINT_DESC;

View File

@ -208,6 +208,9 @@ public:
const LIB_ID& GetFPID() const { return m_fpid; }
void SetFPID( const LIB_ID& aFPID ) { m_fpid = aFPID; }
const wxString GetFPIDAsString() const { return m_fpid.Format(); }
void SetFPIDAsString( const wxString& aFPID ) { m_fpid.Parse( aFPID ); }
const wxString& GetDescription() const { return m_doc; }
void SetDescription( const wxString& aDoc ) { m_doc = aDoc; }