Expose footprint ID, description and keywords to property system.

(cherry picked from commit dee22a31d9)
This commit is contained in:
Jeff Young 2022-06-01 12:47:03 +01:00
parent 3a8ad7165b
commit 275afdc1d5
2 changed files with 17 additions and 11 deletions

View File

@ -2373,18 +2373,21 @@ 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 ) );
propMgr.AddProperty( new PROPERTY<FOOTPRINT, double>( _HKI( "Solderpaste Margin Ratio Override" ),
&FOOTPRINT::SetLocalSolderPasteMarginRatio,
&FOOTPRINT::GetLocalSolderPasteMarginRatio ) );
propMgr.AddProperty( new PROPERTY<FOOTPRINT, int>( _HKI( "Thermal Relief Width" ),
&FOOTPRINT::SetThermalWidth,
&FOOTPRINT::GetThermalWidth,
PROPERTY_DISPLAY::DISTANCE ) );
&FOOTPRINT::SetThermalWidth, &FOOTPRINT::GetThermalWidth,
PROPERTY_DISPLAY::DISTANCE ) );
propMgr.AddProperty( new PROPERTY<FOOTPRINT, int>( _HKI( "Thermal Relief Gap" ),
&FOOTPRINT::SetThermalGap,
&FOOTPRINT::GetThermalGap,
PROPERTY_DISPLAY::DISTANCE ) );
// TODO zone connection, FPID?
&FOOTPRINT::SetThermalGap, &FOOTPRINT::GetThermalGap,
PROPERTY_DISPLAY::DISTANCE ) );
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

@ -195,6 +195,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; }