diff --git a/Gui/BackupSettings.qml b/Gui/BackupSettings.qml new file mode 100644 index 0000000..4a31706 --- /dev/null +++ b/Gui/BackupSettings.qml @@ -0,0 +1,103 @@ +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import QtQuick.Dialogs + +GridLayout +{ + anchors.fill: parent + anchors.topMargin: 150 + columns: 2 + Label + { + Layout.columnSpan: 2 + Layout.alignment: Qt.AlignHCenter + text: qsTr("Sicherung") + font.pixelSize: 35 + + } + + Label + { + text: qsTr("Konfiguration") + Layout.alignment: Qt.AlignRight + + } + Button + { + id: saveConfig + text: qsTr("Jetzt sichern!") + onClicked: settingsFileDialog.open() + } + Label + { + text: qsTr("Verschlüsselung") + Layout.alignment: Qt.AlignRight + } + Button + { + id: saveEncryption + text: qsTr("Jetzt sichern!") + onClicked: Firsts.open() + } + Item + { + id: spacer + Layout.fillHeight: true + } + Dialog + { + anchors.centerIn: parent + id: dialog + title: "Title" + standardButtons: Dialog.Apply | Dialog.Cancel + + onApplied: + { + + if (configPwd.text === repeatConfigPwd.text) + { console.log("true") + saveConfigFile.open() + } + else + { + configPwd.text = "" + configPwd.placeholderText = qsTr("Passwort stimmt nicht überein") + configPwd.placeholderTextColor = "red" + repeatConfigPwd.placeholderText = qsTr("") + repeatConfigPwd.text = "" + console.log("false") + } + } + onRejected: console.log("Cancel clicked") + GridLayout + { + columns: 2 + Label + { + text: qsTr("Passwort eingeben") + } + TextField + { + id: configPwd + placeholderText: qsTr("Sicherungspasswort festlegen") + } + Label + { + text: qsTr("Passwort wiederholen") + } + TextField + { + id: repeatConfigPwd + placeholderText: qsTr("Sicherungspasswort wiederholen") + } + + } + } + FileDialog + { + id: saveConfigFile + fileMode: FileDialog.SaveFile + + } +} diff --git a/Gui/firststart.qml b/Gui/Firststart.qml similarity index 88% rename from Gui/firststart.qml rename to Gui/Firststart.qml index 38544a8..7c2a134 100644 --- a/Gui/firststart.qml +++ b/Gui/Firststart.qml @@ -11,7 +11,10 @@ Item { property string recpass: "" property bool adminAvailable: true + property alias recoverEnc: recoveryPaswordDialog + property alias first: firstStartItem + id: firstStartItem anchors.fill: parent StackView { @@ -87,6 +90,7 @@ Item Dialog { + id: recoveryPaswordDialog modal: true title: qsTr("Wiederherstellung") @@ -115,6 +119,19 @@ Item implicitWidth: 300 placeholderText: qsTr("Hier Wiederherstellungspasswort eingeben") } + Label + { + text: qsTr("Wiederherstellungspasswort eingeben: ") + } + + TextField + { + id: repeatRecoveryPaswordInput + text: "" + echoMode: TextInput.Password + implicitWidth: 300 + placeholderText: qsTr("Hier Wiederherstellungspasswort eingeben") + } } } } diff --git a/Gui/PyqcrmConf.qml b/Gui/PyqcrmConf.qml index 2527b3e..1e00923 100644 --- a/Gui/PyqcrmConf.qml +++ b/Gui/PyqcrmConf.qml @@ -21,6 +21,13 @@ Item { text: qsTr("Das Unternehmen") } +<<<<<<< HEAD +======= + TabButton + { + text: qsTr("Sicherung") + } +>>>>>>> schnacke } StackLayout @@ -55,6 +62,18 @@ Item anchors.fill: parent } } +<<<<<<< HEAD +======= + Item + { + id: backup + BackupSettings + { + id: backupSettings + anchors.fill: parent + } + } +>>>>>>> schnacke } RowLayout diff --git a/Gui/main.qml b/Gui/main.qml index 2e85370..2d65ba1 100644 --- a/Gui/main.qml +++ b/Gui/main.qml @@ -12,6 +12,7 @@ ApplicationWindow visible: true title: "PYQCRM" property string confile: "" + property alias settingsFileDialog: settingsFiledialog TopBar { @@ -80,12 +81,13 @@ ApplicationWindow anchors.centerIn: parent standardButtons: Dialog.Yes | Dialog.No onAccepted: settingsFiledialog.open() - onRejected: appLoader.source= "firststart.qml" + onRejected: appLoader.source= "Firststart.qml" title: qsTr("Einstellungen importieren") } FileDialog { + id: settingsFiledialog title: qsTr("PYQCRM Einstellungen") currentFolder: StandardPaths.standardLocations(StandardPaths.DocumentsLocation)[0] diff --git a/pyqcrm.qrc b/pyqcrm.qrc deleted file mode 100644 index 6fd41f3..0000000 --- a/pyqcrm.qrc +++ /dev/null @@ -1,24 +0,0 @@ - - - qtquickcontrols2.conf - images/add.svg - images/addbusiness.svg - images/addperson.svg - images/filter.svg - images/menu.svg - images/search.svg - sounds/error.ogg - sounds/fail2c.ogg - sounds/puzzerr.ogg - sounds/sysnotify.ogg - sounds/wrong.ogg - fonts/Damarwulan.ttf - fonts/HelloStranger.otf - fonts/HussarPrintA.otf - fonts/LittleBirdsRegular.ttf - fonts/ReginaldScript.ttf - images/account.svg - README - LICENSE - -