Do rename qt=>tqt on source files, directories and libraries.

Rename pyuic=>pytquic, pylupdate=>pytqlupdate.
Do rename qt=>tqt on constants and variables.
Do rename QT=>TQT on constants.

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

@ -19,7 +19,7 @@
# #
# This is the build script for PyTQt. It should be run in the top level # This is the build script for PyTQt. It should be run in the top level
# directory of the source distribution and by the Python interpreter for which # directory of the source distribution and by the Python interpreter for which
# it is being built. It uses either qmake or tmake to do the hard work of # it is being built. It uses either tqmake or tmake to do the hard work of
# generating the platform specific Makefiles. # generating the platform specific Makefiles.
@ -46,14 +46,14 @@ config = sip_tqt_config.SIPConfig("PyTQt 3.18.1")
# Initialise the globals. # Initialise the globals.
sipMajorVersion = config.sip_version >> 16 sipMajorVersion = config.sip_version >> 16
sciIncDir = config.qt_inc_dir sciIncDir = config.tqt_inc_dir
sciLibDir = config.qt_lib_dir sciLibDir = config.tqt_lib_dir
sciLib = None sciLib = None
sciVersion = None sciVersion = None
binDir = config.default_bin_dir binDir = config.default_bin_dir
modDir = config.default_mod_dir modDir = config.default_mod_dir
sipDir = config.default_sip_dir sipDir = config.default_sip_dir
buildModules = ["qt"] buildModules = ["tqt"]
tempBuildDir = None tempBuildDir = None
catCppFiles = 0 catCppFiles = 0
catSplit = 1 catSplit = 1
@ -71,14 +71,14 @@ def usage(rcode = 2):
print(" %s [-h] [-a version] [-b dir] [-c] [-d dir] [-g] [-j #] [-n dir] [-o dir] [-r] [-v dir]" % sip_tqt_config.script()) print(" %s [-h] [-a version] [-b dir] [-c] [-d dir] [-g] [-j #] [-n dir] [-o dir] [-r] [-v dir]" % sip_tqt_config.script())
print("where:") print("where:")
print(" -h display this help message") print(" -h display this help message")
print(" -a tag explicitly enable the qtpe module") print(" -a tag explicitly enable the tqtpe module")
print(" -b dir where pyuic and pylupdate will be installed [default %s]" % config.default_bin_dir) print(" -b dir where pyuic and pylupdate will be installed [default %s]" % config.default_bin_dir)
print(" -c concatenate each module's C++ source files") print(" -c concatenate each module's C++ source files")
print(" -d dir where the PyTQt modules will be installed [default %s]" % config.default_mod_dir) print(" -d dir where the PyTQt modules will be installed [default %s]" % config.default_mod_dir)
print(" -g always release the GIL (SIP-TQt v3.x behaviour)") print(" -g always release the GIL (SIP-TQt v3.x behaviour)")
print(" -j # split the concatenated C++ source files into # pieces [default 1]") print(" -j # split the concatenated C++ source files into # pieces [default 1]")
print(" -n dir the directory containing the TQScintilla header files [default %s]" % config.qt_inc_dir) print(" -n dir the directory containing the TQScintilla header files [default %s]" % config.tqt_inc_dir)
print(" -o dir the directory containing the TQScintilla library [default %s]" % config.qt_lib_dir) print(" -o dir the directory containing the TQScintilla library [default %s]" % config.tqt_lib_dir)
print(" -r generate code with tracing enabled [default disabled]") print(" -r generate code with tracing enabled [default disabled]")
print(" -v dir where the PyTQt .sip files will be installed [default %s]" % config.default_sip_dir) print(" -v dir where the PyTQt .sip files will be installed [default %s]" % config.default_sip_dir)
@ -87,7 +87,7 @@ def usage(rcode = 2):
def mkTempBuildDir(olddir=None): def mkTempBuildDir(olddir=None):
"""Create a temporary build directory for a console application called """Create a temporary build directory for a console application called
qttest, complete with patched Makefile. The global tempBuildDir is set to tqttest, complete with patched Makefile. The global tempBuildDir is set to
the name of the directory. The temporary directory becomes the current the name of the directory. The temporary directory becomes the current
directory. directory.
@ -107,26 +107,26 @@ def mkTempBuildDir(olddir=None):
prevdir = sip_tqt_config.push_dir(tempBuildDir) prevdir = sip_tqt_config.push_dir(tempBuildDir)
sip_tqt_config.copy_to_file("qttest.pro.in", sip_tqt_config.copy_to_file("tqttest.pro.in",
"""TEMPLATE = app """TEMPLATE = app
TARGET = qttest TARGET = tqttest
CONFIG += console warn_off @TEST_OPENGL@ @BLX_CONFIG_APP@ CONFIG += console warn_off @TEST_OPENGL@ @BLX_CONFIG_APP@
INCLUDEPATH = @BLX_INCLUDEPATH@ @TEST_QSCINTILLA_INC@ INCLUDEPATH = @BLX_INCLUDEPATH@ @TEST_TQSCINTILLA_INC@
DEFINES = @BLX_DEFINES@ DEFINES = @BLX_DEFINES@
SOURCES = qttest.cpp SOURCES = tqttest.cpp
LIBS += @TEST_QUI_LIB@ @TEST_QSCINTILLA_LIB@ LIBS += @TEST_TQUI_LIB@ @TEST_TQSCINTILLA_LIB@
""") """)
# Disable OpenGL, tqui and TQScintilla support by default. # Disable OpenGL, tqui and TQScintilla support by default.
config.patches["@TEST_OPENGL@"] = "" config.patches["@TEST_OPENGL@"] = ""
config.patches["@TEST_QUI_LIB@"] = "" config.patches["@TEST_TQUI_LIB@"] = ""
config.patches["@TEST_QSCINTILLA_INC@"] = "" config.patches["@TEST_TQSCINTILLA_INC@"] = ""
config.patches["@TEST_QSCINTILLA_LIB@"] = "" config.patches["@TEST_TQSCINTILLA_LIB@"] = ""
# Create a dummy source file to suppress a qmake warning. # Create a dummy source file to suppress a qmake warning.
sip_tqt_config.copy_to_file("qttest.cpp", "") sip_tqt_config.copy_to_file("tqttest.cpp", "")
config.create_makefile("qttest.pro") config.create_makefile("tqttest.pro")
else: else:
sip_tqt_config.pop_dir(olddir) sip_tqt_config.pop_dir(olddir)
prevdir = None prevdir = None
@ -152,7 +152,7 @@ def tryModule(maindir, mname, incfile, ctor):
if not os.access(msip, os.F_OK): if not os.access(msip, os.F_OK):
return return
sip_tqt_config.copy_to_file("qttest.cpp", sip_tqt_config.copy_to_file("tqttest.cpp",
"""#include <%s> """#include <%s>
int main(int argc,char **argv) int main(int argc,char **argv)
@ -177,7 +177,7 @@ def checkTQScintilla():
sciglobal = os.path.join(sciIncDir, "tqextscintillaglobal.h") sciglobal = os.path.join(sciIncDir, "tqextscintillaglobal.h")
if os.access(sciglobal,os.F_OK): if os.access(sciglobal,os.F_OK):
config.patches["@PYQT_QSCINTILLA_INC@"] = sciIncDir config.patches["@PYTQT_TQSCINTILLA_INC@"] = sciIncDir
sip_tqt_config.inform("%s contains tqextscintillaglobal.h." % (sciIncDir)) sip_tqt_config.inform("%s contains tqextscintillaglobal.h." % (sciIncDir))
@ -209,13 +209,13 @@ def checkTQScintilla():
else: else:
sciLib = sip_tqt_config.escape("-L" + sciLibDir) + " -ltqscintilla" sciLib = sip_tqt_config.escape("-L" + sciLibDir) + " -ltqscintilla"
config.patches["@PYQT_QSCINTILLA_LIB@"] = sciLib config.patches["@PYTQT_TQSCINTILLA_LIB@"] = sciLib
else: else:
sip_tqt_config.inform("The TQScintilla library could not be found in %s and so the qtext module will not be built. If TQScintilla is installed then use the -o argument to explicitly specify the correct directory." % (sciLibDir)) sip_tqt_config.inform("The TQScintilla library could not be found in %s and so the tqtext module will not be built. If TQScintilla is installed then use the -o argument to explicitly specify the correct directory." % (sciLibDir))
sciVersion = -1 sciVersion = -1
else: else:
sip_tqt_config.inform("tqextscintillaglobal.h could not be found in %s and so the qtext module will not be built. If TQScintilla is installed then use the -n argument to explicitly specify the correct directory." % sciIncDir) sip_tqt_config.inform("tqextscintillaglobal.h could not be found in %s and so the tqtext module will not be built. If TQScintilla is installed then use the -n argument to explicitly specify the correct directory." % sciIncDir)
sciVersion = -1 sciVersion = -1
@ -225,54 +225,54 @@ def moduleChecks(maindir):
""" """
sip_tqt_config.inform("Checking which additional PyTQt modules to build."); sip_tqt_config.inform("Checking which additional PyTQt modules to build.");
tryModule(maindir,"qtcanvas", "qcanvas.h", "TQCanvas()") tryModule(maindir,"tqtcanvas", "tqcanvas.h", "TQCanvas()")
tryModule(maindir,"qtnetwork", "qsocket.h", "TQSocket()") tryModule(maindir,"tqtnetwork", "tqsocket.h", "TQSocket()")
tryModule(maindir,"qttable", "qtable.h", "TQTable()") tryModule(maindir,"tqttable", "tqtable.h", "TQTable()")
tryModule(maindir,"qtxml", "qdom.h", "TQDomImplementation()") tryModule(maindir,"tqtxml", "tqdom.h", "TQDomImplementation()")
if config.qt_version >= 0x030000: if config.tqt_version >= 0x030000:
tryModule(maindir,"qtsql", "qsql.h", "TQSql()") tryModule(maindir,"tqtsql", "tqsql.h", "TQSql()")
# We need a different Makefile for the qtgl module. # We need a different Makefile for the tqtgl module.
config.patches["@TEST_OPENGL@"] = "opengl" config.patches["@TEST_OPENGL@"] = "opengl"
config.create_makefile("qttest.pro") config.create_makefile("tqttest.pro")
tryModule(maindir,"qtgl", "qgl.h", "TQGLWidget()") tryModule(maindir,"tqtgl", "tqgl.h", "TQGLWidget()")
# Put things back. # Put things back.
config.patches["@TEST_OPENGL@"] = "" config.patches["@TEST_OPENGL@"] = ""
config.create_makefile("qttest.pro") config.create_makefile("tqttest.pro")
# Check for the tqui library. # Check for the tqui library.
if config.qt_version >= 0x030000: if config.tqt_version >= 0x030000:
if sys.platform == "win32": if sys.platform == "win32":
tquilib = r"$(TQTDIR)\lib\tqui.lib" tquilib = r"$(TQTDIR)\lib\tqui.lib"
else: else:
tquilib = "-ltqui" tquilib = "-ltqui"
config.patches["@PYQT_QUI_LIB@"] = tquilib config.patches["@PYTQT_TQUI_LIB@"] = tquilib
config.patches["@TEST_QUI_LIB@"] = tquilib config.patches["@TEST_TQUI_LIB@"] = tquilib
config.create_makefile("qttest.pro") config.create_makefile("tqttest.pro")
tryModule(maindir,"qtui", "qwidgetfactory.h", "TQWidgetFactory()") tryModule(maindir,"tqtui", "tqwidgetfactory.h", "TQWidgetFactory()")
# Put things back. # Put things back.
config.patches["@TEST_QUI_LIB@"] = "" config.patches["@TEST_TQUI_LIB@"] = ""
config.create_makefile("qttest.pro") config.create_makefile("tqttest.pro")
# Check for the TQScintilla library. # Check for the TQScintilla library.
if sciVersion >= 0: if sciVersion >= 0:
config.patches["@TEST_QSCINTILLA_INC@"] = sciIncDir config.patches["@TEST_TQSCINTILLA_INC@"] = sciIncDir
config.patches["@TEST_QSCINTILLA_LIB@"] = sciLib config.patches["@TEST_TQSCINTILLA_LIB@"] = sciLib
config.create_makefile("qttest.pro") config.create_makefile("tqttest.pro")
tryModule(maindir,"qtext", "tqextscintillabase.h", "TQextScintillaBase()") tryModule(maindir,"tqtext", "tqextscintillabase.h", "TQextScintillaBase()")
# Put things back. # Put things back.
config.patches["@TEST_QSCINTILLA_INC@"] = "" config.patches["@TEST_TQSCINTILLA_INC@"] = ""
config.patches["@TEST_QSCINTILLA_LIB@"] = "" config.patches["@TEST_TQSCINTILLA_LIB@"] = ""
config.create_makefile("qttest.pro") config.create_makefile("tqttest.pro")
def generateFeatures(featfile): def generateFeatures(featfile):
@ -302,7 +302,7 @@ def generateFeatures(featfile):
"WORKSPACE"] "WORKSPACE"]
# Generate the program which will generate the features file. # Generate the program which will generate the features file.
f = open("qttest.cpp","w") f = open("tqttest.cpp","w")
# Escape the backslashes so that the name can be embedded in a C++ string. # Escape the backslashes so that the name can be embedded in a C++ string.
ffstr = string.replace(featfile, "\\", "\\\\") ffstr = string.replace(featfile, "\\", "\\\\")
@ -328,7 +328,7 @@ int main(int argc,char **argv)
#endif #endif
#if (defined(Q_OS_WIN32) || defined(Q_OS_WIN64)) && TQT_VERSION >= 0x030000 #if (defined(Q_OS_WIN32) || defined(Q_OS_WIN64)) && TQT_VERSION >= 0x030000
if (qWinVersion() != TQt::WV_XP) if (tqWinVersion() != TQt::WV_XP)
fprintf(fp,"-x TQt_STYLE_WINDOWSXP\\n"); fprintf(fp,"-x TQt_STYLE_WINDOWSXP\\n");
#endif #endif
""" % (ffstr, ffstr)) """ % (ffstr, ffstr))
@ -352,18 +352,18 @@ int main(int argc,char **argv)
f.close() f.close()
sip_tqt_config.run_make() sip_tqt_config.run_make()
sip_tqt_config.run_program(os.path.join(os.getcwd(), "qttest")) sip_tqt_config.run_program(os.path.join(os.getcwd(), "tqttest"))
sip_tqt_config.run_make("clean") sip_tqt_config.run_make("clean")
sip_tqt_config.inform("Generated the features file.") sip_tqt_config.inform("Generated the features file.")
def generateSource(mname, plattag, qttag, xtrtag): def generateSource(mname, plattag, tqttag, xtrtag):
"""Generate the C++ source code for a particular PyTQt module. """Generate the C++ source code for a particular PyTQt module.
mname is the name of the module. mname is the name of the module.
plattag is the SIP-TQt tag for the platform. plattag is the SIP-TQt tag for the platform.
qttag is the SIP-TQt tag for the TQt version. tqttag is the SIP-TQt tag for the TQt version.
xtrtag is an optional extra SIP-TQt tag. xtrtag is an optional extra SIP-TQt tag.
""" """
sip_tqt_config.inform("Generating the C++ source for the %s module." % mname) sip_tqt_config.inform("Generating the C++ source for the %s module." % mname)
@ -381,7 +381,7 @@ def generateSource(mname, plattag, qttag, xtrtag):
pro = mname + ".pro" pro = mname + ".pro"
argv = ["-t", plattag, argv = ["-t", plattag,
"-t", qttag, "-t", tqttag,
"-z", "features", "-z", "features",
"-I", "sip", "-I", "sip",
"-m", mname + "/" + pro + ".in", "-m", mname + "/" + pro + ".in",
@ -474,8 +474,8 @@ def main(argv):
if opt == "-h": if opt == "-h":
usage(0) usage(0)
elif opt == "-a": elif opt == "-a":
global qpeTag global tqpeTag
qpeTag = arg tqpeTag = arg
elif opt == "-b": elif opt == "-b":
global binDir global binDir
binDir = arg binDir = arg
@ -522,19 +522,19 @@ def main(argv):
sip_tqt_config.error("Please copy the license file %s to the sip directory.\n" % config.license_file) sip_tqt_config.error("Please copy the license file %s to the sip directory.\n" % config.license_file)
# Check the TQt version. # Check the TQt version.
if config.qt_version == 0: if config.tqt_version == 0:
sip_tqt_config.error("SIP-TQt has been built with TQt support disabled.\n") sip_tqt_config.error("SIP-TQt has been built with TQt support disabled.\n")
# Early versions of TQt for the Mac didn't include everything. Rather than # Early versions of TQt for the Mac didn't include everything. Rather than
# maintain these in the future we just mandate a later version. # maintain these in the future we just mandate a later version.
if sys.platform == "darwin" and config.qt_version < 0x030100: if sys.platform == "darwin" and config.tqt_version < 0x030100:
sip_tqt_config.error("PyTQt for MacOS/X requires TQt v3.1.0 or later.\n") sip_tqt_config.error("PyTQt for MacOS/X requires TQt v3.1.0 or later.\n")
# Check the installation directory is valid and add it as a patch. # Check the installation directory is valid and add it as a patch.
if not os.access(modDir,os.F_OK): if not os.access(modDir,os.F_OK):
sip_tqt_config.error("The %s PyTQt destination directory does not seem to exist. Use the -d argument to set the correct directory." % (modDir)) sip_tqt_config.error("The %s PyTQt destination directory does not seem to exist. Use the -d argument to set the correct directory." % (modDir))
config.patches["@PYQT_MODDIR@"] = sip_tqt_config.escape(modDir) config.patches["@PYTQT_MODDIR@"] = sip_tqt_config.escape(modDir)
sip_tqt_config.inform("%s is the PyTQt installation directory." % (modDir)) sip_tqt_config.inform("%s is the PyTQt installation directory." % (modDir))
@ -544,7 +544,7 @@ def main(argv):
else: else:
warn = "warn_off" warn = "warn_off"
config.patches["@PYQT_WARN@"] = warn config.patches["@PYTQT_WARN@"] = warn
# Create patches to allow some modules to link against others. # Create patches to allow some modules to link against others.
if sipMajorVersion >= 4: if sipMajorVersion >= 4:
@ -552,52 +552,52 @@ def main(argv):
elif sys.platform == "win32": elif sys.platform == "win32":
modlink = sip_tqt_config.escape(os.path.join(modDir, "libtqtc.lib")) modlink = sip_tqt_config.escape(os.path.join(modDir, "libtqtc.lib"))
else: else:
modlink = sip_tqt_config.escape("-L" + modDir) + " -lqtcmodule" modlink = sip_tqt_config.escape("-L" + modDir) + " -ltqtcmodule"
config.patches["@PYQT_QT_MODULE@"] = modlink config.patches["@PYTQT_TQT_MODULE@"] = modlink
if sipMajorVersion >= 4: if sipMajorVersion >= 4:
modlink = "" modlink = ""
elif sys.platform == "win32": elif sys.platform == "win32":
modlink = sip_tqt_config.escape(os.path.join(modDir, "libtqttablec.lib")) + " " + sip_tqt_config.escape(os.path.join(modDir, "libtqtc.lib")) modlink = sip_tqt_config.escape(os.path.join(modDir, "libtqttablec.lib")) + " " + sip_tqt_config.escape(os.path.join(modDir, "libtqtc.lib"))
else: else:
modlink = sip_tqt_config.escape("-L" + modDir) + " -lqttablecmodule -lqtcmodule" modlink = sip_tqt_config.escape("-L" + modDir) + " -ltqttablecmodule -ltqtcmodule"
config.patches["@PYQT_QTTABLE_MODULE@"] = modlink config.patches["@PYTQT_TQTTABLE_MODULE@"] = modlink
# The professional edition needs special handling if XML support is needed. # The professional edition needs special handling if XML support is needed.
if config.qt_edition == "professional": if config.tqt_edition == "professional":
rbprof = "rbprof" rbprof = "rbprof"
else: else:
rbprof = "" rbprof = ""
config.patches["@PYQT_RBPROF@"] = rbprof config.patches["@PYTQT_RBPROF@"] = rbprof
# Link in the qassistantclient library for TQt v3.1+. # Link in the qassistantclient library for TQt v3.1+.
qaclib = "" tqaclib = ""
if config.qt_version >= 0x030100: if config.tqt_version >= 0x030100:
if sys.platform == "win32": if sys.platform == "win32":
qaclib = r"$(TQTDIR)\lib\qassistantclient.lib" tqaclib = r"$(TQTDIR)\lib\tqassistantclient.lib"
else: else:
qaclib = "-lqassistantclient" tqaclib = "-ltqassistantclient"
config.patches["@PYQT_QASSISTANTCLIENT_LIB@"] = qaclib config.patches["@PYTQT_QASSISTANTCLIENT_LIB@"] = tqaclib
# Check for TQScintilla. # Check for TQScintilla.
if config.qt_version >= 0x030000: if config.tqt_version >= 0x030000:
checkTQScintilla() checkTQScintilla()
# Create a build directory that we can compile test programs. # Create a build directory that we can compile test programs.
maindir = mkTempBuildDir() maindir = mkTempBuildDir()
# Check what additional modules to build. # Check what additional modules to build.
if config.qt_version >= 0x020000: if config.tqt_version >= 0x020000:
moduleChecks(maindir) moduleChecks(maindir)
# Work out the platform and TQt version tags to pass to SIP-TQt to generate the # Work out the platform and TQt version tags to pass to SIP-TQt to generate the
# code we need. # code we need.
if config.qt_lib == "qte": if config.tqt_lib == "tqte":
plattag = "WS_QWS" plattag = "WS_QWS"
elif sys.platform == "win32": elif sys.platform == "win32":
plattag = "WS_WIN" plattag = "WS_WIN"
@ -606,7 +606,7 @@ def main(argv):
else: else:
plattag = "WS_X11" plattag = "WS_X11"
qttags = { tqttags = {
0x020000: "TQt_1_43", 0x020000: "TQt_1_43",
0x020100: "TQt_2_00", 0x020100: "TQt_2_00",
0x020200: "TQt_2_1_0", 0x020200: "TQt_2_1_0",
@ -626,7 +626,7 @@ def main(argv):
0x040000: "TQt_3_3_0" 0x040000: "TQt_3_3_0"
} }
qttag = versionToTag(config.qt_version, qttags, "TQt") tqttag = versionToTag(config.tqt_version, tqttags, "TQt")
# Work out the TQScintilla tag. # Work out the TQScintilla tag.
if sciVersion >= 0: if sciVersion >= 0:
@ -648,20 +648,20 @@ def main(argv):
subdirs = [] subdirs = []
for mname in buildModules: for mname in buildModules:
if mname == "qtext": if mname == "tqtext":
xtratag = scitag xtratag = scitag
else: else:
xtratag = None xtratag = None
generateSource(mname, plattag, qttag, xtratag) generateSource(mname, plattag, tqttag, xtratag)
subdirs.append(mname) subdirs.append(mname)
# We handle the qtpe module explicitly rather than auto-detect. This is # We handle the tqtpe module explicitly rather than auto-detect. This is
# because it does things a bit differently and I'm too lazy to deal with it # because it does things a bit differently and I'm too lazy to deal with it
# properly at the moment. # properly at the moment.
if qpeTag: if tqpeTag:
generateSource("qtpe", plattag, qttag, qpeTag) generateSource("tqtpe", plattag, tqttag, tqpeTag)
subdirs.append("qtpe") subdirs.append("tqtpe")
# Install the .sip files. # Install the .sip files.
sip_tqt_config.inform("Creating Makefile for .sip files.") sip_tqt_config.inform("Creating Makefile for .sip files.")
@ -683,23 +683,23 @@ def main(argv):
subdirs.append("sip") subdirs.append("sip")
# See which version of pyuic to build. # See which version of pyuic to build.
config.patches["@PYQT_BINDIR@"] = sip_tqt_config.escape(binDir) config.patches["@PYTQT_BINDIR@"] = sip_tqt_config.escape(binDir)
if config.qt_version >= 0x030000: if config.tqt_version >= 0x030000:
sip_tqt_config.inform("Creating Makefile for pyuic3.") sip_tqt_config.inform("Creating Makefile for pytquic3.")
subdirs.append("pyuic3") subdirs.append("pytquic3")
olddir = sip_tqt_config.push_dir("pyuic3") olddir = sip_tqt_config.push_dir("pytquic3")
config.create_makefile("pyuic.pro", []) config.create_makefile("pytquic.pro", [])
sip_tqt_config.pop_dir(olddir) sip_tqt_config.pop_dir(olddir)
# Build pylupdate if TQt v3.0 or later. # Build pylupdate if TQt v3.0 or later.
if config.qt_version >= 0x030000: if config.tqt_version >= 0x030000:
sip_tqt_config.inform("Creating Makefile for pylupdate3.") sip_tqt_config.inform("Creating Makefile for pytqlupdate3.")
subdirs.append("pylupdate3") subdirs.append("pytqlupdate3")
olddir = sip_tqt_config.push_dir("pylupdate3") olddir = sip_tqt_config.push_dir("pytqlupdate3")
config.create_makefile("pylupdate.pro", []) config.create_makefile("pytqlupdate.pro", [])
sip_tqt_config.pop_dir(olddir) sip_tqt_config.pop_dir(olddir)
# Generate the top-level Makefile. # Generate the top-level Makefile.

File diff suppressed because it is too large Load Diff

@ -82,7 +82,7 @@ and run this version of PyTQt.</P
><P ><P
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>qt</TT >tqt</TT
> is the main module and contains the core classes and most > is the main module and contains the core classes and most
user interface widgets.</P user interface widgets.</P
></LI ></LI
@ -90,7 +90,7 @@ user interface widgets.</P
><P ><P
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>qtaxcontainer</TT >tqtaxcontainer</TT
> contains a sub-set of the classes implemented > contains a sub-set of the classes implemented
in TQt's TQAxContainer module, part of TQt's ActiveTQt framework.</P in TQt's TQAxContainer module, part of TQt's ActiveTQt framework.</P
></LI ></LI
@ -98,7 +98,7 @@ in TQt's TQAxContainer module, part of TQt's ActiveTQt framework.</P
><P ><P
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>qtcanvas</TT >tqtcanvas</TT
> contains the classes implemented in TQt's Canvas > contains the classes implemented in TQt's Canvas
module.</P module.</P
></LI ></LI
@ -106,14 +106,14 @@ module.</P
><P ><P
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>qtgl</TT >tqtgl</TT
> contains the classes implemented in TQt's OpenGL module.</P > contains the classes implemented in TQt's OpenGL module.</P
></LI ></LI
><LI ><LI
><P ><P
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>qtnetwork</TT >tqtnetwork</TT
> contains the classes implemented in TQt's Network > contains the classes implemented in TQt's Network
module.</P module.</P
></LI ></LI
@ -121,7 +121,7 @@ module.</P
><P ><P
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>qtpe</TT >tqtpe</TT
> contains the classes implemented in TQtopia (originally > contains the classes implemented in TQtopia (originally
called the TQt Palmtop Environment). It is only supported with TQt/Embedded.</P called the TQt Palmtop Environment). It is only supported with TQt/Embedded.</P
></LI ></LI
@ -129,14 +129,14 @@ called the TQt Palmtop Environment). It is only supported with TQt/Embedded.</P
><P ><P
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>qtsql</TT >tqtsql</TT
> contains the classes implemented in TQt's SQL module.</P > contains the classes implemented in TQt's SQL module.</P
></LI ></LI
><LI ><LI
><P ><P
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>qttable</TT >tqttable</TT
> contains the classes implemented in TQt's Table > contains the classes implemented in TQt's Table
module.</P module.</P
></LI ></LI
@ -144,7 +144,7 @@ module.</P
><P ><P
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>qtui</TT >tqtui</TT
> contains the classes implemented in TQt's tqui library. > contains the classes implemented in TQt's tqui library.
These allow GUIs to be created directly from TQt Designer's These allow GUIs to be created directly from TQt Designer's
<TT <TT
@ -156,14 +156,14 @@ CLASS="LITERAL"
><P ><P
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>qtxml</TT >tqtxml</TT
> contains the classes implemented in TQt's XML module.</P > contains the classes implemented in TQt's XML module.</P
></LI ></LI
><LI ><LI
><P ><P
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>qtext</TT >tqtext</TT
> contains useful third-party classes that are not part > contains useful third-party classes that are not part
of TQt. At the moment it contains bindings for TQScintilla, the port to TQt of of TQt. At the moment it contains bindings for TQScintilla, the port to TQt of
the Scintilla programmer's editor class.</P the Scintilla programmer's editor class.</P
@ -172,11 +172,11 @@ the Scintilla programmer's editor class.</P
><P ><P
>PyTQt also includes the <TT >PyTQt also includes the <TT
CLASS="LITERAL" CLASS="LITERAL"
>pyuic</TT >pytquic</TT
> and > and
<TT <TT
CLASS="LITERAL" CLASS="LITERAL"
>pylupdate</TT >pytqlupdate</TT
> utilities which correspond to the TQt > utilities which correspond to the TQt
<TT <TT
CLASS="LITERAL" CLASS="LITERAL"
@ -187,11 +187,11 @@ CLASS="LITERAL"
> utilities. > utilities.
<TT <TT
CLASS="LITERAL" CLASS="LITERAL"
>pyuic</TT >pytquic</TT
> converts the GUI designs created with TQt Designer to > converts the GUI designs created with TQt Designer to
executable Python code. <TT executable Python code. <TT
CLASS="LITERAL" CLASS="LITERAL"
>pylupdate</TT >pytqlupdate</TT
> scans Python code, > scans Python code,
extracts all strings that are candidates for internationalisation, and creates extracts all strings that are candidates for internationalisation, and creates
an XML file for use by TQt Linguist.</P an XML file for use by TQt Linguist.</P
@ -223,18 +223,18 @@ CLASS="LITERAL"
><P ><P
>PyTQt includes <TT >PyTQt includes <TT
CLASS="LITERAL" CLASS="LITERAL"
>pyuic</TT >pytquic</TT
> which generates Python code from the > which generates Python code from the
same XML. The Python code is self contained and can be executed immediately.</P same XML. The Python code is self contained and can be executed immediately.</P
><P ><P
>It is sometimes useful to be able to include some specific Python code in the >It is sometimes useful to be able to include some specific Python code in the
output generated by <TT output generated by <TT
CLASS="LITERAL" CLASS="LITERAL"
>pyuic</TT >pytquic</TT
>. For example, if you are using >. For example, if you are using
custom widgets, <TT custom widgets, <TT
CLASS="LITERAL" CLASS="LITERAL"
>pyuic</TT >pytquic</TT
> has no way of knowing the name of the > has no way of knowing the name of the
Python module containing the widget and so cannot generate the required Python module containing the widget and so cannot generate the required
<TT <TT
@ -243,7 +243,7 @@ CLASS="LITERAL"
> statement. To help get around this, > statement. To help get around this,
<TT <TT
CLASS="LITERAL" CLASS="LITERAL"
>pyuic</TT >pytquic</TT
> will extract any lines entered in the > will extract any lines entered in the
<TT <TT
CLASS="LITERAL" CLASS="LITERAL"
@ -271,7 +271,7 @@ WIDTH="100%"
><TD ><TD
><PRE ><PRE
CLASS="PROGRAMLISTING" CLASS="PROGRAMLISTING"
>This comment will be ignored by pyuic. >This comment will be ignored by pytquic.
Python: Python:
Python:# Import our custom widget. Python:# Import our custom widget.
Python:from foo import bar</PRE Python:from foo import bar</PRE
@ -281,7 +281,7 @@ Python:from foo import bar</PRE
><P ><P
>Here's the corresponding output from <TT >Here's the corresponding output from <TT
CLASS="LITERAL" CLASS="LITERAL"
>pyuic</TT >pytquic</TT
>.</P >.</P
><TABLE ><TABLE
BORDER="0" BORDER="0"
@ -291,7 +291,7 @@ WIDTH="100%"
><TD ><TD
><PRE ><PRE
CLASS="PROGRAMLISTING" CLASS="PROGRAMLISTING"
>from PyTQt.qt import * >from PyTQt.tqt import *
# Import our custom widget. # Import our custom widget.
from foo import bar</PRE from foo import bar</PRE
@ -301,7 +301,7 @@ from foo import bar</PRE
><P ><P
>Thanks to Christian Bird, <TT >Thanks to Christian Bird, <TT
CLASS="LITERAL" CLASS="LITERAL"
>pyuic</TT >pytquic</TT
> will extract Python code > will extract Python code
entered using TQt Designer to implement slots. In TQt Designer, when you need to entered using TQt Designer to implement slots. In TQt Designer, when you need to
edit a slot and the source editor appears, enter Python code between the curly edit a slot and the source editor appears, enter Python code between the curly
@ -317,7 +317,7 @@ CLASS="LITERAL"
>.ui</TT >.ui</TT
> file when using <TT > file when using <TT
CLASS="LITERAL" CLASS="LITERAL"
>pyuic</TT >pytquic</TT
>. The >. The
<TT <TT
CLASS="LITERAL" CLASS="LITERAL"
@ -348,7 +348,7 @@ if self.debugging:
><P ><P
>Here is the resulting code when <TT >Here is the resulting code when <TT
CLASS="LITERAL" CLASS="LITERAL"
>pyuic</TT >pytquic</TT
> is run.</P > is run.</P
><TABLE ><TABLE
BORDER="0" BORDER="0"
@ -413,7 +413,7 @@ your application.</P
><P ><P
>Thanks to Detlev Offenbach, PyTQt includes the <TT >Thanks to Detlev Offenbach, PyTQt includes the <TT
CLASS="LITERAL" CLASS="LITERAL"
>pylupdate</TT >pytqlupdate</TT
> >
program. This generates the same <TT program. This generates the same <TT
CLASS="LITERAL" CLASS="LITERAL"
@ -467,7 +467,7 @@ CLASS="SECT1"
NAME="AEN153" NAME="AEN153"
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>pyqtconfig</TT >pytqtconfig</TT
> and Build System Support</A > and Build System Support</A
></H2 ></H2
><P ><P
@ -477,14 +477,14 @@ CLASS="LITERAL"
> module) is described > module) is described
in the SIP documentation. PyTQt includes the <TT in the SIP documentation. PyTQt includes the <TT
CLASS="LITERAL" CLASS="LITERAL"
>pyqtconfig</TT >pytqtconfig</TT
> >
module that can be used by configuration scripts of other bindings that are module that can be used by configuration scripts of other bindings that are
built on top of PyTQt.</P built on top of PyTQt.</P
><P ><P
>The <TT >The <TT
CLASS="LITERAL" CLASS="LITERAL"
>pyqtconfig</TT >pytqtconfig</TT
> module contains the following classes:</P > module contains the following classes:</P
><P ><P
></P ></P
@ -514,17 +514,17 @@ CLASS="VARIABLELIST"
><DT ><DT
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>pyqt_bin_dir</TT >pytqt_bin_dir</TT
></DT ></DT
><DD ><DD
><P ><P
>The name of the directory containing the <TT >The name of the directory containing the <TT
CLASS="LITERAL" CLASS="LITERAL"
>pyuic</TT >pytquic</TT
> and > and
<TT <TT
CLASS="LITERAL" CLASS="LITERAL"
>pylupdate</TT >pytqlupdate</TT
> executables.</P > executables.</P
><P ><P
></P ></P
@ -534,7 +534,7 @@ CLASS="LITERAL"
><DT ><DT
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>pyqt_mod_dir</TT >pytqt_mod_dir</TT
></DT ></DT
><DD ><DD
><P ><P
@ -547,7 +547,7 @@ CLASS="LITERAL"
><DT ><DT
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>pyqt_modules</TT >pytqt_modules</TT
></DT ></DT
><DD ><DD
><P ><P
@ -560,18 +560,18 @@ CLASS="LITERAL"
><DT ><DT
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>pyqt_qt_sip_flags</TT >pytqt_tqt_sip_flags</TT
></DT ></DT
><DD ><DD
><P ><P
>A string of the SIP flags used to generate the code for the >A string of the SIP flags used to generate the code for the
<TT <TT
CLASS="LITERAL" CLASS="LITERAL"
>qt</TT >tqt</TT
> module and which should be added to those needed by any > module and which should be added to those needed by any
module that imports the <TT module that imports the <TT
CLASS="LITERAL" CLASS="LITERAL"
>qt</TT >tqt</TT
> module.</P > module.</P
><P ><P
></P ></P
@ -581,18 +581,18 @@ CLASS="LITERAL"
><DT ><DT
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>pyqt_qtaxcontainer_sip_flags</TT >pytqt_tqtaxcontainer_sip_flags</TT
></DT ></DT
><DD ><DD
><P ><P
>A string of the SIP flags used to generate the code for the >A string of the SIP flags used to generate the code for the
<TT <TT
CLASS="LITERAL" CLASS="LITERAL"
>qtaxcontainer</TT >tqtaxcontainer</TT
> module and which should be added to those > module and which should be added to those
needed by any module that imports the <TT needed by any module that imports the <TT
CLASS="LITERAL" CLASS="LITERAL"
>qtaxcontainer</TT >tqtaxcontainer</TT
> module.</P > module.</P
><P ><P
></P ></P
@ -602,18 +602,18 @@ CLASS="LITERAL"
><DT ><DT
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>pyqt_qtcanvas_sip_flags</TT >pytqt_tqtcanvas_sip_flags</TT
></DT ></DT
><DD ><DD
><P ><P
>A string of the SIP flags used to generate the code for the >A string of the SIP flags used to generate the code for the
<TT <TT
CLASS="LITERAL" CLASS="LITERAL"
>qtcanvas</TT >tqtcanvas</TT
> module and which should be added to those needed by > module and which should be added to those needed by
any module that imports the <TT any module that imports the <TT
CLASS="LITERAL" CLASS="LITERAL"
>qtcanvas</TT >tqtcanvas</TT
> module.</P > module.</P
><P ><P
></P ></P
@ -623,18 +623,18 @@ CLASS="LITERAL"
><DT ><DT
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>pyqt_qtext_sip_flags</TT >pytqt_tqtext_sip_flags</TT
></DT ></DT
><DD ><DD
><P ><P
>A string of the SIP flags used to generate the code for the >A string of the SIP flags used to generate the code for the
<TT <TT
CLASS="LITERAL" CLASS="LITERAL"
>qtext</TT >tqtext</TT
> module and which should be added to those needed by > module and which should be added to those needed by
any module that imports the <TT any module that imports the <TT
CLASS="LITERAL" CLASS="LITERAL"
>qtext</TT >tqtext</TT
> module.</P > module.</P
><P ><P
></P ></P
@ -644,18 +644,18 @@ CLASS="LITERAL"
><DT ><DT
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>pyqt_qtgl_sip_flags</TT >pytqt_tqtgl_sip_flags</TT
></DT ></DT
><DD ><DD
><P ><P
>A string of the SIP flags used to generate the code for the >A string of the SIP flags used to generate the code for the
<TT <TT
CLASS="LITERAL" CLASS="LITERAL"
>qtgl</TT >tqtgl</TT
> module and which should be added to those needed by any > module and which should be added to those needed by any
module that imports the <TT module that imports the <TT
CLASS="LITERAL" CLASS="LITERAL"
>qtgl</TT >tqtgl</TT
> module.</P > module.</P
><P ><P
></P ></P
@ -665,18 +665,18 @@ CLASS="LITERAL"
><DT ><DT
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>pyqt_qtnetwork_sip_flags</TT >pytqt_tqtnetwork_sip_flags</TT
></DT ></DT
><DD ><DD
><P ><P
>A string of the SIP flags used to generate the code for the >A string of the SIP flags used to generate the code for the
<TT <TT
CLASS="LITERAL" CLASS="LITERAL"
>qtnetwork</TT >tqtnetwork</TT
> module and which should be added to those needed > module and which should be added to those needed
by any module that imports the <TT by any module that imports the <TT
CLASS="LITERAL" CLASS="LITERAL"
>qtnetwork</TT >tqtnetwork</TT
> module.</P > module.</P
><P ><P
></P ></P
@ -686,18 +686,18 @@ CLASS="LITERAL"
><DT ><DT
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>pyqt_qtsql_sip_flags</TT >pytqt_tqtsql_sip_flags</TT
></DT ></DT
><DD ><DD
><P ><P
>A string of the SIP flags used to generate the code for the >A string of the SIP flags used to generate the code for the
<TT <TT
CLASS="LITERAL" CLASS="LITERAL"
>qtsql</TT >tqtsql</TT
> module and which should be added to those needed by > module and which should be added to those needed by
any module that imports the <TT any module that imports the <TT
CLASS="LITERAL" CLASS="LITERAL"
>qtsql</TT >tqtsql</TT
> module.</P > module.</P
><P ><P
></P ></P
@ -707,18 +707,18 @@ CLASS="LITERAL"
><DT ><DT
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>pyqt_qttable_sip_flags</TT >pytqt_tqttable_sip_flags</TT
></DT ></DT
><DD ><DD
><P ><P
>A string of the SIP flags used to generate the code for the >A string of the SIP flags used to generate the code for the
<TT <TT
CLASS="LITERAL" CLASS="LITERAL"
>qttable</TT >tqttable</TT
> module and which should be added to those needed by > module and which should be added to those needed by
any module that imports the <TT any module that imports the <TT
CLASS="LITERAL" CLASS="LITERAL"
>qttable</TT >tqttable</TT
> module.</P > module.</P
><P ><P
></P ></P
@ -728,18 +728,18 @@ CLASS="LITERAL"
><DT ><DT
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>pyqt_qtui_sip_flags</TT >pytqt_tqtui_sip_flags</TT
></DT ></DT
><DD ><DD
><P ><P
>A string of the SIP flags used to generate the code for the >A string of the SIP flags used to generate the code for the
<TT <TT
CLASS="LITERAL" CLASS="LITERAL"
>qtui</TT >tqtui</TT
> module and which should be added to those needed by any > module and which should be added to those needed by any
module that imports the <TT module that imports the <TT
CLASS="LITERAL" CLASS="LITERAL"
>qtui</TT >tqtui</TT
> module.</P > module.</P
><P ><P
></P ></P
@ -749,18 +749,18 @@ CLASS="LITERAL"
><DT ><DT
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>pyqt_qtxml_sip_flags</TT >pytqt_tqtxml_sip_flags</TT
></DT ></DT
><DD ><DD
><P ><P
>A string of the SIP flags used to generate the code for the >A string of the SIP flags used to generate the code for the
<TT <TT
CLASS="LITERAL" CLASS="LITERAL"
>qtxml</TT >tqtxml</TT
> module and which should be added to those needed by > module and which should be added to those needed by
any module that imports the <TT any module that imports the <TT
CLASS="LITERAL" CLASS="LITERAL"
>qtxml</TT >tqtxml</TT
> module.</P > module.</P
><P ><P
></P ></P
@ -770,7 +770,7 @@ CLASS="LITERAL"
><DT ><DT
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>pyqt_sip_dir</TT >pytqt_sip_dir</TT
></DT ></DT
><DD ><DD
><P ><P
@ -788,7 +788,7 @@ the module.</P
><DT ><DT
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>pyqt_version</TT >pytqt_version</TT
></DT ></DT
><DD ><DD
><P ><P
@ -805,7 +805,7 @@ CLASS="LITERAL"
><DT ><DT
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>pyqt_version_str</TT >pytqt_version_str</TT
></DT ></DT
><DD ><DD
><P ><P
@ -831,7 +831,7 @@ CLASS="LITERAL"
><P ><P
>The Makefile class for modules that import the <TT >The Makefile class for modules that import the <TT
CLASS="LITERAL" CLASS="LITERAL"
>qt</TT >tqt</TT
> module.</P > module.</P
><P ><P
></P ></P
@ -866,7 +866,7 @@ CLASS="LITERAL"
><P ><P
>The Makefile class for modules that import the <TT >The Makefile class for modules that import the <TT
CLASS="LITERAL" CLASS="LITERAL"
>qtaxcontainer</TT >tqtaxcontainer</TT
> >
module.</P module.</P
><P ><P
@ -902,7 +902,7 @@ CLASS="LITERAL"
><P ><P
>The Makefile class for modules that import the <TT >The Makefile class for modules that import the <TT
CLASS="LITERAL" CLASS="LITERAL"
>qtcanvas</TT >tqtcanvas</TT
> >
module.</P module.</P
><P ><P
@ -938,7 +938,7 @@ CLASS="LITERAL"
><P ><P
>The Makefile class for modules that import the <TT >The Makefile class for modules that import the <TT
CLASS="LITERAL" CLASS="LITERAL"
>qtext</TT >tqtext</TT
> module.</P > module.</P
><P ><P
></P ></P
@ -973,7 +973,7 @@ CLASS="LITERAL"
><P ><P
>The Makefile class for modules that import the <TT >The Makefile class for modules that import the <TT
CLASS="LITERAL" CLASS="LITERAL"
>qtgl</TT >tqtgl</TT
> module.</P > module.</P
><P ><P
></P ></P
@ -1008,7 +1008,7 @@ CLASS="LITERAL"
><P ><P
>The Makefile class for modules that import the <TT >The Makefile class for modules that import the <TT
CLASS="LITERAL" CLASS="LITERAL"
>qtnetwork</TT >tqtnetwork</TT
> >
module.</P module.</P
><P ><P
@ -1044,7 +1044,7 @@ CLASS="LITERAL"
><P ><P
>The Makefile class for modules that import the <TT >The Makefile class for modules that import the <TT
CLASS="LITERAL" CLASS="LITERAL"
>qttable</TT >tqttable</TT
> >
module.</P module.</P
><P ><P
@ -1080,7 +1080,7 @@ CLASS="LITERAL"
><P ><P
>The Makefile class for modules that import the <TT >The Makefile class for modules that import the <TT
CLASS="LITERAL" CLASS="LITERAL"
>qtsql</TT >tqtsql</TT
> module.</P > module.</P
><P ><P
></P ></P
@ -1115,7 +1115,7 @@ CLASS="LITERAL"
><P ><P
>The Makefile class for modules that import the <TT >The Makefile class for modules that import the <TT
CLASS="LITERAL" CLASS="LITERAL"
>qtui</TT >tqtui</TT
> module.</P > module.</P
><P ><P
></P ></P
@ -1150,7 +1150,7 @@ CLASS="LITERAL"
><P ><P
>The Makefile class for modules that import the <TT >The Makefile class for modules that import the <TT
CLASS="LITERAL" CLASS="LITERAL"
>qtxml</TT >tqtxml</TT
> module.</P > module.</P
><P ><P
></P ></P
@ -1751,7 +1751,7 @@ CLASS="PROGRAMLISTING"
><P ><P
>Note that the code generated by <TT >Note that the code generated by <TT
CLASS="LITERAL" CLASS="LITERAL"
>pyuic</TT >pytquic</TT
> uses > uses
<TT <TT
CLASS="LITERAL" CLASS="LITERAL"
@ -1982,7 +1982,7 @@ CLASS="SECT1"
NAME="AEN632" NAME="AEN632"
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>qt</TT >tqt</TT
> Module Reference</A > Module Reference</A
></H2 ></H2
><DIV ><DIV
@ -10048,7 +10048,7 @@ CLASS="SECT1"
NAME="AEN3784" NAME="AEN3784"
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>qtaxcontainer</TT >tqtaxcontainer</TT
> Module Reference</A > Module Reference</A
></H2 ></H2
><DIV ><DIV
@ -10140,7 +10140,7 @@ CLASS="LITERAL"
> module to manipulate objects > module to manipulate objects
created by the <TT created by the <TT
CLASS="LITERAL" CLASS="LITERAL"
>qtaxcontainer</TT >tqtaxcontainer</TT
> module.</P > module.</P
><P ><P
>The <TT >The <TT
@ -10243,7 +10243,7 @@ CLASS="SECT1"
NAME="AEN3860" NAME="AEN3860"
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>qtcanvas</TT >tqtcanvas</TT
> Module Reference</A > Module Reference</A
></H2 ></H2
><DIV ><DIV
@ -10493,7 +10493,7 @@ CLASS="SECT1"
NAME="AEN3937" NAME="AEN3937"
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>qtext</TT >tqtext</TT
> Module Reference</A > Module Reference</A
></H2 ></H2
><DIV ><DIV
@ -10943,7 +10943,7 @@ CLASS="SECT1"
NAME="AEN4076" NAME="AEN4076"
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>qtgl</TT >tqtgl</TT
> Module Reference</A > Module Reference</A
></H2 ></H2
><DIV ><DIV
@ -11035,7 +11035,7 @@ CLASS="SECT1"
NAME="AEN4107" NAME="AEN4107"
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>qtnetwork</TT >tqtnetwork</TT
> Module Reference</A > Module Reference</A
></H2 ></H2
><DIV ><DIV
@ -11410,7 +11410,7 @@ CLASS="SECT1"
NAME="AEN4243" NAME="AEN4243"
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>qtpe</TT >tqtpe</TT
> Module Reference</A > Module Reference</A
></H2 ></H2
><DIV ><DIV
@ -11739,7 +11739,7 @@ CLASS="SECT1"
NAME="AEN4343" NAME="AEN4343"
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>qtsql</TT >tqtsql</TT
> Module Reference</A > Module Reference</A
></H2 ></H2
><DIV ><DIV
@ -12192,7 +12192,7 @@ CLASS="SECT1"
NAME="AEN4486" NAME="AEN4486"
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>qttable</TT >tqttable</TT
> Module Reference</A > Module Reference</A
></H2 ></H2
><DIV ><DIV
@ -12274,7 +12274,7 @@ CLASS="SECT1"
NAME="AEN4509" NAME="AEN4509"
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>qtui</TT >tqtui</TT
> Module Reference</A > Module Reference</A
></H2 ></H2
><DIV ><DIV
@ -12300,7 +12300,7 @@ CLASS="SECT1"
NAME="AEN4516" NAME="AEN4516"
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
>qtxml</TT >tqtxml</TT
> Module Reference</A > Module Reference</A
></H2 ></H2
><DIV ><DIV

@ -54,61 +54,61 @@ The bindings are implemented as a number of Python modules
<ItemizedList> <ItemizedList>
<ListItem> <ListItem>
<Para> <Para>
<Literal>qt</Literal> is the main module and contains the core classes and most <Literal>tqt</Literal> is the main module and contains the core classes and most
user interface widgets. user interface widgets.
</Para> </Para>
</ListItem> </ListItem>
<ListItem> <ListItem>
<Para> <Para>
<Literal>qtaxcontainer</Literal> contains a sub-set of the classes implemented <Literal>tqtaxcontainer</Literal> contains a sub-set of the classes implemented
in TQt's TQAxContainer module, part of TQt's ActiveTQt framework. in TQt's TQAxContainer module, part of TQt's ActiveTQt framework.
</Para> </Para>
</ListItem> </ListItem>
<ListItem> <ListItem>
<Para> <Para>
<Literal>qtcanvas</Literal> contains the classes implemented in TQt's Canvas <Literal>tqtcanvas</Literal> contains the classes implemented in TQt's Canvas
module. module.
</Para> </Para>
</ListItem> </ListItem>
<ListItem> <ListItem>
<Para> <Para>
<Literal>qtgl</Literal> contains the classes implemented in TQt's OpenGL module. <Literal>tqtgl</Literal> contains the classes implemented in TQt's OpenGL module.
</Para> </Para>
</ListItem> </ListItem>
<ListItem> <ListItem>
<Para> <Para>
<Literal>qtnetwork</Literal> contains the classes implemented in TQt's Network <Literal>tqtnetwork</Literal> contains the classes implemented in TQt's Network
module. module.
</Para> </Para>
</ListItem> </ListItem>
<ListItem> <ListItem>
<Para> <Para>
<Literal>qtpe</Literal> contains the classes implemented in TQtopia (originally <Literal>tqtpe</Literal> contains the classes implemented in TQtopia (originally
called the TQt Palmtop Environment). It is only supported with TQt/Embedded. called the TQt Palmtop Environment). It is only supported with TQt/Embedded.
</Para> </Para>
</ListItem> </ListItem>
<ListItem> <ListItem>
<Para> <Para>
<Literal>qtsql</Literal> contains the classes implemented in TQt's SQL module. <Literal>tqtsql</Literal> contains the classes implemented in TQt's SQL module.
</Para> </Para>
</ListItem> </ListItem>
<ListItem> <ListItem>
<Para> <Para>
<Literal>qttable</Literal> contains the classes implemented in TQt's Table <Literal>tqttable</Literal> contains the classes implemented in TQt's Table
module. module.
</Para> </Para>
</ListItem> </ListItem>
<ListItem> <ListItem>
<Para> <Para>
<Literal>qtui</Literal> contains the classes implemented in TQt's tqui library. <Literal>tqtui</Literal> contains the classes implemented in TQt's tqui library.
These allow GUIs to be created directly from TQt Designer's These allow GUIs to be created directly from TQt Designer's
<Literal>.ui</Literal> files. <Literal>.ui</Literal> files.
</Para> </Para>
@ -116,13 +116,13 @@ These allow GUIs to be created directly from TQt Designer's
<ListItem> <ListItem>
<Para> <Para>
<Literal>qtxml</Literal> contains the classes implemented in TQt's XML module. <Literal>tqtxml</Literal> contains the classes implemented in TQt's XML module.
</Para> </Para>
</ListItem> </ListItem>
<ListItem> <ListItem>
<Para> <Para>
<Literal>qtext</Literal> contains useful third-party classes that are not part <Literal>tqtext</Literal> contains useful third-party classes that are not part
of TQt. At the moment it contains bindings for TQScintilla, the port to TQt of of TQt. At the moment it contains bindings for TQScintilla, the port to TQt of
the Scintilla programmer's editor class. the Scintilla programmer's editor class.
</Para> </Para>
@ -130,11 +130,11 @@ the Scintilla programmer's editor class.
</ItemizedList> </ItemizedList>
<Para> <Para>
PyTQt also includes the <Literal>pyuic</Literal> and PyTQt also includes the <Literal>pytquic</Literal> and
<Literal>pylupdate</Literal> utilities which correspond to the TQt <Literal>pytqlupdate</Literal> utilities which correspond to the TQt
<Literal>uic</Literal> and <Literal>lupdate</Literal> utilities. <Literal>uic</Literal> and <Literal>lupdate</Literal> utilities.
<Literal>pyuic</Literal> converts the GUI designs created with TQt Designer to <Literal>pytquic</Literal> converts the GUI designs created with TQt Designer to
executable Python code. <Literal>pylupdate</Literal> scans Python code, executable Python code. <Literal>pytqlupdate</Literal> scans Python code,
extracts all strings that are candidates for internationalisation, and creates extracts all strings that are candidates for internationalisation, and creates
an XML file for use by TQt Linguist. an XML file for use by TQt Linguist.
</Para> </Para>
@ -196,7 +196,7 @@ The missing <Literal>MacintoshVersion</Literal> enum has been added.
<ListItem> <ListItem>
<Para> <Para>
<Literal>PYQT_BUILD</Literal> has been removed. <Literal>PYTQT_BUILD</Literal> has been removed.
</Para> </Para>
</ListItem> </ListItem>
@ -223,17 +223,17 @@ It generates an XML description of a GUI design. TQt includes
</Para> </Para>
<Para> <Para>
PyTQt includes <Literal>pyuic</Literal> which generates Python code from the PyTQt includes <Literal>pytquic</Literal> which generates Python code from the
same XML. The Python code is self contained and can be executed immediately. same XML. The Python code is self contained and can be executed immediately.
</Para> </Para>
<Para> <Para>
It is sometimes useful to be able to include some specific Python code in the It is sometimes useful to be able to include some specific Python code in the
output generated by <Literal>pyuic</Literal>. For example, if you are using output generated by <Literal>pytquic</Literal>. For example, if you are using
custom widgets, <Literal>pyuic</Literal> has no way of knowing the name of the custom widgets, <Literal>pytquic</Literal> has no way of knowing the name of the
Python module containing the widget and so cannot generate the required Python module containing the widget and so cannot generate the required
<Literal>import</Literal> statement. To help get around this, <Literal>import</Literal> statement. To help get around this,
<Literal>pyuic</Literal> will extract any lines entered in the <Literal>pytquic</Literal> will extract any lines entered in the
<Literal>Comment</Literal> field of TQt Designer's <Literal>Comment</Literal> field of TQt Designer's
<Literal>Form Settings</Literal> dialog that begin with <Literal>Form Settings</Literal> dialog that begin with
<Literal>Python:</Literal> and copies them to the generated output. <Literal>Python:</Literal> and copies them to the generated output.
@ -245,25 +245,25 @@ field.
</Para> </Para>
<ProgramListing> <ProgramListing>
This comment will be ignored by pyuic. This comment will be ignored by pytquic.
Python: Python:
Python:# Import our custom widget. Python:# Import our custom widget.
Python:from foo import bar Python:from foo import bar
</ProgramListing> </ProgramListing>
<Para> <Para>
Here's the corresponding output from <Literal>pyuic</Literal>. Here's the corresponding output from <Literal>pytquic</Literal>.
</Para> </Para>
<ProgramListing> <ProgramListing>
from PyTQt.qt import * from PyTQt.tqt import *
# Import our custom widget. # Import our custom widget.
from foo import bar from foo import bar
</ProgramListing> </ProgramListing>
<Para> <Para>
Thanks to Christian Bird, <Literal>pyuic</Literal> will extract Python code Thanks to Christian Bird, <Literal>pytquic</Literal> will extract Python code
entered using TQt Designer to implement slots. In TQt Designer, when you need to entered using TQt Designer to implement slots. In TQt Designer, when you need to
edit a slot and the source editor appears, enter Python code between the curly edit a slot and the source editor appears, enter Python code between the curly
braces. Don't worry about the correct starting indent level, each line is braces. Don't worry about the correct starting indent level, each line is
@ -272,7 +272,7 @@ prepended with a correct indentation.
<Para> <Para>
Make sure that the <Literal>ui.h</Literal> file is in the same directory as the Make sure that the <Literal>ui.h</Literal> file is in the same directory as the
<Literal>.ui</Literal> file when using <Literal>pyuic</Literal>. The <Literal>.ui</Literal> file when using <Literal>pytquic</Literal>. The
<Literal>.ui</Literal> file implies the name of the <Literal>.ui.h</Literal> <Literal>.ui</Literal> file implies the name of the <Literal>.ui.h</Literal>
file so there is no need to specify it on the command line. file so there is no need to specify it on the command line.
</Para> </Para>
@ -290,7 +290,7 @@ if self.debugging:
</ProgramListing> </ProgramListing>
<Para> <Para>
Here is the resulting code when <Literal>pyuic</Literal> is run. Here is the resulting code when <Literal>pytquic</Literal> is run.
</Para> </Para>
<ProgramListing> <ProgramListing>
@ -324,7 +324,7 @@ your application.
</Para> </Para>
<Para> <Para>
Thanks to Detlev Offenbach, PyTQt includes the <Literal>pylupdate</Literal> Thanks to Detlev Offenbach, PyTQt includes the <Literal>pytqlupdate</Literal>
program. This generates the same <Literal>.ts</Literal> language source files program. This generates the same <Literal>.ts</Literal> language source files
from your PyTQt source files. from your PyTQt source files.
</Para> </Para>
@ -358,16 +358,16 @@ In order to build PyTQt with support for the VendorID package, pass the
</Para> </Para>
</Sect1> </Sect1>
<Sect1><Title><Literal>pyqtconfig</Literal> and Build System Support</Title> <Sect1><Title><Literal>pytqtconfig</Literal> and Build System Support</Title>
<Para> <Para>
The SIP build system (ie. the <Literal>sipconfig</Literal> module) is described The SIP build system (ie. the <Literal>sipconfig</Literal> module) is described
in the SIP documentation. PyTQt includes the <Literal>pyqtconfig</Literal> in the SIP documentation. PyTQt includes the <Literal>pytqtconfig</Literal>
module that can be used by configuration scripts of other bindings that are module that can be used by configuration scripts of other bindings that are
built on top of PyTQt. built on top of PyTQt.
</Para> </Para>
<Para> <Para>
The <Literal>pyqtconfig</Literal> module contains the following classes: The <Literal>pytqtconfig</Literal> module contains the following classes:
</Para> </Para>
<VariableList> <VariableList>
@ -386,18 +386,18 @@ by the <Literal>sipconfig.Configuration</Literal> class):
<VariableList> <VariableList>
<VarListEntry> <VarListEntry>
<Term><Literal>pyqt_bin_dir</Literal></Term> <Term><Literal>pytqt_bin_dir</Literal></Term>
<ListItem> <ListItem>
<Para> <Para>
The name of the directory containing the <Literal>pyuic</Literal> and The name of the directory containing the <Literal>pytquic</Literal> and
<Literal>pylupdate</Literal> executables. <Literal>pytqlupdate</Literal> executables.
</Para> </Para>
<Para></Para><Para></Para> <Para></Para><Para></Para>
</ListItem> </ListItem>
</VarListEntry> </VarListEntry>
<VarListEntry> <VarListEntry>
<Term><Literal>pyqt_config_args</Literal></Term> <Term><Literal>pytqt_config_args</Literal></Term>
<ListItem> <ListItem>
<Para> <Para>
The command line passed to <Literal>configure.py</Literal> when PyTQt was The command line passed to <Literal>configure.py</Literal> when PyTQt was
@ -408,7 +408,7 @@ configured.
</VarListEntry> </VarListEntry>
<VarListEntry> <VarListEntry>
<Term><Literal>pyqt_mod_dir</Literal></Term> <Term><Literal>pytqt_mod_dir</Literal></Term>
<ListItem> <ListItem>
<Para> <Para>
The name of the directory containing the PyTQt modules. The name of the directory containing the PyTQt modules.
@ -418,7 +418,7 @@ The name of the directory containing the PyTQt modules.
</VarListEntry> </VarListEntry>
<VarListEntry> <VarListEntry>
<Term><Literal>pyqt_modules</Literal></Term> <Term><Literal>pytqt_modules</Literal></Term>
<ListItem> <ListItem>
<Para> <Para>
A string containing the names of the PyTQt modules that were installed. A string containing the names of the PyTQt modules that were installed.
@ -428,127 +428,127 @@ A string containing the names of the PyTQt modules that were installed.
</VarListEntry> </VarListEntry>
<VarListEntry> <VarListEntry>
<Term><Literal>pyqt_qt_sip_flags</Literal></Term> <Term><Literal>pytqt_tqt_sip_flags</Literal></Term>
<ListItem> <ListItem>
<Para> <Para>
A string of the SIP flags used to generate the code for the A string of the SIP flags used to generate the code for the
<Literal>qt</Literal> module and which should be added to those needed by any <Literal>tqt</Literal> module and which should be added to those needed by any
module that imports the <Literal>qt</Literal> module. module that imports the <Literal>tqt</Literal> module.
</Para> </Para>
<Para></Para><Para></Para> <Para></Para><Para></Para>
</ListItem> </ListItem>
</VarListEntry> </VarListEntry>
<VarListEntry> <VarListEntry>
<Term><Literal>pyqt_qtaxcontainer_sip_flags</Literal></Term> <Term><Literal>pytqt_tqtaxcontainer_sip_flags</Literal></Term>
<ListItem> <ListItem>
<Para> <Para>
A string of the SIP flags used to generate the code for the A string of the SIP flags used to generate the code for the
<Literal>qtaxcontainer</Literal> module and which should be added to those <Literal>tqtaxcontainer</Literal> module and which should be added to those
needed by any module that imports the <Literal>qtaxcontainer</Literal> module. needed by any module that imports the <Literal>tqtaxcontainer</Literal> module.
</Para> </Para>
<Para></Para><Para></Para> <Para></Para><Para></Para>
</ListItem> </ListItem>
</VarListEntry> </VarListEntry>
<VarListEntry> <VarListEntry>
<Term><Literal>pyqt_qtcanvas_sip_flags</Literal></Term> <Term><Literal>pytqt_tqtcanvas_sip_flags</Literal></Term>
<ListItem> <ListItem>
<Para> <Para>
A string of the SIP flags used to generate the code for the A string of the SIP flags used to generate the code for the
<Literal>qtcanvas</Literal> module and which should be added to those needed by <Literal>tqtcanvas</Literal> module and which should be added to those needed by
any module that imports the <Literal>qtcanvas</Literal> module. any module that imports the <Literal>tqtcanvas</Literal> module.
</Para> </Para>
<Para></Para><Para></Para> <Para></Para><Para></Para>
</ListItem> </ListItem>
</VarListEntry> </VarListEntry>
<VarListEntry> <VarListEntry>
<Term><Literal>pyqt_qtext_sip_flags</Literal></Term> <Term><Literal>pytqt_tqtext_sip_flags</Literal></Term>
<ListItem> <ListItem>
<Para> <Para>
A string of the SIP flags used to generate the code for the A string of the SIP flags used to generate the code for the
<Literal>qtext</Literal> module and which should be added to those needed by <Literal>tqtext</Literal> module and which should be added to those needed by
any module that imports the <Literal>qtext</Literal> module. any module that imports the <Literal>tqtext</Literal> module.
</Para> </Para>
<Para></Para><Para></Para> <Para></Para><Para></Para>
</ListItem> </ListItem>
</VarListEntry> </VarListEntry>
<VarListEntry> <VarListEntry>
<Term><Literal>pyqt_qtgl_sip_flags</Literal></Term> <Term><Literal>pytqt_tqtgl_sip_flags</Literal></Term>
<ListItem> <ListItem>
<Para> <Para>
A string of the SIP flags used to generate the code for the A string of the SIP flags used to generate the code for the
<Literal>qtgl</Literal> module and which should be added to those needed by any <Literal>tqtgl</Literal> module and which should be added to those needed by any
module that imports the <Literal>qtgl</Literal> module. module that imports the <Literal>tqtgl</Literal> module.
</Para> </Para>
<Para></Para><Para></Para> <Para></Para><Para></Para>
</ListItem> </ListItem>
</VarListEntry> </VarListEntry>
<VarListEntry> <VarListEntry>
<Term><Literal>pyqt_qtnetwork_sip_flags</Literal></Term> <Term><Literal>pytqt_tqtnetwork_sip_flags</Literal></Term>
<ListItem> <ListItem>
<Para> <Para>
A string of the SIP flags used to generate the code for the A string of the SIP flags used to generate the code for the
<Literal>qtnetwork</Literal> module and which should be added to those needed <Literal>tqtnetwork</Literal> module and which should be added to those needed
by any module that imports the <Literal>qtnetwork</Literal> module. by any module that imports the <Literal>tqtnetwork</Literal> module.
</Para> </Para>
<Para></Para><Para></Para> <Para></Para><Para></Para>
</ListItem> </ListItem>
</VarListEntry> </VarListEntry>
<VarListEntry> <VarListEntry>
<Term><Literal>pyqt_qtsql_sip_flags</Literal></Term> <Term><Literal>pytqt_tqtsql_sip_flags</Literal></Term>
<ListItem> <ListItem>
<Para> <Para>
A string of the SIP flags used to generate the code for the A string of the SIP flags used to generate the code for the
<Literal>qtsql</Literal> module and which should be added to those needed by <Literal>tqtsql</Literal> module and which should be added to those needed by
any module that imports the <Literal>qtsql</Literal> module. any module that imports the <Literal>tqtsql</Literal> module.
</Para> </Para>
<Para></Para><Para></Para> <Para></Para><Para></Para>
</ListItem> </ListItem>
</VarListEntry> </VarListEntry>
<VarListEntry> <VarListEntry>
<Term><Literal>pyqt_qttable_sip_flags</Literal></Term> <Term><Literal>pytqt_tqttable_sip_flags</Literal></Term>
<ListItem> <ListItem>
<Para> <Para>
A string of the SIP flags used to generate the code for the A string of the SIP flags used to generate the code for the
<Literal>qttable</Literal> module and which should be added to those needed by <Literal>tqttable</Literal> module and which should be added to those needed by
any module that imports the <Literal>qttable</Literal> module. any module that imports the <Literal>tqttable</Literal> module.
</Para> </Para>
<Para></Para><Para></Para> <Para></Para><Para></Para>
</ListItem> </ListItem>
</VarListEntry> </VarListEntry>
<VarListEntry> <VarListEntry>
<Term><Literal>pyqt_qtui_sip_flags</Literal></Term> <Term><Literal>pytqt_tqtui_sip_flags</Literal></Term>
<ListItem> <ListItem>
<Para> <Para>
A string of the SIP flags used to generate the code for the A string of the SIP flags used to generate the code for the
<Literal>qtui</Literal> module and which should be added to those needed by any <Literal>tqtui</Literal> module and which should be added to those needed by any
module that imports the <Literal>qtui</Literal> module. module that imports the <Literal>tqtui</Literal> module.
</Para> </Para>
<Para></Para><Para></Para> <Para></Para><Para></Para>
</ListItem> </ListItem>
</VarListEntry> </VarListEntry>
<VarListEntry> <VarListEntry>
<Term><Literal>pyqt_qtxml_sip_flags</Literal></Term> <Term><Literal>pytqt_tqtxml_sip_flags</Literal></Term>
<ListItem> <ListItem>
<Para> <Para>
A string of the SIP flags used to generate the code for the A string of the SIP flags used to generate the code for the
<Literal>qtxml</Literal> module and which should be added to those needed by <Literal>tqtxml</Literal> module and which should be added to those needed by
any module that imports the <Literal>qtxml</Literal> module. any module that imports the <Literal>tqtxml</Literal> module.
</Para> </Para>
<Para></Para><Para></Para> <Para></Para><Para></Para>
</ListItem> </ListItem>
</VarListEntry> </VarListEntry>
<VarListEntry> <VarListEntry>
<Term><Literal>pyqt_sip_dir</Literal></Term> <Term><Literal>pytqt_sip_dir</Literal></Term>
<ListItem> <ListItem>
<Para> <Para>
The name of the base directory where the <Literal>.sip</Literal> files for each The name of the base directory where the <Literal>.sip</Literal> files for each
@ -560,7 +560,7 @@ the module.
</VarListEntry> </VarListEntry>
<VarListEntry> <VarListEntry>
<Term><Literal>pyqt_version</Literal></Term> <Term><Literal>pytqt_version</Literal></Term>
<ListItem> <ListItem>
<Para> <Para>
The PyTQt version as a 3 part hexadecimal number (eg. v3.10 is represented as The PyTQt version as a 3 part hexadecimal number (eg. v3.10 is represented as
@ -571,7 +571,7 @@ The PyTQt version as a 3 part hexadecimal number (eg. v3.10 is represented as
</VarListEntry> </VarListEntry>
<VarListEntry> <VarListEntry>
<Term><Literal>pyqt_version_str</Literal></Term> <Term><Literal>pytqt_version_str</Literal></Term>
<ListItem> <ListItem>
<Para> <Para>
The PyTQt version as a string. For development snapshots it will start with The PyTQt version as a string. For development snapshots it will start with
@ -589,7 +589,7 @@ The PyTQt version as a string. For development snapshots it will start with
<Term><Literal>TQtModuleMakefile(sipconfig.SIPModuleMakefile)</Literal></Term> <Term><Literal>TQtModuleMakefile(sipconfig.SIPModuleMakefile)</Literal></Term>
<ListItem> <ListItem>
<Para> <Para>
The Makefile class for modules that import the <Literal>qt</Literal> module. The Makefile class for modules that import the <Literal>tqt</Literal> module.
</Para> </Para>
<VariableList> <VariableList>
<VarListEntry> <VarListEntry>
@ -609,7 +609,7 @@ This is a reimplementation of <Literal>sipconfig.Makefile.finalise()</Literal>.
<Term><Literal>TQtAxContainerModuleMakefile(TQtModuleMakefile)</Literal></Term> <Term><Literal>TQtAxContainerModuleMakefile(TQtModuleMakefile)</Literal></Term>
<ListItem> <ListItem>
<Para> <Para>
The Makefile class for modules that import the <Literal>qtaxcontainer</Literal> The Makefile class for modules that import the <Literal>tqtaxcontainer</Literal>
module. module.
</Para> </Para>
<VariableList> <VariableList>
@ -630,7 +630,7 @@ This is a reimplementation of <Literal>sipconfig.Makefile.finalise()</Literal>.
<Term><Literal>TQtCanvasModuleMakefile(TQtModuleMakefile)</Literal></Term> <Term><Literal>TQtCanvasModuleMakefile(TQtModuleMakefile)</Literal></Term>
<ListItem> <ListItem>
<Para> <Para>
The Makefile class for modules that import the <Literal>qtcanvas</Literal> The Makefile class for modules that import the <Literal>tqtcanvas</Literal>
module. module.
</Para> </Para>
<VariableList> <VariableList>
@ -651,7 +651,7 @@ This is a reimplementation of <Literal>sipconfig.Makefile.finalise()</Literal>.
<Term><Literal>TQtExtModuleMakefile(TQtModuleMakefile)</Literal></Term> <Term><Literal>TQtExtModuleMakefile(TQtModuleMakefile)</Literal></Term>
<ListItem> <ListItem>
<Para> <Para>
The Makefile class for modules that import the <Literal>qtext</Literal> module. The Makefile class for modules that import the <Literal>tqtext</Literal> module.
</Para> </Para>
<VariableList> <VariableList>
<VarListEntry> <VarListEntry>
@ -671,7 +671,7 @@ This is a reimplementation of <Literal>sipconfig.Makefile.finalise()</Literal>.
<Term><Literal>TQtGLModuleMakefile(TQtModuleMakefile)</Literal></Term> <Term><Literal>TQtGLModuleMakefile(TQtModuleMakefile)</Literal></Term>
<ListItem> <ListItem>
<Para> <Para>
The Makefile class for modules that import the <Literal>qtgl</Literal> module. The Makefile class for modules that import the <Literal>tqtgl</Literal> module.
</Para> </Para>
<VariableList> <VariableList>
<VarListEntry> <VarListEntry>
@ -691,7 +691,7 @@ This is a reimplementation of <Literal>sipconfig.Makefile.finalise()</Literal>.
<Term><Literal>TQtNetworkModuleMakefile(TQtModuleMakefile)</Literal></Term> <Term><Literal>TQtNetworkModuleMakefile(TQtModuleMakefile)</Literal></Term>
<ListItem> <ListItem>
<Para> <Para>
The Makefile class for modules that import the <Literal>qtnetwork</Literal> The Makefile class for modules that import the <Literal>tqtnetwork</Literal>
module. module.
</Para> </Para>
<VariableList> <VariableList>
@ -712,7 +712,7 @@ This is a reimplementation of <Literal>sipconfig.Makefile.finalise()</Literal>.
<Term><Literal>TQtTableModuleMakefile(TQtModuleMakefile)</Literal></Term> <Term><Literal>TQtTableModuleMakefile(TQtModuleMakefile)</Literal></Term>
<ListItem> <ListItem>
<Para> <Para>
The Makefile class for modules that import the <Literal>qttable</Literal> The Makefile class for modules that import the <Literal>tqttable</Literal>
module. module.
</Para> </Para>
<VariableList> <VariableList>
@ -733,7 +733,7 @@ This is a reimplementation of <Literal>sipconfig.Makefile.finalise()</Literal>.
<Term><Literal>TQtSQLModuleMakefile(TQtTableModuleMakefile)</Literal></Term> <Term><Literal>TQtSQLModuleMakefile(TQtTableModuleMakefile)</Literal></Term>
<ListItem> <ListItem>
<Para> <Para>
The Makefile class for modules that import the <Literal>qtsql</Literal> module. The Makefile class for modules that import the <Literal>tqtsql</Literal> module.
</Para> </Para>
<VariableList> <VariableList>
<VarListEntry> <VarListEntry>
@ -753,7 +753,7 @@ This is a reimplementation of <Literal>sipconfig.Makefile.finalise()</Literal>.
<Term><Literal>TQtUIModuleMakefile(TQtModuleMakefile)</Literal></Term> <Term><Literal>TQtUIModuleMakefile(TQtModuleMakefile)</Literal></Term>
<ListItem> <ListItem>
<Para> <Para>
The Makefile class for modules that import the <Literal>qtui</Literal> module. The Makefile class for modules that import the <Literal>tqtui</Literal> module.
</Para> </Para>
<VariableList> <VariableList>
<VarListEntry> <VarListEntry>
@ -773,7 +773,7 @@ This is a reimplementation of <Literal>sipconfig.Makefile.finalise()</Literal>.
<Term><Literal>TQtXMLModuleMakefile(TQtModuleMakefile)</Literal></Term> <Term><Literal>TQtXMLModuleMakefile(TQtModuleMakefile)</Literal></Term>
<ListItem> <ListItem>
<Para> <Para>
The Makefile class for modules that import the <Literal>qtxml</Literal> module. The Makefile class for modules that import the <Literal>tqtxml</Literal> module.
</Para> </Para>
<VariableList> <VariableList>
<VarListEntry> <VarListEntry>
@ -1094,7 +1094,7 @@ class A(TQObject):
</ProgramListing> </ProgramListing>
<Para> <Para>
Note that the code generated by <Literal>pyuic</Literal> uses Note that the code generated by <Literal>pytquic</Literal> uses
<Literal>TQApplication.translate()</Literal>. <Literal>TQApplication.translate()</Literal>.
</Para> </Para>
</Sect2> </Sect2>
@ -1243,7 +1243,7 @@ Classes that are not mentioned have not yet been implemented.
</Sect1> </Sect1>
<Sect1><Title><Literal>qt</Literal> Module Reference</Title> <Sect1><Title><Literal>tqt</Literal> Module Reference</Title>
<Sect2><Title>TQt Constants</Title> <Sect2><Title>TQt Constants</Title>
<Para> <Para>
All constant values defined by TQt have equivalent constants defined to Python. All constant values defined by TQt have equivalent constants defined to Python.
@ -4663,7 +4663,7 @@ values. (TQt v2+)
</Para> </Para>
</Sect2> </Sect2>
</Sect1> </Sect1>
<Sect1><Title><Literal>qtaxcontainer</Literal> Module Reference</Title> <Sect1><Title><Literal>tqtaxcontainer</Literal> Module Reference</Title>
<Sect2><Title>TQAxBase (Windows, TQt v3+)</Title> <Sect2><Title>TQAxBase (Windows, TQt v3+)</Title>
<FuncSynopsis> <FuncSynopsis>
<FuncDef><Function>TQAxObject</Function></FuncDef> <FuncDef><Function>TQAxObject</Function></FuncDef>
@ -4705,7 +4705,7 @@ Not implemented.
<Para> <Para>
This is a utility method provided by PyTQt to make it easier to use This is a utility method provided by PyTQt to make it easier to use
Mark Hammond's <Literal>win32com</Literal> module to manipulate objects Mark Hammond's <Literal>win32com</Literal> module to manipulate objects
created by the <Literal>qtaxcontainer</Literal> module. created by the <Literal>tqtaxcontainer</Literal> module.
</Para> </Para>
<Para> <Para>
The <Literal>RegisterActiveObject()</Literal> COM function is called to The <Literal>RegisterActiveObject()</Literal> COM function is called to
@ -4747,7 +4747,7 @@ Not implemented.
</Para> </Para>
</Sect2> </Sect2>
</Sect1> </Sect1>
<Sect1><Title><Literal>qtcanvas</Literal> Module Reference</Title> <Sect1><Title><Literal>tqtcanvas</Literal> Module Reference</Title>
<Sect2><Title>TQCanvas (TQt v2.2+)</Title> <Sect2><Title>TQCanvas (TQt v2.2+)</Title>
<Para> <Para>
<Literal>TQCanvas</Literal> is fully implemented. <Literal>TQCanvas</Literal> is fully implemented.
@ -4851,7 +4851,7 @@ The <Literal>pixmaps</Literal> argument is a Python list of TQPixmap instances.
</Para> </Para>
</Sect2> </Sect2>
</Sect1> </Sect1>
<Sect1><Title><Literal>qtext</Literal> Module Reference</Title> <Sect1><Title><Literal>tqtext</Literal> Module Reference</Title>
<Sect2><Title>TQextScintilla</Title> <Sect2><Title>TQextScintilla</Title>
<FuncSynopsis> <FuncSynopsis>
@ -5040,7 +5040,7 @@ This takes no parameters and returns a tuple of the values returned by the
</Para> </Para>
</Sect2> </Sect2>
</Sect1> </Sect1>
<Sect1><Title><Literal>qtgl</Literal> Module Reference</Title> <Sect1><Title><Literal>tqtgl</Literal> Module Reference</Title>
<Sect2><Title>TQGL</Title> <Sect2><Title>TQGL</Title>
<Para> <Para>
<Literal>TQGL</Literal> is fully implemented. <Literal>TQGL</Literal> is fully implemented.
@ -5076,7 +5076,7 @@ Not yet implemented.
</Para> </Para>
</Sect2> </Sect2>
</Sect1> </Sect1>
<Sect1><Title><Literal>qtnetwork</Literal> Module Reference</Title> <Sect1><Title><Literal>tqtnetwork</Literal> Module Reference</Title>
<Sect2><Title>TQDns (TQt v2.2+)</Title> <Sect2><Title>TQDns (TQt v2.2+)</Title>
<Para> <Para>
<Literal>TQDns</Literal> is fully implemented. <Literal>TQDns</Literal> is fully implemented.
@ -5223,7 +5223,7 @@ as a parameter.
</Para> </Para>
</Sect2> </Sect2>
</Sect1> </Sect1>
<Sect1><Title><Literal>qtpe</Literal> Module Reference</Title> <Sect1><Title><Literal>tqtpe</Literal> Module Reference</Title>
<Sect2><Title>TQPEApplication</Title> <Sect2><Title>TQPEApplication</Title>
<FuncSynopsis> <FuncSynopsis>
@ -5361,7 +5361,7 @@ Not implemented.
</Sect2> </Sect2>
</Sect1> </Sect1>
<Sect1><Title><Literal>qtsql</Literal> Module Reference</Title> <Sect1><Title><Literal>tqtsql</Literal> Module Reference</Title>
<Sect2><Title>TQDataBrowser (TQt v3+)</Title> <Sect2><Title>TQDataBrowser (TQt v3+)</Title>
<FuncSynopsis> <FuncSynopsis>
<FuncDef>virtual void <Function>del</Function></FuncDef> <FuncDef>virtual void <Function>del</Function></FuncDef>
@ -5534,7 +5534,7 @@ This has been renamed <Literal>execQuery</Literal> in Python.
</Para> </Para>
</Sect2> </Sect2>
</Sect1> </Sect1>
<Sect1><Title><Literal>qttable</Literal> Module Reference</Title> <Sect1><Title><Literal>tqttable</Literal> Module Reference</Title>
<Sect2><Title>TQTable (TQt v2.2+)</Title> <Sect2><Title>TQTable (TQt v2.2+)</Title>
<Para> <Para>
<Literal>TQTable</Literal> is fully implemented. <Literal>TQTable</Literal> is fully implemented.
@ -5565,14 +5565,14 @@ This has been renamed <Literal>execQuery</Literal> in Python.
</Para> </Para>
</Sect2> </Sect2>
</Sect1> </Sect1>
<Sect1><Title><Literal>qtui</Literal> Module Reference</Title> <Sect1><Title><Literal>tqtui</Literal> Module Reference</Title>
<Sect2><Title>TQWidgetFactory (TQt v3+)</Title> <Sect2><Title>TQWidgetFactory (TQt v3+)</Title>
<Para> <Para>
<Literal>TQWidgetFactory</Literal> is fully implemented. <Literal>TQWidgetFactory</Literal> is fully implemented.
</Para> </Para>
</Sect2> </Sect2>
</Sect1> </Sect1>
<Sect1><Title><Literal>qtxml</Literal> Module Reference</Title> <Sect1><Title><Literal>tqtxml</Literal> Module Reference</Title>
<Sect2><Title>TQDomImplementation (TQt v2.2+)</Title> <Sect2><Title>TQDomImplementation (TQt v2.2+)</Title>
<Para> <Para>
<Literal>TQDomImplementation</Literal> is fully implemented. <Literal>TQDomImplementation</Literal> is fully implemented.

File diff suppressed because it is too large Load Diff

@ -2,11 +2,11 @@ This directory contains some translated sql examples from TQt 3.x.
runform1.py, form1.ui: runform1.py, form1.ui:
A simple designer generated TQDataTable. Run "pyuic form1.ui -o form1.py". A simple designer generated TQDataTable. Run "pytquic form1.ui -o form1.py".
runform2.py, form2.ui: runform2.py, form2.ui:
A simple designer generated TQDataBrowser. Run "pyuic form2.ui -o form2.py". A simple designer generated TQDataBrowser. Run "pytquic form2.ui -o form2.py".
sqlcustom1.py: sqlcustom1.py:

@ -9,7 +9,7 @@
void ConnectDialog::init() void ConnectDialog::init()
{ {
from PyTQt.qtsql import TQSqlDatabase from PyTQt.tqtsql import TQSqlDatabase
#qDebug("ConnectDialog init") #qDebug("ConnectDialog init")
self.comboDriver.clear() self.comboDriver.clear()
self.comboDriver.insertStringList(TQSqlDatabase.drivers()) self.comboDriver.insertStringList(TQSqlDatabase.drivers())

@ -1,8 +1,8 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys import sys
from PyTQt.qt import * from PyTQt.tqt import *
from PyTQt.qtsql import * from PyTQt.tqtsql import *
from frmconnect import frmConnect from frmconnect import frmConnect
from dbpar import * from dbpar import *
@ -12,7 +12,7 @@ FALSE = 0
def createConnection(): def createConnection():
driver = DB_DRIVER driver = DB_DRIVER
# all qt examples use TQSqlDatabase::addDatabase, but # all tqt examples use TQSqlDatabase::addDatabase, but
# this never returns NULL in my experience # this never returns NULL in my experience
drivers = list(map(str, TQSqlDatabase.drivers())) drivers = list(map(str, TQSqlDatabase.drivers()))
if driver in drivers: if driver in drivers:

@ -1,12 +1,12 @@
# Form implementation generated from reading ui file 'frmconnect.ui' # Form implementation generated from reading ui file 'frmconnect.ui'
# #
# Created: Sam Jul 6 12:47:10 2002 # Created: Sam Jul 6 12:47:10 2002
# by: The PyTQt User Interface Compiler (pyuic) # by: The PyTQt User Interface Compiler (pytquic)
# #
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
from PyTQt.qt import * from PyTQt.tqt import *
class frmConnect(TQDialog): class frmConnect(TQDialog):

@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys import sys
from PyTQt.qt import * from PyTQt.tqt import *
from form1 import Form1 from form1 import Form1
from dbconnect import createConnection from dbconnect import createConnection

@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys import sys
from PyTQt.qt import * from PyTQt.tqt import *
from form2 import Form2 from form2 import Form2
from dbconnect import createConnection from dbconnect import createConnection

@ -1,8 +1,8 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys import sys
from PyTQt.qt import * from PyTQt.tqt import *
from PyTQt.qtsql import * from PyTQt.tqtsql import *
from sqlex import SqlEx from sqlex import SqlEx
from connect import ConnectDialog from connect import ConnectDialog

@ -11,8 +11,8 @@
#*****************************************************************************/ #*****************************************************************************/
import sys import sys
from PyTQt.qt import * from PyTQt.tqt import *
from PyTQt.qtsql import * from PyTQt.tqtsql import *
from dbconnect import createConnection from dbconnect import createConnection

@ -11,8 +11,8 @@
#*****************************************************************************/ #*****************************************************************************/
import sys import sys
from PyTQt.qt import * from PyTQt.tqt import *
from PyTQt.qtsql import * from PyTQt.tqtsql import *
from dbconnect import createConnection from dbconnect import createConnection

@ -11,8 +11,8 @@
#*****************************************************************************/ #*****************************************************************************/
import sys import sys
from PyTQt.qt import * from PyTQt.tqt import *
from PyTQt.qtsql import * from PyTQt.tqtsql import *
from dbconnect import createConnection from dbconnect import createConnection

@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys import sys
from PyTQt.qt import * from PyTQt.tqt import *
def TQMIN(x, y): def TQMIN(x, y):
if y > x: return y if y > x: return y
@ -19,7 +19,7 @@ class AnalogClock(TQWidget):
if new_time.minute() != self.time.minute(): if new_time.minute() != self.time.minute():
self.update() self.update()
def paintEvent(self, qe): def paintEvent(self, tqe):
if not self.isVisible(): if not self.isVisible():
return return
self.time = TQTime.currentTime() self.time = TQTime.currentTime()

@ -4,7 +4,7 @@
import sys, string import sys, string
from PyTQt.qt import * from PyTQt.tqt import *
TRUE = 1 TRUE = 1
FALSE = 0 FALSE = 0

@ -4,7 +4,7 @@
import sys, string import sys, string
from PyTQt.qt import * from PyTQt.tqt import *
fileopen = [ fileopen = [

@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
import os, sys, string import os, sys, string
from PyTQt.qt import * from PyTQt.tqt import *
if TQT_VERSION < 0x030100: if TQT_VERSION < 0x030100:

@ -12,8 +12,8 @@
import sys import sys
import os import os
from PyTQt.qt import * from PyTQt.tqt import *
from PyTQt.qttable import * from PyTQt.tqttable import *
TRUE = 1 TRUE = 1
FALSE = 0 FALSE = 0

@ -10,7 +10,7 @@
#*****************************************************************************/ #*****************************************************************************/
import sys import sys
from PyTQt.qt import * from PyTQt.tqt import *
TRUE = 1 TRUE = 1
FALSE = 0 FALSE = 0
@ -118,7 +118,7 @@ a = TQApplication( sys.argv )
buttonsgroups = ButtonsGroups() buttonsgroups = ButtonsGroups()
buttonsgroups.resize( 500, 250 ) buttonsgroups.resize( 500, 250 )
buttonsgroups.setCaption( "PyQT Example - Buttons and Groups" ) buttonsgroups.setCaption( "PyTQt Example - Buttons and Groups" )
a.setMainWidget( buttonsgroups ) a.setMainWidget( buttonsgroups )
buttonsgroups.show() buttonsgroups.show()

@ -1,8 +1,8 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys import sys
from PyTQt.qt import * from PyTQt.tqt import *
from PyTQt.qtcanvas import * from PyTQt.tqtcanvas import *
import random import random
@ -124,7 +124,7 @@ class BouncyLogo(TQCanvasSprite):
# Make sure the logo exists. # Make sure the logo exists.
global bouncy_logo global bouncy_logo
if bouncy_logo is None: if bouncy_logo is None:
bouncy_logo=TQCanvasPixmapArray("qt-trans.xpm") bouncy_logo=TQCanvasPixmapArray("tqt-trans.xpm")
TQCanvasSprite.__init__(self,None,canvas) TQCanvasSprite.__init__(self,None,canvas)
self.setSequence(bouncy_logo) self.setSequence(bouncy_logo)
@ -587,11 +587,11 @@ if __name__=='__main__':
if len(sys.argv) > 2: if len(sys.argv) > 2:
logo_fn = TQString(sys.argv[2]) logo_fn = TQString(sys.argv[2])
else: else:
logo_fn=TQString("qtlogo.png") logo_fn=TQString("tqtlogo.png")
canvas=TQCanvas(800,600) canvas=TQCanvas(800,600)
canvas.setAdvancePeriod(30) canvas.setAdvancePeriod(30)
m=Main(canvas,None,"pyqt canvas example") m=Main(canvas,None,"pytqt canvas example")
m.resize(m.sizeHint()) m.resize(m.sizeHint())
tqApp.setMainWidget(m) tqApp.setMainWidget(m)

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

@ -3,7 +3,7 @@
# Copyright (C) 2002 Oleksandr Yakovlyev (yshurik) <yshurik@thekompany.com> # Copyright (C) 2002 Oleksandr Yakovlyev (yshurik) <yshurik@thekompany.com>
import sys import sys
from PyTQt.qt import * from PyTQt.tqt import *
TRUE = 1 TRUE = 1
FALSE = 0 FALSE = 0

@ -10,7 +10,7 @@
***************************************************************************""" ***************************************************************************"""
import sys import sys
from PyTQt.qt import * from PyTQt.tqt import *
# cb_bits and cm_bits were generated by X bitmap program. # cb_bits and cm_bits were generated by X bitmap program.

@ -4,7 +4,7 @@
import sys, string import sys, string
from PyTQt.qt import * from PyTQt.tqt import *
class DigitalClock(TQLCDNumber): class DigitalClock(TQLCDNumber):

@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys import sys
from PyTQt.qt import * from PyTQt.tqt import *
seed = 0.353535353535 seed = 0.353535353535
KINDA_RAND_MAX = 32767 KINDA_RAND_MAX = 32767

@ -12,7 +12,7 @@
***************************************************************************""" ***************************************************************************"""
import sys import sys
from PyTQt.qt import * from PyTQt.tqt import *
folder_closed_xpm = [ folder_closed_xpm = [
"16 16 9 1", "16 16 9 1",

@ -3,7 +3,7 @@
# Ported to PyTQt by Issac Trotts on Jan 1, 2002 # Ported to PyTQt by Issac Trotts on Jan 1, 2002
import sys import sys
from PyTQt.qt import * from PyTQt.tqt import *
import dropsite, secret import dropsite, secret

@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys, random import sys, random
from PyTQt.qt import * from PyTQt.tqt import *
TRUE = 1 TRUE = 1
FALSE = 0 FALSE = 0

@ -1,7 +1,7 @@
# This is part of the dragdrop example. # This is part of the dragdrop example.
from PyTQt.qt import * from PyTQt.tqt import *
import secret import secret
@ -23,7 +23,7 @@ class DropSite(TQLabel):
drobj = TQTextDrag( self.text(), self ) drobj = TQTextDrag( self.text(), self )
drobj.dragCopy() drobj.dragCopy()
def backgroundColorChange( self, qcolor ): def backgroundColorChange( self, tqcolor ):
# Reduce flicker by using repaint() rather than update() # Reduce flicker by using repaint() rather than update()
self.repaint() self.repaint()

@ -11,7 +11,7 @@
***************************************************************************""" ***************************************************************************"""
import sys import sys
from PyTQt.qt import * from PyTQt.tqt import *
class FontRowTable( TQFrame ): class FontRowTable( TQFrame ):
def __init__( self, parent=None, name=None ): def __init__( self, parent=None, name=None ):

@ -11,7 +11,7 @@
***************************************************************************""" ***************************************************************************"""
import sys import sys
from PyTQt.qt import * from PyTQt.tqt import *
class Viewer( TQWidget ): class Viewer( TQWidget ):
def __init__( self ): def __init__( self ):

@ -3,8 +3,8 @@
import sys import sys
import math import math
from PyTQt.qt import * from PyTQt.tqt import *
from PyTQt.qtgl import * from PyTQt.tqtgl import *
from OpenGL.GL import * from OpenGL.GL import *
def gear(inner_radius,outer_radius,width,teeth,tooth_depth): def gear(inner_radius,outer_radius,width,teeth,tooth_depth):

@ -5,7 +5,7 @@
from whrandom import randint from whrandom import randint
import sys import sys
from PyTQt.qt import * from PyTQt.tqt import *
from mywidget import MyWidget from mywidget import MyWidget

@ -1,6 +1,6 @@
# Copyright (c) 2002 Detlev Offenbach <detlev@die-offenbachs.de> # Copyright (c) 2002 Detlev Offenbach <detlev@die-offenbachs.de>
from PyTQt.qt import * from PyTQt.tqt import *
class MyWidget(TQMainWindow): class MyWidget(TQMainWindow):

@ -11,7 +11,7 @@
#*****************************************************************************/ #*****************************************************************************/
import sys import sys
from PyTQt.qt import * from PyTQt.tqt import *
TRUE = 1 TRUE = 1
FALSE = 0 FALSE = 0

@ -11,7 +11,7 @@
***************************************************************************""" ***************************************************************************"""
import sys import sys
from PyTQt.qt import * from PyTQt.tqt import *
FALSE = 0 FALSE = 0
TRUE = 1 TRUE = 1

@ -11,7 +11,7 @@
***************************************************************************""" ***************************************************************************"""
import sys import sys
from PyTQt.qt import * from PyTQt.tqt import *
FALSE = 0 FALSE = 0
TRUE = 1 TRUE = 1
@ -34,7 +34,7 @@ class ListBoxCombo( TQVBox ):
self.lb1.setSelectionMode( TQListBox.Multi ) self.lb1.setSelectionMode( TQListBox.Multi )
# ...insert a pixmap item... # ...insert a pixmap item...
xpm = TQPixmap( "qtlogo.png" ) xpm = TQPixmap( "tqtlogo.png" )
txt = TQString() txt = TQString()
TQListBoxPixmap( self.lb1, xpm, txt ) TQListBoxPixmap( self.lb1, xpm, txt )

@ -4,7 +4,7 @@
import sys, string import sys, string
from PyTQt.qt import * from PyTQt.tqt import *
fileopen = [ fileopen = [

@ -11,7 +11,7 @@
#*****************************************************************************/ #*****************************************************************************/
import sys, string import sys, string
from PyTQt.qt import * from PyTQt.tqt import *
TRUE = 1 TRUE = 1
FALSE = 0 FALSE = 0

@ -13,7 +13,7 @@
#*****************************************************************************/ #*****************************************************************************/
import sys import sys
from PyTQt.qt import * from PyTQt.tqt import *
from random import randint from random import randint
class AnimatedThingy(TQLabel): class AnimatedThingy(TQLabel):

@ -12,7 +12,7 @@
#import pdb #import pdb
import sys import sys
from PyTQt.qt import * from PyTQt.tqt import *
FALSE = 0 FALSE = 0
TRUE = 1 TRUE = 1

@ -11,7 +11,7 @@
***************************************************************************""" ***************************************************************************"""
import sys import sys
from PyTQt.qt import * from PyTQt.tqt import *
INT_MAX = sys.maxsize INT_MAX = sys.maxsize

@ -11,7 +11,7 @@
***************************************************************************""" ***************************************************************************"""
import sys import sys
from PyTQt.qt import * from PyTQt.tqt import *
sayings = [ sayings = [
"<b>Saying 1:</b><br>" "<b>Saying 1:</b><br>"

@ -1,7 +1,7 @@
# This is part of the dragdrop example. # This is part of the dragdrop example.
from PyTQt.qt import * from PyTQt.tqt import *
def canDecode(e): def canDecode(e):

@ -7,12 +7,12 @@ import sys
# Check if thread support was enabled. # Check if thread support was enabled.
try: try:
from PyTQt.qt import TQThread from PyTQt.tqt import TQThread
except: except:
print("Thread support not enabled") print("Thread support not enabled")
sys.exit(1) sys.exit(1)
from PyTQt.qt import * from PyTQt.tqt import *
# The semaphore instances. # The semaphore instances.

@ -12,8 +12,8 @@
import sys import sys
import os import os
from PyTQt.qt import * from PyTQt.tqt import *
from PyTQt.qttable import * from PyTQt.tqttable import *
TRUE = 1 TRUE = 1
FALSE = 0 FALSE = 0

@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys import sys
from PyTQt.qt import * from PyTQt.tqt import *
class Test(TQWidget): class Test(TQWidget):
def __init__(self, parent=None, name='Test', f=0): def __init__(self, parent=None, name='Test', f=0):

@ -11,7 +11,7 @@
***************************************************************************""" ***************************************************************************"""
import sys import sys
from PyTQt.qt import * from PyTQt.tqt import *
class TabDialog( TQTabDialog ): class TabDialog( TQTabDialog ):
def __init__( self, parent=None, name=None, filename=None ): def __init__( self, parent=None, name=None, filename=None ):

@ -12,8 +12,8 @@
import sys import sys
import os import os
from PyTQt.qt import * from PyTQt.tqt import *
from PyTQt.qttable import * from PyTQt.tqttable import *
TRUE = 1 TRUE = 1
FALSE = 0 FALSE = 0
@ -52,11 +52,11 @@ class Table(TQTable):
def initTable(self): def initTable(self):
# read all the TQt source and header files into a list # read all the TQt source and header files into a list
all = [] all = []
qtdir = os.getenv("TQTDIR") tqtdir = os.getenv("TQTDIR")
if qtdir is None: if tqtdir is None:
raise Exception("The TQTDIR environment variable has not been set.") raise Exception("The TQTDIR environment variable has not been set.")
for i in dirs: for i in dirs:
dir = TQDir(os.path.join(qtdir, "src", i)) dir = TQDir(os.path.join(tqtdir, "src", i))
lst = TQStringList(dir.entryList("*.cpp; *.h")) lst = TQStringList(dir.entryList("*.cpp; *.h"))
for f in lst: for f in lst:
if f.contains("moc"): if f.contains("moc"):
@ -71,7 +71,7 @@ class Table(TQTable):
# insert the data into the table # insert the data into the table
for it in all: for it in all:
self.setText(i, TB_FILE, it) self.setText(i, TB_FILE, it)
f = TQFile(os.path.join(qtdir, "src", str(it))) f = TQFile(os.path.join(tqtdir, "src", str(it)))
self.setText(i, TB_SIZE, str(f.size())) self.setText(i, TB_SIZE, str(f.size()))
ci = ComboItem(self, TQTableItem.WhenCurrent) ci = ComboItem(self, TQTableItem.WhenCurrent)
self.setItem(i, TB_FLAG, ci) self.setItem(i, TB_FLAG, ci)

@ -11,7 +11,7 @@
***************************************************************************""" ***************************************************************************"""
import sys import sys
from PyTQt.qt import * from PyTQt.tqt import *
from random import random from random import random
class DynamicTip( TQToolTip ): class DynamicTip( TQToolTip ):

@ -5,7 +5,7 @@
from __future__ import print_function from __future__ import print_function
import os import os
import pickle import pickle
from PyTQt.qt import * from PyTQt.tqt import *
from dirview import Directory, DirectoryView from dirview import Directory, DirectoryView
bookmarks = [ bookmarks = [

@ -11,7 +11,7 @@
#*****************************************************************************/ #*****************************************************************************/
import sys import sys
from PyTQt.qt import * from PyTQt.tqt import *
TRUE = 1 TRUE = 1
FALSE = 0 FALSE = 0

Before

Width:  |  Height:  |  Size: 355 B

After

Width:  |  Height:  |  Size: 355 B

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

@ -3,12 +3,12 @@
# TQt tutorial 1. # TQt tutorial 1.
import sys import sys
from PyTQt import qt from PyTQt import tqt
a = qt.TQApplication(sys.argv) a = tqt.TQApplication(sys.argv)
hello = qt.TQPushButton("Hello world!", None) hello = tqt.TQPushButton("Hello world!", None)
hello.resize(100, 30) hello.resize(100, 30)
a.setMainWidget(hello) a.setMainWidget(hello)

@ -3,19 +3,19 @@
# TQt tutorial 10. # TQt tutorial 10.
import sys import sys
from PyTQt import qt from PyTQt import tqt
class LCDRange(qt.TQVBox): class LCDRange(tqt.TQVBox):
def __init__(self, parent=None, name=None): def __init__(self, parent=None, name=None):
qt.TQVBox.__init__(self, parent, name) tqt.TQVBox.__init__(self, parent, name)
lcd = qt.TQLCDNumber(2, self, "lcd") lcd = tqt.TQLCDNumber(2, self, "lcd")
self.slider = qt.TQSlider(qt.TQt.Horizontal, self, "slider") self.slider = tqt.TQSlider(tqt.TQt.Horizontal, self, "slider")
self.slider.setRange(0, 99) self.slider.setRange(0, 99)
self.slider.setValue(0) self.slider.setValue(0)
self.connect(self.slider, qt.SIGNAL("valueChanged(int)"), lcd, qt.SLOT("display(int)")) self.connect(self.slider, tqt.SIGNAL("valueChanged(int)"), lcd, tqt.SLOT("display(int)"))
self.connect(self.slider, qt.SIGNAL("valueChanged(int)"), self, qt.PYSIGNAL("valueChanged(int)")) self.connect(self.slider, tqt.SIGNAL("valueChanged(int)"), self, tqt.PYSIGNAL("valueChanged(int)"))
self.setFocusProxy(self.slider) self.setFocusProxy(self.slider)
@ -31,13 +31,13 @@ class LCDRange(qt.TQVBox):
self.slider.setRange(minVal, maxVal) self.slider.setRange(minVal, maxVal)
class CannonField(qt.TQWidget): class CannonField(tqt.TQWidget):
def __init__(self, parent=None, name=None): def __init__(self, parent=None, name=None):
qt.TQWidget.__init__(self, parent, name) tqt.TQWidget.__init__(self, parent, name)
self.ang = 45 self.ang = 45
self.f = 0 self.f = 0
self.setPalette(qt.TQPalette(qt.TQColor(250, 250, 200))) self.setPalette(tqt.TQPalette(tqt.TQColor(250, 250, 200)))
def angle(self): def angle(self):
return self.ang return self.ang
@ -51,7 +51,7 @@ class CannonField(qt.TQWidget):
return return
self.ang = degrees self.ang = degrees
self.repaint(self.cannonRect(), 0) self.repaint(self.cannonRect(), 0)
self.emit(qt.PYSIGNAL("angleChanged(int)"), (self.ang, )) self.emit(tqt.PYSIGNAL("angleChanged(int)"), (self.ang, ))
def force(self): def force(self):
return self.f return self.f
@ -62,46 +62,46 @@ class CannonField(qt.TQWidget):
if self.f == newton: if self.f == newton:
return return
self.f = newton self.f = newton
self.emit(qt.PYSIGNAL("forceChanged(int)"), (self.f, )) self.emit(tqt.PYSIGNAL("forceChanged(int)"), (self.f, ))
def paintEvent(self, ev): def paintEvent(self, ev):
if not ev.rect().intersects(self.cannonRect()): if not ev.rect().intersects(self.cannonRect()):
return return
cr = self.cannonRect() cr = self.cannonRect()
pix = qt.TQPixmap(cr.size()) pix = tqt.TQPixmap(cr.size())
pix.fill(self, cr.topLeft()) pix.fill(self, cr.topLeft())
p = qt.TQPainter(pix) p = tqt.TQPainter(pix)
p.setBrush(qt.TQt.blue) p.setBrush(tqt.TQt.blue)
p.setPen(qt.TQt.NoPen) p.setPen(tqt.TQt.NoPen)
p.translate(0, pix.height() - 1) p.translate(0, pix.height() - 1)
p.drawPie(qt.TQRect(-35, -35, 70, 70), 0, 90 * 16) p.drawPie(tqt.TQRect(-35, -35, 70, 70), 0, 90 * 16)
p.rotate(-self.ang) p.rotate(-self.ang)
p.drawRect(qt.TQRect(33, -4, 15, 8)) p.drawRect(tqt.TQRect(33, -4, 15, 8))
p.end() p.end()
p.begin(self) p.begin(self)
p.drawPixmap(cr.topLeft(), pix) p.drawPixmap(cr.topLeft(), pix)
def cannonRect(self): def cannonRect(self):
r = qt.TQRect(0, 0, 50, 50) r = tqt.TQRect(0, 0, 50, 50)
r.moveBottomLeft(self.rect().bottomLeft()) r.moveBottomLeft(self.rect().bottomLeft())
return r return r
def sizePolicy(self): def sizePolicy(self):
return qt.TQSizePolicy(qt.TQSizePolicy.Expanding, qt.TQSizePolicy.Expanding) return tqt.TQSizePolicy(tqt.TQSizePolicy.Expanding, tqt.TQSizePolicy.Expanding)
class MyWidget(qt.TQWidget): class MyWidget(tqt.TQWidget):
def __init__(self, parent=None, name=None): def __init__(self, parent=None, name=None):
qt.TQWidget.__init__(self, parent, name) tqt.TQWidget.__init__(self, parent, name)
quit = qt.TQPushButton("&Quit", self, "quit") quit = tqt.TQPushButton("&Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(tqt.TQFont("Times", 18, tqt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()")) self.connect(quit, tqt.SIGNAL("clicked()"), tqt.tqApp, tqt.SLOT("quit()"))
self.angle = LCDRange(self, "angle") self.angle = LCDRange(self, "angle")
self.angle.setRange(5, 70) self.angle.setRange(5, 70)
@ -111,19 +111,19 @@ class MyWidget(qt.TQWidget):
self.cannonField = CannonField(self, "cannonField") self.cannonField = CannonField(self, "cannonField")
self.connect(self.angle, qt.PYSIGNAL("valueChanged(int)"), self.cannonField.setAngle) self.connect(self.angle, tqt.PYSIGNAL("valueChanged(int)"), self.cannonField.setAngle)
self.connect(self.cannonField, qt.PYSIGNAL("angleChanged(int)"), self.angle.setValue) self.connect(self.cannonField, tqt.PYSIGNAL("angleChanged(int)"), self.angle.setValue)
self.connect(self.force, qt.PYSIGNAL("valueChanged(int)"), self.cannonField.setForce) self.connect(self.force, tqt.PYSIGNAL("valueChanged(int)"), self.cannonField.setForce)
self.connect(self.cannonField, qt.PYSIGNAL("forceChanged(int)"), self.force.setValue) self.connect(self.cannonField, tqt.PYSIGNAL("forceChanged(int)"), self.force.setValue)
grid = qt.TQGridLayout(self, 2, 2, 10) grid = tqt.TQGridLayout(self, 2, 2, 10)
grid.addWidget(quit, 0, 0) grid.addWidget(quit, 0, 0)
grid.addWidget(self.cannonField, 1, 1) grid.addWidget(self.cannonField, 1, 1)
grid.setColStretch(1, 10) grid.setColStretch(1, 10)
leftBox = qt.TQVBoxLayout() leftBox = tqt.TQVBoxLayout()
grid.addLayout(leftBox, 1, 0) grid.addLayout(leftBox, 1, 0)
@ -135,8 +135,8 @@ class MyWidget(qt.TQWidget):
self.angle.setFocus() self.angle.setFocus()
qt.TQApplication.setColorSpec(qt.TQApplication.CustomColor) qt.TQApplication.setColorSpec(tqt.TQApplication.CustomColor)
a = qt.TQApplication(sys.argv) a = tqt.TQApplication(sys.argv)
w = MyWidget() w = MyWidget()
w.setGeometry(100, 100, 500, 355) w.setGeometry(100, 100, 500, 355)

@ -4,19 +4,19 @@
import sys import sys
import math import math
from PyTQt import qt from PyTQt import tqt
class LCDRange(qt.TQVBox): class LCDRange(tqt.TQVBox):
def __init__(self, parent=None, name=None): def __init__(self, parent=None, name=None):
qt.TQVBox.__init__(self, parent, name) tqt.TQVBox.__init__(self, parent, name)
lcd = qt.TQLCDNumber(2, self, "lcd") lcd = tqt.TQLCDNumber(2, self, "lcd")
self.slider = qt.TQSlider(qt.TQt.Horizontal, self, "slider") self.slider = tqt.TQSlider(tqt.TQt.Horizontal, self, "slider")
self.slider.setRange(0, 99) self.slider.setRange(0, 99)
self.slider.setValue(0) self.slider.setValue(0)
self.connect(self.slider, qt.SIGNAL("valueChanged(int)"), lcd, qt.SLOT("display(int)")) self.connect(self.slider, tqt.SIGNAL("valueChanged(int)"), lcd, tqt.SLOT("display(int)"))
self.connect(self.slider, qt.SIGNAL("valueChanged(int)"), self, qt.PYSIGNAL("valueChanged(int)")) self.connect(self.slider, tqt.SIGNAL("valueChanged(int)"), self, tqt.PYSIGNAL("valueChanged(int)"))
self.setFocusProxy(self.slider) self.setFocusProxy(self.slider)
@ -32,23 +32,23 @@ class LCDRange(qt.TQVBox):
self.slider.setRange(minVal, maxVal) self.slider.setRange(minVal, maxVal)
class CannonField(qt.TQWidget): class CannonField(tqt.TQWidget):
def __init__(self, parent=None, name=None): def __init__(self, parent=None, name=None):
qt.TQWidget.__init__(self, parent, name) tqt.TQWidget.__init__(self, parent, name)
self.ang = 45 self.ang = 45
self.f = 0 self.f = 0
self.timerCount = 0 self.timerCount = 0
self.autoShootTimer = qt.TQTimer(self, "movement handler") self.autoShootTimer = tqt.TQTimer(self, "movement handler")
self.connect(self.autoShootTimer, qt.SIGNAL("timeout()"), self.moveShot) self.connect(self.autoShootTimer, tqt.SIGNAL("timeout()"), self.moveShot)
self.shoot_ang = 0 self.shoot_ang = 0
self.shoot_f = 0 self.shoot_f = 0
self.setPalette(qt.TQPalette(qt.TQColor(250, 250, 200))) self.setPalette(tqt.TQPalette(tqt.TQColor(250, 250, 200)))
self.barrelRect = qt.TQRect(33, -4, 15, 8) self.barrelRect = tqt.TQRect(33, -4, 15, 8)
def angle(self): def angle(self):
return self.ang return self.ang
@ -62,7 +62,7 @@ class CannonField(qt.TQWidget):
return return
self.ang = degrees self.ang = degrees
self.repaint(self.cannonRect(), 0) self.repaint(self.cannonRect(), 0)
self.emit(qt.PYSIGNAL("angleChanged(int)"), (self.ang, )) self.emit(tqt.PYSIGNAL("angleChanged(int)"), (self.ang, ))
def force(self): def force(self):
return self.f return self.f
@ -73,7 +73,7 @@ class CannonField(qt.TQWidget):
if self.f == newton: if self.f == newton:
return return
self.f = newton self.f = newton
self.emit(qt.PYSIGNAL("forceChanged(int)"), (self.f, )) self.emit(tqt.PYSIGNAL("forceChanged(int)"), (self.f, ))
def shoot(self): def shoot(self):
if self.autoShootTimer.isActive(): if self.autoShootTimer.isActive():
@ -85,7 +85,7 @@ class CannonField(qt.TQWidget):
self.autoShootTimer.start(50) self.autoShootTimer.start(50)
def moveShot(self): def moveShot(self):
r = qt.TQRegion(self.shotRect()) r = tqt.TQRegion(self.shotRect())
self.timerCount = self.timerCount + 1 self.timerCount = self.timerCount + 1
shotR = self.shotRect() shotR = self.shotRect()
@ -93,13 +93,13 @@ class CannonField(qt.TQWidget):
if shotR.x() > self.width() or shotR.y() > self.height(): if shotR.x() > self.width() or shotR.y() > self.height():
self.autoShootTimer.stop() self.autoShootTimer.stop()
else: else:
r = r.unite(qt.TQRegion(shotR)) r = r.unite(tqt.TQRegion(shotR))
self.repaint(r) self.repaint(r)
def paintEvent(self, ev): def paintEvent(self, ev):
updateR = ev.rect() updateR = ev.rect()
p = qt.TQPainter(self) p = tqt.TQPainter(self)
if updateR.intersects(self.cannonRect()): if updateR.intersects(self.cannonRect()):
self.paintCannon(p) self.paintCannon(p)
@ -108,21 +108,21 @@ class CannonField(qt.TQWidget):
self.paintShot(p) self.paintShot(p)
def paintShot(self, p): def paintShot(self, p):
p.setBrush(qt.TQt.black) p.setBrush(tqt.TQt.black)
p.setPen(qt.TQt.NoPen) p.setPen(tqt.TQt.NoPen)
p.drawRect(self.shotRect()) p.drawRect(self.shotRect())
def paintCannon(self, p): def paintCannon(self, p):
cr = self.cannonRect() cr = self.cannonRect()
pix = qt.TQPixmap(cr.size()) pix = tqt.TQPixmap(cr.size())
pix.fill(self, cr.topLeft()) pix.fill(self, cr.topLeft())
tmp = qt.TQPainter(pix) tmp = tqt.TQPainter(pix)
tmp.setBrush(qt.TQt.blue) tmp.setBrush(tqt.TQt.blue)
tmp.setPen(qt.TQt.NoPen) tmp.setPen(tqt.TQt.NoPen)
tmp.translate(0, pix.height() - 1) tmp.translate(0, pix.height() - 1)
tmp.drawPie(qt.TQRect(-35, -35, 70, 70), 0, 90 * 16) tmp.drawPie(tqt.TQRect(-35, -35, 70, 70), 0, 90 * 16)
tmp.rotate(-self.ang) tmp.rotate(-self.ang)
tmp.drawRect(self.barrelRect) tmp.drawRect(self.barrelRect)
tmp.end() tmp.end()
@ -130,7 +130,7 @@ class CannonField(qt.TQWidget):
p.drawPixmap(cr.topLeft(), pix) p.drawPixmap(cr.topLeft(), pix)
def cannonRect(self): def cannonRect(self):
r = qt.TQRect(0, 0, 50, 50) r = tqt.TQRect(0, 0, 50, 50)
r.moveBottomLeft(self.rect().bottomLeft()) r.moveBottomLeft(self.rect().bottomLeft())
return r return r
@ -148,21 +148,21 @@ class CannonField(qt.TQWidget):
x = x0 + velx * time x = x0 + velx * time
y = y0 + vely * time - 0.5 * gravity * time * time y = y0 + vely * time - 0.5 * gravity * time * time
r = qt.TQRect(0, 0, 6, 6) r = tqt.TQRect(0, 0, 6, 6)
r.moveCenter(qt.TQPoint(int(x), int(self.height() - 1 - y))) r.moveCenter(tqt.TQPoint(int(x), int(self.height() - 1 - y)))
return r return r
def sizePolicy(self): def sizePolicy(self):
return qt.TQSizePolicy(qt.TQSizePolicy.Expanding, qt.TQSizePolicy.Expanding) return tqt.TQSizePolicy(tqt.TQSizePolicy.Expanding, tqt.TQSizePolicy.Expanding)
class MyWidget(qt.TQWidget): class MyWidget(tqt.TQWidget):
def __init__(self, parent=None, name=None): def __init__(self, parent=None, name=None):
qt.TQWidget.__init__(self, parent, name) tqt.TQWidget.__init__(self, parent, name)
quit = qt.TQPushButton("&Quit", self, "quit") quit = tqt.TQPushButton("&Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(tqt.TQFont("Times", 18, tqt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()")) self.connect(quit, tqt.SIGNAL("clicked()"), tqt.tqApp, tqt.SLOT("quit()"))
self.angle = LCDRange(self, "angle") self.angle = LCDRange(self, "angle")
self.angle.setRange(5, 70) self.angle.setRange(5, 70)
@ -172,28 +172,28 @@ class MyWidget(qt.TQWidget):
self.cannonField = CannonField(self, "cannonField") self.cannonField = CannonField(self, "cannonField")
self.connect(self.angle, qt.PYSIGNAL("valueChanged(int)"), self.cannonField.setAngle) self.connect(self.angle, tqt.PYSIGNAL("valueChanged(int)"), self.cannonField.setAngle)
self.connect(self.cannonField, qt.PYSIGNAL("angleChanged(int)"), self.angle.setValue) self.connect(self.cannonField, tqt.PYSIGNAL("angleChanged(int)"), self.angle.setValue)
self.connect(self.force, qt.PYSIGNAL("valueChanged(int)"), self.cannonField.setForce) self.connect(self.force, tqt.PYSIGNAL("valueChanged(int)"), self.cannonField.setForce)
self.connect(self.cannonField, qt.PYSIGNAL("forceChanged(int)"), self.force.setValue) self.connect(self.cannonField, tqt.PYSIGNAL("forceChanged(int)"), self.force.setValue)
shoot = qt.TQPushButton("&Shoot", self, "shoot") shoot = tqt.TQPushButton("&Shoot", self, "shoot")
shoot.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) shoot.setFont(tqt.TQFont("Times", 18, tqt.TQFont.Bold))
self.connect(shoot, qt.SIGNAL("clicked()"), self.cannonField.shoot) self.connect(shoot, tqt.SIGNAL("clicked()"), self.cannonField.shoot)
grid = qt.TQGridLayout(self, 2, 2, 10) grid = tqt.TQGridLayout(self, 2, 2, 10)
grid.addWidget(quit, 0, 0) grid.addWidget(quit, 0, 0)
grid.addWidget(self.cannonField, 1, 1) grid.addWidget(self.cannonField, 1, 1)
grid.setColStretch(1, 10) grid.setColStretch(1, 10)
leftBox = qt.TQVBoxLayout() leftBox = tqt.TQVBoxLayout()
grid.addLayout(leftBox, 1, 0) grid.addLayout(leftBox, 1, 0)
leftBox.addWidget(self.angle) leftBox.addWidget(self.angle)
leftBox.addWidget(self.force) leftBox.addWidget(self.force)
topBox = qt.TQHBoxLayout() topBox = tqt.TQHBoxLayout()
grid.addLayout(topBox, 0, 1) grid.addLayout(topBox, 0, 1)
topBox.addWidget(shoot) topBox.addWidget(shoot)
topBox.addStretch(1) topBox.addStretch(1)
@ -203,8 +203,8 @@ class MyWidget(qt.TQWidget):
self.angle.setFocus() self.angle.setFocus()
qt.TQApplication.setColorSpec(qt.TQApplication.CustomColor) qt.TQApplication.setColorSpec(tqt.TQApplication.CustomColor)
a = qt.TQApplication(sys.argv) a = tqt.TQApplication(sys.argv)
w = MyWidget() w = MyWidget()
w.setGeometry(100, 100, 500, 355) w.setGeometry(100, 100, 500, 355)

@ -5,23 +5,23 @@
import sys import sys
import math import math
import random import random
from PyTQt import qt from PyTQt import tqt
class LCDRange(qt.TQVBox): class LCDRange(tqt.TQVBox):
def __init__(self, s=None, parent=None, name=None): def __init__(self, s=None, parent=None, name=None):
qt.TQVBox.__init__(self, parent, name) tqt.TQVBox.__init__(self, parent, name)
lcd = qt.TQLCDNumber(2, self, "lcd") lcd = tqt.TQLCDNumber(2, self, "lcd")
self.slider = qt.TQSlider(qt.TQt.Horizontal, self, "slider") self.slider = tqt.TQSlider(tqt.TQt.Horizontal, self, "slider")
self.slider.setRange(0, 99) self.slider.setRange(0, 99)
self.slider.setValue(0) self.slider.setValue(0)
self.label = qt.TQLabel(" ", self, "label") self.label = tqt.TQLabel(" ", self, "label")
self.label.setAlignment(qt.TQt.AlignCenter) self.label.setAlignment(tqt.TQt.AlignCenter)
self.connect(self.slider, qt.SIGNAL("valueChanged(int)"), lcd, qt.SLOT("display(int)")) self.connect(self.slider, tqt.SIGNAL("valueChanged(int)"), lcd, tqt.SLOT("display(int)"))
self.connect(self.slider, qt.SIGNAL("valueChanged(int)"), self, qt.PYSIGNAL("valueChanged(int)")) self.connect(self.slider, tqt.SIGNAL("valueChanged(int)"), self, tqt.PYSIGNAL("valueChanged(int)"))
self.setFocusProxy(self.slider) self.setFocusProxy(self.slider)
@ -47,24 +47,24 @@ class LCDRange(qt.TQVBox):
self.label.setText(s) self.label.setText(s)
class CannonField(qt.TQWidget): class CannonField(tqt.TQWidget):
def __init__(self, parent=None, name=None): def __init__(self, parent=None, name=None):
qt.TQWidget.__init__(self, parent, name) tqt.TQWidget.__init__(self, parent, name)
self.ang = 45 self.ang = 45
self.f = 0 self.f = 0
self.timerCount = 0 self.timerCount = 0
self.autoShootTimer = qt.TQTimer(self, "movement handler") self.autoShootTimer = tqt.TQTimer(self, "movement handler")
self.connect(self.autoShootTimer, qt.SIGNAL("timeout()"), self.moveShot) self.connect(self.autoShootTimer, tqt.SIGNAL("timeout()"), self.moveShot)
self.shoot_ang = 0 self.shoot_ang = 0
self.shoot_f = 0 self.shoot_f = 0
self.target = qt.TQPoint(0, 0) self.target = tqt.TQPoint(0, 0)
self.setPalette(qt.TQPalette(qt.TQColor(250, 250, 200))) self.setPalette(tqt.TQPalette(tqt.TQColor(250, 250, 200)))
self.barrelRect = qt.TQRect(33, -4, 15, 8) self.barrelRect = tqt.TQRect(33, -4, 15, 8)
self.newTarget() self.newTarget()
@ -80,7 +80,7 @@ class CannonField(qt.TQWidget):
return return
self.ang = degrees self.ang = degrees
self.repaint(self.cannonRect(), 0) self.repaint(self.cannonRect(), 0)
self.emit(qt.PYSIGNAL("angleChanged(int)"), (self.ang, )) self.emit(tqt.PYSIGNAL("angleChanged(int)"), (self.ang, ))
def force(self): def force(self):
return self.f return self.f
@ -91,7 +91,7 @@ class CannonField(qt.TQWidget):
if self.f == newton: if self.f == newton:
return return
self.f = newton self.f = newton
self.emit(qt.PYSIGNAL("forceChanged(int)"), (self.f, )) self.emit(tqt.PYSIGNAL("forceChanged(int)"), (self.f, ))
def shoot(self): def shoot(self):
if self.autoShootTimer.isActive(): if self.autoShootTimer.isActive():
@ -103,30 +103,30 @@ class CannonField(qt.TQWidget):
self.autoShootTimer.start(50) self.autoShootTimer.start(50)
def newTarget(self): def newTarget(self):
r = qt.TQRegion(self.targetRect()) r = tqt.TQRegion(self.targetRect())
self.target = qt.TQPoint(random.randint(200, 390), random.randint(10, 265)) self.target = tqt.TQPoint(random.randint(200, 390), random.randint(10, 265))
self.repaint(r.unite(qt.TQRegion(self.targetRect()))) self.repaint(r.unite(tqt.TQRegion(self.targetRect())))
def moveShot(self): def moveShot(self):
r = qt.TQRegion(self.shotRect()) r = tqt.TQRegion(self.shotRect())
self.timerCount = self.timerCount + 1 self.timerCount = self.timerCount + 1
shotR = self.shotRect() shotR = self.shotRect()
if shotR.intersects(self.targetRect()): if shotR.intersects(self.targetRect()):
self.autoShootTimer.stop() self.autoShootTimer.stop()
self.emit(qt.PYSIGNAL("hit()"), ()) self.emit(tqt.PYSIGNAL("hit()"), ())
elif shotR.x() > self.width() or shotR.y() > self.height(): elif shotR.x() > self.width() or shotR.y() > self.height():
self.autoShootTimer.stop() self.autoShootTimer.stop()
self.emit(qt.PYSIGNAL("missed()"), ()) self.emit(tqt.PYSIGNAL("missed()"), ())
else: else:
r = r.unite(qt.TQRegion(shotR)) r = r.unite(tqt.TQRegion(shotR))
self.repaint(r) self.repaint(r)
def paintEvent(self, ev): def paintEvent(self, ev):
updateR = ev.rect() updateR = ev.rect()
p = qt.TQPainter(self) p = tqt.TQPainter(self)
if updateR.intersects(self.cannonRect()): if updateR.intersects(self.cannonRect()):
self.paintCannon(p) self.paintCannon(p)
@ -138,26 +138,26 @@ class CannonField(qt.TQWidget):
self.paintTarget(p) self.paintTarget(p)
def paintShot(self, p): def paintShot(self, p):
p.setBrush(qt.TQt.black) p.setBrush(tqt.TQt.black)
p.setPen(qt.TQt.NoPen) p.setPen(tqt.TQt.NoPen)
p.drawRect(self.shotRect()) p.drawRect(self.shotRect())
def paintTarget(self, p): def paintTarget(self, p):
p.setBrush(qt.TQt.red) p.setBrush(tqt.TQt.red)
p.setPen(qt.TQt.black) p.setPen(tqt.TQt.black)
p.drawRect(self.targetRect()) p.drawRect(self.targetRect())
def paintCannon(self, p): def paintCannon(self, p):
cr = self.cannonRect() cr = self.cannonRect()
pix = qt.TQPixmap(cr.size()) pix = tqt.TQPixmap(cr.size())
pix.fill(self, cr.topLeft()) pix.fill(self, cr.topLeft())
tmp = qt.TQPainter(pix) tmp = tqt.TQPainter(pix)
tmp.setBrush(qt.TQt.blue) tmp.setBrush(tqt.TQt.blue)
tmp.setPen(qt.TQt.NoPen) tmp.setPen(tqt.TQt.NoPen)
tmp.translate(0, pix.height() - 1) tmp.translate(0, pix.height() - 1)
tmp.drawPie(qt.TQRect(-35, -35, 70, 70), 0, 90 * 16) tmp.drawPie(tqt.TQRect(-35, -35, 70, 70), 0, 90 * 16)
tmp.rotate(-self.ang) tmp.rotate(-self.ang)
tmp.drawRect(self.barrelRect) tmp.drawRect(self.barrelRect)
tmp.end() tmp.end()
@ -165,7 +165,7 @@ class CannonField(qt.TQWidget):
p.drawPixmap(cr.topLeft(), pix) p.drawPixmap(cr.topLeft(), pix)
def cannonRect(self): def cannonRect(self):
r = qt.TQRect(0, 0, 50, 50) r = tqt.TQRect(0, 0, 50, 50)
r.moveBottomLeft(self.rect().bottomLeft()) r.moveBottomLeft(self.rect().bottomLeft())
return r return r
@ -183,26 +183,26 @@ class CannonField(qt.TQWidget):
x = x0 + velx * time x = x0 + velx * time
y = y0 + vely * time - 0.5 * gravity * time * time y = y0 + vely * time - 0.5 * gravity * time * time
r = qt.TQRect(0, 0, 6, 6) r = tqt.TQRect(0, 0, 6, 6)
r.moveCenter(qt.TQPoint(int(x), int(self.height() - 1 - y))) r.moveCenter(tqt.TQPoint(int(x), int(self.height() - 1 - y)))
return r return r
def targetRect(self): def targetRect(self):
r = qt.TQRect(0, 0, 20, 10) r = tqt.TQRect(0, 0, 20, 10)
r.moveCenter(qt.TQPoint(self.target.x(), self.height() - 1 - self.target.y())) r.moveCenter(tqt.TQPoint(self.target.x(), self.height() - 1 - self.target.y()))
return r return r
def sizePolicy(self): def sizePolicy(self):
return qt.TQSizePolicy(qt.TQSizePolicy.Expanding, qt.TQSizePolicy.Expanding) return tqt.TQSizePolicy(tqt.TQSizePolicy.Expanding, tqt.TQSizePolicy.Expanding)
class MyWidget(qt.TQWidget): class MyWidget(tqt.TQWidget):
def __init__(self, parent=None, name=None): def __init__(self, parent=None, name=None):
qt.TQWidget.__init__(self, parent, name) tqt.TQWidget.__init__(self, parent, name)
quit = qt.TQPushButton("&Quit", self, "quit") quit = tqt.TQPushButton("&Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(tqt.TQFont("Times", 18, tqt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()")) self.connect(quit, tqt.SIGNAL("clicked()"), tqt.tqApp, tqt.SLOT("quit()"))
self.angle = LCDRange("ANGLE", self, "angle") self.angle = LCDRange("ANGLE", self, "angle")
self.angle.setRange(5, 70) self.angle.setRange(5, 70)
@ -212,28 +212,28 @@ class MyWidget(qt.TQWidget):
self.cannonField = CannonField(self, "cannonField") self.cannonField = CannonField(self, "cannonField")
self.connect(self.angle, qt.PYSIGNAL("valueChanged(int)"), self.cannonField.setAngle) self.connect(self.angle, tqt.PYSIGNAL("valueChanged(int)"), self.cannonField.setAngle)
self.connect(self.cannonField, qt.PYSIGNAL("angleChanged(int)"), self.angle.setValue) self.connect(self.cannonField, tqt.PYSIGNAL("angleChanged(int)"), self.angle.setValue)
self.connect(self.force, qt.PYSIGNAL("valueChanged(int)"), self.cannonField.setForce) self.connect(self.force, tqt.PYSIGNAL("valueChanged(int)"), self.cannonField.setForce)
self.connect(self.cannonField, qt.PYSIGNAL("forceChanged(int)"), self.force.setValue) self.connect(self.cannonField, tqt.PYSIGNAL("forceChanged(int)"), self.force.setValue)
shoot = qt.TQPushButton("&Shoot", self, "shoot") shoot = tqt.TQPushButton("&Shoot", self, "shoot")
shoot.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) shoot.setFont(tqt.TQFont("Times", 18, tqt.TQFont.Bold))
self.connect(shoot, qt.SIGNAL("clicked()"), self.cannonField.shoot) self.connect(shoot, tqt.SIGNAL("clicked()"), self.cannonField.shoot)
grid = qt.TQGridLayout(self, 2, 2, 10) grid = tqt.TQGridLayout(self, 2, 2, 10)
grid.addWidget(quit, 0, 0) grid.addWidget(quit, 0, 0)
grid.addWidget(self.cannonField, 1, 1) grid.addWidget(self.cannonField, 1, 1)
grid.setColStretch(1, 10) grid.setColStretch(1, 10)
leftBox = qt.TQVBoxLayout() leftBox = tqt.TQVBoxLayout()
grid.addLayout(leftBox, 1, 0) grid.addLayout(leftBox, 1, 0)
leftBox.addWidget(self.angle) leftBox.addWidget(self.angle)
leftBox.addWidget(self.force) leftBox.addWidget(self.force)
topBox = qt.TQHBoxLayout() topBox = tqt.TQHBoxLayout()
grid.addLayout(topBox, 0, 1) grid.addLayout(topBox, 0, 1)
topBox.addWidget(shoot) topBox.addWidget(shoot)
topBox.addStretch(1) topBox.addStretch(1)
@ -243,8 +243,8 @@ class MyWidget(qt.TQWidget):
self.angle.setFocus() self.angle.setFocus()
qt.TQApplication.setColorSpec(qt.TQApplication.CustomColor) qt.TQApplication.setColorSpec(tqt.TQApplication.CustomColor)
a = qt.TQApplication(sys.argv) a = tqt.TQApplication(sys.argv)
w = MyWidget() w = MyWidget()
w.setGeometry(100, 100, 500, 355) w.setGeometry(100, 100, 500, 355)

@ -5,27 +5,27 @@
import sys import sys
import math import math
import random import random
from PyTQt import qt from PyTQt import tqt
class LCDRange(qt.TQWidget): class LCDRange(tqt.TQWidget):
def __init__(self, s=None, parent=None, name=None): def __init__(self, s=None, parent=None, name=None):
qt.TQWidget.__init__(self, parent, name) tqt.TQWidget.__init__(self, parent, name)
lcd = qt.TQLCDNumber(2, self, "lcd") lcd = tqt.TQLCDNumber(2, self, "lcd")
self.slider = qt.TQSlider(qt.TQt.Horizontal, self, "slider") self.slider = tqt.TQSlider(tqt.TQt.Horizontal, self, "slider")
self.slider.setRange(0, 99) self.slider.setRange(0, 99)
self.slider.setValue(0) self.slider.setValue(0)
self.label = qt.TQLabel(" ", self, "label") self.label = tqt.TQLabel(" ", self, "label")
self.label.setAlignment(qt.TQt.AlignCenter) self.label.setAlignment(tqt.TQt.AlignCenter)
self.connect(self.slider, qt.SIGNAL("valueChanged(int)"), lcd, qt.SLOT("display(int)")) self.connect(self.slider, tqt.SIGNAL("valueChanged(int)"), lcd, tqt.SLOT("display(int)"))
self.connect(self.slider, qt.SIGNAL("valueChanged(int)"), self, qt.PYSIGNAL("valueChanged(int)")) self.connect(self.slider, tqt.SIGNAL("valueChanged(int)"), self, tqt.PYSIGNAL("valueChanged(int)"))
self.setFocusProxy(self.slider) self.setFocusProxy(self.slider)
l = qt.TQVBoxLayout(self) l = tqt.TQVBoxLayout(self)
l.addWidget(lcd, 1) l.addWidget(lcd, 1)
l.addWidget(self.slider) l.addWidget(self.slider)
l.addWidget(self.label) l.addWidget(self.label)
@ -52,25 +52,25 @@ class LCDRange(qt.TQWidget):
self.label.setText(s) self.label.setText(s)
class CannonField(qt.TQWidget): class CannonField(tqt.TQWidget):
def __init__(self, parent=None, name=None): def __init__(self, parent=None, name=None):
qt.TQWidget.__init__(self, parent, name) tqt.TQWidget.__init__(self, parent, name)
self.ang = 45 self.ang = 45
self.f = 0 self.f = 0
self.timerCount = 0 self.timerCount = 0
self.autoShootTimer = qt.TQTimer(self, "movement handler") self.autoShootTimer = tqt.TQTimer(self, "movement handler")
self.connect(self.autoShootTimer, qt.SIGNAL("timeout()"), self.moveShot) self.connect(self.autoShootTimer, tqt.SIGNAL("timeout()"), self.moveShot)
self.shoot_ang = 0 self.shoot_ang = 0
self.shoot_f = 0 self.shoot_f = 0
self.target = qt.TQPoint(0, 0) self.target = tqt.TQPoint(0, 0)
self.gameEnded = 0 self.gameEnded = 0
self.setPalette(qt.TQPalette(qt.TQColor(250, 250, 200))) self.setPalette(tqt.TQPalette(tqt.TQColor(250, 250, 200)))
self.barrelRect = qt.TQRect(33, -4, 15, 8) self.barrelRect = tqt.TQRect(33, -4, 15, 8)
self.newTarget() self.newTarget()
@ -86,7 +86,7 @@ class CannonField(qt.TQWidget):
return return
self.ang = degrees self.ang = degrees
self.repaint(self.cannonRect(), 0) self.repaint(self.cannonRect(), 0)
self.emit(qt.PYSIGNAL("angleChanged(int)"), (self.ang, )) self.emit(tqt.PYSIGNAL("angleChanged(int)"), (self.ang, ))
def force(self): def force(self):
return self.f return self.f
@ -97,7 +97,7 @@ class CannonField(qt.TQWidget):
if self.f == newton: if self.f == newton:
return return
self.f = newton self.f = newton
self.emit(qt.PYSIGNAL("forceChanged(int)"), (self.f, )) self.emit(tqt.PYSIGNAL("forceChanged(int)"), (self.f, ))
def shoot(self): def shoot(self):
if self.isShooting(): if self.isShooting():
@ -107,12 +107,12 @@ class CannonField(qt.TQWidget):
self.shoot_ang = self.ang self.shoot_ang = self.ang
self.shoot_f = self.f self.shoot_f = self.f
self.autoShootTimer.start(50) self.autoShootTimer.start(50)
self.emit(qt.PYSIGNAL("canShoot(bool)"), (0, )) self.emit(tqt.PYSIGNAL("canShoot(bool)"), (0, ))
def newTarget(self): def newTarget(self):
r = qt.TQRegion(self.targetRect()) r = tqt.TQRegion(self.targetRect())
self.target = qt.TQPoint(random.randint(200, 390), random.randint(10, 265)) self.target = tqt.TQPoint(random.randint(200, 390), random.randint(10, 265))
self.repaint(r.unite(qt.TQRegion(self.targetRect()))) self.repaint(r.unite(tqt.TQRegion(self.targetRect())))
def gameOver(self): def gameOver(self):
return self.gameEnded return self.gameEnded
@ -130,35 +130,35 @@ class CannonField(qt.TQWidget):
self.autoShootTime.stop() self.autoShootTime.stop()
self.gameEnded = 0 self.gameEnded = 0
self.repaint() self.repaint()
self.emit(qt.PYSIGNAL("canShoot(bool)"), (1, )) self.emit(tqt.PYSIGNAL("canShoot(bool)"), (1, ))
def moveShot(self): def moveShot(self):
r = qt.TQRegion(self.shotRect()) r = tqt.TQRegion(self.shotRect())
self.timerCount = self.timerCount + 1 self.timerCount = self.timerCount + 1
shotR = self.shotRect() shotR = self.shotRect()
if shotR.intersects(self.targetRect()): if shotR.intersects(self.targetRect()):
self.autoShootTimer.stop() self.autoShootTimer.stop()
self.emit(qt.PYSIGNAL("hit()"), ()) self.emit(tqt.PYSIGNAL("hit()"), ())
self.emit(qt.PYSIGNAL("canShoot(bool)"), (1, )) self.emit(tqt.PYSIGNAL("canShoot(bool)"), (1, ))
elif shotR.x() > self.width() or shotR.y() > self.height(): elif shotR.x() > self.width() or shotR.y() > self.height():
self.autoShootTimer.stop() self.autoShootTimer.stop()
self.emit(qt.PYSIGNAL("missed()"), ()) self.emit(tqt.PYSIGNAL("missed()"), ())
self.emit(qt.PYSIGNAL("canShoot(bool)"), (1, )) self.emit(tqt.PYSIGNAL("canShoot(bool)"), (1, ))
else: else:
r = r.unite(qt.TQRegion(shotR)) r = r.unite(tqt.TQRegion(shotR))
self.repaint(r) self.repaint(r)
def paintEvent(self, ev): def paintEvent(self, ev):
updateR = ev.rect() updateR = ev.rect()
p = qt.TQPainter(self) p = tqt.TQPainter(self)
if self.gameEnded: if self.gameEnded:
p.setPen(qt.TQt.black) p.setPen(tqt.TQt.black)
p.setFont(qt.TQFont("Courier", 48, qt.TQFont.Bold)) p.setFont(tqt.TQFont("Courier", 48, tqt.TQFont.Bold))
p.drawText(self.rect(), qt.TQt.AlignCenter, "Game Over") p.drawText(self.rect(), tqt.TQt.AlignCenter, "Game Over")
if updateR.intersects(self.cannonRect()): if updateR.intersects(self.cannonRect()):
self.paintCannon(p) self.paintCannon(p)
@ -170,26 +170,26 @@ class CannonField(qt.TQWidget):
self.paintTarget(p) self.paintTarget(p)
def paintShot(self, p): def paintShot(self, p):
p.setBrush(qt.TQt.black) p.setBrush(tqt.TQt.black)
p.setPen(qt.TQt.NoPen) p.setPen(tqt.TQt.NoPen)
p.drawRect(self.shotRect()) p.drawRect(self.shotRect())
def paintTarget(self, p): def paintTarget(self, p):
p.setBrush(qt.TQt.red) p.setBrush(tqt.TQt.red)
p.setPen(qt.TQt.black) p.setPen(tqt.TQt.black)
p.drawRect(self.targetRect()) p.drawRect(self.targetRect())
def paintCannon(self, p): def paintCannon(self, p):
cr = self.cannonRect() cr = self.cannonRect()
pix = qt.TQPixmap(cr.size()) pix = tqt.TQPixmap(cr.size())
pix.fill(self, cr.topLeft()) pix.fill(self, cr.topLeft())
tmp = qt.TQPainter(pix) tmp = tqt.TQPainter(pix)
tmp.setBrush(qt.TQt.blue) tmp.setBrush(tqt.TQt.blue)
tmp.setPen(qt.TQt.NoPen) tmp.setPen(tqt.TQt.NoPen)
tmp.translate(0, pix.height() - 1) tmp.translate(0, pix.height() - 1)
tmp.drawPie(qt.TQRect(-35, -35, 70, 70), 0, 90 * 16) tmp.drawPie(tqt.TQRect(-35, -35, 70, 70), 0, 90 * 16)
tmp.rotate(-self.ang) tmp.rotate(-self.ang)
tmp.drawRect(self.barrelRect) tmp.drawRect(self.barrelRect)
tmp.end() tmp.end()
@ -197,7 +197,7 @@ class CannonField(qt.TQWidget):
p.drawPixmap(cr.topLeft(), pix) p.drawPixmap(cr.topLeft(), pix)
def cannonRect(self): def cannonRect(self):
r = qt.TQRect(0, 0, 50, 50) r = tqt.TQRect(0, 0, 50, 50)
r.moveBottomLeft(self.rect().bottomLeft()) r.moveBottomLeft(self.rect().bottomLeft())
return r return r
@ -215,29 +215,29 @@ class CannonField(qt.TQWidget):
x = x0 + velx * time x = x0 + velx * time
y = y0 + vely * time - 0.5 * gravity * time * time y = y0 + vely * time - 0.5 * gravity * time * time
r = qt.TQRect(0, 0, 6, 6) r = tqt.TQRect(0, 0, 6, 6)
r.moveCenter(qt.TQPoint(int(x), int(self.height() - 1 - y))) r.moveCenter(tqt.TQPoint(int(x), int(self.height() - 1 - y)))
return r return r
def targetRect(self): def targetRect(self):
r = qt.TQRect(0, 0, 20, 10) r = tqt.TQRect(0, 0, 20, 10)
r.moveCenter(qt.TQPoint(self.target.x(), self.height() - 1 - self.target.y())) r.moveCenter(tqt.TQPoint(self.target.x(), self.height() - 1 - self.target.y()))
return r return r
def isShooting(self): def isShooting(self):
return self.autoShootTimer.isActive() return self.autoShootTimer.isActive()
def sizePolicy(self): def sizePolicy(self):
return qt.TQSizePolicy(qt.TQSizePolicy.Expanding, qt.TQSizePolicy.Expanding) return tqt.TQSizePolicy(tqt.TQSizePolicy.Expanding, tqt.TQSizePolicy.Expanding)
class GameBoard(qt.TQWidget): class GameBoard(tqt.TQWidget):
def __init__(self, parent=None, name=None): def __init__(self, parent=None, name=None):
qt.TQWidget.__init__(self, parent, name) tqt.TQWidget.__init__(self, parent, name)
quit = qt.TQPushButton("&Quit", self, "quit") quit = tqt.TQPushButton("&Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(tqt.TQFont("Times", 18, tqt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()")) self.connect(quit, tqt.SIGNAL("clicked()"), tqt.tqApp, tqt.SLOT("quit()"))
self.angle = LCDRange("ANGLE", self, "angle") self.angle = LCDRange("ANGLE", self, "angle")
self.angle.setRange(5, 70) self.angle.setRange(5, 70)
@ -247,40 +247,40 @@ class GameBoard(qt.TQWidget):
self.cannonField = CannonField(self, "cannonField") self.cannonField = CannonField(self, "cannonField")
self.connect(self.angle, qt.PYSIGNAL("valueChanged(int)"), self.cannonField.setAngle) self.connect(self.angle, tqt.PYSIGNAL("valueChanged(int)"), self.cannonField.setAngle)
self.connect(self.cannonField, qt.PYSIGNAL("angleChanged(int)"), self.angle.setValue) self.connect(self.cannonField, tqt.PYSIGNAL("angleChanged(int)"), self.angle.setValue)
self.connect(self.force, qt.PYSIGNAL("valueChanged(int)"), self.cannonField.setForce) self.connect(self.force, tqt.PYSIGNAL("valueChanged(int)"), self.cannonField.setForce)
self.connect(self.cannonField, qt.PYSIGNAL("forceChanged(int)"), self.force.setValue) self.connect(self.cannonField, tqt.PYSIGNAL("forceChanged(int)"), self.force.setValue)
self.connect(self.cannonField, qt.PYSIGNAL("hit()"), self.hit) self.connect(self.cannonField, tqt.PYSIGNAL("hit()"), self.hit)
self.connect(self.cannonField, qt.PYSIGNAL("missed()"), self.missed) self.connect(self.cannonField, tqt.PYSIGNAL("missed()"), self.missed)
self.shoot = qt.TQPushButton("&Shoot", self, "shoot") self.shoot = tqt.TQPushButton("&Shoot", self, "shoot")
self.shoot.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) self.shoot.setFont(tqt.TQFont("Times", 18, tqt.TQFont.Bold))
self.connect(self.shoot, qt.SIGNAL("clicked()"), self.fire) self.connect(self.shoot, tqt.SIGNAL("clicked()"), self.fire)
self.connect(self.cannonField, qt.PYSIGNAL("canShoot(bool)"), self.shoot, qt.SLOT("setEnabled(bool)")) self.connect(self.cannonField, tqt.PYSIGNAL("canShoot(bool)"), self.shoot, tqt.SLOT("setEnabled(bool)"))
restart = qt.TQPushButton("&New Game", self, "newgame") restart = tqt.TQPushButton("&New Game", self, "newgame")
restart.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) restart.setFont(tqt.TQFont("Times", 18, tqt.TQFont.Bold))
self.connect(restart, qt.SIGNAL("clicked()"), self.newGame) self.connect(restart, tqt.SIGNAL("clicked()"), self.newGame)
self.hits = qt.TQLCDNumber(2, self, "hits") self.hits = tqt.TQLCDNumber(2, self, "hits")
self.shotsLeft = qt.TQLCDNumber(2, self, "shotsleft") self.shotsLeft = tqt.TQLCDNumber(2, self, "shotsleft")
hitsL = qt.TQLabel("HITS", self, "hitsLabel") hitsL = tqt.TQLabel("HITS", self, "hitsLabel")
shotsLeftL = qt.TQLabel("SHOTS LEFT", self, "shotsleftLabel") shotsLeftL = tqt.TQLabel("SHOTS LEFT", self, "shotsleftLabel")
grid = qt.TQGridLayout(self, 2, 2, 10) grid = tqt.TQGridLayout(self, 2, 2, 10)
grid.addWidget(quit, 0, 0) grid.addWidget(quit, 0, 0)
grid.addWidget(self.cannonField, 1, 1) grid.addWidget(self.cannonField, 1, 1)
grid.setColStretch(1, 10) grid.setColStretch(1, 10)
leftBox = qt.TQVBoxLayout() leftBox tqt.TQVBoxLayout()
grid.addLayout(leftBox, 1, 0) grid.addLayout(leftBox, 1, 0)
leftBox.addWidget(self.angle) leftBox.addWidget(self.angle)
leftBox.addWidget(self.force) leftBox.addWidget(self.force)
topBox = qt.TQHBoxLayout() topBox = tqt.TQHBoxLayout()
grid.addLayout(topBox, 0, 1) grid.addLayout(topBox, 0, 1)
topBox.addWidget(self.shoot) topBox.addWidget(self.shoot)
topBox.addWidget(self.hits) topBox.addWidget(self.hits)
@ -320,8 +320,8 @@ class GameBoard(qt.TQWidget):
self.cannonField.newTarget() self.cannonField.newTarget()
qt.TQApplication.setColorSpec(qt.TQApplication.CustomColor) qt.TQApplication.setColorSpec(tqt.TQApplication.CustomColor)
a = qt.TQApplication(sys.argv) a = tqt.TQApplication(sys.argv)
gb = GameBoard() gb = GameBoard()
gb.setGeometry(100, 100, 500, 355) gb.setGeometry(100, 100, 500, 355)

@ -5,27 +5,27 @@
import sys import sys
import math import math
import random import random
from PyTQt import qt from PyTQt import tqt
class LCDRange(qt.TQWidget): class LCDRange(tqt.TQWidget):
def __init__(self, s=None, parent=None, name=None): def __init__(self, s=None, parent=None, name=None):
qt.TQWidget.__init__(self, parent, name) tqt.TQWidget.__init__(self, parent, name)
lcd = qt.TQLCDNumber(2, self, "lcd") lcd = tqt.TQLCDNumber(2, self, "lcd")
self.slider = qt.TQSlider(qt.TQt.Horizontal, self, "slider") self.slider = tqt.TQSlider(tqt.TQt.Horizontal, self, "slider")
self.slider.setRange(0, 99) self.slider.setRange(0, 99)
self.slider.setValue(0) self.slider.setValue(0)
self.label = qt.TQLabel(" ", self, "label") self.label = tqt.TQLabel(" ", self, "label")
self.label.setAlignment(qt.TQt.AlignCenter) self.label.setAlignment(tqt.TQt.AlignCenter)
self.connect(self.slider, qt.SIGNAL("valueChanged(int)"), lcd, qt.SLOT("display(int)")) self.connect(self.slider, tqt.SIGNAL("valueChanged(int)"), lcd, tqt.SLOT("display(int)"))
self.connect(self.slider, qt.SIGNAL("valueChanged(int)"), self, qt.PYSIGNAL("valueChanged(int)")) self.connect(self.slider, tqt.SIGNAL("valueChanged(int)"), self, tqt.PYSIGNAL("valueChanged(int)"))
self.setFocusProxy(self.slider) self.setFocusProxy(self.slider)
l = qt.TQVBoxLayout(self) l = tqt.TQVBoxLayout(self)
l.addWidget(lcd, 1) l.addWidget(lcd, 1)
l.addWidget(self.slider) l.addWidget(self.slider)
l.addWidget(self.label) l.addWidget(self.label)
@ -52,26 +52,26 @@ class LCDRange(qt.TQWidget):
self.label.setText(s) self.label.setText(s)
class CannonField(qt.TQWidget): class CannonField(tqt.TQWidget):
def __init__(self, parent=None, name=None): def __init__(self, parent=None, name=None):
qt.TQWidget.__init__(self, parent, name) tqt.TQWidget.__init__(self, parent, name)
self.ang = 45 self.ang = 45
self.f = 0 self.f = 0
self.timerCount = 0 self.timerCount = 0
self.autoShootTimer = qt.TQTimer(self, "movement handler") self.autoShootTimer = tqt.TQTimer(self, "movement handler")
self.connect(self.autoShootTimer, qt.SIGNAL("timeout()"), self.moveShot) self.connect(self.autoShootTimer, tqt.SIGNAL("timeout()"), self.moveShot)
self.shoot_ang = 0 self.shoot_ang = 0
self.shoot_f = 0 self.shoot_f = 0
self.target = qt.TQPoint(0, 0) self.target = tqt.TQPoint(0, 0)
self.gameEnded = 0 self.gameEnded = 0
self.barrelPressed = 0 self.barrelPressed = 0
self.setPalette(qt.TQPalette(qt.TQColor(250, 250, 200))) self.setPalette(tqt.TQPalette(tqt.TQColor(250, 250, 200)))
self.barrelRect = qt.TQRect(33, -4, 15, 8) self.barrelRect = tqt.TQRect(33, -4, 15, 8)
self.newTarget() self.newTarget()
@ -87,7 +87,7 @@ class CannonField(qt.TQWidget):
return return
self.ang = degrees self.ang = degrees
self.repaint(self.cannonRect(), 0) self.repaint(self.cannonRect(), 0)
self.emit(qt.PYSIGNAL("angleChanged(int)"), (self.ang, )) self.emit(tqt.PYSIGNAL("angleChanged(int)"), (self.ang, ))
def force(self): def force(self):
return self.f return self.f
@ -98,7 +98,7 @@ class CannonField(qt.TQWidget):
if self.f == newton: if self.f == newton:
return return
self.f = newton self.f = newton
self.emit(qt.PYSIGNAL("forceChanged(int)"), (self.f, )) self.emit(tqt.PYSIGNAL("forceChanged(int)"), (self.f, ))
def shoot(self): def shoot(self):
if self.isShooting(): if self.isShooting():
@ -108,12 +108,12 @@ class CannonField(qt.TQWidget):
self.shoot_ang = self.ang self.shoot_ang = self.ang
self.shoot_f = self.f self.shoot_f = self.f
self.autoShootTimer.start(50) self.autoShootTimer.start(50)
self.emit(qt.PYSIGNAL("canShoot(bool)"), (0, )) self.emit(tqt.PYSIGNAL("canShoot(bool)"), (0, ))
def newTarget(self): def newTarget(self):
r = qt.TQRegion(self.targetRect()) r = tqt.TQRegion(self.targetRect())
self.target = qt.TQPoint(random.randint(200, 390), random.randint(10, 265)) self.target = tqt.TQPoint(random.randint(200, 390), random.randint(10, 265))
self.repaint(r.unite(qt.TQRegion(self.targetRect()))) self.repaint(r.unite(tqt.TQRegion(self.targetRect())))
def gameOver(self): def gameOver(self):
return self.gameEnded return self.gameEnded
@ -131,29 +131,29 @@ class CannonField(qt.TQWidget):
self.autoShootTime.stop() self.autoShootTime.stop()
self.gameEnded = 0 self.gameEnded = 0
self.repaint() self.repaint()
self.emit(qt.PYSIGNAL("canShoot(bool)"), (1, )) self.emit(tqt.PYSIGNAL("canShoot(bool)"), (1, ))
def moveShot(self): def moveShot(self):
r = qt.TQRegion(self.shotRect()) r = tqt.TQRegion(self.shotRect())
self.timerCount = self.timerCount + 1 self.timerCount = self.timerCount + 1
shotR = self.shotRect() shotR = self.shotRect()
if shotR.intersects(self.targetRect()): if shotR.intersects(self.targetRect()):
self.autoShootTimer.stop() self.autoShootTimer.stop()
self.emit(qt.PYSIGNAL("hit()"), ()) self.emit(tqt.PYSIGNAL("hit()"), ())
self.emit(qt.PYSIGNAL("canShoot(bool)"), (1, )) self.emit(tqt.PYSIGNAL("canShoot(bool)"), (1, ))
elif shotR.x() > self.width() or shotR.y() > self.height() or shotR.intersects(self.barrierRect()): elif shotR.x() > self.width() or shotR.y() > self.height() or shotR.intersects(self.barrierRect()):
self.autoShootTimer.stop() self.autoShootTimer.stop()
self.emit(qt.PYSIGNAL("missed()"), ()) self.emit(tqt.PYSIGNAL("missed()"), ())
self.emit(qt.PYSIGNAL("canShoot(bool)"), (1, )) self.emit(tqt.PYSIGNAL("canShoot(bool)"), (1, ))
else: else:
r = r.unite(qt.TQRegion(shotR)) r = r.unite(tqt.TQRegion(shotR))
self.repaint(r) self.repaint(r)
def mousePressEvent(self, ev): def mousePressEvent(self, ev):
if ev.button() != qt.TQt.LeftButton: if ev.button() != tqt.TQt.LeftButton:
return return
if self.barrelHit(ev.pos()): if self.barrelHit(ev.pos()):
self.barrelPressed = 1 self.barrelPressed = 1
@ -170,17 +170,17 @@ class CannonField(qt.TQWidget):
self.setAngle(int(round(rad * 180 / math.pi))) self.setAngle(int(round(rad * 180 / math.pi)))
def mouseReleaseEvent(self, ev): def mouseReleaseEvent(self, ev):
if ev.button() == qt.TQt.LeftButton: if ev.button() == tqt.TQt.LeftButton:
self.barrelPressed = 0 self.barrelPressed = 0
def paintEvent(self, ev): def paintEvent(self, ev):
updateR = ev.rect() updateR = ev.rect()
p = qt.TQPainter(self) p = tqt.TQPainter(self)
if self.gameEnded: if self.gameEnded:
p.setPen(qt.TQt.black) p.setPen(tqt.TQt.black)
p.setFont(qt.TQFont("Courier", 48, qt.TQFont.Bold)) p.setFont(tqt.TQFont("Courier", 48, tqt.TQFont.Bold))
p.drawText(self.rect(), qt.TQt.AlignCenter, "Game Over") p.drawText(self.rect(), tqt.TQt.AlignCenter, "Game Over")
if updateR.intersects(self.cannonRect()): if updateR.intersects(self.cannonRect()):
self.paintCannon(p) self.paintCannon(p)
@ -195,31 +195,31 @@ class CannonField(qt.TQWidget):
self.paintTarget(p) self.paintTarget(p)
def paintShot(self, p): def paintShot(self, p):
p.setBrush(qt.TQt.black) p.setBrush(tqt.TQt.black)
p.setPen(qt.TQt.NoPen) p.setPen(tqt.TQt.NoPen)
p.drawRect(self.shotRect()) p.drawRect(self.shotRect())
def paintTarget(self, p): def paintTarget(self, p):
p.setBrush(qt.TQt.red) p.setBrush(tqt.TQt.red)
p.setPen(qt.TQt.black) p.setPen(tqt.TQt.black)
p.drawRect(self.targetRect()) p.drawRect(self.targetRect())
def paintBarrier(self, p): def paintBarrier(self, p):
p.setBrush(qt.TQt.yellow) p.setBrush(tqt.TQt.yellow)
p.setPen(qt.TQt.black) p.setPen(tqt.TQt.black)
p.drawRect(self.barrierRect()) p.drawRect(self.barrierRect())
def paintCannon(self, p): def paintCannon(self, p):
cr = self.cannonRect() cr = self.cannonRect()
pix = qt.TQPixmap(cr.size()) pix = tqt.TQPixmap(cr.size())
pix.fill(self, cr.topLeft()) pix.fill(self, cr.topLeft())
tmp = qt.TQPainter(pix) tmp = tqt.TQPainter(pix)
tmp.setBrush(qt.TQt.blue) tmp.setBrush(tqt.TQt.blue)
tmp.setPen(qt.TQt.NoPen) tmp.setPen(tqt.TQt.NoPen)
tmp.translate(0, pix.height() - 1) tmp.translate(0, pix.height() - 1)
tmp.drawPie(qt.TQRect(-35, -35, 70, 70), 0, 90 * 16) tmp.drawPie(tqt.TQRect(-35, -35, 70, 70), 0, 90 * 16)
tmp.rotate(-self.ang) tmp.rotate(-self.ang)
tmp.drawRect(self.barrelRect) tmp.drawRect(self.barrelRect)
tmp.end() tmp.end()
@ -227,7 +227,7 @@ class CannonField(qt.TQWidget):
p.drawPixmap(cr.topLeft(), pix) p.drawPixmap(cr.topLeft(), pix)
def cannonRect(self): def cannonRect(self):
r = qt.TQRect(0, 0, 50, 50) r = tqt.TQRect(0, 0, 50, 50)
r.moveBottomLeft(self.rect().bottomLeft()) r.moveBottomLeft(self.rect().bottomLeft())
return r return r
@ -245,20 +245,20 @@ class CannonField(qt.TQWidget):
x = x0 + velx * time x = x0 + velx * time
y = y0 + vely * time - 0.5 * gravity * time * time y = y0 + vely * time - 0.5 * gravity * time * time
r = qt.TQRect(0, 0, 6, 6) r = tqt.TQRect(0, 0, 6, 6)
r.moveCenter(qt.TQPoint(int(x), int(self.height() - 1 - y))) r.moveCenter(tqt.TQPoint(int(x), int(self.height() - 1 - y)))
return r return r
def targetRect(self): def targetRect(self):
r = qt.TQRect(0, 0, 20, 10) r = tqt.TQRect(0, 0, 20, 10)
r.moveCenter(qt.TQPoint(self.target.x(), self.height() - 1 - self.target.y())) r.moveCenter(tqt.TQPoint(self.target.x(), self.height() - 1 - self.target.y()))
return r return r
def barrierRect(self): def barrierRect(self):
return qt.TQRect(145, self.height() - 100, 15, 100) return tqt.TQRect(145, self.height() - 100, 15, 100)
def barrelHit(self, p): def barrelHit(self, p):
mtx = qt.TQWMatrix() mtx = tqt.TQWMatrix()
mtx.translate(0, self.height() - 1) mtx.translate(0, self.height() - 1)
mtx.rotate(-self.ang) mtx.rotate(-self.ang)
(mtx, invertable) = mtx.invert() (mtx, invertable) = mtx.invert()
@ -268,16 +268,16 @@ class CannonField(qt.TQWidget):
return self.autoShootTimer.isActive() return self.autoShootTimer.isActive()
def sizePolicy(self): def sizePolicy(self):
return qt.TQSizePolicy(qt.TQSizePolicy.Expanding, qt.TQSizePolicy.Expanding) return tqt.TQSizePolicy(tqt.TQSizePolicy.Expanding, tqt.TQSizePolicy.Expanding)
class GameBoard(qt.TQWidget): class GameBoard(tqt.TQWidget):
def __init__(self, parent=None, name=None): def __init__(self, parent=None, name=None):
qt.TQWidget.__init__(self, parent, name) tqt.TQWidget.__init__(self, parent, name)
quit = qt.TQPushButton("&Quit", self, "quit") quit = tqt.TQPushButton("&Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(tqt.TQFont("Times", 18, tqt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()")) self.connect(quit, tqt.SIGNAL("clicked()"), tqt.tqApp, tqt.SLOT("quit()"))
self.angle = LCDRange("ANGLE", self, "angle") self.angle = LCDRange("ANGLE", self, "angle")
self.angle.setRange(5, 70) self.angle.setRange(5, 70)
@ -285,50 +285,50 @@ class GameBoard(qt.TQWidget):
self.force = LCDRange("FORCE", self, "force") self.force = LCDRange("FORCE", self, "force")
self.force.setRange(10, 50) self.force.setRange(10, 50)
box = qt.TQVBox(self, "cannonFrame") box = tqt.TQVBox(self, "cannonFrame")
box.setFrameStyle(qt.TQFrame.WinPanel | qt.TQFrame.Sunken) box.setFrameStyle(tqt.TQFrame.WinPanel | tqt.TQFrame.Sunken)
self.cannonField = CannonField(box, "cannonField") self.cannonField = CannonField(box, "cannonField")
self.connect(self.angle, qt.PYSIGNAL("valueChanged(int)"), self.cannonField.setAngle) self.connect(self.angle, tqt.PYSIGNAL("valueChanged(int)"), self.cannonField.setAngle)
self.connect(self.cannonField, qt.PYSIGNAL("angleChanged(int)"), self.angle.setValue) self.connect(self.cannonField, tqt.PYSIGNAL("angleChanged(int)"), self.angle.setValue)
self.connect(self.force, qt.PYSIGNAL("valueChanged(int)"), self.cannonField.setForce) self.connect(self.force, tqt.PYSIGNAL("valueChanged(int)"), self.cannonField.setForce)
self.connect(self.cannonField, qt.PYSIGNAL("forceChanged(int)"), self.force.setValue) self.connect(self.cannonField, tqt.PYSIGNAL("forceChanged(int)"), self.force.setValue)
self.connect(self.cannonField, qt.PYSIGNAL("hit()"), self.hit) self.connect(self.cannonField, tqt.PYSIGNAL("hit()"), self.hit)
self.connect(self.cannonField, qt.PYSIGNAL("missed()"), self.missed) self.connect(self.cannonField, tqt.PYSIGNAL("missed()"), self.missed)
self.shoot = qt.TQPushButton("&Shoot", self, "shoot") self.shoot = tqt.TQPushButton("&Shoot", self, "shoot")
self.shoot.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) self.shoot.setFont(tqt.TQFont("Times", 18, tqt.TQFont.Bold))
self.connect(self.shoot, qt.SIGNAL("clicked()"), self.fire) self.connect(self.shoot, tqt.SIGNAL("clicked()"), self.fire)
self.connect(self.cannonField, qt.PYSIGNAL("canShoot(bool)"), self.shoot, qt.SLOT("setEnabled(bool)")) self.connect(self.cannonField, tqt.PYSIGNAL("canShoot(bool)"), self.shoot, tqt.SLOT("setEnabled(bool)"))
restart = qt.TQPushButton("&New Game", self, "newgame") restart = tqt.TQPushButton("&New Game", self, "newgame")
restart.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) restart.setFont(tqt.TQFont("Times", 18, tqt.TQFont.Bold))
self.connect(restart, qt.SIGNAL("clicked()"), self.newGame) self.connect(restart, tqt.SIGNAL("clicked()"), self.newGame)
self.hits = qt.TQLCDNumber(2, self, "hits") self.hits = tqt.TQLCDNumber(2, self, "hits")
self.shotsLeft = qt.TQLCDNumber(2, self, "shotsleft") self.shotsLeft = tqt.TQLCDNumber(2, self, "shotsleft")
hitsL = qt.TQLabel("HITS", self, "hitsLabel") hitsL = tqt.TQLabel("HITS", self, "hitsLabel")
shotsLeftL = qt.TQLabel("SHOTS LEFT", self, "shotsleftLabel") shotsLeftL = tqt.TQLabel("SHOTS LEFT", self, "shotsleftLabel")
accel = qt.TQAccel(self) accel = tqt.TQAccel(self)
accel.connectItem(accel.insertItem(qt.TQt.Key_Enter), self.fire) accel.connectItem(accel.insertItem(tqt.TQt.Key_Enter), self.fire)
accel.connectItem(accel.insertItem(qt.TQt.Key_Return), self.fire) accel.connectItem(accel.insertItem(tqt.TQt.Key_Return), self.fire)
accel.connectItem(accel.insertItem(qt.TQt.CTRL + qt.TQt.Key_Q), qt.tqApp, qt.SLOT("quit()")) accel.connectItem(accel.insertItem(tqt.TQt.CTRL + tqt.TQt.Key_Q), tqt.tqApp, tqt.SLOT("quit()"))
grid = qt.TQGridLayout(self, 2, 2, 10) grid = tqt.TQGridLayout(self, 2, 2, 10)
grid.addWidget(quit, 0, 0) grid.addWidget(quit, 0, 0)
grid.addWidget(box, 1, 1) grid.addWidget(box, 1, 1)
grid.setColStretch(1, 10) grid.setColStretch(1, 10)
leftBox = qt.TQVBoxLayout() leftBox = tqt.TQVBoxLayout()
grid.addLayout(leftBox, 1, 0) grid.addLayout(leftBox, 1, 0)
leftBox.addWidget(self.angle) leftBox.addWidget(self.angle)
leftBox.addWidget(self.force) leftBox.addWidget(self.force)
topBox = qt.TQHBoxLayout() topBox = tqt.TQHBoxLayout()
grid.addLayout(topBox, 0, 1) grid.addLayout(topBox, 0, 1)
topBox.addWidget(self.shoot) topBox.addWidget(self.shoot)
topBox.addWidget(self.hits) topBox.addWidget(self.hits)
@ -368,8 +368,8 @@ class GameBoard(qt.TQWidget):
self.cannonField.newTarget() self.cannonField.newTarget()
qt.TQApplication.setColorSpec(qt.TQApplication.CustomColor) qt.TQApplication.setColorSpec(tqt.TQApplication.CustomColor)
a = qt.TQApplication(sys.argv) a = tqt.TQApplication(sys.argv)
gb = GameBoard() gb = GameBoard()
gb.setGeometry(100, 100, 500, 355) gb.setGeometry(100, 100, 500, 355)

@ -3,16 +3,16 @@
# TQt tutorial 2. # TQt tutorial 2.
import sys import sys
from PyTQt import qt from PyTQt import tqt
a = qt.TQApplication(sys.argv) a = tqt.TQApplication(sys.argv)
quit = qt.TQPushButton("Quit", None) quit = tqt.TQPushButton("Quit", None)
quit.resize(75, 30) quit.resize(75, 30)
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(tqt.TQFont("Times", 18, tqt.TQFont.Bold))
qt.TQObject.connect(quit, qt.SIGNAL("clicked()"), a, qt.SLOT("quit()")) qt.TQObject.connect(quit, tqt.SIGNAL("clicked()"), a, tqt.SLOT("quit()"))
a.setMainWidget(quit) a.setMainWidget(quit)
quit.show() quit.show()

@ -3,18 +3,18 @@
# TQt tutorial 3. # TQt tutorial 3.
import sys import sys
from PyTQt import qt from PyTQt import tqt
a = qt.TQApplication(sys.argv) a = tqt.TQApplication(sys.argv)
box = qt.TQVBox() box = tqt.TQVBox()
box.resize(200, 120) box.resize(200, 120)
quit = qt.TQPushButton("Quit", box) quit = tqt.TQPushButton("Quit", box)
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(tqt.TQFont("Times", 18, tqt.TQFont.Bold))
qt.TQObject.connect(quit, qt.SIGNAL("clicked()"), a, qt.SLOT("quit()")) qt.TQObject.connect(quit, tqt.SIGNAL("clicked()"), a, tqt.SLOT("quit()"))
a.setMainWidget(box) a.setMainWidget(box)
box.show() box.show()

@ -3,24 +3,24 @@
# TQt tutorial 4. # TQt tutorial 4.
import sys import sys
from PyTQt import qt from PyTQt import tqt
class MyWidget(qt.TQWidget): class MyWidget(tqt.TQWidget):
def __init__(self, parent=None, name=None): def __init__(self, parent=None, name=None):
qt.TQWidget.__init__(self, parent, name) tqt.TQWidget.__init__(self, parent, name)
self.setMinimumSize(200, 120) self.setMinimumSize(200, 120)
self.setMaximumSize(200, 120) self.setMaximumSize(200, 120)
quit = qt.TQPushButton("Quit", self, "quit") quit = tqt.TQPushButton("Quit", self, "quit")
quit.setGeometry(62, 40, 75, 30) quit.setGeometry(62, 40, 75, 30)
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(tqt.TQFont("Times", 18, tqt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()")) self.connect(quit, tqt.SIGNAL("clicked()"), tqt.tqApp, tqt.SLOT("quit()"))
a = qt.TQApplication(sys.argv) a = tqt.TQApplication(sys.argv)
w = MyWidget() w = MyWidget()
w.setGeometry(100, 100, 200, 120) w.setGeometry(100, 100, 200, 120)

@ -3,28 +3,28 @@
# TQt tutorial 5. # TQt tutorial 5.
import sys import sys
from PyTQt import qt from PyTQt import tqt
class MyWidget(qt.TQVBox): class MyWidget(tqt.TQVBox):
def __init__(self, parent=None, name=None): def __init__(self, parent=None, name=None):
qt.TQVBox.__init__(self, parent, name) tqt.TQVBox.__init__(self, parent, name)
quit = qt.TQPushButton("Quit", self, "quit") quit = tqt.TQPushButton("Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(tqt.TQFont("Times", 18, tqt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()")) self.connect(quit, tqt.SIGNAL("clicked()"), tqt.tqApp, tqt.SLOT("quit()"))
lcd = qt.TQLCDNumber(2, self, "lcd") lcd = tqt.TQLCDNumber(2, self, "lcd")
slider = qt.TQSlider(qt.TQt.Horizontal, self, "slider") slider = tqt.TQSlider(tqt.TQt.Horizontal, self, "slider")
slider.setRange(0, 99) slider.setRange(0, 99)
slider.setValue(0) slider.setValue(0)
self.connect(slider, qt.SIGNAL("valueChanged(int)"), lcd, qt.SLOT("display(int)")) self.connect(slider, tqt.SIGNAL("valueChanged(int)"), lcd, tqt.SLOT("display(int)"))
a = qt.TQApplication(sys.argv) a = tqt.TQApplication(sys.argv)
w = MyWidget() w = MyWidget()
a.setMainWidget(w) a.setMainWidget(w)

@ -3,37 +3,37 @@
# TQt tutorial 6. # TQt tutorial 6.
import sys import sys
from PyTQt import qt from PyTQt import tqt
class LCDRange(qt.TQVBox): class LCDRange(tqt.TQVBox):
def __init__(self, parent=None, name=None): def __init__(self, parent=None, name=None):
qt.TQVBox.__init__(self, parent, name) tqt.TQVBox.__init__(self, parent, name)
lcd = qt.TQLCDNumber(2, self, "lcd") lcd = tqt.TQLCDNumber(2, self, "lcd")
slider = qt.TQSlider(qt.TQt.Horizontal, self, "slider") slider = tqt.TQSlider(tqt.TQt.Horizontal, self, "slider")
slider.setRange(0, 99) slider.setRange(0, 99)
slider.setValue(0) slider.setValue(0)
self.connect(slider, qt.SIGNAL("valueChanged(int)"), lcd, qt.SLOT("display(int)")) self.connect(slider, tqt.SIGNAL("valueChanged(int)"), lcd, tqt.SLOT("display(int)"))
class MyWidget(qt.TQVBox): class MyWidget(tqt.TQVBox):
def __init__(self, parent=None, name=None): def __init__(self, parent=None, name=None):
qt.TQVBox.__init__(self, parent, name) tqt.TQVBox.__init__(self, parent, name)
quit = qt.TQPushButton("Quit", self, "quit") quit = tqt.TQPushButton("Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(tqt.TQFont("Times", 18, tqt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()")) self.connect(quit, tqt.SIGNAL("clicked()"), tqt.tqApp, tqt.SLOT("quit()"))
grid = qt.TQGrid(4, self) grid = tqt.TQGrid(4, self)
for c in range(4): for c in range(4):
for r in range(4): for r in range(4):
LCDRange(grid) LCDRange(grid)
a = qt.TQApplication(sys.argv) a = tqt.TQApplication(sys.argv)
w = MyWidget() w = MyWidget()
a.setMainWidget(w) a.setMainWidget(w)

@ -3,19 +3,19 @@
# TQt tutorial 7. # TQt tutorial 7.
import sys import sys
from PyTQt import qt from PyTQt import tqt
class LCDRange(qt.TQVBox): class LCDRange(tqt.TQVBox):
def __init__(self, parent=None, name=None): def __init__(self, parent=None, name=None):
qt.TQVBox.__init__(self, parent, name) tqt.TQVBox.__init__(self, parent, name)
lcd = qt.TQLCDNumber(2, self, "lcd") lcd = tqt.TQLCDNumber(2, self, "lcd")
self.slider = qt.TQSlider(qt.TQt.Horizontal, self, "slider") self.slider = tqt.TQSlider(tqt.TQt.Horizontal, self, "slider")
self.slider.setRange(0, 99) self.slider.setRange(0, 99)
self.slider.setValue(0) self.slider.setValue(0)
self.connect(self.slider, qt.SIGNAL("valueChanged(int)"), lcd, qt.SLOT("display(int)")) self.connect(self.slider, tqt.SIGNAL("valueChanged(int)"), lcd, tqt.SLOT("display(int)"))
self.connect(self.slider, qt.SIGNAL("valueChanged(int)"), self, qt.PYSIGNAL("valueChanged(int)")) self.connect(self.slider, tqt.SIGNAL("valueChanged(int)"), self, tqt.PYSIGNAL("valueChanged(int)"))
def value(self): def value(self):
return self.slider.value() return self.slider.value()
@ -24,16 +24,16 @@ class LCDRange(qt.TQVBox):
self.slider.setValue(value) self.slider.setValue(value)
class MyWidget(qt.TQVBox): class MyWidget(tqt.TQVBox):
def __init__(self, parent=None, name=None): def __init__(self, parent=None, name=None):
qt.TQVBox.__init__(self, parent, name) tqt.TQVBox.__init__(self, parent, name)
quit = qt.TQPushButton("Quit", self, "quit") quit = tqt.TQPushButton("Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(tqt.TQFont("Times", 18, tqt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()")) self.connect(quit, tqt.SIGNAL("clicked()"), tqt.tqApp, tqt.SLOT("quit()"))
grid = qt.TQGrid(4, self) grid = tqt.TQGrid(4, self)
self.lcdlist = [] self.lcdlist = []
previous = None previous = None
@ -43,13 +43,13 @@ class MyWidget(qt.TQVBox):
lr = LCDRange(grid) lr = LCDRange(grid)
if previous: if previous:
self.connect(lr, qt.PYSIGNAL("valueChanged(int)"), previous.setValue) self.connect(lr, tqt.PYSIGNAL("valueChanged(int)"), previous.setValue)
previous = lr previous = lr
self.lcdlist.append(lr) self.lcdlist.append(lr)
a = qt.TQApplication(sys.argv) a = tqt.TQApplication(sys.argv)
w = MyWidget() w = MyWidget()
a.setMainWidget(w) a.setMainWidget(w)

@ -3,19 +3,19 @@
# TQt tutorial 8. # TQt tutorial 8.
import sys import sys
from PyTQt import qt from PyTQt import tqt
class LCDRange(qt.TQVBox): class LCDRange(tqt.TQVBox):
def __init__(self, parent=None, name=None): def __init__(self, parent=None, name=None):
qt.TQVBox.__init__(self, parent, name) tqt.TQVBox.__init__(self, parent, name)
lcd = qt.TQLCDNumber(2, self, "lcd") lcd = tqt.TQLCDNumber(2, self, "lcd")
self.slider = qt.TQSlider(qt.TQt.Horizontal, self, "slider") self.slider = tqt.TQSlider(tqt.TQt.Horizontal, self, "slider")
self.slider.setRange(0, 99) self.slider.setRange(0, 99)
self.slider.setValue(0) self.slider.setValue(0)
self.connect(self.slider, qt.SIGNAL("valueChanged(int)"), lcd, qt.SLOT("display(int)")) self.connect(self.slider, tqt.SIGNAL("valueChanged(int)"), lcd, tqt.SLOT("display(int)"))
self.connect(self.slider, qt.SIGNAL("valueChanged(int)"), self, qt.PYSIGNAL("valueChanged(int)")) self.connect(self.slider, tqt.SIGNAL("valueChanged(int)"), self, tqt.PYSIGNAL("valueChanged(int)"))
self.setFocusProxy(self.slider) self.setFocusProxy(self.slider)
@ -32,12 +32,12 @@ class LCDRange(qt.TQVBox):
self.slider.setRange(minVal, maxVal) self.slider.setRange(minVal, maxVal)
class CannonField(qt.TQWidget): class CannonField(tqt.TQWidget):
def __init__(self, parent=None, name=None): def __init__(self, parent=None, name=None):
qt.TQWidget.__init__(self, parent, name) tqt.TQWidget.__init__(self, parent, name)
self.ang = 45 self.ang = 45
self.setPalette(qt.TQPalette(qt.TQColor(250, 250, 200))) self.setPalette(tqt.TQPalette(tqt.TQColor(250, 250, 200)))
def angle(self): def angle(self):
return self.ang return self.ang
@ -51,36 +51,36 @@ class CannonField(qt.TQWidget):
return return
self.ang = degrees self.ang = degrees
self.repaint() self.repaint()
self.emit(qt.PYSIGNAL("angleChanged(int)"), (self.ang, )) self.emit(tqt.PYSIGNAL("angleChanged(int)"), (self.ang, ))
def paintEvent(self, ev): def paintEvent(self, ev):
p = qt.TQPainter(self) p = tqt.TQPainter(self)
p.drawText(200, 200, "Angle = %d" % (self.ang)) p.drawText(200, 200, "Angle = %d" % (self.ang))
def sizePolicy(self): def sizePolicy(self):
return qt.TQSizePolicy(qt.TQSizePolicy.Expanding, qt.TQSizePolicy.Expanding) return tqt.TQSizePolicy(tqt.TQSizePolicy.Expanding, tqt.TQSizePolicy.Expanding)
class MyWidget(qt.TQWidget): class MyWidget(tqt.TQWidget):
def __init__(self, parent=None, name=None): def __init__(self, parent=None, name=None):
qt.TQWidget.__init__(self, parent, name) tqt.TQWidget.__init__(self, parent, name)
quit = qt.TQPushButton("Quit", self, "quit") quit = tqt.TQPushButton("Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(tqt.TQFont("Times", 18, tqt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()")) self.connect(quit, tqt.SIGNAL("clicked()"), tqt.tqApp, tqt.SLOT("quit()"))
self.angle = LCDRange(self, "angle") self.angle = LCDRange(self, "angle")
self.angle.setRange(5, 70) self.angle.setRange(5, 70)
self.cannonField = CannonField(self, "cannonField") self.cannonField = CannonField(self, "cannonField")
self.connect(self.angle, qt.PYSIGNAL("valueChanged(int)"), self.cannonField.setAngle) self.connect(self.angle, tqt.PYSIGNAL("valueChanged(int)"), self.cannonField.setAngle)
self.connect(self.cannonField, qt.PYSIGNAL("angleChanged(int)"), self.angle.setValue) self.connect(self.cannonField, tqt.PYSIGNAL("angleChanged(int)"), self.angle.setValue)
grid = qt.TQGridLayout(self, 2, 2, 10) grid = tqt.TQGridLayout(self, 2, 2, 10)
grid.addWidget(quit, 0, 0) grid.addWidget(quit, 0, 0)
grid.addWidget(self.angle, 1, 0, qt.TQt.AlignTop) grid.addWidget(self.angle, 1, 0, tqt.TQt.AlignTop)
grid.addWidget(self.cannonField, 1, 1) grid.addWidget(self.cannonField, 1, 1)
grid.setColStretch(1, 10) grid.setColStretch(1, 10)
@ -88,7 +88,7 @@ class MyWidget(qt.TQWidget):
self.angle.setFocus() self.angle.setFocus()
a = qt.TQApplication(sys.argv) a = tqt.TQApplication(sys.argv)
w = MyWidget() w = MyWidget()
w.setGeometry(100, 100, 500, 355) w.setGeometry(100, 100, 500, 355)

@ -3,19 +3,19 @@
# TQt tutorial 9. # TQt tutorial 9.
import sys import sys
from PyTQt import qt from PyTQt import tqt
class LCDRange(qt.TQVBox): class LCDRange(tqt.TQVBox):
def __init__(self, parent=None, name=None): def __init__(self, parent=None, name=None):
qt.TQVBox.__init__(self, parent, name) tqt.TQVBox.__init__(self, parent, name)
lcd = qt.TQLCDNumber(2, self, "lcd") lcd = tqt.TQLCDNumber(2, self, "lcd")
self.slider = qt.TQSlider(qt.TQt.Horizontal, self, "slider") self.slider = tqt.TQSlider(tqt.TQt.Horizontal, self, "slider")
self.slider.setRange(0, 99) self.slider.setRange(0, 99)
self.slider.setValue(0) self.slider.setValue(0)
self.connect(self.slider, qt.SIGNAL("valueChanged(int)"), lcd, qt.SLOT("display(int)")) self.connect(self.slider, tqt.SIGNAL("valueChanged(int)"), lcd, tqt.SLOT("display(int)"))
self.connect(self.slider, qt.SIGNAL("valueChanged(int)"), self, qt.PYSIGNAL("valueChanged(int)")) self.connect(self.slider, tqt.SIGNAL("valueChanged(int)"), self, tqt.PYSIGNAL("valueChanged(int)"))
self.setFocusProxy(self.slider) self.setFocusProxy(self.slider)
@ -31,12 +31,12 @@ class LCDRange(qt.TQVBox):
self.slider.setRange(minVal, maxVal) self.slider.setRange(minVal, maxVal)
class CannonField(qt.TQWidget): class CannonField(tqt.TQWidget):
def __init__(self, parent=None, name=None): def __init__(self, parent=None, name=None):
qt.TQWidget.__init__(self, parent, name) tqt.TQWidget.__init__(self, parent, name)
self.ang = 45 self.ang = 45
self.setPalette(qt.TQPalette(qt.TQColor(250, 250, 200))) self.setPalette(tqt.TQPalette(tqt.TQColor(250, 250, 200)))
def angle(self): def angle(self):
return self.ang return self.ang
@ -50,43 +50,43 @@ class CannonField(qt.TQWidget):
return return
self.ang = degrees self.ang = degrees
self.repaint() self.repaint()
self.emit(qt.PYSIGNAL("angleChanged(int)"), (self.ang, )) self.emit(tqt.PYSIGNAL("angleChanged(int)"), (self.ang, ))
def paintEvent(self, ev): def paintEvent(self, ev):
p = qt.TQPainter(self) p = tqt.TQPainter(self)
p.setBrush(qt.TQt.blue) p.setBrush(tqt.TQt.blue)
p.setPen(qt.TQt.NoPen) p.setPen(tqt.TQt.NoPen)
p.translate(0, self.rect().bottom()) p.translate(0, self.rect().bottom())
p.drawPie(qt.TQRect(-35, -35, 70, 70), 0, 90 * 16) p.drawPie(tqt.TQRect(-35, -35, 70, 70), 0, 90 * 16)
p.rotate(-self.ang) p.rotate(-self.ang)
p.drawRect(qt.TQRect(33, -4, 15, 8)) p.drawRect(tqt.TQRect(33, -4, 15, 8))
def sizePolicy(self): def sizePolicy(self):
return qt.TQSizePolicy(qt.TQSizePolicy.Expanding, qt.TQSizePolicy.Expanding) return tqt.TQSizePolicy(tqt.TQSizePolicy.Expanding, tqt.TQSizePolicy.Expanding)
class MyWidget(qt.TQWidget): class MyWidget(tqt.TQWidget):
def __init__(self, parent=None, name=None): def __init__(self, parent=None, name=None):
qt.TQWidget.__init__(self, parent, name) tqt.TQWidget.__init__(self, parent, name)
quit = qt.TQPushButton("&Quit", self, "quit") quit = tqt.TQPushButton("&Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(tqt.TQFont("Times", 18, tqt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()")) self.connect(quit, tqt.SIGNAL("clicked()"), tqt.tqApp, tqt.SLOT("quit()"))
self.angle = LCDRange(self, "angle") self.angle = LCDRange(self, "angle")
self.angle.setRange(5, 70) self.angle.setRange(5, 70)
self.cannonField = CannonField(self, "cannonField") self.cannonField = CannonField(self, "cannonField")
self.connect(self.angle, qt.PYSIGNAL("valueChanged(int)"), self.cannonField.setAngle) self.connect(self.angle, tqt.PYSIGNAL("valueChanged(int)"), self.cannonField.setAngle)
self.connect(self.cannonField, qt.PYSIGNAL("angleChanged(int)"), self.angle.setValue) self.connect(self.cannonField, tqt.PYSIGNAL("angleChanged(int)"), self.angle.setValue)
grid = qt.TQGridLayout(self, 2, 2, 10) grid = tqt.TQGridLayout(self, 2, 2, 10)
grid.addWidget(quit, 0, 0) grid.addWidget(quit, 0, 0)
grid.addWidget(self.angle, 1, 0, qt.TQt.AlignTop) grid.addWidget(self.angle, 1, 0, tqt.TQt.AlignTop)
grid.addWidget(self.cannonField, 1, 1) grid.addWidget(self.cannonField, 1, 1)
grid.setColStretch(1, 10) grid.setColStretch(1, 10)
@ -94,8 +94,8 @@ class MyWidget(qt.TQWidget):
self.angle.setFocus() self.angle.setFocus()
qt.TQApplication.setColorSpec(qt.TQApplication.CustomColor) qt.TQApplication.setColorSpec(tqt.TQApplication.CustomColor)
a = qt.TQApplication(sys.argv) a = tqt.TQApplication(sys.argv)
w = MyWidget() w = MyWidget()
w.setGeometry(100, 100, 500, 355) w.setGeometry(100, 100, 500, 355)

@ -3,13 +3,13 @@
# Form implementation generated from reading ui file 'mainwindow.ui' # Form implementation generated from reading ui file 'mainwindow.ui'
# #
# Created: Sun Dec 5 14:50:47 2004 # Created: Sun Dec 5 14:50:47 2004
# by: The PyTQt User Interface Compiler (pyuic) snapshot-20041203 # by: The PyTQt User Interface Compiler (pytquic) snapshot-20041203
# #
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
from PyTQt.qt import * from PyTQt.tqt import *
from PyTQt.qtaxcontainer import TQAxWidget from PyTQt.tqtaxcontainer import TQAxWidget
image0_data = [ image0_data = [
"32 32 3 1", "32 32 3 1",
@ -925,7 +925,7 @@ class MainWindow(TQMainWindow):
self.setName("MainWindow") self.setName("MainWindow")
self.setCentralWidget(TQWidget(self,"qt_central_widget")) self.setCentralWidget(TQWidget(self,"tqt_central_widget"))
MainWindowLayout = TQHBoxLayout(self.centralWidget(),0,6,"MainWindowLayout") MainWindowLayout = TQHBoxLayout(self.centralWidget(),0,6,"MainWindowLayout")
self.Frame3 = TQFrame(self.centralWidget(),"Frame3") self.Frame3 = TQFrame(self.centralWidget(),"Frame3")

@ -7,21 +7,21 @@
import sys import sys
from PyTQt import qt from PyTQt import tqt
from PyTQt import qtaxcontainer from PyTQt import tqtaxcontainer
import mainwindow import mainwindow
class MainWindowImpl(mainwindow.MainWindow): class MainWindowImpl(mainwindow.MainWindow):
def init(self): def init(self):
self.pb = qt.TQProgressBar(self.statusBar()) self.pb = tqt.TQProgressBar(self.statusBar())
self.pb.setPercentageVisible(False) self.pb.setPercentageVisible(False)
self.pb.hide() self.pb.hide()
self.statusBar().addWidget(self.pb, 0, True) self.statusBar().addWidget(self.pb, 0, True)
self.connect(self.WebBrowser, qt.SIGNAL("ProgressChange(int,int)"), self.setProgress) self.connect(self.WebBrowser, tqt.SIGNAL("ProgressChange(int,int)"), self.setProgress)
self.connect(self.WebBrowser, qt.SIGNAL("StatusTextChange(const TQString&)"), self.statusBar(), qt.SLOT("message(const TQString&)")) self.connect(self.WebBrowser, tqt.SIGNAL("StatusTextChange(const TQString&)"), self.statusBar(), tqt.SLOT("message(const TQString&)"))
self.WebBrowser.dynamicCall("GoHome()"); self.WebBrowser.dynamicCall("GoHome()");
@ -29,7 +29,7 @@ class MainWindowImpl(mainwindow.MainWindow):
def go(self): def go(self):
self.actionStop.setEnabled(True) self.actionStop.setEnabled(True)
self.WebBrowser.dynamicCall("Navigate(const TQString&)", qt.TQVariant(self.addressEdit.text())) self.WebBrowser.dynamicCall("Navigate(const TQString&)", tqt.TQVariant(self.addressEdit.text()))
def setTitle(self, title): def setTitle(self, title):
self.setCaption("TQt WebBrowser - " + title.latin1()) self.setCaption("TQt WebBrowser - " + title.latin1())
@ -69,17 +69,17 @@ class MainWindowImpl(mainwindow.MainWindow):
self.subwindows += window self.subwindows += window
def aboutSlot(self): def aboutSlot(self):
qt.TQMessageBox.about(self, self.tr("About WebBrowser"), self.tr( tqt.TQMessageBox.about(self, self.tr("About WebBrowser"), self.tr(
"""This Example has been created using the ActiveTQt integration into TQt Designer. """This Example has been created using the ActiveTQt integration into TQt Designer.
It demonstrates the use of TQAxWidget to embed the Internet Explorer ActiveX It demonstrates the use of TQAxWidget to embed the Internet Explorer ActiveX
control into a TQt application.""")) control into a TQt application."""))
def aboutTQtSlot(self): def aboutTQtSlot(self):
qt.TQMessageBox.aboutTQt(self, self.tr("About TQt")) tqt.TQMessageBox.aboutTQt(self, self.tr("About TQt"))
def main(args): def main(args):
a = qt.TQApplication(args) a = tqt.TQApplication(args)
w = MainWindowImpl() w = MainWindowImpl()
a.setMainWidget(w) a.setMainWidget(w)
w.show() w.show()

@ -2,7 +2,7 @@
import sys, string import sys, string
from PyTQt.qt import * from PyTQt.tqt import *
# #
## Constructs an analog clock widget that uses an internal TQTimer. ## Constructs an analog clock widget that uses an internal TQTimer.
@ -36,7 +36,7 @@ class AnalogClock( TQWidget ):
# #
## The clock is painted using a 1000x1000 square coordinate system. ## The clock is painted using a 1000x1000 square coordinate system.
# #
def paintEvent( self, qe ): # paint clock def paintEvent( self, tqe ): # paint clock
if not self.isVisible(): # is is invisible if not self.isVisible(): # is is invisible
return return
self.time = TQTime.currentTime() # save current time self.time = TQTime.currentTime() # save current time
@ -192,10 +192,10 @@ class WidgetView ( TQWidget ):
self.connect( self.pb, SIGNAL("clicked()"), self.button1Clicked ) self.connect( self.pb, SIGNAL("clicked()"), self.button1Clicked )
TQToolTip.add( self.pb, "push button 1" ) TQToolTip.add( self.pb, "push button 1" )
self.pm = TQPixmap() self.pm = TQPixmap()
self.pix = self.pm.load( "qt.png" ) # load pixmap for button 2 self.pix = self.pm.load( "tqt.png" ) # load pixmap for button 2
if not self.pix: if not self.pix:
TQMessageBox.information( None, "TQt Widgets Example", TQMessageBox.information( None, "TQt Widgets Example",
"Could not load the file \"qt.png\", which\n" "Could not load the file \"tqt.png\", which\n"
"contains an icon used...\n\n" "contains an icon used...\n\n"
"The text \"line 42\" will be substituted.", "The text \"line 42\" will be substituted.",
TQMessageBox.Ok + TQMessageBox.Default ) TQMessageBox.Ok + TQMessageBox.Default )

@ -7,8 +7,8 @@ for m_path in sys.path:
m_sip_dir = os.path.join(m_path, 'sip4_tqt') m_sip_dir = os.path.join(m_path, 'sip4_tqt')
tqt_modules.insert(0, m_sip_dir) tqt_modules.insert(0, m_sip_dir)
if os.path.exists(os.path.join(m_path, 'PyTQt')): if os.path.exists(os.path.join(m_path, 'PyTQt')):
m_pyqt_dir = os.path.join(m_path, 'PyTQt') m_pytqt_dir = os.path.join(m_path, 'PyTQt')
tqt_modules.insert(0, m_pyqt_dir) tqt_modules.insert(0, m_pytqt_dir)
for m_path in tqt_modules: for m_path in tqt_modules:
sys.path.insert(0, m_path) sys.path.insert(0, m_path)
@ -31,22 +31,22 @@ def is_module_available(module_name):
# Base modules # Base modules
__all__ = [ __all__ = [
'qt', 'tqt',
'qtcanvas', 'tqtcanvas',
'qtnetwork', 'tqtnetwork',
'qttable', 'tqttable',
'qtsql', 'tqtsql',
'qtui', 'tqtui',
'qtxml', 'tqtxml',
] ]
# Optional modules # Optional modules
if is_module_available('qtaxcontainer'): if is_module_available('tqtaxcontainer'):
__all__.append('qtaxcontainer') __all__.append('tqtaxcontainer')
if is_module_available('qtext'): if is_module_available('tqtext'):
__all__.append('qtext') __all__.append('tqtext')
if is_module_available('qtgl'): if is_module_available('tqtgl'):
__all__.append('qtgl') __all__.append('tqtgl')
# Import namespaces # Import namespaces
from PyTQt import * from PyTQt import *

@ -444,7 +444,7 @@ void fetchtr_py( const char *fileName, MetaTranslator *tor,
yyInFile = fopen( fileName, "r" ); yyInFile = fopen( fileName, "r" );
if ( yyInFile == 0 ) { if ( yyInFile == 0 ) {
if ( mustExist ) if ( mustExist )
tqWarning( "pylupdate error: cannot open Python source file '%s': %s", tqWarning( "pytqlupdate error: cannot open Python source file '%s': %s",
fileName, strerror(errno) ); fileName, strerror(errno) );
return; return;
} }

@ -51,7 +51,7 @@ typedef TQValueList<MetaTranslatorMessage> TML;
static void printUsage() static void printUsage()
{ {
tqWarning( "Usage: pylupdate [options] file.pro...\n" tqWarning( "Usage: pytqlupdate [options] file.pro...\n"
"Options:\n" "Options:\n"
" -help Display this information and exits\n" " -help Display this information and exits\n"
" -noobsolete\n" " -noobsolete\n"
@ -59,7 +59,7 @@ static void printUsage()
" -verbose\n" " -verbose\n"
" Explain what is being done\n" " Explain what is being done\n"
" -version\n" " -version\n"
" Display the version of pylupdate and exits" ); " Display the version of pytqlupdate and exits" );
} }
int main( int argc, char **argv ) int main( int argc, char **argv )
@ -80,14 +80,14 @@ int main( int argc, char **argv )
verbose = TRUE; verbose = TRUE;
continue; continue;
} else if ( qstrcmp(argv[i], "-version") == 0 ) { } else if ( qstrcmp(argv[i], "-version") == 0 ) {
tqWarning( "pylupdate version %s", TQT_VERSION_STR ); tqWarning( "pytqlupdate version %s", TQT_VERSION_STR );
return 0; return 0;
} }
numProFiles++; numProFiles++;
TQFile f( argv[i] ); TQFile f( argv[i] );
if ( !f.open(IO_ReadOnly) ) { if ( !f.open(IO_ReadOnly) ) {
tqWarning( "pylupdate error: Cannot open project file '%s': %s", tqWarning( "pytqlupdate error: Cannot open project file '%s': %s",
argv[i], strerror(errno) ); argv[i], strerror(errno) );
return 1; return 1;
} }
@ -135,14 +135,14 @@ int main( int argc, char **argv )
tor.stripObsoleteMessages(); tor.stripObsoleteMessages();
tor.stripEmptyContexts(); tor.stripEmptyContexts();
if ( !tor.save(*tf) ) if ( !tor.save(*tf) )
tqWarning( "pylupdate error: Cannot save '%s': %s", (*tf).utf8(), tqWarning( "pytqlupdate error: Cannot save '%s': %s", (*tf).utf8(),
strerror(errno) ); strerror(errno) );
} }
if ( !metSomething ) { if ( !metSomething ) {
tqWarning( "pylupdate warning: File '%s' does not look like a project" tqWarning( "pytqlupdate warning: File '%s' does not look like a project"
" file", argv[i] ); " file", argv[i] );
} else if ( translatorFiles.isEmpty() ) { } else if ( translatorFiles.isEmpty() ) {
tqWarning( "pylupdate warning: Met no 'TRANSLATIONS' entry in project" tqWarning( "pytqlupdate warning: Met no 'TRANSLATIONS' entry in project"
" file '%s'", argv[i] ); " file '%s'", argv[i] );
} }
} }

@ -1,4 +1,4 @@
# This is the build file for pylupdate for TQt v3 Professional Edition. # This is the build file for pytqlupdate for TQt v3 Professional Edition.
# #
# Copyright (c) 2007 # Copyright (c) 2007
# Riverbank Computing Limited <info@riverbankcomputing.co.uk> # Riverbank Computing Limited <info@riverbankcomputing.co.uk>
@ -19,6 +19,6 @@
# PyTQt; see the file LICENSE. If not, write to the Free Software Foundation, # PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
target = pylupdate target = pytqlupdate
sources = fetchtr.cpp main.cpp merge.cpp numberh.cpp sametexth.cpp metatranslator.cpp proparser.cpp qxml.cpp sources = fetchtr.cpp main.cpp merge.cpp numberh.cpp sametexth.cpp metatranslator.cpp proparser.cpp qxml.cpp
headers = metatranslator.h proparser.h headers = metatranslator.h proparser.h

@ -1,16 +1,16 @@
# Copyright (c) 2002 # Copyright (c) 2002
# Detlev Offenbach <detlev@die-offenbachs.de> # Detlev Offenbach <detlev@die-offenbachs.de>
# #
# The project file pylupdate for TQt v3. # The project file pytqlupdate for TQt v3.
TEMPLATE = app TEMPLATE = app
CONFIG += qt warn_on console release @PYQT_RBPROF@ CONFIG += tqt warn_on console release @PYTQT_RBPROF@
INCLUDEPATH = @BLX_INCLUDEPATH@ INCLUDEPATH = @BLX_INCLUDEPATH@
DEFINES = QT_INTERNAL_XML @BLX_DEFINES@ DEFINES = TQT_INTERNAL_XML @BLX_DEFINES@
DESTDIR = @PYQT_BINDIR@ DESTDIR = @PYTQT_BINDIR@
TARGET = pylupdate TARGET = pytqlupdate
HEADERS = metatranslator.h \ HEADERS = metatranslator.h \
proparser.h proparser.h
@ -24,6 +24,6 @@ SOURCES = fetchtr.cpp \
proparser.cpp proparser.cpp
rbprof:exists($(TQTDIR)/src/qt_professional.pri) { rbprof:exists($(TQTDIR)/src/qt_professional.pri) {
QT_SOURCE_TREE = $(TQTDIR) TQT_SOURCE_TREE = $(TQTDIR)
include($(TQTDIR)/src/qt_professional.pri) include($(TQTDIR)/src/qt_professional.pri)
} }

@ -1,4 +1,4 @@
# This is the build file for pylupdate for TQt v3 Professional Edition. # This is the build file for pytqlupdate for TQt v3 Professional Edition.
# #
# Copyright (c) 2007 # Copyright (c) 2007
# Riverbank Computing Limited <info@riverbankcomputing.co.uk> # Riverbank Computing Limited <info@riverbankcomputing.co.uk>
@ -19,6 +19,6 @@
# PyTQt; see the file LICENSE. If not, write to the Free Software Foundation, # PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
target = pylupdate target = pytqlupdate
sources = fetchtr.cpp main.cpp merge.cpp numberh.cpp sametexth.cpp metatranslator.cpp proparser.cpp sources = fetchtr.cpp main.cpp merge.cpp numberh.cpp sametexth.cpp metatranslator.cpp proparser.cpp
headers = metatranslator.h proparser.h headers = metatranslator.h proparser.h

@ -48,12 +48,12 @@ class Configuration(sip_tqt_config.Configuration):
class TQtModuleMakefile(sip_tqt_config.SIPModuleMakefile): class TQtModuleMakefile(sip_tqt_config.SIPModuleMakefile):
"""The Makefile class for modules that %Import qt. """The Makefile class for modules that %Import tqt.
""" """
def __init__(self, *args, **kw): def __init__(self, *args, **kw):
"""Initialise an instance of a module Makefile. """Initialise an instance of a module Makefile.
""" """
kw["qt"] = 1 kw["tqt"] = 1
apply(sip_tqt_config.SIPModuleMakefile.__init__, (self, ) + args, kw) apply(sip_tqt_config.SIPModuleMakefile.__init__, (self, ) + args, kw)
def finalise(self): def finalise(self):
@ -62,55 +62,55 @@ class TQtModuleMakefile(sip_tqt_config.SIPModuleMakefile):
if self.config.sip_version < 0x040000: if self.config.sip_version < 0x040000:
# Note that we don't use self.extra_lib_dirs because we don't want # Note that we don't use self.extra_lib_dirs because we don't want
# it to be added to the rpath. # it to be added to the rpath.
self.LIBDIR.append(self.config.pyqt_mod_dir) self.LIBDIR.append(self.config.pytqt_mod_dir)
self.extra_libs.append(self.module_as_lib("qt")) self.extra_libs.append(self.module_as_lib("tqt"))
sip_tqt_config.SIPModuleMakefile.finalise(self) sip_tqt_config.SIPModuleMakefile.finalise(self)
class TQtAxContainerModuleMakefile(TQtModuleMakefile): class TQtAxContainerModuleMakefile(TQtModuleMakefile):
"""The Makefile class for modules that %Import qtaxcontainer. """The Makefile class for modules that %Import tqtaxcontainer.
""" """
def finalise(self): def finalise(self):
"""Finalise the macros. """Finalise the macros.
""" """
if self.config.sip_version < 0x040000: if self.config.sip_version < 0x040000:
self.extra_libs.append(self.module_as_lib("qtaxcontainer")) self.extra_libs.append(self.module_as_lib("tqtaxcontainer"))
TQtModuleMakefile.finalise(self) TQtModuleMakefile.finalise(self)
class TQtCanvasModuleMakefile(TQtModuleMakefile): class TQtCanvasModuleMakefile(TQtModuleMakefile):
"""The Makefile class for modules that %Import qtcanvas. """The Makefile class for modules that %Import tqtcanvas.
""" """
def finalise(self): def finalise(self):
"""Finalise the macros. """Finalise the macros.
""" """
if self.config.sip_version < 0x040000: if self.config.sip_version < 0x040000:
self.extra_libs.append(self.module_as_lib("qtcanvas")) self.extra_libs.append(self.module_as_lib("tqtcanvas"))
TQtModuleMakefile.finalise(self) TQtModuleMakefile.finalise(self)
class TQtExtModuleMakefile(TQtModuleMakefile): class TQtExtModuleMakefile(TQtModuleMakefile):
"""The Makefile class for modules that %Import qtext. """The Makefile class for modules that %Import tqtext.
""" """
def finalise(self): def finalise(self):
"""Finalise the macros. """Finalise the macros.
""" """
if self.config.sip_version < 0x040000: if self.config.sip_version < 0x040000:
self.extra_libs.append(self.module_as_lib("qtext")) self.extra_libs.append(self.module_as_lib("tqtext"))
self.extra_defines.extend(self.config._pyqt_qscintilla_defines) self.extra_defines.extend(self.config._pytqt_tqscintilla_defines)
self.extra_include_dirs.append(self.config._pyqt_qscintilla_inc_dir) self.extra_include_dirs.append(self.config._pytqt_tqscintilla_inc_dir)
self.extra_lib_dirs.append(self.config._pyqt_qscintilla_lib_dir) self.extra_lib_dirs.append(self.config._pytqt_tqscintilla_lib_dir)
self.extra_libs.append("tqscintilla") self.extra_libs.append("tqscintilla")
TQtModuleMakefile.finalise(self) TQtModuleMakefile.finalise(self)
class TQtGLModuleMakefile(TQtModuleMakefile): class TQtGLModuleMakefile(TQtModuleMakefile):
"""The Makefile class for modules that %Import qtgl. """The Makefile class for modules that %Import tqtgl.
""" """
def __init__(self, *args, **kw): def __init__(self, *args, **kw):
"""Initialise an instance of a module Makefile. """Initialise an instance of a module Makefile.
@ -122,66 +122,66 @@ class TQtGLModuleMakefile(TQtModuleMakefile):
"""Finalise the macros. """Finalise the macros.
""" """
if self.config.sip_version < 0x040000: if self.config.sip_version < 0x040000:
self.extra_libs.append(self.module_as_lib("qtgl")) self.extra_libs.append(self.module_as_lib("tqtgl"))
TQtModuleMakefile.finalise(self) TQtModuleMakefile.finalise(self)
class TQtNetworkModuleMakefile(TQtModuleMakefile): class TQtNetworkModuleMakefile(TQtModuleMakefile):
"""The Makefile class for modules that %Import qtnetwork. """The Makefile class for modules that %Import tqtnetwork.
""" """
def finalise(self): def finalise(self):
"""Finalise the macros. """Finalise the macros.
""" """
if self.config.sip_version < 0x040000: if self.config.sip_version < 0x040000:
self.extra_libs.append(self.module_as_lib("qtnetwork")) self.extra_libs.append(self.module_as_lib("tqtnetwork"))
TQtModuleMakefile.finalise(self) TQtModuleMakefile.finalise(self)
class TQtTableModuleMakefile(TQtModuleMakefile): class TQtTableModuleMakefile(TQtModuleMakefile):
"""The Makefile class for modules that %Import qttable. """The Makefile class for modules that %Import tqttable.
""" """
def finalise(self): def finalise(self):
"""Finalise the macros. """Finalise the macros.
""" """
if self.config.sip_version < 0x040000: if self.config.sip_version < 0x040000:
self.extra_libs.append(self.module_as_lib("qttable")) self.extra_libs.append(self.module_as_lib("tqttable"))
TQtModuleMakefile.finalise(self) TQtModuleMakefile.finalise(self)
class TQtSQLModuleMakefile(TQtTableModuleMakefile): class TQtSQLModuleMakefile(TQtTableModuleMakefile):
"""The Makefile class for modules that %Import qtsql. """The Makefile class for modules that %Import tqtsql.
""" """
def finalise(self): def finalise(self):
"""Finalise the macros. """Finalise the macros.
""" """
if self.config.sip_version < 0x040000: if self.config.sip_version < 0x040000:
self.extra_libs.append(self.module_as_lib("qtsql")) self.extra_libs.append(self.module_as_lib("tqtsql"))
TQtTableModuleMakefile.finalise(self) TQtTableModuleMakefile.finalise(self)
class TQtUIModuleMakefile(TQtModuleMakefile): class TQtUIModuleMakefile(TQtModuleMakefile):
"""The Makefile class for modules that %Import qtui. """The Makefile class for modules that %Import tqtui.
""" """
def finalise(self): def finalise(self):
"""Finalise the macros. """Finalise the macros.
""" """
if self.config.sip_version < 0x040000: if self.config.sip_version < 0x040000:
self.extra_libs.append(self.module_as_lib("qtui")) self.extra_libs.append(self.module_as_lib("tqtui"))
TQtModuleMakefile.finalise(self) TQtModuleMakefile.finalise(self)
class TQtXMLModuleMakefile(TQtModuleMakefile): class TQtXMLModuleMakefile(TQtModuleMakefile):
"""The Makefile class for modules that %Import qtxml. """The Makefile class for modules that %Import tqtxml.
""" """
def finalise(self): def finalise(self):
"""Finalise the macros. """Finalise the macros.
""" """
if self.config.sip_version < 0x040000: if self.config.sip_version < 0x040000:
self.extra_libs.append(self.module_as_lib("qtxml")) self.extra_libs.append(self.module_as_lib("tqtxml"))
TQtModuleMakefile.finalise(self) TQtModuleMakefile.finalise(self)

@ -128,13 +128,13 @@ void Uic::embed( TQTextStream& out, const char* project, const TQStringList& ima
for ( it = images.begin(); it != images.end(); ++it ) for ( it = images.begin(); it != images.end(); ++it )
out << "# " << *it << "\n"; out << "# " << *it << "\n";
out << "#\n"; out << "#\n";
out << "# Created by: The PyTQt User Interface Compiler (pyuic) " << PYTQT_VERSION << "\n"; out << "# Created by: The PyTQt User Interface Compiler (pytquic) " << PYTQT_VERSION << "\n";
out << "#\n"; out << "#\n";
out << "# WARNING! All changes made in this file will be lost!\n"; out << "# WARNING! All changes made in this file will be lost!\n";
out << "\n"; out << "\n";
out << "\n"; out << "\n";
out << "from PyTQt.qt import TQImage, TQMimeSourceFactory"; out << "from PyTQt.tqt import TQImage, TQMimeSourceFactory";
#ifndef TQT_NO_IMAGE_COLLECTION_COMPRESSION #ifndef TQT_NO_IMAGE_COLLECTION_COMPRESSION
out << ", tqUncompress"; out << ", tqUncompress";
#endif #endif
@ -149,7 +149,7 @@ void Uic::embed( TQTextStream& out, const char* project, const TQStringList& ima
for ( it = images.begin(); it != images.end(); ++it ) { for ( it = images.begin(); it != images.end(); ++it ) {
TQImage img; TQImage img;
if ( !img.load( *it ) ) { if ( !img.load( *it ) ) {
fprintf( stderr, "pyuic: cannot load image file %s\n", (*it).utf8() ); fprintf( stderr, "pytquic: cannot load image file %s\n", (*it).utf8() );
continue; continue;
} }
EmbedImage *e = new EmbedImage; EmbedImage *e = new EmbedImage;
@ -275,7 +275,7 @@ void Uic::embed( TQTextStream& out, const char* project, const TQStringList& ima
out << indent << "factory = None\n"; out << indent << "factory = None\n";
out << "\n"; out << "\n";
out << indent << "def qInitImages_" << cProject << "():\n"; out << indent << "def tqInitImages_" << cProject << "():\n";
++indent; ++indent;
out << indent << "global factory\n"; out << indent << "global factory\n";
out << "\n"; out << "\n";
@ -288,7 +288,7 @@ void Uic::embed( TQTextStream& out, const char* project, const TQStringList& ima
out << "\n"; out << "\n";
out << "\n"; out << "\n";
out << indent << "def qCleanupImages_" << cProject << "():\n"; out << indent << "def tqCleanupImages_" << cProject << "():\n";
++indent; ++indent;
out << indent << "global factory\n"; out << indent << "global factory\n";
out << "\n"; out << "\n";
@ -305,8 +305,8 @@ void Uic::embed( TQTextStream& out, const char* project, const TQStringList& ima
++indent; ++indent;
out << indent << "def __init__(self):\n"; out << indent << "def __init__(self):\n";
++indent; ++indent;
out << indent << "self.cleanup = qCleanupImages_" << cProject << "\n"; out << indent << "self.cleanup = tqCleanupImages_" << cProject << "\n";
out << indent << "qInitImages_" << cProject << "()\n"; out << indent << "tqInitImages_" << cProject << "()\n";
--indent; --indent;
out << "\n"; out << "\n";
out << indent << "def __del__(self):\n"; out << indent << "def __del__(self):\n";

@ -238,12 +238,12 @@ void Uic::createFormImpl( const TQDomElement &e )
for ( i = 1; i < (int) nl.length(); i++ ) { // start at 1, 0 is the toplevel widget for ( i = 1; i < (int) nl.length(); i++ ) { // start at 1, 0 is the toplevel widget
TQString name = getClassName( nl.item(i).toElement() ); TQString name = getClassName( nl.item(i).toElement() );
if ( name == "Spacer" ) { if ( name == "Spacer" ) {
globalIncludes += "qlayout.h"; globalIncludes += "tqlayout.h";
globalIncludes += "qapplication.h"; globalIncludes += "tqapplication.h";
continue; continue;
} }
if ( name.mid( 1 ) == "ListView" ) if ( name.mid( 1 ) == "ListView" )
globalIncludes += "qheader.h"; globalIncludes += "tqheader.h";
else if ( name == "TQAxWidget" ) else if ( name == "TQAxWidget" )
axwidgets += getObjectName(nl.item(i).toElement()); axwidgets += getObjectName(nl.item(i).toElement());
else if ( name == "TQDataBrowser" ) else if ( name == "TQDataBrowser" )
@ -257,14 +257,14 @@ void Uic::createFormImpl( const TQDomElement &e )
} }
} }
if (globalIncludes.findIndex("qtable.h") >= 0) if (globalIncludes.findIndex("tqtable.h") >= 0)
out << indent << "from PyTQt.qttable import TQTable" << endl; out << indent << "from PyTQt.tqttable import TQTable" << endl;
if (!axwidgets.empty()) if (!axwidgets.empty())
out << indent << "from PyTQt.qtaxcontainer import TQAxWidget" << endl; out << indent << "from PyTQt.tqtaxcontainer import TQAxWidget" << endl;
if (globalIncludes.findIndex("tqextscintilla.h") >= 0) if (globalIncludes.findIndex("tqextscintilla.h") >= 0)
out << indent << "from PyTQt.qtext import TQextScintilla" << endl; out << indent << "from PyTQt.tqtext import TQextScintilla" << endl;
registerDatabases( e ); registerDatabases( e );
dbConnections = unique( dbConnections ); dbConnections = unique( dbConnections );
@ -289,20 +289,20 @@ void Uic::createFormImpl( const TQDomElement &e )
sqlClasses += "TQSqlRecord"; sqlClasses += "TQSqlRecord";
} }
if (globalIncludes.findIndex("qdatatable.h") >= 0) if (globalIncludes.findIndex("tqdatatable.h") >= 0)
sqlClasses += "TQDataTable"; sqlClasses += "TQDataTable";
if (globalIncludes.findIndex("qtableview.h") >= 0) if (globalIncludes.findIndex("tqtableview.h") >= 0)
sqlClasses += "TQTableView"; sqlClasses += "TQTableView";
if (globalIncludes.findIndex("qdatabrowser.h") >= 0) if (globalIncludes.findIndex("tqdatabrowser.h") >= 0)
sqlClasses += "TQDataBrowser"; sqlClasses += "TQDataBrowser";
if (globalIncludes.findIndex("qdataview.h") >= 0) if (globalIncludes.findIndex("tqdataview.h") >= 0)
sqlClasses += "TQDataView"; sqlClasses += "TQDataView";
if ( !sqlClasses.empty() ) { if ( !sqlClasses.empty() ) {
out << indent << "from PyTQt.qtsql import"; out << indent << "from PyTQt.tqtsql import";
const char *sep = " "; const char *sep = " ";
for ( it = sqlClasses.begin(); it != sqlClasses.end(); ++it ) { for ( it = sqlClasses.begin(); it != sqlClasses.end(); ++it ) {

@ -135,7 +135,7 @@ int main( int argc, char * argv[] )
if ( argc < 2 || error || (!fileName && !imagecollection ) ) { if ( argc < 2 || error || (!fileName && !imagecollection ) ) {
fprintf( stderr, "PyTQt user interface compiler.\n" ); fprintf( stderr, "PyTQt user interface compiler.\n" );
if ( error ) if ( error )
fprintf( stderr, "pyuic: %s\n", error ); fprintf( stderr, "pytquic: %s\n", error );
fprintf( stderr, "Usage: %s [options] [mode] <uifile>\n" fprintf( stderr, "Usage: %s [options] [mode] <uifile>\n"
"\nGenerate implementation:\n" "\nGenerate implementation:\n"
@ -153,7 +153,7 @@ int main( int argc, char * argv[] )
"\t-tr func\tUse func() rather than TQApplication.translate() for i18n\n" "\t-tr func\tUse func() rather than TQApplication.translate() for i18n\n"
"\t-x\t\tGenerate extra code to test and display the class\n" "\t-x\t\tGenerate extra code to test and display the class\n"
"\t-test\t\tGenerate extra code to test but not display the class\n" "\t-test\t\tGenerate extra code to test but not display the class\n"
"\t-version\tDisplay version of pyuic\n" "\t-version\tDisplay version of pytquic\n"
"\t-help\t\tDisplay this information\n" "\t-help\t\tDisplay this information\n"
, argv[0], argv[0], argv[0], argv[0]); , argv[0], argv[0], argv[0], argv[0]);
return 1; return 1;
@ -165,7 +165,7 @@ int main( int argc, char * argv[] )
if ( !outputFile.isEmpty() ) { if ( !outputFile.isEmpty() ) {
fileOut.setName( outputFile ); fileOut.setName( outputFile );
if (!fileOut.open( IO_WriteOnly ) ) if (!fileOut.open( IO_WriteOnly ) )
tqFatal( "pyuic: Could not open output file '%s'", outputFile.data() ); tqFatal( "pytquic: Could not open output file '%s'", outputFile.data() );
} else { } else {
fileOut.open( IO_WriteOnly, stdout ); fileOut.open( IO_WriteOnly, stdout );
} }
@ -182,17 +182,17 @@ int main( int argc, char * argv[] )
out.setEncoding( TQTextStream::UnicodeUTF8 ); out.setEncoding( TQTextStream::UnicodeUTF8 );
TQFile file( fileName ); TQFile file( fileName );
if ( !file.open( IO_ReadOnly ) ) if ( !file.open( IO_ReadOnly ) )
tqFatal( "pyuic: Could not open file '%s' ", fileName ); tqFatal( "pytquic: Could not open file '%s' ", fileName );
TQDomDocument doc; TQDomDocument doc;
TQString errMsg; TQString errMsg;
int errLine; int errLine;
if ( !doc.setContent( &file, &errMsg, &errLine ) ) if ( !doc.setContent( &file, &errMsg, &errLine ) )
tqFatal( TQString("pyuic: Failed to parse %s: ") + errMsg + TQString (" in line %d\n"), fileName, errLine ); tqFatal( TQString("pytquic: Failed to parse %s: ") + errMsg + TQString (" in line %d\n"), fileName, errLine );
TQDomElement e = doc.firstChild().toElement(); TQDomElement e = doc.firstChild().toElement();
if ( e.hasAttribute("version") && e.attribute("version").toDouble() > 3.3 ) { if ( e.hasAttribute("version") && e.attribute("version").toDouble() > 3.3 ) {
tqWarning( TQString("pyuic: File generated with too recent version of TQt Designer (%s vs. %s)"), tqWarning( TQString("pytquic: File generated with too recent version of TQt Designer (%s vs. %s)"),
e.attribute("version").utf8(), TQT_VERSION_STR ); e.attribute("version").utf8(), TQT_VERSION_STR );
return 1; return 1;
} }
@ -209,7 +209,7 @@ int main( int argc, char * argv[] )
if ( !subcl ) { if ( !subcl ) {
out << "# Form implementation generated from reading ui file '" << fileName << "'" << endl; out << "# Form implementation generated from reading ui file '" << fileName << "'" << endl;
out << "#" << endl; out << "#" << endl;
out << "# Created by: The PyTQt User Interface Compiler (pyuic) " << PYTQT_VERSION << endl; out << "# Created by: The PyTQt User Interface Compiler (pytquic) " << PYTQT_VERSION << endl;
out << "#" << endl; out << "#" << endl;
out << "# WARNING! All changes made in this file will be lost!" << endl; out << "# WARNING! All changes made in this file will be lost!" << endl;
out << endl; out << endl;
@ -219,7 +219,7 @@ int main( int argc, char * argv[] )
if (testCode || execCode) if (testCode || execCode)
out << "import sys" << endl; out << "import sys" << endl;
out << "from PyTQt.qt import *" << endl; out << "from PyTQt.tqt import *" << endl;
Uic( fileName, outputFile, out, doc, subcl, trmacro, className, uicClass ); Uic( fileName, outputFile, out, doc, subcl, trmacro, className, uicClass );

@ -43,7 +43,7 @@ TQString Uic::createObjectImpl( const TQDomElement &e, const TQString& parentCla
TQString parent( par ); TQString parent( par );
if ( parent == "self" && isMainWindow ) { if ( parent == "self" && isMainWindow ) {
if ( !createdCentralWidget ) if ( !createdCentralWidget )
out << indent << "self.setCentralWidget(TQWidget(self,\"qt_central_widget\"))" << endl; out << indent << "self.setCentralWidget(TQWidget(self,\"tqt_central_widget\"))" << endl;
createdCentralWidget = TRUE; createdCentralWidget = TRUE;
parent = "self.centralWidget()"; parent = "self.centralWidget()";
} }

@ -1,4 +1,4 @@
# This is the build file for pyuic for TQt v3 Professional Edition. # This is the build file for pytquic for TQt v3 Professional Edition.
# #
# Copyright (c) 2007 # Copyright (c) 2007
# Riverbank Computing Limited <info@riverbankcomputing.co.uk> # Riverbank Computing Limited <info@riverbankcomputing.co.uk>
@ -19,6 +19,6 @@
# PyTQt; see the file LICENSE. If not, write to the Free Software Foundation, # PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
target = pyuic target = pytquic
sources = main.cpp uic.cpp form.cpp object.cpp subclassing.cpp embed.cpp widgetdatabase.cpp domtool.cpp parser.cpp qdom.cpp qxml.cpp sources = main.cpp uic.cpp form.cpp object.cpp subclassing.cpp embed.cpp widgetdatabase.cpp domtool.cpp parser.cpp tqdom.cpp tqxml.cpp
headers = domtool.h globaldefs.h parser.h uic.h widgetdatabase.h widgetinterface.h headers = domtool.h globaldefs.h parser.h uic.h widgetdatabase.h widgetinterface.h

@ -3,16 +3,16 @@
# Copyright (c) 2002, 2003 # Copyright (c) 2002, 2003
# Riverbank Computing Limited <info@riverbankcomputing.co.uk> # Riverbank Computing Limited <info@riverbankcomputing.co.uk>
# #
# The project file for pyuic for TQt v3. # The project file for pytquic for TQt v3.
TEMPLATE = app TEMPLATE = app
CONFIG += qt console warn_on release @PYQT_RBPROF@ CONFIG += tqt console warn_on release @PYTQT_RBPROF@
INCLUDEPATH += @BLX_INCLUDEPATH@ $(TQTDIR)/src/3rdparty/zlib INCLUDEPATH += @BLX_INCLUDEPATH@ $(TQTDIR)/src/3rdparty/zlib
DEFINES += UIC QT_INTERNAL_XML @BLX_DEFINES@ DEFINES += UIC TQT_INTERNAL_XML @BLX_DEFINES@
DESTDIR = @PYQT_BINDIR@ DESTDIR = @PYTQT_BINDIR@
TARGET = pyuic TARGET = pytquic
HEADERS = uic.h \ HEADERS = uic.h \
widgetdatabase.h \ widgetdatabase.h \
@ -30,7 +30,7 @@ SOURCES = main.cpp \
domtool.cpp \ domtool.cpp \
parser.cpp parser.cpp
rbprof:exists($(TQTDIR)/src/qt_professional.pri) { rbprof:exists($(TQTDIR)/src/tqt_professional.pri) {
QT_SOURCE_TREE = $(TQTDIR) TQT_SOURCE_TREE = $(TQTDIR)
include($(TQTDIR)/src/qt_professional.pri) include($(TQTDIR)/src/tqt_professional.pri)
} }

@ -1,4 +1,4 @@
# This is the build file for pyuic for TQt v3. # This is the build file for pytquic for TQt v3.
# #
# Copyright (c) 2007 # Copyright (c) 2007
# Riverbank Computing Limited <info@riverbankcomputing.co.uk> # Riverbank Computing Limited <info@riverbankcomputing.co.uk>
@ -19,6 +19,6 @@
# PyTQt; see the file LICENSE. If not, write to the Free Software Foundation, # PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
target = pyuic target = pytquic
sources = main.cpp uic.cpp form.cpp object.cpp subclassing.cpp embed.cpp widgetdatabase.cpp domtool.cpp parser.cpp sources = main.cpp uic.cpp form.cpp object.cpp subclassing.cpp embed.cpp widgetdatabase.cpp domtool.cpp parser.cpp
headers = domtool.h globaldefs.h parser.h uic.h widgetdatabase.h widgetinterface.h headers = domtool.h globaldefs.h parser.h uic.h widgetdatabase.h widgetinterface.h

@ -256,7 +256,7 @@ void WidgetDatabase::setupDataBase( int id )
#if !defined(TQT_NO_SQL) #if !defined(TQT_NO_SQL)
r = new WidgetDatabaseRecord; r = new WidgetDatabaseRecord;
r->iconSet = "designer_datatable.png"; r->iconSet = "designer_datatable.png";
r->includeFile = "qdatatable.h"; r->includeFile = "tqdatatable.h";
r->name = "TQDataTable"; r->name = "TQDataTable";
r->group = widgetGroup( "Database" ); r->group = widgetGroup( "Database" );
r->toolTip = "Data Table"; r->toolTip = "Data Table";
@ -287,7 +287,7 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "TQDateEdit"; r->name = "TQDateEdit";
r->group = widgetGroup( "Input" ); r->group = widgetGroup( "Input" );
r->toolTip = "Date Edit"; r->toolTip = "Date Edit";
r->includeFile = "qdatetimeedit.h"; r->includeFile = "tqdatetimeedit.h";
append( r ); append( r );
@ -296,7 +296,7 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "TQTimeEdit"; r->name = "TQTimeEdit";
r->group = widgetGroup( "Input" ); r->group = widgetGroup( "Input" );
r->toolTip = "Time Edit"; r->toolTip = "Time Edit";
r->includeFile = "qdatetimeedit.h"; r->includeFile = "tqdatetimeedit.h";
append( r ); append( r );
@ -305,7 +305,7 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "TQDateTimeEdit"; r->name = "TQDateTimeEdit";
r->group = widgetGroup( "Input" ); r->group = widgetGroup( "Input" );
r->toolTip = "Date-Time Edit"; r->toolTip = "Date-Time Edit";
r->includeFile = "qdatetimeedit.h"; r->includeFile = "tqdatetimeedit.h";
append( r ); append( r );
@ -399,7 +399,7 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "Line"; r->name = "Line";
r->group = widgetGroup( "Display" ); r->group = widgetGroup( "Display" );
r->toolTip = "Line"; r->toolTip = "Line";
r->includeFile = "qframe.h"; r->includeFile = "tqframe.h";
r->whatsThis = "The Line widget provides horizontal and vertical lines."; r->whatsThis = "The Line widget provides horizontal and vertical lines.";
append( r ); append( r );
@ -476,7 +476,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord; r = new WidgetDatabaseRecord;
r->name = "TQSplitter"; r->name = "TQSplitter";
r->group = widgetGroup( "Temp" ); r->group = widgetGroup( "Temp" );
r->includeFile = "qsplitter.h"; r->includeFile = "tqsplitter.h";
r->isContainer = TRUE; r->isContainer = TRUE;
append( r ); append( r );
@ -508,7 +508,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord; r = new WidgetDatabaseRecord;
r->iconSet = ""; r->iconSet = "";
r->name = "TQMainWindow"; r->name = "TQMainWindow";
r->includeFile = "qmainwindow.h"; r->includeFile = "tqmainwindow.h";
r->group = widgetGroup( "Temp" ); r->group = widgetGroup( "Temp" );
r->isContainer = TRUE; r->isContainer = TRUE;
@ -517,7 +517,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord; r = new WidgetDatabaseRecord;
r->iconSet = ""; r->iconSet = "";
r->name = "TQDesignerAction"; r->name = "TQDesignerAction";
r->includeFile = "qaction.h"; r->includeFile = "tqaction.h";
r->group = widgetGroup( "Temp" ); r->group = widgetGroup( "Temp" );
r->isContainer = FALSE; r->isContainer = FALSE;
@ -526,7 +526,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord; r = new WidgetDatabaseRecord;
r->iconSet = ""; r->iconSet = "";
r->name = "TQDesignerActionGroup"; r->name = "TQDesignerActionGroup";
r->includeFile = "qaction.h"; r->includeFile = "tqaction.h";
r->group = widgetGroup( "Temp" ); r->group = widgetGroup( "Temp" );
r->isContainer = FALSE; r->isContainer = FALSE;
@ -535,7 +535,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord; r = new WidgetDatabaseRecord;
r->iconSet = ""; r->iconSet = "";
r->name = "TQScrollView"; r->name = "TQScrollView";
r->includeFile = "qscrollview.h"; r->includeFile = "tqscrollview.h";
r->group = widgetGroup( "Temp" ); r->group = widgetGroup( "Temp" );
r->isContainer = TRUE; r->isContainer = TRUE;
@ -545,7 +545,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord; r = new WidgetDatabaseRecord;
r->iconSet = ""; r->iconSet = "";
r->name = "TQDataBrowser"; r->name = "TQDataBrowser";
r->includeFile = "qdatabrowser.h"; r->includeFile = "tqdatabrowser.h";
r->group = widgetGroup( "Database" ); r->group = widgetGroup( "Database" );
r->toolTip = "Data Browser"; r->toolTip = "Data Browser";
r->iconSet = "designer_databrowser.png"; r->iconSet = "designer_databrowser.png";
@ -556,7 +556,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord; r = new WidgetDatabaseRecord;
r->iconSet = ""; r->iconSet = "";
r->name = "TQDataView"; r->name = "TQDataView";
r->includeFile = "qdataview.h"; r->includeFile = "tqdataview.h";
r->group = widgetGroup( "Database" ); r->group = widgetGroup( "Database" );
r->toolTip = "Data View"; r->toolTip = "Data View";
r->iconSet = "designer_dataview.png"; r->iconSet = "designer_dataview.png";

@ -1,279 +0,0 @@
// This is the SIP interface definition for the qt module of PyTQt.
//
// Copyright (c) 2007
// Riverbank Computing Limited <info@riverbankcomputing.co.uk>
//
// This file is part of PyTQt.
//
// This copy of PyTQt is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2, or (at your option) any later
// version.
//
// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%Module PyTQt.qt 2
%Plugin PyTQt3
%Include versions.sip
%Include copying.sip
unsigned PYTQT_VERSION;
const char *PYTQT_VERSION_STR;
%ModuleCode
static unsigned PYTQT_VERSION = 0x031201;
static const char *PYTQT_VERSION_STR = "3.18.1";
%End
// Hook into the VendorID package if it is enabled.
%Feature VendorID
%If (VendorID)
%ModuleCode
#include <vendorid.h>
%End
%PreInitialisationCode
if (!vendorid_check())
{
PyErr_SetString(PyExc_RuntimeError, "PyTQt cannot be used with this Python interpreter");
return;
}
%End
%End
%DefaultMetatype qt.pyqtWrapperType
%DefaultSupertype qt.pyqtWrapper
// Include the interface definitions for each class.
// These contain enum and type definitions that need to be defined before they
// are used so they do not seem to be classes.
%Include qglobal.sip
%Include qnamespace.sip
%Include qwindowdefs.sip
%Include qpen.sip
%Include qpaintdevice.sip
%Include qpixmap.sip
%Include qbitmap.sip
%Include qsize.sip
%Include qsizepolicy.sip
%Include qaccel.sip
%Include qaction.sip
%Include qapplication.sip
%Include qassistantclient.sip
%Include qbrush.sip
%Include qbutton.sip
%Include qbuttongroup.sip
%Include qbytearray.sip
%Include qcdestyle.sip
%Include qcheckbox.sip
%Include qclipboard.sip
%Include qcolor.sip
%Include qcolordialog.sip
%Include qcolorgroup.sip
%Include qcombobox.sip
%Include qcommonstyle.sip
%Include qcstring.sip
%Include qcursor.sip
%Include qdatastream.sip
%Include qdatetime.sip
%Include qdatetimeedit.sip
%Include qdesktopwidget.sip
%Include qdial.sip
%Include qdialog.sip
%Include qdir.sip
%Include qdockarea.sip
%Include qdockwindow.sip
%Include qdragobject.sip
%Include qdrawutil.sip
%Include qdropsite.sip
%Include qerrormessage.sip
%Include qevent.sip
%Include qeventloop.sip
%Include qfile.sip
%Include qfiledialog.sip
%Include qfileinfo.sip
%Include qfont.sip
%Include qfontdatabase.sip
%Include qfontdialog.sip
%Include qfontinfo.sip
%Include qfontmetrics.sip
%Include qframe.sip
%Include qgrid.sip
%Include qgridview.sip
%Include qgroupbox.sip
%Include qhbox.sip
%Include qhbuttongroup.sip
%Include qheader.sip
%Include qhgroupbox.sip
%Include qiconset.sip
%Include qiconview.sip
%Include qimage.sip
%Include qinputdialog.sip
%Include qinterlacestyle.sip
%Include qiodevice.sip
%Include qkeysequence.sip
%Include qlabel.sip
%Include qlayout.sip
%Include qlcdnumber.sip
%Include qlibrary.sip
%Include qlineedit.sip
%Include qlistbox.sip
%Include qlistview.sip
%Include qlocale.sip
%Include qmainwindow.sip
%Include qmemarray.sip
%Include qmenubar.sip
%Include qmenudata.sip
%Include qmessagebox.sip
%Include qmetaobject.sip
%Include qmime.sip
%Include qmotifplusstyle.sip
%Include qmotifstyle.sip
%Include qmovie.sip
%Include qmutex.sip
%Include qmultilinedit.sip
%Include qnetworkprotocol.sip
%Include qobject.sip
%Include qobjectcleanuphandler.sip
%Include qobjectlist.sip
%Include qpaintdevicemetrics.sip
%Include qpainter.sip
%Include qpair.sip
%Include qpalette.sip
%Include qpicture.sip
%Include qpixmapcache.sip
%Include qplatinumstyle.sip
%Include qpoint.sip
%Include qpointarray.sip
%Include qpopupmenu.sip
%Include qprintdialog.sip
%Include qprinter.sip
%Include qprocess.sip
%Include qprogressbar.sip
%Include qprogressdialog.sip
%Include qptrlist.sip
%Include qpushbutton.sip
%Include qradiobutton.sip
%Include qrangecontrol.sip
%Include qrect.sip
%Include qregexp.sip
%Include qregion.sip
%Include qscrollbar.sip
%Include qscrollview.sip
%Include qsemaphore.sip
%Include qsessionmanager.sip
%Include qsettings.sip
%Include qsgistyle.sip
%Include qsignalmapper.sip
%Include qsimplerichtext.sip
%Include qsizegrip.sip
%Include qslider.sip
%Include qsocketnotifier.sip
%Include qsound.sip
%Include qspinbox.sip
%Include qsplashscreen.sip
%Include qsplitter.sip
%Include qstatusbar.sip
%Include qstring.sip
%Include qstringlist.sip
%Include qstrlist.sip
%Include qstyle.sip
%Include qstylefactory.sip
%Include qstylesheet.sip
%Include qsyntaxhighlighter.sip
%Include qtabbar.sip
%Include qtabdialog.sip
%Include qtabwidget.sip
%Include qtextbrowser.sip
%Include qtextcodec.sip
%Include qtextedit.sip
%Include qtextstream.sip
%Include qtextview.sip
%Include qthread.sip
%Include qtimer.sip
%Include qtoolbar.sip
%Include qtoolbox.sip
%Include qtoolbutton.sip
%Include qtooltip.sip
%Include qtranslator.sip
%Include qurl.sip
%Include qurlinfo.sip
%Include qurloperator.sip
%Include quuid.sip
%Include qvalidator.sip
%Include qvaluelist.sip
%Include qvariant.sip
%Include qvbox.sip
%Include qvbuttongroup.sip
%Include qvgroupbox.sip
%Include qwaitcondition.sip
%Include qwhatsthis.sip
%Include qwidget.sip
%Include qwidgetlist.sip
%Include qwidgetstack.sip
%Include qwindowsstyle.sip
%Include qwindowsxpstyle.sip
%Include qwizard.sip
%Include qwmatrix.sip
%Include qworkspace.sip
// The build file templates.
%Makefile qt.pro.in
# The project file for the qt module.
#
# Copyright (c) 2007
# Riverbank Computing Limited <info@riverbankcomputing.co.uk>
#
# This file is part of PyTQt.
#
# This copy of PyTQt is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2, or (at your option) any later
# version.
#
# PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
TEMPLATE = lib
TARGET = @BLX_TARGET_LIB@
DESTDIR = @PYQT_MODDIR@
CONFIG += @BLX_CONFIG_LIB@ @PYQT_WARN@
INCLUDEPATH = @BLX_INCLUDEPATH@
DEFINES = @BLX_DEFINES@
LIBS += @PYQT_QASSISTANTCLIENT_LIB@ @BLX_LIBS@
macx:QMAKE_LFLAGS += -framework Python
SOURCES = $B
HEADERS = $H
%End

@ -1,51 +0,0 @@
// This is the SIP file defining the PyTQt license.
//
// Copyright (c) 2007
// Riverbank Computing Limited <info@riverbankcomputing.co.uk>
//
// This file is part of PyTQt.
//
// This copy of PyTQt is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2, or (at your option) any later
// version.
//
// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%Copying
Copyright (c) 2007
Riverbank Computing Limited <info@riverbankcomputing.co.uk>
This file is part of PyTQt.
This copy of PyTQt is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%End
%OptionalInclude pyqt-internal.sip
%OptionalInclude pyqt-gpl.sip
%OptionalInclude pyqt-commercial.sip
%OptionalInclude pyqt-edu.sip
%OptionalInclude pyqt-eval.sip
%OptionalInclude pyqt-nc.sip
%OptionalInclude pyqt-tkc.sip

@ -1,51 +0,0 @@
// This is the SIP file defining the PyTQt license.
//
// Copyright (c) 2007
// Riverbank Computing Limited <info@riverbankcomputing.co.uk>
//
// This file is part of PyTQt.
//
// This copy of PyTQt is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2, or (at your option) any later
// version.
//
// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%Copying
Copyright (c) 2007
Riverbank Computing Limited <info@riverbankcomputing.co.uk>
This file is part of PyTQt.
This copy of PyTQt is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%End
%OptionalInclude pyqt-internal.sip
%OptionalInclude pyqt-gpl.sip
%OptionalInclude pyqt-commercial.sip
%OptionalInclude pyqt-edu.sip
%OptionalInclude pyqt-eval.sip
%OptionalInclude pyqt-nc.sip
%OptionalInclude pyqt-tkc.sip

@ -1,51 +0,0 @@
// This is the SIP file defining the PyTQt license.
//
// Copyright (c) 2007
// Riverbank Computing Limited <info@riverbankcomputing.co.uk>
//
// This file is part of PyTQt.
//
// This copy of PyTQt is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2, or (at your option) any later
// version.
//
// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%Copying
Copyright (c) 2007
Riverbank Computing Limited <info@riverbankcomputing.co.uk>
This file is part of PyTQt.
This copy of PyTQt is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%End
%OptionalInclude pyqt-internal.sip
%OptionalInclude pyqt-gpl.sip
%OptionalInclude pyqt-commercial.sip
%OptionalInclude pyqt-edu.sip
%OptionalInclude pyqt-eval.sip
%OptionalInclude pyqt-nc.sip
%OptionalInclude pyqt-tkc.sip

@ -1,51 +0,0 @@
// This is the SIP file defining the PyTQt license.
//
// Copyright (c) 2007
// Riverbank Computing Limited <info@riverbankcomputing.co.uk>
//
// This file is part of PyTQt.
//
// This copy of PyTQt is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2, or (at your option) any later
// version.
//
// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%Copying
Copyright (c) 2007
Riverbank Computing Limited <info@riverbankcomputing.co.uk>
This file is part of PyTQt.
This copy of PyTQt is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%End
%OptionalInclude pyqt-internal.sip
%OptionalInclude pyqt-gpl.sip
%OptionalInclude pyqt-commercial.sip
%OptionalInclude pyqt-edu.sip
%OptionalInclude pyqt-eval.sip
%OptionalInclude pyqt-nc.sip
%OptionalInclude pyqt-tkc.sip

@ -1,51 +0,0 @@
// This is the SIP file defining the PyTQt license.
//
// Copyright (c) 2007
// Riverbank Computing Limited <info@riverbankcomputing.co.uk>
//
// This file is part of PyTQt.
//
// This copy of PyTQt is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2, or (at your option) any later
// version.
//
// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%Copying
Copyright (c) 2007
Riverbank Computing Limited <info@riverbankcomputing.co.uk>
This file is part of PyTQt.
This copy of PyTQt is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%End
%OptionalInclude pyqt-internal.sip
%OptionalInclude pyqt-gpl.sip
%OptionalInclude pyqt-commercial.sip
%OptionalInclude pyqt-edu.sip
%OptionalInclude pyqt-eval.sip
%OptionalInclude pyqt-nc.sip
%OptionalInclude pyqt-tkc.sip

@ -1,51 +0,0 @@
// This is the SIP file defining the PyTQt license.
//
// Copyright (c) 2007
// Riverbank Computing Limited <info@riverbankcomputing.co.uk>
//
// This file is part of PyTQt.
//
// This copy of PyTQt is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2, or (at your option) any later
// version.
//
// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%Copying
Copyright (c) 2007
Riverbank Computing Limited <info@riverbankcomputing.co.uk>
This file is part of PyTQt.
This copy of PyTQt is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%End
%OptionalInclude pyqt-internal.sip
%OptionalInclude pyqt-gpl.sip
%OptionalInclude pyqt-commercial.sip
%OptionalInclude pyqt-edu.sip
%OptionalInclude pyqt-eval.sip
%OptionalInclude pyqt-nc.sip
%OptionalInclude pyqt-tkc.sip

@ -1,51 +0,0 @@
// This is the SIP file defining the PyTQt license.
//
// Copyright (c) 2007
// Riverbank Computing Limited <info@riverbankcomputing.co.uk>
//
// This file is part of PyTQt.
//
// This copy of PyTQt is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2, or (at your option) any later
// version.
//
// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%Copying
Copyright (c) 2007
Riverbank Computing Limited <info@riverbankcomputing.co.uk>
This file is part of PyTQt.
This copy of PyTQt is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%End
%OptionalInclude pyqt-internal.sip
%OptionalInclude pyqt-gpl.sip
%OptionalInclude pyqt-commercial.sip
%OptionalInclude pyqt-edu.sip
%OptionalInclude pyqt-eval.sip
%OptionalInclude pyqt-nc.sip
%OptionalInclude pyqt-tkc.sip

@ -42,10 +42,10 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%End %End
%OptionalInclude pyqt-internal.sip %OptionalInclude pytqt-internal.sip
%OptionalInclude pyqt-gpl.sip %OptionalInclude pytqt-gpl.sip
%OptionalInclude pyqt-commercial.sip %OptionalInclude pytqt-commercial.sip
%OptionalInclude pyqt-edu.sip %OptionalInclude pytqt-edu.sip
%OptionalInclude pyqt-eval.sip %OptionalInclude pytqt-eval.sip
%OptionalInclude pyqt-nc.sip %OptionalInclude pytqt-nc.sip
%OptionalInclude pyqt-tkc.sip %OptionalInclude pytqt-tkc.sip

@ -419,37 +419,37 @@ enum TQtMsgType {
}; };
SIP_PYCALLABLE qInstallMsgHandler(SIP_PYCALLABLE /AllowNone/); SIP_PYCALLABLE tqInstallMsgHandler(SIP_PYCALLABLE /AllowNone/);
%MethodCode %MethodCode
void (*old)(TQtMsgType, const char *); void (*old)(TQtMsgType, const char *);
// Treat None as the default handler. // Treat None as the default handler.
old = qInstallMsgHandler((a0 != Py_None) ? pyqtMsgHandler : 0); old = tqInstallMsgHandler((a0 != Py_None) ? pytqtMsgHandler : 0);
// If we recognise the old handler, then return it. Otherwise return // If we recognise the old handler, then return it. Otherwise return
// the default handler. This doesn't exactly mimic the TQt behaviour // the default handler. This doesn't exactly mimic the TQt behaviour
// but it is probably close enough for the way it will be used. // but it is probably close enough for the way it will be used.
sipRes = (old == pyqtMsgHandler) ? pyqtPyMsgHandler : Py_None; sipRes = (old == pytqtMsgHandler) ? pytqtPyMsgHandler : Py_None;
Py_INCREF(sipRes); Py_INCREF(sipRes);
// Save the new Python handler. // Save the new Python handler.
Py_XDECREF(pyqtPyMsgHandler); Py_XDECREF(pytqtPyMsgHandler);
pyqtPyMsgHandler = a0; pytqtPyMsgHandler = a0;
Py_INCREF(pyqtPyMsgHandler); Py_INCREF(pytqtPyMsgHandler);
%End %End
%ModuleCode %ModuleCode
// The user supplied Python handler. // The user supplied Python handler.
static PyObject *pyqtPyMsgHandler = 0; static PyObject *pytqtPyMsgHandler = 0;
// The C++ wrapper around the Python handler. // The C++ wrapper around the Python handler.
static void pyqtMsgHandler(TQtMsgType type, const char *msg) static void pytqtMsgHandler(TQtMsgType type, const char *msg)
{ {
PyObject *res; PyObject *res;
SIP_BLOCK_THREADS SIP_BLOCK_THREADS
res = sipCallMethod(0, pyqtPyMsgHandler, "Es", type, sipEnum_TQtMsgType, msg); res = sipCallMethod(0, pytqtPyMsgHandler, "Es", type, sipEnum_TQtMsgType, msg);
Py_XDECREF(res); Py_XDECREF(res);

@ -158,7 +158,7 @@ public:
const char **str; const char **str;
if ((str = PyTQt_qt_ListToArray(a0)) == NULL) if ((str = PyTQt_tqt_ListToArray(a0)) == NULL)
sipIsErr = 1; sipIsErr = 1;
else else
{ {
@ -409,14 +409,14 @@ public:
%ModuleHeaderCode %ModuleHeaderCode
const char **PyTQt_qt_ListToArray(PyObject *lst); const char **PyTQt_tqt_ListToArray(PyObject *lst);
%End %End
%ModuleCode %ModuleCode
// Convert a list of strings to an array of strings on the heap. Also used by // Convert a list of strings to an array of strings on the heap. Also used by
// TQPixmap. // TQPixmap.
const char **PyTQt_qt_ListToArray(PyObject *lst) const char **PyTQt_tqt_ListToArray(PyObject *lst)
{ {
SIP_SSIZE_T nstr; SIP_SSIZE_T nstr;
const char **str, **sp; const char **str, **sp;

@ -108,7 +108,7 @@ public:
typedef uint WState; typedef uint WState;
// WidgetState isn't part of the public API but is used in code // WidgetState isn't part of the public API but is used in code
// generated by uic/pyuic, so we implement the minimum required. // generated by uic/pytquic, so we implement the minimum required.
enum WidgetState { enum WidgetState {
WState_Polished WState_Polished
}; };

@ -304,7 +304,7 @@ public:
#else #else
{NULL, NULL, -1, -1}, {NULL, NULL, -1, -1},
#endif #endif
#if defined(PYQT_STYLE_WINDOWSXP) #if defined(PYTQT_STYLE_WINDOWSXP)
{sipName_TQWindowsXPStyle, &sipClass_TQWindowsXPStyle, -1, -1}, {sipName_TQWindowsXPStyle, &sipClass_TQWindowsXPStyle, -1, -1},
#else #else
{NULL, NULL, -1, -1}, {NULL, NULL, -1, -1},
@ -350,7 +350,7 @@ public:
%MethodCode %MethodCode
if (tqApp) if (tqApp)
{ {
const char *source = PyTQt_qt_encode(&a0, TQApplication::DefaultCodec); const char *source = PyTQt_tqt_encode(&a0, TQApplication::DefaultCodec);
if (source) if (source)
{ {
@ -369,7 +369,7 @@ public:
if (source) if (source)
{ {
sipRes = new TQString(QString::fromUtf8(source)); sipRes = new TQString(TQString::fromUtf8(source));
Py_DECREF(a0); Py_DECREF(a0);
} }
else else
@ -383,7 +383,7 @@ public:
%MethodCode %MethodCode
if (tqApp) if (tqApp)
{ {
const char *source = PyTQt_qt_encode(&a0, TQApplication::DefaultCodec); const char *source = PyTQt_tqt_encode(&a0, TQApplication::DefaultCodec);
if (source) if (source)
{ {
@ -525,27 +525,27 @@ public:
void installEventFilter(const TQObject *); void installEventFilter(const TQObject *);
void removeEventFilter(const TQObject *); void removeEventFilter(const TQObject *);
static SIP_PYOBJECT connect(SIP_QOBJECT,SIP_SIGNAL,SIP_QOBJECT,SIP_SLOT); static SIP_PYOBJECT connect(SIP_TQOBJECT,SIP_SIGNAL,SIP_TQOBJECT,SIP_SLOT);
%MethodCode %MethodCode
sipRes = sipConnectRx(a0,a1,a2,a3,0); sipRes = sipConnectRx(a0,a1,a2,a3,0);
%End %End
static SIP_PYOBJECT connect(SIP_QOBJECT,SIP_SIGNAL,SIP_PYCALLABLE); static SIP_PYOBJECT connect(SIP_TQOBJECT,SIP_SIGNAL,SIP_PYCALLABLE);
%MethodCode %MethodCode
sipRes = sipConnectRx(a0,a1,a2,0,0); sipRes = sipConnectRx(a0,a1,a2,0,0);
%End %End
SIP_PYOBJECT connect(SIP_QOBJECT,SIP_SIGNAL,SIP_SLOT) const; SIP_PYOBJECT connect(SIP_TQOBJECT,SIP_SIGNAL,SIP_SLOT) const;
%MethodCode %MethodCode
sipRes = sipConnectRx(a0,a1,sipSelf,a2,0); sipRes = sipConnectRx(a0,a1,sipSelf,a2,0);
%End %End
static SIP_PYOBJECT disconnect(SIP_QOBJECT,SIP_SIGNAL,SIP_QOBJECT,SIP_SLOT); static SIP_PYOBJECT disconnect(SIP_TQOBJECT,SIP_SIGNAL,SIP_TQOBJECT,SIP_SLOT);
%MethodCode %MethodCode
sipRes = sipDisconnectRx(a0,a1,a2,a3); sipRes = sipDisconnectRx(a0,a1,a2,a3);
%End %End
static SIP_PYOBJECT disconnect(SIP_QOBJECT,SIP_SIGNAL,SIP_PYCALLABLE); static SIP_PYOBJECT disconnect(SIP_TQOBJECT,SIP_SIGNAL,SIP_PYCALLABLE);
%MethodCode %MethodCode
sipRes = sipDisconnectRx(a0,a1,a2,0); sipRes = sipDisconnectRx(a0,a1,a2,0);
%End %End
@ -558,7 +558,7 @@ public:
void emit(SIP_SIGNAL,SIP_PYTUPLE); void emit(SIP_SIGNAL,SIP_PYTUPLE);
%MethodCode %MethodCode
if (pyqt3EmitSignal(sipSelf, a0, a1) < 0) if (pytqtEmitSignal(sipSelf, a0, a1) < 0)
sipIsErr = 1; sipIsErr = 1;
%End %End
@ -579,7 +579,7 @@ public:
// method. // method.
SIP_PYOBJECT sender(); SIP_PYOBJECT sender();
%MethodCode %MethodCode
sipRes = pyqt3GetSender(); sipRes = pytqt3GetSender();
%End %End
protected: protected:
@ -606,11 +606,11 @@ SIP_PYOBJECT QT_TRANSLATE_NOOP(SIP_PYOBJECT,SIP_PYOBJECT);
%End %End
SIP_PYOBJECT SLOT(const char * /Encoding="ASCII"/) /TypeHint="QT_SLOT"/; SIP_PYOBJECT SLOT(const char * /Encoding="ASCII"/) /TypeHint="TQT_SLOT"/;
%MethodCode %MethodCode
if (!a0) if (!a0)
{ {
PyErr_Format(PyExc_TypeError,"qt.SLOT() slot name cannot be None"); PyErr_Format(PyExc_TypeError,"tqt.SLOT() slot name cannot be None");
sipIsErr = 1; sipIsErr = 1;
} }
else else
@ -631,11 +631,11 @@ SIP_PYOBJECT SLOT(const char * /Encoding="ASCII"/) /TypeHint="QT_SLOT"/;
%End %End
SIP_PYOBJECT SIGNAL(const char * /Encoding="ASCII"/) /TypeHint="QT_SIGNAL"/; SIP_PYOBJECT SIGNAL(const char * /Encoding="ASCII"/) /TypeHint="TQT_SIGNAL"/;
%MethodCode %MethodCode
if (!a0) if (!a0)
{ {
PyErr_Format(PyExc_TypeError,"qt.SIGNAL() signal cannot be None"); PyErr_Format(PyExc_TypeError,"tqt.SIGNAL() signal cannot be None");
sipIsErr = 1; sipIsErr = 1;
} }
else else
@ -660,7 +660,7 @@ SIP_PYOBJECT PYSIGNAL(const char * /Encoding="ASCII"/);
%MethodCode %MethodCode
if (!a0) if (!a0)
{ {
PyErr_Format(PyExc_TypeError,"qt.PYSIGNAL() signal cannot be None"); PyErr_Format(PyExc_TypeError,"tqt.PYSIGNAL() signal cannot be None");
sipIsErr = 1; sipIsErr = 1;
} }
else else
@ -683,8 +683,8 @@ SIP_PYOBJECT PYSIGNAL(const char * /Encoding="ASCII"/);
%ModuleHeaderCode %ModuleHeaderCode
int pyqt3EmitSignal(PyObject *self, const char *sig, PyObject *sigargs); int pytqtEmitSignal(PyObject *self, const char *sig, PyObject *sigargs);
PyObject *pyqt3GetSender(); PyObject *pytqt3GetSender();
%End %End
@ -731,9 +731,9 @@ extern "C" {
// The meta-type for PyTQt classes. It is just a marker type so that we can // The meta-type for PyTQt classes. It is just a marker type so that we can
// safely cast to get access to PyTQt3-specific data structures. // safely cast to get access to PyTQt3-specific data structures.
PyTypeObject pyqtWrapperType_Type = { PyTypeObject pytqtWrapperType_Type = {
PyVarObject_HEAD_INIT(NULL, 0) PyVarObject_HEAD_INIT(NULL, 0)
"qt.pyqtWrapperType", /* tp_name */ "tqt.pytqtWrapperType", /* tp_name */
sizeof (sipWrapperType), /* tp_basicsize */ sizeof (sipWrapperType), /* tp_basicsize */
0, /* tp_itemsize */ 0, /* tp_itemsize */
0, /* tp_dealloc */ 0, /* tp_dealloc */
@ -802,52 +802,52 @@ PyTypeObject pyqtWrapperType_Type = {
/* /*
* An entry in a linked list of slots. * An entry in a linked list of slots.
*/ */
typedef struct _pyqt3SlotList { typedef struct _pytqt3SlotList {
/* The receiver. */ /* The receiver. */
sipSlot rx; sipSlot rx;
/* Next in the list. */ /* Next in the list. */
struct _pyqt3SlotList *next; struct _pytqt3SlotList *next;
} pyqt3SlotList; } pytqt3SlotList;
/* /*
* A Python signal. * A Python signal.
*/ */
typedef struct _pyqt3PySig { typedef struct _pytqt3PySig {
/* The name of the signal. */ /* The name of the signal. */
char *name; char *name;
/* The list of receivers. */ /* The list of receivers. */
pyqt3SlotList *rxlist; pytqt3SlotList *rxlist;
/* Next in the list. */ /* Next in the list. */
struct _pyqt3PySig *next; struct _pytqt3PySig *next;
} pyqt3PySig; } pytqt3PySig;
/* /*
* The C++ wrapper object used by PyTQt3. * The C++ wrapper object used by PyTQt3.
*/ */
typedef struct _pyqtWrapper { typedef struct _pytqtWrapper {
/* The super-type. */ /* The super-type. */
sipWrapper super; sipWrapper super;
/* The list of Python signals. */ /* The list of Python signals. */
pyqt3PySig *pySigList; pytqt3PySig *pySigList;
} pyqtWrapper; } pytqtWrapper;
/* /*
* Clear any slots connected to any Python signals. * Clear any slots connected to any Python signals.
*/ */
static void clear_py_signals_slots(pyqtWrapper *pw) static void clear_py_signals_slots(pytqtWrapper *pw)
{ {
pyqt3PySig *ps; pytqt3PySig *ps;
for (ps = pw->pySigList; ps != NULL; ps = ps->next) for (ps = pw->pySigList; ps != NULL; ps = ps->next)
{ {
pyqt3SlotList *psrx; pytqt3SlotList *psrx;
for (psrx = ps->rxlist; psrx != NULL; psrx = psrx->next) for (psrx = ps->rxlist; psrx != NULL; psrx = psrx->next)
sipClearAnySlotReference(&psrx->rx); sipClearAnySlotReference(&psrx->rx);
@ -858,9 +858,9 @@ static void clear_py_signals_slots(pyqtWrapper *pw)
/* /*
* Find the given Python signal. * Find the given Python signal.
*/ */
static pyqt3PySig *find_py_signal(pyqtWrapper *pw, const char *sig) static pytqt3PySig *find_py_signal(pytqtWrapper *pw, const char *sig)
{ {
pyqt3PySig *ps; pytqt3PySig *ps;
for (ps = pw->pySigList; ps != NULL; ps = ps->next) for (ps = pw->pySigList; ps != NULL; ps = ps->next)
if (sipTQtSameSignalSlotName(ps->name, sig)) if (sipTQtSameSignalSlotName(ps->name, sig))
@ -873,7 +873,7 @@ static pyqt3PySig *find_py_signal(pyqtWrapper *pw, const char *sig)
/* /*
* Free an slot list entry. * Free an slot list entry.
*/ */
static void free_slot_list(pyqt3SlotList *sl) static void free_slot_list(pytqt3SlotList *sl)
{ {
sipFreeSipslot(&sl->rx); sipFreeSipslot(&sl->rx);
sipFree(sl); sipFree(sl);
@ -883,7 +883,7 @@ static void free_slot_list(pyqt3SlotList *sl)
/* /*
* The instance clear slot. * The instance clear slot.
*/ */
static int pyqtWrapper_clear(pyqtWrapper *self) static int pytqtWrapper_clear(pytqtWrapper *self)
{ {
clear_py_signals_slots(self); clear_py_signals_slots(self);
@ -894,14 +894,14 @@ static int pyqtWrapper_clear(pyqtWrapper *self)
/* /*
* The instance dealloc slot. * The instance dealloc slot.
*/ */
static void pyqtWrapper_dealloc(pyqtWrapper *self) static void pytqtWrapper_dealloc(pytqtWrapper *self)
{ {
clear_py_signals_slots(self); clear_py_signals_slots(self);
while (self->pySigList != NULL) while (self->pySigList != NULL)
{ {
pyqt3PySig *ps; pytqt3PySig *ps;
pyqt3SlotList *psrx; pytqt3SlotList *psrx;
/* Take this one out of the list. */ /* Take this one out of the list. */
ps = self->pySigList; ps = self->pySigList;
@ -924,17 +924,17 @@ static void pyqtWrapper_dealloc(pyqtWrapper *self)
/* /*
* The instance traverse slot. * The instance traverse slot.
*/ */
static int pyqtWrapper_traverse(pyqtWrapper *self, visitproc visit, void *arg) static int pytqtWrapper_traverse(pytqtWrapper *self, visitproc visit, void *arg)
{ {
int vret; int vret;
pyqt3PySig *ps; pytqt3PySig *ps;
if ((vret = sipWrapper_Type->tp_traverse((PyObject *)self, visit, arg)) != 0) if ((vret = sipWrapper_Type->tp_traverse((PyObject *)self, visit, arg)) != 0)
return vret; return vret;
for (ps = self->pySigList; ps != NULL; ps = ps->next) for (ps = self->pySigList; ps != NULL; ps = ps->next)
{ {
pyqt3SlotList *psrx; pytqt3SlotList *psrx;
for (psrx = ps->rxlist; psrx != NULL; psrx = psrx->next) for (psrx = ps->rxlist; psrx != NULL; psrx = psrx->next)
if ((vret = sipVisitSlot(&psrx->rx, visit, arg)) != 0) if ((vret = sipVisitSlot(&psrx->rx, visit, arg)) != 0)
@ -945,16 +945,16 @@ static int pyqtWrapper_traverse(pyqtWrapper *self, visitproc visit, void *arg)
} }
static sipWrapperType pyqtWrapper_Type = { static sipWrapperType pytqtWrapper_Type = {
#if !defined(STACKLESS) #if !defined(STACKLESS)
{ {
#endif #endif
{ {
PyVarObject_HEAD_INIT(&pyqtWrapperType_Type, 0) PyVarObject_HEAD_INIT(&pytqtWrapperType_Type, 0)
"qt.pyqtWrapper", /* tp_name */ "tqt.pytqtWrapper", /* tp_name */
sizeof (pyqtWrapper), /* tp_basicsize */ sizeof (pytqtWrapper), /* tp_basicsize */
0, /* tp_itemsize */ 0, /* tp_itemsize */
(destructor)pyqtWrapper_dealloc, /* tp_dealloc */ (destructor)pytqtWrapper_dealloc, /* tp_dealloc */
#if PY_VERSION_HEX >= 0x03080000 #if PY_VERSION_HEX >= 0x03080000
0, /* tp_vectorcall_offset */ 0, /* tp_vectorcall_offset */
#else #else
@ -979,8 +979,8 @@ static sipWrapperType pyqtWrapper_Type = {
0, /* tp_as_buffer */ 0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, /* tp_flags */ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, /* tp_flags */
0, /* tp_doc */ 0, /* tp_doc */
(traverseproc)pyqtWrapper_traverse, /* tp_traverse */ (traverseproc)pytqtWrapper_traverse, /* tp_traverse */
(inquiry)pyqtWrapper_clear, /* tp_clear */ (inquiry)pytqtWrapper_clear, /* tp_clear */
0, /* tp_richcompare */ 0, /* tp_richcompare */
0, /* tp_weaklistoffset */ 0, /* tp_weaklistoffset */
0, /* tp_iter */ 0, /* tp_iter */
@ -1027,7 +1027,7 @@ static sipWrapperType pyqtWrapper_Type = {
// This enumerates the different dynamic signal argument types. // This enumerates the different dynamic signal argument types.
enum pyqt3SigArgType { enum pytqt3SigArgType {
unknown_sat, unknown_sat,
char_sat, char_sat,
uchar_sat, uchar_sat,
@ -1061,10 +1061,10 @@ enum pyqt3SigArgType {
// This defines a single dynamic signal argument type. // This defines a single dynamic signal argument type.
struct pyqt3SigArg struct pytqt3SigArg
{ {
// The type. // The type.
pyqt3SigArgType atype; pytqt3SigArgType atype;
union { union {
// The Python type for classes. // The Python type for classes.
@ -1080,29 +1080,29 @@ struct pyqt3SigArg
// A parsed signal signature. // A parsed signal signature.
struct pyqt3Signature { struct pytqt3Signature {
// The number of arguments. // The number of arguments.
int sg_nrargs; int sg_nrargs;
// The parsed arguments (heap). // The parsed arguments (heap).
pyqt3SigArg *sg_args; pytqt3SigArg *sg_args;
// The unparsed signature (heap). // The unparsed signature (heap).
char *sg_signature; char *sg_signature;
// The next in the list. // The next in the list.
pyqt3Signature *sg_next; pytqt3Signature *sg_next;
}; };
// A connection to a universal slot. // A connection to a universal slot.
struct pyqt3SlotConnection struct pytqt3SlotConnection
{ {
// The transmitter TQObject. // The transmitter TQObject.
void *sc_transmitter; void *sc_transmitter;
// The parsed signature. // The parsed signature.
const pyqt3Signature *sc_signature; const pytqt3Signature *sc_signature;
// The slot. // The slot.
sipSlot sc_slot; sipSlot sc_slot;
@ -1118,7 +1118,7 @@ struct pyqt3SlotConnection
class UniversalSlot : public TQObject class UniversalSlot : public TQObject
{ {
public: public:
UniversalSlot(TQObject *qtx, pyqt3SlotConnection *conn, const char **member); UniversalSlot(TQObject *tqtx, pytqt3SlotConnection *conn, const char **member);
~UniversalSlot(); ~UniversalSlot();
virtual TQMetaObject *metaObject() const virtual TQMetaObject *metaObject() const
@ -1133,7 +1133,7 @@ public:
static UniversalSlot *unislots; static UniversalSlot *unislots;
UniversalSlot *nextus, *prevus; UniversalSlot *nextus, *prevus;
pyqt3SlotConnection conn; pytqt3SlotConnection conn;
private: private:
static TQMetaObject *metaObj; static TQMetaObject *metaObj;
@ -1142,14 +1142,14 @@ private:
// Create a universal slot. Note that this will leak if there is no signal // Create a universal slot. Note that this will leak if there is no signal
// transmitter (ie. no parent) - TQTimer.singleShot() for example. // transmitter (ie. no parent) - TQTimer.singleShot() for example.
UniversalSlot::UniversalSlot(TQObject *qtx, pyqt3SlotConnection *connection, const char **member) : TQObject() UniversalSlot::UniversalSlot(TQObject *tqtx, pytqt3SlotConnection *connection, const char **member) : TQObject()
{ {
// Save the connection. // Save the connection.
conn = *connection; conn = *connection;
// Detect when the transmitter is destroyed. // Detect when the transmitter is destroyed.
if (qtx) if (tqtx)
connect(qtx, SIGNAL(destroyed(TQObject *)), SLOT(deleteLater())); connect(tqtx, SIGNAL(destroyed(TQObject *)), SLOT(deleteLater()));
// Return the slot to connect to. // Return the slot to connect to.
*member = SLOT(unislot()); *member = SLOT(unislot());
@ -1229,7 +1229,7 @@ bool UniversalSlot::tqt_invoke(int id, TQUObject *qargs)
return TQObject::tqt_invoke(id, qargs); return TQObject::tqt_invoke(id, qargs);
bool ok = TRUE; bool ok = TRUE;
const pyqt3Signature *psig = conn.sc_signature; const pytqt3Signature *psig = conn.sc_signature;
TQVariant *qv; TQVariant *qv;
// Save in case it is asked for later. // Save in case it is asked for later.
@ -1380,8 +1380,8 @@ bool UniversalSlot::tqt_invoke(int id, TQUObject *qargs)
} }
static pyqt3Signature *parseSignature(const char *sig); static pytqt3Signature *parseSignature(const char *sig);
static void parseType(const char *type, pyqt3SigArg *arg); static void parseType(const char *type, pytqt3SigArg *arg);
// Factory function to create a universal slot instance. Returns a pointer to // Factory function to create a universal slot instance. Returns a pointer to
@ -1389,7 +1389,7 @@ static void parseType(const char *type, pyqt3SigArg *arg);
static void *sipTQtCreateUniversalSlot(sipWrapper *tx, const char *sig, static void *sipTQtCreateUniversalSlot(sipWrapper *tx, const char *sig,
PyObject *rxObj, const char *slot, const char **member, int) PyObject *rxObj, const char *slot, const char **member, int)
{ {
pyqt3SlotConnection conn; pytqt3SlotConnection conn;
/* Initialise the connection. */ /* Initialise the connection. */
if (tx && sipGetAddress(&tx->super) == NULL) if (tx && sipGetAddress(&tx->super) == NULL)
@ -1412,7 +1412,7 @@ static void *sipTQtCreateUniversalSlot(sipWrapper *tx, const char *sig,
return 0; return 0;
} }
TQObject *qtx = 0; TQObject *tqtx = 0;
// See if the transmitter is a TQObject in which case we will connect // See if the transmitter is a TQObject in which case we will connect
// to it's destroyed signal so that the universal slot can be destroyed // to it's destroyed signal so that the universal slot can be destroyed
@ -1421,17 +1421,17 @@ static void *sipTQtCreateUniversalSlot(sipWrapper *tx, const char *sig,
// expected because TQWidget destroys its children before emitting the // expected because TQWidget destroys its children before emitting the
// destroyed signal.) // destroyed signal.)
if (tx && PyObject_TypeCheck((PyObject *)tx, (PyTypeObject *)sipClass_TQObject)) if (tx && PyObject_TypeCheck((PyObject *)tx, (PyTypeObject *)sipClass_TQObject))
qtx = reinterpret_cast<TQObject *>(conn.sc_transmitter); tqtx = reinterpret_cast<TQObject *>(conn.sc_transmitter);
return new UniversalSlot(qtx, &conn, member); return new UniversalSlot(tqtx, &conn, member);
} }
// Parse the signal arguments for a connection. // Parse the signal arguments for a connection.
static pyqt3Signature *parseSignature(const char *sig) static pytqt3Signature *parseSignature(const char *sig)
{ {
static pyqt3Signature *psig_list = NULL; static pytqt3Signature *psig_list = NULL;
pyqt3Signature *psig; pytqt3Signature *psig;
const char *sp, *ep; const char *sp, *ep;
// First see if it has already been parsed. Note that both sides of a // First see if it has already been parsed. Note that both sides of a
@ -1444,7 +1444,7 @@ static pyqt3Signature *parseSignature(const char *sig)
return psig; return psig;
// Create a new one including space for the copy of the signature. // Create a new one including space for the copy of the signature.
if ((psig = (pyqt3Signature *)sipMalloc(sizeof (pyqt3Signature) + strlen(sig) + 1)) == NULL) if ((psig = (pytqt3Signature *)sipMalloc(sizeof (pytqt3Signature) + strlen(sig) + 1)) == NULL)
return NULL; return NULL;
psig->sg_signature = (char *)&psig[1]; psig->sg_signature = (char *)&psig[1];
@ -1519,7 +1519,7 @@ static pyqt3Signature *parseSignature(const char *sig)
// Allocate the space. // Allocate the space.
psig->sg_nrargs = nrcommas + 1; psig->sg_nrargs = nrcommas + 1;
if ((psig->sg_args = (pyqt3SigArg *)sipMalloc(sizeof (pyqt3SigArg) * psig->sg_nrargs)) == NULL) if ((psig->sg_args = (pytqt3SigArg *)sipMalloc(sizeof (pytqt3SigArg) * psig->sg_nrargs)) == NULL)
{ {
sipFree(psig); sipFree(psig);
return NULL; return NULL;
@ -1547,12 +1547,12 @@ static pyqt3Signature *parseSignature(const char *sig)
// Parse a single type. // Parse a single type.
static void parseType(const char *type, pyqt3SigArg *arg) static void parseType(const char *type, pytqt3SigArg *arg)
{ {
size_t btlen = 0; size_t btlen = 0;
int unsup, isref = FALSE, indir = 0; int unsup, isref = FALSE, indir = 0;
const char *ep; const char *ep;
pyqt3SigArgType sat = unknown_sat; pytqt3SigArgType sat = unknown_sat;
// Find the start of the significant part of the type. // Find the start of the significant part of the type.
if (strncmp(type, "const ", 6) == 0) if (strncmp(type, "const ", 6) == 0)
@ -1783,7 +1783,7 @@ static void *sipTQtFindSlot(void *tx, const char *sig, PyObject *rxObj,
{ {
for (UniversalSlot *us = UniversalSlot::unislots; us; us = us->nextus) for (UniversalSlot *us = UniversalSlot::unislots; us; us = us->nextus)
{ {
pyqt3SlotConnection *conn = &us->conn; pytqt3SlotConnection *conn = &us->conn;
if (conn->sc_transmitter != tx) if (conn->sc_transmitter != tx)
continue; continue;
@ -1857,7 +1857,7 @@ static sipSlot *sipTQtFindSipslot(void *tx, void **context)
while (us) while (us)
{ {
pyqt3SlotConnection *this_conn = &us->conn; pytqt3SlotConnection *this_conn = &us->conn;
us = us->nextus; us = us->nextus;
@ -1878,14 +1878,14 @@ static sipSlot *sipTQtFindSipslot(void *tx, void **context)
static int sipTQtConnectPySignal(PyObject *txObj, const char *sig, static int sipTQtConnectPySignal(PyObject *txObj, const char *sig,
PyObject *rxObj, const char *slot) PyObject *rxObj, const char *slot)
{ {
pyqt3PySig *ps; pytqt3PySig *ps;
pyqt3SlotList *psrx; pytqt3SlotList *psrx;
pyqtWrapper *pw = (pyqtWrapper *)txObj; pytqtWrapper *pw = (pytqtWrapper *)txObj;
/* Create a new one if necessary. */ /* Create a new one if necessary. */
if ((ps = find_py_signal(pw, sig)) == NULL) if ((ps = find_py_signal(pw, sig)) == NULL)
{ {
if ((ps = (pyqt3PySig *)sipMalloc(sizeof (pyqt3PySig))) == NULL) if ((ps = (pytqt3PySig *)sipMalloc(sizeof (pytqt3PySig))) == NULL)
return -1; return -1;
if ((ps->name = (char *)sipMalloc(strlen(sig) + 1)) == NULL) if ((ps->name = (char *)sipMalloc(strlen(sig) + 1)) == NULL)
@ -1903,7 +1903,7 @@ static int sipTQtConnectPySignal(PyObject *txObj, const char *sig,
} }
/* Create the new receiver. */ /* Create the new receiver. */
if ((psrx = (pyqt3SlotList *)sipMalloc(sizeof (pyqt3SlotList))) == NULL) if ((psrx = (pytqt3SlotList *)sipMalloc(sizeof (pytqt3SlotList))) == NULL)
return -1; return -1;
if (sipSaveSlot(&psrx->rx, rxObj, slot) < 0) if (sipSaveSlot(&psrx->rx, rxObj, slot) < 0)
@ -1923,15 +1923,15 @@ static int sipTQtConnectPySignal(PyObject *txObj, const char *sig,
static void sipTQtDisconnectPySignal(PyObject *txObj, const char *sig, static void sipTQtDisconnectPySignal(PyObject *txObj, const char *sig,
PyObject *rxObj, const char *slot) PyObject *rxObj, const char *slot)
{ {
pyqt3PySig *ps; pytqt3PySig *ps;
if ((ps = find_py_signal((pyqtWrapper *)txObj, sig)) != NULL) if ((ps = find_py_signal((pytqtWrapper *)txObj, sig)) != NULL)
{ {
pyqt3SlotList **psrxp; pytqt3SlotList **psrxp;
for (psrxp = &ps->rxlist; *psrxp != NULL; psrxp = &(*psrxp)->next) for (psrxp = &ps->rxlist; *psrxp != NULL; psrxp = &(*psrxp)->next)
{ {
pyqt3SlotList *psrx = *psrxp; pytqt3SlotList *psrx = *psrxp;
if (sipSameSlot(&psrx->rx, rxObj, slot)) if (sipSameSlot(&psrx->rx, rxObj, slot))
{ {
@ -1947,12 +1947,12 @@ static void sipTQtDisconnectPySignal(PyObject *txObj, const char *sig,
// Emit a signal for the sip module. // Emit a signal for the sip module.
static int sipTQtEmitSignal(PyObject *self, const char *sig, PyObject *sigargs) static int sipTQtEmitSignal(PyObject *self, const char *sig, PyObject *sigargs)
{ {
return pyqt3EmitSignal(self, sig, sigargs); return pytqtEmitSignal(self, sig, sigargs);
} }
// Emit a Python or TQt signal. // Emit a Python or TQt signal.
int pyqt3EmitSignal(PyObject *self, const char *sig, PyObject *sigargs) int pytqtEmitSignal(PyObject *self, const char *sig, PyObject *sigargs)
{ {
// Don't do anything if signals are blocked. TQt signals would be blocked // Don't do anything if signals are blocked. TQt signals would be blocked
// anyway, but this blocks Python signals as well. // anyway, but this blocks Python signals as well.
@ -1967,10 +1967,10 @@ int pyqt3EmitSignal(PyObject *self, const char *sig, PyObject *sigargs)
// See if it is a TQt signal. // See if it is a TQt signal.
if (*sig == '2') if (*sig == '2')
{ {
pyqt3QtSignal *tab; pytqtTQtSignal *tab;
// Search the table. // Search the table.
for (tab = ((pyqt3ClassTypeDef *)((sipWrapperType *)(self->ob_type))->type)->qt3_emit; tab->st_name != NULL; ++tab) for (tab = ((pytqtClassTypeDef *)((sipWrapperType *)(self->ob_type))->type)->tqt_emit; tab->st_name != NULL; ++tab)
{ {
const char *sp, *tp; const char *sp, *tp;
bool found; bool found;
@ -1998,12 +1998,12 @@ int pyqt3EmitSignal(PyObject *self, const char *sig, PyObject *sigargs)
return -1; return -1;
} }
pyqt3PySig *ps = find_py_signal((pyqtWrapper *)self, sig); pytqt3PySig *ps = find_py_signal((pytqtWrapper *)self, sig);
if (ps) if (ps)
{ {
int rc = 0; int rc = 0;
pyqt3SlotList *rxlist = ps->rxlist; pytqt3SlotList *rxlist = ps->rxlist;
// Forget the last TQt sender and remember this one. // Forget the last TQt sender and remember this one.
UniversalSlot::lastSender = 0; UniversalSlot::lastSender = 0;
@ -2012,7 +2012,7 @@ int pyqt3EmitSignal(PyObject *self, const char *sig, PyObject *sigargs)
// Apply the arguments to each slot method. // Apply the arguments to each slot method.
while (rxlist && rc >= 0) while (rxlist && rc >= 0)
{ {
pyqt3SlotList *next; pytqt3SlotList *next;
PyObject *res; PyObject *res;
// We get the next in the list before calling the slot in case the // We get the next in the list before calling the slot in case the
@ -2041,7 +2041,7 @@ int pyqt3EmitSignal(PyObject *self, const char *sig, PyObject *sigargs)
// Return the most recent signal sender. // Return the most recent signal sender.
PyObject *pyqt3GetSender() PyObject *pytqt3GetSender()
{ {
PyObject *sender; PyObject *sender;
@ -2065,22 +2065,22 @@ PyObject *pyqt3GetSender()
%InitialisationCode %InitialisationCode
// Initialise the meta-type. // Initialise the meta-type.
pyqtWrapperType_Type.tp_base = sipWrapperType_Type; pytqtWrapperType_Type.tp_base = sipWrapperType_Type;
if (PyType_Ready(&pyqtWrapperType_Type) < 0) if (PyType_Ready(&pytqtWrapperType_Type) < 0)
Py_FatalError("qt: Failed to initialise pyqtWrapperType type"); Py_FatalError("tqt: Failed to initialise pytqtWrapperType type");
// Register the meta-type. // Register the meta-type.
if (sipRegisterPyType((PyTypeObject *)&pyqtWrapperType_Type) < 0) if (sipRegisterPyType((PyTypeObject *)&pytqtWrapperType_Type) < 0)
Py_FatalError("qt: Failed to register pyqtWrapperType type"); Py_FatalError("tqt: Failed to register pytqtWrapperType type");
// Initialise the super-type. // Initialise the super-type.
pyqtWrapper_Type.super.ht_type.tp_base = sipWrapper_Type; pytqtWrapper_Type.super.ht_type.tp_base = sipWrapper_Type;
if (PyType_Ready((PyTypeObject *)&pyqtWrapper_Type) < 0) if (PyType_Ready((PyTypeObject *)&pytqtWrapper_Type) < 0)
Py_FatalError("qt: Failed to initialise pyqtWrapper type"); Py_FatalError("tqt: Failed to initialise pytqtWrapper type");
// Register the super-type. // Register the super-type.
if (sipRegisterPyType((PyTypeObject *)&pyqtWrapper_Type) < 0) if (sipRegisterPyType((PyTypeObject *)&pytqtWrapper_Type) < 0)
Py_FatalError("qt: Failed to register pyqtWrapper type"); Py_FatalError("tqt: Failed to register pytqtWrapper type");
%End %End

@ -80,27 +80,27 @@ return type of a function or the type of an argument, a Python list of
return 1; return 1;
} }
TQObjectList *qol = new TQObjectList; TQObjectList *tqol = new TQObjectList;
for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i) for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
{ {
TQObject *qobj; TQObject *tqobj;
// We apply the transfer to the list itself, not the elements. // We apply the transfer to the list itself, not the elements.
// Note that any temporary element will never be destroyed. // Note that any temporary element will never be destroyed.
// There is nothing that can be done about this. // There is nothing that can be done about this.
qobj = reinterpret_cast<TQObject *>(sipConvertToInstance(PyList_GET_ITEM(sipPy,i),sipClass_TQObject,0,0,0,sipIsErr)); tqobj = reinterpret_cast<TQObject *>(sipConvertToInstance(PyList_GET_ITEM(sipPy,i),sipClass_TQObject,0,0,0,sipIsErr));
if (*sipIsErr) if (*sipIsErr)
{ {
delete qol; delete tqol;
return 0; return 0;
} }
qol -> append(qobj); tqol -> append(tqobj);
} }
*sipCppPtr = qol; *sipCppPtr = tqol;
return sipGetState(sipTransferObj); return sipGetState(sipTransferObj);
%End %End

@ -93,7 +93,7 @@ public:
const char **str; const char **str;
if ((str = PyTQt_qt_ListToArray(a0)) == NULL) if ((str = PyTQt_tqt_ListToArray(a0)) == NULL)
sipIsErr = 1; sipIsErr = 1;
else else
{ {

@ -634,12 +634,12 @@ public:
SIP_PYOBJECT __unicode__(); SIP_PYOBJECT __unicode__();
%MethodCode %MethodCode
sipRes = PyTQt_qt_PyObject_FromTQString(sipCpp); sipRes = PyTQt_tqt_PyObject_FromTQString(sipCpp);
%End %End
SIP_PYOBJECT __str__(); SIP_PYOBJECT __str__();
%MethodCode %MethodCode
sipRes = PyTQt_qt_PyObject_FromTQString(sipCpp); sipRes = PyTQt_tqt_PyObject_FromTQString(sipCpp);
%End %End
%ConvertToTypeCode %ConvertToTypeCode
@ -651,7 +651,7 @@ public:
PyUnicode_Check(sipPy) || PyUnicode_Check(sipPy) ||
sipCanConvertToInstance(sipPy,sipClass_TQString,SIP_NO_CONVERTORS)); sipCanConvertToInstance(sipPy,sipClass_TQString,SIP_NO_CONVERTORS));
*sipCppPtr = PyTQt_qt_PyObject_AsTQString(sipPy); *sipCppPtr = PyTQt_tqt_PyObject_AsTQString(sipPy);
if (*sipCppPtr) if (*sipCppPtr)
return sipGetState(sipTransferObj); return sipGetState(sipTransferObj);
@ -743,12 +743,12 @@ bool operator>=(const TQString &,const TQString &);
%ModuleHeaderCode %ModuleHeaderCode
extern PyObject *PyTQt_qt_PyObject_FromTQString(const TQString *qstr); extern PyObject *PyTQt_tqt_PyObject_FromTQString(const TQString *tqstr);
%End %End
%ModuleCode %ModuleCode
// Convert a QString to a Python Unicode object. // Convert a TQString to a Python Unicode object.
PyObject *PyTQt_qt_PyObject_FromTQString(const TQString *qstr) PyObject *PyTQt_tqt_PyObject_FromTQString(const TQString *tqstr)
{ {
PyObject *obj; PyObject *obj;
@ -758,12 +758,12 @@ PyObject *PyTQt_qt_PyObject_FromTQString(const TQString *qstr)
// common case. Note that we can't use PyUnicode_FromKindAndData() because // common case. Note that we can't use PyUnicode_FromKindAndData() because
// it doesn't handle surrogates in UCS2 strings. // it doesn't handle surrogates in UCS2 strings.
int qt_len = qstr->length(); int tqt_len = tqstr->length();
Py_UCS4 maxchar = 0x007f; Py_UCS4 maxchar = 0x007f;
for (int qt_i = 0; qt_i < qt_len && maxchar < 0xffff; ++qt_i) for (int tqt_i = 0; tqt_i < tqt_len && maxchar < 0xffff; ++tqt_i)
{ {
Py_UCS4 uch = qstr->at(qt_i).unicode(); Py_UCS4 uch = tqstr->at(tqt_i).unicode();
if (uch > 0x00ff) if (uch > 0x00ff)
{ {
@ -776,34 +776,34 @@ PyObject *PyTQt_qt_PyObject_FromTQString(const TQString *qstr)
} }
// Create the correctly sized object. // Create the correctly sized object.
if ((obj = PyUnicode_New(qt_len, maxchar)) == NULL) if ((obj = PyUnicode_New(tqt_len, maxchar)) == NULL)
return NULL; return NULL;
int kind = PyUnicode_KIND(obj); int kind = PyUnicode_KIND(obj);
void *data = PyUnicode_DATA(obj); void *data = PyUnicode_DATA(obj);
for (int qt_i = 0; qt_i < qt_len; ++qt_i) for (int tqt_i = 0; tqt_i < tqt_len; ++tqt_i)
{ {
Py_UCS4 uch = qstr->at(qt_i).unicode(); Py_UCS4 uch = tqstr->at(tqt_i).unicode();
PyUnicode_WRITE(kind, data, qt_i, uch); PyUnicode_WRITE(kind, data, tqt_i, uch);
} }
#elif defined(Py_UNICODE_WIDE) #elif defined(Py_UNICODE_WIDE)
// Note that this doesn't handle code points greater than 0xffff. It could // Note that this doesn't handle code points greater than 0xffff. It could
// but it's only an issue for old versions of Qt. // but it's only an issue for old versions of TQt.
if ((obj = PyUnicode_FromUnicode(NULL, qstr->length())) == NULL) if ((obj = PyUnicode_FromUnicode(NULL, tqstr->length())) == NULL)
return NULL; return NULL;
Py_UNICODE *pyu = PyUnicode_AS_UNICODE(obj); Py_UNICODE *pyu = PyUnicode_AS_UNICODE(obj);
for (unsigned int i = 0; i < qstr->length(); ++i) for (unsigned int i = 0; i < tqstr->length(); ++i)
*pyu++ = (qstr->at(i)).unicode(); *pyu++ = (tqstr->at(i)).unicode();
#else #else
if ((obj = PyUnicode_FromUnicode(NULL, qstr->length())) == NULL) if ((obj = PyUnicode_FromUnicode(NULL, tqstr->length())) == NULL)
return NULL; return NULL;
memcpy(PyUnicode_AS_UNICODE(obj), qstr->ucs2(), memcpy(PyUnicode_AS_UNICODE(obj), tqstr->ucs2(),
qstr->length() * sizeof (Py_UNICODE)); tqstr->length() * sizeof (Py_UNICODE));
#endif #endif
return obj; return obj;
@ -812,12 +812,12 @@ PyObject *PyTQt_qt_PyObject_FromTQString(const TQString *qstr)
%ModuleHeaderCode %ModuleHeaderCode
extern TQString *PyTQt_qt_PyObject_AsTQString(PyObject *obj); extern TQString *PyTQt_tqt_PyObject_AsTQString(PyObject *obj);
%End %End
%ModuleCode %ModuleCode
// Convert a Python Unicode object to a QString. // Convert a Python Unicode object to a TQString.
TQString *PyTQt_qt_PyObject_AsTQString(PyObject *obj) TQString *PyTQt_tqt_PyObject_AsTQString(PyObject *obj)
{ {
if (PyUnicode_Check(obj)) if (PyUnicode_Check(obj))
{ {
@ -835,33 +835,33 @@ TQString *PyTQt_qt_PyObject_AsTQString(PyObject *obj)
case PyUnicode_4BYTE_KIND: case PyUnicode_4BYTE_KIND:
// Note that this doesn't handle code points greater than 0xffff. It // Note that this doesn't handle code points greater than 0xffff. It
// could but it's only an issue for old versions of Qt. // could but it's only an issue for old versions of TQt.
TQString *qstr = new TQString; TQString *tqstr = new TQString;
Py_UCS4 *ucode = PyUnicode_4BYTE_DATA(obj); Py_UCS4 *ucode = PyUnicode_4BYTE_DATA(obj);
for (SIP_SSIZE_T i = 0; i < len; ++i) for (SIP_SSIZE_T i = 0; i < len; ++i)
qstr->append(TQChar((uint)ucode[i])); tqstr->append(TQChar((uint)ucode[i]));
return qstr; return tqstr;
} }
return NULL; return NULL;
#else #else
TQString *qstr = new TQString; TQString *tqstr = new TQString;
# ifdef Py_UNICODE_WIDE # ifdef Py_UNICODE_WIDE
Py_UNICODE *ucode = PyUnicode_AS_UNICODE(obj); Py_UNICODE *ucode = PyUnicode_AS_UNICODE(obj);
SIP_SSIZE_T len = PyUnicode_GET_SIZE(obj); SIP_SSIZE_T len = PyUnicode_GET_SIZE(obj);
for (SIP_SSIZE_T i = 0; i < len; ++i) for (SIP_SSIZE_T i = 0; i < len; ++i)
qstr->append(TQChar((uint)ucode[i])); tqstr->append(TQChar((uint)ucode[i]));
# else # else
qstr->setUnicodeCodes((ushort *)PyUnicode_AS_UNICODE(obj),PyUnicode_GET_SIZE(obj)); tqstr->setUnicodeCodes((ushort *)PyUnicode_AS_UNICODE(obj),PyUnicode_GET_SIZE(obj));
# endif # endif
return qstr; return tqstr;
#endif #endif
} }
else if (PyBytes_Check(obj)) else if (PyBytes_Check(obj))
@ -875,14 +875,14 @@ TQString *PyTQt_qt_PyObject_AsTQString(PyObject *obj)
%ModuleHeaderCode %ModuleHeaderCode
extern const char *PyTQt_qt_encode(PyObject **s, TQApplication::Encoding encoding); extern const char *PyTQt_tqt_encode(PyObject **s, TQApplication::Encoding encoding);
%End %End
%ModuleCode %ModuleCode
// Convert a Python unicode/string/bytes object to a character string encoded // Convert a Python unicode/string/bytes object to a character string encoded
// according to the given encoding. Update the object with a new reference to // according to the given encoding. Update the object with a new reference to
// the object that owns the data. // the object that owns the data.
const char *PyTQt_qt_encode(PyObject **s, TQApplication::Encoding encoding) const char *PyTQt_tqt_encode(PyObject **s, TQApplication::Encoding encoding)
{ {
PyObject *obj = *s; PyObject *obj = *s;
const char *es = 0; const char *es = 0;
@ -900,12 +900,12 @@ const char *PyTQt_qt_encode(PyObject **s, TQApplication::Encoding encoding)
if (codec) if (codec)
{ {
// Use the Qt codec to get to a byte string, and then to a // Use the TQt codec to get to a byte string, and then to a
// Python object. // Python object.
TQString *qstr = PyTQt_qt_PyObject_AsTQString(obj); TQString *tqstr = PyTQt_tqt_PyObject_AsTQString(obj);
TQString qs = *qstr; TQString tqs = *tqstr;
TQByteArray ba = codec->fromUnicode(qs); TQByteArray ba = codec->fromUnicode(tqs);
delete qstr; delete tqstr;
obj = PyBytes_FromStringAndSize(ba.data(), ba.size()); obj = PyBytes_FromStringAndSize(ba.data(), ba.size());
} }

@ -76,7 +76,7 @@ is used instead.
if (sipIsErr == NULL) if (sipIsErr == NULL)
return PyList_Check(sipPy); return PyList_Check(sipPy);
TQStrList *qsl = new TQStrList; TQStrList *tqsl = new TQStrList;
for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i) for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
{ {
@ -90,14 +90,14 @@ is used instead.
else if ((s = (char *)sipBytes_AsString(object)) == NULL) else if ((s = (char *)sipBytes_AsString(object)) == NULL)
{ {
*sipIsErr = 1; *sipIsErr = 1;
delete qsl; delete tqsl;
return 0; return 0;
} }
qsl -> append(s); tqsl -> append(s);
} }
*sipCppPtr = qsl; *sipCppPtr = tqsl;
return sipGetState(sipTransferObj); return sipGetState(sipTransferObj);
%End %End

@ -0,0 +1,279 @@
// This is the SIP interface definition for the tqt module of PyTQt.
//
// Copyright (c) 2007
// Riverbank Computing Limited <info@riverbankcomputing.co.uk>
//
// This file is part of PyTQt.
//
// This copy of PyTQt is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2, or (at your option) any later
// version.
//
// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%Module PyTQt.tqt 2
%Plugin PyTQt3
%Include versions.sip
%Include copying.sip
unsigned PYTQT_VERSION;
const char *PYTQT_VERSION_STR;
%ModuleCode
static unsigned PYTQT_VERSION = 0x031201;
static const char *PYTQT_VERSION_STR = "3.18.1";
%End
// Hook into the VendorID package if it is enabled.
%Feature VendorID
%If (VendorID)
%ModuleCode
#include <vendorid.h>
%End
%PreInitialisationCode
if (!vendorid_check())
{
PyErr_SetString(PyExc_RuntimeError, "PyTQt cannot be used with this Python interpreter");
return;
}
%End
%End
%DefaultMetatype tqt.pytqtWrapperType
%DefaultSupertype tqt.pytqtWrapper
// Include the interface definitions for each class.
// These contain enum and type definitions that need to be defined before they
// are used so they do not seem to be classes.
%Include tqglobal.sip
%Include tqnamespace.sip
%Include tqwindowdefs.sip
%Include tqpen.sip
%Include tqpaintdevice.sip
%Include tqpixmap.sip
%Include tqbitmap.sip
%Include tqsize.sip
%Include tqsizepolicy.sip
%Include tqaccel.sip
%Include tqaction.sip
%Include tqapplication.sip
%Include tqassistantclient.sip
%Include tqbrush.sip
%Include tqbutton.sip
%Include tqbuttongroup.sip
%Include tqbytearray.sip
%Include tqcdestyle.sip
%Include tqcheckbox.sip
%Include tqclipboard.sip
%Include tqcolor.sip
%Include tqcolordialog.sip
%Include tqcolorgroup.sip
%Include tqcombobox.sip
%Include tqcommonstyle.sip
%Include tqcstring.sip
%Include tqcursor.sip
%Include tqdatastream.sip
%Include tqdatetime.sip
%Include tqdatetimeedit.sip
%Include tqdesktopwidget.sip
%Include tqdial.sip
%Include tqdialog.sip
%Include tqdir.sip
%Include tqdockarea.sip
%Include tqdockwindow.sip
%Include tqdragobject.sip
%Include tqdrawutil.sip
%Include tqdropsite.sip
%Include tqerrormessage.sip
%Include tqevent.sip
%Include tqeventloop.sip
%Include tqfile.sip
%Include tqfiledialog.sip
%Include tqfileinfo.sip
%Include tqfont.sip
%Include tqfontdatabase.sip
%Include tqfontdialog.sip
%Include tqfontinfo.sip
%Include tqfontmetrics.sip
%Include tqframe.sip
%Include tqgrid.sip
%Include tqgridview.sip
%Include tqgroupbox.sip
%Include tqhbox.sip
%Include tqhbuttongroup.sip
%Include tqheader.sip
%Include tqhgroupbox.sip
%Include tqiconset.sip
%Include tqiconview.sip
%Include tqimage.sip
%Include tqinputdialog.sip
%Include tqinterlacestyle.sip
%Include tqiodevice.sip
%Include tqkeysequence.sip
%Include tqlabel.sip
%Include tqlayout.sip
%Include tqlcdnumber.sip
%Include tqlibrary.sip
%Include tqlineedit.sip
%Include tqlistbox.sip
%Include tqlistview.sip
%Include tqlocale.sip
%Include tqmainwindow.sip
%Include tqmemarray.sip
%Include tqmenubar.sip
%Include tqmenudata.sip
%Include tqmessagebox.sip
%Include tqmetaobject.sip
%Include tqmime.sip
%Include tqmotifplusstyle.sip
%Include tqmotifstyle.sip
%Include tqmovie.sip
%Include tqmutex.sip
%Include tqmultilinedit.sip
%Include tqnetworkprotocol.sip
%Include tqobject.sip
%Include tqobjectcleanuphandler.sip
%Include tqobjectlist.sip
%Include tqpaintdevicemetrics.sip
%Include tqpainter.sip
%Include tqpair.sip
%Include tqpalette.sip
%Include tqpicture.sip
%Include tqpixmapcache.sip
%Include tqplatinumstyle.sip
%Include tqpoint.sip
%Include tqpointarray.sip
%Include tqpopupmenu.sip
%Include tqprintdialog.sip
%Include tqprinter.sip
%Include tqprocess.sip
%Include tqprogressbar.sip
%Include tqprogressdialog.sip
%Include tqptrlist.sip
%Include tqpushbutton.sip
%Include tqradiobutton.sip
%Include tqrangecontrol.sip
%Include tqrect.sip
%Include tqregexp.sip
%Include tqregion.sip
%Include tqscrollbar.sip
%Include tqscrollview.sip
%Include tqsemaphore.sip
%Include tqsessionmanager.sip
%Include tqsettings.sip
%Include tqsgistyle.sip
%Include tqsignalmapper.sip
%Include tqsimplerichtext.sip
%Include tqsizegrip.sip
%Include tqslider.sip
%Include tqsocketnotifier.sip
%Include tqsound.sip
%Include tqspinbox.sip
%Include tqsplashscreen.sip
%Include tqsplitter.sip
%Include tqstatusbar.sip
%Include tqstring.sip
%Include tqstringlist.sip
%Include tqstrlist.sip
%Include tqstyle.sip
%Include tqstylefactory.sip
%Include tqstylesheet.sip
%Include tqsyntaxhighlighter.sip
%Include tqtabbar.sip
%Include tqtabdialog.sip
%Include tqtabwidget.sip
%Include tqtextbrowser.sip
%Include tqtextcodec.sip
%Include tqtextedit.sip
%Include tqtextstream.sip
%Include tqtextview.sip
%Include tqthread.sip
%Include tqtimer.sip
%Include tqtoolbar.sip
%Include tqtoolbox.sip
%Include tqtoolbutton.sip
%Include tqtooltip.sip
%Include tqtranslator.sip
%Include tqurl.sip
%Include tqurlinfo.sip
%Include tqurloperator.sip
%Include tquuid.sip
%Include tqvalidator.sip
%Include tqvaluelist.sip
%Include tqvariant.sip
%Include tqvbox.sip
%Include tqvbuttongroup.sip
%Include tqvgroupbox.sip
%Include tqwaitcondition.sip
%Include tqwhatsthis.sip
%Include tqwidget.sip
%Include tqwidgetlist.sip
%Include tqwidgetstack.sip
%Include tqwindowsstyle.sip
%Include tqwindowsxpstyle.sip
%Include tqwizard.sip
%Include tqwmatrix.sip
%Include tqworkspace.sip
// The build file templates.
%Makefile tqt.pro.in
# The project file for the tqt module.
#
# Copyright (c) 2007
# Riverbank Computing Limited <info@riverbankcomputing.co.uk>
#
# This file is part of PyTQt.
#
# This copy of PyTQt is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2, or (at your option) any later
# version.
#
# PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
TEMPLATE = lib
TARGET = @BLX_TARGET_LIB@
DESTDIR = @PYTQT_MODDIR@
CONFIG += @BLX_CONFIG_LIB@ @PYTQT_WARN@
INCLUDEPATH = @BLX_INCLUDEPATH@
DEFINES = @BLX_DEFINES@
LIBS += @PYTQT_QASSISTANTCLIENT_LIB@ @BLX_LIBS@
macx:QMAKE_LFLAGS += -framework Python
SOURCES = $B
HEADERS = $H
%End

@ -34,10 +34,10 @@ All constant values defined by TQt have equivalent constants defined to Python.
%End %End
%OptionalInclude qwindowdefs_mac.sip %OptionalInclude tqwindowdefs_mac.sip
%OptionalInclude qwindowdefs_qws.sip %OptionalInclude tqwindowdefs_qws.sip
%OptionalInclude qwindowdefs_win.sip %OptionalInclude tqwindowdefs_win.sip
%OptionalInclude qwindowdefs_x11.sip %OptionalInclude tqwindowdefs_x11.sip
typedef TQ_INT32 TQCOORD; typedef TQ_INT32 TQCOORD;

@ -42,10 +42,10 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%End %End
%OptionalInclude pyqt-internal.sip %OptionalInclude pytqt-internal.sip
%OptionalInclude pyqt-gpl.sip %OptionalInclude pytqt-gpl.sip
%OptionalInclude pyqt-commercial.sip %OptionalInclude pytqt-commercial.sip
%OptionalInclude pyqt-edu.sip %OptionalInclude pytqt-edu.sip
%OptionalInclude pyqt-eval.sip %OptionalInclude pytqt-eval.sip
%OptionalInclude pyqt-nc.sip %OptionalInclude pytqt-nc.sip
%OptionalInclude pyqt-tkc.sip %OptionalInclude pytqt-tkc.sip

@ -62,7 +62,7 @@ Not implemented.
<Para> <Para>
This is a utility method provided by PyTQt to make it easier to use This is a utility method provided by PyTQt to make it easier to use
Mark Hammond's <Literal>win32com</Literal> module to manipulate objects Mark Hammond's <Literal>win32com</Literal> module to manipulate objects
created by the <Literal>qtaxcontainer</Literal> module. created by the <Literal>tqtaxcontainer</Literal> module.
</Para> </Para>
<Para> <Para>
The <Literal>RegisterActiveObject()</Literal> COM function is called to The <Literal>RegisterActiveObject()</Literal> COM function is called to

@ -1,4 +1,4 @@
// This is the SIP interface definition for the qtaxcontainer module of PyTQt. // This is the SIP interface definition for the tqtaxcontainer module of PyTQt.
// //
// Copyright (c) 2007 // Copyright (c) 2007
// Riverbank Computing Limited <info@riverbankcomputing.co.uk> // Riverbank Computing Limited <info@riverbankcomputing.co.uk>
@ -20,13 +20,13 @@
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%Module PyTQt.qtaxcontainer 1 %Module PyTQt.tqtaxcontainer 1
%Import qt/qtmod.sip %Import tqt/tqtmod.sip
%Include copying.sip %Include copying.sip
%Include qaxbase.sip %Include tqaxbase.sip
%Include qaxobject.sip %Include tqaxobject.sip
%Include qaxwidget.sip %Include tqaxwidget.sip

@ -42,10 +42,10 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%End %End
%OptionalInclude pyqt-internal.sip %OptionalInclude pytqt-internal.sip
%OptionalInclude pyqt-gpl.sip %OptionalInclude pytqt-gpl.sip
%OptionalInclude pyqt-commercial.sip %OptionalInclude pytqt-commercial.sip
%OptionalInclude pyqt-edu.sip %OptionalInclude pytqt-edu.sip
%OptionalInclude pyqt-eval.sip %OptionalInclude pytqt-eval.sip
%OptionalInclude pyqt-nc.sip %OptionalInclude pytqt-nc.sip
%OptionalInclude pyqt-tkc.sip %OptionalInclude pytqt-tkc.sip

@ -1,4 +1,4 @@
// This is the SIP interface definition for the qttable module of PyTQt. // This is the SIP interface definition for the tqtcanvas module of PyTQt.
// //
// Copyright (c) 2007 // Copyright (c) 2007
// Riverbank Computing Limited <info@riverbankcomputing.co.uk> // Riverbank Computing Limited <info@riverbankcomputing.co.uk>
@ -20,20 +20,20 @@
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%Module PyTQt.qttable 1 %Module PyTQt.tqtcanvas 1
%Import qt/qtmod.sip %Import tqt/tqtmod.sip
%Include copying.sip %Include copying.sip
%Include qtable.sip %Include tqcanvas.sip
// The build file template. // The build file template.
%Makefile qttable.pro.in %Makefile tqtcanvas.pro.in
# The project file for the qttable module. # The project file for the tqtcanvas module.
# #
# Copyright (c) 2007 # Copyright (c) 2007
# Riverbank Computing Limited <info@riverbankcomputing.co.uk> # Riverbank Computing Limited <info@riverbankcomputing.co.uk>
@ -57,11 +57,11 @@
TEMPLATE = lib TEMPLATE = lib
TARGET = @BLX_TARGET_LIB@ TARGET = @BLX_TARGET_LIB@
DESTDIR = @PYQT_MODDIR@ DESTDIR = @PYTQT_MODDIR@
CONFIG += @BLX_CONFIG_LIB@ @PYQT_WARN@ CONFIG += @BLX_CONFIG_LIB@ @PYTQT_WARN@
INCLUDEPATH = @BLX_INCLUDEPATH@ INCLUDEPATH = @BLX_INCLUDEPATH@
DEFINES = @BLX_DEFINES@ DEFINES = @BLX_DEFINES@
LIBS += @PYQT_QT_MODULE@ @BLX_LIBS@ LIBS += @PYTQT_TQT_MODULE@ @BLX_LIBS@
macx:QMAKE_LFLAGS += -framework Python macx:QMAKE_LFLAGS += -framework Python
SOURCES = $B SOURCES = $B

@ -42,10 +42,10 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%End %End
%OptionalInclude pyqt-internal.sip %OptionalInclude pytqt-internal.sip
%OptionalInclude pyqt-gpl.sip %OptionalInclude pytqt-gpl.sip
%OptionalInclude pyqt-commercial.sip %OptionalInclude pytqt-commercial.sip
%OptionalInclude pyqt-edu.sip %OptionalInclude pytqt-edu.sip
%OptionalInclude pyqt-eval.sip %OptionalInclude pytqt-eval.sip
%OptionalInclude pyqt-nc.sip %OptionalInclude pytqt-nc.sip
%OptionalInclude pyqt-tkc.sip %OptionalInclude pytqt-tkc.sip

@ -1,4 +1,4 @@
// This is the SIP interface definition for the qtext module of PyTQt. // This is the SIP interface definition for the tqtext module of PyTQt.
// //
// Copyright (c) 2007 // Copyright (c) 2007
// Riverbank Computing Limited <info@riverbankcomputing.co.uk> // Riverbank Computing Limited <info@riverbankcomputing.co.uk>
@ -20,9 +20,9 @@
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%Module PyTQt.qtext 4 %Module PyTQt.tqtext 4
%Import qt/qtmod.sip %Import tqt/tqtmod.sip
%Include copying.sip %Include copying.sip
@ -37,40 +37,40 @@ const char *TQSCINTILLA_VERSION_STR;
const char *TQSCINTILLA_BUILD; const char *TQSCINTILLA_BUILD;
%Include qextscintillaapis.sip %Include tqextscintillaapis.sip
%Include qextscintillabase.sip %Include tqextscintillabase.sip
%Include qextscintilla.sip %Include tqextscintilla.sip
%Include qextscintillacommand.sip %Include tqextscintillacommand.sip
%Include qextscintillacommandset.sip %Include tqextscintillacommandset.sip
%Include qextscintilladocument.sip %Include tqextscintilladocument.sip
%Include qextscintillalexer.sip %Include tqextscintillalexer.sip
%Include qextscintillalexerbash.sip %Include tqextscintillalexerbash.sip
%Include qextscintillalexerbatch.sip %Include tqextscintillalexerbatch.sip
%Include qextscintillalexercpp.sip %Include tqextscintillalexercpp.sip
%Include qextscintillalexercsharp.sip %Include tqextscintillalexercsharp.sip
%Include qextscintillalexercss.sip %Include tqextscintillalexercss.sip
%Include qextscintillalexerdiff.sip %Include tqextscintillalexerdiff.sip
%Include qextscintillalexerhtml.sip %Include tqextscintillalexerhtml.sip
%Include qextscintillalexeridl.sip %Include tqextscintillalexeridl.sip
%Include qextscintillalexerjava.sip %Include tqextscintillalexerjava.sip
%Include qextscintillalexerjavascript.sip %Include tqextscintillalexerjavascript.sip
%Include qextscintillalexerlua.sip %Include tqextscintillalexerlua.sip
%Include qextscintillalexermakefile.sip %Include tqextscintillalexermakefile.sip
%Include qextscintillalexerperl.sip %Include tqextscintillalexerperl.sip
%Include qextscintillalexerpov.sip %Include tqextscintillalexerpov.sip
%Include qextscintillalexerproperties.sip %Include tqextscintillalexerproperties.sip
%Include qextscintillalexerpython.sip %Include tqextscintillalexerpython.sip
%Include qextscintillalexerruby.sip %Include tqextscintillalexerruby.sip
%Include qextscintillalexersql.sip %Include tqextscintillalexersql.sip
%Include qextscintillalexertex.sip %Include tqextscintillalexertex.sip
%Include qextscintillamacro.sip %Include tqextscintillamacro.sip
%Include qextscintillaprinter.sip %Include tqextscintillaprinter.sip
// The build file template. // The build file template.
%Makefile qtext.pro.in %Makefile tqtext.pro.in
# The project file for the qtext module. # The project file for the tqtext module.
# #
# Copyright (c) 2007 # Copyright (c) 2007
# Riverbank Computing Limited <info@riverbankcomputing.co.uk> # Riverbank Computing Limited <info@riverbankcomputing.co.uk>
@ -94,11 +94,11 @@ const char *TQSCINTILLA_BUILD;
TEMPLATE = lib TEMPLATE = lib
TARGET = @BLX_TARGET_LIB@ TARGET = @BLX_TARGET_LIB@
DESTDIR = @PYQT_MODDIR@ DESTDIR = @PYTQT_MODDIR@
CONFIG += @BLX_CONFIG_LIB@ @PYQT_WARN@ CONFIG += @BLX_CONFIG_LIB@ @PYTQT_WARN@
INCLUDEPATH = @BLX_INCLUDEPATH@ @PYQT_QSCINTILLA_INC@ INCLUDEPATH = @BLX_INCLUDEPATH@ @PYTQT_TQSCINTILLA_INC@
DEFINES = @BLX_DEFINES@ TQEXTSCINTILLA_DLL DEFINES = @BLX_DEFINES@ TQEXTSCINTILLA_DLL
LIBS += @PYQT_QT_MODULE@ @PYQT_QSCINTILLA_LIB@ @BLX_LIBS@ LIBS += @PYTQT_TQT_MODULE@ @PYTQT_TQSCINTILLA_LIB@ @BLX_LIBS@
macx:QMAKE_LFLAGS += -framework Python macx:QMAKE_LFLAGS += -framework Python
SOURCES = $B SOURCES = $B

@ -0,0 +1,51 @@
// This is the SIP file defining the PyTQt license.
//
// Copyright (c) 2007
// Riverbank Computing Limited <info@riverbankcomputing.co.uk>
//
// This file is part of PyTQt.
//
// This copy of PyTQt is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2, or (at your option) any later
// version.
//
// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%Copying
Copyright (c) 2007
Riverbank Computing Limited <info@riverbankcomputing.co.uk>
This file is part of PyTQt.
This copy of PyTQt is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%End
%OptionalInclude pytqt-internal.sip
%OptionalInclude pytqt-gpl.sip
%OptionalInclude pytqt-commercial.sip
%OptionalInclude pytqt-edu.sip
%OptionalInclude pytqt-eval.sip
%OptionalInclude pytqt-nc.sip
%OptionalInclude pytqt-tkc.sip

@ -1,4 +1,4 @@
// This is the SIP interface definition for the qtgl module of PyTQt. // This is the SIP interface definition for the tqtgl module of PyTQt.
// //
// Copyright (c) 2007 // Copyright (c) 2007
// Riverbank Computing Limited <info@riverbankcomputing.co.uk> // Riverbank Computing Limited <info@riverbankcomputing.co.uk>
@ -20,21 +20,21 @@
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%Module PyTQt.qtgl 1 %Module PyTQt.tqtgl 1
%Import qt/qtmod.sip %Import tqt/tqtmod.sip
%Include copying.sip %Include copying.sip
%Include qgl.sip %Include tqgl.sip
%Include qglcolormap.sip %Include tqglcolormap.sip
// The build file template. // The build file template.
%Makefile qtgl.pro.in %Makefile tqtgl.pro.in
# The project file for the qtgl module. # The project file for the tqtgl module.
# #
# Copyright (c) 2007 # Copyright (c) 2007
# Riverbank Computing Limited <info@riverbankcomputing.co.uk> # Riverbank Computing Limited <info@riverbankcomputing.co.uk>
@ -58,11 +58,11 @@
TEMPLATE = lib TEMPLATE = lib
TARGET = @BLX_TARGET_LIB@ TARGET = @BLX_TARGET_LIB@
DESTDIR = @PYQT_MODDIR@ DESTDIR = @PYTQT_MODDIR@
CONFIG += @BLX_CONFIG_LIB@ opengl @PYQT_WARN@ CONFIG += @BLX_CONFIG_LIB@ opengl @PYTQT_WARN@
INCLUDEPATH = @BLX_INCLUDEPATH@ INCLUDEPATH = @BLX_INCLUDEPATH@
DEFINES = @BLX_DEFINES@ DEFINES = @BLX_DEFINES@
LIBS += @PYQT_QT_MODULE@ @BLX_LIBS@ LIBS += @PYTQT_TQT_MODULE@ @BLX_LIBS@
macx:QMAKE_LFLAGS += -framework Python macx:QMAKE_LFLAGS += -framework Python
SOURCES = $B SOURCES = $B

@ -0,0 +1,51 @@
// This is the SIP file defining the PyTQt license.
//
// Copyright (c) 2007
// Riverbank Computing Limited <info@riverbankcomputing.co.uk>
//
// This file is part of PyTQt.
//
// This copy of PyTQt is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2, or (at your option) any later
// version.
//
// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%Copying
Copyright (c) 2007
Riverbank Computing Limited <info@riverbankcomputing.co.uk>
This file is part of PyTQt.
This copy of PyTQt is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%End
%OptionalInclude pytqt-internal.sip
%OptionalInclude pytqt-gpl.sip
%OptionalInclude pytqt-commercial.sip
%OptionalInclude pytqt-edu.sip
%OptionalInclude pytqt-eval.sip
%OptionalInclude pytqt-nc.sip
%OptionalInclude pytqt-tkc.sip

@ -1,4 +1,4 @@
// This is the SIP interface definition for the qtnetwork module of PyTQt. // This is the SIP interface definition for the tqtnetwork module of PyTQt.
// //
// Copyright (c) 2007 // Copyright (c) 2007
// Riverbank Computing Limited <info@riverbankcomputing.co.uk> // Riverbank Computing Limited <info@riverbankcomputing.co.uk>
@ -20,28 +20,28 @@
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%Module PyTQt.qtnetwork 1 %Module PyTQt.tqtnetwork 1
%Import qt/qtmod.sip %Import tqt/tqtmod.sip
%Include copying.sip %Include copying.sip
%Include qdns.sip %Include tqdns.sip
%Include qhostaddress.sip %Include tqhostaddress.sip
%Include qftp.sip %Include tqftp.sip
%Include qhttp.sip %Include tqhttp.sip
%Include qlocalfs.sip %Include tqlocalfs.sip
%Include qnetwork.sip %Include tqnetwork.sip
%Include qserversocket.sip %Include tqserversocket.sip
%Include qsocket.sip %Include tqsocket.sip
%Include qsocketdevice.sip %Include tqsocketdevice.sip
// The build file template. // The build file template.
%Makefile qtnetwork.pro.in %Makefile tqtnetwork.pro.in
# The project file for the qtnetwork module. # The project file for the tqtnetwork module.
# #
# Copyright (c) 2007 # Copyright (c) 2007
# Riverbank Computing Limited <info@riverbankcomputing.co.uk> # Riverbank Computing Limited <info@riverbankcomputing.co.uk>
@ -65,11 +65,11 @@
TEMPLATE = lib TEMPLATE = lib
TARGET = @BLX_TARGET_LIB@ TARGET = @BLX_TARGET_LIB@
DESTDIR = @PYQT_MODDIR@ DESTDIR = @PYTQT_MODDIR@
CONFIG += @BLX_CONFIG_LIB@ @PYQT_WARN@ CONFIG += @BLX_CONFIG_LIB@ @PYTQT_WARN@
INCLUDEPATH = @BLX_INCLUDEPATH@ INCLUDEPATH = @BLX_INCLUDEPATH@
DEFINES = @BLX_DEFINES@ DEFINES = @BLX_DEFINES@
LIBS += @PYQT_QT_MODULE@ @BLX_LIBS@ LIBS += @PYTQT_TQT_MODULE@ @BLX_LIBS@
macx:QMAKE_LFLAGS += -framework Python macx:QMAKE_LFLAGS += -framework Python
SOURCES = $B SOURCES = $B

@ -0,0 +1,51 @@
// This is the SIP file defining the PyTQt license.
//
// Copyright (c) 2007
// Riverbank Computing Limited <info@riverbankcomputing.co.uk>
//
// This file is part of PyTQt.
//
// This copy of PyTQt is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2, or (at your option) any later
// version.
//
// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%Copying
Copyright (c) 2007
Riverbank Computing Limited <info@riverbankcomputing.co.uk>
This file is part of PyTQt.
This copy of PyTQt is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%End
%OptionalInclude pytqt-internal.sip
%OptionalInclude pytqt-gpl.sip
%OptionalInclude pytqt-commercial.sip
%OptionalInclude pytqt-edu.sip
%OptionalInclude pytqt-eval.sip
%OptionalInclude pytqt-nc.sip
%OptionalInclude pytqt-tkc.sip

@ -29,7 +29,7 @@
class TQCopEnvelope : TQDataStream class TQCopEnvelope : TQDataStream
{ {
%TypeHeaderCode %TypeHeaderCode
#include <tqpe/qcopenvelope_qws.h> #include <tqpe/tqcopenvelope_qws.h>
%End %End
public: public:

@ -1,4 +1,4 @@
// This is the SIP interface definition for the qtpe module of PyTQt. // This is the SIP interface definition for the tqtpe module of PyTQt.
// //
// Copyright (c) 2007 // Copyright (c) 2007
// Riverbank Computing Limited <info@riverbankcomputing.co.uk> // Riverbank Computing Limited <info@riverbankcomputing.co.uk>
@ -20,9 +20,9 @@
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%Module PyTQt.qtpe 1 %Module PyTQt.tqtpe 1
%Import qt/qtmod.sip %Import tqt/tqtmod.sip
%Include copying.sip %Include copying.sip
@ -38,26 +38,26 @@
const char *TQPE_VERSION; const char *TQPE_VERSION;
%Include qpeapplication.sip %Include tqpeapplication.sip
%Include qpeapplnk.sip %Include tqpeapplnk.sip
%Include qpeconfig.sip %Include tqpeconfig.sip
%Include qpefilemanager.sip %Include tqpefilemanager.sip
%Include qpefileselector.sip %Include tqpefileselector.sip
%Include qpefontdatabase.sip %Include tqpefontdatabase.sip
%Include qpeglobal.sip %Include tqpeglobal.sip
%Include qpemenubar.sip %Include tqpemenubar.sip
%Include qpemenubutton.sip %Include tqpemenubutton.sip
%Include qpeqcopenvelope.sip %Include tqpeqcopenvelope.sip
%Include qpeqdawg.sip %Include tqpeqdawg.sip
%Include qperesource.sip %Include tqperesource.sip
%Include qpetimestring.sip %Include tqpetimestring.sip
%Include qpetoolbar.sip %Include tqpetoolbar.sip
// The build file template. // The build file template.
%Makefile qtpe.pro.in %Makefile tqtpe.pro.in
# The project file for the qtpe module. # The project file for the tqtpe module.
# #
# Copyright (c) 2007 # Copyright (c) 2007
# Riverbank Computing Limited <info@riverbankcomputing.co.uk> # Riverbank Computing Limited <info@riverbankcomputing.co.uk>
@ -81,11 +81,11 @@ const char *TQPE_VERSION;
TEMPLATE = lib TEMPLATE = lib
TARGET = @BLX_TARGET_LIB@ TARGET = @BLX_TARGET_LIB@
DESTDIR = @PYQT_MODDIR@ DESTDIR = @PYTQT_MODDIR@
CONFIG += @BLX_CONFIG_LIB@ @PYQT_WARN@ CONFIG += @BLX_CONFIG_LIB@ @PYTQT_WARN@
INCLUDEPATH = @BLX_INCLUDEPATH@ INCLUDEPATH = @BLX_INCLUDEPATH@
DEFINES = @BLX_DEFINES@ DEFINES = @BLX_DEFINES@
LIBS += @PYQT_QT_MODULE@ @BLX_LIBS@ -lqpe LIBS += @PYTQT_TQT_MODULE@ @BLX_LIBS@ -lqpe
macx:QMAKE_LFLAGS += -framework Python macx:QMAKE_LFLAGS += -framework Python
SOURCES = $B SOURCES = $B

@ -0,0 +1,51 @@
// This is the SIP file defining the PyTQt license.
//
// Copyright (c) 2007
// Riverbank Computing Limited <info@riverbankcomputing.co.uk>
//
// This file is part of PyTQt.
//
// This copy of PyTQt is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2, or (at your option) any later
// version.
//
// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%Copying
Copyright (c) 2007
Riverbank Computing Limited <info@riverbankcomputing.co.uk>
This file is part of PyTQt.
This copy of PyTQt is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%End
%OptionalInclude pytqt-internal.sip
%OptionalInclude pytqt-gpl.sip
%OptionalInclude pytqt-commercial.sip
%OptionalInclude pytqt-edu.sip
%OptionalInclude pytqt-eval.sip
%OptionalInclude pytqt-nc.sip
%OptionalInclude pytqt-tkc.sip

@ -1,4 +1,4 @@
// This is the SIP interface definition for the qtsql module of PyTQt. // This is the SIP interface definition for the tqtsql module of PyTQt.
// //
// Copyright (c) 2007 // Copyright (c) 2007
// Riverbank Computing Limited <info@riverbankcomputing.co.uk> // Riverbank Computing Limited <info@riverbankcomputing.co.uk>
@ -20,38 +20,38 @@
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%Module PyTQt.qtsql 1 %Module PyTQt.tqtsql 1
%Import qt/qtmod.sip %Import tqt/tqtmod.sip
%Import qttable/qttablemod.sip %Import tqttable/tqttablemod.sip
%Include copying.sip %Include copying.sip
%Include qdatabrowser.sip %Include tqdatabrowser.sip
%Include qdatatable.sip %Include tqdatatable.sip
%Include qdataview.sip %Include tqdataview.sip
%Include qeditorfactory.sip %Include tqeditorfactory.sip
%Include qsql.sip %Include tqsql.sip
%Include qsqlcursor.sip %Include tqsqlcursor.sip
%Include qsqldatabase.sip %Include tqsqldatabase.sip
%Include qsqldriver.sip %Include tqsqldriver.sip
%Include qsqleditorfactory.sip %Include tqsqleditorfactory.sip
%Include qsqlerror.sip %Include tqsqlerror.sip
%Include qsqlfield.sip %Include tqsqlfield.sip
%Include qsqlform.sip %Include tqsqlform.sip
%Include qsqlindex.sip %Include tqsqlindex.sip
%Include qsqlpropertymap.sip %Include tqsqlpropertymap.sip
%Include qsqlquery.sip %Include tqsqlquery.sip
%Include qsqlrecord.sip %Include tqsqlrecord.sip
%Include qsqlresult.sip %Include tqsqlresult.sip
%Include qsqlselectcursor.sip %Include tqsqlselectcursor.sip
// The build file template. // The build file template.
%Makefile qtsql.pro.in %Makefile tqtsql.pro.in
# The project file for the qtsql module. # The project file for the tqtsql module.
# #
# Copyright (c) 2007 # Copyright (c) 2007
# Riverbank Computing Limited <info@riverbankcomputing.co.uk> # Riverbank Computing Limited <info@riverbankcomputing.co.uk>
@ -75,11 +75,11 @@
TEMPLATE = lib TEMPLATE = lib
TARGET = @BLX_TARGET_LIB@ TARGET = @BLX_TARGET_LIB@
DESTDIR = @PYQT_MODDIR@ DESTDIR = @PYTQT_MODDIR@
CONFIG += @BLX_CONFIG_LIB@ @PYQT_WARN@ CONFIG += @BLX_CONFIG_LIB@ @PYTQT_WARN@
INCLUDEPATH = @BLX_INCLUDEPATH@ INCLUDEPATH = @BLX_INCLUDEPATH@
DEFINES = @BLX_DEFINES@ DEFINES = @BLX_DEFINES@
LIBS += @PYQT_QTTABLE_MODULE@ @BLX_LIBS@ LIBS += @PYTQT_TQTTABLE_MODULE@ @BLX_LIBS@
macx:QMAKE_LFLAGS += -framework Python macx:QMAKE_LFLAGS += -framework Python
SOURCES = $B SOURCES = $B

@ -0,0 +1,51 @@
// This is the SIP file defining the PyTQt license.
//
// Copyright (c) 2007
// Riverbank Computing Limited <info@riverbankcomputing.co.uk>
//
// This file is part of PyTQt.
//
// This copy of PyTQt is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2, or (at your option) any later
// version.
//
// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%Copying
Copyright (c) 2007
Riverbank Computing Limited <info@riverbankcomputing.co.uk>
This file is part of PyTQt.
This copy of PyTQt is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%End
%OptionalInclude pytqt-internal.sip
%OptionalInclude pytqt-gpl.sip
%OptionalInclude pytqt-commercial.sip
%OptionalInclude pytqt-edu.sip
%OptionalInclude pytqt-eval.sip
%OptionalInclude pytqt-nc.sip
%OptionalInclude pytqt-tkc.sip

@ -1,4 +1,4 @@
// This is the SIP interface definition for the qtcanvas module of PyTQt. // This is the SIP interface definition for the tqttable module of PyTQt.
// //
// Copyright (c) 2007 // Copyright (c) 2007
// Riverbank Computing Limited <info@riverbankcomputing.co.uk> // Riverbank Computing Limited <info@riverbankcomputing.co.uk>
@ -20,20 +20,20 @@
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%Module PyTQt.qtcanvas 1 %Module PyTQt.tqttable 1
%Import qt/qtmod.sip %Import tqt/tqtmod.sip
%Include copying.sip %Include copying.sip
%Include qcanvas.sip %Include tqtable.sip
// The build file template. // The build file template.
%Makefile qtcanvas.pro.in %Makefile tqttable.pro.in
# The project file for the qtcanvas module. # The project file for the tqttable module.
# #
# Copyright (c) 2007 # Copyright (c) 2007
# Riverbank Computing Limited <info@riverbankcomputing.co.uk> # Riverbank Computing Limited <info@riverbankcomputing.co.uk>
@ -57,11 +57,11 @@
TEMPLATE = lib TEMPLATE = lib
TARGET = @BLX_TARGET_LIB@ TARGET = @BLX_TARGET_LIB@
DESTDIR = @PYQT_MODDIR@ DESTDIR = @PYTQT_MODDIR@
CONFIG += @BLX_CONFIG_LIB@ @PYQT_WARN@ CONFIG += @BLX_CONFIG_LIB@ @PYTQT_WARN@
INCLUDEPATH = @BLX_INCLUDEPATH@ INCLUDEPATH = @BLX_INCLUDEPATH@
DEFINES = @BLX_DEFINES@ DEFINES = @BLX_DEFINES@
LIBS += @PYQT_QT_MODULE@ @BLX_LIBS@ LIBS += @PYTQT_TQT_MODULE@ @BLX_LIBS@
macx:QMAKE_LFLAGS += -framework Python macx:QMAKE_LFLAGS += -framework Python
SOURCES = $B SOURCES = $B

@ -0,0 +1,51 @@
// This is the SIP file defining the PyTQt license.
//
// Copyright (c) 2007
// Riverbank Computing Limited <info@riverbankcomputing.co.uk>
//
// This file is part of PyTQt.
//
// This copy of PyTQt is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2, or (at your option) any later
// version.
//
// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%Copying
Copyright (c) 2007
Riverbank Computing Limited <info@riverbankcomputing.co.uk>
This file is part of PyTQt.
This copy of PyTQt is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%End
%OptionalInclude pytqt-internal.sip
%OptionalInclude pytqt-gpl.sip
%OptionalInclude pytqt-commercial.sip
%OptionalInclude pytqt-edu.sip
%OptionalInclude pytqt-eval.sip
%OptionalInclude pytqt-nc.sip
%OptionalInclude pytqt-tkc.sip

@ -1,4 +1,4 @@
// This is the SIP interface definition for the qtui module of PyTQt. Thanks to // This is the SIP interface definition for the tqtui module of PyTQt. Thanks to
// Hans-Peter Jansen for the original work. // Hans-Peter Jansen for the original work.
// //
// Copyright (c) 2007 // Copyright (c) 2007
@ -21,20 +21,20 @@
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%Module PyTQt.qtui 1 %Module PyTQt.tqtui 1
%Import qt/qtmod.sip %Import tqt/tqtmod.sip
%Include copying.sip %Include copying.sip
%Include qwidgetfactory.sip %Include tqwidgetfactory.sip
// The build file template. // The build file template.
%Makefile qtui.pro.in %Makefile tqtui.pro.in
# The project file for the qtui module. # The project file for the tqtui module.
# #
# Copyright (c) 2007 # Copyright (c) 2007
# Riverbank Computing Limited <info@riverbankcomputing.co.uk> # Riverbank Computing Limited <info@riverbankcomputing.co.uk>
@ -58,11 +58,11 @@
TEMPLATE = lib TEMPLATE = lib
TARGET = @BLX_TARGET_LIB@ TARGET = @BLX_TARGET_LIB@
DESTDIR = @PYQT_MODDIR@ DESTDIR = @PYTQT_MODDIR@
CONFIG += @BLX_CONFIG_LIB@ @PYQT_WARN@ CONFIG += @BLX_CONFIG_LIB@ @PYTQT_WARN@
INCLUDEPATH = @BLX_INCLUDEPATH@ INCLUDEPATH = @BLX_INCLUDEPATH@
DEFINES = @BLX_DEFINES@ DEFINES = @BLX_DEFINES@
LIBS += @PYQT_QT_MODULE@ @PYQT_QUI_LIB@ @BLX_LIBS@ LIBS += @PYTQT_TQT_MODULE@ @PYTQT_TQUI_LIB@ @BLX_LIBS@
macx:QMAKE_LFLAGS += -framework Python macx:QMAKE_LFLAGS += -framework Python
SOURCES = $B SOURCES = $B

@ -0,0 +1,51 @@
// This is the SIP file defining the PyTQt license.
//
// Copyright (c) 2007
// Riverbank Computing Limited <info@riverbankcomputing.co.uk>
//
// This file is part of PyTQt.
//
// This copy of PyTQt is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2, or (at your option) any later
// version.
//
// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%Copying
Copyright (c) 2007
Riverbank Computing Limited <info@riverbankcomputing.co.uk>
This file is part of PyTQt.
This copy of PyTQt is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%End
%OptionalInclude pytqt-internal.sip
%OptionalInclude pytqt-gpl.sip
%OptionalInclude pytqt-commercial.sip
%OptionalInclude pytqt-edu.sip
%OptionalInclude pytqt-eval.sip
%OptionalInclude pytqt-nc.sip
%OptionalInclude pytqt-tkc.sip

@ -1,4 +1,4 @@
// This is the SIP interface definition for the qtxml module of PyTQt. // This is the SIP interface definition for the tqtxml module of PyTQt.
// //
// Copyright (c) 2007 // Copyright (c) 2007
// Riverbank Computing Limited <info@riverbankcomputing.co.uk> // Riverbank Computing Limited <info@riverbankcomputing.co.uk>
@ -20,30 +20,30 @@
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%Module PyTQt.qtxml 0 %Module PyTQt.tqtxml 0
%Import qt/qtmod.sip %Import tqt/tqtmod.sip
%Include copying.sip %Include copying.sip
%Include qdom.sip %Include tqdom.sip
// This is only needed on Windows to make sure that the DLL containing the C++ // This is only needed on Windows to make sure that the DLL containing the C++
// code of the main qt module is loaded before we import our own C++ code which // code of the main tqt module is loaded before we import our own C++ code which
// has been linked against it. All other modules inherit from a class in the // has been linked against it. All other modules inherit from a class in the
// qt module which sorts it out, but this module doesn't so we add a dummy. It // tqt module which sorts it out, but this module doesn't so we add a dummy. It
// is ignored by SIP v4.x and later. // is ignored by SIP v4.x and later.
%PrePythonCode %PrePythonCode
from PyTQt.qt import TQObject from PyTQt.tqt import TQObject
%End %End
// The build file template. // The build file template.
%Makefile qtxml.pro.in %Makefile tqtxml.pro.in
# The project file for the qtxml module. # The project file for the tqtxml module.
# #
# Copyright (c) 2007 # Copyright (c) 2007
# Riverbank Computing Limited <info@riverbankcomputing.co.uk> # Riverbank Computing Limited <info@riverbankcomputing.co.uk>
@ -67,11 +67,11 @@ from PyTQt.qt import TQObject
TEMPLATE = lib TEMPLATE = lib
TARGET = @BLX_TARGET_LIB@ TARGET = @BLX_TARGET_LIB@
DESTDIR = @PYQT_MODDIR@ DESTDIR = @PYTQT_MODDIR@
CONFIG += @BLX_CONFIG_LIB@ @PYQT_WARN@ CONFIG += @BLX_CONFIG_LIB@ @PYTQT_WARN@
INCLUDEPATH = @BLX_INCLUDEPATH@ INCLUDEPATH = @BLX_INCLUDEPATH@
DEFINES = @BLX_DEFINES@ DEFINES = @BLX_DEFINES@
LIBS += @PYQT_QT_MODULE@ @BLX_LIBS@ LIBS += @PYTQT_TQT_MODULE@ @BLX_LIBS@
macx:QMAKE_LFLAGS += -framework Python macx:QMAKE_LFLAGS += -framework Python
SOURCES = $B SOURCES = $B
Loading…
Cancel
Save