mysocials-core 1.0

src/utils/QProgressIndicator.h

00001 #ifndef QPROGRESSINDICATOR_H
00002 #define QPROGRESSINDICATOR_H
00003 
00004 #include <QWidget>
00005 
00014 class QProgressIndicator : public QWidget
00015 {
00016     Q_OBJECT
00017     Q_PROPERTY(int delay READ animationDelay WRITE setAnimationDelay)
00018 public:
00019     QProgressIndicator(QWidget* parent = 0);
00020 
00027     int animationDelay() const { return m_delay; }
00028 
00029     virtual QSize sizeHint() const;
00030     int heightForWidth(int w) const;
00031 public slots:
00033     void startAnimation();
00034 
00040     void stopAnimation();
00041 
00049     void setAnimationDelay(int delay);
00050 protected:
00051     virtual void timerEvent(QTimerEvent * event); 
00052     virtual void paintEvent(QPaintEvent * event);
00053 private:
00054     int m_angle;
00055     int m_timerId;
00056     int m_delay;
00057 };
00058 
00059 #endif // QPROGRESSINDICATOR_H