diff options
author | Timothy Pearson <[email protected]> | 2011-12-05 15:55:57 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-05 15:55:57 -0600 |
commit | 9ba04742771370f59740e32e11c5f3a1e6a1b70a (patch) | |
tree | c81c34dae2b3b1ea73801bf18a960265dc4207f7 /kjsembed/jsobjectproxy.h | |
parent | 1a96c45b22d01378202d9dc7ed9c47acd30f966e (diff) | |
download | tdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.tar.gz tdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.zip |
Initial TQt conversion
Diffstat (limited to 'kjsembed/jsobjectproxy.h')
-rw-r--r-- | kjsembed/jsobjectproxy.h | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/kjsembed/jsobjectproxy.h b/kjsembed/jsobjectproxy.h index 8e620e2a..fde60c61 100644 --- a/kjsembed/jsobjectproxy.h +++ b/kjsembed/jsobjectproxy.h @@ -41,19 +41,19 @@ class KJSEmbedPart; class JSObjectEventProxy; /** - * A JS object that provides a binding to a TQObject. + * A JS object that provides a binding to a TTQObject. * <h3>Introduction</h3> * This class defines a @ref KJS::ObjectImp that allows scripts to access - * the properties of a TQObject. The scripts can also create child objects, + * the properties of a TTQObject. The scripts can also create child objects, * load dialogs from .ui files created by Designer and navigate the object - * tree in a similar manner to the DCOP/TQObject bridge. + * tree in a similar manner to the DCOP/TTQObject bridge. * <h3>Example Usage</h3> * The following example creates a @ref KJS::ObjectImp that provides - * a binding to the properties of a @ref TQLineEdit . This binding is + * a binding to the properties of a @ref TTQLineEdit . This binding is * then used to create a property 'edit' for the object 'jsparent'. * <pre> * - * TQLineEdit *edit = new TQLineEdit(); + * TTQLineEdit *edit = new TTQLineEdit(); * KJSEmbed::JSObjectProxy *proxy = new KJSEmbed::JSObjectProxy( js, edit ); * jsparent.put( js->globalExec(), "edit", proxy ); * @@ -66,7 +66,7 @@ class JSObjectEventProxy; * property the following tests are performed: * <ul> * <li>Does this request come from the correct @ref KJS::Interpreter? - * <li>Is the script allowed to access the specified QObject? + * <li>Is the script allowed to access the specified TQObject? * <li>Is the script allowed to access the specified property? * </ul> * The @ref KJSEmbed::JSSecurityPolicy class decides if the request should @@ -82,24 +82,24 @@ class KJSEMBED_EXPORT JSObjectProxy : public JSProxy public: /** * Create a JS binding to the target object. The binding will allow scripts to - * access any TQObject that is descended the target and no others. + * access any TTQObject that is descended the target and no others. */ - JSObjectProxy( KJSEmbedPart *part, TQObject *target ); + JSObjectProxy( KJSEmbedPart *part, TTQObject *target ); /** * Create a JS binding to the target object. The binding will allow scripts to - * access any TQObject that is descended from the specified root. If the specified + * access any TTQObject that is descended from the specified root. If the specified * root is 0 then access is granted to all objects. */ - JSObjectProxy( KJSEmbedPart *part, TQObject *target, TQObject *root ); + JSObjectProxy( KJSEmbedPart *part, TTQObject *target, TTQObject *root ); /** * Create a JS binding to the target object. The binding will allow scripts to - * access any TQObject that is descended from the specified root, according to + * access any TTQObject that is descended from the specified root, according to * the specified @ref JSSecurityPolicy . If the specified root is 0 then access * is granted to all objects. */ - JSObjectProxy( KJSEmbedPart *part, TQObject *target, TQObject *root, const JSSecurityPolicy *sp ); + JSObjectProxy( KJSEmbedPart *part, TTQObject *target, TTQObject *root, const JSSecurityPolicy *sp ); virtual ~JSObjectProxy(); @@ -110,24 +110,24 @@ public: KJS::Interpreter *interpreter() const { return js; } /** Returns the root object that defines the limit of the scope of this proxy. */ - TQObject *rootObject() const { return root; } + TTQObject *rootObject() const { return root; } - /** Returns the TQObject the proxy is attached to. */ - TQObject *object() const { return obj; } + /** Returns the TTQObject the proxy is attached to. */ + TTQObject *object() const { return obj; } /** Returns the className of the proxied object */ - TQString typeName() const { return obj->className(); } + TTQString typeName() const { return obj->className(); } - /** Returns the associated TQWidget, or 0 if the object is not a widget. */ - TQWidget *widget() const + /** Returns the associated TTQWidget, or 0 if the object is not a widget. */ + TTQWidget *widget() const { - TQObject *w = obj; - return (w && w->isWidgetType()) ? static_cast<TQWidget *>(w) : 0; + TTQObject *w = obj; + return (w && w->isWidgetType()) ? static_cast<TTQWidget *>(w) : 0; } //void *toVoidStar() { return obj; } //template<class T> - //T *toNative(){ return dynamic_cast<TQObject*>(obj); } + //T *toNative(){ return dynamic_cast<TTQObject*>(obj); } /** Returns true iff the content of this proxy inherits the specified base-class. */ bool inherits( const char *clazz ) { return obj->isA( clazz ); } @@ -152,8 +152,8 @@ public: virtual KJS::UString toString( KJS::ExecState *exec ) const; /** - * Adds methods for traversing the TQObject tree to the specified - * @ref KJS::Object . Only QObjects descended from the root specified + * Adds methods for traversing the TTQObject tree to the specified + * @ref KJS::Object . Only TQObjects descended from the root specified * in the constructor can be reached through JS proxies created with * these bindings. * <ul> @@ -180,14 +180,14 @@ protected: private: bool isAllowed( KJS::Interpreter *js ) const; - void addSlotBinding( const TQCString &name, KJS::ExecState *exec, KJS::Object &object ); + void addSlotBinding( const TTQCString &name, KJS::ExecState *exec, KJS::Object &object ); private: KJSEmbedPart *jspart; KJS::Interpreter *js; - TQGuardedPtr<TQObject> obj; - TQGuardedPtr<TQObject> root; - TQGuardedPtr<JSObjectEventProxy> evproxy; + TTQGuardedPtr<TTQObject> obj; + TTQGuardedPtr<TTQObject> root; + TTQGuardedPtr<JSObjectEventProxy> evproxy; const JSSecurityPolicy *policy; class JSObjectProxyPrivate *d; friend class Bindings::JSObjectProxyImp; |