-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdirs_ui.py
65 lines (56 loc) · 2.25 KB
/
dirs_ui.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/env python
# Generated by pykdeuic4 from dirs.ui on Fri Feb 20 21:38:22 2009
#
# WARNING! All changes to this file will be lost.
from PyKDE4 import kdecore
from PyKDE4 import kdeui
from PyQt4 import QtCore, QtGui
class Ui_Widget(object):
def setupUi(self, Widget):
Widget.setObjectName("Widget")
Widget.resize(508, 316)
self.gridLayout = QtGui.QGridLayout(Widget)
self.gridLayout.setObjectName("gridLayout")
self.dirs = QtGui.QListWidget(Widget)
self.dirs.setObjectName("dirs")
self.gridLayout.addWidget(self.dirs, 0, 0, 1, 2)
self.kcfg_url = KUrlRequester(Widget)
self.kcfg_url.setObjectName("kcfg_url")
self.gridLayout.addWidget(self.kcfg_url, 1, 0, 1, 1)
self.pb_addurl = QtGui.QPushButton(Widget)
self.pb_addurl.setObjectName("pb_addurl")
self.gridLayout.addWidget(self.pb_addurl, 1, 1, 1, 1)
self.retranslateUi(Widget)
QtCore.QMetaObject.connectSlotsByName(Widget)
def retranslateUi(self, Widget):
Widget.setWindowTitle(kdecore.i18n("Form"))
self.pb_addurl.setText(kdecore.i18n("PushButton"))
from PyKDE4.kio import KUrlRequester
if __name__ == '__main__':
import sys
global app
class MainWin(kdeui.KMainWindow, Ui_Widget):
def __init__ (self, *args):
kdeui.KMainWindow.__init__ (self)
rootWidget = QtGui.QWidget(self)
self.setupUi(rootWidget)
self.resize(640, 480)
self.setCentralWidget(rootWidget)
appName = "default"
catalog = ""
programName = kdecore.ki18n("default")
version = "1.0"
description = kdecore.ki18n("Default Example")
license = kdecore.KAboutData.License_GPL
copyright = kdecore.ki18n("unknown")
text = kdecore.ki18n("none")
homePage = ""
bugEmail = "email"
aboutData = kdecore.KAboutData(appName, catalog, programName, version, description,
license, copyright, text, homePage, bugEmail)
kdecore.KCmdLineArgs.init(sys.argv, aboutData)
app = kdeui.KApplication()
mainWindow = MainWin(None, "main window")
mainWindow.show()
app.connect (app, QtCore.SIGNAL ("lastWindowClosed ()"), app.quit)
app.exec_ ()