class JSConsoleWidget

A QWidget that provides a console for executing Javascript commands. More...

Full nameKJSEmbed::JSConsoleWidget
Definition#include <kjsembed/jsconsolewidget.h>
InheritsQFrame (qt) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Slots

Protected Types

Protected Methods

Private Members


Detailed Description

A QWidget that provides a console for executing Javascript commands. Creating a JS console is easy, as you can see below:


   KJS::Object global( new KJS::ObjectImp() );
   KJS::Interpreter *js = new KJS::Interpreter( global );
   KJSEmbed::JSConsoleWidget *win = new KJSEmbed::JSConsoleWidget( js );
   win->addBindings( js->globalExec(), global );

This example creates a console for a JS interpreter and adds a print function to the interpreter.

 JSConsoleWidget ( QWidget *parent=0, const char *name=0 )

JSConsoleWidget

 JSConsoleWidget ( KJS::Interpreter *js, QWidget *parent=0, const char *name=0 )

JSConsoleWidget

 ~JSConsoleWidget ()

~JSConsoleWidget

KJS::Interpreterjscript ()

jscript

[const]

MessageLogWidget * messages ()

messages

[const]

void  addBindings ( KJS::ExecState *state, KJS::Object &object )

addBindings

void  execute ()

execute

[slot]

bool  execute ( const QString &cmd )

execute

[slot]

void  createView ()

createView

[protected]

MethodImp (class)

MethodImp

[protected]

Provides the implementation of a JS method.

MessageLogWidget * log

log

[private]

QComboBox * cmd

cmd

[private]

QPushButton * run

run

[private]

KJS::Interpreter * js

js

[private]

class Private * d

d

[private]