From f53cb56669a6e04596ac7c42dae24871dbb53d6b Mon Sep 17 00:00:00 2001 From: Aurelien Vaillant Date: Mon, 12 Aug 2024 16:53:09 +0200 Subject: [PATCH] WIP more UI wip --- Jellyfin.fbxproject.user | 136 +++++++++++++++++++++++++++++++++++++++ Jellyfin.qml | 41 ++++-------- TestUi.qml | 31 --------- Views/ViewLogin.qml | 13 ++++ 4 files changed, 161 insertions(+), 60 deletions(-) create mode 100644 Jellyfin.fbxproject.user delete mode 100644 TestUi.qml create mode 100644 Views/ViewLogin.qml diff --git a/Jellyfin.fbxproject.user b/Jellyfin.fbxproject.user new file mode 100644 index 0000000..95459a0 --- /dev/null +++ b/Jellyfin.fbxproject.user @@ -0,0 +1,136 @@ + + + + + + EnvironmentId + {82daaaf9-c426-482c-8459-9906e026a767} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + + ProjectExplorer.Project.Target.0 + + Freebox (192.168.0.20) + Freebox (192.168.0.20) + {85c5d883-c271-46ed-a005-853375634941} + -1 + -1 + 0 + 0 + 0 + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + + main + main + 3768 + false + true + false + false + true + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.FileVersion + 18 + + + Version + 18 + + diff --git a/Jellyfin.qml b/Jellyfin.qml index b8a8059..712fc0a 100644 --- a/Jellyfin.qml +++ b/Jellyfin.qml @@ -1,36 +1,19 @@ import QtQuick 2.5 import fbx.application 1.0 +import "Views" 1.0 Application { + Image { + source: "icon.png" + } Text { - id: title - focus: true - anchors.centerIn: parent - text: "Launch Jellyfin" - color: "white" - font.pixelSize: 50 - states: [ - State { - name: "rouge"; - PropertyChanges {target: title; color: "red" } - }, - State { - name: "bleu"; - PropertyChanges {target: title; color: "blue" } - } - ] - transitions: Transition { - SequentialAnimation { - ColorAnimation { duration: 500 } - } - } - Keys.onPressed: { - if(event.key == Qt.Key_Up) - title.state = "rouge" - else if(event.key == Qt.Key_Down) - title.state = "bleu" - else if(event.key == Qt.Key_Return) - title.color = "purple" - } + text: "Connect to Jellifyn server" + } + + GridView { + model: ViewLogin {} + delegate: Column { + Text { text: name; anchors.horizontalCenter: parent.horizontalCenter } + } } } diff --git a/TestUi.qml b/TestUi.qml deleted file mode 100644 index 67de712..0000000 --- a/TestUi.qml +++ /dev/null @@ -1,31 +0,0 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 - -Application { - Column { - anchors.centerIn: parent - spacing: 20 - - TextField { - id: loginField - placeholderText: "Enter username" - width: parent.width * 0.8 - } - - PasswordField { - id: passwordField - placeholderText: "Enter password" - width: parent.width * 0.8 - } - - Button { - text: "Login" - width: parent.width * 0.8 - onClicked: { - // Action à effectuer lors du clic sur le bouton - console.log("Login: " + loginField.text) - console.log("Password: " + passwordField.text) - } - } - } -} diff --git a/Views/ViewLogin.qml b/Views/ViewLogin.qml new file mode 100644 index 0000000..67c7c3d --- /dev/null +++ b/Views/ViewLogin.qml @@ -0,0 +1,13 @@ +import QtQuick 2.5 + +ListModel { + ListElement { + name: "Server" + } + ListElement { + name: "Username" + } + ListElement { + name: "Password" + } +}