aboutsummaryrefslogtreecommitdiffstats
path: root/kde2/plugins/plppropsFactory.cc
blob: 2c553cfa287981c227305f5cdd0b07afdc3eabb0 (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
34
35
36
37
#include "plppropsFactory.h"
#include "plpprops.h"

#include <stream.h>
#include <kdebug.h>
#include <klocale.h>

extern "C" {
	void *init_libplpprops() {
		return new plppropsFactory();
	}
};

plppropsFactory::plppropsFactory(QObject *parent, const char *name)
	: KLibFactory(parent, name) {
	s_global = new KInstance("plpprops");
	// Install the translations
	//KGlobal::locale()->insertCatalogue("plpprops");
}

plppropsFactory::~plppropsFactory() {
	delete s_global;
}

QObject* plppropsFactory::createObject(QObject* parent, const char *name, const char *classname, const QStringList & ) {

	QObject *obj = 0L;

	cout << "plppropsFactory: name=" << name << " class=" << classname << endl;
	if ((strcmp(classname, "KPropsDlgPlugin") == 0) &&
	    parent &&
	    parent->inherits("KPropertiesDialog"))
		obj = new PlpPropsPlugin(static_cast<KPropertiesDialog *>(parent));
	return obj;
}

#include <plppropsFactory.moc>