summaryrefslogtreecommitdiff
authorharlekin <harlekin>2003-11-30 18:04:13 (UTC)
committer harlekin <harlekin>2003-11-30 18:04:13 (UTC)
commitf40b049e2345a9b008ea2bdc241062302bd7ca04 (patch) (side-by-side diff)
tree82ba2d954605de18ef063315b62f04f434ce43cb
parenta7e786be4f9545a881015de8ba8a124a62f0f891 (diff)
downloadopie-f40b049e2345a9b008ea2bdc241062302bd7ca04.zip
opie-f40b049e2345a9b008ea2bdc241062302bd7ca04.tar.gz
opie-f40b049e2345a9b008ea2bdc241062302bd7ca04.tar.bz2
make the busy indicator launcher settings also work in head
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/launcherview.cpp26
-rw-r--r--core/launcher/launcherview.h9
2 files changed, 26 insertions, 9 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
@@ -63,8 +63,4 @@ public:
};
-enum BusyIndicatorType {
- BIT_Normal = 0,
- BIT_Blinking
-};
static QMap<QString,BgPixmap*> *bgCache = 0;
@@ -98,4 +94,6 @@ public:
virtual int compare ( QIconViewItem * i ) const;
void paintItem( QPainter *p, const QColorGroup &cg );
+
+ void setBusyIndicatorType ( BusyIndicatorType t ) { busyType = t; }
protected:
bool isBigIcon;
@@ -104,4 +102,5 @@ protected:
private:
void paintAnimatedIcon( QPainter *p );
+ BusyIndicatorType busyType;
};
@@ -148,5 +147,5 @@ public:
void updateCategoriesAndMimeTypes();
-
+ void setBusyIndicatorType ( BusyIndicatorType t ) { busyType = t; }
void doAutoScroll()
{
@@ -177,10 +176,13 @@ public:
LauncherItem *oldBusy = bsy;
bsy = c;
- if ( oldBusy )
+ if ( oldBusy ) {
oldBusy->resetIcon();
- if ( bsy )
+ }
+ if ( bsy ) {
+ bsy->setBusyIndicatorType( busyType ) ;
bsy->animateIcon();
}
}
+ }
bool inKeyEvent() const { return ike; }
@@ -364,4 +366,5 @@ private:
QPixmap busyPix;
#endif
+ BusyIndicatorType busyType;
};
@@ -375,5 +378,8 @@ 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 ) ;
}
@@ -421,4 +427,6 @@ void LauncherItem::paintItem( QPainter *p, const QColorGroup &cg )
}
+
+
void LauncherItem::paintAnimatedIcon( QPainter *p )
{
@@ -441,6 +449,8 @@ void LauncherItem::paintAnimatedIcon( QPainter *p )
int bounceY = 2;
#ifdef BOUNCE_BUSY_ICON
+ if ( busyType == BIT_Animated ) {
bounceY = 4 - ((iteration+2)%8);
bounceY = bounceY < 0 ? -bounceY : bounceY;
+ }
#endif
p2.drawPixmap( x1, y1 + bounceY, *pixmap() );
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
@@ -35,4 +35,11 @@ class MenuButton;
class QComboBox;
+
+
+enum BusyIndicatorType {
+ BIT_Normal = 0,
+ BIT_Animated
+};
+
class LauncherView : public QVBox
{
@@ -107,5 +114,5 @@ private:
QImage loadBackgroundImage(QString &fname);
- int m_busyType;
+
};