|
KiCad PCB EDA Suite
|
#include <lib_fields_data_model.h>
Public Types | |
| enum | SCOPE : int { SCOPE_LIBRARY = 0 , SCOPE_RELATED_SYMBOLS } |
Public Member Functions | |
| LIB_FIELDS_EDITOR_GRID_DATA_MODEL (const std::vector< LIB_SYMBOL * > &aSymbolsList) | |
| void | CreateDerivedSymbolImmediate (int aRow, int aCol, wxString &aNewSymbolName) |
| wxString | GetTypeName (int row, int col) override |
| void | SetValue (int aRow, int aCol, const wxString &aValue) override |
| wxGridCellAttr * | GetAttr (int row, int col, wxGridCellAttr::wxAttrKind kind) override |
| bool | ColIsItemIdentifier (int aCol) const override |
| Reference for symbol/fields tables, lib_id for lib tables. | |
| const LIB_SYMBOL * | GetSymbolForRow (int aRow) |
| void | GetSymbolNames (wxArrayString &aList, SYMBOL_NAME_FILTER aFilter) |
| void | RebuildRows () override |
| void | SetScope (SCOPE aScope) |
| SCOPE | GetScope () |
| void | SetRelatedSymbolRoot (const wxString &aRootSymbolName) |
| void | ApplyData (std::function< void(LIB_SYMBOL *)> symbolChangeHandler, std::function< void()> postApplyHandler=nullptr) |
| bool | ValidateReferences (wxString &aSymbolName, wxString &aErrorMessage) const |
| std::vector< std::pair< LIB_SYMBOL *, wxString > > | GetAndClearCreatedDerivedSymbols () |
| Get and clear the list of newly created derived symbols for library manager processing. | |
| bool | IsRowSingleSymbol (int aRow) |
| bool | IsCellReadOnly (int aRow, int aCol) override |
| 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. | |
| 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< LIB_SYMBOL * > | 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< LIB_SYMBOL * > &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 | 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 | 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 | SYMBOL_NAME = wxS( "${SYMBOL_NAME}" ) |
| static const wxString | SYMBOL_KEYWORDS = wxS( "${SYMBOL_KEYWORDS}" ) |
| static const wxString | SYMBOL_IS_POWER = wxS( "${SYMBOL_IS_POWER}" ) |
| static const wxString | SYMBOL_IS_LOCAL_POWER = wxS( "${SYMBOL_IS_LOCAL_POWER}" ) |
| static const wxString | QUANTITY_VARIABLE |
| static const wxString | ITEM_NUMBER_VARIABLE |
Protected Member Functions | |
| bool | MatchesFilter (const LIB_SYMBOL *&aItem, const wxString &aReference, EDA_COMBINED_MATCHER &aMatcher) |
| virtual bool | attributeForcedOnBySheet (const LIB_SYMBOL *&aItem, const wxString &aAttributeName) const |
| Sheets can force all the symbols in them to have certain attributes on, like DNP. | |
| bool | allRowItemsHaveAttributeForcedOnBySheet (const DATA_MODEL_ROW< LIB_SYMBOL * > &aRow, int aCol) |
| bool | cmpRows (const DATA_MODEL_ROW< LIB_SYMBOL * > &lhRow, const DATA_MODEL_ROW< LIB_SYMBOL * > &rhRow, int aSortCol, bool aAscending) |
| virtual bool | cmpRowItems (const LIB_SYMBOL *&lhItem, const LIB_SYMBOL *&rhItem) |
| bool | groupMatch (const LIB_SYMBOL *&lhItem, const LIB_SYMBOL *&rhItem) |
| void | Sort () |
| const std::map< wxString, wxString > & | getStoredFields (const LIB_SYMBOL *&aItem) const |
| Returns all stored fields for an item without creating a data-store entry. | |
| bool | getStoredFieldValue (const LIB_SYMBOL *&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 LIB_SYMBOL *&aItem, const wxString &aFieldName, const wxString &aValue) |
| Creates or updates a field in the data store. | |
| void | ensureStoredFieldPresent (const LIB_SYMBOL *&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 LIB_SYMBOL *&aItem, const wxString &aFieldName) |
| Clears a field, e.g. | |
| bool | fieldIsModified (const LIB_SYMBOL *&aItem, const wxString &aFieldName) |
| Compares the live value of the field to the stored value in the data store. | |
| void | updateDataStoreItemFieldFromLive (const LIB_SYMBOL *&aItem, const wxString &aFieldName) |
| Updates the data store with the current value of the field from the live item. | |
| void | initializeDataStoreItemField (const LIB_SYMBOL *&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 LIB_SYMBOL *&aItem) |
| Initializes every column in the data store for a newly added (or refreshed) item. | |
| 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< LIB_SYMBOL * > | m_symbolsList |
| SCOPE | m_scope |
| wxString | m_relatedSymbolRoot |
| std::vector< std::pair< LIB_SYMBOL *, wxString > > | m_createdDerivedSymbols |
| std::vector< DATA_MODEL_ROW< LIB_SYMBOL * > > | 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_PATH > | m_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_COL > | m_cols |
| std::map< KIID_PATH, std::map< wxString, wxString > > | m_dataStore |
| std::map< int, wxGridCellAttr * > | m_colAttrs |
Private Member Functions | |
| bool | unitMatch (LIB_SYMBOL *const &lhItem, LIB_SYMBOL *const &rhItem) override |
| bool | fieldIsAttribute (const wxString &aFieldName) const override |
| bool | fieldIsItemProperty (const wxString &aFieldName) const override |
| wxString | getAttributeValue (const LIB_SYMBOL *, const wxString &aAttributeName) |
| void | setAttributeValue (LIB_SYMBOL *aSymbol, const wxString &aAttributeName, const wxString &aValue) |
| wxString | getAttributeResolvedValue (const wxString &aFieldName, bool aValue) const override |
| bool | isPowerSymbolControlledField (const wxString &aFieldName) const |
| bool | getStoredPowerSymbolValue (LIB_SYMBOL *aSymbol) const |
| void | setPowerSymbolDefaults (LIB_SYMBOL *aSymbol) |
| wxString | getFieldResolvedLiveValue (LIB_SYMBOL *const &aSymbol, 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 (LIB_SYMBOL *const &aSymbol, const wxString &aText) override |
| void | createActualDerivedSymbol (const LIB_SYMBOL *aParentSymbol, const wxString &aNewSymbolName, const KIID &aNewSymbolUuid) |
| bool | getLiveFieldValue (LIB_SYMBOL *const &aSymbol, const wxString &aFieldName, wxString &aValue) override |
| Gets the current value of the field from the live item, e.g. | |
| std::vector< LIB_SYMBOL * > | getAllItems () const override |
| KIID_PATH | getDataStoreKey (LIB_SYMBOL *const &aItem) const override |
| wxString | getItemIdentifier (LIB_SYMBOL *const &aItem) const override |
Definition at line 35 of file lib_fields_data_model.h.
| enum LIB_FIELDS_EDITOR_GRID_DATA_MODEL::SCOPE : int |
| Enumerator | |
|---|---|
| SCOPE_LIBRARY | |
| SCOPE_RELATED_SYMBOLS | |
Definition at line 38 of file lib_fields_data_model.h.
|
inline |
Definition at line 44 of file lib_fields_data_model.h.
References FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::m_includeExcluded, m_scope, m_symbolsList, and SCOPE_LIBRARY.
|
inlineoverridevirtualinherited |
Implements FIELDS_TABLE_DATA_MODEL_BASE.
Definition at line 360 of file fields_table_data_model.h.
|
inlineprotectedinherited |
Definition at line 817 of file fields_table_data_model.h.
|
inherited |
Definition at line 216 of file fields_table_data_model.cpp.
|
protectedinherited |
Definition at line 277 of file fields_table_data_model.cpp.
Referenced by LIB_FIELDS_EDITOR_GRID_DATA_MODEL::GetAttr().
| void LIB_FIELDS_EDITOR_GRID_DATA_MODEL::ApplyData | ( | std::function< void(LIB_SYMBOL *)> | symbolChangeHandler, |
| std::function< void()> | postApplyHandler = nullptr ) |
Definition at line 644 of file lib_fields_data_model.cpp.
References FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::ColIsAttribute(), getAttributeValue(), FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::GetFieldNameCol(), SCH_FIELD::GetId(), FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::getStoredFieldValue(), SCH_FIELD::GetText(), IsGeneratedField(), SCH_FIELD::IsMandatory(), SCH_ITEM::IsPrivate(), FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::m_cols, FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::m_edited, DATA_MODEL_COL::m_fieldName, m_symbolsList, setAttributeValue(), SCH_FIELD::SetPosition(), SCH_FIELD::SetText(), SYMBOL_IS_LOCAL_POWER, SYMBOL_IS_POWER, SYMBOL_KEYWORDS, SYMBOL_NAME, FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::updateDataStoreItemFieldFromLive(), USER, and VALUE.
|
protectedinherited |
Definition at line 278 of file fields_table_data_model.cpp.
|
protectedinherited |
Definition at line 272 of file fields_table_data_model.cpp.
Referenced by LIB_FIELDS_EDITOR_GRID_DATA_MODEL::GetAttr().
|
inlineprotectedvirtualinherited |
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 811 of file fields_table_data_model.h.
|
inherited |
Definition at line 225 of file fields_table_data_model.cpp.
|
protectedinherited |
Definition at line 271 of file fields_table_data_model.cpp.
Referenced by LIB_FIELDS_EDITOR_GRID_DATA_MODEL::GetAttr().
|
protectedinherited |
Definition at line 274 of file fields_table_data_model.cpp.
Referenced by LIB_FIELDS_EDITOR_GRID_DATA_MODEL::GetAttr().
|
inlineoverridevirtualinherited |
Clears the field from the data store, rather than setting its value to an empty string.
Implements FIELDS_TABLE_DATA_MODEL_BASE.
Definition at line 388 of file fields_table_data_model.h.
|
inlineinherited |
Definition at line 195 of file fields_table_data_model.h.
|
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.
|
protectedinherited |
Definition at line 275 of file fields_table_data_model.cpp.
Referenced by LIB_FIELDS_EDITOR_GRID_DATA_MODEL::GetAttr().
|
inlineprotectedvirtualinherited |
Definition at line 878 of file fields_table_data_model.h.
|
inlineprotectedinherited |
Definition at line 833 of file fields_table_data_model.h.
|
inherited |
|
inherited |
Definition at line 167 of file fields_table_data_model.cpp.
|
inherited |
Definition at line 158 of file fields_table_data_model.cpp.
|
overridevirtual |
Reference for symbol/fields tables, lib_id for lib tables.
Reimplemented from FIELDS_TABLE_DATA_MODEL_BASE.
Definition at line 129 of file lib_fields_data_model.cpp.
References FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::m_cols, and SYMBOL_NAME.
|
inherited |
Definition at line 156 of file fields_table_data_model.cpp.
|
inherited |
Definition at line 163 of file fields_table_data_model.cpp.
|
inherited |
Definition at line 155 of file fields_table_data_model.cpp.
|
virtualinherited |
Definition at line 175 of file fields_table_data_model.cpp.
|
inherited |
Definition at line 154 of file fields_table_data_model.cpp.
|
inherited |
Definition at line 157 of file fields_table_data_model.cpp.
|
inlineinherited |
Definition at line 572 of file fields_table_data_model.h.
|
inlineinherited |
Definition at line 543 of file fields_table_data_model.h.
|
protectedinherited |
Definition at line 281 of file fields_table_data_model.cpp.
|
private |
Definition at line 356 of file lib_fields_data_model.cpp.
References LIB_SYMBOL::GetLibId(), LIB_ID::GetLibNickname(), LIB_SYMBOL::GetName(), LIB_SYMBOL::GetValueField(), FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::initializeDataStoreItem(), m_createdDerivedSymbols, m_symbolsList, EDA_ITEM::m_Uuid, LIB_SYMBOL::SetName(), LIB_SYMBOL::SetParent(), SCH_FIELD::SetText(), and traceLibFieldTable.
Referenced by CreateDerivedSymbolImmediate().
| void LIB_FIELDS_EDITOR_GRID_DATA_MODEL::CreateDerivedSymbolImmediate | ( | int | aRow, |
| int | aCol, | ||
| wxString & | aNewSymbolName ) |
Definition at line 333 of file lib_fields_data_model.cpp.
References createActualDerivedSymbol(), LIB_SYMBOL::GetName(), FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::m_cols, FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::m_edited, FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::m_rows, RebuildRows(), and traceLibFieldTable.
|
inherited |
Definition at line 186 of file fields_table_data_model.cpp.
|
inherited |
Definition at line 185 of file fields_table_data_model.cpp.
|
protectedinherited |
Definition at line 104 of file wx_grid.cpp.
|
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.
|
inlineinherited |
Definition at line 585 of file fields_table_data_model.h.
|
inlineoverridevirtualinherited |
Implements FIELDS_TABLE_DATA_MODEL_BASE.
Definition at line 563 of file fields_table_data_model.h.
|
inlineinherited |
Definition at line 500 of file fields_table_data_model.h.
|
inherited |
Definition at line 218 of file fields_table_data_model.cpp.
|
overrideprivatevirtual |
Reimplemented from FIELDS_TABLE_DATA_MODEL_BASE.
Definition at line 136 of file lib_fields_data_model.cpp.
References FIELDS_TABLE_DATA_MODEL_BASE::fieldIsAttribute(), SYMBOL_IS_LOCAL_POWER, and SYMBOL_IS_POWER.
|
overrideprivatevirtual |
Reimplemented from FIELDS_TABLE_DATA_MODEL_BASE.
Definition at line 143 of file lib_fields_data_model.cpp.
References FIELDS_TABLE_DATA_MODEL_BASE::fieldIsItemProperty(), SYMBOL_KEYWORDS, and SYMBOL_NAME.
|
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.
Referenced by LIB_FIELDS_EDITOR_GRID_DATA_MODEL::GetAttr().
|
overrideprivatevirtual |
Implements FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >.
Definition at line 74 of file lib_fields_data_model.cpp.
References m_symbolsList.
|
inline |
Get and clear the list of newly created derived symbols for library manager processing.
Definition at line 100 of file lib_fields_data_model.h.
References m_createdDerivedSymbols, and result.
|
override |
Definition at line 179 of file lib_fields_data_model.cpp.
References FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::applyCellDecorations(), FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::applyResolvedTextRenderer(), FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::cellUsesResolvedTextRenderer(), FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::cellUsesUrlEditor(), FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::cloneUrlEditorAttr(), FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::ColIsAttribute(), FIELDS_TABLE_COLOR::EDITED_EMPTY_FIELD_BRIGHT_GREEN(), FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::fieldIsModified(), getLiveFieldValue(), FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::getStoredFieldValue(), IsCellReadOnly(), FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::m_colAttrs, FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::m_cols, FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::m_rows, FIELDS_TABLE_COLOR::STRIPED_CLEARED_EMPTY_FIELD_LIGHT_GREEN(), FIELDS_TABLE_COLOR::STRIPED_CLEARED_NONEMPTY_FIELD_LIGHT_RED(), FIELDS_TABLE_COLOR::STRIPED_EDITED_EMPTY_FIELD_MUTED_GREEN(), and FIELDS_TABLE_COLOR::STRIPED_EDITED_NONEMPTY_FIELD_MUTED_RED().
|
overrideprivatevirtual |
Reimplemented from FIELDS_TABLE_DATA_MODEL_BASE.
Definition at line 489 of file lib_fields_data_model.cpp.
References FIELDS_TABLE_DATA_MODEL_BASE::getAttributeResolvedValue(), SYMBOL_IS_LOCAL_POWER, and SYMBOL_IS_POWER.
|
private |
Definition at line 402 of file lib_fields_data_model.cpp.
References SYMBOL::GetDNP(), SYMBOL::GetExcludedFromBoard(), SYMBOL::GetExcludedFromBOM(), SYMBOL::GetExcludedFromPosFiles(), SYMBOL::GetExcludedFromSim(), LIB_SYMBOL::IsLocalPower(), LIB_SYMBOL::IsPower(), SYMBOL_IS_LOCAL_POWER, and SYMBOL_IS_POWER.
Referenced by ApplyData(), and getLiveFieldValue().
|
inherited |
Definition at line 217 of file fields_table_data_model.cpp.
|
inherited |
Definition at line 143 of file fields_table_data_model.cpp.
|
inherited |
Definition at line 142 of file fields_table_data_model.cpp.
|
overrideinherited |
Definition at line 141 of file fields_table_data_model.cpp.
|
inlineinherited |
Definition at line 244 of file fields_table_data_model.h.
|
overrideprivatevirtual |
Implements FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >.
Definition at line 854 of file lib_fields_data_model.cpp.
References EDA_ITEM::m_Uuid.
|
inlineinherited |
Definition at line 208 of file fields_table_data_model.h.
|
inlineoverridevirtualinherited |
Implements FIELDS_TABLE_DATA_MODEL_BASE.
Definition at line 733 of file fields_table_data_model.h.
|
inherited |
Definition at line 144 of file fields_table_data_model.cpp.
Referenced by LIB_FIELDS_EDITOR_GRID_DATA_MODEL::ApplyData(), LIB_FIELDS_EDITOR_GRID_DATA_MODEL::getLiveFieldValue(), LIB_FIELDS_EDITOR_GRID_DATA_MODEL::getStoredPowerSymbolValue(), and LIB_FIELDS_EDITOR_GRID_DATA_MODEL::setPowerSymbolDefaults().
|
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.
Implements FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >.
Definition at line 593 of file lib_fields_data_model.cpp.
References LIB_SYMBOL::GetField(), SCH_FIELD::GetShownText(), INTERNAL, IsGeneratedField(), SCH_ITEM::IsPrivate(), LIB_SYMBOL::ResolveTextVar(), and ResolveTextVars().
|
inherited |
Definition at line 146 of file fields_table_data_model.cpp.
|
inlineinherited |
Definition at line 190 of file fields_table_data_model.h.
|
inlineinherited |
Definition at line 192 of file fields_table_data_model.h.
|
inherited |
Definition at line 211 of file fields_table_data_model.cpp.
|
inlineinherited |
Definition at line 594 of file fields_table_data_model.h.
|
inlineinherited |
Definition at line 198 of file fields_table_data_model.h.
|
inlineinherited |
Definition at line 205 of file fields_table_data_model.h.
|
overrideprivatevirtual |
Implements FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >.
Definition at line 862 of file lib_fields_data_model.cpp.
References LIB_SYMBOL::GetName().
|
overrideprivatevirtual |
Gets the current value of the field from the live item, e.g.
from the symbol on the schematic.
Implements FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >.
Definition at line 42 of file lib_fields_data_model.cpp.
References FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::ColIsAttribute(), getAttributeValue(), LIB_SYMBOL::GetField(), FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::GetFieldNameCol(), LIB_SYMBOL::GetKeyWords(), LIB_SYMBOL::GetName(), SYMBOL_KEYWORDS, and SYMBOL_NAME.
Referenced by GetAttr().
|
inlineoverrideinherited |
Definition at line 138 of file fields_table_data_model.h.
|
inlineoverrideinherited |
Definition at line 445 of file fields_table_data_model.h.
|
inlineoverridevirtualinherited |
Implements FIELDS_TABLE_DATA_MODEL_BASE.
Definition at line 728 of file fields_table_data_model.h.
|
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.
|
inlineinherited |
Definition at line 462 of file fields_table_data_model.h.
|
inlineoverridevirtualinherited |
Reimplemented from WX_GRID_TABLE_BASE.
Definition at line 446 of file fields_table_data_model.h.
|
inline |
Definition at line 90 of file lib_fields_data_model.h.
References m_scope.
|
inherited |
Definition at line 214 of file fields_table_data_model.cpp.
|
inlineinherited |
Definition at line 181 of file fields_table_data_model.h.
|
inlineinherited |
Definition at line 180 of file fields_table_data_model.h.
|
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.
|
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.
Definition at line 1019 of file fields_table_data_model.h.
Referenced by LIB_FIELDS_EDITOR_GRID_DATA_MODEL::ApplyData(), LIB_FIELDS_EDITOR_GRID_DATA_MODEL::GetAttr(), LIB_FIELDS_EDITOR_GRID_DATA_MODEL::getStoredPowerSymbolValue(), and LIB_FIELDS_EDITOR_GRID_DATA_MODEL::ValidateReferences().
|
private |
Definition at line 459 of file lib_fields_data_model.cpp.
References FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::GetFieldNameCol(), FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::getStoredFieldValue(), LIB_SYMBOL::IsPower(), and SYMBOL_IS_POWER.
Referenced by IsCellReadOnly(), and SetValue().
|
inline |
Definition at line 65 of file lib_fields_data_model.h.
References FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::m_rows.
|
inline |
Definition at line 71 of file lib_fields_data_model.h.
References DERIVED_ONLY, m_symbolsList, ROOT_ONLY, and UnescapeString().
|
override |
Definition at line 845 of file lib_fields_data_model.cpp.
References FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::ColIsAttribute().
|
inlineoverrideinherited |
Definition at line 720 of file fields_table_data_model.h.
|
inlineinherited |
Definition at line 247 of file fields_table_data_model.h.
|
inlineprotectedinherited |
Definition at line 885 of file fields_table_data_model.h.
Referenced by LIB_FIELDS_EDITOR_GRID_DATA_MODEL::RebuildRows().
|
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.
|
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 LIB_FIELDS_EDITOR_GRID_DATA_MODEL::createActualDerivedSymbol().
|
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.
|
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.
|
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.
|
overridevirtual |
Reimplemented from FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >.
Definition at line 150 of file lib_fields_data_model.cpp.
References getStoredPowerSymbolValue(), FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::IsCellReadOnly(), isPowerSymbolControlledField(), FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::m_cols, FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::m_rows, and SYMBOL_IS_LOCAL_POWER.
Referenced by GetAttr(), and SetValue().
|
inlineinherited |
Definition at line 130 of file fields_table_data_model.h.
|
inlineoverrideinherited |
Definition at line 149 of file fields_table_data_model.h.
|
overrideinherited |
Definition at line 176 of file fields_table_data_model.cpp.
|
private |
Definition at line 449 of file lib_fields_data_model.cpp.
References GetDefaultFieldName(), UNTRANSLATED, and VALUE.
Referenced by IsCellReadOnly(), and SetValue().
|
inherited |
Return true if any cell in the row has been edited.
Definition at line 229 of file fields_table_data_model.cpp.
|
inline |
Definition at line 107 of file lib_fields_data_model.h.
References FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::m_rows.
|
inlineprotectedinherited |
Definition at line 747 of file fields_table_data_model.h.
Referenced by LIB_FIELDS_EDITOR_GRID_DATA_MODEL::RebuildRows().
|
inherited |
Definition at line 134 of file fields_table_data_model.cpp.
|
overridevirtual |
Implements FIELDS_TABLE_DATA_MODEL_BASE.
Definition at line 503 of file lib_fields_data_model.cpp.
References CTX_SEARCH, FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::groupMatch(), FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::m_excludeDNP, FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::m_filter, FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::m_groupingEnabled, FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::m_includeExcluded, FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::m_rebuildsEnabled, m_relatedSymbolRoot, FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::m_rows, m_scope, m_symbolsList, FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::MatchesFilter(), FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::Sort(), and traceLibFieldTable.
Referenced by CreateDerivedSymbolImmediate().
|
inherited |
Definition at line 135 of file fields_table_data_model.cpp.
|
inherited |
Definition at line 136 of file fields_table_data_model.cpp.
|
overrideprivatevirtual |
Implements FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >.
Definition at line 625 of file lib_fields_data_model.cpp.
References LIB_SYMBOL::ResolveTextVar(), and ResolveTextVars().
|
overrideinherited |
Definition at line 253 of file fields_table_data_model.cpp.
|
inlineoverridevirtualinherited |
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.
Definition at line 474 of file fields_table_data_model.h.
|
overrideinherited |
Definition at line 252 of file fields_table_data_model.cpp.
|
private |
Definition at line 430 of file lib_fields_data_model.cpp.
References SYMBOL::SetDNP(), SYMBOL::SetExcludedFromBoard(), SYMBOL::SetExcludedFromBOM(), SYMBOL::SetExcludedFromPosFiles(), and SYMBOL::SetExcludedFromSim().
Referenced by ApplyData().
|
inlineoverrideinherited |
|
overrideinherited |
Definition at line 140 of file fields_table_data_model.cpp.
|
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.
| aVariantName | The name of the current variant, or empty string for default. |
Definition at line 243 of file fields_table_data_model.h.
|
inlineinherited |
Definition at line 207 of file fields_table_data_model.h.
|
inherited |
Definition at line 147 of file fields_table_data_model.cpp.
|
inlineinherited |
Definition at line 189 of file fields_table_data_model.h.
|
inlineinherited |
Definition at line 191 of file fields_table_data_model.h.
|
inherited |
Definition at line 210 of file fields_table_data_model.cpp.
|
inlineinherited |
Definition at line 197 of file fields_table_data_model.h.
|
inlineinherited |
Definition at line 204 of file fields_table_data_model.h.
|
private |
Definition at line 470 of file lib_fields_data_model.cpp.
References GetDefaultFieldName(), FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::GetFieldNameCol(), LIB_SYMBOL::GetName(), FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::setStoredFieldValue(), UNTRANSLATED, and VALUE.
Referenced by SetValue().
|
inline |
Definition at line 92 of file lib_fields_data_model.h.
References m_relatedSymbolRoot.
|
inline |
Definition at line 89 of file lib_fields_data_model.h.
References m_scope.
|
inlineinherited |
Definition at line 194 of file fields_table_data_model.h.
|
inherited |
Definition at line 213 of file fields_table_data_model.cpp.
|
inherited |
Definition at line 179 of file fields_table_data_model.cpp.
|
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 LIB_FIELDS_EDITOR_GRID_DATA_MODEL::setPowerSymbolDefaults(), and LIB_FIELDS_EDITOR_GRID_DATA_MODEL::SetValue().
|
override |
Definition at line 80 of file lib_fields_data_model.cpp.
References GetDefaultFieldName(), LIB_SYMBOL::GetName(), getStoredPowerSymbolValue(), INDETERMINATE_STATE, IsCellReadOnly(), isPowerSymbolControlledField(), FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::m_cols, FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::m_edited, DATA_MODEL_ROW< ITEM_TYPE >::m_items, FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::m_rows, setPowerSymbolDefaults(), FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::setStoredFieldValue(), SYMBOL_IS_LOCAL_POWER, SYMBOL_IS_POWER, UNTRANSLATED, and VALUE.
|
inlineinherited |
Definition at line 246 of file fields_table_data_model.h.
|
inlineprotectedinherited |
Definition at line 957 of file fields_table_data_model.h.
Referenced by LIB_FIELDS_EDITOR_GRID_DATA_MODEL::RebuildRows().
|
overrideprivatevirtual |
Implements FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >.
Definition at line 587 of file lib_fields_data_model.cpp.
|
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 LIB_FIELDS_EDITOR_GRID_DATA_MODEL::ApplyData().
| bool LIB_FIELDS_EDITOR_GRID_DATA_MODEL::ValidateReferences | ( | wxString & | aSymbolName, |
| wxString & | aErrorMessage ) const |
Definition at line 819 of file lib_fields_data_model.cpp.
References GetDefaultFieldName(), GetFieldValidationErrorMessage(), FIELDS_TABLE_DATA_MODEL< LIB_SYMBOL * >::getStoredFieldValue(), m_symbolsList, REFERENCE, UnescapeString(), and UNTRANSLATED.
|
staticinherited |
Definition at line 128 of file fields_table_data_model.h.
|
protectedinherited |
Definition at line 108 of file wx_grid.h.
Referenced by LIB_FIELDS_EDITOR_GRID_DATA_MODEL::GetAttr().
|
protectedinherited |
Definition at line 304 of file fields_table_data_model.h.
Referenced by LIB_FIELDS_EDITOR_GRID_DATA_MODEL::ApplyData(), LIB_FIELDS_EDITOR_GRID_DATA_MODEL::ColIsItemIdentifier(), LIB_FIELDS_EDITOR_GRID_DATA_MODEL::CreateDerivedSymbolImmediate(), LIB_FIELDS_EDITOR_GRID_DATA_MODEL::GetAttr(), LIB_FIELDS_EDITOR_GRID_DATA_MODEL::IsCellReadOnly(), and LIB_FIELDS_EDITOR_GRID_DATA_MODEL::SetValue().
|
protected |
Definition at line 148 of file lib_fields_data_model.h.
Referenced by createActualDerivedSymbol(), and GetAndClearCreatedDerivedSymbols().
|
protectedinherited |
Current variant name for highlighting.
Definition at line 300 of file fields_table_data_model.h.
|
protectedinherited |
Definition at line 328 of file fields_table_data_model.h.
|
protectedinherited |
Definition at line 287 of file fields_table_data_model.h.
Referenced by LIB_FIELDS_EDITOR_GRID_DATA_MODEL::ApplyData(), LIB_FIELDS_EDITOR_GRID_DATA_MODEL::CreateDerivedSymbolImmediate(), and LIB_FIELDS_EDITOR_GRID_DATA_MODEL::SetValue().
|
protectedinherited |
Definition at line 293 of file fields_table_data_model.h.
Referenced by LIB_FIELDS_EDITOR_GRID_DATA_MODEL::RebuildRows().
|
protectedinherited |
Definition at line 290 of file fields_table_data_model.h.
Referenced by LIB_FIELDS_EDITOR_GRID_DATA_MODEL::RebuildRows().
|
protectedinherited |
Definition at line 291 of file fields_table_data_model.h.
|
protectedinherited |
Definition at line 292 of file fields_table_data_model.h.
Referenced by LIB_FIELDS_EDITOR_GRID_DATA_MODEL::RebuildRows().
|
protectedinherited |
Definition at line 294 of file fields_table_data_model.h.
Referenced by LIB_FIELDS_EDITOR_GRID_DATA_MODEL::LIB_FIELDS_EDITOR_GRID_DATA_MODEL(), and LIB_FIELDS_EDITOR_GRID_DATA_MODEL::RebuildRows().
|
protectedinherited |
Items included by the user selection scope.
Definition at line 295 of file fields_table_data_model.h.
Referenced by LIB_FIELDS_EDITOR_GRID_DATA_MODEL::RebuildRows().
|
protected |
Definition at line 145 of file lib_fields_data_model.h.
Referenced by RebuildRows(), and SetRelatedSymbolRoot().
|
protectedinherited |
Definition at line 285 of file fields_table_data_model.h.
|
protectedinherited |
Definition at line 1139 of file fields_table_data_model.h.
Referenced by LIB_FIELDS_EDITOR_GRID_DATA_MODEL::CreateDerivedSymbolImmediate(), LIB_FIELDS_EDITOR_GRID_DATA_MODEL::GetAttr(), LIB_FIELDS_EDITOR_GRID_DATA_MODEL::GetSymbolForRow(), LIB_FIELDS_EDITOR_GRID_DATA_MODEL::IsCellReadOnly(), LIB_FIELDS_EDITOR_GRID_DATA_MODEL::IsRowSingleSymbol(), LIB_FIELDS_EDITOR_GRID_DATA_MODEL::RebuildRows(), and LIB_FIELDS_EDITOR_GRID_DATA_MODEL::SetValue().
|
protected |
Definition at line 144 of file lib_fields_data_model.h.
Referenced by GetScope(), LIB_FIELDS_EDITOR_GRID_DATA_MODEL(), RebuildRows(), and SetScope().
|
protectedinherited |
Definition at line 298 of file fields_table_data_model.h.
|
protectedinherited |
Definition at line 289 of file fields_table_data_model.h.
|
protectedinherited |
Definition at line 288 of file fields_table_data_model.h.
|
protectedinherited |
Definition at line 284 of file fields_table_data_model.h.
|
protected |
Definition at line 143 of file lib_fields_data_model.h.
Referenced by ApplyData(), createActualDerivedSymbol(), getAllItems(), GetSymbolNames(), LIB_FIELDS_EDITOR_GRID_DATA_MODEL(), RebuildRows(), and ValidateReferences().
|
protectedinherited |
Variant names for multi-variant DNP filtering.
Definition at line 301 of file fields_table_data_model.h.
|
staticinherited |
Definition at line 127 of file fields_table_data_model.h.
|
static |
Definition at line 54 of file lib_fields_data_model.h.
Referenced by ApplyData(), fieldIsAttribute(), getAttributeResolvedValue(), getAttributeValue(), DIALOG_LIB_FIELDS_TABLE::getBuiltInBomPresets(), IsCellReadOnly(), DIALOG_LIB_FIELDS_TABLE::LoadFieldNames(), and SetValue().
|
static |
Definition at line 53 of file lib_fields_data_model.h.
Referenced by ApplyData(), fieldIsAttribute(), getAttributeResolvedValue(), getAttributeValue(), DIALOG_LIB_FIELDS_TABLE::getBuiltInBomPresets(), getStoredPowerSymbolValue(), DIALOG_LIB_FIELDS_TABLE::LoadFieldNames(), and SetValue().
|
static |
Definition at line 52 of file lib_fields_data_model.h.
Referenced by ApplyData(), fieldIsItemProperty(), DIALOG_LIB_FIELDS_TABLE::getBuiltInBomPresets(), getLiveFieldValue(), and DIALOG_LIB_FIELDS_TABLE::LoadFieldNames().
|
static |
Definition at line 51 of file lib_fields_data_model.h.
Referenced by ApplyData(), ColIsItemIdentifier(), fieldIsItemProperty(), DIALOG_LIB_FIELDS_TABLE::getBuiltInBomPresets(), getLiveFieldValue(), and DIALOG_LIB_FIELDS_TABLE::LoadFieldNames().