mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-21 06:13:41 +00:00
support saving of trace data in setup files
This commit is contained in:
parent
7d7bd3a44c
commit
4ad3d3ac54
11 changed files with 82 additions and 26 deletions
|
|
@ -89,13 +89,11 @@ VNA::VNA(AppWindow *window, QString name)
|
|||
calMenu->addSeparator();
|
||||
|
||||
connect(calLoad, &QAction::triggered, [=](){
|
||||
LoadCalibration("");
|
||||
LoadCalibration();
|
||||
});
|
||||
|
||||
connect(saveCal, &QAction::triggered, [=](){
|
||||
if(cal.toFile()) {
|
||||
UpdateStatusbar();
|
||||
}
|
||||
SaveCalibration();
|
||||
});
|
||||
|
||||
connect(&cal, &Calibration::startMeasurements, this, &VNA::StartCalibrationMeasurements);
|
||||
|
|
@ -705,7 +703,7 @@ void VNA::shutdown()
|
|||
if(cal.hasUnsavedChanges() && cal.getCaltype().type != Calibration::Type::None) {
|
||||
auto save = InformationBox::AskQuestion("Save calibration?", "The calibration contains data that has not been saved yet. Do you want to save it before exiting?", false);
|
||||
if(save) {
|
||||
cal.toFile();
|
||||
SaveCalibration();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1740,3 +1738,8 @@ bool VNA::LoadCalibration(QString filename)
|
|||
{
|
||||
return cal.fromFile(filename);
|
||||
}
|
||||
|
||||
bool VNA::SaveCalibration(QString filename)
|
||||
{
|
||||
return cal.toFile(filename);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue