Fix omitted renaming pyuic => pytquic.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/10/head
Slávek Banko 1 year ago
parent cddd660ca4
commit 69c48c09a4
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -31,13 +31,13 @@ import sys, getopt, os, os.path, string
#---------- globals ---------- #---------- globals ----------
FALSE = 0 FALSE = 0
TRUE = not FALSE TRUE = not FALSE
addApp = TRUE addApp = TRUE
addImport = TRUE addImport = TRUE
pyuicPath = "pyuic" pytquicPath = "pytquic"
filename = "" filename = ""
i18nFunc = FALSE i18nFunc = FALSE
# --------- support functions ---------- # --------- support functions ----------
@ -47,7 +47,7 @@ def getOptions ():
opterr = 0 opterr = 0
shortOptions = 'aip:' shortOptions = 'aip:'
longOptions = ['noapp', 'noimport', 'pyuic=', 'usetdei18n'] longOptions = ['noapp', 'noimport', 'pytquic=', 'usetdei18n']
try: try:
optlist, args = getopt.getopt (sys.argv [1:], shortOptions, longOptions) optlist, args = getopt.getopt (sys.argv [1:], shortOptions, longOptions)
@ -64,7 +64,7 @@ def getOptions ():
Options: Options:
-a, --noapp Don't add TDEApplication code -a, --noapp Don't add TDEApplication code
-i, --noimport Don't add tdecore, tdeui import statements -i, --noimport Don't add tdecore, tdeui import statements
-p, --pyuic Path to pyuic program -p, --pytquic Path to pytquic program
--usetdei18n Adds TDEs default i18n functions to your Python TDE ui file --usetdei18n Adds TDEs default i18n functions to your Python TDE ui file
""") """)
return FALSE return FALSE
@ -73,7 +73,7 @@ def getOptions ():
return checkOptions (optlist) return checkOptions (optlist)
def checkOptions (optlist): def checkOptions (optlist):
global addApp, addImport, pyuicPath, i18nFunc global addApp, addImport, pytquicPath, i18nFunc
for pair in optlist: for pair in optlist:
if (pair [0] == '--noapp') or (pair [0] == '-a'): if (pair [0] == '--noapp') or (pair [0] == '-a'):
@ -82,8 +82,8 @@ def checkOptions (optlist):
elif (pair [0] == '--noimport') or (pair [0] == '-i'): elif (pair [0] == '--noimport') or (pair [0] == '-i'):
addImport = FALSE addImport = FALSE
elif (pair [0] == '--pyuic') or (pair [0] == '-p'): elif (pair [0] == '--pytquic') or (pair [0] == '-p'):
pyuicPath = pair [1] pytquicPath = pair [1]
if (pair [0] == '--usetdei18n'): if (pair [0] == '--usetdei18n'):
i18nFunc=TRUE i18nFunc=TRUE
@ -109,7 +109,7 @@ def addapp (indent, n):
n.write (indent + 'TDECmdLineArgs.init (sys.argv, appname, description, version)\n') n.write (indent + 'TDECmdLineArgs.init (sys.argv, appname, description, version)\n')
n.write (indent + 'a = TDEApplication ()\n\n') n.write (indent + 'a = TDEApplication ()\n\n')
def doPyuic (): def doPytquic ():
fn = os.path.splitext (os.path.basename(filename)) [0] + '.py' fn = os.path.splitext (os.path.basename(filename)) [0] + '.py'
opts = "" opts = ""
@ -123,8 +123,8 @@ def doPyuic ():
opts = opts + ' -o ' opts = opts + ' -o '
if os.system (pyuicPath + opts + fn + ' ' + filename) != 0: if os.system (pytquicPath + opts + fn + ' ' + filename) != 0:
print(pyuicPath + opts + fn + ' ' + filename + " failed") print(pytquicPath + opts + fn + ' ' + filename + " failed")
sys.exit (-1) sys.exit (-1)
if addApp or addImport: if addApp or addImport:
@ -160,4 +160,4 @@ def doPyuic ():
# --------- main ---------- # --------- main ----------
getOptions () getOptions ()
doPyuic () doPytquic ()

@ -2,8 +2,7 @@
# Form implementation generated from reading ui file 'qxembedexample.ui' # Form implementation generated from reading ui file 'qxembedexample.ui'
# #
# Created: Thu Apr 29 02:17:37 2004 # Created by: The PyTQt User Interface Compiler (pytquic) 3.18.1
# by: The PyTQt User Interface Compiler (pyuic) 3.11
# #
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
@ -47,7 +46,7 @@ class QXEmbedExample(TQWidget):
self.textLabel1 = TQLabel(self.tab,"textLabel1") self.textLabel1 = TQLabel(self.tab,"textLabel1")
tabLayout.addWidget(self.textLabel1) tabLayout.addWidget(self.textLabel1)
self.mainTabs.insertTab(self.tab,TQString("")) self.mainTabs.insertTab(self.tab,TQString.fromUtf8(""))
QXEmbedExampleLayout.addWidget(self.mainTabs) QXEmbedExampleLayout.addWidget(self.mainTabs)
self.languageChange() self.languageChange()

@ -11,7 +11,7 @@ from tdecore import KWin, KWinModule
from tdeui import KComboBox, TDEMainWindow, KPushButton, QXEmbed from tdeui import KComboBox, TDEMainWindow, KPushButton, QXEmbed
## add the missing items to the pyuic-generated module ## add the missing items to the pytquic-generated module
import qxembedexample import qxembedexample
qxembedexample.KComboBox = KComboBox qxembedexample.KComboBox = KComboBox
qxembedexample.KPushButton = KPushButton qxembedexample.KPushButton = KPushButton
@ -43,7 +43,7 @@ def getWindow(pid):
class ExampleForm(QXEmbedExample): class ExampleForm(QXEmbedExample):
""" wraps the pyuic generated form class with our behavior """ wraps the pyqtuic generated form class with our behavior
""" """
def __init__(self, parent): def __init__(self, parent):

Loading…
Cancel
Save