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

#include <rc_item.h>

Inheritance diagram for RC_TREE_MODEL:
ERC_TREE_MODEL

Public Member Functions

 RC_TREE_MODEL (EDA_DRAW_FRAME *aParentFrame, wxDataViewCtrl *aView)
 
 ~RC_TREE_MODEL ()
 
void Update (std::shared_ptr< RC_ITEMS_PROVIDER > aProvider, int aSeverities)
 
void ExpandAll ()
 
void PrevMarker ()
 
void NextMarker ()
 
void SelectMarker (const MARKER_BASE *aMarker)
 
void CenterMarker (const MARKER_BASE *aMarker)
 
bool IsContainer (wxDataViewItem const &aItem) const override
 
wxDataViewItem GetParent (wxDataViewItem const &aItem) const override
 
unsigned int GetChildren (wxDataViewItem const &aItem, wxDataViewItemArray &aChildren) const override
 
unsigned int GetColumnCount () const override
 
wxString GetColumnType (unsigned int aCol) const override
 
bool HasContainerColumns (wxDataViewItem const &aItem) const override
 
void GetValue (wxVariant &aVariant, wxDataViewItem const &aItem, unsigned int aCol) const override
 Called by the wxDataView to fetch an item's value.
 
bool SetValue (wxVariant const &aVariant, wxDataViewItem const &aItem, unsigned int aCol) override
 Called by the wxDataView to edit an item's content.
 
bool GetAttr (wxDataViewItem const &aItem, unsigned int aCol, wxDataViewItemAttr &aAttr) const override
 Called by the wxDataView to fetch an item's formatting.
 
void ValueChanged (RC_TREE_NODE *aNode)
 
void DeleteCurrentItem (bool aDeep)
 
void DeleteItems (bool aCurrentOnly, bool aIncludeExclusions, bool aDeep)
 Deletes the current item or all items.
 

Static Public Member Functions

static wxDataViewItem ToItem (RC_TREE_NODE const *aNode)
 
static RC_TREE_NODEToNode (wxDataViewItem aItem)
 
static KIID ToUUID (wxDataViewItem aItem)
 

Protected Member Functions

void rebuildModel (std::shared_ptr< RC_ITEMS_PROVIDER > aProvider, int aSeverities)
 

Protected Attributes

EDA_DRAW_FRAMEm_editFrame
 
wxDataViewCtrl * m_view
 
int m_severities
 
std::shared_ptr< RC_ITEMS_PROVIDERm_rcItemsProvider
 
std::vector< RC_TREE_NODE * > m_tree
 

Detailed Description

Definition at line 228 of file rc_item.h.

Constructor & Destructor Documentation

◆ RC_TREE_MODEL()

RC_TREE_MODEL::RC_TREE_MODEL ( EDA_DRAW_FRAME aParentFrame,
wxDataViewCtrl *  aView 
)

Definition at line 250 of file rc_item.cpp.

◆ ~RC_TREE_MODEL()

RC_TREE_MODEL::~RC_TREE_MODEL ( )

Definition at line 259 of file rc_item.cpp.

References m_tree.

Member Function Documentation

◆ CenterMarker()

void RC_TREE_MODEL::CenterMarker ( const MARKER_BASE aMarker)

◆ DeleteCurrentItem()

void RC_TREE_MODEL::DeleteCurrentItem ( bool  aDeep)

◆ DeleteItems()

void RC_TREE_MODEL::DeleteItems ( bool  aCurrentOnly,
bool  aIncludeExclusions,
bool  aDeep 
)

Deletes the current item or all items.

If all, aIncludeExclusions determines whether or not exclusions are also deleted.

Keep a vector of elements to free after wxWidgets is definitely done accessing them

Definition at line 572 of file rc_item.cpp.

References MARKER_BASE::GetSeverity(), RC_TREE_NODE::m_RcItem, m_rcItemsProvider, m_tree, m_view, RPT_SEVERITY_EXCLUSION, ToItem(), and ToNode().

