UserMetricsInput::MetricManager
QObject
libusermetricsinput/MetricManager.h
UserMetricsInput::MetricManager::MetricManager
(QObject *parent=0)
MetricManager
UserMetricsInput::MetricManager::MetricManager
QObject * parent 0

You cannot use this constructor. This is a pure-virtual class.

virtual UserMetricsInput::MetricManager::~MetricManager
()
~MetricManager
UserMetricsInput::MetricManager::~MetricManager

Destructs the metric manager and associated Metric instances.

MetricPtr virtual MetricPtr UserMetricsInput::MetricManager::add (const QString &dataSourceId, const QString &formatString, const QString &emptyDataString="", const QString &textDomain="")=0 add UserMetricsInput::MetricManager::add const QString & dataSourceId const QString & formatString const QString & emptyDataString "" const QString & textDomain ""

Register a new Metric.

dataSourceId

The unique ID of the data source, e.g. "facebook"

formatString

The string to print in the output API, e.g. "<b>%1</b> messages received today"

emptyDataString

The string to print in the case of no data, e.g. "No messages received today"

textDomain

The translation domain

This will register a new user Metric with the above parameters. It is acceptable to call this method more than once. The same Metric instance will be returned.
MetricPtr virtual MetricPtr UserMetricsInput::MetricManager::add (const MetricParameters &parameters)=0 add UserMetricsInput::MetricManager::add const MetricParameters & parameters

Register a new Metric.

parameters

The parameters of the Metric to register

This will register a new user Metric with the above parameters. It is acceptable to call this method more than once. The same Metric instance will be returned.
MetricManager * static MetricManager * UserMetricsInput::MetricManager::getInstance () getInstance UserMetricsInput::MetricManager::getInstance

Gets a new instance of the MetricManager.

If you want a singleton instance then hold onto this.

Central place for registering and updating user metrics.

This is a long-lived class that can exist for the whole application lifecycle.

QObject
UserMetricsInput::MetricManager
QObject
UserMetricsInput::MetricManager
- UserMetricsInput::MetricManager
  add
- UserMetricsInput::MetricManager
  add
- UserMetricsInput::MetricManager
  getInstance
- UserMetricsInput::MetricManager
  MetricManager
- UserMetricsInput::MetricManager
  ~MetricManager