PlayerTrack.qml 670 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import QtQuick 2.0
  2. Item {
  3. id: root
  4. property url icon: ""
  5. property string title: ""
  6. property string artists: ""
  7. property string comment: ""
  8. property int trackId
  9. property bool liked: false
  10. signal toggleLiked()
  11. PlayerTrackIcon {
  12. id: _icon
  13. anchors.verticalCenter: root.verticalCenter
  14. src: icon
  15. }
  16. PlayerTrackInfo {
  17. id: _info
  18. anchors.left: _icon.right
  19. anchors.leftMargin: 11
  20. width: root.width - anchors.leftMargin - _icon.width
  21. height: root.height
  22. title: root.title
  23. artists: root.artists
  24. comment: root.comment
  25. trackId: root.trackId
  26. liked: root.liked
  27. onToggleLiked: root.toggleLiked()
  28. }
  29. }