blob: 81215b668f24720a9ddf47c4f5629c340c654d94 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef LEDWIDGET_H
#define LEDWIDGET_H
#include <QLabel>
#include <QPixmap>
#include <QTimer>
class LEDWidget : public QLabel
{
Q_OBJECT
public:
LEDWidget(QWidget *parent = nullptr);
public slots:
void flash();
private slots:
void extinguish();
private:
QPixmap onPixmap, offPixmap;
QTimer flashTimer;
};
#endif // LEDWIDGET_H
|