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:
from sip4_tqt import sipconfig
except:
print "Unable to import the sipconfig module. Please make sure you have"
print "SIP v3.9 or later installed."
print("Unable to import the sipconfig module. Please make sure you have")
print("SIP v3.9 or later installed.")
sys.exit(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.
"""
print "Usage:"
print " %s [-h] [-a version] [-b dir] [-c] [-d dir] [-g] [-j #] [-n dir] [-o dir] [-r] [-v dir]" % sipconfig.script()
print "where:"
print " -h display this help message"
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 " -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 " -g always release the GIL (SIP v3.x behaviour)"
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 " -o dir the directory containing the TQScintilla library [default %s]" % config.qt_lib_dir
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("Usage:")
print(" %s [-h] [-a version] [-b dir] [-c] [-d dir] [-g] [-j #] [-n dir] [-o dir] [-r] [-v dir]" % sipconfig.script())
print("where:")
print(" -h display this help message")
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(" -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(" -g always release the GIL (SIP v3.x behaviour)")
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(" -o dir the directory containing the TQScintilla library [default %s]" % config.qt_lib_dir)
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)
sys.exit(rcode)
@ -439,7 +439,7 @@ def versionToTag(vers, tags, desc):
"""
tag = None
vl = tags.keys()
vl = list(tags.keys())
vl.sort()
# For a snapshot use the latest tag.
@ -689,10 +689,6 @@ def main(argv):
sipconfig.inform("Creating Makefile for pyuic3.")
subdirs.append("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", [])
sipconfig.pop_dir(olddir)
@ -723,8 +719,7 @@ if __name__ == "__main__":
except SystemExit:
raise
except:
print \
"""An internal error occured. Please report all the output from the program,
print("""An internal error occured. Please report all the output from the program,
including the following traceback, to support@riverbankcomputing.co.uk.
"""
""")
raise

@ -85,6 +85,7 @@ opt_split = 1
opt_tracing = 0
opt_verbose = 0
opt_keepfeatures = 0
opt_accept_license = 0
opt_vendorcheck = 0
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(" -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(" -z accept the license terms without prompting\n")
sys.exit(rcode)
@ -359,24 +361,6 @@ class ConfigurePyTQt3(ConfigureBase):
makefile.generate()
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
@ -391,10 +375,10 @@ def inform_user():
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("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:
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 .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
# special case.
if string.find(sciversstr, "snapshot") >= 0:
if sciversstr.find("snapshot") >= 0:
qsci_version = -1
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)
@ -801,7 +785,7 @@ def get_feature_flags():
line = ff.readline()
while line:
flags.extend(string.split(line))
flags.extend(line.split())
line = ff.readline()
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"))
# 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.
if not os.access(buildfile, os.F_OK):
@ -1005,7 +989,7 @@ def check_license():
lname = "GNU General Public License"
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.
if ltype == "GPL" and sys.platform == "win32":
@ -1029,12 +1013,17 @@ Type 'no' to decline the terms of the license.
""")
while 1:
sys.stdout.write("Do you accept the terms of the license? ")
sys.stdout.flush()
try:
resp = raw_input("Do you accept the terms of the license? ")
resp = sys.stdin.readline()
except KeyboardInterrupt:
raise SystemExit
except:
resp = ""
resp = string.lower(string.strip(resp))
resp = resp.strip().lower()
if resp == "yes":
break
@ -1060,7 +1049,7 @@ def get_build_macros(overrides):
overrides is a list of macros overrides from the user.
"""
# 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")
else:
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)
# 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("LIBDIR_QT")
names.append("MOC")
@ -1163,7 +1152,7 @@ def check_qt_installation(macros):
l = f.readline()
while l:
wl = string.split(l)
wl = l.split()
if len(wl) == 3 and wl[0] == "#define" and wl[1] == "QT_PRODUCT_LICENSE":
qt_edition = wl[2][4:-1]
break
@ -1193,7 +1182,7 @@ def check_qt_installation(macros):
cfg = f.readline()
f.close()
val = string.find(cfg, "=")
val = cfg.find("=")
if val >= 0:
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)
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):
@ -1320,10 +1309,6 @@ def main(argv):
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.
if sipcfg.sip_version_str[:8] != "snapshot":
if sipcfg.sip_version < sip_min_version:
@ -1331,7 +1316,7 @@ def main(argv):
# Parse the command line.
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:
usage()
@ -1342,6 +1327,7 @@ def main(argv):
global opt_qsciincdir, opt_qscilibdir, qsci_define
global opt_vendorcheck, opt_vendincdir, opt_vendlibdir
global opt_libpython
global opt_accept_license
opt_libpython = None
@ -1396,6 +1382,8 @@ def main(argv):
opt_qtlib = arg
else:
usage()
elif opt == "-z":
opt_accept_license = 1
# Check that we know the name of the TQt root directory.
if not qt_dir:
@ -1418,6 +1406,9 @@ def main(argv):
check_qt_installation(macros)
# Check the licenses are compatible.
if opt_accept_license == 1:
print("License accepted by command line option.")
else:
check_license()
# Check for TQScintilla.
@ -1458,14 +1449,15 @@ def main(argv):
# Create the additional Makefiles.
sipconfig.inform("Creating top level Makefile...")
open('__init__.py', 'a').close()
sipconfig.ParentMakefile(
configuration=sipcfg,
subdirs=pyqt_modules + pyqt.tools(),
installs=(pyqt.module_installs(), pyqt.module_dir())
).generate()
# Install module initialization script.
create_config("__init__.py", os.path.join(src_dir, "module-init.py"), macros)
# Install the configuration module.
create_config("pyqtconfig.py", os.path.join(src_dir, "pyqtconfig.py.in"), macros)

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

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

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

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

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

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

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

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

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

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

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

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

@ -1,14 +1,14 @@
#!/usr/bin/env python
import sys
from qt import *
from python_tqt.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)
TQWidget.__init__(*(self,) + args)
self.time = TQTime.currentTime()
internalTimer = TQTimer(self)
self.connect(internalTimer, SIGNAL("timeout()"), self.timeout)

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

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

@ -1,11 +1,11 @@
#!/usr/bin/env python
import os, sys, string
from qt import *
from python_tqt.qt import *
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)

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

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

@ -1,17 +1,16 @@
#!/usr/bin/env python
# vim:tabstop=2:shiftwidth=2:expandtab:cinoptions=(s,U1,m1
# Copyright (C) 2002 Oleksandr Yakovlyev (yshurik) <yshurik@thekompany.com>
import sys
from qt import *
from python_tqt.qt import *
TRUE = 1
FALSE = 0
class CheckLists(TQWidget):
def __init__(self, *args):
apply( TQWidget.__init__, (self, ) + args )
TQWidget.__init__(* (self, ) + args )
lay = TQHBoxLayout(self)
lay.setMargin(5)

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

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

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

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

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

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

@ -1,7 +1,7 @@
# This is part of the dragdrop example.
from qt import *
from python_tqt.qt import *
import secret

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

@ -11,7 +11,7 @@
***************************************************************************"""
import sys
from qt import *
from python_tqt.qt import *
class Viewer( TQWidget ):
def __init__( self ):
@ -19,10 +19,8 @@ class Viewer( TQWidget ):
self.setFontSubstitutions()
#greeting_heb = TQString.fromUtf8( "\327\251\327\234\327\225\327\235" )
greeting_heb = unicode( '\327\251\327\234\327\225\327\235','utf8' )
#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_heb = TQString.fromUtf8( b"\327\251\327\234\327\225\327\235" )
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_en = "Hello"
self.greetings = TQTextView( self, "textview" )

@ -3,8 +3,8 @@
import sys
import math
from qt import *
from qtgl import *
from python_tqt.qt import *
from python_tqt.qtgl import *
from OpenGL.GL import *
def gear(inner_radius,outer_radius,width,teeth,tooth_depth):
@ -227,7 +227,7 @@ if __name__=='__main__':
app=TQApplication(sys.argv)
if not TQGLFormat.hasOpenGL():
raise 'No TQt OpenGL support.'
raise Exception('No TQt OpenGL support.')
widget=GearWidget()
app.setMainWidget(widget)

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

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

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

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

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

@ -4,7 +4,7 @@
import sys, string
from qt import *
from python_tqt.qt import *
fileopen = [
@ -115,8 +115,8 @@ 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.'''
True=1
False=0
#True=1
#False=0
class ApplicationWindow(TQMainWindow):
def __init__(self):

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

@ -13,7 +13,7 @@
#*****************************************************************************/
import sys
from qt import *
from python_tqt.qt import *
from random import randint
class AnimatedThingy(TQLabel):
@ -87,7 +87,7 @@ class AnimatedThingy(TQLabel):
def _drawqix(self, p, pn, step):
# 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.drawLine(self.ox[step][0], self.oy[step][0],
self.ox[step][1], self.oy[step][1])

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

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

@ -11,7 +11,7 @@
#*****************************************************************************/
import sys
from qt import *
from python_tqt.qt import *
TRUE = 1
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
from qt import *
from python_tqt.qt import *
INT_MAX = sys.maxint
INT_MAX = sys.maxsize
class RangeControls( TQVBox ):
def __init__( self, parent=None, name=None ):

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

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

@ -7,12 +7,12 @@ import sys
# Check if thread support was enabled.
try:
from qt import TQThread
from python_tqt.qt import TQThread
except:
print "Thread support not enabled"
print("Thread support not enabled")
sys.exit(1)
from qt import *
from python_tqt.qt import *
# The semaphore instances.
@ -192,7 +192,7 @@ class SemaphoreExample(TQWidget):
del s
else:
print "Unknown custom event type:", event.type()
print("Unknown custom event type:", event.type())
app = TQApplication(sys.argv)

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

@ -1,7 +1,7 @@
#!/usr/bin/env python
import sys
from qt import *
from python_tqt.qt import *
class Test(TQWidget):
def __init__(self, parent=None, name='Test', f=0):
@ -16,13 +16,13 @@ class Test(TQWidget):
y1 = 0
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, 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(x2, y, x2-d, y+d)

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

@ -12,8 +12,8 @@
import sys
import os
from qt import *
from qttable import *
from python_tqt.qt import *
from python_tqt.qttable import *
TRUE = 1
FALSE = 0
@ -53,6 +53,8 @@ class Table(TQTable):
# read all the TQt source and header files into a list
all = []
qtdir = os.getenv("QTDIR")
if qtdir is None:
raise Exception("The QTDIR environment variable has not been set.")
for i in dirs:
dir = TQDir(os.path.join(qtdir, "src", i))
lst = TQStringList(dir.entryList("*.cpp; *.h"))
@ -65,7 +67,7 @@ class Table(TQTable):
self.setNumRows(len(all) + 1)
i = 0
sum = 0L
sum = 0
# insert the data into the table
for it in all:
self.setText(i, TB_FILE, it)
@ -82,11 +84,11 @@ class Table(TQTable):
if col < TB_SIZE or col > TB_FLAG:
return
sum = 0L
sum = 0
for i in range(self.numRows()-1):
if str(self.text(i, TB_FLAG)) == "No":
continue
sum += long(str(self.text(i, TB_SIZE)))
sum += int(str(self.text(i, TB_SIZE)))
self.displaySum(sum)
def displaySum(self, sum):
@ -108,7 +110,7 @@ class Table(TQTable):
class TableItem(TQTableItem):
def __init__(self, *args):
apply(TQTableItem.__init__, (self,) + args)
TQTableItem.__init__(*(self,) + args)
def paint(self, p, cg, cr, selected):
g = TQColorGroup(cg)

@ -11,7 +11,7 @@
***************************************************************************"""
import sys
from qt import *
from python_tqt.qt import *
from random import random
class DynamicTip( TQToolTip ):
@ -76,7 +76,7 @@ class TellMe( TQWidget ):
self.r2 = self.randomRect()
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 ):

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.
import sys
import qt
from python_tqt import qt
a = qt.TQApplication(sys.argv)

@ -3,7 +3,7 @@
# TQt tutorial 10.
import sys
import qt
from python_tqt import qt
class LCDRange(qt.TQVBox):
@ -27,7 +27,7 @@ class LCDRange(qt.TQVBox):
def setRange(self, 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)
@ -101,7 +101,7 @@ class MyWidget(qt.TQWidget):
quit = qt.TQPushButton("&Quit", self, "quit")
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.setRange(5, 70)

@ -4,7 +4,7 @@
import sys
import math
import qt
from python_tqt import qt
class LCDRange(qt.TQVBox):
@ -28,7 +28,7 @@ class LCDRange(qt.TQVBox):
def setRange(self, 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)
@ -149,7 +149,7 @@ class CannonField(qt.TQWidget):
y = y0 + vely * time - 0.5 * gravity * time * time
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
def sizePolicy(self):
@ -162,7 +162,7 @@ class MyWidget(qt.TQWidget):
quit = qt.TQPushButton("&Quit", self, "quit")
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.setRange(5, 70)

@ -5,7 +5,7 @@
import sys
import math
import random
import qt
from python_tqt import qt
class LCDRange(qt.TQVBox):
@ -36,7 +36,7 @@ class LCDRange(qt.TQVBox):
def setRange(self, 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)
@ -184,7 +184,7 @@ class CannonField(qt.TQWidget):
y = y0 + vely * time - 0.5 * gravity * time * time
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
def targetRect(self):
@ -202,7 +202,7 @@ class MyWidget(qt.TQWidget):
quit = qt.TQPushButton("&Quit", self, "quit")
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.setRange(5, 70)

@ -5,7 +5,7 @@
import sys
import math
import random
import qt
from python_tqt import qt
class LCDRange(qt.TQWidget):
@ -41,7 +41,7 @@ class LCDRange(qt.TQWidget):
def setRange(self, 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)
@ -216,7 +216,7 @@ class CannonField(qt.TQWidget):
y = y0 + vely * time - 0.5 * gravity * time * time
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
def targetRect(self):
@ -237,7 +237,7 @@ class GameBoard(qt.TQWidget):
quit = qt.TQPushButton("&Quit", self, "quit")
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.setRange(5, 70)

@ -5,7 +5,7 @@
import sys
import math
import random
import qt
from python_tqt import qt
class LCDRange(qt.TQWidget):
@ -41,7 +41,7 @@ class LCDRange(qt.TQWidget):
def setRange(self, 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)
@ -246,7 +246,7 @@ class CannonField(qt.TQWidget):
y = y0 + vely * time - 0.5 * gravity * time * time
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
def targetRect(self):
@ -277,7 +277,7 @@ class GameBoard(qt.TQWidget):
quit = qt.TQPushButton("&Quit", self, "quit")
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.setRange(5, 70)
@ -316,7 +316,7 @@ class GameBoard(qt.TQWidget):
accel = qt.TQAccel(self)
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.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.addWidget(quit, 0, 0)

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

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

@ -3,7 +3,7 @@
# TQt tutorial 4.
import sys
import qt
from python_tqt import qt
class MyWidget(qt.TQWidget):
@ -17,7 +17,7 @@ class MyWidget(qt.TQWidget):
quit.setGeometry(62, 40, 75, 30)
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)

@ -3,7 +3,7 @@
# TQt tutorial 5.
import sys
import qt
from python_tqt import qt
class MyWidget(qt.TQVBox):
@ -13,7 +13,7 @@ class MyWidget(qt.TQVBox):
quit = qt.TQPushButton("Quit", self, "quit")
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")

@ -3,7 +3,7 @@
# TQt tutorial 6.
import sys
import qt
from python_tqt import qt
class LCDRange(qt.TQVBox):
@ -24,7 +24,7 @@ class MyWidget(qt.TQVBox):
quit = qt.TQPushButton("Quit", self, "quit")
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)

@ -3,7 +3,7 @@
# TQt tutorial 7.
import sys
import qt
from python_tqt import qt
class LCDRange(qt.TQVBox):
@ -31,7 +31,7 @@ class MyWidget(qt.TQVBox):
quit = qt.TQPushButton("Quit", self, "quit")
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)

@ -3,7 +3,7 @@
# TQt tutorial 8.
import sys
import qt
from python_tqt import qt
class LCDRange(qt.TQVBox):
@ -27,7 +27,7 @@ class LCDRange(qt.TQVBox):
def setRange(self, 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)
@ -67,7 +67,7 @@ class MyWidget(qt.TQWidget):
quit = qt.TQPushButton("Quit", self, "quit")
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.setRange(5, 70)

@ -3,7 +3,7 @@
# TQt tutorial 9.
import sys
import qt
from python_tqt import qt
class LCDRange(qt.TQVBox):
@ -27,7 +27,7 @@ class LCDRange(qt.TQVBox):
def setRange(self, 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)
@ -73,7 +73,7 @@ class MyWidget(qt.TQWidget):
quit = qt.TQPushButton("&Quit", self, "quit")
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.setRange(5, 70)

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

@ -404,7 +404,7 @@
<slot>aboutTQtSlot()</slot>
</slots>
<layoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>qaxwidget.h</includehint>
</includehints>
<includes>
<include location="global" impldecl="in implementation">qaxwidget.h</include>
</includes>
</UI>

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

@ -2,7 +2,7 @@
import sys, string
from qt import *
from python_tqt.qt import *
#
## Constructs an analog clock widget that uses an internal TQTimer.
@ -18,7 +18,7 @@ def TQMIN( x, y ):
class AnalogClock( TQWidget ):
def __init__( self, *args ):
apply( TQWidget.__init__, (self,) + args )
TQWidget.__init__(*(self,) + args)
self.time = TQTime.currentTime() # get current time
internalTimer = TQTimer( self ) # create internal timer
self.connect( internalTimer, SIGNAL("timeout()"), self.timeout )
@ -74,7 +74,7 @@ class AnalogClock( TQWidget ):
class DigitalClock( TQLCDNumber ):
def __init__( self, *args ):
apply( TQLCDNumber.__init__,(self,) + args )
TQLCDNumber.__init__(*(self,) + args)
self.showingColon = 0
self.setFrameStyle(TQFrame.Panel | TQFrame.Raised)
self.setLineWidth( 2 )
@ -112,7 +112,7 @@ class DigitalClock( TQLCDNumber ):
s[2] = ' '
if s[0] == '0':
s[0] = ' '
s = string.join(s,'')
s = ''.join(s)
self.display( s )
def TQMIN( x, y ):
@ -130,7 +130,7 @@ MOVIEFILENAME = "trolltech.gif"
class WidgetView ( TQWidget ):
def __init__( self, *args ):
apply( TQWidget.__init__, (self,) + args )
TQWidget.__init__(*(self,) + args)
# Set the window caption/title
self.setCaption( "TQt Widgets Demo Application" )
@ -223,7 +223,7 @@ class WidgetView ( TQWidget ):
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].setText( "Read" )
self.vbox.addWidget( self.cb[0] )
@ -464,10 +464,10 @@ class WidgetView ( TQWidget ):
TQApplication.setPalette( p, TRUE )
def lineEditTextChanged( self, newText ):
self.msg.setText("Line edit text: " + unicode(newText))
self.msg.setText("Line edit text: " + str(newText))
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.
# 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 )
out << "# " << *it << "\n";
out << "#\n";
out << "# Created: " << TQDateTime::currentDateTime().toString() << "\n";
out << "# by: The PyTQt User Interface Compiler (pyuic) " << PYTQT_VERSION << "\n";
out << "# Created by: The PyTQt User Interface Compiler (pyuic) " << PYTQT_VERSION << "\n";
out << "#\n";
out << "# WARNING! All changes made in this file will be lost!\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
out << ", tqUncompress";
#endif

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

@ -209,8 +209,7 @@ int main( int argc, char * argv[] )
if ( !subcl ) {
out << "# Form implementation generated from reading ui file '" << fileName << "'" << endl;
out << "#" << endl;
out << "# Created: " << TQDateTime::currentDateTime().toString() << endl;
out << "# by: The PyTQt User Interface Compiler (pyuic) " << PYTQT_VERSION << endl;
out << "# Created by: The PyTQt User Interface Compiler (pyuic) " << PYTQT_VERSION << endl;
out << "#" << endl;
out << "# WARNING! All changes made in this file will be lost!" << endl;
out << endl;
@ -220,7 +219,7 @@ int main( int argc, char * argv[] )
if (testCode || execCode)
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 );

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

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

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

@ -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_3_1_0 -)
class TQAssistantClient : TQObject
{
@ -44,9 +43,7 @@ public:
bool isOpen() const;
%If (TQt_3_2_0 -)
void setArguments(const TQStringList &);
%End
public slots:
virtual void openAssistant() /ReleaseGIL/;
@ -60,4 +57,3 @@ signals:
};
%End
%End

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

@ -30,54 +30,6 @@
%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
{
%TypeHeaderCode
@ -101,5 +53,3 @@ public:
bool operator==(const TQBrush &) const;
bool operator!=(const TQBrush &) const;
};
%End

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

