mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 00:28:42 +00:00
Solver Display Color Code Tau
.. red low, green mid, blue high
This commit is contained in:
@@ -378,7 +378,7 @@ SolveCPDialog::current(int k,WBParms p,double sum)
|
||||
else csumLabel->setText(QString("%1").arg(sum, 0, 'f', 3));
|
||||
|
||||
// visualise new point
|
||||
solverDisplay->addPoint(SolverPoint(p.CP, p.W, sum));
|
||||
solverDisplay->addPoint(SolverPoint(p.CP, p.W, sum, p.TAU));
|
||||
|
||||
if (!(k++%200) || k == 99999) QApplication::processEvents();
|
||||
}
|
||||
|
||||
@@ -84,7 +84,17 @@ SolverDisplay::paintEvent(QPaintEvent *)
|
||||
case 0: { bcolor = QColor(0xed,0xf8,0xe9); size = 1; } break;
|
||||
case 1: { bcolor = QColor(0xba,0xe4,0xb3); size = 2; } break;
|
||||
case 2: { bcolor = QColor(0x74,0xc4,0x76); size = 3; } break;
|
||||
case 3: { bcolor = QColor(0x23,0x8b,0x45); size = 5; } break;
|
||||
case 3: {
|
||||
if (p.t < 80) bcolor=QColor(255,0,0); // diff low
|
||||
else if (p.t < 150) bcolor = QColor(0x23,0x8b,0x45); // diff mid
|
||||
else if (p.t < 300) bcolor = QColor(0,0,255); // diff high
|
||||
else if (p.t < 433) bcolor=QColor(255,0,0); // integral low
|
||||
else if (p.t < 566) bcolor = QColor(0x23,0x8b,0x45); // integral mid
|
||||
else if (p.t <= 700) bcolor = QColor(0,0,255); // integral high
|
||||
|
||||
size=5;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
painter.setBrush(bcolor);
|
||||
|
||||
@@ -31,9 +31,10 @@
|
||||
|
||||
struct SolverPoint {
|
||||
public:
|
||||
SolverPoint(int x, int y, double z) : x(x), y(y), z(z) {}
|
||||
SolverPoint(int x, int y, double z, int t) : x(x), y(y), z(z), t(t) {}
|
||||
int x,y;
|
||||
double z;
|
||||
int t;
|
||||
};
|
||||
|
||||
class SolverDisplay : public QWidget
|
||||
|
||||
Reference in New Issue
Block a user