Go to the documentation of this file.
27#include <QtCore/QDebug>
28#include <QtGui/QFileDialog>
29#include <QtCore/QFile>
32#include <kjs/interpreter.h>
33#include <kjs/ustring.h>
34#include <kjs/object.h>
36#include "ui_jsconsole.h"
44 KJS::Interpreter *js = mKernel.interpreter();
45 KJS::JSObject *obj = js->globalObject();
48 m_ui.mObjectModel->setModel(m_model);
49 m_model->updateModel(obj);
62 KJS::Interpreter *js = mKernel.interpreter();
63 KJS::ExecState *exec = js->globalExec();
66 KJS::Completion jsres = mKernel.completion();
67 m_ui.mConsole->append(
m_ui.mCommand->currentText());
68 KJS::JSValue *
value = jsres.value();
78 KJS::JSObject *obj = js->globalObject();
79 m_model->updateModel(obj);
80 m_ui.mCommand->clearEditText();
86 QString openFile = QFileDialog::getOpenFileName(
this, tr(
"Select script to open..."),
87 m_lastDir, tr(
"Scripts (*.js *.kjs *.qjs)"));
89 if( openFile.isEmpty() )
95 if (!fIn.open(QIODevice::ReadOnly | QIODevice::Text))
100 QByteArray line = fIn.readLine();
104 m_ui.mInput->setText(code);
118 KJS::Interpreter *js = mKernel.interpreter();
119 KJS::ExecState *exec = js->globalExec();
122 KJS::Completion jsres = mKernel.completion();
123 KJS::JSValue *
value = jsres.value();
133 KJS::JSObject *obj = js->globalObject();
134 m_model->updateModel(obj);
149#include "console.moc"
void on_actionStop_activated()
Console(QWidget *parent=0)
void on_actionCloseScript_activated()
void on_actionQuit_activated()
void on_actionStep_activated()
void on_actionOpenScript_activated()
void on_mExecute_clicked()
void on_actionRun_activated()
void on_actionRunTo_activated()
ExitStatus
Status codes for script execution.
END_VARIANT_METHOD result
END_OBJECT_METHOD object close()
QString toQString(const KJS::UString &u)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Tue Mar 25 2025 00:00:00 by
doxygen 1.14.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.