Skip to content
Permalink
Browse files

UI update

  • Loading branch information...
martonborzak committed Jul 16, 2019
1 parent 51174f0 commit 82b1fb392157eafef621fb0ef6eb498e81e53134
Showing with 113 additions and 50 deletions.
  1. 0 LICENSE
  2. 0 README.md
  3. 0 crowdin.yml
  4. BIN hardware/PCB/dock schematics.pdf
  5. BIN hardware/PCB/sensor schematics.pdf
  6. BIN hardware/PCB/touch remote schematics.pdf
  7. BIN hardware/dock/dock-bottom.stl
  8. 0 hardware/dock/dock-ring.step
  9. BIN hardware/dock/dock-ring.stl
  10. BIN hardware/dock/dock.stl
  11. BIN hardware/housing/housing-back.stl
  12. 0 hardware/housing/housing-front.step
  13. BIN hardware/housing/housing-front.stl
  14. BIN hardware/housing/housing-pogo-insert.stl
  15. 0 software/.gitignore
  16. 0 software/README.md
  17. 0 software/_!_software setup.txt
  18. 0 software/helper scripts/uptime.sh
  19. 0 software/helper scripts/wifi_rssi.sh
  20. 0 software/remote/.gitignore
  21. 0 software/remote/ButtonHandler.qml
  22. +14 โˆ’0 software/remote/MainContainer.qml
  23. 0 software/remote/StandbyControl.qml
  24. 0 software/remote/basic_ui/ChargingScreen.qml
  25. 0 software/remote/basic_ui/ClosingScreen.qml
  26. 0 software/remote/basic_ui/CustomButton.qml
  27. 0 software/remote/basic_ui/CustomButtonState.qml
  28. 0 software/remote/basic_ui/CustomSwitch.qml
  29. +13 โˆ’9 software/remote/basic_ui/LoadingScreen.qml
  30. 0 software/remote/basic_ui/MainNavigation.qml
  31. 0 software/remote/basic_ui/Notification.qml
  32. 0 software/remote/basic_ui/NotificationDrawer.qml
  33. 0 software/remote/basic_ui/PopupLowBattery.qml
  34. 0 software/remote/basic_ui/ProgressCircle.qml
  35. 0 software/remote/basic_ui/Settings.qml
  36. 0 software/remote/basic_ui/StatusBar.qml
  37. +19 โˆ’0 software/remote/basic_ui/pages/area.qml
  38. +7 โˆ’7 software/remote/basic_ui/pages/dashboard.qml
  39. +29 โˆ’2 software/remote/basic_ui/pages/device.qml
  40. 0 software/remote/basic_ui/pages/settings.qml
  41. 0 software/remote/basic_ui/settings/Battery.qml
  42. 0 software/remote/basic_ui/settings/Devices.qml
  43. 0 software/remote/basic_ui/settings/Display.qml
  44. 0 software/remote/basic_ui/settings/Hubs.qml
  45. 0 software/remote/basic_ui/settings/Languages.qml
  46. 0 software/remote/basic_ui/settings/Network.qml
  47. 0 software/remote/basic_ui/settings/PowerSaving.qml
  48. 0 software/remote/basic_ui/settings/Softwareupdate.qml
  49. 0 software/remote/basic_ui/settings/System.qml
  50. BIN software/remote/components/light/images/icon-light.png
  51. 0 software/remote/components/light/ui/Button.qml
  52. 0 software/remote/components/light/ui/CardColor.qml
  53. 0 software/remote/components/light/ui/CardDimmable.qml
  54. 0 software/remote/components/light/ui/CardSwitch.qml
  55. 0 software/remote/images.qrc
  56. BIN software/remote/images/chargingscreen/icon-battery-lightning.png
  57. BIN software/remote/images/components/close_button.png
  58. BIN software/remote/images/components/fav-minus.png
  59. BIN software/remote/images/components/fav-plus.png
  60. BIN software/remote/images/navigation/icon-area-0.png
  61. BIN software/remote/images/navigation/icon-area-1.png
  62. BIN software/remote/images/navigation/icon-area-2.png
  63. BIN software/remote/images/navigation/icon-area-3.png
  64. BIN software/remote/images/navigation/icon-blind.png
  65. BIN software/remote/images/navigation/icon-favorites.png
  66. BIN software/remote/images/navigation/icon-light.png
  67. BIN software/remote/images/navigation/icon-settings.png
  68. BIN software/remote/images/notification/icon-notification-dismiss.png
  69. BIN software/remote/images/notification/icon-notification-error.png
  70. BIN software/remote/images/notification/icon-notification-normal.png
  71. BIN software/remote/images/popuplowbattery/icon-lowbattery.png
  72. BIN software/remote/images/settings/battery-level.png
  73. 0 software/remote/integrations/homeassistant/Light.qml
  74. 0 software/remote/integrations/homeassistant/homeassistant.qml
  75. 0 software/remote/integrations/homey/homey.qml
  76. 0 software/remote/integrations/integration.qml
  77. +30 โˆ’30 software/remote/main.qml
  78. 0 software/remote/qml.qrc
  79. +1 โˆ’2 software/remote/remote.pro
  80. 0 software/remote/scripts/helper.js
  81. 0 software/remote/scripts/softwareupdate.js
  82. 0 software/remote/sources/entities/blind.cpp
  83. 0 software/remote/sources/entities/blind.h
  84. 0 software/remote/sources/entities/entities.cpp
  85. 0 software/remote/sources/entities/entities.h
  86. 0 software/remote/sources/entities/entities.json
  87. 0 software/remote/sources/entities/entitiesinterface.h
  88. 0 software/remote/sources/entities/entity.cpp
  89. 0 software/remote/sources/entities/entity.h
  90. 0 software/remote/sources/entities/light.cpp
  91. 0 software/remote/sources/entities/light.h
  92. 0 software/remote/sources/hardware/apds9960.cpp
  93. 0 software/remote/sources/hardware/apds9960.h
  94. 0 software/remote/sources/hardware/bq27441.cpp
  95. 0 software/remote/sources/hardware/bq27441.h
  96. 0 software/remote/sources/hardware/display_control.cpp
  97. 0 software/remote/sources/hardware/display_control.h
  98. 0 software/remote/sources/hardware/drv2605.cpp
  99. 0 software/remote/sources/hardware/drv2605.h
  100. 0 software/remote/sources/hardware/interrupt_handler.h
  101. 0 software/remote/sources/hardware/mcp23017.h
  102. 0 software/remote/sources/hardware/proximity_gesture_control.h
  103. 0 software/remote/sources/hardware/touchdetect.h
  104. 0 software/remote/sources/integrations/homeassistant/homeassistant.cpp
  105. 0 software/remote/sources/integrations/homeassistant/homeassistant.h
  106. 0 software/remote/sources/integrations/homeassistant/homeassistant.json
  107. 0 software/remote/sources/integrations/homeassistant/homeassistant.pro
  108. 0 software/remote/sources/integrations/homeassistant/homeassistant.pro.user
  109. 0 software/remote/sources/integrations/integration.h
  110. 0 software/remote/sources/integrations/integrationinterface.h
  111. 0 software/remote/sources/integrations/openhab/openhab.cpp
  112. 0 software/remote/sources/integrations/openhab/openhab.h
  113. 0 software/remote/sources/integrations/openhab/openhab.json
  114. 0 software/remote/sources/integrations/openhab/openhab.pro
  115. 0 software/remote/sources/integrations/openhab/openhab.pro.user
  116. 0 software/remote/sources/jsonfile.cpp
  117. 0 software/remote/sources/jsonfile.h
  118. 0 software/remote/sources/launcher.cpp
  119. 0 software/remote/sources/launcher.h
  120. 0 software/remote/sources/main.cpp
  121. 0 software/remote/sources/translation.h
  122. 0 software/remote/translations.json
  123. 0 software/remote/translations.qrc
  124. BIN software/remote/translations/bg_BG.qm
  125. 0 software/remote/translations/bg_BG.ts
  126. BIN software/remote/translations/cs_CZ.qm
  127. 0 software/remote/translations/cs_CZ.ts
  128. BIN software/remote/translations/da_DK.qm
  129. 0 software/remote/translations/da_DK.ts
  130. BIN software/remote/translations/de_DE.qm
  131. 0 software/remote/translations/de_DE.ts
  132. BIN software/remote/translations/el_GR.qm
  133. 0 software/remote/translations/el_GR.ts
  134. 0 software/remote/translations/en_US.qm
  135. 0 software/remote/translations/en_US.ts
  136. BIN software/remote/translations/es_ES.qm
  137. 0 software/remote/translations/es_ES.ts
  138. BIN software/remote/translations/et_EE.qm
  139. 0 software/remote/translations/et_EE.ts
  140. BIN software/remote/translations/fi_FI.qm
  141. 0 software/remote/translations/fi_FI.ts
  142. BIN software/remote/translations/fr_CA.qm
  143. 0 software/remote/translations/fr_CA.ts
  144. BIN software/remote/translations/fr_FR.qm
  145. 0 software/remote/translations/fr_FR.ts
  146. BIN software/remote/translations/ga_IE.qm
  147. 0 software/remote/translations/ga_IE.ts
  148. BIN software/remote/translations/hr_HR.qm
  149. 0 software/remote/translations/hr_HR.ts
  150. BIN software/remote/translations/hu_HU.qm
  151. 0 software/remote/translations/hu_HU.ts
  152. 0 software/remote/translations/is_IS.ts
  153. BIN software/remote/translations/it_IT.qm
  154. 0 software/remote/translations/it_IT.ts
  155. BIN software/remote/translations/lt_LT.qm
  156. 0 software/remote/translations/lt_LT.ts
  157. BIN software/remote/translations/lv_LV.qm
  158. 0 software/remote/translations/lv_LV.ts
  159. BIN software/remote/translations/mt_MT.qm
  160. 0 software/remote/translations/mt_MT.ts
  161. BIN software/remote/translations/nl_NL.qm
  162. 0 software/remote/translations/nl_NL.ts
  163. BIN software/remote/translations/no_NO.qm
  164. 0 software/remote/translations/no_NO.ts
  165. BIN software/remote/translations/pl_PL.qm
  166. 0 software/remote/translations/pl_PL.ts
  167. BIN software/remote/translations/pt_BR.qm
  168. 0 software/remote/translations/pt_BR.ts
  169. BIN software/remote/translations/pt_PT.qm
  170. 0 software/remote/translations/pt_PT.ts
  171. BIN software/remote/translations/ro_RO.qm
  172. 0 software/remote/translations/ro_RO.ts
  173. 0 software/remote/translations/ru_BY.ts
  174. 0 software/remote/translations/ru_MD.ts
  175. 0 software/remote/translations/ru_RU.ts
  176. 0 software/remote/translations/ru_UA.ts
  177. BIN software/remote/translations/sk_SK.qm
  178. 0 software/remote/translations/sk_SK.ts
  179. BIN software/remote/translations/sl_SI.qm
  180. 0 software/remote/translations/sl_SI.ts
  181. BIN software/remote/translations/sv_SE.qm
  182. 0 software/remote/translations/sv_SE.ts
  183. 0 software/remote/translations/zh_CN.ts
