summaryrefslogtreecommitdiffstats
path: root/python/pyqt/pyuic3
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:44:01 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:44:01 +0000
commit479f5f799523bffbcc83dff581a2299c047c6fff (patch)
tree186aae707ed02aac6c7cab2fb14e97f72aca5e36 /python/pyqt/pyuic3
parentf1dbff6145c98324ff82e34448b7483727e8ace4 (diff)
downloadtdebindings-479f5f799523bffbcc83dff581a2299c047c6fff.tar.gz
tdebindings-479f5f799523bffbcc83dff581a2299c047c6fff.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1157645 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'python/pyqt/pyuic3')
-rw-r--r--python/pyqt/pyuic3/domtool.cpp166
-rw-r--r--python/pyqt/pyuic3/domtool.h26
-rw-r--r--python/pyqt/pyuic3/embed.cpp64
-rw-r--r--python/pyqt/pyuic3/form.cpp290
-rw-r--r--python/pyqt/pyuic3/globaldefs.h24
-rw-r--r--python/pyqt/pyuic3/main.cpp52
-rw-r--r--python/pyqt/pyuic3/object.cpp270
-rw-r--r--python/pyqt/pyuic3/parser.cpp26
-rw-r--r--python/pyqt/pyuic3/parser.h4
-rw-r--r--python/pyqt/pyuic3/subclassing.cpp56
-rw-r--r--python/pyqt/pyuic3/uic.cpp474
-rw-r--r--python/pyqt/pyuic3/uic.h194
-rw-r--r--python/pyqt/pyuic3/widgetdatabase.cpp210
-rw-r--r--python/pyqt/pyuic3/widgetdatabase.h38
14 files changed, 947 insertions, 947 deletions
diff --git a/python/pyqt/pyuic3/domtool.cpp b/python/pyqt/pyuic3/domtool.cpp
index b3514a06..d083aaae 100644
--- a/python/pyqt/pyuic3/domtool.cpp
+++ b/python/pyqt/pyuic3/domtool.cpp
@@ -20,14 +20,14 @@
#include "domtool.h"
-#include <qsizepolicy.h>
-#include <qcolor.h>
-#include <qcursor.h>
-#include <qdatetime.h>
-#include <qrect.h>
-#include <qsize.h>
-#include <qfont.h>
-#include <qdom.h>
+#include <tqsizepolicy.h>
+#include <tqcolor.h>
+#include <tqcursor.h>
+#include <tqdatetime.h>
+#include <tqrect.h>
+#include <tqsize.h>
+#include <tqfont.h>
+#include <tqdom.h>
/*!
\class DomTool domtool.h
@@ -45,9 +45,9 @@
\sa hasProperty()
*/
-QVariant DomTool::readProperty( const QDomElement& e, const QString& name, const QVariant& defValue, QString& comment )
+TQVariant DomTool::readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue, TQString& comment )
{
- QDomElement n;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "property" ) {
if ( n.attribute( "name" ) != name )
@@ -62,9 +62,9 @@ QVariant DomTool::readProperty( const QDomElement& e, const QString& name, const
/*!
\overload
*/
-QVariant DomTool::readProperty( const QDomElement& e, const QString& name, const QVariant& defValue )
+TQVariant DomTool::readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue )
{
- QString comment;
+ TQString comment;
return readProperty( e, name, defValue, comment );
}
@@ -73,9 +73,9 @@ QVariant DomTool::readProperty( const QDomElement& e, const QString& name, const
\sa readProperty()
*/
-bool DomTool::hasProperty( const QDomElement& e, const QString& name )
+bool DomTool::hasProperty( const TQDomElement& e, const TQString& name )
{
- QDomElement n;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "property" ) {
if ( n.attribute( "name" ) != name )
@@ -86,13 +86,13 @@ bool DomTool::hasProperty( const QDomElement& e, const QString& name )
return FALSE;
}
-QStringList DomTool::propertiesOfType( const QDomElement& e, const QString& type )
+TQStringList DomTool::propertiesOfType( const TQDomElement& e, const TQString& type )
{
- QStringList result;
- QDomElement n;
+ TQStringList result;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "property" ) {
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
if ( n2.tagName() == type )
result += n.attribute( "name" );
}
@@ -101,20 +101,20 @@ QStringList DomTool::propertiesOfType( const QDomElement& e, const QString& type
}
-QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defValue )
+TQVariant DomTool::elementToVariant( const TQDomElement& e, const TQVariant& defValue )
{
- QString dummy;
+ TQString dummy;
return elementToVariant( e, defValue, dummy );
}
/*!
Interprets element \a e as variant and returns the result of the interpretation.
*/
-QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defValue, QString &comment )
+TQVariant DomTool::elementToVariant( const TQDomElement& e, const TQVariant& defValue, TQString &comment )
{
- QVariant v;
+ TQVariant v;
if ( e.tagName() == "rect" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int x = 0, y = 0, w = 0, h = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "x" )
@@ -127,9 +127,9 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
h = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = QVariant( QRect( x, y, w, h ) );
+ v = TQVariant( TQRect( x, y, w, h ) );
} else if ( e.tagName() == "point" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int x = 0, y = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "x" )
@@ -138,9 +138,9 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
y = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = QVariant( QPoint( x, y ) );
+ v = TQVariant( TQPoint( x, y ) );
} else if ( e.tagName() == "size" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int w = 0, h = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "width" )
@@ -149,12 +149,12 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
h = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = QVariant( QSize( w, h ) );
+ v = TQVariant( TQSize( w, h ) );
} else if ( e.tagName() == "color" ) {
- v = QVariant( readColor( e ) );
+ v = TQVariant( readColor( e ) );
} else if ( e.tagName() == "font" ) {
- QDomElement n3 = e.firstChild().toElement();
- QFont f( defValue.toFont() );
+ TQDomElement n3 = e.firstChild().toElement();
+ TQFont f( defValue.toFont() );
while ( !n3.isNull() ) {
if ( n3.tagName() == "family" )
f.setFamily( n3.firstChild().toText().data() );
@@ -170,58 +170,58 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
f.setStrikeOut( n3.firstChild().toText().data().toInt() );
n3 = n3.nextSibling().toElement();
}
- v = QVariant( f );
+ v = TQVariant( f );
} else if ( e.tagName() == "string" ) {
- v = QVariant( e.firstChild().toText().data() );
- QDomElement n = e;
+ v = TQVariant( e.firstChild().toText().data() );
+ TQDomElement n = e;
n = n.nextSibling().toElement();
if ( n.tagName() == "comment" )
comment = n.firstChild().toText().data();
} else if ( e.tagName() == "cstring" ) {
- v = QVariant( QCString( e.firstChild().toText().data() ) );
+ v = TQVariant( TQCString( e.firstChild().toText().data() ) );
} else if ( e.tagName() == "number" ) {
bool ok = TRUE;
- v = QVariant( e.firstChild().toText().data().toInt( &ok ) );
+ v = TQVariant( e.firstChild().toText().data().toInt( &ok ) );
if ( !ok )
- v = QVariant( e.firstChild().toText().data().toDouble() );
+ v = TQVariant( e.firstChild().toText().data().toDouble() );
} else if ( e.tagName() == "bool" ) {
- QString t = e.firstChild().toText().data();
- v = QVariant( t == "true" || t == "1", 0 );
+ TQString t = e.firstChild().toText().data();
+ v = TQVariant( t == "true" || t == "1", 0 );
} else if ( e.tagName() == "pixmap" ) {
- v = QVariant( e.firstChild().toText().data() );
+ v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "iconset" ) {
- v = QVariant( e.firstChild().toText().data() );
+ v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "image" ) {
- v = QVariant( e.firstChild().toText().data() );
+ v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "enum" ) {
- v = QVariant( e.firstChild().toText().data() );
+ v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "set" ) {
- v = QVariant( e.firstChild().toText().data() );
+ v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "sizepolicy" ) {
- QDomElement n3 = e.firstChild().toElement();
- QSizePolicy sp;
+ TQDomElement n3 = e.firstChild().toElement();
+ TQSizePolicy sp;
while ( !n3.isNull() ) {
if ( n3.tagName() == "hsizetype" )
- sp.setHorData( (QSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
+ sp.setHorData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "vsizetype" )
- sp.setVerData( (QSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
+ sp.setVerData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "horstretch" )
sp.setHorStretch( n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "verstretch" )
sp.setVerStretch( n3.firstChild().toText().data().toInt() );
n3 = n3.nextSibling().toElement();
}
- v = QVariant( sp );
+ v = TQVariant( sp );
} else if ( e.tagName() == "cursor" ) {
- v = QVariant( QCursor( e.firstChild().toText().data().toInt() ) );
+ v = TQVariant( TQCursor( e.firstChild().toText().data().toInt() ) );
} else if ( e.tagName() == "stringlist" ) {
- QStringList lst;
- QDomElement n;
+ TQStringList lst;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
lst << n.firstChild().toText().data();
- v = QVariant( lst );
+ v = TQVariant( lst );
} else if ( e.tagName() == "date" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int y, m, d;
y = m = d = 0;
while ( !n3.isNull() ) {
@@ -233,9 +233,9 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
d = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = QVariant( QDate( y, m, d ) );
+ v = TQVariant( TQDate( y, m, d ) );
} else if ( e.tagName() == "time" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int h, m, s;
h = m = s = 0;
while ( !n3.isNull() ) {
@@ -247,9 +247,9 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
s = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = QVariant( QTime( h, m, s ) );
+ v = TQVariant( TQTime( h, m, s ) );
} else if ( e.tagName() == "datetime" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int h, mi, s, y, mo, d ;
h = mi = s = y = mo = d = 0;
while ( !n3.isNull() ) {
@@ -267,7 +267,7 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
d = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = QVariant( QDateTime( QDate( y, mo, d ), QTime( h, mi, s ) ) );
+ v = TQVariant( TQDateTime( TQDate( y, mo, d ), TQTime( h, mi, s ) ) );
}
return v;
}
@@ -276,9 +276,9 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
/*! Returns the color which is returned in the dom element \a e.
*/
-QColor DomTool::readColor( const QDomElement &e )
+TQColor DomTool::readColor( const TQDomElement &e )
{
- QDomElement n = e.firstChild().toElement();
+ TQDomElement n = e.firstChild().toElement();
int r= 0, g = 0, b = 0;
while ( !n.isNull() ) {
if ( n.tagName() == "red" )
@@ -290,7 +290,7 @@ QColor DomTool::readColor( const QDomElement &e )
n = n.nextSibling().toElement();
}
- return QColor( r, g, b );
+ return TQColor( r, g, b );
}
/*!
@@ -300,9 +300,9 @@ QColor DomTool::readColor( const QDomElement &e )
\sa hasAttribute()
*/
-QVariant DomTool::readAttribute( const QDomElement& e, const QString& name, const QVariant& defValue, QString& comment )
+TQVariant DomTool::readAttribute( const TQDomElement& e, const TQString& name, const TQVariant& defValue, TQString& comment )
{
- QDomElement n;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "attribute" ) {
if ( n.attribute( "name" ) != name )
@@ -316,9 +316,9 @@ QVariant DomTool::readAttribute( const QDomElement& e, const QString& name, cons
/*!
\overload
*/
-QVariant DomTool::readAttribute( const QDomElement& e, const QString& name, const QVariant& defValue )
+TQVariant DomTool::readAttribute( const TQDomElement& e, const TQString& name, const TQVariant& defValue )
{
- QString comment;
+ TQString comment;
return readAttribute( e, name, defValue, comment );
}
@@ -327,9 +327,9 @@ QVariant DomTool::readAttribute( const QDomElement& e, const QString& name, cons
\sa readAttribute()
*/
-bool DomTool::hasAttribute( const QDomElement& e, const QString& name )
+bool DomTool::hasAttribute( const TQDomElement& e, const TQString& name )
{
- QDomElement n;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "attribute" ) {
if ( n.attribute( "name" ) != name )
@@ -340,7 +340,7 @@ bool DomTool::hasAttribute( const QDomElement& e, const QString& name )
return FALSE;
}
-static bool toBool( const QString& s )
+static bool toBool( const TQString& s )
{
return s == "true" || s.toInt() != 0;
}
@@ -348,11 +348,11 @@ static bool toBool( const QString& s )
/*!
Convert Qt 2.x format to Qt 3.0 format if necessary
*/
-void DomTool::fixDocument( QDomDocument& doc )
+void DomTool::fixDocument( TQDomDocument& doc )
{
- QDomElement e;
- QDomNode n;
- QDomNodeList nl;
+ TQDomElement e;
+ TQDomNode n;
+ TQDomNodeList nl;
int i = 0;
e = doc.firstChild().toElement();
@@ -368,8 +368,8 @@ void DomTool::fixDocument( QDomDocument& doc )
// in 3.0, we need to fix a spelling error
if ( e.hasAttribute("version") && e.attribute("version").toDouble() == 3.0 ) {
for ( i = 0; i < (int) nl.length(); i++ ) {
- QDomElement el = nl.item(i).toElement();
- QString s = el.attribute( "name" );
+ TQDomElement el = nl.item(i).toElement();
+ TQString s = el.attribute( "name" );
if ( s == "resizeable" ) {
el.removeAttribute( "name" );
el.setAttribute( "name", "resizable" );
@@ -385,8 +385,8 @@ void DomTool::fixDocument( QDomDocument& doc )
e.setAttribute("stdsetdef", 1 );
for ( i = 0; i < (int) nl.length(); i++ ) {
e = nl.item(i).toElement();
- QString name;
- QDomElement n2 = e.firstChild().toElement();
+ TQString name;
+ TQDomElement n2 = e.firstChild().toElement();
if ( n2.tagName() == "name" ) {
name = n2.firstChild().toText().data();
if ( name == "resizeable" )
@@ -410,8 +410,8 @@ void DomTool::fixDocument( QDomDocument& doc )
nl = doc.elementsByTagName( "attribute" );
for ( i = 0; i < (int) nl.length(); i++ ) {
e = nl.item(i).toElement();
- QString name;
- QDomElement n2 = e.firstChild().toElement();
+ TQString name;
+ TQDomElement n2 = e.firstChild().toElement();
if ( n2.tagName() == "name" ) {
name = n2.firstChild().toText().data();
e.setAttribute( "name", name );
@@ -422,8 +422,8 @@ void DomTool::fixDocument( QDomDocument& doc )
nl = doc.elementsByTagName( "image" );
for ( i = 0; i < (int) nl.length(); i++ ) {
e = nl.item(i).toElement();
- QString name;
- QDomElement n2 = e.firstChild().toElement();
+ TQString name;
+ TQDomElement n2 = e.firstChild().toElement();
if ( n2.tagName() == "name" ) {
name = n2.firstChild().toText().data();
e.setAttribute( "name", name );
@@ -434,8 +434,8 @@ void DomTool::fixDocument( QDomDocument& doc )
nl = doc.elementsByTagName( "widget" );
for ( i = 0; i < (int) nl.length(); i++ ) {
e = nl.item(i).toElement();
- QString name;
- QDomElement n2 = e.firstChild().toElement();
+ TQString name;
+ TQDomElement n2 = e.firstChild().toElement();
if ( n2.tagName() == "class" ) {
name = n2.firstChild().toText().data();
e.setAttribute( "class", name );
diff --git a/python/pyqt/pyuic3/domtool.h b/python/pyqt/pyuic3/domtool.h
index 25b795d3..a75e3d3f 100644
--- a/python/pyqt/pyuic3/domtool.h
+++ b/python/pyqt/pyuic3/domtool.h
@@ -21,8 +21,8 @@
#ifndef DOMTOOL_H
#define DOMTOOL_H
-#include <qvariant.h>
-#include <qnamespace.h>
+#include <tqvariant.h>
+#include <tqnamespace.h>
class QDomElement;
class QDomDocument;
@@ -30,17 +30,17 @@ class QDomDocument;
class DomTool : public Qt
{
public:
- static QVariant readProperty( const QDomElement& e, const QString& name, const QVariant& defValue );
- static QVariant readProperty( const QDomElement& e, const QString& name, const QVariant& defValue, QString& comment );
- static bool hasProperty( const QDomElement& e, const QString& name );
- static QStringList propertiesOfType( const QDomElement& e, const QString& type );
- static QVariant elementToVariant( const QDomElement& e, const QVariant& defValue );
- static QVariant elementToVariant( const QDomElement& e, const QVariant& defValue, QString &comment );
- static QVariant readAttribute( const QDomElement& e, const QString& name, const QVariant& defValue );
- static QVariant readAttribute( const QDomElement& e, const QString& name, const QVariant& defValue, QString& comment );
- static bool hasAttribute( const QDomElement& e, const QString& name );
- static QColor readColor( const QDomElement &e );
- static void fixDocument( QDomDocument& );
+ static TQVariant readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue );
+ static TQVariant readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue, TQString& comment );
+ static bool hasProperty( const TQDomElement& e, const TQString& name );
+ static TQStringList propertiesOfType( const TQDomElement& e, const TQString& type );
+ static TQVariant elementToVariant( const TQDomElement& e, const TQVariant& defValue );
+ static TQVariant elementToVariant( const TQDomElement& e, const TQVariant& defValue, TQString &comment );
+ static TQVariant readAttribute( const TQDomElement& e, const TQString& name, const TQVariant& defValue );
+ static TQVariant readAttribute( const TQDomElement& e, const TQString& name, const TQVariant& defValue, TQString& comment );
+ static bool hasAttribute( const TQDomElement& e, const TQString& name );
+ static TQColor readColor( const TQDomElement &e );
+ static void fixDocument( TQDomDocument& );
};
diff --git a/python/pyqt/pyuic3/embed.cpp b/python/pyqt/pyuic3/embed.cpp
index 04f6494c..da1c1d5c 100644
--- a/python/pyqt/pyuic3/embed.cpp
+++ b/python/pyqt/pyuic3/embed.cpp
@@ -21,11 +21,11 @@
**********************************************************************/
#include "uic.h"
-#include <qfile.h>
-#include <qimage.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
-#include <qfileinfo.h>
+#include <tqfile.h>
+#include <tqimage.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
+#include <tqfileinfo.h>
#include <stdio.h>
#include <ctype.h>
@@ -42,17 +42,17 @@ struct EmbedImage
int width, height, depth;
int numColors;
QRgb* colorTable;
- QString name;
- QString cname;
+ TQString name;
+ TQString cname;
bool alpha;
#ifndef QT_NO_IMAGE_COLLECTION_COMPRESSION
ulong compressed;
#endif
};
-static QString convertToCIdentifier( const char *s )
+static TQString convertToCIdentifier( const char *s )
{
- QString r = s;
+ TQString r = s;
int len = r.length();
if ( len > 0 && !isalpha( (char)r[0].latin1() ) )
r[0] = '_';
@@ -64,16 +64,16 @@ static QString convertToCIdentifier( const char *s )
}
-static ulong embedData( QTextStream& out, const uchar* input, int nbytes )
+static ulong embedData( TQTextStream& out, const uchar* input, int nbytes )
{
#ifndef QT_NO_IMAGE_COLLECTION_COMPRESSION
- QByteArray bazip( qCompress( input, nbytes ) );
+ TQByteArray bazip( qCompress( input, nbytes ) );
uint len = bazip.size();
#else
uint len = (uint)nbytes;
#endif
static const char hexdigits[] = "0123456789abcdef";
- QString s;
+ TQString s;
for ( uint i=0; i<len; i++ ) {
if ( (i%14) == 0 ) {
if (i)
@@ -101,7 +101,7 @@ static ulong embedData( QTextStream& out, const uchar* input, int nbytes )
return (ulong)len;
}
-static void embedData( QTextStream& out, const QRgb* input, int n )
+static void embedData( TQTextStream& out, const QRgb* input, int n )
{
out << hex;
const QRgb *v = input;
@@ -116,26 +116,26 @@ static void embedData( QTextStream& out, const QRgb* input, int n )
out << dec; // back to decimal mode
}
-void Uic::embed( QTextStream& out, const char* project, const QStringList& images )
+void Uic::embed( TQTextStream& out, const char* project, const TQStringList& images )
{
- QString cProject = convertToCIdentifier( project );
+ TQString cProject = convertToCIdentifier( project );
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
out << "# Image collection for project '" << project << "'.\n";
out << "#\n";
out << "# Generated from reading image files: \n";
for ( it = images.begin(); it != images.end(); ++it )
out << "# " << *it << "\n";
out << "#\n";
- out << "# Created: " << QDateTime::currentDateTime().toString() << "\n";
+ out << "# Created: " << TQDateTime::currentDateTime().toString() << "\n";
out << "# by: The PyQt User Interface Compiler (pyuic) " << PYQT_VERSION << "\n";
out << "#\n";
out << "# WARNING! All changes made in this file will be lost!\n";
out << "\n";
out << "\n";
- out << "from qt import QImage, QMimeSourceFactory";
+ out << "from qt import TQImage, TQMimeSourceFactory";
#ifndef QT_NO_IMAGE_COLLECTION_COMPRESSION
out << ", qUncompress";
#endif
@@ -144,11 +144,11 @@ void Uic::embed( QTextStream& out, const char* project, const QStringList& image
out << "\n";
- QPtrList<EmbedImage> list_image;
+ TQPtrList<EmbedImage> list_image;
list_image.setAutoDelete( TRUE );
int image_count = 0;
for ( it = images.begin(); it != images.end(); ++it ) {
- QImage img;
+ TQImage img;
if ( !img.load( *it ) ) {
fprintf( stderr, "pyuic: cannot load image file %s\n", (*it).latin1() );
continue;
@@ -161,14 +161,14 @@ void Uic::embed( QTextStream& out, const char* project, const QStringList& image
e->colorTable = new QRgb[e->numColors];
e->alpha = img.hasAlphaBuffer();
memcpy(e->colorTable, img.colorTable(), e->numColors*sizeof(QRgb));
- QFileInfo fi( *it );
+ TQFileInfo fi( *it );
e->name = fi.fileName();
- e->cname = QString("image_%1").arg( image_count++);
+ e->cname = TQString("image_%1").arg( image_count++);
list_image.append( e );
out << "# " << *it << "\n";
- QString s;
+ TQString s;
if ( e->depth == 1 )
- img = img.convertBitOrder(QImage::BigEndian);
+ img = img.convertBitOrder(TQImage::BigEndian);
out << s.sprintf( "%s_data =",
(const char *)e->cname );
#ifndef QT_NO_IMAGE_COLLECTION_COMPRESSION
@@ -230,7 +230,7 @@ void Uic::embed( QTextStream& out, const char* project, const QStringList& image
// Keep the data object alive until we have a deep copy of the image.
out << indent << "data = qUncompress(data).data()\n";
#endif
- out << indent << "img = QImage(data,w,h,depth,colTab,nrCol,QImage.BigEndian).copy()\n";
+ out << indent << "img = TQImage(data,w,h,depth,colTab,nrCol,TQImage.BigEndian).copy()\n";
out << "\n";
out << indent << "if alpha:\n";
++indent;
@@ -241,21 +241,21 @@ void Uic::embed( QTextStream& out, const char* project, const QStringList& image
--indent;
--indent;
out << endl;
- out << indent << "return QImage()\n";
+ out << indent << "return TQImage()\n";
--indent;
out << "\n";
out << "\n";
- out << indent << "class MimeSourceFactory_" << cProject << "(QMimeSourceFactory):\n";
+ out << indent << "class MimeSourceFactory_" << cProject << "(TQMimeSourceFactory):\n";
++indent;
out << indent << "def __init__(self):\n";
++indent;
- out << indent << "QMimeSourceFactory.__init__(self)\n";
+ out << indent << "TQMimeSourceFactory.__init__(self)\n";
out << "\n";
--indent;
out << indent << "def data(self,abs_name):\n";
++indent;
- out << indent << "d = QMimeSourceFactory.data(self,abs_name)\n";
+ out << indent << "d = TQMimeSourceFactory.data(self,abs_name)\n";
out << indent << "if d or abs_name.isNull():\n";
++indent;
out << indent << "return d\n";
@@ -267,7 +267,7 @@ void Uic::embed( QTextStream& out, const char* project, const QStringList& image
out << indent << "self.setImage(abs_name,img)\n";
--indent;
out << "\n";
- out << indent << "return QMimeSourceFactory.data(self,abs_name)\n";
+ out << indent << "return TQMimeSourceFactory.data(self,abs_name)\n";
--indent;
--indent;
out << "\n";
@@ -283,7 +283,7 @@ void Uic::embed( QTextStream& out, const char* project, const QStringList& image
out << indent << "if factory is None:\n";
++indent;
out << indent << "factory = MimeSourceFactory_" << cProject << "()\n";
- out << indent << "QMimeSourceFactory.defaultFactory().addFactory(factory)\n";
+ out << indent << "TQMimeSourceFactory.defaultFactory().addFactory(factory)\n";
--indent;
--indent;
out << "\n";
@@ -295,7 +295,7 @@ void Uic::embed( QTextStream& out, const char* project, const QStringList& image
out << "\n";
out << indent << "if factory is not None:\n";
++indent;
- out << indent << "QMimeSourceFactory.defaultFactory().removeFactory(factory)\n";
+ out << indent << "TQMimeSourceFactory.defaultFactory().removeFactory(factory)\n";
out << indent << "factory = None\n";
--indent;
--indent;
diff --git a/python/pyqt/pyuic3/form.cpp b/python/pyqt/pyuic3/form.cpp
index aedb4ac2..ca68db39 100644
--- a/python/pyqt/pyuic3/form.cpp
+++ b/python/pyqt/pyuic3/form.cpp
@@ -23,10 +23,10 @@
#include "parser.h"
#include "widgetdatabase.h"
#include "domtool.h"
-#include <qstringlist.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
+#include <tqstringlist.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
#define NO_STATIC_COLORS
#include <globaldefs.h>
@@ -34,7 +34,7 @@
#include <zlib.h>
#endif
-static QByteArray unzipXPM( QString data, ulong& length )
+static TQByteArray unzipXPM( TQString data, ulong& length )
{
#if QT_VERSION >= 0x030100
const int lengthOffset = 4;
@@ -61,7 +61,7 @@ static QByteArray unzipXPM( QString data, ulong& length )
ba[1] = ( length & 0x00ff0000 ) >> 16;
ba[2] = ( length & 0x0000ff00 ) >> 8;
ba[3] = ( length & 0x000000ff );
- QByteArray baunzip = qUncompress( ba, baSize );
+ TQByteArray baunzip = qUncompress( ba, baSize );
delete[] ba;
return baunzip;
#else
@@ -94,7 +94,7 @@ static QByteArray unzipXPM( QString data, ulong& length )
// crashes in some cases of slightly corrupt UIC files.
if ( length < data.length() * 5 )
length = data.length() * 5;
- QByteArray baunzip( length );
+ TQByteArray baunzip( length );
::uncompress( (uchar*) baunzip.data(), &length, ba, data.length()/2 );
delete[] ba;
return baunzip;
@@ -108,27 +108,27 @@ static QByteArray unzipXPM( QString data, ulong& length )
\sa createFormDecl(), createObjectImpl()
*/
-void Uic::createFormImpl( const QDomElement &e )
+void Uic::createFormImpl( const TQDomElement &e )
{
- QDomElement n;
- QDomNodeList nl;
+ TQDomElement n;
+ TQDomNodeList nl;
int i;
- QString objClass = getClassName( e );
+ TQString objClass = getClassName( e );
if ( objClass.isEmpty() )
return;
- QString objName = getObjectName( e );
+ TQString objName = getObjectName( e );
// generate local and local includes required
- QStringList globalIncludes;
- QStringList::Iterator it;
- QStringList sqlClasses;
- QStringList axwidgets, databrowsers;
+ TQStringList globalIncludes;
+ TQStringList::Iterator it;
+ TQStringList sqlClasses;
+ TQStringList axwidgets, databrowsers;
- QMap<QString, CustomInclude> customWidgetIncludes;
- QMap<QString, QString> functionImpls;
+ TQMap<TQString, CustomInclude> customWidgetIncludes;
+ TQMap<TQString, TQString> functionImpls;
// find additional slots and functions
- QStringList extraSlots;
- QStringList extraSlotTypes;
+ TQStringList extraSlots;
+ TQStringList extraSlotTypes;
nl = e.parentNode().toElement().elementsByTagName( "slot" );
for ( i = 0; i < (int) nl.length(); i++ ) {
n = nl.item(i).toElement();
@@ -137,7 +137,7 @@ void Uic::createFormImpl( const QDomElement &e )
continue;
if ( n.attribute( "language", "C++" ) != "C++" )
continue;
- QString slotName = n.firstChild().toText().data().stripWhiteSpace();
+ TQString slotName = n.firstChild().toText().data().stripWhiteSpace();
if ( slotName.endsWith( ";" ) )
slotName = slotName.left( slotName.length() - 1 );
@@ -147,9 +147,9 @@ void Uic::createFormImpl( const QDomElement &e )
for ( n = e; !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "functions" ) { // compatibility
- for ( QDomElement n2 = n.firstChild().toElement(); !n2.isNull(); n2 = n2.nextSibling().toElement() ) {
+ for ( TQDomElement n2 = n.firstChild().toElement(); !n2.isNull(); n2 = n2.nextSibling().toElement() ) {
if ( n2.tagName() == "function" ) {
- QString fname = n2.attribute( "name" );
+ TQString fname = n2.attribute( "name" );
fname = Parser::cleanArgs( fname );
functionImpls.insert( fname, n2.firstChild().toText().data() );
}
@@ -160,11 +160,11 @@ void Uic::createFormImpl( const QDomElement &e )
// additional includes (local or global ) and forward declaractions
nl = e.parentNode().toElement().elementsByTagName( "include" );
for ( i = 0; i < (int) nl.length(); i++ ) {
- QDomElement n2 = nl.item(i).toElement();
+ TQDomElement n2 = nl.item(i).toElement();
- QString s = n2.firstChild().toText().data();
+ TQString s = n2.firstChild().toText().data();
if ( n2.attribute( "location" ) != "local" ) {
- if ( s.right( 5 ) == ".ui.h" && !QFile::exists( s ) )
+ if ( s.right( 5 ) == ".ui.h" && !TQFile::exists( s ) )
continue;
if ( n2.attribute( "impldecl", "in implementation" ) != "in implementation" )
continue;
@@ -173,32 +173,32 @@ void Uic::createFormImpl( const QDomElement &e )
}
// do the local includes afterwards, since global includes have priority on clashes
- QFileInfo fi(fileName);
+ TQFileInfo fi(fileName);
for ( i = 0; i < (int) nl.length(); i++ ) {
- QDomElement n2 = nl.item(i).toElement();
- QString s = n2.firstChild().toText().data();
+ TQDomElement n2 = nl.item(i).toElement();
+ TQString s = n2.firstChild().toText().data();
if ( n2.attribute( "location" ) == "local" &&!globalIncludes.contains( s ) ) {
if ( s.right( 5 ) != ".ui.h" )
continue;
- if ( !QFile::exists( s ) )
+ if ( !TQFile::exists( s ) )
{
s = fi.dirPath() + "/" + s;
- if ( !QFile::exists( s ) )
+ if ( !TQFile::exists( s ) )
continue;
}
- if ( QFile::exists( s ) )
+ if ( TQFile::exists( s ) )
{
- QFile f(s);
+ TQFile f(s);
f.open(IO_ReadOnly);
- QTextStream headerStream(&f);
- QString line;
- QString functionText;
- QString functionName;
- QRegExp rx("void .*::(.*\\(.*\\))");
+ TQTextStream headerStream(&f);
+ TQString line;
+ TQString functionText;
+ TQString functionName;
+ TQRegExp rx("void .*::(.*\\(.*\\))");
int pos, inFunction = 0;
while (line = headerStream.readLine())
@@ -226,8 +226,8 @@ void Uic::createFormImpl( const QDomElement &e )
// additional custom widget headers
nl = e.parentNode().toElement().elementsByTagName( "header" );
for ( i = 0; i < (int) nl.length(); i++ ) {
- QDomElement n2 = nl.item(i).toElement();
- QString s = n2.firstChild().toText().data();
+ TQDomElement n2 = nl.item(i).toElement();
+ TQString s = n2.firstChild().toText().data();
if ( n2.attribute( "location" ) != "local" )
globalIncludes += s;
}
@@ -236,29 +236,29 @@ void Uic::createFormImpl( const QDomElement &e )
for ( it = tags.begin(); it != tags.end(); ++it ) {
nl = e.parentNode().toElement().elementsByTagName( *it );
for ( i = 1; i < (int) nl.length(); i++ ) { // start at 1, 0 is the toplevel widget
- QString name = getClassName( nl.item(i).toElement() );
+ TQString name = getClassName( nl.item(i).toElement() );
if ( name == "Spacer" ) {
- globalIncludes += "qlayout.h";
- globalIncludes += "qapplication.h";
+ globalIncludes += "tqlayout.h";
+ globalIncludes += "tqapplication.h";
continue;
}
if ( name.mid( 1 ) == "ListView" )
- globalIncludes += "qheader.h";
+ globalIncludes += "tqheader.h";
else if ( name == "QAxWidget" )
axwidgets += getObjectName(nl.item(i).toElement());
- else if ( name == "QDataBrowser" )
+ else if ( name == "TQDataBrowser" )
databrowsers += getObjectName(nl.item(i).toElement());
if ( name != objClass ) {
int wid = WidgetDatabase::idFromClassName( name );
- QMap<QString, CustomInclude>::Iterator it = customWidgetIncludes.find( name );
+ TQMap<TQString, CustomInclude>::Iterator it = customWidgetIncludes.find( name );
if ( it == customWidgetIncludes.end() )
globalIncludes += WidgetDatabase::includeFile( wid );
}
}
}
- if (globalIncludes.findIndex("qtable.h") >= 0)
- out << indent << "from qttable import QTable" << endl;
+ if (globalIncludes.findIndex("tqtable.h") >= 0)
+ out << indent << "from qttable import TQTable" << endl;
if (!axwidgets.empty())
out << indent << "from qtaxcontainer import QAxWidget" << endl;
@@ -269,9 +269,9 @@ void Uic::createFormImpl( const QDomElement &e )
registerDatabases( e );
dbConnections = unique( dbConnections );
if ( dbConnections.count() )
- sqlClasses += "QSqlDatabase";
+ sqlClasses += "TQSqlDatabase";
if ( dbCursors.count() )
- sqlClasses += "QSqlCursor";
+ sqlClasses += "TQSqlCursor";
bool dbForm = FALSE;
if ( dbForms[ "(default)" ].count() )
dbForm = TRUE;
@@ -285,21 +285,21 @@ void Uic::createFormImpl( const QDomElement &e )
}
}
if ( dbForm || subDbForms ) {
- sqlClasses += "QSqlForm";
- sqlClasses += "QSqlRecord";
+ sqlClasses += "TQSqlForm";
+ sqlClasses += "TQSqlRecord";
}
- if (globalIncludes.findIndex("qdatatable.h") >= 0)
- sqlClasses += "QDataTable";
+ if (globalIncludes.findIndex("tqdatatable.h") >= 0)
+ sqlClasses += "TQDataTable";
if (globalIncludes.findIndex("qtableview.h") >= 0)
sqlClasses += "QTableView";
- if (globalIncludes.findIndex("qdatabrowser.h") >= 0)
- sqlClasses += "QDataBrowser";
+ if (globalIncludes.findIndex("tqdatabrowser.h") >= 0)
+ sqlClasses += "TQDataBrowser";
- if (globalIncludes.findIndex("qdataview.h") >= 0)
- sqlClasses += "QDataView";
+ if (globalIncludes.findIndex("tqdataview.h") >= 0)
+ sqlClasses += "TQDataView";
if ( !sqlClasses.empty() ) {
out << indent << "from qtsql import";
@@ -320,12 +320,12 @@ void Uic::createFormImpl( const QDomElement &e )
out << endl;
// find out what images are required
- QStringList requiredImages;
+ TQStringList requiredImages;
static const char *imgTags[] = { "pixmap", "iconset", 0 };
for ( i = 0; imgTags[i] != 0; i++ ) {
nl = e.parentNode().toElement().elementsByTagName( imgTags[i] );
for ( int j = 0; j < (int) nl.length(); j++ ) {
- QDomNode nn = nl.item(j);
+ TQDomNode nn = nl.item(j);
while ( nn.parentNode() != e.parentNode() )
nn = nn.parentNode();
if ( nn.nodeName() != "customwidgets" )
@@ -336,26 +336,26 @@ void Uic::createFormImpl( const QDomElement &e )
// register the object and unify its name
objName = registerObject( objName );
- QStringList images;
- QStringList xpmImages;
+ TQStringList images;
+ TQStringList xpmImages;
if ( pixmapLoaderFunction.isEmpty() && !externPixmaps ) {
// create images
for ( n = e; !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "images" ) {
nl = n.elementsByTagName( "image" );
for ( i = 0; i < (int) nl.length(); i++ ) {
- QString img = registerObject( nl.item(i).toElement().attribute( "name" ) );
+ TQString img = registerObject( nl.item(i).toElement().attribute( "name" ) );
if ( !requiredImages.contains( img ) )
continue;
- QDomElement tmp = nl.item(i).firstChild().toElement();
+ TQDomElement tmp = nl.item(i).firstChild().toElement();
if ( tmp.tagName() != "data" )
continue;
- QString format = tmp.attribute("format", "PNG" );
- QString data = tmp.firstChild().toText().data();
+ TQString format = tmp.attribute("format", "PNG" );
+ TQString data = tmp.firstChild().toText().data();
if ( format == "XPM.GZ" ) {
xpmImages += img;
ulong length = tmp.attribute("length").toULong();
- QByteArray baunzip = unzipXPM( data, length );
+ TQByteArray baunzip = unzipXPM( data, length );
length = baunzip.size();
// shouldn't we test the initial `length' against the
// resulting `length' to catch corrupt UIC files?
@@ -383,11 +383,11 @@ void Uic::createFormImpl( const QDomElement &e )
out << indent << "\"";
int a ;
for ( a = 0; a < (int) (data.length()/2)-1; a++ ) {
- out << "\\x" << QString(data[2*a]) << QString(data[2*a+1]);
+ out << "\\x" << TQString(data[2*a]) << TQString(data[2*a+1]);
if ( a % 12 == 11 )
out << "\" \\" << endl << indent << "\"";
}
- out << "\\x" << QString(data[2*a]) << QString(data[2*a+1]) << "\"" << endl;
+ out << "\\x" << TQString(data[2*a]) << TQString(data[2*a+1]) << "\"" << endl;
--indent;
}
}
@@ -396,16 +396,16 @@ void Uic::createFormImpl( const QDomElement &e )
out << endl;
} else if ( externPixmaps ) {
#if QT_VERSION >= 0x030100
- pixmapLoaderFunction = "QPixmap.fromMimeSource";
+ pixmapLoaderFunction = "TQPixmap.fromMimeSource";
#else
out << indent << "def uic_load_pixmap_" << objName << "(name):" << endl;
++indent;
- out << indent << "pix = QPixmap()" << endl;
- out << indent << "m = QMimeSourceFactory.defaultFactory().data(name)" << endl;
+ out << indent << "pix = TQPixmap()" << endl;
+ out << indent << "m = TQMimeSourceFactory.defaultFactory().data(name)" << endl;
out << endl;
out << indent << "if m:" << endl;
++indent;
- out << indent << "QImageDrag.decode(m,pix)" << endl;
+ out << indent << "TQImageDrag.decode(m,pix)" << endl;
--indent;
out << endl;
out << indent << "return pix" << endl;
@@ -422,15 +422,15 @@ void Uic::createFormImpl( const QDomElement &e )
out << indent << "class " << nameOfClass << "(" << objClass << "):" << endl;
++indent;
- if ( objClass == "QDialog" || objClass == "QWizard" ) {
+ if ( objClass == "TQDialog" || objClass == "TQWizard" ) {
out << indent << "def __init__(self,parent = None,name = None,modal = 0,fl = 0):" << endl;
++indent;
out << indent << objClass << ".__init__(self,parent,name,modal,fl)" << endl;
- } else if ( objClass == "QWidget" ) {
+ } else if ( objClass == "TQWidget" ) {
out << indent << "def __init__(self,parent = None,name = None,fl = 0):" << endl;
++indent;
out << indent << objClass << ".__init__(self,parent,name,fl)" << endl;
- } else if ( objClass == "QMainWindow" ) {
+ } else if ( objClass == "TQMainWindow" ) {
out << indent << "def __init__(self,parent = None,name = None,fl = 0):" << endl;
++indent;
out << indent << objClass << ".__init__(self,parent,name,fl)" << endl;
@@ -446,37 +446,37 @@ void Uic::createFormImpl( const QDomElement &e )
// create pixmaps for all images
if ( !images.isEmpty() ) {
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = images.begin(); it != images.end(); ++it ) {
- out << indent << "self." << (*it) << " = QPixmap()" << endl;
+ out << indent << "self." << (*it) << " = TQPixmap()" << endl;
out << indent << "self." << (*it) << ".loadFromData(" << (*it) << "_data,\"PNG\")" << endl;
}
}
// create pixmaps for all images
if ( !xpmImages.isEmpty() ) {
for ( it = xpmImages.begin(); it != xpmImages.end(); ++it ) {
- out << indent << "self." << (*it) << " = QPixmap(" << (*it) << "_data)" << endl;
+ out << indent << "self." << (*it) << " = TQPixmap(" << (*it) << "_data)" << endl;
}
out << endl;
}
// set the properties
- QSize geometry( 0, 0 );
+ TQSize geometry( 0, 0 );
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "property" ) {
bool stdset = stdsetdef;
if ( n.hasAttribute( "stdset" ) )
stdset = toBool( n.attribute( "stdset" ) );
- QString prop = n.attribute("name");
- QDomElement n2 = n.firstChild().toElement();
- QString value = setObjectProperty( objClass, QString::null, prop, n2, stdset );
+ TQString prop = n.attribute("name");
+ TQDomElement n2 = n.firstChild().toElement();
+ TQString value = setObjectProperty( objClass, TQString::null, prop, n2, stdset );
if ( value.isEmpty() )
continue;
if ( prop == "geometry" && n2.tagName() == "rect") {
- QDomElement n3 = n2.firstChild().toElement();
+ TQDomElement n3 = n2.firstChild().toElement();
while ( !n3.isNull() ) {
if ( n3.tagName() == "width" )
geometry.setWidth( n3.firstChild().toText().data().toInt() );
@@ -485,11 +485,11 @@ void Uic::createFormImpl( const QDomElement &e )
n3 = n3.nextSibling().toElement();
}
} else {
- QString call;
+ TQString call;
if ( stdset )
call = "self." + mkStdSet( prop ) + "(" + value + ")";
else
- call = "self.setProperty(\"" + prop + "\",QVariant(" + value + "))";
+ call = "self.setProperty(\"" + prop + "\",TQVariant(" + value + "))";
if ( n2.tagName() == "string" ) {
trout << trindent << call << endl;
@@ -510,15 +510,15 @@ void Uic::createFormImpl( const QDomElement &e )
// create all children, some forms have special requirements
- if ( objClass == "QWizard" ) {
+ if ( objClass == "TQWizard" ) {
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( tags.contains( n.tagName() ) ) {
- QString page = createObjectImpl( n, objClass, "self" );
- QString comment;
- QString label = DomTool::readAttribute( n, "title", "", comment ).toString();
- out << indent << "self.addPage(" << page << ",QString(\"\"))" << endl;
+ TQString page = createObjectImpl( n, objClass, "self" );
+ TQString comment;
+ TQString label = DomTool::readAttribute( n, "title", "", comment ).toString();
+ out << indent << "self.addPage(" << page << ",TQString(\"\"))" << endl;
trout << trindent << "self.setTitle(" << page << ","<< trcall( label, comment ) << ")" << endl;
- QVariant def( FALSE, 0 );
+ TQVariant def( FALSE, 0 );
if ( DomTool::hasAttribute( n, "backEnabled" ) )
out << indent << "self.setBackEnabled(" << page << "," << mkBool( DomTool::readAttribute( n, "backEnabled", def).toBool() ) << ")" << endl;
if ( DomTool::hasAttribute( n, "nextEnabled" ) )
@@ -544,20 +544,20 @@ void Uic::createFormImpl( const QDomElement &e )
out << endl;
for ( it = dbConnections.begin(); it != dbConnections.end(); ++it ) {
if ( !(*it).isEmpty() && (*it) != "(default)") {
- out << indent << "self." << (*it) << "Connection = QSqlDatabase.database(\"" <<(*it) << "\")" << endl;
+ out << indent << "self." << (*it) << "Connection = TQSqlDatabase.database(\"" <<(*it) << "\")" << endl;
}
}
nl = e.parentNode().toElement().elementsByTagName( "widget" );
for ( i = 1; i < (int) nl.length(); i++ ) { // start at 1, 0 is the toplevel widget
n = nl.item(i).toElement();
- QString s = getClassName( n );
- if ( (dbForm || subDbForms) && (s == "QDataBrowser" || s == "QDataView") ) {
- QString objName = getObjectName( n );
- QString tab = getDatabaseInfo( n, "table" );
- QString con = getDatabaseInfo( n, "connection" );
- out << indent << objName << "Form = QSqlForm(self,\"" << objName << "Form\")" << endl;
- QDomElement n2;
+ TQString s = getClassName( n );
+ if ( (dbForm || subDbForms) && (s == "TQDataBrowser" || s == "TQDataView") ) {
+ TQString objName = getObjectName( n );
+ TQString tab = getDatabaseInfo( n, "table" );
+ TQString con = getDatabaseInfo( n, "connection" );
+ out << indent << objName << "Form = TQSqlForm(self,\"" << objName << "Form\")" << endl;
+ TQDomElement n2;
for ( n2 = n.firstChild().toElement(); !n2.isNull(); n2 = n2.nextSibling().toElement() )
createFormImpl( n2, objName, con, tab );
out << indent << "self." << objName << ".setForm(" << objName << "Form)" << endl;
@@ -605,7 +605,7 @@ void Uic::createFormImpl( const QDomElement &e )
// take minimumSizeHint() into account, for height-for-width widgets
if ( !geometry.isNull() ) {
- out << indent << "self.resize(QSize(" << geometry.width() << ","
+ out << indent << "self.resize(TQSize(" << geometry.width() << ","
<< geometry.height() <<").expandedTo(self.minimumSizeHint()))" << endl;
out << indent << "self.clearWState(Qt.WState_Polished)" << endl;
}
@@ -616,8 +616,8 @@ void Uic::createFormImpl( const QDomElement &e )
out << endl;
nl = n.elementsByTagName( "connection" );
for ( i = 0; i < (int) nl.length(); i++ ) {
- QString sender, receiver, signal, slot;
- for ( QDomElement n2 = nl.item(i).firstChild().toElement(); !n2.isNull(); n2 = n2.nextSibling().toElement() ) {
+ TQString sender, receiver, signal, slot;
+ for ( TQDomElement n2 = nl.item(i).firstChild().toElement(); !n2.isNull(); n2 = n2.nextSibling().toElement() ) {
if ( n2.tagName() == "sender" )
sender = n2.firstChild().toText().data();
else if ( n2.tagName() == "receiver" )
@@ -656,17 +656,17 @@ void Uic::createFormImpl( const QDomElement &e )
receiver = "self." + receiver;
out << indent << "self.connect(" << sender
- << ",SIGNAL(\"" << signal << "\")," << receiver;
+ << ",TQT_SIGNAL(\"" << signal << "\")," << receiver;
- // Normally we never use the SLOT() macro in case the
+ // Normally we never use the TQT_SLOT() macro in case the
// connection is to a method of a Python custom widget. The
// exception is if the receiver is a QAxWidget where it must be
// used because the slots are dynamic.
if (isaxwidget)
- out << ",SLOT(\"" << slot << "\")";
+ out << ",TQT_SLOT(\"" << slot << "\")";
else
{
- QString mname = slot.left(slot.find('('));
+ TQString mname = slot.left(slot.find('('));
// Rename slots that have different names in PyQt.
if (isdatabrowser && mname == "del")
@@ -680,11 +680,11 @@ void Uic::createFormImpl( const QDomElement &e )
} else if ( n.tagName() == "tabstops" ) {
// setup tab order
out << endl;
- QString lastName;
- QDomElement n2 = n.firstChild().toElement();
+ TQString lastName;
+ TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
if ( n2.tagName() == "tabstop" ) {
- QString name = n2.firstChild().toText().data();
+ TQString name = n2.firstChild().toText().data();
name = registeredName( name );
if ( !lastName.isEmpty() )
out << indent << "self.setTabOrder(self." << lastName << ",self." << name << ")" << endl;
@@ -697,7 +697,7 @@ void Uic::createFormImpl( const QDomElement &e )
// buddies
bool firstBuddy = TRUE;
- for ( QValueList<Buddy>::Iterator buddy = buddies.begin(); buddy != buddies.end(); ++buddy ) {
+ for ( TQValueList<Buddy>::Iterator buddy = buddies.begin(); buddy != buddies.end(); ++buddy ) {
if ( isObjectRegistered( (*buddy).buddy ) ) {
if ( firstBuddy ) {
out << endl;
@@ -731,13 +731,13 @@ void Uic::createFormImpl( const QDomElement &e )
for ( i = 0; i < (int) nl.length(); i++ ) {
if ( !DomTool::propertiesOfType( nl.item(i).toElement() , "font" ).isEmpty() )
needFontEventHandler = TRUE;
- QString s = getClassName( nl.item(i).toElement() );
- if ( s == "QDataTable" || s == "QDataBrowser" ) {
+ TQString s = getClassName( nl.item(i).toElement() );
+ if ( s == "TQDataTable" || s == "TQDataBrowser" ) {
if ( !isFrameworkCodeGenerated( nl.item(i).toElement() ) )
continue;
- if ( s == "QDataTable" )
+ if ( s == "TQDataTable" )
needSqlTableEventHandler = TRUE;
- if ( s == "QDataBrowser" )
+ if ( s == "TQDataBrowser" )
needSqlDataBrowserEventHandler = TRUE;
}
if ( needFontEventHandler && needSqlTableEventHandler && needSqlDataBrowserEventHandler )
@@ -749,15 +749,15 @@ void Uic::createFormImpl( const QDomElement &e )
out << " * Main event handler. Reimplemented to handle" << endl;
out << " * application font changes";
out << " */" << endl;
- out << "bool " << nameOfClass << "::event( QEvent* ev )" << endl;
+ out << "bool " << nameOfClass << "::event( TQEvent* ev )" << endl;
out << "{" << endl;
out << " bool ret = " << objClass << "::event( ev ); " << endl;
if ( needFontEventHandler ) {
++indent;
- out << " if ( ev->type() == QEvent::ApplicationFontChange ) {" << endl;
+ out << " if ( ev->type() == TQEvent::ApplicationFontChange ) {" << endl;
for ( i = 0; i < (int) nl.length(); i++ ) {
n = nl.item(i).toElement();
- QStringList list = DomTool::propertiesOfType( n, "font" );
+ TQStringList list = DomTool::propertiesOfType( n, "font" );
for ( it = list.begin(); it != list.end(); ++it )
createExclusiveProperty( n, *it );
}
@@ -779,12 +779,12 @@ void Uic::createFormImpl( const QDomElement &e )
++indent;
if ( needSqlTableEventHandler ) {
for ( i = 0; i < (int) nl.length(); i++ ) {
- QString s = getClassName( nl.item(i).toElement() );
- if ( s == "QDataTable" ) {
+ TQString s = getClassName( nl.item(i).toElement() );
+ if ( s == "TQDataTable" ) {
n = nl.item(i).toElement();
- QString c = getObjectName( n );
- QString conn = getDatabaseInfo( n, "connection" );
- QString tab = getDatabaseInfo( n, "table" );
+ TQString c = getObjectName( n );
+ TQString conn = getDatabaseInfo( n, "connection" );
+ TQString tab = getDatabaseInfo( n, "table" );
if ( !( conn.isEmpty() || tab.isEmpty() || !isFrameworkCodeGenerated( nl.item(i).toElement() ) ) ) {
out << indent << "if self." << c << ":" << endl;
++indent;
@@ -793,19 +793,19 @@ void Uic::createFormImpl( const QDomElement &e )
out << indent << "if not cursor:" << endl;
++indent;
if ( conn == "(default)" )
- out << indent << "cursor = QSqlCursor(\"" << tab << "\")" << endl;
+ out << indent << "cursor = TQSqlCursor(\"" << tab << "\")" << endl;
else
- out << indent << "cursor = QSqlCursor(\"" << tab << "\",1,self." << conn << "Connection)" << endl;
+ out << indent << "cursor = TQSqlCursor(\"" << tab << "\",1,self." << conn << "Connection)" << endl;
out << indent << "if self." << c << ".isReadOnly():" << endl;
++indent;
- out << indent << "cursor.setMode(QSqlCursor.ReadOnly)" << endl;
+ out << indent << "cursor.setMode(TQSqlCursor.ReadOnly)" << endl;
--indent;
out << indent << "self." << c << ".setSqlCursor(cursor,0,1)" << endl;
--indent;
out << endl;
out << indent << "if not cursor.isActive():" << endl;
++indent;
- out << indent << "self." << c << ".refresh(QDataTable.RefreshAll)" << endl;
+ out << indent << "self." << c << ".refresh(TQDataTable.RefreshAll)" << endl;
--indent;
--indent;
}
@@ -815,12 +815,12 @@ void Uic::createFormImpl( const QDomElement &e )
if ( needSqlDataBrowserEventHandler ) {
nl = e.elementsByTagName( "widget" );
for ( i = 0; i < (int) nl.length(); i++ ) {
- QString s = getClassName( nl.item(i).toElement() );
- if ( s == "QDataBrowser" ) {
- QString obj = getObjectName( nl.item(i).toElement() );
- QString tab = getDatabaseInfo( nl.item(i).toElement(),
+ TQString s = getClassName( nl.item(i).toElement() );
+ if ( s == "TQDataBrowser" ) {
+ TQString obj = getObjectName( nl.item(i).toElement() );
+ TQString tab = getDatabaseInfo( nl.item(i).toElement(),
"table" );
- QString conn = getDatabaseInfo( nl.item(i).toElement(),
+ TQString conn = getDatabaseInfo( nl.item(i).toElement(),
"connection" );
if ( !(tab.isEmpty() || !isFrameworkCodeGenerated( nl.item(i).toElement() ) ) ) {
out << indent << "if self." << obj << ":" << endl;
@@ -828,9 +828,9 @@ void Uic::createFormImpl( const QDomElement &e )
out << indent << "if not self." << obj << ".sqlCursor():" << endl;
++indent;
if ( conn == "(default)" )
- out << indent << "cursor = QSqlCursor(\"" << tab << "\")" << endl;
+ out << indent << "cursor = TQSqlCursor(\"" << tab << "\")" << endl;
else
- out << indent << "cursor = QSqlCursor(\"" << tab << "\",1,self." << conn << "Connection)" << endl;
+ out << indent << "cursor = TQSqlCursor(\"" << tab << "\",1,self." << conn << "Connection)" << endl;
out << indent << "self." << obj << ".setSqlCursor(cursor,1)" << endl;
out << indent << "self." << obj << ".refresh()" << endl;
out << indent << "self." << obj << ".first()" << endl;
@@ -853,22 +853,22 @@ void Uic::createFormImpl( const QDomElement &e )
// create stubs for additional slots if necessary
if ( !extraSlots.isEmpty() && writeFunctImpl ) {
- QStringList::ConstIterator cit;
+ TQStringList::ConstIterator cit;
for ( cit = extraSlots.begin(); cit != extraSlots.end(); ++cit ) {
pySlot(cit);
bool createWarning = TRUE;
- QString fname = Parser::cleanArgs( *cit );
- QMap<QString, QString>::Iterator fit = functionImpls.find( fname );
+ TQString fname = Parser::cleanArgs( *cit );
+ TQMap<TQString, TQString>::Iterator fit = functionImpls.find( fname );
if ( fit != functionImpls.end() ) {
int begin = (*fit).find( "{" );
- QString body = (*fit).mid( begin + 1, (*fit).findRev( "}" ) - begin - 1 );
+ TQString body = (*fit).mid( begin + 1, (*fit).findRev( "}" ) - begin - 1 );
createWarning = body.simplifyWhiteSpace().isEmpty();
if ( !createWarning )
{
++indent;
- QString formatted_body = body.replace(QRegExp("\n"), QString("\n") + QString(indent));
+ TQString formatted_body = body.replace(TQRegExp("\n"), TQString("\n") + TQString(indent));
out << formatted_body << endl;
--indent;
}
@@ -895,17 +895,17 @@ void Uic::createFormImpl( const QDomElement &e )
Traverses recursively over all children.
*/
-void Uic::createFormImpl( const QDomElement& e, const QString& form, const QString& connection, const QString& table )
+void Uic::createFormImpl( const TQDomElement& e, const TQString& form, const TQString& connection, const TQString& table )
{
if ( e.tagName() == "widget" &&
- e.attribute( "class" ) != "QDataTable" ) {
- QString field = getDatabaseInfo( e, "field" );
+ e.attribute( "class" ) != "TQDataTable" ) {
+ TQString field = getDatabaseInfo( e, "field" );
if ( !field.isEmpty() ) {
if ( isWidgetInTable( e, connection, table ) )
out << indent << form << "Form.insert(self." << getObjectName( e ) << "," << fixString( field ) << ")" << endl;
}
}
- QDomElement n;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
createFormImpl( n, form, connection, table );
}
@@ -914,7 +914,7 @@ void Uic::createFormImpl( const QDomElement& e, const QString& form, const QStri
// Generate a Python slot definition.
-void Uic::pySlot(QStringList::ConstIterator &it)
+void Uic::pySlot(TQStringList::ConstIterator &it)
{
out << endl;
@@ -925,7 +925,7 @@ void Uic::pySlot(QStringList::ConstIterator &it)
// remove the types - too complicated for the moment, so we just count them
// and give them names based on their position.
- QString args = (*it).mid(astart + 1,(*it).find(')') - astart - 1).stripWhiteSpace();
+ TQString args = (*it).mid(astart + 1,(*it).find(')') - astart - 1).stripWhiteSpace();
if (!args.isEmpty()) {
int nrargs = args.contains(',') + 1;
diff --git a/python/pyqt/pyuic3/globaldefs.h b/python/pyqt/pyuic3/globaldefs.h
index 4ae0cd83..87fafbef 100644
--- a/python/pyqt/pyuic3/globaldefs.h
+++ b/python/pyqt/pyuic3/globaldefs.h
@@ -21,16 +21,16 @@
#ifndef GLOBALDEFS_H
#define GLOBALDEFS_H
-#include <qcolor.h>
-#include <qapplication.h>
+#include <tqcolor.h>
+#include <tqapplication.h>
#define BOXLAYOUT_DEFAULT_MARGIN 11
#define BOXLAYOUT_DEFAULT_SPACING 6
#ifndef NO_STATIC_COLORS
-static QColor *backColor1 = 0;
-static QColor *backColor2 = 0;
-static QColor *selectedBack = 0;
+static TQColor *backColor1 = 0;
+static TQColor *backColor2 = 0;
+static TQColor *selectedBack = 0;
static void init_colors()
{
@@ -38,17 +38,17 @@ static void init_colors()
return;
#if 0 // a calculated alternative for backColor1
- QColorGroup myCg = qApp->palette().active();
+ TQColorGroup myCg = qApp->palette().active();
int h1, s1, v1;
int h2, s2, v2;
- myCg.color( QColorGroup::Base ).hsv( &h1, &s1, &v1 );
- myCg.color( QColorGroup::Background ).hsv( &h2, &s2, &v2 );
- QColor c( h1, s1, ( v1 + v2 ) / 2, QColor::Hsv );
+ myCg.color( TQColorGroup::Base ).hsv( &h1, &s1, &v1 );
+ myCg.color( TQColorGroup::Background ).hsv( &h2, &s2, &v2 );
+ TQColor c( h1, s1, ( v1 + v2 ) / 2, TQColor::Hsv );
#endif
- backColor1 = new QColor( 250, 248, 235 );
- backColor2 = new QColor( 255, 255, 255 );
- selectedBack = new QColor( 230, 230, 230 );
+ backColor1 = new TQColor( 250, 248, 235 );
+ backColor2 = new TQColor( 255, 255, 255 );
+ selectedBack = new TQColor( 230, 230, 230 );
}
#endif
diff --git a/python/pyqt/pyuic3/main.cpp b/python/pyqt/pyuic3/main.cpp
index 265a536c..fa93b9e3 100644
--- a/python/pyqt/pyuic3/main.cpp
+++ b/python/pyqt/pyuic3/main.cpp
@@ -23,13 +23,13 @@
#include "parser.h"
#include "widgetdatabase.h"
#include "domtool.h"
-#include <qapplication.h>
-#include <qfile.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
+#include <tqapplication.h>
+#include <tqfile.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
#define NO_STATIC_COLORS
#include <globaldefs.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <stdio.h>
#include <stdlib.h>
@@ -39,20 +39,20 @@ int main( int argc, char * argv[] )
bool testCode = FALSE, execCode = FALSE;
bool subcl = FALSE;
bool imagecollection = FALSE;
- QStringList images;
+ TQStringList images;
const char *error = 0;
const char* fileName = 0;
- QCString outputFile;
+ TQCString outputFile;
const char* projectName = 0;
const char* trmacro = 0;
bool fix = FALSE;
- QApplication app(argc, argv, FALSE);
- QString className, uicClass;
+ TQApplication app(argc, argv, FALSE);
+ TQString className, uicClass;
for ( int n = 1; n < argc && error == 0; n++ ) {
- QCString arg = argv[n];
+ TQCString arg = argv[n];
if ( arg[0] == '-' ) { // option
- QCString opt = &arg[1];
+ TQCString opt = &arg[1];
if ( opt[0] == 'o' ) { // output redirection
if ( opt[1] == '\0' ) {
if ( !(n < argc-1) ) {
@@ -107,7 +107,7 @@ int main( int argc, char * argv[] )
error = "Missing Python indent";
break;
}
- tabstop = QCString(argv[++n]).toUInt(&ok);
+ tabstop = TQCString(argv[++n]).toUInt(&ok);
} else
tabstop = opt.mid(1).toUInt(&ok);
@@ -150,7 +150,7 @@ int main( int argc, char * argv[] )
"Options:\n"
"\t-o file\t\tWrite output to file rather than stdout\n"
"\t-p indent\tSet the Python indent in spaces (0 to use a tab)\n"
- "\t-tr func\tUse func() rather than QApplication.translate() for i18n\n"
+ "\t-tr func\tUse func() rather than TQApplication.translate() for i18n\n"
"\t-x\t\tGenerate extra code to test and display the class\n"
"\t-test\t\tGenerate extra code to test but not display the class\n"
"\t-version\tDisplay version of pyuic\n"
@@ -161,7 +161,7 @@ int main( int argc, char * argv[] )
Uic::setIndent(indent);
- QFile fileOut;
+ TQFile fileOut;
if ( !outputFile.isEmpty() ) {
fileOut.setName( outputFile );
if (!fileOut.open( IO_WriteOnly ) )
@@ -169,30 +169,30 @@ int main( int argc, char * argv[] )
} else {
fileOut.open( IO_WriteOnly, stdout );
}
- QTextStream out( &fileOut );
+ TQTextStream out( &fileOut );
if ( imagecollection ) {
- out.setEncoding( QTextStream::Latin1 );
+ out.setEncoding( TQTextStream::Latin1 );
out << "# -*- coding: latin-1 -*-\n\n";
Uic::embed( out, projectName, images );
return 0;
}
- out.setEncoding( QTextStream::UnicodeUTF8 );
- QFile file( fileName );
+ out.setEncoding( TQTextStream::UnicodeUTF8 );
+ TQFile file( fileName );
if ( !file.open( IO_ReadOnly ) )
qFatal( "pyuic: Could not open file '%s' ", fileName );
- QDomDocument doc;
- QString errMsg;
+ TQDomDocument doc;
+ TQString errMsg;
int errLine;
if ( !doc.setContent( &file, &errMsg, &errLine ) )
- qFatal( QString("pyuic: Failed to parse %s: ") + errMsg + QString (" in line %d\n"), fileName, errLine );
+ qFatal( TQString("pyuic: Failed to parse %s: ") + errMsg + TQString (" in line %d\n"), fileName, errLine );
- QDomElement e = doc.firstChild().toElement();
+ TQDomElement e = doc.firstChild().toElement();
if ( e.hasAttribute("version") && e.attribute("version").toDouble() > 3.3 ) {
- qWarning( QString("pyuic: File generated with too recent version of Qt Designer (%s vs. %s)"),
+ qWarning( TQString("pyuic: File generated with too recent version of Qt Designer (%s vs. %s)"),
e.attribute("version").latin1(), QT_VERSION_STR );
return 1;
}
@@ -209,7 +209,7 @@ int main( int argc, char * argv[] )
if ( !subcl ) {
out << "# Form implementation generated from reading ui file '" << fileName << "'" << endl;
out << "#" << endl;
- out << "# Created: " << QDateTime::currentDateTime().toString() << endl;
+ out << "# Created: " << TQDateTime::currentDateTime().toString() << endl;
out << "# by: The PyQt User Interface Compiler (pyuic) " << PYQT_VERSION << endl;
out << "#" << endl;
out << "# WARNING! All changes made in this file will be lost!" << endl;
@@ -228,8 +228,8 @@ int main( int argc, char * argv[] )
out << endl;
out << indent << "if __name__ == \"__main__\":" << endl;
++indent;
- out << indent << "a = QApplication(sys.argv)" << endl;
- out << indent << "QObject.connect(a,SIGNAL(\"lastWindowClosed()\"),a,SLOT(\"quit()\"))" << endl;
+ out << indent << "a = TQApplication(sys.argv)" << endl;
+ out << indent << "TQObject.connect(a,TQT_SIGNAL(\"lastWindowClosed()\"),a,TQT_SLOT(\"quit()\"))" << endl;
out << indent << "w = " << (subcl ? className : uicClass) << "()" << endl;
out << indent << "a.setMainWidget(w)" << endl;
diff --git a/python/pyqt/pyuic3/object.cpp b/python/pyqt/pyuic3/object.cpp
index 834427f5..335bce9b 100644
--- a/python/pyqt/pyuic3/object.cpp
+++ b/python/pyqt/pyuic3/object.cpp
@@ -21,9 +21,9 @@
#include "uic.h"
#include "parser.h"
#include "domtool.h"
-#include <qregexp.h>
-#include <qsizepolicy.h>
-#include <qstringlist.h>
+#include <tqregexp.h>
+#include <tqsizepolicy.h>
+#include <tqstringlist.h>
#define NO_STATIC_COLORS
#include <globaldefs.h>
@@ -38,17 +38,17 @@
static bool createdCentralWidget = FALSE;
-QString Uic::createObjectImpl( const QDomElement &e, const QString& parentClass, const QString& par, const QString& layout )
+TQString Uic::createObjectImpl( const TQDomElement &e, const TQString& parentClass, const TQString& par, const TQString& layout )
{
- QString parent( par );
+ TQString parent( par );
if ( parent == "self" && isMainWindow ) {
if ( !createdCentralWidget )
- out << indent << "self.setCentralWidget(QWidget(self,\"qt_central_widget\"))" << endl;
+ out << indent << "self.setCentralWidget(TQWidget(self,\"qt_central_widget\"))" << endl;
createdCentralWidget = TRUE;
parent = "self.centralWidget()";
}
- QDomElement n;
- QString objClass, objName, fullObjName;
+ TQDomElement n;
+ TQString objClass, objName, fullObjName;
int numItems = 0;
int numColumns = 0;
int numRows = 0;
@@ -61,7 +61,7 @@ QString Uic::createObjectImpl( const QDomElement &e, const QString& parentClass,
return objName;
objName = getObjectName( e );
- QString definedName = objName;
+ TQString definedName = objName;
bool isTmpObject = objName.isEmpty() || objClass == "QLayoutWidget";
if ( isTmpObject ) {
if ( objClass[0] == 'Q' )
@@ -72,17 +72,17 @@ QString Uic::createObjectImpl( const QDomElement &e, const QString& parentClass,
bool isLine = objClass == "Line";
if ( isLine )
- objClass = "QFrame";
+ objClass = "TQFrame";
out << endl;
if ( objClass == "QLayoutWidget" ) {
if ( layout.isEmpty() ) {
// register the object and unify its name
objName = registerObject( objName );
- out << indent << objName << " = QWidget(" << parent << ",\"" << definedName << "\")" << endl;
+ out << indent << objName << " = TQWidget(" << parent << ",\"" << definedName << "\")" << endl;
} else {
// the layout widget is not necessary, hide it by creating its child in the parent
- QString result;
+ TQString result;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if (tags.contains( n.tagName() ) )
result = createObjectImpl( n, parentClass, parent, layout );
@@ -92,7 +92,7 @@ QString Uic::createObjectImpl( const QDomElement &e, const QString& parentClass,
// Layouts don't go into the class instance dictionary.
fullObjName = objName;
- } else if ( objClass != "QToolBar" && objClass != "QMenuBar" ) {
+ } else if ( objClass != "TQToolBar" && objClass != "TQMenuBar" ) {
// register the object and unify its name
objName = registerObject( objName );
@@ -105,7 +105,7 @@ QString Uic::createObjectImpl( const QDomElement &e, const QString& parentClass,
fullObjName = "self." + objName;
if ( objClass == "QAxWidget" ) {
- QString controlId;
+ TQString controlId;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "property" && n.attribute( "name" ) == "control" ) {
controlId = n.firstChild().toElement().text();
@@ -122,10 +122,10 @@ QString Uic::createObjectImpl( const QDomElement &e, const QString& parentClass,
bool stdset = stdsetdef;
if ( n.hasAttribute( "stdset" ) )
stdset = toBool( n.attribute( "stdset" ) );
- QString prop = n.attribute( "name" );
+ TQString prop = n.attribute( "name" );
if ( prop == "database" )
continue;
- QString value = setObjectProperty( objClass, objName, prop, n.firstChild().toElement(), stdset );
+ TQString value = setObjectProperty( objClass, objName, prop, n.firstChild().toElement(), stdset );
if ( value.isEmpty() )
continue;
if ( prop == "name" )
@@ -139,35 +139,35 @@ QString Uic::createObjectImpl( const QDomElement &e, const QString& parentClass,
if ( isLine && prop == "orientation" ) {
prop = "frameShape";
if ( value.right(10) == "Horizontal" )
- value = "QFrame.HLine";
+ value = "TQFrame.HLine";
else
- value = "QFrame.VLine";
+ value = "TQFrame.VLine";
if ( !hadFrameShadow ) {
prop = "frameStyle";
- value += " | QFrame.Sunken";
+ value += " | TQFrame.Sunken";
}
}
if ( prop == "buttonGroupId" ) {
- if ( parentClass == "QButtonGroup" )
+ if ( parentClass == "TQButtonGroup" )
out << indent << parent << ".insert( " << fullObjName << "," << value << ")" << endl;
continue;
}
if ( prop == "frameworkCode" )
continue;
- if ( objClass == "QMultiLineEdit" &&
- QRegExp("echoMode|hMargin|maxLength|maxLines|undoEnabled").exactMatch(prop) )
+ if ( objClass == "TQMultiLineEdit" &&
+ TQRegExp("echoMode|hMargin|maxLength|maxLines|undoEnabled").exactMatch(prop) )
continue;
- QString call = fullObjName + ".";
- QString tail;
+ TQString call = fullObjName + ".";
+ TQString tail;
if ( stdset ) {
call += mkStdSet( prop ) + "(";
tail = ")";
} else {
- call += "setProperty(\"" + prop + "\",QVariant(";
+ call += "setProperty(\"" + prop + "\",TQVariant(";
tail = "))";
}
if ( prop == "accel" ) {
- call += "QKeySequence(";
+ call += "TQKeySequence(";
tail += ")";
}
call += value + tail;
@@ -179,8 +179,8 @@ QString Uic::createObjectImpl( const QDomElement &e, const QString& parentClass,
out << indent << call << endl;
}
} else if ( n.tagName() == "item" ) {
- QString call;
- QString value;
+ TQString call;
+ TQString value;
if ( objClass.contains( "ListBox" ) ) {
call = createListBoxItemImpl( n, fullObjName );
@@ -204,7 +204,7 @@ QString Uic::createObjectImpl( const QDomElement &e, const QString& parentClass,
trout << trindent << call << endl;
}
} else if ( objClass.contains( "ListView" ) ) {
- call = createListViewItemImpl( n, fullObjName, QString::null );
+ call = createListViewItemImpl( n, fullObjName, TQString::null );
if ( !call.isEmpty() ) {
if ( numItems == 0 )
trout << trindent << fullObjName << ".clear()" << endl;
@@ -214,8 +214,8 @@ QString Uic::createObjectImpl( const QDomElement &e, const QString& parentClass,
if ( !call.isEmpty() )
numItems++;
} else if ( n.tagName() == "column" || n.tagName() == "row" ) {
- QString call;
- QString value;
+ TQString call;
+ TQString value;
if ( objClass.contains( "ListView" ) ) {
call = createListViewColumnImpl( n, fullObjName, &value );
@@ -224,7 +224,7 @@ QString Uic::createObjectImpl( const QDomElement &e, const QString& parentClass,
trout << trindent << fullObjName << ".header().setLabel("
<< numColumns++ << "," << value << ")\n";
}
- } else if ( objClass == "QTable" || objClass == "QDataTable" ) {
+ } else if ( objClass == "TQTable" || objClass == "TQDataTable" ) {
bool isCols = ( n.tagName() == "column" );
call = createTableRowColumnImpl( n, fullObjName, &value );
if ( !call.isEmpty() ) {
@@ -241,37 +241,37 @@ QString Uic::createObjectImpl( const QDomElement &e, const QString& parentClass,
// create all children, some widgets have special requirements
- if ( objClass == "QTabWidget" ) {
+ if ( objClass == "TQTabWidget" ) {
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( tags.contains( n.tagName() ) ) {
- QString page = createObjectImpl( n, objClass, fullObjName );
- QString comment;
- QString label = DomTool::readAttribute( n, "title", "", comment ).toString();
- out << indent << fullObjName << ".insertTab(" << page << ",QString.fromLatin1(\"\"))" << endl;
+ TQString page = createObjectImpl( n, objClass, fullObjName );
+ TQString comment;
+ TQString label = DomTool::readAttribute( n, "title", "", comment ).toString();
+ out << indent << fullObjName << ".insertTab(" << page << ",TQString.fromLatin1(\"\"))" << endl;
trout << trindent << fullObjName << ".changeTab(" << page << "," << trcall( label, comment ) << ")" << endl;
}
}
- } else if ( objClass == "QWidgetStack" ) {
+ } else if ( objClass == "TQWidgetStack" ) {
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( tags.contains( n.tagName() ) ) {
- QString page = createObjectImpl( n, objClass, fullObjName );
+ TQString page = createObjectImpl( n, objClass, fullObjName );
int id = DomTool::readAttribute( n, "id", "" ).toInt();
out << indent << fullObjName << ".addWidget(" << page << "," << id << ")" << endl;
}
}
- } else if ( objClass == "QToolBox" ) {
+ } else if ( objClass == "TQToolBox" ) {
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( tags.contains( n.tagName() ) ) {
- QString page = createObjectImpl( n, objClass, fullObjName );
- QString comment;
- QString label = DomTool::readAttribute( n, "label", "", comment ).toString();
- out << indent << fullObjName << ".addItem(" << page << ",QString.fromLatin1(\"\"))" << endl;
+ TQString page = createObjectImpl( n, objClass, fullObjName );
+ TQString comment;
+ TQString label = DomTool::readAttribute( n, "label", "", comment ).toString();
+ out << indent << fullObjName << ".addItem(" << page << ",TQString.fromLatin1(\"\"))" << endl;
trout << trindent << fullObjName << ".setItemLabel(" << fullObjName
<< ".indexOf(" << page << ")," << trcall( label, comment )
<< ")" << endl;
}
}
- } else if ( objClass != "QToolBar" && objClass != "QMenuBar" ) { // standard widgets
+ } else if ( objClass != "TQToolBar" && objClass != "TQMenuBar" ) { // standard widgets
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( tags.contains( n.tagName() ) )
createObjectImpl( n, objClass, fullObjName );
@@ -293,13 +293,13 @@ QString Uic::createObjectImpl( const QDomElement &e, const QString& parentClass,
application font or palette change handlers in createFormImpl().
*/
-void Uic::createExclusiveProperty( const QDomElement & e, const QString& exclusiveProp )
+void Uic::createExclusiveProperty( const TQDomElement & e, const TQString& exclusiveProp )
{
- QDomElement n;
- QString objClass = getClassName( e );
+ TQDomElement n;
+ TQString objClass = getClassName( e );
if ( objClass.isEmpty() )
return;
- QString objName = getObjectName( e );
+ TQString objName = getObjectName( e );
#if 0 // it's not clear whether this check should be here or not
if ( objName.isEmpty() )
return;
@@ -309,55 +309,55 @@ void Uic::createExclusiveProperty( const QDomElement & e, const QString& exclusi
bool stdset = stdsetdef;
if ( n.hasAttribute( "stdset" ) )
stdset = toBool( n.attribute( "stdset" ) );
- QString prop = n.attribute( "name" );
+ TQString prop = n.attribute( "name" );
if ( prop != exclusiveProp )
continue;
- QString value = setObjectProperty( objClass, objName, prop, n.firstChild().toElement(), stdset );
+ TQString value = setObjectProperty( objClass, objName, prop, n.firstChild().toElement(), stdset );
if ( value.isEmpty() )
continue;
- out << indent << indent << objName << ".setProperty(\"" << prop << "\",QVariant(" << value << "))" << endl;
+ out << indent << indent << objName << ".setProperty(\"" << prop << "\",TQVariant(" << value << "))" << endl;
}
}
}
-/* Convert a QSizePolicy::SizeType to text. */
-static QString mapSizeType(QSizePolicy::SizeType st)
+/* Convert a TQSizePolicy::SizeType to text. */
+static TQString mapSizeType(TQSizePolicy::SizeType st)
{
const char *txt;
switch (st)
{
- case QSizePolicy::Fixed:
- txt = "QSizePolicy.Fixed";
+ case TQSizePolicy::Fixed:
+ txt = "TQSizePolicy.Fixed";
break;
- case QSizePolicy::Minimum:
- txt = "QSizePolicy.Minimum";
+ case TQSizePolicy::Minimum:
+ txt = "TQSizePolicy.Minimum";
break;
- case QSizePolicy::Maximum:
- txt = "QSizePolicy.Maximum";
+ case TQSizePolicy::Maximum:
+ txt = "TQSizePolicy.Maximum";
break;
- case QSizePolicy::Preferred:
- txt = "QSizePolicy.Preferred";
+ case TQSizePolicy::Preferred:
+ txt = "TQSizePolicy.Preferred";
break;
- case QSizePolicy::MinimumExpanding:
- txt = "QSizePolicy.MinimumExpanding";
+ case TQSizePolicy::MinimumExpanding:
+ txt = "TQSizePolicy.MinimumExpanding";
break;
- case QSizePolicy::Expanding:
- txt = "QSizePolicy.Expanding";
+ case TQSizePolicy::Expanding:
+ txt = "TQSizePolicy.Expanding";
break;
- case QSizePolicy::Ignored:
- txt = "QSizePolicy.Ignored";
+ case TQSizePolicy::Ignored:
+ txt = "TQSizePolicy.Ignored";
break;
default:
- txt = "Invalid QSizePolicy::SizeType";
+ txt = "Invalid TQSizePolicy::SizeType";
}
return txt;
@@ -368,11 +368,11 @@ static QString mapSizeType(QSizePolicy::SizeType st)
Resource::saveProperty() and DomTool::elementToVariant. If you
change one, change all.
*/
-QString Uic::setObjectProperty( const QString& objClass, const QString& obj, const QString &prop, const QDomElement &e, bool stdset )
+TQString Uic::setObjectProperty( const TQString& objClass, const TQString& obj, const TQString &prop, const TQDomElement &e, bool stdset )
{
- QString v;
+ TQString v;
if ( e.tagName() == "rect" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int x = 0, y = 0, w = 0, h = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "x" )
@@ -385,11 +385,11 @@ QString Uic::setObjectProperty( const QString& objClass, const QString& obj, con
h = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = "QRect(%1,%2,%3,%4)";
+ v = "TQRect(%1,%2,%3,%4)";
v = v.arg(x).arg(y).arg(w).arg(h);
} else if ( e.tagName() == "point" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int x = 0, y = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "x" )
@@ -398,10 +398,10 @@ QString Uic::setObjectProperty( const QString& objClass, const QString& obj, con
y = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = "QPoint(%1,%2)";
+ v = "TQPoint(%1,%2)";
v = v.arg(x).arg(y);
} else if ( e.tagName() == "size" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int w = 0, h = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "width" )
@@ -410,10 +410,10 @@ QString Uic::setObjectProperty( const QString& objClass, const QString& obj, con
h = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = "QSize(%1,%2)";
+ v = "TQSize(%1,%2)";
v = v.arg(w).arg(h);
} else if ( e.tagName() == "color" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int r = 0, g = 0, b = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "red" )
@@ -424,18 +424,18 @@ QString Uic::setObjectProperty( const QString& objClass, const QString& obj, con
b = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = "QColor(%1,%2,%3)";
+ v = "TQColor(%1,%2,%3)";
v = v.arg(r).arg(g).arg(b);
} else if ( e.tagName() == "font" ) {
- QDomElement n3 = e.firstChild().toElement();
- QString attrname = e.parentNode().toElement().attribute( "name", "font" );
- QString fontname;
+ TQDomElement n3 = e.firstChild().toElement();
+ TQString attrname = e.parentNode().toElement().attribute( "name", "font" );
+ TQString fontname;
if ( !obj.isEmpty() ) {
fontname = registerObject( obj + "_" + attrname );
- out << indent << fontname << " = QFont(self." << obj << ".font())" << endl;
+ out << indent << fontname << " = TQFont(self." << obj << ".font())" << endl;
} else {
fontname = registerObject( "f" );
- out << indent << fontname << " = QFont(self.font())" << endl;
+ out << indent << fontname << " = TQFont(self.font())" << endl;
}
while ( !n3.isNull() ) {
if ( n3.tagName() == "family" )
@@ -462,22 +462,22 @@ QString Uic::setObjectProperty( const QString& objClass, const QString& obj, con
v = fontname;
}
} else if ( e.tagName() == "string" ) {
- QString txt = e.firstChild().toText().data();
- QString com = getComment( e.parentNode() );
+ TQString txt = e.firstChild().toText().data();
+ TQString com = getComment( e.parentNode() );
- if ( prop == "toolTip" && objClass != "QAction" && objClass != "QActionGroup" ) {
+ if ( prop == "toolTip" && objClass != "TQAction" && objClass != "TQActionGroup" ) {
if ( !obj.isEmpty() )
- trout << trindent << "QToolTip.add(self." << obj << ","
+ trout << trindent << "TQToolTip.add(self." << obj << ","
<< trcall( txt, com ) << ")" << endl;
else
- trout << trindent << "QToolTip.add(self,"
+ trout << trindent << "TQToolTip.add(self,"
<< trcall( txt, com ) << ")" << endl;
- } else if ( prop == "whatsThis" && objClass != "QAction" && objClass != "QActionGroup" ) {
+ } else if ( prop == "whatsThis" && objClass != "TQAction" && objClass != "TQActionGroup" ) {
if ( !obj.isEmpty() )
- trout << trindent << "QWhatsThis.add(self." << obj << ","
+ trout << trindent << "TQWhatsThis.add(self." << obj << ","
<< trcall( txt, com ) << ")" << endl;
else
- trout << trindent << "QWhatsThis.add(self,"
+ trout << trindent << "TQWhatsThis.add(self,"
<< trcall( txt, com ) << ")" << endl;
} else {
v = trcall( txt, com );
@@ -492,7 +492,7 @@ QString Uic::setObjectProperty( const QString& objClass, const QString& obj, con
if ( stdset )
v = "%1";
else
- v = "QVariant(%1,0)";
+ v = "TQVariant(%1,0)";
v = v.arg( mkBool( e.firstChild().toText().data() ) );
} else if ( e.tagName() == "pixmap" ) {
v = e.firstChild().toText().data();
@@ -500,19 +500,19 @@ QString Uic::setObjectProperty( const QString& objClass, const QString& obj, con
if ( pixmapLoaderFunction.isEmpty() ) {
v.prepend( "self." );
} else {
- v.prepend( pixmapLoaderFunction + "(" + QString( externPixmaps ? "\"" : "" ) );
- v.append( QString( externPixmaps ? "\"" : "" ) + ")" );
+ v.prepend( pixmapLoaderFunction + "(" + TQString( externPixmaps ? "\"" : "" ) );
+ v.append( TQString( externPixmaps ? "\"" : "" ) + ")" );
}
}
} else if ( e.tagName() == "iconset" ) {
- v = "QIconSet(%1)";
- QString s = e.firstChild().toText().data();
+ v = "TQIconSet(%1)";
+ TQString s = e.firstChild().toText().data();
if ( !s.isEmpty() ) {
if ( pixmapLoaderFunction.isEmpty() ) {
s.prepend( "self." );
} else {
- s.prepend( pixmapLoaderFunction + "(" + QString( externPixmaps ? "\"" : "" ) );
- s.append( QString( externPixmaps ? "\"" : "" ) + ")" );
+ s.prepend( pixmapLoaderFunction + "(" + TQString( externPixmaps ? "\"" : "" ) );
+ s.append( TQString( externPixmaps ? "\"" : "" ) + ")" );
}
}
v = v.arg( s );
@@ -520,16 +520,16 @@ QString Uic::setObjectProperty( const QString& objClass, const QString& obj, con
v = e.firstChild().toText().data() + ".convertToImage()";
} else if ( e.tagName() == "enum" ) {
v = "%1.%2";
- QString oc = objClass;
- QString ev = e.firstChild().toText().data();
- if ( oc == "QListView" && ev == "Manual" ) // #### workaround, rename QListView::Manual in 4.0
- oc = "QScrollView";
+ TQString oc = objClass;
+ TQString ev = e.firstChild().toText().data();
+ if ( oc == "TQListView" && ev == "Manual" ) // #### workaround, rename TQListView::Manual in 4.0
+ oc = "TQScrollView";
v = v.arg( oc ).arg( ev );
} else if ( e.tagName() == "set" ) {
- QString keys( e.firstChild().toText().data() );
- QStringList lst = QStringList::split( '|', keys );
+ TQString keys( e.firstChild().toText().data() );
+ TQStringList lst = TQStringList::split( '|', keys );
v = "";
- QStringList::Iterator it = lst.begin();
+ TQStringList::Iterator it = lst.begin();
while ( it != lst.end() ) {
v += objClass + "." + *it;
if ( it != lst.fromLast() )
@@ -537,32 +537,32 @@ QString Uic::setObjectProperty( const QString& objClass, const QString& obj, con
++it;
}
} else if ( e.tagName() == "sizepolicy" ) {
- QDomElement n3 = e.firstChild().toElement();
- QSizePolicy sp;
+ TQDomElement n3 = e.firstChild().toElement();
+ TQSizePolicy sp;
while ( !n3.isNull() ) {
if ( n3.tagName() == "hsizetype" )
- sp.setHorData( (QSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
+ sp.setHorData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "vsizetype" )
- sp.setVerData( (QSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
+ sp.setVerData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "horstretch" )
sp.setHorStretch( n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "verstretch" )
sp.setVerStretch( n3.firstChild().toText().data().toInt() );
n3 = n3.nextSibling().toElement();
}
- QString tmp = "self.";
+ TQString tmp = "self.";
if ( !obj.isEmpty() )
tmp += obj + ".";
- v = "QSizePolicy(%1,%2,%3,%4," + tmp + "sizePolicy().hasHeightForWidth())";
+ v = "TQSizePolicy(%1,%2,%3,%4," + tmp + "sizePolicy().hasHeightForWidth())";
v = v.arg( mapSizeType(sp.horData()) ).arg( mapSizeType(sp.verData()) ).arg( sp.horStretch() ).arg( sp.verStretch() );
} else if ( e.tagName() == "palette" ) {
- QPalette pal;
+ TQPalette pal;
bool no_pixmaps = e.elementsByTagName( "pixmap" ).count() == 0;
- QDomElement n;
+ TQDomElement n;
if ( no_pixmaps ) {
n = e.firstChild().toElement();
while ( !n.isNull() ) {
- QColorGroup cg;
+ TQColorGroup cg;
if ( n.tagName() == "active" ) {
cg = loadColorGroup( n );
pal.setActive( cg );
@@ -576,19 +576,19 @@ QString Uic::setObjectProperty( const QString& objClass, const QString& obj, con
n = n.nextSibling().toElement();
}
}
- if ( no_pixmaps && pal == QPalette( pal.active().button(), pal.active().background() ) ) {
- v = "QPalette(QColor(%1,%2,%3),QColor(%1,%2,%3))";
+ if ( no_pixmaps && pal == TQPalette( pal.active().button(), pal.active().background() ) ) {
+ v = "TQPalette(TQColor(%1,%2,%3),TQColor(%1,%2,%3))";
v = v.arg( pal.active().button().red() ).arg( pal.active().button().green() ).arg( pal.active().button().blue() );
v = v.arg( pal.active().background().red() ).arg( pal.active().background().green() ).arg( pal.active().background().blue() );
} else {
- QString palette = "pal";
+ TQString palette = "pal";
if ( !pal_used ) {
- out << indent << palette << " = QPalette()" << endl;
+ out << indent << palette << " = TQPalette()" << endl;
pal_used = TRUE;
}
- QString cg = "cg";
+ TQString cg = "cg";
if ( !cg_used ) {
- out << indent << cg << " = QColorGroup()" << endl;
+ out << indent << cg << " = TQColorGroup()" << endl;
cg_used = TRUE;
}
n = e.firstChild().toElement();
@@ -611,10 +611,10 @@ QString Uic::setObjectProperty( const QString& objClass, const QString& obj, con
v = palette;
}
} else if ( e.tagName() == "cursor" ) {
- v = "QCursor(%1)";
+ v = "TQCursor(%1)";
v = v.arg( e.firstChild().toText().data() );
} else if ( e.tagName() == "date" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int y, m, d;
y = m = d = 0;
while ( !n3.isNull() ) {
@@ -626,10 +626,10 @@ QString Uic::setObjectProperty( const QString& objClass, const QString& obj, con
d = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = "QDate(%1,%2,%3)";
+ v = "TQDate(%1,%2,%3)";
v = v.arg(y).arg(m).arg(d);
} else if ( e.tagName() == "time" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int h, m, s;
h = m = s = 0;
while ( !n3.isNull() ) {
@@ -641,10 +641,10 @@ QString Uic::setObjectProperty( const QString& objClass, const QString& obj, con
s = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = "QTime(%1,%2,%3)";
+ v = "TQTime(%1,%2,%3)";
v = v.arg(h).arg(m).arg(s);
} else if ( e.tagName() == "datetime" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int h, mi, s, y, mo, d;
h = mi = s = y = mo = d = 0;
while ( !n3.isNull() ) {
@@ -662,18 +662,18 @@ QString Uic::setObjectProperty( const QString& objClass, const QString& obj, con
d = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = "QDateTime(QDate(%1,%2,%3),QTime(%4,%5,%6))";
+ v = "TQDateTime(TQDate(%1,%2,%3),TQTime(%4,%5,%6))";
v = v.arg(y).arg(mo).arg(d).arg(h).arg(mi).arg(s);
} else if ( e.tagName() == "stringlist" ) {
- QStringList l;
- QDomElement n3 = e.firstChild().toElement();
- QString listname = "l";
+ TQStringList l;
+ TQDomElement n3 = e.firstChild().toElement();
+ TQString listname = "l";
if ( !obj.isEmpty() ) {
listname = obj + "_stringlist";
listname = registerObject( listname );
- out << indent << listname << " = QStringList()" << endl;
+ out << indent << listname << " = TQStringList()" << endl;
} else {
- out << indent << listname << " = QStringList()" << endl;
+ out << indent << listname << " = TQStringList()" << endl;
}
while ( !n3.isNull() ) {
if ( n3.tagName() == "string" )
@@ -690,9 +690,9 @@ QString Uic::setObjectProperty( const QString& objClass, const QString& obj, con
/*! Extracts a named object property from \a e.
*/
-QDomElement Uic::getObjectProperty( const QDomElement& e, const QString& name )
+TQDomElement Uic::getObjectProperty( const TQDomElement& e, const TQString& name )
{
- QDomElement n;
+ TQDomElement n;
for ( n = e.firstChild().toElement();
!n.isNull();
n = n.nextSibling().toElement() ) {
diff --git a/python/pyqt/pyuic3/parser.cpp b/python/pyqt/pyuic3/parser.cpp
index 4fc13c5f..15374aa5 100644
--- a/python/pyqt/pyuic3/parser.cpp
+++ b/python/pyqt/pyuic3/parser.cpp
@@ -19,28 +19,28 @@
**********************************************************************/
#include "parser.h"
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
class NormalizeObject : public QObject
{
public:
- NormalizeObject() : QObject() {}
- static QCString normalizeSignalSlot( const char *signalSlot ) { return QObject::normalizeSignalSlot( signalSlot ); }
+ NormalizeObject() : TQObject() {}
+ static TQCString normalizeSignalSlot( const char *signalSlot ) { return TQObject::normalizeSignalSlot( signalSlot ); }
};
-QString Parser::cleanArgs( const QString &func )
+TQString Parser::cleanArgs( const TQString &func )
{
- QString slot( func );
+ TQString slot( func );
int begin = slot.find( "(" ) + 1;
- QString args = slot.mid( begin );
+ TQString args = slot.mid( begin );
args = args.left( args.find( ")" ) );
- QStringList lst = QStringList::split( ',', args );
- QString res = slot.left( begin );
- for ( QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
+ TQStringList lst = TQStringList::split( ',', args );
+ TQString res = slot.left( begin );
+ for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
if ( it != lst.begin() )
res += ",";
- QString arg = *it;
+ TQString arg = *it;
int pos = 0;
if ( ( pos = arg.find( "&" ) ) != -1 ) {
arg = arg.left( pos + 1 );
@@ -50,7 +50,7 @@ QString Parser::cleanArgs( const QString &func )
arg = arg.simplifyWhiteSpace();
if ( ( pos = arg.find( ':' ) ) != -1 )
arg = arg.left( pos ).simplifyWhiteSpace() + ":" + arg.mid( pos + 1 ).simplifyWhiteSpace();
- QStringList l = QStringList::split( ' ', arg );
+ TQStringList l = TQStringList::split( ' ', arg );
if ( l.count() == 2 ) {
if ( l[ 0 ] != "const" && l[ 0 ] != "unsigned" && l[ 0 ] != "var" )
arg = l[ 0 ];
@@ -62,5 +62,5 @@ QString Parser::cleanArgs( const QString &func )
}
res += ")";
- return QString::fromLatin1( NormalizeObject::normalizeSignalSlot( res.latin1() ) );
+ return TQString::fromLatin1( NormalizeObject::normalizeSignalSlot( res.latin1() ) );
}
diff --git a/python/pyqt/pyuic3/parser.h b/python/pyqt/pyuic3/parser.h
index 5a5671ad..ace96d9e 100644
--- a/python/pyqt/pyuic3/parser.h
+++ b/python/pyqt/pyuic3/parser.h
@@ -21,12 +21,12 @@
#ifndef PARSER_H
#define PARSER_H
-#include <qstring.h>
+#include <tqstring.h>
class Parser
{
public:
- static QString cleanArgs( const QString &func );
+ static TQString cleanArgs( const TQString &func );
};
diff --git a/python/pyqt/pyuic3/subclassing.cpp b/python/pyqt/pyuic3/subclassing.cpp
index 299e0449..251d704f 100644
--- a/python/pyqt/pyuic3/subclassing.cpp
+++ b/python/pyqt/pyuic3/subclassing.cpp
@@ -22,12 +22,12 @@
#include "parser.h"
#include "widgetdatabase.h"
#include "domtool.h"
-#include <qfile.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
+#include <tqfile.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
#define NO_STATIC_COLORS
#include <globaldefs.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <stdio.h>
#include <stdlib.h>
@@ -38,17 +38,17 @@
\sa createSubDecl()
*/
-void Uic::createSubImpl( const QDomElement &e, const QString& subClass )
+void Uic::createSubImpl( const TQDomElement &e, const TQString& subClass )
{
- QDomElement n;
- QDomNodeList nl;
+ TQDomElement n;
+ TQDomNodeList nl;
int i;
- QString objClass = getClassName( e );
+ TQString objClass = getClassName( e );
if ( objClass.isEmpty() )
return;
- QString supClsMod = fileName;
+ TQString supClsMod = fileName;
int tail = supClsMod.findRev('.',-1);
if (tail >= 0)
supClsMod.truncate(tail);
@@ -62,7 +62,7 @@ void Uic::createSubImpl( const QDomElement &e, const QString& subClass )
out << endl;
// constructor
- if ( objClass == "QDialog" || objClass == "QWizard" ) {
+ if ( objClass == "TQDialog" || objClass == "TQWizard" ) {
out << indent << "def __init__(self,parent = None,name = None,modal = 0,fl = 0):" << endl;
++indent;
out << indent << nameOfClass << ".__init__(self,parent,name,modal,fl)" << endl;
@@ -74,12 +74,12 @@ void Uic::createSubImpl( const QDomElement &e, const QString& subClass )
--indent;
// find additional functions
- QStringList publicSlots, protectedSlots, privateSlots;
- QStringList publicSlotTypes, protectedSlotTypes, privateSlotTypes;
- QStringList publicSlotSpecifier, protectedSlotSpecifier, privateSlotSpecifier;
- QStringList publicFuncts, protectedFuncts, privateFuncts;
- QStringList publicFunctRetTyp, protectedFunctRetTyp, privateFunctRetTyp;
- QStringList publicFunctSpec, protectedFunctSpec, privateFunctSpec;
+ TQStringList publicSlots, protectedSlots, privateSlots;
+ TQStringList publicSlotTypes, protectedSlotTypes, privateSlotTypes;
+ TQStringList publicSlotSpecifier, protectedSlotSpecifier, privateSlotSpecifier;
+ TQStringList publicFuncts, protectedFuncts, privateFuncts;
+ TQStringList publicFunctRetTyp, protectedFunctRetTyp, privateFunctRetTyp;
+ TQStringList publicFunctSpec, protectedFunctSpec, privateFunctSpec;
nl = e.parentNode().toElement().elementsByTagName( "slot" );
for ( i = 0; i < (int) nl.length(); i++ ) {
@@ -89,12 +89,12 @@ void Uic::createSubImpl( const QDomElement &e, const QString& subClass )
continue;
if ( n.attribute( "language", "C++" ) != "C++" )
continue;
- QString returnType = n.attribute( "returnType", "void" );
- QString functionName = n.firstChild().toText().data().stripWhiteSpace();
+ TQString returnType = n.attribute( "returnType", "void" );
+ TQString functionName = n.firstChild().toText().data().stripWhiteSpace();
if ( functionName.endsWith( ";" ) )
functionName = functionName.left( functionName.length() - 1 );
- QString specifier = n.attribute( "specifier" );
- QString access = n.attribute( "access" );
+ TQString specifier = n.attribute( "specifier" );
+ TQString access = n.attribute( "access" );
if ( access == "protected" ) {
protectedSlots += functionName;
protectedSlotTypes += returnType;
@@ -117,12 +117,12 @@ void Uic::createSubImpl( const QDomElement &e, const QString& subClass )
continue;
if ( n.attribute( "language", "C++" ) != "C++" )
continue;
- QString returnType = n.attribute( "returnType", "void" );
- QString functionName = n.firstChild().toText().data().stripWhiteSpace();
+ TQString returnType = n.attribute( "returnType", "void" );
+ TQString functionName = n.firstChild().toText().data().stripWhiteSpace();
if ( functionName.endsWith( ";" ) )
functionName = functionName.left( functionName.length() - 1 );
- QString specifier = n.attribute( "specifier" );
- QString access = n.attribute( "access" );
+ TQString specifier = n.attribute( "specifier" );
+ TQString access = n.attribute( "access" );
if ( access == "protected" ) {
protectedFuncts += functionName;
protectedFunctRetTyp += returnType;
@@ -162,13 +162,13 @@ void Uic::createSubImpl( const QDomElement &e, const QString& subClass )
--indent;
}
-void Uic::writeFunctionsSubImpl( const QStringList &fuLst, const QStringList &typLst, const QStringList &specLst,
- const QString &subClass, const QString &descr )
+void Uic::writeFunctionsSubImpl( const TQStringList &fuLst, const TQStringList &typLst, const TQStringList &specLst,
+ const TQString &subClass, const TQString &descr )
{
- QValueListConstIterator<QString> it, it2, it3;
+ TQValueListConstIterator<TQString> it, it2, it3;
for ( it = fuLst.begin(), it2 = typLst.begin(), it3 = specLst.begin();
it != fuLst.end(); ++it, ++it2, ++it3 ) {
- QString type = *it2;
+ TQString type = *it2;
if ( type.isEmpty() )
type = "void";
if ( *it3 == "non virtual" )
diff --git a/python/pyqt/pyuic3/uic.cpp b/python/pyqt/pyuic3/uic.cpp
index d3593020..b9e046c5 100644
--- a/python/pyqt/pyuic3/uic.cpp
+++ b/python/pyqt/pyuic3/uic.cpp
@@ -23,12 +23,12 @@
#include "parser.h"
#include "widgetdatabase.h"
#include "domtool.h"
-#include <qfile.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
+#include <tqfile.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
#define NO_STATIC_COLORS
#include <globaldefs.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <stdio.h>
#include <stdlib.h>
@@ -52,36 +52,36 @@ void PyIndent::calc()
}
-QString Uic::getComment( const QDomNode& n )
+TQString Uic::getComment( const TQDomNode& n )
{
- QDomNode child = n.firstChild();
+ TQDomNode child = n.firstChild();
while ( !child.isNull() ) {
if ( child.toElement().tagName() == "comment" )
return child.toElement().firstChild().toText().data();
child = child.nextSibling();
}
- return QString::null;
+ return TQString::null;
}
-QString Uic::mkBool( bool b )
+TQString Uic::mkBool( bool b )
{
return b? "1" : "0";
}
-QString Uic::mkBool( const QString& s )
+TQString Uic::mkBool( const TQString& s )
{
return mkBool( s == "true" || s == "1" );
}
-bool Uic::toBool( const QString& s )
+bool Uic::toBool( const TQString& s )
{
return s == "true" || s.toInt() != 0;
}
-QString Uic::fixString( const QString &str, bool encode )
+TQString Uic::fixString( const TQString &str, bool encode )
{
#if QT_VERSION >= 0x030100
- QString s;
+ TQString s;
if ( !encode ) {
s = str;
s.replace( "\\", "\\\\" );
@@ -89,7 +89,7 @@ QString Uic::fixString( const QString &str, bool encode )
s.replace( "\r", "" );
s.replace( "\n", "\\n\"\n\"" );
} else {
- QCString utf8 = str.utf8();
+ TQCString utf8 = str.utf8();
const int l = utf8.length();
for ( int i = 0; i < l; ++i ) {
@@ -101,25 +101,25 @@ QString Uic::fixString( const QString &str, bool encode )
if (ch <= 0x0f)
s += "0";
- s += QString::number( ch, 16 );
+ s += TQString::number( ch, 16 );
}
}
}
#else
- QString s( str );
- s.replace( QRegExp( "\\\\" ), "\\\\" );
- s.replace( QRegExp( "\"" ), "\\\"" );
- s.replace( QRegExp( "\r?\n" ), "\\n\"\n\"" );
+ TQString s( str );
+ s.replace( TQRegExp( "\\\\" ), "\\\\" );
+ s.replace( TQRegExp( "\"" ), "\\\"" );
+ s.replace( TQRegExp( "\r?\n" ), "\\n\"\n\"" );
#endif
return "\"" + s + "\"";
}
-QString Uic::trcall( const QString& sourceText, const QString& comment )
+TQString Uic::trcall( const TQString& sourceText, const TQString& comment )
{
if ( sourceText.isEmpty() && comment.isEmpty() )
- return "QString.null";
+ return "TQString.null";
- QString t = trmacro;
+ TQString t = trmacro;
bool encode = FALSE;
if ( t.isNull() ) {
t = "self.__tr";
@@ -145,9 +145,9 @@ QString Uic::trcall( const QString& sourceText, const QString& comment )
}
}
-QString Uic::mkStdSet( const QString& prop )
+TQString Uic::mkStdSet( const TQString& prop )
{
- return QString( "set" ) + prop[0].upper() + prop.mid(1);
+ return TQString( "set" ) + prop[0].upper() + prop.mid(1);
}
@@ -158,9 +158,9 @@ QString Uic::mkStdSet( const QString& prop )
The class Uic encapsulates the user interface compiler (uic).
*/
-Uic::Uic( const QString &fn, const char *outputFn, QTextStream &outStream,
- QDomDocument doc, bool subcl, const QString &trm,
- const QString& subClass, QString &uicClass )
+Uic::Uic( const TQString &fn, const char *outputFn, TQTextStream &outStream,
+ TQDomDocument doc, bool subcl, const TQString &trm,
+ const TQString& subClass, TQString &uicClass )
: out( outStream ), trout (&languageChangeBody ),
outputFileName( outputFn ), trmacro( trm ),
pyNeedTr(FALSE), pyNeedTrUtf8(FALSE)
@@ -191,14 +191,14 @@ Uic::Uic( const QString &fn, const char *outputFn, QTextStream &outStream,
return;
// Extract any Python code in the comments.
- QStringList comm = QStringList::split('\n',getComment(doc.firstChild()));
+ TQStringList comm = TQStringList::split('\n',getComment(doc.firstChild()));
- for (QStringList::Iterator it = comm.begin(); it != comm.end(); ++it)
+ for (TQStringList::Iterator it = comm.begin(); it != comm.end(); ++it)
if ((*it).startsWith("Python:"))
pyCode += (*it).mid(7) + "\n";
- QDomElement e = doc.firstChild().firstChild().toElement();
- QDomElement widget;
+ TQDomElement e = doc.firstChild().firstChild().toElement();
+ TQDomElement widget;
while ( !e.isNull() ) {
if ( e.tagName() == "widget" ) {
widget = e;
@@ -213,13 +213,13 @@ Uic::Uic( const QString &fn, const char *outputFn, QTextStream &outStream,
bool ok;
defSpacing.toInt( &ok );
if ( !ok ) {
- QString buf = defSpacing.toString();
+ TQString buf = defSpacing.toString();
defSpacing = buf.append( "()" );
}
defMargin = e.attribute( "margin", defMargin.toString() );
defMargin.toInt( &ok );
if ( !ok ) {
- QString buf = defMargin.toString();
+ TQString buf = defMargin.toString();
defMargin = buf.append( "()" );
}
}
@@ -232,7 +232,7 @@ Uic::Uic( const QString &fn, const char *outputFn, QTextStream &outStream,
uicClass = nameOfClass;
- namespaces = QStringList::split( "::", nameOfClass );
+ namespaces = TQStringList::split( "::", nameOfClass );
bareNameOfClass = namespaces.last();
namespaces.remove( namespaces.fromLast() );
@@ -258,7 +258,7 @@ Uic::Uic( const QString &fn, const char *outputFn, QTextStream &outStream,
out << "\n";
out << indent << "def __trUtf8(self,s,c = None):\n";
++indent;
- out << indent << "return qApp.translate(\"" << nameOfClass << "\",s,c,QApplication.UnicodeUTF8)\n";
+ out << indent << "return qApp.translate(\"" << nameOfClass << "\",s,c,TQApplication.UnicodeUTF8)\n";
--indent;
}
@@ -267,26 +267,26 @@ Uic::Uic( const QString &fn, const char *outputFn, QTextStream &outStream,
/*! Extracts a pixmap loader function from \a e
*/
-QString Uic::getPixmapLoaderFunction( const QDomElement& e )
+TQString Uic::getPixmapLoaderFunction( const TQDomElement& e )
{
- QDomElement n;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "pixmapfunction" )
return n.firstChild().toText().data();
}
- return QString::null;
+ return TQString::null;
}
/*! Extracts the forms class name from \a e
*/
-QString Uic::getFormClassName( const QDomElement& e )
+TQString Uic::getFormClassName( const TQDomElement& e )
{
- QDomElement n;
- QString cn;
+ TQDomElement n;
+ TQString cn;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "class" ) {
- QString s = n.firstChild().toText().data();
+ TQString s = n.firstChild().toText().data();
int i;
while ( ( i = s.find(' ' )) != -1 )
s[i] = '_';
@@ -298,24 +298,24 @@ QString Uic::getFormClassName( const QDomElement& e )
/*! Extracts a class name from \a e.
*/
-QString Uic::getClassName( const QDomElement& e )
+TQString Uic::getClassName( const TQDomElement& e )
{
- QString s = e.attribute( "class" );
+ TQString s = e.attribute( "class" );
if ( s.isEmpty() && e.tagName() == "toolbar" )
- s = "QToolBar";
+ s = "TQToolBar";
else if ( s.isEmpty() && e.tagName() == "menubar" )
- s = "QMenuBar";
+ s = "TQMenuBar";
return s;
}
/*! Returns TRUE if database framework code is generated, else FALSE.
*/
-bool Uic::isFrameworkCodeGenerated( const QDomElement& e )
+bool Uic::isFrameworkCodeGenerated( const TQDomElement& e )
{
- QDomElement n = getObjectProperty( e, "frameworkCode" );
+ TQDomElement n = getObjectProperty( e, "frameworkCode" );
if ( n.attribute("name") == "frameworkCode" &&
- !DomTool::elementToVariant( n.firstChild().toElement(), QVariant( TRUE, 0 ) ).toBool() )
+ !DomTool::elementToVariant( n.firstChild().toElement(), TQVariant( TRUE, 0 ) ).toBool() )
return FALSE;
return TRUE;
}
@@ -323,38 +323,38 @@ bool Uic::isFrameworkCodeGenerated( const QDomElement& e )
/*! Extracts an object name from \a e. It's stored in the 'name'
property.
*/
-QString Uic::getObjectName( const QDomElement& e )
+TQString Uic::getObjectName( const TQDomElement& e )
{
- QDomElement n = getObjectProperty( e, "name" );
+ TQDomElement n = getObjectProperty( e, "name" );
if ( n.firstChild().toElement().tagName() == "cstring" )
return n.firstChild().toElement().firstChild().toText().data();
- return QString::null;
+ return TQString::null;
}
/*! Extracts an layout name from \a e. It's stored in the 'name'
property of the preceeding sibling (the first child of a QLayoutWidget).
*/
-QString Uic::getLayoutName( const QDomElement& e )
+TQString Uic::getLayoutName( const TQDomElement& e )
{
- QDomElement p = e.parentNode().toElement();
- QString name;
+ TQDomElement p = e.parentNode().toElement();
+ TQString name;
if ( getClassName(p) != "QLayoutWidget" )
name = "Layout";
- QDomElement n = getObjectProperty( p, "name" );
+ TQDomElement n = getObjectProperty( p, "name" );
if ( n.firstChild().toElement().tagName() == "cstring" ) {
name.prepend( n.firstChild().toElement().firstChild().toText().data() );
- return QStringList::split( "::", name ).last();
+ return TQStringList::split( "::", name ).last();
}
return e.tagName();
}
-QString Uic::getDatabaseInfo( const QDomElement& e, const QString& tag )
+TQString Uic::getDatabaseInfo( const TQDomElement& e, const TQString& tag )
{
- QDomElement n;
- QDomElement n1;
+ TQDomElement n;
+ TQDomElement n1;
int child = 0;
// database info is a stringlist stored in this order
if ( tag == "connection" )
@@ -364,65 +364,65 @@ QString Uic::getDatabaseInfo( const QDomElement& e, const QString& tag )
else if ( tag == "field" )
child = 2;
else
- return QString::null;
+ return TQString::null;
n = getObjectProperty( e, "database" );
if ( n.firstChild().toElement().tagName() == "stringlist" ) {
// find correct stringlist entry
- QDomElement n1 = n.firstChild().firstChild().toElement();
+ TQDomElement n1 = n.firstChild().firstChild().toElement();
for ( int i = 0; i < child && !n1.isNull(); ++i )
n1 = n1.nextSibling().toElement();
if ( n1.isNull() )
- return QString::null;
+ return TQString::null;
return n1.firstChild().toText().data();
}
- return QString::null;
+ return TQString::null;
}
/*!
Returns include file for class \a className or a null string.
*/
-QString Uic::getInclude( const QString& className )
+TQString Uic::getInclude( const TQString& className )
{
int wid = WidgetDatabase::idFromClassName( className );
if ( wid != -1 )
return WidgetDatabase::includeFile( wid );
- return QString::null;
+ return TQString::null;
}
-void Uic::createActionImpl( const QDomElement &n, const QString &parent )
+void Uic::createActionImpl( const TQDomElement &n, const TQString &parent )
{
- for ( QDomElement ae = n; !ae.isNull(); ae = ae.nextSibling().toElement() ) {
- QString objName = registerObject( getObjectName( ae ) );
+ for ( TQDomElement ae = n; !ae.isNull(); ae = ae.nextSibling().toElement() ) {
+ TQString objName = registerObject( getObjectName( ae ) );
if ( ae.tagName() == "action" )
- out << indent << "self." << objName << " = QAction(" << parent << ",\"" << objName << "\")" << endl;
+ out << indent << "self." << objName << " = TQAction(" << parent << ",\"" << objName << "\")" << endl;
else if ( ae.tagName() == "actiongroup" )
- out << indent << "self." << objName << " = QActionGroup(" << parent << ",\"" << objName << "\")" << endl;
+ out << indent << "self." << objName << " = TQActionGroup(" << parent << ",\"" << objName << "\")" << endl;
else
continue;
bool subActionsDone = FALSE;
#if QT_VERSION >= 0x030300
bool hasMenuText = FALSE;
- QString actionText;
+ TQString actionText;
#endif
- for ( QDomElement n2 = ae.firstChild().toElement(); !n2.isNull(); n2 = n2.nextSibling().toElement() ) {
+ for ( TQDomElement n2 = ae.firstChild().toElement(); !n2.isNull(); n2 = n2.nextSibling().toElement() ) {
if ( n2.tagName() == "property" ) {
bool stdset = stdsetdef;
if ( n2.hasAttribute( "stdset" ) )
stdset = toBool( n2.attribute( "stdset" ) );
- QString prop = n2.attribute("name");
+ TQString prop = n2.attribute("name");
if ( prop == "name" )
continue;
- QString value = setObjectProperty( "QAction", objName, prop, n2.firstChild().toElement(), stdset );
+ TQString value = setObjectProperty( "TQAction", objName, prop, n2.firstChild().toElement(), stdset );
if ( value.isEmpty() )
continue;
- QString call = "self." + objName + ".";
+ TQString call = "self." + objName + ".";
if ( stdset )
call += mkStdSet( prop ) + "(" + value + ")";
else
- call += "setProperty(\"" + prop + "\",QVariant(" + value + "))";
+ call += "setProperty(\"" + prop + "\",TQVariant(" + value + "))";
#if QT_VERSION >= 0x030300
if (prop == "menuText")
@@ -442,14 +442,14 @@ void Uic::createActionImpl( const QDomElement &n, const QString &parent )
}
}
#if QT_VERSION >= 0x030300
- // workaround for loading pre-3.3 files expecting bogus QAction behavior
+ // workaround for loading pre-3.3 files expecting bogus TQAction behavior
if (!hasMenuText && !actionText.isEmpty() && uiFileVersion < "3.3")
trout << indent << "self." << objName << ".setMenuText(" << actionText << ")" << endl;
#endif
}
}
-QString get_dock( const QString &d )
+TQString get_dock( const TQString &d )
{
if ( d == "0" )
return "Qt.DockUnmanaged";
@@ -468,27 +468,27 @@ QString get_dock( const QString &d )
return "";
}
-void Uic::createToolbarImpl( const QDomElement &n, const QString &parentClass, const QString &parent )
+void Uic::createToolbarImpl( const TQDomElement &n, const TQString &parentClass, const TQString &parent )
{
- QDomNodeList nl = n.elementsByTagName( "toolbar" );
+ TQDomNodeList nl = n.elementsByTagName( "toolbar" );
for ( int i = 0; i < (int) nl.length(); i++ ) {
- QDomElement ae = nl.item( i ).toElement();
- QString dock = get_dock( ae.attribute( "dock" ) );
- QString objName = getObjectName( ae );
- out << indent << "self." << objName << " = QToolBar(QString(\"\"),self," << dock << ")" << endl;
+ TQDomElement ae = nl.item( i ).toElement();
+ TQString dock = get_dock( ae.attribute( "dock" ) );
+ TQString objName = getObjectName( ae );
+ out << indent << "self." << objName << " = TQToolBar(TQString(\"\"),self," << dock << ")" << endl;
createObjectImpl( ae, parentClass, parent );
- for ( QDomElement n2 = ae.firstChild().toElement(); !n2.isNull(); n2 = n2.nextSibling().toElement() ) {
+ for ( TQDomElement n2 = ae.firstChild().toElement(); !n2.isNull(); n2 = n2.nextSibling().toElement() ) {
if ( n2.tagName() == "action" ) {
out << indent << "self." << n2.attribute( "name" ) << ".addTo(self." << objName << ")" << endl;
} else if ( n2.tagName() == "separator" ) {
out << indent << "self." << objName << ".addSeparator()" << endl;
} else if ( n2.tagName() == "widget" ) {
if ( n2.attribute( "class" ) != "Spacer" ) {
- createObjectImpl( n2, "QToolBar", "self." + objName );
+ createObjectImpl( n2, "TQToolBar", "self." + objName );
} else {
- QString child = createSpacerImpl( n2, parentClass, parent, objName );
- out << indent << "QApplication.sendPostedEvents(self." << objName
- << ",QEvent.ChildInserted)" << endl;
+ TQString child = createSpacerImpl( n2, parentClass, parent, objName );
+ out << indent << "TQApplication.sendPostedEvents(self." << objName
+ << ",TQEvent.ChildInserted)" << endl;
out << indent << "self." << objName << ".boxLayout().addItem(" << child << ")" << endl;
}
}
@@ -496,22 +496,22 @@ void Uic::createToolbarImpl( const QDomElement &n, const QString &parentClass, c
}
}
-void Uic::createMenuBarImpl( const QDomElement &n, const QString &parentClass, const QString &parent )
+void Uic::createMenuBarImpl( const TQDomElement &n, const TQString &parentClass, const TQString &parent )
{
- QString objName = getObjectName( n );
- out << indent << "self." << objName << " = QMenuBar(self,\"" << objName << "\")" << endl;
+ TQString objName = getObjectName( n );
+ out << indent << "self." << objName << " = TQMenuBar(self,\"" << objName << "\")" << endl;
createObjectImpl( n, parentClass, parent );
int i = 0;
- QDomElement c = n.firstChild().toElement();
+ TQDomElement c = n.firstChild().toElement();
while ( !c.isNull() ) {
if ( c.tagName() == "item" ) {
- QString itemName = "self." + c.attribute( "name" );
+ TQString itemName = "self." + c.attribute( "name" );
out << endl;
- out << indent << itemName << " = QPopupMenu(self)" << endl;
+ out << indent << itemName << " = TQPopupMenu(self)" << endl;
createPopupMenuImpl( c, parentClass, itemName );
- out << indent << "self." << objName << ".insertItem(QString(\"\")," << itemName << "," << i << ")" << endl;
- QString findItem("self." + objName + ".findItem(%1)");
+ out << indent << "self." << objName << ".insertItem(TQString(\"\")," << itemName << "," << i << ")" << endl;
+ TQString findItem("self." + objName + ".findItem(%1)");
findItem = findItem.arg(i);
trout << indent << "if " << findItem << ":" << endl;
++indent;
@@ -526,16 +526,16 @@ void Uic::createMenuBarImpl( const QDomElement &n, const QString &parentClass, c
}
}
-void Uic::createPopupMenuImpl( const QDomElement &e, const QString &parentClass, const QString &parent )
+void Uic::createPopupMenuImpl( const TQDomElement &e, const TQString &parentClass, const TQString &parent )
{
int i = 0;
- for ( QDomElement n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
+ for ( TQDomElement n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "action" || n.tagName() == "actiongroup" ) {
- QDomElement n2 = n.nextSibling().toElement();
+ TQDomElement n2 = n.nextSibling().toElement();
if ( n2.tagName() == "item" ) { // the action has a sub menu
- QString itemName = "self." + n2.attribute( "name" );
- QString itemText = n2.attribute( "text" );
- out << indent << itemName << " = QPopupMenu(self)" << endl;
+ TQString itemName = "self." + n2.attribute( "name" );
+ TQString itemText = n2.attribute( "text" );
+ out << indent << itemName << " = TQPopupMenu(self)" << endl;
out << indent << parent << ".setAccel(" << trcall( n2.attribute( "accel" ) ) << ",";
out << parent << ".insertItem(" << "self." << n.attribute( "name" ) << ".iconSet(),";
out << trcall( itemText ) << "," << itemName << "))" << endl;
@@ -557,17 +557,17 @@ void Uic::createPopupMenuImpl( const QDomElement &e, const QString &parentClass,
Creates implementation of an listbox item tag.
*/
-QString Uic::createListBoxItemImpl( const QDomElement &e, const QString &parent ,
- QString *value )
+TQString Uic::createListBoxItemImpl( const TQDomElement &e, const TQString &parent ,
+ TQString *value )
{
- QDomElement n = e.firstChild().toElement();
- QString txt;
- QString com;
- QString pix;
+ TQDomElement n = e.firstChild().toElement();
+ TQString txt;
+ TQString com;
+ TQString pix;
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
- QString attrib = n.attribute( "name" );
- QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() );
+ TQString attrib = n.attribute( "name" );
+ TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() );
if ( attrib == "text" ) {
txt = v.toString();
com = getComment( n );
@@ -577,8 +577,8 @@ QString Uic::createListBoxItemImpl( const QDomElement &e, const QString &parent
if ( pixmapLoaderFunction.isEmpty() ) {
pix.prepend( "self." );
} else {
- pix.prepend( pixmapLoaderFunction + "( " + QString( externPixmaps ? "\"" : "self." ) );
- pix.append( QString( externPixmaps ? "\"" : "" ) + ")" );
+ pix.prepend( pixmapLoaderFunction + "( " + TQString( externPixmaps ? "\"" : "self." ) );
+ pix.append( TQString( externPixmaps ? "\"" : "" ) + ")" );
}
}
}
@@ -599,16 +599,16 @@ QString Uic::createListBoxItemImpl( const QDomElement &e, const QString &parent
Creates implementation of an iconview item tag.
*/
-QString Uic::createIconViewItemImpl( const QDomElement &e, const QString &parent )
+TQString Uic::createIconViewItemImpl( const TQDomElement &e, const TQString &parent )
{
- QDomElement n = e.firstChild().toElement();
- QString txt;
- QString com;
- QString pix;
+ TQDomElement n = e.firstChild().toElement();
+ TQString txt;
+ TQString com;
+ TQString pix;
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
- QString attrib = n.attribute( "name" );
- QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() );
+ TQString attrib = n.attribute( "name" );
+ TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() );
if ( attrib == "text" ) {
txt = v.toString();
com = getComment( n );
@@ -618,8 +618,8 @@ QString Uic::createIconViewItemImpl( const QDomElement &e, const QString &parent
if ( pixmapLoaderFunction.isEmpty() ) {
pix.prepend( "self." );
} else {
- pix.prepend( pixmapLoaderFunction + "( " + QString( externPixmaps ? "\"" : "self." ) );
- pix.append( QString( externPixmaps ? "\"" : "" ) + ")" );
+ pix.prepend( pixmapLoaderFunction + "( " + TQString( externPixmaps ? "\"" : "self." ) );
+ pix.append( TQString( externPixmaps ? "\"" : "" ) + ")" );
}
}
}
@@ -628,24 +628,24 @@ QString Uic::createIconViewItemImpl( const QDomElement &e, const QString &parent
}
if ( pix.isEmpty() )
- return "QIconViewItem(" + parent + "," + trcall( txt, com ) + ")";
+ return "TQIconViewItem(" + parent + "," + trcall( txt, com ) + ")";
else
- return "QIconViewItem(" + parent + "," + trcall( txt, com ) + "," + pix + ")";
+ return "TQIconViewItem(" + parent + "," + trcall( txt, com ) + "," + pix + ")";
}
/*!
Creates implementation of an listview item tag.
*/
-QString Uic::createListViewItemImpl( const QDomElement &e, const QString &parent,
- const QString &parentItem )
+TQString Uic::createListViewItemImpl( const TQDomElement &e, const TQString &parent,
+ const TQString &parentItem )
{
- QString s;
+ TQString s;
- QDomElement n = e.firstChild().toElement();
+ TQDomElement n = e.firstChild().toElement();
bool hasChildren = e.elementsByTagName( "item" ).count() > 0;
- QString item;
+ TQString item;
if ( hasChildren ) {
item = registerObject( "item" );
@@ -656,26 +656,26 @@ QString Uic::createListViewItemImpl( const QDomElement &e, const QString &parent
s = trindent + item + " = ";
if ( !parentItem.isEmpty() )
- s += "QListViewItem(" + parentItem + "," + lastItem + ")\n";
+ s += "TQListViewItem(" + parentItem + "," + lastItem + ")\n";
else
- s += "QListViewItem(" + parent + "," + lastItem + ")\n";
+ s += "TQListViewItem(" + parent + "," + lastItem + ")\n";
- QStringList texts;
- QStringList pixmaps;
+ TQStringList texts;
+ TQStringList pixmaps;
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
- QString attrib = n.attribute("name");
- QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() );
+ TQString attrib = n.attribute("name");
+ TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() );
if ( attrib == "text" )
texts << v.toString();
else if ( attrib == "pixmap" ) {
- QString pix = v.toString();
+ TQString pix = v.toString();
if ( !pix.isEmpty() ) {
if ( pixmapLoaderFunction.isEmpty() ) {
pix.prepend( "self." );
} else {
- pix.prepend( pixmapLoaderFunction + "( " + QString( externPixmaps ? "\"" : "self." ) );
- pix.append( QString( externPixmaps ? "\"" : "" ) + ")" );
+ pix.prepend( pixmapLoaderFunction + "( " + TQString( externPixmaps ? "\"" : "self." ) );
+ pix.append( TQString( externPixmaps ? "\"" : "" ) + ")" );
}
}
pixmaps << pix;
@@ -689,9 +689,9 @@ QString Uic::createListViewItemImpl( const QDomElement &e, const QString &parent
for ( int i = 0; i < (int)texts.count(); ++i ) {
if ( !texts[ i ].isEmpty() )
- s += trindent + item + ".setText(" + QString::number( i ) + "," + trcall( texts[ i ] ) + ")\n";
+ s += trindent + item + ".setText(" + TQString::number( i ) + "," + trcall( texts[ i ] ) + ")\n";
if ( !pixmaps[ i ].isEmpty() )
- s += trindent + item + ".setPixmap(" + QString::number( i ) + "," + pixmaps[ i ] + ")\n";
+ s += trindent + item + ".setPixmap(" + TQString::number( i ) + "," + pixmaps[ i ] + ")\n";
}
lastItem = item;
@@ -702,18 +702,18 @@ QString Uic::createListViewItemImpl( const QDomElement &e, const QString &parent
Creates implementation of an listview column tag.
*/
-QString Uic::createListViewColumnImpl( const QDomElement &e, const QString &parent,
- QString *value )
+TQString Uic::createListViewColumnImpl( const TQDomElement &e, const TQString &parent,
+ TQString *value )
{
- QDomElement n = e.firstChild().toElement();
- QString txt;
- QString com;
- QString pix;
+ TQDomElement n = e.firstChild().toElement();
+ TQString txt;
+ TQString com;
+ TQString pix;
bool clickable = FALSE, resizable = FALSE;
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
- QString attrib = n.attribute("name");
- QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() );
+ TQString attrib = n.attribute("name");
+ TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() );
if ( attrib == "text" ) {
txt = v.toString();
com = getComment( n );
@@ -723,8 +723,8 @@ QString Uic::createListViewColumnImpl( const QDomElement &e, const QString &pare
if ( pixmapLoaderFunction.isEmpty() ) {
pix.prepend( "self." );
} else {
- pix.prepend( pixmapLoaderFunction + "( " + QString( externPixmaps ? "\"" : "self." ) );
- pix.append( QString( externPixmaps ? "\"" : "" ) + ")" );
+ pix.prepend( pixmapLoaderFunction + "( " + TQString( externPixmaps ? "\"" : "self." ) );
+ pix.append( TQString( externPixmaps ? "\"" : "" ) + ")" );
}
}
} else if ( attrib == "clickable" )
@@ -738,10 +738,10 @@ QString Uic::createListViewColumnImpl( const QDomElement &e, const QString &pare
if ( value )
*value = trcall( txt, com );
- QString s;
+ TQString s;
s = indent + parent + ".addColumn(" + trcall( txt, com ) + ")\n";
if ( !pix.isEmpty() )
- s += indent + parent + ".header().setLabel(" + parent + ".header().count() - 1,QIconSet(" + pix + ")," + trcall( txt, com ) + ")\n";
+ s += indent + parent + ".header().setLabel(" + parent + ".header().count() - 1,TQIconSet(" + pix + ")," + trcall( txt, com ) + ")\n";
if ( !clickable )
s += indent + parent + ".header().setClickEnabled(0," + parent + ".header().count() - 1)\n";
if ( !resizable )
@@ -749,20 +749,20 @@ QString Uic::createListViewColumnImpl( const QDomElement &e, const QString &pare
return s;
}
-QString Uic::createTableRowColumnImpl( const QDomElement &e, const QString &parent,
- QString *value )
+TQString Uic::createTableRowColumnImpl( const TQDomElement &e, const TQString &parent,
+ TQString *value )
{
- QString objClass = getClassName( e.parentNode().toElement() );
- QDomElement n = e.firstChild().toElement();
- QString txt;
- QString com;
- QString pix;
- QString field;
+ TQString objClass = getClassName( e.parentNode().toElement() );
+ TQDomElement n = e.firstChild().toElement();
+ TQString txt;
+ TQString com;
+ TQString pix;
+ TQString field;
bool isRow = e.tagName() == "row";
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
- QString attrib = n.attribute("name");
- QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() );
+ TQString attrib = n.attribute("name");
+ TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() );
if ( attrib == "text" ) {
txt = v.toString();
com = getComment( n );
@@ -772,8 +772,8 @@ QString Uic::createTableRowColumnImpl( const QDomElement &e, const QString &pare
if ( pixmapLoaderFunction.isEmpty() ) {
pix.prepend( "self." );
} else {
- pix.prepend( pixmapLoaderFunction + "( " + QString( externPixmaps ? "\"" : "self." ) );
- pix.append( QString( externPixmaps ? "\"" : "" ) + ")" );
+ pix.prepend( pixmapLoaderFunction + "( " + TQString( externPixmaps ? "\"" : "self." ) );
+ pix.append( TQString( externPixmaps ? "\"" : "" ) + ")" );
}
}
} else if ( attrib == "field" )
@@ -787,32 +787,32 @@ QString Uic::createTableRowColumnImpl( const QDomElement &e, const QString &pare
// ### This generated code sucks! We have to set the number of
// rows/cols before and then only do setLabel/()
- // ### careful, though, since QDataTable has an API which makes this code pretty good
+ // ### careful, though, since TQDataTable has an API which makes this code pretty good
- QString s;
+ TQString s;
if ( isRow ) {
s = indent + parent + ".setNumRows(" + parent + ".numRows() + 1)\n";
if ( pix.isEmpty() )
s += indent + parent + ".verticalHeader().setLabel(" + parent + ".numRows() - 1,"
+ trcall( txt, com ) + ")\n";
else
- s += indent + parent + ".verticalHeader().setLabel(" + parent + ".numRows() - 1,QIconSet("
+ s += indent + parent + ".verticalHeader().setLabel(" + parent + ".numRows() - 1,TQIconSet("
+ pix + ")," + trcall( txt, com ) + ")\n";
} else {
- if ( objClass == "QTable" ) {
+ if ( objClass == "TQTable" ) {
s = indent + parent + ".setNumCols(" + parent + ".numCols() + 1)\n";
if ( pix.isEmpty() )
s += indent + parent + ".horizontalHeader().setLabel(" + parent + ".numCols() - 1,"
+ trcall( txt, com ) + ")\n";
else
- s += indent + parent + ".horizontalHeader().setLabel(" + parent + ".numCols() - 1,QIconSet("
+ s += indent + parent + ".horizontalHeader().setLabel(" + parent + ".numCols() - 1,TQIconSet("
+ pix + ")," + trcall( txt, com ) + ")\n";
- } else if ( objClass == "QDataTable" ) {
+ } else if ( objClass == "TQDataTable" ) {
if ( !txt.isEmpty() && !field.isEmpty() ) {
if ( pix.isEmpty() )
out << indent << parent << ".addColumn(" << fixString( field ) << "," << trcall( txt, com ) << ")" << endl;
else
- out << indent << parent << ".addColumn(" << fixString( field ) << "," << trcall( txt, com ) << ",QIconSet(" << pix << "))" << endl;
+ out << indent << parent << ".addColumn(" << fixString( field ) << "," << trcall( txt, com ) << ",TQIconSet(" << pix << "))" << endl;
}
}
}
@@ -822,30 +822,30 @@ QString Uic::createTableRowColumnImpl( const QDomElement &e, const QString &pare
/*!
Creates the implementation of a layout tag. Called from createObjectImpl().
*/
-QString Uic::createLayoutImpl( const QDomElement &e, const QString& parentClass, const QString& parent, const QString& layout )
+TQString Uic::createLayoutImpl( const TQDomElement &e, const TQString& parentClass, const TQString& parent, const TQString& layout )
{
- QDomElement n;
- QString objClass, objName;
+ TQDomElement n;
+ TQString objClass, objName;
objClass = e.tagName();
- QString qlayout = "QVBoxLayout";
+ TQString qlayout = "TQVBoxLayout";
if ( objClass == "hbox" )
- qlayout = "QHBoxLayout";
+ qlayout = "TQHBoxLayout";
else if ( objClass == "grid" )
- qlayout = "QGridLayout";
+ qlayout = "TQGridLayout";
bool isGrid = e.tagName() == "grid" ;
objName = registerObject( getLayoutName( e ) );
layoutObjects += objName;
- QString margin = DomTool::readProperty( e, "margin", defMargin ).toString();
- QString spacing = DomTool::readProperty( e, "spacing", defSpacing ).toString();
- QString resizeMode = DomTool::readProperty( e, "resizeMode", QString::null ).toString();
+ TQString margin = DomTool::readProperty( e, "margin", defMargin ).toString();
+ TQString spacing = DomTool::readProperty( e, "spacing", defSpacing ).toString();
+ TQString resizeMode = DomTool::readProperty( e, "resizeMode", TQString::null ).toString();
- QString optcells;
+ TQString optcells;
if ( isGrid )
optcells = "1,1,";
- if ( (parentClass == "QGroupBox" || parentClass == "QButtonGroup") && layout.isEmpty() ) {
+ if ( (parentClass == "TQGroupBox" || parentClass == "TQButtonGroup") && layout.isEmpty() ) {
// special case for group box
out << indent << parent << ".setColumnLayout(0,Qt.Vertical)" << endl;
out << indent << parent << ".layout().setSpacing(" << spacing << ")" << endl;
@@ -864,15 +864,15 @@ QString Uic::createLayoutImpl( const QDomElement &e, const QString& parentClass,
out << "," << optcells << margin << "," << spacing << ",\"" << objName << "\")" << endl;
}
if ( !resizeMode.isEmpty() )
- out << indent << objName << ".setResizeMode(QLayout." << resizeMode << ")" << endl;
+ out << indent << objName << ".setResizeMode(TQLayout." << resizeMode << ")" << endl;
if ( !isGrid ) {
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "spacer" ) {
- QString child = createSpacerImpl( n, parentClass, parent, objName );
+ TQString child = createSpacerImpl( n, parentClass, parent, objName );
out << indent << objName << ".addItem(" << child << ")" << endl;
} else if ( tags.contains( n.tagName() ) ) {
- QString child = createObjectImpl( n, parentClass, parent, objName );
+ TQString child = createObjectImpl( n, parentClass, parent, objName );
if ( isLayout( child ) )
out << indent << objName << ".addLayout(" << child << ")" << endl;
else
@@ -881,7 +881,7 @@ QString Uic::createLayoutImpl( const QDomElement &e, const QString& parentClass,
}
} else {
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
- QDomElement ae = n;
+ TQDomElement ae = n;
int row = ae.attribute( "row" ).toInt();
int col = ae.attribute( "column" ).toInt();
int rowspan = ae.attribute( "rowspan" ).toInt();
@@ -891,7 +891,7 @@ QString Uic::createLayoutImpl( const QDomElement &e, const QString& parentClass,
if ( colspan < 1 )
colspan = 1;
if ( n.tagName() == "spacer" ) {
- QString child = createSpacerImpl( n, parentClass, parent, objName );
+ TQString child = createSpacerImpl( n, parentClass, parent, objName );
if ( rowspan * colspan != 1 )
out << indent << objName << ".addMultiCell(" << child << ","
<< row << "," << ( row + rowspan - 1 ) << "," << col << "," << ( col + colspan - 1 ) << ")" << endl;
@@ -899,9 +899,9 @@ QString Uic::createLayoutImpl( const QDomElement &e, const QString& parentClass,
out << indent << objName << ".addItem(" << child << ","
<< row << "," << col << ")" << endl;
} else if ( tags.contains( n.tagName() ) ) {
- QString child = createObjectImpl( n, parentClass, parent, objName );
+ TQString child = createObjectImpl( n, parentClass, parent, objName );
out << endl;
- QString o = "Widget";
+ TQString o = "Widget";
if ( isLayout( child ) )
o = "Layout";
if ( rowspan * colspan != 1 )
@@ -919,31 +919,31 @@ QString Uic::createLayoutImpl( const QDomElement &e, const QString& parentClass,
-QString Uic::createSpacerImpl( const QDomElement &e, const QString& /*parentClass*/, const QString& /*parent*/, const QString& /*layout*/)
+TQString Uic::createSpacerImpl( const TQDomElement &e, const TQString& /*parentClass*/, const TQString& /*parent*/, const TQString& /*layout*/)
{
- QDomElement n;
- QString objClass, objName;
+ TQDomElement n;
+ TQString objClass, objName;
objClass = e.tagName();
objName = registerObject( getObjectName( e ) );
- QSize size = DomTool::readProperty( e, "sizeHint", QSize( 0, 0 ) ).toSize();
- QString sizeType = DomTool::readProperty( e, "sizeType", "Expanding" ).toString();
+ TQSize size = DomTool::readProperty( e, "sizeHint", TQSize( 0, 0 ) ).toSize();
+ TQString sizeType = DomTool::readProperty( e, "sizeType", "Expanding" ).toString();
bool isVspacer = DomTool::readProperty( e, "orientation", "Horizontal" ) == "Vertical";
if ( sizeType != "Expanding" && sizeType != "MinimumExpanding" &&
DomTool::hasProperty( e, "geometry" ) ) { // compatibility Qt 2.2
- QRect geom = DomTool::readProperty( e, "geometry", QRect(0,0,0,0) ).toRect();
+ TQRect geom = DomTool::readProperty( e, "geometry", TQRect(0,0,0,0) ).toRect();
size = geom.size();
}
if ( isVspacer )
- out << indent << objName << " = QSpacerItem("
+ out << indent << objName << " = TQSpacerItem("
<< size.width() << "," << size.height()
- << ",QSizePolicy.Minimum,QSizePolicy." << sizeType << ")" << endl;
+ << ",TQSizePolicy.Minimum,TQSizePolicy." << sizeType << ")" << endl;
else
- out << indent << objName << " = QSpacerItem("
+ out << indent << objName << " = TQSpacerItem("
<< size.width() << "," << size.height()
- << ",QSizePolicy." << sizeType << ",QSizePolicy.Minimum)" << endl;
+ << ",TQSizePolicy." << sizeType << ",TQSizePolicy.Minimum)" << endl;
return objName;
}
@@ -958,35 +958,35 @@ static const char* const ColorRole[] = {
/*!
Creates a colorgroup with name \a name from the color group \a cg
*/
-void Uic::createColorGroupImpl( const QString& name, const QDomElement& e )
+void Uic::createColorGroupImpl( const TQString& name, const TQDomElement& e )
{
- QColorGroup cg;
+ TQColorGroup cg;
int r = -1;
- QDomElement n = e.firstChild().toElement();
- QString color;
+ TQDomElement n = e.firstChild().toElement();
+ TQString color;
while ( !n.isNull() ) {
if ( n.tagName() == "color" ) {
r++;
- QColor col = DomTool::readColor( n );
- color = "QColor(%1,%2,%3)";
+ TQColor col = DomTool::readColor( n );
+ color = "TQColor(%1,%2,%3)";
color = color.arg( col.red() ).arg( col.green() ).arg( col.blue() );
if ( col == white )
color = "Qt.white";
else if ( col == black )
color = "Qt.black";
if ( n.nextSibling().toElement().tagName() != "pixmap" ) {
- out << indent << name << ".setColor(QColorGroup." << ColorRole[r] << "," << color << ")" << endl;
+ out << indent << name << ".setColor(TQColorGroup." << ColorRole[r] << "," << color << ")" << endl;
}
} else if ( n.tagName() == "pixmap" ) {
- QString pixmap = n.firstChild().toText().data();
+ TQString pixmap = n.firstChild().toText().data();
if ( pixmapLoaderFunction.isEmpty() ) {
pixmap.prepend( "self." );
} else {
- pixmap.prepend( pixmapLoaderFunction + "(" + QString( externPixmaps ? "\"" : "self." ) );
- pixmap.append( QString( externPixmaps ? "\"" : "" ) + ")" );
+ pixmap.prepend( pixmapLoaderFunction + "(" + TQString( externPixmaps ? "\"" : "self." ) );
+ pixmap.append( TQString( externPixmaps ? "\"" : "" ) + ")" );
}
- out << indent << name << ".setBrush(QColorGroup."
- << ColorRole[r] << ",QBrush(" << color << "," << pixmap << "))" << endl;
+ out << indent << name << ".setBrush(TQColorGroup."
+ << ColorRole[r] << ",TQBrush(" << color << "," << pixmap << "))" << endl;
}
n = n.nextSibling().toElement();
}
@@ -996,16 +996,16 @@ void Uic::createColorGroupImpl( const QString& name, const QDomElement& e )
Auxiliary function to load a color group. The colorgroup must not
contain pixmaps.
*/
-QColorGroup Uic::loadColorGroup( const QDomElement &e )
+TQColorGroup Uic::loadColorGroup( const TQDomElement &e )
{
- QColorGroup cg;
+ TQColorGroup cg;
int r = -1;
- QDomElement n = e.firstChild().toElement();
- QColor col;
+ TQDomElement n = e.firstChild().toElement();
+ TQColor col;
while ( !n.isNull() ) {
if ( n.tagName() == "color" ) {
r++;
- cg.setColor( (QColorGroup::ColorRole)r, (col = DomTool::readColor( n ) ) );
+ cg.setColor( (TQColorGroup::ColorRole)r, (col = DomTool::readColor( n ) ) );
}
n = n.nextSibling().toElement();
}
@@ -1016,10 +1016,10 @@ QColorGroup Uic::loadColorGroup( const QDomElement &e )
the database \a connection and \a table.
*/
-bool Uic::isWidgetInTable( const QDomElement& e, const QString& connection, const QString& table )
+bool Uic::isWidgetInTable( const TQDomElement& e, const TQString& connection, const TQString& table )
{
- QString conn = getDatabaseInfo( e, "connection" );
- QString tab = getDatabaseInfo( e, "table" );
+ TQString conn = getDatabaseInfo( e, "connection" );
+ TQString tab = getDatabaseInfo( e, "table" );
if ( conn == connection && tab == table )
return TRUE;
return FALSE;
@@ -1029,17 +1029,17 @@ bool Uic::isWidgetInTable( const QDomElement& e, const QString& connection, cons
Registers all database connections, cursors and forms.
*/
-void Uic::registerDatabases( const QDomElement& e )
+void Uic::registerDatabases( const TQDomElement& e )
{
- QDomElement n;
- QDomNodeList nl;
+ TQDomElement n;
+ TQDomNodeList nl;
int i;
nl = e.parentNode().toElement().elementsByTagName( "widget" );
for ( i = 0; i < (int) nl.length(); ++i ) {
n = nl.item(i).toElement();
- QString conn = getDatabaseInfo( n, "connection" );
- QString tab = getDatabaseInfo( n, "table" );
- QString fld = getDatabaseInfo( n, "field" );
+ TQString conn = getDatabaseInfo( n, "connection" );
+ TQString tab = getDatabaseInfo( n, "table" );
+ TQString fld = getDatabaseInfo( n, "field" );
if ( !conn.isNull() ) {
dbConnections += conn;
if ( !tab.isNull() ) {
@@ -1059,7 +1059,7 @@ void Uic::registerDatabases( const QDomElement& e )
\sa registeredName(), isObjectRegistered()
*/
-QString Uic::registerObject( const QString& name )
+TQString Uic::registerObject( const TQString& name )
{
if ( objectNames.isEmpty() ) {
// some temporary variables we need
@@ -1069,7 +1069,7 @@ QString Uic::registerObject( const QString& name )
objectNames += "pal";
}
- QString result = name;
+ TQString result = name;
int i;
while ( ( i = result.find(' ' )) != -1 ) {
result[i] = '_';
@@ -1077,10 +1077,10 @@ QString Uic::registerObject( const QString& name )
if ( objectNames.contains( result ) ) {
int i = 2;
- while ( objectNames.contains( result + "_" + QString::number(i) ) )
+ while ( objectNames.contains( result + "_" + TQString::number(i) ) )
i++;
result += "_";
- result += QString::number(i);
+ result += TQString::number(i);
}
objectNames += result;
objectMapper.insert( name, result );
@@ -1093,7 +1093,7 @@ QString Uic::registerObject( const QString& name )
\sa registerObject(), isObjectRegistered()
*/
-QString Uic::registeredName( const QString& name )
+TQString Uic::registeredName( const TQString& name )
{
if ( !objectMapper.contains( name ) )
return name;
@@ -1103,22 +1103,22 @@ QString Uic::registeredName( const QString& name )
/*!
Returns whether the object \a name was registered yet or not.
*/
-bool Uic::isObjectRegistered( const QString& name )
+bool Uic::isObjectRegistered( const TQString& name )
{
return objectMapper.contains( name );
}
/*!
- Unifies the entries in stringlist \a list. Should really be a QStringList feature.
+ Unifies the entries in stringlist \a list. Should really be a TQStringList feature.
*/
-QStringList Uic::unique( const QStringList& list )
+TQStringList Uic::unique( const TQStringList& list )
{
if ( list.isEmpty() )
return list;
- QStringList result;
- for ( QStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) {
+ TQStringList result;
+ for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) {
if ( !result.contains(*it) )
result += *it;
}
@@ -1130,7 +1130,7 @@ QStringList Uic::unique( const QStringList& list )
/*!
Creates an instance of class \a objClass, with parent \a parent and name \a objName
*/
-QString Uic::createObjectInstance( const QString& objClass, const QString& parent, const QString& objName )
+TQString Uic::createObjectInstance( const TQString& objClass, const TQString& parent, const TQString& objName )
{
if ( objClass.mid( 1 ) == "ComboBox" ) {
@@ -1139,7 +1139,7 @@ QString Uic::createObjectInstance( const QString& objClass, const QString& paren
return objClass + "(" + parent + ",\"" + objName + "\")";
}
-bool Uic::isLayout( const QString& name ) const
+bool Uic::isLayout( const TQString& name ) const
{
return layoutObjects.contains( name );
}
diff --git a/python/pyqt/pyuic3/uic.h b/python/pyqt/pyuic3/uic.h
index ea52ac34..0fceff50 100644
--- a/python/pyqt/pyuic3/uic.h
+++ b/python/pyqt/pyuic3/uic.h
@@ -21,13 +21,13 @@
#ifndef UIC_H
#define UIC_H
-#include <qdom.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qmap.h>
-#include <qtextstream.h>
-#include <qpalette.h>
-#include <qvariant.h>
+#include <tqdom.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
+#include <tqtextstream.h>
+#include <tqpalette.h>
+#include <tqvariant.h>
#define PYQT_VERSION "3.17.2"
@@ -42,12 +42,12 @@ public:
uint setIndent(uint i) {uint old = current; current = i; calc(); return old;}
void operator++() {++current; calc();}
void operator--() {--current; calc();}
- operator QString() {return indstr;}
+ operator TQString() {return indstr;}
private:
uint tabStop;
uint current;
- QString indstr;
+ TQString indstr;
void calc();
};
@@ -56,86 +56,86 @@ private:
class Uic : public Qt
{
public:
- Uic( const QString &fn, const char *outputFn, QTextStream& out,
- QDomDocument doc, bool subcl, const QString &trm,
- const QString& subclname, QString &uicClass );
+ Uic( const TQString &fn, const char *outputFn, TQTextStream& out,
+ TQDomDocument doc, bool subcl, const TQString &trm,
+ const TQString& subclname, TQString &uicClass );
static void setIndent(const PyIndent &pyind) {indent = pyind; trindent = pyind;}
- void createFormImpl( const QDomElement &e );
-
- void createSubImpl( const QDomElement &e, const QString& subclname );
-
- void createActionImpl( const QDomElement& e, const QString &parent );
- void createToolbarImpl( const QDomElement &e, const QString &parentClass, const QString &parent );
- void createMenuBarImpl( const QDomElement &e, const QString &parentClass, const QString &parent );
- void createPopupMenuImpl( const QDomElement &e, const QString &parentClass, const QString &parent );
- QString createObjectImpl( const QDomElement &e, const QString& parentClass, const QString& parent, const QString& layout = QString::null );
- QString createLayoutImpl( const QDomElement &e, const QString& parentClass, const QString& parent, const QString& layout = QString::null );
- QString createObjectInstance( const QString& objClass, const QString& parent, const QString& objName );
- QString createSpacerImpl( const QDomElement &e, const QString& parentClass, const QString& parent, const QString& layout = QString::null );
- void createExclusiveProperty( const QDomElement & e, const QString& exclusiveProp );
- QString createListBoxItemImpl( const QDomElement &e, const QString &parent, QString *value = 0 );
- QString createIconViewItemImpl( const QDomElement &e, const QString &parent );
- QString createListViewColumnImpl( const QDomElement &e, const QString &parent, QString *value = 0 );
- QString createTableRowColumnImpl( const QDomElement &e, const QString &parent, QString *value = 0 );
- QString createListViewItemImpl( const QDomElement &e, const QString &parent,
- const QString &parentItem );
- void createColorGroupImpl( const QString& cg, const QDomElement& e );
- QColorGroup loadColorGroup( const QDomElement &e );
-
- QDomElement getObjectProperty( const QDomElement& e, const QString& name );
- QString getPixmapLoaderFunction( const QDomElement& e );
- QString getFormClassName( const QDomElement& e );
- QString getClassName( const QDomElement& e );
- QString getObjectName( const QDomElement& e );
- QString getLayoutName( const QDomElement& e );
- QString getInclude( const QString& className );
-
- QString setObjectProperty( const QString& objClass, const QString& obj, const QString &prop, const QDomElement &e, bool stdset );
-
- QString registerObject( const QString& name );
- QString registeredName( const QString& name );
- bool isObjectRegistered( const QString& name );
- QStringList unique( const QStringList& );
-
- QString trcall( const QString& sourceText, const QString& comment = "" );
-
- static void embed( QTextStream& out, const char* project, const QStringList& images );
+ void createFormImpl( const TQDomElement &e );
+
+ void createSubImpl( const TQDomElement &e, const TQString& subclname );
+
+ void createActionImpl( const TQDomElement& e, const TQString &parent );
+ void createToolbarImpl( const TQDomElement &e, const TQString &parentClass, const TQString &parent );
+ void createMenuBarImpl( const TQDomElement &e, const TQString &parentClass, const TQString &parent );
+ void createPopupMenuImpl( const TQDomElement &e, const TQString &parentClass, const TQString &parent );
+ TQString createObjectImpl( const TQDomElement &e, const TQString& parentClass, const TQString& parent, const TQString& layout = TQString::null );
+ TQString createLayoutImpl( const TQDomElement &e, const TQString& parentClass, const TQString& parent, const TQString& layout = TQString::null );
+ TQString createObjectInstance( const TQString& objClass, const TQString& parent, const TQString& objName );
+ TQString createSpacerImpl( const TQDomElement &e, const TQString& parentClass, const TQString& parent, const TQString& layout = TQString::null );
+ void createExclusiveProperty( const TQDomElement & e, const TQString& exclusiveProp );
+ TQString createListBoxItemImpl( const TQDomElement &e, const TQString &parent, TQString *value = 0 );
+ TQString createIconViewItemImpl( const TQDomElement &e, const TQString &parent );
+ TQString createListViewColumnImpl( const TQDomElement &e, const TQString &parent, TQString *value = 0 );
+ TQString createTableRowColumnImpl( const TQDomElement &e, const TQString &parent, TQString *value = 0 );
+ TQString createListViewItemImpl( const TQDomElement &e, const TQString &parent,
+ const TQString &parentItem );
+ void createColorGroupImpl( const TQString& cg, const TQDomElement& e );
+ TQColorGroup loadColorGroup( const TQDomElement &e );
+
+ TQDomElement getObjectProperty( const TQDomElement& e, const TQString& name );
+ TQString getPixmapLoaderFunction( const TQDomElement& e );
+ TQString getFormClassName( const TQDomElement& e );
+ TQString getClassName( const TQDomElement& e );
+ TQString getObjectName( const TQDomElement& e );
+ TQString getLayoutName( const TQDomElement& e );
+ TQString getInclude( const TQString& className );
+
+ TQString setObjectProperty( const TQString& objClass, const TQString& obj, const TQString &prop, const TQDomElement &e, bool stdset );
+
+ TQString registerObject( const TQString& name );
+ TQString registeredName( const TQString& name );
+ bool isObjectRegistered( const TQString& name );
+ TQStringList unique( const TQStringList& );
+
+ TQString trcall( const TQString& sourceText, const TQString& comment = "" );
+
+ static void embed( TQTextStream& out, const char* project, const TQStringList& images );
private:
- QTextStream& out;
- QTextOStream trout;
- QString languageChangeBody;
- QCString outputFileName;
- QStringList objectNames;
- QMap<QString,QString> objectMapper;
- QStringList tags;
- QStringList layouts;
- QString formName;
- QString lastItem;
- QString trmacro;
+ TQTextStream& out;
+ TQTextOStream trout;
+ TQString languageChangeBody;
+ TQCString outputFileName;
+ TQStringList objectNames;
+ TQMap<TQString,TQString> objectMapper;
+ TQStringList tags;
+ TQStringList layouts;
+ TQString formName;
+ TQString lastItem;
+ TQString trmacro;
static PyIndent indent, trindent;
struct Buddy
{
- Buddy( const QString& k, const QString& b )
+ Buddy( const TQString& k, const TQString& b )
: key( k ), buddy( b ) {}
Buddy(){} // for valuelist
- QString key;
- QString buddy;
+ TQString key;
+ TQString buddy;
bool operator==( const Buddy& other ) const
{ return (key == other.key); }
};
struct CustomInclude
{
- QString header;
- QString location;
+ TQString header;
+ TQString location;
};
- QValueList<Buddy> buddies;
+ TQValueList<Buddy> buddies;
- QStringList layoutObjects;
- bool isLayout( const QString& name ) const;
+ TQStringList layoutObjects;
+ bool isLayout( const TQString& name ) const;
uint item_used : 1;
uint cg_used : 1;
@@ -144,39 +144,39 @@ private:
uint externPixmaps : 1;
#if QT_VERSION >= 0x030300
- QString uiFileVersion;
+ TQString uiFileVersion;
#endif
- QString nameOfClass;
- QStringList namespaces;
- QString bareNameOfClass;
- QString pixmapLoaderFunction;
-
- void registerDatabases( const QDomElement& e );
- bool isWidgetInTable( const QDomElement& e, const QString& connection, const QString& table );
- bool isFrameworkCodeGenerated( const QDomElement& e );
- QString getDatabaseInfo( const QDomElement& e, const QString& tag );
- void createFormImpl( const QDomElement& e, const QString& form, const QString& connection, const QString& table );
- void writeFunctionsSubImpl( const QStringList &fuLst, const QStringList &typLst, const QStringList &specLst,
- const QString &subClass, const QString &descr );
- QStringList dbConnections;
- QMap< QString, QStringList > dbCursors;
- QMap< QString, QStringList > dbForms;
+ TQString nameOfClass;
+ TQStringList namespaces;
+ TQString bareNameOfClass;
+ TQString pixmapLoaderFunction;
+
+ void registerDatabases( const TQDomElement& e );
+ bool isWidgetInTable( const TQDomElement& e, const TQString& connection, const TQString& table );
+ bool isFrameworkCodeGenerated( const TQDomElement& e );
+ TQString getDatabaseInfo( const TQDomElement& e, const TQString& tag );
+ void createFormImpl( const TQDomElement& e, const TQString& form, const TQString& connection, const TQString& table );
+ void writeFunctionsSubImpl( const TQStringList &fuLst, const TQStringList &typLst, const TQStringList &specLst,
+ const TQString &subClass, const TQString &descr );
+ TQStringList dbConnections;
+ TQMap< TQString, TQStringList > dbCursors;
+ TQMap< TQString, TQStringList > dbForms;
static bool isMainWindow;
- static QString mkBool( bool b );
- static QString mkBool( const QString& s );
- bool toBool( const QString& s );
- static QString fixString( const QString &str, bool encode = FALSE );
+ static TQString mkBool( bool b );
+ static TQString mkBool( const TQString& s );
+ bool toBool( const TQString& s );
+ static TQString fixString( const TQString &str, bool encode = FALSE );
static bool onlyAscii;
- static QString mkStdSet( const QString& prop );
- static QString getComment( const QDomNode& n );
- QVariant defSpacing, defMargin;
- QString fileName;
+ static TQString mkStdSet( const TQString& prop );
+ static TQString getComment( const TQDomNode& n );
+ TQVariant defSpacing, defMargin;
+ TQString fileName;
bool writeFunctImpl;
- void pySlot(QStringList::ConstIterator &it);
+ void pySlot(TQStringList::ConstIterator &it);
- QString pyCode;
+ TQString pyCode;
bool pyNeedTr, pyNeedTrUtf8;
};
diff --git a/python/pyqt/pyuic3/widgetdatabase.cpp b/python/pyqt/pyuic3/widgetdatabase.cpp
index 6c447d5b..79a2c8b8 100644
--- a/python/pyqt/pyuic3/widgetdatabase.cpp
+++ b/python/pyqt/pyuic3/widgetdatabase.cpp
@@ -27,15 +27,15 @@
#include "widgetdatabase.h"
#include "widgetinterface.h"
-#include <qapplication.h>
+#include <tqapplication.h>
#define NO_STATIC_COLORS
#include <globaldefs.h>
-#include <qstrlist.h>
-#include <qdict.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qcleanuphandler.h>
-#include <qfeatures.h>
+#include <tqstrlist.h>
+#include <tqdict.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqcleanuphandler.h>
+#include <tqfeatures.h>
#include <stdlib.h>
@@ -43,17 +43,17 @@ const int dbsize = 300;
const int dbcustom = 200;
const int dbdictsize = 211;
static WidgetDatabaseRecord* db[ dbsize ];
-static QDict<int> *className2Id = 0;
+static TQDict<int> *className2Id = 0;
static int dbcount = 0;
static int dbcustomcount = 200;
-static QStrList *wGroups;
-static QStrList *invisibleGroups;
+static TQStrList *wGroups;
+static TQStrList *invisibleGroups;
static bool whatsThisLoaded = FALSE;
static QPluginManager<WidgetInterface> *widgetPluginManager = 0;
static bool plugins_set_up = FALSE;
static bool was_in_setup = FALSE;
-QCleanupHandler<QPluginManager<WidgetInterface> > cleanup_manager;
+TQCleanupHandler<QPluginManager<WidgetInterface> > cleanup_manager;
WidgetDatabaseRecord::WidgetDatabaseRecord()
{
@@ -121,14 +121,14 @@ void WidgetDatabase::setupDataBase( int id )
invisibleGroups = new QStrList;
invisibleGroups->append( "Forms" );
invisibleGroups->append( "Temp" );
- className2Id = new QDict<int>( dbdictsize );
+ className2Id = new TQDict<int>( dbdictsize );
className2Id->setAutoDelete( TRUE );
WidgetDatabaseRecord *r = 0;
r = new WidgetDatabaseRecord;
r->iconSet = "designer_pushbutton.png";
- r->name = "QPushButton";
+ r->name = "TQPushButton";
r->group = widgetGroup( "Buttons" );
r->toolTip = "Push Button";
r->isCommon = TRUE;
@@ -137,7 +137,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "designer_toolbutton.png";
- r->name = "QToolButton";
+ r->name = "TQToolButton";
r->group = widgetGroup( "Buttons" );
r->toolTip = "Tool Button";
@@ -145,7 +145,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "designer_radiobutton.png";
- r->name = "QRadioButton";
+ r->name = "TQRadioButton";
r->group = widgetGroup( "Buttons" );
r->toolTip = "Radio Button";
r->isCommon = TRUE;
@@ -154,7 +154,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "designer_checkbox.png";
- r->name = "QCheckBox";
+ r->name = "TQCheckBox";
r->group = widgetGroup( "Buttons" );
r->toolTip = "Check Box";
r->isCommon = TRUE;
@@ -163,7 +163,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "designer_groupbox.png";
- r->name = "QGroupBox";
+ r->name = "TQGroupBox";
r->group = widgetGroup( "Containers" );
r->toolTip = "Group Box";
r->isContainer = TRUE;
@@ -172,7 +172,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "designer_buttongroup.png";
- r->name = "QButtonGroup";
+ r->name = "TQButtonGroup";
r->group = widgetGroup( "Containers" );
r->toolTip = "Button Group";
r->isContainer = TRUE;
@@ -182,7 +182,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "designer_frame.png";
- r->name = "QFrame";
+ r->name = "TQFrame";
r->group = widgetGroup( "Containers" );
r->toolTip = "Frame";
r->isContainer = TRUE;
@@ -191,7 +191,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "designer_tabwidget.png";
- r->name = "QTabWidget";
+ r->name = "TQTabWidget";
r->group = widgetGroup( "Containers" );
r->toolTip = "Tabwidget";
r->isContainer = TRUE;
@@ -200,7 +200,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "designer_widgetstack.png";
- r->name = "QWidgetStack";
+ r->name = "TQWidgetStack";
r->group = widgetGroup( "Containers" );
r->toolTip = "Widget Stack";
r->isContainer = TRUE;
@@ -209,7 +209,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "designer_toolbox.png";
- r->name = "QToolBox";
+ r->name = "TQToolBox";
r->group = widgetGroup( "Containers" );
r->toolTip = "Tool Box";
r->isContainer = TRUE;
@@ -218,7 +218,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "designer_listbox.png";
- r->name = "QListBox";
+ r->name = "TQListBox";
r->group = widgetGroup( "Views" );
r->toolTip = "List Box";
r->isCommon = TRUE;
@@ -227,7 +227,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "designer_listview.png";
- r->name = "QListView";
+ r->name = "TQListView";
r->group = widgetGroup( "Views" );
r->toolTip = "List View";
@@ -236,7 +236,7 @@ void WidgetDatabase::setupDataBase( int id )
#if !defined(QT_NO_ICONVIEW) || defined(UIC)
r = new WidgetDatabaseRecord;
r->iconSet = "designer_iconview.png";
- r->name = "QIconView";
+ r->name = "TQIconView";
r->group = widgetGroup( "Views" );
r->toolTip = "Icon View";
@@ -246,7 +246,7 @@ void WidgetDatabase::setupDataBase( int id )
#if !defined(QT_NO_TABLE)
r = new WidgetDatabaseRecord;
r->iconSet = "designer_table.png";
- r->name = "QTable";
+ r->name = "TQTable";
r->group = widgetGroup( "Views" );
r->toolTip = "Table";
@@ -256,8 +256,8 @@ void WidgetDatabase::setupDataBase( int id )
#if !defined(QT_NO_SQL)
r = new WidgetDatabaseRecord;
r->iconSet = "designer_datatable.png";
- r->includeFile = "qdatatable.h";
- r->name = "QDataTable";
+ r->includeFile = "tqdatatable.h";
+ r->name = "TQDataTable";
r->group = widgetGroup( "Database" );
r->toolTip = "Data Table";
@@ -266,7 +266,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "designer_lineedit.png";
- r->name = "QLineEdit";
+ r->name = "TQLineEdit";
r->group = widgetGroup( "Input" );
r->toolTip = "Line Edit";
r->isCommon = TRUE;
@@ -275,7 +275,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "designer_spinbox.png";
- r->name = "QSpinBox";
+ r->name = "TQSpinBox";
r->group = widgetGroup( "Input" );
r->toolTip = "Spin Box";
r->isCommon = TRUE;
@@ -287,7 +287,7 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "QDateEdit";
r->group = widgetGroup( "Input" );
r->toolTip = "Date Edit";
- r->includeFile = "qdatetimeedit.h";
+ r->includeFile = "tqdatetimeedit.h";
append( r );
@@ -296,7 +296,7 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "QTimeEdit";
r->group = widgetGroup( "Input" );
r->toolTip = "Time Edit";
- r->includeFile = "qdatetimeedit.h";
+ r->includeFile = "tqdatetimeedit.h";
append( r );
@@ -305,13 +305,13 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "QDateTimeEdit";
r->group = widgetGroup( "Input" );
r->toolTip = "Date-Time Edit";
- r->includeFile = "qdatetimeedit.h";
+ r->includeFile = "tqdatetimeedit.h";
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "designer_multilineedit.png";
- r->name = "QMultiLineEdit";
+ r->name = "TQMultiLineEdit";
r->group = widgetGroup( "Temp" );
r->toolTip = "Multi Line Edit";
@@ -319,7 +319,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "designer_richtextedit.png";
- r->name = "QTextEdit";
+ r->name = "TQTextEdit";
r->group = widgetGroup( "Input" );
r->toolTip = "Rich Text Edit";
r->isCommon = TRUE;
@@ -328,7 +328,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "designer_combobox.png";
- r->name = "QComboBox";
+ r->name = "TQComboBox";
r->group = widgetGroup( "Input" );
r->toolTip = "Combo Box";
r->isCommon = TRUE;
@@ -337,7 +337,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "designer_slider.png";
- r->name = "QSlider";
+ r->name = "TQSlider";
r->group = widgetGroup( "Input" );
r->toolTip = "Slider";
@@ -345,7 +345,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "designer_scrollbar.png";
- r->name = "QScrollBar";
+ r->name = "TQScrollBar";
r->group = widgetGroup( "Input" );
r->toolTip = "Scrollbar";
@@ -353,7 +353,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "designer_dial.png";
- r->name = "QDial";
+ r->name = "TQDial";
r->group = widgetGroup( "Input" );
r->toolTip = "Dial";
@@ -361,7 +361,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "designer_label.png";
- r->name = "QLabel";
+ r->name = "TQLabel";
r->group = widgetGroup( "Temp" );
r->toolTip = "Label";
@@ -388,7 +388,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "designer_lcdnumber.png";
- r->name = "QLCDNumber";
+ r->name = "TQLCDNumber";
r->group = widgetGroup( "Display" );
r->toolTip = "LCD Number";
@@ -399,14 +399,14 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "Line";
r->group = widgetGroup( "Display" );
r->toolTip = "Line";
- r->includeFile = "qframe.h";
+ r->includeFile = "tqframe.h";
r->whatsThis = "The Line widget provides horizontal and vertical lines.";
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "designer_progress.png";
- r->name = "QProgressBar";
+ r->name = "TQProgressBar";
r->group = widgetGroup( "Display" );
r->toolTip = "Progress Bar";
@@ -414,7 +414,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "designer_textview.png";
- r->name = "QTextView";
+ r->name = "TQTextView";
r->group = widgetGroup( "Temp" );
r->toolTip = "Text View";
@@ -422,7 +422,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "designer_textbrowser.png";
- r->name = "QTextBrowser";
+ r->name = "TQTextBrowser";
r->group = widgetGroup( "Display" );
r->toolTip = "Text Browser";
@@ -438,21 +438,21 @@ void WidgetDatabase::setupDataBase( int id )
append( r );
r = new WidgetDatabaseRecord;
- r->name = "QWidget";
+ r->name = "TQWidget";
r->isForm = TRUE;
r->group = widgetGroup( "Forms" );
append( r );
r = new WidgetDatabaseRecord;
- r->name = "QDialog";
+ r->name = "TQDialog";
r->group = widgetGroup( "Forms" );
r->isForm = TRUE;
append( r );
r = new WidgetDatabaseRecord;
- r->name = "QWizard";
+ r->name = "TQWizard";
r->group = widgetGroup( "Forms" );
r->isContainer = TRUE;
@@ -474,9 +474,9 @@ void WidgetDatabase::setupDataBase( int id )
append( r );
r = new WidgetDatabaseRecord;
- r->name = "QSplitter";
+ r->name = "TQSplitter";
r->group = widgetGroup( "Temp" );
- r->includeFile = "qsplitter.h";
+ r->includeFile = "tqsplitter.h";
r->isContainer = TRUE;
append( r );
@@ -507,8 +507,8 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "";
- r->name = "QMainWindow";
- r->includeFile = "qmainwindow.h";
+ r->name = "TQMainWindow";
+ r->includeFile = "tqmainwindow.h";
r->group = widgetGroup( "Temp" );
r->isContainer = TRUE;
@@ -517,7 +517,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "";
r->name = "QDesignerAction";
- r->includeFile = "qaction.h";
+ r->includeFile = "tqaction.h";
r->group = widgetGroup( "Temp" );
r->isContainer = FALSE;
@@ -526,7 +526,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "";
r->name = "QDesignerActionGroup";
- r->includeFile = "qaction.h";
+ r->includeFile = "tqaction.h";
r->group = widgetGroup( "Temp" );
r->isContainer = FALSE;
@@ -534,8 +534,8 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "";
- r->name = "QScrollView";
- r->includeFile = "qscrollview.h";
+ r->name = "TQScrollView";
+ r->includeFile = "tqscrollview.h";
r->group = widgetGroup( "Temp" );
r->isContainer = TRUE;
@@ -544,8 +544,8 @@ void WidgetDatabase::setupDataBase( int id )
#ifndef QT_NO_SQL
r = new WidgetDatabaseRecord;
r->iconSet = "";
- r->name = "QDataBrowser";
- r->includeFile = "qdatabrowser.h";
+ r->name = "TQDataBrowser";
+ r->includeFile = "tqdatabrowser.h";
r->group = widgetGroup( "Database" );
r->toolTip = "Data Browser";
r->iconSet = "designer_databrowser.png";
@@ -555,8 +555,8 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "";
- r->name = "QDataView";
- r->includeFile = "qdataview.h";
+ r->name = "TQDataView";
+ r->includeFile = "tqdataview.h";
r->group = widgetGroup( "Database" );
r->toolTip = "Data View";
r->iconSet = "designer_dataview.png";
@@ -575,8 +575,8 @@ void WidgetDatabase::setupPlugins()
if ( plugins_set_up )
return;
plugins_set_up = TRUE;
- QStringList widgets = widgetManager()->featureList();
- for ( QStringList::Iterator it = widgets.begin(); it != widgets.end(); ++it ) {
+ TQStringList widgets = widgetManager()->featureList();
+ for ( TQStringList::Iterator it = widgets.begin(); it != widgets.end(); ++it ) {
if ( hasWidget( *it ) )
continue;
WidgetDatabaseRecord *r = new WidgetDatabaseRecord;
@@ -586,11 +586,11 @@ void WidgetDatabase::setupPlugins()
continue;
#ifndef UIC
- QIconSet icon = iface->iconSet( *it );
+ TQIconSet icon = iface->iconSet( *it );
if ( !icon.pixmap().isNull() )
- r->icon = new QIconSet( icon );
+ r->icon = new TQIconSet( icon );
#endif
- QString grp = iface->group( *it );
+ TQString grp = iface->group( *it );
if ( grp.isEmpty() )
grp = "3rd party widgets";
r->group = widgetGroup( grp );
@@ -629,24 +629,24 @@ int WidgetDatabase::startCustom()
Returns the iconset which represents the class registered as \a id.
*/
-QIconSet WidgetDatabase::iconSet( int id )
+TQIconSet WidgetDatabase::iconSet( int id )
{
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return QIconSet();
+ return TQIconSet();
#if !defined(UIC) && !defined(RESOURCE)
if ( !r->icon ) {
if ( r->iconSet.isEmpty() )
- return QIconSet();
- QPixmap pix = QPixmap::fromMimeSource( r->iconSet );
+ return TQIconSet();
+ TQPixmap pix = TQPixmap::fromMimeSource( r->iconSet );
if ( pix.isNull() )
- pix = QPixmap( r->iconSet );
- r->icon = new QIconSet( pix );
+ pix = TQPixmap( r->iconSet );
+ r->icon = new TQIconSet( pix );
}
return *r->icon;
#else
- return QIconSet();
+ return TQIconSet();
#endif
}
@@ -654,12 +654,12 @@ QIconSet WidgetDatabase::iconSet( int id )
Returns the classname of the widget which is registered as \a id.
*/
-QString WidgetDatabase::className( int id )
+TQString WidgetDatabase::className( int id )
{
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return QString::null;
+ return TQString::null;
return r->name;
}
@@ -667,12 +667,12 @@ QString WidgetDatabase::className( int id )
Returns the group the widget registered as \a id belongs to.
*/
-QString WidgetDatabase::group( int id )
+TQString WidgetDatabase::group( int id )
{
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return QString::null;
+ return TQString::null;
return r->group;
}
@@ -680,12 +680,12 @@ QString WidgetDatabase::group( int id )
Returns the tooltip text of the widget which is registered as \a id.
*/
-QString WidgetDatabase::toolTip( int id )
+TQString WidgetDatabase::toolTip( int id )
{
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return QString::null;
+ return TQString::null;
return r->toolTip;
}
@@ -693,12 +693,12 @@ QString WidgetDatabase::toolTip( int id )
Returns the what's this? text of the widget which is registered as \a id.
*/
-QString WidgetDatabase::whatsThis( int id )
+TQString WidgetDatabase::whatsThis( int id )
{
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return QString::null;
+ return TQString::null;
return r->whatsThis;
}
@@ -706,12 +706,12 @@ QString WidgetDatabase::whatsThis( int id )
Returns the include file if the widget which is registered as \a id.
*/
-QString WidgetDatabase::includeFile( int id )
+TQString WidgetDatabase::includeFile( int id )
{
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return QString::null;
+ return TQString::null;
if ( r->includeFile.isNull() )
return r->name.lower() + ".h";
return r->includeFile;
@@ -749,10 +749,10 @@ bool WidgetDatabase::isCommon( int id )
return r->isCommon;
}
-QString WidgetDatabase::createWidgetName( int id )
+TQString WidgetDatabase::createWidgetName( int id )
{
setupDataBase( id );
- QString n = className( id );
+ TQString n = className( id );
if ( n == "QLayoutWidget" )
n = "Layout";
if ( n[ 0 ] == 'Q' && n[ 1 ].lower() != n[ 1 ] )
@@ -764,14 +764,14 @@ QString WidgetDatabase::createWidgetName( int id )
WidgetDatabaseRecord *r = at( id );
if ( !r )
return n;
- n += QString::number( ++r->nameCounter );
+ n += TQString::number( ++r->nameCounter );
n[0] = n[0].lower();
return n;
}
/*! Returns the id for \a name or -1 if \a name is unknown.
*/
-int WidgetDatabase::idFromClassName( const QString &name )
+int WidgetDatabase::idFromClassName( const TQString &name )
{
setupDataBase( -1 );
if ( name.isEmpty() )
@@ -790,7 +790,7 @@ int WidgetDatabase::idFromClassName( const QString &name )
return -1;
}
-bool WidgetDatabase::hasWidget( const QString &name )
+bool WidgetDatabase::hasWidget( const TQString &name )
{
return className2Id->find( name ) != 0;
}
@@ -823,14 +823,14 @@ void WidgetDatabase::append( WidgetDatabaseRecord *r )
insert( dbcount++, r );
}
-QString WidgetDatabase::widgetGroup( const QString &g )
+TQString WidgetDatabase::widgetGroup( const TQString &g )
{
if ( wGroups->find( g ) == -1 )
wGroups->append( g );
return g;
}
-bool WidgetDatabase::isGroupEmpty( const QString &grp )
+bool WidgetDatabase::isGroupEmpty( const TQString &grp )
{
WidgetDatabaseRecord *r = 0;
for ( int i = 0; i < dbcount; ++i ) {
@@ -842,12 +842,12 @@ bool WidgetDatabase::isGroupEmpty( const QString &grp )
return TRUE;
}
-QString WidgetDatabase::widgetGroup( int i )
+TQString WidgetDatabase::widgetGroup( int i )
{
setupDataBase( -1 );
if ( i >= 0 && i < (int)wGroups->count() )
return wGroups->at( i );
- return QString::null;
+ return TQString::null;
}
int WidgetDatabase::numWidgetGroups()
@@ -856,7 +856,7 @@ int WidgetDatabase::numWidgetGroups()
return wGroups->count();
}
-bool WidgetDatabase::isGroupVisible( const QString &g )
+bool WidgetDatabase::isGroupVisible( const TQString &g )
{
setupDataBase( -1 );
return invisibleGroups->find( g ) == -1;
@@ -868,8 +868,8 @@ int WidgetDatabase::addCustomWidget( WidgetDatabaseRecord *r )
return dbcustomcount - 1;
}
-void WidgetDatabase::customWidgetClassNameChanged( const QString &oldName,
- const QString &newName )
+void WidgetDatabase::customWidgetClassNameChanged( const TQString &oldName,
+ const TQString &newName )
{
int id = idFromClassName( oldName );
if ( id == -1 )
@@ -901,16 +901,16 @@ bool WidgetDatabase::isWhatsThisLoaded()
return whatsThisLoaded;
}
-void WidgetDatabase::loadWhatsThis( const QString &docPath )
+void WidgetDatabase::loadWhatsThis( const TQString &docPath )
{
- QString whatsthisFile = docPath + "/whatsthis";
- QFile f( whatsthisFile );
+ TQString whatsthisFile = docPath + "/whatsthis";
+ TQFile f( whatsthisFile );
if ( !f.open( IO_ReadOnly ) )
return;
- QTextStream ts( &f );
+ TQTextStream ts( &f );
while ( !ts.atEnd() ) {
- QString s = ts.readLine();
- QStringList l = QStringList::split( " | ", s );
+ TQString s = ts.readLine();
+ TQStringList l = TQStringList::split( " | ", s );
int id = idFromClassName( l[ 1 ] );
WidgetDatabaseRecord *r = at( id );
if ( r )
@@ -923,27 +923,27 @@ void WidgetDatabase::loadWhatsThis( const QString &docPath )
// ### Qt 3.1: make these publically accessible via QWidgetDatabase API
#if defined(UIC)
bool dbnounload = FALSE;
-QStringList *dbpaths = 0;
+TQStringList *dbpaths = 0;
#else
-extern QString *qwf_plugin_dir;
+extern TQString *qwf_plugin_dir;
#endif
QPluginManager<WidgetInterface> *widgetManager()
{
if ( !widgetPluginManager ) {
- QString pluginDir = "/designer";
+ TQString pluginDir = "/designer";
#if !defined(UIC)
if ( qwf_plugin_dir )
pluginDir = *qwf_plugin_dir;
#endif
- widgetPluginManager = new QPluginManager<WidgetInterface>( IID_Widget, QApplication::libraryPaths(), pluginDir );
+ widgetPluginManager = new QPluginManager<WidgetInterface>( IID_Widget, TQApplication::libraryPaths(), pluginDir );
cleanup_manager.add( &widgetPluginManager );
#if defined(UIC)
if ( dbnounload )
widgetPluginManager->setAutoUnload( FALSE );
if ( dbpaths ) {
- QStringList::ConstIterator it = dbpaths->begin();
+ TQStringList::ConstIterator it = dbpaths->begin();
for ( ; it != dbpaths->end(); ++it )
widgetPluginManager->addLibraryPath( *it );
}
diff --git a/python/pyqt/pyuic3/widgetdatabase.h b/python/pyqt/pyuic3/widgetdatabase.h
index b44ef885..c75c2a59 100644
--- a/python/pyqt/pyuic3/widgetdatabase.h
+++ b/python/pyqt/pyuic3/widgetdatabase.h
@@ -27,8 +27,8 @@
#ifndef WIDGETDATABASE_H
#define WIDGETDATABASE_H
-#include <qiconset.h>
-#include <qstring.h>
+#include <tqiconset.h>
+#include <tqstring.h>
#include "widgetinterface.h" // up here for GCC 2.7.* compatibility
#include <private/qpluginmanager_p.h>
@@ -39,12 +39,12 @@ struct WidgetDatabaseRecord
{
WidgetDatabaseRecord();
~WidgetDatabaseRecord();
- QString iconSet, name, group, toolTip, whatsThis, includeFile;
+ TQString iconSet, name, group, toolTip, whatsThis, includeFile;
uint isContainer : 1;
uint isForm : 1;
uint isCommon : 1;
uint isPlugin : 1;
- QIconSet *icon;
+ TQIconSet *icon;
int nameCounter;
};
@@ -58,38 +58,38 @@ public:
static int count();
static int startCustom();
- static QIconSet iconSet( int id );
- static QString className( int id );
- static QString group( int id );
- static QString toolTip( int id );
- static QString whatsThis( int id );
- static QString includeFile( int id );
+ static TQIconSet iconSet( int id );
+ static TQString className( int id );
+ static TQString group( int id );
+ static TQString toolTip( int id );
+ static TQString whatsThis( int id );
+ static TQString includeFile( int id );
static bool isForm( int id );
static bool isContainer( int id );
static bool isCommon( int id );
- static int idFromClassName( const QString &name );
- static QString createWidgetName( int id );
+ static int idFromClassName( const TQString &name );
+ static TQString createWidgetName( int id );
static WidgetDatabaseRecord *at( int index );
static void insert( int index, WidgetDatabaseRecord *r );
static void append( WidgetDatabaseRecord *r );
- static QString widgetGroup( const QString &g );
- static QString widgetGroup( int i );
+ static TQString widgetGroup( const TQString &g );
+ static TQString widgetGroup( int i );
static int numWidgetGroups();
- static bool isGroupVisible( const QString &g );
- static bool isGroupEmpty( const QString &grp );
+ static bool isGroupVisible( const TQString &g );
+ static bool isGroupEmpty( const TQString &grp );
static int addCustomWidget( WidgetDatabaseRecord *r );
static bool isCustomWidget( int id );
static bool isCustomPluginWidget( int id );
static bool isWhatsThisLoaded();
- static void loadWhatsThis( const QString &docPath );
+ static void loadWhatsThis( const TQString &docPath );
- static bool hasWidget( const QString &name );
- static void customWidgetClassNameChanged( const QString &oldName, const QString &newName );
+ static bool hasWidget( const TQString &name );
+ static void customWidgetClassNameChanged( const TQString &oldName, const TQString &newName );
};