File indexing completed on 2024-10-06 04:26:03
0001 /* 0002 SPDX-FileCopyrightText: 1998-2007 Sebastian Trueg <trueg@k3b.org> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #ifndef _K3B_TIMEOUT_WIDGET_H_ 0007 #define _K3B_TIMEOUT_WIDGET_H_ 0008 0009 #include <QWidget> 0010 0011 class QPaintEvent; 0012 class QResizeEvent; 0013 0014 0015 namespace K3b { 0016 class TimeoutWidget : public QWidget 0017 { 0018 Q_OBJECT 0019 0020 public: 0021 explicit TimeoutWidget( QWidget* parent ); 0022 ~TimeoutWidget() override; 0023 0024 QSize sizeHint() const override; 0025 QSize minimumSizeHint() const override; 0026 0027 public Q_SLOTS: 0028 void setTimeout( int msecs ); 0029 void start(); 0030 void stop(); 0031 void pause(); 0032 void resume(); 0033 0034 Q_SIGNALS: 0035 void timeout(); 0036 0037 protected: 0038 void paintEvent( QPaintEvent* ) override; 0039 void resizeEvent( QResizeEvent* ) override; 0040 0041 private Q_SLOTS: 0042 void timeStep(); 0043 void startTimer(); 0044 0045 private: 0046 class Private; 0047 Private* d; 0048 }; 0049 } 0050 0051 #endif