ny commit

This commit is contained in:
Niels 2025-05-28 20:47:14 +02:00
commit d4cd7f8bdc
324 changed files with 7462 additions and 0 deletions

11
harbour-allradio.desktop Normal file
View File

@ -0,0 +1,11 @@
[Desktop Entry]
Type=Application
X-Nemo-Application-Type=silica-qt5
Name=harbour-allradio
Icon=harbour-allradio
Exec=harbour-allradio
[X-Sailjail]
Permissions=Internet;Audio
OrganizationName=org.nesnomis
ApplicationName=AllRadio2

54
harbour-allradio.pro Normal file
View File

@ -0,0 +1,54 @@
# NOTICE:
#
# Application name defined in TARGET has a corresponding QML filename.
# If name defined in TARGET is changed, the following needs to be done
# to match new name:
# - corresponding QML filename must be changed
# - desktop icon filename must be changed
# - desktop filename must be changed
# - icon definition filename in desktop file must be changed
# - translation filenames have to be changed
# The name of your application
TARGET = harbour-allradio
CONFIG += sailfishapp
# App version
DEFINES += APP_VERSION=\"\\\"$${VERSION}\\\"\"
SOURCES += src/harbour-allradio.cpp
DISTFILES += qml/harbour-allradio.qml \
../../Programmering/harbour-labyrinth/qml/pages/About.qml \
qml/cover/CoverPage.qml \
qml/helpers/dummy.qml \
qml/items/HeaderButton.qml \
qml/items/SleepTimer.qml \
qml/pages/AboutPage.qml \
qml/pages/AllRadio.qml \
qml/pages/CountryStationsPage.qml \
qml/pages/FavoritesPage.qml \
qml/pages/HistoryPage.qml \
qml/pages/SearchStationsPage.qml \
qml/pages/SecondPage.qml \
qml/pages/SettingsPage.qml \
qml/pages/TagListPage.qml \
rpm/harbour-allradio.changes.in \
rpm/harbour-allradio.changes.run.in \
rpm/harbour-allradio.spec \
rpm/harbour-allradio.yaml \
translations/*.ts \
harbour-allradio.desktop
SAILFISHAPP_ICONS = 86x86 108x108 128x128 172x172
# to disable building translations every time, comment out the
# following CONFIG line
CONFIG += sailfishapp_i18n
# German translation is enabled as an example. If you aren't
# planning to localize your app, remember to comment out the
# following TRANSLATIONS line. And also do not forget to
# modify the localized app name in the the .desktop file.
TRANSLATIONS += translations/harbour-allradio-de.ts

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

66
qml/cover/CoverPage.qml Normal file
View File

@ -0,0 +1,66 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
import "../delegates"
CoverBackground {
RadioImage {
id:stationimage
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: Theme.paddingLarge
width: parent.width - Theme.paddingMedium * 2
height: width
stationImage: radioPlayer._favicon
stationLabel: radioPlayer._name
flag: false
}
Item {
id: artistSongName
anchors.top: stationimage.bottom
anchors.bottom: coverActionArea.top
anchors.horizontalCenter: parent.horizontalCenter
anchors.margins: Theme.paddingLarge
width: parent.width - (Theme.paddingMedium * 2) //parent.width - (Theme.paddingMedium * 2)
height: radioname.height + radiocountry.height + (Theme.paddingMedium * 3)
Column {
width: parent.width//radioname.width > radiocountry.width ? radioname.width : radiocountry.width
anchors.verticalCenter: parent.verticalCenter
Label {
id: radioname
font.bold: true
color: Theme.primaryColor
wrapMode: Text.WordWrap
font.pixelSize: Theme.fontSizeTiny
fontSizeMode: Text.Fit
maximumLineCount: 2
width: parent.width
elide: Text.ElideLeft
horizontalAlignment: Text.AlignHCenter
text: radioPlayer.radioArtist ? radioPlayer.radioArtist : "AllRadio2"
}
Label {
id: radiocountry
color: Theme.primaryColor
wrapMode: Text.WordWrap
font.pixelSize: Theme.fontSizeTiny
fontSizeMode: Text.Fit
maximumLineCount: 2
width: parent.width
elide: Text.ElideLeft
horizontalAlignment: Text.AlignHCenter
visible: radioPlayer.radioSong ? true : false
text: radioPlayer.radioSong
}
}
}
CoverActionList {
CoverAction {
iconSource: radioPlayer.isPlaying ? "image://theme/icon-cover-pause" : "image://theme/icon-cover-play"
onTriggered: radioPlayer.isPlaying ? radioPlayer.pauseStream() : radioPlayer.resumeStream()// radioPlayer.radioPlaying ? radioPlayer.pauseStream() : radioPlayer.resumeStream()//icon.source == "image://theme/icon-l-play" ? icon.source = "image://theme/icon-l-pause" : icon.source = "image://theme/icon-l-play"
}
}
}

View File

@ -0,0 +1,26 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
Rectangle {
property bool fill: true
property bool borderVisible: true
anchors.fill: parent
anchors.margins: Theme.paddingSmall
color: "transparent"
border.color: borderVisible ? Theme.rgba(Theme.highlightBackgroundColor, 0.8) : "transparent"
radius: 20
Rectangle {
visible: fill
anchors.fill: parent
anchors.topMargin: parent.border.width
anchors.leftMargin: parent.border.width
anchors.rightMargin: parent.border.width
anchors.bottomMargin: parent.border.width
radius: 30
gradient: Gradient {
GradientStop { position: 0.0; color: Theme.rgba(Theme.highlightBackgroundColor,0.125) }
GradientStop { position: 1.0; color: "transparent" }
}
}
}

View File

@ -0,0 +1,38 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
BackgroundItem {
id: delegate
width: parent.width;
height: Theme.itemSizeExtraSmall
Image {
id: countryImage
height: parent.height * 0.6
fillMode: Image.PreserveAspectFit
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: Theme.paddingLarge
source: "../flags/"+alpha_2.toLowerCase()+".png"
}
Label {
id: land
anchors.verticalCenter: parent.verticalCenter
anchors.left: countryImage.right
anchors.leftMargin: Theme.paddingMedium
anchors.right: count.left
anchors.rightMargin: Theme.paddingMedium
color: delegate.highlighted ? Theme.highlightColor : Theme.primaryColor
font.pixelSize: Theme.fontSizeSmall
text: radioBrowser.getCountryName(alpha_2)
}
Label {
id: count
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: Theme.paddingMedium
color: delegate.highlighted ? Theme.highlightColor : Theme.primaryColor
font.pixelSize: Theme.fontSizeSmall;
text: "["+stationcount+"]"
}
}

View File

@ -0,0 +1,31 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
//import "../../helpers/jsFunctions.js" as JS
BackgroundItem {
id: delegate
width: parent.width / 2;
height: Theme.itemSizeExtraSmall
ButtonRect {fill: false}
Image {
id: countryImage
height: parent.height * 0.6
fillMode: Image.PreserveAspectFit
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: Theme.paddingLarge
source: "../flags/"+alpha_2.toLowerCase()+".png"
}
Label {
id: land
anchors.verticalCenter: parent.verticalCenter
anchors.left: countryImage.right
anchors.leftMargin: Theme.paddingMedium
color: delegate.highlighted ? Theme.highlightColor : Theme.primaryColor
font.pixelSize: Theme.fontSizeSmall;
width: parent.width - countryImage.width - Theme.paddingMedium - (Theme.paddingLarge * 2)
elide: Text.ElideRight
text: radioBrowser.getCountryName(alpha_2)
}
}

View File

@ -0,0 +1,253 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
import QtGraphicalEffects 1.0
import "../helpers/jsFunctions.js" as JS
ListItem {
id: delegate
property alias favIcon: favIcon
property alias contextMenuHeight: contextMenu.height
property bool favo: favorite ? true : false
property variant view
// property bool favorite: false
height: menuOpen ? contextMenu.height + Theme.itemSizeExtraLarge : Theme.itemSizeExtraLarge
menu: contextMenu
contentHeight: Theme.itemSizeExtraLarge
showMenuOnPressAndHold: true
ContextMenu {
id: contextMenu
MenuItem {
Row {
anchors.centerIn: parent
spacing: Theme.paddingMedium
Image {
source: "image://theme/icon-m-like"
anchors.verticalCenter: parent.verticalCenter
height: Theme.itemSizeExtraSmall * 0.5
width: height
fillMode: Image.PreserveAspectFit
}
Label {
font.pixelSize: Theme.fontSizeSmall
text: qsTr("Vote on Community Radio Browser")
}
}
onClicked: console.log("LIKE!!!") //remove()//listView.currentItem.remove(rpindex,rpsource) //listView.remorseAction();
}
MenuItem {
Row {
anchors.centerIn: parent
spacing: Theme.paddingMedium
Image {
source: favo ? "image://theme/icon-m-favorite-selected" : "image://theme/icon-m-favorite"
anchors.verticalCenter: parent.verticalCenter
height: Theme.itemSizeExtraSmall * 0.5
width: height
fillMode: Image.PreserveAspectFit
}
Label {
font.pixelSize: Theme.fontSizeSmall
text: favo ? qsTr("Remove from favorites") : qsTr("Add to favorites")
}
}
onClicked: {
favo ? favo = false : favo = true
//radioPlayer._favorite = favo
radioPlayer.setStationFavorite(stationuuid,name,countrycode,homepage,url_resolved,favicon,tags,codec,bitrate,hls,favo)
}
}
/* MenuItem {
Row {
anchors.centerIn: parent
spacing: Theme.paddingMedium
Image {
source: "image://theme/icon-m-delete"
anchors.verticalCenter: parent.verticalCenter
height: Theme.itemSizeExtraSmall * 0.5
width: height
fillMode: Image.PreserveAspectFit
}
Label {
font.pixelSize: Theme.fontSizeSmall
text: qsTr("Remove from AllRadio2")
}
}
onClicked: remove()//console.log("DELETE!!!") //remove()//listView.currentItem.remove(rpindex,rpsource) //listView.remorseAction();
} */
}
/* Rectangle {
id: stationLogo
anchors.top: header.bottom
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width - (Theme.paddingLarge * 2)
height: width
radius: 20
color: "transparent" //Theme.rgba(Theme.highlightDimmerColor,0.8)
border.color: Theme.rgba(Theme.highlightDimmerColor,0.8)
border.width: Theme.paddingSmall
} */
Rectangle {
id: favIcon
property alias source: stationimage.source
anchors.left: parent.left
anchors.leftMargin: Theme.paddingMedium
anchors.verticalCenter: parent.verticalCenter
height: Theme.itemSizeLarge//nameLabel.height + codecLabel.height + tagLabel.height
width: height
radius: 20
color: "transparent" //Theme.rgba(Theme.highlightDimmerColor,0.8)
border.color: Theme.rgba(Theme.highlightDimmerColor,0.8)
border.width: Theme.paddingSmall
}
Image {
id: stationimage
anchors.fill: favIcon
anchors.margins: favIcon.border.width
fillMode: Image.PreserveAspectFit
source: favicon ? favicon : "../images/community.png"
// layer.enabled: true
// layer.effect: OpacityMask {
// maskSource: parent
// }
// layer {
// enabled: false
// effect: ColorOverlay {
// color: Theme.highlightBackgroundColor
// }
// }
BusyIndicator {
size: BusyIndicatorSize.Medium
anchors.centerIn: stationimage
//running: appActive && stationimage.status != Image.Ready
}
onStatusChanged:
switch(stationimage.status){
case Image.Null:
//console.log("no image has been set: "+ name);
source = "../images/community.png"
break;
case Image.Ready:
//console.log("the image has been loaded: "+name+"\n"
// + stationimage.width + " x " + stationimage.height);
break;
case Image.Loading:
break;
case Image.Error:
//console.log("an error occurred while loading the image: "+name);
source = "../images/community.png"
break;
}
}
/* Image {
height: stationimage.height * 0.50
fillMode: Image.PreserveAspectFit
opacity: 0.9
anchors.right: favIcon.right
anchors.bottom: favIcon.bottom
source: "../flags/"+countrycode.toLowerCase()+".png"
} */
// }
Label {
id: nameLabel
anchors.bottom: countryLabel.top
// anchors.bottomMargin: Theme.paddingSmall
anchors.left: favIcon.right
anchors.right: fav.left
anchors.leftMargin: Theme.paddingLarge
anchors.rightMargin: Theme.paddingMedium
elide: Text.ElideRight
width: parent.width - (favIcon.width + (Theme.paddingLarge * 2))
text: lastcheckok == "1" ? name : " [DOWN] "+name
color: lastcheckok == "1" ? Theme.primaryColor : Theme.secondaryColor
font.strikeout: lastcheckok == "1" ? false : true
font.pixelSize: Theme.fontSizeSmall
}
Image {
id:countryImage
height: countryLabel.height * 0.8
anchors.leftMargin: Theme.paddingLarge
fillMode: Image.PreserveAspectFit
opacity: 0.7
anchors.left: favIcon.right
anchors.bottom: countryLabel.bottom
source: "../flags/"+countrycode.toLowerCase()+".png"
}
Label {
id: countryLabel
anchors.verticalCenter: parent.verticalCenter
anchors.left: countryImage.right
anchors.leftMargin: Theme.paddingMedium
font.pixelSize: Theme.fontSizeExtraSmall
text: radioBrowser.getCountryName(countrycode)//"Country name"//getAll(hls,codec,bitrate)
color: delegate.highlighted ? Theme.highlightColor : Theme.secondaryColor
}
Label {
id: codecLabel
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.leftMargin: Theme.paddingLarge
font.pixelSize: Theme.fontSizeExtraSmall
text: JS.getAll(hls,codec,bitrate)
color: delegate.highlighted ? Theme.highlightColor : Theme.secondaryColor
}
Label {
id: tagLabel
anchors.top: countryLabel.bottom
//anchors.topMargin: Theme.paddingSmall
anchors.left: favIcon.right
anchors.leftMargin: Theme.paddingLarge
font.pixelSize: Theme.fontSizeExtraSmall
width: parent.width - (favIcon.width + (Theme.paddingLarge * 2))
elide: Text.ElideRight
text: tags
color: delegate.highlighted ? Theme.highlightColor : Theme.secondaryColor
}
Image {
id: fav
height: nameLabel.height * 0.8
width: height
fillMode: Image.PreserveAspectFit
opacity: 0.8
visible: favo
anchors.right: parent.right
anchors.verticalCenter: nameLabel.verticalCenter
//anchors.top: nameLabel.top
anchors.rightMargin: Theme.paddingMedium
source: "image://theme/icon-m-favorite-selected" //favo ? "image://theme/icon-m-favorite-selected" : "image://theme/icon-m-favorite"
}
//onFavoChanged: if (favo) setRadioData()
onClicked: {
if (model.url_resolved !== radioPlayer._url_resolved) {
radioPlayer._favicon = model.favicon
radioPlayer._name = model.name
radioPlayer._countrycode = model.countrycode
radioPlayer._tags = model.tags
radioPlayer._codec = model.codec//getCodec(model.codec)
radioPlayer._bitrate = model.bitrate //getBitrate(model.bitrate)
radioPlayer._hls = model.hls
radioPlayer._url_resolved = model.url_resolved
radioPlayer._homepage = model.homepage
radioPlayer._stationuuid = model.stationuuid
radioPlayer._favorite = favo
radioPlayer.clicked = false
} else radioPlayer.clicked = true
}
}

