diff options
Diffstat (limited to 'kopete/kopete/chatwindow')
-rw-r--r-- | kopete/kopete/chatwindow/chatmemberslistwidget.cpp | 14 | ||||
-rw-r--r-- | kopete/kopete/chatwindow/chatmemberslistwidget.h | 2 | ||||
-rw-r--r-- | kopete/kopete/chatwindow/chatmessagepart.cpp | 90 | ||||
-rw-r--r-- | kopete/kopete/chatwindow/chattexteditpart.cpp | 14 | ||||
-rw-r--r-- | kopete/kopete/chatwindow/chatview.cpp | 114 | ||||
-rw-r--r-- | kopete/kopete/chatwindow/chatview.h | 2 | ||||
-rw-r--r-- | kopete/kopete/chatwindow/emoticonselector.cpp | 6 | ||||
-rw-r--r-- | kopete/kopete/chatwindow/kopetechatwindow.cpp | 80 | ||||
-rw-r--r-- | kopete/kopete/chatwindow/kopetechatwindow.h | 2 | ||||
-rw-r--r-- | kopete/kopete/chatwindow/kopetechatwindowstyle.cpp | 4 | ||||
-rw-r--r-- | kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp | 2 | ||||
-rw-r--r-- | kopete/kopete/chatwindow/kopetechatwindowstylemanager.h | 6 | ||||
-rw-r--r-- | kopete/kopete/chatwindow/kopeteemailwindow.cpp | 44 | ||||
-rw-r--r-- | kopete/kopete/chatwindow/krichtexteditpart.cpp | 22 | ||||
-rw-r--r-- | kopete/kopete/chatwindow/tests/chatwindowstyle_test.cpp | 4 | ||||
-rw-r--r-- | kopete/kopete/chatwindow/tests/chatwindowstylerendering_test.cpp | 26 |
16 files changed, 216 insertions, 216 deletions
diff --git a/kopete/kopete/chatwindow/chatmemberslistwidget.cpp b/kopete/kopete/chatwindow/chatmemberslistwidget.cpp index c87d7bda..f7675a44 100644 --- a/kopete/kopete/chatwindow/chatmemberslistwidget.cpp +++ b/kopete/kopete/chatwindow/chatmemberslistwidget.cpp @@ -54,9 +54,9 @@ public: { if( TQListViewItem *item = m_listView->itemAt( pos ) ) { - TQRect tqitemRect = m_listView->tqitemRect( item ); - if( tqitemRect.contains( pos ) ) - tip( tqitemRect, static_cast<ContactItem*>( item )->contact()->toolTip() ); + TQRect itemRect = m_listView->itemRect( item ); + if( itemRect.contains( pos ) ) + tip( itemRect, static_cast<ContactItem*>( item )->contact()->toolTip() ); } } @@ -81,7 +81,7 @@ ChatMembersListWidget::ContactItem::ContactItem( ChatMembersListWidget *parent, connect( m_contact, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), this, TQT_SLOT( slotPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ) ; - settqStatus( parent->session()->contactOnlineStatus(m_contact) ); + setStatus( parent->session()->contactOnlineStatus(m_contact) ); reposition(); } @@ -95,7 +95,7 @@ void ChatMembersListWidget::ContactItem::slotPropertyChanged( Kopete::Contact*, } } -void ChatMembersListWidget::ContactItem::settqStatus( const Kopete::OnlineStatus &status ) +void ChatMembersListWidget::ContactItem::setStatus( const Kopete::OnlineStatus &status ) { setPixmap( 0, status.iconFor( m_contact ) ); reposition(); @@ -200,7 +200,7 @@ void ChatMembersListWidget::slotContactRemoved( const Kopete::Contact *contact ) void ChatMembersListWidget::slotContactStatusChanged( Kopete::Contact *contact, const Kopete::OnlineStatus &status ) { if ( m_members.contains( contact ) ) - m_members[contact]->settqStatus( status ); + m_members[contact]->setStatus( status ); } void ChatMembersListWidget::slotExecute( TQListViewItem *item ) @@ -249,7 +249,7 @@ TQDragObject *ChatMembersListWidget::dragObject() } } - drag->setPixmap( c->onlinetqStatus().iconFor(c, 12) ); + drag->setPixmap( c->onlineStatus().iconFor(c, 12) ); return drag; } diff --git a/kopete/kopete/chatwindow/chatmemberslistwidget.h b/kopete/kopete/chatwindow/chatmemberslistwidget.h index 322dc807..83744110 100644 --- a/kopete/kopete/chatwindow/chatmemberslistwidget.h +++ b/kopete/kopete/chatwindow/chatmemberslistwidget.h @@ -111,7 +111,7 @@ private: friend class ChatMembersListWidget; void reposition(); - void settqStatus( const Kopete::OnlineStatus &status ); + void setStatus( const Kopete::OnlineStatus &status ); Kopete::Contact *m_contact; }; diff --git a/kopete/kopete/chatwindow/chatmessagepart.cpp b/kopete/kopete/chatwindow/chatmessagepart.cpp index 5bb4f204..008692bc 100644 --- a/kopete/kopete/chatwindow/chatmessagepart.cpp +++ b/kopete/kopete/chatwindow/chatmessagepart.cpp @@ -26,7 +26,7 @@ #include <ctime> // TQt includes -#include <tqclipboard.h> +#include <clipboard.h> #include <tqtooltip.h> #include <tqrect.h> #include <tqcursor.h> @@ -34,7 +34,7 @@ #include <tqregexp.h> #include <tqvaluelist.h> #include <tqtimer.h> -#include <tqstylesheet.h> +#include <stylesheet.h> // KHTML::DOM includes #include <dom/dom_doc.h> @@ -263,8 +263,8 @@ ChatMessagePart::ChatMessagePart( Kopete::ChatSession *mgr, TQWidget *parent, co d->saveAction = KStdAction::saveAs( this, TQT_SLOT(save()), actionCollection() ); d->printAction = KStdAction::print( this, TQT_SLOT(print()),actionCollection() ); d->closeAction = KStdAction::close( this, TQT_SLOT(slotCloseView()),actionCollection() ); - d->importEmoticon = new KAction( i18n( "Import Emoticon"), TQString::tqfromLatin1( "importemot" ), 0, this, TQT_SLOT( slotImportEmoticon() ), actionCollection() ); - d->copyURLAction = new KAction( i18n( "Copy Link Address" ), TQString::tqfromLatin1( "editcopy" ), 0, this, TQT_SLOT( slotCopyURL() ), actionCollection() ); + d->importEmoticon = new KAction( i18n( "Import Emoticon"), TQString::fromLatin1( "importemot" ), 0, this, TQT_SLOT( slotImportEmoticon() ), actionCollection() ); + d->copyURLAction = new KAction( i18n( "Copy Link Address" ), TQString::fromLatin1( "editcopy" ), 0, this, TQT_SLOT( slotCopyURL() ), actionCollection() ); // read formatting override flags readOverrides(); @@ -289,7 +289,7 @@ void ChatMessagePart::slotScrollingTo( int /*x*/, int y ) void ChatMessagePart::slotImportEmoticon() { TQString emoticonString = KInputDialog::getText( i18n("Import Emoticon"), - i18n("<qt><img src=\"%1\"><br>Insert the string for the emoticon<br>separated by space if you want multiple strings</qt>").tqarg( d->activeElement.getAttribute("src").string() ) ); + i18n("<qt><img src=\"%1\"><br>Insert the string for the emoticon<br>separated by space if you want multiple strings</qt>").arg( d->activeElement.getAttribute("src").string() ) ); if (emoticonString.isNull() ) return; @@ -335,7 +335,7 @@ void ChatMessagePart::slotImportEmoticon() void ChatMessagePart::save() { - KFileDialog dlg( TQString(), TQString::tqfromLatin1( "text/html text/plain" ), view(), "fileSaveDialog", false ); + KFileDialog dlg( TQString(), TQString::fromLatin1( "text/html text/plain" ), view(), "fileSaveDialog", false ); dlg.setCaption( i18n( "Save Conversation" ) ); dlg.setOperationMode( KFileDialog::Saving ); @@ -350,7 +350,7 @@ void ChatMessagePart::save() TQTextStream stream ( file ); stream.setEncoding(TQTextStream::UnicodeUTF8); - if ( dlg.currentFilter() == TQString::tqfromLatin1( "text/plain" ) ) + if ( dlg.currentFilter() == TQString::fromLatin1( "text/plain" ) ) { TQValueList<Kopete::Message>::ConstIterator it, itEnd = d->allMessages.constEnd(); for(it = d->allMessages.constBegin(); it != itEnd; ++it) @@ -374,7 +374,7 @@ void ChatMessagePart::save() if ( !KIO::NetAccess::move( KURL( tempFile.name() ), saveURL ) ) { KMessageBox::queuedMessageBox( view(), KMessageBox::Error, - i18n("<qt>Could not open <b>%1</b> for writing.</qt>").tqarg( saveURL.prettyURL() ), // Message + i18n("<qt>Could not open <b>%1</b> for writing.</qt>").arg( saveURL.prettyURL() ), // Message i18n("Error While Saving") ); //Caption } } @@ -392,7 +392,7 @@ void ChatMessagePart::pageDown() void ChatMessagePart::slotOpenURLRequest(const KURL &url, const KParts::URLArgs &/*args*/) { kdDebug(14000) << k_funcinfo << "url=" << url.url() << endl; - if ( url.protocol() == TQString::tqfromLatin1("kopetemessage") ) + if ( url.protocol() == TQString::fromLatin1("kopetemessage") ) { Kopete::Contact *contact = d->manager->account()->contacts()[ url.host() ]; if ( contact ) @@ -437,7 +437,7 @@ void ChatMessagePart::setStyleVariant( const TQString &variantPath ) { DOM::HTMLElement variantNode = document().getElementById( TQString::fromUtf8("mainStyle") ); if( !variantNode.isNull() ) - variantNode.setInnerText( TQString("@import url(\"%1\");").tqarg(variantPath) ); + variantNode.setInnerText( TQString("@import url(\"%1\");").arg(variantPath) ); } void ChatMessagePart::slotAppearanceChanged() @@ -626,15 +626,15 @@ const TQString ChatMessagePart::styleHTML() const if( p->fontFace().pointSize() != -1 ) { fontSize = p->fontFace().pointSize(); - fontSizeCss = TQString::fromUtf8("%1pt;").tqarg(fontSize); + fontSizeCss = TQString::fromUtf8("%1pt;").arg(fontSize); } else if( p->fontFace().pixelSize() != -1 ) { fontSize = p->fontFace().pixelSize(); - fontSizeCss = TQString::fromUtf8("%1px;").tqarg(fontSize); + fontSizeCss = TQString::fromUtf8("%1px;").arg(fontSize); } - TQString style = TQString::tqfromLatin1( + TQString style = TQString::fromLatin1( "body{background-color:%1;font-family:%2;font-size:%3;color:%4}" "td{font-family:%5;font-size:%6;color:%7}" "a{color:%8}a.visited{color:%9}" @@ -642,15 +642,15 @@ const TQString ChatMessagePart::styleHTML() const "a.KopeteDisplayName:hover{text-decoration:underline;color:inherit}" ".KopeteLink{cursor:pointer;}.KopeteLink:hover{text-decoration:underline}" ".KopeteMessageBody > p:first-child{margin:0;padding:0;display:inline;}" /* some html messages are encapsuled into a <p> */ ) - .tqarg( p->bgColor().name() ) - .tqarg( p->fontFace().family() ) - .tqarg( fontSizeCss ) - .tqarg( p->textColor().name() ) - .tqarg( p->fontFace().family() ) - .tqarg( fontSizeCss ) - .tqarg( p->textColor().name() ) - .tqarg( p->linkColor().name() ) - .tqarg( p->linkColor().name() ); + .arg( p->bgColor().name() ) + .arg( p->fontFace().family() ) + .arg( fontSizeCss ) + .arg( p->textColor().name() ) + .arg( p->fontFace().family() ) + .arg( fontSizeCss ) + .arg( p->textColor().name() ) + .arg( p->linkColor().name() ) + .arg( p->linkColor().name() ); return style; } @@ -727,7 +727,7 @@ void ChatMessagePart::slotRightClick( const TQString &, const TQPoint &point ) chatWindowPopup->setItemEnabled( 1, false ); chatWindowPopup->insertSeparator(); } - else if ( d->activeElement.tagName().lower() == TQString::tqfromLatin1( "a" ) ) + else if ( d->activeElement.tagName().lower() == TQString::fromLatin1( "a" ) ) { d->copyURLAction->plug( chatWindowPopup ); chatWindowPopup->insertSeparator(); @@ -797,15 +797,15 @@ void ChatMessagePart::slotCopyURL() DOM::HTMLAnchorElement a = d->activeElement; if ( !a.isNull() ) { - TQApplication::tqclipboard()->setText( a.href().string(), TQClipboard::Clipboard ); - TQApplication::tqclipboard()->setText( a.href().string(), TQClipboard::Selection ); + TQApplication::clipboard()->setText( a.href().string(), TQClipboard::Clipboard ); + TQApplication::clipboard()->setText( a.href().string(), TQClipboard::Selection ); } } void ChatMessagePart::slotScrollView() { // NB: view()->contentsHeight() is incorrect before the view has been shown in its window. - // Until this happens, the tqgeometry has not been correctly calculated, so this scrollBy call + // Until this happens, the geometry has not been correctly calculated, so this scrollBy call // will usually scroll to the top of the view. view()->scrollBy( 0, view()->contentsHeight() ); } @@ -955,13 +955,13 @@ void ChatMessagePart::copy(bool justselection /* default false */) htmltextdrag->setSubtype("html"); drag->addDragObject( htmltextdrag ); } - TQApplication::tqclipboard()->setData( drag, TQClipboard::Clipboard ); + TQApplication::clipboard()->setData( drag, TQClipboard::Clipboard ); } - TQApplication::tqclipboard()->setText( text, TQClipboard::Selection ); + TQApplication::clipboard()->setText( text, TQClipboard::Selection ); #else if(!justselection) - TQApplication::tqclipboard()->setText( text, TQClipboard::Clipboard ); - TQApplication::tqclipboard()->setText( text, TQClipboard::Selection ); + TQApplication::clipboard()->setText( text, TQClipboard::Clipboard ); + TQApplication::clipboard()->setText( text, TQClipboard::Selection ); #endif connect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), TQT_SLOT( slotClearSelection())); @@ -1024,8 +1024,8 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML, const protocolIcon = KGlobal::iconLoader()->iconPath( iconName, KIcon::Small ); - nickLink=TQString::tqfromLatin1("<a href=\"kopetemessage://%1/?protocolId=%2&accountId=%3\" class=\"KopeteDisplayName\">") - .tqarg( TQStyleSheet::escape(message.from()->contactId()).replace('"',"""), + nickLink=TQString::fromLatin1("<a href=\"kopetemessage://%1/?protocolId=%2&accountId=%3\" class=\"KopeteDisplayName\">") + .arg( TQStyleSheet::escape(message.from()->contactId()).replace('"',"""), TQStyleSheet::escape(message.from()->protocol()->pluginId()).replace('"',"""), TQStyleSheet::escape(message.from()->account()->accountId() ).replace('"',""")); } @@ -1107,7 +1107,7 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML, const { kdDebug(14000) << k_funcinfo << "Map Action message to Status template. " << endl; - TQString boldNick = TQString::fromUtf8("%1<b>%2</b></a> ").tqarg(nickLink,nick); + TQString boldNick = TQString::fromUtf8("%1<b>%2</b></a> ").arg(nickLink,nick); TQString newBody = boldNick + message.parsedBody(); message.setBody(newBody, Kopete::Message::ParsedHTML ); } @@ -1130,7 +1130,7 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML, const // hash contactId to deterministically pick a color for the contact int hash = 0; for( uint f = 0; f < contactId.length(); ++f ) - hash += contactId[f].tqunicode() * f; + hash += contactId[f].unicode() * f; const TQString colorName = nameColors[ hash % nameColorsLen ]; TQString lightColorName; // Do not initialize, TQColor::name() is expensive! kdDebug(14000) << k_funcinfo << "Hash " << hash << " has color " << colorName << endl; @@ -1180,20 +1180,20 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML ) destinationName = remoteContact->nickName(); // Replace %chatName%, create a internal span to update it by DOM when asked. - resultHTML = resultHTML.replace( TQString::fromUtf8("%chatName%"), TQString("<span id=\"KopeteHeaderChatNameInternal\">%1</span>").tqarg( formatName(d->manager->displayName()) ) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%chatName%"), TQString("<span id=\"KopeteHeaderChatNameInternal\">%1</span>").arg( formatName(d->manager->displayName()) ) ); // Replace %sourceName% resultHTML = resultHTML.replace( TQString::fromUtf8("%sourceName%"), formatName(sourceName) ); // Replace %destinationName% resultHTML = resultHTML.replace( TQString::fromUtf8("%destinationName%"), formatName(destinationName) ); // For %timeOpened%, display the date and time (also the seconds). - resultHTML = resultHTML.replace( TQString::fromUtf8("%timeOpened%"), KGlobal::locale()->formatDateTime( TQDateTime::tqcurrentDateTime(), true, true ) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%timeOpened%"), KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), true, true ) ); // Look for %timeOpened{X}% TQRegExp timeRegExp("%timeOpened\\{([^}]*)\\}%"); int pos=0; while( (pos=timeRegExp.search(resultHTML, pos) ) != -1 ) { - TQString timeKeyword = formatTime( timeRegExp.cap(1), TQDateTime::tqcurrentDateTime() ); + TQString timeKeyword = formatTime( timeRegExp.cap(1), TQDateTime::currentDateTime() ); resultHTML = resultHTML.replace( pos , timeRegExp.cap(0).length() , timeKeyword ); } // Get contact image paths @@ -1213,7 +1213,7 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML ) TQString photoIncoming, photoOutgoing; if( remoteContact->metaContact() && !remoteContact->metaContact()->picture().isNull() ) { - photoIncoming = TQString("data:image/png;base64,%1").tqarg( remoteContact->metaContact()->picture().base64() ); + photoIncoming = TQString("data:image/png;base64,%1").arg( remoteContact->metaContact()->picture().base64() ); } else { @@ -1222,7 +1222,7 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML ) if( d->manager->myself()->metaContact() && !d->manager->myself()->metaContact()->picture().isNull() ) { - photoOutgoing = TQString("data:image/png;base64,%1").tqarg( d->manager->myself()->metaContact()->picture().base64() ); + photoOutgoing = TQString("data:image/png;base64,%1").arg( d->manager->myself()->metaContact()->picture().base64() ); } else { @@ -1274,7 +1274,7 @@ TQString ChatMessagePart::formatMessageBody(const Kopete::Message &message) formattedBody += message.getHtmlStyleAttribute(); // Affect the parsed body. - formattedBody += TQString::fromUtf8("class=\"KopeteMessageBody\">%1</span>").tqarg(message.parsedBody()); + formattedBody += TQString::fromUtf8("class=\"KopeteMessageBody\">%1</span>").arg(message.parsedBody()); return formattedBody; } @@ -1363,11 +1363,11 @@ void ChatMessagePart::writeTemplate() "%3\n" "</body>" "</html>" - ).tqarg( d->currentChatStyle->getStyleBaseHref() ) - .tqarg( formatStyleKeywords(d->currentChatStyle->getHeaderHtml()) ) - .tqarg( formatStyleKeywords(d->currentChatStyle->getFooterHtml()) ) - .tqarg( KopetePrefs::prefs()->styleVariant() ) - .tqarg( styleHTML() ); + ).arg( d->currentChatStyle->getStyleBaseHref() ) + .arg( formatStyleKeywords(d->currentChatStyle->getHeaderHtml()) ) + .arg( formatStyleKeywords(d->currentChatStyle->getFooterHtml()) ) + .arg( KopetePrefs::prefs()->styleVariant() ) + .arg( styleHTML() ); write(xhtmlBase); end(); #ifdef STYLE_TIMETEST diff --git a/kopete/kopete/chatwindow/chattexteditpart.cpp b/kopete/kopete/chatwindow/chattexteditpart.cpp index 1cb9ddf3..191e7b01 100644 --- a/kopete/kopete/chatwindow/chattexteditpart.cpp +++ b/kopete/kopete/chatwindow/chattexteditpart.cpp @@ -130,8 +130,8 @@ void ChatTextEditPart::complete() if ( parIdx > 0 ) { - int firstSpace = txt.findRev( TQRegExp( TQString::tqfromLatin1("\\s\\S+") ), parIdx - 1 ) + 1; - int lastSpace = txt.find( TQRegExp( TQString::tqfromLatin1("[\\s\\:]") ), firstSpace ); + int firstSpace = txt.findRev( TQRegExp( TQString::fromLatin1("\\s\\S+") ), parIdx - 1 ) + 1; + int lastSpace = txt.find( TQRegExp( TQString::fromLatin1("[\\s\\:]") ), firstSpace ); if( lastSpace == -1 ) lastSpace = txt.length(); @@ -158,7 +158,7 @@ void ChatTextEditPart::complete() if ( para == 0 && firstSpace == 0 && rightText[0] != TQChar(':') ) { - rightText = match + TQString::tqfromLatin1(": ") + rightText; + rightText = match + TQString::fromLatin1(": ") + rightText; parIdx += 2; } else @@ -245,11 +245,11 @@ bool ChatTextEditPart::canSend() return true; } -void ChatTextEditPart::slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &newtqStatus, const Kopete::OnlineStatus &oldtqStatus ) +void ChatTextEditPart::slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &newStatus, const Kopete::OnlineStatus &oldStatus ) { //FIXME: should use signal contact->isReachableChanged, but it doesn't exist ;( - if ( ( oldtqStatus.status() == Kopete::OnlineStatus::Offline ) - != ( newtqStatus.status() == Kopete::OnlineStatus::Offline ) ) + if ( ( oldStatus.status() == Kopete::OnlineStatus::Offline ) + != ( newStatus.status() == Kopete::OnlineStatus::Offline ) ) { emit canSendChanged( canSend() ); } @@ -262,7 +262,7 @@ void ChatTextEditPart::sendMessage() if ( txt.isEmpty() || txt == "\n" ) return; - if ( m_lastMatch.isNull() && ( txt.find( TQRegExp( TQString::tqfromLatin1("^\\w+:\\s") ) ) > -1 ) ) + if ( m_lastMatch.isNull() && ( txt.find( TQRegExp( TQString::fromLatin1("^\\w+:\\s") ) ) > -1 ) ) { //no last match and it finds something of the form of "word:" at the start of a line TQString search = txt.left( txt.find(':') ); if( !search.isEmpty() ) diff --git a/kopete/kopete/chatwindow/chatview.cpp b/kopete/kopete/chatwindow/chatview.cpp index f2b80969..4f356690 100644 --- a/kopete/kopete/chatwindow/chatview.cpp +++ b/kopete/kopete/chatwindow/chatview.cpp @@ -81,7 +81,7 @@ ChatView::ChatView( Kopete::ChatSession *mgr, ChatWindowPlugin *parent, const ch m_mainWindow = 0L; membersDock = 0L; - memberstqStatus = Smart; + membersStatus = Smart; m_tabState = Normal; @@ -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(TQString::tqfromLatin1( "viewDock" ), TQPixmap(), - 0L,TQString::tqfromLatin1("viewDock"), TQString::tqfromLatin1(" ")); + 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,8 +98,8 @@ 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( TQString::tqfromLatin1( "editDock" ), TQPixmap(), - 0L, TQString::tqfromLatin1("editDock"), TQString::tqfromLatin1(" ") ); + 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 @@ -310,14 +310,14 @@ void ChatView::makeVisible() { m_mainWindow = KopeteChatWindow::window( m_manager ); // if ( root ) -// root->tqrepaint( true ); +// root->repaint( true ); emit windowCreated(); } if ( !m_mainWindow->isVisible() ) { m_mainWindow->show(); - // scroll down post show and tqlayout, otherwise the tqgeometry is wrong to scroll to the bottom. + // scroll down post show and layout, otherwise the geometry is wrong to scroll to the bottom. m_messagePart->keepScrolledDown(); } @@ -353,22 +353,22 @@ bool ChatView::closeView( bool force ) 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>").tqarg( shortCaption ), i18n( "Closing Group Chat" ), - i18n( "Cl&ose Chat" ), TQString::tqfromLatin1( "AskCloseGroupChat" ) ); + "You will not receive future messages from this conversation.</qt>").arg( shortCaption ), i18n( "Closing Group Chat" ), + 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>").tqarg( unreadMessageFrom ), i18n( "Unread Message" ), - i18n( "Cl&ose Chat" ), TQString::tqfromLatin1("AskCloseChatRecentMessage" ) ); + "second. Are you sure you want to close this chat?</qt>").arg( unreadMessageFrom ), i18n( "Unread Message" ), + 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" ), TQString::tqfromLatin1( "AskCloseChatMessageInProgress" ) ); + i18n( "Cl&ose Chat" ), TQString::fromLatin1( "AskCloseChatMessageInProgress" ) ); } } @@ -418,8 +418,8 @@ void ChatView::createMembersList() if ( !membersDock ) { //Create the chat members list - membersDock = createDockWidget( TQString::tqfromLatin1( "membersDock" ), TQPixmap(), 0L, - TQString::tqfromLatin1( "membersDock" ), TQString::tqfromLatin1( " " ) ); + 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 ); @@ -428,21 +428,21 @@ void ChatView::createMembersList() if ( members.first() && members.first()->metaContact() != 0 ) { - memberstqStatus = static_cast<MembersListPolicy> + membersStatus = static_cast<MembersListPolicy> ( members.first()->metaContact()->pluginData - ( m_manager->protocol(), TQString::tqfromLatin1( "MembersListPolicy" ) ).toInt() + ( m_manager->protocol(), TQString::fromLatin1( "MembersListPolicy" ) ).toInt() ); } else { - memberstqStatus = Smart; + membersStatus = Smart; } - if( memberstqStatus == Smart ) + if( membersStatus == Smart ) d->visibleMembers = ( m_manager->members().count() > 1 ); else - d->visibleMembers = ( memberstqStatus == Visible ); + d->visibleMembers = ( membersStatus == Visible ); placeMembersList( membersDockPosition ); } @@ -453,13 +453,13 @@ void ChatView::toggleMembersVisibility() if( membersDock ) { d->visibleMembers = !d->visibleMembers; - memberstqStatus = d->visibleMembers ? Visible : Hidden; + membersStatus = d->visibleMembers ? Visible : Hidden; placeMembersList( membersDockPosition ); Kopete::ContactPtrList members = m_manager->members(); if ( members.first()->metaContact() ) { members.first()->metaContact()->setPluginData( m_manager->protocol(), - TQString::tqfromLatin1( "MembersListPolicy" ), TQString::number(memberstqStatus) ); + TQString::fromLatin1( "MembersListPolicy" ), TQString::number(membersStatus) ); } //refreshView(); } @@ -467,7 +467,7 @@ void ChatView::toggleMembersVisibility() void ChatView::placeMembersList( KDockWidget::DockPosition dp ) { -// kdDebug(14000) << k_funcinfo << "Members list policy " << memberstqStatus << +// kdDebug(14000) << k_funcinfo << "Members list policy " << membersStatus << // ", visible " << d->visibleMembers << endl; if ( d->visibleMembers ) @@ -476,17 +476,17 @@ void ChatView::placeMembersList( KDockWidget::DockPosition dp ) // look up the dock width int dockWidth; - KGlobal::config()->setGroup( TQString::tqfromLatin1( "ChatViewDock" ) ); + KGlobal::config()->setGroup( TQString::fromLatin1( "ChatViewDock" ) ); if( membersDockPosition == KDockWidget::DockLeft ) { dockWidth = KGlobal::config()->readNumEntry( - TQString::tqfromLatin1( "membersDock,viewDock:sepPos" ), 30); + TQString::fromLatin1( "membersDock,viewDock:sepPos" ), 30); } else { dockWidth = KGlobal::config()->readNumEntry( - TQString::tqfromLatin1( "viewDock,membersDock:sepPos" ), 70); + TQString::fromLatin1( "viewDock,membersDock:sepPos" ), 70); } // Make sure it is shown then place it wherever @@ -547,11 +547,11 @@ void ChatView::remoteTyping( const Kopete::Contact *contact, bool isTyping ) if( !typingList.isEmpty() ) { if ( typingList.count() == 1 ) - setStatusText( i18n( "%1 is typing a message" ).tqarg( typingList.first() ) ); + setStatusText( i18n( "%1 is typing a message" ).arg( typingList.first() ) ); else { - TQString statusTyping = typingList.join( TQString::tqfromLatin1( ", " ) ); - setStatusText( i18n( "%1 is a list of names", "%1 are typing a message" ).tqarg( statusTyping ) ); + TQString statusTyping = typingList.join( TQString::fromLatin1( ", " ) ); + setStatusText( i18n( "%1 is a list of names", "%1 are typing a message" ).arg( statusTyping ) ); } updateChatState( Typing ); } @@ -565,7 +565,7 @@ void ChatView::setStatusText( const TQString &status ) { d->statusText = status; if ( d->isActive ) - m_mainWindow->settqStatus( status ); + m_mainWindow->setStatus( status ); } const TQString& ChatView::statusText() @@ -631,9 +631,9 @@ void ChatView::slotContactAdded(const Kopete::Contact *contact, bool suppress) } if( !suppress && m_manager->members().count() > 1 ) - sendInternalMessage( i18n("%1 has joined the chat.").tqarg(contactName) ); + sendInternalMessage( i18n("%1 has joined the chat.").arg(contactName) ); - if( memberstqStatus == Smart && membersDock ) + if( membersStatus == Smart && membersDock ) { bool shouldShowMembers = ( m_manager->members().count() > 1); if( shouldShowMembers != d->visibleMembers ) @@ -682,9 +682,9 @@ void ChatView::slotContactRemoved( const Kopete::Contact *contact, const TQStrin if ( !suppressNotification ) { if ( reason.isEmpty() ) - sendInternalMessage( i18n( "%1 has left the chat." ).tqarg( contactName ), format ) ; + sendInternalMessage( i18n( "%1 has left the chat." ).arg( contactName ), format ) ; else - sendInternalMessage( i18n( "%1 has left the chat (%2)." ).tqarg( contactName, reason ), format); + sendInternalMessage( i18n( "%1 has left the chat (%2)." ).arg( contactName, reason ), format); } } @@ -711,7 +711,7 @@ void ChatView::setCaption( const TQString &text, bool modified ) //Call the original set caption KDockMainWindow::setCaption( newCaption, false ); - emit updateChatTooltip( this, TQString::tqfromLatin1("<qt>%1</qt>").tqarg( 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 ) @@ -773,18 +773,18 @@ void ChatView::slotToggleRtfToolbar( bool enabled ) emit rtfEnabled( this, enabled ); } -void ChatView::slotContactStatusChanged( Kopete::Contact *contact, const Kopete::OnlineStatus &newtqStatus, const Kopete::OnlineStatus &oldtqStatus ) +void ChatView::slotContactStatusChanged( Kopete::Contact *contact, const Kopete::OnlineStatus &newStatus, const Kopete::OnlineStatus &oldStatus ) { kdDebug(14000) << k_funcinfo << contact << endl; - bool inhibitNotification = ( newtqStatus.status() == Kopete::OnlineStatus::Unknown || - oldtqStatus.status() == Kopete::OnlineStatus::Unknown ); + bool inhibitNotification = ( newStatus.status() == Kopete::OnlineStatus::Unknown || + oldStatus.status() == Kopete::OnlineStatus::Unknown ); if ( contact && KopetePrefs::prefs()->showEvents() && !inhibitNotification ) { if ( contact->account() && contact == contact->account()->myself() ) { // Separate notification for the 'self' contact - if ( newtqStatus.status() != Kopete::OnlineStatus::Connecting ) - sendInternalMessage( i18n( "You are now marked as %1." ).tqarg( newtqStatus.description() ) ); + if ( newStatus.status() != Kopete::OnlineStatus::Connecting ) + sendInternalMessage( i18n( "You are now marked as %1." ).arg( newStatus.description() ) ); } else if ( !contact->account() || !contact->account()->suppressStatusNotification() ) { @@ -792,13 +792,13 @@ void ChatView::slotContactStatusChanged( Kopete::Contact *contact, const Kopete: if ( contact->metaContact() && contact->metaContact() != Kopete::ContactList::self()->myself() ) { sendInternalMessage( i18n( "%2 is now %1." ) - .tqarg( newtqStatus.description(), contact->metaContact()->displayName() ) ); + .arg( newStatus.description(), contact->metaContact()->displayName() ) ); } else { TQString nick=contact->nickName(); sendInternalMessage( i18n( "%2 is now %1." ) - .tqarg( newtqStatus.description(), nick ) ); + .arg( newStatus.description(), nick ) ); } } } @@ -835,9 +835,9 @@ void ChatView::saveOptions() { KConfig *config = KGlobal::config(); - writeDockConfig ( config, TQString::tqfromLatin1( "ChatViewDock" ) ); - config->setGroup( TQString::tqfromLatin1( "ChatViewDock" ) ); - config->writeEntry( TQString::tqfromLatin1( "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(); - TQString contactListGroup = TQString::tqfromLatin1("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 - TQString contactListGroup = TQString::tqfromLatin1("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, TQString::tqfromLatin1("ChatViewDock") ); + //dockManager->readConfig ( config, TQString::fromLatin1("ChatViewDock") ); //Work-around to restore dock widget positions - config->setGroup( TQString::tqfromLatin1( "ChatViewDock" ) ); + config->setGroup( TQString::fromLatin1( "ChatViewDock" ) ); membersDockPosition = static_cast<KDockWidget::DockPosition>( - config->readNumEntry( TQString::tqfromLatin1( "membersDockPosition" ), KDockWidget::DockRight ) ); + config->readNumEntry( TQString::fromLatin1( "membersDockPosition" ), KDockWidget::DockRight ) ); - TQString dockKey = TQString::tqfromLatin1( "viewDock" ); + TQString dockKey = TQString::fromLatin1( "viewDock" ); if ( d->visibleMembers ) { if( membersDockPosition == KDockWidget::DockLeft ) - dockKey.prepend( TQString::tqfromLatin1( "membersDock," ) ); + dockKey.prepend( TQString::fromLatin1( "membersDock," ) ); else if( membersDockPosition == KDockWidget::DockRight ) - dockKey.append( TQString::tqfromLatin1( ",membersDock" ) ); + dockKey.append( TQString::fromLatin1( ",membersDock" ) ); } - dockKey.append( TQString::tqfromLatin1( ",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 ); @@ -937,7 +937,7 @@ void ChatView::dragEnterEvent ( TQDragEnterEvent * event ) { if( event->provides( "kopete/x-contact" ) ) { - TQStringList lst=TQStringList::split( TQChar( 0xE000 ) , TQString::fromUtf8(event->tqencodedData ( "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]) { TQString contact=lst[2]; @@ -959,7 +959,7 @@ void ChatView::dragEnterEvent ( TQDragEnterEvent * event ) } else if( event->provides( "kopete/x-metacontact" ) ) { - TQString metacontactID=TQString::fromUtf8(event->tqencodedData ( "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()) @@ -993,7 +993,7 @@ void ChatView::dropEvent ( TQDropEvent * event ) { if( event->provides( "kopete/x-contact" ) ) { - TQStringList lst=TQStringList::split( TQChar( 0xE000 ) , TQString::fromUtf8(event->tqencodedData ( "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]) { TQString contact=lst[2]; @@ -1014,7 +1014,7 @@ void ChatView::dropEvent ( TQDropEvent * event ) } else if( event->provides( "kopete/x-metacontact" ) ) { - TQString metacontactID=TQString::fromUtf8(event->tqencodedData ( "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()) { diff --git a/kopete/kopete/chatwindow/chatview.h b/kopete/kopete/chatwindow/chatview.h index 29aa5d17..f7ec6f76 100644 --- a/kopete/kopete/chatwindow/chatview.h +++ b/kopete/kopete/chatwindow/chatview.h @@ -382,7 +382,7 @@ private: // position and visibility of the chat member list KDockWidget::DockPosition membersDockPosition; enum MembersListPolicy { Smart = 0, Visible = 1, Hidden = 2 }; - MembersListPolicy memberstqStatus; + MembersListPolicy membersStatus; // miscellany TQPtrDict<TQTimer> m_remoteTypingMap; diff --git a/kopete/kopete/chatwindow/emoticonselector.cpp b/kopete/kopete/chatwindow/emoticonselector.cpp index 3d8f1bbf..52ef204f 100644 --- a/kopete/kopete/chatwindow/emoticonselector.cpp +++ b/kopete/kopete/chatwindow/emoticonselector.cpp @@ -25,7 +25,7 @@ #include <math.h> #include <tqmovie.h> -#include <tqlayout.h> +#include <layout.h> #include <tqobjectlist.h> #include <tqtooltip.h> #include <tqobjectlist.h> @@ -37,7 +37,7 @@ EmoticonLabel::EmoticonLabel(const TQString &emoticonText, const TQString &pixma { mText = emoticonText; setMovie( TQMovie(pixmapPath) ); - tqsetAlignment(TQt::AlignCenter); + setAlignment(TQt::AlignCenter); TQToolTip::add(this,emoticonText); // Somehow TQLabel doesn't tell a reasonable size when you use setMovie // although it does it correctly for setPixmap. Therefore here is a little workaround @@ -100,7 +100,7 @@ void EmoticonSelector::prepareList(void) else col++; } - resize(tqminimumSizeHint()); + resize(minimumSizeHint()); } void EmoticonSelector::emoticonClicked(const TQString &str) diff --git a/kopete/kopete/chatwindow/kopetechatwindow.cpp b/kopete/kopete/chatwindow/kopetechatwindow.cpp index f8cf09b2..59ee5671 100644 --- a/kopete/kopete/chatwindow/kopetechatwindow.cpp +++ b/kopete/kopete/chatwindow/kopetechatwindow.cpp @@ -22,7 +22,7 @@ #include <tqtimer.h> #include <tqhbox.h> #include <tqvbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqtooltip.h> #include <tqfileinfo.h> @@ -185,17 +185,17 @@ KopeteChatWindow::KopeteChatWindow( TQWidget *parent, const char* name ) mainArea = new TQFrame( vBox ); mainArea->setLineWidth( 0 ); - mainArea->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); + mainArea->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); mainLayout = new TQVBoxLayout( mainArea ); if ( KopetePrefs::prefs()->chatWShowSend() ) { //Send Button m_button_send = new KPushButton( i18n("Send"), statusBar() ); - m_button_send->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) ); + m_button_send->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) ); m_button_send->setEnabled( false ); m_button_send->setFont( statusBar()->font() ); - m_button_send->setFixedHeight( statusBar()->tqsizeHint().height() ); + m_button_send->setFixedHeight( statusBar()->sizeHint().height() ); connect( m_button_send, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSendMessage() ) ); statusBar()->addWidget( m_button_send, 0, true ); } @@ -203,9 +203,9 @@ KopeteChatWindow::KopeteChatWindow( TQWidget *parent, const char* name ) m_button_send = 0L; m_status_text = new KSqueezedTextLabel( i18n("Ready."), statusBar(), "m_status_text" ); - m_status_text->tqsetAlignment( AlignLeft | AlignVCenter ); + m_status_text->setAlignment( AlignLeft | AlignVCenter ); m_status_text->setFont( statusBar()->font() ); - m_status_text->setFixedHeight( statusBar()->tqsizeHint().height() ); + m_status_text->setFixedHeight( statusBar()->sizeHint().height() ); statusBar()->addWidget( m_status_text, 1 ); readOptions(); @@ -214,9 +214,9 @@ KopeteChatWindow::KopeteChatWindow( TQWidget *parent, const char* name ) windows.append( this ); windowListChanged(); - KGlobal::config()->setGroup( TQString::tqfromLatin1("ChatWindowSettings") ); - m_alwaysShowTabs = KGlobal::config()->readBoolEntry( TQString::tqfromLatin1("AlwaysShowTabs"), false ); - m_showFormatToolbar = KGlobal::config()->readBoolEntry( TQString::tqfromLatin1("Show Format Toolbar"), true ); + KGlobal::config()->setGroup( TQString::fromLatin1("ChatWindowSettings") ); + m_alwaysShowTabs = KGlobal::config()->readBoolEntry( TQString::fromLatin1("AlwaysShowTabs"), false ); + m_showFormatToolbar = KGlobal::config()->readBoolEntry( TQString::fromLatin1("Show Format Toolbar"), true ); adjustingFormatToolbar = false; // kdDebug( 14010 ) << k_funcinfo << "Open Windows: " << windows.count() << endl; kapp->ref(); @@ -313,7 +313,7 @@ void KopeteChatWindow::initActions(void) createStandardStatusBarAction(); - chatSend = new KAction( i18n( "&Send Message" ), TQString::tqfromLatin1( "mail_send" ), TQKeySequence(Key_Return) , + chatSend = new KAction( i18n( "&Send Message" ), TQString::fromLatin1( "mail_send" ), TQKeySequence(Key_Return) , TQT_TQOBJECT(this), TQT_SLOT( slotSendMessage() ), coll, "chat_send" ); chatSend->setEnabled( false ); @@ -334,11 +334,11 @@ void KopeteChatWindow::initActions(void) nickComplete = new KAction( i18n( "Nic&k Completion" ), TQString(), 0, TQT_TQOBJECT(this), TQT_SLOT( slotNickComplete() ), coll , "nick_compete"); nickComplete->setShortcut( TQKeySequence( Key_Tab ) ); - tabDetach = new KAction( i18n( "&Detach Chat" ), TQString::tqfromLatin1( "tab_breakoff" ), 0, + tabDetach = new KAction( i18n( "&Detach Chat" ), TQString::fromLatin1( "tab_breakoff" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotDetachChat() ), coll, "tabs_detach" ); tabDetach->setEnabled( false ); - actionDetachMenu = new KActionMenu( i18n( "&Move Tab to Window" ), TQString::tqfromLatin1( "tab_breakoff" ), coll, "tabs_detachmove" ); + actionDetachMenu = new KActionMenu( i18n( "&Move Tab to Window" ), TQString::fromLatin1( "tab_breakoff" ), coll, "tabs_detachmove" ); actionDetachMenu->setDelayed( false ); connect ( actionDetachMenu->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotPrepareDetachMenu()) ); @@ -354,9 +354,9 @@ void KopeteChatWindow::initActions(void) KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT(slotCopy()), coll); KStdAction::paste( TQT_TQOBJECT(this), TQT_SLOT(slotPaste()), coll); - new KAction( i18n( "Set Default &Font..." ), TQString::tqfromLatin1( "charset" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetFont() ), coll, "format_font" ); - new KAction( i18n( "Set Default Text &Color..." ), TQString::tqfromLatin1( "pencil" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetFgColor() ), coll, "format_fgcolor" ); - new KAction( i18n( "Set &Background Color..." ), TQString::tqfromLatin1( "fill" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetBgColor() ), coll, "format_bgcolor" ); + new KAction( i18n( "Set Default &Font..." ), TQString::fromLatin1( "charset" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetFont() ), coll, "format_font" ); + new KAction( i18n( "Set Default Text &Color..." ), TQString::fromLatin1( "pencil" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetFgColor() ), coll, "format_fgcolor" ); + new KAction( i18n( "Set &Background Color..." ), TQString::fromLatin1( "fill" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetBgColor() ), coll, "format_bgcolor" ); historyUp = new KAction( i18n( "Previous History" ), TQString(), 0, TQT_TQOBJECT(this), TQT_SLOT( slotHistoryUp() ), coll, "history_up" ); @@ -397,8 +397,8 @@ void KopeteChatWindow::initActions(void) KopeteStdAction::preferences( coll , "settings_prefs" ); //The Sending movie - normalIcon = TQPixmap( BarIcon( TQString::tqfromLatin1( "kopete" ) ) ); - animIcon = KGlobal::iconLoader()->loadMovie( TQString::tqfromLatin1( "newmessage" ), KIcon::Toolbar); + normalIcon = TQPixmap( BarIcon( TQString::fromLatin1( "kopete" ) ) ); + animIcon = KGlobal::iconLoader()->loadMovie( TQString::fromLatin1( "newmessage" ), KIcon::Toolbar); // Pause the animation because otherwise it's running even when we're not // showing it. This eats resources, and also triggers a pixmap leak in @@ -418,7 +418,7 @@ void KopeteChatWindow::initActions(void) //toolBar()->alignItemRight( 99 ); setStandardToolBarMenuEnabled( true ); - setXMLFile( TQString::tqfromLatin1( "kopetechatwindow.rc" ) ); + setXMLFile( TQString::fromLatin1( "kopetechatwindow.rc" ) ); createGUI( 0L ); // Special handling for remembering whether the format toolbar is visible or not @@ -581,7 +581,7 @@ void KopeteChatWindow::slotSetBgColor() m_activeView->setBgColor(); } -void KopeteChatWindow::settqStatus(const TQString &text) +void KopeteChatWindow::setStatus(const TQString &text) { m_status_text->setText(text); } @@ -590,11 +590,11 @@ void KopeteChatWindow::createTabBar() { if( !m_tabBar ) { - KGlobal::config()->setGroup( TQString::tqfromLatin1("ChatWindowSettings") ); + KGlobal::config()->setGroup( TQString::fromLatin1("ChatWindowSettings") ); m_tabBar = new KTabWidget( mainArea ); - m_tabBar->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); - m_tabBar->setHoverCloseButton(KGlobal::config()->readBoolEntry( TQString::tqfromLatin1("HoverClose"), false )); + m_tabBar->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); + m_tabBar->setHoverCloseButton(KGlobal::config()->readBoolEntry( TQString::fromLatin1("HoverClose"), false )); m_tabBar->setTabReorderingEnabled(true); #if KDE_IS_VERSION(3,4,0) m_tabBar->setAutomaticResizeTabs(true); @@ -621,7 +621,7 @@ void KopeteChatWindow::createTabBar() else setActiveView( chatViewList.first() ); - int tabPosition = KGlobal::config()->readNumEntry( TQString::tqfromLatin1("Tab Placement") , 0 ); + int tabPosition = KGlobal::config()->readNumEntry( TQString::fromLatin1("Tab Placement") , 0 ); slotPlaceTabs( tabPosition ); } } @@ -637,7 +637,7 @@ void KopeteChatWindow::addTab( ChatView *view ) Kopete::Contact *c=0L; for ( Kopete::Contact *contact = chatMembers.first(); contact; contact = chatMembers.next() ) { - if(!c || c->onlinetqStatus() < contact->onlinetqStatus()) + if(!c || c->onlineStatus() < contact->onlineStatus()) c=contact; } TQPixmap pluginIcon = c ? view->msgManager()->contactOnlineStatus( c ).iconFor( c) : SmallIcon( view->msgManager()->protocol()->pluginIcon() ); @@ -829,7 +829,7 @@ void KopeteChatWindow::updateBackground( const TQPixmap &pm ) backgroundFile->unlink(); } - backgroundFile = new KTempFile( TQString(), TQString::tqfromLatin1( ".bmp" ) ); + backgroundFile = new KTempFile( TQString(), TQString::fromLatin1( ".bmp" ) ); pm.save( backgroundFile->name(), "BMP" ); TQTimer::singleShot( 100, this, TQT_SLOT( slotEnableUpdateBg() ) ); } @@ -892,7 +892,7 @@ void KopeteChatWindow::setActiveView( TQWidget *widget ) } setCaption( m_activeView->caption() ); - settqStatus( m_activeView->statusText() ); + setStatus( m_activeView->statusText() ); m_activeView->setFocus(); updateSpellCheckAction(); slotUpdateSendEnabled(); @@ -909,7 +909,7 @@ void KopeteChatWindow::slotUpdateCaptionIcons( ChatView *view ) Kopete::Contact *c=0L; for ( Kopete::Contact *contact = chatMembers.first(); contact; contact = chatMembers.next() ) { - if(!c || c->onlinetqStatus() < contact->onlinetqStatus()) + if(!c || c->onlineStatus() < contact->onlineStatus()) c=contact; } @@ -986,15 +986,15 @@ void KopeteChatWindow::slotPrepareContactMenu(void) p, TQT_SLOT(deleteLater() ) ); if( contact->metaContact() ) - contactsMenu->insertItem( contact->onlinetqStatus().iconFor( contact ) , contact->metaContact()->displayName(), p ); + contactsMenu->insertItem( contact->onlineStatus().iconFor( contact ) , contact->metaContact()->displayName(), p ); else - contactsMenu->insertItem( contact->onlinetqStatus().iconFor( contact ) , contact->contactId(), p ); + contactsMenu->insertItem( contact->onlineStatus().iconFor( contact ) , contact->contactId(), p ); //FIXME: This number should be a config option if( ++contactCount == 15 && contact != m_them.getLast() ) { KActionMenu *moreMenu = new KActionMenu( i18n("More..."), - TQString::tqfromLatin1("folder_open"), TQT_TQOBJECT(contactsMenu) ); + TQString::fromLatin1("folder_open"), TQT_TQOBJECT(contactsMenu) ); connect ( actionContactMenu->popupMenu(), TQT_SIGNAL(aboutToHide()), moreMenu, TQT_SLOT(deleteLater() ) ); moreMenu->plug( contactsMenu ); @@ -1032,9 +1032,9 @@ void KopeteChatWindow::readOptions() // load and apply config file settings affecting the appearance of the UI // kdDebug(14010) << k_funcinfo << endl; KConfig *config = KGlobal::config(); - applyMainWindowSettings( config, TQString::tqfromLatin1( "KopeteChatWindow" ) ); - config->setGroup( TQString::tqfromLatin1("ChatWindowSettings") ); - m_showFormatToolbar = config->readBoolEntry( TQString::tqfromLatin1("Show Format Toolbar"), true ); + applyMainWindowSettings( config, TQString::fromLatin1( "KopeteChatWindow" ) ); + config->setGroup( TQString::fromLatin1("ChatWindowSettings") ); + m_showFormatToolbar = config->readBoolEntry( TQString::fromLatin1("Show Format Toolbar"), true ); } void KopeteChatWindow::saveOptions() @@ -1044,12 +1044,12 @@ void KopeteChatWindow::saveOptions() KConfig *config = KGlobal::config(); // saves menubar,toolbar and statusbar setting - saveMainWindowSettings( config, TQString::tqfromLatin1( "KopeteChatWindow" ) ); - config->setGroup( TQString::tqfromLatin1("ChatWindowSettings") ); + saveMainWindowSettings( config, TQString::fromLatin1( "KopeteChatWindow" ) ); + config->setGroup( TQString::fromLatin1("ChatWindowSettings") ); if( m_tabBar ) - config->writeEntry ( TQString::tqfromLatin1("Tab Placement"), m_tabBar->tabPosition() ); + config->writeEntry ( TQString::fromLatin1("Tab Placement"), m_tabBar->tabPosition() ); - config->writeEntry( TQString::tqfromLatin1("Show Format Toolbar"), m_showFormatToolbar ); + config->writeEntry( TQString::fromLatin1("Show Format Toolbar"), m_showFormatToolbar ); config->sync(); } @@ -1214,7 +1214,7 @@ void KopeteChatWindow::slotConfKeys() void KopeteChatWindow::slotConfToolbar() { - saveMainWindowSettings(KGlobal::config(), TQString::tqfromLatin1( "KopeteChatWindow" )); + saveMainWindowSettings(KGlobal::config(), TQString::fromLatin1( "KopeteChatWindow" )); KEditToolbar *dlg = new KEditToolbar(factory(), this ); if (dlg->exec()) { @@ -1222,7 +1222,7 @@ void KopeteChatWindow::slotConfToolbar() createGUI( m_activeView->editPart() ); else createGUI( 0L ); - applyMainWindowSettings(KGlobal::config(), TQString::tqfromLatin1( "KopeteChatWindow" )); + applyMainWindowSettings(KGlobal::config(), TQString::fromLatin1( "KopeteChatWindow" )); } delete dlg; } @@ -1256,7 +1256,7 @@ void KopeteChatWindow::updateChatState( ChatView* cv, int newState ) void KopeteChatWindow::updateChatTooltip( ChatView* cv ) { if ( m_tabBar ) - m_tabBar->setTabToolTip( cv, TQString::tqfromLatin1("<qt>%1</qt>").tqarg( cv->caption() ) ); + m_tabBar->setTabToolTip( cv, TQString::fromLatin1("<qt>%1</qt>").arg( cv->caption() ) ); } void KopeteChatWindow::updateChatLabel() diff --git a/kopete/kopete/chatwindow/kopetechatwindow.h b/kopete/kopete/chatwindow/kopetechatwindow.h index 0e101fc3..8929d4c4 100644 --- a/kopete/kopete/chatwindow/kopetechatwindow.h +++ b/kopete/kopete/chatwindow/kopetechatwindow.h @@ -93,7 +93,7 @@ public: ChatView *activeView(); void updateMembersActions(); - void settqStatus( const TQString & ); + void setStatus( const TQString & ); /** * Reimplemented from KMainWindow - asks each ChatView in the window if it is ok to close the window diff --git a/kopete/kopete/chatwindow/kopetechatwindowstyle.cpp b/kopete/kopete/chatwindow/kopetechatwindowstyle.cpp index 5eba33f0..541e8027 100644 --- a/kopete/kopete/chatwindow/kopetechatwindowstyle.cpp +++ b/kopete/kopete/chatwindow/kopetechatwindowstyle.cpp @@ -21,7 +21,7 @@ #include <tqfile.h> #include <tqdir.h> #include <tqstringlist.h> -#include <tqtextstream.h> +#include <textstream.h> // KDE includes #include <kdebug.h> @@ -159,7 +159,7 @@ void ChatWindowStyle::listVariants() // Retrieve only the file name. variantName = variantName.left(variantName.findRev(".")); // variantPath is relative to baseHref. - variantPath = TQString("Variants/%1").tqarg(*it); + variantPath = TQString("Variants/%1").arg(*it); d->variantsList.insert(variantName, variantPath); } } diff --git a/kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp b/kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp index 73d62080..67e36f3d 100644 --- a/kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp +++ b/kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp @@ -164,7 +164,7 @@ int ChatWindowStyleManager::installStyle(const TQString &styleBundlePath) // Each time we found a correspondance to a theme bundle, we add a point to validResult. // A valid style bundle must have: // -a Contents, Contents/Resources, Co/Res/Incoming, Co/Res/Outgoing dirs - // main.css, Footer.html, Header.html, tqStatus.html files in Contents/Ressources. + // main.css, Footer.html, Header.html, Status.html files in Contents/Ressources. // So for a style bundle to be valid, it must have a result greather than 8, because we test for 8 required entry. int validResult = 0; TQStringList entries = rootDir->entries(); diff --git a/kopete/kopete/chatwindow/kopetechatwindowstylemanager.h b/kopete/kopete/chatwindow/kopetechatwindowstylemanager.h index fef09b09..74f145ca 100644 --- a/kopete/kopete/chatwindow/kopetechatwindowstylemanager.h +++ b/kopete/kopete/chatwindow/kopetechatwindowstylemanager.h @@ -54,14 +54,14 @@ public: typedef TQMap<TQString, TQString> StyleList; /** - * The StyleInstalltqStatus enum. It gives better return value for installStyle(). + * The StyleInstallStatus enum. It gives better return value for installStyle(). * - StyleInstallOk : The install went fine. * - StyleNotValid : The archive didn't contain a valid Chat Window style. * - StyleNoDirectoryValid : It didn't find a suitable directory to install the theme. * - StyleCannotOpen : The archive couldn't be openned. * - StyleUnknow : Unknow error. */ - enum StyleInstalltqStatus { StyleInstallOk = 0, StyleNotValid, StyleNoDirectoryValid, StyleCannotOpen, StyleUnknow }; + enum StyleInstallStatus { StyleInstallOk = 0, StyleNotValid, StyleNoDirectoryValid, StyleCannotOpen, StyleUnknow }; /** * Destructor. @@ -91,7 +91,7 @@ public slots: * Note that you must pass a path to a archive. * * @param styleBundlePath Path to the container file to install. - * @return A status code from StyleInstalltqStatus enum. + * @return A status code from StyleInstallStatus enum. */ int installStyle(const TQString &styleBundlePath); diff --git a/kopete/kopete/chatwindow/kopeteemailwindow.cpp b/kopete/kopete/chatwindow/kopeteemailwindow.cpp index bd726cb8..0d798792 100644 --- a/kopete/kopete/chatwindow/kopeteemailwindow.cpp +++ b/kopete/kopete/chatwindow/kopeteemailwindow.cpp @@ -55,7 +55,7 @@ #include <kgenericfactory.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqtimer.h> #include <tqvbox.h> @@ -147,7 +147,7 @@ KopeteEmailWindow::KopeteEmailWindow( Kopete::ChatSession *manager, EmailWindowP this, TQT_SLOT( messageSentSuccessfully() )); TQWidget *containerWidget = new TQWidget( v ); - containerWidget->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum) ); + containerWidget->setSizePolicy( TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum) ); TQHBoxLayout *h = new TQHBoxLayout( containerWidget, 4, 4 ); h->addStretch(); @@ -176,7 +176,7 @@ KopeteEmailWindow::KopeteEmailWindow( Kopete::ChatSession *manager, EmailWindowP toggleMode( Send ); KConfig *config = KGlobal::config(); - applyMainWindowSettings( config, TQString::tqfromLatin1( "KopeteEmailWindow" ) ); + applyMainWindowSettings( config, TQString::fromLatin1( "KopeteEmailWindow" ) ); d->sendInProgress = false; @@ -196,7 +196,7 @@ KopeteEmailWindow::~KopeteEmailWindow() // saves menubar, toolbar and statusbar setting KConfig *config = KGlobal::config(); - saveMainWindowSettings( config, TQString::tqfromLatin1( "KopeteEmailWindow" ) ); + saveMainWindowSettings( config, TQString::fromLatin1( "KopeteEmailWindow" ) ); config->sync(); delete d; @@ -206,7 +206,7 @@ void KopeteEmailWindow::initActions(void) { KActionCollection *coll = actionCollection(); - d->chatSend = new KAction( i18n( "&Send Message" ), TQString::tqfromLatin1( "mail_send" ), 0, + d->chatSend = new KAction( i18n( "&Send Message" ), TQString::fromLatin1( "mail_send" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotReplySend() ), coll, "chat_send" ); //Default to 'Return' for sending messages d->chatSend->setShortcut( TQKeySequence( Key_Return ) ); @@ -217,11 +217,11 @@ void KopeteEmailWindow::initActions(void) KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT(slotCopy()), coll); KStdAction::paste( TQT_TQOBJECT(d->editPart->widget()), TQT_SLOT( paste() ), coll ); - new KAction( i18n( "&Set Font..." ), TQString::tqfromLatin1( "charset" ), 0, + new KAction( i18n( "&Set Font..." ), TQString::fromLatin1( "charset" ), 0, d->editPart, TQT_SLOT( setFont() ), coll, "format_font" ); - new KAction( i18n( "Set Text &Color..." ), TQString::tqfromLatin1( "pencil" ), 0, + new KAction( i18n( "Set Text &Color..." ), TQString::fromLatin1( "pencil" ), 0, d->editPart, TQT_SLOT( setFgColor() ), coll, "format_color" ); - new KAction( i18n( "Set &Background Color..." ), TQString::tqfromLatin1( "fill" ), 0, + new KAction( i18n( "Set &Background Color..." ), TQString::fromLatin1( "fill" ), 0, d->editPart, TQT_SLOT( setBgColor() ), coll, "format_bgcolor" ); KStdAction::showMenubar( TQT_TQOBJECT(this), TQT_SLOT( slotViewMenuBar() ), coll ); @@ -238,8 +238,8 @@ void KopeteEmailWindow::initActions(void) KopeteStdAction::preferences( coll , "settings_prefs" ); // The animated toolbarbutton - d->normalIcon = TQPixmap( BarIcon( TQString::tqfromLatin1( "kopete" ) ) ); - d->animIcon = KGlobal::iconLoader()->loadMovie( TQString::tqfromLatin1( "newmessage" ), KIcon::Toolbar); + d->normalIcon = TQPixmap( BarIcon( TQString::fromLatin1( "kopete" ) ) ); + d->animIcon = KGlobal::iconLoader()->loadMovie( TQString::fromLatin1( "newmessage" ), KIcon::Toolbar); d->animIcon.pause(); d->anim = new TQLabel( this, "kde toolbar widget" ); @@ -247,9 +247,9 @@ void KopeteEmailWindow::initActions(void) d->anim->setPixmap( d->normalIcon ); new KWidgetAction( d->anim, i18n("Toolbar Animation"), 0, 0, 0, coll, "toolbar_animation" ); - setXMLFile( TQString::tqfromLatin1( "kopeteemailwindow.rc" ) ); + setXMLFile( TQString::fromLatin1( "kopeteemailwindow.rc" ) ); createGUI( d->editPart ); - //createGUI( TQString::tqfromLatin1( "kopeteemailwindow.rc" ) ); + //createGUI( TQString::fromLatin1( "kopeteemailwindow.rc" ) ); guiFactory()->addClient(m_manager); } @@ -280,12 +280,12 @@ void KopeteEmailWindow::slotSmileyActivated(const TQString &sm ) void KopeteEmailWindow::slotConfToolbar() { - saveMainWindowSettings(KGlobal::config(), TQString::tqfromLatin1( "KopeteEmailWindow" )); - KEditToolbar *dlg = new KEditToolbar(actionCollection(), TQString::tqfromLatin1("kopeteemailwindow.rc") ); + saveMainWindowSettings(KGlobal::config(), TQString::fromLatin1( "KopeteEmailWindow" )); + KEditToolbar *dlg = new KEditToolbar(actionCollection(), TQString::fromLatin1("kopeteemailwindow.rc") ); if (dlg->exec()) { createGUI( d->editPart ); - applyMainWindowSettings(KGlobal::config(), TQString::tqfromLatin1( "KopeteEmailWindow" )); + applyMainWindowSettings(KGlobal::config(), TQString::fromLatin1( "KopeteEmailWindow" )); } delete dlg; } @@ -344,7 +344,7 @@ void KopeteEmailWindow::updateNextButton() else d->btnReadPrev->setEnabled( true ); - d->btnReadNext->setText( i18n( "(%1) Next >>" ).tqarg( d->messageQueue.count() - d->queuePosition ) ); + d->btnReadNext->setText( i18n( "(%1) Next >>" ).arg( d->messageQueue.count() - d->queuePosition ) ); } void KopeteEmailWindow::slotUpdateReplySend() @@ -420,25 +420,25 @@ bool KopeteEmailWindow::closeView( bool force ) { TQString shortCaption = caption(); if( shortCaption.length() > 40 ) - shortCaption = shortCaption.left( 40 ) + TQString::tqfromLatin1("..."); + shortCaption = shortCaption.left( 40 ) + TQString::fromLatin1("..."); 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>").tqarg(shortCaption), i18n("Closing Group Chat"), - i18n("Cl&ose Chat"), TQString::tqfromLatin1("AskCloseGroupChat")); + "You will not receive future messages from this conversation.</qt>").arg(shortCaption), i18n("Closing Group Chat"), + i18n("Cl&ose Chat"), TQString::fromLatin1("AskCloseGroupChat")); } if( !d->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>").tqarg(d->unreadMessageFrom), i18n("Unread Message"), - i18n("Cl&ose Chat"), TQString::tqfromLatin1("AskCloseChatRecentMessage")); + "second. Are you sure you want to close this chat?</qt>").arg(d->unreadMessageFrom), i18n("Unread Message"), + 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"), TQString::tqfromLatin1("AskCloseChatMessageInProgress") ); + i18n("Cl&ose Chat"), TQString::fromLatin1("AskCloseChatMessageInProgress") ); } } diff --git a/kopete/kopete/chatwindow/krichtexteditpart.cpp b/kopete/kopete/chatwindow/krichtexteditpart.cpp index ff86940d..16c398d5 100644 --- a/kopete/kopete/chatwindow/krichtexteditpart.cpp +++ b/kopete/kopete/chatwindow/krichtexteditpart.cpp @@ -7,7 +7,7 @@ #include <kconfig.h> #include <tdeversion.h> #include <tqapplication.h> -#include <tqclipboard.h> +#include <clipboard.h> #include <tqevent.h> #include <kparts/genericfactory.h> #include <tqrichtext_p.h> @@ -200,10 +200,10 @@ void KopeteRichTextEditPart::createActions( KActionCollection *ac ) connect( action_align_justify, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( setAlignJustify(bool) ) ); - action_align_left->setExclusiveGroup( "tqalignment" ); - action_align_center->setExclusiveGroup( "tqalignment" ); - action_align_right->setExclusiveGroup( "tqalignment" ); - action_align_justify->setExclusiveGroup( "tqalignment" ); + action_align_left->setExclusiveGroup( "alignment" ); + action_align_center->setExclusiveGroup( "alignment" ); + action_align_right->setExclusiveGroup( "alignment" ); + action_align_justify->setExclusiveGroup( "alignment" ); connect( editor, TQT_SIGNAL( cursorPositionChanged( int,int ) ), this, TQT_SLOT( updateAligment() ) ); @@ -268,7 +268,7 @@ void KopeteRichTextEditPart::clear() void KopeteRichTextEditPart::updateAligment() { - int align = editor->tqalignment(); + int align = editor->alignment(); switch ( align ) { @@ -351,7 +351,7 @@ void KopeteRichTextEditPart::writeConfig() config->writeEntry("FontUnderline", mFont.underline() ); config->writeEntry("BgColor", mBgColor ); config->writeEntry("FgColor", mFgColor ); - config->writeEntry("EditAlignment", editor->tqalignment() ); + config->writeEntry("EditAlignment", editor->alignment() ); config->sync(); } @@ -515,28 +515,28 @@ void KopeteRichTextEditPart::setUnderline( bool b ) void KopeteRichTextEditPart::setAlignLeft( bool yes ) { if ( yes ) - editor->tqsetAlignment( AlignLeft ); + editor->setAlignment( AlignLeft ); writeConfig(); } void KopeteRichTextEditPart::setAlignRight( bool yes ) { if ( yes ) - editor->tqsetAlignment( AlignRight ); + editor->setAlignment( AlignRight ); writeConfig(); } void KopeteRichTextEditPart::setAlignCenter( bool yes ) { if ( yes ) - editor->tqsetAlignment( AlignCenter ); + editor->setAlignment( AlignCenter ); writeConfig(); } void KopeteRichTextEditPart::setAlignJustify( bool yes ) { if ( yes ) - editor->tqsetAlignment( AlignJustify ); + editor->setAlignment( AlignJustify ); writeConfig(); } diff --git a/kopete/kopete/chatwindow/tests/chatwindowstyle_test.cpp b/kopete/kopete/chatwindow/tests/chatwindowstyle_test.cpp index 91626e66..cd44bc02 100644 --- a/kopete/kopete/chatwindow/tests/chatwindowstyle_test.cpp +++ b/kopete/kopete/chatwindow/tests/chatwindowstyle_test.cpp @@ -92,7 +92,7 @@ void ChatWindowStyle_Test::testHtml() "<div>%message%</div>\n" "<div id=\"insert\">" ); - TQString exceptedtqStatus = TQString::fromUtf8( + TQString exceptedStatus = TQString::fromUtf8( "<div>%message%</div>\n" "<div>%time%</div>\n" "<div>%time{%H:%M}%</div>"); @@ -103,7 +103,7 @@ void ChatWindowStyle_Test::testHtml() CHECK(testStyle->getNextIncomingHtml(), exceptedNextIncoming); CHECK(testStyle->getOutgoingHtml(), exceptedOutgoing); CHECK(testStyle->getNextOutgoingHtml(), exceptedNextOutgoing); - CHECK(testStyle->getStatusHtml(), exceptedtqStatus); + CHECK(testStyle->getStatusHtml(), exceptedStatus); } void ChatWindowStyle_Test::testAction() diff --git a/kopete/kopete/chatwindow/tests/chatwindowstylerendering_test.cpp b/kopete/kopete/chatwindow/tests/chatwindowstylerendering_test.cpp index c3dd3edc..f358150b 100644 --- a/kopete/kopete/chatwindow/tests/chatwindowstylerendering_test.cpp +++ b/kopete/kopete/chatwindow/tests/chatwindowstylerendering_test.cpp @@ -24,7 +24,7 @@ #include <tqdir.h> #include <tqfile.h> #include <tqdatetime.h> -#include <tqtextstream.h> +#include <textstream.h> // KDE includes #include <kapplication.h> @@ -101,7 +101,7 @@ bool createContact( const TQString &/*contactId*/, Kopete::MetaContact */*parent return true; } -void connect( const Kopete::OnlineStatus& /*initialtqStatus*/) +void connect( const Kopete::OnlineStatus& /*initialStatus*/) { // do nothing } @@ -205,8 +205,8 @@ void ChatWindowStyleRendering_Test::testHeaderRendering() "<div>Outgoing/buddy_icon.png</div>\n" "<div>%1</div>\n" "<div>%2</div>" - ).tqarg(KGlobal::locale()->formatDateTime( TQDateTime::tqcurrentDateTime(), true, true ) ) - .tqarg(TQDateTime::tqcurrentDateTime().toString("hh:mm")); + ).arg(KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), true, true ) ) + .arg(TQDateTime::currentDateTime().toString("hh:mm")); TQString headerHtml = d->testStyle->getHeaderHtml(); TQString resultHtml; @@ -230,7 +230,7 @@ void ChatWindowStyleRendering_Test::testMessageRendering() "<div>%1</div>\n" "<div>%2</div>\n" "<div id=\"insert\">" - ).tqarg( TQDateTime::tqcurrentDateTime().toString( "hh:mm:ss" ), TQDateTime::tqcurrentDateTime().toString( "hh:mm" ) ); + ).arg( TQDateTime::currentDateTime().toString( "hh:mm:ss" ), TQDateTime::currentDateTime().toString( "hh:mm" ) ); TQString expectedOutgoingHtml = TQString( "Outgoing:\n" @@ -242,7 +242,7 @@ void ChatWindowStyleRendering_Test::testMessageRendering() "<div>%1</div>\n" "<div>%2</div>\n" "<div id=\"insert\">" - ).tqarg( TQDateTime::tqcurrentDateTime().toString( "hh:mm:ss" ), TQDateTime::tqcurrentDateTime().toString( "hh:mm" ) ); + ).arg( TQDateTime::currentDateTime().toString( "hh:mm:ss" ), TQDateTime::currentDateTime().toString( "hh:mm" ) ); TQString tempHtml; @@ -272,13 +272,13 @@ void ChatWindowStyleRendering_Test::testStatusRendering() "<div><span style=\"\"class=\"KopeteMessageBody\">A contact went offline.</span></div>\n" "<div>%1</div>\n" "<div>%2</div>" - ).tqarg( TQDateTime::tqcurrentDateTime().toString( "hh:mm:ss" ), TQDateTime::tqcurrentDateTime().toString( "hh:mm" ) ); + ).arg( TQDateTime::currentDateTime().toString( "hh:mm:ss" ), TQDateTime::currentDateTime().toString( "hh:mm" ) ); TQString statusHtml = d->testStyle->getStatusHtml(); TQString resultHtml; - Kopete::Message msgtqStatus(0,0, TQString::fromUtf8("A contact went offline."), Kopete::Message::Internal); - resultHtml = chatPart->formatStyleKeywords(statusHtml, msgtqStatus); + Kopete::Message msgStatus(0,0, TQString::fromUtf8("A contact went offline."), Kopete::Message::Internal); + resultHtml = chatPart->formatStyleKeywords(statusHtml, msgStatus); CHECK(resultHtml, expectedStatusHtml); } @@ -291,8 +291,8 @@ void ChatWindowStyleRendering_Test::testFullRendering() Kopete::Message msgIn1(d->myself, d->other, TQString("Hello there !"), Kopete::Message::Inbound); Kopete::Message msgIn2(d->myself, d->other, TQString("How are you doing ?"), Kopete::Message::Inbound); Kopete::Message msgOut1(d->other, d->myself, TQString("Fine and you ?"), Kopete::Message::Outbound); - Kopete::Message msgtqStatus1(d->myself,d->other, TQString("You are now marked as away."), Kopete::Message::Internal); - Kopete::Message msgtqStatus2(d->myself,d->other, TQString("You are now marked as online."), Kopete::Message::Internal); + Kopete::Message msgStatus1(d->myself,d->other, TQString("You are now marked as away."), Kopete::Message::Internal); + Kopete::Message msgStatus2(d->myself,d->other, TQString("You are now marked as online."), Kopete::Message::Internal); Kopete::Message msgIn3(d->myself, d->other, TQString("Well, doing some tests."), Kopete::Message::Internal); Kopete::Message msgOut2(d->other, d->myself, TQString("All your bases are belong to us."), Kopete::Message::Outbound); Kopete::Message msgOut3(d->other, d->myself, TQString("You are on the way to destruction"), Kopete::Message::Outbound); @@ -304,8 +304,8 @@ void ChatWindowStyleRendering_Test::testFullRendering() chatPart->appendMessage(msgIn1); chatPart->appendMessage(msgIn2); chatPart->appendMessage(msgOut1); - chatPart->appendMessage(msgtqStatus1); - chatPart->appendMessage(msgtqStatus2); + chatPart->appendMessage(msgStatus1); + chatPart->appendMessage(msgStatus2); chatPart->appendMessage(msgIn3); chatPart->appendMessage(msgOut2); chatPart->appendMessage(msgOut3); |