filters
xfigimport_factory.cc00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include "xfigimport_factory.h"
00025 #include "xfigimport_factory.moc"
00026 #include "xfigimport.h"
00027
00028 #include <kinstance.h>
00029 #include <kdebug.h>
00030
00031 K_EXPORT_COMPONENT_FACTORY( libxfigimport, XFIGImportFactory )
00032
00033 KInstance *XFIGImportFactory::s_global = 0;
00034
00035 XFIGImportFactory::XFIGImportFactory(
00036 QObject *parent,
00037 const char *name) :
00038 KLibFactory(parent, name)
00039 {
00040 s_global = new KInstance("xfigimport");
00041 }
00042
00043 XFIGImportFactory::~XFIGImportFactory()
00044 {
00045 delete s_global;
00046 s_global = 0L;
00047 }
00048
00049 QObject *XFIGImportFactory::createObject(
00050 QObject *parent,
00051 const char *name,
00052 const char*,
00053 const QStringList &)
00054 {
00055 if (parent && !parent->inherits("KoFilter"))
00056 {
00057 kdDebug(30502) << "XFIGImportFactory: parent does not inherit KoFilter" << endl;
00058 return 0L;
00059 }
00060 XFIGImport *f = new XFIGImport((KoFilter*)parent, name);
00061 return f;
00062 }
00063
00064 KInstance *XFIGImportFactory::global()
00065 {
00066 return s_global;
00067 }
|