From 47c8a359c5276062c4bc17f0e82410f29081b502 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:48:06 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kopete/libkopete/private/kopeteviewmanager.cpp | 62 +++++++++++++------------- 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'kopete/libkopete/private/kopeteviewmanager.cpp') diff --git a/kopete/libkopete/private/kopeteviewmanager.cpp b/kopete/libkopete/private/kopeteviewmanager.cpp index c6d295fd..2a6ccb84 100644 --- a/kopete/libkopete/private/kopeteviewmanager.cpp +++ b/kopete/libkopete/private/kopeteviewmanager.cpp @@ -19,8 +19,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -39,8 +39,8 @@ #include "kopeteviewmanager.h" -typedef QMap ManagerMap; -typedef QPtrList EventList; +typedef TQMap ManagerMap; +typedef TQPtrList EventList; struct KopeteViewManagerPrivate { @@ -73,13 +73,13 @@ KopeteViewManager::KopeteViewManager() d->activeView = 0L; d->foreignMessage=false; - connect( KopetePrefs::prefs(), SIGNAL( saved() ), this, SLOT( slotPrefsChanged() ) ); + connect( KopetePrefs::prefs(), TQT_SIGNAL( saved() ), this, TQT_SLOT( slotPrefsChanged() ) ); - connect( Kopete::ChatSessionManager::self() , SIGNAL( display( Kopete::Message &, Kopete::ChatSession *) ), - this, SLOT ( messageAppended( Kopete::Message &, Kopete::ChatSession *) ) ); + connect( Kopete::ChatSessionManager::self() , TQT_SIGNAL( display( Kopete::Message &, Kopete::ChatSession *) ), + this, TQT_SLOT ( messageAppended( Kopete::Message &, Kopete::ChatSession *) ) ); - connect( Kopete::ChatSessionManager::self() , SIGNAL( readMessage() ), - this, SLOT ( nextEvent() ) ); + connect( Kopete::ChatSessionManager::self() , TQT_SIGNAL( readMessage() ), + this, TQT_SLOT ( nextEvent() ) ); slotPrefsChanged(); } @@ -106,7 +106,7 @@ void KopeteViewManager::slotPrefsChanged() d->balloonNotifyIgnoreClosesChatView = KopetePrefs::prefs()->balloonNotifyIgnoreClosesChatView(); } -KopeteView *KopeteViewManager::view( Kopete::ChatSession* session, const QString &requestedPlugin ) +KopeteView *KopeteViewManager::view( Kopete::ChatSession* session, const TQString &requestedPlugin ) { // kdDebug(14000) << k_funcinfo << endl; @@ -119,7 +119,7 @@ KopeteView *KopeteViewManager::view( Kopete::ChatSession* session, const QString Kopete::PluginManager *pluginManager = Kopete::PluginManager::self(); Kopete::ViewPlugin *viewPlugin = 0L; - QString pluginName = requestedPlugin.isEmpty() ? KopetePrefs::prefs()->interfacePreference() : requestedPlugin; + TQString pluginName = requestedPlugin.isEmpty() ? KopetePrefs::prefs()->interfacePreference() : requestedPlugin; if( !pluginName.isEmpty() ) { viewPlugin = (Kopete::ViewPlugin*)pluginManager->loadPlugin( pluginName ); @@ -132,7 +132,7 @@ KopeteView *KopeteViewManager::view( Kopete::ChatSession* session, const QString } if( !viewPlugin ) - viewPlugin = (Kopete::ViewPlugin*)pluginManager->loadPlugin( QString::fromLatin1("kopete_chatwindow") ); + viewPlugin = (Kopete::ViewPlugin*)pluginManager->loadPlugin( TQString::fromLatin1("kopete_chatwindow") ); if( viewPlugin ) { @@ -141,8 +141,8 @@ KopeteView *KopeteViewManager::view( Kopete::ChatSession* session, const QString d->foreignMessage = false; d->managerMap.insert( session, newView ); - connect( session, SIGNAL( closing(Kopete::ChatSession *) ), - this, SLOT(slotChatSessionDestroyed(Kopete::ChatSession*)) ); + connect( session, TQT_SIGNAL( closing(Kopete::ChatSession *) ), + this, TQT_SLOT(slotChatSessionDestroyed(Kopete::ChatSession*)) ); return newView; } @@ -169,8 +169,8 @@ void KopeteViewManager::messageAppended( Kopete::Message &msg, Kopete::ChatSessi bool appendMessageEvent = d->useQueueOrStack; - QWidget *w; - if( d->queueUnreadMessages && ( w = dynamic_cast(view( manager )) ) ) + TQWidget *w; + if( d->queueUnreadMessages && ( w = dynamic_cast(view( manager )) ) ) { // append msg event to queue if chat window is active but not the chat view in it... appendMessageEvent = appendMessageEvent && !(w->isActiveWindow() && manager->view() == d->activeView); @@ -192,7 +192,7 @@ void KopeteViewManager::messageAppended( Kopete::Message &msg, Kopete::ChatSessi { Kopete::MessageEvent *event=new Kopete::MessageEvent(msg,manager); d->eventList.append( event ); - connect(event, SIGNAL(done(Kopete::MessageEvent *)), this, SLOT(slotEventDeleted(Kopete::MessageEvent *))); + connect(event, TQT_SIGNAL(done(Kopete::MessageEvent *)), this, TQT_SLOT(slotEventDeleted(Kopete::MessageEvent *))); Kopete::ChatSessionManager::self()->postNewEvent(event); } } @@ -204,42 +204,42 @@ void KopeteViewManager::messageAppended( Kopete::Message &msg, Kopete::ChatSessi if ( !outgoingMessage && ( !manager->account()->isAway() || KopetePrefs::prefs()->soundIfAway() ) && msg.direction() != Kopete::Message::Internal ) { - QWidget *w=dynamic_cast(manager->view(false)); + TQWidget *w=dynamic_cast(manager->view(false)); KConfig *config = KGlobal::config(); config->setGroup("General"); if( (!manager->view(false) || !w || manager->view() != d->activeView || config->readBoolEntry("EventIfActive", true) || !w->isActiveWindow()) && msg.from()) { - QString msgFrom = QString::null; + TQString msgFrom = TQString::null; if( msg.from()->metaContact() ) msgFrom = msg.from()->metaContact()->displayName(); else msgFrom = msg.from()->contactId(); - QString msgText = msg.plainBody(); + TQString msgText = msg.plainBody(); if( msgText.length() > 90 ) - msgText = msgText.left(88) + QString::fromLatin1("..."); + msgText = msgText.left(88) + TQString::fromLatin1("..."); - QString event; - QString body =i18n( "Incoming message from %1
\"%2\"
" ); + TQString event; + TQString body =i18n( "Incoming message from %1
\"%2\"
" ); switch( msg.importance() ) { case Kopete::Message::Low: - event = QString::fromLatin1( "kopete_contact_lowpriority" ); + event = TQString::fromLatin1( "kopete_contact_lowpriority" ); break; case Kopete::Message::Highlight: - event = QString::fromLatin1( "kopete_contact_highlight" ); + event = TQString::fromLatin1( "kopete_contact_highlight" ); body = i18n( "A highlighted message arrived from %1
\"%2\"
" ); break; default: - event = QString::fromLatin1( "kopete_contact_incoming" ); + event = TQString::fromLatin1( "kopete_contact_incoming" ); } - KNotification *notify=KNotification::event(msg.from()->metaContact() , event, body.arg( QStyleSheet::escape(msgFrom), QStyleSheet::escape(msgText) ), 0, /*msg.from()->metaContact(),*/ + KNotification *notify=KNotification::event(msg.from()->metaContact() , event, body.arg( TQStyleSheet::escape(msgFrom), TQStyleSheet::escape(msgText) ), 0, /*msg.from()->metaContact(),*/ w , i18n("View") ); - connect(notify,SIGNAL(activated(unsigned int )), manager , SLOT(raiseView()) ); + connect(notify,TQT_SIGNAL(activated(unsigned int )), manager , TQT_SLOT(raiseView()) ); } } } @@ -256,7 +256,7 @@ void KopeteViewManager::readMessages( Kopete::ChatSession *manager, bool outgoin else if( !thisView->isVisible() ) thisView->makeVisible(); - QPtrListIterator it( d->eventList ); + TQPtrListIterator it( d->eventList ); Kopete::MessageEvent* event; while ( ( event = it.current() ) != 0 ) { @@ -285,7 +285,7 @@ void KopeteViewManager::slotEventDeleted( Kopete::MessageEvent *event ) else if ( event->state() == Kopete::MessageEvent::Ignored && d->balloonNotifyIgnoreClosesChatView ) { bool bAnotherWithThisManager = false; - for( QPtrListIterator it( d->eventList ); it; ++it ) + for( TQPtrListIterator it( d->eventList ); it; ++it ) { Kopete::MessageEvent *event = it.current(); if ( event->message().manager() == kmm ) @@ -314,7 +314,7 @@ void KopeteViewManager::slotViewActivated( KopeteView *view ) // kdDebug( 14000 ) << k_funcinfo << endl; d->activeView = view; - QPtrListIterator it ( d->eventList ); + TQPtrListIterator it ( d->eventList ); Kopete::MessageEvent* event; while ( ( event = it.current() ) != 0 ) { -- cgit v1.2.3