summaryrefslogtreecommitdiff
path: root/noncore/unsupported/qpdf/qbusybar.h
Unidiff
Diffstat (limited to 'noncore/unsupported/qpdf/qbusybar.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/unsupported/qpdf/qbusybar.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/noncore/unsupported/qpdf/qbusybar.h b/noncore/unsupported/qpdf/qbusybar.h
new file mode 100644
index 0000000..a52094a
--- a/dev/null
+++ b/noncore/unsupported/qpdf/qbusybar.h
@@ -0,0 +1,43 @@
1#ifndef __QBUSYBAR_H__
2#define __QBUSYBAR_H__
3
4#include <qwidget.h>
5
6class QColor;
7class QTimer;
8
9class QBusyBar : public QWidget {
10 Q_OBJECT
11
12public:
13 QBusyBar ( QWidget *parent = 0, const char *name = 0, int flags = 0 );
14 virtual ~QBusyBar ( );
15
16 bool isBusy ( ) const;
17
18 void setParameters ( int div, int fade, int speed );
19
20public slots:
21 void beginBusy ( );
22 void endBusy ( );
23
24 void setBusy ( bool b );
25
26protected:
27 virtual void paintEvent ( QPaintEvent *e );
28
29private slots:
30 void slotTimeout ( );
31
32private:
33 QTimer *m_timer;
34 int m_busy;
35
36 int m_div;
37 int m_pos; // 0 .. 2 * m_div - 1
38 int m_fade; // 0 .. m_div - 1
39 int m_speed;
40 QColor *m_fadecols;
41};
42
43#endif