File indexing completed on 2024-04-28 04:49:49

0001 /*
0002     SPDX-FileCopyrightText: 1998-2008 Sebastian Trueg <trueg@k3b.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef K3B_BUSY_WIDGET_H
0008 #define K3B_BUSY_WIDGET_H
0009 
0010 
0011 #include "k3b_export.h"
0012 #include <QFrame>
0013 
0014 class QTimer;
0015 
0016 
0017 namespace K3b {
0018     class LIBK3B_EXPORT BusyWidget : public QFrame
0019     {
0020         Q_OBJECT
0021 
0022     public:
0023         explicit BusyWidget( QWidget* parent = 0 );
0024         ~BusyWidget() override;
0025 
0026         void showBusy( bool b );
0027 
0028         QSize sizeHint() const override;
0029         QSize minimumSizeHint() const override;
0030 
0031     protected:
0032         void paintEvent( QPaintEvent* ) override;
0033 
0034     private Q_SLOTS:
0035         void animateBusy();
0036 
0037     private:
0038         bool m_bBusy;
0039         int m_iBusyPosition;
0040 
0041         QTimer* m_busyTimer;
0042     };
0043 }
0044 
0045 
0046 #endif