summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/hierarchyview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdevdesigner/designer/hierarchyview.cpp')
-rw-r--r--kdevdesigner/designer/hierarchyview.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/kdevdesigner/designer/hierarchyview.cpp b/kdevdesigner/designer/hierarchyview.cpp
index 7090a355..11531834 100644
--- a/kdevdesigner/designer/hierarchyview.cpp
+++ b/kdevdesigner/designer/hierarchyview.cpp
@@ -258,12 +258,12 @@ TQObject *HierarchyList::handleObjectClick( TQListViewItem *i )
if ( o->isWidgetType() ) {
TQWidget *w = (TQWidget*)o;
if ( !formWindow->widgets()->find( w ) ) {
- if ( ::tqqt_cast<TQWidgetStack*>(w->parent()) ) {
- if (::tqqt_cast<TQTabWidget*>(w->parent()->parent()) ) {
+ if ( ::tqt_cast<TQWidgetStack*>(w->parent()) ) {
+ if (::tqt_cast<TQTabWidget*>(w->parent()->parent()) ) {
((TQTabWidget*)w->parent()->parent())->showPage( w );
o = TQT_TQOBJECT((TQWidget*)w->parent()->parent());
formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) );
- } else if ( ::tqqt_cast<TQWizard*>(w->parent()->parent()) ) {
+ } else if ( ::tqt_cast<TQWizard*>(w->parent()->parent()) ) {
((QDesignerWizard*)w->parent()->parent())->
setCurrentPage( ( (QDesignerWizard*)w->parent()->parent() )->pageNum( w ) );
o = TQT_TQOBJECT((TQWidget*)w->parent()->parent());
@@ -273,15 +273,15 @@ TQObject *HierarchyList::handleObjectClick( TQListViewItem *i )
if ( (TQWidgetStack*)w->parent()->isA( "QDesignerWidgetStack" ) )
( (QDesignerWidgetStack*)w->parent() )->updateButtons();
}
- } else if ( ::tqqt_cast<TQMenuBar*>(w) || ::tqqt_cast<TQDockWindow*>(w) ) {
+ } else if ( ::tqt_cast<TQMenuBar*>(w) || ::tqt_cast<TQDockWindow*>(w) ) {
formWindow->setActiveObject( TQT_TQOBJECT(w) );
- } else if ( ::tqqt_cast<TQPopupMenu*>(w) ) {
+ } else if ( ::tqt_cast<TQPopupMenu*>(w) ) {
return 0; // ### we could try to find our menu bar and change the currentMenu to our index
} else {
return 0;
}
}
- } else if ( ::tqqt_cast<TQAction*>(o) ) {
+ } else if ( ::tqt_cast<TQAction*>(o) ) {
MainWindow::self->actioneditor()->setCurrentAction( (TQAction*)o );
deselect = TRUE;
}
@@ -402,7 +402,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
if ( TQString( o->name() ).startsWith( "qt_dead_widget_" ) )
return;
bool fakeMainWindow = FALSE;
- if ( ::tqqt_cast<TQMainWindow*>(o) ) {
+ if ( ::tqt_cast<TQMainWindow*>(o) ) {
TQObject *cw = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget());
if ( cw ) {
o = cw;
@@ -411,7 +411,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
}
TQListViewItem *item = 0;
TQString className = WidgetFactory::classNameOf( o );
- if ( ::tqqt_cast<TQLayoutWidget*>(o) ) {
+ if ( ::tqt_cast<TQLayoutWidget*>(o) ) {
switch ( WidgetFactory::layoutType( (TQWidget*)o ) ) {
case WidgetFactory::HBox:
className = "HBox";
@@ -433,16 +433,16 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
#endif
TQString name = o->name();
- if ( ::tqqt_cast<TQWidgetStack*>(o->parent()) ) {
- if ( ::tqqt_cast<TQTabWidget*>(o->parent()->parent()) )
+ if ( ::tqt_cast<TQWidgetStack*>(o->parent()) ) {
+ if ( ::tqt_cast<TQTabWidget*>(o->parent()->parent()) )
name = ( (TQTabWidget*)o->parent()->parent() )->tabLabel( (TQWidget*)o );
- else if ( ::tqqt_cast<TQWizard*>(o->parent()->parent()) )
+ else if ( ::tqt_cast<TQWizard*>(o->parent()->parent()) )
name = ( (TQWizard*)o->parent()->parent() )->title( (TQWidget*)o );
}
TQToolBox *tb;
if ( o->parent() && o->parent()->parent() &&
- (tb = ::tqqt_cast<TQToolBox*>(o->parent()->parent()->parent())) )
+ (tb = ::tqt_cast<TQToolBox*>(o->parent()->parent()->parent())) )
name = tb->itemLabel( tb->indexOf((TQWidget*)o) );
if ( fakeMainWindow ) {
@@ -457,18 +457,18 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
item->setOpen( TRUE );
if ( !parent )
item->setPixmap( 0, DesignerFormPix );
- else if ( ::tqqt_cast<TQLayoutWidget*>(o) )
+ else if ( ::tqt_cast<TQLayoutWidget*>(o) )
item->setPixmap( 0, DesignerLayoutPix );
else
item->setPixmap( 0, WidgetDatabase::iconSet(
WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( o ) ) ).
pixmap( TQIconSet::Small, TQIconSet::Normal ) );
- if ( ::tqqt_cast<TQAction*>(o) )
+ if ( ::tqt_cast<TQAction*>(o) )
item->setPixmap( 0, ( (TQAction*)o )->iconSet().pixmap() );
( (HierarchyItem*)item )->setObject( o );
TQObjectList l = o->childrenListObject();
- if ( ::tqqt_cast<QDesignerToolBar*>(o) )
+ if ( ::tqt_cast<QDesignerToolBar*>(o) )
l.clear();
if ( !l.isEmpty() ) {
TQObjectListIt it( l );
@@ -478,13 +478,13 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
( (TQWidget*)it.current() )->isHidden() )
continue;
if ( !formWindow->widgets()->find( (TQWidget*)it.current() ) ) {
- if ( ::tqqt_cast<TQWidgetStack*>(it.current()->parent()) ||
- ::tqqt_cast<TQWidgetStack*>(it.current()) ) {
+ if ( ::tqt_cast<TQWidgetStack*>(it.current()->parent()) ||
+ ::tqt_cast<TQWidgetStack*>(it.current()) ) {
TQObject *obj = it.current();
- QDesignerTabWidget *tw = ::tqqt_cast<QDesignerTabWidget*>(it.current()->parent());
- QDesignerWizard *dw = ::tqqt_cast<QDesignerWizard*>(it.current()->parent());
+ QDesignerTabWidget *tw = ::tqt_cast<QDesignerTabWidget*>(it.current()->parent());
+ QDesignerWizard *dw = ::tqt_cast<QDesignerWizard*>(it.current()->parent());
TQWidgetStack *stack = 0;
- if ( dw || tw || ::tqqt_cast<TQWidgetStack*>(obj) )
+ if ( dw || tw || ::tqt_cast<TQWidgetStack*>(obj) )
stack = (TQWidgetStack*)obj;
else
stack = (TQWidgetStack*)obj->parent();
@@ -505,8 +505,8 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
insertObject( obj, item );
}
delete l2;
- } else if ( ::tqqt_cast<TQToolBox*>(it.current()->parent()) ) {
- if ( !::tqqt_cast<TQScrollView*>(it.current()) )
+ } else if ( ::tqt_cast<TQToolBox*>(it.current()->parent()) ) {
+ if ( !::tqt_cast<TQScrollView*>(it.current()) )
continue;
TQToolBox *tb = (TQToolBox*)it.current()->parent();
for ( int i = tb->count() - 1; i >= 0; --i )
@@ -528,9 +528,9 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
for ( obj = l->first(); obj; obj = l->next() )
insertObject( obj, item );
delete l;
- } else if ( ::tqqt_cast<QDesignerToolBar*>(o) || ::tqqt_cast<PopupMenuEditor*>(o) ) {
+ } else if ( ::tqt_cast<QDesignerToolBar*>(o) || ::tqt_cast<PopupMenuEditor*>(o) ) {
TQPtrList<TQAction> actions;
- if ( ::tqqt_cast<QDesignerToolBar*>(o) )
+ if ( ::tqt_cast<QDesignerToolBar*>(o) )
actions = ( (QDesignerToolBar*)o )->insertedActions();
else
( (PopupMenuEditor*)o )->insertedActions( actions );
@@ -539,31 +539,31 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
it.toLast();
while ( it.current() ) {
TQAction *a = it.current();
- if ( ::tqqt_cast<QDesignerAction*>(a) ) {
+ if ( ::tqt_cast<QDesignerAction*>(a) ) {
QDesignerAction *da = (QDesignerAction*)a;
if ( da->supportsMenu() )
insertObject( da, item );
else
insertObject( TQT_TQOBJECT(da->widget()), item );
- } else if ( ::tqqt_cast<QDesignerActionGroup*>(a) ) {
+ } else if ( ::tqt_cast<QDesignerActionGroup*>(a) ) {
insertObject( a, item );
}
--it;
}
- } else if ( ::tqqt_cast<QDesignerActionGroup*>(o) && !o->childrenListObject().isEmpty() ) {
+ } else if ( ::tqt_cast<QDesignerActionGroup*>(o) && !o->childrenListObject().isEmpty() ) {
TQObjectList l = o->childrenListObject();
for ( TQObject *obj = l.last(); obj; obj = l.prev() ) {
- if ( ::tqqt_cast<QDesignerAction*>(obj) ) {
+ if ( ::tqt_cast<QDesignerAction*>(obj) ) {
QDesignerAction *da = (QDesignerAction*)obj;
if ( da->supportsMenu() )
insertObject( da, item );
else
insertObject( TQT_TQOBJECT(da->widget()), item );
- } else if ( ::tqqt_cast<QDesignerActionGroup*>(obj) ) {
+ } else if ( ::tqt_cast<QDesignerActionGroup*>(obj) ) {
insertObject( obj, item );
}
}
- } else if ( ::tqqt_cast<MenuBarEditor*>(o) ) {
+ } else if ( ::tqt_cast<MenuBarEditor*>(o) ) {
MenuBarEditor *mb = (MenuBarEditor*)o;
for ( int i = mb->count() -1; i >= 0; --i ) {
MenuBarEditorItem *md = mb->item( i );
@@ -604,7 +604,7 @@ void HierarchyList::showRMBMenu( TQListViewItem *i, const TQPoint & p )
TQWidget *w = (TQWidget*)o;
if ( w->isVisibleTo( formWindow ) ) {
- if ( !::tqqt_cast<TQTabWidget*>(w) && !::tqqt_cast<TQWizard*>(w) ) {
+ if ( !::tqt_cast<TQTabWidget*>(w) && !::tqt_cast<TQWizard*>(w) ) {
if ( !normalMenu )
normalMenu = formWindow->mainWindow()->setupNormalHierarchyMenu( this );
normalMenu->popup( p );
@@ -625,14 +625,14 @@ void HierarchyList::addTabPage()
if ( !o || !o->isWidgetType() )
return;
TQWidget *w = (TQWidget*)o;
- if ( ::tqqt_cast<TQTabWidget*>(w) ) {
+ if ( ::tqt_cast<TQTabWidget*>(w) ) {
TQTabWidget *tw = (TQTabWidget*)w;
AddTabPageCommand *cmd = new AddTabPageCommand( i18n( "Add Page to %1" ).
arg( tw->name() ), formWindow,
tw, "Tab" );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
- } else if ( ::tqqt_cast<TQWizard*>(w) ) {
+ } else if ( ::tqt_cast<TQWizard*>(w) ) {
TQWizard *wiz = (TQWizard*)formWindow->mainContainer();
AddWizardPageCommand *cmd = new AddWizardPageCommand( i18n( "Add Page to %1" ).
arg( wiz->name() ), formWindow,
@@ -648,7 +648,7 @@ void HierarchyList::removeTabPage()
if ( !o || !o->isWidgetType() )
return;
TQWidget *w = (TQWidget*)o;
- if ( ::tqqt_cast<TQTabWidget*>(w) ) {
+ if ( ::tqt_cast<TQTabWidget*>(w) ) {
TQTabWidget *tw = (TQTabWidget*)w;
if ( tw->currentPage() ) {
QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw;
@@ -659,7 +659,7 @@ void HierarchyList::removeTabPage()
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
}
- } else if ( ::tqqt_cast<TQWizard*>(w) ) {
+ } else if ( ::tqt_cast<TQWizard*>(w) ) {
TQWizard *wiz = (TQWizard*)formWindow->mainContainer();
if ( wiz->currentPage() ) {
QDesignerWizard *dw = (QDesignerWizard*)wiz;
@@ -1445,7 +1445,7 @@ void HierarchyView::widgetsRemoved( const TQWidgetList & )
void HierarchyView::namePropertyChanged( TQWidget *w, const TQVariant & )
{
TQWidget *w2 = w;
- if ( ::tqqt_cast<TQMainWindow*>(w) )
+ if ( ::tqt_cast<TQMainWindow*>(w) )
w2 = ( (TQMainWindow*)w )->centralWidget();
listview->changeNameOf( TQT_TQOBJECT(w2), w->name() );
}