VTK
9.0.1
GUISupport
Qt
vtkQtDebugLeaksModel.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkQtDebugLeaksModel.h
5
6
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7
All rights reserved.
8
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10
This software is distributed WITHOUT ANY WARRANTY; without even
11
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12
PURPOSE. See the above copyright notice for more information.
13
14
=========================================================================*/
25
#ifndef vtkQtDebugLeaksModel_h
26
#define vtkQtDebugLeaksModel_h
27
28
#include "vtkGUISupportQtModule.h"
// For export macro
29
#include <QStandardItemModel>
30
31
class
vtkObjectBase
;
32
33
class
VTKGUISUPPORTQT_EXPORT
vtkQtDebugLeaksModel
:
public
QStandardItemModel
34
{
35
Q_OBJECT
36
37
public
:
38
vtkQtDebugLeaksModel
(QObject* p =
nullptr
);
39
~
vtkQtDebugLeaksModel
()
override
;
40
44
QList<vtkObjectBase*> getObjects(
const
QString& className);
45
51
QStandardItemModel* referenceCountModel(
const
QString& className);
52
53
protected
slots:
54
55
void
addObject(
vtkObjectBase
*
object
);
56
void
removeObject(
vtkObjectBase
*
object
);
57
void
registerObject(
vtkObjectBase
*
object
);
58
void
processPendingObjects();
59
void
onAboutToQuit();
60
61
// Inherited method from QAbstractItemModel
62
Qt::ItemFlags flags(
const
QModelIndex&
index
)
const override
;
63
64
private
:
65
class
qInternal;
66
qInternal* Internal;
67
68
class
qObserver;
69
qObserver* Observer;
70
71
Q_DISABLE_COPY(
vtkQtDebugLeaksModel
);
72
};
73
74
// TODO - move to private
75
//-----------------------------------------------------------------------------
76
class
ReferenceCountModel
:
public
QStandardItemModel
77
{
78
Q_OBJECT
79
80
public
:
81
ReferenceCountModel
(QObject* p =
nullptr
);
82
~ReferenceCountModel
()
override
;
83
void
addObject
(
vtkObjectBase
* obj);
84
void
removeObject
(
vtkObjectBase
* obj);
85
QString
pointerAsString
(
void
* ptr);
86
87
// Inherited method from QAbstractItemModel
88
Qt::ItemFlags
flags
(
const
QModelIndex&
index
)
const override
;
89
90
protected
slots:
91
void
updateReferenceCounts
();
92
};
93
94
#endif
95
// VTK-HeaderTest-Exclude: vtkQtDebugLeaksModel.h
ReferenceCountModel::addObject
void addObject(vtkObjectBase *obj)
vtkQtDebugLeaksModel
model class that observes the vtkDebugLeaks singleton
Definition:
vtkQtDebugLeaksModel.h:33
ReferenceCountModel
Definition:
vtkQtDebugLeaksModel.h:76
ReferenceCountModel::ReferenceCountModel
ReferenceCountModel(QObject *p=nullptr)
ReferenceCountModel::pointerAsString
QString pointerAsString(void *ptr)
ReferenceCountModel::~ReferenceCountModel
~ReferenceCountModel() override
ReferenceCountModel::flags
Qt::ItemFlags flags(const QModelIndex &index) const override
vtkObjectBase
abstract base class for most VTK objects
Definition:
vtkObjectBase.h:63
ReferenceCountModel::updateReferenceCounts
void updateReferenceCounts()
ReferenceCountModel::removeObject
void removeObject(vtkObjectBase *obj)
vtkX3D::index
@ index
Definition:
vtkX3D.h:252
Generated on Thu Jun 24 2021 15:17:26 for VTK by
1.8.17