mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-07 23:43:42 +00:00
Show setup/calibration info in statusbar
This commit is contained in:
parent
fa481e2062
commit
392b06f0eb
6 changed files with 58 additions and 1 deletions
|
|
@ -127,6 +127,7 @@ VNA::VNA(AppWindow *window)
|
|||
connect(saveCal, &QAction::triggered, [=](){
|
||||
if(cal.saveToFile()) {
|
||||
calEdited = false;
|
||||
UpdateStatusbar();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -431,6 +432,8 @@ VNA::VNA(AppWindow *window)
|
|||
};
|
||||
|
||||
// Calibration connections
|
||||
connect(this, &VNA::CalibrationApplied, this, &VNA::UpdateStatusbar);
|
||||
connect(this, &VNA::CalibrationDisabled, this, &VNA::UpdateStatusbar);
|
||||
connect(cbEnableCal, &QCheckBox::stateChanged, calToolbarLambda);
|
||||
connect(cbType, qOverload<int>(&QComboBox::currentIndexChanged), calToolbarLambda);
|
||||
connect(this, &VNA::CalibrationDisabled, [=](){
|
||||
|
|
@ -1525,3 +1528,17 @@ VNA::SweepType VNA::SweepTypeFromString(QString s)
|
|||
return SweepType::Last;
|
||||
}
|
||||
|
||||
|
||||
void VNA::UpdateStatusbar()
|
||||
{
|
||||
if(calValid) {
|
||||
QFileInfo fi(cal.getCurrentCalibrationFile());
|
||||
auto filename = fi.fileName();
|
||||
if(filename.isEmpty()) {
|
||||
filename = "Unsaved";
|
||||
}
|
||||
setStatusbarMessage("Calibration: "+filename);
|
||||
} else {
|
||||
setStatusbarMessage("Calibration: -");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue