00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef MODLOADER_H
00022 #define MODLOADER_H
00023
00024 #include <tdecmodule.h>
00025 #include <tdecmoduleinfo.h>
00026
00027 class TQWidget;
00028 class KLibLoader;
00029
00045 class TDEUTILS_EXPORT TDECModuleLoader
00046 {
00047 public:
00048
00063 static TDECModule *loadModule(const TDECModuleInfo &module, bool withFallback=true,
00064 TQWidget * parent = 0, const char * name = 0,
00065 const TQStringList & args = TQStringList() ) KDE_DEPRECATED;
00066
00078 static TDECModule *loadModule(const TQString &module, TQWidget *parent = 0,
00079 const char *name = 0, const TQStringList & args = TQStringList()) KDE_DEPRECATED;
00080
00084 enum ErrorReporting {
00088 None = 0,
00093 Inline = 1,
00097 Dialog = 2,
00101 Both = 3
00102 };
00103
00117 static TDECModule *loadModule(const TDECModuleInfo &module, ErrorReporting
00118 report, bool withFallback=true, TQWidget * parent = 0,
00119 const char * name = 0, const TQStringList & args = TQStringList() );
00120
00133 static TDECModule *loadModule(const TQString &module, ErrorReporting
00134 report, TQWidget *parent = 0, const char *name = 0,
00135 const TQStringList & args = TQStringList());
00136
00141 static void unloadModule(const TDECModuleInfo &mod);
00142
00150 static void showLastLoaderError(TQWidget *parent) KDE_DEPRECATED;
00151
00152
00181 static bool testModule( const TQString& module );
00182
00190 static bool testModule( const TDECModuleInfo& module );
00191
00203 static TDECModule* reportError( ErrorReporting report, const TQString & text,
00204 TQString details, TQWidget * parent );
00205
00206 private:
00207
00212 static TDECModule* load(const TDECModuleInfo &mod, const TQString &libname,
00213 KLibLoader *loader, ErrorReporting report, TQWidget * parent = 0,
00214 const char * name = 0, const TQStringList & args = TQStringList() );
00215
00216 };
00217
00218
00219 #endif // MODLOADER_H
00220