• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • KDE Home
  • Contact Us
 

akonadi

  • Akonadi
  • AttributeFactory
Static Public Member Functions
Akonadi::AttributeFactory Class Reference

Provides the functionality of registering and creating arbitrary entity attributes. More...

#include <attributefactory.h>

Inherited by Akonadi::Internal::StaticAttributeFactory.

List of all members.

Static Public Member Functions

static Attribute * createAttribute (const QByteArray &type)
template<typename T >
static void registerAttribute ()

Detailed Description

Provides the functionality of registering and creating arbitrary entity attributes.

This class provides the functionality of registering and creating arbitrary Attributes for Entity and its subclasses (e.g. Item and Collection).

 // register the type first
 Akonadi::AttributeFactory::registerAttribute<SecrecyAttribute>();

 ...

 // use it anywhere else in the application
 SecrecyAttribute *attr = Akonadi::AttributeFactory::createAttribute( "secrecy" );
Author:
Volker Krause <vkrause@kde.org>

Definition at line 48 of file attributefactory.h.


Member Function Documentation

Attribute * Akonadi::AttributeFactory::createAttribute ( const QByteArray &  type) [static]

Creates an entity attribute object of the given type.

If the type has not been registered, creates a DefaultAttribute.

Parameters:
typeThe attribute type.

Definition at line 130 of file attributefactory.cpp.

template<typename T >
void Akonadi::AttributeFactory::registerAttribute ( ) [inline, static]

Registers a custom attribute of type T.

The same attribute cannot be registered more than once.

Definition at line 59 of file attributefactory.h.


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

akonadi

Skip menu "akonadi"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.7.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