-
Notifications
You must be signed in to change notification settings - Fork 0
/
huewrapper.h
45 lines (36 loc) · 1016 Bytes
/
huewrapper.h
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 HUEWRAPPER_H
#define HUEWRAPPER_H
#include <QObject>
#include <QtNetwork>
#include <QSettings>
#include <QColor>
class HueWrapper : public QObject
{
Q_OBJECT
public:
explicit HueWrapper(QObject *parent = 0);
void setLightColorLoop(int light, bool loop);
void setGroupColorLoop(int group, bool loop);
void setLightColor(int light, QColor col);
void setGroupColor(int group, QColor col);
void setLightOn(int light, bool on);
void setGroupOn(int group, bool on);
void setLightBri(int light, int bri);
void setGroupBri(int light, int bri);
void ipRequest();
public slots:
void doUpdateLights();
void doUpdateGroups();
void sendUpdateLightsSignal();
void sendUpdateGroupsSignal();
void ipRequestFinished();
signals:
void dataLightsUpdated(QByteArray json);
void dataGroupsUpdated(QByteArray json);
void ipFound(QString ip);
public slots:
private:
QSettings settings;
QNetworkAccessManager nam;
};
#endif // HUEWRAPPER_H