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

#include <footprint_diff_widget.h>

Inheritance diagram for FOOTPRINT_DIFF_WIDGET:
FOOTPRINT_PREVIEW_WIDGET

Public Member Functions

 FOOTPRINT_DIFF_WIDGET (wxWindow *aParent, KIWAY &aKiway)
 Construct a footprint diff widget, consisting on a canvas for displaying a board and a library footprint, and a slider for fading between the two.
 
void DisplayDiff (FOOTPRINT *aBoardFootprint, std::shared_ptr< FOOTPRINT > &aLibFootprint)
 Set the currently displayed symbol.
 
void ToggleAB ()
 Toggle between full-A and full-B display.
 
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_BASEGetPreviewPanel ()
 

Protected Attributes

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

Private Member Functions

void onSlider (wxScrollEvent &aEvent)
 
void onCharHook (wxKeyEvent &aEvent)
 

Private Attributes

std::shared_ptr< FOOTPRINTm_boardItemCopy
 
std::shared_ptr< FOOTPRINTm_libraryItem
 
wxSlider * m_slider
 
wxBitmapButton * m_toggleButton
 

Detailed Description

Definition at line 31 of file footprint_diff_widget.h.

Constructor & Destructor Documentation

◆ FOOTPRINT_DIFF_WIDGET()

FOOTPRINT_DIFF_WIDGET::FOOTPRINT_DIFF_WIDGET ( wxWindow * aParent,
KIWAY & aKiway )

Construct a footprint diff widget, consisting on a canvas for displaying a board and a library footprint, and a slider for fading between the two.

Parameters
aParent- parent window
aKiway- an active Kiway instance

Definition at line 34 of file footprint_diff_widget.cpp.

References _, AddHotkeyName(), FOOTPRINT_PREVIEW_WIDGET::FOOTPRINT_PREVIEW_WIDGET(), IS_COMMENT, KiBitmapBundle(), m_libraryItem, FOOTPRINT_PREVIEW_WIDGET::m_outerSizer, m_slider, m_toggleButton, onCharHook(), onSlider(), swap, and ToggleAB().

Member Function Documentation

◆ ClearStatus()

void FOOTPRINT_PREVIEW_WIDGET::ClearStatus ( )
inherited

Clear the contents of the status label and hide it.

Definition at line 87 of file footprint_preview_widget.cpp.

References m_prev_panel, m_status, and m_statusPanel.

Referenced by DisplayFootprint(), and DisplayFootprints().

◆ DisplayDiff()

void FOOTPRINT_DIFF_WIDGET::DisplayDiff ( FOOTPRINT * aBoardFootprint,
std::shared_ptr< FOOTPRINT > & aLibFootprint )

◆ DisplayFootprint()

void FOOTPRINT_PREVIEW_WIDGET::DisplayFootprint ( const LIB_ID & aFPID)
inherited

Set the currently displayed footprint.

Any footprint passed in here MUST have been passed to CacheFootprint before.

Definition at line 113 of file footprint_preview_widget.cpp.

References _, ClearStatus(), m_libid, m_prev_panel, and SetStatusText().

◆ DisplayFootprints()

void FOOTPRINT_PREVIEW_WIDGET::DisplayFootprints ( std::shared_ptr< FOOTPRINT > aFootprintA,
std::shared_ptr< FOOTPRINT > aFootprintB )
inherited

Display a pair of footprints.

