summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/resource.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-09 02:23:29 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-09 02:23:29 +0000
commit539a1fd1ae6290cc3eec745226c0ce45b02c1545 (patch)
treee1cf785f3b349d568bade07dccdb5b39eb862331 /kdevdesigner/designer/resource.cpp
parent82324bf130254bac6932131a55607c866773ca84 (diff)
downloadtdevelop-539a1fd1ae6290cc3eec745226c0ce45b02c1545.tar.gz
tdevelop-539a1fd1ae6290cc3eec745226c0ce45b02c1545.zip
Remove the tq in front of these incorrectly TQt4-converted methods/data members:
tqrepaint[...] tqinvalidate[...] tqparent[...] tqmask[...] tqlayout[...] tqalignment[...] git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1240522 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdevdesigner/designer/resource.cpp')
-rw-r--r--kdevdesigner/designer/resource.cpp68
1 files changed, 34 insertions, 34 deletions
diff --git a/kdevdesigner/designer/resource.cpp b/kdevdesigner/designer/resource.cpp
index 5f89b7cf..e511f7f1 100644
--- a/kdevdesigner/designer/resource.cpp
+++ b/kdevdesigner/designer/resource.cpp
@@ -460,10 +460,10 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
}
} else if ( e.tagName() == "exportmacro" ) {
exportMacro = e.firstChild().toText().data();
- } else if ( e.tagName() == "tqlayoutdefaults" ) {
- formwindow->setLayoutDefaultSpacing( e.attribute( "spacing", TQString::number( formwindow->tqlayoutDefaultSpacing() ) ).toInt() );
- formwindow->setLayoutDefaultMargin( e.attribute( "margin", TQString::number( formwindow->tqlayoutDefaultMargin() ) ).toInt() );
- } else if ( e.tagName() == "tqlayoutfunctions" ) {
+ } else if ( e.tagName() == "layoutdefaults" ) {
+ formwindow->setLayoutDefaultSpacing( e.attribute( "spacing", TQString::number( formwindow->layoutDefaultSpacing() ) ).toInt() );
+ formwindow->setLayoutDefaultMargin( e.attribute( "margin", TQString::number( formwindow->layoutDefaultMargin() ) ).toInt() );
+ } else if ( e.tagName() == "layoutfunctions" ) {
formwindow->setSpacingFunction( e.attribute( "spacing" ) );
formwindow->setMarginFunction( e.attribute( "margin" ) );
if ( !formwindow->marginFunction().isEmpty() || !formwindow->spacingFunction().isEmpty() )
@@ -739,14 +739,14 @@ TQString Resource::copy()
TQWidgetList widgets = formwindow->selectedWidgets();
TQWidgetList tmp( widgets );
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
- TQWidget *p = w->tqparentWidget();
+ TQWidget *p = w->parentWidget();
bool save = TRUE;
while ( p ) {
if ( tmp.tqfindRef( p ) != -1 ) {
save = FALSE;
break;
}
- p = p->tqparentWidget();
+ p = p->parentWidget();
}
if ( save )
saveObject( TQT_TQOBJECT(w), 0, ts, 0 );
@@ -1353,8 +1353,8 @@ void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent )
if ( !::tqqt_cast<TQSplitter*>(obj) &&
WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( obj ) ) ) &&
obj->isWidgetType() &&
- WidgetFactory::tqlayoutType( (TQWidget*)obj, tqlayout ) != WidgetFactory::NoLayout ) {
- WidgetFactory::LayoutType lay = WidgetFactory::tqlayoutType( (TQWidget*)obj, tqlayout );
+ WidgetFactory::layoutType( (TQWidget*)obj, tqlayout ) != WidgetFactory::NoLayout ) {
+ WidgetFactory::LayoutType lay = WidgetFactory::layoutType( (TQWidget*)obj, tqlayout );
switch ( lay ) {
case WidgetFactory::HBox:
closeTag = makeIndent( indent ) + "</hbox>";
@@ -1410,12 +1410,12 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
}
}
} else if ( ::tqqt_cast<TQLayout*>(w) ) {
- if ( MetaDataBase::spacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(w) ) ) ) ) > -1 )
+ if ( MetaDataBase::spacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) > -1 )
changed << "spacing";
- if ( MetaDataBase::margin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(w) ) ) ) ) > -1 )
+ if ( MetaDataBase::margin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) > -1 )
changed << "margin";
- if ( MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(w) ) ) ) ) != "Auto"
- && !MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(w) ) ) ) ).isEmpty() )
+ if ( MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) != "Auto"
+ && !MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ).isEmpty() )
changed << "resizeMode";
}
@@ -1429,8 +1429,8 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
if ( changed.isEmpty() )
return;
- bool inLayout = TQT_BASE_OBJECT(w) != TQT_BASE_OBJECT(formwindow->mainContainer()) && !copying && w->isWidgetType() && ( (TQWidget*)w )->tqparentWidget() &&
- WidgetFactory::tqlayoutType( ( (TQWidget*)w )->tqparentWidget() ) != WidgetFactory::NoLayout;
+ bool inLayout = TQT_BASE_OBJECT(w) != TQT_BASE_OBJECT(formwindow->mainContainer()) && !copying && w->isWidgetType() && ( (TQWidget*)w )->parentWidget() &&
+ WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout;
TQStrList lst = w->tqmetaObject()->propertyNames( !::tqqt_cast<Spacer*>(w) );
for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) {
@@ -1516,7 +1516,7 @@ void Resource::saveEnumProperty( TQObject *w, const TQString &name, TQVariant::T
void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant &value, TQVariant::Type t, TQTextStream &ts, int indent )
{
if ( name == "hAlign" || name =="vAlign" || name == "wordwrap" ||
- name == "tqlayoutMargin" || name =="tqlayoutSpacing" )
+ name == "layoutMargin" || name =="layoutSpacing" )
return;
int num;
uint unum;
@@ -1527,7 +1527,7 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
switch ( t ) {
case TQVariant::String:
if ( name == "resizeMode" ) {
- TQString resmod = MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(w) ) ) ) );
+ TQString resmod = MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) );
if ( !resmod.isNull() && resmod != "Auto" ) {
ts << makeIndent( indent ) << "<enum>";
ts << resmod;
@@ -1550,9 +1550,9 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
if ( ::tqqt_cast<TQLayout*>(w) ) {
num = -1;
if ( name == "spacing" )
- num = MetaDataBase::spacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(w) ) ) ) );
+ num = MetaDataBase::spacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) );
else if ( name == "margin" )
- num = MetaDataBase::margin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(w) ) ) ) );
+ num = MetaDataBase::margin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) );
if ( num != -1 )
ts << makeIndent( indent ) << "<number>" << TQString::number( num ) << "</number>" << endl;
} else {
@@ -1613,8 +1613,8 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
TQVariant v( value );
ts << makeIndent( indent ) << "<font>" << endl;
TQFont f( tqApp->font() );
- if ( w && w->isWidgetType() && ((TQWidget*)w)->tqparentWidget() )
- f = ((TQWidget*)w)->tqparentWidget()->font();
+ if ( w && w->isWidgetType() && ((TQWidget*)w)->parentWidget() )
+ f = ((TQWidget*)w)->parentWidget()->font();
TQFont f2( v.toFont() );
indent++;
if ( f.family() != f2.family() )
@@ -1774,9 +1774,9 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *tqparent, TQL
TQString className = e.attribute( "class", TQWIDGET_OBJECT_NAME_STRING );
#ifdef TQT_CONTAINER_CUSTOM_WIDGETS
- TQString tqparentClassName = WidgetFactory::classNameOf( tqparent );
+ TQString parentClassName = WidgetFactory::classNameOf( tqparent );
bool isPlugin =
- WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( tqparentClassName ) );
+ WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( parentClassName ) );
if ( isPlugin )
qWarning( "####### loading custom container widgets without page support not implemented!" );
// ### TODO loading for custom container widgets without pages
@@ -1799,7 +1799,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *tqparent, TQL
if ( ::tqqt_cast<TQMainWindow*>(w) )
w = ( (TQMainWindow*)w )->centralWidget();
if ( tqlayout ) {
- switch ( WidgetFactory::tqlayoutType( tqlayout ) ) {
+ switch ( WidgetFactory::layoutType( tqlayout ) ) {
case WidgetFactory::HBox:
( (TQHBoxLayout*)tqlayout )->addWidget( w );
break;
@@ -1893,12 +1893,12 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *tqparent, TQL
} else if ( isPlugin ) {
if ( attrib == "label" ) {
WidgetInterface *iface = 0;
- widgetManager()->queryInterface( tqparentClassName, &iface );
+ widgetManager()->queryInterface( parentClassName, &iface );
if ( iface ) {
TQWidgetContainerInterfacePrivate *iface2 = 0;
iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 );
if ( iface2 ) {
- iface2->insertPage( tqparentClassName,
+ iface2->insertPage( parentClassName,
(TQWidget*)tqparent, v.toString(), -1, w );
iface2->release();
}
@@ -2145,7 +2145,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
{
const TQMetaProperty *p = obj->tqmetaObject()->property( obj->tqmetaObject()->tqfindProperty( prop, TRUE ), TRUE );
- if ( !::tqqt_cast<TQLayout*>(obj) ) {// no tqlayouts in metadatabase... (RS)
+ if ( !::tqqt_cast<TQLayout*>(obj) ) {// no layouts in metadatabase... (RS)
if ( obj->inherits( "CustomWidget" ) ) {
MetaDataBase::CustomWidget *cw = ( (CustomWidget*)obj )->customWidget();
if ( cw && !cw->hasProperty( prop.latin1() ) && !p && prop != "toolTip" && prop != "whatsThis" )
@@ -2157,8 +2157,8 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
TQVariant defVarient;
if ( e.tagName() == "font" ) {
TQFont f( tqApp->font() );
- if ( obj->isWidgetType() && ( (TQWidget*)obj )->tqparentWidget() )
- f = ( (TQWidget*)obj )->tqparentWidget()->font();
+ if ( obj->isWidgetType() && ( (TQWidget*)obj )->parentWidget() )
+ f = ( (TQWidget*)obj )->parentWidget()->font();
defVarient = TQVariant( f );
}
@@ -2260,13 +2260,13 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
if ( ::tqqt_cast<TQLayout*>(obj) ) {
if ( prop == "spacing" ) {
- MetaDataBase::setSpacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(obj) ) ) ), v.toInt() );
+ MetaDataBase::setSpacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toInt() );
return;
} else if ( prop == "margin" ) {
- MetaDataBase::setMargin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(obj) ) ) ), v.toInt() );
+ MetaDataBase::setMargin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toInt() );
return;
} else if ( e.tagName() == "enum" && prop == "resizeMode" ) {
- MetaDataBase::setResizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(obj) ) ) ), v.toString() );
+ MetaDataBase::setResizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toString() );
return;
}
}
@@ -2891,8 +2891,8 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
if ( !( exportMacro = MetaDataBase::exportMacro( TQT_TQOBJECT(formwindow->mainContainer()) ) ).isEmpty() )
ts << makeIndent( indent ) << "<exportmacro>" << exportMacro << "</exportmacro>" << endl;
if ( formwindow ) {
- ts << makeIndent( indent ) << "<tqlayoutdefaults spacing=\"" << formwindow->tqlayoutDefaultSpacing()
- << "\" margin=\"" << formwindow->tqlayoutDefaultMargin() << "\"/>" << endl;
+ ts << makeIndent( indent ) << "<layoutdefaults spacing=\"" << formwindow->layoutDefaultSpacing()
+ << "\" margin=\"" << formwindow->layoutDefaultMargin() << "\"/>" << endl;
if ( formwindow->hasLayoutFunctions() ) {
TQString s = "";
TQString m = "";
@@ -2900,7 +2900,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
s = TQString( " spacing=\"%1\"" ).tqarg( formwindow->spacingFunction() );
if ( !formwindow->marginFunction().isEmpty() )
m = TQString( " margin=\"%1\"" ).tqarg( formwindow->marginFunction() );
- ts << makeIndent( indent ) << "<tqlayoutfunctions" << s << m << "/>" << endl;
+ ts << makeIndent( indent ) << "<layoutfunctions" << s << m << "/>" << endl;
}
}
}