Make the main view functional

This commit is contained in:
Aurelien Vaillant
2024-08-13 15:38:24 +02:00
parent 4bb7ec2ba0
commit 3697258d07
4 changed files with 64 additions and 40 deletions
+34 -9
View File
@@ -1,13 +1,38 @@
import QtQuick 2.5
ListModel {
ListElement {
name: "Server"
}
ListElement {
name: "Username"
}
ListElement {
name: "Password"
Column {
anchors.fill: parent
anchors.margins: 20
spacing: 15
// Repeater pour générer les champs basés sur la liste des labels et types
Repeater {
model: fields
Row {
width: parent.width
spacing: 10
Text {
text: modelData.label + ":"
width: 100
color: "white"
verticalAlignment: Text.AlignVCenter
font.pixelSize: 16
}
// TextInput pour les champs Server et User, et mode Password pour Password
TextInput {
width: parent.width - 110
height: 30
font.pixelSize: 16
color: "white"
text: modelData.label
// Détermine le mode de saisie en fonction du type
echoMode: modelData.type === "password" ? TextInput.Password : TextInput.Normal
//echoMode: TextInput.Password
}
}
}
}
+14
View File
@@ -0,0 +1,14 @@
import QtQuick 2.5
// Display the logo
Rectangle {
width: parent.width
height: parent.height
color: "#000B25"
Image {
anchors.centerIn: parent
source: "../icon.png"
}
}