2014-12-15 18:09:27 +02: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 {
|
|
|
|
id: root
|
|
|
|
property var title: "Whisper"
|
|
|
|
property var iconSource: "../facet.png"
|
|
|
|
property var menuItem
|
|
|
|
|
|
|
|
objectName: "whisperView"
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
property var identity: ""
|
|
|
|
Component.onCompleted: {
|
|
|
|
identity = shh.newIdentity()
|
|
|
|
console.log("New identity:", identity)
|
2014-12-16 20:55:57 +02:00
|
|
|
|
|
|
|
var t = shh.watch({topics: ["chat"]})
|
2014-12-15 18:09:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
TextField {
|
|
|
|
id: to
|
|
|
|
placeholderText: "To"
|
|
|
|
}
|
|
|
|
TextField {
|
|
|
|
id: data
|
|
|
|
placeholderText: "Data"
|
|
|
|
}
|
|
|
|
TextField {
|
|
|
|
id: topics
|
|
|
|
placeholderText: "topic1, topic2, topic3, ..."
|
|
|
|
}
|
|
|
|
Button {
|
|
|
|
text: "Send"
|
|
|
|
onClicked: {
|
|
|
|
shh.post(eth.toHex(data.text), "", identity, topics.text.split(","), 500, 50)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|