summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/resource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdevdesigner/designer/resource.cpp')
-rw-r--r--kdevdesigner/designer/resource.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/kdevdesigner/designer/resource.cpp b/kdevdesigner/designer/resource.cpp
index 174edc63..5f89b7cf 100644
--- a/kdevdesigner/designer/resource.cpp
+++ b/kdevdesigner/designer/resource.cpp
@@ -832,7 +832,7 @@ void Resource::paste( const TQString &cb, TQWidget *tqparent )
formwindow->commandHistory()->addCommand( cmd );
}
-void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStream &ts, int indent )
+void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStream &ts, int indent )
{
if ( obj && obj->isWidgetType() && ( (TQWidget*)obj )->isHidden() )
return;
@@ -851,7 +851,7 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre
TQString attributes;
if ( grid ) {
- TQDesignerGridLayout::Item item = grid->items[ (TQWidget*)obj ];
+ QDesignerGridLayout::Item item = grid->items[ (TQWidget*)obj ];
attributes += TQString(" row=\"") + TQString::number(item.row) + "\"";
attributes += TQString(" column=\"") + TQString::number(item.column) + "\"";
if ( item.rowspan * item.colspan != 1 ) {
@@ -877,13 +877,13 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre
return;
}
- TQDesignerWidgetStack* ws = 0;
+ QDesignerWidgetStack* ws = 0;
if ( ::tqqt_cast<TQTabWidget*>(obj) ) {
TQTabWidget* tw = (TQTabWidget*) obj;
TQObjectList* tmpl = tw->queryList( TQWIDGETSTACK_OBJECT_NAME_STRING );
TQWidgetStack *ws = (TQWidgetStack*)tmpl->first();
- TQTabBar *tb = ( (TQDesignerTabWidget*)obj )->tabBar();
+ TQTabBar *tb = ( (QDesignerTabWidget*)obj )->tabBar();
for ( int i = 0; i < tb->count(); ++i ) {
TQTab *t = tb->tabAt( i );
if ( !t )
@@ -911,7 +911,7 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre
ts << makeIndent( indent ) << "</widget>" << endl;
}
delete tmpl;
- } else if ( (ws = ::tqqt_cast<TQDesignerWidgetStack*>(obj)) != 0 ) {
+ } else if ( (ws = ::tqqt_cast<QDesignerWidgetStack*>(obj)) != 0 ) {
for ( int i = 0; i < ws->count(); ++i ) {
TQWidget *w = ws->page( i );
if ( !w )
@@ -1349,7 +1349,7 @@ void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent )
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;
- TQDesignerGridLayout* grid = 0;
+ QDesignerGridLayout* grid = 0;
if ( !::tqqt_cast<TQSplitter*>(obj) &&
WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( obj ) ) ) &&
obj->isWidgetType() &&
@@ -1370,7 +1370,7 @@ void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent )
closeTag = makeIndent( indent ) + "</grid>";
ts << makeIndent( indent ) << "<grid>" << endl;
++indent;
- grid = (TQDesignerGridLayout*) tqlayout;
+ grid = (QDesignerGridLayout*) tqlayout;
break;
default:
break;
@@ -1807,7 +1807,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *tqparent, TQL
( (TQVBoxLayout*)tqlayout )->addWidget( w );
break;
case WidgetFactory::Grid:
- ( (TQDesignerGridLayout*)tqlayout )->addMultiCellWidget( w, row, row + rowspan - 1,
+ ( (QDesignerGridLayout*)tqlayout )->addMultiCellWidget( w, row, row + rowspan - 1,
col, col + colspan - 1 );
break;
default:
@@ -1882,7 +1882,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *tqparent, TQL
( (TQTabWidget*)tqparent )->insertTab( w, v.toString() );
} else if ( ::tqqt_cast<TQWidgetStack*>(tqparent) ) {
if ( attrib == "id" )
- ( (TQDesignerWidgetStack*)tqparent )->insertPage( w, v.toInt() );
+ ( (QDesignerWidgetStack*)tqparent )->insertPage( w, v.toInt() );
} else if ( ::tqqt_cast<TQToolBox*>(tqparent) ) {
if ( attrib == "label" )
( (TQToolBox*)tqparent )->addItem( w, v.toString() );
@@ -2132,7 +2132,7 @@ TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *tqparent, TQL
if ( ::tqqt_cast<TQBoxLayout*>(tqlayout) )
( (TQBoxLayout*)tqlayout )->addWidget( spacer, 0, spacer->tqalignment() );
else
- ( (TQDesignerGridLayout*)tqlayout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1,
+ ( (QDesignerGridLayout*)tqlayout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1,
spacer->tqalignment() );
}
return spacer;
@@ -3005,7 +3005,7 @@ void Resource::loadChildAction( TQObject *tqparent, const TQDomElement &e )
TQDomElement n = e;
TQAction *a = 0;
if ( n.tagName() == "action" ) {
- a = new TQDesignerAction( tqparent );
+ a = new QDesignerAction( tqparent );
MetaDataBase::addEntry( a );
TQDomElement n2 = n.firstChild().toElement();
bool hasMenuText = FALSE;
@@ -3025,7 +3025,7 @@ void Resource::loadChildAction( TQObject *tqparent, const TQDomElement &e )
if ( !::tqqt_cast<TQAction*>(tqparent) )
formwindow->actionList().append( a );
} else if ( n.tagName() == "actiongroup" ) {
- a = new TQDesignerActionGroup( tqparent );
+ a = new QDesignerActionGroup( tqparent );
MetaDataBase::addEntry( a );
TQDomElement n2 = n.firstChild().toElement();
bool hasMenuText = FALSE;
@@ -3079,13 +3079,13 @@ void Resource::saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent )
ts << makeIndent( indent ) << "<toolbar dock=\"" << i << "\">" << endl;
indent++;
saveObjectProperties( TQT_TQOBJECT(tb), ts, indent );
- TQPtrList<TQAction> actionList = ( (TQDesignerToolBar*)tb )->insertedActions();
+ TQPtrList<TQAction> actionList = ( (QDesignerToolBar*)tb )->insertedActions();
for ( TQAction *a = actionList.first(); a; a = actionList.next() ) {
- if ( ::tqqt_cast<TQSeparatorAction*>(a) ) {
+ if ( ::tqqt_cast<QSeparatorAction*>(a) ) {
ts << makeIndent( indent ) << "<separator/>" << endl;
} else {
- if ( ::tqqt_cast<TQDesignerAction*>(a) && !( (TQDesignerAction*)a )->supportsMenu() ) {
- TQWidget *w = ( (TQDesignerAction*)a )->widget();
+ if ( ::tqqt_cast<QDesignerAction*>(a) && !( (QDesignerAction*)a )->supportsMenu() ) {
+ TQWidget *w = ( (QDesignerAction*)a )->widget();
ts << makeIndent( indent ) << "<widget class=\""
<< WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) << "\">" << endl;
indent++;
@@ -3143,11 +3143,11 @@ void Resource::savePopupMenu( PopupMenuEditor *pm, TQMainWindow *mw, TQTextStrea
{
for ( PopupMenuEditorItem *i = pm->items()->first(); i; i = pm->items()->next() ) {
TQAction *a = i->action();
- if ( ::tqqt_cast<TQSeparatorAction*>(a) )
+ if ( ::tqqt_cast<QSeparatorAction*>(a) )
ts << makeIndent( indent ) << "<separator/>" << endl;
- else if ( ::tqqt_cast<TQDesignerAction*>(a) )
+ else if ( ::tqqt_cast<QDesignerAction*>(a) )
ts << makeIndent( indent ) << "<action name=\"" << a->name() << "\"/>" << endl;
- else if ( ::tqqt_cast<TQDesignerActionGroup*>(a) )
+ else if ( ::tqqt_cast<QDesignerActionGroup*>(a) )
ts << makeIndent( indent ) << "<actiongroup name=\"" << a->name() << "\"/>" << endl;
PopupMenuEditor *s = i->subMenu();
if ( s && s->count() ) {
@@ -3168,11 +3168,11 @@ void Resource::loadToolBars( const TQDomElement &e )
{
TQDomElement n = e.firstChild().toElement();
TQMainWindow *mw = ( (TQMainWindow*)formwindow->mainContainer() );
- TQDesignerToolBar *tb = 0;
+ QDesignerToolBar *tb = 0;
while ( !n.isNull() ) {
if ( n.tagName() == "toolbar" ) {
TQt::Dock dock = (TQt::Dock)n.attribute( "dock" ).toInt();
- tb = new TQDesignerToolBar( mw, dock );
+ tb = new QDesignerToolBar( mw, dock );
TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
if ( n2.tagName() == "action" ) {
@@ -3182,12 +3182,12 @@ void Resource::loadToolBars( const TQDomElement &e )
tb->addAction( a );
}
} else if ( n2.tagName() == "separator" ) {
- TQAction *a = new TQSeparatorAction( 0 );
+ TQAction *a = new QSeparatorAction( 0 );
a->addTo( tb );
tb->addAction( a );
} else if ( n2.tagName() == "widget" ) {
TQWidget *w = (TQWidget*)createObject( n2, tb );
- TQDesignerAction *a = new TQDesignerAction( w, TQT_TQOBJECT(tb) );
+ QDesignerAction *a = new QDesignerAction( w, TQT_TQOBJECT(tb) );
a->addTo( tb );
tb->addAction( a );
tb->installEventFilters( w );
@@ -3244,7 +3244,7 @@ void Resource::loadPopupMenu( PopupMenuEditor *p, const TQDomElement &e )
loadPopupMenu( i->subMenu(), n );
}
} else if ( n.tagName() == "separator" ) {
- a = new TQSeparatorAction( 0 );
+ a = new QSeparatorAction( 0 );
p->insert( a );
}
n = n.nextSibling().toElement();