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

#include <fields_grid_table.h>

Inheritance diagram for FIELDS_GRID_TABLE:
WX_GRID_TABLE_BASE

Public Member Functions

 FIELDS_GRID_TABLE (DIALOG_SHIM *aDialog, SCH_BASE_FRAME *aFrame, WX_GRID *aGrid, LIB_SYMBOL *aSymbol, std::vector< EMBEDDED_FILES * > aFilesStack={})
 
 FIELDS_GRID_TABLE (DIALOG_SHIM *aDialog, SCH_EDIT_FRAME *aFrame, WX_GRID *aGrid, SCH_SYMBOL *aSymbol)
 
 FIELDS_GRID_TABLE (DIALOG_SHIM *aDialog, SCH_EDIT_FRAME *aFrame, WX_GRID *aGrid, SCH_SHEET *aSheet)
 
 FIELDS_GRID_TABLE (DIALOG_SHIM *aDialog, SCH_EDIT_FRAME *aFrame, WX_GRID *aGrid, SCH_LABEL_BASE *aLabel)
 
 ~FIELDS_GRID_TABLE () override
 
int GetNumberRows () override
 
int GetNumberCols () override
 
int GetMandatoryRowCount () const
 
wxString GetColLabelValue (int aCol) override
 
bool IsEmptyCell (int row, int col) override
 
bool CanGetValueAs (int aRow, int aCol, const wxString &aTypeName) override
 
bool CanSetValueAs (int aRow, int aCol, const wxString &aTypeName) override
 
wxGridCellAttr * GetAttr (int aRow, int aCol, wxGridCellAttr::wxAttrKind aKind) 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
 
wxString StringFromBool (bool aValue) const
 
bool BoolFromString (const wxString &aValue) const
 
SCH_FIELDGetField (FIELD_T aFieldId)
 
int GetFieldRow (FIELD_T aFieldId)
 
void AddInheritedField (const SCH_FIELD &aParent)
 
void SetFieldInherited (size_t aRow, const SCH_FIELD &aParent)
 
bool IsInherited (size_t aRow) const
 
const SCH_FIELDParentField (size_t row) const
 
void push_back (const SCH_FIELD &field)
 
void emplace_back (const SCH_FIELD &field)
 
bool EraseRow (size_t row)
 
void SwapRows (size_t a, size_t b)
 
void DetachFields ()
 

Public Attributes

T elements
 STL member.
 

Protected Member Functions

void initGrid (WX_GRID *aGrid)
 
void onUnitsChanged (wxCommandEvent &aEvent)
 
int getColumnCount () const
 
int getVisibleRowCount () const
 
SCH_FIELDgetField (int aRow)
 
wxGridCellAttr * enhanceAttr (wxGridCellAttr *aInputAttr, int aRow, int aCol, wxGridCellAttr::wxAttrKind aKind)
 

Private Attributes

SCH_BASE_FRAMEm_frame
 
DIALOG_SHIMm_dialog
 
KICAD_T m_parentType
 
LIB_SYMBOLm_part
 
std::vector< EMBEDDED_FILES * > m_filesStack
 
wxString m_symbolNetlist
 
wxString m_curdir
 
FIELD_VALIDATOR m_fieldNameValidator
 
FIELD_VALIDATOR m_referenceValidator
 
FIELD_VALIDATOR m_valueValidator
 
FIELD_VALIDATOR m_urlValidator
 
FIELD_VALIDATOR m_nonUrlValidator
 
FIELD_VALIDATOR m_filepathValidator
 
wxGridCellAttr * m_readOnlyAttr
 
wxGridCellAttr * m_fieldNameAttr
 
wxGridCellAttr * m_referenceAttr
 
wxGridCellAttr * m_valueAttr
 
wxGridCellAttr * m_footprintAttr
 
wxGridCellAttr * m_urlAttr
 
wxGridCellAttr * m_nonUrlAttr
 
wxGridCellAttr * m_filepathAttr
 
wxGridCellAttr * m_boolAttr
 
wxGridCellAttr * m_vAlignAttr
 
wxGridCellAttr * m_hAlignAttr
 
wxGridCellAttr * m_orientationAttr
 
wxGridCellAttr * m_netclassAttr
 
wxGridCellAttr * m_fontAttr
 
wxGridCellAttr * m_colorAttr
 
std::vector< bool > m_isInherited
 
std::vector< SCH_FIELDm_parentFields
 
