Entry step for renaming PyTQt module libraries from qt* to tqt*.

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

@ -41,16 +41,16 @@ int main(int argc, char **argv)
*/ */
struct _inittab builtin_modules[] = { struct _inittab builtin_modules[] = {
{"sip_tqt", initsip_tqt}, {"sip_tqt", initsip_tqt},
/* {"qt", initqt},*/ /* {"tqt", initqt},*/
/* {"qtaxcontainer", initqtaxcontainer},*/ /* {"tqtaxcontainer", initqtaxcontainer},*/
/* {"qtcanvas", initqtcanvas},*/ /* {"tqtcanvas", initqtcanvas},*/
/* {"qtext", initext},*/ /* {"tqtext", initext},*/
/* {"qtgl", initqtgl},*/ /* {"tqtgl", initqtgl},*/
/* {"qtnetwork", initqtnetwork},*/ /* {"tqtnetwork", initqtnetwork},*/
/* {"qtsql", initqtsql},*/ /* {"tqtsql", initqtsql},*/
/* {"qttable", initqttable},*/ /* {"tqttable", initqttable},*/
/* {"qtui", initqtui},*/ /* {"tqtui", initqtui},*/
/* {"qtxml", initqtxml},*/ /* {"tqtxml", initqtxml},*/
{NULL, NULL} {NULL, NULL}
}; };

@ -45,16 +45,16 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
*/ */
struct _inittab builtin_modules[] = { struct _inittab builtin_modules[] = {
{"sip_tqt", initsip_tqt}, {"sip_tqt", initsip_tqt},
/* {"qt", initqt},*/ /* {"tqt", initqt},*/
/* {"qtaxcontainer", initqtaxcontainer},*/ /* {"tqtaxcontainer", initqtaxcontainer},*/
/* {"qtcanvas", initqtcanvas},*/ /* {"tqtcanvas", initqtcanvas},*/
/* {"qtext", initext},*/ /* {"tqtext", initext},*/
/* {"qtgl", initqtgl},*/ /* {"tqtgl", initqtgl},*/
/* {"qtnetwork", initqtnetwork},*/ /* {"tqtnetwork", initqtnetwork},*/
/* {"qtsql", initqtsql},*/ /* {"tqtsql", initqtsql},*/
/* {"qttable", initqttable},*/ /* {"tqttable", initqttable},*/
/* {"qtui", initqtui},*/ /* {"tqtui", initqtui},*/
/* {"qtxml", initqtxml},*/ /* {"tqtxml", initqtxml},*/
{NULL, NULL} {NULL, NULL}
}; };

@ -25,8 +25,8 @@ WindowsInterpreter = False
# Set this to the list of the name of modules to be builtin to the custom # Set this to the list of the name of modules to be builtin to the custom
# interpreter. The modules must also be added to custom.c and/or customw.c. # interpreter. The modules must also be added to custom.c and/or customw.c.
Modules = ["sip"] Modules = ["sip"]
#Modules = ["sip", "qt", "qtaxcontainer", "qtcanvas", "qtext", "qtgl", #Modules = ["sip", "tqt", "tqtaxcontainer", "tqtcanvas", "tqtext", "tqtgl",
# "qtnetwork", "qtsql", "qttable", "qtui", "qtxml"] # "tqtnetwork", "tqtsql", "tqttable", "tqtui", "tqtxml"]
# Set this to the name of the directory containing the static modules. # Set this to the name of the directory containing the static modules.
ModuleDirectory = cfg.default_mod_dir ModuleDirectory = cfg.default_mod_dir
@ -62,11 +62,11 @@ else:
build["sources"] = "custom.c" build["sources"] = "custom.c"
console = True console = True
# Assume Qt support is required if Qt support was enabled in the sip module. # Assume TQt support is required if TQt support was enabled in the sip module.
qt = (cfg.qt_version > 0) tqt = (cfg.tqt_version > 0)
# Create the Makefile instance. # Create the Makefile instance.
mf = sip_tqt_config.ProgramMakefile(cfg, build, python=True, console=console, qt=qt) mf = sip_tqt_config.ProgramMakefile(cfg, build, python=True, console=console, tqt=tqt)
# Modify the Makefile according to the values set above. # Modify the Makefile according to the values set above.
mf.extra_lib_dirs.extend(ExtraLibraryDirectories) mf.extra_lib_dirs.extend(ExtraLibraryDirectories)

@ -12,7 +12,7 @@ supports over 50 different platform/compiler combinations.
The build system is implemented as a pure Python module called :mod:`sipconfig` The build system is implemented as a pure Python module called :mod:`sipconfig`
that contains a number of classes and functions. Using this module you can that contains a number of classes and functions. Using this module you can
write bespoke configuration scripts (e.g. PyQt's ``configure.py``) or use it write bespoke configuration scripts (e.g. PyTQt's ``configure.py``) or use it
with other Python based build systems (e.g. with other Python based build systems (e.g.
`Distutils <http://www.python.org/sigs/distutils-sig/distutils.html>`_ and `Distutils <http://www.python.org/sigs/distutils-sig/distutils.html>`_ and
`SCons <http://www.scons.org>`_). `SCons <http://www.scons.org>`_).
@ -20,17 +20,17 @@ with other Python based build systems (e.g.
An important feature of SIP is the ability to generate bindings that are built An important feature of SIP is the ability to generate bindings that are built
on top of existing bindings. For example, both on top of existing bindings. For example, both
`PyKDE <http://www.riverbankcomputing.com/software/pytde/>`_ and `PyKDE <http://www.riverbankcomputing.com/software/pytde/>`_ and
`PyQwt <http://pyqwt.sourceforge.net/>`_ are built on top of PyQt but all three `PyQwt <http://pyqwt.sourceforge.net/>`_ are built on top of PyTQt but all three
packages are maintained by different developers. To make this easier PyQt packages are maintained by different developers. To make this easier PyTQt
includes its own configuration module, ``pyqtconfig``, that contains additional includes its own configuration module, ``pytqtconfig``, that contains additional
classes intended to be used by the configuration scripts of bindings built on classes intended to be used by the configuration scripts of bindings built on
top of PyQt. The SIP build system includes facilities that do a lot of the top of PyTQt. The SIP build system includes facilities that do a lot of the
work of creating these additional configuration modules. work of creating these additional configuration modules.
.. function:: create_config_module(module, template, content[, macros=None]) .. function:: create_config_module(module, template, content[, macros=None])
This creates a configuration module (e.g. ``pyqtconfig``) from a template This creates a configuration module (e.g. ``pytqtconfig``) from a template
file and a string. file and a string.
:param module: :param module:
@ -377,7 +377,7 @@ work of creating these additional configuration modules.
A string that will remove a file. A string that will remove a file.
.. method:: __init__(configuration[, console=0[, qt=0[, opengl=0[, python=0[, threaded=0[, warnings=None[, debug=0[, dir=None[, makefile="Makefile"[, installs=None[, universal=None[, arch=None]]]]]]]]]]]]) .. method:: __init__(configuration[, console=0[, tqt=0[, opengl=0[, python=0[, threaded=0[, warnings=None[, debug=0[, dir=None[, makefile="Makefile"[, installs=None[, universal=None[, arch=None]]]]]]]]]]]])
:param configuration: :param configuration:
the current configuration and is an instance of the the current configuration and is an instance of the
@ -385,8 +385,8 @@ work of creating these additional configuration modules.
:param console: :param console:
is set if the target is a console (rather than GUI) target. This is set if the target is a console (rather than GUI) target. This
only affects Windows and is ignored on other platforms. only affects Windows and is ignored on other platforms.
:param qt: :param tqt:
is set if the target uses Qt. For Qt v4 a list of Qt libraries may is set if the target uses TQt. For Qt v4 a list of Qt libraries may
be specified and a simple non-zero value implies QtCore and QtGui. be specified and a simple non-zero value implies QtCore and QtGui.
:param opengl: :param opengl:
is set if the target uses OpenGL. is set if the target uses OpenGL.
@ -394,7 +394,7 @@ work of creating these additional configuration modules.
is set if the target uses Python.h. is set if the target uses Python.h.
:param threaded: :param threaded:
is set if the target requires thread support. It is set is set if the target requires thread support. It is set
automatically if the target uses Qt and Qt has thread support automatically if the target uses TQt and TQt has thread support
enabled. enabled.
:param warnings: :param warnings:
is set if compiler warning messages should be enabled. The default is set if compiler warning messages should be enabled. The default
@ -572,7 +572,7 @@ work of creating these additional configuration modules.
:ref:`ref-builtin`). :ref:`ref-builtin`).
:param console: :param console:
see :meth:`sipconfig.Makefile.__init__`. see :meth:`sipconfig.Makefile.__init__`.
:param qt: :param tqt:
see :meth:`sipconfig.Makefile.__init__`. see :meth:`sipconfig.Makefile.__init__`.
:param opengl: :param opengl:
see :meth:`sipconfig.Makefile.__init__`. see :meth:`sipconfig.Makefile.__init__`.
@ -686,7 +686,7 @@ work of creating these additional configuration modules.
This class encapsulates a Makefile to build an executable program. This class encapsulates a Makefile to build an executable program.
.. method:: __init__(configuration[, build_file=None[, install_dir=None[, console=0[, qt=0[, opengl=0[, python=0[, threaded=0[, warnings=None[, debug=0[, dir=None[, makefile="Makefile"[, installs=None[, universal=None[, arch=None]]]]]]]]]]]]]]) .. method:: __init__(configuration[, build_file=None[, install_dir=None[, console=0[, tqt=0[, opengl=0[, python=0[, threaded=0[, warnings=None[, debug=0[, dir=None[, makefile="Makefile"[, installs=None[, universal=None[, arch=None]]]]]]]]]]]]]])
:param configuration: :param configuration:
see :meth:`sipconfig.Makefile.__init__`. see :meth:`sipconfig.Makefile.__init__`.
@ -698,7 +698,7 @@ work of creating these additional configuration modules.
optionally installed. optionally installed.
:param console: :param console:
see :meth:`sipconfig.Makefile.__init__`. see :meth:`sipconfig.Makefile.__init__`.
:param qt: :param tqt:
see :meth:`sipconfig.Makefile.__init__`. see :meth:`sipconfig.Makefile.__init__`.
:param opengl: :param opengl:
see :meth:`sipconfig.Makefile.__init__`. see :meth:`sipconfig.Makefile.__init__`.
@ -810,7 +810,7 @@ work of creating these additional configuration modules.
see :meth:`sipconfig.ModuleMakefile.__init__`. see :meth:`sipconfig.ModuleMakefile.__init__`.
:param console: :param console:
see :meth:`sipconfig.Makefile.__init__`. see :meth:`sipconfig.Makefile.__init__`.
:param qt: :param tqt:
see :meth:`sipconfig.Makefile.__init__`. see :meth:`sipconfig.Makefile.__init__`.
:param opengl: :param opengl:
see :meth:`sipconfig.Makefile.__init__`. see :meth:`sipconfig.Makefile.__init__`.

@ -1696,7 +1696,7 @@ name prefixed by ``sip``. For example, the derived class for class ``Klass``
is ``sipKlass``. is ``sipKlass``.
If a C++ class doesn't have any virtual or protected methods in it or any of If a C++ class doesn't have any virtual or protected methods in it or any of
it's super-class hierarchy, or does not emit any Qt Q_SIGNALS, then a derived it's super-class hierarchy, or does not emit any TQt Q_SIGNALS, then a derived
class is not generated. class is not generated.
Most of the time handwritten code should ignore the derived classes. The only Most of the time handwritten code should ignore the derived classes. The only

@ -24,8 +24,8 @@ The full set of command line options is:
.. cmdoption:: -a <FILE> .. cmdoption:: -a <FILE>
The name of the QScintilla API file to generate. This file contains a The name of the TQScintilla API file to generate. This file contains a
description of the module API in a form that the QScintilla editor description of the module API in a form that the TQScintilla editor
component can use for auto-completion and call tips. (The file may also be component can use for auto-completion and call tips. (The file may also be
used by the SciTE editor but must be sorted first.) By default the file is used by the SciTE editor but must be sorted first.) By default the file is
not generated. not generated.

@ -70,10 +70,10 @@ In addition the :option:`-a` command line option to :file:`configure.py` has
been removed. been removed.
Removal of PyQt-specific Features Removal of PyTQt-specific Features
********************************* *********************************
The following PyQt-specific support functions have been removed. The following PyTQt-specific support functions have been removed.
- :cfunc:`sipConnectRx()` - :cfunc:`sipConnectRx()`

