KiCad PCB EDA Suite
Loading...
Searching...
No Matches
SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL Class Reference

#include <symbol_fields_data_model.h>

Inheritance diagram for SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL:
FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE > FIELDS_TABLE_DATA_MODEL_BASE WX_GRID_TABLE_BASE

Public Types

enum  SCOPE : int { SCOPE_ALL = 0 , SCOPE_SHEET , SCOPE_SHEET_RECURSIVE , SCOPE_SELECTION }
 

Public Member Functions

 SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL (const SCH_REFERENCE_LIST &aSymbolsList)
 
wxGridCellAttr * GetAttr (int aRow, int aCol, wxGridCellAttr::wxAttrKind aKind) override
 
void SetValue (int aRow, int aCol, const wxString &aValue) override
 
void ClearCell (int aRow, int aCol) override
 Clears the field from the data store, rather than setting its value to an empty string.
 
void RevertRow (int aRow) override
 Go through and revert all the fields in the row to their live values from the item (symbol/footprint/etc).
 
void RebuildRows () override
 
void ApplyData (SCH_COMMIT &aCommit, TEMPLATES &aTemplateFieldnames, const wxString &aVariantName)
 
void SetScope (SCOPE aScope)
 
SCOPE GetScope ()
 
void SetPath (const SCH_SHEET_PATH &aPath)
 
const SCH_SHEET_PATHGetPath ()
 
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 DeleteRows (size_t aPosition=0, size_t aNumRows=1) override
 
const SCH_REFERENCE_LISTGetReferenceList () const
 
void AddColumn (const wxString &aFieldName, const wxString &aLabel, bool aAddedByUser) override
 
bool IsCellClear (int aRow, int aCol) override
 Returns true if the cell is not present in the data store for any item in the row, not just empty.
 
bool IsCellEdited (int aRow, int aCol) override
 Returns true if the cell has been modified from the live value in any item in the row (symbol/footprint/etc).
 
int GetNumberRows () override
 
ROW_STATE GetRowState (int aRow) const override
 
std::vector< KIID_PATHGetRowItemKeys (int aRow) const override
 Return the stable data-store keys of every item represented by a row.
 
std::vector< SCH_REFERENCEGetRowReferences (int aRow) const
 
void ExpandRow (int aRow)
 
void CollapseRow (int aRow)
 
void ExpandCollapseRow (int aRow) override
 
void CollapseForSort ()
 
void ExpandAfterSort ()
 
wxString GetGroupedValue (const DATA_MODEL_ROW< SCH_REFERENCE > &aRow, int aCol, const wxString &refDelimiter=wxT(", "), const wxString &refRangeDelimiter=wxT("-"), bool resolveVars=false, bool listMixedValues=false)
 
wxString GetValue (int aRow, int aCol) override
 
wxString GetResolvedValue (int aRow, int aCol) override
 
wxString GetExportValue (int aRow, int aCol, const wxString &refDelimiter, const wxString &refRangeDelimiter) override
 
bool IsCellReadOnly (int aRow, int aCol) override
 
bool IsEdited ()
 
void MoveColumn (int aCol, int aNewPos)
 
void RemoveColumn (int aCol)
 
void RenameColumn (int aCol, const wxString &newName)
 
int GetNumberCols () override
 
void SetColLabelValue (int aCol, const wxString &aLabel) override
 
wxString GetColLabelValue (int aCol) override
 
wxString GetColFieldName (int aCol)
 
int GetColDataWidth (int aCol)
 
int GetFieldNameCol (const wxString &aFieldName) const
 
std::vector< BOM_FIELDGetFieldsOrdered ()
 
void SetFieldsOrder (const std::vector< wxString > &aNewOrder)
 
bool IsEmptyCell (int aRow, int aCol) override
 
bool ColIsReference (int aCol) const
 
bool ColIsQuantity (int aCol) const
 
bool ColIsItemNumber (int aCol) const
 
bool ColIsValue (int aCol) const
 
bool ColIsFootprint (int aCol) const
 
bool ColIsAttribute (int aCol) const
 
bool ColIsItemProperty (int aCol) const
 
bool ColIsComputed (int aCol) const
 
virtual bool ColIsItemIdentifier (int aCol) const
 Reference for symbol/fields tables, lib_id for lib tables.
 
virtual bool ColIsReadOnly (int aCol) const
 
bool IsExpanderColumn (int aCol) const override
 
void SetSorting (int aCol, bool aAscending)
 
int GetSortCol ()
 
bool GetSortAsc ()
 
void EnableRebuilds ()
 
void DisableRebuilds ()
 
void SetFilter (const wxString &aFilter)
 
const wxString & GetFilter ()
 
void SetFilterScope (BOM_FILTER_SCOPE aScope)
 
BOM_FILTER_SCOPE GetFilterScope () const
 
void SetSelectionItems (const std::unordered_set< KIID_PATH > &aItems)
 
void ClearSelectionItems ()
 
void SetGroupingEnabled (bool aGroup)
 
bool GetGroupingEnabled ()
 
void SetIncludeExcludedFromBOM (bool aInclude)
 
bool GetIncludeExcludedFromBOM ()
 
void SetExcludeDNP (bool aExclude)
 
bool GetExcludeDNP ()
 
void SetGroupColumn (int aCol, bool aGroup)
 
bool GetGroupColumn (int aCol)
 
void SetShowColumn (int aCol, bool aShow)
 
bool GetShowColumn (int aCol)
 
void ApplyBomPreset (const BOM_PRESET &aPreset)
 
BOM_PRESET GetBomSettings ()
 
wxString Export (const BOM_FMT_PRESET &aSettings)
 
bool CanClearCell (int aRow, int aCol)
 
bool IsRowEdited (int aRow)
 Return true if any cell in the row has been edited.
 
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
 
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
 
void SetColAttr (wxGridCellAttr *aAttr, int aCol) override
 
void Clear () override
 

Static Public Attributes

static const wxString QUANTITY_VARIABLE
 
static const wxString ITEM_NUMBER_VARIABLE
 

Protected Member Functions

