BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
The StatusLabel class shows a single line of text on a white background. Opposite to QLabel, if text string is too long for current size, it will be clipped.
This class is intended for ColorMapLabel, where the size of font is adjusted automatically depending from available space.
Definition at line 28 of file StatusLabel.h.
Public Member Functions | |
StatusLabel (QWidget *parent=nullptr) | |
void | setAlignment (Qt::Alignment) |
void | setFont (const QFont &font) |
void | setPointSize (int pointSize) |
void | setText (const QString &text) |
Protected Member Functions | |
void | paintEvent (QPaintEvent *event) override |
Private Attributes | |
Qt::Alignment | m_alignment |
QFont | m_font |
QString | m_text |
|
explicit |
Definition at line 34 of file StatusLabel.cpp.
|
overrideprotected |
void StatusLabel::setAlignment | ( | Qt::Alignment | alignment | ) |
Definition at line 60 of file StatusLabel.cpp.
References m_alignment.
void StatusLabel::setFont | ( | const QFont & | font | ) |
Definition at line 48 of file StatusLabel.cpp.
References m_font.
void StatusLabel::setPointSize | ( | int | pointSize | ) |
Definition at line 54 of file StatusLabel.cpp.
References m_font.
void StatusLabel::setText | ( | const QString & | text | ) |
Definition at line 42 of file StatusLabel.cpp.
References m_text.
Referenced by PlotStatusLabel::onPlotStatusString(), Plot1DCanvas::onStatusString(), SpecularPlotCanvas::onStatusString(), and ColorMapCanvas::onStatusString().
|
private |
Definition at line 44 of file StatusLabel.h.
Referenced by paintEvent(), and setAlignment().
|
private |
Definition at line 45 of file StatusLabel.h.
Referenced by paintEvent(), setFont(), and setPointSize().
|
private |
Definition at line 43 of file StatusLabel.h.
Referenced by paintEvent(), and setText().