@ -4,8 +4,8 @@ Introduction
This is the reference guide for SIP 4.10.5. SIP is a tool for This is the reference guide for SIP 4.10.5. SIP is a tool for
automatically generating `Python <http://www.python.org>`__ bindings for C and automatically generating `Python <http://www.python.org>`__ bindings for C and
C++ libraries. SIP was originally developed in 1998 for C++ libraries. SIP was originally developed in 1998 for
`PyQt <http://www.riverbankcomputing.com/software/pyqt>`__ - the Python `PyTQt <http://www.riverbankcomputing.com/software/pytqt>`__ - the Python
bindings for the Qt GUI toolkit - but is suitable for generating bindings for bindings for the TQt GUI toolkit - but is suitable for generating bindings for
any C or C++ library. any C or C++ library.
This version of SIP generates bindings for Python v2.3 or later, including This version of SIP generates bindings for Python v2.3 or later, including
@ -156,14 +156,14 @@ SIP comprises a number of different components.
:ref:`ref-distutils`. :ref:`ref-distutils`.
Qt Support TQt Support
---------- ----------
SIP has specific support for the creation of bindings based on Nokia's Qt SIP has specific support for the creation of bindings based on Nokia's Qt
toolkit. toolkit.
The SIP code generator understands the signal/slot type safe callback mechanism The SIP code generator understands the signal/slot type safe callback mechanism
that Qt uses to connect objects together. This allows applications to define that TQt uses to connect objects together. This allows applications to define
new Python Q_SIGNALS, and allows any Python callable object to be used as a slot. new Python Q_SIGNALS, and allows any Python callable object to be used as a slot.
SIP itself does not require Qt to be installed. SIP itself does not require TQt to be installed.