bool MatchesFilter (const SCH_REFERENCE &aItem, const wxString &aReference, EDA_COMBINED_MATCHER &aMatcher)
 
bool allRowItemsHaveAttributeForcedOnBySheet (const DATA_MODEL_ROW< SCH_REFERENCE > &aRow, int aCol)
 
bool cmpRows (const DATA_MODEL_ROW< SCH_REFERENCE > &lhRow, const DATA_MODEL_ROW< SCH_REFERENCE > &rhRow, int aSortCol, bool aAscending)
 
virtual bool cmpRowItems (const SCH_REFERENCE &lhItem, const SCH_REFERENCE &rhItem)
 
bool groupMatch (const SCH_REFERENCE &lhItem, const SCH_REFERENCE &rhItem)
 
void Sort ()
 
const std::map< wxString, wxString > & getStoredFields (const SCH_REFERENCE &aItem) const
 Returns all stored fields for an item without creating a data-store entry.
 
bool getStoredFieldValue (const SCH_REFERENCE &aItem, const wxString &aFieldName, wxString &aValue) const
 Gets the stored value of the field from the data store, not from the live item, e.g.
 
void setStoredFieldValue (const SCH_REFERENCE &aItem, const wxString &aFieldName, const wxString &aValue)
 Creates or updates a field in the data store.
 
void ensureStoredFieldPresent (const SCH_REFERENCE &aItem, const wxString &aFieldName)
 Makes sure a field is at least marked present-but-empty without changing its value if it has one already.
 
void clearStoredField (const SCH_REFERENCE &aItem, const wxString &aFieldName)
 Clears a field, e.g.
 
bool fieldIsModified (const SCH_REFERENCE &aItem, const wxString &aFieldName)
 Compares the live value of the field to the stored value in the data store.
 
void updateDataStoreItemFieldFromLive (const SCH_REFERENCE &aItem, const wxString &aFieldName)
 Updates the data store with the current value of the field from the live item.
 
void initializeDataStoreItemField (const SCH_REFERENCE &aItem, const DATA_MODEL_COL &aCol)
 Puts the live value of the field in the data store, correctly handling a missing field in the souce item as empty or not-present based on whether the col was added by the user.
 
void initializeDataStoreItem (const SCH_REFERENCE &aItem)
 Initializes every column in the data store for a newly added (or refreshed) item.
 
virtual bool fieldIsAttribute (const wxString &aFieldName) const
 
virtual bool fieldIsItemProperty (const wxString &aFieldName) const
 
virtual wxString getAttributeResolvedValue (const wxString &aFieldName, bool aValue) const
 
bool cellUsesResolvedTextRenderer (int aRow, int aCol)
 
void applyResolvedTextRenderer (wxGridCellAttr *aAttr, bool aApplyTint)
 
bool cellUsesUrlEditor (int aRow, int aCol)
 
wxGridCellAttr * cloneUrlEditorAttr ()
 
wxGridCellAttr * applyCellDecorations (wxGridCellAttr *aAttr, int aRow, int aCol)
 
wxGridCellAttr * applyFieldPresenceRenderer (wxGridCellAttr *aAttr, int aRow, int aCol)
 
void commitPendingGridChanges ()
 
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.
 
SCOPE m_scope
 
SCH_SHEET_PATH m_path
 
std::vector< DATA_MODEL_ROW< SCH_REFERENCE > > m_rows
 
wxGridCellRenderer * m_stripedRenderer
 
wxGridCellRenderer * m_resolvedTextRenderer
 
bool m_edited
 
int m_sortColumn
 
bool m_sortAscending
 
wxString m_filter
 
BOM_FILTER_SCOPE m_filterScope
 
bool m_groupingEnabled
 
bool m_excludeDNP
 
bool m_includeExcluded
 
bool m_rebuildsEnabled
 Items included by the user selection scope.
 
std::unordered_set< KIID_PATHm_selectionItems
 
wxString m_currentVariant
 Current variant name for highlighting.
 
std::vector< wxString > m_variantNames
 Variant names for multi-variant DNP filtering.
 
std::vector< DATA_MODEL_COLm_cols
 
std::map< KIID_PATH, std::map< wxString, wxString > > m_dataStore
 
std::map< int, wxGridCellAttr * > m_colAttrs
 

Private Member Functions

bool unitMatch (const SCH_REFERENCE &lhItem, const SCH_REFERENCE &rhItem) override
 
bool storageIsSharedAcrossPaths (const wxString &aFieldName) const
 Test whether a field's storage is common to every sheet path that reaches a symbol.
 
bool attributeForcedOnBySheet (const SCH_REFERENCE &aRef, const wxString &aAttributeName) const override
 Sheets can force all the symbols in them to have certain attributes on, like DNP.
 
wxString getAttributeValue (const SCH_REFERENCE &aRef, const wxString &aAttributeName, const wxString &aVariantNames)
 
bool getLiveFieldValueForVariant (const SCH_REFERENCE &aRef, const wxString &aFieldName, const wxString &aVariantName, wxString &aValue)
 
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.
 
bool getLiveFieldValue (const SCH_REFERENCE &aRef, const wxString &aFieldName, wxString &aValue) override
 Gets the current value of the field from the live item, e.g.
 
std::vector< SCH_REFERENCEgetAllItems () const override
 
wxString getFieldResolvedLiveValue (const SCH_REFERENCE &aRef, const wxString &aFieldName) override
 Explicitly bypasses the data store's field values and retries them from the item's current field value on the editing canvas.
 
wxString resolveTextVars (const SCH_REFERENCE &aRef, const wxString &aText) override
 
KIID_PATH getDataStoreKey (const SCH_REFERENCE &aItem) const override
 Create a unique key for the data store by combining the KIID_PATH from the SCH_SHEET_PATH with the symbol's UUID.
 
wxString getItemIdentifier (const SCH_REFERENCE &aItem) const override
 

Detailed Description

Definition at line 43 of file symbol_fields_data_model.h.

Member Enumeration Documentation

◆ SCOPE

