Qt-Secret/Qt-Secret-GUI/KeysGeneratePage.qml

47 lines
1.1 KiB
QML
Raw Normal View History

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
import "modules/"
2019-07-21 13:34:42 +03:00
Item {
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
onQmlShowKeys: {
2019-08-07 19:53:43 +03:00
publicKeyRow.setText(pubKey)
privateKeyRow.setText(privKey)
}
}
2019-07-21 13:34:42 +03:00
2019-07-23 03:55:17 +03:00
ColumnLayout {
2019-07-23 03:55:17 +03:00
id: column
spacing: 10
anchors.fill: parent
anchors.leftMargin: 20
anchors.rightMargin: 20
RsaGenModule {
id: rsaGenModule
onButtonClicked: appCore.generateKeys(rsaGenModule.rsaSize)
2019-07-23 03:55:17 +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-23 03:55:17 +03:00
RowElement {
2019-08-07 19:53:43 +03:00
id: privateKeyRow
Layout.leftMargin: 8
2019-08-07 19:53:43 +03:00
labelText: qsTr("Private key:")
buttonImageSource: "../images/cpy.png"
onButtonClicked: appCore.copyToClipboard(privateKeyRow.textAreaText)
}
}
2019-07-21 13:34:42 +03:00
}