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

#include <model_zones_overview_table.h>

Inheritance diagram for MODEL_ZONES_OVERVIEW_TABLE:

Public Types

enum  { NAME , NET , LAYERS , COL_COUNT }
 
enum  WIDTH_SETTING { NAME_WIDTH = 128 , LAYER_BAR_WIDTH = 16 , RESERVED = 10 , MINIMAL_WIDTH = NAME_WIDTH + LAYER_BAR_WIDTH + RESERVED }
 

Public Member Functions

 MODEL_ZONES_OVERVIEW_TABLE (ZONE_PRIORITY_CONTAINER_LIST aZones, BOARD *a_pcb, PCB_BASE_FRAME *aPCB_FRAME, wxWindow *a_dialog)
 
 ~MODEL_ZONES_OVERVIEW_TABLE () override
 
void EnableFitterByName (bool aEnable)
 
void EnableFitterByNet (bool aEnable)
 
void GetValueByRow (wxVariant &aVariant, unsigned aRow, unsigned aCol) const override
 
bool SetValueByRow (const wxVariant &aVariant, unsigned aRow, unsigned aCol) override
 
unsigned int GetCount () const override
 
ZONEGetZone (wxDataViewItem const &item) const
 
wxDataViewItem GetItemByZone (ZONE *) const
 
std::optional< unsigned > MoveZoneIndex (unsigned aIndex, ZONE_INDEX_MOVEMENT aMovement)
 Move selected zone up/down.
 
std::optional< unsigned > SwapZonePriority (unsigned aDragIndex, unsigned aDropIndex)
 Swap two zone while drag && drop.
 
wxDataViewItem ApplyFilter (wxString const &aFilterText, wxDataViewItem aSelection)
 Filter the zones by the filter text.
 
wxDataViewItem ClearFilter (wxDataViewItem aSelection)
 Clear up the filter.
 
unsigned int GetAllZonesCount () const
 

Static Public Member Functions

static std::map< int, wxString > GetColumnNames ()
 

Private Member Functions

void SortZoneContainers ()
 
void OnRowCountChange ()
 

Private Attributes

ZONE_PRIORITY_CONTAINER_LIST m_allZoneContainers
 
ZONE_PRIORITY_CONTAINER_LIST m_filteredZoneContainers
 
BOARDm_pcb
 
PCB_BASE_FRAMEm_PCB_FRAME
 
wxWindow * m_dialog
 
bool m_sortByName
 
bool m_sortByNet
 

Detailed Description

Definition at line 52 of file model_zones_overview_table.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
NAME 
NET 
LAYERS 
COL_COUNT 

Definition at line 55 of file model_zones_overview_table.h.

◆ WIDTH_SETTING

Enumerator
NAME_WIDTH 
LAYER_BAR_WIDTH 
RESERVED 
MINIMAL_WIDTH 

Definition at line 64 of file model_zones_overview_table.h.

Constructor & Destructor Documentation

◆ MODEL_ZONES_OVERVIEW_TABLE()

MODEL_ZONES_OVERVIEW_TABLE::MODEL_ZONES_OVERVIEW_TABLE ( ZONE_PRIORITY_CONTAINER_LIST  aZones,
BOARD a_pcb,
PCB_BASE_FRAME aPCB_FRAME,
wxWindow *  a_dialog 
)

Definition at line 98 of file model_zones_overview_table.cpp.

References m_filteredZoneContainers, and Reset().

◆ ~MODEL_ZONES_OVERVIEW_TABLE()

MODEL_ZONES_OVERVIEW_TABLE::~MODEL_ZONES_OVERVIEW_TABLE ( )
overridedefault

Member Function Documentation

◆ ApplyFilter()

wxDataViewItem MODEL_ZONES_OVERVIEW_TABLE::ApplyFilter ( wxString const &  aFilterText,
wxDataViewItem  aSelection 
)

Filter the zones by the filter text.

Parameters
aFilterTextSub text matching zone name, net name or layer name
aSelectionCurrent selection
Returns
unsigned Selection after the filter is applied

Definition at line 234 of file model_zones_overview_table.cpp.

References ClearFilter(), GetAllZonesCount(), GetCount(), GetItemByZone(), BOARD_CONNECTED_ITEM::GetNetname(), GetZone(), ZONE::GetZoneName(), m_allZoneContainers, m_filteredZoneContainers, m_sortByName, m_sortByNet, OnRowCountChange(), Reset(), and SortZoneContainers().

◆ ClearFilter()

wxDataViewItem MODEL_ZONES_OVERVIEW_TABLE::ClearFilter ( wxDataViewItem  aSelection)

Clear up the filter.

Parameters
aSelectionCurrent selection
Returns
unsigned

Definition at line 264 of file model_zones_overview_table.cpp.

References GetAllZonesCount(), GetCount(), GetItemByZone(), GetZone(), m_allZoneContainers, m_filteredZoneContainers, OnRowCountChange(), Reset(), and SortZoneContainers().

Referenced by ApplyFilter().

◆ EnableFitterByName()

void MODEL_ZONES_OVERVIEW_TABLE::EnableFitterByName ( bool  aEnable)

