diff options
Diffstat (limited to 'tests/manual/examples/widgets/widgets/validators/ledwidget.h')
-rw-r--r-- | tests/manual/examples/widgets/widgets/validators/ledwidget.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/manual/examples/widgets/widgets/validators/ledwidget.h b/tests/manual/examples/widgets/widgets/validators/ledwidget.h new file mode 100644 index 0000000000..81215b668f --- /dev/null +++ b/tests/manual/examples/widgets/widgets/validators/ledwidget.h @@ -0,0 +1,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 |