summaryrefslogtreecommitdiffabout
path: root/kmicromail/statuswidget.cpp
authorzautrix <zautrix>2004-07-03 16:33:12 (UTC)
committer zautrix <zautrix>2004-07-03 16:33:12 (UTC)
commite3b89230f065c48c84b48c88edb6eb088374c487 (patch) (side-by-side diff)
tree162ea2ef909a6f82ccfcedf45d80d6c821174912 /kmicromail/statuswidget.cpp
parent2dd6ac0b2d24c91d35ce674a6c26351352df2b15 (diff)
downloadkdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.zip
kdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.tar.gz
kdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.tar.bz2
Initial revision
Diffstat (limited to 'kmicromail/statuswidget.cpp') (more/less context) (show 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 @@
+#include <qtimer.h>
+#include <qprogressbar.h>
+#include <qlabel.h>
+
+#include "statuswidget.h"
+
+// the current problem I see is "locking": used exclusive by one sender
+
+
+StatusWidget::StatusWidget( QWidget* parent, const char* name,WFlags fl )
+ : StatusWidgetUI( parent, name, fl ) {
+
+ setMaximumHeight( 15 );
+ // hide for now since nothing reports decent progress data yet.
+ statusProgress->hide();
+ }
+
+StatusWidget::~StatusWidget() {
+}
+
+void StatusWidget::setText( const QString& text ) {
+ show();
+ statusText->setText( text );
+ QTimer::singleShot( 5000, this, SLOT( hide() ) );
+}
+
+void StatusWidget::setProgress( int progress ) {
+ show();
+ statusProgress->setProgress( progress );
+ if ( progress == 100 ) {
+ hide();
+ }
+}