author | harlekin <harlekin> | 2003-03-24 20:51:18 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-03-24 20:51:18 (UTC) |
commit | 2bf0790dac098fd24a20161f32cd848a87fe56ca (patch) (side-by-side diff) | |
tree | 3c39e00d0cc843a28b58e9ab1e96910e2141eca8 | |
parent | 13814875fb747d0081d191cd572a2219b9772c77 (diff) | |
download | opie-2bf0790dac098fd24a20161f32cd848a87fe56ca.zip opie-2bf0790dac098fd24a20161f32cd848a87fe56ca.tar.gz opie-2bf0790dac098fd24a20161f32cd848a87fe56ca.tar.bz2 |
preliminary big busy cursor - maybe an animation later
-rw-r--r-- | core/launcher/launcher.pro | 2 | ||||
-rw-r--r-- | core/launcher/wait.cpp | 17 | ||||
-rw-r--r-- | core/launcher/wait.h | 4 | ||||
-rw-r--r-- | core/launcher/waitpopup.cpp | 23 | ||||
-rw-r--r-- | core/launcher/waitpopup.h | 14 |
5 files changed, 57 insertions, 3 deletions
diff --git a/core/launcher/launcher.pro b/core/launcher/launcher.pro index d0a573b..a876d1d 100644 --- a/core/launcher/launcher.pro +++ b/core/launcher/launcher.pro @@ -11,12 +11,13 @@ HEADERS = background.h \ sidething.h \ runningappbar.h \ stabmon.h \ inputmethods.h \ systray.h \ wait.h \ + waitpopup.h \ shutdownimpl.h \ launcher.h \ launcherview.h \ ../../core/apps/calibrate/calibrate.h \ startmenu.h \ transferserver.h \ @@ -52,12 +53,13 @@ SOURCES = background.cpp \ sidething.cpp \ runningappbar.cpp \ stabmon.cpp \ inputmethods.cpp \ systray.cpp \ wait.cpp \ + waitpopup.cpp \ shutdownimpl.cpp \ launcher.cpp \ launcherview.cpp \ ../../core/apps/calibrate/calibrate.cpp \ transferserver.cpp \ packageslave.cpp \ diff --git a/core/launcher/wait.cpp b/core/launcher/wait.cpp index 059e6f1..e1832dd 100644 --- a/core/launcher/wait.cpp +++ b/core/launcher/wait.cpp @@ -18,12 +18,13 @@ ** **********************************************************************/ #include "wait.h" #include <qpe/resource.h> +#include <qpe/config.h> #include <qwidget.h> #include <qpixmap.h> #include <qpainter.h> @@ -32,30 +33,42 @@ Wait *lastWaitObject = NULL; Wait::Wait( QWidget *parent ) : QWidget( parent ), pm( Resource::loadPixmap( "wait" ) ), waiting( FALSE ) { setFixedSize( pm.size() ); lastWaitObject = this; + centralWait = new WaitPopup( 0L ); + centralWait->hide(); hide(); } Wait *Wait::getWaitObject() { return lastWaitObject; } void Wait::setWaiting( bool w ) { + Config cfg ( "Launcher" ); + cfg. setGroup ( "GUI" ); + + waiting = w; - if ( w ) + if ( w ) { + if ( cfg. readBoolEntry ( "BigBusy" ) ) { + centralWait->show(); + } else { show(); - else + } + } else { + centralWait->hide(); hide(); } +} void Wait::paintEvent( QPaintEvent * ) { QPainter p( this ); p.drawPixmap( 0, 0, pm ); diff --git a/core/launcher/wait.h b/core/launcher/wait.h index 519b654..6e5e41a 100644 --- a/core/launcher/wait.h +++ b/core/launcher/wait.h @@ -21,24 +21,26 @@ #ifndef __WAIT_H__ #define __WAIT_H__ #include <qpe/resource.h> #include <qwidget.h> +#include <qlabel.h> #include <qpixmap.h> #include <qpainter.h> - +#include "waitpopup.h" class Wait : public QWidget { public: Wait( QWidget *parent ); void setWaiting( bool w ); void paintEvent( QPaintEvent * ); static Wait *getWaitObject(); private: + WaitPopup* centralWait; QPixmap pm; bool waiting; }; #endif // __WAIT_H__ diff --git a/core/launcher/waitpopup.cpp b/core/launcher/waitpopup.cpp new file mode 100644 index 0000000..e488ab5 --- a/dev/null +++ b/core/launcher/waitpopup.cpp @@ -0,0 +1,23 @@ +#include <qlabel.h> +#include <qlayout.h> +#include <qtimer.h> +#include <qmovie.h> + +#include "waitpopup.h" +#include <qpe/resource.h> + + +WaitPopup::WaitPopup(QWidget *parent, const char* msg, bool dispIcon ) + :QDialog(parent, QObject::tr("Wait"), TRUE,WStyle_Customize) { + QHBoxLayout *hbox = new QHBoxLayout( this ); + QLabel *lb; + lb = new QLabel( this ); + //lb->setMovie( QMovie( "./wait.gif" , 200) ); + lb->setPixmap( Resource::loadPixmap( "Clock" ) ); + lb->setBackgroundMode ( NoBackground ); + hbox->addWidget( lb ); + hbox->activate(); +} + +WaitPopup::~WaitPopup() { +} diff --git a/core/launcher/waitpopup.h b/core/launcher/waitpopup.h new file mode 100644 index 0000000..76f0c27 --- a/dev/null +++ b/core/launcher/waitpopup.h @@ -0,0 +1,14 @@ +#ifndef WAITPOPUP_H +#define WAITPOPUP_H + +#include <qdialog.h> + +class WaitPopup : public QDialog { + Q_OBJECT + +public: + WaitPopup(QWidget *parent=0,const char* msg=0,bool dispIcon=TRUE); + ~WaitPopup(); +}; + +#endif |