KiCad PCB EDA Suite
|
#include <appearance_controls.h>
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_ENTRY & | GetEntry (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_FRAME * | m_frame |
std::vector< NET_GRID_ENTRY > | m_nets |
wxGridCellAttr * | m_defaultAttr |
wxGridCellAttr * | m_labelAttr |
Definition at line 65 of file appearance_controls.h.
Enumerator | |
---|---|
COL_COLOR | |
COL_VISIBILITY | |
COL_LABEL | |
COL_SIZE |
Definition at line 68 of file appearance_controls.h.
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 | ( | ) |
Definition at line 78 of file appearance_controls.cpp.
References m_defaultAttr, and m_labelAttr.
|
inlinestatic |
Definition at line 76 of file appearance_controls.h.
Referenced by GetValueAsCustom().
|
override |
Definition at line 85 of file appearance_controls.cpp.
References COL_COLOR, COL_LABEL, COL_VISIBILITY, m_defaultAttr, and m_labelAttr.
NET_GRID_ENTRY & NET_GRID_TABLE::GetEntry | ( | int | aRow | ) |
Definition at line 198 of file appearance_controls.cpp.
References m_nets.
Referenced by APPEARANCE_CONTROLS::onNetContextMenu(), and APPEARANCE_CONTROLS::OnNetGridMouseEvent().
|
inlineoverride |
Definition at line 95 of file appearance_controls.h.
References COL_SIZE.
|
inlineoverride |
Definition at line 90 of file appearance_controls.h.
References m_nets.
int NET_GRID_TABLE::GetRowByNetcode | ( | int | aCode | ) | const |
Definition at line 205 of file appearance_controls.cpp.
References m_nets.
Referenced by APPEARANCE_CONTROLS::OnNetVisibilityChanged(), and APPEARANCE_CONTROLS::showNetclass().
|
override |
Definition at line 146 of file appearance_controls.cpp.
References COL_COLOR, COL_LABEL, and COL_VISIBILITY.
|
override |
Definition at line 104 of file appearance_controls.cpp.
References COL_COLOR, COL_LABEL, COL_VISIBILITY, and m_nets.
|
override |
Definition at line 158 of file appearance_controls.cpp.
References COL_VISIBILITY, and m_nets.
Referenced by APPEARANCE_CONTROLS::OnNetGridClick().
|
override |
Definition at line 177 of file appearance_controls.cpp.
References COL_COLOR, color, ColorToVoid(), and m_nets.
void NET_GRID_TABLE::HideOtherNets | ( | const NET_GRID_ENTRY & | aNet | ) |
Definition at line 283 of file appearance_controls.cpp.
References NET_GRID_ENTRY::code, m_nets, and updateNetVisibility().
Referenced by APPEARANCE_CONTROLS::onNetContextMenu().
void NET_GRID_TABLE::Rebuild | ( | ) |
Definition at line 220 of file appearance_controls.cpp.
References color, PCB_BASE_FRAME::GetBoard(), PCB_BASE_FRAME::GetCanvas(), KIGFX::PCB_RENDER_SETTINGS::GetHiddenNets(), KIGFX::PCB_RENDER_SETTINGS::GetNetColorMap(), BOARD::GetNetInfo(), KIGFX::VIEW::GetPainter(), KIGFX::PAINTER::GetSettings(), PCB_DRAW_PANEL_GAL::GetView(), m_frame, m_nets, and NETINFO_LIST::NetsByName().
Referenced by APPEARANCE_CONTROLS::rebuildNets().
|
override |
Definition at line 118 of file appearance_controls.cpp.
References COL_COLOR, COL_LABEL, COL_VISIBILITY, NET_GRID_ENTRY::color, m_nets, NET_GRID_ENTRY::name, KIGFX::COLOR4D::SetFromWxString(), updateNetColor(), updateNetVisibility(), and NET_GRID_ENTRY::visible.
|
override |
Definition at line 167 of file appearance_controls.cpp.
References COL_VISIBILITY, m_nets, and updateNetVisibility().
Referenced by APPEARANCE_CONTROLS::OnNetGridClick(), APPEARANCE_CONTROLS::OnNetVisibilityChanged(), and APPEARANCE_CONTROLS::showNetclass().
|
override |
Definition at line 187 of file appearance_controls.cpp.
References COL_COLOR, m_nets, updateNetColor(), and VoidToColor().
void NET_GRID_TABLE::ShowAllNets | ( | ) |
Definition at line 270 of file appearance_controls.cpp.
References m_nets, and updateNetVisibility().
Referenced by APPEARANCE_CONTROLS::onNetContextMenu().
|
private |
Definition at line 305 of file appearance_controls.cpp.
References NET_GRID_ENTRY::code, NET_GRID_ENTRY::color, PCB_BASE_FRAME::GetCanvas(), KIGFX::PCB_RENDER_SETTINGS::GetNetColorMap(), KIGFX::VIEW::GetPainter(), KIGFX::PAINTER::GetSettings(), PCB_DRAW_PANEL_GAL::GetView(), m_frame, PCB_DRAW_PANEL_GAL::RedrawRatsnest(), EDA_DRAW_PANEL_GAL::Refresh(), and KIGFX::VIEW::UpdateAllLayersColor().
Referenced by SetValue(), and SetValueAsCustom().
|
private |
Definition at line 296 of file appearance_controls.cpp.
References NET_GRID_ENTRY::code, TOOLS_HOLDER::GetToolManager(), PCB_ACTIONS::hideNetInRatsnest, m_frame, TOOL_MANAGER::RunAction(), PCB_ACTIONS::showNetInRatsnest, and NET_GRID_ENTRY::visible.
Referenced by HideOtherNets(), SetValue(), SetValueAsBool(), and ShowAllNets().
|
inlinestatic |
Definition at line 81 of file appearance_controls.h.
Referenced by SetValueAsCustom().
|
private |
Definition at line 136 of file appearance_controls.h.
Referenced by GetAttr(), NET_GRID_TABLE(), and ~NET_GRID_TABLE().
|
private |
Definition at line 132 of file appearance_controls.h.
Referenced by Rebuild(), updateNetColor(), and updateNetVisibility().
|
private |
Definition at line 137 of file appearance_controls.h.
Referenced by GetAttr(), NET_GRID_TABLE(), and ~NET_GRID_TABLE().
|
private |
Definition at line 134 of file appearance_controls.h.
Referenced by GetEntry(), GetNumberRows(), GetRowByNetcode(), GetValue(), GetValueAsBool(), GetValueAsCustom(), HideOtherNets(), Rebuild(), SetValue(), SetValueAsBool(), SetValueAsCustom(), and ShowAllNets().