trikRuntime
sensorIndicator.h
Go to the documentation of this file.
1 /* Copyright 2014 Roman Kurbatov
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License. */
14 
15 #pragma once
16 
17 #include <QtCore/qglobal.h>
18 #include <QtWidgets/QHBoxLayout>
19 #include <QtWidgets/QLabel>
20 #include <QtWidgets/QProgressBar>
21 
22 #include "abstractIndicator.h"
23 
24 namespace trikControl {
25 class SensorInterface;
26 }
27 
28 namespace trikGui {
29 
32 {
33  Q_OBJECT
34 
35 public:
40  SensorIndicator(const QString &port, trikControl::SensorInterface &sensor, QWidget *parent = nullptr);
41 
42 public slots:
43  void renew() override;
44 
45 private:
47 
48  QHBoxLayout mLayout;
49  QLabel mNameLabel;
50  QProgressBar mValueBar;
51  QLabel mValueLabel;
52 };
53 
54 }
static const int port
Definition: trikCommunicatorTest.cpp:24
Base class for a widget that can show some reading from sensor, encoder and so on.
Definition: abstractIndicator.h:24
Definition: abstractIndicator.h:21
Definition: trikCommunicator.h:27
Abstract sensor, inherited by various sensor types.
Definition: sensorInterface.h:26
Widget that shows current sensor reading.
Definition: sensorIndicator.h:31