summaryrefslogtreecommitdiffstats
path: root/kjsembed/kjsembedpart.h
diff options
context:
space:
mode:
Diffstat (limited to 'kjsembed/kjsembedpart.h')
-rw-r--r--kjsembed/kjsembedpart.h80
1 files changed, 40 insertions, 40 deletions
diff --git a/kjsembed/kjsembedpart.h b/kjsembed/kjsembedpart.h
index 6435d526..3b9e6c7f 100644
--- a/kjsembed/kjsembedpart.h
+++ b/kjsembed/kjsembedpart.h
@@ -40,7 +40,7 @@
#include <kjsembed/qtstubs.h>
#endif
-class TTQWidget;
+class TQWidget;
#define KJSEMBED_VERSION_STRING "0.3"
#define KJSEMBED_VERSION_MAJOR 0
@@ -63,25 +63,25 @@ class JSBuiltIn;
* @author Richard Moore, rich@kde.org
* This is the easiest class for interacting and embedding the interpreter. To use KJSEmbed in yours
* application you can simply create a new KJSEmbedPart. Once you have this object you can expose your
- * TQObect based classes with a few simple methods. The interface also allows for the manipulation of TTQVariant data
+ * TQObect based classes with a few simple methods. The interface also allows for the manipulation of TQVariant data
* structures between Javascript and C++. Complex Javascript arrays are transparently converted to TQMaps and TQValueLists
- * depending on the type of the Array. KJSEmbed also provides transparent access to most TTQVariant datatypes between
- * C++ and Javascript. The easiest way to integrate KJSEmbed into your application is to create a TTQObject based class
+ * depending on the type of the Array. KJSEmbed also provides transparent access to most TQVariant datatypes between
+ * C++ and Javascript. The easiest way to integrate KJSEmbed into your application is to create a TQObject based class
* that will be your interface between C++ and Javascript. This object than can expose C++ methods via Qt slots, and
- * TTQVariant datatypes via Qt properties. This class will also have an interface where C++ objects can call Javascript
+ * TQVariant datatypes via Qt properties. This class will also have an interface where C++ objects can call Javascript
* methods.
*/
class KJSEMBED_EXPORT KJSEmbedPart : public KParts::ReadOnlyPart
{
Q_OBJECT
- Q_PROPERTY( TTQStringList constructorNames READ constructorNames )
- Q_PROPERTY( TTQCString versionString READ versionString )
+ Q_PROPERTY( TQStringList constructorNames READ constructorNames )
+ Q_PROPERTY( TQCString versionString READ versionString )
Q_PROPERTY( int versionMajor READ versionMajor )
Q_PROPERTY( int versionMinor READ versionMinor )
public:
/** Create a KJSEmbedPart. */
- KJSEmbedPart( TTQObject *parent=0, const char *name=0 );
+ KJSEmbedPart( TQObject *parent=0, const char *name=0 );
/**
* Creates a KJSEmbedPart for which the parents of the view and part are different.
@@ -92,15 +92,15 @@ public:
* constructor. This results in the widget trying to do GUI related things
* after the TQPaint stuff is destroyed.
*/
- KJSEmbedPart( TTQWidget *wparent, const char *wname=0, TTQObject *parent=0, const char *name=0 );
+ KJSEmbedPart( TQWidget *wparent, const char *wname=0, TQObject *parent=0, const char *name=0 );
/**
* Create a KJSEmbedPart with the specified interpreter.
*
* See warning above.
*/
- KJSEmbedPart( KJS::Interpreter *js, TTQWidget *wparent, const char *wname=0,
- TTQObject *parent=0, const char *name=0 );
+ KJSEmbedPart( KJS::Interpreter *js, TQWidget *wparent, const char *wname=0,
+ TQObject *parent=0, const char *name=0 );
/** Cleans up. */
virtual ~KJSEmbedPart();
@@ -110,7 +110,7 @@ public:
//
/** Returns the version of KJSEmbed. */
- TTQCString versionString() const;
+ TQCString versionString() const;
/** Returns the minor version number of KJSEmbed. */
int versionMajor() const;
@@ -129,53 +129,53 @@ public:
* else
* ... // function not present.
*/
- bool hasMethod( const TTQString &methodName );
+ bool hasMethod( const TQString &methodName );
/** Calls a method from Javascript starting from the global context.
* @code
* KJS::List args;
* args.append(KJS::String("String Arg") );
* args.append(KJS::Number(10) );
- * args.append(KJSEmbed::convertToValue(js->globalExec(), TTQColor("blue" ) ) );
+ * args.append(KJSEmbed::convertToValue(js->globalExec(), TQColor("blue" ) ) );
* KJS::Value val = js->callMethod("javascriptFunction", args );
- * TTQString myString = val.toString().qstring();
+ * TQString myString = val.toString().qstring();
* @endcode
*/
- KJS::Value callMethod(const TTQString &methodName, const KJS::List &args) const;
+ KJS::Value callMethod(const TQString &methodName, const KJS::List &args) const;
/** Gets a value from Javascript starting from the global context.
* @code
* KJS::Value val = js->getValue("someValue");
- * TTQString myString = val.toString().qstring();
+ * TQString myString = val.toString().qstring();
* @endcode
*/
- KJS::Value getValue( const TTQString &valueName ) const;
+ KJS::Value getValue( const TQString &valueName ) const;
/** Sets a value in a Javascript starting from the global context.
* Note if this value is not present in the javascript context it will
* become defined once this method is called.
* @code
- * KJS::Value val = KJSEmbed::convertToValue(js->globalExec(), TTQColor("blue"));
+ * KJS::Value val = KJSEmbed::convertToValue(js->globalExec(), TQColor("blue"));
* js->putValue("myVar", val);
* @endcode
*/
- void putValue( const TTQString &valueName, const KJS::Value &value);
+ void putValue( const TQString &valueName, const KJS::Value &value);
/** Convinence method that wraps around @ref putValue that only handles values
- * that are supported by TTQVariant.
+ * that are supported by TQVariant.
* @code
- * js->putVariant( "myVar", TTQColor("blue") );
+ * js->putVariant( "myVar", TQColor("blue") );
* @endcode
*/
- void putVariant( const TTQString &valueName, const TTQVariant &value);
+ void putVariant( const TQString &valueName, const TQVariant &value);
/** Convinence method that wraps around @ref getValue that only handles values
- * that are supported by TTQVariant.
+ * that are supported by TQVariant.
* @code
- * TTQColor value = js->getVariant( "myVar").toColor();
+ * TQColor value = js->getVariant( "myVar").toColor();
* @endcode
*/
- TTQVariant getVariant( const TTQString &valueName ) const;
+ TQVariant getVariant( const TQString &valueName ) const;
/** Returns the global object of the interpreter. */
KJS::Object globalObject() const { return js->globalObject(); }
@@ -191,7 +191,7 @@ public:
* not specified then the name property of 'obj' is used instead.
* @code
* // In C++
- * TTQObject *myClass = new TQObjectBasedClass(this, "jsObject");
+ * TQObject *myClass = new TQObjectBasedClass(this, "jsObject");
* js->addObject( myClass );
* // In Javascript
* jsObject.someProperty = "Test Property";
@@ -199,23 +199,23 @@ public:
* kdDebug() << "New Value: " << myClass->someProperty() << endl; // displays "Test Property"
* @endcode
*/
- KJS::Object addObject( TTQObject *obj, const char *name=0 );
+ KJS::Object addObject( TQObject *obj, const char *name=0 );
/**
* Publishes 'obj' as property 'name' of object 'parent'. The binding is defined
* using @ref JSObjectProxy, and is subject to the current default SecurityPolicy.
*/
- KJS::Object addObject( TTQObject *obj, KJS::Object &parent, const char *name=0 );
+ KJS::Object addObject( TQObject *obj, KJS::Object &parent, const char *name=0 );
- /** Returns a JS::Object that provides a binding to the specified TTQObject. */
- KJS::Object bind( TTQObject *obj );
+ /** Returns a JS::Object that provides a binding to the specified TQObject. */
+ KJS::Object bind( TQObject *obj );
//
// Query the supported types
//
/** Returns a list of the names of the constructors of this interpreter. */
- TTQStringList constructorNames() const;
+ TQStringList constructorNames() const;
/** Returns a JS Array of the constructors of this interpreter. */
KJS::Value constructors() const;
@@ -242,7 +242,7 @@ public slots:
KJSEmbed::XMLActionClient *actionClient() const { return xmlclient; }
/** Loads the XML actions defined in the specified file to the default XMLActionClient. */
- bool loadActionSet( const TTQString &file );
+ bool loadActionSet( const TQString &file );
//
// Script environemnt
@@ -258,26 +258,26 @@ public slots:
JSFactory *factory() const { return jsfactory; }
/** Evaluates the specified string, with the specified value as 'this'. */
- virtual KJS::Value evaluate( const TTQString &script, const KJS::Value &self=KJS::Null() );
+ virtual KJS::Value evaluate( const TQString &script, const KJS::Value &self=KJS::Null() );
/** Executes the specified string, with the specified value as 'this'. */
- bool execute( const TTQString &script, const KJS::Value &self=KJS::Null() );
+ bool execute( const TQString &script, const KJS::Value &self=KJS::Null() );
/**
* Executes the specified string, with the specified value as 'this' and sets
* result to the completion object returned by the interpreter.
*/
- virtual bool execute( KJS::Completion &result, const TTQString &script, const KJS::Value &self );
+ virtual bool execute( KJS::Completion &result, const TQString &script, const KJS::Value &self );
/** Loads and runs the specified file. */
- virtual bool runFile( const TTQString &filename, const KJS::Value &self=KJS::Null() );
+ virtual bool runFile( const TQString &filename, const KJS::Value &self=KJS::Null() );
/**
* Loads but does not execute the specified script file. If the
* first line of the file starts with the string '#!' then that
* line will be omitted from the returned string.
*/
- TTQString loadFile( const TTQString &file );
+ TQString loadFile( const TQString &file );
protected:
/** Creates the interpreter. */
@@ -306,8 +306,8 @@ private:
JSConsoleWidget *jsConsole;
JSFactory *jsfactory;
JSBuiltIn *builtins;
- TTQWidget *widgetparent;
- TTQCString widgetname;
+ TQWidget *widgetparent;
+ TQCString widgetname;
KJS::Object partobj;
KJS::Completion res;