diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-09-25 12:03:00 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-09-25 12:29:31 +0900 |
commit | 4c0dae60b2fbc60996fc8f4bd29ee6219b869527 (patch) | |
tree | 6aa583e34395f4d19d4b85f081b31513e5c9c19d /dcop/Mainpage.dox | |
parent | 066f257eadc5866386c2cfbdba1a93105cff67ae (diff) | |
download | tdelibs-4c0dae60b2fbc60996fc8f4bd29ee6219b869527.tar.gz tdelibs-4c0dae60b2fbc60996fc8f4bd29ee6219b869527.zip |
Replace QObject, QWidget, QImage, QPair, QRgb, QColor, QChar, QString, QIODevice with TQ* version
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'dcop/Mainpage.dox')
-rw-r--r-- | dcop/Mainpage.dox | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/dcop/Mainpage.dox b/dcop/Mainpage.dox index 266f2d9fe..ca596022c 100644 --- a/dcop/Mainpage.dox +++ b/dcop/Mainpage.dox @@ -134,8 +134,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 @@ -148,7 +148,7 @@ else { 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 @@ -169,10 +169,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()"); @@ -205,7 +205,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(); @@ -221,9 +221,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; @@ -260,7 +260,7 @@ class MyInterface : virtual public DCOPObject k_dcop: - virtual ASYNC myAsynchronousMethod(QString someParameter) = 0; + virtual ASYNC myAsynchronousMethod(TQString someParameter) = 0; virtual QRect mySynchronousMethod() = 0; }; @@ -289,7 +289,7 @@ but virtual, not pure virtual. Example: \code -class MyClass: public QObject, virtual public MyInterface +class MyClass: public TQObject, virtual public MyInterface { TQ_OBJECT @@ -297,11 +297,11 @@ class MyClass: public QObject, virtual public MyInterface MyClass(); ~MyClass(); - ASYNC myAsynchronousMethod(QString someParameter); + ASYNC myAsynchronousMethod(TQString someParameter); QRect mySynchronousMethod(); }; \endcode -\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 @@ -313,7 +313,7 @@ Example: \code MyClass::MyClass() - : QObject(), + : TQObject(), DCOPObject("MyInterface") { // whatever... @@ -327,7 +327,7 @@ exactly the same as you would normally. Example: \code -void MyClass::myAsynchronousMethod(QString someParameter) +void MyClass::myAsynchronousMethod(TQString someParameter) { tqDebug("myAsyncMethod called with param `" + someParameter + "'"); } @@ -338,7 +338,7 @@ 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: \code -class MyClass: public QObject, virtual public DCOPObject +class MyClass: public TQObject, virtual public DCOPObject { TQ_OBJECT K_DCOP @@ -348,7 +348,7 @@ class MyClass: public QObject, virtual public DCOPObject ~MyClass(); k_dcop: - ASYNC myAsynchronousMethod(QString someParameter); + ASYNC myAsynchronousMethod(TQString someParameter); QRect mySynchronousMethod(); }; \endcode |