@ -19,6 +19,7 @@
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%DefaultEncoding "UTF-8"
%ExportedDoc
<Sect2><Title>TQButtonGroup</Title>
@ -37,51 +38,30 @@ class TQButtonGroup : TQGroupBox
public:
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,
const char * = 0);
TQButtonGroup(int,Orientation,TQWidget * /TransferThis/ = 0,
const char * = 0);
TQButtonGroup(int,Orientation,const TQString &,
TQWidget * /TransferThis/ = 0,const char * = 0);
%End
bool isExclusive() const;
%If (- TQt_2_00)
void setExclusive(bool);
void setButton(int);
%End
%If (TQt_2_00 -)
bool isRadioButtonExclusive() const;
virtual void setExclusive(bool);
virtual void setRadioButtonExclusive(bool);
%End
int insert(TQButton *,int = -1);
void remove(TQButton *);
TQButton *find(int) const;
%If (TQt_2_00 -)
int id(TQButton *) const;
int count() const;
virtual void setButton(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;
%End
%If (TQt_3_2_0 -)
int selectedId() const;
%End
signals:
void pressed(int);
@ -95,9 +75,7 @@ protected slots:
void buttonToggled(bool);
protected:
%If (TQt_3_1_0 -)
bool event(TQEvent *);
%End
private:
TQButtonGroup(const TQButtonGroup &);

@ -98,6 +98,36 @@ class TQByteArray
#include <tqstring.h>
%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:
TQByteArray();
TQByteArray(int);
@ -105,26 +135,19 @@ public:
SIP_PYOBJECT data() const;
%MethodCode
// TQByteArrays aren't '\0' terminated so set the size
// explicitly.
char *res;
uint len;
Py_BEGIN_ALLOW_THREADS
res = sipCpp -> data();
len = sipCpp -> size();
Py_END_ALLOW_THREADS
PyObject* res = TQByteArray_To_String(sipCpp);
if (res)
if (res == Py_None)
{
Py_INCREF(Py_None);
}
else if (res == NULL)
{
if ((sipRes = PyString_FromStringAndSize(res,len)) == NULL)
sipIsErr = 1;
}
else
{
Py_INCREF(Py_None);
sipRes = Py_None;
sipRes = res;
}
%End
@ -151,36 +174,62 @@ public:
SIP_PYOBJECT __str__();
%MethodCode
// TQByteArrays aren't '\0' terminated so set the size
// explicitly.
PyObject* res = TQByteArray_To_String(sipCpp);
char *data;
uint len;
Py_BEGIN_ALLOW_THREADS
data = sipCpp -> data();
len = sipCpp -> size();
Py_END_ALLOW_THREADS
if (data == NULL)
sipRes = PyString_FromString("");
if (res == Py_None)
{
sipRes = SIPBytes_FromString("");
}
else
sipRes = PyString_FromStringAndSize(data,len);
{
sipRes = res;
}
%End
%ConvertToTypeCode
// Allow a Python string whenever a TQByteArray is expected.
if (sipIsErr == NULL)
return (PyString_Check(sipPy) ||
return (SIPBytes_Check(sipPy) ||
PyUnicode_Check(sipPy) ||
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
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;
Py_END_ALLOW_THREADS
@ -195,9 +244,7 @@ public:
};
%If (TQt_3_1_0 -)
TQByteArray tqCompress(const uchar * /Array/,int /ArraySize/);
TQByteArray tqCompress(const TQByteArray &);
TQByteArray tqUncompress(const uchar * /Array/,int /ArraySize/);
TQByteArray tqUncompress(const TQByteArray &);
%End

@ -30,7 +30,6 @@
%If (TQt_STYLE_CDE)
%If (TQt_2_00 -)
class TQCDEStyle : TQMotifStyle
{
@ -41,16 +40,6 @@ class TQCDEStyle : TQMotifStyle
public:
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;
void drawControl(ControlElement,TQPainter *,const TQStyleControlElementData&,ControlElementFlags,
@ -61,8 +50,6 @@ public:
void drawPrimitive(PrimitiveElement,TQPainter *,const TQStyleControlElementData&,ControlElementFlags,const TQRect &,
const TQColorGroup &,SFlags = Style_Default,
const TQStyleOption & = TQStyleOption()) const;
%End
};
%End
%End

@ -36,52 +36,27 @@ class TQCheckBox : TQButton
%End
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(const TQString &,TQWidget * /TransferThis/,const char * = 0);
%End
bool isChecked() const;
%If (TQt_2_00 -)
void setNoChange();
void setTristate(bool = 1);
%End
%If (TQt_2_2_0 -)
bool isTristate() const;
%End
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:
%If (TQt_3_0_0 -)
void setChecked(bool);
%End
protected:
%If (TQt_2_00 -)
void resizeEvent(TQResizeEvent *);
%End
void drawButton(TQPainter *);
void drawButtonLabel(TQPainter *);
%If (TQt_2_00 -)
void updateMask();
%End
%If (TQt_3_2_0 -)
bool hitButton(const TQPoint &) const;
%End
private:
TQCheckBox(const TQCheckBox &);

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

@ -79,31 +79,6 @@ This takes no parameters and returns the <Literal>r</Literal>,
%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.
int tqRed(TQRgb);
@ -113,10 +88,8 @@ TQRgb tqRgb(int,int,int);
int tqGray(int,int,int);
int tqGray(TQRgb);
%If (TQt_2_00 -)
int tqAlpha(TQRgb);
TQRgb tqRgba(int,int,int,int);
%End
class TQColor
@ -135,30 +108,19 @@ public:
TQColor(int,int,int);
TQColor(int,int,int,Spec);
TQColor(TQRgb,uint = 0xffffffff);
%If (TQt_2_00 -)
TQColor(const TQString &);
%End
TQColor(const char *);
TQColor(const TQColor &);
bool isValid() const;
bool isDirty() const;
%If (- TQt_2_00)
void setNamedColor(const char *);
%End
%If (TQt_2_1_0 -)
TQString name() const;
%End
%If (TQt_2_00 -)
void setNamedColor(const TQString &);
%End
TQRgb rgb() const;
void setRgb(int,int,int);
void setRgb(TQRgb);
%If (TQt_3_2_0 -)
void getRgb(int *,int *,int *) const;
%End
// Obsolete and is hidden anyway by the overload above.
//void rgb(int *,int *,int *) const;
@ -169,22 +131,13 @@ public:
void setHsv(int,int,int);
%If (TQt_3_2_0 -)
void getHsv(int *,int *,int *) const;
%End
%If (- TQt_3_2_0)
void getHsv(int &,int &,int &) const;
%End
// Obsolete.
void hsv(int *,int *,int *) const;
TQColor light(int = 150) 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;
@ -197,11 +150,7 @@ public:
static void leaveAllocContext();
static int currentAllocContext();
static void destroyAllocContext(int);
%If (TQt_3_0_0 -)
%End
static void initialize();
static void cleanup();
%If (TQt_3_2_0 -)
static TQStringList colorNames();
%End
};

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

@ -39,38 +39,11 @@ public:
TQColorGroup();
TQColorGroup(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 &,
const TQBrush &,const TQBrush &,const TQBrush &,const TQBrush &,
const TQBrush &);
%End
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
{
Foreground,
@ -91,35 +64,26 @@ public:
LinkVisited,
NColorRoles
};
%End
%If (TQt_2_00 -)
const TQColor &color(ColorRole) const;
const TQBrush &brush(ColorRole) const;
void setColor(ColorRole,const TQColor &);
void setBrush(ColorRole,const TQBrush &);
%End
const TQColor &foreground() const;
%If (TQt_2_00 -)
const TQColor &button() const;
%End
const TQColor &light() const;
const TQColor &dark() const;
const TQColor &mid() const;
const TQColor &text() const;
const TQColor &base() const;
const TQColor &background() const;
%If (TQt_2_00 -)
const TQColor &midlight() const;
const TQColor &brightText() const;
const TQColor &buttonText() const;
const TQColor &shadow() const;
const TQColor &highlight() const;
const TQColor &highlightedText() const;
%End
%If (TQt_3_0_0 -)
const TQColor &link() const;
const TQColor &linkVisited() const;
%End
};

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

@ -48,8 +48,6 @@ This takes only the <Literal>t</Literal> parameter and returns a tuple of the
%End
%If (TQt_2_00 -)
class TQCommonStyle : TQStyle
{
%TypeHeaderCode
@ -57,26 +55,6 @@ class TQCommonStyle : TQStyle
%End
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();
void drawPrimitive(PrimitiveElement,TQPainter *,const TQStyleControlElementData&,ControlElementFlags,const TQRect &,
@ -122,16 +100,6 @@ public:
TQPixmap stylePixmap(StylePixmap,const TQStyleControlElementData&,ControlElementFlags,
const TQStyleOption & = TQStyleOption(), const TQWidget * = 0) const;
%End
private:
%If (- TQt_3_0_0)
TQCommonStyle(GUIStyle);
~TQCommonStyle();
%End
%If (TQt_3_0_0 -)
TQCommonStyle(const TQCommonStyle &);
%End
};
%End

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

@ -34,78 +34,6 @@
%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
{
%TypeHeaderCode
@ -127,10 +55,8 @@ public:
%If (WS_X11)
HANDLE handle() const;
%If (TQt_3_3_0 -)
// This would have the same Python signature as TQCursor(int).
//TQCursor(HANDLE);
%End
%End
static TQPoint pos();
static void setPos(int,int);
@ -141,4 +67,3 @@ public:
static int x11Screen();
%End
};
%End

@ -80,9 +80,7 @@ public:
TQIODevice *device() const;
void setDevice(TQIODevice *);
void unsetDevice();
%If (TQt_2_00 -)
bool atEnd() const;
%End
bool eof() const;
enum ByteOrder {
@ -135,7 +133,6 @@ public:
TQDataStream &writeRawBytes(const char * /Array/,
uint /ArraySize/) /ReleaseGIL/;
%If (TQt_3_0_0 -)
// These are taken from the corresponding class definitions. We limit
// 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>>(TQWMatrix & /Constrained/);
%End
%If (TQt_3_1_0 -)
TQDataStream &operator<<(const TQUuid &);
TQDataStream &operator>>(TQUuid & /Constrained/);
%End
private:
TQDataStream(const TQDataStream &);

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

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

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

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

@ -54,31 +54,10 @@ public:
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;
void show();
%If (TQt_2_00 -)
void hide();
%End
void move(int,int);
void move(const TQPoint &);
void resize(int,int);
@ -86,7 +65,6 @@ public:
void setGeometry(int,int,int,int);
void setGeometry(const TQRect &);
%If (TQt_2_2_0 -)
void setOrientation(Orientation);
Orientation orientation() const;
@ -98,15 +76,11 @@ public:
void setSizeGripEnabled(bool);
bool isSizeGripEnabled() const;
%End
%If (TQt_3_2_0 -)
void setModal(bool);
bool isModal() const;
%End
public slots:
%If (TQt_3_0_0 -)
int exec() /PyName=exec_loop, ReleaseGIL,
PreHook=__pyTQtPreEventLoopHook__,
PostHook=__pyTQtPostEventLoopHook__/;
@ -123,35 +97,22 @@ public slots:
sipRes = sipCpp->TQDialog::exec();
Py_END_ALLOW_THREADS
%End
%End
protected slots:
virtual void done(int);
%If (- TQt_2_00)
void accept();
void reject();
%End
%If (TQt_2_00 -)
virtual void accept();
virtual void reject();
%End
%If (TQt_2_2_0 -)
void showExtension(bool);
%End
protected:
void setResult(int);
void keyPressEvent(TQKeyEvent *);
void closeEvent(TQCloseEvent *);
%If (TQt_2_2_0 -)
void resizeEvent(TQResizeEvent *);
%End
%If (TQt_3_0_0 -)
void contextMenuEvent(TQContextMenuEvent *);
bool eventFilter(TQObject *,TQEvent *);
void adjustPosition(TQWidget *);
%End
private:
TQDialog(const TQDialog &);

@ -158,34 +158,10 @@ public:
};
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,
int = Name | IgnoreCase,int = All);
%End
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 TQString path() const;
virtual TQString absPath() const;
@ -202,29 +178,13 @@ public:
TQString nameFilter() const;
virtual void setNameFilter(const TQString &);
%End
FilterSpec filter() const;
%If (- TQt_2_00)
void setFilter(int);
%End
%If (TQt_2_00 -)
virtual void setFilter(int);
%End
SortSpec sorting() const;
%If (- TQt_2_00)
void setSorting(int);
%End
%If (TQt_2_00 -)
virtual void setSorting(int);
%End
bool matchAllDirs() const;
%If (- TQt_2_00)
void setMatchAllDirs(bool);
%End
%If (TQt_2_00 -)
virtual void setMatchAllDirs(bool);
%End
uint count() const;
@ -288,16 +248,6 @@ public:
Py_END_ALLOW_THREADS
%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,
int = DefaultSort) const;
virtual TQStrList encodedEntryList(const TQString &,int = DefaultFilter,
@ -311,29 +261,9 @@ public:
virtual const TQFileInfoList *entryInfoList(const TQString &,
int = DefaultFilter,
int = DefaultSort) const;
%End
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 rmdir(const TQString &,bool = 1) const;
@ -347,16 +277,10 @@ public:
virtual bool remove(const TQString &,bool = 1);
virtual bool rename(const TQString &,const TQString &,bool = 1);
virtual bool exists(const TQString &,bool = 1);
%End
static char separator();
%If (- TQt_2_00)
static bool setCurrent(const char *);
%End
%If (TQt_2_00 -)
static bool setCurrent(const TQString &);
%End
static TQDir current();
static TQDir home();
static TQDir root();
@ -364,20 +288,9 @@ public:
static TQString homeDirPath();
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 &);
%End
%If (TQt_2_00 -)
static bool match(const TQString &,const TQString &);
static TQString cleanDirPath(const TQString &);
static bool isRelativePath(const TQString &);
%End
%If (TQt_3_1_0 -)
void refresh() const;
%End
};

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

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

@ -20,6 +20,7 @@
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%DefaultEncoding "UTF-8"
%ExportedDoc
<Sect2><Title>TQColorDrag (TQt v2.1+)</Title>
@ -66,44 +67,6 @@
%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
{
%TypeHeaderCode
@ -117,17 +80,10 @@ public:
bool drag();
bool dragMove();
void dragCopy();
%If (TQt_3_0_0 -)
void dragLink();
%End
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 &);
%End
TQPixmap pixmap() const;
TQPoint pixmapHotSpot() const;
%End
@ -138,15 +94,6 @@ public:
static void setTarget(TQWidget *);
%If (TQt_DRAGANDDROP)
%If (- TQt_3_0_0)
enum DragMode {
DragDefault,
DragCopy,
DragMove,
DragCopyOrMove
};
%End
%If (TQt_3_0_0 -)
enum DragMode {
DragDefault,
DragCopy,
@ -155,7 +102,6 @@ public:
DragCopyOrMove
};
%End
%End
protected:
%If (TQt_DRAGANDDROP)
@ -163,13 +109,9 @@ protected:
%End
private:
%If (TQt_3_1_0 -)
TQDragObject(const TQDragObject &);
%End
};
%End
class TQStoredDrag : TQDragObject
{
@ -180,44 +122,16 @@ class TQStoredDrag : TQDragObject
public:
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&);
%End
const char *format(int) const;
virtual TQByteArray encodedData(const char *) const;
private:
%If (TQt_3_1_0 -)
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
{
%TypeHeaderCode
@ -240,13 +154,9 @@ public:
static bool decode(const TQMimeSource *,TQString &,TQCString &);
private:
%If (TQt_3_1_0 -)
TQTextDrag(const TQTextDrag &);
%End
};
%End
class TQImageDrag : TQDragObject
{
@ -258,56 +168,19 @@ public:
TQImageDrag(TQImage,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);
%End
const char *format(int) 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 decode(const TQMimeSource *,TQImage &);
static bool decode(const TQMimeSource *,TQPixmap &);
%End
private:
%If (TQt_3_1_0 -)
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
{
@ -319,14 +192,8 @@ public:
TQUriDrag(TQStrList,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 setUnicodeUris(const TQStringList &);
%End
virtual void setUris(TQStrList);
static TQString uriToLocalFile(const char *);
@ -339,15 +206,9 @@ public:
static bool decodeLocalFiles(const TQMimeSource *,TQStringList &);
private:
%If (TQt_3_1_0 -)
TQUriDrag(const TQUriDrag &);
%End
};
%End
%If (TQt_2_1_0 -)
class TQColorDrag : TQStoredDrag
{
@ -366,9 +227,5 @@ public:
static bool decode(TQMimeSource *,TQColor &);
private:
%If (TQt_3_1_0 -)
TQColorDrag(const TQColorDrag &);
%End
};
%End

@ -54,21 +54,3 @@ void qDrawPlainRect(TQPainter *,int,int,int,int,const TQColor &,int = 1,
const TQBrush * = 0);
void qDrawPlainRect(TQPainter *,const TQRect &,const TQColor &,int = 1,
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:
TQDropSite(TQWidget *);
%If (- TQt_2_00)
virtual void dragEnterEvent(TQDragEnterEvent *);
virtual void dragMoveEvent(TQDragMoveEvent *);
virtual void dragLeaveEvent(TQDragLeaveEvent *);
virtual void dropEvent(TQDropEvent *);
%End
};
%End

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

@ -175,149 +175,6 @@ passed as the event data and its reference count is increased.
%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
{
%TypeHeaderCode
@ -348,7 +205,6 @@ public:
Hide,
Close,
Quit,
%If (TQt_2_1_0 -)
Reparent,
ShowMinimized,
ShowNormal,
@ -357,35 +213,22 @@ public:
ShowToParent,
HideToParent,
ShowMaximized,
%End
%If (TQt_3_0_0 -)
ShowFullScreen,
%End
Accel,
Wheel,
AccelAvailable,
%If (TQt_2_1_0 -)
CaptionChange,
IconChange,
ParentFontChange,
ApplicationFontChange,
ParentPaletteChange,
ApplicationPaletteChange,
%End
%If (TQt_3_0_0 -)
PaletteChange,
%End
Clipboard,
%If (TQt_2_2_0 -)
Speech,
%End
SockAct,
%If (TQt_2_2_0 -)
AccelOverride,
%End
%If (TQt_3_0_0 -)
DeferredDelete,
%End
DragEnter,
DragMove,
DragLeave,
@ -394,30 +237,16 @@ public:
ChildInserted,
ChildRemoved,
LayoutHint,
%If (TQt_2_2_0 -)
ShowWindowRequest,
%End
%If (TQt_3_3_0 -)
WindowBlocked,
WindowUnblocked,
%End
ActivateControl,
DeactivateControl,
%If (TQt_2_1_0 - TQt_2_2_0)
Configure,
ConfigureLayout,
%End
%If (TQt_3_0_0 -)
ContextMenu,
IMStart,
IMCompose,
IMEnd,
Accessibility,
%End
%If (TQt_3_0_0 - TQt_3_1_0)
Tablet,
%End
%If (TQt_3_1_0 -)
TabletMove,
LocaleChange,
LanguageChange,
@ -425,17 +254,12 @@ public:
Style,
TabletPress,
TabletRelease,
%End
%If (TQt_3_3_0 -)
OkRequest,
HelpRequest,
IconDrag,
WindowStateChange,
%End
User,
%If (TQt_3_0_0 -)
MaxUser,
%End
};
TQEvent(Type);
@ -443,9 +267,7 @@ public:
virtual ~TQEvent();
Type type() const;
%If (TQt_3_0_0 -)
bool spontaneous() const;
%End
%ConvertToSubClassCode
switch (sipCpp -> type())
@ -462,9 +284,7 @@ public:
break;
case TQEvent::Accel:
#if TQT_VERSION >= 220
case TQEvent::AccelOverride:
#endif
case TQEvent::KeyPress:
case TQEvent::KeyRelease:
sipClass = sipClass_TQKeyEvent;
@ -491,11 +311,9 @@ public:
sipClass = sipClass_TQCloseEvent;
break;
#if TQT_VERSION >= 0x030300
case TQEvent::IconDrag:
sipClass = sipClass_TQIconDragEvent;
break;
#endif
case TQEvent::Wheel:
sipClass = sipClass_TQWheelEvent;
@ -532,7 +350,6 @@ public:
sipClass = sipClass_TQChildEvent;
break;
#if TQT_VERSION >= 0x030000
case TQEvent::ContextMenu:
sipClass = sipClass_TQContextMenuEvent;
break;
@ -541,19 +358,7 @@ public:
case TQEvent::IMEnd:
sipClass = sipClass_TQIMEvent;
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:
sipClass = sipClass_TQIMComposeEvent;
break;
@ -563,7 +368,6 @@ public:
case TQEvent::TabletRelease:
sipClass = sipClass_TQTabletEvent;
break;
#endif
default:
sipClass = (sipCpp -> type() < TQEvent::User ?
@ -573,8 +377,6 @@ public:
%End
};
%End
class TQTimerEvent : TQEvent
{
@ -596,14 +398,8 @@ class TQMouseEvent : TQEvent
%End
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 &,const TQPoint &,int,int);
%End
const TQPoint &pos() const;
const TQPoint &globalPos() const;
@ -611,25 +407,15 @@ public:
int y() const;
int globalX() const;
int globalY() const;
%If (- TQt_2_00)
int button() const;
int state() const;
%End
%If (TQt_2_00 -)
ButtonState button() const;
ButtonState state() const;
ButtonState stateAfter() const;
%End
%If (TQt_3_0_0 -)
bool isAccepted() const;
void accept();
void ignore();
%End
};
%If (TQt_2_00 -)
class TQWheelEvent : TQEvent
{
%TypeHeaderCode
@ -637,15 +423,9 @@ class TQWheelEvent : TQEvent
%End
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 &,const TQPoint &,int,int,
Orientation = Vertical);
%End
int delta() const;
const TQPoint &pos() const;
@ -655,18 +435,12 @@ public:
int globalX() const;
int globalY() const;
ButtonState state() const;
%If (TQt_3_0_0 -)
Orientation orientation() const;
%End
bool isAccepted() const;
void accept();
void ignore();
};
%End
%If (TQt_3_0_0 -)
class TQTabletEvent : TQEvent
{
@ -682,13 +456,8 @@ public:
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,
const TQPair<int,int> &);
%End
TQTabletEvent(const TQPoint &,const TQPoint &,int,int,int,int,
const TQPair<int,int> &);
@ -708,8 +477,6 @@ public:
TQPair<int,int> uniqueId();
};
%End
class TQKeyEvent : TQEvent
{
@ -718,13 +485,8 @@ class TQKeyEvent : TQEvent
%End
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,
ushort = 1);
%End
int key() const;
int ascii() const;
@ -732,17 +494,11 @@ public:
void accept();
void ignore();
%If (- TQt_2_00)
int state() const;
%End
%If (TQt_2_00 -)
ButtonState state() const;
ButtonState stateAfter() const;
TQString text() const;
bool isAutoRepeat() const;
int count() const;
%End
};
@ -753,28 +509,11 @@ class TQFocusEvent : TQEvent
%End
public:
%If (- TQt_2_00)
TQFocusEvent(int);
%End
%If (TQt_2_00 -)
TQFocusEvent(Type);
%End
bool gotFocus() 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 {
Mouse,
Tab,
@ -784,12 +523,10 @@ public:
Shortcut,
Other
};
%End
static Reason reason();
static void setReason(Reason);
static void resetReason();
%End
};
@ -800,22 +537,13 @@ class TQPaintEvent : TQEvent
%End
public:
%If (- TQt_2_00)
TQPaintEvent(const TQRect &);
%End
%If (TQt_2_00 -)
TQPaintEvent(const TQRegion &,bool = 1);
TQPaintEvent(const TQRect &,bool = 1);
%End
%If (TQt_3_3_0 -)
TQPaintEvent(const TQRegion &,const TQRect &,bool = 1);
%End
const TQRect &rect() const;
%If (TQt_2_00 -)
const TQRegion &region() const;
bool erased() const;
%End
};
@ -862,8 +590,6 @@ public:
};
%If (TQt_3_3_0 -)
class TQIconDragEvent : TQEvent
{
%TypeHeaderCode
@ -878,8 +604,6 @@ public:
void ignore();
};
%End
class TQShowEvent : TQEvent
{
@ -888,14 +612,7 @@ class TQShowEvent : TQEvent
%End
public:
%If (- TQt_3_0_0)
TQShowEvent(bool);
bool spontaneous() const;
%End
%If (TQt_3_0_0 -)
TQShowEvent();
%End
};
@ -906,19 +623,10 @@ class TQHideEvent : TQEvent
%End
public:
%If (- TQt_3_0_0)
TQHideEvent(bool);
bool spontaneous() const;
%End
%If (TQt_3_0_0 -)
TQHideEvent();
%End
};
%If (TQt_3_0_0 -)
class TQContextMenuEvent : TQEvent
{
%TypeHeaderCode
@ -952,10 +660,6 @@ public:
Reason reason() const;
};
%End
%If (TQt_3_0_0 -)
class TQIMEvent : TQEvent
{
@ -971,15 +675,9 @@ public:
bool isAccepted() const;
void accept();
void ignore();
%If (TQt_3_1_0 -)
int selectionLength() const;
%End
};
%End
%If (TQt_3_1_0 -)
class TQIMComposeEvent : TQIMEvent
{
@ -991,31 +689,7 @@ public:
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)
class TQDropEvent : TQEvent, TQMimeSource
@ -1053,41 +727,10 @@ public:
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
%If (TQt_DRAGANDDROP)
%If (TQt_2_00 -)
class TQDragMoveEvent : TQDropEvent
{
@ -1105,8 +748,6 @@ public:
void ignore();
};
%End
class TQDragEnterEvent : TQDragMoveEvent
{
@ -1139,19 +780,9 @@ class TQChildEvent : TQEvent
%End
public:
%If (- TQt_2_00)
TQChildEvent(int,TQWidget *);
%End
%If (TQt_2_00 -)
TQChildEvent(Type,TQObject *);
%End
%If (- TQt_2_00)
TQWidget *child() const;
%End
%If (TQt_2_00 -)
TQObject *child() const;
%End
bool inserted() const;
bool removed() const;
};
@ -1164,15 +795,8 @@ class TQCustomEvent : TQEvent
%End
public:
%If (- TQt_2_00)
TQCustomEvent(int,SIP_PYOBJECT /Transfer/);
%End
%If (TQt_2_00 -)
TQCustomEvent(Type,SIP_PYOBJECT /Transfer/);
%End
%If (TQt_2_1_0 -)
TQCustomEvent(int);
%End
~TQCustomEvent();
%VirtualCatcherCode
// We need to garbage collect any current data.
@ -1197,7 +821,6 @@ public:
Py_INCREF(sipRes);
%End
%If (TQt_2_1_0 -)
void setData(SIP_PYOBJECT /Transfer/);
%MethodCode
// We need to garbage collect any current data.
@ -1207,7 +830,6 @@ public:
Py_XDECREF(old);
%End
%End
%GCTraverseCode
// 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
%If (TQt_3_1_0 -)
class TQEventLoop : TQObject
{
%TypeHeaderCode
@ -60,7 +58,6 @@ public:
virtual void registerSocketNotifier(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
// it to the Windows version until TQt v3.1.1.
void setSocketNotifierPending(TQSocketNotifier *);
@ -68,7 +65,6 @@ public:
int activateTimers();
int timeToWait() const;
%End
virtual int exec() /PyName=exec_loop, ReleaseGIL,
PreHook=__pyTQtPreEventLoopHook__,
@ -85,5 +81,3 @@ signals:
void awake();
void aboutToBlock();
};
%End

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

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

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

@ -37,109 +37,6 @@ class TQFont
%End
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 {
Helvetica,
Times,
@ -153,7 +50,6 @@ public:
Decorative
};
%If (TQt_2_2_0 -)
enum StyleStrategy {
PreferDefault,
PreferBitmap,
@ -162,15 +58,10 @@ public:
ForceOutline,
PreferMatch,
PreferQuality,
%If (TQt_3_0_0 -)
PreferAntialias,
NoAntialias,
%End
%If (TQt_3_2_0 -)
OpenGLCompatible,
%End
};
%End
enum Weight {
Light,
@ -180,7 +71,6 @@ public:
Black
};
%If (TQt_3_2_0 -)
enum Stretch {
UltraCondensed,
ExtraCondensed,
@ -192,29 +82,11 @@ public:
ExtraExpanded,
UltraExpanded
};
%End
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);
%End
%If (TQt_2_00 - TQt_3_0_0)
TQFont(const TQString &,int,int,bool,CharSet);
%End
TQFont(const TQFont &);
%If (- TQt_2_00)
const char *family() const;
void setFamily(const char *);
%End
%If (TQt_2_00 -)
TQString family() const;
void setFamily(const TQString &);
@ -224,7 +96,6 @@ public:
int pixelSize() const;
void setPixelSize(int);
void setPixelSizeFloat(float);
%End
int pointSize() const;
void setPointSize(int);
@ -240,10 +111,8 @@ public:
bool underline() const;
void setUnderline(bool);
%If (TQt_3_2_0 -)
bool overline() const;
void setOverline(bool);
%End
bool strikeOut() const;
void setStrikeOut(bool);
@ -252,29 +121,12 @@ public:
void setFixedPitch(bool);
StyleHint styleHint() const;
%If (TQt_2_2_0 -)
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 setStyleStrategy(StyleStrategy);
%End
%If (- TQt_3_0_0)
CharSet charSet() const;
void setCharSet(CharSet);
%End
%If (TQt_3_2_0 -)
int stretch() const;
void setStretch(int);
%End
bool rawMode() const;
void setRawMode(bool);
@ -286,63 +138,25 @@ public:
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)
TQt::HANDLE handle() const;
%End
%End
void setRawName(const TQString &);
TQString rawName() const;
%End
TQString key() const;
%If (TQt_3_0_0 -)
TQString toString() const;
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 &);
%If (TQt_3_0_0 -)
static TQStringList substitutes(const TQString &);
%End
static TQStringList substitutions();
static void insertSubstitution(const TQString &,const TQString &);
%If (TQt_3_0_0 -)
static void insertSubstitutions(const TQString &,const TQStringList &);
%End
static void removeSubstitution(const TQString &);
%If (- TQt_3_0_0)
static void locale_init();
%End
%End
static void initialize();
static void cleanup();
static void cacheStatistics();
%If (TQt_3_0_0 -)
enum Script {
Latin,
Greek,
@ -399,43 +213,24 @@ public:
Unicode,
%If (TQt_3_2_0 -)
Tagalog,
Hanunoo,
Buhid,
Tagbanwa,
KatakanaHalfWidth,
%End
%If (TQt_3_3_0 -)
Limbu,
TaiLe,
%End
};
TQString defaultFamily() const;
TQString lastResortFamily() 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;
%End
protected:
bool dirty() const;
%If (- TQt_3_0_0)
TQString defaultFamily() const;
TQString lastResortFamily() const;
TQString lastResortFont() const;
%End
int deciPointSize() const;
};

