libtdepim

statusbarprogresswidget.h
1 #ifndef __KPIM_STATUSBARPROGRESSWIDGET_H
2 #define __KPIM_STATUSBARPROGRESSWIDGET_H
3 /*
4  statusbarprogresswidget.h
5 
6  This file is part of KMail, the KDE mail client.
7 
8  (C) 2004 KMail Authors
9 
10  KMail is free software; you can redistribute it and/or modify it
11  under the terms of the GNU General Public License, version 2, as
12  published by the Free Software Foundation.
13 
14  KMail is distributed in the hope that it will be useful, but
15  WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program; if not, write to the Free Software
21  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 
23  In addition, as a special exception, the copyright holders give
24  permission to link the code of this program with any edition of
25  the TQt library by Trolltech AS, Norway (or with modified versions
26  of TQt that use the same license as TQt), and distribute linked
27  combinations including the two. You must obey the GNU General
28  Public License in all respects for all of the code used other than
29  TQt. If you modify this file, you may extend this exception to
30  your version of the file, but you are not obligated to do so. If
31  you do not wish to do so, delete this exception statement from
32  your version.
33 */
39 #include <kdemacros.h>
40 
41 class KMMainWidget;
42 class KProgress;
43 class TQPushButton;
44 class TQWidgetStack;
45 class TQBoxLayout;
46 class TQLabel;
47 class TQTimer;
48 
49 namespace KPIM {
50 class SSLLabel;
51 class ProgressItem;
52 class ProgressDialog;
53 
54 class TDE_EXPORT StatusbarProgressWidget : public TQFrame {
55 
56  TQ_OBJECT
57 
58 
59 public:
60 
61  StatusbarProgressWidget( ProgressDialog* progressDialog, TQWidget* parent, bool button = true );
62 
63 public slots:
64 
65  void slotClean();
66  void slotSetSSL( bool );
67 
68  void slotProgressItemAdded( KPIM::ProgressItem *i );
69  void slotProgressItemCompleted( KPIM::ProgressItem *i );
70  void slotProgressItemProgress( KPIM::ProgressItem *i, unsigned int value );
71 
72 protected slots:
73  void slotProgressDialogVisible( bool );
74  void slotShowItemDelayed();
75  void slotBusyIndicator();
76  void updateBusyMode();
77 
78 protected:
79  void setMode();
80  void connectSingleItem();
81  void activateSingleItemMode();
82 
83  virtual bool eventFilter( TQObject *, TQEvent * );
84 
85 private:
86  KProgress* m_pProgressBar;
87  TQLabel* m_pLabel;
88  SSLLabel* m_sslLabel;
89  TQPushButton* m_pButton;
90 
91  enum Mode { None, /*Label,*/ Progress };
92 
93  uint mode;
94  bool m_bShowButton;
95 
96  TQBoxLayout *box;
97  TQWidgetStack *stack;
98  ProgressItem *mCurrentItem;
99  ProgressDialog* mProgressDialog;
100  TQTimer *mDelayTimer;
101  TQTimer *mBusyTimer;
102 };
103 
104 } // namespace
105 
106 #endif
TDEPIM classes for drag and drop of mails.