168 lines
4.0 KiB
QML
168 lines
4.0 KiB
QML
import QtQuick
|
|
import QtQuick.Controls.impl
|
|
import QtQuick.Layouts
|
|
import TeroStyle
|
|
|
|
ColumnLayout {
|
|
readonly property int fieldM: 235
|
|
readonly property int fieldS: 110
|
|
|
|
spacing: Dimensions.l
|
|
|
|
IconLabel {
|
|
color: Colors.foreground
|
|
font: Typography.h2
|
|
icon.color: Colors.foreground
|
|
icon.height: Typography.h2.pixelSize
|
|
icon.source: "qrc:/images/UserCircle"
|
|
icon.width: Typography.h2.pixelSize
|
|
spacing: Dimensions.m
|
|
text: qsTr("Stammdaten")
|
|
}
|
|
RowLayout {
|
|
spacing: Dimensions.m
|
|
|
|
Field {
|
|
label: qsTr("Anrede")
|
|
|
|
ComboBox {
|
|
id: title
|
|
|
|
implicitWidth: fieldM
|
|
model: [qsTr("Keine Angabe"), qsTr("Herr"), qsTr("Frau")]
|
|
|
|
onCurrentTextChanged: {
|
|
switch (title.currentIndex) {
|
|
case 1:
|
|
salutation.text = "Sehr geehrter Herr ";
|
|
break;
|
|
case 2:
|
|
salutation.text = "Sehr geehrte Frau ";
|
|
break;
|
|
default:
|
|
salutation.text = "Guten Tag ";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
Field {
|
|
label: qsTr("Vorname*")
|
|
|
|
TextField {
|
|
implicitWidth: fieldM
|
|
placeholderText: "Max"
|
|
}
|
|
}
|
|
Field {
|
|
label: qsTr("Nachname*")
|
|
|
|
TextField {
|
|
implicitWidth: fieldM
|
|
placeholderText: qsTr("Mustermann")
|
|
}
|
|
}
|
|
}
|
|
RowLayout {
|
|
spacing: Dimensions.m
|
|
|
|
Field {
|
|
label: qsTr("Straße")
|
|
|
|
TextField {
|
|
implicitWidth: fieldM
|
|
placeholderText: qsTr("Musterstraße")
|
|
}
|
|
}
|
|
Field {
|
|
label: qsTr("Hausnummer")
|
|
|
|
TextField {
|
|
implicitWidth: fieldS
|
|
placeholderText: qsTr("1a")
|
|
}
|
|
}
|
|
Field {
|
|
label: qsTr("PLZ")
|
|
|
|
ComboBox {
|
|
id: postcode
|
|
editable: true
|
|
implicitWidth: fieldS
|
|
model: address_model
|
|
textRole: "display"
|
|
|
|
onActivated: currentValue
|
|
onCurrentIndexChanged: city.currentIndex = postcode.currentIndex
|
|
}
|
|
}
|
|
Field {
|
|
label: qsTr("Ort")
|
|
|
|
ComboBox {
|
|
id: city
|
|
|
|
editable: true
|
|
implicitWidth: fieldM
|
|
model: address_model
|
|
textRole: "city"
|
|
}
|
|
}
|
|
}
|
|
IconLabel {
|
|
color: Colors.foreground
|
|
font: Typography.h2
|
|
icon.color: Colors.foreground
|
|
icon.height: Typography.h2.pixelSize
|
|
icon.source: "qrc:/images/Phone"
|
|
icon.width: Typography.h2.pixelSize
|
|
spacing: Dimensions.m
|
|
text: qsTr("Kontakt")
|
|
}
|
|
RowLayout {
|
|
spacing: Dimensions.m
|
|
|
|
Field {
|
|
label: qsTr("Telefonnummer")
|
|
|
|
TextField {
|
|
implicitWidth: fieldM
|
|
placeholderText: "+49 1234 567890"
|
|
|
|
validator: PhoneNumberValidator {
|
|
}
|
|
}
|
|
}
|
|
Field {
|
|
label: qsTr("Mobil")
|
|
|
|
TextField {
|
|
implicitWidth: fieldM
|
|
placeholderText: "+49 123 4567891011"
|
|
|
|
validator: PhoneNumberValidator {
|
|
}
|
|
}
|
|
}
|
|
Field {
|
|
label: qsTr("E-Mail Adresse")
|
|
|
|
TextField {
|
|
implicitWidth: fieldM
|
|
placeholderText: "tero@example.org"
|
|
|
|
validator: EmailAddressValidator {
|
|
}
|
|
}
|
|
}
|
|
Field {
|
|
label: qsTr("Briefanrede")
|
|
|
|
TextField {
|
|
id: salutation
|
|
|
|
implicitWidth: fieldM
|
|
}
|
|
}
|
|
}
|
|
}
|