33#include <wx/translation.h>
41 true,
_HKI(
"Layer" ) },
45 true,
_HKI(
"Material" ) },
68 wxString
name =
_(
"Dielectric" );
87wxString cellText(
const BOARD_STACKUP_ITEM& aItem,
int aSublayer,
const wxString& aName,
int aColumnId,
121 return wxEmptyString;
135 const std::vector<GENERATED_TABLE_COLUMN>& aColumns,
142 std::vector<GENERATED_TABLE_ROW>
rows;
148 copperAbove = item->GetBrdLayerId();
150 for(
int sublayer = 0; sublayer < item->GetSublayersCount(); ++sublayer )
156 row.
m_Key =
"D:" + canonicalName( copperAbove ) +
":" + std::to_string( sublayer );
159 row.
m_Key =
"L:" + canonicalName( item->GetBrdLayerId() );
162 const wxString
name = layerName( aBoard, *item, sublayer );
164 row.
m_Cells.reserve( aColumns.size() );
167 row.
m_Cells.push_back( cellText( *item, sublayer,
name, column.m_Id, aUnits, aPrecision ) );
constexpr EDA_IU_SCALE unityScale
@ BS_ITEM_TYPE_DIELECTRIC
Manage one layer needed to make a physical board.
wxString GetTypeName() const
int GetSublayersCount() const
double GetEpsilonR(int aDielectricSubLayer=0) const
wxString GetColor(int aDielectricSubLayer=0) const
wxString GetLayerName() const
PCB_LAYER_ID GetBrdLayerId() const
bool IsThicknessEditable() const
int GetThickness(int aDielectricSubLayer=0) const
BOARD_STACKUP_ITEM_TYPE GetType() const
wxString GetMaterial(int aDielectricSubLayer=0) const
int GetDielectricLayerId() const
double GetLossTangent(int aDielectricSubLayer=0) const
Manage layers needed to make a physical board.
const std::vector< BOARD_STACKUP_ITEM * > & GetList() const
bool SynchronizeWithBoard(const BOARD_DESIGN_SETTINGS *aSettings)
Synchronize the BOARD_STACKUP_ITEM* list with the board.
Information pertinent to a Pcbnew printed circuit board.
BOARD_STACKUP GetStackupOrDefault() const
static wxString GetStandardLayerName(PCB_LAYER_ID aLayerId)
Return an "English Standard" name of a PCB layer when given aLayerNumber.
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Return the name of a aLayer.
BOARD_DESIGN_SETTINGS & GetDesignSettings()
The columns one generator (the drill chart, a stackup table, ...) can produce, and the units and prec...
wxString FormatGeneratedTableLength(int aValue, GENERATED_TABLE_UNITS aUnits, int aPrecision)
Render a length the way a generated table's cell shows it.
Some functions to handle hotkeys in KiCad.
PCB_LAYER_ID
A quick note on layer IDs:
bool IsValidLayer(int aLayerId)
Test whether a given integer is a valid layer index, i.e.
KICOMMON_API wxString StringFromValue(const EDA_IU_SCALE &aIuScale, EDA_UNITS aUnits, double aValue, bool aAddUnitsText=false, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
Return the string from aValue according to aUnits (inch, mm ...) for display.
wxString NotSpecifiedPrm()
std::vector< GENERATED_TABLE_ROW > BuildStackupTableRows(const BOARD &aBoard, const std::vector< GENERATED_TABLE_COLUMN > &aColumns, GENERATED_TABLE_UNITS aUnits, int aPrecision)
One row per stackup layer, and per sublayer of a split dielectric, top to bottom.
const GENERATED_TABLE_SCHEMA & StackupTableSchema()
Every column a stackup table can show, all of them by default.
wxString InitialCaps(const wxString &aString)
Capitalize only the first word.
A column as a generated table actually carries it: what a row's cell in that column holds and how it ...
One data row of a generated table, and the identity its formatting follows across rebuilds.
std::vector< wxString > m_Cells
std::vector< DATABASE_CONNECTION::ROW > rows