View File

@ -0,0 +1,109 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
import QtGraphicalEffects 1.0
//import "../../helpers/jsFunctions.js" as JS
Column {
property string stationImage: "" //stationImage
property string stationLabel: "" //imagelabel
property bool flag: false
property string flagimage: "" //flagimage
property bool stationBorder: true
property alias imageVisible: stationimage.visible
spacing: Theme.paddingMedium
Rectangle {
width: parent.width
height: width
color: Theme.overlayBackgroundColor
border.color: stationBorder ? Theme.rgba(Theme.highlightBackgroundColor, 0.8) : "transparent"
anchors.horizontalCenter: parent.horizontalCenter
//border.width:
//onWidthChanged: console.log(" *********** WIDTH: "+width)
/* BusyIndicator {
z:99
size: BusyIndicatorSize.Medium
anchors.centerIn: stationimage
running: stationimage.loading && stationImage !== ""//appActive && stationimage.status != Image.Ready
} */
Image {
property bool loading: false
id: stationimage
width: parent.width - (Theme.paddingSmall * 2)
height: width
anchors.centerIn: parent
fillMode: Image.PreserveAspectFit
visible: false
source: stationImage ? Qt.resolvedUrl(stationImage) : ""// ? stationImage : stationimage.visible = false
/* BusyIndicator {
size: BusyIndicatorSize.Medium
anchors.centerIn: stationimage
running: stationimage.status != Image.Ready && stationimage.visible//appActive && stationimage.status != Image.Ready
} */
onStatusChanged:
switch(stationimage.status){
case Image.Null:
loading = false
visible = false
break;
case Image.Ready:
loading = false
visible = true
break;
case Image.Loading:
loading = true
break;
case Image.Error:
loading = false
visible = false
break;
default:
loading = false
visible = false
}
}
Label {
id: stationlabel
anchors.fill: stationimage
anchors.margins: Theme.paddingMedium
visible: !stationimage.visible
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
width: parent.width - (parent.border.width * 2)
height: width
text: stationLabel ? stationLabel : "AllRadio"//lastcheckok == "1" ? name : " [DOWN] "+name
color: Theme.primaryColor//stationlabel === "1" ? Theme.lightPrimaryColor : Theme.secondaryColor
wrapMode: Text.WordWrap
maximumLineCount: 4
//font.strikeout: lastcheckok == "1" ? false : true
font.pixelSize: Theme.fontSizeHuge * 4
fontSizeMode: Text.Fit
font.bold: true
opacity: 0.6
}
/* Glow {
id: stationglow
visible: stationlabel.visible
radius: Math.round((parent.width / Screen.width) * 10)
samples: radius * 2
spread: radius / 10//0.9//parent.width / Screen.width
//opacity: 0.4
transparentBorder: true
color: Theme.secondaryColor//JS.getRandomColor()
source: stationlabel
anchors.fill: stationlabel
} */
Image {
id:countryImage
visible: flag
width: Theme.itemSizeSmall * 0.5
anchors.top: stationimage.visible ? stationimage.top : parent.top
anchors.right: stationimage.visible ? stationimage.right : parent.right
anchors.margins: Theme.paddingMedium
fillMode: Image.PreserveAspectFit
source: flagimage
}
}
}

