diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-11-29 01:11:08 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-11-29 01:11:08 -0600 |
commit | 8a055d66f43592c257cece2eb8cc021808062917 (patch) | |
tree | d0922f201bd5d24b62a33160d1d9baf9e89f9a70 /pyuic2 | |
parent | b388516ca2691303a076a0764fd40bf7116fe43d (diff) | |
download | pytqt-8a055d66f43592c257cece2eb8cc021808062917.tar.gz pytqt-8a055d66f43592c257cece2eb8cc021808062917.zip |
Initial TQt conversion
Diffstat (limited to 'pyuic2')
-rw-r--r-- | pyuic2/COPYING | 12 | ||||
-rw-r--r-- | pyuic2/domtool.cpp | 102 | ||||
-rw-r--r-- | pyuic2/domtool.h | 18 | ||||
-rw-r--r-- | pyuic2/globaldefs.h | 8 | ||||
-rw-r--r-- | pyuic2/pyuic.pro.in | 2 | ||||
-rw-r--r-- | pyuic2/pyuic.sbf | 10 | ||||
-rw-r--r-- | pyuic2/uic.cpp | 538 | ||||
-rw-r--r-- | pyuic2/uic.h | 96 | ||||
-rw-r--r-- | pyuic2/widgetdatabase.cpp | 138 | ||||
-rw-r--r-- | pyuic2/widgetdatabase.h | 32 |
10 files changed, 478 insertions, 478 deletions
diff --git a/pyuic2/COPYING b/pyuic2/COPYING index c7aea18..fc80518 100644 --- a/pyuic2/COPYING +++ b/pyuic2/COPYING @@ -109,9 +109,9 @@ above, provided that you also meet all of these conditions: these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) + the Program is not retquired to print an announcement.) -These requirements apply to the modified work as a whole. If +These retquirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those @@ -177,7 +177,7 @@ However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. - 5. You are not required to accept this License, since you have not + 5. You are not retquired to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by @@ -263,14 +263,14 @@ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +TO THE TQUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING + 12. IN NO EVENT UNLESS RETQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSETQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER diff --git a/pyuic2/domtool.cpp b/pyuic2/domtool.cpp index 2b14ee6..605af27 100644 --- a/pyuic2/domtool.cpp +++ b/pyuic2/domtool.cpp @@ -2,7 +2,7 @@ ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** Copyright (C) 2000, 2001 Phil Thompson <phil@river-bank.demon.co.uk> ** -** This file is part of Qt Designer. +** This file is part of TQt Designer. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software @@ -46,14 +46,14 @@ \sa hasProperty() */ -QVariant DomTool::readProperty( const QDomElement& e, const QString& name, const QVariant& defValue ) +TQVariant DomTool::readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue ) { - QDomElement n; + 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() == "name" ) { - QString prop = n2.firstChild().toText().data(); + TQString prop = n2.firstChild().toText().data(); if ( prop == name ) return elementToVariant( n2.nextSibling().toElement(), defValue ); } @@ -67,14 +67,14 @@ 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" ) { - QDomElement n2 = n.firstChild().toElement(); + TQDomElement n2 = n.firstChild().toElement(); if ( n2.tagName() == "name" ) { - QString prop = n2.firstChild().toText().data(); + TQString prop = n2.firstChild().toText().data(); if ( prop == name ) return TRUE; } @@ -83,20 +83,20 @@ bool DomTool::hasProperty( const QDomElement& e, const QString& name ) return FALSE; } -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" ) @@ -109,9 +109,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" ) @@ -120,9 +120,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" ) @@ -131,12 +131,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() ); @@ -152,43 +152,43 @@ 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" ) { - v = QVariant( e.firstChild().toText().data().toInt() ); + v = TQVariant( e.firstChild().toText().data().toInt() ); } 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() ); 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() ) ); } return v; @@ -198,9 +198,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" ) @@ -212,7 +212,7 @@ QColor DomTool::readColor( const QDomElement &e ) n = n.nextSibling().toElement(); } - return QColor( r, g, b ); + return TQColor( r, g, b ); } /*! @@ -222,14 +222,14 @@ QColor DomTool::readColor( const QDomElement &e ) \sa hasAttribute() */ -QVariant DomTool::readAttribute( const QDomElement& e, const QString& name, const QVariant& defValue ) +TQVariant DomTool::readAttribute( const TQDomElement& e, const TQString& name, const TQVariant& defValue ) { - QDomElement n; + TQDomElement n; for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { if ( n.tagName() == "attribute" ) { - QDomElement n2 = n.firstChild().toElement(); + TQDomElement n2 = n.firstChild().toElement(); if ( n2.tagName() == "name" ) { - QString prop = n2.firstChild().toText().data(); + TQString prop = n2.firstChild().toText().data(); if ( prop == name ) return elementToVariant( n2.nextSibling().toElement(), defValue ); } @@ -243,14 +243,14 @@ 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" ) { - QDomElement n2 = n.firstChild().toElement(); + TQDomElement n2 = n.firstChild().toElement(); if ( n2.tagName() == "name" ) { - QString prop = n2.firstChild().toText().data(); + TQString prop = n2.firstChild().toText().data(); if ( prop == name ) return TRUE; } diff --git a/pyuic2/domtool.h b/pyuic2/domtool.h index 7230bce..434729b 100644 --- a/pyuic2/domtool.h +++ b/pyuic2/domtool.h @@ -2,7 +2,7 @@ ** Copyright (C) 2000 Troll Tech AS. All rights reserved. ** Copyright (C) 2000, 2001 Phil Thompson <phil@river-bank.demon.co.uk> ** -** This file is part of Qt GUI Designer. +** This file is part of TQt GUI Designer. ** ** This file may be distributed under the terms of the GNU General ** Public License version 2 as published by the Free Software @@ -24,16 +24,16 @@ #include <qdom.h> -class DomTool : public Qt +class DomTool : public TQt { public: - static QVariant readProperty( const QDomElement& e, const QString& name, const QVariant& defValue ); - static bool hasProperty( const QDomElement& e, const QString& name ); - 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 bool hasAttribute( const QDomElement& e, const QString& name ); - static QColor readColor( const QDomElement &e ); + static TQVariant readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue ); + static bool hasProperty( const TQDomElement& e, const TQString& name ); + static TQVariant elementToVariant( const TQDomElement& e, const TQVariant& defValue ); + static TQVariant elementToVariant( const TQDomElement& e, const TQVariant& defValue, TQString &comment ); + static TQVariant readAttribute( const TQDomElement& e, const TQString& name, const TQVariant& defValue ); + static bool hasAttribute( const TQDomElement& e, const TQString& name ); + static TQColor readColor( const TQDomElement &e ); }; diff --git a/pyuic2/globaldefs.h b/pyuic2/globaldefs.h index 700f7d2..de3bce1 100644 --- a/pyuic2/globaldefs.h +++ b/pyuic2/globaldefs.h @@ -1,7 +1,7 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** -** This file is part of Qt Designer. +** This file is part of TQt Designer. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software @@ -26,8 +26,8 @@ #define BOXLAYOUT_DEFAULT_MARGIN 11 #define BOXLAYOUT_DEFAULT_SPACING 6 -static QColor backColor1( 226, 244, 216 ); -static QColor backColor2( 235, 235, 235 ); -static QColor selectedBack( 192, 192, 192 ); +static TQColor backColor1( 226, 244, 216 ); +static TQColor backColor2( 235, 235, 235 ); +static TQColor selectedBack( 192, 192, 192 ); #endif diff --git a/pyuic2/pyuic.pro.in b/pyuic2/pyuic.pro.in index 8df1513..e81b138 100644 --- a/pyuic2/pyuic.pro.in +++ b/pyuic2/pyuic.pro.in @@ -3,7 +3,7 @@ # Copyright (c) 2002, 2003 # Riverbank Computing Limited <info@riverbankcomputing.co.uk> # -# The project file for pyuic for Qt v2. +# The project file for pyuic for TQt v2. TEMPLATE = app diff --git a/pyuic2/pyuic.sbf b/pyuic2/pyuic.sbf index 5d480ec..9f1e8ef 100644 --- a/pyuic2/pyuic.sbf +++ b/pyuic2/pyuic.sbf @@ -1,22 +1,22 @@ -# This is the build file for pyuic for Qt v2. +# This is the build file for pyuic for TQt v2. # # Copyright (c) 2007 # Riverbank Computing Limited <info@riverbankcomputing.co.uk> # -# This file is part of PyQt. +# This file is part of PyTQt. # -# This copy of PyQt is free software; you can redistribute it and/or modify it +# This copy of PyTQt is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2, or (at your option) any later # version. # -# PyQt is supplied in the hope that it will be useful, but WITHOUT ANY +# PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with -# PyQt; see the file LICENSE. If not, write to the Free Software Foundation, +# PyTQt; see the file LICENSE. If not, write to the Free Software Foundation, # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. target = pyuic diff --git a/pyuic2/uic.cpp b/pyuic2/uic.cpp index 19fb079..fc470f3 100644 --- a/pyuic2/uic.cpp +++ b/pyuic2/uic.cpp @@ -3,7 +3,7 @@ /********************************************************************** ** Copyright (C) 2000 Troll Tech AS. All rights reserved. ** -** This file is part of Qt GUI Designer. +** This file is part of TQt GUI Designer. ** ** This file may be distributed under the terms of the GNU General ** Public License version 2 as published by the Free Software @@ -32,17 +32,17 @@ #include <qregexp.h> #include <zlib.h> -static QString mkBool( bool b ) +static TQString mkBool( bool b ) { return b? "1" : "0"; } -static QString mkBool( const QString& s ) +static TQString mkBool( const TQString& s ) { return mkBool( s == "true" || s == "1" ); } -static bool toBool( const QString& s ) +static bool toBool( const TQString& s ) { return s == "true" || s.toInt() != 0; } @@ -50,13 +50,13 @@ static bool toBool( const QString& s ) // fixString is only used in conjunction with tr(). We need to write out the // string in utf8 and make sure it's converted from utf8 when created. -static QString fixString( const QString &str ) +static TQString fixString( const TQString &str ) { - QString s( str ); - s.replace( QRegExp( "\\\\" ), "\\\\" ); - s.replace( QRegExp( "\"" ), "\\\"" ); - s.replace( QRegExp( "\n" ), "\\n\"\n\"" ); - s.replace( QRegExp( "\r" ), "\\r" ); + TQString s( str ); + s.replace( TQRegExp( "\\\\" ), "\\\\" ); + s.replace( TQRegExp( "\"" ), "\\\"" ); + s.replace( TQRegExp( "\n" ), "\\n\"\n\"" ); + s.replace( TQRegExp( "\r" ), "\\r" ); bool onlyAscii = TRUE; unsigned int i; @@ -69,13 +69,13 @@ static QString fixString( const QString &str ) if ( onlyAscii ) s = "\"" + s + "\""; else - s = "QString.fromUtf8(\"" + s + "\")"; + s = "TQString.fromUtf8(\"" + s + "\")"; return s; } -static QString mkStdSet( const QString& prop ) +static TQString mkStdSet( const TQString& prop ) { - return QString( "set" ) + prop[0].upper() + prop.mid(1); + return TQString( "set" ) + prop[0].upper() + prop.mid(1); } @@ -86,9 +86,9 @@ static QString mkStdSet( const QString& prop ) The class Uic encapsulates the user interface compiler (uic). */ -static QString className; +static TQString className; -Uic::Uic( QTextStream &outStream, QDomDocument doc, const QString &trm ) +Uic::Uic( TQTextStream &outStream, TQDomDocument doc, const TQString &trm ) : out( outStream ), trmacro( trm ) { item_used = cg_used = pal_used = 0; @@ -101,7 +101,7 @@ Uic::Uic( QTextStream &outStream, QDomDocument doc, const QString &trm ) nameOfClass = getClassName( doc.firstChild().toElement() ); - QDomElement firstWidget = doc.firstChild().firstChild().toElement(); + TQDomElement firstWidget = doc.firstChild().firstChild().toElement(); while ( firstWidget.tagName() != "widget" ) firstWidget = firstWidget.nextSibling().toElement(); @@ -117,13 +117,13 @@ Uic::Uic( QTextStream &outStream, QDomDocument doc, const QString &trm ) /*! Extracts a class name from \a e */ -QString Uic::getClassName( const QDomElement& e ) +TQString Uic::getClassName( 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] = '_'; @@ -138,35 +138,35 @@ QString Uic::getClassName( 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; + 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() == "name" && n2.firstChild().toText().data() == "name" ) { return n2.nextSibling().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). + property of the preceeding sibling (the first child of a TQLayoutWidget). */ -QString Uic::getLayoutName( const QDomElement& e ) +TQString Uic::getLayoutName( const TQDomElement& e ) { - QDomElement p = e.parentNode().toElement(); - QString tail = QString::null; + TQDomElement p = e.parentNode().toElement(); + TQString tail = TQString::null; - if (getClassName(p) != "QLayoutWidget") + if (getClassName(p) != "TQLayoutWidget") tail = "Layout"; - QDomElement n; + TQDomElement n; for ( n = p.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() == "name" && n2.firstChild().toText().data() == "name" ) { return n2.nextSibling().toElement().firstChild().toText().data() + tail; } @@ -175,7 +175,7 @@ QString Uic::getLayoutName( const QDomElement& e ) return e.tagName(); } -QByteArray unzipXPM( QString data, ulong& length ) +TQByteArray unzipXPM( TQString data, ulong& length ) { char *ba = new char[ data.length() / 2 ]; for ( int i = 0; i < (int)data.length() / 2; ++i ) { @@ -195,7 +195,7 @@ QByteArray unzipXPM( QString data, ulong& length ) } if ( length < data.length() * 5 ) length = data.length() * 5; - QByteArray baunzip( length ); + TQByteArray baunzip( length ); ::uncompress( (uchar*) baunzip.data(), &length, (uchar*) ba, data.length()/2 ); return baunzip; } @@ -206,16 +206,16 @@ QByteArray unzipXPM( QString data, ulong& length ) \sa createFormDecl(), createObjectImpl() */ -void Uic::createFormImpl( const QDomElement &e ) +void Uic::createFormImpl( const TQDomElement &e ) { - QStringList::Iterator it; - QDomElement n; - QDomNodeList nl; + TQStringList::Iterator it; + 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 ); // Handle custom widgets. for (n = e; !n.isNull(); n = n.nextSibling().toElement()) @@ -223,14 +223,14 @@ void Uic::createFormImpl( const QDomElement &e ) if (n.tagName() != "customwidgets") continue; - QDomElement n2 = n.firstChild().toElement(); + TQDomElement n2 = n.firstChild().toElement(); while (!n2.isNull()) { if (n2.tagName() == "customwidget") { - QDomElement n3 = n2.firstChild().toElement(); - QString cname, header; + TQDomElement n3 = n2.firstChild().toElement(); + TQString cname, header; while (!n3.isNull()) { @@ -260,28 +260,28 @@ void Uic::createFormImpl( const QDomElement &e ) } } - // find out what images are required - QStringList requiredImages; + // find out what images are retquired + TQStringList retquiredImages; nl = e.elementsByTagName( "pixmap" ); for ( int j = 0; j < (int) nl.length(); j++ ) { - requiredImages += nl.item(j).firstChild().toText().data(); + retquiredImages += nl.item(j).firstChild().toText().data(); } - QStringList images; - QStringList xpmImages; + TQStringList images; + TQStringList xpmImages; if ( pixmapLoaderFunction.isEmpty() ) { // 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++ ) { - QDomElement tmp = nl.item(i).firstChild().toElement(); - QString img = registerObject( tmp.firstChild().toText().data() ); - if ( !requiredImages.contains( img ) ) + TQDomElement tmp = nl.item(i).firstChild().toElement(); + TQString img = registerObject( tmp.firstChild().toText().data() ); + if ( !retquiredImages.contains( img ) ) continue; tmp = tmp.nextSibling().toElement(); - QString format = tmp.attribute("format", "PNG" ); - QString data = tmp.firstChild().toText().data(); + TQString format = tmp.attribute("format", "PNG" ); + TQString data = tmp.firstChild().toText().data(); out << endl; out << endl; @@ -289,7 +289,7 @@ void Uic::createFormImpl( const QDomElement &e ) if ( format == "XPM.GZ" ) { xpmImages += img; ulong length = tmp.attribute("length").toULong(); - QByteArray baunzip = unzipXPM( data, length ); + TQByteArray baunzip = unzipXPM( data, length ); int a = 0; out << indent << img << "_data = [" << endl; while ( baunzip[a] != '\"' ) @@ -316,11 +316,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; popIndent(); } } @@ -339,11 +339,11 @@ void Uic::createFormImpl( const QDomElement &e ) out << indent << "class " << nameOfClass << "(" << objClass << "):" << endl; pushIndent(); - if ( objClass == "QDialog" || objClass == "QWizard" ) { + if ( objClass == "TQDialog" || objClass == "TQWizard" ) { out << indent << "def __init__(self,parent = None,name = None,modal = 0,fl = 0):" << endl; pushIndent(); out << indent << objClass << ".__init__(self,parent,name,modal,fl)" << endl; - } else if ( objClass == "QWidget" ) { // standard QWidget + } else if ( objClass == "TQWidget" ) { // standard TQWidget out << indent << "def __init__(self,parent = None,name = None,fl = 0):" << endl; pushIndent(); out << indent << objClass << ".__init__(self,parent,name,fl)" << endl; @@ -357,9 +357,9 @@ 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 << (*it) << " = QPixmap()" << endl; + out << indent << (*it) << " = TQPixmap()" << endl; out << indent << (*it) << ".loadFromData(" << (*it) << "_data,'PNG')" << endl; } @@ -368,7 +368,7 @@ void Uic::createFormImpl( const QDomElement &e ) // create pixmaps for all images if ( !xpmImages.isEmpty() ) { for ( it = xpmImages.begin(); it != xpmImages.end(); ++it ) { - out << indent << (*it) << " = QPixmap(" << (*it) << "_data)" << endl; + out << indent << (*it) << " = TQPixmap(" << (*it) << "_data)" << endl; } out << endl; @@ -379,11 +379,11 @@ void Uic::createFormImpl( const QDomElement &e ) for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { if ( n.tagName() == "property" ) { bool stdset = toBool( n.attribute( "stdset" ) ); - QDomElement n2 = n.firstChild().toElement(); + TQDomElement n2 = n.firstChild().toElement(); if ( n2.tagName() == "name" ) { - QString prop = n2.firstChild().toText().data(); - QString value = setObjectProperty( objClass, QString::null, prop, n2.nextSibling().toElement(), stdset ); + TQString prop = n2.firstChild().toText().data(); + TQString value = setObjectProperty( objClass, TQString::null, prop, n2.nextSibling().toElement(), stdset ); if ( value.isEmpty() ) continue; @@ -396,7 +396,7 @@ void Uic::createFormImpl( const QDomElement &e ) out << indent; if ( prop == "geometry" && n2.nextSibling().toElement().tagName() == "rect") { - QDomElement n3 = n2.nextSibling().toElement().firstChild().toElement(); + TQDomElement n3 = n2.nextSibling().toElement().firstChild().toElement(); int w = 0, h = 0; while ( !n3.isNull() ) { @@ -412,7 +412,7 @@ void Uic::createFormImpl( const QDomElement &e ) if ( stdset ) out << "self." << mkStdSet(prop) << "(" << value << ")" << endl; else - out << "self.setProperty('" << prop << "',QVariant(" << value << "))" << endl; + out << "self.setProperty('" << prop << "',TQVariant(" << value << "))" << endl; } if (prop == "name") { @@ -424,15 +424,15 @@ void Uic::createFormImpl( const QDomElement &e ) } - // create all children, some forms have special requirements + // create all children, some forms have special retquirements - 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 label = DomTool::readAttribute( n, "title", "" ).toString(); + TQString page = createObjectImpl( n, objClass, "self" ); + TQString label = DomTool::readAttribute( n, "title", "" ).toString(); out << indent << "self.addPage(" << page << ","<< trmacro << "(" << fixString( label ) << "))" << 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" ) ) @@ -454,11 +454,11 @@ void Uic::createFormImpl( const QDomElement &e ) // Get the list of any user defined slots. - QStringList userSlots; + TQStringList userSlots; for ( n = e; !n.isNull(); n = n.nextSibling().toElement() ) { if ( n.tagName() == "connections" ) { - 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() == "slot" ) { userSlots += n2.firstChild().toText().data(); } @@ -472,8 +472,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" ) @@ -508,11 +508,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; @@ -526,7 +526,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; @@ -540,7 +540,7 @@ void Uic::createFormImpl( const QDomElement &e ) // end of constructor popIndent(); - // handle application font changes if required + // handle application font changes if retquired nl = e.elementsByTagName( "widget" ); bool needEventHandler = FALSE; for ( i = 0; i < (int) nl.length(); i++ ) { @@ -555,7 +555,7 @@ void Uic::createFormImpl( const QDomElement &e ) pushIndent(); out << indent << "ret = " << objClass << ".event(self,ev)" << endl; out << endl; - out << indent << "if ev.type() == QEvent.ApplicationFontChange:" << endl; + out << indent << "if ev.type() == TQEvent.ApplicationFontChange:" << endl; pushIndent(); for ( i = 0; i < (int) nl.length(); i++ ) { @@ -583,7 +583,7 @@ void Uic::createFormImpl( const QDomElement &e ) // to 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; @@ -611,11 +611,11 @@ void Uic::createFormImpl( const QDomElement &e ) \sa createObjectDecl() */ -QString Uic::createObjectImpl( const QDomElement &e, const QString& parentClass, const QString& parent, const QString& layout ) +TQString Uic::createObjectImpl( const TQDomElement &e, const TQString& parentClass, const TQString& parent, const TQString& layout ) { - QDomElement n; - QString objClass, objName, fullObjName; + TQDomElement n; + TQString objClass, objName, fullObjName; if ( layouts.contains( e.tagName() ) ) return createLayoutImpl( e, parentClass, parent, layout ); @@ -625,8 +625,8 @@ QString Uic::createObjectImpl( const QDomElement &e, const QString& parentClass, return objName; objName = getObjectName( e ); - QString definedName = objName; - bool isTmpObject = objName.isEmpty() || objClass == "QLayoutWidget"; + TQString definedName = objName; + bool isTmpObject = objName.isEmpty() || objClass == "TQLayoutWidget"; if ( isTmpObject ) { if ( objClass[0] == 'Q' ) objName = objClass.mid(1); @@ -636,17 +636,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 ( objClass == "TQLayoutWidget" ) { 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 ); @@ -671,11 +671,11 @@ QString Uic::createObjectImpl( const QDomElement &e, const QString& parentClass, for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { if ( n.tagName() == "property" ) { bool stdset = toBool( n.attribute( "stdset" ) ); - QDomElement n2 = n.firstChild().toElement(); + TQDomElement n2 = n.firstChild().toElement(); if ( n2.tagName() == "name" ) { - QString prop = n2.firstChild().toText().data(); - QString value = setObjectProperty( objClass, objName, prop, n2.nextSibling().toElement(), stdset ); + TQString prop = n2.firstChild().toText().data(); + TQString value = setObjectProperty( objClass, objName, prop, n2.nextSibling().toElement(), stdset ); if ( value.isEmpty() ) continue; @@ -688,12 +688,12 @@ QString Uic::createObjectImpl( const QDomElement &e, const QString& parentClass, if ( isLine && prop == "orientation" ) { prop = "frameStyle"; if ( value.right(10) == "Horizontal" ) - value = "QFrame.HLine | QFrame.Sunken"; + value = "TQFrame.HLine | TQFrame.Sunken"; else - value = "QFrame.VLine | QFrame.Sunken"; + value = "TQFrame.VLine | TQFrame.Sunken"; } if ( prop == "buttonGroupId" ) { - if ( parentClass == "QButtonGroup" ) + if ( parentClass == "TQButtonGroup" ) out << indent << parent << ".insert(" << fullObjName << "," << value << ")" << endl; continue; } @@ -703,44 +703,44 @@ QString Uic::createObjectImpl( const QDomElement &e, const QString& parentClass, if ( stdset ) out << indent << fullObjName << "." << mkStdSet(prop) << "(" << value << ")" << endl; else - out << indent << fullObjName << ".setProperty('" << prop << "',QVariant(" << value << "))" << endl; + out << indent << fullObjName << ".setProperty('" << prop << "',TQVariant(" << value << "))" << endl; } } } else if ( n.tagName() == "item" ) { if ( objClass.mid(1) == "ListBox" ) { - QString s = createListBoxItemImpl( n, fullObjName ); + TQString s = createListBoxItemImpl( n, fullObjName ); if ( !s.isEmpty() ) out << indent << s << endl; } else if ( objClass.mid(1) == "ComboBox" ) { - QString s = createListBoxItemImpl( n, fullObjName ); + TQString s = createListBoxItemImpl( n, fullObjName ); if ( !s.isEmpty() ) out << indent << s << endl; } else if ( objClass.mid(1) == "IconView" ) { - QString s = createIconViewItemImpl( n, fullObjName ); + TQString s = createIconViewItemImpl( n, fullObjName ); if ( !s.isEmpty() ) out << indent << s << endl; } else if ( objClass.mid(1) == "ListView" ) { - QString s = createListViewItemImpl( n, fullObjName, QString::null ); + TQString s = createListViewItemImpl( n, fullObjName, TQString::null ); if ( !s.isEmpty() ) out << s << endl; } } else if ( n.tagName() == "column" ) { if ( objClass.mid(1) == "ListView" ) { - QString s = createListViewColumnImpl( n, fullObjName ); + TQString s = createListViewColumnImpl( n, fullObjName ); if ( !s.isEmpty() ) out << s; } } } - // create all children, some widgets have special requirements + // create all children, some widgets have special retquirements - 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 label = DomTool::readAttribute( n, "title", "" ).toString(); + TQString page = createObjectImpl( n, objClass, fullObjName ); + TQString label = DomTool::readAttribute( n, "title", "" ).toString(); out << indent << fullObjName << ".insertTab(" << page << "," << trmacro << "(" << fixString( label ) << "))" << endl; } } @@ -758,17 +758,17 @@ QString Uic::createObjectImpl( const QDomElement &e, const QString& parentClass, Creates implementation of an listbox item tag. */ -QString Uic::createListBoxItemImpl( const QDomElement &e, const QString &parent ) +TQString Uic::createListBoxItemImpl( const TQDomElement &e, const TQString &parent ) { - QDomElement n = e.firstChild().toElement(); - QString txt; - QString pix; + TQDomElement n = e.firstChild().toElement(); + TQString txt; + TQString pix; while ( !n.isNull() ) { if ( n.tagName() == "property" ) { - QDomElement n2 = n.firstChild().toElement(); + TQDomElement n2 = n.firstChild().toElement(); if ( n2.tagName() == "name" ) { - QString attrib = n2.firstChild().toText().data(); - QVariant v = DomTool::elementToVariant( n2.nextSibling().toElement(), QVariant() ); + TQString attrib = n2.firstChild().toText().data(); + TQVariant v = DomTool::elementToVariant( n2.nextSibling().toElement(), TQVariant() ); if ( attrib == "text" ) txt = v.toString(); else if ( attrib == "pixmap" ) { @@ -792,17 +792,17 @@ 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 pix; + TQDomElement n = e.firstChild().toElement(); + TQString txt; + TQString pix; while ( !n.isNull() ) { if ( n.tagName() == "property" ) { - QDomElement n2 = n.firstChild().toElement(); + TQDomElement n2 = n.firstChild().toElement(); if ( n2.tagName() == "name" ) { - QString attrib = n2.firstChild().toText().data(); - QVariant v = DomTool::elementToVariant( n2.nextSibling().toElement(), QVariant() ); + TQString attrib = n2.firstChild().toText().data(); + TQVariant v = DomTool::elementToVariant( n2.nextSibling().toElement(), TQVariant() ); if ( attrib == "text" ) txt = v.toString(); else if ( attrib == "pixmap" ) { @@ -818,8 +818,8 @@ QString Uic::createIconViewItemImpl( const QDomElement &e, const QString &parent } if ( pix.isEmpty() ) - return "QIconViewItem(" + parent + "," + trmacro + "(" + fixString( txt ) + "))"; - return "QIconViewItem(" + parent + "," + trmacro + "(" + fixString( txt ) + ")," + pix + ")"; + return "TQIconViewItem(" + parent + "," + trmacro + "(" + fixString( txt ) + "))"; + return "TQIconViewItem(" + parent + "," + trmacro + "(" + fixString( txt ) + ")," + pix + ")"; } @@ -827,15 +827,15 @@ QString Uic::createIconViewItemImpl( const QDomElement &e, const QString &parent 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" ); @@ -850,22 +850,22 @@ QString Uic::createListViewItemImpl( const QDomElement &e, const QString &parent } 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 textes; - QStringList pixmaps; + TQStringList textes; + TQStringList pixmaps; while ( !n.isNull() ) { if ( n.tagName() == "property" ) { - QDomElement n2 = n.firstChild().toElement(); + TQDomElement n2 = n.firstChild().toElement(); if ( n2.tagName() == "name" ) { - QString attrib = n2.firstChild().toText().data(); - QVariant v = DomTool::elementToVariant( n2.nextSibling().toElement(), QVariant() ); + TQString attrib = n2.firstChild().toText().data(); + TQVariant v = DomTool::elementToVariant( n2.nextSibling().toElement(), TQVariant() ); if ( attrib == "text" ) textes << v.toString(); else if ( attrib == "pixmap" ) { - QString pix = v.toString(); + TQString pix = v.toString(); if ( !pix.isEmpty() && !pixmapLoaderFunction.isEmpty() ) { pix.prepend( pixmapLoaderFunction + "( " ); pix.append( " )" ); @@ -882,9 +882,9 @@ QString Uic::createListViewItemImpl( const QDomElement &e, const QString &parent for ( int i = 0; i < (int)textes.count(); ++i ) { if ( !textes[ i ].isEmpty() ) - s += indent + item + ".setText(" + QString::number( i ) + "," + trmacro + "(" + fixString( textes[ i ] ) + "))\n"; + s += indent + item + ".setText(" + TQString::number( i ) + "," + trmacro + "(" + fixString( textes[ i ] ) + "))\n"; if ( !pixmaps[ i ].isEmpty() ) - s += indent + item + ".setPixmap(" + QString::number( i ) + "," + pixmaps[ i ] + ")\n"; + s += indent + item + ".setPixmap(" + TQString::number( i ) + "," + pixmaps[ i ] + ")\n"; } lastItem = item; @@ -895,18 +895,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 ) +TQString Uic::createListViewColumnImpl( const TQDomElement &e, const TQString &parent ) { - QDomElement n = e.firstChild().toElement(); - QString txt; - QString pix; + TQDomElement n = e.firstChild().toElement(); + TQString txt; + TQString pix; bool clickable = FALSE, resizeable = FALSE; while ( !n.isNull() ) { if ( n.tagName() == "property" ) { - QDomElement n2 = n.firstChild().toElement(); + TQDomElement n2 = n.firstChild().toElement(); if ( n2.tagName() == "name" ) { - QString attrib = n2.firstChild().toText().data(); - QVariant v = DomTool::elementToVariant( n2.nextSibling().toElement(), QVariant() ); + TQString attrib = n2.firstChild().toText().data(); + TQVariant v = DomTool::elementToVariant( n2.nextSibling().toElement(), TQVariant() ); if ( attrib == "text" ) txt = v.toString(); else if ( attrib == "pixmap" ) { @@ -924,7 +924,7 @@ QString Uic::createListViewColumnImpl( const QDomElement &e, const QString &pare n = n.nextSibling().toElement(); } - QString s; + TQString s; s = indent + parent + ".addColumn(" + trmacro + "(" + fixString( txt ) + "))\n"; if ( !pix.isEmpty() ) s += indent + parent + ".header().setLabel(" + parent + ".header().count() - 1," + pix + "," + trmacro + "(" + fixString( txt ) + "))\n"; @@ -939,17 +939,17 @@ QString Uic::createListViewColumnImpl( 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 ) ); @@ -957,13 +957,13 @@ QString Uic::createLayoutImpl( const QDomElement &e, const QString& parentClass, int margin = DomTool::readProperty( e, "margin", BOXLAYOUT_DEFAULT_MARGIN ).toInt(); int spacing = DomTool::readProperty( e, "spacing", BOXLAYOUT_DEFAULT_SPACING ).toInt(); - 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 << ".setColumnLayout(0,TQt.Vertical)" << endl; out << indent << parent << ".layout().setSpacing(0)" << endl; out << indent << parent << ".layout().setMargin(0)" << endl; out << indent << objName << " = " << qlayout << "(" << parent << ".layout())" << endl; - out << indent << objName << ".setAlignment(Qt.AlignTop)" << endl; + out << indent << objName << ".setAlignment(TQt.AlignTop)" << endl; } else { if ( layout.isEmpty() ) out << indent << objName << " = " << qlayout << "(" << parent << ")" << endl; @@ -977,10 +977,10 @@ QString Uic::createLayoutImpl( const QDomElement &e, const QString& parentClass, 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 @@ -989,7 +989,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(); @@ -999,7 +999,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 << "," @@ -1008,9 +1008,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 ) @@ -1028,31 +1028,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( "spacer" ); - 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(); + DomTool::hasProperty( e, "geometry" ) ) { // compatibility TQt 2.2 + 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; } @@ -1067,27 +1067,27 @@ QString Uic::createSpacerImpl( const QDomElement &e, const QString& /*parentClas 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 ( objClass.isEmpty() ) return; for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { if ( n.tagName() == "property" ) { bool stdset = toBool( n.attribute( "stdset" ) ); - QDomElement n2 = n.firstChild().toElement(); + TQDomElement n2 = n.firstChild().toElement(); if ( n2.tagName() == "name" ) { - QString prop = n2.firstChild().toText().data(); + TQString prop = n2.firstChild().toText().data(); if ( prop != exclusiveProp ) continue; - QString value = setObjectProperty( objClass, objName, prop, n2.nextSibling().toElement(), stdset ); + TQString value = setObjectProperty( objClass, objName, prop, n2.nextSibling().toElement(), stdset ); if ( value.isEmpty() ) continue; - out << indent << objName << ".setProperty('" << prop << "',QVariant(" << value << "))" << endl; + out << indent << objName << ".setProperty('" << prop << "',TQVariant(" << value << "))" << endl; } } } @@ -1105,11 +1105,11 @@ const char* const ColorRole[] = { /*! Attention: this function has to be in sync with Resource::setWidgetProperty(). If you change one, change both. */ -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" ) @@ -1122,11 +1122,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" ) @@ -1135,10 +1135,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" ) @@ -1147,10 +1147,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" ) @@ -1161,16 +1161,16 @@ 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 fontname = "f"; + TQDomElement n3 = e.firstChild().toElement(); + TQString fontname = "f"; if ( !obj.isEmpty() ) { fontname = obj + "_font"; - out << indent << fontname << " = QFont(self." << obj << ".font())" << endl; + out << indent << fontname << " = TQFont(self." << obj << ".font())" << endl; } else { - out << indent << fontname << " = QFont(self.font())" << endl; + out << indent << fontname << " = TQFont(self.font())" << endl; } while ( !n3.isNull() ) { if ( n3.tagName() == "family" ) @@ -1199,14 +1199,14 @@ QString Uic::setObjectProperty( const QString& objClass, const QString& obj, con } else if ( e.tagName() == "string" ) { if ( prop == "toolTip" ) { if ( !obj.isEmpty() ) - out << indent << "QToolTip.add(self." << obj << "," + trmacro + "(" << fixString( e.firstChild().toText().data() ) << "))" << endl; + out << indent << "TQToolTip.add(self." << obj << "," + trmacro + "(" << fixString( e.firstChild().toText().data() ) << "))" << endl; else - out << indent << "QToolTip.add(self," + trmacro + "(" << fixString( e.firstChild().toText().data() ) << "))" << endl; + out << indent << "TQToolTip.add(self," + trmacro + "(" << fixString( e.firstChild().toText().data() ) << "))" << endl; } else if ( prop == "whatsThis" ) { if ( !obj.isEmpty() ) - out << indent << "QWhatsThis.add(self." << obj << "," << trmacro << "(" << fixString( e.firstChild().toText().data() ) << "))" << endl; + out << indent << "TQWhatsThis.add(self." << obj << "," << trmacro << "(" << fixString( e.firstChild().toText().data() ) << "))" << endl; else - out << indent << "QWhatsThis.add(self," << trmacro << "(" << fixString( e.firstChild().toText().data() ) << "))" << endl; + out << indent << "TQWhatsThis.add(self," << trmacro << "(" << fixString( e.firstChild().toText().data() ) << "))" << endl; } else { v = trmacro + "(%1)"; v = v.arg( fixString( e.firstChild().toText().data() ) ); @@ -1230,51 +1230,51 @@ QString Uic::setObjectProperty( const QString& objClass, const QString& obj, con v.append( " )" ); } } else if ( e.tagName() == "iconset" ) { - v = "QIconSet(%1)"; + v = "TQIconSet(%1)"; v = v.arg( e.firstChild().toText().data() ); } else if ( e.tagName() == "image" ) { 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 of WithMode enum in 3.0 - oc = "QScrollView"; + TQString oc = objClass; + TQString ev = e.firstChild().toText().data(); + if ( oc == "TQListView" && ev == "Manual" ) // #### workaround, rename TQListView::Manual of WithMode enum in 3.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 = ""; - for ( QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) { + for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) { v += objClass + "." + *it; if ( it != lst.fromLast() ) v += " | "; } } 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() ); n3 = n3.nextSibling().toElement(); } - QString tmp; + TQString tmp; if ( !obj.isEmpty() ) tmp = "self." + obj; else tmp = "self"; - v = "QSizePolicy(%1,%2," + tmp + ".sizePolicy().hasHeightForWidth())"; + v = "TQSizePolicy(%1,%2," + tmp + ".sizePolicy().hasHeightForWidth())"; v = v.arg( (int)sp.horData() ).arg( (int)sp.verData() ); } 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 ); @@ -1288,19 +1288,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(); @@ -1323,7 +1323,7 @@ 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() ); } return v; @@ -1334,33 +1334,33 @@ QString Uic::setObjectProperty( const QString& objClass, const QString& obj, con /*! 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"; + color = "TQt.white"; else if ( col == black ) - color = "Qt.black"; + color = "TQt.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( pixmapLoaderFunction + "(" ); pixmap.append( ")" ); } - 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(); } @@ -1370,16 +1370,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(); } @@ -1396,7 +1396,7 @@ QColorGroup Uic::loadColorGroup( 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 @@ -1406,7 +1406,7 @@ QString Uic::registerObject( const QString& name ) objectNames += "pal"; } - QString result = name; + TQString result = name; int i; while ( ( i = result.find(' ' )) != -1 ) { result[i] = '_'; @@ -1414,10 +1414,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 ); @@ -1430,7 +1430,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; @@ -1440,24 +1440,24 @@ 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 ) { - QStringList result; + TQStringList result; if (list.isEmpty() ) return result; - QStringList l = list; + TQStringList l = list; l.sort(); result += l.first(); - for ( QStringList::Iterator it = l.begin(); it != l.end(); ++it ) { + for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it ) { if ( *it != result.last() ) result += *it; } @@ -1469,7 +1469,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" ) { @@ -1478,7 +1478,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 ); } @@ -1487,22 +1487,22 @@ bool Uic::isLayout( const QString& name ) const #if defined(BLACKADDER) #include "ba.h" -int BA::compilePython(const QString &fileName,const QString &outputFile, - const QString &trmacro,bool execCode) +int BA::compilePython(const TQString &fileName,const TQString &outputFile, + const TQString &trmacro,bool execCode) { #else int main( int argc, char * argv[] ) { const char *error = 0; - QString fileName; - QString outputFile; - QString trmacro; + TQString fileName; + TQString outputFile; + TQString trmacro; bool execCode = FALSE; 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) ) { @@ -1534,12 +1534,12 @@ int main( int argc, char * argv[] ) } if ( argc < 2 || error || fileName.isEmpty() ) { - fprintf( stderr, "PyQt user interface compiler\n" ); + fprintf( stderr, "PyTQt user interface compiler\n" ); if ( error ) fprintf( stderr, "pyuic: %s\n", error ); fprintf( stderr, "Usage: %s [options] <uifile>\n" - "\nGenerate PyQt implementation:\n" + "\nGenerate PyTQt implementation:\n" " %s [options] <uifile>\n" "Options:\n" "\t-o file Write output to file rather than stdout\n" @@ -1550,11 +1550,11 @@ int main( int argc, char * argv[] ) } #endif - QFile file( fileName ); + TQFile file( fileName ); if ( !file.open( IO_ReadOnly ) ) qFatal( "pyuic: Could not open file '%s' ", (const char *)fileName ); - QFile fileOut; + TQFile fileOut; if (!outputFile.isEmpty()) { fileOut.setName( outputFile ); if (!fileOut.open( IO_WriteOnly ) ) @@ -1562,16 +1562,16 @@ int main( int argc, char * argv[] ) } else { fileOut.open( IO_WriteOnly, stdout ); } - QTextStream out( &fileOut ); - out.setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream out( &fileOut ); + out.setEncoding( TQTextStream::UnicodeUTF8 ); - QDomDocument doc; + TQDomDocument doc; if ( !doc.setContent( &file ) ) qFatal( "pyuic: Failed to parse %s\n", (const char *)fileName ); 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 Python User Interface Compiler (pyuic) " << PYQT_VERSION << endl; out << "#" << endl; out << "# WARNING! All changes made in this file will be lost!" << endl; @@ -1583,14 +1583,14 @@ int main( int argc, char * argv[] ) out << "from qt import *" << endl; - Uic( out, doc, trmacro.isEmpty() ? QString("self.tr") : trmacro ); + Uic( out, doc, trmacro.isEmpty() ? TQString("self.tr") : trmacro ); if (execCode) { out << endl; out << endl; out << "if __name__ == '__main__':" << endl; - out << " a = QApplication(sys.argv)" << endl; - out << " QObject.connect(a,SIGNAL('lastWindowClosed()'),a,SLOT('quit()'))" << endl; + out << " a = TQApplication(sys.argv)" << endl; + out << " TQObject.connect(a,SIGNAL('lastWindowClosed()'),a,SLOT('quit()'))" << endl; out << " w = " << className << "()" << endl; out << " a.setMainWidget(w)" << endl; out << " w.show()" << endl; diff --git a/pyuic2/uic.h b/pyuic2/uic.h index c3fdde3..9ac4851 100644 --- a/pyuic2/uic.h +++ b/pyuic2/uic.h @@ -2,7 +2,7 @@ ** Copyright (C) 2000 Troll Tech AS. All rights reserved. ** Copyright (C) 2000, 2001 Phil Thompson <phil@river-bank.demon.co.uk> ** -** This file is part of Qt GUI Designer. +** This file is part of TQt GUI Designer. ** ** This file may be distributed under the terms of the GNU General ** Public License version 2 as published by the Free Software @@ -31,36 +31,36 @@ #define PYQT_VERSION "3.18.1" -class Uic : public Qt +class Uic : public TQt { public: - Uic( QTextStream& out, QDomDocument doc, const QString &trm ); - - void createFormImpl( const QDomElement &e ); - - 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 createIconViewItemImpl( const QDomElement &e, const QString &parent ); - QString createListViewColumnImpl( const QDomElement &e, const QString &parent ); - QString createListViewItemImpl( const QDomElement &e, const QString &parent, - const QString &parentItem ); - void createColorGroupImpl( const QString& cg, const QDomElement& e ); - QColorGroup loadColorGroup( const QDomElement &e ); - - QString getClassName( const QDomElement& e ); - QString getObjectName( const QDomElement& e ); - QString getLayoutName( const QDomElement& e ); - - 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& ); + Uic( TQTextStream& out, TQDomDocument doc, const TQString &trm ); + + void createFormImpl( const TQDomElement &e ); + + TQString createObjectImpl( const TQDomElement &e, const TQString& parentClass, const TQString& parent, const TQString& layout = TQString::null ); + TQString createLayoutImpl( const TQDomElement &e, const TQString& parentClass, const TQString& parent, const TQString& layout = TQString::null ); + TQString createObjectInstance( const TQString& objClass, const TQString& parent, const TQString& objName ); + TQString createSpacerImpl( const TQDomElement &e, const TQString& parentClass, const TQString& parent, const TQString& layout = TQString::null ); + void createExclusiveProperty( const TQDomElement & e, const TQString& exclusiveProp ); + TQString createListBoxItemImpl( const TQDomElement &e, const TQString &parent ); + TQString createIconViewItemImpl( const TQDomElement &e, const TQString &parent ); + TQString createListViewColumnImpl( const TQDomElement &e, const TQString &parent ); + TQString createListViewItemImpl( const TQDomElement &e, const TQString &parent, + const TQString &parentItem ); + void createColorGroupImpl( const TQString& cg, const TQDomElement& e ); + TQColorGroup loadColorGroup( const TQDomElement &e ); + + TQString getClassName( const TQDomElement& e ); + TQString getObjectName( const TQDomElement& e ); + TQString getLayoutName( const TQDomElement& e ); + + TQString setObjectProperty( const TQString& objClass, const TQString& obj, const TQString &prop, const TQDomElement &e, bool stdset ); + + TQString registerObject( const TQString& name ); + TQString registeredName( const TQString& name ); + bool isObjectRegistered( const TQString& name ); + TQStringList unique( const TQStringList& ); private: void pushIndent() @@ -90,44 +90,44 @@ private: nrindents = 0; } - QString indent, newindent; + TQString indent, newindent; int nrindents; - QTextStream& out; - QStringList objectNames; - QMap<QString,QString> objectMapper; - QStringList tags; - QStringList layouts; - QString formName; - QString lastItem; - QString trmacro; + TQTextStream& out; + TQStringList objectNames; + TQMap<TQString,TQString> objectMapper; + TQStringList tags; + TQStringList layouts; + TQString formName; + TQString lastItem; + TQString trmacro; 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; uint pal_used : 1; - QString pixmapLoaderFunction; - QString nameOfClass; + TQString pixmapLoaderFunction; + TQString nameOfClass; }; #endif diff --git a/pyuic2/widgetdatabase.cpp b/pyuic2/widgetdatabase.cpp index 0733fce..8016ac2 100644 --- a/pyuic2/widgetdatabase.cpp +++ b/pyuic2/widgetdatabase.cpp @@ -1,7 +1,7 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** -** This file is part of Qt Designer. +** This file is part of TQt Designer. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software @@ -41,11 +41,11 @@ 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; @@ -95,18 +95,18 @@ void WidgetDatabase::setupDataBase() if ( dbcount ) return; - wGroups = new QStrList; - invisibleGroups = new QStrList; + wGroups = new TQStrList; + invisibleGroups = new TQStrList; 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 = "pushbutton.xpm"; - r->name = "QPushButton"; + r->name = "TQPushButton"; r->group = widgetGroup( "Buttons" ); r->toolTip = "Push Button"; @@ -114,7 +114,7 @@ void WidgetDatabase::setupDataBase() r = new WidgetDatabaseRecord; r->iconSet = "toolbutton.xpm"; - r->name = "QToolButton"; + r->name = "TQToolButton"; r->group = widgetGroup( "Buttons" ); r->toolTip = "Tool Button"; @@ -122,7 +122,7 @@ void WidgetDatabase::setupDataBase() r = new WidgetDatabaseRecord; r->iconSet = "radiobutton.xpm"; - r->name = "QRadioButton"; + r->name = "TQRadioButton"; r->group = widgetGroup( "Buttons" ); r->toolTip = "Radio Button"; @@ -130,7 +130,7 @@ void WidgetDatabase::setupDataBase() r = new WidgetDatabaseRecord; r->iconSet = "checkbox.xpm"; - r->name = "QCheckBox"; + r->name = "TQCheckBox"; r->group = widgetGroup( "Buttons" ); r->toolTip = "Check Box"; @@ -140,7 +140,7 @@ void WidgetDatabase::setupDataBase() append( r ); r = new WidgetDatabaseRecord; r->iconSet = "groupbox.xpm"; - r->name = "QGroupBox"; + r->name = "TQGroupBox"; r->group = widgetGroup( "Containers" ); r->toolTip = "Group Box"; r->isContainer = TRUE; @@ -149,7 +149,7 @@ void WidgetDatabase::setupDataBase() r = new WidgetDatabaseRecord; r->iconSet = "buttongroup.xpm"; - r->name = "QButtonGroup"; + r->name = "TQButtonGroup"; r->group = widgetGroup( "Containers" ); r->toolTip = "Button Group"; r->isContainer = TRUE; @@ -158,7 +158,7 @@ void WidgetDatabase::setupDataBase() r = new WidgetDatabaseRecord; r->iconSet = "frame.xpm"; - r->name = "QFrame"; + r->name = "TQFrame"; r->group = widgetGroup( "Containers" ); r->toolTip = "Frame"; r->isContainer = TRUE; @@ -167,7 +167,7 @@ void WidgetDatabase::setupDataBase() r = new WidgetDatabaseRecord; r->iconSet = "tabwidget.xpm"; - r->name = "QTabWidget"; + r->name = "TQTabWidget"; r->group = widgetGroup( "Containers" ); r->toolTip = "Tabwidget"; r->isContainer = TRUE; @@ -177,7 +177,7 @@ void WidgetDatabase::setupDataBase() r = new WidgetDatabaseRecord; r->iconSet = "listbox.xpm"; - r->name = "QListBox"; + r->name = "TQListBox"; r->group = widgetGroup( "Views" ); r->toolTip = "List Box"; @@ -185,7 +185,7 @@ void WidgetDatabase::setupDataBase() r = new WidgetDatabaseRecord; r->iconSet = "listview.xpm"; - r->name = "QListView"; + r->name = "TQListView"; r->group = widgetGroup( "Views" ); r->toolTip = "List View"; @@ -194,7 +194,7 @@ void WidgetDatabase::setupDataBase() #if defined(QT_MODULE_ICONVIEW) || defined(UIC) r = new WidgetDatabaseRecord; r->iconSet = "iconview.xpm"; - r->name = "QIconView"; + r->name = "TQIconView"; r->group = widgetGroup( "Views" ); r->toolTip = "Icon View"; @@ -204,7 +204,7 @@ void WidgetDatabase::setupDataBase() #if defined(QT_MODULE_TABLE) r = new WidgetDatabaseRecord; r->iconSet = "table.xpm"; - r->name = "QTable"; + r->name = "TQTable"; r->group = widgetGroup( "Views" ); r->toolTip = "Table"; @@ -214,7 +214,7 @@ void WidgetDatabase::setupDataBase() r = new WidgetDatabaseRecord; r->iconSet = "lineedit.xpm"; - r->name = "QLineEdit"; + r->name = "TQLineEdit"; r->group = widgetGroup( "Input" ); r->toolTip = "Line Edit"; @@ -222,7 +222,7 @@ void WidgetDatabase::setupDataBase() r = new WidgetDatabaseRecord; r->iconSet = "spinbox.xpm"; - r->name = "QSpinBox"; + r->name = "TQSpinBox"; r->group = widgetGroup( "Input" ); r->toolTip = "Spin Box"; @@ -230,7 +230,7 @@ void WidgetDatabase::setupDataBase() r = new WidgetDatabaseRecord; r->iconSet = "multilineedit.xpm"; - r->name = "QMultiLineEdit"; + r->name = "TQMultiLineEdit"; r->group = widgetGroup( "Input" ); r->toolTip = "Multi Line Edit"; @@ -238,7 +238,7 @@ void WidgetDatabase::setupDataBase() r = new WidgetDatabaseRecord; r->iconSet = "combobox.xpm"; - r->name = "QComboBox"; + r->name = "TQComboBox"; r->group = widgetGroup( "Input" ); r->toolTip = "Combo Box"; @@ -246,7 +246,7 @@ void WidgetDatabase::setupDataBase() r = new WidgetDatabaseRecord; r->iconSet = "slider.xpm"; - r->name = "QSlider"; + r->name = "TQSlider"; r->group = widgetGroup( "Input" ); r->toolTip = "Slider"; @@ -254,7 +254,7 @@ void WidgetDatabase::setupDataBase() r = new WidgetDatabaseRecord; r->iconSet = "dial.xpm"; - r->name = "QDial"; + r->name = "TQDial"; r->group = widgetGroup( "Input" ); r->toolTip = "Dial"; @@ -262,7 +262,7 @@ void WidgetDatabase::setupDataBase() r = new WidgetDatabaseRecord; r->iconSet = "label.xpm"; - r->name = "QLabel"; + r->name = "TQLabel"; r->group = widgetGroup( "Temp" ); r->toolTip = "Label"; @@ -288,7 +288,7 @@ void WidgetDatabase::setupDataBase() r = new WidgetDatabaseRecord; r->iconSet = "lcdnumber.xpm"; - r->name = "QLCDNumber"; + r->name = "TQLCDNumber"; r->group = widgetGroup( "Display" ); r->toolTip = "LCD Number"; @@ -306,7 +306,7 @@ void WidgetDatabase::setupDataBase() r = new WidgetDatabaseRecord; r->iconSet = "progress.xpm"; - r->name = "QProgressBar"; + r->name = "TQProgressBar"; r->group = widgetGroup( "Display" ); r->toolTip = "Progress Bar"; @@ -314,7 +314,7 @@ void WidgetDatabase::setupDataBase() r = new WidgetDatabaseRecord; r->iconSet = "textview.xpm"; - r->name = "QTextView"; + r->name = "TQTextView"; r->group = widgetGroup( "Display" ); r->toolTip = "Text View"; @@ -322,7 +322,7 @@ void WidgetDatabase::setupDataBase() r = new WidgetDatabaseRecord; r->iconSet = "textbrowser.xpm"; - r->name = "QTextBrowser"; + r->name = "TQTextBrowser"; r->group = widgetGroup( "Display" ); r->toolTip = "Text Browser"; @@ -338,35 +338,35 @@ void WidgetDatabase::setupDataBase() append( r ); r = new WidgetDatabaseRecord; - r->name = "QWidget"; + r->name = "TQWidget"; r->isContainer = FALSE; r->group = widgetGroup( "Forms" ); append( r ); r = new WidgetDatabaseRecord; - r->name = "QDialog"; + r->name = "TQDialog"; r->group = widgetGroup( "Forms" ); r->isContainer = FALSE; append( r ); r = new WidgetDatabaseRecord; - r->name = "QWizard"; + r->name = "TQWizard"; r->group = widgetGroup( "Forms" ); r->isContainer = TRUE; append( r ); r = new WidgetDatabaseRecord; - r->name = "QDesignerWizard"; + r->name = "TQDesignerWizard"; r->group = widgetGroup( "Forms" ); r->isContainer = TRUE; append( r ); r = new WidgetDatabaseRecord; - r->name = "QLayoutWidget"; + r->name = "TQLayoutWidget"; r->group = widgetGroup( "Temp" ); r->includeFile = ""; r->isContainer = TRUE; @@ -375,7 +375,7 @@ void WidgetDatabase::setupDataBase() r = new WidgetDatabaseRecord; r->iconSet = "tabwidget.xpm"; - r->name = "QDesignerTabWidget"; + r->name = "TQDesignerTabWidget"; r->group = widgetGroup( "Temp" ); r->isContainer = TRUE; @@ -383,7 +383,7 @@ void WidgetDatabase::setupDataBase() r = new WidgetDatabaseRecord; r->iconSet = "tabwidget.xpm"; - r->name = "QDesignerWidget"; + r->name = "TQDesignerWidget"; r->group = widgetGroup( "Temp" ); r->isContainer = TRUE; @@ -391,7 +391,7 @@ void WidgetDatabase::setupDataBase() r = new WidgetDatabaseRecord; r->iconSet = "tabwidget.xpm"; - r->name = "QDesignerDialog"; + r->name = "TQDesignerDialog"; r->group = widgetGroup( "Temp" ); r->isContainer = TRUE; @@ -424,32 +424,32 @@ int WidgetDatabase::startCustom() id. */ -QIconSet WidgetDatabase::iconSet( int id ) +TQIconSet WidgetDatabase::iconSet( int id ) { setupDataBase(); WidgetDatabaseRecord *r = at( id ); if ( !r ) - return QIconSet(); + return TQIconSet(); #if defined(DESIGNER) if ( !r->icon ) - r->icon = new QIconSet( PixmapChooser::loadPixmap( r->iconSet, PixmapChooser::Small ), + r->icon = new TQIconSet( PixmapChooser::loadPixmap( r->iconSet, PixmapChooser::Small ), PixmapChooser::loadPixmap( r->iconSet, PixmapChooser::Large ) ); return *r->icon; #endif - return QIconSet(); + return TQIconSet(); } /*! Returns the classname of the widget which is registered as \a id. */ -QString WidgetDatabase::className( int id ) +TQString WidgetDatabase::className( int id ) { setupDataBase(); WidgetDatabaseRecord *r = at( id ); if ( !r ) - return QString::null; + return TQString::null; return r->name; } @@ -457,12 +457,12 @@ QString WidgetDatabase::className( int id ) Returns the group to which the widget registered as \a id belongs. */ -QString WidgetDatabase::group( int id ) +TQString WidgetDatabase::group( int id ) { setupDataBase(); WidgetDatabaseRecord *r = at( id ); if ( !r ) - return QString::null; + return TQString::null; return r->group; } @@ -470,12 +470,12 @@ QString WidgetDatabase::group( int id ) id. */ -QString WidgetDatabase::toolTip( int id ) +TQString WidgetDatabase::toolTip( int id ) { setupDataBase(); WidgetDatabaseRecord *r = at( id ); if ( !r ) - return QString::null; + return TQString::null; return r->toolTip; } @@ -483,12 +483,12 @@ QString WidgetDatabase::toolTip( int id ) as \a id. */ -QString WidgetDatabase::whatsThis( int id ) +TQString WidgetDatabase::whatsThis( int id ) { setupDataBase(); WidgetDatabaseRecord *r = at( id ); if ( !r ) - return QString::null; + return TQString::null; return r->whatsThis; } @@ -496,12 +496,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(); WidgetDatabaseRecord *r = at( id ); if ( !r ) - return QString::null; + return TQString::null; if ( r->includeFile.isNull() ) return r->name.lower() + ".h"; return r->includeFile; @@ -520,24 +520,24 @@ bool WidgetDatabase::isContainer( int id ) return r->isContainer; } -QString WidgetDatabase::createWidgetName( int id ) +TQString WidgetDatabase::createWidgetName( int id ) { setupDataBase(); - QString n = className( id ); - if ( n == "QLayoutWidget" ) + TQString n = className( id ); + if ( n == "TQLayoutWidget" ) n = "Layout"; if ( n[ 0 ] == 'Q' ) n = n.mid( 1 ); WidgetDatabaseRecord *r = at( id ); if ( !r ) return n; - n += QString::number( ++r->nameCounter ); + n += TQString::number( ++r->nameCounter ); 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(); if ( name.isEmpty() ) @@ -546,7 +546,7 @@ int WidgetDatabase::idFromClassName( const QString &name ) if ( i ) return *i; if ( name == "FormWindow" ) - return idFromClassName( "QLayoutWidget" ); + return idFromClassName( "TQLayoutWidget" ); return -1; } @@ -568,7 +568,7 @@ void WidgetDatabase::insert( int index, WidgetDatabaseRecord *r ) db[ index ] = r; className2Id->insert( r->name, new int( index ) ); if ( index < dbcustom ) - dbcount = QMAX( dbcount, index ); + dbcount = TQMAX( dbcount, index ); } void WidgetDatabase::append( WidgetDatabaseRecord *r ) @@ -576,19 +576,19 @@ 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; } -QString WidgetDatabase::widgetGroup( int i ) +TQString WidgetDatabase::widgetGroup( int i ) { setupDataBase(); if ( i >= 0 && i < (int)wGroups->count() ) return wGroups->at( i ); - return QString::null; + return TQString::null; } int WidgetDatabase::numWidgetGroups() @@ -597,7 +597,7 @@ int WidgetDatabase::numWidgetGroups() return wGroups->count(); } -bool WidgetDatabase::isGroupVisible( const QString &g ) +bool WidgetDatabase::isGroupVisible( const TQString &g ) { setupDataBase(); return invisibleGroups->find( g ) == -1; @@ -621,16 +621,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 ) diff --git a/pyuic2/widgetdatabase.h b/pyuic2/widgetdatabase.h index a28cd5f..80f86cd 100644 --- a/pyuic2/widgetdatabase.h +++ b/pyuic2/widgetdatabase.h @@ -1,7 +1,7 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** -** This file is part of Qt Designer. +** This file is part of TQt Designer. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software @@ -29,13 +29,13 @@ struct WidgetDatabaseRecord { WidgetDatabaseRecord(); ~WidgetDatabaseRecord(); - QString iconSet, name, group, toolTip, whatsThis, includeFile; + TQString iconSet, name, group, toolTip, whatsThis, includeFile; uint isContainer : 1; - QIconSet *icon; + TQIconSet *icon; int nameCounter; }; -class WidgetDatabase : public Qt +class WidgetDatabase : public TQt { public: WidgetDatabase(); @@ -44,31 +44,31 @@ 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 isContainer( 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 isGroupVisible( const TQString &g ); static int addCustomWidget( WidgetDatabaseRecord *r ); static bool isCustomWidget( int id ); static bool isWhatsThisLoaded(); - static void loadWhatsThis( const QString &docPath ); + static void loadWhatsThis( const TQString &docPath ); }; |