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

#include <appearance_controls.h>

Inheritance diagram for NET_GRID_TABLE:

Public Types

enum  COLUMNS { COL_COLOR , COL_VISIBILITY , COL_LABEL , COL_SIZE }
 

Public Member Functions

 NET_GRID_TABLE (PCB_BASE_FRAME *aFrame, wxColor aBackgroundColor)
 
 ~NET_GRID_TABLE ()
 
int GetNumberRows () override
 
int GetNumberCols () override
 
wxGridCellAttr * GetAttr (int aRow, int aCol, wxGridCellAttr::wxAttrKind) override
 
wxString GetValue (int aRow, int aCol) override
 
void SetValue (int aRow, int aCol, const wxString &aValue) override
 
wxString GetTypeName (int aRow, int aCol) override
 
bool GetValueAsBool (int aRow, int aCol) override
 
void SetValueAsBool (int aRow, int aCol, bool aValue) override
 
void SetVisibilityState (int aRow, bool aVisible)
 Update cached visibility without dispatching a ratsnest action.
 
void * GetValueAsCustom (int aRow, int aCol, const wxString &aTypeName) override
 
void SetValueAsCustom (int aRow, int aCol, const wxString &aTypeName, void *aValue) override
 
const NET_GRID_ENTRY & GetEntry (int aRow) const
 
int GetRowByNetcode (int aCode) const
 
void Rebuild ()
 
void ShowAllNets ()
 
void HideOtherNets (const NET_GRID_ENTRY &aNet)
 

Static Public Member Functions

static void * ColorToVoid (COLOR4D &aColor)
 
static COLOR4D VoidToColor (void *aColor)
 

Private Member Functions

void updateNetVisibility (const NET_GRID_ENTRY &aNet)
 
void updateNetColor (const NET_GRID_ENTRY &aNet)
 

Private Attributes

PCB_BASE_FRAME * m_frame
 
std::vector< NET_GRID_ENTRY > m_nets
 
std::unordered_map< int, int > m_netcodeToRow
 
wxGridCellAttr * m_defaultAttr
 
wxGridCellAttr * m_labelAttr
 

Detailed Description

Definition at line 66 of file appearance_controls.h.

Member Enumeration Documentation

◆ COLUMNS

Enumerator
COL_COLOR 
COL_VISIBILITY 
COL_LABEL 
COL_SIZE 

Definition at line 69 of file appearance_controls.h.

Constructor & Destructor Documentation

◆ NET_GRID_TABLE()

NET_GRID_TABLE::NET_GRID_TABLE ( PCB_BASE_FRAME * aFrame,
wxColor aBackgroundColor )

Definition at line 68 of file appearance_controls.cpp.

References m_defaultAttr, m_frame, and m_labelAttr.

◆ ~NET_GRID_TABLE()

NET_GRID_TABLE::~NET_GRID_TABLE ( )

Definition at line 81 of file appearance_controls.cpp.

References m_defaultAttr, and m_labelAttr.

Member Function Documentation

◆ ColorToVoid()

static void * NET_GRID_TABLE::ColorToVoid ( COLOR4D & aColor)
inlinestatic

Definition at line 77 of file appearance_controls.h.

Referenced by GetValueAsCustom().

◆ GetAttr()

wxGridCellAttr * NET_GRID_TABLE::GetAttr ( int aRow,
int aCol,
wxGridCellAttr::wxAttrKind  )
override

Definition at line 88 of file appearance_controls.cpp.

References COL_COLOR, COL_LABEL, COL_VISIBILITY, m_defaultAttr, and m_labelAttr.

◆ GetEntry()

const NET_GRID_ENTRY & NET_GRID_TABLE::GetEntry ( int aRow) const

Definition at line 209 of file appearance_controls.cpp.

References m_nets.

◆ GetNumberCols()

int NET_GRID_TABLE::GetNumberCols ( )
inlineoverride

Definition at line 96 of file appearance_controls.h.

References COL_SIZE.

◆ GetNumberRows()

int NET_GRID_TABLE::GetNumberRows ( )
inlineoverride

Definition at line 91 of file appearance_controls.h.

References m_nets.

◆ GetRowByNetcode()

int NET_GRID_TABLE::GetRowByNetcode ( int aCode) const

Definition at line 216 of file appearance_controls.cpp.

References m_netcodeToRow.

◆ GetTypeName()

wxString NET_GRID_TABLE::GetTypeName ( int aRow,
int aCol )
override

Definition at line 149 of file appearance_controls.cpp.

References COL_COLOR, COL_LABEL, and COL_VISIBILITY.

◆ GetValue()

wxString NET_GRID_TABLE::GetValue ( int aRow,
int aCol )
override

Definition at line 107 of file appearance_controls.cpp.

References COL_COLOR, COL_LABEL, COL_VISIBILITY, and m_nets.

◆ GetValueAsBool()

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

Definition at line 161 of file appearance_controls.cpp.

References COL_VISIBILITY, and m_nets.

◆ GetValueAsCustom()

void * NET_GRID_TABLE::GetValueAsCustom ( int aRow,
int aCol,
const wxString & aTypeName )
override

Definition at line 188 of file appearance_controls.cpp.

References COL_COLOR, ColorToVoid(), and m_nets.

◆ HideOtherNets()

void NET_GRID_TABLE::HideOtherNets ( const NET_GRID_ENTRY & aNet)

Definition at line 297 of file appearance_controls.cpp.

References NET_GRID_ENTRY::code, m_nets, and updateNetVisibility().

◆ Rebuild()

◆ SetValue()

void NET_GRID_TABLE::SetValue ( int aRow,
int aCol,
const wxString & aValue )
override

◆ SetValueAsBool()

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

◆ SetValueAsCustom()

void NET_GRID_TABLE::SetValueAsCustom ( int aRow,
int aCol,
const wxString & aTypeName,
void * aValue )
override

Definition at line 198 of file appearance_controls.cpp.

References COL_COLOR, m_nets, updateNetColor(), and VoidToColor().

◆ SetVisibilityState()

void NET_GRID_TABLE::SetVisibilityState ( int aRow,
bool aVisible )

Update cached visibility without dispatching a ratsnest action.

Definition at line 180 of file appearance_controls.cpp.

References m_nets.

Referenced by SetValueAsBool().

◆ ShowAllNets()

void NET_GRID_TABLE::ShowAllNets ( )

Definition at line 284 of file appearance_controls.cpp.

References m_nets, and updateNetVisibility().

◆ updateNetColor()

void NET_GRID_TABLE::updateNetColor ( const NET_GRID_ENTRY & aNet)
private

◆ updateNetVisibility()

void NET_GRID_TABLE::updateNetVisibility ( const NET_GRID_ENTRY & aNet)
private

◆ VoidToColor()

static COLOR4D NET_GRID_TABLE::VoidToColor ( void * aColor)
inlinestatic

Definition at line 82 of file appearance_controls.h.

Referenced by SetValueAsCustom().

Member Data Documentation

◆ m_defaultAttr

wxGridCellAttr* NET_GRID_TABLE::m_defaultAttr
private

Definition at line 141 of file appearance_controls.h.

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

◆ m_frame

PCB_BASE_FRAME* NET_GRID_TABLE::m_frame
private

◆ m_labelAttr

wxGridCellAttr* NET_GRID_TABLE::m_labelAttr
private

Definition at line 142 of file appearance_controls.h.

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

◆ m_netcodeToRow

std::unordered_map<int, int> NET_GRID_TABLE::m_netcodeToRow
private

Definition at line 139 of file appearance_controls.h.

Referenced by GetRowByNetcode(), and Rebuild().

◆ m_nets


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