32#include <magic_enum.hpp>
39 std::shared_ptr<TUNING_PROFILES> aTimeDomainParameters ) :
108 for(
const auto& layer :
LSET::AllCuMask( aNumCopperLayers ).CuStack() )
110 wxString layerName =
m_board->GetLayerName( layer );
166 if( pageId == wxNOT_FOUND )
186 std::vector<wxString> names;
190 for(
size_t i = 0; i < profileCount; ++i )
194 if(
const wxString&
name = profilePage->GetProfileName();
name != wxEmptyString )
195 names.push_back(
name );
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::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 UpdateLayerNames()
Updates the displayed layer names in all grids.
void LoadProfile(const TUNING_PROFILE &aProfile)
Loads the given profile in to the panel.
TUNING_PROFILE GetProfile() const
Saves the panel to the given profile.
The main frame for Pcbnew.
int GetUserUnits()
Return the currently selected user unit value for the interface.
Represents a single line in the tuning profile configuration grid.