View File

@ -0,0 +1,34 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
import QtGraphicalEffects 1.0
import "../helpers/jsFunctions.js" as JSfunctions
ListItem {
id: delegate
property bool flagVisible: false
height: parent.height //Theme.itemSizeHuge * 2
width: height * 0.83
contentHeight: height
contentWidth: width
Column {
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: Theme.paddingMedium
spacing: Theme.paddingMedium
RadioImage {id:stationimage;anchors.horizontalCenter: parent.horizontalCenter; width: delegate.width * 0.8;stationImage: favicon ? favicon : ""; flag: flagVisible;stationLabel: name;flagimage: "../flags/"+countrycode.toLowerCase()+".png"}
Label {
id: nameLabel
horizontalAlignment: Text.AlignHCenter
elide: Text.ElideRight
width: stationimage.width
height: Theme.itemSizeExtraSmall
text: lastcheckok === "1" ? name : " [DOWN] "+name
color: lastcheckok === "1" ? Theme.primaryColor : Theme.secondaryColor
wrapMode: Text.WordWrap
maximumLineCount: 2
font.strikeout: lastcheckok === "1" ? false : true
font.pixelSize: Theme.fontSizeTiny
}
}
}

View File

@ -0,0 +1,34 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
import QtGraphicalEffects 1.0
import "../helpers/jsFunctions.js" as JSfunctions
ListItem {
id: delegate
property bool flagVisible: false
height: parent.height //Theme.itemSizeHuge * 2
width: height * 0.83
contentHeight: height
contentWidth: width
Column {
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: Theme.paddingMedium
spacing: Theme.paddingMedium
TagImage {id:stationimage;anchors.horizontalCenter: parent.horizontalCenter; width: delegate.width * 0.8;stationImage: ""; stationLabel: tag;}
Label {
id: nameLabel
horizontalAlignment: Text.AlignHCenter
elide: Text.ElideRight
width: stationimage.width
height: Theme.itemSizeExtraSmall
text: tag ? tag : "No Tag"
color: Theme.primaryColor
wrapMode: Text.WordWrap
maximumLineCount: 2
//font.strikeout: lastcheckok == "1" ? false : true
font.pixelSize: Theme.fontSizeTiny
}
}
}

