statusbarprogress.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __statusbarprogress_h__
00020 #define __statusbarprogress_h__
00021
00022 #include "progressbase.h"
00023
00024 class QWidgetStack;
00025 class QBoxLayout;
00026 class QPushButton;
00027 class QLabel;
00028 class KProgress;
00029
00030 namespace KIO {
00031
00032 class Job;
00033
00060 class KIO_EXPORT StatusbarProgress : public ProgressBase {
00061
00062 Q_OBJECT
00063
00064 public:
00065
00072 StatusbarProgress( QWidget* parent, bool button = true );
00073 ~StatusbarProgress() {}
00074
00079 void setJob( KIO::Job *job );
00080
00081 public slots:
00082 virtual void slotClean();
00083 virtual void slotTotalSize( KIO::Job* job, KIO::filesize_t size );
00084 virtual void slotPercent( KIO::Job* job, unsigned long percent );
00085 virtual void slotSpeed( KIO::Job* job, unsigned long speed );
00086
00087 protected:
00088 KProgress* m_pProgressBar;
00089 QLabel* m_pLabel;
00090 QPushButton* m_pButton;
00091
00092 KIO::filesize_t m_iTotalSize;
00093
00094 enum Mode { None, Label, Progress };
00095
00096 uint mode;
00097 bool m_bShowButton;
00098
00099 void setMode();
00100
00101 virtual bool eventFilter( QObject *, QEvent * );
00102 QBoxLayout *box;
00103 QWidgetStack *stack;
00104 protected:
00105 virtual void virtual_hook( int id, void* data );
00106 private:
00107 class StatusbarProgressPrivate* d;
00108 };
00109
00110 }
00111
00112 #endif // __statusbarprogress_h__
|