kopete/libkopete
#include <kopetecontactlistelement.h>
Public Types | |
typedef QMap< QString, QString > | ContactData |
typedef QList< ContactData > | ContactDataList |
typedef QMap< IconState, QString > | IconMap |
enum | IconState { None, Open, Closed, Online, Away, Offline, Unknown } |
typedef QMap< QString, QMap < QString, QString > > | PluginDataMap |
Signals | |
void | iconAppearanceChanged () |
void | iconChanged (Kopete::ContactListElement::IconState, const QString &) |
void | pluginDataChanged () |
void | useCustomIconChanged (bool useCustomIcon) |
Signals inherited from Kopete::PropertyContainer | |
void | propertyChanged (Kopete::PropertyContainer *container, const QString &key, const QVariant &oldValue, const QVariant &newValue) |
Public Member Functions | |
void | appendPluginContactData (const QString &pluginId, const ContactData &data) |
void | clearPluginContactData () |
QString | icon (IconState state=None) const |
const IconMap | icons () const |
bool | loading () const |
QMap< QString, ContactDataList > | pluginContactData () const |
ContactDataList | pluginContactData (Plugin *plugin) const |
QMap< QString, QString > | pluginData (Plugin *plugin) const |
QString | pluginData (Plugin *plugin, const QString &key) const |
const PluginDataMap | pluginData () const |
void | setIcon (const QString &icon, IconState=None) |
void | setLoading (bool value) |
void | setPluginContactData (Plugin *plugin, const ContactDataList &dataList) |
void | setPluginData (Plugin *plugin, const QMap< QString, QString > &value) |
void | setPluginData (const QString &pluginId, const QMap< QString, QString > &pluginData) |
void | setPluginData (Plugin *plugin, const QString &key, const QString &value) |
void | setUseCustomIcon (bool useCustomIcon) |
bool | useCustomIcon () const |
Public Member Functions inherited from Kopete::PropertyContainer | |
PropertyContainer (QObject *parent=0) | |
virtual | ~PropertyContainer () |
void | deserializeProperties (const QMap< QString, QString > &serializedData) |
bool | hasProperty (const QString &key) const |
QStringList | properties () const |
const Kopete::Property & | property (const QString &key) const |
const Kopete::Property & | property (const Kopete::PropertyTmpl &tmpl) const |
void | removeProperty (const Kopete::PropertyTmpl &tmpl) |
void | serializeProperties (QMap< QString, QString > &serializedData) const |
void | setProperty (const Kopete::PropertyTmpl &tmpl, const QVariant &value) |
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 ®Exp) 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 |
Protected Member Functions | |
ContactListElement (QObject *parent=0L) | |
~ContactListElement () | |
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) |
Additional Inherited Members | |
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) |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Properties inherited from QObject | |
objectName | |
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 46 of file kopetecontactlistelement.h.
Member Typedef Documentation
Definition at line 115 of file kopetecontactlistelement.h.
Definition at line 116 of file kopetecontactlistelement.h.
Definition at line 159 of file kopetecontactlistelement.h.
Definition at line 113 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.
Enumerator | |
---|---|
None | |
Open | |
Closed | |
Online | |
Away | |
Offline | |
Unknown |
Definition at line 158 of file kopetecontactlistelement.h.
Constructor & Destructor Documentation
|
protected |
Definition at line 41 of file kopetecontactlistelement.cpp.
|
protected |
Definition at line 51 of file kopetecontactlistelement.cpp.
Member Function Documentation
void Kopete::ContactListElement::appendPluginContactData | ( | const QString & | pluginId, |
const ContactData & | data | ||
) |
Convenience method to append plugin specific data for single contact Note that plugins shouldn't use this method.
Definition at line 144 of file kopetecontactlistelement.cpp.
void Kopete::ContactListElement::clearPluginContactData | ( | ) |
Clear all plugin specific data.
Note that plugins shouldn't use this method
Definition at line 125 of file kopetecontactlistelement.cpp.
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 162 of file kopetecontactlistelement.cpp.
|
signal |
The visual appearance of some of our icons has changed.
|
signal |
The icon to use for some state has changed.
const ContactListElement::IconMap Kopete::ContactListElement::icons | ( | ) | const |
return all registered icons
Definition at line 157 of file kopetecontactlistelement.cpp.
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.
QMap< QString, ContactListElement::ContactDataList > Kopete::ContactListElement::pluginContactData | ( | ) | const |
Get the settings as stored previously by calls to setPluginContactData() Note that plugins shouldn't use this method.
Definition at line 112 of file kopetecontactlistelement.cpp.
ContactListElement::ContactDataList Kopete::ContactListElement::pluginContactData | ( | Plugin * | plugin | ) | const |
Get the settings as stored previously by calls to setPluginContactData() for a plugin
Note that plugins shouldn't use this method.
Definition at line 117 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.
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.
const ContactListElement::PluginDataMap Kopete::ContactListElement::pluginData | ( | ) | const |
return plugin-specific data for all plugins
Definition at line 107 of file kopetecontactlistelement.cpp.
|
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 170 of file kopetecontactlistelement.cpp.
void Kopete::ContactListElement::setLoading | ( | bool | value | ) |
Set if we are in loading stage.
Definition at line 56 of file kopetecontactlistelement.cpp.
void Kopete::ContactListElement::setPluginContactData | ( | Plugin * | plugin, |
const ContactDataList & | dataList | ||
) |
Set plugin specific data for each contact.
Note that plugins shouldn't use this method
Definition at line 130 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::setPluginData | ( | const QString & | pluginId, |
const QMap< QString, QString > & | pluginData | ||
) |
Definition at line 71 of file kopetecontactlistelement.cpp.
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::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 186 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 181 of file kopetecontactlistelement.cpp.
|
signal |
The useCustomIcon property has changed.
The documentation for this class was generated from the following files:
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.