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

#include <panel_setup_time_domain_parameters.h>

Inheritance diagram for PANEL_SETUP_TIME_DOMAIN_PARAMETERS:
PANEL_SETUP_TIME_DOMAIN_PARAMETERS_BASE

Public Member Functions

 PANEL_SETUP_TIME_DOMAIN_PARAMETERS (wxWindow *aParentWindow, PCB_EDIT_FRAME *aFrame, BOARD *aBoard, std::shared_ptr< TIME_DOMAIN_PARAMETERS > aTimeDomainParameters)
 
 ~PANEL_SETUP_TIME_DOMAIN_PARAMETERS () override
 
void SyncCopperLayers (int aNumCopperLayers)
 Called when switching to this tab to make sure that any changes to the copper layer count made on the physical stackup page are reflected here.
 
bool TransferDataToWindow () override
 Load parameter data from the settings object.
 
bool TransferDataFromWindow () override
 Save parameter data to the settings object.
 
std::vector< wxString > GetDelayProfileNames () const
 Returns all configured tuning profile names. Used by the netclass setup panel.
 
void ImportSettingsFrom (const std::shared_ptr< TIME_DOMAIN_PARAMETERS > &aOtherParameters)
 Load configuration from the given settings object.
 

Protected Member Functions

virtual void OnUpdateUI (wxUpdateUIEvent &event)
 
virtual void OnSizeTraceParametersGrid (wxSizeEvent &event)
 

Protected Attributes

wxSplitterWindow * m_splitter
 
WX_PANELm_timeDomainParametersPane
 
wxStaticText * m_staticText3
 
WX_GRIDm_tracePropagationGrid
 
STD_BITMAP_BUTTONm_addDelayProfileButton
 
STD_BITMAP_BUTTONm_removeDelayProfileButton
 
WX_PANELm_timeDomainParametersPane1
 
wxStaticText * m_staticText31
 
WX_GRIDm_viaPropagationGrid
 
STD_BITMAP_BUTTONm_addViaOverrideButton
 
STD_BITMAP_BUTTONm_removeViaOverrideButton
 

Private Types

enum  PROFILE_GRID_REQUIRED_COLS { PROFILE_GRID_PROFILE_NAME = 0 , PROFILE_GRID_VIA_PROP_DELAY , PROFILE_GRID_NUM_REQUIRED_COLS }
 
enum  VIA_GRID_REQUIRED_COLS {
  VIA_GRID_PROFILE_NAME = 0 , VIA_GRID_SIGNAL_LAYER_FROM , VIA_GRID_SIGNAL_LAYER_TO , VIA_GRID_VIA_LAYER_FROM ,
  VIA_GRID_VIA_LAYER_TO , VIA_GRID_DELAY
}
 

Private Member Functions

void setColumnWidths ()
 Optimise grid columns to fit titles and content.
 
void updateViaProfileNamesEditor (const wxString &aOldName=wxEmptyString, const wxString &aNewName=wxEmptyString) const
 Updates the via override tuning profile name dropdown lists Updates entries if aOldName and aNewName are passed.
 
void updateProfileGridColumns ()
 Update the dynamic (per-layer) columns in the tuning profiles grid.
 
void updateViaGridColumns ()
 Update the dynamic (per-layer) columns in the via overrides grid.
 
void OnAddDelayProfileClick (wxCommandEvent &event) override
 Adds a new tuning profile entry to the tuning profile grid.
 
void OnRemoveDelayProfileClick (wxCommandEvent &event) override
 Removes a tuning profile entry from the tuning profile grid.
 
void OnAddViaOverrideClick (wxCommandEvent &event) override
 Adds a new via override profile entry to the via overrides grid.
 
void OnRemoveViaOverrideClick (wxCommandEvent &event) override
 Removes a via override profile entry from the via overrides grid.
 
void OnDelayProfileGridCellChanging (wxGridEvent &event)
 Validates a tuning profile row data.
 
bool validateDelayProfileName (int aRow, const wxString &aName, bool focusFirst=true)
 Validates a tuning profile name (checks for not empty and not duplicated)
 
bool Validate () override
 Validates all data.
 
bool validateViaRows ()
 Validates all via override rows.
 
void addProfileRow (const DELAY_PROFILE &aDelayProfile)
 Adds a tuning profile row with the given persisted parameters.
 
DELAY_PROFILE getProfileRow (int aRow)
 Gets a tuning profile row as a set of persistable parameters.
 
void addViaRow (const wxString &aProfileName, const DELAY_PROFILE_VIA_OVERRIDE_ENTRY &aViaOverrideEntry) const
 Adds a via override row with the given persisted parameters.
 
DELAY_PROFILE_VIA_OVERRIDE_ENTRY getViaRow (int aRow)
 Gets a via override row as a set of persistable parameters.
 
wxString getProfileNameForProfileGridRow (int aRow) const
 Gets the profile name for the given profile grid row.
 

Private Attributes

std::shared_ptr< TIME_DOMAIN_PARAMETERSm_timeDomainParameters
 The parameters object to load / save data from / to.
 
