libusermetrics: libusermetricsoutput/ColorTheme.h Source File

libusermetrics

ColorTheme.h
Go to the documentation of this file.
1 /*
2 * Copyright (C) 2013 Canonical, Ltd.
3 *
4 * This library is free software; you can redistribute it and/or modify it under
5 * the terms of version 3 of the GNU Lesser General Public License as published
6 * by the Free Software Foundation.
7 *
8 * This library is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
11 * details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Author: Pete Woods <pete.woods@canonical.com>
17 */
18
19 #ifndef USERMETRICSOUTPUT_COLORTHEME_H_
20 #define USERMETRICSOUTPUT_COLORTHEME_H_
21
22 #include <QtCore/QObject>
23 #include <QtGui/QColor>
24
29 namespace UserMetricsOutput {
30
37 class Q_DECL_EXPORT ColorTheme: public QObject {
38 Q_OBJECT
39
43 Q_PROPERTY(QColor start READ start NOTIFY startChanged FINAL)
44
45
48 Q_PROPERTY(QColor main READ main NOTIFY mainChanged FINAL)
49
50
53 Q_PROPERTY(QColor end READ end NOTIFY endChanged FINAL)
54
55 protected:
61 explicit ColorTheme(QObject *parent = 0);
62
63 public:
67 virtual ~ColorTheme();
68
72 virtual QColor start() const = 0;
73
77 virtual QColor main() const = 0;
78
82 virtual QColor end() const = 0;
83
84 Q_SIGNALS:
90 void startChanged(const QColor &color);
91
97 void mainChanged(const QColor &color);
98
104 void endChanged(const QColor &color);
105
106 };
107
108 }
109
112 #endif // USERMETRICSOUTPUT_COLORTHEME_H_
UserMetricsOutput::ColorTheme::ColorTheme
ColorTheme(QObject *parent=0)
Unusable constructor - class is pure-virtual.
UserMetricsOutput::ColorTheme::end
virtual QColor end() const =0
Last / end QColor in the ColorTheme.
UserMetricsOutput::ColorTheme
ColorTheme for a particular user metric.
Definition: ColorTheme.h:37
UserMetricsOutput
The user metrics output library namespace.
Definition: ColorTheme.h:29
UserMetricsOutput::ColorTheme::~ColorTheme
virtual ~ColorTheme()
Destructor.
UserMetricsOutput::ColorTheme::start
virtual QColor start() const =0
First / start QColor in the ColorTheme.
UserMetricsOutput::ColorTheme::startChanged
void startChanged(const QColor &color)
The first / start QColor has changed.
UserMetricsOutput::ColorTheme::main
virtual QColor main() const =0
Middle / main QColor in the ColorTheme.
UserMetricsOutput::ColorTheme::endChanged
void endChanged(const QColor &color)
The first / end QColor has changed.
UserMetricsOutput::ColorTheme::mainChanged
void mainChanged(const QColor &color)
The middle / main QColor has changed.