@ -30,7 +30,6 @@
%If (TQt_FONTDATABASE)
%If (TQt_2_1_0 -)
class TQFontDatabase
{
@ -43,42 +42,14 @@ public:
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;
%If (TQt_3_2_0 -)
TQStringList families(TQFont::Script) const;
%End
TQStringList styles(const TQString &) const;
TQValueList<int> pointSizes(const TQString &,
const TQString & = TQString::null);
TQValueList<int> smoothSizes(const TQString &,const TQString &);
%End
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);
bool isBitmapScalable(const TQString &,
@ -86,36 +57,15 @@ public:
bool isSmoothlyScalable(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 &,
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 bold(const TQString &,const TQString &) const;
int weight(const TQString &,const TQString &) const;
static TQString scriptName(TQFont::Script);
static TQString scriptSample(TQFont::Script);
%End
};
%End
%End

@ -50,7 +50,6 @@ and returns a tuple containing the <Literal>TQFont</Literal> result and the
%End
%If (TQt_2_00 -)
%If (TQt_FONTDIALOG)
class TQFontDialog : TQDialog
@ -64,42 +63,11 @@ public:
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:
TQFontDialog(TQWidget * /TransferThis/ = 0,const char * = 0,bool = 0,
WFlags = 0);
%If (TQt_2_1_0 -)
TQFontDialog(const TQFontDialog &);
%End
~TQFontDialog();
};
%End
%End

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

@ -61,9 +61,7 @@ class TQFontMetrics
public:
TQFontMetrics(const TQFont &);
%If (TQt_3_2_0 -)
TQFontMetrics(const TQFont &,TQFont::Script);
%End
TQFontMetrics(const TQFontMetrics &);
int ascent() const;
@ -74,60 +72,12 @@ public:
int minLeftBearing() const;
int minRightBearing() 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;
int leftBearing(TQChar) const;
int rightBearing(TQChar) const;
int width(const TQString &,int = -1) const;
int width(TQChar) const;
%If (TQt_3_0_0 -)
int charWidth(const TQString &,int) const;
%End
TQRect boundingRect(const TQString &,int = -1) const;
TQRect boundingRect(TQChar) const;
@ -165,13 +115,10 @@ public:
if (tabarray)
sipFree((void *)tabarray);
}
%End
%End
int underlinePos() const;
%If (TQt_3_2_0 -)
int overlinePos() const;
%End
int strikeOutPos() const;
int lineWidth() const;
@ -201,7 +148,7 @@ static int intListToArray(PyObject *pl,int **ap)
for (i = 0; i < nint; ++i)
{
*ip++ = PyInt_AsLong(PyList_GetItem(pl,i));
*ip++ = PyLong_AsLong(PyList_GetItem(pl,i));
if (PyErr_Occurred())
{

@ -36,50 +36,16 @@ class TQFrame : TQWidget
%End
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);
%End
int frameStyle() const;
%If (- TQt_2_00)
void setFrameStyle(int);
%End
%If (TQt_2_00 -)
virtual void setFrameStyle(int);
%End
int frameWidth() const;
TQRect contentsRect() const;
%If (- TQt_2_00)
bool lineShapesOk() const;
%End
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 {
NoFrame,
Box,
@ -89,91 +55,45 @@ public:
VLine,
StyledPanel,
PopupPanel,
%If (TQt_3_0_0 -)
MenuBarPanel,
ToolBarPanel,
%End
%If (TQt_3_0_1 -)
LineEditPanel,
TabWidgetPanel,
%End
%If (TQt_3_1_0 -)
GroupBoxPanel,
%End
MShape
};
%End
%If (TQt_2_00 -)
enum Shadow {
Plain,
Raised,
Sunken,
MShadow
};
%End
%If (- TQt_2_00)
int frameShape() const;
%End
%If (TQt_2_00 -)
Shape frameShape() const;
void setFrameShape(Shape);
%End
%If (- TQt_2_00)
int frameShadow() const;
%End
%If (TQt_2_00 -)
Shadow frameShadow() const;
void setFrameShadow(Shadow);
%End
int lineWidth() const;
%If (- TQt_2_00)
void setLineWidth(int);
%End
%If (TQt_2_00 -)
virtual void setLineWidth(int);
%End
int margin() const;
%If (- TQt_2_00)
void setMargin(int);
%End
%If (TQt_2_00 -)
virtual void setMargin(int);
%End
int midLineWidth() const;
%If (- TQt_2_00)
void setMidLineWidth(int);
%End
%If (TQt_2_00 -)
virtual void setMidLineWidth(int);
%End
TQRect frameRect() const;
%If (TQt_2_00 -)
virtual void setFrameRect(const TQRect &);
%End
protected:
%If (- TQt_2_00)
void setFrameRect(const TQRect &);
%End
void paintEvent(TQPaintEvent *);
void resizeEvent(TQResizeEvent *);
virtual void drawFrame(TQPainter *);
virtual void drawContents(TQPainter *);
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 &);
%End
private:
TQFrame(const TQFrame &);

@ -54,10 +54,6 @@ typedef unsigned long long TQ_ULONG;
const char *tqVersion();
%If (TQt_3_0_0 -)
%End
%If (TQt_3_1_0 -)
const char *tqInstallPath();
const char *tqInstallPathDocs();
const char *tqInstallPathHeaders();
@ -65,10 +61,7 @@ const char *tqInstallPathLibs();
const char *tqInstallPathBins();
const char *tqInstallPathPlugins();
const char *tqInstallPathData();
%End
%If (TQt_3_2_0 -)
const char *tqInstallPathTranslations();
%If (!WS_WIN)
const char *tqInstallPathSysconf();
%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
%If (TQt_2_00 -)
class TQGrid : TQFrame
{
%TypeHeaderCode
@ -38,35 +36,16 @@ class TQGrid : TQFrame
%End
public:
%If (- TQt_3_0_0)
enum Direction {
Horizontal,
Vertical
};
%End
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,
WFlags = 0);
%End
void setSpacing(int);
%If (TQt_2_1_0 -)
TQSize sizeHint() const;
%End
protected:
void frameChanged();
private:
%If (TQt_2_1_0 -)
TQGrid(const TQGrid &);
%End
};
%End

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

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

@ -29,8 +29,6 @@
%End
%If (TQt_2_00 -)
class TQHBox : TQFrame
{
%TypeHeaderCode
@ -38,38 +36,17 @@ class TQHBox : TQFrame
%End
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);
%End
void setSpacing(int);
%If (TQt_2_1_0 -)
bool setStretchFactor(TQWidget *,int);
TQSize sizeHint() const;
%End
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);
%End
void frameChanged();
private:
%If (TQt_3_1_0 -)
TQHBox(const TQHBox &);
%End
};
%End

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

@ -29,71 +29,6 @@
%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
{
%TypeHeaderCode
@ -106,9 +41,7 @@ public:
int addLabel(const TQString &,int = -1);
int addLabel(const TQIconSet &,const TQString &,int = -1);
%If (TQt_2_1_0 -)
void removeLabel(int);
%End
virtual void setLabel(int,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 setResizeEnabled(bool,int = -1);
virtual void setMovingEnabled(bool);
%If (TQt_3_0_0 -)
virtual void setStretchEnabled(bool,int);
%End
%If (TQt_2_1_0 -)
bool isClickEnabled(int = -1) const;
bool isResizeEnabled(int = -1) const;
bool isMovingEnabled() const;
%End
%If (TQt_3_0_0 -)
bool isStretchEnabled() const;
bool isStretchEnabled(int) const;
%End
%If (TQt_2_1_0 -)
void resizeSection(int,int);
int sectionSize(int) const;
int sectionPos(int) const;
int sectionAt(int) const;
%End
int count() const;
%If (TQt_3_0_0 -)
int headerWidth() 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;
TQSize sizeHint() const;
%If (- TQt_3_0_0)
TQSizePolicy sizePolicy() const;
%End
%If (TQt_2_1_0 -)
int mapToSection(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);
%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
// precedence. It may still cause problems with old code until SIP
// distinguishes between bools and enums.
void setSortIndicator(int,SortOrder);
int sortIndicatorSection() const;
SortOrder sortIndicatorOrder() const;
%End
%If (TQt_2_1_0 -)
// Obsolete.
void setSortIndicator(int,bool = 1);
%End
%If (TQt_3_0_0 -)
void adjustHeaderSize();
%End
public slots:
%If (TQt_2_2_0 -)
void setUpdatesEnabled(bool);
%End
virtual void setOffset(int);
signals:
%If (TQt_2_1_0 -)
void clicked(int);
void pressed(int);
void released(int);
%End
void sizeChange(int,int,int);
%If (TQt_2_1_0 -)
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);
%End
protected:
%If (TQt_2_1_0 -)
void paintEvent(TQPaintEvent *);
%End
%If (TQt_2_2_0 -)
void showEvent(TQShowEvent *);
%End
%If (- TQt_2_1_0)
void resizeEvent(TQResizeEvent *);
%End
%If (TQt_3_0_0 -)
void resizeEvent(TQResizeEvent *);
%End
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 paintSectionLabel(TQPainter *,int,const TQRect &);
%End
%If (TQt_3_1_0 -)
void fontChange(const TQFont &);
%End
void mousePressEvent(TQMouseEvent *);
void mouseReleaseEvent(TQMouseEvent *);
void mouseMoveEvent(TQMouseEvent *);
%If (TQt_3_2_0 -)
void mouseDoubleClickEvent(TQMouseEvent *);
%End
%If (TQt_3_1_0 -)
void keyPressEvent(TQKeyEvent *);
void keyReleaseEvent(TQKeyEvent *);
%End
private:
TQHeader(const TQHeader &);
};
%End

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

@ -54,73 +54,36 @@ public:
Active
};
%If (TQt_3_0_0 -)
enum State {
On,
Off
};
%End
%If (TQt_2_1_0 -)
TQIconSet();
%End
TQIconSet(const TQPixmap &,Size = Automatic);
%If (TQt_2_2_0 -)
TQIconSet(const TQPixmap &,const TQPixmap &);
%End
TQIconSet(const TQIconSet &);
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 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,bool,State = Off) const;
%End
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;
void clearGenerated();
%End
%If (TQt_3_1_0 -)
void installIconFactory(TQIconFactory *);
%End
%If (TQt_2_1_0 -)
bool isNull() const;
%End
void detach();
%If (TQt_3_0_0 -)
static void setIconSize(Size,const TQSize &);
static const TQSize &iconSize(Size);
%End
};
%If (TQt_3_1_0 -)
class TQIconFactory
{
%TypeHeaderCode
@ -142,5 +105,3 @@ public:
private:
TQIconFactory(const TQIconFactory &);
};
%End

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

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

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

@ -72,9 +72,7 @@ const int IO_OpenError;
const int IO_ConnectError;
const int IO_AbortError;
const int IO_TimeOutError;
%If (TQt_2_00 -)
const int IO_UnspecifiedError;
%End
class TQIODevice
@ -84,9 +82,7 @@ class TQIODevice
%End
public:
%If (TQt_3_0_0 -)
typedef TQ_ULONG Offset;
%End
TQIODevice();
@ -114,80 +110,12 @@ public:
virtual void close() = 0;
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 at() const;
virtual bool at(Offset);
%End
virtual bool atEnd() const;
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)];
%MethodCode
char *buf;
@ -211,7 +139,7 @@ public:
}
else
{
sipRes = PyString_FromStringAndSize(buf,actlen);
sipRes = SIPBytes_FromStringAndSize(buf,actlen);
sipFree((void *)buf);
@ -231,93 +159,25 @@ public:
if (buf == Py_None)
sipRes = -1L;
else if (!PyString_Check(buf))
else if (!SIPBytes_Check(buf))
{
sipBadCatcherResult(sipMethod);
sipIsErr = 1;
}
else
{
memcpy(a0,PyString_AS_STRING(buf),PyString_GET_SIZE(buf));
sipRes = PyString_GET_SIZE(buf);
memcpy(a0,SIPBytes_AS_STRING(buf),SIPBytes_GET_SIZE(buf));
sipRes = SIPBytes_GET_SIZE(buf);
}
Py_DECREF(buf);
Py_DECREF(result);
}
%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/,
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)];
%MethodCode
char *buf;
@ -341,7 +201,7 @@ public:
}
else
{
sipRes = PyString_FromStringAndSize(buf,actlen);
sipRes = SIPBytes_FromStringAndSize(buf,actlen);
sipFree((void *)buf);
@ -361,36 +221,25 @@ public:
if (buf == Py_None)
sipRes = -1L;
else if (!PyString_Check(buf))
else if (!SIPBytes_Check(buf))
{
sipBadCatcherResult(sipMethod);
sipIsErr = 1;
}
else
{
memcpy(a0,PyString_AS_STRING(buf),PyString_GET_SIZE(buf));
sipRes = PyString_GET_SIZE(buf);
memcpy(a0,SIPBytes_AS_STRING(buf),SIPBytes_GET_SIZE(buf));
sipRes = SIPBytes_GET_SIZE(buf);
}
Py_DECREF(buf);
Py_DECREF(result);
}
%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/;
%End
%If (TQt_2_00 - TQt_3_0_0)
TQByteArray readAll() /ReleaseGIL/;
%End
%If (TQt_3_0_0 -)
virtual TQByteArray readAll() /ReleaseGIL/;
%End
virtual int getch() = 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
%If (TQt_3_0_0 -)
class TQKeySequence : TQt
{
%TypeHeaderCode
@ -44,7 +42,6 @@ public:
TQKeySequence();
TQKeySequence(const TQString &);
TQKeySequence(int);
%If (TQt_3_1_0 -)
TQKeySequence(int,int,int = 0,int = 0);
bool operator==(const TQKeySequence &) const;
@ -53,7 +50,6 @@ public:
uint count() const;
bool isEmpty() const;
TQt::SequenceMatch matches(const TQKeySequence &) const;
%End
int __int__() const;
@ -71,7 +67,7 @@ public:
PyErr_Clear();
PyInt_AsLong(sipPy);
PyLong_AsLong(sipPy);
return !PyErr_Occurred();
}
@ -106,7 +102,7 @@ public:
return sipGetState(sipTransferObj);
}
int key = PyInt_AsLong(sipPy);
int key = (int)PyLong_AsLong(sipPy);
Py_BEGIN_ALLOW_THREADS
*sipCppPtr = new TQKeySequence(key);
@ -115,5 +111,3 @@ public:
return sipGetState(sipTransferObj);
%End
};
%End

