4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the examples of the Qt Toolkit. |
7 ** This file is part of the examples of the Qt Toolkit. |
8 ** |
8 ** |
9 ** $QT_BEGIN_LICENSE:LGPL$ |
9 ** $QT_BEGIN_LICENSE:BSD$ |
10 ** No Commercial Usage |
10 ** You may use this file under the terms of the BSD license as follows: |
11 ** This file contains pre-release code and may not be distributed. |
|
12 ** You may use this file in accordance with the terms and conditions |
|
13 ** contained in the Technology Preview License Agreement accompanying |
|
14 ** this package. |
|
15 ** |
11 ** |
16 ** GNU Lesser General Public License Usage |
12 ** "Redistribution and use in source and binary forms, with or without |
17 ** Alternatively, this file may be used under the terms of the GNU Lesser |
13 ** modification, are permitted provided that the following conditions are |
18 ** General Public License version 2.1 as published by the Free Software |
14 ** met: |
19 ** Foundation and appearing in the file LICENSE.LGPL included in the |
15 ** * Redistributions of source code must retain the above copyright |
20 ** packaging of this file. Please review the following information to |
16 ** notice, this list of conditions and the following disclaimer. |
21 ** ensure the GNU Lesser General Public License version 2.1 requirements |
17 ** * Redistributions in binary form must reproduce the above copyright |
22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
18 ** notice, this list of conditions and the following disclaimer in |
|
19 ** the documentation and/or other materials provided with the |
|
20 ** distribution. |
|
21 ** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor |
|
22 ** the names of its contributors may be used to endorse or promote |
|
23 ** products derived from this software without specific prior written |
|
24 ** permission. |
23 ** |
25 ** |
24 ** In addition, as a special exception, Nokia gives you certain additional |
26 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
25 ** rights. These rights are described in the Nokia Qt LGPL Exception |
27 ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
28 ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
27 ** |
29 ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
28 ** If you have questions regarding the use of this file, please contact |
30 ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
29 ** Nokia at qt-info@nokia.com. |
31 ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
30 ** |
32 ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
31 ** |
33 ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
32 ** |
34 ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
33 ** |
35 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
34 ** |
36 ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." |
35 ** |
|
36 ** |
|
37 ** |
|
38 ** $QT_END_LICENSE$ |
37 ** $QT_END_LICENSE$ |
39 ** |
38 ** |
40 ** |
39 ** |
41 ** This file was generated by dbusxml2cpp version 0.6 |
40 ** This file was generated by qdbusxml2cpp version 0.7 |
42 ** Command line was: dbusxml2cpp -c CarAdaptor -a car_adaptor_p.h:car_adaptor.cpp car.xml |
41 ** Command line was: qdbusxml2cpp -i car_adaptor.h -a :car_adaptor.cpp car.xml |
43 ** |
42 ** |
44 ** dbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
43 ** qdbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
45 ** |
44 ** |
46 ** This is an auto-generated file. |
45 ** This is an auto-generated file. |
47 ** Do not edit! All changes made to it will be lost. |
46 ** Do not edit! All changes made to it will be lost. |
48 ** |
47 ** |
49 ****************************************************************************/ |
48 ****************************************************************************/ |
50 |
49 |
51 #include "car_adaptor_p.h" |
50 #include "car_adaptor.h" |
52 #include <QtCore/QMetaObject> |
51 #include <QtCore/QMetaObject> |
53 #include <QtCore/QByteArray> |
52 #include <QtCore/QByteArray> |
54 #include <QtCore/QList> |
53 #include <QtCore/QList> |
55 #include <QtCore/QMap> |
54 #include <QtCore/QMap> |
56 #include <QtCore/QString> |
55 #include <QtCore/QString> |
57 #include <QtCore/QStringList> |
56 #include <QtCore/QStringList> |
58 #include <QtCore/QVariant> |
57 #include <QtCore/QVariant> |
59 |
58 |
60 /* |
59 /* |
61 * Implementation of adaptor class CarAdaptor |
60 * Implementation of adaptor class CarInterfaceAdaptor |
62 */ |
61 */ |
63 |
62 |
64 CarAdaptor::CarAdaptor(QObject *parent) |
63 CarInterfaceAdaptor::CarInterfaceAdaptor(QObject *parent) |
65 : QDBusAbstractAdaptor(parent) |
64 : QDBusAbstractAdaptor(parent) |
66 { |
65 { |
67 // constructor |
66 // constructor |
68 setAutoRelaySignals(true); |
67 setAutoRelaySignals(true); |
69 } |
68 } |
70 |
69 |
71 CarAdaptor::~CarAdaptor() |
70 CarInterfaceAdaptor::~CarInterfaceAdaptor() |
72 { |
71 { |
73 // destructor |
72 // destructor |
74 } |
73 } |
75 |
74 |
76 void CarAdaptor::accelerate() |
75 void CarInterfaceAdaptor::accelerate() |
77 { |
76 { |
78 // handle method call com.trolltech.Examples.CarInterface.accelerate |
77 // handle method call com.trolltech.Examples.CarInterface.accelerate |
79 QMetaObject::invokeMethod(parent(), "accelerate"); |
78 QMetaObject::invokeMethod(parent(), "accelerate"); |
80 } |
79 } |
81 |
80 |
82 void CarAdaptor::decelerate() |
81 void CarInterfaceAdaptor::decelerate() |
83 { |
82 { |
84 // handle method call com.trolltech.Examples.CarInterface.decelerate |
83 // handle method call com.trolltech.Examples.CarInterface.decelerate |
85 QMetaObject::invokeMethod(parent(), "decelerate"); |
84 QMetaObject::invokeMethod(parent(), "decelerate"); |
86 } |
85 } |
87 |
86 |
88 void CarAdaptor::turnLeft() |
87 void CarInterfaceAdaptor::turnLeft() |
89 { |
88 { |
90 // handle method call com.trolltech.Examples.CarInterface.turnLeft |
89 // handle method call com.trolltech.Examples.CarInterface.turnLeft |
91 QMetaObject::invokeMethod(parent(), "turnLeft"); |
90 QMetaObject::invokeMethod(parent(), "turnLeft"); |
92 } |
91 } |
93 |
92 |
94 void CarAdaptor::turnRight() |
93 void CarInterfaceAdaptor::turnRight() |
95 { |
94 { |
96 // handle method call com.trolltech.Examples.CarInterface.turnRight |
95 // handle method call com.trolltech.Examples.CarInterface.turnRight |
97 QMetaObject::invokeMethod(parent(), "turnRight"); |
96 QMetaObject::invokeMethod(parent(), "turnRight"); |
98 } |
97 } |
99 |
98 |