forked from ghostfox/qyouradio
116 lines
2.8 KiB
QML
Executable File
116 lines
2.8 KiB
QML
Executable File
import QtQuick 6.8
|
|
import QtQuick.Controls 6.8
|
|
import QtQuick.Controls.Basic 6.8
|
|
import QtQuick.Layouts 6.8
|
|
import QtQuick.Dialogs 6.10
|
|
|
|
import QYRComponents 1.0
|
|
|
|
ApplicationWindow {
|
|
width: 1280
|
|
height: 800
|
|
title: qsTr("QYouRadio")
|
|
|
|
Dialog {
|
|
id: dialogSettings
|
|
// modality: Qt.WindowModal
|
|
popupType: Popup.Window
|
|
title: qsTr("Settings")
|
|
|
|
ViewSettings {}
|
|
}
|
|
|
|
ColumnLayout {
|
|
anchors.fill: parent
|
|
anchors.margins: 10
|
|
|
|
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()
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
SwipeView {
|
|
Layout.fillWidth: true
|
|
Layout.fillHeight: true
|
|
Layout.margins: 10
|
|
|
|
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"
|
|
}
|
|
}
|
|
}
|
|
|
|
YouAds {
|
|
Layout.fillWidth: false
|
|
Layout.alignment: Qt.AlignHCenter
|
|
}
|
|
}
|
|
}
|