KiCad PCB EDA Suite
|
#include <footprint_preview_widget.h>
Public Member Functions | |
FOOTPRINT_PREVIEW_WIDGET (wxWindow *aParent, KIWAY &aKiway) | |
Construct a footprint preview widget. | |
bool | IsInitialized () const |
Return whether the widget initialized properly. | |
void | SetStatusText (const wxString &aText) |
Set the contents of the status label and display it. | |
void | ClearStatus () |
Clear the contents of the status label and hide it. | |
void | SetUserUnits (EDA_UNITS aUnits) |
Set the units for the preview. | |
void | SetPinFunctions (const std::map< wxString, wxString > &aPinFunctions) |
Set the pin functions from the symbol's netlist. | |
void | DisplayFootprint (const LIB_ID &aFPID) |
Set the currently displayed footprint. | |
void | DisplayFootprints (std::shared_ptr< FOOTPRINT > aFootprintA, std::shared_ptr< FOOTPRINT > aFootprintB) |
Display a pair of footprints. | |
void | RefreshAll () |
Force the redrawing of all contents. | |
FOOTPRINT_PREVIEW_PANEL_BASE * | GetPreviewPanel () |
Protected Attributes | |
FOOTPRINT_PREVIEW_PANEL_BASE * | m_prev_panel |
wxStaticText * | m_status |
wxPanel * | m_statusPanel |
wxSizer * | m_statusSizer |
wxSizer * | m_outerSizer |
LIB_ID | m_libid |
Definition at line 38 of file footprint_preview_widget.h.
FOOTPRINT_PREVIEW_WIDGET::FOOTPRINT_PREVIEW_WIDGET | ( | wxWindow * | aParent, |
KIWAY & | aKiway | ||
) |
Construct a footprint preview widget.
aParent | - parent window |
aKiway | - an active Kiway instance |
Definition at line 28 of file footprint_preview_widget.cpp.
References FOOTPRINT_PREVIEW_PANEL_BASE::Create(), FOOTPRINT_PREVIEW_PANEL_BASE::GetBackgroundColor(), FOOTPRINT_PREVIEW_PANEL_BASE::GetForegroundColor(), FOOTPRINT_PREVIEW_PANEL_BASE::GetWindow(), m_outerSizer, m_prev_panel, m_status, m_statusPanel, m_statusSizer, SetStatusText(), and KIGFX::COLOR4D::ToColour().
void FOOTPRINT_PREVIEW_WIDGET::ClearStatus | ( | ) |
Clear the contents of the status label and hide it.
Definition at line 80 of file footprint_preview_widget.cpp.
References FOOTPRINT_PREVIEW_PANEL_BASE::GetWindow(), m_prev_panel, m_status, and m_statusPanel.
Referenced by DisplayFootprint(), DisplayFootprints(), PANEL_FOOTPRINT_CHOOSER::onFootprintSelected(), and PANEL_SYMBOL_CHOOSER::showFootprint().
void FOOTPRINT_PREVIEW_WIDGET::DisplayFootprint | ( | const LIB_ID & | aFPID | ) |
Set the currently displayed footprint.
Any footprint passed in here MUST have been passed to CacheFootprint before.
Definition at line 101 of file footprint_preview_widget.cpp.
References _, LIB_ID::clear(), ClearStatus(), FOOTPRINT_PREVIEW_PANEL_BASE::DisplayFootprint(), m_libid, m_prev_panel, and SetStatusText().
Referenced by PANEL_FOOTPRINT_CHOOSER::onFootprintSelected(), and PANEL_SYMBOL_CHOOSER::showFootprint().
void FOOTPRINT_PREVIEW_WIDGET::DisplayFootprints | ( | std::shared_ptr< FOOTPRINT > | aFootprintA, |
std::shared_ptr< FOOTPRINT > | aFootprintB | ||
) |
Display a pair of footprints.
(Normally used for diff'ing.)
Definition at line 121 of file footprint_preview_widget.cpp.
References ClearStatus(), FOOTPRINT_PREVIEW_PANEL_BASE::DisplayFootprints(), and m_prev_panel.
Referenced by FOOTPRINT_DIFF_WIDGET::DisplayDiff().
|
inline |
Definition at line 95 of file footprint_preview_widget.h.
References m_prev_panel.
Referenced by PANEL_FOOTPRINT_CHOOSER::onFootprintSelected().
|
inline |
Return whether the widget initialized properly.
This could return false if Kiway is not available. If this returns false, no other methods should be called.
Definition at line 54 of file footprint_preview_widget.h.
References m_prev_panel.
Referenced by PANEL_SYMBOL_CHOOSER::FinishSetup(), PANEL_FOOTPRINT_CHOOSER::onFootprintSelected(), PANEL_SYMBOL_CHOOSER::onSymbolSelected(), PANEL_SYMBOL_CHOOSER::showFootprint(), and PANEL_SYMBOL_CHOOSER::showFootprintFor().
void FOOTPRINT_PREVIEW_WIDGET::RefreshAll | ( | ) |
Force the redrawing of all contents.
Definition at line 129 of file footprint_preview_widget.cpp.
References m_prev_panel, and FOOTPRINT_PREVIEW_PANEL_BASE::RefreshAll().
Referenced by FOOTPRINT_DIFF_WIDGET::onSlider().
void FOOTPRINT_PREVIEW_WIDGET::SetPinFunctions | ( | const std::map< wxString, wxString > & | aPinFunctions | ) |
Set the pin functions from the symbol's netlist.
This allows us to display them in the corresponding pads.
aPinFunctions | a map from pin_number to pin_function |
Definition at line 95 of file footprint_preview_widget.cpp.
References m_prev_panel, and FOOTPRINT_PREVIEW_PANEL_BASE::SetPinFunctions().
Referenced by FOOTPRINT_CHOOSER_FRAME::KiwayMailIn().
void FOOTPRINT_PREVIEW_WIDGET::SetStatusText | ( | const wxString & | aText | ) |
Set the contents of the status label and display it.
Definition at line 71 of file footprint_preview_widget.cpp.
References FOOTPRINT_PREVIEW_PANEL_BASE::GetWindow(), m_prev_panel, m_status, and m_statusPanel.
Referenced by DisplayFootprint(), PANEL_SYMBOL_CHOOSER::FinishSetup(), FOOTPRINT_PREVIEW_WIDGET(), PANEL_FOOTPRINT_CHOOSER::onFootprintSelected(), PANEL_SYMBOL_CHOOSER::onSymbolSelected(), and PANEL_SYMBOL_CHOOSER::showFootprint().
void FOOTPRINT_PREVIEW_WIDGET::SetUserUnits | ( | EDA_UNITS | aUnits | ) |
Set the units for the preview.
Definition at line 89 of file footprint_preview_widget.cpp.
References m_prev_panel, and FOOTPRINT_PREVIEW_PANEL_BASE::SetUserUnits().
Referenced by PANEL_SYMBOL_CHOOSER::constructRightPanel(), and PANEL_FOOTPRINT_CHOOSER::PANEL_FOOTPRINT_CHOOSER().
|
protected |
Definition at line 104 of file footprint_preview_widget.h.
Referenced by DisplayFootprint().
|
protected |
Definition at line 103 of file footprint_preview_widget.h.
Referenced by FOOTPRINT_DIFF_WIDGET::FOOTPRINT_DIFF_WIDGET(), and FOOTPRINT_PREVIEW_WIDGET().
|
protected |
Definition at line 98 of file footprint_preview_widget.h.
Referenced by ClearStatus(), DisplayFootprint(), DisplayFootprints(), FOOTPRINT_PREVIEW_WIDGET(), GetPreviewPanel(), IsInitialized(), RefreshAll(), SetPinFunctions(), SetStatusText(), and SetUserUnits().
|
protected |
Definition at line 100 of file footprint_preview_widget.h.
Referenced by ClearStatus(), FOOTPRINT_PREVIEW_WIDGET(), and SetStatusText().
|
protected |
Definition at line 101 of file footprint_preview_widget.h.
Referenced by ClearStatus(), FOOTPRINT_PREVIEW_WIDGET(), and SetStatusText().
|
protected |
Definition at line 102 of file footprint_preview_widget.h.
Referenced by FOOTPRINT_PREVIEW_WIDGET().