akregator/src

plugin.h

00001 // Author: Mark Kretschmann (C) Copyright 2004
00002 // Copyright: See COPYING file that comes with this distribution
00003 
00004 #ifndef AKREGATOR_PLUGIN_H
00005 #define AKREGATOR_PLUGIN_H
00006 
00007 #define AKREGATOR_EXPORT_PLUGIN( classname ) \
00008     extern "C" { \
00009          Akregator::Plugin* create_plugin() { return new classname; } \
00010     }
00011 
00012 #include <qmap.h>
00013 #include <qstring.h>
00014 
00015 
00016 namespace Akregator
00017 {
00018 //    class PluginConfig;
00019 
00020     class Plugin
00021     {
00022         public:
00023             virtual ~Plugin();
00024 
00025             virtual bool init() = 0;
00030              //TODO rename configureWidget( QWidget *parent )
00031             // virtual PluginConfig* configure() const { return 0; }
00032 
00033             void addPluginProperty( const QString& key, const QString& value );
00034             QString pluginProperty( const QString& key );
00035             bool hasPluginProperty( const QString& key );
00036 
00037         protected:
00038             Plugin();
00039 
00040         private:
00041             QMap<QString, QString> m_properties;
00042     };
00043 
00044 } //namespace Akregator
00045 
00046 
00047 #endif /* AKREGATOR_PLUGIN_H */
00048 
00049 
KDE Home | KDE Accessibility Home | Description of Access Keys