diff options
Diffstat (limited to 'kommander/editor/hierarchyview.cpp')
-rw-r--r-- | kommander/editor/hierarchyview.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/kommander/editor/hierarchyview.cpp b/kommander/editor/hierarchyview.cpp index c11a365c..57dc817c 100644 --- a/kommander/editor/hierarchyview.cpp +++ b/kommander/editor/hierarchyview.cpp @@ -255,11 +255,11 @@ void HierarchyList::objectClicked( TQListViewItem *i ) } if ( !formWindow->widgets()->find( w ) ) { - if ( w->parent() && w->parent()->inherits( "TQWidgetStack" ) && + if ( w->parent() && w->parent()->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) && w->parent()->parent() && - ( w->parent()->parent()->inherits( "TQTabWidget" ) || - w->parent()->parent()->inherits( "TQWizard" ) ) ) { - if ( w->parent()->parent()->inherits( "TQTabWidget" ) ) + ( w->parent()->parent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) || + w->parent()->parent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) ) { + if ( w->parent()->parent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) ( (TQTabWidget*)w->parent()->parent() )->showPage( w ); else ( (QDesignerWizard*)w->parent()->parent() )->setCurrentPage( ( (QDesignerWizard*)w->parent()->parent() )->pageNum( w ) ); @@ -356,7 +356,7 @@ void HierarchyList::setOpen( TQListViewItem *i, bool b ) void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) { bool fakeMainWindow = false; - if ( o && o->inherits( "TQMainWindow" ) ) { + if ( o && o->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) { TQObject *cw = ( (TQMainWindow*)o )->centralWidget(); if ( cw ) { o = cw; @@ -365,7 +365,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) } TQListViewItem *item = 0; TQString className = WidgetFactory::classNameOf( o ); - if ( o->inherits( "QLayoutWidget" ) ) { + if ( o->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) ) { switch ( WidgetFactory::layoutType( (TQWidget*)o ) ) { case WidgetFactory::HBox: className = "HBox"; @@ -387,11 +387,11 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) #endif TQString name = o->name(); - if ( o->parent() && o->parent()->inherits( "TQWidgetStack" ) && + if ( o->parent() && o->parent()->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) && o->parent()->parent() ) { - if ( o->parent()->parent()->inherits( "TQTabWidget" ) ) + if ( o->parent()->parent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) name = ( (TQTabWidget*)o->parent()->parent() )->tabLabel( (TQWidget*)o ); - else if ( o->parent()->parent()->inherits( "TQWizard" ) ) + else if ( o->parent()->parent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) name = ( (TQWizard*)o->parent()->parent() )->title( (TQWidget*)o ); } @@ -403,7 +403,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) if ( fakeMainWindow ) { name = o->parent()->name(); - className = "TQMainWindow"; + className = TQMAINWINDOW_OBJECT_NAME_STRING; } if ( !parent ) @@ -429,16 +429,16 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) continue; if ( !formWindow->widgets()->find( (TQWidget*)it.current() ) ) { if ( it.current()->parent() && - ( it.current()->parent()->inherits( "TQTabWidget" ) || - it.current()->parent()->inherits( "TQWizard" ) ) && - it.current()->inherits( "TQWidgetStack" ) ) { + ( it.current()->parent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) || + it.current()->parent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) && + it.current()->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) ) { TQObject *obj = it.current(); - TQObjectList *l2 = obj->queryList( "TQWidget", 0, true, false ); + TQObjectList *l2 = obj->queryList( TQWIDGET_OBJECT_NAME_STRING, 0, true, false ); QDesignerTabWidget *tw = 0; QDesignerWizard *dw = 0; - if ( it.current()->parent()->inherits( "TQTabWidget" ) ) + if ( it.current()->parent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) tw = (QDesignerTabWidget*)it.current()->parent(); - if ( it.current()->parent()->inherits( "TQWizard" ) ) + if ( it.current()->parent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) dw = (QDesignerWizard*)it.current()->parent(); TQWidgetStack *stack = (TQWidgetStack*)obj; for ( obj = l2->last(); obj; obj = l2->prev() ) { @@ -495,7 +495,7 @@ void HierarchyList::showRMBMenu( TQListViewItem *i, const TQPoint & p ) return; if ( w->isVisibleTo( formWindow ) ) { - if ( !w->inherits( "TQTabWidget" ) && !w->inherits( "TQWizard" ) ) { + if ( !w->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) && !w->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) { if ( !normalMenu ) normalMenu = formWindow->mainWindow()->setupNormalHierarchyMenu( this ); normalMenu->popup( p ); @@ -514,13 +514,13 @@ void HierarchyList::addTabPage() TQWidget *w = current(); if ( !w ) return; - if ( w->inherits( "TQTabWidget" ) ) { + if ( w->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) { 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 ( w->inherits( "TQWizard" ) ) { + } else if ( w->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) { TQWizard *wiz = (TQWizard*)formWindow->mainContainer(); AddWizardPageCommand *cmd = new AddWizardPageCommand( i18n("Add Page to %1" ).arg( wiz->name() ), formWindow, wiz, "Page" ); @@ -534,7 +534,7 @@ void HierarchyList::removeTabPage() TQWidget *w = current(); if ( !w ) return; - if ( w->inherits( "TQTabWidget" ) ) { + if ( w->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) { TQTabWidget *tw = (TQTabWidget*)w; if ( tw->currentPage() ) { QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw; @@ -544,7 +544,7 @@ void HierarchyList::removeTabPage() formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); } - } else if ( w->inherits( "TQWizard" ) ) { + } else if ( w->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) { TQWizard *wiz = (TQWizard*)formWindow->mainContainer(); if ( wiz->currentPage() ) { QDesignerWizard *dw = (QDesignerWizard*)wiz; @@ -677,7 +677,7 @@ void HierarchyView::widgetsRemoved( const TQWidgetList & ) void HierarchyView::namePropertyChanged( TQWidget *w, const TQVariant & ) { TQWidget *w2 = w; - if ( w->inherits( "TQMainWindow" ) ) + if ( w->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) w2 = ( (TQMainWindow*)w )->centralWidget(); listview->changeNameOf( w2, w->name() ); } |