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

kopete/libkopete

Kopete::PropertyContainer

Kopete::PropertyContainer Class Reference

#include <kopetepropertycontainer.h>

Inheritance diagram for Kopete::PropertyContainer:

Inheritance graph
[legend]

List of all members.


Detailed Description

Author:
Gustavo Pichorim Boiko <gustavo.boiko@kdemail.net>

This class abstracts a generic contact Use it for inserting contacts in the contact list for example.

Definition at line 39 of file kopetepropertycontainer.h.


Signals

void propertyChanged (Kopete::PropertyContainer *container, const QString &key, const QVariant &oldValue, const QVariant &newValue)

Public Member Functions

void deserializeProperties (QMap< QString, QString > &serializedData)
bool hasProperty (const QString &key) const
QStringList properties () const
const Kopete::Property & property (const Kopete::PropertyTmpl &tmpl) const
const Kopete::Property & property (const QString &key) const
 PropertyContainer (QObject *parent=0)
void removeProperty (const Kopete::PropertyTmpl &tmpl)
void serializeProperties (QMap< QString, QString > &serializedData) const
void setProperty (const Kopete::PropertyTmpl &tmpl, const QVariant &value)
virtual ~PropertyContainer ()

Constructor & Destructor Documentation

Kopete::PropertyContainer::PropertyContainer ( QObject *  parent = 0  ) 

A container for properties.

This class provides an interface for reading and writing properties.

Definition at line 36 of file kopetepropertycontainer.cpp.

Kopete::PropertyContainer::~PropertyContainer (  )  [virtual]

Definition at line 43 of file kopetepropertycontainer.cpp.


Member Function Documentation

void Kopete::PropertyContainer::deserializeProperties ( QMap< QString, QString > &  serializedData  ) 

Deserialize the contacts persistent properties.

Definition at line 65 of file kopetepropertycontainer.cpp.

bool Kopete::PropertyContainer::hasProperty ( const QString &  key  )  const

Check for existence of a certain property stored using "key".

Parameters:
key the property to check for

Definition at line 109 of file kopetepropertycontainer.cpp.

QStringList Kopete::PropertyContainer::properties (  )  const

Returns:
A QStringList containing all property keys

Definition at line 104 of file kopetepropertycontainer.cpp.

const Kopete::Property & Kopete::PropertyContainer::property ( const Kopete::PropertyTmpl &  tmpl  )  const

Definition at line 122 of file kopetepropertycontainer.cpp.

const Property & Kopete::PropertyContainer::property ( const QString &  key  )  const

Get the value of a property with key "key".

If you don't know the type of the returned QVariant, you will need to check for it.

Returns:
the value of the property

Definition at line 114 of file kopetepropertycontainer.cpp.

void Kopete::PropertyContainer::propertyChanged ( Kopete::PropertyContainer *  container,
const QString &  key,
const QVariant &  oldValue,
const QVariant &  newValue 
) [signal]

void Kopete::PropertyContainer::removeProperty ( const Kopete::PropertyTmpl &  tmpl  ) 

Remove a property if it exists.

Parameters:
tmpl the template this property is based on

Definition at line 161 of file kopetepropertycontainer.cpp.

void Kopete::PropertyContainer::serializeProperties ( QMap< QString, QString > &  serializedData  )  const

Serialize the persistent properties for storage in the contact list.

Does the same as serialize() does but for KopeteContactProperties set in this contact with their persistency flag turned on. In contrary to serialize() this does not need to be reimplemented.

Definition at line 48 of file kopetepropertycontainer.cpp.

void Kopete::PropertyContainer::setProperty ( const Kopete::PropertyTmpl &  tmpl,
const QVariant &  value 
)

Add or Set a property for this contact.

Parameters:
tmpl The template this property is based on, key, label etc. are taken from this one
value The value to store
Note:
Setting a NULL value or an empty QString castable value removes the property if it already existed. Don't abuse this for property-removal, instead use removeProperty() if you want to remove on purpose. The Removal is done to clean up the list of properties and to purge them from UI.

Definition at line 132 of file kopetepropertycontainer.cpp.


The documentation for this class was generated from the following files:
  • kopetepropertycontainer.h
  • kopetepropertycontainer.cpp

kopete/libkopete

Skip menu "kopete/libkopete"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal