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 ()
 
void SetColAttr (wxGridCellAttr *aAttr, int aCol) override
 

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)
 

Protected Attributes

std::map< int, wxGridCellAttr * > m_colAttrs
 

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 = {} )

◆ FIELDS_GRID_TABLE() [2/4]

◆ FIELDS_GRID_TABLE() [3/4]

◆ FIELDS_GRID_TABLE() [4/4]

◆ ~FIELDS_GRID_TABLE()

Member Function Documentation

◆ AddInheritedField()

void FIELDS_GRID_TABLE::AddInheritedField ( const SCH_FIELD & aParent)

Definition at line 1138 of file fields_grid_table.cpp.

References m_isInherited, m_parentFields, m_part, and push_back().

◆ BoolFromString()

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

Definition at line 1096 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 576 of file fields_grid_table.cpp.

References CanGetValueAs().

◆ DetachFields()

void FIELDS_GRID_TABLE::DetachFields ( )

Definition at line 1181 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

Definition at line 152 of file fields_grid_table.h.

References push_back().

◆ 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 1146 of file fields_grid_table.cpp.

References m_isInherited, and m_parentFields.

◆ GetAttr()

◆ GetColLabelValue()

wxString FIELDS_GRID_TABLE::GetColLabelValue ( int aCol)
override

◆ getColumnCount()

int FIELDS_GRID_TABLE::getColumnCount ( ) const
protected

◆ GetField()

SCH_FIELD * FIELDS_GRID_TABLE::GetField ( FIELD_T aFieldId)

Definition at line 1115 of file fields_grid_table.cpp.

References SCH_FIELD::GetId().

Referenced by initGrid(), and positioningChanged().

◆ getField()

SCH_FIELD & FIELDS_GRID_TABLE::getField ( int aRow)
protected

◆ GetFieldRow()

int FIELDS_GRID_TABLE::GetFieldRow ( FIELD_T aFieldId)

Definition at line 1127 of file fields_grid_table.cpp.

Referenced by FIELDS_GRID_TRICKS::getFieldRow().

◆ GetMandatoryRowCount()

int FIELDS_GRID_TABLE::GetMandatoryRowCount ( ) const

Definition at line 248 of file fields_grid_table.cpp.

References SCH_FIELD::IsMandatory().

◆ GetNumberCols()

int FIELDS_GRID_TABLE::GetNumberCols ( )
inlineoverride

Definition at line 102 of file fields_grid_table.h.

References getColumnCount().

◆ GetNumberRows()

int FIELDS_GRID_TABLE::GetNumberRows ( )
inlineoverride

Definition at line 101 of file fields_grid_table.h.

References getVisibleRowCount().

Referenced by GetAttr(), GetValue(), GetValueAsBool(), SetValue(), and SetValueAsBool().

◆ GetValue()

◆ GetValueAsBool()

◆ getVisibleRowCount()

int FIELDS_GRID_TABLE::getVisibleRowCount ( ) const
protected

Definition at line 475 of file fields_grid_table.cpp.

References FRAME_SCH, FRAME_SCH_VIEWER, SCH_ITEM::IsPrivate(), and m_frame.

Referenced by GetNumberRows().

◆ 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

Definition at line 140 of file fields_grid_table.h.

References m_isInherited, and m_parentFields.

Referenced by GetAttr().

◆ onUnitsChanged()

void FIELDS_GRID_TABLE::onUnitsChanged ( wxCommandEvent & aEvent)
protected

Definition at line 452 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

Definition at line 148 of file fields_grid_table.h.

References m_parentFields.

◆ push_back()

void FIELDS_GRID_TABLE::push_back ( const SCH_FIELD & field)

Definition at line 262 of file fields_grid_table.cpp.

References m_isInherited, and m_parentFields.

Referenced by AddInheritedField(), and emplace_back().

◆ SetColAttr()

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

Definition at line 51 of file wx_grid.h.

References m_colAttrs.

◆ SetFieldInherited()

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

Definition at line 131 of file fields_grid_table.h.

References m_isInherited, and m_parentFields.

◆ SetValue()

◆ SetValueAsBool()

◆ StringFromBool()

wxString FIELDS_GRID_TABLE::StringFromBool ( bool aValue) const

Definition at line 1087 of file fields_grid_table.cpp.

Referenced by GetValue().

◆ SwapRows()

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

Definition at line 1167 of file fields_grid_table.cpp.

References m_isInherited, and m_parentFields.

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_colAttrs

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

◆ 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

◆ 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

◆ 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

◆ m_filesStack

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

◆ 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

◆ 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

◆ 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

◆ m_part

LIB_SYMBOL* FIELDS_GRID_TABLE::m_part
private

◆ 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

◆ m_symbolNetlist

wxString FIELDS_GRID_TABLE::m_symbolNetlist
private

Definition at line 175 of file fields_grid_table.h.

Referenced by FIELDS_GRID_TABLE(), FIELDS_GRID_TABLE(), and 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

◆ 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

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