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

#include <pcb_fields_grid_table.h>

Inheritance diagram for PCB_FIELDS_GRID_TABLE:
WX_GRID_TABLE_BASE

Public Member Functions

 PCB_FIELDS_GRID_TABLE (PCB_BASE_FRAME *aFrame, DIALOG_SHIM *aDialog, std::vector< EMBEDDED_FILES * > aFilesStack)
 
 ~PCB_FIELDS_GRID_TABLE ()
 
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
 
long GetValueAsLong (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 SetValueAsLong (int aRow, int aCol, long aValue) override
 
bool DeleteRows (size_t aPos=0, size_t aNumRows=1) override
 
void SetColAttr (wxGridCellAttr *aAttr, int aCol) override
 
virtual bool HasRowLabelExpanders () const
 Show grouping controls in the row headers instead of row numbers.
 
virtual ROW_STATE GetRowState (int aRow) const
 
virtual bool HasUndoStateSerialization () const
 Optional identity-based serialization for the host dialog's Ctrl+Z/Ctrl+Y.
 
virtual wxString SerializeUndoState () const
 
virtual void RestoreUndoState (const wxString &aState)
 
void Clear () override
 

Public Attributes

T elements
 STL member.
 

Protected Member Functions

void onUnitsChanged (wxCommandEvent &aEvent)
 
wxGridCellAttr * enhanceAttr (wxGridCellAttr *aInputAttr, int aRow, int aCol, wxGridCellAttr::wxAttrKind aKind)
 

Protected Attributes

std::map< int, wxGridCellAttr * > m_colAttrs
 

Private Attributes

PCB_BASE_FRAME * m_frame
 
DIALOG_SHIM * m_dialog
 
FIELD_VALIDATOR m_fieldNameValidator
 
FIELD_VALIDATOR m_referenceValidator
 
FIELD_VALIDATOR m_valueValidator
 
FIELD_VALIDATOR m_urlValidator
 
FIELD_VALIDATOR m_nonUrlValidator
 
wxGridCellAttr * m_readOnlyAttr
 
wxGridCellAttr * m_fieldNameAttr
 
wxGridCellAttr * m_boolColAttr
 
wxGridCellAttr * m_orientationColAttr
 
wxGridCellAttr * m_layerColAttr
 
wxGridCellAttr * m_referenceAttr
 
wxGridCellAttr * m_valueAttr
 
wxGridCellAttr * m_urlAttr
 
std::unique_ptr< NUMERIC_EVALUATOR > m_eval
 
std::map< std::pair< int, int >, wxString > m_evalOriginal
 

Detailed Description

Definition at line 53 of file pcb_fields_grid_table.h.

Constructor & Destructor Documentation

◆ PCB_FIELDS_GRID_TABLE()

◆ ~PCB_FIELDS_GRID_TABLE()

PCB_FIELDS_GRID_TABLE::~PCB_FIELDS_GRID_TABLE ( )

Member Function Documentation

◆ CanGetValueAs()

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

◆ CanSetValueAs()

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

Definition at line 199 of file pcb_fields_grid_table.cpp.

References CanGetValueAs().

◆ Clear()

void WX_GRID_TABLE_BASE::Clear ( )
inlineoverrideinherited

Definition at line 122 of file wx_grid.h.

◆ DeleteRows()

bool PCB_FIELDS_GRID_TABLE::DeleteRows ( size_t aPos = 0,
size_t aNumRows = 1 )
override

Definition at line 451 of file pcb_fields_grid_table.cpp.

References m_evalOriginal.

◆ enhanceAttr()

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

◆ GetAttr()

◆ GetColLabelValue()

wxString PCB_FIELDS_GRID_TABLE::GetColLabelValue ( int aCol)
override

◆ GetMandatoryRowCount()

int PCB_FIELDS_GRID_TABLE::GetMandatoryRowCount ( ) const

Definition at line 122 of file pcb_fields_grid_table.cpp.

References PCB_FIELD::IsMandatory().

◆ GetNumberCols()

int PCB_FIELDS_GRID_TABLE::GetNumberCols ( )
inlineoverride

Definition at line 61 of file pcb_fields_grid_table.h.

References PFC_COUNT.

◆ GetNumberRows()

int PCB_FIELDS_GRID_TABLE::GetNumberRows ( )
inlineoverride

Definition at line 60 of file pcb_fields_grid_table.h.

◆ GetRowState()

◆ GetValue()

◆ GetValueAsBool()

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

◆ GetValueAsLong()

long PCB_FIELDS_GRID_TABLE::GetValueAsLong ( int aRow,
int aCol )
override

Definition at line 330 of file pcb_fields_grid_table.cpp.

References BOARD_ITEM::GetLayer(), and PFC_LAYER.

◆ HasRowLabelExpanders()

virtual bool WX_GRID_TABLE_BASE::HasRowLabelExpanders ( ) const
inlinevirtualinherited

Show grouping controls in the row headers instead of row numbers.

Reimplemented in FIELDS_TABLE_DATA_MODEL_BASE.

Definition at line 108 of file wx_grid.h.

◆ HasUndoStateSerialization()

virtual bool WX_GRID_TABLE_BASE::HasUndoStateSerialization ( ) const
inlinevirtualinherited

Optional identity-based serialization for the host dialog's Ctrl+Z/Ctrl+Y.

The dialog's generic grid undo snapshots cells by (row, col) position, which is wrong for tables whose rows can regroup/sort/reorder. A table that returns true here is asked to serialize and restore its own state by stable identity instead.

Reimplemented in FIELDS_TABLE_DATA_MODEL_BASE.

Definition at line 118 of file wx_grid.h.

◆ IsEmptyCell()

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

Definition at line 67 of file pcb_fields_grid_table.h.

◆ onUnitsChanged()

void PCB_FIELDS_GRID_TABLE::onUnitsChanged ( wxCommandEvent & aEvent)
protected

Definition at line 136 of file pcb_fields_grid_table.cpp.

Referenced by PCB_FIELDS_GRID_TABLE(), and ~PCB_FIELDS_GRID_TABLE().

◆ RestoreUndoState()

virtual void WX_GRID_TABLE_BASE::RestoreUndoState ( const wxString & aState)
inlinevirtualinherited

Reimplemented in FIELDS_TABLE_DATA_MODEL_BASE.

Definition at line 120 of file wx_grid.h.

◆ SerializeUndoState()

virtual wxString WX_GRID_TABLE_BASE::SerializeUndoState ( ) const
inlinevirtualinherited

Reimplemented in FIELDS_TABLE_DATA_MODEL_BASE.

Definition at line 119 of file wx_grid.h.

◆ SetColAttr()

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

Definition at line 90 of file wx_grid.h.

References m_colAttrs.

Referenced by DIALOG_FIELDS_TABLE::SetupColumnProperties().

◆ SetValue()

◆ SetValueAsBool()

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

◆ SetValueAsLong()

void PCB_FIELDS_GRID_TABLE::SetValueAsLong ( int aRow,
int aCol,
long aValue )
override

Member Data Documentation

◆ elements

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

STL member.

◆ m_boolColAttr

wxGridCellAttr* PCB_FIELDS_GRID_TABLE::m_boolColAttr
private

Definition at line 101 of file pcb_fields_grid_table.h.

Referenced by GetAttr(), PCB_FIELDS_GRID_TABLE(), and ~PCB_FIELDS_GRID_TABLE().

◆ m_colAttrs

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

◆ m_dialog

DIALOG_SHIM* PCB_FIELDS_GRID_TABLE::m_dialog
private

◆ m_eval

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

Definition at line 108 of file pcb_fields_grid_table.h.

Referenced by PCB_FIELDS_GRID_TABLE(), and SetValue().

◆ m_evalOriginal

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

Definition at line 109 of file pcb_fields_grid_table.h.

Referenced by DeleteRows(), GetValue(), and SetValue().

◆ m_fieldNameAttr

wxGridCellAttr* PCB_FIELDS_GRID_TABLE::m_fieldNameAttr
private

Definition at line 100 of file pcb_fields_grid_table.h.

Referenced by GetAttr(), PCB_FIELDS_GRID_TABLE(), and ~PCB_FIELDS_GRID_TABLE().

◆ m_fieldNameValidator

FIELD_VALIDATOR PCB_FIELDS_GRID_TABLE::m_fieldNameValidator
private

Definition at line 93 of file pcb_fields_grid_table.h.

Referenced by PCB_FIELDS_GRID_TABLE().

◆ m_frame

PCB_BASE_FRAME* PCB_FIELDS_GRID_TABLE::m_frame
private

◆ m_layerColAttr

wxGridCellAttr* PCB_FIELDS_GRID_TABLE::m_layerColAttr
private

Definition at line 103 of file pcb_fields_grid_table.h.

Referenced by GetAttr(), PCB_FIELDS_GRID_TABLE(), and ~PCB_FIELDS_GRID_TABLE().

◆ m_nonUrlValidator

FIELD_VALIDATOR PCB_FIELDS_GRID_TABLE::m_nonUrlValidator
private

Definition at line 97 of file pcb_fields_grid_table.h.

Referenced by PCB_FIELDS_GRID_TABLE().

◆ m_orientationColAttr

wxGridCellAttr* PCB_FIELDS_GRID_TABLE::m_orientationColAttr
private

Definition at line 102 of file pcb_fields_grid_table.h.

Referenced by GetAttr(), PCB_FIELDS_GRID_TABLE(), and ~PCB_FIELDS_GRID_TABLE().

◆ m_readOnlyAttr

wxGridCellAttr* PCB_FIELDS_GRID_TABLE::m_readOnlyAttr
private

Definition at line 99 of file pcb_fields_grid_table.h.

Referenced by GetAttr(), PCB_FIELDS_GRID_TABLE(), and ~PCB_FIELDS_GRID_TABLE().

◆ m_referenceAttr

wxGridCellAttr* PCB_FIELDS_GRID_TABLE::m_referenceAttr
private

Definition at line 104 of file pcb_fields_grid_table.h.

Referenced by GetAttr(), PCB_FIELDS_GRID_TABLE(), and ~PCB_FIELDS_GRID_TABLE().

◆ m_referenceValidator

FIELD_VALIDATOR PCB_FIELDS_GRID_TABLE::m_referenceValidator
private

Definition at line 94 of file pcb_fields_grid_table.h.

Referenced by PCB_FIELDS_GRID_TABLE().

◆ m_urlAttr

wxGridCellAttr* PCB_FIELDS_GRID_TABLE::m_urlAttr
private

Definition at line 106 of file pcb_fields_grid_table.h.

Referenced by GetAttr(), PCB_FIELDS_GRID_TABLE(), and ~PCB_FIELDS_GRID_TABLE().

◆ m_urlValidator

FIELD_VALIDATOR PCB_FIELDS_GRID_TABLE::m_urlValidator
private

Definition at line 96 of file pcb_fields_grid_table.h.

Referenced by PCB_FIELDS_GRID_TABLE().

◆ m_valueAttr

wxGridCellAttr* PCB_FIELDS_GRID_TABLE::m_valueAttr
private

Definition at line 105 of file pcb_fields_grid_table.h.

Referenced by GetAttr(), PCB_FIELDS_GRID_TABLE(), and ~PCB_FIELDS_GRID_TABLE().

◆ m_valueValidator

FIELD_VALIDATOR PCB_FIELDS_GRID_TABLE::m_valueValidator
private

Definition at line 95 of file pcb_fields_grid_table.h.

Referenced by PCB_FIELDS_GRID_TABLE().


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