BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
WarningSignWidget.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/Views/InfoWidgets/WarningSignWidget.h
6 //! @brief Defines class WarningSignWidget
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_VIEWS_INFOWIDGETS_WARNINGSIGNWIDGET_H
16 #define BORNAGAIN_GUI_COREGUI_VIEWS_INFOWIDGETS_WARNINGSIGNWIDGET_H
17 
18 #include <QPixmap>
19 #include <QString>
20 #include <QWidget>
21 
22 //! The WarningSignWidget is an transparent widget with warning sign pixmap intended to be
23 //! overlayed onto other widget at some arbitrary position.
24 class WarningSignWidget : public QWidget {
25 public:
26  WarningSignWidget(QWidget* parent = 0);
27 
28  void setPosition(int x, int y);
29 
30  void setWarningHeader(const QString& message);
31  void setWarningMessage(const QString& message) { m_warning_message = message; }
32 
33 protected:
34  void paintEvent(QPaintEvent* event);
35  void mousePressEvent(QMouseEvent* event);
36 
37 private:
38  QPixmap m_pixmap;
41 };
42 
43 #endif // BORNAGAIN_GUI_COREGUI_VIEWS_INFOWIDGETS_WARNINGSIGNWIDGET_H
The WarningSignWidget is an transparent widget with warning sign pixmap intended to be overlayed onto...
void paintEvent(QPaintEvent *event)
void setWarningMessage(const QString &message)
void setWarningHeader(const QString &message)
WarningSignWidget(QWidget *parent=0)
void mousePressEvent(QMouseEvent *event)
void setPosition(int x, int y)
set geometry of widget around center point