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