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

#include <design_block_pane.h>

Inheritance diagram for DESIGN_BLOCK_PANE:
WX_PANEL

Public Member Functions

 DESIGN_BLOCK_PANE (SCH_EDIT_FRAME *aParent, const LIB_ID *aPreselect, std::vector< LIB_ID > &aHistoryList)
 Create dialog to choose design_block.
 
LIB_ID GetSelectedLibId (int *aUnit=nullptr) const
 To be called after this dialog returns from ShowModal().
 
void SelectLibId (const LIB_ID &aLibId)
 
void RefreshLibs ()
 
void OnCheckBox (wxCommandEvent &aEvent)
 
void UpdateCheckboxes ()
 
void OnSaveSheetAsDesignBlock (wxCommandEvent &aEvent)
 
void OnSaveSelectionAsDesignBlock (wxCommandEvent &aEvent)
 
void OnDeleteLibrary (wxCommandEvent &aEvent)
 
void OnDeleteDesignBlock (wxCommandEvent &aEvent)
 
PANEL_DESIGN_BLOCK_CHOOSERGetDesignBlockPanel () const
 
void SetBorders (bool aLeft, bool aRight, bool aTop, bool aBottom)
 
void SetBorderColor (const KIGFX::COLOR4D &aColor)
 

Protected Attributes

PANEL_DESIGN_BLOCK_CHOOSERm_chooserPanel
 
wxCheckBox * m_repeatedPlacement
 
wxCheckBox * m_placeAsSheet
 
wxCheckBox * m_keepAnnotations
 
SCH_EDIT_FRAMEm_frame
 

Private Member Functions

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 38 of file design_block_pane.h.

Constructor & Destructor Documentation

◆ DESIGN_BLOCK_PANE()

DESIGN_BLOCK_PANE::DESIGN_BLOCK_PANE ( SCH_EDIT_FRAME aParent,
const LIB_ID aPreselect,
std::vector< LIB_ID > &  aHistoryList 
)

Create dialog to choose design_block.

Parameters
aParenta SCH_BASE_FRAME parent window.
aAllowFieldEditsif false, all functions that allow the user to edit fields (currently just footprint selection) will not be available.
aShowFootprintsif false, all footprint preview and selection features are disabled. This forces aAllowFieldEdits false too.

Definition at line 44 of file design_block_pane.cpp.

References _, PANEL_DESIGN_BLOCK_CHOOSER::FinishSetup(), TOOLS_HOLDER::GetToolManager(), LIB_ID::IsValid(), KEEP_ANNOTATIONS, m_chooserPanel, m_keepAnnotations, m_placeAsSheet, m_repeatedPlacement, PANEL_DESIGN_BLOCK_CHOOSER::OnChar(), OnCheckBox(), PLACE_AS_SHEET, EE_ACTIONS::placeDesignBlock, REPEATED_PLACEMENT, PANEL_DESIGN_BLOCK_CHOOSER::SetPreselect(), and UpdateCheckboxes().

Member Function Documentation

◆ GetDesignBlockPanel()

PANEL_DESIGN_BLOCK_CHOOSER * DESIGN_BLOCK_PANE::GetDesignBlockPanel ( ) const
inline

Definition at line 79 of file design_block_pane.h.

References m_chooserPanel.

Referenced by SCH_DESIGN_BLOCK_CONTROL::getCurrentTreeNode().

◆ GetSelectedLibId()

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

To be called after this dialog returns from ShowModal().

For multi-unit design_blocks, if the user selects the design_block itself rather than picking an individual unit, 0 will be returned in aUnit. Beware that this is an invalid unit number - this should be replaced with whatever default is desired (usually 1).

Parameters
aUnitif not NULL, the selected unit is filled in here.
Returns
the LIB_ID of the design_block that has been selected.

Definition at line 116 of file design_block_pane.cpp.

References PANEL_DESIGN_BLOCK_CHOOSER::GetSelectedLibId(), and m_chooserPanel.

Referenced by SCH_DESIGN_BLOCK_CONTROL::getSelectedLibId(), SCH_DRAWING_TOOLS::ImportSheet(), SCH_EDIT_FRAME::SaveSelectionAsDesignBlock(), and SCH_EDIT_FRAME::SaveSheetAsDesignBlock().

◆ OnCheckBox()

void DESIGN_BLOCK_PANE::OnCheckBox ( wxCommandEvent &  aEvent)

Definition at line 94 of file design_block_pane.cpp.

References Kiface(), m_keepAnnotations, m_placeAsSheet, and m_repeatedPlacement.

Referenced by DESIGN_BLOCK_PANE().

◆ OnDeleteDesignBlock()

void DESIGN_BLOCK_PANE::OnDeleteDesignBlock ( wxCommandEvent &  aEvent)

◆ OnDeleteLibrary()

void DESIGN_BLOCK_PANE::OnDeleteLibrary ( wxCommandEvent &  aEvent)

◆ OnPaint()

◆ OnSaveSelectionAsDesignBlock()

void DESIGN_BLOCK_PANE::OnSaveSelectionAsDesignBlock ( wxCommandEvent &  aEvent)

◆ OnSaveSheetAsDesignBlock()

void DESIGN_BLOCK_PANE::OnSaveSheetAsDesignBlock ( wxCommandEvent &  aEvent)

◆ RefreshLibs()

◆ SelectLibId()

◆ SetBorderColor()

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

Definition at line 47 of file wx_panel.h.

References WX_PANEL::m_borderColor.

Referenced by SYMBOL_TREE_SYNCHRONIZING_ADAPTER::ShowPreview().

◆ SetBorders()

◆ UpdateCheckboxes()

void 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 WX_PANEL::OnPaint(), and WX_PANEL::SetBorderColor().

◆ m_bottomBorder

bool WX_PANEL::m_bottomBorder
privateinherited

Definition at line 59 of file wx_panel.h.

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

◆ m_chooserPanel

PANEL_DESIGN_BLOCK_CHOOSER* DESIGN_BLOCK_PANE::m_chooserPanel
protected

◆ m_frame

SCH_EDIT_FRAME* DESIGN_BLOCK_PANE::m_frame
protected

Definition at line 88 of file design_block_pane.h.

◆ m_keepAnnotations

wxCheckBox* DESIGN_BLOCK_PANE::m_keepAnnotations
protected

Definition at line 86 of file design_block_pane.h.

Referenced by DESIGN_BLOCK_PANE(), OnCheckBox(), and UpdateCheckboxes().

◆ m_leftBorder

bool WX_PANEL::m_leftBorder
privateinherited

Definition at line 56 of file wx_panel.h.

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

◆ m_placeAsSheet

wxCheckBox* DESIGN_BLOCK_PANE::m_placeAsSheet
protected

Definition at line 85 of file design_block_pane.h.

Referenced by DESIGN_BLOCK_PANE(), OnCheckBox(), and UpdateCheckboxes().

◆ m_repeatedPlacement

wxCheckBox* DESIGN_BLOCK_PANE::m_repeatedPlacement
protected

Definition at line 84 of file design_block_pane.h.

Referenced by DESIGN_BLOCK_PANE(), OnCheckBox(), and UpdateCheckboxes().

◆ m_rightBorder

bool WX_PANEL::m_rightBorder
privateinherited

Definition at line 57 of file wx_panel.h.

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

◆ m_topBorder

bool WX_PANEL::m_topBorder
privateinherited

Definition at line 58 of file wx_panel.h.

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


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