0 LICENSE 100644 โ†’ 100755
No changes.
0 README.md 100644 โ†’ 100755
No changes.
0 crowdin.yml 100644 โ†’ 100755
No changes.
0 hardware/PCB/dock schematics.pdf 100644 โ†’ 100755
No changes.
0 hardware/PCB/sensor schematics.pdf 100644 โ†’ 100755
No changes.
No changes.
0 hardware/dock/dock-bottom.stl 100644 โ†’ 100755
No changes.
0 hardware/dock/dock-ring.step 100644 โ†’ 100755
No changes.
0 hardware/dock/dock-ring.stl 100644 โ†’ 100755
No changes.
0 hardware/dock/dock.stl 100644 โ†’ 100755
No changes.
0 hardware/housing/housing-back.stl 100644 โ†’ 100755
No changes.
0 hardware/housing/housing-front.step 100644 โ†’ 100755
No changes.
0 hardware/housing/housing-front.stl 100644 โ†’ 100755
No changes.
No changes.
0 software/.gitignore 100644 โ†’ 100755
No changes.
0 software/README.md 100644 โ†’ 100755
No changes.
0 software/_!_software setup.txt 100644 โ†’ 100755
No changes.
0 software/helper scripts/uptime.sh 100644 โ†’ 100755
No changes.
0 software/helper scripts/wifi_rssi.sh 100644 โ†’ 100755
No changes.
0 software/remote/.gitignore 100644 โ†’ 100755
No changes.
0 software/remote/ButtonHandler.qml 100644 โ†’ 100755
No changes.
14 software/remote/MainContainer.qml 100644 โ†’ 100755
@@ -76,6 +76,8 @@ Item {
property int itemsLoaded: 0
property bool startUp: false

property int prevIndex: 0

SwipeView {
id: mainNavigationSwipeview
width: parent.width
@@ -121,17 +123,29 @@ Item {
}

onCurrentIndexChanged: {
// change navigation index after startup
if (mainNavigationSwipeview.count == mainNavigation.menuConfig.count && !startUp) {
startUp = true
mainNavigationSwipeview.currentIndex = 0
}

if (startUp) {
mainNavigation.mainNavigationListView.currentIndex = currentIndex;
}

if (itemsLoaded >= 3) {
if (!mainNavigation.mainNavigationListView.currentItem && !mainNavigation.mainNavigationListView.currentItem.held) {
mainNavigation.mainNavigationListView.currentIndex = currentIndex
// mainNavigation.mainNavigationListView.positionViewAtIndex(currentIndex, ListView.Center)
}
}

// change the statusbar title
if (currentIndex != prevIndex && mainNavigationSwipeview.currentItem.mainNavigationLoader.item && mainNavigationSwipeview.currentItem.mainNavigationLoader.item.atYBeginning) {
statusBar.title = "";
} else if (mainNavigationSwipeview.currentItem.mainNavigationLoader.item) {
statusBar.title = mainNavigationSwipeview.currentItem.mainNavigationLoader.item.title;
}
}
}

0 software/remote/StandbyControl.qml 100644 โ†’ 100755
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
@@ -1,7 +1,7 @@
import QtQuick 2.11

Rectangle {
id: connectionLoader
id: loadingScreenComp
anchors.fill: parent
color: "#00000000"

@@ -37,6 +37,7 @@ Rectangle {
}
}
PauseAnimation {duration: 500}
PropertyAction { target: loadingScreenComp; property: "startAnimFinished"; value: true }
}

