~om26er/unity8/fixture_for_launcher_icons

« back to all changes in this revision

Viewing changes to tests/mocks/Ubuntu/Telephony/MockCallEntry.h

  • Committer: Omer Akram
  • Date: 2014-07-10 14:17:56 UTC
  • mfrom: (1014.1.22 unity8)
  • Revision ID: om26er@ubuntu.com-20140710141756-p3zm8jzj4i2uop55
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2014 Canonical, Ltd.
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU General Public License as published by
 
6
 * the Free Software Foundation; version 3.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 * GNU General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU General Public License
 
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 *
 
16
 * Authored by: Nick Dedekind <nick.dedekind@canonical.com
 
17
 */
 
18
 
 
19
#ifndef MOCKCALLENTRY_H
 
20
#define MOCKCALLENTRY_H
 
21
 
 
22
#include <QObject>
 
23
 
 
24
class MockCallEntry : public QObject
 
25
{
 
26
    Q_OBJECT
 
27
    Q_DISABLE_COPY(MockCallEntry)
 
28
 
 
29
    Q_PROPERTY(QString phoneNumber READ phoneNumber WRITE setPhoneNumber NOTIFY phoneNumberChanged)
 
30
    Q_PROPERTY(bool isConference READ isConference WRITE setIsConference NOTIFY isConferenceChanged)
 
31
    Q_PROPERTY(int elapsedTime READ elapsedTime NOTIFY elapsedTimeChanged)
 
32
 
 
33
public:
 
34
    MockCallEntry(QObject *parent = 0);
 
35
 
 
36
    QString phoneNumber() const;
 
37
    bool isConference() const;
 
38
    int elapsedTime() const;
 
39
 
 
40
    void setPhoneNumber(const QString& phoneNumber);
 
41
    void setIsConference(bool isConference);
 
42
 
 
43
Q_SIGNALS:
 
44
    void phoneNumberChanged();
 
45
    void isConferenceChanged();
 
46
    void elapsedTimeChanged();
 
47
 
 
48
protected:
 
49
    void timerEvent(QTimerEvent * event);
 
50
 
 
51
private:
 
52
    QString m_phoneNumber;
 
53
    bool m_conference;
 
54
    int m_elapsed;
 
55
};
 
56
 
 
57
#endif // MOCKCALLENTRY_H