Bugfixes automatic source/receiver calibration

This commit is contained in:
Jan Käberich 2020-11-18 22:47:38 +01:00
parent 5b771e2a86
commit c00d00cac2
11 changed files with 168 additions and 79 deletions

View file

@ -3,14 +3,19 @@
#include <QSettings>
#include <QDebug>
void InformationBox::ShowMessage(QString title, QString message, QWidget *parent)
void InformationBox::ShowMessage(QString title, QString message, QString messageID)
{
// check if the user still wants to see this message
auto hash = qHash(message);
unsigned int hash;
if(messageID.isEmpty()) {
hash = qHash(message);
} else {
hash = qHash(messageID);
}
QSettings s;
if(!s.contains(hashToSettingsKey(hash))) {
auto box = new InformationBox(title, message, hash, parent);
auto box = new InformationBox(title, message, hash, nullptr);
box->exec();
}
}

View file

@ -7,7 +7,7 @@ class InformationBox : public QMessageBox
{
Q_OBJECT
public:
static void ShowMessage(QString title, QString message, QWidget *parent = nullptr);
static void ShowMessage(QString title, QString message, QString messageID = QString());
private:
InformationBox(QString title, QString message, unsigned int hash, QWidget *parent);
~InformationBox();