Reorganise intervals by drag and drop

The interval view now allows the user to drag and drop intervals
up and down in the list.

We could extend the drag and drop of intervals to support analysis
of segments/intervals from multiple rides in the future too.

Fixes #405.
This commit is contained in:
Damien
2012-01-21 21:16:35 +00:00
committed by Mark Liversedge
parent 8eb349ded0
commit 1d0a858df6
7 changed files with 97 additions and 2 deletions

View File

@@ -1011,6 +1011,7 @@ AllPlotWindow::setEndSelection(AllPlot* plot, double xValue, bool newInterval, Q
QTreeWidgetItem *last = new IntervalItem(ride->ride(), name, duration1, duration2, distance1, distance2,
allIntervals->childCount()+1);
last->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsDragEnabled);
allIntervals->addChild(last);
// select this new interval