summaryrefslogtreecommitdiffstats
path: root/experimental/tqtinterface/qt4/tools/designer/uic/uic.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'experimental/tqtinterface/qt4/tools/designer/uic/uic.cpp')
-rw-r--r--experimental/tqtinterface/qt4/tools/designer/uic/uic.cpp102
1 files changed, 51 insertions, 51 deletions
diff --git a/experimental/tqtinterface/qt4/tools/designer/uic/uic.cpp b/experimental/tqtinterface/qt4/tools/designer/uic/uic.cpp
index 7a71eaf62..ea1bc1417 100644
--- a/experimental/tqtinterface/qt4/tools/designer/uic/uic.cpp
+++ b/experimental/tqtinterface/qt4/tools/designer/uic/uic.cpp
@@ -397,14 +397,14 @@ void Uic::createPopupMenuDecl( const TQDomElement &e )
}
}
-void Uic::createActionImpl( const TQDomElement &n, const TQString &tqparent )
+void Uic::createActionImpl( const TQDomElement &n, const TQString &parent )
{
for ( TQDomElement ae = n; !ae.isNull(); ae = ae.nextSibling().toElement() ) {
TQString objName = registerObject( getObjectName( ae ) );
if ( ae.tagName() == "action" )
- out << indent << objName << " = new TQAction( " << tqparent << ", \"" << objName << "\" );" << endl;
+ out << indent << objName << " = new TQAction( " << parent << ", \"" << objName << "\" );" << endl;
else if ( ae.tagName() == "actiongroup" )
- out << indent << objName << " = new TQActionGroup( " << tqparent << ", \"" << objName << "\" );" << endl;
+ out << indent << objName << " = new TQActionGroup( " << parent << ", \"" << objName << "\" );" << endl;
else
continue;
bool subActionsDone = FALSE;
@@ -470,7 +470,7 @@ TQString get_dock( const TQString &d )
return "";
}
-void Uic::createToolbarImpl( const TQDomElement &n, const TQString &parentClass, const TQString &tqparent )
+void Uic::createToolbarImpl( const TQDomElement &n, const TQString &parentClass, const TQString &parent )
{
TQDomNodeList nl = n.elementsByTagName( "toolbar" );
for ( int i = 0; i < (int) nl.length(); i++ ) {
@@ -478,7 +478,7 @@ void Uic::createToolbarImpl( const TQDomElement &n, const TQString &parentClass,
TQString dock = get_dock( ae.attribute( "dock" ) );
TQString objName = getObjectName( ae );
out << indent << objName << " = new TQToolBar( TQString(\"\"), this, " << dock << " ); " << endl;
- createObjectImpl( ae, parentClass, tqparent );
+ createObjectImpl( ae, parentClass, parent );
for ( TQDomElement n2 = ae.firstChild().toElement(); !n2.isNull(); n2 = n2.nextSibling().toElement() ) {
if ( n2.tagName() == "action" ) {
out << indent << n2.attribute( "name" ) << "->addTo( " << objName << " );" << endl;
@@ -488,7 +488,7 @@ void Uic::createToolbarImpl( const TQDomElement &n, const TQString &parentClass,
if ( n2.attribute( "class" ) != "Spacer" ) {
createObjectImpl( n2, "TQToolBar", objName );
} else {
- TQString child = createSpacerImpl( n2, parentClass, tqparent, objName );
+ TQString child = createSpacerImpl( n2, parentClass, parent, objName );
out << indent << "TQApplication::sendPostedEvents( " << objName
<< ", TQEvent::ChildInserted );" << endl;
out << indent << objName << "->boxLayout()->addItem( " << child << " );" << endl;
@@ -498,11 +498,11 @@ void Uic::createToolbarImpl( const TQDomElement &n, const TQString &parentClass,
}
}
-void Uic::createMenuBarImpl( const TQDomElement &n, const TQString &parentClass, const TQString &tqparent )
+void Uic::createMenuBarImpl( const TQDomElement &n, const TQString &parentClass, const TQString &parent )
{
TQString objName = getObjectName( n );
out << indent << objName << " = new TQMenuBar( this, \"" << objName << "\" );" << endl;
- createObjectImpl( n, parentClass, tqparent );
+ createObjectImpl( n, parentClass, parent );
int i = 0;
TQDomElement c = n.firstChild().toElement();
while ( !c.isNull() ) {
@@ -525,7 +525,7 @@ void Uic::createMenuBarImpl( const TQDomElement &n, const TQString &parentClass,
}
}
-void Uic::createPopupMenuImpl( const TQDomElement &e, const TQString &parentClass, const TQString &tqparent )
+void Uic::createPopupMenuImpl( const TQDomElement &e, const TQString &parentClass, const TQString &parent )
{
int i = 0;
for ( TQDomElement n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
@@ -535,17 +535,17 @@ void Uic::createPopupMenuImpl( const TQDomElement &e, const TQString &parentClas
TQString itemName = n2.attribute( "name" );
TQString itemText = n2.attribute( "text" );
out << indent << itemName << " = new TQPopupMenu( this );" << endl;
- out << indent << tqparent << "->insertItem( " << n.attribute( "name" ) << "->iconSet(), ";
+ out << indent << parent << "->insertItem( " << n.attribute( "name" ) << "->iconSet(), ";
out << trcall( itemText ) << ", " << itemName << " );" << endl;
- trout << indent << tqparent << "->changeItem( " << tqparent << "->idAt( " << i << " ), ";
+ trout << indent << parent << "->changeItem( " << parent << "->idAt( " << i << " ), ";
trout << trcall( itemText ) << " );" << endl;
createPopupMenuImpl( n2, parentClass, itemName );
n = n2;
} else {
- out << indent << n.attribute( "name" ) << "->addTo( " << tqparent << " );" << endl;
+ out << indent << n.attribute( "name" ) << "->addTo( " << parent << " );" << endl;
}
} else if ( n.tagName() == "separator" ) {
- out << indent << tqparent << "->insertSeparator();" << endl;
+ out << indent << parent << "->insertSeparator();" << endl;
}
++i;
}
@@ -555,7 +555,7 @@ void Uic::createPopupMenuImpl( const TQDomElement &e, const TQString &parentClas
Creates implementation of an listbox item tag.
*/
-TQString Uic::createListBoxItemImpl( const TQDomElement &e, const TQString &tqparent,
+TQString Uic::createListBoxItemImpl( const TQDomElement &e, const TQString &parent,
TQString *value )
{
TQDomElement n = e.firstChild().toElement();
@@ -584,9 +584,9 @@ TQString Uic::createListBoxItemImpl( const TQDomElement &e, const TQString &tqpa
*value = trcall( txt, com );
if ( pix.isEmpty() ) {
- return tqparent + "->insertItem( " + trcall( txt, com ) + " );";
+ return parent + "->insertItem( " + trcall( txt, com ) + " );";
} else {
- return tqparent + "->insertItem( " + pix + ", " + trcall( txt, com ) + " );";
+ return parent + "->insertItem( " + pix + ", " + trcall( txt, com ) + " );";
}
}
@@ -594,7 +594,7 @@ TQString Uic::createListBoxItemImpl( const TQDomElement &e, const TQString &tqpa
Creates implementation of an iconview item tag.
*/
-TQString Uic::createIconViewItemImpl( const TQDomElement &e, const TQString &tqparent )
+TQString Uic::createIconViewItemImpl( const TQDomElement &e, const TQString &parent )
{
TQDomElement n = e.firstChild().toElement();
TQString txt;
@@ -619,16 +619,16 @@ TQString Uic::createIconViewItemImpl( const TQDomElement &e, const TQString &tqp
}
if ( pix.isEmpty() )
- return "(void) new TQIconViewItem( " + tqparent + ", " + trcall( txt, com ) + " );";
+ return "(void) new TQIconViewItem( " + parent + ", " + trcall( txt, com ) + " );";
else
- return "(void) new TQIconViewItem( " + tqparent + ", " + trcall( txt, com ) + ", " + pix + " );";
+ return "(void) new TQIconViewItem( " + parent + ", " + trcall( txt, com ) + ", " + pix + " );";
}
/*!
Creates implementation of an listview item tag.
*/
-TQString Uic::createListViewItemImpl( const TQDomElement &e, const TQString &tqparent,
+TQString Uic::createListViewItemImpl( const TQDomElement &e, const TQString &parent,
const TQString &parentItem )
{
TQString s;
@@ -653,7 +653,7 @@ TQString Uic::createListViewItemImpl( const TQDomElement &e, const TQString &tqp
if ( !parentItem.isEmpty() )
s += "new TQListViewItem( " + parentItem + ", " + lastItem + " );\n";
else
- s += "new TQListViewItem( " + tqparent + ", " + lastItem + " );\n";
+ s += "new TQListViewItem( " + parent + ", " + lastItem + " );\n";
TQStringList texts;
TQStringList pixmaps;
@@ -673,7 +673,7 @@ TQString Uic::createListViewItemImpl( const TQDomElement &e, const TQString &tqp
}
} else if ( n.tagName() == "item" ) {
s += indent + item + "->setOpen( TRUE );\n";
- s += createListViewItemImpl( n, tqparent, item );
+ s += createListViewItemImpl( n, parent, item );
}
n = n.nextSibling().toElement();
}
@@ -693,7 +693,7 @@ TQString Uic::createListViewItemImpl( const TQDomElement &e, const TQString &tqp
Creates implementation of an listview column tag.
*/
-TQString Uic::createListViewColumnImpl( const TQDomElement &e, const TQString &tqparent,
+TQString Uic::createListViewColumnImpl( const TQDomElement &e, const TQString &parent,
TQString *value )
{
TQDomElement n = e.firstChild().toElement();
@@ -726,17 +726,17 @@ TQString Uic::createListViewColumnImpl( const TQDomElement &e, const TQString &t
*value = trcall( txt, com );
TQString s;
- s = indent + tqparent + "->addColumn( " + trcall( txt, com ) + " );\n";
+ s = indent + parent + "->addColumn( " + trcall( txt, com ) + " );\n";
if ( !pix.isEmpty() )
- s += indent + tqparent + "->header()->setLabel( " + tqparent + "->header()->count() - 1, " + pix + ", " + trcall( txt, com ) + " );\n";
+ s += indent + parent + "->header()->setLabel( " + parent + "->header()->count() - 1, " + pix + ", " + trcall( txt, com ) + " );\n";
if ( !clickable )
- s += indent + tqparent + "->header()->setClickEnabled( FALSE, " + tqparent + "->header()->count() - 1 );\n";
+ s += indent + parent + "->header()->setClickEnabled( FALSE, " + parent + "->header()->count() - 1 );\n";
if ( !resizable )
- s += indent + tqparent + "->header()->setResizeEnabled( FALSE, " + tqparent + "->header()->count() - 1 );\n";
+ s += indent + parent + "->header()->setResizeEnabled( FALSE, " + parent + "->header()->count() - 1 );\n";
return s;
}
-TQString Uic::createTableRowColumnImpl( const TQDomElement &e, const TQString &tqparent,
+TQString Uic::createTableRowColumnImpl( const TQDomElement &e, const TQString &parent,
TQString *value )
{
TQString objClass = getClassName( e.parentNode().toElement() );
@@ -774,28 +774,28 @@ TQString Uic::createTableRowColumnImpl( const TQDomElement &e, const TQString &t
TQString s;
if ( isRow ) {
- s = indent + tqparent + "->setNumRows( " + tqparent + "->numRows() + 1 );\n";
+ s = indent + parent + "->setNumRows( " + parent + "->numRows() + 1 );\n";
if ( pix.isEmpty() )
- s += indent + tqparent + "->verticalHeader()->setLabel( " + tqparent + "->numRows() - 1, "
+ s += indent + parent + "->verticalHeader()->setLabel( " + parent + "->numRows() - 1, "
+ trcall( txt, com ) + " );\n";
else
- s += indent + tqparent + "->verticalHeader()->setLabel( " + tqparent + "->numRows() - 1, "
+ s += indent + parent + "->verticalHeader()->setLabel( " + parent + "->numRows() - 1, "
+ pix + ", " + trcall( txt, com ) + " );\n";
} else {
if ( objClass == "TQTable" ) {
- s = indent + tqparent + "->setNumCols( " + tqparent + "->numCols() + 1 );\n";
+ s = indent + parent + "->setNumCols( " + parent + "->numCols() + 1 );\n";
if ( pix.isEmpty() )
- s += indent + tqparent + "->horizontalHeader()->setLabel( " + tqparent + "->numCols() - 1, "
+ s += indent + parent + "->horizontalHeader()->setLabel( " + parent + "->numCols() - 1, "
+ trcall( txt, com ) + " );\n";
else
- s += indent + tqparent + "->horizontalHeader()->setLabel( " + tqparent + "->numCols() - 1, "
+ s += indent + parent + "->horizontalHeader()->setLabel( " + parent + "->numCols() - 1, "
+ pix + ", " + trcall( txt, com ) + " );\n";
} else if ( objClass == "TQDataTable" ) {
if ( !txt.isEmpty() && !field.isEmpty() ) {
if ( pix.isEmpty() )
- out << indent << tqparent << "->addColumn( " << fixString( field ) << ", " << trcall( txt, com ) << " );" << endl;
+ out << indent << parent << "->addColumn( " << fixString( field ) << ", " << trcall( txt, com ) << " );" << endl;
else
- out << indent << tqparent << "->addColumn( " << fixString( field ) << ", " << trcall( txt, com ) << ", " << pix << " );" << endl;
+ out << indent << parent << "->addColumn( " << fixString( field ) << ", " << trcall( txt, com ) << ", " << pix << " );" << endl;
}
}
}
@@ -805,7 +805,7 @@ TQString Uic::createTableRowColumnImpl( const TQDomElement &e, const TQString &t
/*!
Creates the implementation of a tqlayout tag. Called from createObjectImpl().
*/
-TQString Uic::createLayoutImpl( const TQDomElement &e, const TQString& parentClass, const TQString& tqparent, const TQString& tqlayout )
+TQString Uic::createLayoutImpl( const TQDomElement &e, const TQString& parentClass, const TQString& parent, const TQString& tqlayout )
{
TQDomElement n;
TQString objClass, objName;
@@ -830,15 +830,15 @@ TQString Uic::createLayoutImpl( const TQDomElement &e, const TQString& parentCla
optcells = "1, 1, ";
if ( (parentClass == "TQGroupBox" || parentClass == "TQButtonGroup") && tqlayout.isEmpty() ) {
// special case for group box
- out << indent << tqparent << "->setColumnLayout(0, Qt::Vertical );" << endl;
- out << indent << tqparent << "->tqlayout()->setSpacing( " << spacing << " );" << endl;
- out << indent << tqparent << "->tqlayout()->setMargin( " << margin << " );" << endl;
- out << indent << objName << " = new " << qtqlayout << "( " << tqparent << "->tqlayout() );" << endl;
+ out << indent << parent << "->setColumnLayout(0, Qt::Vertical );" << endl;
+ out << indent << parent << "->tqlayout()->setSpacing( " << spacing << " );" << endl;
+ out << indent << parent << "->tqlayout()->setMargin( " << margin << " );" << endl;
+ out << indent << objName << " = new " << qtqlayout << "( " << parent << "->tqlayout() );" << endl;
out << indent << objName << "->tqsetAlignment( TQt::AlignTop );" << endl;
} else {
out << indent << objName << " = new " << qtqlayout << "( ";
if ( tqlayout.isEmpty() )
- out << tqparent;
+ out << parent;
else {
out << "0";
if ( !DomTool::hasProperty( e, "margin" ) )
@@ -852,10 +852,10 @@ TQString Uic::createLayoutImpl( const TQDomElement &e, const TQString& parentCla
if ( !isGrid ) {
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "spacer" ) {
- TQString child = createSpacerImpl( n, parentClass, tqparent, objName );
+ TQString child = createSpacerImpl( n, parentClass, parent, objName );
out << indent << objName << "->addItem( static_cast<TQLayoutItem*>(static_cast<QLayoutItem*>( " << child << " )) );" << endl;
} else if ( tags.contains( n.tagName() ) ) {
- TQString child = createObjectImpl( n, parentClass, tqparent, objName );
+ TQString child = createObjectImpl( n, parentClass, parent, objName );
if ( isLayout( child ) )
out << indent << objName << "->addLayout( static_cast<TQLayout*>(static_cast<QLayout*>( " << child << " )) );" << endl;
else
@@ -874,7 +874,7 @@ TQString Uic::createLayoutImpl( const TQDomElement &e, const TQString& parentCla
if ( colspan < 1 )
colspan = 1;
if ( n.tagName() == "spacer" ) {
- TQString child = createSpacerImpl( n, parentClass, tqparent, objName );
+ TQString child = createSpacerImpl( n, parentClass, parent, objName );
if ( rowspan * colspan != 1 )
out << indent << objName << "->addMultiCell( " << child << ", "
<< row << ", " << ( row + rowspan - 1 ) << ", " << col << ", " << ( col + colspan - 1 ) << " );" << endl;
@@ -882,7 +882,7 @@ 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, tqparent, objName );
+ TQString child = createObjectImpl( n, parentClass, parent, objName );
out << endl;
TQString o = "Widget";
if ( isLayout( child ) )
@@ -902,7 +902,7 @@ TQString Uic::createLayoutImpl( const TQDomElement &e, const TQString& parentCla
-TQString Uic::createSpacerImpl( const TQDomElement &e, const TQString& /*parentClass*/, const TQString& /*tqparent*/, const TQString& /*tqlayout*/)
+TQString Uic::createSpacerImpl( const TQDomElement &e, const TQString& /*parentClass*/, const TQString& /*parent*/, const TQString& /*tqlayout*/)
{
TQDomElement n;
TQString objClass, objName;
@@ -1109,15 +1109,15 @@ TQStringList Uic::unique( const TQStringList& list )
/*!
- Creates an instance of class \a objClass, with tqparent \a tqparent and name \a objName
+ Creates an instance of class \a objClass, with parent \a parent and name \a objName
*/
-TQString Uic::createObjectInstance( const TQString& objClass, const TQString& tqparent, const TQString& objName )
+TQString Uic::createObjectInstance( const TQString& objClass, const TQString& parent, const TQString& objName )
{
if ( objClass.mid( 2 ) == "ComboBox" ) {
- return objClass + "( FALSE, " + tqparent + ", \"" + objName + "\" )";
+ return objClass + "( FALSE, " + parent + ", \"" + objName + "\" )";
}
- return objClass + "( " + tqparent + ", \"" + objName + "\" )";
+ return objClass + "( " + parent + ", \"" + objName + "\" )";
}
bool Uic::isLayout( const TQString& name ) const