summaryrefslogtreecommitdiffstats
path: root/qtruby/rubylib/designer/rbuic/uic.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qtruby/rubylib/designer/rbuic/uic.cpp')
-rw-r--r--qtruby/rubylib/designer/rbuic/uic.cpp470
1 files changed, 235 insertions, 235 deletions
diff --git a/qtruby/rubylib/designer/rbuic/uic.cpp b/qtruby/rubylib/designer/rbuic/uic.cpp
index 07fb377a..106e9879 100644
--- a/qtruby/rubylib/designer/rbuic/uic.cpp
+++ b/qtruby/rubylib/designer/rbuic/uic.cpp
@@ -67,42 +67,42 @@ void RubyIndent::calc()
}
-TQString Uic::getComment( const TQDomNode& n )
+TTQString Uic::getComment( const TTQDomNode& n )
{
- TQDomNode child = n.firstChild();
+ TTQDomNode child = n.firstChild();
while ( !child.isNull() ) {
if ( child.toElement().tagName() == "comment" )
return child.toElement().firstChild().toText().data();
child = child.nextSibling();
}
- return TQString::null;
+ return TTQString::null;
}
-TQString Uic::mkBool( bool b )
+TTQString Uic::mkBool( bool b )
{
return b? "true" : "false";
}
-TQString Uic::mkBool( const TQString& s )
+TTQString Uic::mkBool( const TTQString& s )
{
return mkBool( s == "true" || s == "1" );
}
-bool Uic::toBool( const TQString& s )
+bool Uic::toBool( const TTQString& s )
{
return s == "true" || s.toInt() != 0;
}
-TQString Uic::fixString( const TQString &str )
+TTQString Uic::fixString( const TTQString &str )
{
- TQString s( str );
- s.replace( TQRegExp( "\\\\" ), "\\\\" );
- s.replace( TQRegExp( "\"" ), "\\\"" );
- s.replace( TQRegExp( "\r?\n" ), "\\n\" +\n" + indent + "\"" );
+ TTQString s( str );
+ s.replace( TTQRegExp( "\\\\" ), "\\\\" );
+ s.replace( TTQRegExp( "\"" ), "\\\"" );
+ s.replace( TTQRegExp( "\r?\n" ), "\\n\" +\n" + indent + "\"" );
return "\"" + s + "\"";
}
-TQString Uic::trcall( const TQString& sourceText, const TQString& comment )
+TTQString Uic::trcall( const TTQString& sourceText, const TTQString& comment )
{
if ( sourceText.isEmpty() && comment.isEmpty() )
return "nil";
@@ -112,19 +112,19 @@ TQString Uic::trcall( const TQString& sourceText, const TQString& comment )
return trmacro + "(" + fixString( sourceText ) + "," + fixString( comment ) + ")";
}
-TQString Uic::mkStdSet( const TQString& prop )
+TTQString Uic::mkStdSet( const TTQString& prop )
{
- return TQString( "set" ) + prop[0].upper() + prop.mid(1);
+ return TTQString( "set" ) + prop[0].upper() + prop.mid(1);
}
-bool Uic::isEmptyFunction( const TQString& fname )
+bool Uic::isEmptyFunction( const TTQString& fname )
{
- TQMap<TQString, TQString>::Iterator fit = functionImpls.find( Parser::cleanArgs( fname ) );
+ TTQMap<TTQString, TTQString>::Iterator fit = functionImpls.find( Parser::cleanArgs( fname ) );
if ( fit != functionImpls.end() ) {
int begin = (*fit).find( "{" );
- TQString body = (*fit).mid( begin + 1, (*fit).findRev( "}" ) - begin - 1 );
+ TTQString body = (*fit).mid( begin + 1, (*fit).findRev( "}" ) - begin - 1 );
return body.simplifyWhiteSpace().isEmpty();
}
// For now ruby functions are always empty, until a rubyeditor Qt Designer plugin exists..
@@ -139,9 +139,9 @@ bool Uic::isEmptyFunction( const TQString& fname )
The class Uic encapsulates the user interface compiler (uic).
*/
-Uic::Uic( const TQString &fn, TQTextStream &outStream, TQDomDocument doc,
- bool subcl, const TQString &trm, const TQString& subClass,
- bool omitForwardDecls, TQString &uicClass, bool useKDE )
+Uic::Uic( const TTQString &fn, TTQTextStream &outStream, TTQDomDocument doc,
+ bool subcl, const TTQString &trm, const TTQString& subClass,
+ bool omitForwardDecls, TTQString &uicClass, bool useKDE )
: out( outStream ), trout( &languageChangeBody ),
trmacro( trm ), nofwd( omitForwardDecls )
{
@@ -164,16 +164,16 @@ Uic::Uic( const TQString &fn, TQTextStream &outStream, TQDomDocument doc,
uiFileVersion = doc.firstChild().toElement().attribute("version");
stdsetdef = toBool( doc.firstChild().toElement().attribute("stdsetdef") );
- TQDomElement e = doc.firstChild().firstChild().toElement();
- TQDomElement widget;
+ TTQDomElement e = doc.firstChild().firstChild().toElement();
+ TTQDomElement widget;
while ( !e.isNull() ) {
if ( e.tagName() == "widget" ) {
widget = e;
} else if ( e.tagName() == "pixmapinproject" ) {
externPixmaps = true;
} else if ( e.tagName() == "layoutdefaults" ) {
- defSpacing = e.attribute( "spacing", TQString::number( defSpacing ) ).toInt();
- defMargin = e.attribute( "margin", TQString::number( defMargin ) ).toInt();
+ defSpacing = e.attribute( "spacing", TTQString::number( defSpacing ) ).toInt();
+ defMargin = e.attribute( "margin", TTQString::number( defMargin ) ).toInt();
}
e = e.nextSibling().toElement();
}
@@ -193,26 +193,26 @@ Uic::Uic( const TQString &fn, TQTextStream &outStream, TQDomDocument doc,
/*! Extracts a pixmap loader function from \a e
*/
-TQString Uic::getPixmapLoaderFunction( const TQDomElement& e )
+TTQString Uic::getPixmapLoaderFunction( const TTQDomElement& e )
{
- TQDomElement n;
+ TTQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "pixmapfunction" )
return n.firstChild().toText().data();
}
- return TQString::null;
+ return TTQString::null;
}
/*! Extracts the forms class name from \a e
*/
-TQString Uic::getFormClassName( const TQDomElement& e )
+TTQString Uic::getFormClassName( const TTQDomElement& e )
{
- TQDomElement n;
- TQString cn;
+ TTQDomElement n;
+ TTQString cn;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "class" ) {
- TQString s = n.firstChild().toText().data();
+ TTQString s = n.firstChild().toText().data();
int i;
while ( ( i = s.find(' ' )) != -1 )
s[i] = '_';
@@ -224,16 +224,16 @@ TQString Uic::getFormClassName( const TQDomElement& e )
/*! Extracts a Ruby class name from \a e.
*/
-TQString Uic::getClassName( const TQDomElement& e )
+TTQString Uic::getClassName( const TTQDomElement& e )
{
- TQString s = e.attribute( "class" );
+ TTQString s = e.attribute( "class" );
if ( s.isEmpty() && e.tagName() == "toolbar" )
- s = "Qt::ToolBar";
+ s = "TQt::ToolBar";
else if ( s.isEmpty() && e.tagName() == "menubar" )
- s = "Qt::MenuBar";
+ s = "TQt::MenuBar";
else
{
- TQRegExp r("^([QK])(\\S+)");
+ TTQRegExp r("^([QK])(\\S+)");
if( r.search( s ) != -1 ) {
if (r.cap(1) == "K") {
hasKDEwidget = true;
@@ -242,7 +242,7 @@ TQString Uic::getClassName( const TQDomElement& e )
if (s.startsWith("Qext")) {
s = "Qext::" + r.cap(2).mid(4);
} else {
- s = "Qt::" + r.cap(2);
+ s = "TQt::" + r.cap(2);
}
}
}
@@ -255,11 +255,11 @@ TQString Uic::getClassName( const TQDomElement& e )
/*! Returns TRUE if database framework code is generated, else FALSE.
*/
-bool Uic::isFrameworkCodeGenerated( const TQDomElement& e )
+bool Uic::isFrameworkCodeGenerated( const TTQDomElement& e )
{
- TQDomElement n = getObjectProperty( e, "frameworkCode" );
+ TTQDomElement n = getObjectProperty( e, "frameworkCode" );
if ( n.attribute("name") == "frameworkCode" &&
- !DomTool::elementToVariant( n.firstChild().toElement(), TQVariant( true, 0 ) ).toBool() )
+ !DomTool::elementToVariant( n.firstChild().toElement(), TTQVariant( true, 0 ) ).toBool() )
return false;
return true;
}
@@ -267,36 +267,36 @@ bool Uic::isFrameworkCodeGenerated( const TQDomElement& e )
/*! Extracts an object name from \a e. It's stored in the 'name'
property.
*/
-TQString Uic::getObjectName( const TQDomElement& e )
+TTQString Uic::getObjectName( const TTQDomElement& e )
{
- TQDomElement n = getObjectProperty( e, "name" );
+ TTQDomElement n = getObjectProperty( e, "name" );
if ( n.firstChild().toElement().tagName() == "cstring" )
return n.firstChild().toElement().firstChild().toText().data();
- return TQString::null;
+ return TTQString::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).
*/
-TQString Uic::getLayoutName( const TQDomElement& e )
+TTQString Uic::getLayoutName( const TTQDomElement& e )
{
- TQDomElement p = e.parentNode().toElement();
- TQString tail = TQString::null;
+ TTQDomElement p = e.parentNode().toElement();
+ TTQString tail = TTQString::null;
- if ( getClassName(p) != "Qt::LayoutWidget" )
+ if ( getClassName(p) != "TQt::LayoutWidget" )
tail = "Layout";
- TQDomElement n = getObjectProperty( p, "name" );
+ TTQDomElement n = getObjectProperty( p, "name" );
if ( n.firstChild().toElement().tagName() == "cstring" )
return n.firstChild().toElement().firstChild().toText().data() + tail;
return e.tagName();
}
-TQString Uic::getDatabaseInfo( const TQDomElement& e, const TQString& tag )
+TTQString Uic::getDatabaseInfo( const TTQDomElement& e, const TTQString& tag )
{
- TQDomElement n;
- TQDomElement n1;
+ TTQDomElement n;
+ TTQDomElement n1;
int child = 0;
// database info is a stringlist stored in this order
if ( tag == "connection" )
@@ -306,27 +306,27 @@ TQString Uic::getDatabaseInfo( const TQDomElement& e, const TQString& tag )
else if ( tag == "field" )
child = 2;
else
- return TQString::null;
+ return TTQString::null;
n = getObjectProperty( e, "database" );
if ( n.firstChild().toElement().tagName() == "stringlist" ) {
// find correct stringlist entry
- TQDomElement n1 = n.firstChild().firstChild().toElement();
+ TTQDomElement n1 = n.firstChild().firstChild().toElement();
for ( int i = 0; i < child && !n1.isNull(); ++i )
n1 = n1.nextSibling().toElement();
if ( n1.isNull() )
- return TQString::null;
+ return TTQString::null;
return n1.firstChild().toText().data();
}
- return TQString::null;
+ return TTQString::null;
}
-void Uic::registerLayouts( const TQDomElement &e )
+void Uic::registerLayouts( const TTQDomElement &e )
{
if ( layouts.contains(e.tagName()) )
createObjectDecl(e);
- TQDomNodeList nl = e.childNodes();
+ TTQDomNodeList nl = e.childNodes();
for ( int i = 0; i < (int) nl.length(); ++i )
registerLayouts( nl.item(i).toElement() );
}
@@ -335,59 +335,59 @@ void Uic::registerLayouts( const TQDomElement &e )
/*!
Returns include file for class \a className or a null string.
*/
-TQString Uic::getInclude( const TQString& className )
+TTQString Uic::getInclude( const TTQString& className )
{
int wid = WidgetDatabase::idFromClassName( className );
if ( wid != -1 )
return WidgetDatabase::includeFile( wid );
- return TQString::null;
+ return TTQString::null;
}
-void Uic::createActionDecl( const TQDomElement& e )
+void Uic::createActionDecl( const TTQDomElement& e )
{
- TQString objName = getObjectName( e );
+ TTQString objName = getObjectName( e );
if ( objName.isEmpty() )
return;
out << indent << objName << endl;
if ( e.tagName() == "actiongroup" ) {
- for ( TQDomElement n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
+ for ( TTQDomElement n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "action" || n.tagName() == "actiongroup" )
createActionDecl( n );
}
}
}
-void Uic::createActionImpl( const TQDomElement &n, const TQString &parent )
+void Uic::createActionImpl( const TTQDomElement &n, const TTQString &parent )
{
- for ( TQDomElement ae = n; !ae.isNull(); ae = ae.nextSibling().toElement() ) {
- TQString objName = registerObject( getObjectName( ae ) );
+ for ( TTQDomElement ae = n; !ae.isNull(); ae = ae.nextSibling().toElement() ) {
+ TTQString objName = registerObject( getObjectName( ae ) );
if ( ae.tagName() == "action" )
- out << indent << objName << "= Qt::Action.new(" << parent << ", \"" << objName.mid(1) << "\")" << endl;
+ out << indent << objName << "= TQt::Action.new(" << parent << ", \"" << objName.mid(1) << "\")" << endl;
else if ( ae.tagName() == "actiongroup" )
- out << indent << objName << "= Qt::ActionGroup.new(" << parent << ", \"" << objName.mid(1) << "\")" << endl;
+ out << indent << objName << "= TQt::ActionGroup.new(" << parent << ", \"" << objName.mid(1) << "\")" << endl;
else
continue;
bool subActionsDone = false;
bool hasMenuText = false;
- TQString actionText;
- for ( TQDomElement n2 = ae.firstChild().toElement(); !n2.isNull(); n2 = n2.nextSibling().toElement() ) {
+ TTQString actionText;
+ for ( TTQDomElement n2 = ae.firstChild().toElement(); !n2.isNull(); n2 = n2.nextSibling().toElement() ) {
if ( n2.tagName() == "property" ) {
bool stdset = stdsetdef;
if ( n2.hasAttribute( "stdset" ) )
stdset = toBool( n2.attribute( "stdset" ) );
- TQString prop = n2.attribute("name");
+ TTQString prop = n2.attribute("name");
if ( prop == "name" )
continue;
- TQString value = setObjectProperty( "Qt::Action", objName, prop, n2.firstChild().toElement(), stdset );
+ TTQString value = setObjectProperty( "TQt::Action", objName, prop, n2.firstChild().toElement(), stdset );
if ( value.isEmpty() )
continue;
- TQString call = objName + ".";
+ TTQString call = objName + ".";
if ( stdset ) {
call += mkStdSet( prop ) + "(" + value + ")";
} else {
call += "setProperty( \"" + prop + "\", ";
- call += "Qt::Variant.new(" + value + "))";
+ call += "TQt::Variant.new(" + value + "))";
}
if (prop == "menuText")
@@ -405,13 +405,13 @@ void Uic::createActionImpl( const TQDomElement &n, const TQString &parent )
subActionsDone = true;
}
}
- // workaround for loading pre-3.3 files expecting bogus TQAction behavior
+ // workaround for loading pre-3.3 files expecting bogus TTQAction behavior
if (!hasMenuText && !actionText.isEmpty() && uiFileVersion < "3.3")
trout << indent << objName << ".setMenuText(" << actionText << ")" << endl;
}
}
-TQString get_dock( const TQString &d )
+TTQString get_dock( const TTQString &d )
{
if ( d == "0" )
return "DockUnmanaged";
@@ -430,27 +430,27 @@ TQString get_dock( const TQString &d )
return "";
}
-void Uic::createToolbarImpl( const TQDomElement &n, const TQString &parentClass, const TQString &parent )
+void Uic::createToolbarImpl( const TTQDomElement &n, const TTQString &parentClass, const TTQString &parent )
{
- TQDomNodeList nl = n.elementsByTagName( "toolbar" );
+ TTQDomNodeList nl = n.elementsByTagName( "toolbar" );
for ( int i = 0; i < (int) nl.length(); i++ ) {
- TQDomElement ae = nl.item( i ).toElement();
- TQString dock = get_dock( ae.attribute( "dock" ) );
- TQString objName = "@" + getObjectName( ae );
- out << indent << objName << " = Qt::ToolBar.new(\"\", self, " << dock << ")" << endl;
+ TTQDomElement ae = nl.item( i ).toElement();
+ TTQString dock = get_dock( ae.attribute( "dock" ) );
+ TTQString objName = "@" + getObjectName( ae );
+ out << indent << objName << " = TQt::ToolBar.new(\"\", self, " << dock << ")" << endl;
createObjectImpl( ae, parentClass, parent );
- for ( TQDomElement n2 = ae.firstChild().toElement(); !n2.isNull(); n2 = n2.nextSibling().toElement() ) {
+ for ( TTQDomElement n2 = ae.firstChild().toElement(); !n2.isNull(); n2 = n2.nextSibling().toElement() ) {
if ( n2.tagName() == "action" ) {
out << indent << "@" << n2.attribute( "name" ) << ".addTo( " << objName << " )" << endl;
} else if ( n2.tagName() == "separator" ) {
out << indent << objName << ".addSeparator;" << endl;
} else if ( n2.tagName() == "widget" ) {
if ( n2.attribute( "class" ) != "Spacer" ) {
- createObjectImpl( n2, "Qt::ToolBar", objName );
+ createObjectImpl( n2, "TQt::ToolBar", objName );
} else {
- TQString child = createSpacerImpl( n2, parentClass, parent, objName );
- out << indent << "Qt::Application.sendPostedEvents( " << objName
- << ", Qt::Event::ChildInserted)" << endl;
+ TTQString child = createSpacerImpl( n2, parentClass, parent, objName );
+ out << indent << "TQt::Application.sendPostedEvents( " << objName
+ << ", TQt::Event::ChildInserted)" << endl;
out << indent << objName << ".boxLayout().addItem(" << child << ")" << endl;
}
}
@@ -458,21 +458,21 @@ void Uic::createToolbarImpl( const TQDomElement &n, const TQString &parentClass,
}
}
-void Uic::createMenuBarImpl( const TQDomElement &n, const TQString &parentClass, const TQString &parent )
+void Uic::createMenuBarImpl( const TTQDomElement &n, const TTQString &parentClass, const TTQString &parent )
{
- TQString objName = "@" + getObjectName( n );
- out << indent << objName << " = Qt::MenuBar.new( self, \"" << objName.mid(1) << "\" )" << endl;
+ TTQString objName = "@" + getObjectName( n );
+ out << indent << objName << " = TQt::MenuBar.new( self, \"" << objName.mid(1) << "\" )" << endl;
createObjectImpl( n, parentClass, parent );
int i = 0;
- TQDomElement c = n.firstChild().toElement();
+ TTQDomElement c = n.firstChild().toElement();
while ( !c.isNull() ) {
if ( c.tagName() == "item" ) {
- TQString itemName = "@" + c.attribute( "name" );
+ TTQString itemName = "@" + c.attribute( "name" );
out << endl;
- out << indent << itemName << " = Qt::PopupMenu.new( self )" << endl;
+ out << indent << itemName << " = TQt::PopupMenu.new( self )" << endl;
createPopupMenuImpl( c, parentClass, itemName );
out << indent << objName << ".insertItem( \"\", " << itemName << ", " << i << " )" << endl;
- TQString findItem(objName + ".findItem(%1)");
+ TTQString findItem(objName + ".findItem(%1)");
findItem = findItem.arg(i);
trout << indent << "if !" << findItem << ".nil?" << endl;
trout << indent << indent << findItem << ".setText( " << trcall( c.attribute( "text" ) ) << " )" << endl;
@@ -486,16 +486,16 @@ void Uic::createMenuBarImpl( const TQDomElement &n, const TQString &parentClass,
}
}
-void Uic::createPopupMenuImpl( const TQDomElement &e, const TQString &parentClass, const TQString &parent )
+void Uic::createPopupMenuImpl( const TTQDomElement &e, const TTQString &parentClass, const TTQString &parent )
{
int i = 0;
- for ( TQDomElement n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
+ for ( TTQDomElement n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "action" || n.tagName() == "actiongroup" ) {
- TQDomElement n2 = n.nextSibling().toElement();
+ TTQDomElement n2 = n.nextSibling().toElement();
if ( n2.tagName() == "item" ) { // the action has a sub menu
- TQString itemName = "@" + n2.attribute( "name" );
- TQString itemText = n2.attribute( "text" );
- out << indent << itemName << " = Qt::PopupMenu.new( self )" << endl;
+ TTQString itemName = "@" + n2.attribute( "name" );
+ TTQString itemText = n2.attribute( "text" );
+ out << indent << itemName << " = TQt::PopupMenu.new( self )" << endl;
out << indent << indent << parent << ".insertItem( @" << n.attribute( "name" ) << ".iconSet(),";
out << trcall( itemText ) << ", " << itemName << " )" << endl;
trout << indent << parent << ".changeItem( " << parent << ".idAt( " << i << " ), ";
@@ -516,17 +516,17 @@ void Uic::createPopupMenuImpl( const TQDomElement &e, const TQString &parentClas
Creates implementation of an listbox item tag.
*/
-TQString Uic::createListBoxItemImpl( const TQDomElement &e, const TQString &parent,
- TQString *value )
+TTQString Uic::createListBoxItemImpl( const TTQDomElement &e, const TTQString &parent,
+ TTQString *value )
{
- TQDomElement n = e.firstChild().toElement();
- TQString txt;
- TQString com;
- TQString pix;
+ TTQDomElement n = e.firstChild().toElement();
+ TTQString txt;
+ TTQString com;
+ TTQString pix;
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
- TQString attrib = n.attribute("name");
- TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() );
+ TTQString attrib = n.attribute("name");
+ TTQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TTQVariant() );
if ( attrib == "text" ) {
txt = v.toString();
com = getComment( n );
@@ -536,8 +536,8 @@ TQString Uic::createListBoxItemImpl( const TQDomElement &e, const TQString &pare
pix.prepend("@");
}
if ( !pix.isEmpty() && !pixmapLoaderFunction.isEmpty() ) {
- pix.prepend( pixmapLoaderFunction + "(" + TQString( externPixmaps ? "\"" : "" ) );
- pix.append( TQString( externPixmaps ? "\"" : "" ) + ")" );
+ pix.prepend( pixmapLoaderFunction + "(" + TTQString( externPixmaps ? "\"" : "" ) );
+ pix.append( TTQString( externPixmaps ? "\"" : "" ) + ")" );
}
}
}
@@ -557,16 +557,16 @@ TQString Uic::createListBoxItemImpl( const TQDomElement &e, const TQString &pare
Creates implementation of an iconview item tag.
*/
-TQString Uic::createIconViewItemImpl( const TQDomElement &e, const TQString &parent )
+TTQString Uic::createIconViewItemImpl( const TTQDomElement &e, const TTQString &parent )
{
- TQDomElement n = e.firstChild().toElement();
- TQString txt;
- TQString com;
- TQString pix;
+ TTQDomElement n = e.firstChild().toElement();
+ TTQString txt;
+ TTQString com;
+ TTQString pix;
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
- TQString attrib = n.attribute("name");
- TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() );
+ TTQString attrib = n.attribute("name");
+ TTQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TTQVariant() );
if ( attrib == "text" ) {
txt = v.toString();
com = getComment( n );
@@ -576,8 +576,8 @@ TQString Uic::createIconViewItemImpl( const TQDomElement &e, const TQString &par
pix.prepend("@");
}
if ( !pix.isEmpty() && !pixmapLoaderFunction.isEmpty() ) {
- pix.prepend( pixmapLoaderFunction + "(" + TQString( externPixmaps ? "\"" : "" ) );
- pix.append( TQString( externPixmaps ? "\"" : "" ) + ")" );
+ pix.prepend( pixmapLoaderFunction + "(" + TTQString( externPixmaps ? "\"" : "" ) );
+ pix.append( TTQString( externPixmaps ? "\"" : "" ) + ")" );
}
}
}
@@ -585,24 +585,24 @@ TQString Uic::createIconViewItemImpl( const TQDomElement &e, const TQString &par
}
if ( pix.isEmpty() )
- return "Qt::IconViewItem.new(" + parent + ", " + trcall( txt, com ) + ")";
+ return "TQt::IconViewItem.new(" + parent + ", " + trcall( txt, com ) + ")";
else
- return "Qt::IconViewItem.new(" + parent + ", " + trcall( txt, com ) + ", " + pix + ")";
+ return "TQt::IconViewItem.new(" + parent + ", " + trcall( txt, com ) + ", " + pix + ")";
}
/*!
Creates implementation of an listview item tag.
*/
-TQString Uic::createListViewItemImpl( const TQDomElement &e, const TQString &parent,
- const TQString &parentItem )
+TTQString Uic::createListViewItemImpl( const TTQDomElement &e, const TTQString &parent,
+ const TTQString &parentItem )
{
- TQString s;
+ TTQString s;
- TQDomElement n = e.firstChild().toElement();
+ TTQDomElement n = e.firstChild().toElement();
bool hasChildren = e.elementsByTagName( "item" ).count() > 0;
- TQString item;
+ TTQString item;
if ( hasChildren ) {
item = registerObject( "item" );
@@ -619,26 +619,26 @@ TQString Uic::createListViewItemImpl( const TQDomElement &e, const TQString &par
}
if ( !parentItem.isEmpty() )
- s += "Qt::ListViewItem.new(" + parentItem + ", " + lastItem + ")\n";
+ s += "TQt::ListViewItem.new(" + parentItem + ", " + lastItem + ")\n";
else
- s += "Qt::ListViewItem.new(" + parent + ", " + lastItem + ")\n";
+ s += "TQt::ListViewItem.new(" + parent + ", " + lastItem + ")\n";
- TQStringList textes;
- TQStringList pixmaps;
+ TTQStringList textes;
+ TTQStringList pixmaps;
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
- TQString attrib = n.attribute("name");
- TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() );
+ TTQString attrib = n.attribute("name");
+ TTQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TTQVariant() );
if ( attrib == "text" )
textes << v.toString();
else if ( attrib == "pixmap" ) {
- TQString pix = v.toString();
+ TTQString pix = v.toString();
if (!pix.isEmpty()) {
pix.prepend("@");
}
if ( !pix.isEmpty() && !pixmapLoaderFunction.isEmpty() ) {
- pix.prepend( pixmapLoaderFunction + "(" + TQString( externPixmaps ? "\"" : "" ) );
- pix.append( TQString( externPixmaps ? "\"" : "" ) + ")" );
+ pix.prepend( pixmapLoaderFunction + "(" + TTQString( externPixmaps ? "\"" : "" ) );
+ pix.append( TTQString( externPixmaps ? "\"" : "" ) + ")" );
}
pixmaps << pix;
}
@@ -651,9 +651,9 @@ TQString Uic::createListViewItemImpl( const TQDomElement &e, const TQString &par
for ( int i = 0; i < (int)textes.count(); ++i ) {
if ( !textes[ i ].isEmpty() )
- s += indent + item + ".setText(" + TQString::number( i ) + ", " + trcall( textes[ i ] ) + ")\n";
+ s += indent + item + ".setText(" + TTQString::number( i ) + ", " + trcall( textes[ i ] ) + ")\n";
if ( !pixmaps[ i ].isEmpty() )
- s += indent + item + ".setPixmap(" + TQString::number( i ) + ", " + pixmaps[ i ] + ")\n";
+ s += indent + item + ".setPixmap(" + TTQString::number( i ) + ", " + pixmaps[ i ] + ")\n";
}
lastItem = item;
@@ -664,18 +664,18 @@ TQString Uic::createListViewItemImpl( const TQDomElement &e, const TQString &par
Creates implementation of an listview column tag.
*/
-TQString Uic::createListViewColumnImpl( const TQDomElement &e, const TQString &parent,
- TQString *value )
+TTQString Uic::createListViewColumnImpl( const TTQDomElement &e, const TTQString &parent,
+ TTQString *value )
{
- TQDomElement n = e.firstChild().toElement();
- TQString txt;
- TQString com;
- TQString pix;
+ TTQDomElement n = e.firstChild().toElement();
+ TTQString txt;
+ TTQString com;
+ TTQString pix;
bool clickable = false, resizeable = false;
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
- TQString attrib = n.attribute("name");
- TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() );
+ TTQString attrib = n.attribute("name");
+ TTQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TTQVariant() );
if ( attrib == "text" ) {
txt = v.toString();
com = getComment( n );
@@ -685,8 +685,8 @@ TQString Uic::createListViewColumnImpl( const TQDomElement &e, const TQString &p
pix.prepend("@");
}
if ( !pix.isEmpty() && !pixmapLoaderFunction.isEmpty() ) {
- pix.prepend( pixmapLoaderFunction + "(" + TQString( externPixmaps ? "\"" : "" ) );
- pix.append( TQString( externPixmaps ? "\"" : "" ) + ")" );
+ pix.prepend( pixmapLoaderFunction + "(" + TTQString( externPixmaps ? "\"" : "" ) );
+ pix.append( TTQString( externPixmaps ? "\"" : "" ) + ")" );
}
} else if ( attrib == "clickable" )
clickable = v.toBool();
@@ -699,7 +699,7 @@ TQString Uic::createListViewColumnImpl( const TQDomElement &e, const TQString &p
if ( value )
*value = trcall( txt, com );
- TQString s;
+ TTQString s;
s = indent + parent + ".addColumn(" + trcall( txt, com ) + ")\n";
if ( !pix.isEmpty() )
s += indent + parent + ".header().setLabel(" + parent + ".header().count() - 1," + pix + ", " + trcall( txt, com ) + ")\n";
@@ -711,28 +711,28 @@ TQString Uic::createListViewColumnImpl( const TQDomElement &e, const TQString &p
return s;
}
-TQString Uic::createTableRowColumnImpl( const TQDomElement &e, const TQString &parent,
- TQString *value )
+TTQString Uic::createTableRowColumnImpl( const TTQDomElement &e, const TTQString &parent,
+ TTQString *value )
{
- TQString objClass = getClassName( e.parentNode().toElement() );
- TQDomElement n = e.firstChild().toElement();
- TQString txt;
- TQString com;
- TQString pix;
- TQString field;
+ TTQString objClass = getClassName( e.parentNode().toElement() );
+ TTQDomElement n = e.firstChild().toElement();
+ TTQString txt;
+ TTQString com;
+ TTQString pix;
+ TTQString field;
bool isRow = e.tagName() == "row";
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
- TQString attrib = n.attribute("name");
- TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() );
+ TTQString attrib = n.attribute("name");
+ TTQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TTQVariant() );
if ( attrib == "text" ) {
txt = v.toString();
com = getComment( n );
} else if ( attrib == "pixmap" ) {
pix = v.toString();
if ( !pix.isEmpty() && !pixmapLoaderFunction.isEmpty() ) {
- pix.prepend( pixmapLoaderFunction + "(" + TQString( externPixmaps ? "\"" : "" ) );
- pix.append( TQString( externPixmaps ? "\"" : "" ) + ")" );
+ pix.prepend( pixmapLoaderFunction + "(" + TTQString( externPixmaps ? "\"" : "" ) );
+ pix.append( TTQString( externPixmaps ? "\"" : "" ) + ")" );
}
} else if ( attrib == "field" )
field = v.toString();
@@ -745,32 +745,32 @@ TQString Uic::createTableRowColumnImpl( const TQDomElement &e, const TQString &p
// ### This generated code sucks! We have to set the number of
// rows/cols before and then only do setLabel/()
- // ### careful, though, since TQDataTable has an API which makes this code pretty good
+ // ### careful, though, since TTQDataTable has an API which makes this code pretty good
- TQString s;
+ TTQString s;
if ( isRow ) {
s = indent + parent + ".setNumRows(" + parent + ".numRows() + 1 )\n";
if ( pix.isEmpty() )
s += indent + parent + ".verticalHeader().setLabel(" + parent + ".numRows() - 1, "
+ trcall( txt, com ) + ")\n";
else
- s += indent + parent + ".verticalHeader().setLabel(" + parent + ".numRows() - 1, Qt::IconSet.new(@"
+ s += indent + parent + ".verticalHeader().setLabel(" + parent + ".numRows() - 1, TQt::IconSet.new(@"
+ pix + " ), " + trcall( txt, com ) + ")\n";
} else {
- if ( objClass == "Qt::Table" ) {
+ if ( objClass == "TQt::Table" ) {
s = indent + parent + ".setNumCols(" + parent + ".numCols() + 1)\n";
if ( pix.isEmpty() )
s += indent + parent + ".horizontalHeader().setLabel(" + parent + ".numCols() - 1, "
+ trcall( txt, com ) + ")\n";
else
- s += indent + parent + ".horizontalHeader().setLabel(" + parent + ".numCols() - 1, Qt::IconSet.new(@"
+ s += indent + parent + ".horizontalHeader().setLabel(" + parent + ".numCols() - 1, TQt::IconSet.new(@"
+ pix + " ), " + trcall( txt, com ) + ")\n";
- } else if ( objClass == "Qt::DataTable" ) {
+ } else if ( objClass == "TQt::DataTable" ) {
if ( !txt.isEmpty() && !field.isEmpty() ) {
if ( pix.isEmpty() )
out << indent << parent << ".addColumn(" << fixString( field ) << ", " << trcall( txt, com ) << ")" << endl;
else
- out << indent << parent << ".addColumn(" << fixString( field ) << ", " << trcall( txt, com ) << ", Qt::IconSet.new(@" << pix << "))" << endl;
+ out << indent << parent << ".addColumn(" << fixString( field ) << ", " << trcall( txt, com ) << ", TQt::IconSet.new(@" << pix << "))" << endl;
}
}
}
@@ -780,32 +780,32 @@ TQString Uic::createTableRowColumnImpl( const TQDomElement &e, const TQString &p
/*!
Creates the implementation of a layout tag. Called from createObjectImpl().
*/
-TQString Uic::createLayoutImpl( const TQDomElement &e, const TQString& parentClass, const TQString& parent, const TQString& layout )
+TTQString Uic::createLayoutImpl( const TTQDomElement &e, const TTQString& parentClass, const TTQString& parent, const TTQString& layout )
{
- TQDomElement n;
- TQString objClass, objName;
+ TTQDomElement n;
+ TTQString objClass, objName;
objClass = e.tagName();
- TQString qlayout = "Qt::VBoxLayout.new";
+ TTQString qlayout = "TQt::VBoxLayout.new";
if ( objClass == "hbox" )
- qlayout = "Qt::HBoxLayout.new";
+ qlayout = "TQt::HBoxLayout.new";
else if ( objClass == "grid" )
- qlayout = "Qt::GridLayout.new";
+ qlayout = "TQt::GridLayout.new";
bool isGrid = e.tagName() == "grid" ;
objName = registerObject( getLayoutName( e ) );
layoutObjects += objName;
- TQString margin = DomTool::readProperty( e, "margin", defMargin ).toString();
- TQString spacing = DomTool::readProperty( e, "spacing", defSpacing ).toString();
- TQString resizeMode = DomTool::readProperty( e, "resizeMode", TQString::null ).toString();
+ TTQString margin = DomTool::readProperty( e, "margin", defMargin ).toString();
+ TTQString spacing = DomTool::readProperty( e, "spacing", defSpacing ).toString();
+ TTQString resizeMode = DomTool::readProperty( e, "resizeMode", TTQString::null ).toString();
- TQString optcells;
+ TTQString optcells;
if ( isGrid )
optcells = "1, 1, ";
- if ( (parentClass == "Qt::GroupBox" || parentClass == "Qt::ButtonGroup") && layout.isEmpty() ) {
+ if ( (parentClass == "TQt::GroupBox" || parentClass == "TQt::ButtonGroup") && 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(" << spacing << ")" << endl;
out << indent << parent << ".layout().setMargin(" << margin << ")" << endl;
out << indent << objName << " = " << qlayout << "(" << parent << ".layout() )" << endl;
@@ -822,15 +822,15 @@ TQString Uic::createLayoutImpl( const TQDomElement &e, const TQString& parentCla
out << ", " << optcells << margin << ", " << spacing << ", '" << objName.mid(1) << "')" << endl;
}
if ( !resizeMode.isEmpty() )
- out << indent << objName << ".setResizeMode( Qt::Layout::" << resizeMode << " )" << endl;
+ out << indent << objName << ".setResizeMode( TQt::Layout::" << resizeMode << " )" << endl;
if ( !isGrid ) {
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "spacer" ) {
- TQString child = createSpacerImpl( n, parentClass, parent, objName );
+ TTQString child = createSpacerImpl( n, parentClass, parent, objName );
out << indent << objName << ".addItem(" << child << ")" << endl;
} else if ( tags.contains( n.tagName() ) ) {
- TQString child = createObjectImpl( n, parentClass, parent, objName );
+ TTQString child = createObjectImpl( n, parentClass, parent, objName );
if ( isLayout( child ) )
out << indent << objName << ".addLayout(" << child << ")" << endl;
else
@@ -839,7 +839,7 @@ TQString Uic::createLayoutImpl( const TQDomElement &e, const TQString& parentCla
}
} else {
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
- TQDomElement ae = n;
+ TTQDomElement ae = n;
int row = ae.attribute( "row" ).toInt();
int col = ae.attribute( "column" ).toInt();
int rowspan = ae.attribute( "rowspan" ).toInt();
@@ -849,7 +849,7 @@ TQString Uic::createLayoutImpl( const TQDomElement &e, const TQString& parentCla
if ( colspan < 1 )
colspan = 1;
if ( n.tagName() == "spacer" ) {
- TQString child = createSpacerImpl( n, parentClass, parent, objName );
+ TTQString child = createSpacerImpl( n, parentClass, parent, objName );
if ( rowspan * colspan != 1 )
out << indent << objName << ".addMultiCell(" << child << ", "
<< row << ", " << row + rowspan - 1 << ", " << col << ", " << col + colspan - 1 << ")" << endl;
@@ -857,9 +857,9 @@ TQString Uic::createLayoutImpl( const TQDomElement &e, const TQString& parentCla
out << indent << objName << ".addItem(" << child << ", "
<< row << ", " << col << ")" << endl;
} else if ( tags.contains( n.tagName() ) ) {
- TQString child = createObjectImpl( n, parentClass, parent, objName );
+ TTQString child = createObjectImpl( n, parentClass, parent, objName );
out << endl;
- TQString o = "Widget";
+ TTQString o = "Widget";
if ( isLayout( child ) )
o = "Layout";
if ( rowspan * colspan != 1 )
@@ -877,31 +877,31 @@ TQString Uic::createLayoutImpl( const TQDomElement &e, const TQString& parentCla
-TQString Uic::createSpacerImpl( const TQDomElement &e, const TQString& /*parentClass*/, const TQString& /*parent*/, const TQString& /*layout*/)
+TTQString Uic::createSpacerImpl( const TTQDomElement &e, const TTQString& /*parentClass*/, const TTQString& /*parent*/, const TTQString& /*layout*/)
{
- TQDomElement n;
- TQString objClass, objName;
+ TTQDomElement n;
+ TTQString objClass, objName;
objClass = e.tagName();
objName = registerObject( getObjectName( e ) );
- TQSize size = DomTool::readProperty( e, "sizeHint", TQSize( 0, 0 ) ).toSize();
- TQString sizeType = DomTool::readProperty( e, "sizeType", "Expanding" ).toString();
+ TTQSize size = DomTool::readProperty( e, "sizeHint", TTQSize( 0, 0 ) ).toSize();
+ TTQString 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
- TQRect geom = DomTool::readProperty( e, "geometry", TQRect(0,0,0,0) ).toRect();
+ TTQRect geom = DomTool::readProperty( e, "geometry", TTQRect(0,0,0,0) ).toRect();
size = geom.size();
}
if ( isVspacer )
- out << indent << objName << " = Qt::SpacerItem.new("
+ out << indent << objName << " = TQt::SpacerItem.new("
<< size.width() << ", " << size.height()
- << ", Qt::SizePolicy::Minimum, Qt::SizePolicy::" << sizeType << ")" << endl;
+ << ", TQt::SizePolicy::Minimum, TQt::SizePolicy::" << sizeType << ")" << endl;
else
- out << indent << objName << " = Qt::SpacerItem.new("
+ out << indent << objName << " = TQt::SpacerItem.new("
<< size.width() << ", " << size.height()
- << ", Qt::SizePolicy::" << sizeType << ", Qt::SizePolicy::Minimum)" << endl;
+ << ", TQt::SizePolicy::" << sizeType << ", TQt::SizePolicy::Minimum)" << endl;
return objName;
}
@@ -916,34 +916,34 @@ static const char* const ColorRole[] = {
/*!
Creates a colorgroup with name \a name from the color group \a cg
*/
-void Uic::createColorGroupImpl( const TQString& name, const TQDomElement& e )
+void Uic::createColorGroupImpl( const TTQString& name, const TTQDomElement& e )
{
- TQColorGroup cg;
+ TTQColorGroup cg;
int r = -1;
- TQDomElement n = e.firstChild().toElement();
- TQString color;
+ TTQDomElement n = e.firstChild().toElement();
+ TTQString color;
while ( !n.isNull() ) {
if ( n.tagName() == "color" ) {
r++;
- TQColor col = DomTool::readColor( n );
- color = "Qt::Color.new(%1,%2,%3)";
+ TTQColor col = DomTool::readColor( n );
+ color = "TQt::Color.new(%1,%2,%3)";
color = color.arg( col.red() ).arg( col.green() ).arg( col.blue() );
if ( col == white )
color = "white";
else if ( col == black )
color = "black";
if ( n.nextSibling().toElement().tagName() != "pixmap" ) {
- out << indent << name << ".setColor(Qt::ColorGroup::" << ColorRole[r] << ", " << color << ")" << endl;
+ out << indent << name << ".setColor(TQt::ColorGroup::" << ColorRole[r] << ", " << color << ")" << endl;
}
} else if ( n.tagName() == "pixmap" ) {
- TQString pixmap = n.firstChild().toText().data();
+ TTQString pixmap = n.firstChild().toText().data();
pixmap.prepend("@");
if ( !pixmapLoaderFunction.isEmpty() ) {
- pixmap.prepend( pixmapLoaderFunction + "(" + TQString( externPixmaps ? "\"" : "" ) );
- pixmap.append( TQString( externPixmaps ? "\"" : "" ) + ")" );
+ pixmap.prepend( pixmapLoaderFunction + "(" + TTQString( externPixmaps ? "\"" : "" ) );
+ pixmap.append( TTQString( externPixmaps ? "\"" : "" ) + ")" );
}
- out << indent << name << ".setBrush(Qt::ColorGroup::"
- << ColorRole[r] << ", Qt::Brush.new(" << color << ", " << pixmap << "))" << endl;
+ out << indent << name << ".setBrush(TQt::ColorGroup::"
+ << ColorRole[r] << ", TQt::Brush.new(" << color << ", " << pixmap << "))" << endl;
}
n = n.nextSibling().toElement();
}
@@ -953,16 +953,16 @@ void Uic::createColorGroupImpl( const TQString& name, const TQDomElement& e )
Auxiliary function to load a color group. The colorgroup must not
contain pixmaps.
*/
-TQColorGroup Uic::loadColorGroup( const TQDomElement &e )
+TTQColorGroup Uic::loadColorGroup( const TTQDomElement &e )
{
- TQColorGroup cg;
+ TTQColorGroup cg;
int r = -1;
- TQDomElement n = e.firstChild().toElement();
- TQColor col;
+ TTQDomElement n = e.firstChild().toElement();
+ TTQColor col;
while ( !n.isNull() ) {
if ( n.tagName() == "color" ) {
r++;
- cg.setColor( (TQColorGroup::ColorRole)r, (col = DomTool::readColor( n ) ) );
+ cg.setColor( (TTQColorGroup::ColorRole)r, (col = DomTool::readColor( n ) ) );
}
n = n.nextSibling().toElement();
}
@@ -973,10 +973,10 @@ TQColorGroup Uic::loadColorGroup( const TQDomElement &e )
the database \a connection and \a table.
*/
-bool Uic::isWidgetInTable( const TQDomElement& e, const TQString& connection, const TQString& table )
+bool Uic::isWidgetInTable( const TTQDomElement& e, const TTQString& connection, const TTQString& table )
{
- TQString conn = getDatabaseInfo( e, "connection" );
- TQString tab = getDatabaseInfo( e, "table" );
+ TTQString conn = getDatabaseInfo( e, "connection" );
+ TTQString tab = getDatabaseInfo( e, "table" );
if ( conn == connection && tab == table )
return true;
return false;
@@ -986,17 +986,17 @@ bool Uic::isWidgetInTable( const TQDomElement& e, const TQString& connection, co
Registers all database connections, cursors and forms.
*/
-void Uic::registerDatabases( const TQDomElement& e )
+void Uic::registerDatabases( const TTQDomElement& e )
{
- TQDomElement n;
- TQDomNodeList nl;
+ TTQDomElement n;
+ TTQDomNodeList nl;
int i;
nl = e.parentNode().toElement().elementsByTagName( "widget" );
for ( i = 0; i < (int) nl.length(); ++i ) {
n = nl.item(i).toElement();
- TQString conn = getDatabaseInfo( n, "connection" );
- TQString tab = getDatabaseInfo( n, "table" );
- TQString fld = getDatabaseInfo( n, "field" );
+ TTQString conn = getDatabaseInfo( n, "connection" );
+ TTQString tab = getDatabaseInfo( n, "table" );
+ TTQString fld = getDatabaseInfo( n, "field" );
if ( !conn.isNull() ) {
dbConnections += conn;
if ( !tab.isNull() ) {
@@ -1016,7 +1016,7 @@ void Uic::registerDatabases( const TQDomElement& e )
\sa registeredName(), isObjectRegistered()
*/
-TQString Uic::registerObject( const TQString& name )
+TTQString Uic::registerObject( const TTQString& name )
{
if ( objectNames.isEmpty() ) {
// some temporary variables we need
@@ -1025,7 +1025,7 @@ TQString Uic::registerObject( const TQString& name )
objectNames += "cg";
objectNames += "pal";
}
- TQString result("@");
+ TTQString result("@");
result += name;
int i;
while ( ( i = result.find(' ' )) != -1 ) {
@@ -1034,10 +1034,10 @@ TQString Uic::registerObject( const TQString& name )
if ( objectNames.contains( result ) ) {
int i = 2;
- while ( objectNames.contains( result + "_" + TQString::number(i) ) )
+ while ( objectNames.contains( result + "_" + TTQString::number(i) ) )
i++;
result += "_";
- result += TQString::number(i);
+ result += TTQString::number(i);
}
objectNames += result;
objectMapper.insert( name, result );
@@ -1050,7 +1050,7 @@ TQString Uic::registerObject( const TQString& name )
\sa registerObject(), isObjectRegistered()
*/
-TQString Uic::registeredName( const TQString& name )
+TTQString Uic::registeredName( const TTQString& name )
{
if ( !objectMapper.contains( name ) )
return name;
@@ -1060,24 +1060,24 @@ TQString Uic::registeredName( const TQString& name )
/*!
Returns whether the object \a name was registered yet or not.
*/
-bool Uic::isObjectRegistered( const TQString& name )
+bool Uic::isObjectRegistered( const TTQString& name )
{
return objectMapper.contains( name );
}
/*!
- Unifies the entries in stringlist \a list. Should really be a TQStringList feature.
+ Unifies the entries in stringlist \a list. Should really be a TTQStringList feature.
*/
-TQStringList Uic::unique( const TQStringList& list )
+TTQStringList Uic::unique( const TTQStringList& list )
{
- TQStringList result;
+ TTQStringList result;
if ( list.isEmpty() )
return result;
- TQStringList l = list;
+ TTQStringList l = list;
l.sort();
result += l.first();
- for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it ) {
+ for ( TTQStringList::Iterator it = l.begin(); it != l.end(); ++it ) {
if ( *it != result.last() )
result += *it;
}
@@ -1089,7 +1089,7 @@ TQStringList Uic::unique( const TQStringList& list )
/*!
Creates an instance of class \a objClass, with parent \a parent and name \a objName
*/
-TQString Uic::createObjectInstance( const TQString& objClass, const TQString& parent, const TQString& objName )
+TTQString Uic::createObjectInstance( const TTQString& objClass, const TTQString& parent, const TTQString& objName )
{
if ( objClass.mid( 4 ) == "ComboBox" ) {
@@ -1098,7 +1098,7 @@ TQString Uic::createObjectInstance( const TQString& objClass, const TQString& pa
return objClass + ".new(" + parent + ", \"" + objName.mid(1) + "\")";
}
-bool Uic::isLayout( const TQString& name ) const
+bool Uic::isLayout( const TTQString& name ) const
{
return layoutObjects.contains( name );
}