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

Public Member Functions

 PIN_TABLE_DATA_MODEL (SYMBOL_EDIT_FRAME *aFrame, DIALOG_LIB_EDIT_PIN_TABLE *aPinTable, LIB_SYMBOL *aSymbol)
 
 ~PIN_TABLE_DATA_MODEL ()
 
void onUnitsChanged (wxCommandEvent &aEvent)
 
void SetUnitFilter (int 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< LIB_PIN * > &aPins, bool groupByName, bool groupBySelection)
 
void SortRows (int aSortCol, bool ascending)
 
void SortPins (std::vector< LIB_PIN * > &aRow)
 
void AppendRow (LIB_PIN *aPin)
 
std::vector< LIB_PIN * > RemoveRow (int aRow)
 
std::vector< LIB_PIN * > GetRowPins (int aRow)
 
bool IsEdited ()
 

Static Public Member Functions

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

Static Private Member Functions

static wxString StringFromBool (bool aValue)
 
static bool BoolFromString (wxString aValue)
 

Private Attributes

SYMBOL_EDIT_FRAMEm_frame
 
std::vector< std::vector< LIB_PIN * > > m_rows
 
int m_unitFilter
 
bool m_edited
 
DIALOG_LIB_EDIT_PIN_TABLEm_pinTable
 
LIB_SYMBOLm_symbol
 
std::unique_ptr< NUMERIC_EVALUATORm_eval
 
std::map< std::pair< std::vector< LIB_PIN * >, int >, wxString > m_evalOriginal
 

Detailed Description

Definition at line 81 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 
)
inline

◆ ~PIN_TABLE_DATA_MODEL()

PIN_TABLE_DATA_MODEL::~PIN_TABLE_DATA_MODEL ( )
inline

Definition at line 97 of file dialog_lib_edit_pin_table.cpp.

References m_frame, and onUnitsChanged().

Member Function Documentation

◆ AppendRow()

void PIN_TABLE_DATA_MODEL::AppendRow ( LIB_PIN aPin)
inline

Definition at line 631 of file dialog_lib_edit_pin_table.cpp.

References m_rows.

Referenced by DIALOG_LIB_EDIT_PIN_TABLE::OnAddRow().

◆ BoolFromString()

static bool PIN_TABLE_DATA_MODEL::BoolFromString ( wxString  aValue)
inlinestaticprivate

Definition at line 678 of file dialog_lib_edit_pin_table.cpp.

Referenced by SetValue().

◆ compare()

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

◆ findRow()

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

Definition at line 457 of file dialog_lib_edit_pin_table.cpp.

Referenced by RebuildRows().

◆ GetColLabelValue()

wxString PIN_TABLE_DATA_MODEL::GetColLabelValue ( int  aCol)
inlineoverride

◆ GetNumberCols()

int PIN_TABLE_DATA_MODEL::GetNumberCols ( )
inlineoverride

Definition at line 113 of file dialog_lib_edit_pin_table.cpp.

References COL_COUNT.

◆ GetNumberRows()

int PIN_TABLE_DATA_MODEL::GetNumberRows ( )
inlineoverride

Definition at line 112 of file dialog_lib_edit_pin_table.cpp.

References m_rows.

Referenced by DIALOG_LIB_EDIT_PIN_TABLE::OnCellSelected().

◆ GetRowPins()

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

Definition at line 659 of file dialog_lib_edit_pin_table.cpp.

References m_rows.

Referenced by DIALOG_LIB_EDIT_PIN_TABLE::OnCellSelected().

◆ GetValue() [1/2]

◆ GetValue() [2/2]

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

Definition at line 142 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 664 of file dialog_lib_edit_pin_table.cpp.

References m_edited.

Referenced by DIALOG_LIB_EDIT_PIN_TABLE::OnClose().

◆ IsEmptyCell()

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

Definition at line 137 of file dialog_lib_edit_pin_table.cpp.

◆ onUnitsChanged()

void PIN_TABLE_DATA_MODEL::onUnitsChanged ( wxCommandEvent &  aEvent)
inline

Definition at line 102 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< LIB_PIN * > &  aPins,
bool  groupByName,
bool  groupBySelection 
)
inline

◆ RemoveRow()

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

Definition at line 644 of file dialog_lib_edit_pin_table.cpp.

References m_rows.

Referenced by DIALOG_LIB_EDIT_PIN_TABLE::OnDeleteRow().

◆ SetUnitFilter()

void PIN_TABLE_DATA_MODEL::SetUnitFilter ( int  aFilter)
inline

◆ SetValue()

◆ SortPins()

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

Definition at line 622 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 612 of file dialog_lib_edit_pin_table.cpp.

References m_rows.

Referenced by DIALOG_LIB_EDIT_PIN_TABLE::OnColSort(), and RebuildRows().

◆ StringFromBool()

static wxString PIN_TABLE_DATA_MODEL::StringFromBool ( bool  aValue)
inlinestaticprivate

Definition at line 670 of file dialog_lib_edit_pin_table.cpp.

Referenced by GetValue().

Member Data Documentation

◆ m_edited

bool PIN_TABLE_DATA_MODEL::m_edited
private

Definition at line 706 of file dialog_lib_edit_pin_table.cpp.

Referenced by IsEdited(), and SetValue().

◆ m_eval

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

Definition at line 711 of file dialog_lib_edit_pin_table.cpp.

Referenced by PIN_TABLE_DATA_MODEL(), and SetValue().

◆ m_evalOriginal

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

Definition at line 712 of file dialog_lib_edit_pin_table.cpp.

Referenced by GetValue(), and SetValue().

◆ m_frame

SYMBOL_EDIT_FRAME* PIN_TABLE_DATA_MODEL::m_frame
private

◆ m_pinTable

DIALOG_LIB_EDIT_PIN_TABLE* PIN_TABLE_DATA_MODEL::m_pinTable
private

Definition at line 708 of file dialog_lib_edit_pin_table.cpp.

Referenced by SetValue().

◆ m_rows

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

◆ m_symbol

LIB_SYMBOL* PIN_TABLE_DATA_MODEL::m_symbol
private

Definition at line 709 of file dialog_lib_edit_pin_table.cpp.

Referenced by SetValue().

◆ m_unitFilter

int PIN_TABLE_DATA_MODEL::m_unitFilter
private

Definition at line 704 of file dialog_lib_edit_pin_table.cpp.

Referenced by RebuildRows(), and SetUnitFilter().


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