diff --git a/PgLive.qml b/PgLive.qml new file mode 100644 index 0000000..f4a8ed3 --- /dev/null +++ b/PgLive.qml @@ -0,0 +1,101 @@ +import QtQuick 2.12 +import QtQuick.Window 2.12 +import Qt.labs.platform 1.1 +import QtMultimedia 5.15 + +Item { + + + Image { + id: logo + x: 190 + y: 51 + visible: true + width: 260 + height: 175 + fillMode: Image.PreserveAspectFit + source: "Resources/logo.png" + MouseArea { + anchors.fill: parent + cursorShape: Qt.PointingHandCursor + onPressed: { + Qt.openUrlExternally("http://radiotangra.com") + } + } + } + + + +// Text { +// id: element +// x: 17 +// y: 68 +// text: qsTr("Качество:") +// font.bold: true +// color: "#f9c620" +// styleColor: "#f9c620" +// horizontalAlignment: Text.AlignHCenter +// font.pixelSize: 20 +// } + +// Rectangle { +// id: buttonHighQuality +// color: "#f9c620" +// x: 17 +// y: 102 +// width: 100 +// height: 34 +// Text { +// anchors.centerIn: parent +// id: element1 +// text: qsTr("ВИСОКО") +// color: "#000000" +// font.pixelSize: 20 +// horizontalAlignment: Text.AlignHCenter +// font.bold: true +// } +// } + +// Rectangle { +// id: buttonLowQuality +// color: "transparent" +// x: 24 +// y: 146 +// width: 100 +// height: 34 +// Text { +// text: qsTr("НИСКО") +// color: "#f9c620" +// horizontalAlignment: Text.AlignHCenter +// font.pixelSize: 20 +// font.bold: true +// } +// } + + MediaButton { + id: playPause + width: 359 + height: 85 + MouseArea { + anchors.fill: parent + onClicked: { + mediaControl(); + playPause.isClicked = !playPause.isClicked; + } + } + } + + Text { + id: aboutLink + x: 509 + y: 455 + text: qsTr("Относно програмата") + font.pixelSize: 12 + font.family: mainfont.name + color: "#f9c620" + MouseArea { + anchors.fill: parent + onClicked: aboutDialog.open() + } + } +} diff --git a/main.qml b/main.qml index 5998a8d..435e78c 100644 --- a/main.qml +++ b/main.qml @@ -8,7 +8,9 @@ Window { id: mainWindow visible: true width: 640 + maximumWidth: 640 height: 480 + maximumHeight: 480 flags: Qt.FramelessWindowHint FontLoader { id: mainfont; source: "Resources/KellySlab-Regular.ttf" } @@ -127,98 +129,7 @@ Window { } } } - - Image { - id: logo - x: 190 - y: 51 - visible: true - width: 260 - height: 175 - fillMode: Image.PreserveAspectFit - source: "Resources/logo.png" - MouseArea { - anchors.fill: parent - cursorShape: Qt.PointingHandCursor - onPressed: { - Qt.openUrlExternally("http://radiotangra.com") - } - } - } - - - -// Text { -// id: element -// x: 17 -// y: 68 -// text: qsTr("Качество:") -// font.bold: true -// color: "#f9c620" -// styleColor: "#f9c620" -// horizontalAlignment: Text.AlignHCenter -// font.pixelSize: 20 -// } - -// Rectangle { -// id: buttonHighQuality -// color: "#f9c620" -// x: 17 -// y: 102 -// width: 100 -// height: 34 -// Text { -// anchors.centerIn: parent -// id: element1 -// text: qsTr("ВИСОКО") -// color: "#000000" -// font.pixelSize: 20 -// horizontalAlignment: Text.AlignHCenter -// font.bold: true -// } -// } - -// Rectangle { -// id: buttonLowQuality -// color: "transparent" -// x: 24 -// y: 146 -// width: 100 -// height: 34 -// Text { -// text: qsTr("НИСКО") -// color: "#f9c620" -// horizontalAlignment: Text.AlignHCenter -// font.pixelSize: 20 -// font.bold: true -// } -// } - - MediaButton { - id: playPause - width: 359 - height: 85 - MouseArea { - anchors.fill: parent - onClicked: { - mediaControl(); - playPause.isClicked = !playPause.isClicked; - } - } - } - - Text { - id: aboutLink - x: 509 - y: 455 - text: qsTr("Относно програмата") - font.pixelSize: 12 - font.family: mainfont.name - color: "#f9c620" - MouseArea { - anchors.fill: parent - onClicked: aboutDialog.open() - } - } } + + PgLive {} } diff --git a/qml.qrc b/qml.qrc index c82a25b..34e9eac 100644 --- a/qml.qrc +++ b/qml.qrc @@ -14,5 +14,6 @@ Resources/blago.png Resources/tangra.ico Resources/KellySlab-Regular.ttf + PgLive.qml