KiCad PCB EDA Suite
|
#include <footprint_diff_widget.h>
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. More... | |
void | DisplayDiff (FOOTPRINT *aBoardFootprint, std::shared_ptr< FOOTPRINT > &aLibFootprint) |
Set the currently displayed symbol. 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_BASE * | m_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) |
Private Attributes | |
std::shared_ptr< FOOTPRINT > | m_boardItemCopy |
std::shared_ptr< FOOTPRINT > | m_libraryItem |
wxSlider * | m_slider |
Definition at line 30 of file footprint_diff_widget.h.
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.
aParent | - parent window |
aKiway | - an active Kiway instance |
Definition at line 29 of file footprint_diff_widget.cpp.
References _, FOOTPRINT_PREVIEW_WIDGET::m_outerSizer, m_slider, and onSlider().
|
inherited |
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(), FOOTPRINT_PREVIEW_WIDGET::m_prev_panel, FOOTPRINT_PREVIEW_WIDGET::m_status, and FOOTPRINT_PREVIEW_WIDGET::m_statusPanel.
Referenced by FOOTPRINT_PREVIEW_WIDGET::DisplayFootprint(), FOOTPRINT_PREVIEW_WIDGET::DisplayFootprints(), PANEL_FOOTPRINT_CHOOSER::onFootprintSelected(), and PANEL_SYMBOL_CHOOSER::showFootprint().
void FOOTPRINT_DIFF_WIDGET::DisplayDiff | ( | FOOTPRINT * | aBoardFootprint, |
std::shared_ptr< FOOTPRINT > & | aLibFootprint | ||
) |
Set the currently displayed symbol.
Definition at line 60 of file footprint_diff_widget.cpp.
References ANGLE_0, EDA_ITEM::ClearBrightened(), EDA_ITEM::ClearSelected(), FOOTPRINT::Clone(), FOOTPRINT_PREVIEW_WIDGET::DisplayFootprints(), dummy, m_boardItemCopy, m_libraryItem, and onSlider().
Referenced by BOARD_INSPECTION_TOOL::DiffFootprint().
|
inherited |
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(), FOOTPRINT_PREVIEW_WIDGET::ClearStatus(), FOOTPRINT_PREVIEW_PANEL_BASE::DisplayFootprint(), FOOTPRINT_PREVIEW_WIDGET::m_libid, FOOTPRINT_PREVIEW_WIDGET::m_prev_panel, and FOOTPRINT_PREVIEW_WIDGET::SetStatusText().
Referenced by PANEL_FOOTPRINT_CHOOSER::onFootprintSelected(), and PANEL_SYMBOL_CHOOSER::showFootprint().
|
inherited |
Display a pair of footprints.
(Normally used for diff'ing.)
Definition at line 115 of file footprint_preview_widget.cpp.
References FOOTPRINT_PREVIEW_WIDGET::ClearStatus(), FOOTPRINT_PREVIEW_PANEL_BASE::DisplayFootprints(), and FOOTPRINT_PREVIEW_WIDGET::m_prev_panel.
Referenced by DisplayDiff().
|
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 55 of file footprint_preview_widget.h.
References FOOTPRINT_PREVIEW_WIDGET::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().
|
private |
Definition at line 91 of file footprint_diff_widget.cpp.
References m_boardItemCopy, m_libraryItem, m_slider, FOOTPRINT_PREVIEW_WIDGET::RefreshAll(), and KIGFX::VIEW_ITEM::SetForcedTransparency().
Referenced by DisplayDiff(), and FOOTPRINT_DIFF_WIDGET().
|
inherited |
Force the redrawing of all contents.
Definition at line 123 of file footprint_preview_widget.cpp.
References FOOTPRINT_PREVIEW_WIDGET::m_prev_panel, and FOOTPRINT_PREVIEW_PANEL_BASE::RefreshAll().
Referenced by onSlider().
|
inherited |
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(), FOOTPRINT_PREVIEW_WIDGET::m_prev_panel, FOOTPRINT_PREVIEW_WIDGET::m_status, and FOOTPRINT_PREVIEW_WIDGET::m_statusPanel.
Referenced by FOOTPRINT_PREVIEW_WIDGET::DisplayFootprint(), PANEL_SYMBOL_CHOOSER::FinishSetup(), FOOTPRINT_PREVIEW_WIDGET::FOOTPRINT_PREVIEW_WIDGET(), PANEL_FOOTPRINT_CHOOSER::onFootprintSelected(), PANEL_SYMBOL_CHOOSER::onSymbolSelected(), and PANEL_SYMBOL_CHOOSER::showFootprint().
|
inherited |
Set the units for the preview.
Definition at line 89 of file footprint_preview_widget.cpp.
References FOOTPRINT_PREVIEW_WIDGET::m_prev_panel, and FOOTPRINT_PREVIEW_PANEL_BASE::SetUserUnits().
Referenced by PANEL_SYMBOL_CHOOSER::constructRightPanel(), and PANEL_FOOTPRINT_CHOOSER::PANEL_FOOTPRINT_CHOOSER().
|
private |
Definition at line 51 of file footprint_diff_widget.h.
Referenced by DisplayDiff(), and onSlider().
|
protectedinherited |
Definition at line 96 of file footprint_preview_widget.h.
Referenced by FOOTPRINT_PREVIEW_WIDGET::DisplayFootprint().
|
private |
Definition at line 52 of file footprint_diff_widget.h.
Referenced by DisplayDiff(), and onSlider().
|
protectedinherited |
Definition at line 95 of file footprint_preview_widget.h.
Referenced by FOOTPRINT_DIFF_WIDGET(), and FOOTPRINT_PREVIEW_WIDGET::FOOTPRINT_PREVIEW_WIDGET().
|
protectedinherited |
Definition at line 90 of file footprint_preview_widget.h.
Referenced by FOOTPRINT_PREVIEW_WIDGET::ClearStatus(), FOOTPRINT_PREVIEW_WIDGET::DisplayFootprint(), FOOTPRINT_PREVIEW_WIDGET::DisplayFootprints(), FOOTPRINT_PREVIEW_WIDGET::FOOTPRINT_PREVIEW_WIDGET(), FOOTPRINT_PREVIEW_WIDGET::IsInitialized(), FOOTPRINT_PREVIEW_WIDGET::RefreshAll(), FOOTPRINT_PREVIEW_WIDGET::SetStatusText(), and FOOTPRINT_PREVIEW_WIDGET::SetUserUnits().
|
private |
Definition at line 53 of file footprint_diff_widget.h.
Referenced by FOOTPRINT_DIFF_WIDGET(), and onSlider().
|
protectedinherited |
Definition at line 92 of file footprint_preview_widget.h.
Referenced by FOOTPRINT_PREVIEW_WIDGET::ClearStatus(), FOOTPRINT_PREVIEW_WIDGET::FOOTPRINT_PREVIEW_WIDGET(), and FOOTPRINT_PREVIEW_WIDGET::SetStatusText().
|
protectedinherited |
Definition at line 93 of file footprint_preview_widget.h.
Referenced by FOOTPRINT_PREVIEW_WIDGET::ClearStatus(), FOOTPRINT_PREVIEW_WIDGET::FOOTPRINT_PREVIEW_WIDGET(), and FOOTPRINT_PREVIEW_WIDGET::SetStatusText().
|
protectedinherited |
Definition at line 94 of file footprint_preview_widget.h.
Referenced by FOOTPRINT_PREVIEW_WIDGET::FOOTPRINT_PREVIEW_WIDGET().