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

#include <sch_design_block_pane.h>

Inheritance diagram for SCH_DESIGN_BLOCK_PANE:
DESIGN_BLOCK_PANE WX_PANEL

Public Member Functions

 SCH_DESIGN_BLOCK_PANE (SCH_EDIT_FRAME *aParent, const LIB_ID *aPreselect, std::vector< LIB_ID > &aHistoryList)
 
void OnCheckBox (wxCommandEvent &aEvent)
 
void UpdateCheckboxes ()
 
void SaveSettings ()
 
LIB_ID GetSelectedLibId (int *aUnit=nullptr) const
 
void SelectLibId (const LIB_ID &aLibId)
 
DESIGN_BLOCKGetDesignBlock (const LIB_ID &aLibId, bool aUseCacheLib, bool aShowErrorMsg)
 Load design block from design block library table.
 
DESIGN_BLOCKGetSelectedDesignBlock (bool aUseCacheLib, bool aShowErrorMsg)
 
void RefreshLibs ()
 
wxString CreateNewDesignBlockLibrary (const wxString &aDialogTitle)
 Creates a new design block library.
 
bool AddDesignBlockLibrary (const wxString &aDialogTitle, const wxString &aFilename, DESIGN_BLOCK_LIB_TABLE *aTable)
 Add an existing library to a library table (presumed to be either the global or project design block table).
 
bool DeleteDesignBlockLibrary (const wxString &aLibName, bool aConfirm)
 
bool DeleteDesignBlockFromLibrary (const LIB_ID &aLibId, bool aConfirm)
 
bool EditDesignBlockProperties (const LIB_ID &aLibId)
 
PANEL_DESIGN_BLOCK_CHOOSERGetDesignBlockPanel () const
 
void SetBorders (bool aLeft, bool aRight, bool aTop, bool aBottom)
 
void SetBorderColor (const KIGFX::COLOR4D &aColor)
 

Protected Member Functions

void setLabelsAndTooltips () override
 
virtual void OnLanguageChanged (wxCommandEvent &aEvent)
 
void OnClosed (wxAuiManagerEvent &aEvent)
 

Protected Attributes

wxCheckBox * m_repeatedPlacement
 
wxCheckBox * m_placeAsGroup
 
wxCheckBox * m_placeAsSheet
 
wxCheckBox * m_keepAnnotations
 
EDA_DRAW_FRAMEm_frame = nullptr
 
PANEL_DESIGN_BLOCK_CHOOSERm_chooserPanel = nullptr
 

Private Member Functions

bool checkOverwrite (wxWindow *aFrame, wxString &libname, wxString &newName)
 
wxString createNewDesignBlockLibrary (const wxString &aDialogTitle)
 
void OnPaint (wxPaintEvent &event)
 

Private Attributes

bool m_leftBorder
 
bool m_rightBorder
 
bool m_topBorder
 
bool m_bottomBorder
 
KIGFX::COLOR4D m_borderColor
 

Detailed Description

Definition at line 39 of file sch_design_block_pane.h.

Constructor & Destructor Documentation

◆ SCH_DESIGN_BLOCK_PANE()

Member Function Documentation

◆ AddDesignBlockLibrary()

bool DESIGN_BLOCK_PANE::AddDesignBlockLibrary ( const wxString & aDialogTitle,
const wxString & aFilename,
DESIGN_BLOCK_LIB_TABLE * aTable )
inherited

◆ checkOverwrite()

bool DESIGN_BLOCK_PANE::checkOverwrite ( wxWindow * aFrame,
wxString & libname,
wxString & newName )
privateinherited

Definition at line 418 of file design_block_pane.cpp.

References _, and OKOrCancelDialog().

Referenced by EditDesignBlockProperties().

◆ CreateNewDesignBlockLibrary()

wxString DESIGN_BLOCK_PANE::CreateNewDesignBlockLibrary ( const wxString & aDialogTitle)
inherited

Creates a new design block library.

Returns
The newly created library path if library was successfully created, else wxEmptyString because user aborted or error.

Definition at line 143 of file design_block_pane.cpp.

References createNewDesignBlockLibrary().

◆ createNewDesignBlockLibrary()

◆ DeleteDesignBlockFromLibrary()

bool DESIGN_BLOCK_PANE::DeleteDesignBlockFromLibrary ( const LIB_ID & aLibId,
bool aConfirm )
inherited

◆ DeleteDesignBlockLibrary()

bool DESIGN_BLOCK_PANE::DeleteDesignBlockLibrary ( const wxString & aLibName,
bool aConfirm )
inherited

◆ EditDesignBlockProperties()

bool DESIGN_BLOCK_PANE::EditDesignBlockProperties ( const LIB_ID & aLibId)
inherited

◆ GetDesignBlock()

DESIGN_BLOCK * DESIGN_BLOCK_PANE::GetDesignBlock ( const LIB_ID & aLibId,
bool aUseCacheLib,
bool aShowErrorMsg )
inherited

Load design block from design block library table.

Parameters
aLibIdis the design block library identifier to load.
aUseCacheLibset to true to fall back to cache library if design block is not found in design block library table.
aShowErrorMessageset to true to show any error messages.
Returns
The design block found in the library or NULL if the design block was not found.

