summaryrefslogtreecommitdiffstats
path: root/languages/cpp/app_templates/kofficepart/kopart_factory.h
blob: 58061af361af3cdc82034bd488d2e06f10af7691 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

/* This template is based off of the KOffice example written by Torben Weis <[email protected]
   It was converted to a KDevelop template by Ian Reinhart Geiser <[email protected]>
*/

#ifndef %{APPNAME}_FACTORY_H
#define %{APPNAME}_FACTORY_H

#include <koFactory.h>

class KInstance;
class KAboutData;

class %{APPNAME}Factory : public KoFactory
{
    Q_OBJECT
public:
    %{APPNAME}Factory( TQObject* parent = 0, const char* name = 0 );
    ~%{APPNAME}Factory();

    virtual KParts::Part *createPartObject( TQWidget *parentWidget = 0, const char *widgetName = 0, TQObject *parent = 0, const char *name = 0, const char *classname = "KoDocument", const TQStringList &args = TQStringList() );

    static KInstance* global();

    // _Creates_ a KAboutData but doesn't keep ownership
    static KAboutData* aboutData();

private:
    static KInstance* s_global;
    static KAboutData* s_aboutData;
};

#endif