@ -19,6 +19,7 @@
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%DefaultEncoding "UTF-8"
%ExportedDoc
<Sect2><Title>TQLabel</Title>
@ -36,121 +37,48 @@ class TQLabel : TQFrame
%End
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(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;
%End
TQPixmap *pixmap() const;
%If (TQt_3_0_0 -)
TQPicture *picture() const;
%End
TQMovie *movie() const;
%If (TQt_2_00 -)
TextFormat textFormat() const;
void setTextFormat(TextFormat);
%End
int alignment() const;
%If (- TQt_2_00)
void setAlignment(int);
%End
%If (TQt_2_00 -)
virtual void setAlignment(int);
%End
%If (- TQt_2_00)
int margin() const;
void setMargin(int);
%End
%If (TQt_2_00 -)
int indent() const;
void setIndent(int);
%End
bool autoResize() const;
%If (- TQt_2_00)
void setAutoResize(bool);
%End
%If (TQt_2_00 -)
virtual void setAutoResize(bool);
%End
%If (TQt_2_2_0 -)
bool hasScaledContents() const;
void setScaledContents(bool);
%End
%If (TQt_2_00 - TQt_3_0_0)
TQSizePolicy sizePolicy() const;
%End
TQSize sizeHint() const;
%If (TQt_2_1_0 -)
TQSize minimumSizeHint() const;
%End
%If (- TQt_2_00)
void setBuddy(TQWidget *);
%End
%If (TQt_2_00 -)
virtual void setBuddy(TQWidget *);
%End
TQWidget *buddy() const;
%If (TQt_2_00 - TQt_3_0_0)
void setAutoMask(bool);
%End
%If (TQt_2_00 -)
int heightForWidth(int) const;
%End
%If (TQt_3_0_0 -)
void setFont(const TQFont &);
%End
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 setPixmap(const TQPixmap &);
%End
%If (TQt_3_0_0 -)
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 setNum(int /Constrained/);
virtual void setNum(double);
%End
void clear();
protected:
void drawContents(TQPainter *);
%If (TQt_2_00 - TQt_3_0_0)
void drawContentsMask(TQPainter *);
%End
%If (TQt_2_1_0 -)
void fontChange(const TQFont &);
%End
%If (TQt_2_2_0 -)
void resizeEvent(TQResizeEvent *);
%End
private:
TQLabel(const TQLabel &);

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

@ -19,6 +19,7 @@
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%DefaultEncoding "UTF-8"
%ExportedDoc
<Sect2><Title>TQLCDNumber</Title>
@ -39,22 +40,12 @@ public:
TQLCDNumber(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 {
Hex, HEX = Hex,
Dec, DEC = Dec,
Oct, OCT = Oct,
Bin, BIN = Bin
};
%End
enum SegmentStyle {
Outline,
@ -65,71 +56,36 @@ public:
bool smallDecimalPoint() const;
int numDigits() const;
%If (- TQt_2_00)
void setNumDigits(int);
%End
%If (TQt_2_00 -)
virtual void setNumDigits(int);
%End
bool checkOverflow(int /Constrained/) const;
bool checkOverflow(double) const;
Mode mode() const;
%If (- TQt_2_00)
void setMode(Mode);
%End
%If (TQt_2_00 -)
virtual void setMode(Mode);
%End
SegmentStyle segmentStyle() const;
%If (- TQt_2_00)
void setSegmentStyle(SegmentStyle);
%End
%If (TQt_2_00 -)
virtual void setSegmentStyle(SegmentStyle);
%End
double value() const;
int intValue() const;
TQSize sizeHint() const;
%If (TQt_2_00 - TQt_3_0_0)
TQSizePolicy sizePolicy() const;
%End
public slots:
%If (- TQt_2_00)
void display(const char *);
%End
%If (TQt_2_00 -)
void display(const TQString &);
%End
void display(int /Constrained/);
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 setDecMode();
virtual void setOctMode();
virtual void setBinMode();
virtual void setSmallDecimalPoint(bool);
%End
signals:
void overflow();
protected:
%If (- TQt_2_00)
void resizeEvent(TQResizeEvent *);
%End
void drawContents(TQPainter *);
private:

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

@ -54,8 +54,6 @@ This takes no parameters and returns the bool result and the
%End
%If (TQt_3_0_0 -)
class TQLineEdit : TQFrame
{
%TypeHeaderCode
@ -65,10 +63,8 @@ class TQLineEdit : TQFrame
public:
TQLineEdit(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/,
const char * = 0);
%End
TQString text() const;
@ -108,10 +104,8 @@ public:
void home(bool);
void end(bool);
%If (TQt_3_2_0 -)
bool isModified() const;
void clearModified();
%End
// Obsolete.
bool edited() const;
@ -120,20 +114,16 @@ public:
bool hasSelectedText() const;
TQString selectedText() const;
%If (TQt_3_2_0 -)
int selectionStart() const;
%End
bool isUndoAvailable() const;
bool isRedoAvailable() const;
bool dragEnabled() const;
%If (TQt_3_2_0 -)
TQString inputMask() const;
void setInputMask(const TQString &);
bool hasAcceptableInput() const;
%End
public slots:
virtual void setText(const TQString &);
@ -164,9 +154,7 @@ public slots:
signals:
void textChanged(const TQString &);
void returnPressed();
%If (TQt_3_1_0 -)
void lostFocus();
%End
void selectionChanged();
protected:
@ -196,10 +184,8 @@ protected:
public:
// 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.
%If (TQt_3_1_0 -)
void setPasswordChar(TQChar);
TQChar passwordChar() const;
%End
// Obsolete.
SIP_PYTUPLE characterAt(int) const;
@ -221,207 +207,3 @@ public:
private:
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
%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
{
%TypeHeaderCode
@ -184,39 +74,27 @@ public:
// void insertStrList(const char **,int = -1,int = -1);
void insertItem(const TQListBoxItem * /Transfer/,int = -1);
%If (TQt_2_1_0 -)
void insertItem(const TQListBoxItem * /Transfer/,const TQListBoxItem *);
%End
void insertItem(const TQString &,int = -1);
void insertItem(const TQPixmap &,int = -1);
%If (TQt_2_1_0 -)
void insertItem(const TQPixmap &,const TQString &,int = -1);
%End
void removeItem(int);
%If (- TQt_3_0_0)
void clear();
%End
TQString text(int) const;
const TQPixmap *pixmap(int) const;
void changeItem(const TQListBoxItem * /Transfer/,int);
void changeItem(const TQString &,int);
void changeItem(const TQPixmap &,int);
%If (TQt_2_1_0 -)
void changeItem(const TQPixmap &,const TQString &,int);
%End
void takeItem(const TQListBoxItem * /TransferBack/);
int numItemsVisible() const;
int currentItem() const;
%If (TQt_2_1_0 -)
TQString currentText() const;
%End
virtual void setCurrentItem(int);
virtual void setCurrentItem(TQListBoxItem *);
void centerCurrentItem();
@ -226,21 +104,12 @@ public:
long maxItemWidth() const;
%If (- TQt_2_1_0)
enum SelectionMode {
Single,
Multi,
Extended
};
%End
%If (TQt_2_1_0 -)
enum SelectionMode {
Single,
Multi,
Extended,
NoSelection
};
%End
virtual void setSelectionMode(SelectionMode);
SelectionMode selectionMode() const;
@ -252,22 +121,15 @@ public:
void setSelected(int,bool);
bool isSelected(int) const;
bool isSelected(TQListBoxItem *) const;
%If (TQt_3_1_0 -)
TQListBoxItem *selectedItem() const;
%End
TQSize sizeHint() const;
TQSize minimumSizeHint() const;
TQListBoxItem *item(int) 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 &,
ComparisonFlags = BeginsWith) const;
%End
void triggerUpdate(bool);
@ -305,26 +167,16 @@ public:
TQRect itemRect(TQListBoxItem *) const;
%If (TQt_2_1_0 -)
TQListBoxItem *firstItem() const;
void sort(bool = 1);
%End
public slots:
%If (TQt_3_0_0 -)
void clear();
%End
virtual void ensureCurrentVisible();
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 invertSelection();
%End
signals:
void highlighted(int);
@ -335,7 +187,6 @@ signals:
void selected(TQListBoxItem *);
void selectionChanged();
%If (TQt_2_1_0 -)
void selectionChanged(TQListBoxItem *);
void currentChanged(TQListBoxItem *);
void clicked(TQListBoxItem *);
@ -349,31 +200,17 @@ signals:
void rightButtonPressed(TQListBoxItem *,const TQPoint &);
void mouseButtonPressed(int,TQListBoxItem *,const TQPoint &);
void mouseButtonClicked(int,TQListBoxItem *,const TQPoint &);
%End
%If (TQt_3_0_0 -)
void contextMenuRequested(TQListBoxItem *,const TQPoint &);
%End
%If (TQt_2_1_0 -)
void onItem(TQListBoxItem *);
void onViewport();
%End
protected:
%If (- TQt_3_0_0)
void viewportMousePressEvent(TQMouseEvent *);
void viewportMouseReleaseEvent(TQMouseEvent *);
void viewportMouseDoubleClickEvent(TQMouseEvent *);
void viewportMouseMoveEvent(TQMouseEvent *);
%End
void mousePressEvent(TQMouseEvent *);
void mouseReleaseEvent(TQMouseEvent *);
void mouseDoubleClickEvent(TQMouseEvent *);
void mouseMoveEvent(TQMouseEvent *);
%If (TQt_3_0_0 -)
void contentsContextMenuEvent(TQContextMenuEvent *);
%End
void keyPressEvent(TQKeyEvent *);
void focusInEvent(TQFocusEvent *);
@ -381,9 +218,7 @@ protected:
void resizeEvent(TQResizeEvent *);
void showEvent(TQShowEvent *);
%If (TQt_3_0_0 -)
bool eventFilter(TQObject *,TQEvent *);
%End
void updateItem(int);
void updateItem(TQListBoxItem *);
@ -391,27 +226,19 @@ protected:
virtual void paintCell(TQPainter *,int,int);
void toggleCurrentItem();
%If (TQt_2_2_0 -)
bool isRubberSelecting() const;
%End
void doLayout() const;
%If (TQt_3_0_0 -)
void windowActivationChange(bool);
%End
protected slots:
%If (TQt_2_1_0 -)
void clearInputString();
%End
private:
TQListBox(const TQListBox &);
};
%End
class TQListBoxItem
{
@ -420,71 +247,32 @@ class TQListBoxItem
%End
public:
%If (- TQt_2_00)
TQListBoxItem();
%End
%If (TQt_2_00 -)
TQListBoxItem(TQListBox * /TransferThis/ = 0);
%End
%If (TQt_2_1_0 -)
TQListBoxItem(TQListBox * /TransferThis/,TQListBoxItem *);
%End
%If (- TQt_2_00)
virtual const char *text() const;
%End
%If (TQt_2_00 -)
virtual TQString text() const;
%End
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 width(const TQListBox *) const;
%End
%If (TQt_2_00 - TQt_3_0_0)
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;
%End
%If (TQt_2_00 -)
TQListBox *listBox() const;
%End
%If (TQt_2_1_0 -)
void setSelectable(bool);
bool isSelectable() const;
TQListBoxItem *next() const;
TQListBoxItem *prev() const;
%End
%If (TQt_3_0_0 -)
virtual int rtti() const;
%End
protected:
virtual void paint(TQPainter *) = 0;
%If (- TQt_2_00)
void setText(const char *);
%End
%If (TQt_2_00 -)
virtual void setText(const TQString &);
%End
%If (TQt_2_1_0 -)
void setCustomHighlighting(bool);
%End
private:
TQListBoxItem(const TQListBoxItem &);
@ -497,32 +285,18 @@ class TQListBoxText : TQListBoxItem
%End
public:
%If (- TQt_2_00)
TQListBoxText(const char * = 0);
%End
%If (TQt_2_00 -)
TQListBoxText(TQListBox * /TransferThis/,
const TQString & = TQString::null);
TQListBoxText(const TQString & = TQString::null);
%End
%If (TQt_2_1_0 -)
TQListBoxText(TQListBox * /TransferThis/,const TQString &,TQListBoxItem *);
%End
%If (- TQt_2_00)
void paint(TQPainter *);
%End
int height(const TQListBox *) const;
int width(const TQListBox *) const;
%If (TQt_3_0_0 -)
int rtti() const;
%End
protected:
%If (TQt_2_00 -)
void paint(TQPainter *);
%End
private:
TQListBoxText(const TQListBoxText &);
@ -535,11 +309,8 @@ class TQListBoxPixmap : TQListBoxItem
%End
public:
%If (TQt_2_00 -)
TQListBoxPixmap(TQListBox * /TransferThis/,const TQPixmap &);
%End
TQListBoxPixmap(const TQPixmap &);
%If (TQt_2_1_0 -)
TQListBoxPixmap(TQListBox * /TransferThis/,const TQPixmap &,
TQListBoxItem *);
TQListBoxPixmap(TQListBox * /TransferThis/,const TQPixmap &,
@ -547,24 +318,15 @@ public:
TQListBoxPixmap(const TQPixmap &,const TQString &);
TQListBoxPixmap(TQListBox * /TransferThis/,const TQPixmap &,
const TQString &,TQListBoxItem *);
%End
const TQPixmap *pixmap() const;
%If (TQt_2_00 -)
int height(const TQListBox *) const;
int width(const TQListBox *) const;
%End
%If (TQt_3_0_0 -)
int rtti() const;
%End
protected:
void paint(TQPainter *);
%If (- TQt_2_00)
int height(const TQListBox *) const;
int width(const TQListBox *) const;
%End
private:
TQListBoxPixmap(const TQListBoxPixmap &);

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

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

@ -19,6 +19,7 @@
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%DefaultEncoding "UTF-8"
%ExportedDoc
<Sect2><Title>TQMainWindow</Title>
@ -72,12 +73,7 @@ class TQMainWindow : TQWidget
%End
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);
%End
TQMenuBar *menuBar() const;
TQStatusBar *statusBar() const;
@ -85,52 +81,7 @@ public:
virtual void setCentralWidget(TQWidget *);
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);
%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(TQDockArea *) const;
virtual void setDockEnabled(TQDockWindow *,Dock,bool);
@ -143,53 +94,29 @@ public:
virtual void moveDockWindow(TQDockWindow *,Dock = DockTop);
virtual void moveDockWindow(TQDockWindow *,Dock,bool,int,int = -1);
virtual void removeDockWindow(TQDockWindow *);
%End
void show();
%If (TQt_3_1_0 -)
void hide();
%End
%If (TQt_2_1_0 -)
TQSize sizeHint() const;
TQSize minimumSizeHint() const;
%End
bool rightJustification() const;
bool usesBigPixmaps() const;
%If (TQt_2_1_0 -)
bool usesTextLabel() const;
%End
%If (TQt_3_0_0 -)
bool dockWindowsMovable() const;
%End
%If (TQt_2_1_0 -)
bool opaqueMoving() const;
%End
bool eventFilter(TQObject *,TQEvent *);
%If (TQt_3_0_0 -)
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() const;
void lineUpDockWindows(bool = 0);
%End
%If (TQt_2_1_0 -)
void lineUpToolBars(bool = 0);
bool isDockMenuEnabled() const;
%End
%If (TQt_3_0_0 -)
bool hasDockWindow(TQDockWindow *);
TQPtrList<TQToolBar> toolBars(Dock) const;
@ -211,79 +138,34 @@ public:
};
TQPopupMenu *createDockWindowMenu(DockWindows = AllDockWindows) const;
%End
public slots:
%If (- TQt_2_00)
void setRightJustification(bool);
void setUsesBigPixmaps(bool);
%End
%If (TQt_2_00 -)
virtual void setRightJustification(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 setDockWindowsMovable(bool);
virtual void setOpaqueMoving(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 setAppropriate(TQDockWindow *,bool);
virtual void customize();
%End
signals:
void pixmapSizeChanged(bool);
%If (TQt_2_1_0 -)
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 *);
%End
protected slots:
%If (- TQt_2_00)
void setUpLayout();
%End
%If (TQt_2_00 -)
virtual void setUpLayout();
%End
%If (TQt_3_0_0 -)
virtual bool showDockMenu(const TQPoint &);
void menuAboutToShow();
%End
protected:
void paintEvent(TQPaintEvent *);
%If (TQt_2_00 -)
void childEvent(TQChildEvent *);
%End
bool event(TQEvent *);
%If (TQt_2_00 - TQt_3_0_0)
void resizeEvent(TQResizeEvent *);
%End
%If (TQt_2_00 -)
void styleChange(TQStyle &);
%End
private:
%If (TQt_2_00 -)
TQMainWindow(const TQMainWindow &);
%End
};

@ -31,8 +31,6 @@ converted to and from Python lists of the type.
%End
%If (TQt_3_0_0 -)
%MappedType TQMemArray<int>
{
%TypeHeaderCode
@ -50,7 +48,7 @@ converted to and from Python lists of the type.
// Get it.
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);
@ -72,7 +70,7 @@ converted to and from Python lists of the type.
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)
{
@ -117,7 +115,7 @@ template<TYPE>
return NULL;
}
PyList_SET_ITEM(l, i, tobj);
PyList_SetItem(l, i, tobj);
}
return l;
@ -164,5 +162,3 @@ template<TYPE>
return sipGetState(sipTransferObj);
%End
};
%End

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

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

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

@ -58,7 +58,6 @@ public:
const char *superClassName() const;
TQMetaObject *superClass() const;
%If (TQt_2_1_0 -)
bool inherits(const char *) const;
int numSlots(bool = 0) const;
@ -72,18 +71,12 @@ public:
const char *classInfo(const char *,bool = 0) const;
%If (TQt_PROPERTIES)
%If (TQt_3_0_0 -)
const TQMetaProperty *property(int,bool = 0) const;
int findProperty(const char *,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;
%End
%End
private:
TQMetaObject(const TQMetaObject &);
@ -91,7 +84,6 @@ private:
%If (TQt_PROPERTIES)
%If (TQt_2_1_0 -)
class TQMetaProperty
{
@ -103,12 +95,7 @@ public:
const char *type() const;
const char *name() const;
%If (TQt_2_2_0 -)
bool writable() const;
%End
%If (- TQt_3_0_0)
bool writeable() const;
%End
bool isValid() const;
bool isSetType() const;
@ -120,51 +107,11 @@ public:
int keysToValue(const TQStrList &) const;
TQStrList valueToKeys(int) const;
%If (TQt_3_1_0 -)
bool designable(TQObject * = 0) const;
bool scriptable(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;
%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

@ -42,8 +42,6 @@
%End
%If (TQt_2_00 -)
class TQMimeSource
{
%TypeHeaderCode
@ -51,16 +49,12 @@ class TQMimeSource
%End
public:
%If (TQt_3_0_0 -)
TQMimeSource();
%End
virtual const char *format(int = 0) const = 0;
virtual bool provides(const char *) const;
virtual TQByteArray encodedData(const char *) const = 0;
%If (TQt_3_0_0 -)
int serialNumber() const;
%End
};
@ -75,11 +69,9 @@ public:
static TQMimeSourceFactory *defaultFactory();
static void setDefaultFactory(TQMimeSourceFactory * /Transfer/);
%If (TQt_3_0_0 -)
static TQMimeSourceFactory *takeDefaultFactory() /TransferBack/;
static void addFactory(TQMimeSourceFactory *);
static void removeFactory(TQMimeSourceFactory *);
%End
virtual const TQMimeSource *data(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 setData(const TQString &,TQMimeSource * /Transfer/);
virtual void setFilePath(const TQStringList &);
%If (TQt_2_1_0 -)
virtual TQStringList filePath() const;
void addFilePath(const TQString &);
%End
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_2_2_0 -)
class TQMotifPlusStyle : TQMotifStyle
{
@ -60,12 +59,7 @@ class TQMotifPlusStyle : TQMotifStyle
%End
public:
%If (- TQt_3_0_5)
TQMotifPlusStyle(bool = 0);
%End
%If (TQt_3_0_5 -)
TQMotifPlusStyle(bool = 1);
%End
void polish(TQPalette &pal);
void polish(const TQStyleControlElementData&, ControlElementFlags, void *);
@ -74,45 +68,6 @@ public:
void applicationPolish(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 &,
const TQColorGroup &,SFlags = Style_Default,
const TQStyleOption & = TQStyleOption()) const;
@ -139,11 +94,9 @@ public:
int styleHint(StyleHint,const TQStyleControlElementData&,ControlElementFlags,
const TQStyleOption & = TQStyleOption(),
TQStyleHintReturn * = 0, const TQWidget * = 0) const;
%End
protected:
bool eventFilter(TQObject *,TQEvent *);
};
%End
%End

@ -53,7 +53,6 @@ This takes only the <Literal>t</Literal> parameter and returns a tuple of the
%End
%If (TQt_2_00 -)
%If (TQt_STYLE_MOTIF)
class TQMotifStyle : TQCommonStyle
@ -74,57 +73,6 @@ public:
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 &,
const TQColorGroup &,SFlags = Style_Default,
const TQStyleOption & = TQStyleOption()) const;
@ -156,13 +104,9 @@ public:
int styleHint(StyleHint,const TQStyleControlElementData&,ControlElementFlags,
const TQStyleOption & = TQStyleOption(),
TQStyleHintReturn * = 0, const TQWidget * = 0) const;
%End
private:
%If (TQt_3_0_0 -)
TQMotifStyle(const TQMotifStyle &);
%End
};
%End
%End

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

@ -66,8 +66,6 @@ This takes no parameters and returns a tuple of the bool result and the
%End
%If (TQt_3_0_0 -)
class TQMultiLineEdit : TQTextEdit
{
%TypeHeaderCode
@ -81,22 +79,12 @@ public:
int numLines() const;
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,bool);
%End
%If (- TQt_3_1_0)
virtual void insertAt(const TQString &,int,int,bool = 0);
%End
virtual void removeLine(int);
%If (TQt_3_1_0 -)
virtual void setCursorPosition(int,int);
virtual void setCursorPosition(int,int,bool);
%End
%If (- TQt_3_1_0)
virtual void setCursorPosition(int,int,bool = 0);
%End
bool atBeginning() const;
bool atEnd() const;
@ -144,231 +132,3 @@ protected:
private:
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_3_0_0 -)
class TQMutex
{
%TypeHeaderCode
@ -57,32 +55,6 @@ private:
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
{
@ -100,5 +72,3 @@ private:
};
%End
%End

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

@ -43,7 +43,6 @@
%If (TQt_NETWORKPROTOCOL)
%If (TQt_2_1_0 -)
class TQNetworkProtocolFactoryBase
{
@ -72,17 +71,6 @@ public:
StStopped
};
%If (- TQt_3_0_0)
enum Operation {
OpListChildren,
OpMkdir,
OpRemove,
OpRename,
OpGet,
OpPut
};
%End
%If (TQt_3_0_0 -)
enum Operation {
OpListChildren,
OpMkDir,
@ -91,7 +79,6 @@ public:
OpGet,
OpPut
};
%End
enum ConnectionState {
ConHostFound,
@ -99,26 +86,6 @@ public:
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 {
NoError,
ErrValid,
@ -136,7 +103,6 @@ public:
ErrFileNotExisting,
ErrPermissionDenied
};
%End
TQNetworkProtocol();
@ -178,15 +144,11 @@ protected:
virtual void operationRename(TQNetworkOperation *);
virtual void operationGet(TQNetworkOperation *);
virtual void operationPut(TQNetworkOperation *);
%If (TQt_3_0_0 -)
virtual void operationPutChunk(TQNetworkOperation *);
%End
virtual bool checkConnection(TQNetworkOperation *);
private:
%If (TQt_3_1_0 -)
TQNetworkProtocol(const TQNetworkProtocol &);
%End
};
@ -218,10 +180,7 @@ public:
void free();
private:
%If (TQt_3_1_0 -)
TQNetworkOperation(const TQNetworkOperation &);
%End
};
%End
%End