Definition at line 108 of file design_block_pane.cpp.

References _, DESIGN_BLOCK_LIB_TABLE::DesignBlockLoadWithOptionalNickname(), DisplayErrorMessage(), LIB_ID::GetLibItemName(), LIB_ID::GetLibNickname(), m_frame, IO_ERROR::What(), and UTF8::wx_str().

Referenced by PCB_CONTROL::AppendDesignBlock(), EditDesignBlockProperties(), GetSelectedDesignBlock(), SCH_DRAWING_TOOLS::ImportSheet(), PCB_CONTROL::PlaceLinkedDesignBlock(), SCH_EDITOR_CONTROL::PlaceLinkedDesignBlock(), PCB_CONTROL::SaveToLinkedDesignBlock(), and SCH_EDITOR_CONTROL::SaveToLinkedDesignBlock().

◆ GetDesignBlockPanel()

PANEL_DESIGN_BLOCK_CHOOSER * DESIGN_BLOCK_PANE::GetDesignBlockPanel ( ) const
inlineinherited

Definition at line 87 of file design_block_pane.h.

References m_chooserPanel.

Referenced by DESIGN_BLOCK_CONTROL::getCurrentTreeNode().

◆ GetSelectedDesignBlock()

DESIGN_BLOCK * DESIGN_BLOCK_PANE::GetSelectedDesignBlock ( bool aUseCacheLib,
bool aShowErrorMsg )
inherited

Definition at line 134 of file design_block_pane.cpp.

References GetDesignBlock(), and GetSelectedLibId().

◆ GetSelectedLibId()

LIB_ID DESIGN_BLOCK_PANE::GetSelectedLibId ( int * aUnit = nullptr) const
inherited

◆ OnCheckBox()

void SCH_DESIGN_BLOCK_PANE::OnCheckBox ( wxCommandEvent & aEvent)

◆ OnClosed()

void DESIGN_BLOCK_PANE::OnClosed ( wxAuiManagerEvent & aEvent)
protectedinherited

Definition at line 72 of file design_block_pane.cpp.

References m_frame.

Referenced by DESIGN_BLOCK_PANE(), and ~DESIGN_BLOCK_PANE().

◆ OnLanguageChanged()

void DESIGN_BLOCK_PANE::OnLanguageChanged ( wxCommandEvent & aEvent)
protectedvirtualinherited

Definition at line 61 of file design_block_pane.cpp.

References m_chooserPanel, and setLabelsAndTooltips().

Referenced by DESIGN_BLOCK_PANE(), and ~DESIGN_BLOCK_PANE().

◆ OnPaint()

void WX_PANEL::OnPaint ( wxPaintEvent & event)
privateinherited

◆ RefreshLibs()

◆ SaveSettings()

void DESIGN_BLOCK_PANE::SaveSettings ( )
inherited

Definition at line 84 of file design_block_pane.cpp.

References m_chooserPanel.

◆ SelectLibId()

◆ SetBorderColor()

void WX_PANEL::SetBorderColor ( const KIGFX::COLOR4D & aColor)
inlineinherited

Definition at line 47 of file wx_panel.h.

References m_borderColor.

Referenced by SYMBOL_TREE_SYNCHRONIZING_ADAPTER::ShowPreview().

◆ SetBorders()

◆ setLabelsAndTooltips()

void SCH_DESIGN_BLOCK_PANE::setLabelsAndTooltips ( )
overrideprotectedvirtual

◆ UpdateCheckboxes()

void SCH_DESIGN_BLOCK_PANE::UpdateCheckboxes ( )

Member Data Documentation

◆ m_borderColor

KIGFX::COLOR4D WX_PANEL::m_borderColor
privateinherited

Definition at line 61 of file wx_panel.h.

Referenced by OnPaint(), SetBorderColor(), and WX_PANEL().

◆ m_bottomBorder

bool WX_PANEL::m_bottomBorder
privateinherited

Definition at line 59 of file wx_panel.h.

Referenced by OnPaint(), SetBorders(), and WX_PANEL().

◆ m_chooserPanel

◆ m_frame

◆ m_keepAnnotations

wxCheckBox* SCH_DESIGN_BLOCK_PANE::m_keepAnnotations
protected

◆ m_leftBorder

bool WX_PANEL::m_leftBorder
privateinherited

Definition at line 56 of file wx_panel.h.

Referenced by OnPaint(), SetBorders(), and WX_PANEL().

◆ m_placeAsGroup

wxCheckBox* SCH_DESIGN_BLOCK_PANE::m_placeAsGroup
protected

◆ m_placeAsSheet

wxCheckBox* SCH_DESIGN_BLOCK_PANE::m_placeAsSheet
protected

◆ m_repeatedPlacement

wxCheckBox* SCH_DESIGN_BLOCK_PANE::m_repeatedPlacement
protected

◆ m_rightBorder

bool WX_PANEL::m_rightBorder
privateinherited

Definition at line 57 of file wx_panel.h.

Referenced by OnPaint(), SetBorders(), and WX_PANEL().

◆ m_topBorder

bool WX_PANEL::m_topBorder
privateinherited

Definition at line 58 of file wx_panel.h.

Referenced by OnPaint(), SetBorders(), and WX_PANEL().


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