summaryrefslogtreecommitdiff
path: root/core/launcher/launcherview.h
authormickeyl <mickeyl>2005-02-16 19:20:06 (UTC)
committer mickeyl <mickeyl>2005-02-16 19:20:06 (UTC)
commit5ad21664e5db417a18682903a660f4651c68ff12 (patch) (unidiff)
tree12fc6b3e45b3575cf71c2b5dd1e26c4592f5381b /core/launcher/launcherview.h
parent4fc6942eed4abdc0d4b5e1b3460a32852731c7b4 (diff)
downloadopie-5ad21664e5db417a18682903a660f4651c68ff12.zip
opie-5ad21664e5db417a18682903a660f4651c68ff12.tar.gz
opie-5ad21664e5db417a18682903a660f4651c68ff12.tar.bz2
this patch adds the possibility to have a static (as in non-scrolling) background
in the launcher. major drawback: most of our machines (at least the SA1100 based ones) are too slow to make it flicker free w/ tracking (repainting while dragging the scrollbar). so i needed to disable tracking for the static background. it's a hidden setting and disabled per default. please play around with it and give me your comments. How to enable: Launcher.conf: [GUI] StaticBackground = 1
Diffstat (limited to 'core/launcher/launcherview.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/launcherview.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/core/launcher/launcherview.h b/core/launcher/launcherview.h
index e2869eb..97b1dea 100644
--- a/core/launcher/launcherview.h
+++ b/core/launcher/launcherview.h
@@ -28,26 +28,24 @@
28#include <qtimer.h> 28#include <qtimer.h>
29#include <qmap.h> 29#include <qmap.h>
30 30
31class CategorySelect; 31class CategorySelect;
32class LauncherIconView; 32class LauncherIconView;
33class LauncherItem; 33class LauncherItem;
34class QIconViewItem; 34class QIconViewItem;
35class QLabel; 35class QLabel;
36class QWidgetStack; 36class QWidgetStack;
37class MenuButton; 37class MenuButton;
38class QComboBox; 38class QComboBox;
39 39
40
41
42enum BusyIndicatorType { 40enum BusyIndicatorType {
43 BIT_Normal = 0, 41 BIT_Normal = 0,
44 BIT_Animated 42 BIT_Animated
45}; 43};
46 44
47class LauncherView : public QVBox 45class LauncherView : public QVBox
48{ 46{
49 Q_OBJECT 47 Q_OBJECT
50 48
51public: 49public:
52 LauncherView( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 50 LauncherView( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
53 ~LauncherView(); 51 ~LauncherView();
@@ -73,25 +71,25 @@ public:
73 void setViewMode( ViewMode m ); 71 void setViewMode( ViewMode m );
74 ViewMode viewMode() const { return vmode; } 72 ViewMode viewMode() const { return vmode; }
75 73
76 enum BackgroundType { Ruled, SolidColor, Image }; 74 enum BackgroundType { Ruled, SolidColor, Image };
77 void setBackgroundType( BackgroundType t, const QString & ); 75 void setBackgroundType( BackgroundType t, const QString & );
78 BackgroundType backgroundType() const { return bgType; } 76 BackgroundType backgroundType() const { return bgType; }
79 77
80 void setTextColor( const QColor & ); 78 void setTextColor( const QColor & );
81 QColor textColor() const { return textCol; } 79 QColor textColor() const { return textCol; }
82 80
83 void setViewFont( const QFont & ); 81 void setViewFont( const QFont & );
84 void clearViewFont(); 82 void clearViewFont();
85 83
86 void setColNumber( int ); 84 void setColNumber( int );
87 85
88 void relayout(void); 86 void relayout(void);
89 87
90signals: 88signals:
91 void clicked( const AppLnk * ); 89 void clicked( const AppLnk * );
92 void rightPressed( AppLnk * ); 90 void rightPressed( AppLnk * );
93 91
94protected slots: 92protected slots:
95 void selectionChanged(); 93 void selectionChanged();
96 void returnPressed( QIconViewItem *item ); 94 void returnPressed( QIconViewItem *item );
97 void itemClicked( int, QIconViewItem * ); 95 void itemClicked( int, QIconViewItem * );
@@ -190,25 +188,25 @@ public:
190 188
191 void setBackgroundOrigin( QWidget::BackgroundOrigin ) {} 189 void setBackgroundOrigin( QWidget::BackgroundOrigin ) {}
192 190
193 void setBackgroundPixmap( const QPixmap &pm ) { 191 void setBackgroundPixmap( const QPixmap &pm ) {
194 bgPixmap = pm; 192 bgPixmap = pm;
195 } 193 }
196 194
197 void setBackgroundColor( const QColor &c ) { 195 void setBackgroundColor( const QColor &c ) {
198 bgColor = c; 196 bgColor = c;
199 } 197 }
200 198
201 void setColNumber( int ); 199 void setColNumber( int );
202 200
203 void drawBackground( QPainter *p, const QRect &r ); 201 void drawBackground( QPainter *p, const QRect &r );
204 void setItemTextPos( ItemTextPos pos ); 202 void setItemTextPos( ItemTextPos pos );
205 void hideOrShowItems(bool resort); 203 void hideOrShowItems(bool resort);
206 204
207 void setTypeFilter(const QString& typefilter, bool resort); 205 void setTypeFilter(const QString& typefilter, bool resort);
208 void setCategoryFilter( int catfilter, bool resort ); 206 void setCategoryFilter( int catfilter, bool resort );
209 207
210 enum SortMethod { Name, Date, Type }; 208 enum SortMethod { Name, Date, Type };
211 209
212 void setSortMethod( SortMethod m ); 210 void setSortMethod( SortMethod m );
213 int compare(const AppLnk* a, const AppLnk* b); 211 int compare(const AppLnk* a, const AppLnk* b);
214 void requestEyePix(const LauncherItem*which); 212 void requestEyePix(const LauncherItem*which);
@@ -241,15 +239,16 @@ private:
241 int busyTimer; 239 int busyTimer;
242 bool ike; 240 bool ike;
243 bool bigIcns; 241 bool bigIcns;
244 QPixmap bgPixmap; 242 QPixmap bgPixmap;
245 QColor bgColor; 243 QColor bgColor;
246 LauncherThumbReceiver*m_EyeCallBack; 244 LauncherThumbReceiver*m_EyeCallBack;
247#ifdef USE_ANIMATED_BUSY_ICON_OVERLAY 245#ifdef USE_ANIMATED_BUSY_ICON_OVERLAY
248 QPixmap busyPix; 246 QPixmap busyPix;
249#endif 247#endif
250 BusyIndicatorType busyType; 248 BusyIndicatorType busyType;
251 QTimer m_eyeTimer; 249 QTimer m_eyeTimer;
252 int numColumns; 250 int numColumns;
251 bool staticBackground;
253}; 252};
254 253
255#endif // LAUNCHERVIEW_H 254#endif // LAUNCHERVIEW_H