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

kopete/libkopete

  • Kopete
  • ContactList
Public Slots | Signals | Public Member Functions | Static Public Member Functions | List of all members
Kopete::ContactList Class Reference

#include <kopetecontactlist.h>

Inheritance diagram for Kopete::ContactList:
Inheritance graph
[legend]

Public Slots

void addGroup (Kopete::Group *)
 
void addGroups (QList< Group * > groups)
 
void addMetaContact (Kopete::MetaContact *c)
 
void addMetaContacts (QList< MetaContact * > metaContacts)
 
void load ()
 
bool loaded () const
 
void mergeMetaContacts (QList< MetaContact * > src, Kopete::MetaContact *dst)
 
void removeGroup (Kopete::Group *)
 
void removeMetaContact (Kopete::MetaContact *contact)
 
void save ()
 
void setSelectedItems (QList< MetaContact * > metaContacts, QList< Group * > groups)
 
void shutdown ()
 

Signals

void contactListLoaded ()
 
void groupAdded (Kopete::Group *)
 
void groupRemoved (Kopete::Group *)
 
void groupRenamed (Kopete::Group *, const QString &oldname)
 
void metaContactAdded (Kopete::MetaContact *mc)
 
void metaContactAddedToGroup (Kopete::MetaContact *mc, Kopete::Group *to)
 
void metaContactMovedToGroup (Kopete::MetaContact *mc, Kopete::Group *from, Kopete::Group *to)
 
void metaContactRemoved (Kopete::MetaContact *mc)
 
void metaContactRemovedFromGroup (Kopete::MetaContact *mc, Kopete::Group *from)
 
void metaContactSelected (bool)
 
void selectionChanged ()
 

Public Member Functions

 ~ContactList ()
 
Contact * findContact (const QString &protocolId, const QString &accountId, const QString &contactId) const
 
Group * findGroup (const QString &displayName, int type=0)
 
MetaContact * findMetaContactByContactId (const QString &contactId) const
 
MetaContact * findMetaContactByDisplayName (const QString &displayName) const
 
Group * group (unsigned int groupId) const
 
QList< Group * > groups () const
 
MetaContact * metaContact (const QString &metaContactId) const
 
QList< MetaContact * > metaContacts () const
 
MetaContact * myself ()
 
QList< Group * > selectedGroups () const
 
QList< MetaContact * > selectedMetaContacts () const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
 QObject (QObject *parent, const char *name)
 
virtual  ~QObject ()
 
bool blockSignals (bool block)
 
QObject * child (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
const char * className () const
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const QObject *receiver, const char *method)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QByteArray > dynamicPropertyNames () const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
T findChild (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QList< T > findChildren (const QString &name) const
 
bool inherits (const char *className) const
 
void insertChild (QObject *object)
 
void installEventFilter (QObject *filterObj)
 
bool isA (const char *className) const
 
bool isWidgetType () const
 
void killTimer (int id)
 
virtual const QMetaObject * metaObject () const
 
void moveToThread (QThread *targetThread)
 
const char * name () const
 
const char * name (const char *defaultName) const
 
QString objectName () const
 
QObject * parent () const
 
QVariant property (const char *name) const
 
void removeChild (QObject *object)
 
void removeEventFilter (QObject *obj)
 
void setName (const char *name)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval)
 
QThread * thread () const
 

Static Public Member Functions

static ContactList * self ()
 
- Static Public Member Functions inherited from QObject
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 

Additional Inherited Members

- Protected Member Functions inherited from QObject
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const char *signal)
 
