• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdenetwork API Reference
  • KDE Home
  • Contact Us
 

kopete/libkopete

  • sources
  • kde-4.12
  • kdenetwork
  • kopete
  • libkopete
kopetemetacontact.cpp
Go to the documentation of this file.
1 /*
2  kopetemetacontact.cpp - Kopete Meta Contact
3 
4  Copyright (c) 2002-2003 by Martijn Klingens <klingens@kde.org>
5  Copyright (c) 2002-2005 by Olivier Goffart <ogoffart@kde.org>
6  Copyright (c) 2002-2004 by Duncan Mac-Vicar Prett <duncan@kde.org>
7  Copyright (c) 2005 by MichaĆ«l Larouche <larouche@kde.org>
8 
9  Kopete (c) 2002-2006 by the Kopete developers <kopete-devel@kde.org>
10 
11  *************************************************************************
12  * *
13  * This library is free software; you can redistribute it and/or *
14  * modify it under the terms of the GNU Lesser General Public *
15  * License as published by the Free Software Foundation; either *
16  * version 2 of the License, or (at your option) any later version. *
17  * *
18  *************************************************************************
19 */
20 
21 #include "kopetemetacontact.h"
22 #include "kopetemetacontact_p.h"
23 
24 #include <QTextDocument>
25 
26 #include <kabc/addressbook.h>
27 #include <kabc/addressee.h>
28 
29 #include <kdebug.h>
30 #include <klocale.h>
31 #include <kmessagebox.h>
32 #include <kdeversion.h>
33 #include <knotification.h>
34 
35 #include "kabcpersistence.h"
36 #include "kopetecontactlist.h"
37 #include "kopetecontact.h"
38 #include "kopeteaccountmanager.h"
39 #include "kopeteprotocol.h"
40 #include "kopeteaccount.h"
41 #include "kopetepluginmanager.h"
42 #include "kopetegroup.h"
43 #include "kopeteglobal.h"
44 #include "kopeteuiglobal.h"
45 #include "kopetebehaviorsettings.h"
46 #include "kopeteemoticons.h"
47 
48 namespace Kopete {
49 
50 MetaContact::MetaContact()
51  : ContactListElement( ContactList::self() ), d(new Private())
52 {
53  d->metaContactId = QUuid::createUuid();
54 
55  connect( this, SIGNAL(pluginDataChanged()), SIGNAL(persistentDataChanged()) );
56  connect( this, SIGNAL(iconChanged(Kopete::ContactListElement::IconState,QString)), SIGNAL(persistentDataChanged()) );
57  connect( this, SIGNAL(useCustomIconChanged(bool)), SIGNAL(persistentDataChanged()) );
58  connect( this, SIGNAL(displayNameChanged(QString,QString)), SIGNAL(persistentDataChanged()) );
59  connect( this, SIGNAL(movedToGroup(Kopete::MetaContact*,Kopete::Group*,Kopete::Group*)), SIGNAL(persistentDataChanged()) );
60  connect( this, SIGNAL(removedFromGroup(Kopete::MetaContact*,Kopete::Group*)), SIGNAL(persistentDataChanged()) );
61  connect( this, SIGNAL(addedToGroup(Kopete::MetaContact*,Kopete::Group*)), SIGNAL(persistentDataChanged()) );
62  connect( this, SIGNAL(contactAdded(Kopete::Contact*)), SIGNAL(persistentDataChanged()) );
63  connect( this, SIGNAL(contactRemoved(Kopete::Contact*)), SIGNAL(persistentDataChanged()) );
64 
65  // Update the KABC picture when the KDE Address book change.
66  connect(KABCPersistence::self()->addressBook(), SIGNAL(addressBookChanged(AddressBook*)), this, SLOT(slotUpdateAddressBookPicture()));
67 
68  // make sure MetaContact is at least in one group
69  addToGroup( Group::topLevel() );
70  // I'm not sure this is correct -Olivier
71  // we probably should do the check in groups() instead
72 
73 }
74 
75 MetaContact::~MetaContact()
76 {
77  delete d;
78 }
79 
80 QUuid MetaContact::metaContactId() const
81 {
82  return d->metaContactId;
83 }
84 
85 void MetaContact::setMetaContactId( const QUuid& newUuid)
86 {
87  d->metaContactId = newUuid;
88 }
89 
90 void MetaContact::addContact( Contact *c )
91 {
92  if( d->contacts.contains( c ) )
93  {
94  kWarning(14010) << "Ignoring attempt to add duplicate contact " << c->contactId() << "!";
95  }
96  else
97  {
98  const QString oldDisplayName = displayName();
99 
100  d->contacts.append( c );
101  connect( c, SIGNAL(onlineStatusChanged(Kopete::Contact*,Kopete::OnlineStatus,Kopete::OnlineStatus)),
102  SLOT(slotContactStatusChanged(Kopete::Contact*,Kopete::OnlineStatus,Kopete::OnlineStatus)) );
103 
104  connect( c, SIGNAL(propertyChanged(Kopete::PropertyContainer*,QString,QVariant,QVariant)),
105  this, SLOT(slotPropertyChanged(Kopete::PropertyContainer*,QString,QVariant,QVariant)) ) ;
106 
107  connect( c, SIGNAL(contactDestroyed(Kopete::Contact*)),
108  this, SLOT(slotContactDestroyed(Kopete::Contact*)) );
109 
110  connect( c, SIGNAL(idleStateChanged(Kopete::Contact*)),
111  this, SIGNAL(contactIdleStateChanged(Kopete::Contact*)) );
112 
113  emit contactAdded(c);
114 
115  updateOnlineStatus();
116 
117  // if this is the first contact, probbaly was created by a protocol
118  // so it has empty custom properties, then set sources to the contact
119  if ( d->contacts.count() == 1 )
120  {
121  const QString newDisplayName = displayName();
122  if ( oldDisplayName != newDisplayName )
123  {
124  emit displayNameChanged( oldDisplayName , displayName() );
125  QListIterator<Kopete::Contact *> it( d->contacts );
126  while ( it.hasNext() )
127  ( it.next() )->sync(Contact::DisplayNameChanged);
128  }
129  if ( picture().isNull() )
130  {
131  setPhotoSourceContact(c);
132  setPhotoSource(SourceContact);
133  }
134  }
135  }
136 }
137 
138 void MetaContact::updateOnlineStatus()
139 {
140  Kopete::OnlineStatus::StatusType newStatus = Kopete::OnlineStatus::Unknown;
141  Kopete::OnlineStatus mostSignificantStatus;
142 
143  QListIterator<Contact *> it(d->contacts);
144  while ( it.hasNext() )
145  {
146  Contact *c = it.next();
147  // find most significant status
148  if ( c->onlineStatus() > mostSignificantStatus )
149  mostSignificantStatus = c->onlineStatus();
150  }
151 
152  newStatus = mostSignificantStatus.status();
153 
154  if( newStatus != d->onlineStatus )
155  {
156  d->onlineStatus = newStatus;
157  emit onlineStatusChanged( this, d->onlineStatus );
158  }
159 }
160 
161 void MetaContact::removeContact(Contact *c, bool deleted)
162 {
163  if( !d->contacts.contains( c ) )
164  {
165  kDebug(14010) << " Contact is not in this metaContact ";
166  }
167  else
168  {
169  // must check before removing, or will always be false
170  bool wasTrackingName = ( !displayNameSourceContact() && (displayNameSource() == SourceContact) );
171  bool wasTrackingPhoto = ( !photoSourceContact() && (photoSource() == SourceContact) );
172  // save for later use
173  QString currDisplayName = displayName();
174 
175  d->contacts.removeAll( c );
176 
177  // if the contact was a source of property data, clean
178  if (displayNameSourceContact() == c)
179  setDisplayNameSourceContact(0L);
180  if (photoSourceContact() == c)
181  setPhotoSourceContact(0L);
182 
183 
184  if ( wasTrackingName )
185  {
186  // Oh! this contact was the source for the metacontact's name
187  // lets do something
188  // is this the only contact?
189  if ( d->contacts.isEmpty() )
190  {
191  // fallback to a custom name as we don't have
192  // more contacts to chose as source.
193  setDisplayNameSource(SourceCustom);
194  // perhaps the custom display name was empty
195  // no problems baby, I saved the old one.
196  setDisplayName(currDisplayName);
197  }
198  else
199  {
200  // we didn't fallback to SourceCustom above so lets use the next
201  // contact as source
202  setDisplayNameSourceContact( d->contacts.first() );
203  }
204  }
205 
206  if ( wasTrackingPhoto )
207  {
208  // Oh! this contact was the source for the metacontact's photo
209  // lets do something
210  // is this the only contact?
211  if ( d->contacts.isEmpty() )
212  {
213  // fallback to a custom photo as we don't have
214  // more contacts to chose as source.
215  setPhotoSource(SourceCustom);
216  // FIXME set the custom photo
217  }
218  else
219  {
220  // we didn't fallback to SourceCustom above so lets use the next
221  // contact as source
222  setPhotoSourceContact( d->contacts.first() );
223  }
224  }
225 
226  if(!deleted)
227  { //If this function is tell by slotContactRemoved, c is maybe just a QObject
228  disconnect( c, SIGNAL(onlineStatusChanged(Kopete::Contact*,Kopete::OnlineStatus,Kopete::OnlineStatus)),
229  this, SLOT(slotContactStatusChanged(Kopete::Contact*,Kopete::OnlineStatus,Kopete::OnlineStatus)) );
230  disconnect( c, SIGNAL(propertyChanged(Kopete::PropertyContainer*,QString,QVariant,QVariant)),
231  this, SLOT(slotPropertyChanged(Kopete::PropertyContainer*,QString,QVariant,QVariant)) ) ;
232  disconnect( c, SIGNAL(contactDestroyed(Kopete::Contact*)),
233  this, SLOT(slotContactDestroyed(Kopete::Contact*)) );
234  disconnect( c, SIGNAL(idleStateChanged(Kopete::Contact*)),
235  this, SIGNAL(contactIdleStateChanged(Kopete::Contact*)) );
236 
237  kDebug( 14010 ) << "Contact disconnected";
238 
239  KABCPersistence::self()->write( this );
240  }
241 
242  // Reparent the contact
243  c->setParent( 0 );
244 
245  emit contactRemoved( c );
246  }
247  updateOnlineStatus();
248 }
249 
250 Contact *MetaContact::findContact( const QString &protocolId, const QString &accountId, const QString &contactId )
251 {
252  //kDebug( 14010 ) << "Num contacts: " << d->contacts.count();
253  QListIterator<Contact *> it( d->contacts );
254  while ( it.hasNext() )
255  {
256  Contact *c = it.next();
257  //kDebug( 14010 ) << "Trying " << it.current()->contactId() << ", proto "
258  //<< it.current()->protocol()->pluginId() << ", account " << it.current()->accountId() << endl;
259  if( ( c->contactId() == contactId ) && ( c->protocol()->pluginId() == protocolId || protocolId.isNull() ) )
260  {
261  if ( accountId.isNull() )
262  return c;
263 
264  if(c->account())
265  {
266  if(c->account()->accountId() == accountId)
267  return c;
268  }
269  }
270  }
271 
272  // Contact not found
273  return 0L;
274 }
275 
276 void MetaContact::setDisplayNameSource(PropertySource source)
277 {
278  QString oldName = displayName();
279  d->displayNameSource = source;
280  QString newName = displayName();
281  if ( oldName != newName) {
282  emit displayNameChanged( oldName, newName );
283  QListIterator<Kopete::Contact *> it( d->contacts );
284  while ( it.hasNext() )
285  ( it.next() )->sync(Contact::DisplayNameChanged);
286  }
287 }
288 
289 void MetaContact::setDisplayNameSource( const QString &nameSourcePID, const QString &nameSourceAID, const QString &nameSourceCID )
290 {
291  d->nameSourcePID = nameSourcePID;
292  d->nameSourceAID = nameSourceAID;
293  d->nameSourceCID = nameSourceCID;
294 }
295 
296 MetaContact::PropertySource MetaContact::displayNameSource() const
297 {
298  return d->displayNameSource;
299 }
300 
301 void MetaContact::setPhotoSource(PropertySource source)
302 {
303  PropertySource oldSource = photoSource();
304  d->photoSource = source;
305  if ( source != oldSource )
306  {
307  emit photoChanged();
308  }
309 }
310 
311 void MetaContact::setPhotoSource( const QString &photoSourcePID, const QString &photoSourceAID, const QString &photoSourceCID )
312 {
313  d->photoSourcePID = photoSourcePID;
314  d->photoSourceAID = photoSourceAID;
315  d->photoSourceCID = photoSourceCID;
316 }
317 
318 MetaContact::PropertySource MetaContact::photoSource() const
319 {
320  return d->photoSource;
321 }
322 
323 
324 Contact *MetaContact::sendMessage()
325 {
326  Contact *c = preferredContact();
327 
328  if( !c )
329  {
330  KMessageBox::queuedMessageBox( UI::Global::mainWidget(), KMessageBox::Sorry,
331  i18n( "This user is not reachable at the moment. Please make sure you are connected and using a protocol that supports offline sending, or wait "
332  "until this user comes online." ), i18n( "User is Not Reachable" ) );
333  }
334  else
335  {
336  c->sendMessage();
337  return c;
338  }
339  return 0L;
340 }
341 
342 Contact *MetaContact::startChat()
343 {
344  Contact *c = preferredContact();
345 
346  if( !c )
347  {
348  KMessageBox::queuedMessageBox( UI::Global::mainWidget(), KMessageBox::Sorry,
349  i18n( "This user is not reachable at the moment. Please make sure you are connected and using a protocol that supports offline sending, or wait "
350  "until this user comes online." ), i18n( "User is Not Reachable" ) );
351  }
352  else
353  {
354  c->startChat();
355  return c;
356  }
357  return 0L;
358 }
359 
360 Contact *MetaContact::preferredContact()
361 {
362  /*
363  This function will determine what contact will be used to reach the contact.
364 
365  The preferred contact is choose with the following criterias: (in that order)
366  1) If a contact was an open chatwindow already, we will use that one.
367  2) The contact with the better online status is used. But if that
368  contact is not reachable, we prefer return no contact.
369  3) If all the criterias aboxe still gives ex-eaquo, we use the preffered
370  account as selected in the account preferances (with the arrows)
371  */
372 
373  Contact *contact = 0;
374  bool hasOpenView=false; //has the selected contact already an open chatwindow
375  QListIterator<Contact *> it(d->contacts);
376  while ( it.hasNext() )
377  {
378  Contact *c=it.next();
379 
380  //Does the contact an open chatwindow?
381  if( c->manager( Contact::CannotCreate ) )
382  { //no need to check the view. having a manager is enough
383  if( !hasOpenView )
384  {
385  contact=c;
386  hasOpenView=true;
387  if( c->isReachable() )
388  continue;
389  } //else, several contact might have an open view, uses following criterias
390  }
391  else if( hasOpenView && contact->isReachable() )
392  continue; //This contact has not open view, but the selected contact has, and is reachable
393 
394  // FIXME: The isConnected call should be handled in Contact::isReachable
395  // after KDE 3.2 - Martijn
396  if ( !c->account() || !c->account()->isConnected() || !c->isReachable() )
397  continue; //if this contact is not reachable, we ignore it.
398 
399  if ( !contact )
400  { //this is the first contact.
401  contact= c;
402  continue;
403  }
404 
405  if( c->onlineStatus().status() > contact->onlineStatus().status() )
406  contact=c; //this contact has a better status
407  else if ( c->onlineStatus().status() == contact->onlineStatus().status() )
408  {
409  if( c->account()->priority() > contact->account()->priority() )
410  contact=c;
411  else if( c->account()->priority() == contact->account()->priority()
412  && c->onlineStatus().weight() > contact->onlineStatus().weight() )
413  contact = c; //the weight is not supposed to follow the same scale for each protocol
414  }
415  }
416  return contact;
417 }
418 
419 Contact *MetaContact::execute()
420 {
421  Contact *c = preferredContact();
422 
423  if( !c )
424  {
425  KMessageBox::queuedMessageBox( UI::Global::mainWidget(), KMessageBox::Sorry,
426  i18n( "This user is not reachable at the moment. Please make sure you are connected and using a protocol that supports offline sending, or wait "
427  "until this user comes online." ), i18n( "User is Not Reachable" ) );
428  }
429  else
430  {
431  c->execute();
432  return c;
433  }
434 
435  return 0L;
436 }
437 
438 quint32 MetaContact::idleTime() const
439 {
440  unsigned long int time = 0;
441  QListIterator<Contact *> it( d->contacts );
442  while ( it.hasNext() )
443  {
444  Contact *c = it.next();
445  unsigned long int i = c->idleTime();
446  if( (c->isOnline() && i < time) || time == 0 )
447  {
448  time = i;
449  }
450  }
451  return time;
452 }
453 
454 QString MetaContact::statusIcon() const
455 {
456  switch( status() )
457  {
458  case OnlineStatus::Online:
459  if( useCustomIcon() )
460  return icon( ContactListElement::Online );
461  else
462  return QString::fromUtf8( "user-online" );
463  case OnlineStatus::Away:
464  if( useCustomIcon() )
465  return icon( ContactListElement::Away );
466  else
467  return QString::fromUtf8( "user-away" );
468  case OnlineStatus::Busy:
469  if( useCustomIcon() )
470  return icon( ContactListElement::Away ); //Might want to create custom for busy too
471  else
472  return QString::fromUtf8( "user-busy" );
473 
474  case OnlineStatus::Unknown:
475  if( useCustomIcon() )
476  return icon( ContactListElement::Unknown );
477  if ( d->contacts.isEmpty() )
478  return QString::fromUtf8( "metacontact_unknown" );
479  else
480  return QString::fromUtf8( "user-offline" );
481 
482  case OnlineStatus::Offline:
483  default:
484  if( useCustomIcon() )
485  return icon( ContactListElement::Offline );
486  else
487  return QString::fromUtf8( "user-offline" );
488  }
489 }
490 
491 QString MetaContact::statusString() const
492 {
493  switch( status() )
494  {
495  case OnlineStatus::Online:
496  return i18n( "Online" );
497  case OnlineStatus::Away:
498  return i18n( "Away" );
499  case OnlineStatus::Busy:
500  return i18n( "Busy" );
501  case OnlineStatus::Offline:
502  return i18n( "Offline" );
503  case OnlineStatus::Unknown:
504  default:
505  return i18n( "Status not available" );
506  }
507 }
508 
509 OnlineStatus::StatusType MetaContact::status() const
510 {
511  return d->onlineStatus;
512 }
513 
514 bool MetaContact::isOnline() const
515 {
516  QListIterator<Contact *> it( d->contacts );
517  while ( it.hasNext() )
518  {
519  Contact* c = it.next();
520  if( c && c->isOnline() )
521  return true;
522  }
523  return false;
524 }
525 
526 bool MetaContact::isAlwaysVisible() const
527 {
528  QListIterator<Contact *> it( d->contacts );
529  while ( it.hasNext() )
530  {
531  Contact* c = it.next();
532  if ( c && c->property( Kopete::Global::Properties::self()->isAlwaysVisible() ).value().toBool() )
533  return true;
534  }
535  return false;
536 }
537 
538 bool MetaContact::isReachable() const
539 {
540  if ( isOnline() )
541  return true;
542 
543  QListIterator<Contact *> it( d->contacts );
544  while ( it.hasNext() )
545  {
546  Contact *c = it.next();
547  if ( c->account()->isConnected() && c->isReachable() )
548  return true;
549  }
550  return false;
551 }
552 
553 //Determine if we are capable of accepting file transfers
554 bool MetaContact::canAcceptFiles() const
555 {
556  if( !isOnline() )
557  return false;
558 
559  QListIterator<Contact *> it( d->contacts );
560  while ( it.hasNext() )
561  {
562  if( it.next()->canAcceptFiles() )
563  return true;
564  }
565  return false;
566 }
567 
568 //Slot for sending files
569 void MetaContact::sendFile( const KUrl &sourceURL, const QString &altFileName, unsigned long fileSize )
570 {
571  //If we can't send any files then exit
572  if( d->contacts.isEmpty() || !canAcceptFiles() )
573  return;
574 
575  //Find the highest ranked protocol that can accept files
576  Contact *contact = d->contacts.first();
577  QListIterator<Contact *> it( d->contacts );
578  while ( it.hasNext() )
579  {
580  Contact *curr = it.next();
581  if( (curr)->onlineStatus() > contact->onlineStatus() && (curr)->canAcceptFiles() )
582  contact = curr;
583  }
584 
585  //Call the sendFile slot of this protocol
586  contact->sendFile( sourceURL, altFileName, fileSize );
587 }
588 
589 void MetaContact::serialize()
590 {
591  clearPluginContactData();
592 
593  QSet<Kopete::Protocol*> protocolSet;
594  foreach ( Kopete::Contact* c, contacts() )
595  {
596  Kopete::Protocol* protocol = c->protocol();
597  if ( !protocolSet.contains( protocol ) )
598  {
599  protocolSet.insert( protocol );
600  protocol->serialize( this );
601  }
602  }
603 }
604 
605 void MetaContact::slotContactStatusChanged( Contact * c, const OnlineStatus &status, const OnlineStatus &/*oldstatus*/ )
606 {
607  updateOnlineStatus();
608  emit contactStatusChanged( c, status );
609 
610  if ( c != c->account()->myself() )
611  onlineStatusNotification( c );
612 }
613 
614 void MetaContact::setDisplayName( const QString &name )
615 {
616  /*kDebug( 14010 ) << "Change displayName from " << d->displayName <<
617  " to " << name << ", d->trackChildNameChanges=" << d->trackChildNameChanges << endl;
618  kDebug(14010) << kBacktrace(6);*/
619 
620  if( name == d->displayName )
621  return;
622 
623  if ( loading() )
624  {
625  d->displayName = name;
626  }
627  else
628  {
629  //check if there is another contact with the same display name.
630  //if this is the case, merge them
631  if(!this->d->temporary && !name.isEmpty())
632  foreach(MetaContact *m, ContactList::self()->metaContacts())
633  {
634  if( !m->d->temporary && m != this && m->customDisplayName() == name)
635  {
636  //merge
637  while(!m->d->contacts.isEmpty())
638  {
639  m->d->contacts.first()->setMetaContact(this);
640  }
641  //the contact will be automatically removed when the last contact is removed
642  //that's why we merge othe other into this one and not the opposite;
643  break;
644  }
645  }
646 
647  const QString old = d->displayName;
648  d->displayName = name;
649 
650  emit displayNameChanged( old , name );
651  QListIterator<Kopete::Contact *> it( d->contacts );
652  while ( it.hasNext() )
653  ( it.next() )->sync(Contact::DisplayNameChanged);
654  }
655 }
656 
657 QString MetaContact::customDisplayName() const
658 {
659  return d->displayName;
660 }
661 
662 QString MetaContact::displayName() const
663 {
664  PropertySource source = displayNameSource();
665  if ( source == SourceKABC )
666  {
667  // kabc source, try to get from addressbook
668  // if the metacontact has a kabc association
669  if ( !kabcId().isEmpty() )
670  return nameFromKABC(kabcId());
671  }
672  else if ( source == SourceContact || d->displayName.isEmpty())
673  {
674  if ( d->displayNameSourceContact==0 )
675  {
676  if( d->contacts.count() >= 1 )
677  {// don't call setDisplayNameSource , or there will probably be an infinite loop
678  d->displayNameSourceContact=d->contacts.first();
679 // kDebug( 14010 ) << " setting displayname source for " << metaContactId();
680  }
681  }
682  if ( displayNameSourceContact() != 0L )
683  {
684  return nameFromContact(displayNameSourceContact());
685  }
686  else
687  {
688 // kDebug( 14010 ) << " source == SourceContact , but there is no displayNameSourceContact for contact " << metaContactId();
689  }
690  }
691  return d->displayName;
692 }
693 
694 QString nameFromKABC( const QString &id ) /*const*/
695 {
696  KABC::AddressBook* ab = KABCPersistence::self()->addressBook();
697  if ( ! id.isEmpty() && !id.contains(':') )
698  {
699  KABC::Addressee theAddressee = ab->findByUid(id);
700  if ( theAddressee.isEmpty() )
701  {
702  kDebug( 14010 ) << "no KABC::Addressee found for ( " << id << " ) " << " in current address book";
703  }
704  else
705  {
706  return theAddressee.formattedName();
707  }
708  }
709  // no kabc association, return null image
710  return QString();
711 }
712 
713 QString nameFromContact( Kopete::Contact *c) /*const*/
714 {
715  if ( !c )
716  return QString();
717 
718  QString contactName = c->nickName();
719  //the remove is there to workaround the Bug 95444
720  return contactName.remove('\n');
721 }
722 
723 KUrl MetaContact::customPhoto() const
724 {
725  return KUrl(d->customPicture.path());
726 }
727 
728 void MetaContact::setPhoto( const KUrl &url )
729 {
730  d->photoUrl = url;
731  d->customPicture.setPicture(url.toLocalFile());
732 
733  if ( photoSource() == SourceCustom )
734  {
735  emit photoChanged();
736  }
737 }
738 
739 QImage MetaContact::photo() const
740 {
741  return picture().image();
742 }
743 
744 Picture &MetaContact::picture() const
745 {
746  if ( photoSource() == SourceKABC )
747  {
748  return d->kabcPicture;
749  }
750  else if ( photoSource() == SourceContact )
751  {
752  return d->contactPicture;
753  }
754 
755  return d->customPicture;
756 }
757 
758 QImage MetaContact::photoFromCustom() const
759 {
760  return d->customPicture.image();
761 }
762 
763 QImage photoFromContact( Kopete::Contact *contact) /*const*/
764 {
765  if ( contact == 0L )
766  return QImage();
767 
768  QVariant photoProp;
769  if ( contact->hasProperty( Kopete::Global::Properties::self()->photo().key() ) )
770  photoProp = contact->property( Kopete::Global::Properties::self()->photo().key() ).value();
771 
772  QImage img;
773  if(photoProp.canConvert( QVariant::Image ))
774  img= photoProp.value<QImage>();
775  else if(photoProp.canConvert( QVariant::Pixmap ))
776  img=photoProp.value<QPixmap>().toImage();
777  else if(!photoProp.toString().isEmpty())
778  {
779  img=QPixmap( photoProp.toString() ).toImage();
780  }
781  return img;
782 }
783 
784 QImage photoFromKABC( const QString &id ) /*const*/
785 {
786  KABC::AddressBook* ab = KABCPersistence::self()->addressBook();
787  if ( ! id.isEmpty() && !id.contains(':') )
788  {
789  KABC::Addressee theAddressee = ab->findByUid(id);
790  if ( theAddressee.isEmpty() )
791  {
792  kDebug( 14010 ) << "no KABC::Addressee found for ( " << id << " ) " << " in current address book";
793  }
794  else
795  {
796  KABC::Picture pic = theAddressee.photo();
797  if ( pic.data().isNull() && pic.url().isEmpty() )
798  pic = theAddressee.logo();
799 
800  if ( pic.isIntern())
801  {
802  return pic.data();
803  }
804  else
805  {
806  return QPixmap( pic.url() ).toImage();
807  }
808  }
809  }
810  // no kabc association, return null image
811  return QImage();
812 }
813 
814 Contact *MetaContact::displayNameSourceContact() const
815 {
816  return d->displayNameSourceContact;
817 }
818 
819 Contact *MetaContact::photoSourceContact() const
820 {
821  return d->photoSourceContact;
822 }
823 
824 void MetaContact::setDisplayNameSourceContact( Contact *contact )
825 {
826  Contact *old = d->displayNameSourceContact;
827  d->displayNameSourceContact = contact;
828  if ( contact && displayNameSource() == SourceContact ) {
829  emit displayNameChanged( nameFromContact(old), nameFromContact(contact));
830  QListIterator<Kopete::Contact *> it( d->contacts );
831  while ( it.hasNext() )
832  ( it.next() )->sync(Contact::DisplayNameChanged);
833  }
834 }
835 
836 void MetaContact::setPhotoSourceContact( Contact *contact )
837 {
838  d->photoSourceContact = contact;
839 
840  // Create a cache for the contact photo.
841  if(d->photoSourceContact != 0L)
842  {
843  QVariant photoProp;
844  if ( contact->hasProperty( Kopete::Global::Properties::self()->photo().key() ) )
845  {
846  photoProp = contact->property( Kopete::Global::Properties::self()->photo().key() ).value();
847 
848  if(photoProp.canConvert( QVariant::Image ))
849  {
850  d->contactPicture.setPicture( photoProp.value<QImage>() );
851  }
852  else if(photoProp.canConvert( QVariant::Pixmap ))
853  {
854  d->contactPicture.setPicture( photoProp.value<QPixmap>().toImage() );
855  }
856  else if(!photoProp.toString().isEmpty())
857  {
858  d->contactPicture.setPicture(photoProp.toString());
859  }
860  else
861  {
862  d->contactPicture.clear();
863  }
864  }
865  else
866  {
867  d->contactPicture.clear();
868  }
869  }
870  else
871  {
872  d->contactPicture.clear();
873  }
874 
875  if ( photoSource() == SourceContact )
876  {
877  emit photoChanged();
878  }
879 }
880 
881 void MetaContact::slotPropertyChanged( PropertyContainer* _subcontact, const QString &key,
882  const QVariant &oldValue, const QVariant &newValue )
883 {
884  Contact *subcontact=static_cast<Contact*>(_subcontact);
885  if ( displayNameSource() == SourceContact ||
886  (d->displayName.isEmpty() && displayNameSource() == SourceCustom) )
887  {
888  if( key == Global::Properties::self()->nickName().key() )
889  {
890  if (displayNameSourceContact() == subcontact)
891  {
892  emit displayNameChanged( oldValue.toString(), newValue.toString());
893  QListIterator<Kopete::Contact *> it( d->contacts );
894  while ( it.hasNext() )
895  ( it.next() )->sync(Contact::DisplayNameChanged);
896  }
897  else
898  {
899  // HACK the displayName that changed is not from the contact we are tracking, but
900  // as the current one is null, lets use this new one
901  if (displayName().isEmpty())
902  setDisplayNameSourceContact(subcontact);
903  }
904  }
905  }
906 
907  if (photoSource() == SourceContact)
908  {
909  if ( key == Global::Properties::self()->photo().key() )
910  {
911  if (photoSourceContact() != subcontact)
912  {
913  // HACK the displayName that changed is not from the contact we are tracking, but
914  // as the current one is null, lets use this new one
915  if (picture().isNull())
916  setPhotoSourceContact(subcontact);
917 
918  }
919  else if(photoSourceContact() == subcontact)
920  {
921  if(d->photoSyncedWithKABC)
922  setPhotoSyncedWithKABC(true);
923 
924  setPhotoSourceContact(subcontact);
925  }
926  }
927  }
928 
929  if ( (key == Kopete::Global::Properties::self()->statusMessage().key() ||
930  key == Kopete::Global::Properties::self()->statusTitle().key()) && oldValue != newValue )
931  {
932  QString statusText;
933 
934  bool allOffline = !this->isOnline();
935  if ( newValue.toString().isEmpty() || ( !subcontact->isOnline() && !allOffline ) )
936  {
937  // try to find a more suitable away message to be displayed when:
938  // -new away message is empty or
939  // -contact who set it is offline and there are contacts online in the metacontact
940  foreach ( Kopete::Contact *c, d->contacts )
941  {
942  QString curStatusText( c->property( key ).value().toString() );
943  if ( ( allOffline || c->isOnline() ) && !curStatusText.isEmpty() )
944  {
945  // display this contact's away message when:
946  // -this contact's away message is not empty and
947  // -this contact is online or there are no contacts online at all
948  statusText = curStatusText;
949  break;
950  }
951  }
952  }
953  else
954  {
955  // just use new away message when:
956  // -new away message is not empty and
957  // -contact who set it is online or there are no contacts online at all
958  statusText = newValue.toString();
959  }
960 
961  if ( key == Kopete::Global::Properties::self()->statusMessage().key() )
962  d->statusMessage.setMessage( statusText );
963  else
964  d->statusMessage.setTitle( statusText );
965 
966  emit statusMessageChanged( this );
967  }
968 
969  // Here we abuse the onlineStatusChanged signal to force the contact list to refresh and hide the
970  // contact if he is offline and his isAlwaysVisible property changed to false
971  if ( key == Kopete::Global::Properties::self()->isAlwaysVisible().key() && oldValue != newValue )
972  emit onlineStatusChanged( this, d->onlineStatus );
973 }
974 
975 void MetaContact::moveToGroup( Group *from, Group *to )
976 {
977  if ( !from || !groups().contains( from ) )
978  {
979  // We're adding, not moving, because 'from' is illegal
980  addToGroup( to );
981  return;
982  }
983 
984  // Do nothing (same group)
985  if ( from == to )
986  return;
987 
988  if ( !to || groups().contains( to ) )
989  {
990  // We're removing, not moving, because 'to' is illegal
991  removeFromGroup( from );
992  return;
993  }
994 
995  if ( to->type() == Group::Offline )
996  return;
997 
998  if ( isTemporary() && to->type() != Group::Temporary )
999  return;
1000 
1001 
1002  //kDebug( 14010 ) << from->displayName() << " => " << to->displayName();
1003 
1004  d->groups.removeAll( from );
1005  d->groups.append( to );
1006 
1007  QListIterator<Contact *> it(d->contacts);
1008  while( it.hasNext() )
1009  it.next()->sync(Contact::MovedBetweenGroup);
1010 
1011  emit movedToGroup( this, from, to );
1012 }
1013 
1014 void MetaContact::removeFromGroup( Group *group )
1015 {
1016  if ( !group || !groups().contains( group ) || ( isTemporary() && group->type() == Group::Temporary ) )
1017  {
1018  return;
1019  }
1020 
1021  d->groups.removeAll( group );
1022 
1023  // make sure MetaContact is at least in one group
1024  if ( d->groups.isEmpty() )
1025  {
1026  d->groups.append( Group::topLevel() );
1027  emit addedToGroup( this, Group::topLevel() );
1028  }
1029 
1030  QListIterator<Contact *> it(d->contacts);
1031  while( it.hasNext() )
1032  it.next()->sync(Contact::MovedBetweenGroup);
1033 
1034  emit removedFromGroup( this, group );
1035 }
1036 
1037 void MetaContact::addToGroup( Group *to )
1038 {
1039  if ( !to || groups().contains( to ) )
1040  return;
1041 
1042  if ( d->temporary && to->type() != Group::Temporary )
1043  return;
1044 
1045  // FIXME: This breaks copying MC with drag&drop from topLevel group
1046  if ( d->groups.contains( Group::topLevel() ) )
1047  {
1048  d->groups.removeAll( Group::topLevel() );
1049  emit removedFromGroup( this, Group::topLevel() );
1050  }
1051 
1052  d->groups.append( to );
1053 
1054  QListIterator<Contact *> it(d->contacts);
1055  while( it.hasNext() )
1056  it.next()->sync(Contact::MovedBetweenGroup);
1057 
1058  emit addedToGroup( this, to );
1059 }
1060 
1061 QList<Group *> MetaContact::groups() const
1062 {
1063  return d->groups;
1064 }
1065 
1066 void MetaContact::slotContactDestroyed( Contact *contact )
1067 {
1068  removeContact(contact,true);
1069 }
1070 
1071 QString MetaContact::addressBookField( Kopete::Plugin * /* p */, const QString &app, const QString & key ) const
1072 {
1073  return d->addressBook[ app ][ key ];
1074 }
1075 
1076 void Kopete::MetaContact::setAddressBookField( Kopete::Plugin * /* p */, const QString &app, const QString &key, const QString &value )
1077 {
1078  d->addressBook[ app ][ key ] = value;
1079 }
1080 
1081 Kopete::StatusMessage MetaContact::statusMessage() const
1082 {
1083  return d->statusMessage;
1084 }
1085 
1086 void MetaContact::slotPluginLoaded( Plugin *p )
1087 {
1088  if( !p )
1089  return;
1090 
1091  QMap<QString, QString> map= pluginData( p );
1092  if(!map.isEmpty())
1093  {
1094  p->deserialize(this,map);
1095  }
1096 }
1097 
1098 void MetaContact::slotProtocolLoaded( Protocol *p )
1099 {
1100  if( !p )
1101  return;
1102 
1103  ContactDataList dataList = pluginContactData( p );
1104  if ( !dataList.isEmpty() )
1105  p->deserializeContactList( this, dataList );
1106 }
1107 
1108 void MetaContact::slotAllPluginsLoaded()
1109 {
1110  // Now that the plugins and subcontacts are loaded, set the source contact.
1111  setDisplayNameSourceContact( findContact( d->nameSourcePID, d->nameSourceAID, d->nameSourceCID) );
1112  setPhotoSourceContact( findContact( d->photoSourcePID, d->photoSourceAID, d->photoSourceCID) );
1113 }
1114 
1115 void MetaContact::slotUpdateAddressBookPicture()
1116 {
1117  KABC::AddressBook* ab = KABCPersistence::self()->addressBook();
1118  QString id = kabcId();
1119  if ( !id.isEmpty() && !id.contains(':') )
1120  {
1121  KABC::Addressee theAddressee = ab->findByUid(id);
1122  if ( theAddressee.isEmpty() )
1123  {
1124  kDebug( 14010 ) << "no KABC::Addressee found for ( " << id << " ) " << " in current address book";
1125  }
1126  else
1127  {
1128  KABC::Picture pic = theAddressee.photo();
1129  if ( pic.data().isNull() && pic.url().isEmpty() )
1130  pic = theAddressee.logo();
1131 
1132  d->kabcPicture.setPicture(pic);
1133  }
1134  }
1135 }
1136 
1137 bool MetaContact::isTemporary() const
1138 {
1139  return d->temporary;
1140 }
1141 
1142 void MetaContact::setTemporary( bool isTemporary, Group *group )
1143 {
1144  d->temporary = isTemporary;
1145  Group *temporaryGroup = Group::temporary();
1146  if ( d->temporary )
1147  {
1148  addToGroup (temporaryGroup);
1149  QListIterator<Group *> it(d->groups);
1150  while ( it.hasNext() )
1151  {
1152  Group *g = it.next();
1153  if(g != temporaryGroup)
1154  removeFromGroup(g);
1155  }
1156  }
1157  else
1158  moveToGroup(temporaryGroup, group ? group : Group::topLevel());
1159 }
1160 
1161 QString MetaContact::kabcId() const
1162 {
1163  if(d->kabcId.isEmpty())
1164  {
1165  if(d->contacts.isEmpty())
1166  return QString();
1167  Contact *c=d->contacts.first();
1168  if(!c)
1169  return QString();
1170  return c->protocol()->pluginId()+QString::fromUtf8(":")+c->account()->accountId()+QString::fromUtf8(":") + c->contactId() ;
1171  }
1172  return d->kabcId;
1173 }
1174 
1175 void MetaContact::setKabcId( const QString& newKabcId )
1176 {
1177  if(newKabcId == d->kabcId)
1178  return;
1179 
1180  // 1) Check the Id is not already used by another contact
1181  // 2) cause a kabc write ( only in response to metacontactLVIProps calling this, or will
1182  // write be called twice when creating a brand new MC? )
1183  // 3) What about changing from one valid kabc to another, are kabc fields removed?
1184  // 4) May be called with Null to remove an invalid kabc uid by KMC::toKABC()
1185  // 5) Is called when reading the saved contact list
1186 
1187  // Don't remove IM addresses from kabc if we are changing contacts;
1188  // other programs may have written that data and depend on it
1189  d->kabcId = newKabcId;
1190  if ( loading() )
1191  {
1192  slotUpdateAddressBookPicture();
1193  }
1194  else
1195  {
1196  KABCPersistence::self()->write( this );
1197  emit onlineStatusChanged( this, d->onlineStatus );
1198  emit persistentDataChanged();
1199  }
1200 }
1201 
1202 bool MetaContact::isPhotoSyncedWithKABC() const
1203 {
1204  return d->photoSyncedWithKABC;
1205 }
1206 
1207 void MetaContact::setPhotoSyncedWithKABC(bool b)
1208 {
1209  d->photoSyncedWithKABC=b;
1210  if( b && !loading() )
1211  {
1212  QVariant newValue;
1213 
1214  switch( photoSource() )
1215  {
1216  case SourceContact:
1217  {
1218  Contact *source = photoSourceContact();
1219  if(source != 0L)
1220  newValue = source->property( Kopete::Global::Properties::self()->photo() ).value();
1221  break;
1222  }
1223  case SourceCustom:
1224  {
1225  if( !d->customPicture.isNull() )
1226  newValue = d->customPicture.path();
1227  break;
1228  }
1229  // Don't sync the photo with KABC if the source is KABC !
1230  default:
1231  return;
1232  }
1233 
1234  if ( !d->kabcId.isEmpty() && !newValue.isNull())
1235  {
1236  KABC::Addressee theAddressee = KABCPersistence::self()->addressBook()->findByUid( kabcId() );
1237 
1238  if ( !theAddressee.isEmpty() )
1239  {
1240  QImage img;
1241  if(newValue.canConvert( QVariant::Image ))
1242  img=newValue.value<QImage>();
1243  else if(newValue.canConvert( QVariant::Pixmap ))
1244  img=newValue.value<QPixmap>().toImage();
1245 
1246  if(img.isNull())
1247  {
1248  // Some protocols like MSN save the photo as a url in
1249  // contact properties, we should not use this url
1250  // to sync with kabc but try first to embed the
1251  // photo data in the kabc addressee, because it could
1252  // be remote resource and the local url makes no sense
1253  QImage fallBackImage = QImage(newValue.toString());
1254  if(fallBackImage.isNull())
1255  theAddressee.setPhoto(newValue.toString());
1256  else
1257  theAddressee.setPhoto(fallBackImage);
1258  }
1259  else
1260  theAddressee.setPhoto(img);
1261 
1262  KABCPersistence::self()->addressBook()->insertAddressee(theAddressee);
1263  KABCPersistence::self()->writeAddressBook( theAddressee.resource() );
1264  }
1265 
1266  }
1267  }
1268 }
1269 
1270 QList<Contact *> MetaContact::contacts() const
1271 {
1272  return d->contacts;
1273 }
1274 
1275 void MetaContact::onlineStatusNotification( Kopete::Contact * c )
1276 {
1277  // comparing the status of the previous and new preferred contact is the determining factor in deciding to notify
1278  Kopete::OnlineStatus newNotifyOnlineStatus;
1279 
1280  Kopete::Contact * pc = preferredContact();
1281  if ( pc )
1282  newNotifyOnlineStatus = pc->onlineStatus();
1283  else // the last child contact has gone offline or otherwise unreachable, so take the changed contact's online status
1284  newNotifyOnlineStatus = c->onlineStatus();
1285 
1286  // ensure we are not suppressing notifications, because connecting or disconnected
1287  if ( !c->account()->suppressStatusNotification() && c->account()->isConnected()
1288  && c->account()->myself()->onlineStatus().status() != OnlineStatus::Connecting
1289  && c->account()->myself()->onlineStatus().status() != OnlineStatus::Busy
1290  && (Kopete::BehaviorSettings::self()->enableEventsWhileAway() || !c->account()->isAway()) )
1291  {
1292  // figure out what's happened
1293  enum ChangeType { noChange, noEvent, signedIn, changedStatus, signedOut };
1294  ChangeType t = noChange;
1295 
1296  // first, exclude changes due to blocking or subscription changes at the protocol level
1297  if ( d->notifyOnlineStatus.status() == Kopete::OnlineStatus::Unknown || newNotifyOnlineStatus.status() == Kopete::OnlineStatus::Unknown )
1298  {
1299  t = noEvent; // This means the contact's changed from or to unknown - due to a protocol state change, not a contact state change
1300  }
1301  else
1302  { // we're dealing with a genuine contact state change
1303  if ( d->notifyOnlineStatus.status() == Kopete::OnlineStatus::Offline )
1304  {
1305  if ( newNotifyOnlineStatus.status() != Kopete::OnlineStatus::Offline )
1306  {
1307  t = signedIn; // contact has gone from offline to something else, it's a sign-in
1308  }
1309  }
1310  else if ( d->notifyOnlineStatus.isDefinitelyOnline()) //Is that correct?
1311  {
1312  if ( newNotifyOnlineStatus.status() == Kopete::OnlineStatus::Offline )
1313  {
1314  t = signedOut; // contact has gone from an online state to an offline state, it's a sign out
1315  }
1316  else if ( d->notifyOnlineStatus > newNotifyOnlineStatus || d->notifyOnlineStatus < newNotifyOnlineStatus ) // operator!= is useless because it's an identity operator, not an equivalence operator
1317  {
1318  // contact has changed online states, it's a status change,
1319  // and the preferredContact changed status, or there is a new preferredContacat
1320  // so it's worth notifying
1321  t = changedStatus;
1322  }
1323  }
1324  else if ( d->notifyOnlineStatus != newNotifyOnlineStatus )
1325  {
1326  // catch-all for any other status change we don't know about
1327  t = noEvent;
1328  }
1329  }
1330 
1331  // now issue the appropriate notification
1332  KNotification *notify = 0;
1333  switch ( t )
1334  {
1335  case noEvent:
1336  case noChange:
1337  break;
1338  case signedIn:
1339  notify = new KNotification( QString("kopete_contact_online"), Kopete::UI::Global::mainWidget() );
1340  notify->setActions( QStringList( i18nc("@action", "Chat") ) );
1341  break;
1342  case changedStatus:
1343  notify = new KNotification( QString("kopete_contact_status_change"), Kopete::UI::Global::mainWidget() );
1344  notify->setActions( QStringList( i18nc("@action", "Chat") ) );
1345  break;
1346  case signedOut:
1347  notify = new KNotification( QString("kopete_contact_offline"), Kopete::UI::Global::mainWidget() );
1348  break;
1349  }
1350 
1351  if( notify )
1352  {
1353  QString text = i18n( "<qt><i>%1</i> is now %2.</qt>",
1354  Kopete::Emoticons::parseEmoticons( Qt::escape( displayName() ) ),
1355  Qt::escape( c->onlineStatus().description() ) );
1356 
1357  notify->setText( text );
1358  notify->setPixmap( QPixmap::fromImage( picture().image() ) );
1359  connect( notify, SIGNAL(activated(uint)) , this, SLOT(execute()) );
1360 
1361  notify->addContext( qMakePair( QString::fromLatin1("contact"), metaContactId().toString() ) );
1362  foreach( Kopete::Group *g , groups() )
1363  {
1364  notify->addContext( qMakePair( QString::fromLatin1("group") , QString::number( g->groupId() ) ) );
1365  }
1366  notify->sendEvent();
1367  }
1368  }
1369  d->notifyOnlineStatus = newNotifyOnlineStatus;
1370 }
1371 
1372 
1373 } //END namespace Kopete
1374 
1375 #include "kopetemetacontact.moc"
1376 
1377 // vim: set noet ts=4 sts=4 sw=4:
Kopete::Contact::isReachable
virtual bool isReachable()
Get whether this contact can receive messages.
Definition: kopetecontact.cpp:424
Kopete::MetaContact::setPhotoSourceContact
void setPhotoSourceContact(Contact *contact)
set the subcontact to use for SourceContact source
Definition: kopetemetacontact.cpp:836
Kopete::ContactListElement::pluginContactData
QMap< QString, ContactDataList > pluginContactData() const
Get the settings as stored previously by calls to setPluginContactData() Note that plugins shouldn't ...
Definition: kopetecontactlistelement.cpp:112
kopetemetacontact.h
Kopete::ContactList::self
static ContactList * self()
The contact list is a singleton object.
Definition: kopetecontactlist.cpp:71
Kopete::OnlineStatus
Definition: kopeteonlinestatus.h:68
status
OnlineStatus::StatusType status
Definition: kopeteonlinestatus.cpp:103
Kopete::MetaContact::Private::contactPicture
Picture contactPicture
Definition: kopetemetacontact_p.h:71
Kopete::ContactList
manage contacts and metacontact
Definition: kopetecontactlist.h:49
Kopete::MetaContact::Private::nameSourceCID
QString nameSourceCID
Definition: kopetemetacontact_p.h:67
Kopete::Account::myself
Contact * myself() const
Retrieve the 'myself' contact.
Definition: kopeteaccount.cpp:535
Kopete::Picture
Represent a picture in Kopete context.
Definition: kopetepicture.h:61
Kopete::MetaContact::addToGroup
void addToGroup(Kopete::Group *to)
Add a contact to another group.
Definition: kopetemetacontact.cpp:1037
Kopete::MetaContact::movedToGroup
void movedToGroup(Kopete::MetaContact *contact, Kopete::Group *from, Kopete::Group *to)
The contact was moved.
Kopete::MetaContact::sendFile
void sendFile(const KUrl &sourceURL, const QString &altFileName=QString(), unsigned long fileSize=0L)
Send a file to this metacontact.
Definition: kopetemetacontact.cpp:569
Kopete::Account::priority
uint priority
Definition: kopeteaccount.h:84
Kopete::MetaContact::statusIcon
QString statusIcon() const
The name of the icon associated with the contact's status.
Kopete::ContactListElement::ContactDataList
QList< ContactData > ContactDataList
Definition: kopetecontactlistelement.h:116
kopetemetacontact_p.h
Kopete::MetaContact::setTemporary
void setTemporary(bool b=true, Kopete::Group *group=0L)
Set if this is a temporary contact.
Definition: kopetemetacontact.cpp:1142
Kopete::PropertyContainer::propertyChanged
void propertyChanged(Kopete::PropertyContainer *container, const QString &key, const QVariant &oldValue, const QVariant &newValue)
Kopete::MetaContact::setDisplayName
void setDisplayName(const QString &name)
Set the custom displayName.
Definition: kopetemetacontact.cpp:614
Kopete::MetaContact::Private::temporary
bool temporary
Definition: kopetemetacontact_p.h:60
Kopete::Emoticons::parseEmoticons
static QString parseEmoticons(const QString &text, KEmoticonsTheme::ParseMode mode=KEmoticonsTheme::DefaultParse, const QStringList &exclude=QStringList())
Definition: kopeteemoticons.cpp:36
Kopete::MetaContact::kabcId
QString kabcId() const
Get the KABC id for this metacontact.
Definition: kopetemetacontact.cpp:1161
Kopete::Global::Properties::self
static Properties * self()
Singleton accessor for this class.
Definition: kopeteglobal.cpp:49
Kopete::nameFromContact
QString nameFromContact(Kopete::Contact *c)
Definition: kopetemetacontact.cpp:713
Kopete::Contact::execute
void execute()
The user clicked on the contact, do the default action.
Definition: kopetecontact.cpp:446
Kopete::ContactListElement::loading
bool loading() const
Check if we are in loading stage.
Definition: kopetecontactlistelement.cpp:61
kopeteaccount.h
Kopete::OnlineStatus::description
QString description() const
Return the description.
Definition: kopeteonlinestatus.cpp:262
Kopete::MetaContact::contactRemoved
void contactRemoved(Kopete::Contact *c)
a contact has been removed from this metacontact
Kopete::Global::Properties::nickName
const PropertyTmpl & nickName() const
Definition: kopeteglobal.cpp:205
Kopete::Contact::contactId
QString contactId
Definition: kopetecontact.h:70
Kopete::MetaContact::photo
KDE_DEPRECATED QImage photo() const
the photo showed in the contact list window
Definition: kopetemetacontact.cpp:739
Kopete::StatusMessage
This class encapsulate a status message.
Definition: kopetestatusmessage.h:48
Kopete::MetaContact::statusString
QString statusString() const
The status string of the contact.
Kopete::MetaContact::setDisplayNameSourceContact
void setDisplayNameSourceContact(Contact *contact)
set the subcontact whose name is to be tracked (set to null to disable tracking)
Definition: kopetemetacontact.cpp:824
Kopete::MetaContact::removeFromGroup
void removeFromGroup(Kopete::Group *from)
Remove a contact from one group.
Definition: kopetemetacontact.cpp:1014
Kopete::MetaContact::findContact
Contact * findContact(const QString &protocolId, const QString &accountId, const QString &contactId)
Find the Contact to a given contact.
Definition: kopetemetacontact.cpp:250
Kopete::MetaContact::Private::photoSourceAID
QString photoSourceAID
Definition: kopetemetacontact_p.h:68
Kopete::MetaContact::photoChanged
void photoChanged()
The meta contact's photo changed.
Kopete::MetaContact::contactAdded
void contactAdded(Kopete::Contact *c)
a contact has been added into this metacontact
Kopete::KABCPersistence::write
void write(MetaContact *mc)
Change the KABC data associated with this metacontact.
Definition: kabcpersistence.cpp:102
Kopete::Protocol
base class of every protocol.
Definition: kopeteprotocol.h:62
Kopete::MetaContact::Private::nameSourceAID
QString nameSourceAID
Definition: kopetemetacontact_p.h:67
kabcpersistence.h
Kopete::MetaContact::Private::kabcPicture
Picture kabcPicture
Definition: kopetemetacontact_p.h:71
Kopete::Account::isConnected
bool isConnected
Definition: kopeteaccount.h:81
Kopete::OnlineStatus::Unknown
Refers to protocols where state cannot be determined.
Definition: kopeteonlinestatus.h:90
Kopete::PropertyContainer::property
const Kopete::Property & property(const QString &key) const
Get the value of a property with key "key".
Definition: kopetepropertycontainer.cpp:111
Kopete::OnlineStatus::Offline
State where you really cannot be contacted.
Definition: kopeteonlinestatus.h:98
Kopete::MetaContact::slotAllPluginsLoaded
void slotAllPluginsLoaded()
When all the plugins are loaded, set the Contact Source.
Definition: kopetemetacontact.cpp:1108
Kopete::Contact::MovedBetweenGroup
the contact has been moved between groups
Definition: kopetecontact.h:80
kopetegroup.h
Kopete::Contact::isOnline
bool isOnline
Definition: kopetecontact.h:66
Kopete::Contact::account
Account * account() const
Get the account that this contact belongs to.
Definition: kopetecontact.cpp:498
Kopete::OnlineStatus::weight
unsigned weight() const
Return the weight.
Definition: kopeteonlinestatus.cpp:252
Kopete::ContactList::metaContacts
QList< MetaContact * > metaContacts() const
return a list of all metacontact of the contact list Retrieve the list of all available meta contacts...
Definition: kopetecontactlist.cpp:112
Kopete::MetaContact::customPhoto
KUrl customPhoto() const
Returns the custom display photo.
Definition: kopetemetacontact.cpp:723
Kopete::MetaContact::removeContact
void removeContact(Contact *c, bool deleted=false)
remove the contact from this metacontact
Definition: kopetemetacontact.cpp:161
Kopete::OnlineStatus::status
StatusType status() const
Return the status.
Definition: kopeteonlinestatus.cpp:242
Kopete::OnlineStatus::isDefinitelyOnline
bool isDefinitelyOnline() const
Definition: kopeteonlinestatus.cpp:287
Kopete::MetaContact::Private::kabcId
QString kabcId
Definition: kopetemetacontact_p.h:52
Kopete::Contact::nickName
QString nickName
Definition: kopetecontact.h:73
Kopete::MetaContact::PropertySource
PropertySource
Enumeration of possible sources for a property (which may be photos, see setPhotoSource() for instanc...
Definition: kopetemetacontact.h:75
Kopete::MetaContact::Private::photoSource
PropertySource photoSource
Definition: kopetemetacontact_p.h:44
Kopete::MetaContact::photoSourceContact
Contact * photoSourceContact() const
get the subcontact being tracked for its photo
Definition: kopetemetacontact.cpp:819
Kopete::MetaContact::addressBookField
QString addressBookField(Plugin *p, const QString &app, const QString &key) const
Get or set a field for the KDE address book backend.
Definition: kopetemetacontact.cpp:1071
Kopete::ContactListElement::useCustomIconChanged
void useCustomIconChanged(bool useCustomIcon)
The useCustomIcon property has changed.
kopeteuiglobal.h
Kopete::MetaContact::onlineStatusNotification
void onlineStatusNotification(Kopete::Contact *c)
Definition: kopetemetacontact.cpp:1275
Kopete::MetaContact::SourceCustom
Data comes from somewhere else.
Definition: kopetemetacontact.h:78
Kopete::Picture::image
QImage image()
Return the current picture as QImage.
Definition: kopetepicture.cpp:78
Kopete::MetaContact::customDisplayName
QString customDisplayName() const
Returns the custom display name.
Definition: kopetemetacontact.cpp:657
Kopete::MetaContact::setPhotoSyncedWithKABC
void setPhotoSyncedWithKABC(bool b)
Set if the photo should be synced with the adressbook when the photosource change his photo...
Definition: kopetemetacontact.cpp:1207
Kopete::MetaContact::MetaContact
MetaContact()
constructor
Definition: kopetemetacontact.cpp:50
Kopete::MetaContact::sendMessage
Contact * sendMessage()
Send a single message, classic ICQ style.
Definition: kopetemetacontact.cpp:324
Kopete::MetaContact::~MetaContact
~MetaContact()
destructor
Definition: kopetemetacontact.cpp:75
Kopete::ContactListElement::Offline
Definition: kopetecontactlistelement.h:158
Kopete::BehaviorSettings::enableEventsWhileAway
static bool enableEventsWhileAway()
Get Enable events while away.
Definition: kopetebehaviorsettings.h:504
Kopete::Contact::onlineStatus
OnlineStatus onlineStatus() const
Get the online status of the contact.
Definition: kopetecontact.cpp:133
Kopete::MetaContact::SourceContact
Data comes from the contact itself.
Definition: kopetemetacontact.h:76
Kopete::MetaContact::setDisplayNameSource
void setDisplayNameSource(PropertySource source)
Set the source of metacontact displayName.
Definition: kopetemetacontact.cpp:276
Kopete::photoFromKABC
QImage photoFromKABC(const QString &id)
Definition: kopetemetacontact.cpp:784
Kopete::Global::Properties::isAlwaysVisible
const PropertyTmpl & isAlwaysVisible() const
Definition: kopeteglobal.cpp:211
Kopete::MetaContact::contactIdleStateChanged
void contactIdleStateChanged(Kopete::Contact *contact)
One of the subcontacts' idle status has changed.
Kopete::MetaContact::displayNameSource
PropertySource displayNameSource() const
get the source of metacontact display name
Definition: kopetemetacontact.cpp:296
Kopete::Contact::protocol
Protocol * protocol() const
Get the protocol that the contact belongs to.
Definition: kopetecontact.cpp:493
Kopete::MetaContact::addedToGroup
void addedToGroup(Kopete::MetaContact *contact, Kopete::Group *to)
The contact was added to another group.
Kopete::MetaContact::moveToGroup
void moveToGroup(Kopete::Group *from, Kopete::Group *to)
Move a contact from one group to another.
Definition: kopetemetacontact.cpp:975
Kopete::MetaContact::canAcceptFiles
bool canAcceptFiles() const
Returns whether this contact can accept files.
Kopete::MetaContact::Private::customPicture
Picture customPicture
Definition: kopetemetacontact_p.h:71
Kopete::StatusMessage::setTitle
void setTitle(const QString &title)
Set a new status title.
Definition: kopetestatusmessage.cpp:104
Kopete::Picture::clear
void clear()
Reset the picture.
Definition: kopetepicture.cpp:146
Kopete::ContactListElement
Definition: kopetecontactlistelement.h:46
Kopete::MetaContact::picture
Picture & picture() const
Return the correct Kopete::Picture object depending of the metacontact photo source.
Definition: kopetemetacontact.cpp:744
kopeteemoticons.h
Kopete::Group::groupId
uint groupId
Definition: kopetegroup.h:47
Kopete::OnlineStatus::Busy
Means that you have other things to do and don't want to get involved in messaging ('Busy' or 'Do not...
Definition: kopeteonlinestatus.h:123
Kopete::MetaContact::status
OnlineStatus::StatusType status() const
Return a more fine-grained status.
Definition: kopetemetacontact.cpp:509
Kopete::MetaContact::Private::photoSourcePID
QString photoSourcePID
Definition: kopetemetacontact_p.h:68
Kopete::Account::accountId
QString accountId
Definition: kopeteaccount.h:77
Kopete::Plugin::pluginId
QString pluginId() const
Get the plugin id.
Definition: kopeteplugin.cpp:46
Kopete::MetaContact::SourceKABC
Data comes from KABC (addressbook).
Definition: kopetemetacontact.h:77
kopeteprotocol.h
Kopete::Contact::sendFile
virtual void sendFile(const KUrl &sourceURL=KUrl(), const QString &fileName=QString(), uint fileSize=0L)
This is the Contact level slot for sending files.
Definition: kopetecontact.cpp:220
Kopete::Contact::manager
virtual ChatSession * manager(CanCreateFlags canCreate=CannotCreate)=0
Returns the primary message manager affiliated with this contact Although a contact can have more tha...
Kopete::MetaContact::Private::photoSourceCID
QString photoSourceCID
Definition: kopetemetacontact_p.h:68
Kopete::photoFromContact
QImage photoFromContact(Kopete::Contact *contact)
Definition: kopetemetacontact.cpp:763
kopetecontactlist.h
Kopete::Contact::DisplayNameChanged
the displayname of the contact changed
Definition: kopetecontact.h:81
Kopete::MetaContact::contacts
QList< Contact * > contacts() const
Retrieve the list of contacts that are part of the meta contact.
Definition: kopetemetacontact.cpp:1270
Kopete::PropertyContainer::hasProperty
bool hasProperty(const QString &key) const
Check for existence of a certain property stored using "key".
Definition: kopetepropertycontainer.cpp:106
Kopete::MetaContact::Private::metaContactId
QUuid metaContactId
Definition: kopetemetacontact_p.h:42
Kopete::ContactListElement::clearPluginContactData
void clearPluginContactData()
Clear all plugin specific data.
Definition: kopetecontactlistelement.cpp:125
Kopete::Group::Offline
Definition: kopetegroup.h:56
Kopete::Account::isAway
bool isAway
Definition: kopeteaccount.h:82
Kopete::ContactListElement::icon
QString icon(IconState state=None) const
return the icon for this object, in the given state.
Definition: kopetecontactlistelement.cpp:162
Kopete::Contact::startChat
void startChat()
This should typically pop up a KopeteChatWindow.
Definition: kopetecontact.cpp:432
Kopete::MetaContact::Private::displayNameSource
PropertySource displayNameSource
Definition: kopetemetacontact_p.h:45
Kopete::MetaContact::Private::displayNameSourceContact
Contact * displayNameSourceContact
Definition: kopetemetacontact_p.h:48
Kopete::Contact
Definition: kopetecontact.h:58
Kopete::MetaContact::Private::photoSyncedWithKABC
bool photoSyncedWithKABC
Definition: kopetemetacontact_p.h:63
Kopete::Picture::path
QString path()
Return the local path of the current picture.
Definition: kopetepicture.cpp:108
Kopete::OnlineStatus::Online
Refers to a true online state, i.e.
Definition: kopeteonlinestatus.h:129
Kopete::Plugin
Base class for all plugins or protocols.
Definition: kopeteplugin.h:84
Kopete::ContactListElement::iconChanged
void iconChanged(Kopete::ContactListElement::IconState, const QString &)
The icon to use for some state has changed.
Kopete::MetaContact::Private::notifyOnlineStatus
OnlineStatus notifyOnlineStatus
Definition: kopetemetacontact_p.h:64
Kopete::MetaContact::removedFromGroup
void removedFromGroup(Kopete::MetaContact *contact, Kopete::Group *group)
The contact was removed from group.
Kopete::MetaContact::Private
Definition: kopetemetacontact_p.h:30
Kopete::UI::Global::mainWidget
KOPETE_EXPORT QWidget * mainWidget()
Returns the main widget - this is the widget that message boxes and KNotify stuff should use as a par...
Definition: kopeteuiglobal.cpp:37
Kopete::MetaContact::photoSource
PropertySource photoSource() const
get the source of metacontact photo
Definition: kopetemetacontact.cpp:318
Kopete::MetaContact::Private::nameSourcePID
QString nameSourcePID
Definition: kopetemetacontact_p.h:67
Kopete::Plugin::deserialize
virtual void deserialize(MetaContact *metaContact, const QMap< QString, QString > &data)
deserialize() and tell the plugin to apply the previously stored data again.
Definition: kopeteplugin.cpp:85
Kopete::Global::Properties::photo
const PropertyTmpl & photo() const
default template for a contact's photo.
Definition: kopeteglobal.cpp:217
Kopete::Protocol::deserializeContactList
virtual void deserializeContactList(MetaContact *metaContact, const QList< QMap< QString, QString > > &dataList)
Deserialize the plugin data for a meta contact's contacts.
Definition: kopeteprotocol.cpp:231
Kopete::MetaContact::displayName
QString displayName() const
the display name showed in the contact list window
Kopete::Group::topLevel
static Group * topLevel()
Definition: kopetegroup.cpp:35
Kopete::MetaContact::slotPluginLoaded
void slotPluginLoaded(Kopete::Plugin *plugin)
If a plugin is loaded, maybe data about this plugin are already cached in the metacontact.
Definition: kopetemetacontact.cpp:1086
Kopete::MetaContact::isOnline
bool isOnline() const
Returns whether this contact can be reached online for at least one FIXME: Make that an enum...
Kopete::MetaContact::setMetaContactId
void setMetaContactId(const QUuid &newMetaContactId)
Definition: kopetemetacontact.cpp:85
Kopete::MetaContact::statusMessage
StatusMessage statusMessage() const
The status message of metacontact.
Definition: kopetemetacontact.cpp:1081
Kopete::MetaContact::setPhotoSource
void setPhotoSource(PropertySource source)
Set the source of metacontact photo.
Definition: kopetemetacontact.cpp:301
Kopete::MetaContact::addContact
void addContact(Contact *c)
Add a contact which has just been deserialised to the meta contact.
Definition: kopetemetacontact.cpp:90
Kopete::Protocol::serialize
void serialize(Kopete::MetaContact *metaContact)
Serialize meta contact into the metacontact's plugin data Call serialize() for all contained contacts...
Definition: kopeteprotocol.cpp:175
Kopete::MetaContact::slotProtocolLoaded
void slotProtocolLoaded(Kopete::Protocol *p)
If a protocol is loaded, deserialize cached data.
Definition: kopetemetacontact.cpp:1098
Kopete::MetaContact::Private::photoSourceContact
Contact * photoSourceContact
Definition: kopetemetacontact_p.h:49
Kopete::MetaContact::Private::statusMessage
Kopete::StatusMessage statusMessage
Definition: kopetemetacontact_p.h:73
Kopete::MetaContact::serialize
void serialize()
Serialize this metaContact This causes each Kopete::Protocol subclass to serialise its contacts' data...
Definition: kopetemetacontact.cpp:589
Kopete::BehaviorSettings::self
static BehaviorSettings * self()
Definition: kopetebehaviorsettings.cpp:23
kopeteaccountmanager.h
Kopete::MetaContact::execute
Contact * execute()
Contact another user.
Definition: kopetemetacontact.cpp:419
Kopete::MetaContact::Private::groups
QList< Group * > groups
Definition: kopetemetacontact_p.h:58
Kopete::ContactListElement::Unknown
Definition: kopetecontactlistelement.h:158
Kopete::MetaContact::Private::displayName
QString displayName
Definition: kopetemetacontact_p.h:55
Kopete::MetaContact::isTemporary
bool isTemporary() const
Temporary contacts will not be serialized.
Kopete::MetaContact::idleTime
quint32 idleTime() const
return the time in second the contact is idle.
Definition: kopetemetacontact.cpp:438
Kopete::MetaContact::groups
QList< Group * > groups() const
The groups the contact is stored in.
Definition: kopetemetacontact.cpp:1061
Kopete::Group
Class which represents the Group.
Definition: kopetegroup.h:44
Kopete::KABCPersistence::addressBook
static KABC::AddressBook * addressBook()
Access Kopete's KDE address book instance.
Definition: kabcpersistence.cpp:92
Kopete::Account::suppressStatusNotification
bool suppressStatusNotification
Definition: kopeteaccount.h:83
Kopete::PropertyContainer
Definition: kopetepropertycontainer.h:39
Kopete::MetaContact::isAlwaysVisible
bool isAlwaysVisible() const
Returns whether this contact is visible even if offline.
Definition: kopetemetacontact.cpp:526
Kopete::MetaContact::contactStatusChanged
void contactStatusChanged(Kopete::Contact *contact, const Kopete::OnlineStatus &status)
A contact's online status changed.
Kopete::MetaContact::persistentDataChanged
void persistentDataChanged()
Some part of this object's persistent data (as returned by toXML) has changed.
Kopete::MetaContact::onlineStatusChanged
void onlineStatusChanged(Kopete::MetaContact *contact, Kopete::OnlineStatus::StatusType status)
The MetaContact online status changed.
Kopete::ContactListElement::Away
Definition: kopetecontactlistelement.h:158
Kopete::Contact::sendMessage
void sendMessage()
Pops up an email type window.
Definition: kopetecontact.cpp:439
Kopete::Property::value
const QVariant & value() const
Getter for this properties value.
Definition: kopeteproperty.cpp:229
Kopete::MetaContact::Private::onlineStatus
OnlineStatus::StatusType onlineStatus
Definition: kopetemetacontact_p.h:62
Kopete::ContactListElement::Online
Definition: kopetecontactlistelement.h:158
Kopete::nameFromKABC
QString nameFromKABC(const QString &id)
Definition: kopetemetacontact.cpp:694
Kopete::MetaContact
Definition: kopetemetacontact.h:54
Kopete::MetaContact::isReachable
bool isReachable() const
Like isOnline, but returns true even if the contact is not online, but can be reached trough offline-...
Kopete::OnlineStatus::Away
Refers to a state where you can be technically reached, but for one reason or another it is often not...
Definition: kopeteonlinestatus.h:117
Kopete::MetaContact::photoFromCustom
QImage photoFromCustom() const
Definition: kopetemetacontact.cpp:758
Kopete::Group::Temporary
Definition: kopetegroup.h:56
Kopete::Picture::isNull
bool isNull()
Check if the picture is null.
Definition: kopetepicture.cpp:134
Kopete::MetaContact::displayNameChanged
void displayNameChanged(const QString &oldName, const QString &newName)
The meta contact's display name changed.
Kopete::MetaContact::setAddressBookField
void setAddressBookField(Plugin *p, const QString &app, const QString &key, const QString &value)
set an address book field
Definition: kopetemetacontact.cpp:1076
Kopete::Utils::notify
void notify(QPixmap pic, const QString &eventid, const QString &caption, const QString &message, const QString explanation, const QString debugInfo)
Definition: kopeteutils.cpp:64
Kopete::Picture::setPicture
void setPicture(const QImage &image)
Set the picture content.
Definition: kopetepicture.cpp:154
Kopete::ContactListElement::pluginData
const PluginDataMap pluginData() const
return plugin-specific data for all plugins
Definition: kopetecontactlistelement.cpp:107
Kopete::MetaContact::Private::photoUrl
KUrl photoUrl
Definition: kopetemetacontact_p.h:56
Kopete::MetaContact::startChat
Contact * startChat()
Start a chat in a persistent chat window.
Definition: kopetemetacontact.cpp:342
Kopete::MetaContact::setKabcId
void setKabcId(const QString &newKabcId)
Set the KABC id for this metacontact Use with care! You could create a one to many relationship...
Definition: kopetemetacontact.cpp:1175
Kopete::Contact::idleTime
virtual unsigned long int idleTime() const
Get the time (in seconds) this contact has been idle It will return the time set in setIdleTime() wit...
Definition: kopetecontact.cpp:555
Kopete::ContactListElement::pluginDataChanged
void pluginDataChanged()
The plugin data was changed (by a plugin)
Kopete::OnlineStatus::StatusType
StatusType
The available global states.
Definition: kopeteonlinestatus.h:78
Kopete::PropertyTmpl::key
const QString & key() const
Getter for the unique key.
Definition: kopeteproperty.cpp:137
Kopete::Group::type
GroupType type() const
Definition: kopetegroup.cpp:127
Kopete::KABCPersistence::writeAddressBook
void writeAddressBook(KABC::Resource *res)
Request an address book write, will be delayed to bundle any others happening around the same time...
Definition: kabcpersistence.cpp:177
Kopete::MetaContact::Private::contacts
QList< Contact * > contacts
Definition: kopetemetacontact_p.h:38
Kopete::KABCPersistence::self
static KABCPersistence * self()
Retrieve the instance of AccountManager.
Definition: kabcpersistence.cpp:86
Kopete::MetaContact::preferredContact
Contact * preferredContact()
Definition: kopetemetacontact.cpp:360
Kopete::ContactListElement::IconState
IconState
The various icon states.
Definition: kopetecontactlistelement.h:158
Kopete::MetaContact::statusMessageChanged
void statusMessageChanged(Kopete::MetaContact *metaContact)
Status title or message has changed.
kopetebehaviorsettings.h
Kopete::Contact::CannotCreate
Definition: kopetecontact.h:283
Kopete::ContactListElement::useCustomIcon
bool useCustomIcon() const
return if yes or no the user wants to display some custom icon.
Definition: kopetecontactlistelement.cpp:181
Kopete::MetaContact::metaContactId
QUuid metaContactId() const
Returns this metacontact's ID.
kopetepluginmanager.h
kopetecontact.h
Kopete::MetaContact::setPhoto
void setPhoto(const KUrl &url)
Set the custom photo.
Definition: kopetemetacontact.cpp:728
kopeteglobal.h
Kopete::StatusMessage::setMessage
void setMessage(const QString &message)
Set a new status message.
Definition: kopetestatusmessage.cpp:70
Kopete::MetaContact::Private::addressBook
QMap< QString, QMap< QString, QString > > addressBook
Definition: kopetemetacontact_p.h:59
Kopete::Group::temporary
static Group * temporary()
Definition: kopetegroup.cpp:43
name
const char * name
Definition: kopeteonlinestatus.cpp:104
Kopete::MetaContact::isPhotoSyncedWithKABC
bool isPhotoSyncedWithKABC() const
Definition: kopetemetacontact.cpp:1202
Kopete::OnlineStatus::Connecting
State where the user is not available on the network yet but trying to get onto.
Definition: kopeteonlinestatus.h:104
Kopete::MetaContact::displayNameSourceContact
Contact * displayNameSourceContact() const
get the subcontact being tracked for its displayname (null if not set)
Definition: kopetemetacontact.cpp:814
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:53:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kopete/libkopete

Skip menu "kopete/libkopete"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal