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

#include <panel_assign_component_classes.h>

Inheritance diagram for PANEL_ASSIGN_COMPONENT_CLASSES:
PANEL_ASSIGN_COMPONENT_CLASSES_BASE

Public Member Functions

 PANEL_ASSIGN_COMPONENT_CLASSES (wxWindow *aParentWindow, PCB_EDIT_FRAME *aFrame, std::shared_ptr< COMPONENT_CLASS_SETTINGS > aSettings, DIALOG_SHIM *aDlg)
 
 ~PANEL_ASSIGN_COMPONENT_CLASSES () override
 
bool TransferDataToWindow () override
 Loads current component class assignments from the board settings.
 
bool TransferDataFromWindow () override
 Saves the component class assignments to the board settings.
 
void ImportSettingsFrom (const std::shared_ptr< COMPONENT_CLASS_SETTINGS > &aOtherSettings)
 Loads component class assignments from the given settings object.
 
void OnAddAssignmentClick (wxCommandEvent &event) override
 Adds a new component class assignment rule.
 
void RemoveAssignment (PANEL_COMPONENT_CLASS_ASSIGNMENT *aPanel)
 Removes a given component class assignment rule.
 
const std::vector< wxString > & GetSelectionRefs () const
 Returns references for all currently selected footprints.
 
const std::vector< wxString > & GetFieldNames () const
 Returns names of all fields present in footprints.
 
const std::vector< wxString > & GetSheetNames () const
 Returns names of all sheets present in footprints.
 
PCB_EDIT_FRAMEGetFrame () const
 Gets the active edit frame.
 
bool Validate () override
 Validates that all assignment rules can compile successfully.
 

Protected Attributes

wxCheckBox * m_assignSheetClasses
 
wxStaticLine * m_staticline1
 
wxStaticText * m_staticText3
 
wxButton * m_btnAddAssignment
 
wxScrolledWindow * m_assignmentsScrollWindow
 

Private Member Functions

PANEL_COMPONENT_CLASS_ASSIGNMENTaddAssignment ()
 Adds a new component class assignment rule.
 
void scrollToAssignment (const PANEL_COMPONENT_CLASS_ASSIGNMENT *aAssignment) const
 Scrolls the panel to specified assignment rule.
 

Private Attributes

DIALOG_SHIMm_dlg
 The parent dialog.
 
PCB_EDIT_FRAMEm_frame
 The active edit frame.
 
std::vector< PANEL_COMPONENT_CLASS_ASSIGNMENT * > m_assignments
 Vector of all currently displayed assignment rules.
 
std::shared_ptr< COMPONENT_CLASS_SETTINGSm_componentClassSettings
 The active settings object.
 
std::vector< wxString > m_selectionRefs
 All currently selected footprint references.
 
std::vector< wxString > m_fieldNames
 All footprint fields names present on the board.
 
std::vector< wxString > m_sheetNames
 All sheet names present on the board.
 
wxBoxSizer * m_assignmentsList
 The list of all currently present component class assignments.
 

Detailed Description

Definition at line 51 of file panel_assign_component_classes.h.

Constructor & Destructor Documentation

◆ PANEL_ASSIGN_COMPONENT_CLASSES()

PANEL_ASSIGN_COMPONENT_CLASSES::PANEL_ASSIGN_COMPONENT_CLASSES ( wxWindow * aParentWindow,
PCB_EDIT_FRAME * aFrame,
std::shared_ptr< COMPONENT_CLASS_SETTINGS > aSettings,
DIALOG_SHIM * aDlg )

◆ ~PANEL_ASSIGN_COMPONENT_CLASSES()

PANEL_ASSIGN_COMPONENT_CLASSES::~PANEL_ASSIGN_COMPONENT_CLASSES ( )
override

Member Function Documentation

◆ addAssignment()

PANEL_COMPONENT_CLASS_ASSIGNMENT * PANEL_ASSIGN_COMPONENT_CLASSES::addAssignment ( )
private

Adds a new component class assignment rule.

Definition at line 214 of file panel_assign_component_classes.cpp.

References m_assignments, m_assignmentsList, PANEL_ASSIGN_COMPONENT_CLASSES_BASE::m_assignmentsScrollWindow, and m_dlg.

Referenced by OnAddAssignmentClick(), and TransferDataToWindow().

◆ GetFieldNames()

const std::vector< wxString > & PANEL_ASSIGN_COMPONENT_CLASSES::GetFieldNames ( ) const
inline

Returns names of all fields present in footprints.

Definition at line 79 of file panel_assign_component_classes.h.

References m_fieldNames.

◆ GetFrame()

PCB_EDIT_FRAME * PANEL_ASSIGN_COMPONENT_CLASSES::GetFrame ( ) const
inline

Gets the active edit frame.

Definition at line 85 of file panel_assign_component_classes.h.

References m_frame.

Referenced by Validate().

◆ GetSelectionRefs()

const std::vector< wxString > & PANEL_ASSIGN_COMPONENT_CLASSES::GetSelectionRefs ( ) const
inline

Returns references for all currently selected footprints.

Definition at line 76 of file panel_assign_component_classes.h.

References m_selectionRefs.

◆ GetSheetNames()

const std::vector< wxString > & PANEL_ASSIGN_COMPONENT_CLASSES::GetSheetNames ( ) const
inline

Returns names of all sheets present in footprints.