View File

@ -0,0 +1,154 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
import QtGraphicalEffects 1.0
import "../helpers/jsFunctions.js" as JSfunctions
ListItem {
id: delegate
property alias favIcon: favIcon
property alias contextMenuHeight: contextMenu.height
//property bool favo: favorite ? true : false
property variant view
enabled: lastcheckok
opacity: lastcheckok ? 1.0 : 0.3
// property bool favorite: false
height: menuOpen ? contextMenu.height + Theme.itemSizeExtraLarge : Theme.itemSizeExtraLarge
menu: contextMenu
contentHeight: Theme.itemSizeExtraLarge
showMenuOnPressAndHold: true
ContextMenu {
id: contextMenu
MenuItem {
Row {
anchors.centerIn: parent
spacing: Theme.paddingMedium
Image {
source: "image://theme/icon-m-like"
anchors.verticalCenter: parent.verticalCenter
height: Theme.itemSizeExtraSmall * 0.5
width: height
fillMode: Image.PreserveAspectFit
}
Label {
font.pixelSize: Theme.fontSizeSmall
text: qsTr("Vote on Community Radio Browser")
}
}
onClicked: console.log("LIKE!!!") //remove()//listView.currentItem.remove(rpindex,rpsource) //listView.remorseAction();
}
MenuItem {
Row {
anchors.centerIn: parent
spacing: Theme.paddingMedium
Image {
//source: favo ? "image://theme/icon-m-favorite-selected" : "image://theme/icon-m-favorite"
anchors.verticalCenter: parent.verticalCenter
height: Theme.itemSizeExtraSmall * 0.5
width: height
fillMode: Image.PreserveAspectFit
}
Label {
font.pixelSize: Theme.fontSizeSmall
//text: favo ? qsTr("Remove from favorites") : qsTr("Add to favorites")
}
}
onClicked: {
favo ? favo = false : favo = true
//radioPlayer._favorite = favo
radioPlayer.setStationFavorite(stationuuid,name,countrycode,homepage,url_resolved,favicon,tags,codec,bitrate,hls,favo)
}
}
}
RadioImage {
id: favIcon
anchors.left: parent.left
anchors.leftMargin: Theme.paddingSmall
anchors.verticalCenter: parent.verticalCenter
height: Theme.itemSizeLarge//nameLabel.height + codecLabel.height + tagLabel.height
width: height
stationImage: favicon ? favicon : ""
stationLabel: name
//radius: 20
}
Label {
id: nameLabel
anchors.bottom: countryLabel.top
// anchors.bottomMargin: Theme.paddingSmall
anchors.left: favIcon.right
anchors.right: fav.left
anchors.leftMargin: Theme.paddingLarge
anchors.rightMargin: Theme.paddingMedium
elide: Text.ElideRight
width: parent.width - (favIcon.width + (Theme.paddingLarge * 2))
text: lastcheckok == "1" ? name : " [DOWN] "+name
color: lastcheckok == "1" ? Theme.primaryColor : Theme.secondaryColor
font.strikeout: lastcheckok == "1" ? false : true
font.pixelSize: Theme.fontSizeSmall
}
Image {
id:countryImage
height: countryLabel.height * 0.8
anchors.leftMargin: Theme.paddingLarge
fillMode: Image.PreserveAspectFit
opacity: 0.7
anchors.left: favIcon.right
anchors.bottom: countryLabel.bottom
source: countrycode ? "../flags/"+countrycode.toLowerCase()+".png" : ""
}
Label {
id: countryLabel
anchors.verticalCenter: parent.verticalCenter
anchors.left: countryImage.right
anchors.leftMargin: Theme.paddingMedium
font.pixelSize: Theme.fontSizeExtraSmall
text: countrycode ? radioBrowser.getCountryName(countrycode) : "No country"//"Country name"//getAll(hls,codec,bitrate)
color: delegate.highlighted ? Theme.highlightColor : Theme.secondaryColor
}
Label {
id: codecLabel
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.leftMargin: Theme.paddingLarge
anchors.rightMargin: Theme.paddingSmall
font.pixelSize: Theme.fontSizeExtraSmall
text: lastcheckok ? JSfunctions.getAll(hls,codec,bitrate) : "[OFFLINES]"
color: delegate.highlighted ? Theme.highlightColor : Theme.secondaryColor
}
Label {
id: tagLabel
anchors.top: countryLabel.bottom
//anchors.topMargin: Theme.paddingSmall
anchors.left: favIcon.right
anchors.leftMargin: Theme.paddingLarge
font.pixelSize: Theme.fontSizeExtraSmall
font.italic: true
width: parent.width - (favIcon.width + (Theme.paddingLarge * 2))
elide: Text.ElideRight
text: tags
color: delegate.highlighted ? Theme.highlightColor : Theme.secondaryColor
}
Image {
id: fav
height: nameLabel.height * 0.8
width: height
fillMode: Image.PreserveAspectFit
opacity: 0.8
visible: false//favo
anchors.right: parent.right
anchors.verticalCenter: nameLabel.verticalCenter
//anchors.top: nameLabel.top
anchors.rightMargin: Theme.paddingMedium
source: "image://theme/icon-m-favorite-selected" //favo ? "image://theme/icon-m-favorite-selected" : "image://theme/icon-m-favorite"
}
//onFavoChanged: if (favo) setRadioData()
}

