1
0

BottomNavigation.qml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. import QtQuick 2.15
  2. import QtQuick.Controls 2.15
  3. import QtQuick.Layouts 1.15
  4. import "." as Components
  5. Rectangle {
  6. id: bottomNav
  7. property int currentIndex: 0
  8. signal tabClicked(int index)
  9. height: 55
  10. color: Components.ThemeManager.navBackground
  11. // Top border to match web UI
  12. Rectangle {
  13. anchors.top: parent.top
  14. width: parent.width
  15. height: 1
  16. color: Components.ThemeManager.navBorder
  17. }
  18. RowLayout {
  19. anchors.fill: parent
  20. spacing: 0
  21. // Browse Tab
  22. BottomNavTab {
  23. Layout.fillWidth: true
  24. Layout.fillHeight: true
  25. icon: "search"
  26. text: "Browse"
  27. active: bottomNav.currentIndex === 0
  28. onClicked: bottomNav.tabClicked(0)
  29. }
  30. // Playlists Tab
  31. BottomNavTab {
  32. Layout.fillWidth: true
  33. Layout.fillHeight: true
  34. icon: "list_alt"
  35. text: "Playlists"
  36. active: bottomNav.currentIndex === 1
  37. onClicked: bottomNav.tabClicked(1)
  38. }
  39. // Table Control Tab
  40. BottomNavTab {
  41. Layout.fillWidth: true
  42. Layout.fillHeight: true
  43. icon: "table_chart"
  44. text: "Control"
  45. active: bottomNav.currentIndex === 2
  46. onClicked: bottomNav.tabClicked(2)
  47. }
  48. // LED Control Tab (index 3)
  49. BottomNavTab {
  50. Layout.fillWidth: true
  51. Layout.fillHeight: true
  52. icon: "lightbulb"
  53. text: "LED"
  54. active: bottomNav.currentIndex === 3
  55. onClicked: bottomNav.tabClicked(3)
  56. }
  57. // Execution Tab (index 4)
  58. BottomNavTab {
  59. Layout.fillWidth: true
  60. Layout.fillHeight: true
  61. icon: "play_arrow"
  62. text: "Execution"
  63. active: bottomNav.currentIndex === 4
  64. onClicked: bottomNav.tabClicked(4)
  65. }
  66. }
  67. }