KiCad PCB EDA Suite
Loading...
Searching...
No Matches
FIELDS_TABLE_DATA_MODEL< ITEM_TYPE > Class Template Referenceabstract

The rest of the generic fields data model stuff, primarily around row functionality. More...

#include <fields_table_data_model.h>

Inheritance diagram for FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >:
FIELDS_TABLE_DATA_MODEL_BASE WX_GRID_TABLE_BASE

Public Member Functions

void SetCurrentVariant (const wxString &aVariantName) override
 Select the displayed variant, retaining un-applied edits in every variant.
 
void AddColumn (const wxString &aFieldName, const wxString &aLabel, bool aAddedByUser) 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 CopyCellFromVariant (int aRow, int aCol, const wxString &aVariantName) override
 Copy each item's raw source value into the displayed variant, retaining staged edits.
 
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_PATH > GetRowItemKeys (int aRow) const override
 Return the stable data-store keys of every item represented by a row.
 
std::vector< ITEM_TYPE > GetRowReferences (int aRow) const
 
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 ExpandRow (int aRow)
 
void CollapseRow (int aRow)
 
void ExpandCollapseRow (int aRow) override
 
void CollapseForSort ()
 
void ExpandAfterSort ()
 
wxString GetGroupedValue (const DATA_MODEL_ROW< ITEM_TYPE > &aRow, int aCol, const wxString &refDelimiter=wxT(", "), const wxString &refRangeDelimiter=wxT("-"), bool resolveVars=false, bool forExport=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
 
virtual KIID_PATH getDataStoreKey (const ITEM_TYPE &aItem) const =0
 
virtual wxString getItemIdentifier (const ITEM_TYPE &aItem) const =0
 
virtual wxString getFieldResolvedLiveValue (const ITEM_TYPE &aItem, const wxString &aFieldName)=0
 Explicitly bypasses the data store's field values and retries them from the item's current field value on the editing canvas.
 
virtual wxString resolveTextVars (const ITEM_TYPE &aItem, const wxString &aText)=0
 
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_FIELD > GetFieldsOrdered ()
 
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 HasRowLabelExpanders () const override
 Show grouping controls in the row headers instead of row numbers.
 
void SetSorting (int aCol, bool aAscending)
 
int GetSortCol ()
 
bool GetSortAsc ()
 
void EnableRebuilds ()
 
void DisableRebuilds ()
 
virtual void RebuildRows ()=0
 
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 CanCopyCellFromVariant (int aRow, int aCol)
 
bool IsRowEdited (int aRow)
 Return true if any cell in the row has been edited.
 
const wxString & GetCurrentVariant () const
 
void RenameStoredVariant (const wxString &aOldName, const wxString &aNewName)
 
void DeleteStoredVariant (const wxString &aName)
 
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
 
wxGridCellAttr * GetAttr (int aRow, int aCol, wxGridCellAttr::wxAttrKind aKind) 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

bool MatchesFilter (const ITEM_TYPE &aItem, const wxString &aReference, EDA_COMBINED_MATCHER &aMatcher)
 
bool attributeForcedOnBySheet (const ITEM_TYPE &aItem, const wxString &aAttributeName) const
 Sheets can force all the symbols in them to have certain attributes on, like DNP.
 
virtual bool attributeForcedOnBySheet (const ITEM_TYPE &aItem, const wxString &aAttributeName, const wxString &aVariantName) const
 
bool allRowItemsHaveAttributeForcedOnBySheet (const DATA_MODEL_ROW< ITEM_TYPE > &aRow, int aCol)
 
bool cmpRows (const DATA_MODEL_ROW< ITEM_TYPE > &lhRow, const DATA_MODEL_ROW< ITEM_TYPE > &rhRow, int aSortCol, bool aAscending)
 
virtual bool cmpRowItems (const ITEM_TYPE &lhItem, const ITEM_TYPE &rhItem)
 
virtual bool unitMatch (const ITEM_TYPE &lhItem, const ITEM_TYPE &rhItem)=0
 
bool groupMatch (const ITEM_TYPE &lhItem, const ITEM_TYPE &rhItem)
 
void Sort ()
 
virtual bool getLiveFieldValue (const ITEM_TYPE &aItem, const wxString &aFieldName, wxString &aValue)=0
 Gets the current value of the field from the live item, e.g.
 
virtual bool getLiveFieldValueForVariant (const ITEM_TYPE &aItem, const wxString &aFieldName, const wxString &aVariant, wxString &aValue)
 
std::map< wxString, wxString > getStoredFields (const ITEM_TYPE &aItem, const wxString &aVariant) const
 Returns the edited, present fields belonging to a variant without creating entries.
 
bool getStoredFieldValue (const ITEM_TYPE &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.
 
bool resolveStoredTextVar (const ITEM_TYPE &aItem, wxString *aToken, bool aCaseSensitive=false) const
 Resolve an ordinary field token from the current variant's staged values.
 
void setStoredFieldValue (const ITEM_TYPE &aItem, const wxString &aFieldName, const wxString &aValue)
 Creates or updates a field in the data store.
 
virtual void setCellValues (int aRow, int aCol, const std::vector< wxString > &aValues)
 Write one value per item represented by the cell. Models may propagate shared storage.
 
void ensureStoredFieldPresent (const ITEM_TYPE &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 ITEM_TYPE &aItem, const wxString &aFieldName)
 Clears a field, e.g.
 
bool fieldIsModified (const ITEM_TYPE &aItem, const wxString &aFieldName)
 Compares the live value of the field to the stored value in the data store.
 
void updateDataStoreItemFieldFromLive (const ITEM_TYPE &aItem, const wxString &aFieldName, bool aAllVariants=false)
 Updates the data store with the current value of the field from the live item.
 
void initializeDataStoreItemField (const ITEM_TYPE &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 ITEM_TYPE &aItem)
 Initializes every column in the data store for a newly added (or refreshed) item.
 
FIELD_STORE_VALUE & storedField (const ITEM_TYPE &aItem, const wxString &aFieldName)
 
FIELD_STORE_VALUE & storedField (const ITEM_TYPE &aItem, const wxString &aFieldName, const wxString &aVariantName)
 
void refreshDataStoreItem (const ITEM_TYPE &aItem)
 
bool storedFieldIsRemoved (const ITEM_TYPE &aItem, const wxString &aName) const
 
std::set< wxString > storedVariants (const ITEM_TYPE &aItem) const
 
void acceptDataStoreItem (const ITEM_TYPE &aItem)
 
virtual void getEffectiveFieldValue (const ITEM_TYPE &aItem, const wxString &aFieldName, wxString &aValue) const
 
virtual std::vector< ITEM_TYPE > getAllItems () const =0
 
virtual bool fieldIsAttribute (const wxString &aFieldName) const
 
virtual bool fieldIsItemProperty (const wxString &aFieldName) const
 
virtual bool fieldSupportsVariants (const wxString &aFieldName) const
 
wxString fieldVariant (const wxString &aFieldName, const wxString &aVariantName) const
 
void updateEditedState ()
 
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

std::vector< DATA_MODEL_ROW< ITEM_TYPE > > 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
 
std::unordered_set< KIID_PATH > m_selectionItems
 Items included by the user selection scope.
 
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::map< KIID_PATH, std::map< wxString, FIELD_STORE_VALUE > > m_dataStore
 
std::map< int, wxGridCellAttr * > m_colAttrs
 

Detailed Description

template<typename ITEM_TYPE>
class FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >

The rest of the generic fields data model stuff, primarily around row functionality.

Templated because rows differ per model, e.g. SCH_REFERENCE for the schematic fields table.

Definition at line 392 of file fields_table_data_model.h.

Member Function Documentation

◆ acceptDataStoreItem()

template<typename ITEM_TYPE>
void FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::acceptDataStoreItem ( const ITEM_TYPE & aItem)
inlineprotected

◆ AddColumn()

◆ allRowItemsHaveAttributeForcedOnBySheet()

template<typename ITEM_TYPE>
bool FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::allRowItemsHaveAttributeForcedOnBySheet ( const DATA_MODEL_ROW< ITEM_TYPE > & aRow,
int aCol )
inlineprotected

◆ ApplyBomPreset()

◆ applyCellDecorations()

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

Definition at line 188 of file fields_table_data_model.cpp.

◆ applyFieldPresenceRenderer()

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

Definition at line 164 of file fields_table_data_model.cpp.

◆ applyResolvedTextRenderer()

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

◆ attributeForcedOnBySheet() [1/2]

template<typename ITEM_TYPE>
bool FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::attributeForcedOnBySheet ( const ITEM_TYPE & aItem,
const wxString & aAttributeName ) const
inlineprotected

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

Definition at line 891 of file fields_table_data_model.h.

References attributeForcedOnBySheet(), and FIELDS_TABLE_DATA_MODEL_BASE::m_currentVariant.

Referenced by allRowItemsHaveAttributeForcedOnBySheet(), attributeForcedOnBySheet(), CopyCellFromVariant(), GetGroupedValue(), groupMatch(), and MatchesFilter().

◆ attributeForcedOnBySheet() [2/2]

template<typename ITEM_TYPE>
virtual bool FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::attributeForcedOnBySheet ( const ITEM_TYPE & aItem,
const wxString & aAttributeName,
const wxString & aVariantName ) const
inlineprotectedvirtual

◆ CanClearCell()

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

◆ CanCopyCellFromVariant()

bool FIELDS_TABLE_DATA_MODEL_BASE::CanCopyCellFromVariant ( 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 122 of file wx_grid.h.

◆ ClearCell()

template<typename ITEM_TYPE>
void FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::ClearCell ( int aRow,
int aCol )
inlineoverridevirtual

Clears the field from the data store, rather than setting its value to an empty string.

Implements FIELDS_TABLE_DATA_MODEL_BASE.

Reimplemented in SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL.

Definition at line 435 of file fields_table_data_model.h.

References FIELDS_TABLE_DATA_MODEL_BASE::CanClearCell(), clearStoredField(), FIELDS_TABLE_DATA_MODEL_BASE::m_cols, FIELDS_TABLE_DATA_MODEL_BASE::m_edited, and m_rows.

◆ ClearSelectionItems()

void FIELDS_TABLE_DATA_MODEL_BASE::ClearSelectionItems ( )
inlineinherited

Definition at line 220 of file fields_table_data_model.h.

References m_selectionItems.

◆ clearStoredField()

template<typename ITEM_TYPE>
void FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::clearStoredField ( const ITEM_TYPE & aItem,
const wxString & aFieldName )
inlineprotected

Clears a field, e.g.

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

Definition at line 1228 of file fields_table_data_model.h.

References FIELD_STORE_VALUE::m_present, FIELD_STORE_VALUE::m_variants, and storedField().

Referenced by ClearCell().

◆ cloneUrlEditorAttr()

wxGridCellAttr * FIELDS_TABLE_DATA_MODEL_BASE::cloneUrlEditorAttr ( )
protectedinherited

◆ cmpRowItems()

template<typename ITEM_TYPE>
virtual bool FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::cmpRowItems ( const ITEM_TYPE & lhItem,
const ITEM_TYPE & rhItem )
inlineprotectedvirtual

Definition at line 964 of file fields_table_data_model.h.

References getItemIdentifier(), and StrNumCmp().

Referenced by cmpRows().

◆ cmpRows()

template<typename ITEM_TYPE>
bool FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::cmpRows ( const DATA_MODEL_ROW< ITEM_TYPE > & lhRow,
const DATA_MODEL_ROW< ITEM_TYPE > & rhRow,
int aSortCol,
bool aAscending )
inlineprotected

◆ ColIsAttribute()

◆ ColIsComputed()

◆ ColIsFootprint()

bool FIELDS_TABLE_DATA_MODEL_BASE::ColIsFootprint ( int aCol) const
inherited

Definition at line 451 of file fields_table_data_model.cpp.

References FOOTPRINT, GetDefaultFieldName(), m_cols, and UNTRANSLATED.

◆ ColIsItemIdentifier()

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

◆ 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 466 of file fields_table_data_model.cpp.

References fieldIsItemProperty(), and m_cols.

Referenced by ColIsComputed().

◆ ColIsQuantity()

bool FIELDS_TABLE_DATA_MODEL_BASE::ColIsQuantity ( int aCol) const
inherited

◆ ColIsReadOnly()

bool FIELDS_TABLE_DATA_MODEL_BASE::ColIsReadOnly ( int aCol) const
virtualinherited

◆ 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 444 of file fields_table_data_model.cpp.

References GetDefaultFieldName(), m_cols, UNTRANSLATED, and VALUE.

◆ CollapseForSort()

template<typename ITEM_TYPE>
void FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::CollapseForSort ( )
inline

Definition at line 643 of file fields_table_data_model.h.

References CollapseRow(), IsParentRow(), IsRowExpanded(), and m_rows.

Referenced by Sort().

◆ CollapseRow()

template<typename ITEM_TYPE>
void FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::CollapseRow ( int aRow)
inline

Definition at line 610 of file fields_table_data_model.h.

References IsParentRow(), and m_rows.

Referenced by CollapseForSort(), and ExpandCollapseRow().

◆ commitPendingGridChanges()

◆ CopyCellFromVariant()

template<typename ITEM_TYPE>
void FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::CopyCellFromVariant ( int aRow,
int aCol,
const wxString & aVariantName )
inlineoverridevirtual

◆ DeleteStoredVariant()

void FIELDS_TABLE_DATA_MODEL_BASE::DeleteStoredVariant ( const wxString & aName)
inherited

◆ DisableRebuilds()

void FIELDS_TABLE_DATA_MODEL_BASE::DisableRebuilds ( )
inherited

Definition at line 557 of file fields_table_data_model.cpp.

References m_rebuildsEnabled.

Referenced by DIALOG_FIELDS_TABLE::doApplyBomPreset().

◆ EnableRebuilds()

void FIELDS_TABLE_DATA_MODEL_BASE::EnableRebuilds ( )
inherited

Definition at line 551 of file fields_table_data_model.cpp.

References m_rebuildsEnabled.

Referenced by DIALOG_FIELDS_TABLE::doApplyBomPreset().

◆ enhanceAttr()

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

◆ ensureStoredFieldPresent()

template<typename ITEM_TYPE>
void FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::ensureStoredFieldPresent ( const ITEM_TYPE & aItem,
const wxString & aFieldName )
inlineprotected

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

Definition at line 1220 of file fields_table_data_model.h.

References FIELD_STORE_VALUE::m_present, and storedField().

◆ ExpandAfterSort()

template<typename ITEM_TYPE>
void FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::ExpandAfterSort ( )
inline

Definition at line 657 of file fields_table_data_model.h.

References ExpandRow(), and m_rows.

Referenced by Sort().

◆ ExpandCollapseRow()

template<typename ITEM_TYPE>
void FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::ExpandCollapseRow ( int aRow)
inlineoverridevirtual

◆ ExpandRow()

template<typename ITEM_TYPE>
void FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::ExpandRow ( int aRow)
inline

Definition at line 562 of file fields_table_data_model.h.

References IsParentRow(), m_rows, and unitMatch().

Referenced by ExpandAfterSort(), and ExpandCollapseRow().

◆ Export()

◆ 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

◆ fieldIsModified()

template<typename ITEM_TYPE>
bool FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::fieldIsModified ( const ITEM_TYPE & aItem,
const wxString & aFieldName )
inlineprotected

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 1242 of file fields_table_data_model.h.

References getLiveFieldValue(), and getStoredFieldValue().

Referenced by IsCellEdited().

◆ fieldSupportsVariants()

virtual bool FIELDS_TABLE_DATA_MODEL_BASE::fieldSupportsVariants ( const wxString & aFieldName) const
inlineprotectedvirtualinherited

◆ fieldVariant()

wxString FIELDS_TABLE_DATA_MODEL_BASE::fieldVariant ( const wxString & aFieldName,
const wxString & aVariantName ) const
protectedinherited

◆ getAllItems()

template<typename ITEM_TYPE>
virtual std::vector< ITEM_TYPE > FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::getAllItems ( ) const
protectedpure virtual

◆ GetAttr()

wxGridCellAttr * WX_GRID_TABLE_BASE::GetAttr ( int aRow,
int aCol,
wxGridCellAttr::wxAttrKind aKind )
inlineoverrideinherited

◆ getAttributeResolvedValue()

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

◆ GetBomSettings()

◆ GetColDataWidth()

int FIELDS_TABLE_DATA_MODEL_BASE::GetColDataWidth ( int aCol)
inherited

◆ GetColFieldName()

wxString FIELDS_TABLE_DATA_MODEL_BASE::GetColFieldName ( int aCol)
inherited

Definition at line 358 of file fields_table_data_model.cpp.

References m_cols.

Referenced by GetBomSettings().

◆ GetColLabelValue()

wxString FIELDS_TABLE_DATA_MODEL_BASE::GetColLabelValue ( int aCol)
overrideinherited

Definition at line 351 of file fields_table_data_model.cpp.

References m_cols.

Referenced by DIALOG_FIELDS_TABLE::doApplyBomPreset(), and GetColDataWidth().

◆ GetCurrentVariant()

const wxString & FIELDS_TABLE_DATA_MODEL_BASE::GetCurrentVariant ( ) const
inlineinherited

Definition at line 272 of file fields_table_data_model.h.

References m_currentVariant.

◆ getDataStoreKey()

◆ getEffectiveFieldValue()

template<typename ITEM_TYPE>
virtual void FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::getEffectiveFieldValue ( const ITEM_TYPE & aItem,
const wxString & aFieldName,
wxString & aValue ) const
inlineprotectedvirtual

Reimplemented in LIB_FIELDS_EDITOR_GRID_DATA_MODEL.

Definition at line 1409 of file fields_table_data_model.h.

References getStoredFieldValue().

Referenced by GetGroupedValue().

◆ GetExcludeDNP()

bool FIELDS_TABLE_DATA_MODEL_BASE::GetExcludeDNP ( )
inlineinherited

Definition at line 233 of file fields_table_data_model.h.

References m_excludeDNP.

Referenced by GetBomSettings().

◆ GetExportValue()

template<typename ITEM_TYPE>
wxString FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::GetExportValue ( int aRow,
int aCol,
const wxString & refDelimiter,
const wxString & refRangeDelimiter )
inlineoverridevirtual

Implements FIELDS_TABLE_DATA_MODEL_BASE.

Definition at line 813 of file fields_table_data_model.h.

References GetGroupedValue(), and m_rows.

◆ GetFieldNameCol()

◆ getFieldResolvedLiveValue()

template<typename ITEM_TYPE>
virtual wxString FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::getFieldResolvedLiveValue ( const ITEM_TYPE & aItem,
const wxString & aFieldName )
pure virtual

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.

Implemented in FOOTPRINT_FIELDS_EDITOR_GRID_DATA_MODEL, LIB_FIELDS_EDITOR_GRID_DATA_MODEL, and SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL.

Referenced by GetGroupedValue(), groupMatch(), and MatchesFilter().

◆ GetFieldsOrdered()

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

◆ GetFilter()

const wxString & FIELDS_TABLE_DATA_MODEL_BASE::GetFilter ( )
inlineinherited

Definition at line 215 of file fields_table_data_model.h.

References m_filter.

Referenced by GetBomSettings().

◆ GetFilterScope()

BOM_FILTER_SCOPE FIELDS_TABLE_DATA_MODEL_BASE::GetFilterScope ( ) const
inlineinherited

Definition at line 217 of file fields_table_data_model.h.

References m_filterScope.

Referenced by GetBomSettings().

◆ GetGroupColumn()

bool FIELDS_TABLE_DATA_MODEL_BASE::GetGroupColumn ( int aCol)
inherited

Definition at line 574 of file fields_table_data_model.cpp.

References m_cols.

Referenced by DIALOG_FIELDS_TABLE::doApplyBomPreset().

◆ GetGroupedValue()

◆ GetGroupingEnabled()

bool FIELDS_TABLE_DATA_MODEL_BASE::GetGroupingEnabled ( )
inlineinherited

Definition at line 223 of file fields_table_data_model.h.

References m_groupingEnabled.

Referenced by GetBomSettings().

◆ GetIncludeExcludedFromBOM()

bool FIELDS_TABLE_DATA_MODEL_BASE::GetIncludeExcludedFromBOM ( )
inlineinherited

Definition at line 230 of file fields_table_data_model.h.

References m_includeExcluded.

Referenced by GetBomSettings(), and DIALOG_FIELDS_TABLE::PreviewRefresh().

◆ getItemIdentifier()

template<typename ITEM_TYPE>
virtual wxString FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::getItemIdentifier ( const ITEM_TYPE & aItem) const
pure virtual

◆ getLiveFieldValue()

template<typename ITEM_TYPE>
virtual bool FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::getLiveFieldValue ( const ITEM_TYPE & aItem,
const wxString & aFieldName,
wxString & aValue )
protectedpure virtual

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).

Implemented in FOOTPRINT_FIELDS_EDITOR_GRID_DATA_MODEL, LIB_FIELDS_EDITOR_GRID_DATA_MODEL, LIB_FOOTPRINT_FIELDS_EDITOR_GRID_DATA_MODEL, and SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL.

Referenced by fieldIsModified(), and getLiveFieldValueForVariant().

◆ getLiveFieldValueForVariant()

template<typename ITEM_TYPE>
virtual bool FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::getLiveFieldValueForVariant ( const ITEM_TYPE & aItem,
const wxString & aFieldName,
const wxString & aVariant,
wxString & aValue )
inlineprotectedvirtual

◆ GetNumberCols()

◆ GetNumberRows()

template<typename ITEM_TYPE>
int FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::GetNumberRows ( )
inlineoverride

Definition at line 518 of file fields_table_data_model.h.

References m_rows.

Referenced by GetValue().

◆ GetResolvedValue()

template<typename ITEM_TYPE>
wxString FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::GetResolvedValue ( int aRow,
int aCol )
inlineoverridevirtual

Implements FIELDS_TABLE_DATA_MODEL_BASE.

Definition at line 808 of file fields_table_data_model.h.

References GetGroupedValue(), and m_rows.

◆ GetRowItemKeys()

template<typename ITEM_TYPE>
std::vector< KIID_PATH > FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::GetRowItemKeys ( int aRow) const
inlineoverridevirtual

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

Implements FIELDS_TABLE_DATA_MODEL_BASE.

Definition at line 522 of file fields_table_data_model.h.

References getDataStoreKey(), and m_rows.

◆ GetRowReferences()

template<typename ITEM_TYPE>
std::vector< ITEM_TYPE > FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::GetRowReferences ( int aRow) const
inline

Definition at line 535 of file fields_table_data_model.h.

References m_rows.

◆ GetRowState()

template<typename ITEM_TYPE>
ROW_STATE FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::GetRowState ( int aRow) const
inlineoverridevirtual

Reimplemented from WX_GRID_TABLE_BASE.

Definition at line 519 of file fields_table_data_model.h.

References m_rows, and ROW_STATE::ROW_STATE.

◆ GetShowColumn()

bool FIELDS_TABLE_DATA_MODEL_BASE::GetShowColumn ( int aCol)
inherited

Definition at line 588 of file fields_table_data_model.cpp.

References m_cols.

Referenced by DIALOG_FIELDS_TABLE::doApplyBomPreset().

◆ GetSortAsc()

bool FIELDS_TABLE_DATA_MODEL_BASE::GetSortAsc ( )
inlineinherited

◆ GetSortCol()

int FIELDS_TABLE_DATA_MODEL_BASE::GetSortCol ( )
inlineinherited

Definition at line 205 of file fields_table_data_model.h.

References m_sortColumn.

Referenced by GetBomSettings().

◆ getStoredFields()

template<typename ITEM_TYPE>
std::map< wxString, wxString > FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::getStoredFields ( const ITEM_TYPE & aItem,
const wxString & aVariant ) const
inlineprotected

Returns the edited, present fields belonging to a variant without creating entries.

Definition at line 1092 of file fields_table_data_model.h.

References getDataStoreKey(), FIELD_VALUE_STATE::m_baseline, FIELDS_TABLE_DATA_MODEL_BASE::m_dataStore, FIELD_VALUE_STATE::m_value, and name.

◆ getStoredFieldValue()

template<typename ITEM_TYPE>
bool FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::getStoredFieldValue ( const ITEM_TYPE & aItem,
const wxString & aFieldName,
wxString & aValue ) const
inlineprotected

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 1122 of file fields_table_data_model.h.

References FIELDS_TABLE_DATA_MODEL_BASE::fieldVariant(), getDataStoreKey(), FIELDS_TABLE_DATA_MODEL_BASE::m_currentVariant, and FIELDS_TABLE_DATA_MODEL_BASE::m_dataStore.

Referenced by fieldIsModified(), getEffectiveFieldValue(), GetGroupedValue(), groupMatch(), IsCellClear(), MatchesFilter(), and resolveStoredTextVar().

◆ GetValue()

template<typename ITEM_TYPE>
wxString FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::GetValue ( int aRow,
int aCol )
inlineoverride

◆ GetVariantNames()

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

Definition at line 278 of file fields_table_data_model.h.

References m_variantNames.

◆ groupMatch()

◆ HasRowLabelExpanders()

bool FIELDS_TABLE_DATA_MODEL_BASE::HasRowLabelExpanders ( ) const
inlineoverridevirtualinherited

Show grouping controls in the row headers instead of row numbers.

Reimplemented from WX_GRID_TABLE_BASE.

Definition at line 201 of file fields_table_data_model.h.

◆ HasUndoStateSerialization()

bool FIELDS_TABLE_DATA_MODEL_BASE::HasUndoStateSerialization ( ) const
inlineoverridevirtualinherited

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 282 of file fields_table_data_model.h.

◆ initializeDataStoreItem()

template<typename ITEM_TYPE>
void FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::initializeDataStoreItem ( const ITEM_TYPE & aItem)
inlineprotected

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 1302 of file fields_table_data_model.h.

References initializeDataStoreItemField(), and FIELDS_TABLE_DATA_MODEL_BASE::m_cols.

◆ initializeDataStoreItemField()

template<typename ITEM_TYPE>
void FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::initializeDataStoreItemField ( const ITEM_TYPE & aItem,
const DATA_MODEL_COL & aCol )
inlineprotected

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 1288 of file fields_table_data_model.h.

References DATA_MODEL_COL::m_fieldName, FIELD_STORE_VALUE::m_present, DATA_MODEL_COL::m_userAdded, and storedField().

Referenced by AddColumn(), initializeDataStoreItem(), and refreshDataStoreItem().

◆ IsCellClear()

template<typename ITEM_TYPE>
bool FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::IsCellClear ( int aRow,
int aCol )
inlineoverridevirtual

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 482 of file fields_table_data_model.h.

References getStoredFieldValue(), FIELDS_TABLE_DATA_MODEL_BASE::m_cols, and m_rows.

◆ IsCellEdited()

template<typename ITEM_TYPE>
bool FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::IsCellEdited ( int aRow,
int aCol )
inlineoverridevirtual

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 503 of file fields_table_data_model.h.

References fieldIsModified(), FIELDS_TABLE_DATA_MODEL_BASE::m_cols, and m_rows.

◆ IsCellReadOnly()

template<typename ITEM_TYPE>
bool FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::IsCellReadOnly ( int aRow,
int aCol )
inlineoverridevirtual

◆ IsEdited()

bool FIELDS_TABLE_DATA_MODEL_BASE::IsEdited ( )
inlineinherited

Definition at line 155 of file fields_table_data_model.h.

References m_edited.

◆ IsEmptyCell()

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

Definition at line 174 of file fields_table_data_model.h.

◆ 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 529 of file fields_table_data_model.cpp.

References GetNumberCols(), and IsCellEdited().

◆ MatchesFilter()

◆ MoveColumn()

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

Definition at line 227 of file fields_table_data_model.cpp.

References m_cols.

Referenced by DIALOG_FIELDS_TABLE::OnColMove().

◆ RebuildRows()

◆ refreshDataStoreItem()

◆ RemoveColumn()

void FIELDS_TABLE_DATA_MODEL_BASE::RemoveColumn ( int aCol)
inherited

◆ RenameColumn()

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

Definition at line 305 of file fields_table_data_model.cpp.

Referenced by DIALOG_FIELDS_TABLE::OnRenameField().

◆ RenameStoredVariant()

void FIELDS_TABLE_DATA_MODEL_BASE::RenameStoredVariant ( const wxString & aOldName,
const wxString & aNewName )
inherited

◆ resolveStoredTextVar()

template<typename ITEM_TYPE>
bool FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::resolveStoredTextVar ( const ITEM_TYPE & aItem,
wxString * aToken,
bool aCaseSensitive = false ) const
inlineprotected

Resolve an ordinary field token from the current variant's staged values.

Return raw variable references so ResolveTextVars can expand nested fields with its depth limit. Tokens not tracked by the table must still be offered to the live item's resolver.

Definition at line 1149 of file fields_table_data_model.h.

References FIELDS_TABLE_DATA_MODEL_BASE::ColIsItemIdentifier(), getDataStoreKey(), FIELDS_TABLE_DATA_MODEL_BASE::GetFieldNameCol(), getStoredFieldValue(), IsGeneratedField(), FIELD_STORE_VALUE::m_baselinePresent, FIELDS_TABLE_DATA_MODEL_BASE::m_dataStore, FIELD_STORE_VALUE::m_present, name, and UnescapeString().

◆ resolveTextVars()

template<typename ITEM_TYPE>
virtual wxString FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::resolveTextVars ( const ITEM_TYPE & aItem,
const wxString & aText )
pure virtual

◆ RestoreUndoState()

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

◆ RevertRow()

template<typename ITEM_TYPE>
void FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::RevertRow ( int aRow)
inlineoverridevirtual

Go through and revert all the fields in the row to their live values from the item (symbol/footprint/etc).

Then recheck if any fields in the entire table are modified, and set edited state accordingly.

Implements FIELDS_TABLE_DATA_MODEL_BASE.

Reimplemented in SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL.

Definition at line 548 of file fields_table_data_model.h.

References FIELDS_TABLE_DATA_MODEL_BASE::m_cols, m_rows, updateDataStoreItemFieldFromLive(), and FIELDS_TABLE_DATA_MODEL_BASE::updateEditedState().

Referenced by SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::RevertRow().

◆ SerializeUndoState()

wxString FIELDS_TABLE_DATA_MODEL_BASE::SerializeUndoState ( ) const
overridevirtualinherited

Reimplemented from WX_GRID_TABLE_BASE.

Definition at line 862 of file fields_table_data_model.cpp.

References m_dataStore, and name.

◆ setCellValues()

template<typename ITEM_TYPE>
virtual void FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::setCellValues ( int aRow,
int aCol,
const std::vector< wxString > & aValues )
inlineprotectedvirtual

Write one value per item represented by the cell. Models may propagate shared storage.

Reimplemented in SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL.

Definition at line 1208 of file fields_table_data_model.h.

References FIELDS_TABLE_DATA_MODEL_BASE::m_cols, m_rows, and setStoredFieldValue().

Referenced by CopyCellFromVariant().

◆ SetColAttr()

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

Definition at line 90 of file wx_grid.h.

References m_colAttrs.

Referenced by DIALOG_FIELDS_TABLE::SetupColumnProperties().

◆ SetColLabelValue()

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

◆ SetCurrentVariant()

template<typename ITEM_TYPE>
void FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::SetCurrentVariant ( const wxString & aVariantName)
inlineoverridevirtual

Select the displayed variant, retaining un-applied edits in every variant.

Refresh live baselines without replacing staged edits to unchanged fields. Cells that differ from the default (non-variant) value will be highlighted.

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

Implements FIELDS_TABLE_DATA_MODEL_BASE.

Definition at line 395 of file fields_table_data_model.h.

References FIELDS_TABLE_DATA_MODEL_BASE::commitPendingGridChanges(), getAllItems(), GetDefaultVariantName(), FIELDS_TABLE_DATA_MODEL_BASE::m_currentVariant, refreshDataStoreItem(), and FIELDS_TABLE_DATA_MODEL_BASE::updateEditedState().

Referenced by BOOST_FIXTURE_TEST_CASE(), EESCHEMA_JOBS_HANDLER::JobExportBom(), and PCBNEW_JOBS_HANDLER::JobExportBom().

◆ SetExcludeDNP()

void FIELDS_TABLE_DATA_MODEL_BASE::SetExcludeDNP ( bool aExclude)
inlineinherited

Definition at line 232 of file fields_table_data_model.h.

References m_excludeDNP.

Referenced by ApplyBomPreset().

◆ SetFieldsOrder()

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

Definition at line 399 of file fields_table_data_model.cpp.

References commitPendingGridChanges(), and m_cols.

Referenced by ApplyBomPreset().

◆ SetFilter()

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

Definition at line 214 of file fields_table_data_model.h.

References m_filter.

Referenced by ApplyBomPreset(), and DIALOG_FIELDS_TABLE::OnFilterText().

◆ SetFilterScope()

void FIELDS_TABLE_DATA_MODEL_BASE::SetFilterScope ( BOM_FILTER_SCOPE aScope)
inlineinherited

Definition at line 216 of file fields_table_data_model.h.

References m_filterScope.

Referenced by ApplyBomPreset(), and DIALOG_FIELDS_TABLE::OnFilterScope().

◆ SetGroupColumn()

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

◆ SetGroupingEnabled()

void FIELDS_TABLE_DATA_MODEL_BASE::SetGroupingEnabled ( bool aGroup)
inlineinherited

◆ SetIncludeExcludedFromBOM()

void FIELDS_TABLE_DATA_MODEL_BASE::SetIncludeExcludedFromBOM ( bool aInclude)
inlineinherited

Definition at line 229 of file fields_table_data_model.h.

References m_includeExcluded.

Referenced by ApplyBomPreset(), and DIALOG_FIELDS_TABLE::PreviewRefresh().

◆ SetSelectionItems()

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

Definition at line 219 of file fields_table_data_model.h.

References m_selectionItems.

◆ SetShowColumn()

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

◆ SetSorting()

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

◆ setStoredFieldValue()

template<typename ITEM_TYPE>
void FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::setStoredFieldValue ( const ITEM_TYPE & aItem,
const wxString & aFieldName,
const wxString & aValue )
inlineprotected

Creates or updates a field in the data store.

Always marks the field present as a result.

Definition at line 1199 of file fields_table_data_model.h.

References FIELDS_TABLE_DATA_MODEL_BASE::fieldVariant(), FIELDS_TABLE_DATA_MODEL_BASE::m_currentVariant, FIELD_STORE_VALUE::m_present, FIELD_STORE_VALUE::m_variants, and storedField().

Referenced by setCellValues().

◆ SetVariantNames()

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

◆ Sort()

template<typename ITEM_TYPE>
void FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::Sort ( )
inlineprotected

◆ storedField() [1/2]

template<typename ITEM_TYPE>
FIELD_STORE_VALUE & FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::storedField ( const ITEM_TYPE & aItem,
const wxString & aFieldName )
inlineprotected

◆ storedField() [2/2]

◆ storedFieldIsRemoved()

template<typename ITEM_TYPE>
bool FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::storedFieldIsRemoved ( const ITEM_TYPE & aItem,
const wxString & aName ) const
inlineprotected

◆ storedVariants()

template<typename ITEM_TYPE>
std::set< wxString > FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::storedVariants ( const ITEM_TYPE & aItem) const
inlineprotected

◆ unitMatch()

template<typename ITEM_TYPE>
virtual bool FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::unitMatch ( const ITEM_TYPE & lhItem,
const ITEM_TYPE & rhItem )
protectedpure virtual

◆ updateDataStoreItemFieldFromLive()

template<typename ITEM_TYPE>
void FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::updateDataStoreItemFieldFromLive ( const ITEM_TYPE & aItem,
const wxString & aFieldName,
bool aAllVariants = false )
inlineprotected

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 1259 of file fields_table_data_model.h.

References FIELDS_TABLE_DATA_MODEL_BASE::fieldVariant(), getLiveFieldValueForVariant(), FIELD_STORE_VALUE::m_baselinePresent, FIELDS_TABLE_DATA_MODEL_BASE::m_currentVariant, FIELD_STORE_VALUE::m_present, FIELD_STORE_VALUE::m_variants, and storedField().

Referenced by acceptDataStoreItem(), and RevertRow().

◆ updateEditedState()

Member Data Documentation

◆ ITEM_NUMBER_VARIABLE

const wxString FIELDS_TABLE_DATA_MODEL_BASE::ITEM_NUMBER_VARIABLE = wxS( "${ITEM_NUMBER}" )
staticinherited

◆ m_colAttrs

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

◆ m_cols

◆ m_currentVariant

◆ m_dataStore

◆ m_edited

◆ 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

◆ m_groupingEnabled

bool FIELDS_TABLE_DATA_MODEL_BASE::m_groupingEnabled
protectedinherited

◆ m_includeExcluded

bool FIELDS_TABLE_DATA_MODEL_BASE::m_includeExcluded
protectedinherited

◆ m_rebuildsEnabled

bool FIELDS_TABLE_DATA_MODEL_BASE::m_rebuildsEnabled
protectedinherited

◆ m_resolvedTextRenderer

wxGridCellRenderer* FIELDS_TABLE_DATA_MODEL_BASE::m_resolvedTextRenderer
protectedinherited

◆ m_rows

◆ m_selectionItems

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

Items included by the user selection scope.

Definition at line 333 of file fields_table_data_model.h.

Referenced by ClearSelectionItems(), and SetSelectionItems().

◆ m_sortAscending

bool FIELDS_TABLE_DATA_MODEL_BASE::m_sortAscending
protectedinherited

Definition at line 324 of file fields_table_data_model.h.

Referenced by FIELDS_TABLE_DATA_MODEL_BASE(), GetSortAsc(), and SetSorting().

◆ m_sortColumn

int FIELDS_TABLE_DATA_MODEL_BASE::m_sortColumn
protectedinherited

Definition at line 323 of file fields_table_data_model.h.

Referenced by FIELDS_TABLE_DATA_MODEL_BASE(), GetSortCol(), and SetSorting().

◆ m_stripedRenderer

wxGridCellRenderer* FIELDS_TABLE_DATA_MODEL_BASE::m_stripedRenderer
protectedinherited

◆ m_variantNames

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

Variant names for multi-variant DNP filtering.

Definition at line 336 of file fields_table_data_model.h.

Referenced by GetVariantNames(), and SetVariantNames().

◆ QUANTITY_VARIABLE

const wxString FIELDS_TABLE_DATA_MODEL_BASE::QUANTITY_VARIABLE = wxS( "${QUANTITY}" )
staticinherited

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