Drag onto athlete tab to switch tabs

.. this allows us to drag and drop between athletes or
   to switch athlete if dropping from outside of GC.

.. also added context to the mime data so the compare pane
   will know where the dragged object has come from (ie. it
   may be from a different athlete).
This commit is contained in:
Mark Liversedge
2013-12-28 10:58:32 +00:00
parent b03c10e6fd
commit 95b993617a
10 changed files with 128 additions and 11 deletions

View File

@@ -65,6 +65,7 @@ IntervalTreeView::mimeData (const QList<QTreeWidgetItem *> items) const
stream.setVersion(QDataStream::Qt_4_6);
// pack data
stream << (quint64)(context); // where did this come from?
stream << items.count();
foreach (QTreeWidgetItem *p, items) {
@@ -73,7 +74,7 @@ IntervalTreeView::mimeData (const QList<QTreeWidgetItem *> items) const
// serialize
stream << p->text(0); // name
stream << static_cast<const void*>(i->ride);
stream << (quint64)(i->ride);
stream << i->start << i->stop; // start and stop in secs
stream << i->startKM << i->stopKM; // start and stop km
stream << i->displaySequence;