i dont know what im doing

This commit is contained in:
2025-02-26 15:10:42 +01:00
5 changed files with 142 additions and 25 deletions

103
Gui/BackupSettings.qml Normal file
View File

@@ -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
}
}

View File

@@ -11,7 +11,10 @@ Item
{ {
property string recpass: "" property string recpass: ""
property bool adminAvailable: true property bool adminAvailable: true
property alias recoverEnc: recoveryPaswordDialog
property alias first: firstStartItem
id: firstStartItem
anchors.fill: parent anchors.fill: parent
StackView StackView
{ {
@@ -87,6 +90,7 @@ Item
Dialog Dialog
{ {
id: recoveryPaswordDialog id: recoveryPaswordDialog
modal: true modal: true
title: qsTr("Wiederherstellung") title: qsTr("Wiederherstellung")
@@ -115,6 +119,19 @@ Item
implicitWidth: 300 implicitWidth: 300
placeholderText: qsTr("Hier Wiederherstellungspasswort eingeben") placeholderText: qsTr("Hier Wiederherstellungspasswort eingeben")
} }
Label
{
text: qsTr("Wiederherstellungspasswort eingeben: ")
}
TextField
{
id: repeatRecoveryPaswordInput
text: ""
echoMode: TextInput.Password
implicitWidth: 300
placeholderText: qsTr("Hier Wiederherstellungspasswort eingeben")
}
} }
} }
} }

View File

@@ -21,6 +21,13 @@ Item
{ {
text: qsTr("Das Unternehmen") text: qsTr("Das Unternehmen")
} }
<<<<<<< HEAD
=======
TabButton
{
text: qsTr("Sicherung")
}
>>>>>>> schnacke
} }
StackLayout StackLayout
@@ -55,6 +62,18 @@ Item
anchors.fill: parent anchors.fill: parent
} }
} }
<<<<<<< HEAD
=======
Item
{
id: backup
BackupSettings
{
id: backupSettings
anchors.fill: parent
}
}
>>>>>>> schnacke
} }
RowLayout RowLayout

View File

@@ -12,6 +12,7 @@ ApplicationWindow
visible: true visible: true
title: "PYQCRM" title: "PYQCRM"
property string confile: "" property string confile: ""
property alias settingsFileDialog: settingsFiledialog
TopBar TopBar
{ {
@@ -80,12 +81,13 @@ ApplicationWindow
anchors.centerIn: parent anchors.centerIn: parent
standardButtons: Dialog.Yes | Dialog.No standardButtons: Dialog.Yes | Dialog.No
onAccepted: settingsFiledialog.open() onAccepted: settingsFiledialog.open()
onRejected: appLoader.source= "firststart.qml" onRejected: appLoader.source= "Firststart.qml"
title: qsTr("Einstellungen importieren") title: qsTr("Einstellungen importieren")
} }
FileDialog FileDialog
{ {
id: settingsFiledialog id: settingsFiledialog
title: qsTr("PYQCRM Einstellungen") title: qsTr("PYQCRM Einstellungen")
currentFolder: StandardPaths.standardLocations(StandardPaths.DocumentsLocation)[0] currentFolder: StandardPaths.standardLocations(StandardPaths.DocumentsLocation)[0]

View File

@@ -1,24 +0,0 @@
<RCC>
<qresource prefix="/">
<file>qtquickcontrols2.conf</file>
<file>images/add.svg</file>
<file>images/addbusiness.svg</file>
<file>images/addperson.svg</file>
<file>images/filter.svg</file>
<file>images/menu.svg</file>
<file>images/search.svg</file>
<file>sounds/error.ogg</file>
<file>sounds/fail2c.ogg</file>
<file>sounds/puzzerr.ogg</file>
<file>sounds/sysnotify.ogg</file>
<file>sounds/wrong.ogg</file>
<file>fonts/Damarwulan.ttf</file>
<file>fonts/HelloStranger.otf</file>
<file>fonts/HussarPrintA.otf</file>
<file>fonts/LittleBirdsRegular.ttf</file>
<file>fonts/ReginaldScript.ttf</file>
<file>images/account.svg</file>
<file>README</file>
<file>LICENSE</file>
</qresource>
</RCC>