libs/flake

KoShapeRegistry Class Reference

This singleton class keeps a register of all available flake shapes, or rather, of the factories that applications can use to create flake shape objects. More...

#include <KoShapeRegistry.h>

Inheritance diagram for KoShapeRegistry:

List of all members.

Public Member Functions

 ~KoShapeRegistry ()
void addFactory (KoShapeFactory *factory)
KoShapecreateShapeFromOdf (const KoXmlElement &e, KoShapeLoadingContext &context) const

Static Public Member Functions

static KoShapeRegistryinstance ()

Detailed Description

This singleton class keeps a register of all available flake shapes, or rather, of the factories that applications can use to create flake shape objects.

Definition at line 42 of file KoShapeRegistry.h.


Constructor & Destructor Documentation

KoShapeRegistry::~KoShapeRegistry (  ) 

Definition at line 56 of file KoShapeRegistry.cpp.


Member Function Documentation

void KoShapeRegistry::addFactory ( KoShapeFactory factory  ) 

Add shape factory for a shape that is not a plugin This can be used also if you want to have a shape only in one application.

Parameters:
factory The factory of the shape

Definition at line 99 of file KoShapeRegistry.cpp.

KoShape * KoShapeRegistry::createShapeFromOdf ( const KoXmlElement &  e,
KoShapeLoadingContext context 
) const

Use the element to find out which flake plugin can load it, and returns the loaded shape.

The element expected is one of 'draw:line', 'draw:frame' / etc.

Returns:
the shape or 0 if no shape could be created

Definition at line 126 of file KoShapeRegistry.cpp.

KoShapeRegistry * KoShapeRegistry::instance (  )  [static]

Return an instance of the KoShapeRegistry Creates an instance if that has never happened before and returns the singleton instance.

Definition at line 90 of file KoShapeRegistry.cpp.


The documentation for this class was generated from the following files: