Diffstat (limited to 'core/launcher/launcherview.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/launcher/launcherview.h | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/core/launcher/launcherview.h b/core/launcher/launcherview.h index e40a006..a9ff9eb 100644 --- a/core/launcher/launcherview.h +++ b/core/launcher/launcherview.h | |||
@@ -18,36 +18,37 @@ | |||
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #ifndef LAUNCHERVIEW_H | 20 | #ifndef LAUNCHERVIEW_H |
21 | #define LAUNCHERVIEW_H | 21 | #define LAUNCHERVIEW_H |
22 | 22 | ||
23 | #include <qtopia/storage.h> | 23 | #include <qtopia/storage.h> |
24 | #include <qtopia/applnk.h> | 24 | #include <qtopia/applnk.h> |
25 | 25 | ||
26 | #include <qvbox.h> | 26 | #include <qvbox.h> |
27 | 27 | ||
28 | class CategorySelect; | 28 | class CategorySelect; |
29 | class LauncherIconView; | 29 | class LauncherIconView; |
30 | class LauncherItem; | ||
30 | class QIconView; | 31 | class QIconView; |
31 | class QIconViewItem; | 32 | class QIconViewItem; |
32 | class QLabel; | 33 | class QLabel; |
33 | class QWidgetStack; | 34 | class QWidgetStack; |
34 | class MenuButton; | 35 | class MenuButton; |
35 | class QComboBox; | 36 | class QComboBox; |
36 | 37 | ||
37 | 38 | ||
38 | 39 | ||
39 | enum BusyIndicatorType { | 40 | enum BusyIndicatorType { |
40 | BIT_Normal = 0, | 41 | BIT_Normal = 0, |
41 | BIT_Animated | 42 | BIT_Animated |
42 | }; | 43 | }; |
43 | 44 | ||
44 | class LauncherView : public QVBox | 45 | class LauncherView : public QVBox |
45 | { | 46 | { |
46 | Q_OBJECT | 47 | Q_OBJECT |
47 | 48 | ||
48 | public: | 49 | public: |
49 | LauncherView( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | 50 | LauncherView( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
50 | ~LauncherView(); | 51 | ~LauncherView(); |
51 | 52 | ||
52 | void hideIcons(); | 53 | void hideIcons(); |
53 | 54 | ||
@@ -107,13 +108,48 @@ private: | |||
107 | QComboBox *typemb; | 108 | QComboBox *typemb; |
108 | QStringList typelist; | 109 | QStringList typelist; |
109 | CategorySelect *catmb; | 110 | CategorySelect *catmb; |
110 | ViewMode vmode; | 111 | ViewMode vmode; |
111 | BackgroundType bgType; | 112 | BackgroundType bgType; |
112 | QString bgName; | 113 | QString bgName; |
113 | QColor textCol; | 114 | QColor textCol; |
114 | 115 | ||
115 | QImage loadBackgroundImage(QString &fname); | 116 | QImage loadBackgroundImage(QString &fname); |
116 | 117 | ||
117 | }; | 118 | }; |
118 | 119 | ||
120 | /* taken from opie-eye */ | ||
121 | |||
122 | struct PixmapInfo { | ||
123 | PixmapInfo() : width( -1 ), height( -1 ) {} | ||
124 | bool operator==( const PixmapInfo& r ) { | ||
125 | if ( width != r.width ) return false; | ||
126 | if ( height != r.height ) return false; | ||
127 | if ( file != r.file ) return false; | ||
128 | return true; | ||
129 | } | ||
130 | int width, height; | ||
131 | QString file; | ||
132 | QPixmap pixmap; | ||
133 | }; | ||
134 | |||
135 | class LauncherThumbReceiver:public QObject | ||
136 | { | ||
137 | Q_OBJECT | ||
138 | typedef QValueList<PixmapInfo> PixmapInfos; | ||
139 | public: | ||
140 | LauncherThumbReceiver(LauncherItem*parent); | ||
141 | ~LauncherThumbReceiver(); | ||
142 | void requestThumb(const QString&file,int width,int height); | ||
143 | |||
144 | public slots: | ||
145 | void recieve( const QCString&, const QByteArray& ); | ||
146 | protected slots: | ||
147 | virtual void sendRequest(); | ||
148 | protected: | ||
149 | LauncherItem*m_parent; | ||
150 | QString m_reqFile; | ||
151 | PixmapInfo rItem; | ||
152 | bool m_waiting:1; | ||
153 | }; | ||
154 | |||
119 | #endif // LAUNCHERVIEW_H | 155 | #endif // LAUNCHERVIEW_H |