Logo Search packages:      
Sourcecode: kdenetwork version File versions

KopeteContact Class Reference

#include <kopetecontact.h>

Inheritance diagram for KopeteContact:

GroupWiseContact IRCContact OscarContact TestbedContact IRCChannelContact IRCServerContact IRCUserContact

List of all members.

Detailed Description

Duncan Mac-Vicar P. <duncan@kde.org>

Martijn Klingens <klingens@kde.org>

Olivier Goffart <ogoffart@tiscalinet.be>

This class abstracts a generic contact Use it for inserting contacts in the contact list for example.

Definition at line 53 of file kopetecontact.h.

Public Slots

void execute ()
virtual void sendFile (const KURL &sourceURL=KURL(), const QString &fileName=QString::null, uint fileSize=0L)
void sendMessage ()
void setIcon (const QString &icon)
void slotChangeMetaContact ()
virtual void slotDeleteContact ()
virtual void slotUserInfo ()
void startChat ()
virtual void syncGroups ()
 Syncronise the server and the metacontact. Protocols with server-side contact lists can implement this to sync the server groups with the metaContact groups. Or the server alias if any.


void contactDestroyed (KopeteContact *contact)
void idleStateChanged (KopeteContact *contact)
void onlineStatusChanged (KopeteContact *contact, const KopeteOnlineStatus &status, const KopeteOnlineStatus &oldStatus)
void propertyChanged (KopeteContact *contact, const QString &key, const QVariant &oldValue, const QVariant &newValue)

Public Member Functions

KopeteAccountaccount () const
 Get the account that this contact belongs to.
bool canAcceptFiles () const
 Get whether or not this contact can accept file transfers.
QString contactId () const
 Get the unique id that identifies a contact.
virtual QPtrList< KAction > * customContextMenuActions (KopeteMessageManager *manager)
virtual QPtrList< KAction > * customContextMenuActions ()
 Get the set of custom menu items for this contact.
void deserializeProperties (QMap< QString, QString > &serializedData)
 Deserialize the contacts persistent properties.
QString displayName () const KDE_DEPRECATED
 Get the current display name.
QString formattedIdleTime () const
virtual QString formattedName () const
bool hasProperty (const QString &key) const
virtual QString & icon () const
virtual unsigned long int idleTime () const
 Get the time (in seconds) this contact has been idle It will return the time set in setIdleTime() with an addition of the time since you set this last time.
bool isFileCapable () const
 Get whether or not this contact is capable of file transfers.
bool isOnline () const
 Get whether this contact is online.
virtual bool isReachable ()
 Get whether this contact can receive messages.
 KopeteContact (KopeteAccount *account, const QString &id, KopeteMetaContact *parent, const QString &icon=QString::null)
 Create new contact.
virtual KopeteMessageManagermanager (bool canCreate=false)=0
KopeteMetaContactmetaContact () const
 Get the metacontact for this contact.
const KopeteOnlineStatusonlineStatus () const
 Get the online status of the contact.
KPopupMenu * popupMenu (KopeteMessageManager *manager=0L)
 Get the Context Menu for this contact.
QStringList properties () const
const Kopete::ContactPropertyproperty (const Kopete::ContactPropertyTmpl &tmpl) const
const Kopete::ContactPropertyproperty (const QString &key) const
 Get the value of a property with key "key".
KopeteProtocolprotocol () const
 Get the protocol that the contact belongs to.
void removeProperty (const Kopete::ContactPropertyTmpl &tmpl)
 Remove a property if it exists.
virtual void rename (const QString &newName) KDE_DEPRECATED
 Rename a contact's display name.
virtual void serialize (QMap< QString, QString > &serializedData, QMap< QString, QString > &addressBookData)
 Serialize the contact for storage in the contact list.
void serializeProperties (QMap< QString, QString > &serializedData)
 Serialize the contacts persistent properties for storage in the contact list.
void setFileCapable (bool filecap)
 Set the file transfer capability of this contact.
void setIdleTime (unsigned long int)
 Set the current idle time in seconds. Kopete will automatically calculate the time in idleTime except if you set 0.
void setMetaContact (KopeteMetaContact *m)
 Move this contact to a new MetaContact. This basically reparents the contact and updates the internal data structures. If the old contact is going to be empty, a question may ask to the user if it wants to delete the old contact.
void setOnlineStatus (const KopeteOnlineStatus &status)
 Set the contact's online status.
void setProperty (const Kopete::ContactPropertyTmpl &tmpl, const QVariant &value)
 Add or Set a property for this contact.
QString toolTip () const
 Get the tooltip for this contact Makes use of formattedName() and formattedIdleTime().

Protected Member Functions

void setDisplayName (const QString &name) KDE_DEPRECATED


bool canAcceptFiles
QString contactId
QString formattedIdleTime
QString formattedName
QString icon
bool isFileCapable
bool isOnline
QString toolTip

Private Slots

void slotAddContact ()

Private Attributes

KopeteContactPrivate * d

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index