NorMIT-nav
2023.01.05-dev+develop.0da12
An IGT application
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
z
Functions
a
b
c
d
e
f
g
i
l
m
o
p
q
r
s
t
u
v
w
Variables
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Variables
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Typedefs
a
b
c
d
e
f
i
j
l
m
n
o
p
r
s
t
v
Enumerations
Enumerator
a
c
d
g
h
i
l
n
p
r
s
t
u
v
Related Functions
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Functions
a
b
c
d
e
f
g
i
l
m
n
o
p
q
r
s
t
v
Variables
c
f
i
l
m
o
p
q
r
s
t
v
Typedefs
c
d
f
h
m
o
p
q
s
u
v
Macros
_
a
b
c
d
e
f
g
i
m
n
o
p
r
s
t
u
v
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
cxTimedAlgorithm.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 CXTIMEDALGORITHM_H_
13
#define CXTIMEDALGORITHM_H_
14
15
#include "cxResourceExport.h"
16
17
//#include <QtWidgets>
18
19
20
#include <QObject>
21
#include <QDateTime>
22
#include <QTimer>
23
#include <boost/function.hpp>
24
#include <vector>
25
#include <iostream>
26
#include "boost/shared_ptr.hpp"
27
28
namespace
cx
29
{
30
31
32
40
class
cxResource_EXPORT
TimedBaseAlgorithm
:
public
QObject
41
{
42
Q_OBJECT
43
44
public
:
45
TimedBaseAlgorithm
(QString product,
int
secondsBetweenAnnounce);
46
virtual
~
TimedBaseAlgorithm
();
47
48
virtual
QString
getProduct
()
const
{
return
mProduct; }
55
virtual
void
execute() = 0;
59
virtual
bool
isFinished()
const
= 0;
64
virtual
bool
isRunning()
const
= 0;
65
66
signals:
67
void
aboutToStart();
68
void
started(
int
maxSteps);
69
void
finished();
70
void
productChanged();
71
// void progress();
72
73
protected
:
74
void
startTiming();
75
void
stopTiming();
76
bool
mUseDefaultMessages
;
77
78
QString getSecondsPassedAsString()
const
;
79
80
protected
slots:
81
virtual
void
finishedSlot
() {}
82
virtual
void
postProcessingSlot
() {}
83
84
private
slots:
85
void
timeoutSlot();
86
87
private
:
88
QTime getTimePassed();
89
90
QTimer* mTimer;
91
QDateTime mStartTime;
92
QString mProduct;
93
};
94
typedef
boost::shared_ptr<TimedBaseAlgorithm>
TimedAlgorithmPtr
;
95
96
}
//namespace
97
98
#endif
/* CXTIMEDALGORITHM_H_ */
cx
Namespace for all CustusX production code.
Definition:
cx_dev_group_definitions.h:13
cx::TimedBaseAlgorithm::mUseDefaultMessages
bool mUseDefaultMessages
Definition:
cxTimedAlgorithm.h:76
cx::TimedAlgorithmPtr
boost::shared_ptr< class TimedBaseAlgorithm > TimedAlgorithmPtr
Definition:
cxReconstructionExecuter.h:27
cx::TimedBaseAlgorithm::finishedSlot
virtual void finishedSlot()
Definition:
cxTimedAlgorithm.h:81
cx::TimedBaseAlgorithm::getProduct
virtual QString getProduct() const
Definition:
cxTimedAlgorithm.h:48
cx::TimedBaseAlgorithm
Base class for algorithms that wants to time their execution.
Definition:
cxTimedAlgorithm.h:40
cx::TimedBaseAlgorithm::postProcessingSlot
virtual void postProcessingSlot()
Definition:
cxTimedAlgorithm.h:82
CX
source
resource
core
algorithms
cxTimedAlgorithm.h
Generated on Thu Jan 5 2023 03:15:53 for NorMIT-nav by
1.8.17