KiCad PCB EDA Suite
Loading...
Searching...
No Matches
TEST_RC_TREE_MODEL Class Reference
Inheritance diagram for TEST_RC_TREE_MODEL:
RC_TREE_MODEL

Public Member Functions

 TEST_RC_TREE_MODEL ()
 
RC_TREE_NODEAddMarkerWithMainItem ()
 
void DetachTopLevel (RC_TREE_NODE *aNode)
 
const wxDataViewCtrl * GetView () const
 
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
 
bool HasValue (const wxDataViewItem &item, unsigned col) 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)
 Delete 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

RC_TREE_NODEcreateNode (RC_TREE_NODE *aParent, const std::shared_ptr< RC_ITEM > &aRcItem, RC_TREE_NODE::NODE_TYPE aType)
 
void retireNodeTree (RC_TREE_NODE *aNode)
 
void deleteNodeTree (RC_TREE_NODE *aNode)
 
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< std::unique_ptr< RC_TREE_NODE::HANDLE > > m_handles
 
std::vector< RC_TREE_NODE * > m_tree
 

Detailed Description

Definition at line 31 of file test_rc_tree_model.cpp.

Constructor & Destructor Documentation

◆ TEST_RC_TREE_MODEL()

TEST_RC_TREE_MODEL::TEST_RC_TREE_MODEL ( )
inline

Definition at line 34 of file test_rc_tree_model.cpp.

References RC_TREE_MODEL::RC_TREE_MODEL().

Member Function Documentation

◆ AddMarkerWithMainItem()

RC_TREE_NODE * TEST_RC_TREE_MODEL::AddMarkerWithMainItem ( )
inline

◆ CenterMarker()

void RC_TREE_MODEL::CenterMarker ( const MARKER_BASE * aMarker)
inherited

Definition at line 822 of file rc_item.cpp.

References m_tree, m_view, and ToItem().

◆ createNode()

RC_TREE_NODE * RC_TREE_MODEL::createNode ( RC_TREE_NODE * aParent,
const std::shared_ptr< RC_ITEM > & aRcItem,
RC_TREE_NODE::NODE_TYPE aType )
protectedinherited

◆ DeleteCurrentItem()

void RC_TREE_MODEL::DeleteCurrentItem ( bool aDeep)
inherited

Definition at line 637 of file rc_item.cpp.

References DeleteItems().

Referenced by DIALOG_DRC::OnDRCItemRClick(), and DIALOG_ERC::OnERCItemRClick().

◆ DeleteItems()

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

Delete the current item or all items.

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

Definition at line 643 of file rc_item.cpp.

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

Referenced by DeleteCurrentItem().

◆ deleteNodeTree()

void RC_TREE_MODEL::deleteNodeTree ( RC_TREE_NODE * aNode)
protectedinherited

◆ DetachTopLevel()

void TEST_RC_TREE_MODEL::DetachTopLevel ( RC_TREE_NODE * aNode)
inline

◆ ExpandAll()

void RC_TREE_MODEL::ExpandAll ( )
inherited

Definition at line 419 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
overrideinherited

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

Return true if the item has non-default attributes.

Definition at line 541 of file rc_item.cpp.

References KIGFX::COLOR4D::GetBrightness(), RC_ITEM::GetParent(), MARKER_BASE::GetSeverity(), RC_TREE_NODE::m_RcItem, m_tree, RC_TREE_NODE::m_Type, m_view, RC_TREE_NODE::MARKER, RPT_SEVERITY_EXCLUSION, and ToNode().

◆ GetChildren()

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

Definition at line 447 of file rc_item.cpp.

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

◆ GetColumnCount()

unsigned int RC_TREE_MODEL::GetColumnCount ( ) const
inlineoverrideinherited

Definition at line 295 of file rc_item.h.

◆ GetColumnType()

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

Definition at line 296 of file rc_item.h.

◆ GetParent()

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

Definition at line 440 of file rc_item.cpp.

References RC_TREE_NODE::m_Parent, ToItem(), and ToNode().

◆ GetValue()

◆ GetView()

const wxDataViewCtrl * RC_TREE_MODEL::GetView ( ) const
inlineinherited

Definition at line 265 of file rc_item.h.

References m_view.

◆ HasContainerColumns()

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

Definition at line 297 of file rc_item.h.

◆ HasValue()

bool RC_TREE_MODEL::HasValue ( const wxDataViewItem & item,
unsigned col ) const
inlineoverrideinherited

Definition at line 299 of file rc_item.h.

References m_tree.

◆ IsContainer()

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

Definition at line 426 of file rc_item.cpp.

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

◆ NextMarker()

void RC_TREE_MODEL::NextMarker ( )
inherited

◆ PrevMarker()

void RC_TREE_MODEL::PrevMarker ( )
inherited

◆ rebuildModel()

◆ retireNodeTree()

void RC_TREE_MODEL::retireNodeTree ( RC_TREE_NODE * aNode)
protectedinherited

◆ SelectMarker()

void RC_TREE_MODEL::SelectMarker ( const MARKER_BASE * aMarker)
inherited

Definition at line 807 of file rc_item.cpp.

References m_tree, m_view, and ToItem().

◆ SetValue()

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

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

Definition at line 316 of file rc_item.h.

◆ ToItem()

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

◆ ToNode()

◆ ToUUID()

◆ Update()

void RC_TREE_MODEL::Update ( std::shared_ptr< RC_ITEMS_PROVIDER > aProvider,
int aSeverities )
inherited

Definition at line 413 of file rc_item.cpp.

References rebuildModel().

Referenced by DIALOG_DRC::OnDRCItemRClick(), and DIALOG_ERC::OnERCItemRClick().

◆ ValueChanged()

Member Data Documentation

◆ m_editFrame

EDA_DRAW_FRAME* RC_TREE_MODEL::m_editFrame
protectedinherited

Definition at line 348 of file rc_item.h.

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

◆ m_handles

std::vector<std::unique_ptr<RC_TREE_NODE::HANDLE> > RC_TREE_MODEL::m_handles
protectedinherited

Definition at line 353 of file rc_item.h.

Referenced by createNode(), and rebuildModel().

◆ m_rcItemsProvider

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

Definition at line 351 of file rc_item.h.

Referenced by DeleteItems(), RC_TREE_MODEL(), and rebuildModel().

◆ m_severities

int RC_TREE_MODEL::m_severities
protectedinherited

Definition at line 350 of file rc_item.h.

Referenced by RC_TREE_MODEL(), and rebuildModel().

◆ m_tree

◆ m_view

wxDataViewCtrl* RC_TREE_MODEL::m_view
protectedinherited

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