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>
#include <gal/color4d.h>
#include <board_stackup_manager/board_stackup.h>

Go to the source code of this file.

Classes

class  FAB_LAYER_COLOR
 

Macros

#define KEY_CORE   "core"
 
#define KEY_PREPREG   "prepreg"
 
#define KEY_COPPER   "copper"
 
#define DEFAULT_SOLDERMASK_OPACITY   0.83
 
#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 ()
 
wxColour GetDefaultUserColor (BOARD_STACKUP_ITEM_TYPE aType)
 

Macro Definition Documentation

◆ DEFAULT_EPSILON_R_SILKSCREEN

#define DEFAULT_EPSILON_R_SILKSCREEN   1.0

Definition at line 69 of file stackup_predefined_prms.h.

◆ DEFAULT_EPSILON_R_SOLDERMASK

#define DEFAULT_EPSILON_R_SOLDERMASK   3.3

Definition at line 66 of file stackup_predefined_prms.h.

◆ DEFAULT_SOLDERMASK_OPACITY

#define DEFAULT_SOLDERMASK_OPACITY   0.83

Definition at line 63 of file stackup_predefined_prms.h.

◆ KEY_COPPER

#define KEY_COPPER   "copper"

Definition at line 47 of file stackup_predefined_prms.h.

◆ KEY_CORE

#define KEY_CORE   "core"

Definition at line 44 of file stackup_predefined_prms.h.

◆ KEY_PREPREG

#define KEY_PREPREG   "prepreg"

Definition at line 45 of file stackup_predefined_prms.h.

Function Documentation

◆ GetColorStandardList()

◆ GetColorStandardListCount()

int GetColorStandardListCount ( )
Returns
the count of colors in ColorStandardList

Definition at line 92 of file stackup_predefined_prms.cpp.

93 {
94  return arrayDim( solderMaskColors );
95 }
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::createColorBox(), PANEL_SETUP_BOARD_STACKUP::createRowData(), GetColorUserDefinedListIdx(), PANEL_SETUP_BOARD_STACKUP::onColorSelected(), and PANEL_SETUP_BOARD_STACKUP::synchronizeWithBoard().

◆ GetColorUserDefinedListIdx()

int GetColorUserDefinedListIdx ( )

◆ 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 75 of file stackup_predefined_prms.cpp.

76 {
77  wxArrayString list;
78 
79  for( unsigned ii = 0; ii < arrayDim( CopperFinishType ); ii++ )
80  list.Add( aTranslate ? wxGetTranslation( CopperFinishType[ii] ) : CopperFinishType[ii] );
81 
82  return list;
83 }
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().

◆ GetDefaultUserColor()

wxColour GetDefaultUserColor ( BOARD_STACKUP_ITEM_TYPE  aType)
inline

Definition at line 124 of file stackup_predefined_prms.h.

125 {
127 }
int GetColorUserDefinedListIdx()
wxColor GetColor(BOARD_STACKUP_ITEM_TYPE aItemType) const
const FAB_LAYER_COLOR * GetColorStandardList()

References FAB_LAYER_COLOR::GetColor(), GetColorStandardList(), and GetColorUserDefinedListIdx().

Referenced by PANEL_SETUP_BOARD_STACKUP::createRowData(), and PANEL_SETUP_BOARD_STACKUP::onColorSelected().

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

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