summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/shared/ui2uib.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /kdevdesigner/shared/ui2uib.cpp
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz
tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdevdesigner/shared/ui2uib.cpp')
-rw-r--r--kdevdesigner/shared/ui2uib.cpp352
1 files changed, 176 insertions, 176 deletions
diff --git a/kdevdesigner/shared/ui2uib.cpp b/kdevdesigner/shared/ui2uib.cpp
index 72c09320..b1e1c6ac 100644
--- a/kdevdesigner/shared/ui2uib.cpp
+++ b/kdevdesigner/shared/ui2uib.cpp
@@ -29,15 +29,15 @@
#include <domtool.h>
-#include <qcolor.h>
-#include <qcursor.h>
-#include <qdatetime.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qfont.h>
-#include <qobject.h>
-#include <qrect.h>
-#include <qsizepolicy.h>
+#include <tqcolor.h>
+#include <tqcursor.h>
+#include <tqdatetime.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqfont.h>
+#include <tqobject.h>
+#include <tqrect.h>
+#include <tqsizepolicy.h>
/*
The .uib file format is the binary counterpart of the .ui file
@@ -49,22 +49,22 @@
The .uib format, unlike the .ui format, is internal to Trolltech
and is not officially documented; it is assumed that anybody who
needs to understand the file format can read the ui2uib and
- QWidgetFactory source code, with some guidance. And here's some
+ TQWidgetFactory source code, with some guidance. And here's some
guidance.
A .uib file starts with a 32-bit magic number that allows
- QWidgetFactory to determine the file type. The magic number is
+ TQWidgetFactory to determine the file type. The magic number is
followed by '\n' (0x0a) and '\r' (0x0d), which ensure that the
file wasn't corrupted during transfer between different
platforms. For example, transferring a .ui file from Windows to
Unix using FTP with type ASCII will produce a file with '\r\n\r'
- in place of '\n\r'. This is followed by the QDataStream format
+ in place of '\n\r'. This is followed by the TQDataStream format
version number used.
The rest of the file is made up of blocks, each of which starts
with a block type (Block_XXX) and a block length. Block_Intro and
Block_Widget are mandatory; the others are optional.
- QWidgetFactory makes certain assumptions about the order of the
+ TQWidgetFactory makes certain assumptions about the order of the
blocks; for example, it expects Block_String before any other
block that refers to a string and Block_Images before
Block_Widget. The order generated by ui2uib is one of the orders
@@ -91,10 +91,10 @@
2. QObjects are referred to by index in a table rather than by
name. The table itself is not stored in the .uib file; it is
- rather build dynamically by ui2uib and QWidgetFactory as new
+ rather build dynamically by ui2uib and TQWidgetFactory as new
objects are specified. In ui2uib, the table is represented by
- a UibIndexMap object; in QWidgetFactory, a plain array of
- QObject pointers suffices.
+ a UibIndexMap object; in TQWidgetFactory, a plain array of
+ TQObject pointers suffices.
3. The data is packed to take as little place as possible,
without slowing down QLayoutFactory too much. For example, an
@@ -105,11 +105,11 @@
48 bits.
4. The name of a signal or slot and its signature are saved
- separately. That way, if a signal 'foo(const QString&)' is
- connected to a slot 'bar(const QString&)', the string-table
- will only contain 'foo', 'bar', and '(const QString&)',
- instead of the longer 'foo(const QString&)' and 'bar(const
- QString&)'. The signatures are normalized beforehand to
+ separately. That way, if a signal 'foo(const TQString&)' is
+ connected to a slot 'bar(const TQString&)', the string-table
+ will only contain 'foo', 'bar', and '(const TQString&)',
+ instead of the longer 'foo(const TQString&)' and 'bar(const
+ TQString&)'. The signatures are normalized beforehand to
ensure that trivial spacing problems don't result in multiple
string-table entries.
@@ -134,24 +134,24 @@
use UibMagic + 1 for version 2, UibMagic + 2 for version 3, etc.
*/
-static QCString layoutForTag( const QString& tag )
+static TQCString layoutForTag( const TQString& tag )
{
if ( tag == "grid" ) {
- return "QGridLayout";
+ return "TQGridLayout";
} else if ( tag == "hbox" ) {
- return "QHBoxLayout";
+ return "TQHBoxLayout";
} else if ( tag == "vbox" ) {
- return "QVBoxLayout";
+ return "TQVBoxLayout";
} else {
- return "QLayout";
+ return "TQLayout";
}
}
class UibHack : public QObject
{
public:
- static QString normalize( const QString& member ) {
- return QString::fromUtf8( QObject::normalizeSignalSlot(member.utf8()) );
+ static TQString normalize( const TQString& member ) {
+ return TQString::fromUtf8( TQObject::normalizeSignalSlot(member.utf8()) );
}
};
@@ -160,20 +160,20 @@ class UibIndexMap
public:
UibIndexMap() : next( 0 ) { }
- void insert( const QString& name ) { setName( insert(), name ); }
+ void insert( const TQString& name ) { setName( insert(), name ); }
int insert() { return next++; }
- void setName( int no, const QString& name );
+ void setName( int no, const TQString& name );
- int find( const QString& name, int deflt = -1 ) const;
+ int find( const TQString& name, int deflt = -1 ) const;
int count() const { return next; }
private:
- QMap<QString, int> nameMap;
- QMap<QString, int> conflicts;
+ TQMap<TQString, int> nameMap;
+ TQMap<TQString, int> conflicts;
int next;
};
-void UibIndexMap::setName( int no, const QString& name )
+void UibIndexMap::setName( int no, const TQString& name )
{
if ( !name.isEmpty() ) {
if ( *nameMap.insert(name, no, FALSE) != no )
@@ -181,9 +181,9 @@ void UibIndexMap::setName( int no, const QString& name )
}
}
-int UibIndexMap::find( const QString& name, int deflt ) const
+int UibIndexMap::find( const TQString& name, int deflt ) const
{
- QMap<QString, int>::ConstIterator no = nameMap.find( name );
+ TQMap<TQString, int>::ConstIterator no = nameMap.find( name );
if ( no == nameMap.end() || conflicts.contains(name) ) {
return deflt;
} else {
@@ -191,7 +191,7 @@ int UibIndexMap::find( const QString& name, int deflt ) const
}
}
-static void packUInt16( QDataStream& out, Q_UINT16 n )
+static void packUInt16( TQDataStream& out, Q_UINT16 n )
{
if ( n < 255 ) {
out << (Q_UINT8) n;
@@ -201,7 +201,7 @@ static void packUInt16( QDataStream& out, Q_UINT16 n )
}
}
-static void packUInt32( QDataStream& out, Q_UINT32 n )
+static void packUInt32( TQDataStream& out, Q_UINT32 n )
{
if ( n < 65535 ) {
out << (Q_UINT16) n;
@@ -211,26 +211,26 @@ static void packUInt32( QDataStream& out, Q_UINT32 n )
}
}
-static void packByteArray( QDataStream& out, const QByteArray& array )
+static void packByteArray( TQDataStream& out, const TQByteArray& array )
{
packUInt32( out, array.size() );
out.writeRawBytes( array.data(), array.size() );
}
-static void packCString( UibStrTable& strings, QDataStream& out,
+static void packCString( UibStrTable& strings, TQDataStream& out,
const char *cstr )
{
packUInt32( out, strings.insertCString(cstr) );
}
-static void packString( UibStrTable& strings, QDataStream& out,
- const QString& str )
+static void packString( UibStrTable& strings, TQDataStream& out,
+ const TQString& str )
{
packUInt32( out, strings.insertString(str) );
}
-static void packStringSplit( UibStrTable& strings, QDataStream& out,
- const QString& str, QChar sep )
+static void packStringSplit( UibStrTable& strings, TQDataStream& out,
+ const TQString& str, TQChar sep )
{
int pos = str.find( sep );
if ( pos == -1 )
@@ -239,29 +239,29 @@ static void packStringSplit( UibStrTable& strings, QDataStream& out,
packString( strings, out, str.mid(pos) );
}
-static void packVariant( UibStrTable& strings, QDataStream& out,
- QVariant value, QString tag = "" )
+static void packVariant( UibStrTable& strings, TQDataStream& out,
+ TQVariant value, TQString tag = "" )
{
- QStringList::ConstIterator s;
+ TQStringList::ConstIterator s;
Q_UINT8 type = value.type();
if ( tag == "pixmap" ) {
- type = QVariant::Pixmap;
+ type = TQVariant::Pixmap;
} else if ( tag == "image" ) {
- type = QVariant::Image;
+ type = TQVariant::Image;
} else if ( tag == "iconset" ) {
- type = QVariant::IconSet;
+ type = TQVariant::IconSet;
}
out << type;
switch ( type ) {
- case QVariant::String:
- case QVariant::Pixmap:
- case QVariant::Image:
- case QVariant::IconSet:
+ case TQVariant::String:
+ case TQVariant::Pixmap:
+ case TQVariant::Image:
+ case TQVariant::IconSet:
packString( strings, out, value.asString() );
break;
- case QVariant::StringList:
+ case TQVariant::StringList:
packUInt16( out, value.asStringList().count() );
s = value.asStringList().begin();
while ( s != value.asStringList().end() ) {
@@ -269,48 +269,48 @@ static void packVariant( UibStrTable& strings, QDataStream& out,
++s;
}
break;
- case QVariant::Font:
+ case TQVariant::Font:
out << value.asFont();
break;
- case QVariant::Rect:
+ case TQVariant::Rect:
packUInt16( out, value.asRect().x() );
packUInt16( out, value.asRect().y() );
packUInt16( out, value.asRect().width() );
packUInt16( out, value.asRect().height() );
break;
- case QVariant::Size:
+ case TQVariant::Size:
packUInt16( out, value.asSize().width() );
packUInt16( out, value.asSize().height() );
break;
- case QVariant::Color:
+ case TQVariant::Color:
out << value.asColor();
break;
- case QVariant::Point:
+ case TQVariant::Point:
packUInt16( out, value.asPoint().x() );
packUInt16( out, value.asPoint().y() );
break;
- case QVariant::Int:
+ case TQVariant::Int:
packUInt32( out, value.asInt() );
break;
- case QVariant::Bool:
+ case TQVariant::Bool:
out << (Q_UINT8) value.asBool();
break;
- case QVariant::Double:
+ case TQVariant::Double:
out << value.asDouble();
break;
- case QVariant::CString:
+ case TQVariant::CString:
packCString( strings, out, value.asCString() );
break;
- case QVariant::Cursor:
+ case TQVariant::Cursor:
out << value.asCursor();
break;
- case QVariant::Date:
+ case TQVariant::Date:
out << value.asDate();
break;
- case QVariant::Time:
+ case TQVariant::Time:
out << value.asTime();
break;
- case QVariant::DateTime:
+ case TQVariant::DateTime:
out << value.asDateTime();
break;
default:
@@ -318,27 +318,27 @@ static void packVariant( UibStrTable& strings, QDataStream& out,
}
}
-static void outputProperty( QMap<int, QStringList>& buddies, int objectNo,
- UibStrTable& strings, QDataStream& out,
- QDomElement elem )
+static void outputProperty( TQMap<int, TQStringList>& buddies, int objectNo,
+ UibStrTable& strings, TQDataStream& out,
+ TQDomElement elem )
{
- QCString name = elem.attribute( "name" ).latin1();
- QDomElement f = elem.firstChild().toElement();
- QString tag = f.tagName();
- QString comment;
- QVariant value;
+ TQCString name = elem.attribute( "name" ).latin1();
+ TQDomElement f = elem.firstChild().toElement();
+ TQString tag = f.tagName();
+ TQString comment;
+ TQVariant value;
if ( name == "resizeable" )
name = "resizable";
if ( tag == "font" ) {
- QString family;
+ TQString family;
Q_UINT16 pointSize = 65535;
Q_UINT8 fontFlags = 0;
- QDomElement g = f.firstChild().toElement();
+ TQDomElement g = f.firstChild().toElement();
while ( !g.isNull() ) {
- QString text = g.firstChild().toText().data();
+ TQString text = g.firstChild().toText().data();
if ( g.tagName() == "family" ) {
fontFlags |= Font_Family;
family = text;
@@ -372,9 +372,9 @@ static void outputProperty( QMap<int, QStringList>& buddies, int objectNo,
out << (Q_UINT8) Object_PaletteProperty;
packCString( strings, out, name );
- QDomElement g = f.firstChild().toElement();
+ TQDomElement g = f.firstChild().toElement();
while ( !g.isNull() ) {
- QDomElement h = g.firstChild().toElement();
+ TQDomElement h = g.firstChild().toElement();
while ( !h.isNull() ) {
value = DomTool::elementToVariant( h, Qt::gray );
if ( h.tagName() == "color" ) {
@@ -418,7 +418,7 @@ static void outputProperty( QMap<int, QStringList>& buddies, int objectNo,
}
}
-static void outputGridCell( QDataStream& out, QDomElement elem )
+static void outputGridCell( TQDataStream& out, TQDomElement elem )
{
int column = elem.attribute( "column", "0" ).toInt();
int row = elem.attribute( "row", "0" ).toInt();
@@ -438,23 +438,23 @@ static void outputGridCell( QDataStream& out, QDomElement elem )
}
}
-static int outputObject( QMap<int, QStringList>& buddies,
+static int outputObject( TQMap<int, TQStringList>& buddies,
UibIndexMap& objects, UibStrTable& strings,
- QDataStream& out, QDomElement elem,
- QCString className = "" );
+ TQDataStream& out, TQDomElement elem,
+ TQCString className = "" );
-static void outputLayoutWidgetsSubLayout( QMap<int, QStringList>& buddies,
+static void outputLayoutWidgetsSubLayout( TQMap<int, TQStringList>& buddies,
UibIndexMap& objects,
UibStrTable& strings,
- QDataStream& out, QDomElement elem )
+ TQDataStream& out, TQDomElement elem )
{
int subLayoutNo = -1;
- QCString name;
- QDomElement nameElem;
+ TQCString name;
+ TQDomElement nameElem;
- QDomElement f = elem.firstChild().toElement();
+ TQDomElement f = elem.firstChild().toElement();
while ( !f.isNull() ) {
- QString tag = f.tagName();
+ TQString tag = f.tagName();
if ( tag == "grid" || tag == "hbox" || tag == "vbox" ) {
out << (Q_UINT8) Object_SubLayout;
subLayoutNo = outputObject( buddies, objects, strings, out, f,
@@ -483,16 +483,16 @@ static void outputLayoutWidgetsSubLayout( QMap<int, QStringList>& buddies,
}
}
-static int outputObject( QMap<int, QStringList>& buddies,
+static int outputObject( TQMap<int, TQStringList>& buddies,
UibIndexMap& objects, UibStrTable& strings,
- QDataStream& out, QDomElement elem,
- QCString className )
+ TQDataStream& out, TQDomElement elem,
+ TQCString className )
{
bool isQObject = !className.isEmpty();
- if ( className == "QToolBar" )
+ if ( className == "TQToolBar" )
out << (Q_UINT8) elem.attribute( "dock", "0" ).toInt();
- if ( className == "QWidget" )
+ if ( className == "TQWidget" )
className = elem.attribute( "class", className ).latin1();
int objectNo = -1;
@@ -504,18 +504,18 @@ static int outputObject( QMap<int, QStringList>& buddies,
outputGridCell( out, elem );
// optimization: insert '&Foo' into string-table before 'Foo'
- if ( className == "QAction" || className == "QActionGroup" ) {
- QVariant value = DomTool::readProperty( elem, "menuText", QVariant() );
+ if ( className == "TQAction" || className == "TQActionGroup" ) {
+ TQVariant value = DomTool::readProperty( elem, "menuText", TQVariant() );
if ( value.asString().startsWith("&") )
strings.insertString( value.asString() );
}
- QDomElement f = elem.firstChild().toElement();
+ TQDomElement f = elem.firstChild().toElement();
while ( !f.isNull() ) {
- QString tag = f.tagName();
+ TQString tag = f.tagName();
if ( tag == "action" ) {
if ( elem.tagName() == "item" || elem.tagName() == "toolbar" ) {
- QString actionName = f.attribute( "name" );
+ TQString actionName = f.attribute( "name" );
int no = objects.find( actionName );
if ( no != -1 ) {
out << (Q_UINT8) Object_ActionRef;
@@ -523,11 +523,11 @@ static int outputObject( QMap<int, QStringList>& buddies,
}
} else {
out << (Q_UINT8) Object_SubAction;
- outputObject( buddies, objects, strings, out, f, "QAction" );
+ outputObject( buddies, objects, strings, out, f, "TQAction" );
}
} else if ( tag == "actiongroup" ) {
out << (Q_UINT8) Object_SubAction;
- outputObject( buddies, objects, strings, out, f, "QActionGroup" );
+ outputObject( buddies, objects, strings, out, f, "TQActionGroup" );
} else if ( tag == "attribute" ) {
out << (Q_UINT8) Object_Attribute;
outputProperty( buddies, objectNo, strings, out, f );
@@ -538,7 +538,7 @@ static int outputObject( QMap<int, QStringList>& buddies,
out << (Q_UINT8) Object_Event;
packCString( strings, out, f.attribute("name").latin1() );
packVariant( strings, out,
- QStringList::split(',', f.attribute("functions")) );
+ TQStringList::split(',', f.attribute("functions")) );
} else if ( tag == "grid" || tag == "hbox" || tag == "vbox" ) {
out << (Q_UINT8) Object_SubLayout;
outputObject( buddies, objects, strings, out, f,
@@ -570,7 +570,7 @@ static int outputObject( QMap<int, QStringList>& buddies,
f );
} else {
out << (Q_UINT8) Object_SubWidget;
- outputObject( buddies, objects, strings, out, f, "QWidget" );
+ outputObject( buddies, objects, strings, out, f, "TQWidget" );
}
}
f = f.nextSibling().toElement();
@@ -582,8 +582,8 @@ static int outputObject( QMap<int, QStringList>& buddies,
return objectNo;
}
-static void outputBlock( QDataStream& out, BlockTag tag,
- const QByteArray& data )
+static void outputBlock( TQDataStream& out, BlockTag tag,
+ const TQByteArray& data )
{
if ( !data.isEmpty() ) {
out << (Q_UINT8) tag;
@@ -591,41 +591,41 @@ static void outputBlock( QDataStream& out, BlockTag tag,
}
}
-void convertUiToUib( QDomDocument& doc, QDataStream& out )
+void convertUiToUib( TQDomDocument& doc, TQDataStream& out )
{
- QByteArray introBlock;
- QByteArray actionsBlock;
- QByteArray buddiesBlock;
- QByteArray connectionsBlock;
- QByteArray functionsBlock;
- QByteArray imagesBlock;
- QByteArray menubarBlock;
- QByteArray slotsBlock;
- QByteArray tabstopsBlock;
- QByteArray toolbarsBlock;
- QByteArray variablesBlock;
- QByteArray widgetBlock;
-
- QDomElement actionsElem;
- QDomElement connectionsElem;
- QDomElement imagesElem;
- QDomElement menubarElem;
- QDomElement tabstopsElem;
- QDomElement toolbarsElem;
- QDomElement widgetElem;
-
- QMap<int, QStringList> buddies;
+ TQByteArray introBlock;
+ TQByteArray actionsBlock;
+ TQByteArray buddiesBlock;
+ TQByteArray connectionsBlock;
+ TQByteArray functionsBlock;
+ TQByteArray imagesBlock;
+ TQByteArray menubarBlock;
+ TQByteArray slotsBlock;
+ TQByteArray tabstopsBlock;
+ TQByteArray toolbarsBlock;
+ TQByteArray variablesBlock;
+ TQByteArray widgetBlock;
+
+ TQDomElement actionsElem;
+ TQDomElement connectionsElem;
+ TQDomElement imagesElem;
+ TQDomElement menubarElem;
+ TQDomElement tabstopsElem;
+ TQDomElement toolbarsElem;
+ TQDomElement widgetElem;
+
+ TQMap<int, TQStringList> buddies;
UibStrTable strings;
UibIndexMap objects;
int widgetNo = -1;
- QCString className;
+ TQCString className;
Q_INT16 defaultMargin = -32768;
Q_INT16 defaultSpacing = -32768;
Q_UINT8 introFlags = 0;
- QDomElement elem = doc.firstChild().toElement().firstChild().toElement();
+ TQDomElement elem = doc.firstChild().toElement().firstChild().toElement();
while ( !elem.isNull() ) {
- QString tag = elem.tagName();
+ TQString tag = elem.tagName();
switch ( tag[0].latin1() ) {
case 'a':
@@ -641,8 +641,8 @@ void convertUiToUib( QDomDocument& doc, QDataStream& out )
break;
case 'f':
if ( tag == "functions" ) {
- QDataStream out2( functionsBlock, IO_WriteOnly );
- QDomElement f = elem.firstChild().toElement();
+ TQDataStream out2( functionsBlock, IO_WriteOnly );
+ TQDomElement f = elem.firstChild().toElement();
while ( !f.isNull() ) {
if ( f.tagName() == "function" ) {
packStringSplit( strings, out2,
@@ -656,17 +656,17 @@ void convertUiToUib( QDomDocument& doc, QDataStream& out )
break;
case 'i':
if ( tag == "images" ) {
- QDataStream out2( imagesBlock, IO_WriteOnly );
- QDomElement f = elem.firstChild().toElement();
+ TQDataStream out2( imagesBlock, IO_WriteOnly );
+ TQDomElement f = elem.firstChild().toElement();
while ( !f.isNull() ) {
if ( f.tagName() == "image" ) {
- QString name = f.attribute( "name" );
- QDomElement g = f.firstChild().toElement();
+ TQString name = f.attribute( "name" );
+ TQDomElement g = f.firstChild().toElement();
if ( g.tagName() == "data" ) {
- QString format = g.attribute( "format", "PNG" );
- QString hex = g.firstChild().toText().data();
+ TQString format = g.attribute( "format", "PNG" );
+ TQString hex = g.firstChild().toText().data();
int n = hex.length() / 2;
- QByteArray data( n );
+ TQByteArray data( n );
for ( int i = 0; i < n; i++ )
data[i] = (char) hex.mid( 2 * i, 2 )
.toUInt( 0, 16 );
@@ -683,10 +683,10 @@ void convertUiToUib( QDomDocument& doc, QDataStream& out )
break;
case 'l':
if ( tag == "layoutdefaults" ) {
- QString margin = elem.attribute( "margin" );
+ TQString margin = elem.attribute( "margin" );
if ( !margin.isEmpty() )
defaultMargin = margin.toInt();
- QString spacing = elem.attribute( "spacing" );
+ TQString spacing = elem.attribute( "spacing" );
if ( !spacing.isEmpty() )
defaultSpacing = spacing.toInt();
}
@@ -701,12 +701,12 @@ void convertUiToUib( QDomDocument& doc, QDataStream& out )
break;
case 's':
if ( tag == "slots" ) {
- QDataStream out2( slotsBlock, IO_WriteOnly );
- QDomElement f = elem.firstChild().toElement();
+ TQDataStream out2( slotsBlock, IO_WriteOnly );
+ TQDomElement f = elem.firstChild().toElement();
while ( !f.isNull() ) {
if ( f.tagName() == "slot" ) {
- QString language = f.attribute( "language", "C++" );
- QString slot = UibHack::normalize(
+ TQString language = f.attribute( "language", "C++" );
+ TQString slot = UibHack::normalize(
f.firstChild().toText().data() );
packString( strings, out2, language );
packStringSplit( strings, out2, slot, '(' );
@@ -724,11 +724,11 @@ void convertUiToUib( QDomDocument& doc, QDataStream& out )
break;
case 'v':
if ( tag == "variable" ) {
- QDataStream out2( variablesBlock, IO_WriteOnly | IO_Append );
+ TQDataStream out2( variablesBlock, IO_WriteOnly | IO_Append );
packString( strings, out2, elem.firstChild().toText().data() );
} else if ( tag == "variables" ) {
- QDataStream out2( variablesBlock, IO_WriteOnly );
- QDomElement f = elem.firstChild().toElement();
+ TQDataStream out2( variablesBlock, IO_WriteOnly );
+ TQDomElement f = elem.firstChild().toElement();
while ( !f.isNull() ) {
if ( f.tagName() == "variable" )
packString( strings, out2,
@@ -745,17 +745,17 @@ void convertUiToUib( QDomDocument& doc, QDataStream& out )
}
{
- QDataStream out2( widgetBlock, IO_WriteOnly );
+ TQDataStream out2( widgetBlock, IO_WriteOnly );
widgetNo = outputObject( buddies, objects, strings, out2, widgetElem,
- "QWidget" );
+ "TQWidget" );
}
if ( !tabstopsElem.isNull() ) {
- QDataStream out2( tabstopsBlock, IO_WriteOnly );
- QDomElement f = tabstopsElem.firstChild().toElement();
+ TQDataStream out2( tabstopsBlock, IO_WriteOnly );
+ TQDomElement f = tabstopsElem.firstChild().toElement();
while ( !f.isNull() ) {
if ( f.tagName() == "tabstop" ) {
- QString widgetName = f.firstChild().toText().data();
+ TQString widgetName = f.firstChild().toText().data();
int no = objects.find( widgetName );
if ( no != -1 )
packUInt16( out2, no );
@@ -765,31 +765,31 @@ void convertUiToUib( QDomDocument& doc, QDataStream& out )
}
if ( !actionsElem.isNull() ) {
- QDataStream out2( actionsBlock, IO_WriteOnly );
+ TQDataStream out2( actionsBlock, IO_WriteOnly );
outputObject( buddies, objects, strings, out2, actionsElem );
}
if ( !menubarElem.isNull() ) {
- QDataStream out2( menubarBlock, IO_WriteOnly );
+ TQDataStream out2( menubarBlock, IO_WriteOnly );
outputObject( buddies, objects, strings, out2, menubarElem,
- "QMenuBar" );
+ "TQMenuBar" );
}
if ( !toolbarsElem.isNull() ) {
- QDataStream out2( toolbarsBlock, IO_WriteOnly );
- QDomElement f = toolbarsElem.firstChild().toElement();
+ TQDataStream out2( toolbarsBlock, IO_WriteOnly );
+ TQDomElement f = toolbarsElem.firstChild().toElement();
while ( !f.isNull() ) {
if ( f.tagName() == "toolbar" )
- outputObject( buddies, objects, strings, out2, f, "QToolBar" );
+ outputObject( buddies, objects, strings, out2, f, "TQToolBar" );
f = f.nextSibling().toElement();
}
}
if ( !buddies.isEmpty() ) {
- QDataStream out2( buddiesBlock, IO_WriteOnly );
- QMap<int, QStringList>::ConstIterator a = buddies.begin();
+ TQDataStream out2( buddiesBlock, IO_WriteOnly );
+ TQMap<int, TQStringList>::ConstIterator a = buddies.begin();
while ( a != buddies.end() ) {
- QStringList::ConstIterator b = (*a).begin();
+ TQStringList::ConstIterator b = (*a).begin();
while ( b != (*a).end() ) {
int no = objects.find( *b );
if ( no != -1 ) {
@@ -803,29 +803,29 @@ void convertUiToUib( QDomDocument& doc, QDataStream& out )
}
if ( !connectionsElem.isNull() ) {
- QString prevLanguage = "C++";
+ TQString prevLanguage = "C++";
int prevSenderNo = 0;
- QString prevSignal = "clicked()";
+ TQString prevSignal = "clicked()";
int prevReceiverNo = 0;
- QString prevSlot = "accept()";
+ TQString prevSlot = "accept()";
- QDataStream out2( connectionsBlock, IO_WriteOnly );
- QDomElement f = connectionsElem.firstChild().toElement();
+ TQDataStream out2( connectionsBlock, IO_WriteOnly );
+ TQDomElement f = connectionsElem.firstChild().toElement();
while ( !f.isNull() ) {
if ( f.tagName() == "connection" ) {
- QMap<QString, QString> argMap;
+ TQMap<TQString, TQString> argMap;
- QDomElement g = f.firstChild().toElement();
+ TQDomElement g = f.firstChild().toElement();
while ( !g.isNull() ) {
argMap[g.tagName()] = g.firstChild().toText().data();
g = g.nextSibling().toElement();
}
- QString language = f.attribute( "language", "C++" );
+ TQString language = f.attribute( "language", "C++" );
int senderNo = objects.find( argMap["sender"], widgetNo );
int receiverNo = objects.find( argMap["receiver"], widgetNo );
- QString signal = UibHack::normalize( argMap["signal"] );
- QString slot = UibHack::normalize( argMap["slot"] );
+ TQString signal = UibHack::normalize( argMap["signal"] );
+ TQString slot = UibHack::normalize( argMap["slot"] );
Q_UINT8 connectionFlags = 0;
if ( language != prevLanguage )
@@ -864,7 +864,7 @@ void convertUiToUib( QDomDocument& doc, QDataStream& out )
}
{
- QDataStream out2( introBlock, IO_WriteOnly );
+ TQDataStream out2( introBlock, IO_WriteOnly );
out2 << introFlags;
out2 << defaultMargin;
out2 << defaultSpacing;