Changed DataBase to BusinessModel

This commit is contained in:
2024-11-20 12:39:20 +01:00
parent a89fe6e1d5
commit 0e8e03dc5d
7 changed files with 55 additions and 15 deletions

View File

@@ -113,7 +113,7 @@ Item {
Layout.fillWidth: true
columnSpacing: 1
rowSpacing: 2
model: dbm
model: bm
alternatingRows: true
resizableColumns: true // @disable-check M16
selectionBehavior: TableView.SelectRows

View File

@@ -12,6 +12,7 @@ ApplicationWindow
height: Screen.height * .7
visible: true
title: "PYQCRM"
property string confile: ""
TopBar
{
@@ -71,10 +72,45 @@ ApplicationWindow
{
id: settingsFiledialog
title: qsTr("pyqcrm Einstellungen")
title: qsTr("PYQCRM Einstellungen")
currentFolder: StandardPaths.standardLocations(StandardPaths.DocumentsLocation)[0]
modality: "ApplicationModal"
nameFilters: ["pyqcrm Einstellungen (*.toml)"]
onAccepted: config.importConfig(selectedFile)
nameFilters: [qsTr("PYQCRM Einstellungen (*.pyqcrm)")]
onAccepted:
{
encryptPwDialog.open()
confile = selectedFile
}
}
Dialog
{
id: encryptPwDialog
modal: true
title: qsTr("PYQCRM Einstellungen")
anchors.centerIn: parent
standardButtons: Dialog.Ok | Dialog.Cancel
onAccepted: config.importConfig(confile, encryptPassword.text)
ColumnLayout
{
RowLayout
{
Label
{
text: qsTr("Passwort eingeben:")
}
TextField
{
id: encryptPassword
echoMode: TextInput.Password
implicitWidth: 300
}
}
}
}
}