NorMIT-nav
22.09
An IGT application
cxStreamer.cpp
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
#include "
cxStreamer.h
"
13
#include "
cxSender.h
"
14
15
namespace
cx
16
{
17
18
Streamer::Streamer
() :
19
QObject(NULL), mSendInterval(0), mSendTimer(0), mInitialized(false)
20
{}
21
22
void
Streamer::setSendInterval
(
int
milliseconds)
23
{
24
mSendInterval = milliseconds;
25
}
26
27
int
Streamer::getSendInterval
()
const
28
{
29
return
mSendInterval;
30
}
31
32
void
Streamer::setInitialized
(
bool
initialized)
33
{
34
mInitialized = initialized;
35
}
36
37
bool
Streamer::isInitialized
()
38
{
39
return
mInitialized;
40
}
41
42
void
Streamer::createSendTimer
(
bool
singleshot)
43
{
44
mSendTimer
=
new
QTimer(
this
);
45
mSendTimer
->setSingleShot(singleshot);
46
connect(
mSendTimer
, SIGNAL(timeout()),
this
, SLOT(
streamSlot
()));
47
}
48
49
bool
Streamer::isReadyToSend
()
50
{
51
return
mSender
&&
mSender
->isReady();
52
}
53
54
//--------------------------------------------------------
55
56
57
//--------------------------------------------------------
58
59
void
CommandLineStreamer::initialize
(
StringMap
arguments)
60
{
61
mArguments
= arguments;
62
}
63
64
}
//namespace cx
cx::CommandLineStreamer::mArguments
StringMap mArguments
Definition:
cxStreamer.h:101
cxSender.h
cx
Namespace for all CustusX production code.
Definition:
cx_dev_group_definitions.h:13
cx::Streamer::getSendInterval
int getSendInterval() const
how often an image should be sent (in milliseconds)
Definition:
cxStreamer.cpp:27
cx::Streamer::Streamer
Streamer()
Definition:
cxStreamer.cpp:18
cxStreamer.h
cx::Streamer::isInitialized
bool isInitialized()
Definition:
cxStreamer.cpp:37
cx::CommandLineStreamer::initialize
virtual void initialize(StringMap arguments)
Definition:
cxStreamer.cpp:59
cx::StringMap
std::map< QString, QString > StringMap
Definition:
cxCommandlineImageStreamerFactory.h:28
cx::Streamer::setInitialized
void setInitialized(bool initialized)
Definition:
cxStreamer.cpp:32
cx::Streamer::createSendTimer
void createSendTimer(bool singleshot=false)
Definition:
cxStreamer.cpp:42
cx::Streamer::mSender
SenderPtr mSender
Definition:
cxStreamer.h:65
cx::Streamer::setSendInterval
void setSendInterval(int milliseconds)
how often an image should be sent (in milliseconds)
Definition:
cxStreamer.cpp:22
cx::Streamer::mSendTimer
QTimer * mSendTimer
Definition:
cxStreamer.h:66
cx::Streamer::isReadyToSend
bool isReadyToSend()
Definition:
cxStreamer.cpp:49
cx::Streamer::streamSlot
virtual void streamSlot()=0
CX
source
resource
videoServer
cxStreamer.cpp
Generated on Tue Sep 13 2022 11:06:16 for NorMIT-nav by
1.8.17