@ -58,8 +58,6 @@ supported.
%End
%If (TQt_2_00 -)
class TQObject : TQt
{
%TypeHeaderCode
@ -77,60 +75,48 @@ public:
int yes, no;
} graph[] = {
{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},
#else
{NULL, NULL, -1, 2},
#endif
{sipName_TQSessionManager, &sipClass_TQSessionManager, -1, 3},
{sipName_TQTranslator, &sipClass_TQTranslator, -1, 4},
#if TQT_VERSION >= 0x030000
{sipName_TQProcess, &sipClass_TQProcess, -1, 5},
#else
{NULL, NULL, -1, 5},
#endif
{sipName_TQToolTipGroup, &sipClass_TQToolTipGroup, -1, 6},
#if defined(SIP_FEATURE_TQt_FILEDIALOG)
{sipName_TQFileIconProvider, &sipClass_TQFileIconProvider, -1, 7},
#else
{NULL, NULL, -1, 7},
#endif
#if TQT_VERSION >= 220 && defined(SIP_FEATURE_TQt_ACTION)
#if defined(SIP_FEATURE_TQt_ACTION)
{sipName_TQAction, &sipClass_TQAction, 89, 8},
#else
{NULL, NULL, -1, 8},
#endif
#if TQT_VERSION >= 0x030000
{sipName_TQObjectCleanupHandler, &sipClass_TQObjectCleanupHandler, -1, 9},
#else
{NULL, NULL, -1, 9},
#endif
{sipName_TQTimer, &sipClass_TQTimer, -1, 10},
{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},
#else
{NULL, NULL, -1, 12},
#endif
{sipName_TQStyleSheet, &sipClass_TQStyleSheet, -1, 13},
{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},
#else
{NULL, NULL, -1, 15},
#endif
{sipName_TQAccel, &sipClass_TQAccel, -1, 16},
#if TQT_VERSION >= 0x030100
{sipName_TQEventLoop, &sipClass_TQEventLoop, -1, 17},
#else
{NULL, NULL, -1, 17},
#endif
#if TQT_VERSION >= 210 && defined(SIP_FEATURE_TQt_NETWORKPROTOCOL)
#if defined(SIP_FEATURE_TQt_NETWORKPROTOCOL)
{sipName_TQNetworkProtocol, &sipClass_TQNetworkProtocol, -1, 18},
#else
{NULL, NULL, -1, 18},
#endif
#if TQT_VERSION >= 220 && defined(SIP_FEATURE_TQt_SOUND)
#if defined(SIP_FEATURE_TQt_SOUND)
{sipName_TQSound, &sipClass_TQSound, -1, 19},
#else
{NULL, NULL, -1, 19},
@ -152,25 +138,13 @@ public:
{NULL, NULL, -1, 27},
#endif
{sipName_TQTabWidget, &sipClass_TQTabWidget, -1, 28},
#if TQT_VERSION >= 0x030000
{sipName_TQDateEdit, &sipClass_TQDateEdit, -1, 29},
#else
{NULL, NULL, -1, 29},
#endif
{sipName_TQMainWindow, &sipClass_TQMainWindow, -1, 30},
#if TQT_VERSION >= 0x030000
{sipName_TQDateTimeEdit, &sipClass_TQDateTimeEdit, -1, 31},
#else
{NULL, NULL, -1, 31},
#endif
#if TQT_VERSION >= 0x030000
{sipName_TQTimeEdit, &sipClass_TQTimeEdit, -1, 32},
#else
{NULL, NULL, -1, 32},
#endif
{sipName_TQFrame, &sipClass_TQFrame, 46, 33},
{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},
#else
{NULL, NULL, -1, 35},
@ -180,41 +154,21 @@ public:
{sipName_TQDialog, &sipClass_TQDialog, 79, 38},
{sipName_TQComboBox, &sipClass_TQComboBox, -1, 39},
{sipName_TQHeader, &sipClass_TQHeader, -1, 40},
#if TQT_VERSION >= 0x030000
{sipName_TQDockArea, &sipClass_TQDockArea, -1, 41},
#else
{NULL, NULL, -1, 41},
#endif
#if TQT_VERSION >= 0x030200
{sipName_TQSplashScreen, &sipClass_TQSplashScreen, -1, 42},
#else
{NULL, NULL, -1, 42},
#endif
{sipName_TQSlider, &sipClass_TQSlider, -1, 43},
{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},
#else
{NULL, NULL, -1, 45},
#endif
#if TQT_VERSION >= 0x030000
{sipName_TQDesktopWidget, &sipClass_TQDesktopWidget, -1, -1},
#else
{NULL, NULL, -1, -1},
#endif
{sipName_TQGrid, &sipClass_TQGrid, -1, 47},
{sipName_TQLineEdit, &sipClass_TQLineEdit, -1, 48},
#if TQT_VERSION >= 0x030200
{sipName_TQToolBox, &sipClass_TQToolBox, -1, 49},
#else
{NULL, NULL, -1, 49},
#endif
{sipName_TQWidgetStack, &sipClass_TQWidgetStack, -1, 50},
#if TQT_VERSION >= 0x030000
{sipName_TQDockWindow, &sipClass_TQDockWindow, 60, 51},
#else
{NULL, NULL, -1, 51},
#endif
{sipName_TQMenuBar, &sipClass_TQMenuBar, -1, 52},
{sipName_TQLabel, &sipClass_TQLabel, -1, 53},
{sipName_TQGroupBox, &sipClass_TQGroupBox, 61, 54},
@ -234,23 +188,15 @@ public:
{sipName_TQVGroupBox, &sipClass_TQVGroupBox, -1, -1},
{sipName_TQVButtonGroup, &sipClass_TQVButtonGroup, -1, 65},
{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},
#else
{NULL, NULL, -1, 67},
#endif
{sipName_TQListView, &sipClass_TQListView, -1, 68},
{sipName_TQListBox, &sipClass_TQListBox, -1, 69},
#if TQT_VERSION >= 0x030000
{sipName_TQGridView, &sipClass_TQGridView, -1, 70},
#else
{NULL, NULL, -1, 70},
#endif
#if TQT_VERSION >= 0x030000
{sipName_TQTextEdit, &sipClass_TQTextEdit, 71, -1},
#else
{NULL, NULL, -1, -1},
#endif
{sipName_TQTextBrowser, &sipClass_TQTextBrowser, -1, 72},
{sipName_TQMultiLineEdit, &sipClass_TQMultiLineEdit, -1, 73},
{sipName_TQTextView, &sipClass_TQTextView, -1, -1},
@ -264,12 +210,8 @@ public:
#else
{NULL, NULL, -1, 80},
#endif
#if TQT_VERSION >= 0x030000
{sipName_TQErrorMessage, &sipClass_TQErrorMessage, -1, 81},
#else
{NULL, NULL, -1, 81},
#endif
#if TQT_VERSION >= 210 && defined(SIP_FEATURE_TQt_INPUTDIALOG)
#if defined(SIP_FEATURE_TQt_INPUTDIALOG)
{sipName_TQInputDialog, &sipClass_TQInputDialog, -1, 82},
#else
{NULL, NULL, -1, 82},
@ -309,7 +251,7 @@ public:
#else
{NULL, NULL, -1, -1},
#endif
#if TQT_VERSION >= 220 && defined(SIP_FEATURE_TQt_ACTION)
#if defined(SIP_FEATURE_TQt_ACTION)
{sipName_TQActionGroup, &sipClass_TQActionGroup, -1, -1},
#else
{NULL, NULL, -1, -1},
@ -320,24 +262,16 @@ public:
{sipName_TQVBoxLayout, &sipClass_TQVBoxLayout, -1, -1},
{sipName_TQDoubleValidator, &sipClass_TQDoubleValidator, -1, 95},
{sipName_TQIntValidator, &sipClass_TQIntValidator, -1, 96},
#if TQT_VERSION >= 0x030000
{sipName_TQRegExpValidator, &sipClass_TQRegExpValidator, -1, -1},
#else
{NULL, NULL, -1, -1},
#endif
{sipName_TQTextDrag, &sipClass_TQTextDrag, -1, 98},
{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},
#else
{NULL, NULL, -1, 100},
#endif
{sipName_TQImageDrag, &sipClass_TQImageDrag, -1, -1},
#if TQT_VERSION >= 210
{sipName_TQColorDrag, &sipClass_TQColorDrag, -1, 102},
#else
{NULL, NULL, -1, 102},
#endif
{sipName_TQUriDrag, &sipClass_TQUriDrag, -1, -1},
{sipName_TQCommonStyle, &sipClass_TQCommonStyle, 104, -1},
#if defined(SIP_FEATURE_TQt_STYLE_WINDOWS)
@ -360,12 +294,12 @@ public:
#else
{NULL, NULL, -1, 108},
#endif
#if TQT_VERSION >= 220 && defined(SIP_FEATURE_TQt_STYLE_MOTIFPLUS)
#if defined(SIP_FEATURE_TQt_STYLE_MOTIFPLUS)
{sipName_TQMotifPlusStyle, &sipClass_TQMotifPlusStyle, -1, 109},
#else
{NULL, NULL, -1, 109},
#endif
#if TQT_VERSION >= 220 && defined(SIP_FEATURE_TQt_STYLE_SGI)
#if defined(SIP_FEATURE_TQt_STYLE_SGI)
{sipName_TQSGIStyle, &sipClass_TQSGIStyle, -1, -1},
#else
{NULL, NULL, -1, -1},
@ -403,73 +337,83 @@ public:
// the true (Python) class name.
SIP_PYOBJECT className() const;
%MethodCode
#if PY_MAJOR_VERSION >= 3
sipRes = PyUnicode_FromString(sipSelf->ob_type->tp_name);
#else
sipRes = sipClassName(sipSelf);
#endif
%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
// 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
// trUtf8() methods for a Python sub-class instance in the sub-class's
// ctor.
TQString tr(const char *,const char * = 0);
TQString tr(SIP_PYOBJECT sourceText /TypeHint="str"/,const char * = 0);
%MethodCode
PyObject *nmobj;
if (tqApp)
{
const char *source = PyTQt_qt_encode(&a0, TQApplication::DefaultCodec);
if ((nmobj = sipClassName(sipSelf)) == NULL)
if (source)
{
sipRes = new TQString(tqApp->translate(Py_TYPE(sipSelf)->tp_name, source,
a1, TQApplication::DefaultCodec));
Py_DECREF(a0);
}
else
{
sipIsErr = 1;
}
}
else
{
char *cname = PyString_AsString(nmobj);
Py_BEGIN_ALLOW_THREADS
const char *source = sipString_AsLatin1String(&a0);
if (cname && tqApp)
sipRes = new TQString(tqApp -> translate(cname,a0,a1,TQApplication::DefaultCodec));
if (source)
{
sipRes = new TQString(QString::fromLatin1(source));
Py_DECREF(a0);
}
else
sipRes = new TQString(TQString::fromLatin1(a0));
Py_END_ALLOW_THREADS
Py_DECREF(nmobj);
{
sipIsErr = 1;
}
}
%End
TQString trUtf8(const char *,const char * = 0);
TQString trUtf8(SIP_PYOBJECT sourceText /TypeHint="str"/,const char * = 0);
%MethodCode
PyObject *nmobj;
if (tqApp)
{
const char *source = PyTQt_qt_encode(&a0, TQApplication::DefaultCodec);
if ((nmobj = sipClassName(sipSelf)) == NULL)
if (source)
{
sipRes = new TQString(tqApp->translate(Py_TYPE(sipSelf)->tp_name, source,
a1, TQApplication::UnicodeUTF8));
Py_DECREF(a0);
}
else
{
sipIsErr = 1;
}
}
else
{
char *cname = PyString_AsString(nmobj);
Py_BEGIN_ALLOW_THREADS
const char *source = sipString_AsLatin1String(&a0);
if (cname && tqApp)
sipRes = new TQString(tqApp -> translate(cname,a0,a1,TQApplication::UnicodeUTF8));
if (source)
{
sipRes = new TQString(TQString::fromLatin1(source));
Py_DECREF(a0);
}
else
sipRes = new TQString(TQString::fromUtf8(a0));
Py_END_ALLOW_THREADS
Py_DECREF(nmobj);
{
sipIsErr = 1;
}
}
%End
%End
virtual TQMetaObject *metaObject() const /AutoGen/;
virtual bool event(TQEvent *);
@ -516,9 +460,6 @@ public:
#endif
%End
%If (- TQt_3_0_0)
TQStringList superClasses(bool = 0) const;
%End
const char *name() const;
const char *name(const char *) const;
virtual void setName(const char *);
@ -529,21 +470,10 @@ public:
int startTimer(int);
void killTimer(int);
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);
%End
const TQObjectList *children() const;
%If (TQt_2_1_0 -)
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;
%MethodCode
// The TQt implementation doesn't know anything about Python
@ -592,7 +522,6 @@ public:
sipRes = sipCpp -> TQObject::queryList(a0, a1, a2, a3);
Py_END_ALLOW_THREADS
#endif
%End
%End
virtual void insertChild(TQObject * /Transfer/);
@ -638,26 +567,16 @@ public:
%End
%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 TQVariant property(const char *) const;
%End
%End
signals:
void destroyed();
%If (TQt_3_0_0 -)
void destroyed(TQObject *);
%End
public slots:
%If (TQt_3_0_0 -)
void deleteLater();
%End
public:
// This is actually protected, but we never need to call the real
@ -670,9 +589,7 @@ public:
protected:
virtual void timerEvent(TQTimerEvent *);
virtual void childEvent(TQChildEvent *);
%If (TQt_3_0_0 -)
virtual void customEvent(TQCustomEvent *);
%End
private:
TQObject(const TQObject &);
@ -692,181 +609,8 @@ SIP_PYOBJECT QT_TRANSLATE_NOOP(SIP_PYOBJECT,SIP_PYOBJECT);
sipRes = a1;
%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:
// 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 *);
SIP_PYOBJECT SLOT(const char * /Encoding="ASCII"/) /TypeHint="QT_SLOT"/;
%MethodCode
if (!a0)
{
@ -877,11 +621,11 @@ SIP_PYOBJECT SLOT(const char *);
{
int len = strlen(a0);
if ((sipRes = PyString_FromStringAndSize(NULL,1 + len)) == NULL)
if ((sipRes = SIPBytes_FromStringAndSize(NULL,1 + len)) == NULL)
sipIsErr = 1;
else
{
char *dp = PyString_AS_STRING(sipRes);
char *dp = SIPBytes_AS_STRING(sipRes);
*dp++ = '1';
@ -891,7 +635,7 @@ SIP_PYOBJECT SLOT(const char *);
%End
SIP_PYOBJECT SIGNAL(const char *);
SIP_PYOBJECT SIGNAL(const char * /Encoding="ASCII"/) /TypeHint="QT_SIGNAL"/;
%MethodCode
if (!a0)
{
@ -902,11 +646,11 @@ SIP_PYOBJECT SIGNAL(const char *);
{
int len = strlen(a0);
if ((sipRes = PyString_FromStringAndSize(NULL,1 + len)) == NULL)
if ((sipRes = SIPBytes_FromStringAndSize(NULL,1 + len)) == NULL)
sipIsErr = 1;
else
{
char *dp = PyString_AS_STRING(sipRes);
char *dp = SIPBytes_AS_STRING(sipRes);
*dp++ = '2';
@ -916,7 +660,7 @@ SIP_PYOBJECT SIGNAL(const char *);
%End
SIP_PYOBJECT PYSIGNAL(const char *);
SIP_PYOBJECT PYSIGNAL(const char * /Encoding="ASCII"/);
%MethodCode
if (!a0)
{
@ -927,11 +671,11 @@ SIP_PYOBJECT PYSIGNAL(const char *);
{
int len = strlen(a0);
if ((sipRes = PyString_FromStringAndSize(NULL,1 + len)) == NULL)
if ((sipRes = SIPBytes_FromStringAndSize(NULL,1 + len)) == NULL)
sipIsErr = 1;
else
{
char *dp = PyString_AS_STRING(sipRes);
char *dp = SIPBytes_AS_STRING(sipRes);
*dp++ = '9';
@ -992,16 +736,30 @@ extern "C" {
// 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.
PyTypeObject pyqtWrapperType_Type = {
#if PY_MAJOR_VERSION >= 3
PyVarObject_HEAD_INIT(NULL, 0)
#else
PyObject_HEAD_INIT(NULL)
0, /* ob_size */
#endif
"qt.pyqtWrapperType", /* tp_name */
sizeof (sipWrapperType), /* tp_basicsize */
0, /* tp_itemsize */
0, /* tp_dealloc */
#if PY_VERSION_HEX >= 0x03080000
0, /* tp_vectorcall_offset */
#else
0, /* tp_print */
#endif
0, /* tp_getattr */
0, /* tp_setattr */
#if PY_VERSION_HEX >= 0x03050000
0, /* tp_as_async */
#elif PY_VERSION_HEX >= 0x03010000
0, /* tp_reserved */
#else
0, /* tp_compare */
#endif
0, /* tp_repr */
0, /* tp_as_number */
0, /* tp_as_sequence */
@ -1042,6 +800,15 @@ PyTypeObject pyqtWrapperType_Type = {
#if PY_VERSION_HEX >= 0x02060000
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
};
@ -1196,16 +963,30 @@ static sipWrapperType pyqtWrapper_Type = {
{
#endif
{
#if PY_MAJOR_VERSION >= 3
PyVarObject_HEAD_INIT(&pyqtWrapperType_Type, 0)
#else
PyObject_HEAD_INIT(&pyqtWrapperType_Type)
0, /* ob_size */
#endif
"qt.pyqtWrapper", /* tp_name */
sizeof (pyqtWrapper), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)pyqtWrapper_dealloc, /* tp_dealloc */
#if PY_VERSION_HEX >= 0x03080000
0, /* tp_vectorcall_offset */
#else
0, /* tp_print */
#endif
0, /* tp_getattr */
0, /* tp_setattr */
#if PY_VERSION_HEX >= 0x03050000
0, /* tp_as_async */
#elif PY_VERSION_HEX >= 0x03010000
0, /* tp_reserved */
#else
0, /* tp_compare */
#endif
0, /* tp_repr */
0, /* tp_as_number */
0, /* tp_as_sequence */
@ -1245,6 +1026,15 @@ static sipWrapperType pyqtWrapper_Type = {
0, /* tp_del */
#if PY_VERSION_HEX >= 0x02060000
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
},
#if !defined(STACKLESS)
@ -1421,11 +1211,7 @@ static PyObject *py_sender = 0;
TQMetaObject *UniversalSlot::metaObj = 0;
#if TQT_VERSION >= 0x030100
static TQMetaObjectCleanUp cleanUp_UniversalSlot("UniversalSlot", &UniversalSlot::staticMetaObject);
#else
static TQMetaObjectCleanUp cleanUp_UniversalSlot;
#endif
TQObject *UniversalSlot::lastSender = 0;
UniversalSlot *UniversalSlot::unislots = 0;
@ -1500,17 +1286,17 @@ bool UniversalSlot::tqt_invoke(int id, TQUObject *qargs)
case char_sat:
case schar_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;
case string_sat:
case sstring_sat:
case ustring_sat:
arg = PyString_FromString((char *)static_QUType_ptr.get(qargs));
arg = SIPBytes_FromString((char *)static_QUType_ptr.get(qargs));
break;
case short_sat:
arg = PyInt_FromLong(*(short *)static_QUType_ptr.get(qargs));
arg = PyLong_FromLong(*(short *)static_QUType_ptr.get(qargs));
break;
case ushort_sat:
@ -1519,9 +1305,9 @@ bool UniversalSlot::tqt_invoke(int id, TQUObject *qargs)
case int_sat:
if (qv)
arg = PyInt_FromLong(qv -> asInt());
arg = PyLong_FromLong(qv -> asInt());
else
arg = PyInt_FromLong(static_QUType_int.get(qargs));
arg = PyLong_FromLong(static_QUType_int.get(qargs));
break;
case uint_sat:
@ -1557,7 +1343,7 @@ bool UniversalSlot::tqt_invoke(int id, TQUObject *qargs)
break;
case bool_sat:
arg = PyInt_FromLong(static_QUType_bool.get(qargs));
arg = PyLong_FromLong(static_QUType_bool.get(qargs));
break;
case void_sat:
@ -1628,7 +1414,14 @@ static void *sipTQtCreateUniversalSlot(sipWrapper *tx, const char *sig,
pyqt3SlotConnection conn;
/* 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. */
if (sipSaveSlot(&conn.sc_slot, rxObj, slot) < 0)

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

@ -40,34 +40,6 @@ Not implemented.
%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,
int = -1,int = -1,TQt::RasterOp = TQt::CopyROP,bool = 0);
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,
bool = 0);
%End
class TQPaintDevice
{
@ -90,44 +60,17 @@ public:
bool isExtDev() const;
bool paintingActive() const;
%If (TQt_3_0_0 -)
virtual void setResolution(int);
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 (- TQt_3_0_0)
HANDLE handle() const;
%End
%If (TQt_3_0_0 -)
TQt::HANDLE handle() const;
TQt::HANDLE x11RenderHandle() const;
%End
Display *x11Display() const;
int x11Screen() const;
int x11Depth() const;
int x11Cells() const;
%If (- TQt_3_0_0)
HANDLE x11Colormap() const;
%End
%If (TQt_3_0_0 -)
TQt::HANDLE x11Colormap() const;
%End
bool x11DefaultColormap() const;
void *x11Visual() const;
bool x11DefaultVisual() const;
@ -137,26 +80,16 @@ public:
static int x11AppDpiX();
static int x11AppDpiY();
%If (TQt_2_1_0 -)
static void x11SetAppDpiX(int);
static void x11SetAppDpiY(int);
%End
static int x11AppDepth();
static int x11AppCells();
%If (TQt_3_1_0 -)
static TQt::HANDLE x11AppRootWindow();
%End
%If (TQt_3_0_0 -)
static TQt::HANDLE x11AppColormap();
%End
%If (- TQt_3_0_0)
static HANDLE x11AppColormap();
%End
static bool x11AppDefaultColormap();
static void *x11AppVisual();
static bool x11AppDefaultVisual();
%If (TQt_3_1_0 -)
static int x11AppDepth(int);
static int x11AppCells(int);
static TQt::HANDLE x11AppRootWindow(int);
@ -168,7 +101,6 @@ public:
static int x11AppDpiY(int);
static void x11SetAppDpiX(int,int);
static void x11SetAppDpiY(int,int);
%End
%End
enum PDevCmd
@ -188,21 +120,14 @@ public:
PdcDrawLineSegments,
PdcDrawPolyline,
PdcDrawPolygon,
%If (TQt_3_0_0 -)
PdcDrawCubicBezier,
%End
%If (- TQt_3_0_0)
PdcDrawQuadBezier,
%End
PdcDrawText,
PdcDrawTextFormatted,
PdcDrawPixmap,
PdcDrawImage,
PdcDrawText2,
PdcDrawText2Formatted,
%If (TQt_3_2_0 -)
PdcDrawTextItem,
%End
PdcDrawLast,
PdcBegin,
@ -233,8 +158,6 @@ public:
PdcReservedStop
};
%End
protected:
TQPaintDevice(uint);
// virtual bool cmd(int,TQPainter *,TQPDevCmdParam *);

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

@ -97,260 +97,6 @@ This returns a list of tab stops.
%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
{
%TypeHeaderCode
@ -358,31 +104,17 @@ class TQPainter : TQt
%End
public:
%If (TQt_3_0_0 -)
enum CoordinateMode {
CoordDevice,
CoordPainter
};
%End
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 *,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 *,const TQWidget *,bool = 0);
%End
bool end();
TQPaintDevice *device() const;
@ -390,9 +122,7 @@ public:
bool isActive() const;
%If (TQt_3_0_0 -)
void flush(const TQRegion &,CoordinateMode = CoordDevice);
%End
void flush();
void save();
void restore();
@ -410,9 +140,6 @@ public:
void setBrush(const TQBrush &);
void setBrush(BrushStyle);
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;
void setBackgroundColor(const TQColor &);
@ -449,10 +176,8 @@ public:
%End
void translate(double,double);
void resetXForm();
%If (TQt_3_0_0 -)
double translationX() const;
double translationY() const;
%End
TQPoint xForm(const TQPoint &) const;
TQRect xForm(const TQRect &) const;
@ -465,18 +190,10 @@ public:
void setClipping(bool);
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;
void setClipRect(const TQRect &,CoordinateMode = CoordDevice);
void setClipRect(int,int,int,int,CoordinateMode = CoordDevice);
void setClipRegion(const TQRegion &,CoordinateMode = CoordDevice);
%End
void drawPoint(int,int);
void drawPoint(const TQPoint &);
@ -493,14 +210,8 @@ public:
void drawWinFocusRect(int,int,int,int,const TQColor &);
void drawWinFocusRect(const TQRect &);
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(const TQRect &,int = 25,int = 25);
%End
void drawEllipse(int,int,int,int);
void drawEllipse(const TQRect &);
void drawArc(int,int,int,int,int,int);
@ -512,42 +223,25 @@ public:
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);
%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 drawCubicBezier(const TQPointArray &,int = 0);
%End
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 &);
%If (TQt_3_0_0 -)
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,
int = -1,int = 0);
void drawImage(const TQPoint &,const TQImage &,const TQRect &,int = 0);
void drawImage(const TQPoint &,const TQImage &,int = 0);
void drawImage(const TQRect &,const TQImage &);
%End
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 &);
%If (TQt_PICTURE)
void drawPicture(const TQPicture &);
%If (TQt_3_0_0 -)
void drawPicture(int,int,const TQPicture &);
void drawPicture(const TQPoint &,const TQPicture &);
%End
%End
void fillRect(int,int,int,int,const TQBrush &);
@ -555,26 +249,18 @@ public:
void eraseRect(int,int,int,int);
void eraseRect(const TQRect &);
%If (TQt_3_0_0 -)
enum TextDirection {
Auto,
RTL,
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(const TQPoint &,const TQString &,int = -1,
TextDirection = Auto);
void drawText(int,int,const TQString &,int,int,TextDirection = Auto);
void drawText(const TQPoint &,const TQString &,int,int,
TextDirection = Auto);
%End
void drawText(int,int,int,int,int,const TQString &,int = -1,TQRect * = 0);
void drawText(const TQRect &,int,const TQString &,int = -1,TQRect * = 0);
@ -612,7 +298,7 @@ public:
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);
sipIsErr = 1;
@ -643,7 +329,7 @@ public:
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)
{
@ -672,5 +358,3 @@ public:
private:
TQPainter(const TQPainter &);
};
%End

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

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

@ -30,42 +30,6 @@
%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
{
%TypeHeaderCode
@ -76,9 +40,7 @@ public:
TQPen();
TQPen(PenStyle);
TQPen(const TQColor &,uint = 0,PenStyle = SolidLine);
%If (TQt_2_1_0 -)
TQPen(const TQColor &,uint,PenStyle,PenCapStyle,PenJoinStyle);
%End
TQPen(const TQPen &);
PenStyle style() const;
@ -87,15 +49,11 @@ public:
void setWidth(uint);
const TQColor &color() const;
void setColor(const TQColor &);
%If (TQt_2_1_0 -)
PenCapStyle capStyle() const;
void setCapStyle(PenCapStyle);
PenJoinStyle joinStyle() const;
void setJoinStyle(PenJoinStyle);
%End
bool operator==(const TQPen &) const;
bool operator!=(const TQPen &) const;
};
%End

@ -52,60 +52,30 @@ class TQPicture : TQPaintDevice
%End
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(const TQPicture &);
%End
bool isNull() const;
uint size() 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/);
%End
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(const TQString &,const char * = 0);
bool save(TQIODevice *,const char * = 0);
bool save(const TQString &,const char * = 0);
TQRect boundingRect() const;
%End
%If (TQt_3_1_0 -)
void setBoundingRect(const TQRect &);
%End
protected:
%If (TQt_3_0_0 -)
void detach();
TQPicture copy() const;
%End
private:
%If (- TQt_3_0_0)
TQPicture(const TQPicture &);
%End
};
%End

@ -56,103 +56,6 @@ Not implemented.
%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
{
%TypeHeaderCode
@ -177,9 +80,7 @@ public:
};
TQPixmap();
%If (TQt_3_0_0 -)
TQPixmap(const TQImage &);
%End
TQPixmap(int,int,int = -1,Optimization = DefaultOptim);
TQPixmap(const TQSize &,int = -1,Optimization = DefaultOptim);
TQPixmap(const TQString &,const char * = 0,ColorMode = Auto);
@ -222,20 +123,12 @@ public:
const TQBitmap *mask() const;
void setMask(const TQBitmap &);
bool selfMask() const;
%If (TQt_3_1_0 -)
bool hasAlpha() const;
%End
%If (TQt_3_2_0 -)
bool hasAlphaChannel() const;
%End
TQBitmap createHeuristicMask(bool = 1) const;
%If (TQt_3_1_0 -)
static TQPixmap fromMimeSource(const TQString &);
%End
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);
%End
TQPixmap xForm(const TQWMatrix &) const;
static TQWMatrix trueMatrix(const TQWMatrix &,int,int);
@ -249,18 +142,8 @@ public:
const char * = 0,ColorMode = Auto);
// bool loadFromData(const uchar *,uint,const char *,int);
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;
%End
%If (TQt_3_2_0 -)
bool save(TQIODevice *,const char *,int = -1) const;
%End
int serialNumber() const;
Optimization optimization() const;
void setOptimization(Optimization);
@ -269,20 +152,14 @@ public:
virtual void detach();
bool isTQBitmap() const;
%If (TQt_3_0_0 -)
%If (WS_X11)
static int x11SetDefaultScreen(int);
void x11SetScreen(int);
%End
%End
protected:
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,
int = -1);
%End

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

@ -40,7 +40,6 @@ This takes only the <Literal>sb</Literal> parameter and returns a tuple of the
%End
%If (TQt_2_00 -)
%If (TQt_STYLE_PLATINUM)
class TQPlatinumStyle : TQWindowsStyle
@ -52,48 +51,6 @@ class TQPlatinumStyle : TQWindowsStyle
public:
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 &,
const TQColorGroup &,SFlags = Style_Default,
const TQStyleOption & = TQStyleOption()) const;
@ -115,28 +72,14 @@ public:
int pixelMetric(PixelMetric,const TQStyleControlElementData&,ControlElementFlags,const TQWidget * = 0) const;
TQRect subRect(SubRect,const TQStyleControlElementData&, const ControlElementFlags,const TQWidget *) const;
%End
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;
%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 &,
bool) const;
%End
private:
%If (TQt_3_0_0 -)
TQPlatinumStyle(const TQPlatinumStyle &);
%End
};
%End
%End

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

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

