Remove this line
[kdeaccessibility.git] / ksayit / src / fxpluginhandler.h
blobcc738a5046e01098bdbded93ca5b3acbc75e343b
1 //
2 // C++ Interface: fxpluginhandler
3 //
4 // Description:
5 //
6 //
7 // Author: Robert Vogl <voglrobe@lapislazuli>, (C) 2004
8 //
9 // Copyright: See COPYING file that comes with this distribution
13 #ifndef FXPLUGINHANDLER_H
14 #define FXPLUGINHANDLER_H
16 // QT includes
17 #include <QtCore/QObject>
18 #include <QtCore/QLibrary>
19 #include <QtCore/QMap>
20 // #include <Qt3Support/Q3ValueList>
22 // KDE includes
23 #include <kconfig.h>
24 #include <arts/kartsserver.h>
25 #include <arts/artsflow.h>
27 using namespace Arts;
29 // App specific includes
30 #include "ksayit_fxplugin.h"
32 /**
33 @author Robert Vogl
35 /** Internal structure of the effect plugin
37 typedef struct {
38 QLibrary *handle;
39 create_fxpi pcreate;
40 destroy_fxpi pdestroy;
41 QString name; // This name is the unique ID of the plugin.
42 QString description;
43 long EffectID; // !=0, if effect is on the effect stack.
44 FXPlugin *p;
45 } fx_struct;
48 class FXPluginHandler : public QObject
50 Q_OBJECT
51 public:
52 FXPluginHandler(QObject *parent = 0, const char *name = 0, KConfig *config=0);
53 ~FXPluginHandler();
55 public: // Methods
56 /** Loads the activated plugins.
58 void readConfiguration();
60 /** Loads any available plugin from the directories containing KSayIt plugins,
61 * fills the plugin_struct with the corresponding data and unloads the plugin.
63 void searchPlugins();
65 /** Shows the GUI to setup the effect named name
66 \param pname The name of the effect to configure.
67 */
68 void showEffectGUI(const QString &pname);
70 /** Activates the named effect
71 \param pname Name of the effect to activate.
72 \param server A pointer to the soundserver instance.
73 \param fx_stack A pointer to the effect stack of the soundserver.
75 void activateEffect(const QString &pname,
76 KArtsServer *server,
77 StereoEffectStack *fx_stack);
79 /** Removes all effects from the soundservers effect stack.
80 \param fx_stack A pointer to the effect stack of the soundserver.
82 void deactivateEffects(StereoEffectStack *fx_stack);
84 /** Returns a list of all available plugins.
85 \param pluginlist A reference to a QStringList that contains the available plugins.
87 void getPlugins(QStringList &pluginlist);
91 private:
92 bool initPluginMap(const QString &libpath);
94 private: // Attributes
95 KConfig *m_config;
96 QMap<QString, fx_struct> pmap; // holds all plugins found on the system
97 QMap<QString, fx_struct> activePlugins; // holds the active effects
104 #endif