summaryrefslogtreecommitdiffstats
path: root/python/pyqt/pyuic3/object.cpp
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/object.cpp
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/object.cpp')
-rw-r--r--python/pyqt/pyuic3/object.cpp270
1 files changed, 135 insertions, 135 deletions
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() ) {