Einstellungen importieren

This commit is contained in:
2024-11-20 11:34:34 +01:00
parent 86618200ba
commit a89fe6e1d5
5 changed files with 250 additions and 104 deletions

View File

@@ -101,6 +101,19 @@ Item
Layout.fillWidth: true Layout.fillWidth: true
property string name: "PYQCRM_ADMIN_PASS" property string name: "PYQCRM_ADMIN_PASS"
} }
Label
{
text: qsTr("Info:")
Layout.alignment: Qt.AlignRight
}
TextField
{
id: gecos
placeholderText: qsTr("Zusätzliche Info")
Layout.fillWidth: true
property string name: "PYQCRM_ADMIN_INFO"
}
Item Item
{ {

View File

@@ -2,6 +2,8 @@ import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Controls import QtQuick.Controls
import Gui import Gui
import QtQuick.Dialogs
import QtCore
ApplicationWindow ApplicationWindow
{ {
@@ -43,7 +45,36 @@ ApplicationWindow
leftMargin: 9 leftMargin: 9
} }
source: bad_config? "firststart.qml": "Dashboard.qml"
property alias window: appWindow property alias window: appWindow
} }
Component.onCompleted:
{
if(bad_config)
{
importDialog.open()
}
else appLoader.source= "Dashboard.qml"
}
Dialog
{
id: importDialog
modal: true
anchors.centerIn: parent
standardButtons: Dialog.Yes | Dialog.No
onAccepted: settingsFiledialog.open()
onRejected: appLoader.source= "firststart.qml"
title: qsTr("Einstellungen importieren")
}
FileDialog
{
id: settingsFiledialog
title: qsTr("pyqcrm Einstellungen")
currentFolder: StandardPaths.standardLocations(StandardPaths.DocumentsLocation)[0]
modality: "ApplicationModal"
nameFilters: ["pyqcrm Einstellungen (*.toml)"]
onAccepted: config.importConfig(selectedFile)
}
} }

View File

