cisst-saw
Loading...
Searching...
No Matches
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
12This software is provided "as is" under an open source license, with
13no warranty. The complete license can be found in license.txt and
14http://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
27
28// Always include last
30
31// so we can have slots/signals with prmOperatingState
33
34class QLabel;
35
37{
38 Q_OBJECT;
39
40public:
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:
56
57 private slots:
58 void ShowContextMenu(const QPoint & pos);
59 void SlotOperatingStateEventHandler(const prmOperatingState & state);
60
61protected:
63
64 QLabel * QLState;
65 QLabel * QLTime; // time and valid using background color
66 QLabel * QLIsHomed;
67 QLabel * QLIsBusy;
68
70 bool mEnabled = true;
71};
72
73#endif // _prmOperatingStateQtWidget_h
Definition mtsFunctionWrite.h:37
Definition mtsInterfaceRequired.h:83
Definition prmOperatingState.h:34
QLabel * QLTime
Definition prmOperatingStateQtWidget.h:65
~prmOperatingStateQtWidget(void)
Definition prmOperatingStateQtWidget.h:42
void setEnabled(bool enable)
QLabel * QLIsBusy
Definition prmOperatingStateQtWidget.h:67
mtsFunctionWrite mStateCommand
Definition prmOperatingStateQtWidget.h:69
QLabel * QLIsHomed
Definition prmOperatingStateQtWidget.h:66
bool mEnabled
Definition prmOperatingStateQtWidget.h:70
void SignalOperatingState(const prmOperatingState &state)
QLabel * QLState
Definition prmOperatingStateQtWidget.h:64
void OperatingStateEventHandler(const prmOperatingState &state)
void SetValue(const prmOperatingState &newValue)
void SetInterfaceRequired(mtsInterfaceRequired *interfaceRequired)
#define CISST_EXPORT
Definition cmnExportMacros.h:50
Defines the command interfaces.
Q_DECLARE_METATYPE(prmInputData)