|
libusermetrics
|
This class represents a single user metric. More...
#include <libusermetricsinput/Metric.h>
Inheritance diagram for UserMetricsInput::Metric:
Collaboration diagram for UserMetricsInput::Metric:Public Member Functions | |
| Metric (QObject *parent=0) | |
| This constructor cannot be used - the class is pure-virtual. More... | |
| virtual | ~Metric () |
| Destructor. More... | |
| virtual MetricUpdate * | update (const QString &username="")=0 |
| Create an MetricUpdate to a particular Metric. More... | |
| virtual void | update (double value, const QString &username="")=0 |
| Update the "today" value for a simple user metric. More... | |
| virtual void | increment (double amount=1.0f, const QString &username="")=0 |
| Increment the "today" value for a simple user metric. More... | |
This class represents a single user metric.
For example, "number of e-mails today" or "photos taken today".
This is a long-lived class that can exist for the whole application lifecycle.
|
explicit |
This constructor cannot be used - the class is pure-virtual.
|
virtual |
Destructor.
|
pure virtual |
Increment the "today" value for a simple user metric.
| amount | How much to increase the metric by - defaults to 1. |
| username | The user to update the data for. If blank ("") or omitted then the current user is used. |
|
pure virtual |
Create an MetricUpdate to a particular Metric.
| username | The user to update the data for. If blank ("") or omitted then the current user is used. |
The MetricUpdate object must be deleted - this is when the actual update will be sent to the storage service.
|
pure virtual |
Update the "today" value for a simple user metric.
| value | Today's value |
| username | The user to update the data for. If blank ("") or omitted then the current user is used. |