Move eye diagram from tools to new graph type, enable zoom/pan on graphs

This commit is contained in:
Jan Käberich 2022-10-21 16:50:04 +02:00
parent 329f4487ee
commit ee3c6274ad
23 changed files with 1997 additions and 1052 deletions

View file

@ -5,6 +5,7 @@
#include "Traces/tracesmithchart.h"
#include "Traces/tracewaterfall.h"
#include "Traces/tracepolarchart.h"
#include "Traces/eyediagramplot.h"
#include <QDebug>
@ -76,6 +77,9 @@ nlohmann::json TileWidget::toJSON()
case TracePlot::Type::PolarChart:
plotname = "PolarChart";
break;
case TracePlot::Type::EyeDiagram:
plotname = "EyeDiagram";
break;
}
j["plot"] = plotname;
j["plotsettings"] = content->toJSON();
@ -108,6 +112,8 @@ void TileWidget::fromJSON(nlohmann::json j)
content = new TraceWaterfall(model);
} else if (plotname == "PolarChart"){
content = new TracePolarChart(model);
} else if (plotname == "EyeDiagram"){
content = new EyeDiagramPlot(model);
}
if(content) {
setContent(content);
@ -337,3 +343,10 @@ void TileWidget::on_bPolarchart_clicked()
{
setContent(new TracePolarChart(model));
}
void TileWidget::on_eyeDiagram_clicked()
{
auto plot = new EyeDiagramPlot(model);
setContent(plot);
plot->axisSetupDialog();
}