QA/2d customise symbol color

Let the user define the color used for the symbols on the PfPv
and Scatter plot when framing intervals.
This commit is contained in:
Mark Liversedge
2013-02-24 17:30:58 +00:00
parent 1fe982dc64
commit 90942e0199
4 changed files with 72 additions and 70 deletions

View File

@@ -40,6 +40,7 @@ void GCColor::setupColors()
Colors init[CNUMOFCFGCOLORS+1] = {
{ tr("Plot Background"), "COLORPLOTBACKGROUND", Qt::white },
{ tr("Ride Plot Background"), "COLORRIDEPLOTBACKGROUND", Qt::black },
{ tr("Plot Symbols"), "COLORRIDEPLOTSYMBOLS", Qt::gray },
{ tr("Ride Plot X Axis"), "COLORRIDEPLOTXAXIS", Qt::blue },
{ tr("Ride Plot Y Axis"), "COLORRIDEPLOTYAXIS", Qt::red },
{ tr("Plot Thumbnail Background"), "COLORPLOTTHUMBNAIL", Qt::gray },

View File

@@ -99,76 +99,77 @@ class ColorEngine : public QObject
#define GColor(x) GCColor::getColor(x)
// Define how many cconfigurable metric colors are available
#define CNUMOFCFGCOLORS 69
#define CNUMOFCFGCOLORS 70
#define CPLOTBACKGROUND 0
#define CRIDEPLOTBACKGROUND 1
#define CRIDEPLOTXAXIS 2
#define CRIDEPLOTYAXIS 3
#define CPLOTTHUMBNAIL 4
#define CPLOTTITLE 5
#define CPLOTSELECT 6
#define CPLOTTRACKER 7
#define CPLOTMARKER 8
#define CPLOTGRID 9
#define CINTERVALHIGHLIGHTER 10
#define CHEARTRATE 11
#define CSPEED 12
#define CPOWER 13
#define CCP 14
#define CCADENCE 15
#define CALTITUDE 16
#define CALTITUDEBRUSH 17
#define CWINDSPEED 18
#define CTORQUE 19
#define CLOAD 20
#define CTSS 21
#define CSTS 22
#define CLTS 23
#define CSB 24
#define CDAILYSTRESS 25
#define CBIKESCORE 26
#define CCALENDARTEXT 27
#define CZONE1 28
#define CZONE2 29
#define CZONE3 30
#define CZONE4 31
#define CZONE5 32
#define CZONE6 33
#define CZONE7 34
#define CZONE8 35
#define CZONE9 36
#define CZONE10 37
#define CHZONE1 38
#define CHZONE2 39
#define CHZONE3 40
#define CHZONE4 41
#define CHZONE5 42
#define CHZONE6 43
#define CHZONE7 44
#define CHZONE8 45
#define CHZONE9 46
#define CHZONE10 47
#define CAEROVE 48
#define CAEROEL 49
#define CCALCELL 50
#define CCALHEAD 51
#define CCALCURRENT 52
#define CCALACTUAL 53
#define CCALPLANNED 54
#define CCALTODAY 55
#define CPOPUP 56
#define CPOPUPTEXT 57
#define CTILEBAR 58
#define CTILEBARSELECT 59
#define CTOOLBAR 60
#define CRIDEGROUP 61
#define CSPINSCANLEFT 62
#define CSPINSCANRIGHT 63
#define CTEMP 64
#define CDIAL 65
#define CALTPOWER 66
#define CBALANCELEFT 67
#define CBALANCERIGHT 68
#define CPLOTSYMBOL 2
#define CRIDEPLOTXAXIS 3
#define CRIDEPLOTYAXIS 4
#define CPLOTTHUMBNAIL 5
#define CPLOTTITLE 6
#define CPLOTSELECT 7
#define CPLOTTRACKER 8
#define CPLOTMARKER 9
#define CPLOTGRID 10
#define CINTERVALHIGHLIGHTER 11
#define CHEARTRATE 12
#define CSPEED 13
#define CPOWER 14
#define CCP 15
#define CCADENCE 16
#define CALTITUDE 17
#define CALTITUDEBRUSH 18
#define CWINDSPEED 19
#define CTORQUE 20
#define CLOAD 21
#define CTSS 22
#define CSTS 23
#define CLTS 24
#define CSB 25
#define CDAILYSTRESS 26
#define CBIKESCORE 27
#define CCALENDARTEXT 28
#define CZONE1 29
#define CZONE2 30
#define CZONE3 31
#define CZONE4 32
#define CZONE5 33
#define CZONE6 34
#define CZONE7 35
#define CZONE8 36
#define CZONE9 37
#define CZONE10 38
#define CHZONE1 39
#define CHZONE2 40
#define CHZONE3 41
#define CHZONE4 42
#define CHZONE5 43
#define CHZONE6 44
#define CHZONE7 45
#define CHZONE8 46
#define CHZONE9 47
#define CHZONE10 48
#define CAEROVE 49
#define CAEROEL 50
#define CCALCELL 51
#define CCALHEAD 52
#define CCALCURRENT 53
#define CCALACTUAL 54
#define CCALPLANNED 55
#define CCALTODAY 56
#define CPOPUP 57
#define CPOPUPTEXT 58
#define CTILEBAR 59
#define CTILEBARSELECT 60
#define CTOOLBAR 61
#define CRIDEGROUP 62
#define CSPINSCANLEFT 63
#define CSPINSCANRIGHT 64
#define CTEMP 65
#define CDIAL 66
#define CALTPOWER 67
#define CBALANCELEFT 68
#define CBALANCERIGHT 69
#endif

View File

@@ -193,7 +193,7 @@ PfPvPlot::configChanged()
QwtSymbol sym;
sym.setStyle(QwtSymbol::Ellipse);
sym.setSize(6);
sym.setPen(QPen(Qt::gray));
sym.setPen(QPen(GColor(CPLOTSYMBOL)));
sym.setBrush(QBrush(Qt::NoBrush));
curve->setSymbol(new QwtSymbol(sym));
curve->setStyle(QwtPlotCurve::Dots);

View File

@@ -218,7 +218,7 @@ void ScatterPlot::setData (ScatterSettings *settings)
sym.setPen(GCColor::invert(GColor(CPLOTBACKGROUND)));
sym.setBrush(QBrush(Qt::NoBrush));
QPen p;
p.setColor(Qt::gray);
p.setColor(GColor(CPLOTSYMBOL));
sym.setPen(p);
// wipe away existing