int receivers (const char *signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Properties inherited from QObject
 objectName
 

Detailed Description

manage contacts and metacontact

The contactList is a singleton you can uses with ContactList::self()

it let you get a list of metacontact with metaContacts() Only metacontact which are on the contact list are returned.

Author
Martijn Klingens kling.nosp@m.ens@.nosp@m.kde.o.nosp@m.rg
Olivier Goffart ogoff.nosp@m.art@.nosp@m.tisca.nosp@m.line.nosp@m.t.be

Definition at line 49 of file kopetecontactlist.h.

Constructor & Destructor Documentation

Kopete::ContactList::~ContactList ( )

Definition at line 105 of file kopetecontactlist.cpp.

Member Function Documentation

void Kopete::ContactList::addGroup ( Kopete::Group *  g)
slot

Add a group each group must be added on the list after his creation.

Definition at line 302 of file kopetecontactlist.cpp.

void Kopete::ContactList::addGroups ( QList< Group * >  groups)
slot

Add groups each group must be added on the list after his creation.

Definition at line 296 of file kopetecontactlist.cpp.

void Kopete::ContactList::addMetaContact ( Kopete::MetaContact *  c)
slot

Add the metacontact into the contact list When calling this method, the contact has to be already placed in the correct group.

If the contact is not in a group, it will be added to the top-level group. It is also better if the MetaContact could also be completely created, i.e: all contacts already in it

Definition at line 235 of file kopetecontactlist.cpp.

void Kopete::ContactList::addMetaContacts ( QList< MetaContact * >  metaContacts)
slot

Add metacontacts into the contact list When calling this method, contacts have to be already placed in the correct group.

If contacts are not in a group, they will be added to the top-level group. It is also better if the MetaContacts could also be completely created, i.e: all contacts already in it

Definition at line 229 of file kopetecontactlist.cpp.

void Kopete::ContactList::contactListLoaded ( )
signal
Contact * Kopete::ContactList::findContact ( const QString &  protocolId,
const QString &  accountId,
const QString &  contactId 
) const

find a contact in the contact list.

Browse in each metacontact of the list to find the contact with the given ID.

Parameters
protocolIdthe Plugin::pluginId() of the protocol ("MSNProtocol")
accountIdthe Account::accountId()
contactIdthe Contact::contactId()
Returns
the contact with the parameters, or 0L if not found.

Definition at line 156 of file kopetecontactlist.cpp.

Group * Kopete::ContactList::findGroup ( const QString &  displayName,
int  type = 0 
)

find a group with his displayName If a group already exists with the given name and the given type, the existing group will be returned.

Otherwise, a new group will be created.

Parameters
displayNameis the display name to search
typeis the Group::GroupType to search, the default value is group::Normal
Returns
always a valid Group

Definition at line 196 of file kopetecontactlist.cpp.

MetaContact * Kopete::ContactList::findMetaContactByContactId ( const QString &  contactId) const

Find a meta contact by its contact id.

Returns the first match.

Definition at line 182 of file kopetecontactlist.cpp.

MetaContact * Kopete::ContactList::findMetaContactByDisplayName ( const QString &  displayName) const

Find a contact by display name.

Returns the first match.

Definition at line 170 of file kopetecontactlist.cpp.

Group * Kopete::ContactList::group ( unsigned int  groupId) const

return the group with the given unique id.

if none is found return 0L

Definition at line 139 of file kopetecontactlist.cpp.

void Kopete::ContactList::groupAdded ( Kopete::Group *  )
signal

A group has just been added.

void Kopete::ContactList::groupRemoved ( Kopete::Group *  )
signal

A group has just been removed.

void Kopete::ContactList::groupRenamed ( Kopete::Group *  ,
const QString &  oldname 
)
signal

A group has just been renamed.

QList< Group * > Kopete::ContactList::groups ( ) const
Returns
all groups

Definition at line 118 of file kopetecontactlist.cpp.

void Kopete::ContactList::load ( )
slot

Load the contact list

Definition at line 357 of file kopetecontactlist.cpp.

bool Kopete::ContactList::loaded ( ) const
slot

Definition at line 379 of file kopetecontactlist.cpp.

void Kopete::ContactList::mergeMetaContacts ( QList< MetaContact * >  src,
Kopete::MetaContact *  dst 
)
slot

Merge one or more metacontacts into another one.

Definition at line 279 of file kopetecontactlist.cpp.

MetaContact * Kopete::ContactList::metaContact ( const QString &  metaContactId) const

Return the metacontact referenced by the given id.

is none is found, return 0L

See also
MetaContact::metaContactId()

Definition at line 124 of file kopetecontactlist.cpp.

void Kopete::ContactList::metaContactAdded ( Kopete::MetaContact *  mc)
signal

A meta contact was added to the contact list.

Interested classes ( like the listview widgets ) can connect to this signal to receive the newly added contacts.

void Kopete::ContactList::metaContactAddedToGroup ( Kopete::MetaContact *  mc,
Kopete::Group *  to 
)
signal

A contact has been added to a group.

void Kopete::ContactList::metaContactMovedToGroup ( Kopete::MetaContact *  mc,
Kopete::Group *  from,
Kopete::Group *  to 
)
signal

A contact has been moved from one group to another.

void Kopete::ContactList::metaContactRemoved ( Kopete::MetaContact *  mc)
signal

A metacontact has just been removed.

and will be soon deleted

void Kopete::ContactList::metaContactRemovedFromGroup ( Kopete::MetaContact *  mc,
Kopete::Group *  from 
)
signal

A contact has been removed from a group.

QList< MetaContact * > Kopete::ContactList::metaContacts ( ) const

return a list of all metacontact of the contact list Retrieve the list of all available meta contacts.

The returned QPtrList is not the internally used variable, so changes to it won't propagate into the actual contact list. This can be useful if you need a subset of the contact list, because you can simply filter the result set as you wish without worrying about side effects. The contained MetaContacts are obviously not duplicates, so changing those will have the expected result :-)

Definition at line 112 of file kopetecontactlist.cpp.

void Kopete::ContactList::metaContactSelected ( bool  )
signal

This signal is emitted each time the selection has changed.

the bool is set to true if only one meta contact has been selected, and set to false if none, or several contacts are selected you can connect this signal to KAction::setEnabled if you have an action which is applied to only one contact

MetaContact * Kopete::ContactList::myself ( )

return the metacontact that represent the user itself.

This metacontact should be the parent of every Kopete::Account::myself() contacts.

This metacontact is not in the contact list.

Definition at line 349 of file kopetecontactlist.cpp.

void Kopete::ContactList::removeGroup ( Kopete::Group *  g)
slot

Remove a group this method delete the group.

Definition at line 312 of file kopetecontactlist.cpp.

void Kopete::ContactList::removeMetaContact ( Kopete::MetaContact *  contact)
slot

Remove a metacontact from the contact list.

This method delete itself the metacontact.

Definition at line 251 of file kopetecontactlist.cpp.

void Kopete::ContactList::save ( )
slot

Definition at line 384 of file kopetecontactlist.cpp.

QList< Group * > Kopete::ContactList::selectedGroups ( ) const

return the list of groups actualy selected in the contact list UI

Definition at line 224 of file kopetecontactlist.cpp.

QList< MetaContact * > Kopete::ContactList::selectedMetaContacts ( ) const

return the list of metacontact actually selected in the contact list UI

Definition at line 219 of file kopetecontactlist.cpp.

void Kopete::ContactList::selectionChanged ( )
signal

This signal is emit when the selection has changed, it is emitted after the following slot Warning: Do not delete any contacts in slots connected to this signal.

(it is the warning in the QListView::selectionChanged() doc)

ContactList * Kopete::ContactList::self ( )
static

The contact list is a singleton object.

Use this method to retrieve the instance.

Definition at line 71 of file kopetecontactlist.cpp.

void Kopete::ContactList::setSelectedItems ( QList< MetaContact * >  metaContacts,
QList< Group * >  groups 
)
slot

Set which items are selected in the ContactList GUI.

This method has to be called by the contact list UI side. it stores the selected items, and emits signals

Definition at line 339 of file kopetecontactlist.cpp.

void Kopete::ContactList::shutdown ( )
slot

Save and shutdown the contact list

Definition at line 417 of file kopetecontactlist.cpp.


The documentation for this class was generated from the following files:
  • kopetecontactlist.h
  • kopetecontactlist.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:20 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