Apply buttons for graph setup dialogs
This commit is contained in:
parent
54de9fd6b0
commit
4dd477f604
@ -255,7 +255,7 @@
|
|||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="standardButtons">
|
<property name="standardButtons">
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
<set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -107,7 +107,7 @@ void TraceSmithChart::axisSetupDialog()
|
|||||||
ui->lineTable->setItemDelegateForColumn(SmithChartContantLineModel::ColIndexType, new SmithChartTypeDelegate);
|
ui->lineTable->setItemDelegateForColumn(SmithChartContantLineModel::ColIndexType, new SmithChartTypeDelegate);
|
||||||
ui->lineTable->setItemDelegateForColumn(SmithChartContantLineModel::ColIndexParam, new SmithChartParamDelegate);
|
ui->lineTable->setItemDelegateForColumn(SmithChartContantLineModel::ColIndexParam, new SmithChartParamDelegate);
|
||||||
|
|
||||||
connect(ui->buttonBox, &QDialogButtonBox::accepted, [=](){
|
auto updateSettings = [=]() {
|
||||||
limitToSpan = ui->displayModeFreq->currentIndex() == 1;
|
limitToSpan = ui->displayModeFreq->currentIndex() == 1;
|
||||||
limitToEdge = ui->displayModeImp->currentIndex() == 1;
|
limitToEdge = ui->displayModeImp->currentIndex() == 1;
|
||||||
manualFrequencyRange = ui->displayFreqOverride->isChecked();
|
manualFrequencyRange = ui->displayFreqOverride->isChecked();
|
||||||
@ -115,6 +115,14 @@ void TraceSmithChart::axisSetupDialog()
|
|||||||
fmax = ui->displayStopFreq->value();
|
fmax = ui->displayStopFreq->value();
|
||||||
updateContextMenu();
|
updateContextMenu();
|
||||||
triggerReplot();
|
triggerReplot();
|
||||||
|
};
|
||||||
|
|
||||||
|
connect(ui->buttonBox->button(QDialogButtonBox::Apply), &QPushButton::clicked, [=](){
|
||||||
|
updateSettings();
|
||||||
|
});
|
||||||
|
|
||||||
|
connect(ui->buttonBox, &QDialogButtonBox::accepted, [=](){
|
||||||
|
updateSettings();
|
||||||
});
|
});
|
||||||
connect(ui->zoomFactor, &SIUnitEdit::valueChanged, [=](){
|
connect(ui->zoomFactor, &SIUnitEdit::valueChanged, [=](){
|
||||||
edgeReflection = 1.0 / ui->zoomFactor->value();
|
edgeReflection = 1.0 / ui->zoomFactor->value();
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include "ui_waterfallaxisdialog.h"
|
#include "ui_waterfallaxisdialog.h"
|
||||||
|
|
||||||
#include <QStandardItemModel>
|
#include <QStandardItemModel>
|
||||||
|
#include <QPushButton>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@ -100,6 +101,10 @@ WaterfallAxisDialog::WaterfallAxisDialog(TraceWaterfall *plot) :
|
|||||||
ui->Xlinear->setChecked(true);
|
ui->Xlinear->setChecked(true);
|
||||||
}
|
}
|
||||||
ui->Xalignment->setCurrentIndex((int) plot->align);
|
ui->Xalignment->setCurrentIndex((int) plot->align);
|
||||||
|
|
||||||
|
connect(ui->buttonBox->button(QDialogButtonBox::Apply), &QPushButton::clicked, [=](){
|
||||||
|
on_buttonBox_accepted();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
WaterfallAxisDialog::~WaterfallAxisDialog()
|
WaterfallAxisDialog::~WaterfallAxisDialog()
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>451</width>
|
<width>515</width>
|
||||||
<height>351</height>
|
<height>377</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -344,7 +344,7 @@
|
|||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="standardButtons">
|
<property name="standardButtons">
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
<set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -258,6 +258,9 @@ XYplotAxisDialog::XYplotAxisDialog(TraceXYPlot *plot) :
|
|||||||
editLine(plot->constantLines[ui->lineList->currentRow()]);
|
editLine(plot->constantLines[ui->lineList->currentRow()]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
connect(ui->buttonBox->button(QDialogButtonBox::Apply), &QPushButton::clicked, [=](){
|
||||||
|
on_buttonBox_accepted();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
XYplotAxisDialog::~XYplotAxisDialog()
|
XYplotAxisDialog::~XYplotAxisDialog()
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>814</width>
|
<width>814</width>
|
||||||
<height>439</height>
|
<height>458</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -541,7 +541,7 @@
|
|||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="standardButtons">
|
<property name="standardButtons">
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
<set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -592,8 +592,8 @@
|
|||||||
</connection>
|
</connection>
|
||||||
</connections>
|
</connections>
|
||||||
<buttongroups>
|
<buttongroups>
|
||||||
<buttongroup name="Y1group"/>
|
|
||||||
<buttongroup name="Xgroup"/>
|
<buttongroup name="Xgroup"/>
|
||||||
|
<buttongroup name="Y1group"/>
|
||||||
<buttongroup name="Y2group"/>
|
<buttongroup name="Y2group"/>
|
||||||
</buttongroups>
|
</buttongroups>
|
||||||
</ui>
|
</ui>
|
||||||
|
Loading…
Reference in New Issue
Block a user