Find intervals by time/distance

Find interval dialog will now allow you to add
intervals by time or distance (e.g. add interval for
every 10 minutes or every kilometer).

Since there were three menu options all doing similar
things, they have now been consolidated into a single
dialog.
This commit is contained in:
Damien
2012-03-21 06:53:41 +00:00
committed by Mark Liversedge
parent c1d8c1ca51
commit 8490d530d6
5 changed files with 753 additions and 2 deletions

View File

@@ -17,6 +17,7 @@
*/
#include "MainWindow.h"
#include "AddIntervalDialog.h"
#include "AthleteTool.h"
#include "BestIntervalDialog.h"
#include "ChooseCyclistDialog.h"
@@ -715,8 +716,7 @@ MainWindow::MainWindow(const QDir &home) :
optionsMenu->addAction(tr("Refresh Calendar"), this, SLOT(refreshCalendar()), tr (""));
#endif
optionsMenu->addSeparator();
optionsMenu->addAction(tr("Find &best intervals..."), this, SLOT(findBestIntervals()), tr ("Ctrl+B"));
optionsMenu->addAction(tr("Find power &peaks..."), this, SLOT(findPowerPeaks()), tr ("Ctrl+P"));
optionsMenu->addAction(tr("Find intervals..."), this, SLOT(addIntervals()), tr (""));
// Add all the data processors to the tools menu
const DataProcessorFactory &factory = DataProcessorFactory::instance();
@@ -1801,6 +1801,14 @@ MainWindow::findBestIntervals()
p->exec();
}
void
MainWindow::addIntervals()
{
AddIntervalDialog *p = new AddIntervalDialog(this);
p->setWindowModality(Qt::ApplicationModal); // don't allow select other ride or it all goes wrong!
p->exec();
}
void
MainWindow::addIntervalForPowerPeaksForSecs(RideFile *ride, int windowSizeSecs, QString name)
{