MainWindow Refactor Part 1 of 5

Breaking the MainWindow 'god object' into
separate classes for Athlete and Context.

Further updates will need to;
- break MainWindow Gui elements into Toolbar and Views

- migrate from RideItem and Ridelist to ActivityCollection
  and Activity classes that are not tied into gui elements.

- introduce Application Context and AthleteCollection

Once these are done we will be in a position to decouple
most classes from mainwindow and also introduce tabbed
athletes.
This commit is contained in:
Mark Liversedge
2013-07-07 15:50:28 +01:00
parent 401957acf9
commit e407237ac0
106 changed files with 971 additions and 1091 deletions

View File

@@ -303,7 +303,7 @@ struct CompareBests {
void
AddIntervalDialog::createClicked()
{
const RideFile *ride = mainWindow->currentRide();
const RideFile *ride = mainWindow->context->currentRide();
if (!ride) {
QMessageBox::critical(this, tr("Select Ride"), tr("No ride selected!"));
return;
@@ -642,7 +642,7 @@ AddIntervalDialog::addClicked()
double start = resultsTable->item(i,3)->text().toDouble();
double stop = resultsTable->item(i,4)->text().toDouble();
QString name = resultsTable->item(i,2)->text();
const RideFile *ride = mainWindow->currentRide();
const RideFile *ride = mainWindow->context->currentRide();
QTreeWidgetItem *allIntervals = mainWindow->mutableIntervalItems();
QTreeWidgetItem *last =