-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: -enum BusyIndicatorType { - BIT_Normal = 0, - BIT_Blinking -}; @@ -99,2 +95,4 @@ public: void paintItem( QPainter *p, const QColorGroup &cg ); + + void setBusyIndicatorType ( BusyIndicatorType t ) { busyType = t; } protected: @@ -105,2 +103,3 @@ private: void paintAnimatedIcon( QPainter *p ); + BusyIndicatorType busyType; }; @@ -149,4 +148,4 @@ public: void updateCategoriesAndMimeTypes(); - - void doAutoScroll() + void setBusyIndicatorType ( BusyIndicatorType t ) { busyType = t; } + void doAutoScroll() { @@ -178,6 +177,9 @@ public: bsy = c; - if ( oldBusy ) + if ( oldBusy ) { oldBusy->resetIcon(); - if ( bsy ) + } + if ( bsy ) { + bsy->setBusyIndicatorType( busyType ) ; bsy->animateIcon(); + } } @@ -365,2 +367,3 @@ private: #endif + BusyIndicatorType busyType; }; @@ -376,3 +379,6 @@ void LauncherView::setBusy(bool on) void LauncherView::setBusyIndicatorType( const QString& type ) { - /* ### FIXME */ + if ( type. lower ( ) == "animated" ) + icons->setBusyIndicatorType( BIT_Animated ) ; + else + icons->setBusyIndicatorType( BIT_Normal ) ; } @@ -422,2 +428,4 @@ void LauncherItem::paintItem( QPainter *p, const QColorGroup &cg ) + + void LauncherItem::paintAnimatedIcon( QPainter *p ) @@ -442,4 +450,6 @@ void LauncherItem::paintAnimatedIcon( QPainter *p ) #ifdef BOUNCE_BUSY_ICON - bounceY = 4 - ((iteration+2)%8); - bounceY = bounceY < 0 ? -bounceY : bounceY; + if ( busyType == BIT_Animated ) { + bounceY = 4 - ((iteration+2)%8); + bounceY = bounceY < 0 ? -bounceY : bounceY; + } #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; + + +enum BusyIndicatorType { + BIT_Normal = 0, + BIT_Animated +}; + class LauncherView : public QVBox @@ -108,3 +115,3 @@ private: QImage loadBackgroundImage(QString &fname); - int m_busyType; + }; |