UI Nits: Daily/Weekly/Monthly Summary

You can now add the summary chart to the diary
view to get a summary of the date range currently
being summarised on that view.

Once the Home view has its own sidebar that selects
date ranges you will be able to add it there too
and summarise seasons etc.
This commit is contained in:
Mark Liversedge
2012-11-13 13:27:36 +00:00
parent a3a49d8a3d
commit d22777ed74
19 changed files with 355 additions and 209 deletions

View File

@@ -517,10 +517,6 @@ MainWindow::MainWindow(const QDir &home) :
chartTool = new GcWindowTool(this);
#endif
// RIGHT SIDEBAR
gcCalendar = new GcCalendar(this);
//gcCalendar->setStyleSheet("background: #B3B4BA;");
//gcCalendar->setStyleSheet("background: white;");
// TOOLBOX
toolBox = new QToolBox(this);
@@ -584,6 +580,10 @@ MainWindow::MainWindow(const QDir &home) :
// POPULATE TOOLBOX
// do controllers after home windows -- they need their first signals caught
gcCalendar = new GcCalendar(this);
connect(gcCalendar, SIGNAL(dateRangeChanged(DateRange)), this, SLOT(dateRangeChanged(DateRange)));
toolBox->addItem(intervalSplitter, QIcon(":images/activity.png"), "Activity History");
toolBox->addItem(gcCalendar, QIcon(":images/toolbar/main/diary.png"), "Calendar");
toolBox->addItem(trainTool->controls(), QIcon(":images/library.png"), "Workout Library");
@@ -1037,6 +1037,15 @@ MainWindow::rideTreeWidgetSelectionChanged()
}
}
void
MainWindow::dateRangeChanged(DateRange dr)
{
// we got signalled date range changed, tell the current view
// when we have multiple sidebars that change date we need to connect
// them up individually.... i.e. LTM....
diaryWindow->setProperty("dateRange", QVariant::fromValue<DateRange>(dr));
}
void
MainWindow::enableSaveButton()
{
@@ -1326,6 +1335,7 @@ MainWindow::selectDiary()
analButtons->hide();
trainTool->getToolbarButtons()->hide();
toolBox->setCurrentIndex(1);
gcCalendar->refresh(); // get that signal with the date range...
setStyle();
}