BottomNavigation.qml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. // Execution Tab
  49. BottomNavTab {
  50. Layout.fillWidth: true
  51. Layout.fillHeight: true
  52. icon: "play_arrow"
  53. text: "Execution"
  54. active: bottomNav.currentIndex === 3
  55. onClicked: bottomNav.tabClicked(3)
  56. }
  57. }
  58. }