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

Class Index

kimage'KImageFactory (./koffice/kimage/kimage_factory.h:8)

class KImageFactory : public KLibFactory
{
    Q_OBJECT
public:
    KImageFactory( QObject* parent = 0, const char* name = 0 );
    ~KImageFactory();

    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;
};

kimage'KImageFactory::KImageFactory() (./koffice/kimage/kimage_factory.cc:23)

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


kimage'KImageFactory::~KImageFactory() (./koffice/kimage/kimage_factory.cc:28)

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


kimage'KImageFactory::create() (./koffice/kimage/kimage_factory.cc:34)

QObject* KImageFactory::create( QObject* parent, const char* name, const char*classname, const QStringList & )
{
/*
   if ( parent && !parent->inherits("KoDocument") )
    {
	qDebug("KImageFactory: parent does not inherit KoDocument");
	return 0;
    }
*/

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

    KImageDocument *doc = new KImageDocument( parent, name, !bWantKoDocument );

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

    emit objectCreated(doc);
    return doc;
}


kimage'KImageFactory::aboutData() (./koffice/kimage/kimage_factory.cc:55)

KAboutData* KImageFactory::aboutData()
{
     KAboutData *aboutData= new KAboutData( "kimage", I18N_NOOP("KImage"),
                                            version, description, KAboutData::License_GPL,
                                            "(c) 1998-2000, Michael Koch");
     aboutData->addAuthor("Michael Koch",0, "koch@kde.org");
     return aboutData;
}


kimage'KImageFactory::global() (./koffice/kimage/kimage_factory.cc:64)

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