diff options
author | Justin McPherson <justin.mcpherson@nokia.com> | 2010-02-05 05:24:23 (GMT) |
---|---|---|
committer | Justin McPherson <justin.mcpherson@nokia.com> | 2010-02-05 05:24:23 (GMT) |
commit | 9f43d4aafeb16c81bc1a161c99dee2df19772e42 (patch) | |
tree | 081f5c2323f6fadf49f2d1fada8a7c0cb4bc953c /examples/dbus/remotecontrolledcar | |
parent | f14e3b86e6b7b496017ddd462821325bdb40c779 (diff) | |
parent | 7474ad656269aec1352d166bb5a4435086d48482 (diff) | |
download | Qt-9f43d4aafeb16c81bc1a161c99dee2df19772e42.zip Qt-9f43d4aafeb16c81bc1a161c99dee2df19772e42.tar.gz Qt-9f43d4aafeb16c81bc1a161c99dee2df19772e42.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'examples/dbus/remotecontrolledcar')
-rw-r--r-- | examples/dbus/remotecontrolledcar/car/car.pro | 2 | ||||
-rw-r--r-- | examples/dbus/remotecontrolledcar/car/car_adaptor.cpp | 22 | ||||
-rw-r--r-- | examples/dbus/remotecontrolledcar/car/car_adaptor.h (renamed from examples/dbus/remotecontrolledcar/car/car_adaptor_p.h) | 59 | ||||
-rw-r--r-- | examples/dbus/remotecontrolledcar/car/main.cpp | 4 | ||||
-rw-r--r-- | examples/dbus/remotecontrolledcar/controller/car_interface.cpp | 15 | ||||
-rw-r--r-- | examples/dbus/remotecontrolledcar/controller/car_interface.h (renamed from examples/dbus/remotecontrolledcar/controller/car_interface_p.h) | 62 | ||||
-rw-r--r-- | examples/dbus/remotecontrolledcar/controller/controller.cpp | 4 | ||||
-rw-r--r-- | examples/dbus/remotecontrolledcar/controller/controller.h | 5 | ||||
-rw-r--r-- | examples/dbus/remotecontrolledcar/controller/controller.pro | 2 |
9 files changed, 85 insertions, 90 deletions
diff --git a/examples/dbus/remotecontrolledcar/car/car.pro b/examples/dbus/remotecontrolledcar/car/car.pro index 9b426d3..d362dc9 100644 --- a/examples/dbus/remotecontrolledcar/car/car.pro +++ b/examples/dbus/remotecontrolledcar/car/car.pro @@ -10,7 +10,7 @@ CONFIG += qdbus # Input # DBUS_ADAPTORS += car.xml -HEADERS += car.h car_adaptor_p.h +HEADERS += car.h car_adaptor.h SOURCES += car.cpp main.cpp car_adaptor.cpp # install diff --git a/examples/dbus/remotecontrolledcar/car/car_adaptor.cpp b/examples/dbus/remotecontrolledcar/car/car_adaptor.cpp index bd4832e..da7505b 100644 --- a/examples/dbus/remotecontrolledcar/car/car_adaptor.cpp +++ b/examples/dbus/remotecontrolledcar/car/car_adaptor.cpp @@ -38,17 +38,17 @@ ** $QT_END_LICENSE$ ** ** -** This file was generated by dbusxml2cpp version 0.6 -** Command line was: dbusxml2cpp -c CarAdaptor -a car_adaptor_p.h:car_adaptor.cpp car.xml +** This file was generated by qdbusxml2cpp version 0.7 +** Command line was: qdbusxml2cpp -i car_adaptor.h -a :car_adaptor.cpp car.xml ** -** dbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** qdbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** ** This is an auto-generated file. ** Do not edit! All changes made to it will be lost. ** ****************************************************************************/ -#include "car_adaptor_p.h" +#include "car_adaptor.h" #include <QtCore/QMetaObject> #include <QtCore/QByteArray> #include <QtCore/QList> @@ -58,40 +58,40 @@ #include <QtCore/QVariant> /* - * Implementation of adaptor class CarAdaptor + * Implementation of adaptor class CarInterfaceAdaptor */ -CarAdaptor::CarAdaptor(QObject *parent) +CarInterfaceAdaptor::CarInterfaceAdaptor(QObject *parent) : QDBusAbstractAdaptor(parent) { // constructor setAutoRelaySignals(true); } -CarAdaptor::~CarAdaptor() +CarInterfaceAdaptor::~CarInterfaceAdaptor() { // destructor } -void CarAdaptor::accelerate() +void CarInterfaceAdaptor::accelerate() { // handle method call com.trolltech.Examples.CarInterface.accelerate QMetaObject::invokeMethod(parent(), "accelerate"); } -void CarAdaptor::decelerate() +void CarInterfaceAdaptor::decelerate() { // handle method call com.trolltech.Examples.CarInterface.decelerate QMetaObject::invokeMethod(parent(), "decelerate"); } -void CarAdaptor::turnLeft() +void CarInterfaceAdaptor::turnLeft() { // handle method call com.trolltech.Examples.CarInterface.turnLeft QMetaObject::invokeMethod(parent(), "turnLeft"); } -void CarAdaptor::turnRight() +void CarInterfaceAdaptor::turnRight() { // handle method call com.trolltech.Examples.CarInterface.turnRight QMetaObject::invokeMethod(parent(), "turnRight"); diff --git a/examples/dbus/remotecontrolledcar/car/car_adaptor_p.h b/examples/dbus/remotecontrolledcar/car/car_adaptor.h index 5f769cd..d109883 100644 --- a/examples/dbus/remotecontrolledcar/car/car_adaptor_p.h +++ b/examples/dbus/remotecontrolledcar/car/car_adaptor.h @@ -1,17 +1,17 @@ /**************************************************************************** ** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -25,23 +25,23 @@ ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ** -** This file was generated by dbusxml2cpp version 0.6 -** Command line was: dbusxml2cpp -c CarAdaptor -a car_adaptor_p.h:car_adaptor.cpp car.xml +** This file was generated by qdbusxml2cpp version 0.7 +** Command line was: qdbusxml2cpp -a car_adaptor.h: car.xml ** -** dbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** qdbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** ** This is an auto-generated file. ** This file may have been hand-edited. Look for HAND-EDIT comments @@ -49,40 +49,37 @@ ** ****************************************************************************/ -#ifndef CAR_ADAPTOR_P_H_1157030132 -#define CAR_ADAPTOR_P_H_1157030132 +#ifndef CAR_ADAPTOR_H_1264773009 +#define CAR_ADAPTOR_H_1264773009 #include <QtCore/QObject> #include <QtDBus/QtDBus> - -QT_BEGIN_NAMESPACE class QByteArray; template<class T> class QList; template<class Key, class Value> class QMap; class QString; class QStringList; class QVariant; -QT_END_NAMESPACE /* * Adaptor class for interface com.trolltech.Examples.CarInterface */ -class CarAdaptor: public QDBusAbstractAdaptor +class CarInterfaceAdaptor: public QDBusAbstractAdaptor { Q_OBJECT Q_CLASSINFO("D-Bus Interface", "com.trolltech.Examples.CarInterface") Q_CLASSINFO("D-Bus Introspection", "" -" <interface name=\"com.trolltech.Examples.CarInterface\" >\n" -" <method name=\"accelerate\" />\n" -" <method name=\"decelerate\" />\n" -" <method name=\"turnLeft\" />\n" -" <method name=\"turnRight\" />\n" -" <signal name=\"crashed\" />\n" +" <interface name=\"com.trolltech.Examples.CarInterface\">\n" +" <method name=\"accelerate\"/>\n" +" <method name=\"decelerate\"/>\n" +" <method name=\"turnLeft\"/>\n" +" <method name=\"turnRight\"/>\n" +" <signal name=\"crashed\"/>\n" " </interface>\n" "") public: - CarAdaptor(QObject *parent); - virtual ~CarAdaptor(); + CarInterfaceAdaptor(QObject *parent); + virtual ~CarInterfaceAdaptor(); public: // PROPERTIES public Q_SLOTS: // METHODS diff --git a/examples/dbus/remotecontrolledcar/car/main.cpp b/examples/dbus/remotecontrolledcar/car/main.cpp index 85b206c..eab82a7 100644 --- a/examples/dbus/remotecontrolledcar/car/main.cpp +++ b/examples/dbus/remotecontrolledcar/car/main.cpp @@ -40,7 +40,7 @@ ****************************************************************************/ #include "car.h" -#include "car_adaptor_p.h" +#include "car_adaptor.h" #include <QtGui/QApplication> #include <QtGui/QGraphicsView> #include <QtGui/QGraphicsScene> @@ -64,7 +64,7 @@ int main(int argc, char *argv[]) view.resize(400, 300); view.show(); - new CarAdaptor(car); + new CarInterfaceAdaptor(car); QDBusConnection connection = QDBusConnection::sessionBus(); connection.registerObject("/Car", car); connection.registerService("com.trolltech.CarExample"); diff --git a/examples/dbus/remotecontrolledcar/controller/car_interface.cpp b/examples/dbus/remotecontrolledcar/controller/car_interface.cpp index 01be1bf..21662b4 100644 --- a/examples/dbus/remotecontrolledcar/controller/car_interface.cpp +++ b/examples/dbus/remotecontrolledcar/controller/car_interface.cpp @@ -38,10 +38,10 @@ ** $QT_END_LICENSE$ ** ** -** This file was generated by dbusxml2cpp version 0.6 -** Command line was: dbusxml2cpp -c CarInterface -p car_interface_p.h:car_interface.cpp car.xml +** This file was generated by qdbusxml2cpp version 0.7 +** Command line was: qdbusxml2cpp -i car_interface.h -p :car_interface.cpp car.xml ** -** dbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** qqdbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** ** This is an auto-generated file. ** This file may have been hand-edited. Look for HAND-EDIT comments @@ -49,18 +49,17 @@ ** ****************************************************************************/ -#include "car_interface_p.h" - +#include "car_interface.h" /* - * Implementation of interface class CarInterface + * Implementation of interface class ComTrolltechExamplesCarInterfaceInterface */ -CarInterface::CarInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) +ComTrolltechExamplesCarInterfaceInterface::ComTrolltechExamplesCarInterfaceInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent) { } -CarInterface::~CarInterface() +ComTrolltechExamplesCarInterfaceInterface::~ComTrolltechExamplesCarInterfaceInterface() { } diff --git a/examples/dbus/remotecontrolledcar/controller/car_interface_p.h b/examples/dbus/remotecontrolledcar/controller/car_interface.h index 8a5a907..c2d281a 100644 --- a/examples/dbus/remotecontrolledcar/controller/car_interface_p.h +++ b/examples/dbus/remotecontrolledcar/controller/car_interface.h @@ -1,17 +1,17 @@ /**************************************************************************** ** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -25,31 +25,31 @@ ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ** -** This file was generated by dbusxml2cpp version 0.6 -** Command line was: dbusxml2cpp -c CarInterface -p car_interface_p.h:car_interface.cpp car.xml +** This file was generated by qdbusxml2cpp version 0.7 +** Command line was: qdbusxml2cpp -p car_interface.h: car.xml ** -** dbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** qdbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** ** This is an auto-generated file. ** Do not edit! All changes made to it will be lost. ** ****************************************************************************/ -#ifndef CAR_INTERFACE_P_H_1156853585 -#define CAR_INTERFACE_P_H_1156853585 +#ifndef CAR_INTERFACE_H_1264772826 +#define CAR_INTERFACE_H_1264772826 #include <QtCore/QObject> #include <QtCore/QByteArray> @@ -63,7 +63,7 @@ /* * Proxy class for interface com.trolltech.Examples.CarInterface */ -class CarInterface: public QDBusAbstractInterface +class ComTrolltechExamplesCarInterfaceInterface: public QDBusAbstractInterface { Q_OBJECT public: @@ -71,33 +71,33 @@ public: { return "com.trolltech.Examples.CarInterface"; } public: - CarInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); + ComTrolltechExamplesCarInterfaceInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); - ~CarInterface(); + ~ComTrolltechExamplesCarInterfaceInterface(); public Q_SLOTS: // METHODS - inline QDBusReply<void> accelerate() + inline QDBusPendingReply<> accelerate() { QList<QVariant> argumentList; - return callWithArgumentList(QDBus::Block, QLatin1String("accelerate"), argumentList); + return asyncCallWithArgumentList(QLatin1String("accelerate"), argumentList); } - inline QDBusReply<void> decelerate() + inline QDBusPendingReply<> decelerate() { QList<QVariant> argumentList; - return callWithArgumentList(QDBus::Block, QLatin1String("decelerate"), argumentList); + return asyncCallWithArgumentList(QLatin1String("decelerate"), argumentList); } - inline QDBusReply<void> turnLeft() + inline QDBusPendingReply<> turnLeft() { QList<QVariant> argumentList; - return callWithArgumentList(QDBus::Block, QLatin1String("turnLeft"), argumentList); + return asyncCallWithArgumentList(QLatin1String("turnLeft"), argumentList); } - inline QDBusReply<void> turnRight() + inline QDBusPendingReply<> turnRight() { QList<QVariant> argumentList; - return callWithArgumentList(QDBus::Block, QLatin1String("turnRight"), argumentList); + return asyncCallWithArgumentList(QLatin1String("turnRight"), argumentList); } Q_SIGNALS: // SIGNALS @@ -107,7 +107,7 @@ Q_SIGNALS: // SIGNALS namespace com { namespace trolltech { namespace Examples { - typedef ::CarInterface CarInterface; + typedef ::ComTrolltechExamplesCarInterfaceInterface CarInterface; } } } diff --git a/examples/dbus/remotecontrolledcar/controller/controller.cpp b/examples/dbus/remotecontrolledcar/controller/controller.cpp index 00a8875..5fca9e3 100644 --- a/examples/dbus/remotecontrolledcar/controller/controller.cpp +++ b/examples/dbus/remotecontrolledcar/controller/controller.cpp @@ -42,13 +42,13 @@ #include <QtGui> #include "controller.h" -#include "car_interface_p.h" +#include "car_interface.h" Controller::Controller(QWidget *parent) : QWidget(parent) { ui.setupUi(this); - car = new CarInterface("com.trolltech.CarExample", "/Car", + car = new com::trolltech::Examples::CarInterface("com.trolltech.CarExample", "/Car", QDBusConnection::sessionBus(), this); startTimer(1000); } diff --git a/examples/dbus/remotecontrolledcar/controller/controller.h b/examples/dbus/remotecontrolledcar/controller/controller.h index 07a1355..caadff9 100644 --- a/examples/dbus/remotecontrolledcar/controller/controller.h +++ b/examples/dbus/remotecontrolledcar/controller/controller.h @@ -43,8 +43,7 @@ #define CONTROLLER_H #include "ui_controller.h" - -class CarInterface; +#include "car_interface.h" class Controller : public QWidget { @@ -64,7 +63,7 @@ private slots: private: Ui::Controller ui; - CarInterface *car; + com::trolltech::Examples::CarInterface *car; }; #endif diff --git a/examples/dbus/remotecontrolledcar/controller/controller.pro b/examples/dbus/remotecontrolledcar/controller/controller.pro index 159e3b1..375b9d7 100644 --- a/examples/dbus/remotecontrolledcar/controller/controller.pro +++ b/examples/dbus/remotecontrolledcar/controller/controller.pro @@ -11,7 +11,7 @@ CONFIG += qdbus # Input # DBUS_INTERFACES += car.xml FORMS += controller.ui -HEADERS += car_interface_p.h controller.h +HEADERS += car_interface.h controller.h SOURCES += main.cpp car_interface.cpp controller.cpp # install |