Dan Connelly's MEGA patch.

It includes both powerzones and weekly summary plots.

  Thanks Dan.
This commit is contained in:
Justin F. Knotzke
2009-06-22 03:10:46 +00:00
parent 76f6cf3f7f
commit af633953ec
5 changed files with 66 additions and 87 deletions

View File

@@ -144,29 +144,6 @@ void ConfigDialog::save_Clicked()
QMessageBox::warning(this, tr("Invalid CP"), "Please enter valid CP and try again.");
cyclistPage->setCPFocus();
return;
settings.setValue(GC_CRANKLENGTH, configPage->crankLengthCombo->currentText());
//If the user never switched pages, then make sure we have up to date data.
if (cyclistPage->getCurrentRange() == 0 || cyclistPage->getCurrentRange() == zones->getRangeSize() - 1)
{
if(cyclistPage->getCurrentRange() != 0)
{
// Record the End Date..
zones->setStartDate(zones->getRangeSize() - 1, cyclistPage->calendar->selectedDate());
//Swap the end date for the previous zone..
zones->setEndDate(zones->getRangeSize() - 2, cyclistPage->calendar->selectedDate());
//Store the CP for the new Zone..
zones->setCP(cyclistPage->getCurrentRange(), cyclistPage->txtThreshold->text().toInt());
}
else
{
QDate date;
zones->setStartDate(0, cyclistPage->calendar->selectedDate());
zones->setEndDate(0, date.currentDate());
zones->setCP(0, cyclistPage->txtThreshold->text().toInt());
cyclistPage->setCurrentRange(1);
}
}
// if for some reason we have no zones yet, then create them