KiCad PCB EDA Suite
|
Panel which configures a set of conditions for a component class assignment rule. More...
#include <panel_assign_component_classes.h>
Public Types | |
enum | ADD_MATCH_POPUP { ID_REFERENCE = wxID_HIGHEST + 1 , ID_FOOTPRINT , ID_SIDE , ID_ROTATION , ID_FOOTPRINT_FIELD , ID_SHEET_NAME , ID_CUSTOM } |
IDs for match type popup menu. More... | |
Public Member Functions | |
PANEL_COMPONENT_CLASS_ASSIGNMENT (wxWindow *aParent, PANEL_ASSIGN_COMPONENT_CLASSES *aPanelParent, DIALOG_SHIM *aDlg) | |
~PANEL_COMPONENT_CLASS_ASSIGNMENT () | |
void | OnDeleteAssignmentClick (wxCommandEvent &event) override |
Deletes this component class assignment rule. | |
void | OnAddConditionClick (wxCommandEvent &event) override |
Adds a match condition to this component class assignment rule. | |
void | OnHighlightItemsClick (wxCommandEvent &event) override |
Highlights footprints matching this set of conditions. | |
CONDITION_DATA * | AddCondition (COMPONENT_CLASS_ASSIGNMENT_DATA::CONDITION_TYPE aCondition) |
Adds a condition to this component class assignment rule. | |
void | RemoveCondition (wxPanel *aMatch) |
Removes a given condition from this component class assignment rule (note: called from the child condition panel) | |
const std::vector< CONDITION_DATA * > & | GetConditions () const |
void | SetComponentClass (const wxString &aComponentClass) const |
Sets the resulting component class for this assignment. | |
const wxString | GetComponentClass () const |
Gets the resulting component class for this assignment. | |
void | SetConditionsOperator (COMPONENT_CLASS_ASSIGNMENT_DATA::CONDITIONS_OPERATOR aCondition) const |
Sets the boolean operator applied to all assignment conditions. | |
COMPONENT_CLASS_ASSIGNMENT_DATA::CONDITIONS_OPERATOR | GetConditionsOperator () const |
Gets the boolean operator applied to all assignment conditions. | |
COMPONENT_CLASS_ASSIGNMENT_DATA | GenerateAssignmentData () const |
Converts the UI representation in to the internal assignment data representation. | |
Protected Member Functions | |
void | onMenu (wxCommandEvent &aEvent) |
Handles add match condition popup menu selections. | |
Protected Attributes | |
PANEL_ASSIGN_COMPONENT_CLASSES * | m_parentPanel |
The top-level configuration panel which owns this assignment rule. | |
wxStaticBoxSizer * | m_matchesList |
The sizer containing match condition panels. | |
std::unordered_set< COMPONENT_CLASS_ASSIGNMENT_DATA::CONDITION_TYPE > | m_conditionTypes |
Set containing all currently configured match condition types. | |
DIALOG_SHIM * | m_dlg |
The parent configuration dialog. | |
std::vector< CONDITION_DATA * > | m_matches |
All match conditions for this component class assignment rule. | |
wxStaticText * | m_staticText101 |
wxTextCtrl * | m_componentClass |
STD_BITMAP_BUTTON * | m_buttonHighlightItems |
STD_BITMAP_BUTTON * | m_buttonDeleteAssignment |
STD_BITMAP_BUTTON * | m_buttonAddCondition |
wxRadioButton * | m_radioAll |
wxRadioButton * | m_radioAny |
Panel which configures a set of conditions for a component class assignment rule.
Definition at line 184 of file panel_assign_component_classes.h.
IDs for match type popup menu.
Enumerator | |
---|---|
ID_REFERENCE | |
ID_FOOTPRINT | |
ID_SIDE | |
ID_ROTATION | |
ID_FOOTPRINT_FIELD | |
ID_SHEET_NAME | |
ID_CUSTOM |
Definition at line 188 of file panel_assign_component_classes.h.
PANEL_COMPONENT_CLASS_ASSIGNMENT::PANEL_COMPONENT_CLASS_ASSIGNMENT | ( | wxWindow * | aParent, |
PANEL_ASSIGN_COMPONENT_CLASSES * | aPanelParent, | ||
DIALOG_SHIM * | aDlg | ||
) |
Definition at line 326 of file panel_assign_component_classes.cpp.
References KiBitmapBundle(), PANEL_COMPONENT_CLASS_ASSIGNMENT_BASE::m_buttonAddCondition, PANEL_COMPONENT_CLASS_ASSIGNMENT_BASE::m_buttonDeleteAssignment, PANEL_COMPONENT_CLASS_ASSIGNMENT_BASE::m_buttonHighlightItems, onMenu(), and STD_BITMAP_BUTTON::SetBitmap().
PANEL_COMPONENT_CLASS_ASSIGNMENT::~PANEL_COMPONENT_CLASS_ASSIGNMENT | ( | ) |
Definition at line 340 of file panel_assign_component_classes.cpp.
References onMenu().
CONDITION_DATA * PANEL_COMPONENT_CLASS_ASSIGNMENT::AddCondition | ( | COMPONENT_CLASS_ASSIGNMENT_DATA::CONDITION_TYPE | aCondition | ) |
Adds a condition to this component class assignment rule.
Definition at line 441 of file panel_assign_component_classes.cpp.
References COMPONENT_CLASS_ASSIGNMENT_DATA::CUSTOM, COMPONENT_CLASS_ASSIGNMENT_DATA::FOOTPRINT, COMPONENT_CLASS_ASSIGNMENT_DATA::FOOTPRINT_FIELD, PANEL_ASSIGN_COMPONENT_CLASSES::GetFieldNames(), PANEL_ASSIGN_COMPONENT_CLASSES::GetSelectionRefs(), PANEL_ASSIGN_COMPONENT_CLASSES::GetSheetNames(), m_conditionTypes, m_dlg, m_matches, m_matchesList, m_parentPanel, COMPONENT_CLASS_ASSIGNMENT_DATA::REFERENCE, COMPONENT_CLASS_ASSIGNMENT_DATA::ROTATION, PANEL_COMPONENT_CLASS_CONDITION_FIELD::SetFieldsList(), PANEL_COMPONENT_CLASS_CONDITION_REFERENCE::SetSelectionRefs(), PANEL_COMPONENT_CLASS_CONDITION_SHEET::SetSheetsList(), COMPONENT_CLASS_ASSIGNMENT_DATA::SHEET_NAME, and COMPONENT_CLASS_ASSIGNMENT_DATA::SIDE.
Referenced by onMenu(), and PANEL_ASSIGN_COMPONENT_CLASSES::TransferDataToWindow().
COMPONENT_CLASS_ASSIGNMENT_DATA PANEL_COMPONENT_CLASS_ASSIGNMENT::GenerateAssignmentData | ( | ) | const |
Converts the UI representation in to the internal assignment data representation.
Definition at line 347 of file panel_assign_component_classes.cpp.
References GetComponentClass(), GetConditions(), GetConditionsOperator(), COMPONENT_CLASS_ASSIGNMENT_DATA::SetComponentClass(), COMPONENT_CLASS_ASSIGNMENT_DATA::SetCondition(), and COMPONENT_CLASS_ASSIGNMENT_DATA::SetConditionsOperation().
Referenced by OnHighlightItemsClick().
const wxString PANEL_COMPONENT_CLASS_ASSIGNMENT::GetComponentClass | ( | ) | const |
Gets the resulting component class for this assignment.
Definition at line 408 of file panel_assign_component_classes.cpp.
References PANEL_COMPONENT_CLASS_ASSIGNMENT_BASE::m_componentClass.
Referenced by GenerateAssignmentData().
|
inline |
Definition at line 220 of file panel_assign_component_classes.h.
References m_matches.
Referenced by GenerateAssignmentData().
COMPONENT_CLASS_ASSIGNMENT_DATA::CONDITIONS_OPERATOR PANEL_COMPONENT_CLASS_ASSIGNMENT::GetConditionsOperator | ( | ) | const |
Gets the boolean operator applied to all assignment conditions.
Definition at line 548 of file panel_assign_component_classes.cpp.
References COMPONENT_CLASS_ASSIGNMENT_DATA::ALL, COMPONENT_CLASS_ASSIGNMENT_DATA::ANY, and PANEL_COMPONENT_CLASS_ASSIGNMENT_BASE::m_radioAll.
Referenced by GenerateAssignmentData().
|
overridevirtual |
Adds a match condition to this component class assignment rule.
Reimplemented from PANEL_COMPONENT_CLASS_ASSIGNMENT_BASE.
Definition at line 363 of file panel_assign_component_classes.cpp.
References _, COMPONENT_CLASS_ASSIGNMENT_DATA::CUSTOM, COMPONENT_CLASS_ASSIGNMENT_DATA::FOOTPRINT, COMPONENT_CLASS_ASSIGNMENT_DATA::FOOTPRINT_FIELD, ID_CUSTOM, ID_FOOTPRINT, ID_FOOTPRINT_FIELD, ID_REFERENCE, ID_ROTATION, ID_SHEET_NAME, ID_SIDE, m_conditionTypes, COMPONENT_CLASS_ASSIGNMENT_DATA::REFERENCE, COMPONENT_CLASS_ASSIGNMENT_DATA::ROTATION, COMPONENT_CLASS_ASSIGNMENT_DATA::SHEET_NAME, and COMPONENT_CLASS_ASSIGNMENT_DATA::SIDE.
|
overridevirtual |
Deletes this component class assignment rule.
Reimplemented from PANEL_COMPONENT_CLASS_ASSIGNMENT_BASE.
Definition at line 396 of file panel_assign_component_classes.cpp.
References m_parentPanel, and PANEL_ASSIGN_COMPONENT_CLASSES::RemoveAssignment().
|
overridevirtual |
Highlights footprints matching this set of conditions.
Reimplemented from PANEL_COMPONENT_CLASS_ASSIGNMENT_BASE.
Definition at line 557 of file panel_assign_component_classes.cpp.
References SELECTION_TOOL::BrightenItem(), COMPONENT_CLASS_MANAGER::CompileAssignmentRule(), BOARD::Footprints(), GenerateAssignmentData(), PCB_BASE_FRAME::GetCanvas(), BOARD::GetComponentClassManager(), PANEL_ASSIGN_COMPONENT_CLASSES::GetFrame(), PCB_EDIT_FRAME::GetModel(), TOOL_MANAGER::GetTool(), TOOLS_HOLDER::GetToolManager(), m_parentPanel, EDA_DRAW_PANEL_GAL::Refresh(), and SELECTION_TOOL::UnbrightenItem().
|
protected |
Handles add match condition popup menu selections.
Definition at line 414 of file panel_assign_component_classes.cpp.
References AddCondition(), COMPONENT_CLASS_ASSIGNMENT_DATA::CUSTOM, COMPONENT_CLASS_ASSIGNMENT_DATA::FOOTPRINT, COMPONENT_CLASS_ASSIGNMENT_DATA::FOOTPRINT_FIELD, ID_CUSTOM, ID_FOOTPRINT, ID_FOOTPRINT_FIELD, ID_REFERENCE, ID_ROTATION, ID_SHEET_NAME, ID_SIDE, COMPONENT_CLASS_ASSIGNMENT_DATA::REFERENCE, COMPONENT_CLASS_ASSIGNMENT_DATA::ROTATION, COMPONENT_CLASS_ASSIGNMENT_DATA::SHEET_NAME, and COMPONENT_CLASS_ASSIGNMENT_DATA::SIDE.
Referenced by PANEL_COMPONENT_CLASS_ASSIGNMENT(), and ~PANEL_COMPONENT_CLASS_ASSIGNMENT().
void PANEL_COMPONENT_CLASS_ASSIGNMENT::RemoveCondition | ( | wxPanel * | aMatch | ) |
Removes a given condition from this component class assignment rule (note: called from the child condition panel)
Definition at line 516 of file panel_assign_component_classes.cpp.
References m_conditionTypes, m_matches, m_matchesList, and m_parentPanel.
Referenced by PANEL_COMPONENT_CLASS_CONDITION_REFERENCE::OnDeleteConditionClick(), PANEL_COMPONENT_CLASS_CONDITION_FOOTPRINT::OnDeleteConditionClick(), PANEL_COMPONENT_CLASS_CONDITION_SIDE::OnDeleteConditionClick(), PANEL_COMPONENT_CLASS_CONDITION_ROTATION::OnDeleteConditionClick(), PANEL_COMPONENT_CLASS_CONDITION_FIELD::OnDeleteConditionClick(), PANEL_COMPONENT_CLASS_CONDITION_CUSTOM::OnDeleteConditionClick(), and PANEL_COMPONENT_CLASS_CONDITION_SHEET::OnDeleteConditionClick().
void PANEL_COMPONENT_CLASS_ASSIGNMENT::SetComponentClass | ( | const wxString & | aComponentClass | ) | const |
Sets the resulting component class for this assignment.
Definition at line 402 of file panel_assign_component_classes.cpp.
References PANEL_COMPONENT_CLASS_ASSIGNMENT_BASE::m_componentClass.
Referenced by PANEL_ASSIGN_COMPONENT_CLASSES::TransferDataToWindow().
void PANEL_COMPONENT_CLASS_ASSIGNMENT::SetConditionsOperator | ( | COMPONENT_CLASS_ASSIGNMENT_DATA::CONDITIONS_OPERATOR | aCondition | ) | const |
Sets the boolean operator applied to all assignment conditions.
Definition at line 531 of file panel_assign_component_classes.cpp.
References COMPONENT_CLASS_ASSIGNMENT_DATA::ALL, PANEL_COMPONENT_CLASS_ASSIGNMENT_BASE::m_radioAll, and PANEL_COMPONENT_CLASS_ASSIGNMENT_BASE::m_radioAny.
Referenced by PANEL_ASSIGN_COMPONENT_CLASSES::TransferDataToWindow().
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Definition at line 73 of file panel_assign_component_classes_base.h.
Referenced by GetComponentClass(), PANEL_COMPONENT_CLASS_ASSIGNMENT_BASE::PANEL_COMPONENT_CLASS_ASSIGNMENT_BASE(), and SetComponentClass().
|
protected |
Set containing all currently configured match condition types.
Definition at line 249 of file panel_assign_component_classes.h.
Referenced by AddCondition(), OnAddConditionClick(), and RemoveCondition().
|
protected |
The parent configuration dialog.
Definition at line 252 of file panel_assign_component_classes.h.
Referenced by AddCondition().
|
protected |
All match conditions for this component class assignment rule.
Definition at line 255 of file panel_assign_component_classes.h.
Referenced by AddCondition(), GetConditions(), and RemoveCondition().
|
protected |
The sizer containing match condition panels.
Definition at line 246 of file panel_assign_component_classes.h.
Referenced by AddCondition(), and RemoveCondition().
|
protected |
The top-level configuration panel which owns this assignment rule.
Definition at line 243 of file panel_assign_component_classes.h.
Referenced by AddCondition(), OnDeleteAssignmentClick(), OnHighlightItemsClick(), and RemoveCondition().
|
protectedinherited |
Definition at line 77 of file panel_assign_component_classes_base.h.
Referenced by GetConditionsOperator(), PANEL_COMPONENT_CLASS_ASSIGNMENT_BASE::PANEL_COMPONENT_CLASS_ASSIGNMENT_BASE(), and SetConditionsOperator().
|
protectedinherited |
Definition at line 78 of file panel_assign_component_classes_base.h.
Referenced by PANEL_COMPONENT_CLASS_ASSIGNMENT_BASE::PANEL_COMPONENT_CLASS_ASSIGNMENT_BASE(), and SetConditionsOperator().
|
protectedinherited |
Definition at line 72 of file panel_assign_component_classes_base.h.
Referenced by PANEL_COMPONENT_CLASS_ASSIGNMENT_BASE::PANEL_COMPONENT_CLASS_ASSIGNMENT_BASE().