You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pytde/examples/qxembedexample.py

79 lines
2.9 KiB

# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'qxembedexample.ui'
#
# Created by: The PyTQt User Interface Compiler (pytquic) 3.18.1
#
# WARNING! All changes made in this file will be lost!
from PyTQt.tqt import *
class QXEmbedExample(TQWidget):
def __init__(self,parent = None,name = None,fl = 0):
TQWidget.__init__(self,parent,name,fl)
if not name:
self.setName("QXEmbedExample")
QXEmbedExampleLayout = TQVBoxLayout(self,11,6,"QXEmbedExampleLayout")
layout2 = TQHBoxLayout(None,0,6,"layout2")
self.appNameCombo = KComboBox(0,self,"appNameCombo")
self.appNameCombo.setSizePolicy(TQSizePolicy(TQSizePolicy.Minimum,TQSizePolicy.Fixed,0,0,self.appNameCombo.sizePolicy().hasHeightForWidth()))
layout2.addWidget(self.appNameCombo)
self.launchButton = KPushButton(self,"launchButton")
self.launchButton.setSizePolicy(TQSizePolicy(TQSizePolicy.Minimum,TQSizePolicy.Fixed,0,0,self.launchButton.sizePolicy().hasHeightForWidth()))
layout2.addWidget(self.launchButton)
spacer1 = TQSpacerItem(209,31,TQSizePolicy.Expanding,TQSizePolicy.Minimum)
layout2.addItem(spacer1)
QXEmbedExampleLayout.addLayout(layout2)
self.line1 = TQFrame(self,"line1")
self.line1.setFrameShape(TQFrame.HLine)
self.line1.setFrameShadow(TQFrame.Sunken)
self.line1.setFrameShape(TQFrame.HLine)
QXEmbedExampleLayout.addWidget(self.line1)
self.mainTabs = TQTabWidget(self,"mainTabs")
self.tab = TQWidget(self.mainTabs,"tab")
tabLayout = TQHBoxLayout(self.tab,11,6,"tabLayout")
self.textLabel1 = TQLabel(self.tab,"textLabel1")
tabLayout.addWidget(self.textLabel1)
self.mainTabs.insertTab(self.tab,TQString.fromUtf8(""))
QXEmbedExampleLayout.addWidget(self.mainTabs)
self.languageChange()
self.resize(TQSize(471,499).expandedTo(self.minimumSizeHint()))
self.clearWState(TQt.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 tqApp.translate(b"QXEmbedExample",s.encode(),c)