cisst-saw
Toggle main menu visibility
Loading...
Searching...
No Matches
tmp
cisst-saw
cisst
cisstParameterTypes
prmOperatingStateQtWidget.h
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3
4
/*
5
Author(s): Anton Deguet
6
Created on: 2019-01-15
7
8
(C) Copyright 2019 Johns Hopkins University (JHU), All Rights Reserved.
9
10
--- begin cisst license - do not edit ---
11
12
This software is provided "as is" under an open source license, with
13
no warranty. The complete license can be found in license.txt and
14
http://www.cisst.org/cisst/license.txt.
15
16
--- end cisst license ---
17
*/
18
19
#ifndef _prmOperatingStateQtWidget_h
20
#define _prmOperatingStateQtWidget_h
21
22
#include <QWidget>
23
#include <QMetaType>
24
25
#include <
cisstMultiTask/mtsFunctionWrite.h
>
26
#include <
cisstParameterTypes/prmOperatingState.h
>
27
28
// Always include last
29
#include <
cisstParameterTypes/prmExportQt.h
>
30
31
// so we can have slots/signals with prmOperatingState
32
Q_DECLARE_METATYPE
(
prmOperatingState
);
33
34
class
QLabel;
35
36
class
CISST_EXPORT
prmOperatingStateQtWidget
:
public
QWidget
37
{
38
Q_OBJECT;
39
40
public
:
41
prmOperatingStateQtWidget
(
void
);
42
~prmOperatingStateQtWidget
(
void
) {};
43
44
void
setupUi
(
void
);
45
46
void
setEnabled
(
bool
enable);
47
48
void
SetInterfaceRequired
(
mtsInterfaceRequired
* interfaceRequired);
49
52
void
SetValue
(
const
prmOperatingState
& newValue);
53
54
signals:
55
void
SignalOperatingState
(
const
prmOperatingState
& state);
56
57
private
slots:
58
void
ShowContextMenu(
const
QPoint & pos);
59
void
SlotOperatingStateEventHandler(
const
prmOperatingState
& state);
60
61
protected
:
62
void
OperatingStateEventHandler
(
const
prmOperatingState
& state);
63
64
QLabel *
QLState
;
65
QLabel *
QLTime
;
// time and valid using background color
66
QLabel *
QLIsHomed
;
67
QLabel *
QLIsBusy
;
68
69
mtsFunctionWrite
mStateCommand
;
70
bool
mEnabled
=
true
;
71
};
72
73
#endif
// _prmOperatingStateQtWidget_h
mtsFunctionWrite
Definition
mtsFunctionWrite.h:37
mtsInterfaceRequired
Definition
mtsInterfaceRequired.h:83
prmOperatingState
Definition
prmOperatingState.h:34
prmOperatingStateQtWidget::QLTime
QLabel * QLTime
Definition
prmOperatingStateQtWidget.h:65
prmOperatingStateQtWidget::~prmOperatingStateQtWidget
~prmOperatingStateQtWidget(void)
Definition
prmOperatingStateQtWidget.h:42
prmOperatingStateQtWidget::setEnabled
void setEnabled(bool enable)
prmOperatingStateQtWidget::QLIsBusy
QLabel * QLIsBusy
Definition
prmOperatingStateQtWidget.h:67
prmOperatingStateQtWidget::mStateCommand
mtsFunctionWrite mStateCommand
Definition
prmOperatingStateQtWidget.h:69
prmOperatingStateQtWidget::QLIsHomed
QLabel * QLIsHomed
Definition
prmOperatingStateQtWidget.h:66
prmOperatingStateQtWidget::mEnabled
bool mEnabled
Definition
prmOperatingStateQtWidget.h:70
prmOperatingStateQtWidget::prmOperatingStateQtWidget
prmOperatingStateQtWidget(void)
prmOperatingStateQtWidget::setupUi
void setupUi(void)
prmOperatingStateQtWidget::SignalOperatingState
void SignalOperatingState(const prmOperatingState &state)
prmOperatingStateQtWidget::QLState
QLabel * QLState
Definition
prmOperatingStateQtWidget.h:64
prmOperatingStateQtWidget::OperatingStateEventHandler
void OperatingStateEventHandler(const prmOperatingState &state)
prmOperatingStateQtWidget::SetValue
void SetValue(const prmOperatingState &newValue)
prmOperatingStateQtWidget::SetInterfaceRequired
void SetInterfaceRequired(mtsInterfaceRequired *interfaceRequired)
CISST_EXPORT
#define CISST_EXPORT
Definition
cmnExportMacros.h:50
mtsFunctionWrite.h
Defines the command interfaces.
prmExportQt.h
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(prmInputData)
prmOperatingState.h
Generated by
1.18.0