Mercurial > hg > svgui
diff view/PaneStack.cpp @ 312:6de6f78b13a1
* Make it possible to drop audio files, layer files, session files and images
onto SV panes.
Need to do a bit more work on where we expect the dropped file to go,
particularly in the case of audio files -- at the moment they're always
opened in new panes, but it may be better to by default replace whatever is
in the target pane.
author | Chris Cannam |
---|---|
date | Wed, 10 Oct 2007 15:18:02 +0000 |
parents | 8acd30ed735c |
children | 2a50c1ecc990 |
line wrap: on
line diff
--- a/view/PaneStack.cpp Wed Oct 10 10:22:34 2007 +0000 +++ b/view/PaneStack.cpp Wed Oct 10 15:18:02 2007 +0000 @@ -114,6 +114,10 @@ this, SLOT(paneInteractedWith())); connect(pane, SIGNAL(rightButtonMenuRequested(QPoint)), this, SLOT(rightButtonMenuRequested(QPoint))); + connect(pane, SIGNAL(dropAccepted(QStringList)), + this, SLOT(paneDropAccepted(QStringList))); + connect(pane, SIGNAL(dropAccepted(QString)), + this, SLOT(paneDropAccepted(QString))); emit paneAdded(pane); emit paneAdded(); @@ -483,4 +487,17 @@ emit propertyStacksResized(); } +void +PaneStack::paneDropAccepted(QStringList uriList) +{ + Pane *pane = dynamic_cast<Pane *>(sender()); + emit dropAccepted(pane, uriList); +} + +void +PaneStack::paneDropAccepted(QString text) +{ + Pane *pane = dynamic_cast<Pane *>(sender()); + emit dropAccepted(pane, text); +}