|
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< DRILL_CHART_COLUMN > & | Columns () |
| const std::vector< DRILL_CHART_COLUMN > & | Columns () const |
| DRILL_CHART_UNITS | GetUnits () const |
| void | SetUnits (DRILL_CHART_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< DRILL_CHART_COLUMN > | m_columns |
| DRILL_CHART_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 130 of file drill_chart_template.h.
| DRILL_CHART_TEMPLATE::DRILL_CHART_TEMPLATE | ( | ) |
Definition at line 46 of file drill_chart_template.cpp.
References m_precision, m_showTotals, m_units, m_version, and MM.
Referenced by LoadFromFile(), and MakeDefault().
|
inline |
Definition at line 139 of file drill_chart_template.h.
References m_columns.
Referenced by PCB_DRILL_CHART::ApplyTemplate(), DIALOG_DRILL_CHART_PROPERTIES::applyTemplate(), MakeDefault(), DIALOG_DRILL_CHART_PROPERTIES::onExportTemplate(), and DIALOG_DRILL_CHART_PROPERTIES::TransferDataToWindow().
|
inline |
Definition at line 140 of file drill_chart_template.h.
References m_columns.
|
inline |
Definition at line 145 of file drill_chart_template.h.
References m_precision.
Referenced by PCB_DRILL_CHART::ApplyTemplate(), PCB_IO_KICAD_SEXPR::format(), and DIALOG_DRILL_CHART_PROPERTIES::onImportTemplate().
|
inline |
Definition at line 148 of file drill_chart_template.h.
References m_showTotals.
Referenced by PCB_DRILL_CHART::ApplyTemplate(), PCB_IO_KICAD_SEXPR::format(), and DIALOG_DRILL_CHART_PROPERTIES::onImportTemplate().
|
inline |
Definition at line 142 of file drill_chart_template.h.
References m_units.
Referenced by PCB_DRILL_CHART::ApplyTemplate(), PCB_IO_KICAD_SEXPR::format(), and DIALOG_DRILL_CHART_PROPERTIES::onImportTemplate().
| bool DRILL_CHART_TEMPLATE::LoadFromFile | ( | const wxString & | aPath, |
| wxString * | aError ) |
Definition at line 319 of file drill_chart_template.cpp.
References _, DRILL_CHART_TEMPLATE(), DrillChartAlignFromToken(), DrillChartColumnFromToken(), DrillChartUnitsFromToken(), DRILL_CHART_COLUMN::m_Align, m_columns, DRILL_CHART_COLUMN::m_Heading, DRILL_CHART_COLUMN::m_Id, m_name, m_precision, m_showTotals, m_units, m_version, DRILL_CHART_COLUMN::m_Width, and ValidateDrillChartColumns().
Referenced by DIALOG_DRILL_CHART_PROPERTIES::onImportTemplate().
|
static |
Definition at line 129 of file drill_chart_template.cpp.
References Columns(), DRILL_CHART_TEMPLATE(), DrillChartDefaultColumn(), and SetName().
Referenced by PCB_IO_KICAD_SEXPR::format(), DIALOG_DRILL_CHART_PROPERTIES::onResetColumns(), PCB_IO_KICAD_SEXPR_PARSER::parsePCB_DRILL_CHART(), PCB_DRILL_CHART::PCB_DRILL_CHART(), and DIALOG_DRILL_CHART_PROPERTIES::TransferDataToWindow().
| 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 263 of file drill_chart_template.cpp.
References _, DrillChartAlignToken(), DrillChartColumnToken(), DrillChartUnitsToken(), m_columns, m_name, m_precision, m_showTotals, m_units, and m_version.
Referenced by DIALOG_DRILL_CHART_PROPERTIES::onExportTemplate().
|
inline |
Definition at line 137 of file drill_chart_template.h.
References m_name.
Referenced by MakeDefault(), and DIALOG_DRILL_CHART_PROPERTIES::onExportTemplate().
|
inline |
Definition at line 146 of file drill_chart_template.h.
References m_precision.
Referenced by DIALOG_DRILL_CHART_PROPERTIES::onExportTemplate().
|
inline |
Definition at line 149 of file drill_chart_template.h.
References m_showTotals.
Referenced by DIALOG_DRILL_CHART_PROPERTIES::onExportTemplate().
|
inline |
Definition at line 143 of file drill_chart_template.h.
References m_units.
Referenced by DIALOG_DRILL_CHART_PROPERTIES::onExportTemplate().
|
private |
Definition at line 169 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 166 of file drill_chart_template.h.
Referenced by LoadFromFile(), SaveToFile(), and SetName().
|
private |
Definition at line 171 of file drill_chart_template.h.
Referenced by DRILL_CHART_TEMPLATE(), GetPrecision(), LoadFromFile(), SaveToFile(), and SetPrecision().
|
private |
Definition at line 172 of file drill_chart_template.h.
Referenced by DRILL_CHART_TEMPLATE(), GetShowTotals(), LoadFromFile(), SaveToFile(), and SetShowTotals().
|
private |
Definition at line 170 of file drill_chart_template.h.
Referenced by DRILL_CHART_TEMPLATE(), GetUnits(), LoadFromFile(), SaveToFile(), and SetUnits().
|
private |
Definition at line 167 of file drill_chart_template.h.
Referenced by DRILL_CHART_TEMPLATE(), LoadFromFile(), and SaveToFile().