@ -268,7 +268,7 @@ file.
*argument* ::= [ *argument* ::= [
*type* [*name*] [*argument-annotations*] [*default-value*] | *type* [*name*] [*argument-annotations*] [*default-value*] |
:stype:`SIP_ANYSLOT` [*default-value*] | :stype:`SIP_ANYSLOT` [*default-value*] |
:stype:`SIP_QOBJECT` | :stype:`SIP_TQOBJECT` |
:stype:`SIP_RXOBJ_CON` | :stype:`SIP_RXOBJ_CON` |
:stype:`SIP_RXOBJ_DIS` | :stype:`SIP_RXOBJ_DIS` |
:stype:`SIP_SIGNAL` [*default-value*] | :stype:`SIP_SIGNAL` [*default-value*] |
@ -422,24 +422,24 @@ This is a ``PyObject *`` that is a Python tuple object.
This is a ``PyObject *`` that is a Python type object. This is a ``PyObject *`` that is a Python type object.
.. sip-type:: SIP_QOBJECT .. sip-type:: SIP_TQOBJECT
This is a ``QObject *`` that is a C++ instance of a class derived from Qt's This is a ``TQObject *`` that is a C++ instance of a class derived from TQt's
``QObject`` class. ``TQObject`` class.
.. sip-type:: SIP_RXOBJ_CON .. sip-type:: SIP_RXOBJ_CON
This is a ``QObject *`` that is a C++ instance of a class derived from Qt's This is a ``TQObject *`` that is a C++ instance of a class derived from TQt's
``QObject`` class. It is used as the type of the receiver instead of ``const ``TQObject`` class. It is used as the type of the receiver instead of ``const
QObject *`` in functions that implement a connection to a slot. TQObject *`` in functions that implement a connection to a slot.
.. sip-type:: SIP_RXOBJ_DIS .. sip-type:: SIP_RXOBJ_DIS
This is a ``QObject *`` that is a C++ instance of a class derived from Qt's This is a ``TQObject *`` that is a C++ instance of a class derived from TQt's
``QObject`` class. It is used as the type of the receiver instead of ``const ``TQObject`` class. It is used as the type of the receiver instead of ``const
QObject *`` in functions that implement a disconnection from a slot. TQObject *`` in functions that implement a disconnection from a slot.
.. sip-type:: SIP_SIGNAL .. sip-type:: SIP_SIGNAL
@ -468,7 +468,7 @@ signal to a slot. The signal is emitted when the keyboard accelerator is
activated and it has a single integer argument that is the ID of the activated and it has a single integer argument that is the ID of the
accelerator. The C++ signature is:: accelerator. The C++ signature is::
bool connectItem(int id, const QObject *receiver, const char *member); bool connectItem(int id, const TQObject *receiver, const char *member);
The corresponding SIP specification is:: The corresponding SIP specification is::

@ -193,7 +193,7 @@ A More Complex C++ Example
-------------------------- --------------------------
In this last example we will wrap a fictional C++ library that contains a class In this last example we will wrap a fictional C++ library that contains a class
that is derived from a Qt class. This will demonstrate how SIP allows a class that is derived from a TQt class. This will demonstrate how SIP allows a class
hierarchy to be split across multiple Python extension modules, and will hierarchy to be split across multiple Python extension modules, and will
introduce SIP's versioning system. introduce SIP's versioning system.

@ -65,14 +65,14 @@ on top of existing bindings. For example, both
<a class="reference external" href="http://www.riverbankcomputing.com/software/pytde/">PyKDE</a> and <a class="reference external" href="http://www.riverbankcomputing.com/software/pytde/">PyKDE</a> and
<a class="reference external" href="http://pyqwt.sourceforge.net/">PyQwt</a> are built on top of PyTQt but all three <a class="reference external" href="http://pyqwt.sourceforge.net/">PyQwt</a> are built on top of PyTQt but all three
packages are maintained by different developers. To make this easier PyTQt packages are maintained by different developers. To make this easier PyTQt
includes its own configuration module, <tt class="docutils literal"><span class="pre">pyqtconfig</span></tt>, that contains additional includes its own configuration module, <tt class="docutils literal"><span class="pre">pytqtconfig</span></tt>, that contains additional
classes intended to be used by the configuration scripts of bindings built on classes intended to be used by the configuration scripts of bindings built on
top of PyTQt. The SIP build system includes facilities that do a lot of the top of PyTQt. The SIP build system includes facilities that do a lot of the
work of creating these additional configuration modules.</p> work of creating these additional configuration modules.</p>
<dl class="function"> <dl class="function">
<dt id="sipconfig.create_config_module"> <dt id="sipconfig.create_config_module">
<tt class="descclassname">sipconfig.</tt><tt class="descname">create_config_module</tt><big>(</big><em>module</em>, <em>template</em>, <em>content</em><span class="optional">[</span>, <em>macros=None</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#sipconfig.create_config_module" title="Permalink to this definition"></a></dt> <tt class="descclassname">sipconfig.</tt><tt class="descname">create_config_module</tt><big>(</big><em>module</em>, <em>template</em>, <em>content</em><span class="optional">[</span>, <em>macros=None</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#sipconfig.create_config_module" title="Permalink to this definition"></a></dt>
<dd><p>This creates a configuration module (e.g. <tt class="docutils literal"><span class="pre">pyqtconfig</span></tt>) from a template <dd><p>This creates a configuration module (e.g. <tt class="docutils literal"><span class="pre">pytqtconfig</span></tt>) from a template
file and a string.</p> file and a string.</p>
<table class="docutils field-list" frame="void" rules="none"> <table class="docutils field-list" frame="void" rules="none">
<col class="field-name" /> <col class="field-name" />

@ -685,7 +685,7 @@ modules, that doesn&#8217;t have an explicit meta-type.</p>
meta-type used by a particular C/C++ type.</p> meta-type used by a particular C/C++ type.</p>
<p>See the section <a class="reference external" href="using.html#ref-types-metatypes"><em>Types and Meta-types</em></a> for more details.</p> <p>See the section <a class="reference external" href="using.html#ref-types-metatypes"><em>Types and Meta-types</em></a> for more details.</p>
<p>For example:</p> <p>For example:</p>
<div class="highlight-python"><pre>%DefaultMetatype PyTQt4.TQtCore.pyqtWrapperType</pre> <div class="highlight-python"><pre>%DefaultMetatype PyTQt4.TQtCore.pytqtWrapperType</pre>
</div> </div>
<dl class="directive"> <dl class="directive">
<dt id="directive-%DefaultSupertype"> <dt id="directive-%DefaultSupertype">
@ -1144,7 +1144,7 @@ containing the <a class="reference internal" href="#directive-%Import"><tt class
fails then SIP prepends <em>filename</em> with each of the directories, in turn, fails then SIP prepends <em>filename</em> with each of the directories, in turn,
specified by the <tt class="docutils literal"><span class="pre">-I</span></tt> command line option.</p> specified by the <tt class="docutils literal"><span class="pre">-I</span></tt> command line option.</p>
<p>For example:</p> <p>For example:</p>
<div class="highlight-python"><pre>%Import qt/qtmod.sip</pre> <div class="highlight-python"><pre>%Import tqt/tqtmod.sip</pre>
</div> </div>
<dl class="directive"> <dl class="directive">
<dt id="directive-%Include"> <dt id="directive-%Include">
@ -1548,7 +1548,7 @@ module.</p>
changes don&#8217;t affect the exported API, but it is good practice to change the changes don&#8217;t affect the exported API, but it is good practice to change the
version number anyway.</p> version number anyway.</p>
<p>For example:</p> <p>For example:</p>
<div class="highlight-python"><pre>%Module qt 5</pre> <div class="highlight-python"><pre>%Module tqt 5</pre>
</div> </div>
<dl class="directive"> <dl class="directive">
<dt id="directive-%ModuleCode"> <dt id="directive-%ModuleCode">

@ -101,8 +101,8 @@ from <a title="sipBuildResult" class="reference external" href="c_api.html#sipBu
<p>In addition the <a class="reference external" href="command_line.html#cmdoption-sip-a"><em class="xref">-a</em></a> command line option to <tt class="docutils literal"><span class="pre">configure.py</span></tt> has <p>In addition the <a class="reference external" href="command_line.html#cmdoption-sip-a"><em class="xref">-a</em></a> command line option to <tt class="docutils literal"><span class="pre">configure.py</span></tt> has
been removed.</p> been removed.</p>
</div> </div>
<div class="section" id="removal-of-pyqt-specific-features"> <div class="section" id="removal-of-pytqt-specific-features">
<h3>Removal of PyTQt-specific Features<a class="headerlink" href="#removal-of-pyqt-specific-features" title="Permalink to this headline"></a></h3> <h3>Removal of PyTQt-specific Features<a class="headerlink" href="#removal-of-pytqt-specific-features" title="Permalink to this headline"></a></h3>
<p>The following PyTQt-specific support functions have been removed.</p> <p>The following PyTQt-specific support functions have been removed.</p>
<ul class="simple"> <ul class="simple">
<li><tt class="xref docutils literal"><span class="pre">sipConnectRx()</span></tt></li> <li><tt class="xref docutils literal"><span class="pre">sipConnectRx()</span></tt></li>
@ -210,7 +210,7 @@ still supported).</p>
<li><a class="reference external" href="#truediv">__truediv__</a></li> <li><a class="reference external" href="#truediv">__truediv__</a></li>
<li><a class="reference external" href="#sipwrapper-user-member">sipWrapper user Member</a></li> <li><a class="reference external" href="#sipwrapper-user-member">sipWrapper user Member</a></li>
<li><a class="reference external" href="#removal-of-previously-deprecated-features">Removal of Previously Deprecated Features</a></li> <li><a class="reference external" href="#removal-of-previously-deprecated-features">Removal of Previously Deprecated Features</a></li>
<li><a class="reference external" href="#removal-of-pyqt-specific-features">Removal of PyTQt-specific Features</a></li> <li><a class="reference external" href="#removal-of-pytqt-specific-features">Removal of PyTQt-specific Features</a></li>
<li><a class="reference external" href="#id1">Newly Deprecated Features</a></li> <li><a class="reference external" href="#id1">Newly Deprecated Features</a></li>
</ul> </ul>
</li> </li>

@ -53,7 +53,7 @@
<p>This is the reference guide for SIP 4.10.5. SIP is a tool for <p>This is the reference guide for SIP 4.10.5. SIP is a tool for
automatically generating <a class="reference external" href="http://www.python.org">Python</a> bindings for C and automatically generating <a class="reference external" href="http://www.python.org">Python</a> bindings for C and
C++ libraries. SIP was originally developed in 1998 for C++ libraries. SIP was originally developed in 1998 for
<a class="reference external" href="http://www.riverbankcomputing.com/software/pyqt">PyTQt</a> - the Python <a class="reference external" href="http://www.riverbankcomputing.com/software/pytqt">PyTQt</a> - the Python
bindings for the TQt GUI toolkit - but is suitable for generating bindings for bindings for the TQt GUI toolkit - but is suitable for generating bindings for
any C or C++ library.</p> any C or C++ library.</p>
<p>This version of SIP generates bindings for Python v2.3 or later, including <p>This version of SIP generates bindings for Python v2.3 or later, including
@ -162,7 +162,7 @@ needed to build the extension module. It is covered in detail in
<a class="reference external" href="distutils.html#ref-distutils"><em>Building Your Extension with distutils</em></a>.</li> <a class="reference external" href="distutils.html#ref-distutils"><em>Building Your Extension with distutils</em></a>.</li>
</ul> </ul>
</div> </div>
<div class="section" id="qt-support"> <div class="section" id="tqt-support">
<h2>TQt Support<a class="headerlink" href="#qt-support" title="Permalink to this headline"></a></h2> <h2>TQt Support<a class="headerlink" href="#qt-support" title="Permalink to this headline"></a></h2>
<p>SIP has specific support for the creation of bindings based on Nokia&#8217;s TQt <p>SIP has specific support for the creation of bindings based on Nokia&#8217;s TQt
toolkit.</p> toolkit.</p>

@ -343,7 +343,7 @@ copy constructor when it can never be called from Python? The answer is to
prevent the automatic generation of a public copy constructor.</p> prevent the automatic generation of a public copy constructor.</p>
<p>We now look at the <tt class="docutils literal"><span class="pre">configure.py</span></tt> script. This is a little different to the <p>We now look at the <tt class="docutils literal"><span class="pre">configure.py</span></tt> script. This is a little different to the
script in the previous examples for two related reasons.</p> script in the previous examples for two related reasons.</p>
<p>Firstly, PyTQt includes a pure Python module called <tt class="docutils literal"><span class="pre">pyqtconfig</span></tt> that extends <p>Firstly, PyTQt includes a pure Python module called <tt class="docutils literal"><span class="pre">pytqtconfig</span></tt> that extends
the SIP build system for modules, like our example, that build on top of PyTQt. the SIP build system for modules, like our example, that build on top of PyTQt.
It deals with the details of which version of TQt is being used (i.e. it It deals with the details of which version of TQt is being used (i.e. it
determines what the correct tags are) and where it is installed. This is determines what the correct tags are) and where it is installed. This is
@ -355,23 +355,23 @@ life easier for them.</p>
<p>Now we have two scripts. First the <tt class="docutils literal"><span class="pre">configure.py</span></tt> script:</p> <p>Now we have two scripts. First the <tt class="docutils literal"><span class="pre">configure.py</span></tt> script:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">os</span> <div class="highlight-python"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">sipconfig</span> <span class="kn">import</span> <span class="nn">sipconfig</span>
<span class="kn">from</span> <span class="nn">PyTQt4</span> <span class="kn">import</span> <span class="n">pyqtconfig</span> <span class="kn">from</span> <span class="nn">PyTQt4</span> <span class="kn">import</span> <span class="n">pytqtconfig</span>
<span class="c"># The name of the SIP build file generated by SIP and used by the build</span> <span class="c"># The name of the SIP build file generated by SIP and used by the build</span>
<span class="c"># system.</span> <span class="c"># system.</span>
<span class="n">build_file</span> <span class="o">=</span> <span class="s">&quot;hello.sbf&quot;</span> <span class="n">build_file</span> <span class="o">=</span> <span class="s">&quot;hello.sbf&quot;</span>
<span class="c"># Get the PyTQt configuration information.</span> <span class="c"># Get the PyTQt configuration information.</span>
<span class="n">config</span> <span class="o">=</span> <span class="n">pyqtconfig</span><span class="o">.</span><span class="n">Configuration</span><span class="p">()</span> <span class="n">config</span> <span class="o">=</span> <span class="n">pytqtconfig</span><span class="o">.</span><span class="n">Configuration</span><span class="p">()</span>
<span class="c"># Get the extra SIP flags needed by the imported PyTQt modules. Note that</span> <span class="c"># Get the extra SIP flags needed by the imported PyTQt modules. Note that</span>
<span class="c"># this normally only includes those flags (-x and -t) that relate to SIP&#39;s</span> <span class="c"># this normally only includes those flags (-x and -t) that relate to SIP&#39;s</span>
<span class="c"># versioning system.</span> <span class="c"># versioning system.</span>
<span class="n">pyqt_sip_flags</span> <span class="o">=</span> <span class="n">config</span><span class="o">.</span><span class="n">pyqt_sip_flags</span> <span class="n">pytqt_sip_flags</span> <span class="o">=</span> <span class="n">config</span><span class="o">.</span><span class="n">pytqt_sip_flags</span>
<span class="c"># Run SIP to generate the code. Note that we tell SIP where to find the qt</span> <span class="c"># Run SIP to generate the code. Note that we tell SIP where to find the tqt</span>
<span class="c"># module&#39;s specification files using the -I flag.</span> <span class="c"># module&#39;s specification files using the -I flag.</span>
<span class="n">os</span><span class="o">.</span><span class="n">system</span><span class="p">(</span><span class="s">&quot; &quot;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="n">config</span><span class="o">.</span><span class="n">sip_bin</span><span class="p">,</span> <span class="s">&quot;-c&quot;</span><span class="p">,</span> <span class="s">&quot;.&quot;</span><span class="p">,</span> <span class="s">&quot;-b&quot;</span><span class="p">,</span> <span class="n">build_file</span><span class="p">,</span> <span class="s">&quot;-I&quot;</span><span class="p">,</span> <span class="n">config</span><span class="o">.</span><span class="n">pyqt_sip_dir</span><span class="p">,</span> <span class="n">pyqt_sip_flags</span><span class="p">,</span> <span class="s">&quot;hello.sip&quot;</span><span class="p">]))</span> <span class="n">os</span><span class="o">.</span><span class="n">system</span><span class="p">(</span><span class="s">&quot; &quot;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="n">config</span><span class="o">.</span><span class="n">sip_bin</span><span class="p">,</span> <span class="s">&quot;-c&quot;</span><span class="p">,</span> <span class="s">&quot;.&quot;</span><span class="p">,</span> <span class="s">&quot;-b&quot;</span><span class="p">,</span> <span class="n">build_file</span><span class="p">,</span> <span class="s">&quot;-I&quot;</span><span class="p">,</span> <span class="n">config</span><span class="o">.</span><span class="n">pytqt_sip_dir</span><span class="p">,</span> <span class="n">pytqt_sip_flags</span><span class="p">,</span> <span class="s">&quot;hello.sip&quot;</span><span class="p">]))</span>
<span class="c"># We are going to install the SIP specification file for this module and</span> <span class="c"># We are going to install the SIP specification file for this module and</span>
<span class="c"># its configuration module.</span> <span class="c"># its configuration module.</span>
@ -382,9 +382,9 @@ life easier for them.</p>
<span class="n">installs</span><span class="o">.</span><span class="n">append</span><span class="p">([</span><span class="s">&quot;helloconfig.py&quot;</span><span class="p">,</span> <span class="n">config</span><span class="o">.</span><span class="n">default_mod_dir</span><span class="p">])</span> <span class="n">installs</span><span class="o">.</span><span class="n">append</span><span class="p">([</span><span class="s">&quot;helloconfig.py&quot;</span><span class="p">,</span> <span class="n">config</span><span class="o">.</span><span class="n">default_mod_dir</span><span class="p">])</span>
<span class="c"># Create the Makefile. The TQtGuiModuleMakefile class provided by the</span> <span class="c"># Create the Makefile. The TQtGuiModuleMakefile class provided by the</span>
<span class="c"># pyqtconfig module takes care of all the extra preprocessor, compiler and</span> <span class="c"># pytqtconfig module takes care of all the extra preprocessor, compiler and</span>
<span class="c"># linker flags needed by the TQt library.</span> <span class="c"># linker flags needed by the TQt library.</span>
<span class="n">makefile</span> <span class="o">=</span> <span class="n">pyqtconfig</span><span class="o">.</span><span class="n">TQtGuiModuleMakefile</span><span class="p">(</span> <span class="n">makefile</span> <span class="o">=</span> <span class="n">pytqtconfig</span><span class="o">.</span><span class="n">TQtGuiModuleMakefile</span><span class="p">(</span>
<span class="n">configuration</span><span class="o">=</span><span class="n">config</span><span class="p">,</span> <span class="n">configuration</span><span class="o">=</span><span class="n">config</span><span class="p">,</span>
<span class="n">build_file</span><span class="o">=</span><span class="n">build_file</span><span class="p">,</span> <span class="n">build_file</span><span class="o">=</span><span class="n">build_file</span><span class="p">,</span>
<span class="n">installs</span><span class="o">=</span><span class="n">installs</span> <span class="n">installs</span><span class="o">=</span><span class="n">installs</span>
@ -407,10 +407,10 @@ life easier for them.</p>
<span class="s">&quot;hello_sip_dir&quot;</span><span class="p">:</span> <span class="n">config</span><span class="o">.</span><span class="n">default_sip_dir</span><span class="p">,</span> <span class="s">&quot;hello_sip_dir&quot;</span><span class="p">:</span> <span class="n">config</span><span class="o">.</span><span class="n">default_sip_dir</span><span class="p">,</span>
<span class="c"># Publish the set of SIP flags needed by this module. As these are the</span> <span class="c"># Publish the set of SIP flags needed by this module. As these are the</span>
<span class="c"># same flags needed by the qt module we could leave it out, but this</span> <span class="c"># same flags needed by the tqt module we could leave it out, but this</span>
<span class="c"># allows us to change the flags at a later date without breaking</span> <span class="c"># allows us to change the flags at a later date without breaking</span>
<span class="c"># scripts that import the configuration module.</span> <span class="c"># scripts that import the configuration module.</span>
<span class="s">&quot;hello_sip_flags&quot;</span><span class="p">:</span> <span class="n">pyqt_sip_flags</span> <span class="s">&quot;hello_sip_flags&quot;</span><span class="p">:</span> <span class="n">pytqt_sip_flags</span>
<span class="p">}</span> <span class="p">}</span>
<span class="c"># This creates the helloconfig.py module from the helloconfig.py.in</span> <span class="c"># This creates the helloconfig.py module from the helloconfig.py.in</span>
@ -419,14 +419,14 @@ life easier for them.</p>
</pre></div> </pre></div>
</div> </div>
<p>Next we have the <tt class="docutils literal"><span class="pre">helloconfig.py.in</span></tt> template script:</p> <p>Next we have the <tt class="docutils literal"><span class="pre">helloconfig.py.in</span></tt> template script:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">PyTQt4</span> <span class="kn">import</span> <span class="n">pyqtconfig</span> <div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">PyTQt4</span> <span class="kn">import</span> <span class="n">pytqtconfig</span>
<span class="c"># These are installation specific values created when Hello was configured.</span> <span class="c"># These are installation specific values created when Hello was configured.</span>
<span class="c"># The following line will be replaced when this template is used to create</span> <span class="c"># The following line will be replaced when this template is used to create</span>
<span class="c"># the final configuration module.</span> <span class="c"># the final configuration module.</span>
<span class="c"># @SIP_CONFIGURATION@</span> <span class="c"># @SIP_CONFIGURATION@</span>
<span class="k">class</span> <span class="nc">Configuration</span><span class="p">(</span><span class="n">pyqtconfig</span><span class="o">.</span><span class="n">Configuration</span><span class="p">):</span> <span class="k">class</span> <span class="nc">Configuration</span><span class="p">(</span><span class="n">pytqtconfig</span><span class="o">.</span><span class="n">Configuration</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;The class that represents Hello configuration values.</span> <span class="sd">&quot;&quot;&quot;The class that represents Hello configuration values.</span>
<span class="sd"> &quot;&quot;&quot;</span> <span class="sd"> &quot;&quot;&quot;</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">sub_cfg</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span> <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">sub_cfg</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
@ -444,9 +444,9 @@ life easier for them.</p>
<span class="n">cfg</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">_pkg_config</span><span class="p">)</span> <span class="n">cfg</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">_pkg_config</span><span class="p">)</span>
<span class="n">pyqtconfig</span><span class="o">.</span><span class="n">Configuration</span><span class="o">.</span><span class="n">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">cfg</span><span class="p">)</span> <span class="n">pytqtconfig</span><span class="o">.</span><span class="n">Configuration</span><span class="o">.</span><span class="n">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">cfg</span><span class="p">)</span>
<span class="k">class</span> <span class="nc">HelloModuleMakefile</span><span class="p">(</span><span class="n">pyqtconfig</span><span class="o">.</span><span class="n">TQtGuiModuleMakefile</span><span class="p">):</span> <span class="k">class</span> <span class="nc">HelloModuleMakefile</span><span class="p">(</span><span class="n">pytqtconfig</span><span class="o">.</span><span class="n">TQtGuiModuleMakefile</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;The Makefile class for modules that %Import hello.</span> <span class="sd">&quot;&quot;&quot;The Makefile class for modules that %Import hello.</span>
<span class="sd"> &quot;&quot;&quot;</span> <span class="sd"> &quot;&quot;&quot;</span>
<span class="k">def</span> <span class="nf">finalise</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> <span class="k">def</span> <span class="nf">finalise</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
@ -456,7 +456,7 @@ life easier for them.</p>
<span class="bp">self</span><span class="o">.</span><span class="n">extra_libs</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s">&quot;hello&quot;</span><span class="p">)</span> <span class="bp">self</span><span class="o">.</span><span class="n">extra_libs</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s">&quot;hello&quot;</span><span class="p">)</span>
<span class="c"># Let the super-class do what it needs to.</span> <span class="c"># Let the super-class do what it needs to.</span>
<span class="n">pyqtconfig</span><span class="o">.</span><span class="n">TQtGuiModuleMakefile</span><span class="o">.</span><span class="n">finalise</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="n">pytqtconfig</span><span class="o">.</span><span class="n">TQtGuiModuleMakefile</span><span class="o">.</span><span class="n">finalise</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>
</pre></div> </pre></div>
</div> </div>
<p>Again, we hope that the scripts are self documenting.</p> <p>Again, we hope that the scripts are self documenting.</p>