View File

@ -0,0 +1,50 @@
import QtQuick 2.0
import QtGraphicalEffects 1.0
import Sailfish.Silica 1.0
Rectangle {
property alias text: text.text
property bool down: false
property alias fontSize: text.font.pixelSize
property alias fontColor: text.color
property alias icon: image.source
property alias iconVisible: image.visible
signal buttonClick()
height: column.height
width: column.width
color: "transparent"// !down ? Theme.highlightDimmerColor : "transparent"
opacity: !down ? 0.8 : 1.0
//anchors.fill: parent
Column {
id: column
anchors.centerIn: parent
Image {
id: image
height: visible ? Theme.itemSizeExtraSmall * 0.8 : 0
anchors.horizontalCenter: parent.horizontalCenter
width: height
}
Label {
id: text
visible: text.text !== "" ? true : false
anchors.horizontalCenter: parent.horizontalCenter
color: down ? Theme.primaryColor : Theme.secondaryColor//highlighted ? Theme.primaryColor : Theme.secondaryColor
// font.bold: down ? true : false
}
Rectangle {
anchors.horizontalCenter: parent.horizontalCenter
visible: down
width: text.width
height: Theme.paddingSmall * 0.4
color: fontColor//Theme.secondaryHighlightColor
}
}
MouseArea {
anchors.fill: parent
onClicked: parent.buttonClick()
}
}

