19 #ifndef UNITY_LIGHTS_H 20 #define UNITY_LIGHTS_H 22 #include <QtCore/QObject> 23 #include <QtGui/QColor> 25 class Lights:
public QObject
28 Q_PROPERTY(State state READ state WRITE setState NOTIFY stateChanged)
29 Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
30 Q_PROPERTY(
int onMillisec READ onMillisec WRITE setOnMillisec NOTIFY onMillisecChanged)
31 Q_PROPERTY(
int offMillisec READ offMillisec WRITE setOffMillisec NOTIFY offMillisecChanged)
40 explicit Lights(QObject *parent = 0);
42 void setState(State newState);
45 void setColor(const QColor &color);
48 int onMillisec() const;
49 void setOnMillisec(
int onMs);
51 int offMillisec() const;
52 void setOffMillisec(
int offMs);
55 void stateChanged(State newState);
56 void colorChanged(const QColor &color);
57 void onMillisecChanged(
int onMs);
58 void offMillisecChanged(
int offMs);
66 virtual
bool init() = 0;
67 virtual
void turnOff() = 0;
68 virtual
void turnOn() = 0;