00001 #ifndef __KPIM_STATUSBARPROGRESSWIDGET_H
00002 #define __KPIM_STATUSBARPROGRESSWIDGET_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00039 #include <tdepimmacros.h>
00040
00041 class KMMainWidget;
00042 class KProgress;
00043 class TQPushButton;
00044 class TQWidgetStack;
00045 class TQBoxLayout;
00046 class TQLabel;
00047 class TQTimer;
00048
00049 namespace KPIM {
00050 class SSLLabel;
00051 class ProgressItem;
00052 class ProgressDialog;
00053
00054 class KDE_EXPORT StatusbarProgressWidget : public TQFrame {
00055
00056 Q_OBJECT
00057
00058
00059 public:
00060
00061 StatusbarProgressWidget( ProgressDialog* progressDialog, TQWidget* parent, bool button = true );
00062
00063 public slots:
00064
00065 void slotClean();
00066 void slotSetSSL( bool );
00067
00068 void slotProgressItemAdded( KPIM::ProgressItem *i );
00069 void slotProgressItemCompleted( KPIM::ProgressItem *i );
00070 void slotProgressItemProgress( KPIM::ProgressItem *i, unsigned int value );
00071
00072 protected slots:
00073 void slotProgressDialogVisible( bool );
00074 void slotShowItemDelayed();
00075 void slotBusyIndicator();
00076 void updateBusyMode();
00077
00078 protected:
00079 void setMode();
00080 void connectSingleItem();
00081 void activateSingleItemMode();
00082
00083 virtual bool eventFilter( TQObject *, TQEvent * );
00084
00085 private:
00086 KProgress* m_pProgressBar;
00087 TQLabel* m_pLabel;
00088 SSLLabel* m_sslLabel;
00089 TQPushButton* m_pButton;
00090
00091 enum Mode { None, Progress };
00092
00093 uint mode;
00094 bool m_bShowButton;
00095
00096 TQBoxLayout *box;
00097 TQWidgetStack *stack;
00098 ProgressItem *mCurrentItem;
00099 ProgressDialog* mProgressDialog;
00100 TQTimer *mDelayTimer;
00101 TQTimer *mBusyTimer;
00102 };
00103
00104 }
00105
00106 #endif