View File

@ -0,0 +1,39 @@
import QtQuick 2.0
Item {
property string page: "FavoritesTab.qml"
property real showP: 0.0
property int tab: 0
width: parent.width
height: Theme.itemSizeMedium//play.height + (Theme.paddingMedium * 2)
Row {
id: row
width: parent.width
height: parent.height//Theme.itemSizeMedium//play.height + (Theme.paddingMedium * 2)
anchors.verticalCenter: parent.verticalCenter
TabButton {
id: home
down: tab === 0
width: parent.width / 3
// icon: "image://theme/icon-m-home" //"image://theme/icon-m-video"
text: "Favorites"
onButtonClick: {showP=0.0;tab = 0}
}
TabButton {
id: search
down: tab === 1
width: parent.width / 3
// icon: "image://theme/icon-m-search"
text: "History"
onButtonClick: {showP=0.0;tab = 1}
}
TabButton {
id: favorite
down: tab === 2
width: parent.width / 3
// icon: "image://theme/icon-m-favorite"
text: "Search"
onButtonClick: {showP=0.0;tab = 2;console.log("CLICK")}
}
}
}

106
qml/delegates/TagImage.qml Normal file
View File

@ -0,0 +1,106 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
import QtGraphicalEffects 1.0
//import "../../helpers/jsFunctions.js" as JS
Column {
property string stationImage: "" //stationImage
property string stationLabel: "" //imagelabel
property bool flag: false
property string flagimage: "" //flagimage
spacing: Theme.paddingMedium
Rectangle {
width: parent.width
height: width
color: Theme.overlayBackgroundColor
border.color: Theme.rgba(Theme.highlightBackgroundColor, 0.8)
anchors.horizontalCenter: parent.horizontalCenter
//onWidthChanged: console.log(" *********** WIDTH: "+width)
/* BusyIndicator {
z:99
size: BusyIndicatorSize.Medium
anchors.centerIn: stationimage
running: stationimage.loading && stationImage !== ""//appActive && stationimage.status != Image.Ready
} */
Image {
property bool loading: false
id: stationimage
width: parent.width - (Theme.paddingSmall * 2)
height: width
anchors.centerIn: parent
fillMode: Image.PreserveAspectFit
visible: false
source: stationImage ? stationImage : ""// ? stationImage : stationimage.visible = false
/* BusyIndicator {
size: BusyIndicatorSize.Medium
anchors.centerIn: stationimage
running: stationimage.status != Image.Ready && stationimage.visible//appActive && stationimage.status != Image.Ready
} */
onStatusChanged:
switch(stationimage.status){
case Image.Null:
loading = false
visible = false
break;
case Image.Ready:
loading = false
visible = true
break;
case Image.Loading:
loading = true
break;
case Image.Error:
loading = false
visible = false
break;
default:
loading = false
visible = false
}
}
Label {
id: stationlabel
anchors.fill: stationimage
anchors.margins: Theme.paddingMedium
visible: !stationimage.visible
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
width: parent.width - (parent.border.width * 2)
height: width
text: stationLabel ? stationLabel : "No Tag"//lastcheckok == "1" ? name : " [DOWN] "+name
color: stationlabel === "1" ? Theme.lightPrimaryColor : Theme.secondaryColor
wrapMode: Text.WordWrap
maximumLineCount: 4
//font.strikeout: lastcheckok == "1" ? false : true
font.pixelSize: Theme.fontSizeHuge
fontSizeMode: Text.Fit
font.bold: false
opacity: 0.5
}
Glow {
id: stationglow
visible: stationlabel.visible
radius: Math.round((parent.width / Screen.width) * 10)
samples: radius * 2
spread: 0.7//parent.width / Screen.width
transparentBorder: true
color: Theme.secondaryHighlightColor//JS.getRandomColor()
source: stationlabel
anchors.fill: stationlabel
}
Image {
id:countryImage
visible: flag
width: Theme.itemSizeSmall * 0.5
anchors.top: stationimage.visible ? stationimage.top : parent.top
anchors.right: stationimage.visible ? stationimage.right : parent.right
anchors.margins: Theme.paddingMedium
fillMode: Image.PreserveAspectFit
source: flagimage
}
}
}

