summaryrefslogtreecommitdiffstats
path: root/kopete/kopete/contactlist/kopetemetacontactlvi.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-18 18:33:51 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-18 18:33:51 -0600
commit089118c18533dfa3e6ce5065dbebdd4db94051f1 (patch)
treece014fb2326a80fcfafa2362b7ff88486aa17c96 /kopete/kopete/contactlist/kopetemetacontactlvi.cpp
parent83677e35509b4dafac63b76995652bdf3b49f209 (diff)
downloadtdenetwork-089118c18533dfa3e6ce5065dbebdd4db94051f1.tar.gz
tdenetwork-089118c18533dfa3e6ce5065dbebdd4db94051f1.zip
Rename old tq methods that no longer need a unique name
Diffstat (limited to 'kopete/kopete/contactlist/kopetemetacontactlvi.cpp')
-rw-r--r--kopete/kopete/contactlist/kopetemetacontactlvi.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/kopete/kopete/contactlist/kopetemetacontactlvi.cpp b/kopete/kopete/contactlist/kopetemetacontactlvi.cpp
index 2afe4fe9..2d77a1fe 100644
--- a/kopete/kopete/contactlist/kopetemetacontactlvi.cpp
+++ b/kopete/kopete/contactlist/kopetemetacontactlvi.cpp
@@ -82,18 +82,18 @@ public:
{
// We begin with the meta contact display name at the top of the tooltip
- TQString toolTip = TQString::tqfromLatin1("<qt><table cellpadding=\"0\" cellspacing=\"1\">");
+ TQString toolTip = TQString::fromLatin1("<qt><table cellpadding=\"0\" cellspacing=\"1\">");
- toolTip += TQString::tqfromLatin1("<tr><td>");
+ toolTip += TQString::fromLatin1("<tr><td>");
if ( ! metaContact->photo().isNull() )
{
- TQString photoName = TQString::tqfromLatin1("kopete-metacontact-photo:%1").tqarg( KURL::encode_string( metaContact->metaContactId() ));
+ TQString photoName = TQString::fromLatin1("kopete-metacontact-photo:%1").tqarg( KURL::encode_string( metaContact->metaContactId() ));
//TQMimeSourceFactory::defaultFactory()->setImage( "contactimg", metaContact->photo() );
- toolTip += TQString::tqfromLatin1("<img src=\"%1\">").tqarg( photoName );
+ toolTip += TQString::fromLatin1("<img src=\"%1\">").tqarg( photoName );
}
- toolTip += TQString::tqfromLatin1("</td><td>");
+ toolTip += TQString::fromLatin1("</td><td>");
TQString displayName;
Kopete::Emoticons *e = Kopete::Emoticons::self();
@@ -110,21 +110,21 @@ public:
}
}
- toolTip += TQString::tqfromLatin1("<b><font size=\"+1\">%1</font></b><br><br>").tqarg( displayName );
+ toolTip += TQString::fromLatin1("<b><font size=\"+1\">%1</font></b><br><br>").tqarg( displayName );
TQPtrList<Contact> contacts = metaContact->contacts();
if ( contacts.count() == 1 )
{
- return toolTip + contacts.first()->toolTip() + TQString::tqfromLatin1("</td></tr></table></qt>");
+ return toolTip + contacts.first()->toolTip() + TQString::fromLatin1("</td></tr></table></qt>");
}
- toolTip += TQString::tqfromLatin1("<table>");
+ toolTip += TQString::fromLatin1("<table>");
// We are over a metacontact with > 1 child contacts, and not over a specific contact
// Iterate through tqchildren and display a summary tooltip
for(Contact *c = contacts.first(); c; c = contacts.next())
{
- TQString iconName = TQString::tqfromLatin1("kopete-contact-icon:%1:%2:%3")
+ TQString iconName = TQString::fromLatin1("kopete-contact-icon:%1:%2:%3")
.tqarg( KURL::encode_string( c->protocol()->pluginId() ),
KURL::encode_string( c->account()->accountId() ),
KURL::encode_string( c->contactId() )
@@ -132,10 +132,10 @@ public:
toolTip += i18n("<tr><td>STATUS ICON <b>PROTOCOL NAME</b> (ACCOUNT NAME)</td><td>STATUS DESCRIPTION</td></tr>",
"<tr><td><img src=\"%1\">&nbsp;<nobr><b>%2</b></nobr>&nbsp;<nobr>(%3)</nobr></td><td align=\"right\"><nobr>%4</nobr></td></tr>")
- .tqarg( iconName, Kopete::Emoticons::parseEmoticons(c->property(Kopete::Global::Properties::self()->nickName()).value().toString()) , c->contactId(), c->onlinetqStatus().description() );
+ .tqarg( iconName, Kopete::Emoticons::parseEmoticons(c->property(Kopete::Global::Properties::self()->nickName()).value().toString()) , c->contactId(), c->onlineStatus().description() );
}
- return toolTip + TQString::tqfromLatin1("</table></td></tr></table></qt>");
+ return toolTip + TQString::fromLatin1("</table></td></tr></table></qt>");
}
private:
MetaContact *metaContact;
@@ -212,7 +212,7 @@ void KopeteMetaContactLVI::initLVI()
d->toolTipSource.reset( new ListView::MetaContactToolTipSource( m_metaContact ) );
- m_oldtqStatus = m_metaContact->status();
+ m_oldStatus = m_metaContact->status();
connect( m_metaContact, TQT_SIGNAL( displayNameChanged( const TQString &, const TQString & ) ),
TQT_SLOT( slotDisplayNameChanged() ) );
@@ -254,7 +254,7 @@ void KopeteMetaContactLVI::initLVI()
mIsBlinkIcon = false;
//if ( !mBlinkIcon )
- // mBlinkIcon = new TQPixmap( KGlobal::iconLoader()->loadIcon( TQString::tqfromLatin1( "newmsg" ), KIcon::Small ) );
+ // mBlinkIcon = new TQPixmap( KGlobal::iconLoader()->loadIcon( TQString::fromLatin1( "newmsg" ), KIcon::Small ) );
slotConfigChanged(); // this calls slotIdleStateChanged(), which sets up the constituent components, spacing, fonts and indirectly, the contact icon
slotDisplayNameChanged();
@@ -363,18 +363,18 @@ void KopeteMetaContactLVI::slotContactStatusChanged( Kopete::Contact *c )
// multiple times if the user is in multiple groups - Jason
// comparing the status of the previous and new preferred contact is the determining factor in deciding to notify
- Kopete::OnlineStatus newtqStatus;
+ Kopete::OnlineStatus newStatus;
if ( m_metaContact->preferredContact() )
- newtqStatus = m_metaContact->preferredContact()->onlinetqStatus();
+ newStatus = m_metaContact->preferredContact()->onlineStatus();
else
{
// the last child contact has gone offline or otherwise unreachable, so take the changed contact's online status
- newtqStatus = c->onlinetqStatus();
+ newStatus = c->onlineStatus();
}
// ensure we are not suppressing notifications, because connecting or disconnected
if ( !(c->account()->suppressStatusNotification()
- || ( c->account()->myself()->onlinetqStatus().status() == Kopete::OnlineStatus::Connecting )
+ || ( c->account()->myself()->onlineStatus().status() == Kopete::OnlineStatus::Connecting )
|| !c->account()->isConnected() ) )
{
if ( !c->account()->isAway() || KopetePrefs::prefs()->soundIfAway() )
@@ -383,46 +383,46 @@ void KopeteMetaContactLVI::slotContactStatusChanged( Kopete::Contact *c )
TQString text = i18n( "<qt><i>%1</i> is now %2.</qt>" )
.tqarg( Kopete::Emoticons::parseEmoticons( TQStyleSheet::escape(m_metaContact->displayName()) ) ,
- TQStyleSheet::escape(c->onlinetqStatus().description()));
+ TQStyleSheet::escape(c->onlineStatus().description()));
// figure out what's happened
- enum ChangeType { noChange, noEvent, signedIn, changedtqStatus, signedOut };
+ enum ChangeType { noChange, noEvent, signedIn, changedStatus, signedOut };
ChangeType t = noChange;
//kdDebug( 14000 ) << k_funcinfo << m_metaContact->displayName() <<
- //" - Old MC Status: " << m_oldtqStatus.status() << ", New MC Status: " << newtqStatus.status() << endl;
+ //" - Old MC Status: " << m_oldStatus.status() << ", New MC Status: " << newStatus.status() << endl;
// first, exclude changes due to blocking or subscription changes at the protocol level
- if ( ( m_oldtqStatus.status() == Kopete::OnlineStatus::Unknown
- || newtqStatus.status() == Kopete::OnlineStatus::Unknown ) )
+ if ( ( m_oldStatus.status() == Kopete::OnlineStatus::Unknown
+ || newStatus.status() == Kopete::OnlineStatus::Unknown ) )
t = noEvent; // This means the contact's changed from or to unknown - due to a protocol state change, not a contact state change
else // we're dealing with a genuine contact state change
{
- if ( m_oldtqStatus.status() == Kopete::OnlineStatus::Offline )
+ if ( m_oldStatus.status() == Kopete::OnlineStatus::Offline )
{
- if ( newtqStatus.status() != Kopete::OnlineStatus::Offline )
+ if ( newStatus.status() != Kopete::OnlineStatus::Offline )
{
//kdDebug( 14000 ) << "signed in" << endl;
t = signedIn; // contact has gone from offline to something else, it's a sign-in
}
}
- else if ( m_oldtqStatus.status() == Kopete::OnlineStatus::Online
- || m_oldtqStatus.status() == Kopete::OnlineStatus::Away
- || m_oldtqStatus.status() == Kopete::OnlineStatus::Invisible)
+ else if ( m_oldStatus.status() == Kopete::OnlineStatus::Online
+ || m_oldStatus.status() == Kopete::OnlineStatus::Away
+ || m_oldStatus.status() == Kopete::OnlineStatus::Invisible)
{
- if ( newtqStatus.status() == Kopete::OnlineStatus::Offline )
+ if ( newStatus.status() == Kopete::OnlineStatus::Offline )
{
//kdDebug( 14000 ) << "signed OUT" << endl;
t = signedOut; // contact has gone from an online state to an offline state, it's a sign out
}
- else if ( m_oldtqStatus > newtqStatus || m_oldtqStatus < newtqStatus ) // operator!= is useless because it's an identity operator, not an equivalence operator
+ else if ( m_oldStatus > newStatus || m_oldStatus < newStatus ) // operator!= is useless because it's an identity operator, not an equivalence operator
{
// contact has changed online states, it's a status change,
// and the preferredContact changed status, or there is a new preferredContacat
// so it's worth notifying
//kdDebug( 14000 ) << "changed status" << endl;
- t = changedtqStatus;
+ t = changedStatus;
}
}
- else if ( m_oldtqStatus != newtqStatus )
+ else if ( m_oldStatus != newStatus )
{
//kdDebug( 14000 ) << "non-event" << endl;
// catch-all for any other status change we don't know about
@@ -441,7 +441,7 @@ void KopeteMetaContactLVI::slotContactStatusChanged( Kopete::Contact *c )
connect(KNotification::event(m_metaContact, "kopete_contact_online", text, m_metaContact->photo(), KopeteSystemTray::systemTray(), i18n( "Chat" )) ,
TQT_SIGNAL(activated(unsigned int )) , this, TQT_SLOT( execute() ) );
break;
- case changedtqStatus:
+ case changedStatus:
connect(KNotification::event(m_metaContact, "kopete_contact_status_change", text, m_metaContact->photo(), KopeteSystemTray::systemTray(), i18n( "Chat" )) ,
TQT_SIGNAL(activated(unsigned int )) , this, TQT_SLOT( execute() ));
break;
@@ -468,7 +468,7 @@ void KopeteMetaContactLVI::slotContactStatusChanged( Kopete::Contact *c )
}
// make a note of the current status for the next time we get a status change
- m_oldtqStatus = newtqStatus;
+ m_oldStatus = newStatus;
if ( m_parentGroup )
m_parentGroup->refreshDisplayName();
@@ -802,9 +802,9 @@ void KopeteMetaContactLVI::updateVisibility()
void KopeteMetaContactLVI::slotContactPropertyChanged( Kopete::Contact *contact,
const TQString &key, const TQVariant &old, const TQVariant &newVal )
{
-// if ( key == TQString::tqfromLatin1("awayMessage") )
+// if ( key == TQString::fromLatin1("awayMessage") )
// kdDebug( 14000 ) << k_funcinfo << "contact=" << contact->contactId() << ", isonline=" << contact->isOnline() << ", alloffline=" << !m_metaContact->isOnline() << ", oldvalue=" << old.toString() << ", newvalue=" << newVal.toString() << endl;
- if ( key == TQString::tqfromLatin1("awayMessage") && d->extraText && old != newVal )
+ if ( key == TQString::fromLatin1("awayMessage") && d->extraText && old != newVal )
{
bool allOffline = !m_metaContact->isOnline();
if ( newVal.toString().isEmpty() || ( !contact->isOnline() && !allOffline ) )
@@ -839,7 +839,7 @@ void KopeteMetaContactLVI::slotContactPropertyChanged( Kopete::Contact *contact,
d->extraText->setText( newVal.toString() );
}
} // wtf? KopeteMetaContact also connects this signals and emits photoChanged! why no connect photoChanged to slotPhotoChanged?
- /*else if ( key == TQString::tqfromLatin1("photo") && (m_metaContact->photoSourceContact() == contact) && (m_metaContact->photoSource() == Kopete::MetaContact::SourceContact))
+ /*else if ( key == TQString::fromLatin1("photo") && (m_metaContact->photoSourceContact() == contact) && (m_metaContact->photoSource() == Kopete::MetaContact::SourceContact))
{
slotPhotoChanged();
}*/
@@ -855,8 +855,8 @@ void KopeteMetaContactLVI::slotContactAdded( Kopete::Contact *c )
updateContactIcon( c );
- slotContactPropertyChanged( c, TQString::tqfromLatin1("awayMessage"),
- TQVariant(), c->property( TQString::tqfromLatin1("awayMessage") ).value() );
+ slotContactPropertyChanged( c, TQString::fromLatin1("awayMessage"),
+ TQVariant(), c->property( TQString::fromLatin1("awayMessage") ).value() );
}
void KopeteMetaContactLVI::slotContactRemoved( Kopete::Contact *c )
@@ -870,8 +870,8 @@ void KopeteMetaContactLVI::slotContactRemoved( Kopete::Contact *c )
if ( ListView::Component *comp = contactComponent( c ) )
delete comp;
- slotContactPropertyChanged( c, TQString::tqfromLatin1("awayMessage"),
- c->property( TQString::tqfromLatin1("awayMessage") ).value(), TQVariant() );
+ slotContactPropertyChanged( c, TQString::fromLatin1("awayMessage"),
+ c->property( TQString::fromLatin1("awayMessage") ).value(), TQVariant() );
}
void KopeteMetaContactLVI::updateContactIcons()
@@ -884,9 +884,9 @@ void KopeteMetaContactLVI::updateContactIcons()
void KopeteMetaContactLVI::updateContactIcon( Kopete::Contact *c )
{
- KGlobal::config()->setGroup( TQString::tqfromLatin1("ContactList") );
+ KGlobal::config()->setGroup( TQString::fromLatin1("ContactList") );
bool bHideOffline = KGlobal::config()->readBoolEntry(
- TQString::tqfromLatin1("HideOfflineContacts"), false );
+ TQString::fromLatin1("HideOfflineContacts"), false );
if ( KopetePrefs::prefs()->showOffline() )
bHideOffline = false;