author | harlekin <harlekin> | 2003-03-24 20:51:18 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-03-24 20:51:18 (UTC) |
commit | 2bf0790dac098fd24a20161f32cd848a87fe56ca (patch) (unidiff) | |
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 | 21 | ||||
-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, 59 insertions, 5 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 \ | |||
11 | sidething.h \ | 11 | sidething.h \ |
12 | runningappbar.h \ | 12 | runningappbar.h \ |
13 | stabmon.h \ | 13 | stabmon.h \ |
14 | inputmethods.h \ | 14 | inputmethods.h \ |
15 | systray.h \ | 15 | systray.h \ |
16 | wait.h \ | 16 | wait.h \ |
17 | waitpopup.h \ | ||
17 | shutdownimpl.h \ | 18 | shutdownimpl.h \ |
18 | launcher.h \ | 19 | launcher.h \ |
19 | launcherview.h \ | 20 | launcherview.h \ |
20 | ../../core/apps/calibrate/calibrate.h \ | 21 | ../../core/apps/calibrate/calibrate.h \ |
21 | startmenu.h \ | 22 | startmenu.h \ |
22 | transferserver.h \ | 23 | transferserver.h \ |
@@ -52,12 +53,13 @@ SOURCES = background.cpp \ | |||
52 | sidething.cpp \ | 53 | sidething.cpp \ |
53 | runningappbar.cpp \ | 54 | runningappbar.cpp \ |
54 | stabmon.cpp \ | 55 | stabmon.cpp \ |
55 | inputmethods.cpp \ | 56 | inputmethods.cpp \ |
56 | systray.cpp \ | 57 | systray.cpp \ |
57 | wait.cpp \ | 58 | wait.cpp \ |
59 | waitpopup.cpp \ | ||
58 | shutdownimpl.cpp \ | 60 | shutdownimpl.cpp \ |
59 | launcher.cpp \ | 61 | launcher.cpp \ |
60 | launcherview.cpp \ | 62 | launcherview.cpp \ |
61 | ../../core/apps/calibrate/calibrate.cpp \ | 63 | ../../core/apps/calibrate/calibrate.cpp \ |
62 | transferserver.cpp \ | 64 | transferserver.cpp \ |
63 | packageslave.cpp \ | 65 | 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 @@ | |||
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "wait.h" | 21 | #include "wait.h" |
22 | 22 | ||
23 | #include <qpe/resource.h> | 23 | #include <qpe/resource.h> |
24 | #include <qpe/config.h> | ||
24 | 25 | ||
25 | #include <qwidget.h> | 26 | #include <qwidget.h> |
26 | #include <qpixmap.h> | 27 | #include <qpixmap.h> |
27 | #include <qpainter.h> | 28 | #include <qpainter.h> |
28 | 29 | ||
29 | 30 | ||
@@ -32,29 +33,41 @@ Wait *lastWaitObject = NULL; | |||
32 | 33 | ||
33 | Wait::Wait( QWidget *parent ) : QWidget( parent ), | 34 | Wait::Wait( QWidget *parent ) : QWidget( parent ), |
34 | pm( Resource::loadPixmap( "wait" ) ), waiting( FALSE ) | 35 | pm( Resource::loadPixmap( "wait" ) ), waiting( FALSE ) |
35 | { | 36 | { |
36 | setFixedSize( pm.size() ); | 37 | setFixedSize( pm.size() ); |
37 | lastWaitObject = this; | 38 | lastWaitObject = this; |
39 | centralWait = new WaitPopup( 0L ); | ||
40 | centralWait->hide(); | ||
38 | hide(); | 41 | hide(); |
39 | } | 42 | } |
40 | 43 | ||
41 | 44 | ||
42 | Wait *Wait::getWaitObject() | 45 | Wait *Wait::getWaitObject() |
43 | { | 46 | { |
44 | return lastWaitObject; | 47 | return lastWaitObject; |
45 | } | 48 | } |
46 | 49 | ||
47 | 50 | ||
48 | void Wait::setWaiting( bool w ) | 51 | void Wait::setWaiting( bool w ) |
49 | { | 52 | { |
53 | Config cfg ( "Launcher" ); | ||
54 | cfg. setGroup ( "GUI" ); | ||
55 | |||
56 | |||
50 | waiting = w; | 57 | waiting = w; |
51 | if ( w ) | 58 | if ( w ) { |
52 | show(); | 59 | if ( cfg. readBoolEntry ( "BigBusy" ) ) { |
53 | else | 60 | centralWait->show(); |
54 | hide(); | 61 | } else { |
62 | show(); | ||
63 | } | ||
64 | } else { | ||
65 | centralWait->hide(); | ||
66 | hide(); | ||
67 | } | ||
55 | } | 68 | } |
56 | 69 | ||
57 | 70 | ||
58 | void Wait::paintEvent( QPaintEvent * ) | 71 | void Wait::paintEvent( QPaintEvent * ) |
59 | { | 72 | { |
60 | QPainter p( this ); | 73 | QPainter p( this ); |
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 @@ | |||
21 | #ifndef __WAIT_H__ | 21 | #ifndef __WAIT_H__ |
22 | #define __WAIT_H__ | 22 | #define __WAIT_H__ |
23 | 23 | ||
24 | #include <qpe/resource.h> | 24 | #include <qpe/resource.h> |
25 | 25 | ||
26 | #include <qwidget.h> | 26 | #include <qwidget.h> |
27 | #include <qlabel.h> | ||
27 | #include <qpixmap.h> | 28 | #include <qpixmap.h> |
28 | #include <qpainter.h> | 29 | #include <qpainter.h> |
29 | 30 | #include "waitpopup.h" | |
30 | 31 | ||
31 | class Wait : public QWidget | 32 | class Wait : public QWidget |
32 | { | 33 | { |
33 | public: | 34 | public: |
34 | Wait( QWidget *parent ); | 35 | Wait( QWidget *parent ); |
35 | void setWaiting( bool w ); | 36 | void setWaiting( bool w ); |
36 | void paintEvent( QPaintEvent * ); | 37 | void paintEvent( QPaintEvent * ); |
37 | static Wait *getWaitObject(); | 38 | static Wait *getWaitObject(); |
38 | private: | 39 | private: |
40 | WaitPopup* centralWait; | ||
39 | QPixmap pm; | 41 | QPixmap pm; |
40 | bool waiting; | 42 | bool waiting; |
41 | }; | 43 | }; |
42 | 44 | ||
43 | 45 | ||
44 | #endif // __WAIT_H__ | 46 | #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 @@ | |||
1 | #include <qlabel.h> | ||
2 | #include <qlayout.h> | ||
3 | #include <qtimer.h> | ||
4 | #include <qmovie.h> | ||
5 | |||
6 | #include "waitpopup.h" | ||
7 | #include <qpe/resource.h> | ||
8 | |||
9 | |||
10 | WaitPopup::WaitPopup(QWidget *parent, const char* msg, bool dispIcon ) | ||
11 | :QDialog(parent, QObject::tr("Wait"), TRUE,WStyle_Customize) { | ||
12 | QHBoxLayout *hbox = new QHBoxLayout( this ); | ||
13 | QLabel *lb; | ||
14 | lb = new QLabel( this ); | ||
15 | //lb->setMovie( QMovie( "./wait.gif" , 200) ); | ||
16 | lb->setPixmap( Resource::loadPixmap( "Clock" ) ); | ||
17 | lb->setBackgroundMode ( NoBackground ); | ||
18 | hbox->addWidget( lb ); | ||
19 | hbox->activate(); | ||
20 | } | ||
21 | |||
22 | WaitPopup::~WaitPopup() { | ||
23 | } | ||
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 @@ | |||
1 | #ifndef WAITPOPUP_H | ||
2 | #define WAITPOPUP_H | ||
3 | |||
4 | #include <qdialog.h> | ||
5 | |||
6 | class WaitPopup : public QDialog { | ||
7 | Q_OBJECT | ||
8 | |||
9 | public: | ||
10 | WaitPopup(QWidget *parent=0,const char* msg=0,bool dispIcon=TRUE); | ||
11 | ~WaitPopup(); | ||
12 | }; | ||
13 | |||
14 | #endif | ||