KiCad PCB EDA Suite
panel_setup_netclasses.cpp
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2004-2009 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 2009 Dick Hollenbeck, dick@softplc.com
6  * Copyright (C) 2009-2018 KiCad Developers, see change_log.txt for contributors.
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, you may find one here:
20  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21  * or you may search the http://www.gnu.org website for the version 2 license,
22  * or you may write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24  */
25 
26 
27 #include <fctsys.h>
28 #include <class_drawpanel.h>
29 #include <base_units.h>
30 #include <confirm.h>
31 #include <pcb_edit_frame.h>
32 #include <board_design_settings.h>
33 #include <bitmaps.h>
34 #include <widgets/wx_grid.h>
35 
36 #include <panel_setup_netclasses.h>
37 
38 
39 // Columns of netclasses grid
40 enum {
41  GRID_NAME = 0,
51 };
52 
53 
55  PANEL_SETUP_FEATURE_CONSTRAINTS* aConstraintsPanel ) :
56  PANEL_SETUP_NETCLASSES_BASE( aParent->GetTreebook() )
57 {
58  m_Parent = aParent;
59  m_Frame = aFrame;
60  m_Pcb = m_Frame->GetBoard();
62  m_ConstraintsPanel = aConstraintsPanel;
63 
64  m_netclassesDirty = true;
65 
66  m_originalColWidths = new int[ m_netclassGrid->GetNumberCols() ];
67 
68  for( int i = 0; i < m_netclassGrid->GetNumberCols(); ++i )
69  m_originalColWidths[ i ] = m_netclassGrid->GetColSize( i );
70 
71  // Membership combobox editors require a bit more room, so increase the row size of
72  // all our grids for consistency
73  m_netclassGrid->SetDefaultRowSize( m_netclassGrid->GetDefaultRowSize() + 4 );
74  m_membershipGrid->SetDefaultRowSize( m_membershipGrid->GetDefaultRowSize() + 4 );
75 
76  m_netclassGrid->PushEventHandler( new GRID_TRICKS( m_netclassGrid ) );
77  m_membershipGrid->PushEventHandler( new GRID_TRICKS( m_membershipGrid ) );
78 
79  m_netclassGrid->SetSelectionMode( wxGrid::wxGridSelectRows );
80  m_membershipGrid->SetSelectionMode( wxGrid::wxGridSelectRows );
81 
82  // Set up the net name column of the netclass membership grid to read-only
83  wxGridCellAttr* attr = new wxGridCellAttr;
84  attr->SetReadOnly( true );
85  m_membershipGrid->SetColAttr( 0, attr );
86 
87  m_addButton->SetBitmap( KiBitmap( small_plus_xpm ) );
88  m_removeButton->SetBitmap( KiBitmap( trash_xpm ) );
89 
90  // wxFormBuilder doesn't include this event...
91  m_netclassGrid->Connect( wxEVT_GRID_CELL_CHANGING, wxGridEventHandler( PANEL_SETUP_NETCLASSES::OnNetclassGridCellChanging ), NULL, this );
92 }
93 
94 
96 {
97  delete [] m_originalColWidths;
98 
99  // Delete the GRID_TRICKS.
100  m_netclassGrid->PopEventHandler( true );
101  m_membershipGrid->PopEventHandler( true );
102 
103  m_netclassGrid->Disconnect( wxEVT_GRID_CELL_CHANGING, wxGridEventHandler( PANEL_SETUP_NETCLASSES::OnNetclassGridCellChanging ), NULL, this );
104 }
105 
106 
107 static void netclassToGridRow( EDA_UNITS_T aUnits, wxGrid* aGrid, int aRow, const NETCLASSPTR& nc )
108 {
109  aGrid->SetCellValue( aRow, GRID_NAME, nc->GetName() );
110 
111 #define SET_MILS_CELL( col, val ) \
112  aGrid->SetCellValue( aRow, col, StringFromValue( aUnits, val, true, true ) )
113 
114  SET_MILS_CELL( GRID_CLEARANCE, nc->GetClearance() );
115  SET_MILS_CELL( GRID_TRACKSIZE, nc->GetTrackWidth() );
116  SET_MILS_CELL( GRID_VIASIZE, nc->GetViaDiameter() );
117  SET_MILS_CELL( GRID_VIADRILL, nc->GetViaDrill() );
118  SET_MILS_CELL( GRID_uVIASIZE, nc->GetuViaDiameter() );
119  SET_MILS_CELL( GRID_uVIADRILL, nc->GetuViaDrill() );
120  SET_MILS_CELL( GRID_DIFF_PAIR_WIDTH, nc->GetDiffPairWidth() );
121  SET_MILS_CELL( GRID_DIFF_PAIR_GAP, nc->GetDiffPairGap() );
122  // 6.0 TODO: SET_MILS_CELL( GRID_DIFF_PAIR_VIA_GAP, nc->GetDiffPairViaGap() );
123 }
124 
125 
127 {
128  NETCLASSES& netclasses = m_BrdSettings->m_NetClasses;
129  NETCLASSPTR netclass = netclasses.GetDefault();
130 
131  if( m_netclassGrid->GetNumberRows() )
132  m_netclassGrid->DeleteRows( 0, m_netclassGrid->GetNumberRows() );
133  m_netclassGrid->AppendRows( netclasses.GetCount() + 1 ); // + 1 for default netclass
134 
135  // enter the Default NETCLASS.
137 
138  // make the Default NETCLASS name read-only
139  wxGridCellAttr* cellAttr = m_netclassGrid->GetOrCreateCellAttr( 0, GRID_NAME );
140  cellAttr->SetReadOnly();
141  cellAttr->DecRef();
142 
143  // enter other netclasses
144  int row = 1;
145 
146  for( NETCLASSES::iterator i = netclasses.begin(); i != netclasses.end(); ++i, ++row )
148 
149  // ensure that all nets have net classes assigned
151 
152  if( m_membershipGrid->GetNumberRows() )
153  m_membershipGrid->DeleteRows( 0, m_membershipGrid->GetNumberRows() );
154 
155  for( NETINFO_ITEM* net : m_Pcb->GetNetInfo() )
156  {
157  if( net->GetNet() > 0 && net->IsCurrent() )
158  addNet( net->GetNetname(), net->GetNetClass()->GetName() );
159  }
160 
161  return true;
162 }
163 
164 
165 void PANEL_SETUP_NETCLASSES::addNet( wxString netName, const wxString& netclass )
166 {
167  int i = m_membershipGrid->GetNumberRows();
168 
169  m_membershipGrid->AppendRows( 1 );
170 
171  m_membershipGrid->SetCellValue( i, 0, netName );
172  m_membershipGrid->SetCellValue( i, 1, netclass );
173 }
174 
175 
176 /* Populates drop-downs with the list of net classes
177  */
179 {
180  wxArrayString netclassNames;
181 
182  for( int ii = 0; ii < m_netclassGrid->GetNumberRows(); ii++ )
183  {
184  wxString netclassName = m_netclassGrid->GetCellValue( ii, GRID_NAME );
185  if( !netclassName.IsEmpty() )
186  netclassNames.push_back( netclassName );
187  }
188 
189  wxGridCellAttr* attr = new wxGridCellAttr;
190  attr->SetEditor( new wxGridCellChoiceEditor( netclassNames ) );
191  m_membershipGrid->SetColAttr( 1, attr );
192 
193  m_assignNetClass->Set( netclassNames );
194 
195  netclassNames.Insert( wxEmptyString, 0 );
196  m_netClassFilter->Set( netclassNames );
197 }
198 
199 
200 static void gridRowToNetclass( EDA_UNITS_T aUnits, wxGrid* grid, int row, const NETCLASSPTR& nc )
201 {
202  nc->SetName( grid->GetCellValue( row, GRID_NAME ) );
203 
204 #define MYCELL( col ) \
205  ValueFromString( aUnits, grid->GetCellValue( row, col ), true )
206 
207  nc->SetClearance( MYCELL( GRID_CLEARANCE ) );
208  nc->SetTrackWidth( MYCELL( GRID_TRACKSIZE ) );
209  nc->SetViaDiameter( MYCELL( GRID_VIASIZE ) );
210  nc->SetViaDrill( MYCELL( GRID_VIADRILL ) );
211  nc->SetuViaDiameter( MYCELL( GRID_uVIASIZE ) );
212  nc->SetuViaDrill( MYCELL( GRID_uVIADRILL ) );
213  nc->SetDiffPairWidth( MYCELL( GRID_DIFF_PAIR_WIDTH ) );
214  nc->SetDiffPairGap( MYCELL( GRID_DIFF_PAIR_GAP ) );
215  // 6.0 TODO: nc->SetDiffPairViaGap( MYCELL( GRID_DIFF_PAIR_VIA_GAP ) );
216 }
217 
218 
220 {
221  if( !validateData() )
222  return false;
223 
224  NETCLASSES& netclasses = m_BrdSettings->m_NetClasses;
225 
226  // Remove all netclasses from board. We'll copy new list after
227  netclasses.Clear();
228 
229  // Copy the default NetClass:
231 
232  // Copy other NetClasses :
233  for( int row = 1; row < m_netclassGrid->GetNumberRows(); ++row )
234  {
235  NETCLASSPTR nc = std::make_shared<NETCLASS>( m_netclassGrid->GetCellValue( row, GRID_NAME ) );
236 
237  if( m_BrdSettings->m_NetClasses.Add( nc ) )
239  }
240 
241  // Now read all nets and push them in the corresponding netclass net buffer
242  for( int row = 0; row < m_membershipGrid->GetNumberRows(); ++row )
243  {
244  NETCLASSPTR nc = netclasses.Find( m_membershipGrid->GetCellValue( row, 1 ) );
245 
246  if( nc )
247  nc->Add( m_membershipGrid->GetCellValue( row, 0 ) );
248  }
249 
252 
253  return true;
254 }
255 
256 
257 bool PANEL_SETUP_NETCLASSES::validateNetclassName( int aRow, wxString aName, bool focusFirst )
258 {
259  aName.Trim( true );
260  aName.Trim( false );
261 
262  if( aName.IsEmpty() )
263  {
264  wxString msg = _( "Netclass must have a name." );
265  m_Parent->SetError( msg, this, m_netclassGrid, aRow, GRID_NAME );
266  return false;
267  }
268 
269  for( int ii = 0; ii < m_netclassGrid->GetNumberRows(); ii++ )
270  {
271  if( ii != aRow && m_netclassGrid->GetRowLabelValue( ii ).CmpNoCase( aName ) == 0 )
272  {
273  wxString msg = _( "Netclass name already in use." );
274  m_Parent->SetError( msg, this, m_netclassGrid, focusFirst ? aRow : ii, GRID_NAME );
275  return false;
276  }
277  }
278 
279  return true;
280 }
281 
282 
284 {
285  if( event.GetCol() == GRID_NAME )
286  {
287  if( validateNetclassName( event.GetRow(), event.GetString() ) )
288  m_netclassesDirty = true;
289  else
290  event.Veto();
291  }
292 }
293 
294 
295 void PANEL_SETUP_NETCLASSES::OnAddNetclassClick( wxCommandEvent& event )
296 {
298  return;
299 
300  int row = m_netclassGrid->GetNumberRows();
301  m_netclassGrid->AppendRows();
302 
303  // Copy values of the default class:
304  for( int col = 1; col < m_netclassGrid->GetNumberCols(); col++ )
305  m_netclassGrid->SetCellValue( row, col, m_netclassGrid->GetCellValue( 0, col ) );
306 
307  m_netclassGrid->MakeCellVisible( row, 0 );
308  m_netclassGrid->SetGridCursor( row, 0 );
309 
310  m_netclassGrid->EnableCellEditControl( true );
311  m_netclassGrid->ShowCellEditControl();
312 
313  m_netclassesDirty = true;
314 }
315 
316 
318 {
320  return;
321 
322  int curRow = m_netclassGrid->GetGridCursorRow();
323 
324  if( curRow < 0 )
325  return;
326  else if( curRow == 0 )
327  {
328  DisplayErrorMessage( this, _( "The default net class is required." ) );
329  return;
330  }
331 
332  // reset the net class to default for members of the removed class
333  wxString classname = m_netclassGrid->GetCellValue( curRow, GRID_NAME );
334 
335  for( int row = 0; row < m_membershipGrid->GetNumberRows(); ++row )
336  {
337  if( m_membershipGrid->GetCellValue( row, 1 ) == classname )
338  m_membershipGrid->SetCellValue( row, 1, NETCLASS::Default );
339  }
340 
341  m_netclassGrid->DeleteRows( curRow, 1 );
342 
343  m_netclassGrid->MakeCellVisible( std::max( 0, curRow-1 ), m_netclassGrid->GetGridCursorCol() );
344  m_netclassGrid->SetGridCursor( std::max( 0, curRow-1 ), m_netclassGrid->GetGridCursorCol() );
345 
346  m_netclassesDirty = true;
347 }
348 
349 
351 {
352  // Account for scroll bars
353  aWidth -= ( m_netclassGrid->GetSize().x - m_netclassGrid->GetClientSize().x );
354 
355  for( int i = 1; i < m_netclassGrid->GetNumberCols(); i++ )
356  {
357  m_netclassGrid->SetColSize( i, m_originalColWidths[ i ] );
358  aWidth -= m_originalColWidths[ i ];
359  }
360 
361  m_netclassGrid->SetColSize( 0, std::max( aWidth, m_originalColWidths[ 0 ] ) );
362 }
363 
364 
366 {
367  AdjustNetclassGridColumns( event.GetSize().GetX() );
368 
369  event.Skip();
370 }
371 
372 
374 {
375  // Account for scroll bars
376  aWidth -= ( m_membershipGrid->GetSize().x - m_membershipGrid->GetClientSize().x );
377 
378  // Set className column width to original className width from netclasses grid
379  int classNameWidth = m_originalColWidths[ 0 ];
380  m_membershipGrid->SetColSize( 1, m_originalColWidths[ 0 ] );
381  m_membershipGrid->SetColSize( 0, std::max( aWidth - classNameWidth, classNameWidth ) );
382 }
383 
384 
386 {
387  AdjustMembershipGridColumns( event.GetSize().GetX() );
388 
389  event.Skip();
390 }
391 
392 
394 {
396  return;
397 
398  wxString netClassFilter = m_netClassFilter->GetStringSelection();
399  wxString netFilter = m_netNameFilter->GetValue().MakeLower();
400 
401  if( !netFilter.IsEmpty() )
402  netFilter = wxT( "*" ) + netFilter + wxT( "*" );
403 
404  for( int row = 0; row < m_membershipGrid->GetNumberRows(); ++row )
405  {
406  wxString net = m_membershipGrid->GetCellValue( row, 0 );
407  wxString netClass = m_membershipGrid->GetCellValue( row, 1 );
408  bool show = true;
409 
410  if( !aShowAll )
411  {
412  if( !netFilter.IsEmpty() && !net.MakeLower().Matches( netFilter ) )
413  show = false;
414 
415  if( !netClassFilter.IsEmpty() && netClass != netClassFilter )
416  show = false;
417  }
418 
419  if( show )
420  m_membershipGrid->ShowRow( row );
421  else
422  m_membershipGrid->HideRow( row );
423  }
424 }
425 
426 
428 {
430  return;
431 
432  wxArrayInt selectedRows = m_membershipGrid->GetSelectedRows();
433 
434  for( int row = 0; row < m_membershipGrid->GetNumberRows(); ++row )
435  {
436  if( !m_membershipGrid->IsRowShown( row ) )
437  continue;
438 
439  if( !aAssignAll && selectedRows.Index( row ) == wxNOT_FOUND )
440  continue;
441 
442  m_membershipGrid->SetCellValue( row, 1, m_assignNetClass->GetStringSelection() );
443  }
444 }
445 
446 
447 void PANEL_SETUP_NETCLASSES::OnUpdateUI( wxUpdateUIEvent& event )
448 {
449  if( m_netclassesDirty )
450  {
452  m_netclassesDirty = false;
453  }
454 }
455 
456 
458 {
459  return ValueFromString( m_Frame->GetUserUnits(), m_netclassGrid->GetCellValue( aRow, aCol ), true );
460 }
461 
462 
464 {
466  return false;
467 
468  wxString msg;
469  int minViaDia = m_ConstraintsPanel->m_viaMinSize.GetValue();
470  int minViaDrill = m_ConstraintsPanel->m_viaMinDrill.GetValue();
471  int minUViaDia = m_ConstraintsPanel->m_uviaMinSize.GetValue();
472  int minUViaDrill = m_ConstraintsPanel->m_uviaMinDrill.GetValue();
473  int minTrackWidth = m_ConstraintsPanel->m_trackMinWidth.GetValue();
474 
475  // Test net class parameters.
476  for( int row = 0; row < m_netclassGrid->GetNumberRows(); row++ )
477  {
478  wxString netclassName = m_netclassGrid->GetCellValue( row, GRID_NAME );
479  netclassName.Trim( true );
480  netclassName.Trim( false );
481 
482  if( !validateNetclassName( row, netclassName, false ) )
483  return false;
484 
485  if( getNetclassValue( row, GRID_TRACKSIZE ) < minTrackWidth )
486  {
487  msg.Printf( _( "Track width less than minimum track width (%s)." ),
488  StringFromValue( m_Frame->GetUserUnits(), minTrackWidth, true, true ) );
489  m_Parent->SetError( msg, this, m_netclassGrid, row, GRID_TRACKSIZE );
490  return false;
491  }
492 
493  if( getNetclassValue( row, GRID_DIFF_PAIR_WIDTH ) < minTrackWidth )
494  {
495  msg.Printf( _( "Differential pair width less than minimum track width (%s)." ),
496  StringFromValue( m_Frame->GetUserUnits(), minTrackWidth, true, true ) );
498  return false;
499  }
500 
501  // Test vias
502  if( getNetclassValue( row, GRID_VIASIZE ) < minViaDia )
503  {
504  msg.Printf( _( "Via diameter less than minimum via diameter (%s)." ),
505  StringFromValue( m_Frame->GetUserUnits(), minViaDia, true, true ) );
506  m_Parent->SetError( msg, this, m_netclassGrid, row, GRID_VIASIZE );
507  return false;
508  }
509 
511  {
512  msg = _( "Via drill larger than via diameter." );
513  m_Parent->SetError( msg, this, m_netclassGrid, row, GRID_VIADRILL );
514  return false;
515  }
516 
517  if( getNetclassValue( row, GRID_VIADRILL ) < minViaDrill )
518  {
519  msg.Printf( _( "Via drill less than minimum via drill (%s)." ),
520  StringFromValue( m_Frame->GetUserUnits(), minViaDrill, true, true ) );
521  m_Parent->SetError( msg, this, m_netclassGrid, row, GRID_VIADRILL );
522  return false;
523  }
524 
525  // Test Micro vias
526  if( getNetclassValue( row, GRID_uVIASIZE ) < minUViaDia )
527  {
528  msg.Printf( _( "Microvia diameter less than minimum microvia diameter (%s)." ),
529  StringFromValue( m_Frame->GetUserUnits(), minUViaDia, true, true ) );
530  m_Parent->SetError( msg, this, m_netclassGrid, row, GRID_uVIASIZE );
531  return false;
532  }
533 
535  {
536  msg = _( "Microvia drill larger than microvia diameter." );
537  m_Parent->SetError( msg, this, m_netclassGrid, row, GRID_uVIADRILL );
538  return false;
539  }
540 
541  if( getNetclassValue( row, GRID_uVIADRILL ) < minUViaDrill )
542  {
543  msg.Printf( _( "Microvia drill less than minimum microvia drill (%s)." ),
544  StringFromValue( m_Frame->GetUserUnits(), minUViaDrill, true, true ) );
545  m_Parent->SetError( msg, this, m_netclassGrid, row, GRID_uVIADRILL );
546  return false;
547  }
548  }
549 
550  return true;
551 }
552 
553 
555 {
556  // Note: do not change the board, as we need to get the current nets from it for
557  // netclass memberships. All the netclass definitions and dimension lists are in
558  // the BOARD_DESIGN_SETTINGS.
559 
560  BOARD_DESIGN_SETTINGS* savedSettings = m_BrdSettings;
561 
562  m_BrdSettings = &aBoard->GetDesignSettings();
564 
565  m_netclassGrid->ForceRefresh();
566  m_membershipGrid->ForceRefresh();
567 
568  m_BrdSettings = savedSettings;
569 }
570 
571 
void BuildListOfNets()
Definition: class_board.h:729
NETCLASSPTR Find(const wxString &aName) const
Function Find searches this container for a NETCLASS given by aName.
Definition: netclass.cpp:146
void OnSizeNetclassGrid(wxSizeEvent &event) override
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Function DisplayErrorMessage displays an error message with aMessage.
Definition: confirm.cpp:259
Implementation of conversion functions that require both schematic and board internal units...
This file is part of the common library.
#define SET_MILS_CELL(col, val)
Class GRID_TRICKS is used to add cut, copy, and paste to an otherwise unmodied wxGrid instance...
Definition: grid_tricks.h:51
PANEL_SETUP_NETCLASSES(PAGED_DIALOG *aParent, PCB_EDIT_FRAME *aFrame, PANEL_SETUP_FEATURE_CONSTRAINTS *aConstraintsPanel)
BOARD * GetBoard() const
iterator end()
Definition: netclass.h:249
int ValueFromString(EDA_UNITS_T aUnits, const wxString &aTextValue, bool aUseMils)
Function ValueFromString converts aTextValue in aUnits to internal units used by the application...
Definition: base_units.cpp:409
int getNetclassValue(int aRow, int aCol)
static void netclassToGridRow(EDA_UNITS_T aUnits, wxGrid *aGrid, int aRow, const NETCLASSPTR &nc)
void doAssignments(bool aAssignAll)
virtual int GetValue()
Function GetValue Returns the current value in Internal Units.
void SynchronizeNetsAndNetClasses()
Function SynchronizeNetsAndNetClasses copies NETCLASS info to each NET, based on NET membership in a ...
Definition: netclass.cpp:160
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Construct a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:79
NETCLASS_MAP::iterator iterator
Definition: netclass.h:247
iterator begin()
Definition: netclass.h:248
Class NETCLASSES is a container for NETCLASS instances.
Definition: netclass.h:224
static const char Default[]
the name of the default NETCLASS
Definition: netclass.h:80
void ImportSettingsFrom(BOARD *aBoard)
void addNet(wxString netName, const wxString &netclass)
EDA_UNITS_T GetUserUnits() const override
Return the user units currently in use.
Definition: draw_frame.h:284
static void gridRowToNetclass(EDA_UNITS_T aUnits, wxGrid *grid, int row, const NETCLASSPTR &nc)
void OnNetclassGridCellChanging(wxGridEvent &event)
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Function GetDesignSettings.
Definition: class_board.h:538
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
Definition: wx_grid.cpp:156
BOARD_DESIGN_SETTINGS * m_BrdSettings
NETINFO_LIST & GetNetInfo()
Definition: class_board.h:750
void SetError(const wxString &aMessage, wxWindow *aPage, wxObject *aCtrl, int aRow=-1, int aCol=-1)
unsigned GetCount() const
Function GetCount.
Definition: netclass.h:259
Class PANEL_SETUP_NETCLASSES_BASE.
bool Add(const NETCLASSPTR &aNetclass)
Function Add takes aNetclass and puts it into this NETCLASSES container.
Definition: netclass.cpp:104
Class NETINFO_ITEM handles the data for a net.
Definition: netinfo.h:69
bool SetCurrentNetClass(const wxString &aNetClassName)
Function SetCurrentNetClass Must be called after a netclass selection (or after a netclass parameter ...
void Clear()
Function Clear destroys any contained NETCLASS instances except the Default one.
Definition: netclass.h:242
PANEL_SETUP_FEATURE_CONSTRAINTS * m_ConstraintsPanel
#define max(a, b)
Definition: auxiliary.h:86
Class BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:170
NETCLASSPTR GetDefault() const
Function GetDefault.
Definition: netclass.h:268
size_t i
Definition: json11.cpp:597
Class PCB_EDIT_FRAME is the main frame for Pcbnew.
wxString StringFromValue(EDA_UNITS_T aUnits, int aValue, bool aAddUnitSymbol, bool aUseMils)
Function StringFromValue returns the string from aValue according to units (inch, mm ...
Definition: base_units.cpp:210
void OnUpdateUI(wxUpdateUIEvent &event) override
bool validateNetclassName(int aRow, wxString aName, bool focusFirst=true)
#define MYCELL(col)
void OnSizeMembershipGrid(wxSizeEvent &event) override
EDA_UNITS_T
Definition: common.h:159
void OnRemoveNetclassClick(wxCommandEvent &event) override
void AdjustNetclassGridColumns(int aWidth)
void AdjustMembershipGridColumns(int aWidth)
void OnAddNetclassClick(wxCommandEvent &event) override
Class BOARD_DESIGN_SETTINGS contains design settings for a BOARD object.
void doApplyFilters(bool aShowAll)