std::unique_ptr< NUMERIC_EVALUATORm_eval
 
std::map< std::pair< int, int >, wxString > m_evalOriginal
 

Detailed Description

Definition at line 88 of file fields_grid_table.h.

Constructor & Destructor Documentation

◆ FIELDS_GRID_TABLE() [1/4]

FIELDS_GRID_TABLE::FIELDS_GRID_TABLE ( DIALOG_SHIM aDialog,
SCH_BASE_FRAME aFrame,
WX_GRID aGrid,
LIB_SYMBOL aSymbol,
std::vector< EMBEDDED_FILES * >  aFilesStack = {} 
)

Definition at line 134 of file fields_grid_table.cpp.

References initGrid().

◆ FIELDS_GRID_TABLE() [2/4]

FIELDS_GRID_TABLE::FIELDS_GRID_TABLE ( DIALOG_SHIM aDialog,
SCH_EDIT_FRAME aFrame,
WX_GRID aGrid,
SCH_SYMBOL aSymbol 
)

Definition at line 153 of file fields_grid_table.cpp.

References initGrid(), m_filesStack, m_part, and SCH_ITEM::Schematic().

◆ FIELDS_GRID_TABLE() [3/4]

FIELDS_GRID_TABLE::FIELDS_GRID_TABLE ( DIALOG_SHIM aDialog,
SCH_EDIT_FRAME aFrame,
WX_GRID aGrid,
SCH_SHEET aSheet 
)

Definition at line 176 of file fields_grid_table.cpp.

References initGrid(), m_filesStack, and SCH_ITEM::Schematic().

◆ FIELDS_GRID_TABLE() [4/4]

FIELDS_GRID_TABLE::FIELDS_GRID_TABLE ( DIALOG_SHIM aDialog,
SCH_EDIT_FRAME aFrame,
WX_GRID aGrid,
SCH_LABEL_BASE aLabel 
)

Definition at line 195 of file fields_grid_table.cpp.

References initGrid(), m_filesStack, and SCH_ITEM::Schematic().

◆ ~FIELDS_GRID_TABLE()

Member Function Documentation

◆ AddInheritedField()

void FIELDS_GRID_TABLE::AddInheritedField ( const SCH_FIELD aParent)

◆ BoolFromString()

bool FIELDS_GRID_TABLE::BoolFromString ( const wxString &  aValue) const

Definition at line 1062 of file fields_grid_table.cpp.

Referenced by SetValue().

◆ CanGetValueAs()

bool FIELDS_GRID_TABLE::CanGetValueAs ( int  aRow,
int  aCol,
const wxString &  aTypeName 
)
override

◆ CanSetValueAs()

bool FIELDS_GRID_TABLE::CanSetValueAs ( int  aRow,
int  aCol,
const wxString &  aTypeName 
)
override

Definition at line 542 of file fields_grid_table.cpp.

References CanGetValueAs().

◆ DetachFields()

void FIELDS_GRID_TABLE::DetachFields ( )

Definition at line 1147 of file fields_grid_table.cpp.

References m_parentFields, and EDA_ITEM::SetParent().

Referenced by SCH_DRAWING_TOOLS::createNewLabel().

◆ emplace_back()

void FIELDS_GRID_TABLE::emplace_back ( const SCH_FIELD field)
inline

◆ enhanceAttr()

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

◆ EraseRow()

bool FIELDS_GRID_TABLE::EraseRow ( size_t  row)

Definition at line 1112 of file fields_grid_table.cpp.

References m_isInherited, and m_parentFields.

Referenced by DIALOG_LIB_SYMBOL_PROPERTIES::OnDeleteField().

◆ GetAttr()

◆ GetColLabelValue()

wxString FIELDS_GRID_TABLE::GetColLabelValue ( int  aCol)
override

◆ getColumnCount()

int FIELDS_GRID_TABLE::getColumnCount ( ) const
protected

◆ GetField()

◆ getField()

SCH_FIELD & FIELDS_GRID_TABLE::getField ( int  aRow)
protected

◆ GetFieldRow()

◆ GetMandatoryRowCount()

◆ GetNumberCols()

int FIELDS_GRID_TABLE::GetNumberCols ( )
inlineoverride

Definition at line 102 of file fields_grid_table.h.

References getColumnCount().

◆ GetNumberRows()

◆ GetValue()

◆ GetValueAsBool()

◆ getVisibleRowCount()

int FIELDS_GRID_TABLE::getVisibleRowCount ( ) const
protected

