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

#include <fields_data_model.h>

Inheritance diagram for VIEW_CONTROLS_GRID_DATA_MODEL:
WX_GRID_TABLE_BASE

Public Member Functions

 VIEW_CONTROLS_GRID_DATA_MODEL (bool aForBOM)
 
 ~VIEW_CONTROLS_GRID_DATA_MODEL () override=default
 
int GetNumberRows () override
 
int GetNumberCols () override
 
wxString GetColLabelValue (int aCol) override
 
bool IsEmptyCell (int aRow, int aCol) override
 
bool CanGetValueAs (int aRow, int aCol, const wxString &aTypeName) override
 
bool CanSetValueAs (int aRow, int aCol, const wxString &aTypeName) override
 
wxString GetValue (int aRow, int aCol) override
 
bool GetValueAsBool (int aRow, int aCol) override
 
void SetValue (int aRow, int aCol, const wxString &aValue) override
 
void SetValueAsBool (int aRow, int aCol, bool aValue) override
 
void AppendRow (const wxString &aFieldName, const wxString &aBOMName, bool aShow, bool aGroupBy)
 
void DeleteRow (int aRow)
 
wxString GetCanonicalFieldName (int aRow)
 
void SetCanonicalFieldName (int aRow, const wxString &aName)
 
void SetColAttr (wxGridCellAttr *aAttr, int aCol) override
 
wxGridCellAttr * GetAttr (int aRow, int aCol, wxGridCellAttr::wxAttrKind aKind) override
 

Protected Member Functions

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

Protected Attributes

bool m_forBOM
 
std::vector< BOM_FIELDm_fields
 
std::map< int, wxGridCellAttr * > m_colAttrs
 

Detailed Description

Definition at line 41 of file fields_data_model.h.

Constructor & Destructor Documentation

◆ VIEW_CONTROLS_GRID_DATA_MODEL()

VIEW_CONTROLS_GRID_DATA_MODEL::VIEW_CONTROLS_GRID_DATA_MODEL ( bool aForBOM)
inline

Definition at line 44 of file fields_data_model.h.

References m_forBOM.

◆ ~VIEW_CONTROLS_GRID_DATA_MODEL()

VIEW_CONTROLS_GRID_DATA_MODEL::~VIEW_CONTROLS_GRID_DATA_MODEL ( )
overridedefault

Member Function Documentation

◆ AppendRow()

void VIEW_CONTROLS_GRID_DATA_MODEL::AppendRow ( const wxString & aFieldName,
const wxString & aBOMName,
bool aShow,
bool aGroupBy )

Definition at line 133 of file fields_data_model.cpp.

References grid, and m_fields.

◆ CanGetValueAs()

bool VIEW_CONTROLS_GRID_DATA_MODEL::CanGetValueAs ( int aRow,
int aCol,
const wxString & aTypeName )
inlineoverride

Definition at line 60 of file fields_data_model.h.

References DISPLAY_NAME_COLUMN, GROUP_BY_COLUMN, LABEL_COLUMN, and SHOW_FIELD_COLUMN.

Referenced by CanSetValueAs().

◆ CanSetValueAs()

bool VIEW_CONTROLS_GRID_DATA_MODEL::CanSetValueAs ( int aRow,
int aCol,
const wxString & aTypeName )
inlineoverride

Definition at line 74 of file fields_data_model.h.

References CanGetValueAs().

◆ DeleteRow()

void VIEW_CONTROLS_GRID_DATA_MODEL::DeleteRow ( int aRow)

Definition at line 146 of file fields_data_model.cpp.

References GetNumberRows(), grid, and m_fields.

◆ enhanceAttr()

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

◆ GetAttr()

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

Definition at line 57 of file wx_grid.h.

References enhanceAttr(), and m_colAttrs.

Referenced by FIELDS_EDITOR_GRID_DATA_MODEL::GetAttr().

◆ GetCanonicalFieldName()

wxString VIEW_CONTROLS_GRID_DATA_MODEL::GetCanonicalFieldName ( int aRow)

Definition at line 160 of file fields_data_model.cpp.

References GetNumberRows(), m_fields, and BOM_FIELD::name.

◆ GetColLabelValue()

wxString VIEW_CONTROLS_GRID_DATA_MODEL::GetColLabelValue ( int aCol)
override

◆ GetNumberCols()

int VIEW_CONTROLS_GRID_DATA_MODEL::GetNumberCols ( )
inlineoverride

Definition at line 51 of file fields_data_model.h.

References VIEW_FIELDS_COL_COUNT.

◆ GetNumberRows()

int VIEW_CONTROLS_GRID_DATA_MODEL::GetNumberRows ( )
inlineoverride

◆ GetValue()

wxString VIEW_CONTROLS_GRID_DATA_MODEL::GetValue ( int aRow,
int aCol )
override

◆ GetValueAsBool()

bool VIEW_CONTROLS_GRID_DATA_MODEL::GetValueAsBool ( int aRow,
int aCol )
override

◆ IsEmptyCell()

bool VIEW_CONTROLS_GRID_DATA_MODEL::IsEmptyCell ( int aRow,
int aCol )
inlineoverride

Definition at line 55 of file fields_data_model.h.

◆ SetCanonicalFieldName()

void VIEW_CONTROLS_GRID_DATA_MODEL::SetCanonicalFieldName ( int aRow,
const wxString & aName )

Definition at line 170 of file fields_data_model.cpp.

References GetNumberRows(), m_fields, and BOM_FIELD::name.

◆ SetColAttr()

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

Definition at line 51 of file wx_grid.h.

References m_colAttrs.

◆ SetValue()

void VIEW_CONTROLS_GRID_DATA_MODEL::SetValue ( int aRow,
int aCol,
const wxString & aValue )
override

◆ SetValueAsBool()

void VIEW_CONTROLS_GRID_DATA_MODEL::SetValueAsBool ( int aRow,
int aCol,
bool aValue )
override

Member Data Documentation

◆ m_colAttrs

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

◆ m_fields

std::vector<BOM_FIELD> VIEW_CONTROLS_GRID_DATA_MODEL::m_fields
protected

◆ m_forBOM

bool VIEW_CONTROLS_GRID_DATA_MODEL::m_forBOM
protected

Definition at line 92 of file fields_data_model.h.

Referenced by GetColLabelValue(), and VIEW_CONTROLS_GRID_DATA_MODEL().


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