kopete/libkopete
Kopete::ContactList Class Reference
#include <kopetecontactlist.h>

Detailed Description
manage contacts and metacontactThe 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.
Definition at line 48 of file kopetecontactlist.h.
Constructor & Destructor Documentation
| Kopete::ContactList::~ContactList | ( | ) |
Definition at line 104 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 277 of file kopetecontactlist.cpp.
Add groups each group must be added on the list after his creation.
Definition at line 271 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 229 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 223 of file kopetecontactlist.cpp.
| 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:
-
protocolId the Plugin::pluginId() of the protocol ("MSNProtocol") accountId the Account::accountId() contactId the Contact::contactId()
- Returns:
- the contact with the parameters, or 0L if not found.
Definition at line 151 of file kopetecontactlist.cpp.
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:
-
displayName is the display name to search type is the Group::GroupType to search, the default value is group::Normal
- Returns:
- always a valid Group
Definition at line 191 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 177 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 165 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 137 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.
| void Kopete::ContactList::load | ( | ) | [slot] |
| 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 122 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::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 110 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 311 of file kopetecontactlist.cpp.
| void Kopete::ContactList::removeGroup | ( | Kopete::Group * | g | ) | [slot] |
| void Kopete::ContactList::removeMetaContact | ( | Kopete::MetaContact * | contact | ) | [slot] |
Remove a metacontact from the contact list.
This method delete itself the metacontact.
Definition at line 243 of file kopetecontactlist.cpp.
| void Kopete::ContactList::save | ( | ) | [slot] |
Definition at line 341 of file kopetecontactlist.cpp.
return the list of groups actualy selected in the contact list UI
Definition at line 218 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 213 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 70 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 301 of file kopetecontactlist.cpp.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference