summaryrefslogtreecommitdiffstats
path: root/kopete/libkopete/private/kopeteviewmanager.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/libkopete/private/kopeteviewmanager.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/libkopete/private/kopeteviewmanager.cpp')
-rw-r--r--kopete/libkopete/private/kopeteviewmanager.cpp62
1 files changed, 31 insertions, 31 deletions
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 <kconfig.h>
#include <kdebug.h>
#include <klocale.h>
-#include <qptrlist.h>
-#include <qstylesheet.h>
+#include <tqptrlist.h>
+#include <tqstylesheet.h>
#include <kplugininfo.h>
#include <knotification.h>
#include <kglobal.h>
@@ -39,8 +39,8 @@
#include "kopeteviewmanager.h"
-typedef QMap<Kopete::ChatSession*,KopeteView*> ManagerMap;
-typedef QPtrList<Kopete::MessageEvent> EventList;
+typedef TQMap<Kopete::ChatSession*,KopeteView*> ManagerMap;
+typedef TQPtrList<Kopete::MessageEvent> 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<QWidget*>(view( manager )) ) )
+ TQWidget *w;
+ if( d->queueUnreadMessages && ( w = dynamic_cast<TQWidget*>(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<QWidget*>(manager->view(false));
+ TQWidget *w=dynamic_cast<TQWidget*>(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( "<qt>Incoming message from %1<br>\"%2\"</qt>" );
+ TQString event;
+ TQString body =i18n( "<qt>Incoming message from %1<br>\"%2\"</qt>" );
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( "<qt>A highlighted message arrived from %1<br>\"%2\"</qt>" );
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<Kopete::MessageEvent> it( d->eventList );
+ TQPtrListIterator<Kopete::MessageEvent> 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<Kopete::MessageEvent> it( d->eventList ); it; ++it )
+ for( TQPtrListIterator<Kopete::MessageEvent> 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<Kopete::MessageEvent> it ( d->eventList );
+ TQPtrListIterator<Kopete::MessageEvent> it ( d->eventList );
Kopete::MessageEvent* event;
while ( ( event = it.current() ) != 0 )
{