kopete/libkopete
Kopete::ContactListElement Class Reference
#include <kopetecontactlistelement.h>

Detailed Description
This is the base class for base elements of the contact list. His purpose is to share the code between Group and MetaContact
It handle the saving and loading of plugin data from the contact list. Plugins may set custom data to metaocntacts or groups by calling setPluginData and may retrieve them with pluginData
It also allow to store an icon for this element.
Definition at line 45 of file kopetecontactlistelement.h.
Member Typedef Documentation
Definition at line 125 of file kopetecontactlistelement.h.
Definition at line 112 of file kopetecontactlistelement.h.
Member Enumeration Documentation
The various icon states.
Some state are reserved for Groups, other for metacontact. 'None' is the default icon.
Definition at line 124 of file kopetecontactlistelement.h.
Constructor & Destructor Documentation
| Kopete::ContactListElement::ContactListElement | ( | QObject * | parent = 0L |
) | [protected] |
Definition at line 39 of file kopetecontactlistelement.cpp.
| Kopete::ContactListElement::~ContactListElement | ( | ) | [protected] |
Definition at line 51 of file kopetecontactlistelement.cpp.
Member Function Documentation
| QString Kopete::ContactListElement::icon | ( | ContactListElement::IconState | state = None |
) | const |
return the icon for this object, in the given state.
if there is no icon registered for this state, the None icon is used if available
Definition at line 117 of file kopetecontactlistelement.cpp.
| void Kopete::ContactListElement::iconAppearanceChanged | ( | ) | [signal] |
The visual appearance of some of our icons has changed.
| void Kopete::ContactListElement::iconChanged | ( | Kopete::ContactListElement::IconState | , | |
| const QString & | ||||
| ) | [signal] |
The icon to use for some state has changed.
| const ContactListElement::IconMap Kopete::ContactListElement::icons | ( | ) | const |
| bool Kopete::ContactListElement::loading | ( | ) | const |
Check if we are in loading stage.
- Returns:
- true if we are in loading stage.
Definition at line 61 of file kopetecontactlistelement.cpp.
| const ContactListElement::PluginDataMap Kopete::ContactListElement::pluginData | ( | ) | const |
return plugin-specific data for all plugins
Definition at line 107 of file kopetecontactlistelement.cpp.
Convenience method to retrieve only a single field from the plugin data.
See setPluginData().
Note that plugin data is accessible only after it has been loaded from the XML file. Don't call this method before then (e.g. in constructors).
Definition at line 99 of file kopetecontactlistelement.cpp.
Get the settings as stored previously by calls to setPluginData().
Note that calling this method for protocol plugins that use the Contact::serialize() API may yield unexpected results.
Definition at line 91 of file kopetecontactlistelement.cpp.
| void Kopete::ContactListElement::pluginDataChanged | ( | ) | [signal] |
The plugin data was changed (by a plugin).
| void Kopete::ContactListElement::setIcon | ( | const QString & | icon, | |
| ContactListElement::IconState | state = None | |||
| ) |
Set the icon in the given state To clear an entry, set a QString().
Definition at line 125 of file kopetecontactlistelement.cpp.
| void Kopete::ContactListElement::setLoading | ( | bool | value | ) |
| void Kopete::ContactListElement::setPluginData | ( | Plugin * | plugin, | |
| const QString & | key, | |||
| const QString & | value | |||
| ) |
Convenience method to store or change only a single field of the plugin data.
As with the other setPluginData() method, protocols are advised not to use this method and reimplement Contact::serialize() instead.
Note that you should save the file after adding data or it will get lost.
Definition at line 84 of file kopetecontactlistelement.cpp.
| void Kopete::ContactListElement::setPluginData | ( | const QString & | pluginId, | |
| const QMap< QString, QString > & | pluginData | |||
| ) |
Definition at line 71 of file kopetecontactlistelement.cpp.
| void Kopete::ContactListElement::setPluginData | ( | Plugin * | plugin, | |
| const QMap< QString, QString > & | value | |||
| ) |
Set the plugin-specific data.
The data in the provided QMap is a set of key/value pairs. Note that protocol plugins usually shouldn't use this method, but reimplement Contact::serialize() instead. This method is called by Protocol for those classes.
WARNING: This erases all old data stored for this object! You may want to consider the setPluginData() overload that takes a single field as parameter.
Definition at line 66 of file kopetecontactlistelement.cpp.
| void Kopete::ContactListElement::setUseCustomIcon | ( | bool | useCustomIcon | ) |
set if the user want to show custom icon he set with setIcon this does not clear icons string if you set false
Definition at line 141 of file kopetecontactlistelement.cpp.
| bool Kopete::ContactListElement::useCustomIcon | ( | ) | const |
return if yes or no the user wants to display some custom icon.
you can use icon() to know the icons to uses
Definition at line 136 of file kopetecontactlistelement.cpp.
| void Kopete::ContactListElement::useCustomIconChanged | ( | bool | useCustomIcon | ) | [signal] |
The useCustomIcon property has changed.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference