382 lines
10 KiB
QML
382 lines
10 KiB
QML
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)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|