plugins.h File Reference
#include <kglobal.h>
#include "errorlog-interfaces.h"
#include <qstring.h>
#include <qobject.h>
#include <qptrlist.h>
Go to the source code of this file.
Define Documentation
#define PLUGIN_LIBRARY_FUNCTIONS |
( |
class_name, |
|
|
i18nName, |
|
|
description |
|
) |
|
Value:extern "C" void KRadioPlugin_LoadLibrary() \
{ \
KGlobal::locale()->insertCatalogue(i18nName); \
} \
\
extern "C" void KRadioPlugin_UnloadLibrary() \
{ \
KGlobal::locale()->removeCatalogue(i18nName); \
} \
\
extern "C" void KRadioPlugin_GetAvailablePlugins(QMap<QString, QString> &info) \
{ \
info.insert(#class_name, (description)); \
} \
\
extern "C" PluginBase *KRadioPlugin_CreatePlugin(const QString &type, const QString &object_name) \
{ \
if (type == #class_name) { \
return new class_name(object_name); \
} else { \
return NULL; \
} \
}
Definition at line 137 of file plugins.h.
#define PLUGIN_LIBRARY_FUNCTIONS2 |
( |
class_name1, |
|
|
i18nName, |
|
|
description1, |
|
|
class_name2, |
|
|
description2 |
|
) |
|
Value:extern "C" void KRadioPlugin_LoadLibrary() \
{ \
KGlobal::locale()->insertCatalogue(i18nName); \
} \
\
extern "C" void KRadioPlugin_UnloadLibrary() \
{ \
KGlobal::locale()->removeCatalogue(i18nName); \
} \
\
extern "C" void KRadioPlugin_GetAvailablePlugins(QMap<QString, QString> &info) \
{ \
info.insert(#class_name1, (description1)); \
info.insert(#class_name2, (description2)); \
} \
\
extern "C" PluginBase *KRadioPlugin_CreatePlugin(const QString &type, const QString &object_name) \
{ \
if (type == #class_name1) { \
return new class_name1(object_name); \
} else if (type == #class_name2) { \
return new class_name2(object_name); \
} else { \
return NULL; \
} \
}
Definition at line 163 of file plugins.h.
Typedef Documentation