summaryrefslogtreecommitdiffstats
path: root/extensions/dcopext.py
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-12-03 22:23:44 -0600
committerTimothy Pearson <[email protected]>2011-12-03 22:23:44 -0600
commit203ba231d0276943aae36111f9ec1e949f3c6a4c (patch)
treef039f7a5b5fc2da88a96876971bac580d87f6788 /extensions/dcopext.py
parentfd35f4a8382b7d223bc0325b9ca3f88515778aa0 (diff)
downloadpytde-203ba231d0276943aae36111f9ec1e949f3c6a4c.tar.gz
pytde-203ba231d0276943aae36111f9ec1e949f3c6a4c.zip
Initial TQt conversion
Diffstat (limited to 'extensions/dcopext.py')
-rw-r--r--extensions/dcopext.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/extensions/dcopext.py b/extensions/dcopext.py
index 0265891..bf63e96 100644
--- a/extensions/dcopext.py
+++ b/extensions/dcopext.py
@@ -32,7 +32,7 @@ copyright holder.
import re
from dcop import DCOPClient
-from qt import QString, QCString, QByteArray, QDataStream, IO_ReadOnly, IO_WriteOnly
+from qt import TQString, TQCString, TQByteArray, TQDataStream, IO_ReadOnly, IO_WriteOnly
from tdecore import dcop_add, dcop_next
# XXX: 64 bit integers might be handeld wrong! pythons int is AFAIK 32 bit,
@@ -43,7 +43,7 @@ from tdecore import dcop_add, dcop_next
# Q_LLONG, Q_ULLONG, Q_INT64, Q_UINT64
#
# and on some (most?) systems:
-# QtOffset
+# TQtOffset
# add complex? complex is c99, not c++
# but python has a complex type
@@ -55,9 +55,9 @@ typedefIntTypes = set(["uchar", "ushort", "uint", "ulong",
"uint8_t", "uint16_t", "uint32_t", "pid_t", "uid_t",
"off_t"])
# XXX string and std::string too?
-stringTypes = set(["QString", "QCString"])
-pythonStringTypes = set([QString, QCString, str])
-stringTypesDict = {"QString":QString,"QCString":QCString,"str":str,"unicode":unicode}
+stringTypes = set(["TQString", "TQCString"])
+pythonStringTypes = set([TQString, TQCString, str])
+stringTypesDict = {"TQString":TQString,"TQCString":TQCString,"str":str,"unicode":unicode}
VOID = 0
BOOLEAN = 1 # XXX bool is not supported by dcop_add, but maybe some time...
@@ -120,13 +120,13 @@ value the call returns. In this case, panelSize takes no arguments and
returns an int. 'ok' returns the status of the DCOP call (success = True,
failure = False).
- ok = d.Panel.addURLButton (QString ("http://www.kde.org"))
+ ok = d.Panel.addURLButton (TQString ("http://www.kde.org"))
-would call addURLButton with the required argument, and return nothing but the DCOP call
+would call addURLButton with the retquired argument, and return nothing but the DCOP call
status(since its return type is 'void').
Note that to instantiate a DCOPObj directly, you need to have a valid DCOPApp
-to pass to DCOPObj's __init__ method. Similarly, DCOPMeth requires a valid DCOPOBject.
+to pass to DCOPObj's __init__ method. Similarly, DCOPMeth retquires a valid DCOPOBject.
For example:
d = DCOPApp ("kicker", dcop)
@@ -667,11 +667,11 @@ class DCOPMeth(object):
return has
def __marshall(self, args, argtypes):
- data = QByteArray()
+ data = TQByteArray()
if argtypes == []:
return data
- params = QDataStream (data, IO_WriteOnly)
+ params = TQDataStream (data, IO_WriteOnly)
for arg, (argtype, argkind) in _xiter(args, argtypes):
if argkind == BOOLEAN:
@@ -688,12 +688,12 @@ class DCOPMeth(object):
dcop_add(params, arg)
- elif argtype.startswith("QMap") or argtype.startswith("QValueList"):
+ elif argtype.startswith("TQMap") or argtype.startswith("TQValueList"):
dcop_add(params, arg, argtype)
# XXX:
# Is 'isinstance(arg, eval(argtype))' really good?
- # What if 'argtype' is located in some modul? Like 'qt.QString'.
+ # What if 'argtype' is located in some modul? Like 'qt.TQString'.
# Then this will fail (but it should not!).
# And the worst thing: the eval() will raise a NameError!
#
@@ -715,7 +715,7 @@ class DCOPMeth(object):
return data
def __unmarshall(self, data, type_):
- s = QDataStream(data, IO_ReadOnly)
+ s = TQDataStream(data, IO_ReadOnly)
if str(type_) in stringTypes:
return unicode(dcop_next(s, type_))