summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2023-01-16 17:11:02 +0100
committerSlávek Banko <[email protected]>2023-01-23 02:16:16 +0100
commite55e706f31de58a8286d0b6e53b723d9d199d5c6 (patch)
treed92640d57599b3e8b8332c13830501a701a65d89
parent2d380395d26b5897ffbf92dc62bd0f9ed09e0661 (diff)
downloadpytdeextensions-e55e706f31de58a8286d0b6e53b723d9d199d5c6.tar.gz
pytdeextensions-e55e706f31de58a8286d0b6e53b723d9d199d5c6.zip
Update after renaming qt => tqt in PyTQt module.
Signed-off-by: Slávek Banko <[email protected]>
-rwxr-xr-xapp_templates/kcontrol_module/setup.py2
-rw-r--r--app_templates/kcontrol_module/src/KcontrolModuleWidgetUI.ui4
-rwxr-xr-xapp_templates/kcontrol_module/src/kcontrol_module.py6
-rwxr-xr-xapp_templates/kdeapp/setup.py2
-rwxr-xr-xapp_templates/kdeapp/src/kdeapp.py16
-rw-r--r--app_templates/kdeapp/src/kdeappiface.py2
-rw-r--r--app_templates/kdeapp/src/kdeappview.py16
-rw-r--r--app_templates/kdeapp/src/prefdialog.py18
-rwxr-xr-xapp_templates/kdeutility/setup.py2
-rw-r--r--app_templates/kdeutility/src/KDEUtilityDialogUI.ui4
-rwxr-xr-xapp_templates/kdeutility/src/kdeutility.py2
-rwxr-xr-xapp_templates/tdeioslave/setup.py2
-rwxr-xr-xapp_templates/tdeioslave/src/tdeioslave.py10
-rw-r--r--doc/en/index.docbook16
-rwxr-xr-xsetup.py4
-rw-r--r--src/tdedesigner.py4
-rw-r--r--src/tdedistutils.py256
-rw-r--r--src/tqtdesigner.py (renamed from src/qtdesigner.py)4
-rw-r--r--src/tqtuicompiler.py (renamed from src/qtuicompiler.py)38
19 files changed, 200 insertions, 208 deletions
diff --git a/app_templates/kcontrol_module/setup.py b/app_templates/kcontrol_module/setup.py
index b072cb8..f8b81d3 100755
--- a/app_templates/kcontrol_module/setup.py
+++ b/app_templates/kcontrol_module/setup.py
@@ -23,7 +23,7 @@ tdedistutils.setup(name="kcontrol_module",
author_email="[email protected]",
url="http://www.TESTAPP.com/",
min_kde_version = "3.0.0",
- min_qt_version = "3.0.0",
+ min_tqt_version = "3.0.0",
license = "GPL",
application_data = ['src/kcontrol_module.py','src/KcontrolModuleWidgetUI.ui'],
executable_links = [('kcontrol_module','kcontrol_module.py')],
diff --git a/app_templates/kcontrol_module/src/KcontrolModuleWidgetUI.ui b/app_templates/kcontrol_module/src/KcontrolModuleWidgetUI.ui
index 4ff94d7..efc23cd 100644
--- a/app_templates/kcontrol_module/src/KcontrolModuleWidgetUI.ui
+++ b/app_templates/kcontrol_module/src/KcontrolModuleWidgetUI.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KcontrolModuleWidgetUI</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KcontrolModuleWidgetUI</cstring>
</property>
@@ -19,7 +19,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
diff --git a/app_templates/kcontrol_module/src/kcontrol_module.py b/app_templates/kcontrol_module/src/kcontrol_module.py
index f5cf394..f1c18de 100755
--- a/app_templates/kcontrol_module/src/kcontrol_module.py
+++ b/app_templates/kcontrol_module/src/kcontrol_module.py
@@ -16,7 +16,7 @@
###########################################################################
import sys
-from PyTQt.qt import *
+from PyTQt.tqt import *
from tdecore import *
from tdeui import *
@@ -72,10 +72,10 @@ class KcontrolModuleApp(programbase):
TDEGlobal.iconLoader().addAppDir("kcontrol_module")
if standalone:
- toplayout = QVBoxLayout( self.plainPage(), 0, KDialog.spacingHint() )
+ toplayout = TQVBoxLayout( self.plainPage(), 0, KDialog.spacingHint() )
mainwidget = KcontrolModuleWidget(self.plainPage())
else:
- toplayout = QVBoxLayout( self, 0, KDialog.spacingHint() )
+ toplayout = TQVBoxLayout( self, 0, KDialog.spacingHint() )
mainwidget = KcontrolModuleWidget(self)
toplayout.addWidget(mainwidget)
diff --git a/app_templates/kdeapp/setup.py b/app_templates/kdeapp/setup.py
index 710c6aa..21386c6 100755
--- a/app_templates/kdeapp/setup.py
+++ b/app_templates/kdeapp/setup.py
@@ -23,7 +23,7 @@ tdedistutils.setup(name="kdeapp",
author_email="[email protected]",
url="http://www.KDEAPP.com/",
min_kde_version = "3.0.0",
- min_qt_version = "3.0.0",
+ min_tqt_version = "3.0.0",
license = "GPL",
application_data = ['src/kdeapp.py','src/prefdialog.py','src/kdeappview.py'],
executable_links = [('kdeapp','kdeapp.py')],
diff --git a/app_templates/kdeapp/src/kdeapp.py b/app_templates/kdeapp/src/kdeapp.py
index 842d283..68d07af 100755
--- a/app_templates/kdeapp/src/kdeapp.py
+++ b/app_templates/kdeapp/src/kdeapp.py
@@ -15,7 +15,7 @@
# #
###########################################################################
-from PyTQt.qt import *
+from PyTQt.tqt import *
from tdecore import *
from tdeui import *
import sys
@@ -55,7 +55,7 @@ class KdeApp(TDEMainWindow):
self.connect(self._view, PYSIGNAL("signalChangeCaption"), self.changeCaption)
def load(self,url):
- target = QString()
+ target = TQString()
# the below code is what you should normally do. in this
# example case, we want the url to our own. you probably
# want to use this code instead for your app
@@ -124,7 +124,7 @@ class KdeApp(TDEMainWindow):
def dropEvent(self,event):
# this is a very simplistic implementation of a drop event. we
- # will only accept a dropped URL. the Qt dnd code can do *much*
+ # will only accept a dropped URL. the TQt dnd code can do *much*
# much more, so please read the docs there
urls = KURL.List()
@@ -150,7 +150,7 @@ class KdeApp(TDEMainWindow):
# button is clicked
## this brings up the generic open dialog
- #KURL url = KURLRequesterDlg::getURL(QString::null, this, i18n("Open Location") );
+ #KURL url = KURLRequesterDlg::getURL(TQString::null, this, i18n("Open Location") );
# standard filedialog
url = KFileDialog.getOpenURL(None, One, self, i18n("Open Location"))
@@ -181,14 +181,14 @@ class KdeApp(TDEMainWindow):
self._printer = KPrinter()
if self._printer.setup(self):
- # setup the printer. with Qt, you always "print" to a
- # QPainter.. whether the output medium is a pixmap, a screen,
+ # setup the printer. with TQt, you always "print" to a
+ # TQPainter.. whether the output medium is a pixmap, a screen,
# or paper
- p = QPainter()
+ p = TQPainter()
p.begin(self._printer)
# we let our view do the actual printing
- metrics = QPaintDeviceMetrics(m_printer)
+ metrics = TQPaintDeviceMetrics(m_printer)
self._view.print_(p, metrics.height(), metrics.width())
# and send the result to the printer
diff --git a/app_templates/kdeapp/src/kdeappiface.py b/app_templates/kdeapp/src/kdeappiface.py
index 1ff3b0f..5600437 100644
--- a/app_templates/kdeapp/src/kdeappiface.py
+++ b/app_templates/kdeapp/src/kdeappiface.py
@@ -20,7 +20,7 @@ from dcopexport import DCOPExObj
class TestAppIface(DCOPExObj):
def __init__(self, parent, id="Value"):
DCOPExObj.__init__(self, id)
- self.addMethod("void openURL(QString url)", self.openURL)
+ self.addMethod("void openURL(TQString url)", self.openURL)
def openURL(self,url):
pass
diff --git a/app_templates/kdeapp/src/kdeappview.py b/app_templates/kdeapp/src/kdeappview.py
index 92ec6df..af2537a 100644
--- a/app_templates/kdeapp/src/kdeappview.py
+++ b/app_templates/kdeapp/src/kdeappview.py
@@ -15,7 +15,7 @@
# #
###########################################################################
-from PyTQt.qt import *
+from PyTQt.tqt import *
from tdecore import *
from tdeui import *
from tdeio import *
@@ -23,13 +23,13 @@ from tdehtml import *
from tdeparts import *
#from kdeappiface import *
-class KdeAppView(QWidget):
+class KdeAppView(TQWidget):
def __init__(self,parent):
- QWidget.__init__(self,parent)
+ TQWidget.__init__(self,parent)
#self._dcopclient= KdeAppIface(self,"KdeAppIface")
# setup our layout manager to automatically add our widgets
- top_layout = QHBoxLayout(self)
+ top_layout = TQHBoxLayout(self)
top_layout.setAutoAdd(True)
if True:
@@ -58,7 +58,7 @@ class KdeAppView(QWidget):
# we now know that our offer can handle HTML and is a part.
# since it is a part, it must also have a library... let's try to
# load that now
- self._html = createReadOnlyPart(ptr.library(),self,ptr.name(),"KParts::ReadOnlyPart",QStringList())
+ self._html = createReadOnlyPart(ptr.library(),self,ptr.name(),"KParts::ReadOnlyPart", TQStringList())
if self._html is not None:
break
@@ -68,8 +68,8 @@ class KdeAppView(QWidget):
KMessageBox.error(self, i18n("Could not find a suitable HTML component"))
return
- QObject.connect(self._html, SIGNAL("setWindowCaption(const QString&)"), self.slotSetTitle)
- QObject.connect(self._html, SIGNAL("setStatusBarText(const QString&)"), self.slotOnURL)
+ TQObject.connect(self._html, SIGNAL("setWindowCaption(const TQString&)"), self.slotSetTitle)
+ TQObject.connect(self._html, SIGNAL("setStatusBarText(const TQString&)"), self.slotOnURL)
def print_(self,p,height,width):
pass
@@ -80,7 +80,7 @@ class KdeAppView(QWidget):
return self._html.url().url()
def openURL(self,url):
- if isinstance(url,QString):
+ if isinstance(url,TQString):
url = KURL(url)
self._html.openURL(url)
diff --git a/app_templates/kdeapp/src/prefdialog.py b/app_templates/kdeapp/src/prefdialog.py
index ef8ec0f..ce58dac 100644
--- a/app_templates/kdeapp/src/prefdialog.py
+++ b/app_templates/kdeapp/src/prefdialog.py
@@ -15,7 +15,7 @@
# #
###########################################################################
-from PyTQt.qt import *
+from PyTQt.tqt import *
from tdecore import *
from tdeui import *
@@ -33,21 +33,21 @@ class TestAppPrefDialog(KDialogBase):
frame = self.addPage(i18n("Second Page"), i18n("Page Two Options"))
self._pageTwo = TestAppPrefPageTwo(frame)
-class TestAppPrefPageOne(QFrame):
+class TestAppPrefPageOne(TQFrame):
def __init__(self,parent):
- QFrame.__init__(self,parent)
+ TQFrame.__init__(self,parent)
- layout = QHBoxLayout(self)
+ layout = TQHBoxLayout(self)
layout.setAutoAdd(True)
- QLabel(i18n("Add something here"), self)
+ TQLabel(i18n("Add something here"), self)
-class TestAppPrefPageTwo(QFrame):
+class TestAppPrefPageTwo(TQFrame):
def __init__(self,parent):
- QFrame.__init__(self,parent)
+ TQFrame.__init__(self,parent)
- layout = QHBoxLayout(self)
+ layout = TQHBoxLayout(self)
layout.setAutoAdd(True)
- QLabel(i18n("Add something here"), self)
+ TQLabel(i18n("Add something here"), self)
diff --git a/app_templates/kdeutility/setup.py b/app_templates/kdeutility/setup.py
index 3a39382..bd75a2b 100755
--- a/app_templates/kdeutility/setup.py
+++ b/app_templates/kdeutility/setup.py
@@ -23,7 +23,7 @@ tdedistutils.setup(name="kdeutility",
author_email="[email protected]",
url="http://www.TESTAPP.com/",
min_kde_version = "3.0.0",
- min_qt_version = "3.0.0",
+ min_tqt_version = "3.0.0",
license = "GPL",
application_data = ['src/kdeutility.py','src/KDEUtilityDialogUI.ui'],
executable_links = [('kdeutility','kdeutility.py')],
diff --git a/app_templates/kdeutility/src/KDEUtilityDialogUI.ui b/app_templates/kdeutility/src/KDEUtilityDialogUI.ui
index af12ef1..ecf553d 100644
--- a/app_templates/kdeutility/src/KDEUtilityDialogUI.ui
+++ b/app_templates/kdeutility/src/KDEUtilityDialogUI.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KDEUtilityDialogUI</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>KDEUtilityDialogUI</cstring>
</property>
@@ -19,7 +19,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>hellobutton</cstring>
</property>
diff --git a/app_templates/kdeutility/src/kdeutility.py b/app_templates/kdeutility/src/kdeutility.py
index 6b34826..dc61002 100755
--- a/app_templates/kdeutility/src/kdeutility.py
+++ b/app_templates/kdeutility/src/kdeutility.py
@@ -16,7 +16,7 @@
###########################################################################
import sys
-from PyTQt.qt import *
+from PyTQt.tqt import *
from tdecore import *
from tdeui import *
import tdedesigner
diff --git a/app_templates/tdeioslave/setup.py b/app_templates/tdeioslave/setup.py
index 1e9ff91..ce2a99a 100755
--- a/app_templates/tdeioslave/setup.py
+++ b/app_templates/tdeioslave/setup.py
@@ -23,7 +23,7 @@ tdedistutils.setup(name="tdeioslave",
author_email="[email protected]",
url="http://www.TESTAPP.com/",
min_kde_version = "3.0.0",
- min_qt_version = "3.0.0",
+ min_tqt_version = "3.0.0",
license = "GPL",
application_data = ['src/tdeioslave.py'],
docbooks = [ ('doc/en','en') ],
diff --git a/app_templates/tdeioslave/src/tdeioslave.py b/app_templates/tdeioslave/src/tdeioslave.py
index 17f9ee8..7685254 100755
--- a/app_templates/tdeioslave/src/tdeioslave.py
+++ b/app_templates/tdeioslave/src/tdeioslave.py
@@ -15,8 +15,8 @@
# #
###########################################################################
-# Import the required Qt and KDE modules.
-from PyTQt.qt import *
+# Import the required TQt and KDE modules.
+from PyTQt.tqt import *
from tdeio import *
from tdecore import *
import os, time
@@ -102,10 +102,10 @@ class SlaveClass(TDEIO.SlaveBase):
self.error(TDEIO.ERR_IS_DIRECTORY, path)
self.totalSize(len(item.getData()))
- self.data(QByteArray(item.getData()))
+ self.data(TQByteArray(item.getData()))
# The end of the data string.
- self.data(QByteArray())
+ self.data(TQByteArray())
self.finished()
@@ -132,7 +132,7 @@ class SlaveClass(TDEIO.SlaveBase):
parent_dir.unlink(filename)
# Read data from the application.
- bytearray = QByteArray()
+ bytearray = TQByteArray()
bytes = 0
data = ""
diff --git a/doc/en/index.docbook b/doc/en/index.docbook
index af4a5bc..355e61c 100644
--- a/doc/en/index.docbook
+++ b/doc/en/index.docbook
@@ -144,12 +144,12 @@ tdedistutils.setup(name="pytdeextensions",
author_email="[email protected]",
url="http://www.simonzone.com/software/pykdeextensions/",
min_kde_version = "3.0.0",
- min_qt_version = "3.0.0",
+ min_tqt_version = "3.0.0",
license = "LGPL" )
</programlisting>
-<symbol>min_kde_version</symbol> and <symbol>min_qt_version</symbol> specify
-the minimum versions of the Qt library and TDE needed to install and run
+<symbol>min_kde_version</symbol> and <symbol>min_tqt_version</symbol> specify
+the minimum versions of the TQt library and TDE needed to install and run
the software. These requirements are checked during install.
</para>
@@ -260,9 +260,9 @@ during install.
</chapter>
-<!-- Qt-designer -->
+<!-- TQt-designer -->
<chapter id="using-tqtdesigner">
-<title>Run-time integration with Qt-Designer</title>
+<title>Run-time integration with TQt-Designer</title>
<para>
Qt-Designer is a graphical application used for designing user interfaces.
It creates <literal role="extension">.ui</literal> files. These files need
@@ -271,7 +271,7 @@ application. This can be manually done using the <command>pyuic</command>
command from the shell. But it is a lot more convenient to let &appname;
to this automatically for you. All you need to do is import the
<symbol>tqtdesigner</symbol> or <symbol>tdedesigner</symbol> module, depending
-on whether your application is pure Qt or uses TDE, and then you can import
+on whether your application is pure TQt or uses TDE, and then you can import
your user interface files as though they were normal Python files.
<programlisting>
@@ -281,7 +281,7 @@ from tdeui import *
import tdedesigner # This module lets us import .ui file directly.
from MyWindow import * # Loads MyWindow.ui
-# Subclass the Qt-designer form.
+# Subclass the TQt-designer form.
class MyWindowCode(MyWindow):
# Implement extra functionality and methods.
</programlisting>
@@ -554,7 +554,7 @@ described below.
<title>Simple TDE utility template</title>
<para>
The <filename>kdeutility</filename> application template is a simple utility
-that uses an interface designed in Qt-Designer. It doesn't have a menubar
+that uses an interface designed in TQt-Designer. It doesn't have a menubar
or toolbar.
</para>
</sect1>
diff --git a/setup.py b/setup.py
index 095d771..fa41586 100755
--- a/setup.py
+++ b/setup.py
@@ -32,10 +32,10 @@ def main():
author_email="[email protected]",
url="http://www.simonzone.com/software/pykdeextensions/",
min_kde_version = "3.0.0",
- min_qt_version = "3.0.0",
+ min_tqt_version = "3.0.0",
license = "LGPL",
package_dir = {'': 'src'},
- py_modules = ["tdedistutils","qtuicompiler","qtdesigner","tdedesigner"],
+ py_modules = ["tdedistutils","tqtuicompiler","tqtdesigner","tdedesigner"],
application_data = ["app_templates","AUTHORS","ChangeLog","COPYING","INSTALL","NEWS"],
docbooks = [ ('doc/en','en') ],
cmdclass = {
diff --git a/src/tdedesigner.py b/src/tdedesigner.py
index ca58728..c96fa86 100644
--- a/src/tdedesigner.py
+++ b/src/tdedesigner.py
@@ -16,10 +16,10 @@
###########################################################################
import __builtin__
-import qtuicompiler
+import tqtuicompiler
python_import = __builtin__.__import__
def load(*args):
- qtuicompiler.DynamicImport(args,True)
+ tqtuicompiler.DynamicImport(args,True)
return apply(python_import,args)
__builtin__.__import__ = load
diff --git a/src/tdedistutils.py b/src/tdedistutils.py
index 6dad91d..afb1600 100644
--- a/src/tdedistutils.py
+++ b/src/tdedistutils.py
@@ -31,7 +31,7 @@ from distutils import log
from distutils import file_util
from distutils import dir_util
from distutils.util import byte_compile
-import qtuicompiler
+import tqtuicompiler
import stat
import os,os.path,imp,glob
import sys
@@ -56,7 +56,7 @@ def setup(**arg_dict):
'build_messages' : BuildI18NMessages,
'install_messages' : InstallI18NMessages,
'update_messages' : UpdateI18NMessages,
- 'checkpyqt' : CheckPyQt,
+ 'checkpytqt' : CheckPyTQt,
'checkpytde' : CheckPyTDE,
'uninstall' : Uninstall,
'build' : BuildKDE,
@@ -79,7 +79,7 @@ def setup(**arg_dict):
class KDEDistribution(Distribution):
def __init__(self,attrs=None):
self.min_kde_version = None
- self.min_qt_version = None
+ self.min_tqt_version = None
self.kcontrol_modules = None
self.tdeioslaves = None
self.executable_links = None
@@ -179,7 +179,7 @@ class InstallKDE(install):
sub_commands = install.sub_commands[:]
sub_commands.insert(0, ('checkpytde',None) )
- sub_commands.insert(0, ('checkpyqt',None) )
+ sub_commands.insert(0, ('checkpytqt',None) )
sub_commands.append( ('install_executable_links',has_executable_links) )
sub_commands.append( ('install_messages',has_messages) )
sub_commands.append( ('install_html',has_docbook_html) )
@@ -501,11 +501,11 @@ class BuildKControlModule(Command):
('kde-inc-dir=',None,'Directory containing C++ header files for KDE'),
('kde-lib-dir=',None,'Directory containing library files for KDE'),
('kde-kcm-lib-dir=',None,'Directory for KDE kcm library files'),
- ('qt-inc-dir=',None,'Directory containing C++ header files for Qt'),
- ('qt-lib-dir=',None,'Directory containing library files for Qt'),
+ ('tqt-inc-dir=',None,'Directory containing C++ header files for TQt'),
+ ('tqt-lib-dir=',None,'Directory containing library files for TQt'),
('sip-dir=',None,'Directory containing the sip library files'),
('clib=',None,'gcc library and path'),
- ('pyqt-dir=',None,'PyQt module directory'),
+ ('pytqt-dir=',None,'PyTQt module directory'),
('pytde-dir=',None,'PyTDE module directory'),
('data-dir=',None,'installation directory for data (script) files')]
@@ -517,11 +517,11 @@ class BuildKControlModule(Command):
self.kde_inc_dir = None
self.kde_lib_dir = None
self.kde_kcm_lib_dir = None
- self.qt_inc_dir = None
- self.qt_lib_dir = None
+ self.tqt_inc_dir = None
+ self.tqt_lib_dir = None
self.sip_dir = None
self.clib = None
- self.pyqt_dir = None
+ self.pytqt_dir = None
self.pytde_dir = None
self.data_dir = None
@@ -561,38 +561,37 @@ class BuildKControlModule(Command):
self.announce("Using %s for KDE KCM library files" % self.kde_kcm_lib_dir)
# TQt inc dir
- if self.qt_inc_dir is None:
+ if self.tqt_inc_dir is None:
canidatepaths = []
- qtinc = os.getenv("QTINC")
- if qtinc != None:
- canidatepaths.append(qtinc)
- qtdir = os.getenv("TQTDIR")
- if qtdir != None:
- canidatepaths.append(os.path.join(qtdir,"include"))
+ tqtinc = os.getenv("TQTINC")
+ if tqtinc != None:
+ canidatepaths.append(tqtinc)
+ tqtdir = os.getenv("TQTDIR")
+ if tqtdir != None:
+ canidatepaths.append(os.path.join(tqtdir,"include"))
canidatepaths.append(os.path.join(install.prefix,"lib/tqt3/include"))
- canidatepaths.append(os.path.join(install.prefix,"lib/qt3/include"))
canidatepaths.append(os.path.join(install.prefix,"include"))
canidatepaths.append("/opt/tqt3/include")
canidatepaths.append("/usr/include/tqt3")
- self.qt_inc_dir = FindFileInPaths('ntqstring.h',canidatepaths)
- if self.qt_inc_dir is None:
- self.qt_inc_dir = FindFileInPaths('qstring.h',canidatepaths)
- if self.qt_inc_dir is None:
+ self.tqt_inc_dir = FindFileInPaths('ntqstring.h',canidatepaths)
+ if self.tqt_inc_dir is None:
+ self.tqt_inc_dir = FindFileInPaths('tqstring.h',canidatepaths)
+ if self.tqt_inc_dir is None:
raise SystemExit("Failed to find the TQt header file directory")
- if FindFileInPaths('ntqstring.h',[self.qt_inc_dir]) is None:
- if FindFileInPaths('qstring.h',[self.qt_inc_dir]) is None:
- raise SystemExit("Failed to find TQt header files in: %s" % self.qt_inc_dir)
- self.announce("Using %s for TQt header files" % self.qt_inc_dir)
+ if FindFileInPaths('ntqstring.h',[self.tqt_inc_dir]) is None:
+ if FindFileInPaths('tqstring.h',[self.tqt_inc_dir]) is None:
+ raise SystemExit("Failed to find TQt header files in: %s" % self.tqt_inc_dir)
+ self.announce("Using %s for TQt header files" % self.tqt_inc_dir)
# TQt lib dir
- if self.qt_lib_dir is None:
+ if self.tqt_lib_dir is None:
canidatepaths = []
tqtlib = os.getenv("TQTLIB")
if tqtlib != None:
canidatepaths.append(tqtlib)
- qtdir = os.getenv("TQTDIR")
- if qtdir != None:
- canidatepaths.append(os.path.join(qtdir,get_libdir_name()))
+ tqtdir = os.getenv("TQTDIR")
+ if tqtdir != None:
+ canidatepaths.append(os.path.join(tqtdir,get_libdir_name()))
canidatepaths.append(os.path.join(install.prefix,"lib/tqt3/"+get_libdir_name()))
canidatepaths.append(os.path.join(install.prefix,"lib/tqt3/"+get_libdir_name()))
canidatepaths.append(os.path.join(install.prefix,get_libdir_name()))
@@ -600,26 +599,23 @@ class BuildKControlModule(Command):
canidatepaths.append("/opt/tqt/"+get_libdir_name())
canidatepaths.append("/opt/tqt/lib/"+get_libdir_name())
canidatepaths.append("/opt/tqt3/lib/"+get_libdir_name())
- self.qt_lib_dir = FindFileInPaths('libtqt*',canidatepaths)
- if self.qt_lib_dir is None:
+ self.tqt_lib_dir = FindFileInPaths('libtqt*',canidatepaths)
+ if self.tqt_lib_dir is None:
canidatepaths = []
tqtlib = os.getenv("TQTLIB")
if tqtlib != None:
canidatepaths.append(tqtlib)
- qtdir = os.getenv("TQTDIR")
- if qtdir != None:
- canidatepaths.append(os.path.join(qtdir,get_libdir_name()))
+ tqtdir = os.getenv("TQTDIR")
+ if tqtdir != None:
+ canidatepaths.append(os.path.join(tqtdir,get_libdir_name()))
canidatepaths.append(os.path.join(install.prefix,"lib/tqt3/"+get_libdir_name()))
- canidatepaths.append(os.path.join(install.prefix,"lib/qt3/"+get_libdir_name()))
canidatepaths.append(os.path.join(install.prefix,get_libdir_name()))
canidatepaths.append("/opt/tqt3/"+get_libdir_name())
- canidatepaths.append("/opt/qt/"+get_libdir_name())
- canidatepaths.append("/opt/qt/lib/"+get_libdir_name())
- canidatepaths.append("/opt/qt3/lib/"+get_libdir_name())
- self.qt_lib_dir = FindFileInPaths('libtqt*',canidatepaths)
- if self.qt_lib_dir is None:
+ canidatepaths.append("/opt/tqt3/lib/"+get_libdir_name())
+ self.tqt_lib_dir = FindFileInPaths('libtqt*',canidatepaths)
+ if self.tqt_lib_dir is None:
raise SystemExit("Failed to find TQt library files")
- self.announce("Using %s for TQt library files" % self.qt_lib_dir)
+ self.announce("Using %s for TQt library files" % self.tqt_lib_dir)
# Python dir
if self.python_dir is None:
@@ -633,13 +629,13 @@ class BuildKControlModule(Command):
self.announce("Using %s for Python header files" % self.python_inc_dir)
# PyTQt dir
- if self.pyqt_dir is None:
- self.pyqt_dir = FindFileInPaths("PyTQt", sys.path)
- if self.pyqt_dir is None:
- self.pyqt_dir = os.path.join(sysconfig.get_python_lib(), 'PyTQt')
- if (FindFileInPaths("libtqtcmodule*",[self.pyqt_dir]) is None) and (FindFileInPaths("qt*",[self.pyqt_dir]) is None):
- raise SystemExit("Failed to find the PyTQt directory: %s" % self.pyqt_dir)
- self.announce("Using %s for PyTQt modules" % self.pyqt_dir)
+ if self.pytqt_dir is None:
+ self.pytqt_dir = FindFileInPaths("PyTQt", sys.path)
+ if self.pytqt_dir is None:
+ self.pytqt_dir = os.path.join(sysconfig.get_python_lib(), 'PyTQt')
+ if (FindFileInPaths("libtqtcmodule*",[self.pytqt_dir]) is None) and (FindFileInPaths("tqt*",[self.pytqt_dir]) is None):
+ raise SystemExit("Failed to find the PyTQt directory: %s" % self.pytqt_dir)
+ self.announce("Using %s for PyTQt modules" % self.pytqt_dir)
# PyTDE dir
if self.pytde_dir is None:
@@ -796,7 +792,7 @@ class BuildKControlModule(Command):
cmdlist.append("-I" + self.python_inc_dir)
cmdlist.append("-I" + self.kde_inc_dir)
cmdlist.append("-I" + self.kde_inc_dir + "/tde")
- cmdlist.append("-I" + self.qt_inc_dir)
+ cmdlist.append("-I" + self.tqt_inc_dir)
cmdlist.append("-I/usr/include/tqt")
cmdlist.append("-I.")
# input
@@ -831,28 +827,28 @@ class BuildKControlModule(Command):
# FIXME I doubt half of these libraries need to be here.
linklist.append(self.sip_dir+"/sip_tqt.so")
- # PyQt libs
- linklist.append(self.pyqt_dir+"/qt.so")
+ # PyTQt libs
+ linklist.append(self.pytqt_dir+"/tqt.so")
# PyTDE libs
linklist.append(self.pytde_dir+"/tdecore.so")
linklist.append(self.pytde_dir+"/tdeui.so")
# linklist.append("-L"+self.sip_dir); linklist.append("-lsip_tqt")
-# # PyQt libs
-# linklist.append("-L"+self.pyqt_dir); linklist.append("-lqtcmodule")
+# # PyTQt libs
+# linklist.append("-L"+self.pytqt_dir); linklist.append("-lqtcmodule")
# # PyTDE libs
# linklist.append("-L"+self.pytde_dir); linklist.append("-ltdecorecmodule"); linklist.append("-ltdeuicmodule")
linklist.append("-L"+self.kde_lib_dir); linklist.append("-L/opt/trinity/lib"); linklist.append("-ltdecore"); linklist.append("-lpythonize")
- linklist.append("-L"+self.qt_lib_dir); linklist.append("-ltqt-mt")
+ linklist.append("-L"+self.tqt_lib_dir); linklist.append("-ltqt-mt")
linklist.append("-lm")
linklist.append("-lc")
linklist.append(self.clib)
linklist.append("-R"); linklist.append(self.python_dir)
- linklist.append("-R"); linklist.append(self.qt_lib_dir)
+ linklist.append("-R"); linklist.append(self.tqt_lib_dir)
linklist.append("-R"); linklist.append(self.sip_dir)
- linklist.append("-R"); linklist.append(self.pyqt_dir)
+ linklist.append("-R"); linklist.append(self.pytqt_dir)
linklist.append("-R"); linklist.append(self.pytde_dir)
linklist.append("-R"); linklist.append(self.kde_lib_dir)
@@ -944,10 +940,10 @@ static TDECModule* return_instance( TQWidget *parent, const char *name ) {
// Inject a helper function
TQString bridge = TQString("import sip_tqt\n"
- "from PyTQt import qt\n"
+ "from PyTQt import tqt\n"
"def kcontrol_bridge_" FACTORY "(parent,name):\n"
" if parent!=0:\n"
- " wparent = sip_tqt.wrapinstance(parent,qt.TQWidget)\n"
+ " wparent = sip_tqt.wrapinstance(parent,tqt.TQWidget)\n"
" else:\n"
" wparent = None\n"
" inst = " FACTORY "(wparent, name)\n"
@@ -1320,7 +1316,7 @@ class UpdateI18NMessages(Command):
# Compile any UI files
for dir in self.distribution.i18n[1]:
for file in glob.glob(os.path.join(dir,'*.ui')):
- qtuicompiler.UpdateUI(file,kde=True)
+ tqtuicompiler.UpdateUI(file,kde=True)
# Fetch all of the python files.
for dir in self.distribution.i18n[1]:
@@ -1449,11 +1445,11 @@ class BuildTdeioslave(Command):
('kde-lib-dir=',None,'Directory containing library files for KDE'),
('kde-tdeioslave-lib-dir=',None,'Directory for KDE tdeioslave library files'),
('kde-protocol-dir=',None,'Directory for KDE tdeioslave protocol files'),
- ('qt-inc-dir=',None,'Directory containing C++ header files for Qt'),
- ('qt-lib-dir=',None,'Directory containing library files for Qt'),
+ ('tqt-inc-dir=',None,'Directory containing C++ header files for TQt'),
+ ('tqt-lib-dir=',None,'Directory containing library files for TQt'),
('sip-dir=','/usr/lib/pyshared/python*','Directory containing the sip library files'),
('clib=',None,'gcc library and path'),
- ('pyqt-dir=','/usr/lib/pyshared/python*','PyQt module directory'),
+ ('pytqt-dir=','/usr/lib/pyshared/python*','PyTQt module directory'),
('pytde-dir=',None,'PyTDE module directory'),
('data-dir=',None,'installation directory for data (script) files')]
@@ -1466,11 +1462,11 @@ class BuildTdeioslave(Command):
self.kde_lib_dir = None
self.kde_tdeioslave_lib_dir = None
self.kde_protocol_dir = None
- self.qt_inc_dir = None
- self.qt_lib_dir = None
+ self.tqt_inc_dir = None
+ self.tqt_lib_dir = None
self.sip_dir = None
self.clib = None
- self.pyqt_dir = None
+ self.pytqt_dir = None
self.pytde_dir = None
self.data_dir = None
@@ -1510,40 +1506,37 @@ class BuildTdeioslave(Command):
self.announce("Using %s for KDE Tdeioslave library files" % self.kde_tdeioslave_lib_dir)
# TQt inc dir
- if self.qt_inc_dir is None:
+ if self.tqt_inc_dir is None:
canidatepaths = []
- qtinc = os.getenv("QTINC")
- if qtinc != None:
- canidatepaths.append(qtinc)
- qtdir = os.getenv("TQTDIR")
- if qtdir != None:
- canidatepaths.append(os.path.join(qtdir,"include"))
+ tqtinc = os.getenv("TQTINC")
+ if tqtinc != None:
+ canidatepaths.append(tqtinc)
+ tqtdir = os.getenv("TQTDIR")
+ if tqtdir != None:
+ canidatepaths.append(os.path.join(tqtdir,"include"))
canidatepaths.append(os.path.join(install.prefix,"lib/tqt3/include"))
- canidatepaths.append(os.path.join(install.prefix,"lib/qt3/include"))
canidatepaths.append(os.path.join(install.prefix,"include"))
canidatepaths.append("/opt/tqt3/include")
- canidatepaths.append("/opt/qt/include")
- canidatepaths.append("/opt/qt/lib/include")
- canidatepaths.append("/opt/qt3/lib/include")
- self.qt_inc_dir = FindFileInPaths('ntqstring.h',canidatepaths)
- if self.qt_inc_dir is None:
- self.qt_inc_dir = FindFileInPaths('qstring.h',canidatepaths)
- if self.qt_inc_dir is None:
+ canidatepaths.append("/opt/tqt3/lib/include")
+ self.tqt_inc_dir = FindFileInPaths('ntqstring.h',canidatepaths)
+ if self.tqt_inc_dir is None:
+ self.tqt_inc_dir = FindFileInPaths('tqstring.h',canidatepaths)
+ if self.tqt_inc_dir is None:
raise SystemExit("Failed to find the TQt header file directory")
- if FindFileInPaths('ntqstring.h',[self.qt_inc_dir]) is None:
- if FindFileInPaths('qstring.h',[self.qt_inc_dir]) is None:
- raise SystemExit("Failed to find TQt header files in: %s" % self.qt_inc_dir)
- self.announce("Using %s for TQt header files" % self.qt_inc_dir)
+ if FindFileInPaths('ntqstring.h',[self.tqt_inc_dir]) is None:
+ if FindFileInPaths('tqstring.h',[self.tqt_inc_dir]) is None:
+ raise SystemExit("Failed to find TQt header files in: %s" % self.tqt_inc_dir)
+ self.announce("Using %s for TQt header files" % self.tqt_inc_dir)
# TQt lib dir
- if self.qt_lib_dir is None:
+ if self.tqt_lib_dir is None:
canidatepaths = []
tqtlib = os.getenv("TQTLIB")
if tqtlib != None:
canidatepaths.append(tqtlib)
- qtdir = os.getenv("TQTDIR")
- if qtdir != None:
- canidatepaths.append(os.path.join(qtdir,get_libdir_name()))
+ tqtdir = os.getenv("TQTDIR")
+ if tqtdir != None:
+ canidatepaths.append(os.path.join(tqtdir,get_libdir_name()))
canidatepaths.append(os.path.join(install.prefix,"lib/tqt3/"+get_libdir_name()))
canidatepaths.append(os.path.join(install.prefix,"lib/tqt3/"+get_libdir_name()))
canidatepaths.append(os.path.join(install.prefix,get_libdir_name()))
@@ -1551,26 +1544,23 @@ class BuildTdeioslave(Command):
canidatepaths.append("/opt/tqt/"+get_libdir_name())
canidatepaths.append("/opt/tqt/lib/"+get_libdir_name())
canidatepaths.append("/opt/tqt3/lib/"+get_libdir_name())
- self.qt_lib_dir = FindFileInPaths('libtqt*',canidatepaths)
- if self.qt_lib_dir is None:
+ self.tqt_lib_dir = FindFileInPaths('libtqt*',canidatepaths)
+ if self.tqt_lib_dir is None:
canidatepaths = []
tqtlib = os.getenv("TQTLIB")
if tqtlib != None:
canidatepaths.append(tqtlib)
- qtdir = os.getenv("TQTDIR")
- if qtdir != None:
- canidatepaths.append(os.path.join(qtdir,get_libdir_name()))
+ tqtdir = os.getenv("TQTDIR")
+ if tqtdir != None:
+ canidatepaths.append(os.path.join(tqtdir,get_libdir_name()))
canidatepaths.append(os.path.join(install.prefix,"lib/tqt3/"+get_libdir_name()))
- canidatepaths.append(os.path.join(install.prefix,"lib/qt3/"+get_libdir_name()))
canidatepaths.append(os.path.join(install.prefix,get_libdir_name()))
canidatepaths.append("/opt/tqt3/"+get_libdir_name())
- canidatepaths.append("/opt/qt/"+get_libdir_name())
- canidatepaths.append("/opt/qt/lib/"+get_libdir_name())
- canidatepaths.append("/opt/qt3/lib/"+get_libdir_name())
- self.qt_lib_dir = FindFileInPaths('libtqt*',canidatepaths)
- if self.qt_lib_dir is None:
+ canidatepaths.append("/opt/tqt3/lib/"+get_libdir_name())
+ self.tqt_lib_dir = FindFileInPaths('libtqt*',canidatepaths)
+ if self.tqt_lib_dir is None:
raise SystemExit("Failed to find TQt library files")
- self.announce("Using %s for TQt library files" % self.qt_lib_dir)
+ self.announce("Using %s for TQt library files" % self.tqt_lib_dir)
# Python dir
if self.python_dir is None:
@@ -1584,13 +1574,13 @@ class BuildTdeioslave(Command):
self.announce("Using %s for Python header files" % self.python_inc_dir)
# PyTQt dir
- if self.pyqt_dir is None:
- self.pyqt_dir = FindFileInPaths("PyTQt", sys.path)
- if self.pyqt_dir is None:
- self.pyqt_dir = os.path.join(sysconfig.get_python_lib(), 'PyTQt')
- if (FindFileInPaths("libtqtcmodule*",[self.pyqt_dir]) is None) and (FindFileInPaths("qt*",[self.pyqt_dir]) is None):
- raise SystemExit("Failed to find the PyTQt directory: %s" % self.pyqt_dir)
- self.announce("Using %s for PyTQt modules" % self.pyqt_dir)
+ if self.pytqt_dir is None:
+ self.pytqt_dir = FindFileInPaths("PyTQt", sys.path)
+ if self.pytqt_dir is None:
+ self.pytqt_dir = os.path.join(sysconfig.get_python_lib(), 'PyTQt')
+ if (FindFileInPaths("libtqtcmodule*",[self.pytqt_dir]) is None) and (FindFileInPaths("tqt*",[self.pytqt_dir]) is None):
+ raise SystemExit("Failed to find the PyTQt directory: %s" % self.pytqt_dir)
+ self.announce("Using %s for PyTQt modules" % self.pytqt_dir)
# PyTDE dir
if self.pytde_dir is None:
@@ -1731,7 +1721,7 @@ class BuildTdeioslave(Command):
cmdlist.append("-I" + self.python_inc_dir)
cmdlist.append("-I" + self.kde_inc_dir)
cmdlist.append("-I" + self.kde_inc_dir + "/tde")
- cmdlist.append("-I" + self.qt_inc_dir)
+ cmdlist.append("-I" + self.tqt_inc_dir)
cmdlist.append("-I/usr/include/tqt")
cmdlist.append("-I.")
# input
@@ -1767,26 +1757,26 @@ class BuildTdeioslave(Command):
# FIXME I doubt half of these libraries need to be here.
linklist.append(self.sip_dir+"/sip_tqt.so")
# PyTQt libs
- linklist.append(self.pyqt_dir+"/qt.so")
+ linklist.append(self.pytqt_dir+"/tqt.so")
# PyTDE libs
linklist.append(self.pytde_dir+"/tdecore.so")
# linklist.append("-L"+self.sip_dir); linklist.append("-lsip_tqt")
# # PyTQt libs
-# linklist.append("-L"+self.pyqt_dir); linklist.append("-lqtcmodule")
+# linklist.append("-L"+self.pytqt_dir); linklist.append("-lqtcmodule")
# # PyTDE libs
# linklist.append("-L"+self.pytde_dir); linklist.append("-ltdecorecmodule"); linklist.append("-ltdeuicmodule")
linklist.append("-L"+self.kde_lib_dir); linklist.append("-L/opt/trinity/lib"); linklist.append("-ltdecore"); linklist.append("-lpythonize")
- linklist.append("-L"+self.qt_lib_dir); linklist.append("-lqt-mt")
+ linklist.append("-L"+self.tqt_lib_dir); linklist.append("-lqt-mt")
linklist.append("-lm")
linklist.append("-lc")
linklist.append(self.clib)
linklist.append("-R"); linklist.append(self.python_dir)
- linklist.append("-R"); linklist.append(self.qt_lib_dir)
+ linklist.append("-R"); linklist.append(self.tqt_lib_dir)
linklist.append("-R"); linklist.append(self.sip_dir)
- linklist.append("-R"); linklist.append(self.pyqt_dir)
+ linklist.append("-R"); linklist.append(self.pytqt_dir)
linklist.append("-R"); linklist.append(self.pytde_dir)
linklist.append("-R"); linklist.append(self.kde_lib_dir)
@@ -2010,7 +2000,7 @@ class InstallTdeioslave(Command):
return dir_util.mkpath(name, mode, dry_run=self.dry_run)
###########################################################################
-class CheckPyQt(Command):
+class CheckPyTQt(Command):
description = "Checks for the presence of a working PyTQt installation"
user_options = []
@@ -2019,17 +2009,17 @@ class CheckPyQt(Command):
pass
def finalize_options(self):
- self.min_qt_version = self.distribution.min_qt_version
+ self.min_tqt_version = self.distribution.min_tqt_version
def run(self):
- if self.min_qt_version!=None:
- qtver,kdever = get_qt_kde_versions()
- if compare_versions(self.min_qt_version,qtver)==1:
- raise SystemExit("Your TQt version is too old. Version %s or higher is required, found %s." % (self.min_qt_version,qtver))
- self.announce("Found TQt version %s." % qtver)
+ if self.min_tqt_version!=None:
+ tqtver,kdever = get_tqt_kde_versions()
+ if compare_versions(self.min_tqt_version,tqtver)==1:
+ raise SystemExit("Your TQt version is too old. Version %s or higher is required, found %s." % (self.min_tqt_version,tqtver))
+ self.announce("Found TQt version %s." % tqtver)
try:
self.announce("Checking for a working PyTQt...")
- from PyTQt import qt
+ from PyTQt import tqt
self.announce(" ...PyTQt is working")
except:
raise SystemExit("Couldn't import TQt! Please make sure that PyTQt is installed and working.")
@@ -2050,7 +2040,7 @@ class CheckPyTDE(Command):
def run(self):
if self.min_kde_version!=None:
- qtver,kdever = get_qt_kde_versions()
+ tqtver,kdever = get_tqt_kde_versions()
if compare_versions(self.min_kde_version,kdever)==1:
raise SystemExit("Your TDE version is too old. Version %s or higher is required, found %s." % (self.min_kde_version,kdever))
self.announce("Found KDE version %s." % kdever)
@@ -2208,24 +2198,26 @@ def compare_versions(a,b):
return 0
###########################################################################
-def get_qt_kde_versions():
+def get_tqt_kde_versions():
versioninfo = ask_kde_config('--version')
- qtver = None
+ tqtver = None
kdever = None
if versioninfo!=None:
for line in versioninfo.splitlines():
- if line.startswith("Qt: "):
- qtver = line[4:]
+ if line.startswith("TQt: "):
+ tqtver = line[4:]
+ elif line.startswith("Qt: "):
+ tqtver = line[4:]
elif line.startswith("TDE: "):
kdever = line[5:]
- return qtver,kdever
+ return tqtver,kdever
###########################################################################
def compile_tqtdesigner(ui_files,
force=0,
prefix=None, base_dir=None,
verbose=1, dry_run=0):
- """Compile a collection of QT Designer UI files to .py
+ """Compile a collection of TQT Designer UI files to .py
If 'dry_run' is true, doesn't actually do anything that would
affect the filesystem.
@@ -2246,12 +2238,12 @@ def compile_tqtdesigner(ui_files,
pyfile_base = os.path.basename(pyfile)
if force or newer(uifile, pyfile):
- log.info("compiling Qt-Designer UI %s to %s", file, pyfile_base)
+ log.info("compiling TQt-Designer UI %s to %s", file, pyfile_base)
if not dry_run:
- qtuicompiler.CompileUI(uifile, pyfile)
+ tqtuicompiler.CompileUI(uifile, pyfile)
generated_files.append(pyfile)
else:
- log.debug("skipping Qt-Designer compilation of %s to %s",
+ log.debug("skipping TQt-Designer compilation of %s to %s",
file, pyfile_base)
return generated_files
diff --git a/src/qtdesigner.py b/src/tqtdesigner.py
index aa7d0b7..c31edee 100644
--- a/src/qtdesigner.py
+++ b/src/tqtdesigner.py
@@ -16,11 +16,11 @@
###########################################################################
import __builtin__
-import qtuicompiler
+import tqtuicompiler
python_import = __builtin__.__import__
def load(*args):
- qtuicompiler.DynamicImport(args,False)
+ tqtuicompiler.DynamicImport(args,False)
return apply(python_import,args)
__builtin__.__import__ = load
diff --git a/src/qtuicompiler.py b/src/tqtuicompiler.py
index ff626ad..0e84838 100644
--- a/src/qtuicompiler.py
+++ b/src/tqtuicompiler.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
###########################################################################
-# qtuicompiler - description #
+# tqtuicompiler - description #
# ------------------------------ #
# begin : Thu Apr 21 2005 #
# copyright : (C) 2005 by Simon Edwards #
@@ -17,37 +17,37 @@
import os
import sys
-from PyTQt import pyqtconfig
+from PyTQt import pytqtconfig
from distutils.spawn import *
import traceback
-pyqt_configuration = pyqtconfig.Configuration()
-pyuic_exe = None
+pytqt_configuration = pytqtconfig.Configuration()
+pytquic_exe = None
############################################################################
-def FindPyuic():
- global pyuic_exe
- if pyuic_exe is not None: return pyuic_exe
+def FindPytquic():
+ global pytquic_exe
+ if pytquic_exe is not None: return pytquic_exe
- pyuic_exe = find_executable('pyuic',pyqt_configuration.pyqt_bin_dir)
- if pyuic_exe is None:
+ pytquic_exe = find_executable('pytquic',pytqt_configuration.pytqt_bin_dir)
+ if pytquic_exe is None:
# Search on the $Path.
- pyuic_exe = find_executable('pyuic')
+ pytquic_exe = find_executable('pytquic')
############################################################################
def CompileUI(ui_file_name, py_file_name=None, kde=False):
- pyuic_exe = find_executable('pyuic',pyqt_configuration.default_bin_dir)
- if pyuic_exe is None:
+ pytquic_exe = find_executable('pytquic',pytqt_configuration.default_bin_dir)
+ if pytquic_exe is None:
# Search on the $Path.
- pyuic_exe = find_executable('pyuic')
- if pyuic_exe is None:
+ pytquic_exe = find_executable('pytquic')
+ if pytquic_exe is None:
pass # FIXME raise something!
if py_file_name is None:
py_file_name = os.path.splitext(os.path.basename(ui_file_name))[0] + '.py'
tmp_file_name = py_file_name + '.bak'
- cmd = [pyuic_exe]
+ cmd = [pytquic_exe]
if kde:
cmd.append('-tr')
cmd.append('i18n')
@@ -59,12 +59,12 @@ def CompileUI(ui_file_name, py_file_name=None, kde=False):
input = open(tmp_file_name, 'r')
output = open(py_file_name, 'w')
for line in input.readlines():
- if kde and string.strip(line) == 'from PyTQt.qt import *':
+ if kde and string.strip(line) == 'from PyTQt.tqt import *':
output.write(line)
output.write('from tdecore import *\nfrom tdeui import *\n\n')
elif kde and string.find(line, " = KDatePicker(") != -1:
o = string.find(line, ",")
- output.write(line[:o] + ",QDate.currentDate()" + line[o:])
+ output.write(line[:o] + ",TQDate.currentDate()" + line[o:])
else:
output.write (line)
@@ -82,7 +82,7 @@ def DynamicImport(importargs,kde=False):
UpdateUI(file_name_ui,kde)
except:
traceback.print_exc()
- raise ImportError("Unable to compile Qt designer file %s." % args[0])
+ raise ImportError("Unable to compile TQt designer file %s." % args[0])
############################################################################
def UpdateUI(ui_file,kde=False):
@@ -101,7 +101,7 @@ def main():
# FIXME parse args and add --kde parameter.
if len(sys.argv)!=3:
print("""\nUsage:
-qtuicompiler filename.ui filename.py\n\n
+tqtuicompiler filename.ui filename.py\n\n
""")
return