-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathled.h
More file actions
45 lines (33 loc) · 677 Bytes
/
led.h
File metadata and controls
45 lines (33 loc) · 677 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef LED_H
#define LED_H
#include <QtConcurrent/QtConcurrent>
#include <QLabel>
#include <QDebug>
#include <QVBoxLayout>
#include "grabapi.h"
class LED : public QLabel
{
Q_OBJECT
public:
explicit LED(QWidget *parent = nullptr, std::string url="", int delay=500);
~LED();
QString getUrl();
int getDelay();
enum State{
Gray,
Blue,
Red,
Green,
};
private:
QThread thread;
GrabApi *api;
std::string url;
int delay;
public slots:
void setState(State state);
void setValue(std::vector<std::vector<double>> points);
signals:
void startAPI();
};
#endif // LED_H