Definition at line 82 of file panel_assign_component_classes.h.

References m_sheetNames.

◆ ImportSettingsFrom()

void PANEL_ASSIGN_COMPONENT_CLASSES::ImportSettingsFrom ( const std::shared_ptr< COMPONENT_CLASS_SETTINGS > & aOtherSettings)

Loads component class assignments from the given settings object.

Definition at line 253 of file panel_assign_component_classes.cpp.

References m_componentClassSettings, and TransferDataToWindow().

◆ OnAddAssignmentClick()

void PANEL_ASSIGN_COMPONENT_CLASSES::OnAddAssignmentClick ( wxCommandEvent & event)
overridevirtual

Adds a new component class assignment rule.

Reimplemented from PANEL_ASSIGN_COMPONENT_CLASSES_BASE.

Definition at line 207 of file panel_assign_component_classes.cpp.

References addAssignment(), and scrollToAssignment().

◆ RemoveAssignment()

void PANEL_ASSIGN_COMPONENT_CLASSES::RemoveAssignment ( PANEL_COMPONENT_CLASS_ASSIGNMENT * aPanel)

Removes a given component class assignment rule.

Definition at line 244 of file panel_assign_component_classes.cpp.

References m_assignments, and m_assignmentsList.

◆ scrollToAssignment()

void PANEL_ASSIGN_COMPONENT_CLASSES::scrollToAssignment ( const PANEL_COMPONENT_CLASS_ASSIGNMENT * aAssignment) const
private

Scrolls the panel to specified assignment rule.

Definition at line 233 of file panel_assign_component_classes.cpp.

References PANEL_ASSIGN_COMPONENT_CLASSES_BASE::m_assignmentsScrollWindow.

Referenced by OnAddAssignmentClick(), and Validate().

◆ TransferDataFromWindow()

bool PANEL_ASSIGN_COMPONENT_CLASSES::TransferDataFromWindow ( )
override

Saves the component class assignments to the board settings.

Definition at line 157 of file panel_assign_component_classes.cpp.

References m_assignments, PANEL_ASSIGN_COMPONENT_CLASSES_BASE::m_assignSheetClasses, m_componentClassSettings, and Validate().

◆ TransferDataToWindow()

◆ Validate()

Member Data Documentation

◆ m_assignments

std::vector<PANEL_COMPONENT_CLASS_ASSIGNMENT*> PANEL_ASSIGN_COMPONENT_CLASSES::m_assignments
private

Vector of all currently displayed assignment rules.

Definition at line 104 of file panel_assign_component_classes.h.

Referenced by addAssignment(), RemoveAssignment(), TransferDataFromWindow(), and Validate().

◆ m_assignmentsList

wxBoxSizer* PANEL_ASSIGN_COMPONENT_CLASSES::m_assignmentsList
private

The list of all currently present component class assignments.

Definition at line 119 of file panel_assign_component_classes.h.

Referenced by addAssignment(), PANEL_ASSIGN_COMPONENT_CLASSES(), and RemoveAssignment().

◆ m_assignmentsScrollWindow

◆ m_assignSheetClasses

wxCheckBox* PANEL_ASSIGN_COMPONENT_CLASSES_BASE::m_assignSheetClasses
protectedinherited

◆ m_btnAddAssignment

wxButton* PANEL_ASSIGN_COMPONENT_CLASSES_BASE::m_btnAddAssignment
protectedinherited

◆ m_componentClassSettings

std::shared_ptr<COMPONENT_CLASS_SETTINGS> PANEL_ASSIGN_COMPONENT_CLASSES::m_componentClassSettings
private

◆ m_dlg

DIALOG_SHIM* PANEL_ASSIGN_COMPONENT_CLASSES::m_dlg
private

The parent dialog.

Definition at line 98 of file panel_assign_component_classes.h.

Referenced by addAssignment(), and PANEL_ASSIGN_COMPONENT_CLASSES().

◆ m_fieldNames

std::vector<wxString> PANEL_ASSIGN_COMPONENT_CLASSES::m_fieldNames
private

All footprint fields names present on the board.

Definition at line 113 of file panel_assign_component_classes.h.

Referenced by GetFieldNames().

◆ m_frame

PCB_EDIT_FRAME* PANEL_ASSIGN_COMPONENT_CLASSES::m_frame
private

The active edit frame.

Definition at line 101 of file panel_assign_component_classes.h.

Referenced by GetFrame(), PANEL_ASSIGN_COMPONENT_CLASSES(), and ~PANEL_ASSIGN_COMPONENT_CLASSES().

◆ m_selectionRefs

std::vector<wxString> PANEL_ASSIGN_COMPONENT_CLASSES::m_selectionRefs
private

All currently selected footprint references.

Definition at line 110 of file panel_assign_component_classes.h.

Referenced by GetSelectionRefs().

◆ m_sheetNames

std::vector<wxString> PANEL_ASSIGN_COMPONENT_CLASSES::m_sheetNames
private

All sheet names present on the board.

Definition at line 116 of file panel_assign_component_classes.h.

Referenced by GetSheetNames().

◆ m_staticline1

wxStaticLine* PANEL_ASSIGN_COMPONENT_CLASSES_BASE::m_staticline1
protectedinherited

◆ m_staticText3

wxStaticText* PANEL_ASSIGN_COMPONENT_CLASSES_BASE::m_staticText3
protectedinherited

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