Updated graphs to use new math system

This commit is contained in:
Jan Käberich 2020-11-28 22:34:40 +01:00
parent a7ff3d60fb
commit 49f9b5442d
16 changed files with 263 additions and 518 deletions

View file

@ -53,12 +53,14 @@ void TracePlot::enableTrace(Trace *t, bool enabled)
connect(t, &Trace::visibilityChanged, this, &TracePlot::triggerReplot);
connect(t, &Trace::markerAdded, this, &TracePlot::markerAdded);
connect(t, &Trace::markerRemoved, this, &TracePlot::markerRemoved);
connect(t, &Trace::typeChanged, this, &TracePlot::checkIfStillSupported);
} else {
// disconnect from notifications
disconnect(t, &Trace::dataChanged, this, &TracePlot::triggerReplot);
disconnect(t, &Trace::visibilityChanged, this, &TracePlot::triggerReplot);
disconnect(t, &Trace::markerAdded, this, &TracePlot::markerAdded);
disconnect(t, &Trace::markerRemoved, this, &TracePlot::markerRemoved);
disconnect(t, &Trace::typeChanged, this, &TracePlot::checkIfStillSupported);
}
updateContextMenu();
replot();
@ -271,6 +273,14 @@ void TracePlot::triggerReplot()
}
}
void TracePlot::checkIfStillSupported(Trace *t)
{
if(!supported(t)) {
// something with this trace changed and it can no longer be displayed on this graph
enableTrace(t, false);
}
}
void TracePlot::markerAdded(TraceMarker *m)
{
connect(m, &TraceMarker::dataChanged, this, &TracePlot::triggerReplot);