mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-08 16:03:43 +00:00
Use different prefixes depending on the axis type
This commit is contained in:
parent
2265b8f6c0
commit
670dff15c6
3 changed files with 46 additions and 2 deletions
|
|
@ -53,9 +53,13 @@ XYplotAxisDialog::XYplotAxisDialog(TraceXYPlot *plot) :
|
|||
ui->Y1divs->setEnabled(index != 0 && !autoRange);
|
||||
auto type = (TraceXYPlot::YAxisType) index;
|
||||
QString unit = plot->AxisUnit(type);
|
||||
QString prefixes = plot->AxisPrefixes(type);
|
||||
ui->Y1min->setUnit(unit);
|
||||
ui->Y1min->setPrefixes(prefixes);
|
||||
ui->Y1max->setUnit(unit);
|
||||
ui->Y1max->setPrefixes(prefixes);
|
||||
ui->Y1divs->setUnit(unit);
|
||||
ui->Y1divs->setPrefixes(prefixes);
|
||||
});
|
||||
connect(ui->Y1auto, &QCheckBox::toggled, [this](bool checked) {
|
||||
ui->Y1min->setEnabled(!checked);
|
||||
|
|
@ -73,9 +77,13 @@ XYplotAxisDialog::XYplotAxisDialog(TraceXYPlot *plot) :
|
|||
ui->Y2divs->setEnabled(index != 0 && !autoRange);
|
||||
auto type = (TraceXYPlot::YAxisType) index;
|
||||
QString unit = plot->AxisUnit(type);
|
||||
QString prefixes = plot->AxisPrefixes(type);
|
||||
ui->Y2min->setUnit(unit);
|
||||
ui->Y2min->setPrefixes(prefixes);
|
||||
ui->Y2max->setUnit(unit);
|
||||
ui->Y2max->setPrefixes(prefixes);
|
||||
ui->Y2divs->setUnit(unit);
|
||||
ui->Y2divs->setPrefixes(prefixes);
|
||||
});
|
||||
|
||||
connect(ui->Y2auto, &QCheckBox::toggled, [this](bool checked) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue