Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

KJSEmbed::KJSEmbedPart Class Reference

A KPart for embedding KJS in an application. More...

#include <kjsembedpart.h>

Inheritance diagram for KJSEmbed::KJSEmbedPart::

KParts::ReadOnlyPart KJSEmbed::XMLActionRunner KParts::Part QObject List of all members.

Public Slots

virtual bool openURL (const KURL &url)
bool openURL (const QString &url)
virtual bool executeScript (const QString &filename)
virtual bool execute (const QString &script)
bool loadActionSet (const QString &file)
QString loadScript (const QString &file)

Public Methods

 KJSEmbedPart (QObject *parent=0, const char *name=0)
 KJSEmbedPart (QWidget *wparent, const char *wname=0, QObject *parent=0, const char *name=0)
 KJSEmbedPart (KJS::Interpreter *js, QWidget *wparent=0, const char *wname=0, QObject *parent=0, const char *name=0)
virtual ~KJSEmbedPart ()
KJS::Interpreter * interpreter () const
virtual JSConsoleWidgetview ()
void publishStdBindings ()
KJS::Object publish (QObject *obj, const char *name=0)
KJS::Object bind (QObject *obj)
virtual bool run (KJSEmbed::XMLActionClient *client, const KJSEmbed::XMLActionScript &script)

Protected Methods

virtual bool openFile ()

Friends

class KJSEmbedPartImp

Detailed Description

A KPart for embedding KJS in an application.

Version:
Id:
kjsembedpart.h,v 1.7 2003/02/01 00:16:17 rich Exp
Author:
Richard Moore, rich@kde.org


Constructor & Destructor Documentation

KJSEmbedPart QObject * parent = 0,
const char * name = 0
 

Create a KJSEmbedPart.

KJSEmbedPart QWidget * wparent,
const char * wname = 0,
QObject * parent = 0,
const char * name = 0
 

Create a KJSEmbedPart for which the parents of the view and part are different.

KJSEmbedPart KJS::Interpreter * js,
QWidget * wparent = 0,
const char * wname = 0,
QObject * parent = 0,
const char * name = 0
 

Create a KJSEmbedPart with the specified interpreter.

virtual ~KJSEmbedPart [virtual]
 

Cleans up.


Member Function Documentation

KJS::Interpreter* interpreter const [inline]
 

Returns the current interpreter.

virtual JSConsoleWidget* view [virtual]
 

Returns the view widget, creating one if required.

void publishStdBindings
 

Overloaded to use the interpreter's global ExecState and object.

KJS::Object publish QObject * obj,
const char * name = 0
 

Publishes 'obj' as property 'name' of the global object.

KJS::Object bind QObject * obj
 

Binds a QObject to a Javascript object using JSObjectProxy.

virtual bool run KJSEmbed::XMLActionClient * client,
const KJSEmbed::XMLActionScript & script
[virtual]
 

Reimplemented to run KJS actions in the interpreter.

virtual bool openURL const KURL & url [virtual, slot]
 

Opens a URL.

If the URL has the protocol 'javascript' then it is executed.

bool openURL const QString & url [slot]
 

Opens a URL.

If the URL has the protocol 'javascript' then it is executed.

virtual bool executeScript const QString & filename [virtual, slot]
 

Loads and runs the specified file.

virtual bool execute const QString & script [virtual, slot]
 

Executes the specified string.

bool loadActionSet const QString & file [slot]
 

Loads the XML actions defined in the specified file to the default XMLActionClient.

QString loadScript const QString & file [slot]
 

Loads a script from the specified file, removing the #! line (if present).


Friends And Related Function Documentation

friend class KJSEmbedPartImp [friend]
 

For internal use only.


The documentation for this class was generated from the following file:
Generated at Sat Feb 1 03:23:36 2003 for KJSEmbed by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001