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
cxWebServerWidgetBase.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 "
cxWebServerWidgetBase.h
"
13
#include <QPushButton>
14
#include <QVBoxLayout>
15
#include <QLabel>
16
17
namespace
cx
18
{
19
20
21
WebServerWidgetBase::WebServerWidgetBase
(
cx::VisServicesPtr
services, QWidget *parent) :
22
QWidget(parent),
23
mServices(services),
24
mStartStopButton(new QPushButton(QIcon(
":/icons/open_icon_library/media-playback-start-3.png"
),
"Start"
)),
25
mVerticalLayout(new QVBoxLayout(this))
26
{
27
mStartStopButton
->setCheckable(
true
);
28
29
mVerticalLayout
->addWidget(
new
QLabel(
"Run Web Server"
));
30
mVerticalLayout
->addWidget(
mStartStopButton
);
31
//mVerticalLayout->addStretch();
32
33
connect(
mStartStopButton
, &QPushButton::clicked,
this
, &
WebServerWidgetBase::startStopSlot
);
34
}
35
36
WebServerWidgetBase::~WebServerWidgetBase
()
37
{
38
}
39
40
void
WebServerWidgetBase::startStopSlot
(
bool
checked)
41
{
42
// CX_LOG_DEBUG() << "WebServerWidgetBase::startStopSlot: " << checked;
43
if
(checked)
44
{
45
this->
startServer
();
46
mStartStopButton
->setIcon(QIcon(
":/icons/open_icon_library/media-playback-stop-3.png"
));
47
mStartStopButton
->setText(
"Stop"
);
48
}
49
else
50
{
51
this->
stopServer
();
52
mStartStopButton
->setIcon(QIcon(
":/icons/open_icon_library/media-playback-start-3.png"
));
53
mStartStopButton
->setText(
"Start"
);
54
this->
shutdownServer
();
55
}
56
}
57
58
}
//cx
cx
Namespace for all CustusX production code.
Definition:
cx_dev_group_definitions.h:13
cxWebServerWidgetBase.h
cx::VisServicesPtr
boost::shared_ptr< class VisServices > VisServicesPtr
Definition:
cxMainWindow.h:40
cx::WebServerWidgetBase::startStopSlot
virtual void startStopSlot(bool checked)
Definition:
cxWebServerWidgetBase.cpp:40
cx::WebServerWidgetBase::startServer
virtual void startServer()=0
cx::WebServerWidgetBase::stopServer
virtual void stopServer()=0
cx::WebServerWidgetBase::~WebServerWidgetBase
virtual ~WebServerWidgetBase()
Definition:
cxWebServerWidgetBase.cpp:36
cx::WebServerWidgetBase::mVerticalLayout
QVBoxLayout * mVerticalLayout
Definition:
cxWebServerWidgetBase.h:46
cx::WebServerWidgetBase::shutdownServer
virtual void shutdownServer()
Definition:
cxWebServerWidgetBase.h:50
cx::WebServerWidgetBase::WebServerWidgetBase
WebServerWidgetBase(cx::VisServicesPtr services, QWidget *parent=0)
Definition:
cxWebServerWidgetBase.cpp:21
cx::WebServerWidgetBase::mStartStopButton
QPushButton * mStartStopButton
Definition:
cxWebServerWidgetBase.h:45
CX
source
resource
widgets
cxWebServerWidgetBase.cpp
Generated on Thu Jan 5 2023 03:15:56 for NorMIT-nav by
1.8.17