Source Code (Use browser search to find items of interest.)

Class Index

kgraph'KGraphFactory (./koffice/kgraph/kgraph_factory.h:28)

class KGraphFactory : public KLibFactory {

    Q_OBJECT

public:
    KGraphFactory(QObject *parent=0, const char *name=0);
    ~KGraphFactory();

    virtual QObject *create(QObject *parent=0, const char *name=0, const char *classname="QObject", const QStringList &args=QStringList());

    static KInstance *global();

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

private:
    static KInstance *s_global;
};

kgraph'KGraphFactory::KGraphFactory() (./koffice/kgraph/kgraph_factory.cc:39)

KGraphFactory::KGraphFactory(QObject *parent, const char *name)
                             : KLibFactory(parent, name) {
}


kgraph'KGraphFactory::~KGraphFactory() (./koffice/kgraph/kgraph_factory.cc:43)

KGraphFactory::~KGraphFactory() {
    if (s_global)
        delete s_global;
}


kgraph'KGraphFactory::create() (./koffice/kgraph/kgraph_factory.cc:48)

QObject *KGraphFactory::create(QObject *parent, const char *name, const char *classname, const QStringList &) {

/*
    if (parent && !parent->inherits("KoDocument")) {
        qDebug("ExampleFactory: parent does not inherit KoDocument");
        return 0;
    }
*/

    bool bWantKoDocument=(strcmp(classname, "KoDocument")==0);

    KGraphPart *part = new KGraphPart(parent, name, !bWantKoDocument);

    if (!bWantKoDocument)
        part->setReadWrite(false);

    emit objectCreated(part);
    return part;
}


kgraph'KGraphFactory::aboutData() (./koffice/kgraph/kgraph_factory.cc:68)

KAboutData* KGraphFactory::aboutData() {
        KAboutData *aboutData=new KAboutData("kgraph", I18N_NOOP("KGraph"),
                                             version, description, KAboutData::License_GPL,
                                             "(c) 2000, Werner Trobin");
        aboutData->addAuthor("Werner Trobin", 0, "wtrobin@carinthia.com");
        return aboutData;
}


kgraph'KGraphFactory::global() (./koffice/kgraph/kgraph_factory.cc:76)

KInstance *KGraphFactory::global() {
    if (!s_global) {
        s_global=new KInstance(aboutData());
    }
    return s_global;
}