Skip to content
Permalink
Browse files

Merge branch 'dev' into feature/322-WiFi_rewrite

  • Loading branch information
zehnm committed Dec 20, 2019
2 parents 058856d + 2ef2b24 commit bf66aee2437545bfefa0da743e8eecee9d99c568
Showing with 4,170 additions and 872 deletions.
  1. +10 βˆ’8 MainContainer.qml
  2. +149 βˆ’0 basic_ui/ContextMenu.qml
  3. +52 βˆ’0 basic_ui/ContextMenuIcon.qml
  4. +3 βˆ’2 basic_ui/MiniMediaPlayer.qml
  5. +1 βˆ’0 basic_ui/StatusBar.qml
  6. +34 βˆ’0 basic_ui/Tag.qml
  7. +16 βˆ’16 basic_ui/settings/PowerSaving.qml
  8. +17 βˆ’37 components/ButtonBase.qml
  9. +17 βˆ’14 components/blind/ui/Button.qml
  10. +5 βˆ’11 components/blind/ui/Card.qml
  11. +17 βˆ’15 components/light/ui/Button.qml
  12. +75 βˆ’0 components/media_player/sources/albummodel_mediaplayer.cpp
  13. +120 βˆ’0 components/media_player/sources/albummodel_mediaplayer.h
  14. +145 βˆ’0 components/media_player/sources/searchmodel_mediaplayer.cpp
  15. +127 βˆ’0 components/media_player/sources/searchmodel_mediaplayer.h
  16. +211 βˆ’0 components/media_player/ui/AlbumView.qml
  17. +14 βˆ’26 components/media_player/ui/Button.qml
  18. +45 βˆ’45 components/media_player/ui/Card.qml
  19. +14 βˆ’2 components/media_player/ui/CardHome.qml
  20. +231 βˆ’0 components/media_player/ui/CardPlaylists.qml
  21. +653 βˆ’83 components/media_player/ui/CardSearch.qml
  22. +6 βˆ’4 components/remote/ui/ir/Card.qml
  23. BIN components/weather/images/rain.png
  24. BIN components/weather/images/snow.png
  25. BIN components/weather/images/wind.png
  26. +377 βˆ’0 components/weather/ui/Button.qml
  27. +232 βˆ’0 components/weather/ui/Card.qml
  28. BIN icons/icons.ttf
  29. +3 βˆ’0 images.qrc
  30. +14 βˆ’4 main.qml
  31. +8 βˆ’1 qml.qrc
  32. +38 βˆ’23 remote.pro
  33. +15 βˆ’5 sources/config.cpp
  34. +23 βˆ’16 sources/config.h
  35. +16 βˆ’6 sources/entities/blind.cpp
  36. +1 βˆ’1 sources/entities/blind.h
  37. +8 βˆ’2 sources/entities/blindinterface.h
  38. +73 βˆ’45 sources/entities/entities.cpp
  39. +31 βˆ’20 sources/entities/entities.h
  40. +8 βˆ’10 sources/entities/entitiesinterface.h
  41. +94 βˆ’46 sources/entities/entity.cpp
  42. +37 βˆ’16 sources/entities/entity.h
  43. +26 βˆ’3 sources/entities/entityinterface.h
  44. +28 βˆ’10 sources/entities/light.cpp
  45. +6 βˆ’4 sources/entities/light.h
  46. +8 βˆ’2 sources/entities/lightinterface.h
  47. +137 βˆ’84 sources/entities/mediaplayer.cpp
  48. +61 βˆ’48 sources/entities/mediaplayer.h
  49. +16 βˆ’4 sources/entities/mediaplayerinterface.h
  50. +67 βˆ’35 sources/entities/remote.cpp
  51. +14 βˆ’47 sources/entities/remote.h
  52. +115 βˆ’0 sources/entities/remoteinterface.h
  53. +81 βˆ’0 sources/entities/weather.cpp
  54. +63 βˆ’0 sources/entities/weather.h
  55. +73 βˆ’0 sources/entities/weatherinterface.h
  56. +4 βˆ’4 sources/hardware/drv2605.cpp
  57. +6 βˆ’4 sources/hardware/proximity_gesture_control.h
  58. +4 βˆ’3 sources/hardware/touchdetect.h
  59. +33 βˆ’18 sources/integrations/integration.h
  60. +11 βˆ’13 sources/integrations/integrationinterface.h
  61. +8 βˆ’9 sources/integrations/integrations.cpp
  62. +4 βˆ’2 sources/integrations/integrations.h
  63. +1 βˆ’1 sources/integrations/integrationsinterface.h
  64. +31 βˆ’0 sources/integrations/plugininterface.h
  65. +233 βˆ’73 sources/logger.cpp
  66. +101 βˆ’36 sources/logger.h
  67. +1 βˆ’1 sources/main.cpp
  68. +3 βˆ’3 sources/notifications.h
  69. +92 βˆ’10 sources/yioapi.cpp
  70. +3 βˆ’0 sources/yioapi.h
