WIP: synchronization

This commit is contained in:
Jan Käberich 2022-08-07 13:28:31 +02:00
parent 58918f81c1
commit 7b3aa6e158
7 changed files with 46 additions and 46 deletions

View file

@ -588,7 +588,12 @@ void VirtualDevice::compoundDatapointReceivecd(Protocol::VNADatapoint<32> *data,
if(!std::isnan(ref.real()) && !std::isnan(input.real())) {
// got both required measurements
QString name = "S"+QString::number(i+1)+QString::number(map.first+1);
m.measurements[name] = input / ref;
auto S = input / ref;
if(inputDevice != stimulusDev) {
// can't use phase information when measuring across devices
S = abs(S);
}
m.measurements[name] = S;
}
}
}

View file

@ -143,7 +143,7 @@ void Trace::addData(const Trace::Data &d, const VirtualDevice::SASettings &s, in
}
void Trace::setName(QString name) {
name = name;
_name = name;
emit nameChanged();
}
@ -305,8 +305,8 @@ void Trace::fromMath()
}
void Trace::setColor(QColor color) {
if(color != color) {
color = color;
if(_color != color) {
_color = color;
emit colorChanged(this);
}
}

View file

@ -323,6 +323,7 @@ TraceEditDialog::TraceEditDialog(Trace &t, QWidget *parent) :
t.swapMathOrder(index.row());
ui->view->setCurrentIndex(index.sibling(index.row() + 1, 0));
});
connect(ui->buttonBox->button(QDialogButtonBox::Ok), &QPushButton::clicked, this, &TraceEditDialog::okClicked);
}
TraceEditDialog::~TraceEditDialog()
@ -330,7 +331,7 @@ TraceEditDialog::~TraceEditDialog()
delete ui;
}
void TraceEditDialog::on_buttonBox_accepted()
void TraceEditDialog::okClicked()
{
trace.setName(ui->name->text());
trace.setVelocityFactor(ui->vFactor->value());

View file

@ -46,7 +46,7 @@ public:
~TraceEditDialog();
private slots:
void on_buttonBox_accepted();
void okClicked();
private:
Ui::TraceEditDialog *ui;