progress.hh (726B)
1 #ifndef __GUCK__BROWSER__STATUSBAR__PROGRESS__GUARD__ 2 #define __GUCK__BROWSER__STATUSBAR__PROGRESS__GUARD__ 3 4 #include <QProgressBar> 5 6 7 class progress_t : public QProgressBar 8 { 9 Q_OBJECT 10 11 public: 12 progress_t(QWidget& parent) 13 : QProgressBar(&parent), 14 m_parent(parent), 15 m_enabled(false), 16 m_value(0) 17 { 18 QProgressBar::setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); 19 QProgressBar::setTextVisible(false); 20 QProgressBar::hide(); 21 } 22 23 void on_tab_change(); 24 25 protected slots: 26 void on_load(); 27 void on_progress(int); 28 29 private: 30 QWidget& m_parent; 31 32 bool m_enabled; 33 int m_value; 34 35 }; 36 37 #endif//__GUCK__BROWSER__STATUSBAR__PROGRESS__GUARD__