diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-21 14:24:21 -0600 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2012-06-23 19:35:21 +0200 |
commit | 39d7cb00553d01cea32bfd52fa406aac15742ba0 (patch) | |
tree | 5c385fb00eec3e82327af85dca39e730faa5cebe /kdevdesigner/designer/resource.cpp | |
parent | ec049c7c32d50faf317b13d5c844a19978881fc3 (diff) | |
download | tdevelop-39d7cb00553d01cea32bfd52fa406aac15742ba0.tar.gz tdevelop-39d7cb00553d01cea32bfd52fa406aac15742ba0.zip |
Rename obsolete tq methods to standard names
(cherry picked from commit abcbb684982167791304dc2fe0bc979489506b43)
Diffstat (limited to 'kdevdesigner/designer/resource.cpp')
-rw-r--r-- | kdevdesigner/designer/resource.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/kdevdesigner/designer/resource.cpp b/kdevdesigner/designer/resource.cpp index e15b68c1..168de589 100644 --- a/kdevdesigner/designer/resource.cpp +++ b/kdevdesigner/designer/resource.cpp @@ -238,7 +238,7 @@ static TQString platformNeutralKeySequence(const TQKeySequence &ks) ++i; } // If we can't find the actual translatable keyname, - // fall back on the tqunicode representation of it... + // fall back on the unicode representation of it... // Or else characters like Key_aring may not get displayed // ( Really depends on you locale ) if ( !keyname[i].name ) @@ -622,8 +622,8 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject ) 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() ) ) ); @@ -1347,14 +1347,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 ( !::tqqt_cast<TQSplitter*>(obj) && 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>"; @@ -1370,15 +1370,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 ); } @@ -1743,7 +1743,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 ); } @@ -1756,7 +1756,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(); @@ -1798,16 +1798,16 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay w = (TQWidget*)obj; if ( ::tqqt_cast<TQMainWindow*>(w) ) 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: @@ -1817,7 +1817,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay if ( !toplevel ) toplevel = w; - tqlayout = 0; + layout = 0; if ( w && formwindow ) { if ( !parent || @@ -1848,22 +1848,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 ) { @@ -2104,7 +2104,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(); @@ -2128,11 +2128,11 @@ TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLay spacer->setInteraciveMode( TRUE ); if ( formwindow ) formwindow->insertWidget( spacer, pasting ); - if ( tqlayout ) { - if ( ::tqqt_cast<TQBoxLayout*>(tqlayout) ) - ( (TQBoxLayout*)tqlayout )->addWidget( spacer, 0, spacer->alignment() ); + if ( layout ) { + if ( ::tqqt_cast<TQBoxLayout*>(layout) ) + ( (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; |