@ -56,97 +56,6 @@ ensures that the menu is deleted without having to explicity code it using
%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
{
%TypeHeaderCode
@ -156,12 +65,7 @@ class TQPopupMenu : TQFrame, TQMenuData
public:
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);
%End
void updateItem(int);
virtual void setCheckable(bool);
@ -213,16 +117,10 @@ public:
bool customWhatsThis() const;
%If (TQt_2_1_0 -)
int insertTearOffHandle(int = -1,int = -1);
%End
%If (TQt_2_2_0 -)
void activateItemAt(int);
%End
%If (TQt_3_0_0 -)
TQRect itemGeometry(int);
%End
signals:
void activated(int);
@ -230,9 +128,7 @@ signals:
void activatedRedirect(int);
void highlightedRedirect(int);
void aboutToShow();
%If (TQt_2_2_0 -)
void aboutToHide();
%End
protected:
int itemHeight(int) const;
@ -247,27 +143,17 @@ protected:
void mouseReleaseEvent(TQMouseEvent *);
void mouseMoveEvent(TQMouseEvent *);
void keyPressEvent(TQKeyEvent *);
%If (TQt_2_1_0 -)
void focusInEvent(TQFocusEvent *);
void focusOutEvent(TQFocusEvent *);
%End
void timerEvent(TQTimerEvent *);
%If (TQt_3_0_0 -)
void leaveEvent(TQEvent *);
%End
void styleChange(TQStyle &);
%If (TQt_3_1_0 -)
void enabledChange(bool);
%End
%If (TQt_2_1_0 -)
int columns() const;
bool focusNextPrevChild(bool);
%End
%If (TQt_3_0_0 -)
int itemAtPos(const TQPoint &,bool = 1) const;
%End
private:
TQPopupMenu(const TQPopupMenu &);
@ -278,5 +164,3 @@ private:
void menuDelPopup(TQPopupMenu *);
void frameChanged();
};
%End

@ -41,20 +41,13 @@ class TQPrintDialog : TQDialog
public:
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 void setGlobalPrintDialog(TQPrintDialog *);
%End
void setPrinter(TQPrinter *,bool = 0);
TQPrinter *printer() const;
%If (TQt_2_1_0 -)
void addButton(TQPushButton *);
%End
private:
TQPrintDialog(const TQPrintDialog &);

@ -38,21 +38,14 @@ class TQPrinter : TQPaintDevice
%End
public:
%If (TQt_3_0_0 -)
enum PrinterMode {
ScreenResolution,
PrinterResolution,
HighResolution,
Compatible
};
%End
%If (- TQt_3_0_0)
TQPrinter();
%End
%If (TQt_3_0_0 -)
TQPrinter(PrinterMode = ScreenResolution);
%End
enum Orientation {
Portrait,
@ -63,12 +56,8 @@ public:
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,
DLE, Folio, Ledger, Tabloid,
%If (TQt_2_3_1 -)
Custom,
%End
%If (TQt_2_00 -)
NPageSize
%End
};
enum PageOrder {
@ -81,7 +70,6 @@ public:
Color
};
%If (TQt_3_0_0 -)
enum PaperSource {
OnlyOne,
Lower,
@ -97,9 +85,7 @@ public:
Cassette,
FormSource
};
%End
%If (TQt_3_2_0 -)
enum PrintRange {
AllPages,
Selection,
@ -111,31 +97,10 @@ public:
PrintSelection,
PrintPageRange
};
%End
%If (- TQt_2_00)
const char *printerName() const;
void setPrinterName(const char *);
%End
%If (TQt_2_00 -)
TQString printerName() const;
virtual void setPrinterName(const TQString &);
%End
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);
TQString outputFileName() const;
virtual void setOutputFileName(const TQString &);
@ -150,88 +115,45 @@ public:
virtual void setDocName(const TQString &);
TQString creator() const;
virtual void setCreator(const TQString &);
%End
Orientation orientation() const;
%If (- TQt_2_00)
void setOrientation(Orientation);
%End
%If (TQt_2_00 -)
virtual void setOrientation(Orientation);
%End
PageSize pageSize() const;
%If (- TQt_2_00)
void setPageSize(PageSize);
void setPageOrder(PageOrder);
%End
%If (TQt_2_00 -)
virtual void setPageSize(PageSize);
virtual void setPageOrder(PageOrder);
%End
PageOrder pageOrder() const;
%If (TQt_3_0_0 -)
void setResolution(int);
int resolution() const;
%End
%If (- TQt_2_00)
void setColorMode(ColorMode);
%End
%If (TQt_2_00 -)
virtual void setColorMode(ColorMode);
%End
ColorMode colorMode() const;
%If (TQt_2_00 -)
virtual void setFullPage(bool);
bool fullPage() const;
TQSize margins() const;
%End
%If (TQt_3_1_0 -)
void setMargins(uint,uint,uint,uint);
// void margins(uint *,uint *,uint *,uint *) const;
%End
int fromPage() const;
int toPage() const;
%If (- TQt_2_00)
void setFromTo(int,int);
%End
%If (TQt_2_00 -)
virtual void setFromTo(int,int);
%End
int minPage() const;
int maxPage() const;
%If (- TQt_2_00)
void setMinMax(int,int);
%End
%If (TQt_2_00 -)
virtual void setMinMax(int,int);
%End
int numCopies() const;
%If (- TQt_2_00)
void setNumCopies(int);
%End
%If (TQt_2_00 -)
virtual void setNumCopies(int);
%End
%If (TQt_3_0_0 -)
bool collateCopiesEnabled() const;
void setCollateCopiesEnabled(bool);
bool collateCopies() const;
void setCollateCopies(bool);
%End
%If (TQt_3_2_0 -)
PrintRange printRange() const;
void setPrintRange(PrintRange);
%End
bool newPage();
bool abort();
@ -239,15 +161,11 @@ public:
bool setup(TQWidget * = 0);
%If (TQt_3_0_0 -)
PaperSource paperSource() const;
virtual void setPaperSource(PaperSource);
%End
%If (TQt_3_2_0 -)
void setOptionEnabled(PrinterOption,bool);
bool isOptionEnabled(PrinterOption);
%End
private:
TQPrinter(const TQPrinter &);

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

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

@ -32,8 +32,6 @@ value.
%If (TQt_PROGRESSDIALOG)
%If (TQt_3_0_0 -)
class TQProgressDialog : TQDialog
{
%TypeHeaderCode
@ -52,9 +50,7 @@ public:
void setBar(TQProgressBar *);
bool wasCancelled() const;
%If (TQt_3_2_0 -)
bool wasCanceled() const;
%End
int totalSteps() const;
int progress() const;
@ -75,9 +71,7 @@ public slots:
void reset();
void setTotalSteps(int);
void setProgress(int);
%If (TQt_3_1_0 -)
void setProgress(int,int);
%End
void setLabelText(const TQString &);
void setCancelButtonText(const TQString &);
@ -85,9 +79,7 @@ public slots:
signals:
void cancelled();
%If (TQt_3_2_0 -)
void canceled();
%End
protected:
void resizeEvent(TQResizeEvent *);
@ -103,92 +95,3 @@ private:
};
%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
%If (TQt_2_00 -)
template<Type>
%MappedType TQPtrList<Type>
{
@ -107,5 +105,3 @@ template<Type>
return sipGetState(sipTransferObj);
%End
};
%End

@ -19,6 +19,7 @@
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%DefaultEncoding "UTF-8"
%ExportedDoc
<Sect2><Title>TQPushButton</Title>
@ -36,107 +37,46 @@ class TQPushButton : TQButton
%End
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(const TQString &,TQWidget * /TransferThis/,const char * = 0);
%End
%If (TQt_2_1_0 -)
TQPushButton(const TQIconSet &,const TQString &,TQWidget * /TransferThis/,const char * = 0);
%End
TQSize sizeHint() const;
%If (TQt_2_00 - TQt_3_0_0)
TQSizePolicy sizePolicy() const;
%End
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 &);
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(const TQRect &);
void setToggleButton(bool);
%End
bool autoDefault() const;
%If (- TQt_2_00)
void setAutoDefault(bool);
%End
%If (TQt_2_00 -)
virtual void setAutoDefault(bool);
%End
bool isDefault() const;
%If (- TQt_2_00)
void setDefault(bool);
%End
%If (TQt_2_00 -)
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 *);
TQPopupMenu *popup() const;
void setIconSet(const TQIconSet &);
TQIconSet *iconSet() const;
%End
%If (TQt_2_2_0 -)
void setFlat(bool);
bool isFlat() const;
%End
public slots:
%If (- TQt_2_00)
void setOn(bool);
%End
%If (TQt_2_00 -)
virtual void setOn(bool);
%End
%If (- TQt_3_0_0)
void toggle();
%End
protected:
void drawButton(TQPainter *);
void drawButtonLabel(TQPainter *);
void focusInEvent(TQFocusEvent *);
%If (TQt_2_00 -)
void focusOutEvent(TQFocusEvent *);
void resizeEvent(TQResizeEvent *);
void updateMask();
%End
private:
TQPushButton(const TQPushButton &);

@ -36,48 +36,23 @@ class TQRadioButton : TQButton
%End
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(const TQString &,TQWidget * /TransferThis/,const char * = 0);
%End
bool isChecked() 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:
%If (TQt_3_0_0 -)
virtual void setChecked(bool);
%End
protected:
bool hitButton(const TQPoint &) const;
void drawButton(TQPainter *);
void drawButtonLabel(TQPainter *);
%If (- TQt_2_00)
void mouseReleaseEvent(TQMouseEvent *);
void keyPressEvent(TQKeyEvent *);
%End
%If (TQt_2_00 -)
void updateMask();
void resizeEvent(TQResizeEvent *);
%End
%If (TQt_2_00 - TQt_3_0_0)
void focusInEvent(TQFocusEvent *);
%End
private:
TQRadioButton(const TQRadioButton &);

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

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

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

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

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

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

@ -33,8 +33,6 @@ Python v2.0 or later.
%If (TQt_THREAD_SUPPORT)
%If (TQt_3_0_0 -)
class TQSemaphore
{
%TypeHeaderCode
@ -84,29 +82,3 @@ private:
};
%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
%If (TQt_2_00 -)
class TQSessionManager : TQObject
{
%TypeHeaderCode
@ -39,9 +37,7 @@ class TQSessionManager : TQObject
public:
TQString sessionId() const;
%If (TQt_3_1_0 -)
TQString sessionKey() const;
%End
bool allowsInteraction();
bool allowsErrorInteraction();
@ -64,26 +60,13 @@ public:
void setDiscardCommand(const TQStringList &);
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 TQStringList &);
%End
bool isPhase2() const;
void requestPhase2();
private:
%If (TQt_3_1_0 -)
TQSessionManager(TQApplication * /TransferThis/,TQString &,TQString &);
%End
%If (- TQt_3_1_0)
TQSessionManager(TQApplication * /TransferThis/,TQString &);
%End
~TQSessionManager();
};
%End

@ -99,8 +99,6 @@ Not implemented.
%End
%If (TQt_3_0_0 -)
class TQSettings
{
%TypeHeaderCode
@ -108,12 +106,10 @@ class TQSettings
%End
public:
%If (TQt_3_1_0 -)
enum Format {
Native,
Ini
};
%End
enum System {
Unix,
@ -121,17 +117,13 @@ public:
Mac
};
%If (TQt_3_1_0 -)
enum Scope {
User,
Global
};
%End
TQSettings();
%If (TQt_3_1_0 -)
TQSettings(Format);
%End
// bool writeEntry(const TQString &,bool);
bool writeEntry(const TQString &,int /Constrained/);
@ -157,21 +149,15 @@ public:
void insertSearchPath(System,const TQString &);
void removeSearchPath(System,const TQString &);
%If (TQt_3_1_0 -)
void setPath(const TQString &,const TQString &,Scope = Global);
void beginGroup(const TQString &);
void endGroup();
void resetGroup();
TQString group() const;
%End
%If (TQt_3_2_0 -)
bool sync();
%End
private:
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_2_2_0 -)
class TQSGIStyle : TQMotifStyle
{
@ -57,68 +56,6 @@ public:
void applicationPolish( 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 &,
const TQColorGroup &,SFlags = Style_Default,
const TQStyleOption & = TQStyleOption()) const;
@ -144,7 +81,6 @@ public:
TQRect querySubControlMetrics(ComplexControl,const TQStyleControlElementData&,ControlElementFlags,
SubControl,
const TQStyleOption & = TQStyleOption(), const TQWidget *=0) const;
%End
protected:
bool eventFilter(TQObject *,TQEvent *);
@ -154,4 +90,3 @@ private:
};
%End
%End

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

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

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

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

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

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

@ -30,7 +30,6 @@
%If (TQt_SOUND)
%If (TQt_2_2_0 -)
class TQSound : TQObject
{
@ -41,29 +40,19 @@ class TQSound : TQObject
public:
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();
%End
static void play(const TQString &);
%If (TQt_3_0_0 -)
int loops() const;
int loopsRemaining() const;
void setLoops(int);
TQString fileName() const;
bool isFinished() const;
%End
public slots:
void play();
%If (TQt_3_0_0 -)
void stop();
%End
};
%End
%End

@ -34,8 +34,6 @@ This returns a tuple of the <Literal>int</Literal> result and the modified
%End
%If (TQt_3_0_0 -)
class TQSpinBox : TQWidget, TQRangeControl
{
%TypeHeaderCode
@ -122,147 +120,3 @@ protected slots:
private:
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
%If (TQt_3_2_0 -)
class TQSplashScreen : TQWidget
{
%TypeHeaderCode
@ -57,5 +55,3 @@ protected:
virtual void drawContents(TQPainter *);
void mousePressEvent(TQMouseEvent *);
};
%End

@ -45,116 +45,58 @@ class TQSplitter : TQFrame
%End
public:
%If (- TQt_2_00)
enum Orientation {
Horizontal,
Vertical
};
%End
enum ResizeMode {
Stretch,
KeepSize,
%If (TQt_2_1_0 -)
FollowSizeHint,
%End
%If (TQt_3_1_0 -)
Auto
%End
};
TQSplitter(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);
%End
Orientation orientation() const;
%If (TQt_3_2_0 -)
void setChildrenCollapsible(bool);
bool childrenCollapsible() const;
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 setOpaqueResize(bool = 1);
%End
bool opaqueResize() const;
void moveToFirst(TQWidget *);
void moveToLast(TQWidget *);
void refresh();
%If (TQt_2_00 -)
TQSize sizeHint() 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;
void setSizes(TQValueList<int>);
%End
%If (TQt_3_2_0 -)
int handleWidth() const;
void setHandleWidth(int);
%End
%If (- TQt_2_00)
bool event(TQEvent *);
%End
protected:
%If (TQt_2_00 -)
void childEvent(TQChildEvent *);
bool event(TQEvent *);
%End
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;
void moveSplitter(TQCOORD,int);
%End
virtual void drawSplitter(TQPainter *,TQCOORD,TQCOORD,TQCOORD,TQCOORD);
%If (TQt_2_1_0 -)
void styleChange(TQStyle &);
%End
%If (- TQt_2_00)
int adjustPos(int);
void setRubberband(int);
%End
%If (TQt_2_00 -)
int adjustPos(int,int);
virtual void setRubberband(int);
void getRange(int,int *,int *);
%End
private:
%If (TQt_2_1_0 -)
TQSplitter(const TQSplitter &);
%End
};
%End

@ -38,57 +38,28 @@ class TQStatusBar : TQWidget
public:
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);
%End
%If (- TQt_3_0_0)
void removeWidget(TQWidget * /TransferBack/);
%End
%If (TQt_3_0_0 -)
virtual void removeWidget(TQWidget * /TransferBack/);
%End
%If (TQt_2_1_0 -)
void setSizeGripEnabled(bool);
bool isSizeGripEnabled() const;
%End
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 &,int);
%End
void clear();
signals:
%If (TQt_3_1_0 -)
void messageChanged(const TQString &);
%End
protected:
void paintEvent(TQPaintEvent *);
%If (TQt_2_1_0 -)
void resizeEvent(TQResizeEvent *);
%End
void reformat();
void hideOrShow();
%If (TQt_2_1_0 -)
bool event(TQEvent *);
%End
private:
%If (TQt_2_1_0 -)
TQStatusBar(const TQStatusBar &);
%End
};