◆ initGrid()

◆ IsEmptyCell()

bool FIELDS_GRID_TABLE::IsEmptyCell ( int  row,
int  col 
)
inlineoverride

Definition at line 108 of file fields_grid_table.h.

◆ IsInherited()

bool FIELDS_GRID_TABLE::IsInherited ( size_t  aRow) const
inline

◆ onUnitsChanged()

void FIELDS_GRID_TABLE::onUnitsChanged ( wxCommandEvent &  aEvent)
protected

Definition at line 418 of file fields_grid_table.cpp.

Referenced by initGrid(), and ~FIELDS_GRID_TABLE().

◆ ParentField()

const SCH_FIELD & FIELDS_GRID_TABLE::ParentField ( size_t  row) const
inline

◆ push_back()

◆ SetFieldInherited()

void FIELDS_GRID_TABLE::SetFieldInherited ( size_t  aRow,
const SCH_FIELD aParent 
)
inline

◆ SetValue()

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

◆ SetValueAsBool()

◆ StringFromBool()

wxString FIELDS_GRID_TABLE::StringFromBool ( bool  aValue) const

Definition at line 1053 of file fields_grid_table.cpp.

Referenced by GetValue().

◆ SwapRows()

void FIELDS_GRID_TABLE::SwapRows ( size_t  a,
size_t  b 
)

Member Data Documentation

◆ elements

T std::vector< T >::elements
inherited

STL member.

◆ m_boolAttr

wxGridCellAttr* FIELDS_GRID_TABLE::m_boolAttr
private

Definition at line 193 of file fields_grid_table.h.

Referenced by GetAttr(), initGrid(), and ~FIELDS_GRID_TABLE().

◆ m_colorAttr

wxGridCellAttr* FIELDS_GRID_TABLE::m_colorAttr
private

Definition at line 199 of file fields_grid_table.h.

Referenced by GetAttr(), initGrid(), and ~FIELDS_GRID_TABLE().

◆ m_curdir

wxString FIELDS_GRID_TABLE::m_curdir
private

Definition at line 176 of file fields_grid_table.h.

Referenced by initGrid().

◆ m_dialog

DIALOG_SHIM* FIELDS_GRID_TABLE::m_dialog
private

Definition at line 171 of file fields_grid_table.h.

Referenced by initGrid(), SetValue(), and SetValueAsBool().

◆ m_eval

std::unique_ptr<NUMERIC_EVALUATOR> FIELDS_GRID_TABLE::m_eval
private

Definition at line 204 of file fields_grid_table.h.

Referenced by initGrid(), and SetValue().

◆ m_evalOriginal

std::map< std::pair<int, int>, wxString > FIELDS_GRID_TABLE::m_evalOriginal
private

Definition at line 205 of file fields_grid_table.h.

Referenced by GetValue(), and SetValue().

◆ m_fieldNameAttr

wxGridCellAttr* FIELDS_GRID_TABLE::m_fieldNameAttr
private

Definition at line 186 of file fields_grid_table.h.

Referenced by GetAttr(), initGrid(), and ~FIELDS_GRID_TABLE().

◆ m_fieldNameValidator

FIELD_VALIDATOR FIELDS_GRID_TABLE::m_fieldNameValidator
private

Definition at line 178 of file fields_grid_table.h.

Referenced by initGrid().

◆ m_filepathAttr

wxGridCellAttr* FIELDS_GRID_TABLE::m_filepathAttr
private

Definition at line 192 of file fields_grid_table.h.

Referenced by GetAttr(), initGrid(), and ~FIELDS_GRID_TABLE().

◆ m_filepathValidator

FIELD_VALIDATOR FIELDS_GRID_TABLE::m_filepathValidator
private

Definition at line 183 of file fields_grid_table.h.

Referenced by initGrid().

◆ m_filesStack

std::vector<EMBEDDED_FILES*> FIELDS_GRID_TABLE::m_filesStack
private

Definition at line 174 of file fields_grid_table.h.

Referenced by FIELDS_GRID_TABLE(), and initGrid().

◆ m_fontAttr

wxGridCellAttr* FIELDS_GRID_TABLE::m_fontAttr
private

Definition at line 198 of file fields_grid_table.h.

Referenced by GetAttr(), initGrid(), and ~FIELDS_GRID_TABLE().

◆ m_footprintAttr

wxGridCellAttr* FIELDS_GRID_TABLE::m_footprintAttr
private

