# class AttributeFactory

###

Module | akonadi
Namespace | Akonadi
Class | AttributeFactory
Inherits |

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

- AttributeFactory ( )

  returns ctor

- createAttribute (type)

  returns Akonadi.Attribute
  static

  Argument | Type | Default
  --- | --- | ---
  type | QByteArray |

  Creates an entity attribute object of the given type.

  type - The attribute type.