KiCad PCB EDA Suite
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
PANEL_COMPONENT_CLASS_ASSIGNMENT Class Reference

Panel which configures a set of conditions for a component class assignment rule. More...

#include <panel_assign_component_classes.h>

Inheritance diagram for PANEL_COMPONENT_CLASS_ASSIGNMENT:
PANEL_COMPONENT_CLASS_ASSIGNMENT_BASE

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_DATAAddCondition (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_CLASSESm_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_TYPEm_conditionTypes
 Set containing all currently configured match condition types.
 
DIALOG_SHIMm_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_BUTTONm_buttonHighlightItems
 
STD_BITMAP_BUTTONm_buttonDeleteAssignment
 
STD_BITMAP_BUTTONm_buttonAddCondition
 
wxRadioButton * m_radioAll
 
wxRadioButton * m_radioAny
 

Detailed Description

Panel which configures a set of conditions for a component class assignment rule.

Definition at line 184 of file panel_assign_component_classes.h.

Member Enumeration Documentation

◆ ADD_MATCH_POPUP

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.

Constructor & Destructor Documentation

◆ PANEL_COMPONENT_CLASS_ASSIGNMENT()

◆ ~PANEL_COMPONENT_CLASS_ASSIGNMENT()

PANEL_COMPONENT_CLASS_ASSIGNMENT::~PANEL_COMPONENT_CLASS_ASSIGNMENT ( )

Definition at line 340 of file panel_assign_component_classes.cpp.

References onMenu().

Member Function Documentation

◆ AddCondition()

◆ GenerateAssignmentData()

COMPONENT_CLASS_ASSIGNMENT_DATA PANEL_COMPONENT_CLASS_ASSIGNMENT::GenerateAssignmentData ( ) const

◆ GetComponentClass()

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().

◆ GetConditions()

const std::vector< CONDITION_DATA * > & PANEL_COMPONENT_CLASS_ASSIGNMENT::GetConditions ( ) const
inline

Definition at line 220 of file panel_assign_component_classes.h.

References m_matches.

Referenced by GenerateAssignmentData().

◆ GetConditionsOperator()

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().

◆ OnAddConditionClick()

◆ OnDeleteAssignmentClick()

void PANEL_COMPONENT_CLASS_ASSIGNMENT::OnDeleteAssignmentClick ( wxCommandEvent &  event)
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().

◆ OnHighlightItemsClick()

◆ onMenu()

◆ RemoveCondition()

◆ SetComponentClass()

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().

◆ SetConditionsOperator()

void PANEL_COMPONENT_CLASS_ASSIGNMENT::SetConditionsOperator ( COMPONENT_CLASS_ASSIGNMENT_DATA::CONDITIONS_OPERATOR  aCondition) const

Member Data Documentation

◆ m_buttonAddCondition

◆ m_buttonDeleteAssignment

◆ m_buttonHighlightItems

◆ m_componentClass

wxTextCtrl* PANEL_COMPONENT_CLASS_ASSIGNMENT_BASE::m_componentClass
protectedinherited

◆ m_conditionTypes

std::unordered_set<COMPONENT_CLASS_ASSIGNMENT_DATA::CONDITION_TYPE> PANEL_COMPONENT_CLASS_ASSIGNMENT::m_conditionTypes
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().

◆ m_dlg

DIALOG_SHIM* PANEL_COMPONENT_CLASS_ASSIGNMENT::m_dlg
protected

The parent configuration dialog.

Definition at line 252 of file panel_assign_component_classes.h.

Referenced by AddCondition().

◆ m_matches

std::vector<CONDITION_DATA*> PANEL_COMPONENT_CLASS_ASSIGNMENT::m_matches
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().

◆ m_matchesList

wxStaticBoxSizer* PANEL_COMPONENT_CLASS_ASSIGNMENT::m_matchesList
protected

The sizer containing match condition panels.

Definition at line 246 of file panel_assign_component_classes.h.

Referenced by AddCondition(), and RemoveCondition().

◆ m_parentPanel

PANEL_ASSIGN_COMPONENT_CLASSES* PANEL_COMPONENT_CLASS_ASSIGNMENT::m_parentPanel
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().

◆ m_radioAll

wxRadioButton* PANEL_COMPONENT_CLASS_ASSIGNMENT_BASE::m_radioAll
protectedinherited

◆ m_radioAny

wxRadioButton* PANEL_COMPONENT_CLASS_ASSIGNMENT_BASE::m_radioAny
protectedinherited

◆ m_staticText101

wxStaticText* PANEL_COMPONENT_CLASS_ASSIGNMENT_BASE::m_staticText101
protectedinherited

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