|
KiCad PCB EDA Suite
|
Grouping rules and symbol assignments, shared by reference so a chart and its map can never disagree about which symbol means which hole. More...
#include <drill_symbol_profile.h>
Public Member Functions | |
| DRILL_SYMBOL_PROFILE () | |
| const KIID & | Uuid () const |
| void | SetUuid (const KIID &aUuid) |
| const wxString & | GetName () const |
| void | SetName (const wxString &aName) |
| bool | IsGroupedBy (DRILL_GROUP_KEY aKey) const |
| void | SetGroupedBy (DRILL_GROUP_KEY aKey, bool aOn) |
| const std::set< DRILL_GROUP_KEY > & | GroupKeys () const |
| DRILL_MARK_POLICY | GetMarkPolicy () const |
| void | SetMarkPolicy (DRILL_MARK_POLICY aPolicy) |
| int | GetSymbolSize () const |
| void | SetSymbolSize (int aSize) |
| int | GetSymbolWidth () const |
| void | SetSymbolWidth (int aWidth) |
| bool | GetFreezeAssignments () const |
| void | SetFreezeAssignments (bool aFreeze) |
| std::string | GroupKeyString (const DRILL_OPERATION &aOperation) const |
| Stable identity for a group under the currently enabled keys. | |
| const std::map< std::string, DRILL_SYMBOL_ASSIGNMENT > & | Assignments () const |
| const DRILL_SYMBOL_ASSIGNMENT * | GetAssignment (const std::string &aKey) const |
| void | SetAssignment (const std::string &aKey, const DRILL_SYMBOL_ASSIGNMENT &aAssignment) |
| void | ClearAssignments () |
| Assignments whose key no longer matches any hole are kept, so deleting and restoring a hole size does not shuffle the chart. | |
| bool | operator== (const DRILL_SYMBOL_PROFILE &aOther) const |
| uint64_t | Fingerprint () const |
| Cheap value used to notice an edit. | |
Private Attributes | |
| KIID | m_uuid |
| wxString | m_name |
| std::set< DRILL_GROUP_KEY > | m_groupBy |
| DRILL_MARK_POLICY | m_markPolicy |
| int | m_symbolSize |
| int | m_symbolWidth |
| bool | m_freezeAssignments |
| std::map< std::string, DRILL_SYMBOL_ASSIGNMENT > | m_assignments |
Grouping rules and symbol assignments, shared by reference so a chart and its map can never disagree about which symbol means which hole.
Definition at line 85 of file drill_symbol_profile.h.
| DRILL_SYMBOL_PROFILE::DRILL_SYMBOL_PROFILE | ( | ) |
Definition at line 27 of file drill_symbol_profile.cpp.
References m_freezeAssignments, m_groupBy, m_markPolicy, m_symbolSize, m_symbolWidth, OPERATION, pcbIUScale, PLATING, POST_MACHINING, SHAPES_THEN_LETTERS, SIZE_GRP, SLOT, and SPAN.
Referenced by operator==().
|
inline |
Definition at line 121 of file drill_symbol_profile.h.
References m_assignments.
Referenced by BOOST_AUTO_TEST_CASE(), and PCB_IO_KICAD_SEXPR::formatDrillSymbolProfile().
|
inline |
Assignments whose key no longer matches any hole are kept, so deleting and restoring a hole size does not shuffle the chart.
Definition at line 130 of file drill_symbol_profile.h.
References m_assignments.
| uint64_t DRILL_SYMBOL_PROFILE::Fingerprint | ( | ) | const |
Cheap value used to notice an edit.
Not stored, so it need not be stable across builds.
Definition at line 116 of file drill_symbol_profile.cpp.
References m_assignments, m_freezeAssignments, m_groupBy, m_markPolicy, m_symbolSize, and m_symbolWidth.
Referenced by BOARD::DrillSymbolCache().
| const DRILL_SYMBOL_ASSIGNMENT * DRILL_SYMBOL_PROFILE::GetAssignment | ( | const std::string & | aKey | ) | const |
Definition at line 48 of file drill_symbol_profile.cpp.
References m_assignments.
Referenced by AssignDrillSymbols(), DIALOG_DRILL_GROUPS::commitDetail(), and operator==().
|
inline |
Definition at line 109 of file drill_symbol_profile.h.
References m_freezeAssignments.
Referenced by AssignDrillSymbols(), PCB_IO_KICAD_SEXPR::formatDrillSymbolProfile(), PANEL_SETUP_DRILL_CHART::loadSettings(), and DIALOG_DRILL_GROUPS::Reload().
|
inline |
Definition at line 100 of file drill_symbol_profile.h.
References m_markPolicy.
Referenced by AssignDrillSymbols(), PCB_IO_KICAD_SEXPR::formatDrillSymbolProfile(), and PANEL_SETUP_DRILL_CHART::loadSettings().
|
inline |
Definition at line 93 of file drill_symbol_profile.h.
References m_name.
Referenced by PCB_IO_KICAD_SEXPR::formatDrillSymbolProfile(), and DIALOG_DRILL_GROUPS::Reload().
|
inline |
Definition at line 103 of file drill_symbol_profile.h.
References m_symbolSize.
Referenced by KIGFX::PCB_PAINTER::drawChartSymbols(), PCB_IO_KICAD_SEXPR::formatDrillSymbolProfile(), PANEL_SETUP_DRILL_CHART::loadSettings(), and BRDITEMS_PLOTTER::PlotChartSymbols().
|
inline |
Definition at line 106 of file drill_symbol_profile.h.
References m_symbolWidth.
Referenced by KIGFX::PCB_PAINTER::draw(), KIGFX::PCB_PAINTER::drawChartSymbols(), KIGFX::PCB_PAINTER::drawDrillMarks(), PCB_IO_KICAD_SEXPR::formatDrillSymbolProfile(), PCB_DRILL_MAP::GetSymbolExtent(), PANEL_SETUP_DRILL_CHART::loadSettings(), BRDITEMS_PLOTTER::PlotChartSymbols(), and BRDITEMS_PLOTTER::PlotDrillSymbols().
|
inline |
Definition at line 98 of file drill_symbol_profile.h.
References m_groupBy.
Referenced by PCB_IO_KICAD_SEXPR::formatDrillSymbolProfile(), and DIALOG_DRILL_CHART_PROPERTIES::TransferDataFromWindow().
| std::string DRILL_SYMBOL_PROFILE::GroupKeyString | ( | const DRILL_OPERATION & | aOperation | ) | const |
Stable identity for a group under the currently enabled keys.
Built from nanometre integers and copper ordinals rather than layer names, so renaming a layer or switching display units cannot silently reassign a symbol. The leading version lets a later key-format change migrate instead of resetting.
Definition at line 63 of file drill_symbol_profile.cpp.
References CopperLayerToOrdinal(), HOLE_FUNCTION, IsGroupedBy(), DRILL_POST_MACHINING::m_Angle, DRILL_OPERATION::m_Attribute, DRILL_OPERATION::m_BackPostMachining, DRILL_OPERATION::m_BottomCovered, DRILL_OPERATION::m_BottomLayer, DRILL_OPERATION::m_BottomPlugged, DRILL_OPERATION::m_BottomTented, DRILL_OPERATION::m_Capped, DRILL_POST_MACHINING::m_Depth, DRILL_OPERATION::m_Diameter, DRILL_OPERATION::m_Filled, DRILL_OPERATION::m_FrontPostMachining, DRILL_OPERATION::m_IsSlot, DRILL_OPERATION::m_Kind, DRILL_POST_MACHINING::m_Mode, DRILL_OPERATION::m_NotPlated, DRILL_POST_MACHINING::m_Size, DRILL_OPERATION::m_SizeXY, DRILL_OPERATION::m_TopCovered, DRILL_OPERATION::m_TopLayer, DRILL_OPERATION::m_TopPlugged, DRILL_OPERATION::m_TopTented, OPERATION, PLATING, POST_MACHINING, PROTECTION, SIZE_GRP, SLOT, SPAN, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by BRDITEMS_PLOTTER::PlotDrillSymbols(), and ResolveDrillSymbolsByItem().
|
inline |
Definition at line 96 of file drill_symbol_profile.h.
References m_groupBy.
Referenced by GroupKeyString(), and PANEL_SETUP_DRILL_CHART::loadSettings().
| bool DRILL_SYMBOL_PROFILE::operator== | ( | const DRILL_SYMBOL_PROFILE & | aOther | ) | const |
Definition at line 160 of file drill_symbol_profile.cpp.
References DRILL_SYMBOL_PROFILE(), GetAssignment(), m_assignments, DRILL_SYMBOL_ASSIGNMENT::m_Description, m_freezeAssignments, m_groupBy, DRILL_SYMBOL_ASSIGNMENT::m_Letter, DRILL_SYMBOL_ASSIGNMENT::m_MarkMode, m_markPolicy, m_name, DRILL_SYMBOL_ASSIGNMENT::m_ShapeIndex, m_symbolSize, and m_symbolWidth.
| void DRILL_SYMBOL_PROFILE::SetAssignment | ( | const std::string & | aKey, |
| const DRILL_SYMBOL_ASSIGNMENT & | aAssignment ) |
Definition at line 56 of file drill_symbol_profile.cpp.
References m_assignments.
Referenced by AssignDrillSymbols(), DIALOG_DRILL_GROUPS::commitDetail(), and PCB_IO_KICAD_SEXPR_PARSER::parseDrillSymbolProfile().
|
inline |
Definition at line 110 of file drill_symbol_profile.h.
References m_freezeAssignments.
Referenced by DIALOG_DRILL_GROUPS::onFreezeChanged(), PCB_IO_KICAD_SEXPR_PARSER::parseDrillSymbolProfile(), and PANEL_SETUP_DRILL_CHART::TransferDataFromWindow().
| void DRILL_SYMBOL_PROFILE::SetGroupedBy | ( | DRILL_GROUP_KEY | aKey, |
| bool | aOn ) |
Definition at line 39 of file drill_symbol_profile.cpp.
References m_groupBy.
Referenced by PCB_IO_KICAD_SEXPR_PARSER::parseDrillSymbolProfile(), DIALOG_DRILL_CHART_PROPERTIES::TransferDataFromWindow(), and PANEL_SETUP_DRILL_CHART::TransferDataFromWindow().
|
inline |
Definition at line 101 of file drill_symbol_profile.h.
References m_markPolicy.
Referenced by PCB_IO_KICAD_SEXPR_PARSER::parseDrillSymbolProfile(), and PANEL_SETUP_DRILL_CHART::TransferDataFromWindow().
|
inline |
Definition at line 94 of file drill_symbol_profile.h.
References m_name.
Referenced by PCB_IO_KICAD_SEXPR_PARSER::parseDrillSymbolProfile().
|
inline |
Definition at line 104 of file drill_symbol_profile.h.
References m_symbolSize.
Referenced by BOOST_AUTO_TEST_CASE(), PCB_IO_KICAD_SEXPR_PARSER::parseDrillSymbolProfile(), and PANEL_SETUP_DRILL_CHART::TransferDataFromWindow().
|
inline |
Definition at line 107 of file drill_symbol_profile.h.
References m_symbolWidth.
Referenced by PCB_IO_KICAD_SEXPR_PARSER::parseDrillSymbolProfile(), and PANEL_SETUP_DRILL_CHART::TransferDataFromWindow().
|
inline |
Definition at line 91 of file drill_symbol_profile.h.
References m_uuid.
|
inline |
Definition at line 90 of file drill_symbol_profile.h.
References m_uuid.
|
private |
Definition at line 148 of file drill_symbol_profile.h.
Referenced by Assignments(), ClearAssignments(), Fingerprint(), GetAssignment(), operator==(), and SetAssignment().
|
private |
Definition at line 146 of file drill_symbol_profile.h.
Referenced by DRILL_SYMBOL_PROFILE(), Fingerprint(), GetFreezeAssignments(), operator==(), and SetFreezeAssignments().
|
private |
Definition at line 142 of file drill_symbol_profile.h.
Referenced by DRILL_SYMBOL_PROFILE(), Fingerprint(), GroupKeys(), IsGroupedBy(), operator==(), and SetGroupedBy().
|
private |
Definition at line 143 of file drill_symbol_profile.h.
Referenced by DRILL_SYMBOL_PROFILE(), Fingerprint(), GetMarkPolicy(), operator==(), and SetMarkPolicy().
|
private |
Definition at line 141 of file drill_symbol_profile.h.
Referenced by GetName(), operator==(), and SetName().
|
private |
Definition at line 144 of file drill_symbol_profile.h.
Referenced by DRILL_SYMBOL_PROFILE(), Fingerprint(), GetSymbolSize(), operator==(), and SetSymbolSize().
|
private |
Definition at line 145 of file drill_symbol_profile.h.
Referenced by DRILL_SYMBOL_PROFILE(), Fingerprint(), GetSymbolWidth(), operator==(), and SetSymbolWidth().
|
private |
Definition at line 140 of file drill_symbol_profile.h.