org.kde.koala

Class KCModuleLoader

public class KCModuleLoader extends Object implements QtSupport

Author: Frans Englich

UNKNOWN: Loads a KControl Module. KCModuleLoader tries in several ways to locate and load a KCModule. If loading fails a zero pointer is returned. \n It is very unlikely KCModuleLoader is what you want and KCModuleProxy suits your needs. @class Loads a KControl Module.

Field Summary
static intBoth
static intDialog
static intInline
static intNone
Determines the way errors are reported
Constructor Summary
protected KCModuleLoader(Class dummy)
KCModuleLoader()
Method Summary
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected voidfinalize()
Deletes the wrapped C++ instance
booleanisDisposed()
Has the wrapped C++ instance been deleted?
static KCModuleloadModule(KCModuleInfo module, int report, boolean withFallback, QWidget parent, String name, String[] args)
Loads a KCModule.
static KCModuleloadModule(KCModuleInfo module, int report, boolean withFallback, QWidget parent, String name)
static KCModuleloadModule(KCModuleInfo module, int report, boolean withFallback, QWidget parent)
static KCModuleloadModule(KCModuleInfo module, int report, boolean withFallback)
static KCModuleloadModule(KCModuleInfo module, int report)
static KCModuleloadModule(String module, int report, QWidget parent, String name, String[] args)
Loads a KCModule.
static KCModuleloadModule(String module, int report, QWidget parent, String name)
static KCModuleloadModule(String module, int report, QWidget parent)
static KCModuleloadModule(String module, int report)
static KCModulereportError(int report, String text, String details, QWidget parent)
Returns a KCModule containing the messages report and text.
static booleantestModule(String module)
Checks whether an KCModule should be shown by running its test function.
static booleantestModule(KCModuleInfo module)
Convenience function, essentially the same as above.
static voidunloadModule(KCModuleInfo mod)
Unloads the module's library

Field Detail

Both

public static final int Both

Dialog

public static final int Dialog

Inline

public static final int Inline

None

public static final int None
Determines the way errors are reported

UNKNOWN: Determines the way errors are reported

Constructor Detail

KCModuleLoader

protected KCModuleLoader(Class dummy)

KCModuleLoader

public KCModuleLoader()

Method Detail

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

finalize

protected void finalize()
Deletes the wrapped C++ instance

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

loadModule

public static KCModule loadModule(KCModuleInfo module, int report, boolean withFallback, QWidget parent, String name, String[] args)
Loads a KCModule. If loading fails a zero pointer is returned.

Parameters: module what module to load report see ErrorReporting withFallback if true and loading failed a separate window with the module may appear and a zero pointer is a returned

Returns: a pointer to the loaded @ref KCModule

UNKNOWN: Loads a @ref KCModule.

loadModule

public static KCModule loadModule(KCModuleInfo module, int report, boolean withFallback, QWidget parent, String name)

loadModule

public static KCModule loadModule(KCModuleInfo module, int report, boolean withFallback, QWidget parent)

loadModule

public static KCModule loadModule(KCModuleInfo module, int report, boolean withFallback)

loadModule

public static KCModule loadModule(KCModuleInfo module, int report)

loadModule

public static KCModule loadModule(String module, int report, QWidget parent, String name, String[] args)
Loads a KCModule. If loading fails a zero pointer is returned.

Parameters: module what module to load report see ErrorReporting with the module may appear and a zero pointer is a returned

Returns: a pointer to the loaded @ref KCModule

UNKNOWN: Loads a @ref KCModule.

loadModule

public static KCModule loadModule(String module, int report, QWidget parent, String name)

loadModule

public static KCModule loadModule(String module, int report, QWidget parent)

loadModule

public static KCModule loadModule(String module, int report)

reportError

public static KCModule reportError(int report, String text, String details, QWidget parent)
Returns a KCModule containing the messages report and text.

Parameters: report the type of error reporting, see ErrorReporting text the main message details any additional details

UNKNOWN: Returns a KCModule containing the messages report and text.

testModule

public static boolean testModule(String module)
Checks whether an KCModule should be shown by running its test function. If it is unsure whether a module should be shown, it should be made available, leaving the decision to the user. If false is returned, the module should not be loaded in any interface. A module declares it needs to be tested by having "X-KDE-Test-Module=true" in its desktop file. When that line exists, the following code must be available in the module's library:
		 extern "C"
		 {
		    boolean test_moduleName()
		    {
		      // Code testing for hardware/software presence.
		      return true; // and the modue will be loaded.
		    }
			 }
		 
where moduleName is the library name for the module.

Parameters: module the module to check

Returns: true if the module should be loaded

UNKNOWN: Checks whether an KCModule should be shown by running its test function.

testModule

public static boolean testModule(KCModuleInfo module)
Convenience function, essentially the same as above.

Parameters: module the module to check

Returns: true if the module should be loaded

UNKNOWN: Convenience function, essentially the same as above.

unloadModule

public static void unloadModule(KCModuleInfo mod)
Unloads the module's library

Parameters: mod What module to unload for

UNKNOWN: Unloads the module's library