~ralsina/ubuntu-system-settings/notification-plugin

« back to all changes in this revision

Viewing changes to plugins/phone/simservice.cpp

  • Committer: Roberto Alsina
  • Date: 2014-07-31 18:32:54 UTC
  • mfrom: (779.1.70 ubuntu-system-settings)
  • Revision ID: roberto.alsina@canonical.com-20140731183254-0dgi0dfspshtolbb
merged trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (C) 2013 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 version 3 as
6
 
 * published by the Free Software Foundation.
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
 
 * Authors:
17
 
 * Ken VanDine <ken.vandine@canonical.com>
18
 
 *
19
 
*/
20
 
 
21
 
#include "simservice.h"
22
 
 
23
 
SimService::SimService(QObject *parent)
24
 
    : QObject(parent)
25
 
{
26
 
}
27
 
 
28
 
SimService::SimService(const QString &name, const QString &value, QObject *parent)
29
 
    : QObject(parent), m_name(name), m_value(value)
30
 
{
31
 
}
32
 
 
33
 
QString SimService::name() const
34
 
{
35
 
    return m_name;
36
 
}
37
 
 
38
 
void SimService::setName(const QString &name)
39
 
{
40
 
    if (name != m_name) {
41
 
        m_name = name;
42
 
        emit nameChanged();
43
 
    }
44
 
}
45
 
 
46
 
QString SimService::value() const
47
 
{
48
 
    return m_value;
49
 
}
50
 
 
51
 
void SimService::setValue(const QString &value)
52
 
{
53
 
    if (value != m_value) {
54
 
        m_value = value;
55
 
        emit valueChanged();
56
 
    }
57
 
}