From edc8eac2e737a91ee7ef109bd73be48b76fe205c Mon Sep 17 00:00:00 2001 From: Jeena Date: Sun, 12 Apr 2015 01:02:20 +0200 Subject: [PATCH] added opening in speaker: --- qml/main.qml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/qml/main.qml b/qml/main.qml index bb1a1fc..49443f2 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -78,6 +78,11 @@ ApplicationWindow { textFontSize = fontSizes[textFontSizeIndex] } + function removeHTML(str) { + forEscapingHTML.text = str + return forEscapingHTML.getText(0, forEscapingHTML.length) + } + function keyPressed(event) { switch (event.key) { case Qt.Key_Right: @@ -113,6 +118,10 @@ ApplicationWindow { case Qt.Key_Return: Qt.openUrlExternally(content.post.link) break + case Qt.Key_S: { + console.log(Qt.openUrlExternally("speaker:"+ removeHTML(content.post.content))) + break + } default: break } @@ -176,6 +185,12 @@ ApplicationWindow { id: server } + TextArea { + id: forEscapingHTML + visible: false + textFormat: TextEdit.RichText + } + Component.onCompleted: { if(serverLogin.loggedIn()) { loggedIn();