BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
UpdateNotifier.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/mainwindow/UpdateNotifier.h
6 //! @brief Implements class UpdateNotifier
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_GUI_COREGUI_MAINWINDOW_UPDATENOTIFIER_H
16 #define BORNAGAIN_GUI_COREGUI_MAINWINDOW_UPDATENOTIFIER_H
17 
18 #include <QObject>
19 
20 class QNetworkAccessManager;
21 class QNetworkReply;
22 
23 class UpdateNotifier : public QObject {
24  Q_OBJECT
25 public:
26  UpdateNotifier(QObject* parent = 0);
27  void checkForUpdates();
28 
29 public slots:
30  void replyFinished(QNetworkReply* reply);
31 
32  void setCheckUpdatesFlag(bool flag);
33 
34  bool updatesFlag() const;
35 
36  bool hasDefinedUpdatesFlag() const;
37 
38 signals:
39  void onUpdateNotification(const QString& text);
40 
41 private:
42  QNetworkAccessManager* m_networkAccessManager;
43 };
44 
45 #endif // BORNAGAIN_GUI_COREGUI_MAINWINDOW_UPDATENOTIFIER_H
void setCheckUpdatesFlag(bool flag)
void replyFinished(QNetworkReply *reply)
bool hasDefinedUpdatesFlag() const
Returns true if settings contain record about user choice for updates.
QNetworkAccessManager * m_networkAccessManager
void onUpdateNotification(const QString &text)
bool updatesFlag() const
Returns true if there is defined flag requiring check for updates.
UpdateNotifier(QObject *parent=0)