Zoom Out Menu Option

So you can unzoom in ride plot when you've zoomed in
to an interval -- avoiding having to show fullplot to
do the same thing manually.

There are probably other places to add functionality
for zooming out, will deal with those as they arise.
This commit is contained in:
Mark Liversedge
2013-11-11 19:56:31 +00:00
parent 17b1edab65
commit f2d8a0792f
7 changed files with 34 additions and 6 deletions

View File

@@ -459,6 +459,7 @@ AllPlotWindow::AllPlotWindow(Context *context) :
connect(context->athlete, SIGNAL(zonesChanged()), this, SLOT(zonesChanged()));
connect(context, SIGNAL(intervalsChanged()), this, SLOT(intervalsChanged()));
connect(context, SIGNAL(intervalZoom(IntervalItem*)), this, SLOT(zoomInterval(IntervalItem*)));
connect(context, SIGNAL(zoomOut()), this, SLOT(zoomOut()));
connect(context, SIGNAL(intervalSelected()), this, SLOT(intervalSelected()));
connect(context, SIGNAL(rideDeleted(RideItem*)), this, SLOT(rideDeleted(RideItem*)));
@@ -944,6 +945,16 @@ AllPlotWindow::setAllPlotWidgets(RideItem *ride)
}
}
void
AllPlotWindow::zoomOut()
{
// set them to maximums to avoid overlapping
// when we set them below, daft but works
spanSlider->setLowerValue(spanSlider->minimum());
spanSlider->setUpperValue(spanSlider->maximum());
zoomChanged();
}
void
AllPlotWindow::zoomInterval(IntervalItem *which)
{