2
* Copyright (C) 2014 Canonical, Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
#ifndef UNITY_MOCK_LIGHTS_H
18
#define UNITY_MOCK_LIGHTS_H
20
#include <QtCore/QObject>
21
#include <QtGui/QColor>
23
class Lights: public QObject
27
Q_PROPERTY(State state READ state WRITE setState NOTIFY stateChanged)
28
Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
29
Q_PROPERTY(int onMillisec READ onMillisec WRITE setOnMillisec NOTIFY onMillisecChanged)
30
Q_PROPERTY(int offMillisec READ offMillisec WRITE setOffMillisec NOTIFY offMillisecChanged)
38
explicit Lights(QObject *parent = 0);
41
void setState(State newState);
44
void setColor(const QColor &color);
47
int onMillisec() const;
48
void setOnMillisec(int onMs);
50
int offMillisec() const;
51
void setOffMillisec(int offMs);
54
void stateChanged(State newState);
55
void colorChanged(const QColor &color);
56
void onMillisecChanged(int onMs);
57
void offMillisecChanged(int offMs);