Skip to content

Commit

Permalink
skins/QMLDemo: Add support for dragging tracks from deck to file manager
Browse files Browse the repository at this point in the history
  • Loading branch information
Holzhaus committed Jun 20, 2021
1 parent 5a44d28 commit dba59c7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion res/skins/QMLDemo/Deck.qml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,14 @@ Item {
Drag.dragType: Drag.Automatic
Drag.supportedActions: Qt.CopyAction
Drag.mimeData: {
"mixxx/player": this.group
let data = {
"mixxx/player": group
};
const trackLocationUrl = deckPlayer.trackLocationUrl;
if (trackLocationUrl)
data["text/uri-list"] = trackLocationUrl;

return data;
}

MouseArea {
Expand Down
9 changes: 8 additions & 1 deletion res/skins/QMLDemo/Sampler.qml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,14 @@ Rectangle {
Drag.dragType: Drag.Automatic
Drag.supportedActions: Qt.CopyAction
Drag.mimeData: {
"mixxx/player": this.group
let data = {
"mixxx/player": group
};
const trackLocationUrl = deckPlayer.trackLocationUrl;
if (trackLocationUrl)
data["text/uri-list"] = trackLocationUrl;

return data;
}

MouseArea {
Expand Down

0 comments on commit dba59c7

Please sign in to comment.