BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
OverlayLabelWidget.h
Go to the documentation of this file.
1
// ************************************************************************************************
2
//
3
// BornAgain: simulate and fit reflection and scattering
4
//
5
//! @file GUI/View/Info/OverlayLabelWidget.h
6
//! @brief Defines class OverlayLabelWidget
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_OVERLAYLABELWIDGET_H
16
#define BORNAGAIN_GUI_VIEW_INFO_OVERLAYLABELWIDGET_H
17
18
#include <QRect>
19
#include <QString>
20
#include <QWidget>
21
22
//! The OverlayLabelWidget is a semi-transparent overlay label to place on top of other
23
//! widgets outside of any layout context.
24
25
class
OverlayLabelWidget
:
public
QWidget {
26
Q_OBJECT
27
public
:
28
OverlayLabelWidget
(QWidget* parent =
nullptr
);
29
30
void
setRectangle
(
const
QRect& rect);
31
void
setPosition
(
int
x,
int
y);
32
33
void
setText
(
const
QString& text) {
m_text
= text; }
34
35
protected
:
36
void
paintEvent
(QPaintEvent* event)
override
;
37
38
private
:
39
QString
m_text
;
40
QRect
m_bounding_rect
;
41
};
42
43
#endif
// BORNAGAIN_GUI_VIEW_INFO_OVERLAYLABELWIDGET_H
OverlayLabelWidget
The OverlayLabelWidget is a semi-transparent overlay label to place on top of other widgets outside o...
Definition:
OverlayLabelWidget.h:25
OverlayLabelWidget::OverlayLabelWidget
OverlayLabelWidget(QWidget *parent=nullptr)
Definition:
OverlayLabelWidget.cpp:22
OverlayLabelWidget::m_bounding_rect
QRect m_bounding_rect
Definition:
OverlayLabelWidget.h:40
OverlayLabelWidget::setRectangle
void setRectangle(const QRect &rect)
Definition:
OverlayLabelWidget.cpp:29
OverlayLabelWidget::paintEvent
void paintEvent(QPaintEvent *event) override
Definition:
OverlayLabelWidget.cpp:39
OverlayLabelWidget::setText
void setText(const QString &text)
Definition:
OverlayLabelWidget.h:33
OverlayLabelWidget::setPosition
void setPosition(int x, int y)
Definition:
OverlayLabelWidget.cpp:34
OverlayLabelWidget::m_text
QString m_text
Definition:
OverlayLabelWidget.h:39
GUI
View
Info
OverlayLabelWidget.h
Generated by
1.9.1