Calibration - show in tooltip

This commit is contained in:
Zoran Kostic 2020-11-30 18:16:33 +01:00
parent cde385935d
commit 3fae95b33f
3 changed files with 14 additions and 1 deletions

View file

@ -709,6 +709,7 @@ bool Calibration::openFromFile(QString filename)
qWarning() << "Calibration file parsing failed: " << e.what();
return false;
}
this->currentCalFile = filename; // if all ok, remember this and show on widget
return true;
}
@ -741,6 +742,7 @@ bool Calibration::saveToFile(QString filename)
auto calkit_file = filename + ".calkit";
qDebug() << "Saving associated calibration kit to file" << calkit_file;
kit.toFile(calkit_file);
this->currentCalFile = calibration_file; // if all ok, remember this and show on widget
return true;
}
@ -770,6 +772,10 @@ QString Calibration::hzToString(double freqHz){
return res;
}
QString Calibration::getCurrentCalibrationFile(){
return this->currentCalFile;
}
ostream& operator<<(ostream &os, const Calibration &c)
{
for(auto m : c.measurements) {

View file

@ -138,6 +138,11 @@ private:
Calkit kit;
QString hzToString(double freqHz);
private:
QString currentCalFile;
public:
QString getCurrentCalibrationFile();
};
#endif // CALIBRATION_H