From ffe8a83e053396df448e9413828527613ca3bd46 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:46:43 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdeui/ktoolbarhandler.cpp | 54 +++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'kdeui/ktoolbarhandler.cpp') diff --git a/kdeui/ktoolbarhandler.cpp b/kdeui/ktoolbarhandler.cpp index 91a35d0c4..5d8a49d8f 100644 --- a/kdeui/ktoolbarhandler.cpp +++ b/kdeui/ktoolbarhandler.cpp @@ -18,7 +18,7 @@ #include "ktoolbarhandler.h" -#include +#include #include #include #include @@ -44,11 +44,11 @@ namespace class BarActionBuilder { public: - BarActionBuilder( KActionCollection *actionCollection, KMainWindow *mainWindow, QPtrList &oldToolBarList ) + BarActionBuilder( KActionCollection *actionCollection, KMainWindow *mainWindow, TQPtrList &oldToolBarList ) : m_actionCollection( actionCollection ), m_mainWindow( mainWindow ), m_needsRebuild( false ) { - QPtrList dockWindows = m_mainWindow->dockWindows(); - QPtrListIterator dockWindowIt( dockWindows ); + TQPtrList dockWindows = m_mainWindow->dockWindows(); + TQPtrListIterator dockWindowIt( dockWindows ); for ( ; dockWindowIt.current(); ++dockWindowIt ) { KToolBar *toolBar = dynamic_cast( dockWindowIt.current() ); @@ -67,16 +67,16 @@ namespace bool needsRebuild() const { return m_needsRebuild; } - QPtrList create() + TQPtrList create() { if ( !m_needsRebuild ) - return QPtrList(); + return TQPtrList(); - QPtrListIterator toolBarIt( m_toolBars ); + TQPtrListIterator toolBarIt( m_toolBars ); for ( ; toolBarIt.current(); ++toolBarIt ) handleToolBar( toolBarIt.current() ); - QPtrList actions; + TQPtrList actions; if ( m_toolBarActions.count() == 0 ) return actions; @@ -90,7 +90,7 @@ namespace KActionMenu *menuAction = new KActionMenu( i18n( "Toolbars" ), m_actionCollection, "toolbars_submenu_action" ); - QPtrListIterator actionIt( m_toolBarActions ); + TQPtrListIterator actionIt( m_toolBarActions ); for ( ; actionIt.current(); ++actionIt ) menuAction->insert( actionIt.current() ); @@ -98,7 +98,7 @@ namespace return actions; } - const QPtrList &toolBars() const { return m_toolBars; } + const TQPtrList &toolBars() const { return m_toolBars; } private: void handleToolBar( KToolBar *toolBar ) @@ -115,8 +115,8 @@ namespace KActionCollection *m_actionCollection; KMainWindow *m_mainWindow; - QPtrList m_toolBars; - QPtrList m_toolBarActions; + TQPtrList m_toolBars; + TQPtrList m_toolBarActions; bool m_needsRebuild : 1; }; @@ -125,13 +125,13 @@ namespace using namespace KDEPrivate; ToolBarHandler::ToolBarHandler( KMainWindow *mainWindow, const char *name ) - : QObject( mainWindow, name ), KXMLGUIClient( mainWindow ) + : TQObject( mainWindow, name ), KXMLGUIClient( mainWindow ) { init( mainWindow ); } -ToolBarHandler::ToolBarHandler( KMainWindow *mainWindow, QObject *parent, const char *name ) - : QObject( parent, name ), KXMLGUIClient( mainWindow ) +ToolBarHandler::ToolBarHandler( KMainWindow *mainWindow, TQObject *parent, const char *name ) + : TQObject( parent, name ), KXMLGUIClient( mainWindow ) { init( mainWindow ); } @@ -167,7 +167,7 @@ void ToolBarHandler::setupActions() m_actions = builder.create(); /* - for ( QPtrListIterator toolBarIt( m_toolBars ); + for ( TQPtrListIterator toolBarIt( m_toolBars ); toolBarIt.current(); ++toolBarIt ) toolBarIt.current()->disconnect( this ); */ @@ -175,10 +175,10 @@ void ToolBarHandler::setupActions() m_toolBars = builder.toolBars(); /* - for ( QPtrListIterator toolBarIt( m_toolBars ); + for ( TQPtrListIterator toolBarIt( m_toolBars ); toolBarIt.current(); ++toolBarIt ) - connect( toolBarIt.current(), SIGNAL( destroyed() ), - this, SLOT( setupActions() ) ); + connect( toolBarIt.current(), TQT_SIGNAL( destroyed() ), + this, TQT_SLOT( setupActions() ) ); */ if (kapp && kapp->authorizeKAction("options_show_toolbar")) @@ -198,8 +198,8 @@ void ToolBarHandler::init( KMainWindow *mainWindow ) d = 0; m_mainWindow = mainWindow; - connect( m_mainWindow->guiFactory(), SIGNAL( clientAdded( KXMLGUIClient * ) ), - this, SLOT( clientAdded( KXMLGUIClient * ) ) ); + connect( m_mainWindow->guiFactory(), TQT_SIGNAL( clientAdded( KXMLGUIClient * ) ), + this, TQT_SLOT( clientAdded( KXMLGUIClient * ) ) ); /* re-use an existing resource file if it exists. can happen if the user launches the * toolbar editor */ @@ -209,7 +209,7 @@ void ToolBarHandler::init( KMainWindow *mainWindow ) if ( domDocument().documentElement().isNull() ) { - QString completeDescription = QString::fromLatin1( guiDescription ) + TQString completeDescription = TQString::fromLatin1( guiDescription ) .arg( actionListName ); setXML( completeDescription, false /*merge*/ ); @@ -218,7 +218,7 @@ void ToolBarHandler::init( KMainWindow *mainWindow ) void ToolBarHandler::connectToActionContainers() { - QPtrListIterator actionIt( m_actions ); + TQPtrListIterator actionIt( m_actions ); for ( ; actionIt.current(); ++actionIt ) connectToActionContainer( actionIt.current() ); } @@ -230,14 +230,14 @@ void ToolBarHandler::connectToActionContainer( KAction *action ) connectToActionContainer( action->container( i ) ); } -void ToolBarHandler::connectToActionContainer( QWidget *container ) +void ToolBarHandler::connectToActionContainer( TQWidget *container ) { - QPopupMenu *popupMenu = dynamic_cast( container ); + TQPopupMenu *popupMenu = dynamic_cast( container ); if ( !popupMenu ) return; - connect( popupMenu, SIGNAL( aboutToShow() ), - this, SLOT( setupActions() ) ); + connect( popupMenu, TQT_SIGNAL( aboutToShow() ), + this, TQT_SLOT( setupActions() ) ); } #include "ktoolbarhandler.moc" -- cgit v1.2.1