Files
htpc-client/layouts/ikinuki-default.qml
T
restitux 94a69d383b Add Provider object and update the UI to use
This currently uses localhost:8080 hosted providers to facilitate
testing.
2022-08-19 12:46:20 -04:00

118 lines
2.9 KiB
QML

//import QtQuick 2.0
//import QtQuick.Controls 2.15
import QtQuick 2.12
import QtQuick.Layouts 1.12
import QtQuick.Controls 2.12
import QtQuick.Controls.Imagine 2.12
import QtQuick.Window 2.0
//import mpvtest 1.0
import Ikinuki.Client 1.0
import "./components"
ApplicationWindow {
id: window
visible: true
Database {
id: database
}
Row {
anchors.fill: parent
focus: true
default property int selectedView: 0
Sidebar {
id: sidebar
providers: database.Providers
}
ContentView {
id: view
providers: database.Providers
}
function mod(n, m) {
return ((n % m) + m) % m;
}
Keys.onPressed: (event)=> {
if (selectedView == 0) {
if (event.key == Qt.Key_Right) {
selectedView = 1;
}
sidebar.Keys.pressed(event);
event.accepted = true;
} else {
}
event.accepted = true;
}
}
}
//Width: 1280
//height: 720
// MpvObject {
// id: renderer
// anchors.fill: parent
//
// MouseArea {
// anchors.fill: parent
// onClicked: renderer.play("./matroska-test-files/test_files/test1.mkv")
// }
// }
//Rectangle {
// id: labelFrame
// anchors.margins: -50
// radius: 5
// color: "white"
// border.color: "black"
// opacity: 0.8
// anchors.fill: box
//}
//Row {
// id: box
// anchors.bottom: renderer.bottom
// anchors.left: renderer.left
// anchors.right: renderer.right
// anchors.margins: 100
// Text {
// anchors.margins: 10
// wrapMode: Text.WordWrap
// text: "QtQuick and mpv are both rendering stuff.\n
// Click to load test.mkv"
// }
// // Don't take these controls too seriously. They're for testing.
// Column {
// CheckBox {
// id: checkbox
// anchors.margins: 10
// // Heavily filtered means good, right?
// text: "Make video look like on a Smart TV"
// onClicked: {
// if (checkbox.checked) {
// renderer.setProperty("sharpen", 5.0)
// } else {
// renderer.setProperty("sharpen", 0)
// }
// }
// }
// Slider {
// id: slider
// anchors.margins: 10
// anchors.left: checkbox.left
// anchors.right: checkbox.right
// minimumValue: -100
// maximumValue: 100
// value: 0
// onValueChanged: renderer.setProperty("gamma", slider.value | 0)
// }
// }
//}
//}