KiCad PCB EDA Suite
stackup_predefined_prms.h File Reference
#include <wx/string.h>
#include <wx/arrstr.h>
#include <wx/colour.h>
#include <layer_ids.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 65 of file stackup_predefined_prms.h.

◆ DEFAULT_EPSILON_R_SOLDERMASK

#define DEFAULT_EPSILON_R_SOLDERMASK   3.3

Definition at line 62 of file stackup_predefined_prms.h.

◆ KEY_COPPER

#define KEY_COPPER   "copper"

Definition at line 44 of file stackup_predefined_prms.h.

◆ KEY_CORE

#define KEY_CORE   "core"

Definition at line 41 of file stackup_predefined_prms.h.

◆ KEY_PREPREG

#define KEY_PREPREG   "prepreg"

Definition at line 42 of file stackup_predefined_prms.h.

Function Documentation

◆ GetColorStandardList()

◆ GetColorStandardListCount()

int GetColorStandardListCount ( )
Returns
the count of colors in ColorStandardList

Definition at line 98 of file stackup_predefined_prms.cpp.

99 {
100  return arrayDim( solderMaskColors );
101 }
constexpr std::size_t arrayDim(T const (&)[N]) noexcept
Returns # of elements in an array.
Definition: arraydim.h:31
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(), PANEL_3D_COLORS::OnLoadColorsFromBoardStackup(), and PANEL_SETUP_BOARD_STACKUP::synchronizeWithBoard().

◆ GetColorUserDefinedListIdx()

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

Definition at line 104 of file stackup_predefined_prms.cpp.

105 {
106  // this is the last item in list
107  return GetColorStandardListCount() - 1;
108 }
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 81 of file stackup_predefined_prms.cpp.

82 {
83  wxArrayString list;
84 
85  for( unsigned ii = 0; ii < arrayDim( CopperFinishType ); ii++ )
86  list.Add( aTranslate ? wxGetTranslation( CopperFinishType[ii] ) : CopperFinishType[ii] );
87 
88  return list;
89 }
constexpr std::size_t arrayDim(T const (&)[N]) noexcept
Returns # of elements in an array.
Definition: arraydim.h:31
static wxString CopperFinishType[]

References arrayDim(), and CopperFinishType.

Referenced by PANEL_SETUP_BOARD_FINISH::PANEL_SETUP_BOARD_FINISH(), PANEL_SETUP_BOARD_FINISH::synchronizeWithBoard(), and PANEL_SETUP_BOARD_FINISH::TransferDataFromWindow().

◆ 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 754 of file board_stackup.cpp.

755 {
756  // return true if the param value is specified:
757 
758  if( !aPrmValue.IsEmpty()
759  && ( aPrmValue.CmpNoCase( NotSpecifiedPrm() ) != 0 )
760  && aPrmValue != wxGetTranslation( NotSpecifiedPrm() ) )
761  return true;
762 
763  return false;
764 }
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()