KiCad PCB EDA Suite
panel_setup_netclasses.cpp File Reference
#include <fctsys.h>
#include <class_drawpanel.h>
#include <base_units.h>
#include <confirm.h>
#include <pcb_edit_frame.h>
#include <board_design_settings.h>
#include <bitmaps.h>
#include <widgets/wx_grid.h>
#include <panel_setup_netclasses.h>

Go to the source code of this file.

Macros

#define SET_MILS_CELL(col, val)   aGrid->SetCellValue( aRow, col, StringFromValue( aUnits, val, true, true ) )
 
#define MYCELL(col)   ValueFromString( aUnits, grid->GetCellValue( row, col ), true )
 

Enumerations

enum  {
  GRID_NAME = 0, GRID_CLEARANCE, GRID_TRACKSIZE, GRID_VIASIZE,
  GRID_VIADRILL, GRID_uVIASIZE, GRID_uVIADRILL, GRID_DIFF_PAIR_WIDTH,
  GRID_DIFF_PAIR_GAP, GRID_DIFF_PAIR_VIA_GAP
}
 

Functions

static void netclassToGridRow (EDA_UNITS_T aUnits, wxGrid *aGrid, int aRow, const NETCLASSPTR &nc)
 
static void gridRowToNetclass (EDA_UNITS_T aUnits, wxGrid *grid, int row, const NETCLASSPTR &nc)
 

Macro Definition Documentation

#define MYCELL (   col)    ValueFromString( aUnits, grid->GetCellValue( row, col ), true )

Referenced by gridRowToNetclass().

#define SET_MILS_CELL (   col,
  val 
)    aGrid->SetCellValue( aRow, col, StringFromValue( aUnits, val, true, true ) )

Referenced by netclassToGridRow().

Enumeration Type Documentation

anonymous enum
Enumerator
GRID_NAME 
GRID_CLEARANCE 
GRID_TRACKSIZE 
GRID_VIASIZE 
GRID_VIADRILL 
GRID_uVIASIZE 
GRID_uVIADRILL 
GRID_DIFF_PAIR_WIDTH 
GRID_DIFF_PAIR_GAP 
GRID_DIFF_PAIR_VIA_GAP 

Definition at line 40 of file panel_setup_netclasses.cpp.

Function Documentation

static void gridRowToNetclass ( EDA_UNITS_T  aUnits,
wxGrid *  grid,
int  row,
const NETCLASSPTR &  nc 
)
static

Definition at line 200 of file panel_setup_netclasses.cpp.

References GRID_CLEARANCE, GRID_DIFF_PAIR_GAP, GRID_DIFF_PAIR_WIDTH, GRID_NAME, GRID_TRACKSIZE, GRID_uVIADRILL, GRID_uVIASIZE, GRID_VIADRILL, GRID_VIASIZE, and MYCELL.

Referenced by PANEL_SETUP_NETCLASSES::TransferDataFromWindow().

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 }
#define MYCELL(col)
static void netclassToGridRow ( EDA_UNITS_T  aUnits,
wxGrid *  aGrid,
int  aRow,
const NETCLASSPTR &  nc 
)
static

Definition at line 107 of file panel_setup_netclasses.cpp.

References GRID_CLEARANCE, GRID_DIFF_PAIR_GAP, GRID_DIFF_PAIR_WIDTH, GRID_NAME, GRID_TRACKSIZE, GRID_uVIADRILL, GRID_uVIASIZE, GRID_VIADRILL, GRID_VIASIZE, and SET_MILS_CELL.

Referenced by PANEL_SETUP_NETCLASSES::TransferDataToWindow().

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 }
#define SET_MILS_CELL(col, val)