First page separation; Redesign of the Live page Reviewed-on: http://code.petrovs.info/blago/TangraPlay/pulls/14pull/15/head 0.6.0
@ -1,20 +1,18 @@ |
|||||
import QtQuick 2.0 |
import QtQuick 2.0 |
||||
import QtQuick.Controls 2.15 |
import QtQuick.Controls 2.15 |
||||
|
|
||||
Rectangle { |
Item { |
||||
id: container |
id: container |
||||
x: 141 |
x: 64 |
||||
y: 367 |
y: 64 |
||||
property bool isClicked : false |
property bool isClicked : false |
||||
color: isClicked ? "#a98415" : "#f9c620" |
|
||||
|
|
||||
|
|
||||
Image { |
Image { |
||||
id: buttonIcon |
id: buttonIcon |
||||
width: 64 |
width: 64 |
||||
anchors.centerIn: parent |
anchors.centerIn: parent |
||||
fillMode: Image.PreserveAspectFit |
fillMode: Image.PreserveAspectFit |
||||
source: isClicked ? "Resources/pause-button.svg" : "Resources/play-button.svg" |
source: isClicked ? "Resources/buuf-pause.png" : "Resources/buuf-play.png" |
||||
|
|
||||
} |
} |
||||
} |
} |
||||
|
@ -0,0 +1,87 @@ |
|||||
|
import QtQuick 2.0 |
||||
|
import QtQuick.Window 2.12 |
||||
|
|
||||
|
Item { |
||||
|
Rectangle { |
||||
|
id: menu |
||||
|
width: mainWindow.width |
||||
|
height: 32 |
||||
|
|
||||
|
Image { |
||||
|
source: "Resources/menu-background.png" |
||||
|
fillMode: Image.Tile |
||||
|
anchors.fill: parent |
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
MouseArea { |
||||
|
anchors.fill: parent; |
||||
|
property variant clickPos: "1,1" |
||||
|
|
||||
|
onPressed: { |
||||
|
clickPos = Qt.point(mouse.x,mouse.y) |
||||
|
} |
||||
|
|
||||
|
onPositionChanged: { |
||||
|
var delta = Qt.point(mouse.x-clickPos.x, mouse.y-clickPos.y) |
||||
|
var new_x = mainWindow.x + delta.x |
||||
|
var new_y = mainWindow.y + delta.y |
||||
|
if (new_y <= 0) |
||||
|
mainWindow.visibility = Window.Maximized |
||||
|
else |
||||
|
{ |
||||
|
if (mainWindow.visibility === Window.Maximized) |
||||
|
mainWindow.visibility = Window.Windowed |
||||
|
mainWindow.x = new_x |
||||
|
mainWindow.y = new_y |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
MenuButton { |
||||
|
id: buttonExit |
||||
|
caption: "X" |
||||
|
onClicked: Qt.quit(); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
MenuButton { |
||||
|
id: buttonMinimize |
||||
|
anchors.left: buttonExit.right |
||||
|
caption: "_" |
||||
|
onClicked: mainWindow.hide() |
||||
|
|
||||
|
} |
||||
|
|
||||
|
Text { |
||||
|
id: appTitle |
||||
|
anchors.left: buttonMinimize.right |
||||
|
text: qsTr("TangraPlay") |
||||
|
font.family: mainfont.name |
||||
|
font.pixelSize: 20 |
||||
|
font.bold: true |
||||
|
color: "#f9c620" |
||||
|
} |
||||
|
|
||||
|
// Image { |
||||
|
// id: buttonLive |
||||
|
// source: "Resources/live.png" |
||||
|
// anchors.left: appTitle.left |
||||
|
// anchors.leftMargin: 128 |
||||
|
// width: 32 |
||||
|
// height: 32 |
||||
|
|
||||
|
// MouseArea { |
||||
|
// anchors.fill: parent |
||||
|
// hoverEnabled: true |
||||
|
// onClicked: { |
||||
|
// pgLive1.visible = false; |
||||
|
// pgnews1.visible = true; |
||||
|
//// contentLoader.sourceComponent = PgNews |
||||
|
// } |
||||
|
// } |
||||
|
// } |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
@ -0,0 +1,91 @@ |
|||||
|
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") |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
MediaButton { |
||||
|
id: playPause |
||||
|
x: 35 |
||||
|
y: 291 |
||||
|
width: 64 |
||||
|
height: 64 |
||||
|
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() |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
Image { |
||||
|
id: playbtnframe |
||||
|
x: 0 |
||||
|
y: 259 |
||||
|
width: 629 |
||||
|
height: 127 |
||||
|
source: "Resources/playbtn-frame.png" |
||||
|
fillMode: Image.PreserveAspectFit |
||||
|
|
||||
|
Text { |
||||
|
id: text1 |
||||
|
x: 156 |
||||
|
y: 17 |
||||
|
text: qsTr("Предаване в ефир:") |
||||
|
color: "#f9c620" |
||||
|
font.family: mainfont.name |
||||
|
font.pixelSize: 15 |
||||
|
} |
||||
|
|
||||
|
Text { |
||||
|
id: text2 |
||||
|
x: 156 |
||||
|
y: 60 |
||||
|
text: qsTr("В момента звучи:") |
||||
|
color: "#f9c620" |
||||
|
font.family: mainfont.name |
||||
|
font.pixelSize: 15 |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/*##^## |
||||
|
Designer { |
||||
|
D{i:0;autoSize:true;height:480;width:640} |
||||
|
} |
||||
|
##^##*/ |
@ -0,0 +1,38 @@ |
|||||
|
import QtQuick 2.12 |
||||
|
import QtQuick.Window 2.12 |
||||
|
import Qt.labs.platform 1.1 |
||||
|
import QtMultimedia 5.15 |
||||
|
|
||||
|
Item { |
||||
|
x: 190 |
||||
|
y: 51 |
||||
|
Row { |
||||
|
id: row |
||||
|
x: 8 |
||||
|
y: 50 |
||||
|
width: 624 |
||||
|
height: 400 |
||||
|
spacing: 2 |
||||
|
|
||||
|
Text { |
||||
|
id: text1 |
||||
|
x: 61 |
||||
|
y: 50 |
||||
|
text: qsTr("Гледайте първо видео от новия албум на GOJIRA - той излиза на 3 април") |
||||
|
font.pixelSize: 12 |
||||
|
font.family: mainfont.name |
||||
|
} |
||||
|
|
||||
|
Text { |
||||
|
id: text2 |
||||
|
x: 61 |
||||
|
y: 50 |
||||
|
text: qsTr("Историята на BLONDIE в предаването 'РОКЕНДРОЛ' на МОНИ ПАНЧЕВ от 16:00") |
||||
|
font.pixelSize: 12 |
||||
|
font.family: mainfont.name |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 8.9 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 26 KiB |
@ -1,15 +1,15 @@ |
|||||
#include "fetchshowid.h" |
#include "fetchshowid.h" |
||||
#include <QNetworkAccessManager> |
|
||||
#include <QObject> |
|
||||
#include <QDebug> |
|
||||
#include <QString> |
|
||||
|
|
||||
FetchShowID::FetchShowID() |
FetchShowID::FetchShowID() |
||||
{ |
{ |
||||
|
n_manager = new QNetworkAccessManager; |
||||
|
|
||||
|
connect(n_manager, SIGNAL(finished(QNetworkReply*)), |
||||
|
this, SLOT(replyFinished(QNetworkReply*))); |
||||
|
|
||||
} |
} |
||||
|
|
||||
//int FetchShowID::Fetch() {
|
|
||||
// QNetworkAccessManager *manager = new QNetworkAccessManager(this);
|
|
||||
|
|
||||
//}
|
void FetchShowID::Fetch() { |
||||
|
n_manager->get(QNetworkRequest(QUrl("http://app.radiotangra.com/TMR_monitor_songs"))); |
||||
|
} |
||||
|
@ -1,12 +1,20 @@ |
|||||
#ifndef FETCHSHOWID_H |
#ifndef FETCHSHOWID_H |
||||
#define FETCHSHOWID_H |
#define FETCHSHOWID_H |
||||
|
#include <QNetworkAccessManager> |
||||
|
#include <QNetworkReply> |
||||
|
#include <QObject> |
||||
|
#include <QDebug> |
||||
|
#include <QString> |
||||
|
|
||||
|
|
||||
class FetchShowID |
class FetchShowID : public QObject |
||||
{ |
{ |
||||
public: |
public: |
||||
FetchShowID(); |
FetchShowID(); |
||||
// int Fetch();
|
void Fetch(); |
||||
|
|
||||
|
private: |
||||
|
QNetworkAccessManager* n_manager; |
||||
}; |
}; |
||||
|
|
||||
#endif // FETCHSHOWID_H
|
#endif // FETCHSHOWID_H
|
||||
|