KiCad PCB EDA Suite
|
Data model for display in the Net Inspector panel. More...
#include <pcb_net_inspector_panel_data_model.h>
Public Member Functions | |
DATA_MODEL (PCB_NET_INSPECTOR_PANEL &parent) | |
unsigned int | columnCount () const |
unsigned int | itemCount () const |
wxVariant | valueAt (unsigned int aCol, unsigned int aRow) const |
const LIST_ITEM & | itemAt (unsigned int aRow) const |
std::vector< std::pair< wxString, wxDataViewItem > > | getGroupDataViewItems () |
std::optional< LIST_ITEM_ITER > | findItem (int aNetCode) |
std::optional< LIST_ITEM_ITER > | findItem (NETINFO_ITEM *aNet) |
std::optional< LIST_ITEM_ITER > | findGroupItem (int aGroupNumber) |
LIST_ITEM_ITER | addGroup (LIST_ITEM_ITER groupsBegin, LIST_ITEM_ITER groupsEnd, wxString groupName, LIST_ITEM::GROUP_TYPE groupType) |
std::optional< LIST_ITEM_ITER > | addItem (std::unique_ptr< LIST_ITEM > aItem) |
void | addItems (std::vector< std::unique_ptr< LIST_ITEM > > aItems) |
std::unique_ptr< LIST_ITEM > | deleteItem (const std::optional< LIST_ITEM_ITER > &aRow) |
void | addCustomGroups () |
Adds all custom group-by entries to the items table. | |
void | deleteAllItems () |
void | updateItem (const std::optional< LIST_ITEM_ITER > &aRow) |
void | updateAllItems () |
void | resortIfChanged (LIST_ITEM *aItem) |
bool | itemColumnChanged (const LIST_ITEM *aItem, unsigned int aCol) const |
Protected Member Functions | |
unsigned int | GetColumnCount () const override |
void | GetValue (wxVariant &aOutValue, const wxDataViewItem &aItem, unsigned int aCol) const override |
int | Compare (const wxDataViewItem &aItem1, const wxDataViewItem &aItem2, unsigned int aCol, bool aAsc) const override |
bool | SetValue (const wxVariant &aInValue, const wxDataViewItem &aItem, unsigned int aCol) override |
wxDataViewItem | GetParent (const wxDataViewItem &aItem) const override |
bool | IsContainer (const wxDataViewItem &aItem) const override |
bool | HasContainerColumns (const wxDataViewItem &aItem) const override |
unsigned int | GetChildren (const wxDataViewItem &aParent, wxDataViewItemArray &aChildren) const override |
wxString | GetColumnType (unsigned int) const override |
Static Protected Member Functions | |
static int | compareUInt (uint64_t aValue1, uint64_t aValue2, bool aAsc) |
Private Attributes | |
PCB_NET_INSPECTOR_PANEL & | m_parent |
std::vector< std::unique_ptr< LIST_ITEM > > | m_items |
std::map< wxString, LIST_ITEM * > | m_custom_group_map |
Map of custom group names to their representative list item. | |
Data model for display in the Net Inspector panel.
Definition at line 402 of file pcb_net_inspector_panel_data_model.h.
|
inline |
Definition at line 405 of file pcb_net_inspector_panel_data_model.h.
|
inline |
Adds all custom group-by entries to the items table.
Note this assumes that m_items is empty prior to adding these groups
Definition at line 597 of file pcb_net_inspector_panel_data_model.h.
References BOARD::GetCopperLayerCount(), group, PCB_NET_INSPECTOR_PANEL::m_brd, m_custom_group_map, PCB_NET_INSPECTOR_PANEL::m_custom_group_rules, m_items, m_parent, and PCB_NET_INSPECTOR_PANEL::LIST_ITEM::USER_DEFINED.
|
inline |
Definition at line 470 of file pcb_net_inspector_panel_data_model.h.
References group, and m_items.
Referenced by addItem().
|
inline |
Definition at line 493 of file pcb_net_inspector_panel_data_model.h.
References addGroup(), group, m_custom_group_map, PCB_NET_INSPECTOR_PANEL::m_custom_group_rules, PCB_NET_INSPECTOR_PANEL::m_group_by_netclass, m_items, m_parent, and PCB_NET_INSPECTOR_PANEL::LIST_ITEM::NETCLASS.
Referenced by addItems().
|
inline |
Definition at line 547 of file pcb_net_inspector_panel_data_model.h.
|
inline |
Definition at line 407 of file pcb_net_inspector_panel_data_model.h.
References PCB_NET_INSPECTOR_PANEL::m_columns, and m_parent.
Referenced by GetColumnCount().
|
inlineoverrideprotected |
Definition at line 764 of file pcb_net_inspector_panel_data_model.h.
References PCB_NET_INSPECTOR_PANEL::COLUMN_BOARD_LENGTH, PCB_NET_INSPECTOR_PANEL::COLUMN_LAST_STATIC_COL, PCB_NET_INSPECTOR_PANEL::COLUMN_NAME, PCB_NET_INSPECTOR_PANEL::COLUMN_PAD_COUNT, PCB_NET_INSPECTOR_PANEL::COLUMN_PAD_DIE_LENGTH, PCB_NET_INSPECTOR_PANEL::COLUMN_TOTAL_LENGTH, PCB_NET_INSPECTOR_PANEL::COLUMN_VIA_COUNT, PCB_NET_INSPECTOR_PANEL::COLUMN_VIA_LENGTH, compareUInt(), PCB_NET_INSPECTOR_PANEL::LIST_ITEM::GetBoardWireLength(), PCB_NET_INSPECTOR_PANEL::LIST_ITEM::GetIsGroup(), PCB_NET_INSPECTOR_PANEL::LIST_ITEM::GetLayerWireLength(), PCB_NET_INSPECTOR_PANEL::LIST_ITEM::GetNetName(), PCB_NET_INSPECTOR_PANEL::LIST_ITEM::GetPadCount(), PCB_NET_INSPECTOR_PANEL::LIST_ITEM::GetPadDieLength(), PCB_NET_INSPECTOR_PANEL::LIST_ITEM::GetTotalLength(), PCB_NET_INSPECTOR_PANEL::LIST_ITEM::GetViaCount(), PCB_NET_INSPECTOR_PANEL::LIST_ITEM::GetViaLength(), PCB_NET_INSPECTOR_PANEL::m_columns, m_parent, res, and ValueStringCompare().
|
inlinestaticprotected |
Definition at line 756 of file pcb_net_inspector_panel_data_model.h.
Referenced by Compare().
|
inline |
Definition at line 614 of file pcb_net_inspector_panel_data_model.h.
References m_items.
|
inline |
|
inline |
Definition at line 458 of file pcb_net_inspector_panel_data_model.h.
References m_items.
|
inline |
Definition at line 437 of file pcb_net_inspector_panel_data_model.h.
References m_items.
Referenced by findItem().
|
inline |
Definition at line 449 of file pcb_net_inspector_panel_data_model.h.
References findItem(), and NETINFO_ITEM::GetNetCode().
|
inlineoverrideprotected |
|
inlineoverrideprotected |
Definition at line 694 of file pcb_net_inspector_panel_data_model.h.
References columnCount().
|
inlineoverrideprotected |
Definition at line 882 of file pcb_net_inspector_panel_data_model.h.
|
inline |
Definition at line 420 of file pcb_net_inspector_panel_data_model.h.
References m_items.
|
inlineoverrideprotected |
Definition at line 826 of file pcb_net_inspector_panel_data_model.h.
References PCB_NET_INSPECTOR_PANEL::LIST_ITEM::Parent().
|
inlineoverrideprotected |
Definition at line 696 of file pcb_net_inspector_panel_data_model.h.
References _, PCB_NET_INSPECTOR_PANEL::COLUMN_BOARD_LENGTH, PCB_NET_INSPECTOR_PANEL::COLUMN_LAST_STATIC_COL, PCB_NET_INSPECTOR_PANEL::COLUMN_NAME, PCB_NET_INSPECTOR_PANEL::COLUMN_NETCLASS, PCB_NET_INSPECTOR_PANEL::COLUMN_PAD_COUNT, PCB_NET_INSPECTOR_PANEL::COLUMN_PAD_DIE_LENGTH, PCB_NET_INSPECTOR_PANEL::COLUMN_TOTAL_LENGTH, PCB_NET_INSPECTOR_PANEL::COLUMN_VIA_COUNT, PCB_NET_INSPECTOR_PANEL::COLUMN_VIA_LENGTH, PCB_NET_INSPECTOR_PANEL::formatCount(), PCB_NET_INSPECTOR_PANEL::formatLength(), PCB_NET_INSPECTOR_PANEL::m_columns, m_parent, PCB_NET_INSPECTOR_PANEL::LIST_ITEM::NETCLASS, and PCB_NET_INSPECTOR_PANEL::LIST_ITEM::USER_DEFINED.
Referenced by valueAt().
|
inlineoverrideprotected |
Definition at line 842 of file pcb_net_inspector_panel_data_model.h.
References IsContainer().
|
inlineoverrideprotected |
Definition at line 834 of file pcb_net_inspector_panel_data_model.h.
Referenced by HasContainerColumns().
|
inline |
Definition at line 418 of file pcb_net_inspector_panel_data_model.h.
References m_items.
|
inline |
Definition at line 658 of file pcb_net_inspector_panel_data_model.h.
References PCB_NET_INSPECTOR_PANEL::LIST_ITEM::BoardWireLengthChanged(), PCB_NET_INSPECTOR_PANEL::COLUMN_BOARD_LENGTH, PCB_NET_INSPECTOR_PANEL::COLUMN_LAST_STATIC_COL, PCB_NET_INSPECTOR_PANEL::COLUMN_PAD_COUNT, PCB_NET_INSPECTOR_PANEL::COLUMN_PAD_DIE_LENGTH, PCB_NET_INSPECTOR_PANEL::COLUMN_TOTAL_LENGTH, PCB_NET_INSPECTOR_PANEL::COLUMN_VIA_COUNT, PCB_NET_INSPECTOR_PANEL::COLUMN_VIA_LENGTH, PCB_NET_INSPECTOR_PANEL::m_columns, m_parent, PCB_NET_INSPECTOR_PANEL::LIST_ITEM::PadCountChanged(), PCB_NET_INSPECTOR_PANEL::LIST_ITEM::PadDieLengthChanged(), PCB_NET_INSPECTOR_PANEL::LIST_ITEM::TotalLengthChanged(), PCB_NET_INSPECTOR_PANEL::LIST_ITEM::ViaCountChanged(), and PCB_NET_INSPECTOR_PANEL::LIST_ITEM::ViaLengthChanged().
Referenced by resortIfChanged().
|
inline |
Definition at line 409 of file pcb_net_inspector_panel_data_model.h.
References m_items.
|
inline |
Definition at line 641 of file pcb_net_inspector_panel_data_model.h.
References itemColumnChanged(), NET_INSPECTOR_PANEL::m_netsList, m_parent, and PCB_NET_INSPECTOR_PANEL::LIST_ITEM::Parent().
Referenced by updateItem().
|
inlineoverrideprotected |
Definition at line 820 of file pcb_net_inspector_panel_data_model.h.
|
inline |
Definition at line 635 of file pcb_net_inspector_panel_data_model.h.
References m_items.
|
inline |
Definition at line 621 of file pcb_net_inspector_panel_data_model.h.
References resortIfChanged().
|
inline |
Definition at line 411 of file pcb_net_inspector_panel_data_model.h.
References GetValue(), and m_items.
|
private |
Map of custom group names to their representative list item.
Definition at line 893 of file pcb_net_inspector_panel_data_model.h.
Referenced by addCustomGroups(), and addItem().
|
private |
Definition at line 890 of file pcb_net_inspector_panel_data_model.h.
Referenced by addCustomGroups(), addGroup(), addItem(), addItems(), deleteAllItems(), deleteItem(), findGroupItem(), findItem(), GetChildren(), getGroupDataViewItems(), itemAt(), itemCount(), updateAllItems(), and valueAt().
|
private |
Definition at line 885 of file pcb_net_inspector_panel_data_model.h.
Referenced by addCustomGroups(), addItem(), columnCount(), Compare(), deleteItem(), GetValue(), itemColumnChanged(), and resortIfChanged().