| 169 | #endif |
| 170 | |
| 171 | ScreenLabelWindow::ScreenLabelWindow(QWidget* parent, const QString &text) |
| 172 | : QWidget(parent, TRANSPARENT_WINDOW_FLAGS) { |
| 173 | TRANSPARENT_WINDOW_ATTRIBUTES(); |
| 174 | m_text = text; |
| 175 | m_font = QFont("Sans", 18, QFont::Bold); |
| 176 | QFontMetrics fm(m_font); |
| 177 | setFixedSize(fm.size(Qt::TextSingleLine, m_text) + QSize(60, 40)); |
| 178 | setWindowOpacity(0.75); |
| 179 | } |
| 180 | |
| 181 | void ScreenLabelWindow::paintEvent(QPaintEvent* event) { |
| 182 | Q_UNUSED(event); |
nothing calls this directly
no outgoing calls
no test coverage detected