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 <QtGui/QColor>
23 
28 namespace UserMetricsOutput {
29 
36 class Q_DECL_EXPORT ColorTheme: public QObject {
37 Q_OBJECT
38 
42 Q_PROPERTY(QColor start READ start NOTIFY startChanged FINAL)
43 
44 
47 Q_PROPERTY(QColor main READ main NOTIFY mainChanged FINAL)
48 
52 Q_PROPERTY(QColor end READ end NOTIFY endChanged FINAL)
53 
54 protected:
60  explicit ColorTheme(QObject *parent = 0);
61 
62 public:
66  virtual ~ColorTheme();
67 
71  virtual QColor start() const = 0;
72 
76  virtual QColor main() const = 0;
77 
81  virtual QColor end() const = 0;
82 
83 Q_SIGNALS:
89  void startChanged(const QColor &color);
90 
96  void mainChanged(const QColor &color);
97 
103  void endChanged(const QColor &color);
104 
105 };
106 
107 }
108 
111 #endif // USERMETRICSOUTPUT_COLORTHEME_H_
ColorTheme for a particular user metric.
Definition: ColorTheme.h:36