blob: a52094af89942b83e8107c945c1c811c67f59321 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#ifndef __QBUSYBAR_H__
#define __QBUSYBAR_H__
#include <qwidget.h>
class QColor;
class QTimer;
class QBusyBar : public QWidget {
Q_OBJECT
public:
QBusyBar ( QWidget *parent = 0, const char *name = 0, int flags = 0 );
virtual ~QBusyBar ( );
bool isBusy ( ) const;
void setParameters ( int div, int fade, int speed );
public slots:
void beginBusy ( );
void endBusy ( );
void setBusy ( bool b );
protected:
virtual void paintEvent ( QPaintEvent *e );
private slots:
void slotTimeout ( );
private:
QTimer *m_timer;
int m_busy;
int m_div;
int m_pos; // 0 .. 2 * m_div - 1
int m_fade; // 0 .. m_div - 1
int m_speed;
QColor *m_fadecols;
};
#endif
|