KiCad PCB EDA Suite
|
#include <design_block_preview_widget.h>
Public Member Functions | |
DESIGN_BLOCK_PREVIEW_WIDGET (wxWindow *aParent, bool aIncludeStatus, EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType) | |
Construct a symbol preview widget. | |
~DESIGN_BLOCK_PREVIEW_WIDGET () override | |
void | SetStatusText (const wxString &aText) |
Set the contents of the status label and display it. | |
void | DisplayDesignBlock (DESIGN_BLOCK *aDesignBlock) |
Set the currently displayed symbol. | |
Protected Member Functions | |
void | onSize (wxSizeEvent &aEvent) |
void | fitOnDrawArea () |
Protected Attributes | |
GAL_DISPLAY_OPTIONS_IMPL | m_galDisplayOptions |
EDA_DRAW_PANEL_GAL * | m_preview |
wxStaticText * | m_status |
wxPanel * | m_statusPanel |
wxSizer * | m_statusSizer |
wxSizer * | m_outerSizer |
SCHEMATIC * | m_previewItem |
BOX2I | m_itemBBox |
The bounding box of the current item. | |
Definition at line 37 of file design_block_preview_widget.h.
DESIGN_BLOCK_PREVIEW_WIDGET::DESIGN_BLOCK_PREVIEW_WIDGET | ( | wxWindow * | aParent, |
bool | aIncludeStatus, | ||
EDA_DRAW_PANEL_GAL::GAL_TYPE | aCanvasType | ||
) |
Construct a symbol preview widget.
aParent | - parent window |
aCanvasType | = the type of canvas (GAL_TYPE_OPENGL or GAL_TYPE_CAIRO only) |
Definition at line 42 of file design_block_preview_widget.cpp.
References EDA_DRAW_PANEL_GAL::GAL_FALLBACK, EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL, SETTINGS_MANAGER::GetAppSettings(), SETTINGS_MANAGER::GetColorSettings(), PGM_BASE::GetCommonSettings(), EDA_DRAW_PANEL_GAL::GetGAL(), KIGFX::VIEW::GetPainter(), KIGFX::PAINTER::GetSettings(), PGM_BASE::GetSettingsManager(), EDA_DRAW_PANEL_GAL::GetView(), LAYER_REFERENCEPART, SCH_RENDER_SETTINGS::LoadColors(), APP_SETTINGS_BASE::m_ColorTheme, KIGFX::GAL_DISPLAY_OPTIONS::m_forceDisplayCursor, m_galDisplayOptions, m_outerSizer, m_preview, m_status, m_statusPanel, m_statusSizer, APP_SETTINGS_BASE::m_Window, onSize(), Pgm(), GAL_DISPLAY_OPTIONS_IMPL::ReadConfig(), KIGFX::GAL::SetAxesEnabled(), KIGFX::GAL::SetClearColor(), KIGFX::GAL::SetGridVisibility(), EDA_DRAW_PANEL_GAL::SetStealsFocus(), and KIGFX::COLOR4D::ToColour().
|
override |
Definition at line 138 of file design_block_preview_widget.cpp.
References m_preview, and m_previewItem.
void DESIGN_BLOCK_PREVIEW_WIDGET::DisplayDesignBlock | ( | DESIGN_BLOCK * | aDesignBlock | ) |
Set the currently displayed symbol.
Definition at line 192 of file design_block_preview_widget.cpp.
References KIGFX::VIEW::Add(), KIGFX::VIEW::Clear(), SCHEMATIC::CurrentSheet(), fitOnDrawArea(), EDA_DRAW_PANEL_GAL::ForceRefresh(), DESIGN_BLOCK::GetSchematicFile(), EDA_DRAW_PANEL_GAL::GetView(), SCH_SCREEN::Items(), SCH_SHEET_PATH::LastScreen(), EESCHEMA_HELPERS::LoadSchematic(), m_itemBBox, m_preview, m_previewItem, m_statusPanel, BOX2< Vec >::Merge(), and SCH_FIELD_T.
Referenced by PANEL_DESIGN_BLOCK_CHOOSER::onDesignBlockSelected().
|
protected |
Definition at line 168 of file design_block_preview_widget.cpp.
References BOX2< Vec >::Centre(), BOX2< Vec >::GetHeight(), EDA_DRAW_PANEL_GAL::GetView(), BOX2< Vec >::GetWidth(), m_itemBBox, m_preview, m_previewItem, scale, KIGFX::VIEW::SetCenter(), KIGFX::VIEW::SetScale(), ToVECTOR2D(), KIGFX::VIEW::ToWorld(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by DisplayDesignBlock(), and onSize().
|
protected |
Definition at line 156 of file design_block_preview_widget.cpp.
References fitOnDrawArea(), EDA_DRAW_PANEL_GAL::ForceRefresh(), m_preview, and m_previewItem.
Referenced by DESIGN_BLOCK_PREVIEW_WIDGET().
void DESIGN_BLOCK_PREVIEW_WIDGET::SetStatusText | ( | const wxString & | aText | ) |
Set the contents of the status label and display it.
Definition at line 145 of file design_block_preview_widget.cpp.
References m_preview, m_status, and m_statusPanel.
|
protected |
Definition at line 66 of file design_block_preview_widget.h.
Referenced by DESIGN_BLOCK_PREVIEW_WIDGET().
|
protected |
The bounding box of the current item.
Definition at line 77 of file design_block_preview_widget.h.
Referenced by DisplayDesignBlock(), and fitOnDrawArea().
|
protected |
Definition at line 72 of file design_block_preview_widget.h.
Referenced by DESIGN_BLOCK_PREVIEW_WIDGET().
|
protected |
Definition at line 67 of file design_block_preview_widget.h.
Referenced by DESIGN_BLOCK_PREVIEW_WIDGET(), DisplayDesignBlock(), fitOnDrawArea(), onSize(), SetStatusText(), and ~DESIGN_BLOCK_PREVIEW_WIDGET().
|
protected |
Definition at line 74 of file design_block_preview_widget.h.
Referenced by DisplayDesignBlock(), fitOnDrawArea(), onSize(), and ~DESIGN_BLOCK_PREVIEW_WIDGET().
|
protected |
Definition at line 69 of file design_block_preview_widget.h.
Referenced by DESIGN_BLOCK_PREVIEW_WIDGET(), and SetStatusText().
|
protected |
Definition at line 70 of file design_block_preview_widget.h.
Referenced by DESIGN_BLOCK_PREVIEW_WIDGET(), DisplayDesignBlock(), and SetStatusText().
|
protected |
Definition at line 71 of file design_block_preview_widget.h.
Referenced by DESIGN_BLOCK_PREVIEW_WIDGET().