Files
qyouradio/Main.qml

116 lines
2.8 KiB
QML
Raw Normal View History

2025-10-11 02:30:58 +02:00
import QtQuick 6.8
import QtQuick.Controls 6.8
import QtQuick.Controls.Basic 6.8
2025-10-11 02:30:58 +02:00
import QtQuick.Layouts 6.8
import QtQuick.Dialogs 6.10
2025-10-11 02:30:58 +02:00
import QYRComponents 1.0
ApplicationWindow {
2025-10-11 17:55:56 +02:00
width: 1280
height: 800
title: qsTr("QYouRadio")
2025-10-11 02:30:58 +02:00
Dialog {
id: dialogSettings
// modality: Qt.WindowModal
popupType: Popup.Window
title: qsTr("Settings")
ViewSettings {}
}
ColumnLayout {
anchors.fill: parent
anchors.margins: 10
2025-10-11 17:55:56 +02:00
RowLayout {
Layout.fillWidth: true
Label {
text: "QYR"
heading: "h3"
font.bold: true
}
Item {
Layout.fillWidth: true
}
Label {
visible: Player.playing
text: "Playback active"
heading: "h4"
font.bold: true
}
Item {
Layout.fillWidth: true
}
TabBar {
id: tabbar
spacing: 10
TabButton {
text: qsTr("Autoradio")
}
TabButton {
text: qsTr("Live Mix")
}
TabButton {
text: qsTr("Deep Bass")
}
}
Button {
text: "S"
onClicked: function() {
dialogSettings.open()
}
2025-10-11 17:55:56 +02:00
}
}
SwipeView {
Layout.fillWidth: true
Layout.fillHeight: true
Layout.margins: 10
2025-10-11 17:55:56 +02:00
interactive: false
currentIndex: tabbar.currentIndex
Loader {
active: tabbar.currentIndex == 0
asynchronous: true
visible: status == Loader.Ready
sourceComponent: ViewPlayer {
title: qsTr("Autoradio")
streamURL: "https://youradio.nonamesoft.xyz/api/autoradio"
}
}
Loader {
active: tabbar.currentIndex == 1
asynchronous: true
visible: status == Loader.Ready
sourceComponent: ViewPlayer {
title: qsTr("Live Mix")
streamURL: "https://youradio.nonamesoft.xyz/api/live"
}
}
Loader {
active: tabbar.currentIndex == 2
asynchronous: true
visible: status == Loader.Ready
sourceComponent: ViewPlayer {
title: qsTr("Deep Bass")
streamURL: "https://youradio.nonamesoft.xyz/api/deepbass"
}
}
2025-10-11 02:30:58 +02:00
}
YouAds {
Layout.fillWidth: false
Layout.alignment: Qt.AlignHCenter
}
2025-10-11 02:30:58 +02:00
}
}