added opening in speaker:
This commit is contained in:
parent
1523a2ea2a
commit
edc8eac2e7
1 changed files with 15 additions and 0 deletions
15
qml/main.qml
15
qml/main.qml
|
@ -78,6 +78,11 @@ ApplicationWindow {
|
||||||
textFontSize = fontSizes[textFontSizeIndex]
|
textFontSize = fontSizes[textFontSizeIndex]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function removeHTML(str) {
|
||||||
|
forEscapingHTML.text = str
|
||||||
|
return forEscapingHTML.getText(0, forEscapingHTML.length)
|
||||||
|
}
|
||||||
|
|
||||||
function keyPressed(event) {
|
function keyPressed(event) {
|
||||||
switch (event.key) {
|
switch (event.key) {
|
||||||
case Qt.Key_Right:
|
case Qt.Key_Right:
|
||||||
|
@ -113,6 +118,10 @@ ApplicationWindow {
|
||||||
case Qt.Key_Return:
|
case Qt.Key_Return:
|
||||||
Qt.openUrlExternally(content.post.link)
|
Qt.openUrlExternally(content.post.link)
|
||||||
break
|
break
|
||||||
|
case Qt.Key_S: {
|
||||||
|
console.log(Qt.openUrlExternally("speaker:"+ removeHTML(content.post.content)))
|
||||||
|
break
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -176,6 +185,12 @@ ApplicationWindow {
|
||||||
id: server
|
id: server
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TextArea {
|
||||||
|
id: forEscapingHTML
|
||||||
|
visible: false
|
||||||
|
textFormat: TextEdit.RichText
|
||||||
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
if(serverLogin.loggedIn()) {
|
if(serverLogin.loggedIn()) {
|
||||||
loggedIn();
|
loggedIn();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue