VTK  9.3.20240328
Public Member Functions | Protected Slots | List of all members
vtkQtDebugLeaksModel Class Reference

model class that observes the vtkDebugLeaks singleton More...

#include <vtkQtDebugLeaksModel.h>

Inherits QStandardItemModel.

Public Member Functions

 vtkQtDebugLeaksModel (QObject *p=nullptr)
 
 ~vtkQtDebugLeaksModel () override
 
QList< vtkObjectBase * > getObjects (const QString &className)
 Get the list of objects in the model that have the given class name. More...
 
QStandardItemModel * referenceCountModel (const QString &className)
 Return an item model that contains only objects with the given class name. More...
 

Protected Slots

void addObject (vtkObjectBase *object)
 
void removeObject (vtkObjectBase *object)
 
void registerObject (vtkObjectBase *object)
 
void processPendingObjects ()
 
void onAboutToQuit ()
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 

Detailed Description

model class that observes the vtkDebugLeaks singleton

This class is used internally by the vtkQtDebugLeaksView. It installs an observer on the vtkDebugLeaks singleton and uses the observer to maintain a model of all vtkObjectBase derived objects that are alive in memory.

Tests:
vtkQtDebugLeaksModel (Tests)

Definition at line 25 of file vtkQtDebugLeaksModel.h.

Constructor & Destructor Documentation

◆ vtkQtDebugLeaksModel()

vtkQtDebugLeaksModel::vtkQtDebugLeaksModel ( QObject *  p = nullptr)

◆ ~vtkQtDebugLeaksModel()

vtkQtDebugLeaksModel::~vtkQtDebugLeaksModel ( )
override

Member Function Documentation

◆ getObjects()

QList<vtkObjectBase*> vtkQtDebugLeaksModel::getObjects ( const QString &  className)

Get the list of objects in the model that have the given class name.

◆ referenceCountModel()

QStandardItemModel* vtkQtDebugLeaksModel::referenceCountModel ( const QString &  className)

Return an item model that contains only objects with the given class name.

The model has two columns: object address (string), object reference count (integer) The caller is allowed to reparent or delete the returned model.

◆ addObject

void vtkQtDebugLeaksModel::addObject ( vtkObjectBase object)
protectedslot

◆ removeObject

void vtkQtDebugLeaksModel::removeObject ( vtkObjectBase object)
protectedslot

◆ registerObject

void vtkQtDebugLeaksModel::registerObject ( vtkObjectBase object)
protectedslot

◆ processPendingObjects

void vtkQtDebugLeaksModel::processPendingObjects ( )
protectedslot

◆ onAboutToQuit

void vtkQtDebugLeaksModel::onAboutToQuit ( )
protectedslot

◆ flags

Qt::ItemFlags vtkQtDebugLeaksModel::flags ( const QModelIndex &  index) const
overrideprotectedslot

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