@@ -4,160 +4,255 @@
<root> <root>
<mxCell id="0" /> <mxCell id="0" />
<mxCell id="1" parent="0" /> <mxCell id="1" parent="0" />
<mxCell id="zKFDF5UOk-7tD0-7yUJp-1" value="" style="ellipse;html=1;shape=startState;fillColor=#000000;strokeColor=#ff0000;" vertex="1" parent="1"> <mxCell id="zKFDF5UOk-7tD0-7yUJp-6" value="" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="70" y="110" width="30" height="30" as="geometry" /> <mxGeometry x="270" y="90" width="80" height="80" as="geometry" />
</mxCell> </mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-2" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;rounded=0;" edge="1" source="zKFDF5UOk-7tD0-7yUJp-1" parent="1"> <mxCell id="zKFDF5UOk-7tD0-7yUJp-7" value="Erfolgreich&lt;div&gt;&lt;br&gt;&lt;/div&gt;" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" parent="1" vertex="1">
<mxGeometry relative="1" as="geometry"> <mxGeometry x="270" y="70" width="80" height="40" as="geometry" />
<mxPoint x="160" y="125" as="targetPoint" />
</mxGeometry>
</mxCell> </mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-3" value="Programmstart" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1"> <mxCell id="zKFDF5UOk-7tD0-7yUJp-8" value="" style="endArrow=classic;html=1;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" parent="1" source="zKFDF5UOk-7tD0-7yUJp-6" edge="1">
<mxGeometry x="160" y="95" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-4" value="" style="endArrow=classic;html=1;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="zKFDF5UOk-7tD0-7yUJp-3">
<mxGeometry width="50" height="50" relative="1" as="geometry"> <mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="390" y="460" as="sourcePoint" /> <mxPoint x="450" y="465" as="sourcePoint" />
<mxPoint x="350" y="125" as="targetPoint" /> <mxPoint x="620" y="130" as="targetPoint" />
</mxGeometry> </mxGeometry>
</mxCell> </mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-6" value="" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1"> <mxCell id="zKFDF5UOk-7tD0-7yUJp-9" value="ja" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="zKFDF5UOk-7tD0-7yUJp-8" vertex="1" connectable="0">
<mxGeometry x="350" y="85" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-7" value="Erfolgreich&lt;div&gt;&lt;br&gt;&lt;/div&gt;" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="350" y="60" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-8" value="" style="endArrow=classic;html=1;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="zKFDF5UOk-7tD0-7yUJp-6">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="390" y="460" as="sourcePoint" />
<mxPoint x="560" y="125" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-9" value="ja" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="zKFDF5UOk-7tD0-7yUJp-8">
<mxGeometry x="-0.1294" y="2" relative="1" as="geometry"> <mxGeometry x="-0.1294" y="2" relative="1" as="geometry">
<mxPoint as="offset" /> <mxPoint as="offset" />
</mxGeometry> </mxGeometry>
</mxCell> </mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-10" value="Laden Konfiguration" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1"> <mxCell id="zKFDF5UOk-7tD0-7yUJp-10" value="Laden Konfiguration" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="560" y="95" width="160" height="60" as="geometry" /> <mxGeometry x="620" y="100" width="160" height="60" as="geometry" />
</mxCell> </mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-11" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="zKFDF5UOk-7tD0-7yUJp-6"> <mxCell id="zKFDF5UOk-7tD0-7yUJp-11" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="zKFDF5UOk-7tD0-7yUJp-6" target="vLrOMzFsj3qdJpjowrCW-6" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry"> <mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="390" y="460" as="sourcePoint" /> <mxPoint x="370" y="465" as="sourcePoint" />
<mxPoint x="390" y="210" as="targetPoint" /> <mxPoint x="310" y="205" as="targetPoint" />
</mxGeometry> </mxGeometry>
</mxCell> </mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-12" value="nein" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="zKFDF5UOk-7tD0-7yUJp-11"> <mxCell id="zKFDF5UOk-7tD0-7yUJp-12" value="nein" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="zKFDF5UOk-7tD0-7yUJp-11" vertex="1" connectable="0">
<mxGeometry x="-0.0286" y="4" relative="1" as="geometry"> <mxGeometry x="-0.0286" y="4" relative="1" as="geometry">
<mxPoint as="offset" /> <mxPoint as="offset" />
</mxGeometry> </mxGeometry>
</mxCell> </mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-13" value="anlegen Konfiguration" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1"> <mxCell id="zKFDF5UOk-7tD0-7yUJp-13" value="anlegen Konfiguration" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="265" y="270" width="120" height="60" as="geometry" /> <mxGeometry x="250" y="340" width="120" height="60" as="geometry" />
</mxCell> </mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-16" value="" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1"> <mxCell id="zKFDF5UOk-7tD0-7yUJp-16" value="" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="600" y="280" width="80" height="80" as="geometry" /> <mxGeometry x="660" y="285" width="80" height="80" as="geometry" />
</mxCell> </mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-17" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="zKFDF5UOk-7tD0-7yUJp-10" target="zKFDF5UOk-7tD0-7yUJp-16"> <mxCell id="zKFDF5UOk-7tD0-7yUJp-17" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" parent="1" source="zKFDF5UOk-7tD0-7yUJp-10" target="zKFDF5UOk-7tD0-7yUJp-16" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry"> <mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="390" y="460" as="sourcePoint" /> <mxPoint x="450" y="465" as="sourcePoint" />
<mxPoint x="440" y="410" as="targetPoint" /> <mxPoint x="500" y="415" as="targetPoint" />
</mxGeometry> </mxGeometry>
</mxCell> </mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-19" value="Dashboard" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1"> <mxCell id="zKFDF5UOk-7tD0-7yUJp-19" value="Dashboard" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="570" y="710" width="160" height="60" as="geometry" /> <mxGeometry x="630" y="715" width="160" height="60" as="geometry" />
</mxCell> </mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-21" value="Login Screen" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1"> <mxCell id="zKFDF5UOk-7tD0-7yUJp-21" value="Login Screen" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="560" y="420" width="160" height="60" as="geometry" /> <mxGeometry x="620" y="425" width="160" height="60" as="geometry" />
</mxCell> </mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-24" value="Admin user speichern" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1"> <mxCell id="zKFDF5UOk-7tD0-7yUJp-24" value="Admin user speichern" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="395" y="270" width="120" height="60" as="geometry" /> <mxGeometry x="400" y="460" width="120" height="40" as="geometry" />
</mxCell> </mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-26" value="" style="html=1;points=[[0,0,0,0,5],[0,1,0,0,-5],[1,0,0,0,5],[1,1,0,0,-5]];perimeter=orthogonalPerimeter;outlineConnect=0;targetShapes=umlLifeline;portConstraint=eastwest;newEdgeStyle={&quot;curved&quot;:0,&quot;rounded&quot;:0};rotation=-90;" vertex="1" parent="1"> <mxCell id="zKFDF5UOk-7tD0-7yUJp-30" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" parent="1" source="zKFDF5UOk-7tD0-7yUJp-13" edge="1">
<mxGeometry x="385" y="180" width="10" height="80" as="geometry" />
</mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-28" value="" style="endArrow=classic;html=1;rounded=0;exitX=0;exitY=0;exitDx=0;exitDy=5;exitPerimeter=0;" edge="1" parent="1" source="zKFDF5UOk-7tD0-7yUJp-26">
<mxGeometry width="50" height="50" relative="1" as="geometry"> <mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="390" y="450" as="sourcePoint" /> <mxPoint x="342.5" y="435" as="sourcePoint" />
<mxPoint x="355" y="270" as="targetPoint" /> <mxPoint x="310" y="440" as="targetPoint" />
<Array as="points" />
</mxGeometry> </mxGeometry>
</mxCell> </mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-30" value="" style="endArrow=classic;html=1;rounded=0;exitX=0;exitY=1;exitDx=0;exitDy=-5;exitPerimeter=0;" edge="1" parent="1" source="zKFDF5UOk-7tD0-7yUJp-26"> <mxCell id="zKFDF5UOk-7tD0-7yUJp-36" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" parent="1" source="zKFDF5UOk-7tD0-7yUJp-16" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry"> <mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="390" y="450" as="sourcePoint" /> <mxPoint x="450" y="465" as="sourcePoint" />
<mxPoint x="425" y="270" as="targetPoint" /> <mxPoint x="700" y="425" as="targetPoint" />
</mxGeometry> </mxGeometry>
</mxCell> </mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-31" value="" style="shape=line;html=1;strokeWidth=6;strokeColor=#ff0000;" vertex="1" parent="1"> <mxCell id="zKFDF5UOk-7tD0-7yUJp-37" value="" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="290" y="360" width="200" height="10" as="geometry" /> <mxGeometry x="660" y="565" width="80" height="80" as="geometry" />
</mxCell> </mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-33" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.567;exitY=1.033;exitDx=0;exitDy=0;exitPerimeter=0;" edge="1" parent="1" source="zKFDF5UOk-7tD0-7yUJp-13"> <mxCell id="zKFDF5UOk-7tD0-7yUJp-38" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="zKFDF5UOk-7tD0-7yUJp-21" target="zKFDF5UOk-7tD0-7yUJp-37" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry"> <mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="390" y="450" as="sourcePoint" /> <mxPoint x="450" y="465" as="sourcePoint" />
<mxPoint x="333" y="360" as="targetPoint" /> <mxPoint x="500" y="415" as="targetPoint" />
</mxGeometry> </mxGeometry>
</mxCell> </mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-34" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.358;exitY=1.017;exitDx=0;exitDy=0;exitPerimeter=0;" edge="1" parent="1" source="zKFDF5UOk-7tD0-7yUJp-24"> <mxCell id="zKFDF5UOk-7tD0-7yUJp-39" value="Login erfolgreich" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" parent="1" vertex="1">
<mxGeometry x="580" y="560" width="110" height="30" as="geometry" />
</mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-40" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" parent="1" source="zKFDF5UOk-7tD0-7yUJp-37" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry"> <mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="440" y="430" as="sourcePoint" /> <mxPoint x="490" y="505" as="sourcePoint" />
<mxPoint x="438" y="360" as="targetPoint" /> <mxPoint x="700" y="715" as="targetPoint" />
</mxGeometry> </mxGeometry>
</mxCell> </mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-35" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.495;exitY=0.9;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="zKFDF5UOk-7tD0-7yUJp-31" target="zKFDF5UOk-7tD0-7yUJp-16"> <mxCell id="zKFDF5UOk-7tD0-7yUJp-41" value="ja" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="zKFDF5UOk-7tD0-7yUJp-40" vertex="1" connectable="0">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="390" y="460" as="sourcePoint" />
<mxPoint x="540" y="290" as="targetPoint" />
<Array as="points">
<mxPoint x="390" y="420" />
<mxPoint x="540" y="420" />
<mxPoint x="540" y="320" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-36" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="zKFDF5UOk-7tD0-7yUJp-16">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="390" y="460" as="sourcePoint" />
<mxPoint x="640" y="420" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-37" value="" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="600" y="560" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-38" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="zKFDF5UOk-7tD0-7yUJp-21" target="zKFDF5UOk-7tD0-7yUJp-37">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="390" y="460" as="sourcePoint" />
<mxPoint x="440" y="410" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-39" value="Login erfolgreich" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="520" y="550" width="110" height="30" as="geometry" />
</mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-40" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="zKFDF5UOk-7tD0-7yUJp-37">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="430" y="500" as="sourcePoint" />
<mxPoint x="640" y="710" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-41" value="ja" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="zKFDF5UOk-7tD0-7yUJp-40">
<mxGeometry x="-0.3429" y="-2" relative="1" as="geometry"> <mxGeometry x="-0.3429" y="-2" relative="1" as="geometry">
<mxPoint as="offset" /> <mxPoint as="offset" />
</mxGeometry> </mxGeometry>
</mxCell> </mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-42" value="" style="endArrow=classic;html=1;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="zKFDF5UOk-7tD0-7yUJp-37" target="zKFDF5UOk-7tD0-7yUJp-21"> <mxCell id="zKFDF5UOk-7tD0-7yUJp-42" value="" style="endArrow=classic;html=1;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="zKFDF5UOk-7tD0-7yUJp-37" target="zKFDF5UOk-7tD0-7yUJp-21" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry"> <mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="390" y="460" as="sourcePoint" /> <mxPoint x="450" y="465" as="sourcePoint" />
<mxPoint x="760" y="460" as="targetPoint" /> <mxPoint x="820" y="465" as="targetPoint" />
<Array as="points"> <Array as="points">
<mxPoint x="760" y="600" /> <mxPoint x="810" y="605" />
<mxPoint x="760" y="450" /> <mxPoint x="810" y="455" />
</Array> </Array>
</mxGeometry> </mxGeometry>
</mxCell> </mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-43" value="nein" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="zKFDF5UOk-7tD0-7yUJp-42"> <mxCell id="zKFDF5UOk-7tD0-7yUJp-43" value="nein" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="zKFDF5UOk-7tD0-7yUJp-42" vertex="1" connectable="0">
<mxGeometry x="0.1259" y="-3" relative="1" as="geometry"> <mxGeometry x="0.1259" y="-3" relative="1" as="geometry">
<mxPoint as="offset" /> <mxPoint as="offset" />
</mxGeometry> </mxGeometry>
</mxCell> </mxCell>
<mxCell id="vLrOMzFsj3qdJpjowrCW-6" value="" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="270" y="215" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="vLrOMzFsj3qdJpjowrCW-10" value="Backup existiert" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" parent="1" vertex="1">
<mxGeometry x="187.5" y="210" width="110" height="30" as="geometry" />
</mxCell>
<mxCell id="vLrOMzFsj3qdJpjowrCW-13" value="importieren" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="450" y="240" width="80" height="30" as="geometry" />
</mxCell>
<mxCell id="vLrOMzFsj3qdJpjowrCW-14" value="" style="endArrow=classic;html=1;rounded=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" parent="1" source="vLrOMzFsj3qdJpjowrCW-6" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="190" y="285" as="sourcePoint" />
<mxPoint x="450" y="255" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="vLrOMzFsj3qdJpjowrCW-15" value="ja" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="vLrOMzFsj3qdJpjowrCW-14" vertex="1" connectable="0">
<mxGeometry x="-0.18" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="vLrOMzFsj3qdJpjowrCW-16" value="" style="endArrow=classic;html=1;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.25;entryY=1;entryDx=0;entryDy=0;" parent="1" source="vLrOMzFsj3qdJpjowrCW-13" target="zKFDF5UOk-7tD0-7yUJp-10" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="680" y="250" as="sourcePoint" />
<mxPoint x="730" y="320" as="targetPoint" />
<Array as="points">
<mxPoint x="660" y="255" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="vLrOMzFsj3qdJpjowrCW-18" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" parent="1" source="vLrOMzFsj3qdJpjowrCW-6" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="310" y="300" as="sourcePoint" />
<mxPoint x="310" y="340" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="vLrOMzFsj3qdJpjowrCW-21" value="nein" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="vLrOMzFsj3qdJpjowrCW-18" vertex="1" connectable="0">
<mxGeometry x="-0.1231" y="3" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="vLrOMzFsj3qdJpjowrCW-22" value="" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="270" y="440" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="vLrOMzFsj3qdJpjowrCW-24" value="admin exists" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" parent="1" vertex="1">
<mxGeometry x="207.5" y="440" width="90" height="30" as="geometry" />
</mxCell>
<mxCell id="vLrOMzFsj3qdJpjowrCW-35" value="" style="endArrow=classic;html=1;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" parent="1" source="vLrOMzFsj3qdJpjowrCW-22" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="430" y="479.5" as="sourcePoint" />
<mxPoint x="400" y="480" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="vLrOMzFsj3qdJpjowrCW-39" value="nein" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="vLrOMzFsj3qdJpjowrCW-35" vertex="1" connectable="0">
<mxGeometry x="-0.1143" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="vLrOMzFsj3qdJpjowrCW-47" value="" style="shape=line;html=1;strokeWidth=6;strokeColor=#ff0000;" parent="1" vertex="1">
<mxGeometry x="297.5" y="730" width="210" height="10" as="geometry" />
</mxCell>
<mxCell id="vLrOMzFsj3qdJpjowrCW-49" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" parent="1" source="vLrOMzFsj3qdJpjowrCW-22" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="260" y="500" as="sourcePoint" />
<mxPoint x="310" y="550" as="targetPoint" />
<Array as="points" />
</mxGeometry>
</mxCell>
<mxCell id="vLrOMzFsj3qdJpjowrCW-54" value="ja" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="vLrOMzFsj3qdJpjowrCW-49" vertex="1" connectable="0">
<mxGeometry x="-0.4" y="1" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="vLrOMzFsj3qdJpjowrCW-55" value="" style="endArrow=classic;html=1;rounded=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" target="zKFDF5UOk-7tD0-7yUJp-6" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="40" y="130" as="sourcePoint" />
<mxPoint x="270" y="130" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="vLrOMzFsj3qdJpjowrCW-56" value="config exists" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="vLrOMzFsj3qdJpjowrCW-55" vertex="1" connectable="0">
<mxGeometry x="-0.1714" y="1" relative="1" as="geometry">
<mxPoint x="-5" y="1" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="zKFDF5UOk-7tD0-7yUJp-1" value="" style="ellipse;html=1;shape=startState;fillColor=#000000;strokeColor=#ff0000;" parent="1" vertex="1">
<mxGeometry x="10" y="115" width="30" height="30" as="geometry" />
</mxCell>
<mxCell id="vLrOMzFsj3qdJpjowrCW-61" value="" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="270" y="550" width="80" height="60" as="geometry" />
</mxCell>
<mxCell id="vLrOMzFsj3qdJpjowrCW-62" value="&lt;span style=&quot;text-wrap: wrap;&quot;&gt;encryption&amp;nbsp;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;text-wrap: wrap;&quot;&gt;Key&lt;/span&gt;&lt;/div&gt;" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" parent="1" vertex="1">
<mxGeometry x="310" y="540" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="vLrOMzFsj3qdJpjowrCW-63" value="Eingabe Verschlüssenlungskey" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="250" y="640" width="120" height="35" as="geometry" />
</mxCell>
<mxCell id="vLrOMzFsj3qdJpjowrCW-64" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="vLrOMzFsj3qdJpjowrCW-61" target="vLrOMzFsj3qdJpjowrCW-63" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="310" y="615" as="sourcePoint" />
<mxPoint x="237.5" y="610" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="vLrOMzFsj3qdJpjowrCW-65" value="ja" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="vLrOMzFsj3qdJpjowrCW-64" vertex="1" connectable="0">
<mxGeometry x="-0.32" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="vLrOMzFsj3qdJpjowrCW-66" value="" style="endArrow=classic;html=1;rounded=0;exitX=0;exitY=0.5;exitDx=0;exitDy=0;" parent="1" source="vLrOMzFsj3qdJpjowrCW-61" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="150" y="600" as="sourcePoint" />
<mxPoint x="180" y="580" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="vLrOMzFsj3qdJpjowrCW-67" value="nein" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="vLrOMzFsj3qdJpjowrCW-66" vertex="1" connectable="0">
<mxGeometry x="0.2061" y="-1" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="vLrOMzFsj3qdJpjowrCW-68" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.174;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;exitX=0.7;exitY=1.029;exitDx=0;exitDy=0;exitPerimeter=0;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="310" y="674.9950000000001" as="sourcePoint" />
<mxPoint x="310.03999999999996" y="733.98" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="vLrOMzFsj3qdJpjowrCW-69" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.75;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;exitX=0.459;exitY=0.998;exitDx=0;exitDy=0;exitPerimeter=0;" parent="1" source="zKFDF5UOk-7tD0-7yUJp-24" target="vLrOMzFsj3qdJpjowrCW-47" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="60" y="540" as="sourcePoint" />
<mxPoint x="110" y="490" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="vLrOMzFsj3qdJpjowrCW-70" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.483;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="vLrOMzFsj3qdJpjowrCW-47" target="zKFDF5UOk-7tD0-7yUJp-16" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="60" y="540" as="sourcePoint" />
<mxPoint x="570" y="830" as="targetPoint" />
<Array as="points">
<mxPoint x="399" y="840" />
<mxPoint x="560" y="840" />
<mxPoint x="560" y="325" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="vLrOMzFsj3qdJpjowrCW-71" value="" style="verticalLabelPosition=bottom;verticalAlign=top;html=1;shape=mxgraph.flowchart.or;" parent="1" vertex="1">
<mxGeometry x="130" y="555" width="50" height="50" as="geometry" />
</mxCell>
<mxCell id="vLrOMzFsj3qdJpjowrCW-73" value="Data not full usable" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" parent="1" vertex="1">
<mxGeometry x="10" y="565" width="130" height="30" as="geometry" />
</mxCell>
</root> </root>
</mxGraphModel> </mxGraphModel>
</diagram> </diagram>

Binary file not shown.

View File

@@ -4,6 +4,7 @@ from platformdirs import user_config_dir
from pathlib import Path from pathlib import Path
from PySide6.QtCore import QObject, Slot from PySide6.QtCore import QObject, Slot
from .Vermasseln import Vermasseln from .Vermasseln import Vermasseln
import shutil
class ConfigLoader(QObject): class ConfigLoader(QObject):
@@ -19,6 +20,12 @@ class ConfigLoader(QObject):
else: else:
config_dir.mkdir(0o750, True, True) config_dir.mkdir(0o750, True, True)
@Slot(str)
def importConfig(self, confile):
print(confile)
confile= confile.replace('file:///','')
shutil.copyfile(confile, self.config_dir+ '/pyqcrm.toml')
@Slot(dict) @Slot(dict)
def setConfig(self, app_config): def setConfig(self, app_config):
try: try: