• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepimlibs API Reference
  • KDE Home
  • Contact Us
 

akonadi

  • Akonadi
  • AttributeFactory
Static Public Member Functions | List of all members
Akonadi::AttributeFactory Class Reference

#include <attributefactory.h>

Inherited by Akonadi::Internal::StaticAttributeFactory.

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 vkrau.nosp@m.se@k.nosp@m.de.or.nosp@m.g

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 132 of file attributefactory.cpp.

template<typename T >
void Akonadi::AttributeFactory::registerAttribute ( )
inlinestatic

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
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:28 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

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

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal