File indexing completed on 2024-04-28 17:06:20

0001 /*
0002     SPDX-FileCopyrightText: 2010 Jan Lepper <krusader@users.sourceforge.net>
0003     SPDX-FileCopyrightText: 2010-2022 Krusader Krew <https://krusader.org>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #ifndef KRERRORDISPLAY_H
0009 #define KRERRORDISPLAY_H
0010 
0011 // QtCore
0012 #include <QTimer>
0013 // QtGui
0014 #include <QColor>
0015 // QtWidgets
0016 #include <QLabel>
0017 #include <QWidget>
0018 
0019 class KrErrorDisplay : public QLabel
0020 {
0021     Q_OBJECT
0022 public:
0023     explicit KrErrorDisplay(QWidget *parent);
0024 
0025     void setText(const QString &text);
0026 
0027 private slots:
0028     void slotTimeout();
0029 
0030 private:
0031     void dim();
0032 
0033     QTimer _dimTimer;
0034     QColor _startColor;
0035     QColor _targetColor;
0036     int _currentDim;
0037 };
0038 
0039 #endif