KiCad PCB EDA Suite
stackup_predefined_prms.h File Reference
#include <wx/string.h>
#include <layers_id_colors_and_visibility.h>
#include <i18n_utility.h>

Go to the source code of this file.

Classes

struct  FAB_LAYER_COLOR
 

Macros

#define KEY_CORE   "core"
 
#define KEY_PREPREG   "prepreg"
 
#define KEY_COPPER   "copper"
 
#define DEFAULT_EPSILON_R_SOLDERMASK   3.3
 
#define DEFAULT_EPSILON_R_SILKSCREEN   1.0
 

Functions

wxString NotSpecifiedPrm ()
 
bool IsPrmSpecified (const wxString &aPrmValue)
 
wxArrayString GetCopperFinishStandardList (bool aTranslate)
 
const FAB_LAYER_COLORGetColorStandardList ()
 
int GetColorStandardListCount ()
 
int GetColorUserDefinedListIdx ()
 

Macro Definition Documentation

◆ DEFAULT_EPSILON_R_SILKSCREEN

#define DEFAULT_EPSILON_R_SILKSCREEN   1.0

Definition at line 62 of file stackup_predefined_prms.h.

◆ DEFAULT_EPSILON_R_SOLDERMASK

#define DEFAULT_EPSILON_R_SOLDERMASK   3.3

Definition at line 59 of file stackup_predefined_prms.h.

◆ KEY_COPPER

#define KEY_COPPER   "copper"

Definition at line 41 of file stackup_predefined_prms.h.

◆ KEY_CORE

#define KEY_CORE   "core"

Definition at line 38 of file stackup_predefined_prms.h.

◆ KEY_PREPREG

#define KEY_PREPREG   "prepreg"

Definition at line 39 of file stackup_predefined_prms.h.

Function Documentation

◆ GetColorStandardList()

◆ GetColorStandardListCount()

int GetColorStandardListCount ( )
Returns
the count of colors in ColorStandardList

Definition at line 97 of file stackup_predefined_prms.cpp.

98 {
99  return arrayDim( solderMaskColors );
100 }
constexpr std::size_t arrayDim(T const (&)[N]) noexcept
Definition: macros.h:160
static FAB_LAYER_COLOR solderMaskColors[]

References arrayDim(), and solderMaskColors.

Referenced by PANEL_SETUP_BOARD_STACKUP::createBmComboBox(), PANEL_SETUP_BOARD_STACKUP::createRowData(), GetColorUserDefinedListIdx(), PANEL_SETUP_BOARD_STACKUP::onColorSelected(), EDA_3D_VIEWER::SynchroniseColoursWithBoard(), and PANEL_SETUP_BOARD_STACKUP::synchronizeWithBoard().

◆ GetColorUserDefinedListIdx()

int GetColorUserDefinedListIdx ( )
Returns
the index of the user defined color in ColorStandardList

Definition at line 103 of file stackup_predefined_prms.cpp.

104 {
105  // this is the last item in list
106  return GetColorStandardListCount() - 1;
107 }
int GetColorStandardListCount()

References GetColorStandardListCount().

Referenced by PANEL_SETUP_BOARD_STACKUP::createRowData(), PANEL_SETUP_BOARD_STACKUP::GetSelectedColor(), PANEL_SETUP_BOARD_STACKUP::onColorSelected(), PANEL_SETUP_BOARD_STACKUP::synchronizeWithBoard(), and PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup().

◆ GetCopperFinishStandardList()

wxArrayString GetCopperFinishStandardList ( bool  aTranslate)
Returns
a wxArray of standard copper finish names.
Parameters
aTranslate= false for the initial names, true for translated names

Definition at line 80 of file stackup_predefined_prms.cpp.

81 {
82  wxArrayString list;
83 
84  for( unsigned ii = 0; ii < arrayDim( CopperFinishType ); ii++ )
85  list.Add( aTranslate ? wxGetTranslation( CopperFinishType[ii] ) : CopperFinishType[ii] );
86 
87  return list;
88 }
constexpr std::size_t arrayDim(T const (&)[N]) noexcept
Definition: macros.h:160
static wxString CopperFinishType[]

References arrayDim(), and CopperFinishType.

Referenced by PANEL_SETUP_BOARD_STACKUP::buildLayerStackPanel(), PANEL_SETUP_BOARD_STACKUP::synchronizeWithBoard(), and PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup().

◆ IsPrmSpecified()

bool IsPrmSpecified ( const wxString &  aPrmValue)
Returns
true if the param value is specified: not empty not NotSpecifiedPrm() value or its translation

Definition at line 704 of file class_board_stackup.cpp.

705 {
706  // return true if the param value is specified:
707 
708  if( !aPrmValue.IsEmpty()
709  && ( aPrmValue.CmpNoCase( NotSpecifiedPrm() ) != 0 )
710  && aPrmValue != wxGetTranslation( NotSpecifiedPrm() ) )
711  return true;
712 
713  return false;
714 }
wxString NotSpecifiedPrm()

References NotSpecifiedPrm().

Referenced by GERBER_JOBFILE_WRITER::addJSONMaterialStackup(), PANEL_SETUP_BOARD_STACKUP::addMaterialChooser(), BOARD_STACKUP::FormatBoardStackup(), BOARD_STACKUP_ITEM::HasMaterialValue(), PANEL_SETUP_BOARD_STACKUP::synchronizeWithBoard(), and PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup().

◆ NotSpecifiedPrm()