libusermetrics
MetricUpdate.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 USERMETRICSINPUT_METRICUPDATE_H_
20 #define USERMETRICSINPUT_METRICUPDATE_H_
21 
22 #include <QtCore/QObject>
23 #include <QtCore/QScopedPointer>
24 
29 namespace UserMetricsInput {
30 
32 
36 typedef QScopedPointer<MetricUpdate> MetricUpdatePtr;
37 
44 class Q_DECL_EXPORT MetricUpdate: public QObject {
45 public:
49  explicit MetricUpdate(QObject *parent = 0);
50 
54  virtual ~MetricUpdate();
55 
65  virtual void addData(double data) = 0;
66 
72  virtual void addNull() = 0;
73 };
74 
75 }
76 
81 #endif // USERMETRICSINPUT_METRICUPDATE_H_
An update to a Metric.
Definition: MetricUpdate.h:44
QScopedPointer< MetricUpdate > MetricUpdatePtr
Useful to store your instance of MetricUpdate in.
Definition: MetricUpdate.h:31
The user metrics input library namespace.
Definition: Metric.h:29