summaryrefslogtreecommitdiffstats
path: root/examples/uiqxembed.py
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-03 22:23:44 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-03 22:23:44 -0600
commit203ba231d0276943aae36111f9ec1e949f3c6a4c (patch)
treef039f7a5b5fc2da88a96876971bac580d87f6788 /examples/uiqxembed.py
parentfd35f4a8382b7d223bc0325b9ca3f88515778aa0 (diff)
downloadpytde-203ba231d0276943aae36111f9ec1e949f3c6a4c.tar.gz
pytde-203ba231d0276943aae36111f9ec1e949f3c6a4c.zip
Initial TQt conversion
Diffstat (limited to 'examples/uiqxembed.py')
-rw-r--r--examples/uiqxembed.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/examples/uiqxembed.py b/examples/uiqxembed.py
index 6b50945..0275e0c 100644
--- a/examples/uiqxembed.py
+++ b/examples/uiqxembed.py
@@ -4,11 +4,11 @@
"""
import sys
-from qt import QIconSet, QProcess, QTimer, SIGNAL, SLOT
+from qt import TQIconSet, TQProcess, TQTimer, SIGNAL, SLOT
from tdecore import KAboutData, KApplication, KCmdLineArgs, KGlobal, KIcon
from tdecore import KWin, KWinModule
-from tdeui import KComboBox, KMainWindow, KPushButton, QXEmbed
+from tdeui import KComboBox, KMainWindow, KPushButton, TQXEmbed
## add the missing items to the pyuic-generated module
@@ -16,7 +16,7 @@ import qxembedexample
qxembedexample.KComboBox = KComboBox
qxembedexample.KPushButton = KPushButton
-from qxembedexample import QXEmbedExample
+from qxembedexample import TQXEmbedExample
def getIcon(name, group=KIcon.NoGroup, size=KIcon.SizeSmall):
@@ -42,12 +42,12 @@ def getWindow(pid):
return info
-class ExampleForm(QXEmbedExample):
+class ExampleForm(TQXEmbedExample):
""" wraps the pyuic generated form class with our behavior
"""
def __init__(self, parent):
- QXEmbedExample.__init__(self, parent)
+ TQXEmbedExample.__init__(self, parent)
combo = self.appNameCombo
items = [(idx, '%s' % combo.text(idx)) for idx in range(combo.count())]
for idx, name in items:
@@ -61,13 +61,13 @@ class ExampleForm(QXEmbedExample):
"""
name = self.appNameCombo.currentText()
- self.proc = proc = QProcess()
+ self.proc = proc = TQProcess()
proc.addArgument(name)
code = proc.start()
if code:
pid = proc.processIdentifier()
self.launchPid = pid ## cheap
- QTimer.singleShot(2000, self.embedLaunchedWindow)
+ TQTimer.singleShot(2000, self.embedLaunchedWindow)
else:
print 'failed to start %s' % name
return
@@ -80,13 +80,13 @@ class ExampleForm(QXEmbedExample):
winobj = getWindow(pid)
if winobj:
tabs = self.mainTabs
- embedded = QXEmbed(self)
+ embedded = TQXEmbed(self)
caption = '%s (%s)' % (winobj.name, pid, )
tabs.insertTab(embedded, caption)
embedded.embed(winobj.win)
tabs.showPage(embedded)
pxm = KWin.icon(winobj.win)
- tabs.setTabIconSet(embedded, QIconSet(pxm))
+ tabs.setTabIconSet(embedded, TQIconSet(pxm))
class ExampleMain(KMainWindow):
@@ -101,8 +101,8 @@ class ExampleMain(KMainWindow):
if __name__ == '__main__':
- aname = 'PyKDE QXEmbed Sample'
- desc = 'A Simple PyKDE QXEmbed Sample'
+ aname = 'PyKDE TQXEmbed Sample'
+ desc = 'A Simple PyKDE TQXEmbed Sample'
ver = '1.0'
lic = KAboutData.License_GPL
author = 'Troy Melhase'