KiCad PCB EDA Suite
Loading...
Searching...
No Matches
FOOTPRINT_PREVIEW_WIDGET Class Reference

#include <footprint_preview_widget.h>

Inheritance diagram for FOOTPRINT_PREVIEW_WIDGET:
FOOTPRINT_DIFF_WIDGET

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...
 
void DisplayFootprints (std::shared_ptr< FOOTPRINT > aFootprintA, std::shared_ptr< FOOTPRINT > aFootprintB)
 Display a pair of footprints. More...
 
void RefreshAll ()
 Force the redrawing of all contents. More...
 

Protected Attributes

FOOTPRINT_PREVIEW_PANEL_BASEm_prev_panel
 
wxStaticText * m_status
 
wxPanel * m_statusPanel
 
wxSizer * m_statusSizer
 
wxSizer * m_outerSizer
 
LIB_ID m_libid
 

Detailed Description

Definition at line 38 of file footprint_preview_widget.h.

Constructor & Destructor Documentation

◆ FOOTPRINT_PREVIEW_WIDGET()

FOOTPRINT_PREVIEW_WIDGET::FOOTPRINT_PREVIEW_WIDGET ( wxWindow *  aParent,
KIWAY aKiway 
)

Member Function Documentation

◆ ClearStatus()

void FOOTPRINT_PREVIEW_WIDGET::ClearStatus ( )

◆ DisplayFootprint()

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 PANEL_FOOTPRINT_CHOOSER::onFootprintSelected(), and PANEL_SYMBOL_CHOOSER::showFootprint().

◆ DisplayFootprints()

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 115 of file footprint_preview_widget.cpp.

References ClearStatus(), FOOTPRINT_PREVIEW_PANEL_BASE::DisplayFootprints(), and m_prev_panel.

Referenced by FOOTPRINT_DIFF_WIDGET::DisplayDiff().

◆ IsInitialized()

bool FOOTPRINT_PREVIEW_WIDGET::IsInitialized ( ) const
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 55 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().

◆ RefreshAll()

void FOOTPRINT_PREVIEW_WIDGET::RefreshAll ( )

Force the redrawing of all contents.

Definition at line 123 of file footprint_preview_widget.cpp.

References m_prev_panel, and FOOTPRINT_PREVIEW_PANEL_BASE::RefreshAll().

Referenced by FOOTPRINT_DIFF_WIDGET::onSlider().

◆ SetStatusText()

void FOOTPRINT_PREVIEW_WIDGET::SetStatusText ( const wxString &  aText)

◆ SetUserUnits()

void FOOTPRINT_PREVIEW_WIDGET::SetUserUnits ( EDA_UNITS  aUnits)

Member Data Documentation

◆ m_libid

LIB_ID FOOTPRINT_PREVIEW_WIDGET::m_libid
protected

Definition at line 96 of file footprint_preview_widget.h.

Referenced by DisplayFootprint().

◆ m_outerSizer

wxSizer* FOOTPRINT_PREVIEW_WIDGET::m_outerSizer
protected

◆ m_prev_panel

◆ m_status

wxStaticText* FOOTPRINT_PREVIEW_WIDGET::m_status
protected

Definition at line 92 of file footprint_preview_widget.h.

Referenced by ClearStatus(), FOOTPRINT_PREVIEW_WIDGET(), and SetStatusText().

◆ m_statusPanel

wxPanel* FOOTPRINT_PREVIEW_WIDGET::m_statusPanel
protected

Definition at line 93 of file footprint_preview_widget.h.

Referenced by ClearStatus(), FOOTPRINT_PREVIEW_WIDGET(), and SetStatusText().

◆ m_statusSizer

wxSizer* FOOTPRINT_PREVIEW_WIDGET::m_statusSizer
protected

Definition at line 94 of file footprint_preview_widget.h.

Referenced by FOOTPRINT_PREVIEW_WIDGET().


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