GUI-Design added

This commit is contained in:
2024-11-04 12:38:58 +01:00
parent 2c9ab2ff57
commit 78c31d7de3
20 changed files with 645 additions and 0 deletions

View File

@@ -0,0 +1,381 @@
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import QtQuick.Controls.Material
// Item {
// benutzername
// passwort
// server
// port
// benutzername(db)
// passwort(db)
// DbName
// type
// }
Item
{
width: 640
height: 480
visible: true
Material.theme: Material.Dark
Material.accent: Material.BlueGrey
ColumnLayout
{
anchors.fill: parent
TabBar
{
id: bar
Layout.fillWidth: true
TabButton
{
text: qsTr("Benutzer erstellen")
}
TabButton
{
text: qsTr("Datenbank einrichten")
}
TabButton
{
text: qsTr("TEST TAB") //NUR TESTTAB UM LAYOUT OPTIONEN ZU TESTEN
}
TabButton
{
text: qsTr("TEST TAB 2")
}
}
StackLayout
{
Layout.fillWidth: true
Layout.fillHeight: true
currentIndex: bar.currentIndex
Layout.margins: 9
Item
{
id: createUser
Layout.fillWidth: parent.width
GridLayout
{
id: createUserGrid
columns: 2
anchors.fill: parent
Layout.margins: 9
Label
{
text: qsTr("Benutzername:")
Layout.alignment: Qt.AlignRight
}
TextField
{
id: benutzerName
placeholderText: qsTr("Hier Benutzername eingeben")
Layout.fillWidth: true
height: 3
}
Label
{
text: qsTr("Passwort:")
Layout.alignment: Qt.AlignRight
}
TextField
{
id: password
echoMode: TextInput.Password
placeholderText: qsTr("Hier Passwort eingeben")
Layout.fillWidth: true
}
Item
{
Layout.fillHeight: true
}
}
}
Item
{
id: settingsDB
Layout.fillWidth: parent.width
GridLayout
{
id: dbGrid
columns: 2
anchors.fill: parent
Label
{
text: qsTr("DB-Host:")
Layout.alignment: Qt.AlignRight
}
TextField
{
id: dbHost
placeholderText: qsTr("Hier Host eingeben")
Layout.fillWidth: true
}
Label
{
text: qsTr("DB-Port:")
Layout.alignment: Qt.AlignRight
}
TextField
{
id: dbPort
placeholderText: qsTr("Hier DB-Port eingeben")
Layout.fillWidth: true
}
Label
{
text: qsTr("DB-Name:")
Layout.alignment: Qt.AlignRight
}
TextField
{
id: dbName
placeholderText: qsTr("Hier DB-Name eingeben")
Layout.fillWidth: true
}
Label
{
text: qsTr("DB-Benutzername:")
Layout.alignment: Qt.AlignRight
}
TextField
{
id: dbUserName
placeholderText: qsTr("Hier DB-Benutzername eingeben")
Layout.fillWidth: true
}
Label
{
text: qsTr("DB-Passwort:")
Layout.alignment: Qt.AlignRight
}
TextField
{
id: dbPassword
echoMode: TextInput.Password
placeholderText: qsTr("Hier DB-Passwort eingeben")
Layout.fillWidth: true
}
Item
{
Layout.fillHeight: true
}
}
}
//ANFANG TESTCODE KEINE IDS VERGEBEN
Item
{
Frame
{
anchors.fill: parent
anchors.margins: 9
GridLayout
{
columns: 2
anchors.fill: parent
Label
{
text: qsTr("DB-Host:")
Layout.alignment: Qt.AlignRight
}
TextField
{
placeholderText: qsTr("Hier Host eingeben")
Layout.fillWidth: true
}
Label
{
text: qsTr("DB-Port:")
Layout.alignment: Qt.AlignRight
}
TextField
{
placeholderText: qsTr("Hier DB-Port eingeben")
Layout.fillWidth: true
}
Label
{
text: qsTr("DB-Name:")
Layout.alignment: Qt.AlignRight
}
TextField
{
placeholderText: qsTr("Hier DB-Name eingeben")
Layout.fillWidth: true
}
Label
{
text: qsTr("DB-Benutzername:")
Layout.alignment: Qt.AlignRight
}
TextField
{
placeholderText: qsTr("Hier DB-Benutzername eingeben")
Layout.fillWidth: true
}
Label
{
text: qsTr("DB-Passwort:")
Layout.alignment: Qt.AlignRight
}
TextField
{
echoMode: TextInput.Password
placeholderText: qsTr("Hier DB-Passwort eingeben")
Layout.fillWidth: true
}
}
}
}
Item
{
GridLayout
{
anchors.fill: parent
anchors.margins: 9
columns: 2
Label
{
text: qsTr("DB-Host:")
Layout.alignment: Qt.AlignRight
}
TextField
{
placeholderText: qsTr("Hier Host eingeben")
Layout.fillWidth: true
}
Label
{
text: qsTr("DB-Port:")
Layout.alignment: Qt.AlignRight
}
TextField
{
placeholderText: qsTr("Hier DB-Port eingeben")
Layout.fillWidth: true
}
Label
{
text: qsTr("DB-Name:")
Layout.alignment: Qt.AlignRight
}
TextField
{
placeholderText: qsTr("Hier DB-Name eingeben")
Layout.fillWidth: true
}
Label
{
text: qsTr("DB-Benutzername:")
Layout.alignment: Qt.AlignRight
}
TextField
{
placeholderText: qsTr("Hier DB-Benutzername eingeben")
Layout.fillWidth: true
}
Label
{
text: qsTr("DB-Passwort:")
Layout.alignment: Qt.AlignRight
}
TextField
{
echoMode: TextInput.Password
placeholderText: qsTr("Hier DB-Passwort eingeben")
Layout.fillWidth: true
}
Label
{
//Spacer Label
}
}
}
//ENDE TESTCODE
}
RowLayout
{
Layout.margins: 9
Item
{
Layout.fillWidth: true
}
Button
{
id: cancelBtn
text: qsTr("Abbrechen")
}
Button
{
id: submitBtn
text: qsTr("Speichern")
onClicked:
{
config.createUser(benutzerName.text)
}
}
}
}
}

View File

@@ -0,0 +1,25 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Material
ApplicationWindow
{
id: window
width: 640
height: 480
visible: true
Material.theme: Material.Dark
Material.accent: Material.BlueGrey
title: bad_config? "Pyqcrm Einstellungen":"Pyqcrm"
Loader
{
id: mainWindow
source: bad_config? "firststart.qml":"start.qml"
}
}

View File

@@ -0,0 +1,13 @@
import QtQuick
Item
{
anchors.fill: parent
parent.width: 1080
parent.height: 1920
}