@ -172,8 +172,6 @@ This returns a tuple of the <Literal>double</Literal> result and the
%End
%If (TQt_2_00 -)
class TQChar
{
%TypeHeaderCode
@ -195,53 +193,8 @@ public:
static const TQChar replacement;
static const TQChar byteOrderMark;
static const TQChar byteOrderSwapped;
%If (TQt_2_2_0 -)
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 {
NoCategory,
@ -282,24 +235,7 @@ public:
Symbol_Modifier,
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 {
DirL,
DirR,
@ -321,7 +257,6 @@ public:
DirNSM,
DirBN
};
%End
enum Decomposition {
Single,
@ -351,7 +286,6 @@ public:
Center
};
%If (TQt_3_0_0 -)
enum CombiningClass {
Combining_BelowLeftAttached,
Combining_BelowAttached,
@ -375,7 +309,6 @@ public:
Combining_DoubleAbove,
Combining_IotaSubscript
};
%End
int digitValue() const;
TQChar lower() const;
@ -385,19 +318,10 @@ public:
Direction direction() const;
Joining joining() const;
bool mirrored() const;
%If (TQt_2_1_0 -)
TQChar mirroredChar() const;
%End
%If (- TQt_3_0_0)
TQString decomposition() const;
%End
%If (TQt_3_0_0 -)
const TQString &decomposition() const;
%End
Decomposition decompositionTag() const;
%If (TQt_3_0_0 -)
unsigned char combiningClass() const;
%End
char latin1() const;
ushort unicode() const;
@ -409,22 +333,16 @@ public:
bool isMark() const;
bool isLetter() const;
bool isNumber() const;
%If (TQt_2_1_0 -)
bool isLetterOrNumber() const;
%End
bool isDigit() const;
%If (TQt_3_0_0 -)
bool isSymbol() const;
%End
// uchar& cell();
// uchar& row();
uchar cell() const;
uchar row() const;
%If (TQt_3_0_0 -)
void setCell(uchar);
void setRow(uchar);
%End
static bool networkOrdered();
};
@ -447,6 +365,7 @@ class TQString
{
%TypeHeaderCode
#include <tqstring.h>
#include <tqtextcodec.h>
%End
public:
@ -457,18 +376,14 @@ public:
// TQString(const TQChar *,uint);
// TQString(const char *);
%If (TQt_2_1_0 -)
// This is how we implement TQUrl::operator TQString() const.
TQString(const TQUrl &);
%End
%If (TQt_3_0_0 -)
// This is how we implement TQKeySequence::operator TQString() const.
TQString(const TQKeySequence &);
// This is how we implement TQUuid::operator TQString() const.
TQString(const TQUuid &);
%End
static const TQString null;
@ -476,20 +391,13 @@ public:
bool isEmpty() const;
uint length() const;
void truncate(uint);
%If (- TQt_3_0_0)
void fill(TQChar,int = -1);
%End
%If (TQt_3_0_0 -)
TQString &fill(TQChar,int = -1);
%End
TQString copy() const;
TQString arg(int /Constrained/,int = 0,int = 10) 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_ULLONG,int = 0,int = 10) const;
%End
TQString arg(long,int = 0,int = 10) const;
TQString arg(ulong,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(TQChar,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 &) const;
TQString arg(const TQString &,const TQString &,const TQString &,
const TQString &) const;
%End
// TQString &sprintf(const char *,...);
@ -523,7 +429,6 @@ public:
int contains(const TQString &,bool = 1) const;
int contains(const TQRegExp &) const;
%If (TQt_3_0_0 -)
enum SectionFlags {
SectionDefault,
SectionSkipEmpty,
@ -540,7 +445,6 @@ public:
int = SectionDefault) const;
TQString section(const TQRegExp &,int,int = 0xffffffff,
int = SectionDefault) const;
%End
TQString left(uint) const;
TQString right(uint) const;
@ -553,56 +457,36 @@ public:
TQString simplifyWhiteSpace() const;
TQString &insert(uint,const TQString &);
%If (TQt_3_2_0 -)
TQString &insert(uint,const TQByteArray &);
// TQString &insert(uint,const char *);
%End
TQString &insert(uint,TQChar *,uint);
TQString &insert(uint,TQChar);
TQString &insert(uint,char);
TQString &append(char);
%If (TQt_2_2_0 -)
TQString &append(TQChar);
%End
TQString &append(const TQString &);
TQString &prepend(char);
%If (TQt_2_2_0 -)
TQString &prepend(TQChar);
%End
TQString &prepend(const TQString &);
TQString &remove(uint,uint);
%If (TQt_3_1_0 -)
TQString &remove(const TQString &);
%If (TQt_3_2_0 -)
TQString &remove(const TQString &,bool);
%End
TQString &remove(TQChar);
TQString &remove(char);
TQString &remove(const TQRegExp &);
%End
TQString &replace(uint,uint,const TQString &);
TQString &replace(uint,uint,const TQChar *,uint);
%If (TQt_3_1_0 -)
TQString &replace(uint,uint,TQChar);
TQString &replace(uint,uint,char);
TQString &replace(TQChar,const TQString &);
%If (TQt_3_2_0 -)
TQString &replace(TQChar,const TQString &,bool);
%End
TQString &replace(char,const TQString &);
%If (TQt_3_2_0 -)
TQString &replace(char,const TQString &,bool);
%End
TQString &replace(const TQString &,const TQString &);
%If (TQt_3_2_0 -)
TQString &replace(const TQString &,const TQString &,bool);
%End
%End
TQString &replace(const TQRegExp &,const TQString &);
%If (TQt_3_1_0 -)
TQString &replace(TQChar,TQChar);
%End
short toShort(bool * = 0,int = 10) const;
ushort toUShort(bool * = 0,int = 10) const;
@ -610,10 +494,8 @@ public:
uint toUInt(bool * = 0,int = 10) const;
long toLong(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_ULLONG toULongLong(bool * = 0,int = 10) const;
%End
float toFloat(bool * = 0) const;
double toDouble(bool * = 0) const;
@ -624,28 +506,22 @@ public:
// TQString &setNum(uint,int = 10);
TQString &setNum(long,int = 10);
TQString &setNum(ulong,int = 10);
%If (TQt_3_2_0 -)
// TQString &setNum(TQ_LLONG,int = 10);
// TQString &setNum(TQ_ULLONG,int = 10);
%End
// TQString &setNum(float,char = 'g',int = 6);
static TQString number(int /Constrained/,int = 10);
static TQString number(double /Constrained/,char = 'g',int = 6);
static TQString number(long,int = 10);
static TQString number(ulong,int = 10);
%If (TQt_3_2_0 -)
// static TQString number(TQ_LLONG,int = 10);
// static TQString number(TQ_ULLONG,int = 10);
%End
// static TQString number(uint,int = 10);
void setExpand(uint,TQChar);
TQString &operator+=(const TQString &);
%If (TQt_3_3_0 -)
TQString &operator+=(const TQByteArray &);
%End
TQString &operator+=(TQChar);
//TQString &operator+=(char);
@ -673,9 +549,7 @@ public:
// TQChar &ref(uint);
// const TQChar *unicode() const;
const char *ascii() const;
%If (TQt_3_1_0 -)
static TQString fromAscii(const char *,int = -1);
%End
const char *latin1() const;
static TQString fromLatin1(const char *,int = -1);
TQCString utf8() const;
@ -683,62 +557,34 @@ public:
TQCString local8Bit() const;
static TQString fromLocal8Bit(const char *,int = -1);
%If (TQt_3_1_0 -)
// static TQString fromUcs2(const unsigned short *);
// const unsigned short *ucs2() const;
%End
%If (TQt_2_1_0 -)
// TQString &setUnicode(const TQChar *,uint);
// TQString &setUnicodeCodes(const ushort *,uint);
%End
%If (TQt_3_1_0 -)
TQString &setAscii(const char *,int = -1);
%End
%If (TQt_2_1_0 -)
TQString &setLatin1(const char *,int = -1);
%End
int compare(const TQString &) const;
static int compare(const TQString &,const TQString &);
%If (TQt_3_0_0 -)
int localeAwareCompare(const TQString &) const;
static int localeAwareCompare(const TQString &,const TQString &);
%End
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;
%End
%If (TQt_3_2_0 -)
bool startsWith(const TQString &,bool) const;
%End
%If (TQt_3_0_0 -)
bool endsWith(const TQString &) const;
%End
%If (TQt_3_2_0 -)
bool endsWith(const TQString &,bool) const;
%End
%If (TQt_3_0_0 -)
void setLength(uint);
%End
%If (TQt_3_2_0 -)
uint capacity() const;
void reserve(uint);
void squeeze();
%End
%If (TQt_3_0_0 -)
bool simpleText() const;
bool isRightToLeft() const;
%End
// Force the numeric interpretation so that str + TQString gets handled
// as we want.
@ -792,81 +638,12 @@ public:
SIP_PYOBJECT __unicode__();
%MethodCode
#if PY_VERSION_HEX >= 0x01060000
sipRes = TQStringToPyUnicode(sipCpp);
#else
Py_INCREF(Py_None);
sipRes = Py_None;
#endif
sipRes = PyTQt_qt_PyObject_FromTQString(sipCpp);
%End
SIP_PYOBJECT __str__();
%MethodCode
#if PY_VERSION_HEX >= 0x01060000
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;
}
sipRes = PyTQt_qt_PyObject_FromTQString(sipCpp);
%End
%ConvertToTypeCode
@ -874,13 +651,11 @@ static TQString *PyUnicodeStringToTQString(PyObject *py)
// expected.
if (sipIsErr == NULL)
return (PyString_Check(sipPy) ||
#if PY_VERSION_HEX >= 0x01060000
return (SIPBytes_Check(sipPy) ||
PyUnicode_Check(sipPy) ||
#endif
sipCanConvertToInstance(sipPy,sipClass_TQString,SIP_NO_CONVERTORS));
*sipCppPtr = PyUnicodeStringToTQString(sipPy);
*sipCppPtr = PyTQt_qt_PyObject_AsTQString(sipPy);
if (*sipCppPtr)
return sipGetState(sipTransferObj);
@ -942,7 +717,7 @@ static TQString *PyUnicodeStringToTQString(PyObject *py)
enc = codec->fromUnicode(*sipCpp);
if ((encobj = PyString_FromString(enc.data())) != NULL)
if ((encobj = SIPBytes_FromString(enc.data())) != NULL)
{
*sipPtrPtr = (void *)PyString_AS_STRING(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 &);
%ModuleHeaderCode
extern PyObject *PyTQt_qt_PyObject_FromTQString(const TQString *qstr);
%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.
%If (- TQt_2_00)
int qt_len = qstr->length();
Py_UCS4 maxchar = 0x007f;
class TQString : TQByteArray
for (int qt_i = 0; qt_i < qt_len && maxchar < 0xffff; ++qt_i)
{
%TypeHeaderCode
#include <tqstring.h>
%End
Py_UCS4 uch = qstr->at(qt_i).unicode();
public:
TQString();
TQString(int);
TQString(const TQString &);
TQString(const char *);
TQString(const char *,uint);
if (uch > 0x00ff)
{
maxchar = 0xffff;
}
else if (uch > 0x007f)
{
maxchar = 0x00ff;
}
}
bool isNull() const;
bool isEmpty() const;
uint length() const;
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;
// Create the correctly sized object.
if ((obj = PyUnicode_New(qt_len, maxchar)) == NULL)
return NULL;
TQString &setStr(const char *);
// TQString &setNum(short);
// TQString &setNum(ushort);
TQString &setNum(int /Constrained/);
// TQString &setNum(uint);
// TQString &setNum(long);
// TQString &setNum(ulong);
// TQString &setNum(float,char = 'g',int = 6);
TQString &setNum(double,char = 'g',int = 6);
bool setExpand(uint,char);
int kind = PyUnicode_KIND(obj);
void *data = PyUnicode_DATA(obj);
SIP_PYOBJECT __str__();
%MethodCode
const char *s;
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);
Py_BEGIN_ALLOW_THREADS
s = *sipCpp;
Py_END_ALLOW_THREADS
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 (s == NULL)
s = "";
memcpy(PyUnicode_AS_UNICODE(obj), qstr->ucs2(),
qstr->length() * sizeof (Py_UNICODE));
#endif
sipRes = PyString_FromString(s);
return obj;
}
%End
%ConvertToTypeCode
// Allow a Python string whenever a TQString is expected.
if (sipIsErr == NULL)
return (PyString_Check(sipPy) ||
sipCanConvertToInstance(sipPy,sipClass_TQString,SIP_NO_CONVERTORS));
%ModuleHeaderCode
extern TQString *PyTQt_qt_PyObject_AsTQString(PyObject *obj);
%End
if (PyString_Check(sipPy))
%ModuleCode
// Convert a Python Unicode object to a QString.
TQString *PyTQt_qt_PyObject_AsTQString(PyObject *obj)
{
*sipCppPtr = new TQString(PyString_AS_STRING(sipPy));
if (PyUnicode_Check(obj))
{
#if PY_VERSION_HEX >= 0x03030000
SIP_SSIZE_T len = PyUnicode_GET_LENGTH(obj);
return sipGetState(sipTransferObj);
switch (PyUnicode_KIND(obj))
{
case PyUnicode_1BYTE_KIND:
return new TQString(TQString::fromLatin1((char *)PyUnicode_1BYTE_DATA(obj), len));
case PyUnicode_2BYTE_KIND:
// The (TQChar *) cast should be safe.
return new TQString((TQChar *)PyUnicode_2BYTE_DATA(obj), len);
case PyUnicode_4BYTE_KIND:
// Note that this doesn't handle code points greater than 0xffff. It
// could but it's only an issue for old versions of Qt.
TQString *qstr = new TQString;
Py_UCS4 *ucode = PyUnicode_4BYTE_DATA(obj);
for (SIP_SSIZE_T i = 0; i < len; ++i)
qstr->append(TQChar((uint)ucode[i]));
return qstr;
}
*sipCppPtr = reinterpret_cast<TQString *>(sipConvertToInstance(sipPy,sipClass_TQString,sipTransferObj,SIP_NO_CONVERTORS,0,sipIsErr));
return NULL;
#else
TQString *qstr = new TQString;
return 0;
# ifdef Py_UNICODE_WIDE
Py_UNICODE *ucode = PyUnicode_AS_UNICODE(obj);
SIP_SSIZE_T len = PyUnicode_GET_SIZE(obj);
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
%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

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

@ -57,7 +57,7 @@ is used instead.
{
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_DECREF(l);
@ -80,13 +80,17 @@ is used instead.
for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
{
PyObject *object = PyList_GET_ITEM(sipPy, i);
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;
delete qsl;
return 0;
}

@ -69,8 +69,6 @@ This takes only the <Literal>t</Literal> parameter and returns a tuple of the
%End
%If (TQt_3_0_0 -)
class TQStyleOption
{
%TypeHeaderCode
@ -85,9 +83,7 @@ public:
TQStyleOption(StyleOptionDefault /Constrained/ = Default);
%If (TQt_3_2_0 -)
TQStyleOption(int);
%End
TQStyleOption(int,int);
TQStyleOption(int,int,int,int);
TQStyleOption(TQMenuItem *);
@ -96,29 +92,21 @@ public:
TQStyleOption(const TQColor &);
TQStyleOption(TQTab *);
TQStyleOption(TQListViewItem *);
%If (TQt_3_1_0 -)
TQStyleOption(TQCheckListItem *);
%End
TQStyleOption(TQt::ArrowType /Constrained/);
%If (TQt_3_1_0 -)
TQStyleOption(const TQRect &);
TQStyleOption(TQWidget *);
%End
bool isDefault() const;
%If (TQt_3_3_0 -)
int day() const;
%End
int lineWidth() const;
int midLineWidth() const;
int frameShape() const;
int frameShadow() const;
%If (TQt_3_2_0 -)
int headerSection() const;
%End
TQMenuItem* menuItem() const;
int maxIconWidth() const;
int tabWidth() const;
@ -127,25 +115,17 @@ public:
TQTab *tab() const;
%If (TQt_3_1_0 -)
TQCheckListItem *checkListItem() const;
%End
TQListViewItem *listViewItem() const;
TQt::ArrowType arrowType() const;
%If (TQt_3_1_0 -)
TQRect rect() const;
TQWidget *widget() const;
%End
};
%End
%If (TQt_3_0_0 -)
// Not yet defined in TQt v3Beta5.
class TQStyleHintReturn;
%End
typedef TQMap<TQ_UINT32, TQSize> DialogButtonSizeMap;
typedef TQMap<TQ_INT32, TQ_INT32> TabIdentifierIndexMap;
@ -186,8 +166,6 @@ public:
typedef TQStyleWidgetActionRequestData TQStyleApplicationActionRequestData;
%If (TQt_2_00 -)
class TQStyle : TQObject
{
%TypeHeaderCode
@ -196,13 +174,7 @@ class TQStyle : TQObject
%End
public:
%If (TQt_3_0_0 -)
TQStyle();
%End
%If (- TQt_3_0_0)
GUIStyle guiStyle() const;
%End
enum ControlElementFlags {
CEF_None = 0x00000000,
@ -246,157 +218,16 @@ public:
virtual void polish(TQPalette &);
%If (TQt_3_0_0 -)
virtual void polishPopupMenu(TQPopupMenu *) = 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,
const TQPixmap *,const TQString &,int = -1) const;
virtual void drawItem(TQPainter *,const TQRect &,int,const TQColorGroup &,
bool,const TQPixmap *,const TQString &,int = -1,
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 {
PE_ButtonCommand,
PE_ButtonDefault,
@ -456,25 +287,16 @@ public:
PE_ProgressBarChunk,
%If (TQt_3_0_1 -)
PE_PanelLineEdit,
PE_PanelTabWidget,
PE_WindowFrame,
%End
%If (TQt_3_1_0 -)
PE_CheckListController,
PE_CheckListIndicator,
PE_CheckListExclusiveIndicator,
PE_PanelGroupBox,
%End
%If (TQt_3_0_4 - TQt_3_0_5)
PE_PopupMenuScroller,
%End
%If (TQt_3_3_0 -)
PE_RubberBand,
%End
PE_CustomBase
};
@ -528,22 +350,14 @@ public:
CE_MenuBarItem,
CE_ToolButtonLabel,
%If (TQt_3_1_0 -)
CE_MenuBarEmptyArea,
%End
%If (TQt_3_0_5 -)
CE_PopupMenuScroller,
%End
%If (TQt_3_1_0 -)
CE_DockWindowEmptyArea,
%End
%If (TQt_3_2_0 -)
CE_PopupMenuVerticalExtra,
CE_PopupMenuHorizontalExtra,
CE_ToolBoxTab,
CE_HeaderLabel,
%End
CE_CustomBase
};
@ -580,7 +394,6 @@ public:
SR_ToolButtonContents,
%If (TQt_3_2_0 -)
SR_DialogButtonAccept,
SR_DialogButtonReject,
SR_DialogButtonApply,
@ -592,7 +405,6 @@ public:
SR_DialogButtonCustom,
SR_ToolBoxTabContents,
%End
SR_CustomBase
};
@ -632,9 +444,7 @@ public:
SC_ComboBoxFrame,
SC_ComboBoxEditField,
SC_ComboBoxArrow,
%If (TQt_3_1_0 -)
SC_ComboBoxListBoxPopup,
%End
SC_SliderGroove,
SC_SliderHandle,
@ -720,13 +530,8 @@ public:
PM_IndicatorHeight,
PM_ExclusiveIndicatorWidth,
PM_ExclusiveIndicatorHeight,
%If (TQt_3_0_4 -)
PM_PopupMenuScrollerHeight,
%End
%If (TQt_3_1_0 -)
PM_CheckListButtonSize,
%End
%If (TQt_3_2_0 -)
PM_CheckListControllerSize,
PM_PopupMenuFrameHorizontalExtra,
PM_PopupMenuFrameVerticalExtra,
@ -742,13 +547,10 @@ public:
PM_HeaderGripMargin,
PM_TabBarTabShiftHorizontal,
PM_TabBarTabShiftVertical,
%End
%If (TQt_3_3_0 -)
PM_TabBarScrollButtonWidth,
PM_MenuBarItemSpacing,
PM_ToolBarItemSpacing,
%End
PM_CustomBase
};
@ -765,19 +567,15 @@ public:
CT_DockWindow,
CT_ProgressBar,
CT_PopupMenuItem,
%If (TQt_3_1_0 -)
CT_TabBarTab,
CT_Slider,
CT_Header,
CT_LineEdit,
CT_MenuBar,
CT_SpinBox,
%End
%If (TQt_3_2_0 -)
CT_SizeGrip,
CT_TabWidget,
CT_DialogButtons,
%End
CT_CustomBase
};
@ -839,31 +637,22 @@ public:
SH_ComboBox_Popup,
%If (TQt_3_0_1 -)
SH_TitleBar_NoBorder,
SH_ScrollBar_StopMouseOverSlider,
%End
%If (TQt_3_0_2 -)
SH_BlinkCursorWhenTextSelected,
SH_RichText_FullWidthSelection,
%End
%If (TQt_3_0_4 -)
SH_PopupMenu_Scrollable,
%End
%If (TQt_3_1_0 -)
SH_GroupBox_TextLabelVerticalAlignment,
SH_GroupBox_TextLabelColor,
SH_PopupMenu_SloppySubMenus,
%End
%If (TQt_3_2_0 -)
SH_Table_GridLineColor,
SH_LineEdit_PasswordCharacter,
@ -877,13 +666,10 @@ public:
SH_ScrollBar_LeftClickAbsolutePosition,
SH_ListViewExpand_SelectMouseType,
%End
%If (TQt_3_3_0 -)
SH_UnderlineAccelerator,
SH_ToolButton_Uses3D,
%End
SH_CustomBase
};
@ -903,9 +689,7 @@ public:
SP_MessageBoxInformation,
SP_MessageBoxWarning,
SP_MessageBoxCritical,
%If (TQt_3_2_0 -)
SP_MessageBoxQuestion,
%End
SP_CustomBase
};
@ -916,7 +700,6 @@ public:
static TQRect visualRect(const TQRect &,const TQWidget *);
static TQRect visualRect(const TQRect &,const TQRect &);
%End
// New API
virtual void drawPrimitive( PrimitiveElement,
@ -1053,20 +836,6 @@ public:
//void setApplicationActionRequestHook( ApplicationActionRequestHook );
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:
%If (- TQt_3_0_0)
TQStyle();
TQStyle(GUIStyle);
%End
%If (TQt_2_1_0 -)
TQStyle(const TQStyle &);
%End
};
%End

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

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

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

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

@ -44,97 +44,50 @@ public:
void show();
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 TQIconSet &,const TQString &);
%End
void addTab(TQWidget *,TQTab *);
%If (TQt_2_00 -)
void insertTab(TQWidget *,const TQString &,int = -1);
void insertTab(TQWidget *,const TQIconSet &,const TQString &,int = -1);
void insertTab(TQWidget *,TQTab *,int = -1);
void changeTab(TQWidget *,const TQString &);
void changeTab(TQWidget *,const TQIconSet &,const TQString &);
%End
%If (TQt_2_00 -)
bool isTabEnabled(TQWidget *) const;
void setTabEnabled(TQWidget *,bool);
%End
%If (- TQt_3_0_0)
bool isTabEnabled(const char *) const;
void setTabEnabled(const char *,bool);
%End
void showPage(TQWidget *);
%If (TQt_2_00 -)
void removePage(TQWidget *);
TQString tabLabel(TQWidget *);
%End
%If (- TQt_2_00)
const char *tabLabel(TQWidget *);
%End
%If (TQt_2_00 -)
TQWidget *currentPage() const;
%End
%If (- TQt_2_00)
void setDefaultButton(const char * = "Defaults");
%End
%If (TQt_2_00 -)
void setDefaultButton(const TQString &);
void setDefaultButton();
%End
bool hasDefaultButton() const;
%If (TQt_2_00 -)
void setHelpButton(const TQString &);
void setHelpButton();
bool hasHelpButton() const;
%End
%If (- TQt_2_00)
void setCancelButton(const char * = "Cancel");
%End
%If (TQt_2_00 -)
void setCancelButton(const TQString &);
void setCancelButton();
%End
bool hasCancelButton() const;
%If (- TQt_2_00)
void setApplyButton(const char * = "Apply");
%End
%If (TQt_2_00 -)
void setApplyButton(const TQString &);
void setApplyButton();
%End
bool hasApplyButton() const;
%If (- TQt_2_00)
void setOkButton(const char * = "OK");
%End
%If (TQt_2_00 -)
void setOkButton(const TQString &);
void setOkButton();
%End
bool hasOkButton() const;
protected:
void paintEvent(TQPaintEvent *);
void resizeEvent(TQResizeEvent *);
%If (- TQt_2_00)
void styleChange(GUIStyle);
%End
%If (TQt_2_00 -)
void styleChange(TQStyle &);
%End
void setTabBar(TQTabBar *);
TQTabBar *tabBar() const;
@ -144,24 +97,12 @@ signals:
void applyButtonPressed();
void cancelButtonPressed();
void defaultButtonPressed();
%If (TQt_2_00 -)
void helpButtonPressed();
%End
%If (TQt_2_2_0 -)
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:
%If (TQt_2_1_0 -)
TQTabDialog(const TQTabDialog &);
%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
%If (TQt_2_00 -)
class TQTabWidget : TQWidget
{
%TypeHeaderCode
@ -38,28 +36,9 @@ class TQTabWidget : TQWidget
%End
public:
%If (TQt_3_0_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().
%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 TQIconSet &,
const TQString &);
@ -69,7 +48,6 @@ public:
virtual void insertTab(TQWidget * /Transfer/,const TQIconSet &,
const TQString &,int = -1);
virtual void insertTab(TQWidget * /Transfer/,TQTab *,int = -1);
%End
void changeTab(TQWidget *,const TQString &);
void changeTab(TQWidget *,const TQIconSet &,const TQString &);
@ -77,18 +55,9 @@ public:
bool isTabEnabled(TQWidget *) const;
void setTabEnabled(TQWidget *,bool);
%If (TQt_3_2_0 -)
void setCornerWidget(TQWidget *,TQt::Corner = TQt::TopRight);
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;
void setTabLabel(TQWidget *,const TQString &);
@ -98,22 +67,12 @@ public:
void removeTabToolTip(TQWidget *);
void setTabToolTip(TQWidget *,const TQString &);
TQString tabToolTip(TQWidget *) const;
%End
TQWidget *currentPage() const;
%If (TQt_3_0_0 -)
TQWidget *page(int) const;
TQString label(int) const;
%End
%If (TQt_2_2_0 -)
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;
%End
TQSize sizeHint() const;
TQSize minimumSizeHint() const;
@ -126,7 +85,6 @@ public:
TabPosition tabPosition() const;
void setTabPosition(TabPosition);
%If (TQt_2_2_0 -)
enum TabShape {
Rounded,
Triangular
@ -134,25 +92,16 @@ public:
TabShape tabShape() const;
void setTabShape(TabShape);
%End
int margin() const;
void setMargin(int);
%If (TQt_2_1_0 - TQt_3_0_0)
TQSizePolicy sizePolicy() const;
%End
%If (TQt_3_0_0 -)
int count() const;
%End
public slots:
%If (TQt_3_0_0 -)
void setCurrentPage(int);
virtual void showPage(TQWidget *);
virtual void removePage(TQWidget *);
%End
protected:
void showEvent(TQShowEvent *);
@ -164,14 +113,8 @@ protected:
bool eventFilter(TQObject *,TQEvent *);
signals:
%If (TQt_2_2_0 -)
void currentChanged(TQWidget *);
%End
private:
%If (TQt_2_1_0 -)
TQTabWidget(const TQTabWidget &);
%End
};
%End

@ -29,8 +29,6 @@
%End
%If (TQt_3_0_0 -)
class TQTextBrowser : TQTextEdit
{
%TypeHeaderCode
@ -54,14 +52,10 @@ public slots:
signals:
void backwardAvailable(bool);
void forwardAvailable(bool);
%If (TQt_3_1_0 -)
void sourceChanged(const TQString &);
%End
void highlighted(const TQString &);
void linkClicked(const TQString &);
%If (TQt_3_1_0 -)
void anchorClicked(const TQString &,const TQString &);
%End
protected:
void keyPressEvent(TQKeyEvent *);
@ -69,46 +63,3 @@ protected:
private:
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
%If (TQt_2_00 -)
class TQTextEncoder
{
%TypeHeaderCode
@ -94,25 +92,19 @@ public:
static TQTextCodec *codecForContent(const char *,int);
static TQTextCodec *codecForIndex(int);
static TQTextCodec *codecForLocale();
%If (TQt_3_0_0 -)
static void setCodecForLocale(TQTextCodec *);
%End
%If (TQt_3_1_0 -)
static TQTextCodec *codecForTr();
static void setCodecForTr(TQTextCodec *);
static TQTextCodec *codecForCStrings();
static void setCodecForCStrings(TQTextCodec *);
%End
static void deleteAllCodecs();
static const char *locale();
virtual const char *name() const = 0;
%If (TQt_3_0_0 -)
virtual const char *mimeName() const;
%End
virtual int mibEnum() const = 0;
virtual TQTextDecoder *makeDecoder() const /Factory/;
@ -123,10 +115,8 @@ public:
TQCString fromUnicode(const TQString &) const;
TQString toUnicode(const TQByteArray &,int) const;
TQString toUnicode(const TQByteArray &) const;
%If (TQt_3_0_0 -)
TQString toUnicode(const TQCString &,int) const;
TQString toUnicode(const TQCString &) const;
%End
TQString toUnicode(const char *) const;
virtual bool canEncode(TQChar) const;
virtual bool canEncode(const TQString &) const;
@ -134,13 +124,9 @@ public:
virtual int heuristicContentMatch(const char *,int) const = 0;
virtual int heuristicNameMatch(const char *) const;
%If (TQt_3_0_0 -)
virtual TQByteArray fromUnicode(const TQString &,int,int) const;
virtual unsigned short characterFromUnicode(const TQString &,int) const;
%End
protected:
TQTextCodec();
};
%End

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

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

@ -29,8 +29,6 @@
%End
%If (TQt_3_0_0 -)
class TQTextView : TQTextEdit
{
%TypeHeaderCode
@ -43,86 +41,5 @@ public:
TQWidget * /TransferThis/ = 0,const char * = 0);
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 &);
%End
};
%End

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

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

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

