#include <jsfactory.h>
Public Types | |
enum | ProxyTypes { TypeInvalid = 0, TypeQObject = 1, TypeValue = 2, TypeOpaque = 4, TypePlugin = 8, TypeQObjectPlugin = 9 } |
Public Member Functions | |
JSFactory (KJSEmbedPart *part) | |
virtual | ~JSFactory () |
JSEventMapper * | eventMapper () const |
KJSEmbedPart * | part () const |
KJS::Object | create (KJS::ExecState *exec, const QString &classname, const KJS::List &args) |
KJS::Object | createProxy (KJS::ExecState *exec, QObject *target, const JSObjectProxy *context=0) const |
KJS::Object | createProxy (KJS::ExecState *exec, QTextStream *target, const JSObjectProxy *context=0) const |
KJS::Object | createProxy (KJS::ExecState *exec, QEvent *target, const JSObjectProxy *context) const |
KParts::ReadOnlyPart * | createROPart (const QString &svc, QObject *parent=0, const char *name=0) |
KParts::ReadOnlyPart * | createROPart (const QString &svc, const QString &constraint, QObject *parent=0, const char *name=0) |
KParts::ReadWritePart * | createRWPart (const QString &svc, QObject *parent=0, const char *name=0) |
KParts::ReadWritePart * | createRWPart (const QString &svc, const QString &constraint, QObject *parent=0, const char *name=0) |
QWidget * | loadUI (const QString &uiFile, QObject *connector=0, QWidget *parent=0, const char *name=0) |
QStringList | listBindingPlugins (KJS::ExecState *exec, KJS::Object &self) |
void | addBindingPluginTypes (KJS::ExecState *exec, KJS::Object &parent) |
bool | isBindingPlugin (const QString &classname) const |
KJS::Object | createBindingPlugin (KJS::ExecState *exec, const QString &classname, const KJS::List &args) |
bool | isSupported (const QString &clazz) const |
bool | isQObject (const QString &clazz) const |
bool | isValue (const QString &clazz) const |
bool | isOpaque (const QString &clazz) const |
uint | proxyType (const QString &clazz) const |
void | addQObjectPlugin (const QString &classname, KJSEmbed::Bindings::JSBindingPlugin *plugin) |
void | addBindingsPlugin (KJS::ExecState *exec, KJS::Object &target) const |
void | addType (const QString &clazz, uint proxytype=JSFactory::TypeQObject) |
void | addTypes (KJS::ExecState *exec, KJS::Object &parent) |
QStringList | types () const |
Protected Member Functions | |
KJS::Object | extendProxy (KJS::ExecState *exec, KJS::Object &target) const |
KJS::Object | createValue (KJS::ExecState *exec, const QString &cname, const KJS::List &args) |
QObject * | create (const QString &classname, QObject *parent=0, const char *name=0) |
KJS::Object | createOpaque (KJS::ExecState *exec, const QString &cname, const KJS::List &args) |
QObject * | createBinding (const QString &cname, QObject *parent, const char *name) |
QObject * | createObject (const QString &cname, QObject *parent, const char *name) |
QWidget * | createWidget (const QString &cname, QWidget *parent, const char *name) |
|
The types of proxy that can be associated with a class name. These are used when decoding the return values of slots. |
|
Creates a factory object for the specified part.
|
|
Cleans up.
|
|
Adds a binding plugin type to the list of available types the factory can create.
|
|
|
|
Allows adding of an already loaded binding plugin for a certain class type.
|
|
Tells the factory the specified type of proxy to use for the named class. Note that you can remove support for a type by using this method with TypeInvalid. |
|
Adds the types defined by the factory to the specified parent.
|
|
Creates an instance of a QObject subclass. If the instance cannot be created then 0 is returned. |
|
Creates an object of the specified class, then returns a proxy.
|
|
Creates an instance of the named binding QObject.
|
|
Creates the actual object from the binding plugin.
|
|
Creates an instance of the named QObject. This method is only used for non-widget objects. |
|
Creates an instance of the named class and returns it in a JSOpaqueProxy.
|
|
Creates a proxy object for the specified target with the specified context.
|
|
Creates a proxy object for the specified target with the specified context.
|
|
Creates a proxy object for the specified target with the specified context.
|
|
Creates a ReadOnlyPart that views the specified service type and matches the specified constraint.
|
|
Creates a ReadOnlyPart that views the specified service type. The service type will often be a MIME type like 'text/html'. The part created is the first offer returned by the trader, and will have the specified parent and name. |
|
Creates a ReadWritePart that edits the specified service type and matches the specified constraint.
|
|
Creates a ReadWritePart that edits the specified service type. The service type will often be a MIME type like 'text/plain'. The part created is the first offer returned by the trader, and will have the specified parent and name. |
|
Creates an instance of the named class and returns it in a JSValueProxy.
|
|
Creates an instance of the named QWidget. Note that this method is only used to create widgets that are not supported by QWidgetFactory. |
|
Returns the mapper that translates between event types and the names of the handler methods.
|
|
Adds custom bindings to the specified proxy object.
|
|
|
|
Returns true iff the class with the specified name is handled with the opaque proxy type.
|
|
Returns true iff the class with the specified name is handled with the QObject proxy type.
|
|
Returns true iff the factory knows the type of proxy to use for the class with the name specified.
|
|
Returns true iff the class with the specified name is handled with the value proxy type.
|
|
Queries KTrader for a plugin that provides the asked for object binding. If the binding was added the object is returned, otherwise a KJS::Null is. |
|
Loads the widget defined in the specified .ui file. If the widget cannot be created then 0 is returned. |
|
Returns the part that the factory is attached to.
|
|
Returns the ProxyType of the class with the specified name. If the named class is not known to the interpreter then TypeInvalid is returned. |
|
|