Enumerator
SCOPE_ALL 
SCOPE_SHEET 
SCOPE_SHEET_RECURSIVE 
SCOPE_SELECTION 

Definition at line 46 of file symbol_fields_data_model.h.

Constructor & Destructor Documentation

◆ SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL()

SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL ( const SCH_REFERENCE_LIST & aSymbolsList)
inline

Definition at line 54 of file symbol_fields_data_model.h.

References m_scope, m_symbolsList, and SCOPE_ALL.

Member Function Documentation

◆ AddColumn()

void FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::AddColumn ( const wxString & aFieldName,
const wxString & aLabel,
bool aAddedByUser )
inlineoverridevirtualinherited

Implements FIELDS_TABLE_DATA_MODEL_BASE.

Definition at line 360 of file fields_table_data_model.h.

◆ AddReferences()

◆ allRowItemsHaveAttributeForcedOnBySheet()

bool FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::allRowItemsHaveAttributeForcedOnBySheet ( const DATA_MODEL_ROW< SCH_REFERENCE > & aRow,
int aCol )
inlineprotectedinherited

Definition at line 817 of file fields_table_data_model.h.

◆ ApplyBomPreset()

void FIELDS_TABLE_DATA_MODEL_BASE::ApplyBomPreset ( const BOM_PRESET & aPreset)
inherited

Definition at line 216 of file fields_table_data_model.cpp.

◆ applyCellDecorations()

wxGridCellAttr * FIELDS_TABLE_DATA_MODEL_BASE::applyCellDecorations ( wxGridCellAttr * aAttr,
int aRow,
int aCol )
protectedinherited

◆ ApplyData()

◆ applyFieldPresenceRenderer()

wxGridCellAttr * FIELDS_TABLE_DATA_MODEL_BASE::applyFieldPresenceRenderer ( wxGridCellAttr * aAttr,
int aRow,
int aCol )
protectedinherited

Definition at line 278 of file fields_table_data_model.cpp.

◆ applyResolvedTextRenderer()

void FIELDS_TABLE_DATA_MODEL_BASE::applyResolvedTextRenderer ( wxGridCellAttr * aAttr,
bool aApplyTint )
protectedinherited

◆ attributeForcedOnBySheet()

bool SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::attributeForcedOnBySheet ( const SCH_REFERENCE & aItem,
const wxString & aAttributeName ) const
overrideprivatevirtual

Sheets can force all the symbols in them to have certain attributes on, like DNP.

They can't force them off.

Returns true if the attribute is forced on by a sheet

Reimplemented from FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >.

Definition at line 421 of file symbol_fields_data_model.cpp.

References SCH_REFERENCE::GetSheetPath(), FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::m_currentVariant, and path.

◆ CanClearCell()

bool FIELDS_TABLE_DATA_MODEL_BASE::CanClearCell ( int aRow,
int aCol )
inherited

◆ cellUsesResolvedTextRenderer()

bool FIELDS_TABLE_DATA_MODEL_BASE::cellUsesResolvedTextRenderer ( int aRow,
int aCol )
protectedinherited

◆ cellUsesUrlEditor()

bool FIELDS_TABLE_DATA_MODEL_BASE::cellUsesUrlEditor ( int aRow,
int aCol )
protectedinherited

◆ Clear()

void WX_GRID_TABLE_BASE::Clear ( )
inlineoverrideinherited

Definition at line 97 of file wx_grid.h.

◆ ClearCell()

void SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::ClearCell ( int aRow,
int aCol )
overridevirtual

◆ ClearSelectionItems()

void FIELDS_TABLE_DATA_MODEL_BASE::ClearSelectionItems ( )
inlineinherited

Definition at line 195 of file fields_table_data_model.h.

◆ clearStoredField()

void FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::clearStoredField ( const SCH_REFERENCE & aItem,
const wxString & aFieldName )
inlineprotectedinherited

Clears a field, e.g.

marks in not-present (as opposed to an empty string)

Definition at line 1054 of file fields_table_data_model.h.

Referenced by SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::ClearCell().

◆ cloneUrlEditorAttr()

wxGridCellAttr * FIELDS_TABLE_DATA_MODEL_BASE::cloneUrlEditorAttr ( )
protectedinherited

◆ cmpRowItems()

virtual bool FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::cmpRowItems ( const SCH_REFERENCE & lhItem,
const SCH_REFERENCE & rhItem )
inlineprotectedvirtualinherited

Definition at line 878 of file fields_table_data_model.h.

◆ cmpRows()

bool FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::cmpRows ( const DATA_MODEL_ROW< SCH_REFERENCE > & lhRow,
const DATA_MODEL_ROW< SCH_REFERENCE > & rhRow,
int aSortCol,
bool aAscending )
inlineprotectedinherited

Definition at line 833 of file fields_table_data_model.h.

◆ ColIsAttribute()

bool FIELDS_TABLE_DATA_MODEL_BASE::ColIsAttribute ( int aCol) const
inherited

Definition at line 161 of file fields_table_data_model.cpp.

◆ ColIsComputed()

bool FIELDS_TABLE_DATA_MODEL_BASE::ColIsComputed ( int aCol) const
inherited

Definition at line 167 of file fields_table_data_model.cpp.

◆ ColIsFootprint()

bool FIELDS_TABLE_DATA_MODEL_BASE::ColIsFootprint ( int aCol) const
inherited

Definition at line 158 of file fields_table_data_model.cpp.

◆ ColIsItemIdentifier()

virtual bool FIELDS_TABLE_DATA_MODEL_BASE::ColIsItemIdentifier ( int aCol) const
inlinevirtualinherited

Reference for symbol/fields tables, lib_id for lib tables.

Definition at line 173 of file fields_table_data_model.h.

◆ ColIsItemNumber()

bool FIELDS_TABLE_DATA_MODEL_BASE::ColIsItemNumber ( int aCol) const
inherited

◆ ColIsItemProperty()

bool FIELDS_TABLE_DATA_MODEL_BASE::ColIsItemProperty ( int aCol) const
inherited

Definition at line 163 of file fields_table_data_model.cpp.

