summaryrefslogtreecommitdiff
path: root/core/launcher/launcherview.h
Unidiff
Diffstat (limited to 'core/launcher/launcherview.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/launcherview.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/launcher/launcherview.h b/core/launcher/launcherview.h
index 6d94539..05073ab 100644
--- a/core/launcher/launcherview.h
+++ b/core/launcher/launcherview.h
@@ -35,48 +35,50 @@ class QIconViewItem;
35class QLabel; 35class QLabel;
36class QWidgetStack; 36class QWidgetStack;
37class MenuButton; 37class MenuButton;
38class QComboBox; 38class QComboBox;
39 39
40 40
41 41
42enum BusyIndicatorType { 42enum BusyIndicatorType {
43 BIT_Normal = 0, 43 BIT_Normal = 0,
44 BIT_Animated 44 BIT_Animated
45}; 45};
46 46
47class LauncherView : public QVBox 47class LauncherView : public QVBox
48{ 48{
49 Q_OBJECT 49 Q_OBJECT
50 50
51public: 51public:
52 LauncherView( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 52 LauncherView( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
53 ~LauncherView(); 53 ~LauncherView();
54 54
55 void hideIcons(); 55 void hideIcons();
56 56
57 bool removeLink(const QString& linkfile); 57 bool removeLink(const QString& linkfile);
58 void addItem(AppLnk* app, bool resort=TRUE); 58 void addItem(AppLnk* app, bool resort=TRUE);
59 void changeItem(const AppLnk&old,AppLnk*nlink);
60
59 void removeAllItems(); 61 void removeAllItems();
60 void setSortEnabled(bool); 62 void setSortEnabled(bool);
61 void setUpdatesEnabled(bool); 63 void setUpdatesEnabled(bool);
62 void sort(); 64 void sort();
63 65
64 void setToolsEnabled(bool); 66 void setToolsEnabled(bool);
65 void updateTools(); 67 void updateTools();
66 68
67 void setBusy(bool); 69 void setBusy(bool);
68 void setBusyIndicatorType( const QString& ); 70 void setBusyIndicatorType( const QString& );
69 71
70 enum ViewMode { Icon, List }; 72 enum ViewMode { Icon, List };
71 void setViewMode( ViewMode m ); 73 void setViewMode( ViewMode m );
72 ViewMode viewMode() const { return vmode; } 74 ViewMode viewMode() const { return vmode; }
73 75
74 enum BackgroundType { Ruled, SolidColor, Image }; 76 enum BackgroundType { Ruled, SolidColor, Image };
75 void setBackgroundType( BackgroundType t, const QString & ); 77 void setBackgroundType( BackgroundType t, const QString & );
76 BackgroundType backgroundType() const { return bgType; } 78 BackgroundType backgroundType() const { return bgType; }
77 79
78 void setTextColor( const QColor & ); 80 void setTextColor( const QColor & );
79 QColor textColor() const { return textCol; } 81 QColor textColor() const { return textCol; }
80 82
81 void setViewFont( const QFont & ); 83 void setViewFont( const QFont & );
82 void clearViewFont(); 84 void clearViewFont();
@@ -155,78 +157,81 @@ protected:
155}; 157};
156 158
157class LauncherIconView : public QIconView { 159class LauncherIconView : public QIconView {
158 Q_OBJECT 160 Q_OBJECT
159public: 161public:
160 LauncherIconView( QWidget* parent, const char* name=0 ); 162 LauncherIconView( QWidget* parent, const char* name=0 );
161 ~LauncherIconView(); 163 ~LauncherIconView();
162 QIconViewItem* busyItem() const; 164 QIconViewItem* busyItem() const;
163 165
164#ifdef USE_ANIMATED_BUSY_ICON_OVERLAY 166#ifdef USE_ANIMATED_BUSY_ICON_OVERLAY
165 QPixmap busyPixmap() const { return busyPix; } 167 QPixmap busyPixmap() const { return busyPix; }
166#endif 168#endif
167 void setBigIcons( bool bi ); 169 void setBigIcons( bool bi );
168 void updateCategoriesAndMimeTypes(); 170 void updateCategoriesAndMimeTypes();
169 void setBusyIndicatorType ( BusyIndicatorType t ); 171 void setBusyIndicatorType ( BusyIndicatorType t );
170 void doAutoScroll() 172 void doAutoScroll()
171 { 173 {
172 // We don't want rubberbanding (yet) 174 // We don't want rubberbanding (yet)
173 } 175 }
174 176
175 void setBusy(bool on); 177 void setBusy(bool on);
176 bool inKeyEvent() const { return ike; } 178 bool inKeyEvent() const { return ike; }
177 179
178 void addItem(AppLnk* app, bool resort=TRUE); 180 void addItem(AppLnk* app, bool resort=TRUE);
179 bool removeLink(const QString& linkfile); 181 bool removeLink(const QString& linkfile,bool removeCache = true);
182 void changeItem(const AppLnk&old,AppLnk*nlink);
180 183
181 QStringList mimeTypes() const; 184 QStringList mimeTypes() const;
182 QStringList categories() const; 185 QStringList categories() const;
183 void clear(); 186 void clear();
184 void addCatsAndMimes(AppLnk* app); 187 void addCatsAndMimes(AppLnk* app);
185 188
186 void setBackgroundOrigin( QWidget::BackgroundOrigin ) {} 189 void setBackgroundOrigin( QWidget::BackgroundOrigin ) {}
187 190
188 void setBackgroundPixmap( const QPixmap &pm ) { 191 void setBackgroundPixmap( const QPixmap &pm ) {
189 bgPixmap = pm; 192 bgPixmap = pm;
190 } 193 }
191 194
192 void setBackgroundColor( const QColor &c ) { 195 void setBackgroundColor( const QColor &c ) {
193 bgColor = c; 196 bgColor = c;
194 } 197 }
195 198
196 void drawBackground( QPainter *p, const QRect &r ); 199 void drawBackground( QPainter *p, const QRect &r );
197 void setItemTextPos( ItemTextPos pos ); 200 void setItemTextPos( ItemTextPos pos );
198 void hideOrShowItems(bool resort); 201 void hideOrShowItems(bool resort);
199 202
200 void setTypeFilter(const QString& typefilter, bool resort); 203 void setTypeFilter(const QString& typefilter, bool resort);
201 void setCategoryFilter( int catfilter, bool resort ); 204 void setCategoryFilter( int catfilter, bool resort );
202 205
203 enum SortMethod { Name, Date, Type }; 206 enum SortMethod { Name, Date, Type };
204 207
205 void setSortMethod( SortMethod m ); 208 void setSortMethod( SortMethod m );
206 int compare(const AppLnk* a, const AppLnk* b); 209 int compare(const AppLnk* a, const AppLnk* b);
207 void requestEyePix(const LauncherItem*which); 210 void requestEyePix(const LauncherItem*which);
208 211
212 static QMap<QString,QPixmap>* sm_EyeCache;
213
209protected: 214protected:
210 virtual void timerEvent( QTimerEvent *te ); 215 virtual void timerEvent( QTimerEvent *te );
211 void styleChange( QStyle &old ); 216 void styleChange( QStyle &old );
212 void calculateGrid( ItemTextPos pos ); 217 void calculateGrid( ItemTextPos pos );
213 void focusInEvent( QFocusEvent * ) {} 218 void focusInEvent( QFocusEvent * ) {}
214 void focusOutEvent( QFocusEvent * ) {} 219 void focusOutEvent( QFocusEvent * ) {}
215 LauncherItem*findDocItem(const QString&); 220 LauncherItem*findDocItem(const QString&);
216 void addCheckItem(AppLnk* app); 221 void addCheckItem(AppLnk* app);
217 void checkCallback(); 222 void checkCallback();
218 virtual void keyPressEvent(QKeyEvent* e); 223 virtual void keyPressEvent(QKeyEvent* e);
219 224
220protected slots: 225protected slots:
221 void setEyePixmap(const QPixmap&,const QString&,int width); 226 void setEyePixmap(const QPixmap&,const QString&,int width);
222 void stopEyeTimer(); 227 void stopEyeTimer();
223 228
224private: 229private:
225 QList<AppLnk> hidden; 230 QList<AppLnk> hidden;
226 QDict<void> mimes; 231 QDict<void> mimes;
227 QDict<void> cats; 232 QDict<void> cats;
228 SortMethod sortmeth; 233 SortMethod sortmeth;
229 QRegExp tf; 234 QRegExp tf;
230 int cf; 235 int cf;
231 LauncherItem* bsy; 236 LauncherItem* bsy;
232 int busyTimer; 237 int busyTimer;