summaryrefslogtreecommitdiffabout
path: root/kmicromail/statuswidget.cpp
Unidiff
Diffstat (limited to 'kmicromail/statuswidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/statuswidget.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/kmicromail/statuswidget.cpp b/kmicromail/statuswidget.cpp
new file mode 100644
index 0000000..19cf635
--- a/dev/null
+++ b/kmicromail/statuswidget.cpp
@@ -0,0 +1,33 @@
1#include <qtimer.h>
2#include <qprogressbar.h>
3#include <qlabel.h>
4
5#include "statuswidget.h"
6
7// the current problem I see is "locking": used exclusive by one sender
8
9
10StatusWidget::StatusWidget( QWidget* parent, const char* name,WFlags fl )
11 : StatusWidgetUI( parent, name, fl ) {
12
13 setMaximumHeight( 15 );
14 // hide for now since nothing reports decent progress data yet.
15 statusProgress->hide();
16 }
17
18StatusWidget::~StatusWidget() {
19}
20
21void StatusWidget::setText( const QString& text ) {
22 show();
23 statusText->setText( text );
24 QTimer::singleShot( 5000, this, SLOT( hide() ) );
25}
26
27void StatusWidget::setProgress( int progress ) {
28 show();
29 statusProgress->setProgress( progress );
30 if ( progress == 100 ) {
31 hide();
32 }
33}