2019-07-29 19:36:37 +03:00
|
|
|
import QtQuick 2.0
|
|
|
|
import QtQuick.Controls 2.12
|
|
|
|
import QtQuick.Layouts 1.12
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
|
|
|
|
id: encryptDecryptMenu
|
|
|
|
|
2019-07-30 21:55:17 +03:00
|
|
|
property double verticalSize: 0.1
|
|
|
|
property bool encryptState: true
|
|
|
|
|
|
|
|
signal changeState()
|
|
|
|
signal getEncrypDecrypt()
|
|
|
|
|
2019-07-29 19:36:37 +03:00
|
|
|
spacing: 20
|
|
|
|
Layout.minimumHeight: 50
|
|
|
|
Layout.fillWidth: true
|
2019-07-30 21:55:17 +03:00
|
|
|
Layout.maximumHeight: parentItem.height * verticalSize
|
2019-07-29 19:36:37 +03:00
|
|
|
|
|
|
|
RadioButton {
|
|
|
|
text: qsTr("Encryption")
|
2019-07-30 21:55:17 +03:00
|
|
|
checked: true
|
|
|
|
onToggled: {
|
|
|
|
encryptState = true
|
|
|
|
changeState()
|
2019-07-29 19:36:37 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
RadioButton {
|
|
|
|
text: qsTr("Decryption")
|
2019-07-30 21:55:17 +03:00
|
|
|
onToggled: {
|
|
|
|
encryptState = false
|
|
|
|
changeState()
|
2019-07-29 19:36:37 +03:00
|
|
|
}
|
|
|
|
}
|
2019-07-30 21:55:17 +03:00
|
|
|
|
|
|
|
Button {
|
|
|
|
id: processButton
|
|
|
|
text: (encryptDecryptMenu.encryptState ? qsTr("Encrypt") : qsTr("Decrypt"))
|
2019-07-31 01:32:47 +03:00
|
|
|
onClicked: getEncrypDecrypt()
|
2019-07-30 21:55:17 +03:00
|
|
|
}
|
2019-07-29 19:36:37 +03:00
|
|
|
}
|