Compare commits

...

17 Commits

Author SHA1 Message Date
ormorph bb6e249aff
Added fix canvas.py for python3
2 years ago
aneejit1 30381ed7e5
Remove support for earlier Qt/TQt versions
2 years ago
aneejit1 4978511ebb
Remove Qt V2 support and example files
2 years ago
Slávek Banko 5916692cf4
Changed testing for the presence of optional modules,
2 years ago
aneejit1 52f8f8436d
Updates to support Python version 3
2 years ago
Michele Calgaro 228b87ea89
Rename ENABLE_QSTYLECONTROLELEMENTDATA_SLOW_COPY in ENABLE_TQSTYLECONTROLELEMENTDATA_SLOW_COPY
2 years ago
Michele Calgaro 150ebb26a4
Replaced 'includehints' with 'includes' in *.ui files.
2 years ago
Michele Calgaro e214824473
Convert .ui file from dos to unix format.
2 years ago
Michele Calgaro 7f8cb4a863
Additional fix similar to previous commit.
3 years ago
François Andriot 1a00e1cccd
Fix ftbfs on Fedora 34
3 years ago
Slávek Banko a1b7a93354
pyuic: Delete the current date from the generated files
3 years ago
Michele Calgaro a6011b52bf
Removed code formatting modelines.
4 years ago
Slávek Banko 929e8d56cb Properly import python_tqt module in scripts generated by pyuic
8 years ago
Slávek Banko f303e4dc2b Fix examples to properly import python_tqt module
8 years ago
Slávek Banko d6f4544562 Improve python_tqt module initialization
8 years ago
Timothy Pearson 7973f920ef Fix invalid headers in PNG files and optimize for size
8 years ago
Michele Calgaro fc37811528 Fixed FTBFS caused by wrong #define.
9 years ago

@ -37,8 +37,8 @@ import string
try: try:
from sip4_tqt import sipconfig from sip4_tqt import sipconfig
except: except:
print "Unable to import the sipconfig module. Please make sure you have" print("Unable to import the sipconfig module. Please make sure you have")
print "SIP v3.9 or later installed." print("SIP v3.9 or later installed.")
sys.exit(1) sys.exit(1)
config = sipconfig.SIPConfig("PyTQt 3.18.1") config = sipconfig.SIPConfig("PyTQt 3.18.1")
@ -67,20 +67,20 @@ def usage(rcode = 2):
rcode is the return code passed back to the calling process. rcode is the return code passed back to the calling process.
""" """
print "Usage:" print("Usage:")
print " %s [-h] [-a version] [-b dir] [-c] [-d dir] [-g] [-j #] [-n dir] [-o dir] [-r] [-v dir]" % sipconfig.script() print(" %s [-h] [-a version] [-b dir] [-c] [-d dir] [-g] [-j #] [-n dir] [-o dir] [-r] [-v dir]" % sipconfig.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 qtpe 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 v3.x behaviour)" print(" -g always release the GIL (SIP 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.qt_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.qt_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)
sys.exit(rcode) sys.exit(rcode)
@ -439,7 +439,7 @@ def versionToTag(vers, tags, desc):
""" """
tag = None tag = None
vl = tags.keys() vl = list(tags.keys())
vl.sort() vl.sort()
# For a snapshot use the latest tag. # For a snapshot use the latest tag.
@ -689,10 +689,6 @@ def main(argv):
sipconfig.inform("Creating Makefile for pyuic3.") sipconfig.inform("Creating Makefile for pyuic3.")
subdirs.append("pyuic3") subdirs.append("pyuic3")
olddir = sipconfig.push_dir("pyuic3") olddir = sipconfig.push_dir("pyuic3")
elif config.qt_version >= 0x020000:
sipconfig.inform("Creating Makefile for pyuic2.")
subdirs.append("pyuic2")
olddir = sipconfig.push_dir("pyuic2")
config.create_makefile("pyuic.pro", []) config.create_makefile("pyuic.pro", [])
sipconfig.pop_dir(olddir) sipconfig.pop_dir(olddir)
@ -723,8 +719,7 @@ if __name__ == "__main__":
except SystemExit: except SystemExit:
raise raise
except: except:
print \ print("""An internal error occured. Please report all the output from the program,
"""An internal error occured. Please report all the output from the program,
including the following traceback, to support@riverbankcomputing.co.uk. including the following traceback, to support@riverbankcomputing.co.uk.
""" """)
raise raise

@ -85,6 +85,7 @@ opt_split = 1
opt_tracing = 0 opt_tracing = 0
opt_verbose = 0 opt_verbose = 0
opt_keepfeatures = 0 opt_keepfeatures = 0
opt_accept_license = 0
opt_vendorcheck = 0 opt_vendorcheck = 0
opt_vendincdir = sipcfg.py_inc_dir opt_vendincdir = sipcfg.py_inc_dir
@ -126,6 +127,7 @@ def usage(rcode = 2):
sys.stdout.write(" -v dir where the PyTQt .sip files will be installed [default %s]\n" % opt_pyqtsipdir) sys.stdout.write(" -v dir where the PyTQt .sip files will be installed [default %s]\n" % opt_pyqtsipdir)
sys.stdout.write(" -w don't suppress compiler output during configuration\n") sys.stdout.write(" -w don't suppress compiler output during configuration\n")
sys.stdout.write(" -y lib explicitly specify the type of TQt library, either qt, qt-mt, qte, qte-mt, qtmt, tqt, tqt-mt, tqte, tqte-mt or tqtmt\n") sys.stdout.write(" -y lib explicitly specify the type of TQt library, either qt, qt-mt, qte, qte-mt, qtmt, tqt, tqt-mt, tqte, tqte-mt or tqtmt\n")
sys.stdout.write(" -z accept the license terms without prompting\n")
sys.exit(rcode) sys.exit(rcode)
@ -359,24 +361,6 @@ class ConfigurePyTQt3(ConfigureBase):
makefile.generate() makefile.generate()
tool_dirs.append("pylupdate3") tool_dirs.append("pylupdate3")
elif qt_version >= 0x020000:
sipconfig.inform("Creating pyuic Makefile...")
makefile = sipconfig.ProgramMakefile(
configuration=sipcfg,
build_file="pyuic.sbf",
dir="pyuic2",
install_dir=opt_pyqtbindir,
console=1,
qt=1,
warnings=1
)
makefile.extra_defines.append("UIC")
makefile.extra_include_dirs.append(qt_dir + "/src/3rdparty/zlib")
makefile.generate()
tool_dirs.append("pyuic2")
return tool_dirs return tool_dirs
@ -391,10 +375,10 @@ def inform_user():
sipconfig.inform("TQt v%s %sis being used." % (sipconfig.version_to_string(qt_version), edstr)) sipconfig.inform("TQt v%s %sis being used." % (sipconfig.version_to_string(qt_version), edstr))
sipconfig.inform("SIP %s is being used." % sipcfg.sip_version_str) sipconfig.inform("SIP %s is being used." % sipcfg.sip_version_str)
sipconfig.inform("These PyTQt modules will be built: %s." % string.join(pyqt_modules)) sipconfig.inform("These PyTQt modules will be built: %s." % ' '.join(pyqt_modules))
if disabled_classes: if disabled_classes:
sipconfig.inform("Support for these TQt classes has been disabled: %s." % string.join(disabled_classes)) sipconfig.inform("Support for these TQt classes has been disabled: %s." % ' '.join(disabled_classes))
sipconfig.inform("The PyTQt modules will be installed in %s." % opt_pyqtmoddir) sipconfig.inform("The PyTQt modules will be installed in %s." % opt_pyqtmoddir)
sipconfig.inform("The PyTQt .sip files will be installed in %s." % opt_pyqtsipdir) sipconfig.inform("The PyTQt .sip files will be installed in %s." % opt_pyqtsipdir)
@ -579,7 +563,7 @@ def check_qscintilla():
# If we find a snapshot then set a negative version number as a # If we find a snapshot then set a negative version number as a
# special case. # special case.
if string.find(sciversstr, "snapshot") >= 0: if sciversstr.find("snapshot") >= 0:
qsci_version = -1 qsci_version = -1
else: else:
sipconfig.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." % opt_qscilibdir) sipconfig.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." % opt_qscilibdir)
@ -801,7 +785,7 @@ def get_feature_flags():
line = ff.readline() line = ff.readline()
while line: while line:
flags.extend(string.split(line)) flags.extend(line.split())
line = ff.readline() line = ff.readline()
if sipcfg.sip_version >= 0x040702: if sipcfg.sip_version >= 0x040702:
@ -929,9 +913,9 @@ def generate_code(mname, extra_cflags=None, extra_cxxflags=None, extra_define=No
argv.append(os.path.join(src_dir, "sip")) argv.append(os.path.join(src_dir, "sip"))
# SIP assumes POSIX style path separators. # SIP assumes POSIX style path separators.
argv.append(string.join([src_dir, "sip", mname, mname + "mod.sip"], "/")) argv.append('/'.join([src_dir, "sip", mname, mname + "mod.sip"]))
os.system(string.join(argv)) os.system(' '.join(argv))
# Check the result. # Check the result.
if not os.access(buildfile, os.F_OK): if not os.access(buildfile, os.F_OK):
@ -1005,7 +989,7 @@ def check_license():
lname = "GNU General Public License" lname = "GNU General Public License"
lfile = None lfile = None
sipconfig.inform("This is the %s version of PyTQt %s (licensed under the %s) for Python %s on %s." % (ltype, pyqt_version_str, lname, string.split(sys.version)[0], sys.platform)) sipconfig.inform("This is the %s version of PyTQt %s (licensed under the %s) for Python %s on %s." % (ltype, pyqt_version_str, lname, sys.version[0].split(), sys.platform))
# Common checks. # Common checks.
if ltype == "GPL" and sys.platform == "win32": if ltype == "GPL" and sys.platform == "win32":
@ -1029,12 +1013,17 @@ Type 'no' to decline the terms of the license.
""") """)
while 1: while 1:
sys.stdout.write("Do you accept the terms of the license? ")
sys.stdout.flush()
try: try:
resp = raw_input("Do you accept the terms of the license? ") resp = sys.stdin.readline()
except KeyboardInterrupt:
raise SystemExit
except: except:
resp = "" resp = ""
resp = string.lower(string.strip(resp)) resp = resp.strip().lower()
if resp == "yes": if resp == "yes":
break break
@ -1060,7 +1049,7 @@ def get_build_macros(overrides):
overrides is a list of macros overrides from the user. overrides is a list of macros overrides from the user.
""" """
# Get the name of the qmake configuration file to take the macros from. # Get the name of the qmake configuration file to take the macros from.
if "QMAKESPEC" in os.environ.keys(): if "QMAKESPEC" in list(os.environ.keys()):
fname = os.path.join(qt_dir, "mkspecs", os.environ["QMAKESPEC"], "qmake.conf") fname = os.path.join(qt_dir, "mkspecs", os.environ["QMAKESPEC"], "qmake.conf")
else: else:
fname = os.path.join(qt_dir, "mkspecs", "default", "qmake.conf") fname = os.path.join(qt_dir, "mkspecs", "default", "qmake.conf")
@ -1069,7 +1058,7 @@ def get_build_macros(overrides):
sipconfig.error("Unable to find the default configuration file %s. You can use the QMAKESPEC environment variable to specify the correct platform instead of \"default\"." % fname) sipconfig.error("Unable to find the default configuration file %s. You can use the QMAKESPEC environment variable to specify the correct platform instead of \"default\"." % fname)
# Add the TQt specific macros to the default. # Add the TQt specific macros to the default.
names = sipcfg.build_macros().keys() names = list(sipcfg.build_macros().keys())
names.append("INCDIR_QT") names.append("INCDIR_QT")
names.append("LIBDIR_QT") names.append("LIBDIR_QT")
names.append("MOC") names.append("MOC")
@ -1163,7 +1152,7 @@ def check_qt_installation(macros):
l = f.readline() l = f.readline()
while l: while l:
wl = string.split(l) wl = l.split()
if len(wl) == 3 and wl[0] == "#define" and wl[1] == "QT_PRODUCT_LICENSE": if len(wl) == 3 and wl[0] == "#define" and wl[1] == "QT_PRODUCT_LICENSE":
qt_edition = wl[2][4:-1] qt_edition = wl[2][4:-1]
break break
@ -1193,7 +1182,7 @@ def check_qt_installation(macros):
cfg = f.readline() cfg = f.readline()
f.close() f.close()
val = string.find(cfg, "=") val = cfg.find("=")
if val >= 0: if val >= 0:
qt_winconfig = string.strip(cfg[val + 1:]) qt_winconfig = string.strip(cfg[val + 1:])
@ -1292,7 +1281,7 @@ def resolve_qt3_library(generator):
sipconfig.error("No TQt libraries could be found in %s." % qt_libdir) sipconfig.error("No TQt libraries could be found in %s." % qt_libdir)
if len(names) > 1: if len(names) > 1:
sipconfig.error("These TQt libraries were found: %s. Use the -y argument to explicitly specify which you want to use." % string.join(names)) sipconfig.error("These TQt libraries were found: %s. Use the -y argument to explicitly specify which you want to use." % ' '.join(names))
def is_qt_library(generator, lib): def is_qt_library(generator, lib):
@ -1320,10 +1309,6 @@ def main(argv):
argv is the list of command line arguments. argv is the list of command line arguments.
""" """
# Check Python isn't too new.
if sipcfg.py_version >= 0x030000:
sipconfig.error("PyTQt v3.x does not support Python v3.x")
# Check SIP is new enough. # Check SIP is new enough.
if sipcfg.sip_version_str[:8] != "snapshot": if sipcfg.sip_version_str[:8] != "snapshot":
if sipcfg.sip_version < sip_min_version: if sipcfg.sip_version < sip_min_version:
@ -1331,7 +1316,7 @@ def main(argv):
# Parse the command line. # Parse the command line.
try: try:
optlist, args = getopt.getopt(argv[1:], "ha:b:cd:e:fg:ij:kl:m:n:o:q:rsuv:wy:") optlist, args = getopt.getopt(argv[1:], "ha:b:cd:e:fg:ij:kl:m:n:o:q:rsuv:wy:z")
except getopt.GetoptError: except getopt.GetoptError:
usage() usage()
@ -1342,6 +1327,7 @@ def main(argv):
global opt_qsciincdir, opt_qscilibdir, qsci_define global opt_qsciincdir, opt_qscilibdir, qsci_define
global opt_vendorcheck, opt_vendincdir, opt_vendlibdir global opt_vendorcheck, opt_vendincdir, opt_vendlibdir
global opt_libpython global opt_libpython
global opt_accept_license
opt_libpython = None opt_libpython = None
@ -1396,6 +1382,8 @@ def main(argv):
opt_qtlib = arg opt_qtlib = arg
else: else:
usage() usage()
elif opt == "-z":
opt_accept_license = 1
# Check that we know the name of the TQt root directory. # Check that we know the name of the TQt root directory.
if not qt_dir: if not qt_dir:
@ -1418,7 +1406,10 @@ def main(argv):
check_qt_installation(macros) check_qt_installation(macros)
# Check the licenses are compatible. # Check the licenses are compatible.
check_license() if opt_accept_license == 1:
print("License accepted by command line option.")
else:
check_license()
# Check for TQScintilla. # Check for TQScintilla.
check_qscintilla() check_qscintilla()
@ -1458,14 +1449,15 @@ def main(argv):
# Create the additional Makefiles. # Create the additional Makefiles.
sipconfig.inform("Creating top level Makefile...") sipconfig.inform("Creating top level Makefile...")
open('__init__.py', 'a').close()
sipconfig.ParentMakefile( sipconfig.ParentMakefile(
configuration=sipcfg, configuration=sipcfg,
subdirs=pyqt_modules + pyqt.tools(), subdirs=pyqt_modules + pyqt.tools(),
installs=(pyqt.module_installs(), pyqt.module_dir()) installs=(pyqt.module_installs(), pyqt.module_dir())
).generate() ).generate()
# Install module initialization script.
create_config("__init__.py", os.path.join(src_dir, "module-init.py"), macros)
# Install the configuration module. # Install the configuration module.
create_config("pyqtconfig.py", os.path.join(src_dir, "pyqtconfig.py.in"), macros) create_config("pyqtconfig.py", os.path.join(src_dir, "pyqtconfig.py.in"), macros)

@ -291,7 +291,7 @@ WIDTH="100%"
><TD ><TD
><PRE ><PRE
CLASS="PROGRAMLISTING" CLASS="PROGRAMLISTING"
>from qt import * >from python_tqt.qt import *
# Import our custom widget. # Import our custom widget.
from foo import bar</PRE from foo import bar</PRE

@ -256,7 +256,7 @@ Here's the corresponding output from <Literal>pyuic</Literal>.
</Para> </Para>
<ProgramListing> <ProgramListing>
from qt import * from python_tqt.qt import *
# Import our custom widget. # Import our custom widget.
from foo import bar from foo import bar

@ -285,7 +285,7 @@ Here's the corresponding output from <Literal>pyuic</Literal>.
</Para> </Para>
<ProgramListing> <ProgramListing>
from qt import * from python_tqt.qt import *
# Import our custom widget. # Import our custom widget.
from foo import bar from foo import bar
@ -1326,7 +1326,6 @@ Classes that are not mentioned have not yet been implemented.
%Include qt/qfontinfo.sip %Include qt/qfontinfo.sip
%Include qt/qfontmetrics.sip %Include qt/qfontmetrics.sip
%Include qt/qframe.sip %Include qt/qframe.sip
%Include qt/qgmanager.sip
%Include qt/qgrid.sip %Include qt/qgrid.sip
%Include qt/qgridview.sip %Include qt/qgridview.sip
%Include qt/qgroupbox.sip %Include qt/qgroupbox.sip
@ -1340,14 +1339,12 @@ Classes that are not mentioned have not yet been implemented.
%Include qt/qinputdialog.sip %Include qt/qinputdialog.sip
%Include qt/qinterlacestyle.sip %Include qt/qinterlacestyle.sip
%Include qt/qiodevice.sip %Include qt/qiodevice.sip
%Include qt/qkeycode.sip
%Include qt/qkeysequence.sip %Include qt/qkeysequence.sip
%Include qt/qlabel.sip %Include qt/qlabel.sip
%Include qt/qlayout.sip %Include qt/qlayout.sip
%Include qt/qlcdnumber.sip %Include qt/qlcdnumber.sip
%Include qt/qlibrary.sip %Include qt/qlibrary.sip
%Include qt/qlineedit.sip %Include qt/qlineedit.sip
%Include qt/qlist.sip
%Include qt/qlistbox.sip %Include qt/qlistbox.sip
%Include qt/qlistview.sip %Include qt/qlistview.sip
%Include qt/qlocale.sip %Include qt/qlocale.sip
@ -1419,7 +1416,6 @@ Classes that are not mentioned have not yet been implemented.
%Include qt/qsyntaxhighlighter.sip %Include qt/qsyntaxhighlighter.sip
%Include qt/qtabbar.sip %Include qt/qtabbar.sip
%Include qt/qtabdialog.sip %Include qt/qtabdialog.sip
%Include qt/qtableview.sip
%Include qt/qtabwidget.sip %Include qt/qtabwidget.sip
%Include qt/qtextbrowser.sip %Include qt/qtextbrowser.sip
%Include qt/qtextcodec.sip %Include qt/qtextcodec.sip
@ -1448,7 +1444,6 @@ Classes that are not mentioned have not yet been implemented.
%Include qt/qwidget.sip %Include qt/qwidget.sip
%Include qt/qwidgetlist.sip %Include qt/qwidgetlist.sip
%Include qt/qwidgetstack.sip %Include qt/qwidgetstack.sip
%Include qt/qwindow.sip
%Include qt/qwindowsstyle.sip %Include qt/qwindowsstyle.sip
%Include qt/qwindowsxpstyle.sip %Include qt/qwindowsxpstyle.sip
%Include qt/qwizard.sip %Include qt/qwizard.sip

@ -9,7 +9,7 @@
void ConnectDialog::init() void ConnectDialog::init()
{ {
from qtsql import TQSqlDatabase from python_tqt.qtsql 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 qt import * from python_tqt.qt import *
from qtsql import * from python_tqt.qtsql import *
from frmconnect import frmConnect from frmconnect import frmConnect
from dbpar import * from dbpar import *
@ -14,7 +14,7 @@ def createConnection():
driver = DB_DRIVER driver = DB_DRIVER
# all qt examples use TQSqlDatabase::addDatabase, but # all qt examples use TQSqlDatabase::addDatabase, but
# this never returns NULL in my experience # this never returns NULL in my experience
drivers = map(str, TQSqlDatabase.drivers()) drivers = list(map(str, TQSqlDatabase.drivers()))
if driver in drivers: if driver in drivers:
dlg = dbConnect(driver) dlg = dbConnect(driver)
#TODO: make connection parameters accessible #TODO: make connection parameters accessible
@ -40,8 +40,8 @@ class dbConnect(frmConnect):
self.txtName.setText(self.username) self.txtName.setText(self.username)
self.txtPasswd.setText(self.password) self.txtPasswd.setText(self.password)
map(self.cmbServer.insertItem, self.hostnames) list(map(self.cmbServer.insertItem, self.hostnames))
map(self.cmbDatabase.insertItem, self.databases) list(map(self.cmbDatabase.insertItem, self.databases))
self.connect(self.buttonHelp, SIGNAL("clicked()"), self.connect(self.buttonHelp, SIGNAL("clicked()"),
self.buttonHelp_clicked) self.buttonHelp_clicked)
@ -77,6 +77,6 @@ class dbConnect(frmConnect):
if __name__ == "__main__": if __name__ == "__main__":
app = TQApplication(sys.argv) app = TQApplication(sys.argv)
if createConnection(): if createConnection():
print "ok" print("ok")
else: else:
print "cancel" print("cancel")

@ -6,7 +6,7 @@
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
from qt import * from python_tqt.qt import *
class frmConnect(TQDialog): class frmConnect(TQDialog):

@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys import sys
from qt import * from python_tqt.qt 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 qt import * from python_tqt.qt 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 qt import * from python_tqt.qt import *
from qtsql import * from python_tqt.qtsql 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 qt import * from python_tqt.qt import *
from qtsql import * from python_tqt.qtsql import *
from dbconnect import createConnection from dbconnect import createConnection

@ -11,8 +11,8 @@
#*****************************************************************************/ #*****************************************************************************/
import sys import sys
from qt import * from python_tqt.qt import *
from qtsql import * from python_tqt.qtsql import *
from dbconnect import createConnection from dbconnect import createConnection
@ -31,7 +31,7 @@ class CustomTable(TQDataTable):
query = TQSqlQuery("SELECT name FROM prices WHERE id=%s" % query = TQSqlQuery("SELECT name FROM prices WHERE id=%s" %
field.value().toString()) field.value().toString())
value = "" value = ""
if query.next(): if next(query):
value = query.value(0).toString() value = query.value(0).toString()
p.drawText(2, 2, cr.width()-4, cr.height()-4, p.drawText(2, 2, cr.width()-4, cr.height()-4,
self.fieldAlignment(field), value) self.fieldAlignment(field), value)
@ -42,7 +42,7 @@ class CustomTable(TQDataTable):
v = field.value().toDouble() v = field.value().toDouble()
if v < 0: if v < 0:
p.setPen(TQColor("red")) p.setPen(TQColor("red"))
value = TQString(u"%.2f \u20ac" % v) value = TQString("%.2f \u20ac" % v)
p.drawText(2, 2, cr.width()-6, cr.height()-4, p.drawText(2, 2, cr.width()-6, cr.height()-4,
TQt.AlignRight|TQt.AlignVCenter, value) TQt.AlignRight|TQt.AlignVCenter, value)
elif fn == "paiddate": elif fn == "paiddate":
@ -74,17 +74,17 @@ class InvoiceItemCursor(TQSqlCursor):
if fn == "productname": if fn == "productname":
query = TQSqlQuery("SELECT name FROM prices WHERE id=%d;" % query = TQSqlQuery("SELECT name FROM prices WHERE id=%d;" %
(self.field("pricesid").value().toInt())) (self.field("pricesid").value().toInt()))
if query.next(): if next(query):
return query.value(0) return query.value(0)
elif fn == "price": elif fn == "price":
query = TQSqlQuery("SELECT price FROM prices WHERE id=%d;" % query = TQSqlQuery("SELECT price FROM prices WHERE id=%d;" %
(self.field("pricesid").value().toInt())) (self.field("pricesid").value().toInt()))
if query.next(): if next(query):
return query.value(0) return query.value(0)
elif fn == "cost": elif fn == "cost":
query = TQSqlQuery("SELECT price FROM prices WHERE id=%d;" % query = TQSqlQuery("SELECT price FROM prices WHERE id=%d;" %
(self.field("pricesid").value().toInt())) (self.field("pricesid").value().toInt()))
if query.next(): if next(query):
return TQVariant(query.value(0).toDouble() * return TQVariant(query.value(0).toDouble() *
self.value("quantity").toDouble()) self.value("quantity").toDouble())
return TQVariant(TQString.null) return TQVariant(TQString.null)
@ -102,7 +102,7 @@ class ProductPicker(TQComboBox):
TQComboBox.__init__(self, parent, name) TQComboBox.__init__(self, parent, name)
cur = TQSqlCursor("prices") cur = TQSqlCursor("prices")
cur.select(cur.index("id")) cur.select(cur.index("id"))
while cur.next(): while next(cur):
self.insertItem(cur.value("name").toString(), cur.value("id").toInt()) self.insertItem(cur.value("name").toString(), cur.value("id").toInt())

@ -11,8 +11,8 @@
#*****************************************************************************/ #*****************************************************************************/
import sys import sys
from qt import * from python_tqt.qt import *
from qtsql import * from python_tqt.qtsql import *
from dbconnect import createConnection from dbconnect import createConnection
@ -31,7 +31,7 @@ class CustomTable(TQDataTable):
v = field.value().toDouble() v = field.value().toDouble()
if v < 0: if v < 0:
p.setPen(TQColor("red")) p.setPen(TQColor("red"))
value = TQString(u"%.2f \u20ac" % v) value = TQString("%.2f \u20ac" % v)
#print unicode(value).encode("iso-8859-15") #print unicode(value).encode("iso-8859-15")
p.drawText(2, 2, cr.width()-6, cr.height()-4, p.drawText(2, 2, cr.width()-6, cr.height()-4,
TQt.AlignRight|TQt.AlignVCenter, value) TQt.AlignRight|TQt.AlignVCenter, value)
@ -39,7 +39,7 @@ class CustomTable(TQDataTable):
query = TQSqlQuery("SELECT name FROM status WHERE id=%s" % query = TQSqlQuery("SELECT name FROM status WHERE id=%s" %
field.value().toString()) field.value().toString())
value = "" value = ""
if query.next(): if next(query):
value = query.value(0).toString() value = query.value(0).toString()
p.drawText(2, 2, cr.width()-4, cr.height()-4, p.drawText(2, 2, cr.width()-4, cr.height()-4,
self.fieldAlignment(field), value) self.fieldAlignment(field), value)
@ -52,7 +52,7 @@ class StatusPicker(TQComboBox):
TQComboBox.__init__(self, parent, name) TQComboBox.__init__(self, parent, name)
cur = TQSqlCursor("status") cur = TQSqlCursor("status")
cur.select(cur.index("id")) cur.select(cur.index("id"))
while cur.next(): while next(cur):
self.insertItem(cur.value("name").toString(), cur.value("id").toInt()) self.insertItem(cur.value("name").toString(), cur.value("id").toInt())

@ -1,14 +1,14 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys import sys
from qt import * from python_tqt.qt import *
def TQMIN(x, y): def TQMIN(x, y):
if y > x: return y if y > x: return y
return x return x
class AnalogClock(TQWidget): class AnalogClock(TQWidget):
def __init__(self, *args): def __init__(self, *args):
apply(TQWidget.__init__,(self,) + args) TQWidget.__init__(*(self,) + args)
self.time = TQTime.currentTime() self.time = TQTime.currentTime()
internalTimer = TQTimer(self) internalTimer = TQTimer(self)
self.connect(internalTimer, SIGNAL("timeout()"), self.timeout) self.connect(internalTimer, SIGNAL("timeout()"), self.timeout)

@ -4,7 +4,7 @@
import sys, string import sys, string
from qt import * from python_tqt.qt import *
TRUE = 1 TRUE = 1
FALSE = 0 FALSE = 0
@ -78,7 +78,7 @@ fileprint = [
class ABCentralWidget( TQWidget ): class ABCentralWidget( TQWidget ):
def __init__( self, *args ): def __init__( self, *args ):
apply( TQWidget.__init__, (self, ) + args ) TQWidget.__init__(*(self, ) + args)
self.mainGrid = TQGridLayout( self, 2, 1, 5, 5 ) self.mainGrid = TQGridLayout( self, 2, 1, 5, 5 )
self.setupTabWidget() self.setupTabWidget()

@ -4,7 +4,7 @@
import sys, string import sys, string
from qt import * from python_tqt.qt import *
fileopen = [ fileopen = [
@ -179,7 +179,7 @@ class ApplicationWindow(TQMainWindow):
return return
for l in f.readlines(): for l in f.readlines():
self.e.append(string.rstrip(l)) self.e.append(l.rstrip())
f.close() f.close()

@ -1,11 +1,11 @@
#!/usr/bin/env python #!/usr/bin/env python
import os, sys, string import os, sys, string
from qt import * from python_tqt.qt import *
if TQT_VERSION < 0x030100: if TQT_VERSION < 0x030100:
print "This example requires TQt v3.1.0 or later." print("This example requires TQt v3.1.0 or later.")
sys.exit(1) sys.exit(1)

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

@ -10,7 +10,7 @@
#*****************************************************************************/ #*****************************************************************************/
import sys import sys
from qt import * from python_tqt.qt import *
TRUE = 1 TRUE = 1
FALSE = 0 FALSE = 0
@ -21,7 +21,7 @@ FALSE = 0
class ButtonsGroups( TQWidget ): class ButtonsGroups( TQWidget ):
def __init__( self, *args ): def __init__( self, *args ):
apply( TQWidget.__init__, (self,) + args ) TQWidget.__init__(*(self,) + args)
# Create Widgets which allow easy layouting # Create Widgets which allow easy layouting
self.vbox = TQVBoxLayout( self, 11, 6 ) self.vbox = TQVBoxLayout( self, 11, 6 )

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

@ -1,13 +1,11 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys import sys
from qt import * from python_tqt.qt import *
from qtcanvas import * from python_tqt.qtcanvas import *
import random import random
True = 1
False = 0
butterfly_fn = TQString.null butterfly_fn = TQString.null
butterflyimg = [] butterflyimg = []
logo_fn = TQString.null logo_fn = TQString.null
@ -29,15 +27,15 @@ class ImageItem(TQCanvasRectangle):
return self.imageRTTI return self.imageRTTI
def hit(self,p): def hit(self,p):
ix = p.x()-self.x() ix = round(p.x()-self.x())
iy = p.y()-self.y() iy = round(p.y()-self.y())
if not self.image.valid( ix , iy ): if not self.image.valid( ix , iy ):
return False return False
self.pixel = self.image.pixel( ix, iy ) self.pixel = self.image.pixel( ix, iy )
return (tqAlpha( self.pixel ) != 0) return (tqAlpha( self.pixel ) != 0)
def drawShape(self,p): def drawShape(self,p):
p.drawPixmap( self.x(), self.y(), self.pixmap ) p.drawPixmap( round(self.x()), round(self.y()), self.pixmap )
class NodeItem(TQCanvasEllipse): class NodeItem(TQCanvasEllipse):
@ -271,11 +269,11 @@ class Main (TQMainWindow):
r=24 r=24
r=r+1 r=r+1
random.seed(r) random.seed(r)
for i in range(self.canvas.width()/56): for i in range(self.canvas.width()//56):
self.addButterfly() self.addButterfly()
for j in range(self.canvas.width()/85): for j in range(self.canvas.width()//85):
self.addHexagon() self.addHexagon()
for k in range(self.canvas.width()/128): for k in range(self.canvas.width()//128):
self.addLogo() self.addLogo()
def newView(self): def newView(self):
@ -311,10 +309,10 @@ class Main (TQMainWindow):
self.canvas.setDoubleBuffering(s) self.canvas.setDoubleBuffering(s)
def enlarge(self): def enlarge(self):
self.canvas.resize(self.canvas.width()*4/3, self.canvas.height()*4/3) self.canvas.resize(self.canvas.width()*4//3, self.canvas.height()*4//3)
def shrink(self): def shrink(self):
self.canvas.resize(self.canvas.width()*3/4, self.canvas.height()*3/4) self.canvas.resize(self.canvas.width()*3//4, self.canvas.height()*3//4)
def rotateClockwise(self): def rotateClockwise(self):
m = self.editor.worldMatrix() m = self.editor.worldMatrix()
@ -419,62 +417,62 @@ class Main (TQMainWindow):
def addCircle(self): def addCircle(self):
i = TQCanvasEllipse(50,50,self.canvas) i = TQCanvasEllipse(50,50,self.canvas)
i.setBrush( TQBrush(TQColor(256*random.random()%32*8,256*random.random()%32*8,256*random.random()%32*8) )) i.setBrush( TQBrush(TQColor(random.randint(0,256)%32*8,random.randint(0,256)%32*8,random.randint(0,256)%32*8) ))
i.move(self.canvas.width()*random.random()%self.canvas.width(),self.canvas.width()*random.random()%self.canvas.height()) i.move(self.canvas.width()*random.random()%self.canvas.width(),self.canvas.width()*random.random()%self.canvas.height())
i.setZ(256*random.random()%256) i.setZ(256*random.random()%256)
i.show() i.show()
def addHexagon(self): def addHexagon(self):
i = TQCanvasPolygon(self.canvas) i = TQCanvasPolygon(self.canvas)
size = canvas.width() / 25 size = round(canvas.width() / 25)
pa=TQPointArray(6) pa=TQPointArray(6)
pa.setPoint(0,TQPoint(2*size,0)) pa.setPoint(0,TQPoint(2*size,0))
pa.setPoint(1,TQPoint(size,-size*173/100)) pa.setPoint(1,TQPoint(size,-size*173//100))
pa.setPoint(2,TQPoint(-size,-size*173/100)) pa.setPoint(2,TQPoint(-size,-size*173//100))
pa.setPoint(3,TQPoint(-2*size,0)) pa.setPoint(3,TQPoint(-2*size,0))
pa.setPoint(4,TQPoint(-size,size*173/100)) pa.setPoint(4,TQPoint(-size,size*173//100))
pa.setPoint(5,TQPoint(size,size*173/100)) pa.setPoint(5,TQPoint(size,size*173//100))
i.setPoints(pa) i.setPoints(pa)
i.setBrush( TQBrush(TQColor(256*random.random()%32*8,256*random.random()%32*8,256*random.random()%32*8) )) i.setBrush( TQBrush(TQColor(random.randint(0,256)%32*8,random.randint(0,256)%32*8,random.randint(0,256)%32*8) ))
i.move(self.canvas.width()*random.random()%self.canvas.width(),self.canvas.width()*random.random()%self.canvas.height()) i.move(self.canvas.width()*random.random()%self.canvas.width(),self.canvas.width()*random.random()%self.canvas.height())
i.setZ(256*random.random()%256) i.setZ(256*random.random()%256)
i.show() i.show()
def addPolygon(self): def addPolygon(self):
i = TQCanvasPolygon(self.canvas) i = TQCanvasPolygon(self.canvas)
size = self.canvas.width()/2 size = self.canvas.width()//2
pa=TQPointArray(6) pa=TQPointArray(6)
pa.setPoint(0, TQPoint(0,0)) pa.setPoint(0, TQPoint(0,0))
pa.setPoint(1, TQPoint(size,size/5)) pa.setPoint(1, TQPoint(size,size//5))
pa.setPoint(2, TQPoint(size*4/5,size)) pa.setPoint(2, TQPoint(size*4//5,size))
pa.setPoint(3, TQPoint(size/6,size*5/4)) pa.setPoint(3, TQPoint(size//6,size*5//4))
pa.setPoint(4, TQPoint(size*3/4,size*3/4)) pa.setPoint(4, TQPoint(size*3//4,size*3//4))
pa.setPoint(5, TQPoint(size*3/4,size/4)) pa.setPoint(5, TQPoint(size*3//4,size//4))
i.setPoints(pa) i.setPoints(pa)
i.setBrush(TQBrush( TQColor(256*random.random()%32*8,256*random.random()%32*8,256*random.random()%32*8)) ) i.setBrush(TQBrush( TQColor(random.randint(0,256)%32*8,random.randint(0,256)%32*8,random.randint(0,256)%32*8)) )
i.move(self.canvas.width()*random.random()%self.canvas.width(),self.canvas.width()*random.random()%self.canvas.height()) i.move(self.canvas.width()*random.random()%self.canvas.width(),self.canvas.width()*random.random()%self.canvas.height())
i.setZ(256*random.random()%256) i.setZ(256*random.random()%256)
i.show() i.show()
def addSpline(self): def addSpline(self):
i = TQCanvasSpline(self.canvas) i = TQCanvasSpline(self.canvas)
size = canvas.width()/6 size = canvas.width()//6
pa=TQPointArray(12) pa=TQPointArray(12)
pa.setPoint(0,TQPoint(0,0)) pa.setPoint(0,TQPoint(0,0))
pa.setPoint(1,TQPoint(size/2,0)) pa.setPoint(1,TQPoint(size//2,0))
pa.setPoint(2,TQPoint(size,size/2)) pa.setPoint(2,TQPoint(size,size//2))
pa.setPoint(3,TQPoint(size,size)) pa.setPoint(3,TQPoint(size,size))
pa.setPoint(4,TQPoint(size,size*3/2)) pa.setPoint(4,TQPoint(size,size*3//2))
pa.setPoint(5,TQPoint(size/2,size*2)) pa.setPoint(5,TQPoint(size//2,size*2))
pa.setPoint(6,TQPoint(0,size*2)) pa.setPoint(6,TQPoint(0,size*2))
pa.setPoint(7,TQPoint(-size/2,size*2)) pa.setPoint(7,TQPoint(-size//2,size*2))
pa.setPoint(8,TQPoint(size/4,size*3/2)) pa.setPoint(8,TQPoint(size//4,size*3//2))
pa.setPoint(9,TQPoint(0,size)) pa.setPoint(9,TQPoint(0,size))
pa.setPoint(10,TQPoint(-size/4,size/2)) pa.setPoint(10,TQPoint(-size//4,size//2))
pa.setPoint(11,TQPoint(-size/2,0)) pa.setPoint(11,TQPoint(-size//2,0))
i.setControlPoints(pa) i.setControlPoints(pa)
i.setBrush( TQBrush(TQColor(256*random.random()%32*8,256*random.random()%32*8,256*random.random()%32*8) )) i.setBrush( TQBrush(TQColor(random.randint(0,256)%32*8,random.randint(0,256)%32*8,random.randint(0,256)%32*8) ))
i.move(self.canvas.width()*random.random()%self.canvas.width(),self.canvas.width()*random.random()%self.canvas.height()) i.move(self.canvas.width()*random.random()%self.canvas.width(),self.canvas.width()*random.random()%self.canvas.height())
i.setZ(256*random.random()%256) i.setZ(256*random.random()%256)
i.show() i.show()
@ -488,9 +486,9 @@ class Main (TQMainWindow):
def addLine(self): def addLine(self):
i = TQCanvasLine(self.canvas); i = TQCanvasLine(self.canvas);
i.setPoints( self.canvas.width()*random.random()%self.canvas.width(), self.canvas.width()*random.random()%self.canvas.height(), i.setPoints( random.randint(0,self.canvas.width())%self.canvas.width(), random.randint(0,self.canvas.width())%self.canvas.height(),
self.canvas.width()*random.random()%self.canvas.width(), self.canvas.width()*random.random()%self.canvas.height() ) random.randint(0,self.canvas.width())%self.canvas.width(), random.randint(0,self.canvas.width())%self.canvas.height() )
i.setPen( TQPen(TQColor(256*random.random()%32*8,256*random.random()%32*8,256*random.random()%32*8), 6) ) i.setPen( TQPen(TQColor(random.randint(0,256),random.randint(0,256),random.randint(0,256)), 6) )
i.setZ(256*random.random()%256) i.setZ(256*random.random()%256)
i.show() i.show()
@ -515,8 +513,8 @@ class Main (TQMainWindow):
h = self.canvas.height() h = self.canvas.height()
dist = 30 dist = 30
rows = h / dist rows = h // dist
cols = w / dist cols = w // dist
#ifndef QT_NO_PROGRESSDIALOG #ifndef QT_NO_PROGRESSDIALOG
#progress=TQProgressDialog( "Creating mesh...", "Abort", rows, #progress=TQProgressDialog( "Creating mesh...", "Abort", rows,
@ -566,14 +564,14 @@ class Main (TQMainWindow):
#// tqDebug( "%d nodes, %d edges", nodecount, EdgeItem::count() ); #// tqDebug( "%d nodes, %d edges", nodecount, EdgeItem::count() );
def addRectangle(self): def addRectangle(self):
i = TQCanvasRectangle( self.canvas.width()*random.random()%self.canvas.width(), i = TQCanvasRectangle( random.randint(0,self.canvas.width())%self.canvas.width(),
self.canvas.width()*random.random()%self.canvas.height(), random.randint(0,self.canvas.width())%self.canvas.height(),
self.canvas.width()/5,self.canvas.width()/5,self.canvas) self.canvas.width()//5,self.canvas.width()//5,self.canvas)
z = 256*random.random()%256 z = random.randint(0,256)%256
i.setBrush( TQBrush(TQColor(z,z,z) )) i.setBrush( TQBrush(TQColor(z,z,z) ))
i.setPen( TQPen(TQColor(self.canvas.width()*random.random()%32*8, i.setPen( TQPen(TQColor(random.randint(0,self.canvas.width())%32*8,
self.canvas.width()*random.random()%32*8, random.randint(0,self.canvas.width())%32*8,
self.canvas.width()*random.random()%32*8), 6) ) random.randint(0,self.canvas.width())%32*8), 6) )
i.setZ(z) i.setZ(z)
i.show() i.show()

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

@ -1,36 +1,35 @@
#!/usr/bin/env python #!/usr/bin/env python
# vim:tabstop=2:shiftwidth=2:expandtab:cinoptions=(s,U1,m1
# Copyright (C) 2002 Oleksandr Yakovlyev (yshurik) <yshurik@thekompany.com> # Copyright (C) 2002 Oleksandr Yakovlyev (yshurik) <yshurik@thekompany.com>
import sys import sys
from qt import * from python_tqt.qt import *
TRUE = 1 TRUE = 1
FALSE = 0 FALSE = 0
class CheckLists(TQWidget): class CheckLists(TQWidget):
def __init__(self, *args): def __init__(self, *args):
apply( TQWidget.__init__, (self, ) + args ) TQWidget.__init__(* (self, ) + args )
lay = TQHBoxLayout(self) lay = TQHBoxLayout(self)
lay.setMargin(5) lay.setMargin(5)
vbox1 = TQVBoxLayout(lay) vbox1 = TQVBoxLayout(lay)
vbox1.setMargin(5) vbox1.setMargin(5)
# First child: a Label # First child: a Label
vbox1.addWidget(TQLabel("Check some items!", self)) vbox1.addWidget(TQLabel("Check some items!", self))
# Second child: the ListView # Second child: the ListView
self.lv1 = TQListView(self) self.lv1 = TQListView(self)
vbox1.addWidget(self.lv1) vbox1.addWidget(self.lv1)
self.lv1.addColumn("Items") self.lv1.addColumn("Items")
self.lv1.setRootIsDecorated(TRUE) self.lv1.setRootIsDecorated(TRUE)
# create a list with 4 ListViewItems which will be parent items of other ListViewItems # create a list with 4 ListViewItems which will be parent items of other ListViewItems
parentList = [] parentList = []
parentList.append( TQListViewItem( self.lv1, "Parent Item 1" ) ) parentList.append( TQListViewItem( self.lv1, "Parent Item 1" ) )
parentList.append( TQListViewItem( self.lv1, "Parent Item 2" ) ) parentList.append( TQListViewItem( self.lv1, "Parent Item 2" ) )
@ -92,7 +91,7 @@ class CheckLists(TQWidget):
self.label = TQLabel( "No Item yet...", self ) self.label = TQLabel( "No Item yet...", self )
tmp3.addWidget( self.label ) tmp3.addWidget( self.label )
def copy1to2(self): def copy1to2(self):
self.lv2.clear() self.lv2.clear()
# Insert first a controller Item into the second ListView. Always if Radio-ListViewItems # Insert first a controller Item into the second ListView. Always if Radio-ListViewItems

@ -10,7 +10,7 @@
***************************************************************************""" ***************************************************************************"""
import sys import sys
from qt import * from python_tqt.qt import *
# cb_bits and cm_bits were generated by X bitmap program. # cb_bits and cm_bits were generated by X bitmap program.
@ -18,33 +18,33 @@ cb_width = 32
cb_height = 32 cb_height = 32
# cursor bitmap # cursor bitmap
cb_bits = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x0f\x00" \ cb_bits = b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x0f\x00" \
"\x00\x06\x30\x00\x80\x01\xc0\x00\x40\x00\x00\x01" \ b"\x00\x06\x30\x00\x80\x01\xc0\x00\x40\x00\x00\x01" \
"\x20\x00\x00\x02\x10\x00\x00\x04\x08\x3e\x3e\x08" \ b"\x20\x00\x00\x02\x10\x00\x00\x04\x08\x3e\x3e\x08" \
"\x08\x03\xe0\x08\xc4\x00\x00\x11\x04\x1e\x78\x10" \ b"\x08\x03\xe0\x08\xc4\x00\x00\x11\x04\x1e\x78\x10" \
"\x02\x0c\x30\x20\x02\x40\x00\x20\x02\x40\x00\x20" \ b"\x02\x0c\x30\x20\x02\x40\x00\x20\x02\x40\x00\x20" \
"\x02\x40\x00\x20\x02\x20\x04\x20\x02\x20\x04\x20" \ b"\x02\x40\x00\x20\x02\x20\x04\x20\x02\x20\x04\x20" \
"\x02\x10\x08\x20\x02\x08\x08\x20\x02\xf0\x07\x20" \ b"\x02\x10\x08\x20\x02\x08\x08\x20\x02\xf0\x07\x20" \
"\x04\x00\x00\x10\x04\x00\x00\x10\x08\x00\xc0\x08" \ b"\x04\x00\x00\x10\x04\x00\x00\x10\x08\x00\xc0\x08" \
"\x08\x3c\x30\x08\x10\xe6\x19\x04\x20\x00\x0f\x02" \ b"\x08\x3c\x30\x08\x10\xe6\x19\x04\x20\x00\x0f\x02" \
"\x40\x00\x00\x01\x80\x01\xc0\x00\x00\x06\x30\x00" \ b"\x40\x00\x00\x01\x80\x01\xc0\x00\x00\x06\x30\x00" \
"\x00\xf8\x0f\x00\x00\x00\x00\x00" b"\x00\xf8\x0f\x00\x00\x00\x00\x00"
cm_width = 32 cm_width = 32
cm_height = 32 cm_height = 32
# cursor bitmap mask # cursor bitmap mask
cm_bits = "\x00\x00\x00\x00\x00\xf8\x1f\x00\x00\xfe\x3f\x00" \ cm_bits = b"\x00\x00\x00\x00\x00\xf8\x1f\x00\x00\xfe\x3f\x00" \
"\x80\x07\xf0\x00\xc0\x01\xc0\x01\x60\x00\x00\x03" \ b"\x80\x07\xf0\x00\xc0\x01\xc0\x01\x60\x00\x00\x03" \
"\x30\x00\x00\x06\x18\x00\x00\x0c\x0c\x3e\x3e\x18" \ b"\x30\x00\x00\x06\x18\x00\x00\x0c\x0c\x3e\x3e\x18" \
"\x0e\x03\xe0\x18\xc6\x00\x00\x31\x07\x1e\x78\x30" \ b"\x0e\x03\xe0\x18\xc6\x00\x00\x31\x07\x1e\x78\x30" \
"\x03\x0c\x30\x60\x03\x40\x00\x60\x03\x40\x00\x60" \ b"\x03\x0c\x30\x60\x03\x40\x00\x60\x03\x40\x00\x60" \
"\x03\x40\x00\x60\x03\x20\x04\x60\x03\x20\x04\x60" \ b"\x03\x40\x00\x60\x03\x20\x04\x60\x03\x20\x04\x60" \
"\x03\x10\x08\x60\x03\x08\x08\x60\x03\xf0\x07\x60" \ b"\x03\x10\x08\x60\x03\x08\x08\x60\x03\xf0\x07\x60" \
"\x06\x00\x00\x30\x06\x00\x00\x30\x0c\x00\xc0\x18" \ b"\x06\x00\x00\x30\x06\x00\x00\x30\x0c\x00\xc0\x18" \
"\x0c\x3c\x30\x18\x18\xe6\x19\x0c\x30\x00\x0f\x06" \ b"\x0c\x3c\x30\x18\x18\xe6\x19\x0c\x30\x00\x0f\x06" \
"\x60\x00\x00\x03\xc0\x01\xc0\x01\x80\x07\xf0\x00" \ b"\x60\x00\x00\x03\xc0\x01\xc0\x01\x80\x07\xf0\x00" \
"\x00\xfe\x3f\x00\x00\xf8\x0f\x00" b"\x00\xfe\x3f\x00\x00\xf8\x0f\x00"
# The CursorView contains many labels with different cursors. # The CursorView contains many labels with different cursors.
class CursorView( TQWidget ): # cursor view class CursorView( TQWidget ): # cursor view

@ -4,7 +4,7 @@
import sys, string import sys, string
from qt import * from python_tqt.qt import *
class DigitalClock(TQLCDNumber): class DigitalClock(TQLCDNumber):
@ -47,7 +47,7 @@ class DigitalClock(TQLCDNumber):
s[2] = ' ' s[2] = ' '
if s[0] == '0': if s[0] == '0':
s[0] = ' ' s[0] = ' '
s = string.join(s,'') s = ''.join(s)
self.display(s) self.display(s)
a = TQApplication(sys.argv) a = TQApplication(sys.argv)

@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys import sys
from qt import * from python_tqt.qt import *
seed = 0.353535353535 seed = 0.353535353535
KINDA_RAND_MAX = 32767 KINDA_RAND_MAX = 32767
@ -220,11 +220,11 @@ if len(sys.argv) == 3:
validOptions = 0 validOptions = 0
if not validOptions: if not validOptions:
print """Usage: print("""Usage:
\tdesktop -poly \tdesktop -poly
\tdesktop -rotate \tdesktop -rotate
\tdesktop -troll \tdesktop -troll
\tdesktop -trollwidget \tdesktop -trollwidget
\tdesktop -shadetext <text> \tdesktop -shadetext <text>
\tdesktop -shadewidget <text>""" \tdesktop -shadewidget <text>""")
rotate() rotate()

@ -12,7 +12,7 @@
***************************************************************************""" ***************************************************************************"""
import sys import sys
from qt import * from python_tqt.qt 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 qt import * from python_tqt.qt 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 qt import * from python_tqt.qt 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 qt import * from python_tqt.qt import *
import secret import secret

@ -11,7 +11,7 @@
***************************************************************************""" ***************************************************************************"""
import sys import sys
from qt import * from python_tqt.qt import *
class FontRowTable( TQFrame ): class FontRowTable( TQFrame ):
def __init__( self, parent=None, name=None ): def __init__( self, parent=None, name=None ):
@ -41,15 +41,15 @@ class FontRowTable( TQFrame ):
fm = self.fontMetrics() fm = self.fontMetrics()
ml = self.frameWidth() + self.margin() + 1 + max(0,-fm.minLeftBearing()) ml = self.frameWidth() + self.margin() + 1 + max(0,-fm.minLeftBearing())
mt = self.frameWidth() + self.margin() mt = self.frameWidth() + self.margin()
cell = TQSize((self.width()-15-ml)/16,(self.height()-15-mt)/16) cell = TQSize(int((self.width()-15-ml)/16),int((self.height()-15-mt)/16))
if not cell.width() or not cell.height() : if not cell.width() or not cell.height() :
return return
mini = r.left() / cell.width() mini = int(r.left() / cell.width())
maxi = (r.right()+cell.width()-1) / cell.width() maxi = int((r.right()+cell.width()-1) / cell.width())
minj = r.top() / cell.height() minj = int(r.top() / cell.height())
maxj = (r.bottom()+cell.height()-1) / cell.height() maxj = int((r.bottom()+cell.height()-1) / cell.height())
h = fm.height() h = fm.height()
@ -83,13 +83,13 @@ class FontRowTable( TQFrame ):
else: sign = positive else: sign = positive
if l > 0: lsign = 0 if l > 0: lsign = 0
else: lsign = 1 else: lsign = 1
p.fillRect(x+lsign, y-h/2, abs(l),-h/2, TQBrush(sign)) p.fillRect(x+lsign, int(y-h/2), abs(l),int(-h/2), TQBrush(sign))
if r : if r :
if r < 0: sign = rnegative if r < 0: sign = rnegative
else: sign = rpositive else: sign = rpositive
if r > 0: rsign = r if r > 0: rsign = r
else: rsign = 0 else: rsign = 0
p.fillRect(x+w-rsign,y+2, abs(r),-h/2, TQBrush(sign)) p.fillRect(int(x+w-rsign),y+2, abs(r),int(-h/2), TQBrush(sign))
s = TQString( ch ) s = TQString( ch )
p.setPen(TQPen(TQt.black)) p.setPen(TQPen(TQt.black))
p.drawText(x,y,s) p.drawText(x,y,s)

@ -11,7 +11,7 @@
***************************************************************************""" ***************************************************************************"""
import sys import sys
from qt import * from python_tqt.qt import *
class Viewer( TQWidget ): class Viewer( TQWidget ):
def __init__( self ): def __init__( self ):
@ -19,10 +19,8 @@ class Viewer( TQWidget ):
self.setFontSubstitutions() self.setFontSubstitutions()
#greeting_heb = TQString.fromUtf8( "\327\251\327\234\327\225\327\235" ) greeting_heb = TQString.fromUtf8( b"\327\251\327\234\327\225\327\235" )
greeting_heb = unicode( '\327\251\327\234\327\225\327\235','utf8' ) greeting_ru = TQString.fromUtf8( b"\320\227\320\264\321\200\320\260\320\262\321\201\321\202\320\262\321\203\320\271\321\202\320\265" )
#greeting_ru = TQString.fromUtf8( "\320\227\320\264\321\200\320\260\320\262\321\201\321\202\320\262\321\203\320\271\321\202\320\265" )
greeting_ru = unicode('\320\227\320\264\321\200\320\260\320\262\321\201\321\202\320\262\321\203\320\271\321\202\320\265','utf8' )
greeting_en = "Hello" greeting_en = "Hello"
self.greetings = TQTextView( self, "textview" ) self.greetings = TQTextView( self, "textview" )

@ -3,8 +3,8 @@
import sys import sys
import math import math
from qt import * from python_tqt.qt import *
from qtgl import * from python_tqt.qtgl 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):
@ -227,7 +227,7 @@ if __name__=='__main__':
app=TQApplication(sys.argv) app=TQApplication(sys.argv)
if not TQGLFormat.hasOpenGL(): if not TQGLFormat.hasOpenGL():
raise 'No TQt OpenGL support.' raise Exception('No TQt OpenGL support.')
widget=GearWidget() widget=GearWidget()
app.setMainWidget(widget) app.setMainWidget(widget)

@ -5,7 +5,7 @@
from whrandom import randint from whrandom import randint
import sys import sys
from qt import * from python_tqt.qt import *
from mywidget import MyWidget from mywidget import MyWidget
@ -80,7 +80,7 @@ def showLang(lang):
translator.load(language,".") translator.load(language,".")
tqApp.installTranslator(translator) tqApp.installTranslator(translator)
m = MyWidget() m = MyWidget()
m.setCaption("PyTQt Example - i18n - " + unicode(m.caption())) m.setCaption("PyTQt Example - i18n - " + str(m.caption()))
wlist.append(m) wlist.append(m)
return m return m

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

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

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

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

@ -4,7 +4,7 @@
import sys, string import sys, string
from qt import * from python_tqt.qt import *
fileopen = [ fileopen = [
@ -77,12 +77,12 @@ fileprint = [
document = [ document = [
"12 16 6 1", "12 16 6 1",
" c #040404", " c #040404",
". c None", ". c None",
"X c white", "X c white",
"o c #808304", "o c #808304",
"O c black", "O c black",
"+ c #f3f7f3", "+ c #f3f7f3",
" .....", " .....",
" XXXXX ....", " XXXXX ....",
" XXXXX X ...", " XXXXX X ...",
@ -115,8 +115,8 @@ filePrintText = \
'''Click this button to print the file you are editing.<br><br> '''Click this button to print the file you are editing.<br><br>
You can also select the <b>Print</b> command from the <b>File</b> menu.''' You can also select the <b>Print</b> command from the <b>File</b> menu.'''
True=1 #True=1
False=0 #False=0
class ApplicationWindow(TQMainWindow): class ApplicationWindow(TQMainWindow):
def __init__(self): def __init__(self):
@ -132,7 +132,7 @@ class ApplicationWindow(TQMainWindow):
saveIcon = TQPixmap(filesave) saveIcon = TQPixmap(filesave)
self.fileSave = TQToolButton(TQIconSet(saveIcon),'Save File',TQString.null,self.save,self.fileTools,'save file') self.fileSave = TQToolButton(TQIconSet(saveIcon),'Save File',TQString.null,self.save,self.fileTools,'save file')
printIcon = TQPixmap(fileprint) printIcon = TQPixmap(fileprint)
self.filePrint = TQToolButton(TQIconSet(printIcon),'Print File',TQString.null,self.printDoc,self.fileTools,'print file') self.filePrint = TQToolButton(TQIconSet(printIcon),'Print File',TQString.null,self.printDoc,self.fileTools,'print file')
TQWhatsThis.whatsThisButton(self.fileTools) TQWhatsThis.whatsThisButton(self.fileTools)
@ -168,10 +168,10 @@ class ApplicationWindow(TQMainWindow):
self.menuBar().insertSeparator() self.menuBar().insertSeparator()
self.windows = TQPopupMenu( self ) self.windows = TQPopupMenu( self )
self.windows.setCheckable( True ) self.windows.setCheckable( True )
self.connect( self.windows, SIGNAL( "aboutToShow()" ), self.connect( self.windows, SIGNAL( "aboutToShow()" ),
self.windowsMenuAboutToShow ) self.windowsMenuAboutToShow )
self.menuBar().insertItem( "&Windows", self.windows ) self.menuBar().insertItem( "&Windows", self.windows )
self.help = TQPopupMenu(self) self.help = TQPopupMenu(self)
self.menuBar().insertSeparator() self.menuBar().insertSeparator()
@ -180,15 +180,15 @@ class ApplicationWindow(TQMainWindow):
self.help.insertItem('&About',self.about,TQt.Key_F1) self.help.insertItem('&About',self.about,TQt.Key_F1)
self.help.insertItem('About &TQt',self.aboutTQt) self.help.insertItem('About &TQt',self.aboutTQt)
self.help.insertSeparator() self.help.insertSeparator()
self.help.insertItem( "What's &This", self, SLOT("whatsThis()"), TQt.SHIFT+TQt.Key_F1) self.help.insertItem( "What's &This", self, SLOT("whatsThis()"), TQt.SHIFT+TQt.Key_F1)
self.menuBar().insertSeparator() self.menuBar().insertSeparator()
self.vb = TQVBox( self ) self.vb = TQVBox( self )
self.vb.setFrameStyle( TQFrame.StyledPanel | TQFrame.Sunken ) self.vb.setFrameStyle( TQFrame.StyledPanel | TQFrame.Sunken )
self.ws = TQWorkspace( self.vb ) self.ws = TQWorkspace( self.vb )
self.ws.setScrollBarsEnabled( True ) self.ws.setScrollBarsEnabled( True )
self.setCentralWidget( self.vb ) self.setCentralWidget( self.vb )
self.statusBar().message('Ready',2000) self.statusBar().message('Ready',2000)
#self.resize(450,600) #self.resize(450,600)
@ -265,90 +265,90 @@ class ApplicationWindow(TQMainWindow):
class MDIWindow( TQMainWindow): class MDIWindow( TQMainWindow):
def __init__(self,parent, name, wflags ): def __init__(self,parent, name, wflags ):
TQMainWindow.__init__(self,parent, name, wflags ) TQMainWindow.__init__(self,parent, name, wflags )
self.mmovie = 0 self.mmovie = 0
self.medit = TQMultiLineEdit( self ) self.medit = TQMultiLineEdit( self )
self.setFocusProxy( self.medit ) self.setFocusProxy( self.medit )
self.setCentralWidget( self.medit ); self.setCentralWidget( self.medit );
def load(self, fn ): def load(self, fn ):
self.filename = fn self.filename = fn
self.f=TQFile( self.filename ) self.f=TQFile( self.filename )
if not self.f.open( IO_ReadOnly ): if not self.f.open( IO_ReadOnly ):
return return
if fn.contains(".gif"): if fn.contains(".gif"):
tmp=TQWidget(self) tmp=TQWidget(self)
self.setFocusProxy(tmp) self.setFocusProxy(tmp)
self.setCentralWidget(tmp) self.setCentralWidget(tmp)
self.medit.hide() self.medit.hide()
del self.medit del self.medit
qm=TQMovie(fn) qm=TQMovie(fn)
#ifdef Q_WS_QWS // temporary speed-test hack #ifdef Q_WS_QWS // temporary speed-test hack
#qm->setDisplayWidget(tmp); #qm->setDisplayWidget(tmp);
#endif #endif
tmp.setBackgroundMode(TQWidget.NoBackground) tmp.setBackgroundMode(TQWidget.NoBackground)
tmp.show() tmp.show()
self.mmovie=qm self.mmovie=qm
else : else :
self.mmovie = 0 self.mmovie = 0
t=TQTextStream(self.f) t=TQTextStream(self.f)
s = t.read() s = t.read()
self.medit.setText( s ) self.medit.setText( s )
self.f.close() self.f.close()
self.setCaption( self.filename ) self.setCaption( self.filename )
self.emit(PYSIGNAL( "message"),(TQString("Loaded document %1").arg(self.filename),2000 )) self.emit(PYSIGNAL( "message"),(TQString("Loaded document %1").arg(self.filename),2000 ))
def save(self): def save(self):
if self.filename.isEmpty(): if self.filename.isEmpty():
self.saveAs() self.saveAs()
return return
text = self.medit.text() text = self.medit.text()
output=open(str(self.filename),'w') output=open(str(self.filename),'w')
output.write(str(text)) output.write(str(text))
#emit message( TQString("Could not write to %1").arg(filename), 2000 ); #emit message( TQString("Could not write to %1").arg(filename), 2000 );
#return #return
output.close() output.close()
self.setCaption(self.filename) self.setCaption(self.filename)
self.emit(PYSIGNAL( "message"),(TQString("File %1 saved").arg(self.filename),2000 )) self.emit(PYSIGNAL( "message"),(TQString("File %1 saved").arg(self.filename),2000 ))
def saveAs(self): def saveAs(self):
fn = TQFileDialog.getSaveFileName( self.filename, TQString.null, self ) fn = TQFileDialog.getSaveFileName( self.filename, TQString.null, self )
if not fn.isEmpty(): if not fn.isEmpty():
self.filename = fn self.filename = fn
self.save() self.save()
else : else :
self.emit(PYSIGNAL( "message"),(TQString("Saving aborted"),2000 )) self.emit(PYSIGNAL( "message"),(TQString("Saving aborted"),2000 ))
def printDoc(self,printer): def printDoc(self,printer):
Margin = 10 Margin = 10
pageNo = 1 pageNo = 1
if printer.setup(self): if printer.setup(self):
self.emit(PYSIGNAL( "message"),(TQString("Printing..."),2000 )) self.emit(PYSIGNAL( "message"),(TQString("Printing..."),2000 ))
p = TQPainter() p = TQPainter()
p.begin(printer) p.begin(printer)
p.setFont(self.medit.font()) p.setFont(self.medit.font())
yPos = 0 yPos = 0
fm = p.fontMetrics() fm = p.fontMetrics()
metrics = TQPaintDeviceMetrics(printer) metrics = TQPaintDeviceMetrics(printer)
for i in range(self.medit.numLines()): for i in range(self.medit.numLines()):
if Margin + yPos > metrics.height() - Margin: if Margin + yPos > metrics.height() - Margin:
pageNo = pageNo + 1 pageNo = pageNo + 1
self.emit(PYSIGNAL( "message"),(TQString("Printing (page %1) ...").arg(pageNo),2000 )) self.emit(PYSIGNAL( "message"),(TQString("Printing (page %1) ...").arg(pageNo),2000 ))
printer.newPage() printer.newPage()
yPos = 0 yPos = 0
p.drawText(Margin,Margin + yPos,metrics.width(),fm.lineSpacing(),TQt.ExpandTabs | TQt.DontClip,self.medit.textLine(i)) p.drawText(Margin,Margin + yPos,metrics.width(),fm.lineSpacing(),TQt.ExpandTabs | TQt.DontClip,self.medit.textLine(i))
yPos = yPos + fm.lineSpacing() yPos = yPos + fm.lineSpacing()
p.end() p.end()
self.emit(PYSIGNAL( "message"),(TQString("Printing completed"),2000 )) self.emit(PYSIGNAL( "message"),(TQString("Printing completed"),2000 ))
else: else:
self.emit(PYSIGNAL( "message"),(TQString("Printing aborted"),2000 )) self.emit(PYSIGNAL( "message"),(TQString("Printing aborted"),2000 ))
if __name__=='__main__': if __name__=='__main__':

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

@ -13,7 +13,7 @@
#*****************************************************************************/ #*****************************************************************************/
import sys import sys
from qt import * from python_tqt.qt import *
from random import randint from random import randint
class AnimatedThingy(TQLabel): class AnimatedThingy(TQLabel):
@ -87,7 +87,7 @@ class AnimatedThingy(TQLabel):
def _drawqix(self, p, pn, step): def _drawqix(self, p, pn, step):
# rainbow effect # rainbow effect
pn.setColor(TQColor((step * 255)/self.nqix, 255, 255, TQColor.Hsv)) pn.setColor(TQColor(int((step * 255)/self.nqix), 255, 255, TQColor.Hsv))
p.setPen(pn) p.setPen(pn)
p.drawLine(self.ox[step][0], self.oy[step][0], p.drawLine(self.ox[step][0], self.oy[step][0],
self.ox[step][1], self.oy[step][1]) self.ox[step][1], self.oy[step][1])

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

@ -2,9 +2,10 @@
# #
# 2005-02-12 initial version hp # 2005-02-12 initial version hp
from __future__ import print_function
import os import os
import pickle import pickle
from qt import * from python_tqt.qt import *
from dirview import Directory, DirectoryView from dirview import Directory, DirectoryView
bookmarks = [ bookmarks = [
@ -97,7 +98,7 @@ class Preview(TQWidgetStack):
err = False err = False
try: try:
text = open(path.latin1(), "r").read() text = open(path.latin1(), "r").read()
except IOError, msg: except IOError as msg:
text = TQString(str(msg)) text = TQString(str(msg))
err = True err = True
if not err and fi.extension().lower().contains("htm"): if not err and fi.extension().lower().contains("htm"):
@ -159,8 +160,8 @@ class CustomFileDialog(TQFileDialog):
if os.path.exists(self.bookmarkFile): if os.path.exists(self.bookmarkFile):
try: try:
self.bookmarkList = pickle.loads(open(self.bookmarkFile, "rb").read()) self.bookmarkList = pickle.loads(open(self.bookmarkFile, "rb").read())
except IOError, msg: except IOError as msg:
print msg print(msg)
self.setDir("/") self.setDir("/")
self.dirView = DirectoryView(self, None, True) self.dirView = DirectoryView(self, None, True)
self.dirView.addColumn("") self.dirView.addColumn("")
@ -209,8 +210,8 @@ class CustomFileDialog(TQFileDialog):
if self.bookmarkList: if self.bookmarkList:
try: try:
open(self.bookmarkFile, "wb").write(pickle.dumps(self.bookmarkList)) open(self.bookmarkFile, "wb").write(pickle.dumps(self.bookmarkList))
except IOError, msg: except IOError as msg:
print msg print(msg)
return TQFileDialog.done(self, r) return TQFileDialog.done(self, r)
def showEvent(self, e): def showEvent(self, e):
@ -245,8 +246,8 @@ if __name__ == '__main__':
def usage(msg = None): def usage(msg = None):
if msg: if msg:
print >> sys.stderr, msg print(msg, file=sys.stderr)
print >> sys.stderr, """\ print("""\
usage: qdir [--any | --dir | --custom] [--preview] [--default f] {--filter f} [caption ...] usage: qdir [--any | --dir | --custom] [--preview] [--default f] {--filter f} [caption ...]
--any Get any filename, need not exist. --any Get any filename, need not exist.
--dir Return a directory rather than a file. --dir Return a directory rather than a file.
@ -256,7 +257,7 @@ usage: qdir [--any | --dir | --custom] [--preview] [--default f] {--filter f} [c
--default f Start from directory/file f. --default f Start from directory/file f.
--filter f eg. '*.gif' '*.bmp' --filter f eg. '*.gif' '*.bmp'
caption ... Caption for dialog. caption ... Caption for dialog.
""" """, file=sys.stderr)
sys.exit(1) sys.exit(1)
def main(): def main():
@ -270,7 +271,7 @@ usage: qdir [--any | --dir | --custom] [--preview] [--default f] {--filter f} [c
try: try:
optlist, args = getopt.getopt(sys.argv[1:], "h", options) optlist, args = getopt.getopt(sys.argv[1:], "h", options)
except getopt.error, msg: except getopt.error as msg:
usage(msg) usage(msg)
for opt, par in optlist: for opt, par in optlist:
@ -311,7 +312,7 @@ usage: qdir [--any | --dir | --custom] [--preview] [--default f] {--filter f} [c
fd.setCaption(caption) fd.setCaption(caption)
fd.setSelection(start) fd.setSelection(start)
if fd.exec_loop() == TQDialog.Accepted: if fd.exec_loop() == TQDialog.Accepted:
print "%s\n" % fd.selectedFile().latin1() print("%s\n" % fd.selectedFile().latin1())
return 0 return 0
else: else:
return 1 return 1

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 355 B

After

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

@ -11,9 +11,9 @@
***************************************************************************""" ***************************************************************************"""
import sys import sys
from qt import * from python_tqt.qt import *
INT_MAX = sys.maxint INT_MAX = sys.maxsize
class RangeControls( TQVBox ): class RangeControls( TQVBox ):
def __init__( self, parent=None, name=None ): def __init__( self, parent=None, name=None ):

@ -11,7 +11,7 @@
***************************************************************************""" ***************************************************************************"""
import sys import sys
from qt import * from python_tqt.qt import *
sayings = [ sayings = [
"<b>Saying 1:</b><br>" "<b>Saying 1:</b><br>"
@ -99,7 +99,7 @@ class MyRichText( TQVBox ):
self.connect( self.bClose, SIGNAL("clicked()"), tqApp, SLOT("quit()") ) self.connect( self.bClose, SIGNAL("clicked()"), tqApp, SLOT("quit()") )
self.connect( self.bPrev, SIGNAL("clicked()"), self.prev ) self.connect( self.bPrev, SIGNAL("clicked()"), self.prev )
self.connect( self.bNext, SIGNAL("clicked()"), self.next ) self.connect( self.bNext, SIGNAL("clicked()"), self.__next__ )
self.num = 0 self.num = 0
@ -112,7 +112,7 @@ class MyRichText( TQVBox ):
self.bPrev.setEnabled( False ) self.bPrev.setEnabled( False )
self.bNext.setEnabled( True ) self.bNext.setEnabled( True )
def next( self ): def __next__( self ):
self.num += 1 self.num += 1
if not sayings[self.num]: if not sayings[self.num]:
return return

@ -1,7 +1,7 @@
# This is part of the dragdrop example. # This is part of the dragdrop example.
from qt import * from python_tqt.qt 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 qt import TQThread from python_tqt.qt import TQThread
except: except:
print "Thread support not enabled" print("Thread support not enabled")
sys.exit(1) sys.exit(1)
from qt import * from python_tqt.qt import *
# The semaphore instances. # The semaphore instances.
@ -192,7 +192,7 @@ class SemaphoreExample(TQWidget):
del s del s
else: else:
print "Unknown custom event type:", event.type() print("Unknown custom event type:", event.type())
app = TQApplication(sys.argv) app = TQApplication(sys.argv)

@ -12,8 +12,8 @@
import sys import sys
import os import os
from qt import * from python_tqt.qt import *
from qttable import * from python_tqt.qttable 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 qt import * from python_tqt.qt 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):
@ -16,13 +16,13 @@ class Test(TQWidget):
y1 = 0 y1 = 0
y2 = self.height() - 1 y2 = self.height() - 1
x = (x1+x2)/2 x = int((x1+x2)/2)
p.drawLine(x, y1, x+d, y1+d) p.drawLine(x, y1, x+d, y1+d)
p.drawLine(x, y1, x-d, y1+d) p.drawLine(x, y1, x-d, y1+d)
p.drawLine(x, y2, x+d, y2-d) p.drawLine(x, y2, x+d, y2-d)
p.drawLine(x, y2, x-d, y2-d) p.drawLine(x, y2, x-d, y2-d)
y = (y1+y2)/2 y = int((y1+y2)/2)
p.drawLine(x1, y, x1+d, y+d) p.drawLine(x1, y, x1+d, y+d)
p.drawLine(x1, y, x1+d, y-d) p.drawLine(x1, y, x1+d, y-d)
p.drawLine(x2, y, x2-d, y+d) p.drawLine(x2, y, x2-d, y+d)

@ -11,7 +11,7 @@
***************************************************************************""" ***************************************************************************"""
import sys import sys
from qt import * from python_tqt.qt 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 qt import * from python_tqt.qt import *
from qttable import * from python_tqt.qttable import *
TRUE = 1 TRUE = 1
FALSE = 0 FALSE = 0
@ -53,6 +53,8 @@ class Table(TQTable):
# 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("QTDIR") qtdir = os.getenv("QTDIR")
if qtdir is None:
raise Exception("The QTDIR 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(qtdir, "src", i))
lst = TQStringList(dir.entryList("*.cpp; *.h")) lst = TQStringList(dir.entryList("*.cpp; *.h"))
@ -65,7 +67,7 @@ class Table(TQTable):
self.setNumRows(len(all) + 1) self.setNumRows(len(all) + 1)
i = 0 i = 0
sum = 0L sum = 0
# 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)
@ -82,11 +84,11 @@ class Table(TQTable):
if col < TB_SIZE or col > TB_FLAG: if col < TB_SIZE or col > TB_FLAG:
return return
sum = 0L sum = 0
for i in range(self.numRows()-1): for i in range(self.numRows()-1):
if str(self.text(i, TB_FLAG)) == "No": if str(self.text(i, TB_FLAG)) == "No":
continue continue
sum += long(str(self.text(i, TB_SIZE))) sum += int(str(self.text(i, TB_SIZE)))
self.displaySum(sum) self.displaySum(sum)
def displaySum(self, sum): def displaySum(self, sum):
@ -108,7 +110,7 @@ class Table(TQTable):
class TableItem(TQTableItem): class TableItem(TQTableItem):
def __init__(self, *args): def __init__(self, *args):
apply(TQTableItem.__init__, (self,) + args) TQTableItem.__init__(*(self,) + args)
def paint(self, p, cg, cr, selected): def paint(self, p, cg, cr, selected):
g = TQColorGroup(cg) g = TQColorGroup(cg)

@ -11,7 +11,7 @@
***************************************************************************""" ***************************************************************************"""
import sys import sys
from qt import * from python_tqt.qt import *
from random import random from random import random
class DynamicTip( TQToolTip ): class DynamicTip( TQToolTip ):
@ -76,7 +76,7 @@ class TellMe( TQWidget ):
self.r2 = self.randomRect() self.r2 = self.randomRect()
def randomRect( self ): def randomRect( self ):
return TQRect( random() * (self.width() - 20), random() * (self.height() - 20), 20, 20 ) return TQRect( int(random() * (self.width() - 20)), int(random() * (self.height() - 20)), 20, 20 )
def tip( self, p ): def tip( self, p ):

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

@ -3,7 +3,7 @@
# TQt tutorial 1. # TQt tutorial 1.
import sys import sys
import qt from python_tqt import qt
a = qt.TQApplication(sys.argv) a = qt.TQApplication(sys.argv)

@ -3,7 +3,7 @@
# TQt tutorial 10. # TQt tutorial 10.
import sys import sys
import qt from python_tqt import qt
class LCDRange(qt.TQVBox): class LCDRange(qt.TQVBox):
@ -27,7 +27,7 @@ class LCDRange(qt.TQVBox):
def setRange(self, minVal, maxVal): def setRange(self, minVal, maxVal):
if minVal < 0 or maxVal > 99 or minVal > maxVal: if minVal < 0 or maxVal > 99 or minVal > maxVal:
raise ValueError, "LCDRange.setRange(): invalid range" raise ValueError("LCDRange.setRange(): invalid range")
self.slider.setRange(minVal, maxVal) self.slider.setRange(minVal, maxVal)
@ -101,7 +101,7 @@ class MyWidget(qt.TQWidget):
quit = qt.TQPushButton("&Quit", self, "quit") quit = qt.TQPushButton("&Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.qApp, qt.SLOT("quit()")) self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()"))
self.angle = LCDRange(self, "angle") self.angle = LCDRange(self, "angle")
self.angle.setRange(5, 70) self.angle.setRange(5, 70)

@ -4,7 +4,7 @@
import sys import sys
import math import math
import qt from python_tqt import qt
class LCDRange(qt.TQVBox): class LCDRange(qt.TQVBox):
@ -28,7 +28,7 @@ class LCDRange(qt.TQVBox):
def setRange(self, minVal, maxVal): def setRange(self, minVal, maxVal):
if minVal < 0 or maxVal > 99 or minVal > maxVal: if minVal < 0 or maxVal > 99 or minVal > maxVal:
raise ValueError, "LCDRange.setRange(): invalid range" raise ValueError("LCDRange.setRange(): invalid range")
self.slider.setRange(minVal, maxVal) self.slider.setRange(minVal, maxVal)
@ -149,7 +149,7 @@ class CannonField(qt.TQWidget):
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 = qt.TQRect(0, 0, 6, 6)
r.moveCenter(qt.TQPoint(x, self.height() - 1 - y)) r.moveCenter(qt.TQPoint(int(x), int(self.height() - 1 - y)))
return r return r
def sizePolicy(self): def sizePolicy(self):
@ -162,7 +162,7 @@ class MyWidget(qt.TQWidget):
quit = qt.TQPushButton("&Quit", self, "quit") quit = qt.TQPushButton("&Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.qApp, qt.SLOT("quit()")) self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()"))
self.angle = LCDRange(self, "angle") self.angle = LCDRange(self, "angle")
self.angle.setRange(5, 70) self.angle.setRange(5, 70)

@ -5,7 +5,7 @@
import sys import sys
import math import math
import random import random
import qt from python_tqt import qt
class LCDRange(qt.TQVBox): class LCDRange(qt.TQVBox):
@ -36,7 +36,7 @@ class LCDRange(qt.TQVBox):
def setRange(self, minVal, maxVal): def setRange(self, minVal, maxVal):
if minVal < 0 or maxVal > 99 or minVal > maxVal: if minVal < 0 or maxVal > 99 or minVal > maxVal:
raise ValueError, "LCDRange.setRange(): invalid range" raise ValueError("LCDRange.setRange(): invalid range")
self.slider.setRange(minVal, maxVal) self.slider.setRange(minVal, maxVal)
@ -184,7 +184,7 @@ class CannonField(qt.TQWidget):
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 = qt.TQRect(0, 0, 6, 6)
r.moveCenter(qt.TQPoint(x, self.height() - 1 - y)) r.moveCenter(qt.TQPoint(int(x), int(self.height() - 1 - y)))
return r return r
def targetRect(self): def targetRect(self):
@ -202,7 +202,7 @@ class MyWidget(qt.TQWidget):
quit = qt.TQPushButton("&Quit", self, "quit") quit = qt.TQPushButton("&Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.qApp, qt.SLOT("quit()")) self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()"))
self.angle = LCDRange("ANGLE", self, "angle") self.angle = LCDRange("ANGLE", self, "angle")
self.angle.setRange(5, 70) self.angle.setRange(5, 70)

@ -5,7 +5,7 @@
import sys import sys
import math import math
import random import random
import qt from python_tqt import qt
class LCDRange(qt.TQWidget): class LCDRange(qt.TQWidget):
@ -41,7 +41,7 @@ class LCDRange(qt.TQWidget):
def setRange(self, minVal, maxVal): def setRange(self, minVal, maxVal):
if minVal < 0 or maxVal > 99 or minVal > maxVal: if minVal < 0 or maxVal > 99 or minVal > maxVal:
raise ValueError, "LCDRange.setRange(): invalid range" raise ValueError("LCDRange.setRange(): invalid range")
self.slider.setRange(minVal, maxVal) self.slider.setRange(minVal, maxVal)
@ -216,7 +216,7 @@ class CannonField(qt.TQWidget):
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 = qt.TQRect(0, 0, 6, 6)
r.moveCenter(qt.TQPoint(x, self.height() - 1 - y)) r.moveCenter(qt.TQPoint(int(x), int(self.height() - 1 - y)))
return r return r
def targetRect(self): def targetRect(self):
@ -237,7 +237,7 @@ class GameBoard(qt.TQWidget):
quit = qt.TQPushButton("&Quit", self, "quit") quit = qt.TQPushButton("&Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.qApp, qt.SLOT("quit()")) self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()"))
self.angle = LCDRange("ANGLE", self, "angle") self.angle = LCDRange("ANGLE", self, "angle")
self.angle.setRange(5, 70) self.angle.setRange(5, 70)

@ -5,7 +5,7 @@
import sys import sys
import math import math
import random import random
import qt from python_tqt import qt
class LCDRange(qt.TQWidget): class LCDRange(qt.TQWidget):
@ -41,7 +41,7 @@ class LCDRange(qt.TQWidget):
def setRange(self, minVal, maxVal): def setRange(self, minVal, maxVal):
if minVal < 0 or maxVal > 99 or minVal > maxVal: if minVal < 0 or maxVal > 99 or minVal > maxVal:
raise ValueError, "LCDRange.setRange(): invalid range" raise ValueError("LCDRange.setRange(): invalid range")
self.slider.setRange(minVal, maxVal) self.slider.setRange(minVal, maxVal)
@ -246,7 +246,7 @@ class CannonField(qt.TQWidget):
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 = qt.TQRect(0, 0, 6, 6)
r.moveCenter(qt.TQPoint(x, self.height() - 1 - y)) r.moveCenter(qt.TQPoint(int(x), int(self.height() - 1 - y)))
return r return r
def targetRect(self): def targetRect(self):
@ -277,7 +277,7 @@ class GameBoard(qt.TQWidget):
quit = qt.TQPushButton("&Quit", self, "quit") quit = qt.TQPushButton("&Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.qApp, qt.SLOT("quit()")) self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()"))
self.angle = LCDRange("ANGLE", self, "angle") self.angle = LCDRange("ANGLE", self, "angle")
self.angle.setRange(5, 70) self.angle.setRange(5, 70)
@ -316,7 +316,7 @@ class GameBoard(qt.TQWidget):
accel = qt.TQAccel(self) accel = qt.TQAccel(self)
accel.connectItem(accel.insertItem(qt.TQt.Key_Enter), self.fire) accel.connectItem(accel.insertItem(qt.TQt.Key_Enter), self.fire)
accel.connectItem(accel.insertItem(qt.TQt.Key_Return), self.fire) accel.connectItem(accel.insertItem(qt.TQt.Key_Return), self.fire)
accel.connectItem(accel.insertItem(qt.TQt.CTRL + qt.TQt.Key_Q), qt.qApp, qt.SLOT("quit()")) accel.connectItem(accel.insertItem(qt.TQt.CTRL + qt.TQt.Key_Q), qt.tqApp, qt.SLOT("quit()"))
grid = qt.TQGridLayout(self, 2, 2, 10) grid = qt.TQGridLayout(self, 2, 2, 10)
grid.addWidget(quit, 0, 0) grid.addWidget(quit, 0, 0)

@ -3,7 +3,7 @@
# TQt tutorial 2. # TQt tutorial 2.
import sys import sys
import qt from python_tqt import qt
a = qt.TQApplication(sys.argv) a = qt.TQApplication(sys.argv)

@ -3,7 +3,7 @@
# TQt tutorial 3. # TQt tutorial 3.
import sys import sys
import qt from python_tqt import qt
a = qt.TQApplication(sys.argv) a = qt.TQApplication(sys.argv)

@ -3,7 +3,7 @@
# TQt tutorial 4. # TQt tutorial 4.
import sys import sys
import qt from python_tqt import qt
class MyWidget(qt.TQWidget): class MyWidget(qt.TQWidget):
@ -17,7 +17,7 @@ class MyWidget(qt.TQWidget):
quit.setGeometry(62, 40, 75, 30) quit.setGeometry(62, 40, 75, 30)
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.qApp, qt.SLOT("quit()")) self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()"))
a = qt.TQApplication(sys.argv) a = qt.TQApplication(sys.argv)

@ -3,7 +3,7 @@
# TQt tutorial 5. # TQt tutorial 5.
import sys import sys
import qt from python_tqt import qt
class MyWidget(qt.TQVBox): class MyWidget(qt.TQVBox):
@ -13,7 +13,7 @@ class MyWidget(qt.TQVBox):
quit = qt.TQPushButton("Quit", self, "quit") quit = qt.TQPushButton("Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.qApp, qt.SLOT("quit()")) self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()"))
lcd = qt.TQLCDNumber(2, self, "lcd") lcd = qt.TQLCDNumber(2, self, "lcd")

@ -3,7 +3,7 @@
# TQt tutorial 6. # TQt tutorial 6.
import sys import sys
import qt from python_tqt import qt
class LCDRange(qt.TQVBox): class LCDRange(qt.TQVBox):
@ -24,7 +24,7 @@ class MyWidget(qt.TQVBox):
quit = qt.TQPushButton("Quit", self, "quit") quit = qt.TQPushButton("Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.qApp, qt.SLOT("quit()")) self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()"))
grid = qt.TQGrid(4, self) grid = qt.TQGrid(4, self)

@ -3,7 +3,7 @@
# TQt tutorial 7. # TQt tutorial 7.
import sys import sys
import qt from python_tqt import qt
class LCDRange(qt.TQVBox): class LCDRange(qt.TQVBox):
@ -31,7 +31,7 @@ class MyWidget(qt.TQVBox):
quit = qt.TQPushButton("Quit", self, "quit") quit = qt.TQPushButton("Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.qApp, qt.SLOT("quit()")) self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()"))
grid = qt.TQGrid(4, self) grid = qt.TQGrid(4, self)

@ -3,7 +3,7 @@
# TQt tutorial 8. # TQt tutorial 8.
import sys import sys
import qt from python_tqt import qt
class LCDRange(qt.TQVBox): class LCDRange(qt.TQVBox):
@ -27,7 +27,7 @@ class LCDRange(qt.TQVBox):
def setRange(self, minVal, maxVal): def setRange(self, minVal, maxVal):
if minVal < 0 or maxVal > 99 or minVal > maxVal: if minVal < 0 or maxVal > 99 or minVal > maxVal:
raise ValueError, "LCDRange.setRange(): invalid range" raise ValueError("LCDRange.setRange(): invalid range")
self.slider.setRange(minVal, maxVal) self.slider.setRange(minVal, maxVal)
@ -67,7 +67,7 @@ class MyWidget(qt.TQWidget):
quit = qt.TQPushButton("Quit", self, "quit") quit = qt.TQPushButton("Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.qApp, qt.SLOT("quit()")) self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()"))
self.angle = LCDRange(self, "angle") self.angle = LCDRange(self, "angle")
self.angle.setRange(5, 70) self.angle.setRange(5, 70)

@ -3,7 +3,7 @@
# TQt tutorial 9. # TQt tutorial 9.
import sys import sys
import qt from python_tqt import qt
class LCDRange(qt.TQVBox): class LCDRange(qt.TQVBox):
@ -27,7 +27,7 @@ class LCDRange(qt.TQVBox):
def setRange(self, minVal, maxVal): def setRange(self, minVal, maxVal):
if minVal < 0 or maxVal > 99 or minVal > maxVal: if minVal < 0 or maxVal > 99 or minVal > maxVal:
raise ValueError, "LCDRange.setRange(): invalid range" raise ValueError("LCDRange.setRange(): invalid range")
self.slider.setRange(minVal, maxVal) self.slider.setRange(minVal, maxVal)
@ -73,7 +73,7 @@ class MyWidget(qt.TQWidget):
quit = qt.TQPushButton("&Quit", self, "quit") quit = qt.TQPushButton("&Quit", self, "quit")
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold))
self.connect(quit, qt.SIGNAL("clicked()"), qt.qApp, qt.SLOT("quit()")) self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()"))
self.angle = LCDRange(self, "angle") self.angle = LCDRange(self, "angle")
self.angle.setRange(5, 70) self.angle.setRange(5, 70)

@ -8,8 +8,8 @@
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
from qt import * from python_tqt.qt import *
from qtaxcontainer import TQAxWidget from python_tqt.qtaxcontainer import TQAxWidget
image0_data = [ image0_data = [
"32 32 3 1", "32 32 3 1",
@ -1064,34 +1064,34 @@ class MainWindow(TQMainWindow):
def go(self): def go(self):
print "MainWindow.go(): Not implemented yet" print("MainWindow.go(): Not implemented yet")
def newWindow(self): def newWindow(self):
print "MainWindow.newWindow(): Not implemented yet" print("MainWindow.newWindow(): Not implemented yet")
def setProgress(self,a0,a1): def setProgress(self,a0,a1):
print "MainWindow.setProgress(int,int): Not implemented yet" print("MainWindow.setProgress(int,int): Not implemented yet")
def init(self): def init(self):
pass pass
def setTitle(self,a0): def setTitle(self,a0):
print "MainWindow.setTitle(const TQString&): Not implemented yet" print("MainWindow.setTitle(const TQString&): Not implemented yet")
def setCommandState(self,a0,a1): def setCommandState(self,a0,a1):
print "MainWindow.setCommandState(int,bool): Not implemented yet" print("MainWindow.setCommandState(int,bool): Not implemented yet")
def navigateComplete(self): def navigateComplete(self):
print "MainWindow.navigateComplete(): Not implemented yet" print("MainWindow.navigateComplete(): Not implemented yet")
def navigateBegin(self): def navigateBegin(self):
print "MainWindow.navigateBegin(): Not implemented yet" print("MainWindow.navigateBegin(): Not implemented yet")
def aboutSlot(self): def aboutSlot(self):
print "MainWindow.aboutSlot(): Not implemented yet" print("MainWindow.aboutSlot(): Not implemented yet")
def aboutTQtSlot(self): def aboutTQtSlot(self):
print "MainWindow.aboutTQtSlot(): Not implemented yet" print("MainWindow.aboutTQtSlot(): Not implemented yet")
def __tr(self,s,c = None): def __tr(self,s,c = None):
return tqApp.translate("MainWindow",s,c) return tqApp.translate("MainWindow",s,c)

@ -1,410 +1,410 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>MainWindow</class> <class>MainWindow</class>
<widget class="TQMainWindow"> <widget class="TQMainWindow">
<property name="name"> <property name="name">
<cstring>MainWindow</cstring> <cstring>MainWindow</cstring>
</property> </property>
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>812</width> <width>812</width>
<height>605</height> <height>605</height>
</rect> </rect>
</property> </property>
<property name="caption"> <property name="caption">
<string>TQt WebBrowser</string> <string>TQt WebBrowser</string>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<property name="margin"> <property name="margin">
<number>0</number> <number>0</number>
</property> </property>
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<widget class="TQFrame"> <widget class="TQFrame">
<property name="name"> <property name="name">
<cstring>Frame3</cstring> <cstring>Frame3</cstring>
</property> </property>
<property name="frameShape"> <property name="frameShape">
<enum>StyledPanel</enum> <enum>StyledPanel</enum>
</property> </property>
<property name="frameShadow"> <property name="frameShadow">
<enum>Sunken</enum> <enum>Sunken</enum>
</property> </property>
<vbox> <vbox>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<property name="margin"> <property name="margin">
<number>1</number> <number>1</number>
</property> </property>
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
<widget class="TQAxWidget"> <widget class="TQAxWidget">
<property name="name"> <property name="name">
<cstring>WebBrowser</cstring> <cstring>WebBrowser</cstring>
</property> </property>
<property name="focusPolicy"> <property name="focusPolicy">
<enum>StrongFocus</enum> <enum>StrongFocus</enum>
</property> </property>
<property name="control"> <property name="control">
<string>{8856F961-340A-11D0-A96B-00C04FD705A2}</string> <string>{8856F961-340A-11D0-A96B-00C04FD705A2}</string>
</property> </property>
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<menubar> <menubar>
<property name="name"> <property name="name">
<cstring>menubar</cstring> <cstring>menubar</cstring>
</property> </property>
<item text="&amp;File" name="PopupMenu"> <item text="&amp;File" name="PopupMenu">
<action name="FileNewGroup"/> <action name="FileNewGroup"/>
<item text="New" name="FileNewGroup_2" accel=""> <item text="New" name="FileNewGroup_2" accel="">
<action name="actionNewWindow"/> <action name="actionNewWindow"/>
</item> </item>
<separator/> <separator/>
<action name="actionFileClose"/> <action name="actionFileClose"/>
</item> </item>
<item text="&amp;Help" name="unnamed"> <item text="&amp;Help" name="unnamed">
<action name="actionAbout"/> <action name="actionAbout"/>
<action name="actionAboutTQt"/> <action name="actionAboutTQt"/>
</item> </item>
</menubar> </menubar>
<toolbars> <toolbars>
<toolbar dock="2"> <toolbar dock="2">
<property name="name"> <property name="name">
<cstring>Toolbar</cstring> <cstring>Toolbar</cstring>
</property> </property>
<property name="label"> <property name="label">
<string>Toolbar</string> <string>Toolbar</string>
</property> </property>
<action name="actionBack"/> <action name="actionBack"/>
<action name="actionForward"/> <action name="actionForward"/>
<action name="actionStop"/> <action name="actionStop"/>
<action name="actionRefresh"/> <action name="actionRefresh"/>
<action name="actionHome"/> <action name="actionHome"/>
<separator/> <separator/>
<action name="actionSearch"/> <action name="actionSearch"/>
</toolbar> </toolbar>
<toolbar dock="2"> <toolbar dock="2">
<property name="name"> <property name="name">
<cstring>Toolbar_2</cstring> <cstring>Toolbar_2</cstring>
</property> </property>
<property name="horizontallyStretchable"> <property name="horizontallyStretchable">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="label"> <property name="label">
<string>Toolbar_2</string> <string>Toolbar_2</string>
</property> </property>
<widget class="TQLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>lblAddress</cstring> <cstring>lblAddress</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>Address</string> <string>Address</string>
</property> </property>
</widget> </widget>
<widget class="TQLineEdit"> <widget class="TQLineEdit">
<property name="name"> <property name="name">
<cstring>addressEdit</cstring> <cstring>addressEdit</cstring>
</property> </property>
</widget> </widget>
<action name="actionGo"/> <action name="actionGo"/>
</toolbar> </toolbar>
</toolbars> </toolbars>
<customwidgets> <customwidgets>
</customwidgets> </customwidgets>
<actions> <actions>
<action> <action>
<property name="name"> <property name="name">
<cstring>actionGo</cstring> <cstring>actionGo</cstring>
</property> </property>
<property name="iconSet"> <property name="iconSet">
<iconset>image0</iconset> <iconset>image0</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Go</string> <string>Go</string>
</property> </property>
</action> </action>
<action> <action>
<property name="name"> <property name="name">
<cstring>actionBack</cstring> <cstring>actionBack</cstring>
</property> </property>
<property name="iconSet"> <property name="iconSet">
<iconset>image1</iconset> <iconset>image1</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Back</string> <string>Back</string>
</property> </property>
<property name="accel"> <property name="accel">
<string>Backspace</string> <string>Backspace</string>
</property> </property>
</action> </action>
<action> <action>
<property name="name"> <property name="name">
<cstring>actionForward</cstring> <cstring>actionForward</cstring>
</property> </property>
<property name="iconSet"> <property name="iconSet">
<iconset>image2</iconset> <iconset>image2</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Forward</string> <string>Forward</string>
</property> </property>
</action> </action>
<action> <action>
<property name="name"> <property name="name">
<cstring>actionStop</cstring> <cstring>actionStop</cstring>
</property> </property>
<property name="iconSet"> <property name="iconSet">
<iconset>image3</iconset> <iconset>image3</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Stop</string> <string>Stop</string>
</property> </property>
</action> </action>
<action> <action>
<property name="name"> <property name="name">
<cstring>actionRefresh</cstring> <cstring>actionRefresh</cstring>
</property> </property>
<property name="iconSet"> <property name="iconSet">
<iconset>image4</iconset> <iconset>image4</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Refresh</string> <string>Refresh</string>
</property> </property>
</action> </action>
<action> <action>
<property name="name"> <property name="name">
<cstring>actionHome</cstring> <cstring>actionHome</cstring>
</property> </property>
<property name="iconSet"> <property name="iconSet">
<iconset>image5</iconset> <iconset>image5</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Home</string> <string>Home</string>
</property> </property>
</action> </action>
<action> <action>
<property name="name"> <property name="name">
<cstring>actionFileClose</cstring> <cstring>actionFileClose</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>Close</string> <string>Close</string>
</property> </property>
<property name="menuText"> <property name="menuText">
<string>C&amp;lose</string> <string>C&amp;lose</string>
</property> </property>
</action> </action>
<actiongroup> <actiongroup>
<property name="name"> <property name="name">
<cstring>FileNewGroup</cstring> <cstring>FileNewGroup</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>New</string> <string>New</string>
</property> </property>
<property name="usesDropDown"> <property name="usesDropDown">
<bool>true</bool> <bool>true</bool>
</property> </property>
<action> <action>
<property name="name"> <property name="name">
<cstring>actionNewWindow</cstring> <cstring>actionNewWindow</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>Window</string> <string>Window</string>
</property> </property>
<property name="accel"> <property name="accel">
<string>Ctrl+N</string> <string>Ctrl+N</string>
</property> </property>
</action> </action>
</actiongroup> </actiongroup>
<action> <action>
<property name="name"> <property name="name">
<cstring>actionSearch</cstring> <cstring>actionSearch</cstring>
</property> </property>
<property name="iconSet"> <property name="iconSet">
<iconset>image6</iconset> <iconset>image6</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Search</string> <string>Search</string>
</property> </property>
</action> </action>
<action> <action>
<property name="name"> <property name="name">
<cstring>actionAbout</cstring> <cstring>actionAbout</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>About</string> <string>About</string>
</property> </property>
</action> </action>
<action> <action>
<property name="name"> <property name="name">
<cstring>actionAboutTQt</cstring> <cstring>actionAboutTQt</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>About TQt</string> <string>About TQt</string>
</property> </property>
</action> </action>
</actions> </actions>
<images> <images>
<image name="image0"> <image name="image0">
<data format="XPM.GZ" length="1241">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232365200210543251d2e253d856405bffcbc54103b11c8563600020b03105719c4b530b08072f50880513560a09c080338d5209420294a4451a38c90426621ab5146d10de524a2aa417505445122861a547722bb0c971a3d2aa921c2ae446c6a9431fc85a9064551220e354009653dec00294e712a1ac4e97078a9a9b5e6020013b3f563</data> <data format="XPM.GZ" length="1241">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232365200210543251d2e253d856405bffcbc54103b11c8563600020b03105719c4b530b08072f50880513560a09c080338d5209420294a4451a38c90426621ab5146d10de524a2aa417505445122861a547722bb0c971a3d2aa921c2ae446c6a9431fc85a9064551220e354009653dec00294e712a1ac4e97078a9a9b5e6020013b3f563</data>
</image> </image>
<image name="image1"> <image name="image1">
<data format="XPM.GZ" length="4494">789ce596497332470c86effe15947573a5f4c1cc30cc542a07ef60bc808dd7540e3d9b6df006186c93ca7f8fba2535ce57be98dc9292313c487a2575f7ccf063a376d53baa6dfc589bbe9ad7fbbc96df99496da3983d3e7efcfec76f7faead87418dfe1a51500bd67f595befbfd6f2daf1f35369014e08a05e6fd4ab96e31e73d0282bc7a7cae23ff3ccfe8170ca6cee9843f51f3b4ec8cff9efccdebf2d2cf9b06bb9417a25c74f98bdff99390a84fb8e49af70f39891b2e40bfbf8b6b0917e87968346a8f5a6cc51c07ab02f2cf1983237552f709c86691e3bbd5be5821998a32067bd1765d13f67563d530a4b3df8b01c523d8ec74059faed086bfc82390e851b8ed3c86485e34365a9bfc5ece3df8433e10bcb5140f5dd3cf0e099f32f99e350cecb5858f2b1c1dc52fda663d334a277c0ecfd5d61c9373973120967969b548fd71b079e797d8e985b21eb63aecceb85e7c299f4ffaa2ce7739359ebc195631387c6ad1f5e302791ccbba72cf173e15cfa2d2cc7619cf1fa63c9dccaa4ff4bcfdc7fa82cfdf7999348f6bf299c4bfd4c59ea0f99535dafca71d60a65ffebca52ff8c3989e47cce98351fb785759e7bcbad65bf0be624ca9a8e87caac0fb1702ef191b2cc9731a7b9ec4f87d934659e27e142f8c671e6eb9d0ae7b2be07cc6924ccf999698a7e4f58f572e64cebb9f393444994e68e4365d9ff7be15caef70766ad678cb0f8f18359ebe109b3af27f199fadd794cf254eb196599774758e77d5496f5dd64a67959af122ef87c639b59eb81d34ba97fe3f4215196f3922acbbc28acf527cc792c7a857029ecf63bcded05efb8a52cf3cc9833ed2f66563dac0b8b1ebe3317ea77f73352173db8f6ccf54a66df0f30fb7c777d9bc214d2cf88d9cf73cfece3ddf3296b66da7fe199d7a32b5cc8feef31fbfe8f99bdde96b0faddf3272bac390665b99e90d9e7ef33972de9d73d7ff3d873255c49fc1b73257ee4f8d2eb5d336b3e8e8535ff86d9e7bbf35f2cf51366ef77cfeb6299df62563f3c0a8b1fdcf3d3569778773f756e66f7fcac967e175f797ffff5dfd9ff4103010d6698a35955030b2cb1c25bbcc3fbd5344861882352b8c5077c5c45836678c267ca7fc1314ebeaf81537cc599eb608e6ff88e1f2b682c705314b6486182dbb8f31d0ddca529f644619ff2db641d3cf82a8bfa9d62d7da670d3cc4233c760a63eaa08d2734478fac8f87ffc833788a6738c073bc20ebe3255eb1069d863e5e3b851bacfb7c6b0d0c30c488f24a3a2d4ddaf1986a3d600b13179be280ef597809e876e206000c69d8ec0e590f32c8a18012b7a0825b9799e018eee0de4e0b4318c103ff2ea2985b78c47d28a487ce276b634cca40356d1655801c3bf044af2136e0195ef8b711be4045ab50ff42e16bdbb6463d8e610253fe3d4855ec3ed80abd9f62397ef9c9e6cee835249bc31bbc731ff0010beacbcdbfaca29f2836a3e839fd1f3acb5cb6fd6e13b6605b34766097d6664cdf0d7faad9813dd827df08daf4de812ddaa7061c4017baf43ea6daef70c8fb0247704c932dc897b94e67da09553a811ef4a94a0f4ee10c069435216b630ae7a43b800b7fc6164ea543ea73ea75663b22a50e5cc215ec50956beaf606ead08080147b64c76403d20ebdc6142268528d3655ee3a1db6f88b535ee015b42081d4205ee1f4f335878501ea7644331dc81acecdb7ef63b86b32eae59956cff63237f92af7319c9a82669c989256bd0b6fa6fabe86bbfe0ecdadb9a399ce61b49a86355adfbedd45736756bc27b30afd161a9a9179585de33bf69fd2f8ebd7b5bf014644b906</data> <data format="XPM.GZ" length="4494">789ce596497332470c86effe15947573a5f4c1cc30cc542a07ef60bc808dd7540e3d9b6df006186c93ca7f8fba2535ce57be98dc9292313c487a2575f7ccf063a376d53baa6dfc589bbe9ad7fbbc96df99496da3983d3e7efcfec76f7faead87418dfe1a51500bd67f595befbfd6f2daf1f35369014e08a05e6fd4ab96e31e73d0282bc7a7cae23ff3ccfe8170ca6cee9843f51f3b4ec8cff9efccdebf2d2cf9b06bb9417a25c74f98bdff99390a84fb8e49af70f39891b2e40bfbf8b6b0917e87968346a8f5a6cc51c07ab02f2cf1983237552f709c86691e3bbd5be5821998a32067bd1765d13f67563d530a4b3df8b01c523d8ec74059faed086bfc82390e851b8ed3c86485e34365a9bfc5ece3df8433e10bcb5140f5dd3cf0e099f32f99e350cecb5858f2b1c1dc52fda663d334a277c0ecfd5d61c9373973120967969b548fd71b079e797d8e985b21eb63aecceb85e7c299f4ffaa2ce7739359ebc195631387c6ad1f5e302791ccbba72cf173e15cfa2d2cc7619cf1fa63c9dccaa4ff4bcfdc7fa82cfdf7999348f6bf299c4bfd4c59ea0f99535dafca71d60a65ffebca52ff8c3989e47cce98351fb785759e7bcbad65bf0be624ca9a8e87caac0fb1702ef191b2cc9731a7b9ec4f87d934659e27e142f8c671e6eb9d0ae7b2be07cc6924ccf999698a7e4f58f572e64cebb9f393444994e68e4365d9ff7be15caef70766ad678cb0f8f18359ebe109b3af27f199fadd794cf254eb196599774758e77d5496f5dd64a67959af122ef87c639b59eb81d34ba97fe3f4215196f3922acbbc28acf527cc792c7a857029ecf63bcded05efb8a52cf3cc9833ed2f66563dac0b8b1ebe3317ea77f73352173db8f6ccf54a66df0f30fb7c777d9bc214d2cf88d9cf73cfece3ddf3296b66da7fe199d7a32b5cc8feef31fbfe8f99bdde96b0faddf3272bac390665b99e90d9e7ef33972de9d73d7ff3d873255c49fc1b73257ee4f8d2eb5d336b3e8e8535ff86d9e7bbf35f2cf51366ef77cfeb6299df62563f3c0a8b1fdcf3d3569778773f756e66f7fcac967e175f797ffff5dfd9ff4103010d6698a35955030b2cb1c25bbcc3fbd5344861882352b8c5077c5c45836678c267ca7fc1314ebeaf81537cc599eb608e6ff88e1f2b682c705314b6486182dbb8f31d0ddca529f644619ff2db641d3cf82a8bfa9d62d7da670d3cc4233c760a63eaa08d2734478fac8f87ffc833788a6738c073bc20ebe3255eb1069d863e5e3b851bacfb7c6b0d0c30c488f24a3a2d4ddaf1986a3d600b13179be280ef597809e876e206000c69d8ec0e590f32c8a18012b7a0825b9799e018eee0de4e0b4318c103ff2ea2985b78c47d28a487ce276b634cca40356d1655801c3bf044af2136e0195ef8b711be4045ab50ff42e16bdbb6463d8e610253fe3d4855ec3ed80abd9f62397ef9c9e6cee835249bc31bbc731ff0010beacbcdbfaca29f2836a3e839fd1f3acb5cb6fd6e13b6605b34766097d6664cdf0d7faad9813dd827df08daf4de812ddaa7061c4017baf43ea6daef70c8fb0247704c932dc897b94e67da09553a811ef4a94a0f4ee10c069435216b630ae7a43b800b7fc6164ea543ea73ea75663b22a50e5cc215ec50956beaf606ead08080147b64c76403d20ebdc6142268528d3655ee3a1db6f88b535ee015b42081d4205ee1f4f335878501ea7644331dc81acecdb7ef63b86b32eae59956cff63237f92af7319c9a82669c989256bd0b6fa6fabe86bbfe0ecdadb9a399ce61b49a86355adfbedd45736756bc27b30afd161a9a9179585de33bf69fd2f8ebd7b5bf014644b906</data>
</image> </image>
<image name="image2"> <image name="image2">
<data format="XPM.GZ" length="4494">789ce5965b4f23471085dff915d6d6db2aaac5e3b92aca037703cbc55c8c21ca43cf8c8d0dd85c6c307694ff9eeaaed3bd68771f968d14298a0a109fabebd4e99a9ef17cfad8e81d1f343e7e5a99cecc6c5435aaa1796a7cac9fc7e3c5ef7ffcf6e7ca8756d4909f661c35a20fbfac7ce8cc1a55e3f07ed2b7409702b4badaccfb996563020f5c7ecbf340b9a31c3591dff7ac7943e002cc8e73cf74acdcc27a8a2d37a5be4e1d9f04567f9fc105f25dcfea9726caad62a07c1158f58f94e3087e868ea57fa5fa0be590bfb11c3525affd4e03ebfa25b8507fbcaa1c47ca66e459fdf10c6c30af4dcfda8f5f9513dfffce71e1f5a956967adddfaeb25f4f7b60e8d199e596f42f6bc787ca213f554e5be06dc7a28ffdee282791cedb5c83d19fd795a55ecf4b3fb0ee07ebd312fae796e3283665e238524e2265de031bcc774d396d61be25b8c4fe1f02abfeab67f49f2867decfbd6393b6a03f03438f3bca19fa51cb33fc6f80fd7eae2c27e257e7cb4de5b4045f78d679f24960ddcfb172e6f73357ce63e88fc115ce43e558fcabbeb905fb7e47cae24ff5daca41af007bbd81e5b425f53aff6160d52f95f318f37d01a39ee7ca05f4790a469e0e1c97590bfa1b81f53c3e2bfbf5ecf697b532efe754398f31af437085eb65948b18e723f70cbf9e2bcc633db0f65b533609fcbafb372bf318fdcfc015e65b281731ee0ff6acf70767ca5e8f7be01abcab5cfa7e89e53cce2ba3fd1681b5df8172013f44e00acfbf4a39e8ef287b7dbe02234feefce795d727a36c12ccf75239d4b7c1bede9def42fcc0ef7960d5cbc05ebf543635aed752b94aa1ff02ee83ddf3b6a87c3d3f2b9b047a4fcaa17e0cf6f5eef928ab13f5476960d5eb7ac6f5dd07d7e04839e83d29d7be9ffbfe31b50dc723cfa87f08acf947e51a7ad457ee6760773ecaa4f47e36036bfd96673c3fb6c13578a01cf41f9505d5af3b2f655dc28fa93da33e550ef523e5e06f08861eb9e7b94cdfe7ddf753d50feb6f94437e00f67edcf3aa4e831ed8afe73bb05fefe655f7c37edcfd62bb81ddfb82935776cfeb41c87766ff2cfe7f1a4c6cb8e48ae91f68d4dce7015ff390473fad71c3b77cc7639ef03d3ffcb48f013ff293a84c79c6d54f693c8bc28b28589539bff2e2ed647e586389184bacf13a6ff0e6d71a32f92dde96bfdf9dbccc6387dba2d086caae4c668ff7bf68f0673ee0433ee263eef0099ff2199f8b62d0e32e5f704fea2fe5b70d3f57729556b91b349a1c718b634e64faa9fc7fc919e772220a91213254ca273b884bf72b4a54f1846ad925e93b1af56940d734a4110fe4efb5c40dddda907311734c7752d10b3a1ae289c634a17b7dafe331e995b3b124fbdfd25d85471763596fab7aa2a4f53d444653ded3773bb96e8faeae1de2ea8dff9da0b0ebfcd858e3357aa667bb1f68b4a5e7d256853559e8f56d64aefe85e6f44a0b5aea3bac5c2bebf74b8775fb6bfbb858771e7a6f1df09c36f89a36698bb6f53d5c4ef08ee4e6a2dd269b9d488729ed4a171b7bd40ece3228cce5d305edd3673ed7773139bd133a14d5233a96cff7a9237142a77446e7125dba900e70681564f5a6acdc1285ae9e0feaf150d675e8d2d59dd315ad52931fec2973d1a5489c6698e29c5a508829797bd629a52665bcf9fdd32ed95c1d50217b5c18b67390f34befb8e78873a9b6b39ad285216328a2de3bef5b32a59db5ccec42a6b565aaf7dffba6e663d3972b211ea86b065f3cbccbc7b53890399a21a55f677f5863e4f670c337df667f58e3d6dc99dbef3dd5ff6bdf73ff82c65fbfaefc0d4fb5b868</data> <data format="XPM.GZ" length="4494">789ce5965b4f23471085dff915d6d6db2aaac5e3b92aca037703cbc55c8c21ca43cf8c8d0dd85c6c307694ff9eeaaed3bd68771f968d14298a0a109fabebd4e99a9ef17cfad8e81d1f343e7e5a99cecc6c5435aaa1796a7cac9fc7e3c5ef7ffcf6e7ca8756d4909f661c35a20fbfac7ce8cc1a55e3f07ed2b7409702b4badaccfb996563020f5c7ecbf340b9a31c3591dff7ac7943e002cc8e73cf74acdcc27a8a2d37a5be4e1d9f04567f9fc105f25dcfea9726caad62a07c1158f58f94e3087e868ea57fa5fa0be590bfb11c3525affd4e03ebfa25b8507fbcaa1c47ca66e459fdf10c6c30af4dcfda8f5f9513dfffce71e1f5a956967adddfaeb25f4f7b60e8d199e596f42f6bc787ca213f554e5be06dc7a28ffdee282791cedb5c83d19fd795a55ecf4b3fb0ee07ebd312fae796e3283665e238524e2265de031bcc774d396d61be25b8c4fe1f02abfeab67f49f2867decfbd6393b6a03f03438f3bca19fa51cb33fc6f80fd7eae2c27e257e7cb4de5b4045f78d679f24960ddcfb172e6f73357ce63e88fc115ce43e558fcabbeb905fb7e47cae24ff5daca41af007bbd81e5b425f53aff6160d52f95f318f37d01a39ee7ca05f4790a469e0e1c97590bfa1b81f53c3e2bfbf5ecf697b532efe754398f31af437085eb65948b18e723f70cbf9e2bcc633db0f65b533609fcbafb372bf318fdcfc015e65b281731ee0ff6acf70767ca5e8f7be01abcab5cfa7e89e53cce2ba3fd1681b5df8172013f44e00acfbf4a39e8ef287b7dbe02234feefce795d727a36c12ccf75239d4b7c1bede9def42fcc0ef7960d5cbc05ebf543635aed752b94aa1ff02ee83ddf3b6a87c3d3f2b9b047a4fcaa17e0cf6f5eef928ab13f5476960d5eb7ac6f5dd07d7e04839e83d29d7be9ffbfe31b50dc723cfa87f08acf947e51a7ad457ee6760773ecaa4f47e36036bfd96673c3fb6c13578a01cf41f9505d5af3b2f655dc28fa93da33e550ef523e5e06f08861eb9e7b94cdfe7ddf753d50feb6f94437e00f67edcf3aa4e831ed8afe73bb05fefe655f7c37edcfd62bb81ddfb82935776cfeb41c87766ff2cfe7f1a4c6cb8e48ae91f68d4dce7015ff390473fad71c3b77cc7639ef03d3ffcb48f013ff293a84c79c6d54f693c8bc28b28589539bff2e2ed647e586389184bacf13a6ff0e6d71a32f92dde96bfdf9dbccc6387dba2d086caae4c668ff7bf68f0673ee0433ee263eef0099ff2199f8b62d0e32e5f704fea2fe5b70d3f57729556b91b349a1c718b634e64faa9fc7fc919e772220a91213254ca273b884bf72b4a54f1846ad925e93b1af56940d734a4110fe4efb5c40dddda907311734c7752d10b3a1ae289c634a17b7dafe331e995b3b124fbdfd25d85471763596fab7aa2a4f53d444653ded3773bb96e8faeae1de2ea8dff9da0b0ebfcd858e3357aa667bb1f68b4a5e7d256853559e8f56d64aefe85e6f44a0b5aea3bac5c2bebf74b8775fb6bfbb858771e7a6f1df09c36f89a36698bb6f53d5c4ef08ee4e6a2dd269b9d488729ed4a171b7bd40ece3228cce5d305edd3673ed7773139bd133a14d5233a96cff7a9237142a77446e7125dba900e70681564f5a6acdc1285ae9e0feaf150d675e8d2d59dd315ad52931fec2973d1a5489c6698e29c5a508829797bd629a52665bcf9fdd32ed95c1d50217b5c18b67390f34befb8e78873a9b6b39ad285216328a2de3bef5b32a59db5ccec42a6b565aaf7dffba6e663d3972b211ea86b065f3cbccbc7b53890399a21a55f677f5863e4f670c337df667f58e3d6dc99dbef3dd5ff6bdf73ff82c65fbfaefc0d4fb5b868</data>
</image> </image>
<image name="image3"> <image name="image3">
<data format="XPM.GZ" length="802">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232325500210543251d2e25658564056503300071f540dc3430007371012a492a830156496538c094848922c9c2259134c099304914e3604c8424aa5e6449b0044216ca824ba2da8b4512218b4d122e8b55520fee5974072164511da487ea490c7f22cba249e20d3efc018f3fcae0d2702eb5d2106992b5d65c00b9a48974</data> <data format="XPM.GZ" length="802">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232325500210543251d2e25658564056503300071f540dc3430007371012a492a830156496538c094848922c9c2259134c099304914e3604c8424aa5e6449b0044216ca824ba2da8b4512218b4d122e8b55520fee5974072164511da487ea490c7f22cba249e20d3efc018f3fcae0d2702eb5d2106992b5d65c00b9a48974</data>
</image> </image>
<image name="image4"> <image name="image4">
<data format="XPM.GZ" length="1241">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232365200210543251d2e253d856405bffcbc54105b19c8563600020b03103711c4b530b08072f50880513524ab518681443435ca984ae08ae06a94114a10ac443435ca3043904d4c4453a38ca604ae11590d9a0ab80bd0d46078914c35c4d885a608871a547f61f81d5d117a1862018930e5b8d5c0950c741a1b1e6a6aadb90086a9d853</data> <data format="XPM.GZ" length="1241">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232365200210543251d2e253d856405bffcbc54105b19c8563600020b03103711c4b530b08072f50880513524ab518681443435ca984ae08ae06a94114a10ac443435ca3043904d4c4453a38ca604ae11590d9a0ab80bd0d46078914c35c4d885a608871a547f61f81d5d117a1862018930e5b8d5c0950c741a1b1e6a6aadb90086a9d853</data>
</image> </image>
<image name="image5"> <image name="image5">
<data format="XPM.GZ" length="5598">789ca5985973db480ec7dff3295cc15b6a0b2351a428d6d63ef83e255bbe647b6a1fd02465dd872d9f53f3dd076c005dc926ce6a32eed8553f37fadf7fa0c1a69cdfbe6cdc9cb537befcf6e97145ab61be910fe861e34bf1349dbefdfedffffcf1e97323dae07f51bdbe117dfed7a7cfddd546bed199cfca0ae888016afeab62e8796ef110ee545caf05be16ae5bfc6ee096e7b6e756983f51b6f53b81257ecfb8eee7e9b162f66af1c78125fe48987f23f3fb81657e691cd5bddecc7316d555efd058f7eb2867aa771058f4de8c55cffb6dd4a34cf5b68d357e681c6515634db81a7e3ef59c35cccf5560bf9ef6953389c77660af074f15c751e05c38a6d81f2ef9f3a848f4e9d658f2c36b635dbfa54cc2383556bd33e12492fc70df38f1f3f8ae4cc2745a711285fda7caa4f95e06967a2d8c63f27a8fc2a60fa4acfa980a371b898f0767dc6cf8fdbc9f84c27e4de124d2fabe186b3dee8c75ff1365dbef2db0ccef0987fd2f2a6632fd576552fd2b63d57b08ecd7d39d70b321fd0560acfb6d1a4b7e3050764de7d79f08a70de937ea7b7689e68f4de1e0776e2c7ab8abecb47eb170aa7ee822b0e89f1b4b7fd24dc529abe9794f02cbf99e2b3badc7a5b1ee97089b3e0e8d253f3c364e253e5576120ff7c63a9f7966d2e771d358e75bca4ef3bb0e2cf9758db5fe47c6b21eeb81bd3f07c2ad58ebd130d67e6a194b3cf97e62b2fa24c67a1f5d2aab3f8781a53e17c6eaa7082cfa3de156acf9d5034b7e3563f1eb96c6eaf7c0b815fbf8d2739e3aedefb1b1de9723618b77a49cebf946c6e20f5f8d251e753e8b5bb9e74c980a4afc7a7fbf66b1ed8fb7c67a9ec7c2ad5cfd74038bdfa6b1f6cbd458fd2e84b358efbb0363f5b71358fccd8c33596f9c4bfddcc458fac78d8cf5797b3296f5f82c4c49e6f5c9bf9fb23ce41307967e3935d6f36c0b67b1ce3f188b5f3757367f5363b98fdc38b0cc0f8cf5f90bf3ea97028bfe50981289777d63edcf81b1c4439897f3c52d615738cfe0df371c1deb7db265acf98d8d253f7a50d67a60c758cfcbf4cc7f2fb0f8bf1736bfae30d6f35f1a4b3ce6c6e2df95ca85f6f7dc58f3db0e5c783e14e6ebc533e87e963fbe0873f9fd3cc97c91693fd028b0d4e3c558f3eb0b9b5f972bab3fe78c353f3056bfabc0e2371636bfe4cf9b29d1e76b69acfdb863accfd33cb0dc2fa7c6e2179e03cb79ae940b7dffbf1b6bfd1363f53b12367f581a6b3d1bca56df6e60a9bfc6e765def4ecef6bc7eafaf9e8d558fbb7a15ce87d7263acf7ffbdb1e40f33e1e0cf29ebfea8eb6d7ff29f17f8f4137dfe51d8fa0117ca65ee3fbfe3bd705116b2de9f775e3af50313e1a229f1f0682cf1b052e6e1d9dfbf1cddd4fd2363cdcfef5fb05b7d1f0c944bed4f67ac9f5f27c265bf4c3d9f07eefb787f1f96695eaa1e0a174d7d7f81b1ee4f81a5fe75e552d9bf1fca7e617e9e8d556f33b0c4fbcf5ffdb44c956bc6a2d75dfd6c2020fd3ce2ff69a0c31c0b2cff91461fef71804374bfaa81231ce3044b9ce2ecd734380fc2392e70890ff888bfa6f184cff8c24e5ef10ddf71f3a37c3ed6c015afdec26dfeb983bbb887fb78f0f734380fe031c7437f3247788c27d8fe713e1f6a1076f014cfb08be7ac7481977885d75c951fe4f3630dcea3c3eb7b9cc70d6b9ce12d9fee26de610debeb69b0fb578cb89a0d8c399711e794609373d9c39455f2b53466d8c20c17809c45cc7a3c00f011081cffccff379fef35388f1d0428a0c401f459e58c3d45700f0003cee71d8678fc730d7430e2557d3c8331f7568c37308129cc7006733e9d262c6008cb6ff3f94ea3c72bc678ca3f1fb80a637884154c71c974c55d72c91a4feca4fdf553f8ad46554d8e9ee30a9eb1efab31611f2ff0ca346427bb9c11e114debe7e7ebed328318702e7f0ce9dbee47a1c724655b745b0c94ea6b0c55519f059b98f73d19a6cc30eecc21eecfb7100877004c770026de8e070bdfe805338832e9cc3055cc2955f7b0d3de8f0cfebb5356ee016eea0c6a30e11342086049a907aadcd35355a90111250f5e5288706bfdb4bea572a78b49e06ddd3a0d2807a2502110d6944639ad09466ebf9e8ae684e0bf5b1a4075ab28f11ffa1df678dc7f57cb0c68a9ee899355e7c2ddbf40a31bdb1c63bcdfe86c6803669cb9f4555c76b38a76dcee57d5d1f5c8f1d5af0b9745581bb029a5c8f3eedd21eed73b70ebe56fa91061dd061f05139e9d1116b1cfb9aee55c4fcf6330d5cd289d778a6b65fdd831dea702e256b9cf2b974a84367d4fd580347744e17744957acc13e7cfc095d538f356ed8cd2ddd518dea147da4c1956890ffcf295ed5e4c83b4a59f182b9455935e3b801ab791c7fa4e188d7a4bcbee66353feaef9df8852ca2f3e9ee3ef73840f359cabfec22979f4ddbd1bf018ba118f318f899bf298b9b95bb8e537cffe9ffffef4171c39a0bf</data> <data format="XPM.GZ" length="5598">789ca5985973db480ec7dff3295cc15b6a0b2351a428d6d63ef83e255bbe647b6a1fd02465dd872d9f53f3dd076c005dc926ce6a32eed8553f37fadf7fa0c1a69cdfbe6cdc9cb537befcf6e97145ab61be910fe861e34bf1349dbefdfedffffcf1e97323dae07f51bdbe117dfed7a7cfddd546bed199cfca0ae888016afeab62e8796ef110ee545caf05be16ae5bfc6ee096e7b6e756983f51b6f53b81257ecfb8eee7e9b162f66af1c78125fe48987f23f3fb81657e691cd5bddecc7316d555efd058f7eb2867aa771058f4de8c55cffb6dd4a34cf5b68d357e681c6515634db81a7e3ef59c35cccf5560bf9ef6953389c77660af074f15c751e05c38a6d81f2ef9f3a848f4e9d658f2c36b635dbfa54cc2383556bd33e12492fc70df38f1f3f8ae4cc2745a711285fda7caa4f95e06967a2d8c63f27a8fc2a60fa4acfa980a371b898f0767dc6cf8fdbc9f84c27e4de124d2fabe186b3dee8c75ff1365dbef2db0ccef0987fd2f2a6632fd576552fd2b63d57b08ecd7d39d70b321fd0560acfb6d1a4b7e3050764de7d79f08a70de937ea7b7689e68f4de1e0776e2c7ab8abecb47eb170aa7ee822b0e89f1b4b7fd24dc529abe9794f02cbf99e2b3badc7a5b1ee97089b3e0e8d253f3c364e253e5576120ff7c63a9f7966d2e771d358e75bca4ef3bb0e2cf9758db5fe47c6b21eeb81bd3f07c2ad58ebd130d67e6a194b3cf97e62b2fa24c67a1f5d2aab3f8781a53e17c6eaa7082cfa3de156acf9d5034b7e3563f1eb96c6eaf7c0b815fbf8d2739e3aedefb1b1de9723618b77a49cebf946c6e20f5f8d251e753e8b5bb9e74c980a4afc7a7fbf66b1ed8fb7c67a9ec7c2ad5cfd74038bdfa6b1f6cbd458fd2e84b358efbb0363f5b71358fccd8c33596f9c4bfddcc458fac78d8cf5797b3296f5f82c4c49e6f5c9bf9fb23ce41307967e3935d6f36c0b67b1ce3f188b5f3757367f5363b98fdc38b0cc0f8cf5f90bf3ea97028bfe50981289777d63edcf81b1c4439897f3c52d615738cfe0df371c1deb7db265acf98d8d253f7a50d67a60c758cfcbf4cc7f2fb0f8bf1736bfae30d6f35f1a4b3ce6c6e2df95ca85f6f7dc58f3db0e5c783e14e6ebc533e87e963fbe0873f9fd3cc97c91693fd028b0d4e3c558f3eb0b9b5f972bab3fe78c353f3056bfabc0e2371636bfe4cf9b29d1e76b69acfdb863accfd33cb0dc2fa7c6e2179e03cb79ae940b7dffbf1b6bfd1363f53b12367f581a6b3d1bca56df6e60a9bfc6e765def4ecef6bc7eafaf9e8d558fbb7a15ce87d7263acf7ffbdb1e40f33e1e0cf29ebfea8eb6d7ff29f17f8f4137dfe51d8fa0117ca65ee3fbfe3bd705116b2de9f775e3af50313e1a229f1f0682cf1b052e6e1d9dfbf1cddd4fd2363cdcfef5fb05b7d1f0c944bed4f67ac9f5f27c265bf4c3d9f07eefb787f1f96695eaa1e0a174d7d7f81b1ee4f81a5fe75e552d9bf1fca7e617e9e8d556f33b0c4fbcf5ffdb44c956bc6a2d75dfd6c2020fd3ce2ff69a0c31c0b2cff91461fef71804374bfaa81231ce3044b9ce2ecd734380fc2392e70890ff888bfa6f184cff8c24e5ef10ddf71f3a37c3ed6c015afdec26dfeb983bbb887fb78f0f734380fe031c7437f3247788c27d8fe713e1f6a1076f014cfb08be7ac7481977885d75c951fe4f3630dcea3c3eb7b9cc70d6b9ce12d9fee26de610debeb69b0fb578cb89a0d8c399711e794609373d9c39455f2b53466d8c20c17809c45cc7a3c00f011081cffccff379fef35388f1d0428a0c401f459e58c3d45700f0003cee71d8678fc730d7430e2557d3c8331f7568c37308129cc7006733e9d262c6008cb6ff3f94ea3c72bc678ca3f1fb80a637884154c71c974c55d72c91a4feca4fdf553f8ad46554d8e9ee30a9eb1efab31611f2ff0ca346427bb9c11e114debe7e7ebed328318702e7f0ce9dbee47a1c724655b745b0c94ea6b0c55519f059b98f73d19a6cc30eecc21eecfb7100877004c770026de8e070bdfe805338832e9cc3055cc2955f7b0d3de8f0cfebb5356ee016eea0c6a30e11342086049a907aadcd35355a90111250f5e5288706bfdb4bea572a78b49e06ddd3a0d2807a2502110d6944639ad09466ebf9e8ae684e0bf5b1a4075ab28f11ffa1df678dc7f57cb0c68a9ee899355e7c2ddbf40a31bdb1c63bcdfe86c6803669cb9f4555c76b38a76dcee57d5d1f5c8f1d5af0b9745581bb029a5c8f3eedd21eed73b70ebe56fa91061dd061f05139e9d1116b1cfb9aee55c4fcf6330d5cd289d778a6b65fdd831dea702e256b9cf2b974a84367d4fd580347744e17744957acc13e7cfc095d538f356ed8cd2ddd518dea147da4c1956890ffcf295ed5e4c83b4a59f182b9455935e3b801ab791c7fa4e188d7a4bcbee66353feaef9df8852ca2f3e9ee3ef73840f359cabfec22979f4ddbd1bf018ba118f318f899bf298b9b95bb8e537cffe9ffffef4171c39a0bf</data>
</image> </image>
<image name="image6"> <image name="image6">
<data format="XPM.GZ" length="3742">789c8d96c9521c490c86ef3c458775734cc8ddd5b5c6c41c303b180cc60b66620eaacc2c9aa5599b7562de7da45fc5180c8e98fa39f091522e4a49c9bbb783bdedcdc1db77735733991d864198c8e5e06dbc9e4eeffffceb8fbfe7de64d9407f466531c8defc36f76667360883adb3d364c013051ae2039f8147266359068f4dc6740a2e4db05f05d726f0253898c017c6a3cc04ffafce79aa3af0143c36c17e055caa0aacbf06aeb2203e5f09ae4d185f75ce472de6e7737063c2fcb57356b702fed673e32c473d4bcf3760198f02e69325706b022f3a676df0f567e05035d1ed273dc79883e7c1d1045e70ae2456d84fd9738a589f0b703261bc72ae25e17ee4b0e7d8f3b5733374e603e32c37c11ff36970db12f193f7e07c1c6bec87c6e0c604ff0e1c4db03f36cec7e3a6f4fd2e38e779eee7bd05e7e350fa7e4fc0455ee6b84fb9eab913bfdf1c5ce5758efba54fffb1e75302d726f8af3817a5f8f922584cf06fc0211f951ebfd0b30afe07ce4510dfdf1e38e665e9f9f1e01c32cf1fda06a73c2f7c7eac5f8c8b61eef582f315b909dc82f1c17e07dc1459e5f1c77d953abb787e0ab832611cf957366dd9c707f556762a3fcf8673ddd6d8afdc1957b909fe98af2a65d4c787c08d09e3c8bfaad504f378de83a309e35fc049d9d747bda19c7dbe8f602d88d6fd11af3a33c1ffde398e02ec69178c0b04bb7fa12be03e08e7ab4b895e2f74ec1ca2e73f6d811b2d37df1feaa9969082f71ff4a73a98c01f9cdb3678fde27eea58f7f9cdc8bfba33c11efda2199ac01bcead048fd72678a4e9e3f6a86f6d172acc87fc69f290f9386f3d72f478a1bf348509fea8b7a66c9b80fec1a8b7a66a53f47cc2fe9b5ae77346fe35ad09e761703081d12f9b68c2fc57ce6d0c1e6fe463934ce0efc63234c11ffd5b4a13c66f9cb53d79fded832bcd27f47f5aeb59055e744eb1df3fe2251aeee4e7453f9264c27aa847b44f7f4f909fda3efb7ae30c5c84b65f1fef435b9a608ff7a4ad4c981ffb6b6b13d8fda5edfb37eff4dcb65e2f787f5a7cb0f7fd0413ecf13eb49d09f6783ff07cf97d8ec0a3f8d8df516f483faf07c45b1f27e9f30ff989e9fdbe11ff1034fd3c9eebe068c238fa9f6677f2fb27ac1f475dd3f97da25fc6c204be755673ef3f8db3360c1f1f824b13c651df2877c44fd0df511efe5ea39f44318151cf9a4e2ab0af870d63fee4dc55fdfe109f880ff3fb788a8ff98df733762630fa471aa6febda2839e5b3f0fe1bef4f18bc9fb01fa7dca4ce0bb9e5b671ef69c3cff18f99cc626d853cf551f3fe453ca531bbdde979cbb2c793e207f536102a39fa5ca0446bf4279f97b89feaabb5181511f38bedf2ffa47373461bdcfe0dc8471d46387860fc6fbaad155c11ef7a5d953747ede69cf2a30fe3fd06c5121fe88572726f8a37f68720ffbfdadf7ac02fb7e82098c7e85ebf2fde37dea92098cf7acc367bc33fbff7a6ecfc4c22d078eaac41d1ff0e4d7f66a7df84293e71ecfec858f9ee8d1fef8a9c733fb139ef2299ff1395ff0255fc167c233befee1f1cc3ef10ddff21ddff303cfabe77bd584177891971e3d7ed8db4e7b2df30aaff29a7aac3ff9ebe4a9bdf2067fe04ddee28ffafb36eff027de558fcfbaab2ffc95bf3db5578b3dfecefb3ce411673c56ceb9e0b23f47a5fbac7fb26f889988742f2a129e504b81a246e0c8ec293cb7a7441d0b1dd0840ee9883486744253bea4533a7bd5fe9c2ed4feb29fff4aff32a36b8dd5e92fe6bfa15bddcf1dddd303cd93c6911668aa2b5cbc363f3c16799f9630fbb2d20aadd21aadeb3d547a8617f6f0d8a00fb4495bfadb47daa61dfa84f977e933c597f64f6e6c9fbed057fa467bf49df669c8bb34a2eca53d8d35576ef88e722aa8a48a6a6a448320a20fd36bf3eb7f407c2c89efb5500f6422877224c77222533915e6b397fbd117f54ccee54275295732936bb9915bb9937b797869ff34e7649ecfe4bd2ce81a8bbc2a4bb2fc5a3dfe2c59915559fb75fdfe8f7affe7f7b97f011cdd9635</data> <data format="XPM.GZ" length="3742">789c8d96c9521c490c86ef3c458775734cc8ddd5b5c6c41c303b180cc60b66620eaacc2c9aa5599b7562de7da45fc5180c8e98fa39f091522e4a49c9bbb783bdedcdc1db77735733991d864198c8e5e06dbc9e4eeffffceb8fbfe7de64d9407f466531c8defc36f76667360883adb3d364c013051ae2039f8147266359068f4dc6740a2e4db05f05d726f0253898c017c6a3cc04ffafce79aa3af0143c36c17e055caa0aacbf06aeb2203e5f09ae4d185f75ce472de6e7737063c2fcb57356b702fed673e32c473d4bcf3760198f02e69325706b022f3a676df0f567e05035d1ed273dc79883e7c1d1045e70ae2456d84fd9738a589f0b703261bc72ae25e17ee4b0e7d8f3b5733374e603e32c37c11ff36970db12f193f7e07c1c6bec87c6e0c604ff0e1c4db03f36cec7e3a6f4fd2e38e779eee7bd05e7e350fa7e4fc0455ee6b84fb9eab913bfdf1c5ce5758efba54fffb1e75302d726f8af3817a5f8f922584cf06fc0211f951ebfd0b30afe07ce4510dfdf1e38e665e9f9f1e01c32cf1fda06a73c2f7c7eac5f8c8b61eef582f315b909dc82f1c17e07dc1459e5f1c77d953abb787e0ab832611cf957366dd9c707f556762a3fcf8673ddd6d8afdc1957b909fe98af2a65d4c787c08d09e3c8bfaad504f378de83a309e35fc049d9d747bda19c7dbe8f602d88d6fd11af3a33c1ffde398e02ec69178c0b04bb7fa12be03e08e7ab4b895e2f74ec1ca2e73f6d811b2d37df1feaa9969082f71ff4a73a98c01f9cdb3678fde27eea58f7f9cdc8bfba33c11efda2199ac01bcead048fd72678a4e9e3f6a86f6d172acc87fc69f290f9386f3d72f478a1bf348509fea8b7a66c9b80fec1a8b7a66a53f47cc2fe9b5ae77346fe35ad09e761703081d12f9b68c2fc57ce6d0c1e6fe463934ce0efc63234c11ffd5b4a13c66f9cb53d79fded832bcd27f47f5aeb59055e744eb1df3fe2251aeee4e7453f9264c27aa847b44f7f4f909fda3efb7ae30c5c84b65f1fef435b9a608ff7a4ad4c981ffb6b6b13d8fda5edfb37eff4dcb65e2f787f5a7cb0f7fd0413ecf13eb49d09f6783ff07cf97d8ec0a3f8d8df516f483faf07c45b1f27e9f30ff989e9fdbe11ff1034fd3c9eebe068c238fa9f6677f2fb27ac1f475dd3f97da25fc6c204be755673ef3f8db3360c1f1f824b13c651df2877c44fd0df511efe5ea39f44318151cf9a4e2ab0af870d63fee4dc55fdfe109f880ff3fb788a8ff98df733762630fa471aa6febda2839e5b3f0fe1bef4f18bc9fb01fa7dca4ce0bb9e5b671ef69c3cff18f99cc626d853cf551f3fe453ca531bbdde979cbb2c793e207f536102a39fa5ca0446bf4279f97b89feaabb5181511f38bedf2ffa47373461bdcfe0dc8471d46387860fc6fbaad155c11ef7a5d953747ede69cf2a30fe3fd06c5121fe88572726f8a37f68720ffbfdadf7ac02fb7e82098c7e85ebf2fde37dea92098cf7acc367bc33fbff7a6ecfc4c22d078eaac41d1ff0e4d7f66a7df84293e71ecfec858f9ee8d1fef8a9c733fb139ef2299ff1395ff0255fc167c233befee1f1cc3ef10ddff21ddff303cfabe77bd584177891971e3d7ed8db4e7b2df30aaff29a7aac3ff9ebe4a9bdf2067fe04ddee28ffafb36eff027de558fcfbaab2ffc95bf3db5578b3dfecefb3ce411673c56ceb9e0b23f47a5fbac7fb26f889988742f2a129e504b81a246e0c8ec293cb7a7441d0b1dd0840ee9883486744253bea4533a7bd5fe9c2ed4feb29fff4aff32a36b8dd5e92fe6bfa15bddcf1dddd303cd93c6911668aa2b5cbc363f3c16799f9630fbb2d20aadd21aadeb3d547a8617f6f0d8a00fb4495bfadb47daa61dfa84f977e933c597f64f6e6c9fbed057fa467bf49df669c8bb34a2eca53d8d35576ef88e722aa8a48a6a6a448320a20fd36bf3eb7f407c2c89efb5500f6422877224c77222533915e6b397fbd117f54ccee54275295732936bb9915bb9937b797869ff34e7649ecfe4bd2ce81a8bbc2a4bb2fc5a3dfe2c59915559fb75fdfe8f7affe7f7b97f011cdd9635</data>
</image> </image>
</images> </images>
<connections> <connections>
<connection> <connection>
<sender>actionHome</sender> <sender>actionHome</sender>
<signal>activated()</signal> <signal>activated()</signal>
<receiver>WebBrowser</receiver> <receiver>WebBrowser</receiver>
<slot>GoHome()</slot> <slot>GoHome()</slot>
</connection> </connection>
<connection> <connection>
<sender>actionRefresh</sender> <sender>actionRefresh</sender>
<signal>activated()</signal> <signal>activated()</signal>
<receiver>WebBrowser</receiver> <receiver>WebBrowser</receiver>
<slot>Refresh()</slot> <slot>Refresh()</slot>
</connection> </connection>
<connection> <connection>
<sender>actionStop</sender> <sender>actionStop</sender>
<signal>activated()</signal> <signal>activated()</signal>
<receiver>WebBrowser</receiver> <receiver>WebBrowser</receiver>
<slot>Stop()</slot> <slot>Stop()</slot>
</connection> </connection>
<connection> <connection>
<sender>actionForward</sender> <sender>actionForward</sender>
<signal>activated()</signal> <signal>activated()</signal>
<receiver>WebBrowser</receiver> <receiver>WebBrowser</receiver>
<slot>GoForward()</slot> <slot>GoForward()</slot>
</connection> </connection>
<connection> <connection>
<sender>actionBack</sender> <sender>actionBack</sender>
<signal>activated()</signal> <signal>activated()</signal>
<receiver>WebBrowser</receiver> <receiver>WebBrowser</receiver>
<slot>GoBack()</slot> <slot>GoBack()</slot>
</connection> </connection>
<connection> <connection>
<sender>actionGo</sender> <sender>actionGo</sender>
<signal>activated()</signal> <signal>activated()</signal>
<receiver>MainWindow</receiver> <receiver>MainWindow</receiver>
<slot>go()</slot> <slot>go()</slot>
</connection> </connection>
<connection> <connection>
<sender>actionFileClose</sender> <sender>actionFileClose</sender>
<signal>activated()</signal> <signal>activated()</signal>
<receiver>MainWindow</receiver> <receiver>MainWindow</receiver>
<slot>close()</slot> <slot>close()</slot>
</connection> </connection>
<connection> <connection>
<sender>actionSearch</sender> <sender>actionSearch</sender>
<signal>activated()</signal> <signal>activated()</signal>
<receiver>WebBrowser</receiver> <receiver>WebBrowser</receiver>
<slot>GoSearch()</slot> <slot>GoSearch()</slot>
</connection> </connection>
<connection> <connection>
<sender>addressEdit</sender> <sender>addressEdit</sender>
<signal>returnPressed()</signal> <signal>returnPressed()</signal>
<receiver>MainWindow</receiver> <receiver>MainWindow</receiver>
<slot>go()</slot> <slot>go()</slot>
</connection> </connection>
<connection> <connection>
<sender>WebBrowser</sender> <sender>WebBrowser</sender>
<signal>NavigateComplete(const TQString&amp;)</signal> <signal>NavigateComplete(const TQString&amp;)</signal>
<receiver>addressEdit</receiver> <receiver>addressEdit</receiver>
<slot>setText(const TQString&amp;)</slot> <slot>setText(const TQString&amp;)</slot>
</connection> </connection>
<connection> <connection>
<sender>WebBrowser</sender> <sender>WebBrowser</sender>
<signal>TitleChange(const TQString&amp;)</signal> <signal>TitleChange(const TQString&amp;)</signal>
<receiver>MainWindow</receiver> <receiver>MainWindow</receiver>
<slot>setTitle(const TQString&amp;)</slot> <slot>setTitle(const TQString&amp;)</slot>
</connection> </connection>
<connection> <connection>
<sender>WebBrowser</sender> <sender>WebBrowser</sender>
<signal>NavigateComplete(const TQString&amp;)</signal> <signal>NavigateComplete(const TQString&amp;)</signal>
<receiver>MainWindow</receiver> <receiver>MainWindow</receiver>
<slot>navigateComplete()</slot> <slot>navigateComplete()</slot>
</connection> </connection>
<connection> <connection>
<sender>WebBrowser</sender> <sender>WebBrowser</sender>
<signal>CommandStateChange(int,bool)</signal> <signal>CommandStateChange(int,bool)</signal>
<receiver>MainWindow</receiver> <receiver>MainWindow</receiver>
<slot>setCommandState(int,bool)</slot> <slot>setCommandState(int,bool)</slot>
</connection> </connection>
<connection> <connection>
<sender>WebBrowser</sender> <sender>WebBrowser</sender>
<signal>BeforeNavigate(const TQString&amp;,int,const TQString&amp;,const TQVariant&amp;,const TQString&amp;,bool&amp;)</signal> <signal>BeforeNavigate(const TQString&amp;,int,const TQString&amp;,const TQVariant&amp;,const TQString&amp;,bool&amp;)</signal>
<receiver>MainWindow</receiver> <receiver>MainWindow</receiver>
<slot>navigateBegin()</slot> <slot>navigateBegin()</slot>
</connection> </connection>
<connection> <connection>
<sender>actionStop</sender> <sender>actionStop</sender>
<signal>activated()</signal> <signal>activated()</signal>
<receiver>MainWindow</receiver> <receiver>MainWindow</receiver>
<slot>navigateComplete()</slot> <slot>navigateComplete()</slot>
</connection> </connection>
<connection> <connection>
<sender>actionNewWindow</sender> <sender>actionNewWindow</sender>
<signal>activated()</signal> <signal>activated()</signal>
<receiver>MainWindow</receiver> <receiver>MainWindow</receiver>
<slot>newWindow()</slot> <slot>newWindow()</slot>
</connection> </connection>
<connection> <connection>
<sender>actionAbout</sender> <sender>actionAbout</sender>
<signal>activated()</signal> <signal>activated()</signal>
<receiver>MainWindow</receiver> <receiver>MainWindow</receiver>
<slot>aboutSlot()</slot> <slot>aboutSlot()</slot>
</connection> </connection>
<connection> <connection>
<sender>actionAboutTQt</sender> <sender>actionAboutTQt</sender>
<signal>activated()</signal> <signal>activated()</signal>
<receiver>MainWindow</receiver> <receiver>MainWindow</receiver>
<slot>aboutTQtSlot()</slot> <slot>aboutTQtSlot()</slot>
</connection> </connection>
</connections> </connections>
<forwards> <forwards>
<forward>class TQProgressBar</forward> <forward>class TQProgressBar</forward>
</forwards> </forwards>
<variables> <variables>
<variable>TQProgressBar *pb;</variable> <variable>TQProgressBar *pb;</variable>
</variables> </variables>
<slots> <slots>
<slot>go()</slot> <slot>go()</slot>
<slot>newWindow()</slot> <slot>newWindow()</slot>
<slot>setProgress( int a, int b )</slot> <slot>setProgress( int a, int b )</slot>
<slot>init()</slot> <slot>init()</slot>
<slot>setTitle( const TQString &amp; title )</slot> <slot>setTitle( const TQString &amp; title )</slot>
<slot>setCommandState( int cmd, bool on )</slot> <slot>setCommandState( int cmd, bool on )</slot>
<slot>navigateComplete()</slot> <slot>navigateComplete()</slot>
<slot>navigateBegin()</slot> <slot>navigateBegin()</slot>
<slot>aboutSlot()</slot> <slot>aboutSlot()</slot>
<slot>aboutTQtSlot()</slot> <slot>aboutTQtSlot()</slot>
</slots> </slots>
<layoutdefaults spacing="6" margin="11"/> <layoutdefaults spacing="6" margin="11"/>
<includehints> <includes>
<includehint>qaxwidget.h</includehint> <include location="global" impldecl="in implementation">qaxwidget.h</include>
</includehints> </includes>
</UI> </UI>

@ -7,8 +7,8 @@
import sys import sys
import qt from python_tqt import qt
import qtaxcontainer from python_tqt import qtaxcontainer
import mainwindow import mainwindow

@ -2,7 +2,7 @@
import sys, string import sys, string
from qt import * from python_tqt.qt import *
# #
## Constructs an analog clock widget that uses an internal TQTimer. ## Constructs an analog clock widget that uses an internal TQTimer.
@ -18,7 +18,7 @@ def TQMIN( x, y ):
class AnalogClock( TQWidget ): class AnalogClock( TQWidget ):
def __init__( self, *args ): def __init__( self, *args ):
apply( TQWidget.__init__, (self,) + args ) TQWidget.__init__(*(self,) + args)
self.time = TQTime.currentTime() # get current time self.time = TQTime.currentTime() # get current time
internalTimer = TQTimer( self ) # create internal timer internalTimer = TQTimer( self ) # create internal timer
self.connect( internalTimer, SIGNAL("timeout()"), self.timeout ) self.connect( internalTimer, SIGNAL("timeout()"), self.timeout )
@ -74,7 +74,7 @@ class AnalogClock( TQWidget ):
class DigitalClock( TQLCDNumber ): class DigitalClock( TQLCDNumber ):
def __init__( self, *args ): def __init__( self, *args ):
apply( TQLCDNumber.__init__,(self,) + args ) TQLCDNumber.__init__(*(self,) + args)
self.showingColon = 0 self.showingColon = 0
self.setFrameStyle(TQFrame.Panel | TQFrame.Raised) self.setFrameStyle(TQFrame.Panel | TQFrame.Raised)
self.setLineWidth( 2 ) self.setLineWidth( 2 )
@ -112,7 +112,7 @@ class DigitalClock( TQLCDNumber ):
s[2] = ' ' s[2] = ' '
if s[0] == '0': if s[0] == '0':
s[0] = ' ' s[0] = ' '
s = string.join(s,'') s = ''.join(s)
self.display( s ) self.display( s )
def TQMIN( x, y ): def TQMIN( x, y ):
@ -130,7 +130,7 @@ MOVIEFILENAME = "trolltech.gif"
class WidgetView ( TQWidget ): class WidgetView ( TQWidget ):
def __init__( self, *args ): def __init__( self, *args ):
apply( TQWidget.__init__, (self,) + args ) TQWidget.__init__(*(self,) + args)
# Set the window caption/title # Set the window caption/title
self.setCaption( "TQt Widgets Demo Application" ) self.setCaption( "TQt Widgets Demo Application" )
@ -223,7 +223,7 @@ class WidgetView ( TQWidget ):
self.vbox.addSpacing( self.bg.fontMetrics().height() ) self.vbox.addSpacing( self.bg.fontMetrics().height() )
self.cb = range(3) self.cb = list(range(3))
self.cb[0] = TQCheckBox( self.bg ) self.cb[0] = TQCheckBox( self.bg )
self.cb[0].setText( "Read" ) self.cb[0].setText( "Read" )
self.vbox.addWidget( self.cb[0] ) self.vbox.addWidget( self.cb[0] )
@ -464,10 +464,10 @@ class WidgetView ( TQWidget ):
TQApplication.setPalette( p, TRUE ) TQApplication.setPalette( p, TRUE )
def lineEditTextChanged( self, newText ): def lineEditTextChanged( self, newText ):
self.msg.setText("Line edit text: " + unicode(newText)) self.msg.setText("Line edit text: " + str(newText))
def spinBoxValueChanged( self, valueText ): def spinBoxValueChanged( self, valueText ):
self.msg.setText("Spin box value: " + unicode(valueText)) self.msg.setText("Spin box value: " + str(valueText))
# All application events are passed throught this event filter. # All application events are passed throught this event filter.
# We're using it to display some information about a clicked # We're using it to display some information about a clicked

@ -1,11 +0,0 @@
To run these examples, make sure you have your PYTHONPATH environment variable
set if needed and explicitly set the path to python at the top of each script
if you don't have /usr/bin/env.
The examples are written for TQt v2.x.
A much better source of information about using PyTQt is Boudewijn Rempt's
book at http://stage.linuxports.com/projects/pyqt/.
Phil Thompson
phil@riverbankcomputing.co.uk

@ -1,457 +0,0 @@
#!/usr/bin/env python
# A port to PyTQt of the application example from TQt v2.x.
import sys, string
from qt import *
TRUE = 1
FALSE = 0
fileopen = [
' 16 13 5 1',
'. c #040404',
'# c #808304',
'a c None',
'b c #f3f704',
'c c #f3f7f3',
'aaaaaaaaa...aaaa',
'aaaaaaaa.aaa.a.a',
'aaaaaaaaaaaaa..a',
'a...aaaaaaaa...a',
'.bcb.......aaaaa',
'.cbcbcbcbc.aaaaa',
'.bcbcbcbcb.aaaaa',
'.cbcb...........',
'.bcb.#########.a',
'.cb.#########.aa',
'.b.#########.aaa',
'..#########.aaaa',
'...........aaaaa'
]
filesave = [
' 14 14 4 1',
'. c #040404',
'# c #808304',
'a c #bfc2bf',
'b c None',
'..............',
'.#.aaaaaaaa.a.',
'.#.aaaaaaaa...',
'.#.aaaaaaaa.#.',
'.#.aaaaaaaa.#.',
'.#.aaaaaaaa.#.',
'.#.aaaaaaaa.#.',
'.##........##.',
'.############.',
'.##.........#.',
'.##......aa.#.',
'.##......aa.#.',
'.##......aa.#.',
'b.............'
]
fileprint = [
' 16 14 6 1',
'. c #000000',
'# c #848284',
'a c #c6c3c6',
'b c #ffff00',
'c c #ffffff',
'd c None',
'ddddd.........dd',
'dddd.cccccccc.dd',
'dddd.c.....c.ddd',
'ddd.cccccccc.ddd',
'ddd.c.....c....d',
'dd.cccccccc.a.a.',
'd..........a.a..',
'.aaaaaaaaaa.a.a.',
'.............aa.',
'.aaaaaa###aa.a.d',
'.aaaaaabbbaa...d',
'.............a.d',
'd.aaaaaaaaa.a.dd',
'dd...........ddd'
]
class ABCentralWidget( TQWidget ):
def __init__( self, *args ):
apply( TQWidget.__init__, (self, ) + args )
self.mainGrid = TQGridLayout( self, 2, 1, 5, 5 )
self.setupTabWidget()
self.setupListView()
self.mainGrid.setRowStretch( 0, 0 )
self.mainGrid.setRowStretch( 1, 1 )
def save( self, filename ):
if not self.listView.firstChild():
return
f = TQFile( filename )
if not f.open( IO_WriteOnly ):
return
t = TQTextStream( f )
#it = TQListViewItemIterator( self.listView )
while not t.eof():
item = TQListViewItem( self.listView )
for i in range (0, 4):
t << item.text( i ) << '\n'
#for it in it.current():
#for i in range (0, 4):
#t << it.current().text[ i ] << "\n"
f.close()
def load( self, filename ):
self.listView.clear()
f = TQFile( filename )
if not f.open( IO_ReadOnly ):
return
t = TQTextStream( f )
while not t.eof():
item = TQListViewItem( self.listView )
for i in range (0, 4):
item.setText( i, t.readLine() )
f.close();
def setupTabWidget( self ):
self.tabWidget = TQTabWidget( self )
self.input = TQWidget( self.tabWidget )
self.grid1 = TQGridLayout( self.input, 2, 5, 5, 5 )
self.liFirstName = TQLabel( 'First &Name', self.input )
self.liFirstName.resize( self.liFirstName.sizeHint() )
self.grid1.addWidget( self.liFirstName, 0, 0 )
self.liLastName = TQLabel( '&Last Name', self.input )
self.liLastName.resize( self.liLastName.sizeHint() )
self.grid1.addWidget( self.liLastName, 0, 1 )
self.liAddress = TQLabel( '&Address', self.input )
self.liAddress.resize( self.liAddress.sizeHint() )
self.grid1.addWidget( self.liAddress, 0, 2 )
self.liEMail = TQLabel( '&E-Mail', self.input )
self.liEMail.resize( self.liEMail.sizeHint() )
self.grid1.addWidget( self.liEMail, 0, 3 )
self.add = TQPushButton( '&Add', self.input )
self.add.resize( self.add.sizeHint() )
self.grid1.addWidget( self.add, 0, 4 )
self.connect( self.add, SIGNAL( 'clicked()' ), self.addEntry )
self.iFirstName = TQLineEdit( self.input )
self.iFirstName.resize( self.iFirstName.sizeHint() )
self.grid1.addWidget( self.iFirstName, 1, 0 )
self.liFirstName.setBuddy( self.iFirstName )
self.iLastName = TQLineEdit( self.input )
self.iLastName.resize( self.iLastName.sizeHint() )
self.grid1.addWidget( self.iLastName, 1, 1 )
self.liLastName.setBuddy( self.iLastName )
self.iAddress = TQLineEdit( self.input )
self.iAddress.resize( self.iAddress.sizeHint() )
self.grid1.addWidget( self.iAddress, 1, 2 )
self.liAddress.setBuddy( self.iAddress )
self.iEMail = TQLineEdit( self.input )
self.iEMail.resize( self.iEMail.sizeHint() )
self.grid1.addWidget( self.iEMail, 1, 3 )
self.liEMail.setBuddy( self.iEMail )
self.change = TQPushButton( '&Change', self.input )
self.change.resize( self.change.sizeHint() )
self.grid1.addWidget( self.change, 1, 4 )
self.connect( self.change, SIGNAL( 'clicked()' ), self.changeEntry )
self.tabWidget.addTab( self.input, '&Add/Change Entry' )
# --------------------------------------
self.search = TQWidget( self )
self.grid2 = TQGridLayout( self.search, 2, 5, 5, 5 )
self.cFirstName = TQCheckBox( 'First &Name', self.search )
self.cFirstName.resize( self.cFirstName.sizeHint() )
self.grid2.addWidget( self.cFirstName, 0, 0 )
self.connect( self.cFirstName, SIGNAL( 'clicked()' ), self.toggleFirstName )
self.cLastName = TQCheckBox( '&Last Name', self.search )
self.cLastName.resize( self.cLastName.sizeHint() )
self.grid2.addWidget( self.cLastName, 0, 1 )
self.connect( self.cLastName, SIGNAL( 'clicked()' ), self.toggleLastName )
self.cAddress = TQCheckBox( '&Address', self.search )
self.cAddress.resize( self.cAddress.sizeHint() )
self.grid2.addWidget( self.cAddress, 0, 2 )
self.connect( self.cAddress, SIGNAL( 'clicked()' ), self.toggleAddress )
self.cEMail = TQCheckBox( '&E-Mail', self.search )
self.cEMail.resize( self.cEMail.sizeHint() )
self.grid2.addWidget( self.cEMail, 0, 3 )
self.connect( self.cEMail, SIGNAL( 'clicked()' ), self.toggleEMail )
self.sFirstName = TQLineEdit( self.search )
self.sFirstName.resize( self.sFirstName.sizeHint() )
self.grid2.addWidget( self.sFirstName, 1, 0 )
self.sLastName = TQLineEdit( self.search )
self.sLastName.resize( self.sLastName.sizeHint() )
self.grid2.addWidget( self.sLastName, 1, 1 )
self.sAddress = TQLineEdit( self.search )
self.sAddress.resize( self.sAddress.sizeHint() )
self.grid2.addWidget( self.sAddress, 1, 2 )
self.sEMail = TQLineEdit( self.search )
self.sEMail.resize( self.sEMail.sizeHint() )
self.grid2.addWidget( self.sEMail, 1, 3 )
self.find = TQPushButton( '&Find', self.search )
self.find.resize( self.find.sizeHint() )
self.grid2.addWidget( self.find, 1, 4 )
self.connect( self.find, SIGNAL( 'clicked()' ), self.findEntries )
self.cFirstName.setChecked( TRUE )
self.sFirstName.setEnabled( TRUE )
self.sLastName.setEnabled( FALSE )
self.sAddress.setEnabled( FALSE )
self.sEMail.setEnabled( FALSE )
self.tabWidget.addTab( self.search, "&Search" )
self.mainGrid.addWidget( self.tabWidget, 0, 0 )
def setupListView( self ):
self.listView = TQListView( self )
self.listView.addColumn( 'First Name' )
self.listView.addColumn( 'Last Name' )
self.listView.addColumn( 'Address' )
self.listView.addColumn( 'E-Mail' )
self.listView.setSelectionMode( TQListView.Extended )
self.connect( self.listView, SIGNAL( 'clicked( TQListViewItem* )' ), self.itemSelected )
self.mainGrid.addWidget( self.listView, 1, 0 )
self.listView.setAllColumnsShowFocus( TRUE )
def addEntry( self ):
if not self.iFirstName.text().isEmpty() or not self.iLastName.text().isEmpty() or \
not self.iAddress.text().isEmpty() or not self.iEMail.text().isEmpty() :
self.item = TQListViewItem( self.listView )
self.item.setText( 0, self.iFirstName.text() )
self.item.setText( 1, self.iLastName.text() )
self.item.setText( 2, self.iAddress.text() )
self.item.setText( 3, self.iEMail.text() )
self.iFirstName.setText( '' )
self.iLastName.setText( '' )
self.iAddress.setText( '' )
self.iEMail.setText( '' )
def changeEntry( self ):
self.item = self.listView.currentItem()
if self.item and ( not self.iFirstName.text().isEmpty() or not self.iLastName.text().isEmpty() or \
not self.iAddress.text().isEmpty() or not self.iEMail.text().isEmpty() ) :
self.item.setText( 0, self.iFirstName.text() )
self.item.setText( 1, self.iLastName.text() )
self.item.setText( 2, self.iAddress.text() )
self.item.setText( 3, self.iEMail.text() )
def selectionChanged( self ):
self.iFirstName.setText( '' )
self.iLastName.setText( '' )
self.iAddress.setText( '' )
self.iEMail.setText( '' )
def itemSelected( self, item ):
self.item.setSelected( TRUE )
self.item.repaint()
self.iFirstName.setText( item.text( 0 ) )
self.iLastName.setText( item.text( 1 ) )
self.iAddress.setText( item.text( 2 ) )
self.iEMail.setText( item.text( 3 ) )
def toggleFirstName( self ):
self.sFirstName.setText( '' )
if self.cFirstName.isChecked():
self.sFirstName.setEnabled( TRUE )
self.sFirstName.setFocus()
else:
self.sFirstName.setEnabled( FALSE )
def toggleLastName( self ):
self.sLastName.setText( '' )
if self.cLastName.isChecked():
self.sLastName.setEnabled( TRUE )
self.sLastName.setFocus()
else:
self.sLastName.setEnabled( FALSE )
def toggleAddress( self ):
self.sAddress.setText( '' )
if self.cAddress.isChecked():
self.sAddress.setEnabled( TRUE )
self.sAddress.setFocus()
else:
self.sAddress.setEnabled( FALSE )
def toggleEMail( self ):
self.sEMail.setText( '' )
if self.cEMail.isChecked():
self.sEMail.setEnabled( TRUE )
self.sEMail.setFocus()
else:
self.sEMail.setEnabled( FALSE )
def findEntries( self ):
if not self.cFirstName.isChecked() and not self.cLastName.isChecked() and \
not self.cAddress.isChecked() and not self.cEMail.isChecked():
self.listView.clearSelection()
return
it = TQListViewItemIterator( self.listView )
for it in it.current() :
select = TRUE
if self.cFirstName.isChecked():
if select and it.current().text( 0 ).contains( self.sFirstName.text() ):
select = TRUE
else:
select = FALSE
if self.cLastName.isChecked():
if select and it.current().text( 1 ).contains( self.sLastName.text() ):
select = TRUE
else:
select = FALSE
if self.cAddress.isChecked():
if select and it.current().text( 2 ).contains( self.sAddress.text() ):
select = TRUE
else:
select = FALSE
if self.cEMail.isChecked():
if select and it.current().text( 3 ).contains( self.sEMail.text() ):
select = TRUE
else:
select = FALSE
if select:
it.current().setSelected( TRUE )
else:
it.current().setSelected( FALSE )
it.current().repaint()
class ABMainWindow(TQMainWindow):
def __init__( self ):
TQMainWindow.__init__( self, None, 'example addressbook application' )
self.filename = TQString.null
self.setupMenuBar()
self.setupFileTools()
self.setupStatusBar()
self.setupCentralWidget()
def setupMenuBar( self ):
self.file = TQPopupMenu( self )
self.menuBar().insertItem( '&File', self.file )
openIcon = TQIconSet( TQPixmap( fileopen ) )
self.file.insertItem( 'New', self.fileNew, TQt.CTRL + TQt.Key_N )
self.file.insertItem( openIcon, 'Open', self.fileOpen, TQt.CTRL + TQt.Key_O )
self.file.insertSeparator()
saveIcon = TQIconSet( TQPixmap( filesave ) )
self.file.insertItem( saveIcon, 'Save', self.fileSave, TQt.CTRL + TQt.Key_S )
self.file.insertItem( 'Save As...', self.fileSaveAs )
self.file.insertSeparator()
printIcon = TQIconSet( TQPixmap( fileprint ) )
self.file.insertItem( printIcon, 'Print...', self.filePrint, TQt.CTRL + TQt.Key_P )
self.file.insertSeparator()
#self.file.insertItem( 'Close', self.closeWindow, TQt.CTRL + TQt.Key_W )
self.file.insertItem('Close', self, SLOT('close()'), TQt.CTRL+TQt.Key_W)
self.file.insertItem( 'Quit', tqApp, SLOT( 'quit()' ), TQt.CTRL + TQt.Key_Q )
def setupFileTools( self ):
pass
#self.fileTools = TQToolBar( self, 'file operations' )
def setupStatusBar( self ):
self.statusBar().message( "Ready", 2000 )
def setupCentralWidget( self ):
self.view = ABCentralWidget( self )
#self.view.show()
self.setCentralWidget( self.view )
def closeWindow( self ):
close()
def fileNew( self ):
pass
def fileOpen( self ):
fn = TQFileDialog.getOpenFileName( TQString.null, TQString.null, self )
if not fn.isEmpty():
self.filename = fn
self.view.load( self.filename )
def fileSave( self ):
if self.filename.isEmpty():
self.fileSaveAs()
return
self.view.save( self.filename )
def fileSaveAs( self ):
fn = TQFileDialog.getSaveFileName( TQString.null, TQString.null, self )
if not fn.isEmpty():
self.filename = fn
self.fileSave
def filePrint( self ):
pass
a = TQApplication( sys.argv )
mw = ABMainWindow()
#mw.setupMenuBar()
#mw.setupFileTools
#mw.setupStatusBar
#mw.setupCentralWidget
#view = ABCentralWidget()
#mw.setCentralWidget( view )
mw.setCaption( 'Addressbook 1' )
a.setMainWidget( mw )
mw.show()
a.connect( a, SIGNAL( 'lastWindowClosed()' ), a, SLOT( 'quit()' ) )
a.exec_loop()

@ -1,277 +0,0 @@
#!/usr/bin/env python
# A simple application.
import sys, string
from qt import *
fileopen = [
'16 13 5 1',
'. c #040404',
'# c #808304',
'a c None',
'b c #f3f704',
'c c #f3f7f3',
'aaaaaaaaa...aaaa',
'aaaaaaaa.aaa.a.a',
'aaaaaaaaaaaaa..a',
'a...aaaaaaaa...a',
'.bcb.......aaaaa',
'.cbcbcbcbc.aaaaa',
'.bcbcbcbcb.aaaaa',
'.cbcb...........',
'.bcb.#########.a',
'.cb.#########.aa',
'.b.#########.aaa',
'..#########.aaaa',
'...........aaaaa'
]
filesave = [
'14 14 4 1',
'. c #040404',
'# c #808304',
'a c #bfc2bf',
'b c None',
'..............',
'.#.aaaaaaaa.a.',
'.#.aaaaaaaa...',
'.#.aaaaaaaa.#.',
'.#.aaaaaaaa.#.',
'.#.aaaaaaaa.#.',
'.#.aaaaaaaa.#.',
'.##........##.',
'.############.',
'.##.........#.',
'.##......aa.#.',
'.##......aa.#.',
'.##......aa.#.',
'b.............'
]
fileprint = [
'16 14 6 1',
'. c #000000',
'# c #848284',
'a c #c6c3c6',
'b c #ffff00',
'c c #ffffff',
'd c None',
'ddddd.........dd',
'dddd.cccccccc.dd',
'dddd.c.....c.ddd',
'ddd.cccccccc.ddd',
'ddd.c.....c....d',
'dd.cccccccc.a.a.',
'd..........a.a..',
'.aaaaaaaaaa.a.a.',
'.............aa.',
'.aaaaaa###aa.a.d',
'.aaaaaabbbaa...d',
'.............a.d',
'd.aaaaaaaaa.a.dd',
'dd...........ddd'
]
fileOpenText = \
'''<img source="fileopen">
Click this button to open a <em>new file</em>.<br><br>
You can also select the <b>Open</b> command from the <b>File</b> menu.'''
fileSaveText = \
'''Click this button to save the file you are editing.<br><br>
You will be prompted for a filename.<br><br>
You can also select the <b>Save</b> command from the <b>File</b> menu.'''
filePrintText = \
'''Click this button to print the file you are editing.<br><br>
You can also select the <b>Print</b> command from the <b>File</b> menu.'''
editorList = []
class ApplicationWindow(TQMainWindow):
def __init__(self):
TQMainWindow.__init__(self,None,'example application main window',TQt.WDestructiveClose)
self.filename = TQString.null
self.printer = TQPrinter()
self.fileTools = TQToolBar(self,'file operations')
openIcon = TQPixmap(fileopen)
self.fileOpen = TQToolButton(openIcon,'Open File',TQString.null,self.load,self.fileTools,'open file')
saveIcon = TQPixmap(filesave)
self.fileSave = TQToolButton(saveIcon,'Save File',TQString.null,self.save,self.fileTools,'save file')
printIcon = TQPixmap(fileprint)
self.filePrint = TQToolButton(printIcon,'Print File',TQString.null,self.printDoc,self.fileTools,'print file')
TQWhatsThis.whatsThisButton(self.fileTools)
TQWhatsThis.add(self.fileOpen,fileOpenText)
TQMimeSourceFactory.defaultFactory().setPixmap('fileopen',openIcon)
TQWhatsThis.add(self.fileSave,fileSaveText)
TQWhatsThis.add(self.filePrint,filePrintText)
self.file = TQPopupMenu(self)
self.menuBar().insertItem('&File',self.file)
self.file.insertItem('&New',self.newDoc,TQt.CTRL + TQt.Key_N)
id = self.file.insertItem(TQIconSet(openIcon),'&Open',self.load,TQt.CTRL + TQt.Key_O)
self.file.setWhatsThis(id,fileOpenText)
id = self.file.insertItem(TQIconSet(saveIcon),'&Save',self.save,TQt.CTRL + TQt.Key_S)
self.file.setWhatsThis(id,fileSaveText)
id = self.file.insertItem('Save &as',self.saveAs)
self.file.setWhatsThis(id,fileSaveText)
self.file.insertSeparator()
id = self.file.insertItem(TQIconSet(printIcon),'&Print',self.printDoc,TQt.CTRL + TQt.Key_P)
self.file.setWhatsThis(id,filePrintText)
self.file.insertSeparator()
self.file.insertItem('&Close',self,SLOT('close()'),TQt.CTRL + TQt.Key_W)
self.file.insertItem('&Quit',tqApp,SLOT('closeAllWindows()'),TQt.CTRL + TQt.Key_Q)
self.help = TQPopupMenu(self)
self.menuBar().insertSeparator()
self.menuBar().insertItem('&Help',self.help)
self.help.insertItem('&About',self.about,TQt.Key_F1)
self.help.insertItem('About &TQt',self.aboutTQt)
self.e = TQMultiLineEdit(self,'editor')
self.e.setFocus()
self.setCentralWidget(self.e)
self.statusBar().message('Ready',2000)
self.resize(450,600)
def newDoc(self):
ed = ApplicationWindow()
ed.show()
editorList.append(ed)
def load(self):
fn = TQFileDialog.getOpenFileName(TQString.null,TQString.null,self)
if fn.isEmpty():
self.statusBar().message('Loading aborted',2000)
return
fileName = str(fn)
self.e.setAutoUpdate(0)
self.e.clear()
try:
f = open(fileName,'r')
except:
return
for l in f.readlines():
self.e.append(string.rstrip(l))
f.close()
self.e.setAutoUpdate(1)
self.e.repaint()
self.e.setEdited(0)
self.setCaption(fileName)
self.statusBar().message('Loaded document %s' % (fileName),2000)
def save(self):
if self.filename.isEmpty():
self.saveAs()
return
try:
f = open(str(self.filename),'w+')
except:
self.statusBar().message('Could not write to %s' % (self.filename),2000)
return
f.write(str(self.e.text()))
f.close()
self.e.setEdited(0)
self.setCaption(self.filename)
self.statusBar().message('File %s saved' % (self.filename),2000)
def saveAs(self):
fn = TQFileDialog.getSaveFileName(TQString.null,TQString.null,self)
if not fn.isEmpty():
self.filename = fn
self.save()
else:
self.statusBar().message('Saving aborted',2000)
def printDoc(self):
Margin = 10
pageNo = 1
if self.printer.setup(self):
self.statusBar().message('Printing...')
p = TQPainter()
p.begin(self.printer)
p.setFont(self.e.font())
yPos = 0
fm = p.fontMetrics()
metrics = TQPaintDeviceMetrics(self.printer)
for i in range(self.e.numLines):
if Margin + yPos > metrics.height() - Margin:
pageNo = pageNo + 1
self.statusBar().message('Printing (page %d)...' % (pageNo))
self.printer.newPage()
yPos = 0
p.drawText(Margin,Margin + yPos,metrics.width(),fm.lineSpacing(),TQt.ExpandTabs | TQt.DontClip,self.e.textLine(i))
yPos = yPos + fm.lineSpacing()
p.end()
self.statusBar().message('Printing completed',2000)
else:
self.statusBar().message('Printing aborted',2000)
def closeEvent(self,ce):
if not self.e.edited():
ce.accept()
return
rc = TQMessageBox.information(self,'TQt Application Example',
'The document has been changed since the last save.',
'Save Now','Cancel','Leave Anyway',0,1)
if rc == 0:
self.save()
ce.accept()
elif rc == 2:
ce.accept()
else:
ce.ignore()
def about(self):
TQMessageBox.about(self,'TQt Application Example',
'This example demonstrates simple use of TQMainWindow,\nTQMenuBar and TQToolBar.')
def aboutTQt(self):
TQMessageBox.aboutTQt(self,'TQt Application Example')
a = TQApplication(sys.argv)
mw = ApplicationWindow()
mw.setCaption('Document 1')
mw.show()
a.connect(a, SIGNAL('lastWindowClosed()'), a, SLOT('quit()'))
a.exec_loop()

@ -1,113 +0,0 @@
#!/usr/bin/env python
#/****************************************************************************
#** $Id: buttongroups.py,v 1.1.1.1 2002/06/04 23:04:42 phil Exp $
#**
#** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
#**
#** This file is part of an example program for TQt. This example
#** program may be used, distributed and modified without limitation.
#**
#*****************************************************************************/
import sys
from qt import *
TRUE = 1
FALSE = 0
##
# Creates all child widgets of the ButtonGroups window
##
class ButtonsGroups( TQWidget ):
def __init__( self, *args ):
apply( TQWidget.__init__, (self,) + args )
# Create Widgets which allow easy layouting
self.vbox = TQVBoxLayout( self )
self.box1 = TQHBoxLayout( self.vbox )
self.box2 = TQHBoxLayout( self.vbox )
# ------- first group
# Create an exclusive button group
self.grp1 = TQButtonGroup( 1, TQGroupBox.Horizontal, "Button Group 1 (exclusive)", self )
self.box1.addWidget( self.grp1 )
self.grp1.setExclusive( TRUE )
# insert 3 radiobuttons
self.rb11 = TQRadioButton( "&Radiobutton 1", self.grp1 )
self.rb11.setChecked( TRUE )
TQRadioButton( "R&adiobutton 2", self.grp1 )
TQRadioButton( "Ra&diobutton 3", self.grp1 )
# ------- second group
# Create a non-exclusive buttongroup
self.grp2 = TQButtonGroup( 1, TQGroupBox.Horizontal, "Button Group 2 (non-exclusive)", self )
self.box1.addWidget( self.grp2 )
self.grp2.setExclusive( FALSE )
# insert 3 checkboxes
TQCheckBox( "&Checkbox 1", self.grp2 )
self.cb12 = TQCheckBox( "C&heckbox 2", self.grp2 )
self.cb12.setChecked( TRUE )
self.cb13 = TQCheckBox( "Triple &State Button", self.grp2 )
self.cb13.setTristate( TRUE )
self.cb13.setChecked( TRUE )
# ------------ third group
# create a buttongroup which is exclusive for radiobuttons and non-exclusive for all other buttons
self.grp3 = TQButtonGroup( 1, TQGroupBox.Horizontal, "Button Group 3 (Radiobutton-exclusive)", self )
self.box2.addWidget( self.grp3 )
self.grp3.setRadioButtonExclusive( TRUE )
# insert three radiobuttons
self.rb21 = TQRadioButton( "Rad&iobutton 1", self.grp3 )
self.rb22 = TQRadioButton( "Radi&obutton 2", self.grp3 )
self.rb23 = TQRadioButton( "Radio&button 3", self.grp3 )
self.rb23.setChecked( TRUE )
# insert a checkbox...
self.state = TQCheckBox( "E&nable Radiobuttons", self.grp3 )
self.state.setChecked( TRUE )
# ...and connect its SIGNAL clicked() with the SLOT slotChangeGrp3State()
self.connect( self.state, SIGNAL( "clicked()" ), self.slotChangeGrp3State )
# ------------ fourth group
# create a groupbox which layouts its childs in a columns
self.grp4 = TQButtonGroup( 1, TQGroupBox.Horizontal, "Groupbox with normal buttons", self )
self.box2.addWidget( self.grp4 )
# insert two pushbuttons...
TQPushButton( "&Push Button", self.grp4 )
self.tb = TQPushButton( "&Toggle Button", self.grp4 )
# ... and make the second one a toggle button
self.tb.setToggleButton( TRUE )
self.tb.setOn( TRUE )
#
# SLOT slotChangeGrp3State()
# enables/disables the radiobuttons of the third buttongroup
#
def slotChangeGrp3State( self ):
self.rb21.setEnabled( self.state.isChecked() )
self.rb22.setEnabled( self.state.isChecked() )
self.rb23.setEnabled( self.state.isChecked() )
## main program
a = TQApplication( sys.argv )
buttonsgroups = ButtonsGroups()
buttonsgroups.resize( 500, 250 )
buttonsgroups.setCaption( "Examples for Buttons and Groups" )
a.setMainWidget( buttonsgroups )
buttonsgroups.show()
a.exec_loop()

@ -1,219 +0,0 @@
#!/usr/bin/env python
import sys
from qt import *
seed = 0.353535353535
KINDA_RAND_MAX = 32767
def kindaRand():
global seed
seed = seed * 147
seed = seed - int(seed)
return int(seed*(KINDA_RAND_MAX + 1))
velmax = 15
velmin = 4
def velocity(i):
if i == 1 or i == 2:
i = (kindaRand()&0x7fff % velmax)/3 + velmin
else:
i = (kindaRand()&0x7fff % velmax) + velmin
maxpoints = 5
maxcurves = 8
def poly():
d = TQApplication.desktop()
d.setBackgroundColor(white)
xvel = [ 0 ] * 8
yvel = [ 0 ] * 8
head = 0
tail = -maxcurves + 2
a = TQPointArray() * maxcurves
r = d.rect()
for i in range(maxcurves):
a[i].resize(maxpoints)
p = a[0]
for i in range(maxpoints):
p.setPoint(i, (kindaRand()&0x7fff) % r.width(),
(kindaRand()&0x7fff) % r.height() )
xvel[i] = velocity(i)
yvel[i] = velocity(i)
paint = TQPainter()
paint.begin(d)
for ntimes in range(2000):
paint.setBrush(TQColor(kindaRand()%360,180,255, TQColor.Hsv))
paint.drawPolygon(a[head])
tail = tail + 1
if tail >= maxcurves:
tail = 0
minx = r.left()
maxx = r.right()
miny = r.top()
maxy = r.bottom()
p = a[head]
head = head + 1
if head >= maxcurves:
head = 0
for i in range(maxpoints):
x, y = p.point(i)
x = x + xvel[i]
y = y + yvel[i]
if x >= maxx:
x = maxx - (x - maxx + 1)
xvel[i] = -velocity(i)
if x <= minx:
x = minx + (minx - x + 1)
xvel[i] = velocity(i)
if y >= maxy:
y = maxy - (y - maxy + 1)
yvel[i] = -velocity(i)
if y <= miny:
y = miny + (miny - y + 1)
yvel[i] = velocity(i)
a[head].setPoint(i, x, y)
paint.end()
def rotate():
w = 64
h = 64
image = TQImage(w, h, 8, 128)
for i in range(128):
image.setColor(i, tqRgb(i,0,0))
for y in range(h):
for x in range(w):
image.setPixel(x,y,(x+y)%128)
pm = TQPixmap()
pm.convertFromImage(image)
#pm.optimize(1)
d = TQApplication.desktop()
for i in range(0,361,2):
m = TQWMatrix()
m.rotate(i)
rpm = pm.xForm(m)
d.setBackgroundPixmap(rpm)
d.update()
def generateStone(pm, c1, c2, c3):
p = TQPainter()
p1 = TQPen(c1, 0)
p2 = TQPen(c2, 0)
p3 = TQPen(c3, 0)
p.begin(pm)
for i in range(pm.width()):
for j in range(pm.height()):
r = kindaRand()
if r < KINDA_RAND_MAX / 3:
p.setPen(p1)
elif r < KINDA_RAND_MAX / 3 * 2:
p.setPen(p2)
else:
p.setPen(p3)
p.drawPoint(i, j)
p.end()
def drawShadeText(p, x, y, text, topColor, bottomColor, sw=2):
if not p.isActive():
return
p.setPen(bottomColor)
p.drawText(x+sw, y+sw, text)
p.setPen(topColor)
p.drawText(x, y, text)
class DesktopWidget(TQWidget):
def __init__(self, s, parent=None, name=''):
TQWidget.__init__(self, parent, name, WType_Desktop | WPaintDesktop)
self.text = s
self.pm = None
def paintEvent(self, pe):
c1 = self.backgroundColor()
c2 = c1.light(104)
c3 = c1.dark(106)
if not self.pm:
self.pm = TQPixmap(64, 64)
generateStone(self.pm, c1, c2, c3)
self.setBackgroundPixmap(self.pm)
self.update()
br = self.fontMetrics().boundingRect(self.text)
offscreen = TQPixmap(br.width(), br.height())
x = self.width()/2 - br.width()/2
y = self.height()/2 - br.height()/2
offscreen.fill(self, x, y)
p = TQPainter()
p.begin(offscreen)
drawShadeText(p, -br.x(), -br.y(), self.text, c2, c3, 3)
p.end()
bitBlt(self, x, y, offscreen)
def desktopWidget(s='Troll Tech'):
t = DesktopWidget(s)
t.update()
tqApp.exec_loop()
def desktopText(s='Troll Tech'):
border = 20
c1 = tqApp.palette().normal().background()
c2 = c1.light(104)
c3 = c1.dark(106)
pm = TQPixmap(10, 10)
p = TQPainter()
p.begin(pm)
r = p.fontMetrics().boundingRect(s)
p.end()
appWidth = tqApp.desktop().width()
appHeight = tqApp.desktop().height()
if r.width() > appWidth - border*2:
r.setWidth(appWidth - border*2)
if r.height() > appHeight - border*2:
r.setHeight(appHeight - border*2)
pm.resize(r.size().width()+border*2,r.size().height()+border*2)
generateStone(pm, c1, c2, c3)
p.begin(pm)
drawShadeText(p, -r.x()+border, -r.y()+border, s, c2, c3)
p.end()
tqApp.desktop().setBackgroundPixmap(pm)
a = TQApplication(sys.argv)
if len(sys.argv) > 1:
f = TQFont('charter', 96, TQFont.Weight.Black)
f.setStyleHint(TQFont.StyleHint.Times)
a.setFont(f)
validOptions = 0
if len(sys.argv) == 2:
validOptions = 1
if sys.argv[1] == '-poly':
poly()
elif sys.argv[1] == '-rotate':
rotate()
elif sys.argv[1] == '-troll':
desktopText()
elif sys.argv[1] == '-trollwidget':
desktopWidget()
else:
validOptions = 0
if len(sys.argv) == 3:
validOptions = 1
if sys.argv[1] == '-shadetext':
desktopText(sys.argv[2])
elif sys.argv[1] == '-shadewidget':
desktopWidget(sys.argv[2])
else:
validOptions = 0
if not validOptions:
rotate()

@ -1,76 +0,0 @@
#!/usr/bin/env python
import sys
from qt import *
class Directory(TQListViewItem):
def __init__(self, parent, name=None):
apply(TQListViewItem.__init__,(self,parent))
if isinstance(parent, TQListView):
self.p = None
self.f = '/'
else:
self.p = parent
self.f = name
self.c = []
self.readable = 1
def setOpen(self, o):
if o and not self.childCount():
s = self.fullName()
thisDir = TQDir(s)
if not thisDir.isReadable():
self.readable = 0
return
files = thisDir.entryInfoList()
if files:
for f in files:
fileName = str(f.fileName())
if fileName == '.' or fileName == '..':
continue
elif f.isSymLink():
d = TQListViewItem(self, fileName, 'Symbolic Link')
elif f.isDir():
d = Directory(self, fileName)
else:
if f.isFile():
s = 'File'
else:
s = 'Special'
d = TQListViewItem(self, fileName, s)
self.c.append(d)
TQListViewItem.setOpen(self, o)
def setup(self):
self.setExpandable(1)
TQListViewItem.setup(self)
def fullName(self):
if self.p:
s = self.p.fullName() + self.f + '/'
else:
s = '/'
return s
def text(self, column):
if column == 0:
return self.f
elif self.readable:
return 'Directory'
else:
return 'Unreadable Directory'
a = TQApplication(sys.argv)
mw = TQListView()
a.setMainWidget(mw)
mw.setCaption('Directory Browser')
mw.addColumn('Name')
mw.addColumn('Type')
mw.resize(400, 400)
mw.setTreeStepSize(20)
root = Directory(mw)
root.setOpen(1)
mw.show()
a.exec_loop()

@ -1,57 +0,0 @@
#!/usr/bin/env python
# Ported to PyTQt by Issac Trotts on Jan 1, 2002
import sys
from qt import *
import dropsite, secret
def addStuff( parent, yn_image, yn_secret = 0 ):
tll = TQVBoxLayout( parent, 10 )
d = dropsite.DropSite( parent, 'dropsite' )
d.setFrameStyle( TQFrame.Sunken + TQFrame.WinPanel )
tll.addWidget( d )
if yn_image:
stuff = TQPixmap()
if not stuff.load( "trolltech.bmp" ):
stuff = TQPixmap(20,20)
stuff.fill(TQt.green)
d.setPixmap( stuff )
else:
d.setText("Drag and Drop")
d.setFont(TQFont("Helvetica",18))
if secret:
s = secret.SecretSource( 42, parent )
tll.addWidget( s )
format = TQLabel( "\n\n\n\nNone\n\n\n\n", parent )
tll.addWidget( format )
tll.activate()
parent.resize( parent.sizeHint() )
TQObject.connect( d, PYSIGNAL('message(TQString &)'),
format, SLOT('setText(TQString &)') )
app = TQApplication( sys.argv )
mw = TQWidget()
addStuff( mw, 1 )
mw.setCaption( "TQt Example - Drag and Drop" )
mw.show()
mw2 = TQWidget()
addStuff( mw2, 0 )
mw2.setCaption( "TQt Example - Drag and Drop" )
mw2.show()
mw3 = TQWidget()
addStuff( mw3, 1, 1 )
mw3.setCaption( "TQt Example - Drag and Drop" )
mw3.show()
TQObject.connect(tqApp,SIGNAL('lastWindowClosed()'),tqApp,SLOT('quit()'))
app.exec_loop()

@ -1,96 +0,0 @@
# This is part of the dragdrop example.
from qt import *
import secret
class DropSite(TQLabel):
def __init__(self, parent=None, name=None):
TQLabel.__init__( self, parent, name )
self.setAcceptDrops(1)
# this is a normal event
def mousePressEvent( self, e ):
if ( self.pixmap() ) :
drobj = TQImageDrag( self.pixmap().convertToImage(), self )
pm = TQPixmap()
pm.convertFromImage(self.pixmap().convertToImage().smoothScale(
self.pixmap().width()/3,self.pixmap().height()/3))
drobj.setPixmap(pm,TQPoint(-5,-7))
else :
drobj = TQTextDrag( self.text(), self )
drobj.dragCopy()
def backgroundColorChange( self, qcolor ):
# Reduce flicker by using repaint() rather than update()
self.repaint()
def dragMoveEvent( self, e ):
# Check if you want the drag at e.pos()...
# Give the user some feedback...
pass
def dragEnterEvent( self, e ):
# Check if you want the drag...
if (secret.canDecode( e ) or
TQTextDrag.canDecode( e ) or
TQImageDrag.canDecode( e ) or
TQUriDrag.canDecode( e )):
e.accept()
# Give the user some feedback...
t = ''
i = 0
while e.format( i ):
if ( t != '' ):
t += "\n"
t += str(e.format( i ))
i += 1
self.emit(PYSIGNAL('message(TQString &)'), (TQString(t),))
self.setBackgroundColor(TQt.white)
def dragLeaveEvent( self, TQDragLeaveEvent ):
# Give the user some feedback...
self.emit(PYSIGNAL('message(TQString &)'), (TQString(''),))
self.setBackgroundColor(TQt.lightGray)
def dropEvent( self, e ):
self.setBackgroundColor(TQt.lightGray)
# Try to decode to the data you understand...
str = TQString()
if ( TQTextDrag.decode( e, str ) ) :
self.setText( str )
self.setMinimumSize( self.minimumSize().expandedTo(self.sizeHint()) )
return
pm = TQPixmap()
if ( TQImageDrag.decode( e, pm ) ) :
self.setPixmap( pm )
self.setMinimumSize(self.minimumSize().expandedTo(self.sizeHint()))
return
# TQStrList strings
#strings = TQStrList()
strings = []
if ( TQUriDrag.decode( e, strings ) ) :
m = TQString("Full URLs:\n")
for u in strings:
m = m + " " + u + '\n'
# TQStringList files
files = []
if ( TQUriDrag.decodeLocalFiles( e, files ) ) :
m += "Files:\n"
# for (TQStringList.Iterator i=files.begin() i!=files.end() ++i)
for i in files:
m = m + " " + i + '\n'
self.setText( m )
self.setMinimumSize(self.minimumSize().expandedTo(self.sizeHint()))
return
str = secret.decode( e )
if str:
self.setText( str )
self.setMinimumSize(self.minimumSize().expandedTo(self.sizeHint()))
return

@ -1,235 +0,0 @@
#!/usr/bin/env python
import sys
import math
from qt import *
from qtgl import *
from OpenGL.GL import *
def gear(inner_radius,outer_radius,width,teeth,tooth_depth):
r0 = inner_radius;
r1 = outer_radius - tooth_depth/2.0;
r2 = outer_radius + tooth_depth/2.0;
da = 2.0*math.pi/teeth/4.0;
glShadeModel(GL_FLAT)
glNormal3f(0.0,0.0,1.0)
# draw front face
glBegin(GL_QUAD_STRIP)
for i in range(teeth+1):
angle = i * 2.0*math.pi/teeth;
glVertex3f(r0*math.cos(angle), r0*math.sin(angle), width*0.5 )
glVertex3f(r1*math.cos(angle), r1*math.sin(angle), width*0.5 )
glVertex3f(r0*math.cos(angle), r0*math.sin(angle), width*0.5 )
glVertex3f(r1*math.cos(angle+3*da), r1*math.sin(angle+3*da), width*0.5 )
glEnd()
# draw front sides of teeth
da = 2.0*math.pi/teeth/4.0;
glBegin(GL_QUADS)
for i in range(teeth):
angle = i*2.0*math.pi/teeth
glVertex3f( r1*math.cos(angle), r1*math.sin(angle), width*0.5 )
glVertex3f( r2*math.cos(angle+da), r2*math.sin(angle+da), width*0.5 )
glVertex3f( r2*math.cos(angle+2*da), r2*math.sin(angle+2*da), width*0.5 )
glVertex3f( r1*math.cos(angle+3*da), r1*math.sin(angle+3*da), width*0.5 )
glEnd()
glNormal3f( 0.0, 0.0, -1.0 )
# draw back face
glBegin( GL_QUAD_STRIP );
for i in range(teeth+1):
angle = i*2.0*math.pi/teeth;
glVertex3f( r1*math.cos(angle), r1*math.sin(angle), -width*0.5 )
glVertex3f( r0*math.cos(angle), r0*math.sin(angle), -width*0.5 )
glVertex3f( r1*math.cos(angle+3*da), r1*math.sin(angle+3*da), -width*0.5 )
glVertex3f( r0*math.cos(angle), r0*math.sin(angle), -width*0.5 )
glEnd()
# draw back sides of teeth
da = 2.0*math.pi/teeth/4.0
glBegin( GL_QUADS )
for i in range(teeth):
angle = i*2.0*math.pi/teeth
glVertex3f( r1*math.cos(angle+3*da), r1*math.sin(angle+3*da), -width*0.5 )
glVertex3f( r2*math.cos(angle+2*da), r2*math.sin(angle+2*da), -width*0.5 )
glVertex3f( r2*math.cos(angle+da), r2*math.sin(angle+da), -width*0.5 )
glVertex3f( r1*math.cos(angle), r1*math.sin(angle), -width*0.5 )
glEnd()
# draw outward faces of teeth
glBegin( GL_QUAD_STRIP )
for i in range(teeth):
angle = i*2.0*math.pi/teeth
glVertex3f( r1*math.cos(angle), r1*math.sin(angle), width*0.5 )
glVertex3f( r1*math.cos(angle), r1*math.sin(angle), -width*0.5 )
u = r2*math.cos(angle+da) - r1*math.cos(angle)
v = r2*math.sin(angle+da) - r1*math.sin(angle)
len = math.sqrt( u*u + v*v )
u /= len
v /= len
glNormal3f( v, -u, 0.0 )
glVertex3f( r2*math.cos(angle+da), r2*math.sin(angle+da), width*0.5 )
glVertex3f( r2*math.cos(angle+da), r2*math.sin(angle+da), -width*0.5 )
glNormal3f( math.cos(angle), math.sin(angle), 0.0 )
glVertex3f( r2*math.cos(angle+2*da), r2*math.sin(angle+2*da), width*0.5 )
glVertex3f( r2*math.cos(angle+2*da), r2*math.sin(angle+2*da), -width*0.5 )
u = r1*math.cos(angle+3*da) - r2*math.cos(angle+2*da)
v = r1*math.sin(angle+3*da) - r2*math.sin(angle+2*da)
glNormal3f( v, -u, 0.0 )
glVertex3f( r1*math.cos(angle+3*da), r1*math.sin(angle+3*da), width*0.5 )
glVertex3f( r1*math.cos(angle+3*da), r1*math.sin(angle+3*da), -width*0.5 )
glNormal3f( math.cos(angle), math.sin(angle), 0.0 )
glVertex3f( r1*math.cos(0.0), r1*math.sin(0.0), width*0.5 )
glVertex3f( r1*math.cos(0.0), r1*math.sin(0.0), -width*0.5 )
glEnd()
glShadeModel (GL_SMOOTH)
# draw inside radius cylinder
glBegin( GL_QUAD_STRIP )
for i in range(teeth+1):
angle = i * 2.0*math.pi / teeth;
glNormal3f( -math.cos(angle), -math.sin(angle), 0.0 );
glVertex3f( r0*math.cos(angle), r0*math.sin(angle), -width*0.5 );
glVertex3f( r0*math.cos(angle), r0*math.sin(angle), width*0.5 );
glEnd()
##############################################################################
class GearWidget(TQGLWidget):
def __init__(self,parent=None,name=None):
TQGLWidget.__init__(self,parent,name)
self.angle=0.0
self.view_rotx=0.0
self.view_roty=0.0
self.view_rotz=0.0
self.startTimer(10)
def timerEvent(self,event):
self.updateGL()
def paintGL(self):
self.angle = self.angle + 2.0
self.view_rotx = self.view_rotx + 1.0
self.view_roty = self.view_roty + 3.0
self.view_rotz = self.view_rotz + 2.0
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT )
glPushMatrix()
glRotatef( self.view_rotx, 1.0, 0.0, 0.0 )
glRotatef( self.view_roty, 0.0, 1.0, 0.0 )
glRotatef( self.view_rotz, 0.0, 0.0, 1.0 )
glPushMatrix()
glTranslatef( -3.0, -2.0, 0.0 )
glRotatef( self.angle, 0.0, 0.0, 1.0 )
glCallList(self.gear1)
glPopMatrix()
glPushMatrix()
glTranslatef( 3.1, -2.0, 0.0 )
glRotatef( -2.0*self.angle-9.0, 0.0, 0.0, 1.0 )
glCallList(self.gear2)
glPopMatrix()
glPushMatrix()
glTranslatef( -3.1, 2.2, -1.8 )
glRotatef( 90.0, 1.0, 0.0, 0.0 )
glRotatef( 2.0*self.angle-2.0, 0.0, 0.0, 1.0 )
glCallList(self.gear3)
glPopMatrix()
glPopMatrix()
def resizeGL(self,width,height):
w = width / float(height)
h = 1.0
glViewport( 0, 0, width, height )
glMatrixMode(GL_PROJECTION)
glLoadIdentity()
glFrustum( -w, w, -h, h, 5.0, 60.0 )
glMatrixMode(GL_MODELVIEW)
glLoadIdentity()
glTranslatef( 0.0, 0.0, -40.0 )
def initializeGL(self):
pos=(5.0, 5.0, 10.0, 1.0 )
ared=(0.8, 0.1, 0.0, 1.0 )
agreen=(0.0, 0.8, 0.2, 1.0 )
ablue=(0.2, 0.2, 1.0, 1.0 )
glLightfv(GL_LIGHT0,GL_POSITION,pos)
glEnable(GL_CULL_FACE)
glEnable(GL_LIGHTING)
glEnable(GL_LIGHT0)
glEnable(GL_DEPTH_TEST)
self.gear1=glGenLists(1)
glNewList(self.gear1,GL_COMPILE)
glMaterialfv(GL_FRONT,GL_AMBIENT_AND_DIFFUSE,ared)
gear(1.0,4.0,1.0,20,0.7)
glEndList()
self.gear2=glGenLists(1)
glNewList(self.gear2,GL_COMPILE)
glMaterialfv(GL_FRONT,GL_AMBIENT_AND_DIFFUSE,agreen)
gear(0.5,2.0,2.0,10,0.7)
glEndList()
self.gear3=glGenLists(1)
glNewList(self.gear3,GL_COMPILE)
glMaterialfv(GL_FRONT,GL_AMBIENT_AND_DIFFUSE,ablue)
gear(1.3,2.0,0.5,10,0.7)
glEndList()
glEnable(GL_NORMALIZE)
##############################################################################
if __name__=='__main__':
TQApplication.setColorSpec(TQApplication.CustomColor)
app=TQApplication(sys.argv)
if not TQGLFormat.hasOpenGL():
raise 'No TQt OpenGL support.'
widget=GearWidget()
app.setMainWidget(widget)
widget.show()
app.exec_loop()

@ -1,301 +0,0 @@
#!/usr/bin/env python
#****************************************************************************
#** $Id: menu.py,v 1.1.1.1 2002/06/04 23:04:42 phil Exp $
#**
#** Copyright (C) 1992-1998 Troll Tech AS. All rights reserved.
#**
#** This file is part of an example program for PyTQt. This example
#** program may be used, distributed and modified without limitation.
#**
#*****************************************************************************/
import sys, string
from qt import *
TRUE = 1
FALSE = 0
# XPM
p1_xpm = [
"16 16 3 1",
" c None",
". c #000000000000",
"X c #FFFFFFFF0000",
" ",
" ",
" .... ",
" .XXXX. ",
" .............. ",
" .XXXXXXXXXXXX. ",
" .XXXXXXXXXXXX. ",
" .XXXXXXXXXXXX. ",
" .XXXXXXXXXXXX. ",
" .XXXXXXXXXXXX. ",
" .XXXXXXXXXXXX. ",
" .XXXXXXXXXXXX. ",
" .XXXXXXXXXXXX. ",
" .XXXXXXXXXXXX. ",
" .............. ",
" "
]
# XPM
p2_xpm = [
"16 16 3 1",
" c None",
". c #000000000000",
"X c #FFFFFFFFFFFF",
" ",
" ...... ",
" .XXX.X. ",
" .XXX.XX. ",
" .XXX.XXX. ",
" .XXX..... ",
" .XXXXXXX. ",
" .XXXXXXX. ",
" .XXXXXXX. ",
" .XXXXXXX. ",
" .XXXXXXX. ",
" .XXXXXXX. ",
" .XXXXXXX. ",
" ......... ",
" ",
" "
]
# XPM
p3_xpm = [
"16 16 3 1",
" c None",
". c #000000000000",
"X c #FFFFFFFFFFFF",
" ",
" ",
" ......... ",
" ........... ",
" ........ .. ",
" ........... ",
" ........... ",
" ........... ",
" ........... ",
" ...XXXXX... ",
" ...XXXXX... ",
" ...XXXXX... ",
" ...XXXXX... ",
" ......... ",
" ",
" "
]
p4_xpm = [
' 16 14 5 1',
'. c #000000',
'# c #848284',
'a c #c6c3c6',
'b c #ffff00',
'c c #ffffff',
'aaaaa.........aa',
'aaaa.cccccccc.aa',
'aaaa.c.....c.aaa',
'aaa.cccccccc.aaa',
'aaa.c.....c....a',
'aa.cccccccc.a.a.',
'a..........a.a..',
'.aaaaaaaaaa.a.a.',
'.............aa.',
'.aaaaaa###aa.a.a',
'.aaaaaabbbaa...a',
'.............a.a',
'a.aaaaaaaaa.a.aa',
'aa...........aaa'
]
# Auxiliary class to provide fancy menu items with different fonts.
# Used for the "bold" and "underline" menu items in the options menu.
#class MyMenuItem( TQCustomMenuItem ):
# def __init__( self, s=None, f=None ):
# apply( TQCustomMenuItem.__init__,( self, s, f ) )
# string = TQString( s )
# font = TQFont( f )
# def paint( self, p, TRUE, FALSE, x, y, w, h ) :
# p.setFont ( font )
# p.drawText( x, y, w, h, TQt.AlignLeft | TQt.AlignVCenter | TQt.ShowPrefix | TQt.DontClip, string )
# def sizeHint( self ):
# return TQFontMetrics( font ).size( TQt.AlignLeft | TQt.AlignVCenter | TQt.ShowPrefix | TQt.DontClip, string )
#
### Implementation of MenuExample class
#
class MenuExample( TQWidget ):
def __init__( self, parent=None, name=None ):
apply( TQWidget.__init__,(self, parent, name) )
self.p1 = TQIconSet( TQPixmap ( p1_xpm ) )
self.p2 = TQIconSet( TQPixmap ( p2_xpm ) )
self.p3 = TQIconSet( TQPixmap ( p3_xpm ) )
self.p4 = TQIconSet( TQPixmap ( p4_xpm ) )
#openIcon = TQPixmap()
#saveIcon = TQPixmap()
#printIcon = TQPixmap()
self.printer = TQPopupMenu( self )
#CHECK_PTR( self.printer )
self.printer.insertTearOffHandle()
self.printer.insertItem( "&Print to printer", self.printDoc )
self.printer.insertItem( "Print to &file", self.file )
self.printer.insertItem( "Print to fa&x", self.fax )
self.printer.insertSeparator()
self.printer.insertItem( "Printer &Setup", self.printerSetup )
self.file = TQPopupMenu( self )
#CHECK_PTR( self.file );
self.file.insertItem( self.p1, "&Open", self.open, TQt.CTRL+TQt.Key_O )
self.file.insertItem( self.p2, "&New", self.news, TQt.CTRL+TQt.Key_N )
self.file.insertItem( self.p3, "&Save", self.save, TQt.CTRL+TQt.Key_S )
self.file.insertItem( "&Close", self.closeDoc, TQt.CTRL+TQt.Key_W )
self.file.insertSeparator()
self.file.insertItem( self.p4, "&Print", self.printer, TQt.CTRL+TQt.Key_P )
self.file.insertSeparator()
self.file.insertItem( "E&xit", tqApp, SLOT( "quit()" ), TQt.CTRL+TQt.Key_Q )
self.edit = TQPopupMenu( self )
#CHECK_PTR( self.edit )
undoID = self.edit.insertItem( "&Undo", self.undo )
redoID = self.edit.insertItem( "&Redo", self.redo )
self.edit.setItemEnabled( undoID, TRUE )
self.edit.setItemEnabled( redoID, FALSE )
self.options = TQPopupMenu( self )
#CHECK_PTR( self.options )
self.options.insertTearOffHandle()
self.options.setCaption( 'Options' )
self.options.insertItem( "&Normal Font", self.normal )
self.options.insertSeparator()
self.options.polish() # adjust system settings
self.f = TQFont( self.options.font() )
self.f.setBold( TRUE )
self.boldID = self.options.insertItem( "&Bold" )
self.options.setAccel( TQt.CTRL+TQt.Key_B, self.boldID )
self.options.connectItem( self.boldID, self.bold )
self.f = TQFont( self.options.font() )
self.f.setUnderline( TRUE )
self.underlineID = self.options.insertItem( "&Underline" )
self.options.setAccel( TQt.CTRL+TQt.Key_U, self.underlineID )
self.options.connectItem( self.underlineID, self.underline )
self.isBold = FALSE
self.isUnderline = FALSE
self.options.setCheckable( TRUE )
self.options = TQPopupMenu()
#CHECK_PTR( self.options )
self.options.insertItem( "&Normal Font", self.normal )
self.options.insertSeparator()
self.boldID = self.options.insertItem( "&Bold", self.bold )
self.underlineID = self.options.insertItem( "&Underline", self.underline )
self.isBold = FALSE
self.isUnderline = FALSE
self.options.setCheckable( TRUE )
self.help = TQPopupMenu( self )
#CHECK_PTR( self.help )
self.help.insertItem( "&About", self.about, TQt.CTRL+TQt.Key_H )
self.help.insertItem( "About &TQt", self.aboutTQt )
self.menu = TQMenuBar( self )
#CHECK_PTR( self.menu );
self.menu.insertItem( "&File", self.file )
self.menu.insertItem( "&Edit", self.edit )
self.menu.insertItem( "&Options", self.options )
self.menu.insertSeparator()
self.menu.insertItem( "&Help", self.help )
self.menu.setSeparator( TQMenuBar.InWindowsStyle )
self.label = TQLabel( self )
#CHECK_PTR( self.label )
self.label.setGeometry( 20, self.rect().center().y()-20, self.width()-40, 40 )
self.label.setFrameStyle( TQFrame.Box | TQFrame.Raised )
self.label.setLineWidth( 1 )
self.label.setAlignment( TQt.AlignCenter )
self.label.setFont( TQFont( "times", 12, TQFont.Bold ) )
self.connect( self, PYSIGNAL( "explain" ), self.label.setText )
#self.connect( self, PYSIGNAL( "explain(const char *)" ),
# self.label, SLOT( "setText(const char *)" ) )
self.setMinimumSize( 100, 80 )
def open( self ):
self.emit ( PYSIGNAL( "explain" ), ( "File/Open selected", ) )
def news( self ):
self.emit ( PYSIGNAL( "explain" ), ( "File/New selected", ) )
def save( self ):
self.emit ( PYSIGNAL( "explain" ), ( "File/Save selected", ) )
def closeDoc( self ):
self.emit ( PYSIGNAL( "explain" ), ( "File/Close selected", ) )
def undo( self ):
self.emit ( PYSIGNAL( "explain" ), ( "Edit/Undo selected", ) )
def redo( self ):
self.emit ( PYSIGNAL( "explain" ), ( "Edit/Redo selected", ) )
def normal( self ):
self.isBold = FALSE
self.isUnderline = FALSE
self.options.setItemChecked( self.boldID, self.isBold )
self.options.setItemChecked( self.underlineID, self.isUnderline )
self.emit(PYSIGNAL("explain"), ("Options/Normal selected",))
def bold( self ):
self.isBold = not self.isBold
self.options.setItemChecked( self.boldID, self.isBold )
self.emit ( PYSIGNAL( "explain" ), ( "Options/Bold selected", ) )
def underline( self ):
self.isUnderline = not self.isUnderline
self.options.setItemChecked( self.underlineID, self.isUnderline )
self.emit(PYSIGNAL("explain"), ("Options/Underline selected",))
def about( self ):
TQMessageBox.about( self, "TQt Menu Example",
"This example demonstrates simple use of TQt menus.\n"
"You can cut and paste lines from it to your own\n"
"programs." )
def aboutTQt( self ):
TQMessageBox.aboutTQt( self, "TQt Menu Example" )
def printDoc( self ):
self.emit ( PYSIGNAL( "explain" ), ( "File/Printer/Print selected", ) )
def file( self ):
self.emit ( PYSIGNAL( "explain" ), ( "File/Printer/Print To File selected", ) )
def fax( self ):
self.emit ( PYSIGNAL( "explain" ), ( "File/Printer/Print To Fax selected", ) )
def printerSetup( self ):
self.emit ( PYSIGNAL( "explain" ), ( "File/Printer/Printer Setup selected", ) )
def resizeEvent( self, ev ):
self.label.setGeometry( 20, self.rect().center().y()-20, self.width()-40, 40 )
a = TQApplication( sys.argv )
m = MenuExample()
a.setMainWidget( m )
m.setCaption( 'MenuExample' )
m.show()
#a.connect( a, SIGNAL('lastWindowClosed()'), a, SLOT('quit()') )
a.exec_loop()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

@ -1,65 +0,0 @@
# This is part of the dragdrop example.
from qt import *
def canDecode(e):
return e.provides( "secret/magic" )
def decode(e):
payload = str(e.data( "secret/magic" ))
if ( str(payload) != '' ):
e.accept()
return TQString("The secret number is "+str(ord(payload)) )
return None
class SecretDrag(TQStoredDrag):
def __init__(self, secret, parent=None, name=None):
TQStoredDrag.__init__(self, 'secret/magic', parent, name)
data = TQByteArray(chr(secret))
self.setEncodedData( data )
# XPM
picture_xpm = [
"16 16 3 1",
" c None",
". c #000000",
"X c #FFFF00",
" ..... ",
" ..XXXXX.. ",
" .XXXXXXXXX. ",
" .XXXXXXXXXXX. ",
" .XX..XXX..XX. ",
".XXXXXXXXXXXXX. ",
".XX...XXX...XX. ",
".XXX..XXX..XXX. ",
".XXXXXXXXXXXXX. ",
".XXXXXX.XXXXXX. ",
" .XX.XX.XX.XX. ",
" .XXX..X..XXX. ",
" .XXXXXXXXX. ",
" ..XXXXX.. ",
" ..... ",
" "
]
class SecretSource(TQLabel):
def __init__(self, secret, parent=None, name=None):
TQLabel.__init__(self, "Secret", parent, name)
self.setBackgroundColor( TQt.blue.light() )
self.setFrameStyle( TQLabel.Box | TQLabel.Sunken )
self.setMinimumHeight( self.sizeHint().height()*2 )
self.setAlignment( TQLabel.AlignCenter )
self.mySecret = secret
def mousePressEvent(self, e):
sd = SecretDrag( self.mySecret, self )
sd.setPixmap(TQPixmap(picture_xpm),TQPoint(8,8))
sd.dragCopy()
self.mySecret = self.mySecret + 1

@ -1,203 +0,0 @@
#!/usr/bin/env python
#
# A port of the semaphore example from TQt.
import sys
# Check if thread support was enabled.
try:
from qt import TQThread
except:
print "Thread support not enabled"
sys.exit(1)
from qt import *
# The semaphore instances.
yellowSem = None
greenSem = None
class YellowThread(TQThread):
def __init__(self,o):
TQThread.__init__(self)
self.receiver = o
self.stopped = 0
self.mutex = TQMutex()
def run(self):
global yellowSem, greenSem
for i in range(20):
yellowSem += 1
event = TQCustomEvent(12345)
event.setData(TQString("Yellow!"))
TQThread.postEvent(self.receiver,event)
self.msleep(200);
greenSem -= 1
self.mutex.lock()
if self.stopped:
self.stopped = 0
self.mutex.unlock()
break
self.mutex.unlock()
yellowSem += 1
event = TQCustomEvent(12346)
event.setData(TQString("Yellow!"))
TQThread.postEvent(self.receiver,event)
greenSem -= 1
def stop(self):
self.mutex.lock()
self.stopped = 1
self.mutex.unlock()
class GreenThread(TQThread):
def __init__(self,o):
TQThread.__init__(self)
self.receiver = o
self.stopped = 0
self.mutex = TQMutex()
def run(self):
global yellowSem, greenSem
for i in range(20):
greenSem += 1
event = TQCustomEvent(12345)
event.setData(TQString("Green!"))
TQThread.postEvent(self.receiver,event)
self.msleep(200)
yellowSem -= 1
self.mutex.lock()
if self.stopped:
self.stopped = 0
self.mutex.unlock()
break
self.mutex.unlock()
greenSem += 1
event = TQCustomEvent(12346)
event.setData(TQString("Green!"))
TQThread.postEvent(self.receiver,event)
self.msleep(10)
yellowSem -= 1
def stop(self):
self.mutex.lock()
self.stopped = 1
self.mutex.unlock()
class SemaphoreExample(TQWidget):
def __init__(self):
TQWidget.__init__(self)
self.yellowThread = YellowThread(self)
self.greenThread = GreenThread(self)
global yellowSem, greenSem
yellowSem = TQSemaphore(1)
greenSem = TQSemaphore(1)
self.button = TQPushButton("&Ignition!",self)
self.connect(self.button,SIGNAL("clicked()"),self.startExample)
self.mlineedit = TQMultiLineEdit(self)
self.label = TQLabel(self)
vbox = TQVBoxLayout(self,5)
vbox.addWidget(self.button)
vbox.addWidget(self.mlineedit)
vbox.addWidget(self.label)
def __del__(self):
stopYellow = self.yellowThread.running()
stopGreen = self.greenThread.running()
if stopYellow:
self.yellowThread.stop()
if self.greenThread.running():
self.greenThread.stop()
if stopYellow:
self.yellowThread.wait()
if stopGreen:
self.greenThread.wait()
global yellowSem, greenSem
yellowSem = None
greenSem = None
def startExample(self):
if self.yellowThread.running() or self.greenThread.running():
TQMessageBox.information(self,"Sorry",
"The threads have not completed yet, and must finish before "
"they can be started again.")
return
self.mlineedit.clear()
global yellowSem
while yellowSem.available() < yellowSem.total():
yellowSem -= 1
yellowSem += 1
self.yellowThread.start()
self.greenThread.start()
def customEvent(self,event):
if event.type() == 12345:
s = event.data()
self.mlineedit.append(s)
if s.latin1() == "Green!":
self.label.setBackgroundColor(TQt.green)
else:
self.label.setBackgroundColor(TQt.yellow)
self.label.setText(s)
del s
elif event.type() == 12346:
s = event.data()
TQMessageBox.information(self,s.latin1() + " - Finished",
"The thread creating the \"" + s.latin1() +
"\" events has finished.")
del s
else:
print "Unknown custom event type:", event.type()
app = TQApplication(sys.argv)
se = SemaphoreExample()
app.setMainWidget(se)
se.show()
sys.exit(app.exec_loop())

@ -1,65 +0,0 @@
#!/usr/bin/env python
import sys
from qt import *
class Test(TQWidget):
def __init__(self, parent=None, name='Test', f=0):
TQWidget.__init__(self, parent, name, f)
def paintEvent(self, e):
p = TQPainter(self)
p.setClipRect(e.rect())
d = 1000
x1 = 0
x2 = self.width() - 1
y1 = 0
y2 = self.height() - 1
x = (x1+x2)/2
p.drawLine(x, y1, x+d, y1+d)
p.drawLine(x, y1, x-d, y1+d)
p.drawLine(x, y2, x+d, y2-d)
p.drawLine(x, y2, x-d, y2-d)
y = (y1+y2)/2
p.drawLine(x1, y, x1+d, y+d)
p.drawLine(x1, y, x1+d, y-d)
p.drawLine(x2, y, x2-d, y+d)
p.drawLine(x2, y, x2-d, y-d)
if __name__=="__main__":
a = TQApplication(sys.argv)
s1 = TQSplitter(TQt.Vertical, None, "main")
s2 = TQSplitter(TQt.Horizontal, s1, "top")
t1 = Test(s2)
t1.setBackgroundColor(TQt.blue.light(180))
t1.setMinimumSize(50,0)
t2 = Test(s2)
t2.setBackgroundColor(TQt.green.light(180))
s2.setResizeMode(t2, TQSplitter.KeepSize)
s2.moveToFirst(t2)
s3 = TQSplitter(TQt.Horizontal, s1, "bottom")
t3 = Test(s3)
t3.setBackgroundColor(TQt.red)
t4 = Test(s3)
t4.setBackgroundColor(TQt.white)
t5 = Test(s3)
t5.setMaximumHeight(250)
t5.setMinimumSize(80,50)
t5.setBackgroundColor(TQt.yellow)
s1.setOpaqueResize(1)
s2.setOpaqueResize(1)
s3.setOpaqueResize(1)
a.setMainWidget(s1)
s1.show()
a.exec_loop()

@ -1,115 +0,0 @@
#!/usr/bin/env python
import sys
from qt import *
class Table(TQTableView):
def __init__(self, numRows, numCols, parent=None, name=''):
TQTableView.__init__(self, parent, name)
self.curRow = self.curCol = 0
self.setFocusPolicy(TQWidget.StrongFocus)
self.setBackgroundMode(TQWidget.PaletteBase)
self.setNumCols(numCols)
self.setNumRows(numRows)
self.setCellWidth(100)
self.setCellHeight(30)
self.setTableFlags(Tbl_vScrollBar |
Tbl_hScrollBar |
Tbl_clipCellPainting)
self.resize(400,200)
self.contents = [''] * (numRows * numCols)
def cellContent(self, row, col):
return self.contents[self.indexOf(row,col)]
def setCellContent(self, row, col, c):
self.contents[self.indexOf(row,col)] = c
self.updateCell(row, col)
def paintCell(self, p, row, col):
w = self.cellWidth(col)
h = self.cellHeight(row)
x2 = w-1
y2 = h-1
p.drawLine(x2,0,x2,y2)
p.drawLine(0,y2,x2,y2)
if row == self.curRow and col == self.curCol:
if self.hasFocus():
p.drawRect(0, 0, x2, y2)
else:
p.setPen(TQt.DotLine)
p.drawRect(0, 0, x2, y2)
p.setPen(TQt.SolidLine)
p.drawText(0,0,w,h,TQt.AlignCenter,self.contents[self.indexOf(row,col)])
def mousePressEvent(self, me):
oldRow = self.curRow
oldCol = self.curCol
clickedPos = me.pos()
self.curRow = self.findRow(clickedPos.y())
self.curCol = self.findCol(clickedPos.x())
if self.curRow != oldRow or \
self.curCol != oldCol:
self.updateCell(oldRow, oldCol)
self.updateCell(self.curRow, self.curCol)
def keyPressEvent(self, ke):
oldRow = self.curRow
oldCol = self.curCol
edge = 0
key = ke.key()
if key == Key_Left:
if self.curCol > 0:
self.curCol = self.curCol - 1
edge = self.leftCell()
if self.curCol < edge:
self.setLeftCell(edge-1)
elif key == Key_Right:
if self.curCol < self.numCols()-1:
self.curCol = self.curCol + 1
edge = self.lastColVisible()
if self.curCol >= edge:
self.setLeftCell(self.leftCell()+1)
elif key == Key_Up:
if self.curRow > 0:
self.curRow = self.curRow - 1
edge = self.topCell()
if self.curRow < edge:
self.setTopCell(edge-1)
elif key == Key_Down:
if self.curRow < self.numRows()-1:
self.curRow = self.curRow + 1
edge = self.lastRowVisible()
if self.curRow >= edge:
self.setTopCell(self.topCell()+1)
else:
ke.ignore()
return
if self.curRow != oldRow or \
self.curCol != oldCol:
self.updateCell(oldRow, oldCol)
self.updateCell(self.curRow, self.curCol)
def focusInEvnet(self, fie):
self.updateCell(self.curRow, self.curCol)
def focusOutEvent(self, foe):
self.updateCell(self.curRow, self.curCol)
def indexOf(self, row, col):
return (row * self.numCols()) + col
numRows = 20
numCols = 20
a = TQApplication(sys.argv)
v = Table(numRows, numCols)
for i in range(numRows):
for j in range(numCols):
v.setCellContent(i,j,'%d %c' % (j, 65+(i%26)))
a.setMainWidget(v)
v.show()
a.exec_loop()

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

@ -1,16 +0,0 @@
#!/usr/bin/env python
# TQt tutorial 1.
import sys
from qt import *
a = TQApplication(sys.argv)
hello = TQPushButton("Hello world!",None)
hello.resize(100,30)
a.setMainWidget(hello)
hello.show()
a.exec_loop()

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

@ -1,213 +0,0 @@
#!/usr/bin/env python
# TQt tutorial 11.
import sys
import math
from qt import *
class LCDRange(TQVBox):
def __init__(self,parent=None,name=None):
TQVBox.__init__(self,parent,name)
lcd = TQLCDNumber(2,self,'lcd')
self.slider = TQSlider(TQt.Horizontal,self,'slider')
self.slider.setRange(0,99)
self.slider.setValue(0)
self.connect(self.slider,SIGNAL('valueChanged(int)'),lcd,SLOT('display(int)'))
self.connect(self.slider,SIGNAL('valueChanged(int)'),self,PYSIGNAL('valueChanged(int)'))
self.setFocusProxy(self.slider)
def value(self):
return self.slider.value()
def setValue(self,value):
self.slider.setValue(value)
def setRange(self,minVal,maxVal):
if minVal < 0 or maxVal > 99 or minVal > maxVal:
raise ValueError, 'LCDRange.setRange(): invalid range'
self.slider.setRange(minVal,maxVal)
class CannonField(TQWidget):
def __init__(self,parent=None,name=None):
TQWidget.__init__(self,parent,name)
self.ang = 45
self.f = 0
self.timerCount = 0
self.autoShootTimer = TQTimer(self,'movement handler')
self.connect(self.autoShootTimer,SIGNAL('timeout()'),self.moveShot)
self.shoot_ang = 0
self.shoot_f = 0
self.setPalette(TQPalette(TQColor(250,250,200)))
self.barrelRect = TQRect(33,-4,15,8)
def angle(self):
return self.ang
def setAngle(self,degrees):
if degrees < 5:
degrees = 5
if degrees > 70:
degrees = 70
if self.ang == degrees:
return
self.ang = degrees
self.repaint(self.cannonRect(),0)
self.emit(PYSIGNAL('angleChanged(int)'),(self.ang,))
def force(self):
return self.f
def setForce(self,newton):
if newton < 0:
newton = 0
if self.f == newton:
return
self.f = newton
self.emit(PYSIGNAL('forceChanged(int)'),(self.f,))
def shoot(self):
if self.autoShootTimer.isActive():
return
self.timerCount = 0
self.shoot_ang = self.ang
self.shoot_f = self.f
self.autoShootTimer.start(50)
def moveShot(self):
r = TQRegion(self.shotRect())
self.timerCount = self.timerCount + 1
shotR = self.shotRect()
if shotR.x() > self.width() or shotR.y() > self.height():
self.autoShootTimer.stop()
else:
r = r.unite(TQRegion(shotR))
self.repaint(r)
def paintEvent(self,ev):
updateR = ev.rect()
p = TQPainter(self)
if updateR.intersects(self.cannonRect()):
self.paintCannon(p)
if self.autoShootTimer.isActive() and updateR.intersects(self.shotRect()):
self.paintShot(p)
def paintShot(self,p):
p.setBrush(TQt.black)
p.setPen(TQt.NoPen)
p.drawRect(self.shotRect())
def paintCannon(self,p):
cr = self.cannonRect()
pix = TQPixmap(cr.size())
pix.fill(self,cr.topLeft())
tmp = TQPainter(pix)
tmp.setBrush(TQt.blue)
tmp.setPen(TQt.NoPen)
tmp.translate(0,pix.height() - 1)
tmp.drawPie(TQRect(-35,-35,70,70),0,90 * 16)
tmp.rotate(-self.ang)
tmp.drawRect(self.barrelRect)
tmp.end()
p.drawPixmap(cr.topLeft(),pix)
def cannonRect(self):
r = TQRect(0,0,50,50)
r.moveBottomLeft(self.rect().bottomLeft())
return r
def shotRect(self):
gravity = 4.0
time = self.timerCount / 4.0
velocity = self.shoot_f
radians = self.shoot_ang * 3.14159265 / 180
velx = velocity * math.cos(radians)
vely = velocity * math.sin(radians)
x0 = (self.barrelRect.right() + 5) * math.cos(radians)
y0 = (self.barrelRect.right() + 5) * math.sin(radians)
x = x0 + velx * time
y = y0 + vely * time - 0.5 * gravity * time * time
r = TQRect(0,0,6,6)
r.moveCenter(TQPoint(x,self.height() - 1 - y))
return r
def sizePolicy(self):
return TQSizePolicy(TQSizePolicy.Expanding,TQSizePolicy.Expanding)
class MyWidget(TQWidget):
def __init__(self,parent=None,name=None):
TQWidget.__init__(self,parent,name)
quit = TQPushButton('&Quit',self,'quit')
quit.setFont(TQFont('Times',18,TQFont.Bold))
self.connect(quit,SIGNAL('clicked()'),tqApp,SLOT('quit()'))
self.angle = LCDRange(self,'angle')
self.angle.setRange(5,70)
self.force = LCDRange(self,'force')
self.force.setRange(10,50)
self.cannonField = CannonField(self,'cannonField')
self.connect(self.angle,PYSIGNAL('valueChanged(int)'),self.cannonField.setAngle)
self.connect(self.cannonField,PYSIGNAL('angleChanged(int)'),self.angle.setValue)
self.connect(self.force,PYSIGNAL('valueChanged(int)'),self.cannonField.setForce)
self.connect(self.cannonField,PYSIGNAL('forceChanged(int)'),self.force.setValue)
shoot = TQPushButton('&Shoot',self,'shoot')
shoot.setFont(TQFont('Times',18,TQFont.Bold))
self.connect(shoot,SIGNAL('clicked()'),self.cannonField.shoot)
grid = TQGridLayout(self,2,2,10)
grid.addWidget(quit,0,0)
grid.addWidget(self.cannonField,1,1)
grid.setColStretch(1,10)
leftBox = TQVBoxLayout()
grid.addLayout(leftBox,1,0)
leftBox.addWidget(self.angle)
leftBox.addWidget(self.force)
topBox = TQHBoxLayout()
grid.addLayout(topBox,0,1)
topBox.addWidget(shoot)
topBox.addStretch(1)
self.angle.setValue(60)
self.force.setValue(25)
self.angle.setFocus()
TQApplication.setColorSpec(TQApplication.CustomColor)
a = TQApplication(sys.argv)
w = MyWidget()
w.setGeometry(100,100,500,355)
a.setMainWidget(w)
w.show()
a.exec_loop()

@ -1,252 +0,0 @@
#!/usr/bin/env python
# TQt tutorial 12.
import sys
import math
import random
from qt import *
class LCDRange(TQVBox):
def __init__(self,s=None,parent=None,name=None):
TQVBox.__init__(self,parent,name)
lcd = TQLCDNumber(2,self,'lcd')
self.slider = TQSlider(TQt.Horizontal,self,'slider')
self.slider.setRange(0,99)
self.slider.setValue(0)
self.label = TQLabel(' ',self,'label')
self.label.setAlignment(TQt.AlignCenter)
self.connect(self.slider,SIGNAL('valueChanged(int)'),lcd,SLOT('display(int)'))
self.connect(self.slider,SIGNAL('valueChanged(int)'),self,PYSIGNAL('valueChanged(int)'))
self.setFocusProxy(self.slider)
if s is not None:
self.setText(s)
def value(self):
return self.slider.value()
def setValue(self,value):
self.slider.setValue(value)
def setRange(self,minVal,maxVal):
if minVal < 0 or maxVal > 99 or minVal > maxVal:
raise ValueError, 'LCDRange.setRange(): invalid range'
self.slider.setRange(minVal,maxVal)
def text(self):
return self.label.text()
def setText(self,s):
self.label.setText(s)
class CannonField(TQWidget):
def __init__(self,parent=None,name=None):
TQWidget.__init__(self,parent,name)
self.ang = 45
self.f = 0
self.timerCount = 0
self.autoShootTimer = TQTimer(self,'movement handler')
self.connect(self.autoShootTimer,SIGNAL('timeout()'),self.moveShot)
self.shoot_ang = 0
self.shoot_f = 0
self.target = TQPoint(0,0)
self.setPalette(TQPalette(TQColor(250,250,200)))
self.barrelRect = TQRect(33,-4,15,8)
self.newTarget()
def angle(self):
return self.ang
def setAngle(self,degrees):
if degrees < 5:
degrees = 5
if degrees > 70:
degrees = 70
if self.ang == degrees:
return
self.ang = degrees
self.repaint(self.cannonRect(),0)
self.emit(PYSIGNAL('angleChanged(int)'),(self.ang,))
def force(self):
return self.f
def setForce(self,newton):
if newton < 0:
newton = 0
if self.f == newton:
return
self.f = newton
self.emit(PYSIGNAL('forceChanged(int)'),(self.f,))
def shoot(self):
if self.autoShootTimer.isActive():
return
self.timerCount = 0
self.shoot_ang = self.ang
self.shoot_f = self.f
self.autoShootTimer.start(50)
def newTarget(self):
r = TQRegion(self.targetRect())
self.target = TQPoint(random.randint(200,390),random.randint(10,265))
self.repaint(r.unite(TQRegion(self.targetRect())))
def moveShot(self):
r = TQRegion(self.shotRect())
self.timerCount = self.timerCount + 1
shotR = self.shotRect()
if shotR.intersects(self.targetRect()):
self.autoShootTimer.stop()
self.emit(PYSIGNAL('hit()'),())
elif shotR.x() > self.width() or shotR.y() > self.height():
self.autoShootTimer.stop()
self.emit(PYSIGNAL('missed()'),())
else:
r = r.unite(TQRegion(shotR))
self.repaint(r)
def paintEvent(self,ev):
updateR = ev.rect()
p = TQPainter(self)
if updateR.intersects(self.cannonRect()):
self.paintCannon(p)
if self.autoShootTimer.isActive() and updateR.intersects(self.shotRect()):
self.paintShot(p)
if updateR.intersects(self.targetRect()):
self.paintTarget(p)
def paintShot(self,p):
p.setBrush(TQt.black)
p.setPen(TQt.NoPen)
p.drawRect(self.shotRect())
def paintTarget(self,p):
p.setBrush(TQt.red)
p.setPen(TQt.black)
p.drawRect(self.targetRect())
def paintCannon(self,p):
cr = self.cannonRect()
pix = TQPixmap(cr.size())
pix.fill(self,cr.topLeft())
tmp = TQPainter(pix)
tmp.setBrush(TQt.blue)
tmp.setPen(TQt.NoPen)
tmp.translate(0,pix.height() - 1)
tmp.drawPie(TQRect(-35,-35,70,70),0,90 * 16)
tmp.rotate(-self.ang)
tmp.drawRect(self.barrelRect)
tmp.end()
p.drawPixmap(cr.topLeft(),pix)
def cannonRect(self):
r = TQRect(0,0,50,50)
r.moveBottomLeft(self.rect().bottomLeft())
return r
def shotRect(self):
gravity = 4.0
time = self.timerCount / 4.0
velocity = self.shoot_f
radians = self.shoot_ang * 3.14159265 / 180
velx = velocity * math.cos(radians)
vely = velocity * math.sin(radians)
x0 = (self.barrelRect.right() + 5) * math.cos(radians)
y0 = (self.barrelRect.right() + 5) * math.sin(radians)
x = x0 + velx * time
y = y0 + vely * time - 0.5 * gravity * time * time
r = TQRect(0,0,6,6)
r.moveCenter(TQPoint(x,self.height() - 1 - y))
return r
def targetRect(self):
r = TQRect(0,0,20,10)
r.moveCenter(TQPoint(self.target.x(),self.height() - 1 - self.target.y()))
return r
def sizePolicy(self):
return TQSizePolicy(TQSizePolicy.Expanding,TQSizePolicy.Expanding)
class MyWidget(TQWidget):
def __init__(self,parent=None,name=None):
TQWidget.__init__(self,parent,name)
quit = TQPushButton('&Quit',self,'quit')
quit.setFont(TQFont('Times',18,TQFont.Bold))
self.connect(quit,SIGNAL('clicked()'),tqApp,SLOT('quit()'))
self.angle = LCDRange('ANGLE',self,'angle')
self.angle.setRange(5,70)
self.force = LCDRange('FORCE',self,'force')
self.force.setRange(10,50)
self.cannonField = CannonField(self,'cannonField')
self.connect(self.angle,PYSIGNAL('valueChanged(int)'),self.cannonField.setAngle)
self.connect(self.cannonField,PYSIGNAL('angleChanged(int)'),self.angle.setValue)
self.connect(self.force,PYSIGNAL('valueChanged(int)'),self.cannonField.setForce)
self.connect(self.cannonField,PYSIGNAL('forceChanged(int)'),self.force.setValue)
shoot = TQPushButton('&Shoot',self,'shoot')
shoot.setFont(TQFont('Times',18,TQFont.Bold))
self.connect(shoot,SIGNAL('clicked()'),self.cannonField.shoot)
grid = TQGridLayout(self,2,2,10)
grid.addWidget(quit,0,0)
grid.addWidget(self.cannonField,1,1)
grid.setColStretch(1,10)
leftBox = TQVBoxLayout()
grid.addLayout(leftBox,1,0)
leftBox.addWidget(self.angle)
leftBox.addWidget(self.force)
topBox = TQHBoxLayout()
grid.addLayout(topBox,0,1)
topBox.addWidget(shoot)
topBox.addStretch(1)
self.angle.setValue(60)
self.force.setValue(25)
self.angle.setFocus()
TQApplication.setColorSpec(TQApplication.CustomColor)
a = TQApplication(sys.argv)
w = MyWidget()
w.setGeometry(100,100,500,355)
a.setMainWidget(w)
w.show()
a.exec_loop()

@ -1,329 +0,0 @@
#!/usr/bin/env python
# TQt tutorial 13.
import sys
import math
import random
from qt import *
class LCDRange(TQWidget):
def __init__(self,s=None,parent=None,name=None):
TQWidget.__init__(self,parent,name)
lcd = TQLCDNumber(2,self,'lcd')
self.slider = TQSlider(TQt.Horizontal,self,'slider')
self.slider.setRange(0,99)
self.slider.setValue(0)
self.label = TQLabel(' ',self,'label')
self.label.setAlignment(TQt.AlignCenter)
self.connect(self.slider,SIGNAL('valueChanged(int)'),lcd,SLOT('display(int)'))
self.connect(self.slider,SIGNAL('valueChanged(int)'),self,PYSIGNAL('valueChanged(int)'))
self.setFocusProxy(self.slider)
l = TQVBoxLayout(self)
l.addWidget(lcd,1)
l.addWidget(self.slider)
l.addWidget(self.label)
if s is not None:
self.setText(s)
def value(self):
return self.slider.value()
def setValue(self,value):
self.slider.setValue(value)
def setRange(self,minVal,maxVal):
if minVal < 0 or maxVal > 99 or minVal > maxVal:
raise ValueError, 'LCDRange.setRange(): invalid range'
self.slider.setRange(minVal,maxVal)
def text(self):
return self.label.text()
def setText(self,s):
self.label.setText(s)
class CannonField(TQWidget):
def __init__(self,parent=None,name=None):
TQWidget.__init__(self,parent,name)
self.ang = 45
self.f = 0
self.timerCount = 0
self.autoShootTimer = TQTimer(self,'movement handler')
self.connect(self.autoShootTimer,SIGNAL('timeout()'),self.moveShot)
self.shoot_ang = 0
self.shoot_f = 0
self.target = TQPoint(0,0)
self.gameEnded = 0
self.setPalette(TQPalette(TQColor(250,250,200)))
self.barrelRect = TQRect(33,-4,15,8)
self.newTarget()
def angle(self):
return self.ang
def setAngle(self,degrees):
if degrees < 5:
degrees = 5
if degrees > 70:
degrees = 70
if self.ang == degrees:
return
self.ang = degrees
self.repaint(self.cannonRect(),0)
self.emit(PYSIGNAL('angleChanged(int)'),(self.ang,))
def force(self):
return self.f
def setForce(self,newton):
if newton < 0:
newton = 0
if self.f == newton:
return
self.f = newton
self.emit(PYSIGNAL('forceChanged(int)'),(self.f,))
def shoot(self):
if self.isShooting():
return
self.timerCount = 0
self.shoot_ang = self.ang
self.shoot_f = self.f
self.autoShootTimer.start(50)
self.emit(PYSIGNAL('canShoot(bool)'),(0,))
def newTarget(self):
r = TQRegion(self.targetRect())
self.target = TQPoint(random.randint(200,390),random.randint(10,265))
self.repaint(r.unite(TQRegion(self.targetRect())))
def gameOver(self):
return self.gameEnded
def setGameOver(self):
if self.gameEnded:
return
if self.isShooting():
self.autoShootTime.stop()
self.gameEnded = 1
self.repaint()
def restartGame(self):
if self.isShooting():
self.autoShootTime.stop()
self.gameEnded = 0
self.repaint()
self.emit(PYSIGNAL('canShoot(bool)'),(1,))
def moveShot(self):
r = TQRegion(self.shotRect())
self.timerCount = self.timerCount + 1
shotR = self.shotRect()
if shotR.intersects(self.targetRect()):
self.autoShootTimer.stop()
self.emit(PYSIGNAL('hit()'),())
self.emit(PYSIGNAL('canShoot(bool)'),(1,))
elif shotR.x() > self.width() or shotR.y() > self.height():
self.autoShootTimer.stop()
self.emit(PYSIGNAL('missed()'),())
self.emit(PYSIGNAL('canShoot(bool)'),(1,))
else:
r = r.unite(TQRegion(shotR))
self.repaint(r)
def paintEvent(self,ev):
updateR = ev.rect()
p = TQPainter(self)
if self.gameEnded:
p.setPen(TQt.black)
p.setFont(TQFont('Courier',48,TQFont.Bold))
p.drawText(self.rect(),TQt.AlignCenter,'Game Over')
if updateR.intersects(self.cannonRect()):
self.paintCannon(p)
if self.isShooting() and updateR.intersects(self.shotRect()):
self.paintShot(p)
if not self.gameEnded and updateR.intersects(self.targetRect()):
self.paintTarget(p)
def paintShot(self,p):
p.setBrush(TQt.black)
p.setPen(TQt.NoPen)
p.drawRect(self.shotRect())
def paintTarget(self,p):
p.setBrush(TQt.red)
p.setPen(TQt.black)
p.drawRect(self.targetRect())
def paintCannon(self,p):
cr = self.cannonRect()
pix = TQPixmap(cr.size())
pix.fill(self,cr.topLeft())
tmp = TQPainter(pix)
tmp.setBrush(TQt.blue)
tmp.setPen(TQt.NoPen)
tmp.translate(0,pix.height() - 1)
tmp.drawPie(TQRect(-35,-35,70,70),0,90 * 16)
tmp.rotate(-self.ang)
tmp.drawRect(self.barrelRect)
tmp.end()
p.drawPixmap(cr.topLeft(),pix)
def cannonRect(self):
r = TQRect(0,0,50,50)
r.moveBottomLeft(self.rect().bottomLeft())
return r
def shotRect(self):
gravity = 4.0
time = self.timerCount / 4.0
velocity = self.shoot_f
radians = self.shoot_ang * 3.14159265 / 180
velx = velocity * math.cos(radians)
vely = velocity * math.sin(radians)
x0 = (self.barrelRect.right() + 5) * math.cos(radians)
y0 = (self.barrelRect.right() + 5) * math.sin(radians)
x = x0 + velx * time
y = y0 + vely * time - 0.5 * gravity * time * time
r = TQRect(0,0,6,6)
r.moveCenter(TQPoint(x,self.height() - 1 - y))
return r
def targetRect(self):
r = TQRect(0,0,20,10)
r.moveCenter(TQPoint(self.target.x(),self.height() - 1 - self.target.y()))
return r
def isShooting(self):
return self.autoShootTimer.isActive()
def sizePolicy(self):
return TQSizePolicy(TQSizePolicy.Expanding,TQSizePolicy.Expanding)
class GameBoard(TQWidget):
def __init__(self,parent=None,name=None):
TQWidget.__init__(self,parent,name)
quit = TQPushButton('&Quit',self,'quit')
quit.setFont(TQFont('Times',18,TQFont.Bold))
self.connect(quit,SIGNAL('clicked()'),tqApp,SLOT('quit()'))
self.angle = LCDRange('ANGLE',self,'angle')
self.angle.setRange(5,70)
self.force = LCDRange('FORCE',self,'force')
self.force.setRange(10,50)
self.cannonField = CannonField(self,'cannonField')
self.connect(self.angle,PYSIGNAL('valueChanged(int)'),self.cannonField.setAngle)
self.connect(self.cannonField,PYSIGNAL('angleChanged(int)'),self.angle.setValue)
self.connect(self.force,PYSIGNAL('valueChanged(int)'),self.cannonField.setForce)
self.connect(self.cannonField,PYSIGNAL('forceChanged(int)'),self.force.setValue)
self.connect(self.cannonField,PYSIGNAL('hit()'),self.hit)
self.connect(self.cannonField,PYSIGNAL('missed()'),self.missed)
self.shoot = TQPushButton('&Shoot',self,'shoot')
self.shoot.setFont(TQFont('Times',18,TQFont.Bold))
self.connect(self.shoot,SIGNAL('clicked()'),self.fire)
self.connect(self.cannonField,PYSIGNAL('canShoot(bool)'),self.shoot,SLOT('setEnabled(bool)'))
restart = TQPushButton('&New Game',self,'newgame')
restart.setFont(TQFont('Times',18,TQFont.Bold))
self.connect(restart,SIGNAL('clicked()'),self.newGame)
self.hits = TQLCDNumber(2,self,'hits')
self.shotsLeft = TQLCDNumber(2,self,'shotsleft')
hitsL = TQLabel('HITS',self,'hitsLabel')
shotsLeftL = TQLabel('SHOTS LEFT',self,'shotsleftLabel')
grid = TQGridLayout(self,2,2,10)
grid.addWidget(quit,0,0)
grid.addWidget(self.cannonField,1,1)
grid.setColStretch(1,10)
leftBox = TQVBoxLayout()
grid.addLayout(leftBox,1,0)
leftBox.addWidget(self.angle)
leftBox.addWidget(self.force)
topBox = TQHBoxLayout()
grid.addLayout(topBox,0,1)
topBox.addWidget(self.shoot)
topBox.addWidget(self.hits)
topBox.addWidget(hitsL)
topBox.addWidget(self.shotsLeft)
topBox.addWidget(shotsLeftL)
topBox.addStretch(1)
topBox.addWidget(restart)
self.angle.setValue(60)
self.force.setValue(25)
self.angle.setFocus()
self.newGame()
def fire(self):
if self.cannonField.gameOver() or self.cannonField.isShooting():
return
self.shotsLeft.display(self.shotsLeft.intValue() - 1)
self.cannonField.shoot()
def hit(self):
self.hits.display(self.hits.intValue() + 1)
if self.shotsLeft.intValue() == 0:
self.cannonField.setGameOver()
else:
self.cannonField.newTarget()
def missed(self):
if self.shotsLeft.intValue() == 0:
self.cannonField.setGameOver()
def newGame(self):
self.shotsLeft.display(15)
self.hits.display(0)
self.cannonField.restartGame()
self.cannonField.newTarget()
TQApplication.setColorSpec(TQApplication.CustomColor)
a = TQApplication(sys.argv)
gb = GameBoard()
gb.setGeometry(100,100,500,355)
a.setMainWidget(gb)
gb.show()
a.exec_loop()

@ -1,377 +0,0 @@
#!/usr/bin/env python
# TQt tutorial 14.
import sys
import math
import random
from qt import *
class LCDRange(TQWidget):
def __init__(self,s=None,parent=None,name=None):
TQWidget.__init__(self,parent,name)
lcd = TQLCDNumber(2,self,'lcd')
self.slider = TQSlider(TQt.Horizontal,self,'slider')
self.slider.setRange(0,99)
self.slider.setValue(0)
self.label = TQLabel(' ',self,'label')
self.label.setAlignment(TQt.AlignCenter)
self.connect(self.slider,SIGNAL('valueChanged(int)'),lcd,SLOT('display(int)'))
self.connect(self.slider,SIGNAL('valueChanged(int)'),self,PYSIGNAL('valueChanged(int)'))
self.setFocusProxy(self.slider)
l = TQVBoxLayout(self)
l.addWidget(lcd,1)
l.addWidget(self.slider)
l.addWidget(self.label)
if s is not None:
self.setText(s)
def value(self):
return self.slider.value()
def setValue(self,value):
self.slider.setValue(value)
def setRange(self,minVal,maxVal):
if minVal < 0 or maxVal > 99 or minVal > maxVal:
raise ValueError, 'LCDRange.setRange(): invalid range'
self.slider.setRange(minVal,maxVal)
def text(self):
return self.label.text()
def setText(self,s):
self.label.setText(s)
class CannonField(TQWidget):
def __init__(self,parent=None,name=None):
TQWidget.__init__(self,parent,name)
self.ang = 45
self.f = 0
self.timerCount = 0
self.autoShootTimer = TQTimer(self,'movement handler')
self.connect(self.autoShootTimer,SIGNAL('timeout()'),self.moveShot)
self.shoot_ang = 0
self.shoot_f = 0
self.target = TQPoint(0,0)
self.gameEnded = 0
self.barrelPressed = 0
self.setPalette(TQPalette(TQColor(250,250,200)))
self.barrelRect = TQRect(33,-4,15,8)
self.newTarget()
def angle(self):
return self.ang
def setAngle(self,degrees):
if degrees < 5:
degrees = 5
if degrees > 70:
degrees = 70
if self.ang == degrees:
return
self.ang = degrees
self.repaint(self.cannonRect(),0)
self.emit(PYSIGNAL('angleChanged(int)'),(self.ang,))
def force(self):
return self.f
def setForce(self,newton):
if newton < 0:
newton = 0
if self.f == newton:
return
self.f = newton
self.emit(PYSIGNAL('forceChanged(int)'),(self.f,))
def shoot(self):
if self.isShooting():
return
self.timerCount = 0
self.shoot_ang = self.ang
self.shoot_f = self.f
self.autoShootTimer.start(50)
self.emit(PYSIGNAL('canShoot(bool)'),(0,))
def newTarget(self):
r = TQRegion(self.targetRect())
self.target = TQPoint(random.randint(200,390),random.randint(10,265))
self.repaint(r.unite(TQRegion(self.targetRect())))
def gameOver(self):
return self.gameEnded
def setGameOver(self):
if self.gameEnded:
return
if self.isShooting():
self.autoShootTime.stop()
self.gameEnded = 1
self.repaint()
def restartGame(self):
if self.isShooting():
self.autoShootTime.stop()
self.gameEnded = 0
self.repaint()
self.emit(PYSIGNAL('canShoot(bool)'),(1,))
def moveShot(self):
r = TQRegion(self.shotRect())
self.timerCount = self.timerCount + 1
shotR = self.shotRect()
if shotR.intersects(self.targetRect()):
self.autoShootTimer.stop()
self.emit(PYSIGNAL('hit()'),())
self.emit(PYSIGNAL('canShoot(bool)'),(1,))
elif shotR.x() > self.width() or shotR.y() > self.height() or shotR.intersects(self.barrierRect()):
self.autoShootTimer.stop()
self.emit(PYSIGNAL('missed()'),())
self.emit(PYSIGNAL('canShoot(bool)'),(1,))
else:
r = r.unite(TQRegion(shotR))
self.repaint(r)
def mousePressEvent(self,ev):
if ev.button() != TQt.LeftButton:
return
if self.barrelHit(ev.pos()):
self.barrelPressed = 1
def mouseMoveEvent(self,ev):
if not self.barrelPressed:
return
pnt = ev.pos()
if pnt.x() <= 0:
pnt.setX(1)
if pnt.y() >= self.height():
pnt.setY(self.height() - 1)
rad = math.atan(float(self.rect().bottom() - pnt.y()) / pnt.x())
self.setAngle(int(round(rad * 180 / math.pi)))
def mouseReleaseEvent(self,ev):
if ev.button() == TQt.LeftButton:
self.barrelPressed = 0
def paintEvent(self,ev):
updateR = ev.rect()
p = TQPainter(self)
if self.gameEnded:
p.setPen(TQt.black)
p.setFont(TQFont('Courier',48,TQFont.Bold))
p.drawText(self.rect(),TQt.AlignCenter,'Game Over')
if updateR.intersects(self.cannonRect()):
self.paintCannon(p)
if updateR.intersects(self.barrierRect()):
self.paintBarrier(p)
if self.isShooting() and updateR.intersects(self.shotRect()):
self.paintShot(p)
if not self.gameEnded and updateR.intersects(self.targetRect()):
self.paintTarget(p)
def paintShot(self,p):
p.setBrush(TQt.black)
p.setPen(TQt.NoPen)
p.drawRect(self.shotRect())
def paintTarget(self,p):
p.setBrush(TQt.red)
p.setPen(TQt.black)
p.drawRect(self.targetRect())
def paintBarrier(self,p):
p.setBrush(TQt.yellow)
p.setPen(TQt.black)
p.drawRect(self.barrierRect())
def paintCannon(self,p):
cr = self.cannonRect()
pix = TQPixmap(cr.size())
pix.fill(self,cr.topLeft())
tmp = TQPainter(pix)
tmp.setBrush(TQt.blue)
tmp.setPen(TQt.NoPen)
tmp.translate(0,pix.height() - 1)
tmp.drawPie(TQRect(-35,-35,70,70),0,90 * 16)
tmp.rotate(-self.ang)
tmp.drawRect(self.barrelRect)
tmp.end()
p.drawPixmap(cr.topLeft(),pix)
def cannonRect(self):
r = TQRect(0,0,50,50)
r.moveBottomLeft(self.rect().bottomLeft())
return r
def shotRect(self):
gravity = 4.0
time = self.timerCount / 4.0
velocity = self.shoot_f
radians = self.shoot_ang * math.pi / 180
velx = velocity * math.cos(radians)
vely = velocity * math.sin(radians)
x0 = (self.barrelRect.right() + 5) * math.cos(radians)
y0 = (self.barrelRect.right() + 5) * math.sin(radians)
x = x0 + velx * time
y = y0 + vely * time - 0.5 * gravity * time * time
r = TQRect(0,0,6,6)
r.moveCenter(TQPoint(x,self.height() - 1 - y))
return r
def targetRect(self):
r = TQRect(0,0,20,10)
r.moveCenter(TQPoint(self.target.x(),self.height() - 1 - self.target.y()))
return r
def barrierRect(self):
return TQRect(145,self.height() - 100,15,100)
def barrelHit(self,p):
mtx = TQWMatrix()
mtx.translate(0,self.height() - 1)
mtx.rotate(-self.ang)
(mtx, invertable) = mtx.invert()
return self.barrelRect.contains(mtx.map(p))
def isShooting(self):
return self.autoShootTimer.isActive()
def sizePolicy(self):
return TQSizePolicy(TQSizePolicy.Expanding,TQSizePolicy.Expanding)
class GameBoard(TQWidget):
def __init__(self,parent=None,name=None):
TQWidget.__init__(self,parent,name)
quit = TQPushButton('&Quit',self,'quit')
quit.setFont(TQFont('Times',18,TQFont.Bold))
self.connect(quit,SIGNAL('clicked()'),tqApp,SLOT('quit()'))
self.angle = LCDRange('ANGLE',self,'angle')
self.angle.setRange(5,70)
self.force = LCDRange('FORCE',self,'force')
self.force.setRange(10,50)
box = TQVBox(self,'cannonFrame')
box.setFrameStyle(TQFrame.WinPanel | TQFrame.Sunken)
self.cannonField = CannonField(box,'cannonField')
self.connect(self.angle,PYSIGNAL('valueChanged(int)'),self.cannonField.setAngle)
self.connect(self.cannonField,PYSIGNAL('angleChanged(int)'),self.angle.setValue)
self.connect(self.force,PYSIGNAL('valueChanged(int)'),self.cannonField.setForce)
self.connect(self.cannonField,PYSIGNAL('forceChanged(int)'),self.force.setValue)
self.connect(self.cannonField,PYSIGNAL('hit()'),self.hit)
self.connect(self.cannonField,PYSIGNAL('missed()'),self.missed)
self.shoot = TQPushButton('&Shoot',self,'shoot')
self.shoot.setFont(TQFont('Times',18,TQFont.Bold))
self.connect(self.shoot,SIGNAL('clicked()'),self.fire)
self.connect(self.cannonField,PYSIGNAL('canShoot(bool)'),self.shoot,SLOT('setEnabled(bool)'))
restart = TQPushButton('&New Game',self,'newgame')
restart.setFont(TQFont('Times',18,TQFont.Bold))
self.connect(restart,SIGNAL('clicked()'),self.newGame)
self.hits = TQLCDNumber(2,self,'hits')
self.shotsLeft = TQLCDNumber(2,self,'shotsleft')
hitsL = TQLabel('HITS',self,'hitsLabel')
shotsLeftL = TQLabel('SHOTS LEFT',self,'shotsleftLabel')
accel = TQAccel(self)
accel.connectItem(accel.insertItem(TQt.Key_Enter),self.fire)
accel.connectItem(accel.insertItem(TQt.Key_Return),self.fire)
accel.connectItem(accel.insertItem(TQt.CTRL + TQt.Key_Q),tqApp,SLOT('quit()'))
grid = TQGridLayout(self,2,2,10)
grid.addWidget(quit,0,0)
grid.addWidget(box,1,1)
grid.setColStretch(1,10)
leftBox = TQVBoxLayout()
grid.addLayout(leftBox,1,0)
leftBox.addWidget(self.angle)
leftBox.addWidget(self.force)
topBox = TQHBoxLayout()
grid.addLayout(topBox,0,1)
topBox.addWidget(self.shoot)
topBox.addWidget(self.hits)
topBox.addWidget(hitsL)
topBox.addWidget(self.shotsLeft)
topBox.addWidget(shotsLeftL)
topBox.addStretch(1)
topBox.addWidget(restart)
self.angle.setValue(60)
self.force.setValue(25)
self.angle.setFocus()
self.newGame()
def fire(self):
if self.cannonField.gameOver() or self.cannonField.isShooting():
return
self.shotsLeft.display(self.shotsLeft.intValue() - 1)
self.cannonField.shoot()
def hit(self):
self.hits.display(self.hits.intValue() + 1)
if self.shotsLeft.intValue() == 0:
self.cannonField.setGameOver()
else:
self.cannonField.newTarget()
def missed(self):
if self.shotsLeft.intValue() == 0:
self.cannonField.setGameOver()
def newGame(self):
self.shotsLeft.display(15)
self.hits.display(0)
self.cannonField.restartGame()
self.cannonField.newTarget()
TQApplication.setColorSpec(TQApplication.CustomColor)
a = TQApplication(sys.argv)
gb = GameBoard()
gb.setGeometry(100,100,500,355)
a.setMainWidget(gb)
gb.show()
a.exec_loop()

@ -1,19 +0,0 @@
#!/usr/bin/env python
# TQt tutorial 2.
import sys
from qt import *
a = TQApplication(sys.argv)
quit = TQPushButton("Quit",None)
quit.resize(75,30)
quit.setFont(TQFont("Times",18,TQFont.Bold))
TQObject.connect(quit,SIGNAL("clicked()"),a,SLOT("quit()"))
a.setMainWidget(quit)
quit.show()
a.exec_loop()

@ -1,20 +0,0 @@
#!/usr/bin/env python
# TQt tutorial 3.
import sys
from qt import *
a = TQApplication(sys.argv)
box = TQVBox()
box.resize(200,120)
quit = TQPushButton("Quit",box)
quit.setFont(TQFont("Times",18,TQFont.Bold))
TQObject.connect(quit,SIGNAL("clicked()"),a,SLOT("quit()"))
a.setMainWidget(box)
box.show()
a.exec_loop()

@ -1,29 +0,0 @@
#!/usr/bin/env python
# TQt tutorial 4.
import sys
from qt import *
class MyWidget(TQWidget):
def __init__(self,parent=None,name=None):
TQWidget.__init__(self,parent,name)
self.setMinimumSize(200,120)
self.setMaximumSize(200,120)
quit = TQPushButton("Quit",self,"quit")
quit.setGeometry(62,40,75,30)
quit.setFont(TQFont("Times",18,TQFont.Bold))
self.connect(quit,SIGNAL("clicked()"),tqApp,SLOT("quit()"))
a = TQApplication(sys.argv)
w = MyWidget()
w.setGeometry(100,100,200,120)
a.setMainWidget(w)
w.show()
a.exec_loop()

@ -1,32 +0,0 @@
#!/usr/bin/env python
# TQt tutorial 5.
import sys
from qt import *
class MyWidget(TQVBox):
def __init__(self,parent=None,name=None):
TQVBox.__init__(self,parent,name)
quit = TQPushButton("Quit",self,"quit")
quit.setFont(TQFont("Times",18,TQFont.Bold))
self.connect(quit,SIGNAL("clicked()"),tqApp,SLOT("quit()"))
lcd = TQLCDNumber(2,self,"lcd")
slider = TQSlider(TQt.Horizontal,self,"slider")
slider.setRange(0,99)
slider.setValue(0)
self.connect(slider,SIGNAL("valueChanged(int)"),lcd,SLOT("display(int)"))
a = TQApplication(sys.argv)
w = MyWidget()
a.setMainWidget(w)
w.show()
a.exec_loop()

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

@ -1,57 +0,0 @@
#!/usr/bin/env python
# TQt tutorial 7.
import sys
from qt import *
class LCDRange(TQVBox):
def __init__(self,parent=None,name=None):
TQVBox.__init__(self,parent,name)
lcd = TQLCDNumber(2,self,'lcd')
self.slider = TQSlider(TQt.Horizontal,self,'slider')
self.slider.setRange(0,99)
self.slider.setValue(0)
self.connect(self.slider,SIGNAL('valueChanged(int)'),lcd,SLOT('display(int)'))
self.connect(self.slider,SIGNAL('valueChanged(int)'),self,PYSIGNAL('valueChanged(int)'))
def value(self):
return self.slider.value()
def setValue(self,value):
self.slider.setValue(value)
class MyWidget(TQVBox):
def __init__(self,parent=None,name=None):
TQVBox.__init__(self,parent,name)
quit = TQPushButton("Quit",self,"quit")
quit.setFont(TQFont("Times",18,TQFont.Bold))
self.connect(quit,SIGNAL("clicked()"),tqApp,SLOT("quit()"))
grid = TQGrid(4,self)
self.lcdlist = []
previous = None
for r in range(4):
for c in range(4):
lr = LCDRange(grid)
if previous is not None:
self.connect(lr,PYSIGNAL("valueChanged(int)"),previous.setValue)
previous = lr
self.lcdlist.append(lr)
a = TQApplication(sys.argv)
w = MyWidget()
a.setMainWidget(w)
w.show()
a.exec_loop()

@ -1,96 +0,0 @@
#!/usr/bin/env python
# TQt tutorial 8.
import sys
from qt import *
class LCDRange(TQVBox):
def __init__(self,parent=None,name=None):
TQVBox.__init__(self,parent,name)
lcd = TQLCDNumber(2,self,'lcd')
self.slider = TQSlider(TQt.Horizontal,self,'slider')
self.slider.setRange(0,99)
self.slider.setValue(0)
self.connect(self.slider,SIGNAL('valueChanged(int)'),lcd,SLOT('display(int)'))
self.connect(self.slider,SIGNAL('valueChanged(int)'),self,PYSIGNAL('valueChanged(int)'))
self.setFocusProxy(self.slider)
def value(self):
return self.slider.value()
def setValue(self,value):
self.slider.setValue(value)
def setRange(self,minVal,maxVal):
if minVal < 0 or maxVal > 99 or minVal > maxVal:
raise ValueError, 'LCDRange.setRange(): invalid range'
self.slider.setRange(minVal,maxVal)
class CannonField(TQWidget):
def __init__(self,parent=None,name=None):
TQWidget.__init__(self,parent,name)
self.ang = 45
self.setPalette(TQPalette(TQColor(250,250,200)))
def angle(self):
return self.ang
def setAngle(self,degrees):
if degrees < 5:
degrees = 5
if degrees > 70:
degrees = 70
if self.ang == degrees:
return
self.ang = degrees
self.repaint()
self.emit(PYSIGNAL('angleChanged(int)'),(self.ang,))
def paintEvent(self,ev):
p = TQPainter(self)
p.drawText(200,200,'Angle = %d' % (self.ang))
def sizePolicy(self):
return TQSizePolicy(TQSizePolicy.Expanding,TQSizePolicy.Expanding)
class MyWidget(TQWidget):
def __init__(self,parent=None,name=None):
TQWidget.__init__(self,parent,name)
quit = TQPushButton('Quit',self,'quit')
quit.setFont(TQFont('Times',18,TQFont.Bold))
self.connect(quit,SIGNAL('clicked()'),tqApp,SLOT('quit()'))
self.angle = LCDRange(self,'angle')
self.angle.setRange(5,70)
self.cannonField = CannonField(self,'cannonField')
self.connect(self.angle,PYSIGNAL('valueChanged(int)'),self.cannonField.setAngle)
self.connect(self.cannonField,PYSIGNAL('angleChanged(int)'),self.angle.setValue)
grid = TQGridLayout(self,2,2,10)
grid.addWidget(quit,0,0)
grid.addWidget(self.angle,1,0,TQt.AlignTop)
grid.addWidget(self.cannonField,1,1)
grid.setColStretch(1,10)
self.angle.setValue(60)
self.angle.setFocus()
a = TQApplication(sys.argv)
w = MyWidget()
w.setGeometry(100,100,500,355)
a.setMainWidget(w)
w.show()
a.exec_loop()

@ -1,104 +0,0 @@
#!/usr/bin/env python
# TQt tutorial 9.
import sys
from qt import *
class LCDRange(TQVBox):
def __init__(self,parent=None,name=None):
TQVBox.__init__(self,parent,name)
lcd = TQLCDNumber(2,self,'lcd')
self.slider = TQSlider(TQt.Horizontal,self,'slider')
self.slider.setRange(0,99)
self.slider.setValue(0)
self.connect(self.slider,SIGNAL('valueChanged(int)'),lcd,SLOT('display(int)'))
self.connect(self.slider,SIGNAL('valueChanged(int)'),self,PYSIGNAL('valueChanged(int)'))
self.setFocusProxy(self.slider)
def value(self):
return self.slider.value()
def setValue(self,value):
self.slider.setValue(value)
def setRange(self,minVal,maxVal):
if minVal < 0 or maxVal > 99 or minVal > maxVal:
raise ValueError, 'LCDRange.setRange(): invalid range'
self.slider.setRange(minVal,maxVal)
class CannonField(TQWidget):
def __init__(self,parent=None,name=None):
TQWidget.__init__(self,parent,name)
self.ang = 45
self.setPalette(TQPalette(TQColor(250,250,200)))
def angle(self):
return self.ang
def setAngle(self,degrees):
if degrees < 5:
degrees = 5
if degrees > 70:
degrees = 70
if self.ang == degrees:
return
self.ang = degrees
self.repaint()
self.emit(PYSIGNAL('angleChanged(int)'),(self.ang,))
def paintEvent(self,ev):
p = TQPainter(self)
p.setBrush(TQt.blue)
p.setPen(TQt.NoPen)
p.translate(0,self.rect().bottom())
p.drawPie(TQRect(-35,-35,70,70),0,90 * 16)
p.rotate(-self.ang)
p.drawRect(TQRect(33,-4,15,8))
def sizePolicy(self):
return TQSizePolicy(TQSizePolicy.Expanding,TQSizePolicy.Expanding)
class MyWidget(TQWidget):
def __init__(self,parent=None,name=None):
TQWidget.__init__(self,parent,name)
quit = TQPushButton('&Quit',self,'quit')
quit.setFont(TQFont('Times',18,TQFont.Bold))
self.connect(quit,SIGNAL('clicked()'),tqApp,SLOT('quit()'))
self.angle = LCDRange(self,'angle')
self.angle.setRange(5,70)
self.cannonField = CannonField(self,'cannonField')
self.connect(self.angle,PYSIGNAL('valueChanged(int)'),self.cannonField.setAngle)
self.connect(self.cannonField,PYSIGNAL('angleChanged(int)'),self.angle.setValue)
grid = TQGridLayout(self,2,2,10)
grid.addWidget(quit,0,0)
grid.addWidget(self.angle,1,0,TQt.AlignTop)
grid.addWidget(self.cannonField,1,1)
grid.setColStretch(1,10)
self.angle.setValue(60)
self.angle.setFocus()
TQApplication.setColorSpec(TQApplication.CustomColor)
a = TQApplication(sys.argv)
w = MyWidget()
w.setGeometry(100,100,500,355)
a.setMainWidget(w)
w.show()
a.exec_loop()

@ -1,512 +0,0 @@
#!/usr/bin/env python
import sys, string
from qt import *
#
## Constructs an analog clock widget that uses an internal TQTimer.
#
def TQMIN( x, y ):
if y > x:
return y
return x
#
## Constructs an analog clock widget that uses an internal TQTimer.
#
class AnalogClock( TQWidget ):
def __init__( self, *args ):
apply( TQWidget.__init__, (self,) + args )
self.time = TQTime.currentTime() # get current time
internalTimer = TQTimer( self ) # create internal timer
self.connect( internalTimer, SIGNAL("timeout()"), self.timeout )
internalTimer.start( 5000 ) # emit signal every 5 seconds
#
## The TQTimer::timeout() signal is received by this slot.
#
def timeout( self ):
new_time = TQTime.currentTime() # get the current time
if new_time.minute() != self.time.minute(): # minute has changed
self.update()
#
## The clock is painted using a 1000x1000 square coordinate system.
#
def paintEvent( self, qe ): # paint clock
if not self.isVisible(): # is is invisible
return
self.time = TQTime.currentTime() # save current time
pts = TQPointArray()
paint = TQPainter( self )
paint.setBrush( self.foregroundColor() ) # fill with foreground color
cp = TQPoint( self.rect().center() ) # widget center point
d = TQMIN( self.width(), self.height() ) # we want a circular clock
matrix = TQWMatrix() # setup transformation matrix
matrix.translate( cp.x(), cp.y() ) # origin at widget center
matrix.scale( d / 1000.0, d / 1000.0 ) # scale coordinate system
h_angle = 30 * ( self.time.hour() % 12 - 3 ) + self.time.minute() / 2
matrix.rotate( h_angle ) # rotate to draw hour hand
paint.setWorldMatrix( matrix )
pts.setPoints( [ -20,0, 0,-20, 300,0, 0,20 ] )
paint.drawPolygon( pts ) # draw hour hand
matrix.rotate( -h_angle ) # rotate back to zero
m_angle = ( self.time.minute() - 15 ) * 6
matrix.rotate( m_angle ) # rotate to draw minute hand
paint.setWorldMatrix( matrix )
pts.setPoints( [ -10,0, 0,-10, 400,0, 0,10 ] )
paint.drawPolygon( pts ) # draw minute hand
matrix.rotate( -m_angle ) # rotate back to zero
for i in range( 0, 12 ): # draw hour lines
paint.setWorldMatrix( matrix )
paint.drawLine( 450,0, 500,0 )
matrix.rotate( 30 )
class DigitalClock( TQLCDNumber ):
def __init__( self, *args ):
apply( TQLCDNumber.__init__,(self,) + args )
self.showingColon = 0
self.setFrameStyle(TQFrame.Panel | TQFrame.Raised)
self.setLineWidth( 2 )
self.showTime()
self.normalTimer = self.startTimer( 500 )
self.showDateTimer = -1
def timerEvent( self, e ):
if e.timerId() == self.showDateTimer:
self.stopDate()
else:
if self.showDateTimer == -1:
self.showTime()
def mousePressEvent( self, e ):
if e.button() == TQt.LeftButton:
self.showDate()
def showDate( self ):
if self.showDateTimer != -1:
return
d = TQDate.currentDate()
self.display('%2d %2d' % (d.month(), d.day()))
self.showDateTimer = self.startTimer(2000)
def stopDate( self ):
self.killTimer(self.showDateTimer)
self.showDateTimer = -1
self.showTime()
def showTime( self ):
self.showingColon = not self.showingColon
s = list(str(TQTime.currentTime().toString())[:5]) #.left(5)
if not self.showingColon:
s[2] = ' '
if s[0] == '0':
s[0] = ' '
s = string.join(s,'')
self.display( s )
def TQMIN( x, y ):
if y > x:
return y
return x
TRUE = 1
FALSE = 0
MOVIEFILENAME = "trolltech.gif"
#
# WidgetView contains lots of TQt widgets.
#
class WidgetView ( TQWidget ):
def __init__( self, *args ):
apply( TQWidget.__init__, (self,) + args )
# Set the window caption/title
self.setCaption( "TQt Widgets Demo Application" )
# Install an application-global event filter
tqApp.installEventFilter( self )
# Create a layout to position the widgets
self.topLayout = TQVBoxLayout( self, 10 )
# Create a grid layout to hold most of the widgets
self.grid = TQGridLayout( 6, 3 )
# This layout will get all of the stretch
self.topLayout.addLayout( self.grid, 10 )
# Create a menubar
self.menubar = TQMenuBar( self )
#self.menubar.setSeparator( TQMenuBar.InWindowsStyle )
self.menubar.setSeparator( 1 )
# Create an easter egg
TQToolTip.add( self.menubar, TQRect( 0, 0, 2, 2 ), "easter egg" )
self.popup = TQPopupMenu()
self.id = self.popup.insertItem( "&New" )
self.popup.setItemEnabled( self.id, FALSE )
self.id = self.popup.insertItem( "&Open" )
self.popup.setItemEnabled( self.id, FALSE )
self.popup.insertSeparator()
self.popup.insertItem( "&Quit", tqApp, SLOT("quit()"), TQt.CTRL+TQt.Key_Q )
self.menubar.insertItem( "&File", self.popup )
# Must tell the layout about a menubar in a widget
self.topLayout.setMenuBar( self.menubar )
# Create an analog and a digital clock
self.aclock = AnalogClock( self )
self.aclock.resize( 50, 50 )
self.dclock = DigitalClock( self )
self.dclock.setMaximumWidth( 200 )
self.grid.addWidget( self.aclock, 0, 2 )
self.grid.addWidget( self.dclock, 1, 2 )
# Give the dclock widget a blue palette
col = TQColor()
col.setRgb( 0xaa, 0xbe, 0xff )
self.dclock.setPalette( TQPalette( col ) )
# make tool tips for both of them
TQToolTip.add( self.aclock, "custom widget: analog clock" )
TQToolTip.add( self.dclock, "custom widget: digital clock" )
# Create a push button.
self.pb = TQPushButton( self, "button1" ) # create button 1
self.pb.setText( "Push button 1" )
self.pb.setFixedHeight( self.pb.sizeHint().height() )
self.grid.addWidget( self.pb, 0, 0, TQt.AlignVCenter )
self.connect( self.pb, SIGNAL("clicked()"), self.button1Clicked )
TQToolTip.add( self.pb, "push button 1" )
self.pm = TQPixmap()
self.pix = self.pm.load( "qt.png" ) # load pixmap for button 2
if not self.pix:
TQMessageBox.information( None, "TQt Widgets Example",
"Could not load the file \"qt.png\", which\n"
"contains an icon used...\n\n"
"The text \"line 42\" will be substituted.",
TQMessageBox.Ok + TQMessageBox.Default )
# Create a label containing a TQMovie
self.movielabel = TQLabel( self, "label0" )
self.movie = TQMovie( MOVIEFILENAME )
self.movie.connectStatus( self.movieStatus )
self.movie.connectUpdate( self.movieUpdate )
self.movielabel.setFrameStyle( TQFrame.Box | TQFrame.Plain )
self.movielabel.setMovie( self.movie )
self.movielabel.setMargin( 0 )
self.movielabel.setFixedSize( 128 + self.movielabel.frameWidth() * 2,
64 + self.movielabel.frameWidth() * 2 )
self.grid.addWidget( self.movielabel, 0, 1, TQt.AlignCenter )
TQToolTip.add( self.movielabel, "movie" )
# Create a group of check boxes
self.bg = TQButtonGroup( self, "checkGroup" )
self.bg.setTitle( "Check Boxes" )
self.grid.addWidget( self.bg, 1, 0 )
# Create a layout for the check boxes
self.vbox = TQVBoxLayout(self.bg, 10)
self.vbox.addSpacing( self.bg.fontMetrics().height() )
self.cb = range(3)
self.cb[0] = TQCheckBox( self.bg )
self.cb[0].setText( "Read" )
self.vbox.addWidget( self.cb[0] )
self.cb[0].setMinimumSize( self.cb[0].sizeHint() )
self.cb[1] = TQCheckBox( self.bg )
self.cb[1].setText( "Write" )
self.vbox.addWidget( self.cb[1] )
self.cb[1].setMinimumSize( self.cb[1].sizeHint() )
self.cb[2] = TQCheckBox( self.bg )
self.cb[2].setText( "Execute" )
self.cb[2].setMinimumSize( self.cb[2].sizeHint() )
self.vbox.addWidget( self.cb[2] )
self.bg.setMinimumSize( self.bg.childrenRect().size() )
self.vbox.activate()
self.connect( self.bg, SIGNAL("clicked(int)"), self.checkBoxClicked )
TQToolTip.add( self.cb[0], "check box 1" )
TQToolTip.add( self.cb[1], "check box 2" )
TQToolTip.add( self.cb[2], "check box 3" )
# Create a group of radio buttons
self.bg = TQButtonGroup( self, "radioGroup" )
self.bg.setTitle( "Radio buttons" )
self.grid.addWidget( self.bg, 1, 1 )
# Create a layout for the radio buttons
self.vbox = TQVBoxLayout( self.bg, 10 )
self.vbox.addSpacing( self.bg.fontMetrics().height() )
self.rb = TQRadioButton( self.bg )
self.rb.setText( "&AM" )
self.rb.setChecked( TRUE )
self.vbox.addWidget( self.rb )
self.rb.setMinimumSize( self.rb.sizeHint() )
TQToolTip.add( self.rb, "radio button 1" )
self.rb = TQRadioButton( self.bg )
self.rb.setText( "&FM" )
self.vbox.addWidget( self.rb )
self.rb.setMinimumSize( self.rb.sizeHint() )
TQToolTip.add( self.rb, "radio button 2" )
self.rb = TQRadioButton( self.bg )
self.rb.setText( "&Short Wave" )
self.vbox.addWidget( self.rb )
self.rb.setMinimumSize( self.rb.sizeHint() )
self.vbox.activate()
self.connect( self.bg, SIGNAL("clicked(int)"), self.radioButtonClicked )
TQToolTip.add( self.rb, "radio button 3" )
# Create a list box
self.lb = TQListBox( self, "listBox" )
for i in range( 0, 100, 1 ): # fill list box
txt = TQString()
txt = "line %d" % i
if i == 42 and self.pix:
self.lb.insertItem( self.pm )
else:
self.lb.insertItem( txt )
self.grid.addMultiCellWidget( self.lb, 2, 4, 0, 0 )
self.connect( self.lb, SIGNAL("selected(int)"), self.listBoxItemSelected )
TQToolTip.add( self.lb, "list box" )
self.vbox = TQVBoxLayout( 8 )
self.grid.addLayout( self.vbox, 2, 1 )
# Create a slider
self.sb = TQSlider( 0, 300, 1, 100, TQSlider.Horizontal, self, "Slider" )
#self.sb.setTickmarks( TQSlider.Below )
self.sb.setTickmarks( 1 )
self.sb.setTickInterval( 10 )
#self.sb.setFocusPolicy( TQWidget.TabFocus )
self.sb.setFocusPolicy( 1 )
self.sb.setFixedHeight( self.sb.sizeHint().height() )
self.vbox.addWidget( self.sb )
self.connect( self.sb, SIGNAL("valueChanged(int)"), self.sliderValueChanged )
TQToolTip.add( self.sb, "slider" )
# Create a combo box
self.combo = TQComboBox( FALSE, self, "comboBox" )
self.combo.insertItem( "darkBlue" )
self.combo.insertItem( "darkRed" )
self.combo.insertItem( "darkGreen" )
self.combo.insertItem( "blue" )
self.combo.insertItem( "red" )
self.combo.setFixedHeight( self.combo.sizeHint().height() )
self.vbox.addWidget( self.combo )
self.connect( self.combo, SIGNAL("activated(int)"), self.comboBoxItemActivated )
TQToolTip.add( self.combo, "read-only combo box" )
# Create an editable combo box
self.edCombo = TQComboBox( TRUE, self, "edComboBox" )
self.edCombo.insertItem( "Permutable" )
self.edCombo.insertItem( "Malleable" )
self.edCombo.insertItem( "Adaptable" )
self.edCombo.insertItem( "Alterable" )
self.edCombo.insertItem( "Inconstant" )
self.edCombo.setFixedHeight( self.edCombo.sizeHint().height() )
self.vbox.addWidget( self.edCombo )
self.connect( self.edCombo, SIGNAL("activated(const TQString &)"), self.edComboBoxItemActivated)
TQToolTip.add( self.edCombo, "editable combo box" )
self.edCombo.setAutoCompletion( TRUE )
self.vbox.addStretch( 1 )
self.vbox = TQVBoxLayout( 8 )
self.grid.addLayout( self.vbox, 2, 2 )
# Create a spin box
self.spin = TQSpinBox( 0, 10, 1, self, "spin" )
self.spin.setSuffix( " mm" )
self.spin.setSpecialValueText( "Auto" )
self.spin.setMinimumSize( self.spin.sizeHint() )
self.connect( self.spin, SIGNAL( "valueChanged(const TQString &)" ), self.spinBoxValueChanged )
TQToolTip.add( self.spin, "spin box" )
self.vbox.addWidget( self.spin )
self.vbox.addStretch( 1 )
# Create a multi line edit
self.mle = TQMultiLineEdit( self, "multiLineEdit" )
self.grid.addMultiCellWidget( self.mle, 3, 3, 1, 2 )
self.mle.setMinimumHeight( self.mle.fontMetrics().height() * 3 )
self.mle.setText("This is a TQMultiLineEdit widget,\n"
"useful for small multi-line\n"
"input fields.")
TQToolTip.add( self.mle, "multi line editor" )
# Create a single line edit
self.le = TQLineEdit( self, "lineEdit" )
self.grid.addMultiCellWidget( self.le, 4, 4, 1, 2 )
self.le.setFixedHeight( self.le.sizeHint().height() )
self.connect( self.le, SIGNAL("textChanged(const TQString &)"), self.lineEditTextChanged )
TQToolTip.add( self.le, "single line editor" )
# Create a horizontal line (sort of TQFrame) above the message line
self.separator = TQFrame( self, "separatorLine" )
self.separator.setFrameStyle( TQFrame.HLine | TQFrame.Sunken )
self.separator.setFixedHeight( self.separator.sizeHint().height() )
self.grid.addMultiCellWidget( self.separator, 5, 5, 0, 2 )
TQToolTip.add( self.separator, "tool tips on a separator! wow!" )
self.grid.setRowStretch( 0, 0 )
self.grid.setRowStretch( 1, 0 )
self.grid.setRowStretch( 2, 0 )
self.grid.setRowStretch( 3, 1 )
self.grid.setRowStretch( 4, 1 )
self.grid.setRowStretch( 5, 0 )
self.grid.setColStretch( 0, 1 )
self.grid.setColStretch( 1, 1 )
self.grid.setColStretch( 2, 1 )
# Create an label and a message in a plain widget
# The message is updated when buttons are clicked etc.
self.hbox = TQHBoxLayout()
self.topLayout.addLayout( self.hbox )
self.msgLabel = TQLabel( self, "msgLabel" )
self.msgLabel.setText( "Message:" )
self.msgLabel.setAlignment( TQt.AlignHCenter | TQt.AlignVCenter )
self.msgLabel.setFixedSize( self.msgLabel.sizeHint() )
self.hbox.addWidget( self.msgLabel )
TQToolTip.add( self.msgLabel, "label 1" )
self.msg = TQLabel( self, "message" )
self.msg.setFrameStyle( TQFrame.Panel | TQFrame.Sunken )
self.msg.setAlignment( TQt.AlignCenter )
self.msg.setFont( TQFont( "times", 12, TQFont.Bold ) )
self.msg.setText( "Message" )
self.msg.setFixedHeight( self.msg.sizeHint().height() )
self.msg.setText( "" )
self.hbox.addWidget( self.msg, 5 )
TQToolTip.add( self.msg, "label 2" )
self.topLayout.activate()
def setStatus(self, text):
self.msg.setText( text )
def movieUpdate( self, r ):
# Uncomment this to test animated icons on your window manager
self.setIcon( self.movie.framePixmap() )
def movieStatus( self, s ):
if s == TQMovie.SourceEmpty or s == TQMovie.UnrecognizedFormat:
pm = TQPixmap('tt-logo.png')
self.movielabel.setPixmap(pm)
self.movielabel.setFixedSize(pm.size())
else:
if ( self.movielabel.movie() ): # for flicker-free animation:
self.movielabel.setBackgroundMode( TQWidget.NoBackground )
def button1Clicked( self ):
self.msg.setText( "The first push button was clicked" )
def checkBoxClicked( self, id ):
txt = TQString()
txt = "Check box %s clicked : " % str(id)
chk = ["-","-","-"]
if self.cb[0].isChecked():
chk[0] = "r"
if self.cb[1].isChecked():
chk[1] = "w"
if self.cb[2].isChecked():
chk[2] = "x"
txt = txt + str(chk[0]+chk[1]+chk[2])
self.msg.setText( txt )
def edComboBoxItemActivated( self, text):
txt = TQString()
txt = "Editable Combo Box set to %s" % text
self.msg.setText( txt )
def radioButtonClicked( self, id ):
txt = TQString()
txt = "Radio button #%d clicked" % id
self.msg.setText( txt )
def listBoxItemSelected( self, index ):
txt = TQString()
txt = "List box item %d selected" % index
self.msg.setText( txt )
def sliderValueChanged( self, value ):
txt = TQString()
txt = "Movie set to %d%% of normal speed" % value
self.msg.setText( txt )
self.movie.setSpeed( value )
def comboBoxItemActivated( self, index ):
txt = TQString()
txt = "Comboxo box item %d activated" % index
self.msg.setText( txt )
if index == 0:
TQApplication.setWinStyleHighlightColor( TQt.darkBlue )
elif index == 1:
TQApplication.setWinStyleHighlightColor( TQt.darkRed )
elif index == 2:
TQApplication.setWinStyleHighlightColor( TQt.darkGreen )
elif index == 3:
TQApplication.setWinStyleHighlightColor( TQt.blue )
elif index == 4:
TQApplication.setWinStyleHighlightColor( TQt.red )
def lineEditTextChanged( self, newText ):
self.msg.setText("Line edit text: " + unicode(newText))
def spinBoxValueChanged( self, valueText ):
self.msg.setText("Spin box value: " + unicode(valueText))
# All application events are passed throught this event filter.
# We're using it to display some information about a clicked
# widget (right mouse button + CTRL).
#def eventFilter( self, event ):
# identify_now = TRUE
# if event.type() == Event_MouseButtonPress and identify_now:
# e = TQMouseEvent( event )
# if (e.button() == TQt.RightButton) and (e.state() & TQt.ControlButton) != 0:
# txt = TQString( "The clicked widget is a\n" )
# txt = txt + TQObect.className()
# txt = txt + "\nThe widget's name is\n"
# if TQObject.name():
# txt = txt + TQObject.name()
# else:
# txt = txt + "<no name>"
# identify_now = FALSE # don't do it in message box
# TQMessageBox.message( "Identify Widget", txt, 0, TQObject )
# identify_now = TRUE; # allow it again
# return FALSE # don't eat event
################################################################################################
#TQApplication.setColourSpec( TQApplication.CustomColor )
a = TQApplication( sys.argv )
w = WidgetView()
a.setMainWidget( w )
w.show()
a.exec_loop()

@ -1,61 +0,0 @@
#!/usr/bin/env python
import sys
from qt import *
def TQMIN(x, y):
if y > x: return y
return x
class AnalogClock(TQWidget):
def __init__(self, *args):
apply(TQWidget.__init__,(self,) + args)
self.time = TQTime.currentTime()
internalTimer = TQTimer(self)
self.connect(internalTimer, SIGNAL("timeout()"), self.timeout)
internalTimer.start(5000)
def timeout(self):
new_time = TQTime.currentTime()
if new_time.minute() != self.time.minute():
self.update()
def paintEvent(self, qe):
if not self.isVisible():
return
self.time = TQTime.currentTime()
pts = TQPointArray()
paint = TQPainter(self)
paint.setBrush(self.foregroundColor())
cp = TQPoint(self.rect().center())
d = TQMIN(self.width(), self.height())
matrix = TQWMatrix()
matrix.translate(cp.x(), cp.y())
matrix.scale(d/1000.0, d/1000.0)
h_angle = 30*(self.time.hour()%12 - 3) + self.time.minute()/2
matrix.rotate(h_angle)
paint.setWorldMatrix(matrix)
pts.setPoints([-20,0,0,-20,300,0,0,20])
paint.drawPolygon(pts)
matrix.rotate(-h_angle)
m_angle = (self.time.minute()-15)*6
matrix.rotate(m_angle)
paint.setWorldMatrix(matrix)
pts.setPoints([-10,0,0,-10,400,0,0,10])
paint.drawPolygon(pts)
matrix.rotate(-m_angle)
for i in range(0,12):
paint.setWorldMatrix(matrix)
paint.drawLine(450,0, 500,0)
matrix.rotate(30)
a = TQApplication(sys.argv)
clock = AnalogClock()
clock.resize(100,100)
a.setMainWidget(clock)
clock.show()
a.exec_loop()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

@ -1,58 +0,0 @@
#!/usr/bin/env python
# A port to PyTQt of the dclock example from TQt v2.x.
import sys, string
from qt import *
class DigitalClock(TQLCDNumber):
def __init__(self, parent=None, name=None):
TQLCDNumber.__init__(self, parent, name)
self.showingColon = 0
self.setFrameStyle(TQFrame.Panel | TQFrame.Raised)
self.setLineWidth(2)
self.showTime()
self.normalTimer = self.startTimer(500)
self.showDateTimer = -1
def timerEvent(self, e):
if e.timerId() == self.showDateTimer:
self.stopDate()
else:
if self.showDateTimer == -1:
self.showTime()
def mousePressEvent(self, e):
if e.button() == TQt.LeftButton:
self.showDate()
def showDate(self):
if self.showDateTimer != -1:
return
d = TQDate.currentDate()
self.display('%2d %2d' % (d.month(), d.day()))
self.showDateTimer = self.startTimer(2000)
def stopDate(self):
self.killTimer(self.showDateTimer)
self.showDateTimer = -1
self.showTime()
def showTime(self):
self.showingColon = not self.showingColon
s = list(str(TQTime.currentTime().toString())[:5]) #.left(5)
if not self.showingColon:
s[2] = ' '
if s[0] == '0':
s[0] = ' '
s = string.join(s,'')
self.display(s)
a = TQApplication(sys.argv)
clock = DigitalClock()
clock.resize(170,80)
a.setMainWidget(clock)
clock.show()
a.exec_loop()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

@ -0,0 +1,52 @@
# Trinity-specific paths
import sys, os
tqt_modules = []
for m_path in sys.path:
if os.path.exists(os.path.join(m_path, 'sip4_tqt')):
m_sip_dir = os.path.join(m_path, 'sip4_tqt')
tqt_modules.insert(0, m_sip_dir)
if os.path.exists(os.path.join(m_path, 'python_tqt')):
m_pyqt_dir = os.path.join(m_path, 'python_tqt')
tqt_modules.insert(0, m_pyqt_dir)
for m_path in tqt_modules:
sys.path.insert(0, m_path)
# Checking if the module is available
def is_module_available(module_name):
if sys.version_info < (3, 0):
# python 2
import pkgutil
mod_loader = pkgutil.find_loader(module_name)
if sys.version_info <= (3, 3):
# python 3.0 to 3.3
import pkgutil
mod_loader = pkgutil.find_loader(module_name)
elif sys.version_info >= (3, 4):
# python 3.4 and above
import importlib.util
mod_loader = importlib.util.find_spec(module_name)
return mod_loader is not None
# Base modules
__all__ = [
'qt',
'qtcanvas',
'qtnetwork',
'qttable',
'qtsql',
'qtui',
'qtxml',
]
# Optional modules
if is_module_available('qtaxcontainer'):
__all__.append('qtaxcontainer')
if is_module_available('qtext'):
__all__.append('qtext')
if is_module_available('qtgl'):
__all__.append('qtgl')
# Import namespaces
from python_tqt import *

@ -1,280 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS

@ -1,260 +0,0 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
** Copyright (C) 2000, 2001 Phil Thompson <phil@river-bank.demon.co.uk>
**
** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "domtool.h"
#include <tqsizepolicy.h>
#include <tqpalette.h>
#include <tqcursor.h>
#include <tqrect.h>
#include <tqsize.h>
#include <tqfont.h>
/*!
\class DomTool domtool.h
\brief Tools for the dom
A collection of static functions used by Resource (part of the
designer) and Uic.
*/
/*!
Returns the contents of property \a name of object \a e as
variant or the variant passed as \a defValue if the property does
not exist.
\sa hasProperty()
*/
TQVariant DomTool::readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue )
{
TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "property" ) {
TQDomElement n2 = n.firstChild().toElement();
if ( n2.tagName() == "name" ) {
TQString prop = n2.firstChild().toText().data();
if ( prop == name )
return elementToVariant( n2.nextSibling().toElement(), defValue );
}
}
}
return defValue;
}
/*!
Returns wheter object \a e defines property \a name or not.
\sa readProperty()
*/
bool DomTool::hasProperty( const TQDomElement& e, const TQString& name )
{
TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "property" ) {
TQDomElement n2 = n.firstChild().toElement();
if ( n2.tagName() == "name" ) {
TQString prop = n2.firstChild().toText().data();
if ( prop == name )
return TRUE;
}
}
}
return FALSE;
}
TQVariant DomTool::elementToVariant( const TQDomElement& e, const TQVariant& defValue )
{
TQString dummy;
return elementToVariant( e, defValue, dummy );
}
/*!
Interprets element \a e as variant and returns the result of the interpretation.
*/
TQVariant DomTool::elementToVariant( const TQDomElement& e, const TQVariant& defValue, TQString &comment )
{
TQVariant v;
if ( e.tagName() == "rect" ) {
TQDomElement n3 = e.firstChild().toElement();
int x = 0, y = 0, w = 0, h = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "x" )
x = n3.firstChild().toText().data().toInt();
else if ( n3.tagName() == "y" )
y = n3.firstChild().toText().data().toInt();
else if ( n3.tagName() == "width" )
w = n3.firstChild().toText().data().toInt();
else if ( n3.tagName() == "height" )
h = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
v = TQVariant( TQRect( x, y, w, h ) );
} else if ( e.tagName() == "point" ) {
TQDomElement n3 = e.firstChild().toElement();
int x = 0, y = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "x" )
x = n3.firstChild().toText().data().toInt();
else if ( n3.tagName() == "y" )
y = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
v = TQVariant( TQPoint( x, y ) );
} else if ( e.tagName() == "size" ) {
TQDomElement n3 = e.firstChild().toElement();
int w = 0, h = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "width" )
w = n3.firstChild().toText().data().toInt();
else if ( n3.tagName() == "height" )
h = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
v = TQVariant( TQSize( w, h ) );
} else if ( e.tagName() == "color" ) {
v = TQVariant( readColor( e ) );
} else if ( e.tagName() == "font" ) {
TQDomElement n3 = e.firstChild().toElement();
TQFont f( defValue.toFont() );
while ( !n3.isNull() ) {
if ( n3.tagName() == "family" )
f.setFamily( n3.firstChild().toText().data() );
else if ( n3.tagName() == "pointsize" )
f.setPointSize( n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "bold" )
f.setBold( n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "italic" )
f.setItalic( n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "underline" )
f.setUnderline( n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "strikeout" )
f.setStrikeOut( n3.firstChild().toText().data().toInt() );
n3 = n3.nextSibling().toElement();
}
v = TQVariant( f );
} else if ( e.tagName() == "string" ) {
v = TQVariant( e.firstChild().toText().data() );
TQDomElement n = e;
n = n.nextSibling().toElement();
if ( n.tagName() == "comment" )
comment = n.firstChild().toText().data();
} else if ( e.tagName() == "cstring" ) {
v = TQVariant( TQCString( e.firstChild().toText().data() ) );
} else if ( e.tagName() == "number" ) {
v = TQVariant( e.firstChild().toText().data().toInt() );
} else if ( e.tagName() == "bool" ) {
TQString t = e.firstChild().toText().data();
v = TQVariant( t == "true" || t == "1", 0 );
} else if ( e.tagName() == "pixmap" ) {
v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "iconset" ) {
v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "image" ) {
v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "enum" ) {
v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "set" ) {
v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "sizepolicy" ) {
TQDomElement n3 = e.firstChild().toElement();
TQSizePolicy sp;
while ( !n3.isNull() ) {
if ( n3.tagName() == "hsizetype" )
sp.setHorData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "vsizetype" )
sp.setVerData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
n3 = n3.nextSibling().toElement();
}
v = TQVariant( sp );
} else if ( e.tagName() == "cursor" ) {
v = TQVariant( TQCursor( e.firstChild().toText().data().toInt() ) );
}
return v;
}
/*! Returns the color which is returned in the dom element \a e.
*/
TQColor DomTool::readColor( const TQDomElement &e )
{
TQDomElement n = e.firstChild().toElement();
int r= 0, g = 0, b = 0;
while ( !n.isNull() ) {
if ( n.tagName() == "red" )
r = n.firstChild().toText().data().toInt();
else if ( n.tagName() == "green" )
g = n.firstChild().toText().data().toInt();
else if ( n.tagName() == "blue" )
b = n.firstChild().toText().data().toInt();
n = n.nextSibling().toElement();
}
return TQColor( r, g, b );
}
/*!
Returns the contents of attribute \a name of object \a e as
variant or the variant passed as \a defValue if the attribute does
not exist.
\sa hasAttribute()
*/
TQVariant DomTool::readAttribute( const TQDomElement& e, const TQString& name, const TQVariant& defValue )
{
TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "attribute" ) {
TQDomElement n2 = n.firstChild().toElement();
if ( n2.tagName() == "name" ) {
TQString prop = n2.firstChild().toText().data();
if ( prop == name )
return elementToVariant( n2.nextSibling().toElement(), defValue );
}
}
}
return defValue;
}
/*!
Returns wheter object \a e defines attribute \a name or not.
\sa readAttribute()
*/
bool DomTool::hasAttribute( const TQDomElement& e, const TQString& name )
{
TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "attribute" ) {
TQDomElement n2 = n.firstChild().toElement();
if ( n2.tagName() == "name" ) {
TQString prop = n2.firstChild().toText().data();
if ( prop == name )
return TRUE;
}
}
}
return FALSE;
}

@ -1,41 +0,0 @@
/**********************************************************************
** Copyright (C) 2000 Troll Tech AS. All rights reserved.
** Copyright (C) 2000, 2001 Phil Thompson <phil@river-bank.demon.co.uk>
**
** This file is part of TQt GUI Designer.
**
** This file may be distributed under the terms of the GNU General
** Public License version 2 as published by the Free Software
** Foundation and appearing in the file COPYING included in the
** packaging of this file. If you did not get the file, send email
** to info@trolltech.com
**
** The file is provided AS IS with NO WARRANTY OF ANY KIND,
** INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE.
**
**********************************************************************/
#ifndef DOMTOOL_H
#define DOMTOOL_H
#include <tqnamespace.h>
#include <tqvariant.h>
#include <tqdom.h>
class DomTool : public TQt
{
public:
static TQVariant readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue );
static bool hasProperty( const TQDomElement& e, const TQString& name );
static TQVariant elementToVariant( const TQDomElement& e, const TQVariant& defValue );
static TQVariant elementToVariant( const TQDomElement& e, const TQVariant& defValue, TQString &comment );
static TQVariant readAttribute( const TQDomElement& e, const TQString& name, const TQVariant& defValue );
static bool hasAttribute( const TQDomElement& e, const TQString& name );
static TQColor readColor( const TQDomElement &e );
};
#endif // DOMTOOL_H

@ -1,33 +0,0 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#ifndef GLOBALDEFS_H
#define GLOBALDEFS_H
#include <tqcolor.h>
#define BOXLAYOUT_DEFAULT_MARGIN 11
#define BOXLAYOUT_DEFAULT_SPACING 6
static TQColor backColor1( 226, 244, 216 );
static TQColor backColor2( 235, 235, 235 );
static TQColor selectedBack( 192, 192, 192 );
#endif

@ -1,24 +0,0 @@
# Copyright (c) 2000, 2001
# Phil Thompson <phil@river-bank.demon.co.uk>
# Copyright (c) 2002, 2003
# Riverbank Computing Limited <info@riverbankcomputing.co.uk>
#
# The project file for pyuic for TQt v2.
TEMPLATE = app
CONFIG = qt console warn_on release
INCLUDEPATH = @BLX_INCLUDEPATH@ $(QTDIR)/src/3rdparty/zlib
DEFINES = UIC @BLX_DEFINES@
DESTDIR = @PYQT_BINDIR@
TARGET = pyuic
HEADERS = domtool.h \
globaldefs.h \
uic.h \
widgetdatabase.h
SOURCES = domtool.cpp \
uic.cpp \
widgetdatabase.cpp

@ -1,24 +0,0 @@
# This is the build file for pyuic for TQt v2.
#
# 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.
target = pyuic
sources = uic.cpp widgetdatabase.cpp domtool.cpp
headers = uic.h widgetdatabase.h domtool.h globaldefs.h

File diff suppressed because it is too large Load Diff

@ -1,133 +0,0 @@
/**********************************************************************
** Copyright (C) 2000 Troll Tech AS. All rights reserved.
** Copyright (C) 2000, 2001 Phil Thompson <phil@river-bank.demon.co.uk>
**
** This file is part of TQt GUI Designer.
**
** This file may be distributed under the terms of the GNU General
** Public License version 2 as published by the Free Software
** Foundation and appearing in the file COPYING included in the
** packaging of this file. If you did not get the file, send email
** to info@trolltech.com
**
** The file is provided AS IS with NO WARRANTY OF ANY KIND,
** INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE.
**
**********************************************************************/
#ifndef UIC_H
#define UIC_H
#include <tqnamespace.h>
#include <tqdom.h>
#include <tqstring.h>
#include <tqstringlist.h>
#include <tqmap.h>
#include <tqtextstream.h>
#include <tqcolor.h>
#define PYTQT_VERSION "3.18.1"
class Uic : public TQt
{
public:
Uic( TQTextStream& out, TQDomDocument doc, const TQString &trm );
void createFormImpl( const TQDomElement &e );
TQString createObjectImpl( const TQDomElement &e, const TQString& parentClass, const TQString& parent, const TQString& layout = TQString::null );
TQString createLayoutImpl( const TQDomElement &e, const TQString& parentClass, const TQString& parent, const TQString& layout = TQString::null );
TQString createObjectInstance( const TQString& objClass, const TQString& parent, const TQString& objName );
TQString createSpacerImpl( const TQDomElement &e, const TQString& parentClass, const TQString& parent, const TQString& layout = TQString::null );
void createExclusiveProperty( const TQDomElement & e, const TQString& exclusiveProp );
TQString createListBoxItemImpl( const TQDomElement &e, const TQString &parent );
TQString createIconViewItemImpl( const TQDomElement &e, const TQString &parent );
TQString createListViewColumnImpl( const TQDomElement &e, const TQString &parent );
TQString createListViewItemImpl( const TQDomElement &e, const TQString &parent,
const TQString &parentItem );
void createColorGroupImpl( const TQString& cg, const TQDomElement& e );
TQColorGroup loadColorGroup( const TQDomElement &e );
TQString getClassName( const TQDomElement& e );
TQString getObjectName( const TQDomElement& e );
TQString getLayoutName( const TQDomElement& e );
TQString setObjectProperty( const TQString& objClass, const TQString& obj, const TQString &prop, const TQDomElement &e, bool stdset );
TQString registerObject( const TQString& name );
TQString registeredName( const TQString& name );
bool isObjectRegistered( const TQString& name );
TQStringList unique( const TQStringList& );
private:
void pushIndent()
{
++nrindents;
setIndent();
}
void popIndent()
{
--nrindents;
setIndent();
}
void setIndent()
{
indent = "";
for (int i = 0; i < nrindents; ++i)
indent += newindent;
}
void initIndent()
{
newindent = " ";
indent = "";
nrindents = 0;
}
TQString indent, newindent;
int nrindents;
TQTextStream& out;
TQStringList objectNames;
TQMap<TQString,TQString> objectMapper;
TQStringList tags;
TQStringList layouts;
TQString formName;
TQString lastItem;
TQString trmacro;
struct Buddy
{
Buddy( const TQString& k, const TQString& b )
: key( k ), buddy( b ) {}
Buddy(){}; // for valuelist
TQString key;
TQString buddy;
bool operator==( const Buddy& other ) const
{ return (key == other.key); }
};
struct CustomInclude
{
TQString header;
TQString location;
};
TQValueList<Buddy> buddies;
TQStringList layoutObjects;
bool isLayout( const TQString& name ) const;
uint item_used : 1;
uint cg_used : 1;
uint pal_used : 1;
TQString pixmapLoaderFunction;
TQString nameOfClass;
};
#endif

@ -1,640 +0,0 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include <tqvariant.h> // HP-UX compiler needs this here
#include "widgetdatabase.h"
#if defined(DESIGNER)
#include "../designer/formwindow.h"
#include "../designer/pixmapchooser.h"
#endif
//#include "../integration/tdevelop/tdewidgets.h"
#include <globaldefs.h>
#include <tqstrlist.h>
#include <tqdict.h>
#include <tqfile.h>
#include <tqtextstream.h>
#include <tqmodules.h>
const int dbsize = 300;
const int dbcustom = 200;
const int dbdictsize = 211;
static WidgetDatabaseRecord* db[ dbsize ];
static TQDict<int> *className2Id = 0;
static int dbcount = 0;
static int dbcustomcount = 200;
static TQStrList *wGroups;
static TQStrList *invisibleGroups;
static bool whatsThisLoaded = FALSE;
WidgetDatabaseRecord::WidgetDatabaseRecord()
{
isContainer = FALSE;
icon = 0;
nameCounter = 0;
}
WidgetDatabaseRecord::~WidgetDatabaseRecord()
{
delete icon;
}
/*!
\class WidgetDatabase widgetdatabase.h
\brief The WidgetDatabase class holds information about widgets
The WidgetDatabase holds information about widgets like toolTip(),
iconSet(), ... It works Id-based, so all access functions take the
widget id as parameter. To get the id for a widget (classname), use
idFromClassName().
All access functions are static. Having multiple widgetdatabases in
one application doesn't make sense anyway and so you don't need more
than an instance of the widgetdatabase.
For creating widgets, layouts, etc. see WidgetFactory.
*/
/*!
Creatse widget database. Does nothing
*/
WidgetDatabase::WidgetDatabase()
{
}
/*! Sets up the widget database. If the static widgetdatabase already
exists, the functions returns immediately.
*/
void WidgetDatabase::setupDataBase()
{
if ( dbcount )
return;
wGroups = new TQStrList;
invisibleGroups = new TQStrList;
invisibleGroups->append( "Forms" );
invisibleGroups->append( "Temp" );
className2Id = new TQDict<int>( dbdictsize );
className2Id->setAutoDelete( TRUE );
WidgetDatabaseRecord *r = 0;
r = new WidgetDatabaseRecord;
r->iconSet = "pushbutton.xpm";
r->name = "TQPushButton";
r->group = widgetGroup( "Buttons" );
r->toolTip = "Push Button";
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "toolbutton.xpm";
r->name = "TQToolButton";
r->group = widgetGroup( "Buttons" );
r->toolTip = "Tool Button";
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "radiobutton.xpm";
r->name = "TQRadioButton";
r->group = widgetGroup( "Buttons" );
r->toolTip = "Radio Button";
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "checkbox.xpm";
r->name = "TQCheckBox";
r->group = widgetGroup( "Buttons" );
r->toolTip = "Check Box";
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "groupbox.xpm";
r->name = "TQGroupBox";
r->group = widgetGroup( "Containers" );
r->toolTip = "Group Box";
r->isContainer = TRUE;
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "buttongroup.xpm";
r->name = "TQButtonGroup";
r->group = widgetGroup( "Containers" );
r->toolTip = "Button Group";
r->isContainer = TRUE;
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "frame.xpm";
r->name = "TQFrame";
r->group = widgetGroup( "Containers" );
r->toolTip = "Frame";
r->isContainer = TRUE;
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "tabwidget.xpm";
r->name = "TQTabWidget";
r->group = widgetGroup( "Containers" );
r->toolTip = "Tabwidget";
r->isContainer = TRUE;
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "listbox.xpm";
r->name = "TQListBox";
r->group = widgetGroup( "Views" );
r->toolTip = "List Box";
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "listview.xpm";
r->name = "TQListView";
r->group = widgetGroup( "Views" );
r->toolTip = "List View";
append( r );
#if defined(TQT_MODULE_ICONVIEW) || defined(UIC)
r = new WidgetDatabaseRecord;
r->iconSet = "iconview.xpm";
r->name = "TQIconView";
r->group = widgetGroup( "Views" );
r->toolTip = "Icon View";
append( r );
#endif
#if defined(TQT_MODULE_TABLE)
r = new WidgetDatabaseRecord;
r->iconSet = "table.xpm";
r->name = "TQTable";
r->group = widgetGroup( "Views" );
r->toolTip = "Table";
append( r );
#endif
r = new WidgetDatabaseRecord;
r->iconSet = "lineedit.xpm";
r->name = "TQLineEdit";
r->group = widgetGroup( "Input" );
r->toolTip = "Line Edit";
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "spinbox.xpm";
r->name = "TQSpinBox";
r->group = widgetGroup( "Input" );
r->toolTip = "Spin Box";
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "multilineedit.xpm";
r->name = "TQMultiLineEdit";
r->group = widgetGroup( "Input" );
r->toolTip = "Multi Line Edit";
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "combobox.xpm";
r->name = "TQComboBox";
r->group = widgetGroup( "Input" );
r->toolTip = "Combo Box";
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "slider.xpm";
r->name = "TQSlider";
r->group = widgetGroup( "Input" );
r->toolTip = "Slider";
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "dial.xpm";
r->name = "TQDial";
r->group = widgetGroup( "Input" );
r->toolTip = "Dial";
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "label.xpm";
r->name = "TQLabel";
r->group = widgetGroup( "Temp" );
r->toolTip = "Label";
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "label.xpm";
r->name = "TextLabel";
r->group = widgetGroup( "Display" );
r->toolTip = "Text Label";
r->whatsThis = "The Text Label provides a widget to display static text.";
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "pixlabel.xpm";
r->name = "PixmapLabel";
r->group = widgetGroup( "Display" );
r->toolTip = "Pixmap Label";
r->whatsThis = "The Pixmap Label provides a widget to display pixmaps.";
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "lcdnumber.xpm";
r->name = "TQLCDNumber";
r->group = widgetGroup( "Display" );
r->toolTip = "LCD Number";
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "line.xpm";
r->name = "Line";
r->group = widgetGroup( "Display" );
r->toolTip = "Line";
r->includeFile = "qframe.h";
r->whatsThis = "The Line widget provides horizontal and vertical lines.";
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "progress.xpm";
r->name = "TQProgressBar";
r->group = widgetGroup( "Display" );
r->toolTip = "Progress Bar";
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "textview.xpm";
r->name = "TQTextView";
r->group = widgetGroup( "Display" );
r->toolTip = "Text View";
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "textbrowser.xpm";
r->name = "TQTextBrowser";
r->group = widgetGroup( "Display" );
r->toolTip = "Text Browser";
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "spacer.xpm";
r->name = "Spacer";
r->group = widgetGroup( "Temp" );
r->toolTip = "Spacer";
r->whatsThis = "The Spacer provides horizontal and vertical spacing to be able to manipulate the bahviour of layouts.";
append( r );
r = new WidgetDatabaseRecord;
r->name = "TQWidget";
r->isContainer = FALSE;
r->group = widgetGroup( "Forms" );
append( r );
r = new WidgetDatabaseRecord;
r->name = "TQDialog";
r->group = widgetGroup( "Forms" );
r->isContainer = FALSE;
append( r );
r = new WidgetDatabaseRecord;
r->name = "TQWizard";
r->group = widgetGroup( "Forms" );
r->isContainer = TRUE;
append( r );
r = new WidgetDatabaseRecord;
r->name = "TQDesignerWizard";
r->group = widgetGroup( "Forms" );
r->isContainer = TRUE;
append( r );
r = new WidgetDatabaseRecord;
r->name = "TQLayoutWidget";
r->group = widgetGroup( "Temp" );
r->includeFile = "";
r->isContainer = TRUE;
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "tabwidget.xpm";
r->name = "TQDesignerTabWidget";
r->group = widgetGroup( "Temp" );
r->isContainer = TRUE;
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "tabwidget.xpm";
r->name = "TQDesignerWidget";
r->group = widgetGroup( "Temp" );
r->isContainer = TRUE;
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "tabwidget.xpm";
r->name = "TQDesignerDialog";
r->group = widgetGroup( "Temp" );
r->isContainer = TRUE;
append( r );
// tqt_init_kde_widget_database();
}
/*!
Returns the number of elements in the widget database.
*/
int WidgetDatabase::count()
{
setupDataBase();
return dbcount;
}
/*!
Returns the id at which the ids of custom widgets start.
*/
int WidgetDatabase::startCustom()
{
setupDataBase();
return dbcustom;
}
/*! Returns the iconset which represents the class registered as \a
id.
*/
TQIconSet WidgetDatabase::iconSet( int id )
{
setupDataBase();
WidgetDatabaseRecord *r = at( id );
if ( !r )
return TQIconSet();
#if defined(DESIGNER)
if ( !r->icon )
r->icon = new TQIconSet( PixmapChooser::loadPixmap( r->iconSet, PixmapChooser::Small ),
PixmapChooser::loadPixmap( r->iconSet, PixmapChooser::Large ) );
return *r->icon;
#endif
return TQIconSet();
}
/*!
Returns the classname of the widget which is registered as \a id.
*/
TQString WidgetDatabase::className( int id )
{
setupDataBase();
WidgetDatabaseRecord *r = at( id );
if ( !r )
return TQString::null;
return r->name;
}
/*!
Returns the group to which the widget registered as \a id belongs.
*/
TQString WidgetDatabase::group( int id )
{
setupDataBase();
WidgetDatabaseRecord *r = at( id );
if ( !r )
return TQString::null;
return r->group;
}
/*! Returns the tooltip text of the widget which is registered as \a
id.
*/
TQString WidgetDatabase::toolTip( int id )
{
setupDataBase();
WidgetDatabaseRecord *r = at( id );
if ( !r )
return TQString::null;
return r->toolTip;
}
/*! Returns the what's this? test of the widget which is registered
as \a id.
*/
TQString WidgetDatabase::whatsThis( int id )
{
setupDataBase();
WidgetDatabaseRecord *r = at( id );
if ( !r )
return TQString::null;
return r->whatsThis;
}
/*!
Returns the include file if the widget which is registered as \a id.
*/
TQString WidgetDatabase::includeFile( int id )
{
setupDataBase();
WidgetDatabaseRecord *r = at( id );
if ( !r )
return TQString::null;
if ( r->includeFile.isNull() )
return r->name.lower() + ".h";
return r->includeFile;
}
/*! Returns wheather the widget registered as \a id is a container
(can have children) or not.
*/
bool WidgetDatabase::isContainer( int id )
{
setupDataBase();
WidgetDatabaseRecord *r = at( id );
if ( !r )
return FALSE;
return r->isContainer;
}
TQString WidgetDatabase::createWidgetName( int id )
{
setupDataBase();
TQString n = className( id );
if ( n == "TQLayoutWidget" )
n = "Layout";
if ( n[ 0 ] == 'Q' )
n = n.mid( 1 );
WidgetDatabaseRecord *r = at( id );
if ( !r )
return n;
n += TQString::number( ++r->nameCounter );
return n;
}
/*! Returns the id for \a name or -1 if \a name is unknown.
*/
int WidgetDatabase::idFromClassName( const TQString &name )
{
setupDataBase();
if ( name.isEmpty() )
return 0;
int *i = className2Id->find( name );
if ( i )
return *i;
if ( name == "FormWindow" )
return idFromClassName( "TQLayoutWidget" );
return -1;
}
WidgetDatabaseRecord *WidgetDatabase::at( int index )
{
if ( index < 0 )
return 0;
if ( index >= dbcustom && index < dbcustomcount )
return db[ index ];
if ( index < dbcount )
return db[ index ];
return 0;
}
void WidgetDatabase::insert( int index, WidgetDatabaseRecord *r )
{
if ( index < 0 || index >= dbsize )
return;
db[ index ] = r;
className2Id->insert( r->name, new int( index ) );
if ( index < dbcustom )
dbcount = TQMAX( dbcount, index );
}
void WidgetDatabase::append( WidgetDatabaseRecord *r )
{
insert( dbcount++, r );
}
TQString WidgetDatabase::widgetGroup( const TQString &g )
{
if ( wGroups->find( g ) == -1 )
wGroups->append( g );
return g;
}
TQString WidgetDatabase::widgetGroup( int i )
{
setupDataBase();
if ( i >= 0 && i < (int)wGroups->count() )
return wGroups->at( i );
return TQString::null;
}
int WidgetDatabase::numWidgetGroups()
{
setupDataBase();
return wGroups->count();
}
bool WidgetDatabase::isGroupVisible( const TQString &g )
{
setupDataBase();
return invisibleGroups->find( g ) == -1;
}
int WidgetDatabase::addCustomWidget( WidgetDatabaseRecord *r )
{
insert( dbcustomcount++, r );
return dbcustomcount - 1;
}
bool WidgetDatabase::isCustomWidget( int id )
{
if ( id >= dbcustom && id < dbcustomcount )
return TRUE;
return FALSE;
}
bool WidgetDatabase::isWhatsThisLoaded()
{
return whatsThisLoaded;
}
void WidgetDatabase::loadWhatsThis( const TQString &docPath )
{
TQString whatsthisFile = docPath + "/whatsthis";
TQFile f( whatsthisFile );
if ( !f.open( IO_ReadOnly ) )
return;
TQTextStream ts( &f );
while ( !ts.atEnd() ) {
TQString s = ts.readLine();
TQStringList l = TQStringList::split( " | ", s );
int id = idFromClassName( l[ 1 ] );
WidgetDatabaseRecord *r = at( id );
if ( r )
r->whatsThis = l[ 0 ];
}
whatsThisLoaded = TRUE;
}

@ -1,75 +0,0 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#ifndef WIDGETDATABASE_H
#define WIDGETDATABASE_H
#include <tqiconset.h>
#include <tqstring.h>
#include <tqstringlist.h>
struct WidgetDatabaseRecord
{
WidgetDatabaseRecord();
~WidgetDatabaseRecord();
TQString iconSet, name, group, toolTip, whatsThis, includeFile;
uint isContainer : 1;
TQIconSet *icon;
int nameCounter;
};
class WidgetDatabase : public TQt
{
public:
WidgetDatabase();
static void setupDataBase();
static int count();
static int startCustom();
static TQIconSet iconSet( int id );
static TQString className( int id );
static TQString group( int id );
static TQString toolTip( int id );
static TQString whatsThis( int id );
static TQString includeFile( int id );
static bool isContainer( int id );
static int idFromClassName( const TQString &name );
static TQString createWidgetName( int id );
static WidgetDatabaseRecord *at( int index );
static void insert( int index, WidgetDatabaseRecord *r );
static void append( WidgetDatabaseRecord *r );
static TQString widgetGroup( const TQString &g );
static TQString widgetGroup( int i );
static int numWidgetGroups();
static bool isGroupVisible( const TQString &g );
static int addCustomWidget( WidgetDatabaseRecord *r );
static bool isCustomWidget( int id );
static bool isWhatsThisLoaded();
static void loadWhatsThis( const TQString &docPath );
};
#endif

@ -128,14 +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: " << TQDateTime::currentDateTime().toString() << "\n"; out << "# Created by: The PyTQt User Interface Compiler (pyuic) " << PYTQT_VERSION << "\n";
out << "# by: The PyTQt User Interface Compiler (pyuic) " << 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 qt import TQImage, TQMimeSourceFactory"; out << "from python_tqt.qt import TQImage, TQMimeSourceFactory";
#ifndef QT_NO_IMAGE_COLLECTION_COMPRESSION #ifndef QT_NO_IMAGE_COLLECTION_COMPRESSION
out << ", tqUncompress"; out << ", tqUncompress";
#endif #endif

@ -258,13 +258,13 @@ void Uic::createFormImpl( const TQDomElement &e )
} }
if (globalIncludes.findIndex("qtable.h") >= 0) if (globalIncludes.findIndex("qtable.h") >= 0)
out << indent << "from qttable import TQTable" << endl; out << indent << "from python_tqt.qttable import TQTable" << endl;
if (!axwidgets.empty()) if (!axwidgets.empty())
out << indent << "from qtaxcontainer import TQAxWidget" << endl; out << indent << "from python_tqt.qtaxcontainer import TQAxWidget" << endl;
if (globalIncludes.findIndex("qextscintilla.h") >= 0) if (globalIncludes.findIndex("qextscintilla.h") >= 0)
out << indent << "from qtext import QextScintilla" << endl; out << indent << "from python_tqt.qtext import QextScintilla" << endl;
registerDatabases( e ); registerDatabases( e );
dbConnections = unique( dbConnections ); dbConnections = unique( dbConnections );
@ -302,7 +302,7 @@ void Uic::createFormImpl( const TQDomElement &e )
sqlClasses += "TQDataView"; sqlClasses += "TQDataView";
if ( !sqlClasses.empty() ) { if ( !sqlClasses.empty() ) {
out << indent << "from qtsql import"; out << indent << "from python_tqt.qtsql import";
const char *sep = " "; const char *sep = " ";
for ( it = sqlClasses.begin(); it != sqlClasses.end(); ++it ) { for ( it = sqlClasses.begin(); it != sqlClasses.end(); ++it ) {

@ -209,8 +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: " << TQDateTime::currentDateTime().toString() << endl; out << "# Created by: The PyTQt User Interface Compiler (pyuic) " << PYTQT_VERSION << endl;
out << "# by: The PyTQt User Interface Compiler (pyuic) " << 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;
@ -220,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 qt import *" << endl; out << "from python_tqt.qt import *" << endl;
Uic( fileName, outputFile, out, doc, subcl, trmacro, className, uicClass ); Uic( fileName, outputFile, out, doc, subcl, trmacro, className, uicClass );

@ -37,32 +37,19 @@ class TQAccel : TQObject
public: public:
TQAccel(TQWidget * /TransferThis/,char * = 0); TQAccel(TQWidget * /TransferThis/,char * = 0);
%If (TQt_2_1_0 -)
TQAccel(TQWidget *,TQObject * /TransferThis/,char * = 0); TQAccel(TQWidget *,TQObject * /TransferThis/,char * = 0);
%End
bool isEnabled(); bool isEnabled();
void setEnabled(bool); void setEnabled(bool);
uint count(); uint count();
%If (- TQt_3_0_0)
int insertItem(int,int = -1);
%End
%If (TQt_3_0_0 -)
int insertItem(const TQKeySequence &,int = -1); int insertItem(const TQKeySequence &,int = -1);
%End
void removeItem(int); void removeItem(int);
void clear(); void clear();
%If (- TQt_3_0_0)
int key(int);
int findKey(int) const;
%End
%If (TQt_3_0_0 -)
TQKeySequence key(int); TQKeySequence key(int);
int findKey(const TQKeySequence &) const; int findKey(const TQKeySequence &) const;
%End
bool isItemEnabled(int) const; bool isItemEnabled(int) const;
void setItemEnabled(int,bool); void setItemEnabled(int,bool);
@ -72,29 +59,18 @@ public:
void repairEventFilter(); void repairEventFilter();
%If (TQt_2_00 -)
void setWhatsThis(int,const TQString &); void setWhatsThis(int,const TQString &);
TQString whatsThis(int) const; TQString whatsThis(int) const;
void setIgnoreWhatsThis(bool); void setIgnoreWhatsThis(bool);
bool ignoreWhatsThis() const; bool ignoreWhatsThis() const;
%End
%If (TQt_2_00 - TQt_3_0_0)
static int shortcutKey(const TQString &);
static TQString keyToString(int);
static int stringToKey(const TQString &);
%End
%If (TQt_3_0_0 -)
static TQKeySequence shortcutKey(const TQString &); static TQKeySequence shortcutKey(const TQString &);
static TQString keyToString(TQKeySequence); static TQString keyToString(TQKeySequence);
static TQKeySequence stringToKey(const TQString &); static TQKeySequence stringToKey(const TQString &);
%End
signals: signals:
void activated(int); void activated(int);
%If (TQt_3_1_0 -)
void activatedAmbiguously(int); void activatedAmbiguously(int);
%End
protected: protected:
bool eventFilter(TQObject *,TQEvent *); bool eventFilter(TQObject *,TQEvent *);

@ -36,7 +36,6 @@
%If (TQt_ACTION) %If (TQt_ACTION)
%If (TQt_2_2_0 -)
class TQAction : TQObject class TQAction : TQObject
{ {
@ -45,35 +44,19 @@ class TQAction : TQObject
%End %End
public: public:
%If (- TQt_3_0_0)
TQAction(TQObject * /TransferThis/ = 0,const char * = 0,bool = 0);
TQAction(const TQString &,const TQIconSet &,const TQString &,int,
TQObject * /TransferThis/,const char * = 0,bool = 0);
TQAction(const TQString &,const TQString &,int,TQObject * /TransferThis/,
const char * = 0,bool = 0);
%End
%If (TQt_3_0_0 - TQt_3_2_0)
TQAction(TQObject * /TransferThis/,const char * = 0,bool = 0);
%End
%If (TQt_3_2_0 -)
TQAction(TQObject * /TransferThis/,const char * = 0); TQAction(TQObject * /TransferThis/,const char * = 0);
TQAction(const TQString &,TQKeySequence,TQObject * /TransferThis/, TQAction(const TQString &,TQKeySequence,TQObject * /TransferThis/,
const char * = 0); const char * = 0);
TQAction(const TQIconSet &,const TQString &,TQKeySequence, TQAction(const TQIconSet &,const TQString &,TQKeySequence,
TQObject * /TransferThis/,const char * = 0); TQObject * /TransferThis/,const char * = 0);
%End
%If (TQt_3_0_0 -)
// Obsolete. // Obsolete.
TQAction(const TQString &,const TQIconSet &,const TQString &,TQKeySequence, TQAction(const TQString &,const TQIconSet &,const TQString &,TQKeySequence,
TQObject * /TransferThis/,const char * = 0,bool = 0); TQObject * /TransferThis/,const char * = 0,bool = 0);
// Obsolete. // Obsolete.
TQAction(const TQString &,const TQString &,TQKeySequence, TQAction(const TQString &,const TQString &,TQKeySequence,
TQObject * /TransferThis/,const char * = 0,bool = 0); TQObject * /TransferThis/,const char * = 0,bool = 0);
%End
%If (TQt_3_2_0 -)
// Obsolete. // Obsolete.
TQAction(TQObject * /TransferThis/,const char *,bool); TQAction(TQObject * /TransferThis/,const char *,bool);
%End
virtual void setIconSet(const TQIconSet &); virtual void setIconSet(const TQIconSet &);
TQIconSet iconSet() const; TQIconSet iconSet() const;
@ -87,57 +70,34 @@ public:
TQString statusTip() const; TQString statusTip() const;
virtual void setWhatsThis(const TQString &); virtual void setWhatsThis(const TQString &);
TQString whatsThis() const; TQString whatsThis() const;
%If (- TQt_3_0_0)
virtual void setAccel(int);
int accel() const;
%End
%If (TQt_3_0_0 -)
virtual void setAccel(const TQKeySequence &); virtual void setAccel(const TQKeySequence &);
TQKeySequence accel() const; TQKeySequence accel() const;
%End
virtual void setToggleAction(bool); virtual void setToggleAction(bool);
bool isToggleAction() const; bool isToggleAction() const;
%If (- TQt_3_0_0)
virtual void setOn(bool);
%End
bool isOn() const; bool isOn() const;
bool isEnabled() const; bool isEnabled() const;
%If (TQt_3_1_0 -)
bool isVisible() const; bool isVisible() const;
%End
virtual bool addTo(TQWidget *); virtual bool addTo(TQWidget *);
virtual bool removeFrom(TQWidget *); virtual bool removeFrom(TQWidget *);
protected: protected:
%If (TQt_3_0_0 -)
virtual void addedTo(TQWidget *,TQWidget *); virtual void addedTo(TQWidget *,TQWidget *);
virtual void addedTo(int,TQPopupMenu *); virtual void addedTo(int,TQPopupMenu *);
%End
public slots: public slots:
%If (TQt_3_3_0 -)
void activate(); void activate();
%End
%If (TQt_3_0_0 -)
void toggle(); void toggle();
virtual void setOn(bool); virtual void setOn(bool);
%End
virtual void setEnabled(bool); virtual void setEnabled(bool);
%If (TQt_3_3_0 -)
void setDisabled(bool); void setDisabled(bool);
%End
%If (TQt_3_1_0 -)
void setVisible(bool); void setVisible(bool);
%End
signals: signals:
void activated(); void activated();
void toggled(bool); void toggled(bool);
private: private:
%If (TQt_3_1_0 -)
TQAction(const TQAction &); TQAction(const TQAction &);
%End
}; };
@ -148,36 +108,20 @@ class TQActionGroup : TQAction
%End %End
public: public:
%If (- TQt_3_0_0)
TQActionGroup(TQWidget * /TransferThis/,const char * = 0,bool = 1);
%End
%If (TQt_3_0_0 - TQt_3_2_0)
TQActionGroup(TQObject * /TransferThis/,const char * = 0,bool = 1);
%End
%If (TQt_3_2_0 -)
TQActionGroup(TQObject * /TransferThis/,const char * = 0); TQActionGroup(TQObject * /TransferThis/,const char * = 0);
// Obsolete. // Obsolete.
TQActionGroup(TQObject * /TransferThis/,const char *,bool); TQActionGroup(TQObject * /TransferThis/,const char *,bool);
%End
void setExclusive(bool); void setExclusive(bool);
bool isExclusive() const; bool isExclusive() const;
%If (- TQt_3_0_0)
void insert(TQAction *);
%End
%If (TQt_3_0_0 -)
void add(TQAction *); void add(TQAction *);
void addSeparator(); void addSeparator();
%End
bool addTo(TQWidget *); bool addTo(TQWidget *);
bool removeFrom(TQWidget *); bool removeFrom(TQWidget *);
void setEnabled(bool); void setEnabled(bool);
%If (TQt_3_2_0 -)
void setToggleAction(bool); void setToggleAction(bool);
void setOn(bool); void setOn(bool);
%End
%If (TQt_3_0_0 -)
void setUsesDropDown(bool); void setUsesDropDown(bool);
bool usesDropDown() const; bool usesDropDown() const;
@ -186,25 +130,19 @@ public:
void setMenuText(const TQString &); void setMenuText(const TQString &);
void setToolTip(const TQString &); void setToolTip(const TQString &);
void setWhatsThis(const TQString &); void setWhatsThis(const TQString &);
%End
protected: protected:
%If (TQt_3_0_0 -)
void childEvent(TQChildEvent *); void childEvent(TQChildEvent *);
virtual void addedTo(TQWidget *,TQWidget *,TQAction *); virtual void addedTo(TQWidget *,TQWidget *,TQAction *);
virtual void addedTo(int,TQPopupMenu *,TQAction *); virtual void addedTo(int,TQPopupMenu *,TQAction *);
virtual void addedTo(TQWidget *,TQWidget *); virtual void addedTo(TQWidget *,TQWidget *);
virtual void addedTo(int,TQPopupMenu *); virtual void addedTo(int,TQPopupMenu *);
%End
signals: signals:
void selected(TQAction *); void selected(TQAction *);
private: private:
%If (TQt_3_1_0 -)
TQActionGroup(const TQActionGroup &); TQActionGroup(const TQActionGroup &);
%End
}; };
%End %End
%End

@ -64,6 +64,9 @@ This has been renamed to <Literal>exec_loop</Literal> in Python.
</Sect2> </Sect2>
%End %End
%ModuleHeaderCode
#include <tqapplication.h>
%End
TQApplication *tqApp; TQApplication *tqApp;
@ -128,7 +131,6 @@ public:
} }
%End %End
%If (TQt_2_2_0 -)
enum Type { enum Type {
Tty, Tty,
GuiClient, GuiClient,
@ -159,7 +161,6 @@ public:
// Now modify the original list. // Now modify the original list.
updatePyArgv(a0,argc,argv); updatePyArgv(a0,argc,argv);
} }
%End
%End %End
~TQApplication(); ~TQApplication();
@ -209,7 +210,7 @@ public:
sipIsErr = 1; sipIsErr = 1;
else else
for (int a = 0; a < argc; ++a) for (int a = 0; a < argc; ++a)
if (PyList_SetItem(sipRes,a,PyString_FromString(sipCpp -> argv()[a])) < 0) if (PyList_SetItem(sipRes,a,SIPBytes_FromString(sipCpp -> argv()[a])) < 0)
{ {
Py_DECREF(sipRes); Py_DECREF(sipRes);
sipIsErr = 1; sipIsErr = 1;
@ -217,39 +218,17 @@ public:
} }
%End %End
%If (TQt_2_3_0 -)
Type type() const; Type type() const;
%End
%If (- TQt_2_00)
static GUIStyle style();
static void setStyle(GUIStyle);
%End
%If (TQt_2_00 -)
static TQStyle &style(); static TQStyle &style();
static void setStyle(TQStyle * /Transfer/); static void setStyle(TQStyle * /Transfer/);
%End
%If (TQt_3_0_0 -)
static TQStyle *setStyle(const TQString &); static TQStyle *setStyle(const TQString &);
%End
%If (- TQt_2_00)
enum ColorSpec
{
NormalColor = 0,
CustomColor = 1,
PrivateColor = 4,
ManyColor = 4,
TrueColor = 4
};
%End
%If (TQt_2_00 -)
enum ColorSpec enum ColorSpec
{ {
NormalColor = 0, NormalColor = 0,
CustomColor = 1, CustomColor = 1,
ManyColor = 2 ManyColor = 2
}; };
%End
static int colorSpec(); static int colorSpec();
static void setColorSpec(int); static void setColorSpec(int);
@ -258,51 +237,26 @@ public:
static void restoreOverrideCursor(); static void restoreOverrideCursor();
static bool hasGlobalMouseTracking(); static bool hasGlobalMouseTracking();
static void setGlobalMouseTracking(bool); static void setGlobalMouseTracking(bool);
%If (- TQt_2_00)
static TQPalette *palette();
static void setPalette(TQPalette &,bool = 0);
static TQFont *font();
static void setFont(const TQFont &,bool = 0);
%End
%If (TQt_2_00 -)
static TQPalette palette(const TQWidget * = 0); static TQPalette palette(const TQWidget * = 0);
static void setPalette(TQPalette &,bool = 0,const char * = 0); static void setPalette(TQPalette &,bool = 0,const char * = 0);
static TQFont font(const TQWidget * = 0); static TQFont font(const TQWidget * = 0);
static void setFont(const TQFont &,bool = 0,const char * = 0); static void setFont(const TQFont &,bool = 0,const char * = 0);
%End
static TQFontMetrics fontMetrics(); static TQFontMetrics fontMetrics();
TQWidget *mainWidget() const; TQWidget *mainWidget() const;
%If (- TQt_2_00)
// We may not need the /Transfer/ now that the TQApplication dtor is
// instrumented, but we'll leave it in so as not to break old programs
// needlessly.
void setMainWidget(TQWidget * /Transfer/);
%End
%If (TQt_2_00 -)
virtual void setMainWidget(TQWidget *); virtual void setMainWidget(TQWidget *);
virtual void polish(TQWidget *); virtual void polish(TQWidget *);
%End
static TQWidgetList *allWidgets(); static TQWidgetList *allWidgets();
static TQWidgetList *topLevelWidgets(); static TQWidgetList *topLevelWidgets();
%If (- TQt_3_0_0)
static TQWidget *desktop();
%End
%If (TQt_3_0_0 -)
static TQDesktopWidget *desktop(); static TQDesktopWidget *desktop();
%End
static TQWidget *activePopupWidget(); static TQWidget *activePopupWidget();
static TQWidget *activeModalWidget(); static TQWidget *activeModalWidget();
static TQClipboard *clipboard(); static TQClipboard *clipboard();
TQWidget *focusWidget() const; TQWidget *focusWidget() const;
%If (TQt_2_00 -)
TQWidget *activeWindow() const; TQWidget *activeWindow() const;
%End
static TQWidget *widgetAt(int,int,bool = 0); static TQWidget *widgetAt(int,int,bool = 0);
static TQWidget *widgetAt(const TQPoint &,bool = 0); static TQWidget *widgetAt(const TQPoint &,bool = 0);
%If (TQt_3_1_0 -)
static TQEventLoop *eventLoop(); static TQEventLoop *eventLoop();
%End
int exec() /PyName=exec_loop, ReleaseGIL, int exec() /PyName=exec_loop, ReleaseGIL,
PreHook=__pyTQtPreEventLoopHook__, PreHook=__pyTQtPreEventLoopHook__,
@ -310,44 +264,27 @@ public:
void processEvents() /ReleaseGIL/; void processEvents() /ReleaseGIL/;
void processEvents(int) /ReleaseGIL/; void processEvents(int) /ReleaseGIL/;
void processOneEvent() /ReleaseGIL/; void processOneEvent() /ReleaseGIL/;
%If (TQt_3_0_0 -)
bool hasPendingEvents(); bool hasPendingEvents();
%End
int enter_loop() /ReleaseGIL/; int enter_loop() /ReleaseGIL/;
void exit_loop(); void exit_loop();
%If (TQt_2_00 -)
int loopLevel() const; int loopLevel() const;
%End
static void exit(int = 0); static void exit(int = 0);
static bool sendEvent(TQObject *,TQEvent *) /ReleaseGIL/; static bool sendEvent(TQObject *,TQEvent *) /ReleaseGIL/;
static void postEvent(TQObject *,TQEvent * /Transfer/) /ReleaseGIL/; static void postEvent(TQObject *,TQEvent * /Transfer/) /ReleaseGIL/;
static void sendPostedEvents(TQObject *,int) /ReleaseGIL/; static void sendPostedEvents(TQObject *,int) /ReleaseGIL/;
%If (TQt_2_00 -)
static void sendPostedEvents() /ReleaseGIL/; static void sendPostedEvents() /ReleaseGIL/;
static void removePostedEvents(TQObject *); static void removePostedEvents(TQObject *);
%End
virtual bool notify(TQObject *,TQEvent *) /ReleaseGIL/; virtual bool notify(TQObject *,TQEvent *) /ReleaseGIL/;
static bool startingUp(); static bool startingUp();
static bool closingDown(); static bool closingDown();
static void flushX(); static void flushX();
%If (TQt_3_0_0 -)
static void flush(); static void flush();
%End
static void syncX(); static void syncX();
static void beep(); static void beep();
%If (TQt_2_00 -)
void setDefaultCodec(TQTextCodec *); void setDefaultCodec(TQTextCodec *);
TQTextCodec *defaultCodec() const; TQTextCodec *defaultCodec() const;
void installTranslator(TQTranslator *); void installTranslator(TQTranslator *);
void removeTranslator(TQTranslator *); void removeTranslator(TQTranslator *);
%End
%If (TQt_2_00 - TQt_3_0_0)
TQString translate(const char *,const char *) const;
%End
%If (TQt_2_2_0 - TQt_3_0_0)
TQString translate(const char *,const char *,const char *) const;
%End
%If (TQt_3_0_0 -)
enum Encoding { enum Encoding {
DefaultCodec, DefaultCodec,
UnicodeUTF8 UnicodeUTF8
@ -355,98 +292,59 @@ public:
TQString translate(const char *,const char *,const char * = 0, TQString translate(const char *,const char *,const char * = 0,
Encoding = DefaultCodec) const; Encoding = DefaultCodec) const;
%End
%If (TQt_3_2_0 -)
TQString applicationDirPath(); TQString applicationDirPath();
TQString applicationFilePath(); TQString applicationFilePath();
%End
%If (- TQt_3_0_0)
static void setWinStyleHighlightColor(const TQColor &);
static const TQColor &winStyleHighlightColor();
%End
%If (TQt_2_00 -)
static void setDesktopSettingsAware(bool); static void setDesktopSettingsAware(bool);
static bool desktopSettingsAware(); static bool desktopSettingsAware();
static void setCursorFlashTime(int); static void setCursorFlashTime(int);
static int cursorFlashTime(); static int cursorFlashTime();
%End
static void setDoubleClickInterval(int); static void setDoubleClickInterval(int);
static int doubleClickInterval(); static int doubleClickInterval();
%If (TQt_2_1_0 -)
static void setWheelScrollLines(int); static void setWheelScrollLines(int);
static int wheelScrollLines(); static int wheelScrollLines();
%If (TQt_2_2_0 -)
static void setGlobalStrut(const TQSize &); static void setGlobalStrut(const TQSize &);
static TQSize globalStrut(); static TQSize globalStrut();
%End
%If (TQt_3_0_0 -)
static void setLibraryPaths(const TQStringList &); static void setLibraryPaths(const TQStringList &);
static TQStringList libraryPaths(); static TQStringList libraryPaths();
static void addLibraryPath(const TQString &); static void addLibraryPath(const TQString &);
static void removeLibraryPath(const TQString &); static void removeLibraryPath(const TQString &);
%End
static void setStartDragTime(int); static void setStartDragTime(int);
static int startDragTime(); static int startDragTime();
static void setStartDragDistance(int); static void setStartDragDistance(int);
static int startDragDistance(); static int startDragDistance();
%If (TQt_3_0_0 -)
static void setReverseLayout(bool); static void setReverseLayout(bool);
static bool reverseLayout(); static bool reverseLayout();
static int horizontalAlignment(int); static int horizontalAlignment(int);
%End
%If (TQt_2_2_0 -)
static bool isEffectEnabled(TQt::UIEffect); static bool isEffectEnabled(TQt::UIEffect);
static void setEffectEnabled(TQt::UIEffect,bool = 1); static void setEffectEnabled(TQt::UIEffect,bool = 1);
%End
%End
%If (TQt_2_00 -)
bool isSessionRestored() const; bool isSessionRestored() const;
TQString sessionId() const; TQString sessionId() const;
%If (TQt_3_1_0 -)
TQString sessionKey() const; TQString sessionKey() const;
%End
virtual void commitData(TQSessionManager &); virtual void commitData(TQSessionManager &);
virtual void saveState(TQSessionManager &); virtual void saveState(TQSessionManager &);
%End
%If (TQt_2_1_0 -)
void wakeUpGuiThread(); void wakeUpGuiThread();
%End
%If (TQt_THREAD_SUPPORT) %If (TQt_THREAD_SUPPORT)
%If (TQt_2_2_0 -)
void lock() /ReleaseGIL/; void lock() /ReleaseGIL/;
void unlock(bool = 1); void unlock(bool = 1);
bool locked(); bool locked();
%End
%If (TQt_3_0_0 -)
bool tryLock(); bool tryLock();
%End %End
%End
signals: signals:
void lastWindowClosed(); void lastWindowClosed();
%If (TQt_2_00 -)
void aboutToQuit(); void aboutToQuit();
%End
%If (TQt_2_1_0 -)
void guiThreadAwake(); void guiThreadAwake();
%End
public slots: public slots:
void quit(); void quit();
%If (TQt_2_00 -)
void closeAllWindows(); void closeAllWindows();
%End
%If (TQt_3_2_0 -)
void aboutTQt(); void aboutTQt();
%End
protected: protected:
%If (TQt_3_1_0 -)
bool event(TQEvent *); bool event(TQEvent *);
%End
private: private:
TQApplication(const TQApplication &); TQApplication(const TQApplication &);
@ -471,19 +369,26 @@ static char **pyArgvToC(PyObject *argvlist,int &argc)
// Convert the list. // Convert the list.
for (int a = 0; a < argc; ++a) for (int a = 0; a < argc; ++a)
{ {
PyObject *argObject = PyList_GET_ITEM(argvlist, a);
char *arg; char *arg;
// Get the argument and allocate memory for it. if (PyUnicode_Check(argObject))
if ((arg = PyString_AsString(PyList_GetItem(argvlist,a))) == NULL || {
(argv[a] = (char *)sipMalloc(strlen(arg) + 1)) == NULL) arg = tqstrdup(sipString_AsLatin1String(&argObject));
}
else if (SIPBytes_Check(argObject))
{
arg = tqstrdup(SIPBytes_AS_STRING(argObject));
}
else
{
return NULL; return NULL;
}
// Copy the argument and save a pointer to it. argv[a] = argv[a + argc + 1] = arg;
strcpy(argv[a],arg);
argv[a + argc + 1] = argv[a];
} }
argv[argc + argc + 1] = argv[argc] = NULL; argv[argc] = argv[argc + argc + 1] = NULL;
return argv; return argv;
} }
@ -544,19 +449,7 @@ static void pyqtMsgHandler(TQtMsgType type, const char *msg)
SIP_BLOCK_THREADS SIP_BLOCK_THREADS
#if SIP_VERSION >= 0x040200
res = sipCallMethod(0, pyqtPyMsgHandler, "Es", type, sipEnum_TQtMsgType, msg); res = sipCallMethod(0, pyqtPyMsgHandler, "Es", type, sipEnum_TQtMsgType, msg);
#elif SIP_VERSION >= 0x040000
res = sipCallMethod(0, pyqtPyMsgHandler, "es", type, msg);
#else
PyObject *args = Py_BuildValue("is", type, msg);
if (args != NULL)
{
res = PyEval_CallObject(pyqtPyMsgHandler, args);
Py_DECREF(args);
}
#endif
Py_XDECREF(res); Py_XDECREF(res);

@ -1,94 +0,0 @@
// This is the SIP interface definition for all types based on the TQArray
// template.
//
// 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.
%ExportedDoc
<Sect2><Title>TQArray&lt;type&gt; (TQt 1.x, 2.x)</Title>
<Para>
Types based on the <Literal>TQArray</Literal> template are automatically
converted to and from Python lists of the type.
</Para>
</Sect2>
%End
%If (- TQt_3_0_0)
%MappedType TQArray<int>
{
%TypeHeaderCode
#include <tqarray.h>
%End
%ConvertFromTypeCode
// Convert to a Python list of integers.
PyObject *l;
// Create the list.
if ((l = PyList_New(sipCpp -> count())) == NULL)
return NULL;
// Get it.
for (uint i = 0; i < sipCpp -> count(); ++i)
if (PyList_SetItem(l,i,PyInt_FromLong((long)(sipCpp -> at(i)))) < 0)
{
Py_DECREF(l);
return NULL;
}
return l;
%End
%ConvertToTypeCode
// Convert a Python list of integers to a TQArray<int> on the heap.
if (sipIsErr == NULL)
return PyList_Check(sipPy);
TQArray<int> *qa = new TQArray<int>(PyList_GET_SIZE(sipPy));
PyErr_Clear();
for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
{
qa[i] = (int)PyInt_AsLong(PyList_GET_ITEM(sipPy,i));
if (PyErr_Occurred() != NULL)
{
delete qa;
*sipIsErr = 1;
return 0;
}
}
*sipCppPtr = qa;
return sipGetState(sipTransferObj);
%End
};
%End

@ -30,7 +30,6 @@
%If (TQt_ASSISTANTCLIENT) %If (TQt_ASSISTANTCLIENT)
%If (TQt_3_1_0 -)
class TQAssistantClient : TQObject class TQAssistantClient : TQObject
{ {
@ -44,9 +43,7 @@ public:
bool isOpen() const; bool isOpen() const;
%If (TQt_3_2_0 -)
void setArguments(const TQStringList &); void setArguments(const TQStringList &);
%End
public slots: public slots:
virtual void openAssistant() /ReleaseGIL/; virtual void openAssistant() /ReleaseGIL/;
@ -60,4 +57,3 @@ signals:
}; };
%End %End
%End

@ -37,23 +37,12 @@ class TQBitmap : TQPixmap
public: public:
TQBitmap(); TQBitmap();
%If (- TQt_2_00)
TQBitmap(int,int,bool = 0);
TQBitmap(const TQSize &,bool = 0);
%End
%If (TQt_2_00 -)
TQBitmap(int,int,bool = 0,TQPixmap::Optimization = TQPixmap::DefaultOptim); TQBitmap(int,int,bool = 0,TQPixmap::Optimization = TQPixmap::DefaultOptim);
TQBitmap(const TQSize &,bool = 0,TQPixmap::Optimization = TQPixmap::DefaultOptim); TQBitmap(const TQSize &,bool = 0,TQPixmap::Optimization = TQPixmap::DefaultOptim);
%End
TQBitmap(int,int,uchar *,bool = 0); TQBitmap(int,int,uchar *,bool = 0);
TQBitmap(const TQSize &,uchar *,bool = 0); TQBitmap(const TQSize &,uchar *,bool = 0);
TQBitmap(const TQBitmap &); TQBitmap(const TQBitmap &);
%If (- TQt_2_00)
TQBitmap(const char *,const char * = 0);
%End
%If (TQt_2_00 -)
TQBitmap(const TQString &,const char * = 0); TQBitmap(const TQString &,const char * = 0);
%End
TQBitmap xForm(const TQWMatrix &) const; TQBitmap xForm(const TQWMatrix &) const;
}; };

@ -30,54 +30,6 @@
%End %End
%If (- TQt_2_00)
enum BrushStyle {
NoBrush,
SolidPattern,
Dense1Pattern,
Dense2Pattern,
Dense3Pattern,
Dense4Pattern,
Dense5Pattern,
Dense6Pattern,
Dense7Pattern,
HorPattern,
VerPattern,
CrossPattern,
BDiagPattern,
FDiagPattern,
DiagCrossPattern,
CustomPattern = 24
};
class TQBrush
{
%TypeHeaderCode
#include <tqbrush.h>
%End
public:
TQBrush();
TQBrush(BrushStyle);
TQBrush(const TQColor &,BrushStyle = SolidPattern);
TQBrush(const TQColor &,const TQPixmap &);
TQBrush(const TQBrush &);
BrushStyle style() const;
void setStyle(BrushStyle);
const TQColor &color() const;
void setColor(const TQColor &);
TQPixmap *pixmap() const;
void setPixmap(const TQPixmap &);
};
%End
%If (TQt_2_00 -)
class TQBrush : TQt class TQBrush : TQt
{ {
%TypeHeaderCode %TypeHeaderCode
@ -101,5 +53,3 @@ public:
bool operator==(const TQBrush &) const; bool operator==(const TQBrush &) const;
bool operator!=(const TQBrush &) const; bool operator!=(const TQBrush &) const;
}; };
%End

@ -36,48 +36,18 @@ class TQButton : TQWidget
%End %End
public: public:
%If (- TQt_2_00)
TQButton(TQWidget * /TransferThis/ = 0,const char * = 0);
%End
%If (TQt_2_00 -)
TQButton(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0); TQButton(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0);
%End
%If (- TQt_2_00)
const char *text() const;
void setText(const char *);
%End
%If (TQt_2_00 -)
TQString text() const; TQString text() const;
virtual void setText(const TQString &); virtual void setText(const TQString &);
%End
const TQPixmap *pixmap() const; const TQPixmap *pixmap() const;
%If (- TQt_2_00)
void setPixmap(const TQPixmap &);
%End
%If (TQt_2_00 -)
virtual void setPixmap(const TQPixmap &); virtual void setPixmap(const TQPixmap &);
%End
%If (- TQt_3_0_0)
int accel() const;
%End
%If (TQt_3_0_0 -)
TQKeySequence accel() const; TQKeySequence accel() const;
%End
%If (- TQt_2_00)
void setAccel(int);
%End
%If (TQt_2_00 - TQt_3_0_0)
virtual void setAccel(int);
%End
%If (TQt_3_0_0 -)
virtual void setAccel(const TQKeySequence &); virtual void setAccel(const TQKeySequence &);
%End
bool isToggleButton() const; bool isToggleButton() const;
%If (TQt_2_00 -)
enum ToggleType enum ToggleType
{ {
SingleShot, SingleShot,
@ -86,19 +56,12 @@ public:
}; };
ToggleType toggleType() const; ToggleType toggleType() const;
%End
%If (- TQt_2_00)
void setDown(bool);
%End
%If (TQt_2_00 -)
virtual void setDown(bool); virtual void setDown(bool);
%End
bool isDown() const; bool isDown() const;
bool isOn() const; bool isOn() const;
%If (TQt_2_00 -)
enum ToggleState enum ToggleState
{ {
Off, Off,
@ -107,37 +70,13 @@ public:
}; };
ToggleState state() const; ToggleState state() const;
%End
%If (- TQt_3_0_0)
bool autoResize() const;
%End
%If (- TQt_2_00)
void setAutoResize(bool);
%End
%If (TQt_2_00 - TQt_3_0_0)
virtual void setAutoResize(bool);
%End
bool autoRepeat() const; bool autoRepeat() const;
%If (- TQt_2_00)
void setAutoRepeat(bool);
%End
%If (TQt_2_00 -)
virtual void setAutoRepeat(bool); virtual void setAutoRepeat(bool);
%End
%If (TQt_2_00 -)
bool isExclusiveToggle() const; bool isExclusiveToggle() const;
%End
%If (TQt_2_00 - TQt_3_0_0)
bool focusNextPrevChild(bool);
%End
%If (TQt_2_00 -)
TQButtonGroup *group() const; TQButtonGroup *group() const;
%End
public slots: public slots:
void animateClick(); void animateClick();
@ -148,28 +87,20 @@ signals:
void released(); void released();
void clicked(); void clicked();
void toggled(bool); void toggled(bool);
%If (TQt_2_00 -)
void stateChanged(int); void stateChanged(int);
%End
protected: protected:
void setToggleButton(bool); void setToggleButton(bool);
%If (TQt_2_00 -)
virtual void setToggleType(ToggleType); virtual void setToggleType(ToggleType);
%End
void setOn(bool); void setOn(bool);
%If (TQt_2_00 -)
virtual void setState(ToggleState); virtual void setState(ToggleState);
%End
virtual bool hitButton(const TQPoint &) const; virtual bool hitButton(const TQPoint &) const;
virtual void drawButton(TQPainter *); virtual void drawButton(TQPainter *);
virtual void drawButtonLabel(TQPainter *); virtual void drawButtonLabel(TQPainter *);
void keyPressEvent(TQKeyEvent *); void keyPressEvent(TQKeyEvent *);
%If (TQt_2_1_0 -)
void keyReleaseEvent(TQKeyEvent *); void keyReleaseEvent(TQKeyEvent *);
%End
void mousePressEvent(TQMouseEvent *); void mousePressEvent(TQMouseEvent *);
void mouseReleaseEvent(TQMouseEvent *); void mouseReleaseEvent(TQMouseEvent *);
void mouseMoveEvent(TQMouseEvent *); void mouseMoveEvent(TQMouseEvent *);

@ -19,6 +19,7 @@
// 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.
%DefaultEncoding "UTF-8"
%ExportedDoc %ExportedDoc
<Sect2><Title>TQButtonGroup</Title> <Sect2><Title>TQButtonGroup</Title>
@ -37,51 +38,30 @@ class TQButtonGroup : TQGroupBox
public: public:
TQButtonGroup(TQWidget * /TransferThis/ = 0,const char * = 0); TQButtonGroup(TQWidget * /TransferThis/ = 0,const char * = 0);
%If (- TQt_2_00)
TQButtonGroup(const char *,TQWidget * /TransferThis/ = 0,
const char * = 0);
%End
%If (TQt_2_00 -)
TQButtonGroup(const TQString &,TQWidget * /TransferThis/ = 0, TQButtonGroup(const TQString &,TQWidget * /TransferThis/ = 0,
const char * = 0); const char * = 0);
TQButtonGroup(int,Orientation,TQWidget * /TransferThis/ = 0, TQButtonGroup(int,Orientation,TQWidget * /TransferThis/ = 0,
const char * = 0); const char * = 0);
TQButtonGroup(int,Orientation,const TQString &, TQButtonGroup(int,Orientation,const TQString &,
TQWidget * /TransferThis/ = 0,const char * = 0); TQWidget * /TransferThis/ = 0,const char * = 0);
%End
bool isExclusive() const; bool isExclusive() const;
%If (- TQt_2_00)
void setExclusive(bool);
void setButton(int);
%End
%If (TQt_2_00 -)
bool isRadioButtonExclusive() const; bool isRadioButtonExclusive() const;
virtual void setExclusive(bool); virtual void setExclusive(bool);
virtual void setRadioButtonExclusive(bool); virtual void setRadioButtonExclusive(bool);
%End
int insert(TQButton *,int = -1); int insert(TQButton *,int = -1);
void remove(TQButton *); void remove(TQButton *);
TQButton *find(int) const; TQButton *find(int) const;
%If (TQt_2_00 -)
int id(TQButton *) const; int id(TQButton *) const;
int count() const; int count() const;
virtual void setButton(int); virtual void setButton(int);
virtual void moveFocus(int); virtual void moveFocus(int);
%End
%If (TQt_2_00 - TQt_3_0_0)
TQButton *selected();
%End
%If (TQt_3_0_0 -)
TQButton *selected() const; TQButton *selected() const;
%End
%If (TQt_3_2_0 -)
int selectedId() const; int selectedId() const;
%End
signals: signals:
void pressed(int); void pressed(int);
@ -95,9 +75,7 @@ protected slots:
void buttonToggled(bool); void buttonToggled(bool);
protected: protected:
%If (TQt_3_1_0 -)
bool event(TQEvent *); bool event(TQEvent *);
%End
private: private:
TQButtonGroup(const TQButtonGroup &); TQButtonGroup(const TQButtonGroup &);

@ -98,6 +98,36 @@ class TQByteArray
#include <tqstring.h> #include <tqstring.h>
%End %End
%TypeCode
// Convert a TQByteArray to a Python string or Py_None if there's
// no data
static PyObject* TQByteArray_To_String(TQByteArray *ba)
{
// TQByteArrays aren't '\0' terminated so set the size
// explicitly.
char *data;
uint len;
Py_BEGIN_ALLOW_THREADS
data = ba->data();
len = ba->size();
Py_END_ALLOW_THREADS
if (data)
{
#if PY_MAJOR_VERSION >= 3
return PyUnicode_FromStringAndSize(data, len);
#else
return SIPBytes_FromStringAndSize(data, len);
#endif
}
else
{
return Py_None;
}
}
%End
public: public:
TQByteArray(); TQByteArray();
TQByteArray(int); TQByteArray(int);
@ -105,27 +135,20 @@ public:
SIP_PYOBJECT data() const; SIP_PYOBJECT data() const;
%MethodCode %MethodCode
// TQByteArrays aren't '\0' terminated so set the size PyObject* res = TQByteArray_To_String(sipCpp);
// explicitly.
char *res;
uint len;
Py_BEGIN_ALLOW_THREADS
res = sipCpp -> data();
len = sipCpp -> size();
Py_END_ALLOW_THREADS
if (res) if (res == Py_None)
{ {
if ((sipRes = PyString_FromStringAndSize(res,len)) == NULL) Py_INCREF(Py_None);
sipIsErr = 1;
} }
else else if (res == NULL)
{ {
Py_INCREF(Py_None); sipIsErr = 1;
sipRes = Py_None;
} }
else
{
sipRes = res;
}
%End %End
// These are actually in TQMemArray, which isn't implemented so pretend // These are actually in TQMemArray, which isn't implemented so pretend
@ -151,36 +174,62 @@ public:
SIP_PYOBJECT __str__(); SIP_PYOBJECT __str__();
%MethodCode %MethodCode
// TQByteArrays aren't '\0' terminated so set the size PyObject* res = TQByteArray_To_String(sipCpp);
// explicitly.
char *data; if (res == Py_None)
uint len; {
sipRes = SIPBytes_FromString("");
Py_BEGIN_ALLOW_THREADS }
data = sipCpp -> data();
len = sipCpp -> size();
Py_END_ALLOW_THREADS
if (data == NULL)
sipRes = PyString_FromString("");
else else
sipRes = PyString_FromStringAndSize(data,len); {
sipRes = res;
}
%End %End
%ConvertToTypeCode %ConvertToTypeCode
// Allow a Python string whenever a TQByteArray is expected. // Allow a Python string whenever a TQByteArray is expected.
if (sipIsErr == NULL) if (sipIsErr == NULL)
return (PyString_Check(sipPy) || return (SIPBytes_Check(sipPy) ||
PyUnicode_Check(sipPy) ||
sipCanConvertToInstance(sipPy,sipClass_TQByteArray,SIP_NO_CONVERTORS)); sipCanConvertToInstance(sipPy,sipClass_TQByteArray,SIP_NO_CONVERTORS));
if (PyString_Check(sipPy)) if (PyUnicode_Check(sipPy))
{
Py_BEGIN_ALLOW_THREADS
TQByteArray *ba = new TQByteArray();
#if PY_VERSION_HEX >= 0x03030000
ba -> duplicate((char *)PyUnicode_1BYTE_DATA(sipPy),PyUnicode_GET_SIZE(sipPy));
#else
ba -> duplicate((char *)PyUnicode_AS_DATA(sipPy),PyUnicode_GET_SIZE(sipPy));
#endif
*sipCppPtr = ba;
Py_END_ALLOW_THREADS
return sipGetState(sipTransferObj);
}
#if PY_VERSION_HEX >= 0x02060000
else if (PyByteArray_Check(sipPy))
{ {
Py_BEGIN_ALLOW_THREADS Py_BEGIN_ALLOW_THREADS
TQByteArray *ba = new TQByteArray(); TQByteArray *ba = new TQByteArray();
ba -> duplicate(PyString_AS_STRING(sipPy),PyString_GET_SIZE(sipPy)); ba -> duplicate(PyByteArray_AS_STRING(sipPy),PyByteArray_GET_SIZE(sipPy));
*sipCppPtr = ba;
Py_END_ALLOW_THREADS
return sipGetState(sipTransferObj);
}
#endif
else if (SIPBytes_Check(sipPy))
{
Py_BEGIN_ALLOW_THREADS
TQByteArray *ba = new TQByteArray();
ba -> duplicate(SIPBytes_AS_STRING(sipPy),SIPBytes_GET_SIZE(sipPy));
*sipCppPtr = ba; *sipCppPtr = ba;
Py_END_ALLOW_THREADS Py_END_ALLOW_THREADS
@ -195,9 +244,7 @@ public:
}; };
%If (TQt_3_1_0 -)
TQByteArray tqCompress(const uchar * /Array/,int /ArraySize/); TQByteArray tqCompress(const uchar * /Array/,int /ArraySize/);
TQByteArray tqCompress(const TQByteArray &); TQByteArray tqCompress(const TQByteArray &);
TQByteArray tqUncompress(const uchar * /Array/,int /ArraySize/); TQByteArray tqUncompress(const uchar * /Array/,int /ArraySize/);
TQByteArray tqUncompress(const TQByteArray &); TQByteArray tqUncompress(const TQByteArray &);
%End

@ -30,7 +30,6 @@
%If (TQt_STYLE_CDE) %If (TQt_STYLE_CDE)
%If (TQt_2_00 -)
class TQCDEStyle : TQMotifStyle class TQCDEStyle : TQMotifStyle
{ {
@ -41,16 +40,6 @@ class TQCDEStyle : TQMotifStyle
public: public:
TQCDEStyle(bool = 0); TQCDEStyle(bool = 0);
%If (- TQt_3_0_0)
int defaultFrameWidth() const;
void drawArrow(TQPainter *,ArrowType,bool,int,int,int,int,
const TQColorGroup &,bool,const TQBrush * = 0);
void drawIndicator(TQPainter *,int,int,int,int,const TQColorGroup &,int,
bool = 0,bool = 1);
void drawExclusiveIndicator(TQPainter *,int,int,int,int,
const TQColorGroup &,bool,bool = 0,bool = 1);
%End
%If (TQt_3_0_0 -)
int pixelMetric(PixelMetric,const TQStyleControlElementData&,ControlElementFlags,const TQWidget * = 0) const; int pixelMetric(PixelMetric,const TQStyleControlElementData&,ControlElementFlags,const TQWidget * = 0) const;
void drawControl(ControlElement,TQPainter *,const TQStyleControlElementData&,ControlElementFlags, void drawControl(ControlElement,TQPainter *,const TQStyleControlElementData&,ControlElementFlags,
@ -61,8 +50,6 @@ public:
void drawPrimitive(PrimitiveElement,TQPainter *,const TQStyleControlElementData&,ControlElementFlags,const TQRect &, void drawPrimitive(PrimitiveElement,TQPainter *,const TQStyleControlElementData&,ControlElementFlags,const TQRect &,
const TQColorGroup &,SFlags = Style_Default, const TQColorGroup &,SFlags = Style_Default,
const TQStyleOption & = TQStyleOption()) const; const TQStyleOption & = TQStyleOption()) const;
%End
}; };
%End %End
%End

@ -36,52 +36,27 @@ class TQCheckBox : TQButton
%End %End
public: public:
%If (- TQt_2_00)
TQCheckBox(TQWidget * /TransferThis/ = 0,const char * = 0);
TQCheckBox(const char *,TQWidget * /TransferThis/,const char * = 0);
%End
%If (TQt_2_00 -)
TQCheckBox(TQWidget * /TransferThis/,const char * = 0); TQCheckBox(TQWidget * /TransferThis/,const char * = 0);
TQCheckBox(const TQString &,TQWidget * /TransferThis/,const char * = 0); TQCheckBox(const TQString &,TQWidget * /TransferThis/,const char * = 0);
%End
bool isChecked() const; bool isChecked() const;
%If (TQt_2_00 -)
void setNoChange(); void setNoChange();
void setTristate(bool = 1); void setTristate(bool = 1);
%End
%If (TQt_2_2_0 -)
bool isTristate() const; bool isTristate() const;
%End
TQSize sizeHint() const; TQSize sizeHint() const;
%If (TQt_2_00 - TQt_3_0_0)
TQSizePolicy sizePolicy() const;
%End
%If (- TQt_3_0_0)
void setChecked(bool);
%End
public slots: public slots:
%If (TQt_3_0_0 -)
void setChecked(bool); void setChecked(bool);
%End
protected: protected:
%If (TQt_2_00 -)
void resizeEvent(TQResizeEvent *); void resizeEvent(TQResizeEvent *);
%End
void drawButton(TQPainter *); void drawButton(TQPainter *);
void drawButtonLabel(TQPainter *); void drawButtonLabel(TQPainter *);
%If (TQt_2_00 -)
void updateMask(); void updateMask();
%End
%If (TQt_3_2_0 -)
bool hitButton(const TQPoint &) const; bool hitButton(const TQPoint &) const;
%End
private: private:
TQCheckBox(const TQCheckBox &); TQCheckBox(const TQCheckBox &);

@ -55,26 +55,21 @@ private:
~TQClipboard(); ~TQClipboard();
public: public:
%If (TQt_3_1_0 -)
enum Mode { enum Mode {
Clipboard, Clipboard,
Selection Selection
}; };
void clear(Mode); void clear(Mode);
%End
void clear(); void clear();
%If (TQt_3_0_0 -)
bool supportsSelection() const; bool supportsSelection() const;
bool ownsSelection() const; bool ownsSelection() const;
bool ownsClipboard() const; bool ownsClipboard() const;
void setSelectionMode(bool); void setSelectionMode(bool);
bool selectionModeEnabled() const; bool selectionModeEnabled() const;
%End
%If (TQt_3_1_0 -)
TQString text(Mode) const; TQString text(Mode) const;
TQString text(TQCString &,Mode) const; TQString text(TQCString &,Mode) const;
void setText(const TQString &,Mode); void setText(const TQString &,Mode);
@ -96,17 +91,7 @@ public:
void setImage(const TQImage &,Mode); void setImage(const TQImage &,Mode);
void setPixmap(const TQPixmap &,Mode); void setPixmap(const TQPixmap &,Mode);
%End %End
%End
%If (- TQt_2_00)
// void *data(const char *) const;
// void setData(const char *,void *);
const char *text() const;
void setText(const char *);
TQPixmap *pixmap() const;
%End
%If (TQt_2_00 -)
%If (TQt_MIMECLIPBOARD) %If (TQt_MIMECLIPBOARD)
TQMimeSource *data() const; TQMimeSource *data() const;
void setData(TQMimeSource * /GetWrapper/); void setData(TQMimeSource * /GetWrapper/);
@ -120,25 +105,20 @@ public:
%End %End
%End %End
TQString text() const; TQString text() const;
%If (TQt_2_2_0 -)
TQString text(TQCString &) const; TQString text(TQCString &) const;
%End
void setText(const TQString &); void setText(const TQString &);
%If (TQt_MIMECLIPBOARD) %If (TQt_MIMECLIPBOARD)
TQImage image() const; TQImage image() const;
TQPixmap pixmap() const; TQPixmap pixmap() const;
void setImage(const TQImage &); void setImage(const TQImage &);
%End %End
%End
%If (TQt_MIMECLIPBOARD) %If (TQt_MIMECLIPBOARD)
void setPixmap(const TQPixmap &); void setPixmap(const TQPixmap &);
%End %End
signals: signals:
%If (TQt_3_0_0 -)
void selectionChanged(); void selectionChanged();
%End
void dataChanged(); void dataChanged();
protected: protected:

@ -79,31 +79,6 @@ This takes no parameters and returns the <Literal>r</Literal>,
%End %End
%If (- TQt_2_00)
// The global colours.
TQColor color0;
TQColor color1;
TQColor black;
TQColor white;
TQColor darkGray;
TQColor gray;
TQColor lightGray;
TQColor red;
TQColor green;
TQColor blue;
TQColor cyan;
TQColor magenta;
TQColor yellow;
TQColor darkRed;
TQColor darkGreen;
TQColor darkBlue;
TQColor darkCyan;
TQColor darkMagenta;
TQColor darkYellow;
%End
// Related functions. // Related functions.
int tqRed(TQRgb); int tqRed(TQRgb);
@ -113,10 +88,8 @@ TQRgb tqRgb(int,int,int);
int tqGray(int,int,int); int tqGray(int,int,int);
int tqGray(TQRgb); int tqGray(TQRgb);
%If (TQt_2_00 -)
int tqAlpha(TQRgb); int tqAlpha(TQRgb);
TQRgb tqRgba(int,int,int,int); TQRgb tqRgba(int,int,int,int);
%End
class TQColor class TQColor
@ -135,30 +108,19 @@ public:
TQColor(int,int,int); TQColor(int,int,int);
TQColor(int,int,int,Spec); TQColor(int,int,int,Spec);
TQColor(TQRgb,uint = 0xffffffff); TQColor(TQRgb,uint = 0xffffffff);
%If (TQt_2_00 -)
TQColor(const TQString &); TQColor(const TQString &);
%End
TQColor(const char *); TQColor(const char *);
TQColor(const TQColor &); TQColor(const TQColor &);
bool isValid() const; bool isValid() const;
bool isDirty() const; bool isDirty() const;
%If (- TQt_2_00)
void setNamedColor(const char *);
%End
%If (TQt_2_1_0 -)
TQString name() const; TQString name() const;
%End
%If (TQt_2_00 -)
void setNamedColor(const TQString &); void setNamedColor(const TQString &);
%End
TQRgb rgb() const; TQRgb rgb() const;
void setRgb(int,int,int); void setRgb(int,int,int);
void setRgb(TQRgb); void setRgb(TQRgb);
%If (TQt_3_2_0 -)
void getRgb(int *,int *,int *) const; void getRgb(int *,int *,int *) const;
%End
// Obsolete and is hidden anyway by the overload above. // Obsolete and is hidden anyway by the overload above.
//void rgb(int *,int *,int *) const; //void rgb(int *,int *,int *) const;
@ -169,22 +131,13 @@ public:
void setHsv(int,int,int); void setHsv(int,int,int);
%If (TQt_3_2_0 -)
void getHsv(int *,int *,int *) const; void getHsv(int *,int *,int *) const;
%End
%If (- TQt_3_2_0)
void getHsv(int &,int &,int &) const;
%End
// Obsolete. // Obsolete.
void hsv(int *,int *,int *) const; void hsv(int *,int *,int *) const;
TQColor light(int = 150) const; TQColor light(int = 150) const;
TQColor dark(int = 200) const; TQColor dark(int = 200) const;
%If (- TQt_3_0_0)
static bool lazyAlloc();
static void setLazyAlloc(bool);
%End
bool operator==(const TQColor &) const; bool operator==(const TQColor &) const;
bool operator!=(const TQColor &) const; bool operator!=(const TQColor &) const;
@ -197,11 +150,7 @@ public:
static void leaveAllocContext(); static void leaveAllocContext();
static int currentAllocContext(); static int currentAllocContext();
static void destroyAllocContext(int); static void destroyAllocContext(int);
%If (TQt_3_0_0 -)
%End
static void initialize(); static void initialize();
static void cleanup(); static void cleanup();
%If (TQt_3_2_0 -)
static TQStringList colorNames(); static TQStringList colorNames();
%End
}; };

@ -38,7 +38,6 @@ This takes the <Literal>initial</Literal>, <Literal>parent</Literal> and
%End %End
%If (TQt_2_00 -)
%If (TQt_COLORDIALOG) %If (TQt_COLORDIALOG)
class TQColorDialog : TQDialog class TQColorDialog : TQDialog
@ -48,30 +47,18 @@ class TQColorDialog : TQDialog
%End %End
public: public:
%If (- TQt_3_0_0)
static TQColor getColor(TQColor,TQWidget * = 0,const char * = 0) /ReleaseGIL/;
%End
%If (TQt_3_0_0 -)
static TQColor getColor(const TQColor & = TQt::white,TQWidget * = 0, static TQColor getColor(const TQColor & = TQt::white,TQWidget * = 0,
const char * = 0) /ReleaseGIL/; const char * = 0) /ReleaseGIL/;
%End
%If (TQt_2_1_0 -)
static TQRgb getRgba(TQRgb,bool * = 0,TQWidget * = 0,const char * = 0) /ReleaseGIL/; static TQRgb getRgba(TQRgb,bool * = 0,TQWidget * = 0,const char * = 0) /ReleaseGIL/;
static int customCount(); static int customCount();
static TQRgb customColor(int); static TQRgb customColor(int);
static void setCustomColor(int,TQRgb); static void setCustomColor(int,TQRgb);
%End
%If (TQt_3_1_0 -)
static void setStandardColor(int,TQRgb); static void setStandardColor(int,TQRgb);
%End
private: private:
%If (TQt_2_1_0 -)
TQColorDialog(TQWidget * /TransferThis/ = 0,const char * = 0,bool = 0); TQColorDialog(TQWidget * /TransferThis/ = 0,const char * = 0,bool = 0);
TQColorDialog(const TQColorDialog &); TQColorDialog(const TQColorDialog &);
~TQColorDialog(); ~TQColorDialog();
%End
}; };
%End %End
%End

@ -39,38 +39,11 @@ public:
TQColorGroup(); TQColorGroup();
TQColorGroup(const TQColor &,const TQColor &,const TQColor &,const TQColor &, TQColorGroup(const TQColor &,const TQColor &,const TQColor &,const TQColor &,
const TQColor &,const TQColor &,const TQColor &); const TQColor &,const TQColor &,const TQColor &);
%If (TQt_2_00 -)
TQColorGroup(const TQBrush &,const TQBrush &,const TQBrush &,const TQBrush &, TQColorGroup(const TQBrush &,const TQBrush &,const TQBrush &,const TQBrush &,
const TQBrush &,const TQBrush &,const TQBrush &,const TQBrush &, const TQBrush &,const TQBrush &,const TQBrush &,const TQBrush &,
const TQBrush &); const TQBrush &);
%End
TQColorGroup(TQColorGroup&); TQColorGroup(TQColorGroup&);
%If (- TQt_2_00)
TQColor midlight() const;
%End
%If (TQt_2_00 - TQt_3_0_0)
enum ColorRole
{
Foreground,
Button,
Light,
Midlight,
Dark,
Mid,
Text,
BrightText,
ButtonText,
Base,
Background,
Shadow,
Highlight,
HighlightedText,
NColorRoles
};
%End
%If (TQt_3_0_0 -)
enum ColorRole enum ColorRole
{ {
Foreground, Foreground,
@ -91,35 +64,26 @@ public:
LinkVisited, LinkVisited,
NColorRoles NColorRoles
}; };
%End
%If (TQt_2_00 -)
const TQColor &color(ColorRole) const; const TQColor &color(ColorRole) const;
const TQBrush &brush(ColorRole) const; const TQBrush &brush(ColorRole) const;
void setColor(ColorRole,const TQColor &); void setColor(ColorRole,const TQColor &);
void setBrush(ColorRole,const TQBrush &); void setBrush(ColorRole,const TQBrush &);
%End
const TQColor &foreground() const; const TQColor &foreground() const;
%If (TQt_2_00 -)
const TQColor &button() const; const TQColor &button() const;
%End
const TQColor &light() const; const TQColor &light() const;
const TQColor &dark() const; const TQColor &dark() const;
const TQColor &mid() const; const TQColor &mid() const;
const TQColor &text() const; const TQColor &text() const;
const TQColor &base() const; const TQColor &base() const;
const TQColor &background() const; const TQColor &background() const;
%If (TQt_2_00 -)
const TQColor &midlight() const; const TQColor &midlight() const;
const TQColor &brightText() const; const TQColor &brightText() const;
const TQColor &buttonText() const; const TQColor &buttonText() const;
const TQColor &shadow() const; const TQColor &shadow() const;
const TQColor &highlight() const; const TQColor &highlight() const;
const TQColor &highlightedText() const; const TQColor &highlightedText() const;
%End
%If (TQt_3_0_0 -)
const TQColor &link() const; const TQColor &link() const;
const TQColor &linkVisited() const; const TQColor &linkVisited() const;
%End
}; };

@ -41,116 +41,42 @@ public:
int count() const; int count() const;
%If (TQt_2_00 -)
void insertStringList(TQStringList &,int = -1); void insertStringList(TQStringList &,int = -1);
%End
void insertStrList(const TQStrList *,int = -1); void insertStrList(const TQStrList *,int = -1);
// void insertStrList(const TQStrList &,int = -1); // void insertStrList(const TQStrList &,int = -1);
// void insertStrList(const char **,int = -1,int = -1); // void insertStrList(const char **,int = -1,int = -1);
%If (- TQt_2_00)
void insertItem(const char *,int = -1);
%End
%If (TQt_2_00 -)
void insertItem(const TQString &,int = -1); void insertItem(const TQString &,int = -1);
%End
void insertItem(const TQPixmap &,int = -1); void insertItem(const TQPixmap &,int = -1);
%If (TQt_2_1_0 -)
void insertItem(const TQPixmap &,const TQString &,int = -1); void insertItem(const TQPixmap &,const TQString &,int = -1);
%End
void removeItem(int); void removeItem(int);
%If (- TQt_3_0_0)
void clear();
%End
int currentItem() const; int currentItem() const;
%If (- TQt_2_00)
void setCurrentItem(int);
%End
%If (TQt_2_00 -)
virtual void setCurrentItem(int); virtual void setCurrentItem(int);
%End
%If (- TQt_2_00)
const char *currentText() const;
%End
%If (TQt_2_00 -)
TQString currentText() const; TQString currentText() const;
%End
%If (TQt_3_0_0 -)
virtual void setCurrentText(const TQString &); virtual void setCurrentText(const TQString &);
%End
%If (- TQt_2_00)
const char *text(int) const;
%End
%If (TQt_2_00 -)
TQString text(int) const; TQString text(int) const;
%End
const TQPixmap *pixmap(int) const; const TQPixmap *pixmap(int) const;
%If (- TQt_2_00)
void changeItem(const char *,int);
%End
%If (TQt_2_00 -)
void changeItem(const TQString &,int); void changeItem(const TQString &,int);
%End
void changeItem(const TQPixmap &,int); void changeItem(const TQPixmap &,int);
%If (TQt_2_1_0 -)
void changeItem(const TQPixmap &,const TQString &,int); void changeItem(const TQPixmap &,const TQString &,int);
%End
bool autoResize() const; bool autoResize() const;
%If (- TQt_2_00)
void setAutoResize(bool);
%End
%If (TQt_2_00 -)
virtual void setAutoResize(bool); virtual void setAutoResize(bool);
%End
TQSize sizeHint() const; TQSize sizeHint() const;
%If (TQt_2_00 - TQt_3_0_0)
virtual TQSizePolicy sizePolicy() const;
%End
%If (- TQt_2_00)
void setBackgroundColor(const TQColor &);
void setStyle(GUIStyle);
%End
%If (TQt_2_00 - TQt_3_0_0)
virtual void setBackgroundColor(const TQColor &);
%End
%If (- TQt_2_00)
void setPalette(const TQPalette &); void setPalette(const TQPalette &);
void setFont(const TQFont &); void setFont(const TQFont &);
void setEnabled(bool); void setEnabled(bool);
%End
%If (TQt_2_00 - TQt_3_0_0)
virtual void setPalette(const TQPalette &);
virtual void setFont(const TQFont &);
virtual void setEnabled(bool);
%End
%If (TQt_3_0_0 -)
void setPalette(const TQPalette &);
void setFont(const TQFont &);
void setEnabled(bool);
%End
%If (- TQt_2_00)
void setSizeLimit(int);
%End
%If (TQt_2_00 -)
virtual void setSizeLimit(int); virtual void setSizeLimit(int);
%End
int sizeLimit() const; int sizeLimit() const;
%If (- TQt_2_00)
void setMaxCount(int);
%End
%If (TQt_2_00 -)
virtual void setMaxCount(int); virtual void setMaxCount(int);
%End
int maxCount() const; int maxCount() const;
enum Policy { enum Policy {
@ -162,91 +88,45 @@ public:
BeforeCurrent BeforeCurrent
}; };
%If (- TQt_2_00)
void setInsertionPolicy(Policy);
%End
%If (TQt_2_00 -)
virtual void setInsertionPolicy(Policy); virtual void setInsertionPolicy(Policy);
%End
Policy insertionPolicy() const; Policy insertionPolicy() const;
%If (- TQt_2_00)
void setValidator(TQValidator *);
TQValidator *validator() const;
%End
%If (TQt_2_00 -)
virtual void setValidator(const TQValidator *); virtual void setValidator(const TQValidator *);
const TQValidator *validator() const; const TQValidator *validator() const;
%End
%If (- TQt_2_00)
void setListBox(TQListBox *);
%End
%If (TQt_2_00 -)
virtual void setListBox(TQListBox *); virtual void setListBox(TQListBox *);
%End
TQListBox *listBox() const; TQListBox *listBox() const;
%If (TQt_3_0_0 -)
virtual void setLineEdit(TQLineEdit *); virtual void setLineEdit(TQLineEdit *);
%End
%If (TQt_2_1_0 -)
TQLineEdit *lineEdit() const; TQLineEdit *lineEdit() const;
%End
%If (- TQt_2_00)
void setAutoCompletion(bool);
%End
%If (TQt_2_00 -)
virtual void setAutoCompletion(bool); virtual void setAutoCompletion(bool);
%End
bool autoCompletion() const; bool autoCompletion() const;
bool eventFilter(TQObject *,TQEvent *); bool eventFilter(TQObject *,TQEvent *);
%If (TQt_2_1_0 -)
void setDuplicatesEnabled(bool); void setDuplicatesEnabled(bool);
bool duplicatesEnabled() const; bool duplicatesEnabled() const;
%End
%If (TQt_2_2_0 -)
bool editable() const; bool editable() const;
void setEditable(bool); void setEditable(bool);
%End
%If (TQt_3_0_0 -)
virtual void popup(); virtual void popup();
%End
%If (TQt_3_3_0 -)
void hide(); void hide();
%End
public slots: public slots:
%If (TQt_3_0_0 -)
void clear(); void clear();
%End
void clearValidator(); void clearValidator();
void clearEdit(); void clearEdit();
%If (- TQt_2_00)
void setEditText(const char *);
%End
%If (TQt_2_00 -)
virtual void setEditText(const TQString &); virtual void setEditText(const TQString &);
%End
signals: signals:
void activated(int); void activated(int);
void highlighted(int); void highlighted(int);
%If (- TQt_2_00)
void activated(const char *);
void highlighted(const char *);
%End
%If (TQt_2_00 -)
void activated(const TQString &); void activated(const TQString &);
void highlighted(const TQString &); void highlighted(const TQString &);
void textChanged(const TQString &); void textChanged(const TQString &);
%End
protected: protected:
void paintEvent(TQPaintEvent *); void paintEvent(TQPaintEvent *);
@ -257,20 +137,11 @@ protected:
void mouseDoubleClickEvent(TQMouseEvent *); void mouseDoubleClickEvent(TQMouseEvent *);
void keyPressEvent(TQKeyEvent *); void keyPressEvent(TQKeyEvent *);
void focusInEvent(TQFocusEvent *); void focusInEvent(TQFocusEvent *);
%If (TQt_3_1_1 -)
void focusOutEvent(TQFocusEvent *); void focusOutEvent(TQFocusEvent *);
%End
%If (TQt_3_1_0 -)
void wheelEvent(TQWheelEvent *); void wheelEvent(TQWheelEvent *);
%End
%If (- TQt_3_0_0)
void popup();
%End
%If (TQt_2_00 -)
void styleChange(TQStyle &); void styleChange(TQStyle &);
void updateMask(); void updateMask();
%End
private: private:
TQComboBox(const TQComboBox &); TQComboBox(const TQComboBox &);

@ -48,8 +48,6 @@ This takes only the <Literal>t</Literal> parameter and returns a tuple of the
%End %End
%If (TQt_2_00 -)
class TQCommonStyle : TQStyle class TQCommonStyle : TQStyle
{ {
%TypeHeaderCode %TypeHeaderCode
@ -57,26 +55,6 @@ class TQCommonStyle : TQStyle
%End %End
public: public:
%If (- TQt_3_0_0)
void drawComboButton(TQPainter *,int,int,int,int,const TQColorGroup &,
bool = 0,bool = 0,bool = 1,const TQBrush * = 0);
TQRect comboButtonRect(int,int,int,int);
TQRect comboButtonFocusRect(int,int,int,int);
void drawComboButtonMask(TQPainter *,int,int,int,int);
void drawPushButtonLabel(TQPushButton *,TQPainter *);
void getButtonShift(int &,int &);
int defaultFrameWidth() const;
void tabbarMetrics(const TQTabBar *,int &,int &,int &);
void drawTab(TQPainter *,const TQTabBar *,TQTab *,bool);
void drawTabMask(TQPainter *,const TQTabBar *,TQTab *,bool);
ScrollControl scrollBarPointOver(const TQScrollBar *,int,const TQPoint &);
void drawSliderMask(TQPainter *,int,int,int,int,Orientation,bool,bool);
void drawSliderGrooveMask(TQPainter *,int,int,int,int,TQCOORD,Orientation);
int maximumSliderDragDistance() const;
int popupSubmenuIndicatorWidth(const TQFontMetrics &);
%End
%If (TQt_3_0_0 -)
TQCommonStyle(); TQCommonStyle();
void drawPrimitive(PrimitiveElement,TQPainter *,const TQStyleControlElementData&,ControlElementFlags,const TQRect &, void drawPrimitive(PrimitiveElement,TQPainter *,const TQStyleControlElementData&,ControlElementFlags,const TQRect &,
@ -122,16 +100,6 @@ public:
TQPixmap stylePixmap(StylePixmap,const TQStyleControlElementData&,ControlElementFlags, TQPixmap stylePixmap(StylePixmap,const TQStyleControlElementData&,ControlElementFlags,
const TQStyleOption & = TQStyleOption(), const TQWidget * = 0) const; const TQStyleOption & = TQStyleOption(), const TQWidget * = 0) const;
%End
private: private:
%If (- TQt_3_0_0)
TQCommonStyle(GUIStyle);
~TQCommonStyle();
%End
%If (TQt_3_0_0 -)
TQCommonStyle(const TQCommonStyle &); TQCommonStyle(const TQCommonStyle &);
%End
}; };
%End

@ -112,8 +112,6 @@ This returns a tuple of the <Literal>double</Literal> result and the
%End %End
%If (TQt_2_00 -)
class TQCString : TQByteArray class TQCString : TQByteArray
{ {
%TypeHeaderCode %TypeHeaderCode
@ -160,11 +158,9 @@ public:
TQCString &remove(uint,uint); TQCString &remove(uint,uint);
TQCString &replace(uint,uint,const char *); TQCString &replace(uint,uint,const char *);
TQCString &replace(const TQRegExp &,const char *); TQCString &replace(const TQRegExp &,const char *);
%If (TQt_3_1_0 -)
// TQCString &replace(char,const char *); // TQCString &replace(char,const char *);
TQCString &replace(const char *,const char *); TQCString &replace(const char *,const char *);
// TQCString &replace(char,char); // TQCString &replace(char,char);
%End
short toShort(bool * = 0) const; short toShort(bool * = 0) const;
ushort toUShort(bool * = 0) const; ushort toUShort(bool * = 0) const;
@ -197,19 +193,19 @@ public:
if (s == NULL) if (s == NULL)
s = ""; s = "";
sipRes = PyString_FromString(s); sipRes = SIPBytes_FromString(s);
%End %End
%ConvertToTypeCode %ConvertToTypeCode
// Allow a Python string whenever a TQCString is expected. // Allow a Python string whenever a TQCString is expected.
if (sipIsErr == NULL) if (sipIsErr == NULL)
return (PyString_Check(sipPy) || return (SIPBytes_Check(sipPy) ||
sipCanConvertToInstance(sipPy,sipClass_TQCString,SIP_NO_CONVERTORS)); sipCanConvertToInstance(sipPy,sipClass_TQCString,SIP_NO_CONVERTORS));
if (PyString_Check(sipPy)) if (SIPBytes_Check(sipPy))
{ {
*sipCppPtr = new TQCString(PyString_AS_STRING(sipPy)); *sipCppPtr = new TQCString(SIPBytes_AS_STRING(sipPy));
return sipGetState(sipTransferObj); return sipGetState(sipTransferObj);
} }
@ -219,5 +215,3 @@ public:
return 0; return 0;
%End %End
}; };
%End

@ -34,78 +34,6 @@
%End %End
%If (- TQt_2_00)
// Global cursors.
const TQCursor arrowCursor;
const TQCursor upArrowCursor;
const TQCursor crossCursor;
const TQCursor waitCursor;
const TQCursor ibeamCursor;
const TQCursor sizeVerCursor;
const TQCursor sizeHorCursor;
const TQCursor sizeBDiagCursor;
const TQCursor sizeFDiagCursor;
const TQCursor sizeAllCursor;
const TQCursor blankCursor;
%End
%If (- TQt_3_0_0)
enum TQCursorShape {
ArrowCursor,
UpArrowCursor,
CrossCursor,
WaitCursor,
IbeamCursor,
SizeVerCursor,
SizeHorCursor,
SizeBDiagCursor,
SizeFDiagCursor,
SizeAllCursor,
BlankCursor,
LastCursor = BlankCursor,
BitmapCursor = 24
};
class TQCursor
{
%TypeHeaderCode
#include <tqcursor.h>
%End
public:
TQCursor();
TQCursor(int);
TQCursor(const TQBitmap &,const TQBitmap &,int = -1,int = -1);
%If (TQt_2_00 -)
TQCursor(const TQPixmap &,int = -1,int = -1);
%End
TQCursor(const TQCursor &);
int shape() const;
void setShape(int);
const TQBitmap *bitmap() const;
const TQBitmap *mask() const;
TQPoint hotSpot() const;
%If (- TQt_2_00)
HANDLE handle() const;
%End
%If (TQt_2_00 -)
%If (WS_X11)
HANDLE handle() const;
%End
%End
static TQPoint pos();
static void setPos(int,int);
static void setPos(const TQPoint &);
static void initialize();
static void cleanup();
};
%End
%If (TQt_3_0_0 -)
class TQCursor : TQt class TQCursor : TQt
{ {
%TypeHeaderCode %TypeHeaderCode
@ -127,10 +55,8 @@ public:
%If (WS_X11) %If (WS_X11)
HANDLE handle() const; HANDLE handle() const;
%If (TQt_3_3_0 -)
// This would have the same Python signature as TQCursor(int). // This would have the same Python signature as TQCursor(int).
//TQCursor(HANDLE); //TQCursor(HANDLE);
%End
%End %End
static TQPoint pos(); static TQPoint pos();
static void setPos(int,int); static void setPos(int,int);
@ -141,4 +67,3 @@ public:
static int x11Screen(); static int x11Screen();
%End %End
}; };
%End

@ -80,9 +80,7 @@ public:
TQIODevice *device() const; TQIODevice *device() const;
void setDevice(TQIODevice *); void setDevice(TQIODevice *);
void unsetDevice(); void unsetDevice();
%If (TQt_2_00 -)
bool atEnd() const; bool atEnd() const;
%End
bool eof() const; bool eof() const;
enum ByteOrder { enum ByteOrder {
@ -135,7 +133,6 @@ public:
TQDataStream &writeRawBytes(const char * /Array/, TQDataStream &writeRawBytes(const char * /Array/,
uint /ArraySize/) /ReleaseGIL/; uint /ArraySize/) /ReleaseGIL/;
%If (TQt_3_0_0 -)
// These are taken from the corresponding class definitions. We limit // These are taken from the corresponding class definitions. We limit
// them to TQt v3.0.0 and later just to avoid checking earlier versions. // them to TQt v3.0.0 and later just to avoid checking earlier versions.
@ -213,11 +210,8 @@ public:
TQDataStream &operator<<(const TQWMatrix &); TQDataStream &operator<<(const TQWMatrix &);
TQDataStream &operator>>(TQWMatrix & /Constrained/); TQDataStream &operator>>(TQWMatrix & /Constrained/);
%End
%If (TQt_3_1_0 -)
TQDataStream &operator<<(const TQUuid &); TQDataStream &operator<<(const TQUuid &);
TQDataStream &operator>>(TQUuid & /Constrained/); TQDataStream &operator>>(TQUuid & /Constrained/);
%End
private: private:
TQDataStream(const TQDataStream &); TQDataStream(const TQDataStream &);

@ -86,38 +86,19 @@ public:
int daysInMonth() const; int daysInMonth() const;
int daysInYear() const; int daysInYear() const;
%If (TQt_3_1_0 -)
int weekNumber(int * = 0) const; int weekNumber(int * = 0) const;
%End
%If (- TQt_2_00)
virtual const char *monthName(int) const;
virtual const char *dayName(int) const;
%End
%If (TQt_2_00 - TQt_3_0_0)
virtual TQString monthName(int) const;
virtual TQString dayName(int) const;
%End
%If (TQt_3_0_0 -)
static TQString shortMonthName(int); static TQString shortMonthName(int);
static TQString shortDayName(int); static TQString shortDayName(int);
static TQString longMonthName(int); static TQString longMonthName(int);
static TQString longDayName(int); static TQString longDayName(int);
%End
%If (- TQt_3_0_0)
TQString toString() const;
%End
%If (TQt_3_0_0 -)
TQString toString(TQt::DateFormat = TQt::TextDate) const; TQString toString(TQt::DateFormat = TQt::TextDate) const;
TQString toString(const TQString &) const; TQString toString(const TQString &) const;
%End
bool setYMD(int,int,int); bool setYMD(int,int,int);
TQDate addDays(int) const; TQDate addDays(int) const;
%If (TQt_3_0_0 -)
TQDate addMonths(int) const; TQDate addMonths(int) const;
TQDate addYears(int) const; TQDate addYears(int) const;
%End
int daysTo(const TQDate &) const; int daysTo(const TQDate &) const;
int __nonzero__() const; int __nonzero__() const;
@ -133,20 +114,14 @@ public:
bool operator>=(const TQDate &) const; bool operator>=(const TQDate &) const;
static TQDate currentDate(); static TQDate currentDate();
%If (TQt_3_1_0 -)
static TQDate currentDate(TQt::TimeSpec); static TQDate currentDate(TQt::TimeSpec);
%End
%If (TQt_3_0_0 -)
static TQDate fromString(const TQString &,TQt::DateFormat = TQt::TextDate); static TQDate fromString(const TQString &,TQt::DateFormat = TQt::TextDate);
%End
static bool isValid(int,int,int); static bool isValid(int,int,int);
static bool leapYear(int); static bool leapYear(int);
%If (TQt_3_0_0 -)
// These are defined in TQt3 but not documented. // These are defined in TQt3 but not documented.
//static uint gregorianToJulian(int,int,int); //static uint gregorianToJulian(int,int,int);
//static void julianToGregorian(uint,int &,int &,int &); //static void julianToGregorian(uint,int &,int &,int &);
%End
}; };
@ -167,13 +142,8 @@ public:
int second() const; int second() const;
int msec() const; int msec() const;
%If (- TQt_3_0_0)
TQString toString() const;
%End
%If (TQt_3_0_0 -)
TQString toString(TQt::DateFormat = TQt::TextDate) const; TQString toString(TQt::DateFormat = TQt::TextDate) const;
TQString toString(const TQString &) const; TQString toString(const TQString &) const;
%End
bool setHMS(int,int,int,int = 0); bool setHMS(int,int,int,int = 0);
@ -195,22 +165,13 @@ public:
bool operator>=(const TQTime &) const; bool operator>=(const TQTime &) const;
static TQTime currentTime(); static TQTime currentTime();
%If (TQt_3_1_0 -)
static TQTime currentTime(TQt::TimeSpec); static TQTime currentTime(TQt::TimeSpec);
%End
%If (TQt_3_0_0 -)
static TQTime fromString(const TQString &,TQt::DateFormat = TQt::TextDate); static TQTime fromString(const TQString &,TQt::DateFormat = TQt::TextDate);
%End
static bool isValid(int,int,int,int = 0); static bool isValid(int,int,int,int = 0);
void start(); void start();
int restart(); int restart();
%If (- TQt_3_0_0)
int elapsed();
%End
%If (TQt_3_0_0 -)
int elapsed() const; int elapsed() const;
%End
}; };
@ -230,29 +191,18 @@ public:
TQDate date() const; TQDate date() const;
TQTime time() const; TQTime time() const;
%If (TQt_3_1_0 -)
uint toTime_t() const; uint toTime_t() const;
%End
void setDate(const TQDate &); void setDate(const TQDate &);
void setTime(const TQTime &); void setTime(const TQTime &);
void setTime_t(uint); void setTime_t(uint);
%If (TQt_3_1_0 -)
void setTime_t(uint,TQt::TimeSpec); void setTime_t(uint,TQt::TimeSpec);
%End
%If (- TQt_3_0_0)
TQString toString() const;
%End
%If (TQt_3_0_0 -)
TQString toString(TQt::DateFormat = TQt::TextDate) const; TQString toString(TQt::DateFormat = TQt::TextDate) const;
TQString toString(const TQString &) const; TQString toString(const TQString &) const;
%End
TQDateTime addDays(int) const; TQDateTime addDays(int) const;
%If (TQt_3_0_0 -)
TQDateTime addMonths(int) const; TQDateTime addMonths(int) const;
TQDateTime addYears(int) const; TQDateTime addYears(int) const;
%End
TQDateTime addSecs(int) const; TQDateTime addSecs(int) const;
int daysTo(const TQDateTime &) const; int daysTo(const TQDateTime &) const;
int secsTo(const TQDateTime &) const; int secsTo(const TQDateTime &) const;
@ -270,11 +220,7 @@ public:
bool operator>=(const TQDateTime &) const; bool operator>=(const TQDateTime &) const;
static TQDateTime currentDateTime(); static TQDateTime currentDateTime();
%If (TQt_3_1_0 -)
static TQDateTime currentDateTime(TQt::TimeSpec); static TQDateTime currentDateTime(TQt::TimeSpec);
%End
%If (TQt_3_0_0 -)
static TQDateTime fromString(const TQString &, static TQDateTime fromString(const TQString &,
TQt::DateFormat = TQt::TextDate); TQt::DateFormat = TQt::TextDate);
%End
}; };

@ -42,8 +42,6 @@
%End %End
%If (TQt_3_0_0 -)
// TQDateEdit actually inherits TQDateTimeEditBase but that's an internal class // TQDateEdit actually inherits TQDateTimeEditBase but that's an internal class
// and isn't exported under Windows in all versions. // and isn't exported under Windows in all versions.
@ -66,9 +64,6 @@ public:
TQSize sizeHint() const; TQSize sizeHint() const;
TQSize minimumSizeHint() const; TQSize minimumSizeHint() const;
%If (- TQt_3_1_0)
virtual void setDate(const TQDate &);
%End
TQDate date() const; TQDate date() const;
virtual void setOrder(Order); virtual void setOrder(Order);
Order order() const; Order order() const;
@ -83,14 +78,10 @@ public:
TQString separator() const; TQString separator() const;
virtual void setSeparator(const TQString &); virtual void setSeparator(const TQString &);
%If (TQt_3_2_0 -)
void removeFirstNumber(int); void removeFirstNumber(int);
%End
public slots: public slots:
%If (TQt_3_1_0 -)
virtual void setDate(const TQDate &); virtual void setDate(const TQDate &);
%End
signals: signals:
void valueChanged(const TQDate &); void valueChanged(const TQDate &);
@ -116,9 +107,7 @@ protected slots:
void updateButtons(); void updateButtons();
private: private:
%If (TQt_3_1_0 -)
TQDateEdit(const TQDateEdit &); TQDateEdit(const TQDateEdit &);
%End
}; };
@ -132,23 +121,18 @@ class TQTimeEdit : TQWidget
%End %End
public: public:
%If (TQt_3_1_0 -)
enum Display { enum Display {
Hours, Hours,
Minutes, Minutes,
Seconds, Seconds,
AMPM AMPM
}; };
%End
TQTimeEdit(TQWidget * /TransferThis/ = 0,const char * = 0); TQTimeEdit(TQWidget * /TransferThis/ = 0,const char * = 0);
TQTimeEdit(const TQTime &,TQWidget * /TransferThis/ = 0,const char * = 0); TQTimeEdit(const TQTime &,TQWidget * /TransferThis/ = 0,const char * = 0);
TQSize sizeHint() const; TQSize sizeHint() const;
TQSize minimumSizeHint() const; TQSize minimumSizeHint() const;
%If (- TQt_3_1_0)
virtual void setTime(const TQTime &);
%End
TQTime time() const; TQTime time() const;
virtual void setAutoAdvance(bool); virtual void setAutoAdvance(bool);
bool autoAdvance() const; bool autoAdvance() const;
@ -161,19 +145,13 @@ public:
TQString separator() const; TQString separator() const;
virtual void setSeparator(const TQString &); virtual void setSeparator(const TQString &);
%If (TQt_3_1_0 -)
uint display() const; uint display() const;
void setDisplay(uint); void setDisplay(uint);
%End
%If (TQt_3_2_0 -)
void removeFirstNumber(int); void removeFirstNumber(int);
%End
public slots: public slots:
%If (TQt_3_1_0 -)
virtual void setTime(const TQTime &); virtual void setTime(const TQTime &);
%End
signals: signals:
void valueChanged(const TQTime &); void valueChanged(const TQTime &);
@ -198,9 +176,7 @@ protected slots:
void updateButtons(); void updateButtons();
private: private:
%If (TQt_3_1_0 -)
TQTimeEdit(const TQTimeEdit &); TQTimeEdit(const TQTimeEdit &);
%End
}; };
@ -217,9 +193,6 @@ public:
TQSize sizeHint() const; TQSize sizeHint() const;
TQSize minimumSizeHint() const; TQSize minimumSizeHint() const;
%If (- TQt_3_1_0)
virtual void setDateTime(const TQDateTime &);
%End
TQDateTime dateTime() const; TQDateTime dateTime() const;
TQDateEdit* dateEdit(); TQDateEdit* dateEdit();
@ -229,9 +202,7 @@ public:
bool autoAdvance() const; bool autoAdvance() const;
public slots: public slots:
%If (TQt_3_1_0 -)
virtual void setDateTime(const TQDateTime &); virtual void setDateTime(const TQDateTime &);
%End
signals: signals:
void valueChanged(const TQDateTime &); void valueChanged(const TQDateTime &);
@ -239,18 +210,11 @@ signals:
protected: protected:
void init(); void init();
void resizeEvent(TQResizeEvent *); void resizeEvent(TQResizeEvent *);
%If (- TQt_3_1_2)
void layoutEditors();
%End
protected slots: protected slots:
void newValue(const TQDate &); void newValue(const TQDate &);
void newValue(const TQTime &); void newValue(const TQTime &);
private: private:
%If (TQt_3_1_0 -)
TQDateTimeEdit(const TQDateTimeEdit &); TQDateTimeEdit(const TQDateTimeEdit &);
%End
}; };
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_3_0_0 -)
class TQDesktopWidget : TQWidget class TQDesktopWidget : TQWidget
{ {
%TypeHeaderCode %TypeHeaderCode
@ -51,7 +49,6 @@ public:
TQWidget *screen(int = -1); TQWidget *screen(int = -1);
const TQRect &screenGeometry(int = -1) const; const TQRect &screenGeometry(int = -1) const;
%If (TQt_3_1_0 -)
const TQRect &screenGeometry(TQWidget *) const; const TQRect &screenGeometry(TQWidget *) const;
const TQRect &screenGeometry(const TQPoint &) const; const TQRect &screenGeometry(const TQPoint &) const;
@ -60,25 +57,14 @@ public:
const TQRect &availableGeometry(const TQPoint &) const; const TQRect &availableGeometry(const TQPoint &) const;
void insertChild(TQObject *); void insertChild(TQObject *);
%End
signals: signals:
%If (TQt_3_2_0 -)
void resized(int); void resized(int);
%End
%If (TQt_3_3_0 -)
void workAreaResized(int); void workAreaResized(int);
%End
protected: protected:
%If (TQt_3_1_0 -)
void resizeEvent(TQResizeEvent *); void resizeEvent(TQResizeEvent *);
%End
private: private:
%If (TQt_3_1_0 -)
TQDesktopWidget(const TQDesktopWidget &); TQDesktopWidget(const TQDesktopWidget &);
%End
}; };
%End

@ -29,7 +29,6 @@
%End %End
%If (TQt_2_2_0 -)
%If (TQt_DIAL) %If (TQt_DIAL)
class TQDial : TQWidget, TQRangeControl class TQDial : TQWidget, TQRangeControl
@ -39,12 +38,7 @@ class TQDial : TQWidget, TQRangeControl
%End %End
public: public:
%If (- TQt_3_0_0)
TQDial(TQWidget * /TransferThis/ = 0,const char * = 0);
%End
%If (TQt_3_0_0 -)
TQDial(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0); TQDial(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0);
%End
TQDial(int,int,int,int,TQWidget * /TransferThis/ = 0,const char * = 0); TQDial(int,int,int,int,TQWidget * /TransferThis/ = 0,const char * = 0);
bool tracking() const; bool tracking() const;
@ -109,4 +103,3 @@ private:
}; };
%End %End
%End

@ -54,31 +54,10 @@ public:
Accepted Accepted
}; };
%If (- TQt_3_0_0)
int exec() /PyName=exec_loop, ReleaseGIL,
PreHook=__pyTQtPreEventLoopHook__,
PostHook=__pyTQtPostEventLoopHook__/;
%MethodCode
// Transfer ownership back to Python (a modal dialog will
// probably have the main window as it's parent). This means
// the TQt dialog will be deleted when the Python wrapper is
// garbage collected. Although this is a little inconsistent,
// it saves having to code it explicitly to avoid the memory
// leak.
sipTransferBack(sipSelf);
Py_BEGIN_ALLOW_THREADS
sipRes = sipCpp->TQDialog::exec();
Py_END_ALLOW_THREADS
%End
%End
int result() const; int result() const;
void show(); void show();
%If (TQt_2_00 -)
void hide(); void hide();
%End
void move(int,int); void move(int,int);
void move(const TQPoint &); void move(const TQPoint &);
void resize(int,int); void resize(int,int);
@ -86,7 +65,6 @@ public:
void setGeometry(int,int,int,int); void setGeometry(int,int,int,int);
void setGeometry(const TQRect &); void setGeometry(const TQRect &);
%If (TQt_2_2_0 -)
void setOrientation(Orientation); void setOrientation(Orientation);
Orientation orientation() const; Orientation orientation() const;
@ -98,15 +76,11 @@ public:
void setSizeGripEnabled(bool); void setSizeGripEnabled(bool);
bool isSizeGripEnabled() const; bool isSizeGripEnabled() const;
%End
%If (TQt_3_2_0 -)
void setModal(bool); void setModal(bool);
bool isModal() const; bool isModal() const;
%End
public slots: public slots:
%If (TQt_3_0_0 -)
int exec() /PyName=exec_loop, ReleaseGIL, int exec() /PyName=exec_loop, ReleaseGIL,
PreHook=__pyTQtPreEventLoopHook__, PreHook=__pyTQtPreEventLoopHook__,
PostHook=__pyTQtPostEventLoopHook__/; PostHook=__pyTQtPostEventLoopHook__/;
@ -123,35 +97,22 @@ public slots:
sipRes = sipCpp->TQDialog::exec(); sipRes = sipCpp->TQDialog::exec();
Py_END_ALLOW_THREADS Py_END_ALLOW_THREADS
%End %End
%End
protected slots: protected slots:
virtual void done(int); virtual void done(int);
%If (- TQt_2_00)
void accept();
void reject();
%End
%If (TQt_2_00 -)
virtual void accept(); virtual void accept();
virtual void reject(); virtual void reject();
%End
%If (TQt_2_2_0 -)
void showExtension(bool); void showExtension(bool);
%End
protected: protected:
void setResult(int); void setResult(int);
void keyPressEvent(TQKeyEvent *); void keyPressEvent(TQKeyEvent *);
void closeEvent(TQCloseEvent *); void closeEvent(TQCloseEvent *);
%If (TQt_2_2_0 -)
void resizeEvent(TQResizeEvent *); void resizeEvent(TQResizeEvent *);
%End
%If (TQt_3_0_0 -)
void contextMenuEvent(TQContextMenuEvent *); void contextMenuEvent(TQContextMenuEvent *);
bool eventFilter(TQObject *,TQEvent *); bool eventFilter(TQObject *,TQEvent *);
void adjustPosition(TQWidget *); void adjustPosition(TQWidget *);
%End
private: private:
TQDialog(const TQDialog &); TQDialog(const TQDialog &);

@ -158,34 +158,10 @@ public:
}; };
TQDir(); TQDir();
%If (- TQt_2_00)
TQDir(const char *,const char * = 0,int = Name | IgnoreCase,int = All);
%End
%If (TQt_2_00 -)
TQDir(const TQString &,const TQString & = TQString::null, TQDir(const TQString &,const TQString & = TQString::null,
int = Name | IgnoreCase,int = All); int = Name | IgnoreCase,int = All);
%End
TQDir(const TQDir &); TQDir(const TQDir &);
%If (- TQt_2_00)
void setPath(const char *);
const char *path() const;
TQString absPath() const;
TQString canonicalPath() const;
TQString dirName() const;
TQString filePath(const char *,bool = 1) const;
TQString absFilePath(const char *,bool = 1) const;
static TQString convertSeparators(const char *);
bool cd(const char *,bool = 1);
bool cdUp();
const char *nameFilter() const;
void setNameFilter(const char *);
%End
%If (TQt_2_00 -)
virtual void setPath(const TQString &); virtual void setPath(const TQString &);
virtual TQString path() const; virtual TQString path() const;
virtual TQString absPath() const; virtual TQString absPath() const;
@ -202,29 +178,13 @@ public:
TQString nameFilter() const; TQString nameFilter() const;
virtual void setNameFilter(const TQString &); virtual void setNameFilter(const TQString &);
%End
FilterSpec filter() const; FilterSpec filter() const;
%If (- TQt_2_00)
void setFilter(int);
%End
%If (TQt_2_00 -)
virtual void setFilter(int); virtual void setFilter(int);
%End
SortSpec sorting() const; SortSpec sorting() const;
%If (- TQt_2_00)
void setSorting(int);
%End
%If (TQt_2_00 -)
virtual void setSorting(int); virtual void setSorting(int);
%End
bool matchAllDirs() const; bool matchAllDirs() const;
%If (- TQt_2_00)
void setMatchAllDirs(bool);
%End
%If (TQt_2_00 -)
virtual void setMatchAllDirs(bool); virtual void setMatchAllDirs(bool);
%End
uint count() const; uint count() const;
@ -288,16 +248,6 @@ public:
Py_END_ALLOW_THREADS Py_END_ALLOW_THREADS
%End %End
%If (- TQt_2_00)
const TQStrList *entryList(int = DefaultFilter,int = DefaultSort) const;
const TQStrList *entryList(const char *,int = DefaultFilter,
int = DefaultSort) const;
const TQFileInfoList *entryInfoList(int = DefaultFilter,
int = DefaultSort) const;
const TQFileInfoList *entryInfoList(const char *,int = DefaultFilter,
int = DefaultSort) const;
%End
%If (TQt_2_00 -)
virtual TQStrList encodedEntryList(int = DefaultFilter, virtual TQStrList encodedEntryList(int = DefaultFilter,
int = DefaultSort) const; int = DefaultSort) const;
virtual TQStrList encodedEntryList(const TQString &,int = DefaultFilter, virtual TQStrList encodedEntryList(const TQString &,int = DefaultFilter,
@ -311,29 +261,9 @@ public:
virtual const TQFileInfoList *entryInfoList(const TQString &, virtual const TQFileInfoList *entryInfoList(const TQString &,
int = DefaultFilter, int = DefaultFilter,
int = DefaultSort) const; int = DefaultSort) const;
%End
static const TQFileInfoList *drives(); static const TQFileInfoList *drives();
%If (- TQt_2_00)
bool mkdir(const char *,bool = 1) const;
bool rmdir(const char *,bool = 1) const;
bool isReadable() const;
bool exists() const;
bool isRoot() const;
bool isRelative() const;
void convertToAbs();
bool operator==(const TQDir &) const;
bool operator!=(const TQDir &) const;
bool remove(const char *,bool = 1);
bool rename(const char *,const char *,bool = 1);
bool exists(const char *,bool = 1);
%End
%If (TQt_2_00 -)
virtual bool mkdir(const TQString &,bool = 1) const; virtual bool mkdir(const TQString &,bool = 1) const;
virtual bool rmdir(const TQString &,bool = 1) const; virtual bool rmdir(const TQString &,bool = 1) const;
@ -347,16 +277,10 @@ public:
virtual bool remove(const TQString &,bool = 1); virtual bool remove(const TQString &,bool = 1);
virtual bool rename(const TQString &,const TQString &,bool = 1); virtual bool rename(const TQString &,const TQString &,bool = 1);
virtual bool exists(const TQString &,bool = 1); virtual bool exists(const TQString &,bool = 1);
%End
static char separator(); static char separator();
%If (- TQt_2_00)
static bool setCurrent(const char *);
%End
%If (TQt_2_00 -)
static bool setCurrent(const TQString &); static bool setCurrent(const TQString &);
%End
static TQDir current(); static TQDir current();
static TQDir home(); static TQDir home();
static TQDir root(); static TQDir root();
@ -364,20 +288,9 @@ public:
static TQString homeDirPath(); static TQString homeDirPath();
static TQString rootDirPath(); static TQString rootDirPath();
%If (- TQt_2_00)
static bool match(const char *,const char *);
static TQString cleanDirPath(const char *);
static bool isRelativePath(const char *);
%End
%If (TQt_2_1_0 -)
static bool match(const TQStringList &,const TQString &); static bool match(const TQStringList &,const TQString &);
%End
%If (TQt_2_00 -)
static bool match(const TQString &,const TQString &); static bool match(const TQString &,const TQString &);
static TQString cleanDirPath(const TQString &); static TQString cleanDirPath(const TQString &);
static bool isRelativePath(const TQString &); static bool isRelativePath(const TQString &);
%End
%If (TQt_3_1_0 -)
void refresh() const; void refresh() const;
%End
}; };

@ -35,8 +35,6 @@ TQDockWIndow or -1 if the TQDockArea does not contain the TQDockWindow.
%End %End
%If (TQt_3_0_0 -)
class TQDockArea : TQWidget class TQDockArea : TQWidget
{ {
%TypeHeaderCode %TypeHeaderCode
@ -84,5 +82,3 @@ public slots:
private: private:
TQDockArea(const TQDockArea &); TQDockArea(const TQDockArea &);
}; };
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_3_0_0 -)
class TQDockWindow : TQFrame class TQDockWindow : TQFrame
{ {
%TypeHeaderCode %TypeHeaderCode
@ -52,9 +50,7 @@ public:
TQDockWindow(Place = InDock,TQWidget * /TransferThis/ = 0, TQDockWindow(Place = InDock,TQWidget * /TransferThis/ = 0,
const char * = 0,WFlags = 0); const char * = 0,WFlags = 0);
%If (TQt_3_1_0 -)
TQDockWindow(TQWidget * /TransferThis/,const char * = 0,WFlags = 0); TQDockWindow(TQWidget * /TransferThis/,const char * = 0,WFlags = 0);
%End
virtual void setWidget(TQWidget *); virtual void setWidget(TQWidget *);
TQWidget *widget() const; TQWidget *widget() const;
@ -119,17 +115,11 @@ protected:
void hideEvent(TQHideEvent *); void hideEvent(TQHideEvent *);
void contextMenuEvent(TQContextMenuEvent *); void contextMenuEvent(TQContextMenuEvent *);
%If (TQt_3_0_1 -)
void drawFrame(TQPainter *); void drawFrame(TQPainter *);
%End
%If (TQt_3_1_0 -)
void drawContents(TQPainter *); void drawContents(TQPainter *);
%End
bool event(TQEvent *); bool event(TQEvent *);
private: private:
TQDockWindow(const TQDockWindow &); TQDockWindow(const TQDockWindow &);
}; };
%End

@ -20,6 +20,7 @@
// 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.
%DefaultEncoding "UTF-8"
%ExportedDoc %ExportedDoc
<Sect2><Title>TQColorDrag (TQt v2.1+)</Title> <Sect2><Title>TQColorDrag (TQt v2.1+)</Title>
@ -66,44 +67,6 @@
%End %End
%If (- TQt_2_00)
class TQDragObject : TQObject
{
%TypeHeaderCode
#include <tqdragobject.h>
%End
public:
enum DragMode {
DragDefault,
DragCopy,
DragMove,
DragCopyOrMove
};
TQDragObject(TQWidget * /TransferThis/ = 0,const char * = 0);
bool drag();
bool dragMove();
void dragCopy();
virtual bool provides(const char *) const;
virtual const char *format(int) const = 0;
virtual TQByteArray encodedData(const char *) const = 0;
void setPixmap(TQPixmap);
void setPixmap(TQPixmap,TQPoint);
TQPixmap pixmap() const;
TQPoint pixmapHotSpot() const;
TQWidget *source();
protected:
virtual bool drag(DragMode);
};
%End
%If (TQt_2_00 -)
class TQDragObject : TQObject, TQMimeSource class TQDragObject : TQObject, TQMimeSource
{ {
%TypeHeaderCode %TypeHeaderCode
@ -117,17 +80,10 @@ public:
bool drag(); bool drag();
bool dragMove(); bool dragMove();
void dragCopy(); void dragCopy();
%If (TQt_3_0_0 -)
void dragLink(); void dragLink();
%End
virtual void setPixmap(TQPixmap); virtual void setPixmap(TQPixmap);
%If (- TQt_3_0_0)
virtual void setPixmap(TQPixmap,TQPoint);
%End
%If (TQt_3_0_0 -)
virtual void setPixmap(TQPixmap,const TQPoint &); virtual void setPixmap(TQPixmap,const TQPoint &);
%End
TQPixmap pixmap() const; TQPixmap pixmap() const;
TQPoint pixmapHotSpot() const; TQPoint pixmapHotSpot() const;
%End %End
@ -138,15 +94,6 @@ public:
static void setTarget(TQWidget *); static void setTarget(TQWidget *);
%If (TQt_DRAGANDDROP) %If (TQt_DRAGANDDROP)
%If (- TQt_3_0_0)
enum DragMode {
DragDefault,
DragCopy,
DragMove,
DragCopyOrMove
};
%End
%If (TQt_3_0_0 -)
enum DragMode { enum DragMode {
DragDefault, DragDefault,
DragCopy, DragCopy,
@ -155,7 +102,6 @@ public:
DragCopyOrMove DragCopyOrMove
}; };
%End %End
%End
protected: protected:
%If (TQt_DRAGANDDROP) %If (TQt_DRAGANDDROP)
@ -163,13 +109,9 @@ protected:
%End %End
private: private:
%If (TQt_3_1_0 -)
TQDragObject(const TQDragObject &); TQDragObject(const TQDragObject &);
%End
}; };
%End
class TQStoredDrag : TQDragObject class TQStoredDrag : TQDragObject
{ {
@ -180,44 +122,16 @@ class TQStoredDrag : TQDragObject
public: public:
TQStoredDrag(const char *,TQWidget * /TransferThis/ = 0,const char * = 0); TQStoredDrag(const char *,TQWidget * /TransferThis/ = 0,const char * = 0);
%If (- TQt_2_00)
void setEncodedData(const TQByteArray&);
%End
%If (TQt_2_00 -)
virtual void setEncodedData(const TQByteArray&); virtual void setEncodedData(const TQByteArray&);
%End
const char *format(int) const; const char *format(int) const;
virtual TQByteArray encodedData(const char *) const; virtual TQByteArray encodedData(const char *) const;
private: private:
%If (TQt_3_1_0 -)
TQStoredDrag(const TQStoredDrag &); TQStoredDrag(const TQStoredDrag &);
%End
}; };
%If (- TQt_2_00)
class TQTextDrag : TQStoredDrag
{
%TypeHeaderCode
#include <tqdragobject.h>
%End
public:
TQTextDrag(const char *,TQWidget * /TransferThis/ = 0,const char * = 0);
TQTextDrag(TQWidget * /TransferThis/ = 0,const char * = 0);
void setText(const char *);
static bool canDecode(TQDragMoveEvent *);
static bool decode(TQDropEvent *,TQString &);
};
%End
%If (TQt_2_00 -)
class TQTextDrag : TQDragObject class TQTextDrag : TQDragObject
{ {
%TypeHeaderCode %TypeHeaderCode
@ -240,13 +154,9 @@ public:
static bool decode(const TQMimeSource *,TQString &,TQCString &); static bool decode(const TQMimeSource *,TQString &,TQCString &);
private: private:
%If (TQt_3_1_0 -)
TQTextDrag(const TQTextDrag &); TQTextDrag(const TQTextDrag &);
%End
}; };
%End
class TQImageDrag : TQDragObject class TQImageDrag : TQDragObject
{ {
@ -258,56 +168,19 @@ public:
TQImageDrag(TQImage,TQWidget * /TransferThis/ = 0,const char * = 0); TQImageDrag(TQImage,TQWidget * /TransferThis/ = 0,const char * = 0);
TQImageDrag(TQWidget * /TransferThis/ = 0,const char * = 0); TQImageDrag(TQWidget * /TransferThis/ = 0,const char * = 0);
%If (- TQt_2_00)
void setImage(TQImage);
%End
%If (TQt_2_00 -)
virtual void setImage(TQImage); virtual void setImage(TQImage);
%End
const char *format(int) const; const char *format(int) const;
virtual TQByteArray encodedData(const char *) const; virtual TQByteArray encodedData(const char *) const;
%If (- TQt_2_00)
static bool canDecode(TQDragMoveEvent *);
static bool decode(TQDropEvent *,TQImage &);
static bool decode(TQDropEvent *,TQPixmap &);
%End
%If (TQt_2_00 -)
static bool canDecode(const TQMimeSource *); static bool canDecode(const TQMimeSource *);
static bool decode(const TQMimeSource *,TQImage &); static bool decode(const TQMimeSource *,TQImage &);
static bool decode(const TQMimeSource *,TQPixmap &); static bool decode(const TQMimeSource *,TQPixmap &);
%End
private: private:
%If (TQt_3_1_0 -)
TQImageDrag(const TQImageDrag &); TQImageDrag(const TQImageDrag &);
%End
};
%If (- TQt_2_00)
class TQUrlDrag : TQStoredDrag
{
%TypeHeaderCode
#include <tqdragobject.h>
%End
public:
TQUrlDrag(TQStrList,TQWidget * /TransferThis/ = 0,const char * = 0);
TQUrlDrag(TQWidget * /TransferThis/ = 0,const char * = 0);
void setUrls(TQStrList);
static TQString urlToLocalFile(const char *);
static bool canDecode(TQDragMoveEvent *);
static bool decode(TQDropEvent *,TQStrList &);
static bool decodeLocalFiles(TQDropEvent *,TQStrList &);
}; };
%End
%If (TQt_2_00 -)
class TQUriDrag : TQStoredDrag class TQUriDrag : TQStoredDrag
{ {
@ -319,14 +192,8 @@ public:
TQUriDrag(TQStrList,TQWidget * /TransferThis/ = 0,const char * = 0); TQUriDrag(TQStrList,TQWidget * /TransferThis/ = 0,const char * = 0);
TQUriDrag(TQWidget * /TransferThis/ = 0,const char * = 0); TQUriDrag(TQWidget * /TransferThis/ = 0,const char * = 0);
%If (- TQt_3_0_0)
void setFilenames(TQStringList);
void setUnicodeUris(TQStringList);
%End
%If (TQt_3_0_0 -)
void setFileNames(const TQStringList &); void setFileNames(const TQStringList &);
void setUnicodeUris(const TQStringList &); void setUnicodeUris(const TQStringList &);
%End
virtual void setUris(TQStrList); virtual void setUris(TQStrList);
static TQString uriToLocalFile(const char *); static TQString uriToLocalFile(const char *);
@ -339,15 +206,9 @@ public:
static bool decodeLocalFiles(const TQMimeSource *,TQStringList &); static bool decodeLocalFiles(const TQMimeSource *,TQStringList &);
private: private:
%If (TQt_3_1_0 -)
TQUriDrag(const TQUriDrag &); TQUriDrag(const TQUriDrag &);
%End
}; };
%End
%If (TQt_2_1_0 -)
class TQColorDrag : TQStoredDrag class TQColorDrag : TQStoredDrag
{ {
@ -366,9 +227,5 @@ public:
static bool decode(TQMimeSource *,TQColor &); static bool decode(TQMimeSource *,TQColor &);
private: private:
%If (TQt_3_1_0 -)
TQColorDrag(const TQColorDrag &); TQColorDrag(const TQColorDrag &);
%End
}; };
%End

@ -54,21 +54,3 @@ void qDrawPlainRect(TQPainter *,int,int,int,int,const TQColor &,int = 1,
const TQBrush * = 0); const TQBrush * = 0);
void qDrawPlainRect(TQPainter *,const TQRect &,const TQColor &,int = 1, void qDrawPlainRect(TQPainter *,const TQRect &,const TQColor &,int = 1,
const TQBrush * = 0); const TQBrush * = 0);
%If (- TQt_2_00)
TQRect qItemRect(TQPainter *,GUIStyle,int,int,int,int,int,bool,const TQPixmap *,
const char *,int = -1);
void qDrawItem(TQPainter *,GUIStyle,int,int,int,int,int,const TQColorGroup &,bool,
const TQPixmap *,const char *,int = -1);
enum ArrowType {
UpArrow,
DownArrow,
LeftArrow,
RightArrow
};
void qDrawArrow(TQPainter *,ArrowType,GUIStyle,bool,int,int,int,int,
const TQColorGroup &,bool);
%End

@ -39,13 +39,6 @@ class TQDropSite
public: public:
TQDropSite(TQWidget *); TQDropSite(TQWidget *);
%If (- TQt_2_00)
virtual void dragEnterEvent(TQDragEnterEvent *);
virtual void dragMoveEvent(TQDragMoveEvent *);
virtual void dragLeaveEvent(TQDragLeaveEvent *);
virtual void dropEvent(TQDropEvent *);
%End
}; };
%End %End

@ -29,8 +29,6 @@
%End %End
%If (TQt_3_0_0 -)
class TQErrorMessage : TQDialog class TQErrorMessage : TQDialog
{ {
%TypeHeaderCode %TypeHeaderCode
@ -49,9 +47,5 @@ protected:
void done(int); void done(int);
private: private:
%If (TQt_3_1_0 -)
TQErrorMessage(const TQErrorMessage &); TQErrorMessage(const TQErrorMessage &);
%End
}; };
%End

@ -175,149 +175,6 @@ passed as the event data and its reference count is increased.
%End %End
%If (- TQt_2_00)
const int Event_None;
const int Event_Timer;
const int Event_MouseButtonPress;
const int Event_MouseButtonRelease;
const int Event_MouseButtonDblClick;
const int Event_MouseMove;
const int Event_KeyPress;
const int Event_KeyRelease;
const int Event_FocusIn;
const int Event_FocusOut;
const int Event_Enter;
const int Event_Leave;
const int Event_Paint;
const int Event_Move;
const int Event_Resize;
const int Event_Create;
const int Event_Destroy;
const int Event_Show;
const int Event_Hide;
const int Event_Close;
const int Event_Quit;
const int Event_Accel;
const int Event_Clipboard;
const int Event_SockAct;
const int Event_DragEnter;
const int Event_DragMove;
const int Event_DragLeave;
const int Event_Drop;
const int Event_DragResponse;
const int Event_ChildInserted;
const int Event_ChildRemoved;
const int Event_LayoutHint;
const int Event_ActivateControl;
const int Event_DeactivateControl;
const int Event_User;
enum ButtonState {
NoButton = 0x00,
LeftButton = 0x01,
RightButton = 0x02,
MidButton = 0x04,
MouseButtonMask = 0x07,
ShiftButton = 0x08,
ControlButton = 0x10,
AltButton = 0x20,
KeyButtonMask = 0x38
};
class TQEvent
{
%TypeHeaderCode
#include <tqevent.h>
%End
public:
TQEvent(int);
TQEvent(TQEvent&);
int type() const;
%ConvertToSubClassCode
switch (sipCpp -> type())
{
case Event_Timer:
sipClass = sipClass_TQTimerEvent;
break;
case Event_MouseButtonPress:
case Event_MouseButtonRelease:
case Event_MouseButtonDblClick:
case Event_MouseMove:
sipClass = sipClass_TQMouseEvent;
break;
case Event_KeyPress:
case Event_KeyRelease:
sipClass = sipClass_TQKeyEvent;
break;
case Event_FocusIn:
case Event_FocusOut:
sipClass = sipClass_TQFocusEvent;
break;
case Event_Paint:
sipClass = sipClass_TQPaintEvent;
break;
case Event_Move:
sipClass = sipClass_TQMoveEvent;
break;
case Event_Resize:
sipClass = sipClass_TQResizeEvent;
break;
case Event_Close:
sipClass = sipClass_TQCloseEvent;
break;
case Event_Show:
sipClass = sipClass_TQShowEvent;
break;
case Event_Hide:
sipClass = sipClass_TQHideEvent;
break;
case Event_DragMove:
sipClass = sipClass_TQDragMoveEvent;
break;
case Event_DragEnter:
sipClass = sipClass_TQDragEnterEvent;
break;
case Event_DragLeave:
sipClass = sipClass_TQDragLeaveEvent;
break;
case Event_Drop:
sipClass = sipClass_TQDropEvent;
break;
case Event_ChildInserted:
case Event_ChildRemoved:
sipClass = sipClass_TQChildEvent;
break;
default:
sipClass = NULL;
}
%End
};
%End
%If (TQt_2_00 -)
class TQEvent : TQt class TQEvent : TQt
{ {
%TypeHeaderCode %TypeHeaderCode
@ -348,7 +205,6 @@ public:
Hide, Hide,
Close, Close,
Quit, Quit,
%If (TQt_2_1_0 -)
Reparent, Reparent,
ShowMinimized, ShowMinimized,
ShowNormal, ShowNormal,
@ -357,35 +213,22 @@ public:
ShowToParent, ShowToParent,
HideToParent, HideToParent,
ShowMaximized, ShowMaximized,
%End
%If (TQt_3_0_0 -)
ShowFullScreen, ShowFullScreen,
%End
Accel, Accel,
Wheel, Wheel,
AccelAvailable, AccelAvailable,
%If (TQt_2_1_0 -)
CaptionChange, CaptionChange,
IconChange, IconChange,
ParentFontChange, ParentFontChange,
ApplicationFontChange, ApplicationFontChange,
ParentPaletteChange, ParentPaletteChange,
ApplicationPaletteChange, ApplicationPaletteChange,
%End
%If (TQt_3_0_0 -)
PaletteChange, PaletteChange,
%End
Clipboard, Clipboard,
%If (TQt_2_2_0 -)
Speech, Speech,
%End
SockAct, SockAct,
%If (TQt_2_2_0 -)
AccelOverride, AccelOverride,
%End
%If (TQt_3_0_0 -)
DeferredDelete, DeferredDelete,
%End
DragEnter, DragEnter,
DragMove, DragMove,
DragLeave, DragLeave,
@ -394,30 +237,16 @@ public:
ChildInserted, ChildInserted,
ChildRemoved, ChildRemoved,
LayoutHint, LayoutHint,
%If (TQt_2_2_0 -)
ShowWindowRequest, ShowWindowRequest,
%End
%If (TQt_3_3_0 -)
WindowBlocked, WindowBlocked,
WindowUnblocked, WindowUnblocked,
%End
ActivateControl, ActivateControl,
DeactivateControl, DeactivateControl,
%If (TQt_2_1_0 - TQt_2_2_0)
Configure,
ConfigureLayout,
%End
%If (TQt_3_0_0 -)
ContextMenu, ContextMenu,
IMStart, IMStart,
IMCompose, IMCompose,
IMEnd, IMEnd,
Accessibility, Accessibility,
%End
%If (TQt_3_0_0 - TQt_3_1_0)
Tablet,
%End
%If (TQt_3_1_0 -)
TabletMove, TabletMove,
LocaleChange, LocaleChange,
LanguageChange, LanguageChange,
@ -425,17 +254,12 @@ public:
Style, Style,
TabletPress, TabletPress,
TabletRelease, TabletRelease,
%End
%If (TQt_3_3_0 -)
OkRequest, OkRequest,
HelpRequest, HelpRequest,
IconDrag, IconDrag,
WindowStateChange, WindowStateChange,
%End
User, User,
%If (TQt_3_0_0 -)
MaxUser, MaxUser,
%End
}; };
TQEvent(Type); TQEvent(Type);
@ -443,9 +267,7 @@ public:
virtual ~TQEvent(); virtual ~TQEvent();
Type type() const; Type type() const;
%If (TQt_3_0_0 -)
bool spontaneous() const; bool spontaneous() const;
%End
%ConvertToSubClassCode %ConvertToSubClassCode
switch (sipCpp -> type()) switch (sipCpp -> type())
@ -462,9 +284,7 @@ public:
break; break;
case TQEvent::Accel: case TQEvent::Accel:
#if TQT_VERSION >= 220
case TQEvent::AccelOverride: case TQEvent::AccelOverride:
#endif
case TQEvent::KeyPress: case TQEvent::KeyPress:
case TQEvent::KeyRelease: case TQEvent::KeyRelease:
sipClass = sipClass_TQKeyEvent; sipClass = sipClass_TQKeyEvent;
@ -491,11 +311,9 @@ public:
sipClass = sipClass_TQCloseEvent; sipClass = sipClass_TQCloseEvent;
break; break;
#if TQT_VERSION >= 0x030300
case TQEvent::IconDrag: case TQEvent::IconDrag:
sipClass = sipClass_TQIconDragEvent; sipClass = sipClass_TQIconDragEvent;
break; break;
#endif
case TQEvent::Wheel: case TQEvent::Wheel:
sipClass = sipClass_TQWheelEvent; sipClass = sipClass_TQWheelEvent;
@ -532,7 +350,6 @@ public:
sipClass = sipClass_TQChildEvent; sipClass = sipClass_TQChildEvent;
break; break;
#if TQT_VERSION >= 0x030000
case TQEvent::ContextMenu: case TQEvent::ContextMenu:
sipClass = sipClass_TQContextMenuEvent; sipClass = sipClass_TQContextMenuEvent;
break; break;
@ -541,19 +358,7 @@ public:
case TQEvent::IMEnd: case TQEvent::IMEnd:
sipClass = sipClass_TQIMEvent; sipClass = sipClass_TQIMEvent;
break; break;
#endif
#if TQT_VERSION >= 0x030000 && TQT_VERSION < 0x030100
case TQEvent::IMCompose:
sipClass = sipClass_TQIMEvent;
break;
case TQEvent::Tablet:
sipClass = sipClass_TQTabletEvent;
break;
#endif
#if TQT_VERSION >= 0x030100
case TQEvent::IMCompose: case TQEvent::IMCompose:
sipClass = sipClass_TQIMComposeEvent; sipClass = sipClass_TQIMComposeEvent;
break; break;
@ -563,7 +368,6 @@ public:
case TQEvent::TabletRelease: case TQEvent::TabletRelease:
sipClass = sipClass_TQTabletEvent; sipClass = sipClass_TQTabletEvent;
break; break;
#endif
default: default:
sipClass = (sipCpp -> type() < TQEvent::User ? sipClass = (sipCpp -> type() < TQEvent::User ?
@ -573,8 +377,6 @@ public:
%End %End
}; };
%End
class TQTimerEvent : TQEvent class TQTimerEvent : TQEvent
{ {
@ -596,14 +398,8 @@ class TQMouseEvent : TQEvent
%End %End
public: public:
%If (- TQt_2_00)
TQMouseEvent(int,const TQPoint &,int,int);
TQMouseEvent(int,const TQPoint &,const TQPoint &,int,int);
%End
%If (TQt_2_00 -)
TQMouseEvent(Type,const TQPoint &,int,int); TQMouseEvent(Type,const TQPoint &,int,int);
TQMouseEvent(Type,const TQPoint &,const TQPoint &,int,int); TQMouseEvent(Type,const TQPoint &,const TQPoint &,int,int);
%End
const TQPoint &pos() const; const TQPoint &pos() const;
const TQPoint &globalPos() const; const TQPoint &globalPos() const;
@ -611,25 +407,15 @@ public:
int y() const; int y() const;
int globalX() const; int globalX() const;
int globalY() const; int globalY() const;
%If (- TQt_2_00)
int button() const;
int state() const;
%End
%If (TQt_2_00 -)
ButtonState button() const; ButtonState button() const;
ButtonState state() const; ButtonState state() const;
ButtonState stateAfter() const; ButtonState stateAfter() const;
%End
%If (TQt_3_0_0 -)
bool isAccepted() const; bool isAccepted() const;
void accept(); void accept();
void ignore(); void ignore();
%End
}; };
%If (TQt_2_00 -)
class TQWheelEvent : TQEvent class TQWheelEvent : TQEvent
{ {
%TypeHeaderCode %TypeHeaderCode
@ -637,15 +423,9 @@ class TQWheelEvent : TQEvent
%End %End
public: public:
%If (- TQt_3_0_0)
TQWheelEvent(const TQPoint &,int,int);
TQWheelEvent(const TQPoint &,const TQPoint &,int,int);
%End
%If (TQt_3_0_0 -)
TQWheelEvent(const TQPoint &,int,int,Orientation = Vertical); TQWheelEvent(const TQPoint &,int,int,Orientation = Vertical);
TQWheelEvent(const TQPoint &,const TQPoint &,int,int, TQWheelEvent(const TQPoint &,const TQPoint &,int,int,
Orientation = Vertical); Orientation = Vertical);
%End
int delta() const; int delta() const;
const TQPoint &pos() const; const TQPoint &pos() const;
@ -655,18 +435,12 @@ public:
int globalX() const; int globalX() const;
int globalY() const; int globalY() const;
ButtonState state() const; ButtonState state() const;
%If (TQt_3_0_0 -)
Orientation orientation() const; Orientation orientation() const;
%End
bool isAccepted() const; bool isAccepted() const;
void accept(); void accept();
void ignore(); void ignore();
}; };
%End
%If (TQt_3_0_0 -)
class TQTabletEvent : TQEvent class TQTabletEvent : TQEvent
{ {
@ -682,13 +456,8 @@ public:
Eraser Eraser
}; };
%If (- TQt_3_1_0)
TQTabletEvent(const TQPoint &,int,int,int,int,const TQPair<int,int> &);
%End
%If (TQt_3_1_0 -)
TQTabletEvent(Type,const TQPoint &,const TQPoint &,int,int,int,int, TQTabletEvent(Type,const TQPoint &,const TQPoint &,int,int,int,int,
const TQPair<int,int> &); const TQPair<int,int> &);
%End
TQTabletEvent(const TQPoint &,const TQPoint &,int,int,int,int, TQTabletEvent(const TQPoint &,const TQPoint &,int,int,int,int,
const TQPair<int,int> &); const TQPair<int,int> &);
@ -708,8 +477,6 @@ public:
TQPair<int,int> uniqueId(); TQPair<int,int> uniqueId();
}; };
%End
class TQKeyEvent : TQEvent class TQKeyEvent : TQEvent
{ {
@ -718,13 +485,8 @@ class TQKeyEvent : TQEvent
%End %End
public: public:
%If (- TQt_2_00)
TQKeyEvent(int,int,int,int);
%End
%If (TQt_2_00 -)
TQKeyEvent(Type,int,int,int,const TQString & = TQString::null,bool = 0, TQKeyEvent(Type,int,int,int,const TQString & = TQString::null,bool = 0,
ushort = 1); ushort = 1);
%End
int key() const; int key() const;
int ascii() const; int ascii() const;
@ -732,17 +494,11 @@ public:
void accept(); void accept();
void ignore(); void ignore();
%If (- TQt_2_00)
int state() const;
%End
%If (TQt_2_00 -)
ButtonState state() const; ButtonState state() const;
ButtonState stateAfter() const; ButtonState stateAfter() const;
TQString text() const; TQString text() const;
bool isAutoRepeat() const; bool isAutoRepeat() const;
int count() const; int count() const;
%End
}; };
@ -753,28 +509,11 @@ class TQFocusEvent : TQEvent
%End %End
public: public:
%If (- TQt_2_00)
TQFocusEvent(int);
%End
%If (TQt_2_00 -)
TQFocusEvent(Type); TQFocusEvent(Type);
%End
bool gotFocus() const; bool gotFocus() const;
bool lostFocus() const; bool lostFocus() const;
%If (TQt_2_1_0 -)
%If (- TQt_3_0_0)
enum Reason {
Mouse,
Tab,
ActiveWindow,
Popup,
Shortcut,
Other
};
%End
%If (TQt_3_0_0 -)
enum Reason { enum Reason {
Mouse, Mouse,
Tab, Tab,
@ -784,12 +523,10 @@ public:
Shortcut, Shortcut,
Other Other
}; };
%End
static Reason reason(); static Reason reason();
static void setReason(Reason); static void setReason(Reason);
static void resetReason(); static void resetReason();
%End
}; };
@ -800,22 +537,13 @@ class TQPaintEvent : TQEvent
%End %End
public: public:
%If (- TQt_2_00)
TQPaintEvent(const TQRect &);
%End
%If (TQt_2_00 -)
TQPaintEvent(const TQRegion &,bool = 1); TQPaintEvent(const TQRegion &,bool = 1);
TQPaintEvent(const TQRect &,bool = 1); TQPaintEvent(const TQRect &,bool = 1);
%End
%If (TQt_3_3_0 -)
TQPaintEvent(const TQRegion &,const TQRect &,bool = 1); TQPaintEvent(const TQRegion &,const TQRect &,bool = 1);
%End
const TQRect &rect() const; const TQRect &rect() const;
%If (TQt_2_00 -)
const TQRegion &region() const; const TQRegion &region() const;
bool erased() const; bool erased() const;
%End
}; };
@ -862,8 +590,6 @@ public:
}; };
%If (TQt_3_3_0 -)
class TQIconDragEvent : TQEvent class TQIconDragEvent : TQEvent
{ {
%TypeHeaderCode %TypeHeaderCode
@ -878,8 +604,6 @@ public:
void ignore(); void ignore();
}; };
%End
class TQShowEvent : TQEvent class TQShowEvent : TQEvent
{ {
@ -888,14 +612,7 @@ class TQShowEvent : TQEvent
%End %End
public: public:
%If (- TQt_3_0_0)
TQShowEvent(bool);
bool spontaneous() const;
%End
%If (TQt_3_0_0 -)
TQShowEvent(); TQShowEvent();
%End
}; };
@ -906,19 +623,10 @@ class TQHideEvent : TQEvent
%End %End
public: public:
%If (- TQt_3_0_0)
TQHideEvent(bool);
bool spontaneous() const;
%End
%If (TQt_3_0_0 -)
TQHideEvent(); TQHideEvent();
%End
}; };
%If (TQt_3_0_0 -)
class TQContextMenuEvent : TQEvent class TQContextMenuEvent : TQEvent
{ {
%TypeHeaderCode %TypeHeaderCode
@ -952,10 +660,6 @@ public:
Reason reason() const; Reason reason() const;
}; };
%End
%If (TQt_3_0_0 -)
class TQIMEvent : TQEvent class TQIMEvent : TQEvent
{ {
@ -971,15 +675,9 @@ public:
bool isAccepted() const; bool isAccepted() const;
void accept(); void accept();
void ignore(); void ignore();
%If (TQt_3_1_0 -)
int selectionLength() const; int selectionLength() const;
%End
}; };
%End
%If (TQt_3_1_0 -)
class TQIMComposeEvent : TQIMEvent class TQIMComposeEvent : TQIMEvent
{ {
@ -991,31 +689,7 @@ public:
TQIMComposeEvent(Type,const TQString &,int,int); TQIMComposeEvent(Type,const TQString &,int,int);
}; };
%End
%If (- TQt_2_00)
class TQDropEvent : TQEvent
{
%TypeHeaderCode
#include <tqevent.h>
%End
public:
TQDropEvent(const TQPoint &);
const TQPoint &pos() const;
bool isAccepted() const;
void accept();
void ignore();
TQByteArray data(const char *);
};
%End
%If (TQt_2_00 -)
%If (TQt_DRAGANDDROP) %If (TQt_DRAGANDDROP)
class TQDropEvent : TQEvent, TQMimeSource class TQDropEvent : TQEvent, TQMimeSource
@ -1053,41 +727,10 @@ public:
void setPoint(const TQPoint &); void setPoint(const TQPoint &);
}; };
%End
%End
%If (- TQt_2_00)
class TQDragMoveEvent : TQEvent
{
%TypeHeaderCode
#include <tqevent.h>
%End
public:
TQDragMoveEvent(const TQPoint &);
const TQPoint &pos() const;
bool isAccepted() const;
void accept();
void ignore();
void accept(const TQRect &);
void ignore(const TQRect &);
TQRect answerRect() const;
const char *format(int = 0);
bool provides(const char *);
TQByteArray data(const char *);
protected:
TQDragMoveEvent(const TQPoint &,int);
};
%End %End
%If (TQt_DRAGANDDROP) %If (TQt_DRAGANDDROP)
%If (TQt_2_00 -)
class TQDragMoveEvent : TQDropEvent class TQDragMoveEvent : TQDropEvent
{ {
@ -1105,8 +748,6 @@ public:
void ignore(); void ignore();
}; };
%End
class TQDragEnterEvent : TQDragMoveEvent class TQDragEnterEvent : TQDragMoveEvent
{ {
@ -1139,19 +780,9 @@ class TQChildEvent : TQEvent
%End %End
public: public:
%If (- TQt_2_00)
TQChildEvent(int,TQWidget *);
%End
%If (TQt_2_00 -)
TQChildEvent(Type,TQObject *); TQChildEvent(Type,TQObject *);
%End
%If (- TQt_2_00)
TQWidget *child() const;
%End
%If (TQt_2_00 -)
TQObject *child() const; TQObject *child() const;
%End
bool inserted() const; bool inserted() const;
bool removed() const; bool removed() const;
}; };
@ -1164,15 +795,8 @@ class TQCustomEvent : TQEvent
%End %End
public: public:
%If (- TQt_2_00)
TQCustomEvent(int,SIP_PYOBJECT /Transfer/);
%End
%If (TQt_2_00 -)
TQCustomEvent(Type,SIP_PYOBJECT /Transfer/); TQCustomEvent(Type,SIP_PYOBJECT /Transfer/);
%End
%If (TQt_2_1_0 -)
TQCustomEvent(int); TQCustomEvent(int);
%End
~TQCustomEvent(); ~TQCustomEvent();
%VirtualCatcherCode %VirtualCatcherCode
// We need to garbage collect any current data. // We need to garbage collect any current data.
@ -1197,7 +821,6 @@ public:
Py_INCREF(sipRes); Py_INCREF(sipRes);
%End %End
%If (TQt_2_1_0 -)
void setData(SIP_PYOBJECT /Transfer/); void setData(SIP_PYOBJECT /Transfer/);
%MethodCode %MethodCode
// We need to garbage collect any current data. // We need to garbage collect any current data.
@ -1207,7 +830,6 @@ public:
Py_XDECREF(old); Py_XDECREF(old);
%End %End
%End
%GCTraverseCode %GCTraverseCode
// Support the Python garbage collector. Although it's not obviously // Support the Python garbage collector. Although it's not obviously

@ -33,8 +33,6 @@ This has been renamed to <Literal>exec_loop</Literal> in Python.
%End %End
%If (TQt_3_1_0 -)
class TQEventLoop : TQObject class TQEventLoop : TQObject
{ {
%TypeHeaderCode %TypeHeaderCode
@ -60,7 +58,6 @@ public:
virtual void registerSocketNotifier(TQSocketNotifier *); virtual void registerSocketNotifier(TQSocketNotifier *);
virtual void unregisterSocketNotifier(TQSocketNotifier *); virtual void unregisterSocketNotifier(TQSocketNotifier *);
%If (TQt_3_1_1 -)
// These were present in the X11 version of TQt v3.1.0 but didn't make // These were present in the X11 version of TQt v3.1.0 but didn't make
// it to the Windows version until TQt v3.1.1. // it to the Windows version until TQt v3.1.1.
void setSocketNotifierPending(TQSocketNotifier *); void setSocketNotifierPending(TQSocketNotifier *);
@ -68,7 +65,6 @@ public:
int activateTimers(); int activateTimers();
int timeToWait() const; int timeToWait() const;
%End
virtual int exec() /PyName=exec_loop, ReleaseGIL, virtual int exec() /PyName=exec_loop, ReleaseGIL,
PreHook=__pyTQtPreEventLoopHook__, PreHook=__pyTQtPreEventLoopHook__,
@ -85,5 +81,3 @@ signals:
void awake(); void awake();
void aboutToBlock(); void aboutToBlock();
}; };
%End

@ -90,44 +90,21 @@ class TQFile : TQIODevice
public: public:
TQFile(); TQFile();
%If (- TQt_2_00)
TQFile(const char *);
%End
%If (TQt_2_00 -)
TQFile(const TQString &); TQFile(const TQString &);
%End
%If (- TQt_2_00)
const char *name() const;
void setName(const char *);
%End
%If (TQt_2_00 -)
TQString name() const; TQString name() const;
void setName(const TQString &); void setName(const TQString &);
%End
%If (TQt_2_00 -)
static TQCString encodeName(const TQString &); static TQCString encodeName(const TQString &);
static TQString decodeName(const TQCString &); static TQString decodeName(const TQCString &);
// static void setEncodingFunction(EncoderFn); // static void setEncodingFunction(EncoderFn);
// static void setDecodingFunction(DecoderFn); // static void setDecodingFunction(DecoderFn);
%End
bool exists() const; bool exists() const;
%If (- TQt_2_00)
static bool exists(const char *);
%End
%If (TQt_2_00 -)
static bool exists(const TQString &); static bool exists(const TQString &);
%End
bool remove(); bool remove();
%If (- TQt_2_00)
static bool remove(const char *);
%End
%If (TQt_2_00 -)
static bool remove(const TQString &); static bool remove(const TQString &);
%End
bool open(int) /ReleaseGIL/; bool open(int) /ReleaseGIL/;
// bool open(int,FILE *) /ReleaseGIL/; // bool open(int,FILE *) /ReleaseGIL/;
@ -135,48 +112,11 @@ public:
void close(); void close();
void flush() /ReleaseGIL/; void flush() /ReleaseGIL/;
%If (- TQt_3_0_0)
uint size() const;
int at() const;
bool at(int);
%End
%If (TQt_3_0_0 -)
Offset size() const; Offset size() const;
Offset at() const; Offset at() const;
bool at(Offset); bool at(Offset);
%End
bool atEnd() const; bool atEnd() const;
%If (- TQt_3_0_0)
SIP_PYOBJECT readBlock(uint) /ReleaseGIL/ [int (char *,uint)];
%MethodCode
char *buf;
if ((buf = (char *)sipMalloc(a0)) == NULL)
sipIsErr = 1;
else
{
int actlen;
Py_BEGIN_ALLOW_THREADS
actlen = sipSelfWasArg ? sipCpp->TQFile::readBlock(buf,a0) : sipCpp->readBlock(buf,a0);
Py_END_ALLOW_THREADS
if (actlen < 0)
{
Py_INCREF(Py_None);
sipRes = Py_None;
}
else if ((sipRes = PyString_FromStringAndSize(buf,actlen)) == NULL)
sipIsErr = 1;
sipFree((void *)buf);
}
%End
int writeBlock(const char * /Array/,uint /ArraySize/) /ReleaseGIL/;
%End
%If (TQt_3_0_0 -)
SIP_PYOBJECT readBlock(TQ_ULONG) /ReleaseGIL/ [TQ_LONG (char *,TQ_ULONG)]; SIP_PYOBJECT readBlock(TQ_ULONG) /ReleaseGIL/ [TQ_LONG (char *,TQ_ULONG)];
%MethodCode %MethodCode
char *buf; char *buf;
@ -196,7 +136,7 @@ public:
Py_INCREF(Py_None); Py_INCREF(Py_None);
sipRes = Py_None; sipRes = Py_None;
} }
else if ((sipRes = PyString_FromStringAndSize(buf,actlen)) == NULL) else if ((sipRes = SIPBytes_FromStringAndSize(buf,actlen)) == NULL)
sipIsErr = 1; sipIsErr = 1;
sipFree((void *)buf); sipFree((void *)buf);
@ -206,49 +146,8 @@ public:
TQ_LONG writeBlock(const char * /Array/, TQ_LONG writeBlock(const char * /Array/,
TQ_ULONG /ArraySize/) /ReleaseGIL/; TQ_ULONG /ArraySize/) /ReleaseGIL/;
%End
%If (TQt_2_00 - TQt_3_0_0)
int writeBlock(const TQByteArray &) /ReleaseGIL/;
%End
%If (TQt_3_0_0 -)
TQ_LONG writeBlock(const TQByteArray &) /ReleaseGIL/; TQ_LONG writeBlock(const TQByteArray &) /ReleaseGIL/;
%End
%If (- TQt_3_0_0)
SIP_PYOBJECT readLine(uint) /ReleaseGIL/ [int (char *,uint)];
%MethodCode
char *buf;
if ((buf = (char *)sipMalloc(a0)) == NULL)
sipIsErr = 1;
else
{
int actlen;
Py_BEGIN_ALLOW_THREADS
actlen = sipSelfWasArg ? sipCpp->TQFile::readLine(buf,a0) : sipCpp->readLine(buf,a0);
Py_END_ALLOW_THREADS
if (actlen < 0)
{
sipFree((void *)buf);
Py_INCREF(Py_None);
sipRes = Py_None;
}
else
{
sipRes = PyString_FromStringAndSize(buf,actlen);
sipFree((void *)buf);
if (sipRes == NULL)
sipIsErr = 1;
}
}
%End
%End
%If (TQt_3_0_0 -)
SIP_PYOBJECT readLine(TQ_ULONG) /ReleaseGIL/ [TQ_LONG (char *,TQ_ULONG)]; SIP_PYOBJECT readLine(TQ_ULONG) /ReleaseGIL/ [TQ_LONG (char *,TQ_ULONG)];
%MethodCode %MethodCode
char *buf; char *buf;
@ -272,7 +171,7 @@ public:
} }
else else
{ {
sipRes = PyString_FromStringAndSize(buf,actlen); sipRes = SIPBytes_FromStringAndSize(buf,actlen);
sipFree((void *)buf); sipFree((void *)buf);
@ -281,14 +180,8 @@ public:
} }
} }
%End %End
%End
%If (TQt_2_00 - TQt_3_0_0)
int readLine(TQString &,uint) /ReleaseGIL/;
%End
%If (TQt_3_0_0 -)
TQ_LONG readLine(TQString &,TQ_ULONG) /ReleaseGIL/; TQ_LONG readLine(TQString &,TQ_ULONG) /ReleaseGIL/;
%End
int getch(); int getch();
int putch(int); int putch(int);
@ -296,14 +189,10 @@ public:
int handle() const; int handle() const;
%If (TQt_3_2_0 -)
TQString errorString() const; TQString errorString() const;
%End
protected: protected:
%If (TQt_3_2_0 -)
void setErrorString(const TQString &); void setErrorString(const TQString &);
%End
private: private:
TQFile(const TQFile &); TQFile(const TQFile &);

@ -74,13 +74,10 @@ public:
virtual const TQPixmap *pixmap(const TQFileInfo &); virtual const TQPixmap *pixmap(const TQFileInfo &);
private: private:
%If (TQt_2_1_0 -)
TQFileIconProvider(const TQFileIconProvider &); TQFileIconProvider(const TQFileIconProvider &);
%End
}; };
%If (TQt_2_1_0 -)
class TQFilePreview class TQFilePreview
{ {
%TypeHeaderCode %TypeHeaderCode
@ -92,7 +89,6 @@ public:
virtual void previewUrl(const TQUrl &) = 0; virtual void previewUrl(const TQUrl &) = 0;
}; };
%End
class TQFileDialog : TQDialog class TQFileDialog : TQDialog
@ -102,66 +98,10 @@ class TQFileDialog : TQDialog
%End %End
public: public:
%If (- TQt_2_00)
TQFileDialog(const char *,const char * = 0,TQWidget * /TransferThis/ = 0,
const char * = 0,bool = 0);
%End
%If (TQt_2_00 -)
TQFileDialog(const TQString &,const TQString & = TQString::null, TQFileDialog(const TQString &,const TQString & = TQString::null,
TQWidget * /TransferThis/ = 0,const char * = 0,bool = 0); TQWidget * /TransferThis/ = 0,const char * = 0,bool = 0);
%End
TQFileDialog(TQWidget * /TransferThis/ = 0,const char * = 0,bool = 0); TQFileDialog(TQWidget * /TransferThis/ = 0,const char * = 0,bool = 0);
%If (- TQt_2_00)
static TQString getOpenFileName(const char * = 0,const char * = 0,
TQWidget * = 0,
const char * = 0) /ReleaseGIL/;
static TQString getSaveFileName(const char * = 0,const char * = 0,
TQWidget * = 0,
const char * = 0) /ReleaseGIL/;
static TQString getExistingDirectory(const char * = 0,TQWidget * = 0,
const char * = 0) /ReleaseGIL/;
static TQStrList getOpenFileNames(const char * = 0,const char * = 0,
TQWidget * = 0,
const char * = 0) /ReleaseGIL/;
%End
%If (TQt_2_00 - TQt_3_0_0)
static TQString getOpenFileName(const TQString & = TQString::null,
const TQString & = TQString::null,
TQWidget * = 0,
const char * = 0) /ReleaseGIL/;
static TQString getSaveFileName(const TQString & = TQString::null,
const TQString & = TQString::null,
TQWidget * = 0,
const char * = 0) /ReleaseGIL/;
static TQString getExistingDirectory(const TQString & = TQString::null,
TQWidget * = 0,
const char * = 0) /ReleaseGIL/;
static TQStringList getOpenFileNames(const TQString & = TQString::null,
const TQString & = TQString::null,
TQWidget * = 0,
const char * = 0) /ReleaseGIL/;
%End
%If (TQt_2_1_0 - TQt_3_0_0)
static TQString getOpenFileName(const TQString &,const TQString &,
TQWidget *,const char *,
const TQString &) /ReleaseGIL/;
static TQString getSaveFileName(const TQString &,const TQString &,
TQWidget *,const char *,
const TQString &) /ReleaseGIL/;
static TQString getExistingDirectory(const TQString &,TQWidget *,
const char *,
const TQString &) /ReleaseGIL/;
static TQStringList getOpenFileNames(const TQString &,const TQString &,
TQWidget *,const char *,
const TQString &) /ReleaseGIL/;
%End
%If (TQt_2_2_0 - TQt_3_0_0)
static TQString getExistingDirectory(const TQString &,TQWidget *,
const char *,
const TQString &,bool) /ReleaseGIL/;
%End
%If (TQt_3_0_0 -)
static TQString getOpenFileName(const TQString & = TQString::null, static TQString getOpenFileName(const TQString & = TQString::null,
const TQString & = TQString::null, const TQString & = TQString::null,
TQWidget * = 0,const char * = 0, TQWidget * = 0,const char * = 0,
@ -186,62 +126,31 @@ public:
TQString * = 0, TQString * = 0,
bool = 1) /ReleaseGIL/; bool = 1) /ReleaseGIL/;
%End
static void setIconProvider(TQFileIconProvider *); static void setIconProvider(TQFileIconProvider *);
static TQFileIconProvider *iconProvider(); static TQFileIconProvider *iconProvider();
TQString selectedFile() const; TQString selectedFile() const;
%If (TQt_2_1_0 -)
TQString selectedFilter() const; TQString selectedFilter() const;
%End
%If (TQt_3_0_0 -)
virtual void setSelectedFilter(const TQString &); virtual void setSelectedFilter(const TQString &);
virtual void setSelectedFilter(int); virtual void setSelectedFilter(int);
%End
%If (- TQt_2_00)
void setSelection(const char *);
%End
%If (TQt_2_00 -)
void setSelection(const TQString &); void setSelection(const TQString &);
%End
%If (TQt_2_1_0 -)
void selectAll(bool); void selectAll(bool);
TQStringList selectedFiles() const; TQStringList selectedFiles() const;
%End
%If (- TQt_2_00)
const char *dirPath() const;
%End
%If (TQt_2_00 -)
TQString dirPath() const; TQString dirPath() const;
%End
void setDir(const TQDir &); void setDir(const TQDir &);
const TQDir* dir() const; const TQDir* dir() const;
%If (TQt_2_1_0 -)
void setShowHiddenFiles(bool); void setShowHiddenFiles(bool);
bool showHiddenFiles() const; bool showHiddenFiles() const;
%End
void rereadDir() /ReleaseGIL/; void rereadDir() /ReleaseGIL/;
%If (TQt_2_1_0 -)
void resortDir(); void resortDir();
%End
%If (- TQt_2_2_0)
enum Mode {
AnyFile,
ExistingFile,
Directory,
ExistingFiles
};
%End
%If (TQt_2_2_0 -)
enum Mode { enum Mode {
AnyFile, AnyFile,
ExistingFile, ExistingFile,
@ -249,12 +158,10 @@ public:
ExistingFiles, ExistingFiles,
DirectoryOnly DirectoryOnly
}; };
%End
void setMode(Mode); void setMode(Mode);
Mode mode() const; Mode mode() const;
%If (TQt_2_1_0 -)
enum ViewMode { enum ViewMode {
Detail, Detail,
List List
@ -270,11 +177,9 @@ public:
ViewMode viewMode() const; ViewMode viewMode() const;
void setPreviewMode(PreviewMode); void setPreviewMode(PreviewMode);
PreviewMode previewMode() const; PreviewMode previewMode() const;
%End
bool eventFilter(TQObject *,TQEvent *); bool eventFilter(TQObject *,TQEvent *);
%If (TQt_2_1_0 -)
bool isInfoPreviewEnabled() const; bool isInfoPreviewEnabled() const;
bool isContentsPreviewEnabled() const; bool isContentsPreviewEnabled() const;
void setInfoPreviewEnabled(bool); void setInfoPreviewEnabled(bool);
@ -284,75 +189,33 @@ public:
void setContentsPreview(TQWidget *,TQFilePreview *); void setContentsPreview(TQWidget *,TQFilePreview *);
TQUrl url() const; TQUrl url() const;
%End
%If (TQt_3_0_0 -)
void addFilter(const TQString &); void addFilter(const TQString &);
%End
public slots: public slots:
%If (TQt_2_2_0 -)
void done(int); void done(int);
%End
%If (- TQt_2_00)
void setDir(const char *);
%End
%If (TQt_2_00 -)
void setDir(const TQString &); void setDir(const TQString &);
%End
%If (TQt_2_1_0 -)
void setUrl(const TQUrlOperator &); void setUrl(const TQUrlOperator &);
%End
%If (- TQt_2_00)
void setFilter(const char *);
%End
%If (TQt_2_00 -)
void setFilter(const TQString &); void setFilter(const TQString &);
%End
%If (TQt_2_1_0 -)
void setFilters(const TQString &); void setFilters(const TQString &);
%End
// void setFilters(const char **); // void setFilters(const char **);
%If (- TQt_2_00)
void setFilters(const TQStrList &);
%End
%If (TQt_2_00 -)
void setFilters(const TQStringList &); void setFilters(const TQStringList &);
%End
signals: signals:
%If (- TQt_2_00)
void fileHighlighted(const char *);
void fileSelected(const char *);
void dirEntered(const char *);
%End
%If (TQt_2_00 -)
void fileHighlighted(const TQString &); void fileHighlighted(const TQString &);
void fileSelected(const TQString &); void fileSelected(const TQString &);
%End
%If (TQt_3_0_0 -)
void filesSelected(const TQStringList &); void filesSelected(const TQStringList &);
%End
%If (TQt_2_00 -)
void dirEntered(const TQString &); void dirEntered(const TQString &);
%End
%If (TQt_3_0_0 -)
void filterSelected(const TQString &); void filterSelected(const TQString &);
%End
protected: protected:
void resizeEvent(TQResizeEvent *); void resizeEvent(TQResizeEvent *);
void keyPressEvent(TQKeyEvent *); void keyPressEvent(TQKeyEvent *);
void addWidgets(TQLabel *,TQWidget *,TQPushButton *); void addWidgets(TQLabel *,TQWidget *,TQPushButton *);
%If (TQt_2_1_0 -)
void addToolButton(TQButton *,bool = 0); void addToolButton(TQButton *,bool = 0);
void addLeftWidget(TQWidget *); void addLeftWidget(TQWidget *);
void addRightWidget(TQWidget *); void addRightWidget(TQWidget *);
%End
%If (TQt_2_1_0 - TQt_3_0_0)
void addFilter(const TQString &);
%End
private: private:
TQFileDialog(const TQFileDialog &); TQFileDialog(const TQFileDialog &);

@ -37,77 +37,38 @@ class TQFileInfo
public: public:
enum PermissionSpec { enum PermissionSpec {
%If (TQt_3_2_0 -)
ReadOwner, WriteOwner, ExeOwner, ReadOwner, WriteOwner, ExeOwner,
%End
ReadUser, WriteUser, ExeUser, ReadUser, WriteUser, ExeUser,
ReadGroup, WriteGroup, ExeGroup, ReadGroup, WriteGroup, ExeGroup,
ReadOther, WriteOther, ExeOther ReadOther, WriteOther, ExeOther
}; };
TQFileInfo(); TQFileInfo();
%If (- TQt_2_00)
TQFileInfo(const char *);
%End
%If (TQt_2_00 -)
TQFileInfo(const TQString &); TQFileInfo(const TQString &);
%End
TQFileInfo(const TQFile &); TQFileInfo(const TQFile &);
%If (- TQt_2_00)
TQFileInfo(const TQDir &,const char *);
%End
%If (TQt_2_00 -)
TQFileInfo(const TQDir &,const TQString &); TQFileInfo(const TQDir &,const TQString &);
%End
TQFileInfo(const TQFileInfo &); TQFileInfo(const TQFileInfo &);
%If (- TQt_2_00)
void setFile(const char *);
%End
%If (TQt_2_00 -)
void setFile(const TQString &); void setFile(const TQString &);
%End
void setFile(const TQFile &); void setFile(const TQFile &);
%If (- TQt_2_00)
void setFile(const TQDir &,const char *);
%End
%If (TQt_2_00 -)
void setFile(const TQDir &,const TQString &); void setFile(const TQDir &,const TQString &);
%End
bool exists() const; bool exists() const;
void refresh() const; void refresh() const;
bool caching() const; bool caching() const;
void setCaching(bool); void setCaching(bool);
%If (- TQt_2_00)
const char *filePath() const;
%End
%If (TQt_2_00 -)
const TQString filePath() const; const TQString filePath() const;
%End
TQString fileName() const; TQString fileName() const;
TQString absFilePath() const; TQString absFilePath() const;
%If (- TQt_3_0_0)
TQString baseName() const;
%End
%If (TQt_3_0_0 -)
TQString baseName(bool = 1) const; TQString baseName(bool = 1) const;
%End
%If (- TQt_2_00)
TQString extension() const;
%End
%If (TQt_2_00 -)
TQString extension(bool = 1) const; TQString extension(bool = 1) const;
%End
TQString dirPath(bool = 0) const; TQString dirPath(bool = 0) const;
TQDir dir(bool = 0) const; TQDir dir(bool = 0) const;
bool isReadable() const; bool isReadable() const;
bool isWritable() const; bool isWritable() const;
bool isExecutable() const; bool isExecutable() const;
%If (TQt_3_1_0 -)
bool isHidden() const; bool isHidden() const;
%End
bool isRelative() const; bool isRelative() const;
bool convertToAbs(); bool convertToAbs();
@ -118,28 +79,16 @@ public:
TQString readLink() const /ReleaseGIL/; TQString readLink() const /ReleaseGIL/;
%If (- TQt_2_00)
const char *owner() const;
%End
%If (TQt_2_00 -)
TQString owner() const; TQString owner() const;
%End
uint ownerId() const; uint ownerId() const;
%If (- TQt_2_00)
const char *group() const;
%End
%If (TQt_2_00 -)
TQString group() const; TQString group() const;
%End
uint groupId() const; uint groupId() const;
bool permission(int) const; bool permission(int) const;
uint size() const; uint size() const;
%If (TQt_3_0_0 -)
TQDateTime created() const; TQDateTime created() const;
%End
TQDateTime lastModified() const; TQDateTime lastModified() const;
TQDateTime lastRead() const; TQDateTime lastRead() const;
}; };

@ -37,109 +37,6 @@ class TQFont
%End %End
public: public:
%If (- TQt_2_00)
enum CharSet {
Latin1, ISO_8859_1 = Latin1, AnyCharSet,
Latin2, ISO_8859_2 = Latin2,
Latin3, ISO_8859_3 = Latin3,
Latin4, ISO_8859_4 = Latin4,
Latin5, ISO_8859_5 = Latin5,
Latin6, ISO_8859_6 = Latin6,
Latin7, ISO_8859_7 = Latin7,
Latin8, ISO_8859_8 = Latin8,
Latin9, ISO_8859_9 = Latin9,
KOI8R
};
%End
%If (TQt_2_00 - TQt_2_1_0)
enum CharSet {
ISO_8859_1, Latin1 = ISO_8859_1, AnyCharSet,
ISO_8859_2, Latin2 = ISO_8859_2,
ISO_8859_3, Latin3 = ISO_8859_3,
ISO_8859_4, Latin4 = ISO_8859_4,
ISO_8859_5,
ISO_8859_6,
ISO_8859_7,
ISO_8859_8,
ISO_8859_9, Latin5 = ISO_8859_9,
ISO_8859_10, Latin6 = ISO_8859_10,
ISO_8859_11,
ISO_8859_12,
ISO_8859_13, Latin7 = ISO_8859_13,
ISO_8859_14, Latin8 = ISO_8859_14,
ISO_8859_15, Latin9 = ISO_8859_15,
KOI8R,
Set_Ja, Set_1 = Set_Ja,
Set_Ko,
Set_Th_TH,
Set_Zh,
Set_Zh_TW, Set_N = Set_Zh_TW,
Unicode
};
%End
%If (TQt_2_1_0 - TQt_2_2_0)
enum CharSet {
ISO_8859_1, Latin1 = ISO_8859_1, AnyCharSet,
ISO_8859_2, Latin2 = ISO_8859_2,
ISO_8859_3, Latin3 = ISO_8859_3,
ISO_8859_4, Latin4 = ISO_8859_4,
ISO_8859_5,
ISO_8859_6,
ISO_8859_7,
ISO_8859_8,
ISO_8859_9, Latin5 = ISO_8859_9,
ISO_8859_10, Latin6 = ISO_8859_10,
ISO_8859_11,
ISO_8859_12,
ISO_8859_13, Latin7 = ISO_8859_13,
ISO_8859_14, Latin8 = ISO_8859_14,
ISO_8859_15, Latin9 = ISO_8859_15,
KOI8R,
Set_Ja, Set_1 = Set_Ja,
Set_Ko,
Set_Th_TH,
Set_Zh,
Set_Zh_TW, Set_N = Set_Zh_TW,
Unicode,
Set_GBK,
Set_Big5
};
%End
%If (TQt_2_2_0 - TQt_3_0_0)
enum CharSet {
ISO_8859_1, Latin1 = ISO_8859_1, AnyCharSet,
ISO_8859_2, Latin2 = ISO_8859_2,
ISO_8859_3, Latin3 = ISO_8859_3,
ISO_8859_4, Latin4 = ISO_8859_4,
ISO_8859_5,
ISO_8859_6,
ISO_8859_7,
ISO_8859_8,
ISO_8859_9, Latin5 = ISO_8859_9,
ISO_8859_10, Latin6 = ISO_8859_10,
ISO_8859_11,
ISO_8859_12,
ISO_8859_13, Latin7 = ISO_8859_13,
ISO_8859_14, Latin8 = ISO_8859_14,
ISO_8859_15, Latin9 = ISO_8859_15,
KOI8R,
Set_Ja, Set_1 = Set_Ja,
Set_Ko,
Set_Th_TH,
Set_Zh,
Set_Zh_TW, Set_N = Set_Zh_TW,
Unicode,
Set_GBK,
Set_Big5,
JIS_X_0201 = 0xa0,
JIS_X_0208 = 0xc0, Enc16 = JIS_X_0208,
KSC_5601,
GB_2312,
Big5,
TSCII
};
%End
enum StyleHint { enum StyleHint {
Helvetica, Helvetica,
Times, Times,
@ -153,7 +50,6 @@ public:
Decorative Decorative
}; };
%If (TQt_2_2_0 -)
enum StyleStrategy { enum StyleStrategy {
PreferDefault, PreferDefault,
PreferBitmap, PreferBitmap,
@ -162,15 +58,10 @@ public:
ForceOutline, ForceOutline,
PreferMatch, PreferMatch,
PreferQuality, PreferQuality,
%If (TQt_3_0_0 -)
PreferAntialias, PreferAntialias,
NoAntialias, NoAntialias,
%End
%If (TQt_3_2_0 -)
OpenGLCompatible, OpenGLCompatible,
%End
}; };
%End
enum Weight { enum Weight {
Light, Light,
@ -180,7 +71,6 @@ public:
Black Black
}; };
%If (TQt_3_2_0 -)
enum Stretch { enum Stretch {
UltraCondensed, UltraCondensed,
ExtraCondensed, ExtraCondensed,
@ -192,29 +82,11 @@ public:
ExtraExpanded, ExtraExpanded,
UltraExpanded UltraExpanded
}; };
%End
TQFont(); TQFont();
%If (- TQt_2_00)
TQFont(const char *,int = 12,int = Normal,bool = 0);
TQFont(const char *,int,int,bool,CharSet);
%End
%If (TQt_2_00 - TQt_3_2_0)
TQFont(const TQString &,int = 12,int = Normal,bool = 0);
%End
%If (TQt_3_2_0 -)
TQFont(const TQString &,int = 12,int = -1,bool = 0); TQFont(const TQString &,int = 12,int = -1,bool = 0);
%End
%If (TQt_2_00 - TQt_3_0_0)
TQFont(const TQString &,int,int,bool,CharSet);
%End
TQFont(const TQFont &); TQFont(const TQFont &);
%If (- TQt_2_00)
const char *family() const;
void setFamily(const char *);
%End
%If (TQt_2_00 -)
TQString family() const; TQString family() const;
void setFamily(const TQString &); void setFamily(const TQString &);
@ -224,7 +96,6 @@ public:
int pixelSize() const; int pixelSize() const;
void setPixelSize(int); void setPixelSize(int);
void setPixelSizeFloat(float); void setPixelSizeFloat(float);
%End
int pointSize() const; int pointSize() const;
void setPointSize(int); void setPointSize(int);
@ -240,10 +111,8 @@ public:
bool underline() const; bool underline() const;
void setUnderline(bool); void setUnderline(bool);
%If (TQt_3_2_0 -)
bool overline() const; bool overline() const;
void setOverline(bool); void setOverline(bool);
%End
bool strikeOut() const; bool strikeOut() const;
void setStrikeOut(bool); void setStrikeOut(bool);
@ -252,29 +121,12 @@ public:
void setFixedPitch(bool); void setFixedPitch(bool);
StyleHint styleHint() const; StyleHint styleHint() const;
%If (TQt_2_2_0 -)
StyleStrategy styleStrategy() const; StyleStrategy styleStrategy() const;
%End
%If (- TQt_3_0_0)
void setStyleHint(StyleHint);
%End
%If (TQt_2_2_0 - TQt_3_0_0)
void setStyleHint(StyleHint,StyleStrategy);
%End
%If (TQt_3_0_0 -)
void setStyleHint(StyleHint,StyleStrategy = PreferDefault); void setStyleHint(StyleHint,StyleStrategy = PreferDefault);
void setStyleStrategy(StyleStrategy); void setStyleStrategy(StyleStrategy);
%End
%If (- TQt_3_0_0)
CharSet charSet() const;
void setCharSet(CharSet);
%End
%If (TQt_3_2_0 -)
int stretch() const; int stretch() const;
void setStretch(int); void setStretch(int);
%End
bool rawMode() const; bool rawMode() const;
void setRawMode(bool); void setRawMode(bool);
@ -286,63 +138,25 @@ public:
bool isCopyOf(const TQFont &) const; bool isCopyOf(const TQFont &) const;
%If (- TQt_2_00)
HANDLE handle(HANDLE = 0);
const char *rawName() const;
static const TQFont &defaultFont();
static const char *substitute(const char *);
static void insertSubstitution(const char *,const char *);
static void removeSubstitution(const char *);
static void listSubstitutions(TQStrList *);
%End
%If (TQt_2_00 - TQt_3_0_0)
static CharSet charSetForLocale();
%End
%If (TQt_2_00 -)
%If (- TQt_3_0_0)
%If (WS_X11)
HANDLE handle() const;
%End
%End
%If (TQt_3_0_0 -)
%If (WS_X11) %If (WS_X11)
TQt::HANDLE handle() const; TQt::HANDLE handle() const;
%End
%End %End
void setRawName(const TQString &); void setRawName(const TQString &);
TQString rawName() const; TQString rawName() const;
%End
TQString key() const; TQString key() const;
%If (TQt_3_0_0 -)
TQString toString() const; TQString toString() const;
bool fromString(const TQString &); bool fromString(const TQString &);
%End
%If (TQt_2_00 - TQt_3_0_0)
static TQString encodingName(CharSet);
%End
%If (TQt_2_00 -)
static TQString substitute(const TQString &); static TQString substitute(const TQString &);
%If (TQt_3_0_0 -)
static TQStringList substitutes(const TQString &); static TQStringList substitutes(const TQString &);
%End
static TQStringList substitutions(); static TQStringList substitutions();
static void insertSubstitution(const TQString &,const TQString &); static void insertSubstitution(const TQString &,const TQString &);
%If (TQt_3_0_0 -)
static void insertSubstitutions(const TQString &,const TQStringList &); static void insertSubstitutions(const TQString &,const TQStringList &);
%End
static void removeSubstitution(const TQString &); static void removeSubstitution(const TQString &);
%If (- TQt_3_0_0)
static void locale_init();
%End
%End
static void initialize(); static void initialize();
static void cleanup(); static void cleanup();
static void cacheStatistics(); static void cacheStatistics();
%If (TQt_3_0_0 -)
enum Script { enum Script {
Latin, Latin,
Greek, Greek,
@ -399,43 +213,24 @@ public:
Unicode, Unicode,
%If (TQt_3_2_0 -)
Tagalog, Tagalog,
Hanunoo, Hanunoo,
Buhid, Buhid,
Tagbanwa, Tagbanwa,
KatakanaHalfWidth, KatakanaHalfWidth,
%End
%If (TQt_3_3_0 -)
Limbu, Limbu,
TaiLe, TaiLe,
%End
}; };
TQString defaultFamily() const; TQString defaultFamily() const;
TQString lastResortFamily() const; TQString lastResortFamily() const;
TQString lastResortFont() const; TQString lastResortFont() const;
%End
%If (TQt_2_00 - TQt_3_0_0)
static TQFont defaultFont();
%End
%If (- TQt_3_0_0)
static void setDefaultFont(const TQFont &);
%End
%If (TQt_3_2_0 -)
TQFont resolve(const TQFont &) const; TQFont resolve(const TQFont &) const;
%End
protected: protected:
bool dirty() const; bool dirty() const;
%If (- TQt_3_0_0)
TQString defaultFamily() const;
TQString lastResortFamily() const;
TQString lastResortFont() const;
%End
int deciPointSize() const; int deciPointSize() const;
}; };

@ -30,7 +30,6 @@
%If (TQt_FONTDATABASE) %If (TQt_FONTDATABASE)
%If (TQt_2_1_0 -)
class TQFontDatabase class TQFontDatabase
{ {
@ -43,42 +42,14 @@ public:
static TQValueList<int> standardSizes(); static TQValueList<int> standardSizes();
%If (- TQt_3_0_0)
TQStringList charSets(const TQString &,bool = 1 ) const;
TQStringList families(bool = 1) const;
TQStringList styles(const TQString &,
const TQString & = TQString::null) const;
TQValueList<int> pointSizes(const TQString &,
const TQString & = TQString::null,
const TQString & = TQString::null);
TQValueList<int> smoothSizes(const TQString &,const TQString &,
const TQString & = TQString::null);
%End
%If (TQt_3_0_0 -)
TQStringList families() const; TQStringList families() const;
%If (TQt_3_2_0 -)
TQStringList families(TQFont::Script) const; TQStringList families(TQFont::Script) const;
%End
TQStringList styles(const TQString &) const; TQStringList styles(const TQString &) const;
TQValueList<int> pointSizes(const TQString &, TQValueList<int> pointSizes(const TQString &,
const TQString & = TQString::null); const TQString & = TQString::null);
TQValueList<int> smoothSizes(const TQString &,const TQString &); TQValueList<int> smoothSizes(const TQString &,const TQString &);
%End
TQString styleString(const TQFont &); TQString styleString(const TQFont &);
%If (- TQt_3_0_0)
TQFont font(const TQString,const TQString &,int,
const TQString = TQString::null);
bool isBitmapScalable(const TQString &,const TQString & = TQString::null,
const TQString & = TQString::null) const;
bool isSmoothlyScalable(const TQString &,
const TQString & = TQString::null,
const TQString & = TQString::null) const;
bool isScalable(const TQString &,const TQString & = TQString::null,
const TQString & = TQString::null) const;
%End
%If (TQt_3_0_0 -)
TQFont font(const TQString,const TQString &,int); TQFont font(const TQString,const TQString &,int);
bool isBitmapScalable(const TQString &, bool isBitmapScalable(const TQString &,
@ -86,36 +57,15 @@ public:
bool isSmoothlyScalable(const TQString &, bool isSmoothlyScalable(const TQString &,
const TQString & = TQString::null) const; const TQString & = TQString::null) const;
bool isScalable(const TQString &,const TQString & = TQString::null) const; bool isScalable(const TQString &,const TQString & = TQString::null) const;
%End
%If (TQt_2_3_0 - TQt_3_0_0)
bool isFixedPitch(const TQString &,const TQString & = TQString::null,
const TQString & = TQString::null) const;
%End
%If (TQt_3_0_0 -)
bool isFixedPitch(const TQString &, bool isFixedPitch(const TQString &,
const TQString & = TQString::null) const; const TQString & = TQString::null) const;
%End
%If (- TQt_3_0_0)
bool italic(const TQString &,const TQString &,
const TQString & = TQString::null) const;
bool bold(const TQString &,const TQString &,
const TQString & = TQString::null) const;
int weight(const TQString &,const TQString &,
const TQString & = TQString::null) const;
static TQString verboseCharSetName(const TQString &);
static TQString charSetSample(const TQString &);
%End
%If (TQt_3_0_0 -)
bool italic(const TQString &,const TQString &) const; bool italic(const TQString &,const TQString &) const;
bool bold(const TQString &,const TQString &) const; bool bold(const TQString &,const TQString &) const;
int weight(const TQString &,const TQString &) const; int weight(const TQString &,const TQString &) const;
static TQString scriptName(TQFont::Script); static TQString scriptName(TQFont::Script);
static TQString scriptSample(TQFont::Script); static TQString scriptSample(TQFont::Script);
%End
}; };
%End %End
%End

@ -50,7 +50,6 @@ and returns a tuple containing the <Literal>TQFont</Literal> result and the
%End %End
%If (TQt_2_00 -)
%If (TQt_FONTDIALOG) %If (TQt_FONTDIALOG)
class TQFontDialog : TQDialog class TQFontDialog : TQDialog
@ -64,42 +63,11 @@ public:
const char * = 0); const char * = 0);
static TQFont getFont(bool *,TQWidget * = 0,const char * = 0); static TQFont getFont(bool *,TQWidget * = 0,const char * = 0);
signals:
%If (- TQt_3_2_0)
void fontSelected(const TQFont &);
void fontHighlighted(const TQFont &);
%End
protected:
%If (- TQt_3_2_0)
bool eventFilter(TQObject *,TQEvent *);
TQListBox *familyListBox() const;
virtual void updateFamilies();
TQListBox *styleListBox() const;
virtual void updateStyles();
TQListBox *sizeListBox() const;
virtual void updateSizes();
TQComboBox *scriptCombo() const;
virtual void updateScripts();
%End
protected slots:
%If (- TQt_3_2_0)
void sizeChanged(const TQString &);
%End
private: private:
TQFontDialog(TQWidget * /TransferThis/ = 0,const char * = 0,bool = 0, TQFontDialog(TQWidget * /TransferThis/ = 0,const char * = 0,bool = 0,
WFlags = 0); WFlags = 0);
%If (TQt_2_1_0 -)
TQFontDialog(const TQFontDialog &); TQFontDialog(const TQFontDialog &);
%End
~TQFontDialog(); ~TQFontDialog();
}; };
%End %End
%End

@ -37,34 +37,20 @@ class TQFontInfo
public: public:
TQFontInfo(const TQFont &); TQFontInfo(const TQFont &);
%If (TQt_3_2_0 -)
TQFontInfo(const TQFont &,TQFont::Script); TQFontInfo(const TQFont &,TQFont::Script);
%End
TQFontInfo(const TQFontInfo &); TQFontInfo(const TQFontInfo &);
%If (- TQt_2_00)
const char *family() const;
%End
%If (TQt_2_00 -)
TQString family() const; TQString family() const;
%End
%If (TQt_3_0_0 -)
int pixelSize() const; int pixelSize() const;
%End
int pointSize() const; int pointSize() const;
bool italic() const; bool italic() const;
int weight() const; int weight() const;
bool bold() const; bool bold() const;
bool underline() const; bool underline() const;
%If (TQt_3_2_0 -)
bool overline() const; bool overline() const;
%End
bool strikeOut() const; bool strikeOut() const;
bool fixedPitch() const; bool fixedPitch() const;
TQFont::StyleHint styleHint() const; TQFont::StyleHint styleHint() const;
%If (- TQt_3_0_0)
TQFont::CharSet charSet() const;
%End
bool rawMode() const; bool rawMode() const;
bool exactMatch() const; bool exactMatch() const;
}; };

@ -61,9 +61,7 @@ class TQFontMetrics
public: public:
TQFontMetrics(const TQFont &); TQFontMetrics(const TQFont &);
%If (TQt_3_2_0 -)
TQFontMetrics(const TQFont &,TQFont::Script); TQFontMetrics(const TQFont &,TQFont::Script);
%End
TQFontMetrics(const TQFontMetrics &); TQFontMetrics(const TQFontMetrics &);
int ascent() const; int ascent() const;
@ -74,60 +72,12 @@ public:
int minLeftBearing() const; int minLeftBearing() const;
int minRightBearing() const; int minRightBearing() const;
int maxWidth() const; int maxWidth() const;
%If (- TQt_2_00)
bool inFont(char) const;
int leftBearing(char) const;
int rightBearing(char) const;
int width(const char *,int = -1) const;
int width(char) const;
TQRect boundingRect(const char *,int = -1) const;
TQRect boundingRect(char) const;
TQRect boundingRect(int,int,int,int,int,const char *,int = -1,
SIP_PYLIST /AllowNone/ = 0) const;
%MethodCode
int *tabarray;
if (intListToArray(a8,&tabarray) < 0)
sipIsErr = 1;
else
{
Py_BEGIN_ALLOW_THREADS
sipRes = new TQRect(sipCpp -> TQFontMetrics::boundingRect(a0,a1,a2,a3,a4,a5,a6,a7,tabarray));
Py_END_ALLOW_THREADS
if (tabarray)
sipFree((void *)tabarray);
}
%End
TQSize size(int,const char *,int = -1,int = 0,
SIP_PYLIST /AllowNone/ = 0) const;
%MethodCode
int *tabarray;
if (intListToArray(a4,&tabarray) < 0)
sipIsErr = 1;
else
{
Py_BEGIN_ALLOW_THREADS
sipRes = new TQSize(sipCpp -> TQFontMetrics::size(a0,a1,a2,a3,tabarray));
Py_END_ALLOW_THREADS
if (tabarray)
sipFree((void *)tabarray);
}
%End
%End
%If (TQt_2_00 -)
bool inFont(TQChar) const; bool inFont(TQChar) const;
int leftBearing(TQChar) const; int leftBearing(TQChar) const;
int rightBearing(TQChar) const; int rightBearing(TQChar) const;
int width(const TQString &,int = -1) const; int width(const TQString &,int = -1) const;
int width(TQChar) const; int width(TQChar) const;
%If (TQt_3_0_0 -)
int charWidth(const TQString &,int) const; int charWidth(const TQString &,int) const;
%End
TQRect boundingRect(const TQString &,int = -1) const; TQRect boundingRect(const TQString &,int = -1) const;
TQRect boundingRect(TQChar) const; TQRect boundingRect(TQChar) const;
@ -165,13 +115,10 @@ public:
if (tabarray) if (tabarray)
sipFree((void *)tabarray); sipFree((void *)tabarray);
} }
%End
%End %End
int underlinePos() const; int underlinePos() const;
%If (TQt_3_2_0 -)
int overlinePos() const; int overlinePos() const;
%End
int strikeOutPos() const; int strikeOutPos() const;
int lineWidth() const; int lineWidth() const;
@ -201,7 +148,7 @@ static int intListToArray(PyObject *pl,int **ap)
for (i = 0; i < nint; ++i) for (i = 0; i < nint; ++i)
{ {
*ip++ = PyInt_AsLong(PyList_GetItem(pl,i)); *ip++ = PyLong_AsLong(PyList_GetItem(pl,i));
if (PyErr_Occurred()) if (PyErr_Occurred())
{ {

@ -36,50 +36,16 @@ class TQFrame : TQWidget
%End %End
public: public:
%If (- TQt_3_0_0)
TQFrame(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0,
bool = 1);
%End
%If (TQt_3_0_0 -)
TQFrame(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0); TQFrame(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0);
%End
int frameStyle() const; int frameStyle() const;
%If (- TQt_2_00)
void setFrameStyle(int);
%End
%If (TQt_2_00 -)
virtual void setFrameStyle(int); virtual void setFrameStyle(int);
%End
int frameWidth() const; int frameWidth() const;
TQRect contentsRect() const; TQRect contentsRect() const;
%If (- TQt_2_00)
bool lineShapesOk() const;
%End
TQSize sizeHint() const; TQSize sizeHint() const;
%If (TQt_2_00 - TQt_3_0_0)
TQSizePolicy sizePolicy() const;
%End
%If (- TQt_2_00)
enum {
NoFrame,
Box,
Panel,
WinPanel,
HLine,
VLine,
MShape,
Plain,
Raised,
Sunken,
MShadow
};
%End
%If (TQt_2_00 -)
enum Shape { enum Shape {
NoFrame, NoFrame,
Box, Box,
@ -89,91 +55,45 @@ public:
VLine, VLine,
StyledPanel, StyledPanel,
PopupPanel, PopupPanel,
%If (TQt_3_0_0 -)
MenuBarPanel, MenuBarPanel,
ToolBarPanel, ToolBarPanel,
%End
%If (TQt_3_0_1 -)
LineEditPanel, LineEditPanel,
TabWidgetPanel, TabWidgetPanel,
%End
%If (TQt_3_1_0 -)
GroupBoxPanel, GroupBoxPanel,
%End
MShape MShape
}; };
%End
%If (TQt_2_00 -)
enum Shadow { enum Shadow {
Plain, Plain,
Raised, Raised,
Sunken, Sunken,
MShadow MShadow
}; };
%End
%If (- TQt_2_00)
int frameShape() const;
%End
%If (TQt_2_00 -)
Shape frameShape() const; Shape frameShape() const;
void setFrameShape(Shape); void setFrameShape(Shape);
%End
%If (- TQt_2_00)
int frameShadow() const;
%End
%If (TQt_2_00 -)
Shadow frameShadow() const; Shadow frameShadow() const;
void setFrameShadow(Shadow); void setFrameShadow(Shadow);
%End
int lineWidth() const; int lineWidth() const;
%If (- TQt_2_00)
void setLineWidth(int);
%End
%If (TQt_2_00 -)
virtual void setLineWidth(int); virtual void setLineWidth(int);
%End
int margin() const; int margin() const;
%If (- TQt_2_00)
void setMargin(int);
%End
%If (TQt_2_00 -)
virtual void setMargin(int); virtual void setMargin(int);
%End
int midLineWidth() const; int midLineWidth() const;
%If (- TQt_2_00)
void setMidLineWidth(int);
%End
%If (TQt_2_00 -)
virtual void setMidLineWidth(int); virtual void setMidLineWidth(int);
%End
TQRect frameRect() const; TQRect frameRect() const;
%If (TQt_2_00 -)
virtual void setFrameRect(const TQRect &); virtual void setFrameRect(const TQRect &);
%End
protected: protected:
%If (- TQt_2_00)
void setFrameRect(const TQRect &);
%End
void paintEvent(TQPaintEvent *); void paintEvent(TQPaintEvent *);
void resizeEvent(TQResizeEvent *); void resizeEvent(TQResizeEvent *);
virtual void drawFrame(TQPainter *); virtual void drawFrame(TQPainter *);
virtual void drawContents(TQPainter *); virtual void drawContents(TQPainter *);
virtual void frameChanged(); virtual void frameChanged();
%If (TQt_2_00 - TQt_3_0_0)
void updateMask();
virtual void drawFrameMask(TQPainter *);
virtual void drawContentsMask(TQPainter *);
%End
%If (TQt_3_1_0 -)
void styleChange(TQStyle &); void styleChange(TQStyle &);
%End
private: private:
TQFrame(const TQFrame &); TQFrame(const TQFrame &);

@ -54,10 +54,6 @@ typedef unsigned long long TQ_ULONG;
const char *tqVersion(); const char *tqVersion();
%If (TQt_3_0_0 -)
%End
%If (TQt_3_1_0 -)
const char *tqInstallPath(); const char *tqInstallPath();
const char *tqInstallPathDocs(); const char *tqInstallPathDocs();
const char *tqInstallPathHeaders(); const char *tqInstallPathHeaders();
@ -65,10 +61,7 @@ const char *tqInstallPathLibs();
const char *tqInstallPathBins(); const char *tqInstallPathBins();
const char *tqInstallPathPlugins(); const char *tqInstallPathPlugins();
const char *tqInstallPathData(); const char *tqInstallPathData();
%End
%If (TQt_3_2_0 -)
const char *tqInstallPathTranslations(); const char *tqInstallPathTranslations();
%If (!WS_WIN) %If (!WS_WIN)
const char *tqInstallPathSysconf(); const char *tqInstallPathSysconf();
%End %End
%End

@ -1,88 +0,0 @@
// This is the SIP interface definition for TQGManager.
//
// 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.
%ExportedDoc
<Sect2><Title>TQGManager (TQt v1.x)</Title>
<Para>
<Literal>TQGManager</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>TQChain (TQt v1.x)</Title>
<Para>
<Literal>TQChain</Literal> is implemented as an opaque class.
</Para>
</Sect2>
%End
%If (- TQt_2_00)
class TQChain;
class TQGManager : TQObject
{
%TypeHeaderCode
#include <tqgmanager.h>
%End
public:
TQGManager(TQWidget *,const char * = 0);
enum Direction {
LeftToRight,
RightToLeft,
Down,
Up
};
enum {
unlimited = TQCOORD_MAX
};
void setBorder(int);
TQChain *newSerChain(Direction);
TQChain *newParChain(Direction);
bool add(TQChain *,TQChain *,int = 0);
bool addWidget(TQChain *,TQWidget *,int = 0);
bool addSpacing(TQChain *,int,int = 0,int = unlimited);
bool addBranch(TQChain *,TQChain *,int,int);
void setStretch(TQChain *,int);
bool activate();
void freeze(int = 0,int = 0);
void unFreeze();
TQChain *xChain();
TQChain *yChain();
void setMenuBar(TQWidget *);
TQWidget *mainWidget();
void remove(TQWidget *);
void setName(TQChain *,const char *);
protected:
bool eventFilter(TQObject *,TQEvent *);
private:
TQGManager(const TQGManager &);
};
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_2_00 -)
class TQGrid : TQFrame class TQGrid : TQFrame
{ {
%TypeHeaderCode %TypeHeaderCode
@ -38,35 +36,16 @@ class TQGrid : TQFrame
%End %End
public: public:
%If (- TQt_3_0_0)
enum Direction {
Horizontal,
Vertical
};
%End
TQGrid(int,TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0); TQGrid(int,TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0);
%If (- TQt_3_0_0)
TQGrid(int,Direction,TQWidget * /TransferThis/ = 0,const char * = 0,
WFlags = 0);
%End
%If (TQt_3_0_0 -)
TQGrid(int,Orientation,TQWidget * /TransferThis/ = 0,const char * = 0, TQGrid(int,Orientation,TQWidget * /TransferThis/ = 0,const char * = 0,
WFlags = 0); WFlags = 0);
%End
void setSpacing(int); void setSpacing(int);
%If (TQt_2_1_0 -)
TQSize sizeHint() const; TQSize sizeHint() const;
%End
protected: protected:
void frameChanged(); void frameChanged();
private: private:
%If (TQt_2_1_0 -)
TQGrid(const TQGrid &); TQGrid(const TQGrid &);
%End
}; };
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_3_0_0 -)
class TQGridView : TQScrollView class TQGridView : TQScrollView
{ {
%TypeHeaderCode %TypeHeaderCode
@ -72,5 +70,3 @@ protected:
private: private:
TQGridView(const TQGridView &); TQGridView(const TQGridView &);
}; };
%End

@ -37,98 +37,55 @@ class TQGroupBox : TQFrame
public: public:
TQGroupBox(TQWidget * /TransferThis/ = 0,const char * = 0); TQGroupBox(TQWidget * /TransferThis/ = 0,const char * = 0);
%If (- TQt_2_00)
TQGroupBox(const char *,TQWidget * /TransferThis/ = 0,const char * = 0);
%End
%If (TQt_2_00 -)
TQGroupBox(const TQString &,TQWidget * /TransferThis/ = 0, TQGroupBox(const TQString &,TQWidget * /TransferThis/ = 0,
const char * = 0); const char * = 0);
TQGroupBox(int,Orientation,TQWidget * /TransferThis/ = 0, TQGroupBox(int,Orientation,TQWidget * /TransferThis/ = 0,
const char * = 0); const char * = 0);
TQGroupBox(int,Orientation,const TQString &,TQWidget * /TransferThis/ = 0, TQGroupBox(int,Orientation,const TQString &,TQWidget * /TransferThis/ = 0,
const char * = 0); const char * = 0);
%End
%If (TQt_2_00 -)
virtual void setColumnLayout(int,Orientation); virtual void setColumnLayout(int,Orientation);
%End
%If (- TQt_2_00)
const char *title() const;
void setTitle(const char *);
%End
%If (TQt_2_00 -)
TQString title() const; TQString title() const;
virtual void setTitle(const TQString &); virtual void setTitle(const TQString &);
%End
int alignment() const; int alignment() const;
%If (- TQt_2_00)
void setAlignment(int);
%End
%If (TQt_2_00 -)
virtual void setAlignment(int); virtual void setAlignment(int);
%End
%If (TQt_2_1_0 -)
int columns() const; int columns() const;
void setColumns(int); void setColumns(int);
Orientation orientation() const; Orientation orientation() const;
void setOrientation(Orientation); void setOrientation(Orientation);
%End
%If (TQt_3_0_0 -)
int insideMargin() const; int insideMargin() const;
int insideSpacing() const; int insideSpacing() const;
void setInsideMargin(int); void setInsideMargin(int);
void setInsideSpacing(int); void setInsideSpacing(int);
%End
%If (TQt_2_1_0 -)
void addSpace(int); void addSpace(int);
%End
%If (TQt_2_2_0 -)
TQSize sizeHint() const; TQSize sizeHint() const;
%End
%If (TQt_3_1_0 -)
bool isFlat() const; bool isFlat() const;
void setFlat(bool); void setFlat(bool);
%End
%If (TQt_3_2_0 -)
bool isCheckable() const; bool isCheckable() const;
void setCheckable(bool); void setCheckable(bool);
bool isChecked() const; bool isChecked() const;
void setEnabled(bool); void setEnabled(bool);
%End
public slots: public slots:
%If (TQt_3_2_0 -)
void setChecked(bool); void setChecked(bool);
%End
signals: signals:
%If (TQt_3_2_0 -)
void toggled(bool); void toggled(bool);
%End
protected: protected:
%If (TQt_2_2_0 -)
bool event(TQEvent *); bool event(TQEvent *);
%End
%If (TQt_2_00 -)
void childEvent(TQChildEvent *); void childEvent(TQChildEvent *);
void resizeEvent(TQResizeEvent *); void resizeEvent(TQResizeEvent *);
%End
void paintEvent(TQPaintEvent *); void paintEvent(TQPaintEvent *);
%If (TQt_2_00 - TQt_3_0_0)
void updateMask();
%End
%If (TQt_2_1_0 -)
void focusInEvent(TQFocusEvent *); void focusInEvent(TQFocusEvent *);
void fontChange(const TQFont &); void fontChange(const TQFont &);
%End
private: private:
TQGroupBox(const TQGroupBox &); TQGroupBox(const TQGroupBox &);

@ -29,8 +29,6 @@
%End %End
%If (TQt_2_00 -)
class TQHBox : TQFrame class TQHBox : TQFrame
{ {
%TypeHeaderCode %TypeHeaderCode
@ -38,38 +36,17 @@ class TQHBox : TQFrame
%End %End
public: public:
%If (- TQt_3_0_0)
TQHBox(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0,
bool = 1);
%End
%If (TQt_3_0_0 -)
TQHBox(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0); TQHBox(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0);
%End
void setSpacing(int); void setSpacing(int);
%If (TQt_2_1_0 -)
bool setStretchFactor(TQWidget *,int); bool setStretchFactor(TQWidget *,int);
TQSize sizeHint() const; TQSize sizeHint() const;
%End
protected: protected:
%If (- TQt_3_0_0)
TQHBox(bool,TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0,
bool = 1);
%End
%If (TQt_3_0_0 - TQt_3_2_0)
TQHBox(bool,TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0);
%End
%If (TQt_3_2_0 -)
TQHBox(bool,TQWidget * /TransferThis/,const char *,WFlags = 0); TQHBox(bool,TQWidget * /TransferThis/,const char *,WFlags = 0);
%End
void frameChanged(); void frameChanged();
private: private:
%If (TQt_3_1_0 -)
TQHBox(const TQHBox &); TQHBox(const TQHBox &);
%End
}; };
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_2_00 -)
class TQHButtonGroup : TQButtonGroup class TQHButtonGroup : TQButtonGroup
{ {
%TypeHeaderCode %TypeHeaderCode
@ -44,5 +42,3 @@ public:
private: private:
TQHButtonGroup(const TQHButtonGroup &); TQHButtonGroup(const TQHButtonGroup &);
}; };
%End

@ -29,71 +29,6 @@
%End %End
%If (- TQt_2_00)
class TQHeader : TQTableView
{
%TypeHeaderCode
#include <tqheader.h>
%End
public:
TQHeader(TQWidget * /TransferThis/ = 0,const char * = 0);
TQHeader(int,TQWidget * /TransferThis/ = 0,const char * = 0);
enum Orientation {
Horizontal,
Vertical
};
int addLabel(const char *,int = -1);
void setLabel(int,const char *,int = -1);
const char *label(int);
void setOrientation(Orientation);
Orientation orientation() const;
void setTracking(bool);
bool tracking() const;
void setClickEnabled(bool,int = -1);
void setResizeEnabled(bool,int = -1);
void setMovingEnabled(bool);
void setCellSize(int,int);
int cellSize(int) const;
int cellPos(int) const;
int cellAt(int) const;
int count() const;
int offset() const;
TQSize sizeHint() const;
int mapToLogical(int) const;
int mapToActual(int) const;
public slots:
void setOffset(int);
signals:
void sectionClicked(int);
void sizeChange(int,int,int);
void moved(int,int);
protected:
void resizeEvent(TQResizeEvent *);
TQRect sRect(int);
void paintCell(TQPainter *,int,int);
void setupPainter(TQPainter *);
int cellHeight(int);
int cellWidth(int);
void mousePressEvent(TQMouseEvent *);
void mouseReleaseEvent(TQMouseEvent *);
void mouseMoveEvent(TQMouseEvent *);
private:
TQHeader(const TQHeader &);
};
%End
%If (TQt_2_00 -)
class TQHeader : TQWidget class TQHeader : TQWidget
{ {
%TypeHeaderCode %TypeHeaderCode
@ -106,9 +41,7 @@ public:
int addLabel(const TQString &,int = -1); int addLabel(const TQString &,int = -1);
int addLabel(const TQIconSet &,const TQString &,int = -1); int addLabel(const TQIconSet &,const TQString &,int = -1);
%If (TQt_2_1_0 -)
void removeLabel(int); void removeLabel(int);
%End
virtual void setLabel(int,const TQString &,int = -1); virtual void setLabel(int,const TQString &,int = -1);
virtual void setLabel(int,const TQIconSet &,const TQString &,int = -1); virtual void setLabel(int,const TQIconSet &,const TQString &,int = -1);
@ -123,146 +56,72 @@ public:
virtual void setClickEnabled(bool,int = -1); virtual void setClickEnabled(bool,int = -1);
virtual void setResizeEnabled(bool,int = -1); virtual void setResizeEnabled(bool,int = -1);
virtual void setMovingEnabled(bool); virtual void setMovingEnabled(bool);
%If (TQt_3_0_0 -)
virtual void setStretchEnabled(bool,int); virtual void setStretchEnabled(bool,int);
%End
%If (TQt_2_1_0 -)
bool isClickEnabled(int = -1) const; bool isClickEnabled(int = -1) const;
bool isResizeEnabled(int = -1) const; bool isResizeEnabled(int = -1) const;
bool isMovingEnabled() const; bool isMovingEnabled() const;
%End
%If (TQt_3_0_0 -)
bool isStretchEnabled() const; bool isStretchEnabled() const;
bool isStretchEnabled(int) const; bool isStretchEnabled(int) const;
%End
%If (TQt_2_1_0 -)
void resizeSection(int,int); void resizeSection(int,int);
int sectionSize(int) const; int sectionSize(int) const;
int sectionPos(int) const; int sectionPos(int) const;
int sectionAt(int) const; int sectionAt(int) const;
%End
int count() const; int count() const;
%If (TQt_3_0_0 -)
int headerWidth() const; int headerWidth() const;
TQRect sectionRect(int) const; TQRect sectionRect(int) const;
%End
%If (- TQt_3_0_0)
virtual void setCellSize(int,int);
int cellSize(int) const;
int cellPos(int) const;
int cellAt(int) const;
%End
int offset() const; int offset() const;
TQSize sizeHint() const; TQSize sizeHint() const;
%If (- TQt_3_0_0)
TQSizePolicy sizePolicy() const;
%End
%If (TQt_2_1_0 -)
int mapToSection(int) const; int mapToSection(int) const;
int mapToIndex(int) const; int mapToIndex(int) const;
%End
%If (- TQt_3_0_0)
int mapToLogical(int) const;
int mapToActual(int) const;
%End
%If (TQt_2_1_0 -)
void moveSection(int,int); void moveSection(int,int);
%End
%If (- TQt_3_0_0)
virtual void moveCell(int,int);
%End
%If (TQt_3_2_0 -)
// This is placed before the obsolete version below so that it has // This is placed before the obsolete version below so that it has
// precedence. It may still cause problems with old code until SIP // precedence. It may still cause problems with old code until SIP
// distinguishes between bools and enums. // distinguishes between bools and enums.
void setSortIndicator(int,SortOrder); void setSortIndicator(int,SortOrder);
int sortIndicatorSection() const; int sortIndicatorSection() const;
SortOrder sortIndicatorOrder() const; SortOrder sortIndicatorOrder() const;
%End
%If (TQt_2_1_0 -)
// Obsolete. // Obsolete.
void setSortIndicator(int,bool = 1); void setSortIndicator(int,bool = 1);
%End
%If (TQt_3_0_0 -)
void adjustHeaderSize(); void adjustHeaderSize();
%End
public slots: public slots:
%If (TQt_2_2_0 -)
void setUpdatesEnabled(bool); void setUpdatesEnabled(bool);
%End
virtual void setOffset(int); virtual void setOffset(int);
signals: signals:
%If (TQt_2_1_0 -)
void clicked(int); void clicked(int);
void pressed(int); void pressed(int);
void released(int); void released(int);
%End
void sizeChange(int,int,int); void sizeChange(int,int,int);
%If (TQt_2_1_0 -)
void indexChange(int,int,int); void indexChange(int,int,int);
%End
%If (- TQt_3_0_0)
void sectionClicked(int);
void moved(int,int);
%End
%If (TQt_3_2_0 -)
void sectionHandleDoubleClicked(int); void sectionHandleDoubleClicked(int);
%End
protected: protected:
%If (TQt_2_1_0 -)
void paintEvent(TQPaintEvent *); void paintEvent(TQPaintEvent *);
%End
%If (TQt_2_2_0 -)
void showEvent(TQShowEvent *); void showEvent(TQShowEvent *);
%End
%If (- TQt_2_1_0)
void resizeEvent(TQResizeEvent *);
%End
%If (TQt_3_0_0 -)
void resizeEvent(TQResizeEvent *); void resizeEvent(TQResizeEvent *);
%End
TQRect sRect(int); TQRect sRect(int);
%If (- TQt_3_0_0)
void paintSection(TQPainter *,int,TQRect);
%End
%If (TQt_2_1_0 - TQt_3_0_0)
void paintSectionLabel(TQPainter *,int,const TQRect &);
%End
%If (TQt_3_0_0 -)
virtual void paintSection(TQPainter *,int,const TQRect &); virtual void paintSection(TQPainter *,int,const TQRect &);
virtual void paintSectionLabel(TQPainter *,int,const TQRect &); virtual void paintSectionLabel(TQPainter *,int,const TQRect &);
%End
%If (TQt_3_1_0 -)
void fontChange(const TQFont &); void fontChange(const TQFont &);
%End
void mousePressEvent(TQMouseEvent *); void mousePressEvent(TQMouseEvent *);
void mouseReleaseEvent(TQMouseEvent *); void mouseReleaseEvent(TQMouseEvent *);
void mouseMoveEvent(TQMouseEvent *); void mouseMoveEvent(TQMouseEvent *);
%If (TQt_3_2_0 -)
void mouseDoubleClickEvent(TQMouseEvent *); void mouseDoubleClickEvent(TQMouseEvent *);
%End
%If (TQt_3_1_0 -)
void keyPressEvent(TQKeyEvent *); void keyPressEvent(TQKeyEvent *);
void keyReleaseEvent(TQKeyEvent *); void keyReleaseEvent(TQKeyEvent *);
%End
private: private:
TQHeader(const TQHeader &); TQHeader(const TQHeader &);
}; };
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_2_00 -)
class TQHGroupBox : TQGroupBox class TQHGroupBox : TQGroupBox
{ {
%TypeHeaderCode %TypeHeaderCode
@ -44,5 +42,3 @@ public:
private: private:
TQHGroupBox(const TQHGroupBox &); TQHGroupBox(const TQHGroupBox &);
}; };
%End

@ -54,73 +54,36 @@ public:
Active Active
}; };
%If (TQt_3_0_0 -)
enum State { enum State {
On, On,
Off Off
}; };
%End
%If (TQt_2_1_0 -)
TQIconSet(); TQIconSet();
%End
TQIconSet(const TQPixmap &,Size = Automatic); TQIconSet(const TQPixmap &,Size = Automatic);
%If (TQt_2_2_0 -)
TQIconSet(const TQPixmap &,const TQPixmap &); TQIconSet(const TQPixmap &,const TQPixmap &);
%End
TQIconSet(const TQIconSet &); TQIconSet(const TQIconSet &);
void reset(const TQPixmap &,Size); void reset(const TQPixmap &,Size);
%If (- TQt_2_00)
void setPixmap(const TQPixmap &,Size,Mode = Normal);
void setPixmap(const char *,Size,Mode = Normal);
%End
%If (TQt_2_00 - TQt_3_0_0)
virtual void setPixmap(const TQPixmap &,Size,Mode = Normal);
virtual void setPixmap(const TQString &,Size,Mode = Normal);
%End
%If (TQt_3_0_0 -)
virtual void setPixmap(const TQPixmap &,Size,Mode = Normal,State = Off); virtual void setPixmap(const TQPixmap &,Size,Mode = Normal,State = Off);
virtual void setPixmap(const TQString &,Size,Mode = Normal,State = Off); virtual void setPixmap(const TQString &,Size,Mode = Normal,State = Off);
%End
%If (- TQt_3_0_0)
TQPixmap pixmap(Size,Mode) const;
%If (TQt_2_1_0 -)
// TQPixmap pixmap(Size,bool) const;
%End
%End
%If (TQt_3_0_0 -)
TQPixmap pixmap(Size,Mode,State = Off) const; TQPixmap pixmap(Size,Mode,State = Off) const;
// TQPixmap pixmap(Size,bool,State = Off) const; // TQPixmap pixmap(Size,bool,State = Off) const;
%End
TQPixmap pixmap() const; TQPixmap pixmap() const;
%If (- TQt_3_0_0)
bool isGenerated(Size,Mode) const;
%End
%If (TQt_3_0_0 -)
bool isGenerated(Size,Mode,State = Off) const; bool isGenerated(Size,Mode,State = Off) const;
void clearGenerated(); void clearGenerated();
%End
%If (TQt_3_1_0 -)
void installIconFactory(TQIconFactory *); void installIconFactory(TQIconFactory *);
%End
%If (TQt_2_1_0 -)
bool isNull() const; bool isNull() const;
%End
void detach(); void detach();
%If (TQt_3_0_0 -)
static void setIconSize(Size,const TQSize &); static void setIconSize(Size,const TQSize &);
static const TQSize &iconSize(Size); static const TQSize &iconSize(Size);
%End
}; };
%If (TQt_3_1_0 -)
class TQIconFactory class TQIconFactory
{ {
%TypeHeaderCode %TypeHeaderCode
@ -142,5 +105,3 @@ public:
private: private:
TQIconFactory(const TQIconFactory &); TQIconFactory(const TQIconFactory &);
}; };
%End

@ -54,7 +54,6 @@ Not yet implemented.
%If (TQt_ICONVIEW) %If (TQt_ICONVIEW)
%If (TQt_2_1_0 -)
%If (TQt_DRAGANDDROP) %If (TQt_DRAGANDDROP)
@ -88,9 +87,7 @@ public:
virtual TQByteArray encodedData(const char *) const; virtual TQByteArray encodedData(const char *) const;
private: private:
%If (TQt_3_1_0 -)
TQIconDrag(const TQIconDrag &); TQIconDrag(const TQIconDrag &);
%End
}; };
%End %End
@ -112,12 +109,10 @@ public:
const TQPixmap &); const TQPixmap &);
TQIconViewItem(TQIconView * /TransferThis/,TQIconViewItem *, TQIconViewItem(TQIconView * /TransferThis/,TQIconViewItem *,
const TQString &,const TQPixmap &); const TQString &,const TQPixmap &);
%If (TQt_3_0_0 -)
TQIconViewItem(TQIconView * /TransferThis/,const TQString &, TQIconViewItem(TQIconView * /TransferThis/,const TQString &,
const TQPicture &); const TQPicture &);
TQIconViewItem(TQIconView * /TransferThis/,TQIconViewItem *, TQIconViewItem(TQIconView * /TransferThis/,TQIconViewItem *,
const TQString &,const TQPicture &); const TQString &,const TQPicture &);
%End
virtual void setRenameEnabled(bool); virtual void setRenameEnabled(bool);
virtual void setDragEnabled(bool); virtual void setDragEnabled(bool);
@ -125,9 +120,7 @@ public:
virtual TQString text() const; virtual TQString text() const;
virtual TQPixmap *pixmap() const; virtual TQPixmap *pixmap() const;
%If (TQt_3_0_0 -)
virtual TQPicture *picture() const; virtual TQPicture *picture() const;
%End
virtual TQString key() const; virtual TQString key() const;
bool renameEnabled() const; bool renameEnabled() const;
@ -149,19 +142,9 @@ public:
virtual void repaint(); virtual void repaint();
%If (- TQt_3_0_0)
virtual void move(int,int);
%End
%If (TQt_3_0_0 -)
virtual bool move(int,int); virtual bool move(int,int);
%End
virtual void moveBy(int,int); virtual void moveBy(int,int);
%If (- TQt_3_0_0)
virtual void move(const TQPoint &);
%End
%If (TQt_3_0_0 -)
virtual bool move(const TQPoint &); virtual bool move(const TQPoint &);
%End
virtual void moveBy(const TQPoint &); virtual void moveBy(const TQPoint &);
TQRect rect() const; TQRect rect() const;
@ -173,14 +156,8 @@ public:
TQPoint pos() const; TQPoint pos() const;
TQRect textRect(bool = 1) const; TQRect textRect(bool = 1) const;
TQRect pixmapRect(bool = 1) const; TQRect pixmapRect(bool = 1) const;
%If (- TQt_3_0_0)
bool contains(TQPoint) const;
bool intersects(TQRect) const;
%End
%If (TQt_3_0_0 -)
bool contains(const TQPoint &) const; bool contains(const TQPoint &) const;
bool intersects(const TQRect &) const; bool intersects(const TQRect &) const;
%End
virtual bool acceptDrop(const TQMimeSource *) const; virtual bool acceptDrop(const TQMimeSource *) const;
@ -190,16 +167,12 @@ public:
virtual void setText(const TQString &); virtual void setText(const TQString &);
virtual void setPixmap(const TQPixmap &); virtual void setPixmap(const TQPixmap &);
%If (TQt_3_0_0 -)
virtual void setPicture(const TQPicture &); virtual void setPicture(const TQPicture &);
%End
virtual void setText(const TQString &,bool,bool = 1); virtual void setText(const TQString &,bool,bool = 1);
virtual void setPixmap(const TQPixmap &,bool,bool = 1); virtual void setPixmap(const TQPixmap &,bool,bool = 1);
virtual void setKey(const TQString &); virtual void setKey(const TQString &);
%If (TQt_3_0_0 -)
virtual int rtti() const; virtual int rtti() const;
%End
protected: protected:
virtual void removeRenameBox(); virtual void removeRenameBox();
@ -215,9 +188,7 @@ protected:
void setTextRect(const TQRect &); void setTextRect(const TQRect &);
void setPixmapRect(const TQRect &); void setPixmapRect(const TQRect &);
void calcTmpText(); void calcTmpText();
%If (TQt_3_1_0 -)
TQString tempText() const; TQString tempText() const;
%End
}; };
@ -271,21 +242,14 @@ public:
SelectionMode selectionMode() const; SelectionMode selectionMode() const;
TQIconViewItem *findItem(const TQPoint &) const; TQIconViewItem *findItem(const TQPoint &) const;
%If (- TQt_3_0_0)
TQIconViewItem *findItem(const TQString &) const;
%End
%If (TQt_3_0_0 -)
TQIconViewItem *findItem(const TQString &, TQIconViewItem *findItem(const TQString &,
ComparisonFlags = BeginsWith) const; ComparisonFlags = BeginsWith) const;
%End
virtual void selectAll(bool); virtual void selectAll(bool);
virtual void clearSelection(); virtual void clearSelection();
virtual void invertSelection(); virtual void invertSelection();
virtual void repaintItem(TQIconViewItem *); virtual void repaintItem(TQIconViewItem *);
%If (TQt_3_1_0 -)
void repaintSelectedItems(); void repaintSelectedItems();
%End
void ensureItemVisible(TQIconViewItem *); void ensureItemVisible(TQIconViewItem *);
TQIconViewItem* findFirstVisibleItem(const TQRect &) const; TQIconViewItem* findFirstVisibleItem(const TQRect &) const;
@ -328,9 +292,6 @@ public:
bool eventFilter(TQObject *,TQEvent *); bool eventFilter(TQObject *,TQEvent *);
TQSize minimumSizeHint() const; TQSize minimumSizeHint() const;
%If (- TQt_3_0_0)
TQSizePolicy sizePolicy() const;
%End
TQSize sizeHint() const; TQSize sizeHint() const;
virtual void sort(bool = 1); virtual void sort(bool = 1);
@ -338,9 +299,7 @@ public:
virtual void setFont(const TQFont &); virtual void setFont(const TQFont &);
virtual void setPalette(const TQPalette &); virtual void setPalette(const TQPalette &);
%If (TQt_3_0_0 -)
bool isRenaming() const; bool isRenaming() const;
%End
public slots: public slots:
virtual void arrangeItemsInGrid(const TQSize &,bool = 1); virtual void arrangeItemsInGrid(const TQSize &,bool = 1);
@ -363,9 +322,7 @@ signals:
void rightButtonPressed(TQIconViewItem *,const TQPoint &); void rightButtonPressed(TQIconViewItem *,const TQPoint &);
void mouseButtonPressed(int,TQIconViewItem *,const TQPoint &); void mouseButtonPressed(int,TQIconViewItem *,const TQPoint &);
void mouseButtonClicked(int,TQIconViewItem *,const TQPoint &); void mouseButtonClicked(int,TQIconViewItem *,const TQPoint &);
%If (TQt_3_0_0 -)
void contextMenuRequested(TQIconViewItem *,const TQPoint &); void contextMenuRequested(TQIconViewItem *,const TQPoint &);
%End
%If (TQt_DRAGANDDROP) %If (TQt_DRAGANDDROP)
void dropped(TQDropEvent *,const TQValueList<TQIconDragItem> &); void dropped(TQDropEvent *,const TQValueList<TQIconDragItem> &);
%End %End
@ -381,37 +338,13 @@ protected slots:
virtual void slotUpdate(); virtual void slotUpdate();
protected: protected:
%If (- TQt_3_0_0)
virtual void drawContents(TQPainter *,int,int,int,int);
virtual void contentsMousePressEvent(TQMouseEvent *);
virtual void contentsMouseReleaseEvent(TQMouseEvent *);
virtual void contentsMouseMoveEvent(TQMouseEvent *);
virtual void contentsMouseDoubleClickEvent(TQMouseEvent *);
%End
%If (TQt_3_0_0 -)
void drawContents(TQPainter *,int,int,int,int); void drawContents(TQPainter *,int,int,int,int);
void contentsMousePressEvent(TQMouseEvent *); void contentsMousePressEvent(TQMouseEvent *);
void contentsMouseReleaseEvent(TQMouseEvent *); void contentsMouseReleaseEvent(TQMouseEvent *);
void contentsMouseMoveEvent(TQMouseEvent *); void contentsMouseMoveEvent(TQMouseEvent *);
void contentsMouseDoubleClickEvent(TQMouseEvent *); void contentsMouseDoubleClickEvent(TQMouseEvent *);
void contentsContextMenuEvent(TQContextMenuEvent *); void contentsContextMenuEvent(TQContextMenuEvent *);
%End
%If (- TQt_3_0_0)
%If (TQt_DRAGANDDROP)
virtual void contentsDragEnterEvent(TQDragEnterEvent *);
virtual void contentsDragMoveEvent(TQDragMoveEvent *);
virtual void contentsDragLeaveEvent(TQDragLeaveEvent *);
virtual void contentsDropEvent(TQDropEvent *);
%End
virtual void resizeEvent(TQResizeEvent *);
virtual void keyPressEvent(TQKeyEvent *);
virtual void focusInEvent(TQFocusEvent *);
virtual void focusOutEvent(TQFocusEvent *);
virtual void enterEvent(TQEvent *);
%End
%If (TQt_3_0_0 -)
%If (TQt_DRAGANDDROP) %If (TQt_DRAGANDDROP)
void contentsDragEnterEvent(TQDragEnterEvent *); void contentsDragEnterEvent(TQDragEnterEvent *);
void contentsDragMoveEvent(TQDragMoveEvent *); void contentsDragMoveEvent(TQDragMoveEvent *);
@ -424,7 +357,6 @@ protected:
void focusInEvent(TQFocusEvent *); void focusInEvent(TQFocusEvent *);
void focusOutEvent(TQFocusEvent *); void focusOutEvent(TQFocusEvent *);
void enterEvent(TQEvent *); void enterEvent(TQEvent *);
%End
virtual void drawRubber(TQPainter *); virtual void drawRubber(TQPainter *);
%If (TQt_DRAGANDDROP) %If (TQt_DRAGANDDROP)
@ -437,21 +369,13 @@ protected:
void emitSelectionChanged(TQIconViewItem * = 0); void emitSelectionChanged(TQIconViewItem * = 0);
void emitRenamed(TQIconViewItem *); void emitRenamed(TQIconViewItem *);
%If (- TQt_3_0_0)
// TQIconViewItem *makeRowLayout(TQIconViewItem *,int &);
%End
%If (TQt_3_0_0 -)
// TQIconViewItem *makeRowLayout(TQIconViewItem *,int &,bool &); // TQIconViewItem *makeRowLayout(TQIconViewItem *,int &,bool &);
%End
void styleChange(TQStyle &); void styleChange(TQStyle &);
%If (TQt_3_0_0 -)
void windowActivationChange(bool); void windowActivationChange(bool);
%End
private: private:
TQIconView(const TQIconView &); TQIconView(const TQIconView &);
}; };
%End %End
%End

@ -149,12 +149,7 @@ public:
TQImage(); TQImage();
TQImage(int,int,int,int = 0,Endian = IgnoreEndian); TQImage(int,int,int,int = 0,Endian = IgnoreEndian);
TQImage(const TQSize &,int,int = 0,Endian = IgnoreEndian); TQImage(const TQSize &,int,int = 0,Endian = IgnoreEndian);
%If (- TQt_2_00)
TQImage(const char *,char * = 0);
%End
%If (TQt_2_00 -)
TQImage(const TQString &,char * = 0); TQImage(const TQString &,char * = 0);
%End
TQImage(SIP_PYLIST) [(const char **)]; TQImage(SIP_PYLIST) [(const char **)];
%MethodCode %MethodCode
@ -177,11 +172,8 @@ public:
} }
%End %End
%If (TQt_2_00 -)
TQImage(const TQByteArray &); TQImage(const TQByteArray &);
%End
%If (TQt_2_1_0 -)
TQImage(uchar *,int,int,int,SIP_PYLIST /AllowNone/,int,Endian) [(uchar *,int,int,int,int,TQRgb *,int,Endian)]; TQImage(uchar *,int,int,int,SIP_PYLIST /AllowNone/,int,Endian) [(uchar *,int,int,int,int,TQRgb *,int,Endian)];
%MethodCode %MethodCode
// The Python interface takes a list of TQRgb instances. // The Python interface takes a list of TQRgb instances.
@ -234,7 +226,6 @@ public:
} }
Py_END_ALLOW_THREADS Py_END_ALLOW_THREADS
} }
%End
%End %End
TQImage(const TQImage &); TQImage(const TQImage &);
@ -245,15 +236,8 @@ public:
void detach(); void detach();
TQImage copy() const; TQImage copy() const;
TQImage copy(int,int,int,int,int = 0) const; TQImage copy(int,int,int,int,int = 0) const;
%If (- TQt_3_0_0)
TQImage copy(TQRect &) const;
%End
%If (TQt_3_0_0 -)
TQImage copy(const TQRect &) const; TQImage copy(const TQRect &) const;
%End
%If (TQt_3_1_0 -)
static TQImage fromMimeSource(const TQString &); static TQImage fromMimeSource(const TQString &);
%End
bool isNull() const; bool isNull() const;
int width() const; int width() const;
@ -290,19 +274,13 @@ public:
void reset(); void reset();
void fill(uint); void fill(uint);
%If (TQt_2_00 -)
void invertPixels(bool = 1); void invertPixels(bool = 1);
%End
TQImage convertDepth(int) const; TQImage convertDepth(int) const;
// TQImage convertDepthWithPalette(int,TQRgb *,int,int = 0) const; // TQImage convertDepthWithPalette(int,TQRgb *,int,int = 0) const;
TQImage convertDepth(int,int) const; TQImage convertDepth(int,int) const;
TQImage convertBitOrder(Endian) const; TQImage convertBitOrder(Endian) const;
%If (- TQt_3_0_0)
TQImage smoothScale(int,int) const;
%End
%If (TQt_3_0_0 -)
enum ScaleMode { enum ScaleMode {
ScaleFree, ScaleFree,
ScaleMin, ScaleMin,
@ -316,72 +294,33 @@ public:
TQImage scaleWidth(int) const; TQImage scaleWidth(int) const;
TQImage scaleHeight(int) const; TQImage scaleHeight(int) const;
TQImage xForm(const TQWMatrix &) const; TQImage xForm(const TQWMatrix &) const;
%End
%If (- TQt_2_00)
TQImage createAlphaMask(bool = 0) const;
TQImage createAlphaMask(int) const;
%End
%If (TQt_2_00 -)
TQImage createAlphaMask(int = 0) const; TQImage createAlphaMask(int = 0) const;
%End
TQImage createHeuristicMask(bool = 1) const; TQImage createHeuristicMask(bool = 1) const;
%If (TQt_2_00 -)
TQImage mirror() const; TQImage mirror() const;
%End
%If (TQt_2_1_0 -)
TQImage mirror(bool,bool) const; TQImage mirror(bool,bool) const;
%End
%If (TQt_2_00 -)
TQImage swapRGB() const; TQImage swapRGB() const;
%End
static Endian systemBitOrder(); static Endian systemBitOrder();
static Endian systemByteOrder(); static Endian systemByteOrder();
%If (- TQt_2_00)
static const char *imageFormat(const char *);
%End
%If (TQt_2_00 -)
static const char *imageFormat(const TQString &); static const char *imageFormat(const TQString &);
%End
static TQStrList inputFormats(); static TQStrList inputFormats();
static TQStrList outputFormats(); static TQStrList outputFormats();
%If (TQt_2_1_0 -)
static TQStringList inputFormatList(); static TQStringList inputFormatList();
static TQStringList outputFormatList(); static TQStringList outputFormatList();
%End
%If (- TQt_2_00)
bool load(const char *,const char * = 0);
%End
%If (TQt_2_00 -)
bool load(const TQString &,const char * = 0); bool load(const TQString &,const char * = 0);
%End
bool loadFromData(const uchar * /Array/,uint /ArraySize/, bool loadFromData(const uchar * /Array/,uint /ArraySize/,
const char * = 0); const char * = 0);
bool loadFromData(TQByteArray,char * = 0); bool loadFromData(TQByteArray,char * = 0);
%If (- TQt_2_00)
bool save(const char *,const char *) const;
%End
%If (TQt_2_00 - TQt_3_0_0)
bool save(const TQString &,const char *) const;
%End
%If (TQt_2_2_0 - TQt_3_0_0)
bool save(const TQString &,const char *,int) const;
%End
%If (TQt_3_0_0 -)
bool save(const TQString &,const char *,int = -1) const; bool save(const TQString &,const char *,int = -1) const;
%End
%If (TQt_3_2_0 -)
bool save(TQIODevice *,const char *,int = -1) const; bool save(TQIODevice *,const char *,int = -1) const;
%End
bool valid(int,int) const; bool valid(int,int) const;
int pixelIndex(int,int) const; int pixelIndex(int,int) const;
TQRgb pixel(int,int) const; TQRgb pixel(int,int) const;
void setPixel(int,int,uint); void setPixel(int,int,uint);
%If (TQt_2_1_0 -)
int dotsPerMeterX() const; int dotsPerMeterX() const;
int dotsPerMeterY() const; int dotsPerMeterY() const;
void setDotsPerMeterX(int); void setDotsPerMeterX(int);
@ -396,7 +335,6 @@ public:
TQString text(const TQImageTextKeyLang &) const; TQString text(const TQImageTextKeyLang &) const;
void setText(const char *,const char *,const TQString &); void setText(const char *,const char *,const TQString &);
%End %End
%End
}; };
@ -413,60 +351,27 @@ class TQImageIO
public: public:
TQImageIO(); TQImageIO();
TQImageIO(TQIODevice *,const char *); TQImageIO(TQIODevice *,const char *);
%If (TQt_2_00 -)
TQImageIO(const TQString &,const char *); TQImageIO(const TQString &,const char *);
%End
%If (- TQt_2_00)
TQImageIO(const char *,const char *);
%End
const TQImage &image() const; const TQImage &image() const;
int status() const; int status() const;
const char *format() const; const char *format() const;
TQIODevice *ioDevice() const; TQIODevice *ioDevice() const;
%If (TQt_2_00 -)
TQString fileName() const; TQString fileName() const;
%End
%If (- TQt_2_00)
const char *fileName() const;
%End
%If (TQt_3_0_0 -)
int quality() const; int quality() const;
%End
%If (TQt_2_00 -)
TQString description() const; TQString description() const;
%End
%If (- TQt_2_00)
const char *description() const;
%End
const char *parameters() const; const char *parameters() const;
%If (TQt_3_0_0 -)
float gamma() const; float gamma() const;
%End
void setImage(const TQImage &); void setImage(const TQImage &);
void setStatus(int); void setStatus(int);
void setFormat(const char *); void setFormat(const char *);
void setIODevice(TQIODevice *); void setIODevice(TQIODevice *);
%If (TQt_2_00 -)
void setFileName(const TQString &); void setFileName(const TQString &);
%End
%If (- TQt_2_00)
void setFileName(const char *);
%End
%If (TQt_3_0_0 -)
void setQuality(int); void setQuality(int);
%End
%If (TQt_2_00 -)
void setDescription(const TQString &); void setDescription(const TQString &);
%End
%If (- TQt_2_00)
void setDescription(const char *);
%End
void setParameters(const char *); void setParameters(const char *);
%If (TQt_3_0_0 -)
void setGamma(float); void setGamma(float);
%End
bool read(); bool read();
bool write(); bool write();
@ -484,7 +389,6 @@ private:
}; };
%If (TQt_2_1_0 -)
%If (TQt_IMAGE_TEXT) %If (TQt_IMAGE_TEXT)
class TQImageTextKeyLang class TQImageTextKeyLang
@ -502,7 +406,6 @@ public:
}; };
%End %End
%End
%ModuleHeaderCode %ModuleHeaderCode
@ -515,7 +418,7 @@ const char **PyTQt_qt_ListToArray(PyObject *lst);
// TQPixmap. // TQPixmap.
const char **PyTQt_qt_ListToArray(PyObject *lst) const char **PyTQt_qt_ListToArray(PyObject *lst)
{ {
int nstr; SIP_SSIZE_T nstr;
const char **str, **sp; const char **str, **sp;
nstr = PyList_Size(lst); nstr = PyList_Size(lst);
@ -528,15 +431,16 @@ const char **PyTQt_qt_ListToArray(PyObject *lst)
for (int i = 0; i < nstr; ++i) for (int i = 0; i < nstr; ++i)
{ {
char *s; PyObject *item = PyList_GetItem(lst, i);
const char *item_ascii = sipString_AsASCIIString(&item);
if ((s = PyString_AsString(PyList_GetItem(lst,i))) == NULL) if (item_ascii == NULL)
{ {
sipFree((void *)str); sipFree((void *)str);
return NULL; return NULL;
} }
*sp++ = s; *sp++ = item_ascii;
} }
return str; return str;

@ -122,7 +122,6 @@ the <Literal>TQString</Literal> result and the <Literal>ok</Literal> flag.
%End %End
%If (TQt_2_1_0 -)
%If (TQt_INPUTDIALOG) %If (TQt_INPUTDIALOG)
class TQInputDialog : TQDialog class TQInputDialog : TQDialog
@ -132,25 +131,10 @@ class TQInputDialog : TQDialog
%End %End
public: public:
%If (TQt_3_0_0 -)
static TQString getText(const TQString &,const TQString &, static TQString getText(const TQString &,const TQString &,
TQLineEdit::EchoMode = TQLineEdit::Normal, TQLineEdit::EchoMode = TQLineEdit::Normal,
const TQString & = TQString::null, const TQString & = TQString::null,
bool * = 0,TQWidget * = 0,const char * = 0); bool * = 0,TQWidget * = 0,const char * = 0);
%End
%If (- TQt_3_0_0)
static TQString getText(const TQString &,const TQString &,
const TQString & = TQString::null,
bool * = 0,TQWidget * = 0,const char * = 0);
%End
%If (TQt_2_2_0 - TQt_3_0_0)
static TQString getText(const TQString &,const TQString &,
TQLineEdit::EchoMode,
const TQString & = TQString::null,
bool * = 0,TQWidget * = 0,const char * = 0);
%End
static int getInteger(const TQString &,const TQString &,int = 0, static int getInteger(const TQString &,const TQString &,int = 0,
int = -2147483647,int = 2147483647,int = 1, int = -2147483647,int = 2147483647,int = 1,
@ -171,4 +155,3 @@ private:
}; };
%End %End
%End

@ -72,9 +72,7 @@ const int IO_OpenError;
const int IO_ConnectError; const int IO_ConnectError;
const int IO_AbortError; const int IO_AbortError;
const int IO_TimeOutError; const int IO_TimeOutError;
%If (TQt_2_00 -)
const int IO_UnspecifiedError; const int IO_UnspecifiedError;
%End
class TQIODevice class TQIODevice
@ -84,9 +82,7 @@ class TQIODevice
%End %End
public: public:
%If (TQt_3_0_0 -)
typedef TQ_ULONG Offset; typedef TQ_ULONG Offset;
%End
TQIODevice(); TQIODevice();
@ -114,80 +110,12 @@ public:
virtual void close() = 0; virtual void close() = 0;
virtual void flush() = 0 /ReleaseGIL/; virtual void flush() = 0 /ReleaseGIL/;
%If (- TQt_3_0_0)
virtual uint size() const = 0;
virtual int at() const;
virtual bool at(int);
%End
%If (TQt_3_0_0 -)
virtual Offset size() const = 0; virtual Offset size() const = 0;
virtual Offset at() const; virtual Offset at() const;
virtual bool at(Offset); virtual bool at(Offset);
%End
virtual bool atEnd() const; virtual bool atEnd() const;
bool reset(); bool reset();
%If (- TQt_3_0_0)
virtual SIP_PYOBJECT readBlock(uint) = 0 /ReleaseGIL/ [int (char *,uint)];
%MethodCode
char *buf;
if ((buf = (char *)sipMalloc(a0)) == NULL)
sipIsErr = 1;
else
{
int actlen;
Py_BEGIN_ALLOW_THREADS
actlen = sipCpp -> readBlock(buf,a0);
Py_END_ALLOW_THREADS
if (actlen < 0)
{
sipFree((void *)buf);
Py_INCREF(Py_None);
sipRes = Py_None;
}
else
{
sipRes = PyString_FromStringAndSize(buf,actlen);
sipFree((void *)buf);
if (sipRes == NULL)
sipIsErr = 1;
}
}
%End
%VirtualCatcherCode
PyObject *result = sipCallMethod(&sipIsErr,sipMethod,"i",a1);
if (result != NULL)
{
PyObject *buf;
sipParseResult(&sipIsErr,sipMethod,result,"O",&buf);
if (buf == Py_None)
sipRes = -1;
else if (!PyString_Check(buf))
{
sipBadCatcherResult(sipMethod);
sipIsErr = 1;
}
else
{
memcpy(a0,PyString_AS_STRING(buf),PyString_GET_SIZE(buf));
sipRes = PyString_GET_SIZE(buf);
}
Py_DECREF(buf);
Py_DECREF(result);
}
%End
%End
%If (TQt_3_0_0 -)
virtual SIP_PYOBJECT readBlock(TQ_ULONG) = 0 /ReleaseGIL/ [TQ_LONG (char *,TQ_ULONG)]; virtual SIP_PYOBJECT readBlock(TQ_ULONG) = 0 /ReleaseGIL/ [TQ_LONG (char *,TQ_ULONG)];
%MethodCode %MethodCode
char *buf; char *buf;
@ -211,7 +139,7 @@ public:
} }
else else
{ {
sipRes = PyString_FromStringAndSize(buf,actlen); sipRes = SIPBytes_FromStringAndSize(buf,actlen);
sipFree((void *)buf); sipFree((void *)buf);
@ -231,93 +159,25 @@ public:
if (buf == Py_None) if (buf == Py_None)
sipRes = -1L; sipRes = -1L;
else if (!PyString_Check(buf)) else if (!SIPBytes_Check(buf))
{ {
sipBadCatcherResult(sipMethod); sipBadCatcherResult(sipMethod);
sipIsErr = 1; sipIsErr = 1;
} }
else else
{ {
memcpy(a0,PyString_AS_STRING(buf),PyString_GET_SIZE(buf)); memcpy(a0,SIPBytes_AS_STRING(buf),SIPBytes_GET_SIZE(buf));
sipRes = PyString_GET_SIZE(buf); sipRes = SIPBytes_GET_SIZE(buf);
} }
Py_DECREF(buf); Py_DECREF(buf);
Py_DECREF(result); Py_DECREF(result);
} }
%End %End
%End
%If (- TQt_3_0_0)
virtual int writeBlock(const char * /Array/,
uint /ArraySize/) = 0 /ReleaseGIL/;
%End
%If (TQt_3_0_0 -)
virtual TQ_LONG writeBlock(const char * /Array/, virtual TQ_LONG writeBlock(const char * /Array/,
TQ_ULONG /ArraySize/) = 0 /ReleaseGIL/; TQ_ULONG /ArraySize/) = 0 /ReleaseGIL/;
%End
%If (- TQt_3_0_0)
virtual SIP_PYOBJECT readLine(uint) /ReleaseGIL/ [int (char *,uint)];
%MethodCode
char *buf;
if ((buf = (char *)sipMalloc(a0)) == NULL)
sipIsErr = 1;
else
{
int actlen;
Py_BEGIN_ALLOW_THREADS
actlen = sipSelfWasArg ? sipCpp->TQIODevice::readLine(buf, a0) : sipCpp->readLine(buf, a0);
Py_END_ALLOW_THREADS
if (actlen < 0)
{
sipFree((void *)buf);
Py_INCREF(Py_None);
sipRes = Py_None;
}
else
{
sipRes = PyString_FromStringAndSize(buf,actlen);
sipFree((void *)buf);
if (sipRes == NULL)
sipIsErr = 1;
}
}
%End
%VirtualCatcherCode
PyObject *result = sipCallMethod(&sipIsErr,sipMethod,"i",a1);
if (result != NULL)
{
PyObject *buf;
sipParseResult(&sipIsErr,sipMethod,result,"O",&buf);
if (buf == Py_None)
sipRes = -1;
else if (!PyString_Check(buf))
{
sipBadCatcherResult(sipMethod);
sipIsErr = 1;
}
else
{
memcpy(a0,PyString_AS_STRING(buf),PyString_GET_SIZE(buf));
sipRes = PyString_GET_SIZE(buf);
}
Py_DECREF(buf);
Py_DECREF(result);
}
%End
%End
%If (TQt_3_0_0 -)
virtual SIP_PYOBJECT readLine(TQ_ULONG) /ReleaseGIL/ [TQ_LONG (char *,TQ_ULONG)]; virtual SIP_PYOBJECT readLine(TQ_ULONG) /ReleaseGIL/ [TQ_LONG (char *,TQ_ULONG)];
%MethodCode %MethodCode
char *buf; char *buf;
@ -341,7 +201,7 @@ public:
} }
else else
{ {
sipRes = PyString_FromStringAndSize(buf,actlen); sipRes = SIPBytes_FromStringAndSize(buf,actlen);
sipFree((void *)buf); sipFree((void *)buf);
@ -361,36 +221,25 @@ public:
if (buf == Py_None) if (buf == Py_None)
sipRes = -1L; sipRes = -1L;
else if (!PyString_Check(buf)) else if (!SIPBytes_Check(buf))
{ {
sipBadCatcherResult(sipMethod); sipBadCatcherResult(sipMethod);
sipIsErr = 1; sipIsErr = 1;
} }
else else
{ {
memcpy(a0,PyString_AS_STRING(buf),PyString_GET_SIZE(buf)); memcpy(a0,SIPBytes_AS_STRING(buf),SIPBytes_GET_SIZE(buf));
sipRes = PyString_GET_SIZE(buf); sipRes = SIPBytes_GET_SIZE(buf);
} }
Py_DECREF(buf); Py_DECREF(buf);
Py_DECREF(result); Py_DECREF(result);
} }
%End %End
%End
%If (TQt_2_00 - TQt_3_0_0)
int writeBlock(const TQByteArray &) /ReleaseGIL/;
%End
%If (TQt_3_0_0 -)
TQ_LONG writeBlock(const TQByteArray &) /ReleaseGIL/; TQ_LONG writeBlock(const TQByteArray &) /ReleaseGIL/;
%End
%If (TQt_2_00 - TQt_3_0_0)
TQByteArray readAll() /ReleaseGIL/;
%End
%If (TQt_3_0_0 -)
virtual TQByteArray readAll() /ReleaseGIL/; virtual TQByteArray readAll() /ReleaseGIL/;
%End
virtual int getch() = 0 /ReleaseGIL/; virtual int getch() = 0 /ReleaseGIL/;
virtual int putch(int) = 0 /ReleaseGIL/; virtual int putch(int) = 0 /ReleaseGIL/;

@ -1,286 +0,0 @@
// This is the SIP interface definition for the key code definitions.
//
// 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.
%If (- TQt_2_00)
%ModuleHeaderCode
#include <tqkeycode.h>
%End
// Accelerator modifiers.
const uint SHIFT;
const uint CTRL;
const uint ALT;
const uint ASCII_ACCEL;
// Miscellaneous keys.
const int Key_Escape;
const int Key_Tab;
const int Key_Backtab;
const int Key_Backspace;
const int Key_Return;
const int Key_Enter;
const int Key_Insert;
const int Key_Delete;
const int Key_Pause;
const int Key_Print;
const int Key_SysReq;
// Cursor keys.
const int Key_Home;
const int Key_End;
const int Key_Left;
const int Key_Up;
const int Key_Right;
const int Key_Down;
const int Key_Prior;
const int Key_PageUp;
const int Key_Next;
const int Key_PageDown;
// Modifiers.
const int Key_Shift;
const int Key_Control;
const int Key_Meta;
const int Key_Alt;
const int Key_CapsLock;
const int Key_NumLock;
const int Key_ScrollLock;
// Function keys.
const int Key_F1;
const int Key_F2;
const int Key_F3;
const int Key_F4;
const int Key_F5;
const int Key_F6;
const int Key_F7;
const int Key_F8;
const int Key_F9;
const int Key_F10;
const int Key_F11;
const int Key_F12;
const int Key_F13;
const int Key_F14;
const int Key_F15;
const int Key_F16;
const int Key_F17;
const int Key_F18;
const int Key_F19;
const int Key_F20;
const int Key_F21;
const int Key_F22;
const int Key_F23;
const int Key_F24;
const int Key_F25;
const int Key_F26;
const int Key_F27;
const int Key_F28;
const int Key_F29;
const int Key_F30;
const int Key_F31;
const int Key_F32;
const int Key_F33;
const int Key_F34;
const int Key_F35;
// Extra keys.
const int Key_Super_L;
const int Key_Super_R;
const int Key_Menu;
%If (TQt_1_43 -)
const int Key_Hyper_L;
const int Key_Hyper_R;
%End
// The 7 bit printable ASCII keys.
const int Key_Space;
const int Key_Exclam;
const int Key_QuoteDbl;
const int Key_NumberSign;
const int Key_Dollar;
const int Key_Percent;
const int Key_Ampersand;
const int Key_Apostrophe;
const int Key_ParenLeft;
const int Key_ParenRight;
const int Key_Asterisk;
const int Key_Plus;
const int Key_Comma;
const int Key_Minus;
const int Key_Period;
const int Key_Slash;
const int Key_0;
const int Key_1;
const int Key_2;
const int Key_3;
const int Key_4;
const int Key_5;
const int Key_6;
const int Key_7;
const int Key_8;
const int Key_9;
const int Key_Colon;
const int Key_Semicolon;
const int Key_Less;
const int Key_Equal;
const int Key_Greater;
const int Key_Question;
const int Key_At;
const int Key_A;
const int Key_B;
const int Key_C;
const int Key_D;
const int Key_E;
const int Key_F;
const int Key_G;
const int Key_H;
const int Key_I;
const int Key_J;
const int Key_K;
const int Key_L;
const int Key_M;
const int Key_N;
const int Key_O;
const int Key_P;
const int Key_Q;
const int Key_R;
const int Key_S;
const int Key_T;
const int Key_U;
const int Key_V;
const int Key_W;
const int Key_X;
const int Key_Y;
const int Key_Z;
const int Key_BracketLeft;
const int Key_Backslash;
const int Key_BracketRight;
const int Key_AsciiCircum;
const int Key_Underscore;
const int Key_QuoteLeft;
const int Key_BraceLeft;
const int Key_Bar;
const int Key_BraceRight;
const int Key_AsciiTilde;
// Latin 1 codes.
const int Key_nobreakspace;
const int Key_exclamdown;
const int Key_cent;
const int Key_sterling;
const int Key_currency;
const int Key_yen;
const int Key_brokenbar;
const int Key_section;
const int Key_diaeresis;
const int Key_copyright;
const int Key_ordfeminine;
const int Key_guillemotleft;
const int Key_notsign;
const int Key_hyphen;
const int Key_registered;
const int Key_macron;
const int Key_degree;
const int Key_plusminus;
const int Key_twosuperior;
const int Key_threesuperior;
const int Key_acute;
const int Key_mu;
const int Key_paragraph;
const int Key_periodcentered;
const int Key_cedilla;
const int Key_onesuperior;
const int Key_masculine;
const int Key_guillemotright;
const int Key_onequarter;
const int Key_onehalf;
const int Key_threequarters;
const int Key_questiondown;
const int Key_Agrave;
const int Key_Aacute;
const int Key_Acircumflex;
const int Key_Atilde;
const int Key_Adiaeresis;
const int Key_Aring;
const int Key_AE;
const int Key_Ccedilla;
const int Key_Egrave;
const int Key_Eacute;
const int Key_Ecircumflex;
const int Key_Ediaeresis;
const int Key_Igrave;
const int Key_Iacute;
const int Key_Icircumflex;
const int Key_Idiaeresis;
const int Key_ETH;
const int Key_Ntilde;
const int Key_Ograve;
const int Key_Oacute;
const int Key_Ocircumflex;
const int Key_Otilde;
const int Key_Odiaeresis;
const int Key_multiply;
const int Key_Ooblique;
const int Key_Ugrave;
const int Key_Uacute;
const int Key_Ucircumflex;
const int Key_Udiaeresis;
const int Key_Yacute;
const int Key_THORN;
const int Key_ssharp;
const int Key_agrave;
const int Key_aacute;
const int Key_acircumflex;
const int Key_atilde;
const int Key_adiaeresis;
const int Key_aring;
const int Key_ae;
const int Key_ccedilla;
const int Key_egrave;
const int Key_eacute;
const int Key_ecircumflex;
const int Key_ediaeresis;
const int Key_igrave;
const int Key_iacute;
const int Key_icircumflex;
const int Key_idiaeresis;
const int Key_eth;
const int Key_ntilde;
const int Key_ograve;
const int Key_oacute;
const int Key_ocircumflex;
const int Key_otilde;
const int Key_odiaeresis;
const int Key_division;
const int Key_oslash;
const int Key_ugrave;
const int Key_uacute;
const int Key_ucircumflex;
const int Key_udiaeresis;
const int Key_yacute;
const int Key_thorn;
const int Key_ydiaeresis;
const int Key_unknown;
%End

@ -32,8 +32,6 @@ integer may be used whenever a <Literal>TQKeySequence</Literal> can be used.
%End %End
%If (TQt_3_0_0 -)
class TQKeySequence : TQt class TQKeySequence : TQt
{ {
%TypeHeaderCode %TypeHeaderCode
@ -44,7 +42,6 @@ public:
TQKeySequence(); TQKeySequence();
TQKeySequence(const TQString &); TQKeySequence(const TQString &);
TQKeySequence(int); TQKeySequence(int);
%If (TQt_3_1_0 -)
TQKeySequence(int,int,int = 0,int = 0); TQKeySequence(int,int,int = 0,int = 0);
bool operator==(const TQKeySequence &) const; bool operator==(const TQKeySequence &) const;
@ -53,7 +50,6 @@ public:
uint count() const; uint count() const;
bool isEmpty() const; bool isEmpty() const;
TQt::SequenceMatch matches(const TQKeySequence &) const; TQt::SequenceMatch matches(const TQKeySequence &) const;
%End
int __int__() const; int __int__() const;
@ -71,7 +67,7 @@ public:
PyErr_Clear(); PyErr_Clear();
PyInt_AsLong(sipPy); PyLong_AsLong(sipPy);
return !PyErr_Occurred(); return !PyErr_Occurred();
} }
@ -106,7 +102,7 @@ public:
return sipGetState(sipTransferObj); return sipGetState(sipTransferObj);
} }
int key = PyInt_AsLong(sipPy); int key = (int)PyLong_AsLong(sipPy);
Py_BEGIN_ALLOW_THREADS Py_BEGIN_ALLOW_THREADS
*sipCppPtr = new TQKeySequence(key); *sipCppPtr = new TQKeySequence(key);
@ -115,5 +111,3 @@ public:
return sipGetState(sipTransferObj); return sipGetState(sipTransferObj);
%End %End
}; };
%End

@ -19,6 +19,7 @@
// 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.
%DefaultEncoding "UTF-8"
%ExportedDoc %ExportedDoc
<Sect2><Title>TQLabel</Title> <Sect2><Title>TQLabel</Title>
@ -36,121 +37,48 @@ class TQLabel : TQFrame
%End %End
public: public:
%If (- TQt_2_00)
TQLabel(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0);
TQLabel(const char *,TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0);
TQLabel(TQWidget *,const char *,TQWidget * /TransferThis/,const char * = 0,WFlags = 0);
%End
%If (TQt_2_00 -)
TQLabel(TQWidget * /TransferThis/,const char * = 0,WFlags = 0); TQLabel(TQWidget * /TransferThis/,const char * = 0,WFlags = 0);
TQLabel(const TQString &,TQWidget * /TransferThis/,const char * = 0,WFlags = 0); TQLabel(const TQString &,TQWidget * /TransferThis/,const char * = 0,WFlags = 0);
TQLabel(TQWidget *,const TQString &,TQWidget * /TransferThis/,const char * = 0,WFlags = 0); TQLabel(TQWidget *,const TQString &,TQWidget * /TransferThis/,const char * = 0,WFlags = 0);
%End
%If (- TQt_2_00)
const char *text() const;
%End
%If (TQt_2_00 -)
TQString text() const; TQString text() const;
%End
TQPixmap *pixmap() const; TQPixmap *pixmap() const;
%If (TQt_3_0_0 -)
TQPicture *picture() const; TQPicture *picture() const;
%End
TQMovie *movie() const; TQMovie *movie() const;
%If (TQt_2_00 -)
TextFormat textFormat() const; TextFormat textFormat() const;
void setTextFormat(TextFormat); void setTextFormat(TextFormat);
%End
int alignment() const; int alignment() const;
%If (- TQt_2_00)
void setAlignment(int);
%End
%If (TQt_2_00 -)
virtual void setAlignment(int); virtual void setAlignment(int);
%End
%If (- TQt_2_00)
int margin() const;
void setMargin(int);
%End
%If (TQt_2_00 -)
int indent() const; int indent() const;
void setIndent(int); void setIndent(int);
%End
bool autoResize() const; bool autoResize() const;
%If (- TQt_2_00)
void setAutoResize(bool);
%End
%If (TQt_2_00 -)
virtual void setAutoResize(bool); virtual void setAutoResize(bool);
%End
%If (TQt_2_2_0 -)
bool hasScaledContents() const; bool hasScaledContents() const;
void setScaledContents(bool); void setScaledContents(bool);
%End
%If (TQt_2_00 - TQt_3_0_0)
TQSizePolicy sizePolicy() const;
%End
TQSize sizeHint() const; TQSize sizeHint() const;
%If (TQt_2_1_0 -)
TQSize minimumSizeHint() const; TQSize minimumSizeHint() const;
%End
%If (- TQt_2_00)
void setBuddy(TQWidget *);
%End
%If (TQt_2_00 -)
virtual void setBuddy(TQWidget *); virtual void setBuddy(TQWidget *);
%End
TQWidget *buddy() const; TQWidget *buddy() const;
%If (TQt_2_00 - TQt_3_0_0)
void setAutoMask(bool);
%End
%If (TQt_2_00 -)
int heightForWidth(int) const; int heightForWidth(int) const;
%End
%If (TQt_3_0_0 -)
void setFont(const TQFont &); void setFont(const TQFont &);
%End
public slots: public slots:
%If (- TQt_2_00)
void setText(const char *);
void setPixmap(const TQPixmap &);
%End
%If (TQt_2_00 -)
virtual void setText(const TQString &); virtual void setText(const TQString &);
virtual void setPixmap(const TQPixmap &); virtual void setPixmap(const TQPixmap &);
%End
%If (TQt_3_0_0 -)
virtual void setPicture(const TQPicture &); virtual void setPicture(const TQPicture &);
%End
%If (- TQt_2_00)
void setMovie(const TQMovie &);
void setNum(int /Constrained/);
void setNum(double);
%End
%If (TQt_2_00 -)
virtual void setMovie(const TQMovie &); virtual void setMovie(const TQMovie &);
virtual void setNum(int /Constrained/); virtual void setNum(int /Constrained/);
virtual void setNum(double); virtual void setNum(double);
%End
void clear(); void clear();
protected: protected:
void drawContents(TQPainter *); void drawContents(TQPainter *);
%If (TQt_2_00 - TQt_3_0_0)
void drawContentsMask(TQPainter *);
%End
%If (TQt_2_1_0 -)
void fontChange(const TQFont &); void fontChange(const TQFont &);
%End
%If (TQt_2_2_0 -)
void resizeEvent(TQResizeEvent *); void resizeEvent(TQResizeEvent *);
%End
private: private:
TQLabel(const TQLabel &); TQLabel(const TQLabel &);

@ -98,46 +98,6 @@ This is a wrapper around the <Literal>TQLayoutIterator</Literal>
%End %End
%If (- TQt_2_00)
class TQLayout : TQObject
{
%TypeHeaderCode
#include <tqlayout.h>
%End
public:
enum
{
unlimited = TQCOORD_MAX
};
int defaultBorder() const;
virtual bool activate();
void freeze(int,int);
void freeze();
void setMenuBar(TQMenuBar *);
TQWidget *mainWidget();
protected:
TQLayout(TQWidget * /TransferThis/,int,int,const char *);
TQLayout(int = -1,const char * = 0);
TQGManager *basicManager();
virtual TQChain *mainVerticalChain() = 0;
virtual TQChain *mainHorizontalChain() = 0;
virtual void initGM() = 0;
void addChildLayout(TQLayout *);
private:
TQLayout(const TQLayout &);
};
%End
%If (TQt_2_00 -)
class TQGLayoutIterator class TQGLayoutIterator
{ {
%TypeHeaderCode %TypeHeaderCode
@ -272,9 +232,7 @@ public:
FreeResize, FreeResize,
Minimum, Minimum,
Fixed, Fixed,
%If (TQt_3_1_0 -)
Auto Auto
%End
}; };
TQLayout(TQWidget * /TransferThis/,int = 0,int = -1,const char * = 0); TQLayout(TQWidget * /TransferThis/,int = 0,int = -1,const char * = 0);
@ -287,17 +245,9 @@ public:
virtual void setMargin(int); virtual void setMargin(int);
virtual void setSpacing(int); virtual void setSpacing(int);
%If (- TQt_3_1_0)
enum {
unlimited
};
%End
%If (TQt_3_0_0 -)
int defaultBorder() const; int defaultBorder() const;
void freeze(int,int); void freeze(int,int);
void freeze(); void freeze();
%End
void setResizeMode(ResizeMode); void setResizeMode(ResizeMode);
ResizeMode resizeMode() const; ResizeMode resizeMode() const;
@ -311,19 +261,15 @@ public:
virtual void setAutoAdd(bool); virtual void setAutoAdd(bool);
bool autoAdd() const; bool autoAdd() const;
%If (TQt_2_1_0 -)
void invalidate(); void invalidate();
%End
TQRect geometry() const; TQRect geometry() const;
bool activate(); bool activate();
void add(TQWidget *); void add(TQWidget *);
virtual void addItem(TQLayoutItem * /Transfer/) = 0; virtual void addItem(TQLayoutItem * /Transfer/) = 0;
%If (TQt_3_1_0 -)
void remove(TQWidget *); void remove(TQWidget *);
void removeItem(TQLayoutItem * /TransferBack/); void removeItem(TQLayoutItem * /TransferBack/);
%End
TQSizePolicy::ExpandData expanding() const; TQSizePolicy::ExpandData expanding() const;
TQSize minimumSize() const; TQSize minimumSize() const;
@ -338,34 +284,24 @@ public:
TQSize totalSizeHint() const; TQSize totalSizeHint() const;
TQLayout *layout(); TQLayout *layout();
%If (TQt_2_1_0 -)
bool supportsMargin() const; bool supportsMargin() const;
%End
%If (TQt_2_2_0 -)
void setEnabled(bool); void setEnabled(bool);
bool isEnabled() const; bool isEnabled() const;
%End
protected: protected:
bool eventFilter(TQObject *,TQEvent *); bool eventFilter(TQObject *,TQEvent *);
%If (TQt_3_0_0 -)
void childEvent(TQChildEvent *); void childEvent(TQChildEvent *);
%End
void addChildLayout(TQLayout *); void addChildLayout(TQLayout *);
void deleteAllItems(); void deleteAllItems();
%If (TQt_2_1_0 -)
void setSupportsMargin(bool); void setSupportsMargin(bool);
TQRect alignmentRect(const TQRect &) const; TQRect alignmentRect(const TQRect &) const;
%End
private: private:
TQLayout(const TQLayout &); TQLayout(const TQLayout &);
}; };
%End
class TQGridLayout : TQLayout class TQGridLayout : TQLayout
{ {
@ -374,81 +310,47 @@ class TQGridLayout : TQLayout
%End %End
public: public:
%If (- TQt_2_1_0)
TQGridLayout(TQWidget * /TransferThis/,int,int,int = 0,int = -1,const char * = 0);
TQGridLayout(int,int,int = -1,const char * = 0);
%End
%If (TQt_2_00 - TQt_2_1_0)
TQGridLayout(TQLayout * /TransferThis/,int,int,int = -1,const char * = 0);
%End
%If (TQt_2_1_0 -)
TQGridLayout(TQWidget * /TransferThis/,int = 1,int = 1,int = 0,int = -1,const char * = 0); TQGridLayout(TQWidget * /TransferThis/,int = 1,int = 1,int = 0,int = -1,const char * = 0);
TQGridLayout(int = 1,int = 1,int = -1,const char * = 0); TQGridLayout(int = 1,int = 1,int = -1,const char * = 0);
TQGridLayout(TQLayout * /TransferThis/,int = 1,int = 1,int = -1,const char * = 0); TQGridLayout(TQLayout * /TransferThis/,int = 1,int = 1,int = -1,const char * = 0);
%End
%If (TQt_2_00 -)
TQSize sizeHint() const; TQSize sizeHint() const;
TQSize minimumSize() const; TQSize minimumSize() const;
TQSize maximumSize() const; TQSize maximumSize() const;
%End
%If (- TQt_2_00)
void setRowStretch(int,int);
void setColStretch(int,int);
%End
%If (TQt_2_00 -)
virtual void setRowStretch(int,int); virtual void setRowStretch(int,int);
virtual void setColStretch(int,int); virtual void setColStretch(int,int);
%End
%If (TQt_2_1_0 -)
int rowStretch(int) const; int rowStretch(int) const;
int colStretch(int) const; int colStretch(int) const;
%End
%If (TQt_3_2_0 -)
void setRowSpacing(int,int); void setRowSpacing(int,int);
void setColSpacing(int,int); void setColSpacing(int,int);
int rowSpacing(int) const; int rowSpacing(int) const;
int colSpacing(int) const; int colSpacing(int) const;
%End
int numRows() const; int numRows() const;
int numCols() const; int numCols() const;
%If (TQt_2_1_0 -)
TQRect cellGeometry(int,int) const; TQRect cellGeometry(int,int) const;
%End
%If (TQt_2_00 -)
bool hasHeightForWidth() const; bool hasHeightForWidth() const;
int heightForWidth(int) const; int heightForWidth(int) const;
%If (TQt_3_1_0 -)
int minimumHeightForWidth(int) const; int minimumHeightForWidth(int) const;
%End
TQSizePolicy::ExpandData expanding() const; TQSizePolicy::ExpandData expanding() const;
void invalidate(); void invalidate();
void addItem(TQLayoutItem * /Transfer/); void addItem(TQLayoutItem * /Transfer/);
%End
%If (TQt_2_1_0 -)
void addItem(TQLayoutItem * /Transfer/,int,int); void addItem(TQLayoutItem * /Transfer/,int,int);
%End
%If (TQt_2_00 -)
void addMultiCell(TQLayoutItem * /Transfer/,int,int,int,int,int = 0); void addMultiCell(TQLayoutItem * /Transfer/,int,int,int,int,int = 0);
%End
void addWidget(TQWidget *,int,int,int = 0); void addWidget(TQWidget *,int,int,int = 0);
void addMultiCellWidget(TQWidget *,int,int,int,int,int = 0); void addMultiCellWidget(TQWidget *,int,int,int,int,int = 0);
void addLayout(TQLayout * /Transfer/,int,int); void addLayout(TQLayout * /Transfer/,int,int);
%If (TQt_2_2_0 -)
void addMultiCellLayout(TQLayout * /Transfer/,int,int,int,int,int = 0); void addMultiCellLayout(TQLayout * /Transfer/,int,int,int,int,int = 0);
%End
void addRowSpacing(int,int); void addRowSpacing(int,int);
void addColSpacing(int,int); void addColSpacing(int,int);
void expand(int,int); void expand(int,int);
%If (TQt_2_00 -)
enum Corner { enum Corner {
TopLeft, TopLeft,
TopRight, TopRight,
@ -457,26 +359,13 @@ public:
}; };
void setOrigin(Corner); void setOrigin(Corner);
%End
%If (TQt_3_0_0 -)
Corner origin() const; Corner origin() const;
%End
%If (TQt_2_00 -)
TQLayoutIterator iterator(); TQLayoutIterator iterator();
void setGeometry(const TQRect &); void setGeometry(const TQRect &);
%End
protected: protected:
%If (- TQt_2_00)
TQChain *mainVerticalChain();
TQChain *mainHorizontalChain();
void initGM();
%End
%If (TQt_2_00 -)
bool findWidget(TQWidget *,int *,int *); bool findWidget(TQWidget *,int *,int *);
void add(TQLayoutItem * /Transfer/,int,int); void add(TQLayoutItem * /Transfer/,int,int);
%End
private: private:
TQGridLayout(const TQGridLayout &); TQGridLayout(const TQGridLayout &);
@ -500,57 +389,37 @@ public:
}; };
TQBoxLayout(TQWidget * /TransferThis/,Direction,int = 0,int = -1,const char * = 0); TQBoxLayout(TQWidget * /TransferThis/,Direction,int = 0,int = -1,const char * = 0);
%If (TQt_2_00 -)
TQBoxLayout(TQLayout * /TransferThis/,Direction,int = -1,const char * = 0); TQBoxLayout(TQLayout * /TransferThis/,Direction,int = -1,const char * = 0);
%End
TQBoxLayout(Direction,int = -1,const char * = 0); TQBoxLayout(Direction,int = -1,const char * = 0);
Direction direction() const; Direction direction() const;
%If (TQt_2_1_0 -)
void setDirection(Direction); void setDirection(Direction);
%End
void addSpacing(int); void addSpacing(int);
void addStretch(int = 0); void addStretch(int = 0);
%If (- TQt_2_00)
void addWidget(TQWidget *,int = 0,int = AlignCenter);
%End
void addLayout(TQLayout * /Transfer/,int = 0); void addLayout(TQLayout * /Transfer/,int = 0);
void addStrut(int); void addStrut(int);
%If (TQt_2_00 -)
void addItem(TQLayoutItem * /Transfer/); void addItem(TQLayoutItem * /Transfer/);
void addWidget(TQWidget *,int = 0,int = 0); void addWidget(TQWidget *,int = 0,int = 0);
%If (TQt_2_1_0 -)
void insertSpacing(int,int); void insertSpacing(int,int);
void insertStretch(int,int = 0); void insertStretch(int,int = 0);
void insertWidget(int,TQWidget *,int = 0,int = 0); void insertWidget(int,TQWidget *,int = 0,int = 0);
void insertLayout(int,TQLayout * /Transfer/,int = 0); void insertLayout(int,TQLayout * /Transfer/,int = 0);
int findWidget(TQWidget *); int findWidget(TQWidget *);
%End
bool setStretchFactor(TQWidget *,int); bool setStretchFactor(TQWidget *,int);
TQSize sizeHint() const; TQSize sizeHint() const;
TQSize minimumSize() const; TQSize minimumSize() const;
TQSize maximumSize() const; TQSize maximumSize() const;
bool hasHeightForWidth() const; bool hasHeightForWidth() const;
int heightForWidth(int) const; int heightForWidth(int) const;
%If (TQt_3_1_0 -)
int minimumHeightForWidth(int) const; int minimumHeightForWidth(int) const;
%End
TQSizePolicy::ExpandData expanding() const; TQSizePolicy::ExpandData expanding() const;
void invalidate(); void invalidate();
TQLayoutIterator iterator(); TQLayoutIterator iterator();
void setGeometry(const TQRect &); void setGeometry(const TQRect &);
%End
protected: protected:
%If (- TQt_2_00)
TQChain *mainVerticalChain();
TQChain *mainHorizontalChain();
void initGM();
%End
%If (TQt_2_1_0 -)
void insertItem(int,TQLayoutItem * /Transfer/); void insertItem(int,TQLayoutItem * /Transfer/);
%End
private: private:
TQBoxLayout(const TQBoxLayout &); TQBoxLayout(const TQBoxLayout &);
@ -565,15 +434,11 @@ class TQHBoxLayout : TQBoxLayout
public: public:
TQHBoxLayout(TQWidget * /TransferThis/,int = 0,int = -1,const char * = 0); TQHBoxLayout(TQWidget * /TransferThis/,int = 0,int = -1,const char * = 0);
%If (TQt_2_00 -)
TQHBoxLayout(TQLayout * /TransferThis/,int = -1,const char * = 0); TQHBoxLayout(TQLayout * /TransferThis/,int = -1,const char * = 0);
%End
TQHBoxLayout(int = -1,const char * = 0); TQHBoxLayout(int = -1,const char * = 0);
private: private:
%If (TQt_3_1_0 -)
TQHBoxLayout(const TQHBoxLayout &); TQHBoxLayout(const TQHBoxLayout &);
%End
}; };
@ -585,13 +450,9 @@ class TQVBoxLayout : TQBoxLayout
public: public:
TQVBoxLayout(TQWidget * /TransferThis/,int = 0,int = -1,const char * = 0); TQVBoxLayout(TQWidget * /TransferThis/,int = 0,int = -1,const char * = 0);
%If (TQt_2_00 -)
TQVBoxLayout(TQLayout * /TransferThis/,int = -1,const char * = 0); TQVBoxLayout(TQLayout * /TransferThis/,int = -1,const char * = 0);
%End
TQVBoxLayout(int = -1,const char * = 0); TQVBoxLayout(int = -1,const char * = 0);
private: private:
%If (TQt_3_1_0 -)
TQVBoxLayout(const TQVBoxLayout &); TQVBoxLayout(const TQVBoxLayout &);
%End
}; };

@ -19,6 +19,7 @@
// 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.
%DefaultEncoding "UTF-8"
%ExportedDoc %ExportedDoc
<Sect2><Title>TQLCDNumber</Title> <Sect2><Title>TQLCDNumber</Title>
@ -39,22 +40,12 @@ public:
TQLCDNumber(TQWidget * /TransferThis/ = 0,const char * = 0); TQLCDNumber(TQWidget * /TransferThis/ = 0,const char * = 0);
TQLCDNumber(uint,TQWidget * /TransferThis/ = 0,const char * = 0); TQLCDNumber(uint,TQWidget * /TransferThis/ = 0,const char * = 0);
%If (- TQt_2_00)
enum Mode {
HEX,
DEC,
OCT,
BIN
};
%End
%If (TQt_2_00 -)
enum Mode { enum Mode {
Hex, HEX = Hex, Hex, HEX = Hex,
Dec, DEC = Dec, Dec, DEC = Dec,
Oct, OCT = Oct, Oct, OCT = Oct,
Bin, BIN = Bin Bin, BIN = Bin
}; };
%End
enum SegmentStyle { enum SegmentStyle {
Outline, Outline,
@ -65,71 +56,36 @@ public:
bool smallDecimalPoint() const; bool smallDecimalPoint() const;
int numDigits() const; int numDigits() const;
%If (- TQt_2_00)
void setNumDigits(int);
%End
%If (TQt_2_00 -)
virtual void setNumDigits(int); virtual void setNumDigits(int);
%End
bool checkOverflow(int /Constrained/) const; bool checkOverflow(int /Constrained/) const;
bool checkOverflow(double) const; bool checkOverflow(double) const;
Mode mode() const; Mode mode() const;
%If (- TQt_2_00)
void setMode(Mode);
%End
%If (TQt_2_00 -)
virtual void setMode(Mode); virtual void setMode(Mode);
%End
SegmentStyle segmentStyle() const; SegmentStyle segmentStyle() const;
%If (- TQt_2_00)
void setSegmentStyle(SegmentStyle);
%End
%If (TQt_2_00 -)
virtual void setSegmentStyle(SegmentStyle); virtual void setSegmentStyle(SegmentStyle);
%End
double value() const; double value() const;
int intValue() const; int intValue() const;
TQSize sizeHint() const; TQSize sizeHint() const;
%If (TQt_2_00 - TQt_3_0_0)
TQSizePolicy sizePolicy() const;
%End
public slots: public slots:
%If (- TQt_2_00)
void display(const char *);
%End
%If (TQt_2_00 -)
void display(const TQString &); void display(const TQString &);
%End
void display(int /Constrained/); void display(int /Constrained/);
void display(double); void display(double);
%If (- TQt_2_00)
void setHexMode();
void setDecMode();
void setOctMode();
void setBinMode();
void setSmallDecimalPoint(bool);
%End
%If (TQt_2_00 -)
virtual void setHexMode(); virtual void setHexMode();
virtual void setDecMode(); virtual void setDecMode();
virtual void setOctMode(); virtual void setOctMode();
virtual void setBinMode(); virtual void setBinMode();
virtual void setSmallDecimalPoint(bool); virtual void setSmallDecimalPoint(bool);
%End
signals: signals:
void overflow(); void overflow();
protected: protected:
%If (- TQt_2_00)
void resizeEvent(TQResizeEvent *);
%End
void drawContents(TQPainter *); void drawContents(TQPainter *);
private: private:

@ -29,8 +29,6 @@
%End %End
%If (TQt_3_0_0 -)
class TQLibrary class TQLibrary
{ {
%TypeHeaderCode %TypeHeaderCode
@ -55,5 +53,3 @@ public:
private: private:
TQLibrary(const TQLibrary &); TQLibrary(const TQLibrary &);
}; };
%End

@ -54,8 +54,6 @@ This takes no parameters and returns the bool result and the
%End %End
%If (TQt_3_0_0 -)
class TQLineEdit : TQFrame class TQLineEdit : TQFrame
{ {
%TypeHeaderCode %TypeHeaderCode
@ -65,10 +63,8 @@ class TQLineEdit : TQFrame
public: public:
TQLineEdit(TQWidget * /TransferThis/,const char * = 0); TQLineEdit(TQWidget * /TransferThis/,const char * = 0);
TQLineEdit(const TQString &,TQWidget * /TransferThis/,const char * = 0); TQLineEdit(const TQString &,TQWidget * /TransferThis/,const char * = 0);
%If (TQt_3_2_0 -)
TQLineEdit(const TQString &,const TQString &,TQWidget * /TransferThis/, TQLineEdit(const TQString &,const TQString &,TQWidget * /TransferThis/,
const char * = 0); const char * = 0);
%End
TQString text() const; TQString text() const;
@ -108,10 +104,8 @@ public:
void home(bool); void home(bool);
void end(bool); void end(bool);
%If (TQt_3_2_0 -)
bool isModified() const; bool isModified() const;
void clearModified(); void clearModified();
%End
// Obsolete. // Obsolete.
bool edited() const; bool edited() const;
@ -120,20 +114,16 @@ public:
bool hasSelectedText() const; bool hasSelectedText() const;
TQString selectedText() const; TQString selectedText() const;
%If (TQt_3_2_0 -)
int selectionStart() const; int selectionStart() const;
%End
bool isUndoAvailable() const; bool isUndoAvailable() const;
bool isRedoAvailable() const; bool isRedoAvailable() const;
bool dragEnabled() const; bool dragEnabled() const;
%If (TQt_3_2_0 -)
TQString inputMask() const; TQString inputMask() const;
void setInputMask(const TQString &); void setInputMask(const TQString &);
bool hasAcceptableInput() const; bool hasAcceptableInput() const;
%End
public slots: public slots:
virtual void setText(const TQString &); virtual void setText(const TQString &);
@ -164,9 +154,7 @@ public slots:
signals: signals:
void textChanged(const TQString &); void textChanged(const TQString &);
void returnPressed(); void returnPressed();
%If (TQt_3_1_0 -)
void lostFocus(); void lostFocus();
%End
void selectionChanged(); void selectionChanged();
protected: protected:
@ -196,10 +184,8 @@ protected:
public: public:
// These appeared in v3.0.2 but defined as incompatible 3.0 addons, // These appeared in v3.0.2 but defined as incompatible 3.0 addons,
// until v3.1.0. v3.2.0 then defined them as internal and obsolete. // until v3.1.0. v3.2.0 then defined them as internal and obsolete.
%If (TQt_3_1_0 -)
void setPasswordChar(TQChar); void setPasswordChar(TQChar);
TQChar passwordChar() const; TQChar passwordChar() const;
%End
// Obsolete. // Obsolete.
SIP_PYTUPLE characterAt(int) const; SIP_PYTUPLE characterAt(int) const;
@ -221,207 +207,3 @@ public:
private: private:
TQLineEdit(const TQLineEdit &); TQLineEdit(const TQLineEdit &);
}; };
%End
%If (- TQt_3_0_0)
class TQLineEdit : TQWidget
{
%TypeHeaderCode
#include <tqlineedit.h>
%End
public:
%If (- TQt_2_00)
TQLineEdit(TQWidget * /TransferThis/ = 0,const char * = 0);
%End
%If (TQt_2_00 -)
TQLineEdit(TQWidget * /TransferThis/,const char * = 0);
TQLineEdit(const TQString &,TQWidget * /TransferThis/,const char * = 0);
%End
%If (- TQt_2_00)
const char *text() const;
%End
%If (TQt_2_00 -)
TQString text() const;
TQString displayText() const;
%End
%If (- TQt_2_00)
void setMaxLength(int);
%End
%If (TQt_2_00 -)
virtual void setMaxLength(int);
%End
int maxLength() const;
%If (- TQt_2_00)
void setFrame(bool);
%End
%If (TQt_2_00 -)
virtual void setFrame(bool);
%End
bool frame() const;
enum EchoMode {
Normal,
NoEcho,
Password
};
%If (- TQt_2_00)
void setEchoMode(EchoMode);
%End
%If (TQt_2_00 -)
virtual void setEchoMode(EchoMode);
%End
EchoMode echoMode() const;
%If (TQt_2_1_0 -)
void setReadOnly(bool);
%End
%If (TQt_2_1_0 -)
bool isReadOnly() const;
%End
%If (- TQt_2_00)
void setValidator(TQValidator *);
TQValidator *validator() const;
%End
%If (TQt_2_00 -)
virtual void setValidator(TQValidator *);
%End
%If (TQt_2_00 -)
const TQValidator *validator() const;
%End
TQSize sizeHint() const;
%If (TQt_2_00 -)
TQSize minimumSizeHint() const;
%End
%If (TQt_2_00 -)
TQSizePolicy sizePolicy() const;
%End
%If (- TQt_2_00)
void setCursorPosition(int);
%End
%If (TQt_2_00 -)
virtual void setCursorPosition(int);
%End
int cursorPosition() const;
%If (- TQt_2_00)
bool validateAndSet(const char *,int,int,int);
%End
%If (TQt_2_00 -)
bool validateAndSet(const TQString &,int,int,int);
%End
%If (TQt_2_00 -)
int alignment() const;
%End
%If (TQt_2_00 -)
void cursorLeft(bool,int = 1);
void cursorRight(bool,int = 1);
void cursorWordForward(bool);
void cursorWordBackward(bool);
void backspace();
void del() /PyName=delChar/;
void home(bool);
void end(bool);
void setEdited(bool);
bool edited() const;
%End
%If (TQt_2_00 -)
bool hasMarkedText() const;
TQString markedText() const;
%End
%If (TQt_CLIPBOARD)
void cut();
void copy() const;
void paste();
%End
%If (- TQt_2_00)
void setEnabled(bool);
void setFont(const TQFont &);
void setPalette(const TQPalette &);
void setSelection(int,int);
%End
%If (TQt_2_00 -)
virtual void setEnabled(bool);
virtual void setFont(const TQFont &);
virtual void setPalette(const TQPalette &);
virtual void setSelection(int,int);
void setAlignment(int);
%End
public slots:
%If (- TQt_2_00)
void setText(const char *);
%End
%If (TQt_2_00 -)
virtual void setText(const TQString &);
%End
void selectAll();
void deselect();
void clearValidator();
%If (- TQt_2_00)
void insert(const char *);
%End
%If (TQt_2_00 -)
void insert(const TQString &);
%End
void clear();
signals:
%If (- TQt_2_00)
void textChanged(const char *);
%End
%If (TQt_2_00 -)
void textChanged(const TQString &);
%End
void returnPressed();
protected:
%If (TQt_2_2_0 -)
bool event(TQEvent *);
%End
void mousePressEvent(TQMouseEvent *);
void mouseMoveEvent(TQMouseEvent *);
void mouseReleaseEvent(TQMouseEvent *);
void mouseDoubleClickEvent(TQMouseEvent *);
void keyPressEvent(TQKeyEvent *);
void focusInEvent(TQFocusEvent *);
void focusOutEvent(TQFocusEvent *);
void paintEvent(TQPaintEvent *);
void resizeEvent(TQResizeEvent *);
void leaveEvent(TQEvent *);
void repaintArea(int,int);
%If (- TQt_2_00)
void timerEvent(TQTimerEvent *);
bool event(TQEvent *);
bool hasMarkedText() const;
TQString markedText() const;
%End
%If (TQt_2_00 -)
%If (TQt_DRAGANDDROP)
void dragEnterEvent(TQDragEnterEvent *);
void dropEvent(TQDropEvent *);
%End
%End
private:
TQLineEdit(const TQLineEdit &);
};
%End

@ -1,111 +0,0 @@
// This is the SIP interface definition for all types based on the TQList
// template.
//
// 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.
%ExportedDoc
<Sect2><Title>TQList&lt;type&gt; (TQt v2)</Title>
<Para>
Types based on the <Literal>TQList</Literal> template are automatically
converted to and from Python lists of the type.
</Para>
</Sect2>
%End
%If (TQt_2_1_0 - TQt_3_0_0)
template<Type>
%MappedType TQList<Type>
{
%TypeHeaderCode
#include <tqlist.h>
%End
%ConvertFromTypeCode
Type *tb;
int i;
PyObject *l;
// Create the list.
if ((l = PyList_New(sipCpp -> count())) == NULL)
return NULL;
// Get it.
i = 0;
for (tb = sipCpp -> first(); tb != NULL; tb = sipCpp -> next())
{
PyObject *tbobj;
if ((tbobj = sipConvertFromInstance(tb,sipClass_Type,sipTransferObj)) == NULL || PyList_SetItem(l,i,tbobj) < 0)
{
Py_XDECREF(tbobj);
Py_DECREF(l);
return NULL;
}
++i;
}
return l;
%End
%ConvertToTypeCode
if (sipIsErr == NULL)
{
if (!PyList_Check(sipPy))
return 0;
for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
if (!sipCanConvertToInstance(PyList_GET_ITEM(sipPy,i),sipClass_Type,0))
return 0;
return 1;
}
TQList<Type> *ql = new TQList<Type>;
for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
{
// We apply the transfer to the list itself, not the elements.
// Note that any temporary element will never be destroyed.
// There is nothing that can be done about this.
ql -> append(reinterpret_cast<Type *>(sipConvertToInstance(PyList_GET_ITEM(sipPy,i),sipClass_Type,0,0,0,sipIsErr)));
if (*sipIsErr)
{
delete ql;
return 0;
}
}
*sipCppPtr = ql;
return sipGetState(sipTransferObj);
%End
};
%End

@ -55,116 +55,6 @@ containing the <Literal>bool</Literal> result and <Literal>yPos</Literal>.
%End %End
%If (- TQt_2_00)
%ModuleHeaderCode
#include <tqlistbox.h>
%End
// List box item types.
const int LBI_Undefined;
const int LBI_Text;
const int LBI_Pixmap;
const int LBI_UserDefined;
class TQListBox : TQTableView
{
%TypeHeaderCode
#include <tqlistbox.h>
%End
public:
TQListBox(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0);
void setFont(const TQFont &);
uint count() const;
void insertStrList(const TQStrList *,int = -1);
// void insertStrList(const char **,int = -1,int = -1);
void insertItem(const TQListBoxItem * /Transfer/,int = -1);
void insertItem(const char *,int = -1);
void insertItem(const TQPixmap &,int = -1);
void inSort(const TQListBoxItem *);
void inSort(const char *);
void removeItem(int);
void clear();
const char *text(int) const;
const TQPixmap *pixmap(int) const;
void changeItem(const TQListBoxItem * /Transfer/,int);
void changeItem(const char *,int);
void changeItem(const TQPixmap &,int);
bool autoUpdate() const;
void setAutoUpdate(bool);
int numItemsVisible() const;
void setFixedVisibleLines(int);
int currentItem() const;
void setCurrentItem(int);
void centerCurrentItem();
int topItem() const;
void setTopItem(int);
void setBottomItem(int);
bool dragSelect() const;
void setDragSelect(bool);
bool autoScroll() const;
void setAutoScroll(bool);
bool autoScrollBar() const;
void setAutoScrollBar(bool);
bool scrollBar() const;
void setScrollBar(bool);
bool autoBottomScrollBar() const;
void setAutoBottomScrollBar(bool);
bool bottomScrollBar() const;
void setBottomScrollBar(bool);
bool smoothScrolling() const;
void setSmoothScrolling(bool);
int itemHeight() const;
int itemHeight(int) const;
long maxItemWidth() const;
bool isMultiSelection() const;
void setMultiSelection(bool);
void setSelected(int,bool);
bool isSelected(int) const;
TQSize sizeHint() const;
public slots:
void clearSelection();
signals:
void highlighted(int);
void selected(int);
void highlighted(const char *);
void selected(const char *);
void selectionChanged();
protected:
TQListBoxItem *item(int) const;
bool itemVisible(int);
int cellHeight(int = 0);
void paintCell(TQPainter *,int,int);
void mousePressEvent(TQMouseEvent *);
void mouseReleaseEvent(TQMouseEvent *);
void mouseDoubleClickEvent(TQMouseEvent *);
void mouseMoveEvent(TQMouseEvent *);
void keyPressEvent(TQKeyEvent *);
void focusInEvent(TQFocusEvent *);
void focusOutEvent(TQFocusEvent *);
void resizeEvent(TQResizeEvent *);
void timerEvent(TQTimerEvent *);
int findItem(int) const;
bool itemYPos(int,int *) const;
void updateItem(int,bool = 1);
void clearList();
void updateCellWidth();
void toggleCurrentItem();
private:
TQListBox(const TQListBox &);
};
%End
%If (TQt_2_00 -)
class TQListBox : TQScrollView class TQListBox : TQScrollView
{ {
%TypeHeaderCode %TypeHeaderCode
@ -184,39 +74,27 @@ public:
// void insertStrList(const char **,int = -1,int = -1); // void insertStrList(const char **,int = -1,int = -1);
void insertItem(const TQListBoxItem * /Transfer/,int = -1); void insertItem(const TQListBoxItem * /Transfer/,int = -1);
%If (TQt_2_1_0 -)
void insertItem(const TQListBoxItem * /Transfer/,const TQListBoxItem *); void insertItem(const TQListBoxItem * /Transfer/,const TQListBoxItem *);
%End
void insertItem(const TQString &,int = -1); void insertItem(const TQString &,int = -1);
void insertItem(const TQPixmap &,int = -1); void insertItem(const TQPixmap &,int = -1);
%If (TQt_2_1_0 -)
void insertItem(const TQPixmap &,const TQString &,int = -1); void insertItem(const TQPixmap &,const TQString &,int = -1);
%End
void removeItem(int); void removeItem(int);
%If (- TQt_3_0_0)
void clear();
%End
TQString text(int) const; TQString text(int) const;
const TQPixmap *pixmap(int) const; const TQPixmap *pixmap(int) const;
void changeItem(const TQListBoxItem * /Transfer/,int); void changeItem(const TQListBoxItem * /Transfer/,int);
void changeItem(const TQString &,int); void changeItem(const TQString &,int);
void changeItem(const TQPixmap &,int); void changeItem(const TQPixmap &,int);
%If (TQt_2_1_0 -)
void changeItem(const TQPixmap &,const TQString &,int); void changeItem(const TQPixmap &,const TQString &,int);
%End
void takeItem(const TQListBoxItem * /TransferBack/); void takeItem(const TQListBoxItem * /TransferBack/);
int numItemsVisible() const; int numItemsVisible() const;
int currentItem() const; int currentItem() const;
%If (TQt_2_1_0 -)
TQString currentText() const; TQString currentText() const;
%End
virtual void setCurrentItem(int); virtual void setCurrentItem(int);
virtual void setCurrentItem(TQListBoxItem *); virtual void setCurrentItem(TQListBoxItem *);
void centerCurrentItem(); void centerCurrentItem();
@ -226,21 +104,12 @@ public:
long maxItemWidth() const; long maxItemWidth() const;
%If (- TQt_2_1_0)
enum SelectionMode {
Single,
Multi,
Extended
};
%End
%If (TQt_2_1_0 -)
enum SelectionMode { enum SelectionMode {
Single, Single,
Multi, Multi,
Extended, Extended,
NoSelection NoSelection
}; };
%End
virtual void setSelectionMode(SelectionMode); virtual void setSelectionMode(SelectionMode);
SelectionMode selectionMode() const; SelectionMode selectionMode() const;
@ -252,22 +121,15 @@ public:
void setSelected(int,bool); void setSelected(int,bool);
bool isSelected(int) const; bool isSelected(int) const;
bool isSelected(TQListBoxItem *) const; bool isSelected(TQListBoxItem *) const;
%If (TQt_3_1_0 -)
TQListBoxItem *selectedItem() const; TQListBoxItem *selectedItem() const;
%End
TQSize sizeHint() const; TQSize sizeHint() const;
TQSize minimumSizeHint() const; TQSize minimumSizeHint() const;
TQListBoxItem *item(int) const; TQListBoxItem *item(int) const;
int index(const TQListBoxItem *) const; int index(const TQListBoxItem *) const;
%If (TQt_2_1_0 - TQt_3_0_0)
TQListBoxItem *findItem(const TQString &) const;
%End
%If (TQt_3_0_0 -)
TQListBoxItem *findItem(const TQString &, TQListBoxItem *findItem(const TQString &,
ComparisonFlags = BeginsWith) const; ComparisonFlags = BeginsWith) const;
%End
void triggerUpdate(bool); void triggerUpdate(bool);
@ -305,26 +167,16 @@ public:
TQRect itemRect(TQListBoxItem *) const; TQRect itemRect(TQListBoxItem *) const;
%If (TQt_2_1_0 -)
TQListBoxItem *firstItem() const; TQListBoxItem *firstItem() const;
void sort(bool = 1); void sort(bool = 1);
%End
public slots: public slots:
%If (TQt_3_0_0 -)
void clear(); void clear();
%End
virtual void ensureCurrentVisible(); virtual void ensureCurrentVisible();
virtual void clearSelection(); virtual void clearSelection();
%If (TQt_2_1_0 - TQt_3_0_0)
void selectAll(bool);
void invertSelection();
%End
%If (TQt_3_0_0 -)
virtual void selectAll(bool); virtual void selectAll(bool);
virtual void invertSelection(); virtual void invertSelection();
%End
signals: signals:
void highlighted(int); void highlighted(int);
@ -335,7 +187,6 @@ signals:
void selected(TQListBoxItem *); void selected(TQListBoxItem *);
void selectionChanged(); void selectionChanged();
%If (TQt_2_1_0 -)
void selectionChanged(TQListBoxItem *); void selectionChanged(TQListBoxItem *);
void currentChanged(TQListBoxItem *); void currentChanged(TQListBoxItem *);
void clicked(TQListBoxItem *); void clicked(TQListBoxItem *);
@ -349,31 +200,17 @@ signals:
void rightButtonPressed(TQListBoxItem *,const TQPoint &); void rightButtonPressed(TQListBoxItem *,const TQPoint &);
void mouseButtonPressed(int,TQListBoxItem *,const TQPoint &); void mouseButtonPressed(int,TQListBoxItem *,const TQPoint &);
void mouseButtonClicked(int,TQListBoxItem *,const TQPoint &); void mouseButtonClicked(int,TQListBoxItem *,const TQPoint &);
%End
%If (TQt_3_0_0 -)
void contextMenuRequested(TQListBoxItem *,const TQPoint &); void contextMenuRequested(TQListBoxItem *,const TQPoint &);
%End
%If (TQt_2_1_0 -)
void onItem(TQListBoxItem *); void onItem(TQListBoxItem *);
void onViewport(); void onViewport();
%End
protected: protected:
%If (- TQt_3_0_0)
void viewportMousePressEvent(TQMouseEvent *);
void viewportMouseReleaseEvent(TQMouseEvent *);
void viewportMouseDoubleClickEvent(TQMouseEvent *);
void viewportMouseMoveEvent(TQMouseEvent *);
%End
void mousePressEvent(TQMouseEvent *); void mousePressEvent(TQMouseEvent *);
void mouseReleaseEvent(TQMouseEvent *); void mouseReleaseEvent(TQMouseEvent *);
void mouseDoubleClickEvent(TQMouseEvent *); void mouseDoubleClickEvent(TQMouseEvent *);
void mouseMoveEvent(TQMouseEvent *); void mouseMoveEvent(TQMouseEvent *);
%If (TQt_3_0_0 -)
void contentsContextMenuEvent(TQContextMenuEvent *);
%End
void keyPressEvent(TQKeyEvent *); void keyPressEvent(TQKeyEvent *);
void focusInEvent(TQFocusEvent *); void focusInEvent(TQFocusEvent *);
@ -381,9 +218,7 @@ protected:
void resizeEvent(TQResizeEvent *); void resizeEvent(TQResizeEvent *);
void showEvent(TQShowEvent *); void showEvent(TQShowEvent *);
%If (TQt_3_0_0 -)
bool eventFilter(TQObject *,TQEvent *); bool eventFilter(TQObject *,TQEvent *);
%End
void updateItem(int); void updateItem(int);
void updateItem(TQListBoxItem *); void updateItem(TQListBoxItem *);
@ -391,27 +226,19 @@ protected:
virtual void paintCell(TQPainter *,int,int); virtual void paintCell(TQPainter *,int,int);
void toggleCurrentItem(); void toggleCurrentItem();
%If (TQt_2_2_0 -)
bool isRubberSelecting() const; bool isRubberSelecting() const;
%End
void doLayout() const; void doLayout() const;
%If (TQt_3_0_0 -)
void windowActivationChange(bool); void windowActivationChange(bool);
%End
protected slots: protected slots:
%If (TQt_2_1_0 -)
void clearInputString(); void clearInputString();
%End
private: private:
TQListBox(const TQListBox &); TQListBox(const TQListBox &);
}; };
%End
class TQListBoxItem class TQListBoxItem
{ {
@ -420,71 +247,32 @@ class TQListBoxItem
%End %End
public: public:
%If (- TQt_2_00)
TQListBoxItem();
%End
%If (TQt_2_00 -)
TQListBoxItem(TQListBox * /TransferThis/ = 0); TQListBoxItem(TQListBox * /TransferThis/ = 0);
%End
%If (TQt_2_1_0 -)
TQListBoxItem(TQListBox * /TransferThis/,TQListBoxItem *); TQListBoxItem(TQListBox * /TransferThis/,TQListBoxItem *);
%End
%If (- TQt_2_00)
virtual const char *text() const;
%End
%If (TQt_2_00 -)
virtual TQString text() const; virtual TQString text() const;
%End
virtual const TQPixmap *pixmap() const; virtual const TQPixmap *pixmap() const;
%If (- TQt_2_00)
virtual int height(const TQListBox *) const = 0;
virtual int width(const TQListBox *) const = 0;
%End
%If (TQt_2_00 -)
virtual int height(const TQListBox *) const; virtual int height(const TQListBox *) const;
virtual int width(const TQListBox *) const; virtual int width(const TQListBox *) const;
%End
%If (TQt_2_00 - TQt_3_0_0) bool isSelected() const;
bool selected() const;
%End
%If (TQt_2_1_0 - TQt_3_0_0)
bool current() const;
%End
%If (TQt_3_0_0 -)
bool isSelected() const;
bool isCurrent() const; bool isCurrent() const;
%End
%If (TQt_2_00 -)
TQListBox *listBox() const; TQListBox *listBox() const;
%End
%If (TQt_2_1_0 -)
void setSelectable(bool); void setSelectable(bool);
bool isSelectable() const; bool isSelectable() const;
TQListBoxItem *next() const; TQListBoxItem *next() const;
TQListBoxItem *prev() const; TQListBoxItem *prev() const;
%End
%If (TQt_3_0_0 -)
virtual int rtti() const; virtual int rtti() const;
%End
protected: protected:
virtual void paint(TQPainter *) = 0; virtual void paint(TQPainter *) = 0;
%If (- TQt_2_00)
void setText(const char *);
%End
%If (TQt_2_00 -)
virtual void setText(const TQString &); virtual void setText(const TQString &);
%End
%If (TQt_2_1_0 -)
void setCustomHighlighting(bool); void setCustomHighlighting(bool);
%End
private: private:
TQListBoxItem(const TQListBoxItem &); TQListBoxItem(const TQListBoxItem &);
@ -497,32 +285,18 @@ class TQListBoxText : TQListBoxItem
%End %End
public: public:
%If (- TQt_2_00)
TQListBoxText(const char * = 0);
%End
%If (TQt_2_00 -)
TQListBoxText(TQListBox * /TransferThis/, TQListBoxText(TQListBox * /TransferThis/,
const TQString & = TQString::null); const TQString & = TQString::null);
TQListBoxText(const TQString & = TQString::null); TQListBoxText(const TQString & = TQString::null);
%End
%If (TQt_2_1_0 -)
TQListBoxText(TQListBox * /TransferThis/,const TQString &,TQListBoxItem *); TQListBoxText(TQListBox * /TransferThis/,const TQString &,TQListBoxItem *);
%End
%If (- TQt_2_00)
void paint(TQPainter *);
%End
int height(const TQListBox *) const; int height(const TQListBox *) const;
int width(const TQListBox *) const; int width(const TQListBox *) const;
%If (TQt_3_0_0 -)
int rtti() const; int rtti() const;
%End
protected: protected:
%If (TQt_2_00 -)
void paint(TQPainter *); void paint(TQPainter *);
%End
private: private:
TQListBoxText(const TQListBoxText &); TQListBoxText(const TQListBoxText &);
@ -535,11 +309,8 @@ class TQListBoxPixmap : TQListBoxItem
%End %End
public: public:
%If (TQt_2_00 -)
TQListBoxPixmap(TQListBox * /TransferThis/,const TQPixmap &); TQListBoxPixmap(TQListBox * /TransferThis/,const TQPixmap &);
%End
TQListBoxPixmap(const TQPixmap &); TQListBoxPixmap(const TQPixmap &);
%If (TQt_2_1_0 -)
TQListBoxPixmap(TQListBox * /TransferThis/,const TQPixmap &, TQListBoxPixmap(TQListBox * /TransferThis/,const TQPixmap &,
TQListBoxItem *); TQListBoxItem *);
TQListBoxPixmap(TQListBox * /TransferThis/,const TQPixmap &, TQListBoxPixmap(TQListBox * /TransferThis/,const TQPixmap &,
@ -547,24 +318,15 @@ public:
TQListBoxPixmap(const TQPixmap &,const TQString &); TQListBoxPixmap(const TQPixmap &,const TQString &);
TQListBoxPixmap(TQListBox * /TransferThis/,const TQPixmap &, TQListBoxPixmap(TQListBox * /TransferThis/,const TQPixmap &,
const TQString &,TQListBoxItem *); const TQString &,TQListBoxItem *);
%End
const TQPixmap *pixmap() const; const TQPixmap *pixmap() const;
%If (TQt_2_00 -)
int height(const TQListBox *) const; int height(const TQListBox *) const;
int width(const TQListBox *) const; int width(const TQListBox *) const;
%End
%If (TQt_3_0_0 -)
int rtti() const; int rtti() const;
%End
protected: protected:
void paint(TQPainter *); void paint(TQPainter *);
%If (- TQt_2_00)
int height(const TQListBox *) const;
int width(const TQListBox *) const;
%End
private: private:
TQListBoxPixmap(const TQListBoxPixmap &); TQListBoxPixmap(const TQListBoxPixmap &);

@ -56,91 +56,6 @@ call <Literal>takeItem()</Literal> and then <Literal>del()</Literal>.
%End %End
%If (- TQt_2_00)
class TQListViewItem
{
%TypeHeaderCode
#include <tqlistview.h>
%End
public:
TQListViewItem(TQListView * /TransferThis/);
TQListViewItem(TQListViewItem * /TransferThis/);
TQListViewItem(TQListView * /TransferThis/,TQListViewItem *);
TQListViewItem(TQListViewItem * /TransferThis/,TQListViewItem *);
TQListViewItem(TQListView * /TransferThis/,
const char *,const char * = 0,
const char * = 0,const char * = 0,
const char * = 0,const char * = 0,
const char * = 0,const char * = 0);
TQListViewItem(TQListViewItem * /TransferThis/,
const char *,const char * = 0,
const char * = 0,const char * = 0,
const char * = 0,const char * = 0,
const char * = 0,const char * = 0);
TQListViewItem(TQListView * /TransferThis/,TQListViewItem *,
const char *,const char * = 0,
const char * = 0,const char * = 0,
const char * = 0,const char * = 0,
const char * = 0,const char * = 0);
TQListViewItem(TQListViewItem * /TransferThis/,TQListViewItem *,
const char *,const char * = 0,
const char * = 0,const char * = 0,
const char * = 0,const char * = 0,
const char * = 0,const char * = 0);
virtual void insertItem(TQListViewItem * /Transfer/);
virtual void removeItem(TQListViewItem * /TransferBack/);
int height() const;
virtual void invalidateHeight();
int totalHeight() const;
virtual int width(const TQFontMetrics &,const TQListView *,int) const;
void widthChanged(int = -1) const;
int depth() const;
virtual void setText(int,const char *);
virtual const char *text(int) const;
virtual void setPixmap(int,const TQPixmap &);
virtual const TQPixmap *pixmap(int) const;
virtual const char *key(int,bool) const;
virtual void sortChildItems(int,bool);
int childCount() const;
bool isOpen() const;
virtual void setOpen(bool);
virtual void setup();
virtual void setSelected(bool);
bool isSelected() const;
virtual void paintCell(TQPainter *,const TQColorGroup &,int,int,int);
virtual void paintBranches(TQPainter *,const TQColorGroup &,int,int,int,
GUIStyle);
virtual void paintFocus(TQPainter *,const TQColorGroup &,const TQRect &);
TQListViewItem *firstChild() const;
TQListViewItem *nextSibling() const;
TQListViewItem *parent() const;
TQListViewItem *itemAbove();
TQListViewItem *itemBelow();
int itemPos() const;
TQListView *listView() const;
virtual void setSelectable(bool);
bool isSelectable() const;
virtual void setExpandable(bool);
bool isExpandable();
void repaint() const;
protected:
virtual void enforceSortOrder() const;
virtual void setHeight(int);
virtual void activate();
};
%End
%If (TQt_2_00 -)
class TQListViewItem : TQt class TQListViewItem : TQt
{ {
%TypeHeaderCode %TypeHeaderCode
@ -194,9 +109,7 @@ public:
virtual const TQPixmap *pixmap(int) const; virtual const TQPixmap *pixmap(int) const;
virtual TQString key(int,bool) const; virtual TQString key(int,bool) const;
%If (TQt_3_0_0 -)
virtual int compare(TQListViewItem *,int,bool) const; virtual int compare(TQListViewItem *,int,bool) const;
%End
virtual void sortChildItems(int,bool); virtual void sortChildItems(int,bool);
int childCount() const; int childCount() const;
@ -209,13 +122,7 @@ public:
bool isSelected() const; bool isSelected() const;
virtual void paintCell(TQPainter *,const TQColorGroup &,int,int,int); virtual void paintCell(TQPainter *,const TQColorGroup &,int,int,int);
%If (- TQt_3_0_0)
virtual void paintBranches(TQPainter *,const TQColorGroup &,int,int,int,
GUIStyle);
%End
%If (TQt_3_0_0 -)
virtual void paintBranches(TQPainter *,const TQColorGroup &,int,int,int); virtual void paintBranches(TQPainter *,const TQColorGroup &,int,int,int);
%End
virtual void paintFocus(TQPainter *,const TQColorGroup &,const TQRect &); virtual void paintFocus(TQPainter *,const TQColorGroup &,const TQRect &);
TQListViewItem *firstChild() const; TQListViewItem *firstChild() const;
@ -237,17 +144,9 @@ public:
void repaint() const; void repaint() const;
%If (TQt_2_1_0 - TQt_3_0_0)
void sort();
%End
%If (TQt_3_0_0 -)
virtual void sort(); virtual void sort();
%End
%If (TQt_2_2_0 -)
void moveItem(TQListViewItem *); void moveItem(TQListViewItem *);
%End
%If (TQt_3_0_0 -)
virtual void setDragEnabled(bool); virtual void setDragEnabled(bool);
virtual void setDropEnabled(bool); virtual void setDropEnabled(bool);
bool dragEnabled() const; bool dragEnabled() const;
@ -268,17 +167,13 @@ public:
virtual void setMultiLinesEnabled(bool); virtual void setMultiLinesEnabled(bool);
bool multiLinesEnabled() const; bool multiLinesEnabled() const;
%End
protected: protected:
virtual void enforceSortOrder() const; virtual void enforceSortOrder() const;
virtual void setHeight(int); virtual void setHeight(int);
virtual void activate(); virtual void activate();
%If (TQt_2_1_0 -)
bool activatedPos(TQPoint &); bool activatedPos(TQPoint &);
%End
%If (TQt_3_0_0 -)
virtual void dropped(TQDropEvent *); virtual void dropped(TQDropEvent *);
virtual void dragEntered(); virtual void dragEntered();
virtual void dragLeft(); virtual void dragLeft();
@ -286,11 +181,8 @@ protected:
virtual void cancelRename(int); virtual void cancelRename(int);
void ignoreDoubleClick(); void ignoreDoubleClick();
%End
}; };
%End
class TQListView : TQScrollView class TQListView : TQScrollView
{ {
@ -299,44 +191,22 @@ class TQListView : TQScrollView
%End %End
public: public:
%If (TQt_2_2_0 - TQt_3_0_0)
TQListView(TQWidget * /TransferThis/,const char *,WFlags);
%End
%If (- TQt_3_0_0)
TQListView(TQWidget * /TransferThis/ = 0,const char * = 0);
%End
%If (TQt_3_0_0 -)
TQListView(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0); TQListView(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0);
%End
int treeStepSize() const; int treeStepSize() const;
virtual void setTreeStepSize(int); virtual void setTreeStepSize(int);
virtual void insertItem(TQListViewItem * /Transfer/); virtual void insertItem(TQListViewItem * /Transfer/);
%If (TQt_2_00 -)
virtual void takeItem(TQListViewItem * /TransferBack/); virtual void takeItem(TQListViewItem * /TransferBack/);
%End
%If (- TQt_3_0_0)
virtual void clear();
%End
TQHeader *header() const; TQHeader *header() const;
%If (- TQt_2_00)
virtual int addColumn(const char *,int = -1);
virtual void setColumnText(int,const char *);
const char *columnText(int) const;
%End
%If (TQt_2_00 -)
virtual int addColumn(const TQString &,int = -1); virtual int addColumn(const TQString &,int = -1);
virtual int addColumn(const TQIconSet &,const TQString &,int = -1); virtual int addColumn(const TQIconSet &,const TQString &,int = -1);
%If (TQt_2_1_0 -)
void removeColumn(int); void removeColumn(int);
%End
virtual void setColumnText(int,const TQString &); virtual void setColumnText(int,const TQString &);
virtual void setColumnText(int,const TQIconSet &,const TQString &); virtual void setColumnText(int,const TQIconSet &,const TQString &);
TQString columnText(int) const; TQString columnText(int) const;
%End
virtual void setColumnWidth(int,int); virtual void setColumnWidth(int,int);
int columnWidth(int) const; int columnWidth(int) const;
@ -348,9 +218,7 @@ public:
virtual void setColumnWidthMode(int,WidthMode); virtual void setColumnWidthMode(int,WidthMode);
WidthMode columnWidthMode(int) const; WidthMode columnWidthMode(int) const;
%If (TQt_2_1_0 -)
int columns() const; int columns() const;
%End
virtual void setColumnAlignment(int,int); virtual void setColumnAlignment(int,int);
int columnAlignment(int) const; int columnAlignment(int) const;
@ -368,7 +236,6 @@ public:
virtual void setMultiSelection(bool); virtual void setMultiSelection(bool);
bool isMultiSelection() const; bool isMultiSelection() const;
%If (TQt_2_1_0 -)
enum SelectionMode { enum SelectionMode {
Single, Single,
Multi, Multi,
@ -378,19 +245,12 @@ public:
void setSelectionMode(SelectionMode); void setSelectionMode(SelectionMode);
SelectionMode selectionMode() const; SelectionMode selectionMode() const;
%End
%If (TQt_2_1_0 -)
virtual void clearSelection(); virtual void clearSelection();
%End
virtual void setSelected(TQListViewItem *,bool); virtual void setSelected(TQListViewItem *,bool);
%If (TQt_3_2_0 -)
void setSelectionAnchor(TQListViewItem *); void setSelectionAnchor(TQListViewItem *);
%End
bool isSelected(TQListViewItem *) const; bool isSelected(TQListViewItem *) const;
%If (TQt_2_1_0 -)
TQListViewItem *selectedItem() const; TQListViewItem *selectedItem() const;
%End
virtual void setOpen(TQListViewItem *,bool); virtual void setOpen(TQListViewItem *,bool);
bool isOpen(TQListViewItem *) const; bool isOpen(TQListViewItem *) const;
@ -398,9 +258,7 @@ public:
TQListViewItem *currentItem() const; TQListViewItem *currentItem() const;
TQListViewItem *firstChild() const; TQListViewItem *firstChild() const;
%If (TQt_3_0_0 -)
TQListViewItem *lastItem() const; TQListViewItem *lastItem() const;
%End
int childCount() const; int childCount() const;
@ -414,43 +272,22 @@ public:
bool rootIsDecorated() const; bool rootIsDecorated() const;
virtual void setSorting(int,bool = 1); virtual void setSorting(int,bool = 1);
%If (TQt_3_1_0 -)
int sortColumn() const; int sortColumn() const;
%End
%If (TQt_3_2_0 -)
void setSortColumn(int); void setSortColumn(int);
SortOrder sortOrder() const; SortOrder sortOrder() const;
void setSortOrder(SortOrder); void setSortOrder(SortOrder);
%End
%If (TQt_3_0_0 -)
virtual void sort(); virtual void sort();
%End
%If (TQt_2_1_0 - TQt_3_0_0)
void sort();
%End
%If (- TQt_2_00)
void setStyle(GUIStyle);
void setFont(const TQFont &);
void setPalette(const TQPalette &);
%End
%If (TQt_2_00 -)
virtual void setFont(const TQFont &); virtual void setFont(const TQFont &);
virtual void setPalette(const TQPalette &); virtual void setPalette(const TQPalette &);
%End
bool eventFilter(TQObject *,TQEvent *); bool eventFilter(TQObject *,TQEvent *);
TQSize sizeHint() const; TQSize sizeHint() const;
%If (TQt_2_00 -)
TQSize minimumSizeHint() const; TQSize minimumSizeHint() const;
%End
%If (TQt_2_1_0 -)
void setShowSortIndicator(bool); void setShowSortIndicator(bool);
bool showSortIndicator() const; bool showSortIndicator() const;
%End
%If (TQt_3_0_0 -)
virtual void setShowToolTips(bool); virtual void setShowToolTips(bool);
bool showToolTips() const; bool showToolTips() const;
@ -474,83 +311,51 @@ public:
virtual void setDefaultRenameAction(RenameAction); virtual void setDefaultRenameAction(RenameAction);
RenameAction defaultRenameAction() const; RenameAction defaultRenameAction() const;
bool isRenaming() const; bool isRenaming() const;
%End
%If (TQt_3_2_0 -)
void hideColumn(int); void hideColumn(int);
%End
public slots: public slots:
%If (TQt_3_0_0 -)
virtual void clear(); virtual void clear();
%End
%If (TQt_2_1_0 -)
void invertSelection(); void invertSelection();
void selectAll(bool); void selectAll(bool);
void setContentsPos(int,int); void setContentsPos(int,int);
%End
void triggerUpdate(); void triggerUpdate();
%If (TQt_3_2_0 -)
void adjustColumn(int); void adjustColumn(int);
%End
signals: signals:
void selectionChanged(); void selectionChanged();
void selectionChanged(TQListViewItem *); void selectionChanged(TQListViewItem *);
void currentChanged(TQListViewItem *); void currentChanged(TQListViewItem *);
%If (TQt_2_1_0 -)
void clicked(TQListViewItem *); void clicked(TQListViewItem *);
void clicked(TQListViewItem *,const TQPoint &,int); void clicked(TQListViewItem *,const TQPoint &,int);
void pressed(TQListViewItem *); void pressed(TQListViewItem *);
void pressed(TQListViewItem *,const TQPoint &,int); void pressed(TQListViewItem *,const TQPoint &,int);
%End
void doubleClicked(TQListViewItem *); void doubleClicked(TQListViewItem *);
%If (TQt_3_2_0 -)
void doubleClicked(TQListViewItem *,const TQPoint &,int); void doubleClicked(TQListViewItem *,const TQPoint &,int);
%End
void returnPressed(TQListViewItem *); void returnPressed(TQListViewItem *);
%If (TQt_3_0_0 -)
void spacePressed(TQListViewItem *); void spacePressed(TQListViewItem *);
%End
void rightButtonClicked(TQListViewItem *,const TQPoint &,int); void rightButtonClicked(TQListViewItem *,const TQPoint &,int);
void rightButtonPressed(TQListViewItem *,const TQPoint &,int); void rightButtonPressed(TQListViewItem *,const TQPoint &,int);
%If (TQt_2_1_0 -)
void mouseButtonPressed(int,TQListViewItem *,const TQPoint &,int); void mouseButtonPressed(int,TQListViewItem *,const TQPoint &,int);
void mouseButtonClicked(int,TQListViewItem *,const TQPoint &,int); void mouseButtonClicked(int,TQListViewItem *,const TQPoint &,int);
%End
%If (TQt_3_0_0 -)
void contextMenuRequested(TQListViewItem *,const TQPoint &,int); void contextMenuRequested(TQListViewItem *,const TQPoint &,int);
%End
%If (TQt_2_1_0 -)
void onItem(TQListViewItem *); void onItem(TQListViewItem *);
void onViewport(); void onViewport();
void expanded(TQListViewItem *); void expanded(TQListViewItem *);
void collapsed(TQListViewItem *); void collapsed(TQListViewItem *);
%End
%If (TQt_3_0_0 -)
void dropped(TQDropEvent *); void dropped(TQDropEvent *);
void itemRenamed(TQListViewItem *,int,const TQString &); void itemRenamed(TQListViewItem *,int,const TQString &);
void itemRenamed(TQListViewItem *,int); void itemRenamed(TQListViewItem *,int);
%End
protected: protected:
%If (- TQt_2_00)
void mousePressEvent(TQMouseEvent *);
void mouseReleaseEvent(TQMouseEvent *);
void mouseMoveEvent(TQMouseEvent *);
void mouseDoubleClickEvent(TQMouseEvent *);
%End
%If (TQt_2_00 -)
void contentsMousePressEvent(TQMouseEvent *); void contentsMousePressEvent(TQMouseEvent *);
void contentsMouseReleaseEvent(TQMouseEvent *); void contentsMouseReleaseEvent(TQMouseEvent *);
void contentsMouseMoveEvent(TQMouseEvent *); void contentsMouseMoveEvent(TQMouseEvent *);
void contentsMouseDoubleClickEvent(TQMouseEvent *); void contentsMouseDoubleClickEvent(TQMouseEvent *);
%End
%If (TQt_3_0_0 -)
void contentsContextMenuEvent(TQContextMenuEvent *); void contentsContextMenuEvent(TQContextMenuEvent *);
void contentsDragEnterEvent(TQDragEnterEvent *); void contentsDragEnterEvent(TQDragEnterEvent *);
void contentsDragMoveEvent(TQDragMoveEvent *); void contentsDragMoveEvent(TQDragMoveEvent *);
@ -558,7 +363,6 @@ protected:
void contentsDropEvent(TQDropEvent *); void contentsDropEvent(TQDropEvent *);
virtual TQDragObject *dragObject(); virtual TQDragObject *dragObject();
virtual void startDrag(); virtual void startDrag();
%End
void focusInEvent(TQFocusEvent *); void focusInEvent(TQFocusEvent *);
void focusOutEvent(TQFocusEvent *); void focusOutEvent(TQFocusEvent *);
@ -566,37 +370,22 @@ protected:
void keyPressEvent(TQKeyEvent *); void keyPressEvent(TQKeyEvent *);
void resizeEvent(TQResizeEvent *); void resizeEvent(TQResizeEvent *);
%If (TQt_3_0_0 -)
void viewportResizeEvent(TQResizeEvent *); void viewportResizeEvent(TQResizeEvent *);
%End
%If (TQt_2_00 -)
void showEvent(TQShowEvent *); void showEvent(TQShowEvent *);
%End
void drawContentsOffset(TQPainter *,int,int,int,int,int,int); void drawContentsOffset(TQPainter *,int,int,int,int,int,int);
virtual void paintEmptyArea(TQPainter *,const TQRect &); virtual void paintEmptyArea(TQPainter *,const TQRect &);
%If (TQt_2_00 -)
void styleChange(TQStyle &); void styleChange(TQStyle &);
%End
%If (- TQt_3_0_0)
void enabledChange(bool);
%End
%If (TQt_3_0_0 -)
void windowActivationChange(bool); void windowActivationChange(bool);
%End
protected slots: protected slots:
void updateContents(); void updateContents();
%If (TQt_2_00 -)
void doAutoScroll(); void doAutoScroll();
%End
private: private:
%If (TQt_2_1_0 -)
TQListView(const TQWidget &); TQListView(const TQWidget &);
%End
}; };
@ -611,21 +400,16 @@ public:
RadioButton, RadioButton,
CheckBox, CheckBox,
Controller, Controller,
%If (TQt_3_2_0 -)
RadioButtonController, RadioButtonController,
CheckBoxController, CheckBoxController,
%End
}; };
%If (TQt_3_2_0 -)
enum ToggleState { enum ToggleState {
Off, Off,
NoChange, NoChange,
On On
}; };
%End
%If (TQt_3_2_0 -)
TQCheckListItem(TQCheckListItem * /TransferThis/,const TQString &, TQCheckListItem(TQCheckListItem * /TransferThis/,const TQString &,
Type = RadioButtonController); Type = RadioButtonController);
TQCheckListItem(TQCheckListItem * /TransferThis/,TQListViewItem *, TQCheckListItem(TQCheckListItem * /TransferThis/,TQListViewItem *,
@ -638,91 +422,36 @@ public:
Type = RadioButtonController); Type = RadioButtonController);
TQCheckListItem(TQListView * /TransferThis/,TQListViewItem *, TQCheckListItem(TQListView * /TransferThis/,TQListViewItem *,
const TQString &,Type = RadioButtonController); const TQString &,Type = RadioButtonController);
%End
%If (TQt_2_00 - TQt_3_2_0)
TQCheckListItem(TQCheckListItem * /TransferThis/,const TQString &,
Type = Controller);
%If (TQt_3_1_0 -)
TQCheckListItem(TQCheckListItem * /TransferThis/,TQListViewItem *,
const TQString &,Type = Controller);
%End
TQCheckListItem(TQListViewItem * /TransferThis/,const TQString &,
Type = Controller);
%If (TQt_3_1_0 -)
TQCheckListItem(TQListViewItem * /TransferThis/,TQListViewItem *,
const TQString &,Type = Controller);
%End
TQCheckListItem(TQListView * /TransferThis/,const TQString &,
Type = Controller);
%If (TQt_3_1_0 -)
TQCheckListItem(TQListView * /TransferThis/,TQListViewItem *,
const TQString &,Type = Controller);
%End
%End
%If (TQt_2_00 -)
TQCheckListItem(TQListViewItem * /TransferThis/,const TQString &, TQCheckListItem(TQListViewItem * /TransferThis/,const TQString &,
const TQPixmap &); const TQPixmap &);
TQCheckListItem(TQListView * /TransferThis/,const TQString &, TQCheckListItem(TQListView * /TransferThis/,const TQString &,
const TQPixmap &); const TQPixmap &);
%End
%If (- TQt_2_00)
TQCheckListItem(TQCheckListItem * /TransferThis/,const char *,
Type = Controller);
TQCheckListItem(TQListView * /TransferThis/,const char *,
Type = Controller);
TQCheckListItem(TQListViewItem * /TransferThis/,const char *,
const TQPixmap &);
TQCheckListItem(TQListView * /TransferThis/,const char *,
const TQPixmap &);
%End
void paintCell(TQPainter *,const TQColorGroup &,int,int,int); void paintCell(TQPainter *,const TQColorGroup &,int,int,int);
%If (TQt_2_00 -)
virtual void paintFocus(TQPainter *,const TQColorGroup &,const TQRect &); virtual void paintFocus(TQPainter *,const TQColorGroup &,const TQRect &);
%End
int width(const TQFontMetrics &,const TQListView *,int) const; int width(const TQFontMetrics &,const TQListView *,int) const;
void setup(); void setup();
%If (- TQt_2_00)
void setOn(bool);
%End
%If (TQt_2_00 -)
virtual void setOn(bool); virtual void setOn(bool);
%End
bool isOn() const; bool isOn() const;
Type type() const; Type type() const;
%If (- TQt_2_00)
const char *text() const;
const char *text(int) const;
%End
%If (TQt_2_00 -)
TQString text() const; TQString text() const;
TQString text(int) const; TQString text(int) const;
%End
%If (TQt_3_2_0 -)
void setTristate(bool); void setTristate(bool);
bool isTristate() const; bool isTristate() const;
ToggleState state() const; ToggleState state() const;
void setState(ToggleState); void setState(ToggleState);
%End
%If (TQt_3_0_0 -)
int rtti() const; int rtti() const;
%End
protected: protected:
%If (- TQt_3_0_0)
void paintBranches(TQPainter *,const TQColorGroup &,int,int,int,GUIStyle);
%End
void activate(); void activate();
void turnOffChild(); void turnOffChild();
virtual void stateChange(bool); virtual void stateChange(bool);
}; };
%If (TQt_2_00 -)
class TQListViewItemIterator class TQListViewItemIterator
{ {
%TypeHeaderCode %TypeHeaderCode
@ -730,7 +459,6 @@ class TQListViewItemIterator
%End %End
public: public:
%If (TQt_3_2_0 -)
enum IteratorFlag { enum IteratorFlag {
Visible, Visible,
Invisible, Invisible,
@ -747,24 +475,17 @@ public:
Checked, Checked,
NotChecked NotChecked
}; };
%End
TQListViewItemIterator(); TQListViewItemIterator();
TQListViewItemIterator(TQListViewItem *); TQListViewItemIterator(TQListViewItem *);
%If (TQt_3_2_0 -)
TQListViewItemIterator(TQListViewItem *,int); TQListViewItemIterator(TQListViewItem *,int);
%End
TQListViewItemIterator(const TQListViewItemIterator &); TQListViewItemIterator(const TQListViewItemIterator &);
TQListViewItemIterator(TQListView *); TQListViewItemIterator(TQListView *);
%If (TQt_3_2_0 -)
TQListViewItemIterator(TQListView *,int); TQListViewItemIterator(TQListView *,int);
%End
TQListViewItemIterator &operator+=(int); TQListViewItemIterator &operator+=(int);
TQListViewItemIterator &operator-=(int); TQListViewItemIterator &operator-=(int);
TQListViewItem *current() const; TQListViewItem *current() const;
}; };
%End

@ -97,8 +97,6 @@ This returns a tuple of the <Literal>double</Literal> result and the
%End %End
%If (TQt_3_3_0 -)
class TQLocale class TQLocale
{ {
%TypeHeaderCode %TypeHeaderCode
@ -533,5 +531,3 @@ public:
static TQLocale c(); static TQLocale c();
static TQLocale system(); static TQLocale system();
}; };
%End

@ -19,6 +19,7 @@
// 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.
%DefaultEncoding "UTF-8"
%ExportedDoc %ExportedDoc
<Sect2><Title>TQMainWindow</Title> <Sect2><Title>TQMainWindow</Title>
@ -72,12 +73,7 @@ class TQMainWindow : TQWidget
%End %End
public: public:
%If (- TQt_2_00)
TQMainWindow(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0);
%End
%If (TQt_2_00 -)
TQMainWindow(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = WType_TopLevel); TQMainWindow(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = WType_TopLevel);
%End
TQMenuBar *menuBar() const; TQMenuBar *menuBar() const;
TQStatusBar *statusBar() const; TQStatusBar *statusBar() const;
@ -85,52 +81,7 @@ public:
virtual void setCentralWidget(TQWidget *); virtual void setCentralWidget(TQWidget *);
TQWidget *centralWidget() const; TQWidget *centralWidget() const;
%If (- TQt_2_1_0)
enum ToolBarDock {
Unmanaged,
TornOff,
Top,
Bottom,
Right,
Left
};
%End
%If (TQt_2_1_0 - TQt_3_0_0)
enum ToolBarDock {
Unmanaged,
TornOff,
Top,
Bottom,
Right,
Left,
Minimized
};
%End
%If (- TQt_2_00)
void setDockEnabled(ToolBarDock,bool);
void addToolBar(TQToolBar *,const char *,ToolBarDock = Top,bool = 0);
%End
%If (TQt_2_00 - TQt_3_0_0)
virtual void setDockEnabled(ToolBarDock,bool);
void addToolBar(TQToolBar *,ToolBarDock = Top,bool = 0);
void addToolBar(TQToolBar *,const TQString &,ToolBarDock = Top,bool = 0);
void moveToolBar(TQToolBar *,ToolBarDock = Top);
%End
%If (TQt_2_1_0 - TQt_3_0_0)
void setDockEnabled(TQToolBar *,ToolBarDock,bool);
bool isDockEnabled(TQToolBar *,ToolBarDock) const;
void moveToolBar(TQToolBar *,ToolBarDock,bool,int,int = -1);
bool toolBarsMovable() const;
%End
%If (TQt_3_0_0 -)
virtual void setDockEnabled(Dock,bool); virtual void setDockEnabled(Dock,bool);
%End
%If (- TQt_3_0_0)
bool isDockEnabled(ToolBarDock) const;
void removeToolBar(TQToolBar *);
%End
%If (TQt_3_0_0 -)
bool isDockEnabled(Dock) const; bool isDockEnabled(Dock) const;
bool isDockEnabled(TQDockArea *) const; bool isDockEnabled(TQDockArea *) const;
virtual void setDockEnabled(TQDockWindow *,Dock,bool); virtual void setDockEnabled(TQDockWindow *,Dock,bool);
@ -143,53 +94,29 @@ public:
virtual void moveDockWindow(TQDockWindow *,Dock = DockTop); virtual void moveDockWindow(TQDockWindow *,Dock = DockTop);
virtual void moveDockWindow(TQDockWindow *,Dock,bool,int,int = -1); virtual void moveDockWindow(TQDockWindow *,Dock,bool,int,int = -1);
virtual void removeDockWindow(TQDockWindow *); virtual void removeDockWindow(TQDockWindow *);
%End
void show(); void show();
%If (TQt_3_1_0 -)
void hide(); void hide();
%End
%If (TQt_2_1_0 -)
TQSize sizeHint() const; TQSize sizeHint() const;
TQSize minimumSizeHint() const; TQSize minimumSizeHint() const;
%End
bool rightJustification() const; bool rightJustification() const;
bool usesBigPixmaps() const; bool usesBigPixmaps() const;
%If (TQt_2_1_0 -)
bool usesTextLabel() const; bool usesTextLabel() const;
%End
%If (TQt_3_0_0 -)
bool dockWindowsMovable() const; bool dockWindowsMovable() const;
%End
%If (TQt_2_1_0 -)
bool opaqueMoving() const; bool opaqueMoving() const;
%End
bool eventFilter(TQObject *,TQEvent *); bool eventFilter(TQObject *,TQEvent *);
%If (TQt_3_0_0 -)
bool getLocation(TQDockWindow *,Dock &,int &,bool &,int &) const; bool getLocation(TQDockWindow *,Dock &,int &,bool &,int &) const;
%End
%If (TQt_2_1_0 - TQt_3_0_0)
bool getLocation(TQToolBar *,ToolBarDock &,int &,bool &,int &) const;
%End
%If (TQt_2_1_0 - TQt_3_0_0)
TQList<TQToolBar> toolBars(ToolBarDock) const;
%End
%If (TQt_3_0_0 -)
TQPtrList<TQDockWindow> dockWindows(Dock) const; TQPtrList<TQDockWindow> dockWindows(Dock) const;
TQPtrList<TQDockWindow> dockWindows() const; TQPtrList<TQDockWindow> dockWindows() const;
void lineUpDockWindows(bool = 0); void lineUpDockWindows(bool = 0);
%End
%If (TQt_2_1_0 -)
void lineUpToolBars(bool = 0); void lineUpToolBars(bool = 0);
bool isDockMenuEnabled() const; bool isDockMenuEnabled() const;
%End
%If (TQt_3_0_0 -)
bool hasDockWindow(TQDockWindow *); bool hasDockWindow(TQDockWindow *);
TQPtrList<TQToolBar> toolBars(Dock) const; TQPtrList<TQToolBar> toolBars(Dock) const;
@ -211,79 +138,34 @@ public:
}; };
TQPopupMenu *createDockWindowMenu(DockWindows = AllDockWindows) const; TQPopupMenu *createDockWindowMenu(DockWindows = AllDockWindows) const;
%End
public slots: public slots:
%If (- TQt_2_00)
void setRightJustification(bool);
void setUsesBigPixmaps(bool);
%End
%If (TQt_2_00 -)
virtual void setRightJustification(bool); virtual void setRightJustification(bool);
virtual void setUsesBigPixmaps(bool); virtual void setUsesBigPixmaps(bool);
%End
%If (TQt_2_1_0 - TQt_3_0_0)
void setUsesTextLabel(bool);
void setToolBarsMovable(bool);
void setOpaqueMoving(bool);
void setDockMenuEnabled(bool);
%End
%If (TQt_3_0_0 -)
virtual void setUsesTextLabel(bool); virtual void setUsesTextLabel(bool);
virtual void setDockWindowsMovable(bool); virtual void setDockWindowsMovable(bool);
virtual void setOpaqueMoving(bool); virtual void setOpaqueMoving(bool);
virtual void setDockMenuEnabled(bool); virtual void setDockMenuEnabled(bool);
%End
%If (TQt_2_00 - TQt_3_0_0)
void whatsThis();
%End
%If (TQt_3_0_0 -)
virtual void whatsThis(); virtual void whatsThis();
virtual void setAppropriate(TQDockWindow *,bool); virtual void setAppropriate(TQDockWindow *,bool);
virtual void customize(); virtual void customize();
%End
signals: signals:
void pixmapSizeChanged(bool); void pixmapSizeChanged(bool);
%If (TQt_2_1_0 -)
void usesTextLabelChanged(bool); void usesTextLabelChanged(bool);
%End
%If (TQt_2_1_0 - TQt_3_0_0)
void startMovingToolBar(TQToolBar *);
void endMovingToolBar(TQToolBar *);
void toolBarPositionChanged(TQToolBar *);
%End
%If (TQt_3_0_0 -)
void dockWindowPositionChanged(TQDockWindow *); void dockWindowPositionChanged(TQDockWindow *);
%End
protected slots: protected slots:
%If (- TQt_2_00)
void setUpLayout();
%End
%If (TQt_2_00 -)
virtual void setUpLayout(); virtual void setUpLayout();
%End
%If (TQt_3_0_0 -)
virtual bool showDockMenu(const TQPoint &); virtual bool showDockMenu(const TQPoint &);
void menuAboutToShow(); void menuAboutToShow();
%End
protected: protected:
void paintEvent(TQPaintEvent *); void paintEvent(TQPaintEvent *);
%If (TQt_2_00 -)
void childEvent(TQChildEvent *); void childEvent(TQChildEvent *);
%End
bool event(TQEvent *); bool event(TQEvent *);
%If (TQt_2_00 - TQt_3_0_0)
void resizeEvent(TQResizeEvent *);
%End
%If (TQt_2_00 -)
void styleChange(TQStyle &); void styleChange(TQStyle &);
%End
private: private:
%If (TQt_2_00 -)
TQMainWindow(const TQMainWindow &); TQMainWindow(const TQMainWindow &);
%End
}; };

@ -31,8 +31,6 @@ converted to and from Python lists of the type.
%End %End
%If (TQt_3_0_0 -)
%MappedType TQMemArray<int> %MappedType TQMemArray<int>
{ {
%TypeHeaderCode %TypeHeaderCode
@ -50,7 +48,7 @@ converted to and from Python lists of the type.
// Get it. // Get it.
for (uint i = 0; i < sipCpp -> size(); ++i) for (uint i = 0; i < sipCpp -> size(); ++i)
if (PyList_SetItem(l,i,PyInt_FromLong((long)sipCpp -> at(i))) < 0) if (PyList_SetItem(l,i,PyLong_FromLong((long)sipCpp -> at(i))) < 0)
{ {
Py_DECREF(l); Py_DECREF(l);
@ -72,7 +70,7 @@ converted to and from Python lists of the type.
for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i) for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
{ {
(*qma)[i] = (int)PyInt_AsLong(PyList_GET_ITEM(sipPy,i)); (*qma)[i] = (int)PyLong_AsLong(PyList_GET_ITEM(sipPy,i));
if (PyErr_Occurred() != NULL) if (PyErr_Occurred() != NULL)
{ {
@ -117,7 +115,7 @@ template<TYPE>
return NULL; return NULL;
} }
PyList_SET_ITEM(l, i, tobj); PyList_SetItem(l, i, tobj);
} }
return l; return l;
@ -164,5 +162,3 @@ template<TYPE>
return sipGetState(sipTransferObj); return sipGetState(sipTransferObj);
%End %End
}; };
%End

@ -53,31 +53,18 @@ public:
}; };
Separator separator() const; Separator separator() const;
%If (- TQt_2_00)
void setSeparator(Separator);
%End
%If (TQt_2_00 -)
virtual void setSeparator(Separator); virtual void setSeparator(Separator);
%End
%If (TQt_2_1_0 -)
void setDefaultUp(bool); void setDefaultUp(bool);
bool isDefaultUp() const; bool isDefaultUp() const;
%End
%If (TQt_2_00 -)
bool customWhatsThis() const; bool customWhatsThis() const;
%End
%If (TQt_2_1_0 -)
TQSize sizeHint() const; TQSize sizeHint() const;
TQSize minimumSize() const; TQSize minimumSize() const;
TQSize minimumSizeHint() const; TQSize minimumSizeHint() const;
%End
%If (TQt_2_2_0 -)
void activateItemAt(int); void activateItemAt(int);
%End
signals: signals:
void activated(int); void activated(int);
@ -90,24 +77,16 @@ protected:
void mouseReleaseEvent(TQMouseEvent *); void mouseReleaseEvent(TQMouseEvent *);
void mouseMoveEvent(TQMouseEvent *); void mouseMoveEvent(TQMouseEvent *);
void keyPressEvent(TQKeyEvent *); void keyPressEvent(TQKeyEvent *);
%If (TQt_2_1_0 -)
void focusInEvent(TQFocusEvent *); void focusInEvent(TQFocusEvent *);
%End
%If (TQt_2_00 -)
void focusOutEvent(TQFocusEvent *); void focusOutEvent(TQFocusEvent *);
%End
void resizeEvent(TQResizeEvent *); void resizeEvent(TQResizeEvent *);
void leaveEvent(TQEvent *); void leaveEvent(TQEvent *);
void menuContentsChanged(); void menuContentsChanged();
void menuStateChanged(); void menuStateChanged();
%If (TQt_2_00 -)
void styleChange(TQStyle &); void styleChange(TQStyle &);
%End
%If (TQt_3_0_0 -)
int itemAtPos(const TQPoint &); int itemAtPos(const TQPoint &);
void hidePopups(); void hidePopups();
TQRect itemRect(int); TQRect itemRect(int);
%End
private: private:
void menuInsPopup(TQPopupMenu *); void menuInsPopup(TQPopupMenu *);

@ -47,8 +47,6 @@ Not implemented.
%End %End
%If (TQt_3_0_0 -)
// Even though this is an internal class, uic for TQt v3.1.0 generates code that // Even though this is an internal class, uic for TQt v3.1.0 generates code that
// uses it. // uses it.
class TQMenuItem class TQMenuItem
@ -66,15 +64,6 @@ private:
TQMenuItem(const TQMenuItem &); TQMenuItem(const TQMenuItem &);
}; };
%End
%If (- TQt_3_0_0)
class TQMenuItem;
%End
class TQMenuData class TQMenuData
{ {
@ -87,29 +76,6 @@ public:
uint count(); uint count();
%If (- TQt_2_00)
int insertItem(const char *,SIP_RXOBJ_CON,SIP_SLOT_CON(int),int = 0);
int insertItem(const TQPixmap &,SIP_RXOBJ_CON,SIP_SLOT_CON(int),int = 0);
int insertItem(const TQPixmap &,const char *,SIP_RXOBJ_CON,
SIP_SLOT_CON(int),int = 0);
int insertItem(const char *,SIP_RXOBJ_CON,SIP_SLOT_CON(int),int,int,
int = -1);
int insertItem(const TQPixmap &,SIP_RXOBJ_CON,SIP_SLOT_CON(int),int,int,
int = -1);
int insertItem(const TQPixmap&,const char *,SIP_RXOBJ_CON,SIP_SLOT_CON(int),
int,int,int = -1);
%End
%If (TQt_2_00 - TQt_3_0_0)
int insertItem(const TQString &,SIP_RXOBJ_CON,SIP_SLOT_CON(int),int = 0,
int = -1,int = -1);
int insertItem(const TQIconSet &,const TQString &,SIP_RXOBJ_CON,
SIP_SLOT_CON(int),int = 0,int = -1,int = -1);
int insertItem(const TQPixmap &,SIP_RXOBJ_CON,SIP_SLOT_CON(int),int = 0,
int = -1,int = -1);
int insertItem(const TQIconSet &,const TQPixmap &,SIP_RXOBJ_CON,
SIP_SLOT_CON(int),int = 0,int = -1,int = -1);
%End
%If (TQt_3_0_0 -)
int insertItem(const TQString &,SIP_RXOBJ_CON,SIP_SLOT_CON(int), int insertItem(const TQString &,SIP_RXOBJ_CON,SIP_SLOT_CON(int),
const TQKeySequence & = TQKeySequence(0),int = -1, const TQKeySequence & = TQKeySequence(0),int = -1,
int = -1); int = -1);
@ -124,90 +90,47 @@ public:
SIP_SLOT_CON(int), SIP_SLOT_CON(int),
const TQKeySequence & = TQKeySequence(0),int = -1, const TQKeySequence & = TQKeySequence(0),int = -1,
int = -1); int = -1);
%End
%If (- TQt_2_00)
int insertItem(const char *,int = -1,int = -1);
int insertItem(const char *,TQPopupMenu *,int = -1,int = -1);
int insertItem(const TQPixmap &,const char *,int = -1,int = -1);
int insertItem(const TQPixmap &,const char *,TQPopupMenu *,int = -1,
int = -1);
%End
%If (TQt_2_00 -)
int insertItem(const TQString &,int = -1,int = -1); int insertItem(const TQString &,int = -1,int = -1);
int insertItem(const TQIconSet &,const TQString &,int = -1,int = -1); int insertItem(const TQIconSet &,const TQString &,int = -1,int = -1);
int insertItem(const TQString &,TQPopupMenu *,int = -1,int = -1); int insertItem(const TQString &,TQPopupMenu *,int = -1,int = -1);
int insertItem(const TQIconSet &,const TQString &,TQPopupMenu *,int = -1, int insertItem(const TQIconSet &,const TQString &,TQPopupMenu *,int = -1,
int = -1); int = -1);
%End
int insertItem(const TQPixmap &,int = -1,int = -1); int insertItem(const TQPixmap &,int = -1,int = -1);
%If (TQt_2_00 -)
int insertItem(const TQIconSet &,const TQPixmap &,int = -1,int = -1); int insertItem(const TQIconSet &,const TQPixmap &,int = -1,int = -1);
%End
int insertItem(const TQPixmap &,TQPopupMenu *,int = -1,int = -1); int insertItem(const TQPixmap &,TQPopupMenu *,int = -1,int = -1);
%If (TQt_2_00 -)
int insertItem(const TQIconSet &,const TQPixmap &,TQPopupMenu *,int = -1, int insertItem(const TQIconSet &,const TQPixmap &,TQPopupMenu *,int = -1,
int = -1); int = -1);
%End
%If (TQt_2_1_0 -)
int insertItem(TQWidget * /Transfer/,int = -1,int = -1); int insertItem(TQWidget * /Transfer/,int = -1,int = -1);
int insertItem(const TQIconSet &,TQCustomMenuItem * /Transfer/,int = -1, int insertItem(const TQIconSet &,TQCustomMenuItem * /Transfer/,int = -1,
int = -1); int = -1);
int insertItem(TQCustomMenuItem * /Transfer/,int = -1,int = -1); int insertItem(TQCustomMenuItem * /Transfer/,int = -1,int = -1);
%End
%If (TQt_2_1_0 -)
int insertSeparator(int = -1); int insertSeparator(int = -1);
%End
%If (- TQt_2_1_0)
void insertSeparator(int = -1);
%End
void removeItem(int); void removeItem(int);
void removeItemAt(int); void removeItemAt(int);
void clear(); void clear();
%If (- TQt_3_0_0)
int accel(int) const;
void setAccel(int,int);
%End
%If (TQt_3_0_0 -)
TQKeySequence accel(int) const; TQKeySequence accel(int) const;
void setAccel(const TQKeySequence &,int); void setAccel(const TQKeySequence &,int);
%End
%If (- TQt_2_00)
const char *text(int) const;
%End
%If (TQt_2_00 -)
TQIconSet *iconSet(int) const; TQIconSet *iconSet(int) const;
TQString text(int) const; TQString text(int) const;
%End
TQPixmap *pixmap(int) const; TQPixmap *pixmap(int) const;
%If (TQt_2_00 -)
void setWhatsThis(int,const TQString &); void setWhatsThis(int,const TQString &);
TQString whatsThis(int) const; TQString whatsThis(int) const;
%End
%If (- TQt_2_00)
void changeItem(const char *,int);
void changeItem(const TQPixmap &,int);
void changeItem(const TQPixmap &,const char *,int);
%End
%If (TQt_2_00 -)
void changeItem(int,const TQString &); void changeItem(int,const TQString &);
void changeItem(int,const TQPixmap &); void changeItem(int,const TQPixmap &);
void changeItem(int,const TQIconSet &,const TQString &); void changeItem(int,const TQIconSet &,const TQString &);
void changeItem(int,const TQIconSet &,const TQPixmap &); void changeItem(int,const TQIconSet &,const TQPixmap &);
%End
%If (TQt_3_0_0 -)
bool isItemActive(int) const; bool isItemActive(int) const;
%End
bool isItemEnabled(int) const; bool isItemEnabled(int) const;
void setItemEnabled(int,bool); void setItemEnabled(int,bool);
@ -215,62 +138,40 @@ public:
bool isItemChecked(int) const; bool isItemChecked(int) const;
void setItemChecked(int,bool); void setItemChecked(int,bool);
%If (TQt_3_1_0 -)
bool isItemVisible(int) const; bool isItemVisible(int) const;
void setItemVisible(int,bool); void setItemVisible(int,bool);
%End
virtual void updateItem(int); virtual void updateItem(int);
int indexOf(int) const; int indexOf(int) const;
int idAt(int) const; int idAt(int) const;
%If (- TQt_2_00)
void setId(int,int);
%End
%If (TQt_2_00 -)
virtual void setId(int,int); virtual void setId(int,int);
%End
bool connectItem(int,SIP_RXOBJ_CON,SIP_SLOT_CON(int)); bool connectItem(int,SIP_RXOBJ_CON,SIP_SLOT_CON(int));
bool disconnectItem(int,SIP_RXOBJ_DIS,SIP_SLOT_DIS(int)); bool disconnectItem(int,SIP_RXOBJ_DIS,SIP_SLOT_DIS(int));
%If (TQt_2_1_0 -)
bool setItemParameter(int,int); bool setItemParameter(int,int);
int itemParameter(int) const; int itemParameter(int) const;
%End
TQMenuItem *findItem(int) const; TQMenuItem *findItem(int) const;
// TQMenuItem *findItem(int,TQMenuData **) const; // TQMenuItem *findItem(int,TQMenuData **) const;
%If (TQt_3_0_0 -)
// Not documented in the TQt3 API (the similar findPopup() was internal in // Not documented in the TQt3 API (the similar findPopup() was internal in
// TQt2). // TQt2).
// TQMenuItem *findItem(TQPopupMenu *,int * = 0) const; // TQMenuItem *findItem(TQPopupMenu *,int * = 0) const;
%End
%If (TQt_2_2_0 - TQt_3_0_0)
void activateItemAt(int);
%End
%If (TQt_3_0_0 -)
virtual void activateItemAt(int); virtual void activateItemAt(int);
%End
protected: protected:
virtual void menuContentsChanged(); virtual void menuContentsChanged();
virtual void menuStateChanged(); virtual void menuStateChanged();
virtual void menuInsPopup(TQPopupMenu *); virtual void menuInsPopup(TQPopupMenu *);
virtual void menuDelPopup(TQPopupMenu *); virtual void menuDelPopup(TQPopupMenu *);
%If (- TQt_3_0_0)
// Documented as internal in the TQt2 API.
// TQMenuItem *findPopup(TQPopupMenu *,int * = 0);
%End
private: private:
TQMenuData(const TQMenuData &); TQMenuData(const TQMenuData &);
}; };
%If (TQt_2_1_0 -)
class TQCustomMenuItem : TQt class TQCustomMenuItem : TQt
{ {
%TypeHeaderCode %TypeHeaderCode
@ -287,5 +188,3 @@ public:
int,int) = 0; int,int) = 0;
virtual TQSize sizeHint() = 0; virtual TQSize sizeHint() = 0;
}; };
%End

@ -43,22 +43,13 @@ public:
Information, Information,
Warning, Warning,
Critical, Critical,
%If (TQt_3_2_0 -)
Question, Question,
%End
}; };
TQMessageBox(TQWidget * /TransferThis/ = 0,const char * = 0); TQMessageBox(TQWidget * /TransferThis/ = 0,const char * = 0);
%If (- TQt_2_00)
TQMessageBox(const char *,const char *,Icon,int,int,int,
TQWidget * /TransferThis/ = 0,const char * = 0,bool = 1,
WFlags = 0);
%End
%If (TQt_2_00 -)
TQMessageBox(const TQString &,const TQString &,Icon,int,int,int, TQMessageBox(const TQString &,const TQString &,Icon,int,int,int,
TQWidget * /TransferThis/ = 0,const char * = 0,bool = 1, TQWidget * /TransferThis/ = 0,const char * = 0,bool = 1,
WFlags = WStyle_DialogBorder); WFlags = WStyle_DialogBorder);
%End
enum { enum {
Ok, Ok,
@ -68,42 +59,14 @@ public:
Abort, Abort,
Retry, Retry,
Ignore, Ignore,
%If (TQt_3_2_0 -)
YesAll, YesAll,
NoAll, NoAll,
%End
ButtonMask, ButtonMask,
Default, Default,
Escape, Escape,
FlagMask FlagMask
}; };
%If (- TQt_2_00)
static int information(TQWidget *,const char *,const char *,int,int = 0,
int = 0) /ReleaseGIL/;
static int information(TQWidget *,const char *,const char *,
const char * = "OK",const char * = 0,
const char * = 0,int = 0,int = -1) /ReleaseGIL/;
static int warning(TQWidget *,const char *,const char *,int,int,
int = 0) /ReleaseGIL/;
static int warning(TQWidget *,const char *,const char *,
const char * = "OK",const char * = 0,
const char * = 0,int = 0,int = -1) /ReleaseGIL/;
static int critical(TQWidget *,const char *,const char *,int,int,
int = 0) /ReleaseGIL/;
static int critical(TQWidget *,const char *,const char *,
const char * = "OK",const char * = 0,
const char * = 0,int = 0,int = -1) /ReleaseGIL/;
static void about(TQWidget *,const char *,const char *) /ReleaseGIL/;
static void aboutTQt(TQWidget *,const char * = 0) /ReleaseGIL/;
const char *text() const;
void setText(const char *);
%End
%If (TQt_2_00 -)
static int information(TQWidget *,const TQString &,const TQString &,int, static int information(TQWidget *,const TQString &,const TQString &,int,
int = 0,int = 0) /ReleaseGIL/; int = 0,int = 0) /ReleaseGIL/;
static int information(TQWidget *,const TQString &,const TQString &, static int information(TQWidget *,const TQString &,const TQString &,
@ -112,7 +75,6 @@ public:
const TQString & = TQString::null, const TQString & = TQString::null,
int = 0,int = -1) /ReleaseGIL/; int = 0,int = -1) /ReleaseGIL/;
%If (TQt_3_2_0 -)
static int question(TQWidget *,const TQString &,const TQString &,int, static int question(TQWidget *,const TQString &,const TQString &,int,
int = 0,int = 0) /ReleaseGIL/; int = 0,int = 0) /ReleaseGIL/;
static int question(TQWidget *,const TQString &,const TQString &, static int question(TQWidget *,const TQString &,const TQString &,
@ -120,7 +82,6 @@ public:
const TQString & = TQString::null, const TQString & = TQString::null,
const TQString & = TQString::null, const TQString & = TQString::null,
int = 0,int = -1) /ReleaseGIL/; int = 0,int = -1) /ReleaseGIL/;
%End
static int warning(TQWidget *,const TQString &,const TQString &,int, static int warning(TQWidget *,const TQString &,const TQString &,int,
int = 0,int = 0) /ReleaseGIL/; int = 0,int = 0) /ReleaseGIL/;
@ -145,57 +106,31 @@ public:
TQString text() const; TQString text() const;
void setText(const TQString &); void setText(const TQString &);
%End
Icon icon() const; Icon icon() const;
void setIcon(Icon); void setIcon(Icon);
%If (TQt_2_00 -)
void setIcon(const TQPixmap &); void setIcon(const TQPixmap &);
%End
const TQPixmap *iconPixmap() const; const TQPixmap *iconPixmap() const;
void setIconPixmap(const TQPixmap &); void setIconPixmap(const TQPixmap &);
%If (- TQt_2_00)
const char *buttonText(int) const;
void setButtonText(int,const char *);
%End
%If (TQt_2_00 -)
TQString buttonText(int) const; TQString buttonText(int) const;
void setButtonText(int,const TQString &); void setButtonText(int,const TQString &);
%End
void adjustSize(); void adjustSize();
%If (- TQt_3_0_0)
static TQPixmap standardIcon(Icon,GUIStyle);
%End
%If (TQt_3_0_0 -)
static TQPixmap standardIcon(Icon); static TQPixmap standardIcon(Icon);
%End
%If (TQt_2_1_0 -)
TextFormat textFormat() const; TextFormat textFormat() const;
void setTextFormat(TextFormat); void setTextFormat(TextFormat);
%End
%If (- TQt_2_00)
void setStyle(GUIStyle);
%End
protected: protected:
void resizeEvent(TQResizeEvent *); void resizeEvent(TQResizeEvent *);
%If (TQt_3_0_0 -)
void showEvent(TQShowEvent *); void showEvent(TQShowEvent *);
%End
%If (TQt_3_2_0 -)
void closeEvent(TQCloseEvent *); void closeEvent(TQCloseEvent *);
%End
void keyPressEvent(TQKeyEvent *); void keyPressEvent(TQKeyEvent *);
%If (TQt_2_00 -)
void styleChanged(TQStyle &); void styleChanged(TQStyle &);
%End
private: private:
TQMessageBox(const TQMessageBox &); TQMessageBox(const TQMessageBox &);

@ -58,7 +58,6 @@ public:
const char *superClassName() const; const char *superClassName() const;
TQMetaObject *superClass() const; TQMetaObject *superClass() const;
%If (TQt_2_1_0 -)
bool inherits(const char *) const; bool inherits(const char *) const;
int numSlots(bool = 0) const; int numSlots(bool = 0) const;
@ -72,18 +71,12 @@ public:
const char *classInfo(const char *,bool = 0) const; const char *classInfo(const char *,bool = 0) const;
%If (TQt_PROPERTIES) %If (TQt_PROPERTIES)
%If (TQt_3_0_0 -)
const TQMetaProperty *property(int,bool = 0) const; const TQMetaProperty *property(int,bool = 0) const;
int findProperty(const char *,bool = 0) const; int findProperty(const char *,bool = 0) const;
int numProperties(bool = 0) const; int numProperties(bool = 0) const;
%End
%If (- TQt_3_0_0)
const TQMetaProperty *property(const char *,bool = 0) const;
%End
TQStrList propertyNames(bool = 0) const; TQStrList propertyNames(bool = 0) const;
%End %End
%End
private: private:
TQMetaObject(const TQMetaObject &); TQMetaObject(const TQMetaObject &);
@ -91,7 +84,6 @@ private:
%If (TQt_PROPERTIES) %If (TQt_PROPERTIES)
%If (TQt_2_1_0 -)
class TQMetaProperty class TQMetaProperty
{ {
@ -103,12 +95,7 @@ public:
const char *type() const; const char *type() const;
const char *name() const; const char *name() const;
%If (TQt_2_2_0 -)
bool writable() const; bool writable() const;
%End
%If (- TQt_3_0_0)
bool writeable() const;
%End
bool isValid() const; bool isValid() const;
bool isSetType() const; bool isSetType() const;
@ -120,51 +107,11 @@ public:
int keysToValue(const TQStrList &) const; int keysToValue(const TQStrList &) const;
TQStrList valueToKeys(int) const; TQStrList valueToKeys(int) const;
%If (TQt_3_1_0 -)
bool designable(TQObject * = 0) const; bool designable(TQObject * = 0) const;
bool scriptable(TQObject * = 0) const; bool scriptable(TQObject * = 0) const;
bool stored(TQObject * = 0) const; bool stored(TQObject * = 0) const;
%End
%If (TQt_3_0_0 - TQt_3_1_0)
bool designable(TQObject *) const;
bool scriptable(TQObject *) const;
bool stored(TQObject *) const;
%End
%If (TQt_3_0_0 -)
bool reset(TQObject *) const; bool reset(TQObject *) const;
%End
%If (- TQt_3_0_0)
bool stored(TQObject *) const;
bool designable() const;
enum Specification {
Unspecified,
Class,
Reference,
Pointer,
ConstCharStar
};
enum Flags {
UnresolvedEnum,
UnresolvedSet,
UnresolvedEnumOrSet,
UnresolvedStored,
UnresolvedDesignable,
NotDesignable,
NotStored,
%If (TQt_2_2_0 -)
StdSet,
%End
};
bool testFlags(uint) const;
void setFlags(uint);
void clearFlags(uint);
%End
}; };
%End %End
%End

@ -42,8 +42,6 @@
%End %End
%If (TQt_2_00 -)
class TQMimeSource class TQMimeSource
{ {
%TypeHeaderCode %TypeHeaderCode
@ -51,16 +49,12 @@ class TQMimeSource
%End %End
public: public:
%If (TQt_3_0_0 -)
TQMimeSource(); TQMimeSource();
%End
virtual const char *format(int = 0) const = 0; virtual const char *format(int = 0) const = 0;
virtual bool provides(const char *) const; virtual bool provides(const char *) const;
virtual TQByteArray encodedData(const char *) const = 0; virtual TQByteArray encodedData(const char *) const = 0;
%If (TQt_3_0_0 -)
int serialNumber() const; int serialNumber() const;
%End
}; };
@ -75,11 +69,9 @@ public:
static TQMimeSourceFactory *defaultFactory(); static TQMimeSourceFactory *defaultFactory();
static void setDefaultFactory(TQMimeSourceFactory * /Transfer/); static void setDefaultFactory(TQMimeSourceFactory * /Transfer/);
%If (TQt_3_0_0 -)
static TQMimeSourceFactory *takeDefaultFactory() /TransferBack/; static TQMimeSourceFactory *takeDefaultFactory() /TransferBack/;
static void addFactory(TQMimeSourceFactory *); static void addFactory(TQMimeSourceFactory *);
static void removeFactory(TQMimeSourceFactory *); static void removeFactory(TQMimeSourceFactory *);
%End
virtual const TQMimeSource *data(const TQString &) const; virtual const TQMimeSource *data(const TQString &) const;
virtual TQString makeAbsolute(const TQString &,const TQString &) const; virtual TQString makeAbsolute(const TQString &,const TQString &) const;
@ -90,15 +82,7 @@ public:
virtual void setPixmap(const TQString &,const TQPixmap &); virtual void setPixmap(const TQString &,const TQPixmap &);
virtual void setData(const TQString &,TQMimeSource * /Transfer/); virtual void setData(const TQString &,TQMimeSource * /Transfer/);
virtual void setFilePath(const TQStringList &); virtual void setFilePath(const TQStringList &);
%If (TQt_2_1_0 -)
virtual TQStringList filePath() const; virtual TQStringList filePath() const;
void addFilePath(const TQString &); void addFilePath(const TQString &);
%End
virtual void setExtensionType(const TQString &,const char *); virtual void setExtensionType(const TQString &,const char *);
}; };
%End
%If (TQt_3_0_0 -)
%End

@ -51,7 +51,6 @@ This takes only the <Literal>sb</Literal> parameter and returns a tuple of the
%If (TQt_STYLE_MOTIFPLUS) %If (TQt_STYLE_MOTIFPLUS)
%If (TQt_2_2_0 -)
class TQMotifPlusStyle : TQMotifStyle class TQMotifPlusStyle : TQMotifStyle
{ {
@ -60,12 +59,7 @@ class TQMotifPlusStyle : TQMotifStyle
%End %End
public: public:
%If (- TQt_3_0_5)
TQMotifPlusStyle(bool = 0);
%End
%If (TQt_3_0_5 -)
TQMotifPlusStyle(bool = 1); TQMotifPlusStyle(bool = 1);
%End
void polish(TQPalette &pal); void polish(TQPalette &pal);
void polish(const TQStyleControlElementData&, ControlElementFlags, void *); void polish(const TQStyleControlElementData&, ControlElementFlags, void *);
@ -74,45 +68,6 @@ public:
void applicationPolish(const TQStyleControlElementData&, ControlElementFlags, void *); void applicationPolish(const TQStyleControlElementData&, ControlElementFlags, void *);
void applicationUnPolish(const TQStyleControlElementData&, ControlElementFlags, void *); void applicationUnPolish(const TQStyleControlElementData&, ControlElementFlags, void *);
%If (- TQt_3_0_0)
int defaultFrameWidth() const;
void drawArrow(TQPainter *,ArrowType,bool,int,int,int,int,
const TQColorGroup &,bool,const TQBrush * = 0);
void drawMenuBarItem(TQPainter *,int,int,int,int,TQMenuItem *,
TQColorGroup &,bool,bool);
void drawPopupMenuItem(TQPainter *,bool,int,int,TQMenuItem *,
const TQPalette &,bool,bool,int,int,int,int);
void drawPushButton(TQPushButton *,TQPainter *);
void drawButton(TQPainter *,int,int,int,int,const TQColorGroup &,bool = 0,
const TQBrush * = 0);
void drawBevelButton(TQPainter *,int,int,int,int,const TQColorGroup &,
bool = 0,const TQBrush * = 0);
void getButtonShift(int &,int &);
void drawComboButton(TQPainter *,int,int,int,int,const TQColorGroup &,
bool = 0,bool = 0,bool = 1,const TQBrush * = 0);
TQRect comboButtonRect(int,int,int,int);
TQRect comboButtonFocusRect(int,int,int,int);
void drawIndicator(TQPainter *,int,int,int,int,const TQColorGroup &,int,
bool = 0,bool = 1);
TQSize indicatorSize() const;
void drawExclusiveIndicator(TQPainter *,int,int,int,int,
const TQColorGroup &,bool,bool = 0,bool = 1);
TQSize exclusiveIndicatorSize() const;
void drawPanel(TQPainter *,int,int,int,int,const TQColorGroup &,bool = 0,
int = 1,const TQBrush * = 0);
void scrollBarMetrics(const TQScrollBar *,int &,int &,int &,int &);
void drawScrollBarControls(TQPainter *,const TQScrollBar *,int,uint,uint);
void drawTab(TQPainter *,const TQTabBar *,TQTab *,bool);
void drawSlider(TQPainter *,int,int,int,int,const TQColorGroup &,
Orientation,bool,bool);
void drawSliderGroove(TQPainter *,int,int,int,int,const TQColorGroup &,
TQCOORD,Orientation);
%End
%If (TQt_3_0_0 -)
void drawPrimitive(PrimitiveElement,TQPainter *,const TQStyleControlElementData&,ControlElementFlags,const TQRect &, void drawPrimitive(PrimitiveElement,TQPainter *,const TQStyleControlElementData&,ControlElementFlags,const TQRect &,
const TQColorGroup &,SFlags = Style_Default, const TQColorGroup &,SFlags = Style_Default,
const TQStyleOption & = TQStyleOption()) const; const TQStyleOption & = TQStyleOption()) const;
@ -139,11 +94,9 @@ public:
int styleHint(StyleHint,const TQStyleControlElementData&,ControlElementFlags, int styleHint(StyleHint,const TQStyleControlElementData&,ControlElementFlags,
const TQStyleOption & = TQStyleOption(), const TQStyleOption & = TQStyleOption(),
TQStyleHintReturn * = 0, const TQWidget * = 0) const; TQStyleHintReturn * = 0, const TQWidget * = 0) const;
%End
protected: protected:
bool eventFilter(TQObject *,TQEvent *); bool eventFilter(TQObject *,TQEvent *);
}; };
%End %End
%End

@ -53,7 +53,6 @@ This takes only the <Literal>t</Literal> parameter and returns a tuple of the
%End %End
%If (TQt_2_00 -)
%If (TQt_STYLE_MOTIF) %If (TQt_STYLE_MOTIF)
class TQMotifStyle : TQCommonStyle class TQMotifStyle : TQCommonStyle
@ -74,57 +73,6 @@ public:
void polishPopupMenu( const TQStyleControlElementData&, ControlElementFlags, void * ); void polishPopupMenu( const TQStyleControlElementData&, ControlElementFlags, void * );
%If (- TQt_3_0_0)
void drawButton(TQPainter *,int,int,int,int,const TQColorGroup &,bool = 0,
const TQBrush * = 0);
void drawBevelButton(TQPainter *,int,int,int,int,const TQColorGroup &,
bool = 0,const TQBrush * = 0);
void drawFocusRect(TQPainter *,const TQRect &,const TQColorGroup &,
const TQColor * =0,bool = 0);
%If (TQt_2_1_0 -)
void drawComboButton(TQPainter *,int,int,int,int,const TQColorGroup &,
bool = 0,bool = 0,bool = 1,const TQBrush * = 0);
TQRect comboButtonRect(int,int,int,int);
TQRect comboButtonFocusRect(int,int,int,int);
%End
void drawPushButton(TQPushButton *,TQPainter *);
void drawArrow(TQPainter *,ArrowType,bool,int,int,int,int,
const TQColorGroup &,bool,const TQBrush * = 0);
TQSize indicatorSize() const;
void drawIndicator(TQPainter *,int,int,int,int,const TQColorGroup &,int,
bool = 0,bool = 1);
TQSize exclusiveIndicatorSize() const;
void drawExclusiveIndicator(TQPainter *,int,int,int,int,
const TQColorGroup &,bool,bool = 0,bool = 1);
void drawExclusiveIndicatorMask(TQPainter *,int,int,int,int,bool);
void tabbarMetrics(const TQTabBar *,int &,int &,int &);
void drawTab(TQPainter *,const TQTabBar *,TQTab *,bool);
void drawTabMask(TQPainter *,const TQTabBar *,TQTab *,bool);
void scrollBarMetrics(const TQScrollBar *,int &,int &,int &,int &);
void drawScrollBarControls(TQPainter *,const TQScrollBar *,int,uint,uint);
int sliderLength() const;
void drawSlider(TQPainter *,int,int,int,int,const TQColorGroup &,
Orientation,bool,bool);
void drawSliderGroove(TQPainter *,int,int,int,int,const TQColorGroup &,
TQCOORD,Orientation);
int splitterWidth() const;
void drawSplitter(TQPainter *,int,int,int,int,const TQColorGroup &,
Orientation);
void drawCheckMark(TQPainter *,int,int,int,int,const TQColorGroup &,bool,
bool);
void polishPopupMenu(TQPopupMenu *);
int extraPopupMenuItemWidth(bool,int,TQMenuItem *,const TQFontMetrics &);
int popupMenuItemHeight(bool,TQMenuItem *,const TQFontMetrics &);
void drawPopupMenuItem(TQPainter *,bool,int,int,TQMenuItem *,
const TQPalette &,bool,bool,int,int,int,int);
%End
%If (TQt_3_0_0 -)
void drawPrimitive(PrimitiveElement,TQPainter *,const TQStyleControlElementData&,ControlElementFlags,const TQRect &, void drawPrimitive(PrimitiveElement,TQPainter *,const TQStyleControlElementData&,ControlElementFlags,const TQRect &,
const TQColorGroup &,SFlags = Style_Default, const TQColorGroup &,SFlags = Style_Default,
const TQStyleOption & = TQStyleOption()) const; const TQStyleOption & = TQStyleOption()) const;
@ -156,13 +104,9 @@ public:
int styleHint(StyleHint,const TQStyleControlElementData&,ControlElementFlags, int styleHint(StyleHint,const TQStyleControlElementData&,ControlElementFlags,
const TQStyleOption & = TQStyleOption(), const TQStyleOption & = TQStyleOption(),
TQStyleHintReturn * = 0, const TQWidget * = 0) const; TQStyleHintReturn * = 0, const TQWidget * = 0) const;
%End
private: private:
%If (TQt_3_0_0 -)
TQMotifStyle(const TQMotifStyle &); TQMotifStyle(const TQMotifStyle &);
%End
}; };
%End %End
%End

@ -52,30 +52,19 @@ class TQMovie
public: public:
TQMovie(); TQMovie();
%If (TQt_2_2_0 -)
TQMovie(int); TQMovie(int);
%End
// TQMovie(TQDataSource *,int = 1024); // TQMovie(TQDataSource *,int = 1024);
%If (- TQt_2_00)
TQMovie(const char *,int = 1024);
%End
%If (TQt_2_00 -)
TQMovie(const TQString &,int = 1024); TQMovie(const TQString &,int = 1024);
%End
TQMovie(TQByteArray,int = 1024); TQMovie(TQByteArray,int = 1024);
TQMovie(const TQMovie &); TQMovie(const TQMovie &);
%If (TQt_2_2_0 -)
int pushSpace() const; int pushSpace() const;
void pushData(const uchar * /Array/,int /ArraySize/); void pushData(const uchar * /Array/,int /ArraySize/);
%End
const TQColor &backgroundColor() const; const TQColor &backgroundColor() const;
void setBackgroundColor(const TQColor &); void setBackgroundColor(const TQColor &);
const TQRect &getValidRect() const; const TQRect &getValidRect() const;
const TQPixmap &framePixmap() const; const TQPixmap &framePixmap() const;
%If (TQt_2_2_0 -)
const TQImage &frameImage() const; const TQImage &frameImage() const;
%End
bool isNull() const; bool isNull() const;
int frameNumber() const; int frameNumber() const;
int steps() const; int steps() const;

@ -66,8 +66,6 @@ This takes no parameters and returns a tuple of the bool result and the
%End %End
%If (TQt_3_0_0 -)
class TQMultiLineEdit : TQTextEdit class TQMultiLineEdit : TQTextEdit
{ {
%TypeHeaderCode %TypeHeaderCode
@ -81,22 +79,12 @@ public:
int numLines() const; int numLines() const;
virtual void insertLine(const TQString &,int = -1); virtual void insertLine(const TQString &,int = -1);
%If (TQt_3_1_0 -)
virtual void insertAt(const TQString &,int,int); virtual void insertAt(const TQString &,int,int);
virtual void insertAt(const TQString &,int,int,bool); virtual void insertAt(const TQString &,int,int,bool);
%End
%If (- TQt_3_1_0)
virtual void insertAt(const TQString &,int,int,bool = 0);
%End
virtual void removeLine(int); virtual void removeLine(int);
%If (TQt_3_1_0 -)
virtual void setCursorPosition(int,int); virtual void setCursorPosition(int,int);
virtual void setCursorPosition(int,int,bool); virtual void setCursorPosition(int,int,bool);
%End
%If (- TQt_3_1_0)
virtual void setCursorPosition(int,int,bool = 0);
%End
bool atBeginning() const; bool atBeginning() const;
bool atEnd() const; bool atEnd() const;
@ -144,231 +132,3 @@ protected:
private: private:
TQMultiLineEdit(const TQMultiLineEdit &); TQMultiLineEdit(const TQMultiLineEdit &);
}; };
%End
%If (- TQt_3_0_0)
class TQMultiLineEdit : TQTableView
{
%TypeHeaderCode
#include <tqmultilinedit.h>
%End
public:
TQMultiLineEdit(TQWidget * /TransferThis/ = 0,const char * = 0);
int numLines() const;
virtual void removeLine(int);
void cursorPosition(int *,int *) const;
void getCursorPosition(int *,int *) const;
bool atBeginning() const;
bool atEnd() const;
int maxLineWidth() const;
bool autoUpdate() const;
bool isReadOnly() const;
bool isOverwriteMode() const;
TQString text() const;
%If (- TQt_2_00)
const char *textLine(int) const;
void setFont(const TQFont &);
virtual void insertLine(const char *,int = -1);
virtual void insertAt(const char *,int,int);
void setCursorPosition(int,int,bool = 0);
void setFixedVisibleLines(int);
void setAutoUpdate(bool);
%End
%If (TQt_2_00 -)
TQString textLine(int) const;
TQSize sizeHint() const;
TQSize minimumSizeHint() const;
TQSizePolicy sizePolicy() const;
virtual void setFont(const TQFont &);
virtual void insertLine(const TQString &,int = -1);
virtual void insertAt(const TQString &,int,int,bool = 0);
virtual void setCursorPosition(int,int,bool = 0);
virtual void setFixedVisibleLines(int);
void setAlignment(int);
int alignment() const;
virtual void setValidator(const TQValidator *);
const TQValidator *validator() const;
void setEdited(bool);
bool edited() const;
void cursorWordForward(bool);
void cursorWordBackward(bool);
enum EchoMode
{
Normal,
NoEcho,
Password
};
virtual void setEchoMode(EchoMode);
EchoMode echoMode() const;
virtual void setMaxLineLength(int);
int maxLineLength() const;
virtual void setMaxLines(int);
int maxLines() const;
virtual void setHMargin(int);
int hMargin() const;
virtual void setSelection(int,int,int,int);
virtual void setAutoUpdate(bool);
%End
%If (TQt_2_1_0 -)
void setMaxLength(int);
int maxLength() const;
enum WordWrap {
NoWrap,
WidgetWidth,
FixedPixelWidth,
FixedColumnWidth
};
void setWordWrap(WordWrap);
WordWrap wordWrap() const;
void setWrapColumnOrWidth(int);
int wrapColumnOrWidth() const;
enum WrapPolicy {
AtWhiteSpace,
Anywhere
};
void setWrapPolicy(WrapPolicy);
WrapPolicy wrapPolicy() const;
void setUndoEnabled(bool);
bool isUndoEnabled() const;
void setUndoDepth(int);
int undoDepth() const;
int length() const;
static void setDefaultTabStop(int);
static int defaultTabStop();
%End
public slots:
void clear();
void deselect();
void selectAll();
%If (TQt_CLIPBOARD)
void paste();
%If (TQt_2_2_0 -)
void pasteSubType(const TQCString &);
%End
void cut();
%End
%If (- TQt_2_00)
void setText(const char *);
void setReadOnly(bool);
void setOverwriteMode(bool);
void append(const char *);
void copyText();
%End
%If (TQt_2_00 -)
virtual void setText(const TQString &);
virtual void setReadOnly(bool);
virtual void setOverwriteMode(bool);
void append(const TQString &);
%If (TQt_CLIPBOARD)
void copyText() const;
void copy() const;
%End
void insert(const TQString &);
%End
%If (TQt_2_1_0 -)
void undo();
void redo();
%End
signals:
void textChanged();
void returnPressed();
%If (TQt_2_1_0 -)
void undoAvailable(bool);
void redoAvailable(bool);
%End
%If (TQt_2_2_0 -)
void copyAvailable(bool);
%End
protected:
void paintCell(TQPainter *,int,int);
%If (TQt_2_2_0 -)
bool event(TQEvent *);
%End
void mousePressEvent(TQMouseEvent *);
void mouseMoveEvent(TQMouseEvent *);
void mouseReleaseEvent(TQMouseEvent *);
void mouseDoubleClickEvent(TQMouseEvent *);
%If (TQt_2_00 -)
void wheelEvent(TQWheelEvent *);
%End
void keyPressEvent(TQKeyEvent *);
void focusInEvent(TQFocusEvent *);
void focusOutEvent(TQFocusEvent *);
void timerEvent(TQTimerEvent *);
void leaveEvent(TQEvent *);
void resizeEvent(TQResizeEvent *);
%If (TQt_DRAGANDDROP)
%If (TQt_2_00 -)
void dragMoveEvent(TQDragMoveEvent *);
%End
%If (TQt_2_1_0 -)
void dragEnterEvent(TQDragEnterEvent *);
%End
%If (TQt_2_00 -)
void dropEvent(TQDropEvent *);
void dragLeaveEvent(TQDragLeaveEvent *);
%End
%End
bool hasMarkedText() const;
TQString markedText() const;
int textWidth(int);
%If (- TQt_2_00)
int textWidth(TQString *);
%End
%If (TQt_2_00 -)
int textWidth(const TQString &);
%End
TQPoint cursorPoint() const;
%If (- TQt_2_00)
virtual void insertChar(char);
%End
%If (TQt_2_00 -)
virtual void insert(const TQString &,bool);
%End
virtual void newLine();
virtual void killLine();
virtual void pageUp(bool = 0);
virtual void pageDown(bool = 0);
virtual void cursorLeft(bool = 0,bool = 1);
virtual void cursorRight(bool = 0,bool = 1);
virtual void cursorUp(bool = 0);
virtual void cursorDown(bool = 0);
virtual void backspace();
virtual void del() /PyName=delChar/;
virtual void home(bool = 0);
virtual void end(bool = 0);
bool getMarkedRegion(int *,int *,int *,int *) const;
int lineLength(int) const;
TQString *getString(int) const;
%If (TQt_2_1_0 -)
bool isEndOfParagraph(int) const;
%End
%If (TQt_2_00 -)
TQString stringShown(int) const;
void insertChar(TQChar);
%End
private:
TQMultiLineEdit(const TQMultiLineEdit &);
};
%End

@ -37,8 +37,6 @@
%If (TQt_THREAD_SUPPORT) %If (TQt_THREAD_SUPPORT)
%If (TQt_3_0_0 -)
class TQMutex class TQMutex
{ {
%TypeHeaderCode %TypeHeaderCode
@ -57,32 +55,6 @@ private:
TQMutex(const TQMutex &); TQMutex(const TQMutex &);
}; };
%End
%If (TQt_2_2_0 - TQt_3_0_0)
class TQMutex : TQt
{
%TypeHeaderCode
#include <tqthread.h>
%End
public:
TQMutex(bool = 0);
void lock() /ReleaseGIL/;
void unlock();
bool locked();
private:
TQMutex(const TQMutex &);
};
%End
%If (TQt_3_1_0 -)
class TQMutexLocker class TQMutexLocker
{ {
@ -100,5 +72,3 @@ private:
}; };
%End %End
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_2_00 -)
class TQt class TQt
{ {
%TypeHeaderCode %TypeHeaderCode
@ -67,13 +65,9 @@ public:
ShiftButton, ShiftButton,
ControlButton, ControlButton,
AltButton, AltButton,
%If (TQt_3_0_0 -)
MetaButton, MetaButton,
%End
KeyButtonMask, KeyButtonMask,
%If (TQt_2_2_0 -)
Keypad, Keypad,
%End
}; };
enum Orientation { enum Orientation {
@ -81,32 +75,11 @@ public:
Vertical Vertical
}; };
%If (TQt_3_2_0 -)
enum SortOrder { enum SortOrder {
Ascending, Ascending,
Descending Descending
}; };
%End
%If (- TQt_3_0_0)
enum AlignmentFlags {
AlignLeft,
AlignRight,
AlignHCenter,
AlignTop,
AlignBottom,
AlignVCenter,
AlignCenter,
SingleLine,
DontClip,
ExpandTabs,
ShowPrefix,
WordBreak
};
%End
%If (TQt_3_0_0 -)
enum AlignmentFlags { enum AlignmentFlags {
AlignAuto, AlignAuto,
AlignLeft, AlignLeft,
@ -139,18 +112,12 @@ public:
enum WidgetState { enum WidgetState {
WState_Polished WState_Polished
}; };
%End
typedef uint WFlags; typedef uint WFlags;
enum WidgetFlags { enum WidgetFlags {
WType_TopLevel, WType_TopLevel,
%If (- TQt_3_0_0)
WType_Modal,
%End
%If (TQt_3_0_0 -)
WType_Dialog, WType_Dialog,
%End
WType_Popup, WType_Popup,
WType_Desktop, WType_Desktop,
WType_Mask, WType_Mask,
@ -166,22 +133,8 @@ public:
WStyle_MinMax, WStyle_MinMax,
WStyle_Tool, WStyle_Tool,
WStyle_StaysOnTop, WStyle_StaysOnTop,
%If (- TQt_3_0_0)
WStyle_Dialog,
%End
%If (- TQt_2_1_0)
WStyle_Reserved2,
WStyle_Reserved3,
%End
%If (TQt_2_1_0 -)
WStyle_ContextHelp, WStyle_ContextHelp,
%End
%If (TQt_2_1_0 - TQt_3_0_0)
WStyle_NoBorderEx,
%End
%If (TQt_3_0_0 -)
WStyle_Reserved, WStyle_Reserved,
%End
WStyle_Mask, WStyle_Mask,
WDestructiveClose, WDestructiveClose,
@ -190,38 +143,18 @@ public:
WPaintClever, WPaintClever,
WResizeNoErase, // Obsolete WResizeNoErase, // Obsolete
WMouseNoMask, WMouseNoMask,
%If (- TQt_3_0_0)
WNorthWestGravity,
%End
%If (TQt_3_0_0 -)
WStaticContents, WStaticContents,
%End
%If (TQt_2_1_0 -)
WRepaintNoErase, // Obsolete WRepaintNoErase, // Obsolete
WX11BypassWM, WX11BypassWM,
%End
%If (TQt_3_0_0 -)
WWinOwnDC, WWinOwnDC,
%End
%If (TQt_2_2_0 -)
WGroupLeader, WGroupLeader,
%End
%If (TQt_3_0_0 -)
WShowModal, WShowModal,
WNoMousePropagation, WNoMousePropagation,
WSubWindow, WSubWindow,
%End
%If (TQt_3_1_0 -)
WStyle_Splash, WStyle_Splash,
%End
%If (TQt_3_2_0 -)
WNoAutoErase, WNoAutoErase,
%End
}; };
%If (TQt_3_3_0 -)
enum WindowState { enum WindowState {
WindowNoState, WindowNoState,
WindowMinimized, WindowMinimized,
@ -230,8 +163,6 @@ public:
WindowActive WindowActive
}; };
%End
enum ImageConversionFlags { enum ImageConversionFlags {
ColorMode_Mask, ColorMode_Mask,
AutoColor, AutoColor,
@ -259,41 +190,19 @@ public:
OpaqueMode OpaqueMode
}; };
%If (- TQt_3_0_0)
enum PaintUnit {
PixelUnit,
LoMetricUnit,
HiMetricUnit,
LoEnglishUnit,
HiEnglishUnit,
TwipsUnit
};
%End
enum GUIStyle { enum GUIStyle {
%If (- TQt_3_0_0)
MacStyle,
%End
WindowsStyle, WindowsStyle,
%If (- TQt_3_0_0)
Win3Style,
PMStyle,
%End
MotifStyle MotifStyle
}; };
%If (TQt_3_1_0 -)
enum SequenceMatch { enum SequenceMatch {
NoMatch, NoMatch,
PartialMatch, PartialMatch,
Identical Identical
}; };
%End
enum Modifier { enum Modifier {
%If (TQt_3_1_0 -)
META, META,
%End
SHIFT, SHIFT,
CTRL, CTRL,
ALT, ALT,
@ -316,9 +225,7 @@ public:
Key_Pause, Key_Pause,
Key_Print, Key_Print,
Key_SysReq, Key_SysReq,
%If (TQt_3_1_0 -)
Key_Clear, Key_Clear,
%End
Key_Home, Key_Home,
Key_End, Key_End,
@ -380,11 +287,9 @@ public:
Key_Menu, Key_Menu,
Key_Hyper_L, Key_Hyper_L,
Key_Hyper_R, Key_Hyper_R,
%If (TQt_3_0_0 -)
Key_Help, Key_Help,
Key_Direction_L, Key_Direction_L,
Key_Direction_R, Key_Direction_R,
%End
Key_Space, Key_Space,
Key_Any, Key_Any,
@ -554,7 +459,6 @@ public:
Key_thorn, Key_thorn,
Key_ydiaeresis, Key_ydiaeresis,
%If (TQt_3_1_0 -)
Key_Back, Key_Back,
Key_Forward, Key_Forward,
Key_Stop, Key_Stop,
@ -601,7 +505,6 @@ public:
Key_LaunchF, Key_LaunchF,
Key_MediaLast, Key_MediaLast,
%End
Key_unknown Key_unknown
}; };
@ -642,12 +545,9 @@ public:
DotLine, DotLine,
DashDotLine, DashDotLine,
DashDotDotLine, DashDotDotLine,
%If (TQt_2_1_0 -)
MPenStyle MPenStyle
%End
}; };
%If (TQt_2_1_0 -)
enum PenCapStyle { enum PenCapStyle {
FlatCap, FlatCap,
SquareCap, SquareCap,
@ -661,7 +561,6 @@ public:
RoundJoin, RoundJoin,
MPenJoinStyle MPenJoinStyle
}; };
%End
enum BrushStyle { enum BrushStyle {
NoBrush, NoBrush,
@ -682,73 +581,42 @@ public:
CustomPattern CustomPattern
}; };
%If (TQt_3_1_0 -)
enum MacintoshVersion { enum MacintoshVersion {
MV_Unknown, MV_Unknown,
MV_9, MV_9,
%If (TQt_3_2_0 -)
MV_10_DOT_0, MV_10_DOT_0,
%End
MV_10_DOT_1, MV_10_DOT_1,
MV_10_DOT_2, MV_10_DOT_2,
%If (TQt_3_2_0 -)
MV_10_DOT_3, MV_10_DOT_3,
%End
%If (TQt_3_3_5 -)
MV_10_DOT_4, MV_10_DOT_4,
%End
%If (TQt_3_2_0 -)
MV_CHEETAH, MV_CHEETAH,
MV_PUMA, MV_PUMA,
%End
MV_JAGUAR, MV_JAGUAR,
%If (TQt_3_2_0 -)
MV_PANTHER, MV_PANTHER,
%End
%If (TQt_3_3_5 -)
MV_TIGER, MV_TIGER,
%End
}; };
%End
enum WindowsVersion { enum WindowsVersion {
WV_32s, WV_32s,
WV_95, WV_95,
WV_98, WV_98,
%If (TQt_3_0_0 -)
WV_Me, WV_Me,
%End
%If (TQt_2_1_0 -)
WV_DOS_based, WV_DOS_based,
%End
WV_NT, WV_NT,
%If (TQt_2_1_0 -)
WV_2000, WV_2000,
%End
%If (TQt_3_0_0 -)
WV_XP, WV_XP,
%End
%If (TQt_3_3_0 -)
WV_2003, WV_2003,
%End
%If (TQt_3_3_6 -)
WV_VISTA, WV_VISTA,
%End
%If (TQt_2_1_0 -)
WV_NT_based, WV_NT_based,
%End
%If (TQt_3_3_0 -)
WV_CE, WV_CE,
WV_CENET, WV_CENET,
WV_CE_based, WV_CE_based,
%End
}; };
%If (TQt_2_2_0 -)
enum UIEffect { enum UIEffect {
UI_General, UI_General,
UI_AnimateMenu, UI_AnimateMenu,
@ -756,13 +624,9 @@ public:
UI_AnimateCombo, UI_AnimateCombo,
UI_AnimateTooltip, UI_AnimateTooltip,
UI_FadeTooltip, UI_FadeTooltip,
%If (TQt_3_2_0 -)
UI_AnimateToolBox, UI_AnimateToolBox,
%End
}; };
%End
%If (TQt_3_0_0 -)
enum CursorShape { enum CursorShape {
ArrowCursor, ArrowCursor,
UpArrowCursor, UpArrowCursor,
@ -780,13 +644,10 @@ public:
PointingHandCursor, PointingHandCursor,
ForbiddenCursor, ForbiddenCursor,
WhatsThisCursor, WhatsThisCursor,
%If (TQt_3_3_0 -)
BusyCursor, BusyCursor,
%End
LastCursor, LastCursor,
BitmapCursor BitmapCursor
}; };
%End
static const TQCursor &arrowCursor; static const TQCursor &arrowCursor;
static const TQCursor &upArrowCursor; static const TQCursor &upArrowCursor;
@ -802,33 +663,22 @@ public:
static const TQCursor &splitVCursor; static const TQCursor &splitVCursor;
static const TQCursor &splitHCursor; static const TQCursor &splitHCursor;
static const TQCursor &pointingHandCursor; static const TQCursor &pointingHandCursor;
%If (TQt_2_1_0 -)
static const TQCursor &forbiddenCursor; static const TQCursor &forbiddenCursor;
%End
%If (TQt_3_0_0 -)
static const TQCursor &whatsThisCursor; static const TQCursor &whatsThisCursor;
%End
%If (TQt_3_3_0 -)
static const TQCursor &busyCursor; static const TQCursor &busyCursor;
%End
enum TextFormat { enum TextFormat {
PlainText, PlainText,
RichText, RichText,
AutoText, AutoText,
%If (TQt_3_1_0 -)
LogText, LogText,
%End
}; };
%If (TQt_3_1_0 -)
enum AnchorAttribute { enum AnchorAttribute {
AnchorName, AnchorName,
AnchorHref AnchorHref
}; };
%End
%If (TQt_3_0_0 -)
enum Dock { enum Dock {
DockUnmanaged, DockUnmanaged,
DockTornOff, DockTornOff,
@ -845,12 +695,10 @@ public:
LocalDate LocalDate
}; };
%If (TQt_3_1_0 -)
enum TimeSpec { enum TimeSpec {
LocalTime, LocalTime,
UTC UTC
}; };
%End
enum BackgroundMode { enum BackgroundMode {
FixedColor, FixedColor,
@ -885,19 +733,14 @@ public:
ExactMatch ExactMatch
}; };
%If (TQt_3_2_0 -)
enum Corner { enum Corner {
TopLeft, TopLeft,
TopRight, TopRight,
BottomLeft, BottomLeft,
BottomRight BottomRight
}; };
%End
%If (WS_X11) %If (WS_X11)
typedef unsigned long HANDLE; typedef unsigned long HANDLE;
%End %End
%End
}; };
%End

@ -43,7 +43,6 @@
%If (TQt_NETWORKPROTOCOL) %If (TQt_NETWORKPROTOCOL)
%If (TQt_2_1_0 -)
class TQNetworkProtocolFactoryBase class TQNetworkProtocolFactoryBase
{ {
@ -72,17 +71,6 @@ public:
StStopped StStopped
}; };
%If (- TQt_3_0_0)
enum Operation {
OpListChildren,
OpMkdir,
OpRemove,
OpRename,
OpGet,
OpPut
};
%End
%If (TQt_3_0_0 -)
enum Operation { enum Operation {
OpListChildren, OpListChildren,
OpMkDir, OpMkDir,
@ -91,7 +79,6 @@ public:
OpGet, OpGet,
OpPut OpPut
}; };
%End
enum ConnectionState { enum ConnectionState {
ConHostFound, ConHostFound,
@ -99,26 +86,6 @@ public:
ConClosed ConClosed
}; };
%If (- TQt_3_0_0)
enum Error {
NoError,
ErrValid,
ErrUnknownProtocol,
ErrUnsupported,
ErrParse,
ErrLoginIncorrect,
ErrHostNotFound,
ErrListChlidren,
ErrMkdir,
ErrRemove,
ErrRename,
ErrGet,
ErrPut,
ErrFileNotExisting,
ErrPermissionDenied
};
%End
%If (TQt_3_0_0 -)
enum Error { enum Error {
NoError, NoError,
ErrValid, ErrValid,
@ -136,7 +103,6 @@ public:
ErrFileNotExisting, ErrFileNotExisting,
ErrPermissionDenied ErrPermissionDenied
}; };
%End
TQNetworkProtocol(); TQNetworkProtocol();
@ -178,15 +144,11 @@ protected:
virtual void operationRename(TQNetworkOperation *); virtual void operationRename(TQNetworkOperation *);
virtual void operationGet(TQNetworkOperation *); virtual void operationGet(TQNetworkOperation *);
virtual void operationPut(TQNetworkOperation *); virtual void operationPut(TQNetworkOperation *);
%If (TQt_3_0_0 -)
virtual void operationPutChunk(TQNetworkOperation *); virtual void operationPutChunk(TQNetworkOperation *);
%End
virtual bool checkConnection(TQNetworkOperation *); virtual bool checkConnection(TQNetworkOperation *);
private: private:
%If (TQt_3_1_0 -)
TQNetworkProtocol(const TQNetworkProtocol &); TQNetworkProtocol(const TQNetworkProtocol &);
%End
}; };
@ -218,10 +180,7 @@ public:
void free(); void free();
private: private:
%If (TQt_3_1_0 -)
TQNetworkOperation(const TQNetworkOperation &); TQNetworkOperation(const TQNetworkOperation &);
%End
}; };
%End %End
%End

@ -58,8 +58,6 @@ supported.
%End %End
%If (TQt_2_00 -)
class TQObject : TQt class TQObject : TQt
{ {
%TypeHeaderCode %TypeHeaderCode
@ -77,60 +75,48 @@ public:
int yes, no; int yes, no;
} graph[] = { } graph[] = {
{sipName_TQWidget, &sipClass_TQWidget, 25, 1}, {sipName_TQWidget, &sipClass_TQWidget, 25, 1},
#if TQT_VERSION >= 0x030100 && defined(SIP_FEATURE_TQt_ASSISTANTCLIENT) #if defined(SIP_FEATURE_TQt_ASSISTANTCLIENT)
{sipName_TQAssistantClient, &sipClass_TQAssistantClient, -1, 2}, {sipName_TQAssistantClient, &sipClass_TQAssistantClient, -1, 2},
#else #else
{NULL, NULL, -1, 2}, {NULL, NULL, -1, 2},
#endif #endif
{sipName_TQSessionManager, &sipClass_TQSessionManager, -1, 3}, {sipName_TQSessionManager, &sipClass_TQSessionManager, -1, 3},
{sipName_TQTranslator, &sipClass_TQTranslator, -1, 4}, {sipName_TQTranslator, &sipClass_TQTranslator, -1, 4},
#if TQT_VERSION >= 0x030000
{sipName_TQProcess, &sipClass_TQProcess, -1, 5}, {sipName_TQProcess, &sipClass_TQProcess, -1, 5},
#else
{NULL, NULL, -1, 5},
#endif
{sipName_TQToolTipGroup, &sipClass_TQToolTipGroup, -1, 6}, {sipName_TQToolTipGroup, &sipClass_TQToolTipGroup, -1, 6},
#if defined(SIP_FEATURE_TQt_FILEDIALOG) #if defined(SIP_FEATURE_TQt_FILEDIALOG)
{sipName_TQFileIconProvider, &sipClass_TQFileIconProvider, -1, 7}, {sipName_TQFileIconProvider, &sipClass_TQFileIconProvider, -1, 7},
#else #else
{NULL, NULL, -1, 7}, {NULL, NULL, -1, 7},
#endif #endif
#if TQT_VERSION >= 220 && defined(SIP_FEATURE_TQt_ACTION) #if defined(SIP_FEATURE_TQt_ACTION)
{sipName_TQAction, &sipClass_TQAction, 89, 8}, {sipName_TQAction, &sipClass_TQAction, 89, 8},
#else #else
{NULL, NULL, -1, 8}, {NULL, NULL, -1, 8},
#endif #endif
#if TQT_VERSION >= 0x030000
{sipName_TQObjectCleanupHandler, &sipClass_TQObjectCleanupHandler, -1, 9}, {sipName_TQObjectCleanupHandler, &sipClass_TQObjectCleanupHandler, -1, 9},
#else
{NULL, NULL, -1, 9},
#endif
{sipName_TQTimer, &sipClass_TQTimer, -1, 10}, {sipName_TQTimer, &sipClass_TQTimer, -1, 10},
{sipName_TQLayout, &sipClass_TQLayout, 90, 11}, {sipName_TQLayout, &sipClass_TQLayout, 90, 11},
#if TQT_VERSION >= 210 && defined(SIP_FEATURE_TQt_NETWORKPROTOCOL) #if defined(SIP_FEATURE_TQt_NETWORKPROTOCOL)
{sipName_TQUrlOperator, &sipClass_TQUrlOperator, -1, 12}, {sipName_TQUrlOperator, &sipClass_TQUrlOperator, -1, 12},
#else #else
{NULL, NULL, -1, 12}, {NULL, NULL, -1, 12},
#endif #endif
{sipName_TQStyleSheet, &sipClass_TQStyleSheet, -1, 13}, {sipName_TQStyleSheet, &sipClass_TQStyleSheet, -1, 13},
{sipName_TQValidator, &sipClass_TQValidator, 94, 14}, {sipName_TQValidator, &sipClass_TQValidator, 94, 14},
#if TQT_VERSION >= 210 && defined(SIP_FEATURE_TQt_NETWORKPROTOCOL) #if defined(SIP_FEATURE_TQt_NETWORKPROTOCOL)
{sipName_TQNetworkOperation, &sipClass_TQNetworkOperation, -1, 15}, {sipName_TQNetworkOperation, &sipClass_TQNetworkOperation, -1, 15},
#else #else
{NULL, NULL, -1, 15}, {NULL, NULL, -1, 15},
#endif #endif
{sipName_TQAccel, &sipClass_TQAccel, -1, 16}, {sipName_TQAccel, &sipClass_TQAccel, -1, 16},
#if TQT_VERSION >= 0x030100
{sipName_TQEventLoop, &sipClass_TQEventLoop, -1, 17}, {sipName_TQEventLoop, &sipClass_TQEventLoop, -1, 17},
#else #if defined(SIP_FEATURE_TQt_NETWORKPROTOCOL)
{NULL, NULL, -1, 17},
#endif
#if TQT_VERSION >= 210 && defined(SIP_FEATURE_TQt_NETWORKPROTOCOL)
{sipName_TQNetworkProtocol, &sipClass_TQNetworkProtocol, -1, 18}, {sipName_TQNetworkProtocol, &sipClass_TQNetworkProtocol, -1, 18},
#else #else
{NULL, NULL, -1, 18}, {NULL, NULL, -1, 18},
#endif #endif
#if TQT_VERSION >= 220 && defined(SIP_FEATURE_TQt_SOUND) #if defined(SIP_FEATURE_TQt_SOUND)
{sipName_TQSound, &sipClass_TQSound, -1, 19}, {sipName_TQSound, &sipClass_TQSound, -1, 19},
#else #else
{NULL, NULL, -1, 19}, {NULL, NULL, -1, 19},
@ -152,25 +138,13 @@ public:
{NULL, NULL, -1, 27}, {NULL, NULL, -1, 27},
#endif #endif
{sipName_TQTabWidget, &sipClass_TQTabWidget, -1, 28}, {sipName_TQTabWidget, &sipClass_TQTabWidget, -1, 28},
#if TQT_VERSION >= 0x030000
{sipName_TQDateEdit, &sipClass_TQDateEdit, -1, 29}, {sipName_TQDateEdit, &sipClass_TQDateEdit, -1, 29},
#else
{NULL, NULL, -1, 29},
#endif
{sipName_TQMainWindow, &sipClass_TQMainWindow, -1, 30}, {sipName_TQMainWindow, &sipClass_TQMainWindow, -1, 30},
#if TQT_VERSION >= 0x030000
{sipName_TQDateTimeEdit, &sipClass_TQDateTimeEdit, -1, 31}, {sipName_TQDateTimeEdit, &sipClass_TQDateTimeEdit, -1, 31},
#else
{NULL, NULL, -1, 31},
#endif
#if TQT_VERSION >= 0x030000
{sipName_TQTimeEdit, &sipClass_TQTimeEdit, -1, 32}, {sipName_TQTimeEdit, &sipClass_TQTimeEdit, -1, 32},
#else
{NULL, NULL, -1, 32},
#endif
{sipName_TQFrame, &sipClass_TQFrame, 46, 33}, {sipName_TQFrame, &sipClass_TQFrame, 46, 33},
{sipName_TQScrollBar, &sipClass_TQScrollBar, -1, 34}, {sipName_TQScrollBar, &sipClass_TQScrollBar, -1, 34},
#if TQT_VERSION >= 220 && defined(SIP_FEATURE_TQt_DIAL) #if defined(SIP_FEATURE_TQt_DIAL)
{sipName_TQDial, &sipClass_TQDial, -1, 35}, {sipName_TQDial, &sipClass_TQDial, -1, 35},
#else #else
{NULL, NULL, -1, 35}, {NULL, NULL, -1, 35},
@ -180,41 +154,21 @@ public:
{sipName_TQDialog, &sipClass_TQDialog, 79, 38}, {sipName_TQDialog, &sipClass_TQDialog, 79, 38},
{sipName_TQComboBox, &sipClass_TQComboBox, -1, 39}, {sipName_TQComboBox, &sipClass_TQComboBox, -1, 39},
{sipName_TQHeader, &sipClass_TQHeader, -1, 40}, {sipName_TQHeader, &sipClass_TQHeader, -1, 40},
#if TQT_VERSION >= 0x030000
{sipName_TQDockArea, &sipClass_TQDockArea, -1, 41}, {sipName_TQDockArea, &sipClass_TQDockArea, -1, 41},
#else
{NULL, NULL, -1, 41},
#endif
#if TQT_VERSION >= 0x030200
{sipName_TQSplashScreen, &sipClass_TQSplashScreen, -1, 42}, {sipName_TQSplashScreen, &sipClass_TQSplashScreen, -1, 42},
#else
{NULL, NULL, -1, 42},
#endif
{sipName_TQSlider, &sipClass_TQSlider, -1, 43}, {sipName_TQSlider, &sipClass_TQSlider, -1, 43},
{sipName_TQSpinBox, &sipClass_TQSpinBox, -1, 44}, {sipName_TQSpinBox, &sipClass_TQSpinBox, -1, 44},
#if TQT_VERSION >= 210 && defined(SIP_FEATURE_TQt_WORKSPACE) #if defined(SIP_FEATURE_TQt_WORKSPACE)
{sipName_TQWorkspace, &sipClass_TQWorkspace, -1, 45}, {sipName_TQWorkspace, &sipClass_TQWorkspace, -1, 45},
#else #else
{NULL, NULL, -1, 45}, {NULL, NULL, -1, 45},
#endif #endif
#if TQT_VERSION >= 0x030000
{sipName_TQDesktopWidget, &sipClass_TQDesktopWidget, -1, -1}, {sipName_TQDesktopWidget, &sipClass_TQDesktopWidget, -1, -1},
#else
{NULL, NULL, -1, -1},
#endif
{sipName_TQGrid, &sipClass_TQGrid, -1, 47}, {sipName_TQGrid, &sipClass_TQGrid, -1, 47},
{sipName_TQLineEdit, &sipClass_TQLineEdit, -1, 48}, {sipName_TQLineEdit, &sipClass_TQLineEdit, -1, 48},
#if TQT_VERSION >= 0x030200
{sipName_TQToolBox, &sipClass_TQToolBox, -1, 49}, {sipName_TQToolBox, &sipClass_TQToolBox, -1, 49},
#else
{NULL, NULL, -1, 49},
#endif
{sipName_TQWidgetStack, &sipClass_TQWidgetStack, -1, 50}, {sipName_TQWidgetStack, &sipClass_TQWidgetStack, -1, 50},
#if TQT_VERSION >= 0x030000
{sipName_TQDockWindow, &sipClass_TQDockWindow, 60, 51}, {sipName_TQDockWindow, &sipClass_TQDockWindow, 60, 51},
#else
{NULL, NULL, -1, 51},
#endif
{sipName_TQMenuBar, &sipClass_TQMenuBar, -1, 52}, {sipName_TQMenuBar, &sipClass_TQMenuBar, -1, 52},
{sipName_TQLabel, &sipClass_TQLabel, -1, 53}, {sipName_TQLabel, &sipClass_TQLabel, -1, 53},
{sipName_TQGroupBox, &sipClass_TQGroupBox, 61, 54}, {sipName_TQGroupBox, &sipClass_TQGroupBox, 61, 54},
@ -234,23 +188,15 @@ public:
{sipName_TQVGroupBox, &sipClass_TQVGroupBox, -1, -1}, {sipName_TQVGroupBox, &sipClass_TQVGroupBox, -1, -1},
{sipName_TQVButtonGroup, &sipClass_TQVButtonGroup, -1, 65}, {sipName_TQVButtonGroup, &sipClass_TQVButtonGroup, -1, 65},
{sipName_TQHButtonGroup, &sipClass_TQHButtonGroup, -1, -1}, {sipName_TQHButtonGroup, &sipClass_TQHButtonGroup, -1, -1},
#if TQT_VERSION >= 210 && defined(SIP_FEATURE_TQt_ICONVIEW) #if defined(SIP_FEATURE_TQt_ICONVIEW)
{sipName_TQIconView, &sipClass_TQIconView, -1, 67}, {sipName_TQIconView, &sipClass_TQIconView, -1, 67},
#else #else
{NULL, NULL, -1, 67}, {NULL, NULL, -1, 67},
#endif #endif
{sipName_TQListView, &sipClass_TQListView, -1, 68}, {sipName_TQListView, &sipClass_TQListView, -1, 68},
{sipName_TQListBox, &sipClass_TQListBox, -1, 69}, {sipName_TQListBox, &sipClass_TQListBox, -1, 69},
#if TQT_VERSION >= 0x030000
{sipName_TQGridView, &sipClass_TQGridView, -1, 70}, {sipName_TQGridView, &sipClass_TQGridView, -1, 70},
#else
{NULL, NULL, -1, 70},
#endif
#if TQT_VERSION >= 0x030000
{sipName_TQTextEdit, &sipClass_TQTextEdit, 71, -1}, {sipName_TQTextEdit, &sipClass_TQTextEdit, 71, -1},
#else
{NULL, NULL, -1, -1},
#endif
{sipName_TQTextBrowser, &sipClass_TQTextBrowser, -1, 72}, {sipName_TQTextBrowser, &sipClass_TQTextBrowser, -1, 72},
{sipName_TQMultiLineEdit, &sipClass_TQMultiLineEdit, -1, 73}, {sipName_TQMultiLineEdit, &sipClass_TQMultiLineEdit, -1, 73},
{sipName_TQTextView, &sipClass_TQTextView, -1, -1}, {sipName_TQTextView, &sipClass_TQTextView, -1, -1},
@ -264,12 +210,8 @@ public:
#else #else
{NULL, NULL, -1, 80}, {NULL, NULL, -1, 80},
#endif #endif
#if TQT_VERSION >= 0x030000
{sipName_TQErrorMessage, &sipClass_TQErrorMessage, -1, 81}, {sipName_TQErrorMessage, &sipClass_TQErrorMessage, -1, 81},
#else #if defined(SIP_FEATURE_TQt_INPUTDIALOG)
{NULL, NULL, -1, 81},
#endif
#if TQT_VERSION >= 210 && defined(SIP_FEATURE_TQt_INPUTDIALOG)
{sipName_TQInputDialog, &sipClass_TQInputDialog, -1, 82}, {sipName_TQInputDialog, &sipClass_TQInputDialog, -1, 82},
#else #else
{NULL, NULL, -1, 82}, {NULL, NULL, -1, 82},
@ -309,7 +251,7 @@ public:
#else #else
{NULL, NULL, -1, -1}, {NULL, NULL, -1, -1},
#endif #endif
#if TQT_VERSION >= 220 && defined(SIP_FEATURE_TQt_ACTION) #if defined(SIP_FEATURE_TQt_ACTION)
{sipName_TQActionGroup, &sipClass_TQActionGroup, -1, -1}, {sipName_TQActionGroup, &sipClass_TQActionGroup, -1, -1},
#else #else
{NULL, NULL, -1, -1}, {NULL, NULL, -1, -1},
@ -320,24 +262,16 @@ public:
{sipName_TQVBoxLayout, &sipClass_TQVBoxLayout, -1, -1}, {sipName_TQVBoxLayout, &sipClass_TQVBoxLayout, -1, -1},
{sipName_TQDoubleValidator, &sipClass_TQDoubleValidator, -1, 95}, {sipName_TQDoubleValidator, &sipClass_TQDoubleValidator, -1, 95},
{sipName_TQIntValidator, &sipClass_TQIntValidator, -1, 96}, {sipName_TQIntValidator, &sipClass_TQIntValidator, -1, 96},
#if TQT_VERSION >= 0x030000
{sipName_TQRegExpValidator, &sipClass_TQRegExpValidator, -1, -1}, {sipName_TQRegExpValidator, &sipClass_TQRegExpValidator, -1, -1},
#else
{NULL, NULL, -1, -1},
#endif
{sipName_TQTextDrag, &sipClass_TQTextDrag, -1, 98}, {sipName_TQTextDrag, &sipClass_TQTextDrag, -1, 98},
{sipName_TQStoredDrag, &sipClass_TQStoredDrag, 101, 99}, {sipName_TQStoredDrag, &sipClass_TQStoredDrag, 101, 99},
#if TQT_VERSION >= 210 && defined(SIP_FEATURE_TQt_ICONVIEW) && defined(SIP_FEATURE_TQt_DRAGANDDROP) #if defined(SIP_FEATURE_TQt_ICONVIEW) && defined(SIP_FEATURE_TQt_DRAGANDDROP)
{sipName_TQIconDrag, &sipClass_TQIconDrag, -1, 100}, {sipName_TQIconDrag, &sipClass_TQIconDrag, -1, 100},
#else #else
{NULL, NULL, -1, 100}, {NULL, NULL, -1, 100},
#endif #endif
{sipName_TQImageDrag, &sipClass_TQImageDrag, -1, -1}, {sipName_TQImageDrag, &sipClass_TQImageDrag, -1, -1},
#if TQT_VERSION >= 210
{sipName_TQColorDrag, &sipClass_TQColorDrag, -1, 102}, {sipName_TQColorDrag, &sipClass_TQColorDrag, -1, 102},
#else
{NULL, NULL, -1, 102},
#endif
{sipName_TQUriDrag, &sipClass_TQUriDrag, -1, -1}, {sipName_TQUriDrag, &sipClass_TQUriDrag, -1, -1},
{sipName_TQCommonStyle, &sipClass_TQCommonStyle, 104, -1}, {sipName_TQCommonStyle, &sipClass_TQCommonStyle, 104, -1},
#if defined(SIP_FEATURE_TQt_STYLE_WINDOWS) #if defined(SIP_FEATURE_TQt_STYLE_WINDOWS)
@ -360,12 +294,12 @@ public:
#else #else
{NULL, NULL, -1, 108}, {NULL, NULL, -1, 108},
#endif #endif
#if TQT_VERSION >= 220 && defined(SIP_FEATURE_TQt_STYLE_MOTIFPLUS) #if defined(SIP_FEATURE_TQt_STYLE_MOTIFPLUS)
{sipName_TQMotifPlusStyle, &sipClass_TQMotifPlusStyle, -1, 109}, {sipName_TQMotifPlusStyle, &sipClass_TQMotifPlusStyle, -1, 109},
#else #else
{NULL, NULL, -1, 109}, {NULL, NULL, -1, 109},
#endif #endif
#if TQT_VERSION >= 220 && defined(SIP_FEATURE_TQt_STYLE_SGI) #if defined(SIP_FEATURE_TQt_STYLE_SGI)
{sipName_TQSGIStyle, &sipClass_TQSGIStyle, -1, -1}, {sipName_TQSGIStyle, &sipClass_TQSGIStyle, -1, -1},
#else #else
{NULL, NULL, -1, -1}, {NULL, NULL, -1, -1},
@ -403,73 +337,83 @@ public:
// the true (Python) class name. // the true (Python) class name.
SIP_PYOBJECT className() const; SIP_PYOBJECT className() const;
%MethodCode %MethodCode
#if PY_MAJOR_VERSION >= 3
sipRes = PyUnicode_FromString(sipSelf->ob_type->tp_name);
#else
sipRes = sipClassName(sipSelf); sipRes = sipClassName(sipSelf);
#endif
%End %End
%If (- TQt_3_0_0)
static TQString tr(const char *) /AutoGen=TQt_TRANSLATION/;
%End
%If (TQt_2_2_0 - TQt_2_3_1)
// There was an apparent bug in moc prior to TQt v2.3.1 where this
// method wasn't automatically generated.
static TQString tr(const char *,const char *);
%End
%If (TQt_2_3_1 - TQt_3_0_0)
static TQString tr(const char *,const char *) /AutoGen=TQt_TRANSLATION/;
%End
%If (TQt_3_0_0 -)
// Note that tr() and trUtf8() are really static methods. We pretend // Note that tr() and trUtf8() are really static methods. We pretend
// they aren't so that we can use self to get hold of the class name. // they aren't so that we can use self to get hold of the class name.
// We could mimic moc's behaviour more accurately by creating tr() and // We could mimic moc's behaviour more accurately by creating tr() and
// trUtf8() methods for a Python sub-class instance in the sub-class's // trUtf8() methods for a Python sub-class instance in the sub-class's
// ctor. // ctor.
TQString tr(const char *,const char * = 0); TQString tr(SIP_PYOBJECT sourceText /TypeHint="str"/,const char * = 0);
%MethodCode %MethodCode
PyObject *nmobj; if (tqApp)
{
const char *source = PyTQt_qt_encode(&a0, TQApplication::DefaultCodec);
if ((nmobj = sipClassName(sipSelf)) == NULL) if (source)
sipIsErr = 1; {
sipRes = new TQString(tqApp->translate(Py_TYPE(sipSelf)->tp_name, source,
a1, TQApplication::DefaultCodec));
Py_DECREF(a0);
}
else
{
sipIsErr = 1;
}
}
else else
{ {
char *cname = PyString_AsString(nmobj); const char *source = sipString_AsLatin1String(&a0);
Py_BEGIN_ALLOW_THREADS if (source)
{
if (cname && tqApp) sipRes = new TQString(QString::fromLatin1(source));
sipRes = new TQString(tqApp -> translate(cname,a0,a1,TQApplication::DefaultCodec)); Py_DECREF(a0);
}
else else
sipRes = new TQString(TQString::fromLatin1(a0)); {
sipIsErr = 1;
Py_END_ALLOW_THREADS }
Py_DECREF(nmobj);
} }
%End %End
TQString trUtf8(const char *,const char * = 0); TQString trUtf8(SIP_PYOBJECT sourceText /TypeHint="str"/,const char * = 0);
%MethodCode %MethodCode
PyObject *nmobj; if (tqApp)
{
const char *source = PyTQt_qt_encode(&a0, TQApplication::DefaultCodec);
if ((nmobj = sipClassName(sipSelf)) == NULL) if (source)
sipIsErr = 1; {
sipRes = new TQString(tqApp->translate(Py_TYPE(sipSelf)->tp_name, source,
a1, TQApplication::UnicodeUTF8));
Py_DECREF(a0);
}
else
{
sipIsErr = 1;
}
}
else else
{ {
char *cname = PyString_AsString(nmobj); const char *source = sipString_AsLatin1String(&a0);
Py_BEGIN_ALLOW_THREADS
if (cname && tqApp) if (source)
sipRes = new TQString(tqApp -> translate(cname,a0,a1,TQApplication::UnicodeUTF8)); {
sipRes = new TQString(TQString::fromLatin1(source));
Py_DECREF(a0);
}
else else
sipRes = new TQString(TQString::fromUtf8(a0)); {
sipIsErr = 1;
Py_END_ALLOW_THREADS }
Py_DECREF(nmobj);
} }
%End
%End %End
virtual TQMetaObject *metaObject() const /AutoGen/; virtual TQMetaObject *metaObject() const /AutoGen/;
virtual bool event(TQEvent *); virtual bool event(TQEvent *);
@ -516,9 +460,6 @@ public:
#endif #endif
%End %End
%If (- TQt_3_0_0)
TQStringList superClasses(bool = 0) const;
%End
const char *name() const; const char *name() const;
const char *name(const char *) const; const char *name(const char *) const;
virtual void setName(const char *); virtual void setName(const char *);
@ -529,21 +470,10 @@ public:
int startTimer(int); int startTimer(int);
void killTimer(int); void killTimer(int);
void killTimers(); void killTimers();
%If (- TQt_3_0_0)
TQObject *child(const char *,const char * = 0);
%End
%If (TQt_3_0_0 -)
TQObject *child(const char *,const char * = 0,bool = 1); TQObject *child(const char *,const char * = 0,bool = 1);
%End
const TQObjectList *children() const; const TQObjectList *children() const;
%If (TQt_2_1_0 -)
static const TQObjectList *objectTrees(); static const TQObjectList *objectTrees();
%End
%If (- TQt_3_0_0)
TQObjectList *queryList(char * = 0,char * = 0,bool = 1,bool = 1);
%End
%If (TQt_3_0_0 -)
TQObjectList *queryList(char * = 0,char * = 0,bool = 1,bool = 1) const; TQObjectList *queryList(char * = 0,char * = 0,bool = 1,bool = 1) const;
%MethodCode %MethodCode
// The TQt implementation doesn't know anything about Python // The TQt implementation doesn't know anything about Python
@ -592,7 +522,6 @@ public:
sipRes = sipCpp -> TQObject::queryList(a0, a1, a2, a3); sipRes = sipCpp -> TQObject::queryList(a0, a1, a2, a3);
Py_END_ALLOW_THREADS Py_END_ALLOW_THREADS
#endif #endif
%End
%End %End
virtual void insertChild(TQObject * /Transfer/); virtual void insertChild(TQObject * /Transfer/);
@ -638,26 +567,16 @@ public:
%End %End
%If (TQt_PROPERTIES) %If (TQt_PROPERTIES)
%If (TQt_2_1_0 - TQt_3_0_0)
bool setProperty(const char *,const TQVariant &);
TQVariant property(const char *) const;
%End
%If (TQt_3_0_0 -)
virtual bool setProperty(const char *,const TQVariant &); virtual bool setProperty(const char *,const TQVariant &);
virtual TQVariant property(const char *) const; virtual TQVariant property(const char *) const;
%End %End
%End
signals: signals:
void destroyed(); void destroyed();
%If (TQt_3_0_0 -)
void destroyed(TQObject *); void destroyed(TQObject *);
%End
public slots: public slots:
%If (TQt_3_0_0 -)
void deleteLater(); void deleteLater();
%End
public: public:
// This is actually protected, but we never need to call the real // This is actually protected, but we never need to call the real
@ -670,9 +589,7 @@ public:
protected: protected:
virtual void timerEvent(TQTimerEvent *); virtual void timerEvent(TQTimerEvent *);
virtual void childEvent(TQChildEvent *); virtual void childEvent(TQChildEvent *);
%If (TQt_3_0_0 -)
virtual void customEvent(TQCustomEvent *); virtual void customEvent(TQCustomEvent *);
%End
private: private:
TQObject(const TQObject &); TQObject(const TQObject &);
@ -692,181 +609,8 @@ SIP_PYOBJECT QT_TRANSLATE_NOOP(SIP_PYOBJECT,SIP_PYOBJECT);
sipRes = a1; sipRes = a1;
%End %End
%End
%If (- TQt_2_00)
class TQObject
{
%TypeHeaderCode
#include <tqobject.h>
%End
public:
TQObject(TQObject * /TransferThis/ = 0,const char * = 0);
%ConvertToSubClassCode
// The table of Python class objects indexed by their names. The table
// must be sorted by name.
static sipStringTypeClassMap map[] = {
{sipName_TQAccel, &sipClass_TQAccel},
{sipName_TQApplication, &sipClass_TQApplication},
{sipName_TQBoxLayout, &sipClass_TQBoxLayout},
{sipName_TQButton, &sipClass_TQButton},
{sipName_TQButtonGroup, &sipClass_TQButtonGroup},
{sipName_TQCheckBox, &sipClass_TQCheckBox},
#if defined(SIP_FEATURE_TQt_CLIPBOARD)
{sipName_TQClipboard, &sipClass_TQClipboard},
#endif
{sipName_TQComboBox, &sipClass_TQComboBox},
{sipName_TQDialog, &sipClass_TQDialog},
{sipName_TQDoubleValidator, &sipClass_TQDoubleValidator},
{sipName_TQDragObject, &sipClass_TQDragObject},
#if defined(SIP_FEATURE_TQt_FILEDIALOG)
{sipName_TQFileDialog, &sipClass_TQFileDialog},
{sipName_TQFileIconProvider, &sipClass_TQFileIconProvider},
#endif
{sipName_TQFrame, &sipClass_TQFrame},
{sipName_TQGridLayout, &sipClass_TQGridLayout},
{sipName_TQGroupBox, &sipClass_TQGroupBox},
{sipName_TQHBoxLayout, &sipClass_TQHBoxLayout},
{sipName_TQHeader, &sipClass_TQHeader},
{sipName_TQImageDrag, &sipClass_TQImageDrag},
{sipName_TQIntValidator, &sipClass_TQIntValidator},
{sipName_TQLCDNumber, &sipClass_TQLCDNumber},
{sipName_TQLabel, &sipClass_TQLabel},
{sipName_TQLayout, &sipClass_TQLayout},
{sipName_TQLineEdit, &sipClass_TQLineEdit},
{sipName_TQListBox, &sipClass_TQListBox},
{sipName_TQListView, &sipClass_TQListView},
{sipName_TQMainWindow, &sipClass_TQMainWindow},
{sipName_TQMenuBar, &sipClass_TQMenuBar},
#if defined(SIP_FEATURE_TQt_MESSAGEBOX)
{sipName_TQMessageBox, &sipClass_TQMessageBox},
#endif
{sipName_TQMultiLineEdit, &sipClass_TQMultiLineEdit},
{sipName_TQPopupMenu, &sipClass_TQPopupMenu},
#if defined(WS_X11) && defined(SIP_FEATURE_TQt_PRINTDIALOG)
{sipName_TQPrintDialog, &sipClass_TQPrintDialog},
#endif
{sipName_TQProgressBar, &sipClass_TQProgressBar},
#if defined(SIP_FEATURE_TQt_PROGRESSDIALOG)
{sipName_TQProgressDialog, &sipClass_TQProgressDialog},
#endif
{sipName_TQPushButton, &sipClass_TQPushButton},
{sipName_TQRadioButton, &sipClass_TQRadioButton},
{sipName_TQScrollBar, &sipClass_TQScrollBar},
{sipName_TQScrollView, &sipClass_TQScrollView},
{sipName_TQSlider, &sipClass_TQSlider},
{sipName_TQSocketNotifier, &sipClass_TQSocketNotifier},
{sipName_TQSpinBox, &sipClass_TQSpinBox},
#if defined(SIP_FEATURE_TQt_SPLITTER)
{sipName_TQSplitter, &sipClass_TQSplitter},
#endif
{sipName_TQStatusBar, &sipClass_TQStatusBar},
{sipName_TQStoredDrag, &sipClass_TQStoredDrag},
{sipName_TQTabBar, &sipClass_TQTabBar},
{sipName_TQTextDrag, &sipClass_TQTextDrag},
{sipName_TQTimer, &sipClass_TQTimer},
{sipName_TQToolBar, &sipClass_TQToolBar},
{sipName_TQToolButton, &sipClass_TQToolButton},
{sipName_TQToolTipGroup, &sipClass_TQToolTipGroup},
{sipName_TQVBoxLayout, &sipClass_TQVBoxLayout},
{sipName_TQValidator, &sipClass_TQValidator},
{sipName_TQWidget, &sipClass_TQWidget},
{sipName_TQWidgetStack, &sipClass_TQWidgetStack}
};
sipClass = sipMapStringToClass(sipCpp -> className(),map,sizeof (map)/sizeof (map[0]));
%End
static SIP_PYOBJECT connect(SIP_QOBJECT,SIP_SIGNAL,SIP_QOBJECT,SIP_SLOT);
%MethodCode
sipRes = sipConnectRx(a0,a1,a2,a3,0);
%End
static SIP_PYOBJECT connect(SIP_QOBJECT,SIP_SIGNAL,SIP_PYCALLABLE);
%MethodCode
sipRes = sipConnectRx(a0,a1,a2,0,0);
%End
static SIP_PYOBJECT disconnect(SIP_QOBJECT,SIP_SIGNAL,SIP_QOBJECT,SIP_SLOT);
%MethodCode
sipRes = sipDisconnectRx(a0,a1,a2,a3);
%End
static SIP_PYOBJECT disconnect(SIP_QOBJECT,SIP_SIGNAL,SIP_PYCALLABLE);
%MethodCode
sipRes = sipDisconnectRx(a0,a1,a2,0);
%End
virtual bool event(TQEvent *);
virtual bool eventFilter(TQObject *,TQEvent *);
const char *tr(const char *) const;
virtual TQMetaObject *metaObject() const /AutoGen/;
// This is actually virtual. However, with the way we are implementing
// it we can ignore it.
SIP_PYOBJECT className() const;
%MethodCode
sipRes = sipClassName(sipSelf);
%End
bool isA(const char *) const;
bool inherits(const char *) const;
const char *name() const;
const char *name(const char *) const;
void setName(const char *);
bool isWidgetType() const;
bool highPriority() const;
bool signalsBlocked() const;
void blockSignals(bool);
int startTimer(int);
void killTimer(int);
void killTimers();
const TQObjectList *children() const;
TQObjectList *queryList(char * = 0,char * = 0,bool = 1,bool = 1);
void insertChild(TQObject * /Transfer/);
void removeChild(TQObject * /TransferBack/);
void installEventFilter(const TQObject *);
void removeEventFilter(const TQObject *);
// bool connect(TQObject *,const char *,const char *);
// bool disconnect(const char * = 0,const TQObject * = 0,const char * = 0);
// bool disconnect(const TQObject *,const char * = 0);
void dumpObjectTree();
void dumpObjectInfo();
TQObject *parent() const;
void emit(SIP_SIGNAL,SIP_PYTUPLE);
%MethodCode
if (sipEmitSignal(sipSelf,a0,a1) < 0)
sipIsErr = 1;
%End
signals:
void destroyed();
public: SIP_PYOBJECT SLOT(const char * /Encoding="ASCII"/) /TypeHint="QT_SLOT"/;
// This is actually protected, but we never need to call the real
// method.
SIP_PYOBJECT sender();
%MethodCode
sipRes = pyqt3GetSender();
%End
protected:
virtual void timerEvent(TQTimerEvent *);
private:
TQObject(const TQObject &);
};
%End
SIP_PYOBJECT SLOT(const char *);
%MethodCode %MethodCode
if (!a0) if (!a0)
{ {
@ -877,11 +621,11 @@ SIP_PYOBJECT SLOT(const char *);
{ {
int len = strlen(a0); int len = strlen(a0);
if ((sipRes = PyString_FromStringAndSize(NULL,1 + len)) == NULL) if ((sipRes = SIPBytes_FromStringAndSize(NULL,1 + len)) == NULL)
sipIsErr = 1; sipIsErr = 1;
else else
{ {
char *dp = PyString_AS_STRING(sipRes); char *dp = SIPBytes_AS_STRING(sipRes);
*dp++ = '1'; *dp++ = '1';
@ -891,7 +635,7 @@ SIP_PYOBJECT SLOT(const char *);
%End %End
SIP_PYOBJECT SIGNAL(const char *); SIP_PYOBJECT SIGNAL(const char * /Encoding="ASCII"/) /TypeHint="QT_SIGNAL"/;
%MethodCode %MethodCode
if (!a0) if (!a0)
{ {
@ -902,11 +646,11 @@ SIP_PYOBJECT SIGNAL(const char *);
{ {
int len = strlen(a0); int len = strlen(a0);
if ((sipRes = PyString_FromStringAndSize(NULL,1 + len)) == NULL) if ((sipRes = SIPBytes_FromStringAndSize(NULL,1 + len)) == NULL)
sipIsErr = 1; sipIsErr = 1;
else else
{ {
char *dp = PyString_AS_STRING(sipRes); char *dp = SIPBytes_AS_STRING(sipRes);
*dp++ = '2'; *dp++ = '2';
@ -916,7 +660,7 @@ SIP_PYOBJECT SIGNAL(const char *);
%End %End
SIP_PYOBJECT PYSIGNAL(const char *); SIP_PYOBJECT PYSIGNAL(const char * /Encoding="ASCII"/);
%MethodCode %MethodCode
if (!a0) if (!a0)
{ {
@ -927,11 +671,11 @@ SIP_PYOBJECT PYSIGNAL(const char *);
{ {
int len = strlen(a0); int len = strlen(a0);
if ((sipRes = PyString_FromStringAndSize(NULL,1 + len)) == NULL) if ((sipRes = SIPBytes_FromStringAndSize(NULL,1 + len)) == NULL)
sipIsErr = 1; sipIsErr = 1;
else else
{ {
char *dp = PyString_AS_STRING(sipRes); char *dp = SIPBytes_AS_STRING(sipRes);
*dp++ = '9'; *dp++ = '9';
@ -992,16 +736,30 @@ 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 pyqtWrapperType_Type = {
#if PY_MAJOR_VERSION >= 3
PyVarObject_HEAD_INIT(NULL, 0)
#else
PyObject_HEAD_INIT(NULL) PyObject_HEAD_INIT(NULL)
0, /* ob_size */ 0, /* ob_size */
#endif
"qt.pyqtWrapperType", /* tp_name */ "qt.pyqtWrapperType", /* tp_name */
sizeof (sipWrapperType), /* tp_basicsize */ sizeof (sipWrapperType), /* tp_basicsize */
0, /* tp_itemsize */ 0, /* tp_itemsize */
0, /* tp_dealloc */ 0, /* tp_dealloc */
#if PY_VERSION_HEX >= 0x03080000
0, /* tp_vectorcall_offset */
#else
0, /* tp_print */ 0, /* tp_print */
#endif
0, /* tp_getattr */ 0, /* tp_getattr */
0, /* tp_setattr */ 0, /* tp_setattr */
#if PY_VERSION_HEX >= 0x03050000
0, /* tp_as_async */
#elif PY_VERSION_HEX >= 0x03010000
0, /* tp_reserved */
#else
0, /* tp_compare */ 0, /* tp_compare */
#endif
0, /* tp_repr */ 0, /* tp_repr */
0, /* tp_as_number */ 0, /* tp_as_number */
0, /* tp_as_sequence */ 0, /* tp_as_sequence */
@ -1042,6 +800,15 @@ PyTypeObject pyqtWrapperType_Type = {
#if PY_VERSION_HEX >= 0x02060000 #if PY_VERSION_HEX >= 0x02060000
0, /* tp_version_tag */ 0, /* tp_version_tag */
#endif #endif
#if PY_VERSION_HEX >= 0x03040000
0, /* tp_finalize */
#endif
#if PY_VERSION_HEX >= 0x03080000
0, /* tp_vectorcall */
#endif
#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION == 8
0, /* tp_print (deprecated) */
#endif
}; };
@ -1196,16 +963,30 @@ static sipWrapperType pyqtWrapper_Type = {
{ {
#endif #endif
{ {
#if PY_MAJOR_VERSION >= 3
PyVarObject_HEAD_INIT(&pyqtWrapperType_Type, 0)
#else
PyObject_HEAD_INIT(&pyqtWrapperType_Type) PyObject_HEAD_INIT(&pyqtWrapperType_Type)
0, /* ob_size */ 0, /* ob_size */
#endif
"qt.pyqtWrapper", /* tp_name */ "qt.pyqtWrapper", /* tp_name */
sizeof (pyqtWrapper), /* tp_basicsize */ sizeof (pyqtWrapper), /* tp_basicsize */
0, /* tp_itemsize */ 0, /* tp_itemsize */
(destructor)pyqtWrapper_dealloc, /* tp_dealloc */ (destructor)pyqtWrapper_dealloc, /* tp_dealloc */
#if PY_VERSION_HEX >= 0x03080000
0, /* tp_vectorcall_offset */
#else
0, /* tp_print */ 0, /* tp_print */
#endif
0, /* tp_getattr */ 0, /* tp_getattr */
0, /* tp_setattr */ 0, /* tp_setattr */
#if PY_VERSION_HEX >= 0x03050000
0, /* tp_as_async */
#elif PY_VERSION_HEX >= 0x03010000
0, /* tp_reserved */
#else
0, /* tp_compare */ 0, /* tp_compare */
#endif
0, /* tp_repr */ 0, /* tp_repr */
0, /* tp_as_number */ 0, /* tp_as_number */
0, /* tp_as_sequence */ 0, /* tp_as_sequence */
@ -1245,6 +1026,15 @@ static sipWrapperType pyqtWrapper_Type = {
0, /* tp_del */ 0, /* tp_del */
#if PY_VERSION_HEX >= 0x02060000 #if PY_VERSION_HEX >= 0x02060000
0, /* tp_version_tag */ 0, /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000
0, /* tp_finalize */
#endif
#if PY_VERSION_HEX >= 0x03080000
0, /* tp_vectorcall */
#endif
#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION == 8
0, /* tp_print (deprecated) */
#endif #endif
}, },
#if !defined(STACKLESS) #if !defined(STACKLESS)
@ -1421,11 +1211,7 @@ static PyObject *py_sender = 0;
TQMetaObject *UniversalSlot::metaObj = 0; TQMetaObject *UniversalSlot::metaObj = 0;
#if TQT_VERSION >= 0x030100
static TQMetaObjectCleanUp cleanUp_UniversalSlot("UniversalSlot", &UniversalSlot::staticMetaObject); static TQMetaObjectCleanUp cleanUp_UniversalSlot("UniversalSlot", &UniversalSlot::staticMetaObject);
#else
static TQMetaObjectCleanUp cleanUp_UniversalSlot;
#endif
TQObject *UniversalSlot::lastSender = 0; TQObject *UniversalSlot::lastSender = 0;
UniversalSlot *UniversalSlot::unislots = 0; UniversalSlot *UniversalSlot::unislots = 0;
@ -1500,17 +1286,17 @@ bool UniversalSlot::tqt_invoke(int id, TQUObject *qargs)
case char_sat: case char_sat:
case schar_sat: case schar_sat:
case uchar_sat: case uchar_sat:
arg = PyString_FromStringAndSize((char *)static_QUType_ptr.get(qargs), 1); arg = SIPBytes_FromStringAndSize((char *)static_QUType_ptr.get(qargs), 1);
break; break;
case string_sat: case string_sat:
case sstring_sat: case sstring_sat:
case ustring_sat: case ustring_sat:
arg = PyString_FromString((char *)static_QUType_ptr.get(qargs)); arg = SIPBytes_FromString((char *)static_QUType_ptr.get(qargs));
break; break;
case short_sat: case short_sat:
arg = PyInt_FromLong(*(short *)static_QUType_ptr.get(qargs)); arg = PyLong_FromLong(*(short *)static_QUType_ptr.get(qargs));
break; break;
case ushort_sat: case ushort_sat:
@ -1519,9 +1305,9 @@ bool UniversalSlot::tqt_invoke(int id, TQUObject *qargs)
case int_sat: case int_sat:
if (qv) if (qv)
arg = PyInt_FromLong(qv -> asInt()); arg = PyLong_FromLong(qv -> asInt());
else else
arg = PyInt_FromLong(static_QUType_int.get(qargs)); arg = PyLong_FromLong(static_QUType_int.get(qargs));
break; break;
case uint_sat: case uint_sat:
@ -1557,7 +1343,7 @@ bool UniversalSlot::tqt_invoke(int id, TQUObject *qargs)
break; break;
case bool_sat: case bool_sat:
arg = PyInt_FromLong(static_QUType_bool.get(qargs)); arg = PyLong_FromLong(static_QUType_bool.get(qargs));
break; break;
case void_sat: case void_sat:
@ -1628,7 +1414,14 @@ static void *sipTQtCreateUniversalSlot(sipWrapper *tx, const char *sig,
pyqt3SlotConnection conn; pyqt3SlotConnection conn;
/* Initialise the connection. */ /* Initialise the connection. */
conn.sc_transmitter = (tx ? sipGetCppPtr((sipSimpleWrapper *)tx, 0) : 0); if (sipGetAddress(&tx->super) == NULL)
{
conn.sc_transmitter = 0;
}
else
{
conn.sc_transmitter = (tx ? sipGetCppPtr(&tx->super, 0) : 0);
}
/* Save the real slot. */ /* Save the real slot. */
if (sipSaveSlot(&conn.sc_slot, rxObj, slot) < 0) if (sipSaveSlot(&conn.sc_slot, rxObj, slot) < 0)

@ -29,8 +29,6 @@
%End %End
%If (TQt_3_0_0 -)
class TQObjectCleanupHandler : TQObject class TQObjectCleanupHandler : TQObject
{ {
%TypeHeaderCode %TypeHeaderCode
@ -45,5 +43,3 @@ public:
bool isEmpty() const; bool isEmpty() const;
void clear(); void clear();
}; };
%End

@ -40,34 +40,6 @@ Not implemented.
%End %End
%If (- TQt_2_00)
// Painter device types.
const int PDT_UNDEF;
const int PDT_WIDGET;
const int PDT_PIXMAP;
const int PDT_PRINTER;
const int PDT_PICTURE;
const int PDT_MASK;
// Painter device flags.
const int PDF_EXTDEV;
const int PDF_PAINTACTIVE;
void bitBlt(TQPaintDevice *,int,int,const TQPaintDevice *,int = 0,int = 0,
int = -1,int = -1,RasterOp = CopyROP,bool = 0);
void bitBlt(TQPaintDevice *,int,int,const TQImage *,int = 0,int = 0,int = -1,
int = -1,int = 0);
void bitBlt(TQPaintDevice *,const TQPoint &,const TQPaintDevice *,
const TQRect & = TQRect(0,0,-1,-1),RasterOp = CopyROP,bool = 0);
%End
%If (TQt_2_00 -)
void bitBlt(TQPaintDevice *,int,int,const TQPaintDevice *,int = 0,int = 0, void bitBlt(TQPaintDevice *,int,int,const TQPaintDevice *,int = 0,int = 0,
int = -1,int = -1,TQt::RasterOp = TQt::CopyROP,bool = 0); int = -1,int = -1,TQt::RasterOp = TQt::CopyROP,bool = 0);
void bitBlt(TQPaintDevice *,int,int,const TQImage *,int = 0,int = 0,int = -1, void bitBlt(TQPaintDevice *,int,int,const TQImage *,int = 0,int = 0,int = -1,
@ -76,8 +48,6 @@ void bitBlt(TQPaintDevice *,const TQPoint &,const TQPaintDevice *,
const TQRect & = TQRect(0,0,-1,-1),TQt::RasterOp = TQt::CopyROP, const TQRect & = TQRect(0,0,-1,-1),TQt::RasterOp = TQt::CopyROP,
bool = 0); bool = 0);
%End
class TQPaintDevice class TQPaintDevice
{ {
@ -90,44 +60,17 @@ public:
bool isExtDev() const; bool isExtDev() const;
bool paintingActive() const; bool paintingActive() const;
%If (TQt_3_0_0 -)
virtual void setResolution(int); virtual void setResolution(int);
virtual int resolution() const; virtual int resolution() const;
%End
%If (- TQt_2_00)
HANDLE handle() const;
%If (WS_X11)
Display *x11Display() const;
static int x11Screen();
static int x11Depth();
static int x11Cells();
static HANDLE x11Colormap();
static bool x11DefaultColormap();
static void *x11Visual();
static bool x11DefaultVisual();
%End
%End
%If (TQt_2_00 -)
%If (WS_X11) %If (WS_X11)
%If (- TQt_3_0_0)
HANDLE handle() const;
%End
%If (TQt_3_0_0 -)
TQt::HANDLE handle() const; TQt::HANDLE handle() const;
TQt::HANDLE x11RenderHandle() const; TQt::HANDLE x11RenderHandle() const;
%End
Display *x11Display() const; Display *x11Display() const;
int x11Screen() const; int x11Screen() const;
int x11Depth() const; int x11Depth() const;
int x11Cells() const; int x11Cells() const;
%If (- TQt_3_0_0)
HANDLE x11Colormap() const;
%End
%If (TQt_3_0_0 -)
TQt::HANDLE x11Colormap() const; TQt::HANDLE x11Colormap() const;
%End
bool x11DefaultColormap() const; bool x11DefaultColormap() const;
void *x11Visual() const; void *x11Visual() const;
bool x11DefaultVisual() const; bool x11DefaultVisual() const;
@ -137,26 +80,16 @@ public:
static int x11AppDpiX(); static int x11AppDpiX();
static int x11AppDpiY(); static int x11AppDpiY();
%If (TQt_2_1_0 -)
static void x11SetAppDpiX(int); static void x11SetAppDpiX(int);
static void x11SetAppDpiY(int); static void x11SetAppDpiY(int);
%End
static int x11AppDepth(); static int x11AppDepth();
static int x11AppCells(); static int x11AppCells();
%If (TQt_3_1_0 -)
static TQt::HANDLE x11AppRootWindow(); static TQt::HANDLE x11AppRootWindow();
%End
%If (TQt_3_0_0 -)
static TQt::HANDLE x11AppColormap(); static TQt::HANDLE x11AppColormap();
%End
%If (- TQt_3_0_0)
static HANDLE x11AppColormap();
%End
static bool x11AppDefaultColormap(); static bool x11AppDefaultColormap();
static void *x11AppVisual(); static void *x11AppVisual();
static bool x11AppDefaultVisual(); static bool x11AppDefaultVisual();
%If (TQt_3_1_0 -)
static int x11AppDepth(int); static int x11AppDepth(int);
static int x11AppCells(int); static int x11AppCells(int);
static TQt::HANDLE x11AppRootWindow(int); static TQt::HANDLE x11AppRootWindow(int);
@ -168,7 +101,6 @@ public:
static int x11AppDpiY(int); static int x11AppDpiY(int);
static void x11SetAppDpiX(int,int); static void x11SetAppDpiX(int,int);
static void x11SetAppDpiY(int,int); static void x11SetAppDpiY(int,int);
%End
%End %End
enum PDevCmd enum PDevCmd
@ -188,21 +120,14 @@ public:
PdcDrawLineSegments, PdcDrawLineSegments,
PdcDrawPolyline, PdcDrawPolyline,
PdcDrawPolygon, PdcDrawPolygon,
%If (TQt_3_0_0 -)
PdcDrawCubicBezier, PdcDrawCubicBezier,
%End
%If (- TQt_3_0_0)
PdcDrawQuadBezier,
%End
PdcDrawText, PdcDrawText,
PdcDrawTextFormatted, PdcDrawTextFormatted,
PdcDrawPixmap, PdcDrawPixmap,
PdcDrawImage, PdcDrawImage,
PdcDrawText2, PdcDrawText2,
PdcDrawText2Formatted, PdcDrawText2Formatted,
%If (TQt_3_2_0 -)
PdcDrawTextItem, PdcDrawTextItem,
%End
PdcDrawLast, PdcDrawLast,
PdcBegin, PdcBegin,
@ -233,8 +158,6 @@ public:
PdcReservedStop PdcReservedStop
}; };
%End
protected: protected:
TQPaintDevice(uint); TQPaintDevice(uint);
// virtual bool cmd(int,TQPainter *,TQPDevCmdParam *); // virtual bool cmd(int,TQPainter *,TQPDevCmdParam *);

@ -42,14 +42,10 @@ public:
int height() const; int height() const;
int widthMM() const; int widthMM() const;
int heightMM() const; int heightMM() const;
%If (TQt_2_00 -)
int logicalDpiX() const; int logicalDpiX() const;
int logicalDpiY() const; int logicalDpiY() const;
%End
%If (TQt_3_0_0 -)
int physicalDpiX() const; int physicalDpiX() const;
int physicalDpiY() const; int physicalDpiY() const;
%End
int numColors() const; int numColors() const;
int depth() const; int depth() const;
}; };

@ -97,260 +97,6 @@ This returns a list of tab stops.
%End %End
%If (- TQt_2_00)
%ModuleHeaderCode
#include <tqpainter.h>
%End
enum BGMode {
TransparentMode,
OpaqueMode
};
enum PaintUnit {
PixelUnit,
LoMetricUnit,
HiMetricUnit,
LoEnglishUnit,
HiEnglishUnit,
TwipsUnit
};
class TQPainter
{
%TypeHeaderCode
#include <tqpainter.h>
%End
public:
TQPainter();
TQPainter(const TQPaintDevice *);
TQPainter(const TQPaintDevice *,const TQWidget *);
bool begin(const TQPaintDevice *);
bool begin(const TQPaintDevice *,const TQWidget *);
bool end();
TQPaintDevice *device() const;
static void redirect(TQPaintDevice *,TQPaintDevice *);
%If (TQt_3_2_0 -)
static TQPaintDevice *redirect(TQPaintDevice *);
%End
bool isActive() const;
void flush();
void save();
void restore();
TQFontMetrics fontMetrics() const;
TQFontInfo fontInfo() const;
const TQFont &font() const;
void setFont(const TQFont&);
const TQPen &pen() const;
void setPen(const TQPen &);
void setPen(PenStyle);
void setPen(const TQColor &);
const TQBrush &brush() const;
void setBrush(const TQBrush &);
void setBrush(BrushStyle);
void setBrush(const TQColor &);
const TQColor &backgroundColor() const;
void setBackgroundColor(const TQColor &);
BGMode backgroundMode() const;
void setBackgroundMode(BGMode);
RasterOp rasterOp() const;
void setRasterOp(RasterOp);
const TQPoint &brushOrigin() const;
void setBrushOrigin(int,int);
void setBrushOrigin(const TQPoint &);
bool hasViewXForm() const;
bool hasWorldXForm() const;
void setViewXForm(bool);
TQRect window() const;
void setWindow(const TQRect &);
void setWindow(int,int,int,int);
TQRect viewport() const;
void setViewport(const TQRect &);
void setViewport(int,int,int,int);
void setWorldXForm(bool);
const TQWMatrix &worldMatrix() const;
void setWorldMatrix(const TQWMatrix &,bool = 0);
void scale(float,float);
void shear(float,float);
void rotate(float);
void translate(float,float);
void resetXForm();
TQPoint xForm(TQPoint &) const;
TQRect xForm(TQRect &) const;
TQPointArray xForm(TQPointArray &) const;
TQPointArray xForm(TQPointArray &,int,int) const;
TQPoint xFormDev(TQPoint &) const;
TQRect xFormDev(TQRect &) const;
TQPointArray xFormDev(TQPointArray &) const;
TQPointArray xFormDev(TQPointArray &,int,int) const;
void setClipping(bool);
bool hasClipping() const;
const TQRegion &clipRegion() const;
void setClipRect(const TQRect &);
void setClipRect(int,int,int,int);
void setClipRegion(const TQRegion &);
void drawPoint(int,int);
void drawPoint(const TQPoint &);
void drawPoints(const TQPointArray &,int,int = -1);
void moveTo(int,int);
void moveTo(const TQPoint &);
void lineTo(int,int);
void lineTo(const TQPoint &);
void drawLine(int,int,int,int);
void drawLine(const TQPoint &,const TQPoint &);
void drawRect(int,int,int,int);
void drawRect(const TQRect &);
void drawWinFocusRect(int,int,int,int);
void drawWinFocusRect(int,int,int,int,const TQColor &);
void drawWinFocusRect(const TQRect &);
void drawWinFocusRect(const TQRect &,const TQColor &);
void drawRoundRect(int,int,int,int,int,int);
void drawRoundRect(const TQRect &,int,int);
void drawEllipse(int,int,int,int);
void drawEllipse(const TQRect &);
void drawArc(int,int,int,int,int,int);
void drawArc(const TQRect &,int,int);
void drawPie(int,int,int,int,int,int);
void drawPie(const TQRect &,int,int);
void drawChord(int,int,int,int,int,int);
void drawChord(const TQRect &,int,int);
void drawLineSegments(const TQPointArray &,int = 0,int = -1);
void drawPolyline(const TQPointArray &,int = 0,int = -1);
void drawPolygon(const TQPointArray &,bool = 0,int = 0,int = -1);
void drawQuadBezier(const TQPointArray &,int = 0);
void drawPixmap(int,int,const TQPixmap &,int = 0,int = 0,int = -1,int = -1);
void drawPixmap(const TQPoint &,const TQPixmap &,const TQRect &);
void drawPixmap(const TQPoint &,const TQPixmap &);
void drawImage(int,int,const TQImage &,int = 0,int = 0,int = -1,int = -1);
void drawImage(const TQPoint &,const TQImage &,const TQRect &);
void drawImage(const TQPoint &,const TQImage &);
void drawTiledPixmap(int,int,int,int,const TQPixmap &,int = 0,int = 0);
void drawTiledPixmap(const TQRect &,const TQPixmap &,const TQPoint &);
void drawTiledPixmap(const TQRect &,const TQPixmap &);
void drawPicture(const TQPicture &);
void fillRect(int,int,int,int,const TQBrush &);
void fillRect(const TQRect &,const TQBrush &);
void eraseRect(int,int,int,int);
void eraseRect(const TQRect &);
void drawText(int,int,char *,int = -1);
void drawText(const TQPoint &,const char *,int = -1);
void drawText(int,int,int,int,int,const char *,int = -1,TQRect * = 0);
void drawText(const TQRect &,int,const char *,int = -1,TQRect * = 0);
%If (TQt_3_2_0 -)
void drawTextItem(int,int,const TQTextItem &,int = 0);
void drawTextItem(const TQPoint &,const TQTextItem &,int = 0);
%End
TQRect boundingRect(int,int,int,int,int,const char *,int = -1);
TQRect boundingRect(const TQRect &,int,const char *,int = -1);
int tabStops() const;
void setTabStops(int);
SIP_PYLIST tabArray() const;
%MethodCode
int *tabs;
Py_BEGIN_ALLOW_THREADS
tabs = sipCpp -> tabArray();
Py_END_ALLOW_THREADS
int len = 0;
if (tabs)
{
int *tp = tabs;
do
++len;
while (*tp++ != 0);
}
if ((sipRes = PyList_New(len)) == NULL)
sipIsErr = 1;
else if (tabs)
{
int *tp = tabs;
len = 0;
do
{
if (PyList_SET_ITEM(sipRes,len,PyInt_FromLong((long)*tp)) < 0)
{
Py_DECREF(sipRes);
sipIsErr = 1;
break;
}
++len;
}
while (*tp++ != 0);
}
%End
void setTabArray(SIP_PYLIST);
%MethodCode
int len, *tabs;
len = PyList_GET_SIZE(a0);
// Allocate space for the array. Note, this memory is never
// reclaimed.
if ((tabs = (int *)sipMalloc(len * sizeof (int))) == NULL)
sipIsErr = 1;
else
{
// Convert the list.
int *tp = tabs;
for (int i = 0; i < len; ++i)
{
*tp++ = (int)PyInt_AsLong(PyList_GET_ITEM(a0,i));
if (PyErr_Occurred() != NULL)
{
sipFree((void *)tabs);
sipIsErr = 1;
break;
}
}
if (!sipIsErr)
{
Py_BEGIN_ALLOW_THREADS
sipCpp -> setTabArray(tabs);
Py_END_ALLOW_THREADS
}
}
%End
HANDLE handle() const;
static void initialize();
static void cleanup();
private:
TQPainter(const TQPainter &);
};
%End
%If (TQt_2_00 -)
class TQPainter : TQt class TQPainter : TQt
{ {
%TypeHeaderCode %TypeHeaderCode
@ -358,31 +104,17 @@ class TQPainter : TQt
%End %End
public: public:
%If (TQt_3_0_0 -)
enum CoordinateMode { enum CoordinateMode {
CoordDevice, CoordDevice,
CoordPainter CoordPainter
}; };
%End
TQPainter(); TQPainter();
%If (- TQt_3_0_0)
TQPainter(const TQPaintDevice *);
TQPainter(const TQPaintDevice *,const TQWidget *);
%End
%If (TQt_3_0_0 -)
TQPainter(const TQPaintDevice *,bool = 0); TQPainter(const TQPaintDevice *,bool = 0);
TQPainter(const TQPaintDevice *,const TQWidget *,bool = 0); TQPainter(const TQPaintDevice *,const TQWidget *,bool = 0);
%End
%If (- TQt_3_0_0)
bool begin(const TQPaintDevice *);
bool begin(const TQPaintDevice *,const TQWidget *);
%End
%If (TQt_3_0_0 -)
bool begin(const TQPaintDevice *,bool = 0); bool begin(const TQPaintDevice *,bool = 0);
bool begin(const TQPaintDevice *,const TQWidget *,bool = 0); bool begin(const TQPaintDevice *,const TQWidget *,bool = 0);
%End
bool end(); bool end();
TQPaintDevice *device() const; TQPaintDevice *device() const;
@ -390,9 +122,7 @@ public:
bool isActive() const; bool isActive() const;
%If (TQt_3_0_0 -)
void flush(const TQRegion &,CoordinateMode = CoordDevice); void flush(const TQRegion &,CoordinateMode = CoordDevice);
%End
void flush(); void flush();
void save(); void save();
void restore(); void restore();
@ -410,9 +140,6 @@ public:
void setBrush(const TQBrush &); void setBrush(const TQBrush &);
void setBrush(BrushStyle); void setBrush(BrushStyle);
void setBrush(const TQColor &); void setBrush(const TQColor &);
%If (TQt_2_1_0 -)
// The omission of this from TQt/Embedded is probably a bug.
%End
const TQColor &backgroundColor() const; const TQColor &backgroundColor() const;
void setBackgroundColor(const TQColor &); void setBackgroundColor(const TQColor &);
@ -449,10 +176,8 @@ public:
%End %End
void translate(double,double); void translate(double,double);
void resetXForm(); void resetXForm();
%If (TQt_3_0_0 -)
double translationX() const; double translationX() const;
double translationY() const; double translationY() const;
%End
TQPoint xForm(const TQPoint &) const; TQPoint xForm(const TQPoint &) const;
TQRect xForm(const TQRect &) const; TQRect xForm(const TQRect &) const;
@ -465,18 +190,10 @@ public:
void setClipping(bool); void setClipping(bool);
bool hasClipping() const; bool hasClipping() const;
%If (- TQt_3_0_0)
const TQRegion &clipRegion() const;
void setClipRect(const TQRect &);
void setClipRect(int,int,int,int);
void setClipRegion(const TQRegion &);
%End
%If (TQt_3_0_0 -)
TQRegion clipRegion(CoordinateMode = CoordDevice) const; TQRegion clipRegion(CoordinateMode = CoordDevice) const;
void setClipRect(const TQRect &,CoordinateMode = CoordDevice); void setClipRect(const TQRect &,CoordinateMode = CoordDevice);
void setClipRect(int,int,int,int,CoordinateMode = CoordDevice); void setClipRect(int,int,int,int,CoordinateMode = CoordDevice);
void setClipRegion(const TQRegion &,CoordinateMode = CoordDevice); void setClipRegion(const TQRegion &,CoordinateMode = CoordDevice);
%End
void drawPoint(int,int); void drawPoint(int,int);
void drawPoint(const TQPoint &); void drawPoint(const TQPoint &);
@ -493,14 +210,8 @@ public:
void drawWinFocusRect(int,int,int,int,const TQColor &); void drawWinFocusRect(int,int,int,int,const TQColor &);
void drawWinFocusRect(const TQRect &); void drawWinFocusRect(const TQRect &);
void drawWinFocusRect(const TQRect &,const TQColor &); void drawWinFocusRect(const TQRect &,const TQColor &);
%If (- TQt_3_0_0)
void drawRoundRect(int,int,int,int,int,int);
void drawRoundRect(const TQRect &,int,int);
%End
%If (TQt_3_0_0 -)
void drawRoundRect(int,int,int,int,int = 25,int = 25); void drawRoundRect(int,int,int,int,int = 25,int = 25);
void drawRoundRect(const TQRect &,int = 25,int = 25); void drawRoundRect(const TQRect &,int = 25,int = 25);
%End
void drawEllipse(int,int,int,int); void drawEllipse(int,int,int,int);
void drawEllipse(const TQRect &); void drawEllipse(const TQRect &);
void drawArc(int,int,int,int,int,int); void drawArc(int,int,int,int,int,int);
@ -512,42 +223,25 @@ public:
void drawLineSegments(const TQPointArray &,int = 0,int = -1); void drawLineSegments(const TQPointArray &,int = 0,int = -1);
void drawPolyline(const TQPointArray &,int = 0,int = -1); void drawPolyline(const TQPointArray &,int = 0,int = -1);
void drawPolygon(const TQPointArray &,bool = 0,int = 0,int = -1); void drawPolygon(const TQPointArray &,bool = 0,int = 0,int = -1);
%If (- TQt_3_0_0)
void drawQuadBezier(const TQPointArray &,int = 0);
%End
%If (TQt_3_0_0 -)
void drawConvexPolygon(const TQPointArray &,int = 0,int = -1); void drawConvexPolygon(const TQPointArray &,int = 0,int = -1);
void drawCubicBezier(const TQPointArray &,int = 0); void drawCubicBezier(const TQPointArray &,int = 0);
%End
void drawPixmap(int,int,const TQPixmap &,int = 0,int = 0,int = -1, void drawPixmap(int,int,const TQPixmap &,int = 0,int = 0,int = -1,
int = -1); int = -1);
void drawPixmap(const TQPoint &,const TQPixmap &,const TQRect &); void drawPixmap(const TQPoint &,const TQPixmap &,const TQRect &);
void drawPixmap(const TQPoint &,const TQPixmap &); void drawPixmap(const TQPoint &,const TQPixmap &);
%If (TQt_3_0_0 -)
void drawPixmap(const TQRect &,const TQPixmap &); void drawPixmap(const TQRect &,const TQPixmap &);
%End
%If (- TQt_3_0_0)
void drawImage(int,int,const TQImage &,int = 0,int = 0,int = -1,
int = -1);
void drawImage(const TQPoint &,const TQImage &,const TQRect &);
void drawImage(const TQPoint &,const TQImage &);
%End
%If (TQt_3_0_0 -)
void drawImage(int,int,const TQImage &,int = 0,int = 0,int = -1, void drawImage(int,int,const TQImage &,int = 0,int = 0,int = -1,
int = -1,int = 0); int = -1,int = 0);
void drawImage(const TQPoint &,const TQImage &,const TQRect &,int = 0); void drawImage(const TQPoint &,const TQImage &,const TQRect &,int = 0);
void drawImage(const TQPoint &,const TQImage &,int = 0); void drawImage(const TQPoint &,const TQImage &,int = 0);
void drawImage(const TQRect &,const TQImage &); void drawImage(const TQRect &,const TQImage &);
%End
void drawTiledPixmap(int,int,int,int,const TQPixmap &,int = 0,int = 0); void drawTiledPixmap(int,int,int,int,const TQPixmap &,int = 0,int = 0);
void drawTiledPixmap(const TQRect &,const TQPixmap &,const TQPoint &); void drawTiledPixmap(const TQRect &,const TQPixmap &,const TQPoint &);
void drawTiledPixmap(const TQRect &,const TQPixmap &); void drawTiledPixmap(const TQRect &,const TQPixmap &);
%If (TQt_PICTURE) %If (TQt_PICTURE)
void drawPicture(const TQPicture &); void drawPicture(const TQPicture &);
%If (TQt_3_0_0 -)
void drawPicture(int,int,const TQPicture &); void drawPicture(int,int,const TQPicture &);
void drawPicture(const TQPoint &,const TQPicture &); void drawPicture(const TQPoint &,const TQPicture &);
%End
%End %End
void fillRect(int,int,int,int,const TQBrush &); void fillRect(int,int,int,int,const TQBrush &);
@ -555,26 +249,18 @@ public:
void eraseRect(int,int,int,int); void eraseRect(int,int,int,int);
void eraseRect(const TQRect &); void eraseRect(const TQRect &);
%If (TQt_3_0_0 -)
enum TextDirection { enum TextDirection {
Auto, Auto,
RTL, RTL,
LTR LTR
}; };
%End
%If (- TQt_3_0_0)
void drawText(int,int,const TQString &,int = -1);
void drawText(const TQPoint &,const TQString &,int = -1);
%End
%If (TQt_3_0_0 -)
void drawText(int,int,const TQString &,int = -1,TextDirection = Auto); void drawText(int,int,const TQString &,int = -1,TextDirection = Auto);
void drawText(const TQPoint &,const TQString &,int = -1, void drawText(const TQPoint &,const TQString &,int = -1,
TextDirection = Auto); TextDirection = Auto);
void drawText(int,int,const TQString &,int,int,TextDirection = Auto); void drawText(int,int,const TQString &,int,int,TextDirection = Auto);
void drawText(const TQPoint &,const TQString &,int,int, void drawText(const TQPoint &,const TQString &,int,int,
TextDirection = Auto); TextDirection = Auto);
%End
void drawText(int,int,int,int,int,const TQString &,int = -1,TQRect * = 0); void drawText(int,int,int,int,int,const TQString &,int = -1,TQRect * = 0);
void drawText(const TQRect &,int,const TQString &,int = -1,TQRect * = 0); void drawText(const TQRect &,int,const TQString &,int = -1,TQRect * = 0);
@ -612,7 +298,7 @@ public:
do do
{ {
if (PyList_SET_ITEM(sipRes,len,PyInt_FromLong((long)*tp)) < 0) if (PyList_SetItem(sipRes,len,PyLong_FromLong((long)*tp)) < 0)
{ {
Py_DECREF(sipRes); Py_DECREF(sipRes);
sipIsErr = 1; sipIsErr = 1;
@ -643,7 +329,7 @@ public:
for (int i = 0; i < len; ++i) for (int i = 0; i < len; ++i)
{ {
*tp++ = (int)PyInt_AsLong(PyList_GET_ITEM(a0,i)); *tp++ = (int)PyLong_AsLong(PyList_GET_ITEM(a0,i));
if (PyErr_Occurred() != NULL) if (PyErr_Occurred() != NULL)
{ {
@ -672,5 +358,3 @@ public:
private: private:
TQPainter(const TQPainter &); TQPainter(const TQPainter &);
}; };
%End

@ -31,8 +31,6 @@ converted to and from Python tuples of two elements.
%End %End
%If (TQt_3_0_0 -)
%MappedType TQPair<int,int> %MappedType TQPair<int,int>
{ {
%TypeHeaderCode %TypeHeaderCode
@ -51,8 +49,8 @@ converted to and from Python tuples of two elements.
// Fill it. // Fill it.
PyTuple_SET_ITEM(t,0,PyInt_FromLong((long)sipCpp -> first)); PyTuple_SET_ITEM(t,0,PyLong_FromLong((long)sipCpp -> first));
PyTuple_SET_ITEM(t,1,PyInt_FromLong((long)sipCpp -> second)); PyTuple_SET_ITEM(t,1,PyLong_FromLong((long)sipCpp -> second));
return t; return t;
%End %End
@ -65,8 +63,8 @@ converted to and from Python tuples of two elements.
PyErr_Clear(); PyErr_Clear();
int fst = (int)PyInt_AsLong(PyTuple_GET_ITEM(sipPy,0)); int fst = (int)PyLong_AsLong(PyTuple_GET_ITEM(sipPy,0));
int sec = (int)PyInt_AsLong(PyTuple_GET_ITEM(sipPy,1)); int sec = (int)PyLong_AsLong(PyTuple_GET_ITEM(sipPy,1));
if (PyErr_Occurred() != NULL) if (PyErr_Occurred() != NULL)
{ {
@ -79,5 +77,3 @@ converted to and from Python tuples of two elements.
return 1; return 1;
%End %End
}; };
%End

@ -39,21 +39,10 @@ class TQPalette
public: public:
TQPalette(); TQPalette();
TQPalette(const TQColor &); TQPalette(const TQColor &);
%If (TQt_2_00 -)
TQPalette(const TQColor &,const TQColor &); TQPalette(const TQColor &,const TQColor &);
%End
TQPalette(const TQColorGroup &,const TQColorGroup &,const TQColorGroup &); TQPalette(const TQColorGroup &,const TQColorGroup &,const TQColorGroup &);
TQPalette(const TQPalette &); TQPalette(const TQPalette &);
%If (TQt_2_00 - TQt_2_1_0)
enum ColorGroup {
Normal,
Disabled,
Active,
NColorGroups
};
%End
%If (TQt_2_1_0 -)
enum ColorGroup { enum ColorGroup {
Normal, Normal,
Disabled, Disabled,
@ -61,31 +50,24 @@ public:
Inactive, Inactive,
NColorGroups NColorGroups
}; };
%End
%If (TQt_2_00 -)
const TQColor &color(ColorGroup,TQColorGroup::ColorRole) const; const TQColor &color(ColorGroup,TQColorGroup::ColorRole) const;
const TQBrush &brush(ColorGroup,TQColorGroup::ColorRole) const; const TQBrush &brush(ColorGroup,TQColorGroup::ColorRole) const;
void setColor(ColorGroup,TQColorGroup::ColorRole,const TQColor &); void setColor(ColorGroup,TQColorGroup::ColorRole,const TQColor &);
void setBrush(ColorGroup,TQColorGroup::ColorRole,const TQBrush &); void setBrush(ColorGroup,TQColorGroup::ColorRole,const TQBrush &);
void setColor(TQColorGroup::ColorRole,const TQColor &); void setColor(TQColorGroup::ColorRole,const TQColor &);
void setBrush(TQColorGroup::ColorRole,const TQBrush &); void setBrush(TQColorGroup::ColorRole,const TQBrush &);
%End
TQPalette copy() const; TQPalette copy() const;
const TQColorGroup &active() const; const TQColorGroup &active() const;
const TQColorGroup &disabled() const; const TQColorGroup &disabled() const;
%If (TQt_2_1_0 -)
const TQColorGroup &inactive() const; const TQColorGroup &inactive() const;
%End
const TQColorGroup &normal() const; const TQColorGroup &normal() const;
void setActive(const TQColorGroup &); void setActive(const TQColorGroup &);
void setDisabled(const TQColorGroup &); void setDisabled(const TQColorGroup &);
%If (TQt_2_1_0 -)
void setInactive(const TQColorGroup &); void setInactive(const TQColorGroup &);
%End
void setNormal(const TQColorGroup &); void setNormal(const TQColorGroup &);
bool operator==(const TQPalette &) const; bool operator==(const TQPalette &) const;
@ -94,9 +76,7 @@ public:
bool isCopyOf(const TQPalette &); bool isCopyOf(const TQPalette &);
int serialNumber() const; int serialNumber() const;
%If (TQt_3_0_0 -)
// These are defined in TQt3, but don't appear in the documentation. // These are defined in TQt3, but don't appear in the documentation.
//static TQColorGroup::ColorRole foregroundRoleFromMode(TQt::BackgroundMode); //static TQColorGroup::ColorRole foregroundRoleFromMode(TQt::BackgroundMode);
//static TQColorGroup::ColorRole backgroundRoleFromMode(TQt::BackgroundMode); //static TQColorGroup::ColorRole backgroundRoleFromMode(TQt::BackgroundMode);
%End
}; };

@ -30,42 +30,6 @@
%End %End
%If (- TQt_2_00)
enum PenStyle {
NoPen,
SolidLine,
DashLine,
DotLine,
DashDotLine,
DashDotDotLine
};
class TQPen
{
%TypeHeaderCode
#include <tqpen.h>
%End
public:
TQPen();
TQPen(PenStyle);
TQPen(const TQColor &,uint = 0,PenStyle = SolidLine);
TQPen(const TQPen &);
PenStyle style() const;
void setStyle(PenStyle);
uint width() const;
void setWidth(uint);
const TQColor &color() const;
void setColor(const TQColor &);
};
%End
%If (TQt_2_00 -)
class TQPen : TQt class TQPen : TQt
{ {
%TypeHeaderCode %TypeHeaderCode
@ -76,9 +40,7 @@ public:
TQPen(); TQPen();
TQPen(PenStyle); TQPen(PenStyle);
TQPen(const TQColor &,uint = 0,PenStyle = SolidLine); TQPen(const TQColor &,uint = 0,PenStyle = SolidLine);
%If (TQt_2_1_0 -)
TQPen(const TQColor &,uint,PenStyle,PenCapStyle,PenJoinStyle); TQPen(const TQColor &,uint,PenStyle,PenCapStyle,PenJoinStyle);
%End
TQPen(const TQPen &); TQPen(const TQPen &);
PenStyle style() const; PenStyle style() const;
@ -87,15 +49,11 @@ public:
void setWidth(uint); void setWidth(uint);
const TQColor &color() const; const TQColor &color() const;
void setColor(const TQColor &); void setColor(const TQColor &);
%If (TQt_2_1_0 -)
PenCapStyle capStyle() const; PenCapStyle capStyle() const;
void setCapStyle(PenCapStyle); void setCapStyle(PenCapStyle);
PenJoinStyle joinStyle() const; PenJoinStyle joinStyle() const;
void setJoinStyle(PenJoinStyle); void setJoinStyle(PenJoinStyle);
%End
bool operator==(const TQPen &) const; bool operator==(const TQPen &) const;
bool operator!=(const TQPen &) const; bool operator!=(const TQPen &) const;
}; };
%End

@ -52,60 +52,30 @@ class TQPicture : TQPaintDevice
%End %End
public: public:
%If (- TQt_2_00)
TQPicture();
%End
%If (TQt_2_00 - TQt_3_0_0)
TQPicture(int = 0);
%End
%If (TQt_3_0_0 -)
TQPicture(int = -1); TQPicture(int = -1);
TQPicture(const TQPicture &); TQPicture(const TQPicture &);
%End
bool isNull() const; bool isNull() const;
uint size() const; uint size() const;
// const char *data() const; // const char *data() const;
%If (- TQt_2_00)
void setData(const char * /Array/,uint /ArraySize/);
%End
%If (TQt_2_00 -)
virtual void setData(const char * /Array/,uint /ArraySize/); virtual void setData(const char * /Array/,uint /ArraySize/);
%End
bool play(TQPainter *); bool play(TQPainter *);
%If (- TQt_2_00)
bool load(const char *);
bool save(const char *);
%End
%If (TQt_2_00 - TQt_3_0_0)
bool load(const TQString &);
bool save(const TQString &);
%End
%If (TQt_3_0_0 -)
bool load(TQIODevice *,const char * = 0); bool load(TQIODevice *,const char * = 0);
bool load(const TQString &,const char * = 0); bool load(const TQString &,const char * = 0);
bool save(TQIODevice *,const char * = 0); bool save(TQIODevice *,const char * = 0);
bool save(const TQString &,const char * = 0); bool save(const TQString &,const char * = 0);
TQRect boundingRect() const; TQRect boundingRect() const;
%End
%If (TQt_3_1_0 -)
void setBoundingRect(const TQRect &); void setBoundingRect(const TQRect &);
%End
protected: protected:
%If (TQt_3_0_0 -)
void detach(); void detach();
TQPicture copy() const; TQPicture copy() const;
%End
private: private:
%If (- TQt_3_0_0)
TQPicture(const TQPicture &);
%End
}; };
%End %End

@ -56,103 +56,6 @@ Not implemented.
%End %End
%If (- TQt_2_00)
class TQPixmap : TQPaintDevice
{
%TypeHeaderCode
#include <tqpixmap.h>
%End
public:
enum ColorMode
{
Auto,
Color,
Mono
};
TQPixmap();
TQPixmap(int,int,int = -1);
TQPixmap(const TQSize &,int = -1);
TQPixmap(const char *,const char * = 0,ColorMode = Auto);
TQPixmap(const char *,const char *,int);
TQPixmap(SIP_PYLIST) [(const char **)];
%MethodCode
// The Python interface is a list of strings that make up the
// image.
const char **str;
if ((str = PyTQt_qt_ListToArray(a0)) == NULL)
sipIsErr = 1;
else
{
Py_BEGIN_ALLOW_THREADS
sipCpp = new sipTQPixmap(str);
Py_END_ALLOW_THREADS
sipFree((void *)str);
}
%End
TQPixmap(const TQPixmap &);
bool isNull() const;
int width() const;
int height() const;
TQSize size() const;
TQRect rect() const;
int depth() const;
static int defaultDepth();
void fill(const TQColor & = white);
void fill(const TQWidget *,int,int);
void fill(const TQWidget *,const TQPoint &);
void resize(int,int);
void resize(const TQSize &);
const TQBitmap *mask() const;
void setMask(const TQBitmap &);
bool selfMask() const;
TQBitmap createHeuristicMask(bool = 1) const;
static TQPixmap grabWindow(WId,int = 0,int = 0,int = -1,int = -1);
TQPixmap xForm(const TQWMatrix &) const;
static TQWMatrix trueMatrix(const TQWMatrix &,int,int);
TQImage convertToImage() const;
bool convertFromImage(const TQImage &,ColorMode = Auto);
bool convertFromImage(const TQImage &,int);
static const char *imageFormat(const char *);
bool load(const char *,const char * = 0,ColorMode = Auto);
bool load(const char *,const char *,int);
bool loadFromData(const uchar * /Array/,uint /ArraySize/,
const char * = 0,ColorMode = Auto);
// bool loadFromData(const uchar *,uint,const char *,int);
bool loadFromData(TQByteArray,const char * = 0,int = 0);
bool save(const char *,const char *) const;
int serialNumber() const;
enum Optimization
{
NoOptim,
NormalOptim,
BestOptim
};
Optimization optimization() const;
void setOptimization(Optimization);
static Optimization defaultOptimization();
static void setDefaultOptimization(Optimization);
virtual void detach();
bool isTQBitmap() const;
protected:
TQPixmap(int,int,const uchar *,bool);
};
%End
%If (TQt_2_00 -)
class TQPixmap : TQPaintDevice, TQt class TQPixmap : TQPaintDevice, TQt
{ {
%TypeHeaderCode %TypeHeaderCode
@ -177,9 +80,7 @@ public:
}; };
TQPixmap(); TQPixmap();
%If (TQt_3_0_0 -)
TQPixmap(const TQImage &); TQPixmap(const TQImage &);
%End
TQPixmap(int,int,int = -1,Optimization = DefaultOptim); TQPixmap(int,int,int = -1,Optimization = DefaultOptim);
TQPixmap(const TQSize &,int = -1,Optimization = DefaultOptim); TQPixmap(const TQSize &,int = -1,Optimization = DefaultOptim);
TQPixmap(const TQString &,const char * = 0,ColorMode = Auto); TQPixmap(const TQString &,const char * = 0,ColorMode = Auto);
@ -222,20 +123,12 @@ public:
const TQBitmap *mask() const; const TQBitmap *mask() const;
void setMask(const TQBitmap &); void setMask(const TQBitmap &);
bool selfMask() const; bool selfMask() const;
%If (TQt_3_1_0 -)
bool hasAlpha() const; bool hasAlpha() const;
%End
%If (TQt_3_2_0 -)
bool hasAlphaChannel() const; bool hasAlphaChannel() const;
%End
TQBitmap createHeuristicMask(bool = 1) const; TQBitmap createHeuristicMask(bool = 1) const;
%If (TQt_3_1_0 -)
static TQPixmap fromMimeSource(const TQString &); static TQPixmap fromMimeSource(const TQString &);
%End
static TQPixmap grabWindow(WId,int = 0,int = 0,int = -1,int = -1); static TQPixmap grabWindow(WId,int = 0,int = 0,int = -1,int = -1);
%If (TQt_2_1_0 -)
static TQPixmap grabWidget(TQWidget *,int = 0,int = 0,int = -1,int = -1); static TQPixmap grabWidget(TQWidget *,int = 0,int = 0,int = -1,int = -1);
%End
TQPixmap xForm(const TQWMatrix &) const; TQPixmap xForm(const TQWMatrix &) const;
static TQWMatrix trueMatrix(const TQWMatrix &,int,int); static TQWMatrix trueMatrix(const TQWMatrix &,int,int);
@ -249,18 +142,8 @@ public:
const char * = 0,ColorMode = Auto); const char * = 0,ColorMode = Auto);
// bool loadFromData(const uchar *,uint,const char *,int); // bool loadFromData(const uchar *,uint,const char *,int);
bool loadFromData(TQByteArray,const char * = 0,int = 0); bool loadFromData(TQByteArray,const char * = 0,int = 0);
%If (- TQt_3_0_0)
bool save(const TQString &,const char *) const;
%End
%If (TQt_2_2_0 - TQt_3_0_0)
bool save(const TQString &,const char *,int) const;
%End
%If (TQt_3_0_0 -)
bool save(const TQString &,const char *,int = -1) const; bool save(const TQString &,const char *,int = -1) const;
%End
%If (TQt_3_2_0 -)
bool save(TQIODevice *,const char *,int = -1) const; bool save(TQIODevice *,const char *,int = -1) const;
%End
int serialNumber() const; int serialNumber() const;
Optimization optimization() const; Optimization optimization() const;
void setOptimization(Optimization); void setOptimization(Optimization);
@ -269,20 +152,14 @@ public:
virtual void detach(); virtual void detach();
bool isTQBitmap() const; bool isTQBitmap() const;
%If (TQt_3_0_0 -)
%If (WS_X11) %If (WS_X11)
static int x11SetDefaultScreen(int); static int x11SetDefaultScreen(int);
void x11SetScreen(int); void x11SetScreen(int);
%End %End
%End
protected: protected:
TQPixmap(int,int,const uchar *,bool); TQPixmap(int,int,const uchar *,bool);
}; };
%End
%If (TQt_3_2_0 -)
void copyBlt(TQPixmap *,int,int,const TQPixmap *,int = 0,int = 0,int = -1, void copyBlt(TQPixmap *,int,int,const TQPixmap *,int = 0,int = 0,int = -1,
int = -1); int = -1);
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_3_0_0 -)
class TQPixmapCache class TQPixmapCache
{ {
%TypeHeaderCode %TypeHeaderCode
@ -44,10 +42,6 @@ public:
static bool find(const TQString &,TQPixmap &); static bool find(const TQString &,TQPixmap &);
// static bool insert(const TQString &,TQPixmap *); // static bool insert(const TQString &,TQPixmap *);
static bool insert(const TQString &,const TQPixmap &); static bool insert(const TQString &,const TQPixmap &);
%If (TQt_3_2_0 -)
static void remove(const TQString &); static void remove(const TQString &);
%End
static void clear(); static void clear();
}; };
%End

@ -40,7 +40,6 @@ This takes only the <Literal>sb</Literal> parameter and returns a tuple of the
%End %End
%If (TQt_2_00 -)
%If (TQt_STYLE_PLATINUM) %If (TQt_STYLE_PLATINUM)
class TQPlatinumStyle : TQWindowsStyle class TQPlatinumStyle : TQWindowsStyle
@ -52,48 +51,6 @@ class TQPlatinumStyle : TQWindowsStyle
public: public:
TQPlatinumStyle(); TQPlatinumStyle();
%If (- TQt_3_0_0)
void drawPopupPanel(TQPainter *,int,int,int,int,const TQColorGroup &,
int = 2,const TQBrush * = 0);
void drawButton(TQPainter *,int,int,int,int,const TQColorGroup &,bool = 0,
const TQBrush * = 0);
TQRect buttonRect(int,int,int,int);
void drawBevelButton(TQPainter *,int,int,int,int,const TQColorGroup &,
bool = 0,const TQBrush * = 0);
void drawPushButton(TQPushButton *,TQPainter *);
void drawPushButtonLabel(TQPushButton *,TQPainter *);
void scrollBarMetrics(const TQScrollBar *,int &,int &,int &,int &);
void drawScrollBarControls(TQPainter *,const TQScrollBar *,int,uint,uint);
ScrollControl scrollBarPointOver(const TQScrollBar *,int,const TQPoint &);
TQSize indicatorSize() const;
void drawIndicator(TQPainter *,int,int,int,int,const TQColorGroup &,int,
bool = 0,bool = 1);
void drawIndicatorMask(TQPainter *,int,int,int,int,int);
TQSize exclusiveIndicatorSize() const;
void drawExclusiveIndicator(TQPainter *,int,int,int,int,
const TQColorGroup &,bool,bool = 0,bool = 1);
void drawComboButton(TQPainter *,int,int,int,int,const TQColorGroup &,
bool = 0,bool = 0,bool = 1,const TQBrush * = 0);
TQRect comboButtonRect(int,int,int,int);
TQRect comboButtonFocusRect(int,int,int,int);
int sliderLength() const;
void drawSlider(TQPainter *,int,int,int,int,const TQColorGroup &,
Orientation,bool,bool);
void drawSliderMask(TQPainter *,int,int,int,int,Orientation,bool,bool);
void drawSliderGroove(TQPainter *,int,int,int,int,const TQColorGroup &,
TQCOORD,Orientation);
int maximumSliderDragDistance() const;
void drawCheckMark(TQPainter *,int,int,int,int,const TQColorGroup &,
bool,bool);
void polishPopupMenu(TQPopupMenu *);
int extraPopupMenuItemWidth(bool,int,TQMenuItem *,const TQFontMetrics &);
int popupMenuItemHeight(bool,TQMenuItem *,const TQFontMetrics &);
void drawPopupMenuItem(TQPainter *,bool,int,int,TQMenuItem *,
const TQPalette &,bool,bool,int,int,int,int);
%End
%If (TQt_3_0_0 -)
void drawPrimitive(PrimitiveElement,TQPainter *,const TQStyleControlElementData&,ControlElementFlags,const TQRect &, void drawPrimitive(PrimitiveElement,TQPainter *,const TQStyleControlElementData&,ControlElementFlags,const TQRect &,
const TQColorGroup &,SFlags = Style_Default, const TQColorGroup &,SFlags = Style_Default,
const TQStyleOption & = TQStyleOption()) const; const TQStyleOption & = TQStyleOption()) const;
@ -115,28 +72,14 @@ public:
int pixelMetric(PixelMetric,const TQStyleControlElementData&,ControlElementFlags,const TQWidget * = 0) const; int pixelMetric(PixelMetric,const TQStyleControlElementData&,ControlElementFlags,const TQWidget * = 0) const;
TQRect subRect(SubRect,const TQStyleControlElementData&, const ControlElementFlags,const TQWidget *) const; TQRect subRect(SubRect,const TQStyleControlElementData&, const ControlElementFlags,const TQWidget *) const;
%End
protected: protected:
%If (- TQt_3_0_0)
void drawScrollBarBackground(TQPainter *,int,int,int,int,
const TQColorGroup &,bool,
const TQBrush * = 0);
%End
TQColor mixedColor(const TQColor &,const TQColor &) const; TQColor mixedColor(const TQColor &,const TQColor &) const;
%If (- TQt_3_0_0)
void drawRiffles(TQPainter *,int,int,int,int,const TQColorGroup &,bool);
%End
%If (TQt_3_0_0 -)
void drawRiffles(TQPainter *,int,int,int,int,const TQColorGroup &, void drawRiffles(TQPainter *,int,int,int,int,const TQColorGroup &,
bool) const; bool) const;
%End
private: private:
%If (TQt_3_0_0 -)
TQPlatinumStyle(const TQPlatinumStyle &); TQPlatinumStyle(const TQPlatinumStyle &);
%End
}; };
%End %End
%End

@ -66,9 +66,7 @@ public:
int y() const; int y() const;
void setX(int); void setX(int);
void setY(int); void setY(int);
%If (TQt_2_00 -)
int manhattanLength() const; int manhattanLength() const;
%End
// TQCOORD &rx(); // TQCOORD &rx();
// TQCOORD &ry(); // TQCOORD &ry();

@ -109,7 +109,7 @@ static TQCOORD *getPoints(int nrpnts,PyObject *pntlist)
for (int i = 0; i < nrpnts; ++i) for (int i = 0; i < nrpnts; ++i)
{ {
*pp++ = (TQCOORD)PyInt_AsLong(PyList_GetItem(pntlist,i)); *pp++ = (TQCOORD)PyLong_AsLong(PyList_GetItem(pntlist,i));
if (PyErr_Occurred() != NULL) if (PyErr_Occurred() != NULL)
{ {
@ -203,27 +203,14 @@ public:
%End %End
// bool putPoints(int,int,int,int,...); // bool putPoints(int,int,int,int,...);
%If (TQt_3_0_0 -)
bool putPoints(int,int,const TQPointArray &,int = 0); bool putPoints(int,int,const TQPointArray &,int = 0);
%End
%If (- TQt_2_00)
TQPoint at(uint) const;
%End
void makeArc(int,int,int,int,int,int); void makeArc(int,int,int,int,int,int);
void makeEllipse(int,int,int,int); void makeEllipse(int,int,int,int);
%If (TQt_TRANSFORMATIONS) %If (TQt_TRANSFORMATIONS)
%If (TQt_2_00 -)
void makeArc(int,int,int,int,int,int,const TQWMatrix &); void makeArc(int,int,int,int,int,int,const TQWMatrix &);
%End %End
%End
%If (- TQt_3_0_0)
TQPointArray quadBezier() const;
%End
%If (TQt_3_0_0 -)
TQPointArray cubicBezier() const; TQPointArray cubicBezier() const;
%End
// These are actually in TQArray, which isn't implemented so pretend // These are actually in TQArray, which isn't implemented so pretend
// they are here. // they are here.
@ -235,13 +222,9 @@ public:
uint size() const; uint size() const;
bool truncate(uint); bool truncate(uint);
bool fill(const TQPoint &,int = -1); bool fill(const TQPoint &,int = -1);
%If (TQt_2_00 -)
TQPoint &at(uint) const; TQPoint &at(uint) const;
%End
%If (TQt_2_1_0 -)
void sort(); void sort();
int bsearch(const TQPoint &) const; int bsearch(const TQPoint &) const;
%End
int find(const TQPoint &,uint = 0) const; int find(const TQPoint &,uint = 0) const;
int contains(const TQPoint &) const; int contains(const TQPoint &) const;
}; };

@ -56,97 +56,6 @@ ensures that the menu is deleted without having to explicity code it using
%End %End
%If (- TQt_2_00)
class TQPopupMenu : TQTableView, TQMenuData
{
%TypeHeaderCode
#include <tqpopupmenu.h>
%End
public:
TQPopupMenu(TQWidget * /TransferThis/ = 0,const char * = 0);
void popup(const TQPoint &,int = 0);
void updateItem(int);
void setCheckable(bool);
bool isCheckable() const;
void setFont(const TQFont &);
void show();
void hide();
int exec() /PyName=exec_loop, ReleaseGIL,
PreHook=__pyTQtPreEventLoopHook__,
PostHook=__pyTQtPostEventLoopHook__/;
%MethodCode
// Transfer ownership back to Python (a modal menu will
// probably have the main window as it's parent). This means
// the TQt menu will be deleted when the Python wrapper is
// garbage collected. Although this is a little inconsistent,
// it saves having to code it explicitly to avoid the memory
// leak.
sipTransferBack(sipSelf);
Py_BEGIN_ALLOW_THREADS
sipRes = sipCpp->TQPopupMenu::exec();
Py_END_ALLOW_THREADS
%End
int exec(const TQPoint &,int = 0) /PyName=exec_loop, ReleaseGIL,
PreHook=__pyTQtPreEventLoopHook__,
PostHook=__pyTQtPostEventLoopHook__/;
%MethodCode
// Transfer ownership back to Python (a modal menu will
// probably have the main window as it's parent). This means
// the TQt menu will be deleted when the Python wrapper is
// garbage collected. Although this is a little inconsistent,
// it saves having to code it explicitly to avoid the memory
// leak.
sipTransferBack(sipSelf);
Py_BEGIN_ALLOW_THREADS
sipRes = sipCpp->TQPopupMenu::exec(*a0,a1);
Py_END_ALLOW_THREADS
%End
void setActiveItem(int);
int idAt(int) const;
%If (TQt_1_43 -)
int idAt(const TQPoint &) const;
%End
signals:
void activated(int);
void highlighted(int);
void activatedRedirect(int);
void highlightedRedirect(int);
void aboutToShow();
protected:
int cellHeight(int);
int cellWidth(int);
void paintCell(TQPainter *,int,int);
void paintEvent(TQPaintEvent *);
void mousePressEvent(TQMouseEvent *);
void mouseReleaseEvent(TQMouseEvent *);
void mouseMoveEvent(TQMouseEvent *);
void keyPressEvent(TQKeyEvent *);
void timerEvent(TQTimerEvent *);
private:
TQPopupMenu(const TQPopupMenu &);
void menuContentsChanged();
void menuStateChanged();
void menuInsPopup(TQPopupMenu *);
void menuDelPopup(TQPopupMenu *);
void frameChanged();
};
%End
%If (TQt_2_00 -)
class TQPopupMenu : TQFrame, TQMenuData class TQPopupMenu : TQFrame, TQMenuData
{ {
%TypeHeaderCode %TypeHeaderCode
@ -156,12 +65,7 @@ class TQPopupMenu : TQFrame, TQMenuData
public: public:
TQPopupMenu(TQWidget * /TransferThis/ = 0,const char * = 0); TQPopupMenu(TQWidget * /TransferThis/ = 0,const char * = 0);
%If (- TQt_3_0_5)
void popup(const TQPoint &,int = 0);
%End
%If (TQt_3_0_5 -)
void popup(const TQPoint &,int = -1); void popup(const TQPoint &,int = -1);
%End
void updateItem(int); void updateItem(int);
virtual void setCheckable(bool); virtual void setCheckable(bool);
@ -213,16 +117,10 @@ public:
bool customWhatsThis() const; bool customWhatsThis() const;
%If (TQt_2_1_0 -)
int insertTearOffHandle(int = -1,int = -1); int insertTearOffHandle(int = -1,int = -1);
%End
%If (TQt_2_2_0 -)
void activateItemAt(int); void activateItemAt(int);
%End
%If (TQt_3_0_0 -)
TQRect itemGeometry(int); TQRect itemGeometry(int);
%End
signals: signals:
void activated(int); void activated(int);
@ -230,9 +128,7 @@ signals:
void activatedRedirect(int); void activatedRedirect(int);
void highlightedRedirect(int); void highlightedRedirect(int);
void aboutToShow(); void aboutToShow();
%If (TQt_2_2_0 -)
void aboutToHide(); void aboutToHide();
%End
protected: protected:
int itemHeight(int) const; int itemHeight(int) const;
@ -247,27 +143,17 @@ protected:
void mouseReleaseEvent(TQMouseEvent *); void mouseReleaseEvent(TQMouseEvent *);
void mouseMoveEvent(TQMouseEvent *); void mouseMoveEvent(TQMouseEvent *);
void keyPressEvent(TQKeyEvent *); void keyPressEvent(TQKeyEvent *);
%If (TQt_2_1_0 -)
void focusInEvent(TQFocusEvent *); void focusInEvent(TQFocusEvent *);
void focusOutEvent(TQFocusEvent *); void focusOutEvent(TQFocusEvent *);
%End
void timerEvent(TQTimerEvent *); void timerEvent(TQTimerEvent *);
%If (TQt_3_0_0 -)
void leaveEvent(TQEvent *); void leaveEvent(TQEvent *);
%End
void styleChange(TQStyle &); void styleChange(TQStyle &);
%If (TQt_3_1_0 -)
void enabledChange(bool); void enabledChange(bool);
%End
%If (TQt_2_1_0 -)
int columns() const; int columns() const;
bool focusNextPrevChild(bool); bool focusNextPrevChild(bool);
%End
%If (TQt_3_0_0 -)
int itemAtPos(const TQPoint &,bool = 1) const; int itemAtPos(const TQPoint &,bool = 1) const;
%End
private: private:
TQPopupMenu(const TQPopupMenu &); TQPopupMenu(const TQPopupMenu &);
@ -278,5 +164,3 @@ private:
void menuDelPopup(TQPopupMenu *); void menuDelPopup(TQPopupMenu *);
void frameChanged(); void frameChanged();
}; };
%End

@ -41,20 +41,13 @@ class TQPrintDialog : TQDialog
public: public:
TQPrintDialog(TQPrinter *,TQWidget * /TransferThis/ = 0,const char * = 0); TQPrintDialog(TQPrinter *,TQWidget * /TransferThis/ = 0,const char * = 0);
%If (- TQt_3_0_0)
static bool getPrinterSetup(TQPrinter *);
%End
%If (TQt_3_0_0 -)
static bool getPrinterSetup(TQPrinter *,TQWidget * = 0); static bool getPrinterSetup(TQPrinter *,TQWidget * = 0);
static void setGlobalPrintDialog(TQPrintDialog *); static void setGlobalPrintDialog(TQPrintDialog *);
%End
void setPrinter(TQPrinter *,bool = 0); void setPrinter(TQPrinter *,bool = 0);
TQPrinter *printer() const; TQPrinter *printer() const;
%If (TQt_2_1_0 -)
void addButton(TQPushButton *); void addButton(TQPushButton *);
%End
private: private:
TQPrintDialog(const TQPrintDialog &); TQPrintDialog(const TQPrintDialog &);

@ -38,21 +38,14 @@ class TQPrinter : TQPaintDevice
%End %End
public: public:
%If (TQt_3_0_0 -)
enum PrinterMode { enum PrinterMode {
ScreenResolution, ScreenResolution,
PrinterResolution, PrinterResolution,
HighResolution, HighResolution,
Compatible Compatible
}; };
%End
%If (- TQt_3_0_0)
TQPrinter();
%End
%If (TQt_3_0_0 -)
TQPrinter(PrinterMode = ScreenResolution); TQPrinter(PrinterMode = ScreenResolution);
%End
enum Orientation { enum Orientation {
Portrait, Portrait,
@ -63,12 +56,8 @@ public:
A4, B5, Letter, Legal, Executive, A0, A1, A2, A3, A5, A6, A7, A4, B5, Letter, Legal, Executive, A0, A1, A2, A3, A5, A6, A7,
A8, A9, B0, B1, B10, B2, B3, B4, B6, B7, B8, B9, C5E, Comm10E, A8, A9, B0, B1, B10, B2, B3, B4, B6, B7, B8, B9, C5E, Comm10E,
DLE, Folio, Ledger, Tabloid, DLE, Folio, Ledger, Tabloid,
%If (TQt_2_3_1 -)
Custom, Custom,
%End
%If (TQt_2_00 -)
NPageSize NPageSize
%End
}; };
enum PageOrder { enum PageOrder {
@ -81,7 +70,6 @@ public:
Color Color
}; };
%If (TQt_3_0_0 -)
enum PaperSource { enum PaperSource {
OnlyOne, OnlyOne,
Lower, Lower,
@ -97,9 +85,7 @@ public:
Cassette, Cassette,
FormSource FormSource
}; };
%End
%If (TQt_3_2_0 -)
enum PrintRange { enum PrintRange {
AllPages, AllPages,
Selection, Selection,
@ -111,31 +97,10 @@ public:
PrintSelection, PrintSelection,
PrintPageRange PrintPageRange
}; };
%End
%If (- TQt_2_00)
const char *printerName() const;
void setPrinterName(const char *);
%End
%If (TQt_2_00 -)
TQString printerName() const; TQString printerName() const;
virtual void setPrinterName(const TQString &); virtual void setPrinterName(const TQString &);
%End
bool outputToFile() const; bool outputToFile() const;
%If (- TQt_2_00)
void setOutputToFile(bool);
const char *outputFileName() const;
void setOutputFileName(const char *);
const char *printProgram() const;
void setPrintProgram(const char *);
const char *docName() const;
void setDocName(const char *);
const char *creator() const;
void setCreator(const char *);
%End
%If (TQt_2_00 -)
virtual void setOutputToFile(bool); virtual void setOutputToFile(bool);
TQString outputFileName() const; TQString outputFileName() const;
virtual void setOutputFileName(const TQString &); virtual void setOutputFileName(const TQString &);
@ -150,88 +115,45 @@ public:
virtual void setDocName(const TQString &); virtual void setDocName(const TQString &);
TQString creator() const; TQString creator() const;
virtual void setCreator(const TQString &); virtual void setCreator(const TQString &);
%End
Orientation orientation() const; Orientation orientation() const;
%If (- TQt_2_00)
void setOrientation(Orientation);
%End
%If (TQt_2_00 -)
virtual void setOrientation(Orientation); virtual void setOrientation(Orientation);
%End
PageSize pageSize() const; PageSize pageSize() const;
%If (- TQt_2_00)
void setPageSize(PageSize);
void setPageOrder(PageOrder);
%End
%If (TQt_2_00 -)
virtual void setPageSize(PageSize); virtual void setPageSize(PageSize);
virtual void setPageOrder(PageOrder); virtual void setPageOrder(PageOrder);
%End
PageOrder pageOrder() const; PageOrder pageOrder() const;
%If (TQt_3_0_0 -)
void setResolution(int); void setResolution(int);
int resolution() const; int resolution() const;
%End
%If (- TQt_2_00)
void setColorMode(ColorMode);
%End
%If (TQt_2_00 -)
virtual void setColorMode(ColorMode); virtual void setColorMode(ColorMode);
%End
ColorMode colorMode() const; ColorMode colorMode() const;
%If (TQt_2_00 -)
virtual void setFullPage(bool); virtual void setFullPage(bool);
bool fullPage() const; bool fullPage() const;
TQSize margins() const; TQSize margins() const;
%End
%If (TQt_3_1_0 -)
void setMargins(uint,uint,uint,uint); void setMargins(uint,uint,uint,uint);
// void margins(uint *,uint *,uint *,uint *) const; // void margins(uint *,uint *,uint *,uint *) const;
%End
int fromPage() const; int fromPage() const;
int toPage() const; int toPage() const;
%If (- TQt_2_00)
void setFromTo(int,int);
%End
%If (TQt_2_00 -)
virtual void setFromTo(int,int); virtual void setFromTo(int,int);
%End
int minPage() const; int minPage() const;
int maxPage() const; int maxPage() const;
%If (- TQt_2_00)
void setMinMax(int,int);
%End
%If (TQt_2_00 -)
virtual void setMinMax(int,int); virtual void setMinMax(int,int);
%End
int numCopies() const; int numCopies() const;
%If (- TQt_2_00)
void setNumCopies(int);
%End
%If (TQt_2_00 -)
virtual void setNumCopies(int); virtual void setNumCopies(int);
%End
%If (TQt_3_0_0 -)
bool collateCopiesEnabled() const; bool collateCopiesEnabled() const;
void setCollateCopiesEnabled(bool); void setCollateCopiesEnabled(bool);
bool collateCopies() const; bool collateCopies() const;
void setCollateCopies(bool); void setCollateCopies(bool);
%End
%If (TQt_3_2_0 -)
PrintRange printRange() const; PrintRange printRange() const;
void setPrintRange(PrintRange); void setPrintRange(PrintRange);
%End
bool newPage(); bool newPage();
bool abort(); bool abort();
@ -239,15 +161,11 @@ public:
bool setup(TQWidget * = 0); bool setup(TQWidget * = 0);
%If (TQt_3_0_0 -)
PaperSource paperSource() const; PaperSource paperSource() const;
virtual void setPaperSource(PaperSource); virtual void setPaperSource(PaperSource);
%End
%If (TQt_3_2_0 -)
void setOptionEnabled(PrinterOption,bool); void setOptionEnabled(PrinterOption,bool);
bool isOptionEnabled(PrinterOption); bool isOptionEnabled(PrinterOption);
%End
private: private:
TQPrinter(const TQPrinter &); TQPrinter(const TQPrinter &);

@ -29,8 +29,6 @@
%End %End
%If (TQt_3_0_0 -)
class TQProcess : TQObject class TQProcess : TQObject
{ {
%TypeHeaderCode %TypeHeaderCode
@ -104,9 +102,5 @@ protected:
void disconnectNotify(const char *); void disconnectNotify(const char *);
private: private:
%If (TQt_3_1_0 -)
TQProcess(const TQProcess &); TQProcess(const TQProcess &);
%End
}; };
%End

@ -41,15 +41,9 @@ public:
int totalSteps() const; int totalSteps() const;
int progress() const; int progress() const;
%If (TQt_3_0_0 -)
const TQString &progressString() const; const TQString &progressString() const;
%End
TQSize sizeHint() const; TQSize sizeHint() const;
%If (TQt_2_00 - TQt_3_0_0)
TQSizePolicy sizePolicy() const;
%End
%If (TQt_2_00 -)
TQSize minimumSizeHint() const; TQSize minimumSizeHint() const;
void setCenterIndicator(bool); void setCenterIndicator(bool);
@ -57,38 +51,22 @@ public:
void setIndicatorFollowsStyle(bool); void setIndicatorFollowsStyle(bool);
bool indicatorFollowsStyle() const; bool indicatorFollowsStyle() const;
%End
%If (TQt_3_0_0 -)
bool percentageVisible() const; bool percentageVisible() const;
void setPercentageVisible(bool); void setPercentageVisible(bool);
%End
void show(); void show();
public slots: public slots:
void reset(); void reset();
%If (- TQt_2_00)
void setTotalSteps(int);
void setProgress(int);
%End
%If (TQt_2_00 -)
virtual void setTotalSteps(int); virtual void setTotalSteps(int);
virtual void setProgress(int); virtual void setProgress(int);
%End
%If (TQt_3_1_0 -)
void setProgress(int,int); void setProgress(int,int);
%End
protected: protected:
void drawContents(TQPainter *); void drawContents(TQPainter *);
virtual bool setIndicator(TQString &,int,int); virtual bool setIndicator(TQString &,int,int);
%If (TQt_2_00 - TQt_3_0_0)
void drawContentsMask(TQPainter *);
%End
%If (TQt_2_00 -)
void styleChange(TQStyle &); void styleChange(TQStyle &);
%End
private: private:
TQProgressBar(const TQProgressBar &); TQProgressBar(const TQProgressBar &);

@ -32,8 +32,6 @@ value.
%If (TQt_PROGRESSDIALOG) %If (TQt_PROGRESSDIALOG)
%If (TQt_3_0_0 -)
class TQProgressDialog : TQDialog class TQProgressDialog : TQDialog
{ {
%TypeHeaderCode %TypeHeaderCode
@ -52,9 +50,7 @@ public:
void setBar(TQProgressBar *); void setBar(TQProgressBar *);
bool wasCancelled() const; bool wasCancelled() const;
%If (TQt_3_2_0 -)
bool wasCanceled() const; bool wasCanceled() const;
%End
int totalSteps() const; int totalSteps() const;
int progress() const; int progress() const;
@ -75,9 +71,7 @@ public slots:
void reset(); void reset();
void setTotalSteps(int); void setTotalSteps(int);
void setProgress(int); void setProgress(int);
%If (TQt_3_1_0 -)
void setProgress(int,int); void setProgress(int,int);
%End
void setLabelText(const TQString &); void setLabelText(const TQString &);
void setCancelButtonText(const TQString &); void setCancelButtonText(const TQString &);
@ -85,9 +79,7 @@ public slots:
signals: signals:
void cancelled(); void cancelled();
%If (TQt_3_2_0 -)
void canceled(); void canceled();
%End
protected: protected:
void resizeEvent(TQResizeEvent *); void resizeEvent(TQResizeEvent *);
@ -103,92 +95,3 @@ private:
}; };
%End %End
%If (- TQt_3_0_0)
class TQProgressDialog : TQSemiModal
{
%TypeHeaderCode
#include <tqprogressdialog.h>
%End
public:
TQProgressDialog(TQWidget * /TransferThis/ = 0,const char * = 0,bool = 0,
WFlags = 0);
%If (- TQt_2_00)
TQProgressDialog(const char *,const char *,int,TQWidget * /TransferThis/ = 0,
const char * = 0,bool = 0,WFlags = 0);
%End
%If (TQt_2_00 -)
TQProgressDialog(const TQString &,const TQString &,int,
TQWidget * /TransferThis/ = 0,const char * = 0,bool = 0,
WFlags = 0);
%End
void setLabel(TQLabel *);
void setCancelButton(TQPushButton *);
void setBar(TQProgressBar *);
bool wasCancelled() const;
int totalSteps() const;
int progress() const;
TQSize sizeHint() const;
int minimumDuration() const;
%If (TQt_2_1_0 -)
TQString labelText() const;
void setAutoReset(bool);
bool autoReset() const;
void setAutoClose(bool);
bool autoClose() const;
%End
public slots:
void cancel();
void reset();
void setTotalSteps(int);
void setProgress(int);
%If (- TQt_2_00)
void setLabelText(const char *);
void setCancelButtonText(const char *);
%End
%If (TQt_2_00 -)
void setLabelText(const TQString &);
void setCancelButtonText(const TQString &);
%End
void setMinimumDuration(int);
signals:
void cancelled();
protected:
void resizeEvent(TQResizeEvent *);
%If (- TQt_2_00)
void styleChange(GUIStyle);
%End
%If (TQt_2_00 -)
void closeEvent(TQCloseEvent *);
void styleChange(TQStyle &);
%End
%If (TQt_2_1_0 -)
void showEvent(TQShowEvent *);
%End
protected slots:
%If (TQt_2_2_0 -)
void forceShow();
%End
private:
TQProgressDialog(const TQProgressDialog &);
};
%End
%End

@ -31,8 +31,6 @@ converted to and from Python lists of the type.
%End %End
%If (TQt_2_00 -)
template<Type> template<Type>
%MappedType TQPtrList<Type> %MappedType TQPtrList<Type>
{ {
@ -107,5 +105,3 @@ template<Type>
return sipGetState(sipTransferObj); return sipGetState(sipTransferObj);
%End %End
}; };
%End

@ -19,6 +19,7 @@
// 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.
%DefaultEncoding "UTF-8"
%ExportedDoc %ExportedDoc
<Sect2><Title>TQPushButton</Title> <Sect2><Title>TQPushButton</Title>
@ -36,107 +37,46 @@ class TQPushButton : TQButton
%End %End
public: public:
%If (- TQt_2_00)
TQPushButton(TQWidget * /TransferThis/ = 0,const char * = 0);
TQPushButton(const char *,TQWidget * /TransferThis/ = 0,const char * = 0);
%End
%If (TQt_2_00 -)
TQPushButton(TQWidget * /TransferThis/,const char * = 0); TQPushButton(TQWidget * /TransferThis/,const char * = 0);
TQPushButton(const TQString &,TQWidget * /TransferThis/,const char * = 0); TQPushButton(const TQString &,TQWidget * /TransferThis/,const char * = 0);
%End
%If (TQt_2_1_0 -)
TQPushButton(const TQIconSet &,const TQString &,TQWidget * /TransferThis/,const char * = 0); TQPushButton(const TQIconSet &,const TQString &,TQWidget * /TransferThis/,const char * = 0);
%End
TQSize sizeHint() const; TQSize sizeHint() const;
%If (TQt_2_00 - TQt_3_0_0)
TQSizePolicy sizePolicy() const;
%End
void move(int,int); void move(int,int);
void move(const TQPoint &); void move(const TQPoint &);
void resize(int,int); void resize(int,int);
void resize(const TQSize &); void resize(const TQSize &);
%If (- TQt_2_00)
void setGeometry(int,int,int,int);
void setGeometry(const TQRect &);
void setToggleButton(bool);
%End
%If (TQt_2_00 - TQt_3_0_0)
virtual void setGeometry(int,int,int,int);
virtual void setGeometry(const TQRect &);
virtual void setToggleButton(bool);
%End
%If (TQt_3_0_0 -)
void setGeometry(int,int,int,int); void setGeometry(int,int,int,int);
void setGeometry(const TQRect &); void setGeometry(const TQRect &);
void setToggleButton(bool); void setToggleButton(bool);
%End
bool autoDefault() const; bool autoDefault() const;
%If (- TQt_2_00)
void setAutoDefault(bool);
%End
%If (TQt_2_00 -)
virtual void setAutoDefault(bool); virtual void setAutoDefault(bool);
%End
bool isDefault() const; bool isDefault() const;
%If (- TQt_2_00)
void setDefault(bool);
%End
%If (TQt_2_00 -)
virtual void setDefault(bool); virtual void setDefault(bool);
%End
%If (- TQt_2_00)
void setIsMenuButton(bool);
%End
%If (TQt_2_00 - TQt_3_0_0)
virtual void setIsMenuButton(bool);
%End
%If (- TQt_3_0_0)
bool isMenuButton() const;
%End
%If (TQt_2_1_0 -)
void setPopup(TQPopupMenu *); void setPopup(TQPopupMenu *);
TQPopupMenu *popup() const; TQPopupMenu *popup() const;
void setIconSet(const TQIconSet &); void setIconSet(const TQIconSet &);
TQIconSet *iconSet() const; TQIconSet *iconSet() const;
%End
%If (TQt_2_2_0 -)
void setFlat(bool); void setFlat(bool);
bool isFlat() const; bool isFlat() const;
%End
public slots: public slots:
%If (- TQt_2_00)
void setOn(bool);
%End
%If (TQt_2_00 -)
virtual void setOn(bool); virtual void setOn(bool);
%End
%If (- TQt_3_0_0)
void toggle();
%End
protected: protected:
void drawButton(TQPainter *); void drawButton(TQPainter *);
void drawButtonLabel(TQPainter *); void drawButtonLabel(TQPainter *);
void focusInEvent(TQFocusEvent *); void focusInEvent(TQFocusEvent *);
%If (TQt_2_00 -)
void focusOutEvent(TQFocusEvent *); void focusOutEvent(TQFocusEvent *);
void resizeEvent(TQResizeEvent *); void resizeEvent(TQResizeEvent *);
void updateMask(); void updateMask();
%End
private: private:
TQPushButton(const TQPushButton &); TQPushButton(const TQPushButton &);

@ -36,48 +36,23 @@ class TQRadioButton : TQButton
%End %End
public: public:
%If (- TQt_2_00)
TQRadioButton(TQWidget * /TransferThis/ = 0,const char * = 0);
TQRadioButton(const char *,TQWidget * /TransferThis/ = 0,const char * = 0);
%End
%If (TQt_2_00 -)
TQRadioButton(TQWidget * /TransferThis/,const char * = 0); TQRadioButton(TQWidget * /TransferThis/,const char * = 0);
TQRadioButton(const TQString &,TQWidget * /TransferThis/,const char * = 0); TQRadioButton(const TQString &,TQWidget * /TransferThis/,const char * = 0);
%End
bool isChecked() const; bool isChecked() const;
TQSize sizeHint() const; TQSize sizeHint() const;
%If (- TQt_2_00)
void setChecked(bool);
%End
%If (TQt_2_00 - TQt_3_0_0)
virtual void setChecked(bool);
TQSizePolicy sizePolicy() const;
%End
public slots: public slots:
%If (TQt_3_0_0 -)
virtual void setChecked(bool); virtual void setChecked(bool);
%End
protected: protected:
bool hitButton(const TQPoint &) const; bool hitButton(const TQPoint &) const;
void drawButton(TQPainter *); void drawButton(TQPainter *);
void drawButtonLabel(TQPainter *); void drawButtonLabel(TQPainter *);
%If (- TQt_2_00)
void mouseReleaseEvent(TQMouseEvent *);
void keyPressEvent(TQKeyEvent *);
%End
%If (TQt_2_00 -)
void updateMask(); void updateMask();
void resizeEvent(TQResizeEvent *); void resizeEvent(TQResizeEvent *);
%End
%If (TQt_2_00 - TQt_3_0_0)
void focusInEvent(TQFocusEvent *);
%End
private: private:
TQRadioButton(const TQRadioButton &); TQRadioButton(const TQRadioButton &);

@ -49,24 +49,18 @@ public:
int minValue() const; int minValue() const;
int maxValue() const; int maxValue() const;
void setRange(int,int); void setRange(int,int);
%If (TQt_3_0_0 -)
void setMinValue(int); void setMinValue(int);
void setMaxValue(int); void setMaxValue(int);
%End
int lineStep() const; int lineStep() const;
int pageStep() const; int pageStep() const;
void setSteps(int,int); void setSteps(int,int);
%If (TQt_2_00 -)
int bound(int) const; int bound(int) const;
%End
protected: protected:
%If (TQt_2_00 -)
int positionFromValue(int,int) const; int positionFromValue(int,int) const;
int valueFromPosition(int,int) const; int valueFromPosition(int,int) const;
%End
void directSetValue(int); void directSetValue(int);
int prevValue() const; int prevValue() const;

@ -109,12 +109,10 @@ public:
int right() const; int right() const;
int bottom() const; int bottom() const;
%If (TQt_2_00 -)
// TQCOORD &rLeft(); // TQCOORD &rLeft();
// TQCOORD &rTop(); // TQCOORD &rTop();
// TQCOORD &rRight(); // TQCOORD &rRight();
// TQCOORD &rBottom(); // TQCOORD &rBottom();
%End
int x() const; int x() const;
int y() const; int y() const;
@ -125,12 +123,10 @@ public:
void setX(int); void setX(int);
void setY(int); void setY(int);
%If (TQt_3_1_0 -)
void setTopLeft(const TQPoint &); void setTopLeft(const TQPoint &);
void setBottomRight(const TQPoint &); void setBottomRight(const TQPoint &);
void setTopRight(const TQPoint &); void setTopRight(const TQPoint &);
void setBottomLeft(const TQPoint &); void setBottomLeft(const TQPoint &);
%End
TQPoint topLeft() const; TQPoint topLeft() const;
TQPoint bottomRight() const; TQPoint bottomRight() const;
@ -141,12 +137,10 @@ public:
void rect(int *,int *,int *,int *) const; void rect(int *,int *,int *,int *) const;
void coords(int *,int *,int *,int *) const; void coords(int *,int *,int *,int *) const;
%If (TQt_3_1_0 -)
void moveLeft(int); void moveLeft(int);
void moveTop(int); void moveTop(int);
void moveRight(int); void moveRight(int);
void moveBottom(int); void moveBottom(int);
%End
void moveTopLeft(const TQPoint &); void moveTopLeft(const TQPoint &);
void moveBottomLeft(const TQPoint &); void moveBottomLeft(const TQPoint &);
void moveTopRight(const TQPoint &); void moveTopRight(const TQPoint &);
@ -156,9 +150,7 @@ public:
void setRect(int,int,int,int); void setRect(int,int,int,int);
void setCoords(int,int,int,int); void setCoords(int,int,int,int);
%If (TQt_3_0_0 -)
void addCoords(int,int,int,int); void addCoords(int,int,int,int);
%End
TQSize size() const; TQSize size() const;
int width() const; int width() const;
@ -184,13 +176,8 @@ public:
sipRes = sipCpp -> contains(*a0); sipRes = sipCpp -> contains(*a0);
%End %End
%If (TQt_3_1_0 -)
bool contains(int,int) const; bool contains(int,int) const;
bool contains(int,int,bool) const; bool contains(int,int,bool) const;
%End
%If (TQt_2_2_0 - TQt_3_1_0)
bool contains(int,int,bool = 0) const;
%End
bool contains(const TQRect &,bool = 0) const; bool contains(const TQRect &,bool = 0) const;
int __contains__(const TQRect &) const; int __contains__(const TQRect &) const;

@ -61,21 +61,14 @@ class TQRegExp
%End %End
public: public:
%If (TQt_3_1_0 -)
enum CaretMode { enum CaretMode {
CaretAtZero, CaretAtZero,
CaretAtOffset, CaretAtOffset,
CaretWontMatch CaretWontMatch
}; };
%End
TQRegExp(); TQRegExp();
%If (- TQt_2_00)
TQRegExp(const char *,bool = 1,bool = 0);
%End
%If (TQt_2_00 -)
TQRegExp(const TQString &,bool = 1,bool = 0); TQRegExp(const TQString &,bool = 1,bool = 0);
%End
TQRegExp(const TQRegExp &); TQRegExp(const TQRegExp &);
bool operator==(const TQRegExp &) const; bool operator==(const TQRegExp &) const;
@ -83,57 +76,27 @@ public:
bool isEmpty() const; bool isEmpty() const;
bool isValid() const; bool isValid() const;
%If (- TQt_2_00)
const char *pattern() const;
%End
%If (TQt_2_00 -)
TQString pattern() const; TQString pattern() const;
%End
%If (TQt_2_2_0 -)
void setPattern(const TQString &); void setPattern(const TQString &);
%End
bool caseSensitive() const; bool caseSensitive() const;
void setCaseSensitive(bool); void setCaseSensitive(bool);
bool wildcard() const; bool wildcard() const;
void setWildcard(bool); void setWildcard(bool);
%If (TQt_3_0_0 -)
bool minimal() const; bool minimal() const;
void setMinimal(bool); void setMinimal(bool);
bool exactMatch(const TQString &) const; bool exactMatch(const TQString &) const;
%End
%If (- TQt_2_00)
int match(const char *,int = 0,int * = 0) const;
%End
%If (TQt_2_00 - TQt_3_0_0)
int match(const TQString &,int = 0,int * = 0) const;
%End
%If (TQt_2_2_0 - TQt_3_0_0)
int find(const TQString &,int);
%End
%If (TQt_3_0_0 -)
int search(const TQString &,int = 0) const; int search(const TQString &,int = 0) const;
%If (TQt_3_1_0 -)
int search(const TQString &,int,CaretMode) const; int search(const TQString &,int,CaretMode) const;
%End
int searchRev(const TQString &,int = -1) const; int searchRev(const TQString &,int = -1) const;
%If (TQt_3_1_0 -)
int searchRev(const TQString &,int,CaretMode) const; int searchRev(const TQString &,int,CaretMode) const;
%End
int matchedLength() const; int matchedLength() const;
%If (TQt_3_1_0 -)
int numCaptures() const; int numCaptures() const;
%End
TQStringList capturedTexts(); TQStringList capturedTexts();
TQString cap(int = 0); TQString cap(int = 0);
int pos(int = 0); int pos(int = 0);
%End
%If (TQt_3_1_0 -)
TQString errorString(); TQString errorString();
static TQString escape(const TQString &); static TQString escape(const TQString &);
%End
}; };

@ -71,9 +71,7 @@ public:
TQRegion(const TQRect &,RegionType = Rectangle); TQRegion(const TQRect &,RegionType = Rectangle);
TQRegion(const TQPointArray &,bool = 0); TQRegion(const TQPointArray &,bool = 0);
TQRegion(const TQRegion &); TQRegion(const TQRegion &);
%If (TQt_1_43 -)
TQRegion(const TQBitmap &); TQRegion(const TQBitmap &);
%End
bool isNull() const; bool isNull() const;
bool isEmpty() const; bool isEmpty() const;
@ -100,12 +98,8 @@ public:
TQRegion eor(const TQRegion &) const; TQRegion eor(const TQRegion &) const;
TQRect boundingRect() const; TQRect boundingRect() const;
%If (TQt_3_0_0 -)
TQMemArray<TQRect> rects() const; TQMemArray<TQRect> rects() const;
%End
%If (TQt_2_2_0 -)
// void setRects(const TQRect *,int); // void setRects(const TQRect *,int);
%End
const TQRegion operator|(const TQRegion &) const; const TQRegion operator|(const TQRegion &) const;
const TQRegion operator+(const TQRegion &) const; const TQRegion operator+(const TQRegion &) const;

@ -36,66 +36,23 @@ class TQScrollBar : TQWidget, TQRangeControl
%End %End
public: public:
%If (- TQt_2_00)
enum Orientation {
Horizontal,
Vertical
};
%End
%If (- TQt_2_00)
TQScrollBar(TQWidget * /TransferThis/ = 0,const char * = 0);
TQScrollBar(Orientation,TQWidget * /TransferThis/ = 0,const char * = 0);
TQScrollBar(int,int,int,int,int,Orientation,
TQWidget * /TransferThis/ = 0,const char * = 0);
%End
%If (TQt_2_00 -)
TQScrollBar(TQWidget * /TransferThis/,const char * = 0); TQScrollBar(TQWidget * /TransferThis/,const char * = 0);
TQScrollBar(Orientation,TQWidget * /TransferThis/,const char * = 0); TQScrollBar(Orientation,TQWidget * /TransferThis/,const char * = 0);
TQScrollBar(int,int,int,int,int,Orientation,TQWidget * /TransferThis/, TQScrollBar(int,int,int,int,int,Orientation,TQWidget * /TransferThis/,
const char * = 0); const char * = 0);
%End
%If (- TQt_2_00)
void setOrientation(Orientation);
%End
%If (TQt_2_00 -)
virtual void setOrientation(Orientation); virtual void setOrientation(Orientation);
%End
Orientation orientation() const; Orientation orientation() const;
%If (- TQt_2_00)
void setTracking(bool);
%End
%If (TQt_2_00 -)
virtual void setTracking(bool); virtual void setTracking(bool);
%End
bool tracking() const; bool tracking() const;
bool draggingSlider() const; bool draggingSlider() const;
%If (TQt_2_00 -)
virtual void setPalette(const TQPalette &); virtual void setPalette(const TQPalette &);
%End
%If (- TQt_2_00)
void setPalette(const TQPalette &);
%End
%If (TQt_3_1_0 -)
virtual TQSize sizeHint() const; virtual TQSize sizeHint() const;
%End
%If (- TQt_3_1_0)
TQSize sizeHint() const;
%End
%If (TQt_3_1_0 -)
virtual void setSizePolicy(TQSizePolicy); virtual void setSizePolicy(TQSizePolicy);
%End
%If (TQt_3_2_0 -)
void setSizePolicy(TQSizePolicy::SizeType,TQSizePolicy::SizeType, void setSizePolicy(TQSizePolicy::SizeType,TQSizePolicy::SizeType,
bool = 0); bool = 0);
%End
%If (TQt_2_00 - TQt_3_0_0)
TQSizePolicy sizePolicy() const;
%End
%If (TQt_2_1_0 -)
int minValue() const; int minValue() const;
int maxValue() const; int maxValue() const;
void setMinValue(int); void setMinValue(int);
@ -105,20 +62,12 @@ public:
void setLineStep(int); void setLineStep(int);
void setPageStep(int); void setPageStep(int);
int value() const; int value() const;
%End
%If (- TQt_3_0_0)
void setValue(int);
%End
%If (TQt_3_0_0 -)
int sliderStart() const; int sliderStart() const;
TQRect sliderRect() const; TQRect sliderRect() const;
%End
public slots: public slots:
%If (TQt_3_0_0 -)
void setValue(int); void setValue(int);
%End
signals: signals:
void valueChanged(int); void valueChanged(int);
@ -131,9 +80,7 @@ signals:
void prevPage(); void prevPage();
protected: protected:
%If (TQt_2_00 -)
void wheelEvent(TQWheelEvent *); void wheelEvent(TQWheelEvent *);
%End
void keyPressEvent(TQKeyEvent *); void keyPressEvent(TQKeyEvent *);
void resizeEvent(TQResizeEvent *); void resizeEvent(TQResizeEvent *);
void paintEvent(TQPaintEvent *); void paintEvent(TQPaintEvent *);
@ -141,29 +88,14 @@ protected:
void mousePressEvent(TQMouseEvent *); void mousePressEvent(TQMouseEvent *);
void mouseReleaseEvent(TQMouseEvent *); void mouseReleaseEvent(TQMouseEvent *);
void mouseMoveEvent(TQMouseEvent *); void mouseMoveEvent(TQMouseEvent *);
%If (TQt_3_0_0 -)
void contextMenuEvent(TQContextMenuEvent *); void contextMenuEvent(TQContextMenuEvent *);
%End
%If (TQt_3_0_4 -)
void hideEvent(TQHideEvent *); void hideEvent(TQHideEvent *);
%End
void valueChange(); void valueChange();
void stepChange(); void stepChange();
void rangeChange(); void rangeChange();
%If (- TQt_3_0_0)
int sliderStart() const;
TQRect sliderRect() const;
%End
%If (- TQt_2_00)
void timerEvent(TQTimerEvent *);
%End
%If (TQt_2_00 -)
void styleChange(TQStyle &); void styleChange(TQStyle &);
%End
private: private:
TQScrollBar(const TQScrollBar &); TQScrollBar(const TQScrollBar &);

@ -64,34 +64,20 @@ public:
Default, Default,
Manual, Manual,
AutoOne, AutoOne,
%If (TQt_2_3_0 -)
AutoOneFit, AutoOneFit,
%End
}; };
virtual void setResizePolicy(ResizePolicy); virtual void setResizePolicy(ResizePolicy);
ResizePolicy resizePolicy() const; ResizePolicy resizePolicy() const;
%If (TQt_2_1_0 -)
void styleChange(TQStyle &); void styleChange(TQStyle &);
%End
// The child was reparented when it was added, and it stays that way, // The child was reparented when it was added, and it stays that way,
// so we don't transfer it back here. // so we don't transfer it back here.
void removeChild(TQWidget *); void removeChild(TQWidget *);
%If (- TQt_2_00)
void addChild(TQWidget * /Transfer/);
virtual void addChild(TQWidget * /Transfer/,int,int);
%End
%If (TQt_2_00 -)
virtual void addChild(TQWidget * /Transfer/,int = 0,int = 0); virtual void addChild(TQWidget * /Transfer/,int = 0,int = 0);
%End
virtual void moveChild(TQWidget *,int,int); virtual void moveChild(TQWidget *,int,int);
int childX(TQWidget *); int childX(TQWidget *);
int childY(TQWidget *); int childY(TQWidget *);
%If (- TQt_3_0_0)
bool childIsVisible(TQWidget *);
void showChild(TQWidget *,bool = 1);
%End
enum ScrollBarMode { enum ScrollBarMode {
Auto, Auto,
@ -108,12 +94,6 @@ public:
TQWidget *cornerWidget() const; TQWidget *cornerWidget() const;
virtual void setCornerWidget(TQWidget * /Transfer/); virtual void setCornerWidget(TQWidget * /Transfer/);
%If (- TQt_2_00)
TQScrollBar *horizontalScrollBar();
TQScrollBar *verticalScrollBar();
TQWidget *viewport();
%End
%If (TQt_2_00 -)
TQScrollBar *horizontalScrollBar() const; TQScrollBar *horizontalScrollBar() const;
TQScrollBar *verticalScrollBar() const; TQScrollBar *verticalScrollBar() const;
TQWidget *viewport() const; TQWidget *viewport() const;
@ -121,7 +101,6 @@ public:
int visibleWidth() const; int visibleWidth() const;
int visibleHeight() const; int visibleHeight() const;
%End
int contentsWidth() const; int contentsWidth() const;
int contentsHeight() const; int contentsHeight() const;
@ -132,111 +111,63 @@ public:
void resize(const TQSize &); void resize(const TQSize &);
void show(); void show();
%If (TQt_2_00 -)
void updateContents(int,int,int,int); void updateContents(int,int,int,int);
%End
%If (TQt_2_1_0 -)
void updateContents(const TQRect &); void updateContents(const TQRect &);
%End
%If (TQt_3_0_0 -)
void updateContents(); void updateContents();
%End
%If (TQt_2_00 -)
void repaintContents(int,int,int,int,bool = 1); void repaintContents(int,int,int,int,bool = 1);
%End
%If (TQt_2_1_0 -)
void repaintContents(const TQRect &,bool = 1); void repaintContents(const TQRect &,bool = 1);
%End
%If (TQt_3_0_0 -)
void repaintContents(bool = 1); void repaintContents(bool = 1);
%End
%If (TQt_2_00 -)
// Note that this wasn't actually const until TQt v3.0.0. // Note that this wasn't actually const until TQt v3.0.0.
void contentsToViewport(int,int,int &,int &) const; void contentsToViewport(int,int,int &,int &) const;
// Note that this wasn't actually const until TQt v3.0.0. // Note that this wasn't actually const until TQt v3.0.0.
void viewportToContents(int,int,int &,int &) const; void viewportToContents(int,int,int &,int &) const;
%If (- TQt_3_0_0)
TQPoint contentsToViewport(const TQPoint &);
TQPoint viewportToContents(const TQPoint &);
%End
%If (TQt_3_0_0 -)
TQPoint contentsToViewport(const TQPoint &) const; TQPoint contentsToViewport(const TQPoint &) const;
TQPoint viewportToContents(const TQPoint &) const; TQPoint viewportToContents(const TQPoint &) const;
%End
void enableClipper(bool); void enableClipper(bool);
%If (TQt_2_2_0 -)
void setStaticBackground(bool); void setStaticBackground(bool);
bool hasStaticBackground() const; bool hasStaticBackground() const;
%End
TQSize viewportSize(int,int) const; TQSize viewportSize(int,int) const;
%If (TQt_2_1_0 -)
TQSize sizeHint() const; TQSize sizeHint() const;
%End
%If (- TQt_3_0_0)
TQSizePolicy sizePolicy() const;
%End
TQSize minimumSizeHint() const; TQSize minimumSizeHint() const;
void removeChild(TQObject * /TransferBack/); void removeChild(TQObject * /TransferBack/);
%End
%If (TQt_3_1_0 -)
bool isHorizontalSliderPressed(); bool isHorizontalSliderPressed();
bool isVerticalSliderPressed(); bool isVerticalSliderPressed();
%End
%If (TQt_DRAGANDDROP) %If (TQt_DRAGANDDROP)
%If (TQt_2_1_0 - TQt_3_0_0)
void setDragAutoScroll(bool);
%End
%If (TQt_3_0_0 -)
virtual void setDragAutoScroll(bool); virtual void setDragAutoScroll(bool);
%End
%If (TQt_2_1_0 -)
bool dragAutoScroll() const; bool dragAutoScroll() const;
%End %End
%End
signals: signals:
void contentsMoving(int,int); void contentsMoving(int,int);
%If (TQt_3_1_0 -)
void horizontalSliderPressed(); void horizontalSliderPressed();
void horizontalSliderReleased(); void horizontalSliderReleased();
void verticalSliderPressed(); void verticalSliderPressed();
void verticalSliderReleased(); void verticalSliderReleased();
%End
public slots: public slots:
virtual void resizeContents(int,int); virtual void resizeContents(int,int);
void scrollBy(int,int); void scrollBy(int,int);
%If (- TQt_2_00)
void setContentsPos(int,int);
%End
%If (TQt_2_00 -)
virtual void setContentsPos(int,int); virtual void setContentsPos(int,int);
%End
void ensureVisible(int,int); void ensureVisible(int,int);
void ensureVisible(int,int,int,int); void ensureVisible(int,int,int,int);
void center(int,int); void center(int,int);
void center(int,int,float,float); void center(int,int,float,float);
void updateScrollBars(); void updateScrollBars();
%If (TQt_2_00 -)
void setEnabled(bool); void setEnabled(bool);
%End
protected: protected:
%If (TQt_2_00 -)
virtual void drawContents(TQPainter *,int,int,int,int); virtual void drawContents(TQPainter *,int,int,int,int);
%End
virtual void drawContentsOffset(TQPainter *,int,int,int,int,int,int); virtual void drawContentsOffset(TQPainter *,int,int,int,int,int,int);
%If (TQt_2_00 -)
virtual void contentsMousePressEvent(TQMouseEvent *); virtual void contentsMousePressEvent(TQMouseEvent *);
virtual void contentsMouseReleaseEvent(TQMouseEvent *); virtual void contentsMouseReleaseEvent(TQMouseEvent *);
virtual void contentsMouseDoubleClickEvent(TQMouseEvent *); virtual void contentsMouseDoubleClickEvent(TQMouseEvent *);
@ -248,20 +179,14 @@ protected:
virtual void contentsDropEvent(TQDropEvent *); virtual void contentsDropEvent(TQDropEvent *);
%End %End
virtual void contentsWheelEvent(TQWheelEvent *); virtual void contentsWheelEvent(TQWheelEvent *);
%End
%If (TQt_3_0_0 -)
virtual void contentsContextMenuEvent(TQContextMenuEvent *); virtual void contentsContextMenuEvent(TQContextMenuEvent *);
%End
virtual void viewportPaintEvent(TQPaintEvent *); virtual void viewportPaintEvent(TQPaintEvent *);
%If (TQt_2_00 -)
virtual void viewportResizeEvent(TQResizeEvent *); virtual void viewportResizeEvent(TQResizeEvent *);
%End
virtual void viewportMousePressEvent(TQMouseEvent *); virtual void viewportMousePressEvent(TQMouseEvent *);
virtual void viewportMouseReleaseEvent(TQMouseEvent *); virtual void viewportMouseReleaseEvent(TQMouseEvent *);
virtual void viewportMouseDoubleClickEvent(TQMouseEvent *); virtual void viewportMouseDoubleClickEvent(TQMouseEvent *);
virtual void viewportMouseMoveEvent(TQMouseEvent *); virtual void viewportMouseMoveEvent(TQMouseEvent *);
%If (TQt_2_00 -)
%If (TQt_DRAGANDDROP) %If (TQt_DRAGANDDROP)
virtual void viewportDragEnterEvent(TQDragEnterEvent *); virtual void viewportDragEnterEvent(TQDragEnterEvent *);
virtual void viewportDragMoveEvent(TQDragMoveEvent *); virtual void viewportDragMoveEvent(TQDragMoveEvent *);
@ -269,19 +194,11 @@ protected:
virtual void viewportDropEvent(TQDropEvent *); virtual void viewportDropEvent(TQDropEvent *);
%End %End
virtual void viewportWheelEvent(TQWheelEvent *); virtual void viewportWheelEvent(TQWheelEvent *);
%End
%If (TQt_3_0_0 -)
virtual void viewportContextMenuEvent(TQContextMenuEvent *); virtual void viewportContextMenuEvent(TQContextMenuEvent *);
%End
void frameChanged(); void frameChanged();
%If (- TQt_2_00)
void setMargins(int,int,int,int);
%End
%If (TQt_2_00 -)
virtual void setMargins(int,int,int,int); virtual void setMargins(int,int,int,int);
%End
int leftMargin() const; int leftMargin() const;
int topMargin() const; int topMargin() const;
int rightMargin() const; int rightMargin() const;
@ -289,37 +206,25 @@ protected:
bool focusNextPrevChild(bool); bool focusNextPrevChild(bool);
%If (TQt_2_00 -)
virtual void setHBarGeometry(TQScrollBar &,int,int,int,int); virtual void setHBarGeometry(TQScrollBar &,int,int,int,int);
virtual void setVBarGeometry(TQScrollBar &,int,int,int,int); virtual void setVBarGeometry(TQScrollBar &,int,int,int,int);
%End
void resizeEvent(TQResizeEvent *); void resizeEvent(TQResizeEvent *);
%If (TQt_3_0_0 -)
void mousePressEvent(TQMouseEvent *); void mousePressEvent(TQMouseEvent *);
void mouseReleaseEvent(TQMouseEvent *); void mouseReleaseEvent(TQMouseEvent *);
void mouseDoubleClickEvent(TQMouseEvent *); void mouseDoubleClickEvent(TQMouseEvent *);
void mouseMoveEvent(TQMouseEvent *); void mouseMoveEvent(TQMouseEvent *);
%End
%If (TQt_2_00 -)
void wheelEvent(TQWheelEvent *); void wheelEvent(TQWheelEvent *);
%End
%If (TQt_3_0_0 -)
void contextMenuEvent(TQContextMenuEvent *); void contextMenuEvent(TQContextMenuEvent *);
%End
bool eventFilter(TQObject *,TQEvent *); bool eventFilter(TQObject *,TQEvent *);
%If (TQt_3_1_0 -)
void setCachedSizeHint(const TQSize &) const; void setCachedSizeHint(const TQSize &) const;
TQSize cachedSizeHint() const; TQSize cachedSizeHint() const;
void fontChange(const TQFont &); void fontChange(const TQFont &);
%End
private: private:
TQScrollView(const TQScrollView &); TQScrollView(const TQScrollView &);
public: public:
%If (TQt_3_1_0 -)
void disableSizeHintCaching(); void disableSizeHintCaching();
%End
}; };

@ -33,8 +33,6 @@ Python v2.0 or later.
%If (TQt_THREAD_SUPPORT) %If (TQt_THREAD_SUPPORT)
%If (TQt_3_0_0 -)
class TQSemaphore class TQSemaphore
{ {
%TypeHeaderCode %TypeHeaderCode
@ -84,29 +82,3 @@ private:
}; };
%End %End
%If (TQt_2_2_0 - TQt_3_0_0)
class TQSemaphore : TQt
{
%TypeHeaderCode
#include <tqthread.h>
%End
public:
TQSemaphore(int);
int available() const;
int total() const;
TQSemaphore &operator+=(int);
TQSemaphore &operator-=(int);
private:
TQSemaphore(const TQSemaphore &);
};
%End
%End

@ -1,63 +0,0 @@
// This is the SIP interface definition for TQSemiModal.
//
// 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.
%ExportedDoc
<Sect2><Title>TQSemiModal (TQt v1, v2)</Title>
<Para>
<Literal>TQSemiModal</Literal> is fully implemented.
</Para>
</Sect2>
%End
%If (TQt_SEMIMODAL)
%If (- TQt_3_0_0)
class TQSemiModal : TQWidget
{
%TypeHeaderCode
#include <tqsemimodal.h>
%End
public:
TQSemiModal(TQWidget * /TransferThis/ = 0,const char * = 0,bool = 0,WFlags = 0);
void show();
void move(int,int);
void move(const TQPoint &);
void resize(int,int);
void resize(const TQSize &);
%If (- TQt_2_00)
void setGeometry(int,int,int,int);
void setGeometry(const TQRect &);
%End
%If (TQt_2_00 -)
virtual void setGeometry(int,int,int,int);
virtual void setGeometry(const TQRect &);
%End
private:
TQSemiModal(const TQSemiModal &);
};
%End
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_2_00 -)
class TQSessionManager : TQObject class TQSessionManager : TQObject
{ {
%TypeHeaderCode %TypeHeaderCode
@ -39,9 +37,7 @@ class TQSessionManager : TQObject
public: public:
TQString sessionId() const; TQString sessionId() const;
%If (TQt_3_1_0 -)
TQString sessionKey() const; TQString sessionKey() const;
%End
bool allowsInteraction(); bool allowsInteraction();
bool allowsErrorInteraction(); bool allowsErrorInteraction();
@ -64,26 +60,13 @@ public:
void setDiscardCommand(const TQStringList &); void setDiscardCommand(const TQStringList &);
TQStringList discardCommand() const; TQStringList discardCommand() const;
%If (- TQt_3_0_0)
void setProperty(const TQString &,const TQString &);
void setProperty(const TQString &,const TQStringList &);
%End
%If (TQt_3_0_0 -)
void setManagerProperty(const TQString &,const TQString &); void setManagerProperty(const TQString &,const TQString &);
void setManagerProperty(const TQString &,const TQStringList &); void setManagerProperty(const TQString &,const TQStringList &);
%End
bool isPhase2() const; bool isPhase2() const;
void requestPhase2(); void requestPhase2();
private: private:
%If (TQt_3_1_0 -)
TQSessionManager(TQApplication * /TransferThis/,TQString &,TQString &); TQSessionManager(TQApplication * /TransferThis/,TQString &,TQString &);
%End
%If (- TQt_3_1_0)
TQSessionManager(TQApplication * /TransferThis/,TQString &);
%End
~TQSessionManager(); ~TQSessionManager();
}; };
%End

@ -99,8 +99,6 @@ Not implemented.
%End %End
%If (TQt_3_0_0 -)
class TQSettings class TQSettings
{ {
%TypeHeaderCode %TypeHeaderCode
@ -108,12 +106,10 @@ class TQSettings
%End %End
public: public:
%If (TQt_3_1_0 -)
enum Format { enum Format {
Native, Native,
Ini Ini
}; };
%End
enum System { enum System {
Unix, Unix,
@ -121,17 +117,13 @@ public:
Mac Mac
}; };
%If (TQt_3_1_0 -)
enum Scope { enum Scope {
User, User,
Global Global
}; };
%End
TQSettings(); TQSettings();
%If (TQt_3_1_0 -)
TQSettings(Format); TQSettings(Format);
%End
// bool writeEntry(const TQString &,bool); // bool writeEntry(const TQString &,bool);
bool writeEntry(const TQString &,int /Constrained/); bool writeEntry(const TQString &,int /Constrained/);
@ -157,21 +149,15 @@ public:
void insertSearchPath(System,const TQString &); void insertSearchPath(System,const TQString &);
void removeSearchPath(System,const TQString &); void removeSearchPath(System,const TQString &);
%If (TQt_3_1_0 -)
void setPath(const TQString &,const TQString &,Scope = Global); void setPath(const TQString &,const TQString &,Scope = Global);
void beginGroup(const TQString &); void beginGroup(const TQString &);
void endGroup(); void endGroup();
void resetGroup(); void resetGroup();
TQString group() const; TQString group() const;
%End
%If (TQt_3_2_0 -)
bool sync(); bool sync();
%End
private: private:
TQSettings(const TQSettings &); TQSettings(const TQSettings &);
}; };
%End

@ -41,7 +41,6 @@ This takes only the <Literal>sb</Literal> parameter and returns a tuple of the
%If (TQt_STYLE_SGI) %If (TQt_STYLE_SGI)
%If (TQt_2_2_0 -)
class TQSGIStyle : TQMotifStyle class TQSGIStyle : TQMotifStyle
{ {
@ -57,68 +56,6 @@ public:
void applicationPolish( const TQStyleControlElementData&, ControlElementFlags, void * ); void applicationPolish( const TQStyleControlElementData&, ControlElementFlags, void * );
void applicationUnPolish( const TQStyleControlElementData&, ControlElementFlags, void * ); void applicationUnPolish( const TQStyleControlElementData&, ControlElementFlags, void * );
%If (- TQt_3_0_0)
void polish(TQPalette &);
int defaultFrameWidth() const;
void drawPanel(TQPainter *,int,int,int,int,const TQColorGroup &,bool = 0,
int = 1,const TQBrush * = 0);
void drawSeparator(TQPainter *,int,int,int,int,const TQColorGroup &,
bool = 1,int = 1,int = 0);
void drawButton(TQPainter *,int,int,int,int,const TQColorGroup &,bool = 0,
const TQBrush * = 0);
void drawBevelButton(TQPainter *,int,int,int,int,const TQColorGroup &,
bool = 0,const TQBrush * = 0);
void drawPushButton(TQPushButton *,TQPainter *);
void drawArrow(TQPainter *,ArrowType,bool,int,int,int,int,
const TQColorGroup &,bool,const TQBrush * = 0);
TQSize indicatorSize() const;
void drawIndicator(TQPainter *,int,int,int,int,const TQColorGroup &,int,
bool = 0,bool = 1);
void drawCheckMark(TQPainter *,int,int,int,int,const TQColorGroup &,
bool,bool);
void drawIndicatorMask(TQPainter *,int,int,int,int,int);
TQSize exclusiveIndicatorSize() const;
void drawExclusiveIndicator(TQPainter *,int,int,int,int,
const TQColorGroup &,bool,bool = 0,bool = 1);
void drawExclusiveIndicatorMask(TQPainter *,int,int,int,int,bool);
void drawComboButton(TQPainter *,int,int,int,int,const TQColorGroup &,
bool = 0,bool = 0,bool = 1,const TQBrush * = 0);
TQRect comboButtonRect(int,int,int,int);
TQRect comboButtonFocusRect(int,int,int,int);
void scrollBarMetrics(const TQScrollBar *,int &,int &,int &,int &);
void drawScrollBarControls(TQPainter *,const TQScrollBar *,int,uint,uint);
void drawSlider(TQPainter *,int,int,int,int,const TQColorGroup &,
Orientation,bool,bool);
void drawSliderMask(TQPainter *,int,int,int,int,Orientation,bool,bool);
void drawSliderGroove(TQPainter *,int,int,int,int,const TQColorGroup &,
TQCOORD,Orientation);
void drawSliderGrooveMask(TQPainter *,int,int,int,int,TQCOORD,
Orientation);
void drawTab(TQPainter *,const TQTabBar *,TQTab *,bool);
void drawTabMask(TQPainter *,const TQTabBar *,TQTab *,bool);
int splitterWidth() const;
void drawSplitter(TQPainter *,int,int,int,int,const TQColorGroup &,
Orientation);
int popupMenuItemHeight(bool,TQMenuItem *,const TQFontMetrics &);
void drawPopupPanel(TQPainter *,int,int,int,int,const TQColorGroup &,
int = 2,const TQBrush * = 0);
void drawPopupMenuItem(TQPainter *,bool,int,int,TQMenuItem *,
const TQPalette &,bool,bool,int,int,int,int);
void drawMenuBarItem(TQPainter *,int,int,int,int,TQMenuItem *,
TQColorGroup &,bool,bool);
%End
%If (TQt_3_0_0 -)
void drawPrimitive(PrimitiveElement,TQPainter *,const TQStyleControlElementData&,ControlElementFlags,const TQRect &, void drawPrimitive(PrimitiveElement,TQPainter *,const TQStyleControlElementData&,ControlElementFlags,const TQRect &,
const TQColorGroup &,SFlags = Style_Default, const TQColorGroup &,SFlags = Style_Default,
const TQStyleOption & = TQStyleOption()) const; const TQStyleOption & = TQStyleOption()) const;
@ -144,7 +81,6 @@ public:
TQRect querySubControlMetrics(ComplexControl,const TQStyleControlElementData&,ControlElementFlags, TQRect querySubControlMetrics(ComplexControl,const TQStyleControlElementData&,ControlElementFlags,
SubControl, SubControl,
const TQStyleOption & = TQStyleOption(), const TQWidget *=0) const; const TQStyleOption & = TQStyleOption(), const TQWidget *=0) const;
%End
protected: protected:
bool eventFilter(TQObject *,TQEvent *); bool eventFilter(TQObject *,TQEvent *);
@ -154,4 +90,3 @@ private:
}; };
%End %End
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_2_00 -)
class TQSimpleRichText class TQSimpleRichText
{ {
%TypeHeaderCode %TypeHeaderCode
@ -41,51 +39,26 @@ public:
TQSimpleRichText(const TQString &,const TQFont &, TQSimpleRichText(const TQString &,const TQFont &,
const TQString & = TQString::null, const TQString & = TQString::null,
const TQStyleSheet * = 0); const TQStyleSheet * = 0);
%If (TQt_2_1_0 -)
TQSimpleRichText(const TQString &,const TQFont &,const TQString &, TQSimpleRichText(const TQString &,const TQFont &,const TQString &,
const TQStyleSheet *,const TQMimeSourceFactory *, const TQStyleSheet *,const TQMimeSourceFactory *,
int = -1,const TQColor & = TQt::blue,bool = 1); int = -1,const TQColor & = TQt::blue,bool = 1);
%End
%If (TQt_2_1_0 -)
void setWidth(int); void setWidth(int);
%End
void setWidth(TQPainter *,int); void setWidth(TQPainter *,int);
%If (TQt_3_0_0 -)
void setDefaultFont(const TQFont &); void setDefaultFont(const TQFont &);
%End
int width() const; int width() const;
int widthUsed() const; int widthUsed() const;
int height() const; int height() const;
%If (TQt_2_1_0 -)
void adjustSize(); void adjustSize();
%End
%If (- TQt_3_0_0)
void draw(TQPainter *,int,int,const TQRegion &,const TQPalette &,
const TQBrush * = 0) const;
void draw(TQPainter *,int,int,const TQRegion &,const TQColorGroup &,
const TQBrush * = 0) const;
%End
%If (TQt_3_0_0 -)
void draw(TQPainter *,int,int,const TQRect &,const TQColorGroup &, void draw(TQPainter *,int,int,const TQRect &,const TQColorGroup &,
const TQBrush * = 0) const; const TQBrush * = 0) const;
%End
TQString context() const; TQString context() const;
%If (- TQt_3_0_0)
TQString anchor(TQPainter *,const TQPoint &);
%End
%If (TQt_2_1_0 -)
TQString anchorAt(const TQPoint &) const; TQString anchorAt(const TQPoint &) const;
bool inText(const TQPoint &) const; bool inText(const TQPoint &) const;
%End
private: private:
%If (TQt_3_0_0 -)
TQSimpleRichText(const TQSimpleRichText &); TQSimpleRichText(const TQSimpleRichText &);
%End
}; };
%End

@ -58,13 +58,11 @@ class TQSize
%End %End
public: public:
%If (TQt_3_1_0 -)
enum ScaleMode { enum ScaleMode {
ScaleFree, ScaleFree,
ScaleMin, ScaleMin,
ScaleMax ScaleMax
}; };
%End
TQSize(); TQSize();
TQSize(int,int); TQSize(int,int);
@ -79,10 +77,8 @@ public:
void setHeight(int); void setHeight(int);
void transpose(); void transpose();
%If (TQt_3_1_0 -)
void scale(int,int,ScaleMode); void scale(int,int,ScaleMode);
void scale(const TQSize &,ScaleMode); void scale(const TQSize &,ScaleMode);
%End
TQSize expandedTo(const TQSize &) const; TQSize expandedTo(const TQSize &) const;
TQSize boundedTo(const TQSize &) const; TQSize boundedTo(const TQSize &) const;

@ -29,7 +29,6 @@
%End %End
%If (TQt_2_00 -)
%If (TQt_SIZEGRIP) %If (TQt_SIZEGRIP)
class TQSizeGrip : TQWidget class TQSizeGrip : TQWidget
@ -42,19 +41,13 @@ public:
TQSizeGrip(TQWidget * /TransferThis/,const char * = 0); TQSizeGrip(TQWidget * /TransferThis/,const char * = 0);
TQSize sizeHint() const; TQSize sizeHint() const;
%If (- TQt_3_0_0)
TQSizePolicy sizePolicy() const;
%End
protected: protected:
void paintEvent(TQPaintEvent *); void paintEvent(TQPaintEvent *);
void mousePressEvent(TQMouseEvent *); void mousePressEvent(TQMouseEvent *);
void mouseMoveEvent(TQMouseEvent *); void mouseMoveEvent(TQMouseEvent *);
%If (TQt_3_0_0 -)
bool eventFilter(TQObject *,TQEvent *); bool eventFilter(TQObject *,TQEvent *);
%End
}; };
%End %End
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_2_00 -)
class TQSizePolicy class TQSizePolicy
{ {
%TypeHeaderCode %TypeHeaderCode
@ -46,32 +44,22 @@ public:
Preferred, Preferred,
MinimumExpanding, MinimumExpanding,
Expanding, Expanding,
%If (TQt_3_0_0 -)
Ignored Ignored
%End
}; };
enum ExpandData enum ExpandData
{ {
NoDirection, NoDirection,
%If (TQt_3_0_0 -)
Horizontally, Horizontally,
Vertically, Vertically,
%End
%If (- TQt_3_0_0)
Horizontal,
Vertical,
%End
BothDirections BothDirections
}; };
TQSizePolicy(); TQSizePolicy();
TQSizePolicy(SizeType,SizeType,bool = 0); TQSizePolicy(SizeType,SizeType,bool = 0);
%If (TQt_3_0_0 -)
// Note that TQt defines the 2nd and 3rd parameters as uchar, but it's // Note that TQt defines the 2nd and 3rd parameters as uchar, but it's
// really using them as numbers, not characters. // really using them as numbers, not characters.
TQSizePolicy(SizeType,SizeType,uint,uint,bool = 0); TQSizePolicy(SizeType,SizeType,uint,uint,bool = 0);
%End
SizeType horData() const; SizeType horData() const;
SizeType verData() const; SizeType verData() const;
@ -89,15 +77,9 @@ public:
void setHeightForWidth(bool); void setHeightForWidth(bool);
bool hasHeightForWidth() const; bool hasHeightForWidth() const;
%If (TQt_3_0_0 -)
uint horStretch() const; uint horStretch() const;
uint verStretch() const; uint verStretch() const;
void setHorStretch(uint); void setHorStretch(uint);
void setVerStretch(uint); void setVerStretch(uint);
%End
%If (TQt_3_1_0 -)
void transpose(); void transpose();
%End
}; };
%End

@ -36,12 +36,6 @@ class TQSlider : TQWidget, TQRangeControl
%End %End
public: public:
%If (- TQt_2_00)
enum Orientation {
Horizontal,
Vertical
};
%End
enum TickSetting { enum TickSetting {
NoMarks = 0, NoMarks = 0,
@ -52,54 +46,24 @@ public:
Both = 3 Both = 3
}; };
%If (- TQt_2_00)
TQSlider(TQWidget * /TransferThis/ = 0,const char * = 0);
TQSlider(Orientation,TQWidget * /TransferThis/ = 0,const char * = 0);
TQSlider(int,int,int,int,Orientation,TQWidget * /TransferThis/ = 0,const char * = 0);
%End
%If (TQt_2_00 -)
TQSlider(TQWidget * /TransferThis/,const char * = 0); TQSlider(TQWidget * /TransferThis/,const char * = 0);
TQSlider(Orientation,TQWidget * /TransferThis/,const char * = 0); TQSlider(Orientation,TQWidget * /TransferThis/,const char * = 0);
TQSlider(int,int,int,int,Orientation,TQWidget * /TransferThis/,const char * = 0); TQSlider(int,int,int,int,Orientation,TQWidget * /TransferThis/,const char * = 0);
%End
%If (- TQt_2_00)
void setOrientation(Orientation);
%End
%If (TQt_2_00 -)
virtual void setOrientation(Orientation); virtual void setOrientation(Orientation);
%End
Orientation orientation() const; Orientation orientation() const;
%If (- TQt_2_00)
void setTracking(bool);
%End
%If (TQt_2_00 -)
virtual void setTracking(bool); virtual void setTracking(bool);
%End
bool tracking() const; bool tracking() const;
%If (- TQt_2_00)
void setPalette(const TQPalette &);
%End
%If (TQt_2_00 -)
virtual void setPalette(const TQPalette &); virtual void setPalette(const TQPalette &);
%End
%If (TQt_3_0_0 -)
int sliderStart() const; int sliderStart() const;
%End
TQRect sliderRect() const; TQRect sliderRect() const;
TQSize sizeHint() const; TQSize sizeHint() const;
%If (TQt_3_1_0 -)
void setSizePolicy(TQSizePolicy); void setSizePolicy(TQSizePolicy);
%End
%If (TQt_3_2_0 -)
void setSizePolicy(TQSizePolicy::SizeType,TQSizePolicy::SizeType, void setSizePolicy(TQSizePolicy::SizeType,TQSizePolicy::SizeType,
bool = 0); bool = 0);
%End
%If (TQt_2_00 -)
TQSizePolicy sizePolicy() const; TQSizePolicy sizePolicy() const;
TQSize minimumSizeHint() const; TQSize minimumSizeHint() const;
%End
virtual void setTickmarks(TickSetting); virtual void setTickmarks(TickSetting);
TickSetting tickmarks() const; TickSetting tickmarks() const;
@ -107,7 +71,6 @@ public:
virtual void setTickInterval(int); virtual void setTickInterval(int);
int tickInterval() const; int tickInterval() const;
%If (TQt_2_1_0 -)
int minValue() const; int minValue() const;
int maxValue() const; int maxValue() const;
void setMinValue(int); void setMinValue(int);
@ -117,21 +80,13 @@ public:
void setLineStep(int); void setLineStep(int);
void setPageStep(int); void setPageStep(int);
int value() const; int value() const;
%End
public slots: public slots:
%If (- TQt_2_00)
void setValue(int);
%End
%If (TQt_2_00 -)
virtual void setValue(int); virtual void setValue(int);
%End
void addStep(); void addStep();
void subtractStep(); void subtractStep();
%If (TQt_3_1_0 -)
void addLine(); void addLine();
void subtractLine(); void subtractLine();
%End
signals: signals:
void valueChanged(int); void valueChanged(int);
@ -147,41 +102,18 @@ protected:
void mousePressEvent(TQMouseEvent *); void mousePressEvent(TQMouseEvent *);
void mouseReleaseEvent(TQMouseEvent *); void mouseReleaseEvent(TQMouseEvent *);
void mouseMoveEvent(TQMouseEvent *); void mouseMoveEvent(TQMouseEvent *);
%If (TQt_2_00 -)
void wheelEvent(TQWheelEvent *); void wheelEvent(TQWheelEvent *);
%End
void focusInEvent(TQFocusEvent *); void focusInEvent(TQFocusEvent *);
%If (TQt_2_00 -)
void focusOutEvent(TQFocusEvent *); void focusOutEvent(TQFocusEvent *);
%End
%If (TQt_2_00 -)
void styleChange(TQStyle &); void styleChange(TQStyle &);
%End
void valueChange(); void valueChange();
void rangeChange(); void rangeChange();
%If (- TQt_3_0_0)
void drawWinGroove(TQPainter *,TQCOORD);
void drawTicks(TQPainter *,int,int,int = 1) const;
virtual int thickness() const;
%End
%If (- TQt_2_00)
virtual void paintSlider(TQPainter *,const TQRect &);
%End
%If (TQt_2_00 - TQt_3_0_0)
void updateMask();
virtual void paintSlider(TQPainter *,const TQColorGroup &,const TQRect &);
void drawTicks(TQPainter *,const TQColorGroup &,int,int,int = 1) const;
%End
private: private:
%If (TQt_2_00 -)
int positionFromValue(int) const; int positionFromValue(int) const;
int valueFromPosition(int) const; int valueFromPosition(int) const;
%End
TQSlider(const TQSlider &); TQSlider(const TQSlider &);
}; };

@ -48,12 +48,7 @@ public:
Type type() const; Type type() const;
bool isEnabled() const; bool isEnabled() const;
%If (- TQt_2_00)
void setEnabled(bool);
%End
%If (TQt_2_00 -)
virtual void setEnabled(bool); virtual void setEnabled(bool);
%End
signals: signals:
void activated(int); void activated(int);

@ -30,7 +30,6 @@
%If (TQt_SOUND) %If (TQt_SOUND)
%If (TQt_2_2_0 -)
class TQSound : TQObject class TQSound : TQObject
{ {
@ -41,29 +40,19 @@ class TQSound : TQObject
public: public:
TQSound(const TQString &,TQObject * /TransferThis/ = 0,const char * = 0); TQSound(const TQString &,TQObject * /TransferThis/ = 0,const char * = 0);
%If (- TQt_3_0_0)
static bool available();
%End
%If (TQt_3_0_0 -)
static bool isAvailable(); static bool isAvailable();
%End
static void play(const TQString &); static void play(const TQString &);
%If (TQt_3_0_0 -)
int loops() const; int loops() const;
int loopsRemaining() const; int loopsRemaining() const;
void setLoops(int); void setLoops(int);
TQString fileName() const; TQString fileName() const;
bool isFinished() const; bool isFinished() const;
%End
public slots: public slots:
void play(); void play();
%If (TQt_3_0_0 -)
void stop(); void stop();
%End
}; };
%End %End
%End

@ -34,8 +34,6 @@ This returns a tuple of the <Literal>int</Literal> result and the modified
%End %End
%If (TQt_3_0_0 -)
class TQSpinBox : TQWidget, TQRangeControl class TQSpinBox : TQWidget, TQRangeControl
{ {
%TypeHeaderCode %TypeHeaderCode
@ -122,147 +120,3 @@ protected slots:
private: private:
TQSpinBox(const TQSpinBox &); TQSpinBox(const TQSpinBox &);
}; };
%End
%If (- TQt_3_0_0)
class TQSpinBox : TQFrame, TQRangeControl
{
%TypeHeaderCode
#include <tqspinbox.h>
%End
public:
TQSpinBox(TQWidget * /TransferThis/ = 0,const char * = 0);
TQSpinBox(int,int,int = 1,TQWidget * /TransferThis/ = 0,const char * = 0);
%If (- TQt_2_00)
const char *text() const;
virtual const char *prefix() const;
virtual const char *suffix() const;
%End
%If (TQt_2_00 -)
TQString text() const;
virtual TQString prefix() const;
virtual TQString suffix() const;
%End
virtual TQString cleanText() const;
%If (- TQt_2_00)
void setSpecialValueText(const char *);
const char *specialValueText() const;
void setWrapping(bool);
%End
%If (TQt_2_00 -)
virtual void setSpecialValueText(const TQString &);
TQString specialValueText() const;
virtual void setWrapping(bool);
%End
bool wrapping() const;
%If (TQt_2_1_0 -)
enum ButtonSymbols {
UpDownArrows,
PlusMinus
};
%End
%If (TQt_2_1_0 -)
void setButtonSymbols(ButtonSymbols);
ButtonSymbols buttonSymbols() const;
%End
%If (- TQt_2_00)
void setValidator(TQValidator *);
%End
%If (TQt_2_00 -)
virtual void setValidator(const TQValidator *);
const TQValidator *validator() const;
%End
TQSize sizeHint() const;
%If (TQt_2_00 -)
TQSizePolicy sizePolicy() const;
%End
%If (TQt_2_1_0 -)
int minValue() const;
int maxValue() const;
void setMinValue(int);
void setMaxValue(int);
int lineStep() const;
void setLineStep(int);
int value() const;
%End
public slots:
virtual void setValue(int);
%If (- TQt_2_00)
virtual void setPrefix(const char *);
virtual void setSuffix(const char *);
%End
%If (TQt_2_00 -)
virtual void setPrefix(const TQString &);
virtual void setSuffix(const TQString &);
%End
virtual void stepUp();
virtual void stepDown();
%If (TQt_2_00 -)
virtual void setEnabled(bool);
%End
signals:
void valueChanged(int);
%If (- TQt_2_00)
void valueChanged(const char *);
%End
%If (TQt_2_00 -)
void valueChanged(const TQString &);
%End
protected:
virtual TQString mapValueToText(int);
virtual int mapTextToValue(bool *);
TQString currentValueText();
virtual void updateDisplay();
virtual void interpretText();
TQPushButton *upButton() const;
TQPushButton *downButton() const;
TQLineEdit *editor() const;
virtual void valueChange();
virtual void rangeChange();
bool eventFilter(TQObject *,TQEvent *);
void resizeEvent(TQResizeEvent *);
%If (- TQt_2_00)
void paletteChange(const TQPalette &);
void enabledChange(bool);
void fontChange(const TQFont &);
void styleChange(GUIStyle);
%End
%If (TQt_2_00 -)
void wheelEvent(TQWheelEvent *);
void styleChange(TQStyle &);
%End
%If (TQt_2_1_0 -)
void leaveEvent(TQEvent *);
%End
protected slots:
void textChanged();
private:
TQSpinBox(const TQSpinBox &);
};
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_3_2_0 -)
class TQSplashScreen : TQWidget class TQSplashScreen : TQWidget
{ {
%TypeHeaderCode %TypeHeaderCode
@ -57,5 +55,3 @@ protected:
virtual void drawContents(TQPainter *); virtual void drawContents(TQPainter *);
void mousePressEvent(TQMouseEvent *); void mousePressEvent(TQMouseEvent *);
}; };
%End

@ -45,116 +45,58 @@ class TQSplitter : TQFrame
%End %End
public: public:
%If (- TQt_2_00)
enum Orientation {
Horizontal,
Vertical
};
%End
enum ResizeMode { enum ResizeMode {
Stretch, Stretch,
KeepSize, KeepSize,
%If (TQt_2_1_0 -)
FollowSizeHint, FollowSizeHint,
%End
%If (TQt_3_1_0 -)
Auto Auto
%End
}; };
TQSplitter(TQWidget * /TransferThis/ = 0,const char * = 0); TQSplitter(TQWidget * /TransferThis/ = 0,const char * = 0);
TQSplitter(Orientation,TQWidget * /TransferThis/ = 0,const char * = 0); TQSplitter(Orientation,TQWidget * /TransferThis/ = 0,const char * = 0);
%If (- TQt_2_00)
void setOrientation(Orientation);
%End
%If (TQt_2_00 -)
virtual void setOrientation(Orientation); virtual void setOrientation(Orientation);
%End
Orientation orientation() const; Orientation orientation() const;
%If (TQt_3_2_0 -)
void setChildrenCollapsible(bool); void setChildrenCollapsible(bool);
bool childrenCollapsible() const; bool childrenCollapsible() const;
void setCollapsible(TQWidget *,bool); void setCollapsible(TQWidget *,bool);
%End
%If (- TQt_2_00)
void setResizeMode(TQWidget *,ResizeMode);
void setOpaqueResize(bool = 1);
%End
%If (TQt_2_00 -)
virtual void setResizeMode(TQWidget *,ResizeMode); virtual void setResizeMode(TQWidget *,ResizeMode);
virtual void setOpaqueResize(bool = 1); virtual void setOpaqueResize(bool = 1);
%End
bool opaqueResize() const; bool opaqueResize() const;
void moveToFirst(TQWidget *); void moveToFirst(TQWidget *);
void moveToLast(TQWidget *); void moveToLast(TQWidget *);
void refresh(); void refresh();
%If (TQt_2_00 -)
TQSize sizeHint() const; TQSize sizeHint() const;
TQSize minimumSizeHint() const; TQSize minimumSizeHint() const;
%End
%If (TQt_2_00 - TQt_3_0_0)
TQSizePolicy sizePolicy() const;
%End
%If (TQt_2_00 -)
TQValueList<int> sizes() const; TQValueList<int> sizes() const;
void setSizes(TQValueList<int>); void setSizes(TQValueList<int>);
%End
%If (TQt_3_2_0 -)
int handleWidth() const; int handleWidth() const;
void setHandleWidth(int); void setHandleWidth(int);
%End
%If (- TQt_2_00)
bool event(TQEvent *);
%End
protected: protected:
%If (TQt_2_00 -)
void childEvent(TQChildEvent *); void childEvent(TQChildEvent *);
bool event(TQEvent *); bool event(TQEvent *);
%End
void resizeEvent(TQResizeEvent *); void resizeEvent(TQResizeEvent *);
%If (- TQt_2_00)
void childInsertEvent(TQChildEvent *);
void childRemoveEvent(TQChildEvent *);
void layoutHintEvent(TQEvent *);
void moveSplitter(TQCOORD);
%End
%If (TQt_2_00 -)
int idAfter(TQWidget *) const; int idAfter(TQWidget *) const;
void moveSplitter(TQCOORD,int); void moveSplitter(TQCOORD,int);
%End
virtual void drawSplitter(TQPainter *,TQCOORD,TQCOORD,TQCOORD,TQCOORD); virtual void drawSplitter(TQPainter *,TQCOORD,TQCOORD,TQCOORD,TQCOORD);
%If (TQt_2_1_0 -)
void styleChange(TQStyle &); void styleChange(TQStyle &);
%End
%If (- TQt_2_00)
int adjustPos(int);
void setRubberband(int);
%End
%If (TQt_2_00 -)
int adjustPos(int,int); int adjustPos(int,int);
virtual void setRubberband(int); virtual void setRubberband(int);
void getRange(int,int *,int *); void getRange(int,int *,int *);
%End
private: private:
%If (TQt_2_1_0 -)
TQSplitter(const TQSplitter &); TQSplitter(const TQSplitter &);
%End
}; };
%End %End

@ -38,57 +38,28 @@ class TQStatusBar : TQWidget
public: public:
TQStatusBar(TQWidget * /TransferThis/ = 0,const char * = 0); TQStatusBar(TQWidget * /TransferThis/ = 0,const char * = 0);
%If (- TQt_2_1_0)
void addWidget(TQWidget * /Transfer/,int,bool = 0);
%End
%If (TQt_2_1_0 - TQt_3_0_0)
void addWidget(TQWidget * /Transfer/,int = 0,bool = 0);
%End
%If (TQt_3_0_0 -)
virtual void addWidget(TQWidget * /Transfer/,int = 0,bool = 0); virtual void addWidget(TQWidget * /Transfer/,int = 0,bool = 0);
%End
%If (- TQt_3_0_0)
void removeWidget(TQWidget * /TransferBack/);
%End
%If (TQt_3_0_0 -)
virtual void removeWidget(TQWidget * /TransferBack/); virtual void removeWidget(TQWidget * /TransferBack/);
%End
%If (TQt_2_1_0 -)
void setSizeGripEnabled(bool); void setSizeGripEnabled(bool);
bool isSizeGripEnabled() const; bool isSizeGripEnabled() const;
%End
public slots: public slots:
%If (- TQt_2_00)
void message(const char *);
void message(const char *,int);
%End
%If (TQt_2_00 -)
void message(const TQString &); void message(const TQString &);
void message(const TQString &,int); void message(const TQString &,int);
%End
void clear(); void clear();
signals: signals:
%If (TQt_3_1_0 -)
void messageChanged(const TQString &); void messageChanged(const TQString &);
%End
protected: protected:
void paintEvent(TQPaintEvent *); void paintEvent(TQPaintEvent *);
%If (TQt_2_1_0 -)
void resizeEvent(TQResizeEvent *); void resizeEvent(TQResizeEvent *);
%End
void reformat(); void reformat();
void hideOrShow(); void hideOrShow();
%If (TQt_2_1_0 -)
bool event(TQEvent *); bool event(TQEvent *);
%End
private: private:
%If (TQt_2_1_0 -)
TQStatusBar(const TQStatusBar &); TQStatusBar(const TQStatusBar &);
%End
}; };

@ -172,8 +172,6 @@ This returns a tuple of the <Literal>double</Literal> result and the
%End %End
%If (TQt_2_00 -)
class TQChar class TQChar
{ {
%TypeHeaderCode %TypeHeaderCode
@ -195,53 +193,8 @@ public:
static const TQChar replacement; static const TQChar replacement;
static const TQChar byteOrderMark; static const TQChar byteOrderMark;
static const TQChar byteOrderSwapped; static const TQChar byteOrderSwapped;
%If (TQt_2_2_0 -)
static const TQChar nbsp; static const TQChar nbsp;
%End
%If (- TQt_3_0_0)
enum Category {
NoCategory,
Mark_NonSpacing,
Mark_SpacingCombining,
Mark_Enclosing,
Number_DecimalDigit,
Number_Letter,
Number_Other,
Separator_Space,
Separator_Line,
Separator_Paragraph,
Other_Control,
Other_Format,
Other_Surrogate,
Other_PrivateUse,
Other_NotAssigned,
Letter_Uppercase,
Letter_Lowercase,
Letter_Titlecase,
Letter_Modifier,
Letter_Other,
Punctuation_Connector,
Punctuation_Dask,
Punctuation_Open,
Punctuation_Close,
Punctuation_InitialQuote,
Punctuation_FinalQuote,
Punctuation_Other,
Symbol_Math,
Symbol_Currency,
Symbol_Modifier,
Symbol_Other
};
%End
%If (TQt_3_0_0 -)
enum Category { enum Category {
NoCategory, NoCategory,
@ -282,24 +235,7 @@ public:
Symbol_Modifier, Symbol_Modifier,
Symbol_Other Symbol_Other
}; };
%End
%If (- TQt_3_0_0)
enum Direction {
DirL,
DirR,
DirEN,
DirES,
DirET,
DirAN,
DirCS,
DirB,
DirS,
DirWS,
DirON
};
%End
%If (TQt_3_0_0 -)
enum Direction { enum Direction {
DirL, DirL,
DirR, DirR,
@ -321,7 +257,6 @@ public:
DirNSM, DirNSM,
DirBN DirBN
}; };
%End
enum Decomposition { enum Decomposition {
Single, Single,
@ -351,7 +286,6 @@ public:
Center Center
}; };
%If (TQt_3_0_0 -)
enum CombiningClass { enum CombiningClass {
Combining_BelowLeftAttached, Combining_BelowLeftAttached,
Combining_BelowAttached, Combining_BelowAttached,
@ -375,7 +309,6 @@ public:
Combining_DoubleAbove, Combining_DoubleAbove,
Combining_IotaSubscript Combining_IotaSubscript
}; };
%End
int digitValue() const; int digitValue() const;
TQChar lower() const; TQChar lower() const;
@ -385,19 +318,10 @@ public:
Direction direction() const; Direction direction() const;
Joining joining() const; Joining joining() const;
bool mirrored() const; bool mirrored() const;
%If (TQt_2_1_0 -)
TQChar mirroredChar() const; TQChar mirroredChar() const;
%End
%If (- TQt_3_0_0)
TQString decomposition() const;
%End
%If (TQt_3_0_0 -)
const TQString &decomposition() const; const TQString &decomposition() const;
%End
Decomposition decompositionTag() const; Decomposition decompositionTag() const;
%If (TQt_3_0_0 -)
unsigned char combiningClass() const; unsigned char combiningClass() const;
%End
char latin1() const; char latin1() const;
ushort unicode() const; ushort unicode() const;
@ -409,22 +333,16 @@ public:
bool isMark() const; bool isMark() const;
bool isLetter() const; bool isLetter() const;
bool isNumber() const; bool isNumber() const;
%If (TQt_2_1_0 -)
bool isLetterOrNumber() const; bool isLetterOrNumber() const;
%End
bool isDigit() const; bool isDigit() const;
%If (TQt_3_0_0 -)
bool isSymbol() const; bool isSymbol() const;
%End
// uchar& cell(); // uchar& cell();
// uchar& row(); // uchar& row();
uchar cell() const; uchar cell() const;
uchar row() const; uchar row() const;
%If (TQt_3_0_0 -)
void setCell(uchar); void setCell(uchar);
void setRow(uchar); void setRow(uchar);
%End
static bool networkOrdered(); static bool networkOrdered();
}; };
@ -447,6 +365,7 @@ class TQString
{ {
%TypeHeaderCode %TypeHeaderCode
#include <tqstring.h> #include <tqstring.h>
#include <tqtextcodec.h>
%End %End
public: public:
@ -457,18 +376,14 @@ public:
// TQString(const TQChar *,uint); // TQString(const TQChar *,uint);
// TQString(const char *); // TQString(const char *);
%If (TQt_2_1_0 -)
// This is how we implement TQUrl::operator TQString() const. // This is how we implement TQUrl::operator TQString() const.
TQString(const TQUrl &); TQString(const TQUrl &);
%End
%If (TQt_3_0_0 -)
// This is how we implement TQKeySequence::operator TQString() const. // This is how we implement TQKeySequence::operator TQString() const.
TQString(const TQKeySequence &); TQString(const TQKeySequence &);
// This is how we implement TQUuid::operator TQString() const. // This is how we implement TQUuid::operator TQString() const.
TQString(const TQUuid &); TQString(const TQUuid &);
%End
static const TQString null; static const TQString null;
@ -476,20 +391,13 @@ public:
bool isEmpty() const; bool isEmpty() const;
uint length() const; uint length() const;
void truncate(uint); void truncate(uint);
%If (- TQt_3_0_0)
void fill(TQChar,int = -1);
%End
%If (TQt_3_0_0 -)
TQString &fill(TQChar,int = -1); TQString &fill(TQChar,int = -1);
%End
TQString copy() const; TQString copy() const;
TQString arg(int /Constrained/,int = 0,int = 10) const; TQString arg(int /Constrained/,int = 0,int = 10) const;
TQString arg(double /Constrained/,int = 0,char = 'g',int = -1) const; TQString arg(double /Constrained/,int = 0,char = 'g',int = -1) const;
%If (TQt_3_2_0 -)
// TQString arg(TQ_LLONG,int = 0,int = 10) const; // TQString arg(TQ_LLONG,int = 0,int = 10) const;
// TQString arg(TQ_ULLONG,int = 0,int = 10) const; // TQString arg(TQ_ULLONG,int = 0,int = 10) const;
%End
TQString arg(long,int = 0,int = 10) const; TQString arg(long,int = 0,int = 10) const;
TQString arg(ulong,int = 0,int = 10) const; TQString arg(ulong,int = 0,int = 10) const;
// TQString arg(uint,int = 0,int = 10) const; // TQString arg(uint,int = 0,int = 10) const;
@ -498,12 +406,10 @@ public:
TQString arg(char,int = 0) const; TQString arg(char,int = 0) const;
TQString arg(TQChar,int = 0) const; TQString arg(TQChar,int = 0) const;
TQString arg(const TQString&,int = 0) const; TQString arg(const TQString&,int = 0) const;
%If (TQt_3_2_0 -)
TQString arg(const TQString &,const TQString &) const; TQString arg(const TQString &,const TQString &) const;
TQString arg(const TQString &,const TQString &,const TQString &) const; TQString arg(const TQString &,const TQString &,const TQString &) const;
TQString arg(const TQString &,const TQString &,const TQString &, TQString arg(const TQString &,const TQString &,const TQString &,
const TQString &) const; const TQString &) const;
%End
// TQString &sprintf(const char *,...); // TQString &sprintf(const char *,...);
@ -523,7 +429,6 @@ public:
int contains(const TQString &,bool = 1) const; int contains(const TQString &,bool = 1) const;
int contains(const TQRegExp &) const; int contains(const TQRegExp &) const;
%If (TQt_3_0_0 -)
enum SectionFlags { enum SectionFlags {
SectionDefault, SectionDefault,
SectionSkipEmpty, SectionSkipEmpty,
@ -540,7 +445,6 @@ public:
int = SectionDefault) const; int = SectionDefault) const;
TQString section(const TQRegExp &,int,int = 0xffffffff, TQString section(const TQRegExp &,int,int = 0xffffffff,
int = SectionDefault) const; int = SectionDefault) const;
%End
TQString left(uint) const; TQString left(uint) const;
TQString right(uint) const; TQString right(uint) const;
@ -553,56 +457,36 @@ public:
TQString simplifyWhiteSpace() const; TQString simplifyWhiteSpace() const;
TQString &insert(uint,const TQString &); TQString &insert(uint,const TQString &);
%If (TQt_3_2_0 -)
TQString &insert(uint,const TQByteArray &); TQString &insert(uint,const TQByteArray &);
// TQString &insert(uint,const char *); // TQString &insert(uint,const char *);
%End
TQString &insert(uint,TQChar *,uint); TQString &insert(uint,TQChar *,uint);
TQString &insert(uint,TQChar); TQString &insert(uint,TQChar);
TQString &insert(uint,char); TQString &insert(uint,char);
TQString &append(char); TQString &append(char);
%If (TQt_2_2_0 -)
TQString &append(TQChar); TQString &append(TQChar);
%End
TQString &append(const TQString &); TQString &append(const TQString &);
TQString &prepend(char); TQString &prepend(char);
%If (TQt_2_2_0 -)
TQString &prepend(TQChar); TQString &prepend(TQChar);
%End
TQString &prepend(const TQString &); TQString &prepend(const TQString &);
TQString &remove(uint,uint); TQString &remove(uint,uint);
%If (TQt_3_1_0 -)
TQString &remove(const TQString &); TQString &remove(const TQString &);
%If (TQt_3_2_0 -)
TQString &remove(const TQString &,bool); TQString &remove(const TQString &,bool);
%End
TQString &remove(TQChar); TQString &remove(TQChar);
TQString &remove(char); TQString &remove(char);
TQString &remove(const TQRegExp &); TQString &remove(const TQRegExp &);
%End
TQString &replace(uint,uint,const TQString &); TQString &replace(uint,uint,const TQString &);
TQString &replace(uint,uint,const TQChar *,uint); TQString &replace(uint,uint,const TQChar *,uint);
%If (TQt_3_1_0 -)
TQString &replace(uint,uint,TQChar); TQString &replace(uint,uint,TQChar);
TQString &replace(uint,uint,char); TQString &replace(uint,uint,char);
TQString &replace(TQChar,const TQString &); TQString &replace(TQChar,const TQString &);
%If (TQt_3_2_0 -)
TQString &replace(TQChar,const TQString &,bool); TQString &replace(TQChar,const TQString &,bool);
%End
TQString &replace(char,const TQString &); TQString &replace(char,const TQString &);
%If (TQt_3_2_0 -)
TQString &replace(char,const TQString &,bool); TQString &replace(char,const TQString &,bool);
%End
TQString &replace(const TQString &,const TQString &); TQString &replace(const TQString &,const TQString &);
%If (TQt_3_2_0 -)
TQString &replace(const TQString &,const TQString &,bool); TQString &replace(const TQString &,const TQString &,bool);
%End
%End
TQString &replace(const TQRegExp &,const TQString &); TQString &replace(const TQRegExp &,const TQString &);
%If (TQt_3_1_0 -)
TQString &replace(TQChar,TQChar); TQString &replace(TQChar,TQChar);
%End
short toShort(bool * = 0,int = 10) const; short toShort(bool * = 0,int = 10) const;
ushort toUShort(bool * = 0,int = 10) const; ushort toUShort(bool * = 0,int = 10) const;
@ -610,10 +494,8 @@ public:
uint toUInt(bool * = 0,int = 10) const; uint toUInt(bool * = 0,int = 10) const;
long toLong(bool * = 0,int = 10) const; long toLong(bool * = 0,int = 10) const;
ulong toULong(bool * = 0,int = 10) const; ulong toULong(bool * = 0,int = 10) const;
%If (TQt_3_2_0 -)
// TQ_LLONG toLongLong(bool * = 0,int = 10) const; // TQ_LLONG toLongLong(bool * = 0,int = 10) const;
// TQ_ULLONG toULongLong(bool * = 0,int = 10) const; // TQ_ULLONG toULongLong(bool * = 0,int = 10) const;
%End
float toFloat(bool * = 0) const; float toFloat(bool * = 0) const;
double toDouble(bool * = 0) const; double toDouble(bool * = 0) const;
@ -624,28 +506,22 @@ public:
// TQString &setNum(uint,int = 10); // TQString &setNum(uint,int = 10);
TQString &setNum(long,int = 10); TQString &setNum(long,int = 10);
TQString &setNum(ulong,int = 10); TQString &setNum(ulong,int = 10);
%If (TQt_3_2_0 -)
// TQString &setNum(TQ_LLONG,int = 10); // TQString &setNum(TQ_LLONG,int = 10);
// TQString &setNum(TQ_ULLONG,int = 10); // TQString &setNum(TQ_ULLONG,int = 10);
%End
// TQString &setNum(float,char = 'g',int = 6); // TQString &setNum(float,char = 'g',int = 6);
static TQString number(int /Constrained/,int = 10); static TQString number(int /Constrained/,int = 10);
static TQString number(double /Constrained/,char = 'g',int = 6); static TQString number(double /Constrained/,char = 'g',int = 6);
static TQString number(long,int = 10); static TQString number(long,int = 10);
static TQString number(ulong,int = 10); static TQString number(ulong,int = 10);
%If (TQt_3_2_0 -)
// static TQString number(TQ_LLONG,int = 10); // static TQString number(TQ_LLONG,int = 10);
// static TQString number(TQ_ULLONG,int = 10); // static TQString number(TQ_ULLONG,int = 10);
%End
// static TQString number(uint,int = 10); // static TQString number(uint,int = 10);
void setExpand(uint,TQChar); void setExpand(uint,TQChar);
TQString &operator+=(const TQString &); TQString &operator+=(const TQString &);
%If (TQt_3_3_0 -)
TQString &operator+=(const TQByteArray &); TQString &operator+=(const TQByteArray &);
%End
TQString &operator+=(TQChar); TQString &operator+=(TQChar);
//TQString &operator+=(char); //TQString &operator+=(char);
@ -673,9 +549,7 @@ public:
// TQChar &ref(uint); // TQChar &ref(uint);
// const TQChar *unicode() const; // const TQChar *unicode() const;
const char *ascii() const; const char *ascii() const;
%If (TQt_3_1_0 -)
static TQString fromAscii(const char *,int = -1); static TQString fromAscii(const char *,int = -1);
%End
const char *latin1() const; const char *latin1() const;
static TQString fromLatin1(const char *,int = -1); static TQString fromLatin1(const char *,int = -1);
TQCString utf8() const; TQCString utf8() const;
@ -683,62 +557,34 @@ public:
TQCString local8Bit() const; TQCString local8Bit() const;
static TQString fromLocal8Bit(const char *,int = -1); static TQString fromLocal8Bit(const char *,int = -1);
%If (TQt_3_1_0 -)
// static TQString fromUcs2(const unsigned short *); // static TQString fromUcs2(const unsigned short *);
// const unsigned short *ucs2() const; // const unsigned short *ucs2() const;
%End
%If (TQt_2_1_0 -)
// TQString &setUnicode(const TQChar *,uint); // TQString &setUnicode(const TQChar *,uint);
// TQString &setUnicodeCodes(const ushort *,uint); // TQString &setUnicodeCodes(const ushort *,uint);
%End
%If (TQt_3_1_0 -)
TQString &setAscii(const char *,int = -1); TQString &setAscii(const char *,int = -1);
%End
%If (TQt_2_1_0 -)
TQString &setLatin1(const char *,int = -1); TQString &setLatin1(const char *,int = -1);
%End
int compare(const TQString &) const; int compare(const TQString &) const;
static int compare(const TQString &,const TQString &); static int compare(const TQString &,const TQString &);
%If (TQt_3_0_0 -)
int localeAwareCompare(const TQString &) const; int localeAwareCompare(const TQString &) const;
static int localeAwareCompare(const TQString &,const TQString &); static int localeAwareCompare(const TQString &,const TQString &);
%End
void compose(); void compose();
%If (- TQt_3_0_0)
TQChar::Direction basicDirection();
TQString visual(int = 0,int = -1);
%End
%If (TQt_2_2_0 -)
bool startsWith(const TQString &) const; bool startsWith(const TQString &) const;
%End
%If (TQt_3_2_0 -)
bool startsWith(const TQString &,bool) const; bool startsWith(const TQString &,bool) const;
%End
%If (TQt_3_0_0 -)
bool endsWith(const TQString &) const; bool endsWith(const TQString &) const;
%End
%If (TQt_3_2_0 -)
bool endsWith(const TQString &,bool) const; bool endsWith(const TQString &,bool) const;
%End
%If (TQt_3_0_0 -)
void setLength(uint); void setLength(uint);
%End
%If (TQt_3_2_0 -)
uint capacity() const; uint capacity() const;
void reserve(uint); void reserve(uint);
void squeeze(); void squeeze();
%End
%If (TQt_3_0_0 -)
bool simpleText() const; bool simpleText() const;
bool isRightToLeft() const; bool isRightToLeft() const;
%End
// Force the numeric interpretation so that str + TQString gets handled // Force the numeric interpretation so that str + TQString gets handled
// as we want. // as we want.
@ -792,81 +638,12 @@ public:
SIP_PYOBJECT __unicode__(); SIP_PYOBJECT __unicode__();
%MethodCode %MethodCode
#if PY_VERSION_HEX >= 0x01060000 sipRes = PyTQt_qt_PyObject_FromTQString(sipCpp);
sipRes = TQStringToPyUnicode(sipCpp);
#else
Py_INCREF(Py_None);
sipRes = Py_None;
#endif
%End %End
SIP_PYOBJECT __str__(); SIP_PYOBJECT __str__();
%MethodCode %MethodCode
#if PY_VERSION_HEX >= 0x01060000 sipRes = PyTQt_qt_PyObject_FromTQString(sipCpp);
sipRes = TQStringToPyUnicode(sipCpp);
#else
const char *s;
Py_BEGIN_ALLOW_THREADS
s = *sipCpp;
Py_END_ALLOW_THREADS
if (s == NULL)
s = "";
sipRes = PyString_FromString(s);
#endif
%End
%TypeCode
#include <tqtextcodec.h>
#if PY_VERSION_HEX >= 0x01060000
// Convenience function for converting a TQString to a Python Unicode object.
static PyObject *TQStringToPyUnicode(TQString *qs)
{
PyObject *uobj;
if ((uobj = PyUnicode_FromUnicode(NULL,qs -> length())) == NULL)
return NULL;
Py_UNICODE *pyu = PyUnicode_AS_UNICODE(uobj);
for (uint i = 0; i < qs -> length(); ++i)
*pyu++ = (qs -> at(i)).unicode();
return uobj;
}
#endif
// Convenience function for converting a Python unicode or string object to a
// TQString on the heap.
static TQString *PyUnicodeStringToTQString(PyObject *py)
{
#if PY_VERSION_HEX >= 0x01060000
if (PyUnicode_Check(py))
{
TQString *qs = new TQString;
#if defined(Py_UNICODE_WIDE)
PY_UNICODE_TYPE *ucode = PyUnicode_AS_UNICODE(py);
int len = PyUnicode_GET_SIZE(py);
for (int i = 0; i < len; ++i)
qs->ref(i) = (uint)ucode[i];
#else
qs -> setUnicodeCodes((ushort *)PyUnicode_AS_UNICODE(py),PyUnicode_GET_SIZE(py));
#endif
return qs;
}
#endif
if (PyString_Check(py))
return new TQString(PyString_AS_STRING(py));
return 0;
}
%End %End
%ConvertToTypeCode %ConvertToTypeCode
@ -874,13 +651,11 @@ static TQString *PyUnicodeStringToTQString(PyObject *py)
// expected. // expected.
if (sipIsErr == NULL) if (sipIsErr == NULL)
return (PyString_Check(sipPy) || return (SIPBytes_Check(sipPy) ||
#if PY_VERSION_HEX >= 0x01060000
PyUnicode_Check(sipPy) || PyUnicode_Check(sipPy) ||
#endif
sipCanConvertToInstance(sipPy,sipClass_TQString,SIP_NO_CONVERTORS)); sipCanConvertToInstance(sipPy,sipClass_TQString,SIP_NO_CONVERTORS));
*sipCppPtr = PyUnicodeStringToTQString(sipPy); *sipCppPtr = PyTQt_qt_PyObject_AsTQString(sipPy);
if (*sipCppPtr) if (*sipCppPtr)
return sipGetState(sipTransferObj); return sipGetState(sipTransferObj);
@ -942,7 +717,7 @@ static TQString *PyUnicodeStringToTQString(PyObject *py)
enc = codec->fromUnicode(*sipCpp); enc = codec->fromUnicode(*sipCpp);
if ((encobj = PyString_FromString(enc.data())) != NULL) if ((encobj = SIPBytes_FromString(enc.data())) != NULL)
{ {
*sipPtrPtr = (void *)PyString_AS_STRING(encobj); *sipPtrPtr = (void *)PyString_AS_STRING(encobj);
sipRes = PyString_GET_SIZE(encobj); sipRes = PyString_GET_SIZE(encobj);
@ -970,110 +745,228 @@ bool operator<=(const TQString &,const TQString &);
bool operator>(const TQString &,const TQString &); bool operator>(const TQString &,const TQString &);
bool operator>=(const TQString &,const TQString &); bool operator>=(const TQString &,const TQString &);
%ModuleHeaderCode
extern PyObject *PyTQt_qt_PyObject_FromTQString(const TQString *qstr);
%End %End
%ModuleCode
// Convert a QString to a Python Unicode object.
PyObject *PyTQt_qt_PyObject_FromTQString(const TQString *qstr)
{
PyObject *obj;
#if PY_VERSION_HEX >= 0x03030000
// We have to work out exactly which kind to use. We assume ASCII while we
// are checking so that we only go through the string once in the most
// common case. Note that we can't use PyUnicode_FromKindAndData() because
// it doesn't handle surrogates in UCS2 strings.
int qt_len = qstr->length();
Py_UCS4 maxchar = 0x007f;
for (int qt_i = 0; qt_i < qt_len && maxchar < 0xffff; ++qt_i)
{
Py_UCS4 uch = qstr->at(qt_i).unicode();
if (uch > 0x00ff)
{
maxchar = 0xffff;
}
else if (uch > 0x007f)
{
maxchar = 0x00ff;
}
}
// Create the correctly sized object.
if ((obj = PyUnicode_New(qt_len, maxchar)) == NULL)
return NULL;
int kind = PyUnicode_KIND(obj);
void *data = PyUnicode_DATA(obj);
for (int qt_i = 0; qt_i < qt_len; ++qt_i)
{
Py_UCS4 uch = qstr->at(qt_i).unicode();
PyUnicode_WRITE(kind, data, qt_i, uch);
}
#elif defined(Py_UNICODE_WIDE)
// Note that this doesn't handle code points greater than 0xffff. It could
// but it's only an issue for old versions of Qt.
if ((obj = PyUnicode_FromUnicode(NULL, qstr->length())) == NULL)
return NULL;
Py_UNICODE *pyu = PyUnicode_AS_UNICODE(obj);
for (unsigned int i = 0; i < qstr->length(); ++i)
*pyu++ = (qstr->at(i)).unicode();
#else
if ((obj = PyUnicode_FromUnicode(NULL, qstr->length())) == NULL)
return NULL;
%If (- TQt_2_00) memcpy(PyUnicode_AS_UNICODE(obj), qstr->ucs2(),
qstr->length() * sizeof (Py_UNICODE));
#endif
class TQString : TQByteArray return obj;
{ }
%TypeHeaderCode
#include <tqstring.h>
%End %End
public:
TQString();
TQString(int);
TQString(const TQString &);
TQString(const char *);
TQString(const char *,uint);
bool isNull() const; %ModuleHeaderCode
bool isEmpty() const; extern TQString *PyTQt_qt_PyObject_AsTQString(PyObject *obj);
uint length() const; %End
bool resize(uint);
bool truncate(uint);
bool fill(char,int = -1);
TQString copy() const;
// TQString &sprintf(const char *,...);
int find(char,int = 0,bool = 1) const;
int find(const char *,int = 0,bool = 1) const;
int find(const TQRegExp &,int = 0) const;
int findRev(char,int = -1,bool = 1) const;
int findRev(const char *,int = -1,bool = 1) const;
int findRev(const TQRegExp &,int = -1) const;
int contains(char,bool = 1) const;
int contains(const char *,bool = 1) const;
int contains(const TQRegExp &) const;
TQString left(uint) const;
TQString right(uint) const;
TQString mid(uint,uint) const;
TQString leftJustify(uint,char = ' ',bool = 0) const;
TQString rightJustify(uint,char = ' ',bool = 0) const;
TQString lower() const;
TQString upper() const;
TQString stripWhiteSpace() const;
TQString simplifyWhiteSpace() const;
TQString &insert(uint,const char *);
TQString &insert(uint,char);
TQString &append(const char *);
TQString &prepend(const char *);
TQString &remove(uint,uint);
TQString &replace(uint,uint,const char *);
TQString &replace(const TQRegExp &,const char *);
short toShort(bool * = 0) const;
ushort toUShort(bool * = 0) const;
int toInt(bool * = 0) const;
uint toUInt(bool * = 0) const;
long toLong(bool * = 0) const;
ulong toULong(bool * = 0) const;
float toFloat(bool * = 0) const;
double toDouble(bool * = 0) const;
TQString &setStr(const char *); %ModuleCode
// TQString &setNum(short); // Convert a Python Unicode object to a QString.
// TQString &setNum(ushort); TQString *PyTQt_qt_PyObject_AsTQString(PyObject *obj)
TQString &setNum(int /Constrained/); {
// TQString &setNum(uint); if (PyUnicode_Check(obj))
// TQString &setNum(long); {
// TQString &setNum(ulong); #if PY_VERSION_HEX >= 0x03030000
// TQString &setNum(float,char = 'g',int = 6); SIP_SSIZE_T len = PyUnicode_GET_LENGTH(obj);
TQString &setNum(double,char = 'g',int = 6);
bool setExpand(uint,char);
SIP_PYOBJECT __str__(); switch (PyUnicode_KIND(obj))
%MethodCode {
const char *s; case PyUnicode_1BYTE_KIND:
return new TQString(TQString::fromLatin1((char *)PyUnicode_1BYTE_DATA(obj), len));
Py_BEGIN_ALLOW_THREADS case PyUnicode_2BYTE_KIND:
s = *sipCpp; // The (TQChar *) cast should be safe.
Py_END_ALLOW_THREADS return new TQString((TQChar *)PyUnicode_2BYTE_DATA(obj), len);
if (s == NULL) case PyUnicode_4BYTE_KIND:
s = ""; // Note that this doesn't handle code points greater than 0xffff. It
// could but it's only an issue for old versions of Qt.
sipRes = PyString_FromString(s); TQString *qstr = new TQString;
%End
%ConvertToTypeCode Py_UCS4 *ucode = PyUnicode_4BYTE_DATA(obj);
// Allow a Python string whenever a TQString is expected.
if (sipIsErr == NULL) for (SIP_SSIZE_T i = 0; i < len; ++i)
return (PyString_Check(sipPy) || qstr->append(TQChar((uint)ucode[i]));
sipCanConvertToInstance(sipPy,sipClass_TQString,SIP_NO_CONVERTORS));
if (PyString_Check(sipPy)) return qstr;
{ }
*sipCppPtr = new TQString(PyString_AS_STRING(sipPy));
return sipGetState(sipTransferObj); return NULL;
} #else
TQString *qstr = new TQString;
*sipCppPtr = reinterpret_cast<TQString *>(sipConvertToInstance(sipPy,sipClass_TQString,sipTransferObj,SIP_NO_CONVERTORS,0,sipIsErr)); # ifdef Py_UNICODE_WIDE
Py_UNICODE *ucode = PyUnicode_AS_UNICODE(obj);
SIP_SSIZE_T len = PyUnicode_GET_SIZE(obj);
return 0; for (SIP_SSIZE_T i = 0; i < len; ++i)
qstr->append(TQChar((uint)ucode[i]));
# else
qstr->setUnicodeCodes((ushort *)PyUnicode_AS_UNICODE(obj),PyUnicode_GET_SIZE(obj));
# endif
return qstr;
#endif
}
else if (PyBytes_Check(obj))
{
return new TQString(SIPBytes_AS_STRING(obj));
}
#if PY_MAJOR_VERSION < 3
else if (PyString_Check(obj))
{
return new TQString(PyString_AS_STRING(obj));
}
#endif
return NULL;
}
%End
%ModuleHeaderCode
extern const char *PyTQt_qt_encode(PyObject **s, TQApplication::Encoding encoding);
%End %End
};
%ModuleCode
// 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
// the object that owns the data.
const char *PyTQt_qt_encode(PyObject **s, TQApplication::Encoding encoding)
{
PyObject *obj = *s;
const char *es = 0;
SIP_SSIZE_T sz;
if (PyUnicode_Check(obj))
{
if (encoding == TQApplication::UnicodeUTF8)
{
obj = PyUnicode_AsUTF8String(obj);
}
else
{
TQTextCodec *codec = TQTextCodec::codecForTr();
if (codec)
{
// Use the Qt codec to get to a byte string, and then to a
// Python object.
TQString *qstr = PyTQt_qt_PyObject_AsTQString(obj);
TQString qs = *qstr;
TQByteArray ba = codec->fromUnicode(qs);
delete qstr;
#if PY_MAJOR_VERSION >= 3
obj = PyBytes_FromStringAndSize(ba.data(), ba.size());
#else
obj = PyString_FromStringAndSize(ba.data(), ba.size());
#endif
}
else
{
obj = PyUnicode_AsLatin1String(obj);
}
}
if (obj)
{
#if PY_MAJOR_VERSION >= 3
es = PyBytes_AS_STRING(obj);
#else
es = PyString_AS_STRING(obj);
#endif
}
}
#if PY_MAJOR_VERSION >= 3
else if (PyBytes_Check(obj))
{
es = PyBytes_AS_STRING(obj);
Py_INCREF(obj);
}
#else
else if (PyString_Check(obj))
{
es = PyString_AS_STRING(obj);
Py_INCREF(obj);
}
#endif
else if (PyObject_AsCharBuffer(obj, &es, &sz) >= 0)
{
Py_INCREF(obj);
}
if (es)
{
*s = obj;
}
else
{
PyErr_Format(PyExc_UnicodeEncodeError,
"unable to convert '%s' to requested encoding",
Py_TYPE(*s)->tp_name);
}
return es;
}
%End %End

@ -49,8 +49,6 @@ This does not return a value.
%End %End
%If (TQt_2_00 -)
class TQStringList class TQStringList
{ {
%TypeHeaderCode %TypeHeaderCode
@ -63,7 +61,6 @@ public:
TQStringList(const TQString &); TQStringList(const TQString &);
void sort(); void sort();
%If (TQt_2_1_0 -)
static TQStringList fromStrList(const TQStrList &); static TQStringList fromStrList(const TQStrList &);
static TQStringList split(const TQString &,const TQString &,bool = 0); static TQStringList split(const TQString &,const TQString &,bool = 0);
static TQStringList split(const TQChar &,const TQString &,bool = 0); static TQStringList split(const TQChar &,const TQString &,bool = 0);
@ -71,12 +68,9 @@ public:
TQString join(const TQString &) const; TQString join(const TQString &) const;
TQStringList grep(const TQString &,bool = 1) const; TQStringList grep(const TQString &,bool = 1) const;
TQStringList grep(const TQRegExp &) const; TQStringList grep(const TQRegExp &) const;
%End
%If (TQt_3_2_0 -)
TQStringList &gres(const TQString &,const TQString &,bool = 1); TQStringList &gres(const TQString &,const TQString &,bool = 1);
TQStringList &gres(const TQRegExp &,const TQString &); TQStringList &gres(const TQRegExp &,const TQString &);
%End
// These are actually in TQValueList, which isn't implemented so // These are actually in TQValueList, which isn't implemented so
// pretend they are here. // pretend they are here.
@ -188,7 +182,7 @@ public:
sipRes = new TQString((*sipCpp)[a0]); sipRes = new TQString((*sipCpp)[a0]);
%End %End
TQStringList operator[](SIP_PYSLICE); TQStringList operator[](SIP_PYSLICE slice);
%MethodCode %MethodCode
#if PY_VERSION_HEX >= 0x02050000 #if PY_VERSION_HEX >= 0x02050000
Py_ssize_t len, start, stop, step, slicelength, i; Py_ssize_t len, start, stop, step, slicelength, i;
@ -243,5 +237,3 @@ public:
bool operator==(const TQStringList &); bool operator==(const TQStringList &);
bool operator!=(const TQStringList &); bool operator!=(const TQStringList &);
}; };
%End

@ -57,7 +57,7 @@ is used instead.
{ {
PyObject *ps; PyObject *ps;
if ((ps = PyString_FromString(s)) == NULL || PyList_SetItem(l,i,ps) < 0) if ((ps = SIPBytes_FromString(s)) == NULL || PyList_SetItem(l,i,ps) < 0)
{ {
Py_XDECREF(ps); Py_XDECREF(ps);
Py_DECREF(l); Py_DECREF(l);
@ -80,13 +80,17 @@ is used instead.
for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i) for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
{ {
PyObject *object = PyList_GET_ITEM(sipPy, i);
char *s; char *s;
if ((s = PyString_AsString(PyList_GET_ITEM(sipPy,i))) == NULL) if (PyUnicode_Check(object))
{
s = tqstrdup(sipString_AsLatin1String(&object));
}
else if ((s = (char *)sipBytes_AsString(object)) == NULL)
{ {
*sipIsErr = 1; *sipIsErr = 1;
delete qsl; delete qsl;
return 0; return 0;
} }

@ -69,8 +69,6 @@ This takes only the <Literal>t</Literal> parameter and returns a tuple of the
%End %End
%If (TQt_3_0_0 -)
class TQStyleOption class TQStyleOption
{ {
%TypeHeaderCode %TypeHeaderCode
@ -85,9 +83,7 @@ public:
TQStyleOption(StyleOptionDefault /Constrained/ = Default); TQStyleOption(StyleOptionDefault /Constrained/ = Default);
%If (TQt_3_2_0 -)
TQStyleOption(int); TQStyleOption(int);
%End
TQStyleOption(int,int); TQStyleOption(int,int);
TQStyleOption(int,int,int,int); TQStyleOption(int,int,int,int);
TQStyleOption(TQMenuItem *); TQStyleOption(TQMenuItem *);
@ -96,29 +92,21 @@ public:
TQStyleOption(const TQColor &); TQStyleOption(const TQColor &);
TQStyleOption(TQTab *); TQStyleOption(TQTab *);
TQStyleOption(TQListViewItem *); TQStyleOption(TQListViewItem *);
%If (TQt_3_1_0 -)
TQStyleOption(TQCheckListItem *); TQStyleOption(TQCheckListItem *);
%End
TQStyleOption(TQt::ArrowType /Constrained/); TQStyleOption(TQt::ArrowType /Constrained/);
%If (TQt_3_1_0 -)
TQStyleOption(const TQRect &); TQStyleOption(const TQRect &);
TQStyleOption(TQWidget *); TQStyleOption(TQWidget *);
%End
bool isDefault() const; bool isDefault() const;
%If (TQt_3_3_0 -)
int day() const; int day() const;
%End
int lineWidth() const; int lineWidth() const;
int midLineWidth() const; int midLineWidth() const;
int frameShape() const; int frameShape() const;
int frameShadow() const; int frameShadow() const;
%If (TQt_3_2_0 -)
int headerSection() const; int headerSection() const;
%End
TQMenuItem* menuItem() const; TQMenuItem* menuItem() const;
int maxIconWidth() const; int maxIconWidth() const;
int tabWidth() const; int tabWidth() const;
@ -127,25 +115,17 @@ public:
TQTab *tab() const; TQTab *tab() const;
%If (TQt_3_1_0 -)
TQCheckListItem *checkListItem() const; TQCheckListItem *checkListItem() const;
%End
TQListViewItem *listViewItem() const; TQListViewItem *listViewItem() const;
TQt::ArrowType arrowType() const; TQt::ArrowType arrowType() const;
%If (TQt_3_1_0 -)
TQRect rect() const; TQRect rect() const;
TQWidget *widget() const; TQWidget *widget() const;
%End
}; };
%End
%If (TQt_3_0_0 -)
// Not yet defined in TQt v3Beta5. // Not yet defined in TQt v3Beta5.
class TQStyleHintReturn; class TQStyleHintReturn;
%End
typedef TQMap<TQ_UINT32, TQSize> DialogButtonSizeMap; typedef TQMap<TQ_UINT32, TQSize> DialogButtonSizeMap;
typedef TQMap<TQ_INT32, TQ_INT32> TabIdentifierIndexMap; typedef TQMap<TQ_INT32, TQ_INT32> TabIdentifierIndexMap;
@ -186,8 +166,6 @@ public:
typedef TQStyleWidgetActionRequestData TQStyleApplicationActionRequestData; typedef TQStyleWidgetActionRequestData TQStyleApplicationActionRequestData;
%If (TQt_2_00 -)
class TQStyle : TQObject class TQStyle : TQObject
{ {
%TypeHeaderCode %TypeHeaderCode
@ -196,13 +174,7 @@ class TQStyle : TQObject
%End %End
public: public:
%If (TQt_3_0_0 -)
TQStyle(); TQStyle();
%End
%If (- TQt_3_0_0)
GUIStyle guiStyle() const;
%End
enum ControlElementFlags { enum ControlElementFlags {
CEF_None = 0x00000000, CEF_None = 0x00000000,
@ -246,157 +218,16 @@ public:
virtual void polish(TQPalette &); virtual void polish(TQPalette &);
%If (TQt_3_0_0 -)
virtual void polishPopupMenu(TQPopupMenu *) = 0; virtual void polishPopupMenu(TQPopupMenu *) = 0;
virtual void polishPopupMenu(const TQStyleControlElementData&, ControlElementFlags, void *) = 0; virtual void polishPopupMenu(const TQStyleControlElementData&, ControlElementFlags, void *) = 0;
%End
%If (- TQt_3_0_0)
virtual TQRect itemRect(TQPainter *,int,int,int,int,int,bool,
const TQPixmap *,const TQString &,int = -1);
virtual void drawItem(TQPainter *,int,int,int,int,int,
const TQColorGroup &,bool,const TQPixmap *,
const TQString &,int = -1,const TQColor * = 0);
%End
%If (TQt_3_0_0 -)
virtual TQRect itemRect(TQPainter *,const TQRect &,int,bool, virtual TQRect itemRect(TQPainter *,const TQRect &,int,bool,
const TQPixmap *,const TQString &,int = -1) const; const TQPixmap *,const TQString &,int = -1) const;
virtual void drawItem(TQPainter *,const TQRect &,int,const TQColorGroup &, virtual void drawItem(TQPainter *,const TQRect &,int,const TQColorGroup &,
bool,const TQPixmap *,const TQString &,int = -1, bool,const TQPixmap *,const TQString &,int = -1,
const TQColor * = 0) const; const TQColor * = 0) const;
%End
%If (- TQt_3_0_0)
virtual void drawSeparator(TQPainter *,int,int,int,int,
const TQColorGroup &,bool = 1,int = 1,
int = 0);
virtual void drawRect(TQPainter *,int,int,int,int,const TQColor &,
int = 1,const TQBrush * = 0);
virtual void drawRectStrong(TQPainter *,int,int,int,int,
const TQColorGroup &,bool = 0,int = 1,
int = 0,const TQBrush * = 0);
virtual void drawButton(TQPainter *,int,int,int,int,const TQColorGroup &,
bool = 0,const TQBrush * = 0) = 0;
virtual TQRect buttonRect(int,int,int,int);
virtual void drawButtonMask(TQPainter *,int,int,int,int);
virtual void drawBevelButton(TQPainter *,int,int,int,int,
const TQColorGroup &,bool = 0,
const TQBrush * = 0) = 0;
%If (TQt_2_1_0 -)
TQRect bevelButtonRect(int,int,int,int);
%End
virtual void drawToolButton(TQPainter *,int,int,int,int,
const TQColorGroup &,bool = 0,
const TQBrush * = 0);
%If (TQt_2_1_0 -)
void drawToolButton(TQToolButton *,TQPainter *);
TQRect toolButtonRect(int,int,int,int);
%End
virtual void drawPanel(TQPainter *,int,int,int,int,const TQColorGroup &,
bool = 0,int = 1,const TQBrush * = 0);
virtual void drawPopupPanel(TQPainter *,int,int,int,int,
const TQColorGroup &,int = 2,
const TQBrush * = 0);
virtual void drawArrow(TQPainter *,TQt::ArrowType,bool,int,int,int,int,
const TQColorGroup &,bool,const TQBrush * = 0) = 0;
virtual TQSize exclusiveIndicatorSize() const = 0;
virtual void drawExclusiveIndicator(TQPainter *,int,int,int,int,
const TQColorGroup &,bool,bool = 0,
bool = 1) = 0;
virtual void drawExclusiveIndicatorMask(TQPainter *,int,int,int,int,
bool);
virtual TQSize indicatorSize() const = 0;
virtual void drawIndicator(TQPainter *,int,int,int,int,
const TQColorGroup &,int,bool = 0,
bool = 1) = 0;
virtual void drawIndicatorMask(TQPainter *,int,int,int,int,int);
virtual void drawFocusRect(TQPainter *,const TQRect &,const TQColorGroup &,
const TQColor * = 0,bool = 0) = 0;
virtual void drawComboButton(TQPainter *,int,int,int,int,
const TQColorGroup &,bool = 0,bool = 0,
bool = 1,const TQBrush * = 0) = 0;
virtual TQRect comboButtonRect(int,int,int,int) = 0;
virtual TQRect comboButtonFocusRect(int,int,int,int) = 0;
virtual void drawComboButtonMask(TQPainter *,int,int,int,int) = 0;
virtual void drawPushButton(TQPushButton *,TQPainter *) = 0;
virtual void drawPushButtonLabel(TQPushButton *,TQPainter *) = 0;
%If (TQt_2_1_0 -)
TQRect pushButtonContentsRect(TQPushButton *);
int menuButtonIndicatorWidth(int);
%End
virtual void getButtonShift(int &,int &) = 0;
virtual int defaultFrameWidth() const = 0;
virtual void tabbarMetrics(const TQTabBar *,int &,int &,int &) = 0;
virtual void drawTab(TQPainter *,const TQTabBar *,TQTab *,bool) = 0;
virtual void drawTabMask(TQPainter *,const TQTabBar* ,TQTab* ,bool) = 0;
enum ScrollControl
{
AddLine = 0x1,
SubLine = 0x2,
AddPage = 0x4,
SubPage = 0x8,
First = 0x10,
Last = 0x20,
Slider = 0x40,
NoScroll = 0x80
};
virtual void scrollBarMetrics(const TQScrollBar *,int &,int &,int &,
int &) = 0;
virtual void drawScrollBarControls(TQPainter *,const TQScrollBar *,int,
uint,uint) = 0;
virtual ScrollControl scrollBarPointOver(const TQScrollBar *,int,
const TQPoint &) = 0;
virtual int sliderLength() const = 0;
virtual void drawSlider(TQPainter *,int,int,int,int,const TQColorGroup &,
Orientation,bool,bool) = 0;
virtual void drawSliderMask(TQPainter *,int,int,int,int,Orientation,
bool,bool) = 0;
virtual void drawSliderGroove(TQPainter *,int,int,int,int,
const TQColorGroup &,TQCOORD,
Orientation) = 0;
virtual void drawSliderGrooveMask(TQPainter *,int,int,int,int,TQCOORD,
Orientation) = 0;
virtual int maximumSliderDragDistance() const = 0;
virtual int splitterWidth() const = 0;
virtual void drawSplitter(TQPainter *,int,int,int,int,
const TQColorGroup &,Orientation) = 0;
virtual void drawCheckMark(TQPainter *,int,int,int,int,
const TQColorGroup &,bool,bool) = 0;
virtual void polishPopupMenu(TQPopupMenu *) = 0;
virtual int extraPopupMenuItemWidth(bool,int,TQMenuItem *,
const TQFontMetrics &) = 0;
virtual int popupSubmenuIndicatorWidth(const TQFontMetrics &) = 0;
virtual int popupMenuItemHeight(bool,TQMenuItem *,
const TQFontMetrics &) = 0;
virtual void drawPopupMenuItem(TQPainter *,bool,int,int,TQMenuItem *,
const TQPalette &,bool, bool,int,int,int,
int) = 0;
%If (TQt_2_2_0 -)
virtual void drawMenuBarItem(TQPainter *,int,int,int,int,TQMenuItem *,
TQColorGroup &,bool,bool);
%End
%If (TQt_2_1_0 -)
TQSize scrollBarExtent();
int buttonDefaultIndicatorWidth() const;
%If (TQt_2_2_0 -)
int buttonMargin() const;
int toolBarHandleExtent() const;
int sliderThickness() const;
%End
int toolBarHandleExtend() const;
void drawToolBarHandle(TQPainter *,const TQRect &,TQt::Orientation,bool,
const TQColorGroup &,bool = 0);
%End
%End
%If (TQt_3_0_0 -)
enum PrimitiveElement { enum PrimitiveElement {
PE_ButtonCommand, PE_ButtonCommand,
PE_ButtonDefault, PE_ButtonDefault,
@ -456,25 +287,16 @@ public:
PE_ProgressBarChunk, PE_ProgressBarChunk,
%If (TQt_3_0_1 -)
PE_PanelLineEdit, PE_PanelLineEdit,
PE_PanelTabWidget, PE_PanelTabWidget,
PE_WindowFrame, PE_WindowFrame,
%End
%If (TQt_3_1_0 -)
PE_CheckListController, PE_CheckListController,
PE_CheckListIndicator, PE_CheckListIndicator,
PE_CheckListExclusiveIndicator, PE_CheckListExclusiveIndicator,
PE_PanelGroupBox, PE_PanelGroupBox,
%End
%If (TQt_3_0_4 - TQt_3_0_5)
PE_PopupMenuScroller,
%End
%If (TQt_3_3_0 -)
PE_RubberBand, PE_RubberBand,
%End
PE_CustomBase PE_CustomBase
}; };
@ -528,22 +350,14 @@ public:
CE_MenuBarItem, CE_MenuBarItem,
CE_ToolButtonLabel, CE_ToolButtonLabel,
%If (TQt_3_1_0 -)
CE_MenuBarEmptyArea, CE_MenuBarEmptyArea,
%End
%If (TQt_3_0_5 -)
CE_PopupMenuScroller, CE_PopupMenuScroller,
%End
%If (TQt_3_1_0 -)
CE_DockWindowEmptyArea, CE_DockWindowEmptyArea,
%End
%If (TQt_3_2_0 -)
CE_PopupMenuVerticalExtra, CE_PopupMenuVerticalExtra,
CE_PopupMenuHorizontalExtra, CE_PopupMenuHorizontalExtra,
CE_ToolBoxTab, CE_ToolBoxTab,
CE_HeaderLabel, CE_HeaderLabel,
%End
CE_CustomBase CE_CustomBase
}; };
@ -580,7 +394,6 @@ public:
SR_ToolButtonContents, SR_ToolButtonContents,
%If (TQt_3_2_0 -)
SR_DialogButtonAccept, SR_DialogButtonAccept,
SR_DialogButtonReject, SR_DialogButtonReject,
SR_DialogButtonApply, SR_DialogButtonApply,
@ -592,7 +405,6 @@ public:
SR_DialogButtonCustom, SR_DialogButtonCustom,
SR_ToolBoxTabContents, SR_ToolBoxTabContents,
%End
SR_CustomBase SR_CustomBase
}; };
@ -632,9 +444,7 @@ public:
SC_ComboBoxFrame, SC_ComboBoxFrame,
SC_ComboBoxEditField, SC_ComboBoxEditField,
SC_ComboBoxArrow, SC_ComboBoxArrow,
%If (TQt_3_1_0 -)
SC_ComboBoxListBoxPopup, SC_ComboBoxListBoxPopup,
%End
SC_SliderGroove, SC_SliderGroove,
SC_SliderHandle, SC_SliderHandle,
@ -720,13 +530,8 @@ public:
PM_IndicatorHeight, PM_IndicatorHeight,
PM_ExclusiveIndicatorWidth, PM_ExclusiveIndicatorWidth,
PM_ExclusiveIndicatorHeight, PM_ExclusiveIndicatorHeight,
%If (TQt_3_0_4 -)
PM_PopupMenuScrollerHeight, PM_PopupMenuScrollerHeight,
%End
%If (TQt_3_1_0 -)
PM_CheckListButtonSize, PM_CheckListButtonSize,
%End
%If (TQt_3_2_0 -)
PM_CheckListControllerSize, PM_CheckListControllerSize,
PM_PopupMenuFrameHorizontalExtra, PM_PopupMenuFrameHorizontalExtra,
PM_PopupMenuFrameVerticalExtra, PM_PopupMenuFrameVerticalExtra,
@ -742,13 +547,10 @@ public:
PM_HeaderGripMargin, PM_HeaderGripMargin,
PM_TabBarTabShiftHorizontal, PM_TabBarTabShiftHorizontal,
PM_TabBarTabShiftVertical, PM_TabBarTabShiftVertical,
%End
%If (TQt_3_3_0 -)
PM_TabBarScrollButtonWidth, PM_TabBarScrollButtonWidth,
PM_MenuBarItemSpacing, PM_MenuBarItemSpacing,
PM_ToolBarItemSpacing, PM_ToolBarItemSpacing,
%End
PM_CustomBase PM_CustomBase
}; };
@ -765,19 +567,15 @@ public:
CT_DockWindow, CT_DockWindow,
CT_ProgressBar, CT_ProgressBar,
CT_PopupMenuItem, CT_PopupMenuItem,
%If (TQt_3_1_0 -)
CT_TabBarTab, CT_TabBarTab,
CT_Slider, CT_Slider,
CT_Header, CT_Header,
CT_LineEdit, CT_LineEdit,
CT_MenuBar, CT_MenuBar,
CT_SpinBox, CT_SpinBox,
%End
%If (TQt_3_2_0 -)
CT_SizeGrip, CT_SizeGrip,
CT_TabWidget, CT_TabWidget,
CT_DialogButtons, CT_DialogButtons,
%End
CT_CustomBase CT_CustomBase
}; };
@ -839,31 +637,22 @@ public:
SH_ComboBox_Popup, SH_ComboBox_Popup,
%If (TQt_3_0_1 -)
SH_TitleBar_NoBorder, SH_TitleBar_NoBorder,
SH_ScrollBar_StopMouseOverSlider, SH_ScrollBar_StopMouseOverSlider,
%End
%If (TQt_3_0_2 -)
SH_BlinkCursorWhenTextSelected, SH_BlinkCursorWhenTextSelected,
SH_RichText_FullWidthSelection, SH_RichText_FullWidthSelection,
%End
%If (TQt_3_0_4 -)
SH_PopupMenu_Scrollable, SH_PopupMenu_Scrollable,
%End
%If (TQt_3_1_0 -)
SH_GroupBox_TextLabelVerticalAlignment, SH_GroupBox_TextLabelVerticalAlignment,
SH_GroupBox_TextLabelColor, SH_GroupBox_TextLabelColor,
SH_PopupMenu_SloppySubMenus, SH_PopupMenu_SloppySubMenus,
%End
%If (TQt_3_2_0 -)
SH_Table_GridLineColor, SH_Table_GridLineColor,
SH_LineEdit_PasswordCharacter, SH_LineEdit_PasswordCharacter,
@ -877,13 +666,10 @@ public:
SH_ScrollBar_LeftClickAbsolutePosition, SH_ScrollBar_LeftClickAbsolutePosition,
SH_ListViewExpand_SelectMouseType, SH_ListViewExpand_SelectMouseType,
%End
%If (TQt_3_3_0 -)
SH_UnderlineAccelerator, SH_UnderlineAccelerator,
SH_ToolButton_Uses3D, SH_ToolButton_Uses3D,
%End
SH_CustomBase SH_CustomBase
}; };
@ -903,9 +689,7 @@ public:
SP_MessageBoxInformation, SP_MessageBoxInformation,
SP_MessageBoxWarning, SP_MessageBoxWarning,
SP_MessageBoxCritical, SP_MessageBoxCritical,
%If (TQt_3_2_0 -)
SP_MessageBoxQuestion, SP_MessageBoxQuestion,
%End
SP_CustomBase SP_CustomBase
}; };
@ -916,7 +700,6 @@ public:
static TQRect visualRect(const TQRect &,const TQWidget *); static TQRect visualRect(const TQRect &,const TQWidget *);
static TQRect visualRect(const TQRect &,const TQRect &); static TQRect visualRect(const TQRect &,const TQRect &);
%End
// New API // New API
virtual void drawPrimitive( PrimitiveElement, virtual void drawPrimitive( PrimitiveElement,
@ -1053,20 +836,6 @@ public:
//void setApplicationActionRequestHook( ApplicationActionRequestHook ); //void setApplicationActionRequestHook( ApplicationActionRequestHook );
virtual bool applicationActionRequest( const TQStyleControlElementData&, ControlElementFlags, void*, ApplicationActionRequest, TQStyleApplicationActionRequestData = TQStyleApplicationActionRequestData() ); virtual bool applicationActionRequest( const TQStyleControlElementData&, ControlElementFlags, void*, ApplicationActionRequest, TQStyleApplicationActionRequestData = TQStyleApplicationActionRequestData() );
protected:
%If (TQt_2_1_0 - TQt_3_0_0)
void setScrollBarExtent(int,int = -1);
void setButtonDefaultIndicatorWidth(int);
%End
private: private:
%If (- TQt_3_0_0)
TQStyle();
TQStyle(GUIStyle);
%End
%If (TQt_2_1_0 -)
TQStyle(const TQStyle &); TQStyle(const TQStyle &);
%End
}; };
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_3_0_0 -)
class TQStyleFactory class TQStyleFactory
{ {
%TypeHeaderCode %TypeHeaderCode
@ -41,5 +39,3 @@ public:
static TQStringList keys(); static TQStringList keys();
static TQStyle *create(const TQString &) /Factory/; static TQStyle *create(const TQString &) /Factory/;
}; };
%End

@ -35,8 +35,6 @@
%End %End
%If (TQt_2_00 -)
class TQStyleSheetItem : TQt class TQStyleSheetItem : TQt
{ {
%TypeHeaderCode %TypeHeaderCode
@ -68,7 +66,6 @@ public:
int alignment() const; int alignment() const;
void setAlignment(int); void setAlignment(int);
%If (TQt_3_0_0 -)
enum VerticalAlignment { enum VerticalAlignment {
VAlignBaseline, VAlignBaseline,
VAlignSub, VAlignSub,
@ -77,7 +74,6 @@ public:
VerticalAlignment verticalAlignment() const; VerticalAlignment verticalAlignment() const;
void setVerticalAlignment(VerticalAlignment); void setVerticalAlignment(VerticalAlignment);
%End
int fontWeight() const; int fontWeight() const;
void setFontWeight(int); void setFontWeight(int);
@ -108,44 +104,22 @@ public:
void setFontUnderline(bool); void setFontUnderline(bool);
bool definesFontUnderline() const; bool definesFontUnderline() const;
%If (TQt_3_0_5 -)
bool fontStrikeOut() const; bool fontStrikeOut() const;
void setFontStrikeOut(bool); void setFontStrikeOut(bool);
bool definesFontStrikeOut() const; bool definesFontStrikeOut() const;
%End
bool isAnchor() const; bool isAnchor() const;
void setAnchor(bool); void setAnchor(bool);
%If (- TQt_2_1_0)
enum WhiteSpaceMode {
WhiteSpaceNormal,
WhiteSpacePre
};
%End
%If (TQt_2_1_0 -)
enum WhiteSpaceMode { enum WhiteSpaceMode {
WhiteSpaceNormal, WhiteSpaceNormal,
WhiteSpacePre, WhiteSpacePre,
WhiteSpaceNoWrap WhiteSpaceNoWrap
}; };
%End
WhiteSpaceMode whiteSpaceMode() const; WhiteSpaceMode whiteSpaceMode() const;
void setWhiteSpaceMode(WhiteSpaceMode); void setWhiteSpaceMode(WhiteSpaceMode);
%If (- TQt_3_0_0)
enum Margin {
MarginLeft,
MarginRight,
MarginTop,
MarginBottom,
MarginAll,
MarginVertical,
MarginHorizontal
};
%End
%If (TQt_3_0_0 -)
enum Margin { enum Margin {
MarginLeft, MarginLeft,
MarginRight, MarginRight,
@ -156,7 +130,6 @@ public:
MarginVertical, MarginVertical,
MarginHorizontal MarginHorizontal
}; };
%End
int margin(Margin) const; int margin(Margin) const;
void setMargin(Margin,int); void setMargin(Margin,int);
@ -180,10 +153,8 @@ public:
bool selfNesting() const; bool selfNesting() const;
void setSelfNesting(bool); void setSelfNesting(bool);
%If (TQt_3_0_0 -)
void setLineSpacing(int); void setLineSpacing(int);
int lineSpacing() const; int lineSpacing() const;
%End
}; };
@ -204,36 +175,20 @@ public:
void insert(TQStyleSheetItem *); void insert(TQStyleSheetItem *);
%If (- TQt_3_0_0)
// virtual TQTextNode *tag(const TQString &,const TQMap<TQString,TQString> &,
// const TQString &,const TQMimeSourceFactory &,
// bool = 0) const;
%End
%If (TQt_3_0_0 -)
// virtual TQTextCustomItem *tag(const TQString &, // virtual TQTextCustomItem *tag(const TQString &,
// const TQMap<TQString,TQString> &, // const TQMap<TQString,TQString> &,
// const TQString &, // const TQString &,
// const TQMimeSourceFactory &,bool, // const TQMimeSourceFactory &,bool,
// TQTextDocument *) const; // TQTextDocument *) const;
%End
%If (TQt_3_0_0 -)
static TQString escape(const TQString &); static TQString escape(const TQString &);
static TQString convertFromPlainText(const TQString &, static TQString convertFromPlainText(const TQString &,
TQStyleSheetItem::WhiteSpaceMode = TQStyleSheetItem::WhiteSpacePre); TQStyleSheetItem::WhiteSpaceMode = TQStyleSheetItem::WhiteSpacePre);
%End
%If (- TQt_3_0_0)
static TQString convertFromPlainText(const TQString &);
%End
static bool mightBeRichText(const TQString &); static bool mightBeRichText(const TQString &);
virtual void scaleFont(TQFont &,int) const; virtual void scaleFont(TQFont &,int) const;
virtual void error(const TQString &) const; virtual void error(const TQString &) const;
private: private:
%If (TQt_3_1_0 -)
TQStyleSheet(const TQStyleSheet &); TQStyleSheet(const TQStyleSheet &);
%End
}; };
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_3_1_0 -)
class TQSyntaxHighlighter : TQt class TQSyntaxHighlighter : TQt
{ {
%TypeHeaderCode %TypeHeaderCode
@ -49,9 +47,5 @@ public:
void rehighlight(); void rehighlight();
%If (TQt_3_2_0 -)
int currentParagraph() const; int currentParagraph() const;
%End
}; };
%End

@ -39,8 +39,6 @@ This returns a list of <Literal>TQTab</Literal> instances.
%End %End
%If (TQt_3_0_0 -)
class TQTab : TQt class TQTab : TQt
{ {
%TypeHeaderCode %TypeHeaderCode
@ -65,34 +63,6 @@ public:
int identifier() const; int identifier() const;
}; };
%End
%If (- TQt_3_0_0)
class TQTab
{
%TypeHeaderCode
#include <tqtabbar.h>
%End
public:
TQTab();
%If (TQt_2_1_0 -)
TQTab(const TQString &);
TQTab(const TQIconSet &,const TQString & = TQString::null);
%End
virtual ~TQTab();
TQString label;
TQRect r;
bool enabled;
int id;
TQIconSet *iconset;
};
%End
class TQTabBar : TQWidget class TQTabBar : TQWidget
{ {
%TypeHeaderCode %TypeHeaderCode
@ -110,115 +80,61 @@ public:
}; };
Shape shape() const; Shape shape() const;
%If (- TQt_2_00)
void setShape(Shape);
%End
%If (TQt_2_00 -)
virtual void setShape(Shape); virtual void setShape(Shape);
%End
void show(); void show();
virtual int addTab(TQTab * /Transfer/); virtual int addTab(TQTab * /Transfer/);
%If (TQt_2_00 -)
virtual int insertTab(TQTab * /Transfer/,int = -1); virtual int insertTab(TQTab * /Transfer/,int = -1);
virtual void removeTab(TQTab *); virtual void removeTab(TQTab *);
%End
%If (- TQt_2_00)
void setTabEnabled(int,bool);
%End
%If (TQt_2_00 -)
virtual void setTabEnabled(int,bool); virtual void setTabEnabled(int,bool);
%End
bool isTabEnabled(int) const; bool isTabEnabled(int) const;
TQSize sizeHint() const; TQSize sizeHint() const;
%If (TQt_2_2_0 -)
TQSize minimumSizeHint() const; TQSize minimumSizeHint() const;
%End
%If (TQt_2_00 -)
TQSizePolicy sizePolicy() const; TQSizePolicy sizePolicy() const;
%End
int currentTab() const; int currentTab() const;
int keyboardFocusTab() const; int keyboardFocusTab() const;
%If (- TQt_3_0_0)
TQTab *tab(int);
%End
%If (TQt_3_0_0 -)
TQTab *tab(int) const; TQTab *tab(int) const;
TQTab *tabAt(int) const; TQTab *tabAt(int) const;
int indexOf(int) const; int indexOf(int) const;
%End
%If (TQt_2_2_0 -)
int count() const; int count() const;
%End
%If (TQt_2_00 -)
virtual void layoutTabs(); virtual void layoutTabs();
%End
%If (TQt_3_0_0 -)
virtual TQTab *selectTab(const TQPoint &) const; virtual TQTab *selectTab(const TQPoint &) const;
void removeToolTip(int); void removeToolTip(int);
void setToolTip(int,const TQString &); void setToolTip(int,const TQString &);
TQString toolTip(int) const; TQString toolTip(int) const;
%End
public slots: public slots:
%If (- TQt_2_00)
void setCurrentTab(int);
void setCurrentTab(TQTab *);
%End
%If (TQt_2_00 -)
virtual void setCurrentTab(int); virtual void setCurrentTab(int);
virtual void setCurrentTab(TQTab *); virtual void setCurrentTab(TQTab *);
%End
signals: signals:
void selected(int); void selected(int);
%If (TQt_3_2_0 -)
void layoutChanged(); void layoutChanged();
%End
protected: protected:
virtual void paint(TQPainter *,TQTab *,bool) const; virtual void paint(TQPainter *,TQTab *,bool) const;
%If (TQt_2_00 -)
virtual void paintLabel(TQPainter *,const TQRect &,TQTab *,bool) const; virtual void paintLabel(TQPainter *,const TQRect &,TQTab *,bool) const;
%End
%If (- TQt_3_0_0)
virtual TQTab *selectTab(const TQPoint &) const;
%End
%If (TQt_2_00 - TQt_3_0_0)
void updateMask();
%End
%If (TQt_2_1_0 -)
void focusInEvent(TQFocusEvent *); void focusInEvent(TQFocusEvent *);
void focusOutEvent(TQFocusEvent *); void focusOutEvent(TQFocusEvent *);
void resizeEvent(TQResizeEvent *); void resizeEvent(TQResizeEvent *);
%End
void paintEvent(TQPaintEvent *); void paintEvent(TQPaintEvent *);
void mousePressEvent(TQMouseEvent *); void mousePressEvent(TQMouseEvent *);
%If (TQt_3_0_0 -)
void mouseMoveEvent(TQMouseEvent *); void mouseMoveEvent(TQMouseEvent *);
%End
void mouseReleaseEvent(TQMouseEvent *); void mouseReleaseEvent(TQMouseEvent *);
void keyPressEvent(TQKeyEvent *); void keyPressEvent(TQKeyEvent *);
%If (TQt_2_1_0 -)
void styleChange(TQStyle &); void styleChange(TQStyle &);
%End
%If (TQt_3_0_0 -)
void fontChange(const TQFont &); void fontChange(const TQFont &);
%End
%If (TQt_3_1_0 -)
bool event(TQEvent *); bool event(TQEvent *);
%End
SIP_PYLIST tabList() [TQList<TQTab> *()]; SIP_PYLIST tabList() [TQList<TQTab> *()];
%MethodCode %MethodCode
@ -260,7 +176,5 @@ protected:
%End %End
private: private:
%If (TQt_2_1_0 -)
TQTabBar(const TQTabBar &); TQTabBar(const TQTabBar &);
%End
}; };

@ -44,97 +44,50 @@ public:
void show(); void show();
void setFont(const TQFont &); void setFont(const TQFont &);
%If (- TQt_2_00)
void addTab(TQWidget *,const char *);
%End
%If (TQt_2_00 -)
void addTab(TQWidget *,const TQString &); void addTab(TQWidget *,const TQString &);
void addTab(TQWidget *,const TQIconSet &,const TQString &); void addTab(TQWidget *,const TQIconSet &,const TQString &);
%End
void addTab(TQWidget *,TQTab *); void addTab(TQWidget *,TQTab *);
%If (TQt_2_00 -)
void insertTab(TQWidget *,const TQString &,int = -1); void insertTab(TQWidget *,const TQString &,int = -1);
void insertTab(TQWidget *,const TQIconSet &,const TQString &,int = -1); void insertTab(TQWidget *,const TQIconSet &,const TQString &,int = -1);
void insertTab(TQWidget *,TQTab *,int = -1); void insertTab(TQWidget *,TQTab *,int = -1);
void changeTab(TQWidget *,const TQString &); void changeTab(TQWidget *,const TQString &);
void changeTab(TQWidget *,const TQIconSet &,const TQString &); void changeTab(TQWidget *,const TQIconSet &,const TQString &);
%End
%If (TQt_2_00 -)
bool isTabEnabled(TQWidget *) const; bool isTabEnabled(TQWidget *) const;
void setTabEnabled(TQWidget *,bool); void setTabEnabled(TQWidget *,bool);
%End
%If (- TQt_3_0_0)
bool isTabEnabled(const char *) const;
void setTabEnabled(const char *,bool);
%End
void showPage(TQWidget *); void showPage(TQWidget *);
%If (TQt_2_00 -)
void removePage(TQWidget *); void removePage(TQWidget *);
TQString tabLabel(TQWidget *); TQString tabLabel(TQWidget *);
%End
%If (- TQt_2_00)
const char *tabLabel(TQWidget *);
%End
%If (TQt_2_00 -)
TQWidget *currentPage() const; TQWidget *currentPage() const;
%End
%If (- TQt_2_00)
void setDefaultButton(const char * = "Defaults");
%End
%If (TQt_2_00 -)
void setDefaultButton(const TQString &); void setDefaultButton(const TQString &);
void setDefaultButton(); void setDefaultButton();
%End
bool hasDefaultButton() const; bool hasDefaultButton() const;
%If (TQt_2_00 -)
void setHelpButton(const TQString &); void setHelpButton(const TQString &);
void setHelpButton(); void setHelpButton();
bool hasHelpButton() const; bool hasHelpButton() const;
%End
%If (- TQt_2_00)
void setCancelButton(const char * = "Cancel");
%End
%If (TQt_2_00 -)
void setCancelButton(const TQString &); void setCancelButton(const TQString &);
void setCancelButton(); void setCancelButton();
%End
bool hasCancelButton() const; bool hasCancelButton() const;
%If (- TQt_2_00)
void setApplyButton(const char * = "Apply");
%End
%If (TQt_2_00 -)
void setApplyButton(const TQString &); void setApplyButton(const TQString &);
void setApplyButton(); void setApplyButton();
%End
bool hasApplyButton() const; bool hasApplyButton() const;
%If (- TQt_2_00)
void setOkButton(const char * = "OK");
%End
%If (TQt_2_00 -)
void setOkButton(const TQString &); void setOkButton(const TQString &);
void setOkButton(); void setOkButton();
%End
bool hasOkButton() const; bool hasOkButton() const;
protected: protected:
void paintEvent(TQPaintEvent *); void paintEvent(TQPaintEvent *);
void resizeEvent(TQResizeEvent *); void resizeEvent(TQResizeEvent *);
%If (- TQt_2_00)
void styleChange(GUIStyle);
%End
%If (TQt_2_00 -)
void styleChange(TQStyle &); void styleChange(TQStyle &);
%End
void setTabBar(TQTabBar *); void setTabBar(TQTabBar *);
TQTabBar *tabBar() const; TQTabBar *tabBar() const;
@ -144,24 +97,12 @@ signals:
void applyButtonPressed(); void applyButtonPressed();
void cancelButtonPressed(); void cancelButtonPressed();
void defaultButtonPressed(); void defaultButtonPressed();
%If (TQt_2_00 -)
void helpButtonPressed(); void helpButtonPressed();
%End
%If (TQt_2_2_0 -)
void currentChanged(TQWidget *); void currentChanged(TQWidget *);
%End
%If (- TQt_2_00)
void selected(const char *);
%End
%If (TQt_2_00 - TQt_3_0_0)
void selected(const TQString &);
%End
private: private:
%If (TQt_2_1_0 -)
TQTabDialog(const TQTabDialog &); TQTabDialog(const TQTabDialog &);
%End
}; };
%End %End

@ -1,185 +0,0 @@
// This is the SIP interface definition for TQTableView.
//
// 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.
%ExportedDoc
<Sect2><Title>TQTableView (TQt 1.x, TQt 2.x)</Title>
<FuncSynopsis>
<FuncDef>bool <Function>colXPos</Function></FuncDef>
<ParamDef>int <Parameter>col</Parameter></ParamDef>
<ParamDef>int *<Parameter>xPos</Parameter></ParamDef>
</FuncSynopsis>
<Para>
This takes the <Literal>col</Literal> parameter and returns a tuple containing
the <Literal>bool</Literal> result and <Literal>xPos</Literal>.
</Para>
<FuncSynopsis>
<FuncDef>bool <Function>rowYPos</Function></FuncDef>
<ParamDef>int <Parameter>row</Parameter></ParamDef>
<ParamDef>int *<Parameter>yPos</Parameter></ParamDef>
</FuncSynopsis>
<Para>
This takes the <Literal>row</Literal> parameter and returns a tuple containing
the <Literal>bool</Literal> result and <Literal>yPos</Literal>.
</Para>
</Sect2>
%End
%If (TQt_TABLEVIEW)
%If (- TQt_3_0_0)
%ModuleHeaderCode
#include <tqtableview.h>
%End
const uint Tbl_vScrollBar;
const uint Tbl_hScrollBar;
const uint Tbl_autoVScrollBar;
const uint Tbl_autoHScrollBar;
const uint Tbl_autoScrollBars;
const uint Tbl_clipCellPainting;
const uint Tbl_cutCellsV;
const uint Tbl_cutCellsH;
const uint Tbl_cutCells;
const uint Tbl_scrollLastHCell;
const uint Tbl_scrollLastVCell;
const uint Tbl_scrollLastCell;
const uint Tbl_smoothHScrolling;
const uint Tbl_smoothVScrolling;
const uint Tbl_smoothScrolling;
const uint Tbl_snapToHGrid;
const uint Tbl_snapToVGrid;
const uint Tbl_snapToGrid;
class TQTableView : TQFrame
{
%TypeHeaderCode
#include <tqtableview.h>
%End
public:
%If (- TQt_2_00)
void setBackgroundColor(const TQColor &);
void setPalette(const TQPalette &);
%End
%If (TQt_2_00 -)
virtual void setBackgroundColor(const TQColor &);
virtual void setPalette(const TQPalette &);
%End
void show();
void repaint(bool = 1);
void repaint(int,int,int,int,bool = 1);
void repaint(const TQRect &,bool = 1);
protected:
TQTableView(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0);
~TQTableView();
int numRows() const;
int numCols() const;
int topCell() const;
int leftCell() const;
int xOffset() const;
int yOffset() const;
virtual int cellWidth(int);
virtual int cellHeight(int);
int cellWidth() const;
int cellHeight() const;
virtual int totalWidth();
virtual int totalHeight();
uint tableFlags() const;
bool testTableFlags(uint) const;
void clearTableFlags(uint = ~0);
bool autoUpdate() const;
void updateCell(int,int,bool = 1);
TQRect cellUpdateRect() const;
TQRect viewRect() const;
int lastRowVisible() const;
int lastColVisible() const;
bool rowIsVisible(int) const;
bool colIsVisible(int) const;
const TQScrollBar *verticalScrollBar() const;
const TQScrollBar *horizontalScrollBar() const;
virtual void paintCell(TQPainter *,int,int) = 0;
virtual void setupPainter(TQPainter *);
void paintEvent(TQPaintEvent *);
void resizeEvent(TQResizeEvent *);
int findRow(int) const;
int findCol(int) const;
bool rowYPos(int,int *) const;
bool colXPos(int,int *) const;
int maxXOffset();
int maxYOffset();
int maxColOffset();
int maxRowOffset();
int minViewX() const;
int minViewY() const;
int maxViewX() const;
int maxViewY() const;
int viewWidth() const;
int viewHeight() const;
void scroll(int,int);
void updateScrollBars();
void updateTableSize();
%If (- TQt_2_00)
void setNumRows(int);
void setNumCols(int);
void setTopCell(int);
void setLeftCell(int);
void setTopLeftCell(int,int);
void setXOffset(int);
void setYOffset(int);
void setOffset(int,int,bool = 1);
void setCellWidth(int);
void setCellHeight(int);
void setTableFlags(uint);
void setAutoUpdate(bool);
%End
%If (TQt_2_00 -)
virtual void setNumRows(int);
virtual void setNumCols(int);
virtual void setTopCell(int);
virtual void setLeftCell(int);
virtual void setTopLeftCell(int,int);
virtual void setXOffset(int);
virtual void setYOffset(int);
virtual void setOffset(int,int,bool = 1);
virtual void setCellWidth(int);
virtual void setCellHeight(int);
virtual void setTableFlags(uint);
virtual void setAutoUpdate(bool);
%End
private:
TQTableView(const TQTableView &);
};
%End
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_2_00 -)
class TQTabWidget : TQWidget class TQTabWidget : TQWidget
{ {
%TypeHeaderCode %TypeHeaderCode
@ -38,28 +36,9 @@ class TQTabWidget : TQWidget
%End %End
public: public:
%If (TQt_3_0_0 -)
TQTabWidget(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0); TQTabWidget(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0);
%End
%If (TQt_2_1_0 - TQt_3_0_0)
TQTabWidget(TQWidget * /TransferThis/,const char *,WFlags);
%End
%If (- TQt_3_0_0)
TQTabWidget(TQWidget * /TransferThis/ = 0,const char * = 0);
%End
// The TQWidget is passed to TQWidgetStack::addWidget(). // The TQWidget is passed to TQWidgetStack::addWidget().
%If (- TQt_3_0_0)
void addTab(TQWidget * /Transfer/,const TQString &);
void addTab(TQWidget * /Transfer/,const TQIconSet &,const TQString &);
void addTab(TQWidget * /Transfer/,TQTab *);
void insertTab(TQWidget * /Transfer/,const TQString &,int = -1);
void insertTab(TQWidget * /Transfer/,const TQIconSet &,const TQString &,
int = -1);
void insertTab(TQWidget * /Transfer/,TQTab *,int = -1);
%End
%If (TQt_3_0_0 -)
virtual void addTab(TQWidget * /Transfer/,const TQString &); virtual void addTab(TQWidget * /Transfer/,const TQString &);
virtual void addTab(TQWidget * /Transfer/,const TQIconSet &, virtual void addTab(TQWidget * /Transfer/,const TQIconSet &,
const TQString &); const TQString &);
@ -69,7 +48,6 @@ public:
virtual void insertTab(TQWidget * /Transfer/,const TQIconSet &, virtual void insertTab(TQWidget * /Transfer/,const TQIconSet &,
const TQString &,int = -1); const TQString &,int = -1);
virtual void insertTab(TQWidget * /Transfer/,TQTab *,int = -1); virtual void insertTab(TQWidget * /Transfer/,TQTab *,int = -1);
%End
void changeTab(TQWidget *,const TQString &); void changeTab(TQWidget *,const TQString &);
void changeTab(TQWidget *,const TQIconSet &,const TQString &); void changeTab(TQWidget *,const TQIconSet &,const TQString &);
@ -77,18 +55,9 @@ public:
bool isTabEnabled(TQWidget *) const; bool isTabEnabled(TQWidget *) const;
void setTabEnabled(TQWidget *,bool); void setTabEnabled(TQWidget *,bool);
%If (TQt_3_2_0 -)
void setCornerWidget(TQWidget *,TQt::Corner = TQt::TopRight); void setCornerWidget(TQWidget *,TQt::Corner = TQt::TopRight);
TQWidget *cornerWidget(TQt::Corner = TQt::TopRight) const; TQWidget *cornerWidget(TQt::Corner = TQt::TopRight) const;
%End
%If (- TQt_3_0_0)
void showPage(TQWidget *);
void removePage(TQWidget *);
TQString tabLabel(TQWidget *);
%End
%If (TQt_3_0_0 -)
TQString tabLabel(TQWidget *) const; TQString tabLabel(TQWidget *) const;
void setTabLabel(TQWidget *,const TQString &); void setTabLabel(TQWidget *,const TQString &);
@ -98,22 +67,12 @@ public:
void removeTabToolTip(TQWidget *); void removeTabToolTip(TQWidget *);
void setTabToolTip(TQWidget *,const TQString &); void setTabToolTip(TQWidget *,const TQString &);
TQString tabToolTip(TQWidget *) const; TQString tabToolTip(TQWidget *) const;
%End
TQWidget *currentPage() const; TQWidget *currentPage() const;
%If (TQt_3_0_0 -)
TQWidget *page(int) const; TQWidget *page(int) const;
TQString label(int) const; TQString label(int) const;
%End
%If (TQt_2_2_0 -)
int currentPageIndex() const; int currentPageIndex() const;
%End
%If (TQt_2_2_0 - TQt_3_0_0)
void setCurrentPage(int);
%End
%If (TQt_3_0_0 -)
int indexOf(TQWidget *) const; int indexOf(TQWidget *) const;
%End
TQSize sizeHint() const; TQSize sizeHint() const;
TQSize minimumSizeHint() const; TQSize minimumSizeHint() const;
@ -126,7 +85,6 @@ public:
TabPosition tabPosition() const; TabPosition tabPosition() const;
void setTabPosition(TabPosition); void setTabPosition(TabPosition);
%If (TQt_2_2_0 -)
enum TabShape { enum TabShape {
Rounded, Rounded,
Triangular Triangular
@ -134,25 +92,16 @@ public:
TabShape tabShape() const; TabShape tabShape() const;
void setTabShape(TabShape); void setTabShape(TabShape);
%End
int margin() const; int margin() const;
void setMargin(int); void setMargin(int);
%If (TQt_2_1_0 - TQt_3_0_0)
TQSizePolicy sizePolicy() const;
%End
%If (TQt_3_0_0 -)
int count() const; int count() const;
%End
public slots: public slots:
%If (TQt_3_0_0 -)
void setCurrentPage(int); void setCurrentPage(int);
virtual void showPage(TQWidget *); virtual void showPage(TQWidget *);
virtual void removePage(TQWidget *); virtual void removePage(TQWidget *);
%End
protected: protected:
void showEvent(TQShowEvent *); void showEvent(TQShowEvent *);
@ -164,14 +113,8 @@ protected:
bool eventFilter(TQObject *,TQEvent *); bool eventFilter(TQObject *,TQEvent *);
signals: signals:
%If (TQt_2_2_0 -)
void currentChanged(TQWidget *); void currentChanged(TQWidget *);
%End
private: private:
%If (TQt_2_1_0 -)
TQTabWidget(const TQTabWidget &); TQTabWidget(const TQTabWidget &);
%End
}; };
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_3_0_0 -)
class TQTextBrowser : TQTextEdit class TQTextBrowser : TQTextEdit
{ {
%TypeHeaderCode %TypeHeaderCode
@ -54,14 +52,10 @@ public slots:
signals: signals:
void backwardAvailable(bool); void backwardAvailable(bool);
void forwardAvailable(bool); void forwardAvailable(bool);
%If (TQt_3_1_0 -)
void sourceChanged(const TQString &); void sourceChanged(const TQString &);
%End
void highlighted(const TQString &); void highlighted(const TQString &);
void linkClicked(const TQString &); void linkClicked(const TQString &);
%If (TQt_3_1_0 -)
void anchorClicked(const TQString &,const TQString &); void anchorClicked(const TQString &,const TQString &);
%End
protected: protected:
void keyPressEvent(TQKeyEvent *); void keyPressEvent(TQKeyEvent *);
@ -69,46 +63,3 @@ protected:
private: private:
TQTextBrowser(const TQTextBrowser &); TQTextBrowser(const TQTextBrowser &);
}; };
%End
%If (TQt_2_00 - TQt_3_0_0)
class TQTextBrowser : TQTextView
{
%TypeHeaderCode
#include <tqtextbrowser.h>
%End
public:
TQTextBrowser(TQWidget * /TransferThis/ = 0,const char * = 0);
virtual void setSource(const TQString &);
TQString source() const;
void setText(const TQString &,const TQString & = TQString::null);
void scrollToAnchor(const TQString &);
public slots:
virtual void backward();
virtual void forward();
virtual void home();
signals:
void backwardAvailable(bool);
void forwardAvailable(bool);
void highlighted(const TQString &);
void textChanged();
protected:
void viewportMousePressEvent(TQMouseEvent *);
void viewportMouseReleaseEvent(TQMouseEvent *);
void viewportMouseMoveEvent(TQMouseEvent *);
void keyPressEvent(TQKeyEvent *);
private:
%If (TQt_2_1_0 -)
TQTextBrowser(const TQTextBrowser &);
%End
};
%End

@ -54,8 +54,6 @@ updated <Literal>lenInOut</Literal>.
%End %End
%If (TQt_2_00 -)
class TQTextEncoder class TQTextEncoder
{ {
%TypeHeaderCode %TypeHeaderCode
@ -94,25 +92,19 @@ public:
static TQTextCodec *codecForContent(const char *,int); static TQTextCodec *codecForContent(const char *,int);
static TQTextCodec *codecForIndex(int); static TQTextCodec *codecForIndex(int);
static TQTextCodec *codecForLocale(); static TQTextCodec *codecForLocale();
%If (TQt_3_0_0 -)
static void setCodecForLocale(TQTextCodec *); static void setCodecForLocale(TQTextCodec *);
%End
%If (TQt_3_1_0 -)
static TQTextCodec *codecForTr(); static TQTextCodec *codecForTr();
static void setCodecForTr(TQTextCodec *); static void setCodecForTr(TQTextCodec *);
static TQTextCodec *codecForCStrings(); static TQTextCodec *codecForCStrings();
static void setCodecForCStrings(TQTextCodec *); static void setCodecForCStrings(TQTextCodec *);
%End
static void deleteAllCodecs(); static void deleteAllCodecs();
static const char *locale(); static const char *locale();
virtual const char *name() const = 0; virtual const char *name() const = 0;
%If (TQt_3_0_0 -)
virtual const char *mimeName() const; virtual const char *mimeName() const;
%End
virtual int mibEnum() const = 0; virtual int mibEnum() const = 0;
virtual TQTextDecoder *makeDecoder() const /Factory/; virtual TQTextDecoder *makeDecoder() const /Factory/;
@ -123,10 +115,8 @@ public:
TQCString fromUnicode(const TQString &) const; TQCString fromUnicode(const TQString &) const;
TQString toUnicode(const TQByteArray &,int) const; TQString toUnicode(const TQByteArray &,int) const;
TQString toUnicode(const TQByteArray &) const; TQString toUnicode(const TQByteArray &) const;
%If (TQt_3_0_0 -)
TQString toUnicode(const TQCString &,int) const; TQString toUnicode(const TQCString &,int) const;
TQString toUnicode(const TQCString &) const; TQString toUnicode(const TQCString &) const;
%End
TQString toUnicode(const char *) const; TQString toUnicode(const char *) const;
virtual bool canEncode(TQChar) const; virtual bool canEncode(TQChar) const;
virtual bool canEncode(const TQString &) const; virtual bool canEncode(const TQString &) const;
@ -134,13 +124,9 @@ public:
virtual int heuristicContentMatch(const char *,int) const = 0; virtual int heuristicContentMatch(const char *,int) const = 0;
virtual int heuristicNameMatch(const char *) const; virtual int heuristicNameMatch(const char *) const;
%If (TQt_3_0_0 -)
virtual TQByteArray fromUnicode(const TQString &,int,int) const; virtual TQByteArray fromUnicode(const TQString &,int,int) const;
virtual unsigned short characterFromUnicode(const TQString &,int) const; virtual unsigned short characterFromUnicode(const TQString &,int) const;
%End
protected: protected:
TQTextCodec(); TQTextCodec();
}; };
%End

@ -83,8 +83,6 @@ the <Literal>paraFrom</Literal>, <Literal>indexFrom</Literal>,
%End %End
%If (TQt_3_0_0 -)
// These aren't part of the public API in the TQt3 beta, so define them as // These aren't part of the public API in the TQt3 beta, so define them as
// opaque for the moment. // opaque for the moment.
@ -110,28 +108,22 @@ public:
AtWordBoundary, AtWordBoundary,
Anywhere, Anywhere,
AtWhiteSpace, AtWhiteSpace,
%If (TQt_3_1_0 -)
AtWordOrDocumentBoundary AtWordOrDocumentBoundary
%End
}; };
%If (TQt_3_1_0 -)
enum AutoFormatting { enum AutoFormatting {
AutoNone, AutoNone,
AutoBulletList, AutoBulletList,
AutoAll AutoAll
}; };
%End
enum KeyboardAction { enum KeyboardAction {
ActionBackspace, ActionBackspace,
ActionDelete, ActionDelete,
ActionReturn, ActionReturn,
ActionKill, ActionKill,
%If (TQt_3_1_0 -)
ActionWordBackspace, ActionWordBackspace,
ActionWordDelete ActionWordDelete
%End
}; };
enum CursorAction { enum CursorAction {
@ -155,13 +147,11 @@ public:
AlignSubScript AlignSubScript
}; };
%If (TQt_3_1_0 -)
enum TextInsertionFlags { enum TextInsertionFlags {
RedoIndentation, RedoIndentation,
CheckNewLines, CheckNewLines,
RemoveSelected RemoveSelected
}; };
%End
TQTextEdit(const TQString &,const TQString & = TQString::null, TQTextEdit(const TQString &,const TQString & = TQString::null,
TQWidget * /TransferThis/ = 0,const char * = 0); TQWidget * /TransferThis/ = 0,const char * = 0);
@ -226,9 +216,7 @@ public:
int tabStopWidth() const; int tabStopWidth() const;
TQString anchorAt(const TQPoint &); TQString anchorAt(const TQPoint &);
%If (TQt_3_1_0 -)
TQString anchorAt(const TQPoint &,AnchorAttribute); TQString anchorAt(const TQPoint &,AnchorAttribute);
%End
TQSize sizeHint() const; TQSize sizeHint() const;
@ -244,9 +232,7 @@ public:
int pointSize() const; int pointSize() const;
TQColor color() const; TQColor color() const;
TQFont font() const; TQFont font() const;
%If (TQt_3_1_0 -)
TQFont currentFont() const; TQFont currentFont() const;
%End
int alignment() const; int alignment() const;
int undoDepth() const; int undoDepth() const;
@ -263,7 +249,6 @@ public:
bool isUndoRedoEnabled() const; bool isUndoRedoEnabled() const;
bool eventFilter(TQObject *,TQEvent *); bool eventFilter(TQObject *,TQEvent *);
%If (TQt_3_1_0 -)
bool tabChangesFocus() const; bool tabChangesFocus() const;
// TQt defines the following as uint rather than int because it uses the // TQt defines the following as uint rather than int because it uses the
@ -274,10 +259,7 @@ public:
// and let the compiler handle it. // and let the compiler handle it.
void setAutoFormatting(int); void setAutoFormatting(int);
int autoFormatting() const; int autoFormatting() const;
%End
%If (TQt_3_3_0 -)
TQSyntaxHighlighter *syntaxHighlighter() const; TQSyntaxHighlighter *syntaxHighlighter() const;
%End
public slots: public slots:
void setEnabled(bool); void setEnabled(bool);
@ -347,13 +329,8 @@ public slots:
virtual void scrollToBottom(); virtual void scrollToBottom();
%If (TQt_3_1_0 -)
void insert(const TQString &,uint = CheckNewLines | RemoveSelected); void insert(const TQString &,uint = CheckNewLines | RemoveSelected);
virtual void insert(const TQString &,bool,bool = 1,bool = 1); virtual void insert(const TQString &,bool,bool = 1,bool = 1);
%End
%If (- TQt_3_1_0)
virtual void insert(const TQString &,bool = 0,bool = 1,bool = 1);
%End
virtual void insertAt(const TQString &,int,int); virtual void insertAt(const TQString &,int,int);
virtual void removeParagraph(int); virtual void removeParagraph(int);
virtual void insertParagraph(const TQString &,int); virtual void insertParagraph(const TQString &,int);
@ -362,15 +339,11 @@ public slots:
virtual void clearParagraphBackground(int); virtual void clearParagraphBackground(int);
virtual void setUndoRedoEnabled(bool); virtual void setUndoRedoEnabled(bool);
%If (TQt_3_1_0 -)
void setTabChangesFocus(bool); void setTabChangesFocus(bool);
void polish(); void polish();
%End
%If (TQt_3_2_0 -)
void setMaxLogLines(int); void setMaxLogLines(int);
int maxLogLines(); int maxLogLines();
%End
signals: signals:
void textChanged(); void textChanged();
@ -386,10 +359,8 @@ signals:
void cursorPositionChanged(int,int); void cursorPositionChanged(int,int);
void returnPressed(); void returnPressed();
void modificationChanged(bool); void modificationChanged(bool);
%If (TQt_3_1_0 -)
void clicked(int,int); void clicked(int,int);
void doubleClicked(int,int); void doubleClicked(int,int);
%End
protected: protected:
void repaintChanged(); void repaintChanged();
@ -424,14 +395,8 @@ protected:
protected slots: protected slots:
virtual void doChangeInterval(); virtual void doChangeInterval();
%If (TQt_3_1_0 -)
void sliderReleased(); void sliderReleased();
%End
private: private:
%If (TQt_3_1_0 -)
TQTextEdit(const TQTextEdit &); TQTextEdit(const TQTextEdit &);
%End
}; };
%End

@ -82,17 +82,6 @@ class TQTextStream
%End %End
public: public:
%If (TQt_2_00 - TQt_2_2_0)
enum Encoding {
Locale,
Latin1,
Unicode,
UnicodeNetworkOrder,
UnicodeReverse,
RawUnicode
};
%End
%If (TQt_2_2_0 -)
enum Encoding { enum Encoding {
Locale, Locale,
Latin1, Latin1,
@ -102,41 +91,30 @@ public:
RawUnicode, RawUnicode,
UnicodeUTF8 UnicodeUTF8
}; };
%End
TQTextStream(); TQTextStream();
TQTextStream(TQIODevice *); TQTextStream(TQIODevice *);
%If (TQt_2_00 -)
TQTextStream(TQString *,int); TQTextStream(TQString *,int);
%End
TQTextStream(TQByteArray,int); TQTextStream(TQByteArray,int);
// TQTextStream(FILE *,int); // TQTextStream(FILE *,int);
%If (TQt_2_00 -)
void setEncoding(Encoding); void setEncoding(Encoding);
void setCodec(TQTextCodec *); void setCodec(TQTextCodec *);
%End
%If (TQt_3_1_0 -)
TQTextCodec *codec(); TQTextCodec *codec();
%End
TQIODevice *device() const; TQIODevice *device() const;
void setDevice(TQIODevice *); void setDevice(TQIODevice *);
void unsetDevice(); void unsetDevice();
%If (TQt_2_00 -)
bool atEnd() const; bool atEnd() const;
%End
bool eof() const; bool eof() const;
// TQTextStream &readRawBytes(char *,uint) /ReleaseGIL/; // TQTextStream &readRawBytes(char *,uint) /ReleaseGIL/;
// TQTextStream &writeRawBytes(const char *,uint) /ReleaseGIL/; // TQTextStream &writeRawBytes(const char *,uint) /ReleaseGIL/;
TQString readLine() /ReleaseGIL/; TQString readLine() /ReleaseGIL/;
%If (TQt_2_00 -)
TQString read() /ReleaseGIL/; TQString read() /ReleaseGIL/;
void skipWhiteSpace(); void skipWhiteSpace();
%End
enum { enum {
skipws, skipws,
@ -174,7 +152,6 @@ public:
int precision() const; int precision() const;
int precision(int); int precision(int);
%If (TQt_3_0_0 -)
// These are defined in qmainwindow.h as global operators so we have // These are defined in qmainwindow.h as global operators so we have
// to implement them here and pretend they are class operators. // to implement them here and pretend they are class operators.
TQTextStream &operator<<(const TQMainWindow &); TQTextStream &operator<<(const TQMainWindow &);
@ -184,15 +161,12 @@ public:
// to implement them here and pretend they are class operators. // to implement them here and pretend they are class operators.
TQTextStream &operator<<(const TQDockArea &); TQTextStream &operator<<(const TQDockArea &);
TQTextStream &operator>>(TQDockArea &); TQTextStream &operator>>(TQDockArea &);
%End
private: private:
TQTextStream(const TQTextStream &); TQTextStream(const TQTextStream &);
}; };
%If (TQt_2_00 -)
class TQTextIStream : TQTextStream class TQTextIStream : TQTextStream
{ {
%TypeHeaderCode %TypeHeaderCode
@ -205,9 +179,7 @@ public:
// TQTextIStream(FILE *); // TQTextIStream(FILE *);
private: private:
%If (TQt_3_1_0 -)
TQTextIStream(const TQTextIStream &); TQTextIStream(const TQTextIStream &);
%End
}; };
@ -223,9 +195,5 @@ public:
// TQTextOStream(FILE *); // TQTextOStream(FILE *);
private: private:
%If (TQt_3_1_0 -)
TQTextOStream(const TQTextOStream &); TQTextOStream(const TQTextOStream &);
%End
}; };
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_3_0_0 -)
class TQTextView : TQTextEdit class TQTextView : TQTextEdit
{ {
%TypeHeaderCode %TypeHeaderCode
@ -43,86 +41,5 @@ public:
TQWidget * /TransferThis/ = 0,const char * = 0); TQWidget * /TransferThis/ = 0,const char * = 0);
private: private:
%If (TQt_3_1_0 -)
TQTextView(const TQTextView &);
%End
};
%End
%If (TQt_2_00 - TQt_3_0_0)
class TQTextView : TQScrollView
{
%TypeHeaderCode
#include <tqtextview.h>
%End
public:
TQTextView(TQWidget * /TransferThis/ = 0,const char * = 0);
TQTextView(const TQString &,const TQString & = TQString::null,
TQWidget * /TransferThis/ = 0,const char * = 0);
%If (- TQt_2_1_0)
virtual void setText(const TQString &,const TQString & = TQString::null);
%End
%If (TQt_2_1_0 -)
virtual void setText(const TQString &,const TQString &);
void setText(const TQString &);
%End
virtual TQString text() const;
virtual TQString context() const;
TQt::TextFormat textFormat() const;
void setTextFormat(TQt::TextFormat);
TQStyleSheet *styleSheet() const;
void setStyleSheet(TQStyleSheet *);
void setPaper(const TQBrush &);
const TQBrush &paper();
void setPaperColorGroup(const TQColorGroup &);
const TQColorGroup &paperColorGroup() const;
void setLinkColor(const TQColor &);
const TQColor &linkColor() const;
void setLinkUnderline(bool);
bool linkUnderline() const;
void setMimeSourceFactory(TQMimeSourceFactory *);
TQMimeSourceFactory *mimeSourceFactory() const;
TQString documentTitle() const;
int heightForWidth(int) const;
%If (TQt_2_1_0 -)
void append(const TQString &);
bool hasSelectedText() const;
TQString selectedText() const;
%End
public slots:
%If (TQt_2_1_0 -)
%If (TQt_CLIPBOARD)
void copy();
%End
void selectAll();
%End
protected:
void drawContentsOffset(TQPainter *,int,int,int,int,int,int);
void resizeEvent(TQResizeEvent *);
void viewportResizeEvent(TQResizeEvent *);
void viewportMousePressEvent(TQMouseEvent *);
void viewportMouseReleaseEvent(TQMouseEvent *);
void viewportMouseMoveEvent(TQMouseEvent *);
void keyPressEvent(TQKeyEvent *);
%If (TQt_2_1_0 -)
void showEvent(TQShowEvent *);
void focusInEvent(TQFocusEvent *);
void focusOutEvent(TQFocusEvent *);
%End
// TQRichText &richText() const;
void paletteChange(const TQPalette &);
private:
%If (TQt_2_1_0 -)
TQTextView(const TQTextView &); TQTextView(const TQTextView &);
%End
}; };
%End

@ -30,7 +30,6 @@
%If (TQt_THREAD_SUPPORT) %If (TQt_THREAD_SUPPORT)
%If (TQt_2_2_0 -)
class TQThread : TQt /CreatesThread/ class TQThread : TQt /CreatesThread/
{ {
@ -39,28 +38,18 @@ class TQThread : TQt /CreatesThread/
%End %End
public: public:
%If (- TQt_3_0_0)
static HANDLE currentThread();
%End
%If (TQt_3_0_0 -)
static TQt::HANDLE currentThread(); static TQt::HANDLE currentThread();
%End
static void postEvent(TQObject *,TQEvent * /Transfer/) /ReleaseGIL/; static void postEvent(TQObject *,TQEvent * /Transfer/) /ReleaseGIL/;
%If (TQt_3_0_0 -)
static void initialize(); static void initialize();
static void cleanup(); static void cleanup();
%End
static void exit() /ReleaseGIL/; static void exit() /ReleaseGIL/;
%If (TQt_3_1_0 -)
TQThread(unsigned int); TQThread(unsigned int);
%End
TQThread(); TQThread();
bool wait(unsigned long = ULONG_MAX) /ReleaseGIL/; bool wait(unsigned long = ULONG_MAX) /ReleaseGIL/;
%If (TQt_3_2_0 -)
enum Priority { enum Priority {
IdlePriority, IdlePriority,
LowestPriority, LowestPriority,
@ -73,12 +62,9 @@ public:
}; };
void start(Priority) /ReleaseGIL/; void start(Priority) /ReleaseGIL/;
%End
void start() /ReleaseGIL/; void start() /ReleaseGIL/;
%If (TQt_3_1_0 -)
void terminate(); void terminate();
%End
bool finished() const; bool finished() const;
bool running() const; bool running() const;
@ -95,4 +81,3 @@ private:
}; };
%End %End
%End

@ -44,9 +44,7 @@ public:
void stop(); void stop();
static void singleShot(int,SIP_RXOBJ_CON,SIP_SLOT_CON()); static void singleShot(int,SIP_RXOBJ_CON,SIP_SLOT_CON());
%If (TQt_3_1_0 -)
int timerId() const; int timerId() const;
%End
signals: signals:
void timeout(); void timeout();

@ -80,7 +80,6 @@ static const char *PYTQT_VERSION_STR = "3.18.1";
%Include qaccel.sip %Include qaccel.sip
%Include qaction.sip %Include qaction.sip
%Include qapplication.sip %Include qapplication.sip
%Include qarray.sip
%Include qassistantclient.sip %Include qassistantclient.sip
%Include qbrush.sip %Include qbrush.sip
%Include qbutton.sip %Include qbutton.sip
@ -120,7 +119,6 @@ static const char *PYTQT_VERSION_STR = "3.18.1";
%Include qfontinfo.sip %Include qfontinfo.sip
%Include qfontmetrics.sip %Include qfontmetrics.sip
%Include qframe.sip %Include qframe.sip
%Include qgmanager.sip
%Include qgrid.sip %Include qgrid.sip
%Include qgridview.sip %Include qgridview.sip
%Include qgroupbox.sip %Include qgroupbox.sip
@ -134,14 +132,12 @@ static const char *PYTQT_VERSION_STR = "3.18.1";
%Include qinputdialog.sip %Include qinputdialog.sip
%Include qinterlacestyle.sip %Include qinterlacestyle.sip
%Include qiodevice.sip %Include qiodevice.sip
%Include qkeycode.sip
%Include qkeysequence.sip %Include qkeysequence.sip
%Include qlabel.sip %Include qlabel.sip
%Include qlayout.sip %Include qlayout.sip
%Include qlcdnumber.sip %Include qlcdnumber.sip
%Include qlibrary.sip %Include qlibrary.sip
%Include qlineedit.sip %Include qlineedit.sip
%Include qlist.sip
%Include qlistbox.sip %Include qlistbox.sip
%Include qlistview.sip %Include qlistview.sip
%Include qlocale.sip %Include qlocale.sip
@ -186,7 +182,6 @@ static const char *PYTQT_VERSION_STR = "3.18.1";
%Include qscrollbar.sip %Include qscrollbar.sip
%Include qscrollview.sip %Include qscrollview.sip
%Include qsemaphore.sip %Include qsemaphore.sip
%Include qsemimodal.sip
%Include qsessionmanager.sip %Include qsessionmanager.sip
%Include qsettings.sip %Include qsettings.sip
%Include qsgistyle.sip %Include qsgistyle.sip
@ -209,7 +204,6 @@ static const char *PYTQT_VERSION_STR = "3.18.1";
%Include qsyntaxhighlighter.sip %Include qsyntaxhighlighter.sip
%Include qtabbar.sip %Include qtabbar.sip
%Include qtabdialog.sip %Include qtabdialog.sip
%Include qtableview.sip
%Include qtabwidget.sip %Include qtabwidget.sip
%Include qtextbrowser.sip %Include qtextbrowser.sip
%Include qtextcodec.sip %Include qtextcodec.sip
@ -238,7 +232,6 @@ static const char *PYTQT_VERSION_STR = "3.18.1";
%Include qwidget.sip %Include qwidget.sip
%Include qwidgetlist.sip %Include qwidgetlist.sip
%Include qwidgetstack.sip %Include qwidgetstack.sip
%Include qwindow.sip
%Include qwindowsstyle.sip %Include qwindowsstyle.sip
%Include qwindowsxpstyle.sip %Include qwindowsxpstyle.sip
%Include qwizard.sip %Include qwizard.sip

@ -29,8 +29,6 @@
%End %End
%If (TQt_3_0_0 -)
class TQToolBar : TQDockWindow class TQToolBar : TQDockWindow
{ {
%TypeHeaderCode %TypeHeaderCode
@ -73,88 +71,3 @@ protected:
private: private:
TQToolBar(const TQToolBar &); TQToolBar(const TQToolBar &);
}; };
%End
%If (- TQt_3_0_0)
class TQToolBar : TQWidget
{
%TypeHeaderCode
#include <tqtoolbar.h>
%End
public:
%If (- TQt_2_00)
TQToolBar(const char *,TQMainWindow * /TransferThis/,
TQMainWindow::ToolBarDock = TQMainWindow::Top,
bool = 0,const char * = 0);
TQToolBar(const char *,TQMainWindow *,TQWidget * /TransferThis/,bool = 0,
const char * = 0,WFlags = 0);
%End
%If (TQt_2_00 -)
TQToolBar(const TQString &,TQMainWindow * /TransferThis/,
TQMainWindow::ToolBarDock = TQMainWindow::Top,bool = 0,
const char * = 0);
TQToolBar(const TQString &,TQMainWindow *,TQWidget * /TransferThis/,bool = 0,
const char * = 0,WFlags = 0);
%End
TQToolBar(TQMainWindow * /TransferThis/ = 0,const char * = 0);
void addSeparator();
%If (- TQt_2_00)
enum Orientation
{
Horizontal,
Vertical
};
%End
virtual void setOrientation(Orientation);
Orientation orientation() const;
void show();
TQMainWindow *mainWindow();
bool event(TQEvent *);
%If (- TQt_2_00)
void setStretchableWidget(TQWidget *);
%End
%If (TQt_2_00 -)
virtual void setStretchableWidget(TQWidget *);
bool eventFilter(TQObject *,TQEvent *);
virtual void setLabel(const TQString &);
TQString label() const;
%End
%If (TQt_2_1_0 -)
void hide();
void setHorizontalStretchable(bool);
void setVerticalStretchable(bool);
bool isHorizontalStretchable() const;
bool isVerticalStretchable() const;
void clear();
TQSize minimumSize() const;
TQSize minimumSizeHint() const;
%End
protected:
void paintEvent(TQPaintEvent *);
%If (TQt_2_1_0 -)
void resizeEvent(TQResizeEvent *);
%End
%If (TQt_2_3_0 -)
void styleChange(TQStyle &);
%End
signals:
%If (TQt_2_1_0 -)
void orientationChanged(Orientation);
%End
private:
%If (TQt_2_1_0 -)
TQToolBar(const TQToolBar &);
%End
};
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_3_2_0 -)
class TQToolBox : TQFrame class TQToolBox : TQFrame
{ {
%TypeHeaderCode %TypeHeaderCode
@ -84,5 +82,3 @@ protected:
void frameChanged(); void frameChanged();
void styleChange(TQStyle &); void styleChange(TQStyle &);
}; };
%End

@ -36,164 +36,70 @@ class TQToolButton : TQButton
%End %End
public: public:
%If (TQt_3_1_0 -)
enum TextPosition { enum TextPosition {
%If (TQt_3_2_0 -)
BesideIcon, BesideIcon,
BelowIcon, BelowIcon,
%End
Right, // Obsolete Right, // Obsolete
Under // Obsolete Under // Obsolete
}; };
%End
%If (- TQt_2_00)
TQToolButton(TQWidget * /TransferThis/ = 0,const char * = 0);
TQToolButton(const TQPixmap &,const char *,const char *,SIP_RXOBJ_CON,
SIP_SLOT_CON(),TQToolBar * /TransferThis/,const char * = 0);
TQToolButton(TQIconSet,const char *,const char *,SIP_RXOBJ_CON,
SIP_SLOT_CON(),TQToolBar * /TransferThis/,const char * = 0);
%End
%If (TQt_2_00 -)
TQToolButton(TQWidget * /TransferThis/,const char * = 0); TQToolButton(TQWidget * /TransferThis/,const char * = 0);
%End
%If (TQt_2_00 - TQt_3_0_0)
TQToolButton(const TQPixmap &,const TQString &,const TQString &,
SIP_RXOBJ_CON,SIP_SLOT_CON(),TQToolBar * /TransferThis/,
const char * = 0);
%End
%If (TQt_2_00 -)
TQToolButton(const TQIconSet &,const TQString &,const TQString &, TQToolButton(const TQIconSet &,const TQString &,const TQString &,
SIP_RXOBJ_CON,SIP_SLOT_CON(),TQToolBar * /TransferThis/, SIP_RXOBJ_CON,SIP_SLOT_CON(),TQToolBar * /TransferThis/,
const char * = 0); const char * = 0);
%End
%If (TQt_2_1_0 -)
TQToolButton(ArrowType,TQWidget * /TransferThis/,const char * = 0); TQToolButton(ArrowType,TQWidget * /TransferThis/,const char * = 0);
%End
TQSize sizeHint() const; TQSize sizeHint() const;
%If (TQt_3_0_0 -)
TQSize minimumSizeHint() const; TQSize minimumSizeHint() const;
%End
%If (TQt_2_00 - TQt_3_0_0)
TQSizePolicy sizePolicy() const;
%End
%If (TQt_2_1_0 - TQt_3_0_0)
void setOnIconSet(const TQIconSet &);
void setOffIconSet(const TQIconSet &);
%End
%If (- TQt_2_00)
void setIconSet(const TQIconSet &);
%End
%If (TQt_2_00 - TQt_3_0_0)
virtual void setIconSet(const TQIconSet &,bool = 0);
%End
%If (TQt_2_1_0 - TQt_3_0_0)
TQIconSet onIconSet() const;
TQIconSet offIconSet() const;
%End
%If (- TQt_2_00)
TQIconSet iconSet() const;
%End
%If (TQt_2_00 - TQt_3_0_0)
TQIconSet iconSet(bool = 0) const;
%End
%If (TQt_3_0_0 -)
virtual void setIconSet(const TQIconSet &); virtual void setIconSet(const TQIconSet &);
TQIconSet iconSet() const; TQIconSet iconSet() const;
%End
bool usesBigPixmap() const; bool usesBigPixmap() const;
bool usesTextLabel() const; bool usesTextLabel() const;
%If (- TQt_2_00)
const char *textLabel() const;
%End
%If (TQt_2_00 -)
TQString textLabel() const; TQString textLabel() const;
%End
%If (TQt_2_1_0 -)
void setPopup(TQPopupMenu *); void setPopup(TQPopupMenu *);
TQPopupMenu* popup() const; TQPopupMenu* popup() const;
void setPopupDelay(int); void setPopupDelay(int);
int popupDelay() const; int popupDelay() const;
%End
%If (TQt_3_0_0 -)
void openPopup(); void openPopup();
%End
%If (TQt_2_1_0 -)
void setAutoRaise(bool); void setAutoRaise(bool);
bool autoRaise() const; bool autoRaise() const;
%End
%If (TQt_3_1_0 -)
TextPosition textPosition() const; TextPosition textPosition() const;
%End
%If (TQt_3_2_0 -)
void setText(const TQString &); void setText(const TQString &);
%End
public slots: public slots:
virtual void setUsesBigPixmap(bool); virtual void setUsesBigPixmap(bool);
virtual void setUsesTextLabel(bool); virtual void setUsesTextLabel(bool);
%If (- TQt_2_00)
virtual void setTextLabel(const char *,bool = 1);
%End
%If (TQt_2_00 - TQt_3_0_0)
virtual void setTextLabel(const TQString &,bool = 1);
%End
%If (TQt_3_0_0 -)
virtual void setTextLabel(const TQString &,bool); virtual void setTextLabel(const TQString &,bool);
%End
%If (- TQt_2_00)
void setToggleButton(bool);
%End
%If (TQt_2_00 -)
virtual void setToggleButton(bool); virtual void setToggleButton(bool);
%End
%If (- TQt_2_00)
void setOn(bool);
%End
%If (TQt_2_00 -)
virtual void setOn(bool); virtual void setOn(bool);
%End
void toggle(); void toggle();
%If (TQt_3_0_0 -)
// This was actually introduced in TQt v2.1.0 but gives signature // This was actually introduced in TQt v2.1.0 but gives signature
// conflict until TQt v3.0.0. // conflict until TQt v3.0.0.
void setTextLabel(const TQString &); void setTextLabel(const TQString &);
%End
%If (TQt_3_1_0 -)
void setTextPosition(TextPosition); void setTextPosition(TextPosition);
%End
protected: protected:
%If (TQt_3_0_0 -)
void mousePressEvent(TQMouseEvent *); void mousePressEvent(TQMouseEvent *);
%End
void drawButton(TQPainter *); void drawButton(TQPainter *);
void drawButtonLabel(TQPainter *); void drawButtonLabel(TQPainter *);
void enterEvent(TQEvent *); void enterEvent(TQEvent *);
void leaveEvent(TQEvent *); void leaveEvent(TQEvent *);
%If (TQt_2_1_0 -)
void moveEvent(TQMoveEvent *); void moveEvent(TQMoveEvent *);
%End
bool uses3D() const; bool uses3D() const;
%If (TQt_3_0_0 -)
bool eventFilter(TQObject *,TQEvent *); bool eventFilter(TQObject *,TQEvent *);
%End
private: private:
%If (TQt_2_1_0 -)
TQToolButton(const TQToolButton &); TQToolButton(const TQToolButton &);
%End
}; };

@ -44,28 +44,15 @@ class TQToolTipGroup : TQObject
public: public:
TQToolTipGroup(TQObject * /TransferThis/,const char * = 0); TQToolTipGroup(TQObject * /TransferThis/,const char * = 0);
%If (TQt_2_00 -)
bool delay() const; bool delay() const;
%End
%If (TQt_2_1_0 -)
bool enabled() const; bool enabled() const;
%End
public slots: public slots:
%If (TQt_2_00 -)
void setDelay(bool); void setDelay(bool);
%End
%If (TQt_2_1_0 -)
void setEnabled(bool); void setEnabled(bool);
%End
signals: signals:
%If (- TQt_2_00)
void showTip(const char *);
%End
%If (TQt_2_00 -)
void showTip(const TQString &); void showTip(const TQString &);
%End
void removeTip(); void removeTip();
private: private:
@ -73,41 +60,6 @@ private:
}; };
%If (- TQt_2_00)
class TQToolTip
{
%TypeHeaderCode
#include <tqtooltip.h>
%End
public:
TQToolTip(TQWidget *,TQToolTipGroup * = 0);
static void add(TQWidget *,const char *);
static void add(TQWidget *,const char *,TQToolTipGroup *,const char *);
static void remove(TQWidget *);
static void add(TQWidget *,const TQRect &,const char *);
static void add(TQWidget *,const TQRect &,const char *,TQToolTipGroup *,const char *);
static void remove(TQWidget *,const TQRect &);
static TQFont font();
static void setFont(const TQFont &);
static TQPalette palette();
static void setPalette(const TQPalette &);
TQWidget *parentWidget() const;
TQToolTipGroup *group() const;
protected:
virtual void maybeTip(const TQPoint &) = 0;
void tip(const TQRect &,const char *);
void tip(const TQRect &,const char *,const char *);
void clear();
};
%End
%If (TQt_2_00 -)
class TQToolTip : TQt class TQToolTip : TQt
{ {
%TypeHeaderCode %TypeHeaderCode
@ -127,30 +79,18 @@ public:
TQToolTipGroup *,const TQString &); TQToolTipGroup *,const TQString &);
static void remove(TQWidget *,const TQRect &); static void remove(TQWidget *,const TQRect &);
%If (TQt_3_0_0 -)
static TQString textFor(TQWidget *,const TQPoint & = TQPoint()); static TQString textFor(TQWidget *,const TQPoint & = TQPoint());
%End
%If (TQt_2_1_0 -)
static void hide(); static void hide();
%End
static TQFont font(); static TQFont font();
static void setFont(const TQFont &); static void setFont(const TQFont &);
static TQPalette palette(); static TQPalette palette();
static void setPalette(const TQPalette &); static void setPalette(const TQPalette &);
%If (TQt_3_0_0 -)
static void setGloballyEnabled(bool); static void setGloballyEnabled(bool);
static bool isGloballyEnabled(); static bool isGloballyEnabled();
%End
%If (TQt_2_1_0 - TQt_3_0_0)
static void setEnabled(bool);
static bool enabled();
%End
%If (TQt_3_1_0 -)
static void setWakeUpDelay(int); static void setWakeUpDelay(int);
%End
TQWidget *parentWidget() const; TQWidget *parentWidget() const;
TQToolTipGroup *group() const; TQToolTipGroup *group() const;
@ -159,11 +99,7 @@ protected:
virtual void maybeTip(const TQPoint &) = 0; virtual void maybeTip(const TQPoint &) = 0;
void tip(const TQRect &,const TQString &); void tip(const TQRect &,const TQString &);
void tip(const TQRect &,const TQString &,const TQString &); void tip(const TQRect &,const TQString &,const TQString &);
%If (TQt_3_1_0 -)
void tip(const TQRect &,const TQString &,const TQRect &); void tip(const TQRect &,const TQString &,const TQRect &);
void tip(const TQRect &,const TQString &,const TQString &,const TQRect &); void tip(const TQRect &,const TQString &,const TQString &,const TQRect &);
%End
void clear(); void clear();
}; };
%End

@ -35,8 +35,6 @@
%End %End
%If (TQt_2_2_0 -)
class TQTranslatorMessage class TQTranslatorMessage
{ {
%TypeHeaderCode %TypeHeaderCode
@ -66,22 +64,12 @@ public:
HashContextSourceTextComment HashContextSourceTextComment
}; };
%If (- TQt_3_0_0)
void write(TQDataStream &,bool,
Prefix = HashContextSourceTextComment) const /ReleaseGIL/;
%End
%If (TQt_3_0_0 -)
void write(TQDataStream &,bool = 0, void write(TQDataStream &,bool = 0,
Prefix = HashContextSourceTextComment) const /ReleaseGIL/; Prefix = HashContextSourceTextComment) const /ReleaseGIL/;
%End
Prefix commonPrefix(const TQTranslatorMessage &) const; Prefix commonPrefix(const TQTranslatorMessage &) const;
}; };
%End
%If (TQt_2_00 -)
class TQTranslator : TQObject class TQTranslator : TQObject
{ {
@ -90,39 +78,17 @@ class TQTranslator : TQObject
%End %End
public: public:
%If (TQt_3_2_0 -)
TQTranslator(TQObject * /TransferThis/ = 0,const char * = 0); TQTranslator(TQObject * /TransferThis/ = 0,const char * = 0);
%End
%If (- TQt_3_2_0)
TQTranslator(TQObject * /TransferThis/,const char * = 0);
%End
%If (TQt_2_2_0 -)
TQString find(const char *,const char *,const char *) const; TQString find(const char *,const char *,const char *) const;
%End
%If (- TQt_3_0_0)
virtual TQString find(const char *,const char *) const;
%End
%If (TQt_2_2_0 - TQt_3_0_0)
TQTranslatorMessage findMessage(const char *,const char *,
const char *) const;
%End
%If (TQt_3_0_0 - TQt_3_2_0)
virtual TQTranslatorMessage findMessage(const char *,const char *,
const char *) const;
%End
%If (TQt_3_2_0 -)
virtual TQTranslatorMessage findMessage(const char *,const char *, virtual TQTranslatorMessage findMessage(const char *,const char *,
const char * = 0) const; const char * = 0) const;
%End
bool load(const TQString &,const TQString & = TQString::null, bool load(const TQString &,const TQString & = TQString::null,
const TQString & = TQString::null, const TQString & = TQString::null,
const TQString & = TQString::null); const TQString & = TQString::null);
%If (TQt_3_1_0 -)
bool load(const uchar *,int); bool load(const uchar *,int);
%End
void clear(); void clear();
@ -133,45 +99,15 @@ public:
bool save(const TQString &,SaveMode = Everything); bool save(const TQString &,SaveMode = Everything);
%If (TQt_2_2_0 -)
void insert(const TQTranslatorMessage &); void insert(const TQTranslatorMessage &);
%End
%If (- TQt_3_0_0)
void insert(const char *,const char *,const TQString &);
%End
%If (TQt_2_2_0 -)
void remove(const TQTranslatorMessage &); void remove(const TQTranslatorMessage &);
%End
%If (- TQt_3_0_0)
void remove(const char *,const char *);
%End
%If (- TQt_3_0_0)
bool contains(const char *,const char *) const;
%End
%If (TQt_2_2_0 - TQt_3_0_0)
bool contains(const char *,const char *,const char *) const;
%End
%If (TQt_3_0_0 -)
bool contains(const char *,const char *,const char * = 0) const; bool contains(const char *,const char *,const char * = 0) const;
%End
%If (- TQt_3_0_0)
void squeeze();
%End
%If (TQt_2_2_0 - TQt_3_0_0)
void squeeze(SaveMode);
%End
%If (TQt_3_0_0 -)
void squeeze(SaveMode = Everything); void squeeze(SaveMode = Everything);
%End
void unsqueeze(); void unsqueeze();
%If (TQt_2_2_0 -)
TQValueList<TQTranslatorMessage> messages() const; TQValueList<TQTranslatorMessage> messages() const;
%End
private: private:
TQTranslator(const TQTranslator &); TQTranslator(const TQTranslator &);
}; };
%End

@ -31,8 +31,6 @@ operators.
%End %End
%If (TQt_2_1_0 -)
class TQUrl class TQUrl
{ {
%TypeHeaderCode %TypeHeaderCode
@ -62,9 +60,7 @@ public:
int port() const; int port() const;
virtual void setPort(int); virtual void setPort(int);
%If (TQt_3_0_0 -)
bool hasPort() const; bool hasPort() const;
%End
TQString path(bool = 1) const; TQString path(bool = 1) const;
virtual void setPath(const TQString &); virtual void setPath(const TQString &);
@ -112,5 +108,3 @@ protected:
virtual void reset(); virtual void reset();
virtual bool parse(const TQString &); virtual bool parse(const TQString &);
}; };
%End

@ -30,7 +30,6 @@
%If (TQt_NETWORKPROTOCOL) %If (TQt_NETWORKPROTOCOL)
%If (TQt_2_1_0 -)
class TQUrlInfo class TQUrlInfo
{ {
@ -39,13 +38,11 @@ class TQUrlInfo
%End %End
public: public:
%If (TQt_3_2_0 -)
enum PermissionSpec { enum PermissionSpec {
ReadOwner, WriteOwner, ExeOwner, ReadOwner, WriteOwner, ExeOwner,
ReadGroup, WriteGroup, ExeGroup, ReadGroup, WriteGroup, ExeGroup,
ReadOther, WriteOther, ExeOther ReadOther, WriteOther, ExeOther
}; };
%End
TQUrlInfo(); TQUrlInfo();
TQUrlInfo(const TQUrlOperator &,const TQString &); TQUrlInfo(const TQUrlOperator &,const TQString &);
@ -69,9 +66,7 @@ public:
virtual void setPermissions(int); virtual void setPermissions(int);
virtual void setLastModified(const TQDateTime &); virtual void setLastModified(const TQDateTime &);
%If (TQt_3_0_0 -)
bool isValid() const; bool isValid() const;
%End
TQString name() const; TQString name() const;
int permissions() const; int permissions() const;
@ -93,4 +88,3 @@ public:
}; };
%End %End
%End

@ -35,7 +35,6 @@ This returns a tuple of the <Literal>bool</Literal> result and the
%If (TQt_NETWORKPROTOCOL) %If (TQt_NETWORKPROTOCOL)
%If (TQt_2_1_0 -)
class TQUrlOperator : TQObject, TQUrl class TQUrlOperator : TQObject, TQUrl
{ {
@ -60,15 +59,9 @@ public:
virtual const TQNetworkOperation *get(const TQString & = TQString::null); virtual const TQNetworkOperation *get(const TQString & = TQString::null);
virtual const TQNetworkOperation *put(const TQByteArray &, virtual const TQNetworkOperation *put(const TQByteArray &,
const TQString & = TQString::null); const TQString & = TQString::null);
%If (- TQt_3_0_0)
virtual TQList<TQNetworkOperation> copy(const TQString &,const TQString &,
bool = 0);
%End
%If (TQt_3_0_0 -)
virtual TQPtrList<TQNetworkOperation> copy(const TQString &, virtual TQPtrList<TQNetworkOperation> copy(const TQString &,
const TQString &,bool = 0, const TQString &,bool = 0,
bool = 1); bool = 1);
%End
virtual void copy(const TQStringList &,const TQString &,bool = 0); virtual void copy(const TQStringList &,const TQString &,bool = 0);
virtual bool isDir(bool * = 0); virtual bool isDir(bool * = 0);
@ -88,23 +81,12 @@ signals:
void itemChanged(TQNetworkOperation *); void itemChanged(TQNetworkOperation *);
void data(const TQByteArray &,TQNetworkOperation *); void data(const TQByteArray &,TQNetworkOperation *);
void dataTransferProgress(int,int,TQNetworkOperation *); void dataTransferProgress(int,int,TQNetworkOperation *);
%If (- TQt_3_0_0)
void startedNextCopy(const TQList<TQNetworkOperation> &);
%End
%If (TQt_3_0_0 -)
void startedNextCopy(const TQPtrList<TQNetworkOperation> &); void startedNextCopy(const TQPtrList<TQNetworkOperation> &);
%End
void connectionStateChanged(int,const TQString &); void connectionStateChanged(int,const TQString &);
protected: protected:
%If (- TQt_3_0_0)
virtual void reset();
virtual bool parse(const TQString &);
%End
%If (TQt_3_0_0 -)
void reset(); void reset();
bool parse(const TQString &); bool parse(const TQString &);
%End
virtual bool checkValid(); virtual bool checkValid();
virtual void clearEntries(); virtual void clearEntries();
void getNetworkProtocol(); void getNetworkProtocol();
@ -112,4 +94,3 @@ protected:
}; };
%End %End
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_3_0_0 -)
class TQUuid class TQUuid
{ {
%TypeHeaderCode %TypeHeaderCode
@ -38,7 +36,6 @@ class TQUuid
%End %End
public: public:
%If (TQt_3_3_0 -)
enum Variant enum Variant
{ {
VarUnknown, VarUnknown,
@ -56,15 +53,9 @@ public:
Name, Name,
Random Random
}; };
%End
TQUuid(); TQUuid();
%If (TQt_3_0_1 -)
TQUuid(uint,ushort,ushort,uchar,uchar,uchar,uchar,uchar,uchar,uchar,uchar); TQUuid(uint,ushort,ushort,uchar,uchar,uchar,uchar,uchar,uchar,uchar,uchar);
%End
%If (- TQt_3_0_1)
TQUuid(ulong,ushort,ushort,uchar,uchar,uchar,uchar,uchar,uchar,uchar,uchar);
%End
TQUuid(const TQUuid &); TQUuid(const TQUuid &);
TQUuid(const TQString &); TQUuid(const TQString &);
@ -74,14 +65,10 @@ public:
bool operator==(const TQUuid &) const; bool operator==(const TQUuid &) const;
bool operator!=(const TQUuid &) const; bool operator!=(const TQUuid &) const;
%If (TQt_3_3_0 -)
bool operator<(const TQUuid &) const; bool operator<(const TQUuid &) const;
bool operator>(const TQUuid &) const; bool operator>(const TQUuid &) const;
static TQUuid createUuid(); static TQUuid createUuid();
TQUuid::Variant variant() const; TQUuid::Variant variant() const;
TQUuid::Version version() const; TQUuid::Version version() const;
%End
}; };
%End

@ -79,22 +79,8 @@ class TQValidator : TQObject
%End %End
public: public:
%If (- TQt_3_0_0)
TQValidator(TQWidget * /TransferThis/,const char * = 0);
%End
%If (TQt_3_0_0 -)
TQValidator(TQObject * /TransferThis/,const char * = 0); TQValidator(TQObject * /TransferThis/,const char * = 0);
%End
%If (- TQt_2_1_0)
enum State
{
Invalid,
Valid,
Acceptable
};
%End
%If (TQt_2_1_0 -)
enum State enum State
{ {
Invalid, Invalid,
@ -102,21 +88,12 @@ public:
Valid = Intermediate, Valid = Intermediate,
Acceptable Acceptable
}; };
%End
%If (TQt_2_00 -)
virtual State validate(TQString &,int & /In,Out/) const = 0; virtual State validate(TQString &,int & /In,Out/) const = 0;
virtual void fixup(TQString &) const; virtual void fixup(TQString &) const;
%End
%If (- TQt_2_00)
virtual State validate(TQString &,int & /In,Out/) = 0;
virtual void fixup(TQString &);
%End
private: private:
%If (TQt_2_1_0 -)
TQValidator(const TQValidator &); TQValidator(const TQValidator &);
%End
}; };
@ -127,35 +104,20 @@ class TQIntValidator : TQValidator
%End %End
public: public:
%If (TQt_3_0_0 -)
TQIntValidator(TQObject * /TransferThis/,const char * = 0); TQIntValidator(TQObject * /TransferThis/,const char * = 0);
TQIntValidator(int,int,TQObject * /TransferThis/,const char * = 0); TQIntValidator(int,int,TQObject * /TransferThis/,const char * = 0);
%End
%If (- TQt_3_0_0)
TQIntValidator(TQWidget * /TransferThis/,const char * = 0);
TQIntValidator(int,int,TQWidget * /TransferThis/,const char * = 0);
%End
%If (TQt_2_00 -)
TQValidator::State validate(TQString &,int & /In,Out/) const; TQValidator::State validate(TQString &,int & /In,Out/) const;
%End
%If (- TQt_2_00)
TQValidator::State validate(TQString &,int & /In,Out/);
%End
%If (TQt_2_1_0 -)
void setBottom(int); void setBottom(int);
void setTop(int); void setTop(int);
%End
virtual void setRange(int,int); virtual void setRange(int,int);
int bottom() const; int bottom() const;
int top() const; int top() const;
private: private:
%If (TQt_2_1_0 -)
TQIntValidator(const TQIntValidator &); TQIntValidator(const TQIntValidator &);
%End
}; };
@ -166,44 +128,26 @@ class TQDoubleValidator : TQValidator
%End %End
public: public:
%If (TQt_3_0_0 -)
TQDoubleValidator(TQObject * /TransferThis/,const char * = 0); TQDoubleValidator(TQObject * /TransferThis/,const char * = 0);
TQDoubleValidator(double,double,int,TQObject * /TransferThis/, TQDoubleValidator(double,double,int,TQObject * /TransferThis/,
const char * = 0); const char * = 0);
%End
%If (- TQt_3_0_0)
TQDoubleValidator(TQWidget * /TransferThis/,const char * = 0);
TQDoubleValidator(double,double,int,TQWidget * /TransferThis/,
const char * = 0);
%End
%If (TQt_2_00 -)
TQValidator::State validate(TQString &,int & /In,Out/) const; TQValidator::State validate(TQString &,int & /In,Out/) const;
%End
%If (- TQt_2_00)
TQValidator::State validate(TQString &,int & /In,Out/);
%End
virtual void setRange(double,double,int = 0); virtual void setRange(double,double,int = 0);
%If (TQt_2_1_0 -)
void setBottom(double); void setBottom(double);
void setTop(double); void setTop(double);
void setDecimals(int); void setDecimals(int);
%End
double bottom() const; double bottom() const;
double top() const; double top() const;
int decimals() const; int decimals() const;
private: private:
%If (TQt_2_1_0 -)
TQDoubleValidator(const TQDoubleValidator &); TQDoubleValidator(const TQDoubleValidator &);
%End
}; };
%If (TQt_3_0_0 -)
class TQRegExpValidator : TQValidator class TQRegExpValidator : TQValidator
{ {
%TypeHeaderCode %TypeHeaderCode
@ -223,5 +167,3 @@ public:
private: private:
TQRegExpValidator(const TQRegExpValidator &); TQRegExpValidator(const TQRegExpValidator &);
}; };
%End

@ -31,8 +31,6 @@ converted to and from Python lists of the type.
%End %End
%If (TQt_2_1_0 -)
template<Type> template<Type>
%MappedType TQValueList<Type> %MappedType TQValueList<Type>
{ {
@ -115,10 +113,6 @@ template<Type>
%End %End
}; };
%End
%If (TQt_2_00 -)
%MappedType TQValueList<int> %MappedType TQValueList<int>
{ {
@ -139,7 +133,7 @@ template<Type>
// Get it. // Get it.
for (uint i = 0; i < sipCpp -> count(); ++i) for (uint i = 0; i < sipCpp -> count(); ++i)
if (PyList_SetItem(l,i,PyInt_FromLong((long)(*sipCpp)[i])) < 0) if (PyList_SetItem(l,i,PyLong_FromLong((long)(*sipCpp)[i])) < 0)
{ {
Py_DECREF(l); Py_DECREF(l);
@ -161,7 +155,7 @@ template<Type>
for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i) for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
{ {
qvl -> append((int)PyInt_AsLong(PyList_GET_ITEM(sipPy,i))); qvl -> append(PyLong_AsLong(PyList_GET_ITEM(sipPy,i)));
if (PyErr_Occurred() != NULL) if (PyErr_Occurred() != NULL)
{ {
@ -177,5 +171,3 @@ template<Type>
return 1; return 1;
%End %End
}; };
%End

@ -193,8 +193,6 @@ Not yet implemented.
%End %End
%If (TQt_2_1_0 -)
class TQVariant class TQVariant
{ {
%TypeHeaderCode %TypeHeaderCode
@ -228,24 +226,16 @@ public:
Region, Region,
Bitmap, Bitmap,
Cursor, Cursor,
%If (TQt_2_2_0 -)
SizePolicy, SizePolicy,
%End
%If (TQt_3_0_0 -)
Date, Date,
Time, Time,
DateTime, DateTime,
ByteArray, ByteArray,
BitArray, BitArray,
KeySequence, KeySequence,
%End
%If (TQt_3_1_0 -)
Pen, Pen,
%End
%If (TQt_3_2_0 -)
LongLong, LongLong,
ULongLong, ULongLong,
%End
}; };
TQVariant(); TQVariant();
@ -271,48 +261,34 @@ public:
TQVariant(const TQRegion &); TQVariant(const TQRegion &);
TQVariant(const TQBitmap &); TQVariant(const TQBitmap &);
TQVariant(const TQCursor &); TQVariant(const TQCursor &);
%If (TQt_3_0_0 -)
TQVariant(const TQDate &); TQVariant(const TQDate &);
TQVariant(const TQTime &); TQVariant(const TQTime &);
TQVariant(const TQDateTime &); TQVariant(const TQDateTime &);
TQVariant(const TQByteArray &); TQVariant(const TQByteArray &);
// TQVariant(const TQBitArray &); // TQVariant(const TQBitArray &);
%End
// TQVariant(const TQValueList<TQVariant> &); // TQVariant(const TQValueList<TQVariant> &);
// TQVariant(const TQMap<TQString,TQVariant> &); // TQVariant(const TQMap<TQString,TQVariant> &);
TQVariant(int /Constrained/); TQVariant(int /Constrained/);
// TQVariant(uint); // TQVariant(uint);
%If (TQt_3_2_0 -)
// TQVariant(TQ_LLONG); // TQVariant(TQ_LLONG);
// TQVariant(TQ_ULLONG); // TQVariant(TQ_ULLONG);
%End
TQVariant(bool,int); TQVariant(bool,int);
TQVariant(double); TQVariant(double);
%If (TQt_2_2_0 -)
TQVariant(TQSizePolicy); TQVariant(TQSizePolicy);
%End
%If (TQt_3_0_0 -)
// This must appear after the TQString, int and double ctors because // This must appear after the TQString, int and double ctors because
// each of those can be converted automatically to a TQKeySequence and // each of those can be converted automatically to a TQKeySequence and
// we want those to take precedence. // we want those to take precedence.
TQVariant(const TQKeySequence &); TQVariant(const TQKeySequence &);
%End
%If (TQt_3_1_0 -)
TQVariant(const TQPen &); TQVariant(const TQPen &);
%End
Type type() const; Type type() const;
const char* typeName() const; const char* typeName() const;
bool canCast(Type) const; bool canCast(Type) const;
%If (TQt_3_0_0 -)
bool cast(Type); bool cast(Type);
%End
bool isValid() const; bool isValid() const;
%If (TQt_3_1_0 -)
bool isNull() const; bool isNull() const;
%End
void clear(); void clear();
@ -334,30 +310,22 @@ public:
const TQBitmap toBitmap() const; const TQBitmap toBitmap() const;
const TQRegion toRegion() const; const TQRegion toRegion() const;
const TQCursor toCursor() const; const TQCursor toCursor() const;
%If (TQt_3_0_0 -)
const TQDate toDate() const; const TQDate toDate() const;
const TQTime toTime() const; const TQTime toTime() const;
const TQDateTime toDateTime() const; const TQDateTime toDateTime() const;
const TQByteArray toByteArray() const; const TQByteArray toByteArray() const;
// const TQBitArray toBitArray() const; // const TQBitArray toBitArray() const;
const TQKeySequence toKeySequence() const; const TQKeySequence toKeySequence() const;
%End
%If (TQt_3_1_0 -)
const TQPen toPen() const; const TQPen toPen() const;
%End
int toInt() const; int toInt() const;
uint toUInt() const; uint toUInt() const;
%If (TQt_3_2_0 -)
// TQ_LLONG toLongLong(bool * = 0) const; // TQ_LLONG toLongLong(bool * = 0) const;
// TQ_ULLONG toULongLong( bool * = 0) const; // TQ_ULLONG toULongLong( bool * = 0) const;
%End
bool toBool() const; bool toBool() const;
double toDouble() const; double toDouble() const;
// const TQValueList<TQVariant> toList() const; // const TQValueList<TQVariant> toList() const;
// const TQMap<TQString,TQVariant> toMap() const; // const TQMap<TQString,TQVariant> toMap() const;
%If (TQt_2_2_0 -)
TQSizePolicy toSizePolicy() const; TQSizePolicy toSizePolicy() const;
%End
// TQValueListConstIterator<TQVariant> listBegin() const; // TQValueListConstIterator<TQVariant> listBegin() const;
// TQValueListConstIterator<TQVariant> listEnd() const; // TQValueListConstIterator<TQVariant> listEnd() const;
@ -385,30 +353,22 @@ public:
TQBitmap & asBitmap(); TQBitmap & asBitmap();
TQRegion & asRegion(); TQRegion & asRegion();
TQCursor & asCursor(); TQCursor & asCursor();
%If (TQt_3_0_0 -)
TQDate & asDate(); TQDate & asDate();
TQTime & asTime(); TQTime & asTime();
TQDateTime & asDateTime(); TQDateTime & asDateTime();
TQByteArray & asByteArray(); TQByteArray & asByteArray();
// TQBitArray & asBitArray(); // TQBitArray & asBitArray();
TQKeySequence & asKeySequence(); TQKeySequence & asKeySequence();
%End
%If (TQt_3_1_0 -)
TQPen & asPen(); TQPen & asPen();
%End
// int & asInt(); // int & asInt();
// uint & asUInt(); // uint & asUInt();
%If (TQt_3_2_0 -)
// TQ_LLONG & asLongLong(); // TQ_LLONG & asLongLong();
// TQ_ULLONG & asULongLong(); // TQ_ULLONG & asULongLong();
%End
// bool & asBool(); // bool & asBool();
// double & asDouble(); // double & asDouble();
// TQValueList<TQVariant> & asList(); // TQValueList<TQVariant> & asList();
// TQMap<TQString,TQVariant> & asMap(); // TQMap<TQString,TQVariant> & asMap();
%If (TQt_2_2_0 -)
TQSizePolicy & asSizePolicy(); TQSizePolicy & asSizePolicy();
%End
void load(TQDataStream &); void load(TQDataStream &);
void save(TQDataStream &) const; void save(TQDataStream &) const;
@ -416,5 +376,3 @@ public:
static const char *typeToName(Type); static const char *typeToName(Type);
static Type nameToType(const char *); static Type nameToType(const char *);
}; };
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_2_00 -)
class TQVBox : TQHBox class TQVBox : TQHBox
{ {
%TypeHeaderCode %TypeHeaderCode
@ -38,18 +36,8 @@ class TQVBox : TQHBox
%End %End
public: public:
%If (- TQt_3_0_0)
TQVBox(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0,
bool = 1);
%End
%If (TQt_3_0_0 -)
TQVBox(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0); TQVBox(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0);
%End
private: private:
%If (TQt_2_1_0 -)
TQVBox(const TQVBox &); TQVBox(const TQVBox &);
%End
}; };
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_2_00 -)
class TQVButtonGroup : TQButtonGroup class TQVButtonGroup : TQButtonGroup
{ {
%TypeHeaderCode %TypeHeaderCode
@ -44,5 +42,3 @@ public:
private: private:
TQVButtonGroup(const TQVButtonGroup &); TQVButtonGroup(const TQVButtonGroup &);
}; };
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_2_00 -)
class TQVGroupBox : TQGroupBox class TQVGroupBox : TQGroupBox
{ {
%TypeHeaderCode %TypeHeaderCode
@ -44,5 +42,3 @@ public:
private: private:
TQVGroupBox(const TQVGroupBox &); TQVGroupBox(const TQVGroupBox &);
}; };
%End

@ -31,8 +31,6 @@
%If (TQt_THREAD_SUPPORT) %If (TQt_THREAD_SUPPORT)
%If (TQt_3_0_0 -)
class TQWaitCondition class TQWaitCondition
{ {
%TypeHeaderCode %TypeHeaderCode
@ -53,29 +51,3 @@ private:
}; };
%End %End
%If (TQt_2_2_0 - TQt_3_0_0)
class TQWaitCondition : TQt
{
%TypeHeaderCode
#include <tqthread.h>
%End
public:
TQWaitCondition();
bool wait(unsigned long = ULONG_MAX) /ReleaseGIL/;
bool wait(TQMutex *,unsigned long = ULONG_MAX) /ReleaseGIL/;
void wakeOne();
void wakeAll();
private:
TQWaitCondition(const TQWaitCondition &);
};
%End
%End

@ -29,26 +29,6 @@
%End %End
%If (- TQt_2_00)
class TQWhatsThis
{
%TypeHeaderCode
#include <tqwhatsthis.h>
%End
public:
static void add(TQWidget *,const char *,bool = 1);
static void add(TQWidget *,const TQPixmap &,const char *,const char *,bool = 1);
static void remove(TQWidget *);
static const char *textFor(TQWidget *);
static TQToolButton *whatsThisButton(TQWidget *);
};
%End
%If (TQt_2_00 -)
class TQWhatsThis : TQt class TQWhatsThis : TQt
{ {
%TypeHeaderCode %TypeHeaderCode
@ -59,39 +39,22 @@ public:
TQWhatsThis(TQWidget *); TQWhatsThis(TQWidget *);
virtual TQString text(const TQPoint &); virtual TQString text(const TQPoint &);
%If (TQt_3_0_0 -)
virtual bool clicked(const TQString &); virtual bool clicked(const TQString &);
%End
%If (TQt_3_1_0 -)
static void setFont(const TQFont &); static void setFont(const TQFont &);
%End
static void add(TQWidget *,const TQString &); static void add(TQWidget *,const TQString &);
static void remove(TQWidget *); static void remove(TQWidget *);
%If (- TQt_3_0_0)
static TQString textFor(TQWidget *,const TQPoint & = TQPoint());
%End
%If (TQt_3_0_0 -)
static TQString textFor(TQWidget *,const TQPoint & = TQPoint(),bool = 0); static TQString textFor(TQWidget *,const TQPoint & = TQPoint(),bool = 0);
%End
static TQToolButton *whatsThisButton(TQWidget *); static TQToolButton *whatsThisButton(TQWidget *);
static void enterWhatsThisMode(); static void enterWhatsThisMode();
static bool inWhatsThisMode(); static bool inWhatsThisMode();
%If (- TQt_3_0_0)
static void leaveWhatsThisMode(const TQString & = TQString::null,
const TQPoint & = TQCursor::pos());
%End
%If (TQt_3_0_0 -)
static void leaveWhatsThisMode(const TQString & = TQString::null, static void leaveWhatsThisMode(const TQString & = TQString::null,
const TQPoint & = TQCursor::pos(), const TQPoint & = TQCursor::pos(),
TQWidget * = 0); TQWidget * = 0);
static void display(const TQString &,const TQPoint & = TQCursor::pos(), static void display(const TQString &,const TQPoint & = TQCursor::pos(),
TQWidget * = 0); TQWidget * = 0);
%End
}; };
%End

@ -68,9 +68,7 @@ public:
WId winId() const; WId winId() const;
bool isTopLevel() const; bool isTopLevel() const;
%If (TQt_3_0_0 -)
bool isDialog() const; bool isDialog() const;
%End
bool isPopup() const; bool isPopup() const;
bool isDesktop() const; bool isDesktop() const;
bool isModal() const; bool isModal() const;
@ -104,42 +102,27 @@ public:
TQPoint mapFromGlobal(const TQPoint &) const; TQPoint mapFromGlobal(const TQPoint &) const;
TQPoint mapToParent(const TQPoint &) const; TQPoint mapToParent(const TQPoint &) const;
TQPoint mapFromParent(const TQPoint &) const; TQPoint mapFromParent(const TQPoint &) const;
%If (TQt_2_2_0 -)
TQPoint mapTo(TQWidget *,const TQPoint &) const; TQPoint mapTo(TQWidget *,const TQPoint &) const;
TQPoint mapFrom(TQWidget *,const TQPoint &) const; TQPoint mapFrom(TQWidget *,const TQPoint &) const;
%End
TQWidget *topLevelWidget() const; TQWidget *topLevelWidget() const;
BackgroundMode backgroundMode() const; BackgroundMode backgroundMode() const;
%If (- TQt_3_0_0)
const TQColor &backgroundColor() const;
virtual void setBackgroundColor(const TQColor &);
const TQPixmap *backgroundPixmap();
virtual void setBackgroundPixmap(const TQPixmap &);
%End
const TQColor &foregroundColor() const; const TQColor &foregroundColor() const;
%If (TQt_3_0_0 -)
const TQColor &eraseColor() const; const TQColor &eraseColor() const;
virtual void setEraseColor(const TQColor &); virtual void setEraseColor(const TQColor &);
const TQPixmap *erasePixmap() const; const TQPixmap *erasePixmap() const;
virtual void setErasePixmap(const TQPixmap &); virtual void setErasePixmap(const TQPixmap &);
%End
const TQColorGroup &colorGroup() const; const TQColorGroup &colorGroup() const;
const TQPalette &palette() const; const TQPalette &palette() const;
%If (TQt_2_2_0 -)
bool ownPalette() const; bool ownPalette() const;
%End
virtual void setPalette(const TQPalette &); virtual void setPalette(const TQPalette &);
%If (TQt_2_1_0 -)
void unsetPalette(); void unsetPalette();
%End
%If (TQt_3_0_0 -)
const TQColor &paletteForegroundColor() const; const TQColor &paletteForegroundColor() const;
void setPaletteForegroundColor(const TQColor &); void setPaletteForegroundColor(const TQColor &);
@ -150,38 +133,18 @@ public:
virtual void setPaletteBackgroundPixmap(const TQPixmap &); virtual void setPaletteBackgroundPixmap(const TQPixmap &);
const TQBrush &backgroundBrush() const; const TQBrush &backgroundBrush() const;
%End
%If (TQt_2_2_0 -)
bool ownFont() const; bool ownFont() const;
%End
virtual void setFont(const TQFont &); virtual void setFont(const TQFont &);
TQFontMetrics fontMetrics() const; TQFontMetrics fontMetrics() const;
TQFontInfo fontInfo() const; TQFontInfo fontInfo() const;
%If (- TQt_3_0_0)
enum PropagationMode
{
NoChildren,
AllChildren,
SameFont,
SamePalette = SameFont
};
PropagationMode fontPropagation() const;
PropagationMode palettePropagation() const;
%End
const TQCursor &cursor() const; const TQCursor &cursor() const;
%If (TQt_2_2_0 -)
bool ownCursor() const; bool ownCursor() const;
%End
virtual void setCursor(const TQCursor &); virtual void setCursor(const TQCursor &);
const TQPixmap *icon() const; const TQPixmap *icon() const;
bool hasMouseTracking() const; bool hasMouseTracking() const;
%If (TQt_3_0_0 -)
bool hasMouse() const; bool hasMouse() const;
%End
void clearMask(); void clearMask();
bool isActiveWindow() const; bool isActiveWindow() const;
@ -191,10 +154,8 @@ public:
static void setTabOrder(TQWidget *,TQWidget *); static void setTabOrder(TQWidget *,TQWidget *);
TQWidget *focusProxy() const; TQWidget *focusProxy() const;
%If (TQt_3_2_0 -)
void setInputMethodEnabled(bool); void setInputMethodEnabled(bool);
bool isInputMethodEnabled() const; bool isInputMethodEnabled() const;
%End
void grabMouse(); void grabMouse();
void grabMouse(const TQCursor &); void grabMouse(const TQCursor &);
@ -208,95 +169,27 @@ public:
bool isVisibleTo(TQWidget *) const; bool isVisibleTo(TQWidget *) const;
bool isVisibleToTLW() const; bool isVisibleToTLW() const;
virtual TQSize sizeHint() const; virtual TQSize sizeHint() const;
%If (- TQt_3_1_0)
virtual void adjustSize();
%End
void erase(); void erase();
void erase(int,int,int,int); void erase(int,int,int,int);
void erase(const TQRect &); void erase(const TQRect &);
void scroll(int,int); void scroll(int,int);
TQWidget *focusWidget() const; TQWidget *focusWidget() const;
bool acceptDrops() const; bool acceptDrops() const;
%If (- TQt_3_0_0)
TQWidget *parentWidget() const;
bool testWFlags(WFlags) const;
%End
%If (TQt_3_0_0 -)
TQWidget *parentWidget(bool = 0) const; TQWidget *parentWidget(bool = 0) const;
WState testWState(WState) const; WState testWState(WState) const;
WFlags testWFlags(WFlags) const; WFlags testWFlags(WFlags) const;
%End
static TQWidget *find(WId); static TQWidget *find(WId);
%If (TQt_3_0_0 -)
TQWidget *childAt(int,int,bool = 0) const; TQWidget *childAt(int,int,bool = 0) const;
TQWidget *childAt(const TQPoint &,bool = 0) const; TQWidget *childAt(const TQPoint &,bool = 0) const;
%End
%If (TQt_3_3_0 -)
void setWindowOpacity(double); void setWindowOpacity(double);
double windowOpacity() const; double windowOpacity() const;
%End
%If (- TQt_2_00)
GUIStyle style() const;
virtual void setStyle(GUIStyle);
const TQRect &frameGeometry() const;
void setMinimumSize(int,int);
void setMaximumSize(int,int);
void setSizeIncrement(int,int);
enum BackgroundMode
{
FixedColor,
FixedPixmap,
NoBackground,
PaletteForeground,
PaletteBackground,
PaletteLight,
PaletteMidlight,
PaletteDark,
PaletteMid,
PaletteText,
PaletteBase
};
void setBackgroundMode(BackgroundMode);
const TQFont &font() const;
void setFontPropagation(PropagationMode);
void setPalettePropagation(PropagationMode);
const char *caption() const;
const char *iconText() const;
void setMask(TQBitmap);
void setMask(const TQRegion &);
enum FocusPolicy
{
NoFocus = 0,
TabFocus = 1,
ClickFocus = 2,
StrongFocus = 3
};
void setActiveWindow();
void setFocusPolicy(FocusPolicy);
void setFocus();
void clearFocus();
void setFocusProxy(TQWidget *);
virtual bool close(bool = 0);
void recreate(TQWidget *,WFlags,const TQPoint &,bool = 0);
void drawText(int,int,const char *);
void drawText(const TQPoint &,const char *);
void setAcceptDrops(bool);
%End
%If (TQt_2_00 -)
void setName(const char *); void setName(const char *);
TQStyle &style() const; TQStyle &style() const;
void setStyle(TQStyle *); void setStyle(TQStyle *);
%If (TQt_3_0_0 -)
TQStyle *setStyle(const TQString &); TQStyle *setStyle(const TQString &);
%End
TQRect frameGeometry() const; TQRect frameGeometry() const;
TQSize frameSize() const; TQSize frameSize() const;
TQRegion childrenRegion() const; TQRegion childrenRegion() const;
@ -311,62 +204,9 @@ public:
void setBaseSize(const TQSize &); void setBaseSize(const TQSize &);
void setBaseSize(int,int); void setBaseSize(int,int);
%If (- TQt_2_2_0)
enum BackgroundMode
{
FixedColor,
FixedPixmap,
NoBackground,
PaletteForeground,
PaletteButton,
PaletteLight,
PaletteMidlight,
PaletteDark,
PaletteMid,
PaletteText,
PaletteBrightText,
PaletteBase,
PaletteBackground,
PaletteShadow,
PaletteHighlight,
PaletteHighlightedText
};
%End
%If (TQt_2_2_0 - TQt_3_0_0)
enum BackgroundMode
{
FixedColor,
FixedPixmap,
NoBackground,
PaletteForeground,
PaletteButton,
PaletteLight,
PaletteMidlight,
PaletteDark,
PaletteMid,
PaletteText,
PaletteBrightText,
PaletteBase,
PaletteBackground,
PaletteShadow,
PaletteHighlight,
PaletteHighlightedText,
PaletteButtonText,
X11ParentRelative
};
%End
virtual void setBackgroundMode(BackgroundMode); virtual void setBackgroundMode(BackgroundMode);
%If (TQt_3_0_0 -)
void setBackgroundMode(BackgroundMode,BackgroundMode); void setBackgroundMode(BackgroundMode,BackgroundMode);
%End
TQFont font() const; TQFont font() const;
%If (- TQt_3_0_0)
void setPalette(const TQPalette &,bool);
void setFont(const TQFont &,bool);
virtual void setFontPropagation(PropagationMode);
virtual void setPalettePropagation(PropagationMode);
%End
virtual void unsetCursor(); virtual void unsetCursor();
TQString caption() const; TQString caption() const;
TQString iconText() const; TQString iconText() const;
@ -391,35 +231,20 @@ public:
bool isMinimized() const; bool isMinimized() const;
virtual TQSize minimumSizeHint() const; virtual TQSize minimumSizeHint() const;
virtual TQSizePolicy sizePolicy() const; virtual TQSizePolicy sizePolicy() const;
%If (TQt_2_2_0 -)
bool isHidden() const; bool isHidden() const;
bool isMaximized() const; bool isMaximized() const;
%End
%If (TQt_3_1_0 -)
bool isShown() const; bool isShown() const;
bool isFullScreen() const; bool isFullScreen() const;
%End
%If (TQt_3_3_0 -)
uint windowState() const; uint windowState() const;
void setWindowState(uint); void setWindowState(uint);
%End
%If (TQt_3_0_0 -)
virtual void setSizePolicy(TQSizePolicy); virtual void setSizePolicy(TQSizePolicy);
%End
%If (TQt_3_1_0 -)
void setSizePolicy(TQSizePolicy::SizeType,TQSizePolicy::SizeType, void setSizePolicy(TQSizePolicy::SizeType,TQSizePolicy::SizeType,
bool = 0); bool = 0);
%End
%If (TQt_2_2_0 - TQt_3_0_0)
void setSizePolicy(TQSizePolicy);
%End
virtual int heightForWidth(int) const; virtual int heightForWidth(int) const;
%If (TQt_3_2_0 -)
TQRegion clipRegion() const; TQRegion clipRegion() const;
%End
TQLayout *layout() const; TQLayout *layout() const;
void updateGeometry(); void updateGeometry();
@ -440,7 +265,6 @@ public:
Py_END_ALLOW_THREADS Py_END_ALLOW_THREADS
%End %End
%If (TQt_2_1_0 -)
void reparent(TQWidget * /GetWrapper/,const TQPoint &,bool = 0); void reparent(TQWidget * /GetWrapper/,const TQPoint &,bool = 0);
%MethodCode %MethodCode
if (sipCpp -> parent() != a0) if (sipCpp -> parent() != a0)
@ -454,7 +278,6 @@ public:
Py_BEGIN_ALLOW_THREADS Py_BEGIN_ALLOW_THREADS
sipCpp->reparent(a0, *a1, a2); sipCpp->reparent(a0, *a1, a2);
Py_END_ALLOW_THREADS Py_END_ALLOW_THREADS
%End
%End %End
void erase(const TQRegion &); void erase(const TQRegion &);
@ -465,51 +288,26 @@ public:
virtual void setAutoMask(bool); virtual void setAutoMask(bool);
bool autoMask() const; bool autoMask() const;
virtual bool customWhatsThis() const; virtual bool customWhatsThis() const;
%If (- TQt_3_0_0)
bool testWState(uint) const;
%End
%End
%If (TQt_2_1_0 -)
TQRect microFocusHint() const; TQRect microFocusHint() const;
void unsetFont(); void unsetFont();
%End
%If (TQt_2_1_0 -)
enum BackgroundOrigin { enum BackgroundOrigin {
WidgetOrigin, WidgetOrigin,
ParentOrigin, ParentOrigin,
%If (TQt_3_0_0 -)
WindowOrigin, WindowOrigin,
%End
%If (TQt_3_1_0 -)
AncestorOrigin, AncestorOrigin,
%End
}; };
%End
%If (TQt_2_1_0 - TQt_3_0_0)
void setBackgroundOrigin(BackgroundOrigin);
%End
%If (TQt_3_0_0 -)
virtual void setBackgroundOrigin(BackgroundOrigin); virtual void setBackgroundOrigin(BackgroundOrigin);
%End
%If (TQt_2_1_0 -)
BackgroundOrigin backgroundOrigin() const; BackgroundOrigin backgroundOrigin() const;
%End
%If (TQt_3_1_0 -)
TQPoint backgroundOffset() const; TQPoint backgroundOffset() const;
%End
public slots: public slots:
%If (TQt_3_1_0 -)
virtual void adjustSize(); virtual void adjustSize();
%End
virtual void setEnabled(bool); virtual void setEnabled(bool);
%If (TQt_2_2_0 -)
void setDisabled(bool); void setDisabled(bool);
%End
void update(); void update();
void update(int,int,int,int); void update(int,int,int,int);
void update(const TQRect &); void update(const TQRect &);
@ -517,10 +315,8 @@ public slots:
void repaint(const TQRect &,bool = 1); void repaint(const TQRect &,bool = 1);
virtual void show(); virtual void show();
virtual void hide(); virtual void hide();
%If (TQt_3_1_0 -)
void setShown(bool); void setShown(bool);
void setHidden(bool); void setHidden(bool);
%End
void raise() /PyName=raiseW/; void raise() /PyName=raiseW/;
void lower() /PyName=lowerW/; void lower() /PyName=lowerW/;
virtual void move(int,int); virtual void move(int,int);
@ -529,18 +325,6 @@ public slots:
void resize(const TQSize &); void resize(const TQSize &);
virtual void setGeometry(int,int,int,int); virtual void setGeometry(int,int,int,int);
%If (- TQt_2_00)
void setCaption(const char *);
void setIcon(const TQPixmap &);
void setIconText(const char *);
void setMouseTracking(bool);
void setUpdatesEnabled(bool);
void repaint(bool = 1);
void iconify();
void setGeometry(const TQRect &);
%End
%If (TQt_2_00 -)
virtual void setCaption(const TQString &); virtual void setCaption(const TQString &);
virtual void setIcon(const TQPixmap &); virtual void setIcon(const TQPixmap &);
virtual void setIconText(const TQString &); virtual void setIconText(const TQString &);
@ -557,18 +341,13 @@ public slots:
virtual void polish(); virtual void polish();
bool close(); bool close();
virtual void setGeometry(const TQRect &); virtual void setGeometry(const TQRect &);
%End
%If (TQt_2_1_0 -)
void showFullScreen(); void showFullScreen();
void constPolish() const; void constPolish() const;
%End
%If (TQt_3_0_0 -)
// This was added before v3 but I can't be bothered to work out exactly // This was added before v3 but I can't be bothered to work out exactly
// when. // when.
void stackUnder(TQWidget *); void stackUnder(TQWidget *);
%End
protected: protected:
bool event(TQEvent *); bool event(TQEvent *);
@ -586,42 +365,22 @@ protected:
virtual void moveEvent(TQMoveEvent *); virtual void moveEvent(TQMoveEvent *);
virtual void resizeEvent(TQResizeEvent *); virtual void resizeEvent(TQResizeEvent *);
virtual void closeEvent(TQCloseEvent *); virtual void closeEvent(TQCloseEvent *);
%If (TQt_3_0_0 -)
virtual void contextMenuEvent(TQContextMenuEvent *); virtual void contextMenuEvent(TQContextMenuEvent *);
virtual void imStartEvent(TQIMEvent *); virtual void imStartEvent(TQIMEvent *);
virtual void imComposeEvent(TQIMEvent *); virtual void imComposeEvent(TQIMEvent *);
virtual void imEndEvent(TQIMEvent *); virtual void imEndEvent(TQIMEvent *);
virtual void tabletEvent(TQTabletEvent *); virtual void tabletEvent(TQTabletEvent *);
%End
virtual void enabledChange(bool); virtual void enabledChange(bool);
%If (- TQt_3_0_0)
virtual void backgroundColorChange(const TQColor &);
virtual void backgroundPixmapChange(const TQPixmap &);
%End
virtual void paletteChange(const TQPalette &); virtual void paletteChange(const TQPalette &);
virtual void fontChange(const TQFont &); virtual void fontChange(const TQFont &);
%If (TQt_3_0_0 -)
virtual void windowActivationChange(bool); virtual void windowActivationChange(bool);
void resetInputContext(); void resetInputContext();
%End
WFlags getWFlags() const; WFlags getWFlags() const;
void clearWFlags(WFlags); void clearWFlags(WFlags);
virtual bool focusNextPrevChild(bool); virtual bool focusNextPrevChild(bool);
// TQWExtra *extraData(); // TQWExtra *extraData();
// TQFocusData *focusData(); // TQFocusData *focusData();
%If (- TQt_2_00)
virtual void styleChange(GUIStyle);
void create(WId);
void create(WId,bool,bool);
void destroy(bool,bool);
void setWFlags(WFlags);
void setFRect(const TQRect &);
void setCRect(const TQRect &);
void setSizeGrip(bool);
%End
%If (TQt_2_00 -)
virtual void wheelEvent(TQWheelEvent *); virtual void wheelEvent(TQWheelEvent *);
%If (TQt_DRAGANDDROP) %If (TQt_DRAGANDDROP)
virtual void dragEnterEvent(TQDragEnterEvent *); virtual void dragEnterEvent(TQDragEnterEvent *);
@ -631,10 +390,7 @@ protected:
%End %End
virtual void showEvent(TQShowEvent *); virtual void showEvent(TQShowEvent *);
virtual void hideEvent(TQHideEvent *); virtual void hideEvent(TQHideEvent *);
%If (- TQt_3_0_0)
virtual void customEvent(TQCustomEvent *); virtual void customEvent(TQCustomEvent *);
%End
virtual void updateMask(); virtual void updateMask();
@ -646,18 +402,8 @@ protected:
virtual void setWState(uint); virtual void setWState(uint);
void clearWState(uint); void clearWState(uint);
virtual void setWFlags(WFlags); virtual void setWFlags(WFlags);
%If (- TQt_3_0_0)
virtual void setFRect(const TQRect &);
virtual void setCRect(const TQRect &);
%End
virtual void setKeyCompression(bool); virtual void setKeyCompression(bool);
%If (- TQt_3_0_0)
virtual void setMicroFocusHint(int,int,int,int,bool = 1);
%End
%If (TQt_3_0_0 -)
virtual void setMicroFocusHint(int,int,int,int,bool = 1,TQFont * = 0); virtual void setMicroFocusHint(int,int,int,int,bool = 1,TQFont * = 0);
%End
%End
private: private:
TQWidget(const TQWidget &); TQWidget(const TQWidget &);

@ -37,25 +37,16 @@ class TQWidgetStack : TQFrame
public: public:
TQWidgetStack(TQWidget * /TransferThis/ = 0,const char * = 0); TQWidgetStack(TQWidget * /TransferThis/ = 0,const char * = 0);
%If (TQt_3_1_0 -)
TQWidgetStack(TQWidget * /TransferThis/,const char *,WFlags); TQWidgetStack(TQWidget * /TransferThis/,const char *,WFlags);
%End
// The TQWidget has it's parent changed to be `this' so it will be // The TQWidget has it's parent changed to be `this' so it will be
// deleted automatically when `this' is deleted. It stays this way // deleted automatically when `this' is deleted. It stays this way
// even if removeWidget() is called, so it isn't transferred back. // even if removeWidget() is called, so it isn't transferred back.
%If (- TQt_3_0_0)
void addWidget(TQWidget * /Transfer/,int);
%End
%If (TQt_3_0_0 -)
int addWidget(TQWidget * /Transfer/,int = -1); int addWidget(TQWidget * /Transfer/,int = -1);
%End
void removeWidget(TQWidget *); void removeWidget(TQWidget *);
%If (TQt_2_00 -)
TQSize sizeHint() const; TQSize sizeHint() const;
TQSize minimumSizeHint() const; TQSize minimumSizeHint() const;
%End
void show(); void show();
TQWidget *widget(int) const; TQWidget *widget(int) const;
@ -63,13 +54,7 @@ public:
TQWidget *visibleWidget() const; TQWidget *visibleWidget() const;
%If (TQt_2_00 -)
void setFrameRect(const TQRect &); void setFrameRect(const TQRect &);
%End
%If (- TQt_2_00)
bool event(TQEvent *);
%End
signals: signals:
void aboutToShow(int); void aboutToShow(int);
@ -81,18 +66,11 @@ public slots:
protected: protected:
void frameChanged(); void frameChanged();
%If (- TQt_2_00)
void setChildGeometries();
%End
%If (TQt_2_00 -)
void resizeEvent(TQResizeEvent *); void resizeEvent(TQResizeEvent *);
virtual void setChildGeometries(); virtual void setChildGeometries();
void childEvent(TQChildEvent *); void childEvent(TQChildEvent *);
%End
private: private:
%If (TQt_2_1_0 -)
TQWidgetStack(const TQWidgetStack &); TQWidgetStack(const TQWidgetStack &);
%End
}; };

@ -1,47 +0,0 @@
// This is the SIP interface definition for TQWindow.
//
// 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.
%ExportedDoc
<Sect2><Title>TQWindow</Title>
<Para>
<Literal>TQWindow</Literal> is fully implemented (TQt v1.x).
</Para>
</Sect2>
%End
%If (- TQt_2_00)
class TQWindow : TQWidget
{
%TypeHeaderCode
#include <tqwindow.h>
%End
public:
TQWindow(TQWidget * = 0,const char * = 0,WFlags = 0);
private:
TQWindow(const TQWindow &);
};
%End

@ -40,141 +40,12 @@ All constant values defined by TQt have equivalent constants defined to Python.
%OptionalInclude qwindowdefs_x11.sip %OptionalInclude qwindowdefs_x11.sip
%If (- TQt_2_00)
typedef short TQCOORD;
const int TQCOORD_MIN;
const int TQCOORD_MAX;
%End
%If (TQt_2_00 -)
typedef TQ_INT32 TQCOORD; typedef TQ_INT32 TQCOORD;
const TQCOORD TQCOORD_MIN; const TQCOORD TQCOORD_MIN;
const TQCOORD TQCOORD_MAX; const TQCOORD TQCOORD_MAX;
%End
typedef unsigned TQRgb; typedef unsigned TQRgb;
%If (- TQt_3_0_0)
char *tqAppName();
%End
%If (TQt_3_0_0 -)
const char *tqAppName(); const char *tqAppName();
%End
%If (- TQt_2_00)
enum GUIStyle {
MacStyle,
WindowsStyle,
Win3Style,
PMStyle,
MotifStyle
};
// Widget state flags.
typedef uint WFlags;
const uint WState_Created;
const uint WState_Disabled;
const uint WState_Visible;
const uint WState_DoHide;
const uint WState_ClickToFocus;
const uint WState_TrackMouse;
const uint WState_BlockUpdates;
const uint WState_PaintEvent;
// Widget type flags.
const uint WType_TopLevel;
const uint WType_Modal;
const uint WType_Popup;
const uint WType_Desktop;
// Window style flags.
const uint WStyle_Customize;
const uint WStyle_NormalBorder;
const uint WStyle_DialogBorder;
const uint WStyle_NoBorder;
const uint WStyle_Title;
const uint WStyle_SysMenu;
const uint WStyle_Minimize;
const uint WStyle_Maximize;
const uint WStyle_MinMax;
const uint WStyle_Tool;
const uint WStyle_Mask;
// Miscellaneous widget flags.
const uint WCursorSet;
const uint WDestructiveClose;
const uint WPaintDesktop;
const uint WPaintUnclipped;
const uint WPaintClever;
const uint WConfigPending;
const uint WResizeNoErase;
const uint WRecreated;
const uint WExportFontMetrics;
const uint WExportFontInfo;
const uint WFocusSet;
const uint WState_TabToFocus;
enum RasterOp {
CopyROP,
OrROP,
XorROP,
EraseROP,
NotCopyROP,
NotOrROP,
NotXorROP,
NotEraseROP,
NotROP
};
// Text alignment flags.
const int AlignLeft;
const int AlignRight;
const int AlignHCenter;
const int AlignTop;
const int AlignBottom;
const int AlignVCenter;
const int AlignCenter;
// Miscellaneous text flags.
const int SingleLine;
const int DontClip;
const int ExpandTabs;
const int ShowPrefix;
const int WordBreak;
const int GrayText;
// Image conversion flags.
const int ColorMode_Mask;
const int AutoColor;
const int ColorOnly;
const int MonoOnly;
const int AlphaDither_Mask;
const int ThresholdAlphaDither;
const int OrderedAlphaDither;
const int DiffuseAlphaDither;
const int Dither_Mask;
const int DiffuseDither;
const int OrderedDither;
const int ThresholdDither;
const int DitherMode_Mask;
const int AutoDither;
const int PreferDither;
const int AvoidDither;
%End

@ -23,26 +23,15 @@
%If (WS_X11) %If (WS_X11)
%If (- TQt_3_0_0)
typedef unsigned HANDLE;
typedef unsigned WId;
%End
%If (TQt_3_0_0 -)
typedef unsigned long WId; typedef unsigned long WId;
%End
typedef void Display; typedef void Display;
Display *tqt_xdisplay(); Display *tqt_xdisplay();
int tqt_xscreen(); int tqt_xscreen();
WId tqt_xrootwin(); WId tqt_xrootwin();
%If (TQt_3_1_0 -)
WId tqt_xrootwin(int); WId tqt_xrootwin(int);
%End
%If (TQt_3_3_0 -)
const char *tqAppClass(); const char *tqAppClass();
%End
%End %End

@ -64,7 +64,6 @@ This takes only the <Literal>t</Literal> parameter and returns a tuple of the
%If (TQt_STYLE_WINDOWS) %If (TQt_STYLE_WINDOWS)
%If (TQt_2_00 -)
class TQWindowsStyle : TQCommonStyle class TQWindowsStyle : TQCommonStyle
{ {
@ -75,7 +74,6 @@ class TQWindowsStyle : TQCommonStyle
public: public:
TQWindowsStyle(); TQWindowsStyle();
%If (TQt_3_3_0 -)
void applicationPolish(const TQStyleControlElementData&, ControlElementFlags, void *); void applicationPolish(const TQStyleControlElementData&, ControlElementFlags, void *);
void applicationUnPolish(const TQStyleControlElementData&, ControlElementFlags, void *); void applicationUnPolish(const TQStyleControlElementData&, ControlElementFlags, void *);
@ -85,64 +83,7 @@ public:
void polish( TQPalette & ); void polish( TQPalette & );
virtual void polishPopupMenu( const TQStyleControlElementData&, ControlElementFlags, void * ); virtual void polishPopupMenu( const TQStyleControlElementData&, ControlElementFlags, void * );
%End
%If (- TQt_3_0_0)
void drawButton(TQPainter *,int,int,int,int,const TQColorGroup &,
bool = 0,const TQBrush * = 0);
void drawBevelButton(TQPainter *,int,int,int,int,const TQColorGroup &,
bool = 0,const TQBrush * = 0);
void drawFocusRect(TQPainter *,const TQRect &,const TQColorGroup &,
const TQColor * = 0,bool = 0);
void drawPushButton(TQPushButton *,TQPainter *);
void getButtonShift(int &,int &);
void drawPanel(TQPainter *,int,int,int,int,const TQColorGroup &,
bool = 0,int = 1,const TQBrush * = 0);
void drawPopupPanel(TQPainter *,int,int,int,int,const TQColorGroup &,
int = 2,const TQBrush * = 0);
void drawArrow(TQPainter *,ArrowType,bool,int,int,int,int,
const TQColorGroup &,bool,const TQBrush * = 0);
TQSize indicatorSize() const;
void drawIndicator(TQPainter *,int,int,int,int,const TQColorGroup &,
int,bool = 0,bool = 1);
TQSize exclusiveIndicatorSize() const;
void drawExclusiveIndicator(TQPainter *,int,int,int,int,
const TQColorGroup &,bool,bool = 0,bool = 1);
void drawExclusiveIndicatorMask(TQPainter *,int,int,int,int,bool);
void drawComboButton(TQPainter *,int,int,int,int,const TQColorGroup &,
bool = 0,bool = 0,bool = 1,const TQBrush * = 0);
TQRect comboButtonRect(int,int,int,int);
TQRect comboButtonFocusRect(int,int,int,int);
void tabbarMetrics(const TQTabBar *,int &,int &,int &);
void drawTab(TQPainter *,const TQTabBar *,TQTab *,bool);
void drawTabMask(TQPainter *,const TQTabBar *,TQTab *,bool);
void scrollBarMetrics(const TQScrollBar *,int &,int &,int &,int &);
void drawScrollBarControls(TQPainter *,const TQScrollBar *,int,uint,uint);
int sliderLength() const;
void drawSlider(TQPainter *,int,int,int,int,const TQColorGroup &,
Orientation,bool,bool);
void drawSliderMask(TQPainter *,int,int,int,int,Orientation,bool,bool);
void drawSliderGroove(TQPainter *,int,int,int,int,const TQColorGroup &,
TQCOORD,Orientation);
int maximumSliderDragDistance() const;
int splitterWidth() const;
void drawSplitter(TQPainter *,int,int,int,int,const TQColorGroup &,
Orientation);
void drawCheckMark(TQPainter *,int,int,int,int,const TQColorGroup &,bool,
bool);
void polishPopupMenu(TQPopupMenu *);
int extraPopupMenuItemWidth(bool,int,TQMenuItem *,const TQFontMetrics &);
int popupMenuItemHeight(bool,TQMenuItem *,const TQFontMetrics &);
void drawPopupMenuItem(TQPainter *,bool,int,int,TQMenuItem *,
const TQPalette &,bool,bool,int,int,int,int);
%End
%If (TQt_3_0_0 -)
void drawPrimitive(PrimitiveElement,TQPainter *,const TQStyleControlElementData&,ControlElementFlags,const TQRect &, void drawPrimitive(PrimitiveElement,TQPainter *,const TQStyleControlElementData&,ControlElementFlags,const TQRect &,
const TQColorGroup &,SFlags = Style_Default, const TQColorGroup &,SFlags = Style_Default,
const TQStyleOption & = TQStyleOption()) const; const TQStyleOption & = TQStyleOption()) const;
@ -169,24 +110,11 @@ public:
TQPixmap stylePixmap(StylePixmap,const TQStyleControlElementData&,ControlElementFlags, TQPixmap stylePixmap(StylePixmap,const TQStyleControlElementData&,ControlElementFlags,
const TQStyleOption & = TQStyleOption(), const TQWidget * = 0) const; const TQStyleOption & = TQStyleOption(), const TQWidget * = 0) const;
%End
%If (TQt_3_1_0 -)
TQRect subRect(SubRect,const TQStyleControlElementData&, const ControlElementFlags,const TQWidget *) const; TQRect subRect(SubRect,const TQStyleControlElementData&, const ControlElementFlags,const TQWidget *) const;
%End
protected:
%If (- TQt_3_0_0)
void drawWinShades(TQPainter *,int,int,int,int,const TQColor &,
const TQColor &,const TQColor &,const TQColor &,
const TQBrush *);
%End
private: private:
%If (TQt_3_0_0 -)
TQWindowsStyle(const TQWindowsStyle &); TQWindowsStyle(const TQWindowsStyle &);
%End
}; };
%End %End
%End

@ -30,7 +30,6 @@
%If (TQt_WIZARD) %If (TQt_WIZARD)
%If (TQt_2_00 -)
class TQWizard : TQDialog class TQWizard : TQDialog
{ {
@ -48,32 +47,22 @@ public:
// The TQWidget is passed to TQWidgetStack::addWidget(). // The TQWidget is passed to TQWidgetStack::addWidget().
virtual void addPage(TQWidget * /Transfer/, const TQString &); virtual void addPage(TQWidget * /Transfer/, const TQString &);
%If (TQt_3_0_0 -)
// The TQWidget is passed to TQWidgetStack::addWidget(). // The TQWidget is passed to TQWidgetStack::addWidget().
virtual void insertPage(TQWidget * /Transfer/, const TQString &,int); virtual void insertPage(TQWidget * /Transfer/, const TQString &,int);
%End
virtual void removePage(TQWidget *); virtual void removePage(TQWidget *);
TQString title(TQWidget *) const; TQString title(TQWidget *) const;
%If (TQt_2_2_0 -)
void setTitle(TQWidget *,const TQString &); void setTitle(TQWidget *,const TQString &);
%End
%If (TQt_3_0_0 -)
TQFont titleFont() const; TQFont titleFont() const;
void setTitleFont(const TQFont &); void setTitleFont(const TQFont &);
%End
virtual void showPage(TQWidget *); virtual void showPage(TQWidget *);
TQWidget *currentPage() const; TQWidget *currentPage() const;
%If (TQt_2_1_0 -)
TQWidget *page(int) const; TQWidget *page(int) const;
int pageCount() const; int pageCount() const;
%End
%If (TQt_3_0_0 -)
int indexOf(TQWidget *) const; int indexOf(TQWidget *) const;
%End
virtual bool appropriate(TQWidget *) const; virtual bool appropriate(TQWidget *) const;
virtual void setAppropriate(TQWidget *,bool); virtual void setAppropriate(TQWidget *,bool);
@ -93,10 +82,6 @@ public slots:
virtual void setHelpEnabled(TQWidget *,bool); virtual void setHelpEnabled(TQWidget *,bool);
%If (- TQt_3_0_0)
virtual void setFinish(TQWidget *,bool);
%End
protected slots: protected slots:
virtual void back(); virtual void back();
virtual void next(); virtual void next();
@ -104,19 +89,14 @@ protected slots:
signals: signals:
void helpClicked(); void helpClicked();
%If (TQt_2_2_0 -)
void selected(const TQString &); void selected(const TQString &);
%End
protected: protected:
virtual void layOutButtonRow(TQHBoxLayout *); virtual void layOutButtonRow(TQHBoxLayout *);
virtual void layOutTitleRow(TQHBoxLayout *,const TQString &); virtual void layOutTitleRow(TQHBoxLayout *,const TQString &);
private: private:
%If (TQt_2_1_0 -)
TQWizard(const TQWizard &); TQWizard(const TQWizard &);
%End
}; };
%End %End
%End

@ -86,37 +86,24 @@ class TQWMatrix
public: public:
TQWMatrix(); TQWMatrix();
%If (- TQt_2_00)
TQWMatrix(float,float,float,float,float,float);
%End
%If (TQt_2_00 -)
TQWMatrix(double,double,double,double,double,double); TQWMatrix(double,double,double,double,double,double);
%End
void map(int /Constrained/,int /Constrained/,int *,int *) const; void map(int /Constrained/,int /Constrained/,int *,int *) const;
%If (TQt_3_0_0 -)
TQRect mapRect(const TQRect &) const; TQRect mapRect(const TQRect &) const;
%End
TQPoint map(const TQPoint &) const; TQPoint map(const TQPoint &) const;
TQRect map(const TQRect &); const TQRect map(const TQRect &); const
TQPointArray map(const TQPointArray &) const; TQPointArray map(const TQPointArray &) const;
%If (TQt_3_1_0 -)
TQRegion map(const TQRegion &) const; TQRegion map(const TQRegion &) const;
TQRegion mapToRegion(const TQRect &) const; TQRegion mapToRegion(const TQRect &) const;
TQPointArray mapToPolygon(const TQRect &) const; TQPointArray mapToPolygon(const TQRect &) const;
%End
void reset(); void reset();
%If (TQt_3_0_0 -)
bool isIdentity() const; bool isIdentity() const;
bool isInvertible() const; bool isInvertible() const;
%End
%If (TQt_3_1_0 -)
double det() const; double det() const;
%End
TQWMatrix invert(bool * = 0) const; TQWMatrix invert(bool * = 0) const;
@ -124,15 +111,12 @@ public:
bool operator!=(const TQWMatrix &) const; bool operator!=(const TQWMatrix &) const;
TQWMatrix &operator*=(const TQWMatrix &); TQWMatrix &operator*=(const TQWMatrix &);
%If (TQt_3_0_0 -)
// These aren't documented but are used in TQt examples. // These aren't documented but are used in TQt examples.
TQPoint operator*(const TQPoint &) const; TQPoint operator*(const TQPoint &) const;
TQRegion operator*(const TQRect &) const; TQRegion operator*(const TQRect &) const;
TQRegion operator*(const TQRegion &) const; TQRegion operator*(const TQRegion &) const;
TQPointArray operator*(const TQPointArray &) const; TQPointArray operator*(const TQPointArray &) const;
%End
%If (TQt_3_1_0 -)
enum TransformationMode { enum TransformationMode {
Points, Points,
Areas Areas
@ -140,26 +124,7 @@ public:
static void setTransformationMode(TransformationMode); static void setTransformationMode(TransformationMode);
static TransformationMode transformationMode(); static TransformationMode transformationMode();
%End
%If (- TQt_2_00)
void setMatrix(float,float,float,float,float,float);
float m11();
float m12();
float m21();
float m22();
float dx();
float dy();
void map(float,float,float *,float *) const;
TQWMatrix &translate(float,float);
TQWMatrix &scale(float,float);
TQWMatrix &shear(float,float);
TQWMatrix &rotate(float);
%End
%If (TQt_2_00 -)
void setMatrix(double,double,double,double,double,double); void setMatrix(double,double,double,double,double,double);
double m11(); double m11();
double m12(); double m12();
@ -174,5 +139,4 @@ public:
TQWMatrix &scale(double,double); TQWMatrix &scale(double,double);
TQWMatrix &shear(double,double); TQWMatrix &shear(double,double);
TQWMatrix &rotate(double); TQWMatrix &rotate(double);
%End
}; };

@ -29,7 +29,6 @@
%End %End
%If (TQt_2_1_0 -)
%If (TQt_WORKSPACE) %If (TQt_WORKSPACE)
class TQWorkspace : TQWidget class TQWorkspace : TQWidget
@ -41,31 +40,22 @@ class TQWorkspace : TQWidget
public: public:
TQWorkspace(TQWidget * /TransferThis/ = 0,const char * = 0); TQWorkspace(TQWidget * /TransferThis/ = 0,const char * = 0);
%If (TQt_3_2_0 -)
enum WindowOrder { enum WindowOrder {
CreationOrder, CreationOrder,
StackingOrder StackingOrder
}; };
%End
TQWidget *activeWindow() const; TQWidget *activeWindow() const;
TQWidgetList windowList() const; TQWidgetList windowList() const;
%If (TQt_3_2_0 -)
TQWidgetList windowList(WindowOrder) const; TQWidgetList windowList(WindowOrder) const;
%End
%If (- TQt_3_0_0)
TQSizePolicy sizePolicy() const;
%End
TQSize sizeHint() const; TQSize sizeHint() const;
%If (TQt_3_0_0 -)
bool scrollBarsEnabled() const; bool scrollBarsEnabled() const;
void setScrollBarsEnabled(bool); void setScrollBarsEnabled(bool);
void setPaletteBackgroundColor(const TQColor &); void setPaletteBackgroundColor(const TQColor &);
void setPaletteBackgroundPixmap(const TQPixmap &); void setPaletteBackgroundPixmap(const TQPixmap &);
%End
signals: signals:
void windowActivated(TQWidget *); void windowActivated(TQWidget *);
@ -73,29 +63,22 @@ signals:
public slots: public slots:
void cascade(); void cascade();
void tile(); void tile();
%If (TQt_3_2_0 -)
void closeActiveWindow(); void closeActiveWindow();
void closeAllWindows(); void closeAllWindows();
void activateNextWindow(); void activateNextWindow();
void activatePrevWindow(); void activatePrevWindow();
%End
protected: protected:
%If (TQt_3_0_0 -)
void styleChange(TQStyle &); void styleChange(TQStyle &);
%End
void childEvent(TQChildEvent *); void childEvent(TQChildEvent *);
void resizeEvent(TQResizeEvent *); void resizeEvent(TQResizeEvent *);
bool eventFilter(TQObject *,TQEvent *); bool eventFilter(TQObject *,TQEvent *);
void showEvent(TQShowEvent *); void showEvent(TQShowEvent *);
%If (TQt_3_0_0 -)
void hideEvent(TQHideEvent *); void hideEvent(TQHideEvent *);
void wheelEvent(TQWheelEvent *); void wheelEvent(TQWheelEvent *);
%End
private: private:
TQWorkspace(const TQWorkspace &); TQWorkspace(const TQWorkspace &);
}; };
%End %End
%End

@ -129,8 +129,6 @@ The <Literal>pixmaps</Literal> argument is a Python list of TQPixmap instances.
%End %End
%If (TQt_2_2_0 -)
%MappedType TQCanvasItemList %MappedType TQCanvasItemList
{ {
%TypeHeaderCode %TypeHeaderCode
@ -229,11 +227,9 @@ public:
sipClass = sipClass_TQCanvasLine; sipClass = sipClass_TQCanvasLine;
break; break;
#if TQT_VERSION >= 0x030000
case 8: case 8:
sipClass = sipClass_TQCanvasSpline; sipClass = sipClass_TQCanvasSpline;
break; break;
#endif
default: default:
sipClass = 0; sipClass = 0;
@ -286,35 +282,14 @@ public:
void hide(); void hide();
virtual void setVisible(bool); virtual void setVisible(bool);
%If (- TQt_3_0_0)
bool visible() const;
%End
%If (TQt_3_0_0 -)
bool isVisible() const; bool isVisible() const;
%End
virtual void setSelected(bool); virtual void setSelected(bool);
%If (- TQt_3_0_0)
bool selected() const;
%End
%If (TQt_3_0_0 -)
bool isSelected() const; bool isSelected() const;
%End
virtual void setEnabled(bool); virtual void setEnabled(bool);
%If (- TQt_3_0_0)
bool enabled() const;
%End
%If (TQt_3_0_0 -)
bool isEnabled() const; bool isEnabled() const;
%End
virtual void setActive(bool); virtual void setActive(bool);
%If (- TQt_3_0_0)
bool active() const;
%End
%If (TQt_3_0_0 -)
bool isActive() const; bool isActive() const;
%End
%If (TQt_3_0_0 -)
enum RttiValues { enum RttiValues {
Rtti_Item, Rtti_Item,
Rtti_Sprite, Rtti_Sprite,
@ -326,7 +301,6 @@ public:
Rtti_Line, Rtti_Line,
Rtti_Spline Rtti_Spline
}; };
%End
virtual int rtti() const; virtual int rtti() const;
@ -336,9 +310,7 @@ public:
TQCanvas *canvas() const; TQCanvas *canvas() const;
protected: protected:
%If (TQt_3_0_0 -)
void update(); void update();
%End
private: private:
virtual bool collidesWith(const TQCanvasSprite *, virtual bool collidesWith(const TQCanvasSprite *,
@ -409,9 +381,7 @@ public:
int width() const; int width() const;
int height() const; int height() const;
TQSize size() const; TQSize size() const;
%If (TQt_3_0_0 -)
TQRect rect() const; TQRect rect() const;
%End
bool onCanvas(int,int) const; bool onCanvas(int,int) const;
bool onCanvas(const TQPoint &) const; bool onCanvas(const TQPoint &) const;
bool validChunk(int,int) const; bool validChunk(int,int) const;
@ -427,9 +397,7 @@ public:
// virtual void setChangedChunkContaining(int,int); // virtual void setChangedChunkContaining(int,int);
virtual void setAllChanged(); virtual void setAllChanged();
virtual void setChanged(const TQRect &); virtual void setChanged(const TQRect &);
%If (TQt_3_0_0 -)
virtual void setUnchanged(const TQRect &); virtual void setUnchanged(const TQRect &);
%End
TQCanvasItemList allItems(); TQCanvasItemList allItems();
TQCanvasItemList collisions(const TQPoint &) const; TQCanvasItemList collisions(const TQPoint &) const;
@ -437,9 +405,7 @@ public:
TQCanvasItemList collisions(const TQPointArray &,const TQCanvasItem *, TQCanvasItemList collisions(const TQPointArray &,const TQCanvasItem *,
bool) const; bool) const;
%If (TQt_3_0_0 -)
void drawArea(const TQRect &,TQPainter *,bool = 0); void drawArea(const TQRect &,TQPainter *,bool = 0);
%End
virtual void setAdvancePeriod(int); virtual void setAdvancePeriod(int);
virtual void setUpdatePeriod(int); virtual void setUpdatePeriod(int);
@ -458,9 +424,7 @@ protected:
virtual void drawForeground(TQPainter &,const TQRect &); virtual void drawForeground(TQPainter &,const TQRect &);
private: private:
%If (TQt_3_1_0 -)
TQCanvas(const TQCanvas &); TQCanvas(const TQCanvas &);
%End
}; };
@ -471,33 +435,23 @@ class TQCanvasView : TQScrollView
%End %End
public: public:
%If (- TQt_3_0_0)
TQCanvasView(TQCanvas * = 0,TQWidget * /TransferThis/ = 0,
const char * = 0,WFlags = 0);
%End
%If (TQt_3_0_0 -)
TQCanvasView(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0); TQCanvasView(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0);
TQCanvasView(TQCanvas *,TQWidget * /TransferThis/ = 0,const char * = 0, TQCanvasView(TQCanvas *,TQWidget * /TransferThis/ = 0,const char * = 0,
WFlags = 0); WFlags = 0);
%End
TQCanvas* canvas() const; TQCanvas* canvas() const;
void setCanvas(TQCanvas *); void setCanvas(TQCanvas *);
%If (TQt_3_0_0 -)
const TQWMatrix &worldMatrix() const; const TQWMatrix &worldMatrix() const;
const TQWMatrix &inverseWorldMatrix() const; const TQWMatrix &inverseWorldMatrix() const;
bool setWorldMatrix(const TQWMatrix &); bool setWorldMatrix(const TQWMatrix &);
%End
protected: protected:
void drawContents(TQPainter *,int,int,int,int); void drawContents(TQPainter *,int,int,int,int);
TQSize sizeHint() const; TQSize sizeHint() const;
private: private:
%If (TQt_3_1_0 -)
TQCanvasView(const TQCanvasView &); TQCanvasView(const TQCanvasView &);
%End
}; };
@ -510,21 +464,14 @@ class TQCanvasPixmap : TQPixmap
public: public:
TQCanvasPixmap(const TQString &); TQCanvasPixmap(const TQString &);
TQCanvasPixmap(const TQImage &); TQCanvasPixmap(const TQImage &);
%If (- TQt_3_0_0)
TQCanvasPixmap(const TQPixmap &,TQPoint);
%End
%If (TQt_3_0_0 -)
TQCanvasPixmap(const TQPixmap &,const TQPoint &); TQCanvasPixmap(const TQPixmap &,const TQPoint &);
%End
int offsetX() const; int offsetX() const;
int offsetY() const; int offsetY() const;
void setOffset(int,int); void setOffset(int,int);
private: private:
%If (TQt_3_1_0 -)
TQCanvasPixmap(const TQCanvasPixmap &); TQCanvasPixmap(const TQCanvasPixmap &);
%End
}; };
@ -537,28 +484,19 @@ class TQCanvasPixmapArray
public: public:
TQCanvasPixmapArray(); TQCanvasPixmapArray();
TQCanvasPixmapArray(const TQString &,int = 0); TQCanvasPixmapArray(const TQString &,int = 0);
%If (- TQt_3_0_0)
TQCanvasPixmapArray(TQPtrList<TQPixmap>,TQPtrList<TQPoint>);
%End
%If (TQt_3_0_0 -)
TQCanvasPixmapArray(TQValueList<TQPixmap>,TQPointArray = TQPointArray()); TQCanvasPixmapArray(TQValueList<TQPixmap>,TQPointArray = TQPointArray());
%End
bool readPixmaps(const TQString &,int = 0) /ReleaseGIL/; bool readPixmaps(const TQString &,int = 0) /ReleaseGIL/;
bool readCollisionMasks(const TQString &) /ReleaseGIL/; bool readCollisionMasks(const TQString &) /ReleaseGIL/;
%If (TQt_3_0_0 -)
bool isValid() const; bool isValid() const;
%End
TQCanvasPixmap *image(int) const; TQCanvasPixmap *image(int) const;
void setImage(int,TQCanvasPixmap * /Transfer/); void setImage(int,TQCanvasPixmap * /Transfer/);
uint count() const; uint count() const;
private: private:
%If (TQt_3_1_0 -)
TQCanvasPixmapArray(const TQCanvasPixmapArray &); TQCanvasPixmapArray(const TQCanvasPixmapArray &);
%End
}; };
@ -577,7 +515,6 @@ public:
virtual void move(double,double,int); virtual void move(double,double,int);
void setFrame(int); void setFrame(int);
%If (TQt_3_0_0 -)
enum FrameAnimationType { enum FrameAnimationType {
Cycle, Cycle,
Oscillate Oscillate
@ -585,22 +522,15 @@ public:
virtual void setFrameAnimation(FrameAnimationType = Cycle,int = 1, virtual void setFrameAnimation(FrameAnimationType = Cycle,int = 1,
int = 0); int = 0);
%End
int frame() const; int frame() const;
int frameCount() const; int frameCount() const;
%If (- TQt_3_0_0)
virtual int rtti() const;
%End
%If (TQt_3_0_0 -)
int rtti() const; int rtti() const;
%End
bool collidesWith(const TQCanvasItem *) const; bool collidesWith(const TQCanvasItem *) const;
TQRect boundingRect() const; TQRect boundingRect() const;
%If (TQt_3_0_0 -)
int width() const; int width() const;
int height() const; int height() const;
@ -621,30 +551,9 @@ public:
void advance(int); void advance(int);
void draw(TQPainter &); void draw(TQPainter &);
%End
protected:
%If (- TQt_3_0_0)
void draw(TQPainter &);
int width() const;
int height() const;
int absX() const;
int absY() const;
int absX2() const;
int absY2() const;
int absX(int) const;
int absY(int) const;
int absX2(int) const;
int absY2(int) const;
TQCanvasPixmap *image() const;
virtual TQCanvasPixmap *imageAdvanced() const;
TQCanvasPixmap *image(int) const;
%End
private: private:
%If (TQt_3_1_0 -)
TQCanvasSprite(const TQCanvasSprite &); TQCanvasSprite(const TQCanvasSprite &);
%End
}; };
@ -678,10 +587,8 @@ protected:
bool winding() const; bool winding() const;
void setWinding(bool); void setWinding(bool);
%If (TQt_3_1_0 -)
void invalidate(); void invalidate();
bool isValid() const; bool isValid() const;
%End
}; };
@ -735,8 +642,6 @@ protected:
}; };
%If (TQt_3_0_0 -)
class TQCanvasSpline : TQCanvasPolygon class TQCanvasSpline : TQCanvasPolygon
{ {
%TypeHeaderCode %TypeHeaderCode
@ -753,8 +658,6 @@ public:
int rtti() const; int rtti() const;
}; };
%End
class TQCanvasLine : TQCanvasPolygonalItem class TQCanvasLine : TQCanvasPolygonalItem
{ {
@ -773,9 +676,7 @@ public:
int rtti() const; int rtti() const;
void setPen(TQPen); void setPen(TQPen);
%If (TQt_3_3_0 -)
void moveBy(double,double); void moveBy(double,double);
%End
protected: protected:
void drawShape(TQPainter &); void drawShape(TQPainter &);
@ -838,20 +739,11 @@ public:
bool collidesWith(const TQCanvasItem *) const; bool collidesWith(const TQCanvasItem *) const;
%If (- TQt_3_0_0)
virtual int rtti() const;
%End
%If (TQt_3_0_0 -)
int rtti() const; int rtti() const;
%End
protected: protected:
virtual void draw(TQPainter &); virtual void draw(TQPainter &);
private: private:
%If (TQt_3_1_0 -)
TQCanvasText(const TQCanvasText &); TQCanvasText(const TQCanvasText &);
%End
}; };
%End

@ -48,8 +48,6 @@
%End %End
%If (TQt_2_00 -)
const int TQGL_VERSION; const int TQGL_VERSION;
const char *TQGL_VERSION_STR; const char *TQGL_VERSION_STR;
@ -140,9 +138,7 @@ class TQGLContext : TQGL
public: public:
TQGLContext(const TQGLFormat &,TQPaintDevice *); TQGLContext(const TQGLFormat &,TQPaintDevice *);
%If (TQt_3_2_0 -)
TQGLContext(const TQGLFormat &); TQGLContext(const TQGLFormat &);
%End
virtual bool create(const TQGLContext * = 0); virtual bool create(const TQGLContext * = 0);
bool isValid() const; bool isValid() const;
@ -150,9 +146,7 @@ public:
virtual void reset(); virtual void reset();
TQGLFormat format() const; TQGLFormat format() const;
%If (TQt_3_0_0 -)
TQGLFormat requestedFormat() const; TQGLFormat requestedFormat() const;
%End
virtual void setFormat(const TQGLFormat &); virtual void setFormat(const TQGLFormat &);
virtual void makeCurrent(); virtual void makeCurrent();
@ -178,15 +172,11 @@ protected:
void setWindowCreated(bool); void setWindowCreated(bool);
bool initialized() const; bool initialized() const;
void setInitialized(bool); void setInitialized(bool);
%If (TQt_3_1_0 -)
void generateFontDisplayLists(const TQFont &,int); void generateFontDisplayLists(const TQFont &,int);
%End
uint colorIndex(const TQColor &) const; uint colorIndex(const TQColor &) const;
%If (TQt_3_2_0 -)
void setValid(bool); void setValid(bool);
void setDevice(TQPaintDevice *); void setDevice(TQPaintDevice *);
%End
private: private:
TQGLContext(); TQGLContext();
@ -203,10 +193,8 @@ class TQGLWidget : TQWidget, TQGL
public: public:
TQGLWidget(TQWidget * /TransferThis/ = 0,const char * = 0, TQGLWidget(TQWidget * /TransferThis/ = 0,const char * = 0,
const TQGLWidget * = 0,WFlags = 0); const TQGLWidget * = 0,WFlags = 0);
%If (TQt_3_2_0 -)
TQGLWidget(TQGLContext * /Transfer/,TQWidget * /TransferThis/ = 0,const char * = 0, TQGLWidget(TQGLContext * /Transfer/,TQWidget * /TransferThis/ = 0,const char * = 0,
const TQGLWidget * = 0,WFlags = 0); const TQGLWidget * = 0,WFlags = 0);
%End
TQGLWidget(const TQGLFormat &,TQWidget * /TransferThis/ = 0, TQGLWidget(const TQGLFormat &,TQWidget * /TransferThis/ = 0,
const char * = 0,const TQGLWidget * = 0,WFlags = 0); const char * = 0,const TQGLWidget * = 0,WFlags = 0);
@ -220,9 +208,7 @@ public:
bool isValid() const; bool isValid() const;
bool isSharing() const; bool isSharing() const;
virtual void makeCurrent(); virtual void makeCurrent();
%If (TQt_3_2_0 -)
void doneCurrent(); void doneCurrent();
%End
bool doubleBuffer() const; bool doubleBuffer() const;
virtual void swapBuffers(); virtual void swapBuffers();
@ -232,9 +218,7 @@ public:
const TQGLContext *context() const; const TQGLContext *context() const;
virtual TQPixmap renderPixmap(int = 0,int = 0,bool = 0); virtual TQPixmap renderPixmap(int = 0,int = 0,bool = 0);
%If (TQt_3_0_0 -)
virtual TQImage grabFrameBuffer(bool = 0); virtual TQImage grabFrameBuffer(bool = 0);
%End
virtual void makeOverlayCurrent(); virtual void makeOverlayCurrent();
const TQGLContext *overlayContext() const; const TQGLContext *overlayContext() const;
@ -243,8 +227,7 @@ public:
void setMouseTracking(bool); void setMouseTracking(bool);
%If (TQt_3_0_0 -) virtual void reparent(TQWidget * /GetWrapper/,WFlags,const TQPoint &,
virtual void reparent(TQWidget * /GetWrapper/,WFlags,const TQPoint &,
bool = 0); bool = 0);
%MethodCode %MethodCode
if (sipCpp -> parent() != a0) if (sipCpp -> parent() != a0)
@ -260,14 +243,11 @@ public:
const TQGLColormap &colormap() const; const TQGLColormap &colormap() const;
void setColormap(const TQGLColormap &); void setColormap(const TQGLColormap &);
%End
%If (TQt_3_1_0 -)
void renderText(int,int,const TQString &,const TQFont & = TQFont(), void renderText(int,int,const TQString &,const TQFont & = TQFont(),
int = 2000); int = 2000);
void renderText(double,double,double,const TQString &, void renderText(double,double,double,const TQString &,
const TQFont & = TQFont(),int = 2000); const TQFont & = TQFont(),int = 2000);
%End
public slots: public slots:
virtual void updateGL(); virtual void updateGL();
@ -294,5 +274,3 @@ protected:
private: private:
TQGLWidget(const TQGLWidget &); TQGLWidget(const TQGLWidget &);
}; };
%End

@ -35,8 +35,6 @@ Not yet implemented.
%End %End
%If (TQt_3_0_0 -)
class TQGLColormap class TQGLColormap
{ {
%TypeHeaderCode %TypeHeaderCode
@ -59,5 +57,3 @@ public:
int find(TQRgb) const; int find(TQRgb) const;
int findNearest(TQRgb) const; int findNearest(TQRgb) const;
}; };
%End

@ -30,7 +30,6 @@
%If (TQt_DNS) %If (TQt_DNS)
%If (TQt_2_2_0 -)
class TQDns : TQObject class TQDns : TQObject
{ {
@ -271,4 +270,3 @@ signals:
}; };
%End %End
%End

@ -37,7 +37,6 @@ This takes a single <Literal>maxlen</Literal> parameter. The
%If (TQt_NETWORKPROTOCOL_FTP) %If (TQt_NETWORKPROTOCOL_FTP)
%If (TQt_2_2_0 -)
class TQFtp : TQNetworkProtocol class TQFtp : TQNetworkProtocol
{ {
@ -47,19 +46,11 @@ class TQFtp : TQNetworkProtocol
public: public:
TQFtp(); TQFtp();
%If (TQt_3_1_0 -)
TQFtp(TQObject * /TransferThis/,const char * = 0); TQFtp(TQObject * /TransferThis/,const char * = 0);
%End
virtual ~TQFtp(); virtual ~TQFtp();
%If (TQt_3_0_0 -)
int supportedOperations() const; int supportedOperations() const;
%End
%If (- TQt_3_0_0)
virtual int supportedOperations() const;
%End
%If (TQt_3_1_0 -)
enum State { enum State {
Unconnected, Unconnected,
HostLookup, HostLookup,
@ -130,7 +121,7 @@ public:
Py_INCREF(Py_None); Py_INCREF(Py_None);
sipRes = Py_None; sipRes = Py_None;
} }
else if ((sipRes = PyString_FromStringAndSize(buf,actlen)) == NULL) else if ((sipRes = SIPBytes_FromStringAndSize(buf,actlen)) == NULL)
sipIsErr = 1; sipIsErr = 1;
sipFree((void *)buf); sipFree((void *)buf);
@ -149,15 +140,11 @@ public:
Error error() const; Error error() const;
TQString errorString() const; TQString errorString() const;
%End
public slots: public slots:
%If (TQt_3_1_0 -)
void abort(); void abort();
%End
signals: signals:
%If (TQt_3_1_0 -)
void stateChanged(int); void stateChanged(int);
void listInfo(const TQUrlInfo &); void listInfo(const TQUrlInfo &);
void readyRead(); void readyRead();
@ -167,7 +154,6 @@ signals:
void commandStarted(int); void commandStarted(int);
void commandFinished(int,bool); void commandFinished(int,bool);
void done(bool); void done(bool);
%End
protected: protected:
void parseDir(const TQString &,TQUrlInfo &); void parseDir(const TQString &,TQUrlInfo &);
@ -183,4 +169,3 @@ private:
}; };
%End %End
%End

@ -57,8 +57,6 @@ Not yet implemented.
%End %End
%If (TQt_2_2_0 -)
class TQHostAddress class TQHostAddress
{ {
%TypeHeaderCode %TypeHeaderCode
@ -69,11 +67,9 @@ public:
TQHostAddress(); TQHostAddress();
TQHostAddress(TQ_UINT32); TQHostAddress(TQ_UINT32);
// TQHostAddress(TQ_UINT8 *); // TQHostAddress(TQ_UINT8 *);
%If (TQt_3_3_0 -)
//TQHostAddress(const Q_IPV6ADDR &); //TQHostAddress(const Q_IPV6ADDR &);
// This isn't mentioned in the documentation. // This isn't mentioned in the documentation.
//TQHostAddress(const TQString &); //TQHostAddress(const TQString &);
%End
TQHostAddress(const TQHostAddress &); TQHostAddress(const TQHostAddress &);
void setAddress(TQ_UINT32); void setAddress(TQ_UINT32);
@ -82,18 +78,12 @@ public:
bool isIp4Addr() const; bool isIp4Addr() const;
TQ_UINT32 ip4Addr() const; TQ_UINT32 ip4Addr() const;
%If (TQt_3_3_0 -)
bool isIPv4Address() const; bool isIPv4Address() const;
TQ_UINT32 toIPv4Address() const; TQ_UINT32 toIPv4Address() const;
bool isIPv6Address() const; bool isIPv6Address() const;
//Q_IPV6ADDR toIPv6Address() const; //Q_IPV6ADDR toIPv6Address() const;
%End
TQString toString() const; TQString toString() const;
%If (TQt_3_2_0 -)
bool isNull() const; bool isNull() const;
%End
}; };
%End

@ -56,7 +56,6 @@ This takes a single <Literal>maxlen</Literal> parameter. The
%If (TQt_NETWORKPROTOCOL_HTTP) %If (TQt_NETWORKPROTOCOL_HTTP)
%If (TQt_3_1_0 -)
class TQHttpHeader class TQHttpHeader
{ {
@ -147,10 +146,6 @@ protected:
bool parseLine(const TQString &,int); bool parseLine(const TQString &,int);
}; };
%End
%If (TQt_3_0_0 -)
class TQHttp : TQNetworkProtocol class TQHttp : TQNetworkProtocol
{ {
@ -160,16 +155,13 @@ class TQHttp : TQNetworkProtocol
public: public:
TQHttp(); TQHttp();
%If (TQt_3_1_0 -)
TQHttp(TQObject * /TransferThis/,const char * = 0); TQHttp(TQObject * /TransferThis/,const char * = 0);
TQHttp(const TQString &,TQ_UINT16 = 80,TQObject * /TransferThis/ = 0, TQHttp(const TQString &,TQ_UINT16 = 80,TQObject * /TransferThis/ = 0,
const char * = 0); const char * = 0);
virtual ~TQHttp(); virtual ~TQHttp();
%End
int supportedOperations() const; int supportedOperations() const;
%If (TQt_3_1_0 -)
enum State { enum State {
Unconnected, Unconnected,
HostLookup, HostLookup,
@ -226,7 +218,7 @@ public:
Py_INCREF(Py_None); Py_INCREF(Py_None);
sipRes = Py_None; sipRes = Py_None;
} }
else if ((sipRes = PyString_FromStringAndSize(buf,actlen)) == NULL) else if ((sipRes = SIPBytes_FromStringAndSize(buf,actlen)) == NULL)
sipIsErr = 1; sipIsErr = 1;
sipFree((void *)buf); sipFree((void *)buf);
@ -246,15 +238,11 @@ public:
Error error() const; Error error() const;
TQString errorString() const; TQString errorString() const;
%End
public slots: public slots:
%If (TQt_3_1_0 -)
void abort(); void abort();
%End
signals: signals:
%If (TQt_3_1_0 -)
void stateChanged(int); void stateChanged(int);
void responseHeaderReceived(const TQHttpResponseHeader &); void responseHeaderReceived(const TQHttpResponseHeader &);
void readyRead(const TQHttpResponseHeader &); void readyRead(const TQHttpResponseHeader &);
@ -264,16 +252,12 @@ signals:
void requestStarted(int); void requestStarted(int);
void requestFinished(int,bool); void requestFinished(int,bool);
void done(bool); void done(bool);
%End
protected: protected:
void operationGet(TQNetworkOperation *); void operationGet(TQNetworkOperation *);
void operationPut(TQNetworkOperation *); void operationPut(TQNetworkOperation *);
%If (TQt_3_1_0 -)
void timerEvent(TQTimerEvent *); void timerEvent(TQTimerEvent *);
%End
}; };
%End %End
%End

@ -30,7 +30,6 @@
%If (TQt_NETWORKPROTOCOL) %If (TQt_NETWORKPROTOCOL)
%If (TQt_2_1_0 -)
class TQLocalFs : TQNetworkProtocol class TQLocalFs : TQNetworkProtocol
{ {
@ -53,4 +52,3 @@ protected:
}; };
%End %End
%End

@ -21,7 +21,6 @@
%If (TQt_NETWORKPROTOCOL) %If (TQt_NETWORKPROTOCOL)
%If (TQt_2_2_0 -)
%ModuleHeaderCode %ModuleHeaderCode
#include <tqglobal.h> #include <tqglobal.h>
@ -31,4 +30,3 @@
void tqInitNetworkProtocols(); void tqInitNetworkProtocols();
%End %End
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_2_2_0 -)
class TQServerSocket : TQObject class TQServerSocket : TQObject
{ {
%TypeHeaderCode %TypeHeaderCode
@ -38,18 +36,10 @@ class TQServerSocket : TQObject
%End %End
public: public:
%If (- TQt_3_0_0)
TQServerSocket(TQ_UINT16,int = 0,TQObject * /TransferThis/ = 0,
const char * = 0);
TQServerSocket(const TQHostAddress &,TQ_UINT16,int = 0,
TQObject * /TransferThis/ = 0,const char * = 0);
%End
%If (TQt_3_0_0 -)
TQServerSocket(TQ_UINT16,int = 1,TQObject * /TransferThis/ = 0, TQServerSocket(TQ_UINT16,int = 1,TQObject * /TransferThis/ = 0,
const char * = 0); const char * = 0);
TQServerSocket(const TQHostAddress &,TQ_UINT16,int = 1, TQServerSocket(const TQHostAddress &,TQ_UINT16,int = 1,
TQObject * /TransferThis/ = 0,const char * = 0); TQObject * /TransferThis/ = 0,const char * = 0);
%End
TQServerSocket(TQObject * /TransferThis/ = 0,const char * = 0); TQServerSocket(TQObject * /TransferThis/ = 0,const char * = 0);
bool ok() const; bool ok() const;
@ -66,5 +56,3 @@ public:
protected: protected:
TQSocketDevice *socketDevice(); TQSocketDevice *socketDevice();
}; };
%End

@ -57,8 +57,6 @@ as a parameter.
%End %End
%If (TQt_2_2_0 -)
class TQSocket : TQObject, TQIODevice class TQSocket : TQObject, TQIODevice
{ {
%TypeHeaderCode %TypeHeaderCode
@ -78,12 +76,7 @@ public:
Idle, Idle,
HostLookup, HostLookup,
Connecting, Connecting,
%If (TQt_3_0_0 -)
Connected, Connected,
%End
%If (- TQt_3_0_0)
Listening,
%End
Closing, Closing,
Connection Connection
}; };
@ -98,11 +91,7 @@ public:
{sipName_TQSocket, &sipClass_TQSocket, -1, 2}, {sipName_TQSocket, &sipClass_TQSocket, -1, 2},
{sipName_TQFtp, &sipClass_TQFtp, -1, 3}, {sipName_TQFtp, &sipClass_TQFtp, -1, 3},
{sipName_TQLocalFs, &sipClass_TQLocalFs, -1, 4}, {sipName_TQLocalFs, &sipClass_TQLocalFs, -1, 4},
#if TQT_VERSION >= 0x030000
{sipName_TQHttp, &sipClass_TQHttp, -1, 5}, {sipName_TQHttp, &sipClass_TQHttp, -1, 5},
#else
{NULL, NULL, -1, 5},
#endif
{sipName_TQDns, &sipClass_TQDns, -1, -1}, {sipName_TQDns, &sipClass_TQDns, -1, -1},
}; };
@ -130,10 +119,8 @@ public:
int socket() const; int socket() const;
virtual void setSocket(int); virtual void setSocket(int);
%If (TQt_3_0_0 -)
TQSocketDevice *socketDevice(); TQSocketDevice *socketDevice();
virtual void setSocketDevice(TQSocketDevice *); virtual void setSocketDevice(TQSocketDevice *);
%End
%If (TQt_DNS) %If (TQt_DNS)
virtual void connectToHost(const TQString &,TQ_UINT16) /ReleaseGIL/; virtual void connectToHost(const TQString &,TQ_UINT16) /ReleaseGIL/;
@ -143,103 +130,17 @@ public:
bool open(int) /ReleaseGIL/; bool open(int) /ReleaseGIL/;
void close() /ReleaseGIL/; void close() /ReleaseGIL/;
void flush() /ReleaseGIL/; void flush() /ReleaseGIL/;
%If (TQt_3_0_0 -)
Offset size() const; Offset size() const;
Offset at() const; Offset at() const;
bool at(Offset); bool at(Offset);
%End
%If (- TQt_3_0_0)
uint size() const;
int at() const;
bool at(int);
%End
bool atEnd() const; bool atEnd() const;
%If (TQt_3_0_0 -)
TQ_ULONG bytesAvailable() const; TQ_ULONG bytesAvailable() const;
TQ_ULONG waitForMore(int) const /ReleaseGIL/; TQ_ULONG waitForMore(int) const /ReleaseGIL/;
//TQ_ULONG waitForMore(int,bool *) const /ReleaseGIL/; //TQ_ULONG waitForMore(int,bool *) const /ReleaseGIL/;
TQ_ULONG bytesToWrite() const; TQ_ULONG bytesToWrite() const;
%End
%If (- TQt_3_0_0)
int bytesAvailable() const;
int waitForMore(int) const /ReleaseGIL/;
int bytesToWrite() const;
%End
%If (TQt_3_1_0 -)
void clearPendingData(); void clearPendingData();
%End
%If (- TQt_3_0_0)
SIP_PYOBJECT readBlock(uint) /ReleaseGIL/ [int (char *,uint)];
%MethodCode
char *buf;
if ((buf = (char *)sipMalloc(a0)) == NULL)
sipIsErr = 1;
else
{
int actlen;
Py_BEGIN_ALLOW_THREADS
actlen = sipSelfWasArg ? sipCpp->TQSocket::readBlock(buf, a0) : sipCpp->readBlock(buf, a0);
Py_END_ALLOW_THREADS
if (actlen < 0)
{
sipFree((void *)buf);
Py_INCREF(Py_None);
sipRes = Py_None;
}
else
{
sipRes = PyString_FromStringAndSize(buf,actlen);
sipFree((void *)buf);
if (sipRes == NULL)
sipIsErr = 1;
}
}
%End
int writeBlock(const char * /Array/,uint /ArraySize/) /ReleaseGIL/;
SIP_PYOBJECT readLine(uint) /ReleaseGIL/ [int (char *,uint)];
%MethodCode
char *buf;
if ((buf = (char *)sipMalloc(a0)) == NULL)
sipIsErr = 1;
else
{
int actlen;
Py_BEGIN_ALLOW_THREADS
actlen = sipCpp -> readLine(buf,a0);
Py_END_ALLOW_THREADS
if (actlen < 0)
{
sipFree((void *)buf);
Py_INCREF(Py_None);
sipRes = Py_None;
}
else
{
sipRes = PyString_FromStringAndSize(buf,actlen);
sipFree((void *)buf);
if (sipRes == NULL)
sipIsErr = 1;
}
}
%End
%End
%If (TQt_3_0_0 -)
SIP_PYOBJECT readBlock(TQ_ULONG) /ReleaseGIL/ [TQ_LONG (char *,TQ_ULONG)]; SIP_PYOBJECT readBlock(TQ_ULONG) /ReleaseGIL/ [TQ_LONG (char *,TQ_ULONG)];
%MethodCode %MethodCode
char *buf; char *buf;
@ -263,7 +164,7 @@ public:
} }
else else
{ {
sipRes = PyString_FromStringAndSize(buf,actlen); sipRes = SIPBytes_FromStringAndSize(buf,actlen);
sipFree((void *)buf); sipFree((void *)buf);
@ -299,7 +200,7 @@ public:
} }
else else
{ {
sipRes = PyString_FromStringAndSize(buf,actlen); sipRes = SIPBytes_FromStringAndSize(buf,actlen);
sipFree((void *)buf); sipFree((void *)buf);
@ -307,7 +208,6 @@ public:
sipIsErr = 1; sipIsErr = 1;
} }
} }
%End
%End %End
int getch() /ReleaseGIL/; int getch() /ReleaseGIL/;
@ -322,10 +222,8 @@ public:
TQHostAddress address() const; TQHostAddress address() const;
TQHostAddress peerAddress() const; TQHostAddress peerAddress() const;
%If (TQt_3_2_0 -)
void setReadBufferSize(TQ_ULONG); void setReadBufferSize(TQ_ULONG);
TQ_ULONG readBufferSize() const; TQ_ULONG readBufferSize() const;
%End
signals: signals:
void hostFound(); void hostFound();
@ -337,12 +235,7 @@ signals:
void error(int); void error(int);
protected: protected:
%If (- TQt_3_0_0)
TQSocketDevice *socketDevice();
%End
private: private:
TQSocket(const TQSocket &); TQSocket(const TQSocket &);
}; };
%End

@ -46,8 +46,6 @@ as a parameter.
%End %End
%If (TQt_2_2_0 -)
class TQSocketDevice : TQIODevice class TQSocketDevice : TQIODevice
{ {
%TypeHeaderCode %TypeHeaderCode
@ -60,25 +58,19 @@ public:
Datagram Datagram
}; };
%If (TQt_3_3_0 -)
enum Protocol { enum Protocol {
IPv4, IPv4,
IPv6, IPv6,
Unknown Unknown
}; };
%End
TQSocketDevice(Type = Stream); TQSocketDevice(Type = Stream);
%If (TQt_3_3_0 -)
TQSocketDevice(Type,Protocol,int); TQSocketDevice(Type,Protocol,int);
%End
TQSocketDevice(int,Type); TQSocketDevice(int,Type);
bool isValid() const; bool isValid() const;
Type type() const; Type type() const;
%If (TQt_3_3_0 -)
Protocol protocol() const; Protocol protocol() const;
%End
int socket() const; int socket() const;
virtual void setSocket(int,Type); virtual void setSocket(int,Type);
@ -87,16 +79,9 @@ public:
void close(); void close();
void flush() /ReleaseGIL/; void flush() /ReleaseGIL/;
%If (- TQt_3_0_0)
uint size() const;
int at() const;
bool at(int);
%End
%If (TQt_3_0_0 -)
Offset size() const; Offset size() const;
Offset at() const; Offset at() const;
bool at(Offset); bool at(Offset);
%End
bool atEnd() const; bool atEnd() const;
bool blocking() const; bool blocking() const;
@ -116,47 +101,9 @@ public:
virtual bool listen(int); virtual bool listen(int);
virtual int accept(); virtual int accept();
%If (- TQt_3_0_0)
int bytesAvailable() const;
int waitForMore(int) const /ReleaseGIL/;
%End
%If (TQt_3_0_0 -)
TQ_LONG bytesAvailable() const; TQ_LONG bytesAvailable() const;
TQ_LONG waitForMore(int) const /ReleaseGIL/; TQ_LONG waitForMore(int) const /ReleaseGIL/;
%End
%If (- TQt_3_0_0)
SIP_PYOBJECT readBlock(uint) /ReleaseGIL/ [int (char *,uint)];
%MethodCode
char *buf;
if ((buf = (char *)sipMalloc(a0)) == NULL)
sipIsErr = 1;
else
{
int actlen;
Py_BEGIN_ALLOW_THREADS
actlen = sipSelfWasArg ? sipCpp->TQSocketDevice::readBlock(buf, a0) : sipCpp->readBlock(buf, a0);
Py_END_ALLOW_THREADS
if (actlen < 0)
{
Py_INCREF(Py_None);
sipRes = Py_None;
}
else if ((sipRes = PyString_FromStringAndSize(buf,actlen)) == NULL)
sipIsErr = 1;
sipFree((void *)buf);
}
%End
int writeBlock(const char * /Array/,uint /ArraySize/) /ReleaseGIL/;
virtual int writeBlock(const char * /Array/,uint /ArraySize/,
const TQHostAddress &,TQ_UINT16) /ReleaseGIL/;
%End
%If (TQt_3_0_0 -)
SIP_PYOBJECT readBlock(TQ_ULONG) /ReleaseGIL/ [TQ_LONG (char *,TQ_ULONG)]; SIP_PYOBJECT readBlock(TQ_ULONG) /ReleaseGIL/ [TQ_LONG (char *,TQ_ULONG)];
%MethodCode %MethodCode
char *buf; char *buf;
@ -176,7 +123,7 @@ public:
Py_INCREF(Py_None); Py_INCREF(Py_None);
sipRes = Py_None; sipRes = Py_None;
} }
else if ((sipRes = PyString_FromStringAndSize(buf,actlen)) == NULL) else if ((sipRes = SIPBytes_FromStringAndSize(buf,actlen)) == NULL)
sipIsErr = 1; sipIsErr = 1;
sipFree((void *)buf); sipFree((void *)buf);
@ -188,7 +135,6 @@ public:
TQ_ULONG /ArraySize/) /ReleaseGIL/; TQ_ULONG /ArraySize/) /ReleaseGIL/;
virtual TQ_LONG writeBlock(const char * /Array/,TQ_ULONG /ArraySize/, virtual TQ_LONG writeBlock(const char * /Array/,TQ_ULONG /ArraySize/,
const TQHostAddress &,TQ_UINT16) /ReleaseGIL/; const TQHostAddress &,TQ_UINT16) /ReleaseGIL/;
%End
int getch(); int getch();
int putch(int); int putch(int);
@ -220,5 +166,3 @@ protected:
private: private:
TQSocketDevice(const TQSocketDevice &); TQSocketDevice(const TQSocketDevice &);
}; };
%End

@ -186,7 +186,7 @@ static char **pyArgvToC(PyObject *argvlist,int *argcp)
char *arg; char *arg;
// Get the argument and allocate memory for it. // Get the argument and allocate memory for it.
if ((arg = PyString_AsString(PyList_GetItem(argvlist,a))) == NULL || if ((arg = (char *)sipBytes_AsString(PyList_GetItem(argvlist,a))) == NULL ||
(argv[a] = (char *)sipMalloc(strlen(arg) + 1)) == NULL) (argv[a] = (char *)sipMalloc(strlen(arg) + 1)) == NULL)
return NULL; return NULL;

@ -33,8 +33,6 @@ This has been renamed <Literal>delOnCursor</Literal> in Python.
%End %End
%If (TQt_3_0_0 -)
class TQDataBrowser : TQWidget class TQDataBrowser : TQWidget
{ {
%TypeHeaderCode %TypeHeaderCode
@ -142,9 +140,5 @@ protected:
virtual void handleError(const TQSqlError &) /ReleaseGIL/; virtual void handleError(const TQSqlError &) /ReleaseGIL/;
private: private:
%If (TQt_3_1_0 -)
TQDataBrowser(const TQDataBrowser &); TQDataBrowser(const TQDataBrowser &);
%End
}; };
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_3_0_0 -)
class TQDataTable : TQTable class TQDataTable : TQTable
{ {
%TypeHeaderCode %TypeHeaderCode
@ -113,10 +111,8 @@ public:
void setNumRows(int); void setNumRows(int);
bool findBuffer(const TQSqlIndex &,int = 0); bool findBuffer(const TQSqlIndex &,int = 0);
%If (TQt_3_2_0 -)
void hideColumn(int); void hideColumn(int);
void showColumn(int); void showColumn(int);
%End
signals: signals:
void currentChanged(TQSqlRecord *); void currentChanged(TQSqlRecord *);
@ -134,13 +130,9 @@ public slots:
virtual void sortDescending(int); virtual void sortDescending(int);
virtual void refresh(); virtual void refresh();
void setColumnWidth(int,int); void setColumnWidth(int,int);
%If (TQt_3_0_5 -)
void adjustColumn(int); void adjustColumn(int);
void setColumnStretchable(int,bool); void setColumnStretchable(int,bool);
%End
%If (TQt_3_1_0 -)
void swapColumns(int,int,bool = 0); void swapColumns(int,int,bool = 0);
%End
protected: protected:
virtual bool insertCurrent(); virtual bool insertCurrent();
@ -156,9 +148,7 @@ protected:
virtual TQWidget *beginUpdate(int,int,bool); virtual TQWidget *beginUpdate(int,int,bool);
bool eventFilter(TQObject *,TQEvent *); bool eventFilter(TQObject *,TQEvent *);
%If (TQt_3_2_0 -)
void keyPressEvent(TQKeyEvent *); void keyPressEvent(TQKeyEvent *);
%End
void resizeEvent(TQResizeEvent *); void resizeEvent(TQResizeEvent *);
void contentsMousePressEvent(TQMouseEvent *); void contentsMousePressEvent(TQMouseEvent *);
void contentsContextMenuEvent(TQContextMenuEvent *); void contentsContextMenuEvent(TQContextMenuEvent *);
@ -177,9 +167,7 @@ protected:
const TQColorGroup &); const TQColorGroup &);
virtual void paintField(TQPainter *,const TQSqlField *,const TQRect &, virtual void paintField(TQPainter *,const TQSqlField *,const TQRect &,
bool); bool);
%If (TQt_3_1_0 -)
void drawContents(TQPainter *,int,int,int,int); void drawContents(TQPainter *,int,int,int,int);
%End
virtual int fieldAlignment(const TQSqlField *); virtual int fieldAlignment(const TQSqlField *);
void columnClicked(int); void columnClicked(int);
void resizeData(int); void resizeData(int);
@ -193,9 +181,5 @@ protected:
private: private:
TQWidget *beginEdit(int,int,bool); TQWidget *beginEdit(int,int,bool);
%If (TQt_3_1_0 -)
TQDataTable(const TQDataTable &); TQDataTable(const TQDataTable &);
%End
}; };
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_3_0_0 -)
class TQDataView : TQWidget class TQDataView : TQWidget
{ {
%TypeHeaderCode %TypeHeaderCode
@ -52,9 +50,5 @@ public slots:
virtual void clearValues(); virtual void clearValues();
private: private:
%If (TQt_3_1_0 -)
TQDataView(const TQDataView &); TQDataView(const TQDataView &);
%End
}; };
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_3_0_0 -)
class TQEditorFactory : TQObject class TQEditorFactory : TQObject
{ {
%TypeHeaderCode %TypeHeaderCode
@ -47,9 +45,5 @@ public:
static void installDefaultFactory(TQEditorFactory * /Transfer/); static void installDefaultFactory(TQEditorFactory * /Transfer/);
private: private:
%If (TQt_3_1_0 -)
TQEditorFactory(const TQEditorFactory &); TQEditorFactory(const TQEditorFactory &);
%End
}; };
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_3_0_0 -)
class TQSql class TQSql
{ {
%TypeHeaderCode %TypeHeaderCode
@ -58,7 +56,6 @@ public:
Yes Yes
}; };
%If (TQt_3_2_0 -)
enum ParameterType { enum ParameterType {
In, In,
Out, Out,
@ -71,10 +68,7 @@ public:
Views, Views,
AllTables AllTables
}; };
%End
private: private:
TQSql(const TQSql &); TQSql(const TQSql &);
}; };
%End

@ -50,8 +50,6 @@ This has been renamed <Literal>execQuery</Literal> in Python.
%End %End
%If (TQt_3_0_0 -)
class TQSqlCursor : TQSqlRecord, TQSqlQuery class TQSqlCursor : TQSqlRecord, TQSqlQuery
{ {
%TypeHeaderCode %TypeHeaderCode
@ -72,10 +70,8 @@ public:
TQVariant value(int) const; TQVariant value(int) const;
TQVariant value(const TQString &) const; TQVariant value(const TQString &) const;
%If (TQt_3_1_0 -)
void setValue(int,const TQVariant &); void setValue(int,const TQVariant &);
void setValue(const TQString &,const TQVariant &); void setValue(const TQString &,const TQVariant &);
%End
virtual TQSqlIndex primaryIndex(bool = 1) const; virtual TQSqlIndex primaryIndex(bool = 1) const;
virtual TQSqlIndex index(const TQStringList &) const; virtual TQSqlIndex index(const TQStringList &) const;
TQSqlIndex index(const TQString &) const; TQSqlIndex index(const TQString &) const;
@ -123,10 +119,8 @@ public:
TQString toString(const TQString & = TQString::null, TQString toString(const TQString & = TQString::null,
const TQString & = ",") const; const TQString & = ",") const;
%If (TQt_3_1_0 -)
bool isNull(int) const; bool isNull(int) const;
bool isNull(const TQString &) const; bool isNull(const TQString &) const;
%End
protected: protected:
void afterSeek(); void afterSeek();
@ -144,5 +138,3 @@ protected:
const TQString &,const TQString &, const TQString &,const TQString &,
const TQString &) const; const TQString &) const;
}; };
%End

@ -33,8 +33,6 @@ This has been renamed <Literal>execStatement</Literal> in Python.
%End %End
%If (TQt_3_0_0 -)
class TQSqlDatabase : TQObject class TQSqlDatabase : TQObject
{ {
%TypeHeaderCode %TypeHeaderCode
@ -84,9 +82,7 @@ public:
bool isOpen() const; bool isOpen() const;
bool isOpenError() const; bool isOpenError() const;
TQStringList tables() const; TQStringList tables() const;
%If (TQt_3_2_0 -)
TQStringList tables(TQSql::TableType) const; TQStringList tables(TQSql::TableType) const;
%End
TQSqlIndex primaryIndex(const TQString &) const; TQSqlIndex primaryIndex(const TQString &) const;
TQSqlRecord record(const TQString &) const; TQSqlRecord record(const TQString &) const;
TQSqlRecord record(const TQSqlQuery &) const; TQSqlRecord record(const TQSqlQuery &) const;
@ -104,52 +100,36 @@ public:
virtual void setPassword(const TQString &); virtual void setPassword(const TQString &);
virtual void setHostName(const TQString &); virtual void setHostName(const TQString &);
virtual void setPort(int); virtual void setPort(int);
%If (TQt_3_2_0 -)
void setConnectOptions(const TQString & = TQString::null); void setConnectOptions(const TQString & = TQString::null);
%End
TQString databaseName() const; TQString databaseName() const;
TQString userName() const; TQString userName() const;
TQString password() const; TQString password() const;
TQString hostName() const; TQString hostName() const;
TQString driverName() const; TQString driverName() const;
int port() const; int port() const;
%If (TQt_3_2_0 -)
TQString connectOptions() const; TQString connectOptions() const;
%End
TQSqlDriver *driver() const; TQSqlDriver *driver() const;
static TQSqlDatabase *addDatabase(const TQString &, static TQSqlDatabase *addDatabase(const TQString &,
const TQString & = TQString(TQSqlDatabase::defaultConnection)); const TQString & = TQString(TQSqlDatabase::defaultConnection));
%If (TQt_3_2_0 -)
static TQSqlDatabase *addDatabase(TQSqlDriver *, static TQSqlDatabase *addDatabase(TQSqlDriver *,
const TQString & = TQString(TQSqlDatabase::defaultConnection)); const TQString & = TQString(TQSqlDatabase::defaultConnection));
%End
static TQSqlDatabase *database(const TQString & = TQString(TQSqlDatabase::defaultConnection),bool = 1); static TQSqlDatabase *database(const TQString & = TQString(TQSqlDatabase::defaultConnection),bool = 1);
static void removeDatabase(const TQString &); static void removeDatabase(const TQString &);
%If (TQt_3_2_0 -)
static void removeDatabase(TQSqlDatabase *); static void removeDatabase(TQSqlDatabase *);
%End
static bool contains(const TQString & = TQString(TQSqlDatabase::defaultConnection)); static bool contains(const TQString & = TQString(TQSqlDatabase::defaultConnection));
static TQStringList drivers(); static TQStringList drivers();
// static void registerSqlDriver(const TQString &, // static void registerSqlDriver(const TQString &,
// const TQSqlDriverCreatorBase *); // const TQSqlDriverCreatorBase *);
%If (TQt_3_2_0 -)
static bool isDriverAvailable(const TQString &); static bool isDriverAvailable(const TQString &);
%End
protected: protected:
TQSqlDatabase(const TQString &,const TQString &, TQSqlDatabase(const TQString &,const TQString &,
TQObject * /TransferThis/ = 0,const char * = 0); TQObject * /TransferThis/ = 0,const char * = 0);
%If (TQt_3_2_0 -)
TQSqlDatabase(TQSqlDriver *,TQObject * /TransferThis/ = 0, TQSqlDatabase(TQSqlDriver *,TQObject * /TransferThis/ = 0,
const char * = 0); const char * = 0);
%End
private: private:
%If (TQt_3_1_0 -)
TQSqlDatabase(const TQSqlDatabase &); TQSqlDatabase(const TQSqlDatabase &);
%End
}; };
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_3_0_0 -)
class TQSqlDriver : TQObject class TQSqlDriver : TQObject
{ {
%TypeHeaderCode %TypeHeaderCode
@ -42,12 +40,10 @@ public:
Transactions, Transactions,
QuerySize, QuerySize,
BLOB, BLOB,
%If (TQt_3_1_0 -)
Unicode, Unicode,
PreparedQueries, PreparedQueries,
NamedPlaceholders, NamedPlaceholders,
PositionalPlaceholders PositionalPlaceholders
%End
}; };
TQSqlDriver(TQObject * /TransferThis/ = 0,const char * = 0); TQSqlDriver(TQObject * /TransferThis/ = 0,const char * = 0);
@ -77,10 +73,8 @@ public:
virtual bool ping() = 0; virtual bool ping() = 0;
virtual TQSqlQuery createQuery() const = 0; virtual TQSqlQuery createQuery() const = 0;
%If (TQt_3_2_0 -)
bool open(const TQString &,const TQString &,const TQString &, bool open(const TQString &,const TQString &,const TQString &,
const TQString &,int,const TQString &) /ReleaseGIL/; const TQString &,int,const TQString &) /ReleaseGIL/;
%End
protected: protected:
virtual void setOpen(bool); virtual void setOpen(bool);
@ -90,5 +84,3 @@ protected:
private: private:
TQSqlDriver(const TQSqlDriver &); TQSqlDriver(const TQSqlDriver &);
}; };
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_3_0_0 -)
class TQSqlEditorFactory : TQEditorFactory class TQSqlEditorFactory : TQEditorFactory
{ {
%TypeHeaderCode %TypeHeaderCode
@ -49,9 +47,5 @@ public:
static void installDefaultFactory(TQSqlEditorFactory * /Transfer/); static void installDefaultFactory(TQSqlEditorFactory * /Transfer/);
private: private:
%If (TQt_3_1_0 -)
TQSqlEditorFactory(const TQSqlEditorFactory &); TQSqlEditorFactory(const TQSqlEditorFactory &);
%End
}; };
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_3_0_0 -)
class TQSqlError class TQSqlError
{ {
%TypeHeaderCode %TypeHeaderCode
@ -59,10 +57,6 @@ public:
virtual void setType(int); virtual void setType(int);
int number() const; int number() const;
virtual void setNumber(int); virtual void setNumber(int);
%If (TQt_3_2_0 -)
TQString text() const; TQString text() const;
void showMessage(const TQString & = TQString::null) const; void showMessage(const TQString & = TQString::null) const;
%End
}; };
%End

@ -35,8 +35,6 @@
%End %End
%If (TQt_3_0_0 -)
class TQSqlField class TQSqlField
{ {
%TypeHeaderCode %TypeHeaderCode
@ -91,5 +89,3 @@ public:
virtual void setGenerated(bool); virtual void setGenerated(bool);
virtual void setCalculated(bool); virtual void setCalculated(bool);
}; };
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_3_0_0 -)
class TQSqlForm : TQObject class TQSqlForm : TQObject
{ {
%TypeHeaderCode %TypeHeaderCode
@ -66,9 +64,5 @@ protected:
virtual void remove(TQWidget *); virtual void remove(TQWidget *);
private: private:
%If (TQt_3_1_0 -)
TQSqlForm(const TQSqlForm &); TQSqlForm(const TQSqlForm &);
%End
}; };
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_3_0_0 -)
class TQSqlIndex : TQSqlRecord class TQSqlIndex : TQSqlRecord
{ {
%TypeHeaderCode %TypeHeaderCode
@ -60,5 +58,3 @@ public:
static TQSqlIndex fromStringList(const TQStringList &,const TQSqlCursor *); static TQSqlIndex fromStringList(const TQStringList &,const TQSqlCursor *);
}; };
%End

@ -36,8 +36,6 @@ This problem may be addressed in a future release of PyTQt.
%End %End
%If (TQt_3_0_0 -)
class TQSqlPropertyMap class TQSqlPropertyMap
{ {
%TypeHeaderCode %TypeHeaderCode
@ -59,5 +57,3 @@ public:
private: private:
TQSqlPropertyMap(const TQSqlPropertyMap &); TQSqlPropertyMap(const TQSqlPropertyMap &);
}; };
%End

@ -49,8 +49,6 @@ This has been renamed <Literal>execQuery</Literal> in Python. (TQt v3.1+)
%End %End
%If (TQt_3_0_0 -)
class TQSqlQuery class TQSqlQuery
{ {
%TypeHeaderCode %TypeHeaderCode
@ -60,9 +58,7 @@ class TQSqlQuery
public: public:
TQSqlQuery(TQSqlResult *); TQSqlQuery(TQSqlResult *);
TQSqlQuery(const TQString & = TQString::null,TQSqlDatabase * = 0); TQSqlQuery(const TQString & = TQString::null,TQSqlDatabase * = 0);
%If (TQt_3_2_0 -)
TQSqlQuery(TQSqlDatabase *); TQSqlQuery(TQSqlDatabase *);
%End
TQSqlQuery(const TQSqlQuery &); TQSqlQuery(const TQSqlQuery &);
bool isValid() const; bool isValid() const;
@ -76,10 +72,8 @@ public:
int size() const; int size() const;
const TQSqlDriver *driver() const; const TQSqlDriver *driver() const;
const TQSqlResult *result() const; const TQSqlResult *result() const;
%If (TQt_3_1_0 -)
bool isForwardOnly() const; bool isForwardOnly() const;
void setForwardOnly(bool); void setForwardOnly(bool);
%End
virtual bool exec(const TQString &) /PyName=execQuery, ReleaseGIL/; virtual bool exec(const TQString &) /PyName=execQuery, ReleaseGIL/;
virtual TQVariant value(int) const; virtual TQVariant value(int) const;
@ -90,14 +84,11 @@ public:
virtual bool first() /ReleaseGIL/; virtual bool first() /ReleaseGIL/;
virtual bool last() /ReleaseGIL/; virtual bool last() /ReleaseGIL/;
%If (TQt_3_1_0 -)
bool exec() /PyName=execQuery, ReleaseGIL/; bool exec() /PyName=execQuery, ReleaseGIL/;
bool prepare(const TQString &); bool prepare(const TQString &);
void bindValue(const TQString &,const TQVariant &); void bindValue(const TQString &,const TQVariant &);
void bindValue(int,const TQVariant &); void bindValue(int,const TQVariant &);
void addBindValue(const TQVariant &); void addBindValue(const TQVariant &);
%End
%If (TQt_3_2_0 -)
void bindValue(const TQString &,const TQVariant &,TQSql::ParameterType); void bindValue(const TQString &,const TQVariant &,TQSql::ParameterType);
void bindValue(int,const TQVariant &,TQSql::ParameterType); void bindValue(int,const TQVariant &,TQSql::ParameterType);
void addBindValue(const TQVariant &,TQSql::ParameterType); void addBindValue(const TQVariant &,TQSql::ParameterType);
@ -105,11 +96,8 @@ public:
TQVariant boundValue(int) const; TQVariant boundValue(int) const;
// TQMap<TQString,TQVariant> boundValues() const; // TQMap<TQString,TQVariant> boundValues() const;
TQString executedQuery() const; TQString executedQuery() const;
%End
protected: protected:
virtual void beforeSeek(); virtual void beforeSeek();
virtual void afterSeek(); virtual void afterSeek();
}; };
%End

@ -36,8 +36,6 @@
%End %End
%If (TQt_3_0_0 -)
class TQSqlRecord class TQSqlRecord
{ {
%TypeHeaderCode %TypeHeaderCode
@ -60,10 +58,8 @@ public:
virtual void setNull(const TQString &); virtual void setNull(const TQString &);
bool isNull(int); bool isNull(int);
bool isNull(const TQString &); bool isNull(const TQString &);
%If (TQt_3_1_0 -)
// bool isNull(int) const; // bool isNull(int) const;
// bool isNull(const TQString &) const; // bool isNull(const TQString &) const;
%End
int position(const TQString &) const; int position(const TQString &) const;
TQString fieldName(int) const; TQString fieldName(int) const;
@ -173,5 +169,3 @@ public:
return sipGetState(sipTransferObj); return sipGetState(sipTransferObj);
%End %End
}; };
%End

@ -29,8 +29,6 @@
%End %End
%If (TQt_3_0_0 -)
class TQSqlResult class TQSqlResult
{ {
%TypeHeaderCode %TypeHeaderCode
@ -69,5 +67,3 @@ protected:
private: private:
TQSqlResult(const TQSqlResult &); TQSqlResult(const TQSqlResult &);
}; };
%End

@ -41,8 +41,6 @@ This has been renamed <Literal>execQuery</Literal> in Python.
%End %End
%If (TQt_3_2_0 -)
class TQSqlSelectCursor : TQSqlCursor class TQSqlSelectCursor : TQSqlCursor
{ {
%TypeHeaderCode %TypeHeaderCode
@ -88,5 +86,3 @@ protected:
const TQString & = ",") const; const TQString & = ",") const;
bool select(const TQString &,const TQSqlIndex & = TQSqlIndex()) /ReleaseGIL/; bool select(const TQString &,const TQSqlIndex & = TQSqlIndex()) /ReleaseGIL/;
}; };
%End

@ -55,7 +55,6 @@
%If (TQt_TABLE) %If (TQt_TABLE)
%If (TQt_2_2_0 -)
class TQTableSelection class TQTableSelection
{ {
@ -65,9 +64,7 @@ class TQTableSelection
public: public:
TQTableSelection(); TQTableSelection();
%If (TQt_3_1_0 -)
TQTableSelection(int,int,int,int); TQTableSelection(int,int,int,int);
%End
void init(int,int); void init(int,int);
void expandTo(int,int); void expandTo(int,int);
@ -78,15 +75,11 @@ public:
int rightCol() const; int rightCol() const;
int anchorRow() const; int anchorRow() const;
int anchorCol() const; int anchorCol() const;
%If (TQt_3_2_0 -)
int numRows() const; int numRows() const;
int numCols() const; int numCols() const;
%End
bool isActive() const; bool isActive() const;
%If (TQt_3_2_0 -)
bool isEmpty() const; bool isEmpty() const;
%End
}; };
@ -106,16 +99,13 @@ public:
// Note that the TQt documentation is wrong. Ownership is only taken by // Note that the TQt documentation is wrong. Ownership is only taken by
// TQTable::setItem(). // TQTable::setItem().
%If (TQt_3_2_0 -)
TQTableItem(TQTable *,EditType); TQTableItem(TQTable *,EditType);
%End
TQTableItem(TQTable *,EditType,const TQString &); TQTableItem(TQTable *,EditType,const TQString &);
TQTableItem(TQTable *,EditType,const TQString &,const TQPixmap &); TQTableItem(TQTable *,EditType,const TQString &,const TQPixmap &);
%ConvertToSubClassCode %ConvertToSubClassCode
Py_BEGIN_ALLOW_THREADS Py_BEGIN_ALLOW_THREADS
#if TQT_VERSION >= 0x030000
int rtti = sipCpp -> rtti(); int rtti = sipCpp -> rtti();
if (rtti == TQCheckTableItem::RTTI) if (rtti == TQCheckTableItem::RTTI)
@ -124,9 +114,6 @@ public:
sipClass = sipClass_TQComboTableItem; sipClass = sipClass_TQComboTableItem;
else else
sipClass = 0; sipClass = 0;
#else
sipClass = 0;
#endif
Py_END_ALLOW_THREADS Py_END_ALLOW_THREADS
%End %End
@ -163,22 +150,13 @@ public:
void updateEditor(int,int); void updateEditor(int,int);
%If (TQt_3_0_0 -)
virtual void setEnabled(bool); virtual void setEnabled(bool);
bool isEnabled() const; bool isEnabled() const;
virtual int rtti() const; virtual int rtti() const;
%End
protected:
%If (TQt_3_2_0 - TQt_3_3_0)
TQString content() const;
%End
}; };
%If (TQt_3_0_0 -)
class TQComboTableItem : TQTableItem class TQComboTableItem : TQTableItem
{ {
%TypeHeaderCode %TypeHeaderCode
@ -205,15 +183,9 @@ public:
int rtti() const; int rtti() const;
%If (TQt_3_0_6 -)
TQSize sizeHint() const; TQSize sizeHint() const;
%End
}; };
%End
%If (TQt_3_0_0 -)
class TQCheckTableItem : TQTableItem class TQCheckTableItem : TQTableItem
{ {
@ -226,9 +198,7 @@ public:
// TQTable::setItem(). // TQTable::setItem().
TQCheckTableItem(TQTable *,const TQString &); TQCheckTableItem(TQTable *,const TQString &);
%If (TQt_3_2_0 -)
void setText(const TQString &); void setText(const TQString &);
%End
virtual TQWidget *createEditor() const /Factory/; virtual TQWidget *createEditor() const /Factory/;
virtual void setContentFromEditor(TQWidget *); virtual void setContentFromEditor(TQWidget *);
virtual void paint(TQPainter *,const TQColorGroup &,const TQRect &,bool); virtual void paint(TQPainter *,const TQColorGroup &,const TQRect &,bool);
@ -237,13 +207,9 @@ public:
int rtti() const; int rtti() const;
%If (TQt_3_0_6 -)
TQSize sizeHint() const; TQSize sizeHint() const;
%End
}; };
%End
class TQTable : TQScrollView class TQTable : TQScrollView
{ {
@ -262,14 +228,6 @@ public:
TQHeader *horizontalHeader() const; TQHeader *horizontalHeader() const;
TQHeader *verticalHeader() const; TQHeader *verticalHeader() const;
%If (- TQt_3_0_0)
enum SelectionMode {
Single,
Multi,
NoSelection
};
%End
%If (TQt_3_0_0 -)
enum SelectionMode { enum SelectionMode {
Single, Single,
Multi, Multi,
@ -277,7 +235,6 @@ public:
MultiRow, MultiRow,
NoSelection NoSelection
}; };
%End
virtual void setSelectionMode(SelectionMode); virtual void setSelectionMode(SelectionMode);
SelectionMode selectionMode() const; SelectionMode selectionMode() const;
@ -298,14 +255,8 @@ public:
virtual int columnAt(int) const; virtual int columnAt(int) const;
virtual int rowAt(int) const; virtual int rowAt(int) const;
%If (- TQt_3_0_0)
int numRows() const;
int numCols() const;
%End
%If (TQt_3_0_0 -)
virtual int numRows() const; virtual int numRows() const;
virtual int numCols() const; virtual int numCols() const;
%End
void updateCell(int,int); void updateCell(int,int);
@ -325,11 +276,9 @@ public:
virtual void removeSelection(int); virtual void removeSelection(int);
virtual int currentSelection() const; virtual int currentSelection() const;
%If (TQt_3_1_0 -)
void selectCells(int,int,int,int); void selectCells(int,int,int,int);
void selectRow(int); void selectRow(int);
void selectColumn(int); void selectColumn(int);
%End
bool showGrid() const; bool showGrid() const;
@ -346,19 +295,14 @@ public:
virtual TQWidget *cellWidget(int,int) const; virtual TQWidget *cellWidget(int,int) const;
virtual void clearCellWidget(int,int); virtual void clearCellWidget(int,int);
%If (TQt_3_0_0 -)
virtual TQRect cellRect(int,int) const; virtual TQRect cellRect(int,int) const;
%End
virtual void paintCell(TQPainter *,int,int,const TQRect &,bool); virtual void paintCell(TQPainter *,int,int,const TQRect &,bool);
%If (TQt_3_0_0 -)
virtual void paintCell(TQPainter *,int,int,const TQRect &,bool, virtual void paintCell(TQPainter *,int,int,const TQRect &,bool,
const TQColorGroup &); const TQColorGroup &);
%End
virtual void paintFocus(TQPainter *,const TQRect &); virtual void paintFocus(TQPainter *,const TQRect &);
TQSize sizeHint() const; TQSize sizeHint() const;
%If (TQt_3_0_0 -)
bool isReadOnly() const; bool isReadOnly() const;
bool isRowReadOnly(int) const; bool isRowReadOnly(int) const;
bool isColumnReadOnly(int) const; bool isColumnReadOnly(int) const;
@ -374,11 +318,8 @@ public:
virtual void setFocusStyle(FocusStyle); virtual void setFocusStyle(FocusStyle);
FocusStyle focusStyle() const; FocusStyle focusStyle() const;
%End
%If (TQt_3_1_0 -)
void updateHeaderStates(); void updateHeaderStates();
%End
public slots: public slots:
virtual void setNumRows(int); virtual void setNumRows(int);
@ -388,10 +329,8 @@ public slots:
virtual void hideColumn(int); virtual void hideColumn(int);
virtual void showRow(int); virtual void showRow(int);
virtual void showColumn(int); virtual void showColumn(int);
%If (TQt_3_3_0 -)
bool isRowHidden(int) const; bool isRowHidden(int) const;
bool isColumnHidden(int) const; bool isColumnHidden(int) const;
%End
virtual void setColumnWidth(int,int); virtual void setColumnWidth(int,int);
virtual void setRowHeight(int,int); virtual void setRowHeight(int,int);
@ -404,14 +343,8 @@ public slots:
bool isColumnStretchable(int) const; bool isColumnStretchable(int) const;
bool isRowStretchable(int) const; bool isRowStretchable(int) const;
virtual void setSorting(bool); virtual void setSorting(bool);
%If (- TQt_3_0_0)
virtual void swapRows(int,int);
virtual void swapColumns(int,int);
%End
%If (TQt_3_0_0 -)
virtual void swapRows(int,int,bool = 0); virtual void swapRows(int,int,bool = 0);
virtual void swapColumns(int,int,bool = 0); virtual void swapColumns(int,int,bool = 0);
%End
virtual void swapCells(int,int,int,int); virtual void swapCells(int,int,int,int);
virtual void setLeftMargin(int); virtual void setLeftMargin(int);
@ -421,7 +354,6 @@ public slots:
virtual void setColumnMovingEnabled(bool); virtual void setColumnMovingEnabled(bool);
virtual void setRowMovingEnabled(bool); virtual void setRowMovingEnabled(bool);
%If (TQt_3_0_0 -)
virtual void setReadOnly(bool); virtual void setReadOnly(bool);
virtual void setRowReadOnly(int,bool); virtual void setRowReadOnly(int,bool);
virtual void setColumnReadOnly(int,bool); virtual void setColumnReadOnly(int,bool);
@ -437,44 +369,29 @@ public slots:
virtual void removeColumns(const TQMemArray<int> &); virtual void removeColumns(const TQMemArray<int> &);
virtual void editCell(int,int,bool = 0); virtual void editCell(int,int,bool = 0);
%End
%If (TQt_3_1_0 -)
void setRowLabels(const TQStringList &); void setRowLabels(const TQStringList &);
void setColumnLabels(const TQStringList &); void setColumnLabels(const TQStringList &);
%End
protected: protected:
%If (TQt_3_0_0 -)
enum EditMode { enum EditMode {
NotEditing, NotEditing,
Editing, Editing,
Replacing Replacing
}; };
%End
void drawContents(TQPainter *,int,int,int,int); void drawContents(TQPainter *,int,int,int,int);
void contentsMousePressEvent(TQMouseEvent *); void contentsMousePressEvent(TQMouseEvent *);
void contentsMouseMoveEvent(TQMouseEvent *); void contentsMouseMoveEvent(TQMouseEvent *);
void contentsMouseDoubleClickEvent(TQMouseEvent *); void contentsMouseDoubleClickEvent(TQMouseEvent *);
void contentsMouseReleaseEvent(TQMouseEvent *); void contentsMouseReleaseEvent(TQMouseEvent *);
%If (TQt_3_0_0 -)
void contentsContextMenuEvent(TQContextMenuEvent *); void contentsContextMenuEvent(TQContextMenuEvent *);
%End
void keyPressEvent(TQKeyEvent *); void keyPressEvent(TQKeyEvent *);
void focusInEvent(TQFocusEvent *); void focusInEvent(TQFocusEvent *);
void focusOutEvent(TQFocusEvent *); void focusOutEvent(TQFocusEvent *);
%If (- TQt_3_0_0)
void resizeEvent(TQResizeEvent *);
%End
%If (TQt_3_0_0 -)
void viewportResizeEvent(TQResizeEvent *); void viewportResizeEvent(TQResizeEvent *);
%End
void showEvent(TQShowEvent *); void showEvent(TQShowEvent *);
%If (TQt_3_1_0 -)
void paintEvent(TQPaintEvent *); void paintEvent(TQPaintEvent *);
%End
%If (TQt_3_0_0 -)
void setEditMode(EditMode,int,int); void setEditMode(EditMode,int,int);
virtual void contentsDragEnterEvent(TQDragEnterEvent *); virtual void contentsDragEnterEvent(TQDragEnterEvent *);
virtual void contentsDragMoveEvent(TQDragMoveEvent *); virtual void contentsDragMoveEvent(TQDragMoveEvent *);
@ -482,7 +399,6 @@ protected:
virtual void contentsDropEvent(TQDropEvent *); virtual void contentsDropEvent(TQDropEvent *);
virtual TQDragObject *dragObject(); virtual TQDragObject *dragObject();
virtual void startDrag(); virtual void startDrag();
%End
virtual void paintEmptyArea(TQPainter *,int,int,int,int); virtual void paintEmptyArea(TQPainter *,int,int,int,int);
virtual void activateNextCell(); virtual void activateNextCell();
@ -495,13 +411,11 @@ protected:
virtual void insertWidget(int,int,TQWidget *); virtual void insertWidget(int,int,TQWidget *);
int indexOf(int,int) const; int indexOf(int,int) const;
%If (TQt_3_0_0 -)
void windowActivationChange(bool); void windowActivationChange(bool);
bool isEditing() const; bool isEditing() const;
EditMode editMode() const; EditMode editMode() const;
int currEditRow() const; int currEditRow() const;
int currEditCol() const; int currEditCol() const;
%End
protected slots: protected slots:
virtual void columnWidthChanged(int); virtual void columnWidthChanged(int);
@ -517,16 +431,11 @@ signals:
void pressed(int,int,int,const TQPoint &); void pressed(int,int,int,const TQPoint &);
void selectionChanged(); void selectionChanged();
void valueChanged(int,int); void valueChanged(int,int);
%If (TQt_3_0_0 -)
void contextMenuRequested(int,int,const TQPoint &); void contextMenuRequested(int,int,const TQPoint &);
void dropped(TQDropEvent *); void dropped(TQDropEvent *);
%End
private: private:
%If (TQt_3_1_0 -)
TQTable(const TQTable &); TQTable(const TQTable &);
%End
}; };
%End %End
%End

@ -30,8 +30,6 @@
%End %End
%If (TQt_3_0_0 -)
class TQWidgetFactory class TQWidgetFactory
{ {
%TypeHeaderCode %TypeHeaderCode
@ -54,10 +52,6 @@ public:
virtual TQWidget *createWidget(const TQString &,TQWidget * /TransferThis/, virtual TQWidget *createWidget(const TQString &,TQWidget * /TransferThis/,
const char *) const /Factory/; const char *) const /Factory/;
%If (TQt_3_1_0 -)
static TQStringList widgets(); static TQStringList widgets();
static bool supportsWidget(const TQString &); static bool supportsWidget(const TQString &);
%End
}; };
%End

@ -255,7 +255,6 @@ Not yet implemented. (TQt v3.2.0+)
%If (TQt_DOM) %If (TQt_DOM)
%If (TQt_2_2_0 -)
class TQDomImplementation class TQDomImplementation
{ {
@ -268,13 +267,11 @@ public:
TQDomImplementation(const TQDomImplementation &); TQDomImplementation(const TQDomImplementation &);
virtual bool hasFeature(const TQString &,const TQString &); virtual bool hasFeature(const TQString &,const TQString &);
%If (TQt_3_0_0 -)
virtual TQDomDocumentType createDocumentType(const TQString &, virtual TQDomDocumentType createDocumentType(const TQString &,
const TQString &, const TQString &,
const TQString &); const TQString &);
virtual TQDomDocument createDocument(const TQString &,const TQString &, virtual TQDomDocument createDocument(const TQString &,const TQString &,
const TQDomDocumentType &); const TQDomDocumentType &);
%End
bool isNull(); bool isNull();
}; };
@ -314,14 +311,10 @@ public:
virtual TQDomNode replaceChild(const TQDomNode &,const TQDomNode &); virtual TQDomNode replaceChild(const TQDomNode &,const TQDomNode &);
virtual TQDomNode removeChild(const TQDomNode &); virtual TQDomNode removeChild(const TQDomNode &);
virtual TQDomNode appendChild(const TQDomNode &); virtual TQDomNode appendChild(const TQDomNode &);
%If (TQt_3_0_0 -)
virtual bool hasChildNodes() const; virtual bool hasChildNodes() const;
%End
virtual TQDomNode cloneNode(bool = 1) const; virtual TQDomNode cloneNode(bool = 1) const;
%If (TQt_3_0_0 -)
virtual void normalize(); virtual void normalize();
virtual bool isSupported(const TQString &,const TQString &) const; virtual bool isSupported(const TQString &,const TQString &) const;
%End
virtual TQString nodeName() const; virtual TQString nodeName() const;
virtual NodeType nodeType() const; virtual NodeType nodeType() const;
@ -333,18 +326,14 @@ public:
virtual TQDomNode nextSibling() const; virtual TQDomNode nextSibling() const;
virtual TQDomNamedNodeMap attributes() const; virtual TQDomNamedNodeMap attributes() const;
virtual TQDomDocument ownerDocument() const; virtual TQDomDocument ownerDocument() const;
%If (TQt_3_0_0 -)
virtual TQString namespaceURI() const; virtual TQString namespaceURI() const;
virtual TQString localName() const; virtual TQString localName() const;
virtual bool hasAttributes() const; virtual bool hasAttributes() const;
%End
virtual TQString nodeValue() const; virtual TQString nodeValue() const;
virtual void setNodeValue(const TQString &); virtual void setNodeValue(const TQString &);
%If (TQt_3_0_0 -)
virtual TQString prefix() const; virtual TQString prefix() const;
virtual void setPrefix(const TQString &); virtual void setPrefix(const TQString &);
%End
virtual bool isAttr() const; virtual bool isAttr() const;
virtual bool isCDATASection() const; virtual bool isCDATASection() const;
@ -413,11 +402,9 @@ public:
virtual TQString name() const; virtual TQString name() const;
virtual TQDomNamedNodeMap entities() const; virtual TQDomNamedNodeMap entities() const;
virtual TQDomNamedNodeMap notations() const; virtual TQDomNamedNodeMap notations() const;
%If (TQt_3_0_0 -)
virtual TQString publicId() const; virtual TQString publicId() const;
virtual TQString systemId() const; virtual TQString systemId() const;
virtual TQString internalSubset() const; virtual TQString internalSubset() const;
%End
TQDomNode::NodeType nodeType() const; TQDomNode::NodeType nodeType() const;
bool isDocumentType() const; bool isDocumentType() const;
@ -433,9 +420,7 @@ class TQDomDocument : TQDomNode
public: public:
TQDomDocument(); TQDomDocument();
TQDomDocument(const TQString &); TQDomDocument(const TQString &);
%If (TQt_3_0_0 -)
TQDomDocument(const TQDomDocumentType &); TQDomDocument(const TQDomDocumentType &);
%End
TQDomDocument(const TQDomDocument &); TQDomDocument(const TQDomDocument &);
TQDomElement createElement(const TQString &); TQDomElement createElement(const TQString &);
@ -448,21 +433,12 @@ public:
TQDomAttr createAttribute(const TQString &); TQDomAttr createAttribute(const TQString &);
TQDomEntityReference createEntityReference(const TQString &); TQDomEntityReference createEntityReference(const TQString &);
TQDomNodeList elementsByTagName(const TQString &) const; TQDomNodeList elementsByTagName(const TQString &) const;
%If (TQt_3_0_0 -)
TQDomElement elementById(const TQString &); TQDomElement elementById(const TQString &);
%End
TQDomDocumentType doctype() const; TQDomDocumentType doctype() const;
TQDomImplementation implementation() const; TQDomImplementation implementation() const;
TQDomElement documentElement() const; TQDomElement documentElement() const;
%If (- TQt_3_0_0)
bool setContent(const TQCString &);
bool setContent(const TQByteArray &);
bool setContent(const TQString &);
bool setContent(TQIODevice *);
%End
%If (TQt_3_0_0 -)
// Note that we need handwritten code for these because of the need to // Note that we need handwritten code for these because of the need to
// allocate storage for the error string. // allocate storage for the error string.
SIP_PYTUPLE setContent(const TQCString &,bool); SIP_PYTUPLE setContent(const TQCString &,bool);
@ -577,24 +553,16 @@ public:
sipType_TQString, (PyObject *)0, eline, ecol); sipType_TQString, (PyObject *)0, eline, ecol);
%End %End
%End
%If (TQt_3_2_0 -)
// bool setContent(TQXmlInputSource *,TQXmlReader *,TQString * = 0,int * = 0, // bool setContent(TQXmlInputSource *,TQXmlReader *,TQString * = 0,int * = 0,
// int * = 0); // int * = 0);
%End
TQDomNode::NodeType nodeType() const; TQDomNode::NodeType nodeType() const;
bool isDocument() const; bool isDocument() const;
TQString toString() const; TQString toString() const;
%If (TQt_3_1_0 -)
TQString toString(int) const; TQString toString(int) const;
%End
TQCString toCString() const; TQCString toCString() const;
%If (TQt_3_1_0 -)
TQCString toCString(int) const; TQCString toCString(int) const;
%End
}; };
@ -612,16 +580,12 @@ public:
TQDomNode setNamedItem(const TQDomNode &); TQDomNode setNamedItem(const TQDomNode &);
TQDomNode removeNamedItem(const TQString &); TQDomNode removeNamedItem(const TQString &);
TQDomNode item(int) const; TQDomNode item(int) const;
%If (TQt_3_0_0 -)
TQDomNode namedItemNS(const TQString &,const TQString &) const; TQDomNode namedItemNS(const TQString &,const TQString &) const;
TQDomNode setNamedItemNS(const TQDomNode &); TQDomNode setNamedItemNS(const TQDomNode &);
TQDomNode removeNamedItemNS(const TQString &,const TQString &); TQDomNode removeNamedItemNS(const TQString &,const TQString &);
%End
uint length() const; uint length() const;
%If (TQt_3_0_0 -)
uint count() const; uint count() const;
%End
bool contains(const TQString &) const; bool contains(const TQString &) const;
}; };
@ -680,9 +644,7 @@ public:
virtual TQString name() const; virtual TQString name() const;
virtual bool specified() const; virtual bool specified() const;
%If (TQt_3_0_0 -)
virtual TQDomElement ownerElement() const; virtual TQDomElement ownerElement() const;
%End
virtual TQString value() const; virtual TQString value() const;
virtual void setValue(const TQString &); virtual void setValue(const TQString &);
@ -707,10 +669,8 @@ public:
void setAttribute(const TQString &,const TQString &); void setAttribute(const TQString &,const TQString &);
void setAttribute(const TQString &,int /Constrained/); void setAttribute(const TQString &,int /Constrained/);
// void setAttribute(const TQString &,uint); // void setAttribute(const TQString &,uint);
%If (TQt_3_2_0 -)
// void setAttribute(const TQString &,long); // void setAttribute(const TQString &,long);
// void setAttribute(const TQString &,ulong); // void setAttribute(const TQString &,ulong);
%End
void setAttribute(const TQString &,double); void setAttribute(const TQString &,double);
void removeAttribute(const TQString &); void removeAttribute(const TQString &);
TQDomAttr attributeNode(const TQString &); TQDomAttr attributeNode(const TQString &);
@ -718,20 +678,14 @@ public:
TQDomAttr removeAttributeNode(const TQDomAttr &); TQDomAttr removeAttributeNode(const TQDomAttr &);
virtual TQDomNodeList elementsByTagName(const TQString &) const; virtual TQDomNodeList elementsByTagName(const TQString &) const;
bool hasAttribute(const TQString &) const; bool hasAttribute(const TQString &) const;
%If (- TQt_3_0_0)
void normalize();
%End
%If (TQt_3_0_0 -)
TQString attributeNS(const TQString,const TQString &, TQString attributeNS(const TQString,const TQString &,
const TQString &) const; const TQString &) const;
void setAttributeNS(const TQString,const TQString &,const TQString &); void setAttributeNS(const TQString,const TQString &,const TQString &);
void setAttributeNS(const TQString,const TQString &,int /Constrained/); void setAttributeNS(const TQString,const TQString &,int /Constrained/);
// void setAttributeNS(const TQString,const TQString &,uint); // void setAttributeNS(const TQString,const TQString &,uint);
%If (TQt_3_2_0 -)
// void setAttributeNS(const TQString &,const TQString &,long); // void setAttributeNS(const TQString &,const TQString &,long);
// void setAttributeNS(const TQString &,const TQString &,ulong); // void setAttributeNS(const TQString &,const TQString &,ulong);
%End
void setAttributeNS(const TQString,const TQString &,double); void setAttributeNS(const TQString,const TQString &,double);
void removeAttributeNS(const TQString &,const TQString &); void removeAttributeNS(const TQString &,const TQString &);
TQDomAttr attributeNodeNS(const TQString &,const TQString &); TQDomAttr attributeNodeNS(const TQString &,const TQString &);
@ -739,7 +693,6 @@ public:
virtual TQDomNodeList elementsByTagNameNS(const TQString &, virtual TQDomNodeList elementsByTagNameNS(const TQString &,
const TQString &) const; const TQString &) const;
bool hasAttributeNS(const TQString &,const TQString &) const; bool hasAttributeNS(const TQString &,const TQString &) const;
%End
TQString tagName() const; TQString tagName() const;
void setTagName(const TQString &); void setTagName(const TQString &);
@ -871,4 +824,3 @@ public:
}; };
%End %End
%End

@ -36,7 +36,7 @@
// qt module which sorts it out, but this module doesn't so we add a dummy. It // qt 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 qt import TQObject from python_tqt.qt import TQObject
%End %End

Loading…
Cancel
Save