plugins.h File Reference

#include <kglobal.h>
#include "errorlog-interfaces.h"
#include <qstring.h>
#include <qobject.h>
#include <qptrlist.h>
Include dependency graph for plugins.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ConfigPageInfo
class  PluginBase

Defines

#define PLUGIN_LIBRARY_FUNCTIONS(class_name, i18nName, description)
#define PLUGIN_LIBRARY_FUNCTIONS2(class_name1, i18nName, description1, class_name2, description2)

Typedefs

typedef QPtrList< PluginBasePluginList
typedef QPtrListIterator
< PluginBase
PluginIterator
typedef ConfigPageInfo AboutPageInfo

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

Definition at line 80 of file plugins.h.

typedef QPtrListIterator<PluginBase> PluginIterator

Definition at line 40 of file plugins.h.

typedef QPtrList<PluginBase> PluginList

Definition at line 37 of file plugins.h.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 28 Jan 2011 for kradio by  doxygen 1.6.1