Referenced by DIALOG_FOOTPRINT_CHECKER::deleteAllMarkers(), DIALOG_ERC::deleteAllMarkers(), DIALOG_DRC::deleteAllMarkers(), and DeleteCurrentItem().

◆ ExpandAll()

void RC_TREE_MODEL::ExpandAll ( )

Definition at line 370 of file rc_item.cpp.

References m_tree, m_view, and ToItem().

Referenced by rebuildModel().

◆ GetAttr()

bool RC_TREE_MODEL::GetAttr ( wxDataViewItem const &  aItem,
unsigned int  aCol,
wxDataViewItemAttr &  aAttr 
) const
override

Called by the wxDataView to fetch an item's formatting.

Return true if the item has non-default attributes.

Definition at line 477 of file rc_item.cpp.

References KIGFX::COLOR4D::GetBrightness(), RC_TREE_NODE::m_RcItem, RC_TREE_NODE::m_Type, RC_TREE_NODE::MARKER, RPT_SEVERITY_EXCLUSION, and ToNode().

◆ GetChildren()

unsigned int RC_TREE_MODEL::GetChildren ( wxDataViewItem const &  aItem,
wxDataViewItemArray &  aChildren 
) const
override

Definition at line 392 of file rc_item.cpp.

References RC_TREE_NODE::m_Children, m_tree, ToItem(), and ToNode().

◆ GetColumnCount()

unsigned int RC_TREE_MODEL::GetColumnCount ( ) const
inlineoverride

Definition at line 264 of file rc_item.h.

◆ GetColumnType()

wxString RC_TREE_MODEL::GetColumnType ( unsigned int  aCol) const
inlineoverride

Definition at line 265 of file rc_item.h.

◆ GetParent()

wxDataViewItem RC_TREE_MODEL::GetParent ( wxDataViewItem const &  aItem) const
override

Definition at line 386 of file rc_item.cpp.

References ToItem(), and ToNode().

◆ GetValue()

◆ HasContainerColumns()

bool RC_TREE_MODEL::HasContainerColumns ( wxDataViewItem const &  aItem) const
inlineoverride

Definition at line 266 of file rc_item.h.

◆ IsContainer()

bool RC_TREE_MODEL::IsContainer ( wxDataViewItem const &  aItem) const
override

Definition at line 377 of file rc_item.cpp.

References RC_TREE_NODE::m_Type, RC_TREE_NODE::MARKER, and ToNode().

◆ NextMarker()

void RC_TREE_MODEL::NextMarker ( )

◆ PrevMarker()

void RC_TREE_MODEL::PrevMarker ( )

◆ rebuildModel()

◆ SelectMarker()

void RC_TREE_MODEL::SelectMarker ( const MARKER_BASE aMarker)

◆ SetValue()

bool RC_TREE_MODEL::SetValue ( wxVariant const &  aVariant,
wxDataViewItem const &  aItem,
unsigned int  aCol 
)
inlineoverride

Called by the wxDataView to edit an item's content.

Definition at line 277 of file rc_item.h.

◆ ToItem()

static wxDataViewItem RC_TREE_MODEL::ToItem ( RC_TREE_NODE const *  aNode)
inlinestatic

◆ ToNode()

◆ ToUUID()

◆ Update()

◆ ValueChanged()

Member Data Documentation

◆ m_editFrame

EDA_DRAW_FRAME* RC_TREE_MODEL::m_editFrame
protected

Definition at line 304 of file rc_item.h.

Referenced by ERC_TREE_MODEL::GetValue(), and GetValue().

◆ m_rcItemsProvider

std::shared_ptr<RC_ITEMS_PROVIDER> RC_TREE_MODEL::m_rcItemsProvider
protected

Definition at line 307 of file rc_item.h.

Referenced by DeleteItems(), and rebuildModel().

◆ m_severities

int RC_TREE_MODEL::m_severities
protected

Definition at line 306 of file rc_item.h.

Referenced by rebuildModel().

◆ m_tree

std::vector<RC_TREE_NODE*> RC_TREE_MODEL::m_tree
protected

◆ m_view

wxDataViewCtrl* RC_TREE_MODEL::m_view
protected

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