Definition at line 140 of file model_zones_overview_table.cpp.

References m_sortByName.

◆ EnableFitterByNet()

void MODEL_ZONES_OVERVIEW_TABLE::EnableFitterByNet ( bool  aEnable)

Definition at line 145 of file model_zones_overview_table.cpp.

References m_sortByNet.

◆ GetAllZonesCount()

unsigned int MODEL_ZONES_OVERVIEW_TABLE::GetAllZonesCount ( ) const
inline

Definition at line 136 of file model_zones_overview_table.h.

References m_allZoneContainers.

Referenced by ApplyFilter(), and ClearFilter().

◆ GetColumnNames()

static std::map< int, wxString > MODEL_ZONES_OVERVIEW_TABLE::GetColumnNames ( )
inlinestatic

Definition at line 74 of file model_zones_overview_table.h.

References _, LAYERS, NAME, and NET.

◆ GetCount()

unsigned int MODEL_ZONES_OVERVIEW_TABLE::GetCount ( ) const
override

◆ GetItemByZone()

wxDataViewItem MODEL_ZONES_OVERVIEW_TABLE::GetItemByZone ( ZONE aZone) const

Definition at line 177 of file model_zones_overview_table.cpp.

References GetZone(), and m_filteredZoneContainers.

Referenced by ApplyFilter(), and ClearFilter().

◆ GetValueByRow()

void MODEL_ZONES_OVERVIEW_TABLE::GetValueByRow ( wxVariant &  aVariant,
unsigned  aRow,
unsigned  aCol 
) const
override

◆ GetZone()

ZONE * MODEL_ZONES_OVERVIEW_TABLE::GetZone ( wxDataViewItem const &  item) const

Definition at line 164 of file model_zones_overview_table.cpp.

References GetCount(), and m_filteredZoneContainers.

Referenced by ApplyFilter(), ClearFilter(), and GetItemByZone().

◆ MoveZoneIndex()

std::optional< unsigned > MODEL_ZONES_OVERVIEW_TABLE::MoveZoneIndex ( unsigned  aIndex,
ZONE_INDEX_MOVEMENT  aMovement 
)

Move selected zone up/down.

Returns
std::optional<unsigned> the new index for selected one if success

Definition at line 192 of file model_zones_overview_table.cpp.

References GetCount(), and SwapZonePriority().

◆ OnRowCountChange()

void MODEL_ZONES_OVERVIEW_TABLE::OnRowCountChange ( )
inlineprivate

Definition at line 51 of file model_zones_overview_table.cpp.

References GetCount(), and m_dialog.

Referenced by ApplyFilter(), and ClearFilter().

◆ SetValueByRow()

bool MODEL_ZONES_OVERVIEW_TABLE::SetValueByRow ( const wxVariant &  aVariant,
unsigned  aRow,
unsigned  aCol 
)
override

Definition at line 150 of file model_zones_overview_table.cpp.

◆ SortZoneContainers()

void MODEL_ZONES_OVERVIEW_TABLE::SortZoneContainers ( )
inlineprivate

Definition at line 39 of file model_zones_overview_table.cpp.

References m_filteredZoneContainers.

Referenced by ApplyFilter(), and ClearFilter().

◆ SwapZonePriority()

std::optional< unsigned > MODEL_ZONES_OVERVIEW_TABLE::SwapZonePriority ( unsigned  aDragIndex,
unsigned  aDropIndex 
)

Swap two zone while drag && drop.

Returns
std::optional<unsigned> the new index for the dragged one if success

Definition at line 211 of file model_zones_overview_table.cpp.

References GetCount(), and m_filteredZoneContainers.

Referenced by MoveZoneIndex().

Member Data Documentation

◆ m_allZoneContainers

ZONE_PRIORITY_CONTAINER_LIST MODEL_ZONES_OVERVIEW_TABLE::m_allZoneContainers
private

Definition at line 145 of file model_zones_overview_table.h.

Referenced by ApplyFilter(), ClearFilter(), and GetAllZonesCount().

◆ m_dialog

wxWindow* MODEL_ZONES_OVERVIEW_TABLE::m_dialog
private

Definition at line 149 of file model_zones_overview_table.h.

Referenced by OnRowCountChange().

◆ m_filteredZoneContainers

◆ m_pcb

BOARD* MODEL_ZONES_OVERVIEW_TABLE::m_pcb
private

Definition at line 147 of file model_zones_overview_table.h.

Referenced by GetValueByRow().

◆ m_PCB_FRAME

PCB_BASE_FRAME* MODEL_ZONES_OVERVIEW_TABLE::m_PCB_FRAME
private

Definition at line 148 of file model_zones_overview_table.h.

Referenced by GetValueByRow().

◆ m_sortByName

bool MODEL_ZONES_OVERVIEW_TABLE::m_sortByName
private

Definition at line 150 of file model_zones_overview_table.h.

Referenced by ApplyFilter(), and EnableFitterByName().

◆ m_sortByNet

bool MODEL_ZONES_OVERVIEW_TABLE::m_sortByNet
private

Definition at line 151 of file model_zones_overview_table.h.

Referenced by ApplyFilter(), and EnableFitterByNet().


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