diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-21 14:24:43 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-21 14:24:43 -0600 |
commit | b0f531735b0175ba112ceb87d01731a7b2334772 (patch) | |
tree | 373f53c0f57c1f6c5a866781241be07edaf4840c /kommander/editor/resource.cpp | |
parent | 84c989c19db5daab602a67f47ca0f5fd7a2b53d2 (diff) | |
download | tdewebdev-b0f531735b0175ba112ceb87d01731a7b2334772.tar.gz tdewebdev-b0f531735b0175ba112ceb87d01731a7b2334772.zip |
Rename obsolete tq methods to standard names
Diffstat (limited to 'kommander/editor/resource.cpp')
-rw-r--r-- | kommander/editor/resource.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/kommander/editor/resource.cpp b/kommander/editor/resource.cpp index 8a804858..386e807a 100644 --- a/kommander/editor/resource.cpp +++ b/kommander/editor/resource.cpp @@ -401,8 +401,8 @@ bool Resource::load( FormFile *ff, TQIODevice* dev ) if ( formwindow ) { formwindow->killAccels( TQT_TQOBJECT(formwindow) ); - if ( formwindow->tqlayout() ) - formwindow->tqlayout()->activate(); + if ( formwindow->layout() ) + formwindow->layout()->activate(); if ( hadGeometry ) formwindow->resize( formwindow->size().expandedTo( formwindow->minimumSize(). expandedTo( formwindow->minimumSizeHint() ) ) ); @@ -934,14 +934,14 @@ void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent ) return; // no children to save TQString closeTag; - // if the widget has a tqlayout we pretend that all widget's childs are childs of the tqlayout - makes the structure nicer - TQLayout *tqlayout = 0; + // if the widget has a layout we pretend that all widget's childs are childs of the layout - makes the structure nicer + TQLayout *layout = 0; QDesignerGridLayout* grid = 0; if ( !obj->inherits( TQSPLITTER_OBJECT_NAME_STRING ) && WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( obj ) ) ) && obj->isWidgetType() && - WidgetFactory::layoutType( (TQWidget*)obj, tqlayout ) != WidgetFactory::NoLayout ) { - WidgetFactory::LayoutType lay = WidgetFactory::layoutType( (TQWidget*)obj, tqlayout ); + WidgetFactory::layoutType( (TQWidget*)obj, layout ) != WidgetFactory::NoLayout ) { + WidgetFactory::LayoutType lay = WidgetFactory::layoutType( (TQWidget*)obj, layout ); switch ( lay ) { case WidgetFactory::HBox: closeTag = makeIndent( indent ) + "</hbox>"; @@ -957,15 +957,15 @@ void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent ) closeTag = makeIndent( indent ) + "</grid>"; ts << makeIndent( indent ) << "<grid>" << endl; ++indent; - grid = (QDesignerGridLayout*) tqlayout; + grid = (QDesignerGridLayout*) layout; break; default: break; } - // save properties of tqlayout + // save properties of layout if ( lay != WidgetFactory::NoLayout ) - saveObjectProperties( TQT_TQOBJECT(tqlayout), ts, indent ); + saveObjectProperties( TQT_TQOBJECT(layout), ts, indent ); } @@ -1303,7 +1303,7 @@ void Resource::saveColorGroup( TQTextStream &ts, int indent, const TQColorGroup saveColor( ts, indent, cg.color( (TQColorGroup::ColorRole)r ) ); indent--; ts << makeIndent( indent ) << "</color>" << endl; - TQPixmap* pm = cg.tqbrush( (TQColorGroup::ColorRole)r ).pixmap(); + TQPixmap* pm = cg.brush( (TQColorGroup::ColorRole)r ).pixmap(); if ( pm && !pm->isNull() ) savePixmap( *pm, ts, indent ); } @@ -1316,7 +1316,7 @@ void Resource::saveColor( TQTextStream &ts, int indent, const TQColor &c ) ts << makeIndent( indent ) << "<blue>" << TQString::number( c.blue() ) << "</blue>" << endl; } -TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLayout* tqlayout ) +TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLayout* layout ) { lastItem = 0; TQDomElement n = e.firstChild().toElement(); @@ -1346,16 +1346,16 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay w = (TQWidget*)obj; if ( w->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) w = ( (TQMainWindow*)w )->centralWidget(); - if ( tqlayout ) { - switch ( WidgetFactory::layoutType( tqlayout ) ) { + if ( layout ) { + switch ( WidgetFactory::layoutType( layout ) ) { case WidgetFactory::HBox: - ( (TQHBoxLayout*)tqlayout )->addWidget( w ); + ( (TQHBoxLayout*)layout )->addWidget( w ); break; case WidgetFactory::VBox: - ( (TQVBoxLayout*)tqlayout )->addWidget( w ); + ( (TQVBoxLayout*)layout )->addWidget( w ); break; case WidgetFactory::Grid: - ( (QDesignerGridLayout*)tqlayout )->addMultiCellWidget( w, row, row + rowspan - 1, + ( (QDesignerGridLayout*)layout )->addMultiCellWidget( w, row, row + rowspan - 1, col, col + colspan - 1 ); break; default: @@ -1365,7 +1365,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay if ( !toplevel ) toplevel = w; - tqlayout = 0; + layout = 0; if ( w && formwindow ) { if ( !parent || ( !parent->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) && !parent->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) && !parent->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) ) @@ -1379,22 +1379,22 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay while ( !n.isNull() ) { if ( n.tagName() == "spacer" ) { - createSpacer( n, w, tqlayout, Qt::Horizontal ); + createSpacer( n, w, layout, Qt::Horizontal ); } else if ( n.tagName() == "widget" ) { - createObject( n, w, tqlayout ); + createObject( n, w, layout ); } else if ( n.tagName() == "hbox" ) { - tqlayout = WidgetFactory::createLayout( w, tqlayout, WidgetFactory::HBox ); - obj = TQT_TQOBJECT(tqlayout); + layout = WidgetFactory::createLayout( w, layout, WidgetFactory::HBox ); + obj = TQT_TQOBJECT(layout); n = n.firstChild().toElement(); continue; } else if ( n.tagName() == "grid" ) { - tqlayout = WidgetFactory::createLayout( w, tqlayout, WidgetFactory::Grid ); - obj = TQT_TQOBJECT(tqlayout); + layout = WidgetFactory::createLayout( w, layout, WidgetFactory::Grid ); + obj = TQT_TQOBJECT(layout); n = n.firstChild().toElement(); continue; } else if ( n.tagName() == "vbox" ) { - tqlayout = WidgetFactory::createLayout( w, tqlayout, WidgetFactory::VBox ); - obj = TQT_TQOBJECT(tqlayout); + layout = WidgetFactory::createLayout( w, layout, WidgetFactory::VBox ); + obj = TQT_TQOBJECT(layout); n = n.firstChild().toElement(); continue; } else if ( n.tagName() == "property" && obj ) { @@ -1605,7 +1605,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt } } -TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLayout *tqlayout, Qt::Orientation o ) +TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLayout *layout, Qt::Orientation o ) { TQDomElement n = e.firstChild().toElement(); int row = e.attribute( "row" ).toInt(); @@ -1629,11 +1629,11 @@ TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLay spacer->setInteraciveMode( true ); if ( formwindow ) formwindow->insertWidget( spacer, pasting ); - if ( tqlayout ) { - if ( tqlayout->inherits( TQBOXLAYOUT_OBJECT_NAME_STRING ) ) - ( (TQBoxLayout*)tqlayout )->addWidget( spacer, 0, spacer->alignment() ); + if ( layout ) { + if ( layout->inherits( TQBOXLAYOUT_OBJECT_NAME_STRING ) ) + ( (TQBoxLayout*)layout )->addWidget( spacer, 0, spacer->alignment() ); else - ( (QDesignerGridLayout*)tqlayout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1, + ( (QDesignerGridLayout*)layout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1, spacer->alignment() ); } return spacer; |