diff options
Diffstat (limited to 'kopete/kopete/chatwindow/chatview.cpp')
-rw-r--r-- | kopete/kopete/chatwindow/chatview.cpp | 252 |
1 files changed, 126 insertions, 126 deletions
diff --git a/kopete/kopete/chatwindow/chatview.cpp b/kopete/kopete/chatwindow/chatview.cpp index 62c1206d..514aaac8 100644 --- a/kopete/kopete/chatwindow/chatview.cpp +++ b/kopete/kopete/chatwindow/chatview.cpp @@ -45,13 +45,13 @@ #include <kgenericfactory.h> #include <khtmlview.h> #include <ksyntaxhighlighter.h> -#include <qscrollview.h> -#include <qtimer.h> +#include <tqscrollview.h> +#include <tqtimer.h> typedef KGenericFactory<ChatWindowPlugin> ChatWindowPluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_chatwindow, ChatWindowPluginFactory( "kopete_chatwindow" ) ) -ChatWindowPlugin::ChatWindowPlugin(QObject *parent, const char *name, const QStringList &) : +ChatWindowPlugin::ChatWindowPlugin(TQObject *parent, const char *name, const TQStringList &) : Kopete::ViewPlugin( ChatWindowPluginFactory::instance(), parent, name ) {} @@ -63,8 +63,8 @@ KopeteView* ChatWindowPlugin::createView( Kopete::ChatSession *manager ) class KopeteChatViewPrivate { public: - QString captionText; - QString statusText; + TQString captionText; + TQString statusText; bool isActive; bool sendInProgress; bool visibleMembers; @@ -89,8 +89,8 @@ ChatView::ChatView( Kopete::ChatSession *mgr, ChatWindowPlugin *parent, const ch hide(); //Create the view dock widget (KHTML Part), and set it to no docking (lock it in place) - viewDock = createDockWidget(QString::fromLatin1( "viewDock" ), QPixmap(), - 0L,QString::fromLatin1("viewDock"), QString::fromLatin1(" ")); + viewDock = createDockWidget(TQString::fromLatin1( "viewDock" ), TQPixmap(), + 0L,TQString::fromLatin1("viewDock"), TQString::fromLatin1(" ")); m_messagePart = new ChatMessagePart( mgr, viewDock, "m_messagePart" ); viewDock->setWidget(messagePart()->widget()); @@ -98,19 +98,19 @@ ChatView::ChatView( Kopete::ChatSession *mgr, ChatWindowPlugin *parent, const ch viewDock->setEnableDocking(KDockWidget::DockNone); //Create the bottom dock widget, with the edit area, statusbar and send button - editDock = createDockWidget( QString::fromLatin1( "editDock" ), QPixmap(), - 0L, QString::fromLatin1("editDock"), QString::fromLatin1(" ") ); + editDock = createDockWidget( TQString::fromLatin1( "editDock" ), TQPixmap(), + 0L, TQString::fromLatin1("editDock"), TQString::fromLatin1(" ") ); m_editPart = new ChatTextEditPart( mgr, editDock, "kopeterichtexteditpart" ); // FIXME: is this used these days? it seems totally unnecessary - connect( editPart(), SIGNAL( toggleToolbar(bool)), this, SLOT(slotToggleRtfToolbar(bool)) ); + connect( editPart(), TQT_SIGNAL( toggleToolbar(bool)), this, TQT_SLOT(slotToggleRtfToolbar(bool)) ); - connect( editPart(), SIGNAL( messageSent( Kopete::Message & ) ), - this, SIGNAL( messageSent( Kopete::Message & ) ) ); - connect( editPart(), SIGNAL( canSendChanged( bool ) ), - this, SIGNAL( canSendChanged(bool) ) ); - connect( editPart(), SIGNAL( typing(bool) ), - mgr, SLOT( typing(bool) ) ); + connect( editPart(), TQT_SIGNAL( messageSent( Kopete::Message & ) ), + this, TQT_SIGNAL( messageSent( Kopete::Message & ) ) ); + connect( editPart(), TQT_SIGNAL( canSendChanged( bool ) ), + this, TQT_SIGNAL( canSendChanged(bool) ) ); + connect( editPart(), TQT_SIGNAL( typing(bool) ), + mgr, TQT_SLOT( typing(bool) ) ); //Make the edit area dockable for now editDock->setWidget( editPart()->widget() ); @@ -129,40 +129,40 @@ ChatView::ChatView( Kopete::ChatSession *mgr, ChatWindowPlugin *parent, const ch m_remoteTypingMap.setAutoDelete( true ); //Manager signals - connect( mgr, SIGNAL( displayNameChanged() ), - this, SLOT( slotChatDisplayNameChanged() ) ); - connect( mgr, SIGNAL( contactAdded(const Kopete::Contact*, bool) ), - this, SLOT( slotContactAdded(const Kopete::Contact*, bool) ) ); - connect( mgr, SIGNAL( contactRemoved(const Kopete::Contact*, const QString&, Kopete::Message::MessageFormat, bool) ), - this, SLOT( slotContactRemoved(const Kopete::Contact*, const QString&, Kopete::Message::MessageFormat, bool) ) ); - connect( mgr, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & , const Kopete::OnlineStatus &) ), - this, SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); - connect( mgr, SIGNAL( remoteTyping( const Kopete::Contact *, bool) ), - this, SLOT( remoteTyping(const Kopete::Contact *, bool) ) ); - connect( mgr, SIGNAL( eventNotification( const QString& ) ), - this, SLOT( setStatusText( const QString& ) ) ); + connect( mgr, TQT_SIGNAL( displayNameChanged() ), + this, TQT_SLOT( slotChatDisplayNameChanged() ) ); + connect( mgr, TQT_SIGNAL( contactAdded(const Kopete::Contact*, bool) ), + this, TQT_SLOT( slotContactAdded(const Kopete::Contact*, bool) ) ); + connect( mgr, TQT_SIGNAL( contactRemoved(const Kopete::Contact*, const TQString&, Kopete::Message::MessageFormat, bool) ), + this, TQT_SLOT( slotContactRemoved(const Kopete::Contact*, const TQString&, Kopete::Message::MessageFormat, bool) ) ); + connect( mgr, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & , const Kopete::OnlineStatus &) ), + this, TQT_SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); + connect( mgr, TQT_SIGNAL( remoteTyping( const Kopete::Contact *, bool) ), + this, TQT_SLOT( remoteTyping(const Kopete::Contact *, bool) ) ); + connect( mgr, TQT_SIGNAL( eventNotification( const TQString& ) ), + this, TQT_SLOT( setStatusText( const TQString& ) ) ); //Connections to the manager and the ViewManager that every view should have - connect( this, SIGNAL( closing( KopeteView * ) ), - KopeteViewManager::viewManager(), SLOT( slotViewDestroyed( KopeteView * ) ) ); - connect( this, SIGNAL( activated( KopeteView * ) ), - KopeteViewManager::viewManager(), SLOT( slotViewActivated( KopeteView * ) ) ); - connect( this, SIGNAL( messageSent(Kopete::Message &) ), - mgr, SLOT( sendMessage(Kopete::Message &) ) ); - connect( mgr, SIGNAL( messageSuccess() ), - this, SLOT( messageSentSuccessfully() )); + connect( this, TQT_SIGNAL( closing( KopeteView * ) ), + KopeteViewManager::viewManager(), TQT_SLOT( slotViewDestroyed( KopeteView * ) ) ); + connect( this, TQT_SIGNAL( activated( KopeteView * ) ), + KopeteViewManager::viewManager(), TQT_SLOT( slotViewActivated( KopeteView * ) ) ); + connect( this, TQT_SIGNAL( messageSent(Kopete::Message &) ), + mgr, TQT_SLOT( sendMessage(Kopete::Message &) ) ); + connect( mgr, TQT_SIGNAL( messageSuccess() ), + this, TQT_SLOT( messageSentSuccessfully() )); // add contacts slotContactAdded( mgr->myself(), true ); - for ( QPtrListIterator<Kopete::Contact> it( mgr->members() ); it.current(); ++it ) + for ( TQPtrListIterator<Kopete::Contact> it( mgr->members() ); it.current(); ++it ) slotContactAdded( *it, true ); setFocusProxy( editPart()->widget() ); editPart()->widget()->setFocus(); // init actions - KStdAction::copy( this, SLOT(copy()), actionCollection() ); - KStdAction::close( this, SLOT(closeView()),actionCollection() ); + KStdAction::copy( this, TQT_SLOT(copy()), actionCollection() ); + KStdAction::close( this, TQT_SLOT(closeView()),actionCollection() ); setCaption( m_manager->displayName(), false ); @@ -187,7 +187,7 @@ KTextEdit *ChatView::editWidget() return editPart()->widget(); } -QWidget *ChatView::mainWidget() +TQWidget *ChatView::mainWidget() { return this; } @@ -230,7 +230,7 @@ void ChatView::nickComplete() return editPart()->complete(); } -void ChatView::addText( const QString &text ) +void ChatView::addText( const TQString &text ) { editPart()->addText( text ); } @@ -240,7 +240,7 @@ void ChatView::clear() messagePart()->clear(); } -void ChatView::setBgColor( const QColor &newColor ) +void ChatView::setBgColor( const TQColor &newColor ) { editPart()->setBgColor( newColor ); } @@ -250,17 +250,17 @@ void ChatView::setFont() editPart()->setFont(); } -QFont ChatView::font() +TQFont ChatView::font() { return editPart()->font(); } -void ChatView::setFont( const QFont &font ) +void ChatView::setFont( const TQFont &font ) { editPart()->setFont( font ); } -void ChatView::setFgColor( const QColor &newColor ) +void ChatView::setFgColor( const TQColor &newColor ) { editPart()->setFgColor( newColor ); } @@ -349,26 +349,26 @@ bool ChatView::closeView( bool force ) { if ( m_manager->members().count() > 1 ) { - QString shortCaption = d->captionText; + TQString shortCaption = d->captionText; shortCaption = KStringHandler::rsqueeze( shortCaption ); response = KMessageBox::warningContinueCancel( this, i18n("<qt>You are about to leave the group chat session <b>%1</b>.<br>" "You will not receive future messages from this conversation.</qt>").arg( shortCaption ), i18n( "Closing Group Chat" ), - i18n( "Cl&ose Chat" ), QString::fromLatin1( "AskCloseGroupChat" ) ); + i18n( "Cl&ose Chat" ), TQString::fromLatin1( "AskCloseGroupChat" ) ); } if ( !unreadMessageFrom.isNull() && ( response == KMessageBox::Continue ) ) { response = KMessageBox::warningContinueCancel( this, i18n("<qt>You have received a message from <b>%1</b> in the last " "second. Are you sure you want to close this chat?</qt>").arg( unreadMessageFrom ), i18n( "Unread Message" ), - i18n( "Cl&ose Chat" ), QString::fromLatin1("AskCloseChatRecentMessage" ) ); + i18n( "Cl&ose Chat" ), TQString::fromLatin1("AskCloseChatRecentMessage" ) ); } if ( d->sendInProgress && ( response == KMessageBox::Continue ) ) { response = KMessageBox::warningContinueCancel( this, i18n( "You have a message send in progress, which will be " "aborted if this chat is closed. Are you sure you want to close this chat?" ), i18n( "Message in Transit" ), - i18n( "Cl&ose Chat" ), QString::fromLatin1( "AskCloseChatMessageInProgress" ) ); + i18n( "Cl&ose Chat" ), TQString::fromLatin1( "AskCloseChatMessageInProgress" ) ); } } @@ -418,8 +418,8 @@ void ChatView::createMembersList() if ( !membersDock ) { //Create the chat members list - membersDock = createDockWidget( QString::fromLatin1( "membersDock" ), QPixmap(), 0L, - QString::fromLatin1( "membersDock" ), QString::fromLatin1( " " ) ); + membersDock = createDockWidget( TQString::fromLatin1( "membersDock" ), TQPixmap(), 0L, + TQString::fromLatin1( "membersDock" ), TQString::fromLatin1( " " ) ); m_membersList = new ChatMembersListWidget( m_manager, this, "m_membersList" ); membersDock->setWidget( m_membersList ); @@ -431,7 +431,7 @@ void ChatView::createMembersList() membersStatus = static_cast<MembersListPolicy> ( members.first()->metaContact()->pluginData - ( m_manager->protocol(), QString::fromLatin1( "MembersListPolicy" ) ).toInt() + ( m_manager->protocol(), TQString::fromLatin1( "MembersListPolicy" ) ).toInt() ); } else @@ -459,7 +459,7 @@ void ChatView::toggleMembersVisibility() if ( members.first()->metaContact() ) { members.first()->metaContact()->setPluginData( m_manager->protocol(), - QString::fromLatin1( "MembersListPolicy" ), QString::number(membersStatus) ); + TQString::fromLatin1( "MembersListPolicy" ), TQString::number(membersStatus) ); } //refreshView(); } @@ -476,17 +476,17 @@ void ChatView::placeMembersList( KDockWidget::DockPosition dp ) // look up the dock width int dockWidth; - KGlobal::config()->setGroup( QString::fromLatin1( "ChatViewDock" ) ); + KGlobal::config()->setGroup( TQString::fromLatin1( "ChatViewDock" ) ); if( membersDockPosition == KDockWidget::DockLeft ) { dockWidth = KGlobal::config()->readNumEntry( - QString::fromLatin1( "membersDock,viewDock:sepPos" ), 30); + TQString::fromLatin1( "membersDock,viewDock:sepPos" ), 30); } else { dockWidth = KGlobal::config()->readNumEntry( - QString::fromLatin1( "viewDock,membersDock:sepPos" ), 70); + TQString::fromLatin1( "viewDock,membersDock:sepPos" ), 70); } // Make sure it is shown then place it wherever @@ -519,19 +519,19 @@ void ChatView::remoteTyping( const Kopete::Contact *contact, bool isTyping ) m_remoteTypingMap.remove( key ); if( isTyping ) { - m_remoteTypingMap.insert( key, new QTimer(this) ); - connect( m_remoteTypingMap[ key ], SIGNAL( timeout() ), SLOT( slotRemoteTypingTimeout() ) ); + m_remoteTypingMap.insert( key, new TQTimer(this) ); + connect( m_remoteTypingMap[ key ], TQT_SIGNAL( timeout() ), TQT_SLOT( slotRemoteTypingTimeout() ) ); m_remoteTypingMap[ key ]->start( 6000, true ); } // Loop through the map, constructing a string of people typing - QStringList typingList; - QPtrDictIterator<QTimer> it( m_remoteTypingMap ); + TQStringList typingList; + TQPtrDictIterator<TQTimer> it( m_remoteTypingMap ); for( ; it.current(); ++it ) { Kopete::Contact *c = static_cast<Kopete::Contact*>( it.currentKey() ); - QString nick; + TQString nick; if( c->metaContact() && c->metaContact() != Kopete::ContactList::self()->myself() ) { nick = c->metaContact()->displayName(); @@ -550,7 +550,7 @@ void ChatView::remoteTyping( const Kopete::Contact *contact, bool isTyping ) setStatusText( i18n( "%1 is typing a message" ).arg( typingList.first() ) ); else { - QString statusTyping = typingList.join( QString::fromLatin1( ", " ) ); + TQString statusTyping = typingList.join( TQString::fromLatin1( ", " ) ); setStatusText( i18n( "%1 is a list of names", "%1 are typing a message" ).arg( statusTyping ) ); } updateChatState( Typing ); @@ -561,14 +561,14 @@ void ChatView::remoteTyping( const Kopete::Contact *contact, bool isTyping ) } } -void ChatView::setStatusText( const QString &status ) +void ChatView::setStatusText( const TQString &status ) { d->statusText = status; if ( d->isActive ) m_mainWindow->setStatus( status ); } -const QString& ChatView::statusText() +const TQString& ChatView::statusText() { return d->statusText; } @@ -578,18 +578,18 @@ void ChatView::slotChatDisplayNameChanged() // This fires whenever a contact or MC changes displayName, so only // update the caption if it changed to avoid unneeded updates that // could cause flickering - QString chatName = m_manager->displayName(); + TQString chatName = m_manager->displayName(); if ( chatName != d->captionText ) setCaption( chatName, true ); } -void ChatView::slotPropertyChanged( Kopete::Contact*, const QString &key, - const QVariant& oldValue, const QVariant &newValue ) +void ChatView::slotPropertyChanged( Kopete::Contact*, const TQString &key, + const TQVariant& oldValue, const TQVariant &newValue ) { if ( key == Kopete::Global::Properties::self()->nickName().key() ) { - QString newName=newValue.toString(); - QString oldName=oldValue.toString(); + TQString newName=newValue.toString(); + TQString oldName=oldValue.toString(); if(KopetePrefs::prefs()->showEvents()) if ( oldName != newName && !oldName.isEmpty()) @@ -597,7 +597,7 @@ void ChatView::slotPropertyChanged( Kopete::Contact*, const QString &key, } } -void ChatView::slotDisplayNameChanged( const QString &oldValue, const QString &newValue ) +void ChatView::slotDisplayNameChanged( const TQString &oldValue, const TQString &newValue ) { if( KopetePrefs::prefs()->showEvents() ) { @@ -608,7 +608,7 @@ void ChatView::slotDisplayNameChanged( const QString &oldValue, const QString &n void ChatView::slotContactAdded(const Kopete::Contact *contact, bool suppress) { - QString contactName; + TQString contactName; // Myself metacontact is not a reliable source. if( contact->metaContact() && contact->metaContact() != Kopete::ContactList::self()->myself() ) { @@ -621,13 +621,13 @@ void ChatView::slotContactAdded(const Kopete::Contact *contact, bool suppress) if( contact->metaContact() && contact->metaContact() != Kopete::ContactList::self()->myself() ) { - connect( contact->metaContact(), SIGNAL( displayNameChanged(const QString&, const QString&) ), - this, SLOT( slotDisplayNameChanged(const QString &, const QString &) ) ); + connect( contact->metaContact(), TQT_SIGNAL( displayNameChanged(const TQString&, const TQString&) ), + this, TQT_SLOT( slotDisplayNameChanged(const TQString &, const TQString &) ) ); } else { - connect( contact, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), - this, SLOT( slotPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ) ) ; + connect( contact, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), + this, TQT_SLOT( slotPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ) ; } if( !suppress && m_manager->members().count() > 1 ) @@ -647,14 +647,14 @@ void ChatView::slotContactAdded(const Kopete::Contact *contact, bool suppress) emit updateStatusIcon( this ); } -void ChatView::slotContactRemoved( const Kopete::Contact *contact, const QString &reason, Kopete::Message::MessageFormat format, bool suppressNotification ) +void ChatView::slotContactRemoved( const Kopete::Contact *contact, const TQString &reason, Kopete::Message::MessageFormat format, bool suppressNotification ) { // kdDebug(14000) << k_funcinfo << endl; if ( contact != m_manager->myself() ) { m_remoteTypingMap.remove( const_cast<Kopete::Contact *>( contact ) ); - QString contactName; + TQString contactName; if( contact->metaContact() && contact->metaContact() != Kopete::ContactList::self()->myself() ) { contactName = contact->metaContact()->displayName(); @@ -669,13 +669,13 @@ void ChatView::slotContactRemoved( const Kopete::Contact *contact, const QString { if( contact->metaContact() ) { - disconnect( contact->metaContact(), SIGNAL( displayNameChanged(const QString&, const QString&) ), - this, SLOT( slotDisplayNameChanged(const QString&, const QString&) ) ); + disconnect( contact->metaContact(), TQT_SIGNAL( displayNameChanged(const TQString&, const TQString&) ), + this, TQT_SLOT( slotDisplayNameChanged(const TQString&, const TQString&) ) ); } else { - disconnect(contact,SIGNAL(propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & )), - this, SLOT( slotPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ) ) ; + disconnect(contact,TQT_SIGNAL(propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & )), + this, TQT_SLOT( slotPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ) ; } } @@ -692,15 +692,15 @@ void ChatView::slotContactRemoved( const Kopete::Contact *contact, const QString emit updateStatusIcon( this ); } -QString& ChatView::caption() const +TQString& ChatView::caption() const { return d->captionText; } -void ChatView::setCaption( const QString &text, bool modified ) +void ChatView::setCaption( const TQString &text, bool modified ) { // kdDebug(14000) << k_funcinfo << endl; - QString newCaption = text; + TQString newCaption = text; //Save this caption d->captionText = text; @@ -711,7 +711,7 @@ void ChatView::setCaption( const QString &text, bool modified ) //Call the original set caption KDockMainWindow::setCaption( newCaption, false ); - emit updateChatTooltip( this, QString::fromLatin1("<qt>%1</qt>").arg( d->captionText ) ); + emit updateChatTooltip( this, TQString::fromLatin1("<qt>%1</qt>").arg( d->captionText ) ); emit updateChatLabel( this, newCaption ); //Blink icon if modified and not active if( !d->isActive && modified ) @@ -757,15 +757,15 @@ void ChatView::appendMessage(Kopete::Message &message) { unreadMessageFrom = message.from()->nickName(); } - QTimer::singleShot( 1000, this, SLOT( slotMarkMessageRead() ) ); + TQTimer::singleShot( 1000, this, TQT_SLOT( slotMarkMessageRead() ) ); } else - unreadMessageFrom = QString::null; + unreadMessageFrom = TQString::null; } void ChatView::slotMarkMessageRead() { - unreadMessageFrom = QString::null; + unreadMessageFrom = TQString::null; } void ChatView::slotToggleRtfToolbar( bool enabled ) @@ -796,7 +796,7 @@ void ChatView::slotContactStatusChanged( Kopete::Contact *contact, const Kopete: } else { - QString nick=contact->nickName(); + TQString nick=contact->nickName(); sendInternalMessage( i18n( "%2 is now %1." ) .arg( newStatus.description(), nick ) ); } @@ -808,7 +808,7 @@ void ChatView::slotContactStatusChanged( Kopete::Contact *contact, const Kopete: emit updateStatusIcon( this ); } -void ChatView::sendInternalMessage(const QString &msg, Kopete::Message::MessageFormat format ) +void ChatView::sendInternalMessage(const TQString &msg, Kopete::Message::MessageFormat format ) { // When closing kopete, some internal message may be sent because some contact are deleted // these contacts can already be deleted @@ -835,9 +835,9 @@ void ChatView::saveOptions() { KConfig *config = KGlobal::config(); - writeDockConfig ( config, QString::fromLatin1( "ChatViewDock" ) ); - config->setGroup( QString::fromLatin1( "ChatViewDock" ) ); - config->writeEntry( QString::fromLatin1( "membersDockPosition" ), membersDockPosition ); + writeDockConfig ( config, TQString::fromLatin1( "ChatViewDock" ) ); + config->setGroup( TQString::fromLatin1( "ChatViewDock" ) ); + config->writeEntry( TQString::fromLatin1( "membersDockPosition" ), membersDockPosition ); saveChatSettings(); config->sync(); } @@ -859,7 +859,7 @@ void ChatView::saveChatSettings() KConfig* config = KGlobal::config(); - QString contactListGroup = QString::fromLatin1("chatwindow_") + + TQString contactListGroup = TQString::fromLatin1("chatwindow_") + mc->metaContactId(); config->setGroup( contactListGroup ); @@ -875,7 +875,7 @@ void ChatView::loadChatSettings() return; //can't load with more than one other person in the chat //read settings for metacontact - QString contactListGroup = QString::fromLatin1("chatwindow_") + + TQString contactListGroup = TQString::fromLatin1("chatwindow_") + contacts.first()->metaContact()->metaContactId(); KConfig* config = KGlobal::config(); config->setGroup( contactListGroup ); @@ -891,24 +891,24 @@ void ChatView::readOptions() KConfig *config = KGlobal::config(); /** THIS IS BROKEN !!! */ - //dockManager->readConfig ( config, QString::fromLatin1("ChatViewDock") ); + //dockManager->readConfig ( config, TQString::fromLatin1("ChatViewDock") ); //Work-around to restore dock widget positions - config->setGroup( QString::fromLatin1( "ChatViewDock" ) ); + config->setGroup( TQString::fromLatin1( "ChatViewDock" ) ); membersDockPosition = static_cast<KDockWidget::DockPosition>( - config->readNumEntry( QString::fromLatin1( "membersDockPosition" ), KDockWidget::DockRight ) ); + config->readNumEntry( TQString::fromLatin1( "membersDockPosition" ), KDockWidget::DockRight ) ); - QString dockKey = QString::fromLatin1( "viewDock" ); + TQString dockKey = TQString::fromLatin1( "viewDock" ); if ( d->visibleMembers ) { if( membersDockPosition == KDockWidget::DockLeft ) - dockKey.prepend( QString::fromLatin1( "membersDock," ) ); + dockKey.prepend( TQString::fromLatin1( "membersDock," ) ); else if( membersDockPosition == KDockWidget::DockRight ) - dockKey.append( QString::fromLatin1( ",membersDock" ) ); + dockKey.append( TQString::fromLatin1( ",membersDock" ) ); } - dockKey.append( QString::fromLatin1( ",editDock:sepPos" ) ); + dockKey.append( TQString::fromLatin1( ",editDock:sepPos" ) ); //kdDebug(14000) << k_funcinfo << "reading splitterpos from key: " << dockKey << endl; int splitterPos = config->readNumEntry( dockKey, 70 ); editDock->manualDock( viewDock, KDockWidget::DockBottom, splitterPos ); @@ -928,23 +928,23 @@ void ChatView::setActive( bool value ) void ChatView::slotRemoteTypingTimeout() { - // Remove the topmost timer from the list. Why does QPtrDict use void* keys and not typed keys? *sigh* + // Remove the topmost timer from the list. Why does TQPtrDict use void* keys and not typed keys? *sigh* if ( !m_remoteTypingMap.isEmpty() ) - remoteTyping( reinterpret_cast<const Kopete::Contact *>( QPtrDictIterator<QTimer>(m_remoteTypingMap).currentKey() ), false ); + remoteTyping( reinterpret_cast<const Kopete::Contact *>( TQPtrDictIterator<TQTimer>(m_remoteTypingMap).currentKey() ), false ); } -void ChatView::dragEnterEvent ( QDragEnterEvent * event ) +void ChatView::dragEnterEvent ( TQDragEnterEvent * event ) { if( event->provides( "kopete/x-contact" ) ) { - QStringList lst=QStringList::split( QChar( 0xE000 ) , QString::fromUtf8(event->encodedData ( "kopete/x-contact" )) ); + TQStringList lst=TQStringList::split( TQChar( 0xE000 ) , TQString::fromUtf8(event->encodedData ( "kopete/x-contact" )) ); if(m_manager->mayInvite() && m_manager->protocol()->pluginId() == lst[0] && m_manager->account()->accountId() == lst[1]) { - QString contact=lst[2]; + TQString contact=lst[2]; bool found =false; - QPtrList<Kopete::Contact> cts=m_manager->members(); - for ( QPtrListIterator<Kopete::Contact> it( cts ); it.current(); ++it ) + TQPtrList<Kopete::Contact> cts=m_manager->members(); + for ( TQPtrListIterator<Kopete::Contact> it( cts ); it.current(); ++it ) { if(it.current()->contactId() == contact) { @@ -959,13 +959,13 @@ void ChatView::dragEnterEvent ( QDragEnterEvent * event ) } else if( event->provides( "kopete/x-metacontact" ) ) { - QString metacontactID=QString::fromUtf8(event->encodedData ( "kopete/x-metacontact" )); + TQString metacontactID=TQString::fromUtf8(event->encodedData ( "kopete/x-metacontact" )); Kopete::MetaContact *m=Kopete::ContactList::self()->metaContact(metacontactID); if( m && m_manager->mayInvite()) { - QPtrList<Kopete::Contact> cts=m->contacts(); - for ( QPtrListIterator<Kopete::Contact> it( cts ); it.current(); ++it ) + TQPtrList<Kopete::Contact> cts=m->contacts(); + for ( TQPtrListIterator<Kopete::Contact> it( cts ); it.current(); ++it ) { Kopete::Contact *c=it.current(); if(c && c->account() == m_manager->account()) @@ -978,7 +978,7 @@ void ChatView::dragEnterEvent ( QDragEnterEvent * event ) } // make sure it doesn't come from the current chat view - then it's an emoticon else if ( event->provides( "text/uri-list" ) && m_manager->members().count() == 1 && - ( event->source() != (QWidget*)m_messagePart->view()->viewport() ) ) + ( event->source() != (TQWidget*)m_messagePart->view()->viewport() ) ) { Kopete::ContactPtrList members = m_manager->members(); Kopete::Contact *contact = members.first(); @@ -989,18 +989,18 @@ void ChatView::dragEnterEvent ( QDragEnterEvent * event ) KDockMainWindow::dragEnterEvent(event); } -void ChatView::dropEvent ( QDropEvent * event ) +void ChatView::dropEvent ( TQDropEvent * event ) { if( event->provides( "kopete/x-contact" ) ) { - QStringList lst=QStringList::split( QChar( 0xE000 ) , QString::fromUtf8(event->encodedData ( "kopete/x-contact" )) ); + TQStringList lst=TQStringList::split( TQChar( 0xE000 ) , TQString::fromUtf8(event->encodedData ( "kopete/x-contact" )) ); if(m_manager->mayInvite() && m_manager->protocol()->pluginId() == lst[0] && m_manager->account()->accountId() == lst[1]) { - QString contact=lst[2]; + TQString contact=lst[2]; bool found =false; - QPtrList<Kopete::Contact> cts=m_manager->members(); - for ( QPtrListIterator<Kopete::Contact> it( cts ); it.current(); ++it ) + TQPtrList<Kopete::Contact> cts=m_manager->members(); + for ( TQPtrListIterator<Kopete::Contact> it( cts ); it.current(); ++it ) { if(it.current()->contactId() == contact) { @@ -1014,12 +1014,12 @@ void ChatView::dropEvent ( QDropEvent * event ) } else if( event->provides( "kopete/x-metacontact" ) ) { - QString metacontactID=QString::fromUtf8(event->encodedData ( "kopete/x-metacontact" )); + TQString metacontactID=TQString::fromUtf8(event->encodedData ( "kopete/x-metacontact" )); Kopete::MetaContact *m=Kopete::ContactList::self()->metaContact(metacontactID); if(m && m_manager->mayInvite()) { - QPtrList<Kopete::Contact> cts=m->contacts(); - for ( QPtrListIterator<Kopete::Contact> it( cts ); it.current(); ++it ) + TQPtrList<Kopete::Contact> cts=m->contacts(); + for ( TQPtrListIterator<Kopete::Contact> it( cts ); it.current(); ++it ) { Kopete::Contact *c=it.current(); if(c && c->account() == m_manager->account() && c->isOnline()) @@ -1035,7 +1035,7 @@ void ChatView::dropEvent ( QDropEvent * event ) Kopete::ContactPtrList members = m_manager->members(); Kopete::Contact *contact = members.first(); - if ( !contact || !contact->canAcceptFiles() || !QUriDrag::canDecode( event ) ) + if ( !contact || !contact->canAcceptFiles() || !TQUriDrag::canDecode( event ) ) { event->ignore(); return; @@ -1063,19 +1063,19 @@ void ChatView::dropEvent ( QDropEvent * event ) } -void ChatView::registerContextMenuHandler( QObject *target, const char* slot ) +void ChatView::registerContextMenuHandler( TQObject *target, const char* slot ) { connect( m_messagePart, - SIGNAL( contextMenuEvent( Kopete::Message &, const QString &, KPopupMenu * ) ), + TQT_SIGNAL( contextMenuEvent( Kopete::Message &, const TQString &, KPopupMenu * ) ), target, slot ); } -void ChatView::registerTooltipHandler( QObject *target, const char* slot ) +void ChatView::registerTooltipHandler( TQObject *target, const char* slot ) { connect( m_messagePart, - SIGNAL( tooltipEvent( Kopete::Message &, const QString &, QString & ) ), + TQT_SIGNAL( tooltipEvent( Kopete::Message &, const TQString &, TQString & ) ), target, slot ); |