◆ ColIsQuantity()

bool FIELDS_TABLE_DATA_MODEL_BASE::ColIsQuantity ( int aCol) const
inherited

◆ ColIsReadOnly()

bool FIELDS_TABLE_DATA_MODEL_BASE::ColIsReadOnly ( int aCol) const
virtualinherited

Definition at line 175 of file fields_table_data_model.cpp.

◆ ColIsReference()

bool FIELDS_TABLE_DATA_MODEL_BASE::ColIsReference ( int aCol) const
inherited

◆ ColIsValue()

bool FIELDS_TABLE_DATA_MODEL_BASE::ColIsValue ( int aCol) const
inherited

Definition at line 157 of file fields_table_data_model.cpp.

◆ CollapseForSort()

void FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::CollapseForSort ( )
inlineinherited

Definition at line 572 of file fields_table_data_model.h.

◆ CollapseRow()

void FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::CollapseRow ( int aRow)
inlineinherited

Definition at line 543 of file fields_table_data_model.h.

◆ commitPendingGridChanges()

void FIELDS_TABLE_DATA_MODEL_BASE::commitPendingGridChanges ( )
protectedinherited

Definition at line 281 of file fields_table_data_model.cpp.

◆ DeleteRows()

bool SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::DeleteRows ( size_t aPosition = 0,
size_t aNumRows = 1 )
override

◆ DisableRebuilds()

void FIELDS_TABLE_DATA_MODEL_BASE::DisableRebuilds ( )
inherited

Definition at line 186 of file fields_table_data_model.cpp.

◆ EnableRebuilds()

void FIELDS_TABLE_DATA_MODEL_BASE::EnableRebuilds ( )
inherited

Definition at line 185 of file fields_table_data_model.cpp.

◆ enhanceAttr()

wxGridCellAttr * WX_GRID_TABLE_BASE::enhanceAttr ( wxGridCellAttr * aInputAttr,
int aRow,
int aCol,
wxGridCellAttr::wxAttrKind aKind )
protectedinherited

Definition at line 104 of file wx_grid.cpp.

Referenced by SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::GetAttr().

◆ ensureStoredFieldPresent()

void FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::ensureStoredFieldPresent ( const SCH_REFERENCE & aItem,
const wxString & aFieldName )
inlineprotectedinherited

Makes sure a field is at least marked present-but-empty without changing its value if it has one already.

Definition at line 1046 of file fields_table_data_model.h.

Referenced by SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::SetValue().

◆ ExpandAfterSort()

void FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::ExpandAfterSort ( )
inlineinherited

Definition at line 585 of file fields_table_data_model.h.

◆ ExpandCollapseRow()

void FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::ExpandCollapseRow ( int aRow)
inlineoverridevirtualinherited

Implements FIELDS_TABLE_DATA_MODEL_BASE.

Definition at line 563 of file fields_table_data_model.h.

◆ ExpandRow()

void FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::ExpandRow ( int aRow)
inlineinherited

Definition at line 500 of file fields_table_data_model.h.

◆ Export()

wxString FIELDS_TABLE_DATA_MODEL_BASE::Export ( const BOM_FMT_PRESET & aSettings)
inherited

Definition at line 218 of file fields_table_data_model.cpp.

◆ fieldIsAttribute()

bool FIELDS_TABLE_DATA_MODEL_BASE::fieldIsAttribute ( const wxString & aFieldName) const
protectedvirtualinherited

◆ fieldIsItemProperty()

bool FIELDS_TABLE_DATA_MODEL_BASE::fieldIsItemProperty ( const wxString & aFieldName) const
protectedvirtualinherited

Definition at line 266 of file fields_table_data_model.cpp.

◆ fieldIsModified()

bool FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::fieldIsModified ( const SCH_REFERENCE & aItem,
const wxString & aFieldName )
inlineprotectedinherited

Compares the live value of the field to the stored value in the data store.

If they differ in presence or value then the field has been modified

Definition at line 1067 of file fields_table_data_model.h.

◆ getAllItems()

std::vector< SCH_REFERENCE > SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::getAllItems ( ) const
overrideprivatevirtual

Implements FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >.

Definition at line 321 of file symbol_fields_data_model.cpp.

References m_symbolsList.

◆ GetAttr()

wxGridCellAttr * SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::GetAttr ( int aRow,
int aCol,
wxGridCellAttr::wxAttrKind aKind )
override

◆ getAttributeResolvedValue()

wxString FIELDS_TABLE_DATA_MODEL_BASE::getAttributeResolvedValue ( const wxString & aFieldName,
bool aValue ) const
protectedvirtualinherited

Definition at line 269 of file fields_table_data_model.cpp.

◆ getAttributeValue()

wxString SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::getAttributeValue ( const SCH_REFERENCE & aRef,
const wxString & aAttributeName,
const wxString & aVariantNames )
private

◆ GetBomSettings()

BOM_PRESET FIELDS_TABLE_DATA_MODEL_BASE::GetBomSettings ( )
inherited

Definition at line 217 of file fields_table_data_model.cpp.

◆ GetColDataWidth()

int FIELDS_TABLE_DATA_MODEL_BASE::GetColDataWidth ( int aCol)
inherited

Definition at line 143 of file fields_table_data_model.cpp.

◆ GetColFieldName()

wxString FIELDS_TABLE_DATA_MODEL_BASE::GetColFieldName ( int aCol)
inherited

Definition at line 142 of file fields_table_data_model.cpp.

◆ GetColLabelValue()

wxString FIELDS_TABLE_DATA_MODEL_BASE::GetColLabelValue ( int aCol)
overrideinherited

Definition at line 141 of file fields_table_data_model.cpp.

◆ GetCurrentVariant()

const wxString & FIELDS_TABLE_DATA_MODEL_BASE::GetCurrentVariant ( ) const
inlineinherited

Definition at line 244 of file fields_table_data_model.h.

◆ getDataStoreKey()

KIID_PATH SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::getDataStoreKey ( const SCH_REFERENCE & aItem) const
overrideprivatevirtual

