33#define DISPLAY_NAME_COLUMN   0      
   35#define SHOW_FIELD_COLUMN     2 
   36#define GROUP_BY_COLUMN       3 
   37#define VIEW_FIELDS_COL_COUNT 4 
   60    bool CanGetValueAs( 
int aRow, 
int aCol, 
const wxString& aTypeName )
 override 
   65        case LABEL_COLUMN:        
return aTypeName == wxGRID_VALUE_STRING;
 
   70        default:                  wxFAIL; 
return false;
 
 
   74    bool CanSetValueAs( 
int aRow, 
int aCol, 
const wxString& aTypeName )
 override 
 
   79    wxString 
GetValue( 
int aRow, 
int aCol ) 
override;
 
   82    void SetValue( 
int aRow, 
int aCol, 
const wxString& aValue ) 
override;
 
   85    void AppendRow( 
const wxString& aFieldName, 
const wxString& aBOMName, 
bool aShow, 
bool aGroupBy );
 
 
  102        m_Refs.push_back( aFirstReference );
 
 
 
  155    void AddColumn( 
const wxString& aFieldName, 
const wxString& aLabel, 
bool aAddedByUser,
 
  156                    const std::set<wxString>& aVariantNames );
 
  162        wxCHECK_RET( aCol >= 0 && aCol < 
static_cast<int>( 
m_cols.size() ), 
"Invalid Column Number" );
 
  164        if( aCol == aNewPos )
 
  168        else if( aCol < aNewPos )
 
  170            std::rotate( std::begin( 
m_cols ) + aCol, std::begin( 
m_cols ) + aCol + 1,
 
  171                         std::begin( 
m_cols ) + aNewPos + 1 );
 
  175            std::rotate( std::begin( 
m_cols ) + aNewPos, std::begin( 
m_cols ) + aCol,
 
  176                         std::begin( 
m_cols ) + aCol + 1 );
 
 
  185        wxCHECK_RET( aCol >= 0 && aCol < 
static_cast<int>( 
m_cols.size() ), 
"Invalid Column Number" );
 
  186        m_cols[aCol].m_label = aLabel;
 
 
  191        wxCHECK( aCol >= 0 && aCol < 
static_cast<int>( 
m_cols.size() ), wxString() );
 
  192        return m_cols[aCol].m_label;
 
 
  197        wxCHECK( aCol >= 0 && aCol < 
static_cast<int>( 
m_cols.size() ), wxString() );
 
  198        return m_cols[aCol].m_fieldName;
 
 
  211    wxString 
GetValue( 
int aRow, 
int aCol ) 
override;
 
  212    wxGridCellAttr* 
GetAttr( 
int aRow, 
int aCol, wxGridCellAttr::wxAttrKind aKind ) 
override;
 
  215                       const wxString& refDelimiter = wxT( 
", " ),
 
  216                       const wxString& refRangDelimiter = wxT( 
"-" ),
 
  217                       bool resolveVars = 
false,
 
  218                       bool listMixedValues = 
false );
 
  221                             const wxString& refRangeDelimiter )
 
  223        return GetValue( 
m_rows[aRow], aCol, refDelimiter, refRangeDelimiter, 
true, 
true );
 
 
  226    void     SetValue( 
int aRow, 
int aCol, 
const wxString& aValue ) 
override;
 
  232        wxCHECK( aRow >= 0 && aRow < (
int) 
m_rows.size(), std::vector<SCH_REFERENCE>() );
 
  233        return m_rows[aRow].m_Refs;
 
 
  245        return m_rows[aRow].m_Flag;
 
 
  250        wxCHECK_RET( aCol >= 0 && aCol < (
int) 
m_cols.size(), 
"Invalid Column Number" );
 
 
  300        wxCHECK_RET( aCol >= 0 && aCol < (
int) 
m_cols.size(), 
"Invalid Column Number" );
 
 
  306        wxCHECK_MSG( aCol >= 0 && aCol < (
int) 
m_cols.size(), 
false, 
"Invalid Column Number" );
 
  307        return m_cols[aCol].m_group;
 
 
  312        wxCHECK_RET( aCol >= 0 && aCol < (
int) 
m_cols.size(), 
"Invalid Column Number" );
 
  313        m_cols[aCol].m_show = show;
 
 
  318        wxCHECK_MSG( aCol >= 0 && aCol < (
int) 
m_cols.size(), 
false, 
"Invalid Column Number" );
 
  319        return m_cols[aCol].m_show;
 
 
  342                                const std::set<wxString>& aVariantNames );
 
  355                            const wxString& aVariantName = wxEmptyString );
 
  366                                     const std::set<wxString>& aVariantNames );
 
 
int GetFieldNameCol(const wxString &aFieldName) const
 
wxString GetColFieldName(int aCol)
 
void ApplyBomPreset(const BOM_PRESET &preset, const std::set< wxString > &aVariantNames)
 
std::vector< DATA_MODEL_ROW > m_rows
 
wxString getAttributeValue(const SCH_SYMBOL &, const wxString &aAttributeName, const std::set< wxString > &aVariantNames)
 
void SetFieldsOrder(const std::vector< wxString > &aNewOrder)
 
std::vector< SCH_REFERENCE > GetRowReferences(int aRow) const
 
void UpdateReferences(const SCH_REFERENCE_LIST &aRefs, const std::set< wxString > &aVariantNames)
 
SCH_REFERENCE_LIST m_symbolsList
The flattened by hierarchy list of symbols.
 
void SetGroupingEnabled(bool group)
 
bool ColIsItemNumber(int aCol)
 
int GetNumberCols() override
 
bool ColIsQuantity(int aCol)
 
bool GetGroupColumn(int aCol)
 