@ -29,8 +29,6 @@
%End
%If (TQt_3_0_0 -)
class TQToolBar : TQDockWindow
{
%TypeHeaderCode
@ -73,88 +71,3 @@ protected:
private:
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
%If (TQt_3_2_0 -)
class TQToolBox : TQFrame
{
%TypeHeaderCode
@ -84,5 +82,3 @@ protected:
void frameChanged();
void styleChange(TQStyle &);
};
%End

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

@ -44,28 +44,15 @@ class TQToolTipGroup : TQObject
public:
TQToolTipGroup(TQObject * /TransferThis/,const char * = 0);
%If (TQt_2_00 -)
bool delay() const;
%End
%If (TQt_2_1_0 -)
bool enabled() const;
%End
public slots:
%If (TQt_2_00 -)
void setDelay(bool);
%End
%If (TQt_2_1_0 -)
void setEnabled(bool);
%End
signals:
%If (- TQt_2_00)
void showTip(const char *);
%End
%If (TQt_2_00 -)
void showTip(const TQString &);
%End
void removeTip();
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
{
%TypeHeaderCode
@ -127,30 +79,18 @@ public:
TQToolTipGroup *,const TQString &);
static void remove(TQWidget *,const TQRect &);
%If (TQt_3_0_0 -)
static TQString textFor(TQWidget *,const TQPoint & = TQPoint());
%End
%If (TQt_2_1_0 -)
static void hide();
%End
static TQFont font();
static void setFont(const TQFont &);
static TQPalette palette();
static void setPalette(const TQPalette &);
%If (TQt_3_0_0 -)
static void setGloballyEnabled(bool);
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);
%End
TQWidget *parentWidget() const;
TQToolTipGroup *group() const;
@ -159,11 +99,7 @@ protected:
virtual void maybeTip(const TQPoint &) = 0;
void tip(const TQRect &,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 TQString &,const TQRect &);
%End
void clear();
};
%End

@ -35,8 +35,6 @@
%End
%If (TQt_2_2_0 -)
class TQTranslatorMessage
{
%TypeHeaderCode
@ -66,22 +64,12 @@ public:
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,
Prefix = HashContextSourceTextComment) const /ReleaseGIL/;
%End
Prefix commonPrefix(const TQTranslatorMessage &) const;
};
%End
%If (TQt_2_00 -)
class TQTranslator : TQObject
{
@ -90,39 +78,17 @@ class TQTranslator : TQObject
%End
public:
%If (TQt_3_2_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;
%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 *,
const char * = 0) const;
%End
bool load(const TQString &,const TQString & = TQString::null,
const TQString & = TQString::null,
const TQString & = TQString::null);
%If (TQt_3_1_0 -)
bool load(const uchar *,int);
%End
void clear();
@ -133,45 +99,15 @@ public:
bool save(const TQString &,SaveMode = Everything);
%If (TQt_2_2_0 -)
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 &);
%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;
%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);
%End
void unsqueeze();
%If (TQt_2_2_0 -)
TQValueList<TQTranslatorMessage> messages() const;
%End
private:
TQTranslator(const TQTranslator &);
};
%End

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

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

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

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

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

@ -31,8 +31,6 @@ converted to and from Python lists of the type.
%End
%If (TQt_2_1_0 -)
template<Type>
%MappedType TQValueList<Type>
{
@ -115,10 +113,6 @@ template<Type>
%End
};
%End
%If (TQt_2_00 -)
%MappedType TQValueList<int>
{
@ -139,7 +133,7 @@ template<Type>
// Get it.
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);
@ -161,7 +155,7 @@ template<Type>
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)
{
@ -177,5 +171,3 @@ template<Type>
return 1;
%End
};
%End

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

@ -29,8 +29,6 @@
%End
%If (TQt_2_00 -)
class TQVBox : TQHBox
{
%TypeHeaderCode
@ -38,18 +36,8 @@ class TQVBox : TQHBox
%End
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);
%End
private:
%If (TQt_2_1_0 -)
TQVBox(const TQVBox &);
%End
};
%End

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

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

@ -31,8 +31,6 @@
%If (TQt_THREAD_SUPPORT)
%If (TQt_3_0_0 -)
class TQWaitCondition
{
%TypeHeaderCode
@ -53,29 +51,3 @@ private:
};
%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
%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
{
%TypeHeaderCode
@ -59,39 +39,22 @@ public:
TQWhatsThis(TQWidget *);
virtual TQString text(const TQPoint &);
%If (TQt_3_0_0 -)
virtual bool clicked(const TQString &);
%End
%If (TQt_3_1_0 -)
static void setFont(const TQFont &);
%End
static void add(TQWidget *,const TQString &);
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);
%End
static TQToolButton *whatsThisButton(TQWidget *);
static void enterWhatsThisMode();
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,
const TQPoint & = TQCursor::pos(),
TQWidget * = 0);
static void display(const TQString &,const TQPoint & = TQCursor::pos(),
TQWidget * = 0);
%End
};
%End

@ -68,9 +68,7 @@ public:
WId winId() const;
bool isTopLevel() const;
%If (TQt_3_0_0 -)
bool isDialog() const;
%End
bool isPopup() const;
bool isDesktop() const;
bool isModal() const;
@ -104,42 +102,27 @@ public:
TQPoint mapFromGlobal(const TQPoint &) const;
TQPoint mapToParent(const TQPoint &) const;
TQPoint mapFromParent(const TQPoint &) const;
%If (TQt_2_2_0 -)
TQPoint mapTo(TQWidget *,const TQPoint &) const;
TQPoint mapFrom(TQWidget *,const TQPoint &) const;
%End
TQWidget *topLevelWidget() 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;
%If (TQt_3_0_0 -)
const TQColor &eraseColor() const;
virtual void setEraseColor(const TQColor &);
const TQPixmap *erasePixmap() const;
virtual void setErasePixmap(const TQPixmap &);
%End
const TQColorGroup &colorGroup() const;
const TQPalette &palette() const;
%If (TQt_2_2_0 -)
bool ownPalette() const;
%End
virtual void setPalette(const TQPalette &);
%If (TQt_2_1_0 -)
void unsetPalette();
%End
%If (TQt_3_0_0 -)
const TQColor &paletteForegroundColor() const;
void setPaletteForegroundColor(const TQColor &);
@ -150,38 +133,18 @@ public:
virtual void setPaletteBackgroundPixmap(const TQPixmap &);
const TQBrush &backgroundBrush() const;
%End
%If (TQt_2_2_0 -)
bool ownFont() const;
%End
virtual void setFont(const TQFont &);
TQFontMetrics fontMetrics() 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;
%If (TQt_2_2_0 -)
bool ownCursor() const;
%End
virtual void setCursor(const TQCursor &);
const TQPixmap *icon() const;
bool hasMouseTracking() const;
%If (TQt_3_0_0 -)
bool hasMouse() const;
%End
void clearMask();
bool isActiveWindow() const;
@ -191,10 +154,8 @@ public:
static void setTabOrder(TQWidget *,TQWidget *);
TQWidget *focusProxy() const;
%If (TQt_3_2_0 -)
void setInputMethodEnabled(bool);
bool isInputMethodEnabled() const;
%End
void grabMouse();
void grabMouse(const TQCursor &);
@ -208,95 +169,27 @@ public:
bool isVisibleTo(TQWidget *) const;
bool isVisibleToTLW() const;
virtual TQSize sizeHint() const;
%If (- TQt_3_1_0)
virtual void adjustSize();
%End
void erase();
void erase(int,int,int,int);
void erase(const TQRect &);
void scroll(int,int);
TQWidget *focusWidget() 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;
WState testWState(WState) const;
WFlags testWFlags(WFlags) const;
%End
static TQWidget *find(WId);
%If (TQt_3_0_0 -)
TQWidget *childAt(int,int,bool = 0) const;
TQWidget *childAt(const TQPoint &,bool = 0) const;
%End
%If (TQt_3_3_0 -)
void setWindowOpacity(double);
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 *);
TQStyle &style() const;
void setStyle(TQStyle *);
%If (TQt_3_0_0 -)
TQStyle *setStyle(const TQString &);
%End
TQRect frameGeometry() const;
TQSize frameSize() const;
TQRegion childrenRegion() const;
@ -311,62 +204,9 @@ public:
void setBaseSize(const TQSize &);
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);
%If (TQt_3_0_0 -)
void setBackgroundMode(BackgroundMode,BackgroundMode);
%End
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();
TQString caption() const;
TQString iconText() const;
@ -391,35 +231,20 @@ public:
bool isMinimized() const;
virtual TQSize minimumSizeHint() const;
virtual TQSizePolicy sizePolicy() const;
%If (TQt_2_2_0 -)
bool isHidden() const;
bool isMaximized() const;
%End
%If (TQt_3_1_0 -)
bool isShown() const;
bool isFullScreen() const;
%End
%If (TQt_3_3_0 -)
uint windowState() const;
void setWindowState(uint);
%End
%If (TQt_3_0_0 -)
virtual void setSizePolicy(TQSizePolicy);
%End
%If (TQt_3_1_0 -)
void setSizePolicy(TQSizePolicy::SizeType,TQSizePolicy::SizeType,
bool = 0);
%End
%If (TQt_2_2_0 - TQt_3_0_0)
void setSizePolicy(TQSizePolicy);
%End
virtual int heightForWidth(int) const;
%If (TQt_3_2_0 -)
TQRegion clipRegion() const;
%End
TQLayout *layout() const;
void updateGeometry();
@ -440,7 +265,6 @@ public:
Py_END_ALLOW_THREADS
%End
%If (TQt_2_1_0 -)
void reparent(TQWidget * /GetWrapper/,const TQPoint &,bool = 0);
%MethodCode
if (sipCpp -> parent() != a0)
@ -454,7 +278,6 @@ public:
Py_BEGIN_ALLOW_THREADS
sipCpp->reparent(a0, *a1, a2);
Py_END_ALLOW_THREADS
%End
%End
void erase(const TQRegion &);
@ -465,51 +288,26 @@ public:
virtual void setAutoMask(bool);
bool autoMask() const;
virtual bool customWhatsThis() const;
%If (- TQt_3_0_0)
bool testWState(uint) const;
%End
%End
%If (TQt_2_1_0 -)
TQRect microFocusHint() const;
void unsetFont();
%End
%If (TQt_2_1_0 -)
enum BackgroundOrigin {
WidgetOrigin,
ParentOrigin,
%If (TQt_3_0_0 -)
WindowOrigin,
%End
%If (TQt_3_1_0 -)
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);
%End
%If (TQt_2_1_0 -)
BackgroundOrigin backgroundOrigin() const;
%End
%If (TQt_3_1_0 -)
TQPoint backgroundOffset() const;
%End
public slots:
%If (TQt_3_1_0 -)
virtual void adjustSize();
%End
virtual void setEnabled(bool);
%If (TQt_2_2_0 -)
void setDisabled(bool);
%End
void update();
void update(int,int,int,int);
void update(const TQRect &);
@ -517,10 +315,8 @@ public slots:
void repaint(const TQRect &,bool = 1);
virtual void show();
virtual void hide();
%If (TQt_3_1_0 -)
void setShown(bool);
void setHidden(bool);
%End
void raise() /PyName=raiseW/;
void lower() /PyName=lowerW/;
virtual void move(int,int);
@ -529,18 +325,6 @@ public slots:
void resize(const TQSize &);
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 setIcon(const TQPixmap &);
virtual void setIconText(const TQString &);
@ -557,18 +341,13 @@ public slots:
virtual void polish();
bool close();
virtual void setGeometry(const TQRect &);
%End
%If (TQt_2_1_0 -)
void showFullScreen();
void constPolish() const;
%End
%If (TQt_3_0_0 -)
// This was added before v3 but I can't be bothered to work out exactly
// when.
void stackUnder(TQWidget *);
%End
protected:
bool event(TQEvent *);
@ -586,42 +365,22 @@ protected:
virtual void moveEvent(TQMoveEvent *);
virtual void resizeEvent(TQResizeEvent *);
virtual void closeEvent(TQCloseEvent *);
%If (TQt_3_0_0 -)
virtual void contextMenuEvent(TQContextMenuEvent *);
virtual void imStartEvent(TQIMEvent *);
virtual void imComposeEvent(TQIMEvent *);
virtual void imEndEvent(TQIMEvent *);
virtual void tabletEvent(TQTabletEvent *);
%End
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 fontChange(const TQFont &);
%If (TQt_3_0_0 -)
virtual void windowActivationChange(bool);
void resetInputContext();
%End
WFlags getWFlags() const;
void clearWFlags(WFlags);
virtual bool focusNextPrevChild(bool);
// TQWExtra *extraData();
// 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 *);
%If (TQt_DRAGANDDROP)
virtual void dragEnterEvent(TQDragEnterEvent *);
@ -631,10 +390,7 @@ protected:
%End
virtual void showEvent(TQShowEvent *);
virtual void hideEvent(TQHideEvent *);
%If (- TQt_3_0_0)
virtual void customEvent(TQCustomEvent *);
%End
virtual void updateMask();
@ -646,18 +402,8 @@ protected:
virtual void setWState(uint);
void clearWState(uint);
virtual void setWFlags(WFlags);
%If (- TQt_3_0_0)
virtual void setFRect(const TQRect &);
virtual void setCRect(const TQRect &);
%End
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);
%End
%End
private:
TQWidget(const TQWidget &);

@ -37,25 +37,16 @@ class TQWidgetStack : TQFrame
public:
TQWidgetStack(TQWidget * /TransferThis/ = 0,const char * = 0);
%If (TQt_3_1_0 -)
TQWidgetStack(TQWidget * /TransferThis/,const char *,WFlags);
%End
// The TQWidget has it's parent changed to be `this' so it will be
// deleted automatically when `this' is deleted. It stays this way
// 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);
%End
void removeWidget(TQWidget *);
%If (TQt_2_00 -)
TQSize sizeHint() const;
TQSize minimumSizeHint() const;
%End
void show();
TQWidget *widget(int) const;
@ -63,13 +54,7 @@ public:
TQWidget *visibleWidget() const;
%If (TQt_2_00 -)
void setFrameRect(const TQRect &);
%End
%If (- TQt_2_00)
bool event(TQEvent *);
%End
signals:
void aboutToShow(int);
@ -81,18 +66,11 @@ public slots:
protected:
void frameChanged();
%If (- TQt_2_00)
void setChildGeometries();
%End
%If (TQt_2_00 -)
void resizeEvent(TQResizeEvent *);
virtual void setChildGeometries();
void childEvent(TQChildEvent *);
%End
private:
%If (TQt_2_1_0 -)
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
%If (- TQt_2_00)
typedef short TQCOORD;
const int TQCOORD_MIN;
const int TQCOORD_MAX;
%End
%If (TQt_2_00 -)
typedef TQ_INT32 TQCOORD;
const TQCOORD TQCOORD_MIN;
const TQCOORD TQCOORD_MAX;
%End
typedef unsigned TQRgb;
%If (- TQt_3_0_0)
char *tqAppName();
%End
%If (TQt_3_0_0 -)
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 (- TQt_3_0_0)
typedef unsigned HANDLE;
typedef unsigned WId;
%End
%If (TQt_3_0_0 -)
typedef unsigned long WId;
%End
typedef void Display;
Display *tqt_xdisplay();
int tqt_xscreen();
WId tqt_xrootwin();
%If (TQt_3_1_0 -)
WId tqt_xrootwin(int);
%End
%If (TQt_3_3_0 -)
const char *tqAppClass();
%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_2_00 -)
class TQWindowsStyle : TQCommonStyle
{
@ -75,7 +74,6 @@ class TQWindowsStyle : TQCommonStyle
public:
TQWindowsStyle();
%If (TQt_3_3_0 -)
void applicationPolish(const TQStyleControlElementData&, ControlElementFlags, void *);
void applicationUnPolish(const TQStyleControlElementData&, ControlElementFlags, void *);
@ -85,64 +83,7 @@ public:
void polish( TQPalette & );
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 &,
const TQColorGroup &,SFlags = Style_Default,
const TQStyleOption & = TQStyleOption()) const;
@ -169,24 +110,11 @@ public:
TQPixmap stylePixmap(StylePixmap,const TQStyleControlElementData&,ControlElementFlags,
const TQStyleOption & = TQStyleOption(), const TQWidget * = 0) const;
%End
%If (TQt_3_1_0 -)
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:
%If (TQt_3_0_0 -)
TQWindowsStyle(const TQWindowsStyle &);
%End
};
%End
%End

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -186,7 +186,7 @@ static char **pyArgvToC(PyObject *argvlist,int *argcp)
char *arg;
// 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)
return NULL;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -36,7 +36,7 @@
// 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.
%PrePythonCode
from qt import TQObject
from python_tqt.qt import TQObject
%End

Loading…
Cancel
Save