KiCad PCB EDA Suite
|
#include <design_block_pane.h>
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_CHOOSER * | GetDesignBlockPanel () const |
void | SetBorders (bool aLeft, bool aRight, bool aTop, bool aBottom) |
void | SetBorderColor (const KIGFX::COLOR4D &aColor) |
Protected Attributes | |
PANEL_DESIGN_BLOCK_CHOOSER * | m_chooserPanel |
wxCheckBox * | m_repeatedPlacement |
wxCheckBox * | m_placeAsSheet |
wxCheckBox * | m_keepAnnotations |
SCH_EDIT_FRAME * | m_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 |
Definition at line 38 of file design_block_pane.h.
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.
aParent | a SCH_BASE_FRAME parent window. |
aAllowFieldEdits | if false, all functions that allow the user to edit fields (currently just footprint selection) will not be available. |
aShowFootprints | if 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().
|
inline |
Definition at line 79 of file design_block_pane.h.
References m_chooserPanel.
Referenced by SCH_DESIGN_BLOCK_CONTROL::getCurrentTreeNode().
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).
aUnit | if not NULL, the selected unit is filled in here. |
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().
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().
void DESIGN_BLOCK_PANE::OnDeleteDesignBlock | ( | wxCommandEvent & | aEvent | ) |
void DESIGN_BLOCK_PANE::OnDeleteLibrary | ( | wxCommandEvent & | aEvent | ) |
|
privateinherited |
Definition at line 47 of file wx_panel.cpp.
References WX_PANEL::m_borderColor, WX_PANEL::m_bottomBorder, WX_PANEL::m_leftBorder, WX_PANEL::m_rightBorder, WX_PANEL::m_topBorder, KIGFX::COLOR4D::Mix(), KIGFX::COLOR4D::ToColour(), and KIGFX::COLOR4D::UNSPECIFIED.
Referenced by WX_PANEL::WX_PANEL(), and WX_PANEL::~WX_PANEL().
void DESIGN_BLOCK_PANE::OnSaveSelectionAsDesignBlock | ( | wxCommandEvent & | aEvent | ) |
void DESIGN_BLOCK_PANE::OnSaveSheetAsDesignBlock | ( | wxCommandEvent & | aEvent | ) |
void DESIGN_BLOCK_PANE::RefreshLibs | ( | ) |
Definition at line 128 of file design_block_pane.cpp.
References m_chooserPanel, and PANEL_DESIGN_BLOCK_CHOOSER::RefreshLibs().
Referenced by SCH_EDIT_FRAME::AddDesignBlockLibrary(), SCH_EDIT_FRAME::DeleteDesignBlockFromLibrary(), SCH_EDIT_FRAME::DeleteDesignBlockLibrary(), SCH_EDIT_FRAME::EditDesignBlockProperties(), SCH_EDIT_FRAME::KiwayMailIn(), SCH_DESIGN_BLOCK_CONTROL::PinLibrary(), SCH_EDIT_FRAME::SaveSelectionAsDesignBlock(), SCH_EDIT_FRAME::SaveSheetAsDesignBlock(), and SCH_DESIGN_BLOCK_CONTROL::UnpinLibrary().
void DESIGN_BLOCK_PANE::SelectLibId | ( | const LIB_ID & | aLibId | ) |
Definition at line 122 of file design_block_pane.cpp.
References m_chooserPanel, and PANEL_DESIGN_BLOCK_CHOOSER::SelectLibId().
Referenced by SCH_EDIT_FRAME::AddDesignBlockLibrary(), SCH_EDIT_FRAME::EditDesignBlockProperties(), SCH_EDIT_FRAME::SaveSelectionAsDesignBlock(), and SCH_EDIT_FRAME::SaveSheetAsDesignBlock().
|
inlineinherited |
Definition at line 47 of file wx_panel.h.
References WX_PANEL::m_borderColor.
Referenced by SYMBOL_TREE_SYNCHRONIZING_ADAPTER::ShowPreview().
|
inlineinherited |
Definition at line 39 of file wx_panel.h.
References WX_PANEL::m_bottomBorder, WX_PANEL::m_leftBorder, WX_PANEL::m_rightBorder, and WX_PANEL::m_topBorder.
Referenced by APPEARANCE_CONTROLS::APPEARANCE_CONTROLS(), APPEARANCE_CONTROLS_3D::APPEARANCE_CONTROLS_3D(), PAGED_DIALOG::PAGED_DIALOG(), PANEL_COLOR_SETTINGS::PANEL_COLOR_SETTINGS(), PANEL_PACKAGES_VIEW::PANEL_PACKAGES_VIEW(), PANEL_SCH_SELECTION_FILTER::PANEL_SCH_SELECTION_FILTER(), PANEL_SELECTION_FILTER::PANEL_SELECTION_FILTER(), PANEL_SETUP_BOARD_STACKUP::PANEL_SETUP_BOARD_STACKUP(), PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES(), and SYMBOL_TREE_SYNCHRONIZING_ADAPTER::ShowPreview().
void DESIGN_BLOCK_PANE::UpdateCheckboxes | ( | ) |
Definition at line 105 of file design_block_pane.cpp.
References Kiface(), m_keepAnnotations, m_placeAsSheet, and m_repeatedPlacement.
Referenced by DESIGN_BLOCK_PANE(), and SCH_EDIT_FRAME::UpdateDesignBlockOptions().
|
privateinherited |
Definition at line 61 of file wx_panel.h.
Referenced by WX_PANEL::OnPaint(), and WX_PANEL::SetBorderColor().
|
privateinherited |
Definition at line 59 of file wx_panel.h.
Referenced by WX_PANEL::OnPaint(), and WX_PANEL::SetBorders().
|
protected |
Definition at line 82 of file design_block_pane.h.
Referenced by DESIGN_BLOCK_PANE(), GetDesignBlockPanel(), GetSelectedLibId(), RefreshLibs(), and SelectLibId().
|
protected |
Definition at line 88 of file design_block_pane.h.
|
protected |
Definition at line 86 of file design_block_pane.h.
Referenced by DESIGN_BLOCK_PANE(), OnCheckBox(), and UpdateCheckboxes().
|
privateinherited |
Definition at line 56 of file wx_panel.h.
Referenced by WX_PANEL::OnPaint(), and WX_PANEL::SetBorders().
|
protected |
Definition at line 85 of file design_block_pane.h.
Referenced by DESIGN_BLOCK_PANE(), OnCheckBox(), and UpdateCheckboxes().
|
protected |
Definition at line 84 of file design_block_pane.h.
Referenced by DESIGN_BLOCK_PANE(), OnCheckBox(), and UpdateCheckboxes().
|
privateinherited |
Definition at line 57 of file wx_panel.h.
Referenced by WX_PANEL::OnPaint(), and WX_PANEL::SetBorders().
|
privateinherited |
Definition at line 58 of file wx_panel.h.
Referenced by WX_PANEL::OnPaint(), and WX_PANEL::SetBorders().