diff options
Diffstat (limited to 'kommander/editor/actioneditorimpl.cpp')
-rw-r--r-- | kommander/editor/actioneditorimpl.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/kommander/editor/actioneditorimpl.cpp b/kommander/editor/actioneditorimpl.cpp index 8dea07ad..3b5df0e8 100644 --- a/kommander/editor/actioneditorimpl.cpp +++ b/kommander/editor/actioneditorimpl.cpp @@ -44,17 +44,17 @@ ActionEditor::ActionEditor( TQWidget* parent, const char* name, WFlags fl ) buttonConnect->setEnabled( false ); TQPopupMenu *popup = new TQPopupMenu( this ); - popup->insertItem( i18n("New &Action" ), this, TQT_SLOT( newAction() ) ); - popup->insertItem( i18n("New Action &Group" ), this, TQT_SLOT( newActionGroup() ) ); - popup->insertItem( i18n("New &Dropdown Action Group" ), this, TQT_SLOT( newDropDownActionGroup() ) ); + popup->insertItem( i18n("New &Action" ), this, TQ_SLOT( newAction() ) ); + popup->insertItem( i18n("New Action &Group" ), this, TQ_SLOT( newActionGroup() ) ); + popup->insertItem( i18n("New &Dropdown Action Group" ), this, TQ_SLOT( newDropDownActionGroup() ) ); buttonNewAction->setPopup( popup ); buttonNewAction->setPopupDelay( 0 ); - connect( listActions, TQT_SIGNAL( insertAction() ), this, TQT_SLOT( newAction() ) ); - connect( listActions, TQT_SIGNAL( insertActionGroup() ), this, TQT_SLOT( newActionGroup() ) ); - connect( listActions, TQT_SIGNAL( insertDropDownActionGroup() ), this, TQT_SLOT( newDropDownActionGroup() ) ); - connect( listActions, TQT_SIGNAL( deleteAction() ), this, TQT_SLOT( deleteAction() ) ); - connect( listActions, TQT_SIGNAL( connectAction() ), this, TQT_SLOT( connectionsClicked() ) ); + connect( listActions, TQ_SIGNAL( insertAction() ), this, TQ_SLOT( newAction() ) ); + connect( listActions, TQ_SIGNAL( insertActionGroup() ), this, TQ_SLOT( newActionGroup() ) ); + connect( listActions, TQ_SIGNAL( insertDropDownActionGroup() ), this, TQ_SLOT( newDropDownActionGroup() ) ); + connect( listActions, TQ_SIGNAL( deleteAction() ), this, TQ_SLOT( deleteAction() ) ); + connect( listActions, TQ_SIGNAL( connectAction() ), this, TQ_SLOT( connectionsClicked() ) ); } void ActionEditor::closeEvent( TQCloseEvent *e ) @@ -86,10 +86,10 @@ void ActionEditor::deleteAction() formWindow->actionList().removeRef( currentAction ); delete currentAction; TQValueList<MetaDataBase::Connection> conns = - MetaDataBase::connections( TQT_TQOBJECT(formWindow), currentAction ); + MetaDataBase::connections( formWindow, currentAction ); for ( TQValueList<MetaDataBase::Connection>::Iterator it2 = conns.begin(); it2 != conns.end(); ++it2 ) - MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow), (*it2).sender, (*it2).signal, + MetaDataBase::removeConnection( formWindow, (*it2).sender, (*it2).signal, (*it2).receiver, (*it2).slot ); delete it.current(); break; @@ -97,10 +97,10 @@ void ActionEditor::deleteAction() formWindow->actionList().removeRef( currentAction ); delete currentAction; TQValueList<MetaDataBase::Connection> conns = - MetaDataBase::connections( TQT_TQOBJECT(formWindow), currentAction ); + MetaDataBase::connections( formWindow, currentAction ); for ( TQValueList<MetaDataBase::Connection>::Iterator it2 = conns.begin(); it2 != conns.end(); ++it2 ) - MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow), (*it2).sender, (*it2).signal, + MetaDataBase::removeConnection( formWindow, (*it2).sender, (*it2).signal, (*it2).receiver, (*it2).slot ); delete it.current(); break; @@ -109,7 +109,7 @@ void ActionEditor::deleteAction() } if ( formWindow ) - formWindow->setActiveObject( TQT_TQOBJECT(formWindow->mainContainer()) ); + formWindow->setActiveObject( formWindow->mainContainer() ); } void ActionEditor::newAction() @@ -117,7 +117,7 @@ void ActionEditor::newAction() ActionItem *actionParent = (ActionItem*)listActions->selectedItem(); if ( actionParent ) { if ( !actionParent->actionGroup() || - !actionParent->actionGroup()->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ) + !actionParent->actionGroup()->inherits( "TQActionGroup" ) ) actionParent = (ActionItem*)actionParent->parent(); } @@ -130,7 +130,7 @@ void ActionEditor::newAction() TQString n = "Action"; formWindow->unify( i->action(), n, true ); i->setText( 0, n ); - i->action()->setName( n ); + i->action()->setName( n.utf8() ); i->action()->setText( i->action()->name() ); if ( actionParent && actionParent->actionGroup() && actionParent->actionGroup()->usesDropDown() ) { @@ -149,7 +149,7 @@ void ActionEditor::newActionGroup() ActionItem *actionParent = (ActionItem*)listActions->selectedItem(); if ( actionParent ) { if ( !actionParent->actionGroup() || - !actionParent->actionGroup()->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ) + !actionParent->actionGroup()->inherits( "TQActionGroup" ) ) actionParent = (ActionItem*)actionParent->parent(); } @@ -164,7 +164,7 @@ void ActionEditor::newActionGroup() TQString n = "ActionGroup"; formWindow->unify( i->action(), n, true ); i->setText( 0, n ); - i->actionGroup()->setName( n ); + i->actionGroup()->setName( n.utf8() ); i->actionGroup()->setText( i->actionGroup()->name() ); MetaDataBase::setPropertyChanged( i->actionGroup(), "text", true ); MetaDataBase::setPropertyChanged( i->actionGroup(), "name", true ); @@ -186,18 +186,18 @@ void ActionEditor::setFormWindow( FormWindow *fw ) formWindow = fw; if ( !formWindow || !formWindow->mainContainer() || - !formWindow->mainContainer()->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) { + !formWindow->mainContainer()->inherits( "TQMainWindow" ) ) { setEnabled( false ); } else { setEnabled( true ); for ( TQAction *a = formWindow->actionList().first(); a; a = formWindow->actionList().next() ) { ActionItem *i = 0; - if ( a->parent() && a->parent()->inherits( TQACTION_OBJECT_NAME_STRING ) ) + if ( a->parent() && a->parent()->inherits( "TQAction" ) ) continue; i = new ActionItem( listActions, a ); i->setText( 0, a->name() ); i->setPixmap( 0, a->iconSet().pixmap() ); - if ( a->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ) { + if ( a->inherits( "TQActionGroup" ) ) { insertChildActions( i ); } } @@ -219,14 +219,14 @@ void ActionEditor::insertChildActions( ActionItem *i ) while ( it.current() ) { TQObject *o = it.current(); ++it; - if ( !o->inherits( TQACTION_OBJECT_NAME_STRING ) ) + if ( !o->inherits( "TQAction" ) ) continue; TQAction *a = (TQAction*)o; ActionItem *i2 = new ActionItem( (TQListViewItem*)i, a ); i->setOpen( true ); i2->setText( 0, a->name() ); i2->setPixmap( 0, a->iconSet().pixmap() ); - if ( a->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ) + if ( a->inherits( "TQActionGroup" ) ) insertChildActions( i2 ); } } @@ -257,7 +257,7 @@ void ActionEditor::updateActionIcon( TQAction *a ) void ActionEditor::connectionsClicked() { - ConnectionEditor editor( formWindow->mainWindow(), TQT_TQOBJECT(currentAction), TQT_TQOBJECT(formWindow), formWindow ); + ConnectionEditor editor( formWindow->mainWindow(), currentAction, formWindow, formWindow ); editor.exec(); } #include "actioneditorimpl.moc" |