proof-of-concept spectrum analyzer mode

This commit is contained in:
Jan Käberich 2020-09-17 15:51:20 +02:00
parent 76875c2316
commit 38e73365df
33 changed files with 942 additions and 82 deletions

View file

@ -7,10 +7,11 @@
#include "traceexportdialog.h"
#include <QFileDialog>
TraceWidget::TraceWidget(TraceModel &model, QWidget *parent) :
TraceWidget::TraceWidget(TraceModel &model, QWidget *parent, bool SA) :
QWidget(parent),
ui(new Ui::TraceWidget),
model(model)
model(model),
SA(SA)
{
ui->setupUi(this);
ui->view->setModel(&model);
@ -27,7 +28,8 @@ TraceWidget::~TraceWidget()
void TraceWidget::on_add_clicked()
{
createCount++;
auto t = new Trace("Trace #"+QString::number(createCount));
auto liveParam = SA ? Trace::LiveParameter::Port1 : Trace::LiveParameter::S11;
auto t = new Trace("Trace #"+QString::number(createCount), Qt::darkYellow, liveParam);
t->setColor(QColor::fromHsl((createCount * 50) % 360, 250, 128));
model.addTrace(t);
}