KDE 4.6 PyKDE API Reference

- KDE's Python API

# AttributeFactory Class Reference

`from PyKDE4.akonadi import *`

Namespace: Akonadi

## 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>

## Methods

| __init__ (self)

## Static Methods

Akonadi.Attribute | createAttribute (QByteArray type)

## Method Documentation

__init__ | ( |  | self ) |

## Static Method Documentation

Akonadi.Attribute createAttribute | ( | QByteArray | type
| ) |  |  |

Creates an entity attribute object of the given type. If the type has not been registered, creates a DefaultAttribute.

Parameters:

  | type | The attribute type.