~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to libs/solid/control/modemmanagerinterface.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*  This file is part of the KDE project
 
2
    Copyright (C) 2010 Lamarque Souza <lamarque@gmail.com>
 
3
 
 
4
    This library is free software; you can redistribute it and/or
 
5
    modify it under the terms of the GNU Library General Public
 
6
    License version 2 as published by the Free Software Foundation.
 
7
 
 
8
    This library 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 GNU
 
11
    Library General Public License for more details.
 
12
 
 
13
    You should have received a copy of the GNU Library General Public License
 
14
    along with this library; see the file COPYING.LIB.  If not, write to
 
15
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
16
    Boston, MA 02110-1301, USA.
 
17
 
 
18
*/
 
19
 
 
20
#include "modemmanagerinterface.h"
 
21
#include "modemmanagerinterface_p.h"
 
22
 
 
23
#include "soliddefs_p.h"
 
24
#include "ifaces/modemmanagerinterface.h"
 
25
 
 
26
Solid::Control::ModemManagerInterface::ModemManagerInterface(QObject *backendObject)
 
27
    : QObject(), d_ptr(new ModemManagerInterfacePrivate(this))
 
28
{
 
29
    Q_D(ModemManagerInterface); d->setBackendObject(backendObject);
 
30
}
 
31
 
 
32
Solid::Control::ModemManagerInterface::ModemManagerInterface(const ModemManagerInterface &other)
 
33
    : QObject(), d_ptr(new ModemManagerInterfacePrivate(this))
 
34
{
 
35
    Q_D(ModemManagerInterface);
 
36
    d->setBackendObject(other.d_ptr->backendObject());
 
37
}
 
38
 
 
39
Solid::Control::ModemManagerInterface::ModemManagerInterface(ModemManagerInterfacePrivate &dd, QObject *backendObject)
 
40
    : QObject(), d_ptr(&dd)
 
41
{
 
42
    Q_UNUSED(backendObject);
 
43
}
 
44
 
 
45
Solid::Control::ModemManagerInterface::ModemManagerInterface(ModemManagerInterfacePrivate &dd, const ModemManagerInterface &other)
 
46
    : d_ptr(&dd)
 
47
{
 
48
    Q_UNUSED(other);
 
49
}
 
50
 
 
51
Solid::Control::ModemManagerInterface::~ModemManagerInterface()
 
52
{
 
53
    delete d_ptr;
 
54
}
 
55
 
 
56
void Solid::Control::ModemManagerInterfacePrivate::setBackendObject(QObject *object)
 
57
{
 
58
    FrontendObjectPrivate::setBackendObject(object);
 
59
 
 
60
    if (object) {
 
61
        QObject::connect(object, SIGNAL(connectionStateChanged(int)),
 
62
                         parent(), SIGNAL(connectionStateChanged(int)));
 
63
        QObject::connect(object, SIGNAL(connectionStateChanged(int,int,int)),
 
64
                         parent(), SIGNAL(connectionStateChanged(int,int,int)));
 
65
    }
 
66
}
 
67
 
 
68
 
 
69
#include "modemmanagerinterface.moc"