summaryrefslogtreecommitdiffstats
path: root/dcop/HOWTO
diff options
context:
space:
mode:
Diffstat (limited to 'dcop/HOWTO')
-rw-r--r--dcop/HOWTO32
1 files changed, 16 insertions, 16 deletions
diff --git a/dcop/HOWTO b/dcop/HOWTO
index 0fa520e1e..344ed82d1 100644
--- a/dcop/HOWTO
+++ b/dcop/HOWTO
@@ -169,8 +169,8 @@ if (!client->call("someAppId", "fooObject/barObject", "doIt(int)",
tqDebug("there was some error using DCOP.");
else {
QDataStream reply(replyData, IO_ReadOnly);
- if (replyType == "QString") {
- QString result;
+ if (replyType == "TQString") {
+ TQString result;
reply >> result;
print("the result is: %s",result.latin1());
} else
@@ -190,7 +190,7 @@ Receiving Data via DCOP:
Currently the only real way to receive data from DCOP is to multiply
inherit from the normal class that you are inheriting (usually some
-sort of QWidget subclass or QObject) as well as the DCOPObject class.
+sort of TQWidget subclass or TQObject) as well as the DCOPObject class.
DCOPObject provides one very important method: DCOPObject::process().
This is a pure virtual method that you must implement in order to
process DCOP messages that you receive. It takes a function
@@ -210,10 +210,10 @@ bool BarObject::process(const QCString &fun, const QByteArray &data,
QDataStream arg(data, IO_ReadOnly);
int i; // parameter
arg >> i;
- QString result = self->doIt (i);
+ TQString result = self->doIt (i);
QDataStream reply(replyData, IO_WriteOnly);
reply << result;
- replyType = "QString";
+ replyType = "TQString";
return true;
} else {
tqDebug("unknown function call to BarObject::process()");
@@ -244,7 +244,7 @@ bool BarObject::process(const QCString &fun, const QByteArray &data,
QDataStream arg(data, IO_ReadOnly);
int i; // parameter
arg >> i;
- QString result = self->doIt(i);
+ TQString result = self->doIt(i);
DCOPClientTransaction *myTransaction;
myTransaction = kapp->dcopClient()->beginTransaction();
@@ -260,9 +260,9 @@ bool BarObject::process(const QCString &fun, const QByteArray &data,
}
}
-slotProcessingDone(DCOPClientTransaction *myTransaction, const QString &result)
+slotProcessingDone(DCOPClientTransaction *myTransaction, const TQString &result)
{
- QCString replyType = "QString";
+ QCString replyType = "TQString";
QByteArray replyData;
QDataStream reply(replyData, IO_WriteOnly);
reply << result;
@@ -358,7 +358,7 @@ class MyInterface : virtual public DCOPObject
k_dcop:
- virtual ASYNC myAsynchronousMethod(QString someParameter) = 0;
+ virtual ASYNC myAsynchronousMethod(TQString someParameter) = 0;
virtual QRect mySynchronousMethod() = 0;
};
@@ -385,7 +385,7 @@ but virtual, not pure virtual.
Example:
-class MyClass: public QObject, virtual public MyInterface
+class MyClass: public TQObject, virtual public MyInterface
{
TQ_OBJECT
@@ -393,11 +393,11 @@ class MyClass: public QObject, virtual public MyInterface
MyClass();
~MyClass();
- ASYNC myAsynchronousMethod(QString someParameter);
+ ASYNC myAsynchronousMethod(TQString someParameter);
QRect mySynchronousMethod();
};
-Note: (Qt issue) Remember that if you are inheriting from QObject, you must
+Note: (Qt issue) Remember that if you are inheriting from TQObject, you must
place it first in the list of inherited classes.
In the implementation of your class' ctor, you must explicitly initialize
@@ -408,7 +408,7 @@ the interface which your are implementing.
Example:
MyClass::MyClass()
- : QObject(),
+ : TQObject(),
DCOPObject("MyInterface")
{
// whatever...
@@ -419,7 +419,7 @@ exactly the same as you would normally.
Example:
-void MyClass::myAsynchronousMethod(QString someParameter)
+void MyClass::myAsynchronousMethod(TQString someParameter)
{
tqDebug("myAsyncMethod called with param `" + someParameter + "'");
}
@@ -429,7 +429,7 @@ It is not necessary (though very clean) to define an interface as an
abstract class of its own, like we did in the example above. We could
just as well have defined a k_dcop section directly within MyClass:
-class MyClass: public QObject, virtual public DCOPObject
+class MyClass: public TQObject, virtual public DCOPObject
{
TQ_OBJECT
K_DCOP
@@ -439,7 +439,7 @@ class MyClass: public QObject, virtual public DCOPObject
~MyClass();
k_dcop:
- ASYNC myAsynchronousMethod(QString someParameter);
+ ASYNC myAsynchronousMethod(TQString someParameter);
QRect mySynchronousMethod();
};