Create a unique key for the data store by combining the KIID_PATH from the SCH_SHEET_PATH with the symbol's UUID.

Returns
A KIID_PATH representing the full SCH_SHEET_PATH + symbol UUID.

Implements FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >.

Definition at line 44 of file symbol_fields_data_model.cpp.

References SCH_REFERENCE::GetSheetPath(), SCH_REFERENCE::GetSymbol(), EDA_ITEM::m_Uuid, SCH_SHEET_PATH::Path(), and path.

Referenced by RebuildRows(), and RemoveReferences().

◆ getDefaultFieldValue()

wxString SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::getDefaultFieldValue ( const SCH_REFERENCE & aRef,
const wxString & aFieldName )
private

Get the default (non-variant) value for a field.

This retrieves the field value as it would appear without any variant override.

Parameters
aRefThe symbol reference.
aFieldNameThe name of the field.
Returns
The default field value.

Definition at line 476 of file symbol_fields_data_model.cpp.

References getLiveFieldValueForVariant().

Referenced by GetAttr().

◆ GetExcludeDNP()

bool FIELDS_TABLE_DATA_MODEL_BASE::GetExcludeDNP ( )
inlineinherited

Definition at line 208 of file fields_table_data_model.h.

◆ GetExportValue()

wxString FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::GetExportValue ( int aRow,
int aCol,
const wxString & refDelimiter,
const wxString & refRangeDelimiter )
inlineoverridevirtualinherited

Implements FIELDS_TABLE_DATA_MODEL_BASE.

Definition at line 733 of file fields_table_data_model.h.

◆ GetFieldNameCol()

int FIELDS_TABLE_DATA_MODEL_BASE::GetFieldNameCol ( const wxString & aFieldName) const
inherited

Definition at line 144 of file fields_table_data_model.cpp.

◆ getFieldResolvedLiveValue()

wxString SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::getFieldResolvedLiveValue ( const SCH_REFERENCE & aItem,
const wxString & aFieldName )
overrideprivatevirtual

Explicitly bypasses the data store's field values and retries them from the item's current field value on the editing canvas.

Will also handle generated fields as necessary. Returns empty string for private/missing fields.

Example: BOM template provides ${DNP} as a field, but they symbol doesn't have the field.

Returns
Resolved display text for the field's live value from the canvas.

Implements FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >.

Definition at line 335 of file symbol_fields_data_model.cpp.

References SCH_SYMBOL::GetField(), SCH_REFERENCE::GetSheetPath(), SCH_FIELD::GetShownText(), SCH_REFERENCE::GetSymbol(), INTERNAL, IsGeneratedField(), SCH_ITEM::IsPrivate(), FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::m_currentVariant, path, SCH_SYMBOL::ResolveTextVar(), and ResolveTextVars().

◆ GetFieldsOrdered()

std::vector< BOM_FIELD > FIELDS_TABLE_DATA_MODEL_BASE::GetFieldsOrdered ( )
inherited

Definition at line 146 of file fields_table_data_model.cpp.

◆ GetFilter()

const wxString & FIELDS_TABLE_DATA_MODEL_BASE::GetFilter ( )
inlineinherited

Definition at line 190 of file fields_table_data_model.h.

◆ GetFilterScope()

BOM_FILTER_SCOPE FIELDS_TABLE_DATA_MODEL_BASE::GetFilterScope ( ) const
inlineinherited

Definition at line 192 of file fields_table_data_model.h.

◆ GetGroupColumn()

bool FIELDS_TABLE_DATA_MODEL_BASE::GetGroupColumn ( int aCol)
inherited

Definition at line 211 of file fields_table_data_model.cpp.

◆ GetGroupedValue()

wxString FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::GetGroupedValue ( const DATA_MODEL_ROW< SCH_REFERENCE > & aRow,
int aCol,
const wxString & refDelimiter = wxT( ", " ),
const wxString & refRangeDelimiter = wxT( "-" ),
bool resolveVars = false,
bool listMixedValues = false )
inlineinherited

Definition at line 594 of file fields_table_data_model.h.

◆ GetGroupingEnabled()

bool FIELDS_TABLE_DATA_MODEL_BASE::GetGroupingEnabled ( )
inlineinherited

Definition at line 198 of file fields_table_data_model.h.

◆ GetIncludeExcludedFromBOM()

bool FIELDS_TABLE_DATA_MODEL_BASE::GetIncludeExcludedFromBOM ( )
inlineinherited

Definition at line 205 of file fields_table_data_model.h.

◆ getItemIdentifier()

wxString SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::getItemIdentifier ( const SCH_REFERENCE & aItem) const
overrideprivatevirtual

◆ getLiveFieldValue()

bool SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::getLiveFieldValue ( const SCH_REFERENCE & aItem,
const wxString & aFieldName,
wxString & aValue )
overrideprivatevirtual

Gets the current value of the field from the live item, e.g.

from the symbol on the schematic.

Returns
True if the field is present in the live item, false if it is not present (and aValue will be empty).

Implements FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >.

Definition at line 313 of file symbol_fields_data_model.cpp.

References getLiveFieldValueForVariant(), and FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::m_currentVariant.

Referenced by AddReferences(), and RevertRow().

◆ getLiveFieldValueForVariant()

bool SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::getLiveFieldValueForVariant ( const SCH_REFERENCE & aRef,
const wxString & aFieldName,
const wxString & aVariantName,
wxString & aValue )
private

◆ GetNumberCols()

int FIELDS_TABLE_DATA_MODEL_BASE::GetNumberCols ( )
inlineoverrideinherited

Definition at line 138 of file fields_table_data_model.h.

◆ GetNumberRows()

int FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::GetNumberRows ( )
inlineoverrideinherited

Definition at line 445 of file fields_table_data_model.h.

◆ GetPath()

const SCH_SHEET_PATH & SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::GetPath ( )
inline

Definition at line 75 of file symbol_fields_data_model.h.

References m_path.

◆ GetReferenceList()

const SCH_REFERENCE_LIST & SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::GetReferenceList ( ) const
inline

Definition at line 84 of file symbol_fields_data_model.h.

