mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-15 00:49:55 +00:00
Long Term Metrics
A user configurable chart for showing ride metrics and other calculated values over time. * Uses SQLITE database to store metrics * Supports any metric available from the metric factory * Adds new MaxHr, VI, Peak Power and Time In Zone metric * Also includes LTS/STS/SB for PM charting * Aggregates in days, weeks, months or years * Reads and Updates seasons.xml * Adds cycles and adhoc date ranges in seasons.xml * Date ranges can be selected on the plot with shift-left click * Allows users to customise preferences for color, symbols et al * Allows user to customise metric names and unit names * Supports smooth curves and topN highlighting * Has a linear regress trend line function * Allows users to save charts to charts.xml * A default charts.xml is built-in * A chart manager to import/export/rename/delete charts etc * Provides a tooltip to provide basic datapoint information * Performance Manager adjusted to use the MetricDB * User configurable setting for SB calculation (today/tomorrow)
This commit is contained in:
committed by
Sean Rhea
parent
cb8e2cbc84
commit
0288579ce0
@@ -8,7 +8,7 @@
|
||||
|
||||
|
||||
PerformanceManagerWindow::PerformanceManagerWindow(MainWindow *mainWindow) :
|
||||
QWidget(mainWindow), mainWindow(mainWindow)
|
||||
QWidget(mainWindow), mainWindow(mainWindow), active(false)
|
||||
{
|
||||
days = count = 0;
|
||||
sc = NULL;
|
||||
@@ -111,9 +111,10 @@ PerformanceManagerWindow::~PerformanceManagerWindow()
|
||||
|
||||
void PerformanceManagerWindow::configChanged()
|
||||
{
|
||||
mainWindow->home.remove("stress.cache");
|
||||
days = 0; // force replot
|
||||
replot();
|
||||
if (active) {
|
||||
days = 0; // force replot
|
||||
replot();
|
||||
}
|
||||
}
|
||||
|
||||
void PerformanceManagerWindow::metricChanged()
|
||||
@@ -126,8 +127,7 @@ void PerformanceManagerWindow::metricChanged()
|
||||
|
||||
void PerformanceManagerWindow::setActive(bool value)
|
||||
{
|
||||
if (value)
|
||||
replot();
|
||||
if (active=value) replot();
|
||||
}
|
||||
|
||||
void PerformanceManagerWindow::replot()
|
||||
@@ -186,7 +186,7 @@ void PerformanceManagerWindow::replot()
|
||||
(settings->value(GC_STS_DAYS,7)).toInt(),
|
||||
(settings->value(GC_LTS_DAYS,42)).toInt());
|
||||
|
||||
sc->calculateStress(this,home.absolutePath(),allRides,newMetric);
|
||||
sc->calculateStress(mainWindow,home.absolutePath(),newMetric);
|
||||
|
||||
perfplot->setStressCalculator(sc);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user