diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:49:40 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:49:40 -0600 |
commit | 808e453c56036211f57482ed847d54aca01bba68 (patch) | |
tree | 75515d5768dea10d4fbe4cd772e0a89c1c4b3aa9 /kopete/kopete/contactlist/kopetecontactlistview.cpp | |
parent | cd9b9ed7fd0ac8a75106148254aa58e2e5c04863 (diff) | |
download | tdenetwork-808e453c56036211f57482ed847d54aca01bba68.tar.gz tdenetwork-808e453c56036211f57482ed847d54aca01bba68.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kopete/kopete/contactlist/kopetecontactlistview.cpp')
-rw-r--r-- | kopete/kopete/contactlist/kopetecontactlistview.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/kopete/kopete/contactlist/kopetecontactlistview.cpp b/kopete/kopete/contactlist/kopetecontactlistview.cpp index d3459c07..d86a4f67 100644 --- a/kopete/kopete/contactlist/kopetecontactlistview.cpp +++ b/kopete/kopete/contactlist/kopetecontactlistview.cpp @@ -28,7 +28,7 @@ #include <tqcursor.h> #include <tqdragobject.h> #include <tqheader.h> -#include <tqstylesheet.h> +#include <stylesheet.h> #include <tqtimer.h> #include <tqtooltip.h> #include <tqguardedptr.h> @@ -198,7 +198,7 @@ public: { removeMetaContactFromGroupInner( mc, gpi ); - // update the group's display of its number of tqchildren. + // update the group's display of its number of children. // TODO: make the KopeteGroupViewItem not need this, by overriding insertItem and takeItem gpi->refreshDisplayName(); @@ -288,8 +288,8 @@ private: updateMetaContactInner( mc ); // FIXME: these items should do this for themselves... - m_onlineItem->setText(0,i18n("Online contacts (%1)").tqarg(m_onlineItem->childCount())); - m_offlineItem->setText(0,i18n("Offline contacts (%1)").tqarg(m_offlineItem->childCount())); + m_onlineItem->setText(0,i18n("Online contacts (%1)").arg(m_onlineItem->childCount())); + m_offlineItem->setText(0,i18n("Offline contacts (%1)").arg(m_offlineItem->childCount())); } void updateMetaContactInner( Kopete::MetaContact *mc ) { @@ -475,14 +475,14 @@ void KopeteContactListView::initActions( KActionCollection *ac ) actionStartChat = KopeteStdAction::chat( TQT_TQOBJECT(this), TQT_SLOT( slotStartChat() ), ac, "contactStartChat" ); - actionMove = new KopeteGroupListAction( i18n( "&Move To" ), TQString::tqfromLatin1( "editcut" ), + actionMove = new KopeteGroupListAction( i18n( "&Move To" ), TQString::fromLatin1( "editcut" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotMoveToGroup() ), ac, "contactMove" ); - actionCopy = new KopeteGroupListAction( i18n( "&Copy To" ), TQString::tqfromLatin1( "editcopy" ), 0, + actionCopy = new KopeteGroupListAction( i18n( "&Copy To" ), TQString::fromLatin1( "editcopy" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotCopyToGroup() ), ac, "contactCopy" ); actionRemove = KopeteStdAction::deleteContact( TQT_TQOBJECT(this), TQT_SLOT( slotRemove() ), ac, "contactRemove" ); - actionSendEmail = new KAction( i18n( "Send Email..." ), TQString::tqfromLatin1( "mail_generic" ), + actionSendEmail = new KAction( i18n( "Send Email..." ), TQString::fromLatin1( "mail_generic" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotSendEmail() ), ac, "contactSendEmail" ); /* this actionRename is buggy, and useless with properties, removed in kopeteui.rc*/ actionRename = new KAction( i18n( "Rename" ), "filesaveas", 0, @@ -491,7 +491,7 @@ void KopeteContactListView::initActions( KActionCollection *ac ) ac, "contactSendFile" ); actionAddContact = new KActionMenu( i18n( "&Add Contact" ), - TQString::tqfromLatin1( "add_user" ), ac , "contactAddContact" ); + TQString::fromLatin1( "add_user" ), ac , "contactAddContact" ); actionAddContact->popupMenu()->insertTitle( i18n("Select Account") ); actionAddTemporaryContact = new KAction( i18n( "Add to Your Contact List" ), "add_user", 0, @@ -659,7 +659,7 @@ void KopeteContactListView::slotContextMenu( KListView * /*listview*/, int nb = Kopete::ContactList::self()->selectedMetaContacts().count() + Kopete::ContactList::self()->selectedGroups().count(); - KMainWindow *window = dynamic_cast<KMainWindow *>(tqtopLevelWidget()); + KMainWindow *window = dynamic_cast<KMainWindow *>(topLevelWidget()); if ( !window ) { kdError( 14000 ) << k_funcinfo << "Main window not found, unable to display context-menu; " @@ -671,7 +671,7 @@ void KopeteContactListView::slotContextMenu( KListView * /*listview*/, { int px = mapFromGlobal( point ).x() - ( header()->sectionPos( header()->mapToIndex( 0 ) ) + treeStepSize() * ( item->depth() + ( rootIsDecorated() ? 1 : 0 ) ) + itemMargin() ); - int py = mapFromGlobal( point ).y() - tqitemRect( item ).y() - (header()->isVisible() ? header()->height() : 0) ; + int py = mapFromGlobal( point ).y() - itemRect( item ).y() - (header()->isVisible() ? header()->height() : 0) ; //kdDebug( 14000 ) << k_funcinfo << "x: " << px << ", y: " << py << endl; Kopete::Contact *c = metaLVI->contactForPoint( TQPoint( px, py ) ) ; @@ -691,7 +691,7 @@ void KopeteContactListView::slotContextMenu( KListView * /*listview*/, arg( metaLVI->metaContact()->displayName(), metaLVI->metaContact()->statusString() ); if ( title.length() > 43 ) - title = title.left( 40 ) + TQString::tqfromLatin1( "..." ); + title = title.left( 40 ) + TQString::fromLatin1( "..." ); if ( popup->title( 0 ).isNull() ) popup->insertTitle ( title, 0, 0 ); @@ -716,9 +716,9 @@ void KopeteContactListView::slotContextMenu( KListView * /*listview*/, text=text.replace("&","&&"); // cf BUG 115449 if ( text.length() > 41 ) - text = text.left( 38 ) + TQString::tqfromLatin1( "..." ); + text = text.left( 38 ) + TQString::fromLatin1( "..." ); - popup->insertItem( c->onlinetqStatus().iconFor( c, 16 ), text , contactMenu ); + popup->insertItem( c->onlineStatus().iconFor( c, 16 ), text , contactMenu ); } popup->popup( point ); @@ -733,7 +733,7 @@ void KopeteContactListView::slotContextMenu( KListView * /*listview*/, { TQString title = groupvi->group()->displayName(); if ( title.length() > 32 ) - title = title.left( 30 ) + TQString::tqfromLatin1( "..." ); + title = title.left( 30 ) + TQString::fromLatin1( "..." ); if( popup->title( 0 ).isNull() ) popup->insertTitle( title, 0, 0 ); @@ -814,7 +814,7 @@ void KopeteContactListView::slotExecuted( TQListViewItem *item, const TQPoint &p { // Try if we are clicking a protocol icon. If so, open a direct // connection for that protocol - TQRect r = tqitemRect( item ); + TQRect r = itemRect( item ); TQPoint relativePos( pos.x() - r.left() - ( treeStepSize() * ( item->depth() + ( rootIsDecorated() ? 1 : 0 ) ) + itemMargin() ), pos.y() - r.top() ); @@ -905,7 +905,7 @@ void KopeteContactListView::slotDropped(TQDropEvent *e, TQListViewItem *, TQList } else if( e->provides("kopete/x-contact") ) { - TQString contactInfo = TQString::fromUtf8( e->tqencodedData("kopete/x-contact") ); + TQString contactInfo = TQString::fromUtf8( e->encodedData("kopete/x-contact") ); TQString protocolId = contactInfo.section( TQChar( 0xE000 ), 0, 0 ); TQString accountId = contactInfo.section( TQChar( 0xE000 ), 1, 1 ); TQString contactId = contactInfo.section( TQChar( 0xE000 ), 2 ); @@ -927,7 +927,7 @@ void KopeteContactListView::slotDropped(TQDropEvent *e, TQListViewItem *, TQList for ( KURL::List::Iterator it = urlList.begin(); it != urlList.end(); ++it ) { KURL url = (*it); - if( url.protocol() == TQString::tqfromLatin1("kopetemessage") ) + if( url.protocol() == TQString::fromLatin1("kopetemessage") ) { //Add a contact addDraggedContactByInfo( url.queryItem("protocolId"), @@ -938,7 +938,7 @@ void KopeteContactListView::slotDropped(TQDropEvent *e, TQListViewItem *, TQList TQPoint p = contentsToViewport(e->pos()); int px = p.x() - ( header()->sectionPos( header()->mapToIndex( 0 ) ) + treeStepSize() * ( dest_metaLVI->depth() + ( rootIsDecorated() ? 1 : 0 ) ) + itemMargin() ); - int py = p.y() - tqitemRect( dest_metaLVI ).y(); + int py = p.y() - itemRect( dest_metaLVI ).y(); Kopete::Contact *c = dest_metaLVI->contactForPoint( TQPoint( px, py ) ); @@ -987,7 +987,7 @@ void KopeteContactListView::addDraggedContactToGroup( Kopete::MetaContact *conta { int r=KMessageBox::questionYesNo( Kopete::UI::Global::mainWidget(), i18n( "<qt>Would you like to add <b>%1</b> to your contact list as a member of <b>%2</b>?</qt>" ) - .tqarg( contact->displayName(), group->displayName() ), + .arg( contact->displayName(), group->displayName() ), i18n( "Kopete" ), i18n("Add"), i18n("Do Not Add"), "addTemporaryWhenMoving" ); @@ -1003,7 +1003,7 @@ void KopeteContactListView::addDraggedContactToMetaContact( Kopete::Contact *con { int r = KMessageBox::questionYesNo( Kopete::UI::Global::mainWidget(), i18n( "<qt>Would you like to add <b>%1</b> to your contact list as a child contact of <b>%2</b>?</qt>" ) - .tqarg( contact->contactId(), parent->displayName() ), + .arg( contact->contactId(), parent->displayName() ), i18n( "Kopete" ), i18n("Add"), i18n("Do Not Add"), "addTemporaryWhenMoving" ); @@ -1054,7 +1054,7 @@ void KopeteContactListView::addDraggedContactByInfo( const TQString &protocolId, { KMessageBox::sorry( Kopete::UI::Global::mainWidget(), i18n("<qt>This contact is already on your contact list. It is a child contact of <b>%1</b></qt>") - .tqarg( source_contact->metaContact()->displayName() ) + .arg( source_contact->metaContact()->displayName() ) ); } } @@ -1146,7 +1146,7 @@ bool KopeteContactListView::acceptDrag(TQDropEvent *e) const TQPoint p=contentsToViewport(e->pos()); int px = p.x() - ( header()->sectionPos( header()->mapToIndex( 0 ) ) + treeStepSize() * ( dest_metaLVI->depth() + ( rootIsDecorated() ? 1 : 0 ) ) + itemMargin() ); - int py = p.y() - tqitemRect( dest_metaLVI ).y(); + int py = p.y() - itemRect( dest_metaLVI ).y(); Kopete::Contact *c = dest_metaLVI->contactForPoint( TQPoint( px, py ) ) ; if( c ? !c->isReachable() : !dest_metaLVI->metaContact()->isReachable() ) @@ -1168,7 +1168,7 @@ bool KopeteContactListView::acceptDrag(TQDropEvent *e) const for ( KURL::List::Iterator it = urlList.begin(); it != urlList.end(); ++it ) { - if( (*it).protocol() != TQString::tqfromLatin1("kopetemessage") && (*it).isLocalFile() ) + if( (*it).protocol() != TQString::fromLatin1("kopetemessage") && (*it).isLocalFile() ) return false; //we can't send links if a locale file is in link } @@ -1216,7 +1216,7 @@ void KopeteContactListView::contentsMousePressEvent( TQMouseEvent *e ) int px = p.x() - ( header()->sectionPos( header()->mapToIndex( 0 ) ) + treeStepSize() * ( i->depth() + ( rootIsDecorated() ? 1 : 0 ) ) + itemMargin() ); - int py = p.y() - tqitemRect( i ).y(); + int py = p.y() - itemRect( i ).y(); m_startDragPos = TQPoint( px , py ); } @@ -1272,7 +1272,7 @@ TQDragObject *KopeteContactListView::dragObject() d->setEncodedData( TQString( c->protocol()->pluginId() +TQChar( 0xE000 )+ c->account()->accountId() +TQChar( 0xE000 )+ c->contactId() ).utf8() ); drag->addDragObject( d ); - pm = c->onlinetqStatus().iconFor( c, 12 ); // FIXME: fixed icon scaling + pm = c->onlineStatus().iconFor( c, 12 ); // FIXME: fixed icon scaling } else // dragging a metacontact { @@ -1555,13 +1555,13 @@ void KopeteContactListView::slotRemove() { msg = i18n( "<qt>Are you sure you want to remove the contact <b>%1</b>" \ " from your contact list?</qt>" ) - .tqarg( contacts.first()->displayName() ) ; + .arg( contacts.first()->displayName() ) ; } else if( !groups.isEmpty() ) { msg = i18n( "<qt>Are you sure you want to remove the group <b>%1</b> " \ "and all contacts that are contained within it?</qt>" ) - .tqarg( groups.first()->displayName() ); + .arg( groups.first()->displayName() ); } else return; // this should never happen @@ -1772,7 +1772,7 @@ void KopeteContactListView::slotProperties() { } */ - metaLVI->tqrepaint(); + metaLVI->repaint(); } else if(groupLVI) { |