added BusinessDAO
This commit is contained in:
@@ -3,6 +3,8 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Controls.Fusion
|
import QtQuick.Controls.Fusion
|
||||||
|
|
||||||
|
import "../js/qmldict.js" as JsLib
|
||||||
|
|
||||||
ColumnLayout
|
ColumnLayout
|
||||||
{
|
{
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@@ -17,6 +19,7 @@ ColumnLayout
|
|||||||
}
|
}
|
||||||
CheckBox
|
CheckBox
|
||||||
{
|
{
|
||||||
|
id: checkAddContact
|
||||||
text: qsTr("Ansprechpartner hinzufügen")
|
text: qsTr("Ansprechpartner hinzufügen")
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
checked: false
|
checked: false
|
||||||
@@ -30,6 +33,7 @@ ColumnLayout
|
|||||||
spacing: 45
|
spacing: 45
|
||||||
GridLayout
|
GridLayout
|
||||||
{
|
{
|
||||||
|
id: businessGrid
|
||||||
columns: 2
|
columns: 2
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
@@ -37,6 +41,7 @@ ColumnLayout
|
|||||||
|
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
|
id: lblFirmenName
|
||||||
text: qsTr("Firmenname")
|
text: qsTr("Firmenname")
|
||||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||||
}
|
}
|
||||||
@@ -46,6 +51,10 @@ ColumnLayout
|
|||||||
id: firmenName
|
id: firmenName
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
|
onTextChanged: isEmptyField()
|
||||||
|
placeholderText: "Pflichtfeld"
|
||||||
|
placeholderTextColor: "red"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Label
|
Label
|
||||||
@@ -58,6 +67,9 @@ ColumnLayout
|
|||||||
{
|
{
|
||||||
id: street
|
id: street
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
onTextChanged: isEmptyField()
|
||||||
|
placeholderText: "Pflichtfeld"
|
||||||
|
placeholderTextColor: "red"
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
@@ -67,8 +79,14 @@ ColumnLayout
|
|||||||
|
|
||||||
ComboBox
|
ComboBox
|
||||||
{
|
{
|
||||||
|
id: postcode
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
editable: true
|
editable: true
|
||||||
|
onCurrentTextChanged: isEmptyField()
|
||||||
|
onEditTextChanged: isEmptyField()
|
||||||
|
model: ["test", "test2", "test3"]
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Label
|
Label
|
||||||
@@ -78,8 +96,11 @@ ColumnLayout
|
|||||||
}
|
}
|
||||||
TextField
|
TextField
|
||||||
{
|
{
|
||||||
id: location
|
id: city
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
onTextChanged: isEmptyField(city)
|
||||||
|
placeholderText: "Pflichtfeld"
|
||||||
|
placeholderTextColor: "red"
|
||||||
}
|
}
|
||||||
|
|
||||||
Label
|
Label
|
||||||
@@ -137,10 +158,22 @@ ColumnLayout
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Typ")
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
|
}
|
||||||
|
ComboBox
|
||||||
|
{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
editable: true
|
||||||
|
|
||||||
|
}
|
||||||
|
Label
|
||||||
{
|
{
|
||||||
text: qsTr("Info")
|
text: qsTr("Info")
|
||||||
Layout.alignment: Qt.AlignRight | Qt.AlignTop
|
Layout.alignment: Qt.AlignRight | Qt.AlignTop
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollView
|
ScrollView
|
||||||
{
|
{
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@@ -213,6 +246,7 @@ ColumnLayout
|
|||||||
id: jobdescription
|
id: jobdescription
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
editable: true
|
editable: true
|
||||||
|
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
@@ -256,6 +290,7 @@ ColumnLayout
|
|||||||
id: rank
|
id: rank
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
editable: true
|
editable: true
|
||||||
|
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
@@ -267,6 +302,7 @@ ColumnLayout
|
|||||||
id: invoice
|
id: invoice
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
editable: true
|
editable: true
|
||||||
|
objectName: "combo"
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
@@ -278,6 +314,7 @@ ColumnLayout
|
|||||||
id: due
|
id: due
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
editable: true
|
editable: true
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -293,7 +330,13 @@ ColumnLayout
|
|||||||
}
|
}
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
|
id: saveBtn
|
||||||
text: qsTr("Speichern")
|
text: qsTr("Speichern")
|
||||||
|
enabled: false
|
||||||
|
onClicked:
|
||||||
|
{
|
||||||
|
JsLib.addBusiness(businessGrid)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -302,4 +345,20 @@ ColumnLayout
|
|||||||
id: spacer3
|
id: spacer3
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
}
|
}
|
||||||
|
function isEmptyField()
|
||||||
|
{
|
||||||
|
if (!firmenName.text.trim() || !street.text.trim() || !city.text.trim())
|
||||||
|
{
|
||||||
|
saveBtn.enabled = false
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!postcode.editText.trim() || !postcode.currentText)
|
||||||
|
saveBtn.enabled = false
|
||||||
|
else
|
||||||
|
saveBtn.enabled = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import QtQuick.Controls.Fusion
|
|||||||
|
|
||||||
Item {
|
Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
//color: "lightslategrey"
|
|
||||||
property var availableFilters: ["Name", "Adresse", "PLZ", "Ort"]
|
property var availableFilters: ["Name", "Adresse", "PLZ", "Ort"]
|
||||||
id: test
|
id: test
|
||||||
|
|
||||||
@@ -19,10 +18,8 @@ Item {
|
|||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
id: addBusinessBtn
|
id: addBusinessBtn
|
||||||
//icon.source: "../images/addbusiness.svg"
|
|
||||||
icon.source: "qrc:/images/addbusiness.svg"
|
icon.source: "qrc:/images/addbusiness.svg"
|
||||||
icon.color: "olive"
|
icon.color: "olive"
|
||||||
//width: icon.width
|
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
flat: true
|
flat: true
|
||||||
onClicked: appLoader.source = "AddCustomer.qml"
|
onClicked: appLoader.source = "AddCustomer.qml"
|
||||||
@@ -34,7 +31,6 @@ Item {
|
|||||||
id: tableColumn
|
id: tableColumn
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
|
|
||||||
top: searchBar.bottom
|
top: searchBar.bottom
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
left: parent.left
|
left: parent.left
|
||||||
@@ -43,10 +39,6 @@ Item {
|
|||||||
|
|
||||||
RowLayout
|
RowLayout
|
||||||
{
|
{
|
||||||
// Layout.fillHeight: true
|
|
||||||
// Layout.fillWidth: true
|
|
||||||
|
|
||||||
|
|
||||||
RadioButton
|
RadioButton
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -107,7 +99,6 @@ Item {
|
|||||||
{
|
{
|
||||||
//property var customWidths: [0.2, 0.5, 0.3, 05, 0.2, 0.2]
|
//property var customWidths: [0.2, 0.5, 0.3, 05, 0.2, 0.2]
|
||||||
property real newWidth: 0
|
property real newWidth: 0
|
||||||
|
|
||||||
id: testTable
|
id: testTable
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@@ -146,8 +137,6 @@ Item {
|
|||||||
repeat: false
|
repeat: false
|
||||||
onTriggered:
|
onTriggered:
|
||||||
{
|
{
|
||||||
//testTable.columnWidths[2] = 150
|
|
||||||
//console.log("Timing..")
|
|
||||||
testTable.forceLayout();
|
testTable.forceLayout();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -159,11 +148,7 @@ Item {
|
|||||||
required property bool selected
|
required property bool selected
|
||||||
required property bool current
|
required property bool current
|
||||||
implicitWidth: testTable.width / testTable.columns
|
implicitWidth: testTable.width / testTable.columns
|
||||||
//Layout.fillWidth: true
|
|
||||||
implicitHeight: 25
|
implicitHeight: 25
|
||||||
//border.color: "yellow"
|
|
||||||
//border.width: 1
|
|
||||||
//color: selected? "lightblue": palette.base
|
|
||||||
color: selected
|
color: selected
|
||||||
? addBusinessBtn.palette.highlight //palette.highlight
|
? addBusinessBtn.palette.highlight //palette.highlight
|
||||||
: (testTable.alternatingRows && row % 2 !== 0
|
: (testTable.alternatingRows && row % 2 !== 0
|
||||||
@@ -183,19 +168,13 @@ Item {
|
|||||||
|
|
||||||
MouseArea
|
MouseArea
|
||||||
{
|
{
|
||||||
id: mouseArea
|
|
||||||
property bool hovered: false
|
property bool hovered: false
|
||||||
|
id: mouseArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
|
||||||
|
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
bm.onRowClicked(row)
|
bm.onRowClicked(row)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
onEntered:
|
onEntered:
|
||||||
{
|
{
|
||||||
@@ -211,7 +190,6 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ Item
|
|||||||
{
|
{
|
||||||
if (firstStart.currentItem.name === "database")
|
if (firstStart.currentItem.name === "database")
|
||||||
{
|
{
|
||||||
pyqcrm_conf = Qmldict.func(submitBtn.grids)
|
pyqcrm_conf = Qmldict.firstConf(submitBtn.grids)
|
||||||
if (pyqcrm_conf)
|
if (pyqcrm_conf)
|
||||||
{
|
{
|
||||||
config.setConfig(pyqcrm_conf)
|
config.setConfig(pyqcrm_conf)
|
||||||
@@ -123,7 +123,7 @@ Item
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pyqcrm_conf = Qmldict.func(submitBtn.grids)
|
pyqcrm_conf = Qmldict.firstConf(submitBtn.grids)
|
||||||
if (pyqcrm_conf)
|
if (pyqcrm_conf)
|
||||||
{
|
{
|
||||||
admin = config.addAdminUser(pyqcrm_conf)
|
admin = config.addAdminUser(pyqcrm_conf)
|
||||||
|
|||||||
124
doc/.$Klassendiagramm.drawio.dtmp
Normal file
124
doc/.$Klassendiagramm.drawio.dtmp
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
<mxfile host="Electron" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/25.0.2 Chrome/128.0.6613.186 Electron/32.2.5 Safari/537.36" version="25.0.2">
|
||||||
|
<diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1">
|
||||||
|
<mxGraphModel dx="793" dy="1195" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
||||||
|
<root>
|
||||||
|
<mxCell id="WIyWlLk6GJQsqaUBKTNV-0" />
|
||||||
|
<mxCell id="WIyWlLk6GJQsqaUBKTNV-1" parent="WIyWlLk6GJQsqaUBKTNV-0" />
|
||||||
|
<mxCell id="_OjnZrDktrtFcgEA-KSX-13" value="Databasemanager" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||||
|
<mxGeometry x="50" y="40" width="170" height="90" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="_OjnZrDktrtFcgEA-KSX-14" value="<div>- connection</div><div><br></div>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="_OjnZrDktrtFcgEA-KSX-13" vertex="1">
|
||||||
|
<mxGeometry y="26" width="170" height="24" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="_OjnZrDktrtFcgEA-KSX-15" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;strokeColor=inherit;" parent="_OjnZrDktrtFcgEA-KSX-13" vertex="1">
|
||||||
|
<mxGeometry y="50" width="170" height="8" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="_OjnZrDktrtFcgEA-KSX-16" value="+ instance(): connection" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="_OjnZrDktrtFcgEA-KSX-13" vertex="1">
|
||||||
|
<mxGeometry y="58" width="170" height="32" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="_OjnZrDktrtFcgEA-KSX-38" value="BusinessDao" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||||
|
<mxGeometry x="50" y="240" width="160" height="166" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="_OjnZrDktrtFcgEA-KSX-42" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;strokeColor=inherit;" parent="_OjnZrDktrtFcgEA-KSX-38" vertex="1">
|
||||||
|
<mxGeometry y="26" width="160" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="_OjnZrDktrtFcgEA-KSX-41" value="<div><span style="background-color: initial;">+ getBusiness</span><span style="background-color: initial;">()</span></div><div><span style="background-color: initial;">+ addBusiness()</span></div><div>+ updateBusiness()</div><div>+ delBusiness()</div>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="_OjnZrDktrtFcgEA-KSX-38" vertex="1">
|
||||||
|
<mxGeometry y="66" width="160" height="100" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="_OjnZrDktrtFcgEA-KSX-43" value="BusinessModel" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||||
|
<mxGeometry x="280" y="238" width="160" height="170" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="_OjnZrDktrtFcgEA-KSX-45" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;strokeColor=inherit;connectable=1;allowArrows=1;recursiveResize=1;expand=0;" parent="_OjnZrDktrtFcgEA-KSX-43" vertex="1">
|
||||||
|
<mxGeometry y="26" width="160" height="54" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="_OjnZrDktrtFcgEA-KSX-46" value="- getData()<div>+ rowCount()</div><div>+ columnCount()</div><div>+ data()</div><div>+ headerData()</div>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="_OjnZrDktrtFcgEA-KSX-43" vertex="1">
|
||||||
|
<mxGeometry y="80" width="160" height="90" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="_OjnZrDktrtFcgEA-KSX-50" value="" style="endArrow=none;html=1;rounded=0;entryX=0.435;entryY=1.063;entryDx=0;entryDy=0;exitX=0.463;exitY=-0.027;exitDx=0;exitDy=0;exitPerimeter=0;entryPerimeter=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="_OjnZrDktrtFcgEA-KSX-38" target="_OjnZrDktrtFcgEA-KSX-16" edge="1">
|
||||||
|
<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="xjCWurhqpCHEkLAYqff9-0" value="PermissionDao" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||||
|
<mxGeometry x="1330" y="50" width="180" height="220" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="xjCWurhqpCHEkLAYqff9-1" value="<div>- id : int</div><div>- description : string</div>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="xjCWurhqpCHEkLAYqff9-0" vertex="1">
|
||||||
|
<mxGeometry y="26" width="180" height="64" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="xjCWurhqpCHEkLAYqff9-2" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;strokeColor=inherit;" parent="xjCWurhqpCHEkLAYqff9-0" vertex="1">
|
||||||
|
<mxGeometry y="90" width="180" height="8" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="xjCWurhqpCHEkLAYqff9-3" value="<div>+ getPermissions(User)</div><div>+ getPermission()</div><div>+ grantPermission()</div><div>+ setPermission()</div><div>+ revokePermission()</div><div>+ savePermission()</div>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="xjCWurhqpCHEkLAYqff9-0" vertex="1">
|
||||||
|
<mxGeometry y="98" width="180" height="122" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Yrs2Ar6oVTmmq3gZQ8Z4-12" value="User" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||||
|
<mxGeometry x="827" y="50" width="280" height="270" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Yrs2Ar6oVTmmq3gZQ8Z4-13" value="- username : string<div>- password : string</div><div>- roleids : roleenum [ ]</div><div>- gecos : string</div><div>- enabled : bool</div>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="Yrs2Ar6oVTmmq3gZQ8Z4-12" vertex="1">
|
||||||
|
<mxGeometry y="26" width="280" height="84" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Yrs2Ar6oVTmmq3gZQ8Z4-14" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;strokeColor=inherit;" parent="Yrs2Ar6oVTmmq3gZQ8Z4-12" vertex="1">
|
||||||
|
<mxGeometry y="110" width="280" height="8" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Yrs2Ar6oVTmmq3gZQ8Z4-15" value="+ getRole()<div>+ setRole()</div><div>+ changePassword(oldpassword, newpassword)</div><div>+ getUsername()</div><div>+ getPassword()</div><div>+ getGecos()</div><div>(+ createRole(superuser, admin)????</div><div><br></div><div><br></div>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="Yrs2Ar6oVTmmq3gZQ8Z4-12" vertex="1">
|
||||||
|
<mxGeometry y="118" width="280" height="152" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Yrs2Ar6oVTmmq3gZQ8Z4-18" value="UserRoles" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||||
|
<mxGeometry x="450" y="475" width="160" height="220" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Yrs2Ar6oVTmmq3gZQ8Z4-19" value="+ userrole : Role[ ]" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="Yrs2Ar6oVTmmq3gZQ8Z4-18" vertex="1">
|
||||||
|
<mxGeometry y="26" width="160" height="44" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Yrs2Ar6oVTmmq3gZQ8Z4-20" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;strokeColor=inherit;" parent="Yrs2Ar6oVTmmq3gZQ8Z4-18" vertex="1">
|
||||||
|
<mxGeometry y="70" width="160" height="8" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Yrs2Ar6oVTmmq3gZQ8Z4-21" value="+ method(type): type" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="Yrs2Ar6oVTmmq3gZQ8Z4-18" vertex="1">
|
||||||
|
<mxGeometry y="78" width="160" height="142" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Yrs2Ar6oVTmmq3gZQ8Z4-22" value="Role" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||||
|
<mxGeometry x="827" y="430" width="230" height="220" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Yrs2Ar6oVTmmq3gZQ8Z4-23" value="- roletype : string<div>- permissionids : permissionenmum [ ]</div><div>&nbsp;</div>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="Yrs2Ar6oVTmmq3gZQ8Z4-22" vertex="1">
|
||||||
|
<mxGeometry y="26" width="230" height="64" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Yrs2Ar6oVTmmq3gZQ8Z4-24" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;strokeColor=inherit;" parent="Yrs2Ar6oVTmmq3gZQ8Z4-22" vertex="1">
|
||||||
|
<mxGeometry y="90" width="230" height="8" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Yrs2Ar6oVTmmq3gZQ8Z4-25" value="+ getPermission()<div>+ setPermission(superuser, admin)</div><div><br></div><div>+ getRoletype()</div><div>+ setRoletype(superuser, admin)<br><div><br></div></div>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="Yrs2Ar6oVTmmq3gZQ8Z4-22" vertex="1">
|
||||||
|
<mxGeometry y="98" width="230" height="122" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Yrs2Ar6oVTmmq3gZQ8Z4-27" value="Permission" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||||
|
<mxGeometry x="1280" y="430" width="220" height="230" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Yrs2Ar6oVTmmq3gZQ8Z4-28" value="- permissions : permissionenmum [ ]" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="Yrs2Ar6oVTmmq3gZQ8Z4-27" vertex="1">
|
||||||
|
<mxGeometry y="26" width="220" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Yrs2Ar6oVTmmq3gZQ8Z4-29" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;strokeColor=inherit;" parent="Yrs2Ar6oVTmmq3gZQ8Z4-27" vertex="1">
|
||||||
|
<mxGeometry y="52" width="220" height="8" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Yrs2Ar6oVTmmq3gZQ8Z4-30" value="+ method(type): type" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="Yrs2Ar6oVTmmq3gZQ8Z4-27" vertex="1">
|
||||||
|
<mxGeometry y="60" width="220" height="170" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Yrs2Ar6oVTmmq3gZQ8Z4-31" value="" style="endArrow=none;html=1;rounded=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" edge="1">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="210" y="270" as="sourcePoint" />
|
||||||
|
<mxPoint x="280" y="270" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Yrs2Ar6oVTmmq3gZQ8Z4-42" value="" style="endArrow=diamondThin;endFill=0;endSize=24;html=1;rounded=0;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1.013;entryY=0.385;entryDx=0;entryDy=0;entryPerimeter=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Yrs2Ar6oVTmmq3gZQ8Z4-30" target="Yrs2Ar6oVTmmq3gZQ8Z4-25" edge="1">
|
||||||
|
<mxGeometry width="160" relative="1" as="geometry">
|
||||||
|
<mxPoint x="870" y="690" as="sourcePoint" />
|
||||||
|
<mxPoint x="1090" y="570" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Yrs2Ar6oVTmmq3gZQ8Z4-44" value="" style="endArrow=diamondThin;endFill=0;endSize=24;html=1;rounded=0;exitX=0.535;exitY=-0.018;exitDx=0;exitDy=0;exitPerimeter=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Yrs2Ar6oVTmmq3gZQ8Z4-22" edge="1">
|
||||||
|
<mxGeometry width="160" relative="1" as="geometry">
|
||||||
|
<mxPoint x="897" y="370" as="sourcePoint" />
|
||||||
|
<mxPoint x="950" y="321" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
</root>
|
||||||
|
</mxGraphModel>
|
||||||
|
</diagram>
|
||||||
|
</mxfile>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
.pragma library
|
.pragma library
|
||||||
|
|
||||||
function func(tabs)
|
function firstConf(tabs)
|
||||||
{
|
{
|
||||||
let pyqcrm_conf = {};
|
let pyqcrm_conf = {};
|
||||||
|
|
||||||
@@ -18,7 +18,26 @@ function func(tabs)
|
|||||||
return pyqcrm_conf
|
return pyqcrm_conf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function addBusiness(form)
|
||||||
|
{
|
||||||
|
let business_form = {};
|
||||||
|
for (var i = 0; i < form.children.length; i++)
|
||||||
|
if (form.children[i].toString().startsWith("Combo"))
|
||||||
|
{
|
||||||
|
if(form.children[i].editText)
|
||||||
|
{
|
||||||
|
console.log(form.children[i].editText)
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
console.log(form.children[i].currentText)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (form.children[i].toString().startsWith("TextField"))
|
||||||
|
{
|
||||||
|
console.log(form.children[i].text)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
15
lib/DB/BusinessDAO.py
Normal file
15
lib/DB/BusinessDAO.py
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
from .DbManager import DbManager
|
||||||
|
|
||||||
|
|
||||||
|
class BusinessDAO:
|
||||||
|
def __init__(self):
|
||||||
|
self.__con = DbManager().getConnection()
|
||||||
|
self.__cur = self.__con.cursor()
|
||||||
|
|
||||||
|
def getBusiness(self):
|
||||||
|
self.__cur.callproc("getCustomerView")
|
||||||
|
self.__all_cols = [desc[0] for desc in self.__cur.description]
|
||||||
|
return self.__cur.fetchall(), self.__all_cols
|
||||||
|
|
||||||
|
def addBusiness(self):
|
||||||
|
pass
|
||||||
@@ -1,45 +1,74 @@
|
|||||||
# This Python file uses the following encoding: utf-8
|
# This Python file uses the following encoding: utf-8
|
||||||
from PySide6.QtCore import QAbstractTableModel, QModelIndex, Qt, Slot
|
from PySide6.QtCore import QAbstractTableModel, QModelIndex, Qt, Slot
|
||||||
|
from .BusinessDAO import BusinessDAO
|
||||||
|
|
||||||
|
# USERS TABLE
|
||||||
|
# CUSTOMER_COLUMN_NAMES = \
|
||||||
|
# {
|
||||||
|
# "userid": "Identification",
|
||||||
|
# "username": "Benutzername",
|
||||||
|
# "password": "Passwort",
|
||||||
|
# "enabled": "Aktiv",
|
||||||
|
# "roleid": "Rolle",
|
||||||
|
# "gecos": "Information"
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# CUSTOMER_COLUMN_INDEX = \
|
||||||
|
# {
|
||||||
|
# "userid": 0,
|
||||||
|
# "username": 1,
|
||||||
|
# "password": 2,
|
||||||
|
# "enabled": 3,
|
||||||
|
# "roleid": 4,
|
||||||
|
# "gecos": 5
|
||||||
|
# }
|
||||||
|
#######################################
|
||||||
|
|
||||||
|
|
||||||
CUSTOMER_COLUMN_NAMES = \
|
# COLS = \
|
||||||
{
|
# {
|
||||||
"userid": "Identification",
|
# "businessid": "Kundennummer",
|
||||||
"username": "Benutzername",
|
# "company": "Firma",
|
||||||
"password": "Passwort",
|
# "street": "Straße",
|
||||||
"enabled": "Aktiv",
|
# "postcodeid": "PLZ",
|
||||||
"roleid": "Rolle",
|
# "phone": "Telefon",
|
||||||
"gecos": "Information"
|
# "mobilephone": "Mobil",
|
||||||
}
|
# "email": "E-Mail",
|
||||||
|
# "homepage": "Homepage",
|
||||||
|
# "director": "Geschäftsführer",
|
||||||
|
# "contactpersonid": "Ansprechpartner",
|
||||||
|
# "info": "Info",
|
||||||
|
# "btid": "Typ",
|
||||||
|
# }
|
||||||
|
|
||||||
|
# COLS_INDEX = \
|
||||||
|
# {
|
||||||
|
# "businessid": 0,
|
||||||
|
# "company": 1,
|
||||||
|
# "street": 2,
|
||||||
|
# "postcodeid": 3,
|
||||||
|
# "phone": 4,
|
||||||
|
# "mobilephone": 5,
|
||||||
|
# "email": 6,
|
||||||
|
# "homepage": 7,
|
||||||
|
# "director": 8,
|
||||||
|
# "contactpersonid": 9,
|
||||||
|
# "info": 10,
|
||||||
|
# "btid": 11,
|
||||||
|
# }
|
||||||
|
|
||||||
|
|
||||||
CUSTOMER_COLUMN_INDEX = \
|
|
||||||
{
|
|
||||||
"userid": 0,
|
|
||||||
"username": 1,
|
|
||||||
"password": 2,
|
|
||||||
"enabled": 3,
|
|
||||||
"roleid": 4,
|
|
||||||
"gecos": 5
|
|
||||||
}
|
|
||||||
|
|
||||||
class BusinessModel(QAbstractTableModel):
|
class BusinessModel(QAbstractTableModel):
|
||||||
__visible_index = {}
|
__visible_index = {}
|
||||||
__col_name = ""
|
__col_name = ""
|
||||||
|
|
||||||
def __init__(self, con, cols):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.__con = con
|
|
||||||
self.__visible_columns = cols
|
|
||||||
self.__data = self.__getData()
|
self.__data = self.__getData()
|
||||||
for col in cols:
|
|
||||||
self.__visible_index[col] = CUSTOMER_COLUMN_INDEX[col]
|
|
||||||
|
|
||||||
def __getData(self):
|
def __getData(self):
|
||||||
cursor = self.__con.cursor()
|
rows, self.__visible_columns = BusinessDAO().getBusiness()
|
||||||
cursor.execute("SELECT * FROM users")
|
|
||||||
self.__all_cols = [desc[0] for desc in cursor.description]
|
|
||||||
#print(self.__all_cols)
|
|
||||||
rows = cursor.fetchall()
|
|
||||||
return rows
|
return rows
|
||||||
|
|
||||||
def rowCount(self, parent= QModelIndex()):
|
def rowCount(self, parent= QModelIndex()):
|
||||||
@@ -51,29 +80,35 @@ class BusinessModel(QAbstractTableModel):
|
|||||||
def data(self, index, role= Qt.DisplayRole):
|
def data(self, index, role= Qt.DisplayRole):
|
||||||
if role == Qt.DisplayRole:
|
if role == Qt.DisplayRole:
|
||||||
row = self.__data[index.row()]
|
row = self.__data[index.row()]
|
||||||
self.__col_name = self.__visible_columns[index.column()]
|
return row[index.column()]
|
||||||
col_index = self.__visible_index[self.__col_name]
|
|
||||||
return row[col_index]
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def headerData(self, section, orientation, role= Qt.DisplayRole):
|
def headerData(self, section, orientation, role= Qt.DisplayRole):
|
||||||
if orientation == Qt.Horizontal and role ==Qt.DisplayRole:
|
if orientation == Qt.Horizontal and role ==Qt.DisplayRole:
|
||||||
self.__col_name = self.__visible_columns[section]
|
self.__col_name = self.__visible_columns[section]
|
||||||
return CUSTOMER_COLUMN_NAMES.get(self.__col_name, self.__col_name)
|
return self.__col_name
|
||||||
return super().headerData(section, orientation, role)
|
return super().headerData(section, orientation, role)
|
||||||
|
|
||||||
@Slot(dict)
|
########################NOT READY#################################
|
||||||
def setVisibleColumns(self, cols):
|
# @Slot(dict)
|
||||||
self.__visible_columns.clear()
|
# def setVisibleColumns(self, cols):
|
||||||
self.__visible_index.clear()
|
# self.__visible_columns.clear()
|
||||||
for col, val in cols.items():
|
# self.__visible_index.clear()
|
||||||
self.__visible_index[val] = CUSTOMER_COLUMN_INDEX[cols[col]]
|
# for col, val in cols.items():
|
||||||
self.__visible_columns.append(cols[col])
|
# self.__visible_index[val] = COLS_INDEX[cols[col]]
|
||||||
# self.headerDataChanged.emit()
|
# self.__visible_columns.append(cols[col])
|
||||||
# self.dataChanged.emit()
|
# # self.headerDataChanged.emit()
|
||||||
self.layoutChanged.emit()
|
# # self.dataChanged.emit()
|
||||||
|
# self.layoutChanged.emit()
|
||||||
|
#################################################################
|
||||||
|
|
||||||
@Slot(int)
|
@Slot(int)
|
||||||
def onRowClicked(self, row):
|
def onRowClicked(self, row):
|
||||||
print(row)
|
print(row)
|
||||||
|
|
||||||
|
@Slot(dict)
|
||||||
|
def addBusiness(self, business):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
2
main.py
2
main.py
@@ -52,7 +52,7 @@ if __name__ == "__main__":
|
|||||||
else:
|
else:
|
||||||
dbconf = config.getConfig()['database']
|
dbconf = config.getConfig()['database']
|
||||||
DbManager(dbconf)
|
DbManager(dbconf)
|
||||||
bm = BusinessModel(DbManager().getConnection(), ["roleid", "username", "gecos"])
|
bm = BusinessModel()
|
||||||
user = UserManager()
|
user = UserManager()
|
||||||
|
|
||||||
#print(con is con2)
|
#print(con is con2)
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
"Gui/DbConfiguration.qml",
|
"Gui/DbConfiguration.qml",
|
||||||
"lib/DB/UserManager.py",
|
"lib/DB/UserManager.py",
|
||||||
"lib/PyqcrmFlags.py",
|
"lib/PyqcrmFlags.py",
|
||||||
"lib/DB/UserDAO.py"
|
"lib/DB/UserDAO.py",
|
||||||
|
"lib/DB/BusinessDAO.py"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
34262
rc_pyqcrm.py
34262
rc_pyqcrm.py
File diff suppressed because it is too large
Load Diff
334
rc_qml.py
334
rc_qml.py
@@ -1,334 +0,0 @@
|
|||||||
# Resource object code (Python 3)
|
|
||||||
# Created by: object code
|
|
||||||
# Created by: The Resource Compiler for Qt version 6.8.0
|
|
||||||
# WARNING! All changes made in this file will be lost!
|
|
||||||
|
|
||||||
from PySide6 import QtCore
|
|
||||||
|
|
||||||
qt_resource_data = b"\
|
|
||||||
\x00\x00\x01\xd8\
|
|
||||||
\x00\
|
|
||||||
\x00\x06lx\xda\xb5TM\x8f\xd30\x10\xbdW\xea\x7f\
|
|
||||||
\xb0r\x02!\xa5\x8b\x10\x07\x22q\xa0]\x0e\x88]U\
|
|
||||||
\x8b*qv\xeci\xe2\xad\xe3I\xc7\x13\xca\x0a\xed\x7f\
|
|
||||||
\xc7\x89\xbbM\xd8\xa2lV\x0b>Dy\xf3\xf1\xfc\xe6\
|
|
||||||
\xd9\xb2\xa9j$\x167|\xd3\x18\xb5\x9b\xcf\xcc\x1f8\
|
|
||||||
]\xa1cB\xeb\xcf\x12W\xf2\x0e\x1b\x0e\xf1\xf9\xec\x1b\
|
|
||||||
\x1e\x22\x9a\xcf~\xcdg\x22,\xa33\xc1X/%E\
|
|
||||||
\xeck\xa9\x8c+2q\x11q\x09\xa6(9\x13\xef\xde\
|
|
||||||
G|0\x9a\xcbL\xd4\x92\xc0q\xda\xa1\x98\x90N\x95\
|
|
||||||
H>\x82#y\xbb\x02\xf9\xa9<\xfc\xf7\x09\x0b[>\
|
|
||||||
eZ\xd0\x0a\x8c\xe9\xfb\x87\x9fe\xc3\x8c\xee\x8c\xb3\x15\
|
|
||||||
\xad\xa5/\x97(I\xf7\xe1\xad\x95\x81\x91\xa9\x81\xc1\xf6\
|
|
||||||
\xf03\xc4\xf6~C\xaf\x92\xcb\xd0\x92\xb7-\xc9\xeb\x01\
|
|
||||||
WU[\xa3\x0c\x7f\x8f\x83\x9dh\xd3\x87D\xebk\x90\
|
|
||||||
\xd8\xe5\xc5\x1b\xf1\xf6\xa2\xefE\xb7\x0a%;\xd0Y\x1f\
|
|
||||||
\x1b\xc8\xecl\xa9\xeb+\x94\x1a(\xf5\xd8\x90\x02\xf1Q\
|
|
||||||
\xf4:\xd2}e\x93\xbe\xfe\xfe9\xf3\xef\x1a\xa7\xc1M\
|
|
||||||
\x1f\xfekW?2y$\xfcGc/\x16b\xb3\xbe\
|
|
||||||
\x5cg\xe1\xfe\x10\x88\x03\x08_bc\xb5P\xd2Z\xc1\
|
|
||||||
%\x88\x0a5\xd8\xa7\xadZ5\x9e\xb1\x02\xda\xc8\xdc\x82\
|
|
||||||
?\xf7k\xaa[\x98\xdf\xc2\x8e\xa7\xbb\xb5\xee\xeaG\xdc\
|
|
||||||
\x8a\x84cnM\x17W\x19\x96\x94\x83a\xa0\xe9\x0a\xaf\
|
|
||||||
\xfb\xa6\x11\x99\x03\xea\xffx\xa1?\x07f\xbc\x83\x97\x1e\
|
|
||||||
\x92\xcc\x09T\xe9\x1aWL\xb7\xe1\xd3\xa9g\xc4\x85\x9e\
|
|
||||||
\xf8)\x13N2\xbf0T\x7f\x15Y\xb6/\xe4\xf0\xa0\
|
|
||||||
\xe2\x83\x9an\x8d\xb5\xc7\xedz\xb5\x93\xa6fy\x8b~\
|
|
||||||
\x10S\xe8\x8e\xdef\x22\xd9\x93\xca\x16\xa6\x92\x05\xf8E\
|
|
||||||
\x05\xaeI\xfd\x8f\x22yT\xac\xd0\x22\x85Z\x02\x9d\x8c\
|
|
||||||
;w\xd4J\xed\x9b~-\xa90.\x13\x1f\x1e\xbd\xbb\
|
|
||||||
\xdd\xe77x;\xb3\xff\
|
|
||||||
\x00\x00\x03Y\
|
|
||||||
i\
|
|
||||||
mport QtQuick\x0d\x0ai\
|
|
||||||
mport QtQuick.Co\
|
|
||||||
ntrols\x0d\x0aimport Q\
|
|
||||||
tQuick.Layouts\x0d\x0a\
|
|
||||||
\x0d\x0aGridLayout\x0d\x0a{\x0d\
|
|
||||||
\x0a id: passEnc\
|
|
||||||
ryptKeyGrid\x0d\x0a \
|
|
||||||
columns: 2\x0d\x0a \
|
|
||||||
columnSpacing: \
|
|
||||||
5\x0d\x0a rowSpacin\
|
|
||||||
g: 9\x0d\x0a // anc\
|
|
||||||
hors.fill: paren\
|
|
||||||
t\x0d\x0a\x0d\x0a propert\
|
|
||||||
y string name: \x22\
|
|
||||||
pyqcrm\x22\x0d\x0a\x0d\x0a L\
|
|
||||||
abel\x0d\x0a {\x0d\x0a \
|
|
||||||
text: qsTr(\
|
|
||||||
\x22Encryption Key \
|
|
||||||
eingeben\x22)\x0d\x0a \
|
|
||||||
font.pixelSi\
|
|
||||||
ze: 40\x0d\x0a \
|
|
||||||
Layout.columnSpa\
|
|
||||||
n: 2\x0d\x0a La\
|
|
||||||
yout.alignment: \
|
|
||||||
Qt.AlignHCenter\x0d\
|
|
||||||
\x0a padding\
|
|
||||||
: 15\x0d\x0a }\x0d\x0a\x0d\x0a\x0d\
|
|
||||||
\x0a Label\x0d\x0a \
|
|
||||||
{\x0d\x0a text:\
|
|
||||||
qsTr(\x22Encryptio\
|
|
||||||
n Key:\x22)\x0d\x0a \
|
|
||||||
Layout.alignme\
|
|
||||||
nt: Qt.AlignRigh\
|
|
||||||
t\x0d\x0a }\x0d\x0a\x0d\x0a \
|
|
||||||
TextField\x0d\x0a {\
|
|
||||||
\x0d\x0a id: pa\
|
|
||||||
ssEncryptKey\x0d\x0a \
|
|
||||||
placeholde\
|
|
||||||
rText: qsTr(\x22Hie\
|
|
||||||
r Encryption Key\
|
|
||||||
eingeben\x22)\x0d\x0a \
|
|
||||||
Layout.fill\
|
|
||||||
Width: true\x0d\x0a \
|
|
||||||
height: 3\x0d\x0a\
|
|
||||||
echoMode\
|
|
||||||
: TextInput.Pass\
|
|
||||||
word\x0d\x0a pr\
|
|
||||||
operty string na\
|
|
||||||
me: \x22ENCRYPT_KEY\
|
|
||||||
\x22\x0d\x0a }\x0d\x0a\x0d\x0a \
|
|
||||||
Item\x0d\x0a {\x0d\x0a \
|
|
||||||
Layout.fill\
|
|
||||||
Height: true\x0d\x0a \
|
|
||||||
}\x0d\x0a}\x0d\x0a\
|
|
||||||
\x00\x00\x01&\
|
|
||||||
i\
|
|
||||||
mport QtQuick\x0d\x0ai\
|
|
||||||
mport QtQuick.Co\
|
|
||||||
ntrols\x0d\x0a\x0d\x0aItem\x0d\x0a\
|
|
||||||
{\x0d\x0a anchors.f\
|
|
||||||
ill: parent\x0d\x0a \
|
|
||||||
Label\x0d\x0a {\x0d\x0a \
|
|
||||||
text: qsT\
|
|
||||||
r (\x22Login\x22)\x0d\x0a \
|
|
||||||
font.pixelS\
|
|
||||||
ize: 49\x0d\x0a }\x0d\x0a\
|
|
||||||
TextField\x0d\x0a \
|
|
||||||
{\x0d\x0a te\
|
|
||||||
xt: qsTr (\x22Benu\
|
|
||||||
tzername\x22)\x0d\x0a \
|
|
||||||
}\x0d\x0a TextField\
|
|
||||||
\x0d\x0a {\x0d\x0a \
|
|
||||||
text: qsTr (\x22P\
|
|
||||||
asswort\x22)\x0d\x0a }\
|
|
||||||
\x0d\x0a}\x0d\x0a\
|
|
||||||
\x00\x00\x00#\
|
|
||||||
m\
|
|
||||||
odule gui\x0d\x0aTopBa\
|
|
||||||
r 1.0 TopBar.qml\
|
|
||||||
\x0d\x0a\
|
|
||||||
\x00\x00\x02\x06\
|
|
||||||
\x00\
|
|
||||||
\x00\x07\xf8x\xda\xb5\x94Ms\xda0\x10\x86\xef\xcc\xf0\
|
|
||||||
\x1f4>\xb5\x87\x924\xad3S\xe7\x04\x09\xad\x99\xc9\
|
|
||||||
\x07`\x92\x1e;\xb2\xb5\x80&\xb2\xe4J\xeb\xe6k\xf8\
|
|
||||||
\xef\x95b\x83\x9d\xba\x9d\x1a\x06l\x1f\xb4\xab\xd5\xee\xbb\
|
|
||||||
\x8f%\xf14S\x1a\xc9\x04'9O\xee\xbb\x1d\xfe\xc6\
|
|
||||||
\xee\x9d+\x89Z\x09\xd3\x98\xb8\xa4O*G\xebw\xef\
|
|
||||||
7\xcdY\xe1\xe8v^\xba\x1db\x9f\xa3#\x92i\x95\
|
|
||||||
\x81\xc6'B\x05\xa7\x86\xcc\xb96\x18!\xd5\x18\xd4\xc6\
|
|
||||||
ni\xb1\x82\xb3\x80\xb0\xb8\xb2\x13%\xf2T\x9a\x80\x9c\
|
|
||||||
\xd4\xed(\xa3\x09\x97\x8b\x80\xf8\x85W\xab\x87\x8d\xeb\x8b\
|
|
||||||
\xd3\xe2\x9c\x9b\xca\x06\xb5\x9d!\x92\xa6\x10\x10\x8fQ\xa4\
|
|
||||||
15\xe0\xad\xe3.i\x0c\xa2\x18\x96\xb2\xdd\x83\xf0h\
|
|
||||||
%\xfe43\xfd\xce\xbb\xa0\x082\xa6\xf2\x9e\x0c\xb94\
|
|
||||||
\x08B\xe4r\x01\xd2{_\x85\xcf-\xa2^\xc6\x1fA\
|
|
||||||
D\xfc\xd9\x96\xf9|\x5c\xcd\x15Pz\x1b\xe9r\xd3M\
|
|
||||||
m\xd6\xe2Y\xc8\x14\xa4-:\xc1^\xdfY\xe1\xb95\
|
|
||||||
AW\xa1\x19e\xec\xb5\xc7\x8fe\xdf\xab\x82|\xcb.\
|
|
||||||
\x06\x1fBe0\xa8\xcb\xfew\xf1)_,q\x9d|\
|
|
||||||
\xb5\x1e\xccl\xbe\xaf\x1c\x04kT*~\x9c+P\xd3\
|
|
||||||
+h\x02K%\x18\xe8YMH\xc8A\x13\x17I\xc0\
|
|
||||||
v\x03\xf1[\x92\xa5\xa49\x17\xe2;g\xb8\x0c\x08\xea\
|
|
||||||
\x1cjI\xff\xfe[/\x06?\xc2\x9bh\xe6\xfd!\xb8\
|
|
||||||
\x15\x96\xb1\xdd\xd3\xdba\xd9\x0a\x8aK\xdf\x0eJ\xa9e\
|
|
||||||
'.\xbf\xacZ\xbb\xb7\x95\x0e\xc8H\xe2\xdd\xdaz\x89\
|
|
||||||
\x15\xa2J\xed\x9e9>\xf1\xcf\x08\xaa, \xa7\xbe\xff\
|
|
||||||
\xc9?[\xb5a:\xbe\x99\xee\xc6\xf4\xda\xa58\x1cS\
|
|
||||||
\x97\xbe5S\x17\xbc\xe7\xbdv\xdd\xbf\x1a\xee\xc4e\x00\
|
|
||||||
2\xc7g\xd0\xf2\xb0|n\x0d\xe8\xad\x18\xd5u\xed\x99\
|
|
||||||
\xd5m4\x9cz\x8d\xab\xa4\xdd\xc9\xa4\xc6<\x1c\xf8t\
|
|
||||||
\x16%X\xe5\x87d\xa9\xae\x14\xb3\xea\xdd\xda\x91\xccl\
|
|
||||||
\xb1f\xd4\xff\xceq\xa9|\xcf,\xc7\xfd(\xf2\x1a\x97\
|
|
||||||
\xff\x08!m\xb4W+\x12\x82\x03S\xafb\x17\xdb\xef\
|
|
||||||
7h\x023#\
|
|
||||||
\x00\x00\x07\x0f\
|
|
||||||
i\
|
|
||||||
mport QtQuick\x0d\x0ai\
|
|
||||||
mport QtQuick.Co\
|
|
||||||
ntrols\x0d\x0aimport Q\
|
|
||||||
tQuick.Layouts\x0d\x0a\
|
|
||||||
\x0d\x0aGridLayout\x0d\x0a{\x0d\
|
|
||||||
\x0a id: createU\
|
|
||||||
serGrid\x0d\x0a col\
|
|
||||||
umns: 2\x0d\x0a col\
|
|
||||||
umnSpacing: 5\x0d\x0a \
|
|
||||||
rowSpacing: 9\
|
|
||||||
\x0d\x0a // anchors\
|
|
||||||
.fill: parent\x0d\x0a\x0d\
|
|
||||||
\x0a property st\
|
|
||||||
ring name: \x22user\
|
|
||||||
\x22\x0d\x0a\x0d\x0a Label\x0d\x0a\
|
|
||||||
{\x0d\x0a t\
|
|
||||||
ext: qsTr(\x22Admin\
|
|
||||||
User erstellen\x22\
|
|
||||||
)\x0d\x0a font.\
|
|
||||||
pixelSize: 40\x0d\x0a \
|
|
||||||
Layout.co\
|
|
||||||
lumnSpan: 2\x0d\x0a \
|
|
||||||
Layout.alig\
|
|
||||||
nment: Qt.AlignH\
|
|
||||||
Center\x0d\x0a \
|
|
||||||
padding: 15\x0d\x0a \
|
|
||||||
}\x0d\x0a\x0d\x0a\x0d\x0a Labe\
|
|
||||||
l\x0d\x0a {\x0d\x0a \
|
|
||||||
id: benutzerNa\
|
|
||||||
melabel\x0d\x0a \
|
|
||||||
text: qsTr(\x22Ben\
|
|
||||||
utzername:\x22)\x0d\x0a \
|
|
||||||
Layout.ali\
|
|
||||||
gnment: Qt.Align\
|
|
||||||
Right\x0d\x0a }\x0d\x0a\x0d\x0a\
|
|
||||||
TextField\x0d\x0a \
|
|
||||||
{\x0d\x0a id\
|
|
||||||
: benutzerName\x0d\x0a\
|
|
||||||
placehol\
|
|
||||||
derText: qsTr(\x22H\
|
|
||||||
ier Benutzername\
|
|
||||||
eingeben\x22)\x0d\x0a \
|
|
||||||
Layout.fill\
|
|
||||||
Width: true\x0d\x0a \
|
|
||||||
height: 3\x0d\x0a\
|
|
||||||
property\
|
|
||||||
string name: \x22P\
|
|
||||||
YQCRM_USER\x22\x0d\x0a \
|
|
||||||
}\x0d\x0a\x0d\x0a Label\x0d\
|
|
||||||
\x0a {\x0d\x0a \
|
|
||||||
text: qsTr(\x22Pass\
|
|
||||||
wort:\x22)\x0d\x0a \
|
|
||||||
Layout.alignmen\
|
|
||||||
t: Qt.AlignRight\
|
|
||||||
\x0d\x0a }\x0d\x0a\x0d\x0a T\
|
|
||||||
extField\x0d\x0a {\x0d\
|
|
||||||
\x0a id: pas\
|
|
||||||
sword\x0d\x0a e\
|
|
||||||
choMode: TextInp\
|
|
||||||
ut.Password\x0d\x0a \
|
|
||||||
placeholder\
|
|
||||||
Text: qsTr(\x22Hier\
|
|
||||||
Passwort eingeb\
|
|
||||||
en\x22)\x0d\x0a La\
|
|
||||||
yout.fillWidth: \
|
|
||||||
true\x0d\x0a pr\
|
|
||||||
operty string na\
|
|
||||||
me: \x22PYQCRM_USER\
|
|
||||||
_PASS\x22\x0d\x0a }\x0d\x0a \
|
|
||||||
Label\x0d\x0a {\x0d\
|
|
||||||
\x0a text: q\
|
|
||||||
sTr(\x22Info:\x22)\x0d\x0a \
|
|
||||||
Layout.ali\
|
|
||||||
gnment: Qt.Align\
|
|
||||||
Right\x0d\x0a }\x0d\x0a\x0d\x0a\
|
|
||||||
TextField\x0d\x0a \
|
|
||||||
{\x0d\x0a id\
|
|
||||||
: gecos\x0d\x0a \
|
|
||||||
placeholderText\
|
|
||||||
: qsTr(\x22Zus\xc3\xa4tzl\
|
|
||||||
iche Info\x22)\x0d\x0a \
|
|
||||||
Layout.fill\
|
|
||||||
Width: true\x0d\x0a \
|
|
||||||
property st\
|
|
||||||
ring name: \x22PYQC\
|
|
||||||
RM_USER_INFO\x22\x0d\x0a \
|
|
||||||
}\x0d\x0a\x0d\x0a Item\
|
|
||||||
\x0d\x0a {\x0d\x0a \
|
|
||||||
Layout.fillHeig\
|
|
||||||
ht: true\x0d\x0a }\x0d\
|
|
||||||
\x0a Component.o\
|
|
||||||
nCompleted:\x0d\x0a \
|
|
||||||
{\x0d\x0a conf\
|
|
||||||
ig.usernameNotAv\
|
|
||||||
ailable.connect(\
|
|
||||||
usernameNotAvail\
|
|
||||||
able)\x0d\x0a }\x0d\x0a \
|
|
||||||
function usern\
|
|
||||||
ameNotAvailable(\
|
|
||||||
)\x0d\x0a {\x0d\x0a \
|
|
||||||
benutzerName.p\
|
|
||||||
laceholderText =\
|
|
||||||
qsTr (\x22Benutzer\
|
|
||||||
name ist bereits\
|
|
||||||
vergeben\x22)\x0d\x0a \
|
|
||||||
benutzerNam\
|
|
||||||
e.clear()\x0d\x0a \
|
|
||||||
benutzerNamel\
|
|
||||||
abel.color = \x22re\
|
|
||||||
d\x22\x0d\x0a benu\
|
|
||||||
tzerNamelabel.fo\
|
|
||||||
nt.bold = true\x0d\x0a\
|
|
||||||
}\x0d\x0a}\x0d\x0a\x0d\x0a\x0d\x0a\
|
|
||||||
"
|
|
||||||
|
|
||||||
qt_resource_name = b"\
|
|
||||||
\x00\x03\
|
|
||||||
\x00\x00N\xb9\
|
|
||||||
\x00G\
|
|
||||||
\x00u\x00i\
|
|
||||||
\x00\x0a\
|
|
||||||
\x08\x8e<\xbc\
|
|
||||||
\x00T\
|
|
||||||
\x00o\x00p\x00B\x00a\x00r\x00.\x00q\x00m\x00l\
|
|
||||||
\x00\x11\
|
|
||||||
\x00\x11r\xdc\
|
|
||||||
\x00E\
|
|
||||||
\x00n\x00c\x00r\x00y\x00p\x00t\x00i\x00o\x00n\x00K\x00e\x00y\x00.\x00q\x00m\x00l\
|
|
||||||
\
|
|
||||||
\x00\x0f\
|
|
||||||
\x07\xc70\x5c\
|
|
||||||
\x00L\
|
|
||||||
\x00o\x00g\x00i\x00n\x00S\x00c\x00r\x00e\x00e\x00n\x00.\x00q\x00m\x00l\
|
|
||||||
\x00\x06\
|
|
||||||
\x07\x84+\x02\
|
|
||||||
\x00q\
|
|
||||||
\x00m\x00l\x00d\x00i\x00r\
|
|
||||||
\x00\x13\
|
|
||||||
\x0aQ\xd8\x1c\
|
|
||||||
\x00D\
|
|
||||||
\x00b\x00C\x00o\x00n\x00f\x00i\x00g\x00u\x00r\x00a\x00t\x00i\x00o\x00n\x00.\x00q\
|
|
||||||
\x00m\x00l\
|
|
||||||
\x00\x13\
|
|
||||||
\x01\xa7!\xbc\
|
|
||||||
\x00A\
|
|
||||||
\x00d\x00m\x00i\x00n\x00U\x00s\x00e\x00r\x00C\x00o\x00n\x00f\x00i\x00g\x00.\x00q\
|
|
||||||
\x00m\x00l\
|
|
||||||
"
|
|
||||||
|
|
||||||
qt_resource_struct = b"\
|
|
||||||
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
|
|
||||||
\x00\x00\x00\x00\x00\x00\x00\x00\
|
|
||||||
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x06\x00\x00\x00\x02\
|
|
||||||
\x00\x00\x00\x00\x00\x00\x00\x00\
|
|
||||||
\x00\x00\x00&\x00\x00\x00\x00\x00\x01\x00\x00\x01\xdc\
|
|
||||||
\x00\x00\x01\x93q\xc1B\xf5\
|
|
||||||
\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x01\x00\x00\x08\x94\
|
|
||||||
\x00\x00\x01\x93\x87\xd8o\x8c\
|
|
||||||
\x00\x00\x00r\x00\x00\x00\x00\x00\x01\x00\x00\x06c\
|
|
||||||
\x00\x00\x01\x93>1\xe8\xfe\
|
|
||||||
\x00\x00\x00N\x00\x00\x00\x00\x00\x01\x00\x00\x059\
|
|
||||||
\x00\x00\x01\x93\x8b\xaf\xbcY\
|
|
||||||
\x00\x00\x00\x0c\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\
|
|
||||||
\x00\x00\x01\x93\x87$\x0bw\
|
|
||||||
\x00\x00\x00\x84\x00\x01\x00\x00\x00\x01\x00\x00\x06\x8a\
|
|
||||||
\x00\x00\x01\x93q\xc1B\xf4\
|
|
||||||
"
|
|
||||||
|
|
||||||
def qInitResources():
|
|
||||||
QtCore.qRegisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data)
|
|
||||||
|
|
||||||
def qCleanupResources():
|
|
||||||
QtCore.qUnregisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data)
|
|
||||||
|
|
||||||
qInitResources()
|
|
||||||
Reference in New Issue
Block a user