UserMetricsOutput::UserMetrics
QObject
libusermetricsoutput/UserMetrics.h
QString QString UserMetricsOutput::UserMetrics::label label UserMetricsOutput::UserMetrics::label label

Represents a textual version of the current metric.

e.g. "3 messages received today"

QString QString UserMetricsOutput::UserMetrics::username username UserMetricsOutput::UserMetrics::username username setUsername

The current username selected.

UserMetricsOutput::ColorTheme * UserMetricsOutput::ColorTheme* UserMetricsOutput::UserMetrics::firstColor firstColor UserMetricsOutput::UserMetrics::firstColor firstColor

The ColorTheme for the first month.

UserMetricsOutput::ColorTheme * UserMetricsOutput::ColorTheme* UserMetricsOutput::UserMetrics::secondColor secondColor UserMetricsOutput::UserMetrics::secondColor secondColor

The ColorTheme for the second month.

QAbstractItemModel * QAbstractItemModel * UserMetricsOutput::UserMetrics::firstMonth firstMonth UserMetricsOutput::UserMetrics::firstMonth firstMonth

The data for the first month.

QAbstractItemModel * QAbstractItemModel * UserMetricsOutput::UserMetrics::secondMonth secondMonth UserMetricsOutput::UserMetrics::secondMonth secondMonth

The data for the second month.

int int UserMetricsOutput::UserMetrics::currentDay currentDay UserMetricsOutput::UserMetrics::currentDay currentDay

The current day of the calendar month.

Zero-indexed.

UserMetrics * static UserMetrics * UserMetricsOutput::UserMetrics::getInstance () getInstance UserMetricsOutput::UserMetrics::getInstance

Get a new instance of UserMetrics.

virtual UserMetricsOutput::UserMetrics::~UserMetrics
()
~UserMetrics
UserMetricsOutput::UserMetrics::~UserMetrics

Destructor.

QString virtual QString UserMetricsOutput::UserMetrics::label () const =0 label UserMetricsOutput::UserMetrics::label

Represents a textual version of the current metric.

e.g. "3 messages received today"

QString virtual QString UserMetricsOutput::UserMetrics::username () const =0 username UserMetricsOutput::UserMetrics::username

The current username selected.

void virtual void UserMetricsOutput::UserMetrics::setUsername (const QString &username)=0 setUsername UserMetricsOutput::UserMetrics::setUsername const QString & username

Change the current username.

username The data source will change to the first one available for the given username.

ColorTheme * virtual ColorTheme * UserMetricsOutput::UserMetrics::firstColor () const =0 firstColor UserMetricsOutput::UserMetrics::firstColor

The ColorTheme for the first month.

QAbstractItemModel * virtual QAbstractItemModel * UserMetricsOutput::UserMetrics::firstMonth () const =0 firstMonth UserMetricsOutput::UserMetrics::firstMonth

The data for the first month.

int virtual int UserMetricsOutput::UserMetrics::currentDay () const =0 currentDay UserMetricsOutput::UserMetrics::currentDay

The current day of the calendar month.

Zero-indexed.

ColorTheme * virtual ColorTheme * UserMetricsOutput::UserMetrics::secondColor () const =0 secondColor UserMetricsOutput::UserMetrics::secondColor

The ColorTheme for the second month.

QAbstractItemModel * virtual QAbstractItemModel * UserMetricsOutput::UserMetrics::secondMonth () const =0 secondMonth UserMetricsOutput::UserMetrics::secondMonth

The data for the second month.

void void UserMetricsOutput::UserMetrics::labelChanged (const QString &label) labelChanged UserMetricsOutput::UserMetrics::labelChanged const QString & label

The label has changed.

label

void void UserMetricsOutput::UserMetrics::usernameChanged (const QString &username) usernameChanged UserMetricsOutput::UserMetrics::usernameChanged const QString & username

The username has changed.

username

void void UserMetricsOutput::UserMetrics::firstColorChanged (ColorTheme *color) firstColorChanged UserMetricsOutput::UserMetrics::firstColorChanged ColorTheme * color

The first month's ColorTheme has changed.

color

void void UserMetricsOutput::UserMetrics::firstMonthChanged (QAbstractItemModel *firstMonth) firstMonthChanged UserMetricsOutput::UserMetrics::firstMonthChanged QAbstractItemModel * firstMonth

The first month's data has changed.

firstMonth More fine-grained changed notification also occurs using the QAbstractItemModel signals.

void void UserMetricsOutput::UserMetrics::currentDayChanged (int currentDay) currentDayChanged UserMetricsOutput::UserMetrics::currentDayChanged int currentDay

The current day of the month has changed.

currentDay Note: Zero-indexed.

void void UserMetricsOutput::UserMetrics::secondColorChanged (ColorTheme *color) secondColorChanged UserMetricsOutput::UserMetrics::secondColorChanged ColorTheme * color

The second month's ColorTheme has changed.

color

void void UserMetricsOutput::UserMetrics::secondMonthChanged (QAbstractItemModel *secondMonth) secondMonthChanged UserMetricsOutput::UserMetrics::secondMonthChanged QAbstractItemModel * secondMonth

