|
KiCad PCB EDA Suite
|
#include <fields_data_model.h>
Public Types | |
| enum | SCOPE : int { SCOPE_ALL = 0 , SCOPE_SHEET , SCOPE_SHEET_RECURSIVE } |
Public Member Functions | |
| FIELDS_EDITOR_GRID_DATA_MODEL (const SCH_REFERENCE_LIST &aSymbolsList, wxGridCellAttr *aURLEditor) | |
| ~FIELDS_EDITOR_GRID_DATA_MODEL () override | |
| void | AddColumn (const wxString &aFieldName, const wxString &aLabel, bool aAddedByUser) |
| void | RemoveColumn (int aCol) |
| void | RenameColumn (int aCol, const wxString &newName) |
| void | MoveColumn (int aCol, int aNewPos) |
| int | GetNumberRows () override |
| int | GetNumberCols () override |
| void | SetColLabelValue (int aCol, const wxString &aLabel) override |
| wxString | GetColLabelValue (int aCol) override |
| wxString | GetColFieldName (int aCol) |
| int | GetFieldNameCol (const wxString &aFieldName) const |
| std::vector< BOM_FIELD > | GetFieldsOrdered () |
| void | SetFieldsOrder (const std::vector< wxString > &aNewOrder) |
| bool | IsEmptyCell (int aRow, int aCol) override |
| wxString | GetValue (int aRow, int aCol) override |
| wxString | GetResolvedValue (int aRow, int aCol) |
| wxGridCellAttr * | GetAttr (int aRow, int aCol, wxGridCellAttr::wxAttrKind aKind) override |
| wxString | GetValue (const DATA_MODEL_ROW &group, int aCol, const wxString &refDelimiter=wxT(", "), const wxString &refRangDelimiter=wxT("-"), bool resolveVars=false, bool listMixedValues=false) |
| wxString | GetExportValue (int aRow, int aCol, const wxString &refDelimiter, const wxString &refRangeDelimiter) |
| void | SetValue (int aRow, int aCol, const wxString &aValue) override |
| GROUP_TYPE | GetRowFlags (int aRow) |
| std::vector< SCH_REFERENCE > | GetRowReferences (int aRow) const |
| bool | ColIsReference (int aCol) |
| bool | ColIsValue (int aCol) |
| bool | ColIsQuantity (int aCol) |
| bool | ColIsItemNumber (int aCol) |
| bool | ColIsAttribute (int aCol) |
| bool | IsExpanderColumn (int aCol) const override |
| GROUP_TYPE | GetGroupType (int aRow) const override |
| void | SetSorting (int aCol, bool ascending) |
| int | GetSortCol () |
| bool | GetSortAsc () |
| void | EnableRebuilds () |
| void | DisableRebuilds () |
| void | RebuildRows () |
| void | ExpandRow (int aRow) |
| void | CollapseRow (int aRow) |
| void | ExpandCollapseRow (int aRow) |
| void | CollapseForSort () |
| void | ExpandAfterSort () |
| void | ApplyData (SCH_COMMIT &aCommit, TEMPLATES &aTemplateFieldnames, const wxString &aVariantName) |
| bool | IsEdited () |
| int | GetDataWidth (int aCol) |
| void | SetFilter (const wxString &aFilter) |
| const wxString & | GetFilter () |
| void | SetScope (SCOPE aScope) |
| SCOPE | GetScope () |
| void | SetPath (const SCH_SHEET_PATH &aPath) |
| const SCH_SHEET_PATH & | GetPath () |
| void | SetGroupingEnabled (bool group) |
| bool | GetGroupingEnabled () |
| void | SetIncludeExcludedFromBOM (bool include) |
| bool | GetIncludeExcludedFromBOM () |
| void | SetExcludeDNP (bool exclude) |
| bool | GetExcludeDNP () |
| void | SetGroupColumn (int aCol, bool group) |
| bool | GetGroupColumn (int aCol) |
| void | SetShowColumn (int aCol, bool show) |
| bool | GetShowColumn (int aCol) |
| void | ApplyBomPreset (const BOM_PRESET &preset) |
| BOM_PRESET | GetBomSettings () |
| wxString | Export (const BOM_FMT_PRESET &settings) |
| void | AddReferences (const SCH_REFERENCE_LIST &aRefs) |
| void | RemoveReferences (const SCH_REFERENCE_LIST &aRefs) |
| void | RemoveSymbol (const SCH_SYMBOL &aSymbol) |
| void | UpdateReferences (const SCH_REFERENCE_LIST &aRefs) |
| bool | HasUndoStateSerialization () const override |
| Optional identity-based serialization for the host dialog's Ctrl+Z/Ctrl+Y. | |
| wxString | SerializeUndoState () const override |
| void | RestoreUndoState (const wxString &aState) override |
| bool | DeleteRows (size_t aPosition=0, size_t aNumRows=1) override |
| const SCH_REFERENCE_LIST & | GetReferenceList () const |
| void | SetCurrentVariant (const wxString &aVariantName) |
| Set the current variant name for highlighting purposes. | |
| const wxString & | GetCurrentVariant () const |
| void | SetVariantNames (const std::vector< wxString > &aVariantNames) |
| const std::vector< wxString > & | GetVariantNames () const |
| void | SetColAttr (wxGridCellAttr *aAttr, int aCol) override |
| void | Clear () override |
Static Public Attributes | |
| static const wxString | QUANTITY_VARIABLE = wxS( "${QUANTITY}" ) |
| static const wxString | ITEM_NUMBER_VARIABLE = wxS( "${ITEM_NUMBER}" ) |
Protected Member Functions | |
| wxGridCellAttr * | enhanceAttr (wxGridCellAttr *aInputAttr, int aRow, int aCol, wxGridCellAttr::wxAttrKind aKind) |
Protected Attributes | |
| SCH_REFERENCE_LIST | m_symbolsList |
| The flattened by hierarchy list of symbols. | |
| bool | m_edited |
| int | m_sortColumn |
| bool | m_sortAscending |
| wxString | m_filter |
| SCOPE | m_scope |
| SCH_SHEET_PATH | m_path |
| bool | m_groupingEnabled |
| bool | m_excludeDNP |
| bool | m_includeExcluded |
| bool | m_rebuildsEnabled |
| wxGridCellAttr * | m_urlEditor |
| wxGridCellRenderer * | m_textVarRenderer |
| Renderer for cells with text variable references. | |
| wxString | m_currentVariant |
| Current variant name for highlighting. | |
| std::vector< wxString > | m_variantNames |
| Variant names for multi-variant DNP filtering. | |
| std::vector< DATA_MODEL_COL > | m_cols |
| std::vector< DATA_MODEL_ROW > | m_rows |
| std::map< KIID_PATH, std::map< wxString, wxString > > | m_dataStore |
| std::map< int, wxGridCellAttr * > | m_colAttrs |
Private Member Functions | |
| bool | unitMatch (const SCH_REFERENCE &lhRef, const SCH_REFERENCE &rhRef) |
| bool | groupMatch (const SCH_REFERENCE &lhRef, const SCH_REFERENCE &rhRef) |
| bool | isAttribute (const wxString &aFieldName) |
| bool | attributeInheritedFromSheet (const SCH_REFERENCE &aRef, const wxString &aAttributeName) const |
| bool | rowAttributeInheritedFromSheet (const DATA_MODEL_ROW &aGroup, int aCol) |
| wxString | getAttributeValue (const SCH_REFERENCE &aRef, const wxString &aAttributeName, const wxString &aVariantNames) |
| wxString | getDefaultFieldValue (const SCH_REFERENCE &aRef, const wxString &aFieldName) |
| Get the default (non-variant) value for a field. | |
| bool | setAttributeValue (SCH_REFERENCE &aRef, const wxString &aAttributeName, const wxString &aValue, const wxString &aVariantName=wxEmptyString) |
| Set the attribute value. | |
| wxString | getFieldShownText (const SCH_REFERENCE &aRef, const wxString &aFieldName) |
| void | Sort () |
| void | updateDataStoreSymbolField (const SCH_REFERENCE &aSymbolRef, const wxString &aFieldName) |
Static Private Member Functions | |
| static bool | cmp (const DATA_MODEL_ROW &lhGroup, const DATA_MODEL_ROW &rhGroup, FIELDS_EDITOR_GRID_DATA_MODEL *dataModel, int sortCol, bool ascending) |
Definition at line 71 of file fields_data_model.h.
| enum FIELDS_EDITOR_GRID_DATA_MODEL::SCOPE : int |
| Enumerator | |
|---|---|
| SCOPE_ALL | |
| SCOPE_SHEET | |
| SCOPE_SHEET_RECURSIVE | |
Definition at line 74 of file fields_data_model.h.
|
inline |
Definition at line 81 of file fields_data_model.h.
References m_edited, m_excludeDNP, m_groupingEnabled, m_includeExcluded, m_rebuildsEnabled, m_scope, m_sortAscending, m_sortColumn, m_symbolsList, m_textVarRenderer, m_urlEditor, and SCOPE_ALL.
Referenced by cmp().
|
inlineoverride |
Definition at line 97 of file fields_data_model.h.
References m_textVarRenderer, and m_urlEditor.
| void FIELDS_EDITOR_GRID_DATA_MODEL::AddColumn | ( | const wxString & | aFieldName, |
| const wxString & | aLabel, | ||
| bool | aAddedByUser ) |
Definition at line 100 of file fields_data_model.cpp.
References GetFieldNameCol(), m_cols, m_symbolsList, and updateDataStoreSymbolField().
Referenced by ApplyBomPreset(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), and EESCHEMA_JOBS_HANDLER::JobExportBom().
| void FIELDS_EDITOR_GRID_DATA_MODEL::AddReferences | ( | const SCH_REFERENCE_LIST & | aRefs | ) |
Definition at line 1500 of file fields_data_model.cpp.
References SCHEMATIC::ConvertKIIDsToRefs(), SCH_SYMBOL::GetFields(), m_cols, m_dataStore, m_symbolsList, makeDataStoreKey(), name, and SCH_ITEM::Schematic().
| void FIELDS_EDITOR_GRID_DATA_MODEL::ApplyBomPreset | ( | const BOM_PRESET & | preset | ) |
Definition at line 1341 of file fields_data_model.cpp.
References AddColumn(), BOM_PRESET::excludeDNP, BOM_PRESET::fieldsOrdered, BOM_PRESET::filterString, GetCanonicalFieldName(), GetFieldNameCol(), BOM_FIELD::groupBy, BOM_PRESET::groupSymbols, BOM_PRESET::includeExcludedFromBOM, BOM_FIELD::label, m_cols, BOM_FIELD::name, RebuildRows(), REFERENCE, SetColLabelValue(), SetExcludeDNP(), SetFieldsOrder(), SetFilter(), SetGroupColumn(), SetGroupingEnabled(), SetIncludeExcludedFromBOM(), SetShowColumn(), SetSorting(), BOM_FIELD::show, BOM_PRESET::sortAsc, and BOM_PRESET::sortField.
Referenced by EESCHEMA_JOBS_HANDLER::JobExportBom().
| void FIELDS_EDITOR_GRID_DATA_MODEL::ApplyData | ( | SCH_COMMIT & | aCommit, |
| TEMPLATES & | aTemplateFieldnames, | ||
| const wxString & | aVariantName ) |
Definition at line 1195 of file fields_data_model.cpp.
References SCH_SYMBOL::AddField(), SCHEMATIC::ConvertRefsToKIIDs(), SCH_SYMBOL::GetField(), TEMPLATES::GetFieldName(), GetFieldNameCol(), SCH_SYMBOL::GetFields(), SCH_FIELD::GetId(), SCH_SYMBOL::GetPosition(), SCH_FIELD::GetText(), EDA_TEXT::GetTextAngle(), isAttribute(), IsGeneratedField(), SCH_ITEM::IsPrivate(), kv, m_cols, m_dataStore, m_edited, m_symbolsList, makeDataStoreKey(), COMMIT::Modified(), REFERENCE, SCH_ITEM::Schematic(), setAttributeValue(), SCH_ITEM::SetPrivate(), SCH_FIELD::SetText(), EDA_TEXT::SetTextAngle(), EDA_TEXT::SetTextPos(), EDA_TEXT::SetVisible(), and USER.
|
private |
Definition at line 841 of file fields_data_model.cpp.
References SCH_REFERENCE::GetSheetPath(), m_currentVariant, and path.
Referenced by GetValue(), and rowAttributeInheritedFromSheet().
|
staticprivate |
Definition at line 625 of file fields_data_model.cpp.
References ColIsReference(), FIELDS_EDITOR_GRID_DATA_MODEL(), GetNumberCols(), GetValue(), DATA_MODEL_ROW::m_Refs, StrNumCmp(), and ValueStringCompare().
| bool FIELDS_EDITOR_GRID_DATA_MODEL::ColIsAttribute | ( | int | aCol | ) |
Definition at line 618 of file fields_data_model.cpp.
References isAttribute(), and m_cols.
Referenced by GetValue(), rowAttributeInheritedFromSheet(), and SetValue().
| bool FIELDS_EDITOR_GRID_DATA_MODEL::ColIsItemNumber | ( | int | aCol | ) |
Definition at line 611 of file fields_data_model.cpp.
References ITEM_NUMBER_VARIABLE, and m_cols.
Referenced by GetAttr(), and GetValue().
| bool FIELDS_EDITOR_GRID_DATA_MODEL::ColIsQuantity | ( | int | aCol | ) |
Definition at line 604 of file fields_data_model.cpp.
References m_cols, and QUANTITY_VARIABLE.
Referenced by GetAttr(), and GetValue().
| bool FIELDS_EDITOR_GRID_DATA_MODEL::ColIsReference | ( | int | aCol | ) |
Definition at line 590 of file fields_data_model.cpp.
References GetCanonicalFieldName(), m_cols, and REFERENCE.
Referenced by cmp(), GetAttr(), GetDataWidth(), GetValue(), and SetValue().
| bool FIELDS_EDITOR_GRID_DATA_MODEL::ColIsValue | ( | int | aCol | ) |
Definition at line 597 of file fields_data_model.cpp.
References GetCanonicalFieldName(), m_cols, and VALUE.
| void FIELDS_EDITOR_GRID_DATA_MODEL::CollapseForSort | ( | ) |
Definition at line 1172 of file fields_data_model.cpp.
References CollapseRow(), GROUP_COLLAPSED_DURING_SORT, GROUP_EXPANDED, and m_rows.
Referenced by Sort().
| void FIELDS_EDITOR_GRID_DATA_MODEL::CollapseRow | ( | int | aRow | ) |
Definition at line 1141 of file fields_data_model.cpp.
References GROUP_COLLAPSED, and m_rows.
Referenced by CollapseForSort(), and ExpandCollapseRow().
|
override |
Definition at line 1657 of file fields_data_model.cpp.
References m_dataStore, and m_rows.
| void FIELDS_EDITOR_GRID_DATA_MODEL::DisableRebuilds | ( | ) |
Definition at line 962 of file fields_data_model.cpp.
References m_rebuildsEnabled.
| void FIELDS_EDITOR_GRID_DATA_MODEL::EnableRebuilds | ( | ) |
Definition at line 956 of file fields_data_model.cpp.
References m_rebuildsEnabled.
|
protectedinherited |
Definition at line 43 of file wx_grid.cpp.
Referenced by FIELDS_EDITOR_GRID_DATA_MODEL::GetAttr(), FIELDS_GRID_TABLE::GetAttr(), LAYERS_GRID_TABLE::GetAttr(), LIB_TABLE_GRID_DATA_MODEL::GetAttr(), PCB_FIELDS_GRID_TABLE::GetAttr(), SCH_PIN_TABLE_DATA_MODEL::GetAttr(), and GetAttr().
| void FIELDS_EDITOR_GRID_DATA_MODEL::ExpandAfterSort | ( | ) |
Definition at line 1185 of file fields_data_model.cpp.
References ExpandRow(), GROUP_COLLAPSED_DURING_SORT, and m_rows.
Referenced by Sort().
| void FIELDS_EDITOR_GRID_DATA_MODEL::ExpandCollapseRow | ( | int | aRow | ) |
Definition at line 1161 of file fields_data_model.cpp.
References CollapseRow(), ExpandRow(), group, GROUP_COLLAPSED, GROUP_EXPANDED, and m_rows.
| void FIELDS_EDITOR_GRID_DATA_MODEL::ExpandRow | ( | int | aRow | ) |
Definition at line 1099 of file fields_data_model.cpp.
References GROUP_EXPANDED, m_rows, and unitMatch().
Referenced by ExpandAfterSort(), and ExpandCollapseRow().
| wxString FIELDS_EDITOR_GRID_DATA_MODEL::Export | ( | const BOM_FMT_PRESET & | settings | ) |
Definition at line 1421 of file fields_data_model.cpp.
References BOM_FMT_PRESET::fieldDelimiter, GetExportValue(), GetRowFlags(), BOM_FMT_PRESET::includeByteOrderMark, BOM_FMT_PRESET::keepLineBreaks, BOM_FMT_PRESET::keepTabs, m_cols, m_rows, BOM_FMT_PRESET::refDelimiter, BOM_FMT_PRESET::refRangeDelimiter, and BOM_FMT_PRESET::stringDelimiter.
Referenced by EESCHEMA_JOBS_HANDLER::JobExportBom().
|
override |
Definition at line 266 of file fields_data_model.cpp.
References ColIsItemNumber(), ColIsQuantity(), ColIsReference(), DATASHEET, WX_GRID_TABLE_BASE::enhanceAttr(), WX_GRID_TABLE_BASE::GetAttr(), GetCanonicalFieldName(), GetColFieldName(), getDefaultFieldValue(), SCH_REFERENCE::GetSheetPath(), SCH_REFERENCE::GetSymbol(), GetValue(), IsURL(), WX_GRID_TABLE_BASE::m_colAttrs, m_cols, m_currentVariant, m_dataStore, DATA_MODEL_ROW::m_Refs, m_rows, m_textVarRenderer, m_urlEditor, and SCH_SHEET_PATH::Path().
|
private |
Definition at line 819 of file fields_data_model.cpp.
References SCH_REFERENCE::GetSymbolDNP(), SCH_REFERENCE::GetSymbolExcludedFromBoard(), SCH_REFERENCE::GetSymbolExcludedFromBOM(), SCH_REFERENCE::GetSymbolExcludedFromPosFiles(), and SCH_REFERENCE::GetSymbolExcludedFromSim().
Referenced by getDefaultFieldValue(), and updateDataStoreSymbolField().
| BOM_PRESET FIELDS_EDITOR_GRID_DATA_MODEL::GetBomSettings | ( | ) |
Definition at line 1402 of file fields_data_model.cpp.
References BOM_PRESET::excludeDNP, BOM_PRESET::fieldsOrdered, BOM_PRESET::filterString, GetColFieldName(), GetExcludeDNP(), GetFieldsOrdered(), GetFilter(), GetGroupingEnabled(), GetIncludeExcludedFromBOM(), GetNumberCols(), GetSortAsc(), GetSortCol(), BOM_PRESET::groupSymbols, BOM_PRESET::includeExcludedFromBOM, BOM_PRESET::readOnly, BOM_PRESET::sortAsc, and BOM_PRESET::sortField.
|
inline |
Definition at line 145 of file fields_data_model.h.
References m_cols.
Referenced by GetAttr(), GetBomSettings(), and GetDataWidth().
|
inlineoverride |
Definition at line 139 of file fields_data_model.h.
References m_cols.
|
inline |
Definition at line 301 of file fields_data_model.h.
References m_currentVariant.
| int FIELDS_EDITOR_GRID_DATA_MODEL::GetDataWidth | ( | int | aCol | ) |
Definition at line 1314 of file fields_data_model.cpp.
References ColIsReference(), GetColFieldName(), GetNumberRows(), KIUI::GetTextSize(), GetValue(), m_dataStore, m_symbolsList, makeDataStoreKey(), and text.
|
private |
Get the default (non-variant) value for a field.
This retrieves the field value as it would appear without any variant override.
| aRef | The symbol reference. |
| aFieldName | The name of the field. |
Definition at line 876 of file fields_data_model.cpp.
References SCHEMATIC::ConvertKIIDsToRefs(), getAttributeValue(), SCH_SYMBOL::GetField(), SCH_REFERENCE::GetSheetPath(), SCH_REFERENCE::GetSymbol(), isAttribute(), IsGeneratedField(), and SCH_ITEM::Schematic().
Referenced by GetAttr().
|
inline |
Definition at line 247 of file fields_data_model.h.
References m_excludeDNP.
Referenced by GetBomSettings().
|
inline |
Definition at line 171 of file fields_data_model.h.
References GetValue(), and m_rows.
Referenced by Export().
| int FIELDS_EDITOR_GRID_DATA_MODEL::GetFieldNameCol | ( | const wxString & | aFieldName | ) | const |
Definition at line 194 of file fields_data_model.cpp.
References FieldNamesAreDuplicates(), and m_cols.
Referenced by AddColumn(), ApplyBomPreset(), ApplyData(), groupMatch(), and EESCHEMA_JOBS_HANDLER::JobExportBom().
|
private |
Definition at line 779 of file fields_data_model.cpp.
References ExpandTextVars(), SCH_SYMBOL::GetField(), SCH_REFERENCE::GetSheetPath(), SCH_FIELD::GetShownText(), SCH_REFERENCE::GetSymbol(), IsGeneratedField(), SCH_ITEM::IsPrivate(), m_currentVariant, path, and SCH_SYMBOL::ResolveTextVar().
Referenced by GetValue(), and groupMatch().
| std::vector< BOM_FIELD > FIELDS_EDITOR_GRID_DATA_MODEL::GetFieldsOrdered | ( | ) |
Definition at line 206 of file fields_data_model.cpp.
References m_cols.
Referenced by GetBomSettings(), and EESCHEMA_JOBS_HANDLER::JobExportBom().
|
inline |
Definition at line 228 of file fields_data_model.h.
References m_filter.
Referenced by GetBomSettings().
|
inline |
Definition at line 255 of file fields_data_model.h.
References m_cols.
|
inline |
Definition at line 237 of file fields_data_model.h.
References m_groupingEnabled.
Referenced by GetBomSettings().
|
inlineoverridevirtual |
Reimplemented from WX_GRID_TABLE_BASE.
Definition at line 194 of file fields_data_model.h.
References GROUP_TYPE, and m_rows.
|
inline |
Definition at line 244 of file fields_data_model.h.
References m_includeExcluded.
Referenced by GetBomSettings().
|
inlineoverride |
Definition at line 131 of file fields_data_model.h.
References m_cols.
Referenced by cmp(), and GetBomSettings().
|
inlineoverride |
Definition at line 130 of file fields_data_model.h.
References m_rows.
Referenced by GetDataWidth().
|
inline |
Definition at line 234 of file fields_data_model.h.
References m_path.
|
inline |
Definition at line 290 of file fields_data_model.h.
References m_symbolsList.
Referenced by EESCHEMA_JOBS_HANDLER::JobExportBom().
| wxString FIELDS_EDITOR_GRID_DATA_MODEL::GetResolvedValue | ( | int | aRow, |
| int | aCol ) |
Definition at line 260 of file fields_data_model.cpp.
References GetValue(), and m_rows.
|
inline |
Definition at line 179 of file fields_data_model.h.
References GROUP_TYPE, and m_rows.
Referenced by Export().
|
inline |
Definition at line 181 of file fields_data_model.h.
References m_rows.
|
inline |
Definition at line 231 of file fields_data_model.h.
References m_scope.
|
inline |
Definition at line 267 of file fields_data_model.h.
References m_cols.
|
inline |
Definition at line 207 of file fields_data_model.h.
References m_sortAscending.
Referenced by GetBomSettings().
|
inline |
Definition at line 206 of file fields_data_model.h.
References m_sortColumn.
Referenced by GetBomSettings().
| wxString FIELDS_EDITOR_GRID_DATA_MODEL::GetValue | ( | const DATA_MODEL_ROW & | group, |
| int | aCol, | ||
| const wxString & | refDelimiter = wxT( ", " ), | ||
| const wxString & | refRangDelimiter = wxT( "-" ), | ||
| bool | resolveVars = false, | ||
| bool | listMixedValues = false ) |
Definition at line 421 of file fields_data_model.cpp.
References attributeInheritedFromSheet(), ColIsAttribute(), ColIsItemNumber(), ColIsQuantity(), ColIsReference(), ExpandTextVars(), getFieldShownText(), SCH_REFERENCE::GetSheetPath(), SCH_REFERENCE::GetSymbol(), group, INDETERMINATE_STATE, IsGeneratedField(), m_cols, m_currentVariant, m_dataStore, makeDataStoreKey(), SCH_SYMBOL::ResolveTextVar(), and SCH_REFERENCE_LIST::Shorthand().
|
override |
Definition at line 252 of file fields_data_model.cpp.
References GetValue(), IsExpanderColumn(), m_rows, and rowAttributeInheritedFromSheet().
Referenced by cmp(), GetAttr(), GetDataWidth(), GetExportValue(), GetResolvedValue(), and GetValue().
|
inline |
Definition at line 304 of file fields_data_model.h.
References m_variantNames.
|
private |
Definition at line 712 of file fields_data_model.cpp.
References GetCanonicalFieldName(), GetFieldNameCol(), getFieldShownText(), SCH_REFERENCE::GetRef(), SCH_REFERENCE::GetSheetPath(), SCH_REFERENCE::GetSymbol(), IsGeneratedField(), m_cols, m_dataStore, makeDataStoreKey(), and REFERENCE.
Referenced by RebuildRows().
|
inlineoverridevirtual |
Optional identity-based serialization for the host dialog's Ctrl+Z/Ctrl+Y.
The dialog's generic grid undo snapshots cells by (row, col) position, which is wrong for tables whose rows can regroup/sort/reorder. A table that returns true here is asked to serialize and restore its own state by stable identity instead.
Reimplemented from WX_GRID_TABLE_BASE.
Definition at line 284 of file fields_data_model.h.
|
private |
Definition at line 811 of file fields_data_model.cpp.
Referenced by ApplyData(), ColIsAttribute(), getDefaultFieldValue(), and updateDataStoreSymbolField().
|
inline |
Definition at line 223 of file fields_data_model.h.
References m_edited.
|
inlineoverride |
Definition at line 156 of file fields_data_model.h.
|
overridevirtual |
Reimplemented from WX_GRID_TABLE_BASE.
Definition at line 239 of file fields_data_model.cpp.
References m_cols.
Referenced by GetValue().
|
inline |
Definition at line 110 of file fields_data_model.h.
References m_cols.
| void FIELDS_EDITOR_GRID_DATA_MODEL::RebuildRows | ( | ) |
Definition at line 968 of file fields_data_model.cpp.
References CTX_SEARCH, EDA_COMBINED_MATCHER::Find(), SCH_SHEET_PATH::GetDNP(), SCH_SHEET_PATH::GetExcludedFromBOM(), SCH_REFERENCE::GetFullRef(), SCH_REFERENCE::GetSheetPath(), SCH_REFERENCE::GetSymbol(), GROUP_COLLAPSED, GROUP_SINGLETON, groupMatch(), SCH_SHEET_PATH::IsContainedWithin(), SCH_REFERENCE::IsMultiUnit(), m_currentVariant, m_excludeDNP, m_filter, m_groupingEnabled, m_includeExcluded, m_path, m_rebuildsEnabled, m_rows, m_scope, m_symbolsList, m_variantNames, SCH_ITEM::ResolveDNP(), SCH_ITEM::ResolveExcludedFromBOM(), Sort(), and unitMatch().
Referenced by ApplyBomPreset(), and RestoreUndoState().
| void FIELDS_EDITOR_GRID_DATA_MODEL::RemoveColumn | ( | int | aCol | ) |
Definition at line 153 of file fields_data_model.cpp.
References grid, m_cols, m_dataStore, m_symbolsList, and makeDataStoreKey().
| void FIELDS_EDITOR_GRID_DATA_MODEL::RemoveReferences | ( | const SCH_REFERENCE_LIST & | aRefs | ) |
Definition at line 1568 of file fields_data_model.cpp.
References index, m_dataStore, m_symbolsList, and makeDataStoreKey().
| void FIELDS_EDITOR_GRID_DATA_MODEL::RemoveSymbol | ( | const SCH_SYMBOL & | aSymbol | ) |
Definition at line 1538 of file fields_data_model.cpp.
References m_dataStore, m_symbolsList, and EDA_ITEM::m_Uuid.
| void FIELDS_EDITOR_GRID_DATA_MODEL::RenameColumn | ( | int | aCol, |
| const wxString & | newName ) |
Definition at line 174 of file fields_data_model.cpp.
References m_cols, m_dataStore, m_symbolsList, and makeDataStoreKey().
|
overridevirtual |
Reimplemented from WX_GRID_TABLE_BASE.
Definition at line 1632 of file fields_data_model.cpp.
References m_dataStore, m_edited, and RebuildRows().
|
private |
Definition at line 859 of file fields_data_model.cpp.
References attributeInheritedFromSheet(), ColIsAttribute(), m_cols, and DATA_MODEL_ROW::m_Refs.
Referenced by GetValue().
|
overridevirtual |
Reimplemented from WX_GRID_TABLE_BASE.
Definition at line 1612 of file fields_data_model.cpp.
References m_dataStore, and name.
|
private |
Set the attribute value.
| aReference | is a reference to the symbol to set the attribute. |
| aAttributeName | is the name of the symbol attribute. |
| aValue | is the value to set the attribute. |
| aVariantName | is an optional variant name to set the variant attribute. |
| true | if the symbol attribute value has changed. |
| false | if the symbol attribute has not changed. |
Definition at line 908 of file fields_data_model.cpp.
References SCH_REFERENCE::GetSymbolDNP(), SCH_REFERENCE::GetSymbolExcludedFromBoard(), SCH_REFERENCE::GetSymbolExcludedFromBOM(), SCH_REFERENCE::GetSymbolExcludedFromPosFiles(), SCH_REFERENCE::GetSymbolExcludedFromSim(), SCH_REFERENCE::SetSymbolDNP(), SCH_REFERENCE::SetSymbolExcludedFromBoard(), SCH_REFERENCE::SetSymbolExcludedFromBOM(), SCH_REFERENCE::SetSymbolExcludedFromPosFiles(), and SCH_REFERENCE::SetSymbolExcludedFromSim().
Referenced by ApplyData().
|
inlineoverrideinherited |
Definition at line 58 of file wx_grid.h.
References m_colAttrs.
|
inlineoverride |
Definition at line 133 of file fields_data_model.h.
References m_cols.
Referenced by ApplyBomPreset().
|
inline |
Set the current variant name for highlighting purposes.
When a variant is set, cells that differ from the default (non-variant) value will be highlighted.
| aVariantName | The name of the current variant, or empty string for default. |
Definition at line 300 of file fields_data_model.h.
References m_currentVariant.
Referenced by BOOST_FIXTURE_TEST_CASE(), and EESCHEMA_JOBS_HANDLER::JobExportBom().
|
inline |
Definition at line 246 of file fields_data_model.h.
References m_excludeDNP.
Referenced by ApplyBomPreset().
| void FIELDS_EDITOR_GRID_DATA_MODEL::SetFieldsOrder | ( | const std::vector< wxString > & | aNewOrder | ) |
Definition at line 217 of file fields_data_model.cpp.
References m_cols.
Referenced by ApplyBomPreset().
|
inline |
Definition at line 227 of file fields_data_model.h.
References m_filter.
Referenced by ApplyBomPreset().
|
inline |
Definition at line 249 of file fields_data_model.h.
Referenced by ApplyBomPreset().
|
inline |
Definition at line 236 of file fields_data_model.h.
References group, and m_groupingEnabled.
Referenced by ApplyBomPreset().
|
inline |
Definition at line 243 of file fields_data_model.h.
References m_includeExcluded.
Referenced by ApplyBomPreset().
|
inline |
Definition at line 233 of file fields_data_model.h.
References m_path.
|
inline |
Definition at line 230 of file fields_data_model.h.
References m_scope.
|
inline |
Definition at line 261 of file fields_data_model.h.
References m_cols.
Referenced by ApplyBomPreset().
|
inline |
Definition at line 199 of file fields_data_model.h.
References m_cols, m_sortAscending, and m_sortColumn.
Referenced by ApplyBomPreset().
|
override |
Definition at line 534 of file fields_data_model.cpp.
References ColIsAttribute(), ColIsReference(), SCH_REFERENCE::GetSheetPath(), SCH_REFERENCE::GetSymbol(), GROUP_SINGLETON, INDETERMINATE_STATE, IsGeneratedField(), SCH_SHEET_PATH::IsSharedPath(), m_cols, m_dataStore, m_edited, DATA_MODEL_ROW::m_Flag, DATA_MODEL_ROW::m_Refs, m_rows, and makeDataStoreKey().
|
inline |
Definition at line 303 of file fields_data_model.h.
References m_variantNames.
Referenced by EESCHEMA_JOBS_HANDLER::JobExportBom().
|
private |
Definition at line 667 of file fields_data_model.cpp.
References CollapseForSort(), ExpandAfterSort(), and m_rows.
Referenced by RebuildRows().
|
private |
Definition at line 702 of file fields_data_model.cpp.
References SCH_REFERENCE::GetRef(), and SCH_REFERENCE::GetRefNumber().
Referenced by ExpandRow(), and RebuildRows().
|
private |
Definition at line 113 of file fields_data_model.cpp.
References SCHEMATIC::ConvertKIIDsToRefs(), getAttributeValue(), SCH_SYMBOL::GetField(), SCH_REFERENCE::GetSheetPath(), SCH_REFERENCE::GetSymbol(), isAttribute(), IsGeneratedField(), m_currentVariant, m_dataStore, makeDataStoreKey(), and SCH_ITEM::Schematic().
Referenced by AddColumn(), and UpdateReferences().
| void FIELDS_EDITOR_GRID_DATA_MODEL::UpdateReferences | ( | const SCH_REFERENCE_LIST & | aRefs | ) |
Definition at line 1584 of file fields_data_model.cpp.
References m_cols, m_symbolsList, and updateDataStoreSymbolField().
Referenced by EESCHEMA_JOBS_HANDLER::JobExportBom().
|
static |
Definition at line 104 of file fields_data_model.h.
Referenced by ColIsItemNumber(), EESCHEMA_JOBS_HANDLER::JobExportBom(), and DIALOG_SYMBOL_FIELDS_TABLE::LoadFieldNames().
|
protectedinherited |
Definition at line 100 of file wx_grid.h.
Referenced by FIELDS_EDITOR_GRID_DATA_MODEL::GetAttr(), LIB_FIELDS_EDITOR_GRID_DATA_MODEL::GetAttr(), GetAttr(), LIB_FIELDS_EDITOR_GRID_DATA_MODEL::RemoveColumn(), SetColAttr(), and ~WX_GRID_TABLE_BASE().
|
protected |
Definition at line 381 of file fields_data_model.h.
Referenced by AddColumn(), AddReferences(), ApplyBomPreset(), ApplyData(), ColIsAttribute(), ColIsItemNumber(), ColIsQuantity(), ColIsReference(), ColIsValue(), Export(), GetAttr(), GetColFieldName(), GetColLabelValue(), GetFieldNameCol(), GetFieldsOrdered(), GetGroupColumn(), GetNumberCols(), GetShowColumn(), GetValue(), groupMatch(), IsExpanderColumn(), MoveColumn(), RemoveColumn(), RenameColumn(), rowAttributeInheritedFromSheet(), SetColLabelValue(), SetFieldsOrder(), SetGroupColumn(), SetShowColumn(), SetSorting(), SetValue(), and UpdateReferences().
|
protected |
Current variant name for highlighting.
Definition at line 378 of file fields_data_model.h.
Referenced by attributeInheritedFromSheet(), GetAttr(), GetCurrentVariant(), getFieldShownText(), GetValue(), RebuildRows(), SetCurrentVariant(), and updateDataStoreSymbolField().
|
protected |
Definition at line 388 of file fields_data_model.h.
Referenced by AddReferences(), ApplyData(), DeleteRows(), GetAttr(), GetDataWidth(), GetValue(), groupMatch(), RemoveColumn(), RemoveReferences(), RemoveSymbol(), RenameColumn(), RestoreUndoState(), SerializeUndoState(), SetValue(), and updateDataStoreSymbolField().
|
protected |
Definition at line 366 of file fields_data_model.h.
Referenced by ApplyData(), FIELDS_EDITOR_GRID_DATA_MODEL(), IsEdited(), RestoreUndoState(), and SetValue().
|
protected |
Definition at line 373 of file fields_data_model.h.
Referenced by FIELDS_EDITOR_GRID_DATA_MODEL(), GetExcludeDNP(), RebuildRows(), and SetExcludeDNP().
|
protected |
Definition at line 369 of file fields_data_model.h.
Referenced by GetFilter(), RebuildRows(), and SetFilter().
|
protected |
Definition at line 372 of file fields_data_model.h.
Referenced by FIELDS_EDITOR_GRID_DATA_MODEL(), GetGroupingEnabled(), RebuildRows(), and SetGroupingEnabled().
|
protected |
Definition at line 374 of file fields_data_model.h.
Referenced by FIELDS_EDITOR_GRID_DATA_MODEL(), GetIncludeExcludedFromBOM(), RebuildRows(), and SetIncludeExcludedFromBOM().
|
protected |
Definition at line 371 of file fields_data_model.h.
Referenced by GetPath(), RebuildRows(), and SetPath().
|
protected |
Definition at line 375 of file fields_data_model.h.
Referenced by DisableRebuilds(), EnableRebuilds(), FIELDS_EDITOR_GRID_DATA_MODEL(), and RebuildRows().
|
protected |
Definition at line 382 of file fields_data_model.h.
Referenced by CollapseForSort(), CollapseRow(), DeleteRows(), ExpandAfterSort(), ExpandCollapseRow(), ExpandRow(), Export(), GetAttr(), GetExportValue(), GetGroupType(), GetNumberRows(), GetResolvedValue(), GetRowFlags(), GetRowReferences(), GetValue(), RebuildRows(), SetValue(), and Sort().
|
protected |
Definition at line 370 of file fields_data_model.h.
Referenced by FIELDS_EDITOR_GRID_DATA_MODEL(), GetScope(), RebuildRows(), and SetScope().
|
protected |
Definition at line 368 of file fields_data_model.h.
Referenced by FIELDS_EDITOR_GRID_DATA_MODEL(), GetSortAsc(), and SetSorting().
|
protected |
Definition at line 367 of file fields_data_model.h.
Referenced by FIELDS_EDITOR_GRID_DATA_MODEL(), GetSortCol(), and SetSorting().
|
protected |
The flattened by hierarchy list of symbols.
Definition at line 365 of file fields_data_model.h.
Referenced by AddColumn(), AddReferences(), ApplyData(), FIELDS_EDITOR_GRID_DATA_MODEL(), GetDataWidth(), GetReferenceList(), RebuildRows(), RemoveColumn(), RemoveReferences(), RemoveSymbol(), RenameColumn(), and UpdateReferences().
|
protected |
Renderer for cells with text variable references.
Definition at line 377 of file fields_data_model.h.
Referenced by FIELDS_EDITOR_GRID_DATA_MODEL(), GetAttr(), and ~FIELDS_EDITOR_GRID_DATA_MODEL().
|
protected |
Definition at line 376 of file fields_data_model.h.
Referenced by FIELDS_EDITOR_GRID_DATA_MODEL(), GetAttr(), and ~FIELDS_EDITOR_GRID_DATA_MODEL().
|
protected |
Variant names for multi-variant DNP filtering.
Definition at line 379 of file fields_data_model.h.
Referenced by GetVariantNames(), RebuildRows(), and SetVariantNames().
|
static |
Definition at line 103 of file fields_data_model.h.
Referenced by ColIsQuantity(), EESCHEMA_JOBS_HANDLER::JobExportBom(), and DIALOG_SYMBOL_FIELDS_TABLE::LoadFieldNames().