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 <tdemacros.h>
40
41class KMMainWidget;
42class KProgress;
43class TQPushButton;
44class TQWidgetStack;
45class TQBoxLayout;
46class TQLabel;
47class TQTimer;
48
49namespace KPIM {
50class SSLLabel;
51class ProgressItem;
52class ProgressDialog;
53
54class TDE_EXPORT StatusbarProgressWidget : public TQFrame {
55
56 TQ_OBJECT
57
58
59public:
60
61 StatusbarProgressWidget( ProgressDialog* progressDialog, TQWidget* parent, bool button = true );
62
63public 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
72protected slots:
73 void slotProgressDialogVisible( bool );
74 void slotShowItemDelayed();
75 void slotBusyIndicator();
76 void updateBusyMode();
77
78protected:
79 void setMode();
80 void connectSingleItem();
81 void activateSingleItemMode();
82
83 virtual bool eventFilter( TQObject *, TQEvent * );
84
85private:
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.