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 * GetValueAsCustom (int aRow, int aCol, const wxString &aTypeName) override
 
void SetValueAsCustom (int aRow, int aCol, const wxString &aTypeName, void *aValue) override
 
NET_GRID_ENTRYGetEntry (int aRow)
 
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_FRAMEm_frame
 
std::vector< NET_GRID_ENTRYm_nets
 
wxGridCellAttr * m_defaultAttr
 
wxGridCellAttr * m_labelAttr
 

Detailed Description

Definition at line 65 of file appearance_controls.h.

Member Enumeration Documentation

◆ COLUMNS

Enumerator
COL_COLOR 
COL_VISIBILITY 
COL_LABEL 
COL_SIZE 

Definition at line 68 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 65 of file appearance_controls.cpp.

References m_defaultAttr, and m_labelAttr.

◆ ~NET_GRID_TABLE()

NET_GRID_TABLE::~NET_GRID_TABLE ( )

Definition at line 78 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 76 of file appearance_controls.h.

Referenced by GetValueAsCustom().

◆ GetAttr()

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

Definition at line 85 of file appearance_controls.cpp.

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

◆ GetEntry()

NET_GRID_ENTRY & NET_GRID_TABLE::GetEntry ( int  aRow)

◆ GetNumberCols()

int NET_GRID_TABLE::GetNumberCols ( )
inlineoverride

Definition at line 95 of file appearance_controls.h.

References COL_SIZE.

◆ GetNumberRows()

int NET_GRID_TABLE::GetNumberRows ( )
inlineoverride

Definition at line 90 of file appearance_controls.h.

References m_nets.

◆ GetRowByNetcode()

int NET_GRID_TABLE::GetRowByNetcode ( int  aCode) const

◆ GetTypeName()

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

Definition at line 146 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 104 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 158 of file appearance_controls.cpp.

References COL_VISIBILITY, and m_nets.

Referenced by APPEARANCE_CONTROLS::OnNetGridClick().

◆ GetValueAsCustom()

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

Definition at line 177 of file appearance_controls.cpp.

References COL_COLOR, color, ColorToVoid(), and m_nets.

◆ HideOtherNets()

void NET_GRID_TABLE::HideOtherNets ( const NET_GRID_ENTRY aNet)

◆ 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 187 of file appearance_controls.cpp.

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

◆ ShowAllNets()

void NET_GRID_TABLE::ShowAllNets ( )

Definition at line 270 of file appearance_controls.cpp.

References m_nets, and updateNetVisibility().

Referenced by APPEARANCE_CONTROLS::onNetContextMenu().

◆ updateNetColor()

◆ updateNetVisibility()

◆ VoidToColor()

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

Definition at line 81 of file appearance_controls.h.

Referenced by SetValueAsCustom().

Member Data Documentation

◆ m_defaultAttr

wxGridCellAttr* NET_GRID_TABLE::m_defaultAttr
private

Definition at line 136 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

Definition at line 132 of file appearance_controls.h.

Referenced by Rebuild(), updateNetColor(), and updateNetVisibility().

◆ m_labelAttr

wxGridCellAttr* NET_GRID_TABLE::m_labelAttr
private

Definition at line 137 of file appearance_controls.h.

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

◆ m_nets


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