73 [
this]( wxCommandEvent& aEvent )
78 [
this]( wxCommandEvent& aEvent )
83 [
this]( wxCommandEvent& aEvent )
88 m_trackWidthsGrid->SetSelectionMode( wxGrid::wxGridSelectionModes::wxGridSelectRows );
89 m_viaSizesGrid->SetSelectionMode( wxGrid::wxGridSelectionModes::wxGridSelectRows );
90 m_diffPairsGrid->SetSelectionMode( wxGrid::wxGridSelectionModes::wxGridSelectRows );
106 int min_linesize =
m_trackWidthsGrid->GetTextExtent( wxT(
"000.000000 mm " ) ).x;
108 for(
int ii = 0; grid_list[ii]; ii++ )
110 WX_GRID* curr_grid = grid_list[ii];
112 for(
int col = 0; col < curr_grid->GetNumberCols(); col++ )
115 int best_w = std::max( min_linesize, min_w );
116 curr_grid->SetColMinimalWidth( col, best_w );
117 curr_grid->SetColSize( col,best_w );
141 std::vector<int> trackWidths;
157 std::sort( trackWidths.begin(), trackWidths.end() );
160 for(
int width : trackWidths )
170 std::vector<VIA_DIMENSION> vias;
192 vias.push_back( via_dim );
196 std::sort( vias.begin(), vias.end() );
210 std::vector<DIFF_PAIR_DIMENSION> diffPairs;
234 diffPairs.push_back( diffPair_dim );
238 std::sort( diffPairs.begin(), diffPairs.end() );
298 std::vector<int> trackWidths;
299 std::vector<VIA_DIMENSION> vias;
300 std::vector<DIFF_PAIR_DIMENSION> diffPairs;
320 vias.push_back( via_dim );
337 diffPairs.push_back( diffPair_dim );
342 sort( trackWidths.begin(), trackWidths.end() );
343 sort( vias.begin(), vias.end() );
344 sort( diffPairs.begin(), diffPairs.end() );
348 trackWidths.insert( trackWidths.begin(), 0 );
351 vias.insert( vias.begin(), { 0, 0 } );
354 diffPairs.insert( diffPairs.begin(), { 0, 0, 0 } );
382 if( !viaDia.IsEmpty() && viaDrill.IsEmpty() )
384 msg =
_(
"No via hole size defined." );
396 if( !dpWidth.IsEmpty() && dpGap.IsEmpty() )
398 msg =
_(
"No differential pair gap defined." );
450 [&]() -> std::pair<int, int>
471 [&]() -> std::pair<int, int>
492 [&]() -> std::pair<int, int>
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight)
Container for design settings for a BOARD object.
std::vector< DIFF_PAIR_DIMENSION > m_DiffPairDimensionsList
std::vector< int > m_TrackWidthList
std::vector< VIA_DIMENSION > m_ViasDimensionsList
Information pertinent to a Pcbnew printed circuit board.
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Add mouse and command handling (such as cut, copy, and paste) to a WX_GRID instance.
static PAGED_DIALOG * GetDialog(wxWindow *aWindow)
void SetError(const wxString &aMessage, const wxString &aPageName, int aCtrlId, int aRow=-1, int aCol=-1)
Class PANEL_SETUP_TRACKS_AND_VIAS_BASE.
STD_BITMAP_BUTTON * m_trackWidthsAddButton
WX_GRID * m_trackWidthsGrid
WX_GRID * m_diffPairsGrid
STD_BITMAP_BUTTON * m_diffPairsAddButton
STD_BITMAP_BUTTON * m_trackWidthsSortButton
STD_BITMAP_BUTTON * m_trackWidthsRemoveButton
STD_BITMAP_BUTTON * m_viaSizesRemoveButton
STD_BITMAP_BUTTON * m_diffPairsSortButton
STD_BITMAP_BUTTON * m_viaSizesAddButton
STD_BITMAP_BUTTON * m_viaSizesSortButton
STD_BITMAP_BUTTON * m_diffPairsRemoveButton
void OnRemoveViaSizesClick(wxCommandEvent &event) override
bool TransferDataToWindow() override
PANEL_SETUP_TRACKS_AND_VIAS(wxWindow *aParentWindow, PCB_EDIT_FRAME *aFrame)
void OnRemoveDiffPairsClick(wxCommandEvent &event) override
void OnSortTrackWidthsClick(wxCommandEvent &event) override
bool commitPendingChanges(bool aQuietMode=false)
~PANEL_SETUP_TRACKS_AND_VIAS() override
void onUnitsChanged(wxCommandEvent &aEvent)
void OnSortViaSizesClick(wxCommandEvent &event) override
void AppendTrackWidth(int aWidth)
void OnAddViaSizesClick(wxCommandEvent &event) override
void ImportSettingsFrom(BOARD *aBoard)
void OnSortDiffPairsClick(wxCommandEvent &event) override
void OnRemoveTrackWidthsClick(wxCommandEvent &event) override
bool TransferDataFromWindow() override
void OnAddDiffPairsClick(wxCommandEvent &event) override
BOARD_DESIGN_SETTINGS * m_BrdSettings
void AppendDiffPairs(int aWidth, int aGap, int aViaGap)
void OnAddTrackWidthsClick(wxCommandEvent &event) override
void AppendViaSize(int aSize, int aDrill)
The main frame for Pcbnew.
int ValueFromString(const wxString &aTextValue, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const
Converts aTextValue in aUnits to internal units used by the frame.
int GetVisibleWidth(int aCol, bool aHeader=true, bool aContents=true, bool aKeep=false)
Calculate the specified column based on the actual size of the text on screen.
void SetUnitValue(int aRow, int aCol, int aValue)
Set a unitized cell's value.
int GetUnitValue(int aRow, int aCol)
Apply standard KiCad unit and eval services to a numeric cell.
void OnDeleteRows(const std::function< void(int row)> &aDeleter)
Handles a row deletion event.
void OnAddRow(const std::function< std::pair< int, int >()> &aAdder)
void SetAutoEvalCols(const std::vector< int > &aCols)
void SetUnitsProvider(UNITS_PROVIDER *aProvider, int aCol=0)
Set a EUNITS_PROVIDER to enable use of unit- and eval-based Getters.
void ClearRows()
wxWidgets recently added an ASSERT which fires if the position is greater than or equal to the number...
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
Container to handle a stock of specific differential pairs each with unique track width,...
Container to handle a stock of specific vias each with unique diameter and drill sizes in the BOARD c...