KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PIN_TABLE_DATA_MODEL Class Reference
Inheritance diagram for PIN_TABLE_DATA_MODEL:
WX_GRID_TABLE_BASE

Public Member Functions

 PIN_TABLE_DATA_MODEL (SYMBOL_EDIT_FRAME *aFrame, DIALOG_LIB_EDIT_PIN_TABLE *aPinTable, LIB_SYMBOL *aSymbol, const std::vector< SCH_PIN * > &aOrigSelectedPins)
 
 ~PIN_TABLE_DATA_MODEL ()
 
void onUnitsChanged (wxCommandEvent &aEvent)
 
void SetUnitFilter (int aFilter)
 
void SetBodyStyleFilter (int aFilter)
 
void SetFilterBySelection (bool aFilter)
 
int GetNumberRows () override
 
int GetNumberCols () override
 
wxString GetColLabelValue (int aCol) override
 
bool IsEmptyCell (int row, int col) override
 
wxString GetValue (int aRow, int aCol) override
 
void SetValue (int aRow, int aCol, const wxString &aValue) override
 
void RebuildRows (const std::vector< SCH_PIN * > &aPins, bool groupByName, bool groupBySelection)
 
void SortRows (int aSortCol, bool ascending)
 
void SortPins (std::vector< SCH_PIN * > &aRow)
 
void AppendRow (SCH_PIN *aPin)
 
std::vector< SCH_PIN * > RemoveRow (int aRow)
 
std::vector< SCH_PIN * > GetRowPins (int aRow)
 
bool IsEdited ()
 
void SetColAttr (wxGridCellAttr *aAttr, int aCol) override
 
wxGridCellAttr * GetAttr (int aRow, int aCol, wxGridCellAttr::wxAttrKind aKind) override
 

Static Public Member Functions

static wxString GetValue (const std::vector< SCH_PIN * > &pins, int aCol, EDA_DRAW_FRAME *aParentFrame)
 
static int findRow (const std::vector< std::vector< SCH_PIN * > > &aRowSet, const wxString &aName)
 
static bool compare (const std::vector< SCH_PIN * > &lhs, const std::vector< SCH_PIN * > &rhs, int sortCol, bool ascending, EDA_DRAW_FRAME *parentFrame)
 

Protected Member Functions

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

Protected Attributes

std::map< int, wxGridCellAttr * > m_colAttrs
 

Private Attributes

SYMBOL_EDIT_FRAMEm_frame
 
std::vector< std::vector< SCH_PIN * > > m_rows
 
int m_unitFilter
 
int m_bodyStyleFilter
 
bool m_filterBySelection
 
bool m_edited
 
DIALOG_LIB_EDIT_PIN_TABLEm_pinTable
 
LIB_SYMBOLm_symbol
 
const std::vector< SCH_PIN * > & m_origSelectedPins
 The pins in the symbol that are selected at dialog start.
 
std::unique_ptr< NUMERIC_EVALUATORm_eval
 
std::map< std::pair< std::vector< SCH_PIN * >, int >, wxString > m_evalOriginal
 

Detailed Description

Definition at line 370 of file dialog_lib_edit_pin_table.cpp.

Constructor & Destructor Documentation

◆ PIN_TABLE_DATA_MODEL()

PIN_TABLE_DATA_MODEL::PIN_TABLE_DATA_MODEL ( SYMBOL_EDIT_FRAME * aFrame,
DIALOG_LIB_EDIT_PIN_TABLE * aPinTable,
LIB_SYMBOL * aSymbol,
const std::vector< SCH_PIN * > & aOrigSelectedPins )
inline

◆ ~PIN_TABLE_DATA_MODEL()

PIN_TABLE_DATA_MODEL::~PIN_TABLE_DATA_MODEL ( )
inline

Definition at line 391 of file dialog_lib_edit_pin_table.cpp.

References m_frame, and onUnitsChanged().

Member Function Documentation

◆ AppendRow()

void PIN_TABLE_DATA_MODEL::AppendRow ( SCH_PIN * aPin)
inline

Definition at line 803 of file dialog_lib_edit_pin_table.cpp.

References m_rows.

◆ compare()

static bool PIN_TABLE_DATA_MODEL::compare ( const std::vector< SCH_PIN * > & lhs,
const std::vector< SCH_PIN * > & rhs,
int sortCol,
bool ascending,
EDA_DRAW_FRAME * parentFrame )
inlinestatic

◆ enhanceAttr()

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

◆ findRow()

static int PIN_TABLE_DATA_MODEL::findRow ( const std::vector< std::vector< SCH_PIN * > > & aRowSet,
const wxString & aName )
inlinestatic

Definition at line 588 of file dialog_lib_edit_pin_table.cpp.

Referenced by RebuildRows().

◆ 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().

◆ GetColLabelValue()

wxString PIN_TABLE_DATA_MODEL::GetColLabelValue ( int aCol)
inlineoverride

Definition at line 411 of file dialog_lib_edit_pin_table.cpp.

References GetPinTableColLabel().

◆ GetNumberCols()

int PIN_TABLE_DATA_MODEL::GetNumberCols ( )
inlineoverride

Definition at line 409 of file dialog_lib_edit_pin_table.cpp.

References COL_COUNT.

◆ GetNumberRows()

int PIN_TABLE_DATA_MODEL::GetNumberRows ( )
inlineoverride

Definition at line 408 of file dialog_lib_edit_pin_table.cpp.

References m_rows.

◆ GetRowPins()

std::vector< SCH_PIN * > PIN_TABLE_DATA_MODEL::GetRowPins ( int aRow)
inline

