BottomNavigation.qml 1.7 KB

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