KiCad PCB EDA Suite
|
#include <footprint_preview_widget.h>
Public Member Functions | |
FOOTPRINT_PREVIEW_WIDGET (wxWindow *aParent, KIWAY &aKiway) | |
Construct a footprint preview widget. More... | |
bool | IsInitialized () const |
Return whether the widget initialized properly. More... | |
void | SetStatusText (const wxString &aText) |
Set the contents of the status label and display it. More... | |
void | ClearStatus () |
Clear the contents of the status label and hide it. More... | |
void | SetUserUnits (EDA_UNITS aUnits) |
Set the units for the preview. More... | |
void | DisplayFootprint (const LIB_ID &aFPID) |
Set the currently displayed footprint. More... | |
Private 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 37 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, and SetStatusText().
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(), DIALOG_CHOOSE_FOOTPRINT::OnComponentPreselected(), and DIALOG_CHOOSE_SYMBOL::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 95 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 DIALOG_CHOOSE_FOOTPRINT::OnComponentPreselected(), and DIALOG_CHOOSE_SYMBOL::ShowFootprint().
|
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 DIALOG_CHOOSE_SYMBOL::OnComponentPreselected(), DIALOG_CHOOSE_FOOTPRINT::OnComponentPreselected(), DIALOG_CHOOSE_SYMBOL::OnInitDialog(), DIALOG_CHOOSE_SYMBOL::ShowFootprint(), and DIALOG_CHOOSE_SYMBOL::ShowFootprintFor().
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(), FOOTPRINT_PREVIEW_WIDGET(), DIALOG_CHOOSE_SYMBOL::OnComponentPreselected(), DIALOG_CHOOSE_FOOTPRINT::OnComponentPreselected(), DIALOG_CHOOSE_SYMBOL::OnInitDialog(), and DIALOG_CHOOSE_SYMBOL::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 DIALOG_CHOOSE_SYMBOL::ConstructRightPanel(), and DIALOG_CHOOSE_FOOTPRINT::ConstructRightPanel().
|
private |
Definition at line 84 of file footprint_preview_widget.h.
Referenced by DisplayFootprint().
|
private |
Definition at line 83 of file footprint_preview_widget.h.
Referenced by FOOTPRINT_PREVIEW_WIDGET().
|
private |
Definition at line 78 of file footprint_preview_widget.h.
Referenced by ClearStatus(), DisplayFootprint(), FOOTPRINT_PREVIEW_WIDGET(), IsInitialized(), SetStatusText(), and SetUserUnits().
|
private |
Definition at line 80 of file footprint_preview_widget.h.
Referenced by ClearStatus(), FOOTPRINT_PREVIEW_WIDGET(), and SetStatusText().
|
private |
Definition at line 81 of file footprint_preview_widget.h.
Referenced by ClearStatus(), FOOTPRINT_PREVIEW_WIDGET(), and SetStatusText().
|
private |
Definition at line 82 of file footprint_preview_widget.h.
Referenced by FOOTPRINT_PREVIEW_WIDGET().