The second month's data has changed.

secondMonth More fine-grained changed notification also occurs using the QAbstractItemModel signals.

void void UserMetricsOutput::UserMetrics::nextDataSource () nextDataSource UserMetricsOutput::UserMetrics::nextDataSource

Request the current user's next data source.

void void UserMetricsOutput::UserMetrics::readyForDataChange () readyForDataChange UserMetricsOutput::UserMetrics::readyForDataChange

Inform the UserMetrics that you are ready for data change.

void void UserMetricsOutput::UserMetrics::dataAboutToAppear () dataAboutToAppear UserMetricsOutput::UserMetrics::dataAboutToAppear

Data is about to appear.

To continue, fire the readyForDataChange signal.

void void UserMetricsOutput::UserMetrics::dataAppeared () dataAppeared UserMetricsOutput::UserMetrics::dataAppeared

Data has finished loading.

void void UserMetricsOutput::UserMetrics::dataAboutToChange () dataAboutToChange UserMetricsOutput::UserMetrics::dataAboutToChange

Data is about to change from one set to another.

To continue, fire the readyForDataChange signal.

void void UserMetricsOutput::UserMetrics::dataChanged () dataChanged UserMetricsOutput::UserMetrics::dataChanged

Insert documentation here.

void void UserMetricsOutput::UserMetrics::dataAboutToDisappear () dataAboutToDisappear UserMetricsOutput::UserMetrics::dataAboutToDisappear

About to change to a user with no data.

To continue, fire the readyForDataChange signal.

void void UserMetricsOutput::UserMetrics::dataDisappeared () dataDisappeared UserMetricsOutput::UserMetrics::dataDisappeared

The empty data has now been loaded.

void virtual void UserMetricsOutput::UserMetrics::nextDataSourceSlot ()=0 nextDataSourceSlot UserMetricsOutput::UserMetrics::nextDataSourceSlot

Synchronous version of nextDataSource.

void virtual void UserMetricsOutput::UserMetrics::readyForDataChangeSlot ()=0 readyForDataChangeSlot UserMetricsOutput::UserMetrics::readyForDataChangeSlot

Synchronous version of readyForDataChange.

UserMetricsOutput::UserMetrics::UserMetrics
(QObject *parent=0)
UserMetrics
UserMetricsOutput::UserMetrics::UserMetrics
QObject * parent 0

Unusable constructor - this class is pure-virtual.

parent

Presentation API for user metrics.

This class breaks down the various user metric sources registered against different users into a presentable format.

The data is split into two "months" - "first" and "second". The months always have a length equal to the size of the month they represent - unset values are padded with null data.

The property currentDay indicates the current day's value in the "first month" data.

Given a username, the class then provides an API to cycle through that user's data. The signal nextDataSource should be used for this.

QObject
UserMetricsOutput::UserMetrics
QObject
UserMetricsOutput::UserMetrics
- UserMetricsOutput::UserMetrics
  currentDay
- UserMetricsOutput::UserMetrics
  currentDay
- UserMetricsOutput::UserMetrics
  currentDayChanged
- UserMetricsOutput::UserMetrics
  dataAboutToAppear
- UserMetricsOutput::UserMetrics
  dataAboutToChange
- UserMetricsOutput::UserMetrics
  dataAboutToDisappear
- UserMetricsOutput::UserMetrics
  dataAppeared
- UserMetricsOutput::UserMetrics
  dataChanged
- UserMetricsOutput::UserMetrics
  dataDisappeared
- UserMetricsOutput::UserMetrics
  firstColor
- UserMetricsOutput::UserMetrics
  firstColor
- UserMetricsOutput::UserMetrics
  firstColorChanged
- UserMetricsOutput::UserMetrics
  firstMonth
- UserMetricsOutput::UserMetrics
  firstMonth
- UserMetricsOutput::UserMetrics
  firstMonthChanged
- UserMetricsOutput::UserMetrics
  getInstance
- UserMetricsOutput::UserMetrics
  label
- UserMetricsOutput::UserMetrics
  label
- UserMetricsOutput::UserMetrics
  labelChanged
- UserMetricsOutput::UserMetrics
  nextDataSource
- UserMetricsOutput::UserMetrics
  nextDataSourceSlot
- UserMetricsOutput::UserMetrics
  readyForDataChange
- UserMetricsOutput::UserMetrics
  readyForDataChangeSlot
- UserMetricsOutput::UserMetrics
  secondColor
- UserMetricsOutput::UserMetrics
  secondColor
- UserMetricsOutput::UserMetrics
  secondColorChanged
- UserMetricsOutput::UserMetrics
  secondMonth
- UserMetricsOutput::UserMetrics
  secondMonth
- UserMetricsOutput::UserMetrics
  secondMonthChanged
- UserMetricsOutput::UserMetrics
  setUsername
- UserMetricsOutput::UserMetrics
  UserMetrics
- UserMetricsOutput::UserMetrics
  username
- UserMetricsOutput::UserMetrics
  username
- UserMetricsOutput::UserMetrics
  usernameChanged
- UserMetricsOutput::UserMetrics
  ~UserMetrics