class GenericFactory

A template for a KParts::Factory implementation. More...

Full nameKParts::GenericFactory
Definition#include <genericfactory.h>
Template formGenericFactory<class T1, class T2>
InheritsKParts::GenericFactoryBase [public ], KParts::GenericFactoryBase [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

A template for a KParts::Factory implementation. It implements the pure virtual createPartObject method by instantiating the template argument when requested through the className field. In addition it is a container for a part's KInstance object, by providing a static KInstance *instance() method.

The template argument has to inherit from KParts::Part and has to implement two methods: 1) There needs to be a public constructor with the following signature: MyPart( QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name )

2) It needs to provide one static method to create a KAboutData object per request, holding information about the component's name, its authors, license, etc. The signature of that static method has to be KAboutData *createAboutData()

The template will take care of memory management of the KInstance and the KAboutData object.

For advanced use you can also inherit from the template and re-implement additionally the virtual KInstance *createInstance() method, for example in case you want to extend the paths of your instance's KStandardDirs object.

If a KParts::ReadOnlyPart is requested through this factory and the template argument implements a KParts::ReadWritePart then setReadWrite( false ) will automatically be called in createPartObject.

 GenericFactory ()

GenericFactory

KParts::PartcreatePartObject ( QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, const char *className, const QStringList &args )

createPartObject

[virtual]

Reimplemented from Factory.

 GenericFactory ()

GenericFactory

KParts::PartcreatePartObject ( QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, const char *className, const QStringList &args )

createPartObject

[virtual]

Reimplemented from Factory.


Generated by: dfaure on faure on Tue Apr 16 08:50:22 2002, using kdoc 2.0a53.