KiCad PCB EDA Suite
|
#include <symbol_diff_widget.h>
Public Member Functions | |
SYMBOL_DIFF_WIDGET (wxWindow *aParent, EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType) | |
Construct a symbol diff widget, consisting on a canvas for displaying a schematic and a library symbol, and a slider for fading between the two. | |
~SYMBOL_DIFF_WIDGET () override | |
void | DisplayDiff (LIB_SYMBOL *aSchSymbol, LIB_SYMBOL *aLibSymbol, int aUnit, int aConvert) |
Set the currently displayed symbol. | |
void | SetStatusText (const wxString &aText) |
Set the contents of the status label and display it. | |
void | DisplaySymbol (const LIB_ID &aSymbolID, int aUnit, int aBodyStyle=0) |
Set the currently displayed symbol. | |
void | DisplayPart (LIB_SYMBOL *aSymbol, int aUnit, int aBodyStyle=0) |
Protected Member Functions | |
void | onSize (wxSizeEvent &aEvent) |
void | fitOnDrawArea () |
Protected Attributes | |
KIWAY * | m_kiway |
GAL_DISPLAY_OPTIONS_IMPL | m_galDisplayOptions |
EDA_DRAW_PANEL_GAL * | m_preview |
wxStaticText * | m_status |
wxPanel * | m_statusPanel |
wxSizer * | m_statusSizer |
wxSizer * | m_outerSizer |
LIB_SYMBOL * | m_previewItem |
A local copy of the LIB_SYMBOL to display on the canvas. | |
BOX2I | m_itemBBox |
The bounding box of the current item. | |
Private Member Functions | |
void | onSlider (wxScrollEvent &aEvent) |
Private Attributes | |
LIB_SYMBOL * | m_libraryItem |
wxSlider * | m_slider |
Definition at line 30 of file symbol_diff_widget.h.
SYMBOL_DIFF_WIDGET::SYMBOL_DIFF_WIDGET | ( | wxWindow * | aParent, |
EDA_DRAW_PANEL_GAL::GAL_TYPE | aCanvasType | ||
) |
Construct a symbol diff widget, consisting on a canvas for displaying a schematic and a library symbol, and a slider for fading between the two.
aParent | - parent window |
aCanvasType | = the type of canvas (GAL_TYPE_OPENGL or GAL_TYPE_CAIRO only) |
Definition at line 31 of file symbol_diff_widget.cpp.
References _, SYMBOL_PREVIEW_WIDGET::m_outerSizer, m_slider, and onSlider().
|
override |
Definition at line 63 of file symbol_diff_widget.cpp.
References m_libraryItem.
void SYMBOL_DIFF_WIDGET::DisplayDiff | ( | LIB_SYMBOL * | aSchSymbol, |
LIB_SYMBOL * | aLibSymbol, | ||
int | aUnit, | ||
int | aConvert | ||
) |
Set the currently displayed symbol.
Definition at line 69 of file symbol_diff_widget.cpp.
References KIGFX::VIEW::Add(), dummy, SYMBOL_PREVIEW_WIDGET::fitOnDrawArea(), KIGFX::VIEW::GetPainter(), KIGFX::PAINTER::GetSettings(), LIB_SYMBOL::GetUnitBoundingBox(), EDA_DRAW_PANEL_GAL::GetView(), LIB_SYMBOL::HasAlternateBodyStyle(), LIB_SYMBOL::IsMulti(), SYMBOL_PREVIEW_WIDGET::m_itemBBox, m_libraryItem, SYMBOL_PREVIEW_WIDGET::m_preview, SYMBOL_PREVIEW_WIDGET::m_previewItem, SCH_RENDER_SETTINGS::m_ShowUnit, onSlider(), and KIGFX::VIEW::Remove().
Referenced by EE_INSPECTION_TOOL::DiffSymbol().
|
inherited |
Definition at line 267 of file symbol_preview_widget.cpp.
References KIGFX::VIEW::Add(), SYMBOL_PREVIEW_WIDGET::fitOnDrawArea(), EDA_DRAW_PANEL_GAL::ForceRefresh(), KIGFX::VIEW::GetPainter(), KIGFX::PAINTER::GetSettings(), LIB_SYMBOL::GetUnitBoundingBox(), EDA_DRAW_PANEL_GAL::GetView(), LIB_SYMBOL::HasAlternateBodyStyle(), LIB_SYMBOL::IsMulti(), SYMBOL_PREVIEW_WIDGET::m_itemBBox, SYMBOL_PREVIEW_WIDGET::m_preview, SYMBOL_PREVIEW_WIDGET::m_previewItem, SCH_RENDER_SETTINGS::m_ShowUnit, SYMBOL_PREVIEW_WIDGET::m_statusPanel, and KIGFX::VIEW::Remove().
Referenced by DIALOG_RESCUE_EACH::displayItemsInConflict().
|
inherited |
Set the currently displayed symbol.
Definition at line 190 of file symbol_preview_widget.cpp.
References _, KIGFX::VIEW::Add(), SYMBOL_PREVIEW_WIDGET::fitOnDrawArea(), LIB_SYMBOL::Flatten(), EDA_DRAW_PANEL_GAL::ForceRefresh(), LIB_SYMBOL::GetFields(), LIB_ID::GetLibItemName(), LIB_ID::GetLibNickname(), KIGFX::VIEW::GetPainter(), KIGFX::PAINTER::GetSettings(), LIB_SYMBOL::GetUnitBoundingBox(), EDA_DRAW_PANEL_GAL::GetView(), LIB_SYMBOL::HasAlternateBodyStyle(), LIB_SYMBOL::IsMulti(), SYMBOL_LIB_TABLE::LoadSymbol(), SYMBOL_PREVIEW_WIDGET::m_itemBBox, SYMBOL_PREVIEW_WIDGET::m_kiway, SYMBOL_PREVIEW_WIDGET::m_preview, SYMBOL_PREVIEW_WIDGET::m_previewItem, SYMBOL_PREVIEW_WIDGET::m_statusPanel, KIWAY::Prj(), KIGFX::VIEW::Remove(), PROJECT_SCH::SchSymbolLibTable(), IO_ERROR::What(), and UTF8::wx_str().
Referenced by PANEL_SYMBOL_CHOOSER::onSymbolSelected(), and SYMBOL_TREE_SYNCHRONIZING_ADAPTER::ShowPreview().
|
protectedinherited |
Definition at line 166 of file symbol_preview_widget.cpp.
References BOX2< Vec >::Centre(), BOX2< Vec >::GetHeight(), EDA_DRAW_PANEL_GAL::GetView(), BOX2< Vec >::GetWidth(), SYMBOL_PREVIEW_WIDGET::m_itemBBox, SYMBOL_PREVIEW_WIDGET::m_preview, SYMBOL_PREVIEW_WIDGET::m_previewItem, scale, KIGFX::VIEW::SetCenter(), KIGFX::VIEW::SetScale(), ToVECTOR2D(), KIGFX::VIEW::ToWorld(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by DisplayDiff(), SYMBOL_PREVIEW_WIDGET::DisplayPart(), SYMBOL_PREVIEW_WIDGET::DisplaySymbol(), and SYMBOL_PREVIEW_WIDGET::onSize().
|
protectedinherited |
Definition at line 154 of file symbol_preview_widget.cpp.
References SYMBOL_PREVIEW_WIDGET::fitOnDrawArea(), EDA_DRAW_PANEL_GAL::ForceRefresh(), SYMBOL_PREVIEW_WIDGET::m_preview, and SYMBOL_PREVIEW_WIDGET::m_previewItem.
Referenced by SYMBOL_PREVIEW_WIDGET::SYMBOL_PREVIEW_WIDGET().
|
private |
Definition at line 120 of file symbol_diff_widget.cpp.
References EDA_DRAW_PANEL_GAL::ForceRefresh(), LIB_SYMBOL::GetDrawItems(), EDA_DRAW_PANEL_GAL::GetView(), m_libraryItem, SYMBOL_PREVIEW_WIDGET::m_preview, SYMBOL_PREVIEW_WIDGET::m_previewItem, m_slider, KIGFX::VIEW_ITEM::SetForcedTransparency(), and KIGFX::VIEW::Update().
Referenced by DisplayDiff(), and SYMBOL_DIFF_WIDGET().
|
inherited |
Set the contents of the status label and display it.
Definition at line 143 of file symbol_preview_widget.cpp.
References SYMBOL_PREVIEW_WIDGET::m_preview, SYMBOL_PREVIEW_WIDGET::m_status, and SYMBOL_PREVIEW_WIDGET::m_statusPanel.
Referenced by PANEL_SYMBOL_CHOOSER::onSymbolSelected().
|
protectedinherited |
Definition at line 70 of file symbol_preview_widget.h.
Referenced by SYMBOL_PREVIEW_WIDGET::SYMBOL_PREVIEW_WIDGET().
|
protectedinherited |
The bounding box of the current item.
Definition at line 84 of file symbol_preview_widget.h.
Referenced by DisplayDiff(), SYMBOL_PREVIEW_WIDGET::DisplayPart(), SYMBOL_PREVIEW_WIDGET::DisplaySymbol(), and SYMBOL_PREVIEW_WIDGET::fitOnDrawArea().
|
protectedinherited |
Definition at line 68 of file symbol_preview_widget.h.
Referenced by SYMBOL_PREVIEW_WIDGET::DisplaySymbol().
|
private |
Definition at line 53 of file symbol_diff_widget.h.
Referenced by DisplayDiff(), onSlider(), and ~SYMBOL_DIFF_WIDGET().
|
protectedinherited |
Definition at line 76 of file symbol_preview_widget.h.
Referenced by SYMBOL_DIFF_WIDGET(), and SYMBOL_PREVIEW_WIDGET::SYMBOL_PREVIEW_WIDGET().
|
protectedinherited |
Definition at line 71 of file symbol_preview_widget.h.
Referenced by DisplayDiff(), SYMBOL_PREVIEW_WIDGET::DisplayPart(), SYMBOL_PREVIEW_WIDGET::DisplaySymbol(), SYMBOL_PREVIEW_WIDGET::fitOnDrawArea(), SYMBOL_PREVIEW_WIDGET::onSize(), onSlider(), SYMBOL_PREVIEW_WIDGET::SetStatusText(), SYMBOL_PREVIEW_WIDGET::SYMBOL_PREVIEW_WIDGET(), and SYMBOL_PREVIEW_WIDGET::~SYMBOL_PREVIEW_WIDGET().
|
protectedinherited |
A local copy of the LIB_SYMBOL to display on the canvas.
Definition at line 81 of file symbol_preview_widget.h.
Referenced by DisplayDiff(), SYMBOL_PREVIEW_WIDGET::DisplayPart(), SYMBOL_PREVIEW_WIDGET::DisplaySymbol(), SYMBOL_PREVIEW_WIDGET::fitOnDrawArea(), SYMBOL_PREVIEW_WIDGET::onSize(), onSlider(), and SYMBOL_PREVIEW_WIDGET::~SYMBOL_PREVIEW_WIDGET().
|
private |
Definition at line 54 of file symbol_diff_widget.h.
Referenced by onSlider(), and SYMBOL_DIFF_WIDGET().
|
protectedinherited |
Definition at line 73 of file symbol_preview_widget.h.
Referenced by SYMBOL_PREVIEW_WIDGET::SetStatusText(), and SYMBOL_PREVIEW_WIDGET::SYMBOL_PREVIEW_WIDGET().
|
protectedinherited |
Definition at line 74 of file symbol_preview_widget.h.
Referenced by SYMBOL_PREVIEW_WIDGET::DisplayPart(), SYMBOL_PREVIEW_WIDGET::DisplaySymbol(), SYMBOL_PREVIEW_WIDGET::SetStatusText(), and SYMBOL_PREVIEW_WIDGET::SYMBOL_PREVIEW_WIDGET().
|
protectedinherited |
Definition at line 75 of file symbol_preview_widget.h.
Referenced by SYMBOL_PREVIEW_WIDGET::SYMBOL_PREVIEW_WIDGET().