References m_symbolsList.

Referenced by EESCHEMA_JOBS_HANDLER::JobExportBom().

◆ GetResolvedValue()

wxString FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::GetResolvedValue ( int aRow,
int aCol )
inlineoverridevirtualinherited

Implements FIELDS_TABLE_DATA_MODEL_BASE.

Definition at line 728 of file fields_table_data_model.h.

◆ GetRowItemKeys()

std::vector< KIID_PATH > FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::GetRowItemKeys ( int aRow) const
inlineoverridevirtualinherited

Return the stable data-store keys of every item represented by a row.

Implements FIELDS_TABLE_DATA_MODEL_BASE.

Definition at line 449 of file fields_table_data_model.h.

◆ GetRowReferences()

std::vector< SCH_REFERENCE > FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::GetRowReferences ( int aRow) const
inlineinherited

Definition at line 462 of file fields_table_data_model.h.

◆ GetRowState()

ROW_STATE FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::GetRowState ( int aRow) const
inlineoverridevirtualinherited

Reimplemented from WX_GRID_TABLE_BASE.

Definition at line 446 of file fields_table_data_model.h.

◆ GetScope()

SCOPE SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::GetScope ( )
inline

Definition at line 72 of file symbol_fields_data_model.h.

References m_scope.

◆ GetShowColumn()

bool FIELDS_TABLE_DATA_MODEL_BASE::GetShowColumn ( int aCol)
inherited

Definition at line 214 of file fields_table_data_model.cpp.

◆ GetSortAsc()

bool FIELDS_TABLE_DATA_MODEL_BASE::GetSortAsc ( )
inlineinherited

Definition at line 181 of file fields_table_data_model.h.

◆ GetSortCol()

int FIELDS_TABLE_DATA_MODEL_BASE::GetSortCol ( )
inlineinherited

Definition at line 180 of file fields_table_data_model.h.

◆ getStoredFields()

const std::map< wxString, wxString > & FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::getStoredFields ( const SCH_REFERENCE & aItem) const
inlineprotectedinherited

Returns all stored fields for an item without creating a data-store entry.

Definition at line 1001 of file fields_table_data_model.h.

Referenced by SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::ApplyData().

◆ getStoredFieldValue()

bool FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::getStoredFieldValue ( const SCH_REFERENCE & aItem,
const wxString & aFieldName,
wxString & aValue ) const
inlineprotectedinherited

Gets the stored value of the field from the data store, not from the live item, e.g.

from the symbol on the schematic.

Returns
True if the field is present in the data store, false if it is not present (and aValue will be empty).

Definition at line 1019 of file fields_table_data_model.h.

Referenced by SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::AddReferences(), SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::GetAttr(), SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::RevertRow(), and SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::SetValue().

◆ GetValue()

wxString FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::GetValue ( int aRow,
int aCol )
inlineoverrideinherited

Definition at line 720 of file fields_table_data_model.h.

◆ GetVariantNames()

const std::vector< wxString > & FIELDS_TABLE_DATA_MODEL_BASE::GetVariantNames ( ) const
inlineinherited

Definition at line 247 of file fields_table_data_model.h.

◆ groupMatch()

bool FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::groupMatch ( const SCH_REFERENCE & lhItem,
const SCH_REFERENCE & rhItem )
inlineprotectedinherited

◆ HasUndoStateSerialization()

bool FIELDS_TABLE_DATA_MODEL_BASE::HasUndoStateSerialization ( ) const
inlineoverrideinherited

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.

Definition at line 251 of file fields_table_data_model.h.

◆ initializeDataStoreItem()

void FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::initializeDataStoreItem ( const SCH_REFERENCE & aItem)
inlineprotectedinherited

Initializes every column in the data store for a newly added (or refreshed) item.

Like the field initializer, this will correctly handle missing fields in the source item as empty or not-present based on the column user-added status

Definition at line 1113 of file fields_table_data_model.h.

Referenced by SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::AddReferences(), and SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::UpdateReferences().

◆ initializeDataStoreItemField()

void FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::initializeDataStoreItemField ( const SCH_REFERENCE & aItem,
const DATA_MODEL_COL & aCol )
inlineprotectedinherited

Puts the live value of the field in the data store, correctly handling a missing field in the souce item as empty or not-present based on whether the col was added by the user.

Definition at line 1099 of file fields_table_data_model.h.

◆ IsCellClear()

bool FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::IsCellClear ( int aRow,
int aCol )
inlineoverridevirtualinherited

Returns true if the cell is not present in the data store for any item in the row, not just empty.

Implements FIELDS_TABLE_DATA_MODEL_BASE.

Definition at line 409 of file fields_table_data_model.h.

◆ IsCellEdited()

bool FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::IsCellEdited ( int aRow,
int aCol )
inlineoverridevirtualinherited

Returns true if the cell has been modified from the live value in any item in the row (symbol/footprint/etc).

Implements FIELDS_TABLE_DATA_MODEL_BASE.

Definition at line 430 of file fields_table_data_model.h.

◆ IsCellReadOnly()

bool FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::IsCellReadOnly ( int aRow,
int aCol )
inlineoverridevirtualinherited

◆ IsEdited()

bool FIELDS_TABLE_DATA_MODEL_BASE::IsEdited ( )
inlineinherited

Definition at line 130 of file fields_table_data_model.h.

◆ IsEmptyCell()

bool FIELDS_TABLE_DATA_MODEL_BASE::IsEmptyCell ( int aRow,
int aCol )
inlineoverrideinherited

Definition at line 149 of file fields_table_data_model.h.

◆ IsExpanderColumn()

bool FIELDS_TABLE_DATA_MODEL_BASE::IsExpanderColumn ( int aCol) const
overrideinherited

Definition at line 176 of file fields_table_data_model.cpp.

◆ IsRowEdited()

bool FIELDS_TABLE_DATA_MODEL_BASE::IsRowEdited ( int aRow)
inherited

Return true if any cell in the row has been edited.

Definition at line 229 of file fields_table_data_model.cpp.

◆ MatchesFilter()

