|
|
@ -26,6 +26,22 @@ ApplicationWindow { |
|
|
|
shortcut: "Ctrl+o" |
|
|
|
shortcut: "Ctrl+o" |
|
|
|
onTriggered: openAppDialog.open() |
|
|
|
onTriggered: openAppDialog.open() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MenuSeparator {} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MenuItem { |
|
|
|
|
|
|
|
text: "Import key" |
|
|
|
|
|
|
|
shortcut: "Ctrl+i" |
|
|
|
|
|
|
|
onTriggered: importDialog.open() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MenuItem { |
|
|
|
|
|
|
|
text: "Export keys" |
|
|
|
|
|
|
|
shortcut: "Ctrl+e" |
|
|
|
|
|
|
|
onTriggered: exportDialog.open() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//MenuSeparator {} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Menu { |
|
|
|
Menu { |
|
|
@ -375,9 +391,7 @@ ApplicationWindow { |
|
|
|
//ui.open(openAppDialog.fileUrl.toString()) |
|
|
|
//ui.open(openAppDialog.fileUrl.toString()) |
|
|
|
//ui.openHtml(Qt.resolvedUrl(ui.assetPath("test.html"))) |
|
|
|
//ui.openHtml(Qt.resolvedUrl(ui.assetPath("test.html"))) |
|
|
|
var path = openAppDialog.fileUrl.toString() |
|
|
|
var path = openAppDialog.fileUrl.toString() |
|
|
|
console.log(path) |
|
|
|
|
|
|
|
var ext = path.split('.').pop() |
|
|
|
var ext = path.split('.').pop() |
|
|
|
console.log(ext) |
|
|
|
|
|
|
|
if(ext == "html" || ext == "htm") { |
|
|
|
if(ext == "html" || ext == "htm") { |
|
|
|
ui.openHtml(path) |
|
|
|
ui.openHtml(path) |
|
|
|
}else if(ext == "qml"){ |
|
|
|
}else if(ext == "qml"){ |
|
|
@ -386,6 +400,22 @@ ApplicationWindow { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FileDialog { |
|
|
|
|
|
|
|
id: exportDialog |
|
|
|
|
|
|
|
title: "Export keys" |
|
|
|
|
|
|
|
onAccepted: { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FileDialog { |
|
|
|
|
|
|
|
id: importDialog |
|
|
|
|
|
|
|
title: "Import key" |
|
|
|
|
|
|
|
onAccepted: { |
|
|
|
|
|
|
|
var path = this.fileUrl.toString() |
|
|
|
|
|
|
|
ui.importKey(path) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
statusBar: StatusBar { |
|
|
|
statusBar: StatusBar { |
|
|
|
height: 30 |
|
|
|
height: 30 |
|
|
|
RowLayout { |
|
|
|
RowLayout { |
|
|
|