7 #include <QNetworkAccessManager> 11 #include <leddevice/LedDevice.h> 97 QNetworkAccessManager manager;
110 void resolveReply(QNetworkReply* reply);
122 void newLights(QMap<quint16,QJsonObject> map);
132 void post(QString route, QString content);
146 unsigned int transitionTime;
152 QString originalState;
157 void set(QString state);
162 static const std::set<QString> GAMUT_A_MODEL_IDS;
164 static const std::set<QString> GAMUT_B_MODEL_IDS;
166 static const std::set<QString> GAMUT_C_MODEL_IDS;
186 void setTransitionTime(
unsigned int transitionTime);
192 void setColor(
CiColor color,
float brightnessFactor = 1.0f);
228 static LedDevice* construct(
const QJsonObject &deviceConfig);
232 virtual void start();
239 void newLights(QMap<quint16, QJsonObject> map);
241 void stateChanged(
bool newState);
251 virtual int write(
const std::vector<ColorRgb> & ledValues);
252 bool init(
const QJsonObject &deviceConfig);
259 bool switchOffOnBlack;
261 float brightnessFactor;
266 std::vector<unsigned int> lightIds;
268 std::vector<PhilipsHueLight> lights;
Definition: LedDevicePhilipsHue.h:90
Interface (pure virtual base class) for LedDevices.
Definition: LedDevice.h:32
static float getDistanceBetweenTwoPoints(CiColor p1, CiColor p2)
Definition: LedDevicePhilipsHue.cpp:116
Implementation for the Philips Hue system.
Definition: LedDevicePhilipsHue.h:209
Color triangle to define an available color space for the hue lamps.
Definition: LedDevicePhilipsHue.h:85
A color point in the color space of the hue system.
Definition: LedDevicePhilipsHue.h:19
static CiColor getClosestPointToPoint(CiColor a, CiColor b, CiColor p)
Definition: LedDevicePhilipsHue.cpp:95
static bool isPointInLampsReach(CiColor p, CiColorTriangle colorSpace)
Definition: LedDevicePhilipsHue.cpp:78
float x
X component.
Definition: LedDevicePhilipsHue.h:22
static CiColor rgbToCiColor(float red, float green, float blue, CiColorTriangle colorSpace)
Converts an RGB color to the Hue xy color space and brightness.
Definition: LedDevicePhilipsHue.cpp:18
float y
Y component.
Definition: LedDevicePhilipsHue.h:24
static float crossProduct(CiColor p1, CiColor p2)
Definition: LedDevicePhilipsHue.cpp:73
Simple class to hold the id, the latest color, the color space and the original state.
Definition: LedDevicePhilipsHue.h:138
float bri
The brightness.
Definition: LedDevicePhilipsHue.h:26