BackupSettings
This commit is contained in:
@@ -2,6 +2,8 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Dialogs
|
||||
import QtCore
|
||||
|
||||
|
||||
GridLayout
|
||||
{
|
||||
@@ -14,7 +16,6 @@ GridLayout
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: qsTr("Sicherung")
|
||||
font.pixelSize: 35
|
||||
|
||||
}
|
||||
|
||||
Label
|
||||
@@ -27,7 +28,7 @@ GridLayout
|
||||
{
|
||||
id: saveConfig
|
||||
text: qsTr("Jetzt sichern!")
|
||||
onClicked: settingsFileDialog.open()
|
||||
onClicked: dialog.open()
|
||||
}
|
||||
Label
|
||||
{
|
||||
@@ -38,7 +39,7 @@ GridLayout
|
||||
{
|
||||
id: saveEncryption
|
||||
text: qsTr("Jetzt sichern!")
|
||||
onClicked: recoverEnc.open()
|
||||
onClicked: apploader.item.recoverEnc.open()
|
||||
}
|
||||
Item
|
||||
{
|
||||
@@ -98,6 +99,12 @@ GridLayout
|
||||
{
|
||||
id: saveConfigFile
|
||||
fileMode: FileDialog.SaveFile
|
||||
|
||||
nameFilters: ["PYQCRM Recovery files (*.pyqrec)"]
|
||||
currentFolder: StandardPaths.standardLocations(StandardPaths.DocumentsLocation)[0]
|
||||
onAccepted:
|
||||
{
|
||||
var test = config.backupConfig(saveConfigFile.currentFile)
|
||||
console.log()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ Item
|
||||
property string recpass: ""
|
||||
property bool adminAvailable: true
|
||||
property alias recoverEnc: recoveryPaswordDialog
|
||||
property alias first: firstStartItem
|
||||
|
||||
id: firstStartItem
|
||||
anchors.fill: parent
|
||||
|
||||
@@ -14,6 +14,7 @@ ApplicationWindow
|
||||
property string confile: ""
|
||||
property alias settingsFileDialog: settingsFiledialog
|
||||
|
||||
|
||||
TopBar
|
||||
{
|
||||
|
||||
|
||||
@@ -195,6 +195,7 @@ class ConfigLoader(QObject):
|
||||
except Exception as e:
|
||||
print(str(e))
|
||||
|
||||
|
||||
def getConfig(self):
|
||||
# print(f"In {__file__} file, getConfig()")
|
||||
# print(self.__config)
|
||||
@@ -212,3 +213,8 @@ class ConfigLoader(QObject):
|
||||
self.__config['pyqcrm']['ENCRYPTION_KEY'] = enc_key
|
||||
self.__saveConfig()
|
||||
|
||||
@Slot(str)
|
||||
def backupConfig(self, pw):
|
||||
print(pw)
|
||||
new_config = self.getConfig()
|
||||
print(new_config)
|
||||
|
||||
Reference in New Issue
Block a user