Fix valgrind issues
This commit is contained in:
parent
1c6a1ab6fd
commit
75f4ee245f
@ -289,6 +289,9 @@ void AmplitudeCalDialog::AddPointDialog()
|
|||||||
auto d = new QDialog();
|
auto d = new QDialog();
|
||||||
auto ui = new Ui::AddAmplitudePointsDialog();
|
auto ui = new Ui::AddAmplitudePointsDialog();
|
||||||
ui->setupUi(d);
|
ui->setupUi(d);
|
||||||
|
connect(d, &QDialog::finished, [=](){
|
||||||
|
delete ui;
|
||||||
|
});
|
||||||
ui->frequency->setUnit("Hz");
|
ui->frequency->setUnit("Hz");
|
||||||
ui->frequency->setPrefixes(" kMG");
|
ui->frequency->setPrefixes(" kMG");
|
||||||
ui->startFreq->setUnit("Hz");
|
ui->startFreq->setUnit("Hz");
|
||||||
@ -356,6 +359,9 @@ void AmplitudeCalDialog::AutomaticMeasurementDialog()
|
|||||||
automatic.dialog = new QDialog(this);
|
automatic.dialog = new QDialog(this);
|
||||||
auto ui = new Ui::AutomaticAmplitudeDialog();
|
auto ui = new Ui::AutomaticAmplitudeDialog();
|
||||||
ui->setupUi(automatic.dialog);
|
ui->setupUi(automatic.dialog);
|
||||||
|
connect(automatic.dialog, &QDialog::finished, [=](){
|
||||||
|
delete ui;
|
||||||
|
});
|
||||||
automatic.progress = ui->progress;
|
automatic.progress = ui->progress;
|
||||||
ui->explanation->setText(info);
|
ui->explanation->setText(info);
|
||||||
ui->status->setText("Gathering information about "+otherCal+" Calibration...");
|
ui->status->setText("Gathering information about "+otherCal+" Calibration...");
|
||||||
|
@ -674,7 +674,7 @@ void Marker::updateContextmenu()
|
|||||||
auto typemenu = contextmenu.addMenu("Type");
|
auto typemenu = contextmenu.addMenu("Type");
|
||||||
auto typegroup = new QActionGroup(&contextmenu);
|
auto typegroup = new QActionGroup(&contextmenu);
|
||||||
for(auto t : getSupportedTypes()) {
|
for(auto t : getSupportedTypes()) {
|
||||||
auto setTypeAction = new QAction(typeToString(t));
|
auto setTypeAction = new QAction(typeToString(t), typemenu);
|
||||||
setTypeAction->setCheckable(true);
|
setTypeAction->setCheckable(true);
|
||||||
if(t == type) {
|
if(t == type) {
|
||||||
setTypeAction->setChecked(true);
|
setTypeAction->setChecked(true);
|
||||||
@ -689,7 +689,7 @@ void Marker::updateContextmenu()
|
|||||||
auto table = contextmenu.addMenu("Data Format in Table");
|
auto table = contextmenu.addMenu("Data Format in Table");
|
||||||
auto tablegroup = new QActionGroup(&contextmenu);
|
auto tablegroup = new QActionGroup(&contextmenu);
|
||||||
for(auto f : applicableFormats()) {
|
for(auto f : applicableFormats()) {
|
||||||
auto setFormatAction = new QAction(formatToString(f));
|
auto setFormatAction = new QAction(formatToString(f), table);
|
||||||
setFormatAction->setCheckable(true);
|
setFormatAction->setCheckable(true);
|
||||||
if(f == formatTable) {
|
if(f == formatTable) {
|
||||||
setFormatAction->setChecked(true);
|
setFormatAction->setChecked(true);
|
||||||
@ -703,7 +703,7 @@ void Marker::updateContextmenu()
|
|||||||
|
|
||||||
auto graph = contextmenu.addMenu("Show on Graph");
|
auto graph = contextmenu.addMenu("Show on Graph");
|
||||||
for(auto f : applicableFormats()) {
|
for(auto f : applicableFormats()) {
|
||||||
auto setFormatAction = new QAction(formatToString(f));
|
auto setFormatAction = new QAction(formatToString(f), graph);
|
||||||
setFormatAction->setCheckable(true);
|
setFormatAction->setCheckable(true);
|
||||||
if(formatGraph.count(f)) {
|
if(formatGraph.count(f)) {
|
||||||
setFormatAction->setChecked(true);
|
setFormatAction->setChecked(true);
|
||||||
@ -753,7 +753,7 @@ void Marker::updateContextmenu()
|
|||||||
}
|
}
|
||||||
if(group != nullptr) {
|
if(group != nullptr) {
|
||||||
// "remove from group" available
|
// "remove from group" available
|
||||||
auto removeGroup = new QAction("Remove from linked group");
|
auto removeGroup = new QAction("Remove from linked group", &contextmenu);
|
||||||
connect(removeGroup, &QAction::triggered, [=](){
|
connect(removeGroup, &QAction::triggered, [=](){
|
||||||
group->remove(this);
|
group->remove(this);
|
||||||
});
|
});
|
||||||
@ -765,7 +765,7 @@ void Marker::updateContextmenu()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
auto deleteAction = new QAction("Delete");
|
auto deleteAction = new QAction("Delete", &contextmenu);
|
||||||
connect(deleteAction, &QAction::triggered, this, &Marker::deleteLater);
|
connect(deleteAction, &QAction::triggered, this, &Marker::deleteLater);
|
||||||
contextmenu.addAction(deleteAction);
|
contextmenu.addAction(deleteAction);
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ MarkerWidget::MarkerWidget(MarkerModel &model, QWidget *parent) :
|
|||||||
}
|
}
|
||||||
// multiple markers selected, execute group context menu
|
// multiple markers selected, execute group context menu
|
||||||
QMenu menu;
|
QMenu menu;
|
||||||
auto createGroup = new QAction("Link selected");
|
auto createGroup = new QAction("Link selected", &menu);
|
||||||
connect(createGroup, &QAction::triggered, [&](){
|
connect(createGroup, &QAction::triggered, [&](){
|
||||||
auto g = model.createMarkerGroup();
|
auto g = model.createMarkerGroup();
|
||||||
// assign markers to group
|
// assign markers to group
|
||||||
@ -68,7 +68,7 @@ MarkerWidget::MarkerWidget(MarkerModel &model, QWidget *parent) :
|
|||||||
});
|
});
|
||||||
menu.addAction(createGroup);
|
menu.addAction(createGroup);
|
||||||
if(anyInGroup) {
|
if(anyInGroup) {
|
||||||
auto removeGroup = new QAction("Break Links");
|
auto removeGroup = new QAction("Break Links", &menu);
|
||||||
connect(removeGroup, &QAction::triggered, [&](){
|
connect(removeGroup, &QAction::triggered, [&](){
|
||||||
// remove selected markers from groups if they are already assigned to one
|
// remove selected markers from groups if they are already assigned to one
|
||||||
for(auto m : selected) {
|
for(auto m : selected) {
|
||||||
|
@ -42,6 +42,9 @@ void Math::DFT::edit()
|
|||||||
auto d = new QDialog();
|
auto d = new QDialog();
|
||||||
auto ui = new Ui::DFTDialog;
|
auto ui = new Ui::DFTDialog;
|
||||||
ui->setupUi(d);
|
ui->setupUi(d);
|
||||||
|
connect(d, &QDialog::finished, [=](){
|
||||||
|
delete ui;
|
||||||
|
});
|
||||||
ui->windowBox->setLayout(new QVBoxLayout);
|
ui->windowBox->setLayout(new QVBoxLayout);
|
||||||
ui->windowBox->layout()->addWidget(window.createEditor());
|
ui->windowBox->layout()->addWidget(window.createEditor());
|
||||||
|
|
||||||
@ -76,6 +79,9 @@ QWidget *Math::DFT::createExplanationWidget()
|
|||||||
auto w = new QWidget();
|
auto w = new QWidget();
|
||||||
auto ui = new Ui::DFTExplanationWidget;
|
auto ui = new Ui::DFTExplanationWidget;
|
||||||
ui->setupUi(w);
|
ui->setupUi(w);
|
||||||
|
connect(w, &QWidget::destroyed, [=](){
|
||||||
|
delete ui;
|
||||||
|
});
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,6 +37,9 @@ void Math::Expression::edit()
|
|||||||
auto d = new QDialog();
|
auto d = new QDialog();
|
||||||
auto ui = new Ui::ExpressionDialog;
|
auto ui = new Ui::ExpressionDialog;
|
||||||
ui->setupUi(d);
|
ui->setupUi(d);
|
||||||
|
connect(d, &QDialog::finished, [=](){
|
||||||
|
delete ui;
|
||||||
|
});
|
||||||
ui->expEdit->setText(exp);
|
ui->expEdit->setText(exp);
|
||||||
connect(ui->buttonBox, &QDialogButtonBox::accepted, [=](){
|
connect(ui->buttonBox, &QDialogButtonBox::accepted, [=](){
|
||||||
exp = ui->expEdit->text();
|
exp = ui->expEdit->text();
|
||||||
@ -57,6 +60,9 @@ QWidget *Math::Expression::createExplanationWidget()
|
|||||||
auto w = new QWidget();
|
auto w = new QWidget();
|
||||||
auto ui = new Ui::ExpressionExplanationWidget;
|
auto ui = new Ui::ExpressionExplanationWidget;
|
||||||
ui->setupUi(w);
|
ui->setupUi(w);
|
||||||
|
connect(w, &QWidget::destroyed, [=](){
|
||||||
|
delete ui;
|
||||||
|
});
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,6 +29,9 @@ void MedianFilter::edit()
|
|||||||
auto d = new QDialog();
|
auto d = new QDialog();
|
||||||
auto ui = new Ui::MedianFilterDialog();
|
auto ui = new Ui::MedianFilterDialog();
|
||||||
ui->setupUi(d);
|
ui->setupUi(d);
|
||||||
|
connect(d, &QDialog::finished, [=](){
|
||||||
|
delete ui;
|
||||||
|
});
|
||||||
ui->kernelSize->setValue(kernelSize);
|
ui->kernelSize->setValue(kernelSize);
|
||||||
ui->sortingMethod->setCurrentIndex((int) order);
|
ui->sortingMethod->setCurrentIndex((int) order);
|
||||||
|
|
||||||
@ -52,6 +55,9 @@ QWidget *MedianFilter::createExplanationWidget()
|
|||||||
auto w = new QWidget();
|
auto w = new QWidget();
|
||||||
auto ui = new Ui::MedianFilterExplanationWidget;
|
auto ui = new Ui::MedianFilterExplanationWidget;
|
||||||
ui->setupUi(w);
|
ui->setupUi(w);
|
||||||
|
connect(w, &QWidget::destroyed, [=](){
|
||||||
|
delete ui;
|
||||||
|
});
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,6 +52,9 @@ void TDR::edit()
|
|||||||
auto d = new QDialog();
|
auto d = new QDialog();
|
||||||
auto ui = new Ui::TDRDialog;
|
auto ui = new Ui::TDRDialog;
|
||||||
ui->setupUi(d);
|
ui->setupUi(d);
|
||||||
|
connect(d, &QDialog::finished, [=](){
|
||||||
|
delete ui;
|
||||||
|
});
|
||||||
ui->windowBox->setLayout(new QVBoxLayout);
|
ui->windowBox->setLayout(new QVBoxLayout);
|
||||||
ui->windowBox->layout()->addWidget(window.createEditor());
|
ui->windowBox->layout()->addWidget(window.createEditor());
|
||||||
|
|
||||||
@ -119,6 +122,9 @@ QWidget *TDR::createExplanationWidget()
|
|||||||
auto w = new QWidget();
|
auto w = new QWidget();
|
||||||
auto ui = new Ui::TDRExplanationWidget;
|
auto ui = new Ui::TDRExplanationWidget;
|
||||||
ui->setupUi(w);
|
ui->setupUi(w);
|
||||||
|
connect(w, &QWidget::destroyed, [=](){
|
||||||
|
delete ui;
|
||||||
|
});
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,6 +58,9 @@ void Math::TimeGate::edit()
|
|||||||
auto d = new QDialog();
|
auto d = new QDialog();
|
||||||
auto ui = new Ui::TimeGateDialog();
|
auto ui = new Ui::TimeGateDialog();
|
||||||
ui->setupUi(d);
|
ui->setupUi(d);
|
||||||
|
connect(d, &QDialog::finished, [=](){
|
||||||
|
delete ui;
|
||||||
|
});
|
||||||
ui->graph->setGate(this);
|
ui->graph->setGate(this);
|
||||||
ui->windowBox->setLayout(new QVBoxLayout);
|
ui->windowBox->setLayout(new QVBoxLayout);
|
||||||
ui->windowBox->layout()->addWidget(window.createEditor());
|
ui->windowBox->layout()->addWidget(window.createEditor());
|
||||||
@ -113,6 +116,9 @@ QWidget *Math::TimeGate::createExplanationWidget()
|
|||||||
auto w = new QWidget();
|
auto w = new QWidget();
|
||||||
auto ui = new Ui::TimeGateExplanationWidget;
|
auto ui = new Ui::TimeGateExplanationWidget;
|
||||||
ui->setupUi(w);
|
ui->setupUi(w);
|
||||||
|
connect(w, &QWidget::destroyed, [=](){
|
||||||
|
delete ui;
|
||||||
|
});
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,6 +74,9 @@ TraceMath::TypeInfo TraceMath::getInfo(TraceMath::Type type)
|
|||||||
ret.explanationWidget = new QWidget();
|
ret.explanationWidget = new QWidget();
|
||||||
auto ui = new Ui::TimeDomainGatingExplanationWidget;
|
auto ui = new Ui::TimeDomainGatingExplanationWidget;
|
||||||
ui->setupUi(ret.explanationWidget);
|
ui->setupUi(ret.explanationWidget);
|
||||||
|
connect(ret.explanationWidget, &QWidget::destroyed, [=](){
|
||||||
|
delete ui;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -169,6 +169,9 @@ TraceEditDialog::TraceEditDialog(Trace &t, QWidget *parent) :
|
|||||||
auto d = new QDialog();
|
auto d = new QDialog();
|
||||||
auto ui = new Ui::NewTraceMathDialog();
|
auto ui = new Ui::NewTraceMathDialog();
|
||||||
ui->setupUi(d);
|
ui->setupUi(d);
|
||||||
|
connect(d, &QDialog::finished, [=](){
|
||||||
|
delete ui;
|
||||||
|
});
|
||||||
for(int i = 0; i < (int) TraceMath::Type::Last;i++) {
|
for(int i = 0; i < (int) TraceMath::Type::Last;i++) {
|
||||||
auto info = TraceMath::getInfo(static_cast<TraceMath::Type>(i));
|
auto info = TraceMath::getInfo(static_cast<TraceMath::Type>(i));
|
||||||
ui->list->addItem(info.name);
|
ui->list->addItem(info.name);
|
||||||
|
@ -34,6 +34,9 @@ void Deembedding::startMeasurementDialog(bool S11, bool S12, bool S21, bool S22)
|
|||||||
auto ui = new Ui_DeembeddingMeasurementDialog;
|
auto ui = new Ui_DeembeddingMeasurementDialog;
|
||||||
measurementUI = ui;
|
measurementUI = ui;
|
||||||
ui->setupUi(measurementDialog);
|
ui->setupUi(measurementDialog);
|
||||||
|
connect(measurementDialog, &QDialog::finished, [=](){
|
||||||
|
delete ui;
|
||||||
|
});
|
||||||
|
|
||||||
// add the trace selector
|
// add the trace selector
|
||||||
set<unsigned int> skip;
|
set<unsigned int> skip;
|
||||||
@ -106,7 +109,8 @@ void Deembedding::startMeasurementDialog(bool S11, bool S12, bool S21, bool S22)
|
|||||||
|
|
||||||
Deembedding::Deembedding(TraceModel &tm)
|
Deembedding::Deembedding(TraceModel &tm)
|
||||||
: tm(tm),
|
: tm(tm),
|
||||||
measuring(false)
|
measuring(false),
|
||||||
|
sweepPoints(0)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -71,6 +71,9 @@ void MatchingNetwork::edit()
|
|||||||
auto dialog = new QDialog();
|
auto dialog = new QDialog();
|
||||||
auto ui = new Ui::MatchingNetworkDialog();
|
auto ui = new Ui::MatchingNetworkDialog();
|
||||||
ui->setupUi(dialog);
|
ui->setupUi(dialog);
|
||||||
|
connect(dialog, &QDialog::finished, [=](){
|
||||||
|
delete ui;
|
||||||
|
});
|
||||||
dialog->setModal(true);
|
dialog->setModal(true);
|
||||||
|
|
||||||
graph = new QWidget();
|
graph = new QWidget();
|
||||||
|
@ -81,6 +81,9 @@ void PortExtension::edit()
|
|||||||
auto dialog = new QDialog();
|
auto dialog = new QDialog();
|
||||||
ui = new Ui::PortExtensionEditDialog();
|
ui = new Ui::PortExtensionEditDialog();
|
||||||
ui->setupUi(dialog);
|
ui->setupUi(dialog);
|
||||||
|
connect(dialog, &QDialog::finished, [=](){
|
||||||
|
delete ui;
|
||||||
|
});
|
||||||
|
|
||||||
// set initial values
|
// set initial values
|
||||||
ui->P1Enabled->setChecked(port1.enabled);
|
ui->P1Enabled->setChecked(port1.enabled);
|
||||||
|
@ -126,6 +126,9 @@ void TwoThru::edit()
|
|||||||
auto dialog = new QDialog();
|
auto dialog = new QDialog();
|
||||||
ui = new Ui::TwoThruDialog();
|
ui = new Ui::TwoThruDialog();
|
||||||
ui->setupUi(dialog);
|
ui->setupUi(dialog);
|
||||||
|
connect(dialog, &QDialog::finished, [=](){
|
||||||
|
delete ui;
|
||||||
|
});
|
||||||
ui->Z0->setUnit("Ω");
|
ui->Z0->setUnit("Ω");
|
||||||
ui->Z0->setPrecision(4);
|
ui->Z0->setPrecision(4);
|
||||||
ui->Z0->setValue(Z0);
|
ui->Z0->setValue(Z0);
|
||||||
|
@ -83,6 +83,9 @@ void TraceWidgetVNA::importDialog()
|
|||||||
auto dialog = new QDialog();
|
auto dialog = new QDialog();
|
||||||
auto ui = new Ui::s2pImportOptions;
|
auto ui = new Ui::s2pImportOptions;
|
||||||
ui->setupUi(dialog);
|
ui->setupUi(dialog);
|
||||||
|
connect(dialog, &QDialog::finished, [=](){
|
||||||
|
delete ui;
|
||||||
|
});
|
||||||
ui->applyCal->setEnabled(calAvailable);
|
ui->applyCal->setEnabled(calAvailable);
|
||||||
ui->deembed->setEnabled(deembedAvailable);
|
ui->deembed->setEnabled(deembedAvailable);
|
||||||
bool applyCal = false;
|
bool applyCal = false;
|
||||||
|
@ -53,6 +53,7 @@ VNA::VNA(AppWindow *window)
|
|||||||
: Mode(window, "Vector Network Analyzer"),
|
: Mode(window, "Vector Network Analyzer"),
|
||||||
SCPINode("VNA"),
|
SCPINode("VNA"),
|
||||||
deembedding(traceModel),
|
deembedding(traceModel),
|
||||||
|
deembedding_active(false),
|
||||||
central(new TileWidget(traceModel))
|
central(new TileWidget(traceModel))
|
||||||
{
|
{
|
||||||
averages = 1;
|
averages = 1;
|
||||||
@ -60,6 +61,7 @@ VNA::VNA(AppWindow *window)
|
|||||||
calMeasuring = false;
|
calMeasuring = false;
|
||||||
calDialog.reset();
|
calDialog.reset();
|
||||||
calEdited = false;
|
calEdited = false;
|
||||||
|
settings.sweepType = SweepType::Frequency;
|
||||||
|
|
||||||
// Create default traces
|
// Create default traces
|
||||||
auto tS11 = new Trace("S11", Qt::yellow);
|
auto tS11 = new Trace("S11", Qt::yellow);
|
||||||
@ -551,6 +553,8 @@ VNA::VNA(AppWindow *window)
|
|||||||
SetPoints(pref.Startup.DefaultSweep.points);
|
SetPoints(pref.Startup.DefaultSweep.points);
|
||||||
if(pref.Startup.DefaultSweep.type == "Power Sweep") {
|
if(pref.Startup.DefaultSweep.type == "Power Sweep") {
|
||||||
SetSweepType(SweepType::Power);
|
SetSweepType(SweepType::Power);
|
||||||
|
} else {
|
||||||
|
SetSweepType(SweepType::Frequency);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user