59 void SetValue(
int aRow,
int aCol,
const wxString& aValue )
override;
61 wxGridCellAttr*
GetAttr(
int row,
int col, wxGridCellAttr::wxAttrKind kind )
override;
67 wxCHECK( aRow >= 0 && aRow < (
int)
m_rows.size(),
nullptr );
68 return m_rows[aRow].m_items[0];
95 std::function<
void()> postApplyHandler =
nullptr );
109 wxCHECK_MSG( aRow >= 0 && aRow < (
int)
m_rows.size(),
false,
"Invalid Row Number" );
110 return m_rows[aRow].m_state == ROW_STATE::NON_EXPANDABLE
111 ||
m_rows[aRow].m_state == ROW_STATE::EXPANDED_CHILD;
134 const KIID& aNewSymbolUuid );
137 std::vector<LIB_SYMBOL*>
getAllItems()
const override;
The rest of the generic fields data model stuff, primarily around row functionality.
std::vector< DATA_MODEL_ROW< LIB_SYMBOL * > > m_rows
static const wxString SYMBOL_KEYWORDS
bool fieldIsItemProperty(const wxString &aFieldName) const override
void SetValue(int aRow, int aCol, const wxString &aValue) override
wxString getAttributeResolvedValue(const wxString &aFieldName, bool aValue) const override
wxString getAttributeValue(const LIB_SYMBOL *, const wxString &aAttributeName)
std::vector< std::pair< LIB_SYMBOL *, wxString > > m_createdDerivedSymbols
std::vector< LIB_SYMBOL * > getAllItems() const override
bool IsCellReadOnly(int aRow, int aCol) override
KIID_PATH getDataStoreKey(LIB_SYMBOL *const &aItem) const override
wxGridCellAttr * GetAttr(int row, int col, wxGridCellAttr::wxAttrKind kind) override
void RebuildRows() override
static const wxString SYMBOL_NAME
void SetRelatedSymbolRoot(const wxString &aRootSymbolName)
LIB_FIELDS_EDITOR_GRID_DATA_MODEL(const std::vector< LIB_SYMBOL * > &aSymbolsList)
static const wxString SYMBOL_IS_POWER
void GetSymbolNames(wxArrayString &aList, SYMBOL_NAME_FILTER aFilter)
bool ColIsItemIdentifier(int aCol) const override
Reference for symbol/fields tables, lib_id for lib tables.
void CreateDerivedSymbolImmediate(int aRow, int aCol, wxString &aNewSymbolName)
bool getStoredPowerSymbolValue(LIB_SYMBOL *aSymbol) const
void SetScope(SCOPE aScope)
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 valu...
void createActualDerivedSymbol(const LIB_SYMBOL *aParentSymbol, const wxString &aNewSymbolName, const KIID &aNewSymbolUuid)
bool fieldIsAttribute(const wxString &aFieldName) const override
void ApplyData(std::function< void(LIB_SYMBOL *)> symbolChangeHandler, std::function< void()> postApplyHandler=nullptr)
static const wxString SYMBOL_IS_LOCAL_POWER
std::vector< LIB_SYMBOL * > m_symbolsList
void setAttributeValue(LIB_SYMBOL *aSymbol, const wxString &aAttributeName, const wxString &aValue)
bool unitMatch(LIB_SYMBOL *const &lhItem, LIB_SYMBOL *const &rhItem) override
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.
wxString getItemIdentifier(LIB_SYMBOL *const &aItem) const override
bool IsRowSingleSymbol(int aRow)
std::vector< std::pair< LIB_SYMBOL *, wxString > > GetAndClearCreatedDerivedSymbols()
Get and clear the list of newly created derived symbols for library manager processing.
wxString GetTypeName(int row, int col) override
bool isPowerSymbolControlledField(const wxString &aFieldName) const
const LIB_SYMBOL * GetSymbolForRow(int aRow)
wxString resolveTextVars(LIB_SYMBOL *const &aSymbol, const wxString &aText) override
wxString m_relatedSymbolRoot
void setPowerSymbolDefaults(LIB_SYMBOL *aSymbol)
bool ValidateReferences(wxString &aSymbolName, wxString &aErrorMessage) const
Define a library symbol object.
DATA_MODEL_ROW< LIB_SYMBOL * > LIB_FIELDS_TABLE_DATA_MODEL_ROW
wxString UnescapeString(const wxString &aSource)
wxString result
Test unit parsing edge cases and error handling.