A more advanced metric that updates the history of a metric. Usually this would be a metric from an external data source, e.g. e-mail or Facebook messages.
#include <QtCore/QCoreApplication>
int main(int argc, char *argv[]) {
QCoreApplication application(argc, argv);
manager->add(
"<b>%1</b> tweets received today").emptyDataString(
"No tweets today").textDomain(APP_ID)));
TwitterService twitterService;
for (const TwitterData &twitterData : twitterService.getTweetCounts()) {
update->addData(twitterData.toDouble());
}
return 0;
}