PCB_EDIT_FRAMEm_frame
 The active edit frame.
 
BOARDm_board
 The current board.
 
std::unique_ptr< UNITS_PROVIDERm_unitsProvider
 
std::map< PCB_LAYER_ID, int > m_copperLayerIdsToColumns
 
std::map< int, PCB_LAYER_IDm_copperColumnsToLayerId
 
std::vector< wxString > m_layerNames
 
std::map< wxString, PCB_LAYER_IDm_layerNamesToIDs
 
std::map< wxString, PCB_LAYER_IDm_prevLayerNamesToIDs
 

Detailed Description

Definition at line 37 of file panel_setup_time_domain_parameters.h.

Member Enumeration Documentation

◆ PROFILE_GRID_REQUIRED_COLS

Enumerator
PROFILE_GRID_PROFILE_NAME 
PROFILE_GRID_VIA_PROP_DELAY 
PROFILE_GRID_NUM_REQUIRED_COLS 

Definition at line 65 of file panel_setup_time_domain_parameters.h.

◆ VIA_GRID_REQUIRED_COLS

Enumerator
VIA_GRID_PROFILE_NAME 
VIA_GRID_SIGNAL_LAYER_FROM 
VIA_GRID_SIGNAL_LAYER_TO 
VIA_GRID_VIA_LAYER_FROM 
VIA_GRID_VIA_LAYER_TO 
VIA_GRID_DELAY 

Definition at line 72 of file panel_setup_time_domain_parameters.h.

Constructor & Destructor Documentation

◆ PANEL_SETUP_TIME_DOMAIN_PARAMETERS()

◆ ~PANEL_SETUP_TIME_DOMAIN_PARAMETERS()

PANEL_SETUP_TIME_DOMAIN_PARAMETERS::~PANEL_SETUP_TIME_DOMAIN_PARAMETERS ( )
override

Member Function Documentation

◆ addProfileRow()

void PANEL_SETUP_TIME_DOMAIN_PARAMETERS::addProfileRow ( const DELAY_PROFILE aDelayProfile)
private

◆ addViaRow()

◆ GetDelayProfileNames()

std::vector< wxString > PANEL_SETUP_TIME_DOMAIN_PARAMETERS::GetDelayProfileNames ( ) const

Returns all configured tuning profile names. Used by the netclass setup panel.

Definition at line 635 of file panel_setup_time_domain_parameters.cpp.

References getProfileNameForProfileGridRow(), and PANEL_SETUP_TIME_DOMAIN_PARAMETERS_BASE::m_tracePropagationGrid.

Referenced by DIALOG_BOARD_SETUP::onPageChanged().

◆ getProfileNameForProfileGridRow()

wxString PANEL_SETUP_TIME_DOMAIN_PARAMETERS::getProfileNameForProfileGridRow ( int  aRow) const
private

◆ getProfileRow()

◆ getViaRow()

◆ ImportSettingsFrom()

void PANEL_SETUP_TIME_DOMAIN_PARAMETERS::ImportSettingsFrom ( const std::shared_ptr< TIME_DOMAIN_PARAMETERS > &  aOtherParameters)

◆ OnAddDelayProfileClick()

void PANEL_SETUP_TIME_DOMAIN_PARAMETERS::OnAddDelayProfileClick ( wxCommandEvent &  event)
overrideprivatevirtual

◆ OnAddViaOverrideClick()

◆ OnDelayProfileGridCellChanging()

void PANEL_SETUP_TIME_DOMAIN_PARAMETERS::OnDelayProfileGridCellChanging ( wxGridEvent &  event)
private

◆ OnRemoveDelayProfileClick()

void PANEL_SETUP_TIME_DOMAIN_PARAMETERS::OnRemoveDelayProfileClick ( wxCommandEvent &  event)
overrideprivatevirtual

◆ OnRemoveViaOverrideClick()

void PANEL_SETUP_TIME_DOMAIN_PARAMETERS::OnRemoveViaOverrideClick ( wxCommandEvent &  event)
overrideprivatevirtual

Removes a via override profile entry from the via overrides grid.

Reimplemented from PANEL_SETUP_TIME_DOMAIN_PARAMETERS_BASE.

Definition at line 479 of file panel_setup_time_domain_parameters.cpp.

References WX_GRID::CommitPendingChanges(), and PANEL_SETUP_TIME_DOMAIN_PARAMETERS_BASE::m_viaPropagationGrid.

◆ OnSizeTraceParametersGrid()

virtual void PANEL_SETUP_TIME_DOMAIN_PARAMETERS_BASE::OnSizeTraceParametersGrid ( wxSizeEvent &  event)
inlineprotectedvirtualinherited

◆ OnUpdateUI()

virtual void PANEL_SETUP_TIME_DOMAIN_PARAMETERS_BASE::OnUpdateUI ( wxUpdateUIEvent &  event)
inlineprotectedvirtualinherited

◆ setColumnWidths()

void PANEL_SETUP_TIME_DOMAIN_PARAMETERS::setColumnWidths ( )
private

◆ SyncCopperLayers()

void PANEL_SETUP_TIME_DOMAIN_PARAMETERS::SyncCopperLayers ( int  aNumCopperLayers)

