mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
remember chosen histogram bin width across restarts
This commit is contained in:
@@ -201,7 +201,6 @@ PowerHist::PowerHist(MainWindow *mainWindow):
|
||||
selected(wattsShaded),
|
||||
rideItem(NULL),
|
||||
mainWindow(mainWindow),
|
||||
binw(20),
|
||||
withz(true),
|
||||
settings(NULL),
|
||||
unit(0),
|
||||
@@ -214,6 +213,8 @@ PowerHist::PowerHist(MainWindow *mainWindow):
|
||||
|
||||
useMetricUnits = (unit.toString() == "Metric");
|
||||
|
||||
binw = settings->value(GC_HIST_BIN_WIDTH, 5).toInt();
|
||||
|
||||
// create a background object for shading
|
||||
bg = new PowerHistBackground(this);
|
||||
bg->attach(this);
|
||||
@@ -521,6 +522,8 @@ void
|
||||
PowerHist::setBinWidth(int value)
|
||||
{
|
||||
binw = value;
|
||||
boost::shared_ptr<QSettings> settings = GetApplicationSettings();
|
||||
settings->setValue(GC_HIST_BIN_WIDTH, value);
|
||||
recalc();
|
||||
}
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#define GC_SETTINGS_INTERVAL_METRICS "rideSummaryWindow/intervalMetrics"
|
||||
#define GC_RIDE_PLOT_SMOOTHING "ridePlot/Smoothing"
|
||||
#define GC_PERF_MAN_METRIC "performanceManager/metric"
|
||||
#define GC_HIST_BIN_WIDTH "histogamWindow/binWidth"
|
||||
#define GC_SETTINGS_INTERVAL_METRICS_DEFAULT "workout_time,total_distance,total_work,average_power,skiba_xpower,max_power,average_hr,ninety_five_percent_hr,average_cad,average_speed"
|
||||
#define GC_DATETIME_FORMAT "ddd MMM dd, yyyy, hh:mm AP"
|
||||
#define GC_UNIT "unit"
|
||||
|
||||
Reference in New Issue
Block a user