27#include <magic_enum.hpp>
33 std::shared_ptr<TUNING_PROFILES> aTimeDomainParameters ) :
101 for(
const auto& layer :
LSET::AllCuMask( aNumCopperLayers ).CuStack() )
103 wxString layerName =
m_board->GetLayerName( layer );
117 panel->UpdateLayerNames();
158 if( pageId == wxNOT_FOUND )
178 std::vector<wxString> names;
182 for(
size_t i = 0; i < profileCount; ++i )
186 if(
const wxString&
name = profilePage->GetProfileName();
name != wxEmptyString )
187 names.push_back(
name );
196 std::map<wxString, wxString> renames;
202 const wxString lastSyncedName = panel->GetLastSyncedName();
203 const wxString currentName = panel->GetProfileName();
205 if( currentName.IsEmpty() )
208 if( !lastSyncedName.IsEmpty() && lastSyncedName != currentName )
209 renames[lastSyncedName] = currentName;
211 panel->SetLastSyncedName( currentName );
constexpr EDA_IU_SCALE pcbIUScale
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight)
Information pertinent to a Pcbnew printed circuit board.
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
static LSET AllCuMask(int aCuLayerCount)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
STD_BITMAP_BUTTON * m_removeTuningProfileButton
STD_BITMAP_BUTTON * m_addTuningProfileButton
wxNotebook * m_tuningProfiles
PANEL_SETUP_TUNING_PROFILES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(719, 506), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
std::map< wxString, PCB_LAYER_ID > m_layerNamesToIDs
void OnRemoveTuningProfileClick(wxCommandEvent &event) override
Removes a tuning profile entry from the tuning profile grid.
void OnAddTuningProfileClick(wxCommandEvent &event) override
Adds a new tuning profile entry to the tuning profile grid.
void ImportSettingsFrom(const std::shared_ptr< TUNING_PROFILES > &aOtherParameters)
Load configuration from the given settings object.
std::map< wxString, PCB_LAYER_ID > m_prevLayerNamesToIDs
friend class PANEL_SETUP_TUNING_PROFILE_INFO
PCB_EDIT_FRAME * m_frame
The active edit frame.
BOARD * m_board
The current board.
std::map< int, PCB_LAYER_ID > m_copperIndexToLayerId
std::map< PCB_LAYER_ID, int > m_copperLayerIdsToIndex
bool Validate() override
Validates all data.
void SyncCopperLayers(int aNumCopperLayers)
Called when switching to this tab to make sure that any changes to the copper layer count made on the...
std::map< wxString, wxString > TakeProfileRenames()
Returns profile renames since the last call. Used to update netclass references.
std::unique_ptr< UNITS_PROVIDER > m_unitsProvider
bool TransferDataToWindow() override
Load parameter data from the settings object.
PANEL_SETUP_TUNING_PROFILES(wxWindow *aParentWindow, PCB_EDIT_FRAME *aFrame, BOARD *aBoard, std::shared_ptr< TUNING_PROFILES > aTimeDomainParameters)
std::shared_ptr< TUNING_PROFILES > m_tuningProfileParameters
The parameters object to load / save data from / to.
std::vector< wxString > GetDelayProfileNames() const
Returns all configured tuning profile names. Used by the netclass setup panel.
void UpdateProfileName(PANEL_SETUP_TUNING_PROFILE_INFO *panel, wxString newName) const
Update the notebook display of the name for a given panel.
bool TransferDataFromWindow() override
Save parameter data to the settings object.
~PANEL_SETUP_TUNING_PROFILES() override
std::vector< wxString > m_layerNames
DIALOG_SHIM * m_dlg
The parent dialog.
bool ValidateProfile(size_t aPageIndex)
Validate this panel's data.
void LoadProfile(const TUNING_PROFILE &aProfile)
Load the given profile in to the panel.
The main frame for Pcbnew.
Represents a single line in the tuning profile configuration grid.