summaryrefslogtreecommitdiffstats
path: root/tools/designer/shared/ui2uib.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/designer/shared/ui2uib.cpp')
-rw-r--r--tools/designer/shared/ui2uib.cpp96
1 files changed, 48 insertions, 48 deletions
diff --git a/tools/designer/shared/ui2uib.cpp b/tools/designer/shared/ui2uib.cpp
index 239697982..fa3085e50 100644
--- a/tools/designer/shared/ui2uib.cpp
+++ b/tools/designer/shared/ui2uib.cpp
@@ -198,22 +198,22 @@ int UibIndexMap::find( const TQString& name, int deflt ) const
}
}
-static void packUInt16( TQDataStream& out, Q_UINT16 n )
+static void packUInt16( TQDataStream& out, TQ_UINT16 n )
{
if ( n < 255 ) {
- out << (Q_UINT8) n;
+ out << (TQ_UINT8) n;
} else {
- out << (Q_UINT8) 255;
+ out << (TQ_UINT8) 255;
out << n;
}
}
-static void packUInt32( TQDataStream& out, Q_UINT32 n )
+static void packUInt32( TQDataStream& out, TQ_UINT32 n )
{
if ( n < 65535 ) {
- out << (Q_UINT16) n;
+ out << (TQ_UINT16) n;
} else {
- out << (Q_UINT16) 65535;
+ out << (TQ_UINT16) 65535;
out << n;
}
}
@@ -251,7 +251,7 @@ static void packVariant( UibStrTable& strings, TQDataStream& out,
{
TQStringList::ConstIterator s;
- Q_UINT8 type = value.type();
+ TQ_UINT8 type = value.type();
if ( tag == "pixmap" ) {
type = TQVariant::Pixmap;
} else if ( tag == "image" ) {
@@ -300,7 +300,7 @@ static void packVariant( UibStrTable& strings, TQDataStream& out,
packUInt32( out, value.asInt() );
break;
case TQVariant::Bool:
- out << (Q_UINT8) value.asBool();
+ out << (TQ_UINT8) value.asBool();
break;
case TQVariant::Double:
out << value.asDouble();
@@ -340,8 +340,8 @@ static void outputProperty( TQMap<int, TQStringList>& buddies, int objectNo,
if ( tag == "font" ) {
TQString family;
- Q_UINT16 pointSize = 65535;
- Q_UINT8 fontFlags = 0;
+ TQ_UINT16 pointSize = 65535;
+ TQ_UINT8 fontFlags = 0;
TQDomElement g = f.firstChild().toElement();
while ( !g.isNull() ) {
@@ -351,7 +351,7 @@ static void outputProperty( TQMap<int, TQStringList>& buddies, int objectNo,
family = text;
} else if ( g.tagName() == "pointsize" ) {
fontFlags |= Font_PointSize;
- pointSize = (Q_UINT16) text.toUInt();
+ pointSize = (TQ_UINT16) text.toUInt();
} else {
if ( g.firstChild().toText().data().toInt() != 0 ) {
if ( g.tagName() == "bold" ) {
@@ -368,7 +368,7 @@ static void outputProperty( TQMap<int, TQStringList>& buddies, int objectNo,
g = g.nextSibling().toElement();
}
- out << (Q_UINT8) Object_FontProperty;
+ out << (TQ_UINT8) Object_FontProperty;
packCString( strings, out, name );
out << fontFlags;
if ( fontFlags & Font_Family )
@@ -376,7 +376,7 @@ static void outputProperty( TQMap<int, TQStringList>& buddies, int objectNo,
if ( fontFlags & Font_PointSize )
packUInt16( out, pointSize );
} else if ( tag == "palette" ) {
- out << (Q_UINT8) Object_PaletteProperty;
+ out << (TQ_UINT8) Object_PaletteProperty;
packCString( strings, out, name );
TQDomElement g = f.firstChild().toElement();
@@ -385,25 +385,25 @@ static void outputProperty( TQMap<int, TQStringList>& buddies, int objectNo,
while ( !h.isNull() ) {
value = DomTool::elementToVariant( h, TQt::gray );
if ( h.tagName() == "color" ) {
- out << (Q_UINT8) Palette_Color;
+ out << (TQ_UINT8) Palette_Color;
out << value.asColor();
} else if ( h.tagName() == "pixmap" ) {
- out << (Q_UINT8) Palette_Pixmap;
+ out << (TQ_UINT8) Palette_Pixmap;
packVariant( strings, out, value, "pixmap" );
}
h = h.nextSibling().toElement();
}
if ( g.tagName() == "active" ) {
- out << (Q_UINT8) Palette_Active;
+ out << (TQ_UINT8) Palette_Active;
} else if ( g.tagName() == "inactive" ) {
- out << (Q_UINT8) Palette_Inactive;
+ out << (TQ_UINT8) Palette_Inactive;
} else {
- out << (Q_UINT8) Palette_Disabled;
+ out << (TQ_UINT8) Palette_Disabled;
}
g = g.nextSibling().toElement();
}
- out << (Q_UINT8) Palette_End;
+ out << (TQ_UINT8) Palette_End;
} else {
value = DomTool::elementToVariant( f, value, comment );
if ( value.isValid() ) {
@@ -411,12 +411,12 @@ static void outputProperty( TQMap<int, TQStringList>& buddies, int objectNo,
buddies[objectNo] += value.asString();
} else {
if ( tag == "string" ) {
- out << (Q_UINT8) Object_TextProperty;
+ out << (TQ_UINT8) Object_TextProperty;
packCString( strings, out, name );
packCString( strings, out, value.asString().utf8() );
packCString( strings, out, comment.utf8() );
} else {
- out << (Q_UINT8) Object_VariantProperty;
+ out << (TQ_UINT8) Object_VariantProperty;
packCString( strings, out, name );
packVariant( strings, out, value, tag );
}
@@ -437,7 +437,7 @@ static void outputGridCell( TQDataStream& out, TQDomElement elem )
rowspan = 1;
if ( column != 0 || row != 0 || colspan != 1 || rowspan != 1 ) {
- out << (Q_UINT8) Object_GridCell;
+ out << (TQ_UINT8) Object_GridCell;
packUInt16( out, column );
packUInt16( out, row );
packUInt16( out, colspan );
@@ -463,7 +463,7 @@ static void outputLayoutWidgetsSubLayout( TQMap<int, TQStringList>& buddies,
while ( !f.isNull() ) {
TQString tag = f.tagName();
if ( tag == "grid" || tag == "hbox" || tag == "vbox" ) {
- out << (Q_UINT8) Object_SubLayout;
+ out << (TQ_UINT8) Object_SubLayout;
subLayoutNo = outputObject( buddies, objects, strings, out, f,
layoutForTag(tag) );
} else if ( tag == "property" ) {
@@ -484,7 +484,7 @@ static void outputLayoutWidgetsSubLayout( TQMap<int, TQStringList>& buddies,
out.device()->at( out.device()->at() - 1 );
outputGridCell( out, elem );
outputProperty( buddies, subLayoutNo, strings, out, nameElem );
- out << (Q_UINT8) Object_End;
+ out << (TQ_UINT8) Object_End;
objects.setName( subLayoutNo, name );
}
@@ -498,7 +498,7 @@ static int outputObject( TQMap<int, TQStringList>& buddies,
bool isTQObject = !className.isEmpty();
if ( className == "TQToolBar" )
- out << (Q_UINT8) elem.attribute( "dock", "0" ).toInt();
+ out << (TQ_UINT8) elem.attribute( "dock", "0" ).toInt();
if ( className == "TQWidget" )
className = elem.attribute( "class", className ).latin1();
@@ -525,50 +525,50 @@ static int outputObject( TQMap<int, TQStringList>& buddies,
TQString actionName = f.attribute( "name" );
int no = objects.find( actionName );
if ( no != -1 ) {
- out << (Q_UINT8) Object_ActionRef;
+ out << (TQ_UINT8) Object_ActionRef;
packUInt16( out, no );
}
} else {
- out << (Q_UINT8) Object_SubAction;
+ out << (TQ_UINT8) Object_SubAction;
outputObject( buddies, objects, strings, out, f, "TQAction" );
}
} else if ( tag == "actiongroup" ) {
- out << (Q_UINT8) Object_SubAction;
+ out << (TQ_UINT8) Object_SubAction;
outputObject( buddies, objects, strings, out, f, "TQActionGroup" );
} else if ( tag == "attribute" ) {
- out << (Q_UINT8) Object_Attribute;
+ out << (TQ_UINT8) Object_Attribute;
outputProperty( buddies, objectNo, strings, out, f );
} else if ( tag == "column" ) {
- out << (Q_UINT8) Object_Column;
+ out << (TQ_UINT8) Object_Column;
outputObject( buddies, objects, strings, out, f );
} else if ( tag == "event" ) {
- out << (Q_UINT8) Object_Event;
+ out << (TQ_UINT8) Object_Event;
packCString( strings, out, f.attribute("name").latin1() );
packVariant( strings, out,
TQStringList::split(',', f.attribute("functions")) );
} else if ( tag == "grid" || tag == "hbox" || tag == "vbox" ) {
- out << (Q_UINT8) Object_SubLayout;
+ out << (TQ_UINT8) Object_SubLayout;
outputObject( buddies, objects, strings, out, f,
layoutForTag(tag) );
} else if ( tag == "item" ) {
if ( elem.tagName() == "menubar" ) {
- out << (Q_UINT8) Object_MenuItem;
+ out << (TQ_UINT8) Object_MenuItem;
packCString( strings, out, f.attribute("name").latin1() );
packCString( strings, out, f.attribute("text").utf8() );
outputObject( buddies, objects, strings, out, f );
} else {
- out << (Q_UINT8) Object_Item;
+ out << (TQ_UINT8) Object_Item;
outputObject( buddies, objects, strings, out, f );
}
} else if ( tag == "property" ) {
outputProperty( buddies, objectNo, strings, out, f );
} else if ( tag == "row" ) {
- out << (Q_UINT8) Object_Row;
+ out << (TQ_UINT8) Object_Row;
outputObject( buddies, objects, strings, out, f );
} else if ( tag == "separator" ) {
- out << (Q_UINT8) Object_Separator;
+ out << (TQ_UINT8) Object_Separator;
} else if ( tag == "spacer" ) {
- out << (Q_UINT8) Object_Spacer;
+ out << (TQ_UINT8) Object_Spacer;
outputObject( buddies, objects, strings, out, f );
} else if ( tag == "widget" ) {
if ( f.attribute("class") == "TQLayoutWidget" &&
@@ -576,13 +576,13 @@ static int outputObject( TQMap<int, TQStringList>& buddies,
outputLayoutWidgetsSubLayout( buddies, objects, strings, out,
f );
} else {
- out << (Q_UINT8) Object_SubWidget;
+ out << (TQ_UINT8) Object_SubWidget;
outputObject( buddies, objects, strings, out, f, "TQWidget" );
}
}
f = f.nextSibling().toElement();
}
- out << (Q_UINT8) Object_End;
+ out << (TQ_UINT8) Object_End;
if ( isTQObject )
objects.setName( objectNo,
DomTool::readProperty(elem, "name", "").asString() );
@@ -593,7 +593,7 @@ static void outputBlock( TQDataStream& out, BlockTag tag,
const TQByteArray& data )
{
if ( !data.isEmpty() ) {
- out << (Q_UINT8) tag;
+ out << (TQ_UINT8) tag;
packByteArray( out, data );
}
}
@@ -626,9 +626,9 @@ void convertUiToUib( TQDomDocument& doc, TQDataStream& out )
UibIndexMap objects;
int widgetNo = -1;
TQCString className;
- Q_INT16 defaultMargin = -32768;
- Q_INT16 defaultSpacing = -32768;
- Q_UINT8 introFlags = 0;
+ TQ_INT16 defaultMargin = -32768;
+ TQ_INT16 defaultSpacing = -32768;
+ TQ_UINT8 introFlags = 0;
TQDomElement elem = doc.firstChild().toElement().firstChild().toElement();
while ( !elem.isNull() ) {
@@ -834,7 +834,7 @@ void convertUiToUib( TQDomDocument& doc, TQDataStream& out )
TQString signal = UibHack::normalize( argMap["signal"] );
TQString slot = UibHack::normalize( argMap["slot"] );
- Q_UINT8 connectionFlags = 0;
+ TQ_UINT8 connectionFlags = 0;
if ( language != prevLanguage )
connectionFlags |= Connection_Language;
if ( senderNo != prevSenderNo )
@@ -880,9 +880,9 @@ void convertUiToUib( TQDomDocument& doc, TQDataStream& out )
}
out << UibMagic;
- out << (Q_UINT8) '\n';
- out << (Q_UINT8) '\r';
- out << (Q_UINT8) out.version();
+ out << (TQ_UINT8) '\n';
+ out << (TQ_UINT8) '\r';
+ out << (TQ_UINT8) out.version();
outputBlock( out, Block_Strings, strings.block() );
outputBlock( out, Block_Intro, introBlock );
outputBlock( out, Block_Images, imagesBlock );
@@ -896,5 +896,5 @@ void convertUiToUib( TQDomDocument& doc, TQDataStream& out )
outputBlock( out, Block_Functions, functionsBlock );
outputBlock( out, Block_Buddies, buddiesBlock );
outputBlock( out, Block_Connections, connectionsBlock );
- out << (Q_UINT8) Block_End;
+ out << (TQ_UINT8) Block_End;
}