diff options
Diffstat (limited to 'kommander/editor/actiondnd.cpp')
-rw-r--r-- | kommander/editor/actiondnd.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/kommander/editor/actiondnd.cpp b/kommander/editor/actiondnd.cpp index 0eac8348..7207da73 100644 --- a/kommander/editor/actiondnd.cpp +++ b/kommander/editor/actiondnd.cpp @@ -23,7 +23,7 @@ #include <tqbitmap.h> #include <tqdragobject.h> #include <kinputdialog.h> -#include <layout.h> +#include <tqlayout.h> #include <tqmainwindow.h> #include <tqmenudata.h> #include <tqmessagebox.h> @@ -81,7 +81,7 @@ QDesignerToolBarSeparator::QDesignerToolBarSeparator(Qt::Orientation o , TQToolB setOrientation( o ); setBackgroundMode( parent->backgroundMode() ); setBackgroundOrigin( ParentOrigin ); - setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) ); + tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) ); } void QDesignerToolBarSeparator::setOrientation( Qt::Orientation o ) @@ -94,9 +94,9 @@ void QDesignerToolBarSeparator::styleChange( TQStyle& ) setOrientation( orient ); } -TQSize QDesignerToolBarSeparator::sizeHint() const +TQSize QDesignerToolBarSeparator::tqsizeHint() const { - int extent = tqstyle().pixelMetric( TQStyle::PM_DockWindowSeparatorExtent, + int extent = tqstyle().tqpixelMetric( TQStyle::PM_DockWindowSeparatorExtent, this ); if ( orient ==Qt::Horizontal ) return TQSize( extent, 0 ); @@ -113,7 +113,7 @@ void QDesignerToolBarSeparator::paintEvent( TQPaintEvent * ) flags |= TQStyle::Style_Horizontal; tqstyle().tqdrawPrimitive( TQStyle::PE_DockWindowSeparator, &p, rect(), - colorGroup(), flags ); + tqcolorGroup(), flags ); } @@ -294,7 +294,7 @@ void QDesignerToolBar::contextMenuEvent( TQContextMenuEvent *e ) menu.insertItem( i18n("Delete Toolbar" ), 1 ); int res = menu.exec( e->globalPos() ); if ( res != -1 ) { - RemoveToolBarCommand *cmd = new RemoveToolBarCommand( i18n("Delete Toolbar '%1'" ).arg( name() ), + RemoveToolBarCommand *cmd = new RemoveToolBarCommand( i18n("Delete Toolbar '%1'" ).tqarg( name() ), formWindow, 0, this ); formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); @@ -360,7 +360,7 @@ void QDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject * int index = actionList.find( a ); RemoveActionFromToolBarCommand *cmd = new RemoveActionFromToolBarCommand( i18n("Delete Action '%1' From Toolbar '%2'" ). - arg( a->name() ).arg( caption() ), + tqarg( a->name() ).tqarg( caption() ), formWindow, a, this, index ); formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); @@ -380,7 +380,7 @@ void QDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject * formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); } else if ( res == ID_DELTOOLBAR ) { - RemoveToolBarCommand *cmd = new RemoveToolBarCommand( i18n("Delete Toolbar '%1'" ).arg( name() ), + RemoveToolBarCommand *cmd = new RemoveToolBarCommand( i18n("Delete Toolbar '%1'" ).tqarg( name() ), formWindow, 0, this ); formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); @@ -420,7 +420,7 @@ void QDesignerToolBar::removeWidget( TQWidget *w ) int index = actionList.find( a ); RemoveActionFromToolBarCommand *cmd = new RemoveActionFromToolBarCommand( i18n("Delete Action '%1' From Toolbar '%2'" ). - arg( a->name() ).arg( caption() ), + tqarg( a->name() ).tqarg( caption() ), formWindow, a, this, index ); formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); @@ -443,7 +443,7 @@ void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ) int index = actionList.find( a ); RemoveActionFromToolBarCommand *cmd = new RemoveActionFromToolBarCommand( i18n("Delete Action '%1' From Toolbar '%2'" ). - arg( a->name() ).arg( caption() ), + tqarg( a->name() ).tqarg( caption() ), formWindow, a, this, index ); formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); @@ -462,7 +462,7 @@ void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ) } if ( !drag->drag() ) { AddActionToToolBarCommand *cmd = new AddActionToToolBarCommand( i18n("Add Action '%1' to Toolbar '%2'" ). - arg( a->name() ).arg( caption() ), + tqarg( a->name() ).tqarg( caption() ), formWindow, a, this, index ); formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); @@ -511,11 +511,11 @@ void QDesignerToolBar::dropEvent( TQDropEvent *e ) return; TQString s; if ( e->provides( "application/x-designer-actiongroup" ) ) - s = TQString( e->encodedData( "application/x-designer-actiongroup" ) ); + s = TQString( e->tqencodedData( "application/x-designer-actiongroup" ) ); else if ( e->provides( "application/x-designer-separator" ) ) - s = TQString( e->encodedData( "application/x-designer-separator" ) ); + s = TQString( e->tqencodedData( "application/x-designer-separator" ) ); else - s = TQString( e->encodedData( "application/x-designer-actions" ) ); + s = TQString( e->tqencodedData( "application/x-designer-actions" ) ); indicator->hide(); TQAction *a = 0; @@ -543,7 +543,7 @@ void QDesignerToolBar::dropEvent( TQDropEvent *e ) } AddActionToToolBarCommand *cmd = new AddActionToToolBarCommand( i18n("Add Action '%1' to Toolbar '%2'" ). - arg( a->name() ).arg( caption() ), + tqarg( a->name() ).tqarg( caption() ), formWindow, a, this, index ); formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); @@ -671,7 +671,7 @@ void QDesignerToolBar::doInsertWidget( const TQPoint &p ) if ( !insertAnchor ) index = 0; AddActionToToolBarCommand *cmd = new AddActionToToolBarCommand( i18n("Add Widget '%1' to Toolbar '%2'" ). - arg( w->name() ).arg( caption() ), + tqarg( w->name() ).tqarg( caption() ), formWindow, a, this, index ); formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); @@ -739,16 +739,16 @@ void QDesignerMenuBar::contextMenuEvent( TQContextMenuEvent *e ) int res = menu.exec( e->globalPos() ); if ( res == 1 ) { TQMenuItem *item = findItem( idAt( itm ) ); - RemoveMenuCommand *cmd = new RemoveMenuCommand( i18n("Delete Menu '%1'" ).arg( item->text() ), + RemoveMenuCommand *cmd = new RemoveMenuCommand( i18n("Delete Menu '%1'" ).tqarg( item->text() ), formWindow, (TQMainWindow*)parentWidget(), this, (QDesignerPopupMenu*)item->popup(), idAt( itm ), itm, item->text() ); formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); - // #### need to do a proper invalidate and re-layout - parentWidget()->layout()->invalidate(); - parentWidget()->layout()->activate(); + // #### need to do a proper tqinvalidate and re-tqlayout + parentWidget()->tqlayout()->tqinvalidate(); + parentWidget()->tqlayout()->activate(); } else if ( res == 2 ) { bool ok; TQString old = text( idAt( itm ) ); @@ -756,7 +756,7 @@ void QDesignerMenuBar::contextMenuEvent( TQContextMenuEvent *e ) text( idAt( itm ) ), &ok, 0 ); if ( ok ) { RenameMenuCommand *cmd = new RenameMenuCommand( - i18n("Rename Menu '%1' to '%2'" ).arg( old ).arg( txt ), + i18n("Rename Menu '%1' to '%2'" ).tqarg( old ).tqarg( txt ), formWindow, this, idAt( itm ), old, txt ); formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); @@ -873,14 +873,14 @@ void QDesignerMenuBar::dropEvent( TQDropEvent *e ) if ( !e->provides( "application/x-designer-menuitem" ) ) return; e->accept(); - TQString s( e->encodedData( "application/x-designer-menuitem" ) ); + TQString s( e->tqencodedData( "application/x-designer-menuitem" ) ); TQString s1 = s.left( s.find( "/" ) ); TQString s2 = s.mid( s.find( "/" ) + 1 ); TQPopupMenu *popup = (TQPopupMenu*)s1.toLong(); // #### huha, that is evil TQString txt = s2; insertItem( txt, popup, -1, insertAt ); - MoveMenuCommand *cmd = new MoveMenuCommand( i18n("Move Menu '%1'" ).arg( txt ), formWindow, + MoveMenuCommand *cmd = new MoveMenuCommand( i18n("Move Menu '%1'" ).tqarg( txt ), formWindow, this, (QDesignerPopupMenu*)popup, oldPos, insertAt, txt ); // do not execute, we did the work already formWindow->commandHistory()->addCommand( cmd ); @@ -895,7 +895,7 @@ TQPoint QDesignerMenuBar::calcIndicatorPos( const TQPoint &pos ) int w = frameWidth(); insertAt = count(); for ( int i = 0; i < (int)count(); ++i ) { - TQRect r = itemRect( i ); + TQRect r = tqitemRect( i ); if ( pos.x() < w + r.width() / 2 ) { insertAt = i; break; @@ -1030,7 +1030,7 @@ void QDesignerPopupMenu::createPopupMenu() return; RemoveActionFromPopupCommand *cmd = new RemoveActionFromPopupCommand( i18n("Delete Action '%1' From Popup Menu '%2'" ). - arg( a->name() ).arg( caption() ), + tqarg( a->name() ).tqarg( caption() ), formWindow, a, this, itm ); formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); @@ -1069,7 +1069,7 @@ void QDesignerPopupMenu::mouseMoveEvent( TQMouseEvent *e ) if ( !a ) return; RemoveActionFromPopupCommand *cmd = new RemoveActionFromPopupCommand( i18n("Delete Action '%1' From Popup Menu '%2'" ). - arg( a->name() ).arg( caption() ), + tqarg( a->name() ).tqarg( caption() ), formWindow, a, this, itm ); formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); @@ -1082,7 +1082,7 @@ void QDesignerPopupMenu::mouseMoveEvent( TQMouseEvent *e ) drag->setPixmap( a->iconSet().pixmap() ); if ( !drag->drag() ) { AddActionToPopupCommand *cmd = new AddActionToPopupCommand( i18n("Add Action '%1' to Popup Menu '%2'" ). - arg( a->name() ).arg( name() ), + tqarg( a->name() ).tqarg( name() ), formWindow, a, this, itm ); formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); @@ -1142,15 +1142,15 @@ void QDesignerPopupMenu::dropEvent( TQDropEvent *e ) TQPoint p = pos(); TQAction *a = 0; if ( e->provides( "application/x-designer-actiongroup" ) ) { - TQString s( e->encodedData( "application/x-designer-actiongroup" ) ); + TQString s( e->tqencodedData( "application/x-designer-actiongroup" ) ); a = (QDesignerActionGroup*)s.toLong(); } else { TQString s; if ( e->provides( "application/x-designer-separator" ) ) { - s = TQString( e->encodedData( "application/x-designer-separator" ) ); + s = TQString( e->tqencodedData( "application/x-designer-separator" ) ); a = (QSeparatorAction*)s.toLong(); } else { - s = TQString( e->encodedData( "application/x-designer-actions" ) ); + s = TQString( e->tqencodedData( "application/x-designer-actions" ) ); a = (QDesignerAction*)s.toLong(); } } @@ -1164,7 +1164,7 @@ void QDesignerPopupMenu::dropEvent( TQDropEvent *e ) } AddActionToPopupCommand *cmd = new AddActionToPopupCommand( i18n("Add Action '%1' to Popup Menu '%2'" ). - arg( a->name() ).arg( name() ), + tqarg( a->name() ).tqarg( name() ), formWindow, a, this, insertAt ); formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); |