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
00033 #include <klibloader.h>
00034 #include <kinstance.h>
00035 #include <kaboutdata.h>
00036 #include "kpilotlink.h"
00037 #include "plugin.h"
00038 #include "JPilotProxy-setup.h"
00039 #include "JPilotProxy-conduit.h"
00040 #include "jplugin.h"
00041
00042 #ifdef KDE2
00043 #include <qlist.h>
00044 #define PluginList_t QList<JPlugin>
00045 #define PluginIterator_t QListIterator<JPlugin>
00046 #else
00047 #include <qptrlist.h>
00048 #define PluginList_t QList<JPlugin>
00049 #define PluginIterator_t QPtrListIterator<JPlugin>
00050 #endif
00051
00052
00053 class JPilotProxyConduitFactory : public KLibFactory {
00054 Q_OBJECT
00055 public:
00056 JPilotProxyConduitFactory(QObject * = 0L,const char * = 0L);
00057 virtual ~JPilotProxyConduitFactory();
00058
00059 static KAboutData *about() { return fAbout; } ;
00060
00061 virtual QObject*createSetupWidget(QWidget*w, const char*n, const QStringList &l) {return new JPilotProxyWidgetSetup(w,n,l);};
00062 virtual QObject*createConduit(KPilotDeviceLink*w, const char*n=0L, const QStringList &l=QStringList()) { return new JPilotProxyConduit(w,n,l);};
00063 static void readSettings();
00064 static JPlugin*addPlugin(QString path, bool on);
00065 static int removePlugin(QString path);
00066 static int addPluginPath(QString path, KConfig*fC=NULL);
00067 static int scanPluginPathes();
00068 static int loadPlugins(KConfig*fC);
00069 protected:
00070 virtual QObject* createObject( QObject* parent = 0,
00071 const char* name = 0,
00072 const char* classname = "QObject",
00073 const QStringList &args = QStringList() );
00074 private:
00075 KInstance *fInstance;
00076 public:
00077 KConfig *fConfig;
00078 static KAboutData *fAbout;
00079 static PluginList_t *plugins;
00080 static QString settingsGroup;
00081 static QString PluginPathes;
00082 static QString LoadedPlugins;
00083 static bool pluginsloaded;
00084 KLibrary*apilib;
00085 };
00086
00087 extern "C"
00088 {
00089
00090 void *init_libJPilotProxy();
00091
00092 };
00093
00094
00095 #endif
This file is part of the documentation for kdelibs Version 3.1.5.