mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-06 15:04:11 +00:00
Preparations for waterfall display
This commit is contained in:
parent
754ded1d08
commit
a7fcaf7d97
12 changed files with 613 additions and 21 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#include "ui_tilewidget.h"
|
||||
#include "Traces/tracexyplot.h"
|
||||
#include "Traces/tracesmithchart.h"
|
||||
#include "Traces/tracewaterfall.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
|
|
@ -67,6 +68,9 @@ nlohmann::json TileWidget::toJSON()
|
|||
case TracePlot::Type::XYPlot:
|
||||
plotname = "XY-plot";
|
||||
break;
|
||||
case TracePlot::Type::Waterfall:
|
||||
plotname = "Waterfall";
|
||||
break;
|
||||
}
|
||||
j["plot"] = plotname;
|
||||
j["plotsettings"] = content->toJSON();
|
||||
|
|
@ -93,8 +97,10 @@ void TileWidget::fromJSON(nlohmann::json j)
|
|||
auto plotname = j["plot"];
|
||||
if(plotname == "smithchart") {
|
||||
content = new TraceSmithChart(model);
|
||||
} else {
|
||||
} else if (plotname == "XY-plot"){
|
||||
content = new TraceXYPlot(model);
|
||||
} else {
|
||||
content = new TraceWaterfall(model);
|
||||
}
|
||||
setContent(content);
|
||||
content->fromJSON(j["plotsettings"]);
|
||||
|
|
@ -264,3 +270,9 @@ void TileWidget::traceDeleted(TracePlot *)
|
|||
hasContent = false;
|
||||
content = nullptr;
|
||||
}
|
||||
|
||||
void TileWidget::on_bWaterfall_clicked()
|
||||
{
|
||||
setContent(new TraceWaterfall(model));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue