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