bool groupMatch(const SCH_REFERENCE &lhRef, const SCH_REFERENCE &rhRef)
 
wxGridCellAttr * m_urlEditor
 
const SCH_SHEET_PATH & GetPath()
 
wxString GetColLabelValue(int aCol) override
 
BOM_PRESET GetBomSettings()
 
void ApplyData(SCH_COMMIT &aCommit, TEMPLATES &aTemplateFieldnames, std::set< wxString > &aVariantNames)
 
void SetScope(SCOPE aScope)
 
bool unitMatch(const SCH_REFERENCE &lhRef, const SCH_REFERENCE &rhRef)
 
bool ColIsReference(int aCol)
 
wxString GetExportValue(int aRow, int aCol, const wxString &refDelimiter, const wxString &refRangeDelimiter)
 
bool GetGroupingEnabled()
 
void AddColumn(const wxString &aFieldName, const wxString &aLabel, bool aAddedByUser, const std::set< wxString > &aVariantNames)
 
void SetPath(const SCH_SHEET_PATH &aPath)
 
int GetNumberRows() override
 
void CollapseRow(int aRow)
 
wxString getFieldShownText(const SCH_REFERENCE &aRef, const wxString &aFieldName)
 
bool IsEmptyCell(int aRow, int aCol) override
 
GROUP_TYPE GetGroupType(int aRow) const override
 
void RenameColumn(int aCol, const wxString &newName)
 
FIELDS_EDITOR_GRID_DATA_MODEL(const SCH_REFERENCE_LIST &aSymbolsList, wxGridCellAttr *aURLEditor)
 
bool IsExpanderColumn(int aCol) const override
 
wxString Export(const BOM_FMT_PRESET &settings)
 
std::vector< DATA_MODEL_COL > m_cols
 
void SetSorting(int aCol, bool ascending)
 
void ExpandCollapseRow(int aRow)
 
wxGridCellAttr * GetAttr(int aRow, int aCol, wxGridCellAttr::wxAttrKind aKind) override
 
void SetFilter(const wxString &aFilter)
 
bool setAttributeValue(SCH_SYMBOL &aSymbol, const wxString &aAttributeName, const wxString &aValue, const wxString &aVariantName=wxEmptyString)
Set the attribute value.
 
static bool cmp(const DATA_MODEL_ROW &lhGroup, const DATA_MODEL_ROW &rhGroup, FIELDS_EDITOR_GRID_DATA_MODEL *dataModel, int sortCol, bool ascending)
 
static const wxString ITEM_NUMBER_VARIABLE
 
void SetIncludeExcludedFromBOM(bool include)
 
bool isAttribute(const wxString &aFieldName)
 
wxString GetValue(int aRow, int aCol) override
 
int GetDataWidth(int aCol)
 
void updateDataStoreSymbolField(const SCH_REFERENCE &aSymbolRef, const wxString &aFieldName, const std::set< wxString > &aVariantNames)
 
void RemoveColumn(int aCol)
 
~FIELDS_EDITOR_GRID_DATA_MODEL() override
 
GROUP_TYPE GetRowFlags(int aRow)
 
const wxString & GetFilter()
 
static const wxString QUANTITY_VARIABLE
 
bool ColIsValue(int aCol)
 
void SetGroupColumn(int aCol, bool group)
 
void SetExcludeDNP(bool exclude)
 
void RemoveSymbol(const SCH_SYMBOL &aSymbol)
 
std::vector< BOM_FIELD > GetFieldsOrdered()
 
void SetValue(int aRow, int aCol, const wxString &aValue) override
 
std::map< KIID_PATH, std::map< wxString, wxString > > m_dataStore
 
bool ColIsAttribute(int aCol)
 
bool GetShowColumn(int aCol)
 
void SetColLabelValue(int aCol, const wxString &aLabel) override
 
void MoveColumn(int aCol, int aNewPos)
 
void RemoveReferences(const SCH_REFERENCE_LIST &aRefs)
 
bool GetIncludeExcludedFromBOM()
 
void SetShowColumn(int aCol, bool show)
 
void AddReferences(const SCH_REFERENCE_LIST &aRefs)
 
Container to create a flattened list of symbols because in a complex hierarchy, a symbol can be used ...
 
A helper to define a symbol's reference designator in a schematic.
 
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
 
VIEW_CONTROLS_GRID_DATA_MODEL(bool aForBOM)
 
bool IsEmptyCell(int aRow, int aCol) override
 
void SetValueAsBool(int aRow, int aCol, bool aValue) override
 
wxString GetCanonicalFieldName(int aRow)
 
~VIEW_CONTROLS_GRID_DATA_MODEL() override=default
 
wxString GetColLabelValue(int aCol) override
 
std::vector< BOM_FIELD > m_fields
 
void SetValue(int aRow, int aCol, const wxString &aValue) override
 
int GetNumberRows() override
 
void AppendRow(const wxString &aFieldName, const wxString &aBOMName, bool aShow, bool aGroupBy)
 
bool CanSetValueAs(int aRow, int aCol, const wxString &aTypeName) override
 
bool GetValueAsBool(int aRow, int aCol) override
 
bool CanGetValueAs(int aRow, int aCol, const wxString &aTypeName) override
 
void SetCanonicalFieldName(int aRow, const wxString &aName)
 
wxString GetValue(int aRow, int aCol) override
 
int GetNumberCols() override
 
#define DISPLAY_NAME_COLUMN
 
#define SHOW_FIELD_COLUMN
 
#define VIEW_FIELDS_COL_COUNT
 
std::vector< SCH_REFERENCE > m_Refs
 
DATA_MODEL_ROW(const SCH_REFERENCE &aFirstReference, GROUP_TYPE aType)