bool FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::MatchesFilter ( const SCH_REFERENCE & aItem,
const wxString & aReference,
EDA_COMBINED_MATCHER & aMatcher )
inlineprotectedinherited

◆ MoveColumn()

void FIELDS_TABLE_DATA_MODEL_BASE::MoveColumn ( int aCol,
int aNewPos )
inherited

Definition at line 134 of file fields_table_data_model.cpp.

◆ RebuildRows()

◆ RemoveColumn()

void FIELDS_TABLE_DATA_MODEL_BASE::RemoveColumn ( int aCol)
inherited

Definition at line 135 of file fields_table_data_model.cpp.

◆ RemoveReferences()

void SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::RemoveReferences ( const SCH_REFERENCE_LIST & aRefs)

◆ RemoveSymbol()

void SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::RemoveSymbol ( const SCH_SYMBOL & aSymbol)

◆ RenameColumn()

void FIELDS_TABLE_DATA_MODEL_BASE::RenameColumn ( int aCol,
const wxString & newName )
inherited

Definition at line 136 of file fields_table_data_model.cpp.

◆ resolveTextVars()

wxString SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::resolveTextVars ( const SCH_REFERENCE & aRef,
const wxString & aText )
overrideprivatevirtual

◆ RestoreUndoState()

void FIELDS_TABLE_DATA_MODEL_BASE::RestoreUndoState ( const wxString & aState)
overrideinherited

Definition at line 253 of file fields_table_data_model.cpp.

◆ RevertRow()

void SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::RevertRow ( int aRow)
overridevirtual

◆ SerializeUndoState()

wxString FIELDS_TABLE_DATA_MODEL_BASE::SerializeUndoState ( ) const
overrideinherited

Definition at line 252 of file fields_table_data_model.cpp.

◆ setAttributeValue()

bool SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::setAttributeValue ( SCH_REFERENCE & aRef,
const wxString & aAttributeName,
const wxString & aValue,
const wxString & aVariantName = wxEmptyString )
private

Set the attribute value.

Parameters
aReferenceis a reference to the symbol to set the attribute.
aAttributeNameis the name of the symbol attribute.
aValueis the value to set the attribute.
aVariantNameis an optional variant name to set the variant attribute.
Return values
trueif the symbol attribute value has changed.
falseif the symbol attribute has not changed.

Definition at line 485 of file symbol_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().

◆ SetColAttr()

void WX_GRID_TABLE_BASE::SetColAttr ( wxGridCellAttr * aAttr,
int aCol )
inlineoverrideinherited

Definition at line 66 of file wx_grid.h.

◆ SetColLabelValue()

void FIELDS_TABLE_DATA_MODEL_BASE::SetColLabelValue ( int aCol,
const wxString & aLabel )
overrideinherited

Definition at line 140 of file fields_table_data_model.cpp.

◆ SetCurrentVariant()

void FIELDS_TABLE_DATA_MODEL_BASE::SetCurrentVariant ( const wxString & aVariantName)
inlineinherited

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.

Parameters
aVariantNameThe name of the current variant, or empty string for default.

Definition at line 243 of file fields_table_data_model.h.

◆ SetExcludeDNP()

void FIELDS_TABLE_DATA_MODEL_BASE::SetExcludeDNP ( bool aExclude)
inlineinherited

Definition at line 207 of file fields_table_data_model.h.

◆ SetFieldsOrder()

void FIELDS_TABLE_DATA_MODEL_BASE::SetFieldsOrder ( const std::vector< wxString > & aNewOrder)
inherited

Definition at line 147 of file fields_table_data_model.cpp.

◆ SetFilter()

void FIELDS_TABLE_DATA_MODEL_BASE::SetFilter ( const wxString & aFilter)
inlineinherited

Definition at line 189 of file fields_table_data_model.h.

◆ SetFilterScope()

void FIELDS_TABLE_DATA_MODEL_BASE::SetFilterScope ( BOM_FILTER_SCOPE aScope)
inlineinherited

Definition at line 191 of file fields_table_data_model.h.

◆ SetGroupColumn()

void FIELDS_TABLE_DATA_MODEL_BASE::SetGroupColumn ( int aCol,
bool aGroup )
inherited

Definition at line 210 of file fields_table_data_model.cpp.

◆ SetGroupingEnabled()

void FIELDS_TABLE_DATA_MODEL_BASE::SetGroupingEnabled ( bool aGroup)
inlineinherited

Definition at line 197 of file fields_table_data_model.h.

◆ SetIncludeExcludedFromBOM()

void FIELDS_TABLE_DATA_MODEL_BASE::SetIncludeExcludedFromBOM ( bool aInclude)
inlineinherited

Definition at line 204 of file fields_table_data_model.h.

◆ SetPath()

void SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::SetPath ( const SCH_SHEET_PATH & aPath)
inline

Definition at line 74 of file symbol_fields_data_model.h.

References m_path.

◆ SetScope()

void SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::SetScope ( SCOPE aScope)
inline

Definition at line 71 of file symbol_fields_data_model.h.

References m_scope.

◆ SetSelectionItems()

void FIELDS_TABLE_DATA_MODEL_BASE::SetSelectionItems ( const std::unordered_set< KIID_PATH > & aItems)
inlineinherited

Definition at line 194 of file fields_table_data_model.h.

◆ SetShowColumn()

void FIELDS_TABLE_DATA_MODEL_BASE::SetShowColumn ( int aCol,
bool aShow )
inherited

Definition at line 213 of file fields_table_data_model.cpp.

◆ SetSorting()

void FIELDS_TABLE_DATA_MODEL_BASE::SetSorting ( int aCol,
bool aAscending )
inherited

Definition at line 179 of file fields_table_data_model.cpp.

◆ setStoredFieldValue()

void FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::setStoredFieldValue ( const SCH_REFERENCE & aItem,
const wxString & aFieldName,
const wxString & aValue )
inlineprotectedinherited

Creates or updates a field in the data store.

Always marks the field present as a result.

Definition at line 1036 of file fields_table_data_model.h.

