BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
UpdateNotifierWidget.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/mainwindow/UpdateNotifierWidget.h
6 //! @brief Defines class UpdateNotifierWidget
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_UPDATENOTIFIERWIDGET_H
16 #define BORNAGAIN_GUI_COREGUI_MAINWINDOW_UPDATENOTIFIERWIDGET_H
17 
18 #include <QWidget>
19 
20 class UpdateNotifier;
21 class QLabel;
22 class QShowEvent;
23 
24 //! Small on WelcomeView for notofications about updates.
25 
26 class UpdateNotifierWidget : public QWidget {
27  Q_OBJECT
28 public:
29  explicit UpdateNotifierWidget(UpdateNotifier* updateNotifier, QWidget* parent = nullptr);
30 
31 protected:
32  void showEvent(QShowEvent* event);
33 
34 private slots:
35  void onUpdateNotification(const QString& text);
36  void onLinkActivated(const QString& text);
37 
38 private:
40  QLabel* m_updateLabel;
42 };
43 
44 #endif // BORNAGAIN_GUI_COREGUI_MAINWINDOW_UPDATENOTIFIERWIDGET_H
Small on WelcomeView for notofications about updates.
void onLinkActivated(const QString &text)
Processes mouse click on update notification label.
UpdateNotifierWidget(UpdateNotifier *updateNotifier, QWidget *parent=nullptr)
UpdateNotifier * m_updateNotifier
void showEvent(QShowEvent *event)
Schedule check for updates if it was not done yet.
void onUpdateNotification(const QString &text)
Updates label when notification is coming.