diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-12-21 11:50:29 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-12-27 11:42:47 +0900 |
commit | 86fed9b788837a7f02086639225c66ecd83065e1 (patch) | |
tree | 610edf3b7e43182a7e200a84e2fba357369a1d13 /kommander/editor/resource.cpp | |
parent | 8954d7640bd43ba663a75334b5d30d3f5f62174b (diff) | |
download | tdewebdev-86fed9b788837a7f02086639225c66ecd83065e1.tar.gz tdewebdev-86fed9b788837a7f02086639225c66ecd83065e1.zip |
Replace various '#define' strings - part 6
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 9e553028bac0f0d934926318a7b13aa4d8474b27)
Diffstat (limited to 'kommander/editor/resource.cpp')
-rw-r--r-- | kommander/editor/resource.cpp | 168 |
1 files changed, 84 insertions, 84 deletions
diff --git a/kommander/editor/resource.cpp b/kommander/editor/resource.cpp index 7122abba..32b70e9d 100644 --- a/kommander/editor/resource.cpp +++ b/kommander/editor/resource.cpp @@ -195,7 +195,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev ) formwindow->setProject( MainWindow::self->currProject() ); #endif formwindow->setMainWindow( mainwindow ); - MetaDataBase::addEntry( TQT_TQOBJECT(formwindow) ); + MetaDataBase::addEntry( formwindow ); #ifndef KOMMANDER if (!langIface) { @@ -355,11 +355,11 @@ bool Resource::load( FormFile *ff, TQIODevice* dev ) if ( slot.returnType.isEmpty() ) slot.returnType = "void"; slot.slot = n.firstChild().toText().data().utf8(); - if ( !MetaDataBase::hasSlot( TQT_TQOBJECT(formwindow), slot.slot, true ) ) - MetaDataBase::addSlot( TQT_TQOBJECT(formwindow), slot.slot, slot.specifier, + if ( !MetaDataBase::hasSlot( formwindow, slot.slot, true ) ) + MetaDataBase::addSlot( formwindow, slot.slot, slot.specifier, slot.access, slot.language, slot.returnType ); else - MetaDataBase::changeSlotAttributes( TQT_TQOBJECT(formwindow), slot.slot, + MetaDataBase::changeSlotAttributes( formwindow, slot.slot, slot.specifier, slot.access, slot.language, slot.returnType ); } @@ -377,11 +377,11 @@ bool Resource::load( FormFile *ff, TQIODevice* dev ) loadTabOrder( tabOrder ); if ( formwindow ) { - MetaDataBase::setIncludes( TQT_TQOBJECT(formwindow), metaIncludes ); - MetaDataBase::setForwards( TQT_TQOBJECT(formwindow), metaForwards ); - MetaDataBase::setSignalList( TQT_TQOBJECT(formwindow), metaSignals ); - MetaDataBase::setMetaInfo( TQT_TQOBJECT(formwindow), metaInfo ); - MetaDataBase::setExportMacro( TQT_TQOBJECT(formwindow->mainContainer()), exportMacro ); + MetaDataBase::setIncludes( formwindow, metaIncludes ); + MetaDataBase::setForwards( formwindow, metaForwards ); + MetaDataBase::setSignalList( formwindow, metaSignals ); + MetaDataBase::setMetaInfo( formwindow, metaInfo ); + MetaDataBase::setExportMacro( formwindow->mainContainer(), exportMacro ); } @@ -391,7 +391,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev ) } if ( formwindow ) { - formwindow->killAccels( TQT_TQOBJECT(formwindow) ); + formwindow->killAccels( formwindow ); if ( formwindow->layout() ) formwindow->layout()->activate(); if ( hadGeometry ) @@ -430,7 +430,7 @@ bool Resource::save( TQIODevice* dev ) ts << formwindow->mainContainer()->property("shebang").toString() << endl; ts << "<!DOCTYPE UI><UI version=\"3.0\" stdsetdef=\"1\">" << endl; saveMetaInfoBefore( ts, 0 ); - saveObject( TQT_TQOBJECT(formwindow->mainContainer()), 0, ts, 0 ); + saveObject( formwindow->mainContainer(), 0, ts, 0 ); if ( formwindow->mainContainer()->inherits( "TQMainWindow" ) ) { saveMenuBar( (TQMainWindow*)formwindow->mainContainer(), ts, 0 ); saveToolBars( (TQMainWindow*)formwindow->mainContainer(), ts, 0 ); @@ -441,7 +441,7 @@ bool Resource::save( TQIODevice* dev ) saveActions( formwindow->actionList(), ts, 0 ); if ( !images.isEmpty() ) saveImageCollection( ts, 0 ); - if ( !MetaDataBase::connections( TQT_TQOBJECT(formwindow) ).isEmpty() || !MetaDataBase::slotList( TQT_TQOBJECT(formwindow) ).isEmpty() ) + if ( !MetaDataBase::connections( formwindow ).isEmpty() || !MetaDataBase::slotList( formwindow ).isEmpty() ) saveConnections( ts, 0 ); saveTabOrder( ts, 0 ); saveMetaInfoAfter( ts, 0 ); @@ -474,7 +474,7 @@ TQString Resource::copy() p = p->parentWidget(); } if ( save ) - saveObject( TQT_TQOBJECT(w), 0, ts, 0 ); + saveObject( w, 0, ts, 0 ); } if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() ) saveCustomWidgets( ts, 0 ); @@ -536,7 +536,7 @@ void Resource::paste( const TQString &cb, TQWidget *parent ) y = TQMAX( 0, parent->height() - w->height() ); if ( x != w->x() || y != w->y() ) w->move( x, y ); - formwindow->selectWidget( TQT_TQOBJECT(w) ); + formwindow->selectWidget( w ); } else if ( firstWidget.tagName() == "spacer" ) { TQWidget *w = createSpacer( firstWidget, parent, 0, firstWidget.tagName() == "vspacer" ? TQt::Vertical : TQt::Horizontal ); if ( !w ) @@ -550,7 +550,7 @@ void Resource::paste( const TQString &cb, TQWidget *parent ) y = TQMAX( 0, parent->height() - w->height() ); if ( x != w->x() || y != w->y() ) w->move( x, y ); - formwindow->selectWidget( TQT_TQOBJECT(w) ); + formwindow->selectWidget( w ); } firstWidget = firstWidget.nextSibling().toElement(); } @@ -618,7 +618,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea TQWidget *w = ws->widget( t->identifier() ); if ( !w ) continue; - if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) == -1 ) + if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) == -1 ) continue; // we don't know this widget ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl; ++indent; @@ -633,7 +633,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea ts << makeIndent( indent ) << "<string>" << entitize( t->text() ) << "</string>" << endl; indent--; ts << makeIndent( indent ) << "</attribute>" << endl; - saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); + saveChildrenOf( w, ts, indent ); --indent; ts << makeIndent( indent ) << "</widget>" << endl; } @@ -645,7 +645,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea TQWidget *w = tb->item( i ); if ( !w ) continue; - if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))) == -1 ) + if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)) == -1 ) continue; // we don't know this widget ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl; ++indent; @@ -656,7 +656,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea ts << makeIndent( indent ) << "</property>" << endl; ts << makeIndent( indent ) << "<property name=\"backgroundMode\">" << endl; indent++; - saveEnumProperty( TQT_TQOBJECT(w), "backgroundMode", TQVariant::Invalid, ts, indent ); + saveEnumProperty( w, "backgroundMode", TQVariant::Invalid, ts, indent ); indent--; ts << makeIndent( indent ) << "</property>" << endl; ts << makeIndent( indent ) << "<attribute name=\"label\">" << endl; @@ -664,7 +664,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea ts << makeIndent( indent ) << "<string>" << entitize( tb->itemLabel( tb->indexOf(w) ) ) << "</string>" << endl; indent--; ts << makeIndent( indent ) << "</attribute>" << endl; - saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); + saveChildrenOf( w, ts, indent ); --indent; ts << makeIndent( indent ) << "</widget>" << endl; } @@ -674,7 +674,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea TQWidget *w = wiz->page( i ); if ( !w ) continue; - if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) == -1 ) + if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) == -1 ) continue; // we don't know this widget ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl; ++indent; @@ -689,12 +689,12 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea ts << makeIndent( indent ) << "<string>" << entitize( wiz->title( w ) ) << "</string>" << endl; indent--; ts << makeIndent( indent ) << "</attribute>" << endl; - saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); + saveChildrenOf( w, ts, indent ); --indent; ts << makeIndent( indent ) << "</widget>" << endl; } } else if ( obj->inherits( "TQMainWindow" ) ) { - saveChildrenOf( TQT_TQOBJECT(( (TQMainWindow*)obj )->centralWidget()), ts, indent ); + saveChildrenOf( ( (TQMainWindow*)obj )->centralWidget(), ts, indent ); } else { saveChildrenOf( obj, ts, indent ); } @@ -773,7 +773,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent ) else if ( obj->inherits( "TQTable" ) ) { TQTable *table = (TQTable*)obj; int i; - TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(table) ); + TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( table ); bool isDataTable = table->inherits( "TQDataTable" ); for ( i = 0; i < table->horizontalHeader()->count(); ++i ) { if ( !table->horizontalHeader()->label( i ).isNull() && @@ -856,11 +856,11 @@ void Resource::savePixmap( const TQPixmap &p, TQTextStream &ts, int indent, cons ts << makeIndent( indent ) << "<" + tagname + ">" << saveInCollection( p ) << "</" + tagname + ">" << endl; #ifndef KOMMANDER else if ( formwindow && formwindow->savePixmapInProject() ) - ts << makeIndent( indent ) << "<" + tagname + ">" << MetaDataBase::pixmapKey( TQT_TQOBJECT(formwindow), p.serialNumber() ) + ts << makeIndent( indent ) << "<" + tagname + ">" << MetaDataBase::pixmapKey( formwindow, p.serialNumber() ) << "</" + tagname + ">" << endl; #endif else - ts << makeIndent( indent ) << "<" + tagname + ">" << MetaDataBase::pixmapArgument( TQT_TQOBJECT(formwindow), p.serialNumber() ) + ts << makeIndent( indent ) << "<" + tagname + ">" << MetaDataBase::pixmapArgument( formwindow, p.serialNumber() ) << "</" + tagname + ">" << endl; } @@ -872,7 +872,7 @@ TQPixmap Resource::loadPixmap( const TQDomElement &e, const TQString &/*tagname* TQImage img = loadFromCollection( arg ); TQPixmap pix; pix.convertFromImage( img ); - MetaDataBase::setPixmapArgument( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg ); + MetaDataBase::setPixmapArgument( formwindow, pix.serialNumber(), arg ); return pix; } #ifndef KOMMANDER @@ -886,11 +886,11 @@ TQPixmap Resource::loadPixmap( const TQDomElement &e, const TQString &/*tagname* { TQPixmap pix; pix = PixmapChooser::loadPixmap( "image.xpm" ); - MetaDataBase::setPixmapKey( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg ); + MetaDataBase::setPixmapKey( formwindow, pix.serialNumber(), arg ); return pix; } TQPixmap pix = PixmapChooser::loadPixmap( "image.xpm" ); - MetaDataBase::setPixmapArgument( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg ); + MetaDataBase::setPixmapArgument( formwindow, pix.serialNumber(), arg ); return pix; } @@ -956,7 +956,7 @@ void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent ) // save properties of layout if ( lay != WidgetFactory::NoLayout ) - saveObjectProperties( TQT_TQOBJECT(layout), ts, indent ); + saveObjectProperties( layout, ts, indent ); } @@ -1326,7 +1326,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay TQString className = e.attribute( "class", "TQWidget" ); if ( !className.isNull() ) { - obj = TQT_TQOBJECT(WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, false )); + obj = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, false ); if ( !obj ) return 0; if ( !mainContainerSet ) { @@ -1362,7 +1362,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay if ( !parent || ( !parent->inherits( "TQToolBox" ) && !parent->inherits( "TQTabWidget" ) && !parent->inherits( "TQWizard" ) ) ) formwindow->insertWidget( w, pasting ); else if ( parent && ( parent->inherits( "TQToolBox" ) || parent->inherits( "TQTabWidget" ) || parent->inherits( "TQWizard" ) ) ) - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); + MetaDataBase::addEntry( w ); if (w->inherits("Dialog")) dynamic_cast<Dialog*>(w)->setUseInternalParser(false); } @@ -1375,17 +1375,17 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay createObject( n, w, layout ); } else if ( n.tagName() == "hbox" ) { layout = WidgetFactory::createLayout( w, layout, WidgetFactory::HBox ); - obj = TQT_TQOBJECT(layout); + obj = layout; n = n.firstChild().toElement(); continue; } else if ( n.tagName() == "grid" ) { layout = WidgetFactory::createLayout( w, layout, WidgetFactory::Grid ); - obj = TQT_TQOBJECT(layout); + obj = layout; n = n.firstChild().toElement(); continue; } else if ( n.tagName() == "vbox" ) { layout = WidgetFactory::createLayout( w, layout, WidgetFactory::VBox ); - obj = TQT_TQOBJECT(layout); + obj = layout; n = n.firstChild().toElement(); continue; } else if ( n.tagName() == "property" && obj ) { @@ -1419,7 +1419,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay n = n.nextSibling().toElement(); } - return TQT_TQOBJECT(w); + return w; } void Resource::createColumn( const TQDomElement &e, TQWidget *widget ) @@ -1474,7 +1474,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget ) bool hasPixmap = false; TQString txt; TQString field; - TQMap<TQString, TQString> fieldMap = MetaDataBase::columnFields( TQT_TQOBJECT(table) ); + TQMap<TQString, TQString> fieldMap = MetaDataBase::columnFields( table ); while ( !n.isNull() ) { if ( n.tagName() == "property" ) { TQString attrib = n.attribute( "name" ); @@ -1499,7 +1499,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget ) h->setLabel( i, txt ); if ( !isRow && !field.isEmpty() ) fieldMap.insert( txt, field ); - MetaDataBase::setColumnFields( TQT_TQOBJECT(table), fieldMap ); + MetaDataBase::setColumnFields( table, fieldMap ); } #endif } @@ -1525,7 +1525,7 @@ void Resource::loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bo void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i ) { - if ( !widget || !WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ) ) ) + if ( !widget || !WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) ) return; if ( widget->inherits( "TQListBox" ) || widget->inherits( "TQComboBox" ) ) { @@ -1614,7 +1614,7 @@ TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLay spacer->setInteraciveMode( false ); while ( !n.isNull() ) { if ( n.tagName() == "property" ) - setObjectProperty( TQT_TQOBJECT(spacer), n.attribute( "name" ), n.firstChild().toElement() ); + setObjectProperty( spacer, n.attribute( "name" ), n.firstChild().toElement() ); n = n.nextSibling().toElement(); } spacer->setInteraciveMode( true ); @@ -1747,11 +1747,11 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD if ( obj->inherits( "TQLayout" ) ) { if ( prop == "spacing" ) { - MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)obj ) )), v.toInt() ); + MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)obj ) ), v.toInt() ); return; } if ( prop == "margin" ) { - MetaDataBase::setMargin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)obj ) )), v.toInt() ); + MetaDataBase::setMargin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)obj ) ), v.toInt() ); return; } } @@ -1759,7 +1759,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD if ( prop == "name" ) { if ( pasting ) { TQString s = v.toString(); - formwindow->unify( TQT_TQOBJECT(obj), s, true ); + formwindow->unify( obj, s, true ); obj->setName( s.utf8() ); return; } else if ( formwindow && obj == formwindow->mainContainer() ) { @@ -1907,7 +1907,7 @@ void Resource::saveConnections( TQTextStream &ts, int indent ) { ts << makeIndent( indent ) << "<connections>" << endl; indent++; - TQValueList<MetaDataBase::Connection> connections = MetaDataBase::connections( TQT_TQOBJECT(formwindow) ); + TQValueList<MetaDataBase::Connection> connections = MetaDataBase::connections( formwindow ); TQValueList<MetaDataBase::Connection>::Iterator it = connections.begin(); for ( ; it != connections.end(); ++it ) { MetaDataBase::Connection conn = *it; @@ -1916,8 +1916,8 @@ void Resource::saveConnections( TQTextStream &ts, int indent ) ( knownNames.findIndex( TQString( conn.receiver->name() ) ) == -1 && qstrcmp( conn.receiver->name(), "this" ) != 0 ) ) continue; - if ( formwindow->isMainContainer( TQT_TQOBJECT((*it).receiver) ) && - !MetaDataBase::hasSlot( TQT_TQOBJECT(formwindow), MetaDataBase::normalizeSlot( (*it).slot ).latin1() ) ) + if ( formwindow->isMainContainer( (*it).receiver ) && + !MetaDataBase::hasSlot( formwindow, MetaDataBase::normalizeSlot( (*it).slot ).latin1() ) ) continue; if ( conn.sender->inherits( "CustomWidget" ) ) { @@ -1986,7 +1986,7 @@ void Resource::loadConnections( const TQDomElement &e ) conn.sender = 0; TQString name = n2.firstChild().toText().data(); if ( name == "this" || toplevel->name() == name ) { - conn.sender = TQT_TQOBJECT(toplevel); + conn.sender = toplevel; } else { if ( name == "this" ) name = toplevel->name(); @@ -2004,7 +2004,7 @@ void Resource::loadConnections( const TQDomElement &e ) } else if ( n2.tagName() == "receiver" ) { TQString name = n2.firstChild().toText().data(); if ( name == "this" || toplevel->name() == name ) { - conn.receiver = TQT_TQOBJECT(toplevel); + conn.receiver = toplevel; } else { TQObjectList *l = toplevel->queryList( 0, name.utf8(), false ); if ( l ) { @@ -2020,9 +2020,9 @@ void Resource::loadConnections( const TQDomElement &e ) } if ( formwindow ) { if ( conn.sender == formwindow ) - conn.sender = TQT_TQOBJECT(formwindow->mainContainer()); + conn.sender = formwindow->mainContainer(); if ( conn.receiver == formwindow ) - conn.receiver = TQT_TQOBJECT(formwindow->mainContainer()); + conn.receiver = formwindow->mainContainer(); } if ( conn.sender && conn.receiver ) { #ifndef KOMMANDER @@ -2035,7 +2035,7 @@ void Resource::loadConnections( const TQDomElement &e ) TQStringList::split( ',', conn.slot ), false ); } #else - MetaDataBase::addConnection( formwindow ? TQT_TQOBJECT(formwindow) : TQT_TQOBJECT(toplevel), + MetaDataBase::addConnection( formwindow ? formwindow : toplevel, conn.sender, conn.signal, conn.receiver, conn.slot ); #endif } @@ -2052,11 +2052,11 @@ void Resource::loadConnections( const TQDomElement &e ) if ( slot.returnType.isEmpty() ) slot.returnType = "void"; slot.slot = n.firstChild().toText().data().utf8(); - if ( !MetaDataBase::hasSlot( TQT_TQOBJECT(formwindow), slot.slot, true ) ) - MetaDataBase::addSlot( TQT_TQOBJECT(formwindow), slot.slot, slot.specifier, + if ( !MetaDataBase::hasSlot( formwindow, slot.slot, true ) ) + MetaDataBase::addSlot( formwindow, slot.slot, slot.specifier, slot.access, slot.language, slot.returnType ); else - MetaDataBase::changeSlotAttributes( TQT_TQOBJECT(formwindow), slot.slot, + MetaDataBase::changeSlotAttributes( formwindow, slot.slot, slot.specifier, slot.access, slot.language, slot.returnType ); } @@ -2245,7 +2245,7 @@ void Resource::loadTabOrder( const TQDomElement &e ) void Resource::saveMetaInfoBefore( TQTextStream &ts, int indent ) { - MetaDataBase::MetaInfo info = MetaDataBase::metaInfo(TQT_TQOBJECT(formwindow)); + MetaDataBase::MetaInfo info = MetaDataBase::metaInfo(formwindow); TQString cn = formwindow->name(); ts << makeIndent(indent) << "<class>" << entitize(cn) << "</class>" << endl; if (!info.comment.isEmpty()) @@ -2260,8 +2260,8 @@ void Resource::saveMetaInfoBefore( TQTextStream &ts, int indent ) void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) { - MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( TQT_TQOBJECT(formwindow) ); - TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( TQT_TQOBJECT(formwindow) ); + MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( formwindow ); + TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formwindow ); TQString extensionInclude; bool needExtensionInclude = false; if ( !includes.isEmpty() || needExtensionInclude ) { @@ -2282,7 +2282,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) ts << makeIndent( indent ) << "</includes>" << endl; } - TQStringList forwards = MetaDataBase::forwards( TQT_TQOBJECT(formwindow) ); + TQStringList forwards = MetaDataBase::forwards( formwindow ); if ( !forwards.isEmpty() ) { ts << makeIndent( indent ) << "<forwards>" << endl; indent++; @@ -2291,7 +2291,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) indent--; ts << makeIndent( indent ) << "</forwards>" << endl; } - TQStringList sigs = MetaDataBase::signalList( TQT_TQOBJECT(formwindow) ); + TQStringList sigs = MetaDataBase::signalList( formwindow ); if ( !sigs.isEmpty() ) { ts << makeIndent( indent ) << "<signals>" << endl; indent++; @@ -2300,7 +2300,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) indent--; ts << makeIndent( indent ) << "</signals>" << endl; - TQValueList<MetaDataBase::Slot> slotList = MetaDataBase::slotList( TQT_TQOBJECT(formwindow) ); + TQValueList<MetaDataBase::Slot> slotList = MetaDataBase::slotList( formwindow ); if ( !slotList.isEmpty() ) { ts << makeIndent( indent ) << "<slots>" << endl; indent++; @@ -2330,7 +2330,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) ; else ts << makeIndent( indent ) << "<pixmapfunction>" << formwindow->pixmapLoaderFunction() << "</pixmapfunction>" << endl; - if ( !( exportMacro = MetaDataBase::exportMacro( TQT_TQOBJECT(formwindow->mainContainer()) ) ).isEmpty() ) + if ( !( exportMacro = MetaDataBase::exportMacro( formwindow->mainContainer() ) ).isEmpty() ) ts << makeIndent( indent ) << "<exportmacro>" << exportMacro << "</exportmacro>" << endl; if ( formwindow ) ts << makeIndent( indent ) << "<layoutdefaults spacing=\"" << formwindow->layoutDefaultSpacing() @@ -2473,9 +2473,9 @@ void Resource::loadActions( const TQDomElement &e ) TQDomElement n = e.firstChild().toElement(); while ( !n.isNull() ) { if ( n.tagName() == "action" ) { - loadChildAction( TQT_TQOBJECT(formwindow), n ); + loadChildAction( formwindow, n ); } else if ( n.tagName() == "actiongroup" ) { - loadChildAction( TQT_TQOBJECT(formwindow), n ); + loadChildAction( formwindow, n ); } n = n.nextSibling().toElement(); } @@ -2496,7 +2496,7 @@ void Resource::saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent ) continue; ts << makeIndent( indent ) << "<toolbar dock=\"" << i << "\">" << endl; indent++; - saveObjectProperties( TQT_TQOBJECT(tb), ts, indent ); + saveObjectProperties( tb, ts, indent ); TQPtrList<TQAction> actionList = ( (QDesignerToolBar*)tb )->insertedActions(); for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { if ( a->inherits( "QSeparatorAction" ) ) { @@ -2505,14 +2505,14 @@ void Resource::saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent ) if ( a->inherits( "QDesignerAction" ) && !( (QDesignerAction*)a )->supportsMenu() ) { TQWidget *w = ( (QDesignerAction*)a )->widget(); ts << makeIndent( indent ) << "<widget class=\"" - << WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) << "\">" << endl; + << WidgetFactory::classNameOf( w ) << "\">" << endl; indent++; - saveObjectProperties( TQT_TQOBJECT(w), ts, indent ); - const char *className = WidgetFactory::classNameOf( TQT_TQOBJECT(w) ); + saveObjectProperties( w, ts, indent ); + const char *className = WidgetFactory::classNameOf( w ); if ( w->isA( "CustomWidget" ) ) usedCustomWidgets << TQString( className ); - if ( WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) - saveItems( TQT_TQOBJECT(w), ts, indent ); + if ( WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) ) + saveItems( w, ts, indent ); indent--; ts << makeIndent( indent ) << "</widget>" << endl; } else { @@ -2534,7 +2534,7 @@ void Resource::saveMenuBar( TQMainWindow *mw, TQTextStream &ts, int indent ) return; ts << makeIndent( indent ) << "<menubar>" << endl; indent++; - saveObjectProperties( TQT_TQOBJECT(mw->menuBar()), ts, indent ); + saveObjectProperties( mw->menuBar(), ts, indent ); for ( int i = 0; i < (int)mw->menuBar()->count(); ++i ) { ts << makeIndent( indent ) << "<item text=\"" << entitize( mw->menuBar()->text( mw->menuBar()->idAt( i ) ) ) @@ -2580,12 +2580,12 @@ void Resource::loadToolBars( const TQDomElement &e ) tb->addAction( a ); } else if ( n2.tagName() == "widget" ) { TQWidget *w = (TQWidget*)createObject( n2, tb ); - QDesignerAction *a = new QDesignerAction( w, TQT_TQOBJECT(tb) ); + QDesignerAction *a = new QDesignerAction( w, tb ); a->addTo( tb ); tb->addAction( a ); tb->installEventFilters( w ); } else if ( n2.tagName() == "property" ) { - setObjectProperty( TQT_TQOBJECT(tb), n2.attribute( "name" ), n2.firstChild().toElement() ); + setObjectProperty( tb, n2.attribute( "name" ), n2.firstChild().toElement() ); } n2 = n2.nextSibling().toElement(); } @@ -2620,7 +2620,7 @@ void Resource::loadMenuBar( const TQDomElement &e ) } mb->insertItem( n.attribute( "text" ), popup ); } else if ( n.tagName() == "property" ) { - setObjectProperty( TQT_TQOBJECT(mb), n.attribute( "name" ), n.firstChild().toElement() ); + setObjectProperty( mb, n.attribute( "name" ), n.firstChild().toElement() ); } n = n.nextSibling().toElement(); } @@ -2663,7 +2663,7 @@ void Resource::saveFormCode() LanguageInterface::Function func; func.name = slot.slot; func.body = *it; - func.comments = MetaDataBase::functionComments( TQT_TQOBJECT(formwindow), func.name ); + func.comments = MetaDataBase::functionComments( formwindow, func.name ); func.returnType = slot.returnType; funcs.append( func ); } @@ -2716,7 +2716,7 @@ void Resource::loadFunctions( const TQDomElement &e ) } n = n.nextSibling().toElement(); } - MetaDataBase::setFunctionBodies( TQT_TQOBJECT(formwindow), bodies, TQString(), TQString() ); + MetaDataBase::setFunctionBodies( formwindow, bodies, TQString(), TQString() ); if ( !bodies.isEmpty() ) { LanguageInterface *iface = langIface; if ( !iface ) @@ -2731,7 +2731,7 @@ void Resource::loadFunctions( const TQDomElement &e ) #endif continue; TQString sl( (*it).slot ); - TQString comments = MetaDataBase::functionComments( TQT_TQOBJECT(formwindow), sl ); + TQString comments = MetaDataBase::functionComments( formwindow, sl ); if ( !comments.isEmpty() ) code += comments + "\n"; code += iface->createFunctionStart( formwindow->name(), make_function_pretty( sl ), @@ -2812,25 +2812,25 @@ void Resource::loadExtraSource() for ( TQValueList<LanguageInterface::Function>::Iterator fit = functions.begin(); fit != functions.end(); ++fit ) { - if ( MetaDataBase::hasSlot( TQT_TQOBJECT(formwindow), (*fit).name.latin1() ) ) - MetaDataBase::changeSlot( TQT_TQOBJECT(formwindow), (*fit).name.latin1(), (*fit).name.latin1() ); + if ( MetaDataBase::hasSlot( formwindow, (*fit).name.latin1() ) ) + MetaDataBase::changeSlot( formwindow, (*fit).name.latin1(), (*fit).name.latin1() ); else - MetaDataBase::addSlot( TQT_TQOBJECT(formwindow), (*fit).name.latin1(), "virtual", "public", lang, (*fit).returnType ); - MetaDataBase::setFunctionComments( TQT_TQOBJECT(formwindow), (*fit).name, (*fit).comments ); + MetaDataBase::addSlot( formwindow, (*fit).name.latin1(), "virtual", "public", lang, (*fit).returnType ); + MetaDataBase::setFunctionComments( formwindow, (*fit).name, (*fit).comments ); bodies.insert( MetaDataBase::normalizeSlot( (*fit).name ), (*fit).body ); } - MetaDataBase::setFunctionBodies( TQT_TQOBJECT(formwindow), bodies, TQString(), TQString() ); + MetaDataBase::setFunctionBodies( formwindow, bodies, TQString(), TQString() ); TQStringList v = MetaDataBase::variables( formwindow ); TQStringList::Iterator vit; for ( vit = vars.begin(); vit != vars.end(); ++vit ) v << *vit; - MetaDataBase::setVariables( TQT_TQOBJECT(formwindow), v ); + MetaDataBase::setVariables( formwindow, v ); TQStringList f = MetaDataBase::forwards( formwindow ); for ( vit = forwards.begin(); vit != forwards.end(); ++vit ) f << *vit; - MetaDataBase::setForwards( TQT_TQOBJECT(formwindow), f ); + MetaDataBase::setForwards( formwindow, f ); TQValueList<MetaDataBase::Include> incls = MetaDataBase::includes( formwindow ); for ( vit = includesImpl.begin(); vit != includesImpl.end(); ++vit ) { @@ -2845,6 +2845,6 @@ void Resource::loadExtraSource() inc.location = "in declaration"; incls << inc; } - MetaDataBase::setIncludes( TQT_TQOBJECT(formwindow), incls ); + MetaDataBase::setIncludes( formwindow, incls ); } #endif |