2014-08-14 01:18:37 +03:00
|
|
|
import QtQuick 2.0
|
|
|
|
import QtQuick.Controls 1.0;
|
|
|
|
import QtQuick.Layouts 1.0;
|
|
|
|
import QtQuick.Dialogs 1.0;
|
|
|
|
import QtQuick.Window 2.1;
|
|
|
|
import QtQuick.Controls.Styles 1.1
|
|
|
|
import Ethereum 1.0
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
property var title: "JavaScript"
|
2014-08-21 00:52:33 +03:00
|
|
|
property var iconSource: "../tx.png"
|
2014-08-17 22:07:09 +03:00
|
|
|
property var menuItem
|
2014-08-14 01:18:37 +03:00
|
|
|
|
|
|
|
objectName: "javascriptView"
|
|
|
|
visible: false
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
TextField {
|
|
|
|
id: input
|
|
|
|
anchors {
|
|
|
|
left: parent.left
|
|
|
|
right: parent.right
|
|
|
|
bottom: parent.bottom
|
|
|
|
}
|
|
|
|
height: 20
|
|
|
|
|
|
|
|
Keys.onReturnPressed: {
|
|
|
|
var res = eth.evalJavascriptString(this.text);
|
|
|
|
this.text = "";
|
|
|
|
|
|
|
|
output.append(res)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
TextArea {
|
|
|
|
id: output
|
|
|
|
text: "> JSRE Ready..."
|
|
|
|
anchors {
|
|
|
|
top: parent.top
|
|
|
|
left: parent.left
|
|
|
|
right: parent.right
|
|
|
|
bottom: input.top
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|