SequentialAnimation {
@@ -48,21 +49,24 @@ Rectangle {
PropertyAnimation { target: yio_O; properties: "opacity"; to: 0; easing.type: Easing.OutExpo; duration: 400 }
PauseAnimation {duration: 500}
ParallelAnimation {
PropertyAnimation { target: left; properties: "width"; to: 0; easing.type: Easing.Linear; duration: 1000 }
PropertyAnimation { target: right; properties: "width"; to: 0; easing.type: Easing.Linear; duration: 1000 }
PropertyAnimation { target: left; properties: "width"; to: 0; easing.type: Easing.Linear; duration: 800 }
PropertyAnimation { target: right; properties: "width"; to: 0; easing.type: Easing.Linear; duration: 800 }
}
PropertyAction { target: loadingScreenComp; property: "endAnimFinished"; value: true }
}

Connections {
target: startAnim
onFinished: {
property bool startAnimFinished: false;

onStartAnimFinishedChanged: {
if (startAnimFinished) {
loader_main.active = true;
}
}

Connections {
target: endAnim
onFinished: {
property bool endAnimFinished: false;

onEndAnimFinishedChanged: {
if (endAnimFinished) {
loadingScreen.source = "";
loadingScreen.active = false;
}
No changes.
No changes.
No changes.
No changes.
No changes.
0 software/remote/basic_ui/Settings.qml 100644 โ†’ 100755
No changes.
0 software/remote/basic_ui/StatusBar.qml 100644 โ†’ 100755
No changes.
19 software/remote/basic_ui/pages/area.qml 100644 โ†’ 100755
@@ -42,10 +42,29 @@ Flickable {
opacity: 0.5
}

Rectangle {
id: titleContainer
width: parent.width
height: 200
color: colorBackground

Text {
id: titleText
color: colorText
text: qsTr(area) + translateHandler.emptyString
anchors.centerIn: parent
font.family: "Open Sans"
font.weight: Font.Normal
font.pixelSize: 60
lineHeight: 1
}
}

Column {
id: iconFlow
width: parent.width
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: titleContainer.bottom
spacing: 10

Component.onCompleted: {
@@ -10,13 +10,13 @@ Flickable {
signal scrolledUp()
signal scrolledDown()

onContentYChanged: {
if (contentY > 130) {
scrolledUp();
} else {
scrolledDown();
}
}
// onContentYChanged: {
// if (contentY > 130) {
// scrolledUp();
// } else {
// scrolledDown();
// }
// }

width: parent.width
height: parent.height
@@ -6,7 +6,7 @@ Flickable {
property string type

//: Name of the settings page
property string title: qsTr(type) + translateHandler.emptyString
property string title: qsTr(findType(type)) + translateHandler.emptyString

signal scrolledUp()
signal scrolledDown()
@@ -23,7 +23,7 @@ Flickable {
height: parent.height
maximumFlickVelocity: 6000
flickDeceleration: 1000
contentHeight: iconFlow.height + 40 //iconFlow.height < 800 - mainNavigation.height - statusBar.height - miniMediaPlayer.height + bottomGradient.height ? iconFlow.height + 40 : iconFlow.height
contentHeight: iconFlow.height + 200 + 40 //iconFlow.height < 800 - mainNavigation.height - statusBar.height - miniMediaPlayer.height + bottomGradient.height ? iconFlow.height + 40 : iconFlow.height
boundsBehavior: Flickable.DragAndOvershootBounds
flickableDirection: Flickable.VerticalFlick

@@ -42,10 +42,37 @@ Flickable {
opacity: 0.5
}

function findType(type) {
for (var i=0; i<entities.supported_entities.length; i++) {
if (type == entities.supported_entities[i]) {
return supported_entities_translation[i];
}
}
}

Rectangle {
id: titleContainer
width: parent.width
height: 200
color: colorBackground

Text {
id: titleText
color: colorText
text: qsTr(findType(type)) + translateHandler.emptyString
anchors.centerIn: parent
font.family: "Open Sans"
font.weight: Font.Normal
font.pixelSize: 60
lineHeight: 1
}
}

Column {
id: iconFlow
width: parent.width
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: titleContainer.bottom
spacing: 10

Component.onCompleted: {
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
0 software/remote/images.qrc 100644 โ†’ 100755
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
60 software/remote/main.qml 100644 โ†’ 100755
@@ -50,36 +50,36 @@ ApplicationWindow {
}

function checkBattery() {
// read battery data
battery_voltage = battery.getVoltage() / 1000
battery_level = battery.getStateOfCharge() / 100
battery_health = battery.getStateOfHealth()
battery_design_capacity = battery.getDesignCapacity()
battery_remaining_capacity = battery.getRemainingCapacity()
battery_averagepower = battery.getAveragePower()
battery_averagecurrent = battery.getAverageCurrent()

// if the designcapacity is off correct it
if (battery_design_capacity != battery.capacity) {
console.debug("Design capacity doesn't match. Recalibrating battery.");
battery.changeCapacity(battery.capacity);
}

// if voltage is too low and we are sourcing power turn off the remote after timeout
if (battery_voltage <= 3.4 && battery_averagepower < 0) {
shutdownDelayTimer.start();
}

// hide and show the charging screen
if (battery_averagepower >= 0 ) {
chargingScreen.item.state = "visible";
// cancel shutdown when started charging
if (shutdownDelayTimer.running) {
shutdownDelayTimer.stop();
}
} else {
chargingScreen.item.state = "hidden";
}
// // read battery data
// battery_voltage = battery.getVoltage() / 1000
// battery_level = battery.getStateOfCharge() / 100
// battery_health = battery.getStateOfHealth()
// battery_design_capacity = battery.getDesignCapacity()
// battery_remaining_capacity = battery.getRemainingCapacity()
// battery_averagepower = battery.getAveragePower()
// battery_averagecurrent = battery.getAverageCurrent()

// // if the designcapacity is off correct it
// if (battery_design_capacity != battery.capacity) {
// console.debug("Design capacity doesn't match. Recalibrating battery.");
// battery.changeCapacity(battery.capacity);
// }

// // if voltage is too low and we are sourcing power turn off the remote after timeout
// if (battery_voltage <= 3.4 && battery_averagepower < 0) {
// shutdownDelayTimer.start();
// }

// // hide and show the charging screen
// if (battery_averagepower >= 0 ) {
// chargingScreen.item.state = "visible";
// // cancel shutdown when started charging
// if (shutdownDelayTimer.running) {
// shutdownDelayTimer.stop();
// }
// } else {
// chargingScreen.item.state = "hidden";
// }
}
}

0 software/remote/qml.qrc 100644 โ†’ 100755
No changes.
3 software/remote/remote.pro 100644 โ†’ 100755
@@ -134,5 +134,4 @@ macx {
extraData.path = $$DESTDIR
}

DISTFILES += \
basic_ui/ClosingScreen.qml
DISTFILES +=
0 software/remote/scripts/helper.js 100644 โ†’ 100755
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.