(Normally used for diff'ing.)

Definition at line 133 of file footprint_preview_widget.cpp.

References ClearStatus(), and m_prev_panel.

Referenced by FOOTPRINT_DIFF_WIDGET::DisplayDiff().

◆ GetPreviewPanel()

FOOTPRINT_PREVIEW_PANEL_BASE * FOOTPRINT_PREVIEW_WIDGET::GetPreviewPanel ( )
inlineinherited

Definition at line 98 of file footprint_preview_widget.h.

References m_prev_panel.

◆ IsInitialized()

bool FOOTPRINT_PREVIEW_WIDGET::IsInitialized ( ) const
inlineinherited

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 57 of file footprint_preview_widget.h.

References m_prev_panel.

◆ onCharHook()

void FOOTPRINT_DIFF_WIDGET::onCharHook ( wxKeyEvent & aEvent)
private

Definition at line 174 of file footprint_diff_widget.cpp.

References ToggleAB().

Referenced by FOOTPRINT_DIFF_WIDGET().

◆ onSlider()

void FOOTPRINT_DIFF_WIDGET::onSlider ( wxScrollEvent & aEvent)
private

◆ RefreshAll()

void FOOTPRINT_PREVIEW_WIDGET::RefreshAll ( )
inherited

Force the redrawing of all contents.

Definition at line 143 of file footprint_preview_widget.cpp.

References m_prev_panel.

Referenced by FOOTPRINT_DIFF_WIDGET::onSlider().

◆ SetPinFunctions()

void FOOTPRINT_PREVIEW_WIDGET::SetPinFunctions ( const std::map< wxString, wxString > & aPinFunctions)
inherited

Set the pin functions from the symbol's netlist.

This allows us to display them in the corresponding pads.

Parameters
aPinFunctionsa map from pin_number to pin_function

Definition at line 106 of file footprint_preview_widget.cpp.

References m_prev_panel.

◆ SetStatusText()

void FOOTPRINT_PREVIEW_WIDGET::SetStatusText ( const wxString & aText)
inherited

Set the contents of the status label and display it.

Definition at line 75 of file footprint_preview_widget.cpp.

References m_prev_panel, m_status, and m_statusPanel.

Referenced by DisplayFootprint(), and FOOTPRINT_PREVIEW_WIDGET().

◆ SetUserUnits()

void FOOTPRINT_PREVIEW_WIDGET::SetUserUnits ( EDA_UNITS aUnits)
inherited

Set the units for the preview.

Definition at line 99 of file footprint_preview_widget.cpp.

References m_prev_panel.

◆ ToggleAB()

void FOOTPRINT_DIFF_WIDGET::ToggleAB ( )

Toggle between full-A and full-B display.

Definition at line 113 of file footprint_diff_widget.cpp.

References dummy, m_slider, and onSlider().

Referenced by FOOTPRINT_DIFF_WIDGET(), and onCharHook().

Member Data Documentation

◆ m_boardItemCopy

std::shared_ptr<FOOTPRINT> FOOTPRINT_DIFF_WIDGET::m_boardItemCopy
private

Definition at line 58 of file footprint_diff_widget.h.

Referenced by DisplayDiff(), and onSlider().

◆ m_libid

LIB_ID FOOTPRINT_PREVIEW_WIDGET::m_libid
protectedinherited

Definition at line 107 of file footprint_preview_widget.h.

Referenced by DisplayFootprint().

◆ m_libraryItem

std::shared_ptr<FOOTPRINT> FOOTPRINT_DIFF_WIDGET::m_libraryItem
private

Definition at line 59 of file footprint_diff_widget.h.

Referenced by DisplayDiff(), FOOTPRINT_DIFF_WIDGET(), and onSlider().

◆ m_outerSizer

wxSizer* FOOTPRINT_PREVIEW_WIDGET::m_outerSizer
protectedinherited

◆ m_prev_panel

◆ m_slider

wxSlider* FOOTPRINT_DIFF_WIDGET::m_slider
private

Definition at line 60 of file footprint_diff_widget.h.

Referenced by FOOTPRINT_DIFF_WIDGET(), onSlider(), and ToggleAB().

◆ m_status

wxStaticText* FOOTPRINT_PREVIEW_WIDGET::m_status
protectedinherited

◆ m_statusPanel

wxPanel* FOOTPRINT_PREVIEW_WIDGET::m_statusPanel
protectedinherited

◆ m_statusSizer

wxSizer* FOOTPRINT_PREVIEW_WIDGET::m_statusSizer
protectedinherited

Definition at line 105 of file footprint_preview_widget.h.

Referenced by FOOTPRINT_PREVIEW_WIDGET().

◆ m_toggleButton

wxBitmapButton* FOOTPRINT_DIFF_WIDGET::m_toggleButton
private

Definition at line 61 of file footprint_diff_widget.h.

Referenced by FOOTPRINT_DIFF_WIDGET().


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