NorMIT-nav
2023.01.05-dev+develop.0da12
An IGT application
cxMemoryTester.h
Go to the documentation of this file.
1
/*=========================================================================
2
This file is part of CustusX, an Image Guided Therapy Application.
3
4
Copyright (c) SINTEF Department of Medical Technology.
5
All rights reserved.
6
7
CustusX is released under a BSD 3-Clause license.
8
9
See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10
=========================================================================*/
11
12
#ifndef CXMEMORYTESTER_H_
13
#define CXMEMORYTESTER_H_
14
15
#include <QtWidgets>
16
17
#include <vector>
18
#include "
vtkForwardDeclarations.h
"
19
#include <boost/shared_ptr.hpp>
20
21
namespace
cx
22
{
23
24
class
MemHolder
:
public
QObject
25
{
26
Q_OBJECT
27
public
:
28
struct
Block
29
{
30
std::vector<vtkImageDataPtr>
mData
;
31
};
32
33
std::vector<Block>
mBlocks
;
34
public
slots:
35
int
addBlock
();
36
int
removeBlock
();
37
void
generateLeak
();
38
private
:
39
vtkImageDataPtr
generateVtkImageData();
40
};
41
42
class
MemoryTester
:
public
QMainWindow
43
{
44
Q_OBJECT
45
public
:
46
MemoryTester
(QWidget* parent = 0);
47
~MemoryTester
() {}
48
QToolBar*
mToolbar
;
49
// QPlainTextEdit* mTextEdit;
50
private
slots:
51
void
about();
52
void
colorCrash();
53
private
:
54
void
createStatusBar();
55
void
addActions();
56
void
addToolbar();
57
void
addMenu();
58
59
QAction* mAddMemAction;
60
QAction* mRemoveMemAction;
61
QAction* mLeakAction;
62
63
QAction* mAction1;
64
// QAction* mAction2;
65
// QAction* mAction3;
66
// QAction* mAction4;
67
QAction* mAboutQtAct;
68
QAction* mAboutAct;
69
70
QAction* mCrashAct;
71
72
boost::shared_ptr<MemHolder> mMemory;
73
};
74
75
76
}
// namespace cx
77
78
#endif // CXMEMORYTESTER_H_
cx
Namespace for all CustusX production code.
Definition:
cx_dev_group_definitions.h:13
cx::MemoryTester::MemoryTester
MemoryTester(QWidget *parent=0)
Definition:
cxMemoryTester.cpp:137
cx::MemoryTester::mToolbar
QToolBar * mToolbar
Definition:
cxMemoryTester.h:48
cx::MemHolder::mBlocks
std::vector< Block > mBlocks
Definition:
cxMemoryTester.h:33
vtkImageDataPtr
vtkSmartPointer< class vtkImageData > vtkImageDataPtr
Definition:
cxVideoConnectionWidget.h:30
cx::MemHolder::generateLeak
void generateLeak()
Definition:
cxMemoryTester.cpp:56
cx::MemHolder::removeBlock
int removeBlock()
Definition:
cxMemoryTester.cpp:126
vtkForwardDeclarations.h
cx::MemoryTester
Definition:
cxMemoryTester.h:42
cx::MemoryTester::~MemoryTester
~MemoryTester()
Definition:
cxMemoryTester.h:47
cx::MemHolder::Block::mData
std::vector< vtkImageDataPtr > mData
Definition:
cxMemoryTester.h:30
cx::MemHolder
Definition:
cxMemoryTester.h:24
cx::MemHolder::addBlock
int addBlock()
Definition:
cxMemoryTester.cpp:112
cx::MemHolder::Block
Definition:
cxMemoryTester.h:28
CX
source
apps
MemoryTester
cxMemoryTester.h
Generated on Thu Jan 5 2023 03:15:50 for NorMIT-nav by
1.8.17