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, 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 ()
 

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)
 

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 373 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 394 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 806 of file dialog_lib_edit_pin_table.cpp.

References m_rows.

Referenced by DIALOG_LIB_EDIT_PIN_TABLE::OnAddRow().

◆ 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

◆ findRow()

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

Definition at line 592 of file dialog_lib_edit_pin_table.cpp.

Referenced by RebuildRows().

◆ GetColLabelValue()

wxString PIN_TABLE_DATA_MODEL::GetColLabelValue ( int  aCol)
inlineoverride

Definition at line 414 of file dialog_lib_edit_pin_table.cpp.

References GetPinTableColLabel().

◆ GetNumberCols()

int PIN_TABLE_DATA_MODEL::GetNumberCols ( )
inlineoverride

Definition at line 412 of file dialog_lib_edit_pin_table.cpp.

References COL_COUNT.

◆ GetNumberRows()

int PIN_TABLE_DATA_MODEL::GetNumberRows ( )
inlineoverride

◆ GetRowPins()

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

◆ 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 424 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 839 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 419 of file dialog_lib_edit_pin_table.cpp.

◆ onUnitsChanged()

void PIN_TABLE_DATA_MODEL::onUnitsChanged ( wxCommandEvent &  aEvent)
inline

Definition at line 399 of file dialog_lib_edit_pin_table.cpp.

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

◆ RebuildRows()

◆ RemoveRow()

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

Definition at line 819 of file dialog_lib_edit_pin_table.cpp.

References m_rows.

Referenced by DIALOG_LIB_EDIT_PIN_TABLE::OnDeleteRow().

◆ SetBodyStyleFilter()

void PIN_TABLE_DATA_MODEL::SetBodyStyleFilter ( int  aFilter)
inline

◆ SetFilterBySelection()

void PIN_TABLE_DATA_MODEL::SetFilterBySelection ( bool  aFilter)
inline

◆ SetUnitFilter()

void PIN_TABLE_DATA_MODEL::SetUnitFilter ( int  aFilter)
inline

◆ SetValue()

◆ SortPins()

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

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

References m_rows.

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

Member Data Documentation

◆ m_bodyStyleFilter

int PIN_TABLE_DATA_MODEL::m_bodyStyleFilter
private

Definition at line 852 of file dialog_lib_edit_pin_table.cpp.

Referenced by RebuildRows(), and SetBodyStyleFilter().

◆ m_edited

bool PIN_TABLE_DATA_MODEL::m_edited
private

Definition at line 855 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 863 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 864 of file dialog_lib_edit_pin_table.cpp.

Referenced by GetValue(), and SetValue().

◆ m_filterBySelection

bool PIN_TABLE_DATA_MODEL::m_filterBySelection
private

Definition at line 853 of file dialog_lib_edit_pin_table.cpp.

Referenced by RebuildRows(), and SetFilterBySelection().

◆ 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 861 of file dialog_lib_edit_pin_table.cpp.

Referenced by RebuildRows().

◆ m_pinTable

DIALOG_LIB_EDIT_PIN_TABLE* PIN_TABLE_DATA_MODEL::m_pinTable
private

Definition at line 857 of file dialog_lib_edit_pin_table.cpp.

Referenced by 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 858 of file dialog_lib_edit_pin_table.cpp.

Referenced by SetValue().

◆ m_unitFilter

int PIN_TABLE_DATA_MODEL::m_unitFilter
private

Definition at line 851 of file dialog_lib_edit_pin_table.cpp.

Referenced by RebuildRows(), and SetUnitFilter().


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