summaryrefslogtreecommitdiffstats
path: root/tdejava/koala/org/trinitydesktop/koala/KLibFactory.java
diff options
context:
space:
mode:
Diffstat (limited to 'tdejava/koala/org/trinitydesktop/koala/KLibFactory.java')
-rw-r--r--tdejava/koala/org/trinitydesktop/koala/KLibFactory.java79
1 files changed, 79 insertions, 0 deletions
diff --git a/tdejava/koala/org/trinitydesktop/koala/KLibFactory.java b/tdejava/koala/org/trinitydesktop/koala/KLibFactory.java
new file mode 100644
index 00000000..787b58ea
--- /dev/null
+++ b/tdejava/koala/org/trinitydesktop/koala/KLibFactory.java
@@ -0,0 +1,79 @@
+//Auto-generated by kalyptus. DO NOT EDIT.
+package org.trinitydesktop.koala;
+
+import org.trinitydesktop.qt.Qt;
+import org.trinitydesktop.qt.TQMetaObject;
+import org.trinitydesktop.qt.QtSupport;
+import org.trinitydesktop.qt.TQObject;
+import org.trinitydesktop.qt.TQObject;
+
+/**
+
+ If you develop a library that is to be loaded dynamically at runtime, then
+ you should return a pointer to your factory. The K_EXPORT_COMPONENT_FACTORY
+ macro is provided for this purpose:
+ <pre>
+ K_EXPORT_COMPONENT_FACTORY( libkspread, KSpreadFactory )
+ </pre>
+ The first macro argument is the name of your library, the second specifies the name
+ of your factory.
+ NOTE: you probably want to use KGenericFactory<PluginClassName>
+ instead of writing your own factory.
+ In the constructor of your factory you should create an instance of TDEInstance
+ like this:
+ <pre>
+ s_global = new TDEInstance( "kspread" );
+ </pre>
+ This TDEInstance is comparable to TDEGlobal used by normal applications.
+ It allows you to find resource files (images, XML, sound etc.) belonging
+ to the library.
+ If you want to load a library, use KLibLoader. You can query KLibLoader
+ directly for a pointer to the libraries factory by using the KLibLoader.factory()
+ function.
+ The KLibFactory is used to create the components, the library has to offer.
+ The factory of KSpread for example will create instances of KSpreadDoc,
+ while the Konqueror factory will create KonqView widgets.
+ All objects created by the factory must be derived from TQObject, since TQObject
+ offers type safe casting.
+ KLibFactory is an abstract class. Reimplement the
+ createObject() method to give it functionality.
+ See {@link KLibFactorySignals} for signals emitted by KLibFactory
+ @author Torben Weis <weis@kde.org>
+
+ @short If you develop a library that is to be loaded dynamically at runtime, then you should return a pointer to your factory.
+
+*/
+public class KLibFactory extends TQObject {
+ protected KLibFactory(Class dummy){super((Class) null);}
+ public native TQMetaObject metaObject();
+ public native String className();
+ /**
+ Create a new factory.
+ @param parent the parent of the TQObject, 0 for no parent
+ @param name the name of the TQObject, 0 for no name
+ @short Create a new factory.
+ */
+ /**
+ Creates a new object. The returned object has to be derived from
+ the requested classname.
+ It is valid behavior to create different kinds of objects
+ depending on the requested <code>classname.</code> For example a koffice
+ library may usually return a pointer to KoDocument. But
+ if asked for a "TQWidget", it could create a wrapper widget,
+ that encapsulates the Koffice specific features.
+ create() automatically emits a signal objectCreated to tell
+ the library about its newly created object. This is very
+ important for reference counting, and allows unloading the
+ library automatically once all its objects have been destroyed.
+ @param parent the parent of the TQObject, 0 for no parent
+ @param name the name of the TQObject, 0 for no name
+ @param classname the name of the class
+ @param args a list of arguments
+ @short Creates a new object.
+ */
+ public native TQObject create(TQObject parent, String name, String classname, String[] args);
+ public native TQObject create(TQObject parent, String name, String classname);
+ public native TQObject create(TQObject parent, String name);
+ public native TQObject create(TQObject parent);
+ public native TQObject create();
+}