Diffstat (limited to 'noncore/unsupported/qpdf/qbusybar.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/qpdf/qbusybar.h | 43 |
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 | |||
6 | class QColor; | ||
7 | class QTimer; | ||
8 | |||
9 | class QBusyBar : public QWidget { | ||
10 | Q_OBJECT | ||
11 | |||
12 | public: | ||
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 | |||
20 | public slots: | ||
21 | void beginBusy ( ); | ||
22 | void endBusy ( ); | ||
23 | |||
24 | void setBusy ( bool b ); | ||
25 | |||
26 | protected: | ||
27 | virtual void paintEvent ( QPaintEvent *e ); | ||
28 | |||
29 | private slots: | ||
30 | void slotTimeout ( ); | ||
31 | |||
32 | private: | ||
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 | ||