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