~unity-team/libusermetrics/13.10

« back to all changes in this revision

Viewing changes to tests/unit/qml/UserMetricsTest/MetricInfo.cpp

  • Committer: Tarmac
  • Author(s): Pete Woods
  • Date: 2013-10-02 10:14:56 UTC
  • mfrom: (140.1.1 trunk)
  • Revision ID: tarmac-20131002101456-u4vbe7h5pjtuz6rp
Support minimum and maximum properties in the QML API.

Approved by PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#include <MetricInfo.h>
18
18
 
19
19
MetricInfo::MetricInfo(QString name, QString format, QString emptyFormat,
20
 
                QString domain, QObject *parent) :
 
20
                QString domain, double minimum, double maximum, QObject *parent) :
21
21
                QObject(parent), m_name(name), m_format(format), m_emptyFormat(
22
 
                                emptyFormat), m_domain(domain) {
 
22
                                emptyFormat), m_domain(domain), m_minimum(minimum), m_maximum(
 
23
                                maximum) {
23
24
}
24
25
 
25
26
MetricInfo::~MetricInfo() {
40
41
QString MetricInfo::domain() const {
41
42
        return m_domain;
42
43
}
 
44
 
 
45
double MetricInfo::minimum() const {
 
46
        return m_minimum;
 
47
}
 
48
 
 
49
double MetricInfo::maximum() const {
 
50
        return m_maximum;
 
51
}