BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
CautionSignWidget.h
Go to the documentation of this file.
1
// ************************************************************************************************
2
//
3
// BornAgain: simulate and fit reflection and scattering
4
//
5
//! @file GUI/View/Info/CautionSignWidget.h
6
//! @brief Defines class CautionSignWidget
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_VIEW_INFO_CAUTIONSIGNWIDGET_H
16
#define BORNAGAIN_GUI_VIEW_INFO_CAUTIONSIGNWIDGET_H
17
18
#include <QPixmap>
19
#include <QString>
20
#include <QWidget>
21
22
//! The CautionSignWidget is an transparent widget with caution sign pixmap intended to be
23
//! overlayed onto other widget at some arbitrary position.
24
class
CautionSignWidget
:
public
QWidget {
25
public
:
26
CautionSignWidget
(QWidget* parent =
nullptr
);
27
28
void
setPosition
(
int
x,
int
y);
29
30
void
setCautionHeader
(
const
QString& message);
31
void
setCautionMessage
(
const
QString& message) {
m_caution_message
= message; }
32
33
protected
:
34
void
paintEvent
(QPaintEvent* event)
override
;
35
void
mousePressEvent
(QMouseEvent* event)
override
;
36
37
private
:
38
QPixmap
m_pixmap
;
39
QString
m_caution_header
;
40
QString
m_caution_message
;
41
};
42
43
#endif
// BORNAGAIN_GUI_VIEW_INFO_CAUTIONSIGNWIDGET_H
CautionSignWidget
The CautionSignWidget is an transparent widget with caution sign pixmap intended to be overlayed onto...
Definition:
CautionSignWidget.h:24
CautionSignWidget::CautionSignWidget
CautionSignWidget(QWidget *parent=nullptr)
Definition:
CautionSignWidget.cpp:20
CautionSignWidget::setCautionHeader
void setCautionHeader(const QString &message)
Definition:
CautionSignWidget.cpp:54
CautionSignWidget::paintEvent
void paintEvent(QPaintEvent *event) override
Definition:
CautionSignWidget.cpp:29
CautionSignWidget::m_caution_message
QString m_caution_message
Definition:
CautionSignWidget.h:40
CautionSignWidget::m_caution_header
QString m_caution_header
Definition:
CautionSignWidget.h:39
CautionSignWidget::m_pixmap
QPixmap m_pixmap
Definition:
CautionSignWidget.h:38
CautionSignWidget::setCautionMessage
void setCautionMessage(const QString &message)
Definition:
CautionSignWidget.h:31
CautionSignWidget::mousePressEvent
void mousePressEvent(QMouseEvent *event) override
Definition:
CautionSignWidget.cpp:37
CautionSignWidget::setPosition
void setPosition(int x, int y)
set geometry of widget around center point
Definition:
CautionSignWidget.cpp:49
GUI
View
Info
CautionSignWidget.h
Generated by
1.9.1