|
KiCad PCB EDA Suite
|
The column set and formatting a new chart starts from. More...
#include <drill_chart_template.h>
Public Member Functions | |
| DRILL_CHART_TEMPLATE () | |
| void | SetName (const wxString &aName) |
| std::vector< GENERATED_TABLE_COLUMN > & | Columns () |
| const std::vector< GENERATED_TABLE_COLUMN > & | Columns () const |
| GENERATED_TABLE_UNITS | GetUnits () const |
| void | SetUnits (GENERATED_TABLE_UNITS aUnits) |
| int | GetPrecision () const |
| void | SetPrecision (int aPrecision) |
| bool | GetShowTotals () const |
| void | SetShowTotals (bool aShow) |
| bool | SaveToFile (const wxString &aPath, wxString *aError) const |
| Read and write a template as JSON. | |
| bool | LoadFromFile (const wxString &aPath, wxString *aError) |
Static Public Member Functions | |
| static DRILL_CHART_TEMPLATE | MakeDefault () |
Private Attributes | |
| wxString | m_name |
| Identify the template file to whoever opens it. | |
| int | m_version |
| std::vector< GENERATED_TABLE_COLUMN > | m_columns |
| GENERATED_TABLE_UNITS | m_units |
| int | m_precision |
| bool | m_showTotals |
The column set and formatting a new chart starts from.
A chart copies a template rather than linking to it, so editing or importing a template cannot silently rewrite a fabrication drawing that has already been approved.
Definition at line 76 of file drill_chart_template.h.
| DRILL_CHART_TEMPLATE::DRILL_CHART_TEMPLATE | ( | ) |
Definition at line 75 of file drill_chart_template.cpp.
References DrillChartSchema(), m_precision, m_showTotals, m_units, and m_version.
Referenced by LoadFromFile(), and MakeDefault().
|
inline |
Definition at line 85 of file drill_chart_template.h.
References m_columns.
Referenced by PCB_DRILL_CHART::ApplyTemplate(), MakeDefault(), PANEL_DRILL_CHART_OPTIONS::onExportTemplate(), and PANEL_DRILL_CHART_OPTIONS::onImportTemplate().
|
inline |
Definition at line 86 of file drill_chart_template.h.
References m_columns.
|
inline |
Definition at line 91 of file drill_chart_template.h.
References m_precision.
Referenced by PCB_DRILL_CHART::ApplyTemplate(), and PANEL_DRILL_CHART_OPTIONS::onImportTemplate().
|
inline |
Definition at line 94 of file drill_chart_template.h.
References m_showTotals.
Referenced by PCB_DRILL_CHART::ApplyTemplate(), PCB_IO_KICAD_SEXPR::formatGeneratedTableExtras(), and PANEL_DRILL_CHART_OPTIONS::onImportTemplate().
|
inline |
Definition at line 88 of file drill_chart_template.h.
References m_units.
Referenced by PCB_DRILL_CHART::ApplyTemplate(), and PANEL_DRILL_CHART_OPTIONS::onImportTemplate().
| bool DRILL_CHART_TEMPLATE::LoadFromFile | ( | const wxString & | aPath, |
| wxString * | aError ) |
Definition at line 151 of file drill_chart_template.cpp.
References _, DRILL_CHART_TEMPLATE(), DrillChartSchema(), GENERATED_TABLE_SCHEMA::FindToken(), GeneratedTableAlignFromToken(), GeneratedTableUnitsFromToken(), GENERATED_TABLE_COLUMN::m_Align, m_columns, GENERATED_TABLE_COLUMN::m_Heading, GENERATED_TABLE_COLUMN::m_Id, GENERATED_TABLE_COLUMN_DEF::m_Id, m_name, m_precision, m_showTotals, m_units, m_version, and GENERATED_TABLE_COLUMN::m_Width.
Referenced by PANEL_DRILL_CHART_OPTIONS::onImportTemplate().
|
static |
Definition at line 84 of file drill_chart_template.cpp.
References Columns(), GENERATED_TABLE_SCHEMA::Defaults(), DRILL_CHART_TEMPLATE(), DrillChartSchema(), and SetName().
Referenced by PCB_IO_KICAD_SEXPR::formatGeneratedTableExtras(), and PCB_DRILL_CHART::PCB_DRILL_CHART().
| bool DRILL_CHART_TEMPLATE::SaveToFile | ( | const wxString & | aPath, |
| wxString * | aError ) const |
Read and write a template as JSON.
A template is shared between projects and people, so it is a standalone file rather than something only a board can carry. Import validates. An unknown column token is skipped rather than becoming an out-of-range enum.
Definition at line 95 of file drill_chart_template.cpp.
References _, DrillChartSchema(), GeneratedTableAlignToken(), GeneratedTableUnitsToken(), m_columns, m_name, m_precision, m_showTotals, m_units, m_version, and GENERATED_TABLE_SCHEMA::Token().
Referenced by PANEL_DRILL_CHART_OPTIONS::onExportTemplate().
|
inline |
Definition at line 83 of file drill_chart_template.h.
References m_name.
Referenced by MakeDefault(), and PANEL_DRILL_CHART_OPTIONS::onExportTemplate().
|
inline |
Definition at line 92 of file drill_chart_template.h.
References m_precision.
Referenced by PANEL_DRILL_CHART_OPTIONS::onExportTemplate().
|
inline |
Definition at line 95 of file drill_chart_template.h.
References m_showTotals.
Referenced by PANEL_DRILL_CHART_OPTIONS::onExportTemplate().
|
inline |
Definition at line 89 of file drill_chart_template.h.
References m_units.
Referenced by PANEL_DRILL_CHART_OPTIONS::onExportTemplate().
|
private |
Definition at line 115 of file drill_chart_template.h.
Referenced by Columns(), Columns(), LoadFromFile(), and SaveToFile().
|
private |
Identify the template file to whoever opens it.
A chart copies formatting without recording where it came from, so nothing in the board reads these back.
Definition at line 112 of file drill_chart_template.h.
Referenced by LoadFromFile(), SaveToFile(), and SetName().
|
private |
Definition at line 117 of file drill_chart_template.h.
Referenced by DRILL_CHART_TEMPLATE(), GetPrecision(), LoadFromFile(), SaveToFile(), and SetPrecision().
|
private |
Definition at line 118 of file drill_chart_template.h.
Referenced by DRILL_CHART_TEMPLATE(), GetShowTotals(), LoadFromFile(), SaveToFile(), and SetShowTotals().
|
private |
Definition at line 116 of file drill_chart_template.h.
Referenced by DRILL_CHART_TEMPLATE(), GetUnits(), LoadFromFile(), SaveToFile(), and SetUnits().
|
private |
Definition at line 113 of file drill_chart_template.h.
Referenced by DRILL_CHART_TEMPLATE(), LoadFromFile(), and SaveToFile().