YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
display.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: LGPL-2.1-or-later
4 */
5
6#ifndef DISPLAY_H
7#define DISPLAY_H
8
9#include <QMainWindow>
10#include <QTimer>
11
12#include <yarp/os/Os.h>
13#include <yarp/os/Network.h>
15#include <yarp/dev/IBattery.h>
16#include <yarp/dev/PolyDriver.h>
17#include <yarp/dev/Drivers.h>
18
19#include "ui_display.h"
20
21class MainWindow :public QMainWindow
22{
23 Q_OBJECT
24
25public:
26 explicit MainWindow(const yarp::os::ResourceFinder& rf, yarp::dev::IBattery* ibat, QWidget *parent = 0, double refresh_period=10.0);
28
29 private slots:
30
31 void updateMain();
32
33public:
37 QGraphicsScene* scene;
38
39private:
40 Ui_MainWindow *ui;
41 QTimer* mainTimer;
42
43 QPixmap img_background1;
44 QPixmap img_background2;
45 QPixmap img_blocks;
46 QPixmap img_charge;
47 QPixmap img_numbers;
48 bool connected;
49 bool enable_ask_info;
50
51 //data read from the battery
52 double voltage;
53 double current;
54 double charge;
55 std::string info;
56};
57
58#endif
MainWindow class.
Definition display.h:22
yarp::dev::PolyDriver * drv
Definition display.h:36
yarp::dev::IBattery * ibat
Definition display.h:35
QGraphicsScene * scene
Definition display.h:37
yarp::os::Network yarp
Definition display.h:34
A generic battery interface.
Definition IBattery.h:26
A container for a device driver.
Definition PolyDriver.h:23
Utilities for manipulating the YARP network, including initialization and shutdown.
Definition Network.h:706
Helper class for finding config files and other external resources.