JPilotProxy-factory.h
00001 #ifndef _KPILOT_JPilotProxy_FACTORY_H
00002 #define _KPILOT_JPilotProxy_FACTORY_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #include <klibloader.h>
00033 #include <kinstance.h>
00034 #include <kaboutdata.h>
00035 #include "kpilotlink.h"
00036 #include "plugin.h"
00037 #include "JPilotProxy-setup.h"
00038 #include "JPilotProxy-conduit.h"
00039 #include "jplugin.h"
00040
00041 #ifdef KDE2
00042 #include <qlist.h>
00043 #define PluginList_t QList<JPlugin>
00044 #define PluginIterator_t QListIterator<JPlugin>
00045 #else
00046 #include <qptrlist.h>
00047 #define PluginList_t QList<JPlugin>
00048 #define PluginIterator_t QPtrListIterator<JPlugin>
00049 #endif
00050
00051
00052 class JPilotProxyConduitFactory : public KLibFactory {
00053 Q_OBJECT
00054 public:
00055 JPilotProxyConduitFactory(QObject * = 0L,const char * = 0L);
00056 virtual ~JPilotProxyConduitFactory();
00057
00058 static KAboutData *about() { return fAbout; } ;
00059
00060 virtual QObject*createSetupWidget(QWidget*w, const char*n, const QStringList &l) {return new JPilotProxyWidgetSetup(w,n,l);};
00061 virtual QObject*createConduit(KPilotDeviceLink*w, const char*n=0L, const QStringList &l=QStringList()) { return new JPilotProxyConduit(w,n,l);};
00062 static void readSettings();
00063 static JPlugin*addPlugin(QString path, bool on);
00064 static int removePlugin(QString path);
00065 static int addPluginPath(QString path, KConfig*fC=NULL);
00066 static int scanPluginPathes();
00067 static int loadPlugins(KConfig*fC);
00068 protected:
00069 virtual QObject* createObject( QObject* parent = 0,
00070 const char* name = 0,
00071 const char* classname = "QObject",
00072 const QStringList &args = QStringList() );
00073 private:
00074 KInstance *fInstance;
00075 public:
00076 KConfig *fConfig;
00077 static KAboutData *fAbout;
00078 static PluginList_t *plugins;
00079 static QString settingsGroup;
00080 static QString PluginPathes;
00081 static QString LoadedPlugins;
00082 static bool pluginsloaded;
00083 KLibrary*apilib;
00084 };
00085
00086 extern "C"
00087 {
00088
00089 void *init_libJPilotProxy();
00090
00091 };
00092
00093
00094 #endif
This file is part of the documentation for kpilot Library Version 3.2.2.