diff options
Diffstat (limited to 'kdevdesigner/designer/command.cpp')
-rw-r--r-- | kdevdesigner/designer/command.cpp | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/kdevdesigner/designer/command.cpp b/kdevdesigner/designer/command.cpp index 14016cbc..f461a877 100644 --- a/kdevdesigner/designer/command.cpp +++ b/kdevdesigner/designer/command.cpp @@ -850,7 +850,7 @@ AddTabPageCommand::AddTabPageCommand( const TQString &n, FormWindow *fw, TQTabWidget *tw, const TQString &label ) : Command( n, fw ), tabWidget( tw ), tabLabel( label ) { - tabPage = new TQDesignerWidget( formWindow(), tabWidget, "TabPage" ); + tabPage = new QDesignerWidget( formWindow(), tabWidget, "TabPage" ); tabPage->hide(); index = -1; MetaDataBase::addEntry( TQT_TQOBJECT(tabPage) ); @@ -859,7 +859,7 @@ AddTabPageCommand::AddTabPageCommand( const TQString &n, FormWindow *fw, void AddTabPageCommand::execute() { if ( index == -1 ) - index = ( (TQDesignerTabWidget*)tabWidget )->count(); + index = ( (QDesignerTabWidget*)tabWidget )->count(); tabWidget->insertTab( tabPage, tabLabel, index ); tabWidget->showPage( tabPage ); formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); @@ -886,18 +886,18 @@ MoveTabPageCommand::MoveTabPageCommand( const TQString &n, FormWindow *fw, void MoveTabPageCommand::execute() { - ((TQDesignerTabWidget*)tabWidget )->removePage( tabPage ); - ((TQDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, newIndex ); - ((TQDesignerTabWidget*)tabWidget )->showPage( tabPage ); + ((QDesignerTabWidget*)tabWidget )->removePage( tabPage ); + ((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, newIndex ); + ((QDesignerTabWidget*)tabWidget )->showPage( tabPage ); formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); } void MoveTabPageCommand::unexecute() { - ((TQDesignerTabWidget*)tabWidget )->removePage( tabPage ); - ((TQDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, oldIndex ); - ((TQDesignerTabWidget*)tabWidget )->showPage( tabPage ); + ((QDesignerTabWidget*)tabWidget )->removePage( tabPage ); + ((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, oldIndex ); + ((QDesignerTabWidget*)tabWidget )->showPage( tabPage ); formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); } @@ -908,8 +908,8 @@ DeleteTabPageCommand::DeleteTabPageCommand( const TQString &n, FormWindow *fw, TQTabWidget *tw, TQWidget *page ) : Command( n, fw ), tabWidget( tw ), tabPage( page ) { - tabLabel = ( (TQDesignerTabWidget*)tabWidget )->pageTitle(); - index = ( (TQDesignerTabWidget*)tabWidget )->currentPage(); + tabLabel = ( (QDesignerTabWidget*)tabWidget )->pageTitle(); + index = ( (QDesignerTabWidget*)tabWidget )->currentPage(); } void DeleteTabPageCommand::execute() @@ -931,10 +931,10 @@ void DeleteTabPageCommand::unexecute() // ------------------------------------------------------------ AddWidgetStackPageCommand::AddWidgetStackPageCommand( const TQString &n, FormWindow *fw, - TQDesignerWidgetStack *ws ) + QDesignerWidgetStack *ws ) : Command( n, fw ), widgetStack( ws ) { - stackPage = new TQDesignerWidget( formWindow(), widgetStack, "WStackPage" ); + stackPage = new QDesignerWidget( formWindow(), widgetStack, "WStackPage" ); stackPage->hide(); index = -1; MetaDataBase::addEntry( TQT_TQOBJECT(stackPage) ); @@ -956,7 +956,7 @@ void AddWidgetStackPageCommand::unexecute() } DeleteWidgetStackPageCommand::DeleteWidgetStackPageCommand( const TQString &n, FormWindow *fw, - TQDesignerWidgetStack *ws, TQWidget *page ) + QDesignerWidgetStack *ws, TQWidget *page ) : Command( n, fw), widgetStack( ws ), stackPage( page ) { index = -1; @@ -984,7 +984,7 @@ AddWizardPageCommand::AddWizardPageCommand( const TQString &n, FormWindow *fw, TQWizard *w, const TQString &label, int i, bool s ) : Command( n, fw ), wizard( w ), pageLabel( label ) { - page = new TQDesignerWidget( formWindow(), wizard, "WizardPage" ); + page = new QDesignerWidget( formWindow(), wizard, "WizardPage" ); page->hide(); index = i; show = s; @@ -997,7 +997,7 @@ void AddWizardPageCommand::execute() index = wizard->pageCount(); wizard->insertPage( page, pageLabel, index ); if ( show ) - ( (TQDesignerWizard*)wizard )->setCurrentPage( ( (TQDesignerWizard*)wizard )->pageNum( page ) ); + ( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) ); formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); } @@ -1033,7 +1033,7 @@ void DeleteWizardPageCommand::unexecute() { wizard->insertPage( page, pageLabel, index ); if ( show ) - ( (TQDesignerWizard*)wizard )->setCurrentPage( ( (TQDesignerWizard*)wizard )->pageNum( page ) ); + ( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) ); formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); } @@ -1857,18 +1857,18 @@ void AddActionToToolBarCommand::execute() { action->addTo( toolBar ); - if ( ::tqqt_cast<TQDesignerAction*>(action) ) { - TQString s = ( (TQDesignerAction*)action )->widget()->name(); + if ( ::tqqt_cast<QDesignerAction*>(action) ) { + TQString s = ( (QDesignerAction*)action )->widget()->name(); if ( s.startsWith( "qt_dead_widget_" ) ) { s.remove( 0, TQString( "qt_dead_widget_" ).length() ); - ( (TQDesignerAction*)action )->widget()->setName( s ); + ( (QDesignerAction*)action )->widget()->setName( s ); } - toolBar->insertAction( ( (TQDesignerAction*)action )->widget(), action ); - ( (TQDesignerAction*)action )->widget()->installEventFilter( toolBar ); - } else if ( ::tqqt_cast<TQDesignerActionGroup*>(action) ) { - if ( ( (TQDesignerActionGroup*)action )->usesDropDown() ) { - toolBar->insertAction( ( (TQDesignerActionGroup*)action )->widget(), action ); - ( (TQDesignerActionGroup*)action )->widget()->installEventFilter( toolBar ); + toolBar->insertAction( ( (QDesignerAction*)action )->widget(), action ); + ( (QDesignerAction*)action )->widget()->installEventFilter( toolBar ); + } else if ( ::tqqt_cast<QDesignerActionGroup*>(action) ) { + if ( ( (QDesignerActionGroup*)action )->usesDropDown() ) { + toolBar->insertAction( ( (QDesignerActionGroup*)action )->widget(), action ); + ( (QDesignerActionGroup*)action )->widget()->installEventFilter( toolBar ); } } else if ( ::tqqt_cast<QSeparatorAction*>(action) ) { toolBar->insertAction( ( (QSeparatorAction*)action )->widget(), action ); @@ -1892,8 +1892,8 @@ void AddActionToToolBarCommand::execute() if ( !::tqqt_cast<TQAction*>(o) ) continue; // ### fix it for nested actiongroups - if ( ::tqqt_cast<TQDesignerAction*>(o) ) { - TQDesignerAction *ac = (TQDesignerAction*)o; + if ( ::tqqt_cast<QDesignerAction*>(o) ) { + QDesignerAction *ac = (QDesignerAction*)o; toolBar->insertAction( ac->widget(), ac ); ac->widget()->installEventFilter( toolBar ); if ( index == -1 ) @@ -1912,10 +1912,10 @@ void AddActionToToolBarCommand::execute() void AddActionToToolBarCommand::unexecute() { - if ( ::tqqt_cast<TQDesignerAction*>(action) ) { - TQString s = ( (TQDesignerAction*)action )->widget()->name(); + if ( ::tqqt_cast<QDesignerAction*>(action) ) { + TQString s = ( (QDesignerAction*)action )->widget()->name(); s.prepend( "qt_dead_widget_" ); - ( (TQDesignerAction*)action )->widget()->setName( s ); + ( (QDesignerAction*)action )->widget()->setName( s ); } toolBar->removeAction( action ); @@ -1932,7 +1932,7 @@ void AddActionToToolBarCommand::unexecute() ++it; if ( !::tqqt_cast<TQAction*>(o) ) continue; - if ( ::tqqt_cast<TQDesignerAction*>(o) ) { + if ( ::tqqt_cast<QDesignerAction*>(o) ) { o->removeEventFilter( toolBar ); toolBar->removeAction( (TQAction*)o ); } @@ -2426,7 +2426,7 @@ AddToolBoxPageCommand::AddToolBoxPageCommand( const TQString &n, FormWindow *fw, TQToolBox *tw, const TQString &label ) : Command( n, fw ), toolBox( tw ), toolBoxLabel( label ) { - toolBoxPage = new TQDesignerWidget( formWindow(), toolBox, "page" ); + toolBoxPage = new QDesignerWidget( formWindow(), toolBox, "page" ); toolBoxPage->hide(); index = -1; MetaDataBase::addEntry( TQT_TQOBJECT(toolBoxPage) ); |