Called when switching to this tab to make sure that any changes to the copper layer count made on the physical stackup page are reflected here.

Parameters
aNumCopperLayersis the number of copper layers in the board

Definition at line 239 of file panel_setup_time_domain_parameters.cpp.

References LSET::AllCuMask(), BOARD::GetLayerName(), m_board, m_copperColumnsToLayerId, m_copperLayerIdsToColumns, m_layerNames, m_layerNamesToIDs, m_prevLayerNamesToIDs, PROFILE_GRID_NUM_REQUIRED_COLS, setColumnWidths(), updateProfileGridColumns(), and updateViaGridColumns().

Referenced by DIALOG_BOARD_SETUP::onPageChanged(), and TransferDataToWindow().

◆ TransferDataFromWindow()

◆ TransferDataToWindow()

◆ updateProfileGridColumns()

◆ updateViaGridColumns()

void PANEL_SETUP_TIME_DOMAIN_PARAMETERS::updateViaGridColumns ( )
private

◆ updateViaProfileNamesEditor()

void PANEL_SETUP_TIME_DOMAIN_PARAMETERS::updateViaProfileNamesEditor ( const wxString &  aOldName = wxEmptyString,
const wxString &  aNewName = wxEmptyString 
) const
private

◆ Validate()

◆ validateDelayProfileName()

bool PANEL_SETUP_TIME_DOMAIN_PARAMETERS::validateDelayProfileName ( int  aRow,
const wxString &  aName,
bool  focusFirst = true 
)
private

◆ validateViaRows()

bool PANEL_SETUP_TIME_DOMAIN_PARAMETERS::validateViaRows ( )
private

Member Data Documentation

◆ m_addDelayProfileButton

◆ m_addViaOverrideButton

◆ m_board

BOARD* PANEL_SETUP_TIME_DOMAIN_PARAMETERS::m_board
private

◆ m_copperColumnsToLayerId

std::map<int, PCB_LAYER_ID> PANEL_SETUP_TIME_DOMAIN_PARAMETERS::m_copperColumnsToLayerId
private

◆ m_copperLayerIdsToColumns

std::map<PCB_LAYER_ID, int> PANEL_SETUP_TIME_DOMAIN_PARAMETERS::m_copperLayerIdsToColumns
private

◆ m_frame

PCB_EDIT_FRAME* PANEL_SETUP_TIME_DOMAIN_PARAMETERS::m_frame
private

The active edit frame.

Definition at line 139 of file panel_setup_time_domain_parameters.h.

Referenced by PANEL_SETUP_TIME_DOMAIN_PARAMETERS().

◆ m_layerNames

std::vector<wxString> PANEL_SETUP_TIME_DOMAIN_PARAMETERS::m_layerNames
private

◆ m_layerNamesToIDs

std::map<wxString, PCB_LAYER_ID> PANEL_SETUP_TIME_DOMAIN_PARAMETERS::m_layerNamesToIDs
private

Definition at line 152 of file panel_setup_time_domain_parameters.h.

Referenced by getViaRow(), and SyncCopperLayers().

◆ m_prevLayerNamesToIDs

std::map<wxString, PCB_LAYER_ID> PANEL_SETUP_TIME_DOMAIN_PARAMETERS::m_prevLayerNamesToIDs
private

Definition at line 153 of file panel_setup_time_domain_parameters.h.

Referenced by SyncCopperLayers(), and updateViaGridColumns().

◆ m_removeDelayProfileButton

◆ m_removeViaOverrideButton

◆ m_splitter

wxSplitterWindow* PANEL_SETUP_TIME_DOMAIN_PARAMETERS_BASE::m_splitter
protectedinherited

◆ m_staticText3

wxStaticText* PANEL_SETUP_TIME_DOMAIN_PARAMETERS_BASE::m_staticText3
protectedinherited

◆ m_staticText31

wxStaticText* PANEL_SETUP_TIME_DOMAIN_PARAMETERS_BASE::m_staticText31
protectedinherited

◆ m_timeDomainParameters

std::shared_ptr<TIME_DOMAIN_PARAMETERS> PANEL_SETUP_TIME_DOMAIN_PARAMETERS::m_timeDomainParameters
private

The parameters object to load / save data from / to.

Definition at line 136 of file panel_setup_time_domain_parameters.h.

Referenced by ImportSettingsFrom(), TransferDataFromWindow(), and TransferDataToWindow().

◆ m_timeDomainParametersPane

WX_PANEL* PANEL_SETUP_TIME_DOMAIN_PARAMETERS_BASE::m_timeDomainParametersPane
protectedinherited

◆ m_timeDomainParametersPane1

WX_PANEL* PANEL_SETUP_TIME_DOMAIN_PARAMETERS_BASE::m_timeDomainParametersPane1
protectedinherited

◆ m_tracePropagationGrid

◆ m_unitsProvider

std::unique_ptr<UNITS_PROVIDER> PANEL_SETUP_TIME_DOMAIN_PARAMETERS::m_unitsProvider
private

◆ m_viaPropagationGrid


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