libkdepim
statusbarprogresswidget.h00001 #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 <kdepimmacros.h>
00040
00041 class KMMainWidget;
00042 class KProgress;
00043 class QPushButton;
00044 class QWidgetStack;
00045 class QBoxLayout;
00046 class QLabel;
00047 class QTimer;
00048
00049 namespace KPIM {
00050 class SSLLabel;
00051 class ProgressItem;
00052 class ProgressDialog;
00053
00054 class KDE_EXPORT StatusbarProgressWidget : public QFrame {
00055
00056 Q_OBJECT
00057
00058 public:
00059
00060 StatusbarProgressWidget( ProgressDialog* progressDialog, QWidget* parent, bool button = true );
00061
00062 public slots:
00063
00064 void slotClean();
00065 void slotSetSSL( bool );
00066
00067 void slotProgressItemAdded( KPIM::ProgressItem *i );
00068 void slotProgressItemCompleted( KPIM::ProgressItem *i );
00069 void slotProgressItemProgress( KPIM::ProgressItem *i, unsigned int value );
00070
00071 protected slots:
00072 void slotProgressDialogVisible( bool );
00073 void slotShowItemDelayed();
00074 void slotBusyIndicator();
00075
00076 protected:
00077 void setMode();
00078 void connectSingleItem();
00079 void activateSingleItemMode();
00080
00081 virtual bool eventFilter( QObject *, QEvent * );
00082
00083 private:
00084 KProgress* m_pProgressBar;
00085 QLabel* m_pLabel;
00086 SSLLabel* m_sslLabel;
00087 QPushButton* m_pButton;
00088
00089 enum Mode { None, Progress };
00090
00091 uint mode;
00092 bool m_bShowButton;
00093
00094 QBoxLayout *box;
00095 QWidgetStack *stack;
00096 ProgressItem *mCurrentItem;
00097 ProgressDialog* mProgressDialog;
00098 QTimer *mDelayTimer;
00099 QTimer *mBusyTimer;
00100 };
00101
00102 }
00103
00104 #endif
|