Logo Search packages:      
Sourcecode: kmess version File versions  Download package

ContactList Class Reference
[contact]

#include <contactlist.h>

List of all members.


Detailed Description

Data class for the contact list.

This class stores the state of the current contact list, it does not update the server. The MsnNotificationConnection class sends update requests to the server. When the server acknowledges the change, it will be updated here. The user interface classes repond to the signals of this class to update their view.

The instance of this class is shared between the MsnNotificationConnection class, and re-used when the user connects with a different account. After the MsnNotificationConnection class is initialized, a pointer to the ContactList is set in the CurrentAccount class too. The CurrentAccount class is only used to provide access to the current contact list, the administration of the contacts is still done through the MsnNotificationConnection class,

Author:
Mike K. Bennett

Valerio Pilo

Definition at line 56 of file contactlist.h.


Public Slots

GroupaddGroup (const QString &groupId, const QString &groupName)
void removeContact (QString contactId)
void removeGroup (const QString &groupId)
void renameGroup (const QString &groupId, const QString &newName)

Signals

void contactAdded (Contact *contact)
void contactChangedMsnObject (Contact *contact)
void contactChangedStatus (Contact *contact, bool showBaloon)
void contactOffline (Contact *contact, bool showBaloon)
void contactOnline (Contact *contact, bool showBaloon)
void contactRemoved (Contact *contact)
void dndMoveContactToGroup (QString handle, QString oldGroupId, QString newGroupId)
void groupAdded (const Group *group)
void groupChanged (const Group *group)
void groupRemoved (const Group *group)

Public Member Functions

ContactaddContact (const QString &handle, const QString &friendlyName, int lists, QStringList groupIds, const QString &guid, bool isMessenger=true)
void changeContactStatus (const QString &handle, Status status, const QString &friendlyName=QString(), uint capabilities=0, const QString &msnObjectString=QString(), bool showBaloon=true)
int columnCount (const QModelIndex &parent=QModelIndex()) const
QVariant data (const QModelIndex &index, int role) const
bool dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
void dump (ContactListModelItem *start=0, int depth=1) const
Qt::ItemFlags flags (const QModelIndex &index) const
ContactgetContactByGuid (QString guid) const
ContactgetContactByHandle (QString handle) const
const QHash< QString, Contact * > & getContactList () const
GroupgetGroupById (QString groupId) const
GroupgetGroupByName (QString name) const
GroupgetGroupBySortPosition (int sortPosition, bool next) const
const QList< Group * > & getGroupList () const
bool hasChildren (const QModelIndex &parent) const
bool hasIndex (int row, int column, const QModelIndex &parent=QModelIndex()) const
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
bool isGroupEmpty (const QString &groupId) const
QMimeData * mimeData (const QModelIndexList &indexes) const
QStringList mimeTypes () const
QModelIndex parent (const QModelIndex &index) const
void readProperties ()
void renameContact (QString handle, QString newName)
void reset (bool restore=true)
int rowCount (const QModelIndex &parent=QModelIndex()) const
void saveProperties (const Group *group) const
void saveProperties (const Contact *contact) const
void saveProperties ()
Qt::DropActions supportedDropActions () const

Private Slots

void slotContactMoved (Contact *contact)
void slotForwardContactOffline (Contact *contact, bool showBaloon)
void slotForwardContactOnline (Contact *contact, bool showBaloon)
void slotGroupMoved (Group *group, int oldPosition, int newPosition)

Private Member Functions

bool contactExists (QString handle)
void ensureGroupListValid ()
void forwardDataChanged (ModelItemList itemList)
void forwardDataChanged (ContactListModelItem *item)
QModelIndex getIndexForGroup (QString groupId)
bool groupExists (QString groupId)
void removeContactFromGroup (const QString &handle, ContactListModelItem *groupItem)

Private Attributes

QHash< QString, Contact * > contacts_
QList< Group * > groups_
ContactListModelItemrootNode_

Friends

class KMessTest

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

Generated by  Doxygen 1.6.0   Back to index