Definition at line 189 of file fields_grid_table.h.

Referenced by GetAttr(), initGrid(), and ~FIELDS_GRID_TABLE().

◆ m_frame

SCH_BASE_FRAME* FIELDS_GRID_TABLE::m_frame
private

◆ m_hAlignAttr

wxGridCellAttr* FIELDS_GRID_TABLE::m_hAlignAttr
private

Definition at line 195 of file fields_grid_table.h.

Referenced by GetAttr(), initGrid(), and ~FIELDS_GRID_TABLE().

◆ m_isInherited

std::vector<bool> FIELDS_GRID_TABLE::m_isInherited
private

◆ m_netclassAttr

wxGridCellAttr* FIELDS_GRID_TABLE::m_netclassAttr
private

Definition at line 197 of file fields_grid_table.h.

Referenced by GetAttr(), initGrid(), and ~FIELDS_GRID_TABLE().

◆ m_nonUrlAttr

wxGridCellAttr* FIELDS_GRID_TABLE::m_nonUrlAttr
private

Definition at line 191 of file fields_grid_table.h.

Referenced by GetAttr(), initGrid(), and ~FIELDS_GRID_TABLE().

◆ m_nonUrlValidator

FIELD_VALIDATOR FIELDS_GRID_TABLE::m_nonUrlValidator
private

Definition at line 182 of file fields_grid_table.h.

Referenced by initGrid().

◆ m_orientationAttr

wxGridCellAttr* FIELDS_GRID_TABLE::m_orientationAttr
private

Definition at line 196 of file fields_grid_table.h.

Referenced by GetAttr(), initGrid(), and ~FIELDS_GRID_TABLE().

◆ m_parentFields

std::vector<SCH_FIELD> FIELDS_GRID_TABLE::m_parentFields
private

◆ m_parentType

KICAD_T FIELDS_GRID_TABLE::m_parentType
private

Definition at line 172 of file fields_grid_table.h.

Referenced by GetAttr(), GetValue(), initGrid(), and SetValue().

◆ m_part

LIB_SYMBOL* FIELDS_GRID_TABLE::m_part
private

Definition at line 173 of file fields_grid_table.h.

Referenced by AddInheritedField(), FIELDS_GRID_TABLE(), GetAttr(), and initGrid().

◆ m_readOnlyAttr

wxGridCellAttr* FIELDS_GRID_TABLE::m_readOnlyAttr
private

Definition at line 185 of file fields_grid_table.h.

Referenced by GetAttr(), initGrid(), and ~FIELDS_GRID_TABLE().

◆ m_referenceAttr

wxGridCellAttr* FIELDS_GRID_TABLE::m_referenceAttr
private

Definition at line 187 of file fields_grid_table.h.

Referenced by GetAttr(), initGrid(), and ~FIELDS_GRID_TABLE().

◆ m_referenceValidator

FIELD_VALIDATOR FIELDS_GRID_TABLE::m_referenceValidator
private

Definition at line 179 of file fields_grid_table.h.

Referenced by initGrid().

◆ m_symbolNetlist

wxString FIELDS_GRID_TABLE::m_symbolNetlist
private

Definition at line 175 of file fields_grid_table.h.

Referenced by initGrid().

◆ m_urlAttr

wxGridCellAttr* FIELDS_GRID_TABLE::m_urlAttr
private

Definition at line 190 of file fields_grid_table.h.

Referenced by GetAttr(), initGrid(), and ~FIELDS_GRID_TABLE().

◆ m_urlValidator

FIELD_VALIDATOR FIELDS_GRID_TABLE::m_urlValidator
private

Definition at line 181 of file fields_grid_table.h.

Referenced by initGrid().

◆ m_vAlignAttr

wxGridCellAttr* FIELDS_GRID_TABLE::m_vAlignAttr
private

Definition at line 194 of file fields_grid_table.h.

Referenced by GetAttr(), initGrid(), and ~FIELDS_GRID_TABLE().

◆ m_valueAttr

wxGridCellAttr* FIELDS_GRID_TABLE::m_valueAttr
private

Definition at line 188 of file fields_grid_table.h.

Referenced by GetAttr(), initGrid(), and ~FIELDS_GRID_TABLE().

◆ m_valueValidator

FIELD_VALIDATOR FIELDS_GRID_TABLE::m_valueValidator
private

Definition at line 180 of file fields_grid_table.h.

Referenced by initGrid().


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