BIN
qml/flags/0 country.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
qml/flags/ad.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

BIN
qml/flags/ae.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
qml/flags/af.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

BIN
qml/flags/ag.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

BIN
qml/flags/ai.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
qml/flags/al.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

BIN
qml/flags/am.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
qml/flags/an.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
qml/flags/ao.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
qml/flags/aq.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

BIN
qml/flags/ar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
qml/flags/as.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

BIN
qml/flags/at.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
qml/flags/au.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

BIN
qml/flags/aw.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
qml/flags/ax.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
qml/flags/az.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
qml/flags/ba.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

BIN
qml/flags/bb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
qml/flags/bd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
qml/flags/be.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
qml/flags/bf.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
qml/flags/bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
qml/flags/bh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
qml/flags/bi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
qml/flags/bj.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
qml/flags/bl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
qml/flags/bm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

BIN
qml/flags/bn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

BIN
qml/flags/bo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

BIN
qml/flags/bq.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
qml/flags/br.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

BIN
qml/flags/bs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
qml/flags/bt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
qml/flags/bv.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
qml/flags/bw.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
qml/flags/by.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

BIN
qml/flags/bz.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
qml/flags/ca.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
qml/flags/cc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

BIN
qml/flags/cd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

BIN
qml/flags/cf.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
qml/flags/cg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

BIN
qml/flags/ch.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
qml/flags/ci.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
qml/flags/ck.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

BIN
qml/flags/cl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
qml/flags/cm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
qml/flags/cn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
qml/flags/co.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
qml/flags/cr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
qml/flags/cu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
qml/flags/cv.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
qml/flags/cw.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
qml/flags/cx.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

BIN
qml/flags/cy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

BIN
qml/flags/cz.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
qml/flags/de.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
qml/flags/dj.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

BIN
qml/flags/dk.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
qml/flags/dm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

BIN
qml/flags/do.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
qml/flags/dz.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
qml/flags/ec.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

BIN
qml/flags/ee.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
qml/flags/eg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
qml/flags/eh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

BIN
qml/flags/er.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

BIN
qml/flags/es.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

BIN
qml/flags/et.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
qml/flags/fi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
qml/flags/fj.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

BIN
qml/flags/fk.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

BIN
qml/flags/fm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
qml/flags/fo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
qml/flags/fr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
qml/flags/ga.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
qml/flags/gb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
qml/flags/gd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
qml/flags/ge.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
qml/flags/gf.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Some files were not shown because too many files have changed in this diff Show More