Added 'interval summary' window below the interval tree

When an interval (or intervals) are selected in the
interval tree, the new window below the tree now shows
summary information for the selected interval(s). This
is beneficial for example when the Ride Plot tab is shown
and the user also wishes to see summary info about the
intervals. This fixes #77.

I think there is still room for improvement on the fields
displayed and the formatting of the summary window. For now
the fields are the same as those displayed in the Ride Summary
page.
This commit is contained in:
Eric Brandt
2011-02-27 13:21:58 +00:00
committed by Mark Liversedge
parent 76d9bbcafd
commit dd4f5ff85c
5 changed files with 174 additions and 4 deletions

View File

@@ -46,6 +46,7 @@
#include "RealtimeWindow.h"
#include "RideItem.h"
#include "IntervalItem.h"
#include "IntervalSummaryWindow.h"
#include "RideEditor.h"
#ifdef GC_HAVE_ICAL
#include "DiaryWindow.h"
@@ -305,7 +306,8 @@ MainWindow::MainWindow(const QDir &home) :
treeWidget->expandItem(allRides);
treeWidget->setFirstItemColumnSpanned (allRides, true);
intervalWidget = new QTreeWidget(this);
intervalSummaryWindow = new IntervalSummaryWindow(this);
intervalWidget = new QTreeWidget();
intervalWidget->setColumnCount(1);
intervalWidget->setIndentation(5);
intervalWidget->setSortingEnabled(false);
@@ -320,7 +322,10 @@ MainWindow::MainWindow(const QDir &home) :
allIntervals->setText(0, tr("Intervals"));
intervalWidget->expandItem(allIntervals);
intervalSplitter = new QSplitter(this);
intervalSplitter->setOrientation(Qt::Vertical);
intervalSplitter->addWidget(intervalWidget);
intervalSplitter->addWidget(intervalSummaryWindow);
#ifdef GC_HAVE_ICAL
rideCalendar = new ICalendar(this); // my local/remote calendar entries
@@ -403,7 +408,7 @@ MainWindow::MainWindow(const QDir &home) :
dock->setWidget(toolBox);
#endif
toolBox->addItem(treeWidget, "Rides");
toolBox->addItem(intervalWidget, "Intervals");
toolBox->addItem(intervalSplitter, "Intervals");
toolBox->addItem(masterControls, "Controls");
toolBox->addItem(new AthleteTool(QFileInfo(home.path()).path(), this), "Athletes");
toolBox->addItem(chartTool, "Charts");