Add Configuration for Train View Color

.. the background was set from the ride plot background.
   we now have a separate configuration option for this.
This commit is contained in:
Mark Liversedge
2014-03-07 12:00:25 +00:00
parent 6e6418b6be
commit a33831f8bf
15 changed files with 105 additions and 92 deletions

View File

@@ -87,7 +87,7 @@ QPointF NowData::sample(size_t i) const
ErgFilePlot::ErgFilePlot(Context *context) : context(context)
{
//insertLegend(new QwtLegend(), QwtPlot::BottomLegend);
setCanvasBackground(GColor(CRIDEPLOTBACKGROUND));
setCanvasBackground(GColor(CTRAINPLOTBACKGROUND));
static_cast<QwtPlotCanvas*>(canvas())->setFrameStyle(QFrame::NoFrame);
//courseData = data; // what we plot
setAutoDelete(false);
@@ -247,6 +247,15 @@ ErgFilePlot::ErgFilePlot(Context *context) : context(context)
setAutoReplot(false);
setData(ergFile);
connect(context, SIGNAL(configChanged()), this, SLOT(configChanged()));
}
void
ErgFilePlot::configChanged()
{
setCanvasBackground(GColor(CTRAINPLOTBACKGROUND));
replot();
}
void