diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-16 09:06:37 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-16 09:06:37 +0000 |
commit | 39d98386f72c65826e162e3e8fd36752ec469252 (patch) | |
tree | 5cec746207c4c892d064beafca1de94568a3aeb9 /examples/qxembedexample.py | |
download | pytde-39d98386f72c65826e162e3e8fd36752ec469252.tar.gz pytde-39d98386f72c65826e162e3e8fd36752ec469252.zip |
Move python-kde3 to the more correct python-trinity
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/libraries/python-trinity@1247483 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'examples/qxembedexample.py')
-rw-r--r-- | examples/qxembedexample.py | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/examples/qxembedexample.py b/examples/qxembedexample.py new file mode 100644 index 0000000..0e21631 --- /dev/null +++ b/examples/qxembedexample.py @@ -0,0 +1,79 @@ +# -*- coding: utf-8 -*- + +# Form implementation generated from reading ui file 'qxembedexample.ui' +# +# Created: Thu Apr 29 02:17:37 2004 +# by: The PyQt User Interface Compiler (pyuic) 3.11 +# +# WARNING! All changes made in this file will be lost! + + +from qt import * + + +class QXEmbedExample(QWidget): + def __init__(self,parent = None,name = None,fl = 0): + QWidget.__init__(self,parent,name,fl) + + if not name: + self.setName("QXEmbedExample") + + + QXEmbedExampleLayout = QVBoxLayout(self,11,6,"QXEmbedExampleLayout") + + layout2 = QHBoxLayout(None,0,6,"layout2") + + self.appNameCombo = KComboBox(0,self,"appNameCombo") + self.appNameCombo.setSizePolicy(QSizePolicy(QSizePolicy.Minimum,QSizePolicy.Fixed,0,0,self.appNameCombo.sizePolicy().hasHeightForWidth())) + layout2.addWidget(self.appNameCombo) + + self.launchButton = KPushButton(self,"launchButton") + self.launchButton.setSizePolicy(QSizePolicy(QSizePolicy.Minimum,QSizePolicy.Fixed,0,0,self.launchButton.sizePolicy().hasHeightForWidth())) + layout2.addWidget(self.launchButton) + spacer1 = QSpacerItem(209,31,QSizePolicy.Expanding,QSizePolicy.Minimum) + layout2.addItem(spacer1) + QXEmbedExampleLayout.addLayout(layout2) + + self.line1 = QFrame(self,"line1") + self.line1.setFrameShape(QFrame.HLine) + self.line1.setFrameShadow(QFrame.Sunken) + self.line1.setFrameShape(QFrame.HLine) + QXEmbedExampleLayout.addWidget(self.line1) + + self.mainTabs = QTabWidget(self,"mainTabs") + + self.tab = QWidget(self.mainTabs,"tab") + tabLayout = QHBoxLayout(self.tab,11,6,"tabLayout") + + self.textLabel1 = QLabel(self.tab,"textLabel1") + tabLayout.addWidget(self.textLabel1) + self.mainTabs.insertTab(self.tab,QString("")) + QXEmbedExampleLayout.addWidget(self.mainTabs) + + self.languageChange() + + self.resize(QSize(471,499).expandedTo(self.minimumSizeHint())) + self.clearWState(Qt.WState_Polished) + + self.connect(self.launchButton,SIGNAL("clicked()"),self.launchApp) + + + def languageChange(self): + self.setCaption(self.__tr("QXEmbed Example")) + self.appNameCombo.clear() + self.appNameCombo.insertItem(self.__tr("kcalc")) + self.appNameCombo.insertItem(self.__tr("konqueror")) + self.appNameCombo.insertItem(self.__tr("kedit")) + self.launchButton.setText(self.__tr("Launch and Embed")) + self.textLabel1.setText(self.__tr("<b>QXEmbed Example</b>\n" +"<br><br>\n" +"\n" +"Select one of the app names from the combo list, then launch it with the button. Two seconds after launch, the window for the new process will get added as a new tab.")) + self.mainTabs.changeTab(self.tab,self.__tr("Help")) + + + def launchApp(self): + print "QXEmbedExample.launchApp(): Not implemented yet" + + def __tr(self,s,c = None): + return qApp.translate("QXEmbedExample",s,c) |