@ -753,7 +753,7 @@ static void xmlType(sipSpec *pt, argDef *ad, int sec, FILE *fp)
type_type = "class"; type_type = "class";
break; break;
case qobject_type: case tqobject_type:
type_type = "class"; type_type = "class";
break; break;
@ -972,7 +972,7 @@ static const char *pyType(sipSpec *pt, argDef *ad, int sec, classDef **scope)
break; break;
case qobject_type: case tqobject_type:
type_name = TQOBJECT_OBJECT_NAME_STRING; type_name = TQOBJECT_OBJECT_NAME_STRING;
break; break;

@ -802,14 +802,14 @@ static void generateInternalAPIHeader(sipSpec *pt, moduleDef *mod,
if (pluginPyQt4(pt)) if (pluginPyQt4(pt))
prcode(fp, prcode(fp,
"\n" "\n"
"typedef const TQMetaObject *(*sip_qt_metaobject_func)(sipSimpleWrapper *,sipTypeDef *);\n" "typedef const TQMetaObject *(*sip_tqt_metaobject_func)(sipSimpleWrapper *,sipTypeDef *);\n"
"extern sip_qt_metaobject_func sip_%s_qt_metaobject;\n" "extern sip_tqt_metaobject_func sip_%s_tqt_metaobject;\n"
"\n" "\n"
"typedef int (*sip_qt_metacall_func)(sipSimpleWrapper *,sipTypeDef *,TQMetaObject::Call,int,void **);\n" "typedef int (*sip_tqt_metacall_func)(sipSimpleWrapper *,sipTypeDef *,TQMetaObject::Call,int,void **);\n"
"extern sip_qt_metacall_func sip_%s_qt_metacall;\n" "extern sip_tqt_metacall_func sip_%s_tqt_metacall;\n"
"\n" "\n"
"typedef int (*sip_qt_metacast_func)(sipSimpleWrapper *,sipTypeDef *,const char *);\n" "typedef int (*sip_tqt_metacast_func)(sipSimpleWrapper *,sipTypeDef *,const char *);\n"
"extern sip_qt_metacast_func sip_%s_qt_metacast;\n" "extern sip_tqt_metacast_func sip_%s_tqt_metacast;\n"
, mname , mname
, mname , mname
, mname); , mname);
@ -1164,7 +1164,7 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir,
* optional parts. These should be undefined in %ModuleCode if a C++ * optional parts. These should be undefined in %ModuleCode if a C++
* implementation is provided. * implementation is provided.
*/ */
if (mod->qobjclass >= 0) if (mod->tqobjclass >= 0)
prcode(fp, prcode(fp,
"\n" "\n"
"#define sipTQtCreateUniversalSignal 0\n" "#define sipTQtCreateUniversalSignal 0\n"
@ -1702,13 +1702,13 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir,
); );
/* Generate any TQt support API. */ /* Generate any TQt support API. */
if (mod->qobjclass >= 0) if (mod->tqobjclass >= 0)
prcode(fp, prcode(fp,
"\n" "\n"
"\n" "\n"
"/* This defines the TQt support API. */\n" "/* This defines the TQt support API. */\n"
"\n" "\n"
"static sipTQtAPI qtAPI = {\n" "static sipTQtAPI tqtAPI = {\n"
" &typesTable[%d],\n" " &typesTable[%d],\n"
" sipTQtCreateUniversalSignal,\n" " sipTQtCreateUniversalSignal,\n"
" sipTQtFindUniversalSignal,\n" " sipTQtFindUniversalSignal,\n"
@ -1723,7 +1723,7 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir,
" sipTQtConnectPySignal,\n" " sipTQtConnectPySignal,\n"
" sipTQtDisconnectPySignal\n" " sipTQtDisconnectPySignal\n"
"};\n" "};\n"
, mod->qobjclass); , mod->tqobjclass);
prcode(fp, prcode(fp,
"\n" "\n"
@ -1762,7 +1762,7 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir,
, mod->version , mod->version
, pt->module->name , pt->module->name
, mod->allimports != NULL ? "importsTable" : "NULL" , mod->allimports != NULL ? "importsTable" : "NULL"
, mod->qobjclass >= 0 ? "&qtAPI" : "NULL" , mod->tqobjclass >= 0 ? "&tqtAPI" : "NULL"
, mod->nrtypes , mod->nrtypes
, mod->nrtypes > 0 ? "typesTable" : "NULL" , mod->nrtypes > 0 ? "typesTable" : "NULL"
, hasexternal ? "externalTypesTable" : "NULL" , hasexternal ? "externalTypesTable" : "NULL"
@ -1806,9 +1806,9 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir,
if (pluginPyQt4(pt)) if (pluginPyQt4(pt))
prcode(fp, prcode(fp,
"\n" "\n"
"sip_qt_metaobject_func sip_%s_qt_metaobject;\n" "sip_tqt_metaobject_func sip_%s_tqt_metaobject;\n"
"sip_qt_metacall_func sip_%s_qt_metacall;\n" "sip_tqt_metacall_func sip_%s_tqt_metacall;\n"
"sip_qt_metacast_func sip_%s_qt_metacast;\n" "sip_tqt_metacast_func sip_%s_tqt_metacast;\n"
, mname , mname
, mname , mname
, mname); , mname);
@ -1907,9 +1907,9 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir,
/* Import the helpers. */ /* Import the helpers. */
prcode(fp, prcode(fp,
"\n" "\n"
" sip_%s_qt_metaobject = (sip_qt_metaobject_func)sipImportSymbol(\"qtcore_qt_metaobject\");\n" " sip_%s_tqt_metaobject = (sip_tqt_metaobject_func)sipImportSymbol(\"tqtcore_tqt_metaobject\");\n"
" sip_%s_qt_metacall = (sip_qt_metacall_func)sipImportSymbol(\"qtcore_qt_metacall\");\n" " sip_%s_tqt_metacall = (sip_tqt_metacall_func)sipImportSymbol(\"tqtcore_tqt_metacall\");\n"
" sip_%s_qt_metacast = (sip_qt_metacast_func)sipImportSymbol(\"qtcore_qt_metacast\");\n" " sip_%s_tqt_metacast = (sip_tqt_metacast_func)sipImportSymbol(\"tqtcore_tqt_metacast\");\n"
"\n" "\n"
, mname , mname
, mname , mname
@ -2037,7 +2037,7 @@ static void generateTypesTable(sipSpec *pt, moduleDef *mod, FILE *fp)
argDef *ad; argDef *ad;
const char *type_suffix; const char *type_suffix;
type_suffix = (pluginPyQt4(pt) || pluginPyTQt3(pt)) ? ".super" : ""; type_suffix = (pluginPyQt4(pt) || pluginPyTQt(pt)) ? ".super" : "";
prcode(fp, prcode(fp,
"\n" "\n"
@ -3623,7 +3623,7 @@ static void generateTypeDefLink(sipSpec *pt, ifaceFileDef *iff, FILE *fp)
if (iff->next_alt->type == mappedtype_iface) if (iff->next_alt->type == mappedtype_iface)
prcode(fp, ".mtd_base"); prcode(fp, ".mtd_base");
else if (pluginPyTQt3(pt) || pluginPyQt4(pt)) else if (pluginPyTQt(pt) || pluginPyQt4(pt))
prcode(fp, ".super.ctd_base"); prcode(fp, ".super.ctd_base");
else else
prcode(fp, ".ctd_base"); prcode(fp, ".ctd_base");
@ -5703,7 +5703,7 @@ static void generateShadowCode(sipSpec *pt, moduleDef *mod, classDef *cd,
"\n" "\n"
"const TQMetaObject *sip%C::metaObject() const\n" "const TQMetaObject *sip%C::metaObject() const\n"
"{\n" "{\n"
" return sip_%s_qt_metaobject(sipPySelf,sipType_%C);\n" " return sip_%s_tqt_metaobject(sipPySelf,sipType_%C);\n"
"}\n" "}\n"
, classFTQCName(cd) , classFTQCName(cd)
, mod->name, classFTQCName(cd)); , mod->name, classFTQCName(cd));
@ -5715,14 +5715,14 @@ static void generateShadowCode(sipSpec *pt, moduleDef *mod, classDef *cd,
" _id = %S::qt_metacall(_c,_id,_a);\n" " _id = %S::qt_metacall(_c,_id,_a);\n"
"\n" "\n"
" if (_id >= 0)\n" " if (_id >= 0)\n"
" _id = sip_%s_qt_metacall(sipPySelf,sipType_%C,_c,_id,_a);\n" " _id = sip_%s_tqt_metacall(sipPySelf,sipType_%C,_c,_id,_a);\n"
"\n" "\n"
" return _id;\n" " return _id;\n"
"}\n" "}\n"
"\n" "\n"
"void *sip%C::qt_metacast(const char *_clname)\n" "void *sip%C::qt_metacast(const char *_clname)\n"
"{\n" "{\n"
" return (sip_%s_qt_metacast && sip_%s_qt_metacast(sipPySelf,sipType_%C,_clname)) ? this : %S::qt_metacast(_clname);\n" " return (sip_%s_tqt_metacast && sip_%s_tqt_metacast(sipPySelf,sipType_%C,_clname)) ? this : %S::qt_metacast(_clname);\n"
"}\n" "}\n"
, classFTQCName(cd) , classFTQCName(cd)
, classFTQCName(cd) , classFTQCName(cd)
@ -5762,7 +5762,7 @@ static void generateShadowCode(sipSpec *pt, moduleDef *mod, classDef *cd,
generateProtectedDefinitions(cd,fp); generateProtectedDefinitions(cd,fp);
/* Generate the emitters if needed. */ /* Generate the emitters if needed. */
if (pluginPyTQt3(pt)) if (pluginPyTQt(pt))
generateEmitters(cd, fp); generateEmitters(cd, fp);
} }
@ -5804,7 +5804,7 @@ static void generateEmitters(classDef *cd, FILE *fp)
prcode(fp, prcode(fp,
"\n" "\n"
"static pyqt3QtSignal signals_%C[] = {\n" "static pytqtTQtSignal signals_%C[] = {\n"
,classFTQCName(cd)); ,classFTQCName(cd));
noIntro = FALSE; noIntro = FALSE;
@ -7344,7 +7344,7 @@ static void generateTupleBuilder(signatureDef *sd,FILE *fp)
case fake_void_type: case fake_void_type:
case rxcon_type: case rxcon_type:
case rxdis_type: case rxdis_type:
case qobject_type: case tqobject_type:
fmt = "D"; fmt = "D";
break; break;
@ -7404,7 +7404,7 @@ static void generateTupleBuilder(signatureDef *sd,FILE *fp)
if (ad->atype == mapped_type || ad->atype == class_type || if (ad->atype == mapped_type || ad->atype == class_type ||
ad->atype == rxcon_type || ad->atype == rxdis_type || ad->atype == rxcon_type || ad->atype == rxdis_type ||
ad->atype == qobject_type || ad->atype == fake_void_type) ad->atype == tqobject_type || ad->atype == fake_void_type)
{ {
int copy = copyConstRefArg(ad); int copy = copyConstRefArg(ad);
@ -7654,8 +7654,8 @@ static void generateClassAPI(classDef *cd, sipSpec *pt, FILE *fp)
if (pluginPyQt4(pt)) if (pluginPyQt4(pt))
type_prefix = "pyqt4"; type_prefix = "pyqt4";
else if (pluginPyTQt3(pt)) else if (pluginPyTQt(pt))
type_prefix = "pyqt3"; type_prefix = "pytqt";
else else
type_prefix = "sip"; type_prefix = "sip";
@ -7813,8 +7813,8 @@ static void generateShadowClassDeclaration(sipSpec *pt,classDef *cd,FILE *fp)
{ {
prcode(fp, prcode(fp,
"\n" "\n"
" int qt_metacall(TQMetaObject::Call,int,void **);\n" " int tqt_metacall(TQMetaObject::Call,int,void **);\n"
" void *qt_metacast(const char *);\n" " void *tqt_metacast(const char *);\n"
); );
if (!noPyQt4TQMetaObject(cd)) if (!noPyQt4TQMetaObject(cd))
@ -7832,7 +7832,7 @@ static void generateShadowClassDeclaration(sipSpec *pt,classDef *cd,FILE *fp)
generateProtectedDeclarations(cd,fp); generateProtectedDeclarations(cd,fp);
/* The public wrapper around each signal emitter. */ /* The public wrapper around each signal emitter. */
if (pluginPyTQt3(pt)) if (pluginPyTQt(pt))
{ {
visibleList *vl; visibleList *vl;
@ -8319,7 +8319,7 @@ static void generateNamedBaseType(ifaceFileDef *scope, argDef *ad, char *name,
case pycallable_type: case pycallable_type:
case pyslice_type: case pyslice_type:
case pytype_type: case pytype_type:
case qobject_type: case tqobject_type:
case ellipsis_type: case ellipsis_type:
prcode(fp, "PyObject *"); prcode(fp, "PyObject *");
break; break;
@ -8756,9 +8756,9 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp)
type_prefix = "pyqt4"; type_prefix = "pyqt4";
embedded = TRUE; embedded = TRUE;
} }
else if (pluginPyTQt3(pt)) else if (pluginPyTQt(pt))
{ {
type_prefix = "pyqt3"; type_prefix = "pytqt";
embedded = TRUE; embedded = TRUE;
} }
else else
@ -9096,7 +9096,7 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp)
"},\n" "},\n"
); );
if (pluginPyTQt3(pt)) if (pluginPyTQt(pt))
{ {
if (hasSigSlots(cd)) if (hasSigSlots(cd))
prcode(fp, prcode(fp,
@ -11799,7 +11799,7 @@ static int generateArgParser(signatureDef *sd, classDef *c_scope,
fmt = (isAllowNone(ad) ? "H" : "F"); fmt = (isAllowNone(ad) ? "H" : "F");
break; break;
case qobject_type: case tqobject_type:
fmt = "R"; fmt = "R";
break; break;

@ -130,7 +130,7 @@ SIP_RXOBJ_CON {return TK_SIPRXCON;}
SIP_RXOBJ_DIS {return TK_SIPRXDIS;} SIP_RXOBJ_DIS {return TK_SIPRXDIS;}
SIP_SLOT_CON {return TK_SIPSLOTCON;} SIP_SLOT_CON {return TK_SIPSLOTCON;}
SIP_SLOT_DIS {return TK_SIPSLOTDIS;} SIP_SLOT_DIS {return TK_SIPSLOTDIS;}
SIP_QOBJECT {return TK_TQOBJECT;} SIP_TQOBJECT {return TK_TQOBJECT;}
\.\.\. {return TK_ELLIPSIS;} \.\.\. {return TK_ELLIPSIS;}

@ -1153,7 +1153,7 @@ prepycode: TK_PREPYCODE codeblock {
/* /*
* This is a no-op and is retained for compatibility * This is a no-op and is retained for compatibility
* until the last use of it (by SIP-TQt v3) can be removed * until the last use of it (by SIP-TQt v3) can be removed
* from PyQt. * from PyTQt.
*/ */
} }
; ;
@ -2356,7 +2356,7 @@ argvalue: TK_SIPSIGNAL optname optflags optassign {
currentSpec -> sigslots = TRUE; currentSpec -> sigslots = TRUE;
} }
| TK_TQOBJECT optname optflags { | TK_TQOBJECT optname optflags {
$$.atype = qobject_type; $$.atype = tqobject_type;
$$.argflags = 0; $$.argflags = 0;
$$.nrderefs = 0; $$.nrderefs = 0;
$$.name = cacheName(currentSpec, $2); $$.name = cacheName(currentSpec, $2);
@ -2875,7 +2875,7 @@ static moduleDef *allocModule()
newmod->version = -1; newmod->version = -1;
newmod->encoding = no_type; newmod->encoding = no_type;
newmod->qobjclass = -1; newmod->tqobjclass = -1;
newmod->nrvirthandlers = -1; newmod->nrvirthandlers = -1;
newmod->next_key = 1; newmod->next_key = 1;
@ -5005,7 +5005,7 @@ static void newFunction(sipSpec *pt, moduleDef *mod, classDef *c_scope,
if (isvirt) if (isvirt)
{ {
if (isSignal(od) && pluginPyTQt3(pt)) if (isSignal(od) && pluginPyTQt(pt))
yyerror("Virtual signals aren't supported"); yyerror("Virtual signals aren't supported");
setIsVirtual(od); setIsVirtual(od);
@ -6060,11 +6060,11 @@ static const char *getDocValue(optFlags *optflgs)
/* /*
* Return TRUE if the PyQt3 plugin was specified. * Return TRUE if the PyTQt plugin was specified.
*/ */
int pluginPyTQt3(sipSpec *pt) int pluginPyTQt(sipSpec *pt)
{ {
return stringFind(pt->plugins, "PyQt3"); return stringFind(pt->plugins, "PyTQt");
} }

@ -524,7 +524,7 @@ typedef enum {
pydict_type, pydict_type,
pycallable_type, pycallable_type,
pyslice_type, pyslice_type,
qobject_type, tqobject_type,
function_type, function_type,
pytype_type, pytype_type,
ellipsis_type, ellipsis_type,
@ -723,7 +723,7 @@ typedef struct _moduleDef {
apiVersionRangeDef *api_versions; /* The defined APIs. */ apiVersionRangeDef *api_versions; /* The defined APIs. */
apiVersionRangeDef *api_ranges; /* The list of API version ranges. */ apiVersionRangeDef *api_ranges; /* The list of API version ranges. */
int modflags; /* The module flags. */ int modflags; /* The module flags. */
int qobjclass; /* TQObject class, -1 if none. */ int tqobjclass; /* TQObject class, -1 if none. */
struct _memberDef *othfuncs; /* List of other functions. */ struct _memberDef *othfuncs; /* List of other functions. */
struct _overDef *overs; /* Global overloads. */ struct _overDef *overs; /* Global overloads. */
argType encoding; /* The default string encoding. */ argType encoding; /* The default string encoding. */
@ -1139,7 +1139,7 @@ codeBlock *templateCode(sipSpec *pt, ifaceFileList **used, codeBlock *ocb, scope
ifaceFileDef *findIfaceFile(sipSpec *pt, moduleDef *mod, ifaceFileDef *findIfaceFile(sipSpec *pt, moduleDef *mod,
scopedNameDef *fqname, ifaceFileType iftype, scopedNameDef *fqname, ifaceFileType iftype,
apiVersionRangeDef *api_range, argDef *ad); apiVersionRangeDef *api_range, argDef *ad);
int pluginPyTQt3(sipSpec *pt); int pluginPyTQt(sipSpec *pt);
int pluginPyQt4(sipSpec *pt); int pluginPyQt4(sipSpec *pt);
void yywarning(char *); void yywarning(char *);
nameDef *cacheName(sipSpec *pt, const char *name); nameDef *cacheName(sipSpec *pt, const char *name);

@ -1632,7 +1632,7 @@ static void getVisibleMembers(sipSpec *pt, classDef *cd)
if (!generatingCodeForModule(pt, cd->iff->module)) if (!generatingCodeForModule(pt, cd->iff->module))
continue; continue;
if (isProtected(od) || (isSignal(od) && pluginPyTQt3(pt))) if (isProtected(od) || (isSignal(od) && pluginPyTQt(pt)))
setIsUsedName(md->pyname); setIsUsedName(md->pyname);
/* Make we have any API name. */ /* Make we have any API name. */
@ -2101,7 +2101,7 @@ static int supportedType(classDef *cd,overDef *od,argDef *ad,int outputs)
case rxdis_type: case rxdis_type:
case slotcon_type: case slotcon_type:
case slotdis_type: case slotdis_type:
case qobject_type: case tqobject_type:
case ellipsis_type: case ellipsis_type:
/* These can only appear in argument lists without * or &. */ /* These can only appear in argument lists without * or &. */
@ -3406,7 +3406,7 @@ static void createSortedNumberedTypesTable(sipSpec *pt, moduleDef *mod)
/* If we find a class called TQObject, assume it's TQt. */ /* If we find a class called TQObject, assume it's TQt. */
if (strcmp(ad->name->text, TQOBJECT_OBJECT_NAME_STRING) == 0) if (strcmp(ad->name->text, TQOBJECT_OBJECT_NAME_STRING) == 0)
mod->qobjclass = i; mod->tqobjclass = i;
break; break;

@ -856,7 +856,7 @@ typedef struct _sipExportedModuleDef {
sipImportedModuleDef *em_imports; sipImportedModuleDef *em_imports;
/* The optional TQt support API. */ /* The optional TQt support API. */
struct _sipTQtAPI *em_qt_api; struct _sipTQtAPI *em_tqt_api;
/* The number of types. */ /* The number of types. */
int em_nrtypes; int em_nrtypes;
@ -1298,22 +1298,22 @@ typedef struct _sipAPIDef {
* The API implementing the optional TQt support. * The API implementing the optional TQt support.
*/ */
typedef struct _sipTQtAPI { typedef struct _sipTQtAPI {
sipTypeDef **qt_qobject; sipTypeDef **tqt_tqobject;
void *(*qt_create_universal_signal)(void *, const char **); void *(*tqt_create_universal_signal)(void *, const char **);
void *(*qt_find_universal_signal)(void *, const char **); void *(*tqt_find_universal_signal)(void *, const char **);
void *(*qt_create_universal_slot)(struct _sipWrapper *, const char *, void *(*tqt_create_universal_slot)(struct _sipWrapper *, const char *,
PyObject *, const char *, const char **, int); PyObject *, const char *, const char **, int);
void (*qt_destroy_universal_slot)(void *); void (*tqt_destroy_universal_slot)(void *);
void *(*qt_find_slot)(void *, const char *, PyObject *, const char *, void *(*tqt_find_slot)(void *, const char *, PyObject *, const char *,
const char **); const char **);
int (*qt_connect)(void *, const char *, void *, const char *, int); int (*tqt_connect)(void *, const char *, void *, const char *, int);
int (*qt_disconnect)(void *, const char *, void *, const char *); int (*tqt_disconnect)(void *, const char *, void *, const char *);
int (*qt_same_name)(const char *, const char *); int (*tqt_same_name)(const char *, const char *);
sipSlot *(*qt_find_sipslot)(void *, void **); sipSlot *(*tqt_find_sipslot)(void *, void **);
int (*tqt_emit_signal)(PyObject *, const char *, PyObject *); int (*tqt_emit_signal)(PyObject *, const char *, PyObject *);
int (*qt_connect_py_signal)(PyObject *, const char *, PyObject *, int (*tqt_connect_py_signal)(PyObject *, const char *, PyObject *,
const char *); const char *);
void (*qt_disconnect_py_signal)(PyObject *, const char *, PyObject *, void (*tqt_disconnect_py_signal)(PyObject *, const char *, PyObject *,
const char *); const char *);
} sipTQtAPI; } sipTQtAPI;
@ -1420,29 +1420,29 @@ typedef struct _sipTQtAPI {
/* /*
* The following are PyTQt3-specific extensions. In SIP-TQt v5 they will be pushed * The following are PyTQt-specific extensions. In SIP-TQt v5 they will be pushed
* out to a plugin supplied by PyTQt3. * out to a plugin supplied by PyTQt.
*/ */
typedef int (*pyqt3EmitFunc)(sipSimpleWrapper *, PyObject *); typedef int (*pytqtEmitFunc)(sipSimpleWrapper *, PyObject *);
/* /*
* Maps the name of a TQt signal to a wrapper function to emit it. * Maps the name of a TQt signal to a wrapper function to emit it.
*/ */
typedef struct _pyqt3QtSignal { typedef struct _pytqtTQtSignal {
/* The signal name. */ /* The signal name. */
const char *st_name; const char *st_name;
/* The emitter function. */ /* The emitter function. */
pyqt3EmitFunc st_emitfunc; pytqtEmitFunc st_emitfunc;
} pyqt3QtSignal; } pytqtTQtSignal;
/* /*
* This is the PyTQt3-specific extension to the generated class type structure. * This is the PyTQt-specific extension to the generated class type structure.
*/ */
typedef struct _pyqt3ClassTypeDef { typedef struct _pytqtClassTypeDef {
/* /*
* The super-type structure. This must be first in the structure so that * The super-type structure. This must be first in the structure so that
* it can be cast to sipClassTypeDef *. * it can be cast to sipClassTypeDef *.
@ -1450,8 +1450,8 @@ typedef struct _pyqt3ClassTypeDef {
sipClassTypeDef super; sipClassTypeDef super;
/* The emit table for TQt signals. */ /* The emit table for TQt signals. */
pyqt3QtSignal *qt3_emit; pytqtTQtSignal *tqt_emit;
} pyqt3ClassTypeDef; } pytqtClassTypeDef;
/* /*

@ -1221,7 +1221,7 @@ static int sip_api_export_module(sipExportedModuleDef *client,
} }
/* Only one module can claim to wrap TQObject. */ /* Only one module can claim to wrap TQObject. */
if (em->em_qt_api != NULL && client->em_qt_api != NULL) if (em->em_tqt_api != NULL && client->em_tqt_api != NULL)
{ {
PyErr_Format(PyExc_RuntimeError, PyErr_Format(PyExc_RuntimeError,
"the %s and %s modules both wrap the TQObject class", "the %s and %s modules both wrap the TQObject class",
@ -1369,10 +1369,10 @@ static int sip_api_init_module(sipExportedModuleDef *client,
} }
/* Set any TQt support API. */ /* Set any TQt support API. */
if (client->em_qt_api != NULL) if (client->em_tqt_api != NULL)
{ {
sipTQtSupport = client->em_qt_api; sipTQtSupport = client->em_tqt_api;
sipTQObjectType = *sipTQtSupport->qt_qobject; sipTQObjectType = *sipTQtSupport->tqt_tqobject;
} }
/* Append any initialiser extenders to the relevant classes. */ /* Append any initialiser extenders to the relevant classes. */
@ -7045,7 +7045,7 @@ void *sip_api_get_address(sipSimpleWrapper *sw)
/* /*
* Get the C/C++ pointer for a complex object. Note that not casting the C++ * Get the C/C++ pointer for a complex object. Note that not casting the C++
* pointer is a bug. However this is only ever called by PyTQt3 signal emitter * pointer is a bug. However this is only ever called by PyTQt signal emitter
* code and PyTQt doesn't contain anything that multiply inherits from TQObject. * code and PyTQt doesn't contain anything that multiply inherits from TQObject.
*/ */
static void *sip_api_get_complex_cpp_ptr(sipSimpleWrapper *sw) static void *sip_api_get_complex_cpp_ptr(sipSimpleWrapper *sw)
@ -8778,7 +8778,7 @@ static int sipWrapper_clear(sipWrapper *self)
sipSlot *slot; sipSlot *slot;
void *context = NULL; void *context = NULL;
while ((slot = sipTQtSupport->qt_find_sipslot(tx, &context)) != NULL) while ((slot = sipTQtSupport->tqt_find_sipslot(tx, &context)) != NULL)
{ {
sip_api_clear_any_slot_reference(slot); sip_api_clear_any_slot_reference(slot);
@ -8846,7 +8846,7 @@ static int sipWrapper_traverse(sipWrapper *self, visitproc visit, void *arg)
sipSlot *slot; sipSlot *slot;
void *context = NULL; void *context = NULL;
while ((slot = sipTQtSupport->qt_find_sipslot(tx, &context)) != NULL) while ((slot = sipTQtSupport->tqt_find_sipslot(tx, &context)) != NULL)
{ {
if ((vret = sip_api_visit_slot(slot, visit, arg)) != 0) if ((vret = sip_api_visit_slot(slot, visit, arg)) != 0)
return vret; return vret;
@ -9297,7 +9297,7 @@ static void *sip_api_import_symbol(const char *name)
/* /*
* Visit a slot connected to an object for the cyclic garbage collector. This * Visit a slot connected to an object for the cyclic garbage collector. This
* is only called externally by PyTQt3. * is only called externally by PyTQt.
*/ */
static int sip_api_visit_slot(sipSlot *slot, visitproc visit, void *arg) static int sip_api_visit_slot(sipSlot *slot, visitproc visit, void *arg)
{ {
@ -9311,7 +9311,7 @@ static int sip_api_visit_slot(sipSlot *slot, visitproc visit, void *arg)
/* /*
* Clear a slot if it has an extra reference to keep it alive. This is only * Clear a slot if it has an extra reference to keep it alive. This is only
* called externally by PyTQt3. * called externally by PyTQt.
*/ */
static void sip_api_clear_any_slot_reference(sipSlot *slot) static void sip_api_clear_any_slot_reference(sipSlot *slot)
{ {

@ -44,8 +44,8 @@ static void *newSignal(void *txrx, const char **sig);
*/ */
static void *findSignal(void *txrx, const char **sig) static void *findSignal(void *txrx, const char **sig)
{ {
if (sipTQtSupport->qt_find_universal_signal != NULL) if (sipTQtSupport->tqt_find_universal_signal != NULL)
txrx = sipTQtSupport->qt_find_universal_signal(txrx, sig); txrx = sipTQtSupport->tqt_find_universal_signal(txrx, sig);
return txrx; return txrx;
} }
@ -58,8 +58,8 @@ static void *newSignal(void *txrx, const char **sig)
{ {
void *new_txrx = findSignal(txrx, sig); void *new_txrx = findSignal(txrx, sig);
if (new_txrx == NULL && sipTQtSupport->qt_create_universal_signal != NULL) if (new_txrx == NULL && sipTQtSupport->tqt_create_universal_signal != NULL)
new_txrx = sipTQtSupport->qt_create_universal_signal(txrx, sig); new_txrx = sipTQtSupport->tqt_create_universal_signal(txrx, sig);
return new_txrx; return new_txrx;
} }
@ -72,7 +72,7 @@ static void *newSignal(void *txrx, const char **sig)
static void *createUniversalSlot(sipWrapper *txSelf, const char *sig, static void *createUniversalSlot(sipWrapper *txSelf, const char *sig,
PyObject *rxObj, const char *slot, const char **member, int flags) PyObject *rxObj, const char *slot, const char **member, int flags)
{ {
void *us = sipTQtSupport->qt_create_universal_slot(txSelf, sig, rxObj, slot, void *us = sipTQtSupport->tqt_create_universal_slot(txSelf, sig, rxObj, slot,
member, flags); member, flags);
if (us && txSelf) if (us && txSelf)
@ -92,7 +92,7 @@ PyObject *sip_api_invoke_slot(const sipSlot *slot, PyObject *sigargs)
/* Keep some compilers quiet. */ /* Keep some compilers quiet. */
oxtype = oxvalue = oxtb = NULL; oxtype = oxvalue = oxtb = NULL;
/* Fan out TQt signals. (Only PyTQt3 will do this.) */ /* Fan out TQt signals. (Only PyTQt will do this.) */
if (slot->name != NULL && slot->name[0] != '\0') if (slot->name != NULL && slot->name[0] != '\0')
{ {
assert(sipTQtSupport->tqt_emit_signal); assert(sipTQtSupport->tqt_emit_signal);
@ -309,7 +309,7 @@ int sip_api_same_slot(const sipSlot *sp, PyObject *rxObj, const char *slot)
if (sp->name == NULL || sp->name[0] == '\0') if (sp->name == NULL || sp->name[0] == '\0')
return 0; return 0;
return (sipTQtSupport->qt_same_name(sp->name, slot) && sp->pyobj == rxObj); return (sipTQtSupport->tqt_same_name(sp->name, slot) && sp->pyobj == rxObj);
} }
/* See if they are pure Python methods. */ /* See if they are pure Python methods. */
@ -361,10 +361,10 @@ void *sipGetRx(sipSimpleWrapper *txSelf, const char *sigargs, PyObject *rxObj,
} }
/* /*
* The slot was either a Python callable or PyTQt3 Python signal so there * The slot was either a Python callable or PyTQt Python signal so there
* should be a universal slot. * should be a universal slot.
*/ */
return sipTQtSupport->qt_find_slot(sip_api_get_address(txSelf), sigargs, rxObj, slot, memberp); return sipTQtSupport->tqt_find_slot(sip_api_get_address(txSelf), sigargs, rxObj, slot, memberp);
} }
@ -424,15 +424,15 @@ PyObject *sip_api_connect_rx(PyObject *txObj, const char *sig, PyObject *rxObj,
if ((rx = sip_api_convert_rx((sipWrapper *)txObj, sig, rxObj, slot, &member, 0)) == NULL) if ((rx = sip_api_convert_rx((sipWrapper *)txObj, sig, rxObj, slot, &member, 0)) == NULL)
return NULL; return NULL;
res = sipTQtSupport->qt_connect(tx, real_sig, rx, member, type); res = sipTQtSupport->tqt_connect(tx, real_sig, rx, member, type);
return PyBool_FromLong(res); return PyBool_FromLong(res);
} }
/* Handle Python signals. Only PyTQt3 will get this far. */ /* Handle Python signals. Only PyTQt will get this far. */
assert(sipTQtSupport->qt_connect_py_signal); assert(sipTQtSupport->tqt_connect_py_signal);
if (sipTQtSupport->qt_connect_py_signal(txObj, sig, rxObj, slot) < 0) if (sipTQtSupport->tqt_connect_py_signal(txObj, sig, rxObj, slot) < 0)
return NULL; return NULL;
Py_INCREF(Py_True); Py_INCREF(Py_True);
@ -466,22 +466,22 @@ PyObject *sip_api_disconnect_rx(PyObject *txObj,const char *sig,
/* Handle Python signals. */ /* Handle Python signals. */
tx = findSignal(tx, &sig); tx = findSignal(tx, &sig);
res = sipTQtSupport->qt_disconnect(tx, sig, rx, member); res = sipTQtSupport->tqt_disconnect(tx, sig, rx, member);
/* /*
* Delete it if it is a universal slot as this will be it's only * Delete it if it is a universal slot as this will be it's only
* connection. If the slot is actually a universal signal then it * connection. If the slot is actually a universal signal then it
* should leave it in place. * should leave it in place.
*/ */
sipTQtSupport->qt_destroy_universal_slot(rx); sipTQtSupport->tqt_destroy_universal_slot(rx);
return PyBool_FromLong(res); return PyBool_FromLong(res);
} }
/* Handle Python signals. Only PyTQt3 will get this far. */ /* Handle Python signals. Only PyTQt will get this far. */
assert(sipTQtSupport->qt_disconnect_py_signal); assert(sipTQtSupport->tqt_disconnect_py_signal);
sipTQtSupport->qt_disconnect_py_signal(txObj, sig, rxObj, slot); sipTQtSupport->tqt_disconnect_py_signal(txObj, sig, rxObj, slot);
Py_INCREF(Py_True); Py_INCREF(Py_True);
return Py_True; return Py_True;

@ -199,7 +199,7 @@ class _Macro:
class Makefile: class Makefile:
"""The base class for the different types of Makefiles. """The base class for the different types of Makefiles.
""" """
def __init__(self, configuration, console=0, qt=0, opengl=0, python=0, def __init__(self, configuration, console=0, tqt=0, opengl=0, python=0,
threaded=0, warnings=1, debug=0, dir=None, threaded=0, warnings=1, debug=0, dir=None,
makefile="Makefile", installs=None, universal=None, makefile="Makefile", installs=None, universal=None,
arch=None): arch=None):
@ -208,13 +208,13 @@ class Makefile:
configuration is the current configuration. configuration is the current configuration.
console is set if the target is a console (rather than windows) target. console is set if the target is a console (rather than windows) target.
qt is set if the target uses Qt. For Qt v4 a list of Qt libraries may tqt is set if the target uses TQt. For Qt v4 a list of Qt libraries may
be specified and a simple non-zero value implies QtCore and QtGui. be specified and a simple non-zero value implies QtCore and QtGui.
opengl is set if the target uses OpenGL. opengl is set if the target uses OpenGL.
python is set if the target #includes Python.h. python is set if the target #includes Python.h.
debug is set to generated a debugging version of the target. debug is set to generated a debugging version of the target.
threaded is set if the target requires thread support. It is threaded is set if the target requires thread support. It is
automatically set if the target uses Qt and Qt has thread support automatically set if the target uses TQt and TQt has thread support
enabled. enabled.
warnings is set if compiler warning messages are required. warnings is set if compiler warning messages are required.
debug is set if debugging symbols should be generated. debug is set if debugging symbols should be generated.
@ -229,17 +229,17 @@ class Makefile:
arch is the space separated MacOS/X architectures to build. If it is arch is the space separated MacOS/X architectures to build. If it is
None then it is taken from the configuration. None then it is taken from the configuration.
""" """
if qt: if tqt:
if not hasattr(configuration, "qt_version"): if not hasattr(configuration, "tqt_version"):
error("The target uses Qt but pyqtconfig has not been imported.") error("The target uses TQt but pytqtconfig has not been imported.")
self._threaded = configuration.qt_threaded self._threaded = configuration.tqt_threaded
else: else:
self._threaded = threaded self._threaded = threaded
self.config = configuration self.config = configuration
self.console = console self.console = console
self._qt = qt self._tqt = tqt
self._opengl = opengl self._opengl = opengl
self._python = python self._python = python
self._warnings = warnings self._warnings = warnings
@ -326,14 +326,14 @@ class Makefile:
"""Finalise the macros by doing any consolidation that isn't specific """Finalise the macros by doing any consolidation that isn't specific
to a Makefile. to a Makefile.
""" """
# Extract the things we might need from the Windows Qt configuration. # Extract the things we might need from the Windows TQt configuration.
# Note that we used to think that if Qt was built with exceptions, RTTI # Note that we used to think that if TQt was built with exceptions, RTTI
# and STL support enabled then anything that linked against it also # and STL support enabled then anything that linked against it also
# needed the same flags. However, detecting this was broken for some # needed the same flags. However, detecting this was broken for some
# time and nobody complained. For the moment we'll leave the code in # time and nobody complained. For the moment we'll leave the code in
# but it will never be used. # but it will never be used.
if self._qt: if self._tqt:
wcfg = self.config.qt_winconfig.split() wcfg = self.config.tqt_winconfig.split()
win_shared = ("shared" in wcfg) win_shared = ("shared" in wcfg)
win_exceptions = ("exceptions" in wcfg) win_exceptions = ("exceptions" in wcfg)
win_rtti = ("rtti" in wcfg) win_rtti = ("rtti" in wcfg)
@ -394,7 +394,7 @@ class Makefile:
for l in self.extra_libs: for l in self.extra_libs:
libs.append(self.platform_lib(l)) libs.append(self.platform_lib(l))
if self._qt: if self._tqt:
libs.extend(self._dependent_libs(l)) libs.extend(self._dependent_libs(l))
libs.extend(self.optional_list("LIBS")) libs.extend(self.optional_list("LIBS"))
@ -522,9 +522,9 @@ class Makefile:
cxxflags.extend(self.optional_list("CXXFLAGS_THREAD")) cxxflags.extend(self.optional_list("CXXFLAGS_THREAD"))
lflags.extend(self.optional_list("LFLAGS_THREAD")) lflags.extend(self.optional_list("LFLAGS_THREAD"))
if self._qt: if self._tqt:
if self.generator != "UNIX" and win_shared: if self.generator != "UNIX" and win_shared:
defines.append("QT_DLL") defines.append("TQT_DLL")
if not self._debug: if not self._debug:
defines.append("TQT_NO_DEBUG") defines.append("TQT_NO_DEBUG")
@ -533,27 +533,27 @@ class Makefile:
defines.append("TQT_THREAD_SUPPORT") defines.append("TQT_THREAD_SUPPORT")
# Handle library directories. # Handle library directories.
libdir_qt = self.optional_list("LIBDIR_TQT") libdir_tqt = self.optional_list("LIBDIR_TQT")
libdir.extend(libdir_qt) libdir.extend(libdir_tqt)
rpaths.extend(libdir_qt) rpaths.extend(libdir_tqt)
# Windows needs the version number appended if Qt is a DLL. # Windows needs the version number appended if TQt is a DLL.
qt_lib = self.config.qt_lib tqt_lib = self.config.tqt_lib
if self.generator in ("MSVC", "MSVC.NET", "BMAKE") and win_shared: if self.generator in ("MSVC", "MSVC.NET", "BMAKE") and win_shared:
qt_lib = qt_lib + version_to_string(self.config.qt_version).replace(".", "") tqt_lib = tqt_lib + version_to_string(self.config.tqt_version).replace(".", "")
if self.config.qt_edition == "non-commercial": if self.config.tqt_edition == "non-commercial":
qt_lib = qt_lib + "nc" tqt_lib = tqt_lib + "nc"
libs.append(self.platform_lib(qt_lib)) libs.append(self.platform_lib(tqt_lib))
libs.extend(self._dependent_libs(self.config.qt_lib)) libs.extend(self._dependent_libs(self.config.tqt_lib))
# Handle header directories. # Handle header directories.
try: try:
specd_base = self.config.qt_data_dir specd_base = self.config.tqt_data_dir
except AttributeError: except AttributeError:
specd_base = self.config.qt_dir specd_base = self.config.tqt_dir
specd = os.path.join(specd_base, "mkspecs", "default") specd = os.path.join(specd_base, "mkspecs", "default")
@ -562,11 +562,11 @@ class Makefile:
incdir.append(specd) incdir.append(specd)
qtincdir = self.optional_list("INCDIR_TQT") tqtincdir = self.optional_list("INCDIR_TQT")
if qtincdir: if tqtincdir:
# This must go after the module include directories. # This must go after the module include directories.
incdir.extend(qtincdir) incdir.extend(tqtincdir)
if self._opengl: if self._opengl:
incdir.extend(self.optional_list("INCDIR_OPENGL")) incdir.extend(self.optional_list("INCDIR_OPENGL"))
@ -574,7 +574,7 @@ class Makefile:
libdir.extend(self.optional_list("LIBDIR_OPENGL")) libdir.extend(self.optional_list("LIBDIR_OPENGL"))
libs.extend(self.optional_list("LIBS_OPENGL")) libs.extend(self.optional_list("LIBS_OPENGL"))
if self._qt or self._opengl: if self._tqt or self._opengl:
incdir.extend(self.optional_list("INCDIR_X11")) incdir.extend(self.optional_list("INCDIR_X11"))
libdir.extend(self.optional_list("LIBDIR_X11")) libdir.extend(self.optional_list("LIBDIR_X11"))
libs.extend(self.optional_list("LIBS_X11")) libs.extend(self.optional_list("LIBS_X11"))
@ -680,9 +680,9 @@ class Makefile:
prl_libs = [] prl_libs = []
if self.generator in ("MSVC", "MSVC.NET", "BMAKE"): if self.generator in ("MSVC", "MSVC.NET", "BMAKE"):
prl_name = os.path.join(self.config.qt_lib_dir, clib + ".prl") prl_name = os.path.join(self.config.tqt_lib_dir, clib + ".prl")
else: else:
prl_name = os.path.join(self.config.qt_lib_dir, "lib" + clib + ".prl") prl_name = os.path.join(self.config.tqt_lib_dir, "lib" + clib + ".prl")
if os.access(prl_name, os.F_OK): if os.access(prl_name, os.F_OK):
try: try:
@ -777,7 +777,7 @@ class Makefile:
olist.append(root + ext) olist.append(root + ext)
for f in bdict["tqmoc_headers"].split(): for f in bdict["tqmoc_headers"].split():
if not self._qt: if not self._tqt:
error("\"%s\" defines \"tqmoc_headers\" for a non-Qt module." % bfname) error("\"%s\" defines \"tqmoc_headers\" for a non-Qt module." % bfname)
root, discard = os.path.splitext(f) root, discard = os.path.splitext(f)
@ -893,7 +893,7 @@ class Makefile:
mfile.write("LIBS = %s\n" % ' '.join(libs)) mfile.write("LIBS = %s\n" % ' '.join(libs))
if self._qt: if self._tqt:
mfile.write("MOC = %s\n" % _quote(self.required_string("MOC"))) mfile.write("MOC = %s\n" % _quote(self.required_string("MOC")))
if self._src_dir != self.dir: if self._src_dir != self.dir:
@ -1163,7 +1163,7 @@ class ModuleMakefile(Makefile):
"""The class that represents a Python extension module Makefile """The class that represents a Python extension module Makefile
""" """
def __init__(self, configuration, build_file, install_dir=None, static=0, def __init__(self, configuration, build_file, install_dir=None, static=0,
console=0, qt=0, opengl=0, threaded=0, warnings=1, debug=0, console=0, tqt=0, opengl=0, threaded=0, warnings=1, debug=0,
dir=None, makefile="Makefile", installs=None, strip=1, dir=None, makefile="Makefile", installs=None, strip=1,
export_all=0, universal=None, arch=None): export_all=0, universal=None, arch=None):
"""Initialise an instance of a module Makefile. """Initialise an instance of a module Makefile.
@ -1179,7 +1179,7 @@ class ModuleMakefile(Makefile):
increases the size of the module and slows down module load times but increases the size of the module and slows down module load times but
may avoid problems with modules that use exceptions. The default is 0. may avoid problems with modules that use exceptions. The default is 0.
""" """
Makefile.__init__(self, configuration, console, qt, opengl, 1, threaded, warnings, debug, dir, makefile, installs, universal, arch) Makefile.__init__(self, configuration, console, tqt, opengl, 1, threaded, warnings, debug, dir, makefile, installs, universal, arch)
self._build = self.parse_build_file(build_file) self._build = self.parse_build_file(build_file)
self._install_dir = install_dir self._install_dir = install_dir
@ -1479,7 +1479,7 @@ class SIPModuleMakefile(ModuleMakefile):
"""The class that represents a SIP-TQt generated module Makefile. """The class that represents a SIP-TQt generated module Makefile.
""" """
def __init__(self, configuration, build_file, install_dir=None, static=0, def __init__(self, configuration, build_file, install_dir=None, static=0,
console=0, qt=0, opengl=0, threaded=0, warnings=1, debug=0, console=0, tqt=0, opengl=0, threaded=0, warnings=1, debug=0,
dir=None, makefile="Makefile", installs=None, strip=1, dir=None, makefile="Makefile", installs=None, strip=1,
export_all=0, universal=None, arch=None, prot_is_public=0): export_all=0, universal=None, arch=None, prot_is_public=0):
"""Initialise an instance of a SIP-TQt generated module Makefile. """Initialise an instance of a SIP-TQt generated module Makefile.
@ -1491,7 +1491,7 @@ class SIPModuleMakefile(ModuleMakefile):
For all other arguments see ModuleMakefile. For all other arguments see ModuleMakefile.
""" """
ModuleMakefile.__init__(self, configuration, build_file, install_dir, ModuleMakefile.__init__(self, configuration, build_file, install_dir,
static, console, qt, opengl, threaded, warnings, debug, dir, static, console, tqt, opengl, threaded, warnings, debug, dir,
makefile, installs, strip, export_all, universal, arch) makefile, installs, strip, export_all, universal, arch)
self._prot_is_public = prot_is_public self._prot_is_public = prot_is_public
@ -1512,7 +1512,7 @@ class ProgramMakefile(Makefile):
"""The class that represents a program Makefile. """The class that represents a program Makefile.
""" """
def __init__(self, configuration, build_file=None, install_dir=None, def __init__(self, configuration, build_file=None, install_dir=None,
console=0, qt=0, opengl=0, python=0, threaded=0, warnings=1, console=0, tqt=0, opengl=0, python=0, threaded=0, warnings=1,
debug=0, dir=None, makefile="Makefile", installs=None, debug=0, dir=None, makefile="Makefile", installs=None,
universal=None, arch=None): universal=None, arch=None):
"""Initialise an instance of a program Makefile. """Initialise an instance of a program Makefile.
@ -1521,7 +1521,7 @@ class ProgramMakefile(Makefile):
it is a dictionary instead then its contents are validated. it is a dictionary instead then its contents are validated.
install_dir is the directory the target will be installed in. install_dir is the directory the target will be installed in.
""" """
Makefile.__init__(self, configuration, console, qt, opengl, python, threaded, warnings, debug, dir, makefile, installs, universal, arch) Makefile.__init__(self, configuration, console, tqt, opengl, python, threaded, warnings, debug, dir, makefile, installs, universal, arch)
self._install_dir = install_dir self._install_dir = install_dir

@ -12,7 +12,7 @@ supports over 50 different platform/compiler combinations.
The build system is implemented as a pure Python module called :mod:`sipconfig` The build system is implemented as a pure Python module called :mod:`sipconfig`
that contains a number of classes and functions. Using this module you can that contains a number of classes and functions. Using this module you can
write bespoke configuration scripts (e.g. PyQt's ``configure.py``) or use it write bespoke configuration scripts (e.g. PyTQt's ``configure.py``) or use it
with other Python based build systems (e.g. with other Python based build systems (e.g.
`Distutils <http://www.python.org/sigs/distutils-sig/distutils.html>`_ and `Distutils <http://www.python.org/sigs/distutils-sig/distutils.html>`_ and
`SCons <http://www.scons.org>`_). `SCons <http://www.scons.org>`_).
@ -20,17 +20,17 @@ with other Python based build systems (e.g.
An important feature of SIP is the ability to generate bindings that are built An important feature of SIP is the ability to generate bindings that are built
on top of existing bindings. For example, both on top of existing bindings. For example, both
`PyKDE <http://www.riverbankcomputing.com/software/pytde/>`_ and `PyKDE <http://www.riverbankcomputing.com/software/pytde/>`_ and
`PyQwt <http://pyqwt.sourceforge.net/>`_ are built on top of PyQt but all three `PyQwt <http://pyqwt.sourceforge.net/>`_ are built on top of PyTQt but all three
packages are maintained by different developers. To make this easier PyQt packages are maintained by different developers. To make this easier PyTQt
includes its own configuration module, ``pyqtconfig``, that contains additional includes its own configuration module, ``pytqtconfig``, that contains additional
classes intended to be used by the configuration scripts of bindings built on classes intended to be used by the configuration scripts of bindings built on
top of PyQt. The SIP build system includes facilities that do a lot of the top of PyTQt. The SIP build system includes facilities that do a lot of the
work of creating these additional configuration modules. work of creating these additional configuration modules.
.. function:: create_config_module(module, template, content[, macros=None]) .. function:: create_config_module(module, template, content[, macros=None])
This creates a configuration module (e.g. ``pyqtconfig``) from a template This creates a configuration module (e.g. ``pytqtconfig``) from a template
file and a string. file and a string.
:param module: :param module:
@ -377,7 +377,7 @@ work of creating these additional configuration modules.
A string that will remove a file. A string that will remove a file.
.. method:: __init__(configuration[, console=0[, qt=0[, opengl=0[, python=0[, threaded=0[, warnings=None[, debug=0[, dir=None[, makefile="Makefile"[, installs=None[, universal=None[, arch=None]]]]]]]]]]]]) .. method:: __init__(configuration[, console=0[, tqt=0[, opengl=0[, python=0[, threaded=0[, warnings=None[, debug=0[, dir=None[, makefile="Makefile"[, installs=None[, universal=None[, arch=None]]]]]]]]]]]])
:param configuration: :param configuration:
the current configuration and is an instance of the the current configuration and is an instance of the
@ -385,8 +385,8 @@ work of creating these additional configuration modules.
:param console: :param console:
is set if the target is a console (rather than GUI) target. This is set if the target is a console (rather than GUI) target. This
only affects Windows and is ignored on other platforms. only affects Windows and is ignored on other platforms.
:param qt: :param tqt:
is set if the target uses Qt. For Qt v4 a list of Qt libraries may is set if the target uses TQt. For Qt v4 a list of Qt libraries may
be specified and a simple non-zero value implies QtCore and QtGui. be specified and a simple non-zero value implies QtCore and QtGui.
:param opengl: :param opengl:
is set if the target uses OpenGL. is set if the target uses OpenGL.
@ -394,7 +394,7 @@ work of creating these additional configuration modules.
is set if the target uses Python.h. is set if the target uses Python.h.
:param threaded: :param threaded:
is set if the target requires thread support. It is set is set if the target requires thread support. It is set
automatically if the target uses Qt and Qt has thread support automatically if the target uses TQt and TQt has thread support
enabled. enabled.
:param warnings: :param warnings:
is set if compiler warning messages should be enabled. The default is set if compiler warning messages should be enabled. The default
@ -572,7 +572,7 @@ work of creating these additional configuration modules.
:ref:`ref-builtin`). :ref:`ref-builtin`).
:param console: :param console:
see :meth:`sipconfig.Makefile.__init__`. see :meth:`sipconfig.Makefile.__init__`.
:param qt: :param tqt:
see :meth:`sipconfig.Makefile.__init__`. see :meth:`sipconfig.Makefile.__init__`.
:param opengl: :param opengl:
see :meth:`sipconfig.Makefile.__init__`. see :meth:`sipconfig.Makefile.__init__`.
@ -686,7 +686,7 @@ work of creating these additional configuration modules.
This class encapsulates a Makefile to build an executable program. This class encapsulates a Makefile to build an executable program.
.. method:: __init__(configuration[, build_file=None[, install_dir=None[, console=0[, qt=0[, opengl=0[, python=0[, threaded=0[, warnings=None[, debug=0[, dir=None[, makefile="Makefile"[, installs=None[, universal=None[, arch=None]]]]]]]]]]]]]]) .. method:: __init__(configuration[, build_file=None[, install_dir=None[, console=0[, tqt=0[, opengl=0[, python=0[, threaded=0[, warnings=None[, debug=0[, dir=None[, makefile="Makefile"[, installs=None[, universal=None[, arch=None]]]]]]]]]]]]]])
:param configuration: :param configuration:
see :meth:`sipconfig.Makefile.__init__`. see :meth:`sipconfig.Makefile.__init__`.
@ -698,7 +698,7 @@ work of creating these additional configuration modules.
optionally installed. optionally installed.
:param console: :param console:
see :meth:`sipconfig.Makefile.__init__`. see :meth:`sipconfig.Makefile.__init__`.
:param qt: :param tqt:
see :meth:`sipconfig.Makefile.__init__`. see :meth:`sipconfig.Makefile.__init__`.
:param opengl: :param opengl:
see :meth:`sipconfig.Makefile.__init__`. see :meth:`sipconfig.Makefile.__init__`.
@ -810,7 +810,7 @@ work of creating these additional configuration modules.
see :meth:`sipconfig.ModuleMakefile.__init__`. see :meth:`sipconfig.ModuleMakefile.__init__`.
:param console: :param console:
see :meth:`sipconfig.Makefile.__init__`. see :meth:`sipconfig.Makefile.__init__`.
:param qt: :param tqt:
see :meth:`sipconfig.Makefile.__init__`. see :meth:`sipconfig.Makefile.__init__`.
:param opengl: :param opengl:
see :meth:`sipconfig.Makefile.__init__`. see :meth:`sipconfig.Makefile.__init__`.

@ -1696,7 +1696,7 @@ name prefixed by ``sip``. For example, the derived class for class ``Klass``
is ``sipKlass``. is ``sipKlass``.
If a C++ class doesn't have any virtual or protected methods in it or any of If a C++ class doesn't have any virtual or protected methods in it or any of
it's super-class hierarchy, or does not emit any Qt Q_SIGNALS, then a derived it's super-class hierarchy, or does not emit any TQt Q_SIGNALS, then a derived
class is not generated. class is not generated.
Most of the time handwritten code should ignore the derived classes. The only Most of the time handwritten code should ignore the derived classes. The only

@ -24,8 +24,8 @@ The full set of command line options is:
.. cmdoption:: -a <FILE> .. cmdoption:: -a <FILE>
The name of the QScintilla API file to generate. This file contains a The name of the TQScintilla API file to generate. This file contains a
description of the module API in a form that the QScintilla editor description of the module API in a form that the TQScintilla editor
component can use for auto-completion and call tips. (The file may also be component can use for auto-completion and call tips. (The file may also be
used by the SciTE editor but must be sorted first.) By default the file is used by the SciTE editor but must be sorted first.) By default the file is
not generated. not generated.

@ -70,10 +70,10 @@ In addition the :option:`-a` command line option to :file:`configure.py` has
been removed. been removed.
Removal of PyQt-specific Features Removal of PyTQt-specific Features
********************************* *********************************
The following PyQt-specific support functions have been removed. The following PyTQt-specific support functions have been removed.
- :cfunc:`sipConnectRx()` - :cfunc:`sipConnectRx()`

@ -4,8 +4,8 @@ Introduction
This is the reference guide for SIP 4.10.5. SIP is a tool for This is the reference guide for SIP 4.10.5. SIP is a tool for
automatically generating `Python <http://www.python.org>`__ bindings for C and automatically generating `Python <http://www.python.org>`__ bindings for C and
C++ libraries. SIP was originally developed in 1998 for C++ libraries. SIP was originally developed in 1998 for
`PyQt <http://www.riverbankcomputing.com/software/pyqt>`__ - the Python `PyTQt <http://www.riverbankcomputing.com/software/pytqt>`__ - the Python
bindings for the Qt GUI toolkit - but is suitable for generating bindings for bindings for the TQt GUI toolkit - but is suitable for generating bindings for
any C or C++ library. any C or C++ library.
This version of SIP generates bindings for Python v2.3 or later, including This version of SIP generates bindings for Python v2.3 or later, including
@ -156,14 +156,14 @@ SIP comprises a number of different components.
:ref:`ref-distutils`. :ref:`ref-distutils`.
Qt Support TQt Support
---------- -----------
SIP has specific support for the creation of bindings based on Nokia's Qt SIP has specific support for the creation of bindings based on Nokia's Qt
toolkit. toolkit.
The SIP code generator understands the signal/slot type safe callback mechanism The SIP code generator understands the signal/slot type safe callback mechanism
that Qt uses to connect objects together. This allows applications to define that TQt uses to connect objects together. This allows applications to define
new Python Q_SIGNALS, and allows any Python callable object to be used as a slot. new Python Q_SIGNALS, and allows any Python callable object to be used as a slot.
SIP itself does not require Qt to be installed. SIP itself does not require TQt to be installed.

@ -268,7 +268,7 @@ file.
*argument* ::= [ *argument* ::= [
*type* [*name*] [*argument-annotations*] [*default-value*] | *type* [*name*] [*argument-annotations*] [*default-value*] |
:stype:`SIP_ANYSLOT` [*default-value*] | :stype:`SIP_ANYSLOT` [*default-value*] |
:stype:`SIP_QOBJECT` | :stype:`SIP_TQOBJECT` |
:stype:`SIP_RXOBJ_CON` | :stype:`SIP_RXOBJ_CON` |
:stype:`SIP_RXOBJ_DIS` | :stype:`SIP_RXOBJ_DIS` |
:stype:`SIP_SIGNAL` [*default-value*] | :stype:`SIP_SIGNAL` [*default-value*] |
@ -422,24 +422,24 @@ This is a ``PyObject *`` that is a Python tuple object.
This is a ``PyObject *`` that is a Python type object. This is a ``PyObject *`` that is a Python type object.
.. sip-type:: SIP_QOBJECT .. sip-type:: SIP_TQOBJECT
This is a ``QObject *`` that is a C++ instance of a class derived from Qt's This is a ``TQObject *`` that is a C++ instance of a class derived from TQt's
``QObject`` class. ``TQObject`` class.
.. sip-type:: SIP_RXOBJ_CON .. sip-type:: SIP_RXOBJ_CON
This is a ``QObject *`` that is a C++ instance of a class derived from Qt's This is a ``TQObject *`` that is a C++ instance of a class derived from TQt's
``QObject`` class. It is used as the type of the receiver instead of ``const ``TQObject`` class. It is used as the type of the receiver instead of ``const
QObject *`` in functions that implement a connection to a slot. TQObject *`` in functions that implement a connection to a slot.
.. sip-type:: SIP_RXOBJ_DIS .. sip-type:: SIP_RXOBJ_DIS
This is a ``QObject *`` that is a C++ instance of a class derived from Qt's This is a ``TQObject *`` that is a C++ instance of a class derived from TQt's
``QObject`` class. It is used as the type of the receiver instead of ``const ``TQObject`` class. It is used as the type of the receiver instead of ``const
QObject *`` in functions that implement a disconnection from a slot. TQObject *`` in functions that implement a disconnection from a slot.
.. sip-type:: SIP_SIGNAL .. sip-type:: SIP_SIGNAL
@ -468,7 +468,7 @@ signal to a slot. The signal is emitted when the keyboard accelerator is
activated and it has a single integer argument that is the ID of the activated and it has a single integer argument that is the ID of the
accelerator. The C++ signature is:: accelerator. The C++ signature is::
bool connectItem(int id, const QObject *receiver, const char *member); bool connectItem(int id, const TQObject *receiver, const char *member);
The corresponding SIP specification is:: The corresponding SIP specification is::

@ -193,7 +193,7 @@ A More Complex C++ Example
-------------------------- --------------------------
In this last example we will wrap a fictional C++ library that contains a class In this last example we will wrap a fictional C++ library that contains a class
that is derived from a Qt class. This will demonstrate how SIP allows a class that is derived from a TQt class. This will demonstrate how SIP allows a class
hierarchy to be split across multiple Python extension modules, and will hierarchy to be split across multiple Python extension modules, and will
introduce SIP's versioning system. introduce SIP's versioning system.
@ -263,11 +263,11 @@ previous examples.
- The :directive:`%Import` directive has been added to specify that we are - The :directive:`%Import` directive has been added to specify that we are
extending the class hierarchy defined in the file ``QtGui/QtGuimod.sip``. extending the class hierarchy defined in the file ``QtGui/QtGuimod.sip``.
This file is part of PyQt. The build system will take care of finding This file is part of PyTQt. The build system will take care of finding
the file's exact location. the file's exact location.
- The :directive:`%If` directive has been added to specify that everything - The :directive:`%If` directive has been added to specify that everything
[#]_ up to the matching :directive:`%End` directive only applies to Qt [#]_ up to the matching :directive:`%End` directive only applies to TQt
v4.2 and later. ``Qt_4_2_0`` is a *tag* defined in ``QtCoremod.sip`` v4.2 and later. ``Qt_4_2_0`` is a *tag* defined in ``QtCoremod.sip``
[#]_ using the :directive:`%Timeline` directive. :directive:`%Timeline` [#]_ using the :directive:`%Timeline` directive. :directive:`%Timeline`
is used to define a tag for each version of a library's API you are is used to define a tag for each version of a library's API you are
@ -282,7 +282,7 @@ previous examples.
- The :aanno:`TransferThis` annotation has been added to the constructor's - The :aanno:`TransferThis` annotation has been added to the constructor's
argument. It specifies that if the argument is not 0 (i.e. the ``Hello`` argument. It specifies that if the argument is not 0 (i.e. the ``Hello``
instance being constructed has a parent) then ownership of the instance instance being constructed has a parent) then ownership of the instance
is transferred from Python to C++. It is needed because Qt maintains is transferred from Python to C++. It is needed because TQt maintains
objects (i.e. instances derived from the ``QObject`` class) in a objects (i.e. instances derived from the ``QObject`` class) in a
hierachy. When an object is destroyed all of its children are also hierachy. When an object is destroyed all of its children are also
automatically destroyed. It is important, therefore, that the Python automatically destroyed. It is important, therefore, that the Python
@ -297,7 +297,7 @@ previous examples.
- The :directive:`%If` directive has been added to specify that everything - The :directive:`%If` directive has been added to specify that everything
up to the matching :directive:`%End` directive does not apply to Windows. up to the matching :directive:`%End` directive does not apply to Windows.
``WS_WIN`` is another tag defined by PyQt, this time using the ``WS_WIN`` is another tag defined by PyTQt, this time using the
:directive:`%Platforms` directive. Tags defined by the :directive:`%Platforms` directive. Tags defined by the
:directive:`%Platforms` directive are mutually exclusive, i.e. only one :directive:`%Platforms` directive are mutually exclusive, i.e. only one
may be valid at a time [#]_. may be valid at a time [#]_.
@ -309,9 +309,9 @@ prevent the automatic generation of a public copy constructor.
We now look at the ``configure.py`` script. This is a little different to the We now look at the ``configure.py`` script. This is a little different to the
script in the previous examples for two related reasons. script in the previous examples for two related reasons.
Firstly, PyQt includes a pure Python module called ``pyqtconfig`` that extends Firstly, PyTQt includes a pure Python module called ``pytqtconfig`` that extends
the SIP build system for modules, like our example, that build on top of PyQt. the SIP build system for modules, like our example, that build on top of PyTQt.
It deals with the details of which version of Qt is being used (i.e. it It deals with the details of which version of TQt is being used (i.e. it
determines what the correct tags are) and where it is installed. This is determines what the correct tags are) and where it is installed. This is
called a module's configuration module. called a module's configuration module.

Loading…
Cancel
Save