@@ -55,15 +55,17 @@ Item {
switch (button) {
case "dpad right":
if (loader_main.item.mainNavigationSwipeview.currentIndex < loader_main.item.mainNavigationSwipeview.count-1) {
loader_main.item.mainNavigationSwipeview.currentIndex += 1;
// loader_main.item.mainNavigationSwipeview.currentIndex += 1;
loader_main.item.mainNavigationSwipeview.incrementCurrentIndex();
// mainNavigation.mainNavigationListView.currentIndex += 1;
} else {
haptic.playEffect("buzz");
}
break;
case "dpad left":
if (loader_main.item.mainNavigationSwipeview.currentIndex > 0) {
loader_main.item.mainNavigationSwipeview.currentIndex -= 1;
// loader_main.item.mainNavigationSwipeview.currentIndex -= 1;
loader_main.item.mainNavigationSwipeview.decrementCurrentIndex();
// mainNavigation.mainNavigationListView.currentIndex -= 1;
} else {
haptic.playEffect("buzz");
@@ -156,7 +158,7 @@ Item {

onStatusChanged: {
if (status == Loader.Ready) {
itemsLoaded += 1
itemsLoaded += 1;
}
}
}
@@ -166,7 +168,7 @@ Item {
// change navigation index after startup
if (mainNavigationSwipeview.count == mainNavigation.menuConfig.count && !startUp) {
startUp = true
mainNavigationSwipeview.currentIndex = 0
mainNavigationSwipeview.setCurrentIndex(0);
}

if (startUp) {
@@ -175,7 +177,7 @@ Item {

if (itemsLoaded >= 3) {
if (mainNavigation.mainNavigationListView.count !== 0 && !mainNavigation.mainNavigationListView.currentItem && !mainNavigation.mainNavigationListView.currentItem.held) {
mainNavigation.mainNavigationListView.currentIndex = currentIndex
mainNavigation.mainNavigationListView.currentIndex = currentIndex ;
mainNavigation.mainNavigationListView.positionViewAtIndex(currentIndex, ListView.Center)
}
}
@@ -218,17 +220,17 @@ Item {
target: entities

onMediaplayersPlayingChanged: {
if (!miniMediaPlayerLoader.active) {
if (!miniMediaPlayerLoader.active && entities.mediaplayersPlaying.length !== 0) {
miniMediaPlayer.height = 90;
miniMediaPlayerLoader.setSource("qrc:/basic_ui/MiniMediaPlayer.qml")
miniMediaPlayerLoader.active = true;
}

if (entities.mediaplayersPlaying.length === 0) {
if (entities.mediaplayersPlaying.length === 0 && miniMediaPlayer.miniMediaPlayerLoader.active) {
loader_main.state = "visible";
miniMediaPlayer.height = 0;
miniMediaPlayer.miniMediaPlayerLoader.source = "";
miniMediaPlayer.miniMediaPlayerLoader.active = false;
miniMediaPlayer.miniMediaPlayerLoader.source = "";
}
}
}
@@ -0,0 +1,149 @@
import QtQuick 2.11

Rectangle {
id: main
width: parent.width
height: 100+(80*list.length)
radius: cornerRadius
color: colorBackground

property var list: []
property string id
property string type

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// STATES
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
state: "closed"

Component.onCompleted: {
state = "open";
}


states: [
State { name: "closed";
PropertyChanges {target: main; y: main.height; enabled: false }
},
State { name: "open";
PropertyChanges {target: main; y: 0; enabled: true }
}
]
transitions: [
Transition {to: "closed";
SequentialAnimation {
PropertyAnimation { target: main; properties: "y"; easing.type: Easing.OutExpo; duration: 300 }
}
},
Transition {to: "open";
SequentialAnimation {
PropertyAnimation { target: main; properties: "y"; easing.type: Easing.OutExpo; duration: 300 }
}
}
]

Flow {
anchors.fill: parent
spacing: 0

Item {
width: main.width
height: 20
}

Repeater {
model: list

Item {
width: main.width
height: 80

Text {
id: icon
color: colorText
text: {
if (list[index] == "PLAY")
return "\uE903"
else if (list[index] == "QUEUE")
return "\uE907"
else if (list[index] == "SONGRADIO")
return "\uE90A"
else
return ""
}
renderType: Text.NativeRendering
width: 70
height: 70
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
font { family: "icons"; pixelSize: 80 }
anchors.left: parent.left
anchors.leftMargin: 20
anchors.verticalCenter: parent.verticalCenter
}

Text {
text: {
if (list[index] == "PLAY")
return "Play"
else if (list[index] == "QUEUE")
return "Add to queue"
else if (list[index] == "SONGRADIO")
return "Go to song radio"
else
return "Not supported"
}
color: colorText
anchors.left: icon.right
anchors.leftMargin: 20
anchors.verticalCenter: parent.verticalCenter
font.family: "Open Sans"
font.pixelSize: 27
lineHeight: 1
}

MouseArea {
anchors.fill: parent
onClicked: {
haptic.playEffect("click");
if (list[index] == "PLAY")
obj.playMedia(id, type);
else if (list[index] == "QUEUE")
obj.addToQueue(id, type);
else if (list[index] == "SONGRADIO")
obj.songRadio(id, type);
else
return "Not supported"

main.state = "closed";
}
}
}
}

Item {
width: main.width
height: 80

Text {
text: qsTr("Cancel") + translateHandler.emptyString
color: colorText
opacity: 0.5
anchors.centerIn: parent
font.family: "Open Sans"
font.pixelSize: 25
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
lineHeight: 1
}

MouseArea {
anchors.fill: parent
onClicked: {
haptic.playEffect("click");
main.state = "closed";
}
}
}
}
}
@@ -0,0 +1,52 @@
import QtQuick 2.11

Rectangle {
id: circleButton
width: 30
height: 30
color: colorLine
radius: width/2

property var colorBg: colorBackground
property alias mouseArea: mouseArea


Rectangle {
width: 4
height: 4
color: colorBg
radius: width/2
anchors.left: parent.left
anchors.leftMargin: 8
anchors.verticalCenter: parent.verticalCenter
}

Rectangle {
width: 4
height: 4
color: colorBg
radius: width/2
anchors.centerIn: parent
}

Rectangle {
width: 4
height: 4
color: colorBg
radius: width/2
anchors.right: parent.right
anchors.rightMargin: 8
anchors.verticalCenter: parent.verticalCenter
}

MouseArea {
id: mouseArea
width: parent.width+20
height: parent.height+20
anchors.centerIn: parent

onClicked: {
haptic.playEffect("click");
}
}
}
@@ -26,6 +26,7 @@ import QtGraphicalEffects 1.0

import "qrc:/basic_ui" as BasicUI

import Entity.MediaPlayer 1.0
import MediaPlayerUtils 1.0

Item {
@@ -551,7 +552,7 @@ Item {
width: 120
height: 120

property bool isPlaying: entities.mediaplayersPlaying[mediaPlayers.currentIndex] && entities.mediaplayersPlaying[mediaPlayers.currentIndex].state == 3 ? true : false
property bool isPlaying: entities.mediaplayersPlaying[mediaPlayers.currentIndex] && entities.mediaplayersPlaying[mediaPlayers.currentIndex].state == MediaPlayer.PLAYING ? true : false

anchors {
horizontalCenter: parent.horizontalCenter
@@ -599,7 +600,7 @@ Item {

onClicked: {
haptic.playEffect("click");
if (entities.mediaplayersPlaying[mediaPlayers.currentIndex].state == 3) {
if (entities.mediaplayersPlaying[mediaPlayers.currentIndex].state == MediaPlayer.PLAYING ) {
entities.mediaplayersPlaying[mediaPlayers.currentIndex].pause();
} else {
entities.mediaplayersPlaying[mediaPlayers.currentIndex].play();
@@ -45,6 +45,7 @@ Item {

Connections {
target: loader_main.item.mainNavigationSwipeview.currentItem.mainNavigationLoader.item
ignoreUnknownSignals: true

onScrollupBegin: {
bg.opacity = 1;
@@ -0,0 +1,34 @@
import QtQuick 2.0

Rectangle {
id: main
width: title.implicitWidth + 40
height: 40
color: selected ? colorLine : colorBackgroundTransparent
radius: height/2
border.color: colorLine
border.width: 2
opacity: selected ? 1 : 0.5

Behavior on opacity {
PropertyAnimation {
duration: 300
easing.type: Easing.OutExpo
}
}

property bool selected: false
property alias tag: title.text

Text {
id: title
color: selected ? colorBackground : colorText
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font.family: "Open Sans"
font.pixelSize: 20
lineHeight: 1
anchors.centerIn: parent
}

}

0 comments on commit bf66aee

Please sign in to comment.
You can’t perform that action at this time.