2019-07-21 13:34:42 +03:00
|
|
|
import QtQuick 2.0
|
|
|
|
import QtQuick.Controls 2.12
|
2019-07-23 03:55:17 +03:00
|
|
|
import QtQuick.Layouts 1.12
|
2019-07-26 15:28:17 +03:00
|
|
|
import "modules/"
|
2019-07-21 13:34:42 +03:00
|
|
|
|
|
|
|
Item {
|
2019-07-24 20:53:55 +03:00
|
|
|
id: parentItem
|
|
|
|
|
2019-07-23 03:55:17 +03:00
|
|
|
Connections {
|
2019-07-23 11:04:32 +03:00
|
|
|
|
2019-07-23 03:55:17 +03:00
|
|
|
target: appCore
|
2020-06-18 01:12:13 +03:00
|
|
|
function onQmlShowKeys(pubKey, privKey) {
|
2019-08-07 19:53:43 +03:00
|
|
|
publicKeyRow.setText(pubKey)
|
|
|
|
privateKeyRow.setText(privKey)
|
2019-07-24 20:53:55 +03:00
|
|
|
}
|
2019-07-21 19:45:29 +03:00
|
|
|
}
|
2019-07-21 13:34:42 +03:00
|
|
|
|
2019-07-23 03:55:17 +03:00
|
|
|
ColumnLayout {
|
2019-07-21 19:45:29 +03:00
|
|
|
|
2019-07-23 03:55:17 +03:00
|
|
|
id: column
|
2019-08-23 12:07:31 +03:00
|
|
|
spacing: 0
|
2019-07-24 20:53:55 +03:00
|
|
|
anchors.fill: parent
|
2019-07-25 19:28:11 +03:00
|
|
|
anchors.leftMargin: 20
|
|
|
|
anchors.rightMargin: 20
|
2019-07-24 20:53:55 +03:00
|
|
|
|
2019-07-28 13:45:44 +03:00
|
|
|
RsaGenModule {
|
|
|
|
id: rsaGenModule
|
2019-08-23 12:07:31 +03:00
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.leftMargin: 0
|
|
|
|
|
2019-07-28 13:45:44 +03:00
|
|
|
onButtonClicked: appCore.generateKeys(rsaGenModule.rsaSize)
|
2019-07-23 03:55:17 +03:00
|
|
|
}
|
|
|
|
|
2019-07-25 00:45:59 +03:00
|
|
|
RowElement {
|
2019-08-07 19:53:43 +03:00
|
|
|
id: publicKeyRow
|
|
|
|
labelText: qsTr("Public key:")
|
|
|
|
buttonImageSource: "../images/cpy.png"
|
|
|
|
onButtonClicked: appCore.copyToClipboard(publicKeyRow.textAreaText)
|
2019-07-24 20:53:55 +03:00
|
|
|
}
|
2019-07-23 03:55:17 +03:00
|
|
|
|
2019-07-25 00:45:59 +03:00
|
|
|
RowElement {
|
2019-08-07 19:53:43 +03:00
|
|
|
id: privateKeyRow
|
2019-08-23 12:07:31 +03:00
|
|
|
x: 0
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.leftMargin: 0
|
2019-08-07 19:53:43 +03:00
|
|
|
labelText: qsTr("Private key:")
|
|
|
|
buttonImageSource: "../images/cpy.png"
|
|
|
|
onButtonClicked: appCore.copyToClipboard(privateKeyRow.textAreaText)
|
2019-07-24 20:53:55 +03:00
|
|
|
}
|
|
|
|
}
|
2019-07-21 13:34:42 +03:00
|
|
|
}
|