20#ifndef DRILL_CHART_TEMPLATE_H
21#define DRILL_CHART_TEMPLATE_H
158 bool SaveToFile(
const wxString& aPath, wxString* aError )
const;
159 bool LoadFromFile(
const wxString& aPath, wxString* aError );
DRILL_CHART_UNITS GetUnits() const
bool SaveToFile(const wxString &aPath, wxString *aError) const
Read and write a template as JSON.
void SetName(const wxString &aName)
void SetPrecision(int aPrecision)
void SetUnits(DRILL_CHART_UNITS aUnits)
wxString m_name
Identify the template file to whoever opens it.
const std::vector< DRILL_CHART_COLUMN > & Columns() const
void SetShowTotals(bool aShow)
bool LoadFromFile(const wxString &aPath, wxString *aError)
std::vector< DRILL_CHART_COLUMN > & Columns()
static DRILL_CHART_TEMPLATE MakeDefault()
std::vector< DRILL_CHART_COLUMN > m_columns
bool GetShowTotals() const
DRILL_CHART_UNITS m_units
LSET is a set of PCB_LAYER_IDs.
A base class for LIB_SYMBOL and SCH_SYMBOL.
const char * DrillChartColumnToken(DRILL_CHART_COLUMN_ID aId)
bool DrillChartAlignFromToken(const wxString &aToken, DRILL_CHART_ALIGN &aAlign)
constexpr int DRILL_CHART_MAX_COLUMN_WIDTH
A chart column can be no wider than this, and no chart wider than that in total.
bool DrillChartDefaultColumn(DRILL_CHART_COLUMN_ID aId, DRILL_CHART_COLUMN &aColumn)
The heading and alignment a column starts with, so the writer can leave them out of the file and the ...
bool ValidateDrillChartColumns(std::vector< DRILL_CHART_COLUMN > &aColumns)
Reject a column set that repeats an id or is implausibly wide.
constexpr int64_t DRILL_CHART_MAX_TOTAL_WIDTH
bool DrillChartUnitsFromToken(const wxString &aToken, DRILL_CHART_UNITS &aUnits)
const char * DrillChartUnitsToken(DRILL_CHART_UNITS aUnits)
Stable file tokens, independent of enum ordering so inserting a value later cannot change what an exi...
LSET DrillDocumentationLayers()
Layers a chart or map may live on.
bool DrillChartColumnFromToken(const wxString &aToken, DRILL_CHART_COLUMN_ID &aId)
const char * DrillChartAlignToken(DRILL_CHART_ALIGN aAlign)
bool operator==(const DRILL_CHART_COLUMN &aOther) const
DRILL_CHART_COLUMN_ID m_Id
DRILL_CHART_ALIGN m_Align
Which holes a chart reports on.
bool operator==(const DRILL_CHART_FILTER &aOther) const
@ DESCRIPTION
Field Description of part, i.e. "1/4W 1% Metal Film Resistor".
static const long long MM