Definition at line 831 of file dialog_lib_edit_pin_table.cpp.

References m_rows.

◆ GetValue() [1/2]

static wxString PIN_TABLE_DATA_MODEL::GetValue ( const std::vector< SCH_PIN * > & pins,
int aCol,
EDA_DRAW_FRAME * aParentFrame )
inlinestatic

◆ GetValue() [2/2]

wxString PIN_TABLE_DATA_MODEL::GetValue ( int aRow,
int aCol )
inlineoverride

Definition at line 421 of file dialog_lib_edit_pin_table.cpp.

References GetValue(), grid, m_evalOriginal, m_frame, and m_rows.

Referenced by compare(), and GetValue().

◆ IsEdited()

bool PIN_TABLE_DATA_MODEL::IsEdited ( )
inline

Definition at line 836 of file dialog_lib_edit_pin_table.cpp.

References m_edited.

◆ IsEmptyCell()

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

Definition at line 416 of file dialog_lib_edit_pin_table.cpp.

◆ onUnitsChanged()

void PIN_TABLE_DATA_MODEL::onUnitsChanged ( wxCommandEvent & aEvent)
inline

Definition at line 396 of file dialog_lib_edit_pin_table.cpp.

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

◆ RebuildRows()

void PIN_TABLE_DATA_MODEL::RebuildRows ( const std::vector< SCH_PIN * > & aPins,
bool groupByName,
bool groupBySelection )
inline

◆ RemoveRow()

std::vector< SCH_PIN * > PIN_TABLE_DATA_MODEL::RemoveRow ( int aRow)
inline

Definition at line 816 of file dialog_lib_edit_pin_table.cpp.

References m_rows.

◆ SetBodyStyleFilter()

void PIN_TABLE_DATA_MODEL::SetBodyStyleFilter ( int aFilter)
inline

Definition at line 405 of file dialog_lib_edit_pin_table.cpp.

References m_bodyStyleFilter.

◆ SetColAttr()

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

Definition at line 51 of file wx_grid.h.

References m_colAttrs.

◆ SetFilterBySelection()

void PIN_TABLE_DATA_MODEL::SetFilterBySelection ( bool aFilter)
inline

Definition at line 406 of file dialog_lib_edit_pin_table.cpp.

References m_filterBySelection.

◆ SetUnitFilter()

void PIN_TABLE_DATA_MODEL::SetUnitFilter ( int aFilter)
inline

Definition at line 404 of file dialog_lib_edit_pin_table.cpp.

References m_unitFilter.

◆ SetValue()

◆ SortPins()

void PIN_TABLE_DATA_MODEL::SortPins ( std::vector< SCH_PIN * > & aRow)
inline

Definition at line 794 of file dialog_lib_edit_pin_table.cpp.

Referenced by RebuildRows().

◆ SortRows()

void PIN_TABLE_DATA_MODEL::SortRows ( int aSortCol,
bool ascending )
inline

Definition at line 784 of file dialog_lib_edit_pin_table.cpp.

References m_rows.

Referenced by RebuildRows().

Member Data Documentation

◆ m_bodyStyleFilter

int PIN_TABLE_DATA_MODEL::m_bodyStyleFilter
private

◆ m_colAttrs

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

◆ m_edited

bool PIN_TABLE_DATA_MODEL::m_edited
private

Definition at line 852 of file dialog_lib_edit_pin_table.cpp.

Referenced by IsEdited(), PIN_TABLE_DATA_MODEL(), and SetValue().

◆ m_eval

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

Definition at line 860 of file dialog_lib_edit_pin_table.cpp.

Referenced by PIN_TABLE_DATA_MODEL(), and SetValue().

◆ m_evalOriginal

std::map< std::pair<std::vector<SCH_PIN*>, int>, wxString > PIN_TABLE_DATA_MODEL::m_evalOriginal
private

Definition at line 861 of file dialog_lib_edit_pin_table.cpp.

Referenced by GetValue(), and SetValue().

◆ m_filterBySelection

bool PIN_TABLE_DATA_MODEL::m_filterBySelection
private

◆ m_frame

SYMBOL_EDIT_FRAME* PIN_TABLE_DATA_MODEL::m_frame
private

◆ m_origSelectedPins

const std::vector<SCH_PIN*>& PIN_TABLE_DATA_MODEL::m_origSelectedPins
private

The pins in the symbol that are selected at dialog start.

Definition at line 858 of file dialog_lib_edit_pin_table.cpp.

Referenced by PIN_TABLE_DATA_MODEL(), and RebuildRows().

◆ m_pinTable

DIALOG_LIB_EDIT_PIN_TABLE* PIN_TABLE_DATA_MODEL::m_pinTable
private

Definition at line 854 of file dialog_lib_edit_pin_table.cpp.

Referenced by PIN_TABLE_DATA_MODEL(), and SetValue().

◆ m_rows

std::vector<std::vector<SCH_PIN*> > PIN_TABLE_DATA_MODEL::m_rows
private

◆ m_symbol

LIB_SYMBOL* PIN_TABLE_DATA_MODEL::m_symbol
private

Definition at line 855 of file dialog_lib_edit_pin_table.cpp.

Referenced by PIN_TABLE_DATA_MODEL(), and SetValue().

◆ m_unitFilter

int PIN_TABLE_DATA_MODEL::m_unitFilter
private

Definition at line 848 of file dialog_lib_edit_pin_table.cpp.

Referenced by PIN_TABLE_DATA_MODEL(), RebuildRows(), and SetUnitFilter().


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