Referenced by SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::AddReferences(), and SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::SetValue().

◆ SetValue()

◆ SetVariantNames()

void FIELDS_TABLE_DATA_MODEL_BASE::SetVariantNames ( const std::vector< wxString > & aVariantNames)
inlineinherited

Definition at line 246 of file fields_table_data_model.h.

◆ Sort()

void FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::Sort ( )
inlineprotectedinherited

◆ storageIsSharedAcrossPaths()

bool SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::storageIsSharedAcrossPaths ( const wxString & aFieldName) const
private

Test whether a field's storage is common to every sheet path that reaches a symbol.

Shared sheets present one symbol under several paths. Edits to storage they have in common must be recorded against all of those paths, while variant overrides belong to a single symbol instance.

Parameters
aFieldNameis the untranslated field or attribute name.
Return values
trueif the field is stored on the symbol.
falseif the field is stored on the symbol instance.

Definition at line 387 of file symbol_fields_data_model.cpp.

References FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::m_currentVariant.

Referenced by AddReferences(), RevertRow(), and SetValue().

◆ unitMatch()

bool SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::unitMatch ( const SCH_REFERENCE & lhItem,
const SCH_REFERENCE & rhItem )
overrideprivatevirtual

◆ updateDataStoreItemFieldFromLive()

void FIELDS_TABLE_DATA_MODEL< SCH_REFERENCE >::updateDataStoreItemFieldFromLive ( const SCH_REFERENCE & aItem,
const wxString & aFieldName )
inlineprotectedinherited

Updates the data store with the current value of the field from the live item.

If the field is not present on the item, it will be cleared from the data store rather than set to empty.

Definition at line 1084 of file fields_table_data_model.h.

Referenced by SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::RevertRow(), and SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::SetValue().

◆ UpdateReferences()

void SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::UpdateReferences ( const SCH_REFERENCE_LIST & aRefs)

Member Data Documentation

◆ ITEM_NUMBER_VARIABLE

const wxString FIELDS_TABLE_DATA_MODEL_BASE::ITEM_NUMBER_VARIABLE
staticinherited

Definition at line 128 of file fields_table_data_model.h.

◆ m_colAttrs

std::map<int, wxGridCellAttr*> WX_GRID_TABLE_BASE::m_colAttrs
protectedinherited

Definition at line 108 of file wx_grid.h.

Referenced by SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::GetAttr().

◆ m_cols

◆ m_currentVariant

◆ m_dataStore

std::map<KIID_PATH, std::map<wxString, wxString> > FIELDS_TABLE_DATA_MODEL_BASE::m_dataStore
protectedinherited

◆ m_edited

bool FIELDS_TABLE_DATA_MODEL_BASE::m_edited
protectedinherited

◆ m_excludeDNP

bool FIELDS_TABLE_DATA_MODEL_BASE::m_excludeDNP
protectedinherited

◆ m_filter

wxString FIELDS_TABLE_DATA_MODEL_BASE::m_filter
protectedinherited

◆ m_filterScope

BOM_FILTER_SCOPE FIELDS_TABLE_DATA_MODEL_BASE::m_filterScope
protectedinherited

Definition at line 291 of file fields_table_data_model.h.

◆ m_groupingEnabled

bool FIELDS_TABLE_DATA_MODEL_BASE::m_groupingEnabled
protectedinherited

◆ m_includeExcluded

bool FIELDS_TABLE_DATA_MODEL_BASE::m_includeExcluded
protectedinherited

◆ m_path

SCH_SHEET_PATH SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::m_path
protected

Definition at line 153 of file symbol_fields_data_model.h.

Referenced by GetPath(), RebuildRows(), and SetPath().

◆ m_rebuildsEnabled

bool FIELDS_TABLE_DATA_MODEL_BASE::m_rebuildsEnabled
protectedinherited

Items included by the user selection scope.

Definition at line 295 of file fields_table_data_model.h.

Referenced by SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::RebuildRows().

◆ m_resolvedTextRenderer

wxGridCellRenderer* FIELDS_TABLE_DATA_MODEL_BASE::m_resolvedTextRenderer
protectedinherited

Definition at line 285 of file fields_table_data_model.h.

◆ m_rows

◆ m_scope

SCOPE SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::m_scope
protected

◆ m_selectionItems

std::unordered_set<KIID_PATH> FIELDS_TABLE_DATA_MODEL_BASE::m_selectionItems
protectedinherited

◆ m_sortAscending

bool FIELDS_TABLE_DATA_MODEL_BASE::m_sortAscending
protectedinherited

Definition at line 289 of file fields_table_data_model.h.

◆ m_sortColumn

int FIELDS_TABLE_DATA_MODEL_BASE::m_sortColumn
protectedinherited

Definition at line 288 of file fields_table_data_model.h.

◆ m_stripedRenderer

wxGridCellRenderer* FIELDS_TABLE_DATA_MODEL_BASE::m_stripedRenderer
protectedinherited

Definition at line 284 of file fields_table_data_model.h.

◆ m_symbolsList

SCH_REFERENCE_LIST SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::m_symbolsList
protected

The flattened by hierarchy list of symbols.

Warning
This list must be kept sorted by symbol pointer. Otherwise, the undo/redo commit actions will be broken.

Definition at line 151 of file symbol_fields_data_model.h.

Referenced by AddReferences(), ApplyData(), ClearCell(), DeleteRows(), getAllItems(), GetReferenceList(), RebuildRows(), RemoveReferences(), RemoveSymbol(), RevertRow(), SetValue(), SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL(), and UpdateReferences().

◆ m_variantNames

std::vector<wxString> FIELDS_TABLE_DATA_MODEL_BASE::m_variantNames
protectedinherited

Variant names for multi-variant DNP filtering.

Definition at line 301 of file fields_table_data_model.h.

Referenced by SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::RebuildRows().

◆ QUANTITY_VARIABLE

const wxString FIELDS_TABLE_DATA_MODEL_BASE::QUANTITY_VARIABLE
staticinherited

Definition at line 127 of file fields_table_data_model.h.


The documentation for this class was generated from the following files: