[Kde-bindings] playground/bindings/kimono
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Mon Jan 29 19:28:32 UTC 2007
SVN commit 628326 by rdale:
* When marshalling a QDBusVariant, special case as a QVariant as it
doesn't exist in the Smoke library, but is needed for QtDBus support.
* Added a not quite working qdbus/complexpingpong example
CCMAIL: kde-bindings at kde.org
M +3 -0 ChangeLog
M +1 -0 examples/qdbus/CMakeLists.txt
A examples/qdbus/complexpingpong (directory)
A examples/qdbus/complexpingpong/CMakeLists.txt
A examples/qdbus/complexpingpong/complexping.cs
A examples/qdbus/complexpingpong/complexpong.cs
M +25 -3 examples/qdbus/pingpong/pong.cs
--- trunk/playground/bindings/kimono/ChangeLog #628325:628326
@@ -4,6 +4,9 @@
* Some static methods were being dropped because they had the same
name as property names. So make the static methods start with a
lower case letter and keep them.
+ * When marshalling a QDBusVariant, special case as a QVariant as it
+ doesn't exist in the Smoke library, but is needed for QtDBus support.
+ * Added a not quite working qdbus/complexpingpong example
2007-29-01 Arno Rehn <arno at arnorehn.de>
--- trunk/playground/bindings/kimono/examples/qdbus/CMakeLists.txt #628325:628326
@@ -1,3 +1,4 @@
+ADD_SUBDIRECTORY(complexpingpong)
ADD_SUBDIRECTORY(listnames)
ADD_SUBDIRECTORY(pingpong)
--- trunk/playground/bindings/kimono/examples/qdbus/pingpong/pong.cs #628325:628326
@@ -31,10 +31,11 @@
{
static private string SERVICE_NAME = "com.trolltech.QtDBus.PingExample";
- [Q_SLOT]
- public QPoint myslot(QWidget arg)
+ [Q_SLOT("QDBusVariant testSlot()")]
+ public QVariant testSlot()
{
- return new QPoint();
+ Console.WriteLine("In testSlot");
+ return new QVariant("hello");
}
[Q_SLOT]
@@ -61,9 +62,30 @@
}
Pong pong = new Pong();
+// Connect(pong, SIGNAL("QDBusVariant testSignal()"), pong, SLOT("QDBusVariant testSlot()"));
+ Connect(pong, SIGNAL("testSignal()"), pong, SLOT("testSlot()"));
+ Console.WriteLine(pong.Emit.testSignal().ToString());
+/*
+ if (res == null) {
+ Console.WriteLine("res: null");
+ } else {
+ Console.WriteLine("res: {0}", res);
+ }
+*/
QDBusConnection.SessionBus().RegisterObject("/", pong, (int) QDBusConnection.RegisterOption.ExportAllSlots);
return QCoreApplication.Exec();
}
+
+ protected new IPongSignals Emit {
+ get {
+ return (IPongSignals) Q_EMIT;
+ }
+ }
}
+interface IPongSignals : IQObjectSignals {
+ [Q_SIGNAL("QDBusVariant testSignal()")]
+ QVariant testSignal();
+}
+
More information about the Kde-bindings
mailing list