author | harlekin <harlekin> | 2003-11-30 18:04:13 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-11-30 18:04:13 (UTC) |
commit | f40b049e2345a9b008ea2bdc241062302bd7ca04 (patch) (unidiff) | |
tree | 82ba2d954605de18ef063315b62f04f434ce43cb | |
parent | a7e786be4f9545a881015de8ba8a124a62f0f891 (diff) | |
download | opie-f40b049e2345a9b008ea2bdc241062302bd7ca04.zip opie-f40b049e2345a9b008ea2bdc241062302bd7ca04.tar.gz opie-f40b049e2345a9b008ea2bdc241062302bd7ca04.tar.bz2 |
make the busy indicator launcher settings also work in head
-rw-r--r-- | core/launcher/launcherview.cpp | 32 | ||||
-rw-r--r-- | core/launcher/launcherview.h | 9 |
2 files changed, 29 insertions, 12 deletions
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp index 85163b6..62c678d 100644 --- a/core/launcher/launcherview.cpp +++ b/core/launcher/launcherview.cpp | |||
@@ -64,6 +64,2 @@ public: | |||
64 | 64 | ||
65 | enum BusyIndicatorType { | ||
66 | BIT_Normal = 0, | ||
67 | BIT_Blinking | ||
68 | }; | ||
69 | 65 | ||
@@ -99,2 +95,4 @@ public: | |||
99 | void paintItem( QPainter *p, const QColorGroup &cg ); | 95 | void paintItem( QPainter *p, const QColorGroup &cg ); |
96 | |||
97 | void setBusyIndicatorType ( BusyIndicatorType t ) { busyType = t; } | ||
100 | protected: | 98 | protected: |
@@ -105,2 +103,3 @@ private: | |||
105 | void paintAnimatedIcon( QPainter *p ); | 103 | void paintAnimatedIcon( QPainter *p ); |
104 | BusyIndicatorType busyType; | ||
106 | }; | 105 | }; |
@@ -149,4 +148,4 @@ public: | |||
149 | void updateCategoriesAndMimeTypes(); | 148 | void updateCategoriesAndMimeTypes(); |
150 | 149 | void setBusyIndicatorType ( BusyIndicatorType t ) { busyType = t; } | |
151 | void doAutoScroll() | 150 | void doAutoScroll() |
152 | { | 151 | { |
@@ -178,6 +177,9 @@ public: | |||
178 | bsy = c; | 177 | bsy = c; |
179 | if ( oldBusy ) | 178 | if ( oldBusy ) { |
180 | oldBusy->resetIcon(); | 179 | oldBusy->resetIcon(); |
181 | if ( bsy ) | 180 | } |
181 | if ( bsy ) { | ||
182 | bsy->setBusyIndicatorType( busyType ) ; | ||
182 | bsy->animateIcon(); | 183 | bsy->animateIcon(); |
184 | } | ||
183 | } | 185 | } |
@@ -365,2 +367,3 @@ private: | |||
365 | #endif | 367 | #endif |
368 | BusyIndicatorType busyType; | ||
366 | }; | 369 | }; |
@@ -376,3 +379,6 @@ void LauncherView::setBusy(bool on) | |||
376 | void LauncherView::setBusyIndicatorType( const QString& type ) { | 379 | void LauncherView::setBusyIndicatorType( const QString& type ) { |
377 | /* ### FIXME */ | 380 | if ( type. lower ( ) == "animated" ) |
381 | icons->setBusyIndicatorType( BIT_Animated ) ; | ||
382 | else | ||
383 | icons->setBusyIndicatorType( BIT_Normal ) ; | ||
378 | } | 384 | } |
@@ -422,2 +428,4 @@ void LauncherItem::paintItem( QPainter *p, const QColorGroup &cg ) | |||
422 | 428 | ||
429 | |||
430 | |||
423 | void LauncherItem::paintAnimatedIcon( QPainter *p ) | 431 | void LauncherItem::paintAnimatedIcon( QPainter *p ) |
@@ -442,4 +450,6 @@ void LauncherItem::paintAnimatedIcon( QPainter *p ) | |||
442 | #ifdef BOUNCE_BUSY_ICON | 450 | #ifdef BOUNCE_BUSY_ICON |
443 | bounceY = 4 - ((iteration+2)%8); | 451 | if ( busyType == BIT_Animated ) { |
444 | bounceY = bounceY < 0 ? -bounceY : bounceY; | 452 | bounceY = 4 - ((iteration+2)%8); |
453 | bounceY = bounceY < 0 ? -bounceY : bounceY; | ||
454 | } | ||
445 | #endif | 455 | #endif |
diff --git a/core/launcher/launcherview.h b/core/launcher/launcherview.h index 7863d6a..e40a006 100644 --- a/core/launcher/launcherview.h +++ b/core/launcher/launcherview.h | |||
@@ -36,2 +36,9 @@ class QComboBox; | |||
36 | 36 | ||
37 | |||
38 | |||
39 | enum BusyIndicatorType { | ||
40 | BIT_Normal = 0, | ||
41 | BIT_Animated | ||
42 | }; | ||
43 | |||
37 | class LauncherView : public QVBox | 44 | class LauncherView : public QVBox |
@@ -108,3 +115,3 @@ private: | |||
108 | QImage loadBackgroundImage(QString &fname); | 115 | QImage loadBackgroundImage(QString &fname); |
109 | int m_busyType; | 116 | |
110 | }; | 117 | }; |