134 lines
3.5 KiB
QML
Executable File
134 lines
3.5 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 QYRComponents 1.0
|
|
|
|
ApplicationWindow {
|
|
id: root
|
|
width: 1280
|
|
height: 800
|
|
title: qsTr("QYouRadio")
|
|
|
|
ColumnLayout {
|
|
anchors.fill: parent
|
|
anchors.margins: 10
|
|
|
|
RowLayout {
|
|
Layout.fillWidth: true
|
|
|
|
Label {
|
|
text: "QYouRadio"
|
|
heading: "h3"
|
|
font.bold: true
|
|
}
|
|
|
|
// Item {
|
|
// Layout.fillWidth: true
|
|
// }
|
|
|
|
Rectangle {
|
|
Layout.leftMargin: 20
|
|
visible: Player.currentIndex != null
|
|
color: Colors.primary
|
|
radius: 5
|
|
clip: true
|
|
width: 320
|
|
height: 36
|
|
|
|
Label {
|
|
anchors.top: parent.top
|
|
anchors.left: parent.left
|
|
anchors.right: parent.right
|
|
anchors.topMargin: 1
|
|
anchors.leftMargin: 4
|
|
anchors.rightMargin: 4
|
|
text: (Player.loading ? "Loading " : "Playing ") + (Player.currentIndex != null ? qsTr(Player.currentStream.name) : "")
|
|
heading: "h2"
|
|
}
|
|
|
|
Label {
|
|
anchors.bottom: parent.bottom
|
|
anchors.left: parent.left
|
|
anchors.right: parent.right
|
|
anchors.bottomMargin: 1
|
|
anchors.leftMargin: 4
|
|
anchors.rightMargin: 4
|
|
text: "Title will go here"
|
|
heading: "h4"
|
|
}
|
|
}
|
|
|
|
Item {
|
|
Layout.fillWidth: true
|
|
}
|
|
|
|
TabBar {
|
|
id: tabbar
|
|
spacing: 10
|
|
|
|
background: Item{}
|
|
|
|
TabButton {
|
|
text: qsTr("Autoradio")
|
|
}
|
|
TabButton {
|
|
text: qsTr("Live Mix")
|
|
}
|
|
TabButton {
|
|
text: qsTr("Deep Bass")
|
|
}
|
|
}
|
|
Button {
|
|
text: "S"
|
|
onClicked: function() {
|
|
var component = Qt.createComponent("ViewSettings.qml")
|
|
var window = component.createObject(root)
|
|
window.show()
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
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 {
|
|
index: 0
|
|
}
|
|
}
|
|
Loader {
|
|
active: tabbar.currentIndex == 1
|
|
asynchronous: true
|
|
visible: status == Loader.Ready
|
|
sourceComponent: ViewPlayer {
|
|
index: 1
|
|
}
|
|
}
|
|
Loader {
|
|
active: tabbar.currentIndex == 2
|
|
asynchronous: true
|
|
visible: status == Loader.Ready
|
|
sourceComponent: ViewPlayer {
|
|
index: 2
|
|
}
|
|
}
|
|
}
|
|
|
|
YouAds {
|
|
Layout.fillWidth: false
|
|
Layout.alignment: Qt.AlignHCenter
|
|
}
|
|
}
|
|
}
|