summaryrefslogtreecommitdiff
path: root/library
Unidiff
Diffstat (limited to 'library') (more/less context) (ignore whitespace changes)
-rw-r--r--library/alarmserver.cpp53
-rw-r--r--library/applnk.cpp582
-rw-r--r--library/applnk.h38
-rw-r--r--library/backend/categories.cpp327
-rw-r--r--library/backend/contact.cpp526
-rw-r--r--library/backend/contact.h102
-rw-r--r--library/backend/event.cpp539
-rw-r--r--library/backend/event.h173
-rw-r--r--library/backend/palmtoprecord.cpp42
-rw-r--r--library/backend/palmtoprecord.h33
-rw-r--r--library/backend/palmtopuidgen.h26
-rw-r--r--library/backend/qfiledirect_p.h72
-rw-r--r--library/backend/qpcglobal.h9
-rw-r--r--library/backend/recordfields.h24
-rw-r--r--library/backend/stringutil.cpp415
-rw-r--r--library/backend/task.cpp173
-rw-r--r--library/backend/task.h21
-rw-r--r--library/backend/timeconversion.cpp237
-rw-r--r--library/backend/timeconversion.h45
-rw-r--r--library/backend/vcc.y2407
-rw-r--r--library/backend/vcc_yacc.cpp169
-rw-r--r--library/backend/vobject.cpp2534
-rw-r--r--library/backend/vobject_p.h810
-rw-r--r--library/categoryeditbase_p.ui22
-rw-r--r--library/datebookmonth.cpp203
-rw-r--r--library/datebookmonth.h8
-rw-r--r--library/fileselector.cpp470
-rw-r--r--library/fileselector.h40
-rw-r--r--library/fileselector_p.h24
-rw-r--r--library/finddialog.cpp5
-rw-r--r--library/finddialog.h4
-rw-r--r--library/findwidget_p.cpp4
-rw-r--r--library/findwidget_p.h4
-rw-r--r--library/findwidgetbase_p.ui18
-rw-r--r--library/fontdatabase.cpp39
-rw-r--r--library/fontdatabase.h4
-rw-r--r--library/fontmanager.cpp6
-rw-r--r--library/fontmanager.h4
-rw-r--r--library/global.cpp165
-rw-r--r--library/global.h9
-rw-r--r--library/imagecodecinterface.h39
-rw-r--r--library/imageedit.cpp6
-rw-r--r--library/imageedit.h4
-rw-r--r--library/inlinepics_p.h2470
-rw-r--r--library/inputmethodinterface.h19
-rw-r--r--library/ir.cpp67
-rw-r--r--library/ir.h20
-rw-r--r--library/library.pro9
-rw-r--r--library/lnkproperties.cpp296
-rw-r--r--library/lnkproperties.h5
-rw-r--r--library/lnkpropertiesbase_p.ui43
-rw-r--r--library/menubutton.cpp71
-rw-r--r--library/menubutton.h4
-rw-r--r--library/mimetype.cpp165
-rw-r--r--library/mimetype.h15
-rw-r--r--library/network.cpp15
-rw-r--r--library/network.h4
-rw-r--r--library/networkinterface.cpp6
-rw-r--r--library/networkinterface.h4
-rw-r--r--library/password.cpp16
-rw-r--r--library/password.h4
-rw-r--r--library/passwordbase_p.ui81
-rw-r--r--library/power.cpp6
-rw-r--r--library/power.h4
-rw-r--r--library/process.cpp4
-rw-r--r--library/process.h4
-rw-r--r--library/process_unix.cpp4
-rw-r--r--library/qcom.h4
-rw-r--r--library/qcopenvelope_qws.cpp51
-rw-r--r--library/qcopenvelope_qws.h6
-rw-r--r--library/qdawg.cpp123
-rw-r--r--library/qdawg.h4
-rw-r--r--library/qlibrary.cpp4
-rw-r--r--library/qlibrary.h4
-rw-r--r--library/qlibrary_p.h4
-rw-r--r--library/qlibrary_unix.cpp4
-rw-r--r--library/qmath.h4
-rw-r--r--library/qpeapplication.cpp1937
-rw-r--r--library/qpeapplication.h40
-rw-r--r--library/qpedebug.cpp4
-rw-r--r--library/qpedebug.h4
-rw-r--r--library/qpedecoration_qws.cpp763
-rw-r--r--library/qpedecoration_qws.h18
-rw-r--r--library/qpedialog.cpp13
-rw-r--r--library/qpedialog.h4
-rw-r--r--library/qpemenubar.cpp47
-rw-r--r--library/qpemenubar.h9
-rw-r--r--library/quickexec.cpp20
-rw-r--r--library/quuid.cpp4
-rw-r--r--library/quuid.h27
-rw-r--r--library/resource.cpp125
-rw-r--r--library/resource.h33
-rw-r--r--library/stringutil.h (renamed from library/backend/stringutil.h)17
-rw-r--r--library/taskbarappletinterface.h16
-rw-r--r--library/textcodecinterface.h44
-rw-r--r--library/timestring.cpp51
-rw-r--r--library/timestring.h13
-rw-r--r--library/tzselect.cpp104
-rw-r--r--library/tzselect.h14
-rw-r--r--library/windowdecorationinterface.h65
-rw-r--r--library/xmlreader.cpp19
-rw-r--r--library/xmlreader.h4
102 files changed, 10199 insertions, 7175 deletions
diff --git a/library/alarmserver.cpp b/library/alarmserver.cpp
index a1a7142..1ee05c6 100644
--- a/library/alarmserver.cpp
+++ b/library/alarmserver.cpp
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -189,16 +189,18 @@ void TimerReceiverObject::deleteTimer()
189} 189}
190 190
191void TimerReceiverObject::resetTimer() 191void TimerReceiverObject::resetTimer()
192{ 192{
193 const int maxsecs = 2147000; 193 const int maxsecs = 2147000;
194 int total_written; 194 int total_written;
195 QDateTime nearest = TimeConversion::fromUTC(nearestTimerEvent->UTCtime); 195 QDateTime nearest = TimeConversion::fromUTC(nearestTimerEvent->UTCtime);
196 QDateTime now = QDateTime::currentDateTime(); 196 QDateTime now = QDateTime::currentDateTime();
197 if ( nearest < now )
198 nearest = now;
197 int secs = TimeConversion::secsTo( now, nearest ); 199 int secs = TimeConversion::secsTo( now, nearest );
198 if ( secs > maxsecs ) { 200 if ( secs > maxsecs ) {
199 // too far for millisecond timing 201 // too far for millisecond timing
200 secs = maxsecs; 202 secs = maxsecs;
201 } 203 }
202 204
203 // System timer (needed so that we wake from deep sleep), 205 // System timer (needed so that we wake from deep sleep),
204 // from the Epoch in seconds. 206 // from the Epoch in seconds.
@@ -240,43 +242,60 @@ void TimerReceiverObject::resetTimer()
240 242
241void TimerReceiverObject::timerEvent( QTimerEvent * ) 243void TimerReceiverObject::timerEvent( QTimerEvent * )
242{ 244{
243 bool needSave = FALSE; 245 bool needSave = FALSE;
244 killTimers(); 246 killTimers();
245 if (nearestTimerEvent) { 247 if (nearestTimerEvent) {
246 if ( nearestTimerEvent->UTCtime 248 if ( nearestTimerEvent->UTCtime
247 <= TimeConversion::toUTC(QDateTime::currentDateTime()) ) { 249 <= TimeConversion::toUTC(QDateTime::currentDateTime()) ) {
250#ifndef QT_NO_COP
248 QCopEnvelope e( nearestTimerEvent->channel, 251 QCopEnvelope e( nearestTimerEvent->channel,
249 nearestTimerEvent->message ); 252 nearestTimerEvent->message );
250 e << TimeConversion::fromUTC( nearestTimerEvent->UTCtime ) 253 e << TimeConversion::fromUTC( nearestTimerEvent->UTCtime )
251 << nearestTimerEvent->data; 254 << nearestTimerEvent->data;
255#endif
252 timerEventList.remove( nearestTimerEvent ); 256 timerEventList.remove( nearestTimerEvent );
253 needSave = TRUE; 257 needSave = TRUE;
254 } 258 }
255 setNearestTimerEvent(); 259 setNearestTimerEvent();
256 } else { 260 } else {
257 resetTimer(); 261 resetTimer();
258 } 262 }
259 if ( needSave ) 263 if ( needSave )
260 saveState(); 264 saveState();
261} 265}
262 266
263/*! 267/*!
264 \class AlarmServer alarmserver.h 268 \class AlarmServer alarmserver.h
265 \brief The AlarmServer class provides alarms to be scheduled. 269 \brief The AlarmServer class allows alarms to be scheduled and unscheduled.
270
271 Applications can schedule alarms with addAlarm() and can
272 unschedule alarms with deleteAlarm(). When the time for an alarm
273 to go off is reached the specified \link qcop.html QCop\endlink
274 message is sent on the specified channel (optionally with
275 additional data).
276
277 Scheduling an alarm using this class is important (rather just using
278 a QTimer) since the machine may be asleep and needs to get woken up using
279 the Linux kernel which implements this at the kernel level to minimize
280 battery usage while asleep.
266 281
267 Applications which wish to be informed when a certain time instant 282 \ingroup qtopiaemb
268 passes use the functions of AlarmServer to request so. 283 \sa QCopEnvelope
269*/ 284*/
270 285
271/*! 286/*!
272 Schedules an alarm for \a when. Soon after this time, 287 Schedules an alarm to go off at (or soon after) time \a when. When
273 \a message will be sent to \a channel, with \a data as 288 the alarm goes off, the \link qcop.html QCop\endlink \a message will
274 a parameter. \a message must be of the form "someMessage(int)". 289 be sent to \a channel, with \a data as a parameter.
290
291 If this function is called with exactly the same data as a previous
292 call the subsequent call is ignored, so there is only ever one alarm
293 with a given set of parameters.
275 294
276 \sa deleteAlarm() 295 \sa deleteAlarm()
277*/ 296*/
278void AlarmServer::addAlarm ( QDateTime when, const QCString& channel, 297void AlarmServer::addAlarm ( QDateTime when, const QCString& channel,
279 const QCString& message, int data) 298 const QCString& message, int data)
280{ 299{
281 if ( qApp->type() == QApplication::GuiServer ) { 300 if ( qApp->type() == QApplication::GuiServer ) {
282 bool needSave = FALSE; 301 bool needSave = FALSE;
@@ -307,29 +326,35 @@ void AlarmServer::addAlarm ( QDateTime when, const QCString& channel,
307 } 326 }
308 } else { 327 } else {
309 nearestTimerEvent = newTimerEventItem; 328 nearestTimerEvent = newTimerEventItem;
310 timerEventReceiver->resetTimer(); 329 timerEventReceiver->resetTimer();
311 } 330 }
312 if ( needSave ) 331 if ( needSave )
313 saveState(); 332 saveState();
314 } else { 333 } else {
334#ifndef QT_NO_COP
315 QCopEnvelope e( "QPE/System", "addAlarm(QDateTime,QCString,QCString,int)" ); 335 QCopEnvelope e( "QPE/System", "addAlarm(QDateTime,QCString,QCString,int)" );
316 e << when << channel << message << data; 336 e << when << channel << message << data;
337#endif
317 } 338 }
318} 339}
319 340
320/*! 341/*!
321 Deletes previously scheduled alarms which match \a when, \a channel, \a message, 342 Deletes previously scheduled alarms which match \a when, \a channel,
322 and \a data. 343 \a message, and \a data.
323 344
324 Passing null values for \a when, \a channel, or \a message indicates "any". 345 Passing null values for \a when, \a channel, or for the \link
325 Passing -1 for \a data indicates "any". 346 qcop.html QCop\endlink \a message, acts as a wildcard meaning "any".
347 Similarly, passing -1 for \a data indicates "any".
348
349 If there is no matching alarm, nothing happens.
350
351 \sa addAlarm()
326 352
327 \sa deleteAlarm()
328*/ 353*/
329void AlarmServer::deleteAlarm (QDateTime when, const QCString& channel, const QCString& message, int data) 354void AlarmServer::deleteAlarm (QDateTime when, const QCString& channel, const QCString& message, int data)
330{ 355{
331 if ( qApp->type() == QApplication::GuiServer) { 356 if ( qApp->type() == QApplication::GuiServer) {
332 bool needSave = FALSE; 357 bool needSave = FALSE;
333 if ( timerEventReceiver != NULL ) { 358 if ( timerEventReceiver != NULL ) {
334 timerEventReceiver->killTimers(); 359 timerEventReceiver->killTimers();
335 360
@@ -354,18 +379,20 @@ void AlarmServer::deleteAlarm (QDateTime when, const QCString& channel, const QC
354 } 379 }
355 } 380 }
356 if ( nearestTimerEvent ) 381 if ( nearestTimerEvent )
357 timerEventReceiver->resetTimer(); 382 timerEventReceiver->resetTimer();
358 } 383 }
359 if ( needSave ) 384 if ( needSave )
360 saveState(); 385 saveState();
361 } else { 386 } else {
387#ifndef QT_NO_COP
362 QCopEnvelope e( "QPE/System", "deleteAlarm(QDateTime,QCString,QCString,int)" ); 388 QCopEnvelope e( "QPE/System", "deleteAlarm(QDateTime,QCString,QCString,int)" );
363 e << when << channel << message << data; 389 e << when << channel << message << data;
390#endif
364 } 391 }
365} 392}
366 393
367/*! 394/*!
368 Writes the system clock to the hardware clock. 395 Writes the system clock to the hardware clock.
369*/ 396*/
370void Global::writeHWClock() 397void Global::writeHWClock()
371{ 398{
diff --git a/library/applnk.cpp b/library/applnk.cpp
index 9498f84..298581a 100644
--- a/library/applnk.cpp
+++ b/library/applnk.cpp
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -14,23 +14,27 @@
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#define QTOPIA_INTERNAL_MIMEEXT 21#define QTOPIA_INTERNAL_MIMEEXT
22#define QTOPIA_INTERNAL_PRELOADACCESS
23#define QTOPIA_INTERNAL_APPLNKASSIGN
22 24
23#include "applnk.h" 25#include "applnk.h"
24 26
25#include <qpe/qpeapplication.h> 27#include <qpe/qpeapplication.h>
26#include <qpe/categories.h> 28#include <qpe/categories.h>
27#include <qpe/categoryselect.h> 29#include <qpe/categoryselect.h>
30#ifdef QWS
28#include <qpe/qcopenvelope_qws.h> 31#include <qpe/qcopenvelope_qws.h>
32#endif
29#include <qpe/global.h> 33#include <qpe/global.h>
30#include <qpe/mimetype.h> 34#include <qpe/mimetype.h>
31#include <qpe/config.h> 35#include <qpe/config.h>
32#include <qpe/storage.h> 36#include <qpe/storage.h>
33#include <qpe/resource.h> 37#include <qpe/resource.h>
34 38
35#include <qdict.h> 39#include <qdict.h>
36#include <qdir.h> 40#include <qdir.h>
@@ -45,17 +49,17 @@
45int AppLnk::lastId = 5000; 49int AppLnk::lastId = 5000;
46 50
47static int smallSize = 14; 51static int smallSize = 14;
48static int bigSize = 32; 52static int bigSize = 32;
49 53
50static QString safeFileName(const QString& n) 54static QString safeFileName(const QString& n)
51{ 55{
52 QString safename=n; 56 QString safename=n;
53 safename.replace(QRegExp("[^0-9A-Za-z.]"),"_"); // Njaard says this is broken 57 safename.replace(QRegExp("[^0-9A-Za-z.]"),"_");
54 safename.replace(QRegExp("^[^A-Za-z]*"),""); 58 safename.replace(QRegExp("^[^A-Za-z]*"),"");
55 if ( safename.isEmpty() ) 59 if ( safename.isEmpty() )
56 safename = "_"; 60 safename = "_";
57 return safename; 61 return safename;
58} 62}
59 63
60static bool prepareDirectories(const QString& lf) 64static bool prepareDirectories(const QString& lf)
61{ 65{
@@ -66,128 +70,286 @@ static bool prepareDirectories(const QString& lf)
66 return FALSE; 70 return FALSE;
67 } 71 }
68 return TRUE; 72 return TRUE;
69} 73}
70 74
71class AppLnkPrivate 75class AppLnkPrivate
72{ 76{
73public: 77public:
74 QArray<int> mCat; 78 /* the size of the Pixmap */
79 enum Size {Normal = 0, Big };
80 AppLnkPrivate() {
81 /* we want one normal and one big item */
82 mPixmaps = QArray<QPixmap>(2);
83 }
84
85 QStringList mCatList; // always correct
86 QArray<int> mCat; // cached value; correct if not empty
87 QArray<QPixmap> mPixmaps;
88
89 void updateCatListFromArray()
90 {
91 Categories cat( 0 );
92 cat.load( categoryFileName() );
93 mCatList = cat.labels("Document View",mCat);
94 }
95
96 void setCatArrayDirty()
97 {
98 mCat.resize(0);
99 }
100
101 void ensureCatArray()
102 {
103 if ( mCat.count() > 0 || mCatList.count()==0 )
104 return;
105
106 Categories cat( 0 );
107 cat.load( categoryFileName() );
108 mCat.resize( mCatList.count() );
109 int i;
110 QStringList::ConstIterator it;
111 for ( i = 0, it = mCatList.begin(); it != mCatList.end();
112 ++it, i++ ) {
113
114 bool number;
115 int id = (*it).toInt( &number );
116 if ( !number ) {
117 id = cat.id( "Document View", *it );
118 if ( id == 0 )
119 id = cat.addCategory( "Document View", *it );
120 }
121 mCat[i] = id;
122 }
123 }
75}; 124};
76 125
77/*! 126/*!
78 \class AppLnk applnk.h 127 \class AppLnk applnk.h
79 \brief The AppLnk class represents an application available on the system. 128 \brief The AppLnk class represents an application available on the system.
80 129
81 Information about applications are stored in Qtopia as ".desktop" files. 130 Every Qtopia application \e app has a corresponding \e app.desktop
82 When read, these files are stored as AppLnk objects. 131 file. When one of these files is read its data is stored as an
132 AppLnk object.
133
134 The AppLnk class introduces some Qtopia-specific concepts, and
135 provides a variety of functions, as described in the following
136 sections.
137 \tableofcontents
138
139 \target Types
140 \section1 Types
141
142 Every AppLnk object has a \e type. For applications, games and
143 settings the type is \c Application; for documents the
144 type is the document's MIME type.
145
146 \target files-and-links
147 \section1 Files and Links
148
149 When you create an AppLnk (or more likely, a \link doclnk.html
150 DocLnk\endlink), you don't deal directly with filenames in the
151 filesystem. Instead you do this:
152 \code
153 DocLnk d;
154 d.setType("text/plain");
155 d.setName("My Nicely Named Document / Whatever"); // Yes, "/" is legal.
156 \endcode
157 At this point, the file() and linkFile() are unknown. Normally
158 this is uninteresting, and the names become automatically known,
159 and more importantly, becomes reserved, when you ask what they are:
160
161 \code
162 QString fn = d.file();
163 \endcode
164 This invents a filename, and creates the file on disk (an empty
165 reservation file) to prevent the name being used by another
166 application.
167
168 In some circumstances, you don't want to create the file if it
169 doesn't already exist (e.g. in the Document tab, some of the \link
170 doclnk.html DocLnk\endlink objects represented by icons are
171 DocLnk's created just for that view - they don't have
172 corresponding \c .desktop files. To avoid littering empty
173 reservation files around, we check in a few places to see whether
174 the file really needs to exist).
175
176 \section1 Functionality
177
178 AppLnk objects are created by calling the constructor with the
179 name of a \e .desktop file. The object can be checked for validity
180 using isValid().
181
182 The following functions are used to set or retrieve information
183 about the application:
184 \table
185 \header \i Get Function \i Set Function \i Short Description
186 \row \i \l name() \i \l setName() \i application's name
187 \row \i \l pixmap() \i \e none \i application's icon
188 \row \i \l bigPixmap() \i \e none \i application's large icon
189 \row \i \e none \i setIcon() \i sets the icon's filename
190 \row \i \l type() \i \l setType() \i see \link #Types Types\endlink above
191 \row \i \l rotation() \i \e none \i 0, 90, 180 or 270 degrees
192 \row \i \l comment() \i \l setComment() \i text for the Details dialog
193 \row \i \l exec() \i \l setExec() \i executable's filename
194 \row \i \l file() \i \e none \i document's filename
195 \row \i \l linkFile() \i \l setLinkFile()\i \e .desktop filename
196 \row \i \l mimeTypes() \i \e none \i the mime types the application can view or edit
197 \row \i \l categories() \i \l setCategories()\i \e{see the function descriptions}
198 \row \i \l fileKnown() \i \e none \i see \link
199#files-and-links Files and Links\endlink above
200 \row \i \l linkFileKnown() \i \e none \i see \link
201#files-and-links Files and Links\endlink above
202 \row \i \l property() \i \l setProperty()\i any AppLnk property
203 can be retrieved or set (if writeable) using these
204 \endtable
205
206 To save an AppLnk to disk use writeLink(). To execute the
207 application that the AppLnk object refers to, use execute().
208
209 AppLnk's can be deleted from disk using removeLinkFile(). To
210 remove both the link and the application's executable use
211 removeFiles().
212
213 Icon sizes can be globally changed (but only for AppLnk objects
214 created after the calls) with setSmallIconSize() and
215 setBigIconSize().
216
217 \ingroup qtopiaemb
83*/ 218*/
84 219
85/*! 220/*!
86 Sets the size used for small icons to \a small pixels. 221 Sets the size used for small icons to \a small pixels.
87 Only affects AppLnk objects created after the call. 222 Only affects AppLnk objects created after the call.
223
224 \sa smallIconSize() setIcon()
88*/ 225*/
89void AppLnk::setSmallIconSize(int small) 226void AppLnk::setSmallIconSize(int small)
90{ 227{
91 smallSize = small; 228 smallSize = small;
92} 229}
93 230
94/*! 231/*!
95 Returns the size used for small icons. 232 Returns the size used for small icons.
233
234 \sa setSmallIconSize() setIcon()
96*/ 235*/
97int AppLnk::smallIconSize() 236int AppLnk::smallIconSize()
98{ 237{
99 return smallSize; 238 return smallSize;
100} 239}
101 240
102 241
103/*! 242/*!
104 Sets the size used for large icons to \a big pixels. 243 Sets the size used for large icons to \a big pixels.
105 Only affects AppLnk objects created after the call. 244 Only affects AppLnk objects created after the call.
245
246 \sa bigIconSize() setIcon()
106*/ 247*/
107void AppLnk::setBigIconSize(int big) 248void AppLnk::setBigIconSize(int big)
108{ 249{
109 bigSize = big; 250 bigSize = big;
110} 251}
111 252
112/*! 253/*!
113 Returns the size used for large icons. 254 Returns the size used for large icons.
255
256 \sa setBigIconSize() setIcon()
114*/ 257*/
115int AppLnk::bigIconSize() 258int AppLnk::bigIconSize()
116{ 259{
117 return bigSize; 260 return bigSize;
118} 261}
119 262
120 263
121/*! 264/*!
122 \fn QString AppLnk::name() const 265 \fn QString AppLnk::name() const
123 266
124 Returns the Name property. 267 Returns the Name property. This is the user-visible name for the
268 document or application, not the filename.
269
270 See \link #files-and-links Files and Links\endlink.
271
272 \sa setName()
125*/ 273*/
126/*! 274/*!
127 \fn QString AppLnk::exec() const 275 \fn QString AppLnk::exec() const
128 276
129 Returns the Exec property. This is the executable program associated 277 Returns the Exec property. This is the name of the executable
130 with the AppLnk. 278 program associated with the AppLnk.
279
280 \sa setExec()
131*/ 281*/
132/*! 282/*!
133 \fn QString AppLnk::rotation() const 283 \fn QString AppLnk::rotation() const
134 284
135 Returns the Rotation property. 285 Returns the Rotation property. The value is 0, 90, 180 or 270
286 degrees.
136*/ 287*/
137/*! 288/*!
138 \fn QString AppLnk::comment() const 289 \fn QString AppLnk::comment() const
139 290
140 Returns the Comment property. 291 Returns the Comment property.
292
293 \sa setComment()
141*/ 294*/
142/*! 295/*!
143 \fn QStringList AppLnk::mimeTypes() const 296 \fn QStringList AppLnk::mimeTypes() const
144 297
145 Returns the MimeTypes property. This is the list of MIME types 298 Returns the MimeTypes property. This is the list of MIME types
146 that the application can view or edit. 299 that the application can view or edit.
147*/ 300*/
148/*! 301/*!
149 \fn const QArray<int>& AppLnk::categories() const 302 \fn const QArray<int>& AppLnk::categories() const
150 303
151 Returns the Categories property. 304 Returns the Categories property.
305
306 See the CategoryWidget for more details.
307
308 \sa setCategories()
152*/ 309*/
153 310
154const QArray<int>& AppLnk::categories() const 311const QArray<int>& AppLnk::categories() const
155{ 312{
313 d->ensureCatArray();
156 return d->mCat; 314 return d->mCat;
157} 315}
158 316
159/*! 317/*!
160 \fn int AppLnk::id() const 318 \fn int AppLnk::id() const
161 319
162 Returns the id of the AppLnk. If the AppLnk is not in an AppLnkSet, 320 Returns the id of the AppLnk. If the AppLnk is not in an AppLnkSet,
163 this value is 0, otherwise it is a value that is unique for the 321 this value is 0, otherwise it is a value that is unique for the
164 duration of the current process. 322 duration of the current process.
323
324 \sa AppLnkSet::find()
165*/ 325*/
166 326
167/*! 327/*!
168 \fn bool AppLnk::isValid() const 328 \fn bool AppLnk::isValid() const
169 329
170 Returns whether this AppLnk is valid. 330 Returns TRUE if this AppLnk is valid; otherwise returns FALSE.
171*/ 331*/
172 332
173/*! 333/*!
174 Creates an invalid AppLnk. 334 Creates an invalid AppLnk.
175 335
176 \sa isValid() 336 \sa isValid()
177*/ 337*/
178AppLnk::AppLnk() 338AppLnk::AppLnk()
179{ 339{
180 mId = 0; 340 mId = 0;
181 d = new AppLnkPrivate(); 341 d = new AppLnkPrivate();
182} 342}
183 343
184/*! 344/*!
185 Loads \a file as an AppLnk. 345 Loads \a file (e.g. \e app.desktop) as an AppLnk.
346
347 \sa writeLink()
186*/ 348*/
187AppLnk::AppLnk( const QString &file ) 349AppLnk::AppLnk( const QString &file )
188{ 350{
189 QStringList sl; 351 QStringList sl;
190 d = new AppLnkPrivate(); 352 d = new AppLnkPrivate();
191 if ( !file.isNull() ) { 353 if ( !file.isNull() ) {
192 Config config( file, Config::File ); 354 Config config( file, Config::File );
193 355
@@ -195,179 +357,248 @@ AppLnk::AppLnk( const QString &file )
195 config.setGroup( "Desktop Entry" ); 357 config.setGroup( "Desktop Entry" );
196 358
197 mName = config.readEntry( "Name", file ); 359 mName = config.readEntry( "Name", file );
198 mExec = config.readEntry( "Exec" ); 360 mExec = config.readEntry( "Exec" );
199 mType = config.readEntry( "Type", QString::null ); 361 mType = config.readEntry( "Type", QString::null );
200 mIconFile = config.readEntry( "Icon", QString::null ); 362 mIconFile = config.readEntry( "Icon", QString::null );
201 mRotation = config.readEntry( "Rotation", "" ); 363 mRotation = config.readEntry( "Rotation", "" );
202 mComment = config.readEntry( "Comment", QString::null ); 364 mComment = config.readEntry( "Comment", QString::null );
365 // MIME types are case-insensitive.
203 mMimeTypes = config.readListEntry( "MimeType", ';' ); 366 mMimeTypes = config.readListEntry( "MimeType", ';' );
367 for (QStringList::Iterator it=mMimeTypes.begin(); it!=mMimeTypes.end(); ++it)
368 *it = (*it).lower();
204 mMimeTypeIcons = config.readListEntry( "MimeTypeIcons", ';' ); 369 mMimeTypeIcons = config.readListEntry( "MimeTypeIcons", ';' );
205 mLinkFile = file; 370 mLinkFile = file;
206 mFile = config.readEntry("File", QString::null); 371 mFile = config.readEntry("File", QString::null);
207 sl = config.readListEntry("Categories", ';'); 372 if ( mFile[0] != '/' ) {
208 } 373 int slash = file.findRev('/');
209 } 374 if ( slash >= 0 ) {
210 // let's try our darndest to create categories... 375 mFile = file.left(slash) + '/' + mFile;
211 Categories cat( 0 ); 376 }
212 cat.load( categoryFileName() ); 377 }
213 d->mCat.resize( sl.count() ); 378 d->mCatList = config.readListEntry("Categories", ';');
214 int i; 379 if ( d->mCatList[0].toInt() < -1 ) {
215 QStringList::Iterator it; 380 // numeric cats in file! convert to text
216 for ( i = 0, it = sl.begin(); it != sl.end(); 381 Categories cat( 0 );
217 ++it, i++ ) { 382 cat.load( categoryFileName() );
218 383 d->mCat.resize( d->mCatList.count() );
219 bool number; 384 int i;
220 int id = (*it).toInt( &number ); 385 QStringList::ConstIterator it;
221 if ( !number ) { 386 for ( i = 0, it = d->mCatList.begin(); it != d->mCatList.end();
222 // convert from old school... 387 ++it, i++ ) {
223 id = cat.id( "Document Viewer", *it ); 388 bool number;
224 if ( id == 0 ) 389 int id = (*it).toInt( &number );
225 id = cat.addCategory( "Document Viewer", *it ); 390 if ( !number ) {
391 // convert from text
392 id = cat.id( "Document View", *it );
393 if ( id == 0 )
394 id = cat.addCategory( "Document View", *it );
395 }
396 d->mCat[i] = id;
397 }
398 d->updateCatListFromArray();
399 }
226 } 400 }
227 d->mCat[i] = id;
228 } 401 }
229 mId = 0; 402 mId = 0;
230} 403}
231 404
405AppLnk& AppLnk::operator=(const AppLnk &copy)
406{
407 if ( mId )
408 qWarning("Deleting AppLnk that is in an AppLnkSet");
409 if ( d )
410 delete d;
411
412
413 mName = copy.mName;
414
415 /* remove for Qtopia 3.0 -zecke */
416 mPixmap = copy.mPixmap;
417 mBigPixmap = copy.mBigPixmap;
418
419 mExec = copy.mExec;
420 mType = copy.mType;
421 mRotation = copy.mRotation;
422 mComment = copy.mComment;
423 mFile = copy.mFile;
424 mLinkFile = copy.mLinkFile;
425 mIconFile = copy.mIconFile;
426 mMimeTypes = copy.mMimeTypes;
427 mMimeTypeIcons = copy.mMimeTypeIcons;
428 mId = 0;
429 d = new AppLnkPrivate();
430 d->mCat = copy.d->mCat;
431 d->mCatList = copy.d->mCatList;
432 d->mPixmaps = copy.d->mPixmaps;
433
434 return *this;
435}
232/*! 436/*!
233 Returns a small pixmap associated with the application. 437 protected internally to share code
438 should I document that at all?
439 I don't know the TT style for that
234*/ 440*/
235const QPixmap& AppLnk::pixmap() const 441const QPixmap& AppLnk::pixmap( int pos, int size ) const {
236{ 442 if ( d->mPixmaps[pos].isNull() ) {
237 if ( mPixmap.isNull() ) {
238 AppLnk* that = (AppLnk*)this; 443 AppLnk* that = (AppLnk*)this;
239 if ( mIconFile.isEmpty() ) { 444 if ( mIconFile.isEmpty() ) {
240 MimeType mt(type()); 445 MimeType mt(type());
241 that->mPixmap = mt.pixmap(); 446 that->d->mPixmaps[pos] = mt.pixmap();
242 if ( that->mPixmap.isNull() ) 447 if ( that->d->mPixmaps[pos].isNull() )
243 that->mPixmap = Resource::loadPixmap("UnknownDocument-14"); 448 that->d->mPixmaps[pos].convertFromImage(
244 return that->mPixmap; 449 Resource::loadImage("UnknownDocument")
450 .smoothScale( size, size ) );
451 return that->d->mPixmaps[pos];
245 } 452 }
246 QImage unscaledIcon = Resource::loadImage( that->mIconFile ); 453 QImage unscaledIcon = Resource::loadImage( that->mIconFile );
247 that->mPixmap.convertFromImage( unscaledIcon.smoothScale( smallSize, smallSize ) ); 454 if ( unscaledIcon.isNull() ) {
248 that->mBigPixmap.convertFromImage( unscaledIcon.smoothScale( bigSize, bigSize ) ); 455 qDebug( "Cannot find icon: %s", that->mIconFile.latin1() );
249 return that->mPixmap; 456 that->d->mPixmaps[pos].convertFromImage(
457 Resource::loadImage("UnknownDocument")
458 .smoothScale( size, size ) );
459 } else {
460 that->d->mPixmaps[0].convertFromImage( unscaledIcon.smoothScale( smallSize, smallSize ) );
461 that->d->mPixmaps[1].convertFromImage( unscaledIcon.smoothScale( bigSize, bigSize ) );
462 }
463 return that->d->mPixmaps[0];
250 } 464 }
251 return mPixmap; 465 return mPixmap;
252} 466}
253 467
254/*! 468/*!
469 Returns a small pixmap associated with the application.
470
471 \sa bigPixmap() setIcon()
472*/
473const QPixmap& AppLnk::pixmap() const
474{
475 if ( d->mPixmaps[0].isNull() ) {
476 return pixmap(AppLnkPrivate::Normal, smallSize );
477 }
478 return d->mPixmaps[0];
479}
480
481/*!
255 Returns a large pixmap associated with the application. 482 Returns a large pixmap associated with the application.
483
484 \sa pixmap() setIcon()
256*/ 485*/
257const QPixmap& AppLnk::bigPixmap() const 486const QPixmap& AppLnk::bigPixmap() const
258{ 487{
259 if ( mBigPixmap.isNull() ) { 488 if ( d->mPixmaps[1].isNull() ) {
260 AppLnk* that = (AppLnk*)this; 489 return pixmap( AppLnkPrivate::Big, bigSize );
261 if ( mIconFile.isEmpty() ) {
262 MimeType mt(type());
263 that->mBigPixmap = mt.bigPixmap();
264 if ( that->mBigPixmap.isNull() )
265 that->mBigPixmap = Resource::loadPixmap("UnknownDocument");
266 return that->mBigPixmap;
267 }
268 QImage unscaledIcon = Resource::loadImage( that->mIconFile );
269 that->mPixmap.convertFromImage( unscaledIcon.smoothScale( smallSize, smallSize ) );
270 that->mBigPixmap.convertFromImage( unscaledIcon.smoothScale( bigSize, bigSize ) );
271 return that->mBigPixmap;
272 } 490 }
273 return mBigPixmap; 491 return mBigPixmap;
274} 492}
275 493
276/*! 494/*!
277 Returns the type of the application. 495 Returns the type of the AppLnk. For applications, games and
496 settings the type is \c Application; for documents the type is the
497 document's MIME type.
278*/ 498*/
279QString AppLnk::type() const 499QString AppLnk::type() const
280{ 500{
281 if ( mType.isNull() ) { 501 if ( mType.isNull() ) {
282 AppLnk* that = (AppLnk*)this; 502 AppLnk* that = (AppLnk*)this;
283 MimeType mt(file()); 503 QString f = file();
284 that->mType = mt.id(); 504 if ( !f.isNull() ) {
285 return that->mType; 505 MimeType mt(f);
506 that->mType = mt.id();
507 return that->mType;
508 }
286 } 509 }
287 return mType; 510 return mType;
288} 511}
289 512
290/*! 513/*!
291 Returns the file associated with the AppLnk. 514 Returns the file associated with the AppLnk.
292 515
293 \sa exec() 516 \sa exec() name()
294*/ 517*/
295QString AppLnk::file() const 518QString AppLnk::file() const
296{ 519{
297 if ( mFile.isNull() ) { 520 if ( mFile.isNull() ) {
298 AppLnk* that = (AppLnk*)this; // copy? 521 AppLnk* that = (AppLnk*)this;
299 QString ext = MimeType(mType).extension(); 522 QString ext = MimeType(mType).extension();
300 if ( !ext.isEmpty() ) 523 if ( !ext.isEmpty() )
301 ext = "." + ext; 524 ext = "." + ext;
302 if ( !mLinkFile.isEmpty() ) { 525 if ( !mLinkFile.isEmpty() ) {
303 that->mFile = 526 that->mFile =
304 mLinkFile.right(8)==".desktop" // 8 = strlen(".desktop") 527 mLinkFile.right(8)==".desktop" // 8 = strlen(".desktop")
305 ? mLinkFile.left(mLinkFile.length()-8) : mLinkFile; 528 ? mLinkFile.left(mLinkFile.length()-8) : mLinkFile;
306 } else if ( mType.contains('/') ) { 529 } else if ( mType.contains('/') ) {
307 that->mFile = 530 that->mFile =
308 QString(getenv("HOME"))+"/Documents/"+mType+"/"+safeFileName(that->mName); 531 QString(getenv("HOME"))+"/Documents/"+mType+"/"+safeFileName(that->mName);
309 if ( QFile::exists(that->mFile+ext) || QFile::exists(that->mFile+".desktop") ) { // a .desktop with the same name exists 532 /*
533 * A file with the same name or a .desktop file already exists
534 */
535 if ( QFile::exists(that->mFile+ext) || QFile::exists(that->mFile+".desktop") ) {
310 int n=1; 536 int n=1;
311 qWarning("AppLnk::file() n=1 %s", that->mFile.latin1() );
312 QString nn; 537 QString nn;
313 while (QFile::exists((nn=(that->mFile+"_"+QString::number(n)))+ext) 538 while (QFile::exists((nn=(that->mFile+"_"+QString::number(n)))+ext)
314 || QFile::exists(nn+".desktop")) 539 || QFile::exists(nn+".desktop"))
315 n++; 540 n++;
316 that->mFile = nn; 541 that->mFile = nn;
317 qWarning("AppLnl::file() now mFile is %s", that->mFile.latin1() );
318 } 542 }
319 that->mLinkFile = that->mFile+".desktop"; 543 that->mLinkFile = that->mFile+".desktop";
320 that->mFile += ext; 544 that->mFile += ext;
321 } 545 }
322 prepareDirectories(that->mFile); 546 prepareDirectories(that->mFile);
323 QFile f(that->mFile); 547 if ( !that->mFile.isEmpty() ) {
324 if ( !f.open(IO_WriteOnly) ) 548 QFile f(that->mFile);
325 that->mFile = QString::null; 549 if ( !f.open(IO_WriteOnly) )
326 return that->mFile; 550 that->mFile = QString::null;
551 return that->mFile;
552 }
327 } 553 }
328 return mFile; 554 return mFile;
329} 555}
330 556
331/*! 557/*!
332 Returns the desktop file coresponding to this AppLnk. 558 Returns the desktop file corresponding to this AppLnk.
333 559
334 \sa file(), exec() 560 \sa file() exec() name()
335*/ 561*/
336QString AppLnk::linkFile() const 562QString AppLnk::linkFile() const
337{ 563{
338 if ( mLinkFile.isNull() ) { 564 if ( mLinkFile.isNull() ) {
339 AppLnk* that = (AppLnk*)this; 565 AppLnk* that = (AppLnk*)this;
340 if ( type().contains('/') ) { 566 if ( type().contains('/') ) {
341 StorageInfo storage; 567 StorageInfo storage;
342 const FileSystem *fs = storage.fileSystemOf( that->mFile ); 568 const FileSystem *fs = storage.fileSystemOf( that->mFile );
343 if ( fs && ( fs->isRemovable() || fs->disk() == "/dev/mtdblock6" || fs->disk() == "tmpfs" ) ) { 569 /* tmpfs + and ramfs are available too but not removable
570 * either we fix storage or add this
571 */
572 if ( fs && ( fs->isRemovable() || fs->disk() == "/dev/mtdblock6" || fs->disk() == "tmpfs") ) {
344 that->mLinkFile = fs->path(); 573 that->mLinkFile = fs->path();
345 } else 574 } else
346 that->mLinkFile = getenv( "HOME" ); 575 that->mLinkFile = getenv( "HOME" );
347 that->mLinkFile += "/Documents/"+type()+"/"+safeFileName(that->mName); 576 that->mLinkFile += "/Documents/"+type()+"/"+safeFileName(that->mName);
348 if ( QFile::exists(that->mLinkFile+".desktop") ) { // ok the file exists lets check if we point to the same file 577
349 int n=1; 578 /* the desktop file exists make sure we don't point to the same file */
350 QString nn; 579 if ( QFile::exists(that->mLinkFile+".desktop") ) {
351 AppLnk lnk( that->mLinkFile+".desktop" ); 580 AppLnk lnk( that->mLinkFile + ".desktop" );
352 if(that->file() != lnk.file() ){ 581
353 qWarning("AppLnk::linkFile exists %s", that->mLinkFile.latin1() ); 582 /* the linked is different */
354 while (QFile::exists((nn=that->mLinkFile+"_"+QString::number(n))+".desktop")){ 583 if(that->file() != lnk.file() ) {
355 n++; 584 int n = 1;
356 AppLnk lnk(nn ); // just to be sure 585 QString nn;
357 if(lnk.file() ==that->file() ){ 586 while (QFile::exists((nn=that->mLinkFile+"_"+QString::number(n))+".desktop")) {
358 break; 587 n++;
359 } 588 /* just to be sure */
360 } 589 AppLnk lnk(nn );
361 that->mLinkFile = nn; 590 if (lnk.file() == that->file() )
362 } 591 break;
592 }
593 that->mLinkFile = nn;
594 }
363 } 595 }
364 that->mLinkFile += ".desktop"; 596 that->mLinkFile += ".desktop";
365 qWarning("AppLnk::linkFile is %s", that->mLinkFile.latin1() );
366 storeLink(); 597 storeLink();
367 } 598 }
368 return that->mLinkFile; 599 return that->mLinkFile;
369 } 600 }
370 return mLinkFile; 601 return mLinkFile;
371} 602}
372 603
373/*! 604/*!
@@ -385,43 +616,50 @@ AppLnk::AppLnk( const AppLnk &copy )
385 mFile = copy.mFile; 616 mFile = copy.mFile;
386 mLinkFile = copy.mLinkFile; 617 mLinkFile = copy.mLinkFile;
387 mIconFile = copy.mIconFile; 618 mIconFile = copy.mIconFile;
388 mMimeTypes = copy.mMimeTypes; 619 mMimeTypes = copy.mMimeTypes;
389 mMimeTypeIcons = copy.mMimeTypeIcons; 620 mMimeTypeIcons = copy.mMimeTypeIcons;
390 mId = 0; 621 mId = 0;
391 d = new AppLnkPrivate(); 622 d = new AppLnkPrivate();
392 d->mCat = copy.d->mCat; 623 d->mCat = copy.d->mCat;
624 d->mCatList = copy.d->mCatList;
625 d->mPixmaps = copy.d->mPixmaps;
393} 626}
394 627
395/*! 628/*!
396 Destroys the AppLnk. Note that if the AppLnk is current a member of 629 Destroys the AppLnk. Note that if the AppLnk is currently a member
397 an AppLnkSet, this will produce a run-time warning. 630 of an AppLnkSet, this will produce a run-time warning.
398 631
399 \sa AppLnkSet::add(), AppLnkSet::remove() 632 \sa AppLnkSet::add() AppLnkSet::remove()
400*/ 633*/
401AppLnk::~AppLnk() 634AppLnk::~AppLnk()
402{ 635{
403 if ( mId ) 636 if ( mId )
404 qWarning("Deleting AppLnk that is in an AppLnkSet"); 637 qWarning("Deleting AppLnk that is in an AppLnkSet");
405 if ( d ) 638 if ( d )
406 delete d; 639 delete d;
407} 640}
408 641
409/*! 642/*!
643 \overload
410 Executes the application associated with this AppLnk. 644 Executes the application associated with this AppLnk.
645
646 \sa exec()
411*/ 647*/
412void AppLnk::execute() const 648void AppLnk::execute() const
413{ 649{
414 execute(QStringList()); 650 execute(QStringList());
415} 651}
416 652
417/*! 653/*!
418 Executes the application associated with this AppLnk, with 654 Executes the application associated with this AppLnk, with
419 \a args as arguments. 655 \a args as arguments.
656
657 \sa exec()
420*/ 658*/
421void AppLnk::execute(const QStringList& args) const 659void AppLnk::execute(const QStringList& args) const
422{ 660{
423#ifdef Q_WS_QWS 661#ifdef Q_WS_QWS
424 if ( !mRotation.isEmpty() ) { 662 if ( !mRotation.isEmpty() ) {
425 // ######## this will only work in the server 663 // ######## this will only work in the server
426 int rot = QPEApplication::defaultRotation(); 664 int rot = QPEApplication::defaultRotation();
427 rot = (rot+mRotation.toInt())%360; 665 rot = (rot+mRotation.toInt())%360;
@@ -432,29 +670,29 @@ void AppLnk::execute(const QStringList& args) const
432 } else 670 } else
433#endif 671#endif
434 invoke(args); 672 invoke(args);
435} 673}
436 674
437/*! 675/*!
438 Invokes the application associated with this AppLnk, with 676 Invokes the application associated with this AppLnk, with
439 \a args as arguments. Rotation is not taken into account by 677 \a args as arguments. Rotation is not taken into account by
440 this function, you should not call it directly. 678 this function, so you should not call it directly.
441 679
442 \sa execute() 680 \sa execute()
443*/ 681*/
444void AppLnk::invoke(const QStringList& args) const 682void AppLnk::invoke(const QStringList& args) const
445{ 683{
446 Global::execute( exec(), args[0] ); 684 Global::execute( exec(), args[0] );
447} 685}
448 686
449/*! 687/*!
450 Sets the Exec property to \a exec. 688 Sets the Exec property to \a exec.
451 689
452 \sa exec() 690 \sa exec() name()
453*/ 691*/
454void AppLnk::setExec( const QString& exec ) 692void AppLnk::setExec( const QString& exec )
455{ 693{
456 mExec = exec; 694 mExec = exec;
457} 695}
458 696
459/*! 697/*!
460 Sets the Name property to \a docname. 698 Sets the Name property to \a docname.
@@ -464,17 +702,17 @@ void AppLnk::setExec( const QString& exec )
464void AppLnk::setName( const QString& docname ) 702void AppLnk::setName( const QString& docname )
465{ 703{
466 mName = docname; 704 mName = docname;
467} 705}
468 706
469/*! 707/*!
470 Sets the File property to \a filename. 708 Sets the File property to \a filename.
471 709
472 \sa file() 710 \sa file() name()
473*/ 711*/
474void AppLnk::setFile( const QString& filename ) 712void AppLnk::setFile( const QString& filename )
475{ 713{
476 mFile = filename; 714 mFile = filename;
477} 715}
478 716
479/*! 717/*!
480 Sets the LinkFile property to \a filename. 718 Sets the LinkFile property to \a filename.
@@ -484,133 +722,168 @@ void AppLnk::setFile( const QString& filename )
484void AppLnk::setLinkFile( const QString& filename ) 722void AppLnk::setLinkFile( const QString& filename )
485{ 723{
486 mLinkFile = filename; 724 mLinkFile = filename;
487} 725}
488 726
489/*! 727/*!
490 Sets the Comment property to \a comment. 728 Sets the Comment property to \a comment.
491 729
730 This text is displayed in the 'Details Dialog', for example if the
731 user uses the 'press-and-hold' gesture.
732
492 \sa comment() 733 \sa comment()
493*/ 734*/
494void AppLnk::setComment( const QString& comment ) 735void AppLnk::setComment( const QString& comment )
495{ 736{
496 mComment = comment; 737 mComment = comment;
497} 738}
498 739
499/*! 740/*!
500 Sets the Type property to \a type. 741 Sets the Type property to \a type.
501 742
743 For applications, games and settings the type should be \c
744 Application; for documents the type should be the document's MIME
745 type.
746
502 \sa type() 747 \sa type()
503*/ 748*/
504void AppLnk::setType( const QString& type ) 749void AppLnk::setType( const QString& type )
505{ 750{
506 mType = type; 751 mType = type;
507} 752}
508 753
509/*! 754/*!
510 Sets the Icon property to \a iconname. 755 \fn QString AppLnk::icon() const
756
757 Returns the Icon property.
758
759 \sa setIcon()
760*/
761
762/*!
763 Sets the Icon property to \a iconname. This is the filename from
764 which the pixmap() and bigPixmap() are obtained.
511 765
512 \sa pixmap(), bigPixmap() 766 \sa icon() setSmallIconSize() setBigIconSize()
513*/ 767*/
514void AppLnk::setIcon( const QString& iconname ) 768void AppLnk::setIcon( const QString& iconname )
515{ 769{
516 mIconFile = iconname; 770 mIconFile = iconname;
517 QImage unscaledIcon = Resource::loadImage( mIconFile ); 771 QImage unscaledIcon = Resource::loadImage( mIconFile );
518 mPixmap.convertFromImage( unscaledIcon.smoothScale( smallSize, smallSize ) ); 772 d->mPixmaps[0].convertFromImage( unscaledIcon.smoothScale( smallSize, smallSize ) );
519 mBigPixmap.convertFromImage( unscaledIcon.smoothScale( bigSize, bigSize ) ); 773 d->mPixmaps[1].convertFromImage( unscaledIcon.smoothScale( bigSize, bigSize ) );
520} 774}
521 775
522/*! 776/*!
523 Sets the Categories property to \a c. 777 Sets the Categories property to \a c.
524 778
779 See the CategoryWidget for more details.
780
525 \sa categories() 781 \sa categories()
526*/ 782*/
527void AppLnk::setCategories( const QArray<int>& c ) 783void AppLnk::setCategories( const QArray<int>& c )
528{ 784{
529 d->mCat = c; 785 d->mCat = c;
786 d->updateCatListFromArray();
530} 787}
531 788
532/*! 789/*!
533 \fn QStringList AppLnk::mimeTypeIcons() const 790 \fn QStringList AppLnk::mimeTypeIcons() const
534 791
535 Returns the MimeTypeIcons property of the AppLnk. 792 Returns the MimeTypeIcons property of the AppLnk.
536*/ 793*/
537 794
538/*! 795/*!
539 Attempts to ensure that the link file for this AppLnk exists, including 796 Attempts to ensure that the link file for this AppLnk exists,
540 creating any required directories. Returns TRUE if successful. 797 including creating any required directories. Returns TRUE if
798 successful; otherwise returns FALSE.
799
800 You should not need to use this function.
541*/ 801*/
542bool AppLnk::ensureLinkExists() const 802bool AppLnk::ensureLinkExists() const
543{ 803{
544 QString lf = linkFile(); 804 QString lf = linkFile();
545 return prepareDirectories(lf); 805 return prepareDirectories(lf);
546} 806}
547 807
548/*! 808/*!
549 Commits the AppLnk to disk. Returns whether the operation succeeded. 809 Commits the AppLnk to disk. Returns TRUE if the operation succeeded;
810 otherwise returns FALSE.
550 811
551 The "linkChanged(QString)" message is sent to the 812 In addition, the "linkChanged(QString)" message is sent to the
552 "QPE/System" QCop channel as a result. 813 "QPE/System" \link qcop.html QCop\endlink channel.
553*/ 814*/
554bool AppLnk::writeLink() const 815bool AppLnk::writeLink() const
555{ 816{
556 // Only re-writes settable parts 817 // Only re-writes settable parts
557 QString lf = linkFile(); 818 QString lf = linkFile();
558 if ( !ensureLinkExists() ) 819 if ( !ensureLinkExists() )
559 return FALSE; 820 return FALSE;
560 storeLink(); 821 storeLink();
561 return TRUE; 822 return TRUE;
562} 823}
563 824
825/*!
826 \internal
827*/
564void AppLnk::storeLink() const 828void AppLnk::storeLink() const
565{ 829{
566 Config config( mLinkFile, Config::File ); 830 Config config( mLinkFile, Config::File );
567 config.setGroup("Desktop Entry"); 831 config.setGroup("Desktop Entry");
568 config.writeEntry("Name",mName); 832 config.writeEntry("Name",mName);
569 if ( !mIconFile.isNull() ) config.writeEntry("Icon",mIconFile); 833 if ( !mIconFile.isNull() ) config.writeEntry("Icon",mIconFile);
570 config.writeEntry("Type",type()); 834 config.writeEntry("Type",type());
571 if ( !mComment.isNull() ) config.writeEntry("Comment",mComment); 835 if ( !mComment.isNull() ) config.writeEntry("Comment",mComment);
572 config.writeEntry("File",file()); 836 QString f = file();
573 // write out the id... 837 int i = 0;
574 int i; 838 while ( i < (int)f.length() && i < (int)mLinkFile.length() && f[i] == mLinkFile[i] )
575 QStringList sl; 839 i++;
576 for ( i = 0; i < int(d->mCat.count()); i++ ) { 840 while ( i && f[i] != '/' )
577 sl.append( QString::number( d->mCat[i] ) ); 841 i--;
578 } 842 // simple case where in the same directory
579 config.writeEntry( "Categories", sl, ';' ); 843 if ( mLinkFile.find( '/', i + 1 ) < 0 )
580 844 f = f.mid(i+1);
845 // ### could do relative ie ../../otherDocs/file.doc
846 config.writeEntry("File",f);
847 config.writeEntry( "Categories", d->mCatList, ';' );
848
849#ifndef QT_NO_COP
581 QCopEnvelope e("QPE/System", "linkChanged(QString)"); 850 QCopEnvelope e("QPE/System", "linkChanged(QString)");
582 e << mLinkFile; 851 e << mLinkFile;
852#endif
583} 853}
584 854
585/*! 855/*!
586 Sets the property named \a key to \a value. 856 Sets the property named \a key to \a value.
857
858 \sa property()
587*/ 859*/
588void AppLnk::setProperty(const QString& key, const QString& value) 860void AppLnk::setProperty(const QString& key, const QString& value)
589{ 861{
590 if ( ensureLinkExists() ) { 862 if ( ensureLinkExists() ) {
591 Config cfg(linkFile(), Config::File); 863 Config cfg(linkFile(), Config::File);
592 cfg.writeEntry(key,value); 864 cfg.writeEntry(key,value);
593 } 865 }
594} 866}
595 867
596/*! 868/*!
597 Returns the property named \a key. 869 Returns the property named \a key.
870
871 \sa setProperty()
598*/ 872*/
599QString AppLnk::property(const QString& key) const 873QString AppLnk::property(const QString& key) const
600{ 874{
601 QString lf = linkFile(); 875 QString lf = linkFile();
602 if ( !QFile::exists(lf) ) 876 if ( !QFile::exists(lf) )
603 return QString::null; 877 return QString::null;
604 Config cfg(lf, Config::File); 878 Config cfg(lf, Config::File);
605 return cfg.readEntry(key); 879 return cfg.readEntry(key);
606} 880}
607 881
608
609bool AppLnk::isPreloaded() const { 882bool AppLnk::isPreloaded() const {
610 // Preload information is stored in the Launcher config in v1.5. 883 // Preload information is stored in the Launcher config in v1.5.
611 Config cfg("Launcher"); 884 Config cfg("Launcher");
612 cfg.setGroup("Preload"); 885 cfg.setGroup("Preload");
613 QStringList apps = cfg.readListEntry("Apps",','); 886 QStringList apps = cfg.readListEntry("Apps",',');
614 if (apps.contains(exec())) 887 if (apps.contains(exec()))
615 return true; 888 return true;
616 return false; 889 return false;
@@ -625,43 +898,51 @@ void AppLnk::setPreloaded(bool yesNo) {
625 apps.remove(exec()); 898 apps.remove(exec());
626 else if (yesNo && !apps.contains(exec())) 899 else if (yesNo && !apps.contains(exec()))
627 apps.append(exec()); 900 apps.append(exec());
628 cfg.writeEntry("Apps", apps, ','); 901 cfg.writeEntry("Apps", apps, ',');
629} 902}
630 903
631 904
632/*! 905/*!
633 Deletes both the linkFile() and file() associated with this AppLnk. 906 Deletes both the linkFile() and the file() associated with this AppLnk.
907
908 \sa removeLinkFile()
634*/ 909*/
635void AppLnk::removeFiles() 910void AppLnk::removeFiles()
636{ 911{
637 bool valid = isValid(); 912 bool valid = isValid();
638 if ( !valid || !linkFileKnown() || QFile::remove(linkFile()) ) { 913 if ( !valid || !linkFileKnown() || QFile::remove(linkFile()) ) {
639 if ( QFile::remove(file()) ) { 914 if ( QFile::remove(file()) ) {
915#ifndef QT_NO_COP
640 QCopEnvelope e("QPE/System", "linkChanged(QString)"); 916 QCopEnvelope e("QPE/System", "linkChanged(QString)");
641 if ( linkFileKnown() ) 917 if ( linkFileKnown() )
642 e << linkFile(); 918 e << linkFile();
643 else 919 else
644 e << file(); 920 e << file();
921#endif
645 } else if ( valid ) { 922 } else if ( valid ) {
646 // restore link 923 // restore link
647 writeLink(); 924 writeLink();
648 } 925 }
649 } 926 }
650} 927}
651 928
652/*! 929/*!
653 Delete the linkFile(), leaving any file() untouched. 930 Deletes the linkFile(), leaving any file() untouched.
931
932 \sa removeFiles()
654*/ 933*/
655void AppLnk::removeLinkFile() 934void AppLnk::removeLinkFile()
656{ 935{
657 if ( isValid() && linkFileKnown() && QFile::remove(linkFile()) ) { 936 if ( isValid() && linkFileKnown() && QFile::remove(linkFile()) ) {
937#ifndef QT_NO_COP
658 QCopEnvelope e("QPE/System", "linkChanged(QString)"); 938 QCopEnvelope e("QPE/System", "linkChanged(QString)");
659 e << linkFile(); 939 e << linkFile();
940#endif
660 } 941 }
661} 942}
662 943
663class AppLnkSetPrivate { 944class AppLnkSetPrivate {
664public: 945public:
665 AppLnkSetPrivate() 946 AppLnkSetPrivate()
666 { 947 {
667 typPix.setAutoDelete(TRUE); 948 typPix.setAutoDelete(TRUE);
@@ -677,17 +958,20 @@ public:
677/*! 958/*!
678 \class AppLnkSet applnk.h 959 \class AppLnkSet applnk.h
679 \brief The AppLnkSet class is a set of AppLnk objects. 960 \brief The AppLnkSet class is a set of AppLnk objects.
680*/ 961*/
681 962
682/*! 963/*!
683 \fn QStringList AppLnkSet::types() const 964 \fn QStringList AppLnkSet::types() const
684 965
685 Returns the list of types in the set. 966 Returns the list of \link applnk.html#Types types\endlink in the set.
967
968 For applications, games and settings the type is \c Application;
969 for documents the type is the document's MIME type.
686 970
687 \sa AppLnk::type(), typeName(), typePixmap(), typeBigPixmap() 971 \sa AppLnk::type(), typeName(), typePixmap(), typeBigPixmap()
688*/ 972*/
689 973
690/*! 974/*!
691 \fn const QList<AppLnk>& AppLnkSet::children() const 975 \fn const QList<AppLnk>& AppLnkSet::children() const
692 976
693 Returns the members of the set. 977 Returns the members of the set.
@@ -698,47 +982,50 @@ public:
698*/ 982*/
699AppLnkSet::AppLnkSet() : 983AppLnkSet::AppLnkSet() :
700 d(new AppLnkSetPrivate) 984 d(new AppLnkSetPrivate)
701{ 985{
702} 986}
703 987
704/*! 988/*!
705 Constructs an AppLnkSet that contains AppLnk objects representing 989 Constructs an AppLnkSet that contains AppLnk objects representing
706 all the files in a \a directory (recursively). 990 all the files in the given \a directory (and any subdirectories
991 recursively).
707 992
708 The directories may contain ".directory" files which overrides 993 \omit
709 any AppLnk::type() value of AppLnk objects found in the directory. 994 The directories may contain ".directory" files which override
995 any AppLnk::type() values for AppLnk objects found in the directory.
710 This allows simple localization of application types. 996 This allows simple localization of application types.
997 \endomit
711*/ 998*/
712AppLnkSet::AppLnkSet( const QString &directory ) : 999AppLnkSet::AppLnkSet( const QString &directory ) :
713 d(new AppLnkSetPrivate) 1000 d(new AppLnkSetPrivate)
714{ 1001{
715 QDir dir( directory ); 1002 QDir dir( directory );
716 mFile = directory; 1003 mFile = directory;
717 findChildren(directory,QString::null,QString::null); 1004 findChildren(directory,QString::null,QString::null);
718} 1005}
719 1006
720/*! 1007/*!
721 Detaches all AppLnk objects from the set. The set become empty 1008 Detaches all AppLnk objects from the set. The set become empty and
722 and the call becomes responsible for deleting the AppLnk objects. 1009 the caller becomes responsible for deleting the AppLnk objects.
723*/ 1010*/
724void AppLnkSet::detachChildren() 1011void AppLnkSet::detachChildren()
725{ 1012{
726 QListIterator<AppLnk> it( mApps ); 1013 QListIterator<AppLnk> it( mApps );
727 for ( ; it.current(); ) { 1014 for ( ; it.current(); ) {
728 AppLnk* a = *it; 1015 AppLnk* a = *it;
729 ++it; 1016 ++it;
730 a->mId = 0; 1017 a->mId = 0;
731 } 1018 }
732 mApps.clear(); 1019 mApps.clear();
733} 1020}
734 1021
735/*! 1022/*!
736 Destroys the set, deleting all AppLnk objects it contains. 1023 Destroys the set, deleting all the AppLnk objects it contains.
737 1024
738 \sa detachChildren() 1025 \sa detachChildren()
739*/ 1026*/
740AppLnkSet::~AppLnkSet() 1027AppLnkSet::~AppLnkSet()
741{ 1028{
742 QListIterator<AppLnk> it( mApps ); 1029 QListIterator<AppLnk> it( mApps );
743 for ( ; it.current(); ) { 1030 for ( ; it.current(); ) {
744 AppLnk* a = *it; 1031 AppLnk* a = *it;
@@ -806,66 +1093,78 @@ void AppLnkSet::findChildren(const QString &dr, const QString& typ, const QStrin
806 } 1093 }
807 } 1094 }
808 } 1095 }
809 } 1096 }
810 } 1097 }
811} 1098}
812 1099
813/*! 1100/*!
814 Adds \a f to the set. The set takes over responsibility for deleting \a f. 1101 Adds AppLnk \a f to the set. The set takes responsibility for
1102 deleting \a f.
815 1103
816 \sa remove() 1104 \sa remove()
817*/ 1105*/
818void AppLnkSet::add( AppLnk *f ) 1106void AppLnkSet::add( AppLnk *f )
819{ 1107{
820 if ( f->mId == 0 ) { 1108 if ( f->mId == 0 ) {
821 AppLnk::lastId++; 1109 AppLnk::lastId++;
822 f->mId = AppLnk::lastId; 1110 f->mId = AppLnk::lastId;
823 mApps.append( f ); 1111 mApps.append( f );
824 } else { 1112 } else {
825 qWarning("Attempt to add an AppLnk twice"); 1113 qWarning("Attempt to add an AppLnk twice");
826 } 1114 }
827} 1115}
828 1116
829/*! 1117/*!
830 Removes \a f to the set, returning whether \a f was in the set. 1118 Removes AppLnk \a f to the set. The caller becomes responsible for
831 The caller becomes responsible for deleting \a f. 1119 deleting \a f. Returns TRUE if \a f was in the set; otherwise
1120 returns FALSE.
832 1121
833 \sa add() 1122 \sa add()
834*/ 1123*/
835bool AppLnkSet::remove( AppLnk *f ) 1124bool AppLnkSet::remove( AppLnk *f )
836{ 1125{
837 if ( mApps.remove( f ) ) { 1126 if ( mApps.remove( f ) ) {
838 f->mId = 0; 1127 f->mId = 0;
839 return TRUE; 1128 return TRUE;
840 } 1129 }
841 return FALSE; 1130 return FALSE;
842} 1131}
843 1132
1133
844/*! 1134/*!
845 Returns the localized name for type \a t. 1135 Returns the localized name for type \a t.
1136
1137 For applications, games and settings the type is \c Application;
1138 for documents the type is the document's MIME type.
846*/ 1139*/
847QString AppLnkSet::typeName( const QString& t ) const 1140QString AppLnkSet::typeName( const QString& t ) const
848{ 1141{
849 QString *st = d->typName.find(t); 1142 QString *st = d->typName.find(t);
850 return st ? *st : QString::null; 1143 return st ? *st : QString::null;
851} 1144}
852 1145
853/*! 1146/*!
854 Returns the small pixmap associated with type \a t. 1147 Returns the small pixmap associated with type \a t.
1148
1149 For applications, games and settings the type is \c Application;
1150 for documents the type is the document's MIME type.
855*/ 1151*/
856QPixmap AppLnkSet::typePixmap( const QString& t ) const 1152QPixmap AppLnkSet::typePixmap( const QString& t ) const
857{ 1153{
858 QPixmap *pm = d->typPix.find(t); 1154 QPixmap *pm = d->typPix.find(t);
859 return pm ? *pm : QPixmap(); 1155 return pm ? *pm : QPixmap();
860} 1156}
861 1157
862/*! 1158/*!
863 Returns the large pixmap associated with type \a t. 1159 Returns the large pixmap associated with type \a t.
1160
1161 For applications, games and settings the type is \c Application;
1162 for documents the type is the document's MIME type.
864*/ 1163*/
865QPixmap AppLnkSet::typeBigPixmap( const QString& t ) const 1164QPixmap AppLnkSet::typeBigPixmap( const QString& t ) const
866{ 1165{
867 QPixmap *pm = d->typPixBig.find(t); 1166 QPixmap *pm = d->typPixBig.find(t);
868 return pm ? *pm : QPixmap(); 1167 return pm ? *pm : QPixmap();
869} 1168}
870 1169
871/*! 1170/*!
@@ -916,23 +1215,26 @@ const AppLnk *AppLnkSet::findExec( const QString& exec ) const
916 1215
917 \sa appendFrom() 1216 \sa appendFrom()
918*/ 1217*/
919DocLnkSet::DocLnkSet() 1218DocLnkSet::DocLnkSet()
920{ 1219{
921} 1220}
922 1221
923/*! 1222/*!
924 Constructs an DocLnkSet that contains DocLnk objects representing 1223 Constructs a DocLnkSet that contains DocLnk objects representing all
925 all the files in a \a directory (recursively). 1224 the files in the \a directory (and any subdirectories, recursively).
926 1225
927 If \a mimefilter is not null, 1226 If \a mimefilter is not null,
928 only documents with a MIME type matching \a mimefilter are selected. 1227 only documents with a MIME type matching \a mimefilter are selected.
929 The value may contain multiple wild-card patterns separated by ";", 1228 The value may contain multiple wild-card patterns separated by ";",
930 such as "*o/mpeg;audio/x-wav". 1229 such as \c{*o/mpeg;audio/x-wav}.
1230
1231 See also \link applnk.html#files-and-links Files and Links\endlink.
1232
931*/ 1233*/
932DocLnkSet::DocLnkSet( const QString &directory, const QString& mimefilter ) : 1234DocLnkSet::DocLnkSet( const QString &directory, const QString& mimefilter ) :
933 AppLnkSet() 1235 AppLnkSet()
934{ 1236{
935 QDir dir( directory ); 1237 QDir dir( directory );
936 mFile = dir.dirName(); 1238 mFile = dir.dirName();
937 QDict<void> reference; 1239 QDict<void> reference;
938 1240
@@ -991,24 +1293,32 @@ void DocLnkSet::appendFrom( DocLnkSet& other )
991void DocLnkSet::findChildren(const QString &dr, const QValueList<QRegExp> &mimeFilters, QDict<void> &reference, int depth) 1293void DocLnkSet::findChildren(const QString &dr, const QValueList<QRegExp> &mimeFilters, QDict<void> &reference, int depth)
992{ 1294{
993 depth++; 1295 depth++;
994 if ( depth > 10 ) 1296 if ( depth > 10 )
995 return; 1297 return;
996 1298
997 QDir dir( dr ); 1299 QDir dir( dr );
998 1300
1301 /* Opie got a different approach
1302 * I guess it's geek vs. consumer
1303 * in this case to be discussed
1304 */
1305 if ( dir.exists( ".Qtopia-ignore" ) )
1306 return;
1307
999 const QFileInfoList *list = dir.entryInfoList(); 1308 const QFileInfoList *list = dir.entryInfoList();
1000 if ( list ) { 1309 if ( list ) {
1001 QFileInfo* fi; 1310 QFileInfo* fi;
1002 for ( QFileInfoListIterator it(*list); (fi=*it); ++it ) { 1311 for ( QFileInfoListIterator it(*list); (fi=*it); ++it ) {
1003 QString bn = fi->fileName(); 1312 QString bn = fi->fileName();
1004 if ( bn[0] != '.' && bn != "CVS" ) { 1313 if ( bn[0] != '.' ) {
1005 if ( fi->isDir() ) { 1314 if ( fi->isDir() ) {
1006 findChildren(fi->filePath(), mimeFilters, reference, depth); 1315 if ( bn != "CVS" && bn != "Qtopia" && bn != "QtPalmtop" )
1316 findChildren(fi->filePath(), mimeFilters, reference, depth);
1007 } else { 1317 } else {
1008 if ( fi->extension(FALSE) == "desktop" ) { 1318 if ( fi->extension(FALSE) == "desktop" ) {
1009 DocLnk* dl = new DocLnk( fi->filePath() ); 1319 DocLnk* dl = new DocLnk( fi->filePath() );
1010 QFileInfo fi2(dl->file()); 1320 QFileInfo fi2(dl->file());
1011 bool match = FALSE; 1321 bool match = FALSE;
1012 if ( !fi2.exists() ) { 1322 if ( !fi2.exists() ) {
1013 dir.remove( dl->file() ); 1323 dir.remove( dl->file() );
1014 } 1324 }
@@ -1053,18 +1363,19 @@ void DocLnkSet::findChildren(const QString &dr, const QValueList<QRegExp> &mimeF
1053DocLnk::DocLnk( const QString &file ) : 1363DocLnk::DocLnk( const QString &file ) :
1054 AppLnk(file) 1364 AppLnk(file)
1055{ 1365{
1056 init(file); 1366 init(file);
1057} 1367}
1058 1368
1059/*! 1369/*!
1060 Constructs a DocLnk from a valid .desktop \a file or a new .desktop 1370 Constructs a DocLnk from a valid .desktop \a file or a new .desktop
1061 \a file for other files. If \a may_be_desktopfile is TRUE, then \a file 1371 \a file for other files. If \a may_be_desktopfile is TRUE, then an
1062 is first attempted to be read as a .desktop file. 1372 attempt is made to read \a file as a .desktop file; if that fails it
1373 is read as a normal file.
1063*/ 1374*/
1064DocLnk::DocLnk( const QString &file, bool may_be_desktopfile ) : 1375DocLnk::DocLnk( const QString &file, bool may_be_desktopfile ) :
1065 AppLnk(may_be_desktopfile ? file : QString::null) 1376 AppLnk(may_be_desktopfile ? file : QString::null)
1066{ 1377{
1067 init(file); 1378 init(file);
1068} 1379}
1069 1380
1070void DocLnk::init(const QString &file) 1381void DocLnk::init(const QString &file)
@@ -1083,35 +1394,35 @@ void DocLnk::init(const QString &file)
1083 if ( s2 > 0 ) { 1394 if ( s2 > 0 ) {
1084 mType = file.mid(s2+1,s0-s2-1); 1395 mType = file.mid(s2+1,s0-s2-1);
1085 } 1396 }
1086 } 1397 }
1087 } 1398 }
1088 } 1399 }
1089 } else if ( QFile::exists(file) ) { 1400 } else if ( QFile::exists(file) ) {
1090 QString n = file; 1401 QString n = file;
1091 n.replace(QRegExp("\\..*"),"");
1092 n.replace(QRegExp(".*/"),""); 1402 n.replace(QRegExp(".*/"),"");
1403 n.replace(QRegExp("\\..*"),"");
1093 setName( n ); 1404 setName( n );
1094 setFile( file ); 1405 setFile( file );
1095 } 1406 }
1096 MimeType mt(mType); 1407 MimeType mt(mType);
1097 if( mt.application() ) 1408 if( mt.application() )
1098 mExec = mt.application()->exec(); 1409 mExec = mt.application()->exec();
1099} 1410}
1100 1411
1101/*! 1412/*!
1102 Constructs an invalid DocLnk. 1413 Constructs an invalid DocLnk.
1103*/ 1414*/
1104DocLnk::DocLnk() 1415DocLnk::DocLnk()
1105{ 1416{
1106} 1417}
1107 1418
1108/*! 1419/*!
1109 Destroys the DocLnk. As with AppLnk objects, a run-time error 1420 Destroys the DocLnk. Just like AppLnk objects, a run-time error
1110 occurs if the DocLnk is a member of a DocLnkSet (or AppLnkSet). 1421 occurs if the DocLnk is a member of a DocLnkSet (or AppLnkSet).
1111*/ 1422*/
1112DocLnk::~DocLnk() 1423DocLnk::~DocLnk()
1113{ 1424{
1114} 1425}
1115 1426
1116/*! 1427/*!
1117 \reimp 1428 \reimp
@@ -1138,8 +1449,9 @@ void DocLnk::invoke(const QStringList& args) const
1138 if ( linkFileKnown() && QFile::exists( linkFile() ) ) 1449 if ( linkFileKnown() && QFile::exists( linkFile() ) )
1139 a.append(linkFile()); 1450 a.append(linkFile());
1140 else 1451 else
1141 a.append(file()); 1452 a.append(file());
1142 app->execute(a); 1453 app->execute(a);
1143 } 1454 }
1144} 1455}
1145 1456
1457
diff --git a/library/applnk.h b/library/applnk.h
index 9b5523e..71b62ef 100644
--- a/library/applnk.h
+++ b/library/applnk.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -42,27 +42,29 @@ public:
42 static void setSmallIconSize(int); 42 static void setSmallIconSize(int);
43 static void setBigIconSize(int); 43 static void setBigIconSize(int);
44 static int smallIconSize(); 44 static int smallIconSize();
45 static int bigIconSize(); 45 static int bigIconSize();
46 46
47 QString name() const { return mName; } 47 QString name() const { return mName; }
48 const QPixmap& pixmap() const; 48 const QPixmap& pixmap() const;
49 const QPixmap& bigPixmap() const; 49 const QPixmap& bigPixmap() const;
50 QString icon() const { return mIconFile; }
50 virtual QString exec() const { return mExec; } 51 virtual QString exec() const { return mExec; }
51 QString type() const; 52 QString type() const;
52 QString rotation() const { return mRotation; } 53 QString rotation() const { return mRotation; }
53 QString comment() const { return mComment; } 54 QString comment() const { return mComment; }
54 QString file() const; 55 QString file() const;
55 QString linkFile() const; 56 QString linkFile() const;
56 QStringList mimeTypes() const { return mMimeTypes; } 57 QStringList mimeTypes() const { return mMimeTypes; }
57 QStringList mimeTypeIcons() const { return mMimeTypeIcons; } 58 QStringList mimeTypeIcons() const { return mMimeTypeIcons; }
58 const QArray<int> &categories() const; 59 const QArray<int> &categories() const;
59 int id() const { return mId; } 60 int id() const { return mId; }
60 61
62 bool fileKnown() const { return !mFile.isNull(); }
61 bool linkFileKnown() const { return !mLinkFile.isNull(); } 63 bool linkFileKnown() const { return !mLinkFile.isNull(); }
62 64
63 void execute() const; 65 void execute() const;
64 void execute(const QStringList& args) const; 66 void execute(const QStringList& args) const;
65 void removeFiles(); 67 void removeFiles();
66 void removeLinkFile(); 68 void removeLinkFile();
67 69
68 void setName( const QString& docname ); 70 void setName( const QString& docname );
@@ -73,25 +75,34 @@ public:
73 void setType( const QString& mimetype ); 75 void setType( const QString& mimetype );
74 void setIcon( const QString& iconname ); 76 void setIcon( const QString& iconname );
75 void setCategories( const QArray<int> &v ); 77 void setCategories( const QArray<int> &v );
76 bool writeLink() const; 78 bool writeLink() const;
77 79
78 void setProperty(const QString& key, const QString& value); 80 void setProperty(const QString& key, const QString& value);
79 QString property(const QString& key) const; 81 QString property(const QString& key) const;
80 82
81//#ifdef QTOPIA_INTERNAL_PRELOADACCESS 83#ifdef QTOPIA_INTERNAL_PRELOADACCESS
82 bool isPreloaded() const; 84 bool isPreloaded() const;
83 void setPreloaded(bool yesNo); 85 void setPreloaded(bool yesNo);
84//#endif 86#endif
87
88#ifdef QTOPIA_INTERNAL_APPLNKASSIGN
89 AppLnk &operator=(const AppLnk &other);
90#endif
85 91
86protected: 92protected:
87 QString mName; 93 QString mName;
94
95 /* remove for Qtopia 3.0 -zecke */
88 QPixmap mPixmap; 96 QPixmap mPixmap;
97
98 /* remove for Qtopia 3.0 -zecke */
89 QPixmap mBigPixmap; 99 QPixmap mBigPixmap;
100
90 QString mExec; 101 QString mExec;
91 QString mType; 102 QString mType;
92 QString mRotation; 103 QString mRotation;
93 QString mComment; 104 QString mComment;
94 QString mFile; 105 QString mFile;
95 QString mLinkFile; 106 QString mLinkFile;
96 QString mIconFile; 107 QString mIconFile;
97 QStringList mMimeTypes; 108 QStringList mMimeTypes;
@@ -99,27 +110,35 @@ protected:
99 int mId; 110 int mId;
100 static int lastId; 111 static int lastId;
101 AppLnkPrivate *d; 112 AppLnkPrivate *d;
102 friend class AppLnkSet; 113 friend class AppLnkSet;
103 114
104 virtual void invoke(const QStringList& args) const; 115 virtual void invoke(const QStringList& args) const;
105 bool ensureLinkExists() const; 116 bool ensureLinkExists() const;
106 void storeLink() const; 117 void storeLink() const;
118
119private:
120 const QPixmap& pixmap(int pos, int size) const;
107}; 121};
108 122
109class DocLnk : public AppLnk 123class DocLnk : public AppLnk
110{ 124{
111public: 125public:
112 DocLnk(); 126 DocLnk();
113 DocLnk( const DocLnk &o ) : AppLnk(o) { } 127 DocLnk( const DocLnk &o ) : AppLnk(o) { }
114 DocLnk( const QString &file ); 128 DocLnk( const QString &file );
115 DocLnk( const QString &file, bool may_be_desktopfile ); 129 DocLnk( const QString &file, bool may_be_desktopfile );
116 virtual ~DocLnk(); 130 virtual ~DocLnk();
117 131
132
133#ifdef QTOPIA_INTERNAL_APPLNKASSIGN
134 DocLnk &operator=(const DocLnk &other) { AppLnk::operator=(other); return *this; }
135#endif
136
118 QString exec() const; 137 QString exec() const;
119 138
120protected: 139protected:
121 void invoke(const QStringList& args) const; 140 void invoke(const QStringList& args) const;
122 141
123private: 142private:
124 void init(const QString &file); 143 void init(const QString &file);
125}; 144};
@@ -136,16 +155,27 @@ public:
136 155
137 QStringList types() const { return typs; } 156 QStringList types() const { return typs; }
138 QString typeName( const QString& ) const; 157 QString typeName( const QString& ) const;
139 QPixmap typePixmap( const QString& ) const; 158 QPixmap typePixmap( const QString& ) const;
140 QPixmap typeBigPixmap( const QString& ) const; 159 QPixmap typeBigPixmap( const QString& ) const;
141 160
142 void add(AppLnk*); 161 void add(AppLnk*);
143 bool remove(AppLnk*); 162 bool remove(AppLnk*);
163 void clear() {
164 QListIterator<AppLnk> it( mApps );
165 for ( ; it.current(); ) {
166 AppLnk* a = *it;
167 ++it;
168 a->mId = 0;
169 delete a;
170 }
171 mApps.clear();
172 typs.clear();
173 }
144 174
145 const QList<AppLnk> &children() const { return mApps; } 175 const QList<AppLnk> &children() const { return mApps; }
146 void detachChildren(); 176 void detachChildren();
147 177
148protected: 178protected:
149 friend class AppLnk; 179 friend class AppLnk;
150 QList<AppLnk> mApps; 180 QList<AppLnk> mApps;
151 QString mFile; 181 QString mFile;
diff --git a/library/backend/categories.cpp b/library/backend/categories.cpp
index 6e011c4..e37b3b9 100644
--- a/library/backend/categories.cpp
+++ b/library/backend/categories.cpp
@@ -1,48 +1,65 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free 7** GNU General Public License version 2 as published by the Free Software
8** Software Foundation and appearing in the file LICENSE.GPL included 8** Foundation and appearing in the file LICENSE.GPL included in the
9** in the packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** PARTICULAR PURPOSE.
14** 13**
15** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
16** 15**
17** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
18** not clear to you. 17** not clear to you.
19** 18**
20**********************************************************************/ 19**********************************************************************/
21#include "categories.h" 20#include <qtopia/categories.h>
21#include <qtopia/stringutil.h>
22#include <qfile.h> 22#include <qfile.h>
23#include <qcstring.h> 23#include <qcstring.h>
24#include <qtextstream.h> 24#include <qtextstream.h>
25#include "stringutil.h"
26 25
27using namespace Qtopia; 26using namespace Qtopia;
28 27
29/*********************************************************** 28/***********************************************************
30 * 29 *
31 * CategoryGroup 30 * CategoryGroup
32 * 31 *
33 **********************************************************/ 32 **********************************************************/
34 33
35#ifdef PALMTOPCENTER 34#ifdef PALMTOPCENTER
36UidGen CategoryGroup::sUidGen( UidGen::PalmtopCenter ); 35UidGen CategoryGroup::sUidGen( UidGen::PalmtopCenter );
37#else 36#else
38UidGen CategoryGroup::sUidGen( UidGen::Qtopia ); 37UidGen CategoryGroup::sUidGen( UidGen::Qtopia );
39#endif 38#endif
40 39
40/*! \class CategoryGroup categories.h
41 \brief Helper class that is used by Categories
42
43 CategoryGroup is a group of categories that is associated with an
44 application or global set. Mainly it defines a map of ids to
45 category labels and category labels to ids. Lookups can be done with
46 labels or unique idenifiers.
47
48 \ingroup qtopiaemb
49 \ingroup qtopiadesktop
50 \warning Categories API will likely change between Qtopia 1.5 and Qtopia 3
51 \sa Categories::appGroupMap(), Categories::globalGroup()
52 */
53
54/*! Add \a label and return the UID. If failure, then 0 is returned. Note
55 that All and Unfiled are reserved labels.
56 \internal
57*/
41int CategoryGroup::add( const QString &label ) 58int CategoryGroup::add( const QString &label )
42{ 59{
43 if ( label == QObject::tr("All") || label == QObject::tr("Unfiled") ) 60 if ( label == QObject::tr("All") || label == QObject::tr("Unfiled") )
44 return 0; 61 return 0;
45 62
46 QMap<QString,int>::Iterator findIt = mLabelIdMap.find( label ); 63 QMap<QString,int>::Iterator findIt = mLabelIdMap.find( label );
47 if ( findIt != mLabelIdMap.end() ) 64 if ( findIt != mLabelIdMap.end() )
48 return 0; 65 return 0;
@@ -53,117 +70,133 @@ int CategoryGroup::add( const QString &label )
53 70
54void CategoryGroup::insert( int uid, const QString &label ) 71void CategoryGroup::insert( int uid, const QString &label )
55{ 72{
56 uidGen().store( uid ); 73 uidGen().store( uid );
57 mIdLabelMap[uid] = label; 74 mIdLabelMap[uid] = label;
58 mLabelIdMap[label] = uid; 75 mLabelIdMap[label] = uid;
59} 76}
60 77
78/*! \internal
79 */
61bool CategoryGroup::add( int uid, const QString &label ) 80bool CategoryGroup::add( int uid, const QString &label )
62{ 81{
63 if ( label == QObject::tr("All") || label == QObject::tr("Unfiled") ) 82 if ( label == QObject::tr("All") || label == QObject::tr("Unfiled") )
64 return FALSE; 83 return FALSE;
65 84
66 QMap<QString,int>::ConstIterator labelIt = mLabelIdMap.find( label ); 85 QMap<QString,int>::ConstIterator labelIt = mLabelIdMap.find( label );
67 if ( labelIt != mLabelIdMap.end() ) 86 if ( labelIt != mLabelIdMap.end() )
68 return FALSE; 87 return FALSE;
69 QMap<int,QString>::ConstIterator idIt = mIdLabelMap.find( uid ); 88 QMap<int,QString>::ConstIterator idIt = mIdLabelMap.find( uid );
70 if ( idIt != mIdLabelMap.end() ) 89 if ( idIt != mIdLabelMap.end() )
71 return FALSE; 90 return FALSE;
72 insert( uid, label ); 91 insert( uid, label );
73 return TRUE; 92 return TRUE;
74} 93}
75 94
95/*! Returns TRUE if \a label was removed from the group, FALSE if not.
96 \internal
97 */
76bool CategoryGroup::remove( const QString &label ) 98bool CategoryGroup::remove( const QString &label )
77{ 99{
78 QMap<QString,int>::Iterator findIt = mLabelIdMap.find( label ); 100 QMap<QString,int>::Iterator findIt = mLabelIdMap.find( label );
79 if ( findIt == mLabelIdMap.end() ) 101 if ( findIt == mLabelIdMap.end() )
80 return FALSE; 102 return FALSE;
81 103
82 mIdLabelMap.remove( *findIt ); 104 mIdLabelMap.remove( *findIt );
83 mLabelIdMap.remove( findIt ); 105 mLabelIdMap.remove( findIt );
84 106
85 return TRUE; 107 return TRUE;
86} 108}
87 109
110/*! Returns TRUE if \a uid was removed from the group, FALSE if not.
111 \internal
112 */
88bool CategoryGroup::remove( int uid ) 113bool CategoryGroup::remove( int uid )
89{ 114{
90 QMap<int,QString>::Iterator idIt = mIdLabelMap.find( uid ); 115 QMap<int,QString>::Iterator idIt = mIdLabelMap.find( uid );
91 if ( idIt == mIdLabelMap.end() ) 116 if ( idIt == mIdLabelMap.end() )
92 return FALSE; 117 return FALSE;
93 118
94 mLabelIdMap.remove( *idIt ); 119 mLabelIdMap.remove( *idIt );
95 mIdLabelMap.remove( idIt ); 120 mIdLabelMap.remove( idIt );
96 121
97 return TRUE; 122 return TRUE;
98} 123}
99 124
125/*! \internal
126 */
100bool CategoryGroup::rename( int uid, const QString &newLabel ) 127bool CategoryGroup::rename( int uid, const QString &newLabel )
101{ 128{
102 if ( newLabel == QObject::tr("All") || newLabel == QObject::tr("Unfiled") ) 129 if ( newLabel == QObject::tr("All") || newLabel == QObject::tr("Unfiled") )
103 return FALSE; 130 return FALSE;
104 131
105 QMap<int, QString>::Iterator idIt = mIdLabelMap.find( uid ); 132 QMap<int, QString>::Iterator idIt = mIdLabelMap.find( uid );
106 if ( idIt == mIdLabelMap.end() ) 133 if ( idIt == mIdLabelMap.end() )
107 return FALSE; 134 return FALSE;
108 135
109 mLabelIdMap.remove( *idIt ); 136 mLabelIdMap.remove( *idIt );
110 mLabelIdMap[newLabel] = uid; 137 mLabelIdMap[newLabel] = uid;
111 *idIt = newLabel; 138 *idIt = newLabel;
112 139
113 return TRUE; 140 return TRUE;
114} 141}
115 142
143/*! \internal
144 */
116bool CategoryGroup::rename( const QString &oldLabel, const QString &newLabel ) 145bool CategoryGroup::rename( const QString &oldLabel, const QString &newLabel )
117{ 146{
118 return rename( id(oldLabel), newLabel ); 147 return rename( id(oldLabel), newLabel );
119} 148}
120 149
150/*! Returns TRUE if \a uid is stored in this group, FALSE if not. */
121bool CategoryGroup::contains(int uid) const 151bool CategoryGroup::contains(int uid) const
122{ 152{
123 return ( mIdLabelMap.find( uid ) != mIdLabelMap.end() ); 153 return ( mIdLabelMap.find( uid ) != mIdLabelMap.end() );
124} 154}
125 155
156/*! Returns TRUE if \a label is stored in this group, FALSE if not. */
126bool CategoryGroup::contains(const QString &label) const 157bool CategoryGroup::contains(const QString &label) const
127{ 158{
128 return ( mLabelIdMap.find( label ) != mLabelIdMap.end() ); 159 return ( mLabelIdMap.find( label ) != mLabelIdMap.end() );
129} 160}
130 161
131/** Returns label associated with the uid or QString::null if 162/*! Returns label associated with the \a uid or QString::null if
132 * not found 163 not found
133 */ 164 */
134const QString &CategoryGroup::label(int uid) const 165const QString &CategoryGroup::label(int uid) const
135{ 166{
136 QMap<int,QString>::ConstIterator idIt = mIdLabelMap.find( uid ); 167 QMap<int,QString>::ConstIterator idIt = mIdLabelMap.find( uid );
137 if ( idIt == mIdLabelMap.end() ) 168 if ( idIt == mIdLabelMap.end() )
138 return QString::null; 169 return QString::null;
139 return *idIt; 170 return *idIt;
140} 171}
141 172
142/** Returns the uid associated with label or 0 if not found */ 173/*! Returns the uid associated with \a label or 0 if not found */
143int CategoryGroup::id(const QString &label) const 174int CategoryGroup::id(const QString &label) const
144{ 175{
145 QMap<QString,int>::ConstIterator labelIt = mLabelIdMap.find( label ); 176 QMap<QString,int>::ConstIterator labelIt = mLabelIdMap.find( label );
146 if ( labelIt == mLabelIdMap.end() ) 177 if ( labelIt == mLabelIdMap.end() )
147 return 0; 178 return 0;
148 return *labelIt; 179 return *labelIt;
149} 180}
150 181
182/*! Returns a list of all labels stored in this group. */
151QStringList CategoryGroup::labels() const 183QStringList CategoryGroup::labels() const
152{ 184{
153 QStringList labels; 185 QStringList labels;
154 for ( QMap<int, QString>::ConstIterator it = mIdLabelMap.begin(); 186 for ( QMap<int, QString>::ConstIterator it = mIdLabelMap.begin();
155 it != mIdLabelMap.end(); ++it ) 187 it != mIdLabelMap.end(); ++it )
156 labels += *it; 188 labels += *it;
157 // ### I don't think this is the place for this... 189 // ### I don't think this is the place for this...
158// labels.sort(); 190// labels.sort();
159 return labels; 191 return labels;
160} 192}
161 193
194/*! Returns a list of all labels associated with the \a catids */
162QStringList CategoryGroup::labels(const QArray<int> &catids ) const 195QStringList CategoryGroup::labels(const QArray<int> &catids ) const
163{ 196{
164 QStringList labels; 197 QStringList labels;
165 if ( catids.count() == 0 ) 198 if ( catids.count() == 0 )
166 return labels; 199 return labels;
167 for ( QMap<int, QString>::ConstIterator it = mIdLabelMap.begin(); 200 for ( QMap<int, QString>::ConstIterator it = mIdLabelMap.begin();
168 it != mIdLabelMap.end(); ++it ) 201 it != mIdLabelMap.end(); ++it )
169 if ( catids.find( it.key() ) != -1 ) 202 if ( catids.find( it.key() ) != -1 )
@@ -172,19 +205,59 @@ QStringList CategoryGroup::labels(const QArray<int> &catids ) const
172} 205}
173 206
174/*********************************************************** 207/***********************************************************
175 * 208 *
176 * Categories 209 * Categories
177 * 210 *
178 **********************************************************/ 211 **********************************************************/
179 212
180/** Add the category name as long as it doesn't already exist locally 213/*!
181 * or globally. Return TRUE if added, FALSE if conflicts. 214 \class Categories categories.h
182 */ 215 \brief The Categories class is a database that groups categories and maps ids to names.
216
217 The Categories class is the low level Categories accessor class. To
218 add a category menu and filter for your application, see CategoryMenu.
219
220 The Categories class allows the developer to add, remove, and rename
221 categories. Categories can be created for an individual application
222 such as Todo List or to be used for all applications. Categories
223 that can be used by all applications are called global
224 categories. Each PalmtopRecord subclass stores categories as an
225 QArray<int> using PalmtopRecord::setCategories() and
226 PalmtopRecord::categories(). This allows each record to be assigned
227 to multiple categories. This also allows the user to rename a
228 category and for it to update automatically in all records.
229
230 This class provides several methods to convert between a category id
231 and it's associated string such as id(), ids(), label() and labels(). A
232 helper class called CategoryGroup is used to access categories of a
233 single application group, such as Todo List. Global categories can
234 also be accessed via CategoryGroup objects. See appGroupMap() and
235 globalGroup() for the appropriate accessor methods.
236
237 Categories are stored in an xml file in the Settings directory
238 (Categories.xml). A global function called categoryFileName() will
239 return to appropriate QString file location to be passed to load()
240 and save() for the master categories database.
241
242 \ingroup qtopiaemb
243 \ingroup qtopiadesktop
244 \warning Categories API will likely change between Qtopia 1.5 and Qtopia 3
245 \sa CategoryGroup, CategoryMenu
246*/
247
248
249/*!
250 Add the category name as long as it doesn't already exist locally or
251 globally. The \a uid is assigned to the category if successfully
252 added. Return \a uid if added, 0 if conflicts (error).
253
254 \internal
255*/
183int Categories::addCategory( const QString &appname, 256int Categories::addCategory( const QString &appname,
184 const QString &catname, 257 const QString &catname,
185 int uid ) 258 int uid )
186{ 259{
187 if ( mGlobalCats.contains(catname) ) 260 if ( mGlobalCats.contains(catname) )
188 return 0; 261 return 0;
189 262
190 QMap< QString, CategoryGroup >::Iterator 263 QMap< QString, CategoryGroup >::Iterator
@@ -199,16 +272,21 @@ int Categories::addCategory( const QString &appname,
199 } 272 }
200 273
201 CategoryGroup &cats = *appIt; 274 CategoryGroup &cats = *appIt;
202 cats.add( uid, catname ); 275 cats.add( uid, catname );
203 emit categoryAdded( *this, appname, uid ); 276 emit categoryAdded( *this, appname, uid );
204 return uid; 277 return uid;
205} 278}
206 279
280/*!
281 Add the category name as long as it doesn't already exist locally or
282 globally. Return UID if added, 0 if conflicts (error).
283*/
284
207int Categories::addCategory( const QString &appname, 285int Categories::addCategory( const QString &appname,
208 const QString &catname ) 286 const QString &catname )
209{ 287{
210 if ( mGlobalCats.contains(catname) ) 288 if ( mGlobalCats.contains(catname) )
211 return 0; 289 return 0;
212 290
213 QMap< QString, CategoryGroup >::Iterator 291 QMap< QString, CategoryGroup >::Iterator
214 appIt = mAppCats.find( appname ); 292 appIt = mAppCats.find( appname );
@@ -224,36 +302,47 @@ int Categories::addCategory( const QString &appname,
224 CategoryGroup &cats = *appIt; 302 CategoryGroup &cats = *appIt;
225 int uid = cats.add( catname ); 303 int uid = cats.add( catname );
226 if ( !uid ) 304 if ( !uid )
227 return 0; 305 return 0;
228 emit categoryAdded( *this, appname, uid ); 306 emit categoryAdded( *this, appname, uid );
229 return uid; 307 return uid;
230} 308}
231 309
310/*!
311 \internal
312*/
232int Categories::addGlobalCategory( const QString &catname, int uid ) 313int Categories::addGlobalCategory( const QString &catname, int uid )
233{ 314{
234 mGlobalCats.add( uid, catname ); 315 mGlobalCats.add( uid, catname );
235 emit categoryAdded( *this, QString::null, uid ); 316 emit categoryAdded( *this, QString::null, uid );
236 return uid; 317 return uid;
237} 318}
238 319
320/*!
321 Add the global category \a catname while checking that it doesn't
322 already exist globally. Return UID if added, 0 if conflicts.
323
324 \sa addCategory()
325 */
239int Categories::addGlobalCategory( const QString &catname ) 326int Categories::addGlobalCategory( const QString &catname )
240{ 327{
241 int uid = mGlobalCats.add( catname ); 328 int uid = mGlobalCats.add( catname );
242 if ( !uid ) 329 if ( !uid )
243 return 0; 330 return 0;
244 emit categoryAdded( *this, QString::null, uid ); 331 emit categoryAdded( *this, QString::null, uid );
245 return uid; 332 return uid;
246} 333}
247 334
248/** Removes the category from the application; if it is not found 335/*!
249 * in the application, then it attempts to remove it from 336
250 * the global list 337 Removes the \a catname from the application group. If it is not
251 */ 338 found in the application group and \a checkGlobal is TRUE, then it
339 attempts to remove it from the global list
340*/
252bool Categories::removeCategory( const QString &appname, 341bool Categories::removeCategory( const QString &appname,
253 const QString &catname, 342 const QString &catname,
254 bool checkGlobal ) 343 bool checkGlobal )
255{ 344{
256 QMap< QString, CategoryGroup >::Iterator 345 QMap< QString, CategoryGroup >::Iterator
257 appIt = mAppCats.find( appname ); 346 appIt = mAppCats.find( appname );
258 if ( appIt != mAppCats.end() ) { 347 if ( appIt != mAppCats.end() ) {
259 CategoryGroup &cats = *appIt; 348 CategoryGroup &cats = *appIt;
@@ -263,65 +352,78 @@ bool Categories::removeCategory( const QString &appname,
263 return TRUE; 352 return TRUE;
264 } 353 }
265 } 354 }
266 if ( !checkGlobal ) 355 if ( !checkGlobal )
267 return FALSE; 356 return FALSE;
268 return removeGlobalCategory( catname ); 357 return removeGlobalCategory( catname );
269} 358}
270 359
360
361/*!
362 Removes the \a uid from the application group \a appname. Returns TRUE
363 if success, FALSE if not found.
364*/
271bool Categories::removeCategory( const QString &appname, int uid ) 365bool Categories::removeCategory( const QString &appname, int uid )
272{ 366{
273 QMap< QString, CategoryGroup >::Iterator 367 QMap< QString, CategoryGroup >::Iterator
274 appIt = mAppCats.find( appname ); 368 appIt = mAppCats.find( appname );
275 if ( appIt != mAppCats.end() ) { 369 if ( appIt != mAppCats.end() ) {
276 CategoryGroup &cats = *appIt; 370 CategoryGroup &cats = *appIt;
277 if ( cats.remove( uid ) ) { 371 if ( cats.remove( uid ) ) {
278 emit categoryRemoved( *this, appname, uid ); 372 emit categoryRemoved( *this, appname, uid );
279 return TRUE; 373 return TRUE;
280 } 374 }
281 } 375 }
282 return FALSE; 376 return FALSE;
283} 377}
284 378
379/*!
380 Removes the global category \a catname. Returns TRUE
381 if success, FALSE if not found.
382*/
285bool Categories::removeGlobalCategory( const QString &catname ) 383bool Categories::removeGlobalCategory( const QString &catname )
286{ 384{
287 int uid = mGlobalCats.id( catname ); 385 int uid = mGlobalCats.id( catname );
288 if ( mGlobalCats.remove( uid ) ) { 386 if ( mGlobalCats.remove( uid ) ) {
289 emit categoryRemoved( *this, QString::null, uid ); 387 emit categoryRemoved( *this, QString::null, uid );
290 return TRUE; 388 return TRUE;
291 } 389 }
292 return FALSE; 390 return FALSE;
293} 391}
294 392
295 393/*!
394 Removes the global category \a uid. Returns TRUE
395 if success, FALSE if not found.
396*/
296bool Categories::removeGlobalCategory( int uid ) 397bool Categories::removeGlobalCategory( int uid )
297{ 398{
298 if ( mGlobalCats.remove( uid ) ) { 399 if ( mGlobalCats.remove( uid ) ) {
299 emit categoryRemoved( *this, QString::null, uid ); 400 emit categoryRemoved( *this, QString::null, uid );
300 return TRUE; 401 return TRUE;
301 } 402 }
302 return FALSE; 403 return FALSE;
303} 404}
304 405
305/** Returns the sorted list of all categories that are associated with 406/*!
306 * the app. If includeGlobal parameter is TRUE then the returned 407 Returns the sorted list of all categories that are associated with
307 * categories will include the global category items. 408 the \a app. If \a includeGlobal is TRUE then the returned
409 categories will include the global category items.
308 */ 410 */
309QStringList Categories::labels( const QString &app, 411QStringList Categories::labels( const QString &app,
310 bool includeGlobal, 412 bool includeGlobal,
311 ExtraLabels extra ) const 413 ExtraLabels extra ) const
312{ 414{
313 QMap< QString, CategoryGroup >::ConstIterator 415 QMap< QString, CategoryGroup >::ConstIterator
314 appIt = mAppCats.find( app ); 416 appIt = mAppCats.find( app );
315 QStringList cats; 417 QStringList cats;
316 418
317 if ( appIt != mAppCats.end() ) 419 if ( appIt != mAppCats.end() )
318 cats += (*appIt).labels(); 420 cats += (*appIt).labels();
319 else qDebug("Categories::labels didn't find app %s", app.latin1() ); 421 //else qDebug("Categories::labels didn't find app %s", app.latin1() );
320 if ( includeGlobal ) 422 if ( includeGlobal )
321 cats += mGlobalCats.labels(); 423 cats += mGlobalCats.labels();
322 424
323 cats.sort(); 425 cats.sort();
324 switch ( extra ) { 426 switch ( extra ) {
325 case NoExtra: break; 427 case NoExtra: break;
326 case AllUnfiled: 428 case AllUnfiled:
327 cats.append( tr("All") ); 429 cats.append( tr("All") );
@@ -333,32 +435,41 @@ QStringList Categories::labels( const QString &app,
333 case UnfiledLabel: 435 case UnfiledLabel:
334 cats.append( tr("Unfiled") ); 436 cats.append( tr("Unfiled") );
335 break; 437 break;
336 } 438 }
337 439
338 return cats; 440 return cats;
339} 441}
340 442
443/*!
444 Returns the label associated with the id
445*/
341QString Categories::label( const QString &app, int id ) const 446QString Categories::label( const QString &app, int id ) const
342{ 447{
343 if ( mGlobalCats.contains( id ) ) 448 if ( mGlobalCats.contains( id ) )
344 return mGlobalCats.label( id ); 449 return mGlobalCats.label( id );
345 QMap< QString, CategoryGroup >::ConstIterator 450 QMap< QString, CategoryGroup >::ConstIterator
346 appIt = mAppCats.find( app ); 451 appIt = mAppCats.find( app );
347 if ( appIt == mAppCats.end() ) 452 if ( appIt == mAppCats.end() )
348 return QString::null; 453 return QString::null;
349 return (*appIt).label( id ); 454 return (*appIt).label( id );
350} 455}
351 456
352/** Returns a single string associated with the cat ids for display in 457/*!
353 * a combobox or any area that requires one string. If catids are empty 458 Returns a single string associated with \a catids for display in a
354 * then "Unfiled" will be returned. If multiple categories are assigned 459 combobox or any area that requires one string. If \a catids are empty
355 * the first cat id is shown with " (multi)" appended to the string. 460 then "Unfiled" will be returned. If multiple categories are
356 */ 461 assigned then the behavior depends on the DisplaySingle type.
462
463 If \a display is set to ShowMulti then " (multi)" appended to the
464 first string. If \a display is set to ShowAll, then a space
465 seperated string is returned with all categories. If ShowFirst is
466 set, the just the first string is returned.
467*/
357QString Categories::displaySingle( const QString &app, 468QString Categories::displaySingle( const QString &app,
358 const QArray<int> &catids, 469 const QArray<int> &catids,
359 DisplaySingle display ) const 470 DisplaySingle display ) const
360{ 471{
361 QStringList strs = labels( app, catids ); 472 QStringList strs = labels( app, catids );
362 if ( !strs.count() ) 473 if ( !strs.count() )
363 return tr("Unfiled"); 474 return tr("Unfiled");
364 strs.sort(); 475 strs.sort();
@@ -375,46 +486,61 @@ QString Categories::displaySingle( const QString &app,
375 r = strs.join(" "); 486 r = strs.join(" ");
376 break; 487 break;
377 } 488 }
378 } 489 }
379 else r = strs.first(); 490 else r = strs.first();
380 return r; 491 return r;
381} 492}
382 493
494/*!
495
496 Returns all ids associated with the application CategoryGroup \a app
497 and the passed in \a labels in that group.
498*/
383QArray<int> Categories::ids( const QString &app, const QStringList &labels) const 499QArray<int> Categories::ids( const QString &app, const QStringList &labels) const
384{ 500{
385 QArray<int> results; 501 QArray<int> results;
386 QStringList::ConstIterator it; 502 QStringList::ConstIterator it;
387 int i; 503 int i;
388 504
389 for ( i=0, it=labels.begin(); it!=labels.end(); i++, ++it ) { 505 for ( i=0, it=labels.begin(); it!=labels.end(); i++, ++it ) {
390 int value = id( app, *it ); 506 int value = id( app, *it );
391 if ( value != 0 ) { 507 if ( value != 0 ) {
392 int tmp = results.size(); 508 int tmp = results.size();
393 results.resize( tmp + 1 ); 509 results.resize( tmp + 1 );
394 results[ tmp ] = value; 510 results[ tmp ] = value;
395 } 511 }
396 } 512 }
397 return results; 513 return results;
398} 514}
399 515
516/*!
517 Returns the id associated with the app. If the id is not found in the
518 application CategoryGroup, then it searches the global CategoryGroup.
519 If it is not found it either, 0 is returned.
520*/
400int Categories::id( const QString &app, const QString &cat ) const 521int Categories::id( const QString &app, const QString &cat ) const
401{ 522{
402 if ( cat == tr("Unfiled") || cat.contains( tr(" (multi.)") ) ) 523 if ( cat == tr("Unfiled") || cat.contains( tr(" (multi.)") ) )
403 return 0; 524 return 0;
404 int uid = mGlobalCats.id( cat ); 525 int uid = mGlobalCats.id( cat );
405 if ( uid != 0 ) 526 if ( uid != 0 )
406 return uid; 527 return uid;
407 return mAppCats[app].id( cat ); 528 return mAppCats[app].id( cat );
408} 529}
409 530
410 531
411/** Return TRUE if renaming succeeded; FALSE if app name not found, 532/*!
412 * or if there was a name conflict 533 Return TRUE if renaming succeeded; FALSE if \a appname or \a oldName
534 is not found, or if \a newName conflicts with an existing category
535 in the CategoryGroup.
536
537 It will first search the CategoryGroup associated with \a appname
538 and if not found it will try to replace in global CategoryGroup.
413 */ 539 */
414bool Categories::renameCategory( const QString &appname, 540bool Categories::renameCategory( const QString &appname,
415 const QString &oldName, 541 const QString &oldName,
416 const QString &newName ) 542 const QString &newName )
417{ 543{
418 QMap< QString, CategoryGroup >::Iterator 544 QMap< QString, CategoryGroup >::Iterator
419 appIt = mAppCats.find( appname ); 545 appIt = mAppCats.find( appname );
420 546
@@ -424,27 +550,37 @@ bool Categories::renameCategory( const QString &appname,
424 if ( id != 0 && cats.rename( id, newName ) ) { 550 if ( id != 0 && cats.rename( id, newName ) ) {
425 emit categoryRenamed( *this, appname, id ); 551 emit categoryRenamed( *this, appname, id );
426 return TRUE; 552 return TRUE;
427 } 553 }
428 } 554 }
429 return renameGlobalCategory( oldName, newName ); 555 return renameGlobalCategory( oldName, newName );
430} 556}
431 557
558/*!
559 Return TRUE if renaming succeeded; FALSE if \a appname or \a oldName
560 is not found, or if \a newName conflicts with an existing category
561 in the CategoryGroup. This function will only rename categories found
562 in the global CategoryGroup.
563 */
432bool Categories::renameGlobalCategory( const QString &oldName, 564bool Categories::renameGlobalCategory( const QString &oldName,
433 const QString &newName ) 565 const QString &newName )
434{ 566{
435 int uid = mGlobalCats.id( oldName ); 567 int uid = mGlobalCats.id( oldName );
436 if ( uid != 0 && mGlobalCats.rename( uid, newName ) ) { 568 if ( uid != 0 && mGlobalCats.rename( uid, newName ) ) {
437 emit categoryRenamed( *this, QString::null, uid ); 569 emit categoryRenamed( *this, QString::null, uid );
438 return TRUE; 570 return TRUE;
439 } 571 }
440 return FALSE; 572 return FALSE;
441} 573}
442 574
575/*!
576 Changes the grouping of a category. If a category was global and \a global
577 is set to TRUE, then the \a catname will be moved to the \a appname group.
578*/
443void Categories::setGlobal( const QString &appname, 579void Categories::setGlobal( const QString &appname,
444 const QString &catname, 580 const QString &catname,
445 bool global ) 581 bool global )
446{ 582{
447 // if in global and should be in app; then move it 583 // if in global and should be in app; then move it
448 if ( mGlobalCats.contains( catname ) && !global ) { 584 if ( mGlobalCats.contains( catname ) && !global ) {
449 mGlobalCats.remove( catname ); 585 mGlobalCats.remove( catname );
450 addCategory( appname, catname ); 586 addCategory( appname, catname );
@@ -453,49 +589,63 @@ void Categories::setGlobal( const QString &appname,
453 589
454 // if in app and should be in global, then move it 590 // if in app and should be in global, then move it
455 if ( !global ) 591 if ( !global )
456 return; 592 return;
457 if ( removeCategory( appname, catname, FALSE ) ) 593 if ( removeCategory( appname, catname, FALSE ) )
458 addGlobalCategory( catname ); 594 addGlobalCategory( catname );
459} 595}
460 596
597/*!
598 Returns TRUE if the \a catname is in the global CategoryGroup, FALSE if not.
599*/
461bool Categories::isGlobal( const QString &catname ) const 600bool Categories::isGlobal( const QString &catname ) const
462{ 601{
463 return mGlobalCats.contains( catname ); 602 return mGlobalCats.contains( catname );
464} 603}
465 604
466 605
467/** Returns true if the catname is associated with any application 606/*!
607 Returns true if the \a catname is associated with any CategoryGroup,
608 including global.
468 */ 609 */
469bool Categories::exists( const QString &catname ) const 610bool Categories::exists( const QString &catname ) const
470{ 611{
471 if ( isGlobal(catname) ) 612 if ( isGlobal(catname) )
472 return TRUE; 613 return TRUE;
473 614
474 for ( QMap<QString, CategoryGroup>::ConstIterator appsIt = mAppCats.begin(); appsIt != mAppCats.end(); ++appsIt ) 615 for ( QMap<QString, CategoryGroup>::ConstIterator appsIt = mAppCats.begin(); appsIt != mAppCats.end(); ++appsIt )
475 if ( exists( appsIt.key(), catname ) ) 616 if ( exists( appsIt.key(), catname ) )
476 return TRUE; 617 return TRUE;
477 618
478 return FALSE; 619 return FALSE;
479} 620}
480 621
622/*!
623 Returns TRUE if the \a catname is associated with the \a appname
624 CategoryGroup, FALSE if not found.
625 */
481bool Categories::exists( const QString &appname, 626bool Categories::exists( const QString &appname,
482 const QString &catname) const 627 const QString &catname) const
483{ 628{
484 QMap< QString, CategoryGroup >::ConstIterator 629 QMap< QString, CategoryGroup >::ConstIterator
485 appIt = mAppCats.find( appname ); 630 appIt = mAppCats.find( appname );
486 631
487 if ( appIt == mAppCats.end() ) 632 if ( appIt == mAppCats.end() )
488 return FALSE; 633 return FALSE;
489 634
490 return (*appIt).contains( catname ); 635 return (*appIt).contains( catname );
491} 636}
492 637
638/*!
639 Saves the Categories database to the \a fname. See categoryFileName()
640 for the default file name string used for the shared category database.
493 641
642 Returns FALSE if there is error writing the file or TRUE on success.
643 */
494bool Categories::save( const QString &fname ) const 644bool Categories::save( const QString &fname ) const
495{ 645{
496 QString strNewFile = fname + ".new"; 646 QString strNewFile = fname + ".new";
497 QFile f( strNewFile ); 647 QFile f( strNewFile );
498 QString out; 648 QString out;
499 int total_written; 649 int total_written;
500 650
501 if ( !f.open( IO_WriteOnly|IO_Raw ) ) { 651 if ( !f.open( IO_WriteOnly|IO_Raw ) ) {
@@ -529,26 +679,35 @@ bool Categories::save( const QString &fname ) const
529 total_written = f.writeBlock( cstr.data(), cstr.length() ); 679 total_written = f.writeBlock( cstr.data(), cstr.length() );
530 if ( total_written != int(cstr.length()) ) { 680 if ( total_written != int(cstr.length()) ) {
531 f.close(); 681 f.close();
532 QFile::remove( strNewFile ); 682 QFile::remove( strNewFile );
533 return FALSE; 683 return FALSE;
534 } 684 }
535 f.close(); 685 f.close();
536 686
687#ifdef Q_OS_WIN32
688 QFile::remove( fname );
689#endif
537 if ( ::rename( strNewFile.latin1(), fname.latin1() ) < 0 ) { 690 if ( ::rename( strNewFile.latin1(), fname.latin1() ) < 0 ) {
538 qWarning( "problem renaming file %s to %s", 691 qWarning( "problem renaming file %s to %s",
539 strNewFile.latin1(), fname.latin1()); 692 strNewFile.latin1(), fname.latin1());
540 // remove the tmp file... 693 // remove the tmp file...
541 QFile::remove( strNewFile ); 694 QFile::remove( strNewFile );
542 } 695 }
543 696
544 return TRUE; 697 return TRUE;
545} 698}
546 699
700/*!
701 Loads the Categories database using \a fname. See categoryFileName()
702 for the default file name string used for the shared category database.
703
704 Returns FALSE if there is error reading the file or TRUE on success.
705 */
547bool Categories::load( const QString &fname ) 706bool Categories::load( const QString &fname )
548{ 707{
549 QFile file( fname ); 708 QFile file( fname );
550 if ( !file.open( IO_ReadOnly ) ) { 709 if ( !file.open( IO_ReadOnly ) ) {
551 qWarning("Unable to open %s", fname.latin1()); 710 qWarning("Unable to open %s", fname.latin1());
552 711
553 addGlobalCategory(tr("Business")); 712 addGlobalCategory(tr("Business"));
554 addGlobalCategory(tr("Personal")); 713 addGlobalCategory(tr("Personal"));
@@ -614,22 +773,29 @@ bool Categories::load( const QString &fname )
614 mGlobalCats.add( id.toInt(), name ); 773 mGlobalCats.add( id.toInt(), name );
615 else 774 else
616 mAppCats[ app ].add( id.toInt(), name ); 775 mAppCats[ app ].add( id.toInt(), name );
617 } 776 }
618 777
619 return TRUE; 778 return TRUE;
620} 779}
621 780
781/*!
782 Clear the categories in memory. Equivelent to creating an empty Categories
783 object.
784*/
622void Categories::clear() 785void Categories::clear()
623{ 786{
624 mGlobalCats.clear(); 787 mGlobalCats.clear();
625 mAppCats.clear(); 788 mAppCats.clear();
626} 789}
627 790
791/*!
792 Dump the contents to standard out. Used for debugging only.
793*/
628void Categories::dump() const 794void Categories::dump() const
629{ 795{
630 qDebug("\tglobal categories = %s", mGlobalCats.labels().join(", ").latin1() ); 796 qDebug("\tglobal categories = %s", mGlobalCats.labels().join(", ").latin1() );
631 for ( QMap<QString, CategoryGroup>::ConstIterator appsIt = mAppCats.begin(); appsIt != mAppCats.end(); ++appsIt ) { 797 for ( QMap<QString, CategoryGroup>::ConstIterator appsIt = mAppCats.begin(); appsIt != mAppCats.end(); ++appsIt ) {
632 const QString &app = appsIt.key(); 798 const QString &app = appsIt.key();
633 QStringList appcats = (*appsIt).labels(); 799 QStringList appcats = (*appsIt).labels();
634 qDebug("\tapp = %s\tcategories = %s", app.latin1(), 800 qDebug("\tapp = %s\tcategories = %s", app.latin1(),
635 appcats.join(", ").latin1() ); 801 appcats.join(", ").latin1() );
@@ -670,8 +836,101 @@ void CheckedListView::setChecked( const QStringList &checked )
670 if ( !showingChecked ) { 836 if ( !showingChecked ) {
671 ensureItemVisible( i ); 837 ensureItemVisible( i );
672 showingChecked = TRUE; 838 showingChecked = TRUE;
673 } 839 }
674 } 840 }
675 else 841 else
676 i->setOn( FALSE ); 842 i->setOn( FALSE );
677} 843}
844
845/*! \fn Categories &Categories::operator= ( const Categories &c )
846
847 Performs deep copy.
848 */
849
850
851/*! \fn QStringList Categories::labels( const QString & app, const QArray<int> &catids ) const
852
853 Returns list of labels associated with the application and catids
854*/
855
856/*! \fn QStringList Categories::globalCategories() const
857
858 Returns list of all global category labels
859*/
860
861/*! \fn const QMap<QString, CategoryGroup> &Categories::appGroupMap() const
862
863 Returns a map of application names to CategoryGroup. The CategoryGroup
864 class defines a map of ids to category labels and category labels to ids.
865*/
866
867/*! \fn const CategoryGroup &Categories::globalGroup() const
868
869 Returns the global CategoryGroup. The CategoryGroup
870 class defines a map of ids to category labels and category labels to ids.
871*/
872
873/*! \fn void Categories::categoryAdded( const Categories &cats, const QString &appname, int uid)
874
875 Emitted if a category is added.
876
877 \a cats is a const reference to this object
878 \a appname is the CategoryGroup application name that the category was added to or QString::null if it was global
879 \a uid is the unique identifier associated with the added category
880 */
881
882/*! \fn void Categories::categoryRemoved( const Categories &cats, const QString &appname,
883 int uid)
884
885 Emitted if removed category is removed.
886
887 \a cats is a const reference to this object
888 \a appname is the CategoryGroup application name that the category was removed from or QString::null if it was the global CategoryGroup
889 \a uid is the unique identifier associated with the removed category
890*/
891
892
893/*! \fn void Categories::categoryRenamed( const Categories &cats, const QString &appname,
894 int uid)
895
896 Emitted if \a uid in the \a appname CategoryGroup is renamed in \a cats
897 object.
898
899 \a cats is a const reference to this object
900 \a appname is the CategoryGroup application name that the category was renamed in or QString::null if it was the global CategoryGroup
901 \a uid is the unique identifier associated with the renamed category
902*/
903
904/*! \fn Categories::Categories( QObject *parent=0, const char *name = 0 )
905
906 Constructor for an empty Categories object.
907*/
908
909/*! \fn Categories::Categories( const Categories &copyFrom )
910
911 Deep copy constructor
912*/
913
914/*! \fn Categories::~Categories()
915
916 Empty destructor. Call save() before destruction if there are changes
917 that need to be saved.
918*/
919
920/*! \fn CategoryGroup::clear()
921 \internal
922*/
923
924/*! \fn const QMap<int, QString> &CategoryGroup::idMap() const
925
926 Returns a const reference to the id to label QMap
927*/
928
929/*! \fn CategoryGroup::CategoryGroup()
930 \internal
931*/
932
933/*! \fn CategoryGroup::CategoryGroup(const CategoryGroup &c)
934 \internal
935*/
936
diff --git a/library/backend/contact.cpp b/library/backend/contact.cpp
index b10b19a..3f4934a 100644
--- a/library/backend/contact.cpp
+++ b/library/backend/contact.cpp
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2001 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -29,49 +29,427 @@
29 29
30#include <qobject.h> 30#include <qobject.h>
31#include <qregexp.h> 31#include <qregexp.h>
32#include <qstylesheet.h> 32#include <qstylesheet.h>
33#include <qfileinfo.h> 33#include <qfileinfo.h>
34 34
35#include <stdio.h> 35#include <stdio.h>
36 36
37/*!
38 \class Contact contact.h
39 \brief The Contact class holds the data of an address book entry.
40
41 This data includes information the name of the person, contact
42 information, and business information such as deparment and job title.
43
44 \ingroup qtopiaemb
45 \ingroup qtopiadesktop
46*/
47
37Qtopia::UidGen Contact::sUidGen( Qtopia::UidGen::Qtopia ); 48Qtopia::UidGen Contact::sUidGen( Qtopia::UidGen::Qtopia );
38 49
50/*!
51 Creates a new, empty contact.
52*/
39Contact::Contact() 53Contact::Contact()
40 : Record(), mMap(), d( 0 ) 54 : Record(), mMap(), d( 0 )
41{ 55{
42} 56}
43 57
58/*!
59 \internal
60 Creates a new contact. The properties of the contact are
61 set from \a fromMap.
62*/
44Contact::Contact( const QMap<int, QString> &fromMap ) : 63Contact::Contact( const QMap<int, QString> &fromMap ) :
45 Record(), mMap( fromMap ), d( 0 ) 64 Record(), mMap( fromMap ), d( 0 )
46{ 65{
47 QString cats = mMap[ Qtopia::AddressCategory ]; 66 QString cats = mMap[ Qtopia::AddressCategory ];
48 if ( !cats.isEmpty() ) 67 if ( !cats.isEmpty() )
49 setCategories( idsFromString( cats ) ); 68 setCategories( idsFromString( cats ) );
50 QString uidStr = find( Qtopia::AddressUid ); 69 QString uidStr = find( Qtopia::AddressUid );
70
51 if ( uidStr.isEmpty() ) 71 if ( uidStr.isEmpty() )
52 setUid( uidGen().generate() ); 72 setUid( uidGen().generate() );
53 else 73 else
54 setUid( uidStr.toInt() ); 74 setUid( uidStr.toInt() );
75
76 if ( !uidStr.isEmpty() )
77 setUid( uidStr.toInt() );
55} 78}
56 79
80/*!
81 Destroys a contact.
82*/
57Contact::~Contact() 83Contact::~Contact()
58{ 84{
59} 85}
60 86
87/*! \fn void Contact::setTitle( const QString &str )
88 Sets the title of the contact to \a str.
89*/
90
91/*! \fn void Contact::setFirstName( const QString &str )
92 Sets the first name of the contact to \a str.
93*/
94
95/*! \fn void Contact::setMiddleName( const QString &str )
96 Sets the middle name of the contact to \a str.
97*/
98
99/*! \fn void Contact::setLastName( const QString &str )
100 Sets the last name of the contact to \a str.
101*/
102
103/*! \fn void Contact::setSuffix( const QString &str )
104 Sets the suffix of the contact to \a str.
105*/
106
107/*! \fn void Contact::setFileAs( const QString &str )
108 Sets the contact to filed as \a str.
109*/
110
111/*! \fn void Contact::setDefaultEmail( const QString &str )
112 Sets the default email of the contact to \a str.
113*/
114
115/*! \fn void Contact::setHomeStreet( const QString &str )
116 Sets the home street address of the contact to \a str.
117*/
118
119/*! \fn void Contact::setHomeCity( const QString &str )
120 Sets the home city of the contact to \a str.
121*/
122
123/*! \fn void Contact::setHomeState( const QString &str )
124 Sets the home state of the contact to \a str.
125*/
126
127/*! \fn void Contact::setHomeZip( const QString &str )
128 Sets the home zip code of the contact to \a str.
129*/
130
131/*! \fn void Contact::setHomeCountry( const QString &str )
132 Sets the home country of the contact to \a str.
133*/
134
135/*! \fn void Contact::setHomePhone( const QString &str )
136 Sets the home phone number of the contact to \a str.
137*/
138
139/*! \fn void Contact::setHomeFax( const QString &str )
140 Sets the home fax number of the contact to \a str.
141*/
142
143/*! \fn void Contact::setHomeMobile( const QString &str )
144 Sets the home mobile phone number of the contact to \a str.
145*/
146
147/*! \fn void Contact::setHomeWebpage( const QString &str )
148 Sets the home webpage of the contact to \a str.
149*/
150
151/*! \fn void Contact::setCompany( const QString &str )
152 Sets the company for contact to \a str.
153*/
154
155/*! \fn void Contact::setJobTitle( const QString &str )
156 Sets the job title of the contact to \a str.
157*/
158
159/*! \fn void Contact::setDepartment( const QString &str )
160 Sets the department for contact to \a str.
161*/
162
163/*! \fn void Contact::setOffice( const QString &str )
164 Sets the office for contact to \a str.
165*/
166
167/*! \fn void Contact::setBusinessStreet( const QString &str )
168 Sets the business street address of the contact to \a str.
169*/
170
171/*! \fn void Contact::setBusinessCity( const QString &str )
172 Sets the business city of the contact to \a str.
173*/
174
175/*! \fn void Contact::setBusinessState( const QString &str )
176 Sets the business state of the contact to \a str.
177*/
178
179/*! \fn void Contact::setBusinessZip( const QString &str )
180 Sets the business zip code of the contact to \a str.
181*/
182
183/*! \fn void Contact::setBusinessCountry( const QString &str )
184 Sets the business country of the contact to \a str.
185*/
186
187/*! \fn void Contact::setBusinessPhone( const QString &str )
188 Sets the business phone number of the contact to \a str.
189*/
190
191/*! \fn void Contact::setBusinessFax( const QString &str )
192 Sets the business fax number of the contact to \a str.
193*/
194
195/*! \fn void Contact::setBusinessMobile( const QString &str )
196 Sets the business mobile phone number of the contact to \a str.
197*/
198
199/*! \fn void Contact::setBusinessPager( const QString &str )
200 Sets the business pager number of the contact to \a str.
201*/
202
203/*! \fn void Contact::setBusinessWebpage( const QString &str )
204 Sets the business webpage of the contact to \a str.
205*/
206
207/*! \fn void Contact::setProfession( const QString &str )
208 Sets the profession of the contact to \a str.
209*/
210
211/*! \fn void Contact::setAssistant( const QString &str )
212 Sets the assistant of the contact to \a str.
213*/
214
215/*! \fn void Contact::setManager( const QString &str )
216 Sets the manager of the contact to \a str.
217*/
218
219/*! \fn void Contact::setSpouse( const QString &str )
220 Sets the spouse of the contact to \a str.
221*/
222
223/*! \fn void Contact::setGender( const QString &str )
224 Sets the gender of the contact to \a str.
225*/
226
227/*! \fn void Contact::setBirthday( const QString &str )
228 Sets the birthday for the contact to \a str.
229*/
230
231/*! \fn void Contact::setAnniversary( const QString &str )
232 Sets the anniversary of the contact to \a str.
233*/
234
235/*! \fn void Contact::setNickname( const QString &str )
236 Sets the nickname of the contact to \a str.
237*/
238
239/*! \fn void Contact::setNotes( const QString &str )
240 Sets the notes about the contact to \a str.
241*/
242
243/*! \fn QString Contact::title() const
244 Returns the title of the contact.
245*/
246
247/*! \fn QString Contact::firstName() const
248 Returns the first name of the contact.
249*/
250
251/*! \fn QString Contact::middleName() const
252 Returns the middle name of the contact.
253*/
254
255/*! \fn QString Contact::lastName() const
256 Returns the last name of the contact.
257*/
258
259/*! \fn QString Contact::suffix() const
260 Returns the suffix of the contact.
261*/
262
263/*! \fn QString Contact::fileAs() const
264 Returns the string the contact is filed as.
265*/
266
267/*! \fn QString Contact::defaultEmail() const
268 Returns the default email address of the contact.
269*/
270
271/*! \fn QString Contact::emails() const
272 Returns the list of email address for a contact separated by ';'s in a single
273 string.
274*/
275
276/*! \fn QString Contact::homeStreet() const
277 Returns the home street address of the contact.
278*/
279
280/*! \fn QString Contact::homeCity() const
281 Returns the home city of the contact.
282*/
283
284/*! \fn QString Contact::homeState() const
285 Returns the home state of the contact.
286*/
287
288/*! \fn QString Contact::homeZip() const
289 Returns the home zip of the contact.
290*/
291
292/*! \fn QString Contact::homeCountry() const
293 Returns the home country of the contact.
294*/
295
296/*! \fn QString Contact::homePhone() const
297 Returns the home phone number of the contact.
298*/
299
300/*! \fn QString Contact::homeFax() const
301 Returns the home fax number of the contact.
302*/
303
304/*! \fn QString Contact::homeMobile() const
305 Returns the home mobile number of the contact.
306*/
307
308/*! \fn QString Contact::homeWebpage() const
309 Returns the home webpage of the contact.
310*/
311
312/*! \fn QString Contact::company() const
313 Returns the company for the contact.
314*/
315
316/*! \fn QString Contact::department() const
317 Returns the department for the contact.
318*/
319
320/*! \fn QString Contact::office() const
321 Returns the office for the contact.
322*/
323
324/*! \fn QString Contact::jobTitle() const
325 Returns the job title of the contact.
326*/
327
328/*! \fn QString Contact::profession() const
329 Returns the profession of the contact.
330*/
331
332/*! \fn QString Contact::assistant() const
333 Returns the assistant of the contact.
334*/
335
336/*! \fn QString Contact::manager() const
337 Returns the manager of the contact.
338*/
339
340/*! \fn QString Contact::businessStreet() const
341 Returns the business street address of the contact.
342*/
343
344/*! \fn QString Contact::businessCity() const
345 Returns the business city of the contact.
346*/
347
348/*! \fn QString Contact::businessState() const
349 Returns the business state of the contact.
350*/
351
352/*! \fn QString Contact::businessZip() const
353 Returns the business zip of the contact.
354*/
355
356/*! \fn QString Contact::businessCountry() const
357 Returns the business country of the contact.
358*/
359
360/*! \fn QString Contact::businessPhone() const
361 Returns the business phone number of the contact.
362*/
363
364/*! \fn QString Contact::businessFax() const
365 Returns the business fax number of the contact.
366*/
367
368/*! \fn QString Contact::businessMobile() const
369 Returns the business mobile number of the contact.
370*/
371
372/*! \fn QString Contact::businessPager() const
373 Returns the business pager number of the contact.
374*/
375
376/*! \fn QString Contact::businessWebpage() const
377 Returns the business webpage of the contact.
378*/
379
380/*! \fn QString Contact::spouse() const
381 Returns the spouse of the contact.
382*/
383
384/*! \fn QString Contact::gender() const
385 Returns the gender of the contact.
386*/
387
388/*! \fn QString Contact::birthday() const
389 Returns the birthday of the contact.
390*/
391
392/*! \fn QString Contact::anniversary() const
393 Returns the anniversary of the contact.
394*/
395
396/*! \fn QString Contact::nickname() const
397 Returns the nickname of the contact.
398*/
399
400/*! \fn QString Contact::children() const
401 Returns the children of the contact.
402*/
403
404/*! \fn QString Contact::notes() const
405 Returns the notes relating to the the contact.
406*/
407
408/*! \fn QString Contact::groups() const
409 \internal
410 Returns the groups for the contact.
411*/
412
413/*! \fn QStringList Contact::groupList() const
414 \internal
415*/
416
417/*! \fn QString Contact::field(int) const
418 \internal
419*/
420
421/*! \fn void Contact::saveJournal( journal_action, const QString & = QString::null )
422 \internal
423*/
424
425/*! \fn void Contact::setUid( int id )
426 \internal
427 Sets the uid for this record to \a id.
428*/
429
430/*! \enum Contact::journal_action
431 \internal
432*/
433
434/*!
435 \internal
436*/
61QMap<int, QString> Contact::toMap() const 437QMap<int, QString> Contact::toMap() const
62{ 438{
63 QMap<int, QString> map = mMap; 439 QMap<int, QString> map = mMap;
64 map.insert( Qtopia::AddressCategory, idsToString( categories() )); 440 QString cats = idsToString( categories() );
441 if ( !cats.isEmpty() )
442 map.insert( Qtopia::AddressCategory, cats );
65 return map; 443 return map;
66} 444}
67 445
68/*! 446/*!
69 Returns a rich text formatted QString of the Contact. 447 Returns a rich text formatted QString representing the contents the contact.
70*/ 448*/
71QString Contact::toRichText() const 449QString Contact::toRichText() const
72{ 450{
73 QString text; 451 QString text;
74 QString value, comp, state; 452 QString value, comp, state;
75 453
76 // name, jobtitle and company 454 // name, jobtitle and company
77 if ( !(value = fullName()).isEmpty() ) 455 if ( !(value = fullName()).isEmpty() )
@@ -226,39 +604,51 @@ QString Contact::toRichText() const
226 //QString tmp = Qtopia::escapeString(value); 604 //QString tmp = Qtopia::escapeString(value);
227 QString tmp = QStyleSheet::convertFromPlainText(value); 605 QString tmp = QStyleSheet::convertFromPlainText(value);
228 //tmp.replace( reg, "<br>" ); 606 //tmp.replace( reg, "<br>" );
229 text += "<br>" + tmp + "<br>"; 607 text += "<br>" + tmp + "<br>";
230 } 608 }
231 return text; 609 return text;
232} 610}
233 611
612/*!
613 \internal
614*/
234void Contact::insert( int key, const QString &v ) 615void Contact::insert( int key, const QString &v )
235{ 616{
236 QString value = v.stripWhiteSpace(); 617 QString value = v.stripWhiteSpace();
237 if ( value.isEmpty() ) 618 if ( value.isEmpty() )
238 mMap.remove( key ); 619 mMap.remove( key );
239 else 620 else
240 mMap.insert( key, value ); 621 mMap.insert( key, value );
241} 622}
242 623
624/*!
625 \internal
626*/
243void Contact::replace( int key, const QString & v ) 627void Contact::replace( int key, const QString & v )
244{ 628{
245 QString value = v.stripWhiteSpace(); 629 QString value = v.stripWhiteSpace();
246 if ( value.isEmpty() ) 630 if ( value.isEmpty() )
247 mMap.remove( key ); 631 mMap.remove( key );
248 else 632 else
249 mMap.replace( key, value ); 633 mMap.replace( key, value );
250} 634}
251 635
636/*!
637 \internal
638*/
252QString Contact::find( int key ) const 639QString Contact::find( int key ) const
253{ 640{
254 return mMap[key]; 641 return mMap[key];
255} 642}
256 643
644/*!
645 \internal
646*/
257QString Contact::displayAddress( const QString &street, 647QString Contact::displayAddress( const QString &street,
258 const QString &city, 648 const QString &city,
259 const QString &state, 649 const QString &state,
260 const QString &zip, 650 const QString &zip,
261 const QString &country ) const 651 const QString &country ) const
262{ 652{
263 QString s = street; 653 QString s = street;
264 if ( !street.isEmpty() ) 654 if ( !street.isEmpty() )
@@ -271,30 +661,39 @@ QString Contact::displayAddress( const QString &street,
271 s += " "; 661 s += " ";
272 s += zip; 662 s += zip;
273 if ( !country.isEmpty() && !s.isEmpty() ) 663 if ( !country.isEmpty() && !s.isEmpty() )
274 s += "\n"; 664 s += "\n";
275 s += country; 665 s += country;
276 return s; 666 return s;
277} 667}
278 668
669/*!
670 \internal
671*/
279QString Contact::displayBusinessAddress() const 672QString Contact::displayBusinessAddress() const
280{ 673{
281 return displayAddress( businessStreet(), businessCity(), 674 return displayAddress( businessStreet(), businessCity(),
282 businessState(), businessZip(), 675 businessState(), businessZip(),
283 businessCountry() ); 676 businessCountry() );
284} 677}
285 678
679/*!
680 \internal
681*/
286QString Contact::displayHomeAddress() const 682QString Contact::displayHomeAddress() const
287{ 683{
288 return displayAddress( homeStreet(), homeCity(), 684 return displayAddress( homeStreet(), homeCity(),
289 homeState(), homeZip(), 685 homeState(), homeZip(),
290 homeCountry() ); 686 homeCountry() );
291} 687}
292 688
689/*!
690 Returns the full name of the contact
691*/
293QString Contact::fullName() const 692QString Contact::fullName() const
294{ 693{
295 QString title = find( Qtopia::Title ); 694 QString title = find( Qtopia::Title );
296 QString firstName = find( Qtopia::FirstName ); 695 QString firstName = find( Qtopia::FirstName );
297 QString middleName = find( Qtopia::MiddleName ); 696 QString middleName = find( Qtopia::MiddleName );
298 QString lastName = find( Qtopia::LastName ); 697 QString lastName = find( Qtopia::LastName );
299 QString suffix = find( Qtopia::Suffix ); 698 QString suffix = find( Qtopia::Suffix );
300 699
@@ -317,26 +716,72 @@ QString Contact::fullName() const
317 if ( !suffix.isEmpty() ) { 716 if ( !suffix.isEmpty() ) {
318 if ( !name.isEmpty() ) 717 if ( !name.isEmpty() )
319 name += " "; 718 name += " ";
320 name += suffix; 719 name += suffix;
321 } 720 }
322 return name.simplifyWhiteSpace(); 721 return name.simplifyWhiteSpace();
323} 722}
324 723
724/*!
725 Returns a list of the names of the children of the contact.
726*/
325QStringList Contact::childrenList() const 727QStringList Contact::childrenList() const
326{ 728{
327 return QStringList::split( " ", find( Qtopia::Children ) ); 729 return QStringList::split( " ", find( Qtopia::Children ) );
328} 730}
329 731
732/*! \fn void Contact::insertEmail( const QString &email )
733
734 Insert \a email into the email list. Ensures \a email can only be added
735 once. If there is no default email address set, it sets it to the \a email.
736*/
737
738/*! \fn void Contact::removeEmail( const QString &email )
739
740 Removes the \a email from the email list. If the default email was \a email,
741 then the default email address is assigned to the first email in the
742 email list
743*/
744
745/*! \fn void Contact::clearEmails()
746
747 Clears the email list.
748 */
749
750/*! \fn void Contact::insertEmails( const QStringList &emailList )
751
752 Appends the \a emailList to the exiting email list
753 */
754
755/*!
756 Returns a list of email addresses belonging to the contact, including
757 the default email address.
758*/
330QStringList Contact::emailList() const 759QStringList Contact::emailList() const
331{ 760{
332 return QStringList::split( ";", find( Qtopia::Emails ) ); 761 QString emailStr = emails();
762
763 QStringList r;
764 if ( !emailStr.isEmpty() ) {
765 qDebug(" emailstr ");
766 QStringList l = QStringList::split( emailSeparator(), emailStr );
767 for ( QStringList::ConstIterator it = l.begin();it != l.end();++it )
768 r += (*it).simplifyWhiteSpace();
769 }
770
771 return r;
333} 772}
334 773
774/*!
775 \overload
776
777 Generates the string for the contact to be filed as from the first,
778 middle and last name of the contact.
779*/
335void Contact::setFileAs() 780void Contact::setFileAs()
336{ 781{
337 QString lastName, firstName, middleName, fileas; 782 QString lastName, firstName, middleName, fileas;
338 783
339 lastName = find( Qtopia::LastName ); 784 lastName = find( Qtopia::LastName );
340 firstName = find( Qtopia::FirstName ); 785 firstName = find( Qtopia::FirstName );
341 middleName = find( Qtopia::MiddleName ); 786 middleName = find( Qtopia::MiddleName );
342 if ( !lastName.isEmpty() && !firstName.isEmpty() 787 if ( !lastName.isEmpty() && !firstName.isEmpty()
@@ -348,16 +793,20 @@ void Contact::setFileAs()
348 !middleName.isEmpty() ) 793 !middleName.isEmpty() )
349 fileas = firstName + ( firstName.isEmpty() ? "" : " " ) 794 fileas = firstName + ( firstName.isEmpty() ? "" : " " )
350 + middleName + ( middleName.isEmpty() ? "" : " " ) 795 + middleName + ( middleName.isEmpty() ? "" : " " )
351 + lastName; 796 + lastName;
352 797
353 replace( Qtopia::FileAs, fileas ); 798 replace( Qtopia::FileAs, fileas );
354} 799}
355 800
801/*!
802 \internal
803 Appends the contact information to \a buf.
804*/
356void Contact::save( QString &buf ) const 805void Contact::save( QString &buf ) const
357{ 806{
358 static const QStringList SLFIELDS = fields(); 807 static const QStringList SLFIELDS = fields();
359 // I'm expecting "<Contact " in front of this... 808 // I'm expecting "<Contact " in front of this...
360 for ( QMap<int, QString>::ConstIterator it = mMap.begin(); 809 for ( QMap<int, QString>::ConstIterator it = mMap.begin();
361 it != mMap.end(); ++it ) { 810 it != mMap.end(); ++it ) {
362 const QString &value = it.data(); 811 const QString &value = it.data();
363 int key = it.key(); 812 int key = it.key();
@@ -372,16 +821,20 @@ void Contact::save( QString &buf ) const
372 } 821 }
373 buf += customToXml(); 822 buf += customToXml();
374 if ( categories().count() > 0 ) 823 if ( categories().count() > 0 )
375 buf += "Categories=\"" + idsToString( categories() ) + "\" "; 824 buf += "Categories=\"" + idsToString( categories() ) + "\" ";
376 buf += "Uid=\"" + QString::number( uid() ) + "\" "; 825 buf += "Uid=\"" + QString::number( uid() ) + "\" ";
377 // You need to close this yourself 826 // You need to close this yourself
378} 827}
379 828
829/*!
830 \internal
831 Returns the list of fields belonging to a contact
832*/
380QStringList Contact::fields() 833QStringList Contact::fields()
381{ 834{
382 QStringList list; 835 QStringList list;
383 836
384 list.append( "Title" ); // Not Used! 837 list.append( "Title" ); // Not Used!
385 list.append( "FirstName" ); 838 list.append( "FirstName" );
386 list.append( "MiddleName" ); 839 list.append( "MiddleName" );
387 list.append( "LastName" ); 840 list.append( "LastName" );
@@ -430,16 +883,20 @@ QStringList Contact::fields()
430 list.append( "Children" ); 883 list.append( "Children" );
431 884
432 list.append( "Notes" ); 885 list.append( "Notes" );
433 list.append( "Groups" ); 886 list.append( "Groups" );
434 887
435 return list; 888 return list;
436} 889}
437 890
891/*!
892 \internal
893 Returns a translated list of field names for a contact.
894*/
438QStringList Contact::trfields() 895QStringList Contact::trfields()
439{ 896{
440 QStringList list; 897 QStringList list;
441 898
442 list.append( QObject::tr( "Name Title") ); 899 list.append( QObject::tr( "Name Title") );
443 list.append( QObject::tr( "First Name" ) ); 900 list.append( QObject::tr( "First Name" ) );
444 list.append( QObject::tr( "Middle Name" ) ); 901 list.append( QObject::tr( "Middle Name" ) );
445 list.append( QObject::tr( "Last Name" ) ); 902 list.append( QObject::tr( "Last Name" ) );
@@ -488,45 +945,61 @@ QStringList Contact::trfields()
488 list.append( QObject::tr( "Children" ) ); 945 list.append( QObject::tr( "Children" ) );
489 946
490 list.append( QObject::tr( "Notes" ) ); 947 list.append( QObject::tr( "Notes" ) );
491 list.append( QObject::tr( "Groups" ) ); 948 list.append( QObject::tr( "Groups" ) );
492 949
493 return list; 950 return list;
494} 951}
495 952
496void Contact::setEmails( const QString &v ) 953/*!
954 Sets the list of email address for contact to those contained in \a str.
955 Email address should be separated by ';'s.
956*/
957void Contact::setEmails( const QString &str )
497{ 958{
498 replace( Qtopia::Emails, v ); 959 replace( Qtopia::Emails, str );
499 if ( v.isEmpty() ) 960 if ( str.isEmpty() )
500 setDefaultEmail( QString::null ); 961 setDefaultEmail( QString::null );
501} 962}
502 963
503void Contact::setChildren( const QString &v ) 964/*!
965 Sets the list of children for the contact to those contained in \a str.
966*/
967void Contact::setChildren( const QString &str )
504{ 968{
505 replace( Qtopia::Children, v ); 969 replace( Qtopia::Children, str );
506} 970}
507 971
508// vcard conversion code 972// vcard conversion code
973/*!
974 \internal
975*/
509static inline VObject *safeAddPropValue( VObject *o, const char *prop, const QString &value ) 976static inline VObject *safeAddPropValue( VObject *o, const char *prop, const QString &value )
510{ 977{
511 VObject *ret = 0; 978 VObject *ret = 0;
512 if ( o && !value.isEmpty() ) 979 if ( o && !value.isEmpty() )
513 ret = addPropValue( o, prop, value.latin1() ); 980 ret = addPropValue( o, prop, value.latin1() );
514 return ret; 981 return ret;
515} 982}
516 983
984/*!
985 \internal
986*/
517static inline VObject *safeAddProp( VObject *o, const char *prop) 987static inline VObject *safeAddProp( VObject *o, const char *prop)
518{ 988{
519 VObject *ret = 0; 989 VObject *ret = 0;
520 if ( o ) 990 if ( o )
521 ret = addProp( o, prop ); 991 ret = addProp( o, prop );
522 return ret; 992 return ret;
523} 993}
524 994
995/*!
996 \internal
997*/
525static VObject *createVObject( const Contact &c ) 998static VObject *createVObject( const Contact &c )
526{ 999{
527 VObject *vcard = newVObject( VCCardProp ); 1000 VObject *vcard = newVObject( VCCardProp );
528 safeAddPropValue( vcard, VCVersionProp, "2.1" ); 1001 safeAddPropValue( vcard, VCVersionProp, "2.1" );
529 safeAddPropValue( vcard, VCLastRevisedProp, TimeConversion::toISO8601( QDateTime::currentDateTime() ) ); 1002 safeAddPropValue( vcard, VCLastRevisedProp, TimeConversion::toISO8601( QDateTime::currentDateTime() ) );
530 safeAddPropValue( vcard, VCUniqueStringProp, QString::number(c.uid()) ); 1003 safeAddPropValue( vcard, VCUniqueStringProp, QString::number(c.uid()) );
531 1004
532 // full name 1005 // full name
@@ -617,22 +1090,23 @@ static VObject *createVObject( const Contact &c )
617 safeAddPropValue( vcard, "X-Qtopia-Anniversary", c.anniversary() ); 1090 safeAddPropValue( vcard, "X-Qtopia-Anniversary", c.anniversary() );
618 safeAddPropValue( vcard, "X-Qtopia-Nickname", c.nickname() ); 1091 safeAddPropValue( vcard, "X-Qtopia-Nickname", c.nickname() );
619 safeAddPropValue( vcard, "X-Qtopia-Children", c.children() ); 1092 safeAddPropValue( vcard, "X-Qtopia-Children", c.children() );
620 1093
621 return vcard; 1094 return vcard;
622} 1095}
623 1096
624 1097
1098/*!
1099 \internal
1100*/
625static Contact parseVObject( VObject *obj ) 1101static Contact parseVObject( VObject *obj )
626{ 1102{
627 Contact c; 1103 Contact c;
628 1104
629 bool haveDefaultEmail = FALSE;
630
631 VObjectIterator it; 1105 VObjectIterator it;
632 initPropIterator( &it, obj ); 1106 initPropIterator( &it, obj );
633 while( moreIteration( &it ) ) { 1107 while( moreIteration( &it ) ) {
634 VObject *o = nextVObject( &it ); 1108 VObject *o = nextVObject( &it );
635 QCString name = vObjectName( o ); 1109 QCString name = vObjectName( o );
636 QCString value = vObjectStringZValue( o ); 1110 QCString value = vObjectStringZValue( o );
637 if ( name == VCNameProp ) { 1111 if ( name == VCNameProp ) {
638 VObjectIterator nit; 1112 VObjectIterator nit;
@@ -762,24 +1236,17 @@ static Contact parseVObject( VObject *obj )
762 QCString name = vObjectTypeInfo( o ); 1236 QCString name = vObjectTypeInfo( o );
763 if ( name != VCInternetProp && name != VCHomeProp && 1237 if ( name != VCInternetProp && name != VCHomeProp &&
764 name != VCWorkProp && 1238 name != VCWorkProp &&
765 name != VCPreferredProp ) 1239 name != VCPreferredProp )
766 // ### preffered should map to default email 1240 // ### preffered should map to default email
767 valid = FALSE; 1241 valid = FALSE;
768 } 1242 }
769 if ( valid ) { 1243 if ( valid ) {
770 if ( haveDefaultEmail ) { 1244 c.insertEmail( email );
771 QString str = c.emails();
772 if ( !str.isEmpty() )
773 str += ","+email;
774 c.setEmails( str );
775 } else {
776 c.setDefaultEmail( email );
777 }
778 } 1245 }
779 } 1246 }
780 else if ( name == VCURLProp ) { 1247 else if ( name == VCURLProp ) {
781 VObjectIterator nit; 1248 VObjectIterator nit;
782 initPropIterator( &nit, o ); 1249 initPropIterator( &nit, o );
783 while( moreIteration( &nit ) ) { 1250 while( moreIteration( &nit ) ) {
784 VObject *o = nextVObject( &nit ); 1251 VObject *o = nextVObject( &nit );
785 QCString name = vObjectTypeInfo( o ); 1252 QCString name = vObjectTypeInfo( o );
@@ -846,16 +1313,19 @@ static Contact parseVObject( VObject *obj )
846 } 1313 }
847 } 1314 }
848#endif 1315#endif
849 } 1316 }
850 c.setFileAs(); 1317 c.setFileAs();
851 return c; 1318 return c;
852} 1319}
853 1320
1321/*!
1322 Writes the list of \a contacts as a set of VCards to the file \a filename.
1323*/
854void Contact::writeVCard( const QString &filename, const QValueList<Contact> &contacts) 1324void Contact::writeVCard( const QString &filename, const QValueList<Contact> &contacts)
855{ 1325{
856 QFileDirect f( filename.utf8().data() ); 1326 QFileDirect f( filename.utf8().data() );
857 if ( !f.open( IO_WriteOnly ) ) { 1327 if ( !f.open( IO_WriteOnly ) ) {
858 qWarning("Unable to open vcard write"); 1328 qWarning("Unable to open vcard write");
859 return; 1329 return;
860 } 1330 }
861 1331
@@ -863,32 +1333,37 @@ void Contact::writeVCard( const QString &filename, const QValueList<Contact> &co
863 for( it = contacts.begin(); it != contacts.end(); ++it ) { 1333 for( it = contacts.begin(); it != contacts.end(); ++it ) {
864 VObject *obj = createVObject( *it ); 1334 VObject *obj = createVObject( *it );
865 writeVObject(f.directHandle() , obj ); 1335 writeVObject(f.directHandle() , obj );
866 cleanVObject( obj ); 1336 cleanVObject( obj );
867 } 1337 }
868 cleanStrTbl(); 1338 cleanStrTbl();
869} 1339}
870 1340
1341/*!
1342 writes \a contact as a VCard to the file \a filename.
1343*/
871void Contact::writeVCard( const QString &filename, const Contact &contact) 1344void Contact::writeVCard( const QString &filename, const Contact &contact)
872{ 1345{
873 QFileDirect f( filename.utf8().data() ); 1346 QFileDirect f( filename.utf8().data() );
874 if ( !f.open( IO_WriteOnly ) ) { 1347 if ( !f.open( IO_WriteOnly ) ) {
875 qWarning("Unable to open vcard write"); 1348 qWarning("Unable to open vcard write");
876 return; 1349 return;
877 } 1350 }
878 1351
879 VObject *obj = createVObject( contact ); 1352 VObject *obj = createVObject( contact );
880 writeVObject( f.directHandle() , obj ); 1353 writeVObject( f.directHandle() , obj );
881 cleanVObject( obj ); 1354 cleanVObject( obj );
882 1355
883 cleanStrTbl(); 1356 cleanStrTbl();
884} 1357}
885 1358
886 1359/*!
1360 Returns the set of contacts read as VCards from the file \a filename.
1361*/
887QValueList<Contact> Contact::readVCard( const QString &filename ) 1362QValueList<Contact> Contact::readVCard( const QString &filename )
888{ 1363{
889 qDebug("trying to open %s, exists=%d", filename.utf8().data(), QFileInfo( filename.utf8().data() ).size() ); 1364 qDebug("trying to open %s, exists=%d", filename.utf8().data(), QFileInfo( filename.utf8().data() ).size() );
890 VObject *obj = Parse_MIME_FromFileName( (char *)filename.utf8().data() ); 1365 VObject *obj = Parse_MIME_FromFileName( (char *)filename.utf8().data() );
891 1366
892 qDebug("vobject = %p", obj ); 1367 qDebug("vobject = %p", obj );
893 1368
894 QValueList<Contact> contacts; 1369 QValueList<Contact> contacts;
@@ -899,21 +1374,30 @@ QValueList<Contact> Contact::readVCard( const QString &filename )
899 VObject *t = obj; 1374 VObject *t = obj;
900 obj = nextVObjectInList(obj); 1375 obj = nextVObjectInList(obj);
901 cleanVObject( t ); 1376 cleanVObject( t );
902 } 1377 }
903 1378
904 return contacts; 1379 return contacts;
905} 1380}
906 1381
1382/*!
1383 Returns TRUE if the contact matches the regular expression \a regexp.
1384 Otherwise returns FALSE.
1385*/
907bool Contact::match( const QString &regexp ) const 1386bool Contact::match( const QString &regexp ) const
908{ 1387{
909 return match(QRegExp(regexp)); 1388 return match(QRegExp(regexp));
910} 1389}
911 1390
1391/*!
1392 \overload
1393 Returns TRUE if the contact matches the regular expression \a regexp.
1394 Otherwise returns FALSE.
1395*/
912bool Contact::match( const QRegExp &r ) const 1396bool Contact::match( const QRegExp &r ) const
913{ 1397{
914 bool match; 1398 bool match;
915 match = false; 1399 match = false;
916 QMap<int, QString>::ConstIterator it; 1400 QMap<int, QString>::ConstIterator it;
917 for ( it = mMap.begin(); it != mMap.end(); ++it ) { 1401 for ( it = mMap.begin(); it != mMap.end(); ++it ) {
918 if ( (*it).find( r ) > -1 ) { 1402 if ( (*it).find( r ) > -1 ) {
919 match = true; 1403 match = true;
diff --git a/library/backend/contact.h b/library/backend/contact.h
index a74cbbe..4999430 100644
--- a/library/backend/contact.h
+++ b/library/backend/contact.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2001 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -16,24 +16,24 @@
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#ifndef __CONTACT_H__ 21#ifndef __CONTACT_H__
22#define __CONTACT_H__ 22#define __CONTACT_H__
23 23
24#include <qpe/palmtoprecord.h> 24#include <qtopia/private/palmtoprecord.h>
25#include <qpe/recordfields.h> 25#include <qtopia/private/recordfields.h>
26 26
27#include <qstringlist.h> 27#include <qstringlist.h>
28 28
29#if defined(QPC_TEMPLATEDLL) 29#if defined(QPC_TEMPLATEDLL)
30// MOC_SKIP_BEGIN 30// MOC_SKIP_BEGIN
31template class QPC_EXPORT QMap<int, QString>; 31QPC_TEMPLATEEXTERN template class QPC_EXPORT QMap<int, QString>;
32// MOC_SKIP_END 32// MOC_SKIP_END
33#endif 33#endif
34 34
35class ContactPrivate; 35class ContactPrivate;
36class QPC_EXPORT Contact : public Qtopia::Record 36class QPC_EXPORT Contact : public Qtopia::Record
37{ 37{
38 friend class DataSet; 38 friend class DataSet;
39public: 39public:
@@ -51,19 +51,22 @@ public:
51 void setFirstName( const QString &v ) { replace( Qtopia::FirstName, v ); } 51 void setFirstName( const QString &v ) { replace( Qtopia::FirstName, v ); }
52 void setMiddleName( const QString &v ) { replace( Qtopia::MiddleName, v ); } 52 void setMiddleName( const QString &v ) { replace( Qtopia::MiddleName, v ); }
53 void setLastName( const QString &v ) { replace( Qtopia::LastName, v ); } 53 void setLastName( const QString &v ) { replace( Qtopia::LastName, v ); }
54 void setSuffix( const QString &v ) { replace( Qtopia::Suffix, v ); } 54 void setSuffix( const QString &v ) { replace( Qtopia::Suffix, v ); }
55 void setFileAs( const QString &v ) { replace( Qtopia::FileAs, v ); } 55 void setFileAs( const QString &v ) { replace( Qtopia::FileAs, v ); }
56 void setFileAs(); 56 void setFileAs();
57 57
58 // default email address 58 // default email address
59 void setDefaultEmail( const QString &v ) { replace( Qtopia::DefaultEmail, v ); } 59 void setDefaultEmail( const QString &v );
60 // the emails should be seperated by a semicolon 60 // inserts email to list and ensure's doesn't already exist
61 void setEmails( const QString &v ); 61 void insertEmail( const QString &v );
62 void removeEmail( const QString &v );
63 void clearEmails();
64 void insertEmails( const QStringList &v );
62 65
63 // home 66 // home
64 void setHomeStreet( const QString &v ) { replace( Qtopia::HomeStreet, v ); } 67 void setHomeStreet( const QString &v ) { replace( Qtopia::HomeStreet, v ); }
65 void setHomeCity( const QString &v ) { replace( Qtopia::HomeCity, v ); } 68 void setHomeCity( const QString &v ) { replace( Qtopia::HomeCity, v ); }
66 void setHomeState( const QString &v ) { replace( Qtopia::HomeState, v ); } 69 void setHomeState( const QString &v ) { replace( Qtopia::HomeState, v ); }
67 void setHomeZip( const QString &v ) { replace( Qtopia::HomeZip, v ); } 70 void setHomeZip( const QString &v ) { replace( Qtopia::HomeZip, v ); }
68 void setHomeCountry( const QString &v ) { replace( Qtopia::HomeCountry, v ); } 71 void setHomeCountry( const QString &v ) { replace( Qtopia::HomeCountry, v ); }
69 void setHomePhone( const QString &v ) { replace( Qtopia::HomePhone, v ); } 72 void setHomePhone( const QString &v ) { replace( Qtopia::HomePhone, v ); }
@@ -118,17 +121,16 @@ public:
118 QString firstName() const { return find( Qtopia::FirstName ); } 121 QString firstName() const { return find( Qtopia::FirstName ); }
119 QString middleName() const { return find( Qtopia::MiddleName ); } 122 QString middleName() const { return find( Qtopia::MiddleName ); }
120 QString lastName() const { return find( Qtopia::LastName ); } 123 QString lastName() const { return find( Qtopia::LastName ); }
121 QString suffix() const { return find( Qtopia::Suffix ); } 124 QString suffix() const { return find( Qtopia::Suffix ); }
122 QString fileAs() const { return find( Qtopia::FileAs ); } 125 QString fileAs() const { return find( Qtopia::FileAs ); }
123 126
124 // email 127 // email
125 QString defaultEmail() const { return find( Qtopia::DefaultEmail ); } 128 QString defaultEmail() const { return find( Qtopia::DefaultEmail ); }
126 QString emails() const { return find( Qtopia::Emails ); }
127 QStringList emailList() const; 129 QStringList emailList() const;
128 130
129 // home 131 // home
130 QString homeStreet() const { return find( Qtopia::HomeStreet ); } 132 QString homeStreet() const { return find( Qtopia::HomeStreet ); }
131 QString homeCity() const { return find( Qtopia::HomeCity ); } 133 QString homeCity() const { return find( Qtopia::HomeCity ); }
132 QString homeState() const { return find( Qtopia::HomeState ); } 134 QString homeState() const { return find( Qtopia::HomeState ); }
133 QString homeZip() const { return find( Qtopia::HomeZip ); } 135 QString homeZip() const { return find( Qtopia::HomeZip ); }
134 QString homeCountry() const { return find( Qtopia::HomeCountry ); } 136 QString homeCountry() const { return find( Qtopia::HomeCountry ); }
@@ -197,26 +199,108 @@ public:
197 // journaling... 199 // journaling...
198 void saveJournal( journal_action action, const QString &key = QString::null ); 200 void saveJournal( journal_action action, const QString &key = QString::null );
199 void save( QString &buf ) const; 201 void save( QString &buf ) const;
200 202
201 void setUid( int i ) 203 void setUid( int i )
202{ Record::setUid(i); replace( Qtopia::AddressUid , QString::number(i)); } 204{ Record::setUid(i); replace( Qtopia::AddressUid , QString::number(i)); }
203 205
204private: 206private:
207 friend class AbEditor;
205 friend class AbTable; 208 friend class AbTable;
209 friend class AddressBookAccessPrivate;
210 friend class XMLIO;
211
212 QString emailSeparator() const { return " "; }
213 // the emails should be seperated by a comma
214 void setEmails( const QString &v );
215 QString emails() const { return find( Qtopia::Emails ); }
216
206 void insert( int key, const QString &value ); 217 void insert( int key, const QString &value );
207 void replace( int key, const QString &value ); 218 void replace( int key, const QString &value );
208 QString find( int key ) const; 219 QString find( int key ) const;
209 220
210 QString displayAddress( const QString &street, 221 QString displayAddress( const QString &street,
211 const QString &city, 222 const QString &city,
212 const QString &state, 223 const QString &state,
213 const QString &zip, 224 const QString &zip,
214 const QString &country ) const; 225 const QString &country ) const;
215 226
216 Qtopia::UidGen &uidGen() { return sUidGen; } 227 Qtopia::UidGen &uidGen() { return sUidGen; }
217 static Qtopia::UidGen sUidGen; 228 static Qtopia::UidGen sUidGen;
218 QMap<int, QString> mMap; 229 QMap<int, QString> mMap;
219 ContactPrivate *d; 230 ContactPrivate *d;
220}; 231};
221 232
233// these methods are inlined to keep binary compatability with Qtopia 1.5
234inline void Contact::insertEmail( const QString &v )
235{
236 //qDebug("insertEmail %s", v.latin1());
237 QString e = v.simplifyWhiteSpace();
238 QString def = defaultEmail();
239
240 // if no default, set it as the default email and don't insert
241 if ( def.isEmpty() ) {
242 setDefaultEmail( e ); // will insert into the list for us
243 return;
244 }
245
246 // otherwise, insert assuming doesn't already exist
247 QString emailsStr = find( Qtopia::Emails );
248 if ( emailsStr.contains( e ))
249 return;
250 if ( !emailsStr.isEmpty() )
251 emailsStr += emailSeparator();
252 emailsStr += e;
253 replace( Qtopia::Emails, emailsStr );
254}
255
256inline void Contact::removeEmail( const QString &v )
257{
258 QString e = v.simplifyWhiteSpace();
259 QString def = defaultEmail();
260 QString emailsStr = find( Qtopia::Emails );
261 QStringList emails = emailList();
262
263 // otherwise, must first contain it
264 if ( !emailsStr.contains( e ) )
265 return;
266
267 // remove it
268 //qDebug(" removing email from list %s", e.latin1());
269 emails.remove( e );
270 // reset the string
271 emailsStr = emails.join(emailSeparator()); // Sharp's brain dead separator
272 replace( Qtopia::Emails, emailsStr );
273
274 // if default, then replace the default email with the first one
275 if ( def == e ) {
276 //qDebug("removeEmail is default; setting new default");
277 if ( !emails.count() )
278 clearEmails();
279 else // setDefaultEmail will remove e from the list
280 setDefaultEmail( emails.first() );
281 }
282}
283inline void Contact::clearEmails()
284{
285 mMap.remove( Qtopia::DefaultEmail );
286 mMap.remove( Qtopia::Emails );
287}
288inline void Contact::setDefaultEmail( const QString &v )
289{
290 QString e = v.simplifyWhiteSpace();
291
292 //qDebug("Contact::setDefaultEmail %s", e.latin1());
293 replace( Qtopia::DefaultEmail, e );
294
295 if ( !e.isEmpty() )
296 insertEmail( e );
297
298}
299
300inline void Contact::insertEmails( const QStringList &v )
301{
302 for ( QStringList::ConstIterator it = v.begin(); it != v.end(); ++it )
303 insertEmail( *it );
304}
305
222#endif 306#endif
diff --git a/library/backend/event.cpp b/library/backend/event.cpp
index 50a663d..7110717 100644
--- a/library/backend/event.cpp
+++ b/library/backend/event.cpp
@@ -1,33 +1,33 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2001 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "event.h" 21#include "event.h"
22#include "qfiledirect_p.h" 22#include "qfiledirect_p.h"
23#include <qpe/timeconversion.h> 23#include <qtopia/timeconversion.h>
24#include <qpe/stringutil.h> 24#include <qtopia/stringutil.h>
25#include <qpe/recordfields.h> 25#include <qtopia/private/recordfields.h>
26#include <qbuffer.h> 26#include <qbuffer.h>
27#include <time.h> 27#include <time.h>
28#include "vobject_p.h" 28#include "vobject_p.h"
29 29
30#include <stdio.h> 30#include <stdio.h>
31 31
32using namespace Qtopia; 32using namespace Qtopia;
33 33
@@ -66,28 +66,280 @@ static void write( QString& buf, const Event::RepeatPattern &r )
66 buf += " enddt=\"" 66 buf += " enddt=\""
67 + QString::number( r.endDateUTC ? r.endDateUTC : time( 0 ) ) 67 + QString::number( r.endDateUTC ? r.endDateUTC : time( 0 ) )
68 + "\""; 68 + "\"";
69 buf += " created=\"" + QString::number( r.createTime ) + "\""; 69 buf += " created=\"" + QString::number( r.createTime ) + "\"";
70} 70}
71 71
72Qtopia::UidGen Event::sUidGen( Qtopia::UidGen::Qtopia ); 72Qtopia::UidGen Event::sUidGen( Qtopia::UidGen::Qtopia );
73 73
74/*!
75 \class Event event.h
76 \brief The Event class holds the data of a calendar event.
77
78 This data includes descriptive data of the event and schedualing information.
79
80 \ingroup qtopiaemb
81 \ingroup qtopiadesktop
82*/
83
84/*!
85 \class Event::RepeatPattern
86 \class The Event::RepeatPattern class is internal.
87 \internal
88*/
89
90/*!
91 \enum Event::Days
92 \internal
93*/
94
95/*!
96 \enum Event::Type
97 \internal
98*/
99
100/*!
101 \enum Event::SoundTypeChoice
102
103 This enum type defines what kind of sound is made when an alarm occurs
104 for an event. The currently defined types are:
105
106 <ul>
107 <li>\c Silent - No sound is produced.
108 <li>\c Loud - A loud sound is produced.
109 </ul>
110*/
111
112/*!
113 \fn bool Event::operator<( const Event & ) const
114 \internal
115*/
116
117/*!
118 \fn bool Event::operator<=( const Event & ) const
119 \internal
120*/
121
122/*!
123 \fn bool Event::operator!=( const Event & ) const
124 \internal
125*/
126
127/*!
128 \fn bool Event::operator>( const Event & ) const
129 \internal
130*/
131
132/*!
133 \fn bool Event::operator>=( const Event & ) const
134 \internal
135*/
136
137/*!
138 \enum Event::RepeatType
139
140 This enum defines how a event will repeat, if at all.
141
142 <ul>
143 <li>\c NoRepeat - Event does not repeat.
144 <li>\c Daily - Event occurs every n days.
145 <li>\c Weekly - Event occurs every n weeks.
146 <li>\c MonthlyDay - Event occurs every n months. Event will always occur in
147 the same week and same day of week as the first event.
148 <li>\c MonthlyDate - Event occurs every n months. Event will always occur
149 on the same day of the month as the first event.
150 <li>\c Yearly - Event occurs every n years.
151 </ul>
152*/
153
154/*!
155 \fn bool Event::isAllDay() const
156
157 Returns TRUE if the event is an all day event. Otherwise returns FALSE.
158*/
159
160/*!
161 \fn void Event::setAllDay(bool allday)
162
163 If \a allday is TRUE, will set the event to be an all day event.
164 Otherwise sets the event to not be an all day event.
165
166 \warning This function may affect the start and end times of the event.
167*/
168
169/*!
170 \fn QDateTime Event::start() const
171
172 Returns the start date and time of the first occurance of the event.
173*/
174
175/*!
176 \fn QDateTime Event::end() const
177
178 Returns the end date and time of the first occurance of the event.
179*/
180
181/*!
182 \fn time_t Event::startTime() const
183 \internal
184*/
185
186/*!
187 \fn time_t Event::endTime() const
188 \internal
189*/
190
191/*!
192 \fn void Event::setAlarm(int delay, SoundTypeChoice s)
193
194 Sets the alarm delay of the event to \a delay and the sound type of the
195 alarm to \a s.
196*/
197
198/*!
199 \fn void Event::clearAlarm()
200
201 Clears the alarm for the event.
202*/
203
204/*!
205 \fn int Event::alarmDelay() const
206
207 Returns the delay in minutes between the alarm for an event and the
208 start of the event.
209*/
210
211/*!
212 \fn Event::RepeatType Event::repeatType() const
213
214 Returns the repeat pattern type for the event.
215
216 \sa frequency()
217*/
218
219/*!
220 \fn int Event::weekOffset() const
221
222 Returns the number of weeks from the start of the month that this event
223 occurs.
224*/
225
226/*!
227 \fn QDate Event::repeatTill() const
228
229 Returns the date that the event will continue to repeat until. If the event
230 repeats forever the value returned is undefined.
231
232 \sa repeatForever()
233*/
234
235/*!
236 \fn bool Event::repeatForever() const
237
238 Returns FALSE if there is a date set for the event to continue until.
239 Otherwise returns TRUE.
240*/
241
242/*!
243 \fn bool Event::doRepeat() const
244 \internal
245*/
246
247/*!
248 \fn bool Event::repeatOnWeekDay(int day) const
249
250 Returns TRUE if the event has a RepeatType of Weekly and is set to occur on
251 \a day each week. Otherwise returns FALSE.
252
253 \sa QDate::dayName()
254*/
255
256/*!
257 \fn void Event::setRepeatOnWeekDay(int day, bool enable)
258
259 If \a enable is TRUE then sets the event to occur on \a day each week.
260 Otherwise sets the event not to occur on \a day.
261
262 \warning this function is only relavent for a event with RepeatType of
263 Weekly.
264
265 \sa QDate::dayName()
266*/
267
268/*!
269 \fn int Event::frequency() const
270
271 Returns how often the event repeats.
272
273 \sa repeatType()
274*/
275
276/*!
277 \fn void Event::setRepeatType(RepeatType t)
278
279 Sets the repeat pattern type of the event to \a t.
280
281 \sa setFrequency()
282*/
283
284/*!
285 \fn void Event::setFrequency(int n)
286
287 Sets how often the event occurs with in its repeat pattern.
288
289 \sa setRepeatType()
290*/
291
292/*!
293 \fn void Event::setRepeatTill(const QDate &d)
294
295 Sets the event to repeat until \a d.
296*/
297
298/*!
299 \fn void Event::setRepeatForever(bool enable)
300
301 If \a enable is TRUE, sets the event to repeat forever. Otherwise
302 sets the event to stop repeating at some date.
303
304 \warning This function may affect the specific date the event will repeat
305 till.
306*/
307
308/*!
309 \fn bool Event::match(const QRegExp &r) const
310
311 Returns TRUE if the event matches the regular expression \a r.
312 Otherwise returns FALSE.
313*/
314
315/*!
316 \fn char Event::day(int)
317 \internal
318*/
319
320/*!
321 Creates a new, empty event.
322*/
74Event::Event() : Record() 323Event::Event() : Record()
75{ 324{
76 startUTC = endUTC = time( 0 ); 325 startUTC = endUTC = time( 0 );
77 typ = Normal; 326 typ = Normal;
78 hAlarm = FALSE; 327 hAlarm = FALSE;
79 hRepeat = FALSE; 328 hRepeat = FALSE;
80 aMinutes = 0; 329 aMinutes = 0;
81 aSound = Silent; 330 aSound = Silent;
82 pattern.type = NoRepeat; 331 pattern.type = NoRepeat;
83 pattern.frequency = -1; 332 pattern.frequency = -1;
84} 333}
85 334
335/*!
336 \internal
337*/
86Event::Event( const QMap<int, QString> &map ) 338Event::Event( const QMap<int, QString> &map )
87{ 339{
88 setDescription( map[DatebookDescription] ); 340 setDescription( map[DatebookDescription] );
89 setLocation( map[Location] ); 341 setLocation( map[Location] );
90 setCategories( idsFromString( map[DatebookCategory] ) ); 342 setCategories( idsFromString( map[DatebookCategory] ) );
91 setTimeZone( map[TimeZone] ); 343 setTimeZone( map[TimeZone] );
92 setNotes( map[Note] ); 344 setNotes( map[Note] );
93 setStart( TimeConversion::fromUTC( map[StartDateTime].toUInt() ) ); 345 setStart( TimeConversion::fromUTC( map[StartDateTime].toUInt() ) );
@@ -101,66 +353,91 @@ Event::Event( const QMap<int, QString> &map )
101 p.days = map[ RepeatPatternDays ].toInt(); 353 p.days = map[ RepeatPatternDays ].toInt();
102 p.hasEndDate = map[ RepeatPatternHasEndDate ].toInt(); 354 p.hasEndDate = map[ RepeatPatternHasEndDate ].toInt();
103 p.endDateUTC = map[ RepeatPatternEndDate ].toUInt(); 355 p.endDateUTC = map[ RepeatPatternEndDate ].toUInt();
104 setRepeat( p ); 356 setRepeat( p );
105 357
106 setUid( map[ DatebookUid ].toInt() ); 358 setUid( map[ DatebookUid ].toInt() );
107} 359}
108 360
361/*!
362 Destroys an event.
363*/
109Event::~Event() 364Event::~Event()
110{ 365{
111} 366}
112 367
368/*!
369 \internal
370*/
113int Event::week( const QDate& date ) 371int Event::week( const QDate& date )
114{ 372{
115 // Calculates the week this date is in within that 373 // Calculates the week this date is in within that
116 // month. Equals the "row" is is in in the month view 374 // month. Equals the "row" is is in in the month view
117 int week = 1; 375 int week = 1;
118 QDate tmp( date.year(), date.month(), 1 ); 376 QDate tmp( date.year(), date.month(), 1 );
119 377
120 if ( date.dayOfWeek() < tmp.dayOfWeek() ) 378 if ( date.dayOfWeek() < tmp.dayOfWeek() )
121 ++week; 379 ++week;
122 380
123 week += ( date.day() - 1 ) / 7; 381 week += ( date.day() - 1 ) / 7;
124 return week; 382 return week;
125} 383}
126 384
385/*!
386 \internal
387*/
127int Event::occurrence( const QDate& date ) 388int Event::occurrence( const QDate& date )
128{ 389{
129 // calculates the number of occurrances of this day of the 390 // calculates the number of occurrances of this day of the
130 // week till the given date (e.g 3rd Wednesday of the month) 391 // week till the given date (e.g 3rd Wednesday of the month)
131 return ( date.day() - 1 ) / 7 + 1; 392 return ( date.day() - 1 ) / 7 + 1;
132} 393}
133 394
395/*!
396 \internal
397*/
134int Event::dayOfWeek( char day ) 398int Event::dayOfWeek( char day )
135{ 399{
136 int dayOfWeek = 1; 400 int dayOfWeek = 1;
137 char i = Event::MON; 401 char i = Event::MON;
138 while ( !( i & day ) && i <= Event::SUN ) { 402 while ( !( i & day ) && i <= Event::SUN ) {
139 i <<= 1; 403 i <<= 1;
140 ++dayOfWeek; 404 ++dayOfWeek;
141 } 405 }
142 return dayOfWeek; 406 return dayOfWeek;
143} 407}
144 408
409/*!
410 \internal
411*/
145int Event::monthDiff( const QDate& first, const QDate& second ) 412int Event::monthDiff( const QDate& first, const QDate& second )
146{ 413{
147 return ( second.year() - first.year() ) * 12 + 414 return ( second.year() - first.year() ) * 12 +
148 second.month() - first.month(); 415 second.month() - first.month();
149} 416}
150 417
418/*!
419 \internal
420*/
151QMap<int, QString> Event::toMap() const 421QMap<int, QString> Event::toMap() const
152{ 422{
153 QMap<int, QString> m; 423 QMap<int, QString> m;
154 m.insert( DatebookDescription, description() ); 424
155 m.insert ( Location, location() ); 425 if ( !description().isEmpty() )
156 m.insert ( DatebookCategory, idsToString( categories() ) ); 426 m.insert( DatebookDescription, description() );
157 m.insert ( TimeZone, timeZone() ); 427 if ( !location().isEmpty() )
158 m.insert ( Note, notes() ); 428 m.insert ( Location, location() );
429 if ( categories().count() )
430 m.insert ( DatebookCategory, idsToString( categories() ) );
431 if ( !timeZone().isEmpty() )
432 m.insert ( TimeZone, timeZone() );
433 if ( !notes().isEmpty() )
434 m.insert ( Note, notes() );
435
159 m.insert ( StartDateTime, QString::number( TimeConversion::toUTC( start() ) ) ); 436 m.insert ( StartDateTime, QString::number( TimeConversion::toUTC( start() ) ) );
160 m.insert ( EndDateTime, QString::number( TimeConversion::toUTC( end() ) ) ); 437 m.insert ( EndDateTime, QString::number( TimeConversion::toUTC( end() ) ) );
161 m.insert ( DatebookType, QString::number( (int)type() ) ); 438 m.insert ( DatebookType, QString::number( (int)type() ) );
162 m.insert ( HasAlarm, ( hasAlarm() ? "1" : "0" ) ); 439 m.insert ( HasAlarm, ( hasAlarm() ? "1" : "0" ) );
163 m.insert ( SoundType, QString::number( (int)alarmSound() ) ); 440 m.insert ( SoundType, QString::number( (int)alarmSound() ) );
164 m.insert ( AlarmTime, QString::number( alarmTime() ) ); 441 m.insert ( AlarmTime, QString::number( alarmTime() ) );
165 m.insert ( RepeatPatternType, QString::number( static_cast<int>( repeatPattern().type ) ) ); 442 m.insert ( RepeatPatternType, QString::number( static_cast<int>( repeatPattern().type ) ) );
166 m.insert ( RepeatPatternFrequency, QString::number( repeatPattern().frequency ) ); 443 m.insert ( RepeatPatternFrequency, QString::number( repeatPattern().frequency ) );
@@ -169,185 +446,271 @@ QMap<int, QString> Event::toMap() const
169 m.insert ( RepeatPatternHasEndDate, QString::number( static_cast<int>( repeatPattern().hasEndDate ) ) ); 446 m.insert ( RepeatPatternHasEndDate, QString::number( static_cast<int>( repeatPattern().hasEndDate ) ) );
170 m.insert ( RepeatPatternEndDate, QString::number( repeatPattern().endDateUTC ) ); 447 m.insert ( RepeatPatternEndDate, QString::number( repeatPattern().endDateUTC ) );
171 448
172 m.insert( DatebookUid, QString::number( uid()) ); 449 m.insert( DatebookUid, QString::number( uid()) );
173 450
174 return m; 451 return m;
175} 452}
176 453
454/*!
455 \internal
456*/
177void Event::setRepeat( const RepeatPattern &p ) 457void Event::setRepeat( const RepeatPattern &p )
178{ 458{
179 setRepeat( p.type != NoRepeat, p ); 459 setRepeat( p.type != NoRepeat, p );
180} 460}
181 461
462/*!
463 Sets the description of the event to \a s.
464*/
182void Event::setDescription( const QString &s ) 465void Event::setDescription( const QString &s )
183{ 466{
184 descript = s; 467 descript = s;
185} 468}
186 469
470/*!
471 Sets the location of the event to \a s.
472*/
187void Event::setLocation( const QString &s ) 473void Event::setLocation( const QString &s )
188{ 474{
189 locat = s; 475 locat = s;
190} 476}
191 477
192// void Event::setCategory( const QString &s ) 478// void Event::setCategory( const QString &s )
193// { 479// {
194// categ = s; 480// categ = s;
195// } 481// }
196 482
483/*!
484 \internal
485*/
197void Event::setType( Type t ) 486void Event::setType( Type t )
198{ 487{
199 typ = t; 488 typ = t;
200} 489}
201 490
491/*!
492 Sets the start date and time of the first or only occurance of this event
493 to the date and time \a d. \a d should be in local time.
494*/
202void Event::setStart( const QDateTime &d ) 495void Event::setStart( const QDateTime &d )
203{ 496{
204 startUTC = TimeConversion::toUTC( d ); 497 startUTC = TimeConversion::toUTC( d );
205} 498}
206 499
500/*!
501 \internal
502*/
207void Event::setStart( time_t time ) 503void Event::setStart( time_t time )
208{ 504{
209 startUTC = time; 505 startUTC = time;
210} 506}
211 507
508/*!
509 Sets the end date and time of the first or only occurance of this event
510 to the date and time \a d. \a d should be in local time.
511*/
212void Event::setEnd( const QDateTime &d ) 512void Event::setEnd( const QDateTime &d )
213{ 513{
214 endUTC = TimeConversion::toUTC( d ); 514 endUTC = TimeConversion::toUTC( d );
215} 515}
216 516
517/*!
518 \internal
519*/
217void Event::setEnd( time_t time ) 520void Event::setEnd( time_t time )
218{ 521{
219 endUTC = time; 522 endUTC = time;
220} 523}
221 524
525/*!
526 \internal
527*/
222void Event::setTimeZone( const QString &z ) 528void Event::setTimeZone( const QString &z )
223{ 529{
224 tz = z; 530 tz = z;
225} 531}
226 532
533/*!
534 \internal
535*/
227void Event::setAlarm( bool b, int minutes, SoundTypeChoice s ) 536void Event::setAlarm( bool b, int minutes, SoundTypeChoice s )
228{ 537{
229 hAlarm = b; 538 hAlarm = b;
230 aMinutes = minutes; 539 aMinutes = minutes;
231 aSound = s; 540 aSound = s;
232} 541}
233 542
543/*!
544 \internal
545*/
234void Event::setRepeat( bool b, const RepeatPattern &p ) 546void Event::setRepeat( bool b, const RepeatPattern &p )
235{ 547{
236 hRepeat = b; 548 hRepeat = b;
237 pattern = p; 549 pattern = p;
238} 550}
239 551
552/*!
553 Sets the notes for the event to \a n.
554*/
240void Event::setNotes( const QString &n ) 555void Event::setNotes( const QString &n )
241{ 556{
242 note = n; 557 note = n;
243} 558}
244 559
560/*!
561 Returns the description of the event.
562*/
245const QString &Event::description() const 563const QString &Event::description() const
246{ 564{
247 return descript; 565 return descript;
248} 566}
249 567
568/*!
569 Returns the location of the event.
570*/
250const QString &Event::location() const 571const QString &Event::location() const
251{ 572{
252 return locat; 573 return locat;
253} 574}
254 575
255// QString Event::category() const 576// QString Event::category() const
256// { 577// {
257// return categ; 578// return categ;
258// } 579// }
259 580
581/*!
582 \internal
583*/
260Event::Type Event::type() const 584Event::Type Event::type() const
261{ 585{
262 return typ; 586 return typ;
263} 587}
264 588
589/*!
590 \internal
591*/
265QDateTime Event::start( bool actual ) const 592QDateTime Event::start( bool actual ) const
266{ 593{
267 QDateTime dt = (startUTC > 0) ? TimeConversion::fromUTC( startUTC ) : QDateTime::currentDateTime(); 594 QDateTime dt = (startUTC > 0) ? TimeConversion::fromUTC( startUTC ) : QDateTime::currentDateTime();
268 595
269 if ( actual && typ == AllDay ) { 596 if ( actual && typ == AllDay ) {
270 QTime t = dt.time(); 597 QTime t = dt.time();
271 t.setHMS( 0, 0, 0 ); 598 t.setHMS( 0, 0, 0 );
272 dt.setTime( t ); 599 dt.setTime( t );
273 } 600 }
274 return dt; 601 return dt;
275} 602}
276 603
604/*!
605 \internal
606*/
277QDateTime Event::end( bool actual ) const 607QDateTime Event::end( bool actual ) const
278{ 608{
279 QDateTime dt = (endUTC > 0) ? TimeConversion::fromUTC( endUTC ) : QDateTime::currentDateTime(); 609 QDateTime dt = (endUTC > 0) ? TimeConversion::fromUTC( endUTC ) : QDateTime::currentDateTime();
280 610
281 if ( actual && typ == AllDay ) { 611 if ( actual && typ == AllDay ) {
282 QTime t = dt.time(); 612 QTime t = dt.time();
283 t.setHMS( 23, 59, 59 ); 613 t.setHMS( 23, 59, 59 );
284 dt.setTime( t ); 614 dt.setTime( t );
285 } 615 }
286 return dt; 616 return dt;
287} 617}
288 618
619/*!
620 \internal
621*/
289const QString &Event::timeZone() const 622const QString &Event::timeZone() const
290{ 623{
291 return tz; 624 return tz;
292} 625}
293 626
627/*!
628 \internal
629*/
294bool Event::hasAlarm() const 630bool Event::hasAlarm() const
295{ 631{
296 return hAlarm; 632 return hAlarm;
297} 633}
298 634
635/*!
636 \internal
637*/
299int Event::alarmTime() const 638int Event::alarmTime() const
300{ 639{
301 return aMinutes; 640 return aMinutes;
302} 641}
303 642
643/*!
644 Returns the sound type for the alarm of this event.
645*/
304Event::SoundTypeChoice Event::alarmSound() const 646Event::SoundTypeChoice Event::alarmSound() const
305{ 647{
306 return aSound; 648 return aSound;
307} 649}
308 650
651/*!
652 \internal
653*/
309bool Event::hasRepeat() const 654bool Event::hasRepeat() const
310{ 655{
311 return doRepeat(); 656 return doRepeat();
312} 657}
313 658
659/*!
660 \internal
661*/
314const Event::RepeatPattern &Event::repeatPattern() const 662const Event::RepeatPattern &Event::repeatPattern() const
315{ 663{
316 return pattern; 664 return pattern;
317} 665}
318 666
667/*!
668 \internal
669*/
319Event::RepeatPattern &Event::repeatPattern() 670Event::RepeatPattern &Event::repeatPattern()
320{ 671{
321 return pattern; 672 return pattern;
322} 673}
323 674
675/*!
676 Returns the notes for the event.
677*/
324const QString &Event::notes() const 678const QString &Event::notes() const
325{ 679{
326 return note; 680 return note;
327} 681}
328 682
683/*!
684 \internal
685*/
329bool Event::operator==( const Event &e ) const 686bool Event::operator==( const Event &e ) const
330{ 687{
688 if ( uid() && e.uid() == uid() )
689 return TRUE;
331 return ( e.descript == descript && 690 return ( e.descript == descript &&
332 e.locat == locat && 691 e.locat == locat &&
333 e.categ == categ && 692 e.categ == categ &&
334 e.typ == typ && 693 e.typ == typ &&
335 e.startUTC == startUTC && 694 e.startUTC == startUTC &&
336 e.endUTC == endUTC && 695 e.endUTC == endUTC &&
337 e.tz == tz && 696 e.tz == tz &&
338 e.hAlarm == hAlarm && 697 e.hAlarm == hAlarm &&
339 e.aMinutes == aMinutes && 698 e.aMinutes == aMinutes &&
340 e.aSound == aSound && 699 e.aSound == aSound &&
341 e.hRepeat == hRepeat && 700 e.hRepeat == hRepeat &&
342 e.pattern == pattern && 701 e.pattern == pattern &&
343 e.note == note ); 702 e.note == note );
344} 703}
345 704
705/*!
706 \internal
707 Appends the contact information to \a buf.
708*/
346void Event::save( QString& buf ) 709void Event::save( QString& buf )
347{ 710{
348 buf += " description=\"" + Qtopia::escapeString(descript) + "\""; 711 buf += " description=\"" + Qtopia::escapeString(descript) + "\"";
349 if ( !locat.isEmpty() ) 712 if ( !locat.isEmpty() )
350 buf += " location=\"" + Qtopia::escapeString(locat) + "\""; 713 buf += " location=\"" + Qtopia::escapeString(locat) + "\"";
351 // save the categoies differently.... 714 // save the categoies differently....
352 QString strCats = idsToString( categories() ); 715 QString strCats = idsToString( categories() );
353 buf += " categories=\"" + Qtopia::escapeString(strCats) + "\""; 716 buf += " categories=\"" + Qtopia::escapeString(strCats) + "\"";
@@ -373,67 +736,103 @@ void Event::save( QString& buf )
373 + QString::number( endUTC ) 736 + QString::number( endUTC )
374 + "\""; 737 + "\"";
375 738
376 if ( !note.isEmpty() ) 739 if ( !note.isEmpty() )
377 buf += " note=\"" + Qtopia::escapeString( note ) + "\""; 740 buf += " note=\"" + Qtopia::escapeString( note ) + "\"";
378 buf += customToXml(); 741 buf += customToXml();
379} 742}
380 743
744/*!
745 \internal
746*/
381bool Event::RepeatPattern::operator==( const Event::RepeatPattern &right ) const 747bool Event::RepeatPattern::operator==( const Event::RepeatPattern &right ) const
382{ 748{
383 // *sigh* 749 // *sigh*
384 return ( type == right.type 750 return ( type == right.type
385 && frequency == right.frequency 751 && frequency == right.frequency
386 && position == right.position 752 && position == right.position
387 && days == right.days 753 && days == right.days
388 && hasEndDate == right.hasEndDate 754 && hasEndDate == right.hasEndDate
389 && endDateUTC == right.endDateUTC 755 && endDateUTC == right.endDateUTC
390 && createTime == right.createTime ); 756 && createTime == right.createTime );
391} 757}
392 758
759/*!
760 \class EffectiveEvent
761 \brief The EffectiveEvent class the data for a single occurance of an event.
762
763 This class describes the event for a single occurance of it. For example if
764 an Event occurs every week, the effective event might represent the third
765 occurance of this Event.
766
767 \ingroup qtopiaemb
768 \ingroup qtopiadesktop
769 \warning This class will be phased out in Qtopia 3.x
770*/
771
772/*!
773 \enum EffectiveEvent::Position
774 \internal
775*/
776
777/*!
778 \fn EffectiveEvent &EffectiveEvent::operator=(const EffectiveEvent &)
779 \internal
780*/
393 781
394class EffectiveEventPrivate 782class EffectiveEventPrivate
395{ 783{
396public: 784public:
397 //currently the existence of the d pointer means multi-day repeating, 785 //currently the existence of the d pointer means multi-day repeating,
398 //msut be changed if we use the d pointer for anything else. 786 //msut be changed if we use the d pointer for anything else.
399 QDate startDate; 787 QDate startDate;
400 QDate endDate; 788 QDate endDate;
401}; 789};
402 790
403 791/*!
792 \internal
793*/
404EffectiveEvent::EffectiveEvent() 794EffectiveEvent::EffectiveEvent()
405{ 795{
406 mDate = QDate::currentDate(); 796 mDate = QDate::currentDate();
407 mStart = mEnd = QTime::currentTime(); 797 mStart = mEnd = QTime::currentTime();
408 d = 0; 798 d = 0;
409} 799}
410 800
801/*!
802 \internal
803*/
411EffectiveEvent::EffectiveEvent( const Event &e, const QDate &date, Position pos ) 804EffectiveEvent::EffectiveEvent( const Event &e, const QDate &date, Position pos )
412{ 805{
413 mEvent = e; 806 mEvent = e;
414 mDate = date; 807 mDate = date;
415 if ( pos & Start ) 808 if ( pos & Start )
416 mStart = e.start( TRUE ).time(); 809 mStart = e.start( TRUE ).time();
417 else 810 else
418 mStart = QTime( 0, 0, 0 ); 811 mStart = QTime( 0, 0, 0 );
419 812
420 if ( pos & End ) 813 if ( pos & End )
421 mEnd = e.end( TRUE ).time(); 814 mEnd = e.end( TRUE ).time();
422 else 815 else
423 mEnd = QTime( 23, 59, 59 ); 816 mEnd = QTime( 23, 59, 59 );
424 d = 0; 817 d = 0;
425} 818}
426 819
820/*!
821 \internal
822*/
427EffectiveEvent::~EffectiveEvent() 823EffectiveEvent::~EffectiveEvent()
428{ 824{
429 delete d; 825 delete d;
430} 826}
431 827
828/*!
829 \internal
830*/
432EffectiveEvent::EffectiveEvent( const EffectiveEvent &e ) 831EffectiveEvent::EffectiveEvent( const EffectiveEvent &e )
433{ 832{
434 d = 0; 833 d = 0;
435 *this = e; 834 *this = e;
436} 835}
437 836
438EffectiveEvent& EffectiveEvent::operator=( const EffectiveEvent & e ) 837EffectiveEvent& EffectiveEvent::operator=( const EffectiveEvent & e )
439{ 838{
@@ -456,148 +855,214 @@ EffectiveEvent& EffectiveEvent::operator=( const EffectiveEvent & e )
456 855
457} 856}
458 857
459// QString EffectiveEvent::category() const 858// QString EffectiveEvent::category() const
460// { 859// {
461// return mEvent.category(); 860// return mEvent.category();
462// } 861// }
463 862
863/*!
864 Returns the description of the event for this effective event.
865*/
464const QString &EffectiveEvent::description( ) const 866const QString &EffectiveEvent::description( ) const
465{ 867{
466 return mEvent.description(); 868 return mEvent.description();
467} 869}
468 870
871/*!
872\internal
873*/
469const QString &EffectiveEvent::location( ) const 874const QString &EffectiveEvent::location( ) const
470{ 875{
471 return mEvent.location(); 876 return mEvent.location();
472} 877}
473 878
879/*!
880\internal
881*/
474const QString &EffectiveEvent::notes() const 882const QString &EffectiveEvent::notes() const
475{ 883{
476 return mEvent.notes(); 884 return mEvent.notes();
477} 885}
478 886
887/*!
888 Returns the event associated with this effective event.
889*/
479const Event &EffectiveEvent::event() const 890const Event &EffectiveEvent::event() const
480{ 891{
481 return mEvent; 892 return mEvent;
482} 893}
483 894
895/*!
896 \internal
897*/
484const QTime &EffectiveEvent::end() const 898const QTime &EffectiveEvent::end() const
485{ 899{
486 return mEnd; 900 return mEnd;
487} 901}
488 902
903/*!
904 \internal
905*/
489const QTime &EffectiveEvent::start() const 906const QTime &EffectiveEvent::start() const
490{ 907{
491 return mStart; 908 return mStart;
492} 909}
493 910
911/*!
912 Returns the date the effective event occurs on.
913*/
494const QDate &EffectiveEvent::date() const 914const QDate &EffectiveEvent::date() const
495{ 915{
496 return mDate; 916 return mDate;
497} 917}
498 918
919/*!
920 \internal
921*/
499int EffectiveEvent::length() const 922int EffectiveEvent::length() const
500{ 923{
501 return (mEnd.hour() * 60 - mStart.hour() * 60) 924 return (mEnd.hour() * 60 - mStart.hour() * 60)
502 + QABS(mStart.minute() - mEnd.minute() ); 925 + QABS(mStart.minute() - mEnd.minute() );
503} 926}
504 927
928/*!
929 \internal
930*/
505void EffectiveEvent::setDate( const QDate &dt ) 931void EffectiveEvent::setDate( const QDate &dt )
506{ 932{
507 mDate = dt; 933 mDate = dt;
508} 934}
509 935
936/*!
937 \internal
938*/
510void EffectiveEvent::setStart( const QTime &start ) 939void EffectiveEvent::setStart( const QTime &start )
511{ 940{
512 mStart = start; 941 mStart = start;
513} 942}
514 943
944/*!
945 \internal
946*/
515void EffectiveEvent::setEnd( const QTime &end ) 947void EffectiveEvent::setEnd( const QTime &end )
516{ 948{
517 mEnd = end; 949 mEnd = end;
518} 950}
519 951
952/*!
953 \internal
954*/
520void EffectiveEvent::setEvent( Event e ) 955void EffectiveEvent::setEvent( Event e )
521{ 956{
522 mEvent = e; 957 mEvent = e;
523} 958}
524 959
960/*!
961 \internal
962*/
525bool EffectiveEvent::operator<( const EffectiveEvent &e ) const 963bool EffectiveEvent::operator<( const EffectiveEvent &e ) const
526{ 964{
527 if ( mDate < e.date() ) 965 if ( mDate < e.date() )
528 return TRUE; 966 return TRUE;
529 if ( mDate == e.date() ) 967 if ( mDate == e.date() )
530 return ( mStart < e.start() ); 968 return ( mStart < e.start() );
531 else 969 else
532 return FALSE; 970 return FALSE;
533} 971}
534 972
973/*!
974 \internal
975*/
535bool EffectiveEvent::operator<=( const EffectiveEvent &e ) const 976bool EffectiveEvent::operator<=( const EffectiveEvent &e ) const
536{ 977{
537 return (mDate <= e.date() ); 978 return (mDate <= e.date() );
538} 979}
539 980
981/*!
982 \internal
983*/
540bool EffectiveEvent::operator==( const EffectiveEvent &e ) const 984bool EffectiveEvent::operator==( const EffectiveEvent &e ) const
541{ 985{
542 return ( mDate == e.date() 986 return ( mDate == e.date()
543 && mStart == e.start() 987 && mStart == e.start()
544 && mEnd == e.end() 988 && mEnd == e.end()
545 && mEvent == e.event() ); 989 && mEvent == e.event() );
546} 990}
547 991
992/*!
993 \internal
994*/
548bool EffectiveEvent::operator!=( const EffectiveEvent &e ) const 995bool EffectiveEvent::operator!=( const EffectiveEvent &e ) const
549{ 996{
550 return !(*this == e); 997 return !(*this == e);
551} 998}
552 999
1000/*!
1001 \internal
1002*/
553bool EffectiveEvent::operator>( const EffectiveEvent &e ) const 1003bool EffectiveEvent::operator>( const EffectiveEvent &e ) const
554{ 1004{
555 return !(*this <= e ); 1005 return !(*this <= e );
556} 1006}
557 1007
1008/*!
1009 \internal
1010*/
558bool EffectiveEvent::operator>=(const EffectiveEvent &e) const 1011bool EffectiveEvent::operator>=(const EffectiveEvent &e) const
559{ 1012{
560 return !(*this < e); 1013 return !(*this < e);
561} 1014}
562 1015
1016/*!
1017 \internal
1018*/
563void EffectiveEvent::setEffectiveDates( const QDate &from, const QDate &to ) 1019void EffectiveEvent::setEffectiveDates( const QDate &from, const QDate &to )
564{ 1020{
565 if ( !from.isValid() ) { 1021 if ( !from.isValid() ) {
566 delete d; 1022 delete d;
567 d = 0; 1023 d = 0;
568 return; 1024 return;
569 } 1025 }
570 if ( !d ) 1026 if ( !d )
571 d = new EffectiveEventPrivate; 1027 d = new EffectiveEventPrivate;
572 d->startDate = from; 1028 d->startDate = from;
573 d->endDate = to; 1029 d->endDate = to;
574} 1030}
575 1031
1032/*!
1033 \internal
1034*/
576QDate EffectiveEvent::startDate() const 1035QDate EffectiveEvent::startDate() const
577{ 1036{
578 if ( d ) 1037 if ( d )
579 return d->startDate; 1038 return d->startDate;
580 else if ( mEvent.hasRepeat() ) 1039 else if ( mEvent.hasRepeat() )
581 return mDate; // single day, since multi-day should have a d pointer 1040 return mDate; // single day, since multi-day should have a d pointer
582 else 1041 else
583 return mEvent.start().date(); 1042 return mEvent.start().date();
584} 1043}
585 1044
1045/*!
1046 \internal
1047*/
586QDate EffectiveEvent::endDate() const 1048QDate EffectiveEvent::endDate() const
587{ 1049{
588 if ( d ) 1050 if ( d )
589 return d->endDate; 1051 return d->endDate;
590 else if ( mEvent.hasRepeat() ) 1052 else if ( mEvent.hasRepeat() )
591 return mDate; // single day, since multi-day should have a d pointer 1053 return mDate; // single day, since multi-day should have a d pointer
592 else 1054 else
593 return mEvent.end().date(); 1055 return mEvent.end().date();
594} 1056}
595 1057
1058/*!
1059 \internal
1060*/
596int EffectiveEvent::size() const 1061int EffectiveEvent::size() const
597{ 1062{
598 return ( mEnd.hour() - mStart.hour() ) * 3600 1063 return ( mEnd.hour() - mStart.hour() ) * 3600
599 + (mEnd.minute() - mStart.minute() * 60 1064 + (mEnd.minute() - mStart.minute() * 60
600 + mEnd.second() - mStart.second() ); 1065 + mEnd.second() - mStart.second() );
601} 1066}
602 1067
603 1068
@@ -735,51 +1200,71 @@ static Event parseVObject( VObject *obj )
735 if ( haveAlarm ) { 1200 if ( haveAlarm ) {
736 int minutes = alarmTime.secsTo( e.start() ) / 60; 1201 int minutes = alarmTime.secsTo( e.start() ) / 60;
737 e.setAlarm( TRUE, minutes, soundType ); 1202 e.setAlarm( TRUE, minutes, soundType );
738 } 1203 }
739 return e; 1204 return e;
740} 1205}
741 1206
742 1207
743 1208/*!
1209 Writes the list of \a events as a set of VCards to the file \a filename.
1210*/
744void Event::writeVCalendar( const QString &filename, const QValueList<Event> &events) 1211void Event::writeVCalendar( const QString &filename, const QValueList<Event> &events)
745{ 1212{
746 QFileDirect f( filename.utf8().data() ); 1213
747 if ( !f.open( IO_WriteOnly ) ) { 1214 QFileDirect f( filename.utf8().data() );
748 qWarning("Unable to open vcard write"); 1215
749 return; 1216 if ( !f.open( IO_WriteOnly ) ) {
750 } 1217
1218 qWarning("Unable to open vcard write");
1219
1220 return;
1221
1222 }
1223
751 1224
752 QValueList<Event>::ConstIterator it; 1225 QValueList<Event>::ConstIterator it;
753 for( it = events.begin(); it != events.end(); ++it ) { 1226 for( it = events.begin(); it != events.end(); ++it ) {
754 VObject *obj = createVObject( *it ); 1227 VObject *obj = createVObject( *it );
755 writeVObject( f.directHandle() , obj ); 1228 writeVObject( f.directHandle() , obj );
756 cleanVObject( obj ); 1229 cleanVObject( obj );
757 } 1230 }
1231
758 1232
759 cleanStrTbl(); 1233 cleanStrTbl();
760} 1234}
761 1235
1236/*!
1237 Writes \a event as a VCard to the file \a filename.
1238*/
762void Event::writeVCalendar( const QString &filename, const Event &event) 1239void Event::writeVCalendar( const QString &filename, const Event &event)
763{ 1240{
764 QFileDirect f( filename.utf8().data() ); 1241
765 if ( !f.open( IO_WriteOnly ) ) { 1242 QFileDirect f( filename.utf8().data() );
766 qWarning("Unable to open vcard write"); 1243
767 return; 1244 if ( !f.open( IO_WriteOnly ) ) {
768 } 1245
1246 qWarning("Unable to open vcard write");
1247
1248 return;
1249
1250 }
1251
769 1252
770 VObject *obj = createVObject( event ); 1253 VObject *obj = createVObject( event );
771 writeVObject( f.directHandle() , obj ); 1254 writeVObject( f.directHandle() , obj );
772 cleanVObject( obj ); 1255 cleanVObject( obj );
773 1256
774 cleanStrTbl(); 1257 cleanStrTbl();
775} 1258}
776 1259
777 1260/*!
1261 Returns the set of events read as VCards from the file \a filename.
1262*/
778QValueList<Event> Event::readVCalendar( const QString &filename ) 1263QValueList<Event> Event::readVCalendar( const QString &filename )
779{ 1264{
780 VObject *obj = Parse_MIME_FromFileName( (char *)filename.utf8().data() ); 1265 VObject *obj = Parse_MIME_FromFileName( (char *)filename.utf8().data() );
781 1266
782 QValueList<Event> events; 1267 QValueList<Event> events;
783 1268
784 while ( obj ) { 1269 while ( obj ) {
785 QCString name = vObjectName( obj ); 1270 QCString name = vObjectName( obj );
diff --git a/library/backend/event.h b/library/backend/event.h
index 277aadd..7fe41a5 100644
--- a/library/backend/event.h
+++ b/library/backend/event.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2001 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -18,32 +18,41 @@
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#ifndef __EVENT_H__ 21#ifndef __EVENT_H__
22#define __EVENT_H__ 22#define __EVENT_H__
23 23
24#include <qdatetime.h> 24#include <qdatetime.h>
25#include <qvaluelist.h> 25#include <qvaluelist.h>
26#include <qcolor.h>
26 27
27#ifdef PALMTOPCENTER 28#ifdef PALMTOPCENTER
28#include <qpc/qsorter.h> 29#include <qpc/qsorter.h>
29#endif 30#endif
30#include <qpe/palmtoprecord.h> 31#include <qtopia/private/palmtoprecord.h>
31 32
32#include <qpe/timeconversion.h> 33#include <qpe/timeconversion.h>
33 34
35static const QColor colorNormal = QColor(255, 0 , 0 );
36static const QColor colorRepeat = QColor(0 , 0 , 255);
37static const QColor colorNormalLight = QColor(255, 220, 220);
38static const QColor colorRepeatLight = QColor(200, 200, 255);
39
34class EventPrivate; 40class EventPrivate;
35class QPC_EXPORT Event : public Qtopia::Record 41class QPC_EXPORT Event : public Qtopia::Record
36{ 42{
37public: 43public:
38 enum RepeatType { NoRepeat = -1, Daily, Weekly, MonthlyDay, 44 enum RepeatType { NoRepeat = -1, Daily, Weekly, MonthlyDay,
39 MonthlyDate, Yearly }; 45 MonthlyDate, Yearly };
46
47 // Don't use this.
40 enum Days { MON = 0x01, TUE = 0x02, WED = 0x04, THU = 0x08, 48 enum Days { MON = 0x01, TUE = 0x02, WED = 0x04, THU = 0x08,
41 FRI = 0x10, SAT = 0x20, SUN = 0x40 }; 49 FRI = 0x10, SAT = 0x20, SUN = 0x40 };
50 // Don't use this.
42 struct QPC_EXPORT RepeatPattern 51 struct QPC_EXPORT RepeatPattern
43 { 52 {
44 RepeatPattern() { 53 RepeatPattern() {
45 type = NoRepeat; frequency = -1; days = 0; position = 0; createTime = -1; 54 type = NoRepeat; frequency = -1; days = 0; position = 0; createTime = -1;
46 hasEndDate = FALSE; endDateUTC = 0; } 55 hasEndDate = FALSE; endDateUTC = 0; }
47 bool operator ==( const RepeatPattern &right ) const; 56 bool operator ==( const RepeatPattern &right ) const;
48 57
49 RepeatType type; 58 RepeatType type;
@@ -65,70 +74,99 @@ public:
65 74
66 static void writeVCalendar( const QString &filename, const QValueList<Event> &events); 75 static void writeVCalendar( const QString &filename, const QValueList<Event> &events);
67 static void writeVCalendar( const QString &filename, const Event &event); 76 static void writeVCalendar( const QString &filename, const Event &event);
68 static QValueList<Event> readVCalendar( const QString &filename ); 77 static QValueList<Event> readVCalendar( const QString &filename );
69 78
70 enum Type { Normal, AllDay }; 79 enum Type { Normal, AllDay };
71 enum SoundTypeChoice { Silent, Loud }; 80 enum SoundTypeChoice { Silent, Loud };
72 81
82 // Don't use these, there are essentially meaningless.
73 bool operator<( const Event &e1) const { return start() < e1.start(); }; 83 bool operator<( const Event &e1) const { return start() < e1.start(); };
74 bool operator<=( const Event &e1 ) const { return start() <= e1.start(); }; 84 bool operator<=( const Event &e1 ) const { return start() <= e1.start(); };
75 bool operator!=( const Event &e1 ) const { return !( *this == e1 ); }; 85 bool operator!=( const Event &e1 ) const { return !( *this == e1 ); };
76 bool operator>( const Event &e1 ) const { return start() > e1.start(); }; 86 bool operator>( const Event &e1 ) const { return start() > e1.start(); };
77 bool operator>=(const Event &e1 ) const { return start() >= e1.start(); }; 87 bool operator>=(const Event &e1 ) const { return start() >= e1.start(); };
78 bool operator==( const Event &e ) const; 88 bool operator==( const Event &e ) const;
79 89
80 void setDescription( const QString &s ); 90 void setDescription( const QString &s );
81 const QString &description() const; 91 const QString &description() const;
82 92
83 void setLocation( const QString &s ); 93 void setLocation( const QString &s );
84 const QString &location() const; 94 const QString &location() const;
85 95
86 void setType( Type t ); 96 void setNotes( const QString &n );
87 Type type() const; 97 const QString &notes() const;
98
99 void setType( Type t ); // Don't use me.
100 Type type() const; // Don't use me.
101
102 void setAllDay(bool);
103 bool isAllDay() const;
104
88 void setStart( const QDateTime &d ); 105 void setStart( const QDateTime &d );
89 void setStart( time_t time ); 106 void setStart( time_t time ); // don't use me.
90 QDateTime start( bool actual = FALSE ) const; 107 QDateTime start( ) const;
91 time_t startTime() const { return startUTC; } 108 QDateTime start( bool actual ) const; // don't use me.
109 time_t startTime() const { return startUTC; } // don't use me.
92 void setEnd( const QDateTime &e ); 110 void setEnd( const QDateTime &e );
93 void setEnd( time_t time ); 111 void setEnd( time_t time ); // don't use me
94 QDateTime end( bool actual = FALSE ) const; 112 QDateTime end( ) const;
95 time_t endTime() const { return endUTC; } 113 QDateTime end( bool actual ) const; // don't use me.
114 time_t endTime() const { return endUTC; } // don't use me.
96 void setTimeZone( const QString & ); 115 void setTimeZone( const QString & );
97 const QString &timeZone() const; 116 const QString &timeZone() const;
98 void setAlarm( bool b, int minutes, SoundTypeChoice ); 117 void setAlarm( int minutes, SoundTypeChoice );
118 void clearAlarm();
119 void setAlarm( bool b, int minutes, SoundTypeChoice ); // Don't use me.
99 bool hasAlarm() const; 120 bool hasAlarm() const;
100 int alarmTime() const; 121 int alarmDelay() const;
122 int alarmTime() const; // Don't use me.
101 SoundTypeChoice alarmSound() const; 123 SoundTypeChoice alarmSound() const;
124
125 RepeatType repeatType() const;
126 int frequency() const;
127 int weekOffset() const;
128 QDate repeatTill() const;
129 bool repeatForever() const;
130 bool repeatOnWeekDay(int day) const;
131
132 void setRepeatType(RepeatType);
133 void setFrequency(int);
134 void setRepeatTill(const QDate &);
135 void setRepeatForever(bool);
136 void setRepeatOnWeekDay(int day, bool enable);
137
138 // Don't use any of these.
102 void setRepeat( bool b, const RepeatPattern &p ); 139 void setRepeat( bool b, const RepeatPattern &p );
103 void setRepeat( const RepeatPattern &p ); 140 void setRepeat( const RepeatPattern &p );
104 bool hasRepeat() const; 141 bool hasRepeat() const;
105 const RepeatPattern &repeatPattern() const; 142 const RepeatPattern &repeatPattern() const;
106 RepeatPattern &repeatPattern(); 143 RepeatPattern &repeatPattern();
107 void setNotes( const QString &n );
108 const QString &notes() const;
109 bool doRepeat() const { return pattern.type != NoRepeat; } 144 bool doRepeat() const { return pattern.type != NoRepeat; }
110 145
111 void save( QString& buf ); 146 void save( QString& buf );
112 //void load( Node *n ); 147 //void load( Node *n );
113 148
149 bool match( const QRegExp &r ) const;
150
151 // Don't use these either. Functionality will be moved elsewhere.
152
114 // helper function to calculate the week of the given date 153 // helper function to calculate the week of the given date
115 static int week( const QDate& date ); 154 static int week( const QDate& date );
116 // calculates the number of occurrences of the week day of 155 // calculates the number of occurrences of the week day of
117 // the given date from the start of the month 156 // the given date from the start of the month
118 static int occurrence( const QDate& date ); 157 static int occurrence( const QDate& date );
119 // returns a proper days-char for a given dayOfWeek() 158 // returns a proper days-char for a given dayOfWeek()
120 static char day( int dayOfWeek ) { return 1 << ( dayOfWeek - 1 ); } 159 static char day( int dayOfWeek ) { return 1 << ( dayOfWeek - 1 ); }
121 // returns the dayOfWeek for the *first* day it finds (ignores 160 // returns the dayOfWeek for the *first* day it finds (ignores
122 // any further days!). Returns 1 (Monday) if there isn't any day found 161 // any further days!). Returns 1 (Monday) if there isn't any day found
123 static int dayOfWeek( char day ); 162 static int dayOfWeek( char day );
124 // returns the difference of months from first to second. 163 // returns the difference of months from first to second.
125 static int monthDiff( const QDate& first, const QDate& second ); 164 static int monthDiff( const QDate& first, const QDate& second );
126 bool match( const QRegExp &r ) const;
127 165
128private: 166private:
129 Qtopia::UidGen &uidGen() { return sUidGen; } 167 Qtopia::UidGen &uidGen() { return sUidGen; }
130 static Qtopia::UidGen sUidGen; 168 static Qtopia::UidGen sUidGen;
131 169
132 QString descript, locat, categ; 170 QString descript, locat, categ;
133 Type typ : 4; 171 Type typ : 4;
134 bool startTimeDirty : 1; 172 bool startTimeDirty : 1;
@@ -206,16 +244,119 @@ private:
206 class EffectiveEventPrivate *d; 244 class EffectiveEventPrivate *d;
207 Event mEvent; 245 Event mEvent;
208 QDate mDate; 246 QDate mDate;
209 QTime mStart, 247 QTime mStart,
210 mEnd; 248 mEnd;
211 249
212}; 250};
213 251
252inline void Event::setAlarm( int minutes, SoundTypeChoice s )
253{
254 setAlarm(TRUE, minutes, s);
255}
256
257inline void Event::clearAlarm()
258{
259 setAlarm(FALSE, 0, Silent);
260}
261
262inline int Event::alarmDelay() const
263{
264 return alarmTime();
265}
266
267inline void Event::setAllDay(bool enable)
268{
269 if (enable)
270 setType(AllDay);
271 else
272 setType(Normal);
273};
274
275inline bool Event::isAllDay() const
276{
277 return type() == AllDay;
278}
279
280inline Event::RepeatType Event::repeatType() const
281{
282 return repeatPattern().type;
283}
284
285inline int Event::frequency() const
286{
287 return repeatPattern().frequency;
288}
289
290inline int Event::weekOffset() const
291{
292 if (start().date().day() == 1)
293 return 1;
294 return (start().date().day() - 1) / 7 + 1;
295}
296
297inline QDate Event::repeatTill() const
298{
299 return repeatPattern().endDate();
300}
301
302inline bool Event::repeatForever() const
303{
304 return !repeatPattern().hasEndDate;
305}
306
307inline void Event::setRepeatType(RepeatType t)
308{
309 pattern.type = t;
310}
311
312inline void Event::setFrequency(int f)
313{
314 pattern.frequency = f;
315}
316
317inline void Event::setRepeatTill(const QDate &d)
318{
319 pattern.setEndDate(d);
320 pattern.hasEndDate = TRUE;
321}
322
323inline void Event::setRepeatForever(bool b)
324{
325 if (!b == pattern.hasEndDate)
326 return;
327 if (!b && !pattern.hasEndDate)
328 pattern.setEndDate(end().date());
329 pattern.hasEndDate = !b;
330}
331
332inline bool Event::repeatOnWeekDay(int day) const
333{
334 if (pattern.type != Weekly)
335 return FALSE;
336 return ( (1 << (day - 1)) & pattern.days ) != 0;
337}
338
339inline void Event::setRepeatOnWeekDay(int day, bool enable)
340{
341 if ( repeatOnWeekDay( day ) != enable )
342 pattern.days ^= 1 << (day - 1);
343}
344
345inline QDateTime Event::start( ) const
346{
347 return start(FALSE);
348}
349
350inline QDateTime Event::end( ) const
351{
352 return end(FALSE);
353}
354
214#ifdef PALMTOPCENTER 355#ifdef PALMTOPCENTER
215class QPC_EXPORT EffectiveEventSizeSorter : public QSorter<EffectiveEvent> 356class QPC_EXPORT EffectiveEventSizeSorter : public QSorter<EffectiveEvent>
216{ 357{
217public: 358public:
218 int compare( const EffectiveEvent& a, const EffectiveEvent& b ) const 359 int compare( const EffectiveEvent& a, const EffectiveEvent& b ) const
219 { 360 {
220 return a.size() - b.size(); 361 return a.size() - b.size();
221 } 362 }
diff --git a/library/backend/palmtoprecord.cpp b/library/backend/palmtoprecord.cpp
index 0d57699..3cfa874 100644
--- a/library/backend/palmtoprecord.cpp
+++ b/library/backend/palmtoprecord.cpp
@@ -1,34 +1,45 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free 7** GNU General Public License version 2 as published by the Free Software
8** Software Foundation and appearing in the file LICENSE.GPL included 8** Foundation and appearing in the file LICENSE.GPL included in the
9** in the packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** PARTICULAR PURPOSE.
14** 13**
15** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
16** 15**
17** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
18** not clear to you. 17** not clear to you.
19** 18**
20**********************************************************************/ 19**********************************************************************/
21#include "palmtoprecord.h" 20#include <qtopia/private/palmtoprecord.h>
22#include "stringutil.h" 21#include <qtopia/stringutil.h>
23#include <qstringlist.h> 22#include <qstringlist.h>
24 23
24/*! \class Qtopia::PalmtopRecord palmtoprecord.h
25 \brief The Qtopia::PalmtopRecord class is the base class for all PIM records.
26
27 Provides unique id and category support for all PIM records.
28
29 \ingroup qtopiaemb
30 \ingroup qtopiadesktop
31*/
32
33
25namespace Qtopia { 34namespace Qtopia {
26 35
36
37
27Record &Record::operator=( const Record &c ) 38Record &Record::operator=( const Record &c )
28{ 39{
29 mUid = c.mUid; 40 mUid = c.mUid;
30 mCats = c.mCats; 41 mCats = c.mCats;
31 customMap = c.customMap; 42 customMap = c.customMap;
32 return *this; 43 return *this;
33} 44}
34 45
@@ -36,18 +47,21 @@ void Record::setCategories( int single )
36{ 47{
37 if ( single == 0 ) 48 if ( single == 0 )
38 return; 49 return;
39 mCats.resize(1); 50 mCats.resize(1);
40 mCats[0] = single; 51 mCats[0] = single;
41} 52}
42 53
43// convenience methods provided for loading and saving to xml 54// convenience methods provided for loading and saving to xml
44QString Record::idsToString( const QArray<int> &cats ) 55QString Record::idsToString( const QArray<int> &catsUnsorted )
45{ 56{
57 QArray<int> cats = catsUnsorted;
58 cats.sort();
59
46 QString str; 60 QString str;
47 for ( uint i = 0; i < cats.size(); i++ ) 61 for ( uint i = 0; i < cats.size(); i++ )
48 if ( i == 0 ) 62 if ( i == 0 )
49 str = QString::number( cats[int(i)] ); 63 str = QString::number( cats[int(i)] );
50 else 64 else
51 str += ";" + QString::number( cats[int(i)] ); 65 str += ";" + QString::number( cats[int(i)] );
52 66
53 return str; 67 return str;
@@ -79,40 +93,40 @@ QString Record::customField( const QString &key) const
79 return QString::null; 93 return QString::null;
80} 94}
81 95
82/*! 96/*!
83 Sets the string stored for the custom field \a key to \a value. 97 Sets the string stored for the custom field \a key to \a value.
84 */ 98 */
85void Record::setCustomField( const QString &key, const QString &value) 99void Record::setCustomField( const QString &key, const QString &value)
86{ 100{
87 qWarning("setting custom " + key + " to " + value); 101// qWarning("setting custom " + key + " to " + value);
88 if (customMap.contains(key)) 102 if (customMap.contains(key))
89 customMap.replace(key, value); 103 customMap.replace(key, value);
90 else 104 else
91 customMap.insert(key, value); 105 customMap.insert(key, value);
92 106
93 qWarning(QString("custom size %1").arg(customMap.count())); 107// qWarning(QString("custom size %1").arg(customMap.count()));
94} 108}
95 109
96/*! 110/*!
97 Removes the custom field \a key. 111 Removes the custom field \a key.
98 */ 112 */
99void Record::removeCustomField(const QString &key) 113void Record::removeCustomField(const QString &key)
100{ 114{
101 customMap.remove(key); 115 customMap.remove(key);
102} 116}
103 117
104QString Record::customToXml() const 118QString Record::customToXml() const
105{ 119{
106 //qWarning(QString("writing custom %1").arg(customMap.count())); 120 //qWarning(QString("writing custom %1").arg(customMap.count()));
107 QString buf(" "); 121 QString buf(" ");
108 for ( QMap<QString, QString>::ConstIterator cit = customMap.begin(); 122 for ( QMap<QString, QString>::ConstIterator cit = customMap.begin();
109 cit != customMap.end(); ++cit) { 123 cit != customMap.end(); ++cit) {
110 qWarning(".ITEM."); 124 // qWarning(".ITEM.");
111 buf += cit.key(); 125 buf += cit.key();
112 buf += "=\""; 126 buf += "=\"";
113 buf += escapeString(cit.data()); 127 buf += escapeString(cit.data());
114 buf += "\" "; 128 buf += "\" ";
115 } 129 }
116 return buf; 130 return buf;
117} 131}
118 132
diff --git a/library/backend/palmtoprecord.h b/library/backend/palmtoprecord.h
index 0372011..72f7d1c 100644
--- a/library/backend/palmtoprecord.h
+++ b/library/backend/palmtoprecord.h
@@ -1,41 +1,38 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free 7** GNU General Public License version 2 as published by the Free Software
8** Software Foundation and appearing in the file LICENSE.GPL included 8** Foundation and appearing in the file LICENSE.GPL included in the
9** in the packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** PARTICULAR PURPOSE.
14** 13**
15** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
16** 15**
17** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
18** not clear to you. 17** not clear to you.
19** 18**
20**********************************************************************/ 19**********************************************************************/
21
22#ifndef QTPALMTOP_RECORD_H 20#ifndef QTPALMTOP_RECORD_H
23#define QTPALMTOP_RECORD_H 21#define QTPALMTOP_RECORD_H
24
25#include <qglobal.h> 22#include <qglobal.h>
26#include "qpcglobal.h" 23#include "qpcglobal.h"
27#include "palmtopuidgen.h" 24#include "palmtopuidgen.h"
28#include <qarray.h> 25#include <qarray.h>
29#include <qmap.h> 26#include <qmap.h>
30 27
31#if defined(QPC_TEMPLATEDLL) 28#if defined(QPC_TEMPLATEDLL)
32// MOC_SKIP_BEGIN 29// MOC_SKIP_BEGIN
33template class QPC_EXPORT QMap<QString, QString>; 30QPC_TEMPLATEEXTERN template class QPC_EXPORT QMap<QString, QString>;
34// MOC_SKIP_END 31// MOC_SKIP_END
35#endif 32#endif
36 33
37class QRegExp; 34class QRegExp;
38namespace Qtopia { 35namespace Qtopia {
39 36
40class RecordPrivate; 37class RecordPrivate;
41class QPC_EXPORT Record 38class QPC_EXPORT Record
@@ -44,20 +41,27 @@ public:
44 Record() : mUid(0), mCats() { } 41 Record() : mUid(0), mCats() { }
45 Record( const Record &c ) :mUid( c.mUid ), mCats ( c.mCats ), customMap(c.customMap) { } 42 Record( const Record &c ) :mUid( c.mUid ), mCats ( c.mCats ), customMap(c.customMap) { }
46 virtual ~Record() { } 43 virtual ~Record() { }
47 44
48 Record &operator=( const Record &c ); 45 Record &operator=( const Record &c );
49 46
50 virtual bool match( const QRegExp & ) const { return FALSE; } 47 virtual bool match( const QRegExp & ) const { return FALSE; }
51 48
52 void setCategories( const QArray<int> &v ) { mCats = v; } 49 void setCategories( const QArray<int> &v ) { mCats = v; mCats.sort(); }
53 void setCategories( int single ); 50 void setCategories( int single );
54 const QArray<int> &categories() const { return mCats; } 51 const QArray<int> &categories() const { return mCats; }
55 52
53 void reassignCategoryId( int oldId, int newId )
54 {
55 int index = mCats.find( oldId );
56 if ( index >= 0 )
57 mCats[index] = newId;
58 }
59
56 int uid() const { return mUid; }; 60 int uid() const { return mUid; };
57 virtual void setUid( int i ) { mUid = i; uidGen().store( mUid ); } 61 virtual void setUid( int i ) { mUid = i; uidGen().store( mUid ); }
58 bool isValidUid() const { return mUid != 0; } 62 bool isValidUid() const { return mUid != 0; }
59 void assignUid() { setUid( uidGen().generate() ); } 63 void assignUid() { setUid( uidGen().generate() ); }
60 64
61 virtual QString customField(const QString &) const; 65 virtual QString customField(const QString &) const;
62 virtual void setCustomField(const QString &, const QString &); 66 virtual void setCustomField(const QString &, const QString &);
63 virtual void removeCustomField(const QString &); 67 virtual void removeCustomField(const QString &);
@@ -72,23 +76,20 @@ public:
72 // convenience methods provided for loading and saving to xml 76 // convenience methods provided for loading and saving to xml
73 static QArray<int> idsFromString( const QString &str ); 77 static QArray<int> idsFromString( const QString &str );
74 78
75 // for debugging 79 // for debugging
76 static void dump( const QMap<int, QString> &map ); 80 static void dump( const QMap<int, QString> &map );
77 81
78protected: 82protected:
79 virtual UidGen &uidGen() = 0; 83 virtual UidGen &uidGen() = 0;
80
81 virtual QString customToXml() const; 84 virtual QString customToXml() const;
82
83private: 85private:
84 int mUid; 86 int mUid;
85 QArray<int> mCats; 87 QArray<int> mCats;
86
87 QMap<QString, QString> customMap; 88 QMap<QString, QString> customMap;
88
89 RecordPrivate *d; 89 RecordPrivate *d;
90}; 90};
91 91
92} 92}
93 93
94#endif 94#endif
95
diff --git a/library/backend/palmtopuidgen.h b/library/backend/palmtopuidgen.h
index 1a16681..c3fbcb9 100644
--- a/library/backend/palmtopuidgen.h
+++ b/library/backend/palmtopuidgen.h
@@ -1,38 +1,38 @@
1#ifndef QTPALMTOP_UIDGEN_H
2#define QTPALMTOP_UIDGEN_H
3/********************************************************************** 1/**********************************************************************
4** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
5** 3**
6** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
7** 5**
8** Licensees holding valid Qtopia Developer license may use this 6** This file may be distributed and/or modified under the terms of the
9** file in accordance with the Qtopia Developer License Agreement 7** GNU General Public License version 2 as published by the Free Software
10** provided with the Software. 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
11** 10**
12** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
13** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
14** PURPOSE.
15** 13**
16** email sales@trolltech.com for information about Qtopia License 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
17** Agreements.
18** 15**
19** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
20** not clear to you. 17** not clear to you.
21** 18**
22**********************************************************************/ 19**********************************************************************/
23 20
21#ifndef QTPALMTOP_UIDGEN_H
22#define QTPALMTOP_UIDGEN_H
23
24#include <time.h> 24#include <time.h>
25#include <qmap.h> 25#include <qmap.h>
26#include "qpcglobal.h" 26#include "qpcglobal.h"
27 27
28#if defined(QPC_TEMPLATEDLL) 28#if defined(QPC_TEMPLATEDLL)
29// MOC_SKIP_BEGIN 29// MOC_SKIP_BEGIN
30template class QPC_EXPORT QMap< int, bool >; 30QPC_TEMPLATEEXTERN template class QPC_EXPORT QMap< int, bool >;
31// MOC_SKIP_END 31// MOC_SKIP_END
32#endif 32#endif
33 33
34namespace Qtopia { 34namespace Qtopia {
35 35
36 36
37class QPC_EXPORT UidGen 37class QPC_EXPORT UidGen
38{ 38{
diff --git a/library/backend/qfiledirect_p.h b/library/backend/qfiledirect_p.h
index 3ade622..976c69f 100644
--- a/library/backend/qfiledirect_p.h
+++ b/library/backend/qfiledirect_p.h
@@ -1,37 +1,35 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2001 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** Licensees holding valid Qtopia Developer license may use this 6** This file may be distributed and/or modified under the terms of the
7** file in accordance with the Qtopia Developer License Agreement 7** GNU General Public License version 2 as published by the Free Software
8** provided with the Software. 8** Foundation and appearing in the file LICENSE.GPL included in the
9** 9** packaging of this file.
10** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING 10**
11** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** email sales@trolltech.com for information about Qtopia License 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** Agreements. 15**
16** 16** Contact info@trolltech.com if any conditions of this licensing are
17** Contact info@trolltech.com if any conditions of this licensing are 17** not clear to you.
18** not clear to you. 18**
19** 19**********************************************************************/
20**********************************************************************/ 20
21 21#ifndef QFILE_DIRECT_H
22#ifndef QFILE_DIRECT_H 22#define QFILE_DIRECT_H
23#define QFILE_DIRECT_H 23#include <qfile.h>
24#include <qfile.h> 24#include <qtopia/private/qpcglobal.h>
25#include <qpe/qpcglobal.h> 25
26 26class QPC_EXPORT QFileDirect : public QFile
27class QPC_EXPORT QFileDirect : public QFile 27{
28{ 28public:
29public: 29 QFileDirect() : QFile() { }
30 QFileDirect() : QFile() { } 30 QFileDirect( const QString &name ) : QFile(name) { }
31 QFileDirect( const QString &name ) : QFile(name) { } 31
32 32 FILE *directHandle() { return fh; }
33 FILE *directHandle() { return fh; } 33};
34}; 34
35 35#endif
36#endif
37
diff --git a/library/backend/qpcglobal.h b/library/backend/qpcglobal.h
index 0d60272..7b71f06 100644
--- a/library/backend/qpcglobal.h
+++ b/library/backend/qpcglobal.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** Licensees holding valid Qtopia Developer license may use this 6** Licensees holding valid Qtopia Developer license may use this
7** file in accordance with the Qtopia Developer License Agreement 7** file in accordance with the Qtopia Developer License Agreement
8** provided with the Software. 8** provided with the Software.
9** 9**
10** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING 10** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING
11** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 11** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
12** PURPOSE. 12** PURPOSE.
@@ -17,30 +17,33 @@
17** Contact info@trolltech.com if any conditions of this licensing are 17** Contact info@trolltech.com if any conditions of this licensing are
18** not clear to you. 18** not clear to you.
19** 19**
20**********************************************************************/ 20**********************************************************************/
21 21
22#ifndef QPC_GLOBAL_H 22#ifndef QPC_GLOBAL_H
23#define QPC_GLOBAL_H 23#define QPC_GLOBAL_H
24 24
25#if ( defined(Q_OS_WIN32) || defined(Q_OS_WIN64) ) && defined(PALMTOPCENTER)
26#include <qglobal.h> 25#include <qglobal.h>
26
27#if ( defined(Q_OS_WIN32) || defined(Q_OS_WIN64) ) && defined(PALMTOPCENTER)
27// # if defined(QT_NODLL) 28// # if defined(QT_NODLL)
28//# undef QPC_MAKEDLL 29//# undef QPC_MAKEDLL
29//# undef QPC_DLL 30//# undef QPC_DLL
30 # if defined(QPC_MAKEDLL)/* create a Qt DLL library */ 31 # if defined(QPC_MAKEDLL)/* create a Qt DLL library */
31# if defined(QPC_DLL) 32# if defined(QPC_DLL)
32# undef QPC_DLL 33# undef QPC_DLL
33# endif 34# endif
34# define QPC_EXPORT __declspec(dllexport) 35# define QPC_EXPORT __declspec(dllexport)
36# define QPC_TEMPLATEEXTERN
35# define QPC_TEMPLATEDLL 37# define QPC_TEMPLATEDLL
36 # undef QPC_DISABLE_COPY/* avoid unresolved externals */ 38 # undef QPC_DISABLE_COPY/* avoid unresolved externals */
37 # elif defined(QPC_DLL) /* use a Qt DLL library */ 39 # elif defined(QPC_DLL) /* use a Qt DLL library */
38# define QPC_EXPORT __declspec(dllimport) 40# define QPC_EXPORT __declspec(dllimport)
41# define QPC_TEMPLATEEXTERN extern
39# define QPC_TEMPLATEDLL 42# define QPC_TEMPLATEDLL
40 # undef QPC_DISABLE_COPY/* avoid unresolved externals */ 43 # undef QPC_DISABLE_COPY/* avoid unresolved externals */
41# endif 44# endif
42#else 45#else
43 # undef QPC_MAKEDLL /* ignore these for other platforms */ 46 # undef QPC_MAKEDLL /* ignore these for other platforms */
44# undef QPC_DLL 47# undef QPC_DLL
45#endif 48#endif
46#endif 49#endif
diff --git a/library/backend/recordfields.h b/library/backend/recordfields.h
index 4196c8b..1167ed3 100644
--- a/library/backend/recordfields.h
+++ b/library/backend/recordfields.h
@@ -1,23 +1,22 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** Licensees holding valid Qtopia Developer license may use this 6** This file may be distributed and/or modified under the terms of the
7** file in accordance with the Qtopia Developer License Agreement 7** GNU General Public License version 2 as published by the Free Software
8** provided with the Software. 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
9** 10**
10** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
11** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
12** PURPOSE.
13** 13**
14** email sales@trolltech.com for information about Qtopia License 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** Agreements.
16** 15**
17** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
18** not clear to you. 17** not clear to you.
19** 18**
20**********************************************************************/ 19**********************************************************************/
21#ifndef QPC_RECORD_FIELDS_H 20#ifndef QPC_RECORD_FIELDS_H
22#define QPC_RECORD_FIELDS_H 21#define QPC_RECORD_FIELDS_H
23#include "qpcglobal.h" 22#include "qpcglobal.h"
@@ -83,19 +82,20 @@ namespace Qtopia
83 Gender, 82 Gender,
84 Birthday, 83 Birthday,
85 Anniversary, 84 Anniversary,
86 Nickname, 85 Nickname,
87 Children, 86 Children,
88 87
89 // other 88 // other
90 Notes, 89 Notes,
91 Groups
92 90
93 ,rid, 91 // used for internal record keeping, not for end user.
92 Groups,
93 rid,
94 rinfo 94 rinfo
95 }; 95 };
96 96
97 // dataset = "todolist" 97 // dataset = "todolist"
98 enum TaskFields { 98 enum TaskFields {
99 TaskUid = UID_ID, 99 TaskUid = UID_ID,
100 TaskCategory = CATEGORY_ID, 100 TaskCategory = CATEGORY_ID,
101 101
diff --git a/library/backend/stringutil.cpp b/library/backend/stringutil.cpp
deleted file mode 100644
index df58f54..0000000
--- a/library/backend/stringutil.cpp
+++ b/dev/null
@@ -1,415 +0,0 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free
8** Software Foundation and appearing in the file LICENSE.GPL included
9** in the packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING
12** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A
13** PARTICULAR PURPOSE.
14**
15** See http://www.trolltech.com/gpl/ for GPL licensing information.
16**
17** Contact info@trolltech.com if any conditions of this licensing are
18** not clear to you.
19**
20**********************************************************************/
21
22#include "stringutil.h"
23#include <qregexp.h>
24#include <qstringlist.h>
25
26namespace Qtopia
27{
28
29
30
31/*
32 Very, very simple Latin-1 only collation guaranteed to displease anyone
33 who actually uses the non-ASCII characters.
34 */
35
36static const char collationHack[] = {
370x00, //C-@
380x01, //C-A
390x02, //C-B
400x03, //C-C
410x04, //C-D
420x05, //C-E
430x06, //C-F
440x07, //C-G
450x08, //C-H
460x09, //C-I
470x0a, //C-J
480x0b, //C-K
490x0c, //C-L
500x0d, //C-M
510x0e, //C-N
520x0f, //C-O
530x10, //C-P
540x11, //C-Q
550x12, //C-R
560x13, //C-S
570x14, //C-T
580x15, //C-U
590x16, //C-V
600x17, //C-W
610x18, //C-X
620x19, //C-Y
630x1a, //C-Z
640x1b, //C-[
650x1c, //C-\
660x1d, //C-]
670x1e, //C-^
680x1f, //C-_
69' ', //
70'!', //!
71'"', //"
72'#', //#
73'$', //$
74'%', //%
75'&', //&
76'\'', //'
77'(', //(
78')', //)
79'*', //*
80'+', //+
81',', //,
82'-', //-
83'.', //.
84'/', ///
850x80, //0
860x81, //1
870x82, //2
880x83, //3
890x84, //4
900x85, //5
910x86, //6
920x87, //7
930x88, //8
940x89, //9
95':', //:
96';', //;
97'<', //<
98'=', //=
99'>', //>
100'?', //?
101'@', //@
102'A', //A
103'B', //B
104'C', //C
105'D', //D
106'E', //E
107'F', //F
108'G', //G
109'H', //H
110'I', //I
111'J', //J
112'K', //K
113'L', //L
114'M', //M
115'N', //N
116'O', //O
117'P', //P
118'Q', //Q
119'R', //R
120'S', //S
121'T', //T
122'U', //U
123'V', //V
124'W', //W
125'X', //X
126'Y', //Y
127'Z', //Z
128'[', //[
129'\\', //\
130']', //]
131'^', //^
132'_', //_
133'`', //`
134'A', //a
135'B', //b
136'C', //c
137'D', //d
138'E', //e
139'F', //f
140'G', //g
141'H', //h
142'I', //i
143'J', //j
144'K', //k
145'L', //l
146'M', //m
147'N', //n
148'O', //o
149'P', //p
150'Q', //q
151'R', //r
152'S', //s
153'T', //t
154'U', //u
155'V', //v
156'W', //w
157'X', //x
158'Y', //y
159'Z', //z
160'{', //{
161'|', //|
162'}', //}
163'~', //~
164'', //
1650x80, //C-M-@
1660x81, //C-M-A
1670x82, //C-M-B
1680x83, //C-M-C
1690x84, //C-M-D
1700x85, //C-M-E
1710x86, //C-M-F
1720x87, //C-M-G
1730x88, //C-M-H
1740x89, //C-M-I
1750x8a, //C-M-J
1760x8b, //C-M-K
1770x8c, //C-M-L
1780x8d, //C-M-M
1790x8e, //C-M-N
1800x8f, //C-M-O
1810x90, //C-M-P
1820x91, //C-M-Q
1830x92, //C-M-R
1840x93, //C-M-S
1850x94, //C-M-T
1860x95, //C-M-U
1870x96, //C-M-V
1880x97, //C-M-W
1890x98, //C-M-X
1900x99, //C-M-Y
1910x9a, //C-M-Z
1920x9b, //C-M-[
1930x9c, //C-M-\
1940x9d, //C-M-]
1950x9e, //C-M-^
1960x9f, //C-M-_
197' ', // 
198'¡', //¡
199'¢', //¢
200'£', //£
201'¤', //¤
202'¥', //¥
203'¦', //¦
204'§', //§
205'¨', //¨
206'©', //©
207'A', //ª
208'«', //«
209'¬', //¬
210'­', //­
211'®', //®
212'¯', //¯
213'O', //°
214'±', //±
215'²', //²
216'³', //³
217'´', //´
218'µ', //µ
219'P', //¶
220'·', //·
221'¸', //¸
222'¹', //¹
223'O', //º
224'»', //»
225'¼', //¼
226'½', //½
227'¾', //¾
228'¿', //¿
229'A', //À
230'A', //Á
231'A', //Â
232'A', //Ã
233'A', //Ä
234'A', //Å
235'A', //Æ
236'C', //Ç
237'E', //È
238'E', //É
239'E', //Ê
240'E', //Ë
241'I', //Ì
242'I', //Í
243'I', //Î
244'I', //Ï
245'D', //Ð
246'N', //Ñ
247'O', //Ò
248'O', //Ó
249'O', //Ô
250'O', //Õ
251'O', //Ö
252'×', //×
253'O', //Ø
254'U', //Ù
255'U', //Ú
256'U', //Û
257'U', //Ü
258'Y', //Ý
259'T', //Þ
260'S', //ß
261'A', //à
262'A', //á
263'A', //â
264'A', //ã
265'A', //ä
266'A', //å
267'A', //æ
268'C', //ç
269'E', //è
270'E', //é
271'E', //ê
272'E', //ë
273'I', //ì
274'I', //í
275'I', //î
276'I', //ï
277'D', //ð
278'N', //ñ
279'O', //ò
280'O', //ó
281'O', //ô
282'O', //õ
283'O', //ö
284'÷', //÷
285'O', //ø
286'U', //ù
287'U', //ú
288'U', //û
289'U', //ü
290'Y', //ý
291'T', //þ
292'Y', //ÿ
293};
294
295
296
297
298
299static void hackString ( QString &s )
300{
301 int len = s.length();
302 const QChar* uc = s.unicode();
303 for ( int i = 0; i < len; i++ ) {
304 if ( !uc++->row() )
305 s[i] = collationHack[s[i].cell()];
306 }
307}
308
309QString buildSortKey( const QString & s )
310{
311 QString res = s;
312 hackString( res );
313 return res;
314}
315
316QString buildSortKey( const QString & s1, const QString & s2 )
317{
318 QString res = s1 + QChar( '\0' ) + s2;
319 hackString( res );
320 return res;
321}
322
323QString buildSortKey( const QString & s1, const QString & s2,
324 const QString & s3 )
325{
326 QString res = s1 + QChar( '\0' ) + s2 + QChar( '\0' ) + s3;
327 hackString( res );
328 return res;
329}
330
331static inline QChar coll( QChar u )
332{
333 return u.row() ? u : QChar(collationHack[ u.cell() ]);
334}
335
336
337int compare( const QString & s1, const QString & s2 )
338{
339 const QChar* u1 = s1.unicode();
340 const QChar* u2 = s2.unicode();
341
342 if ( u1 == u2 )
343 return 0;
344 if ( u1 == 0 )
345 return 1;
346 if ( u2 == 0 )
347 return -1;
348 int l=QMIN(s1.length(),s2.length());
349 while ( l-- && coll(*u1) == coll(*u2) )
350 u1++,u2++;
351 if ( l==-1 )
352 return ( s1.length()-s2.length() );
353 return u1->unicode() - u2->unicode();
354}
355
356QString simplifyMultiLineSpace( const QString &multiLine )
357{
358 QString result;
359 QStringList lines = QStringList::split("\n", multiLine);
360 for ( QStringList::Iterator it = lines.begin(); it != lines.end(); ++it ) {
361 if ( it != lines.begin() )
362 result += "\n";
363 result += (*it).simplifyWhiteSpace();
364 }
365 return result;
366}
367
368QString escapeString( const QString& plain )
369{
370 QString tmp(plain);
371 int pos = tmp.length();
372 const QChar *uc = plain.unicode();
373 while ( pos-- ) {
374 unsigned char ch = uc[pos].latin1();
375 if ( ch == '&' )
376 tmp.replace( pos, 1, "&amp;" );
377 else if ( ch == '<' )
378 tmp.replace( pos, 1, "&lt;" );
379 else if ( ch == '>' )
380 tmp.replace( pos, 1, "&gt;" );
381 else if ( ch == '\"' )
382 tmp.replace( pos, 1, "&quot;" );
383 }
384 return tmp;
385}
386
387QString plainString( const char* escaped, unsigned int length )
388{
389 return plainString( QString::fromUtf8( escaped, length ) );
390}
391
392QString plainString( const QCString& string )
393{
394 // We first have to pass it through a ::fromUtf8()
395 return plainString( string.data(), string.length() );
396}
397
398QString plainString( const QString& string )
399{
400 QString tmp( string );
401 int pos = -1;
402 while ( (pos = tmp.find( "&", pos +1 ) ) != -1 ) {
403 if ( tmp.find( "&amp;", pos ) == pos )
404 tmp.replace( pos, 5, "&" );
405 else if ( tmp.find( "&lt;", pos ) == pos )
406 tmp.replace( pos, 4, "<" );
407 else if( tmp.find( "&gt;", pos ) == pos )
408 tmp.replace( pos, 4, ">" );
409 else if ( tmp.find( "&quot;", pos ) == pos )
410 tmp.replace( pos, 6, "\"" );
411 }
412 return tmp;
413}
414
415} // namespace QPC
diff --git a/library/backend/task.cpp b/library/backend/task.cpp
index f0a38f1..a00adb3 100644
--- a/library/backend/task.cpp
+++ b/library/backend/task.cpp
@@ -1,85 +1,200 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2001 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include <qpe/task.h> 21#include "task.h"
22#include <qregexp.h> 22#include "recordfields.h"
23#include <qstring.h>
24#include <qpe/recordfields.h>
25#include "vobject_p.h" 23#include "vobject_p.h"
26#include "timeconversion.h"
27#include "qfiledirect_p.h" 24#include "qfiledirect_p.h"
28 25
26#include <qtopia/timeconversion.h>
27
28#include <qregexp.h>
29#include <qstring.h>
30
29#include <stdio.h> 31#include <stdio.h>
30 32
31using namespace Qtopia; 33using namespace Qtopia;
32UidGen Task::sUidGen( UidGen::Qtopia ); 34UidGen Task::sUidGen( UidGen::Qtopia );
33 35
36/*!
37 \class Task
38 \brief The Task class holds the data of a todo entry.
39
40 This data includes the priority of the task, a description, an optional due
41 date, and whether the task is completed or not.
42
43 \ingroup qtopiaemb
44 \ingroup qtopiadesktop
45*/
46
47/*!
48 Creates a new, empty task.
49*/
34Task::Task() : Record(), mDue( FALSE ), 50Task::Task() : Record(), mDue( FALSE ),
35mDueDate( QDate::currentDate() ), 51mDueDate( QDate::currentDate() ),
36mCompleted( FALSE ), mPriority( 3 ), mDesc() 52mCompleted( FALSE ), mPriority( 3 ), mDesc()
37{ 53{
38} 54}
39 55
56/*!
57 \fn void Task::setPriority( int priority )
58
59 Sets the priority of the task to \a priority.
60*/
61
62/*!
63 \fn int Task::priority() const
64
65 Returns the priority of the task.
66*/
67
68/*!
69 \fn void Task::setDescription( const QString &description )
70
71 Sets the description of the task to \a description.
72 */
73
74/*!
75 \fn const QString &Task::description() const
76
77 Returns the description of the task.
78 */
79
80/*!
81 \fn void Task::setDueDate( const QDate &date, bool hasDue )
82
83 \internal
84 If \a hasDue is TRUE sets the due date of the task to \a date.
85 Otherwise clears the due date of the task.
86*/
87
88/*!
89 \fn void Task::setDueDate( const QDate &date )
90
91 Sets the due date of the task to \a date.
92*/
93
94/*!
95 \fn void Task::clearDueDate( )
96
97 Clears the due date of the task.
98*/
99
100/*!
101 \fn void Task::setCompleted( bool b )
102
103 If \a b is TRUE marks the task as completed. Otherwise marks the task as
104 uncompleted.
105*/
106
107/*!
108 \fn bool Task::isCompleted() const
109
110 Returns TRUE if the task is completed. Otherwise returns FALSE.
111*/
112
113/*!
114 \fn const QDate &Task::dueDate() const
115
116 Returns the due date of the task.
117 */
118
119/*!
120 \fn bool Task::hasDueDate() const
121
122 Returns TRUE if there is a due date set for the task. Otherwise returns
123 FALSE.
124*/
125
126/*!
127 \fn void Task::setHasDueDate( bool b )
128
129 \internal
130 Just don't ask. I really can't justify the function.
131*/
132
133
134/*!
135 \internal
136 Creates a new task. The properties of the task are set from \a m.
137*/
138
40Task::Task( const QMap<int, QString> &m ) : Record(), mDue( FALSE ), 139Task::Task( const QMap<int, QString> &m ) : Record(), mDue( FALSE ),
41mDueDate( QDate::currentDate() ), mCompleted( FALSE ), mPriority( 3 ), mDesc() 140mDueDate( QDate::currentDate() ), mCompleted( FALSE ), mPriority( 3 ), mDesc()
42{ 141{
43 //qDebug("Task::Task fromMap"); 142 //qDebug("Task::Task fromMap");
44 //dump( m ); 143 //dump( m );
45 for ( QMap<int,QString>::ConstIterator it = m.begin(); it != m.end();++it ) 144 for ( QMap<int,QString>::ConstIterator it = m.begin(); it != m.end();++it )
46 switch ( (TaskFields) it.key() ) { 145 switch ( (TaskFields) it.key() ) {
47 case HasDate: if ( *it == "1" ) mDue = TRUE; break; 146 case HasDate: if ( *it == "1" ) mDue = TRUE; break;
48 case Completed: setCompleted( *it == "1" ); break; 147 case Completed: setCompleted( *it == "1" ); break;
49 case TaskCategory: setCategories( idsFromString( *it ) ); break; 148 case TaskCategory: setCategories( idsFromString( *it ) ); break;
50 case TaskDescription: setDescription( *it ); break; 149 case TaskDescription: setDescription( *it ); break;
51 case Priority: setPriority( (*it).toInt() ); break; 150 case Priority: setPriority( (*it).toInt() ); break;
52 case Date: mDueDate = TimeConversion::fromString( (*it) ); break; 151 case Date: mDueDate = TimeConversion::fromString( (*it) ); break;
53 case TaskUid: setUid( (*it).toInt() ); break; 152 case TaskUid: setUid( (*it).toInt() ); break;
54 default: break; 153 case TaskRid:
154 case TaskRinfo:
155 break;
55 } 156 }
56} 157}
57 158
159/*!
160 Destroys a task.
161*/
58Task::~Task() 162Task::~Task()
59{ 163{
60} 164}
61 165
166/*!
167 \internal
168 Returns the task as a map of field ids to property values.
169*/
62QMap<int, QString> Task::toMap() const 170QMap<int, QString> Task::toMap() const
63{ 171{
64 QMap<int, QString> m; 172 QMap<int, QString> m;
65 m.insert( HasDate, hasDueDate() ? "1" : "0" ); 173 m.insert( HasDate, hasDueDate() ? "1" : "0" );
66 m.insert( Completed, isCompleted() ? "1" : "0" ); 174 m.insert( Completed, isCompleted() ? "1" : "0" );
67 m.insert( TaskCategory, idsToString( categories() ) ); 175 if ( categories().count() )
68 m.insert( TaskDescription, description() ); 176 m.insert( TaskCategory, idsToString( categories() ) );
177 if ( !description().isEmpty() )
178 m.insert( TaskDescription, description() );
69 m.insert( Priority, QString::number( priority() ) ); 179 m.insert( Priority, QString::number( priority() ) );
70 m.insert( Date, TimeConversion::toString( dueDate() ) ); 180 if ( hasDueDate() )
181 m.insert( Date, TimeConversion::toString( dueDate() ) );
71 m.insert( TaskUid, QString::number(uid()) ); 182 m.insert( TaskUid, QString::number(uid()) );
72 183
73 //qDebug("Task::toMap"); 184 //qDebug("Task::toMap");
74 //dump( m ); 185 //dump( m );
75 return m; 186 return m;
76} 187}
77 188
189/*!
190 \internal
191 Appends the task information to \a buf.
192*/
78void Task::save( QString& buf ) const 193void Task::save( QString& buf ) const
79{ 194{
80 buf += " Completed=\""; 195 buf += " Completed=\"";
81 // qDebug( "writing %d", complete ); 196 // qDebug( "writing %d", complete );
82 buf += QString::number( (int)mCompleted ); 197 buf += QString::number( (int)mCompleted );
83 buf += "\""; 198 buf += "\"";
84 buf += " HasDate=\""; 199 buf += " HasDate=\"";
85 // qDebug( "writing %d", ); 200 // qDebug( "writing %d", );
@@ -112,64 +227,79 @@ void Task::save( QString& buf ) const
112 buf += customToXml(); 227 buf += customToXml();
113 // qDebug ("writing uid %d", uid() ); 228 // qDebug ("writing uid %d", uid() );
114 buf += " Uid=\""; 229 buf += " Uid=\"";
115 buf += QString::number( uid() ); 230 buf += QString::number( uid() );
116 // terminate it in the application... 231 // terminate it in the application...
117 buf += "\""; 232 buf += "\"";
118} 233}
119 234
120bool Task::match ( const QRegExp &r ) const 235/*!
236 Returns TRUE if the task matches the regular expressions \a regexp.
237 Otherwise returns FALSE.
238*/
239bool Task::match ( const QRegExp &regexp ) const
121{ 240{
122 // match on priority, description on due date... 241 // match on priority, description on due date...
123 bool match; 242 bool match;
124 match = false; 243 match = false;
125 if ( QString::number( mPriority ).find( r ) > -1 ) 244 if ( QString::number( mPriority ).find( regexp ) > -1 )
126 match = true; 245 match = true;
127 else if ( mDue && mDueDate.toString().find( r ) > -1 ) 246 else if ( mDue && mDueDate.toString().find( regexp ) > -1 )
128 match = true; 247 match = true;
129 else if ( mDesc.find( r ) > -1 ) 248 else if ( mDesc.find( regexp ) > -1 )
130 match = true; 249 match = true;
131 return match; 250 return match;
132} 251}
133 252
253/*!
254 \internal
255*/
134static inline VObject *safeAddPropValue( VObject *o, const char *prop, const QString &value ) 256static inline VObject *safeAddPropValue( VObject *o, const char *prop, const QString &value )
135{ 257{
136 VObject *ret = 0; 258 VObject *ret = 0;
137 if ( o && !value.isEmpty() ) 259 if ( o && !value.isEmpty() )
138 ret = addPropValue( o, prop, value.latin1() ); 260 ret = addPropValue( o, prop, value.latin1() );
139 return ret; 261 return ret;
140} 262}
141 263
264/*!
265 \internal
266*/
142static inline VObject *safeAddProp( VObject *o, const char *prop) 267static inline VObject *safeAddProp( VObject *o, const char *prop)
143{ 268{
144 VObject *ret = 0; 269 VObject *ret = 0;
145 if ( o ) 270 if ( o )
146 ret = addProp( o, prop ); 271 ret = addProp( o, prop );
147 return ret; 272 return ret;
148} 273}
149 274
150 275
276/*!
277 \internal
278*/
151static VObject *createVObject( const Task &t ) 279static VObject *createVObject( const Task &t )
152{ 280{
153 VObject *vcal = newVObject( VCCalProp ); 281 VObject *vcal = newVObject( VCCalProp );
154 safeAddPropValue( vcal, VCVersionProp, "1.0" ); 282 safeAddPropValue( vcal, VCVersionProp, "1.0" );
155 VObject *task = safeAddProp( vcal, VCTodoProp ); 283 VObject *task = safeAddProp( vcal, VCTodoProp );
156 284
157 if ( t.hasDueDate() ) 285 if ( t.hasDueDate() )
158 safeAddPropValue( task, VCDueProp, TimeConversion::toISO8601( t.dueDate() ) ); 286 safeAddPropValue( task, VCDueProp, TimeConversion::toISO8601( t.dueDate() ) );
159 safeAddPropValue( task, VCDescriptionProp, t.description() ); 287 safeAddPropValue( task, VCDescriptionProp, t.description() );
160 if ( t.isCompleted() ) 288 if ( t.isCompleted() )
161 safeAddPropValue( task, VCStatusProp, "COMPLETED" ); 289 safeAddPropValue( task, VCStatusProp, "COMPLETED" );
162 safeAddPropValue( task, VCPriorityProp, QString::number( t.priority() ) ); 290 safeAddPropValue( task, VCPriorityProp, QString::number( t.priority() ) );
163 291
164 return vcal; 292 return vcal;
165} 293}
166 294
167 295/*!
296 \internal
297*/
168static Task parseVObject( VObject *obj ) 298static Task parseVObject( VObject *obj )
169{ 299{
170 Task t; 300 Task t;
171 301
172 VObjectIterator it; 302 VObjectIterator it;
173 initPropIterator( &it, obj ); 303 initPropIterator( &it, obj );
174 while( moreIteration( &it ) ) { 304 while( moreIteration( &it ) ) {
175 VObject *o = nextVObject( &it ); 305 VObject *o = nextVObject( &it );
@@ -202,17 +332,19 @@ static Task parseVObject( VObject *obj )
202 } 332 }
203#endif 333#endif
204 } 334 }
205 335
206 return t; 336 return t;
207} 337}
208 338
209 339
210 340/*!
341 Writes the list of \a tasks as a set of VCards to the file \a filename.
342*/
211void Task::writeVCalendar( const QString &filename, const QValueList<Task> &tasks) 343void Task::writeVCalendar( const QString &filename, const QValueList<Task> &tasks)
212{ 344{
213 QFileDirect f( filename.utf8().data() ); 345 QFileDirect f( filename.utf8().data() );
214 if ( !f.open( IO_WriteOnly ) ) { 346 if ( !f.open( IO_WriteOnly ) ) {
215 qWarning("Unable to open vcard write"); 347 qWarning("Unable to open vcard write");
216 return; 348 return;
217 } 349 }
218 350
@@ -221,32 +353,37 @@ void Task::writeVCalendar( const QString &filename, const QValueList<Task> &task
221 VObject *obj = createVObject( *it ); 353 VObject *obj = createVObject( *it );
222 writeVObject(f.directHandle() , obj ); 354 writeVObject(f.directHandle() , obj );
223 cleanVObject( obj ); 355 cleanVObject( obj );
224 } 356 }
225 357
226 cleanStrTbl(); 358 cleanStrTbl();
227} 359}
228 360
361/*!
362 Writes \a task as a VCard to the file \a filename.
363*/
229void Task::writeVCalendar( const QString &filename, const Task &task) 364void Task::writeVCalendar( const QString &filename, const Task &task)
230{ 365{
231 QFileDirect f( filename.utf8().data() ); 366 QFileDirect f( filename.utf8().data() );
232 if ( !f.open( IO_WriteOnly ) ) { 367 if ( !f.open( IO_WriteOnly ) ) {
233 qWarning("Unable to open vcard write"); 368 qWarning("Unable to open vcard write");
234 return; 369 return;
235 } 370 }
236 371
237 VObject *obj = createVObject( task ); 372 VObject *obj = createVObject( task );
238 writeVObject(f.directHandle() , obj ); 373 writeVObject(f.directHandle() , obj );
239 cleanVObject( obj ); 374 cleanVObject( obj );
240 375
241 cleanStrTbl(); 376 cleanStrTbl();
242} 377}
243 378
244 379/*!
380 Returns the set of tasks read as VCards from the file \a filename.
381*/
245QValueList<Task> Task::readVCalendar( const QString &filename ) 382QValueList<Task> Task::readVCalendar( const QString &filename )
246{ 383{
247 VObject *obj = Parse_MIME_FromFileName( (char *)filename.utf8().data() ); 384 VObject *obj = Parse_MIME_FromFileName( (char *)filename.utf8().data() );
248 385
249 QValueList<Task> tasks; 386 QValueList<Task> tasks;
250 387
251 while ( obj ) { 388 while ( obj ) {
252 QCString name = vObjectName( obj ); 389 QCString name = vObjectName( obj );
diff --git a/library/backend/task.h b/library/backend/task.h
index 6f383b8..091f2e9 100644
--- a/library/backend/task.h
+++ b/library/backend/task.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2001 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -15,18 +15,18 @@
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#ifndef __TASK_H__ 20#ifndef __TASK_H__
21#define __TASK_H__ 21#define __TASK_H__
22 22
23#include <qpe/palmtoprecord.h> 23#include <qtopia/private/palmtoprecord.h>
24#include <qpe/stringutil.h> 24#include <qtopia/stringutil.h>
25 25
26#include <qvaluelist.h> 26#include <qvaluelist.h>
27#include <qdatetime.h> 27#include <qdatetime.h>
28 28
29class TaskPrivate; 29class TaskPrivate;
30class QPC_EXPORT Task : public Qtopia::Record 30class QPC_EXPORT Task : public Qtopia::Record
31{ 31{
32public: 32public:
@@ -35,31 +35,39 @@ public:
35 ~Task(); 35 ~Task();
36 36
37 QMap<int, QString> toMap() const; 37 QMap<int, QString> toMap() const;
38 38
39 static void writeVCalendar( const QString &filename, const QValueList<Task> &tasks); 39 static void writeVCalendar( const QString &filename, const QValueList<Task> &tasks);
40 static void writeVCalendar( const QString &filename, const Task &task); 40 static void writeVCalendar( const QString &filename, const Task &task);
41 static QValueList<Task> readVCalendar( const QString &filename ); 41 static QValueList<Task> readVCalendar( const QString &filename );
42 42
43 enum PriorityValue { VeryHigh=1, High, Normal, Low, VeryLow };
44
43 void setPriority( int priority ) { mPriority = priority; } 45 void setPriority( int priority ) { mPriority = priority; }
44 int priority() const { return mPriority; } 46 int priority() const { return mPriority; }
45 47
46// void setCategory( const QString& category ) 48// void setCategory( const QString& category )
47// { mCategory = category.stripWhiteSpace(); } 49// { mCategory = category.stripWhiteSpace(); }
48// const QString &category() const { return mCategory; } 50// const QString &category() const { return mCategory; }
49 51
50 void setDescription( const QString& description ) 52 void setDescription( const QString& description )
51 { mDesc = Qtopia::simplifyMultiLineSpace(description); } 53 { mDesc = Qtopia::simplifyMultiLineSpace(description); }
52 const QString &description() const { return mDesc; } 54 const QString &description() const { return mDesc; }
53 55
56 // Use THESE functions
57 void setDueDate( const QDate &date);
58 void clearDueDate();
59
60 // Instead of these functions.
54 void setDueDate( const QDate& date, bool hasDue ) { mDueDate = date; mDue = hasDue; } 61 void setDueDate( const QDate& date, bool hasDue ) { mDueDate = date; mDue = hasDue; }
62 void setHasDueDate( bool b ) { mDue = b; }
63
55 const QDate &dueDate() const { return mDueDate; } 64 const QDate &dueDate() const { return mDueDate; }
56 bool hasDueDate() const { return mDue; } 65 bool hasDueDate() const { return mDue; }
57 void setHasDueDate( bool b ) { mDue = b; }
58 66
59 void setCompleted( bool b ) { mCompleted = b; } 67 void setCompleted( bool b ) { mCompleted = b; }
60 bool isCompleted() const { return mCompleted; } 68 bool isCompleted() const { return mCompleted; }
61 69
62 void save( QString& buf ) const; 70 void save( QString& buf ) const;
63 bool match( const QRegExp &r ) const; 71 bool match( const QRegExp &r ) const;
64 72
65private: 73private:
@@ -73,9 +81,12 @@ private:
73 QString mDesc; 81 QString mDesc;
74 TaskPrivate *d; 82 TaskPrivate *d;
75 // ADDITION 83 // ADDITION
76 int recordId; 84 int recordId;
77 int recordInfo; 85 int recordInfo;
78 // 86 //
79}; 87};
80 88
89// MUST be inline. (forwards compatability).
90inline void Task::setDueDate( const QDate &date) { setDueDate(date, date.isValid()); }
91inline void Task::clearDueDate() { setHasDueDate( FALSE ); }
81#endif 92#endif
diff --git a/library/backend/timeconversion.cpp b/library/backend/timeconversion.cpp
deleted file mode 100644
index a4a2547..0000000
--- a/library/backend/timeconversion.cpp
+++ b/dev/null
@@ -1,237 +0,0 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
21#include <qglobal.h>
22#include "timeconversion.h"
23#include <qregexp.h>
24#include <stdlib.h>
25
26QString TimeConversion::toString( const QDate &d )
27{
28 QString r = QString::number( d.day() ) + "." +
29 QString::number( d.month() ) + "." +
30 QString::number( d.year() );
31 //qDebug("TimeConversion::toString %s", r.latin1());
32 return r;
33}
34
35QDate TimeConversion::fromString( const QString &datestr )
36{
37 int monthPos = datestr.find('.');
38 int yearPos = datestr.find('.', monthPos+1 );
39 if ( monthPos == -1 || yearPos == -1 ) {
40 qDebug("fromString didn't find . in str = %s; mpos = %d ypos = %d", datestr.latin1(), monthPos, yearPos );
41 return QDate();
42 }
43 int d = datestr.left( monthPos ).toInt();
44 int m = datestr.mid( monthPos+1, yearPos - monthPos - 1 ).toInt();
45 int y = datestr.mid( yearPos+1 ).toInt();
46 QDate date ( y,m,d );
47 //qDebug("TimeConversion::fromString ymd = %s => %d %d %d; mpos = %d ypos = %d", datestr.latin1(), y, m, d, monthPos, yearPos);
48 return date;
49}
50
51time_t TimeConversion::toUTC( const QDateTime& dt )
52{
53 time_t tmp;
54 struct tm *lt;
55
56#if defined(_OS_WIN32) || defined (Q_OS_WIN32) || defined (Q_OS_WIN64)
57 _tzset();
58#else
59 tzset();
60#endif
61
62 // get a tm structure from the system to get the correct tz_name
63 tmp = time( 0 );
64 lt = localtime( &tmp );
65
66 lt->tm_sec = dt.time().second();
67 lt->tm_min = dt.time().minute();
68 lt->tm_hour = dt.time().hour();
69 lt->tm_mday = dt.date().day();
70 lt->tm_mon = dt.date().month() - 1; // 0-11 instead of 1-12
71 lt->tm_year = dt.date().year() - 1900; // year - 1900
72 //lt->tm_wday = dt.date().dayOfWeek(); ignored anyway
73 //lt->tm_yday = dt.date().dayOfYear(); ignored anyway
74 lt->tm_wday = -1;
75 lt->tm_yday = -1;
76 // tm_isdst negative -> mktime will find out about DST
77 lt->tm_isdst = -1;
78 // keep tm_zone and tm_gmtoff
79 tmp = mktime( lt );
80 return tmp;
81}
82
83QDateTime TimeConversion::fromUTC( time_t time )
84{
85 struct tm *lt;
86
87#if defined(_OS_WIN32) || defined (Q_OS_WIN32) || defined (Q_OS_WIN64)
88 _tzset();
89#else
90 tzset();
91#endif
92 lt = localtime( &time );
93 QDateTime dt;
94 dt.setDate( QDate( lt->tm_year + 1900, lt->tm_mon + 1, lt->tm_mday ) );
95 dt.setTime( QTime( lt->tm_hour, lt->tm_min, lt->tm_sec ) );
96 return dt;
97}
98
99
100int TimeConversion::secsTo( const QDateTime &from, const QDateTime &to )
101{
102 return toUTC( to ) - toUTC( from );
103}
104
105QCString TimeConversion::toISO8601( const QDate &d )
106{
107 time_t tmp = toUTC( d );
108 struct tm *utc = gmtime( &tmp );
109
110 QCString str;
111 str.sprintf("%04d%02d%02d", (utc->tm_year + 1900), utc->tm_mon+1, utc->tm_mday );
112 return str;
113}
114
115QCString TimeConversion::toISO8601( const QDateTime &dt )
116{
117 time_t tmp = toUTC( dt );
118 struct tm *utc = gmtime( &tmp );
119
120 QCString str;
121 str.sprintf("%04d%02d%02dT%02d%02d%02dZ",
122 (utc->tm_year + 1900), utc->tm_mon+1, utc->tm_mday,
123 utc->tm_hour, utc->tm_min, utc->tm_sec );
124 return str;
125}
126
127QDateTime TimeConversion::fromISO8601( const QCString &s )
128{
129
130#if defined(_OS_WIN32) || defined (Q_OS_WIN32) || defined (Q_OS_WIN64)
131 _tzset();
132#else
133 tzset();
134#endif
135
136 struct tm *thetime = new tm;
137
138 QCString str = s.copy();
139 str.replace(QRegExp("-"), "" );
140 str.replace(QRegExp(":"), "" );
141 str.stripWhiteSpace();
142 str = str.lower();
143
144 int i = str.find( "t" );
145 QCString date;
146 QCString timestr;
147 if ( i != -1 ) {
148 date = str.left( i );
149 timestr = str.mid( i+1 );
150 } else {
151 date = str;
152 }
153
154// qDebug("--- parsing ISO time---");
155 thetime->tm_year = 100;
156 thetime->tm_mon = 0;
157 thetime->tm_mday = 0;
158 thetime->tm_hour = 0;
159 thetime->tm_min = 0;
160 thetime->tm_sec = 0;
161
162// qDebug("date = %s", date.data() );
163
164 switch( date.length() ) {
165 case 8:
166 thetime->tm_mday = date.right( 2 ).toInt();
167 case 6:
168 thetime->tm_mon = date.mid( 4, 2 ).toInt() - 1;
169 case 4:
170 thetime->tm_year = date.left( 4 ).toInt();
171 thetime->tm_year -= 1900;
172 break;
173 default:
174 break;
175 }
176
177 int tzoff = 0;
178 bool inLocalTime = FALSE;
179 if ( timestr.find( 'z' ) == (int)timestr.length() - 1 )
180 // UTC
181 timestr = timestr.left( timestr.length() -1 );
182 else {
183 int plus = timestr.find( "+" );
184 int minus = timestr.find( "-" );
185 if ( plus != -1 || minus != -1 ) {
186 // have a timezone offset
187 plus = (plus != -1) ? plus : minus;
188 QCString off = timestr.mid( plus );
189 timestr = timestr.left( plus );
190
191 int tzoffhour = 0;
192 int tzoffmin = 0;
193 switch( off.length() ) {
194 case 5:
195 tzoffmin = off.mid(3).toInt();
196 case 3:
197 tzoffhour = off.left(3).toInt();
198 default:
199 break;
200 }
201 tzoff = 60*tzoffhour + tzoffmin;
202 } else
203 inLocalTime = TRUE;
204 }
205
206 // get the time:
207 switch( timestr.length() ) {
208 case 6:
209 thetime->tm_sec = timestr.mid( 4 ).toInt();
210 case 4:
211 thetime->tm_min = timestr.mid( 2, 2 ).toInt();
212 case 2:
213 thetime->tm_hour = timestr.left( 2 ).toInt();
214 default:
215 break;
216 }
217
218 int tzloc = 0;
219 time_t tmp = time( 0 );
220 if ( !inLocalTime ) {
221 // have to get the offset between gmt and local time
222 struct tm *lt = localtime( &tmp );
223 tzloc = mktime( lt );
224 struct tm *ut = gmtime( &tmp );
225 tzloc -= mktime( ut );
226 }
227// qDebug("time: %d %d %d, tzloc=%d, tzoff=%d", thetime->tm_hour, thetime->tm_min, thetime->tm_sec,
228 // tzloc, tzoff );
229
230 tmp = mktime( thetime );
231 tmp += 60*(-tzloc + tzoff);
232
233 delete thetime;
234
235 return fromUTC( tmp );
236}
237
diff --git a/library/backend/timeconversion.h b/library/backend/timeconversion.h
deleted file mode 100644
index 1724812..0000000
--- a/library/backend/timeconversion.h
+++ b/dev/null
@@ -1,45 +0,0 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
21#ifndef __timeconversion_h__
22#define __timeconversion_h__
23
24#include <time.h>
25#include <sys/types.h>
26#include <qdatetime.h>
27
28#include <qpe/qpcglobal.h>
29
30class QPC_EXPORT TimeConversion
31{
32public:
33 static QString toString( const QDate &d );
34 static QDate fromString( const QString &datestr );
35
36 static time_t toUTC( const QDateTime& dt );
37 static QDateTime fromUTC( time_t time );
38 static int secsTo( const QDateTime &from, const QDateTime &to );
39
40 static QCString toISO8601( const QDate & );
41 static QCString toISO8601( const QDateTime & );
42 static QDateTime fromISO8601( const QCString & );
43};
44
45#endif // __timeconversion_h__
diff --git a/library/backend/vcc.y b/library/backend/vcc.y
index e326a64..5bcf0cb 100644
--- a/library/backend/vcc.y
+++ b/library/backend/vcc.y
@@ -1,1199 +1,1208 @@
1%{ 1%{
2 2
3/*************************************************************************** 3/***************************************************************************
4(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International 4(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
5Business Machines Corporation and Siemens Rolm Communications Inc. 5Business Machines Corporation and Siemens Rolm Communications Inc.
6 6
7For purposes of this license notice, the term Licensors shall mean, 7For purposes of this license notice, the term Licensors shall mean,
8collectively, Apple Computer, Inc., AT&T Corp., International 8collectively, Apple Computer, Inc., AT&T Corp., International
9Business Machines Corporation and Siemens Rolm Communications Inc. 9Business Machines Corporation and Siemens Rolm Communications Inc.
10The term Licensor shall mean any of the Licensors. 10The term Licensor shall mean any of the Licensors.
11 11
12Subject to acceptance of the following conditions, permission is hereby 12Subject to acceptance of the following conditions, permission is hereby
13granted by Licensors without the need for written agreement and without 13granted by Licensors without the need for written agreement and without
14license or royalty fees, to use, copy, modify and distribute this 14license or royalty fees, to use, copy, modify and distribute this
15software for any purpose. 15software for any purpose.
16 16
17The above copyright notice and the following four paragraphs must be 17The above copyright notice and the following four paragraphs must be
18reproduced in all copies of this software and any software including 18reproduced in all copies of this software and any software including
19this software. 19this software.
20 20
21THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE 21THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE
22ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR 22ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR
23MODIFICATIONS. 23MODIFICATIONS.
24 24
25IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT, 25IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,
26INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT 26INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
27OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 27OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
28DAMAGE. 28DAMAGE.
29 29
30EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, 30EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,
31INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE 31INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE
32IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 32IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
33PURPOSE. 33PURPOSE.
34 34
35The software is provided with RESTRICTED RIGHTS. Use, duplication, or 35The software is provided with RESTRICTED RIGHTS. Use, duplication, or
36disclosure by the government are subject to restrictions set forth in 36disclosure by the government are subject to restrictions set forth in
37DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable. 37DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
38 38
39***************************************************************************/ 39***************************************************************************/
40 40
41/* 41/*
42 * src: vcc.c 42 * src: vcc.c
43 * doc: Parser for vCard and vCalendar. Note that this code is 43 * doc: Parser for vCard and vCalendar. Note that this code is
44 * generated by a yacc parser generator. Generally it should not 44 * generated by a yacc parser generator. Generally it should not
45 * be edited by hand. The real source is vcc.y. The #line directives 45 * be edited by hand. The real source is vcc.y. The #line directives
46 * can be commented out here to make it easier to trace through 46 * can be commented out here to make it easier to trace through
47 * in a debugger. However, if a bug is found it should 47 * in a debugger. However, if a bug is found it should
48 * be fixed in vcc.y and this file regenerated. 48 * be fixed in vcc.y and this file regenerated.
49 */ 49 */
50 50
51 51
52/* debugging utilities */ 52/* debugging utilities */
53#if __DEBUG 53#if __DEBUG
54#define DBG_(x) printf x 54#define DBG_(x) printf x
55#else 55#else
56#define DBG_(x) 56#define DBG_(x)
57#endif 57#endif
58 58
59/**** External Functions ****/ 59/**** External Functions ****/
60 60
61/* assign local name to parser variables and functions so that 61/* assign local name to parser variables and functions so that
62 we can use more than one yacc based parser. 62 we can use more than one yacc based parser.
63*/ 63*/
64 64
65#if 0 65#if 0
66#define yyparse mime_parse 66#define yyparse mime_parse
67#define yylex mime_lex 67#define yylex mime_lex
68#define yyerror mime_error 68#define yyerror mime_error
69#define yychar mime_char 69#define yychar mime_char
70/* #define p_yyval p_mime_val */ 70/* #define p_yyval p_mime_val */
71#undef yyval 71#undef yyval
72#define yyval mime_yyval 72#define yyval mime_yyval
73/* #define p_yylval p_mime_lval */ 73/* #define p_yylval p_mime_lval */
74#undef yylval 74#undef yylval
75#define yylval mime_yylval 75#define yylval mime_yylval
76#define yydebug mime_debug 76#define yydebug mime_debug
77#define yynerrs mime_nerrs 77#define yynerrs mime_nerrs
78#define yyerrflag mime_errflag 78#define yyerrflag mime_errflag
79#define yyss mime_ss 79#define yyss mime_ss
80#define yyssp mime_ssp 80#define yyssp mime_ssp
81#define yyvs mime_vs 81#define yyvs mime_vs
82#define yyvsp mime_vsp 82#define yyvsp mime_vsp
83#define yylhs mime_lhs 83#define yylhs mime_lhs
84#define yylen mime_len 84#define yylen mime_len
85#define yydefred mime_defred 85#define yydefred mime_defred
86#define yydgoto mime_dgoto 86#define yydgoto mime_dgoto
87#define yysindex mime_sindex 87#define yysindex mime_sindex
88#define yyrindex mime_rindex 88#define yyrindex mime_rindex
89#define yygindex mime_gindex 89#define yygindex mime_gindex
90#define yytable mime_table 90#define yytable mime_table
91#define yycheck mime_check 91#define yycheck mime_check
92#define yyname mime_name 92#define yyname mime_name
93#define yyrule mime_rule 93#define yyrule mime_rule
94#ifdef YYPREFIX 94#ifdef YYPREFIX
95#undef YYPREFIX 95#undef YYPREFIX
96#endif 96#endif
97#define YYPREFIX "mime_" 97#define YYPREFIX "mime_"
98#endif 98#endif
99 99
100 100
101#ifndef _NO_LINE_FOLDING 101#ifndef _NO_LINE_FOLDING
102#define _SUPPORT_LINE_FOLDING 1 102#define _SUPPORT_LINE_FOLDING 1
103#endif 103#endif
104 104
105/* undef below if compile with MFC */ 105/* undef below if compile with MFC */
106/* #define INCLUDEMFC 1 */ 106/* #define INCLUDEMFC 1 */
107 107
108#if defined(WIN32) || defined(_WIN32) 108#if defined(WIN32) || defined(_WIN32)
109#ifdef INCLUDEMFC 109#ifdef INCLUDEMFC
110#include <afx.h> 110#include <afx.h>
111#endif 111#endif
112#endif 112#endif
113 113
114#include <string.h> 114#include <string.h>
115#ifndef __MWERKS__ 115#ifndef __MWERKS__
116#include <stdlib.h> 116#include <stdlib.h>
117#endif 117#endif
118#include <stdio.h> 118#include <stdio.h>
119#include <stdlib.h> 119#include <stdlib.h>
120#include <ctype.h> 120#include <ctype.h>
121 121
122//#ifdef PALMTOPCENTER 122//#ifdef PALMTOPCENTER
123//#include <qpe/vobject_p.h> 123//#include <qpe/vobject_p.h>
124//#else 124//#else
125#include "vobject_p.h" 125#include "vobject_p.h"
126//#endif 126//#endif
127 127
128/**** Types, Constants ****/ 128/**** Types, Constants ****/
129 129
130 #define YYDEBUG 0/* 1 to compile in some debugging code */ 130 #define YYDEBUG 0/* 1 to compile in some debugging code */
131 #define MAXTOKEN 256/* maximum token (line) length */ 131 #define MAXTOKEN 256/* maximum token (line) length */
132 #define YYSTACKSIZE 100// ~unref ? 132 #define YYSTACKSIZE 100// ~unref ?
133 #define MAXLEVEL 10/* max # of nested objects parseable */ 133 #define MAXLEVEL 10/* max # of nested objects parseable */
134 /* (includes outermost) */ 134 /* (includes outermost) */
135 135
136 136
137/**** Global Variables ****/ 137/**** Global Variables ****/
138int mime_lineNum, mime_numErrors; /* yyerror() can use these */ 138int mime_lineNum, mime_numErrors; /* yyerror() can use these */
139static VObject* vObjList; 139static VObject* vObjList;
140static VObject *curProp; 140static VObject *curProp;
141static VObject *curObj; 141static VObject *curObj;
142static VObject* ObjStack[MAXLEVEL]; 142static VObject* ObjStack[MAXLEVEL];
143static int ObjStackTop; 143static int ObjStackTop;
144 144
145 145
146/* A helpful utility for the rest of the app. */ 146/* A helpful utility for the rest of the app. */
147#if __CPLUSPLUS__ 147#if __CPLUSPLUS__
148extern "C" { 148extern "C" {
149#endif 149#endif
150 150
151 extern void yyerror(char *s); 151 extern void yyerror(char *s);
152 152
153#if __CPLUSPLUS__ 153#if __CPLUSPLUS__
154 }; 154 };
155#endif 155#endif
156 156
157int yyparse(); 157int yyparse();
158 158
159enum LexMode { 159enum LexMode {
160 L_NORMAL, 160 L_NORMAL,
161 L_VCARD, 161 L_VCARD,
162 L_VCAL, 162 L_VCAL,
163 L_VEVENT, 163 L_VEVENT,
164 L_VTODO, 164 L_VTODO,
165 L_VALUES, 165 L_VALUES,
166 L_BASE64, 166 L_BASE64,
167 L_QUOTED_PRINTABLE 167 L_QUOTED_PRINTABLE
168 }; 168 };
169 169
170/**** Private Forward Declarations ****/ 170/**** Private Forward Declarations ****/
171static int pushVObject(const char *prop); 171static int pushVObject(const char *prop);
172static VObject* popVObject(); 172static VObject* popVObject();
173static void lexPopMode(int top); 173static void lexPopMode(int top);
174static int lexWithinMode(enum LexMode mode); 174static int lexWithinMode(enum LexMode mode);
175static void lexPushMode(enum LexMode mode); 175static void lexPushMode(enum LexMode mode);
176static void enterProps(const char *s); 176static void enterProps(const char *s);
177static void enterAttr(const char *s1, const char *s2); 177static void enterAttr(const char *s1, const char *s2);
178static void enterValues(const char *value); 178static void enterValues(const char *value);
179#define mime_error yyerror 179#define mime_error yyerror
180void mime_error(char *s); 180void mime_error(char *s);
181void mime_error_(char *s); 181void mime_error_(char *s);
182 182
183%} 183%}
184 184
185/***************************************************************************/ 185/***************************************************************************/
186/*** The grammar ****/ 186/*** The grammar ****/
187/***************************************************************************/ 187/***************************************************************************/
188 188
189%union { 189%union {
190 char *str; 190 char *str;
191 VObject *vobj; 191 VObject *vobj;
192 } 192 }
193 193
194%token 194%token
195 EQ COLON DOT SEMICOLON SPACE HTAB LINESEP NEWLINE 195 EQ COLON DOT SEMICOLON SPACE HTAB LINESEP NEWLINE
196 BEGIN_VCARD END_VCARD BEGIN_VCAL END_VCAL 196 BEGIN_VCARD END_VCARD BEGIN_VCAL END_VCAL
197 BEGIN_VEVENT END_VEVENT BEGIN_VTODO END_VTODO 197 BEGIN_VEVENT END_VEVENT BEGIN_VTODO END_VTODO
198 ID 198 ID
199 199
200/* 200/*
201 * NEWLINE is the token that would occur outside a vCard, 201 * NEWLINE is the token that would occur outside a vCard,
202 * while LINESEP is the token that would occur inside a vCard. 202 * while LINESEP is the token that would occur inside a vCard.
203 */ 203 */
204 204
205%token <str> 205%token <str>
206 STRING ID 206 STRING ID
207 207
208%type <str> name value 208%type <str> name value
209 209
210%type <vobj> vcard vcal vobject 210%type <vobj> vcard vcal vobject
211 211
212%start mime 212%start mime
213 213
214%% 214%%
215 215
216 216
217mime: vobjects 217mime: vobjects
218 ; 218 ;
219 219
220vobjects: vobjects vobject 220vobjects: vobjects vobject
221 { addList(&vObjList, $2); curObj = 0; } 221 { addList(&vObjList, $2); curObj = 0; }
222 | vobject 222 | vobject
223 { addList(&vObjList, $1); curObj = 0; } 223 { addList(&vObjList, $1); curObj = 0; }
224 ; 224 ;
225 225
226vobject: vcard 226vobject: vcard
227 | vcal 227 | vcal
228 ; 228 ;
229 229
230vcard: 230vcard:
231 BEGIN_VCARD 231 BEGIN_VCARD
232 { 232 {
233 lexPushMode(L_VCARD); 233 lexPushMode(L_VCARD);
234 if (!pushVObject(VCCardProp)) YYERROR; 234 if (!pushVObject(VCCardProp)) YYERROR;
235 } 235 }
236 items END_VCARD 236 items END_VCARD
237 { 237 {
238 lexPopMode(0); 238 lexPopMode(0);
239 $$ = popVObject(); 239 $$ = popVObject();
240 } 240 }
241 | BEGIN_VCARD 241 | BEGIN_VCARD
242 { 242 {
243 lexPushMode(L_VCARD); 243 lexPushMode(L_VCARD);
244 if (!pushVObject(VCCardProp)) YYERROR; 244 if (!pushVObject(VCCardProp)) YYERROR;
245 } 245 }
246 END_VCARD 246 END_VCARD
247 { 247 {
248 lexPopMode(0); 248 lexPopMode(0);
249 $$ = popVObject(); 249 $$ = popVObject();
250 } 250 }
251 ; 251 ;
252 252
253items: items item 253items: items item
254 | item 254 | item
255 ; 255 ;
256 256
257item: prop COLON 257item: prop COLON
258 { 258 {
259 lexPushMode(L_VALUES); 259 lexPushMode(L_VALUES);
260 } 260 }
261 values LINESEP 261 values LINESEP
262 { 262 {
263 if (lexWithinMode(L_BASE64) || lexWithinMode(L_QUOTED_PRINTABLE)) 263 if (lexWithinMode(L_BASE64) || lexWithinMode(L_QUOTED_PRINTABLE))
264 lexPopMode(0); 264 lexPopMode(0);
265 lexPopMode(0); 265 lexPopMode(0);
266 } 266 }
267 | error 267 | error
268 ; 268 ;
269 269
270prop: name 270prop: name
271 { 271 {
272 enterProps($1); 272 enterProps($1);
273 } 273 }
274 attr_params 274 attr_params
275 | name 275 | name
276 { 276 {
277 enterProps($1); 277 enterProps($1);
278 } 278 }
279 ; 279 ;
280 280
281attr_params: attr_params attr_param 281attr_params: attr_params attr_param
282 | attr_param 282 | attr_param
283 ; 283 ;
284 284
285attr_param: SEMICOLON attr 285attr_param: SEMICOLON attr
286 ; 286 ;
287 287
288attr: name 288attr: name
289 { 289 {
290 enterAttr($1,0); 290 enterAttr($1,0);
291 } 291 }
292 | name EQ name 292 | name EQ name
293 { 293 {
294 enterAttr($1,$3); 294 enterAttr($1,$3);
295 295
296 } 296 }
297 ; 297 ;
298 298
299name: ID 299name: ID
300 ; 300 ;
301 301
302values: value SEMICOLON { enterValues($1); } values 302values: value SEMICOLON { enterValues($1); } values
303 | value 303 | value
304 { enterValues($1); } 304 { enterValues($1); }
305 ; 305 ;
306 306
307value: STRING 307value: STRING
308 | 308 |
309 { $$ = 0; } 309 { $$ = 0; }
310 ; 310 ;
311 311
312vcal: 312vcal:
313 BEGIN_VCAL 313 BEGIN_VCAL
314 { if (!pushVObject(VCCalProp)) YYERROR; } 314 { if (!pushVObject(VCCalProp)) YYERROR; }
315 calitems 315 calitems
316 END_VCAL 316 END_VCAL
317 { $$ = popVObject(); } 317 { $$ = popVObject(); }
318 | BEGIN_VCAL 318 | BEGIN_VCAL
319 { if (!pushVObject(VCCalProp)) YYERROR; } 319 { if (!pushVObject(VCCalProp)) YYERROR; }
320 END_VCAL 320 END_VCAL
321 { $$ = popVObject(); } 321 { $$ = popVObject(); }
322 ; 322 ;
323 323
324calitems: calitems calitem 324calitems: calitems calitem
325 | calitem 325 | calitem
326 ; 326 ;
327 327
328calitem: 328calitem:
329 eventitem 329 eventitem
330 | todoitem 330 | todoitem
331 | items 331 | items
332 ; 332 ;
333 333
334eventitem: 334eventitem:
335 BEGIN_VEVENT 335 BEGIN_VEVENT
336 { 336 {
337 lexPushMode(L_VEVENT); 337 lexPushMode(L_VEVENT);
338 if (!pushVObject(VCEventProp)) YYERROR; 338 if (!pushVObject(VCEventProp)) YYERROR;
339 } 339 }
340 items 340 items
341 END_VEVENT 341 END_VEVENT
342 { 342 {
343 lexPopMode(0); 343 lexPopMode(0);
344 popVObject(); 344 popVObject();
345 } 345 }
346 | BEGIN_VEVENT 346 | BEGIN_VEVENT
347 { 347 {
348 lexPushMode(L_VEVENT); 348 lexPushMode(L_VEVENT);
349 if (!pushVObject(VCEventProp)) YYERROR; 349 if (!pushVObject(VCEventProp)) YYERROR;
350 } 350 }
351 END_VEVENT 351 END_VEVENT
352 { 352 {
353 lexPopMode(0); 353 lexPopMode(0);
354 popVObject(); 354 popVObject();
355 } 355 }
356 ; 356 ;
357 357
358todoitem: 358todoitem:
359 BEGIN_VTODO 359 BEGIN_VTODO
360 { 360 {
361 lexPushMode(L_VTODO); 361 lexPushMode(L_VTODO);
362 if (!pushVObject(VCTodoProp)) YYERROR; 362 if (!pushVObject(VCTodoProp)) YYERROR;
363 } 363 }
364 items 364 items
365 END_VTODO 365 END_VTODO
366 { 366 {
367 lexPopMode(0); 367 lexPopMode(0);
368 popVObject(); 368 popVObject();
369 } 369 }
370 | BEGIN_VTODO 370 | BEGIN_VTODO
371 { 371 {
372 lexPushMode(L_VTODO); 372 lexPushMode(L_VTODO);
373 if (!pushVObject(VCTodoProp)) YYERROR; 373 if (!pushVObject(VCTodoProp)) YYERROR;
374 } 374 }
375 END_VTODO 375 END_VTODO
376 { 376 {
377 lexPopMode(0); 377 lexPopMode(0);
378 popVObject(); 378 popVObject();
379 } 379 }
380 ; 380 ;
381 381
382%% 382%%
383/*------------------------------------*/ 383/*------------------------------------*/
384static int pushVObject(const char *prop) 384static int pushVObject(const char *prop)
385 { 385 {
386 VObject *newObj; 386 VObject *newObj;
387 if (ObjStackTop == MAXLEVEL) 387 if (ObjStackTop == MAXLEVEL)
388 return FALSE; 388 return FALSE;
389 389
390 ObjStack[++ObjStackTop] = curObj; 390 ObjStack[++ObjStackTop] = curObj;
391 391
392 if (curObj) { 392 if (curObj) {
393 newObj = addProp(curObj,prop); 393 newObj = addProp(curObj,prop);
394 curObj = newObj; 394 curObj = newObj;
395 } 395 }
396 else 396 else
397 curObj = newVObject(prop); 397 curObj = newVObject(prop);
398 398
399 return TRUE; 399 return TRUE;
400 } 400 }
401 401
402 402
403/*---------------------------------------*/ 403/*---------------------------------------*/
404/* This pops the recently built vCard off the stack and returns it. */ 404/* This pops the recently built vCard off the stack and returns it. */
405static VObject* popVObject() 405static VObject* popVObject()
406 { 406 {
407 VObject *oldObj; 407 VObject *oldObj;
408 if (ObjStackTop < 0) { 408 if (ObjStackTop < 0) {
409 yyerror("pop on empty Object Stack\n"); 409 yyerror("pop on empty Object Stack\n");
410 return 0; 410 return 0;
411 } 411 }
412 oldObj = curObj; 412 oldObj = curObj;
413 curObj = ObjStack[ObjStackTop--]; 413 curObj = ObjStack[ObjStackTop--];
414 414
415 return oldObj; 415 return oldObj;
416 } 416 }
417 417
418 418
419static void enterValues(const char *value) 419static void enterValues(const char *value)
420 { 420 {
421 if (fieldedProp && *fieldedProp) { 421 if (fieldedProp && *fieldedProp) {
422 if (value) { 422 if (value) {
423 addPropValue(curProp,*fieldedProp,value); 423 addPropValue(curProp,*fieldedProp,value);
424 } 424 }
425 /* else this field is empty, advance to next field */ 425 /* else this field is empty, advance to next field */
426 fieldedProp++; 426 fieldedProp++;
427 } 427 }
428 else { 428 else {
429 if (value) { 429 if (value) {
430 setVObjectStringZValue_(curProp,strdup( value )); 430 setVObjectStringZValue_(curProp,strdup( value ));
431 } 431 }
432 } 432 }
433 deleteStr(value); 433 deleteStr(value);
434 } 434 }
435 435
436static void enterProps(const char *s) 436static void enterProps(const char *s)
437 { 437 {
438 curProp = addGroup(curObj,s); 438 curProp = addGroup(curObj,s);
439 deleteStr(s); 439 deleteStr(s);
440 } 440 }
441 441
442static void enterAttr(const char *s1, const char *s2) 442static void enterAttr(const char *s1, const char *s2)
443 { 443 {
444 const char *p1, *p2; 444 const char *p1, *p2;
445 p1 = lookupProp_(s1); 445 p1 = lookupProp_(s1);
446 if (s2) { 446 if (s2) {
447 VObject *a; 447 VObject *a;
448 p2 = lookupProp_(s2); 448 p2 = lookupProp_(s2);
449 a = addProp(curProp,p1); 449 a = addProp(curProp,p1);
450 setVObjectStringZValue(a,p2); 450 setVObjectStringZValue(a,p2);
451 } 451 }
452 else 452 else
453 addProp(curProp,p1); 453 addProp(curProp,p1);
454 if (qstricmp(p1,VCBase64Prop) == 0 || (s2 && qstricmp(p2,VCBase64Prop)==0)) 454 if (qstricmp(p1,VCBase64Prop) == 0 || (s2 && qstricmp(p2,VCBase64Prop)==0))
455 lexPushMode(L_BASE64); 455 lexPushMode(L_BASE64);
456 else if (qstricmp(p1,VCQuotedPrintableProp) == 0 456 else if (qstricmp(p1,VCQuotedPrintableProp) == 0
457 || (s2 && qstricmp(p2,VCQuotedPrintableProp)==0)) 457 || (s2 && qstricmp(p2,VCQuotedPrintableProp)==0))
458 lexPushMode(L_QUOTED_PRINTABLE); 458 lexPushMode(L_QUOTED_PRINTABLE);
459 deleteStr(s1); deleteStr(s2); 459 deleteStr(s1); deleteStr(s2);
460 } 460 }
461 461
462 462
463#define MAX_LEX_LOOKAHEAD_0 32 463#define MAX_LEX_LOOKAHEAD_0 32
464#define MAX_LEX_LOOKAHEAD 64 464#define MAX_LEX_LOOKAHEAD 64
465#define MAX_LEX_MODE_STACK_SIZE 10 465#define MAX_LEX_MODE_STACK_SIZE 10
466#define LEXMODE() (lexBuf.lexModeStack[lexBuf.lexModeStackTop]) 466#define LEXMODE() (lexBuf.lexModeStack[lexBuf.lexModeStackTop])
467 467
468struct LexBuf { 468struct LexBuf {
469 /* input */ 469 /* input */
470#ifdef INCLUDEMFC 470#ifdef INCLUDEMFC
471 CFile *inputFile; 471 CFile *inputFile;
472#else 472#else
473 FILE *inputFile; 473 FILE *inputFile;
474#endif 474#endif
475 char *inputString; 475 char *inputString;
476 unsigned long curPos; 476 unsigned long curPos;
477 unsigned long inputLen; 477 unsigned long inputLen;
478 /* lookahead buffer */ 478 /* lookahead buffer */
479 /* -- lookahead buffer is short instead of char so that EOF 479 /* -- lookahead buffer is short instead of char so that EOF
480 / can be represented correctly. 480 / can be represented correctly.
481 */ 481 */
482 unsigned long len; 482 unsigned long len;
483 short buf[MAX_LEX_LOOKAHEAD]; 483 short buf[MAX_LEX_LOOKAHEAD];
484 unsigned long getPtr; 484 unsigned long getPtr;
485 /* context stack */ 485 /* context stack */
486 unsigned long lexModeStackTop; 486 unsigned long lexModeStackTop;
487 enum LexMode lexModeStack[MAX_LEX_MODE_STACK_SIZE]; 487 enum LexMode lexModeStack[MAX_LEX_MODE_STACK_SIZE];
488 /* token buffer */ 488 /* token buffer */
489 unsigned long maxToken; 489 unsigned long maxToken;
490 char *strs; 490 char *strs;
491 unsigned long strsLen; 491 unsigned long strsLen;
492 } lexBuf; 492 } lexBuf;
493 493
494static void lexPushMode(enum LexMode mode) 494static void lexPushMode(enum LexMode mode)
495 { 495 {
496 if (lexBuf.lexModeStackTop == (MAX_LEX_MODE_STACK_SIZE-1)) 496 if (lexBuf.lexModeStackTop == (MAX_LEX_MODE_STACK_SIZE-1))
497 yyerror("lexical context stack overflow"); 497 yyerror("lexical context stack overflow");
498 else { 498 else {
499 lexBuf.lexModeStack[++lexBuf.lexModeStackTop] = mode; 499 lexBuf.lexModeStack[++lexBuf.lexModeStackTop] = mode;
500 } 500 }
501 } 501 }
502 502
503static void lexPopMode(int top) 503static void lexPopMode(int top)
504 { 504 {
505 /* special case of pop for ease of error recovery -- this 505 /* special case of pop for ease of error recovery -- this
506 version will never underflow */ 506 version will never underflow */
507 if (top) 507 if (top)
508 lexBuf.lexModeStackTop = 0; 508 lexBuf.lexModeStackTop = 0;
509 else 509 else
510 if (lexBuf.lexModeStackTop > 0) lexBuf.lexModeStackTop--; 510 if (lexBuf.lexModeStackTop > 0) lexBuf.lexModeStackTop--;
511 } 511 }
512 512
513static int lexWithinMode(enum LexMode mode) { 513static int lexWithinMode(enum LexMode mode) {
514 unsigned long i; 514 unsigned long i;
515 for (i=0;i<lexBuf.lexModeStackTop;i++) 515 for (i=0;i<lexBuf.lexModeStackTop;i++)
516 if (mode == lexBuf.lexModeStack[i]) return 1; 516 if (mode == lexBuf.lexModeStack[i]) return 1;
517 return 0; 517 return 0;
518 } 518 }
519 519
520static char lexGetc_() 520static int lexGetc_()
521 { 521 {
522 /* get next char from input, no buffering. */ 522 /* get next char from input, no buffering. */
523 if (lexBuf.curPos == lexBuf.inputLen) 523 if (lexBuf.curPos == lexBuf.inputLen)
524 return EOF; 524 return EOF;
525 else if (lexBuf.inputString) 525 else if (lexBuf.inputString)
526 return *(lexBuf.inputString + lexBuf.curPos++); 526 return *(lexBuf.inputString + lexBuf.curPos++);
527 else { 527 else {
528#ifdef INCLUDEMFC 528#ifdef INCLUDEMFC
529 char result; 529 char result;
530 return lexBuf.inputFile->Read(&result, 1) == 1 ? result : EOF; 530 return lexBuf.inputFile->Read(&result, 1) == 1 ? result : EOF;
531#else 531#else
532 return fgetc(lexBuf.inputFile); 532 return fgetc(lexBuf.inputFile);
533#endif 533#endif
534 } 534 }
535 } 535 }
536 536
537static int lexGeta() 537static int lexGeta()
538 { 538 {
539 ++lexBuf.len; 539 ++lexBuf.len;
540 return (lexBuf.buf[lexBuf.getPtr] = lexGetc_()); 540 return (lexBuf.buf[lexBuf.getPtr] = lexGetc_());
541 } 541 }
542 542
543static int lexGeta_(int i) 543static int lexGeta_(int i)
544 { 544 {
545 ++lexBuf.len; 545 ++lexBuf.len;
546 return (lexBuf.buf[(lexBuf.getPtr+i)%MAX_LEX_LOOKAHEAD] = lexGetc_()); 546 return (lexBuf.buf[(lexBuf.getPtr+i)%MAX_LEX_LOOKAHEAD] = lexGetc_());
547 } 547 }
548 548
549static void lexSkipLookahead() { 549static void lexSkipLookahead() {
550 if (lexBuf.len > 0 && lexBuf.buf[lexBuf.getPtr]!=EOF) { 550 if (lexBuf.len > 0 && lexBuf.buf[lexBuf.getPtr]!=EOF) {
551 /* don't skip EOF. */ 551 /* don't skip EOF. */
552 lexBuf.getPtr = (lexBuf.getPtr + 1) % MAX_LEX_LOOKAHEAD; 552 lexBuf.getPtr = (lexBuf.getPtr + 1) % MAX_LEX_LOOKAHEAD;
553 lexBuf.len--; 553 lexBuf.len--;
554 } 554 }
555 } 555 }
556 556
557static int lexLookahead() { 557static int lexLookahead() {
558 int c = (lexBuf.len)? 558 int c = (lexBuf.len)?
559 lexBuf.buf[lexBuf.getPtr]: 559 lexBuf.buf[lexBuf.getPtr]:
560 lexGeta(); 560 lexGeta();
561 /* do the \r\n -> \n or \r -> \n translation here */ 561 /* do the \r\n -> \n or \r -> \n translation here */
562 if (c == '\r') { 562 if (c == '\r') {
563 int a = (lexBuf.len>1)? 563 int a = (lexBuf.len>1)?
564 lexBuf.buf[(lexBuf.getPtr+1)%MAX_LEX_LOOKAHEAD]: 564 lexBuf.buf[(lexBuf.getPtr+1)%MAX_LEX_LOOKAHEAD]:
565 lexGeta_(1); 565 lexGeta_(1);
566 if (a == '\n') { 566 if (a == '\n') {
567 lexSkipLookahead(); 567 lexSkipLookahead();
568 } 568 }
569 lexBuf.buf[lexBuf.getPtr] = c = '\n'; 569 lexBuf.buf[lexBuf.getPtr] = c = '\n';
570 } 570 }
571 else if (c == '\n') { 571 else if (c == '\n') {
572 int a = (lexBuf.len>1)? 572 int a = (lexBuf.len>1)?
573 lexBuf.buf[lexBuf.getPtr+1]: 573 lexBuf.buf[lexBuf.getPtr+1]:
574 lexGeta_(1); 574 lexGeta_(1);
575 if (a == '\r') { 575 if (a == '\r') {
576 lexSkipLookahead(); 576 lexSkipLookahead();
577 } 577 }
578 lexBuf.buf[lexBuf.getPtr] = '\n'; 578 lexBuf.buf[lexBuf.getPtr] = '\n';
579 } 579 }
580 return c; 580 return c;
581 } 581 }
582 582
583static int lexGetc() { 583static int lexGetc() {
584 int c = lexLookahead(); 584 int c = lexLookahead();
585 if (lexBuf.len > 0 && lexBuf.buf[lexBuf.getPtr]!=EOF) { 585 if (lexBuf.len > 0 && lexBuf.buf[lexBuf.getPtr]!=EOF) {
586 /* EOF will remain in lookahead buffer */ 586 /* EOF will remain in lookahead buffer */
587 lexBuf.getPtr = (lexBuf.getPtr + 1) % MAX_LEX_LOOKAHEAD; 587 lexBuf.getPtr = (lexBuf.getPtr + 1) % MAX_LEX_LOOKAHEAD;
588 lexBuf.len--; 588 lexBuf.len--;
589 } 589 }
590 return c; 590 return c;
591 } 591 }
592 592
593static void lexSkipLookaheadWord() { 593static void lexSkipLookaheadWord() {
594 if (lexBuf.strsLen <= lexBuf.len) { 594 if (lexBuf.strsLen <= lexBuf.len) {
595 lexBuf.len -= lexBuf.strsLen; 595 lexBuf.len -= lexBuf.strsLen;
596 lexBuf.getPtr = (lexBuf.getPtr + lexBuf.strsLen) % MAX_LEX_LOOKAHEAD; 596 lexBuf.getPtr = (lexBuf.getPtr + lexBuf.strsLen) % MAX_LEX_LOOKAHEAD;
597 } 597 }
598 } 598 }
599 599
600static void lexClearToken() 600static void lexClearToken()
601 { 601 {
602 lexBuf.strsLen = 0; 602 lexBuf.strsLen = 0;
603 } 603 }
604 604
605static void lexAppendc(int c) 605static void lexAppendc(int c)
606 { 606 {
607 lexBuf.strs[lexBuf.strsLen] = c; 607 lexBuf.strs[lexBuf.strsLen] = c;
608 /* append up to zero termination */ 608 /* append up to zero termination */
609 if (c == 0) return; 609 if (c == 0) return;
610 lexBuf.strsLen++; 610 lexBuf.strsLen++;
611 if (lexBuf.strsLen > lexBuf.maxToken) { 611 if (lexBuf.strsLen > lexBuf.maxToken) {
612 /* double the token string size */ 612 /* double the token string size */
613 lexBuf.maxToken <<= 1; 613 lexBuf.maxToken <<= 1;
614 lexBuf.strs = (char*) realloc(lexBuf.strs,(size_t)lexBuf.maxToken); 614 lexBuf.strs = (char*) realloc(lexBuf.strs,(size_t)lexBuf.maxToken);
615 } 615 }
616 } 616 }
617 617
618static char* lexStr() { 618static char* lexStr() {
619 return dupStr(lexBuf.strs,(size_t)lexBuf.strsLen+1); 619 return dupStr(lexBuf.strs,(size_t)lexBuf.strsLen+1);
620 } 620 }
621 621
622static void lexSkipWhite() { 622static void lexSkipWhite() {
623 int c = lexLookahead(); 623 int c = lexLookahead();
624 while (c == ' ' || c == '\t') { 624 while (c == ' ' || c == '\t') {
625 lexSkipLookahead(); 625 lexSkipLookahead();
626 c = lexLookahead(); 626 c = lexLookahead();
627 } 627 }
628 } 628 }
629 629
630static char* lexGetWord() { 630static char* lexGetWord() {
631 int c; 631 int c;
632 lexSkipWhite(); 632 lexSkipWhite();
633 lexClearToken(); 633 lexClearToken();
634 c = lexLookahead(); 634 c = lexLookahead();
635 while (c != EOF && !strchr("\t\n ;:=",c)) { 635 while (c != EOF && !strchr("\t\n ;:=",c)) {
636 lexAppendc(c); 636 lexAppendc(c);
637 lexSkipLookahead(); 637 lexSkipLookahead();
638 c = lexLookahead(); 638 c = lexLookahead();
639 } 639 }
640 lexAppendc(0); 640 lexAppendc(0);
641 return lexStr(); 641 return lexStr();
642 } 642 }
643 643
644static void lexPushLookaheadc(int c) { 644static void lexPushLookaheadc(int c) {
645 int putptr; 645 int putptr;
646 /* can't putback EOF, because it never leaves lookahead buffer */ 646 /* can't putback EOF, because it never leaves lookahead buffer */
647 if (c == EOF) return; 647 if (c == EOF) return;
648 putptr = (int)lexBuf.getPtr - 1; 648 putptr = (int)lexBuf.getPtr - 1;
649 if (putptr < 0) putptr += MAX_LEX_LOOKAHEAD; 649 if (putptr < 0) putptr += MAX_LEX_LOOKAHEAD;
650 lexBuf.getPtr = putptr; 650 lexBuf.getPtr = putptr;
651 lexBuf.buf[putptr] = c; 651 lexBuf.buf[putptr] = c;
652 lexBuf.len += 1; 652 lexBuf.len += 1;
653 } 653 }
654 654
655static char* lexLookaheadWord() { 655static char* lexLookaheadWord() {
656 /* this function can lookahead word with max size of MAX_LEX_LOOKAHEAD_0 656 /* this function can lookahead word with max size of MAX_LEX_LOOKAHEAD_0
657 / and thing bigger than that will stop the lookahead and return 0; 657 / and thing bigger than that will stop the lookahead and return 0;
658 / leading white spaces are not recoverable. 658 / leading white spaces are not recoverable.
659 */ 659 */
660 int c; 660 int c;
661 int len = 0; 661 int len = 0;
662 int curgetptr = 0; 662 int curgetptr = 0;
663 lexSkipWhite(); 663 lexSkipWhite();
664 lexClearToken(); 664 lexClearToken();
665 curgetptr = (int)lexBuf.getPtr;// remember! 665 curgetptr = (int)lexBuf.getPtr;// remember!
666 while (len < (MAX_LEX_LOOKAHEAD_0)) { 666 while (len < (MAX_LEX_LOOKAHEAD_0)) {
667 c = lexGetc(); 667 c = lexGetc();
668 len++; 668 len++;
669 if (c == EOF || strchr("\t\n ;:=", c)) { 669 if (c == EOF || strchr("\t\n ;:=", c)) {
670 lexAppendc(0); 670 lexAppendc(0);
671 /* restore lookahead buf. */ 671 /* restore lookahead buf. */
672 lexBuf.len += len; 672 lexBuf.len += len;
673 lexBuf.getPtr = curgetptr; 673 lexBuf.getPtr = curgetptr;
674 return lexStr(); 674 return lexStr();
675 } 675 }
676 else 676 else
677 lexAppendc(c); 677 lexAppendc(c);
678 } 678 }
679 lexBuf.len += len;/* char that has been moved to lookahead buffer */ 679 lexBuf.len += len;/* char that has been moved to lookahead buffer */
680 lexBuf.getPtr = curgetptr; 680 lexBuf.getPtr = curgetptr;
681 return 0; 681 return 0;
682 } 682 }
683 683
684#ifdef _SUPPORT_LINE_FOLDING 684#ifdef _SUPPORT_LINE_FOLDING
685static void handleMoreRFC822LineBreak(int c) { 685static void handleMoreRFC822LineBreak(int c) {
686 /* suport RFC 822 line break in cases like 686 /* suport RFC 822 line break in cases like
687 *ADR: foo; 687 *ADR: foo;
688 * morefoo; 688 * morefoo;
689 * more foo; 689 * more foo;
690 */ 690 */
691 if (c == ';') { 691 if (c == ';') {
692 int a; 692 int a;
693 lexSkipLookahead(); 693 lexSkipLookahead();
694 /* skip white spaces */ 694 /* skip white spaces */
695 a = lexLookahead(); 695 a = lexLookahead();
696 while (a == ' ' || a == '\t') { 696 while (a == ' ' || a == '\t') {
697 lexSkipLookahead(); 697 lexSkipLookahead();
698 a = lexLookahead(); 698 a = lexLookahead();
699 } 699 }
700 if (a == '\n') { 700 if (a == '\n') {
701 lexSkipLookahead(); 701 lexSkipLookahead();
702 a = lexLookahead(); 702 a = lexLookahead();
703 if (a == ' ' || a == '\t') { 703 if (a == ' ' || a == '\t') {
704 /* continuation, throw away all the \n and spaces read so 704 /* continuation, throw away all the \n and spaces read so
705 * far 705 * far
706 */ 706 */
707 lexSkipWhite(); 707 lexSkipWhite();
708 lexPushLookaheadc(';'); 708 lexPushLookaheadc(';');
709 } 709 }
710 else { 710 else {
711 lexPushLookaheadc('\n'); 711 lexPushLookaheadc('\n');
712 lexPushLookaheadc(';'); 712 lexPushLookaheadc(';');
713 } 713 }
714 } 714 }
715 else { 715 else {
716 lexPushLookaheadc(';'); 716 lexPushLookaheadc(';');
717 } 717 }
718 } 718 }
719 } 719 }
720 720
721static char* lexGet1Value() { 721static char* lexGet1Value() {
722 int c; 722 int c;
723 lexSkipWhite(); 723 lexSkipWhite();
724 c = lexLookahead(); 724 c = lexLookahead();
725 lexClearToken(); 725 lexClearToken();
726 while (c != EOF && c != ';') { 726 while (c != EOF && c != ';') {
727 if (c == '\\' ) { 727 if (c == '\\' ) {
728 int a; 728 int a;
729 lexSkipLookahead(); 729 lexSkipLookahead();
730 a = lexLookahead(); 730 a = lexLookahead();
731 if ( a != ';' ) { 731 if ( a != ';' ) {
732 lexAppendc('\\'); 732 lexAppendc('\\');
733 } else { 733 } else {
734 lexAppendc( ';' ); 734 lexAppendc( ';' );
735 lexSkipLookahead(); 735 lexSkipLookahead();
736 } 736 }
737 } else if (c == '\n') { 737 } else if (c == '\n') {
738 int a; 738 int a;
739 lexSkipLookahead(); 739 lexSkipLookahead();
740 a = lexLookahead(); 740 a = lexLookahead();
741 if (a == ' ' || a == '\t') { 741 if (a == ' ' || a == '\t') {
742 lexAppendc(' '); 742 lexAppendc(' ');
743 lexSkipLookahead(); 743 lexSkipLookahead();
744 } 744 }
745 else { 745 else {
746 lexPushLookaheadc('\n'); 746 lexPushLookaheadc('\n');
747 break; 747 break;
748 } 748 }
749 } 749 }
750 else { 750 else {
751 lexAppendc(c); 751 lexAppendc(c);
752 lexSkipLookahead(); 752 lexSkipLookahead();
753 } 753 }
754 c = lexLookahead(); 754 c = lexLookahead();
755 } 755 }
756 lexAppendc(0); 756 lexAppendc(0);
757 handleMoreRFC822LineBreak(c); 757 handleMoreRFC822LineBreak(c);
758 return c==EOF?0:lexStr(); 758 return c==EOF?0:lexStr();
759 } 759 }
760#endif 760#endif
761 761
762static int match_begin_name(int end) { 762static int match_begin_name(int end) {
763 char *n = lexLookaheadWord(); 763 char *n = lexLookaheadWord();
764 int token = ID; 764 int token = ID;
765 if (n) { 765 if (n) {
766 if (!qstricmp(n,"vcard")) token = end?END_VCARD:BEGIN_VCARD; 766 if (!qstricmp(n,"vcard")) token = end?END_VCARD:BEGIN_VCARD;
767 else if (!qstricmp(n,"vcalendar")) token = end?END_VCAL:BEGIN_VCAL; 767 else if (!qstricmp(n,"vcalendar")) token = end?END_VCAL:BEGIN_VCAL;
768 else if (!qstricmp(n,"vevent")) token = end?END_VEVENT:BEGIN_VEVENT; 768 else if (!qstricmp(n,"vevent")) token = end?END_VEVENT:BEGIN_VEVENT;
769 else if (!qstricmp(n,"vtodo")) token = end?END_VTODO:BEGIN_VTODO; 769 else if (!qstricmp(n,"vtodo")) token = end?END_VTODO:BEGIN_VTODO;
770 deleteStr(n); 770 deleteStr(n);
771 return token; 771 return token;
772 } 772 }
773 return 0; 773 return 0;
774 } 774 }
775 775
776 776
777#ifdef INCLUDEMFC 777#ifdef INCLUDEMFC
778void initLex(const char *inputstring, unsigned long inputlen, CFile *inputfile) 778void initLex(const char *inputstring, unsigned long inputlen, CFile *inputfile)
779#else 779#else
780void initLex(const char *inputstring, unsigned long inputlen, FILE *inputfile) 780void initLex(const char *inputstring, unsigned long inputlen, FILE *inputfile)
781#endif 781#endif
782 { 782 {
783 // initialize lex mode stack 783 // initialize lex mode stack
784 lexBuf.lexModeStack[lexBuf.lexModeStackTop=0] = L_NORMAL; 784 lexBuf.lexModeStack[lexBuf.lexModeStackTop=0] = L_NORMAL;
785 785
786 // iniatialize lex buffer. 786 // iniatialize lex buffer.
787 lexBuf.inputString = (char*) inputstring; 787 lexBuf.inputString = (char*) inputstring;
788 lexBuf.inputLen = inputlen; 788 lexBuf.inputLen = inputlen;
789 lexBuf.curPos = 0; 789 lexBuf.curPos = 0;
790 lexBuf.inputFile = inputfile; 790 lexBuf.inputFile = inputfile;
791 791
792 lexBuf.len = 0; 792 lexBuf.len = 0;
793 lexBuf.getPtr = 0; 793 lexBuf.getPtr = 0;
794 794
795 lexBuf.maxToken = MAXTOKEN; 795 lexBuf.maxToken = MAXTOKEN;
796 lexBuf.strs = (char*)malloc(MAXTOKEN); 796 lexBuf.strs = (char*)malloc(MAXTOKEN);
797 lexBuf.strsLen = 0; 797 lexBuf.strsLen = 0;
798 798
799 } 799 }
800 800
801static void finiLex() { 801static void finiLex() {
802 free(lexBuf.strs); 802 free(lexBuf.strs);
803 } 803 }
804 804
805 805
806/*-----------------------------------*/ 806/*-----------------------------------*/
807/* This parses and converts the base64 format for binary encoding into 807/* This parses and converts the base64 format for binary encoding into
808 * a decoded buffer (allocated with new). See RFC 1521. 808 * a decoded buffer (allocated with new). See RFC 1521.
809 */ 809 */
810static char * lexGetDataFromBase64() 810static char * lexGetDataFromBase64()
811 { 811 {
812 unsigned long bytesLen = 0, bytesMax = 0; 812 unsigned long bytesLen = 0, bytesMax = 0;
813 int quadIx = 0, pad = 0; 813 int quadIx = 0, pad = 0;
814 unsigned long trip = 0; 814 unsigned long trip = 0;
815 unsigned char b; 815 unsigned char b;
816 int c; 816 int c;
817 unsigned char *bytes = NULL; 817 unsigned char *bytes = NULL;
818 unsigned char *oldBytes = NULL; 818 unsigned char *oldBytes = NULL;
819 819
820 DBG_(("db: lexGetDataFromBase64\n")); 820 DBG_(("db: lexGetDataFromBase64\n"));
821 while (1) { 821 while (1) {
822 c = lexGetc(); 822 c = lexGetc();
823 if (c == '\n') { 823 if (c == '\n') {
824 ++mime_lineNum; 824 ++mime_lineNum;
825 if (lexLookahead() == '\n') { 825 if (lexLookahead() == '\n') {
826 /* a '\n' character by itself means end of data */ 826 /* a '\n' character by itself means end of data */
827 break; 827 break;
828 } 828 }
829 else continue; /* ignore '\n' */ 829 else continue; /* ignore '\n' */
830 } 830 }
831 else { 831 else {
832 if ((c >= 'A') && (c <= 'Z')) 832 if ((c >= 'A') && (c <= 'Z'))
833 b = (unsigned char)(c - 'A'); 833 b = (unsigned char)(c - 'A');
834 else if ((c >= 'a') && (c <= 'z')) 834 else if ((c >= 'a') && (c <= 'z'))
835 b = (unsigned char)(c - 'a') + 26; 835 b = (unsigned char)(c - 'a') + 26;
836 else if ((c >= '0') && (c <= '9')) 836 else if ((c >= '0') && (c <= '9'))
837 b = (unsigned char)(c - '0') + 52; 837 b = (unsigned char)(c - '0') + 52;
838 else if (c == '+') 838 else if (c == '+')
839 b = 62; 839 b = 62;
840 else if (c == '/') 840 else if (c == '/')
841 b = 63; 841 b = 63;
842 else if (c == '=') { 842 else if (c == '=') {
843 b = 0; 843 b = 0;
844 pad++; 844 pad++;
845 } else if ((c == ' ') || (c == '\t')) { 845 } else if ((c == ' ') || (c == '\t')) {
846 continue; 846 continue;
847 } else { /* error condition */ 847 } else { /* error condition */
848 if (bytes) free(bytes); 848 if (bytes) free(bytes);
849 else if (oldBytes) free(oldBytes); 849 else if (oldBytes) free(oldBytes);
850 // error recovery: skip until 2 adjacent newlines. 850 // error recovery: skip until 2 adjacent newlines.
851 DBG_(("db: invalid character 0x%x '%c'\n", c,c)); 851 DBG_(("db: invalid character 0x%x '%c'\n", c,c));
852 if (c != EOF) { 852 if (c != EOF) {
853 c = lexGetc(); 853 c = lexGetc();
854 while (c != EOF) { 854 while (c != EOF) {
855 if (c == '\n' && lexLookahead() == '\n') { 855 if (c == '\n' && lexLookahead() == '\n') {
856 ++mime_lineNum; 856 ++mime_lineNum;
857 break; 857 break;
858 } 858 }
859 c = lexGetc(); 859 c = lexGetc();
860 } 860 }
861 } 861 }
862 return NULL; 862 return NULL;
863 } 863 }
864 trip = (trip << 6) | b; 864 trip = (trip << 6) | b;
865 if (++quadIx == 4) { 865 if (++quadIx == 4) {
866 unsigned char outBytes[3]; 866 unsigned char outBytes[3];
867 int numOut; 867 int numOut;
868 int i; 868 int i;
869 for (i = 0; i < 3; i++) { 869 for (i = 0; i < 3; i++) {
870 outBytes[2-i] = (unsigned char)(trip & 0xFF); 870 outBytes[2-i] = (unsigned char)(trip & 0xFF);
871 trip >>= 8; 871 trip >>= 8;
872 } 872 }
873 numOut = 3 - pad; 873 numOut = 3 - pad;
874 if (bytesLen + numOut > bytesMax) { 874 if (bytesLen + numOut > bytesMax) {
875 if (!bytes) { 875 if (!bytes) {
876 bytesMax = 1024; 876 bytesMax = 1024;
877 bytes = (unsigned char*)malloc((size_t)bytesMax); 877 bytes = (unsigned char*)malloc((size_t)bytesMax);
878 } 878 }
879 else { 879 else {
880 bytesMax <<= 2; 880 bytesMax <<= 2;
881 oldBytes = bytes; 881 oldBytes = bytes;
882 bytes = (unsigned char*)realloc(bytes,(size_t)bytesMax); 882 bytes = (unsigned char*)realloc(bytes,(size_t)bytesMax);
883 } 883 }
884 if (bytes == 0) { 884 if (bytes == 0) {
885 mime_error("out of memory while processing BASE64 data\n"); 885 mime_error("out of memory while processing BASE64 data\n");
886 } 886 }
887 } 887 }
888 if (bytes) { 888 if (bytes) {
889 memcpy(bytes + bytesLen, outBytes, numOut); 889 memcpy(bytes + bytesLen, outBytes, numOut);
890 bytesLen += numOut; 890 bytesLen += numOut;
891 } 891 }
892 trip = 0; 892 trip = 0;
893 quadIx = 0; 893 quadIx = 0;
894 } 894 }
895 } 895 }
896 } /* while */ 896 } /* while */
897 DBG_(("db: bytesLen = %d\n", bytesLen)); 897 DBG_(("db: bytesLen = %d\n", bytesLen));
898 /* kludge: all this won't be necessary if we have tree form 898 /* kludge: all this won't be necessary if we have tree form
899 representation */ 899 representation */
900 if (bytes) { 900 if (bytes) {
901 setValueWithSize(curProp,bytes,(unsigned int)bytesLen); 901 setValueWithSize(curProp,bytes,(unsigned int)bytesLen);
902 free(bytes); 902 free(bytes);
903 } 903 }
904 else if (oldBytes) { 904 else if (oldBytes) {
905 setValueWithSize(curProp,oldBytes,(unsigned int)bytesLen); 905 setValueWithSize(curProp,oldBytes,(unsigned int)bytesLen);
906 free(oldBytes); 906 free(oldBytes);
907 } 907 }
908 return 0; 908 return 0;
909 } 909 }
910 910
911static int match_begin_end_name(int end) { 911static int match_begin_end_name(int end) {
912 int token; 912 int token;
913 lexSkipWhite(); 913 lexSkipWhite();
914 if (lexLookahead() != ':') return ID; 914 if (lexLookahead() != ':') return ID;
915 lexSkipLookahead(); 915 lexSkipLookahead();
916 lexSkipWhite(); 916 lexSkipWhite();
917 token = match_begin_name(end); 917 token = match_begin_name(end);
918 if (token == ID) { 918 if (token == ID) {
919 lexPushLookaheadc(':'); 919 lexPushLookaheadc(':');
920 DBG_(("db: ID '%s'\n", yylval.str)); 920 DBG_(("db: ID '%s'\n", yylval.str));
921 return ID; 921 return ID;
922 } 922 }
923 else if (token != 0) { 923 else if (token != 0) {
924 lexSkipLookaheadWord(); 924 lexSkipLookaheadWord();
925 deleteStr(yylval.str); 925 deleteStr(yylval.str);
926 DBG_(("db: begin/end %d\n", token)); 926 DBG_(("db: begin/end %d\n", token));
927 return token; 927 return token;
928 } 928 }
929 return 0; 929 return 0;
930 } 930 }
931 931
932static char* lexGetQuotedPrintable() 932static char* lexGetQuotedPrintable()
933 { 933{
934 char cur; 934 int c;
935 935 lexSkipWhite();
936 lexClearToken(); 936 c = lexLookahead();
937 do { 937 lexClearToken();
938 cur = lexGetc(); 938
939 switch (cur) { 939 while (c != EOF && c != ';') {
940 case '=': { 940 if (c == '\n') {
941 int c = 0; 941 // break, leave '\n' on remaining chars.
942 int next[2]; 942 break;
943 int i; 943 } else if (c == '=') {
944 for (i = 0; i < 2; i++) { 944 int cur = 0;
945 next[i] = lexGetc(); 945 int next;
946 if (next[i] >= '0' && next[i] <= '9') 946
947 c = c * 16 + next[i] - '0'; 947 lexSkipLookahead(); // skip '='
948 else if (next[i] >= 'A' && next[i] <= 'F') 948 next = lexLookahead();
949 c = c * 16 + next[i] - 'A' + 10; 949
950 else 950 if (next == '\n') {
951 break; 951 // skip and only skip the \n
952 } 952 lexSkipLookahead();
953 if (i == 0) { 953 c = lexLookahead();
954 /* single '=' follow by LINESEP is continuation sign? */ 954 ++mime_lineNum; // aid in error reporting
955 if (next[0] == '\n') { 955 continue;
956 ++mime_lineNum; 956 } else if (next >= '0' && next <= '9') {
957 } 957 cur = next - '0';
958 else { 958 } else if (next >= 'A' && next <= 'F') {
959 lexPushLookaheadc('='); 959 cur = next - 'A' + 10;
960 goto EndString; 960 } else {
961 } 961 // we have been sent buggy stuff. doesn't matter
962 } 962 // what we do so long as we keep going.
963 else if (i == 1) { 963 // should probably spit an error here
964 lexPushLookaheadc(next[1]); 964 c = lexLookahead();
965 lexPushLookaheadc(next[0]); 965 continue;
966 lexAppendc('='); 966 }
967 } else { 967
968 lexAppendc(c); 968 lexSkipLookahead(); // skip A-Z0-9
969 } 969 next = lexLookahead();
970 break; 970
971 } /* '=' */ 971 cur = cur * 16;
972 case '\n': { 972 // this time really just expecting 0-9A-F
973 lexPushLookaheadc('\n'); 973 if (next >= '0' && next <= '9') {
974 goto EndString; 974 cur += next - '0';
975 } 975 } else if (next >= 'A' && next <= 'F') {
976 case (char)EOF: 976 cur += next - 'A' + 10;
977 break; 977 } else {
978 default: 978 // we have been sent buggy stuff. doesn't matter
979 lexAppendc(cur); 979 // what we do so long as we keep going.
980 break; 980 // should probably spit an error here
981 } /* switch */ 981 c = lexLookahead();
982 } while (cur != (char)EOF); 982 continue;
983 983 }
984EndString: 984
985 lexAppendc(0); 985 // got a valid escaped =. append it.
986 return lexStr(); 986 lexSkipLookahead(); // skip second 0-9A-F
987 } /* LexQuotedPrintable */ 987 lexAppendc(cur);
988 988 } else {
989static int yylex() { 989 lexSkipLookahead(); // skip whatever we just read.
990 990 lexAppendc(c); // and append it.
991 int lexmode = LEXMODE(); 991 }
992 if (lexmode == L_VALUES) { 992 c = lexLookahead();
993 int c = lexGetc(); 993 }
994 if (c == ';') { 994 lexAppendc(0);
995 DBG_(("db: SEMICOLON\n")); 995 return c==EOF?0:lexStr();
996 lexPushLookaheadc(c); 996}
997 handleMoreRFC822LineBreak(c); 997
998 lexSkipLookahead(); 998static int yylex() {
999 return SEMICOLON; 999
1000 } 1000 int lexmode = LEXMODE();
1001 else if (strchr("\n",c)) { 1001 if (lexmode == L_VALUES) {
1002 ++mime_lineNum; 1002 int c = lexGetc();
1003 /* consume all line separator(s) adjacent to each other */ 1003 if (c == ';') {
1004 c = lexLookahead(); 1004 DBG_(("db: SEMICOLON\n"));
1005 while (strchr("\n",c)) { 1005 lexPushLookaheadc(c);
1006 lexSkipLookahead(); 1006 handleMoreRFC822LineBreak(c);
1007 c = lexLookahead(); 1007 lexSkipLookahead();
1008 ++mime_lineNum; 1008 return SEMICOLON;
1009 } 1009 }
1010 DBG_(("db: LINESEP\n")); 1010 else if (strchr("\n",c)) {
1011 return LINESEP; 1011 ++mime_lineNum;
1012 } 1012 /* consume all line separator(s) adjacent to each other */
1013 else { 1013 c = lexLookahead();
1014 char *p = 0; 1014 while (strchr("\n",c)) {
1015 lexPushLookaheadc(c); 1015 lexSkipLookahead();
1016 if (lexWithinMode(L_BASE64)) { 1016 c = lexLookahead();
1017 /* get each char and convert to bin on the fly... */ 1017 ++mime_lineNum;
1018 p = lexGetDataFromBase64(); 1018 }
1019 yylval.str = p; 1019 DBG_(("db: LINESEP\n"));
1020 return STRING; 1020 return LINESEP;
1021 } 1021 }
1022 else if (lexWithinMode(L_QUOTED_PRINTABLE)) { 1022 else {
1023 p = lexGetQuotedPrintable(); 1023 char *p = 0;
1024 } 1024 lexPushLookaheadc(c);
1025 else { 1025 if (lexWithinMode(L_BASE64)) {
1026#ifdef _SUPPORT_LINE_FOLDING 1026 /* get each char and convert to bin on the fly... */
1027 p = lexGet1Value(); 1027 p = lexGetDataFromBase64();
1028#else 1028 yylval.str = p;
1029 p = lexGetStrUntil(";\n"); 1029 return STRING;
1030#endif 1030 }
1031 } 1031 else if (lexWithinMode(L_QUOTED_PRINTABLE)) {
1032 if (p) { 1032 p = lexGetQuotedPrintable();
1033 DBG_(("db: STRING: '%s'\n", p)); 1033 }
1034 yylval.str = p; 1034 else {
1035 return STRING; 1035#ifdef _SUPPORT_LINE_FOLDING
1036 } 1036 p = lexGet1Value();
1037 else return 0; 1037#else
1038 } 1038 p = lexGetStrUntil(";\n");
1039 } 1039#endif
1040 else { 1040 }
1041 /* normal mode */ 1041 if (p) {
1042 while (1) { 1042 DBG_(("db: STRING: '%s'\n", p));
1043 int c = lexGetc(); 1043 yylval.str = p;
1044 switch(c) { 1044 return STRING;
1045 case ':': { 1045 }
1046 /* consume all line separator(s) adjacent to each other */ 1046 else return 0;
1047 /* ignoring linesep immediately after colon. */ 1047 }
1048 c = lexLookahead(); 1048 }
1049 while (strchr("\n",c)) { 1049 else {
1050 lexSkipLookahead(); 1050 /* normal mode */
1051 c = lexLookahead(); 1051 while (1) {
1052 ++mime_lineNum; 1052 int c = lexGetc();
1053 } 1053 switch(c) {
1054 DBG_(("db: COLON\n")); 1054 case ':': {
1055 return COLON; 1055 /* consume all line separator(s) adjacent to each other */
1056 } 1056 /* ignoring linesep immediately after colon. */
1057 case ';': 1057 c = lexLookahead();
1058 DBG_(("db: SEMICOLON\n")); 1058 while (strchr("\n",c)) {
1059 return SEMICOLON; 1059 lexSkipLookahead();
1060 case '=': 1060 c = lexLookahead();
1061 DBG_(("db: EQ\n")); 1061 ++mime_lineNum;
1062 return EQ; 1062 }
1063 /* ignore whitespace in this mode */ 1063 DBG_(("db: COLON\n"));
1064 case '\t': 1064 return COLON;
1065 case ' ': continue; 1065 }
1066 case '\n': { 1066 case ';':
1067 ++mime_lineNum; 1067 DBG_(("db: SEMICOLON\n"));
1068 continue; 1068 return SEMICOLON;
1069 } 1069 case '=':
1070 case EOF: return 0; 1070 DBG_(("db: EQ\n"));
1071 break; 1071 return EQ;
1072 default: { 1072 /* ignore whitespace in this mode */
1073 lexPushLookaheadc(c); 1073 case '\t':
1074 if (isalnum(c)) { 1074 case ' ': continue;
1075 char *t = lexGetWord(); 1075 case '\n': {
1076 yylval.str = t; 1076 ++mime_lineNum;
1077 if (!qstricmp(t, "begin")) { 1077 continue;
1078 return match_begin_end_name(0); 1078 }
1079 } 1079 case EOF: return 0;
1080 else if (!qstricmp(t,"end")) { 1080 break;
1081 return match_begin_end_name(1); 1081 default: {
1082 } 1082 lexPushLookaheadc(c);
1083 else { 1083 if (isalnum(c)) {
1084 DBG_(("db: ID '%s'\n", t)); 1084 char *t = lexGetWord();
1085 return ID; 1085 yylval.str = t;
1086 } 1086 if (!qstricmp(t, "begin")) {
1087 } 1087 return match_begin_end_name(0);
1088 else { 1088 }
1089 /* unknow token */ 1089 else if (!qstricmp(t,"end")) {
1090 return 0; 1090 return match_begin_end_name(1);
1091 } 1091 }
1092 break; 1092 else {
1093 } 1093 DBG_(("db: ID '%s'\n", t));
1094 } 1094 return ID;
1095 } 1095 }
1096 } 1096 }
1097 return 0; 1097 else {
1098 } 1098 /* unknow token */
1099 1099 return 0;
1100 1100 }
1101/***************************************************************************/ 1101 break;
1102 /*** Public Functions ****/ 1102 }
1103/***************************************************************************/ 1103 }
1104 1104 }
1105static VObject* Parse_MIMEHelper() 1105 }
1106 { 1106 return 0;
1107 ObjStackTop = -1; 1107 }
1108 mime_numErrors = 0; 1108
1109 mime_lineNum = 1; 1109
1110 vObjList = 0; 1110/***************************************************************************/
1111 curObj = 0; 1111 /*** Public Functions ****/
1112 1112/***************************************************************************/
1113 if (yyparse() != 0) 1113
1114 return 0; 1114static VObject* Parse_MIMEHelper()
1115 1115 {
1116 finiLex(); 1116 ObjStackTop = -1;
1117 return vObjList; 1117 mime_numErrors = 0;
1118 } 1118 mime_lineNum = 1;
1119 1119 vObjList = 0;
1120/*--------------------------------------------*/ 1120 curObj = 0;
1121DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len) 1121
1122 { 1122 if (yyparse() != 0)
1123 initLex(input, len, 0); 1123 return 0;
1124 return Parse_MIMEHelper(); 1124
1125 } 1125 finiLex();
1126 1126 return vObjList;
1127 1127 }
1128#if INCLUDEMFC 1128
1129 1129/*--------------------------------------------*/
1130DLLEXPORT(VObject*) Parse_MIME_FromFile(CFile *file) 1130DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len)
1131 { 1131 {
1132 unsigned long startPos; 1132 initLex(input, len, 0);
1133 VObject *result; 1133 return Parse_MIMEHelper();
1134 1134 }
1135 initLex(0,-1,file); 1135
1136 startPos = file->GetPosition(); 1136
1137 if (!(result = Parse_MIMEHelper())) 1137#if INCLUDEMFC
1138 file->Seek(startPos, CFile::begin); 1138
1139 return result; 1139DLLEXPORT(VObject*) Parse_MIME_FromFile(CFile *file)
1140 } 1140 {
1141 1141 unsigned long startPos;
1142#else 1142 VObject *result;
1143 1143
1144VObject* Parse_MIME_FromFile(FILE *file) 1144 initLex(0,-1,file);
1145 { 1145 startPos = file->GetPosition();
1146 VObject *result; 1146 if (!(result = Parse_MIMEHelper()))
1147 long startPos; 1147 file->Seek(startPos, CFile::begin);
1148 1148 return result;
1149 initLex(0,(unsigned long)-1,file); 1149 }
1150 startPos = ftell(file); 1150
1151 if (!(result = Parse_MIMEHelper())) { 1151#else
1152 fseek(file,startPos,SEEK_SET); 1152
1153 } 1153VObject* Parse_MIME_FromFile(FILE *file)
1154 return result; 1154 {
1155 } 1155 VObject *result;
1156 1156 long startPos;
1157DLLEXPORT(VObject*) Parse_MIME_FromFileName(char *fname) 1157
1158 { 1158 initLex(0,(unsigned long)-1,file);
1159 FILE *fp = fopen(fname,"r"); 1159 startPos = ftell(file);
1160 if (fp) { 1160 if (!(result = Parse_MIMEHelper())) {
1161 VObject* o = Parse_MIME_FromFile(fp); 1161 fseek(file,startPos,SEEK_SET);
1162 fclose(fp); 1162 }
1163 return o; 1163 return result;
1164 } 1164 }
1165 else { 1165
1166 char msg[80]; 1166DLLEXPORT(VObject*) Parse_MIME_FromFileName(char *fname)
1167 sprintf(msg, "can't open file '%s' for reading\n", fname); 1167 {
1168 mime_error_(msg); 1168 FILE *fp = fopen(fname,"r");
1169 return 0; 1169 if (fp) {
1170 } 1170 VObject* o = Parse_MIME_FromFile(fp);
1171 } 1171 fclose(fp);
1172 1172 return o;
1173#endif 1173 }
1174 1174 else {
1175/*-------------------------------------*/ 1175 char msg[80];
1176 1176 sprintf(msg, "can't open file '%s' for reading\n", fname);
1177static MimeErrorHandler mimeErrorHandler; 1177 mime_error_(msg);
1178 1178 return 0;
1179DLLEXPORT(void) registerMimeErrorHandler(MimeErrorHandler me) 1179 }
1180 { 1180 }
1181 mimeErrorHandler = me; 1181
1182 } 1182#endif
1183 1183
1184void mime_error(char *s) 1184/*-------------------------------------*/
1185 { 1185
1186 char msg[256]; 1186static MimeErrorHandler mimeErrorHandler;
1187 if (mimeErrorHandler) { 1187
1188 sprintf(msg,"%s at line %d", s, mime_lineNum); 1188DLLEXPORT(void) registerMimeErrorHandler(MimeErrorHandler me)
1189 mimeErrorHandler(msg); 1189 {
1190 } 1190 mimeErrorHandler = me;
1191 } 1191 }
1192 1192
1193void mime_error_(char *s) 1193void mime_error(char *s)
1194 { 1194 {
1195 if (mimeErrorHandler) { 1195 char msg[256];
1196 mimeErrorHandler(s); 1196 if (mimeErrorHandler) {
1197 } 1197 sprintf(msg,"%s at line %d", s, mime_lineNum);
1198 } 1198 mimeErrorHandler(msg);
1199 1199 }
1200 }
1201
1202void mime_error_(char *s)
1203 {
1204 if (mimeErrorHandler) {
1205 mimeErrorHandler(s);
1206 }
1207 }
1208
diff --git a/library/backend/vcc_yacc.cpp b/library/backend/vcc_yacc.cpp
index cb24631..19a108f 100644
--- a/library/backend/vcc_yacc.cpp
+++ b/library/backend/vcc_yacc.cpp
@@ -1,19 +1,44 @@
1#ifndef lint 1#ifndef lint
2 static char yysccsid[] = "@(#)yaccpar1.9 (Berkeley) 02/21/93"; 2 /*static char yysccsid[] = "from: @(#)yaccpar1.9 (Berkeley) 02/21/93";*/
3static char yyrcsid[] = "$Id$";
3#endif 4#endif
4#define YYBYACC 1 5#define YYBYACC 1
5#define YYMAJOR 1 6#define YYMAJOR 1
6#define YYMINOR 9 7#define YYMINOR 9
7#define yyclearin (yychar=(-1)) 8#define yyclearin (yychar=(-1))
8#define yyerrok (yyerrflag=0) 9#define yyerrok (yyerrflag=0)
9#define YYRECOVERING (yyerrflag!=0) 10#define YYRECOVERING (yyerrflag!=0)
10#define YYPREFIX "yy" 11#define yyparse vccparse
11#line 1 "vcc.y" 12#define yylex vcclex
13#define yyerror vccerror
14#define yychar vccchar
15#define yyval vccval
16#define yylval vcclval
17#define yydebug vccdebug
18#define yynerrs vccnerrs
19#define yyerrflag vccerrflag
20#define yyss vccss
21#define yyssp vccssp
22#define yyvs vccvs
23#define yyvsp vccvsp
24#define yylhs vcclhs
25#define yylen vcclen
26#define yydefred vccdefred
27#define yydgoto vccdgoto
28#define yysindex vccsindex
29#define yyrindex vccrindex
30#define yygindex vccgindex
31#define yytable vcctable
32#define yycheck vcccheck
33#define yyname vccname
34#define yyrule vccrule
35#define YYPREFIX "vcc"
36#line 1 "backend/vcc.y"
12 37
13 38
14/*************************************************************************** 39/***************************************************************************
15(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International 40(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
16Business Machines Corporation and Siemens Rolm Communications Inc. 41Business Machines Corporation and Siemens Rolm Communications Inc.
17 42
18For purposes of this license notice, the term Licensors shall mean, 43For purposes of this license notice, the term Licensors shall mean,
19collectively, Apple Computer, Inc., AT&T Corp., International 44collectively, Apple Computer, Inc., AT&T Corp., International
@@ -68,16 +93,17 @@ DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
68#endif 93#endif
69 94
70/**** External Functions ****/ 95/**** External Functions ****/
71 96
72/* assign local name to parser variables and functions so that 97/* assign local name to parser variables and functions so that
73 we can use more than one yacc based parser. 98 we can use more than one yacc based parser.
74*/ 99*/
75 100
101#if 0
76#define yyparse mime_parse 102#define yyparse mime_parse
77#define yylex mime_lex 103#define yylex mime_lex
78#define yyerror mime_error 104#define yyerror mime_error
79#define yychar mime_char 105#define yychar mime_char
80/* #define p_yyval p_mime_val */ 106/* #define p_yyval p_mime_val */
81#undef yyval 107#undef yyval
82#define yyval mime_yyval 108#define yyval mime_yyval
83/* #define p_yylval p_mime_lval */ 109/* #define p_yylval p_mime_lval */
@@ -100,16 +126,17 @@ DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
100#define yytable mime_table 126#define yytable mime_table
101#define yycheck mime_check 127#define yycheck mime_check
102#define yyname mime_name 128#define yyname mime_name
103#define yyrule mime_rule 129#define yyrule mime_rule
104#ifdef YYPREFIX 130#ifdef YYPREFIX
105#undef YYPREFIX 131#undef YYPREFIX
106#endif 132#endif
107#define YYPREFIX "mime_" 133#define YYPREFIX "mime_"
134#endif
108 135
109 136
110#ifndef _NO_LINE_FOLDING 137#ifndef _NO_LINE_FOLDING
111#define _SUPPORT_LINE_FOLDING 1 138#define _SUPPORT_LINE_FOLDING 1
112#endif 139#endif
113 140
114/* undef below if compile with MFC */ 141/* undef below if compile with MFC */
115/* #define INCLUDEMFC 1 */ 142/* #define INCLUDEMFC 1 */
@@ -123,30 +150,27 @@ DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
123#include <string.h> 150#include <string.h>
124#ifndef __MWERKS__ 151#ifndef __MWERKS__
125#include <stdlib.h> 152#include <stdlib.h>
126#endif 153#endif
127#include <stdio.h> 154#include <stdio.h>
128#include <stdlib.h> 155#include <stdlib.h>
129#include <ctype.h> 156#include <ctype.h>
130 157
131#ifdef PALMTOPCENTER 158/*#ifdef PALMTOPCENTER */
132#include <qpe/vobject_p.h> 159/*#include <qpe/vobject_p.h> */
133#include <qpe/qfiledirect_p.h> 160/*#else */
134#else
135#include "vobject_p.h" 161#include "vobject_p.h"
136#include "qfiledirect_p.h" 162/*#endif */
137#endif
138 163
139/**** Types, Constants ****/ 164/**** Types, Constants ****/
140 165
141 #define YYDEBUG 0/* 1 to compile in some debugging code */ 166 #define YYDEBUG 0/* 1 to compile in some debugging code */
142 #define MAXTOKEN 256/* maximum token (line) length */ 167 #define MAXTOKEN 256/* maximum token (line) length */
143 #define YYSTACKSIZE 100/* ~unref ? 168 #define YYSTACKSIZE 100/* ~unref ? */
144*/
145 #define MAXLEVEL 10/* max # of nested objects parseable */ 169 #define MAXLEVEL 10/* max # of nested objects parseable */
146 /* (includes outermost) */ 170 /* (includes outermost) */
147 171
148 172
149/**** Global Variables ****/ 173/**** Global Variables ****/
150int mime_lineNum, mime_numErrors; /* yyerror() can use these */ 174int mime_lineNum, mime_numErrors; /* yyerror() can use these */
151static VObject* vObjList; 175static VObject* vObjList;
152static VObject *curProp; 176static VObject *curProp;
@@ -183,24 +207,26 @@ enum LexMode {
183static int pushVObject(const char *prop); 207static int pushVObject(const char *prop);
184static VObject* popVObject(); 208static VObject* popVObject();
185static void lexPopMode(int top); 209static void lexPopMode(int top);
186static int lexWithinMode(enum LexMode mode); 210static int lexWithinMode(enum LexMode mode);
187static void lexPushMode(enum LexMode mode); 211static void lexPushMode(enum LexMode mode);
188static void enterProps(const char *s); 212static void enterProps(const char *s);
189static void enterAttr(const char *s1, const char *s2); 213static void enterAttr(const char *s1, const char *s2);
190static void enterValues(const char *value); 214static void enterValues(const char *value);
215#define mime_error yyerror
216void mime_error(char *s);
191void mime_error_(char *s); 217void mime_error_(char *s);
192 218
193#line 185 "vcc.y" 219#line 189 "backend/vcc.y"
194typedef union { 220typedef union {
195 char *str; 221 char *str;
196 VObject *vobj; 222 VObject *vobj;
197 } YYSTYPE; 223 } YYSTYPE;
198#line 196 "y.tab.c" 224#line 225 "y.tab.c"
199#define EQ 257 225#define EQ 257
200#define COLON 258 226#define COLON 258
201#define DOT 259 227#define DOT 259
202#define SEMICOLON 260 228#define SEMICOLON 260
203#define SPACE 261 229#define SPACE 261
204#define HTAB 262 230#define HTAB 262
205#define LINESEP 263 231#define LINESEP 263
206#define NEWLINE 264 232#define NEWLINE 264
@@ -210,103 +236,103 @@ typedef union {
210#define END_VCAL 268 236#define END_VCAL 268
211#define BEGIN_VEVENT 269 237#define BEGIN_VEVENT 269
212#define END_VEVENT 270 238#define END_VEVENT 270
213#define BEGIN_VTODO 271 239#define BEGIN_VTODO 271
214#define END_VTODO 272 240#define END_VTODO 272
215#define ID 273 241#define ID 273
216#define STRING 274 242#define STRING 274
217#define YYERRCODE 256 243#define YYERRCODE 256
218short yylhs[] = { -1, 244short vcclhs[] = { -1,
219 0, 6, 6, 5, 5, 8, 3, 9, 3, 7, 245 0, 6, 6, 5, 5, 8, 3, 9, 3, 7,
220 7, 13, 10, 10, 15, 11, 11, 14, 14, 16, 246 7, 13, 10, 10, 15, 11, 11, 14, 14, 16,
221 17, 17, 1, 18, 12, 12, 2, 2, 20, 4, 247 17, 17, 1, 18, 12, 12, 2, 2, 20, 4,
222 21, 4, 19, 19, 22, 22, 22, 25, 23, 26, 248 21, 4, 19, 19, 22, 22, 22, 25, 23, 26,
223 23, 27, 24, 28, 24, 249 23, 27, 24, 28, 24,
224}; 250};
225short yylen[] = { 2, 251short vcclen[] = { 2,
226 1, 2, 1, 1, 1, 0, 4, 0, 3, 2, 252 1, 2, 1, 1, 1, 0, 4, 0, 3, 2,
227 1, 0, 5, 1, 0, 3, 1, 2, 1, 2, 253 1, 0, 5, 1, 0, 3, 1, 2, 1, 2,
228 1, 3, 1, 0, 4, 1, 1, 0, 0, 4, 254 1, 3, 1, 0, 4, 1, 1, 0, 0, 4,
229 0, 3, 2, 1, 1, 1, 1, 0, 4, 0, 255 0, 3, 2, 1, 1, 1, 1, 0, 4, 0,
230 3, 0, 4, 0, 3, 256 3, 0, 4, 0, 3,
231}; 257};
232short yydefred[] = { 0, 258short vccdefred[] = { 0,
233 0, 0, 0, 4, 5, 3, 0, 0, 0, 0, 259 0, 0, 0, 4, 5, 3, 0, 0, 0, 0,
234 0, 2, 14, 23, 0, 0, 11, 0, 9, 0, 260 0, 2, 14, 23, 0, 0, 11, 0, 9, 0,
235 0, 0, 0, 34, 35, 36, 32, 0, 7, 10, 261 0, 0, 0, 34, 35, 36, 32, 0, 7, 10,
236 12, 0, 0, 0, 0, 30, 33, 0, 0, 19, 262 12, 0, 0, 0, 0, 30, 33, 0, 0, 19,
237 0, 0, 41, 0, 45, 0, 20, 18, 27, 0, 263 0, 0, 41, 0, 45, 0, 20, 18, 27, 0,
238 0, 39, 43, 0, 24, 13, 22, 0, 25, 264 0, 39, 43, 0, 24, 13, 22, 0, 25,
239}; 265};
240short yydgoto[] = { 3, 266short vccdgoto[] = { 3,
241 15, 50, 4, 5, 6, 7, 22, 8, 9, 17, 267 15, 50, 4, 5, 6, 7, 22, 8, 9, 17,
242 18, 51, 41, 39, 28, 40, 47, 58, 23, 10, 268 18, 51, 41, 39, 28, 40, 47, 58, 23, 10,
243 11, 24, 25, 26, 32, 33, 34, 35, 269 11, 24, 25, 26, 32, 33, 34, 35,
244}; 270};
245short yysindex[] = { -262, 271short vccsindex[] = { -262,
246 0, 0, 0, 0, 0, 0, -262, -252, -219, -249, 272 0, 0, 0, 0, 0, 0, -262, -252, -219, -249,
247 -256, 0, 0, 0, 0, -227, 0, -242, 0, 0, 273 -256, 0, 0, 0, 0, -227, 0, -242, 0, 0,
248 0, -252, -254, 0, 0, 0, 0, -208, 0, 0, 274 0, -252, -254, 0, 0, 0, 0, -208, 0, 0,
249 0, -252, -228, -252, -213, 0, 0, -212, -208, 0, 275 0, -252, -228, -252, -213, 0, 0, -212, -208, 0,
250 -214, -233, 0, -224, 0, -195, 0, 0, 0, -197, 276 -214, -233, 0, -224, 0, -195, 0, 0, 0, -197,
251 -199, 0, 0, -212, 0, 0, 0, -214, 0, 277 -199, 0, 0, -212, 0, 0, 0, -214, 0,
252}; 278};
253short yyrindex[] = { 0, 279short vccrindex[] = { 0,
254 -222, -238, 0, 0, 0, 0, 65, 0, 0, 0, 280 -222, -238, 0, 0, 0, 0, 65, 0, 0, 0,
255 0, 0, 0, 0, -215, 0, 0, 0, 0, -220, 281 0, 0, 0, 0, -215, 0, 0, 0, 0, -220,
256 -218, -260, 0, 0, 0, 0, 0, 0, 0, 0, 282 -218, -260, 0, 0, 0, 0, 0, 0, 0, 0,
257 0, 0, 0, 0, 0, 0, 0, 0, -192, 0, 283 0, 0, 0, 0, 0, 0, 0, 0, -192, 0,
258 -250, 0, 0, 0, 0, -202, 0, 0, 0, -196, 284 -250, 0, 0, 0, 0, -202, 0, 0, 0, -196,
259 0, 0, 0, 0, 0, 0, 0, -250, 0, 285 0, 0, 0, 0, 0, 0, 0, -250, 0,
260}; 286};
261short yygindex[] = { 0, 287short vccgindex[] = { 0,
262 3, 0, 0, 0, 61, 0, -7, 0, 0, -16, 288 3, 0, 0, 0, 61, 0, -7, 0, 0, -16,
263 0, 11, 0, 0, 0, 31, 0, 0, 0, 0, 289 0, 11, 0, 0, 0, 31, 0, 0, 0, 0,
264 0, 48, 0, 0, 0, 0, 0, 0, 290 0, 48, 0, 0, 0, 0, 0, 0,
265}; 291};
266#define YYTABLESIZE 71 292#define YYTABLESIZE 71
267short yytable[] = { 30, 293short vcctable[] = { 30,
268 16, 13, 1, 13, 2, 30, 13, 37, 37, 28, 294 16, 13, 1, 13, 2, 30, 13, 37, 37, 28,
269 37, 27, 28, 36, 20, 31, 21, 29, 14, 20, 295 37, 27, 28, 36, 20, 31, 21, 29, 14, 20,
270 14, 21, 13, 14, 42, 30, 44, 30, 13, 31, 296 14, 21, 13, 14, 42, 30, 44, 30, 13, 31,
271 29, 13, 29, 6, 29, 38, 52, 42, 29, 14, 297 29, 13, 29, 6, 29, 38, 52, 42, 29, 14,
272 46, 43, 17, 8, 15, 14, 19, 53, 14, 40, 298 46, 43, 17, 8, 15, 14, 19, 53, 14, 40,
273 6, 38, 38, 44, 42, 21, 57, 21, 45, 49, 299 6, 38, 38, 44, 42, 21, 57, 21, 45, 49,
274 14, 54, 55, 56, 1, 16, 26, 12, 59, 48, 300 14, 54, 55, 56, 1, 16, 26, 12, 59, 48,
275 37, 301 37,
276}; 302};
277short yycheck[] = { 16, 303short vcccheck[] = { 16,
278 8, 256, 265, 256, 267, 22, 256, 268, 269, 260, 304 8, 256, 265, 256, 267, 22, 256, 268, 269, 260,
279 271, 268, 263, 268, 269, 258, 271, 256, 273, 269, 305 271, 268, 263, 268, 269, 258, 271, 256, 273, 269,
280 273, 271, 256, 273, 32, 42, 34, 44, 256, 268, 306 273, 271, 256, 273, 32, 42, 34, 44, 256, 268,
281 269, 256, 271, 256, 273, 256, 270, 256, 266, 273, 307 269, 256, 271, 256, 273, 256, 270, 256, 266, 273,
282 38, 270, 258, 266, 260, 273, 266, 272, 273, 270, 308 38, 270, 258, 266, 260, 273, 266, 272, 273, 270,
283 273, 260, 273, 272, 273, 258, 54, 260, 272, 274, 309 273, 260, 273, 272, 273, 258, 54, 260, 272, 274,
284 273, 257, 260, 263, 0, 258, 263, 7, 58, 39, 310 273, 257, 260, 263, 0, 258, 263, 7, 58, 39,
285 23, 311 23,
286}; 312};
287#define YYFINAL 3 313#define YYFINAL 3
288#ifndef YYDEBUG 314#ifndef YYDEBUG
289#define YYDEBUG 0 315#define YYDEBUG 0
290#endif 316#endif
291#define YYMAXTOKEN 274 317#define YYMAXTOKEN 274
292#if YYDEBUG 318#if YYDEBUG
293char *yyname[] = { 319char *vccname[] = {
294"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 320"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2950,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 3210,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2960,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 3220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2970,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 3230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 3240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2990,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 3250,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"EQ","COLON","DOT","SEMICOLON", 3260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"EQ","COLON","DOT","SEMICOLON",
301"SPACE","HTAB","LINESEP","NEWLINE","BEGIN_VCARD","END_VCARD","BEGIN_VCAL", 327"SPACE","HTAB","LINESEP","NEWLINE","BEGIN_VCARD","END_VCARD","BEGIN_VCAL",
302"END_VCAL","BEGIN_VEVENT","END_VEVENT","BEGIN_VTODO","END_VTODO","ID","STRING", 328"END_VCAL","BEGIN_VEVENT","END_VEVENT","BEGIN_VTODO","END_VTODO","ID","STRING",
303}; 329};
304char *yyrule[] = { 330char *vccrule[] = {
305"$accept : mime", 331"$accept : mime",
306"mime : vobjects", 332"mime : vobjects",
307"vobjects : vobjects vobject", 333"vobjects : vobjects vobject",
308"vobjects : vobject", 334"vobjects : vobject",
309"vobject : vcard", 335"vobject : vcard",
310"vobject : vcal", 336"vobject : vcal",
311"$$1 :", 337"$$1 :",
312"vcard : BEGIN_VCARD $$1 items END_VCARD", 338"vcard : BEGIN_VCARD $$1 items END_VCARD",
@@ -367,17 +393,17 @@ int yyerrflag;
367int yychar; 393int yychar;
368short *yyssp; 394short *yyssp;
369YYSTYPE *yyvsp; 395YYSTYPE *yyvsp;
370YYSTYPE yyval; 396YYSTYPE yyval;
371YYSTYPE yylval; 397YYSTYPE yylval;
372short yyss[YYSTACKSIZE]; 398short yyss[YYSTACKSIZE];
373YYSTYPE yyvs[YYSTACKSIZE]; 399YYSTYPE yyvs[YYSTACKSIZE];
374#define yystacksize YYSTACKSIZE 400#define yystacksize YYSTACKSIZE
375#line 378 "vcc.y" 401#line 382 "backend/vcc.y"
376 402
377/*------------------------------------*/ 403/*------------------------------------*/
378static int pushVObject(const char *prop) 404static int pushVObject(const char *prop)
379 { 405 {
380 VObject *newObj; 406 VObject *newObj;
381 if (ObjStackTop == MAXLEVEL) 407 if (ObjStackTop == MAXLEVEL)
382 return FALSE; 408 return FALSE;
383 409
@@ -506,17 +532,17 @@ static void lexPopMode(int top)
506 532
507static int lexWithinMode(enum LexMode mode) { 533static int lexWithinMode(enum LexMode mode) {
508 unsigned long i; 534 unsigned long i;
509 for (i=0;i<lexBuf.lexModeStackTop;i++) 535 for (i=0;i<lexBuf.lexModeStackTop;i++)
510 if (mode == lexBuf.lexModeStack[i]) return 1; 536 if (mode == lexBuf.lexModeStack[i]) return 1;
511 return 0; 537 return 0;
512 } 538 }
513 539
514static char lexGetc_() 540static int lexGetc_()
515 { 541 {
516 /* get next char from input, no buffering. */ 542 /* get next char from input, no buffering. */
517 if (lexBuf.curPos == lexBuf.inputLen) 543 if (lexBuf.curPos == lexBuf.inputLen)
518 return EOF; 544 return EOF;
519 else if (lexBuf.inputString) 545 else if (lexBuf.inputString)
520 return *(lexBuf.inputString + lexBuf.curPos++); 546 return *(lexBuf.inputString + lexBuf.curPos++);
521 else { 547 else {
522#ifdef INCLUDEMFC 548#ifdef INCLUDEMFC
@@ -920,17 +946,17 @@ static int match_begin_end_name(int end) {
920 DBG_(("db: begin/end %d\n", token)); 946 DBG_(("db: begin/end %d\n", token));
921 return token; 947 return token;
922 } 948 }
923 return 0; 949 return 0;
924 } 950 }
925 951
926static char* lexGetQuotedPrintable() 952static char* lexGetQuotedPrintable()
927 { 953 {
928 char cur; 954 int cur;
929 955
930 lexClearToken(); 956 lexClearToken();
931 do { 957 do {
932 cur = lexGetc(); 958 cur = lexGetc();
933 switch (cur) { 959 switch (cur) {
934 case '=': { 960 case '=': {
935 int c = 0; 961 int c = 0;
936 int next[2]; 962 int next[2];
@@ -962,23 +988,23 @@ static char* lexGetQuotedPrintable()
962 lexAppendc(c); 988 lexAppendc(c);
963 } 989 }
964 break; 990 break;
965 } /* '=' */ 991 } /* '=' */
966 case '\n': { 992 case '\n': {
967 lexPushLookaheadc('\n'); 993 lexPushLookaheadc('\n');
968 goto EndString; 994 goto EndString;
969 } 995 }
970 case (char)EOF: 996 case (int)EOF:
971 break; 997 break;
972 default: 998 default:
973 lexAppendc(cur); 999 lexAppendc(cur);
974 break; 1000 break;
975 } /* switch */ 1001 } /* switch */
976 } while (cur != (char)EOF); 1002 } while (cur != (int)EOF);
977 1003
978EndString: 1004EndString:
979 lexAppendc(0); 1005 lexAppendc(0);
980 return lexStr(); 1006 return lexStr();
981 } /* LexQuotedPrintable */ 1007 } /* LexQuotedPrintable */
982 1008
983static int yylex() { 1009static int yylex() {
984 1010
@@ -1145,23 +1171,28 @@ VObject* Parse_MIME_FromFile(FILE *file)
1145 if (!(result = Parse_MIMEHelper())) { 1171 if (!(result = Parse_MIMEHelper())) {
1146 fseek(file,startPos,SEEK_SET); 1172 fseek(file,startPos,SEEK_SET);
1147 } 1173 }
1148 return result; 1174 return result;
1149 } 1175 }
1150 1176
1151DLLEXPORT(VObject*) Parse_MIME_FromFileName(char *fname) 1177DLLEXPORT(VObject*) Parse_MIME_FromFileName(char *fname)
1152 { 1178 {
1153 QFileDirect f( fname ); 1179 FILE *fp = fopen(fname,"r");
1154 if ( !f.open( IO_ReadOnly ) ) { 1180 if (fp) {
1155 qWarning("Unable to open mime for reading %s", fname); 1181 VObject* o = Parse_MIME_FromFile(fp);
1156 return 0; 1182 fclose(fp);
1183 return o;
1184 }
1185 else {
1186 char msg[80];
1187 sprintf(msg, "can't open file '%s' for reading\n", fname);
1188 mime_error_(msg);
1189 return 0;
1157 } 1190 }
1158
1159 return Parse_MIME_FromFile( f.directHandle() );
1160 } 1191 }
1161 1192
1162#endif 1193#endif
1163 1194
1164/*-------------------------------------*/ 1195/*-------------------------------------*/
1165 1196
1166static MimeErrorHandler mimeErrorHandler; 1197static MimeErrorHandler mimeErrorHandler;
1167 1198
@@ -1181,23 +1212,27 @@ void mime_error(char *s)
1181 1212
1182void mime_error_(char *s) 1213void mime_error_(char *s)
1183 { 1214 {
1184 if (mimeErrorHandler) { 1215 if (mimeErrorHandler) {
1185 mimeErrorHandler(s); 1216 mimeErrorHandler(s);
1186 } 1217 }
1187 } 1218 }
1188 1219
1189#line 1192 "y.tab.c" 1220#line 1221 "y.tab.c"
1190#define YYABORT goto yyabort 1221#define YYABORT goto yyabort
1191#define YYREJECT goto yyabort 1222#define YYREJECT goto yyabort
1192#define YYACCEPT goto yyaccept 1223#define YYACCEPT goto yyaccept
1193#define YYERROR goto yyerrlab 1224#define YYERROR goto yyerrlab
1194int 1225int
1226#if defined(__STDC__)
1227yyparse(void)
1228#else
1195yyparse() 1229yyparse()
1230#endif
1196{ 1231{
1197 register int yym, yyn, yystate; 1232 register int yym, yyn, yystate;
1198#if YYDEBUG 1233#if YYDEBUG
1199 register char *yys; 1234 register char *yys;
1200 extern char *getenv(); 1235 extern char *getenv();
1201 1236
1202 if (yys = getenv("YYDEBUG")) 1237 if (yys = getenv("YYDEBUG"))
1203 { 1238 {
@@ -1211,17 +1246,17 @@ yyparse()
1211 yyerrflag = 0; 1246 yyerrflag = 0;
1212 yychar = (-1); 1247 yychar = (-1);
1213 1248
1214 yyssp = yyss; 1249 yyssp = yyss;
1215 yyvsp = yyvs; 1250 yyvsp = yyvs;
1216 *yyssp = yystate = 0; 1251 *yyssp = yystate = 0;
1217 1252
1218yyloop: 1253yyloop:
1219 if (yyn = yydefred[yystate]) goto yyreduce; 1254 if ((yyn = yydefred[yystate]) != 0) goto yyreduce;
1220 if (yychar < 0) 1255 if (yychar < 0)
1221 { 1256 {
1222 if ((yychar = yylex()) < 0) yychar = 0; 1257 if ((yychar = yylex()) < 0) yychar = 0;
1223#if YYDEBUG 1258#if YYDEBUG
1224 if (yydebug) 1259 if (yydebug)
1225 { 1260 {
1226 yys = 0; 1261 yys = 0;
1227 if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; 1262 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
@@ -1251,20 +1286,16 @@ yyloop:
1251 } 1286 }
1252 if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 && 1287 if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
1253 yyn <= YYTABLESIZE && yycheck[yyn] == yychar) 1288 yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
1254 { 1289 {
1255 yyn = yytable[yyn]; 1290 yyn = yytable[yyn];
1256 goto yyreduce; 1291 goto yyreduce;
1257 } 1292 }
1258 if (yyerrflag) goto yyinrecovery; 1293 if (yyerrflag) goto yyinrecovery;
1259#ifdef lint
1260 goto yynewerror;
1261#endif
1262yynewerror:
1263 yyerror("syntax error"); 1294 yyerror("syntax error");
1264#ifdef lint 1295#ifdef lint
1265 goto yyerrlab; 1296 goto yyerrlab;
1266#endif 1297#endif
1267yyerrlab: 1298yyerrlab:
1268 ++yynerrs; 1299 ++yynerrs;
1269yyinrecovery: 1300yyinrecovery:
1270 if (yyerrflag < 3) 1301 if (yyerrflag < 3)
@@ -1323,175 +1354,175 @@ yyreduce:
1323 printf("%sdebug: state %d, reducing by rule %d (%s)\n", 1354 printf("%sdebug: state %d, reducing by rule %d (%s)\n",
1324 YYPREFIX, yystate, yyn, yyrule[yyn]); 1355 YYPREFIX, yystate, yyn, yyrule[yyn]);
1325#endif 1356#endif
1326 yym = yylen[yyn]; 1357 yym = yylen[yyn];
1327 yyval = yyvsp[1-yym]; 1358 yyval = yyvsp[1-yym];
1328 switch (yyn) 1359 switch (yyn)
1329 { 1360 {
1330case 2: 1361case 2:
1331#line 217 "vcc.y" 1362#line 221 "backend/vcc.y"
1332{ addList(&vObjList, yyvsp[0].vobj); curObj = 0; } 1363{ addList(&vObjList, yyvsp[0].vobj); curObj = 0; }
1333break; 1364break;
1334case 3: 1365case 3:
1335#line 219 "vcc.y" 1366#line 223 "backend/vcc.y"
1336{ addList(&vObjList, yyvsp[0].vobj); curObj = 0; } 1367{ addList(&vObjList, yyvsp[0].vobj); curObj = 0; }
1337break; 1368break;
1338case 6: 1369case 6:
1339#line 228 "vcc.y" 1370#line 232 "backend/vcc.y"
1340{ 1371{
1341 lexPushMode(L_VCARD); 1372 lexPushMode(L_VCARD);
1342 if (!pushVObject(VCCardProp)) YYERROR; 1373 if (!pushVObject(VCCardProp)) YYERROR;
1343 } 1374 }
1344break; 1375break;
1345case 7: 1376case 7:
1346#line 233 "vcc.y" 1377#line 237 "backend/vcc.y"
1347{ 1378{
1348 lexPopMode(0); 1379 lexPopMode(0);
1349 yyval.vobj = popVObject(); 1380 yyval.vobj = popVObject();
1350 } 1381 }
1351break; 1382break;
1352case 8: 1383case 8:
1353#line 238 "vcc.y" 1384#line 242 "backend/vcc.y"
1354{ 1385{
1355 lexPushMode(L_VCARD); 1386 lexPushMode(L_VCARD);
1356 if (!pushVObject(VCCardProp)) YYERROR; 1387 if (!pushVObject(VCCardProp)) YYERROR;
1357 } 1388 }
1358break; 1389break;
1359case 9: 1390case 9:
1360#line 243 "vcc.y" 1391#line 247 "backend/vcc.y"
1361{ 1392{
1362 lexPopMode(0); 1393 lexPopMode(0);
1363 yyval.vobj = popVObject(); 1394 yyval.vobj = popVObject();
1364 } 1395 }
1365break; 1396break;
1366case 12: 1397case 12:
1367#line 254 "vcc.y" 1398#line 258 "backend/vcc.y"
1368{ 1399{
1369 lexPushMode(L_VALUES); 1400 lexPushMode(L_VALUES);
1370 } 1401 }
1371break; 1402break;
1372case 13: 1403case 13:
1373#line 258 "vcc.y" 1404#line 262 "backend/vcc.y"
1374{ 1405{
1375 if (lexWithinMode(L_BASE64) || lexWithinMode(L_QUOTED_PRINTABLE)) 1406 if (lexWithinMode(L_BASE64) || lexWithinMode(L_QUOTED_PRINTABLE))
1376 lexPopMode(0); 1407 lexPopMode(0);
1377 lexPopMode(0); 1408 lexPopMode(0);
1378 } 1409 }
1379break; 1410break;
1380case 15: 1411case 15:
1381#line 267 "vcc.y" 1412#line 271 "backend/vcc.y"
1382{ 1413{
1383 enterProps(yyvsp[0].str); 1414 enterProps(yyvsp[0].str);
1384 } 1415 }
1385break; 1416break;
1386case 17: 1417case 17:
1387#line 272 "vcc.y" 1418#line 276 "backend/vcc.y"
1388{ 1419{
1389 enterProps(yyvsp[0].str); 1420 enterProps(yyvsp[0].str);
1390 } 1421 }
1391break; 1422break;
1392case 21: 1423case 21:
1393#line 285 "vcc.y" 1424#line 289 "backend/vcc.y"
1394{ 1425{
1395 enterAttr(yyvsp[0].str,0); 1426 enterAttr(yyvsp[0].str,0);
1396 } 1427 }
1397break; 1428break;
1398case 22: 1429case 22:
1399#line 289 "vcc.y" 1430#line 293 "backend/vcc.y"
1400{ 1431{
1401 enterAttr(yyvsp[-2].str,yyvsp[0].str); 1432 enterAttr(yyvsp[-2].str,yyvsp[0].str);
1402 1433
1403 } 1434 }
1404break; 1435break;
1405case 24: 1436case 24:
1406#line 298 "vcc.y" 1437#line 302 "backend/vcc.y"
1407{ enterValues(yyvsp[-1].str); } 1438{ enterValues(yyvsp[-1].str); }
1408break; 1439break;
1409case 26: 1440case 26:
1410#line 300 "vcc.y" 1441#line 304 "backend/vcc.y"
1411{ enterValues(yyvsp[0].str); } 1442{ enterValues(yyvsp[0].str); }
1412break; 1443break;
1413case 28: 1444case 28:
1414#line 305 "vcc.y" 1445#line 309 "backend/vcc.y"
1415{ yyval.str = 0; } 1446{ yyval.str = 0; }
1416break; 1447break;
1417case 29: 1448case 29:
1418#line 310 "vcc.y" 1449#line 314 "backend/vcc.y"
1419{ if (!pushVObject(VCCalProp)) YYERROR; } 1450{ if (!pushVObject(VCCalProp)) YYERROR; }
1420break; 1451break;
1421case 30: 1452case 30:
1422#line 313 "vcc.y" 1453#line 317 "backend/vcc.y"
1423{ yyval.vobj = popVObject(); } 1454{ yyval.vobj = popVObject(); }
1424break; 1455break;
1425case 31: 1456case 31:
1426#line 315 "vcc.y" 1457#line 319 "backend/vcc.y"
1427{ if (!pushVObject(VCCalProp)) YYERROR; } 1458{ if (!pushVObject(VCCalProp)) YYERROR; }
1428break; 1459break;
1429case 32: 1460case 32:
1430#line 317 "vcc.y" 1461#line 321 "backend/vcc.y"
1431{ yyval.vobj = popVObject(); } 1462{ yyval.vobj = popVObject(); }
1432break; 1463break;
1433case 38: 1464case 38:
1434#line 332 "vcc.y" 1465#line 336 "backend/vcc.y"
1435{ 1466{
1436 lexPushMode(L_VEVENT); 1467 lexPushMode(L_VEVENT);
1437 if (!pushVObject(VCEventProp)) YYERROR; 1468 if (!pushVObject(VCEventProp)) YYERROR;
1438 } 1469 }
1439break; 1470break;
1440case 39: 1471case 39:
1441#line 338 "vcc.y" 1472#line 342 "backend/vcc.y"
1442{ 1473{
1443 lexPopMode(0); 1474 lexPopMode(0);
1444 popVObject(); 1475 popVObject();
1445 } 1476 }
1446break; 1477break;
1447case 40: 1478case 40:
1448#line 343 "vcc.y" 1479#line 347 "backend/vcc.y"
1449{ 1480{
1450 lexPushMode(L_VEVENT); 1481 lexPushMode(L_VEVENT);
1451 if (!pushVObject(VCEventProp)) YYERROR; 1482 if (!pushVObject(VCEventProp)) YYERROR;
1452 } 1483 }
1453break; 1484break;
1454case 41: 1485case 41:
1455#line 348 "vcc.y" 1486#line 352 "backend/vcc.y"
1456{ 1487{
1457 lexPopMode(0); 1488 lexPopMode(0);
1458 popVObject(); 1489 popVObject();
1459 } 1490 }
1460break; 1491break;
1461case 42: 1492case 42:
1462#line 356 "vcc.y" 1493#line 360 "backend/vcc.y"
1463{ 1494{
1464 lexPushMode(L_VTODO); 1495 lexPushMode(L_VTODO);
1465 if (!pushVObject(VCTodoProp)) YYERROR; 1496 if (!pushVObject(VCTodoProp)) YYERROR;
1466 } 1497 }
1467break; 1498break;
1468case 43: 1499case 43:
1469#line 362 "vcc.y" 1500#line 366 "backend/vcc.y"
1470{ 1501{
1471 lexPopMode(0); 1502 lexPopMode(0);
1472 popVObject(); 1503 popVObject();
1473 } 1504 }
1474break; 1505break;
1475case 44: 1506case 44:
1476#line 367 "vcc.y" 1507#line 371 "backend/vcc.y"
1477{ 1508{
1478 lexPushMode(L_VTODO); 1509 lexPushMode(L_VTODO);
1479 if (!pushVObject(VCTodoProp)) YYERROR; 1510 if (!pushVObject(VCTodoProp)) YYERROR;
1480 } 1511 }
1481break; 1512break;
1482case 45: 1513case 45:
1483#line 372 "vcc.y" 1514#line 376 "backend/vcc.y"
1484{ 1515{
1485 lexPopMode(0); 1516 lexPopMode(0);
1486 popVObject(); 1517 popVObject();
1487 } 1518 }
1488break; 1519break;
1489#line 1492 "y.tab.c" 1520#line 1521 "y.tab.c"
1490 } 1521 }
1491 yyssp -= yym; 1522 yyssp -= yym;
1492 yystate = *yyssp; 1523 yystate = *yyssp;
1493 yyvsp -= yym; 1524 yyvsp -= yym;
1494 yym = yylhs[yyn]; 1525 yym = yylhs[yyn];
1495 if (yystate == 0 && yym == 0) 1526 if (yystate == 0 && yym == 0)
1496 { 1527 {
1497#if YYDEBUG 1528#if YYDEBUG
diff --git a/library/backend/vobject.cpp b/library/backend/vobject.cpp
index 9c2ba3b..e6f6b78 100644
--- a/library/backend/vobject.cpp
+++ b/library/backend/vobject.cpp
@@ -1,1219 +1,1315 @@
1/*************************************************************************** 1/***************************************************************************
2(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International 2(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
3Business Machines Corporation and Siemens Rolm Communications Inc. 3Business Machines Corporation and Siemens Rolm Communications Inc.
4 4
5For purposes of this license notice, the term Licensors shall mean, 5For purposes of this license notice, the term Licensors shall mean,
6collectively, Apple Computer, Inc., AT&T Corp., International 6collectively, Apple Computer, Inc., AT&T Corp., International
7Business Machines Corporation and Siemens Rolm Communications Inc. 7Business Machines Corporation and Siemens Rolm Communications Inc.
8The term Licensor shall mean any of the Licensors. 8The term Licensor shall mean any of the Licensors.
9 9
10Subject to acceptance of the following conditions, permission is hereby 10Subject to acceptance of the following conditions, permission is hereby
11granted by Licensors without the need for written agreement and without 11granted by Licensors without the need for written agreement and without
12license or royalty fees, to use, copy, modify and distribute this 12license or royalty fees, to use, copy, modify and distribute this
13software for any purpose. 13software for any purpose.
14 14
15The above copyright notice and the following four paragraphs must be 15The above copyright notice and the following four paragraphs must be
16reproduced in all copies of this software and any software including 16reproduced in all copies of this software and any software including
17this software. 17this software.
18 18
19THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE 19THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE
20ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR 20ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR
21MODIFICATIONS. 21MODIFICATIONS.
22 22
23IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT, 23IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,
24INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT 24INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
25OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 25OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
26DAMAGE. 26DAMAGE.
27 27
28EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, 28EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,
29INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE 29INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE
30IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 30IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
31PURPOSE. 31PURPOSE.
32 32
33The software is provided with RESTRICTED RIGHTS. Use, duplication, or 33The software is provided with RESTRICTED RIGHTS. Use, duplication, or
34disclosure by the government are subject to restrictions set forth in 34disclosure by the government are subject to restrictions set forth in
35DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable. 35DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
36 36
37***************************************************************************/ 37***************************************************************************/
38 38
39/* 39/*
40 * src: vobject.c 40 * src: vobject.c
41 * doc: vobject and APIs to construct vobject, APIs pretty print 41 * doc: vobject and APIs to construct vobject, APIs pretty print
42 * vobject, and convert a vobject into its textual representation. 42 * vobject, and convert a vobject into its textual representation.
43 */ 43 */
44 44
45 #ifndef MWERKS 45 #ifndef MWERKS
46#include <malloc.h> 46#include <malloc.h>
47#endif 47#endif
48 48
49#include "vobject_p.h" 49#include "vobject_p.h"
50#include "qfiledirect_p.h" 50#include "qfiledirect_p.h"
51#include <string.h> 51#include <string.h>
52#include <stdio.h> 52#include <stdio.h>
53#include <fcntl.h> 53#include <fcntl.h>
54//#include <io.h> 54//#include <io.h>
55 55
56 56
57 #define NAME_OF(o) o->id 57 #define NAME_OF(o) o->id
58 #define VALUE_TYPE(o) o->valType 58 #define VALUE_TYPE(o) o->valType
59 #define STRINGZ_VALUE_OF(o) o->val.strs 59 #define STRINGZ_VALUE_OF(o) o->val.strs
60 #define INTEGER_VALUE_OF(o) o->val.i 60 #define INTEGER_VALUE_OF(o) o->val.i
61 #define LONG_VALUE_OF(o) o->val.l 61 #define LONG_VALUE_OF(o) o->val.l
62 #define ANY_VALUE_OF(o) o->val.any 62 #define ANY_VALUE_OF(o) o->val.any
63 #define VOBJECT_VALUE_OF(o) o->val.vobj 63 #define VOBJECT_VALUE_OF(o) o->val.vobj
64 64
65typedef union ValueItem { 65typedef union ValueItem {
66 const char *strs; 66 const char *strs;
67 unsigned int i; 67 unsigned int i;
68 unsigned long l; 68 unsigned long l;
69 void *any; 69 void *any;
70 VObject *vobj; 70 VObject *vobj;
71 } ValueItem; 71 } ValueItem;
72 72
73struct VObject { 73struct VObject {
74 VObject *next; 74 VObject *next;
75 const char *id; 75 const char *id;
76 VObject *prop; 76 VObject *prop;
77 unsigned short valType; 77 unsigned short valType;
78 ValueItem val; 78 ValueItem val;
79 }; 79 };
80 80
81typedef struct StrItem StrItem; 81typedef struct StrItem StrItem;
82 82
83struct StrItem { 83struct StrItem {
84 StrItem *next; 84 StrItem *next;
85 const char *s; 85 const char *s;
86 unsigned int refCnt; 86 unsigned int refCnt;
87 }; 87 };
88 88
89const char** fieldedProp; 89const char** fieldedProp;
90 90
91 91
92 92
93/*---------------------------------------------------------------------- 93/*----------------------------------------------------------------------
94 The following functions involve with memory allocation: 94 The following functions involve with memory allocation:
95 newVObject 95 newVObject
96 deleteVObject 96 deleteVObject
97 dupStr 97 dupStr
98 deleteStr 98 deleteStr
99 newStrItem 99 newStrItem
100 deleteStrItem 100 deleteStrItem
101 ----------------------------------------------------------------------*/ 101 ----------------------------------------------------------------------*/
102 102
103DLLEXPORT(VObject*) newVObject_(const char *id) 103DLLEXPORT(VObject*) newVObject_(const char *id)
104{ 104{
105 VObject *p = (VObject*)malloc(sizeof(VObject)); 105 VObject *p = (VObject*)malloc(sizeof(VObject));
106 p->next = 0; 106 p->next = 0;
107 p->id = id; 107 p->id = id;
108 p->prop = 0; 108 p->prop = 0;
109 VALUE_TYPE(p) = 0; 109 VALUE_TYPE(p) = 0;
110 ANY_VALUE_OF(p) = 0; 110 ANY_VALUE_OF(p) = 0;
111 return p; 111 return p;
112} 112}
113 113
114DLLEXPORT(VObject*) newVObject(const char *id) 114DLLEXPORT(VObject*) newVObject(const char *id)
115{ 115{
116 return newVObject_(lookupStr(id)); 116 return newVObject_(lookupStr(id));
117} 117}
118 118
119DLLEXPORT(void) deleteVObject(VObject *p) 119DLLEXPORT(void) deleteVObject(VObject *p)
120{ 120{
121 unUseStr(p->id); 121 unUseStr(p->id);
122 free(p); 122 free(p);
123} 123}
124 124
125DLLEXPORT(char*) dupStr(const char *s, unsigned int size) 125DLLEXPORT(char*) dupStr(const char *s, unsigned int size)
126{ 126{
127 char *t; 127 char *t;
128 if (size == 0) { 128 if (size == 0) {
129 size = strlen(s); 129 size = strlen(s);
130 } 130 }
131 t = (char*)malloc(size+1); 131 t = (char*)malloc(size+1);
132 if (t) { 132 if (t) {
133 memcpy(t,s,size); 133 memcpy(t,s,size);
134 t[size] = 0; 134 t[size] = 0;
135 return t; 135 return t;
136 } 136 }
137 else { 137 else {
138 return (char*)0; 138 return (char*)0;
139 } 139 }
140} 140}
141 141
142DLLEXPORT(void) deleteStr(const char *p) 142DLLEXPORT(void) deleteStr(const char *p)
143{ 143{
144 if (p) free((void*)p); 144 if (p) free((void*)p);
145} 145}
146 146
147 147
148static StrItem* newStrItem(const char *s, StrItem *next) 148static StrItem* newStrItem(const char *s, StrItem *next)
149{ 149{
150 StrItem *p = (StrItem*)malloc(sizeof(StrItem)); 150 StrItem *p = (StrItem*)malloc(sizeof(StrItem));
151 p->next = next; 151 p->next = next;
152 p->s = s; 152 p->s = s;
153 p->refCnt = 1; 153 p->refCnt = 1;
154 return p; 154 return p;
155} 155}
156 156
157static void deleteStrItem(StrItem *p) 157static void deleteStrItem(StrItem *p)
158{ 158{
159 free((void*)p); 159 free((void*)p);
160} 160}
161 161
162 162
163/*---------------------------------------------------------------------- 163/*----------------------------------------------------------------------
164 The following function provide accesses to VObject's value. 164 The following function provide accesses to VObject's value.
165 ----------------------------------------------------------------------*/ 165 ----------------------------------------------------------------------*/
166 166
167DLLEXPORT(const char*) vObjectName(VObject *o) 167DLLEXPORT(const char*) vObjectName(VObject *o)
168{ 168{
169 return NAME_OF(o); 169 return NAME_OF(o);
170} 170}
171 171
172DLLEXPORT(void) setVObjectName(VObject *o, const char* id) 172DLLEXPORT(void) setVObjectName(VObject *o, const char* id)
173{ 173{
174 NAME_OF(o) = id; 174 NAME_OF(o) = id;
175} 175}
176 176
177DLLEXPORT(const char*) vObjectStringZValue(VObject *o) 177DLLEXPORT(const char*) vObjectStringZValue(VObject *o)
178{ 178{
179 return STRINGZ_VALUE_OF(o); 179 return STRINGZ_VALUE_OF(o);
180} 180}
181 181
182DLLEXPORT(void) setVObjectStringZValue(VObject *o, const char *s) 182DLLEXPORT(void) setVObjectStringZValue(VObject *o, const char *s)
183{ 183{
184 STRINGZ_VALUE_OF(o) = dupStr(s,0); 184 STRINGZ_VALUE_OF(o) = dupStr(s,0);
185 VALUE_TYPE(o) = VCVT_STRINGZ; 185 VALUE_TYPE(o) = VCVT_STRINGZ;
186} 186}
187 187
188DLLEXPORT(void) setVObjectStringZValue_(VObject *o, const char *s) 188DLLEXPORT(void) setVObjectStringZValue_(VObject *o, const char *s)
189{ 189{
190 STRINGZ_VALUE_OF(o) = s; 190 STRINGZ_VALUE_OF(o) = s;
191 VALUE_TYPE(o) = VCVT_STRINGZ; 191 VALUE_TYPE(o) = VCVT_STRINGZ;
192} 192}
193 193
194DLLEXPORT(unsigned int) vObjectIntegerValue(VObject *o) 194DLLEXPORT(unsigned int) vObjectIntegerValue(VObject *o)
195{ 195{
196 return INTEGER_VALUE_OF(o); 196 return INTEGER_VALUE_OF(o);
197} 197}
198 198
199DLLEXPORT(void) setVObjectIntegerValue(VObject *o, unsigned int i) 199DLLEXPORT(void) setVObjectIntegerValue(VObject *o, unsigned int i)
200{ 200{
201 INTEGER_VALUE_OF(o) = i; 201 INTEGER_VALUE_OF(o) = i;
202 VALUE_TYPE(o) = VCVT_UINT; 202 VALUE_TYPE(o) = VCVT_UINT;
203} 203}
204 204
205DLLEXPORT(unsigned long) vObjectLongValue(VObject *o) 205DLLEXPORT(unsigned long) vObjectLongValue(VObject *o)
206{ 206{
207 return LONG_VALUE_OF(o); 207 return LONG_VALUE_OF(o);
208} 208}
209 209
210DLLEXPORT(void) setVObjectLongValue(VObject *o, unsigned long l) 210DLLEXPORT(void) setVObjectLongValue(VObject *o, unsigned long l)
211{ 211{
212 LONG_VALUE_OF(o) = l; 212 LONG_VALUE_OF(o) = l;
213 VALUE_TYPE(o) = VCVT_ULONG; 213 VALUE_TYPE(o) = VCVT_ULONG;
214} 214}
215 215
216DLLEXPORT(void*) vObjectAnyValue(VObject *o) 216DLLEXPORT(void*) vObjectAnyValue(VObject *o)
217{ 217{
218 return ANY_VALUE_OF(o); 218 return ANY_VALUE_OF(o);
219} 219}
220 220
221DLLEXPORT(void) setVObjectAnyValue(VObject *o, void *t) 221DLLEXPORT(void) setVObjectAnyValue(VObject *o, void *t)
222{ 222{
223 ANY_VALUE_OF(o) = t; 223 ANY_VALUE_OF(o) = t;
224 VALUE_TYPE(o) = VCVT_RAW; 224 VALUE_TYPE(o) = VCVT_RAW;
225} 225}
226 226
227DLLEXPORT(VObject*) vObjectVObjectValue(VObject *o) 227DLLEXPORT(VObject*) vObjectVObjectValue(VObject *o)
228{ 228{
229 return VOBJECT_VALUE_OF(o); 229 return VOBJECT_VALUE_OF(o);
230} 230}
231 231
232DLLEXPORT(void) setVObjectVObjectValue(VObject *o, VObject *p) 232DLLEXPORT(void) setVObjectVObjectValue(VObject *o, VObject *p)
233{ 233{
234 VOBJECT_VALUE_OF(o) = p; 234 VOBJECT_VALUE_OF(o) = p;
235 VALUE_TYPE(o) = VCVT_VOBJECT; 235 VALUE_TYPE(o) = VCVT_VOBJECT;
236} 236}
237 237
238DLLEXPORT(int) vObjectValueType(VObject *o) 238DLLEXPORT(int) vObjectValueType(VObject *o)
239{ 239{
240 return VALUE_TYPE(o); 240 return VALUE_TYPE(o);
241} 241}
242 242
243 243
244/*---------------------------------------------------------------------- 244/*----------------------------------------------------------------------
245 The following functions can be used to build VObject. 245 The following functions can be used to build VObject.
246 ----------------------------------------------------------------------*/ 246 ----------------------------------------------------------------------*/
247 247
248DLLEXPORT(VObject*) addVObjectProp(VObject *o, VObject *p) 248DLLEXPORT(VObject*) addVObjectProp(VObject *o, VObject *p)
249{ 249{
250 /* circular link list pointed to tail */ 250 /* circular link list pointed to tail */
251 /* 251 /*
252 o {next,id,prop,val} 252 o {next,id,prop,val}
253 V 253 V
254 pn {next,id,prop,val} 254 pn {next,id,prop,val}
255 V 255 V
256 ... 256 ...
257 p1 {next,id,prop,val} 257 p1 {next,id,prop,val}
258 V 258 V
259 pn 259 pn
260 --> 260 -->
261 o {next,id,prop,val} 261 o {next,id,prop,val}
262 V 262 V
263 pn {next,id,prop,val} 263 pn {next,id,prop,val}
264 V 264 V
265 p {next,id,prop,val} 265 p {next,id,prop,val}
266 ... 266 ...
267 p1 {next,id,prop,val} 267 p1 {next,id,prop,val}
268 V 268 V
269 pn 269 pn
270 */ 270 */
271 271
272 VObject *tail = o->prop; 272 VObject *tail = o->prop;
273 if (tail) { 273 if (tail) {
274 p->next = tail->next; 274 p->next = tail->next;
275 o->prop = tail->next = p; 275 o->prop = tail->next = p;
276 } 276 }
277 else { 277 else {
278 o->prop = p->next = p; 278 o->prop = p->next = p;
279 } 279 }
280 return p; 280 return p;
281} 281}
282 282
283DLLEXPORT(VObject*) addProp(VObject *o, const char *id) 283DLLEXPORT(VObject*) addProp(VObject *o, const char *id)
284{ 284{
285 return addVObjectProp(o,newVObject(id)); 285 return addVObjectProp(o,newVObject(id));
286} 286}
287 287
288DLLEXPORT(VObject*) addProp_(VObject *o, const char *id) 288DLLEXPORT(VObject*) addProp_(VObject *o, const char *id)
289{ 289{
290 return addVObjectProp(o,newVObject_(id)); 290 return addVObjectProp(o,newVObject_(id));
291} 291}
292 292
293DLLEXPORT(void) addList(VObject **o, VObject *p) 293DLLEXPORT(void) addList(VObject **o, VObject *p)
294{ 294{
295 p->next = 0; 295 p->next = 0;
296 if (*o == 0) { 296 if (*o == 0) {
297 *o = p; 297 *o = p;
298 } 298 }
299 else { 299 else {
300 VObject *t = *o; 300 VObject *t = *o;
301 while (t->next) { 301 while (t->next) {
302 t = t->next; 302 t = t->next;
303 } 303 }
304 t->next = p; 304 t->next = p;
305 } 305 }
306} 306}
307 307
308DLLEXPORT(VObject*) nextVObjectInList(VObject *o) 308DLLEXPORT(VObject*) nextVObjectInList(VObject *o)
309{ 309{
310 return o->next; 310 return o->next;
311} 311}
312 312
313DLLEXPORT(VObject*) setValueWithSize_(VObject *prop, void *val, unsigned int size) 313DLLEXPORT(VObject*) setValueWithSize_(VObject *prop, void *val, unsigned int size)
314{ 314{
315 VObject *sizeProp; 315 VObject *sizeProp;
316 setVObjectAnyValue(prop, val); 316 setVObjectAnyValue(prop, val);
317 sizeProp = addProp(prop,VCDataSizeProp); 317 sizeProp = addProp(prop,VCDataSizeProp);
318 setVObjectLongValue(sizeProp, size); 318 setVObjectLongValue(sizeProp, size);
319 return prop; 319 return prop;
320} 320}
321 321
322DLLEXPORT(VObject*) setValueWithSize(VObject *prop, void *val, unsigned int size) 322DLLEXPORT(VObject*) setValueWithSize(VObject *prop, void *val, unsigned int size)
323{ 323{
324 void *p = dupStr((const char *)val,size); 324 void *p = dupStr((const char *)val,size);
325 return setValueWithSize_(prop,p,p?size:0); 325 return setValueWithSize_(prop,p,p?size:0);
326} 326}
327 327
328DLLEXPORT(void) initPropIterator(VObjectIterator *i, VObject *o) 328DLLEXPORT(void) initPropIterator(VObjectIterator *i, VObject *o)
329{ 329{
330 i->start = o->prop; 330 i->start = o->prop;
331 i->next = 0; 331 i->next = 0;
332} 332}
333 333
334DLLEXPORT(void) initVObjectIterator(VObjectIterator *i, VObject *o) 334DLLEXPORT(void) initVObjectIterator(VObjectIterator *i, VObject *o)
335{ 335{
336 i->start = o->next; 336 i->start = o->next;
337 i->next = 0; 337 i->next = 0;
338} 338}
339 339
340DLLEXPORT(int) moreIteration(VObjectIterator *i) 340DLLEXPORT(int) moreIteration(VObjectIterator *i)
341{ 341{
342 return (i->start && (i->next==0 || i->next!=i->start)); 342 return (i->start && (i->next==0 || i->next!=i->start));
343} 343}
344 344
345DLLEXPORT(VObject*) nextVObject(VObjectIterator *i) 345DLLEXPORT(VObject*) nextVObject(VObjectIterator *i)
346{ 346{
347 if (i->start && i->next != i->start) { 347 if (i->start && i->next != i->start) {
348 if (i->next == 0) { 348 if (i->next == 0) {
349 i->next = i->start->next; 349 i->next = i->start->next;
350 return i->next; 350 return i->next;
351 } 351 }
352 else { 352 else {
353 i->next = i->next->next; 353 i->next = i->next->next;
354 return i->next; 354 return i->next;
355 } 355 }
356 } 356 }
357 else return (VObject*)0; 357 else return (VObject*)0;
358} 358}
359 359
360DLLEXPORT(VObject*) isAPropertyOf(VObject *o, const char *id) 360DLLEXPORT(VObject*) isAPropertyOf(VObject *o, const char *id)
361{ 361{
362 VObjectIterator i; 362 VObjectIterator i;
363 initPropIterator(&i,o); 363 initPropIterator(&i,o);
364 while (moreIteration(&i)) { 364 while (moreIteration(&i)) {
365 VObject *each = nextVObject(&i); 365 VObject *each = nextVObject(&i);
366 if (!qstricmp(id,each->id)) 366 if (!qstricmp(id,each->id))
367 return each; 367 return each;
368 } 368 }
369 return (VObject*)0; 369 return (VObject*)0;
370} 370}
371 371
372DLLEXPORT(VObject*) addGroup(VObject *o, const char *g) 372DLLEXPORT(VObject*) addGroup(VObject *o, const char *g)
373{ 373{
374 /* 374 /*
375 a.b.c 375 a.b.c
376 --> 376 -->
377 prop(c) 377 prop(c)
378 prop(VCGrouping=b) 378 prop(VCGrouping=b)
379 prop(VCGrouping=a) 379 prop(VCGrouping=a)
380 */ 380 */
381 char *dot = strrchr(g,'.'); 381 char *dot = strrchr(g,'.');
382 if (dot) { 382 if (dot) {
383 VObject *p, *t; 383 VObject *p, *t;
384 char *gs, *n = dot+1; 384 char *gs, *n = dot+1;
385 gs = dupStr(g,0);/* so we can write to it. */ 385 gs = dupStr(g,0);/* so we can write to it. */
386 /* used to be 386 /* used to be
387 * t = p = addProp_(o,lookupProp_(n)); 387 * t = p = addProp_(o,lookupProp_(n));
388 */ 388 */
389 t = p = addProp_(o,lookupProp(n)); 389 t = p = addProp_(o,lookupProp(n));
390 dot = strrchr(gs,'.'); 390 dot = strrchr(gs,'.');
391 *dot = 0; 391 *dot = 0;
392 do { 392 do {
393 dot = strrchr(gs,'.'); 393 dot = strrchr(gs,'.');
394 if (dot) { 394 if (dot) {
395 n = dot+1; 395 n = dot+1;
396 *dot=0; 396 *dot=0;
397 } 397 }
398 else 398 else
399 n = gs; 399 n = gs;
400 /* property(VCGroupingProp=n); 400 /* property(VCGroupingProp=n);
401 *and the value may have VCGrouping property 401 *and the value may have VCGrouping property
402 */ 402 */
403 t = addProp(t,VCGroupingProp); 403 t = addProp(t,VCGroupingProp);
404 setVObjectStringZValue(t,lookupProp_(n)); 404 setVObjectStringZValue(t,lookupProp_(n));
405 } while (n != gs); 405 } while (n != gs);
406 deleteStr(gs); 406 deleteStr(gs);
407 return p; 407 return p;
408 } 408 }
409 else 409 else
410 return addProp_(o,lookupProp(g)); 410 return addProp_(o,lookupProp(g));
411} 411}
412 412
413DLLEXPORT(VObject*) addPropValue(VObject *o, const char *p, const char *v) 413DLLEXPORT(VObject*) addPropValue(VObject *o, const char *p, const char *v)
414{ 414{
415 VObject *prop; 415 VObject *prop;
416 prop = addProp(o,p); 416 prop = addProp(o,p);
417 setVObjectStringZValue_(prop, strdup( v ) ); 417 setVObjectStringZValue_(prop, strdup( v ) );
418 return prop; 418 return prop;
419} 419}
420 420
421DLLEXPORT(VObject*) addPropSizedValue_(VObject *o, const char *p, const char *v, 421DLLEXPORT(VObject*) addPropSizedValue_(VObject *o, const char *p, const char *v,
422 unsigned int size) 422 unsigned int size)
423{ 423{
424 VObject *prop; 424 VObject *prop;
425 prop = addProp(o,p); 425 prop = addProp(o,p);
426 setValueWithSize_(prop, (void*)v, size); 426 setValueWithSize_(prop, (void*)v, size);
427 return prop; 427 return prop;
428} 428}
429 429
430DLLEXPORT(VObject*) addPropSizedValue(VObject *o, const char *p, const char *v, 430DLLEXPORT(VObject*) addPropSizedValue(VObject *o, const char *p, const char *v,
431 unsigned int size) 431 unsigned int size)
432{ 432{
433 return addPropSizedValue_(o,p,dupStr(v,size),size); 433 return addPropSizedValue_(o,p,dupStr(v,size),size);
434} 434}
435 435
436 436
437DLLEXPORT(void) cleanVObject(VObject *o) 437DLLEXPORT(void) cleanVObject(VObject *o)
438{ 438{
439 if (o == 0) return; 439 if (o == 0) return;
440 if (o->prop) { 440 if (o->prop) {
441 /* destroy time: cannot use the iterator here. 441 /* destroy time: cannot use the iterator here.
442 Have to break the cycle in the circular link 442 Have to break the cycle in the circular link
443 list and turns it into regular NULL-terminated 443 list and turns it into regular NULL-terminated
444 list -- since at some point of destruction, 444 list -- since at some point of destruction,
445 the reference entry for the iterator to work 445 the reference entry for the iterator to work
446 will not longer be valid. 446 will not longer be valid.
447 */ 447 */
448 VObject *p; 448 VObject *p;
449 p = o->prop->next; 449 p = o->prop->next;
450 o->prop->next = 0; 450 o->prop->next = 0;
451 do { 451 do {
452 VObject *t = p->next; 452 VObject *t = p->next;
453 cleanVObject(p); 453 cleanVObject(p);
454 p = t; 454 p = t;
455 } while (p); 455 } while (p);
456 } 456 }
457 switch (VALUE_TYPE(o)) { 457 switch (VALUE_TYPE(o)) {
458 case VCVT_STRINGZ: 458 case VCVT_STRINGZ:
459 case VCVT_RAW: 459 case VCVT_RAW:
460 // assume they are all allocated by malloc. 460 // assume they are all allocated by malloc.
461 free((char*)STRINGZ_VALUE_OF(o)); 461 free((char*)STRINGZ_VALUE_OF(o));
462 break; 462 break;
463 case VCVT_VOBJECT: 463 case VCVT_VOBJECT:
464 cleanVObject(VOBJECT_VALUE_OF(o)); 464 cleanVObject(VOBJECT_VALUE_OF(o));
465 break; 465 break;
466 } 466 }
467 deleteVObject(o); 467 deleteVObject(o);
468} 468}
469 469
470DLLEXPORT(void) cleanVObjects(VObject *list) 470DLLEXPORT(void) cleanVObjects(VObject *list)
471{ 471{
472 while (list) { 472 while (list) {
473 VObject *t = list; 473 VObject *t = list;
474 list = nextVObjectInList(list); 474 list = nextVObjectInList(list);
475 cleanVObject(t); 475 cleanVObject(t);
476 } 476 }
477} 477}
478 478
479/*---------------------------------------------------------------------- 479/*----------------------------------------------------------------------
480 The following is a String Table Facilities. 480 The following is a String Table Facilities.
481 ----------------------------------------------------------------------*/ 481 ----------------------------------------------------------------------*/
482 482
483#define STRTBLSIZE 255 483#define STRTBLSIZE 255
484 484
485static StrItem *strTbl[STRTBLSIZE]; 485static StrItem *strTbl[STRTBLSIZE];
486 486
487static unsigned int hashStr(const char *s) 487static unsigned int hashStr(const char *s)
488{ 488{
489 unsigned int h = 0; 489 unsigned int h = 0;
490 int i; 490 int i;
491 for (i=0;s[i];i++) { 491 for (i=0;s[i];i++) {
492 h += s[i]*i; 492 h += s[i]*i;
493 } 493 }
494 return h % STRTBLSIZE; 494 return h % STRTBLSIZE;
495} 495}
496 496
497DLLEXPORT(const char*) lookupStr(const char *s) 497DLLEXPORT(const char*) lookupStr(const char *s)
498{ 498{
499 StrItem *t; 499 StrItem *t;
500 unsigned int h = hashStr(s); 500 unsigned int h = hashStr(s);
501 if ((t = strTbl[h]) != 0) { 501 if ((t = strTbl[h]) != 0) {
502 do { 502 do {
503 if (qstricmp(t->s,s) == 0) { 503 if (qstricmp(t->s,s) == 0) {
504 t->refCnt++; 504 t->refCnt++;
505 return t->s; 505 return t->s;
506 } 506 }
507 t = t->next; 507 t = t->next;
508 } while (t); 508 } while (t);
509 } 509 }
510 s = dupStr(s,0); 510 s = dupStr(s,0);
511 strTbl[h] = newStrItem(s,strTbl[h]); 511 strTbl[h] = newStrItem(s,strTbl[h]);
512 return s; 512 return s;
513} 513}
514 514
515DLLEXPORT(void) unUseStr(const char *s) 515DLLEXPORT(void) unUseStr(const char *s)
516{ 516{
517 StrItem *t, *p; 517 StrItem *t, *p;
518 unsigned int h = hashStr(s); 518 unsigned int h = hashStr(s);
519 if ((t = strTbl[h]) != 0) { 519 if ((t = strTbl[h]) != 0) {
520 p = t; 520 p = t;
521 do { 521 do {
522 if (qstricmp(t->s,s) == 0) { 522 if (qstricmp(t->s,s) == 0) {
523 t->refCnt--; 523 t->refCnt--;
524 if (t->refCnt == 0) { 524 if (t->refCnt == 0) {
525 if (p == strTbl[h]) { 525 if (p == strTbl[h]) {
526 strTbl[h] = t->next; 526 strTbl[h] = t->next;
527 } 527 }
528 else { 528 else {
529 p->next = t->next; 529 p->next = t->next;
530 } 530 }
531 deleteStr(t->s); 531 deleteStr(t->s);
532 deleteStrItem(t); 532 deleteStrItem(t);
533 return; 533 return;
534 } 534 }
535 } 535 }
536 p = t; 536 p = t;
537 t = t->next; 537 t = t->next;
538 } while (t); 538 } while (t);
539 } 539 }
540} 540}
541 541
542DLLEXPORT(void) cleanStrTbl() 542DLLEXPORT(void) cleanStrTbl()
543{ 543{
544 int i; 544 int i;
545 for (i=0; i<STRTBLSIZE;i++) { 545 for (i=0; i<STRTBLSIZE;i++) {
546 StrItem *t = strTbl[i]; 546 StrItem *t = strTbl[i];
547 while (t) { 547 while (t) {
548 StrItem *p; 548 StrItem *p;
549 deleteStr(t->s); 549 deleteStr(t->s);
550 p = t; 550 p = t;
551 t = t->next; 551 t = t->next;
552 deleteStrItem(p); 552 deleteStrItem(p);
553 } while (t); 553 } while (t);
554 strTbl[i] = 0; 554 strTbl[i] = 0;
555 } 555 }
556} 556}
557 557
558 558
559struct PreDefProp { 559struct PreDefProp {
560 const char *name; 560 const char *name;
561 const char *alias; 561 const char *alias;
562 const char** fields; 562 const char** fields;
563 unsigned int flags; 563 unsigned int flags;
564 }; 564 };
565 565
566/* flags in PreDefProp */ 566/* flags in PreDefProp */
567 #define PD_BEGIN0x1 567 #define PD_BEGIN0x1
568 #define PD_INTERNAL0x2 568 #define PD_INTERNAL0x2
569 569
570static const char *adrFields[] = { 570static const char *adrFields[] = {
571 VCPostalBoxProp, 571 VCPostalBoxProp,
572 VCExtAddressProp, 572 VCExtAddressProp,
573 VCStreetAddressProp, 573 VCStreetAddressProp,
574 VCCityProp, 574 VCCityProp,
575 VCRegionProp, 575 VCRegionProp,
576 VCPostalCodeProp, 576 VCPostalCodeProp,
577 VCCountryNameProp, 577 VCCountryNameProp,
578 0 578 0
579}; 579};
580 580
581static const char *nameFields[] = { 581static const char *nameFields[] = {
582 VCFamilyNameProp, 582 VCFamilyNameProp,
583 VCGivenNameProp, 583 VCGivenNameProp,
584 VCAdditionalNamesProp, 584 VCAdditionalNamesProp,
585 VCNamePrefixesProp, 585 VCNamePrefixesProp,
586 VCNameSuffixesProp, 586 VCNameSuffixesProp,
587 NULL 587 NULL
588 }; 588 };
589 589
590static const char *orgFields[] = { 590static const char *orgFields[] = {
591 VCOrgNameProp, 591 VCOrgNameProp,
592 VCOrgUnitProp, 592 VCOrgUnitProp,
593 VCOrgUnit2Prop, 593 VCOrgUnit2Prop,
594 VCOrgUnit3Prop, 594 VCOrgUnit3Prop,
595 VCOrgUnit4Prop, 595 VCOrgUnit4Prop,
596 NULL 596 NULL
597 }; 597 };
598 598
599static const char *AAlarmFields[] = { 599static const char *AAlarmFields[] = {
600 VCRunTimeProp, 600 VCRunTimeProp,
601 VCSnoozeTimeProp, 601 VCSnoozeTimeProp,
602 VCRepeatCountProp, 602 VCRepeatCountProp,
603 VCAudioContentProp, 603 VCAudioContentProp,
604 0 604 0
605 }; 605 };
606 606
607/* ExDate -- has unamed fields */ 607/* ExDate -- has unamed fields */
608/* RDate -- has unamed fields */ 608/* RDate -- has unamed fields */
609 609
610static const char *DAlarmFields[] = { 610static const char *DAlarmFields[] = {
611 VCRunTimeProp, 611 VCRunTimeProp,
612 VCSnoozeTimeProp, 612 VCSnoozeTimeProp,
613 VCRepeatCountProp, 613 VCRepeatCountProp,
614 VCDisplayStringProp, 614 VCDisplayStringProp,
615 0 615 0
616 }; 616 };
617 617
618static const char *MAlarmFields[] = { 618static const char *MAlarmFields[] = {
619 VCRunTimeProp, 619 VCRunTimeProp,
620 VCSnoozeTimeProp, 620 VCSnoozeTimeProp,
621 VCRepeatCountProp, 621 VCRepeatCountProp,
622 VCEmailAddressProp, 622 VCEmailAddressProp,
623 VCNoteProp, 623 VCNoteProp,
624 0 624 0
625 }; 625 };
626 626
627static const char *PAlarmFields[] = { 627static const char *PAlarmFields[] = {
628 VCRunTimeProp, 628 VCRunTimeProp,
629 VCSnoozeTimeProp, 629 VCSnoozeTimeProp,
630 VCRepeatCountProp, 630 VCRepeatCountProp,
631 VCProcedureNameProp, 631 VCProcedureNameProp,
632 0 632 0
633 }; 633 };
634 634
635static struct PreDefProp propNames[] = { 635static struct PreDefProp propNames[] = {
636 { VC7bitProp, 0, 0, 0 }, 636 { VC7bitProp, 0, 0, 0 },
637 { VC8bitProp, 0, 0, 0 }, 637 { VC8bitProp, 0, 0, 0 },
638 { VCAAlarmProp, 0, AAlarmFields, 0 }, 638 { VCAAlarmProp, 0, AAlarmFields, 0 },
639 { VCAdditionalNamesProp, 0, 0, 0 }, 639 { VCAdditionalNamesProp, 0, 0, 0 },
640 { VCAdrProp, 0, adrFields, 0 }, 640 { VCAdrProp, 0, adrFields, 0 },
641 { VCAgentProp, 0, 0, 0 }, 641 { VCAgentProp, 0, 0, 0 },
642 { VCAIFFProp, 0, 0, 0 }, 642 { VCAIFFProp, 0, 0, 0 },
643 { VCAOLProp, 0, 0, 0 }, 643 { VCAOLProp, 0, 0, 0 },
644 { VCAppleLinkProp, 0, 0, 0 }, 644 { VCAppleLinkProp, 0, 0, 0 },
645 { VCAttachProp, 0, 0, 0 }, 645 { VCAttachProp, 0, 0, 0 },
646 { VCAttendeeProp, 0, 0, 0 }, 646 { VCAttendeeProp, 0, 0, 0 },
647 { VCATTMailProp, 0, 0, 0 }, 647 { VCATTMailProp, 0, 0, 0 },
648 { VCAudioContentProp, 0, 0, 0 }, 648 { VCAudioContentProp, 0, 0, 0 },
649 { VCAVIProp, 0, 0, 0 }, 649 { VCAVIProp, 0, 0, 0 },
650 { VCBase64Prop, 0, 0, 0 }, 650 { VCBase64Prop, 0, 0, 0 },
651 { VCBBSProp, 0, 0, 0 }, 651 { VCBBSProp, 0, 0, 0 },
652 { VCBirthDateProp, 0, 0, 0 }, 652 { VCBirthDateProp, 0, 0, 0 },
653 { VCBMPProp, 0, 0, 0 }, 653 { VCBMPProp, 0, 0, 0 },
654 { VCBodyProp, 0, 0, 0 }, 654 { VCBodyProp, 0, 0, 0 },
655 { VCBusinessRoleProp, 0, 0, 0 }, 655 { VCBusinessRoleProp, 0, 0, 0 },
656 { VCCalProp, 0, 0, PD_BEGIN }, 656 { VCCalProp, 0, 0, PD_BEGIN },
657 { VCCaptionProp, 0, 0, 0 }, 657 { VCCaptionProp, 0, 0, 0 },
658 { VCCardProp, 0, 0, PD_BEGIN }, 658 { VCCardProp, 0, 0, PD_BEGIN },
659 { VCCarProp, 0, 0, 0 }, 659 { VCCarProp, 0, 0, 0 },
660 { VCCategoriesProp, 0, 0, 0 }, 660 { VCCategoriesProp, 0, 0, 0 },
661 { VCCellularProp, 0, 0, 0 }, 661 { VCCellularProp, 0, 0, 0 },
662 { VCCGMProp, 0, 0, 0 }, 662 { VCCGMProp, 0, 0, 0 },
663 { VCCharSetProp, 0, 0, 0 }, 663 { VCCharSetProp, 0, 0, 0 },
664 { VCCIDProp, VCContentIDProp, 0, 0 }, 664 { VCCIDProp, VCContentIDProp, 0, 0 },
665 { VCCISProp, 0, 0, 0 }, 665 { VCCISProp, 0, 0, 0 },
666 { VCCityProp, 0, 0, 0 }, 666 { VCCityProp, 0, 0, 0 },
667 { VCClassProp, 0, 0, 0 }, 667 { VCClassProp, 0, 0, 0 },
668 { VCCommentProp, 0, 0, 0 }, 668 { VCCommentProp, 0, 0, 0 },
669 { VCCompletedProp, 0, 0, 0 }, 669 { VCCompletedProp, 0, 0, 0 },
670 { VCContentIDProp, 0, 0, 0 }, 670 { VCContentIDProp, 0, 0, 0 },
671 { VCCountryNameProp, 0, 0, 0 }, 671 { VCCountryNameProp, 0, 0, 0 },
672 { VCDAlarmProp, 0, DAlarmFields, 0 }, 672 { VCDAlarmProp, 0, DAlarmFields, 0 },
673 { VCDataSizeProp, 0, 0, PD_INTERNAL }, 673 { VCDataSizeProp, 0, 0, PD_INTERNAL },
674 { VCDayLightProp, 0, 0, 0 }, 674 { VCDayLightProp, 0, 0, 0 },
675 { VCDCreatedProp, 0, 0, 0 }, 675 { VCDCreatedProp, 0, 0, 0 },
676 { VCDeliveryLabelProp, 0, 0, 0 }, 676 { VCDeliveryLabelProp, 0, 0, 0 },
677 { VCDescriptionProp, 0, 0, 0 }, 677 { VCDescriptionProp, 0, 0, 0 },
678 { VCDIBProp, 0, 0, 0 }, 678 { VCDIBProp, 0, 0, 0 },
679 { VCDisplayStringProp, 0, 0, 0 }, 679 { VCDisplayStringProp, 0, 0, 0 },
680 { VCDomesticProp, 0, 0, 0 }, 680 { VCDomesticProp, 0, 0, 0 },
681 { VCDTendProp, 0, 0, 0 }, 681 { VCDTendProp, 0, 0, 0 },
682 { VCDTstartProp, 0, 0, 0 }, 682 { VCDTstartProp, 0, 0, 0 },
683 { VCDueProp, 0, 0, 0 }, 683 { VCDueProp, 0, 0, 0 },
684 { VCEmailAddressProp, 0, 0, 0 }, 684 { VCEmailAddressProp, 0, 0, 0 },
685 { VCEncodingProp, 0, 0, 0 }, 685 { VCEncodingProp, 0, 0, 0 },
686 { VCEndProp, 0, 0, 0 }, 686 { VCEndProp, 0, 0, 0 },
687 { VCEventProp, 0, 0, PD_BEGIN }, 687 { VCEventProp, 0, 0, PD_BEGIN },
688 { VCEWorldProp, 0, 0, 0 }, 688 { VCEWorldProp, 0, 0, 0 },
689 { VCExNumProp, 0, 0, 0 }, 689 { VCExNumProp, 0, 0, 0 },
690 { VCExpDateProp, 0, 0, 0 }, 690 { VCExpDateProp, 0, 0, 0 },
691 { VCExpectProp, 0, 0, 0 }, 691 { VCExpectProp, 0, 0, 0 },
692 { VCExtAddressProp, 0, 0, 0 }, 692 { VCExtAddressProp, 0, 0, 0 },
693 { VCFamilyNameProp, 0, 0, 0 }, 693 { VCFamilyNameProp, 0, 0, 0 },
694 { VCFaxProp, 0, 0, 0 }, 694 { VCFaxProp, 0, 0, 0 },
695 { VCFullNameProp, 0, 0, 0 }, 695 { VCFullNameProp, 0, 0, 0 },
696 { VCGeoLocationProp, 0, 0, 0 }, 696 { VCGeoLocationProp, 0, 0, 0 },
697 { VCGeoProp, 0, 0, 0 }, 697 { VCGeoProp, 0, 0, 0 },
698 { VCGIFProp, 0, 0, 0 }, 698 { VCGIFProp, 0, 0, 0 },
699 { VCGivenNameProp, 0, 0, 0 }, 699 { VCGivenNameProp, 0, 0, 0 },
700 { VCGroupingProp, 0, 0, 0 }, 700 { VCGroupingProp, 0, 0, 0 },
701 { VCHomeProp, 0, 0, 0 }, 701 { VCHomeProp, 0, 0, 0 },
702 { VCIBMMailProp, 0, 0, 0 }, 702 { VCIBMMailProp, 0, 0, 0 },
703 { VCInlineProp, 0, 0, 0 }, 703 { VCInlineProp, 0, 0, 0 },
704 { VCInternationalProp, 0, 0, 0 }, 704 { VCInternationalProp, 0, 0, 0 },
705 { VCInternetProp, 0, 0, 0 }, 705 { VCInternetProp, 0, 0, 0 },
706 { VCISDNProp, 0, 0, 0 }, 706 { VCISDNProp, 0, 0, 0 },
707 { VCJPEGProp, 0, 0, 0 }, 707 { VCJPEGProp, 0, 0, 0 },
708 { VCLanguageProp, 0, 0, 0 }, 708 { VCLanguageProp, 0, 0, 0 },
709 { VCLastModifiedProp, 0, 0, 0 }, 709 { VCLastModifiedProp, 0, 0, 0 },
710 { VCLastRevisedProp, 0, 0, 0 }, 710 { VCLastRevisedProp, 0, 0, 0 },
711 { VCLocationProp, 0, 0, 0 }, 711 { VCLocationProp, 0, 0, 0 },
712 { VCLogoProp, 0, 0, 0 }, 712 { VCLogoProp, 0, 0, 0 },
713 { VCMailerProp, 0, 0, 0 }, 713 { VCMailerProp, 0, 0, 0 },
714 { VCMAlarmProp, 0, MAlarmFields, 0 }, 714 { VCMAlarmProp, 0, MAlarmFields, 0 },
715 { VCMCIMailProp, 0, 0, 0 }, 715 { VCMCIMailProp, 0, 0, 0 },
716 { VCMessageProp, 0, 0, 0 }, 716 { VCMessageProp, 0, 0, 0 },
717 { VCMETProp, 0, 0, 0 }, 717 { VCMETProp, 0, 0, 0 },
718 { VCModemProp, 0, 0, 0 }, 718 { VCModemProp, 0, 0, 0 },
719 { VCMPEG2Prop, 0, 0, 0 }, 719 { VCMPEG2Prop, 0, 0, 0 },
720 { VCMPEGProp, 0, 0, 0 }, 720 { VCMPEGProp, 0, 0, 0 },
721 { VCMSNProp, 0, 0, 0 }, 721 { VCMSNProp, 0, 0, 0 },
722 { VCNamePrefixesProp, 0, 0, 0 }, 722 { VCNamePrefixesProp, 0, 0, 0 },
723 { VCNameProp, 0, nameFields, 0 }, 723 { VCNameProp, 0, nameFields, 0 },
724 { VCNameSuffixesProp, 0, 0, 0 }, 724 { VCNameSuffixesProp, 0, 0, 0 },
725 { VCNoteProp, 0, 0, 0 }, 725 { VCNoteProp, 0, 0, 0 },
726 { VCOrgNameProp, 0, 0, 0 }, 726 { VCOrgNameProp, 0, 0, 0 },
727 { VCOrgProp, 0, orgFields, 0 }, 727 { VCOrgProp, 0, orgFields, 0 },
728 { VCOrgUnit2Prop, 0, 0, 0 }, 728 { VCOrgUnit2Prop, 0, 0, 0 },
729 { VCOrgUnit3Prop, 0, 0, 0 }, 729 { VCOrgUnit3Prop, 0, 0, 0 },
730 { VCOrgUnit4Prop, 0, 0, 0 }, 730 { VCOrgUnit4Prop, 0, 0, 0 },
731 { VCOrgUnitProp, 0, 0, 0 }, 731 { VCOrgUnitProp, 0, 0, 0 },
732 { VCPagerProp, 0, 0, 0 }, 732 { VCPagerProp, 0, 0, 0 },
733 { VCPAlarmProp, 0, PAlarmFields, 0 }, 733 { VCPAlarmProp, 0, PAlarmFields, 0 },
734 { VCParcelProp, 0, 0, 0 }, 734 { VCParcelProp, 0, 0, 0 },
735 { VCPartProp, 0, 0, 0 }, 735 { VCPartProp, 0, 0, 0 },
736 { VCPCMProp, 0, 0, 0 }, 736 { VCPCMProp, 0, 0, 0 },
737 { VCPDFProp, 0, 0, 0 }, 737 { VCPDFProp, 0, 0, 0 },
738 { VCPGPProp, 0, 0, 0 }, 738 { VCPGPProp, 0, 0, 0 },
739 { VCPhotoProp, 0, 0, 0 }, 739 { VCPhotoProp, 0, 0, 0 },
740 { VCPICTProp, 0, 0, 0 }, 740 { VCPICTProp, 0, 0, 0 },
741 { VCPMBProp, 0, 0, 0 }, 741 { VCPMBProp, 0, 0, 0 },
742 { VCPostalBoxProp, 0, 0, 0 }, 742 { VCPostalBoxProp, 0, 0, 0 },
743 { VCPostalCodeProp, 0, 0, 0 }, 743 { VCPostalCodeProp, 0, 0, 0 },
744 { VCPostalProp, 0, 0, 0 }, 744 { VCPostalProp, 0, 0, 0 },
745 { VCPowerShareProp, 0, 0, 0 }, 745 { VCPowerShareProp, 0, 0, 0 },
746 { VCPreferredProp, 0, 0, 0 }, 746 { VCPreferredProp, 0, 0, 0 },
747 { VCPriorityProp, 0, 0, 0 }, 747 { VCPriorityProp, 0, 0, 0 },
748 { VCProcedureNameProp, 0, 0, 0 }, 748 { VCProcedureNameProp, 0, 0, 0 },
749 { VCProdIdProp, 0, 0, 0 }, 749 { VCProdIdProp, 0, 0, 0 },
750 { VCProdigyProp, 0, 0, 0 }, 750 { VCProdigyProp, 0, 0, 0 },
751 { VCPronunciationProp, 0, 0, 0 }, 751 { VCPronunciationProp, 0, 0, 0 },
752 { VCPSProp, 0, 0, 0 }, 752 { VCPSProp, 0, 0, 0 },
753 { VCPublicKeyProp, 0, 0, 0 }, 753 { VCPublicKeyProp, 0, 0, 0 },
754 { VCQPProp, VCQuotedPrintableProp, 0, 0 }, 754 { VCQPProp, VCQuotedPrintableProp, 0, 0 },
755 { VCQuickTimeProp, 0, 0, 0 }, 755 { VCQuickTimeProp, 0, 0, 0 },
756 { VCQuotedPrintableProp, 0, 0, 0 }, 756 { VCQuotedPrintableProp, 0, 0, 0 },
757 { VCRDateProp, 0, 0, 0 }, 757 { VCRDateProp, 0, 0, 0 },
758 { VCRegionProp, 0, 0, 0 }, 758 { VCRegionProp, 0, 0, 0 },
759 { VCRelatedToProp, 0, 0, 0 }, 759 { VCRelatedToProp, 0, 0, 0 },
760 { VCRepeatCountProp, 0, 0, 0 }, 760 { VCRepeatCountProp, 0, 0, 0 },
761 { VCResourcesProp, 0, 0, 0 }, 761 { VCResourcesProp, 0, 0, 0 },
762 { VCRNumProp, 0, 0, 0 }, 762 { VCRNumProp, 0, 0, 0 },
763 { VCRoleProp, 0, 0, 0 }, 763 { VCRoleProp, 0, 0, 0 },
764 { VCRRuleProp, 0, 0, 0 }, 764 { VCRRuleProp, 0, 0, 0 },
765 { VCRSVPProp, 0, 0, 0 }, 765 { VCRSVPProp, 0, 0, 0 },
766 { VCRunTimeProp, 0, 0, 0 }, 766 { VCRunTimeProp, 0, 0, 0 },
767 { VCSequenceProp, 0, 0, 0 }, 767 { VCSequenceProp, 0, 0, 0 },
768 { VCSnoozeTimeProp, 0, 0, 0 }, 768 { VCSnoozeTimeProp, 0, 0, 0 },
769 { VCStartProp, 0, 0, 0 }, 769 { VCStartProp, 0, 0, 0 },
770 { VCStatusProp, 0, 0, 0 }, 770 { VCStatusProp, 0, 0, 0 },
771 { VCStreetAddressProp, 0, 0, 0 }, 771 { VCStreetAddressProp, 0, 0, 0 },
772 { VCSubTypeProp, 0, 0, 0 }, 772 { VCSubTypeProp, 0, 0, 0 },
773 { VCSummaryProp, 0, 0, 0 }, 773 { VCSummaryProp, 0, 0, 0 },
774 { VCTelephoneProp, 0, 0, 0 }, 774 { VCTelephoneProp, 0, 0, 0 },
775 { VCTIFFProp, 0, 0, 0 }, 775 { VCTIFFProp, 0, 0, 0 },
776 { VCTimeZoneProp, 0, 0, 0 }, 776 { VCTimeZoneProp, 0, 0, 0 },
777 { VCTitleProp, 0, 0, 0 }, 777 { VCTitleProp, 0, 0, 0 },
778 { VCTLXProp, 0, 0, 0 }, 778 { VCTLXProp, 0, 0, 0 },
779 { VCTodoProp, 0, 0, PD_BEGIN }, 779 { VCTodoProp, 0, 0, PD_BEGIN },
780 { VCTranspProp, 0, 0, 0 }, 780 { VCTranspProp, 0, 0, 0 },
781 { VCUniqueStringProp, 0, 0, 0 }, 781 { VCUniqueStringProp, 0, 0, 0 },
782 { VCURLProp, 0, 0, 0 }, 782 { VCURLProp, 0, 0, 0 },
783 { VCURLValueProp, 0, 0, 0 }, 783 { VCURLValueProp, 0, 0, 0 },
784 { VCValueProp, 0, 0, 0 }, 784 { VCValueProp, 0, 0, 0 },
785 { VCVersionProp, 0, 0, 0 }, 785 { VCVersionProp, 0, 0, 0 },
786 { VCVideoProp, 0, 0, 0 }, 786 { VCVideoProp, 0, 0, 0 },
787 { VCVoiceProp, 0, 0, 0 }, 787 { VCVoiceProp, 0, 0, 0 },
788 { VCWAVEProp, 0, 0, 0 }, 788 { VCWAVEProp, 0, 0, 0 },
789 { VCWMFProp, 0, 0, 0 }, 789 { VCWMFProp, 0, 0, 0 },
790 { VCWorkProp, 0, 0, 0 }, 790 { VCWorkProp, 0, 0, 0 },
791 { VCX400Prop, 0, 0, 0 }, 791 { VCX400Prop, 0, 0, 0 },
792 { VCX509Prop, 0, 0, 0 }, 792 { VCX509Prop, 0, 0, 0 },
793 { VCXRuleProp, 0, 0, 0 }, 793 { VCXRuleProp, 0, 0, 0 },
794 { 0,0,0,0 } 794 { 0,0,0,0 }
795 }; 795 };
796 796
797 797
798static struct PreDefProp* lookupPropInfo(const char* str) 798static struct PreDefProp* lookupPropInfo(const char* str)
799{ 799{
800 /* brute force for now, could use a hash table here. */ 800 /* brute force for now, could use a hash table here. */
801 int i; 801 int i;
802 802
803 for (i = 0; propNames[i].name; i++) 803 for (i = 0; propNames[i].name; i++)
804 if (qstricmp(str, propNames[i].name) == 0) { 804 if (qstricmp(str, propNames[i].name) == 0) {
805 return &propNames[i]; 805 return &propNames[i];
806 } 806 }
807 807
808 return 0; 808 return 0;
809} 809}
810 810
811 811
812DLLEXPORT(const char*) lookupProp_(const char* str) 812DLLEXPORT(const char*) lookupProp_(const char* str)
813{ 813{
814 int i; 814 int i;
815 815
816 for (i = 0; propNames[i].name; i++) 816 for (i = 0; propNames[i].name; i++)
817 if (qstricmp(str, propNames[i].name) == 0) { 817 if (qstricmp(str, propNames[i].name) == 0) {
818 const char* s; 818 const char* s;
819 s = propNames[i].alias?propNames[i].alias:propNames[i].name; 819 s = propNames[i].alias?propNames[i].alias:propNames[i].name;
820 return lookupStr(s); 820 return lookupStr(s);
821 } 821 }
822 return lookupStr(str); 822 return lookupStr(str);
823} 823}
824 824
825 825
826DLLEXPORT(const char*) lookupProp(const char* str) 826DLLEXPORT(const char*) lookupProp(const char* str)
827{ 827{
828 int i; 828 int i;
829 829
830 for (i = 0; propNames[i].name; i++) 830 for (i = 0; propNames[i].name; i++)
831 if (qstricmp(str, propNames[i].name) == 0) { 831 if (qstricmp(str, propNames[i].name) == 0) {
832 const char *s; 832 const char *s;
833 fieldedProp = propNames[i].fields; 833 fieldedProp = propNames[i].fields;
834 s = propNames[i].alias?propNames[i].alias:propNames[i].name; 834 s = propNames[i].alias?propNames[i].alias:propNames[i].name;
835 return lookupStr(s); 835 return lookupStr(s);
836 } 836 }
837 fieldedProp = 0; 837 fieldedProp = 0;
838 return lookupStr(str); 838 return lookupStr(str);
839} 839}
840 840
841 841
842/*---------------------------------------------------------------------- 842/*----------------------------------------------------------------------
843 APIs to Output text form. 843 APIs to Output text form.
844 ----------------------------------------------------------------------*/ 844 ----------------------------------------------------------------------*/
845#define OFILE_REALLOC_SIZE 256 845#define OFILE_REALLOC_SIZE 256
846typedef struct OFile { 846typedef struct OFile {
847 FILE *fp; 847 FILE *fp;
848 char *s; 848 char *s;
849 int len; 849 int len;
850 int limit; 850 int limit;
851 int alloc:1; 851 int alloc:1;
852 int fail:1; 852 int fail:1;
853 } OFile; 853 } OFile;
854 854
855#if 0 855#if 0
856static void appendsOFile(OFile *fp, const char *s) 856static void appendsOFile(OFile *fp, const char *s)
857{ 857{
858 int slen; 858 int slen;
859 if (fp->fail) return; 859 if (fp->fail) return;
860 slen = strlen(s); 860 slen = strlen(s);
861 if (fp->fp) { 861 if (fp->fp) {
862 fwrite(s,1,slen,fp->fp); 862 fwrite(s,1,slen,fp->fp);
863 } 863 }
864 else { 864 else {
865stuff: 865stuff:
866 if (fp->len + slen < fp->limit) { 866 if (fp->len + slen < fp->limit) {
867 memcpy(fp->s+fp->len,s,slen); 867 memcpy(fp->s+fp->len,s,slen);
868 fp->len += slen; 868 fp->len += slen;
869 return; 869 return;
870 } 870 }
871 else if (fp->alloc) { 871 else if (fp->alloc) {
872 fp->limit = fp->limit + OFILE_REALLOC_SIZE; 872 fp->limit = fp->limit + OFILE_REALLOC_SIZE;
873 if (OFILE_REALLOC_SIZE <= slen) fp->limit += slen; 873 if (OFILE_REALLOC_SIZE <= slen) fp->limit += slen;
874 fp->s = (char *) realloc(fp->s,fp->limit); 874 fp->s = (char *) realloc(fp->s,fp->limit);
875 if (fp->s) goto stuff; 875 if (fp->s) goto stuff;
876 } 876 }
877 if (fp->alloc) 877 if (fp->alloc)
878 free(fp->s); 878 free(fp->s);
879 fp->s = 0; 879 fp->s = 0;
880 fp->fail = 1; 880 fp->fail = 1;
881 } 881 }
882} 882}
883 883
884static void appendcOFile(OFile *fp, char c) 884static void appendcOFile(OFile *fp, char c)
885{ 885{
886 if (fp->fail) return; 886 if (fp->fail) return;
887 if (fp->fp) { 887 if (fp->fp) {
888 fputc(c,fp->fp); 888 fputc(c,fp->fp);
889 } 889 }
890 else { 890 else {
891stuff: 891stuff:
892 if (fp->len+1 < fp->limit) { 892 if (fp->len+1 < fp->limit) {
893 fp->s[fp->len] = c; 893 fp->s[fp->len] = c;
894 fp->len++; 894 fp->len++;
895 return; 895 return;
896 } 896 }
897 else if (fp->alloc) { 897 else if (fp->alloc) {
898 fp->limit = fp->limit + OFILE_REALLOC_SIZE; 898 fp->limit = fp->limit + OFILE_REALLOC_SIZE;
899 fp->s = (char *) realloc(fp->s,fp->limit); 899 fp->s = (char *) realloc(fp->s,fp->limit);
900 if (fp->s) goto stuff; 900 if (fp->s) goto stuff;
901 } 901 }
902 if (fp->alloc) 902 if (fp->alloc)
903 free(fp->s); 903 free(fp->s);
904 fp->s = 0; 904 fp->s = 0;
905 fp->fail = 1; 905 fp->fail = 1;
906 } 906 }
907} 907}
908#else 908#else
909static void appendcOFile_(OFile *fp, char c) 909static void appendcOFile_(OFile *fp, char c)
910{ 910{
911 if (fp->fail) return; 911 if (fp->fail) return;
912 if (fp->fp) { 912 if (fp->fp) {
913 fputc(c,fp->fp); 913 fputc(c,fp->fp);
914 } 914 }
915 else { 915 else {
916stuff: 916stuff:
917 if (fp->len+1 < fp->limit) { 917 if (fp->len+1 < fp->limit) {
918 fp->s[fp->len] = c; 918 fp->s[fp->len] = c;
919 fp->len++; 919 fp->len++;
920 return; 920 return;
921 } 921 }
922 else if (fp->alloc) { 922 else if (fp->alloc) {
923 fp->limit = fp->limit + OFILE_REALLOC_SIZE; 923 fp->limit = fp->limit + OFILE_REALLOC_SIZE;
924 fp->s = (char *)realloc(fp->s,fp->limit); 924 fp->s = (char *)realloc(fp->s,fp->limit);
925 if (fp->s) goto stuff; 925 if (fp->s) goto stuff;
926 } 926 }
927 if (fp->alloc) 927 if (fp->alloc)
928 free(fp->s); 928 free(fp->s);
929 fp->s = 0; 929 fp->s = 0;
930 fp->fail = 1; 930 fp->fail = 1;
931 } 931 }
932} 932}
933 933
934static void appendcOFile(OFile *fp, char c) 934static void appendcOFile(OFile *fp, char c)
935{ 935{
936 if (c == '\n') { 936 if (c == '\n') {
937 /* write out as <CR><LF> */ 937 /* write out as <CR><LF> */
938 appendcOFile_(fp,0xd); 938 appendcOFile_(fp,0xd);
939 appendcOFile_(fp,0xa); 939 appendcOFile_(fp,0xa);
940 } 940 }
941 else 941 else
942 appendcOFile_(fp,c); 942 appendcOFile_(fp,c);
943} 943}
944 944
945static void appendsOFile(OFile *fp, const char *s) 945static void appendsOFile(OFile *fp, const char *s)
946{ 946{
947 int i, slen; 947 int i, slen;
948 slen = strlen(s); 948 slen = strlen(s);
949 for (i=0; i<slen; i++) { 949 for (i=0; i<slen; i++) {
950 appendcOFile(fp,s[i]); 950 appendcOFile(fp,s[i]);
951 } 951 }
952} 952}
953 953
954#endif 954#endif
955 955
956static void initOFile(OFile *fp, FILE *ofp) 956static void initOFile(OFile *fp, FILE *ofp)
957{ 957{
958 fp->fp = ofp; 958 fp->fp = ofp;
959 fp->s = 0; 959 fp->s = 0;
960 fp->len = 0; 960 fp->len = 0;
961 fp->limit = 0; 961 fp->limit = 0;
962 fp->alloc = 0; 962 fp->alloc = 0;
963 fp->fail = 0; 963 fp->fail = 0;
964} 964}
965 965
966static int writeBase64(OFile *fp, unsigned char *s, long len) 966static int writeBase64(OFile *fp, unsigned char *s, long len)
967{ 967{
968 long cur = 0; 968 long cur = 0;
969 int i, numQuads = 0; 969 int i, numQuads = 0;
970 unsigned long trip; 970 unsigned long trip;
971 unsigned char b; 971 unsigned char b;
972 char quad[5]; 972 char quad[5];
973#define MAXQUADS 16 973#define MAXQUADS 16
974 974
975 quad[4] = 0; 975 quad[4] = 0;
976 976
977 while (cur < len) { 977 while (cur < len) {
978 // collect the triplet of bytes into 'trip' 978 // collect the triplet of bytes into 'trip'
979 trip = 0; 979 trip = 0;
980 for (i = 0; i < 3; i++) { 980 for (i = 0; i < 3; i++) {
981 b = (cur < len) ? *(s + cur) : 0; 981 b = (cur < len) ? *(s + cur) : 0;
982 cur++; 982 cur++;
983 trip = trip << 8 | b; 983 trip = trip << 8 | b;
984 } 984 }
985 // fill in 'quad' with the appropriate four characters 985 // fill in 'quad' with the appropriate four characters
986 for (i = 3; i >= 0; i--) { 986 for (i = 3; i >= 0; i--) {
987 b = (unsigned char)(trip & 0x3F); 987 b = (unsigned char)(trip & 0x3F);
988 trip = trip >> 6; 988 trip = trip >> 6;
989 if ((3 - i) < (cur - len)) 989 if ((3 - i) < (cur - len))
990 quad[i] = '='; // pad char 990 quad[i] = '='; // pad char
991 else if (b < 26) quad[i] = (char)b + 'A'; 991 else if (b < 26) quad[i] = (char)b + 'A';
992 else if (b < 52) quad[i] = (char)(b - 26) + 'a'; 992 else if (b < 52) quad[i] = (char)(b - 26) + 'a';
993 else if (b < 62) quad[i] = (char)(b - 52) + '0'; 993 else if (b < 62) quad[i] = (char)(b - 52) + '0';
994 else if (b == 62) quad[i] = '+'; 994 else if (b == 62) quad[i] = '+';
995 else quad[i] = '/'; 995 else quad[i] = '/';
996 } 996 }
997 // now output 'quad' with appropriate whitespace and line ending 997 // now output 'quad' with appropriate whitespace and line ending
998 appendsOFile(fp, (numQuads == 0 ? " " : "")); 998 appendsOFile(fp, (numQuads == 0 ? " " : ""));
999 appendsOFile(fp, quad); 999 appendsOFile(fp, quad);
1000 appendsOFile(fp, ((cur >= len)?"\n" :(numQuads==MAXQUADS-1?"\n" : ""))); 1000 appendsOFile(fp, ((cur >= len)?"\n" :(numQuads==MAXQUADS-1?"\n" : "")));
1001 numQuads = (numQuads + 1) % MAXQUADS; 1001 numQuads = (numQuads + 1) % MAXQUADS;
1002 } 1002 }
1003 appendcOFile(fp,'\n'); 1003 appendcOFile(fp,'\n');
1004 1004
1005 return 1; 1005 return 1;
1006} 1006}
1007 1007
1008static void writeQPString(OFile *fp, const char *s) 1008static const char *replaceChar(unsigned char c)
1009{ 1009{
1010 const char *p = s; 1010 if (c == '\n') {
1011 while (*p) { 1011 return "=0A=\n";
1012 if (*p == '\n') { 1012 } else if (
1013 if (p[1]) appendsOFile(fp,"=0A="); 1013 (c >= 'A' && c <= 'Z')
1014 } 1014 ||
1015 appendcOFile(fp,*p); 1015 (c >= 'a' && c <= 'z')
1016 p++; 1016 ||
1017 } 1017 (c >= '0' && c <= '9')
1018} 1018 ||
1019 1019 (c >= '\'' && c <= ')')
1020 1020 ||
1021 1021 (c >= '+' && c <= '-')
1022static void writeVObject_(OFile *fp, VObject *o); 1022 ||
1023 1023 (c == '/')
1024static void writeValue(OFile *fp, VObject *o, unsigned long size) 1024 ||
1025{ 1025 (c == '?')
1026 if (o == 0) return; 1026 ||
1027 switch (VALUE_TYPE(o)) { 1027 (c == ' '))
1028 case VCVT_STRINGZ: { 1028 {
1029 writeQPString(fp, STRINGZ_VALUE_OF(o)); 1029 return 0;
1030 break; 1030 }
1031 } 1031
1032 case VCVT_UINT: { 1032 static char trans[4];
1033 char buf[16]; 1033 trans[0] = '=';
1034 sprintf(buf,"%u", INTEGER_VALUE_OF(o)); 1034 trans[3] = '\0';
1035 appendsOFile(fp,buf); 1035 int rem = c % 16;
1036 break; 1036 int div = c / 16;
1037 } 1037
1038 case VCVT_ULONG: { 1038 if (div < 10)
1039 char buf[16]; 1039 trans[1] = '0' + div;
1040 sprintf(buf,"%lu", LONG_VALUE_OF(o)); 1040 else
1041 appendsOFile(fp,buf); 1041 trans[1] = 'A' + (div - 10);
1042 break; 1042
1043 } 1043 if (rem < 10)
1044 case VCVT_RAW: { 1044 trans[2] = '0' + rem;
1045 appendcOFile(fp,'\n'); 1045 else
1046 writeBase64(fp,(unsigned char*)(ANY_VALUE_OF(o)),size); 1046 trans[2] = 'A' + (rem - 10);
1047 break; 1047
1048 } 1048 return trans;
1049 case VCVT_VOBJECT: 1049}
1050 appendcOFile(fp,'\n'); 1050
1051 writeVObject_(fp,VOBJECT_VALUE_OF(o)); 1051static void writeQPString(OFile *fp, const char *s)
1052 break; 1052{
1053 } 1053 /*
1054} 1054 only A-Z, 0-9 and
1055 1055 "'" (ASCII code 39)
1056static void writeAttrValue(OFile *fp, VObject *o) 1056 "(" (ASCII code 40)
1057{ 1057 ")" (ASCII code 41)
1058 if (NAME_OF(o)) { 1058 "+" (ASCII code 43)
1059 struct PreDefProp *pi; 1059 "," (ASCII code 44)
1060 pi = lookupPropInfo(NAME_OF(o)); 1060 "-" (ASCII code 45)
1061 if (pi && ((pi->flags & PD_INTERNAL) != 0)) return; 1061 "/" (ASCII code 47)
1062 appendcOFile(fp,';'); 1062 "?" (ASCII code 63)
1063 appendsOFile(fp,NAME_OF(o)); 1063
1064 } 1064 should remain un-encoded.
1065 else 1065 '=' needs to be encoded as it is the escape character.
1066 appendcOFile(fp,';'); 1066 ';' needs to be as it is a field separator.
1067 if (VALUE_TYPE(o)) { 1067
1068 appendcOFile(fp,'='); 1068 */
1069 writeValue(fp,o,0); 1069 const char *p = s;
1070 } 1070 while (*p) {
1071} 1071 const char *rep = replaceChar(*p);
1072 1072 if (rep)
1073static void writeGroup(OFile *fp, VObject *o) 1073 appendsOFile(fp, rep);
1074{ 1074 else
1075 char buf1[256]; 1075 appendcOFile(fp, *p);
1076 char buf2[256]; 1076 p++;
1077 strcpy(buf1,NAME_OF(o)); 1077 }
1078 while ((o=isAPropertyOf(o,VCGroupingProp)) != 0) { 1078}
1079 strcpy(buf2,STRINGZ_VALUE_OF(o)); 1079
1080 strcat(buf2,"."); 1080static bool includesUnprintable(VObject *o)
1081 strcat(buf2,buf1); 1081{
1082 strcpy(buf1,buf2); 1082 if (o) {
1083 } 1083 if (VALUE_TYPE(o) == VCVT_STRINGZ) {
1084 appendsOFile(fp,buf1); 1084 const char *p = STRINGZ_VALUE_OF(o);
1085} 1085 if (p) {
1086 1086 while (*p) {
1087static int inList(const char **list, const char *s) 1087 if (replaceChar(*p))
1088{ 1088 return TRUE;
1089 if (list == 0) return 0; 1089 p++;
1090 while (*list) { 1090 }
1091 if (qstricmp(*list,s) == 0) return 1; 1091 }
1092 list++; 1092 }
1093 } 1093 }
1094 return 0; 1094 return FALSE;
1095} 1095}
1096 1096
1097static void writeProp(OFile *fp, VObject *o) 1097static void writeVObject_(OFile *fp, VObject *o);
1098{ 1098
1099 if (NAME_OF(o)) { 1099static void writeValue(OFile *fp, VObject *o, unsigned long size)
1100 struct PreDefProp *pi; 1100{
1101 VObjectIterator t; 1101 if (o == 0) return;
1102 const char **fields_ = 0; 1102 switch (VALUE_TYPE(o)) {
1103 pi = lookupPropInfo(NAME_OF(o)); 1103 case VCVT_STRINGZ: {
1104 if (pi && ((pi->flags & PD_BEGIN) != 0)) { 1104 writeQPString(fp, STRINGZ_VALUE_OF(o));
1105 writeVObject_(fp,o); 1105 break;
1106 return; 1106 }
1107 } 1107 case VCVT_UINT: {
1108 if (isAPropertyOf(o,VCGroupingProp)) 1108 char buf[16];
1109 writeGroup(fp,o); 1109 sprintf(buf,"%u", INTEGER_VALUE_OF(o));
1110 else 1110 appendsOFile(fp,buf);
1111 appendsOFile(fp,NAME_OF(o)); 1111 break;
1112 if (pi) fields_ = pi->fields; 1112 }
1113 initPropIterator(&t,o); 1113 case VCVT_ULONG: {
1114 while (moreIteration(&t)) { 1114 char buf[16];
1115 const char *s; 1115 sprintf(buf,"%lu", LONG_VALUE_OF(o));
1116 VObject *eachProp = nextVObject(&t); 1116 appendsOFile(fp,buf);
1117 s = NAME_OF(eachProp); 1117 break;
1118 if (qstricmp(VCGroupingProp,s) && !inList(fields_,s)) 1118 }
1119 writeAttrValue(fp,eachProp); 1119 case VCVT_RAW: {
1120 } 1120 appendcOFile(fp,'\n');
1121 if (fields_) { 1121 writeBase64(fp,(unsigned char*)(ANY_VALUE_OF(o)),size);
1122 int i = 0, n = 0; 1122 break;
1123 const char** fields = fields_; 1123 }
1124 /* output prop as fields */ 1124 case VCVT_VOBJECT:
1125 appendcOFile(fp,':'); 1125 appendcOFile(fp,'\n');
1126 while (*fields) { 1126 writeVObject_(fp,VOBJECT_VALUE_OF(o));
1127 VObject *t = isAPropertyOf(o,*fields); 1127 break;
1128 i++; 1128 }
1129 if (t) n = i; 1129}
1130 fields++; 1130
1131 } 1131static void writeAttrValue(OFile *fp, VObject *o)
1132 fields = fields_; 1132{
1133 for (i=0;i<n;i++) { 1133 if (NAME_OF(o)) {
1134 writeValue(fp,isAPropertyOf(o,*fields),0); 1134 struct PreDefProp *pi;
1135 fields++; 1135 pi = lookupPropInfo(NAME_OF(o));
1136 if (i<(n-1)) appendcOFile(fp,';'); 1136 if (pi && ((pi->flags & PD_INTERNAL) != 0)) return;
1137 } 1137 if ( includesUnprintable(o) ) {
1138 } 1138 appendsOFile(fp, ";" VCEncodingProp "=" VCQuotedPrintableProp);
1139 } 1139 appendsOFile(fp, ";" VCCharSetProp "=" "UTF-8");
1140 1140 }
1141 if (VALUE_TYPE(o)) { 1141 appendcOFile(fp,';');
1142 unsigned long size = 0; 1142 appendsOFile(fp,NAME_OF(o));
1143 VObject *p = isAPropertyOf(o,VCDataSizeProp); 1143 }
1144 if (p) size = LONG_VALUE_OF(p); 1144 else
1145 appendcOFile(fp,':'); 1145 appendcOFile(fp,';');
1146 writeValue(fp,o,size); 1146 if (VALUE_TYPE(o)) {
1147 } 1147 appendcOFile(fp,'=');
1148 1148 writeValue(fp,o,0);
1149 appendcOFile(fp,'\n'); 1149 }
1150} 1150}
1151 1151
1152static void writeVObject_(OFile *fp, VObject *o) 1152static void writeGroup(OFile *fp, VObject *o)
1153{ 1153{
1154 if (NAME_OF(o)) { 1154 char buf1[256];
1155 struct PreDefProp *pi; 1155 char buf2[256];
1156 pi = lookupPropInfo(NAME_OF(o)); 1156 strcpy(buf1,NAME_OF(o));
1157 1157 while ((o=isAPropertyOf(o,VCGroupingProp)) != 0) {
1158 if (pi && ((pi->flags & PD_BEGIN) != 0)) { 1158 strcpy(buf2,STRINGZ_VALUE_OF(o));
1159 VObjectIterator t; 1159 strcat(buf2,".");
1160 const char *begin = NAME_OF(o); 1160 strcat(buf2,buf1);
1161 appendsOFile(fp,"BEGIN:"); 1161 strcpy(buf1,buf2);
1162 appendsOFile(fp,begin); 1162 }
1163 appendcOFile(fp,'\n'); 1163 appendsOFile(fp,buf1);
1164 initPropIterator(&t,o); 1164}
1165 while (moreIteration(&t)) { 1165
1166 VObject *eachProp = nextVObject(&t); 1166static int inList(const char **list, const char *s)
1167 writeProp(fp, eachProp); 1167{
1168 } 1168 if (list == 0) return 0;
1169 appendsOFile(fp,"END:"); 1169 while (*list) {
1170 appendsOFile(fp,begin); 1170 if (qstricmp(*list,s) == 0) return 1;
1171 appendsOFile(fp,"\n\n"); 1171 list++;
1172 } 1172 }
1173 } 1173 return 0;
1174} 1174}
1175 1175
1176void writeVObject(FILE *fp, VObject *o) 1176static void writeProp(OFile *fp, VObject *o)
1177{ 1177{
1178 OFile ofp; 1178 if (NAME_OF(o)) {
1179 // ##### 1179 struct PreDefProp *pi;
1180 //_setmode(_fileno(fp), _O_BINARY); 1180 VObjectIterator t;
1181 initOFile(&ofp,fp); 1181 const char **fields_ = 0;
1182 writeVObject_(&ofp,o); 1182 pi = lookupPropInfo(NAME_OF(o));
1183} 1183 if (pi && ((pi->flags & PD_BEGIN) != 0)) {
1184 1184 writeVObject_(fp,o);
1185DLLEXPORT(void) writeVObjectToFile(char *fname, VObject *o) 1185 return;
1186{ 1186 }
1187 QFileDirect f( fname); 1187 if (isAPropertyOf(o,VCGroupingProp))
1188 if ( !f.open( IO_WriteOnly ) ) { 1188 writeGroup(fp,o);
1189 qWarning("Unable to open vobject write %s", fname); 1189 else
1190 return; 1190 appendsOFile(fp,NAME_OF(o));
1191 } 1191 if (pi) fields_ = pi->fields;
1192 1192 initPropIterator(&t,o);
1193 writeVObject( f.directHandle(),o ); 1193 while (moreIteration(&t)) {
1194} 1194 const char *s;
1195 1195 VObject *eachProp = nextVObject(&t);
1196DLLEXPORT(void) writeVObjectsToFile(char *fname, VObject *list) 1196 s = NAME_OF(eachProp);
1197{ 1197 if (qstricmp(VCGroupingProp,s) && !inList(fields_,s))
1198 QFileDirect f( fname); 1198 writeAttrValue(fp,eachProp);
1199 if ( !f.open( IO_WriteOnly ) ) { 1199 }
1200 qWarning("Unable to open vobject write %s", fname); 1200 if (fields_) {
1201 return; 1201 int i = 0, n = 0;
1202 } 1202 const char** fields = fields_;
1203 1203 /* output prop as fields */
1204 while (list) { 1204 bool printable = TRUE;
1205 writeVObject(f.directHandle(),list); 1205 while (*fields && printable) {
1206 list = nextVObjectInList(list); 1206 VObject *t = isAPropertyOf(o,*fields);
1207 } 1207 if (includesUnprintable(t))
1208} 1208 printable = FALSE;
1209 1209 fields++;
1210DLLEXPORT(const char *) vObjectTypeInfo(VObject *o) 1210 }
1211{ 1211 fields = fields_;
1212 const char *type = vObjectName( o ); 1212 if (!printable) {
1213 if ( strcmp( type, "TYPE" ) == 0 ) 1213 appendsOFile(fp, ";" VCEncodingProp "=" VCQuotedPrintableProp);
1214 type = vObjectStringZValue( o ); 1214 appendsOFile(fp, ";" VCCharSetProp "=" "UTF-8");
1215 return type; 1215 }
1216} 1216 appendcOFile(fp,':');
1217 1217 while (*fields) {
1218 1218 VObject *t = isAPropertyOf(o,*fields);
1219// end of source file vobject.c 1219 i++;
1220 if (t) n = i;
1221 fields++;
1222 }
1223 fields = fields_;
1224 for (i=0;i<n;i++) {
1225 writeValue(fp,isAPropertyOf(o,*fields),0);
1226 fields++;
1227 if (i<(n-1)) appendcOFile(fp,';');
1228 }
1229 }
1230 }
1231
1232
1233 if (VALUE_TYPE(o)) {
1234 if ( includesUnprintable(o) ) {
1235 appendsOFile(fp, ";" VCEncodingProp "=" VCQuotedPrintableProp);
1236 appendsOFile(fp, ";" VCCharSetProp "=" "UTF-8");
1237 }
1238 unsigned long size = 0;
1239 VObject *p = isAPropertyOf(o,VCDataSizeProp);
1240 if (p) size = LONG_VALUE_OF(p);
1241 appendcOFile(fp,':');
1242 writeValue(fp,o,size);
1243 }
1244
1245 appendcOFile(fp,'\n');
1246}
1247
1248static void writeVObject_(OFile *fp, VObject *o)
1249{
1250 if (NAME_OF(o)) {
1251 struct PreDefProp *pi;
1252 pi = lookupPropInfo(NAME_OF(o));
1253
1254 if (pi && ((pi->flags & PD_BEGIN) != 0)) {
1255 VObjectIterator t;
1256 const char *begin = NAME_OF(o);
1257 appendsOFile(fp,"BEGIN:");
1258 appendsOFile(fp,begin);
1259 appendcOFile(fp,'\n');
1260 initPropIterator(&t,o);
1261 while (moreIteration(&t)) {
1262 VObject *eachProp = nextVObject(&t);
1263 writeProp(fp, eachProp);
1264 }
1265 appendsOFile(fp,"END:");
1266 appendsOFile(fp,begin);
1267 appendsOFile(fp,"\n\n");
1268 }
1269 }
1270}
1271
1272void writeVObject(FILE *fp, VObject *o)
1273{
1274 OFile ofp;
1275 // #####
1276 //_setmode(_fileno(fp), _O_BINARY);
1277 initOFile(&ofp,fp);
1278 writeVObject_(&ofp,o);
1279}
1280
1281DLLEXPORT(void) writeVObjectToFile(char *fname, VObject *o)
1282{
1283 QFileDirect f( fname);
1284 if ( !f.open( IO_WriteOnly ) ) {
1285 qWarning("Unable to open vobject write %s", fname);
1286 return;
1287 }
1288
1289 writeVObject( f.directHandle(),o );
1290}
1291
1292DLLEXPORT(void) writeVObjectsToFile(char *fname, VObject *list)
1293{
1294 QFileDirect f( fname);
1295 if ( !f.open( IO_WriteOnly ) ) {
1296 qWarning("Unable to open vobject write %s", fname);
1297 return;
1298 }
1299
1300 while (list) {
1301 writeVObject(f.directHandle(),list);
1302 list = nextVObjectInList(list);
1303 }
1304}
1305
1306DLLEXPORT(const char *) vObjectTypeInfo(VObject *o)
1307{
1308 const char *type = vObjectName( o );
1309 if ( strcmp( type, "TYPE" ) == 0 )
1310 type = vObjectStringZValue( o );
1311 return type;
1312}
1313
1314
1315// end of source file vobject.c
diff --git a/library/backend/vobject_p.h b/library/backend/vobject_p.h
index a0d921e..0d0a2a8 100644
--- a/library/backend/vobject_p.h
+++ b/library/backend/vobject_p.h
@@ -1,404 +1,406 @@
1/*************************************************************************** 1/***************************************************************************
2(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International 2(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
3Business Machines Corporation and Siemens Rolm Communications Inc. 3Business Machines Corporation and Siemens Rolm Communications Inc.
4 4
5For purposes of this license notice, the term Licensors shall mean, 5For purposes of this license notice, the term Licensors shall mean,
6collectively, Apple Computer, Inc., AT&T Corp., International 6collectively, Apple Computer, Inc., AT&T Corp., International
7Business Machines Corporation and Siemens Rolm Communications Inc. 7Business Machines Corporation and Siemens Rolm Communications Inc.
8The term Licensor shall mean any of the Licensors. 8The term Licensor shall mean any of the Licensors.
9 9
10Subject to acceptance of the following conditions, permission is hereby 10Subject to acceptance of the following conditions, permission is hereby
11granted by Licensors without the need for written agreement and without 11granted by Licensors without the need for written agreement and without
12license or royalty fees, to use, copy, modify and distribute this 12license or royalty fees, to use, copy, modify and distribute this
13software for any purpose. 13software for any purpose.
14 14
15The above copyright notice and the following four paragraphs must be 15The above copyright notice and the following four paragraphs must be
16reproduced in all copies of this software and any software including 16reproduced in all copies of this software and any software including
17this software. 17this software.
18 18
19THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE 19THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE
20ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR 20ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR
21MODIFICATIONS. 21MODIFICATIONS.
22 22
23IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT, 23IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,
24INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT 24INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
25OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 25OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
26DAMAGE. 26DAMAGE.
27 27
28EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, 28EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,
29INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE 29INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE
30IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 30IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
31PURPOSE. 31PURPOSE.
32 32
33The software is provided with RESTRICTED RIGHTS. Use, duplication, or 33The software is provided with RESTRICTED RIGHTS. Use, duplication, or
34disclosure by the government are subject to restrictions set forth in 34disclosure by the government are subject to restrictions set forth in
35DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable. 35DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
36 36
37***************************************************************************/ 37***************************************************************************/
38 38
39/* 39/*
40 40
41The vCard/vCalendar C interface is implemented in the set 41The vCard/vCalendar C interface is implemented in the set
42of files as follows: 42of files as follows:
43 43
44vcc.y, yacc source, and vcc.c, the yacc output you will use 44vcc.y, yacc source, and vcc.c, the yacc output you will use
45implements the core parser 45implements the core parser
46 46
47vobject.c implements an API that insulates the caller from 47vobject.c implements an API that insulates the caller from
48the parser and changes in the vCard/vCalendar BNF 48the parser and changes in the vCard/vCalendar BNF
49 49
50port.h defines compilation environment dependent stuff 50port.h defines compilation environment dependent stuff
51 51
52vcc.h and vobject.h are header files for their .c counterparts 52vcc.h and vobject.h are header files for their .c counterparts
53 53
54vcaltmp.h and vcaltmp.c implement vCalendar "macro" functions 54vcaltmp.h and vcaltmp.c implement vCalendar "macro" functions
55which you may find useful. 55which you may find useful.
56 56
57test.c is a standalone test driver that exercises some of 57test.c is a standalone test driver that exercises some of
58the features of the APIs provided. Invoke test.exe on a 58the features of the APIs provided. Invoke test.exe on a
59VCARD/VCALENDAR input text file and you will see the pretty 59VCARD/VCALENDAR input text file and you will see the pretty
60print output of the internal representation (this pretty print 60print output of the internal representation (this pretty print
61output should give you a good idea of how the internal 61output should give you a good idea of how the internal
62representation looks like -- there is one such output in the 62representation looks like -- there is one such output in the
63following too). Also, a file with the .out suffix is generated 63following too). Also, a file with the .out suffix is generated
64to show that the internal representation can be written back 64to show that the internal representation can be written back
65in the original text format. 65in the original text format.
66 66
67For more information on this API see the readme.txt file 67For more information on this API see the readme.txt file
68which accompanied this distribution. 68which accompanied this distribution.
69 69
70 Also visit: 70 Also visit:
71 71
72 http://www.versit.com 72 http://www.versit.com
73 http://www.ralden.com 73 http://www.ralden.com
74 74
75*/ 75*/
76 76
77 77// No tr() anywhere in this file
78#ifndef __VOBJECT_H__ 78
79#define __VOBJECT_H__ 1 79
80 80#ifndef __VOBJECT_H__
81#include <qstring.h> 81#define __VOBJECT_H__ 1
82 82
83 #define vCardClipboardFormat "+//ISBN 1-887687-00-9::versit::PDI//vCard" 83#include <qstring.h>
84 #define vCalendarClipboardFormat"+//ISBN 1-887687-00-9::versit::PDI//vCalendar" 84
85 85 #define vCardClipboardFormat "+//ISBN 1-887687-00-9::versit::PDI//vCard"
86/* The above strings vCardClipboardFormat and vCalendarClipboardFormat 86 #define vCalendarClipboardFormat"+//ISBN 1-887687-00-9::versit::PDI//vCalendar"
87are globally unique IDs which can be used to generate clipboard format 87
88ID's as per the requirements of a specific platform. For example, in 88/* The above strings vCardClipboardFormat and vCalendarClipboardFormat
89Windows they are used as the parameter in a call to RegisterClipboardFormat. 89are globally unique IDs which can be used to generate clipboard format
90For example: 90ID's as per the requirements of a specific platform. For example, in
91 91Windows they are used as the parameter in a call to RegisterClipboardFormat.
92 CLIPFORMAT foo = RegisterClipboardFormat(vCardClipboardFormat); 92For example:
93 93
94*/ 94 CLIPFORMAT foo = RegisterClipboardFormat(vCardClipboardFormat);
95 95
96 #define vCardMimeType "text/x-vCard" 96*/
97 #define vCalendarMimeType"text/x-vCalendar" 97
98 98 #define vCardMimeType "text/x-vCard"
99#undef DLLEXPORT 99 #define vCalendarMimeType"text/x-vCalendar"
100#include <qglobal.h> 100
101#if defined(Q_WS_WIN) 101#undef DLLEXPORT
102#define DLLEXPORT(t) __declspec(dllexport) t 102#include <qglobal.h>
103#else 103#if defined(Q_WS_WIN)
104#define DLLEXPORT(t) t 104#define DLLEXPORT(t) __declspec(dllexport) t
105#endif 105#else
106 106#define DLLEXPORT(t) t
107#ifndef FALSE 107#endif
108 #define FALSE0 108
109#endif 109#ifndef FALSE
110#ifndef TRUE 110 #define FALSE0
111 #define TRUE1 111#endif
112#endif 112#ifndef TRUE
113 113 #define TRUE1
114#include <stdlib.h> 114#endif
115#include <stdio.h> 115
116 116#include <stdlib.h>
117 117#include <stdio.h>
118 #define VC7bitProp "7BIT" 118
119 #define VC8bitProp "8BIT" 119
120 #define VCAAlarmProp "AALARM" 120 #define VC7bitProp "7BIT"
121 #define VCAdditionalNamesProp"ADDN" 121 #define VC8bitProp "8BIT"
122 #define VCAdrProp "ADR" 122 #define VCAAlarmProp "AALARM"
123 #define VCAgentProp "AGENT" 123 #define VCAdditionalNamesProp"ADDN"
124 #define VCAIFFProp "AIFF" 124 #define VCAdrProp "ADR"
125 #define VCAOLProp "AOL" 125 #define VCAgentProp "AGENT"
126 #define VCAppleLinkProp "APPLELINK" 126 #define VCAIFFProp "AIFF"
127 #define VCAttachProp "ATTACH" 127 #define VCAOLProp "AOL"
128 #define VCAttendeeProp "ATTENDEE" 128 #define VCAppleLinkProp "APPLELINK"
129 #define VCATTMailProp "ATTMAIL" 129 #define VCAttachProp "ATTACH"
130 #define VCAudioContentProp "AUDIOCONTENT" 130 #define VCAttendeeProp "ATTENDEE"
131 #define VCAVIProp "AVI" 131 #define VCATTMailProp "ATTMAIL"
132 #define VCBase64Prop "BASE64" 132 #define VCAudioContentProp "AUDIOCONTENT"
133 #define VCBBSProp "BBS" 133 #define VCAVIProp "AVI"
134 #define VCBirthDateProp "BDAY" 134 #define VCBase64Prop "BASE64"
135 #define VCBMPProp "BMP" 135 #define VCBBSProp "BBS"
136 #define VCBodyProp "BODY" 136 #define VCBirthDateProp "BDAY"
137 #define VCBusinessRoleProp "ROLE" 137 #define VCBMPProp "BMP"
138 #define VCCalProp "VCALENDAR" 138 #define VCBodyProp "BODY"
139 #define VCCaptionProp "CAP" 139 #define VCBusinessRoleProp "ROLE"
140 #define VCCardProp "VCARD" 140 #define VCCalProp "VCALENDAR"
141 #define VCCarProp "CAR" 141 #define VCCaptionProp "CAP"
142 #define VCCategoriesProp "CATEGORIES" 142 #define VCCardProp "VCARD"
143 #define VCCellularProp "CELL" 143 #define VCCarProp "CAR"
144 #define VCCGMProp "CGM" 144 #define VCCategoriesProp "CATEGORIES"
145 #define VCCharSetProp "CS" 145 #define VCCellularProp "CELL"
146 #define VCCIDProp "CID" 146 #define VCCGMProp "CGM"
147 #define VCCISProp "CIS" 147 #define VCCharSetProp "CHARSET"
148 #define VCCityProp "L" 148 #define VCCIDProp "CID"
149 #define VCClassProp "CLASS" 149 #define VCCISProp "CIS"
150 #define VCCommentProp "NOTE" 150 #define VCCityProp "L"
151 #define VCCompletedProp "COMPLETED" 151 #define VCClassProp "CLASS"
152 #define VCContentIDProp "CONTENT-ID" 152 #define VCCommentProp "NOTE"
153 #define VCCountryNameProp "C" 153 #define VCCompletedProp "COMPLETED"
154 #define VCDAlarmProp "DALARM" 154 #define VCContentIDProp "CONTENT-ID"
155 #define VCDataSizeProp "DATASIZE" 155 #define VCCountryNameProp "C"
156 #define VCDayLightProp "DAYLIGHT" 156 #define VCDAlarmProp "DALARM"
157 #define VCDCreatedProp "DCREATED" 157 #define VCDataSizeProp "DATASIZE"
158#define VCDeliveryLabelProp "LABEL" 158 #define VCDayLightProp "DAYLIGHT"
159 #define VCDescriptionProp "DESCRIPTION" 159 #define VCDCreatedProp "DCREATED"
160 #define VCDIBProp "DIB" 160#define VCDeliveryLabelProp "LABEL"
161 #define VCDisplayStringProp "DISPLAYSTRING" 161 #define VCDescriptionProp "DESCRIPTION"
162 #define VCDomesticProp "DOM" 162 #define VCDIBProp "DIB"
163 #define VCDTendProp "DTEND" 163 #define VCDisplayStringProp "DISPLAYSTRING"
164 #define VCDTstartProp "DTSTART" 164 #define VCDomesticProp "DOM"
165 #define VCDueProp "DUE" 165 #define VCDTendProp "DTEND"
166 #define VCEmailAddressProp "EMAIL" 166 #define VCDTstartProp "DTSTART"
167 #define VCEncodingProp "ENCODING" 167 #define VCDueProp "DUE"
168 #define VCEndProp "END" 168 #define VCEmailAddressProp "EMAIL"
169 #define VCEventProp "VEVENT" 169 #define VCEncodingProp "ENCODING"
170 #define VCEWorldProp "EWORLD" 170 #define VCEndProp "END"
171 #define VCExNumProp "EXNUM" 171 #define VCEventProp "VEVENT"
172 #define VCExpDateProp "EXDATE" 172 #define VCEWorldProp "EWORLD"
173 #define VCExpectProp "EXPECT" 173 #define VCExNumProp "EXNUM"
174 #define VCExtAddressProp "EXT ADD" 174 #define VCExpDateProp "EXDATE"
175 #define VCFamilyNameProp "F" 175 #define VCExpectProp "EXPECT"
176 #define VCFaxProp "FAX" 176 #define VCExtAddressProp "EXT ADD"
177 #define VCFullNameProp "FN" 177 #define VCFamilyNameProp "F"
178 #define VCGeoProp "GEO" 178 #define VCFaxProp "FAX"
179 #define VCGeoLocationProp "GEO" 179 #define VCFullNameProp "FN"
180 #define VCGIFProp "GIF" 180 #define VCGeoProp "GEO"
181 #define VCGivenNameProp "G" 181 #define VCGeoLocationProp "GEO"
182 #define VCGroupingProp "Grouping" 182 #define VCGIFProp "GIF"
183 #define VCHomeProp "HOME" 183 #define VCGivenNameProp "G"
184 #define VCIBMMailProp "IBMMail" 184 #define VCGroupingProp "Grouping"
185 #define VCInlineProp "INLINE" 185 #define VCHomeProp "HOME"
186 #define VCInternationalProp "INTL" 186 #define VCIBMMailProp "IBMMail"
187 #define VCInternetProp "INTERNET" 187 #define VCInlineProp "INLINE"
188 #define VCISDNProp "ISDN" 188 #define VCInternationalProp "INTL"
189 #define VCJPEGProp "JPEG" 189 #define VCInternetProp "INTERNET"
190 #define VCLanguageProp "LANG" 190 #define VCISDNProp "ISDN"
191 #define VCLastModifiedProp "LAST-MODIFIED" 191 #define VCJPEGProp "JPEG"
192 #define VCLastRevisedProp "REV" 192 #define VCLanguageProp "LANG"
193 #define VCLocationProp "LOCATION" 193 #define VCLastModifiedProp "LAST-MODIFIED"
194 #define VCLogoProp "LOGO" 194 #define VCLastRevisedProp "REV"
195 #define VCMailerProp "MAILER" 195 #define VCLocationProp "LOCATION"
196 #define VCMAlarmProp "MALARM" 196 #define VCLogoProp "LOGO"
197 #define VCMCIMailProp "MCIMAIL" 197 #define VCMailerProp "MAILER"
198 #define VCMessageProp "MSG" 198 #define VCMAlarmProp "MALARM"
199 #define VCMETProp "MET" 199 #define VCMCIMailProp "MCIMAIL"
200 #define VCModemProp "MODEM" 200 #define VCMessageProp "MSG"
201 #define VCMPEG2Prop "MPEG2" 201 #define VCMETProp "MET"
202 #define VCMPEGProp "MPEG" 202 #define VCModemProp "MODEM"
203 #define VCMSNProp "MSN" 203 #define VCMPEG2Prop "MPEG2"
204 #define VCNamePrefixesProp "NPRE" 204 #define VCMPEGProp "MPEG"
205 #define VCNameProp "N" 205 #define VCMSNProp "MSN"
206 #define VCNameSuffixesProp "NSUF" 206 #define VCNamePrefixesProp "NPRE"
207 #define VCNoteProp "NOTE" 207 #define VCNameProp "N"
208 #define VCOrgNameProp "ORGNAME" 208 #define VCNameSuffixesProp "NSUF"
209 #define VCOrgProp "ORG" 209 #define VCNoteProp "NOTE"
210 #define VCOrgUnit2Prop "OUN2" 210 #define VCOrgNameProp "ORGNAME"
211 #define VCOrgUnit3Prop "OUN3" 211 #define VCOrgProp "ORG"
212 #define VCOrgUnit4Prop "OUN4" 212 #define VCOrgUnit2Prop "OUN2"
213 #define VCOrgUnitProp "OUN" 213 #define VCOrgUnit3Prop "OUN3"
214 #define VCPagerProp "PAGER" 214 #define VCOrgUnit4Prop "OUN4"
215 #define VCPAlarmProp "PALARM" 215 #define VCOrgUnitProp "OUN"
216 #define VCParcelProp "PARCEL" 216 #define VCPagerProp "PAGER"
217 #define VCPartProp "PART" 217 #define VCPAlarmProp "PALARM"
218 #define VCPCMProp "PCM" 218 #define VCParcelProp "PARCEL"
219 #define VCPDFProp "PDF" 219 #define VCPartProp "PART"
220 #define VCPGPProp "PGP" 220 #define VCPCMProp "PCM"
221 #define VCPhotoProp "PHOTO" 221 #define VCPDFProp "PDF"
222 #define VCPICTProp "PICT" 222 #define VCPGPProp "PGP"
223 #define VCPMBProp "PMB" 223 #define VCPhotoProp "PHOTO"
224 #define VCPostalBoxProp "BOX" 224 #define VCPICTProp "PICT"
225 #define VCPostalCodeProp "PC" 225 #define VCPMBProp "PMB"
226 #define VCPostalProp "POSTAL" 226 #define VCPostalBoxProp "BOX"
227 #define VCPowerShareProp "POWERSHARE" 227 #define VCPostalCodeProp "PC"
228 #define VCPreferredProp "PREF" 228 #define VCPostalProp "POSTAL"
229 #define VCPriorityProp "PRIORITY" 229 #define VCPowerShareProp "POWERSHARE"
230 #define VCProcedureNameProp "PROCEDURENAME" 230 #define VCPreferredProp "PREF"
231 #define VCProdIdProp "PRODID" 231 #define VCPriorityProp "PRIORITY"
232 #define VCProdigyProp "PRODIGY" 232 #define VCProcedureNameProp "PROCEDURENAME"
233 #define VCPronunciationProp "SOUND" 233 #define VCProdIdProp "PRODID"
234 #define VCPSProp "PS" 234 #define VCProdigyProp "PRODIGY"
235 #define VCPublicKeyProp "KEY" 235 #define VCPronunciationProp "SOUND"
236 #define VCQPProp "QP" 236 #define VCPSProp "PS"
237 #define VCQuickTimeProp "QTIME" 237 #define VCPublicKeyProp "KEY"
238 #define VCQuotedPrintableProp"QUOTED-PRINTABLE" 238 #define VCQPProp "QP"
239 #define VCRDateProp "RDATE" 239 #define VCQuickTimeProp "QTIME"
240 #define VCRegionProp "R" 240 #define VCQuotedPrintableProp"QUOTED-PRINTABLE"
241 #define VCRelatedToProp "RELATED-TO" 241 #define VCRDateProp "RDATE"
242 #define VCRepeatCountProp "REPEATCOUNT" 242 #define VCRegionProp "R"
243 #define VCResourcesProp "RESOURCES" 243 #define VCRelatedToProp "RELATED-TO"
244 #define VCRNumProp "RNUM" 244 #define VCRepeatCountProp "REPEATCOUNT"
245 #define VCRoleProp "ROLE" 245 #define VCResourcesProp "RESOURCES"
246 #define VCRRuleProp "RRULE" 246 #define VCRNumProp "RNUM"
247 #define VCRSVPProp "RSVP" 247 #define VCRoleProp "ROLE"
248 #define VCRunTimeProp "RUNTIME" 248 #define VCRRuleProp "RRULE"
249 #define VCSequenceProp "SEQUENCE" 249 #define VCRSVPProp "RSVP"
250 #define VCSnoozeTimeProp "SNOOZETIME" 250 #define VCRunTimeProp "RUNTIME"
251 #define VCStartProp "START" 251 #define VCSequenceProp "SEQUENCE"
252 #define VCStatusProp "STATUS" 252 #define VCSnoozeTimeProp "SNOOZETIME"
253 #define VCStreetAddressProp "STREET" 253 #define VCStartProp "START"
254 #define VCSubTypeProp "SUBTYPE" 254 #define VCStatusProp "STATUS"
255 #define VCSummaryProp "SUMMARY" 255 #define VCStreetAddressProp "STREET"
256 #define VCTelephoneProp "TEL" 256 #define VCSubTypeProp "SUBTYPE"
257 #define VCTIFFProp "TIFF" 257 #define VCSummaryProp "SUMMARY"
258 #define VCTimeZoneProp "TZ" 258 #define VCTelephoneProp "TEL"
259 #define VCTitleProp "TITLE" 259 #define VCTIFFProp "TIFF"
260 #define VCTLXProp "TLX" 260 #define VCTimeZoneProp "TZ"
261 #define VCTodoProp "VTODO" 261 #define VCTitleProp "TITLE"
262 #define VCTranspProp "TRANSP" 262 #define VCTLXProp "TLX"
263 #define VCUniqueStringProp "UID" 263 #define VCTodoProp "VTODO"
264 #define VCURLProp "URL" 264 #define VCTranspProp "TRANSP"
265 #define VCURLValueProp "URLVAL" 265 #define VCUniqueStringProp "UID"
266 #define VCValueProp "VALUE" 266 #define VCURLProp "URL"
267 #define VCVersionProp "VERSION" 267 #define VCURLValueProp "URLVAL"
268 #define VCVideoProp "VIDEO" 268 #define VCValueProp "VALUE"
269 #define VCVoiceProp "VOICE" 269 #define VCVersionProp "VERSION"
270 #define VCWAVEProp "WAVE" 270 #define VCVideoProp "VIDEO"
271 #define VCWMFProp "WMF" 271 #define VCVoiceProp "VOICE"
272 #define VCWorkProp "WORK" 272 #define VCWAVEProp "WAVE"
273 #define VCX400Prop "X400" 273 #define VCWMFProp "WMF"
274 #define VCX509Prop "X509" 274 #define VCWorkProp "WORK"
275 #define VCXRuleProp "XRULE" 275 #define VCX400Prop "X400"
276 276 #define VCX509Prop "X509"
277 277 #define VCXRuleProp "XRULE"
278typedef struct VObject VObject; 278
279 279
280typedef struct VObjectIterator { 280typedef struct VObject VObject;
281 VObject* start; 281
282 VObject* next; 282typedef struct VObjectIterator {
283 } VObjectIterator; 283 VObject* start;
284 284 VObject* next;
285extern DLLEXPORT(VObject*) newVObject(const char *id); 285 } VObjectIterator;
286extern DLLEXPORT(void) deleteVObject(VObject *p); 286
287extern DLLEXPORT(char*) dupStr(const char *s, unsigned int size); 287extern DLLEXPORT(VObject*) newVObject(const char *id);
288extern DLLEXPORT(void) deleteStr(const char *p); 288extern DLLEXPORT(void) deleteVObject(VObject *p);
289extern DLLEXPORT(void) unUseStr(const char *s); 289extern DLLEXPORT(char*) dupStr(const char *s, unsigned int size);
290 290extern DLLEXPORT(void) deleteStr(const char *p);
291extern DLLEXPORT(void) setVObjectName(VObject *o, const char* id); 291extern DLLEXPORT(void) unUseStr(const char *s);
292extern DLLEXPORT(void) setVObjectStringZValue(VObject *o, const char *s); 292
293extern DLLEXPORT(void) setVObjectStringZValue_(VObject *o, const char *s); 293extern DLLEXPORT(void) setVObjectName(VObject *o, const char* id);
294extern DLLEXPORT(void) setVObjectIntegerValue(VObject *o, unsigned int i); 294extern DLLEXPORT(void) setVObjectStringZValue(VObject *o, const char *s);
295extern DLLEXPORT(void) setVObjectLongValue(VObject *o, unsigned long l); 295extern DLLEXPORT(void) setVObjectStringZValue_(VObject *o, const char *s);
296extern DLLEXPORT(void) setVObjectAnyValue(VObject *o, void *t); 296extern DLLEXPORT(void) setVObjectIntegerValue(VObject *o, unsigned int i);
297extern DLLEXPORT(VObject*) setValueWithSize(VObject *prop, void *val, unsigned int size); 297extern DLLEXPORT(void) setVObjectLongValue(VObject *o, unsigned long l);
298extern DLLEXPORT(VObject*) setValueWithSize_(VObject *prop, void *val, unsigned int size); 298extern DLLEXPORT(void) setVObjectAnyValue(VObject *o, void *t);
299 299extern DLLEXPORT(VObject*) setValueWithSize(VObject *prop, void *val, unsigned int size);
300extern DLLEXPORT(const char*) vObjectName(VObject *o); 300extern DLLEXPORT(VObject*) setValueWithSize_(VObject *prop, void *val, unsigned int size);
301extern DLLEXPORT(const char*) vObjectStringZValue(VObject *o); 301
302extern DLLEXPORT(unsigned int) vObjectIntegerValue(VObject *o); 302extern DLLEXPORT(const char*) vObjectName(VObject *o);
303extern DLLEXPORT(unsigned long) vObjectLongValue(VObject *o); 303extern DLLEXPORT(const char*) vObjectStringZValue(VObject *o);
304extern DLLEXPORT(void*) vObjectAnyValue(VObject *o); 304extern DLLEXPORT(unsigned int) vObjectIntegerValue(VObject *o);
305extern DLLEXPORT(VObject*) vObjectVObjectValue(VObject *o); 305extern DLLEXPORT(unsigned long) vObjectLongValue(VObject *o);
306extern DLLEXPORT(void) setVObjectVObjectValue(VObject *o, VObject *p); 306extern DLLEXPORT(void*) vObjectAnyValue(VObject *o);
307 307extern DLLEXPORT(VObject*) vObjectVObjectValue(VObject *o);
308extern DLLEXPORT(VObject*) addVObjectProp(VObject *o, VObject *p); 308extern DLLEXPORT(void) setVObjectVObjectValue(VObject *o, VObject *p);
309extern DLLEXPORT(VObject*) addProp(VObject *o, const char *id); 309
310extern DLLEXPORT(VObject*) addProp_(VObject *o, const char *id); 310extern DLLEXPORT(VObject*) addVObjectProp(VObject *o, VObject *p);
311extern DLLEXPORT(VObject*) addPropValue(VObject *o, const char *p, const char *v); 311extern DLLEXPORT(VObject*) addProp(VObject *o, const char *id);
312extern DLLEXPORT(VObject*) addPropSizedValue_(VObject *o, const char *p, const char *v, unsigned int size); 312extern DLLEXPORT(VObject*) addProp_(VObject *o, const char *id);
313extern DLLEXPORT(VObject*) addPropSizedValue(VObject *o, const char *p, const char *v, unsigned int size); 313extern DLLEXPORT(VObject*) addPropValue(VObject *o, const char *p, const char *v);
314extern DLLEXPORT(VObject*) addGroup(VObject *o, const char *g); 314extern DLLEXPORT(VObject*) addPropSizedValue_(VObject *o, const char *p, const char *v, unsigned int size);
315extern DLLEXPORT(void) addList(VObject **o, VObject *p); 315extern DLLEXPORT(VObject*) addPropSizedValue(VObject *o, const char *p, const char *v, unsigned int size);
316 316extern DLLEXPORT(VObject*) addGroup(VObject *o, const char *g);
317extern DLLEXPORT(VObject*) isAPropertyOf(VObject *o, const char *id); 317extern DLLEXPORT(void) addList(VObject **o, VObject *p);
318 318
319extern DLLEXPORT(VObject*) nextVObjectInList(VObject *o); 319extern DLLEXPORT(VObject*) isAPropertyOf(VObject *o, const char *id);
320extern DLLEXPORT(void) initPropIterator(VObjectIterator *i, VObject *o); 320
321extern DLLEXPORT(int) moreIteration(VObjectIterator *i); 321extern DLLEXPORT(VObject*) nextVObjectInList(VObject *o);
322extern DLLEXPORT(VObject*) nextVObject(VObjectIterator *i); 322extern DLLEXPORT(void) initPropIterator(VObjectIterator *i, VObject *o);
323 323extern DLLEXPORT(int) moreIteration(VObjectIterator *i);
324extern DLLEXPORT(const char*) lookupStr(const char *s); 324extern DLLEXPORT(VObject*) nextVObject(VObjectIterator *i);
325extern DLLEXPORT(void) cleanStrTbl(); 325
326 326extern DLLEXPORT(const char*) lookupStr(const char *s);
327extern DLLEXPORT(void) cleanVObject(VObject *o); 327extern DLLEXPORT(void) cleanStrTbl();
328extern DLLEXPORT(void) cleanVObjects(VObject *list); 328
329 329extern DLLEXPORT(void) cleanVObject(VObject *o);
330extern DLLEXPORT(const char*) lookupProp(const char* str); 330extern DLLEXPORT(void) cleanVObjects(VObject *list);
331extern DLLEXPORT(const char*) lookupProp_(const char* str); 331
332 332extern DLLEXPORT(const char*) lookupProp(const char* str);
333extern DLLEXPORT(void) writeVObjectToFile(char *fname, VObject *o); 333extern DLLEXPORT(const char*) lookupProp_(const char* str);
334extern DLLEXPORT(void) writeVObjectsToFile(char *fname, VObject *list); 334
335 335extern DLLEXPORT(void) writeVObjectToFile(char *fname, VObject *o);
336extern DLLEXPORT(int) vObjectValueType(VObject *o); 336extern DLLEXPORT(void) writeVObjectsToFile(char *fname, VObject *list);
337 337
338/* return type of vObjectValueType: */ 338extern DLLEXPORT(int) vObjectValueType(VObject *o);
339 #define VCVT_NOVALUE0 339
340 /* if the VObject has no value associated with it. */ 340/* return type of vObjectValueType: */
341 #define VCVT_STRINGZ1 341 #define VCVT_NOVALUE0
342 /* if the VObject has value set by setVObjectStringZValue. */ 342 /* if the VObject has no value associated with it. */
343 #define VCVT_UINT 2 343 #define VCVT_STRINGZ1
344 /* if the VObject has value set by setVObjectIntegerValue. */ 344 /* if the VObject has value set by setVObjectStringZValue. */
345 #define VCVT_ULONG 3 345 #define VCVT_UINT 2
346 /* if the VObject has value set by setVObjectLongValue. */ 346 /* if the VObject has value set by setVObjectIntegerValue. */
347 #define VCVT_RAW 4 347 #define VCVT_ULONG 3
348 /* if the VObject has value set by setVObjectAnyValue. */ 348 /* if the VObject has value set by setVObjectLongValue. */
349 #define VCVT_VOBJECT5 349 #define VCVT_RAW 4
350 /* if the VObject has value set by setVObjectVObjectValue. */ 350 /* if the VObject has value set by setVObjectAnyValue. */
351 351 #define VCVT_VOBJECT5
352extern const char** fieldedProp; 352 /* if the VObject has value set by setVObjectVObjectValue. */
353 353
354/*************************************************** 354extern const char** fieldedProp;
355 * The methods below are implemented in vcc.c (generated from vcc.y ) 355
356 ***************************************************/ 356/***************************************************
357 357 * The methods below are implemented in vcc.c (generated from vcc.y )
358/* NOTE regarding printVObject and writeVObject 358 ***************************************************/
359 359
360The functions below are not exported from the DLL because they 360/* NOTE regarding printVObject and writeVObject
361take a FILE* as a parameter, which cannot be passed across a DLL 361
362interface (at least that is my experience). Instead you can use 362The functions below are not exported from the DLL because they
363their companion functions which take file names or pointers 363take a FILE* as a parameter, which cannot be passed across a DLL
364to memory. However, if you are linking this code into 364interface (at least that is my experience). Instead you can use
365your build directly then you may find them a more convenient API 365their companion functions which take file names or pointers
366and you can go ahead and use them. If you try to use them with 366to memory. However, if you are linking this code into
367the DLL LIB you will get a link error. 367your build directly then you may find them a more convenient API
368*/ 368and you can go ahead and use them. If you try to use them with
369extern void writeVObject(FILE *fp, VObject *o); 369the DLL LIB you will get a link error.
370 370*/
371 371extern void writeVObject(FILE *fp, VObject *o);
372 372
373typedef void (*MimeErrorHandler)(char *); 373
374 374
375extern DLLEXPORT(void) registerMimeErrorHandler(MimeErrorHandler); 375typedef void (*MimeErrorHandler)(char *);
376 376
377extern DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len); 377extern DLLEXPORT(void) registerMimeErrorHandler(MimeErrorHandler);
378extern DLLEXPORT(VObject*) Parse_MIME_FromFileName(char* fname); 378
379 379extern DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len);
380 380extern DLLEXPORT(VObject*) Parse_MIME_FromFileName(char* fname);
381/* NOTE regarding Parse_MIME_FromFile 381
382The function above, Parse_MIME_FromFile, comes in two flavors, 382
383neither of which is exported from the DLL. Each version takes 383/* NOTE regarding Parse_MIME_FromFile
384a CFile or FILE* as a parameter, neither of which can be 384The function above, Parse_MIME_FromFile, comes in two flavors,
385passed across a DLL interface (at least that is my experience). 385neither of which is exported from the DLL. Each version takes
386If you are linking this code into your build directly then 386a CFile or FILE* as a parameter, neither of which can be
387you may find them a more convenient API that the other flavors 387passed across a DLL interface (at least that is my experience).
388that take a file name. If you use them with the DLL LIB you 388If you are linking this code into your build directly then
389will get a link error. 389you may find them a more convenient API that the other flavors
390*/ 390that take a file name. If you use them with the DLL LIB you
391 391will get a link error.
392 392*/
393#if INCLUDEMFC 393
394extern VObject* Parse_MIME_FromFile(CFile *file); 394
395#else 395#if INCLUDEMFC
396extern VObject* Parse_MIME_FromFile(FILE *file); 396extern VObject* Parse_MIME_FromFile(CFile *file);
397#endif 397#else
398 398extern VObject* Parse_MIME_FromFile(FILE *file);
399extern DLLEXPORT(const char *) vObjectTypeInfo(VObject *o); 399#endif
400 400
401 401extern DLLEXPORT(const char *) vObjectTypeInfo(VObject *o);
402#endif /* __VOBJECT_H__ */ 402
403 403
404 404#endif /* __VOBJECT_H__ */
405
406
diff --git a/library/categoryeditbase_p.ui b/library/categoryeditbase_p.ui
index a76e433..e192ae1 100644
--- a/library/categoryeditbase_p.ui
+++ b/library/categoryeditbase_p.ui
@@ -25,17 +25,17 @@
25 <name>name</name> 25 <name>name</name>
26 <cstring>CategoryEditBase</cstring> 26 <cstring>CategoryEditBase</cstring>
27 </property> 27 </property>
28 <property stdset="1"> 28 <property stdset="1">
29 <name>geometry</name> 29 <name>geometry</name>
30 <rect> 30 <rect>
31 <x>0</x> 31 <x>0</x>
32 <y>0</y> 32 <y>0</y>
33 <width>201</width> 33 <width>197</width>
34 <height>287</height> 34 <height>287</height>
35 </rect> 35 </rect>
36 </property> 36 </property>
37 <property stdset="1"> 37 <property stdset="1">
38 <name>caption</name> 38 <name>caption</name>
39 <string>Category Edit</string> 39 <string>Category Edit</string>
40 </property> 40 </property>
41 <property> 41 <property>
@@ -100,16 +100,20 @@
100 <name>pixmap</name> 100 <name>pixmap</name>
101 <pixmap></pixmap> 101 <pixmap></pixmap>
102 </property> 102 </property>
103 </item> 103 </item>
104 <property stdset="1"> 104 <property stdset="1">
105 <name>name</name> 105 <name>name</name>
106 <cstring>lvView</cstring> 106 <cstring>lvView</cstring>
107 </property> 107 </property>
108 <property>
109 <name>whatsThis</name>
110 <string>Check the categories this document belongs to.</string>
111 </property>
108 </widget> 112 </widget>
109 <widget> 113 <widget>
110 <class>QLayoutWidget</class> 114 <class>QLayoutWidget</class>
111 <property stdset="1"> 115 <property stdset="1">
112 <name>name</name> 116 <name>name</name>
113 <cstring>Layout2</cstring> 117 <cstring>Layout2</cstring>
114 </property> 118 </property>
115 <hbox> 119 <hbox>
@@ -122,31 +126,39 @@
122 <number>6</number> 126 <number>6</number>
123 </property> 127 </property>
124 <widget> 128 <widget>
125 <class>QLineEdit</class> 129 <class>QLineEdit</class>
126 <property stdset="1"> 130 <property stdset="1">
127 <name>name</name> 131 <name>name</name>
128 <cstring>txtCat</cstring> 132 <cstring>txtCat</cstring>
129 </property> 133 </property>
134 <property>
135 <name>whatsThis</name>
136 <string>Enter a new category here. Press &lt;b&gt;Add&lt;/b&gt; to add it to the list.</string>
137 </property>
130 </widget> 138 </widget>
131 <widget> 139 <widget>
132 <class>QToolButton</class> 140 <class>QToolButton</class>
133 <property stdset="1"> 141 <property stdset="1">
134 <name>name</name> 142 <name>name</name>
135 <cstring>cmdAdd</cstring> 143 <cstring>cmdAdd</cstring>
136 </property> 144 </property>
137 <property stdset="1"> 145 <property stdset="1">
138 <name>focusPolicy</name> 146 <name>focusPolicy</name>
139 <enum>TabFocus</enum> 147 <enum>TabFocus</enum>
140 </property> 148 </property>
141 <property stdset="1"> 149 <property stdset="1">
142 <name>text</name> 150 <name>text</name>
143 <string>Add</string> 151 <string>Add</string>
144 </property> 152 </property>
153 <property>
154 <name>whatsThis</name>
155 <string>Enter a new category to the left and press to add it to the list.</string>
156 </property>
145 </widget> 157 </widget>
146 <widget> 158 <widget>
147 <class>QToolButton</class> 159 <class>QToolButton</class>
148 <property stdset="1"> 160 <property stdset="1">
149 <name>name</name> 161 <name>name</name>
150 <cstring>cmdDel</cstring> 162 <cstring>cmdDel</cstring>
151 </property> 163 </property>
152 <property stdset="1"> 164 <property stdset="1">
@@ -156,27 +168,35 @@
156 <property stdset="1"> 168 <property stdset="1">
157 <name>text</name> 169 <name>text</name>
158 <string></string> 170 <string></string>
159 </property> 171 </property>
160 <property stdset="1"> 172 <property stdset="1">
161 <name>pixmap</name> 173 <name>pixmap</name>
162 <pixmap>image0</pixmap> 174 <pixmap>image0</pixmap>
163 </property> 175 </property>
176 <property>
177 <name>whatsThis</name>
178 <string>Press to delete the highlighted category.</string>
179 </property>
164 </widget> 180 </widget>
165 <widget> 181 <widget>
166 <class>QCheckBox</class> 182 <class>QCheckBox</class>
167 <property stdset="1"> 183 <property stdset="1">
168 <name>name</name> 184 <name>name</name>
169 <cstring>chkGlobal</cstring> 185 <cstring>chkGlobal</cstring>
170 </property> 186 </property>
171 <property stdset="1"> 187 <property stdset="1">
172 <name>text</name> 188 <name>text</name>
173 <string>Global</string> 189 <string>Global</string>
174 </property> 190 </property>
191 <property>
192 <name>whatsThis</name>
193 <string>Check to make this property available to all applications.</string>
194 </property>
175 </widget> 195 </widget>
176 </hbox> 196 </hbox>
177 </widget> 197 </widget>
178 </vbox> 198 </vbox>
179</widget> 199</widget>
180<images> 200<images>
181 <image> 201 <image>
182 <name>image0</name> 202 <name>image0</name>
diff --git a/library/datebookmonth.cpp b/library/datebookmonth.cpp
index f4b3e6b..272c223 100644
--- a/library/datebookmonth.cpp
+++ b/library/datebookmonth.cpp
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -15,63 +15,69 @@
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#include "config.h" 20#include "config.h"
21#include "datebookmonth.h" 21#include "datebookmonth.h"
22#include "datebookdb.h" 22#include "datebookdb.h"
23#include <qpe/event.h> 23#include <qtopia/private/event.h>
24#include "resource.h" 24#include "resource.h"
25#include "qpeapplication.h" 25#include "qpeapplication.h"
26#include "timestring.h" 26#include "timestring.h"
27 27
28#include <qtoolbutton.h> 28#include <qtoolbutton.h>
29#include <qspinbox.h> 29#include <qspinbox.h>
30#include <qcombobox.h> 30#include <qcombobox.h>
31#include <qdatetime.h> 31#include <qdatetime.h>
32#include <qpainter.h> 32#include <qpainter.h>
33#include <qpopupmenu.h> 33#include <qpopupmenu.h>
34#include <qvaluestack.h>
35#include <qwhatsthis.h>
34 36
35 37
36DateBookMonthHeader::DateBookMonthHeader( QWidget *parent, const char *name ) 38DateBookMonthHeader::DateBookMonthHeader( QWidget *parent, const char *name )
37 : QHBox( parent, name ) 39 : QHBox( parent, name )
38{ 40{
39 setBackgroundMode( PaletteButton ); 41 setBackgroundMode( PaletteButton );
40 42
41 begin = new QToolButton( this ); 43 begin = new QToolButton( this );
42 begin->setFocusPolicy(NoFocus); 44 begin->setFocusPolicy(NoFocus);
43 begin->setPixmap( Resource::loadPixmap( "start" ) ); 45 begin->setPixmap( Resource::loadPixmap( "start" ) );
44 begin->setAutoRaise( TRUE ); 46 begin->setAutoRaise( TRUE );
45 begin->setFixedSize( begin->sizeHint() ); 47 begin->setFixedSize( begin->sizeHint() );
48 QWhatsThis::add( begin, tr("Show January in the selected year") );
46 49
47 back = new QToolButton( this ); 50 back = new QToolButton( this );
48 back->setFocusPolicy(NoFocus); 51 back->setFocusPolicy(NoFocus);
49 back->setPixmap( Resource::loadPixmap( "back" ) ); 52 back->setPixmap( Resource::loadPixmap( "back" ) );
50 back->setAutoRaise( TRUE ); 53 back->setAutoRaise( TRUE );
51 back->setFixedSize( back->sizeHint() ); 54 back->setFixedSize( back->sizeHint() );
55 QWhatsThis::add( back, tr("Show the previous month") );
52 56
53 month = new QComboBox( FALSE, this ); 57 month = new QComboBox( FALSE, this );
54 for ( int i = 0; i < 12; ++i ) 58 for ( int i = 0; i < 12; ++i )
55 month->insertItem( Calendar::nameOfMonth( i + 1 ) ); 59 month->insertItem( Calendar::nameOfMonth( i + 1 ) );
56 60
57 year = new QSpinBox( 1752, 8000, 1, this ); 61 year = new QSpinBox( 1752, 8000, 1, this );
58 62
59 next = new QToolButton( this ); 63 next = new QToolButton( this );
60 next->setFocusPolicy(NoFocus); 64 next->setFocusPolicy(NoFocus);
61 next->setPixmap( Resource::loadPixmap( "forward" ) ); 65 next->setPixmap( Resource::loadPixmap( "forward" ) );
62 next->setAutoRaise( TRUE ); 66 next->setAutoRaise( TRUE );
63 next->setFixedSize( next->sizeHint() ); 67 next->setFixedSize( next->sizeHint() );
68 QWhatsThis::add( next, tr("Show the next month") );
64 69
65 end = new QToolButton( this ); 70 end = new QToolButton( this );
66 end->setFocusPolicy(NoFocus); 71 end->setFocusPolicy(NoFocus);
67 end->setPixmap( Resource::loadPixmap( "finish" ) ); 72 end->setPixmap( Resource::loadPixmap( "finish" ) );
68 end->setAutoRaise( TRUE ); 73 end->setAutoRaise( TRUE );
69 end->setFixedSize( end->sizeHint() ); 74 end->setFixedSize( end->sizeHint() );
75 QWhatsThis::add( end, tr("Show December in the selected year") );
70 76
71 connect( month, SIGNAL( activated( int ) ), 77 connect( month, SIGNAL( activated( int ) ),
72 this, SLOT( updateDate() ) ); 78 this, SLOT( updateDate() ) );
73 connect( year, SIGNAL( valueChanged( int ) ), 79 connect( year, SIGNAL( valueChanged( int ) ),
74 this, SLOT( updateDate() ) ); 80 this, SLOT( updateDate() ) );
75 connect( begin, SIGNAL( clicked() ), 81 connect( begin, SIGNAL( clicked() ),
76 this, SLOT( firstMonth() ) ); 82 this, SLOT( firstMonth() ) );
77 connect( end, SIGNAL( clicked() ), 83 connect( end, SIGNAL( clicked() ),
@@ -449,17 +455,16 @@ void DateBookMonth::redraw()
449} 455}
450 456
451QDate DateBookMonth::selectedDate() const 457QDate DateBookMonth::selectedDate() const
452{ 458{
453 if ( !table ) 459 if ( !table )
454 return QDate::currentDate(); 460 return QDate::currentDate();
455 int y, m, d; 461 int y, m, d;
456 table->getDate( y, m, d ); 462 table->getDate( y, m, d );
457 qDebug( "got %d %d %d", y, m, d );
458 return QDate( y, m, d ); 463 return QDate( y, m, d );
459} 464}
460 465
461void DateBookMonth::slotWeekChange( bool startOnMonday ) 466void DateBookMonth::slotWeekChange( bool startOnMonday )
462{ 467{
463 table->setWeekStart( startOnMonday ); 468 table->setWeekStart( startOnMonday );
464} 469}
465 470
@@ -520,113 +525,139 @@ void DayItemMonth::setEvents( const QValueList<EffectiveEvent> &effEv )
520void DayItemMonth::clearEffEvents() 525void DayItemMonth::clearEffEvents()
521{ 526{
522 d->mDayEvents.clear(); 527 d->mDayEvents.clear();
523} 528}
524 529
525void DayItemMonth::paint( QPainter *p, const QColorGroup &cg, 530void DayItemMonth::paint( QPainter *p, const QColorGroup &cg,
526 const QRect &cr, bool selected ) 531 const QRect &cr, bool selected )
527{ 532{
533 p->save();
534
528 QColorGroup g( cg ); 535 QColorGroup g( cg );
529 g.setBrush( QColorGroup::Base, back ); 536 g.setBrush( QColorGroup::Base, back );
530 g.setColor( QColorGroup::Text, forg ); 537 g.setColor( QColorGroup::Text, forg );
531 p->fillRect( 0, 0, cr.width(), cr.height(), selected ? g.brush( QColorGroup::Highlight ) : g.brush( QColorGroup::Base ) );
532
533 if ( selected ) 538 if ( selected )
534 p->setPen( g.highlightedText() ); 539 p->setPen( g.highlightedText() );
535 else 540 else
536 p->setPen( g.text() ); 541 p->setPen( g.text() );
537 542
538 p->save(); 543 QValueStack<int> normalLine;
539 QFont f = p->font(); 544 QValueStack<int> repeatLine;
540 f.setPointSize( ( f.pointSize() / 3 ) * 2 ); 545 QValueStack<int> travelLine;
541 p->setFont( f ); 546
542 QFontMetrics fm( f ); 547 bool normalAllDay = FALSE;
543 p->drawText( 1, 1 + fm.ascent(), QString::number( day() ) ); 548 bool repeatAllDay = FALSE;
544 p->restore(); 549 bool travelAllDay = FALSE;
545 // Put indicators for something like this, (similar to PalmOS) 550
546 // Before noon: item at top of the day
547 // At noon: put a small item at the middle
548 // After noon: put an indicator at the bottom of the day
549 // an all day event: mark with a circle in the middle (a la DateBook+)
550 bool beforeNoon = false;
551 bool atNoon = false;
552 bool afterNoon = false;
553 bool bAllDay = false;
554 bool bRepeatAfter = false;
555 bool bRepeatBefore = false;
556 bool bRepeatNoon = false;
557 bool straddleAfter = false;
558 bool straddleBefore = false;
559 QValueListIterator<EffectiveEvent> itDays = d->mDayEvents.begin(); 551 QValueListIterator<EffectiveEvent> itDays = d->mDayEvents.begin();
552
560 for ( ; itDays != d->mDayEvents.end(); ++itDays ) { 553 for ( ; itDays != d->mDayEvents.end(); ++itDays ) {
561 if ( (*itDays).event().type() == Event::AllDay ) 554 int w = cr.width();
562 bAllDay = TRUE; 555 Event ev = (*itDays).event();
563 else if ( (*itDays).start().hour() < 12 ) { 556
564 beforeNoon = TRUE; 557 int f = (*itDays).start().hour(); // assume Effective event
565 if ( (*itDays).end().hour() > 12 ) { 558 int t = (*itDays).end().hour(); // is truncated.
566 atNoon = TRUE; 559
567 straddleBefore = TRUE; 560 if (ev.isAllDay()) {
561 if (!ev.hasRepeat())
562 normalAllDay = TRUE;
563 else
564 repeatAllDay = TRUE;
565 } else {
566 int sLine, eLine;
567 if (f == 0)
568 sLine = 0;
569 else if (f < 8 )
570 sLine = 1;
571 else if (f >= 17)
572 sLine = w - 4;
573 else {
574 sLine = (f - 8) * (w - 8);
575 if (sLine)
576 sLine /= 8;
577 sLine += 4;
568 } 578 }
569 if ( (*itDays).end().hour() > 14 || 579 if (t == 23)
570 (*itDays).end().hour() == 14 && (*itDays).end().minute() > 0 ) { 580 eLine = w;
571 afterNoon = TRUE; 581 else if (t < 8)
572 straddleAfter = TRUE; 582 eLine = 4;
583 else if (t >= 17)
584 eLine = w - 1;
585 else {
586 eLine = (t - 8) * (w - 8);
587 if (eLine)
588 eLine /= 8;
589 eLine += 4;
573 } 590 }
574 if ( (*itDays).event().hasRepeat() ) 591 if (!ev.hasRepeat()) {
575 bRepeatBefore = TRUE; 592 normalLine.push(sLine);
576 } else if ( (*itDays).start().hour() == 12 ) { 593 normalLine.push(eLine);
577 if ( !atNoon ) 594 } else {
578 atNoon = TRUE; 595 repeatLine.push(sLine);
579 if ( (*itDays).event().hasRepeat() ) 596 repeatLine.push(eLine);
580 bRepeatNoon = TRUE;
581 if ( (*itDays).end().hour() > 14 ||
582 (*itDays).end().hour() == 14 && (*itDays).end().minute() > 0 ) {
583 afterNoon = TRUE;
584 straddleAfter = TRUE;
585 } 597 }
586 } else if ( (*itDays).start().hour() > 12 ) {
587 afterNoon = TRUE;
588 if ( (*itDays).event().hasRepeat() )
589 bRepeatAfter = TRUE;
590 } 598 }
591 } 599 }
592 int x = cr.width() - 13; 600
593 if ( beforeNoon ) { 601 // draw the background
594 p->setBrush( blue ); 602 if (normalAllDay || repeatAllDay || travelAllDay) {
595 p->drawRect( x, 2, 10, 10 ); 603 p->save();
596 if ( bRepeatBefore ) 604
597 p->fillRect( x + 5, 4, 3, 3, white ); 605 if (normalAllDay)
598 } 606 if (repeatAllDay) {
599 if ( atNoon ) { 607 p->fillRect( 0, 0, cr.width(), cr.height() / 2,
600 p->setBrush( blue ); 608 colorNormalLight );
601 p->drawRect( x, 14, 10, 5 ); 609 p->fillRect( 0, cr.height() / 2, cr.width(), cr.height() / 2,
602 if ( bRepeatNoon ) 610 colorRepeatLight );
603 p->fillRect( x + 5, 16, 3, 2, white ); 611 } else
604 } 612 p->fillRect( 0, 0, cr.width(), cr.height(),
605 if ( straddleBefore ) { 613 colorNormalLight );
606 p->drawLine( x, 11, x, 14 ); 614 else if (repeatAllDay)
607 p->fillRect( x + 1, 11, 8, 4, blue ); 615 p->fillRect( 0, 0, cr.width(), cr.height(),
608 p->drawLine( x + 9, 11, x + 9, 14 ); 616 colorRepeatLight );
609 } 617 } else {
610 if ( afterNoon ) { 618 p->fillRect( 0, 0, cr.width(),
611 p->setBrush( blue ); 619 cr.height(), selected
612 p->drawRect( x, 21, 10, 10 ); 620 ? g.brush( QColorGroup::Highlight )
613 if ( bRepeatAfter ) 621 : g.brush( QColorGroup::Base ) );
614 p->fillRect( x + 5, 23, 3, 3, white );
615 } 622 }
616 if ( straddleAfter ) { 623
617 p->drawLine( x, 18, x, 21 ); 624 // The lines
618 p->fillRect( x + 1, 18, 8, 4, blue ); 625 // now for the lines.
619 p->drawLine( x + 9, 18, x + 9, 21 ); 626 int h = 5;
627 int y = cr.height() / 2 - h;
628
629 while(normalLine.count() >= 2) {
630 int x2 = normalLine.pop();
631 int x1 = normalLine.pop();
632 if (x2 < x1 + 2)
633 x2 = x1 + 2;
634 p->fillRect(x1, y, x2 - x1, h, colorNormal);
620 } 635 }
621 if ( bAllDay ) { 636
622 p->setBrush( green ); 637 y += h;
623 p->drawEllipse( cr.width() / 2 - 7, cr.height() / 2 - 5, 10, 10 ); 638
639 while(repeatLine.count() >= 2) {
640 int x2 = repeatLine.pop();
641 int x1 = repeatLine.pop();
642 if (x2 < x1 + 2)
643 x2 = x1 + 2;
644 p->fillRect(x1, y, x2 - x1, h, colorRepeat);
624 } 645 }
646
647
648 // Finally, draw the number.
649 QFont f = p->font();
650 f.setPointSize( ( f.pointSize() / 3 ) * 2 );
651 p->setFont( f );
652 QFontMetrics fm( f );
653 p->drawText( 1, 1 + fm.ascent(), QString::number( day() ) );
654
655 p->restore();
625} 656}
626 657
627 658
628 659
629void DayItemMonth::setType( Calendar::Day::Type t ) 660void DayItemMonth::setType( Calendar::Day::Type t )
630{ 661{
631 switch ( t ) { 662 switch ( t ) {
632 case Calendar::Day::PrevMonth: 663 case Calendar::Day::PrevMonth:
@@ -706,8 +737,14 @@ void DateButton::setDate( QDate d )
706 737
707} 738}
708 739
709void DateButton::setDateFormat( DateFormat f ) 740void DateButton::setDateFormat( DateFormat f )
710{ 741{
711 df = f; 742 df = f;
712 setDate( currDate ); 743 setDate( currDate );
713} 744}
745
746bool DateButton::customWhatsThis() const
747{
748 return TRUE;
749}
750
diff --git a/library/datebookmonth.h b/library/datebookmonth.h
index a7647ae..3c57c19 100644
--- a/library/datebookmonth.h
+++ b/library/datebookmonth.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -15,17 +15,17 @@
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#ifndef DATEBOOKMONTH 20#ifndef DATEBOOKMONTH
21#define DATEBOOKMONTH 21#define DATEBOOKMONTH
22 22
23#include <qpe/event.h> 23#include <qtopia/private/event.h>
24 24
25#include <qvbox.h> 25#include <qvbox.h>
26#include <qhbox.h> 26#include <qhbox.h>
27#include <qdatetime.h> 27#include <qdatetime.h>
28#include <qvaluelist.h> 28#include <qvaluelist.h>
29#include <qtable.h> 29#include <qtable.h>
30#include <qpushbutton.h> 30#include <qpushbutton.h>
31 31
@@ -182,16 +182,18 @@ private:
182class DateButton : public QPushButton 182class DateButton : public QPushButton
183{ 183{
184 Q_OBJECT 184 Q_OBJECT
185 185
186public: 186public:
187 DateButton( bool longDate, QWidget *parent, const char * name = 0 ); 187 DateButton( bool longDate, QWidget *parent, const char * name = 0 );
188 QDate date() const { return currDate; } 188 QDate date() const { return currDate; }
189 189
190 bool customWhatsThis() const;
191
190signals: 192signals:
191 void dateSelected( int year, int month, int day ); 193 void dateSelected( int year, int month, int day );
192 194
193public slots: 195public slots:
194 void setDate( int y, int m, int d ); 196 void setDate( int y, int m, int d );
195 void setDate( QDate ); 197 void setDate( QDate );
196 void setWeekStartsMonday( int ); 198 void setWeekStartsMonday( int );
197 void setDateFormat( DateFormat ); 199 void setDateFormat( DateFormat );
diff --git a/library/fileselector.cpp b/library/fileselector.cpp
index 013f43a..382012f 100644
--- a/library/fileselector.cpp
+++ b/library/fileselector.cpp
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -25,329 +25,539 @@
25#include "fileselector.h" 25#include "fileselector.h"
26#include "fileselector_p.h" 26#include "fileselector_p.h"
27#include "global.h" 27#include "global.h"
28#include "resource.h" 28#include "resource.h"
29#include "config.h" 29#include "config.h"
30#include "applnk.h" 30#include "applnk.h"
31#include "storage.h" 31#include "storage.h"
32#include "qpemenubar.h" 32#include "qpemenubar.h"
33#ifdef QWS
33#include "qcopchannel_qws.h" 34#include "qcopchannel_qws.h"
35#endif
34#include "lnkproperties.h" 36#include "lnkproperties.h"
35#include "applnk.h" 37#include "applnk.h"
36#include "qpeapplication.h" 38#include "qpeapplication.h"
37#include "categorymenu.h" 39#include "categorymenu.h"
40#include "categoryselect.h"
41#include "mimetype.h"
42#include "categories.h"
38 43
39#include <stdlib.h> 44#include <stdlib.h>
40 45
41#include <qdir.h> 46#include <qdir.h>
42#include <qwidget.h> 47#include <qwidget.h>
43#include <qpopupmenu.h> 48#include <qpopupmenu.h>
44#include <qtoolbutton.h> 49#include <qtoolbutton.h>
45#include <qpushbutton.h> 50#include <qpushbutton.h>
46#include <qheader.h> 51#include <qheader.h>
47#include <qtooltip.h> 52#include <qtooltip.h>
53#include <qwhatsthis.h>
48 54
55class TypeCombo : public QComboBox
56{
57 Q_OBJECT
58public:
59 TypeCombo( QWidget *parent, const char *name=0 )
60 : QComboBox( parent, name )
61 {
62 connect( this, SIGNAL(activated(int)), this, SLOT(selectType(int)) );
63 }
64
65 void reread( DocLnkSet &files, const QString &filter );
66
67signals:
68 void selected( const QString & );
69
70protected slots:
71 void selectType( int idx ) {
72 emit selected( typelist[idx] );
73 }
74
75protected:
76 QStringList typelist;
77 QString prev;
78};
79
80void TypeCombo::reread( DocLnkSet &files, const QString &filter )
81{
82 typelist.clear();
83 QStringList filters = QStringList::split( ';', filter );
84 int pos = filter.find( '/' );
85 //### do for each filter
86 if ( filters.count() == 1 && pos >= 0 && filter[pos+1] != '*' ) {
87 typelist.append( filter );
88 clear();
89 QString minor = filter.mid( pos+1 );
90 minor[0] = minor[0].upper();
91 insertItem( tr("%1 files").arg(minor) );
92 setCurrentItem(0);
93 setEnabled( FALSE );
94 return;
95 }
96
97 QListIterator<DocLnk> dit( files.children() );
98 for ( ; dit.current(); ++dit ) {
99 if ( !typelist.contains( (*dit)->type() ) )
100 typelist.append( (*dit)->type() );
101 }
102
103 QStringList types;
104 QStringList::ConstIterator it;
105 for (it = typelist.begin(); it!=typelist.end(); ++it) {
106 QString t = *it;
107 if ( t.left(12) == "application/" ) {
108 MimeType mt(t);
109 const AppLnk* app = mt.application();
110 if ( app )
111 t = app->name();
112 else
113 t = t.mid(12);
114 } else {
115 QString major, minor;
116 int pos = t.find( '/' );
117 if ( pos >= 0 ) {
118 major = t.left( pos );
119 minor = t.mid( pos+1 );
120 }
121 if ( minor.find( "x-" ) == 0 )
122 minor = minor.mid( 2 );
123 minor[0] = minor[0].upper();
124 major[0] = major[0].upper();
125 if ( filters.count() > 1 )
126 t = tr("%1 %2", "minor mimetype / major mimetype").arg(minor).arg(major);
127 else
128 t = minor;
129 }
130 types += tr("%1 files").arg(t);
131 }
132 for (it = filters.begin(); it!=filters.end(); ++it) {
133 typelist.append( *it );
134 int pos = (*it).find( '/' );
135 if ( pos >= 0 ) {
136 QString maj = (*it).left( pos );
137 maj[0] = maj[0].upper();
138 types << tr("All %1 files").arg(maj);
139 }
140 }
141 if ( filters.count() > 1 ) {
142 typelist.append( filter );
143 types << tr("All files");
144 }
145 prev = currentText();
146 clear();
147 insertStringList(types);
148 for (int i=0; i<count(); i++) {
149 if ( text(i) == prev ) {
150 setCurrentItem(i);
151 break;
152 }
153 }
154 if ( prev.isNull() )
155 setCurrentItem(count()-1);
156 setEnabled( TRUE );
157}
158
159
160//===========================================================================
49 161
50FileSelectorItem::FileSelectorItem( QListView *parent, const DocLnk &f ) 162FileSelectorItem::FileSelectorItem( QListView *parent, const DocLnk &f )
51 : QListViewItem( parent ), fl( f ) 163 : QListViewItem( parent ), fl( f )
52{ 164{
53 setText( 0, f.name() ); 165 setText( 0, f.name() );
54 setPixmap( 0, f.pixmap() ); 166 setPixmap( 0, f.pixmap() );
55} 167}
56 168
57FileSelectorItem::~FileSelectorItem() 169FileSelectorItem::~FileSelectorItem()
58{ 170{
59} 171}
60 172
61class FileSelectorViewPrivate 173FileSelectorView::FileSelectorView( QWidget *parent, const char *name )
62{ 174 : QListView( parent, name )
63public:
64 CategoryMenu *cm;
65 bool m_noItems:1;
66};
67
68FileSelectorView::FileSelectorView( const QString &f, QWidget *parent, const char *name )
69 : QListView( parent, name ), filter( f ), count( 0 )
70{ 175{
71 d = new FileSelectorViewPrivate();
72 d->cm = 0;
73 d->m_noItems = false;
74 setAllColumnsShowFocus( TRUE ); 176 setAllColumnsShowFocus( TRUE );
75 addColumn( tr( "Name" ) ); 177 addColumn( tr( "Name" ) );
76 header()->hide(); 178 header()->hide();
77
78 fileManager = new FileManager;
79 reread();
80 QCopChannel *channel = new QCopChannel( "QPE/Card", this );
81 connect( channel, SIGNAL(received(const QCString &, const QByteArray &)),
82 this, SLOT(cardMessage( const QCString &, const QByteArray &)) );
83} 179}
84 180
85FileSelectorView::~FileSelectorView() 181FileSelectorView::~FileSelectorView()
86{ 182{
87} 183}
88 184
89void FileSelectorView::reread()
90{
91 QString oldFile;
92 FileSelectorItem *item;
93 if( !d->m_noItems ) { // there are items
94 item = (FileSelectorItem *)selectedItem();
95 if ( item )
96 oldFile = item->file().file();
97 }
98 clear();
99 DocLnkSet files;
100 Global::findDocuments(&files, filter);
101 count = files.children().count();
102 if(count == 0 ){ // No Documents
103 d->m_noItems = true;
104 QListViewItem *it = new QListViewItem(this, tr("There are no files in this directory." ), "empty" );
105 it->setSelectable(FALSE );
106 return;
107 }
108 QListIterator<DocLnk> dit( files.children() );
109 for ( ; dit.current(); ++dit ) {
110 if (d->cm)
111 if (!d->cm->isSelected((**dit).categories()))
112 continue;
113 item = new FileSelectorItem( this, **dit );
114 if ( item->file().file() == oldFile )
115 setCurrentItem( item );
116 }
117 if ( !selectedItem() )
118 setCurrentItem( firstChild() );
119}
120
121void FileSelectorView::setCategoryFilter(CategoryMenu *cm)
122{
123 d->cm = cm;
124 connect(cm, SIGNAL(categoryChange()), this, SLOT(categoryChanged()) );
125}
126
127void FileSelectorView::categoryChanged() { reread(); }
128
129void FileSelectorView::cardMessage( const QCString &msg, const QByteArray &)
130{
131 if ( msg == "mtabChanged()" )
132 reread();
133}
134
135void FileSelectorView::keyPressEvent( QKeyEvent *e ) 185void FileSelectorView::keyPressEvent( QKeyEvent *e )
136{ 186{
137 QString txt = e->text(); 187 QString txt = e->text();
138 if (e->key() == Key_Space) 188 if (e->key() == Key_Space)
139 emit returnPressed( currentItem() ); 189 emit returnPressed( currentItem() );
140 else if ( !txt.isNull() && txt[0] > ' ' && e->key() < 0x1000 ) 190 else if ( !txt.isNull() && txt[0] > ' ' && e->key() < 0x1000 )
141 e->ignore(); 191 e->ignore();
142 else 192 else
143 QListView::keyPressEvent(e); 193 QListView::keyPressEvent(e);
144} 194}
145 195
196class NewDocItem : public FileSelectorItem
197{
198public:
199 NewDocItem( QListView *parent, const DocLnk &f )
200 : FileSelectorItem( parent, f ) {
201 setText( 0, QObject::tr("New Document") );
202 QImage img( Resource::loadImage( "new" ) );
203 QPixmap pm;
204 pm = img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() );
205 setPixmap( 0, pm );
206 }
207 QString key ( int, bool ) const {
208 return QString("\n");
209 }
210
211 void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int alignment ) {
212 QFont oldFont = p->font();
213 QFont newFont = p->font();
214 newFont.setWeight( QFont::Bold );
215 p->setFont( newFont );
216 FileSelectorItem::paintCell( p, cg, column, width, alignment );
217 p->setFont( oldFont );
218 }
219
220 int width( const QFontMetrics &fm, const QListView *v, int c ) const {
221 return FileSelectorItem::width( fm, v, c )*4/3; // allow for bold font
222 }
223};
224
225//===========================================================================
226
146class FileSelectorPrivate 227class FileSelectorPrivate
147{ 228{
148public: 229public:
149 CategoryMenu *cm; 230 TypeCombo *typeCombo;
150 QMenuBar *mb; 231 CategorySelect *catSelect;
232 QValueList<QRegExp> mimeFilters;
233 int catId;
234 bool showNew;
235 NewDocItem *newDocItem;
236 DocLnkSet files;
237 QHBox *toolbar;
151}; 238};
152 239
153/*! 240/*!
154 \class FileSelector fileselector.h 241 \class FileSelector fileselector.h
155 \brief The FileSelector widget allows the user to select DocLnk objects. 242 \brief The FileSelector widget allows the user to select DocLnk objects.
243
244 This class presents a file selection dialog to the user. This widget
245 is usually the first widget seen in a \link docwidget.html
246 document-oriented application\endlink. The developer will most often
247 create this widget in combination with a <a
248 href="../qt/qwidgetstack.html"> QWidgetStack</a> and the appropriate
249 editor and/or viewer widget for their application. This widget
250 should be shown first and the user can the select which document
251 they wish to operate on. Please refer to the implementation of
252 texteditor for an example of how to tie these classes together.
253
254 Use setNewVisible() depending on whether the application can be used
255 to create new files or not. Use setCloseVisible() depending on
256 whether the user may leave the dialog without creating or selecting
257 a document or not. The number of files in the view is available from
258 fileCount(). To force the view to be updated call reread().
259
260 If the user presses the 'New Document' button the newSelected()
261 signal is emitted. If the user selects an existing file the
262 fileSelected() signal is emitted. The selected file's \link
263 doclnk.html DocLnk\endlink is available from the selected()
264 function. If the file selector is no longer necessary the closeMe()
265 signal is emitted.
266
267 \ingroup qtopiaemb
268 \sa FileManager
156*/ 269*/
157 270
158/*! 271/*!
159 Constructs a FileSelector with mime filter \a f. 272 Constructs a FileSelector with mime filter \a f.
160 The standard Qt \a parent and \a name parameters are passed to the 273 The standard Qt \a parent and \a name parameters are passed to the
161 parent. 274 parent widget.
162 275
163 If \a newVisible is TRUE, the widget has an button allowing the user 276 If \a newVisible is TRUE, the widget has a button to allow the user
164 the create "new" documents - editor applications will have this while 277 the create "new" documents; this is useful for applications that can
165 viewer applications will not. 278 create and edit documents but not suitable for applications that
279 only provide viewing.
166 280
167 If \a closeVisible is TRUE, the widget has an button allowinf the user 281 \a closeVisible is deprecated
168 to select "no document".
169 282
170 \sa DocLnkSet::DocLnkSet() 283 \sa DocLnkSet::DocLnkSet()
171*/ 284*/
172FileSelector::FileSelector( const QString &f, QWidget *parent, const char *name, bool newVisible, bool closeVisible ) 285FileSelector::FileSelector( const QString &f, QWidget *parent, const char *name, bool newVisible, bool closeVisible )
173 : QVBox( parent, name ), filter( f ) 286 : QVBox( parent, name ), filter( f )
174{ 287{
175 setMargin( 0 ); 288 setMargin( 0 );
176 setSpacing( 0 ); 289 setSpacing( 0 );
177 QHBox *top = new QHBox( this );
178 top->setBackgroundMode( PaletteButton );// same colour as toolbars
179 top->setSpacing( 0 );
180
181 QWidget *spacer = new QWidget( top );
182 spacer->setBackgroundMode( PaletteButton );
183 290
184 d = new FileSelectorPrivate(); 291 d = new FileSelectorPrivate();
185 d->mb = new QMenuBar(spacer); 292 d->newDocItem = 0;
186 d->cm = new CategoryMenu("Document View", this); 293 d->showNew = newVisible;
187 QPEMenuToolFocusManager::manager()->addWidget( d->mb ); 294 d->catId = -2; // All files
188 d->mb->insertItem(tr("View"), d->cm);
189 295
296 d->toolbar = new QHBox( this );
297 d->toolbar->setBackgroundMode( PaletteButton ); // same colour as toolbars
298 d->toolbar->setSpacing( 0 );
299 d->toolbar->hide();
190 300
191 QToolButton *tb = new QToolButton( top ); 301 QWidget *spacer = new QWidget( d->toolbar );
192 tb->setPixmap( Resource::loadPixmap( "new" ) ); 302 spacer->setBackgroundMode( PaletteButton );
193 connect( tb, SIGNAL( clicked() ), this, SLOT( createNew() ) );
194 buttonNew = tb;
195 tb->setFixedSize( 18, 20 ); // tb->sizeHint() );
196 tb->setAutoRaise( TRUE );
197 QToolTip::add( tb, tr( "Create a new Document" ) );
198 QPEMenuToolFocusManager::manager()->addWidget( tb );
199 303
200 tb = new QToolButton( top ); 304 QToolButton *tb = new QToolButton( d->toolbar );
201 tb->setPixmap( Resource::loadPixmap( "close" ) ); 305 tb->setPixmap( Resource::loadPixmap( "close" ) );
202 connect( tb, SIGNAL( clicked() ), this, SIGNAL( closeMe() ) ); 306 connect( tb, SIGNAL( clicked() ), this, SIGNAL( closeMe() ) );
203 buttonClose = tb; 307 buttonClose = tb;
204 tb->setFixedSize( 18, 20 ); // tb->sizeHint() ); 308 tb->setFixedSize( 18, 20 ); // tb->sizeHint() );
205 tb->setAutoRaise( TRUE ); 309 tb->setAutoRaise( TRUE );
206 QToolTip::add( tb, tr( "Close the File Selector" ) ); 310 QToolTip::add( tb, tr( "Close the File Selector" ) );
207 QPEMenuToolFocusManager::manager()->addWidget( tb ); 311 QPEMenuToolFocusManager::manager()->addWidget( tb );
208 312
209 view = new FileSelectorView( filter, this, "fileview" ); 313 view = new FileSelectorView( this, "fileview" );
210 view->setCategoryFilter(d->cm);
211 QPEApplication::setStylusOperation( view->viewport(), QPEApplication::RightOnHold ); 314 QPEApplication::setStylusOperation( view->viewport(), QPEApplication::RightOnHold );
212 connect( view, SIGNAL( mouseButtonClicked( int, QListViewItem *, const QPoint &, int ) ), 315 connect( view, SIGNAL( mouseButtonClicked( int, QListViewItem *, const QPoint &, int ) ),
213 this, SLOT( fileClicked( int, QListViewItem *, const QPoint &, int ) ) ); 316 this, SLOT( fileClicked( int, QListViewItem *, const QPoint &, int ) ) );
214 connect( view, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint &, int ) ), 317 connect( view, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint &, int ) ),
215 this, SLOT( filePressed( int, QListViewItem *, const QPoint &, int ) ) ); 318 this, SLOT( filePressed( int, QListViewItem *, const QPoint &, int ) ) );
216 connect( view, SIGNAL( returnPressed( QListViewItem * ) ), 319 connect( view, SIGNAL( returnPressed( QListViewItem * ) ),
217 this, SLOT( fileClicked( QListViewItem * ) ) ); 320 this, SLOT( fileClicked( QListViewItem * ) ) );
218 321
219 setNewVisible( newVisible ); 322 QHBox *hb = new QHBox( this );
323 d->typeCombo = new TypeCombo( hb );
324 connect( d->typeCombo, SIGNAL(selected(const QString&)),
325 this, SLOT(typeSelected(const QString&)) );
326 QWhatsThis::add( d->typeCombo, tr("Show documents of this type") );
327
328 Categories c;
329 c.load(categoryFileName());
330 QArray<int> vl( 0 );
331 d->catSelect = new CategorySelect( hb );
332 d->catSelect->setRemoveCategoryEdit( TRUE );
333 d->catSelect->setCategories( vl, "Document View", tr("Document View") );
334 d->catSelect->setAllCategories( TRUE );
335 connect( d->catSelect, SIGNAL(signalSelected(int)), this, SLOT(catSelected(int)) );
336 QWhatsThis::add( d->catSelect, tr("Show documents in this category") );
337
220 setCloseVisible( closeVisible ); 338 setCloseVisible( closeVisible );
339
340 QCopChannel *channel = new QCopChannel( "QPE/Card", this );
341 connect( channel, SIGNAL(received(const QCString &, const QByteArray &)),
342 this, SLOT(cardMessage( const QCString &, const QByteArray &)) );
343
344 reread();
345 updateWhatsThis();
221} 346}
222 347
223/*! 348/*!
224 Destroys the widget. 349 Destroys the widget.
225*/ 350*/
226FileSelector::~FileSelector() 351FileSelector::~FileSelector()
227{ 352{
228 353 delete d;
229} 354}
230 355
231/*! 356/*!
232 Returns the number of files in the view. If this is zero, and editor 357 Returns the number of files in the view. If this is zero, an editor
233 application might avoid using the selector and immediately start with 358 application might bypass the selector and immediately start with
234 a "new" document. 359 a "new" document.
235*/ 360*/
236int FileSelector::fileCount() 361int FileSelector::fileCount()
237{ 362{
238 return view->fileCount(); 363 return d->files.children().count();;
239} 364}
240 365
241/*! 366/*!
242 Causes the file selector to act as if the "new" button was chosen. 367 Calling this function is the programmatic equivalent of the user
368 pressing the "new" button.
243 369
244 \sa newSelected(), closeMe() 370 \sa newSelected(), closeMe()
245*/ 371*/
246void FileSelector::createNew() 372void FileSelector::createNew()
247{ 373{
248 DocLnk f; 374 DocLnk f;
249 emit newSelected( f ); 375 emit newSelected( f );
250 emit closeMe(); 376 emit closeMe();
251} 377}
252 378
253void FileSelector::fileClicked( int button, QListViewItem *i, const QPoint &, int ) 379void FileSelector::fileClicked( int button, QListViewItem *i, const QPoint &, int )
254{ 380{
255 if ( !i ) 381 if ( !i )
256 return; 382 return;
257 if(i->text(1) == QString::fromLatin1("empty" ) )
258 return;
259
260 if ( button == Qt::LeftButton ) { 383 if ( button == Qt::LeftButton ) {
261 fileClicked( i ); 384 fileClicked( i );
262 } 385 }
263} 386}
264 387
265void FileSelector::filePressed( int button, QListViewItem *i, const QPoint &, int ) 388void FileSelector::filePressed( int button, QListViewItem *i, const QPoint &, int )
266{ 389{
267 if ( !i ) 390 if ( !i || i == d->newDocItem )
268 return; 391 return;
269 if(i->text(1) == QString::fromLatin1("empty" ) )
270 return;
271
272 if ( button == Qt::RightButton ) { 392 if ( button == Qt::RightButton ) {
273 DocLnk l = ((FileSelectorItem *)i)->file(); 393 DocLnk l = ((FileSelectorItem *)i)->file();
274 LnkProperties prop( &l ); 394 LnkProperties prop( &l );
275 prop.showMaximized(); 395 prop.showMaximized();
276 prop.exec(); 396 prop.exec();
277 d->cm->reload();
278 reread(); 397 reread();
279 } 398 }
280} 399}
281 400
282void FileSelector::fileClicked( QListViewItem *i ) 401void FileSelector::fileClicked( QListViewItem *i )
283{ 402{
284 if ( !i ) 403 if ( !i )
285 return; 404 return;
286 emit fileSelected( ( (FileSelectorItem*)i )->file() ); 405 if ( i == d->newDocItem ) {
287 emit closeMe(); 406 createNew();
407 } else {
408 emit fileSelected( ( (FileSelectorItem*)i )->file() );
409 emit closeMe();
410 }
411}
412
413void FileSelector::typeSelected( const QString &type )
414{
415 d->mimeFilters.clear();
416 QStringList subFilter = QStringList::split(";", type);
417 for( QStringList::Iterator it = subFilter.begin(); it != subFilter.end(); ++it )
418 d->mimeFilters.append( QRegExp(*it, FALSE, TRUE) );
419 updateView();
288} 420}
289 421
422void FileSelector::catSelected( int c )
423{
424 d->catId = c;
425 updateView();
426}
427
428void FileSelector::cardMessage( const QCString &msg, const QByteArray &)
429{
430 if ( msg == "mtabChanged()" )
431 reread();
432}
433
434
290/*! 435/*!
291 Returns the selected DocLnk. The caller is responsible for deleting 436 Returns the selected \link doclnk.html DocLnk\endlink. The caller is
292 the returned value. 437 responsible for deleting the returned value.
293*/ 438*/
294const DocLnk *FileSelector::selected() 439const DocLnk *FileSelector::selected()
295{ 440{
296 FileSelectorItem *item = (FileSelectorItem *)view->selectedItem(); 441 FileSelectorItem *item = (FileSelectorItem *)view->selectedItem();
297 if ( item ) 442 if ( item && item != d->newDocItem )
298 return new DocLnk( item->file() ); 443 return new DocLnk( item->file() );
299 return NULL; 444 return NULL;
300} 445}
301 446
302/*! 447/*!
303 \fn void FileSelector::fileSelected( const DocLnk &f ) 448 \fn void FileSelector::fileSelected( const DocLnk &f )
304 449
305 This signal is emitted when the user selects a file. 450 This signal is emitted when the user selects a document.
306 \a f is the file. 451 \a f is the document.
307*/ 452*/
308 453
309/*! 454/*!
310 \fn void FileSelector::newSelected( const DocLnk &f ) 455 \fn void FileSelector::newSelected( const DocLnk &f )
311 456
312 This signal is emitted when the user selects "new" file. 457 This signal is emitted when the user selects a "new" document.
313 \a f is a DocLnk for the file. You will need to set the type 458 \a f is a DocLnk for the document. You will need to set the type
314 of the value after copying it. 459 of the document after copying it.
315*/ 460*/
316 461
317/*! 462/*!
318 \fn void FileSelector::closeMe() 463 \fn void FileSelector::closeMe()
319 464
320 This signal is emitted when the user no longer needs to view the widget. 465 This signal is emitted when the user no longer needs to view the widget.
321*/ 466*/
322 467
323 468
324/*! 469/*!
325 Sets whether a "new document" button is visible, according to \a b. 470 If \a b is TRUE a "new document" entry is visible; if \a b is FALSE
471 this entry is not visible and the user is unable to create new
472 documents from the dialog.
326*/ 473*/
327void FileSelector::setNewVisible( bool b ) 474void FileSelector::setNewVisible( bool b )
328{ 475{
329 if ( b ) 476 if ( d->showNew != b ) {
330 buttonNew->show(); 477 d->showNew = b;
331 else 478 updateView();
332 buttonNew->hide(); 479 updateWhatsThis();
480 }
333} 481}
334 482
335/*! 483/*!
336 Sets whether a "no document" button is visible, according to \a b. 484 If \a b is TRUE a "close" or "no document" button is visible; if \a
485 b is FALSE this button is not visible and the user is unable to
486 leave the dialog without creating or selecting a document.
487
488 This function is deprecated.
337*/ 489*/
338void FileSelector::setCloseVisible( bool b ) 490void FileSelector::setCloseVisible( bool b )
339{ 491{
340 if ( b ) 492 if ( b )
341 buttonClose->show(); 493 d->toolbar->show();
342 else 494 else
343 buttonClose->hide(); 495 d->toolbar->hide();
344} 496}
345 497
346/*! 498/*!
347 Rereads the list of files. 499 Rereads the list of documents.
348*/ 500*/
349void FileSelector::reread() 501void FileSelector::reread()
350{ 502{
351 view->reread(); 503 d->files.clear();
504 Global::findDocuments(&d->files, filter);
505 d->typeCombo->reread( d->files, filter );
506 updateView();
352} 507}
353 508
509void FileSelector::updateView()
510{
511 FileSelectorItem *item = (FileSelectorItem *)view->selectedItem();
512 if ( item == d->newDocItem )
513 item = 0;
514 QString oldFile;
515 if ( item )
516 oldFile = item->file().file();
517 view->clear();
518 QListIterator<DocLnk> dit( d->files.children() );
519 for ( ; dit.current(); ++dit ) {
520 bool mimeMatch = FALSE;
521 if ( d->mimeFilters.count() ) {
522 QValueList<QRegExp>::Iterator it;
523 for ( it = d->mimeFilters.begin(); it != d->mimeFilters.end(); ++it ) {
524 if ( (*it).match((*dit)->type()) >= 0 ) {
525 mimeMatch = TRUE;
526 break;
527 }
528 }
529 } else {
530 mimeMatch = TRUE;
531 }
532 if ( mimeMatch &&
533 (d->catId == -2 || (*dit)->categories().contains(d->catId) ||
534 (d->catId == -1 && (*dit)->categories().isEmpty())) ) {
535 item = new FileSelectorItem( view, **dit );
536 if ( item->file().file() == oldFile )
537 view->setCurrentItem( item );
538 }
539 }
540
541 if ( d->showNew )
542 d->newDocItem = new NewDocItem( view, DocLnk() );
543 else
544 d->newDocItem = 0;
545
546 if ( !view->selectedItem() || view->childCount() == 1 ) {
547 view->setCurrentItem( view->firstChild() );
548 view->setSelected( view->firstChild(), TRUE );
549 }
550}
551
552void FileSelector::updateWhatsThis()
553{
554 QWhatsThis::remove( this );
555 QString text = tr("Click to select a document from the list");
556 if ( d->showNew )
557 text += tr(", or select <b>New Document</b> to create a new document.");
558 text += tr("<br><br>Click and hold for document properties.");
559 QWhatsThis::add( this, text );
560}
561
562#include "fileselector.moc"
563
diff --git a/library/fileselector.h b/library/fileselector.h
index 8cfdf13..1a6ace2 100644
--- a/library/fileselector.h
+++ b/library/fileselector.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -45,36 +45,68 @@ private:
45}; 45};
46 46
47class FileSelectorPrivate; 47class FileSelectorPrivate;
48class FileSelector : public QVBox 48class FileSelector : public QVBox
49{ 49{
50 Q_OBJECT 50 Q_OBJECT
51 51
52public: 52public:
53 FileSelector( const QString &mimefilter, QWidget *parent, const char *name, bool newVisible = TRUE, bool closeVisible = TRUE ); 53 FileSelector( const QString &mimefilter, QWidget *parent, const char *name=0, bool newVisible = TRUE, bool closeVisible = TRUE );
54 ~FileSelector(); 54 ~FileSelector();
55 void setNewVisible( bool b ); 55 void setNewVisible( bool b );
56 void setCloseVisible( bool b ); 56 void setCloseVisible( bool b );
57 void reread(); 57 void reread();
58 int fileCount(); 58 int fileCount();
59 const DocLnk *selected(); 59 DocLnk selectedDocument() const
60 {
61 const DocLnk* rp = ((FileSelector*)this)->selected();
62 if (!rp) {
63 DocLnk r;
64 return r;
65 }
66 DocLnk r(*rp);
67 delete rp;
68 return r;
69 }
70
71 QValueList<DocLnk> fileList() const
72 {
73 ((FileSelector*)this)->fileCount(); // ensure all loaded when this is extended
74
75 QValueList<DocLnk> list;
76 FileSelectorItem *item = (FileSelectorItem *)((QListView*)view)->firstChild();
77 while (item) {
78 list.append(item->file());
79 item = (FileSelectorItem *)item->nextSibling();
80 }
81
82 return list;
83 }
60 84
61signals: 85signals:
62 void fileSelected( const DocLnk & ); 86 void fileSelected( const DocLnk & );
63 void newSelected( const DocLnk & ); 87 void newSelected( const DocLnk & );
64 void closeMe(); 88 void closeMe();
65 89
66private slots: 90private slots:
67 void createNew(); 91 void createNew();
68 void fileClicked( int, QListViewItem *, const QPoint &, int ); 92 void fileClicked( int, QListViewItem *, const QPoint &, int );
69 // pressed to get 'right down' 93 // pressed to get 'right down'
70 void filePressed( int, QListViewItem *, const QPoint &, int ); 94 void filePressed( int, QListViewItem *, const QPoint &, int );
71 void fileClicked( QListViewItem *); 95 void fileClicked( QListViewItem *);
96 void typeSelected( const QString &type );
97 void catSelected( int );
98 void cardMessage( const QCString &, const QByteArray &);
99
100private:
101 void updateView();
102 void updateWhatsThis();
72 103
73private: 104private:
105 const DocLnk *selected(); // use selectedDocument()
74 FileSelectorView *view; 106 FileSelectorView *view;
75 QString filter; 107 QString filter;
76 QToolButton *buttonNew, *buttonClose; 108 QToolButton *buttonNew, *buttonClose;
77 FileSelectorPrivate *d; 109 FileSelectorPrivate *d;
78}; 110};
79 111
80#endif 112#endif
diff --git a/library/fileselector_p.h b/library/fileselector_p.h
index 6bab485..13933ba 100644
--- a/library/fileselector_p.h
+++ b/library/fileselector_p.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -17,40 +17,22 @@
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#ifndef FILESELECTOR_P_H 20#ifndef FILESELECTOR_P_H
21#define FILESELECTOR_P_H 21#define FILESELECTOR_P_H
22 22
23#include <qlistview.h> 23#include <qlistview.h>
24 24
25class FileManager;
26class CategoryMenu;
27class FileSelectorViewPrivate;
28
29class FileSelectorView : public QListView 25class FileSelectorView : public QListView
30{ 26{
31 Q_OBJECT 27 Q_OBJECT
32 28
33public: 29public:
34 FileSelectorView( const QString &mimefilter, QWidget *parent, const char *name ); 30 FileSelectorView( QWidget *parent, const char *name );
35 ~FileSelectorView(); 31 ~FileSelectorView();
36 void reread();
37 int fileCount() { return count; }
38 32
39 void setCategoryFilter(CategoryMenu *);
40protected: 33protected:
41 void keyPressEvent( QKeyEvent *e ); 34 void keyPressEvent( QKeyEvent *e );
42
43protected slots:
44 void cardMessage( const QCString &, const QByteArray &);
45
46 void categoryChanged();
47
48private:
49 QString filter;
50 FileManager *fileManager;
51 int count;
52 FileSelectorViewPrivate *d;
53}; 35};
54 36
55 37
56#endif 38#endif
diff --git a/library/finddialog.cpp b/library/finddialog.cpp
index 904e952..d9f430a 100644
--- a/library/finddialog.cpp
+++ b/library/finddialog.cpp
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2001 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -27,16 +27,17 @@
27 27
28#include <qlayout.h> 28#include <qlayout.h>
29#include <qpushbutton.h> 29#include <qpushbutton.h>
30 30
31FindDialog::FindDialog( const QString &appName, QWidget *parent, 31FindDialog::FindDialog( const QString &appName, QWidget *parent,
32 const char *name, bool modal ) 32 const char *name, bool modal )
33 : QDialog( parent, name, modal ) 33 : QDialog( parent, name, modal )
34{ 34{
35 setCaption( tr("Find") );
35 QVBoxLayout *vb; 36 QVBoxLayout *vb;
36 vb = new QVBoxLayout( this ); 37 vb = new QVBoxLayout( this );
37 fw = new FindWidget( appName, this, "Find Widget" ); 38 fw = new FindWidget( appName, this, "Find Widget" );
38 vb->addWidget( fw ); 39 vb->addWidget( fw );
39 QObject::connect( fw, SIGNAL(signalFindClicked(const QString&, 40 QObject::connect( fw, SIGNAL(signalFindClicked(const QString&,
40 bool,bool,int)), 41 bool,bool,int)),
41 this, SIGNAL(signalFindClicked(const QString&, 42 this, SIGNAL(signalFindClicked(const QString&,
42 bool,bool,int)) ); 43 bool,bool,int)) );
diff --git a/library/finddialog.h b/library/finddialog.h
index 00c7b45..2512533 100644
--- a/library/finddialog.h
+++ b/library/finddialog.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2001 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/library/findwidget_p.cpp b/library/findwidget_p.cpp
index 7ed8bca..9ecaa40 100644
--- a/library/findwidget_p.cpp
+++ b/library/findwidget_p.cpp
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2001 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/library/findwidget_p.h b/library/findwidget_p.h
index 418242c..e1329da 100644
--- a/library/findwidget_p.h
+++ b/library/findwidget_p.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2001 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/library/findwidgetbase_p.ui b/library/findwidgetbase_p.ui
index 5eceaad..393365e 100644
--- a/library/findwidgetbase_p.ui
+++ b/library/findwidgetbase_p.ui
@@ -6,18 +6,18 @@
6 <name>name</name> 6 <name>name</name>
7 <cstring>FindWidgetBase</cstring> 7 <cstring>FindWidgetBase</cstring>
8 </property> 8 </property>
9 <property stdset="1"> 9 <property stdset="1">
10 <name>geometry</name> 10 <name>geometry</name>
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>245</width> 14 <width>246</width>
15 <height>183</height> 15 <height>203</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
19 <name>sizePolicy</name> 19 <name>sizePolicy</name>
20 <sizepolicy> 20 <sizepolicy>
21 <hsizetype>1</hsizetype> 21 <hsizetype>1</hsizetype>
22 <vsizetype>1</vsizetype> 22 <vsizetype>1</vsizetype>
23 </sizepolicy> 23 </sizepolicy>
@@ -30,21 +30,21 @@
30 <name>layoutMargin</name> 30 <name>layoutMargin</name>
31 </property> 31 </property>
32 <property> 32 <property>
33 <name>layoutSpacing</name> 33 <name>layoutSpacing</name>
34 </property> 34 </property>
35 <vbox> 35 <vbox>
36 <property stdset="1"> 36 <property stdset="1">
37 <name>margin</name> 37 <name>margin</name>
38 <number>0</number> 38 <number>6</number>
39 </property> 39 </property>
40 <property stdset="1"> 40 <property stdset="1">
41 <name>spacing</name> 41 <name>spacing</name>
42 <number>0</number> 42 <number>4</number>
43 </property> 43 </property>
44 <widget> 44 <widget>
45 <class>QLayoutWidget</class> 45 <class>QLayoutWidget</class>
46 <property stdset="1"> 46 <property stdset="1">
47 <name>name</name> 47 <name>name</name>
48 <cstring>Layout1</cstring> 48 <cstring>Layout1</cstring>
49 </property> 49 </property>
50 <hbox> 50 <hbox>
@@ -85,17 +85,17 @@
85 <widget> 85 <widget>
86 <class>QPushButton</class> 86 <class>QPushButton</class>
87 <property stdset="1"> 87 <property stdset="1">
88 <name>name</name> 88 <name>name</name>
89 <cstring>cmdFind</cstring> 89 <cstring>cmdFind</cstring>
90 </property> 90 </property>
91 <property stdset="1"> 91 <property stdset="1">
92 <name>text</name> 92 <name>text</name>
93 <string>&amp;Find</string> 93 <string>Find</string>
94 </property> 94 </property>
95 <property stdset="1"> 95 <property stdset="1">
96 <name>default</name> 96 <name>default</name>
97 <bool>true</bool> 97 <bool>true</bool>
98 </property> 98 </property>
99 </widget> 99 </widget>
100 </hbox> 100 </hbox>
101 </widget> 101 </widget>
@@ -225,16 +225,24 @@
225 </widget> 225 </widget>
226 <widget> 226 <widget>
227 <class>QLabel</class> 227 <class>QLabel</class>
228 <property stdset="1"> 228 <property stdset="1">
229 <name>name</name> 229 <name>name</name>
230 <cstring>lblStatus</cstring> 230 <cstring>lblStatus</cstring>
231 </property> 231 </property>
232 <property stdset="1"> 232 <property stdset="1">
233 <name>frameShape</name>
234 <enum>Panel</enum>
235 </property>
236 <property stdset="1">
237 <name>frameShadow</name>
238 <enum>Sunken</enum>
239 </property>
240 <property stdset="1">
233 <name>text</name> 241 <name>text</name>
234 <string></string> 242 <string></string>
235 </property> 243 </property>
236 </widget> 244 </widget>
237 </vbox> 245 </vbox>
238</widget> 246</widget>
239<customwidgets> 247<customwidgets>
240 <customwidget> 248 <customwidget>
diff --git a/library/fontdatabase.cpp b/library/fontdatabase.cpp
index 50dcf3d..c64e645 100644
--- a/library/fontdatabase.cpp
+++ b/library/fontdatabase.cpp
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -19,17 +19,19 @@
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "qpeapplication.h" 21#include "qpeapplication.h"
22#include "fontfactoryinterface.h" 22#include "fontfactoryinterface.h"
23#include "fontdatabase.h" 23#include "fontdatabase.h"
24 24
25#include <qpe/qlibrary.h> 25#include <qpe/qlibrary.h>
26 26
27#ifdef QWS
27#include <qfontmanager_qws.h> 28#include <qfontmanager_qws.h>
29#endif
28#include <qdir.h> 30#include <qdir.h>
29#include <qdict.h> 31#include <qdict.h>
30#include <stdio.h> 32#include <stdio.h>
31#include <stdlib.h> 33#include <stdlib.h>
32 34
33static QString fontDir() 35static QString fontDir()
34{ 36{
35 QString qtdir = getenv("QTDIR"); 37 QString qtdir = getenv("QTDIR");
@@ -53,46 +55,44 @@ static QString fontFamily( const QString& key )
53#endif 55#endif
54 56
55QValueList<FontFactory> *FontDatabase::factoryList = 0; 57QValueList<FontFactory> *FontDatabase::factoryList = 0;
56 58
57/*! 59/*!
58 \class FontDatabase fontdatabase.h 60 \class FontDatabase fontdatabase.h
59 \brief The FontDatabase class provides information about available fonts. 61 \brief The FontDatabase class provides information about available fonts.
60 62
61 Provides information about available fonts. 63 Most often you will simply want to query the database for the
62 64 available font families().
63 FontDatabase provides information about the available fonts of the
64 underlying window system.
65 65
66 Most often you will simply want to query the database for all font 66 Use FontDatabase rather than QFontDatabase when you may need access
67 families(), and their respective pointSizes(), styles() and charSets(). 67 to fonts that are not normally available. For example, if the
68 freetype library and the Qtopia freetype plugin are installed,
69 TrueType fonts will be available to your application. Font renderer
70 plugins have greater resource requirements than system fonts so they
71 should be used only when necessary. You can force the loading of
72 font renderer plugins with loadRenderers().
68 73
69 Use FontDatabase rather than QFontDatabase when you may need access to 74 \ingroup qtopiaemb
70 fonts not normally available. For example, if the freetype library and
71 Qtopia freetype plugin are installed TrueType fonts will be available
72 to your application. Font renderer plugins have greater resource
73 requirements than the system fonts so they should be used only when
74 necessary.
75*/ 75*/
76 76
77/*! 77/*!
78 Constructs the FontDatabase class. 78 Constructs a FontDatabase object.
79*/ 79*/
80FontDatabase::FontDatabase() 80FontDatabase::FontDatabase()
81#ifndef QT_NO_FONTDATABASE 81#ifndef QT_NO_FONTDATABASE
82 : QFontDatabase() 82 : QFontDatabase()
83#endif 83#endif
84{ 84{
85 if ( !factoryList ) 85 if ( !factoryList )
86 loadRenderers(); 86 loadRenderers();
87} 87}
88 88
89/*! 89/*!
90 Returns a list of names of all available font families. 90 Returns a list of names of all the available font families.
91*/ 91*/
92QStringList FontDatabase::families() const 92QStringList FontDatabase::families() const
93{ 93{
94#ifndef QT_NO_FONTDATABASE 94#ifndef QT_NO_FONTDATABASE
95 return QFontDatabase::families(); 95 return QFontDatabase::families();
96#else 96#else
97 QStringList list; 97 QStringList list;
98 QDict<void> familyDict; 98 QDict<void> familyDict;
@@ -136,18 +136,18 @@ QValueList<int> FontDatabase::standardSizes()
136 sList.append( s[i++] ); 136 sList.append( s[i++] );
137 } 137 }
138 return sList; 138 return sList;
139} 139}
140 140
141#endif 141#endif
142 142
143/*! 143/*!
144 Load any font renderer plugins that are available and make fonts that 144 Load any font renderer plugins that are available and make the fonts
145 the plugins can read available. 145 that the plugins can read available.
146*/ 146*/
147void FontDatabase::loadRenderers() 147void FontDatabase::loadRenderers()
148{ 148{
149#ifndef QT_NO_COMPONENT 149#ifndef QT_NO_COMPONENT
150 if ( !factoryList ) 150 if ( !factoryList )
151 factoryList = new QValueList<FontFactory>; 151 factoryList = new QValueList<FontFactory>;
152 152
153 QValueList<FontFactory>::Iterator mit; 153 QValueList<FontFactory>::Iterator mit;
@@ -183,17 +183,16 @@ void FontDatabase::loadRenderers()
183#endif 183#endif
184} 184}
185 185
186/*! 186/*!
187 \internal 187 \internal
188*/ 188*/
189void FontDatabase::readFonts( QFontFactory *factory ) 189void FontDatabase::readFonts( QFontFactory *factory )
190{ 190{
191
192 // Load in font definition file 191 // Load in font definition file
193 QString fn = fontDir() + "fontdir"; 192 QString fn = fontDir() + "fontdir";
194 FILE* fontdef=fopen(fn.local8Bit(),"r"); 193 FILE* fontdef=fopen(fn.local8Bit(),"r");
195 if(!fontdef) { 194 if(!fontdef) {
196 QCString temp=fn.local8Bit(); 195 QCString temp=fn.local8Bit();
197 qWarning("Cannot find font definition file %s - is $QTDIR set correctly?", 196 qWarning("Cannot find font definition file %s - is $QTDIR set correctly?",
198 temp.data()); 197 temp.data());
199 return; 198 return;
@@ -215,21 +214,19 @@ void FontDatabase::readFonts( QFontFactory *factory )
215 if ( file[0] != '/' ) 214 if ( file[0] != '/' )
216 filename = fontDir(); 215 filename = fontDir();
217 filename += file; 216 filename += file;
218 if ( QFile::exists(filename) ) { 217 if ( QFile::exists(filename) ) {
219 if( factory->name() == render ) { 218 if( factory->name() == render ) {
220 QDiskFont * qdf=new QDiskFont(factory,name,isitalic[0]=='y', 219 QDiskFont * qdf=new QDiskFont(factory,name,isitalic[0]=='y',
221 weight,size,flags,filename); 220 weight,size,flags,filename);
222 qt_fontmanager->diskfonts.append(qdf); 221 qt_fontmanager->diskfonts.append(qdf);
223#ifndef QT_NO_FONTDATABASE
224#if QT_VERSION >= 232 222#if QT_VERSION >= 232
225 QFontDatabase::qwsAddDiskFont( qdf ); 223 QFontDatabase::qwsAddDiskFont( qdf );
226#endif 224#endif
227#endif
228 } 225 }
229 } 226 }
230 } 227 }
231 fgets(buf,200,fontdef); 228 fgets(buf,200,fontdef);
232 } 229 }
233 fclose(fontdef); 230 fclose(fontdef);
234} 231}
235 232
diff --git a/library/fontdatabase.h b/library/fontdatabase.h
index 9160ab0..10aec91 100644
--- a/library/fontdatabase.h
+++ b/library/fontdatabase.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/library/fontmanager.cpp b/library/fontmanager.cpp
index adbe57b..28a5212 100644
--- a/library/fontmanager.cpp
+++ b/library/fontmanager.cpp
@@ -1,28 +1,29 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#ifdef QWS
21#include "fontmanager.h" 22#include "fontmanager.h"
22#include <qfile.h> 23#include <qfile.h>
23#include <stdlib.h> 24#include <stdlib.h>
24#include <qgfx_qws.h> 25#include <qgfx_qws.h>
25 26
26 27
27 28
28/* 29/*
@@ -94,8 +95,9 @@ QFont FontManager::unicodeFont( Spacing sp )
94 } else { 95 } else {
95 fontName = "Helvetica"; 96 fontName = "Helvetica";
96 size = 14; 97 size = 14;
97 } 98 }
98 } 99 }
99 } 100 }
100 return QFont(fontName,size); 101 return QFont(fontName,size);
101} 102}
103#endif
diff --git a/library/fontmanager.h b/library/fontmanager.h
index 7498df8..c4d2c78 100644
--- a/library/fontmanager.h
+++ b/library/fontmanager.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/library/global.cpp b/library/global.cpp
index ab27b3f..7438891 100644
--- a/library/global.cpp
+++ b/library/global.cpp
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -40,28 +40,30 @@
40 40
41#include <stdlib.h> 41#include <stdlib.h>
42#include <sys/stat.h> 42#include <sys/stat.h>
43#include <sys/wait.h> 43#include <sys/wait.h>
44#include <sys/types.h> 44#include <sys/types.h>
45#include <fcntl.h> 45#include <fcntl.h>
46#include <unistd.h> 46#include <unistd.h>
47 47
48#ifdef QWS
48#include <qwindowsystem_qws.h> // for qwsServer 49#include <qwindowsystem_qws.h> // for qwsServer
50#endif
49#include <qdatetime.h> 51#include <qdatetime.h>
50 52
51#include <qfile.h> 53#include <qfile.h>
52 54
53namespace { 55namespace {
54 // checks if the storage should be searched 56 // checks if the storage should be searched
55 bool checkStorage(const QString &path ){ // this is a small Config replacement cause config is too limited -zecke 57 bool checkStorage(const QString &path ){ // this is a small Config replacement cause config is too limited -zecke
56 QFile file(path ); 58 QFile file(path );
57 if(!file.open(IO_ReadOnly ) ) 59 if(!file.open(IO_ReadOnly ) )
58 return true; 60 return true;
59 61
60 QByteArray array = file.readAll(); 62 QByteArray array = file.readAll();
61 QStringList list = QStringList::split('\n', QString( array ) ); 63 QStringList list = QStringList::split('\n', QString( array ) );
62 for(QStringList::Iterator it = list.begin(); it != list.end(); ++it ){ 64 for(QStringList::Iterator it = list.begin(); it != list.end(); ++it ){
63 if( (*it).startsWith("autocheck = 0" ) ){ 65 if( (*it).startsWith("autocheck = 0" ) ){
64 return false; 66 return false;
65 }else if( (*it).startsWith("autocheck = 1" ) ){ 67 }else if( (*it).startsWith("autocheck = 1" ) ){
66 return true; 68 return true;
67 } 69 }
@@ -103,21 +105,23 @@ private:
103 static StartingAppList *appl; 105 static StartingAppList *appl;
104}; 106};
105 107
106StartingAppList* StartingAppList::appl = 0; 108StartingAppList* StartingAppList::appl = 0;
107 109
108StartingAppList::StartingAppList( QObject *parent, const char* name ) 110StartingAppList::StartingAppList( QObject *parent, const char* name )
109 :QObject( parent, name ) 111 :QObject( parent, name )
110{ 112{
113#ifdef QWS
111#if QT_VERSION >= 232 && !defined(QT_NO_COP) 114#if QT_VERSION >= 232 && !defined(QT_NO_COP)
112 connect( qwsServer, SIGNAL( newChannel(const QString&)), 115 connect( qwsServer, SIGNAL( newChannel(const QString&)),
113 this, SLOT( handleNewChannel(const QString&)) ); 116 this, SLOT( handleNewChannel(const QString&)) );
114 dict.setAutoDelete( TRUE ); 117 dict.setAutoDelete( TRUE );
115#endif 118#endif
119#endif
116} 120}
117 121
118void StartingAppList::add( const QString& name ) 122void StartingAppList::add( const QString& name )
119{ 123{
120#if QT_VERSION >= 232 && !defined(QT_NO_COP) 124#if QT_VERSION >= 232 && !defined(QT_NO_COP)
121 if ( !appl ) 125 if ( !appl )
122 appl = new StartingAppList; 126 appl = new StartingAppList;
123 QTime *t = new QTime; 127 QTime *t = new QTime;
@@ -164,17 +168,65 @@ static QString qpeDir()
164 168
165static QString dictDir() 169static QString dictDir()
166{ 170{
167 return qpeDir() + "/etc/dict"; 171 return qpeDir() + "/etc/dict";
168} 172}
169 173
170/*! 174/*!
171 \class Global global.h 175 \class Global global.h
172 \brief The Global class collects application-wide global functions. 176 \brief The Global class provides application-wide global functions.
177
178 The Global functions are grouped as follows:
179 \tableofcontents
180
181 \section1 User Interface
182
183 The statusMessage() function provides short-duration messages to the
184 user. The showInputMethod() function shows the current input method,
185 and hideInputMethod() hides the input method.
186
187 \section1 Document related
188
189 The findDocuments() function creates a set of \link doclnk.html
190 DocLnk\endlink objects in a particular folder.
191
192 \section1 Filesystem related
193
194 Global provides an applicationFileName() function that returns the
195 full path of an application-specific file.
196
197 The execute() function runs an application.
198
199 \section1 Word list related
200
201 A list of words relevant to the current locale is maintained by the
202 system. The list is held in a \link qdawg.html DAWG\endlink
203 (implemented by the QDawg class). This list is used, for example, by
204 the pickboard input method.
205
206 The global QDawg is returned by fixedDawg(); this cannot be updated.
207 An updatable copy of the global QDawg is returned by addedDawg().
208 Applications may have their own word lists stored in \l{QDawg}s
209 which are returned by dawg(). Use addWords() to add words to the
210 updateable copy of the global QDawg or to named application
211 \l{QDawg}s.
212
213 \section1 Quoting
214
215 The shellQuote() function quotes a string suitable for passing to a
216 shell. The stringQuote() function backslash escapes '\' and '"'
217 characters.
218
219 \section1 Hardware
220
221 The writeHWClock() function sets the hardware clock to the system
222 clock's date and time.
223
224 \ingroup qtopiaemb
173*/ 225*/
174 226
175/*! 227/*!
176 \internal 228 \internal
177*/ 229*/
178Global::Global() 230Global::Global()
179{ 231{
180} 232}
@@ -247,60 +299,70 @@ const QDawg& Global::dawg(const QString& name)
247{ 299{
248 createDocDir(); 300 createDocDir();
249 if ( !named_dawg ) 301 if ( !named_dawg )
250 named_dawg = new QDict<QDawg>; 302 named_dawg = new QDict<QDawg>;
251 QDawg* r = named_dawg->find(name); 303 QDawg* r = named_dawg->find(name);
252 if ( !r ) { 304 if ( !r ) {
253 r = new QDawg; 305 r = new QDawg;
254 named_dawg->insert(name,r); 306 named_dawg->insert(name,r);
255 QString dawgfilename = dictDir() + "/" + name + ".dawg"; 307 QString dawgfilename = applicationFileName("Dictionary", name ) + ".dawg";
256 QFile dawgfile(dawgfilename); 308 QFile dawgfile(dawgfilename);
257 if ( dawgfile.open(IO_ReadOnly) ) 309 if ( dawgfile.open(IO_ReadOnly) )
258 r->readFile(dawgfilename); 310 r->readFile(dawgfilename);
259 } 311 }
260 return *r; 312 return *r;
261} 313}
262 314
263/*! 315/*!
316 \overload
264 Adds \a wordlist to the addedDawg(). 317 Adds \a wordlist to the addedDawg().
318
319 Note that the addition of words persists between program executions
320 (they are saved in the dictionary files), so you should confirm the
321 words with the user before adding them.
265*/ 322*/
266void Global::addWords(const QStringList& wordlist) 323void Global::addWords(const QStringList& wordlist)
267{ 324{
268 addWords("local",wordlist); 325 addWords("local",wordlist);
269} 326}
270 327
271/*! 328/*!
272 Adds \a wordlist to the dawg() named \a dictname. 329 \overload
330 Adds \a wordlist to the addedDawg().
331
332 Note that the addition of words persists between program executions
333 (they are saved in the dictionary files), so you should confirm the
334 words with the user before adding them.
273*/ 335*/
274void Global::addWords(const QString& dictname, const QStringList& wordlist) 336void Global::addWords(const QString& dictname, const QStringList& wordlist)
275{ 337{
276 QDawg& d = (QDawg&)dawg(dictname); 338 QDawg& d = (QDawg&)dawg(dictname);
277 QStringList all = d.allWords() + wordlist; 339 QStringList all = d.allWords() + wordlist;
278 d.createFromWords(all); 340 d.createFromWords(all);
279 341
280 QString dawgfilename = dictDir() + "/" + dictname + ".dawg"; 342 QString dawgfilename = applicationFileName("Dictionary", dictname) + ".dawg";
281 QFile dawgfile(dawgfilename); 343 QFile dawgfile(dawgfilename);
282 if ( dawgfile.open(IO_WriteOnly) ) { 344 if ( dawgfile.open(IO_WriteOnly) ) {
283 d.write(&dawgfile); 345 d.write(&dawgfile);
284 dawgfile.close(); 346 dawgfile.close();
285 } 347 }
286 348
287 // #### Re-read the dawg here if we use mmap(). 349 // #### Re-read the dawg here if we use mmap().
288 350
289 // #### Signal other processes to re-read. 351 // #### Signal other processes to re-read.
290} 352}
291 353
292 354
293/*! 355/*!
294 Returns a full path for the application named \a appname, with the 356 Returns the full path for the application called \a appname, with the
295 given \a filename or QString::null if there was a problem creating 357 given \a filename. Returns QString::null if there was a problem creating
296 the directory tree for \a appname. 358 the directory tree for \a appname.
297 If \a filename contains "/", it is the caller's responsibility to 359 If \a filename contains "/", it is the caller's responsibility to
298 ensure those directories exist. 360 ensure that those directories exist.
299*/ 361*/
300QString Global::applicationFileName(const QString& appname, const QString& filename) 362QString Global::applicationFileName(const QString& appname, const QString& filename)
301{ 363{
302 QDir d; 364 QDir d;
303 QString r = getenv("HOME"); 365 QString r = getenv("HOME");
304 r += "/Applications/"; 366 r += "/Applications/";
305 if ( !QFile::exists( r ) ) 367 if ( !QFile::exists( r ) )
306 if ( d.mkdir(r) == false ) 368 if ( d.mkdir(r) == false )
@@ -321,18 +383,18 @@ void Global::createDocDir()
321 if ( !docDirCreated ) { 383 if ( !docDirCreated ) {
322 docDirCreated = TRUE; 384 docDirCreated = TRUE;
323 mkdir( QPEApplication::documentDir().latin1(), 0755 ); 385 mkdir( QPEApplication::documentDir().latin1(), 0755 );
324 } 386 }
325} 387}
326 388
327 389
328/*! 390/*!
329 Displays a status \a message to the user. This generally appears 391 Displays a status \a message to the user. This usually appears
330 in the taskbar for some amount of time, then disappears. 392 in the taskbar for a short amount of time, then disappears.
331*/ 393*/
332void Global::statusMessage(const QString& message) 394void Global::statusMessage(const QString& message)
333{ 395{
334#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 396#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
335 QCopEnvelope e( "QPE/TaskBar", "message(QString)" ); 397 QCopEnvelope e( "QPE/TaskBar", "message(QString)" );
336 e << message; 398 e << message;
337#endif 399#endif
338} 400}
@@ -368,26 +430,38 @@ QWidget *Global::restart( bool )
368#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 430#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
369 QCopChannel::send( "QPE/System", "restart()" ); 431 QCopChannel::send( "QPE/System", "restart()" );
370#endif 432#endif
371 return 0; 433 return 0;
372} 434}
373 435
374/*! 436/*!
375 Explicitly show the current input method. 437 Explicitly show the current input method.
438
439 Input methods are indicated in the taskbar by a small icon. If the
440 input method is activated (shown) then it takes up some proportion
441 of the bottom of the screen, to allow the user to interact (input
442 characters) with it.
443
444 \sa hideInputMethod()
376*/ 445*/
377void Global::showInputMethod() 446void Global::showInputMethod()
378{ 447{
379#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 448#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
380 QCopChannel::send( "QPE/TaskBar", "showInputMethod()" ); 449 QCopChannel::send( "QPE/TaskBar", "showInputMethod()" );
381#endif 450#endif
382} 451}
383 452
384/*! 453/*!
385 Explicitly hide the current input method. 454 Explicitly hide the current input method.
455
456 The current input method is still indicated in the taskbar, but no
457 longer takes up screen space, and can no longer be interacted with.
458
459 \sa showInputMethod()
386*/ 460*/
387void Global::hideInputMethod() 461void Global::hideInputMethod()
388{ 462{
389#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 463#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
390 QCopChannel::send( "QPE/TaskBar", "hideInputMethod()" ); 464 QCopChannel::send( "QPE/TaskBar", "hideInputMethod()" );
391#endif 465#endif
392} 466}
393 467
@@ -460,40 +534,46 @@ bool Global::terminateBuiltin( const QString& n )
460 534
461/*! 535/*!
462 \internal 536 \internal
463*/ 537*/
464void Global::terminate( const AppLnk* app ) 538void Global::terminate( const AppLnk* app )
465{ 539{
466 //if ( terminateBuiltin(app->exec()) ) return; // maybe? haven't tried this 540 //if ( terminateBuiltin(app->exec()) ) return; // maybe? haven't tried this
467 541
542#ifndef QT_NO_COP
468 QCString channel = "QPE/Application/" + app->exec().utf8(); 543 QCString channel = "QPE/Application/" + app->exec().utf8();
469 if ( QCopChannel::isRegistered(channel) ) { 544 if ( QCopChannel::isRegistered(channel) ) {
470 QCopEnvelope e(channel, "quit()"); 545 QCopEnvelope e(channel, "quit()");
471 } 546 }
547#endif
472} 548}
473 549
474/*! 550/*!
475 Low-level function to run command \a c. Not recommended. 551 Low-level function to run command \a c.
552
553 \warning Do not use this function. Use execute instead.
554
555 \sa execute()
476*/ 556*/
477void Global::invoke(const QString &c) 557void Global::invoke(const QString &c)
478{ 558{
479 // Convert the command line in to a list of arguments 559 // Convert the command line in to a list of arguments
480 QStringList list = QStringList::split(QRegExp(" *"),c); 560 QStringList list = QStringList::split(QRegExp(" *"),c);
481 561
482#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 562#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
483 QString ap=list[0]; 563 QString ap=list[0];
484 // see if the application is already running 564 // see if the application is already running
485 // XXX should lock file /tmp/qcop-msg-ap 565 // XXX should lock file /tmp/qcop-msg-ap
486 if ( QCopChannel::isRegistered( ("QPE/Application/" + ap).latin1() ) ) { 566 if ( QCopChannel::isRegistered( ("QPE/Application/" + ap).latin1() ) ) {
487 QCopEnvelope e("QPE/System", "notBusy(QString)" ); 567 QCopEnvelope e("QPE/System", "notBusy(QString)" );
488 e << ap; 568 e << ap;
489 return; 569 return;
490 } 570 }
491 // XXX should unlock file /tmp/qcop-msg-ap 571 // XXX should unlock file /tmp/qcop-msg-ap
492 //see if it is being started 572 //see if it is being started
493 if ( StartingAppList::isStarting( ap ) ) { 573 if ( StartingAppList::isStarting( ap ) ) {
494 QCopEnvelope e("QPE/System", "notBusy(QString)" ); 574 QCopEnvelope e("QPE/System", "notBusy(QString)" );
495 e << ap; 575 e << ap;
496 return; 576 return;
497 } 577 }
498 578
499#endif 579#endif
@@ -519,38 +599,40 @@ void Global::invoke(const QString &c)
519#endif 599#endif
520 600
521#ifdef HAVE_QUICKEXEC 601#ifdef HAVE_QUICKEXEC
522 QString libexe = qpeDir()+"/binlib/lib"+args[0] + ".so"; 602 QString libexe = qpeDir()+"/binlib/lib"+args[0] + ".so";
523 qDebug("libfile = %s", libexe.latin1() ); 603 qDebug("libfile = %s", libexe.latin1() );
524 if ( QFile::exists( libexe ) ) { 604 if ( QFile::exists( libexe ) ) {
525 qDebug("calling quickexec %s", libexe.latin1() ); 605 qDebug("calling quickexec %s", libexe.latin1() );
526 quickexecv( libexe.utf8().data(), (const char **)args ); 606 quickexecv( libexe.utf8().data(), (const char **)args );
527 } else 607 } else
528#endif 608#endif
529 { 609 {
530 if ( !::vfork() ) { 610 if ( !::vfork() ) {
531 for ( int fd = 3; fd < 100; fd++ ) 611 for ( int fd = 3; fd < 100; fd++ )
532 ::close( fd ); 612 ::close( fd );
533 ::setpgid( ::getpid(), ::getppid() ); 613 ::setpgid( ::getpid(), ::getppid() );
534 // Try bindir first, so that foo/bar works too 614 // Try bindir first, so that foo/bar works too
535 ::execv( qpeDir()+"/bin/"+args[0], (char * const *)args ); 615 ::execv( qpeDir()+"/bin/"+args[0], (char * const *)args );
536 ::execvp( args[0], (char * const *)args ); 616 ::execvp( args[0], (char * const *)args );
537 _exit( -1 ); 617 _exit( -1 );
538 } 618 }
539 } 619 }
540 StartingAppList::add( list[0] ); 620 StartingAppList::add( list[0] );
541#endif //QT_NO_QWS_MULTIPROCESS 621#endif //QT_NO_QWS_MULTIPROCESS
542} 622}
543 623
624
544/*! 625/*!
545 Executes application identfied by \a c, passing \a document. 626 Executes the application identfied by \a c, passing \a
627 document if it isn't null.
546 628
547 Note that you might be better off sending a QCop message to 629 Note that a better approach might be to send a QCop message to the
548 the application's QPE/Application/<i>appname</i> channel. 630 application's QPE/Application/\e{appname} channel.
549*/ 631*/
550void Global::execute( const QString &c, const QString& document ) 632void Global::execute( const QString &c, const QString& document )
551{ 633{
552 if ( qApp->type() != QApplication::GuiServer ) { 634 if ( qApp->type() != QApplication::GuiServer ) {
553 // ask the server to do the work 635 // ask the server to do the work
554#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 636#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
555 if ( document.isNull() ) { 637 if ( document.isNull() ) {
556 QCopEnvelope e( "QPE/System", "execute(QString)" ); 638 QCopEnvelope e( "QPE/System", "execute(QString)" );
@@ -572,50 +654,55 @@ void Global::execute( const QString &c, const QString& document )
572 if ( !document.isNull() && builtin[i].documentary ) 654 if ( !document.isNull() && builtin[i].documentary )
573 setDocument(running[i], document); 655 setDocument(running[i], document);
574 running[i]->raise(); 656 running[i]->raise();
575 running[i]->show(); 657 running[i]->show();
576 running[i]->setActiveWindow(); 658 running[i]->setActiveWindow();
577 } else { 659 } else {
578 running[i] = builtin[i].func( builtin[i].maximized ); 660 running[i] = builtin[i].func( builtin[i].maximized );
579 } 661 }
662#ifndef QT_NO_COP
580 QCopEnvelope e("QPE/System", "notBusy(QString)" ); 663 QCopEnvelope e("QPE/System", "notBusy(QString)" );
581 e << c; // that was quick ;-) 664 e << c; // that was quick ;-)
665#endif
582 return; 666 return;
583 } 667 }
584 } 668 }
585 } 669 }
586 670
587 //Global::invoke(c, document); 671 //Global::invoke(c, document);
588 672
589 // Convert the command line in to a list of arguments 673 // Convert the command line in to a list of arguments
590 QStringList list = QStringList::split(QRegExp(" *"),c); 674 QStringList list = QStringList::split(QRegExp(" *"),c);
591 675
592#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 676#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
593 QString ap=list[0]; 677 QString ap=list[0];
594 678
595 qDebug("executing %s", ap.latin1() ); 679 qDebug("executing %s", ap.latin1() );
596 if ( ap == "suspend" ) { 680 if ( ap == "suspend" ) {
597 QWSServer::sendKeyEvent( 0xffff, Qt::Key_F34, FALSE, TRUE, FALSE ); 681 QWSServer::sendKeyEvent( 0xffff, Qt::Key_F34, FALSE, TRUE, FALSE );
598 return; 682 return;
599 } 683 }
600 684
601 /* if need be, sending a qcop message will result in an invoke, see 685 /* if need be, sending a qcop message will result in an invoke, see
602 preceeding function */ 686 preceeding function */
603 { QCopEnvelope env( ("QPE/Application/" + ap).latin1(), "raise()" ); } 687 invoke( ap );
688 //{ QCopEnvelope env( ("QPE/Application/" + ap).latin1(), "raise()" ); }
604 if ( !document.isEmpty() ) { 689 if ( !document.isEmpty() ) {
605 QCopEnvelope env( ("QPE/Application/" + ap).latin1(), "setDocument(QString)" ); 690 QCopEnvelope env( ("QPE/Application/" + ap).latin1(), "setDocument(QString)" );
606 env << document; 691 env << document;
607 } 692 }
608#endif 693#endif
609} 694}
610 695
611/*! 696/*!
612 Returns the string \a s with the characters backslash, ", and $ 697 Returns the string \a s with the characters '\', '"', and '$' quoted
613 quoted by a preceeding backslash. 698 by a preceeding '\'.
699
700 \sa stringQuote()
614*/ 701*/
615QString Global::shellQuote(const QString& s) 702QString Global::shellQuote(const QString& s)
616{ 703{
617 QString r="\""; 704 QString r="\"";
618 for (int i=0; i<(int)s.length(); i++) { 705 for (int i=0; i<(int)s.length(); i++) {
619 char c = s[i].latin1(); 706 char c = s[i].latin1();
620 switch (c) { 707 switch (c) {
621 case '\\': case '"': case '$': 708 case '\\': case '"': case '$':
@@ -623,18 +710,20 @@ QString Global::shellQuote(const QString& s)
623 } 710 }
624 r += s[i]; 711 r += s[i];
625 } 712 }
626 r += "\""; 713 r += "\"";
627 return r; 714 return r;
628} 715}
629 716
630/*! 717/*!
631 Returns the string \a s with the characters backslash and " 718 Returns the string \a s with the characters '\' and '"' quoted by a
632 quoted by a preceeding backslash. 719 preceeding '\'.
720
721 \sa shellQuote()
633*/ 722*/
634QString Global::stringQuote(const QString& s) 723QString Global::stringQuote(const QString& s)
635{ 724{
636 QString r="\""; 725 QString r="\"";
637 for (int i=0; i<(int)s.length(); i++) { 726 for (int i=0; i<(int)s.length(); i++) {
638 char c = s[i].latin1(); 727 char c = s[i].latin1();
639 switch (c) { 728 switch (c) {
640 case '\\': case '"': 729 case '\\': case '"':
@@ -656,31 +745,31 @@ void Global::findDocuments(DocLnkSet* folder, const QString &mimefilter)
656 QString homedocs = QString(getenv("HOME")) + "/Documents"; 745 QString homedocs = QString(getenv("HOME")) + "/Documents";
657 DocLnkSet d(homedocs,mimefilter); 746 DocLnkSet d(homedocs,mimefilter);
658 folder->appendFrom(d); 747 folder->appendFrom(d);
659 /** let's do intellegint way of searching these files 748 /** let's do intellegint way of searching these files
660 * a) the user don't want to check mediums global 749 * a) the user don't want to check mediums global
661 * b) the user wants to check but use the global options for it 750 * b) the user wants to check but use the global options for it
662 * c) the user wants to check it but not this medium 751 * c) the user wants to check it but not this medium
663 * d) the user wants to check and this medium as well 752 * d) the user wants to check and this medium as well
664 * 753 *
665 * In all cases we need to apply a different mimefilter to 754 * In all cases we need to apply a different mimefilter to
666 * the medium. 755 * the medium.
667 * a) mimefilter.isEmpty() we need to apply the responding filter 756 * a) mimefilter.isEmpty() we need to apply the responding filter
668 * either the global or the one on the medium 757 * either the global or the one on the medium
669 * 758 *
670 * b) mimefilter is set to an application we need to find out if the 759 * b) mimefilter is set to an application we need to find out if the
671 * mimetypes are included in the mime mask of the medium 760 * mimetypes are included in the mime mask of the medium
672 */ 761 */
673 StorageInfo storage; 762 StorageInfo storage;
674 const QList<FileSystem> &fs = storage.fileSystems(); 763 const QList<FileSystem> &fs = storage.fileSystems();
675 QListIterator<FileSystem> it ( fs ); 764 QListIterator<FileSystem> it ( fs );
676 for ( ; it.current(); ++it ) { 765 for ( ; it.current(); ++it ) {
677 if ( (*it)->isRemovable() ) { // let's find out if we should search on it 766 if ( (*it)->isRemovable() ) { // let's find out if we should search on it
678 // this is a candidate look at the cf and see if we should search on it 767 // this is a candidate look at the cf and see if we should search on it
679 QString path = (*it)->path(); 768 QString path = (*it)->path();
680 if( !checkStorage((*it)->path() + "/.opiestorage.cf" ) ) 769 if( !checkStorage((*it)->path() + "/.opiestorage.cf" ) )
681 continue; 770 continue;
682 DocLnkSet ide( path, mimefilter ); 771 DocLnkSet ide( path, mimefilter );
683 folder->appendFrom(ide); 772 folder->appendFrom(ide);
684 } else if ( (*it)->disk() == "/dev/mtdblock6" || (*it)->disk() == "tmpfs" ) { 773 } else if ( (*it)->disk() == "/dev/mtdblock6" || (*it)->disk() == "tmpfs" ) {
685 QString path = (*it)->path() + "/Documents"; 774 QString path = (*it)->path() + "/Documents";
686 DocLnkSet ide( path, mimefilter ); 775 DocLnkSet ide( path, mimefilter );
@@ -708,23 +797,17 @@ QStringList Global::helpPath()
708 QStringList path; 797 QStringList path;
709 QStringList langs = Global::languageList(); 798 QStringList langs = Global::languageList();
710 for (QStringList::ConstIterator it = langs.fromLast(); it!=langs.end(); --it) { 799 for (QStringList::ConstIterator it = langs.fromLast(); it!=langs.end(); --it) {
711 QString lang = *it; 800 QString lang = *it;
712 if ( !lang.isEmpty() ) 801 if ( !lang.isEmpty() )
713 path += QPEApplication::qpeDir() + "/help/" + lang + "/html"; 802 path += QPEApplication::qpeDir() + "/help/" + lang + "/html";
714 } 803 }
715 path += QPEApplication::qpeDir() + "/pics"; 804 path += QPEApplication::qpeDir() + "/pics";
716 path += QPEApplication::qpeDir() + "/help/en/html"; 805 path += QPEApplication::qpeDir() + "/help/html";
717 path += QPEApplication::qpeDir() + "/docs"; 806 path += QPEApplication::qpeDir() + "/docs";
718 QString dir = QDir::current().canonicalPath(); 807
719 if ( dir == "/" ) 808
720 dir += "/docs";
721 else {
722 path += dir + "/../pics";
723 dir += "/../docs";
724 path += dir;
725 }
726 return path; 809 return path;
727} 810}
728 811
729 812
730#include "global.moc" 813#include "global.moc"
diff --git a/library/global.h b/library/global.h
index fdf8754..1136b12 100644
--- a/library/global.h
+++ b/library/global.h
@@ -1,13 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2002 Holger 'zecke' Freyther <freyther@kde.org> 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** Copyright (C) 2000 Trolltech AS. All rights reserved.
4** 3**
5** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
6** 5**
7** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
8** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
9** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
10** packaging of this file. 9** packaging of this file.
11** 10**
12** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
13** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -41,30 +40,27 @@ public:
41 40
42 static void addWords(const QStringList& word); 41 static void addWords(const QStringList& word);
43 static void addWords(const QString& dictname, const QStringList& word); 42 static void addWords(const QString& dictname, const QStringList& word);
44 // static void removeWords(const QStringList& word); -- if someone wants it 43 // static void removeWords(const QStringList& word); -- if someone wants it
45 44
46 static void createDocDir(); 45 static void createDocDir();
47 46
48 static void findDocuments(DocLnkSet* folder, const QString &mimefilter=QString::null); 47 static void findDocuments(DocLnkSet* folder, const QString &mimefilter=QString::null);
49 // we don't need a mimefilter. Same as above but this is fast as light speed or not ;)
50 //static void findNewDocuments( DocLnkSet* folder );
51 48
52 static QString applicationFileName(const QString& appname, const QString& filename); 49 static QString applicationFileName(const QString& appname, const QString& filename);
53 50
54 struct Command { 51 struct Command {
55 const char *file; 52 const char *file;
56 QWidget *(*func)( bool ); 53 QWidget *(*func)( bool );
57 bool maximized; 54 bool maximized;
58 bool documentary; 55 bool documentary;
59 }; 56 };
60 static void setBuiltinCommands( Command* ); 57 static void setBuiltinCommands( Command* );
61 58
62 static void invoke( const QString &exec);
63 static void execute( const QString &exec, const QString &document=QString::null ); 59 static void execute( const QString &exec, const QString &document=QString::null );
64 static void setDocument( QWidget* receiver, const QString& document ); 60 static void setDocument( QWidget* receiver, const QString& document );
65 static bool terminateBuiltin( const QString& ); 61 static bool terminateBuiltin( const QString& );
66 static void terminate( const AppLnk* ); 62 static void terminate( const AppLnk* );
67 63
68 static bool isBuiltinCommand( const QString &name ); 64 static bool isBuiltinCommand( const QString &name );
69 65
70 // system messaging 66 // system messaging
@@ -81,13 +77,14 @@ public:
81 static QString stringQuote(const QString& s); 77 static QString stringQuote(const QString& s);
82 78
83#ifdef QTOPIA_INTERNAL_LANGLIST 79#ifdef QTOPIA_INTERNAL_LANGLIST
84 static QStringList languageList(); 80 static QStringList languageList();
85 static QStringList helpPath(); 81 static QStringList helpPath();
86#endif 82#endif
87 83
88private: 84private:
85 static void invoke( const QString &exec);
89 static Command* builtin; 86 static Command* builtin;
90 static QGuardedPtr<QWidget> *running; 87 static QGuardedPtr<QWidget> *running;
91}; 88};
92 89
93#endif 90#endif
diff --git a/library/imagecodecinterface.h b/library/imagecodecinterface.h
new file mode 100644
index 0000000..8306b68
--- a/dev/null
+++ b/library/imagecodecinterface.h
@@ -0,0 +1,39 @@
1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3**
4** This file is part of the Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#ifndef IMAGECODECINTERFACE_H
21#define IMAGECODECINTERFACE_H
22
23#include <qstringlist.h>
24#include <qpe/qcom.h>
25
26#ifndef QT_NO_COMPONENT
27#ifndef IID_QtopiaImageCodec
28#define IID_QtopiaImageCodec QUuid(0x09bf6906, 0x1549, 0xbb4a, 0x18, 0xba, 0xb9, 0xe7, 0x0a, 0x6e, 0x4d, 0x1e)
29#endif
30#endif
31
32struct ImageCodecInterface : public QUnknownInterface
33{
34public:
35 virtual QStringList keys() const = 0;
36 virtual bool installIOHandler( const QString &format ) = 0;
37};
38
39#endif
diff --git a/library/imageedit.cpp b/library/imageedit.cpp
index 0c22448..caa538a 100644
--- a/library/imageedit.cpp
+++ b/library/imageedit.cpp
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -15,17 +15,17 @@
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#include "imageedit.h" 20#include "imageedit.h"
21#include <qpainter.h> 21#include <qpainter.h>
22 22
23ImageEdit::ImageEdit( QWidget *parent, const char *name ) 23ImageEdit::ImageEdit( QWidget *parent, const char *name)
24 : QScrollView( parent, name, WNorthWestGravity | WResizeNoErase ), buffer() 24 : QScrollView( parent, name, WNorthWestGravity | WResizeNoErase ), buffer()
25{ 25{
26 buffer.resize( size() ); 26 buffer.resize( size() );
27 buffer.fill( colorGroup().color( QColorGroup::Base ) ); 27 buffer.fill( colorGroup().color( QColorGroup::Base ) );
28} 28}
29 29
30ImageEdit::~ImageEdit() 30ImageEdit::~ImageEdit()
31{ 31{
diff --git a/library/imageedit.h b/library/imageedit.h
index ccedbcd..780aac9 100644
--- a/library/imageedit.h
+++ b/library/imageedit.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/library/inlinepics_p.h b/library/inlinepics_p.h
index c3b5ad1..52d184b 100644
--- a/library/inlinepics_p.h
+++ b/library/inlinepics_p.h
@@ -1,30 +1,30 @@
1#ifndef _1804289383 1/* Generated by qembed */
2#define _1804289383 2#ifndef _1733461185
3#define _1733461185
3#include <qimage.h> 4#include <qimage.h>
4#include <qdict.h> 5#include <stdlib.h>
5static const QRgb _to1_data[] = { 6static const QRgb _to1_data[] = {
6 0x2000000,0x5000000,0x9000000,0xd000000,0x11000000,0x12000000,0xe000000,0xc000000,0xc000000,0xc000000,0xd000000,0x11000000,0x12000000,0xe000000, 7 0x2000000,0x5000000,0x9000000,0xd000000,0x11000000,0x12000000,0xe000000,0xc000000,0xc000000,0xc000000,0xd000000,0x11000000,0x12000000,0xe000000,
7 0x6000000,0xf000000,0x1d000000,0x3a000000,0x4c000000,0x39000000,0x21000000,0x1c000000,0x1c000000,0x22000000,0x3a000000,0x4c000000,0x39000000,0x1f000000, 8 0x6000000,0xf000000,0x1d000000,0x3a000000,0x4c000000,0x39000000,0x21000000,0x1c000000,0x1c000000,0x22000000,0x3a000000,0x4c000000,0x39000000,0x1f000000,
8 0x10000000,0x25000000,0x51000000,0xb4595959,0xffffffff,0x76000000,0x42000000,0x3b000000,0x3e000000,0x5b000000,0xb4595959,0xffffffff,0x72000000,0x38000000, 9 0x10000000,0x25000000,0x51000000,0xb46b6b6b,0xffffffff,0x76000000,0x42000000,0x3b000000,0x3e000000,0x5b000000,0xb46b6b6b,0xffffffff,0x72000000,0x38000000,
9 0x1e000000,0x54000000,0xbc555555,0xffffffff,0xffffffff,0xa6000000,0x6d000000,0x65000000,0x7a000000,0xc4525252,0xffffffff,0xffffffff,0x9d000000,0x57000000, 10 0x1e000000,0x54000000,0xbc676767,0xffffffff,0xffffffff,0xa6000000,0x6d000000,0x65000000,0x7a000000,0xc4646464,0xffffffff,0xffffffff,0x9d000000,0x57000000,
10 0x45000000,0xb5595959,0xffffffff,0xffffffff,0xffffffff,0xcf000000,0xaa000000,0xa3000000,0xce4e4e4e,0xffffffff,0xffffffff,0xffffffff,0xb8000000,0x74000000, 11 0x45000000,0xb56b6b6b,0xffffffff,0xffffffff,0xffffffff,0xcf000000,0xaa000000,0xa3000000,0xce606060,0xffffffff,0xffffffff,0xffffffff,0xb8000000,0x74000000,
11 0x88767676,0xffffffff,0xf4999999,0xffffffff,0xffffffff,0xf2424242,0xffffffff,0xdc494949,0xffffffff,0xf7979797,0xffffffff,0xffffffff,0xcd000000,0x8a000000, 12 0x88878787,0xffffffff,0xf4a7a7a7,0xffffffff,0xffffffff,0xf2535353,0xffffffff,0xdc5b5b5b,0xffffffff,0xf7a5a5a5,0xffffffff,0xffffffff,0xcd000000,0x8a000000,
12 0x48000000,0x84000000,0xc6000000,0xffffffff,0xffffffff,0xfa404040,0xf9c6c6c6,0xd5000000,0xcd000000,0xdd000000,0xffffffff,0xffffffff,0xd9000000,0x97000000, 13 0x48000000,0x84000000,0xc6000000,0xffffffff,0xffffffff,0xfa515151,0xf9cfcfcf,0xd5000000,0xcd000000,0xdd000000,0xffffffff,0xffffffff,0xd9000000,0x97000000,
13 0x2c000000,0x5e000000,0xb1000000,0xffffffff,0xffffffff,0xf8000000,0xdc000000,0xcc000000,0xc3000000,0xd3000000,0xffffffff,0xffffffff,0xdb000000,0x9a000000, 14 0x2c000000,0x5e000000,0xb1000000,0xffffffff,0xffffffff,0xf8000000,0xdc000000,0xcc000000,0xc3000000,0xd3000000,0xffffffff,0xffffffff,0xdb000000,0x9a000000,
14 0x25000000,0x53000000,0xa7000000,0xffffffff,0xffffffff,0xf0000000,0xd2000000,0xc2000000,0xb6000000,0xc8000000,0xffffffff,0xffffffff,0xd3000000,0x92000000, 15 0x25000000,0x53000000,0xa7000000,0xffffffff,0xffffffff,0xf0000000,0xd2000000,0xc2000000,0xb6000000,0xc8000000,0xffffffff,0xffffffff,0xd3000000,0x92000000,
15 0x1d000000,0x44000000,0x99000000,0xffffffff,0xffffffff,0xf1434343,0xf5c9c9c9,0xbc000000,0xa3000000,0xba000000,0xffffffff,0xffffffff,0xc4000000,0x83000000, 16 0x1d000000,0x44000000,0x99000000,0xffffffff,0xffffffff,0xf1545454,0xf5d1d1d1,0xbc000000,0xa3000000,0xba000000,0xffffffff,0xffffffff,0xc4000000,0x83000000,
16 0x14000000,0x34000000,0x7d000000,0xffffffff,0xffffffff,0xe5464646,0xffffffff,0xab000000,0x8c000000,0x9e000000,0xffffffff,0xffffffff,0xa8000000,0x6e000000, 17 0x14000000,0x34000000,0x7d000000,0xffffffff,0xffffffff,0xe5585858,0xffffffff,0xab000000,0x8c000000,0x9e000000,0xffffffff,0xffffffff,0xa8000000,0x6e000000,
17 0xc000000,0x25000000,0x4d000000,0x84000000,0xa0000000,0xa2000000,0x92000000,0x7f000000,0x6c000000,0x6f000000,0x88000000,0x94000000,0x79000000,0x56000000, 18 0xc000000,0x25000000,0x4d000000,0x84000000,0xa0000000,0xa2000000,0x92000000,0x7f000000,0x6c000000,0x6f000000,0x88000000,0x94000000,0x79000000,0x56000000,
18 0x8000000,0x18000000,0x2a000000,0x41000000,0x58000000,0x5e000000,0x55000000,0x50000000,0x4a000000,0x43000000,0x45000000,0x4e000000,0x49000000,0x39000000, 19 0x8000000,0x18000000,0x2a000000,0x41000000,0x58000000,0x5e000000,0x55000000,0x50000000,0x4a000000,0x43000000,0x45000000,0x4e000000,0x49000000,0x39000000,
19 0x5000000,0xf000000,0x19000000,0x28000000,0x36000000,0x3b000000,0x36000000,0x34000000,0x2f000000,0x2a000000,0x2b000000,0x30000000,0x2c000000,0x22000000 20 0x5000000,0xf000000,0x19000000,0x28000000,0x36000000,0x3b000000,0x36000000,0x34000000,0x2f000000,0x2a000000,0x2b000000,0x30000000,0x2c000000,0x22000000
20}; 21};
21 22
22/* Generated by qembed */
23static const QRgb AddressBook_data[] = { 23static const QRgb AddressBook_data[] = {
24 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000, 24 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
25 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000, 25 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
26 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000, 26 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
27 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000, 27 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
28 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff040437,0xff040437,0xff040437,0xff040434, 28 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff040437,0xff040437,0xff040437,0xff040434,
29 0xff04042f,0xff030327,0xff05043c,0xff070565,0xff0a068a,0xff0a068a,0xff080574,0xff07055c,0xff06044c,0xff06044b,0xff05044a,0xff080569,0xff090682,0xff0a068a, 29 0xff04042f,0xff030327,0xff05043c,0xff070565,0xff0a068a,0xff0a068a,0xff080574,0xff07055c,0xff06044c,0xff06044b,0xff05044a,0xff080569,0xff090682,0xff0a068a,
30 0xff0a068a,0xff080567,0xff03032c,0xff01030b,0xff010309,0xff010307,0xff010303,0xff010300,0xff010300,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000, 30 0xff0a068a,0xff080567,0xff03032c,0xff01030b,0xff010309,0xff010307,0xff010303,0xff010300,0xff010300,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
@@ -173,24 +173,24 @@ static const QRgb Appearance_data[] = {
173 0x5f000000,0x5e000000,0x59000000,0x53000000,0x4a000000,0x3f000000,0x33000000,0x26000000,0x1b000000,0x11000000,0xa000000,0x5000000,0x2000000,0x1000000, 173 0x5f000000,0x5e000000,0x59000000,0x53000000,0x4a000000,0x3f000000,0x33000000,0x26000000,0x1b000000,0x11000000,0xa000000,0x5000000,0x2000000,0x1000000,
174 0xffffff,0xffffff 174 0xffffff,0xffffff
175}; 175};
176 176
177static const QRgb AppsIcon_data[] = { 177static const QRgb AppsIcon_data[] = {
178 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 178 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
179 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 179 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
180 0xffffff,0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0x6c000000,0x5c000000,0xff000000,0xff000000,0xff000000,0xff000000,0x24000000,0xc000000, 180 0xffffff,0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0x6c000000,0x5c000000,0xff000000,0xff000000,0xff000000,0xff000000,0x24000000,0xc000000,
181 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0x9c000000,0x6c000000,0xff99cc00,0xff99cc00,0xff99cc00,0xff000000,0x6b000000,0x24000000, 181 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0x9c000000,0x6c000000,0xffa7d400,0xffa7d400,0xffa7d400,0xff000000,0x6b000000,0x24000000,
182 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xb4000000,0x74000000,0xff99cc00,0xff99cc00,0xff99cc00,0xff000000,0x8f000000,0x30000000, 182 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xb4000000,0x74000000,0xffa7d400,0xffa7d400,0xffa7d400,0xff000000,0x8f000000,0x30000000,
183 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xb4000000,0x74000000,0xff99cc00,0xff99cc00,0xff99cc00,0xff000000,0x8f000000,0x30000000, 183 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xb4000000,0x74000000,0xffa7d400,0xffa7d400,0xffa7d400,0xff000000,0x8f000000,0x30000000,
184 0xffffff,0xffffff,0x6c000000,0x9c000000,0xb4000000,0xb4000000,0x9c000000,0x6c000000,0x6c000000,0x9c000000,0xb4000000,0xb4000000,0x6b000000,0x24000000, 184 0xffffff,0xffffff,0x6c000000,0x9c000000,0xb4000000,0xb4000000,0x9c000000,0x6c000000,0x6c000000,0x9c000000,0xb4000000,0xb4000000,0x6b000000,0x24000000,
185 0xffffff,0xffffff,0x5c000000,0x6c000000,0x74000000,0x74000000,0x6c000000,0x5c000000,0x5c000000,0x6c000000,0x74000000,0x74000000,0x24000000,0xc000000, 185 0xffffff,0xffffff,0x5c000000,0x6c000000,0x74000000,0x74000000,0x6c000000,0x5c000000,0x5c000000,0x6c000000,0x74000000,0x74000000,0x24000000,0xc000000,
186 0xffffff,0xffffff,0xff000000,0xff99cc00,0xff99cc00,0xff99cc00,0x6c000000,0x5c000000,0xff99cc00,0xff99cc00,0xff99cc00,0xff000000,0x24000000,0xc000000, 186 0xffffff,0xffffff,0xff000000,0xffa7d400,0xffa7d400,0xffa7d400,0x6c000000,0x5c000000,0xffa7d400,0xffa7d400,0xffa7d400,0xff000000,0x24000000,0xc000000,
187 0xffffff,0xffffff,0xff000000,0xff99cc00,0xff99cc00,0xff99cc00,0x9c000000,0x6c000000,0xff99cc00,0xff99cc00,0xff99cc00,0xff000000,0x6b000000,0x24000000, 187 0xffffff,0xffffff,0xff000000,0xffa7d400,0xffa7d400,0xffa7d400,0x9c000000,0x6c000000,0xffa7d400,0xffa7d400,0xffa7d400,0xff000000,0x6b000000,0x24000000,
188 0xffffff,0xffffff,0xff000000,0xff99cc00,0xff99cc00,0xff99cc00,0xb4000000,0x74000000,0xff99cc00,0xff99cc00,0xff99cc00,0xff000000,0x8f000000,0x30000000, 188 0xffffff,0xffffff,0xff000000,0xffa7d400,0xffa7d400,0xffa7d400,0xb4000000,0x74000000,0xffa7d400,0xffa7d400,0xffa7d400,0xff000000,0x8f000000,0x30000000,
189 0xffffff,0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xb4000000,0x74000000,0xff000000,0xff000000,0xff000000,0xff000000,0x8f000000,0x30000000, 189 0xffffff,0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xb4000000,0x74000000,0xff000000,0xff000000,0xff000000,0xff000000,0x8f000000,0x30000000,
190 0xffffff,0xffffff,0x24000000,0x6b000000,0x8f000000,0x8f000000,0x6b000000,0x24000000,0x24000000,0x6b000000,0x8f000000,0x8f000000,0x6b000000,0x24000000, 190 0xffffff,0xffffff,0x24000000,0x6b000000,0x8f000000,0x8f000000,0x6b000000,0x24000000,0x24000000,0x6b000000,0x8f000000,0x8f000000,0x6b000000,0x24000000,
191 0xffffff,0xffffff,0xc000000,0x24000000,0x30000000,0x30000000,0x24000000,0xc000000,0xc000000,0x24000000,0x30000000,0x30000000,0x24000000,0xc000000 191 0xffffff,0xffffff,0xc000000,0x24000000,0x30000000,0x30000000,0x24000000,0xc000000,0xc000000,0x24000000,0x30000000,0x30000000,0x24000000,0xc000000
192}; 192};
193 193
194static const QRgb Calculator_data[] = { 194static const QRgb Calculator_data[] = {
195 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000, 195 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
196 0x1f000000,0x1f000000,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x1d000000,0x1b000000, 196 0x1f000000,0x1f000000,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x1d000000,0x1b000000,
@@ -496,27 +496,27 @@ static const QRgb Clock_data[] = {
496 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000, 496 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
497 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000, 497 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
498 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000, 498 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
499 0x18000000,0xf000000 499 0x18000000,0xf000000
500}; 500};
501 501
502static const QRgb CloseButton_data[] = { 502static const QRgb CloseButton_data[] = {
503 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 503 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
504 0xffffff,0xffffff,0xffffff,0x3ed5d5d5,0x93d4d4d4,0xd5d8d8d8,0xfad5d5d5,0xd8c8c8c8,0x9ebebebe,0x508e8e8e,0xc000000,0x3000000,0xffffff,0xffffff, 504 0xffffff,0xffffff,0xffffff,0x3edcdcdc,0x93dbdbdb,0xd5dedede,0xfadcdcdc,0xd8d1d1d1,0x9ec8c8c8,0x509d9d9d,0xc000000,0x3000000,0xffffff,0xffffff,
505 0xffffff,0xffffff,0x60d5d5d5,0xdbdddddd,0xffdcdcdc,0xffcbcbcb,0xffc5c5c5,0xffc4c4c4,0xffd0d0d0,0xe6bbbbbb,0x837d7d7d,0x18000000,0x4000000,0xffffff, 505 0xffffff,0xffffff,0x60dcdcdc,0xdbe3e3e3,0xffe2e2e2,0xffd3d3d3,0xffcecece,0xffcdcdcd,0xffd7d7d7,0xe6c5c5c5,0x838d8d8d,0x18000000,0x4000000,0xffffff,
506 0xffffff,0x3ed6d5d5,0xdbd3d3d3,0xffc1c1c1,0xff262626,0xff777777,0xffb7b6b7,0xff767576,0xff252525,0xffa4a5a4,0xec8f8e8f,0x75474747,0x18000000,0x3000000, 506 0xffffff,0x3edddcdc,0xdbdadada,0xffcbcbcb,0xff353535,0xff888888,0xffc2c1c2,0xff878687,0xff343434,0xffb1b2b1,0xec9e9d9e,0x75595959,0x18000000,0x3000000,
507 0xffffff,0x94cdcecd,0xffc8c7c7,0xff7b7b7b,0xff000000,0xff000000,0xff484848,0xff000000,0xff000000,0xff757675,0xff9d9c9c,0xc84f4f4f,0x3d000000,0xc000000, 507 0xffffff,0x94d5d6d5,0xffd1d0d0,0xff8c8c8c,0xff000000,0xff000000,0xff5a5a5a,0xff000000,0xff000000,0xff868786,0xffabaaaa,0xc8616161,0x3d000000,0xc000000,
508 0xffffff,0xd5c2c2c2,0xffafafaf,0xffa0a0a0,0xff686868,0xff000000,0xff000000,0xff000000,0xff656565,0xffa4a4a4,0xffa4a4a4,0xef4f4f4f,0x61000000,0x1a000000, 508 0xffffff,0xd5cbcbcb,0xffbbbbbb,0xffadadad,0xff7a7a7a,0xff000000,0xff000000,0xff000000,0xff777777,0xffb1b1b1,0xffb1b1b1,0xef616161,0x61000000,0x1a000000,
509 0xffffff,0xfab4b4b4,0xff9d9d9d,0xff959595,0xff696969,0xff000000,0xff000000,0xff000000,0xff626262,0xffa1a1a1,0xff939393,0xfd4b4b4b,0x7c000000,0x25000000, 509 0xffffff,0xfabfbfbf,0xffababab,0xffa4a4a4,0xff7a7a7a,0xff000000,0xff000000,0xff000000,0xff747474,0xffaeaeae,0xffa2a2a2,0xfd5d5d5d,0x7c000000,0x25000000,
510 0xffffff,0xd9a3a3a3,0xff919191,0xff6c6c6c,0xff000000,0xff000000,0xff393939,0xff000000,0xff000000,0xff696969,0xff7b7b7b,0xf2373737,0x85000000,0x2b000000, 510 0xffffff,0xd9b0b0b0,0xffa0a0a0,0xff7d7d7d,0xff000000,0xff000000,0xff4a4a4a,0xff000000,0xff000000,0xff7a7a7a,0xff8c8c8c,0xf2484848,0x85000000,0x2b000000,
511 0xffffff,0xa0848484,0xff8c8c8b,0xff858686,0xff292929,0xff585858,0xff929291,0xff5c5c5c,0xff262626,0xff868786,0xff585758,0xdf272727,0x7c000000,0x25000000, 511 0xffffff,0xa0949494,0xff9b9b9a,0xff959696,0xff383838,0xff6a6a6a,0xffa1a1a0,0xff6e6e6e,0xff353535,0xff969796,0xff6a696a,0xdf363636,0x7c000000,0x25000000,
512 0xffffff,0x515d5d5d,0xe7707070,0xff7c7c7c,0xff848484,0xff898a8a,0xff8c8c8c,0xff8f8f8f,0xff7f7f7f,0xff616061,0xf5313131,0xbb101010,0x61000000,0x1a000000, 512 0xffffff,0x516f6f6f,0xe7818181,0xff8d8d8d,0xff949494,0xff999a9a,0xff9b9b9b,0xff9e9e9e,0xff8f8f8f,0xff737273,0xf5414141,0xbb1a1a1a,0x61000000,0x1a000000,
513 0xffffff,0xc000000,0x843f3f3f,0xed505050,0xff5d5c5c,0xff6a6a69,0xff6c6c6c,0xff646364,0xff515051,0xf5313130,0xcd141414,0x83000000,0x3d000000,0xc000000, 513 0xffffff,0xc000000,0x84505050,0xed626262,0xff6f6e6e,0xff7b7b7a,0xff7d7d7d,0xff767576,0xff636263,0xf5414140,0xcd1f1f1f,0x83000000,0x3d000000,0xc000000,
514 0xffffff,0x3000000,0x18000000,0x76212121,0xc92b2b2b,0xf0303030,0xfd353535,0xf32a2a2a,0xdf1d1d1d,0xbb0d0d0d,0x83000000,0x4b000000,0x18000000,0x3000000, 514 0xffffff,0x3000000,0x18000000,0x762f2f2f,0xc93b3b3b,0xf0404040,0xfd464646,0xf3393939,0xdf2a2a2a,0xbb161616,0x83000000,0x4b000000,0x18000000,0x3000000,
515 0xffffff,0xffffff,0x4000000,0x18000000,0x3d000000,0x61000000,0x7c000000,0x85000000,0x7c000000,0x61000000,0x3d000000,0x18000000,0x4000000,0xffffff, 515 0xffffff,0xffffff,0x4000000,0x18000000,0x3d000000,0x61000000,0x7c000000,0x85000000,0x7c000000,0x61000000,0x3d000000,0x18000000,0x4000000,0xffffff,
516 0xffffff,0xffffff,0xffffff,0x3000000,0xc000000,0x1a000000,0x25000000,0x2b000000,0x25000000,0x1a000000,0xc000000,0x3000000,0xffffff,0xffffff 516 0xffffff,0xffffff,0xffffff,0x3000000,0xc000000,0x1a000000,0x25000000,0x2b000000,0x25000000,0x1a000000,0xc000000,0x3000000,0xffffff,0xffffff
517}; 517};
518 518
519static const QRgb DateBook_data[] = { 519static const QRgb DateBook_data[] = {
520 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000, 520 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
521 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000, 521 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
522 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000, 522 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
@@ -666,411 +666,411 @@ static const QRgb DateTime_data[] = {
666 0x16000000,0x23000000,0x33000000,0x45000000,0x56000000,0x67000000,0x75000000,0x81000000,0x89000000,0x8e000000,0x90000000,0x8e000000,0x89000000,0x81000000, 666 0x16000000,0x23000000,0x33000000,0x45000000,0x56000000,0x67000000,0x75000000,0x81000000,0x89000000,0x8e000000,0x90000000,0x8e000000,0x89000000,0x81000000,
667 0x75000000,0x67000000,0x56000000,0x45000000,0x33000000,0x23000000,0x16000000,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff, 667 0x75000000,0x67000000,0x56000000,0x45000000,0x33000000,0x23000000,0x16000000,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,
668 0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,0x33000000,0x3f000000,0x4a000000,0x53000000,0x59000000,0x5e000000, 668 0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,0x33000000,0x3f000000,0x4a000000,0x53000000,0x59000000,0x5e000000,
669 0x5f000000,0x5e000000,0x59000000,0x53000000,0x4a000000,0x3f000000,0x33000000,0x26000000,0x1b000000,0x11000000,0xa000000,0x5000000,0x2000000,0x1000000, 669 0x5f000000,0x5e000000,0x59000000,0x53000000,0x4a000000,0x3f000000,0x33000000,0x26000000,0x1b000000,0x11000000,0xa000000,0x5000000,0x2000000,0x1000000,
670 0xffffff,0xffffff 670 0xffffff,0xffffff
671}; 671};
672 672
673static const QRgb DocsIcon_data[] = { 673static const QRgb DocsIcon_data[] = {
674 0xffffff,0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff555555,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,0xffffff, 674 0xffffff,0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff676767,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,0xffffff,
675 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffdfdfdf,0xffb3b3b3,0xffffffff,0xff555555,0x3c000000,0xc000000,0xffffff,0xffffff,0xffffff, 675 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffe4e4e4,0xffbebebe,0xffffffff,0xff676767,0x3c000000,0xc000000,0xffffff,0xffffff,0xffffff,
676 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffd4d4d4,0xff898989,0xffffffff,0xffffffff,0xff555555,0x3c000000,0xc000000,0xffffff,0xffffff, 676 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffdbdbdb,0xff999999,0xffffffff,0xffffffff,0xff676767,0x3c000000,0xc000000,0xffffff,0xffffff,
677 0xffffff,0xffffff,0xff000000,0xfffdfdfd,0xfffdfdfd,0xffd2d2d2,0xff7d7d7d,0xffffffff,0xffffffff,0xffffffff,0xff555555,0x3c000000,0xc000000,0xffffff, 677 0xffffff,0xffffff,0xff000000,0xfffdfdfd,0xfffdfdfd,0xffd9d9d9,0xff8d8d8d,0xffffffff,0xffffffff,0xffffffff,0xff676767,0x3c000000,0xc000000,0xffffff,
678 0xffffff,0xffffff,0xff000000,0xfffbfbfb,0xfffbfbfb,0xffd0d0d0,0xff7b7b7b,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff555555,0x3c000000,0xc000000, 678 0xffffff,0xffffff,0xff000000,0xfffcfcfc,0xfffcfcfc,0xffd7d7d7,0xff8c8c8c,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff676767,0x3c000000,0xc000000,
679 0xffffff,0xffffff,0xff000000,0xfff8f8f8,0xfff6f6f6,0xffd6d6d6,0xff999999,0xff797979,0xff797979,0xff848484,0xffaeaeae,0xff000000,0x77000000,0x24000000, 679 0xffffff,0xffffff,0xff000000,0xfff9f9f9,0xfff8f8f8,0xffdddddd,0xffa7a7a7,0xff8a8a8a,0xff8a8a8a,0xff949494,0xffbababa,0xff000000,0x77000000,0x24000000,
680 0xffffff,0xffffff,0xff000000,0xfff3f3f3,0xfff1f1f1,0xffe5e5e5,0xffd0d0d0,0xffc6c6c6,0xffc7c7c7,0xffc8c8c8,0xffd5d5d5,0xff000000,0x8f000000,0x30000000, 680 0xffffff,0xffffff,0xff000000,0xfff5f5f5,0xfff3f3f3,0xffe9e9e9,0xffd7d7d7,0xffcfcfcf,0xffd0d0d0,0xffd1d1d1,0xffdcdcdc,0xff000000,0x8f000000,0x30000000,
681 0xffffff,0xffffff,0xff000000,0xffededed,0xffe9e9e9,0xffe7e7e7,0xffe5e5e5,0xffe5e5e5,0xffe7e7e7,0xffe9e9e9,0xffededed,0xff000000,0x8f000000,0x30000000, 681 0xffffff,0xffffff,0xff000000,0xfff0f0f0,0xffededed,0xffebebeb,0xffe9e9e9,0xffe9e9e9,0xffebebeb,0xffededed,0xfff0f0f0,0xff000000,0x8f000000,0x30000000,
682 0xffffff,0xffffff,0xff000000,0xffe7e7e7,0xffe2e2e2,0xffdedede,0xffdcdcdc,0xffdcdcdc,0xffdedede,0xffe2e2e2,0xffe7e7e7,0xff000000,0x8f000000,0x30000000, 682 0xffffff,0xffffff,0xff000000,0xffebebeb,0xffe7e7e7,0xffe3e3e3,0xffe2e2e2,0xffe2e2e2,0xffe3e3e3,0xffe7e7e7,0xffebebeb,0xff000000,0x8f000000,0x30000000,
683 0xffffff,0xffffff,0xff000000,0xffe0e0e0,0xffdadada,0xffd5d5d5,0xffd3d3d3,0xffd3d3d3,0xffd5d5d5,0xffdadada,0xffe0e0e0,0xff000000,0x8f000000,0x30000000, 683 0xffffff,0xffffff,0xff000000,0xffe5e5e5,0xffe0e0e0,0xffdcdcdc,0xffdadada,0xffdadada,0xffdcdcdc,0xffe0e0e0,0xffe5e5e5,0xff000000,0x8f000000,0x30000000,
684 0xffffff,0xffffff,0xff000000,0xffd9d9d9,0xffd1d1d1,0xffcbcbcb,0xffc8c8c8,0xffc8c8c8,0xffcbcbcb,0xffd1d1d1,0xffd9d9d9,0xff000000,0x8f000000,0x30000000, 684 0xffffff,0xffffff,0xff000000,0xffdfdfdf,0xffd8d8d8,0xffd3d3d3,0xffd1d1d1,0xffd1d1d1,0xffd3d3d3,0xffd8d8d8,0xffdfdfdf,0xff000000,0x8f000000,0x30000000,
685 0xffffff,0xffffff,0xff000000,0xffd9d9d9,0xffd1d1d1,0xffcbcbcb,0xffc8c8c8,0xffc8c8c8,0xffcbcbcb,0xffd1d1d1,0xffd9d9d9,0xff000000,0x8f000000,0x30000000, 685 0xffffff,0xffffff,0xff000000,0xffdfdfdf,0xffd8d8d8,0xffd3d3d3,0xffd1d1d1,0xffd1d1d1,0xffd3d3d3,0xffd8d8d8,0xffdfdfdf,0xff000000,0x8f000000,0x30000000,
686 0xffffff,0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x8f000000,0x30000000, 686 0xffffff,0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x8f000000,0x30000000,
687 0xffffff,0xffffff,0x24000000,0x6b000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x6b000000,0x24000000 687 0xffffff,0xffffff,0x24000000,0x6b000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x6b000000,0x24000000
688}; 688};
689 689
690static const QRgb DocumentTypeExcel_data[] = { 690static const QRgb DocumentTypeExcel_data[] = {
691 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 691 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
692 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 692 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
693 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000200,0x2000200,0x5000200,0x9000200,0x10000200,0x18000200,0x22000200, 693 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000500,0x2000500,0x5000500,0x9000500,0x10000500,0x18000500,0x22000500,
694 0x2c000200,0x36000200,0x3f000200,0x45000200,0x4a000200,0x4d000200,0x4e000200,0x4e000200,0x4e000200,0x4c000200,0x49000200,0x45000200,0x3f000200,0x37000200, 694 0x2c000500,0x36000500,0x3f000500,0x45000500,0x4a000500,0x4d000500,0x4e000500,0x4e000500,0x4e000500,0x4c000500,0x49000500,0x45000500,0x3f000500,0x37000500,
695 0x2e000200,0x25000200,0x1c000200,0x13000200,0xd000200,0x8000200,0x4000200,0x2000200,0xffffff,0xffffff,0xffffff,0x1000200,0x3000200,0x7000200, 695 0x2e000500,0x25000500,0x1c000500,0x13000500,0xd000500,0x8000500,0x4000500,0x2000500,0xffffff,0xffffff,0xffffff,0x1000500,0x3000500,0x7000500,
696 0xd000200,0x16000200,0x22000200,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000, 696 0xd000500,0x16000500,0x22000500,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
697 0xff000000,0xff000000,0xfd282828,0x72434543,0x44000200,0x37000200,0x2b000200,0x1f000200,0x15000200,0xd000200,0x8000200,0x4000200,0xffffff,0xffffff, 697 0xff000000,0xff000000,0xfd373737,0x72545754,0x44000500,0x37000500,0x2b000500,0x1f000500,0x15000500,0xd000500,0x8000500,0x4000500,0xffffff,0xffffff,
698 0xffffff,0x1000200,0x4000200,0x9000200,0x11000200,0x1d000200,0x2c000200,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe, 698 0xffffff,0x1000500,0x4000500,0x9000500,0x11000500,0x1d000500,0x2c000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,
699 0xfffefefe,0xfffcfcfc,0xfff9f9f9,0xfff3f3f3,0xffe9e9e9,0xffdedede,0xffc8c8c8,0xfd272727,0x76303230,0x4e000200,0x3d000200,0x2e000200,0x21000200,0x16000200, 699 0xfffefefe,0xfffdfdfd,0xfffafafa,0xfff5f5f5,0xffededed,0xffe3e3e3,0xffd1d1d1,0xfd363636,0x76404240,0x4e000500,0x3d000500,0x2e000500,0x21000500,0x16000500,
700 0xe000200,0x8000200,0xffffff,0xffffff,0xffffff,0x2000200,0x5000200,0xb000200,0x15000200,0x24000200,0x36000200,0xff000000,0xffffffff,0xffffffff, 700 0xe000500,0x8000500,0xffffff,0xffffff,0xffffff,0x2000500,0x5000500,0xb000500,0x15000500,0x24000500,0x36000500,0xff000000,0xffffffff,0xffffffff,
701 0xffffffff,0xffffffff,0xfffefefe,0xfffefefe,0xfffdfdfd,0xfffcfcfc,0xfff6f6f6,0xffededed,0xffdedede,0xffcccccc,0xfffefefe,0xffb3b3b3,0xfd292929,0x802e302e, 701 0xffffffff,0xffffffff,0xfffefefe,0xfffefefe,0xfffdfdfd,0xfffdfdfd,0xfff8f8f8,0xfff0f0f0,0xffe3e3e3,0xffd4d4d4,0xfffefefe,0xffbebebe,0xfd383838,0x803e403e,
702 0x53000200,0x40000200,0x2f000200,0x21000200,0x16000200,0xd000200,0xffffff,0xffffff,0xffffff,0x2000200,0x6000200,0xd000200,0x18000200,0x29000200, 702 0x53000500,0x40000500,0x2f000500,0x21000500,0x16000500,0xd000500,0xffffff,0xffffff,0xffffff,0x2000500,0x6000500,0xd000500,0x18000500,0x29000500,
703 0x3f000200,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffdfdfd,0xfffcfcfc,0xfffafafa,0xfff4f4f4,0xffe9e9e9,0xffd4d4d4,0xffbcbcbc, 703 0x3f000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffdfdfd,0xfffdfdfd,0xfffbfbfb,0xfff6f6f6,0xffededed,0xffdbdbdb,0xffc6c6c6,
704 0xffffffff,0xfffcfcfc,0xffa1a1a1,0xfd2b2b2b,0x7e262826,0x55000200,0x41000200,0x2f000200,0x20000200,0x15000200,0xffffff,0xffffff,0x1000200,0x2000200, 704 0xffffffff,0xfffdfdfd,0xffaeaeae,0xfd3b3b3b,0x7e353735,0x55000500,0x41000500,0x2f000500,0x20000500,0x15000500,0xffffff,0xffffff,0x1000500,0x2000500,
705 0x6000200,0xe000200,0x1b000200,0x2d000200,0x45000200,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffdfdfd,0xfffbfbfb,0xfff9f9f9, 705 0x6000500,0xe000500,0x1b000500,0x2d000500,0x45000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfffafafa,
706 0xfff2f2f2,0xffe4e4e4,0xffcdcdcd,0xffaeaeae,0xffffffff,0xffffffff,0xfffcfcfc,0xff949494,0xfd2e2e2e,0x7a1d1f1d,0x55000200,0x40000200,0x2d000200,0x1e000200, 706 0xfff4f4f4,0xffe8e8e8,0xffd5d5d5,0xffbababa,0xffffffff,0xffffffff,0xfffdfdfd,0xffa3a3a3,0xfd3e3e3e,0x7a2a2d2a,0x55000500,0x40000500,0x2d000500,0x1e000500,
707 0xffffff,0xffffff,0x1000200,0x2000200,0x7000200,0xf000200,0x1d000200,0x30000200,0x4a000200,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff, 707 0xffffff,0xffffff,0x1000500,0x2000500,0x7000500,0xf000500,0x1d000500,0x30000500,0x4a000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
708 0xfffdfdfd,0xfffcfcfc,0xfffbfbfb,0xfff7f7f7,0xfff0f0f0,0xffe2e2e2,0xffc8c8c8,0xffa7a7a7,0xffffffff,0xffffffff,0xffffffff,0xfff9f9f9,0xff8e8e8e,0xfd343434, 708 0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfff8f8f8,0xfff3f3f3,0xffe7e7e7,0xffd1d1d1,0xffb4b4b4,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff9d9d9d,0xfd454545,
709 0x781e1e1e,0x52000200,0x3c000200,0x29000200,0xffffff,0xffffff,0x1000200,0x3000200,0x7000200,0x10000200,0x1e000200,0x32000200,0x4d000200,0xff000000, 709 0x782b2b2b,0x52000500,0x3c000500,0x29000500,0xffffff,0xffffff,0x1000500,0x3000500,0x7000500,0x10000500,0x1e000500,0x32000500,0x4d000500,0xff000000,
710 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffcfcfc,0xfffbfbfb,0xfffafafa,0xfff7f7f7,0xfff0f0f0,0xffe1e1e1,0xffc8c8c8,0xffa6a6a6,0xffffffff,0xffffffff, 710 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffcfcfc,0xfffbfbfb,0xfff8f8f8,0xfff3f3f3,0xffe6e6e6,0xffd1d1d1,0xffb3b3b3,0xffffffff,0xffffffff,
711 0xffffffff,0xffffffff,0xfff8f8f8,0xff8f8f8f,0xfc3b3b3b,0x70141714,0x4c000200,0x36000200,0x1000000,0x2000000,0x5000000,0x9000000,0xf000000,0x18000000, 711 0xffffffff,0xffffffff,0xfff9f9f9,0xff9e9e9e,0xfc4c4c4c,0x701f231f,0x4c000500,0x36000500,0x1000000,0x2000000,0x5000000,0x9000000,0xf000000,0x18000000,
712 0x27000000,0x3b000000,0x55000300,0xff000000,0xfff5f5f5,0xfff5f5f5,0xfff5f5f5,0xfff6f6f6,0xfff4f4f4,0xfff5f5f5,0xfff5f5f5,0xfff4f4f4,0xffefefef,0xffe4e4e4, 712 0x27000000,0x3b000000,0x55000600,0xff000000,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7,0xfff8f8f8,0xfff6f6f6,0xfff7f7f7,0xfff7f7f7,0xfff6f6f6,0xfff2f2f2,0xffe8e8e8,
713 0xffcccccc,0xffadadad,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff929292,0xfb434343,0x5c000200,0x42000200,0x4000000,0x7000000, 713 0xffd4d4d4,0xffb9b9b9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xffa1a1a1,0xfb545454,0x5c000500,0x42000500,0x4000000,0x7000000,
714 0xd000000,0x16000000,0x1e000000,0x2a000000,0x39000000,0x4d000000,0x65000000,0xff000000,0xffdedede,0xffdedede,0xffe0e0e0,0xffe3e3e3,0xffe3e3e3,0xffe7e7e7, 714 0xd000000,0x16000000,0x1e000000,0x2a000000,0x39000000,0x4d000000,0x65000000,0xff000000,0xffe3e3e3,0xffe3e3e3,0xffe5e5e5,0xffe8e8e8,0xffe8e8e8,0xffebebeb,
715 0xffececec,0xfff0f0f0,0xffededed,0xffe6e6e6,0xffd7d7d7,0xffbfbfbf,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff2e2e2e, 715 0xffefefef,0xfff3f3f3,0xfff0f0f0,0xffeaeaea,0xffdddddd,0xffc9c9c9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xff3e3e3e,
716 0x6a000200,0x4e000200,0x7000000,0xf000000,0x1b000000,0x2b000000,0x39000000,0x49000000,0x58000000,0x69000000,0x7e000200,0xff000000,0xffb9b9b9,0xffb9b9b9, 716 0x6a000500,0x4e000500,0x7000000,0xf000000,0x1b000000,0x2b000000,0x39000000,0x49000000,0x58000000,0x69000000,0x7e000500,0xff000000,0xffc4c4c4,0xffc4c4c4,
717 0xffbcbcbc,0xffc3c3c3,0xffcbcbcb,0xffd4d4d4,0xffe1e1e1,0xffe8e8e8,0xffececec,0xffececec,0xffe2e2e2,0xffbbbbbb,0xff909090,0xff6e6e6e,0xff5d5d5d,0xff595959, 717 0xffc6c6c6,0xffcccccc,0xffd3d3d3,0xffdbdbdb,0xffe6e6e6,0xffececec,0xffefefef,0xffefefef,0xffe7e7e7,0xffc5c5c5,0xff9f9f9f,0xff7f7f7f,0xff6f6f6f,0xff6b6b6b,
718 0xff5f5f5f,0xff7b7b7b,0xffa8a8a8,0xff000000,0x76000200,0x58000200,0xc000000,0x19000000,0xffee5358,0xffe84f53,0xffec8689,0xffe05a5e,0xffd84045,0xffdc5257, 718 0xff717171,0xff8c8c8c,0xffb5b5b5,0xff000000,0x76000500,0x58000500,0xc000000,0x19000000,0xfff1656a,0xffec6165,0xffef9699,0xffe56c70,0xffde5157,0xffe26469,
719 0xffe47a7d,0xffd43337,0xffde5b60,0xffe16e72,0xffdb3a3f,0xffdc1c21,0xffdd191f,0xffbababa,0xffd0d0d0,0xffe0e0e0,0xffebebeb,0xffefefef,0xffc6c6c6,0xff919191, 719 0xffe88b8d,0xffdb4348,0xffe36d72,0xffe67f83,0xffe14b50,0xffe2292f,0xffe3252d,0xffc4c4c4,0xffd7d7d7,0xffe5e5e5,0xffeeeeee,0xfff2f2f2,0xffcfcfcf,0xffa0a0a0,
720 0xff7c7c7c,0xff717171,0xff717171,0xff6c6c6c,0xff5f5f5f,0xff5e5e5e,0xff626262,0xff000000,0x80000200,0x60000200,0x12000000,0x26000000,0xffea5054,0xffee9a9c, 720 0xff8d8d8d,0xff828282,0xff828282,0xff7d7d7d,0xff717171,0xff707070,0xff747474,0xff000000,0x80000500,0x60000500,0x12000000,0x26000000,0xffee6266,0xfff1a8aa,
721 0xffffffff,0xffe9b1b3,0xffc2363a,0xffe6aeaf,0xffffffff,0xffd98689,0xffe9b6b7,0xffffffff,0xffd66669,0xffca171c,0xffce171d,0xff999999,0xffbcbcbc,0xffd5d5d5, 721 0xffffffff,0xffedbdbe,0xffcb474b,0xffeababb,0xffffffff,0xffdf9699,0xffedc1c2,0xffffffff,0xffdd787a,0xffd22329,0xffd6232a,0xffa7a7a7,0xffc6c6c6,0xffdcdcdc,
722 0xffe8e8e8,0xffd2d2d2,0xff9d9d9d,0xff8b8b8b,0xff959595,0xffb5b5b5,0xffc5c5c5,0xffc6c6c6,0xffbababa,0xff818181,0xff5c5c5c,0xff000000,0x87000200,0x66000200, 722 0xffececec,0xffd9d9d9,0xffababab,0xff9a9a9a,0xffa4a4a4,0xffc0c0c0,0xffcecece,0xffcfcfcf,0xffc4c4c4,0xff919191,0xff6e6e6e,0xff000000,0x87000500,0x66000500,
723 0x17000000,0x2f000000,0xffe84c50,0xffde5b5f,0xfffefafa,0xfffefbfb,0xffbe6366,0xfffdfbfb,0xfffdfafa,0xffad3a3e,0xffe1b3b4,0xffffffff,0xffc66265,0xffb71519, 723 0x17000000,0x2f000000,0xffec5e62,0xffe36d71,0xfffefbfb,0xfffefcfc,0xffc87578,0xfffdfcfc,0xfffdfbfb,0xffb94b4f,0xffe6bebf,0xffffffff,0xffcf7477,0xffc22025,
724 0xffbf161a,0xff818181,0xffaaaaaa,0xffcecece,0xffd8d8d8,0xffb1b1b1,0xff9a9a9a,0xffa8a8a8,0xffe1e1e1,0xfff1f1f1,0xfff5f5f5,0xfff0f0f0,0xffc9c9c9,0xffe2e2e2, 724 0xffc92227,0xff919191,0xffb6b6b6,0xffd6d6d6,0xffdedede,0xffbdbdbd,0xffa8a8a8,0xffb5b5b5,0xffe6e6e6,0xfff3f3f3,0xfff7f7f7,0xfff3f3f3,0xffd1d1d1,0xffe7e7e7,
725 0xff909090,0xff000000,0x8b000200,0x6a000200,0x1b000000,0x37000000,0xffe8484d,0xffd63f44,0xffe8b3b4,0xffffffff,0xfff1e2e3,0xffffffff,0xffd3a9aa,0xff8f171a, 725 0xff9f9f9f,0xff000000,0x8b000500,0x6a000500,0x1b000000,0x37000000,0xffec5a5f,0xffdd5056,0xffecbebf,0xffffffff,0xfff3e7e8,0xffffffff,0xffdab6b6,0xff9e2327,
726 0xffdcb1b2,0xffffffff,0xffbb6163,0xffa71317,0xffb31519,0xff6d6d6d,0xff9e9e9e,0xffc5c5c5,0xffc1c1c1,0xffa6a6a6,0xffa4a4a4,0xffdedede,0xfff9f9f9,0xfff6f6f6, 726 0xffe2bdbd,0xffffffff,0xffc57375,0xffb41e23,0xffbe2025,0xff7e7e7e,0xffacacac,0xffcecece,0xffcbcbcb,0xffb3b3b3,0xffb1b1b1,0xffe3e3e3,0xfffafafa,0xfff8f8f8,
727 0xfff5f5f5,0xffa2a2a2,0xff686868,0xffa9a9a9,0xffdbdbdb,0xff000000,0x8e000200,0x6d000200,0x1d000000,0x3c000000,0xffe84449,0xffd83b3f,0xffca5053,0xfffefcfc, 727 0xfff7f7f7,0xffafafaf,0xff7a7a7a,0xffb6b6b6,0xffe1e1e1,0xff000000,0x8e000500,0x6d000500,0x1d000000,0x3c000000,0xffec565b,0xffde4c50,0xffd26265,0xfffefdfd,
728 0xffffffff,0xfffdfcfc,0xff91383a,0xff851114,0xffd9afb0,0xffffffff,0xffb46062,0xff9c1215,0xffaa1317,0xff616161,0xff979797,0xffbebebe,0xffb5b5b5,0xffa5a5a5, 728 0xffffffff,0xfffdfdfd,0xffa0494b,0xff951b1f,0xffdfbbbc,0xffffffff,0xffbf7274,0xffaa1d20,0xffb61e23,0xff737373,0xffa5a5a5,0xffc8c8c8,0xffc0c0c0,0xffb2b2b2,
729 0xffbbbbbb,0xfff3f3f3,0xfffafafa,0xfff9f9f9,0xffaaaaaa,0xff6b6b6b,0xff656565,0xff8c8c8c,0xffececec,0xff000000,0x8f000200,0x6e000200,0x1f000000,0x3e000000, 729 0xffc5c5c5,0xfff5f5f5,0xfffbfbfb,0xfffafafa,0xffb6b6b6,0xff7c7c7c,0xff777777,0xff9b9b9b,0xffefefef,0xff000000,0x8f000500,0x6e000500,0x1f000000,0x3e000000,
730 0xffea3f44,0xffdb373b,0xffc12c30,0xfff4e7e7,0xffffffff,0xfff0e5e5,0xff781012,0xff810f12,0xffd7afb0,0xffffffff,0xffb16062,0xff961115,0xffa41216,0xff5c5c5c, 730 0xffee5056,0xffe1484c,0xffcb3c40,0xfff6ebeb,0xffffffff,0xfff3e9e9,0xff891a1d,0xff91191d,0xffddbbbc,0xffffffff,0xffbd7274,0xffa41b20,0xffb11d22,0xff6e6e6e,
731 0xff939393,0xffbbbbbb,0xffaeaeae,0xffa5a5a5,0xffc5c5c5,0xfffcfcfc,0xfffbfbfb,0xffaeaeae,0xff717171,0xff696969,0xff6f6f6f,0xffdfdfdf,0xffffffff,0xff000000, 731 0xffa2a2a2,0xffc5c5c5,0xffbababa,0xffb2b2b2,0xffcecece,0xfffdfdfd,0xfffcfcfc,0xffbababa,0xff828282,0xff7a7a7a,0xff808080,0xffe4e4e4,0xffffffff,0xff000000,
732 0x90000200,0x6e000200,0x1f000000,0x3d000000,0xffec3b40,0xffdb3236,0xffcf5256,0xfffffefe,0xffffffff,0xfffefefe,0xff913e40,0xff7e0e11,0xffd6afb0,0xffffffff, 732 0x90000500,0x6e000500,0x1f000000,0x3d000000,0xffef4c51,0xffe14247,0xffd76468,0xfffffefe,0xffffffff,0xfffefefe,0xffa04f51,0xff8e171b,0xffddbbbc,0xffffffff,
733 0xffad5f62,0xff901114,0xff9d1216,0xff5b5b5b,0xff929292,0xffbbbbbb,0xffb1b1b1,0xffa1a1a1,0xffbcbcbc,0xfff8f8f8,0xffb0b0b0,0xff757575,0xff6d6d6d,0xff656565, 733 0xffb97174,0xff9f1b1f,0xffab1d22,0xff6d6d6d,0xffa1a1a1,0xffc5c5c5,0xffbdbdbd,0xffaeaeae,0xffc6c6c6,0xfff9f9f9,0xffbcbcbc,0xff868686,0xff7e7e7e,0xff777777,
734 0xff626262,0xff959595,0xfff2f2f2,0xff000000,0x90000200,0x6f000200,0x1f000000,0x3e000000,0xffe9353a,0xffd92c31,0xffecbfc1,0xffffffff,0xfff3e9e9,0xffffffff, 734 0xff747474,0xffa4a4a4,0xfff4f4f4,0xff000000,0x90000500,0x6f000500,0x1f000000,0x3e000000,0xffed464b,0xffdf3c41,0xffefc9cb,0xffffffff,0xfff5eded,0xffffffff,
735 0xffd6baba,0xff770e11,0xffd4afb0,0xffffffff,0xffa85e60,0xff850f13,0xff931114,0xff595959,0xff909090,0xffbdbdbd,0xffbcbcbc,0xff9a9a9a,0xff9f9f9f,0xffe6e6e6, 735 0xffddc4c4,0xff88171b,0xffdbbbbc,0xffffffff,0xffb57072,0xff95191e,0xffa21b1f,0xff6b6b6b,0xff9f9f9f,0xffc7c7c7,0xffc6c6c6,0xffa8a8a8,0xffadadad,0xffeaeaea,
736 0xffadadad,0xff6d6d6d,0xff8c8c8c,0xff8b8b8b,0xff575757,0xff555555,0xff838383,0xff000000,0x90000200,0x6f000200,0x1f000000,0x3e000000,0xffe82e32,0xffdf575b, 736 0xffb9b9b9,0xff7e7e7e,0xff9b9b9b,0xff9a9a9a,0xff696969,0xff676767,0xff939393,0xff000000,0x90000500,0x6f000500,0x1f000000,0x3e000000,0xffec3e42,0xffe4696d,
737 0xffffffff,0xffffffff,0xffaf6a6c,0xffffffff,0xffffffff,0xff954548,0xffd3afb0,0xffffffff,0xffe0c9ca,0xffd4afb0,0xff8b1013,0xff585858,0xff8e8e8e,0xffbdbdbd, 737 0xffffffff,0xffffffff,0xffbb7b7d,0xffffffff,0xffffffff,0xffa4575a,0xffdabbbc,0xffffffff,0xffe5d1d2,0xffdbbbbc,0xff9a1a1e,0xff6a6a6a,0xff9d9d9d,0xffc7c7c7,
738 0xffcccccc,0xff9a9a9a,0xff848484,0xffa8a8a8,0xffededed,0xffbbbbbb,0xffe7e7e7,0xfffbfbfb,0xff8f8f8f,0xff565656,0xff565656,0xff000000,0x90000200,0x6f000200, 738 0xffd4d4d4,0xffa8a8a8,0xff949494,0xffb5b5b5,0xfff0f0f0,0xffc5c5c5,0xffebebeb,0xfffcfcfc,0xff9e9e9e,0xff686868,0xff686868,0xff000000,0x90000500,0x6f000500,
739 0x1d000000,0x3c000000,0xffe5262c,0xffe2696d,0xfffcf6f6,0xffe5bfc0,0xff850f12,0xffdcbebf,0xfffaf6f6,0xffa75f61,0xffd3afb0,0xffffffff,0xffffffff,0xffffffff, 739 0x1d000000,0x3c000000,0xffe9353c,0xffe77a7e,0xfffdf8f8,0xffe9c9ca,0xff95191d,0xffe2c8c9,0xfffbf8f8,0xffb47173,0xffdabbbc,0xffffffff,0xffffffff,0xffffffff,
740 0xff860f12,0xff5b5b5b,0xff919191,0xffbcbcbc,0xffdedede,0xffbbbbbb,0xff7c7c7c,0xff707070,0xff979797,0xffd6d6d6,0xffe3e3e3,0xffe6e6e6,0xffc2c2c2,0xff5e5e5e, 740 0xff96191d,0xff6d6d6d,0xffa0a0a0,0xffc6c6c6,0xffe3e3e3,0xffc5c5c5,0xff8d8d8d,0xff818181,0xffa5a5a5,0xffdddddd,0xffe8e8e8,0xffeaeaea,0xffcbcbcb,0xff707070,
741 0xff575757,0xff000000,0x90000200,0x6f000200,0x1b000000,0x37000000,0xffe42025,0xffd5181e,0xffc3262b,0xffb13033,0xff941115,0xff9c2d31,0xff8f2024,0xff860f12, 741 0xff696969,0xff000000,0x90000500,0x6f000500,0x1b000000,0x37000000,0xffe82e34,0xffdc242b,0xffcc353b,0xffbd4043,0xffa31b20,0xffaa3d41,0xff9e2e33,0xff96191d,
742 0xff850f13,0xff7e0e12,0xff7d0e11,0xff820f12,0xff881013,0xff686868,0xff979797,0xffbfbfbf,0xffdfdfdf,0xffebebeb,0xffababab,0xff6c6c6c,0xff646464,0xff676767, 742 0xff95191e,0xff8e171d,0xff8d171b,0xff92191d,0xff981a1e,0xff7a7a7a,0xffa5a5a5,0xffc9c9c9,0xffe4e4e4,0xffeeeeee,0xffb7b7b7,0xff7d7d7d,0xff767676,0xff797979,
743 0xff757575,0xff757575,0xff6b6b6b,0xff5b5b5b,0xff5b5b5b,0xff000000,0x90000200,0x6f000200,0x17000000,0x2f000000,0xffe41a20,0xffd4181d,0xffc4161c,0xffb41419, 743 0xff868686,0xff868686,0xff7c7c7c,0xff6d6d6d,0xff6d6d6d,0xff000000,0x90000500,0x6f000500,0x17000000,0x2f000000,0xffe8272e,0xffdb242a,0xffcd2229,0xffbf1f25,
744 0xffa61317,0xffa21217,0xff9b1215,0xff981215,0xff951115,0xff8f1114,0xff8d1013,0xff8e1014,0xff911015,0xff7c7c7c,0xffa5a5a5,0xffc8c8c8,0xffdedede,0xfff0f0f0, 744 0xffb31e23,0xffaf1d23,0xffa91d20,0xffa61d20,0xffa41b20,0xff9e1b1f,0xff9c1a1e,0xff9d1a1f,0xffa01a20,0xff8d8d8d,0xffb2b2b2,0xffd1d1d1,0xffe3e3e3,0xfff3f3f3,
745 0xfff3f3f3,0xffbdbdbd,0xff868686,0xff606060,0xff606060,0xff606060,0xff606060,0xff838383,0xffb3b3b3,0xff000000,0x90000200,0x6e000200,0x12000000,0x26000000, 745 0xfff5f5f5,0xffc7c7c7,0xff969696,0xff727272,0xff727272,0xff727272,0xff727272,0xff939393,0xffbebebe,0xff000000,0x90000500,0x6e000500,0x12000000,0x26000000,
746 0x41000000,0x64000000,0x7f000000,0x98000000,0xa9000000,0xb5000000,0xbf000000,0xff000000,0xff5c5c5c,0xff5b5b5b,0xff616161,0xff6c6c6c,0xff7d7d7d,0xff989898, 746 0x41000000,0x64000000,0x7f000000,0x98000000,0xa9000000,0xb5000000,0xbf000000,0xff000000,0xff6e6e6e,0xff6d6d6d,0xff737373,0xff7d7d7d,0xff8d8d8d,0xffa6a6a6,
747 0xffb8b8b8,0xffd0d0d0,0xffe4e4e4,0xffececec,0xfff5f5f5,0xfff8f8f8,0xffe7e7e7,0xffcfcfcf,0xffbfbfbf,0xffbfbfbf,0xffcecece,0xffe6e6e6,0xfff9f9f9,0xff000000, 747 0xffc3c3c3,0xffd7d7d7,0xffe8e8e8,0xffefefef,0xfff7f7f7,0xfff9f9f9,0xffebebeb,0xffd7d7d7,0xffc9c9c9,0xffc9c9c9,0xffd6d6d6,0xffeaeaea,0xfffafafa,0xff000000,
748 0x8e000200,0x6d000200,0xc000000,0x18000000,0x2b000000,0x41000000,0x55000000,0x68000000,0x78000000,0x88000000,0x98000000,0xff000000,0xff949494,0xff939393, 748 0x8e000500,0x6d000500,0xc000000,0x18000000,0x2b000000,0x41000000,0x55000000,0x68000000,0x78000000,0x88000000,0x98000000,0xff000000,0xffa3a3a3,0xffa2a2a2,
749 0xff979797,0xff9f9f9f,0xffaaaaaa,0xffbababa,0xffcecece,0xffdedede,0xffe9e9e9,0xffefefef,0xfff2f2f2,0xfff3f3f3,0xfff6f6f6,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7, 749 0xffa5a5a5,0xffadadad,0xffb6b6b6,0xffc4c4c4,0xffd6d6d6,0xffe3e3e3,0xffededed,0xfff2f2f2,0xfff4f4f4,0xfff5f5f5,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,
750 0xfff7f7f7,0xfff5f5f5,0xfff2f2f2,0xff000000,0x8c000200,0x6b000200,0x7000000,0xf000000,0x19000000,0x27000000,0x34000000,0x43000000,0x52000000,0x63000000, 750 0xfff8f8f8,0xfff7f7f7,0xfff4f4f4,0xff000000,0x8c000500,0x6b000500,0x7000000,0xf000000,0x19000000,0x27000000,0x34000000,0x43000000,0x52000000,0x63000000,
751 0x76000000,0xff000000,0xffc2c2c2,0xffc2c2c2,0xffc4c4c4,0xffc9c9c9,0xffcecece,0xffd5d5d5,0xffe1e1e1,0xffe8e8e8,0xffefefef,0xfff3f3f3,0xfff4f4f4,0xfff4f4f4, 751 0x76000000,0xff000000,0xffcbcbcb,0xffcbcbcb,0xffcdcdcd,0xffd1d1d1,0xffd6d6d6,0xffdcdcdc,0xffe6e6e6,0xffececec,0xfff2f2f2,0xfff5f5f5,0xfff6f6f6,0xfff6f6f6,
752 0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xff000000,0x87000200,0x68000200,0x4000000,0x7000000,0xd000000,0x14000000, 752 0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xff000000,0x87000500,0x68000500,0x4000000,0x7000000,0xd000000,0x14000000,
753 0x1c000000,0x28000000,0x35000000,0x47000000,0x5c000300,0xff000000,0xffe0e0e0,0xffe0e0e0,0xffe2e2e2,0xffe4e4e4,0xffe4e4e4,0xffe8e8e8,0xffeeeeee,0xfff1f1f1, 753 0x1c000000,0x28000000,0x35000000,0x47000000,0x5c000600,0xff000000,0xffe5e5e5,0xffe5e5e5,0xffe7e7e7,0xffe8e8e8,0xffe8e8e8,0xffececec,0xfff1f1f1,0xfff3f3f3,
754 0xfff3f3f3,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xff000000,0x7f000200,0x61000200, 754 0xfff5f5f5,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xff000000,0x7f000500,0x61000500,
755 0x1000000,0x2000000,0x4000000,0x8000000,0xe000000,0x16000000,0x21000000,0x31000000,0x47000000,0xff000000,0xfff5f5f5,0xfff5f5f5,0xfff5f5f5,0xfff6f6f6, 755 0x1000000,0x2000000,0x4000000,0x8000000,0xe000000,0x16000000,0x21000000,0x31000000,0x47000000,0xff000000,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7,0xfff8f8f8,
756 0xfff7f7f7,0xfff9f9f9,0xfffbfbfb,0xfffdfdfd,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff, 756 0xfff8f8f8,0xfffafafa,0xfffcfcfc,0xfffdfdfd,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
757 0xffffffff,0xff000000,0x73000200,0x58000200,0xffffff,0xffffff,0xffffff,0x2000200,0x5000200,0xb000200,0x15000200,0x24000200,0x36000200,0xff000000, 757 0xffffffff,0xff000000,0x73000500,0x58000500,0xffffff,0xffffff,0xffffff,0x2000500,0x5000500,0xb000500,0x15000500,0x24000500,0x36000500,0xff000000,
758 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000, 758 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
759 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x63000200,0x4c000200,0xffffff,0xffffff,0xffffff,0x1000200,0x4000200,0x9000200, 759 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x63000500,0x4c000500,0xffffff,0xffffff,0xffffff,0x1000500,0x4000500,0x9000500,
760 0x11000200,0x1d000200,0x2c000200,0x3e000200,0x51000200,0x63000200,0x73000200,0x7f000200,0x87000200,0x8c000200,0x8e000200,0x90000200,0x90000200,0x90000200, 760 0x11000500,0x1d000500,0x2c000500,0x3e000500,0x51000500,0x63000500,0x73000500,0x7f000500,0x87000500,0x8c000500,0x8e000500,0x90000500,0x90000500,0x90000500,
761 0x90000200,0x90000200,0x90000200,0x90000200,0x8e000200,0x8c000200,0x87000200,0x7f000200,0x73000200,0x63000200,0x51000200,0x3e000200,0xffffff,0xffffff, 761 0x90000500,0x90000500,0x90000500,0x90000500,0x8e000500,0x8c000500,0x87000500,0x7f000500,0x73000500,0x63000500,0x51000500,0x3e000500,0xffffff,0xffffff,
762 0xffffff,0x1000200,0x3000200,0x7000200,0xd000200,0x16000200,0x22000200,0x30000200,0x3e000200,0x4c000200,0x58000200,0x61000200,0x68000200,0x6b000200, 762 0xffffff,0x1000500,0x3000500,0x7000500,0xd000500,0x16000500,0x22000500,0x30000500,0x3e000500,0x4c000500,0x58000500,0x61000500,0x68000500,0x6b000500,
763 0x6d000200,0x6e000200,0x6f000200,0x6f000200,0x6f000200,0x6f000200,0x6f000200,0x6e000200,0x6d000200,0x6b000200,0x68000200,0x61000200,0x58000200,0x4c000200, 763 0x6d000500,0x6e000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6e000500,0x6d000500,0x6b000500,0x68000500,0x61000500,0x58000500,0x4c000500,
764 0x3e000200,0x30000200 764 0x3e000500,0x30000500
765}; 765};
766 766
767static const QRgb DocumentTypeNone_data[] = { 767static const QRgb DocumentTypeNone_data[] = {
768 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 768 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
769 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 769 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
770 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000200,0x2000200,0x5000200,0x9000200,0x10000200,0x18000200,0x22000200, 770 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000500,0x2000500,0x5000500,0x9000500,0x10000500,0x18000500,0x22000500,
771 0x2c000200,0x36000200,0x3f000200,0x45000200,0x4a000200,0x4d000200,0x4e000200,0x4e000200,0x4e000200,0x4c000200,0x49000200,0x45000200,0x3f000200,0x37000200, 771 0x2c000500,0x36000500,0x3f000500,0x45000500,0x4a000500,0x4d000500,0x4e000500,0x4e000500,0x4e000500,0x4c000500,0x49000500,0x45000500,0x3f000500,0x37000500,
772 0x2e000200,0x25000200,0x1c000200,0x13000200,0xd000200,0x8000200,0x4000200,0x2000200,0xffffff,0xffffff,0xffffff,0x1000200,0x3000200,0x7000200, 772 0x2e000500,0x25000500,0x1c000500,0x13000500,0xd000500,0x8000500,0x4000500,0x2000500,0xffffff,0xffffff,0xffffff,0x1000500,0x3000500,0x7000500,
773 0xd000200,0x16000200,0x22000200,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000, 773 0xd000500,0x16000500,0x22000500,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
774 0xff000000,0xff000000,0xfd282828,0x72434543,0x44000200,0x37000200,0x2b000200,0x1f000200,0x15000200,0xd000200,0x8000200,0x4000200,0xffffff,0xffffff, 774 0xff000000,0xff000000,0xfd373737,0x72545754,0x44000500,0x37000500,0x2b000500,0x1f000500,0x15000500,0xd000500,0x8000500,0x4000500,0xffffff,0xffffff,
775 0xffffff,0x1000200,0x4000200,0x9000200,0x11000200,0x1d000200,0x2c000200,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe, 775 0xffffff,0x1000500,0x4000500,0x9000500,0x11000500,0x1d000500,0x2c000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,
776 0xfffefefe,0xfffcfcfc,0xfff9f9f9,0xfff3f3f3,0xffe9e9e9,0xffdedede,0xffc8c8c8,0xfd272727,0x76303230,0x4e000200,0x3d000200,0x2e000200,0x21000200,0x16000200, 776 0xfffefefe,0xfffdfdfd,0xfffafafa,0xfff5f5f5,0xffededed,0xffe3e3e3,0xffd1d1d1,0xfd363636,0x76404240,0x4e000500,0x3d000500,0x2e000500,0x21000500,0x16000500,
777 0xe000200,0x8000200,0xffffff,0xffffff,0xffffff,0x2000200,0x5000200,0xb000200,0x15000200,0x24000200,0x36000200,0xff000000,0xfffefefe,0xfffefefe, 777 0xe000500,0x8000500,0xffffff,0xffffff,0xffffff,0x2000500,0x5000500,0xb000500,0x15000500,0x24000500,0x36000500,0xff000000,0xfffefefe,0xfffefefe,
778 0xffffffff,0xffffffff,0xfffefefe,0xfffefefe,0xfffdfdfd,0xfffcfcfc,0xfff6f6f6,0xffededed,0xffdedede,0xffcccccc,0xfffefefe,0xffb3b3b3,0xfd292929,0x802e302e, 778 0xffffffff,0xffffffff,0xfffefefe,0xfffefefe,0xfffdfdfd,0xfffdfdfd,0xfff8f8f8,0xfff0f0f0,0xffe3e3e3,0xffd4d4d4,0xfffefefe,0xffbebebe,0xfd383838,0x803e403e,
779 0x53000200,0x40000200,0x2f000200,0x21000200,0x16000200,0xd000200,0xffffff,0xffffff,0xffffff,0x3000200,0x7000200,0xe000200,0x19000200,0x2a000200, 779 0x53000500,0x40000500,0x2f000500,0x21000500,0x16000500,0xd000500,0xffffff,0xffffff,0xffffff,0x3000500,0x7000500,0xe000500,0x19000500,0x2a000500,
780 0x40000200,0xff000000,0xfffdfdfd,0xfffdfdfd,0xfffdfdfd,0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfffbfbfb,0xfffafafa,0xfff4f4f4,0xffe9e9e9,0xffd4d4d4,0xffbcbcbc, 780 0x40000500,0xff000000,0xfffdfdfd,0xfffdfdfd,0xfffdfdfd,0xfffdfdfd,0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfffbfbfb,0xfff6f6f6,0xffededed,0xffdbdbdb,0xffc6c6c6,
781 0xffffffff,0xfffcfcfc,0xffa1a1a1,0xfd2b2b2b,0x7e262826,0x55000200,0x41000200,0x2f000200,0x20000200,0x15000200,0x1000200,0x1000200,0x3000200,0x4000200, 781 0xffffffff,0xfffdfdfd,0xffaeaeae,0xfd3b3b3b,0x7e353735,0x55000500,0x41000500,0x2f000500,0x20000500,0x15000500,0x1000500,0x1000500,0x3000500,0x4000500,
782 0x9000200,0x11000200,0x1e000200,0x2f000200,0x47000200,0xff000000,0xfff8f8f8,0xfff9f9f9,0xfff9f9f9,0xfffafafa,0xfff9f9f9,0xfffafafa,0xfff9f9f9,0xfff8f8f8, 782 0x9000500,0x11000500,0x1e000500,0x2f000500,0x47000500,0xff000000,0xfff9f9f9,0xfffafafa,0xfffafafa,0xfffbfbfb,0xfffafafa,0xfffbfbfb,0xfffafafa,0xfff9f9f9,
783 0xfff1f1f1,0xffe4e4e4,0xffcdcdcd,0xffaeaeae,0xffffffff,0xffffffff,0xfffcfcfc,0xff949494,0xfd2e2e2e,0x7a1d1f1d,0x55000200,0x40000200,0x2d000200,0x1e000200, 783 0xfff3f3f3,0xffe8e8e8,0xffd5d5d5,0xffbababa,0xffffffff,0xffffffff,0xfffdfdfd,0xffa3a3a3,0xfd3e3e3e,0x7a2a2d2a,0x55000500,0x40000500,0x2d000500,0x1e000500,
784 0x2000200,0x3000200,0x5000200,0x7000200,0xd000200,0x16000200,0x23000200,0x36000200,0x50000200,0xff000000,0xfff0f0f0,0xfff1f1f1,0xfff2f2f2,0xfff4f4f4, 784 0x2000500,0x3000500,0x5000500,0x7000500,0xd000500,0x16000500,0x23000500,0x36000500,0x50000500,0xff000000,0xfff3f3f3,0xfff3f3f3,0xfff4f4f4,0xfff6f6f6,
785 0xfff4f4f4,0xfff5f5f5,0xfff6f6f6,0xfff4f4f4,0xffeeeeee,0xffe1e1e1,0xffc8c8c8,0xffa7a7a7,0xffffffff,0xffffffff,0xffffffff,0xfff9f9f9,0xff8e8e8e,0xfd343434, 785 0xfff6f6f6,0xfff7f7f7,0xfff8f8f8,0xfff6f6f6,0xfff1f1f1,0xffe6e6e6,0xffd1d1d1,0xffb4b4b4,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff9d9d9d,0xfd454545,
786 0x781e1e1e,0x52000200,0x3c000200,0x29000200,0x4000200,0x6000200,0x9000200,0xd000200,0x13000200,0x1c000200,0x2a000200,0x3e000200,0x57000200,0xff000000, 786 0x782b2b2b,0x52000500,0x3c000500,0x29000500,0x4000500,0x6000500,0x9000500,0xd000500,0x13000500,0x1c000500,0x2a000500,0x3e000500,0x57000500,0xff000000,
787 0xffe2e2e2,0xffe4e4e4,0xffe7e7e7,0xffeaeaea,0xffebebeb,0xffeeeeee,0xfff1f1f1,0xfff1f1f1,0xffededed,0xffdfdfdf,0xffc7c7c7,0xffa6a6a6,0xffffffff,0xffffffff, 787 0xffe7e7e7,0xffe8e8e8,0xffebebeb,0xffeeeeee,0xffeeeeee,0xfff1f1f1,0xfff3f3f3,0xfff3f3f3,0xfff0f0f0,0xffe4e4e4,0xffd0d0d0,0xffb3b3b3,0xffffffff,0xffffffff,
788 0xffffffff,0xffffffff,0xfff8f8f8,0xff8f8f8f,0xfc3b3b3b,0x70141714,0x4c000200,0x36000200,0x8000200,0xb000200,0xf000200,0x15000200,0x1a000200,0x25000200, 788 0xffffffff,0xffffffff,0xfff9f9f9,0xff9e9e9e,0xfc4c4c4c,0x701f231f,0x4c000500,0x36000500,0x8000500,0xb000500,0xf000500,0x15000500,0x1a000500,0x25000500,
789 0x33000200,0x47000200,0x5f000200,0xff000000,0xffcfcfcf,0xffd2d2d2,0xffd6d6d6,0xffdbdbdb,0xffdfe0df,0xffe5e6e5,0xffe9eae9,0xffececec,0xffeaeaea,0xffe1e1e1, 789 0x33000500,0x47000500,0x5f000500,0xff000000,0xffd7d7d7,0xffd9d9d9,0xffdddddd,0xffe1e1e1,0xffe4e5e4,0xffe9eae9,0xffedeeed,0xffefefef,0xffeeeeee,0xffe6e6e6,
790 0xffcbcbcb,0xffadadad,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff929292,0xfb434343,0x5c000200,0x42000200,0xc000200,0x11000200, 790 0xffd3d3d3,0xffb9b9b9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xffa1a1a1,0xfb545454,0x5c000500,0x42000500,0xc000500,0x11000500,
791 0x17000200,0x1e000200,0x25000200,0x30000200,0x3f000200,0x51000200,0x69000200,0xff000100,0xffb5b6b5,0xffbabbba,0xffc0c0c0,0xffc9c9c9,0xffd0d0d0,0xffd9d9d9, 791 0x17000500,0x1e000500,0x25000500,0x30000500,0x3f000500,0x51000500,0x69000500,0xff000300,0xffc0c1c0,0xffc4c5c4,0xffcacaca,0xffd1d1d1,0xffd7d7d7,0xffdfdfdf,
792 0xffe1e1e1,0xffe8e8e8,0xffe8e9e8,0xffe2e3e2,0xffd5d5d5,0xffbebebe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff2e2e2e, 792 0xffe6e6e6,0xffececec,0xffecedec,0xffe7e8e7,0xffdcdcdc,0xffc8c8c8,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xff3e3e3e,
793 0x6a000200,0x4e000200,0x11000200,0x18000200,0x20000200,0x29000200,0x32000200,0x3d000200,0x4c000200,0x5d000200,0x74000200,0xff000100,0xff979897,0xff9e9f9e, 793 0x6a000500,0x4e000500,0x11000500,0x18000500,0x20000500,0x29000500,0x32000500,0x3d000500,0x4c000500,0x5d000500,0x74000500,0xff000300,0xffa5a6a5,0xffacadac,
794 0xffa7a8a7,0xffb3b4b3,0xffbebebe,0xffcbcbcb,0xffd8d8d8,0xffe1e1e1,0xffe7e7e7,0xffe7e8e7,0xffdfdfdf,0xffbababa,0xff909090,0xff6e6e6e,0xff5d5d5d,0xff595959, 794 0xffb4b5b4,0xffbebfbe,0xffc8c8c8,0xffd3d3d3,0xffdedede,0xffe6e6e6,0xffebebeb,0xffebeceb,0xffe4e4e4,0xffc4c4c4,0xff9f9f9f,0xff7f7f7f,0xff6f6f6f,0xff6b6b6b,
795 0xff5f5f5f,0xff7b7b7b,0xffa8a8a8,0xff000000,0x76000200,0x58000200,0x16000200,0x1f000200,0xf8fefefe,0xf0fbfbfb,0xecf9f9f9,0xecf6f6f6,0xedf5f5f5,0xeff3f3f3, 795 0xff717171,0xff8c8c8c,0xffb5b5b5,0xff000000,0x76000500,0x58000500,0x16000500,0x1f000500,0xf8fefefe,0xf0fcfcfc,0xecfafafa,0xecf8f8f8,0xedf7f7f7,0xeff5f5f5,
796 0xf1f1f1f1,0xffe4e4e4,0xfff1f1f1,0xfff2f2f2,0xfff4f4f4,0xfff8f8f8,0xfffcfcfc,0xffbdbebd,0xffcecece,0xffdbdbdb,0xffe7e7e7,0xffeaeaea,0xffc3c3c3,0xff909090, 796 0xf1f3f3f3,0xffe8e8e8,0xfff3f3f3,0xfff4f4f4,0xfff6f6f6,0xfff9f9f9,0xfffdfdfd,0xffc7c8c7,0xffd6d6d6,0xffe1e1e1,0xffebebeb,0xffeeeeee,0xffcccccc,0xff9f9f9f,
797 0xff7c7c7c,0xff717171,0xff717171,0xff6c6c6c,0xff5f5f5f,0xff5e5e5e,0xff626262,0xff000000,0x80000200,0x60000200,0x1b000200,0x26000200,0xf0fbfbfb,0xe0f4f4f4, 797 0xff8d8d8d,0xff828282,0xff828282,0xff7d7d7d,0xff717171,0xff707070,0xff747474,0xff000000,0x80000500,0x60000500,0x1b000500,0x26000500,0xf0fcfcfc,0xe0f6f6f6,
798 0xd8ececec,0xd8e7e7e7,0xdbe3e3e3,0xdfdedede,0xe3dadbda,0xffc2c3c2,0xffd8d8d8,0xffdbdbdb,0xffe1e1e1,0xffececec,0xfff8f8f8,0xffafafaf,0xffc4c5c4,0xffd6d6d6, 798 0xd8efefef,0xd8ebebeb,0xdbe8e8e8,0xdfe3e3e3,0xe3e0e1e0,0xffcbcccb,0xffdedede,0xffe1e1e1,0xffe6e6e6,0xffefefef,0xfff9f9f9,0xffbbbbbb,0xffcdcecd,0xffdddddd,
799 0xffe5e6e5,0xffcecece,0xff9a9a9a,0xff8a8a8a,0xff959595,0xffb5b5b5,0xffc5c5c5,0xffc6c6c6,0xffbababa,0xff818181,0xff5c5c5c,0xff000000,0x87000200,0x66000200, 799 0xffe9eae9,0xffd6d6d6,0xffa8a8a8,0xff9a9a9a,0xffa4a4a4,0xffc0c0c0,0xffcecece,0xffcfcfcf,0xffc4c4c4,0xff919191,0xff6e6e6e,0xff000000,0x87000500,0x66000500,
800 0x1f000200,0x2c000200,0xecf9f9f9,0xd8ededed,0xcee0e0e0,0xced9d9d9,0xd3d3d3d3,0xd7cfcfcf,0xddc9cac9,0xffaeafae,0xffc3c3c3,0xffc8c8c8,0xffd0d0d0,0xffe1e1e1, 800 0x1f000500,0x2c000500,0xecfafafa,0xd8f0f0f0,0xcee5e5e5,0xcedfdfdf,0xd3dadada,0xd7d7d7d7,0xddd1d2d1,0xffbabbba,0xffcccccc,0xffd1d1d1,0xffd7d7d7,0xffe6e6e6,
801 0xfff3f4f3,0xffa3a4a3,0xffbbbbbb,0xffd3d3d3,0xffd7d7d7,0xffaeaeae,0xff969696,0xffa7a7a7,0xffe1e1e1,0xfff1f1f1,0xfff5f5f5,0xfff0f0f0,0xffc9c9c9,0xffe2e2e2, 801 0xfff5f6f5,0xffb0b1b0,0xffc5c5c5,0xffdadada,0xffdddddd,0xffbababa,0xffa4a4a4,0xffb4b4b4,0xffe6e6e6,0xfff3f3f3,0xfff7f7f7,0xfff3f3f3,0xffd1d1d1,0xffe7e7e7,
802 0xff909090,0xff000000,0x8b000200,0x6a000200,0x22000200,0x30000200,0xebf8f8f8,0xd6e9e9e9,0xcddadada,0xced3d3d3,0xd3cdcdcd,0xd8c9c9c9,0xddc4c4c4,0xffaaabaa, 802 0xff9f9f9f,0xff000000,0x8b000500,0x6a000500,0x22000500,0x30000500,0xebf9f9f9,0xd6ededed,0xcde0e0e0,0xcedadada,0xd3d5d5d5,0xd8d1d1d1,0xddcdcdcd,0xffb6b7b6,
803 0xffb9bab9,0xffbebfbe,0xffc8c8c8,0xffdbdbdb,0xfff2f2f2,0xff9a9b9a,0xffb6b6b6,0xffcecece,0xffc1c1c1,0xffa3a3a3,0xffa0a0a0,0xffdcdcdc,0xfff8f8f8,0xfff6f6f6, 803 0xffc4c4c4,0xffc8c9c8,0xffd1d1d1,0xffe1e1e1,0xfff4f4f4,0xffa8a9a8,0xffc1c1c1,0xffd6d6d6,0xffcbcbcb,0xffb0b0b0,0xffadadad,0xffe2e2e2,0xfff9f9f9,0xfff8f8f8,
804 0xfff5f5f5,0xffa2a2a2,0xff686868,0xffa9a9a9,0xffdbdbdb,0xff000000,0x8e000200,0x6d000200,0x25000200,0x33000200,0xebf7f7f7,0xd7e7e8e7,0xced8d8d8,0xd0d0d0d0, 804 0xfff7f7f7,0xffafafaf,0xff7a7a7a,0xffb6b6b6,0xffe1e1e1,0xff000000,0x8e000500,0x6d000500,0x25000500,0x33000500,0xebf8f8f8,0xd7ebeceb,0xcededede,0xd0d7d7d7,
805 0xd5cccccc,0xdac7c7c7,0xdfc2c2c2,0xffaaabaa,0xffb5b6b5,0xffb9bab9,0xffc3c4c3,0xffd8d8d8,0xfff0f1f0,0xff949594,0xffb1b1b1,0xffc9c9c9,0xffb5b5b5,0xffa2a2a2, 805 0xd5d4d4d4,0xdad0d0d0,0xdfcbcbcb,0xffb6b7b6,0xffc0c1c0,0xffc4c4c4,0xffcccdcc,0xffdedede,0xfff3f3f3,0xffa3a4a3,0xffbdbdbd,0xffd1d1d1,0xffc0c0c0,0xffafafaf,
806 0xffb6b6b6,0xfff1f1f1,0xfff9f9f9,0xfff9f9f9,0xffaaaaaa,0xff6b6b6b,0xff656565,0xff8c8c8c,0xffececec,0xff000000,0x8f000200,0x6e000200,0x26000200,0x35000200, 806 0xffc1c1c1,0xfff3f3f3,0xfffafafa,0xfffafafa,0xffb6b6b6,0xff7c7c7c,0xff777777,0xff9b9b9b,0xffefefef,0xff000000,0x8f000500,0x6e000500,0x26000500,0x35000500,
807 0xebf7f7f7,0xd7e7e7e7,0xced7d8d7,0xd1cfcfcf,0xd6cbcbcb,0xdbc6c6c6,0xe0c2c2c2,0xffaaabaa,0xffb3b3b3,0xffb7b8b7,0xffc1c2c1,0xffd7d7d7,0xfff0f0f0,0xff919291, 807 0xebf8f8f8,0xd7ebebeb,0xcedddedd,0xd1d7d7d7,0xd6d3d3d3,0xdbcfcfcf,0xe0cbcbcb,0xffb6b7b6,0xffbebebe,0xffc2c3c2,0xffcbcbcb,0xffdddddd,0xfff3f3f3,0xffa0a1a0,
808 0xffafafaf,0xffc6c6c6,0xffafafaf,0xffa1a1a1,0xffc0c0c0,0xfff9f9f9,0xfffafafa,0xffaeaeae,0xff717171,0xff696969,0xff6f6f6f,0xffdfdfdf,0xffffffff,0xff000000, 808 0xffbbbbbb,0xffcfcfcf,0xffbbbbbb,0xffaeaeae,0xffcacaca,0xfffafafa,0xfffbfbfb,0xffbababa,0xff828282,0xff7a7a7a,0xff808080,0xffe4e4e4,0xffffffff,0xff000000,
809 0x90000200,0x6e000200,0x26000200,0x35000200,0xebf7f7f7,0xd7e7e7e7,0xced7d8d7,0xd1cfcfcf,0xd6cbcbcb,0xdbc6c6c6,0xe0c2c2c2,0xffaaabaa,0xffb3b3b3,0xffb7b8b7, 809 0x90000500,0x6e000500,0x26000500,0x35000500,0xebf8f8f8,0xd7ebebeb,0xcedddedd,0xd1d7d7d7,0xd6d3d3d3,0xdbcfcfcf,0xe0cbcbcb,0xffb6b7b6,0xffbebebe,0xffc2c3c2,
810 0xffc1c2c1,0xffd7d7d7,0xfff0f0f0,0xff919291,0xffafafaf,0xffc7c7c7,0xffb2b2b2,0xff9d9e9d,0xffb7b7b7,0xfff5f5f5,0xffafafaf,0xff757575,0xff6d6d6d,0xff656565, 810 0xffcbcbcb,0xffdddddd,0xfff3f3f3,0xffa0a1a0,0xffbbbbbb,0xffd0d0d0,0xffbdbdbd,0xffabacab,0xffc2c2c2,0xfff7f7f7,0xffbbbbbb,0xff868686,0xff7e7e7e,0xff777777,
811 0xff626262,0xff959595,0xfff2f2f2,0xff000000,0x90000200,0x6f000200,0x25000200,0x33000200,0xebf7f7f7,0xd7e7e8e7,0xced8d8d8,0xd0d0d0d0,0xd5cccccc,0xdac7c7c7, 811 0xff747474,0xffa4a4a4,0xfff4f4f4,0xff000000,0x90000500,0x6f000500,0x25000500,0x33000500,0xebf8f8f8,0xd7ebeceb,0xcededede,0xd0d7d7d7,0xd5d4d4d4,0xdad0d0d0,
812 0xdfc2c2c2,0xffaaabaa,0xffb5b6b5,0xffb9bab9,0xffc3c4c3,0xffd8d8d8,0xfff0f1f0,0xff949594,0xffb1b1b1,0xffcbcbcb,0xffbebebe,0xff979797,0xff9b9b9b,0xffe4e4e4, 812 0xdfcbcbcb,0xffb6b7b6,0xffc0c1c0,0xffc4c4c4,0xffcccdcc,0xffdedede,0xfff3f3f3,0xffa3a4a3,0xffbdbdbd,0xffd3d3d3,0xffc8c8c8,0xffa5a5a5,0xffa9a9a9,0xffe8e8e8,
813 0xffacacac,0xff6d6d6d,0xff8c8c8c,0xff8b8b8b,0xff575757,0xff555555,0xff838383,0xff000000,0x90000200,0x6f000200,0x22000200,0x30000200,0xebf8f8f8,0xd6e9e9e9, 813 0xffb8b8b8,0xff7e7e7e,0xff9b9b9b,0xff9a9a9a,0xff696969,0xff676767,0xff939393,0xff000000,0x90000500,0x6f000500,0x22000500,0x30000500,0xebf9f9f9,0xd6ededed,
814 0xcddadada,0xced3d3d3,0xd3cdcdcd,0xd8c9c9c9,0xddc4c4c4,0xffaaabaa,0xffb9bab9,0xffbebfbe,0xffc8c8c8,0xffdbdbdb,0xfff2f2f2,0xff9a9b9a,0xffb5b5b5,0xffcfcfcf, 814 0xcde0e0e0,0xcedadada,0xd3d5d5d5,0xd8d1d1d1,0xddcdcdcd,0xffb6b7b6,0xffc4c4c4,0xffc8c9c8,0xffd1d1d1,0xffe1e1e1,0xfff4f4f4,0xffa8a9a8,0xffc0c0c0,0xffd7d7d7,
815 0xffcfd0cf,0xff979797,0xff818181,0xffa7a7a7,0xffececec,0xffbbbbbb,0xffe7e7e7,0xfffbfbfb,0xff8f8f8f,0xff565656,0xff565656,0xff000000,0x90000200,0x6f000200, 815 0xffd7d7d7,0xffa5a5a5,0xff919191,0xffb4b4b4,0xffefefef,0xffc5c5c5,0xffebebeb,0xfffcfcfc,0xff9e9e9e,0xff686868,0xff686868,0xff000000,0x90000500,0x6f000500,
816 0x1f000200,0x2c000200,0xecf9f9f9,0xd8ededed,0xcee0e0e0,0xced9d9d9,0xd3d3d3d3,0xd7cfcfcf,0xddc9cac9,0xffaeafae,0xffc3c3c3,0xffc8c8c8,0xffd0d0d0,0xffe1e1e1, 816 0x1f000500,0x2c000500,0xecfafafa,0xd8f0f0f0,0xcee5e5e5,0xcedfdfdf,0xd3dadada,0xd7d7d7d7,0xddd1d2d1,0xffbabbba,0xffcccccc,0xffd1d1d1,0xffd7d7d7,0xffe6e6e6,
817 0xfff3f4f3,0xffa3a4a3,0xffbbbcbb,0xffd0d0d0,0xffe2e3e2,0xffb9b9b9,0xff797979,0xff6f6f6f,0xff979797,0xffd6d6d6,0xffe3e3e3,0xffe6e6e6,0xffc2c2c2,0xff5e5e5e, 817 0xfff5f6f5,0xffb0b1b0,0xffc5c6c5,0xffd7d7d7,0xffe7e8e7,0xffc4c4c4,0xff8a8a8a,0xff808080,0xffa5a5a5,0xffdddddd,0xffe8e8e8,0xffeaeaea,0xffcbcbcb,0xff707070,
818 0xff575757,0xff000000,0x90000200,0x6f000200,0x1b000200,0x26000200,0xf0fbfbfb,0xe0f4f4f4,0xd8ececec,0xd8e7e7e7,0xdbe3e3e3,0xdfdedede,0xe3dadbda,0xffc2c3c2, 818 0xff696969,0xff000000,0x90000500,0x6f000500,0x1b000500,0x26000500,0xf0fcfcfc,0xe0f6f6f6,0xd8efefef,0xd8ebebeb,0xdbe8e8e8,0xdfe3e3e3,0xe3e0e1e0,0xffcbcccb,
819 0xffd8d8d8,0xffdbdbdb,0xffe1e1e1,0xffececec,0xfff8f8f8,0xffafb0af,0xffc3c4c3,0xffd3d4d3,0xffe4e5e4,0xffe9eae9,0xffa8a8a8,0xff6b6b6b,0xff646464,0xff676767, 819 0xffdedede,0xffe1e1e1,0xffe6e6e6,0xffefefef,0xfff9f9f9,0xffbbbcbb,0xffcccdcc,0xffdadbda,0xffe8e9e8,0xffedeeed,0xffb5b5b5,0xff7c7c7c,0xff767676,0xff797979,
820 0xff757575,0xff757575,0xff6b6b6b,0xff5b5b5b,0xff5b5b5b,0xff000000,0x90000200,0x6f000200,0x16000200,0x1f000200,0xf8fefefe,0xf0fbfbfb,0xecf9f9f9,0xecf6f6f6, 820 0xff868686,0xff868686,0xff7c7c7c,0xff6d6d6d,0xff6d6d6d,0xff000000,0x90000500,0x6f000500,0x16000500,0x1f000500,0xf8fefefe,0xf0fcfcfc,0xecfafafa,0xecf8f8f8,
821 0xedf5f5f5,0xeff3f3f3,0xf1f1f1f1,0xffe4e4e4,0xfff1f1f1,0xfff2f2f2,0xfff4f4f4,0xfff8f8f8,0xfffcfcfc,0xffbcbdbc,0xffcdcecd,0xffdadada,0xffe4e4e4,0xffefefef, 821 0xedf7f7f7,0xeff5f5f5,0xf1f3f3f3,0xffe8e8e8,0xfff3f3f3,0xfff4f4f4,0xfff6f6f6,0xfff9f9f9,0xfffdfdfd,0xffc6c7c6,0xffd5d6d5,0xffe0e0e0,0xffe8e8e8,0xfff2f2f2,
822 0xffefefef,0xffbcbcbc,0xff868686,0xff606060,0xff606060,0xff606060,0xff606060,0xff838383,0xffb3b3b3,0xff000000,0x90000200,0x6e000200,0x11000200,0x18000200, 822 0xfff2f2f2,0xffc6c6c6,0xff969696,0xff727272,0xff727272,0xff727272,0xff727272,0xff939393,0xffbebebe,0xff000000,0x90000500,0x6e000500,0x11000500,0x18000500,
823 0x20000200,0x29000200,0x32000200,0x3d000200,0x4c000200,0x5d000200,0x73000200,0xff000100,0xff979897,0xff9e9f9e,0xffa7a8a7,0xffb3b4b3,0xffbdbebd,0xffcacbca, 823 0x20000500,0x29000500,0x32000500,0x3d000500,0x4c000500,0x5d000500,0x73000500,0xff000300,0xffa5a6a5,0xffacadac,0xffb4b5b4,0xffbebfbe,0xffc7c8c7,0xffd2d3d2,
824 0xffd6d6d6,0xffe1e1e1,0xffe9e9e9,0xffebebeb,0xfff2f2f2,0xfff7f7f7,0xffe7e7e7,0xffcfcfcf,0xffbfbfbf,0xffbfbfbf,0xffcecece,0xffe6e6e6,0xfff9f9f9,0xff000000, 824 0xffdddddd,0xffe6e6e6,0xffededed,0xffeeeeee,0xfff4f4f4,0xfff8f8f8,0xffebebeb,0xffd7d7d7,0xffc9c9c9,0xffc9c9c9,0xffd6d6d6,0xffeaeaea,0xfffafafa,0xff000000,
825 0x8e000200,0x6d000200,0xc000200,0x11000200,0x17000200,0x1e000200,0x25000200,0x30000200,0x3f000200,0x51000200,0x68000200,0xff000100,0xffb5b6b5,0xffbabbba, 825 0x8e000500,0x6d000500,0xc000500,0x11000500,0x17000500,0x1e000500,0x25000500,0x30000500,0x3f000500,0x51000500,0x68000500,0xff000300,0xffc0c1c0,0xffc4c5c4,
826 0xffc0c0c0,0xffc9c9c9,0xffd0d0d0,0xffd8d8d8,0xffe1e1e1,0xffe7e7e7,0xffececec,0xffeeeeee,0xfff0f0f0,0xfff2f2f2,0xfff6f6f6,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7, 826 0xffcacaca,0xffd1d1d1,0xffd7d7d7,0xffdedede,0xffe6e6e6,0xffebebeb,0xffefefef,0xfff1f1f1,0xfff3f3f3,0xfff4f4f4,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,
827 0xfff7f7f7,0xfff5f5f5,0xfff2f2f2,0xff000000,0x8c000200,0x6b000200,0x8000200,0xb000200,0xf000200,0x14000200,0x1a000200,0x24000200,0x32000200,0x44000200, 827 0xfff8f8f8,0xfff7f7f7,0xfff4f4f4,0xff000000,0x8c000500,0x6b000500,0x8000500,0xb000500,0xf000500,0x14000500,0x1a000500,0x24000500,0x32000500,0x44000500,
828 0x5c000200,0xff000000,0xffcfcfcf,0xffd2d2d2,0xffd6d6d6,0xffdbdbdb,0xffdedfde,0xffe4e4e4,0xffe8e9e8,0xffededed,0xfff0f0f0,0xfff2f2f2,0xfff3f3f3,0xfff4f4f4, 828 0x5c000500,0xff000000,0xffd7d7d7,0xffd9d9d9,0xffdddddd,0xffe1e1e1,0xffe3e4e3,0xffe8e8e8,0xffecedec,0xfff0f0f0,0xfff3f3f3,0xfff4f4f4,0xfff5f5f5,0xfff6f6f6,
829 0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xff000000,0x87000200,0x68000200,0x4000200,0x6000200,0x9000200,0xc000200, 829 0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xff000000,0x87000500,0x68000500,0x4000500,0x6000500,0x9000500,0xc000500,
830 0x12000200,0x1a000200,0x28000200,0x39000200,0x50000200,0xff000000,0xffe2e2e2,0xffe4e4e4,0xffe7e7e7,0xffeaeaea,0xffeaeaea,0xffededed,0xfff1f1f1,0xfff2f2f2, 830 0x12000500,0x1a000500,0x28000500,0x39000500,0x50000500,0xff000000,0xffe7e7e7,0xffe8e8e8,0xffebebeb,0xffeeeeee,0xffeeeeee,0xfff0f0f0,0xfff3f3f3,0xfff4f4f4,
831 0xfff4f4f4,0xfff5f5f5,0xfff5f5f5,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xff000000,0x7f000200,0x61000200, 831 0xfff6f6f6,0xfff7f7f7,0xfff7f7f7,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xff000000,0x7f000500,0x61000500,
832 0x2000200,0x3000200,0x4000200,0x7000200,0xc000200,0x14000200,0x1e000200,0x30000200,0x45000200,0xff000000,0xfff0f0f0,0xfff1f1f1,0xfff2f2f2,0xfff4f4f4, 832 0x2000500,0x3000500,0x4000500,0x7000500,0xc000500,0x14000500,0x1e000500,0x30000500,0x45000500,0xff000000,0xfff3f3f3,0xfff3f3f3,0xfff4f4f4,0xfff6f6f6,
833 0xfff6f6f6,0xfff8f8f8,0xfffafafa,0xfffcfcfc,0xfffdfdfd,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff, 833 0xfff8f8f8,0xfff9f9f9,0xfffbfbfb,0xfffdfdfd,0xfffdfdfd,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
834 0xffffffff,0xff000000,0x73000200,0x58000200,0x1000200,0x1000200,0x2000200,0x4000200,0x8000200,0xe000200,0x18000200,0x27000200,0x38000200,0xff000000, 834 0xffffffff,0xff000000,0x73000500,0x58000500,0x1000500,0x1000500,0x2000500,0x4000500,0x8000500,0xe000500,0x18000500,0x27000500,0x38000500,0xff000000,
835 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000, 835 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
836 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x63000200,0x4c000200,0xffffff,0xffffff,0xffffff,0x2000200,0x5000200,0xa000200, 836 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x63000500,0x4c000500,0xffffff,0xffffff,0xffffff,0x2000500,0x5000500,0xa000500,
837 0x12000200,0x1e000200,0x2d000200,0x3f000200,0x52000200,0x64000200,0x74000200,0x80000200,0x87000200,0x8c000200,0x8e000200,0x90000200,0x90000200,0x90000200, 837 0x12000500,0x1e000500,0x2d000500,0x3f000500,0x52000500,0x64000500,0x74000500,0x80000500,0x87000500,0x8c000500,0x8e000500,0x90000500,0x90000500,0x90000500,
838 0x90000200,0x90000200,0x90000200,0x90000200,0x8e000200,0x8c000200,0x87000200,0x7f000200,0x73000200,0x63000200,0x51000200,0x3e000200,0xffffff,0xffffff, 838 0x90000500,0x90000500,0x90000500,0x90000500,0x8e000500,0x8c000500,0x87000500,0x7f000500,0x73000500,0x63000500,0x51000500,0x3e000500,0xffffff,0xffffff,
839 0xffffff,0x1000200,0x3000200,0x7000200,0xd000200,0x16000200,0x22000200,0x30000200,0x3e000200,0x4c000200,0x58000200,0x61000200,0x68000200,0x6b000200, 839 0xffffff,0x1000500,0x3000500,0x7000500,0xd000500,0x16000500,0x22000500,0x30000500,0x3e000500,0x4c000500,0x58000500,0x61000500,0x68000500,0x6b000500,
840 0x6d000200,0x6e000200,0x6f000200,0x6f000200,0x6f000200,0x6f000200,0x6f000200,0x6e000200,0x6d000200,0x6b000200,0x68000200,0x61000200,0x58000200,0x4c000200, 840 0x6d000500,0x6e000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6e000500,0x6d000500,0x6b000500,0x68000500,0x61000500,0x58000500,0x4c000500,
841 0x3e000200,0x30000200 841 0x3e000500,0x30000500
842}; 842};
843 843
844static const QRgb DocumentTypePowerPoint_data[] = { 844static const QRgb DocumentTypePowerPoint_data[] = {
845 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 845 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
846 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 846 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
847 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000200,0x2000200,0x5000200,0x9000200,0x10000200,0x18000200,0x22000200, 847 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000500,0x2000500,0x5000500,0x9000500,0x10000500,0x18000500,0x22000500,
848 0x2c000200,0x36000200,0x3f000200,0x45000200,0x4a000200,0x4d000200,0x4e000200,0x4e000200,0x4e000200,0x4c000200,0x49000200,0x45000200,0x3f000200,0x37000200, 848 0x2c000500,0x36000500,0x3f000500,0x45000500,0x4a000500,0x4d000500,0x4e000500,0x4e000500,0x4e000500,0x4c000500,0x49000500,0x45000500,0x3f000500,0x37000500,
849 0x2e000200,0x25000200,0x1c000200,0x13000200,0xd000200,0x8000200,0x4000200,0x2000200,0xffffff,0xffffff,0xffffff,0x1000200,0x3000200,0x7000200, 849 0x2e000500,0x25000500,0x1c000500,0x13000500,0xd000500,0x8000500,0x4000500,0x2000500,0xffffff,0xffffff,0xffffff,0x1000500,0x3000500,0x7000500,
850 0xd000200,0x16000200,0x22000200,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000, 850 0xd000500,0x16000500,0x22000500,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
851 0xff000000,0xff000000,0xfd282828,0x72434543,0x44000200,0x37000200,0x2b000200,0x1f000200,0x15000200,0xd000200,0x8000200,0x4000200,0xffffff,0xffffff, 851 0xff000000,0xff000000,0xfd373737,0x72545754,0x44000500,0x37000500,0x2b000500,0x1f000500,0x15000500,0xd000500,0x8000500,0x4000500,0xffffff,0xffffff,
852 0xffffff,0x1000200,0x4000200,0x9000200,0x11000200,0x1d000200,0x2c000200,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe, 852 0xffffff,0x1000500,0x4000500,0x9000500,0x11000500,0x1d000500,0x2c000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,
853 0xfffefefe,0xfffcfcfc,0xfff9f9f9,0xfff3f3f3,0xffe9e9e9,0xffdedede,0xffc8c8c8,0xfd272727,0x76303230,0x4e000200,0x3d000200,0x2e000200,0x21000200,0x16000200, 853 0xfffefefe,0xfffdfdfd,0xfffafafa,0xfff5f5f5,0xffededed,0xffe3e3e3,0xffd1d1d1,0xfd363636,0x76404240,0x4e000500,0x3d000500,0x2e000500,0x21000500,0x16000500,
854 0xe000200,0x8000200,0xffffff,0xffffff,0xffffff,0x2000200,0x5000200,0xb000200,0x15000200,0x24000200,0x36000200,0xff000000,0xffffffff,0xffffffff, 854 0xe000500,0x8000500,0xffffff,0xffffff,0xffffff,0x2000500,0x5000500,0xb000500,0x15000500,0x24000500,0x36000500,0xff000000,0xffffffff,0xffffffff,
855 0xffffffff,0xffffffff,0xfffefefe,0xfffefefe,0xfffdfdfd,0xfffcfcfc,0xfff6f6f6,0xffededed,0xffdedede,0xffcccccc,0xfffefefe,0xffb3b3b3,0xfd292929,0x802e302e, 855 0xffffffff,0xffffffff,0xfffefefe,0xfffefefe,0xfffdfdfd,0xfffdfdfd,0xfff8f8f8,0xfff0f0f0,0xffe3e3e3,0xffd4d4d4,0xfffefefe,0xffbebebe,0xfd383838,0x803e403e,
856 0x53000200,0x40000200,0x2f000200,0x21000200,0x16000200,0xd000200,0xffffff,0xffffff,0xffffff,0x2000200,0x6000200,0xd000200,0x18000200,0x29000200, 856 0x53000500,0x40000500,0x2f000500,0x21000500,0x16000500,0xd000500,0xffffff,0xffffff,0xffffff,0x2000500,0x6000500,0xd000500,0x18000500,0x29000500,
857 0x3f000200,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffdfdfd,0xfffcfcfc,0xfffafafa,0xfff4f4f4,0xffe9e9e9,0xffd4d4d4,0xffbcbcbc, 857 0x3f000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffdfdfd,0xfffdfdfd,0xfffbfbfb,0xfff6f6f6,0xffededed,0xffdbdbdb,0xffc6c6c6,
858 0xffffffff,0xfffcfcfc,0xffa1a1a1,0xfd2b2b2b,0x7e262826,0x55000200,0x41000200,0x2f000200,0x20000200,0x15000200,0xffffff,0xffffff,0x1000200,0x2000200, 858 0xffffffff,0xfffdfdfd,0xffaeaeae,0xfd3b3b3b,0x7e353735,0x55000500,0x41000500,0x2f000500,0x20000500,0x15000500,0xffffff,0xffffff,0x1000500,0x2000500,
859 0x6000200,0xe000200,0x1b000200,0x2d000200,0x45000200,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffdfdfd,0xfffbfbfb,0xfff9f9f9, 859 0x6000500,0xe000500,0x1b000500,0x2d000500,0x45000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfffafafa,
860 0xfff2f2f2,0xffe4e4e4,0xffcdcdcd,0xffaeaeae,0xffffffff,0xffffffff,0xfffcfcfc,0xff949494,0xfd2e2e2e,0x7a1d1f1d,0x55000200,0x40000200,0x2d000200,0x1e000200, 860 0xfff4f4f4,0xffe8e8e8,0xffd5d5d5,0xffbababa,0xffffffff,0xffffffff,0xfffdfdfd,0xffa3a3a3,0xfd3e3e3e,0x7a2a2d2a,0x55000500,0x40000500,0x2d000500,0x1e000500,
861 0xffffff,0xffffff,0x1000200,0x2000200,0x7000200,0xf000200,0x1d000200,0x30000200,0x4a000200,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff, 861 0xffffff,0xffffff,0x1000500,0x2000500,0x7000500,0xf000500,0x1d000500,0x30000500,0x4a000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
862 0xfffdfdfd,0xfffcfcfc,0xfffbfbfb,0xfff7f7f7,0xfff0f0f0,0xffe2e2e2,0xffc8c8c8,0xffa7a7a7,0xffffffff,0xffffffff,0xffffffff,0xfff9f9f9,0xff8e8e8e,0xfd343434, 862 0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfff8f8f8,0xfff3f3f3,0xffe7e7e7,0xffd1d1d1,0xffb4b4b4,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff9d9d9d,0xfd454545,
863 0x781e1e1e,0x52000200,0x3c000200,0x29000200,0xffffff,0xffffff,0x1000200,0x3000200,0x7000200,0x10000200,0x1e000200,0x32000200,0x4d000200,0xff000000, 863 0x782b2b2b,0x52000500,0x3c000500,0x29000500,0xffffff,0xffffff,0x1000500,0x3000500,0x7000500,0x10000500,0x1e000500,0x32000500,0x4d000500,0xff000000,
864 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffcfcfc,0xfffbfbfb,0xfffafafa,0xfff7f7f7,0xfff0f0f0,0xffe1e1e1,0xffc8c8c8,0xffa6a6a6,0xffffffff,0xffffffff, 864 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffcfcfc,0xfffbfbfb,0xfff8f8f8,0xfff3f3f3,0xffe6e6e6,0xffd1d1d1,0xffb3b3b3,0xffffffff,0xffffffff,
865 0xffffffff,0xffffffff,0xfff8f8f8,0xff8f8f8f,0xfc3b3b3b,0x70141714,0x4c000200,0x36000200,0x1000000,0x2000000,0x5000000,0x9000000,0xf000000,0x18000000, 865 0xffffffff,0xffffffff,0xfff9f9f9,0xff9e9e9e,0xfc4c4c4c,0x701f231f,0x4c000500,0x36000500,0x1000000,0x2000000,0x5000000,0x9000000,0xf000000,0x18000000,
866 0x27000000,0x3b000000,0x55000300,0xff000000,0xfff5f5f5,0xfff5f5f5,0xfff5f5f5,0xfff6f6f6,0xfff4f4f4,0xfff5f5f5,0xfff5f5f5,0xfff4f4f4,0xffefefef,0xffe4e4e4, 866 0x27000000,0x3b000000,0x55000600,0xff000000,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7,0xfff8f8f8,0xfff6f6f6,0xfff7f7f7,0xfff7f7f7,0xfff6f6f6,0xfff2f2f2,0xffe8e8e8,
867 0xffcccccc,0xffadadad,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff929292,0xfb434343,0x5c000200,0x42000200,0x4000000,0x7000000, 867 0xffd4d4d4,0xffb9b9b9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xffa1a1a1,0xfb545454,0x5c000500,0x42000500,0x4000000,0x7000000,
868 0xd000000,0x15000000,0x1d000000,0x29000000,0x38000000,0x4c000000,0x64000000,0xff000000,0xffe0e0e0,0xffe0e0e0,0xffe2e2e2,0xffe4e4e4,0xffe4e4e4,0xffe8e8e8, 868 0xd000000,0x15000000,0x1d000000,0x29000000,0x38000000,0x4c000000,0x64000000,0xff000000,0xffe5e5e5,0xffe5e5e5,0xffe7e7e7,0xffe8e8e8,0xffe8e8e8,0xffececec,
869 0xffececec,0xfff0f0f0,0xffededed,0xffe6e6e6,0xffd7d7d7,0xffbfbfbf,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff2e2e2e, 869 0xffefefef,0xfff3f3f3,0xfff0f0f0,0xffeaeaea,0xffdddddd,0xffc9c9c9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xff3e3e3e,
870 0x6a000200,0x4e000200,0x7000000,0xf000000,0x19000000,0x28000000,0x34000000,0x43000000,0x52000000,0x64000000,0x79000200,0xff000000,0xffc2c2c2,0xffc2c2c2, 870 0x6a000500,0x4e000500,0x7000000,0xf000000,0x19000000,0x28000000,0x34000000,0x43000000,0x52000000,0x64000000,0x79000500,0xff000000,0xffcbcbcb,0xffcbcbcb,
871 0xffc4c4c4,0xffc9c9c9,0xffcecece,0xffd6d6d6,0xffe2e2e2,0xffe8e8e8,0xffececec,0xffececec,0xffe2e2e2,0xffbbbbbb,0xff909090,0xff6e6e6e,0xff5d5d5d,0xff595959, 871 0xffcdcdcd,0xffd1d1d1,0xffd6d6d6,0xffdddddd,0xffe7e7e7,0xffececec,0xffefefef,0xffefefef,0xffe7e7e7,0xffc5c5c5,0xff9f9f9f,0xff7f7f7f,0xff6f6f6f,0xff6b6b6b,
872 0xff5f5f5f,0xff7b7b7b,0xffa8a8a8,0xff000000,0x76000200,0x58000200,0xc000000,0x19000000,0xff66c66a,0xff63c466,0xff5fc163,0xff5cbe60,0xff57bb5b,0xff55bb59, 872 0xff717171,0xff8c8c8c,0xffb5b5b5,0xff000000,0x76000500,0x58000500,0xc000000,0x19000000,0xff78cf7b,0xff75cd78,0xff71cb75,0xff6ec872,0xff69c56d,0xff67c56b,
873 0xff50ba54,0xff4cba51,0xff46b64b,0xff40b445,0xff3cb13f,0xff34b039,0xff32ad37,0xffbcbcbc,0xffd0d0d0,0xffe0e0e0,0xffebebeb,0xffefefef,0xffc6c6c6,0xff919191, 873 0xff62c466,0xff5ec463,0xff58c15d,0xff51bf57,0xff4dbd50,0xff45bc4a,0xff42b948,0xffc6c6c6,0xffd7d7d7,0xffe5e5e5,0xffeeeeee,0xfff2f2f2,0xffcfcfcf,0xffa0a0a0,
874 0xff7c7c7c,0xff717171,0xff717171,0xff6c6c6c,0xff5f5f5f,0xff5e5e5e,0xff626262,0xff000000,0x80000200,0x60000200,0x12000000,0x27000000,0xff62c265,0xff5dbc61, 874 0xff8d8d8d,0xff828282,0xff828282,0xff7d7d7d,0xff717171,0xff707070,0xff747474,0xff000000,0x80000500,0x60000500,0x12000000,0x27000000,0xff74cb77,0xff6fc673,
875 0xff58b65b,0xff52b056,0xff4fae53,0xff4bac4e,0xff47ad4b,0xff42ab45,0xff3ca841,0xff37a53b,0xff31a336,0xff2ea033,0xff2e9f32,0xff999999,0xffb9b9b9,0xffd4d4d4, 875 0xff6ac16d,0xff64bc68,0xff61ba65,0xff5db860,0xff59b95d,0xff53b757,0xff4db552,0xff48b24c,0xff41b047,0xff3ead43,0xff3ead42,0xffa7a7a7,0xffc4c4c4,0xffdbdbdb,
876 0xffe8e8e8,0xffd2d2d2,0xff9d9d9d,0xff8b8b8b,0xff959595,0xffb5b5b5,0xffc5c5c5,0xffc6c6c6,0xffbababa,0xff818181,0xff5c5c5c,0xff000000,0x87000200,0x66000200, 876 0xffececec,0xffd9d9d9,0xffababab,0xff9a9a9a,0xffa4a4a4,0xffc0c0c0,0xffcecece,0xffcfcfcf,0xffc4c4c4,0xff919191,0xff6e6e6e,0xff000000,0x87000500,0x66000500,
877 0x17000000,0x31000000,0xff5dbc61,0xffffffff,0xffffffff,0xffffffff,0xfff2f8f3,0xff97c899,0xff3b993e,0xffffffff,0xffffffff,0xffffffff,0xfff1f8f1,0xff8bc28d, 877 0x17000000,0x31000000,0xff6fc673,0xffffffff,0xffffffff,0xffffffff,0xfff4f9f5,0xffa5d1a7,0xff4ca74f,0xffffffff,0xffffffff,0xffffffff,0xfff3f9f3,0xff9acb9c,
878 0xff2a8f2d,0xff7c7c7c,0xffa4a4a4,0xffcbcbcb,0xffd7d7d7,0xffb1b1b1,0xff9a9a9a,0xffa8a8a8,0xffe1e1e1,0xfff1f1f1,0xfff5f5f5,0xfff0f0f0,0xffc9c9c9,0xffe2e2e2, 878 0xff399e3d,0xff8d8d8d,0xffb1b1b1,0xffd3d3d3,0xffdddddd,0xffbdbdbd,0xffa8a8a8,0xffb5b5b5,0xffe6e6e6,0xfff3f3f3,0xfff7f7f7,0xfff3f3f3,0xffd1d1d1,0xffe7e7e7,
879 0xff909090,0xff000000,0x8b000200,0x6a000200,0x1b000000,0x3c000000,0xff57b45a,0xffffffff,0xffdaeadb,0xff6ea871,0xffbcd6bd,0xffffffff,0xff66a369,0xffffffff, 879 0xff9f9f9f,0xff000000,0x8b000500,0x6a000500,0x1b000000,0x3c000000,0xff69bf6c,0xffffffff,0xffe0eee1,0xff7fb582,0xffc6ddc7,0xffffffff,0xff78b07a,0xffffffff,
880 0xffd5e6d6,0xff5d9b60,0xffb5d2b6,0xffffffff,0xff5e9f61,0xff646464,0xff939393,0xffbebebe,0xffc0c0c0,0xffa6a6a6,0xffa4a4a4,0xffdedede,0xfff9f9f9,0xfff6f6f6, 880 0xffdceadd,0xff6fa972,0xffc0d9c1,0xffffffff,0xff70ad73,0xff767676,0xffa2a2a2,0xffc8c8c8,0xffcacaca,0xffb3b3b3,0xffb1b1b1,0xffe3e3e3,0xfffafafa,0xfff8f8f8,
881 0xfff5f5f5,0xffa2a2a2,0xff686868,0xffa9a9a9,0xffdbdbdb,0xff000000,0x8e000200,0x6d000200,0x1d000000,0x43000000,0xff50ae54,0xffffffff,0xffc9deca,0xff317833, 881 0xfff7f7f7,0xffafafaf,0xff7a7a7a,0xffb6b6b6,0xffe1e1e1,0xff000000,0x8e000500,0x6d000500,0x1d000000,0x43000000,0xff62ba66,0xffffffff,0xffd1e3d2,0xff418943,
882 0xff659966,0xffffffff,0xff89b18a,0xffffffff,0xffc2d6c3,0xff1d6520,0xff59905b,0xffffffff,0xff86b088,0xff545454,0xff878787,0xffb4b4b4,0xffb4b4b4,0xffa5a5a5, 882 0xff77a778,0xffffffff,0xff99bd9a,0xffffffff,0xffcbddcc,0xff2a772e,0xff6b9f6d,0xffffffff,0xff96bc98,0xff666666,0xff979797,0xffbfbfbf,0xffbfbfbf,0xffb2b2b2,
883 0xffbbbbbb,0xfff3f3f3,0xfffafafa,0xfff9f9f9,0xffaaaaaa,0xff6b6b6b,0xff656565,0xff8c8c8c,0xffececec,0xff000000,0x8f000200,0x6e000200,0x1f000000,0x45000000, 883 0xffc5c5c5,0xfff5f5f5,0xfffbfbfb,0xfffafafa,0xffb6b6b6,0xff7c7c7c,0xff777777,0xff9b9b9b,0xffefefef,0xff000000,0x8f000500,0x6e000500,0x1f000000,0x45000000,
884 0xff4caa4f,0xffffffff,0xffc8dcc9,0xff2b6f2d,0xff8ab08b,0xffffffff,0xff77a279,0xffffffff,0xffc1d3c2,0xff1a5a1c,0xff83a785,0xffffffff,0xff77a378,0xff4e4e4e, 884 0xff5eb661,0xffffffff,0xffd1e2d1,0xff3b803d,0xff9abc9a,0xffffffff,0xff88af8a,0xffffffff,0xffcbdacb,0xff276c29,0xff93b495,0xffffffff,0xff88b089,0xff606060,
885 0xff818181,0xffb0b0b0,0xffacacac,0xffa5a5a5,0xffc5c5c5,0xfffcfcfc,0xfffbfbfb,0xffaeaeae,0xff717171,0xff696969,0xff6f6f6f,0xffdfdfdf,0xffffffff,0xff000000, 885 0xff919191,0xffbcbcbc,0xffb8b8b8,0xffb2b2b2,0xffcecece,0xfffdfdfd,0xfffcfcfc,0xffbababa,0xff828282,0xff7a7a7a,0xff808080,0xffe4e4e4,0xffffffff,0xff000000,
886 0x90000200,0x6e000200,0x1f000000,0x46000000,0xff46a64b,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffd4e2d5,0xff2a6d2d,0xffffffff,0xffffffff,0xffffffff, 886 0x90000500,0x6e000500,0x1f000000,0x46000000,0xff58b35d,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffdbe7dc,0xff397e3d,0xffffffff,0xffffffff,0xffffffff,
887 0xffffffff,0xffd3e0d4,0xff2b6f2e,0xff4f4f4f,0xff828282,0xffb2b2b2,0xffafafaf,0xffa1a1a1,0xffbcbcbc,0xfff8f8f8,0xffb0b0b0,0xff757575,0xff6d6d6d,0xff656565, 887 0xffffffff,0xffdae5db,0xff3b803e,0xff616161,0xff929292,0xffbdbdbd,0xffbbbbbb,0xffaeaeae,0xffc6c6c6,0xfff9f9f9,0xffbcbcbc,0xff868686,0xff7e7e7e,0xff777777,
888 0xff626262,0xff959595,0xfff2f2f2,0xff000000,0x90000200,0x6f000200,0x1f000000,0x46000000,0xff42a545,0xffffffff,0xffd6e5d7,0xff5e9561,0xff4b8a4d,0xff1f6c22, 888 0xff747474,0xffa4a4a4,0xfff4f4f4,0xff000000,0x90000500,0x6f000500,0x1f000000,0x46000000,0xff53b257,0xffffffff,0xffdde9dd,0xff70a473,0xff5d9a5f,0xff2d7d30,
889 0xff1e6921,0xffffffff,0xffd3dfd3,0xff568358,0xff457b48,0xff1c601e,0xff1e6921,0xff535353,0xff868686,0xffb7b7b7,0xffbbbbbb,0xff9a9a9a,0xff9f9f9f,0xffe6e6e6, 889 0xff2b7a2f,0xffffffff,0xffdae4da,0xff68936a,0xff578c5a,0xff29722b,0xff2b7a2f,0xff656565,0xff969696,0xffc2c2c2,0xffc5c5c5,0xffa8a8a8,0xffadadad,0xffeaeaea,
890 0xffadadad,0xff6d6d6d,0xff8c8c8c,0xff8b8b8b,0xff575757,0xff555555,0xff838383,0xff000000,0x90000200,0x6f000200,0x1f000000,0x46000000,0xff3da240,0xffffffff, 890 0xffb9b9b9,0xff7e7e7e,0xff9b9b9b,0xff9a9a9a,0xff696969,0xff676767,0xff939393,0xff000000,0x90000500,0x6f000500,0x1f000000,0x46000000,0xff4eaf51,0xffffffff,
891 0xffc5dbc5,0xff217225,0xff227625,0xff217525,0xff217324,0xffffffff,0xffc1d4c2,0xff1b5d1d,0xff1c611e,0xff1e6821,0xff217124,0xff595959,0xff8c8c8c,0xffbbbbbb, 891 0xffcee1ce,0xff2f8334,0xff308734,0xff2f8634,0xff2f8433,0xffffffff,0xffcbdbcb,0xff286f2a,0xff29732b,0xff2b7a2f,0xff2f8233,0xff6b6b6b,0xff9b9b9b,0xffc5c5c5,
892 0xffcbcbcb,0xff9a9a9a,0xff848484,0xffa8a8a8,0xffededed,0xffbbbbbb,0xffe7e7e7,0xfffbfbfb,0xff8f8f8f,0xff565656,0xff565656,0xff000000,0x90000200,0x6f000200, 892 0xffd3d3d3,0xffa8a8a8,0xff949494,0xffb5b5b5,0xfff0f0f0,0xffc5c5c5,0xffebebeb,0xfffcfcfc,0xff9e9e9e,0xff686868,0xff686868,0xff000000,0x90000500,0x6f000500,
893 0x1d000000,0x43000000,0xff38a33d,0xffffffff,0xffc4dcc5,0xff237725,0xff247d28,0xff257e28,0xff237b27,0xffffffff,0xffc2d5c3,0xff1c631f,0xff1e6921,0xff206e23, 893 0x1d000000,0x43000000,0xff49b04e,0xffffffff,0xffcde2ce,0xff318834,0xff338d37,0xff348e37,0xff318c36,0xffffffff,0xffcbdccc,0xff29752d,0xff2b7a2f,0xff2e7f31,
894 0xff237725,0xff636363,0xff959595,0xffbdbdbd,0xffdddddd,0xffbbbbbb,0xff7c7c7c,0xff707070,0xff979797,0xffd6d6d6,0xffe3e3e3,0xffe6e6e6,0xffc2c2c2,0xff5e5e5e, 894 0xff318834,0xff757575,0xffa4a4a4,0xffc7c7c7,0xffe3e3e3,0xffc5c5c5,0xff8d8d8d,0xff818181,0xffa5a5a5,0xffdddddd,0xffe8e8e8,0xffeaeaea,0xffcbcbcb,0xff707070,
895 0xff575757,0xff000000,0x90000200,0x6f000200,0x1b000000,0x3e000000,0xff34a437,0xffffffff,0xffc4ddc5,0xff257f28,0xff26842a,0xff26852a,0xff258129,0xffffffff, 895 0xff696969,0xff000000,0x90000500,0x6f000500,0x1b000000,0x3e000000,0xff45b148,0xffffffff,0xffcde3ce,0xff348f37,0xff359439,0xff359539,0xff349138,0xffffffff,
896 0xffc2d7c3,0xff1f6a22,0xff206f23,0xff227625,0xff247c28,0xff747474,0xff9f9f9f,0xffc1c1c1,0xffdfdfdf,0xffebebeb,0xffababab,0xff6c6c6c,0xff646464,0xff676767, 896 0xffcbddcc,0xff2d7b30,0xff2e8031,0xff308734,0xff338d37,0xff858585,0xffadadad,0xffcbcbcb,0xffe4e4e4,0xffeeeeee,0xffb7b7b7,0xff7d7d7d,0xff767676,0xff797979,
897 0xff757575,0xff757575,0xff6b6b6b,0xff5b5b5b,0xff5b5b5b,0xff000000,0x90000200,0x6f000200,0x17000000,0x34000000,0xff2fa534,0xff2b952f,0xff27892b,0xff27862a, 897 0xff868686,0xff868686,0xff7c7c7c,0xff6d6d6d,0xff6d6d6d,0xff000000,0x90000500,0x6f000500,0x17000000,0x34000000,0xff3fb245,0xff3ba43f,0xff36993b,0xff369639,
898 0xff278a2c,0xff27892b,0xff26852a,0xff247e28,0xff217324,0xff217223,0xff227525,0xff237926,0xff247e28,0xff878787,0xffacacac,0xffcacaca,0xffdedede,0xfff0f0f0, 898 0xff369a3c,0xff36993b,0xff359539,0xff338e37,0xff2f8433,0xff2f8331,0xff308634,0xff318a35,0xff338e37,0xff979797,0xffb8b8b8,0xffd2d2d2,0xffe3e3e3,0xfff3f3f3,
899 0xfff3f3f3,0xffbdbdbd,0xff868686,0xff606060,0xff606060,0xff606060,0xff606060,0xff838383,0xffb3b3b3,0xff000000,0x90000200,0x6e000200,0x12000000,0x28000000, 899 0xfff5f5f5,0xffc7c7c7,0xff969696,0xff727272,0xff727272,0xff727272,0xff727272,0xff939393,0xffbebebe,0xff000000,0x90000500,0x6e000500,0x12000000,0x28000000,
900 0x47000000,0x6b000000,0x87000000,0x9a000000,0xa7000000,0xb2000000,0xbc000000,0xff000000,0xff5b5b5b,0xff5c5c5c,0xff646464,0xff737373,0xff868686,0xff9f9f9f, 900 0x47000000,0x6b000000,0x87000000,0x9a000000,0xa7000000,0xb2000000,0xbc000000,0xff000000,0xff6d6d6d,0xff6e6e6e,0xff767676,0xff848484,0xff969696,0xffadadad,
901 0xffbcbcbc,0xffd2d2d2,0xffe4e4e4,0xffececec,0xfff5f5f5,0xfff8f8f8,0xffe7e7e7,0xffcfcfcf,0xffbfbfbf,0xffbfbfbf,0xffcecece,0xffe6e6e6,0xfff9f9f9,0xff000000, 901 0xffc6c6c6,0xffd9d9d9,0xffe8e8e8,0xffefefef,0xfff7f7f7,0xfff9f9f9,0xffebebeb,0xffd7d7d7,0xffc9c9c9,0xffc9c9c9,0xffd6d6d6,0xffeaeaea,0xfffafafa,0xff000000,
902 0x8e000200,0x6d000200,0xc000000,0x1a000000,0x2f000000,0x47000000,0x5b000000,0x6c000000,0x79000000,0x87000000,0x97000000,0xff000000,0xff919191,0xff919191, 902 0x8e000500,0x6d000500,0xc000000,0x1a000000,0x2f000000,0x47000000,0x5b000000,0x6c000000,0x79000000,0x87000000,0x97000000,0xff000000,0xffa0a0a0,0xffa0a0a0,
903 0xff979797,0xffa2a2a2,0xffaeaeae,0xffbdbdbd,0xffd0d0d0,0xffdfdfdf,0xffe9e9e9,0xffefefef,0xfff2f2f2,0xfff3f3f3,0xfff6f6f6,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7, 903 0xffa5a5a5,0xffafafaf,0xffbababa,0xffc7c7c7,0xffd7d7d7,0xffe4e4e4,0xffededed,0xfff2f2f2,0xfff4f4f4,0xfff5f5f5,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,
904 0xfff7f7f7,0xfff5f5f5,0xfff2f2f2,0xff000000,0x8c000200,0x6b000200,0x7000000,0x10000000,0x1b000000,0x2a000000,0x37000000,0x45000000,0x53000000,0x63000000, 904 0xfff8f8f8,0xfff7f7f7,0xfff4f4f4,0xff000000,0x8c000500,0x6b000500,0x7000000,0x10000000,0x1b000000,0x2a000000,0x37000000,0x45000000,0x53000000,0x63000000,
905 0x76000000,0xff000000,0xffbfbfbf,0xffbfbfbf,0xffc2c2c2,0xffc8c8c8,0xffcdcdcd,0xffd5d5d5,0xffe1e1e1,0xffe8e8e8,0xffefefef,0xfff3f3f3,0xfff4f4f4,0xfff4f4f4, 905 0x76000000,0xff000000,0xffc9c9c9,0xffc9c9c9,0xffcbcbcb,0xffd1d1d1,0xffd5d5d5,0xffdcdcdc,0xffe6e6e6,0xffececec,0xfff2f2f2,0xfff5f5f5,0xfff6f6f6,0xfff6f6f6,
906 0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xff000000,0x87000200,0x68000200,0x4000000,0x7000000,0xd000000,0x14000000, 906 0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xff000000,0x87000500,0x68000500,0x4000000,0x7000000,0xd000000,0x14000000,
907 0x1c000000,0x28000000,0x35000000,0x47000000,0x5c000300,0xff000000,0xffe0e0e0,0xffe0e0e0,0xffe2e2e2,0xffe4e4e4,0xffe4e4e4,0xffe8e8e8,0xffeeeeee,0xfff1f1f1, 907 0x1c000000,0x28000000,0x35000000,0x47000000,0x5c000600,0xff000000,0xffe5e5e5,0xffe5e5e5,0xffe7e7e7,0xffe8e8e8,0xffe8e8e8,0xffececec,0xfff1f1f1,0xfff3f3f3,
908 0xfff3f3f3,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xff000000,0x7f000200,0x61000200, 908 0xfff5f5f5,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xff000000,0x7f000500,0x61000500,
909 0x1000000,0x2000000,0x4000000,0x8000000,0xe000000,0x16000000,0x21000000,0x31000000,0x47000000,0xff000000,0xfff5f5f5,0xfff5f5f5,0xfff5f5f5,0xfff6f6f6, 909 0x1000000,0x2000000,0x4000000,0x8000000,0xe000000,0x16000000,0x21000000,0x31000000,0x47000000,0xff000000,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7,0xfff8f8f8,
910 0xfff7f7f7,0xfff9f9f9,0xfffbfbfb,0xfffdfdfd,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff, 910 0xfff8f8f8,0xfffafafa,0xfffcfcfc,0xfffdfdfd,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
911 0xffffffff,0xff000000,0x73000200,0x58000200,0xffffff,0xffffff,0xffffff,0x2000200,0x5000200,0xb000200,0x15000200,0x24000200,0x36000200,0xff000000, 911 0xffffffff,0xff000000,0x73000500,0x58000500,0xffffff,0xffffff,0xffffff,0x2000500,0x5000500,0xb000500,0x15000500,0x24000500,0x36000500,0xff000000,
912 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000, 912 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
913 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x63000200,0x4c000200,0xffffff,0xffffff,0xffffff,0x1000200,0x4000200,0x9000200, 913 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x63000500,0x4c000500,0xffffff,0xffffff,0xffffff,0x1000500,0x4000500,0x9000500,
914 0x11000200,0x1d000200,0x2c000200,0x3e000200,0x51000200,0x63000200,0x73000200,0x7f000200,0x87000200,0x8c000200,0x8e000200,0x90000200,0x90000200,0x90000200, 914 0x11000500,0x1d000500,0x2c000500,0x3e000500,0x51000500,0x63000500,0x73000500,0x7f000500,0x87000500,0x8c000500,0x8e000500,0x90000500,0x90000500,0x90000500,
915 0x90000200,0x90000200,0x90000200,0x90000200,0x8e000200,0x8c000200,0x87000200,0x7f000200,0x73000200,0x63000200,0x51000200,0x3e000200,0xffffff,0xffffff, 915 0x90000500,0x90000500,0x90000500,0x90000500,0x8e000500,0x8c000500,0x87000500,0x7f000500,0x73000500,0x63000500,0x51000500,0x3e000500,0xffffff,0xffffff,
916 0xffffff,0x1000200,0x3000200,0x7000200,0xd000200,0x16000200,0x22000200,0x30000200,0x3e000200,0x4c000200,0x58000200,0x61000200,0x68000200,0x6b000200, 916 0xffffff,0x1000500,0x3000500,0x7000500,0xd000500,0x16000500,0x22000500,0x30000500,0x3e000500,0x4c000500,0x58000500,0x61000500,0x68000500,0x6b000500,
917 0x6d000200,0x6e000200,0x6f000200,0x6f000200,0x6f000200,0x6f000200,0x6f000200,0x6e000200,0x6d000200,0x6b000200,0x68000200,0x61000200,0x58000200,0x4c000200, 917 0x6d000500,0x6e000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6e000500,0x6d000500,0x6b000500,0x68000500,0x61000500,0x58000500,0x4c000500,
918 0x3e000200,0x30000200 918 0x3e000500,0x30000500
919}; 919};
920 920
921static const QRgb DocumentTypeWord_data[] = { 921static const QRgb DocumentTypeWord_data[] = {
922 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 922 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
923 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 923 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
924 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000200,0x2000200,0x5000200,0x9000200,0x10000200,0x18000200,0x22000200, 924 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000500,0x2000500,0x5000500,0x9000500,0x10000500,0x18000500,0x22000500,
925 0x2c000200,0x36000200,0x3f000200,0x45000200,0x4a000200,0x4d000200,0x4e000200,0x4e000200,0x4e000200,0x4c000200,0x49000200,0x45000200,0x3f000200,0x37000200, 925 0x2c000500,0x36000500,0x3f000500,0x45000500,0x4a000500,0x4d000500,0x4e000500,0x4e000500,0x4e000500,0x4c000500,0x49000500,0x45000500,0x3f000500,0x37000500,
926 0x2e000200,0x25000200,0x1c000200,0x13000200,0xd000200,0x8000200,0x4000200,0x2000200,0xffffff,0xffffff,0xffffff,0x1000200,0x3000200,0x7000200, 926 0x2e000500,0x25000500,0x1c000500,0x13000500,0xd000500,0x8000500,0x4000500,0x2000500,0xffffff,0xffffff,0xffffff,0x1000500,0x3000500,0x7000500,
927 0xd000200,0x16000200,0x22000200,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000, 927 0xd000500,0x16000500,0x22000500,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
928 0xff000000,0xff000000,0xfd282828,0x72434543,0x44000200,0x37000200,0x2b000200,0x1f000200,0x15000200,0xd000200,0x8000200,0x4000200,0xffffff,0xffffff, 928 0xff000000,0xff000000,0xfd373737,0x72545754,0x44000500,0x37000500,0x2b000500,0x1f000500,0x15000500,0xd000500,0x8000500,0x4000500,0xffffff,0xffffff,
929 0xffffff,0x1000200,0x4000200,0x9000200,0x11000200,0x1d000200,0x2c000200,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe, 929 0xffffff,0x1000500,0x4000500,0x9000500,0x11000500,0x1d000500,0x2c000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,
930 0xfffefefe,0xfffcfcfc,0xfff9f9f9,0xfff3f3f3,0xffe9e9e9,0xffdedede,0xffc8c8c8,0xfd272727,0x76303230,0x4e000200,0x3d000200,0x2e000200,0x21000200,0x16000200, 930 0xfffefefe,0xfffdfdfd,0xfffafafa,0xfff5f5f5,0xffededed,0xffe3e3e3,0xffd1d1d1,0xfd363636,0x76404240,0x4e000500,0x3d000500,0x2e000500,0x21000500,0x16000500,
931 0xe000200,0x8000200,0xffffff,0xffffff,0xffffff,0x2000200,0x5000200,0xb000200,0x15000200,0x24000200,0x36000200,0xff000000,0xffffffff,0xffffffff, 931 0xe000500,0x8000500,0xffffff,0xffffff,0xffffff,0x2000500,0x5000500,0xb000500,0x15000500,0x24000500,0x36000500,0xff000000,0xffffffff,0xffffffff,
932 0xffffffff,0xffffffff,0xfffefefe,0xfffefefe,0xfffdfdfd,0xfffcfcfc,0xfff6f6f6,0xffededed,0xffdedede,0xffcccccc,0xfffefefe,0xffb3b3b3,0xfd292929,0x802e302e, 932 0xffffffff,0xffffffff,0xfffefefe,0xfffefefe,0xfffdfdfd,0xfffdfdfd,0xfff8f8f8,0xfff0f0f0,0xffe3e3e3,0xffd4d4d4,0xfffefefe,0xffbebebe,0xfd383838,0x803e403e,
933 0x53000200,0x40000200,0x2f000200,0x21000200,0x16000200,0xd000200,0xffffff,0xffffff,0xffffff,0x2000200,0x6000200,0xd000200,0x18000200,0x29000200, 933 0x53000500,0x40000500,0x2f000500,0x21000500,0x16000500,0xd000500,0xffffff,0xffffff,0xffffff,0x2000500,0x6000500,0xd000500,0x18000500,0x29000500,
934 0x3f000200,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffdfdfd,0xfffcfcfc,0xfffafafa,0xfff4f4f4,0xffe9e9e9,0xffd4d4d4,0xffbcbcbc, 934 0x3f000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffdfdfd,0xfffdfdfd,0xfffbfbfb,0xfff6f6f6,0xffededed,0xffdbdbdb,0xffc6c6c6,
935 0xffffffff,0xfffcfcfc,0xffa1a1a1,0xfd2b2b2b,0x7e262826,0x55000200,0x41000200,0x2f000200,0x20000200,0x15000200,0xffffff,0xffffff,0x1000200,0x2000200, 935 0xffffffff,0xfffdfdfd,0xffaeaeae,0xfd3b3b3b,0x7e353735,0x55000500,0x41000500,0x2f000500,0x20000500,0x15000500,0xffffff,0xffffff,0x1000500,0x2000500,
936 0x6000200,0xe000200,0x1b000200,0x2d000200,0x45000200,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffdfdfd,0xfffbfbfb,0xfff9f9f9, 936 0x6000500,0xe000500,0x1b000500,0x2d000500,0x45000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfffafafa,
937 0xfff2f2f2,0xffe4e4e4,0xffcdcdcd,0xffaeaeae,0xffffffff,0xffffffff,0xfffcfcfc,0xff949494,0xfd2e2e2e,0x7a1d1f1d,0x55000200,0x40000200,0x2d000200,0x1e000200, 937 0xfff4f4f4,0xffe8e8e8,0xffd5d5d5,0xffbababa,0xffffffff,0xffffffff,0xfffdfdfd,0xffa3a3a3,0xfd3e3e3e,0x7a2a2d2a,0x55000500,0x40000500,0x2d000500,0x1e000500,
938 0xffffff,0xffffff,0x1000200,0x2000200,0x7000200,0xf000200,0x1d000200,0x30000200,0x4a000200,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff, 938 0xffffff,0xffffff,0x1000500,0x2000500,0x7000500,0xf000500,0x1d000500,0x30000500,0x4a000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
939 0xfffdfdfd,0xfffcfcfc,0xfffbfbfb,0xfff7f7f7,0xfff0f0f0,0xffe2e2e2,0xffc8c8c8,0xffa7a7a7,0xffffffff,0xffffffff,0xffffffff,0xfff9f9f9,0xff8e8e8e,0xfd343434, 939 0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfff8f8f8,0xfff3f3f3,0xffe7e7e7,0xffd1d1d1,0xffb4b4b4,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff9d9d9d,0xfd454545,
940 0x781e1e1e,0x52000200,0x3c000200,0x29000200,0xffffff,0xffffff,0x1000200,0x3000200,0x7000200,0x10000200,0x1e000200,0x32000200,0x4d000200,0xff000000, 940 0x782b2b2b,0x52000500,0x3c000500,0x29000500,0xffffff,0xffffff,0x1000500,0x3000500,0x7000500,0x10000500,0x1e000500,0x32000500,0x4d000500,0xff000000,
941 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffcfcfc,0xfffbfbfb,0xfffafafa,0xfff7f7f7,0xfff0f0f0,0xffe1e1e1,0xffc8c8c8,0xffa6a6a6,0xffffffff,0xffffffff, 941 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffcfcfc,0xfffbfbfb,0xfff8f8f8,0xfff3f3f3,0xffe6e6e6,0xffd1d1d1,0xffb3b3b3,0xffffffff,0xffffffff,
942 0xffffffff,0xffffffff,0xfff8f8f8,0xff8f8f8f,0xfc3b3b3b,0x70141714,0x4c000200,0x36000200,0x1000000,0x2000000,0x5000000,0x9000000,0xf000000,0x18000000, 942 0xffffffff,0xffffffff,0xfff9f9f9,0xff9e9e9e,0xfc4c4c4c,0x701f231f,0x4c000500,0x36000500,0x1000000,0x2000000,0x5000000,0x9000000,0xf000000,0x18000000,
943 0x27000000,0x3b000000,0x55000300,0xff000000,0xfff5f5f5,0xfff5f5f5,0xfff5f5f5,0xfff6f6f6,0xfff4f4f4,0xfff5f5f5,0xfff5f5f5,0xfff4f4f4,0xffefefef,0xffe4e4e4, 943 0x27000000,0x3b000000,0x55000600,0xff000000,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7,0xfff8f8f8,0xfff6f6f6,0xfff7f7f7,0xfff7f7f7,0xfff6f6f6,0xfff2f2f2,0xffe8e8e8,
944 0xffcccccc,0xffadadad,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff929292,0xfb434343,0x5c000200,0x42000200,0x4000000,0x7000000, 944 0xffd4d4d4,0xffb9b9b9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xffa1a1a1,0xfb545454,0x5c000500,0x42000500,0x4000000,0x7000000,
945 0xd000000,0x15000000,0x1d000000,0x29000000,0x38000000,0x4c000000,0x64000000,0xff000000,0xffe0e0e0,0xffe0e0e0,0xffe2e2e2,0xffe4e4e4,0xffe4e4e4,0xffe8e8e8, 945 0xd000000,0x15000000,0x1d000000,0x29000000,0x38000000,0x4c000000,0x64000000,0xff000000,0xffe5e5e5,0xffe5e5e5,0xffe7e7e7,0xffe8e8e8,0xffe8e8e8,0xffececec,
946 0xffececec,0xfff0f0f0,0xffededed,0xffe6e6e6,0xffd7d7d7,0xffbfbfbf,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff2e2e2e, 946 0xffefefef,0xfff3f3f3,0xfff0f0f0,0xffeaeaea,0xffdddddd,0xffc9c9c9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xff3e3e3e,
947 0x6a000200,0x4e000200,0x7000000,0xf000000,0x19000000,0x28000000,0x34000000,0x43000000,0x52000000,0x64000000,0x79000200,0xff000000,0xffc2c2c2,0xffc2c2c2, 947 0x6a000500,0x4e000500,0x7000000,0xf000000,0x19000000,0x28000000,0x34000000,0x43000000,0x52000000,0x64000000,0x79000500,0xff000000,0xffcbcbcb,0xffcbcbcb,
948 0xffc4c4c4,0xffc9c9c9,0xffcecece,0xffd6d6d6,0xffe2e2e2,0xffe8e8e8,0xffececec,0xffececec,0xffe2e2e2,0xffbbbbbb,0xff909090,0xff6e6e6e,0xff5d5d5d,0xff595959, 948 0xffcdcdcd,0xffd1d1d1,0xffd6d6d6,0xffdddddd,0xffe7e7e7,0xffececec,0xffefefef,0xffefefef,0xffe7e7e7,0xffc5c5c5,0xff9f9f9f,0xff7f7f7f,0xff6f6f6f,0xff6b6b6b,
949 0xff5f5f5f,0xff7b7b7b,0xffa8a8a8,0xff000000,0x76000200,0x58000200,0xc000000,0x18000000,0xff5356f1,0xff5153f1,0xff4d4ff0,0xff494cef,0xff4547ef,0xff4144ef, 949 0xff717171,0xff8c8c8c,0xffb5b5b5,0xff000000,0x76000500,0x58000500,0xc000000,0x18000000,0xff6568f3,0xff6365f3,0xff5f61f3,0xff5b5ef2,0xff5759f2,0xff5256f2,
950 0xff3d3fef,0xff383aee,0xff3235ee,0xff2b2eed,0xff2528ed,0xff1d20eb,0xff191ce6,0xffbdbdbd,0xffd0d0d0,0xffe0e0e0,0xffebebeb,0xffefefef,0xffc6c6c6,0xff919191, 950 0xff4e50f2,0xff494bf1,0xff4246f1,0xff3b3ef0,0xff3437f0,0xff2a2eee,0xff2529ea,0xffc7c7c7,0xffd7d7d7,0xffe5e5e5,0xffeeeeee,0xfff2f2f2,0xffcfcfcf,0xffa0a0a0,
951 0xff7c7c7c,0xff717171,0xff717171,0xff6c6c6c,0xff5f5f5f,0xff5e5e5e,0xff626262,0xff000000,0x80000200,0x60000200,0x12000000,0x26000000,0xff5052ee,0xff4c4eeb, 951 0xff8d8d8d,0xff828282,0xff828282,0xff7d7d7d,0xff717171,0xff707070,0xff747474,0xff000000,0x80000500,0x60000500,0x12000000,0x26000000,0xff6264f1,0xff5e60ee,
952 0xff474ae9,0xff4345e7,0xff3f42e7,0xff3b3de8,0xff3638e7,0xff2e31e7,0xff292ce6,0xff2426e6,0xff1d20e4,0xff181bde,0xff171ad7,0xff9b9b9b,0xffbababa,0xffd4d4d4, 952 0xff595ced,0xff5457eb,0xff5053eb,0xff4c4eec,0xff4749eb,0xff3e41eb,0xff383cea,0xff3335ea,0xff2a2ee8,0xff2428e3,0xff2327dd,0xffa9a9a9,0xffc4c4c4,0xffdbdbdb,
953 0xffe8e8e8,0xffd2d2d2,0xff9d9d9d,0xff8b8b8b,0xff959595,0xffb5b5b5,0xffc5c5c5,0xffc6c6c6,0xffbababa,0xff818181,0xff5c5c5c,0xff000000,0x87000200,0x66000200, 953 0xffececec,0xffd9d9d9,0xffababab,0xff9a9a9a,0xffa4a4a4,0xffc0c0c0,0xffcecece,0xffcfcfcf,0xffc4c4c4,0xff919191,0xff6e6e6e,0xff000000,0x87000500,0x66000500,
954 0x17000000,0x30000000,0xff4c4eeb,0xff9b9df1,0xff9899ed,0xff5454de,0xff3739d7,0xff4c4ddd,0xff8c8eea,0xff4244dc,0xff2124d7,0xff383adb,0xff8183e5,0xff8183e3, 954 0x17000000,0x30000000,0xff5e60ee,0xffa9abf3,0xffa6a7f0,0xff6666e3,0xff484add,0xff5e5fe3,0xff9b9dee,0xff5356e2,0xff2f33dd,0xff494be1,0xff9193e9,0xff9193e8,
955 0xff1618c7,0xff818181,0xffa7a7a7,0xffcccccc,0xffd8d8d8,0xffb1b1b1,0xff9a9a9a,0xffa8a8a8,0xffe1e1e1,0xfff1f1f1,0xfff5f5f5,0xfff0f0f0,0xffc9c9c9,0xffe2e2e2, 955 0xff2224d0,0xff919191,0xffb4b4b4,0xffd4d4d4,0xffdedede,0xffbdbdbd,0xffa8a8a8,0xffb5b5b5,0xffe6e6e6,0xfff3f3f3,0xfff7f7f7,0xfff3f3f3,0xffd1d1d1,0xffe7e7e7,
956 0xff909090,0xff000000,0x8b000200,0x6a000200,0x1b000000,0x38000000,0xff474ae8,0xffa7a8ee,0xffffffff,0xff9091e0,0xff2b2dc1,0xff8a8bdd,0xffffffff,0xff8586dc, 956 0xff9f9f9f,0xff000000,0x8b000500,0x6a000500,0x1b000000,0x38000000,0xff595cec,0xffb4b5f1,0xffffffff,0xff9fa0e5,0xff3b3dcb,0xff9a9ae3,0xffffffff,0xff9596e2,
957 0xff181abd,0xff8081da,0xffffffff,0xff9293dc,0xff1416b5,0xff6a6a6a,0xff9a9a9a,0xffc3c3c3,0xffc1c1c1,0xffa6a6a6,0xffa4a4a4,0xffdedede,0xfff9f9f9,0xfff6f6f6, 957 0xff2427c7,0xff9091e0,0xffffffff,0xffa1a2e2,0xff1f22c0,0xff7b7b7b,0xffa8a8a8,0xffcccccc,0xffcbcbcb,0xffb3b3b3,0xffb1b1b1,0xffe3e3e3,0xfffafafa,0xfff8f8f8,
958 0xfff5f5f5,0xffa2a2a2,0xff686868,0xffa9a9a9,0xffdbdbdb,0xff000000,0x8e000200,0x6d000200,0x1d000000,0x3d000000,0xff4144e5,0xff5354db,0xffffffff,0xffe3e3f5, 958 0xfff7f7f7,0xffafafaf,0xff7a7a7a,0xffb6b6b6,0xffe1e1e1,0xff000000,0x8e000500,0x6d000500,0x1d000000,0x3d000000,0xff5256e9,0xff6566e1,0xffffffff,0xffe8e8f7,
959 0xff2224a8,0xffe2e2f3,0xffffffff,0xffe1e1f3,0xff11139d,0xffe0e0f2,0xffffffff,0xff2f31ab,0xff1214a6,0xff5d5d5d,0xff919191,0xffbcbcbc,0xffb5b5b5,0xffa5a5a5, 959 0xff3033b5,0xffe7e7f5,0xffffffff,0xffe6e6f5,0xff1b1eab,0xffe5e5f4,0xffffffff,0xff3f41b7,0xff1d1fb3,0xff6f6f6f,0xffa0a0a0,0xffc6c6c6,0xffc0c0c0,0xffb2b2b2,
960 0xffbbbbbb,0xfff3f3f3,0xfffafafa,0xfff9f9f9,0xffaaaaaa,0xff6b6b6b,0xff656565,0xff8c8c8c,0xffececec,0xff000000,0x8f000200,0x6e000200,0x1f000000,0x3f000000, 960 0xffc5c5c5,0xfff5f5f5,0xfffbfbfb,0xfffafafa,0xffb6b6b6,0xff7c7c7c,0xff777777,0xff9b9b9b,0xffefefef,0xff000000,0x8f000500,0x6e000500,0x1f000000,0x3f000000,
961 0xff3e40e6,0xff3436d3,0xffb8b9ea,0xffffffff,0xff8384c6,0xffffffff,0xffffffff,0xffffffff,0xff7d7eba,0xffffffff,0xffafafd7,0xff0f118e,0xff12139e,0xff585858, 961 0xff4f51ea,0xff4547da,0xffc3c4ee,0xffffffff,0xff9394cf,0xffffffff,0xffffffff,0xffffffff,0xff8d8ec4,0xffffffff,0xffbbbbdd,0xff191b9d,0xff1d1eac,0xff6a6a6a,
962 0xff8e8e8e,0xffbababa,0xffaeaeae,0xffa5a5a5,0xffc5c5c5,0xfffcfcfc,0xfffbfbfb,0xffaeaeae,0xff717171,0xff696969,0xff6f6f6f,0xffdfdfdf,0xffffffff,0xff000000, 962 0xff9d9d9d,0xffc4c4c4,0xffbababa,0xffb2b2b2,0xffcecece,0xfffdfdfd,0xfffcfcfc,0xffbababa,0xff828282,0xff7a7a7a,0xff808080,0xffe4e4e4,0xffffffff,0xff000000,
963 0x90000200,0x6e000200,0x1f000000,0x3e000000,0xff393ce7,0xff2f32d7,0xff6161d2,0xffffffff,0xffffffff,0xffffffff,0xff4e4f9b,0xffffffff,0xffffffff,0xffffffff, 963 0x90000500,0x6e000500,0x1f000000,0x3e000000,0xff4a4deb,0xff3f42dd,0xff7373d9,0xffffffff,0xffffffff,0xffffffff,0xff6061a9,0xffffffff,0xffffffff,0xffffffff,
964 0xff4e4f9d,0xff0f1089,0xff11129a,0xff595959,0xff8f8f8f,0xffbbbbbb,0xffb1b1b1,0xffa1a1a1,0xffbcbcbc,0xfff8f8f8,0xffb0b0b0,0xff757575,0xff6d6d6d,0xff656565, 964 0xff6061ab,0xff191a99,0xff1b1da8,0xff6b6b6b,0xff9e9e9e,0xffc5c5c5,0xffbdbdbd,0xffaeaeae,0xffc6c6c6,0xfff9f9f9,0xffbcbcbc,0xff868686,0xff7e7e7e,0xff777777,
965 0xff626262,0xff959595,0xfff2f2f2,0xff000000,0x90000200,0x6f000200,0x1f000000,0x3e000000,0xff3437ea,0xff2c2edd,0xff2124c7,0xffd3d3ef,0xffffffff,0xff9f9fcc, 965 0xff747474,0xffa4a4a4,0xfff4f4f4,0xff000000,0x90000500,0x6f000500,0x1f000000,0x3e000000,0xff4548ee,0xff3c3ee3,0xff2f33d0,0xffdadaf2,0xffffffff,0xffadadd4,
966 0xff0d0f76,0xff9e9fc7,0xffffffff,0xffe0e0ed,0xff0d0f7b,0xff0f118a,0xff11139b,0xff5c5c5c,0xff919191,0xffbdbdbd,0xffbcbcbc,0xff9a9a9a,0xff9f9f9f,0xffe6e6e6, 966 0xff161987,0xffacadd0,0xffffffff,0xffe5e5f0,0xff16198c,0xff191b9a,0xff1b1ea9,0xff6e6e6e,0xffa0a0a0,0xffc7c7c7,0xffc6c6c6,0xffa8a8a8,0xffadadad,0xffeaeaea,
967 0xffadadad,0xff6d6d6d,0xff8c8c8c,0xff8b8b8b,0xff575757,0xff555555,0xff838383,0xff000000,0x90000200,0x6f000200,0x1f000000,0x3d000000,0xff2e30ed,0xff2629e3, 967 0xffb9b9b9,0xff7e7e7e,0xff9b9b9b,0xff9a9a9a,0xff696969,0xff676767,0xff939393,0xff000000,0x90000500,0x6f000500,0x1f000000,0x3d000000,0xff3e40f0,0xff3538e8,
968 0xff1e21d2,0xff7273d5,0xffffffff,0xff5051ad,0xff0e1084,0xff4e50a2,0xffffffff,0xff6d6eb0,0xff0e1084,0xff0f1291,0xff11139f,0xff5f5f5f,0xff949494,0xffbfbfbf, 968 0xff2b2fd9,0xff8384dc,0xffffffff,0xff6263b9,0xff171a94,0xff6062af,0xffffffff,0xff7e7fbc,0xff171a94,0xff191da0,0xff1b1ead,0xff717171,0xffa3a3a3,0xffc9c9c9,
969 0xffcccccc,0xff9a9a9a,0xff848484,0xffa8a8a8,0xffededed,0xffbbbbbb,0xffe7e7e7,0xfffbfbfb,0xff8f8f8f,0xff565656,0xff565656,0xff000000,0x90000200,0x6f000200, 969 0xffd4d4d4,0xffa8a8a8,0xff949494,0xffb5b5b5,0xfff0f0f0,0xffc5c5c5,0xffebebeb,0xfffcfcfc,0xff9e9e9e,0xff686868,0xff686868,0xff000000,0x90000500,0x6f000500,
970 0x1d000000,0x3b000000,0xff272aee,0xff1f22e7,0xff181bd9,0xff1518c4,0xff5253c4,0xff12139f,0xff111398,0xff101292,0xff5050ad,0xff1e2194,0xff0f1291,0xff111399, 970 0x1d000000,0x3b000000,0xff3639f1,0xff2d30eb,0xff2428df,0xff2024cd,0xff6465cd,0xff1d1ead,0xff1b1ea6,0xff1a1da1,0xff6262b9,0xff2b2fa3,0xff191da0,0xff1b1ea7,
971 0xff1113a1,0xff666666,0xff989898,0xffbfbfbf,0xffdedede,0xffbbbbbb,0xff7c7c7c,0xff707070,0xff979797,0xffd6d6d6,0xffe3e3e3,0xffe6e6e6,0xffc2c2c2,0xff5e5e5e, 971 0xff1b1eae,0xff787878,0xffa6a6a6,0xffc9c9c9,0xffe3e3e3,0xffc5c5c5,0xff8d8d8d,0xff818181,0xffa5a5a5,0xffdddddd,0xffe8e8e8,0xffeaeaea,0xffcbcbcb,0xff707070,
972 0xff575757,0xff000000,0x90000200,0x6f000200,0x1b000000,0x36000000,0xff2023ee,0xff1a1dea,0xff181bdc,0xff1619cc,0xff1517bd,0xff1316b1,0xff1215aa,0xff1214a6, 972 0xff696969,0xff000000,0x90000500,0x6f000500,0x1b000000,0x36000000,0xff2e31f1,0xff272aee,0xff2428e2,0xff2225d4,0xff2023c7,0xff1e22bd,0xff1d20b6,0xff1d1fb3,
973 0xff1213a1,0xff11139e,0xff11139e,0xff1114a2,0xff1214a6,0xff747474,0xffa0a0a0,0xffc2c2c2,0xffdfdfdf,0xffebebeb,0xffababab,0xff6c6c6c,0xff646464,0xff676767, 973 0xff1d1eae,0xff1b1eac,0xff1b1eac,0xff1b1faf,0xff1d1fb3,0xff858585,0xffadadad,0xffcbcbcb,0xffe4e4e4,0xffeeeeee,0xffb7b7b7,0xff7d7d7d,0xff767676,0xff797979,
974 0xff757575,0xff757575,0xff6b6b6b,0xff5b5b5b,0xff5b5b5b,0xff000000,0x90000200,0x6f000200,0x17000000,0x2e000000,0xff1a1deb,0xff191ce2,0xff181ad8,0xff1619cf, 974 0xff868686,0xff868686,0xff7c7c7c,0xff6d6d6d,0xff6d6d6d,0xff000000,0x90000500,0x6f000500,0x17000000,0x2e000000,0xff272aee,0xff2529e7,0xff2427de,0xff2225d7,
975 0xff1618c3,0xff1417bc,0xff1316b5,0xff1315b0,0xff1315ab,0xff1314a8,0xff1214a5,0xff1214a6,0xff1315a7,0xff878787,0xffacacac,0xffcacaca,0xffdedede,0xfff0f0f0, 975 0xff2224cc,0xff1f23c6,0xff1e22c0,0xff1e20bc,0xff1e20b7,0xff1e1fb5,0xff1d1fb2,0xff1d1fb3,0xff1e20b4,0xff979797,0xffb8b8b8,0xffd2d2d2,0xffe3e3e3,0xfff3f3f3,
976 0xfff3f3f3,0xffbdbdbd,0xff868686,0xff606060,0xff606060,0xff606060,0xff606060,0xff838383,0xffb3b3b3,0xff000000,0x90000200,0x6e000200,0x12000000,0x25000000, 976 0xfff5f5f5,0xffc7c7c7,0xff969696,0xff727272,0xff727272,0xff727272,0xff727272,0xff939393,0xffbebebe,0xff000000,0x90000500,0x6e000500,0x12000000,0x25000000,
977 0x3e000000,0x5e000000,0x79000000,0x91000000,0xa2000000,0xaf000000,0xba000000,0xff000000,0xff636363,0xff636363,0xff6a6a6a,0xff767676,0xff878787,0xff9e9e9e, 977 0x3e000000,0x5e000000,0x79000000,0x91000000,0xa2000000,0xaf000000,0xba000000,0xff000000,0xff757575,0xff757575,0xff7b7b7b,0xff878787,0xff979797,0xffacacac,
978 0xffbcbcbc,0xffd2d2d2,0xffe4e4e4,0xffececec,0xfff5f5f5,0xfff8f8f8,0xffe7e7e7,0xffcfcfcf,0xffbfbfbf,0xffbfbfbf,0xffcecece,0xffe6e6e6,0xfff9f9f9,0xff000000, 978 0xffc6c6c6,0xffd9d9d9,0xffe8e8e8,0xffefefef,0xfff7f7f7,0xfff9f9f9,0xffebebeb,0xffd7d7d7,0xffc9c9c9,0xffc9c9c9,0xffd6d6d6,0xffeaeaea,0xfffafafa,0xff000000,
979 0x8e000200,0x6d000200,0xc000000,0x18000000,0x2a000000,0x3f000000,0x52000000,0x65000000,0x75000000,0x84000000,0x94000000,0xff000000,0xff989898,0xff989898, 979 0x8e000500,0x6d000500,0xc000000,0x18000000,0x2a000000,0x3f000000,0x52000000,0x65000000,0x75000000,0x84000000,0x94000000,0xff000000,0xffa6a6a6,0xffa6a6a6,
980 0xff9c9c9c,0xffa4a4a4,0xffafafaf,0xffbdbdbd,0xffd0d0d0,0xffdfdfdf,0xffe9e9e9,0xffefefef,0xfff2f2f2,0xfff3f3f3,0xfff6f6f6,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7, 980 0xffaaaaaa,0xffb1b1b1,0xffbbbbbb,0xffc7c7c7,0xffd7d7d7,0xffe4e4e4,0xffededed,0xfff2f2f2,0xfff4f4f4,0xfff5f5f5,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,
981 0xfff7f7f7,0xfff5f5f5,0xfff2f2f2,0xff000000,0x8c000200,0x6b000200,0x7000000,0xf000000,0x19000000,0x27000000,0x34000000,0x42000000,0x51000000,0x62000000, 981 0xfff8f8f8,0xfff7f7f7,0xfff4f4f4,0xff000000,0x8c000500,0x6b000500,0x7000000,0xf000000,0x19000000,0x27000000,0x34000000,0x42000000,0x51000000,0x62000000,
982 0x75000000,0xff000000,0xffc2c2c2,0xffc2c2c2,0xffc4c4c4,0xffc9c9c9,0xffcecece,0xffd5d5d5,0xffe1e1e1,0xffe8e8e8,0xffefefef,0xfff3f3f3,0xfff4f4f4,0xfff4f4f4, 982 0x75000000,0xff000000,0xffcbcbcb,0xffcbcbcb,0xffcdcdcd,0xffd1d1d1,0xffd6d6d6,0xffdcdcdc,0xffe6e6e6,0xffececec,0xfff2f2f2,0xfff5f5f5,0xfff6f6f6,0xfff6f6f6,
983 0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xff000000,0x87000200,0x68000200,0x4000000,0x7000000,0xd000000,0x14000000, 983 0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xff000000,0x87000500,0x68000500,0x4000000,0x7000000,0xd000000,0x14000000,
984 0x1c000000,0x28000000,0x35000000,0x47000000,0x5c000300,0xff000000,0xffe0e0e0,0xffe0e0e0,0xffe2e2e2,0xffe4e4e4,0xffe4e4e4,0xffe8e8e8,0xffeeeeee,0xfff1f1f1, 984 0x1c000000,0x28000000,0x35000000,0x47000000,0x5c000600,0xff000000,0xffe5e5e5,0xffe5e5e5,0xffe7e7e7,0xffe8e8e8,0xffe8e8e8,0xffececec,0xfff1f1f1,0xfff3f3f3,
985 0xfff3f3f3,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xff000000,0x7f000200,0x61000200, 985 0xfff5f5f5,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xff000000,0x7f000500,0x61000500,
986 0x1000000,0x2000000,0x4000000,0x8000000,0xe000000,0x16000000,0x21000000,0x31000000,0x47000000,0xff000000,0xfff5f5f5,0xfff5f5f5,0xfff5f5f5,0xfff6f6f6, 986 0x1000000,0x2000000,0x4000000,0x8000000,0xe000000,0x16000000,0x21000000,0x31000000,0x47000000,0xff000000,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7,0xfff8f8f8,
987 0xfff7f7f7,0xfff9f9f9,0xfffbfbfb,0xfffdfdfd,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff, 987 0xfff8f8f8,0xfffafafa,0xfffcfcfc,0xfffdfdfd,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
988 0xffffffff,0xff000000,0x73000200,0x58000200,0xffffff,0xffffff,0xffffff,0x2000200,0x5000200,0xb000200,0x15000200,0x24000200,0x36000200,0xff000000, 988 0xffffffff,0xff000000,0x73000500,0x58000500,0xffffff,0xffffff,0xffffff,0x2000500,0x5000500,0xb000500,0x15000500,0x24000500,0x36000500,0xff000000,
989 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000, 989 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
990 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x63000200,0x4c000200,0xffffff,0xffffff,0xffffff,0x1000200,0x4000200,0x9000200, 990 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x63000500,0x4c000500,0xffffff,0xffffff,0xffffff,0x1000500,0x4000500,0x9000500,
991 0x11000200,0x1d000200,0x2c000200,0x3e000200,0x51000200,0x63000200,0x73000200,0x7f000200,0x87000200,0x8c000200,0x8e000200,0x90000200,0x90000200,0x90000200, 991 0x11000500,0x1d000500,0x2c000500,0x3e000500,0x51000500,0x63000500,0x73000500,0x7f000500,0x87000500,0x8c000500,0x8e000500,0x90000500,0x90000500,0x90000500,
992 0x90000200,0x90000200,0x90000200,0x90000200,0x8e000200,0x8c000200,0x87000200,0x7f000200,0x73000200,0x63000200,0x51000200,0x3e000200,0xffffff,0xffffff, 992 0x90000500,0x90000500,0x90000500,0x90000500,0x8e000500,0x8c000500,0x87000500,0x7f000500,0x73000500,0x63000500,0x51000500,0x3e000500,0xffffff,0xffffff,
993 0xffffff,0x1000200,0x3000200,0x7000200,0xd000200,0x16000200,0x22000200,0x30000200,0x3e000200,0x4c000200,0x58000200,0x61000200,0x68000200,0x6b000200, 993 0xffffff,0x1000500,0x3000500,0x7000500,0xd000500,0x16000500,0x22000500,0x30000500,0x3e000500,0x4c000500,0x58000500,0x61000500,0x68000500,0x6b000500,
994 0x6d000200,0x6e000200,0x6f000200,0x6f000200,0x6f000200,0x6f000200,0x6f000200,0x6e000200,0x6d000200,0x6b000200,0x68000200,0x61000200,0x58000200,0x4c000200, 994 0x6d000500,0x6e000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6e000500,0x6d000500,0x6b000500,0x68000500,0x61000500,0x58000500,0x4c000500,
995 0x3e000200,0x30000200 995 0x3e000500,0x30000500
996}; 996};
997 997
998static const QRgb FileBrowser_data[] = { 998static const QRgb FileBrowser_data[] = {
999 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000, 999 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
1000 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000, 1000 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
1001 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000, 1001 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
1002 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000, 1002 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
1003 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff083115,0xff06230f,0xff06230f,0xff06290f, 1003 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff0f4120,0xff0c3119,0xff0c3119,0xff0c3819,
1004 0xff06270f,0xff06240f,0xff06230f,0xff06230f,0xff0b471e,0xff0b471e,0xff0b471e,0xff0b461e,0xff0b461e,0xff0b451d,0xff0b451d,0xff0b441d,0xff0b441d,0xff0b431c, 1004 0xff0c3619,0xff0c3319,0xff0c3119,0xff0c3119,0xff13592b,0xff13592b,0xff13592b,0xff13582b,0xff13582b,0xff13572a,0xff13572a,0xff13562a,0xff13562a,0xff135429,
1005 0xff0a421c,0xff0a421c,0xff0a421c,0xff0a411b,0xff0a411b,0xff0a401b,0xff0a3f1b,0xff0a3e1a,0xff093c19,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000, 1005 0xff125329,0xff125329,0xff125329,0xff125228,0xff125228,0xff125128,0xff125028,0xff124f27,0xff104d25,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
1006 0xff0b431c,0xffc7c7c7,0xff999999,0xff6d6d6d,0xff6d6d6d,0xff778775,0xff768275,0xff727771,0xff6d6d6d,0xff6d6d6d,0xffd9d9d9,0xffd8d8d8,0xffd6d6d6,0xffd5d5d5, 1006 0xff135429,0xffd0d0d0,0xffa7a7a7,0xff7e7e7e,0xff7e7e7e,0xff889786,0xff879286,0xff838882,0xff7e7e7e,0xff7e7e7e,0xffdfdfdf,0xffdedede,0xffdddddd,0xffdcdcdc,
1007 0xffd3d3d3,0xffd1d1d1,0xffcfcfcf,0xffcdcdcd,0xffcbcbcb,0xffc9c9c9,0xffc8c8c8,0xffc6c6c6,0xffc5c5c5,0xffc3c3c3,0xffbfbfbf,0xffb8b8b8,0xff093a18,0x5c000000, 1007 0xffdadada,0xffd8d8d8,0xffd7d7d7,0xffd5d5d5,0xffd3d3d3,0xffd1d1d1,0xffd1d1d1,0xffcfcfcf,0xffcecece,0xffcccccc,0xffc9c9c9,0xffc3c3c3,0xff104b24,0x5c000000,
1008 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff0a421c,0xffcdcdcd,0xffcecece,0xffc9c9c9,0xff9f9f9f,0xff6d6d6d,0xff6d6d6d,0xff829480,0xff839481,0xff7a8479, 1008 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff125329,0xffd5d5d5,0xffd6d6d6,0xffd1d1d1,0xffadadad,0xff7e7e7e,0xff7e7e7e,0xff92a390,0xff93a391,0xff8b948a,
1009 0xff6c6c6c,0xff6b6b6b,0xffd5d5d5,0xffd3d3d3,0xff696969,0xff686868,0xff666666,0xffcbcbcb,0xffc9c9c9,0xffc8c8c8,0xffc6c6c6,0xffc4c4c4,0xffc3c3c3,0xffbdbdbd, 1009 0xff7d7d7d,0xff7c7c7c,0xffdcdcdc,0xffdadada,0xff7a7a7a,0xff7a7a7a,0xff787878,0xffd3d3d3,0xffd1d1d1,0xffd1d1d1,0xffcfcfcf,0xffcdcdcd,0xffcccccc,0xffc7c7c7,
1010 0xffb8b8b8,0xffb1b1b1,0xff093817,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff0a3e1a,0xffc8c7c7,0xffcccbcb,0xffcdcdcd,0xffcecece,0xffc9c9c9, 1010 0xffc3c3c3,0xffbdbdbd,0xff104923,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff124f27,0xffd1d0d0,0xffd4d3d3,0xffd5d5d5,0xffd6d6d6,0xffd1d1d1,
1011 0xffa2a2a2,0xff6d6d6d,0xff6d6d6d,0xff8da28b,0xff90a48e,0xff859384,0xff6a6a6a,0xff696969,0xff818f80,0xff808e7f,0xff6d706c,0xff656565,0xff646464,0xffc6c6c6, 1011 0xffafafaf,0xff7e7e7e,0xff7e7e7e,0xff9caf9a,0xff9fb19d,0xff95a294,0xff7b7b7b,0xff7a7a7a,0xff919e90,0xff909d8f,0xff7e817d,0xff777777,0xff767676,0xffcfcfcf,
1012 0xffc4c4c4,0xffc3c3c3,0xffbdbdbd,0xffb8b8b8,0xffb1b1b1,0xffababab,0xff083517,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff093617,0xffb8b4b4, 1012 0xffcdcdcd,0xffcccccc,0xffc7c7c7,0xffc3c3c3,0xffbdbdbd,0xffb7b7b7,0xff0f4623,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff104723,0xffc3bfbf,
1013 0xffc2c0c0,0xffc8c7c7,0xffcccbcb,0xffcdcdcd,0xffcecece,0xffcacaca,0xffa5a5a5,0xff6c6c6c,0xff6c6c6c,0xff97ad95,0xff98ae96,0xff96ab94,0xff98af96,0xff96ad94, 1013 0xffcbcaca,0xffd1d0d0,0xffd4d3d3,0xffd5d5d5,0xffd6d6d6,0xffd2d2d2,0xffb2b2b2,0xff7d7d7d,0xff7d7d7d,0xffa5b9a4,0xffa6baa4,0xffa4b7a3,0xffa6bba4,0xffa4b9a3,
1014 0xff94aa92,0xff829181,0xff6b6e6a,0xff626262,0xff616161,0xffbdbdbd,0xffb8b8b8,0xffb2b2b2,0xffababab,0xffa4a4a4,0xff083316,0x93000000,0x62000000,0x3b000000, 1014 0xffa3b6a1,0xff92a091,0xff7c7f7b,0xff747474,0xff737373,0xffc7c7c7,0xffc3c3c3,0xffbdbdbd,0xffb7b7b7,0xffb1b1b1,0xff0f4322,0x93000000,0x62000000,0x3b000000,
1015 0x1f000000,0x3d000000,0xff072c13,0xff9d9595,0xffaca6a6,0xffb8b4b4,0xffc2c0c0,0xffc8c7c7,0xffcccbcb,0xffcdcdcd,0xffcdcdcd,0xffcbcbcb,0xffa5a5a5,0xff6a6a6a, 1015 0x1f000000,0x3d000000,0xff0d3c1e,0xffaba4a4,0xffb8b3b3,0xffc3bfbf,0xffcbcaca,0xffd1d0d0,0xffd4d3d3,0xffd5d5d5,0xffd5d5d5,0xffd3d3d3,0xffb2b2b2,0xff7b7b7b,
1016 0xff696969,0xff9eb59c,0xff9fb69d,0xff9eb59d,0xff9db49b,0xff9ab298,0xff97ae95,0xff839282,0xff686c67,0xff5c5c5c,0xffb2b2b2,0xffadadad,0xffa6a6a6,0xff9f9f9f, 1016 0xff7a7a7a,0xffacc0aa,0xffadc1ab,0xffacc0ab,0xffabbfa9,0xffa8bda6,0xffa5baa4,0xff93a192,0xff7a7d79,0xff6e6e6e,0xffbdbdbd,0xffb9b9b9,0xffb3b3b3,0xffadadad,
1017 0xff083115,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff062510,0xff877c7c,0xff918787,0xff9d9595,0xffaca6a6,0xffb8b4b4,0xffc1bfbf,0xffc8c7c7, 1017 0xff0f4120,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0c341a,0xff978d8d,0xffa09797,0xffaba4a4,0xffb8b3b3,0xffc3bfbf,0xffcbc9c9,0xffd1d0d0,
1018 0xffcbcaca,0xffcccccc,0xffcbcbcb,0xffcbcbcb,0xffa7a7a7,0xff686868,0xff676767,0xffa5bda3,0xffa5bda3,0xffa3bba1,0xffa0b89e,0xff9cb39a,0xff95ac93,0xffbcdabb, 1018 0xffd3d2d2,0xffd4d4d4,0xffd3d3d3,0xffd3d3d3,0xffb4b4b4,0xff7a7a7a,0xff797979,0xffb2c7b0,0xffb2c7b0,0xffb0c5ae,0xffadc3ac,0xffaabea8,0xffa4b8a2,0xffc6e0c5,
1019 0xff565656,0xffa7a7a7,0xffa0a0a0,0xff999999,0xff073014,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff06230f,0xff6d6d6d,0xff7b7272,0xff877c7c, 1019 0xff686868,0xffb4b4b4,0xffadadad,0xffa7a7a7,0xff0d401f,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0c3119,0xff7e7e7e,0xff8c8383,0xff978d8d,
1020 0xff918787,0xff9d9595,0xffaba6a6,0xffb7b3b3,0xffc0bebe,0xffc7c6c6,0xffc9c9c9,0xffcacaca,0xffc9c9c9,0xffc8c8c8,0xffa6a6a6,0xff656565,0xff636363,0xffa9c3a8, 1020 0xffa09797,0xffaba4a4,0xffb7b3b3,0xffc2bebe,0xffcac8c8,0xffd0cfcf,0xffd1d1d1,0xffd2d2d2,0xffd1d1d1,0xffd1d1d1,0xffb3b3b3,0xff777777,0xff757575,0xffb6ccb5,
1021 0xffa8c1a6,0xffa3bca1,0xff9cb59b,0xffb9d6b7,0xff535353,0xffa1a1a1,0xff9a9a9a,0xff949494,0xff072e13,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3e000000, 1021 0xffb5cbb3,0xffb0c6ae,0xffaac0a9,0xffc4ddc2,0xff656565,0xffaeaeae,0xffa8a8a8,0xffa3a3a3,0xff0d3e1e,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3e000000,
1022 0xff094319,0xff8d988c,0xff6b6b6b,0xff6b6b6b,0xff766e6e,0xff847979,0xff8e8484,0xff9a9292,0xffa9a4a4,0xffb5b1b1,0xffbfbdbd,0xffc4c3c3,0xffc7c6c6,0xffc7c7c7, 1022 0xff105425,0xff9ca69b,0xff7c7c7c,0xff7c7c7c,0xff877f7f,0xff948a8a,0xff9d9494,0xffa8a1a1,0xffb6b1b1,0xffc0bdbd,0xffc9c7c7,0xffcdcccc,0xffd0cfcf,0xffd0d0d0,
1023 0xffc6c6c6,0xffc5c5c5,0xffa8a8a8,0xff616161,0xff5d5d5d,0xffa7c1a6,0xffa3bda1,0xffb3cfb1,0xff515151,0xff9b9b9b,0xff969696,0xff8f8f8f,0xff072c13,0x99000000, 1023 0xffcfcfcf,0xffcecece,0xffb5b5b5,0xff737373,0xff6f6f6f,0xffb4cbb3,0xffb0c7ae,0xffbed7bd,0xff636363,0xffa9a9a9,0xffa4a4a4,0xff9e9e9e,0xff0d3c1e,0x99000000,
1024 0x66000000,0x3d000000,0x21000000,0x42000000,0xff0a4519,0xffb1cbb0,0xffa3baa2,0xff808a7f,0xff5f5f5f,0xff606060,0xff6b6565,0xff7b7171,0xff887f7f,0xff979090, 1024 0x66000000,0x3d000000,0x21000000,0x42000000,0xff125725,0xffbdd3bc,0xffb0c4af,0xff909a8f,0xff717171,0xff727272,0xff7c7777,0xff8c8282,0xff988f8f,0xffa59f9f,
1025 0xffa7a2a2,0xffb3afaf,0xffbcbaba,0xffc1c0c0,0xffc3c3c3,0xffc3c3c3,0xffc2c2c2,0xffc0c0c0,0xffa2a2a2,0xff565656,0xffa1bba0,0xffacc7aa,0xff4d4d4d,0xff969696, 1025 0xffb4afaf,0xffbebbbb,0xffc6c4c4,0xffcbcaca,0xffcccccc,0xffcccccc,0xffcbcbcb,0xffcacaca,0xffafafaf,0xff686868,0xffaec5ad,0xffb8d0b6,0xff5f5f5f,0xffa4a4a4,
1026 0xff8f8f8f,0xff888888,0xff072a12,0x99000000,0x66000000,0x3d000000,0x2a000000,0x4f000000,0xff083c16,0xff8ea28d,0xff7f907d,0xff748573,0xff6e7d6d,0xff5c655c, 1026 0xff9e9e9e,0xff989898,0xff0d391d,0x99000000,0x66000000,0x3d000000,0x2a000000,0x4f000000,0xff0f4d22,0xff9daf9c,0xff8f9f8d,0xff859584,0xff7f8d7e,0xff6e776e,
1027 0xff494949,0xff515151,0xff625c5c,0xff776d6d,0xff887e7e,0xff968e8e,0xffa59f9f,0xffafacac,0xffb8b6b6,0xffbdbcbc,0xffbebebe,0xffbbbaba,0xffb7b7b7,0xff535353, 1027 0xff5b5b5b,0xff636363,0xff746e6e,0xff887e7e,0xff988e8e,0xffa49d9d,0xffb2adad,0xffbbb8b8,0xffc3c1c1,0xffc7c6c6,0xffc8c8c8,0xffc5c4c4,0xffc2c2c2,0xff656565,
1028 0xff99b298,0xffa3bca1,0xff4a4a4a,0xff8e8e8e,0xff888888,0xff818181,0xff062811,0x99000000,0x66000000,0x3d000000,0x40000000,0x6a000000,0xff072c10,0xff5c6a5b, 1028 0xffa7bda6,0xffb0c6ae,0xff5c5c5c,0xff9d9d9d,0xff989898,0xff919191,0xff0c371b,0x99000000,0x66000000,0x3d000000,0x40000000,0x6a000000,0xff0d3c1a,0xff6e7b6d,
1029 0xff495348,0xff3e463d,0xff394139,0xff3b443a,0xff434c42,0xff474e47,0xff424242,0xff515151,0xff656060,0xff7a7070,0xff887e7e,0xff948c8c,0xffa19c9c,0xffaca9a9, 1029 0xff5b655a,0xff4f584e,0xff4a524a,0xff4c564b,0xff545e53,0xff596059,0xff535353,0xff636363,0xff777272,0xff8b8181,0xff988e8e,0xffa39b9b,0xffaeaaaa,0xffb8b6b6,
1030 0xffb3b2b2,0xffb4b4b4,0xffb3b3b3,0xff4e4e4e,0xff8ca38b,0xff99b198,0xff464646,0xff878787,0xff818181,0xff7b7b7b,0xff062610,0x99000000,0x66000000,0x3d000000, 1030 0xffbebdbd,0xffbfbfbf,0xffbebebe,0xff606060,0xff9bb09a,0xffa7bda6,0xff585858,0xff979797,0xff919191,0xff8c8c8c,0xff0c351a,0x99000000,0x66000000,0x3d000000,
1031 0x64000000,0x91000000,0xff041b0a,0xff646963,0xffa1a3a0,0xffd7d8d7,0xfffafafa,0xffd7d8d7,0xff9fa29f,0xff5f655f,0xff414b41,0xff525b51,0xff4f4f4f,0xff5c5c5c, 1031 0x64000000,0x91000000,0xff082812,0xff767a75,0xffaeb0ad,0xffdddedd,0xfffbfbfb,0xffdddedd,0xffadafad,0xff717771,0xff525d52,0xff646d63,0xff616161,0xff6e6e6e,
1032 0xff696565,0xff7a6f6f,0xff867c7c,0xff928b8b,0xffa39f9f,0xffadacac,0xffaeaeae,0xff4b4b4b,0xff7f947e,0xff8fa58d,0xff434343,0xff808080,0xff7a7a7a,0xff747474, 1032 0xff7a7777,0xff8b8080,0xff968d8d,0xffa19a9a,0xffb0adad,0xffb9b8b8,0xffbababa,0xff5d5d5d,0xff8fa38e,0xff9eb29c,0xff545454,0xff909090,0xff8b8b8b,0xff858585,
1033 0xff06240f,0x99000000,0x66000000,0x3d000000,0x92000000,0xb8000000,0xff5d6760,0xffc7c9c7,0xffa6a8a6,0xff8d928d,0xff858b84,0xff8c908c,0xffa4a8a4,0xffc6c7c6, 1033 0xff0c3319,0x99000000,0x66000000,0x3d000000,0x92000000,0xb8000000,0xff6f7972,0xffd0d1d0,0xffb3b5b3,0xff9ca19c,0xff959a94,0xff9b9f9b,0xffb1b5b1,0xffcfd0cf,
1034 0xff767a76,0xff3f483e,0xff606e5f,0xff717d6f,0xff5d5d5d,0xff606060,0xff656060,0xff787070,0xff918b8b,0xffa2a0a0,0xffa8a7a7,0xff474747,0xff728671,0xff869a85, 1034 0xff878b87,0xff505a4f,0xff727f71,0xff828d80,0xff6f6f6f,0xff727272,0xff777272,0xff898181,0xffa09a9a,0xffafadad,0xffb5b4b4,0xff595959,0xff839682,0xff96a895,
1035 0xff3f3f3f,0xff797979,0xff747474,0xff707070,0xff05230f,0x99000000,0x66000000,0x3d000000,0xbd000000,0xdd454545,0xffbdc0bd,0xff969a96,0xff919890,0xff9ea79d, 1035 0xff505050,0xff8a8a8a,0xff858585,0xff818181,0xff0a3119,0x99000000,0x66000000,0x3d000000,0xbd000000,0xdd575757,0xffc7cac7,0xffa4a8a4,0xffa0a69f,0xffacb4ab,
1036 0xffa1aaa1,0xff9ca49b,0xff8d948d,0xff939893,0xffc6c7c5,0xff5d615d,0xff495549,0xff6d7e6b,0xff829681,0xff7a8a79,0xff575757,0xff535353,0xff797272,0xff938f8f, 1036 0xffaeb6ae,0xffaab1a9,0xff9ca39c,0xffa2a6a2,0xffcfd0ce,0xff6f736f,0xff5b675b,0xff7e8e7c,0xff92a491,0xff8b9a8a,0xff696969,0xff656565,0xff8a8383,0xffa29e9e,
1037 0xffa09f9f,0xff434343,0xff677965,0xff7b8e7a,0xff3c3c3c,0xff747474,0xff6f6f6f,0xff6b6b6b,0xff05210e,0x99000000,0x66000000,0x3d000000,0xd9000000,0xf0979797, 1037 0xffadadad,0xff545454,0xff798a77,0xff8c9d8b,0xff4d4d4d,0xff858585,0xff808080,0xff7c7c7c,0xff0a2f17,0x99000000,0x66000000,0x3d000000,0xd9000000,0xf0a5a5a5,
1038 0xff949a95,0xff919890,0xffa8b1a7,0xffb0bcaf,0xffb0bcb0,0xffadb8ac,0xffa2aca1,0xff8c928b,0xffa3a6a3,0xff9d9f9d,0xff394239,0xff606f5f,0xff788c77,0xff7d927b, 1038 0xffa3a8a4,0xffa0a69f,0xffb5bdb4,0xffbcc6bb,0xffbcc6bc,0xffb9c3b8,0xffafb8ae,0xff9ba19a,0xffb0b3b0,0xffabadab,0xff4a534a,0xff728071,0xff899b88,0xff8da18c,
1039 0xff788d76,0xff70846e,0xff494949,0xff837d7d,0xff969494,0xff3f3f3f,0xff5c6e5b,0xff728270,0xff383838,0xff6e6e6e,0xff696969,0xff666666,0xff05200d,0x99000000, 1039 0xff899c87,0xff81947f,0xff5b5b5b,0xff938d8d,0xffa4a3a3,0xff505050,0xff6e7f6d,0xff839281,0xff494949,0xff7f7f7f,0xff7a7a7a,0xff787878,0xff0a2e16,0x99000000,
1040 0x66000000,0x3d000000,0xe7000000,0xf9d5d5d5,0xff6f7a72,0xff9da79d,0xffb0bcaf,0xffb3bfb2,0xffb2beb1,0xffb0bcaf,0xffaab5a9,0xff979f97,0xff888d88,0xffd6d7d6, 1040 0x66000000,0x3d000000,0xe7000000,0xf9dcdcdc,0xff808b83,0xffabb4ab,0xffbcc6bb,0xffbec9bd,0xffbdc8bd,0xffbcc6bb,0xffb6c0b6,0xffa5ada5,0xff989c98,0xffdddddd,
1041 0xff303830,0xff546254,0xff70836e,0xff758973,0xff70856e,0xff697d67,0xff444444,0xff696262,0xff888484,0xff3b3b3b,0xff526351,0xff687768,0xff353535,0xff686868, 1041 0xff404940,0xff667466,0xff81937f,0xff869984,0xff81957f,0xff7a8d79,0xff565656,0xff7a7474,0xff989494,0xff4c4c4c,0xff647563,0xff7a887a,0xff464646,0xff7a7a7a,
1042 0xff646464,0xff626262,0xff051f0d,0x99000000,0x66000000,0x3d000000,0xec000000,0xfefafafa,0xff636965,0xff989e98,0xffb0bcb0,0xffb2beb1,0xffb0bcaf,0xffaebaad, 1042 0xff767676,0xff747474,0xff0a2d16,0x99000000,0x66000000,0x3d000000,0xec000000,0xfefbfbfb,0xff757a77,0xffa6aca6,0xffbcc6bc,0xffbdc8bd,0xffbcc6bb,0xffbac4b9,
1043 0xffabb5aa,0xff99a399,0xff80847f,0xfffafafa,0xff2a302a,0xff4d5a4c,0xff697b67,0xff6d826b,0xff697d67,0xff627660,0xff5c6f5a,0xff3c3c3c,0xff787272,0xff383838, 1043 0xffb7c0b6,0xffa7b0a7,0xff90948f,0xfffbfbfb,0xff394039,0xff5f6c5e,0xff7a8c79,0xff7e927c,0xff7a8d79,0xff748772,0xff6e806c,0xff4d4d4d,0xff898383,0xff494949,
1044 0xff495947,0xff5f6d5f,0xff333333,0xff646464,0xff616161,0xff5e5e5e,0xff051e0c,0x99000000,0x66000000,0x3d000000,0xe7000000,0xf9d5d5d5,0xff707a74,0xff858585, 1044 0xff5b6b59,0xff717e71,0xff434343,0xff767676,0xff737373,0xff707070,0xff0a2b14,0x99000000,0x66000000,0x3d000000,0xe7000000,0xf9dcdcdc,0xff818b85,0xff959595,
1045 0xff909090,0xffa5ada4,0xffaebaad,0xffacb8ab,0xffa6b1a6,0xff949c93,0xff868a85,0xffd2d3d2,0xff252c25,0xff455144,0xff5f715d,0xff657863,0xff637762,0xff5d705b, 1045 0xff9f9f9f,0xffb2b9b1,0xffbac4b9,0xffb8c3b7,0xffb3bdb3,0xffa3aaa2,0xff969a95,0xffd9dad9,0xff343c34,0xff576356,0xff71826f,0xff778975,0xff758874,0xff6f816d,
1046 0xff566a54,0xff393939,0xff5b5555,0xff353535,0xff40503e,0xff586357,0xff323232,0xff606060,0xff5f5f5f,0xff5d5d5d,0xff051e0c,0x99000000,0x66000000,0x3d000000, 1046 0xff687b66,0xff4a4a4a,0xff6d6767,0xff464646,0xff51624f,0xff6a7569,0xff424242,0xff727272,0xff717171,0xff6f6f6f,0xff0a2b14,0x99000000,0x66000000,0x3d000000,
1047 0xd9000000,0xf0979797,0xff949a96,0xff989898,0xffb3b3b3,0xff909090,0xff909090,0xff9ea59d,0xff9ba59b,0xff868c86,0xff9d9f9c,0xff919391,0xff20261f,0xff394338, 1047 0xd9000000,0xf0a5a5a5,0xffa3a8a4,0xffa6a6a6,0xffbebebe,0xff9f9f9f,0xff9f9f9f,0xffacb2ab,0xffa9b2a9,0xff969b96,0xffabadaa,0xffa0a2a0,0xff2e352d,0xff4a5449,
1048 0xff4f5f4e,0xff5a6c58,0xff5b6e59,0xff576b56,0xff526550,0xff4d5f4a,0xff353535,0xff343434,0xff3b4b39,0xff515a50,0xff303030,0xff606060,0xff5e5e5e,0xff5d5d5d, 1048 0xff617160,0xff6c7d6a,0xff6d7f6b,0xff697c68,0xff647762,0xff5f715c,0xff464646,0xff454545,0xff4c5d4a,0xff636c62,0xff404040,0xff727272,0xff707070,0xff6f6f6f,
1049 0xff051e0c,0x99000000,0x66000000,0x3d000000,0xbd000000,0xdd454545,0xffbdc0be,0xff9a9a9a,0xff989898,0xffa7a7a7,0xffacacac,0xff838383,0xff7a7a7a,0xff898b89, 1049 0xff0a2b14,0x99000000,0x66000000,0x3d000000,0xbd000000,0xdd575757,0xffc7cac8,0xffa8a8a8,0xffa6a6a6,0xffb4b4b4,0xffb8b8b8,0xff939393,0xff8b8b8b,0xff999a99,
1050 0xffb6b7b6,0xff585958,0xff1f231e,0xff283027,0xff3b4539,0xff475646,0xff4f604d,0xff51644e,0xff4e614c,0xff495b47,0xff343434,0xff333333,0xff364634,0xff495149, 1050 0xffc1c2c1,0xff6a6b6a,0xff2d312b,0xff374036,0xff4c574a,0xff596858,0xff61725f,0xff637660,0xff60735e,0xff5b6d59,0xff454545,0xff434343,0xff475845,0xff5b635b,
1051 0xff303030,0xff5f5f5f,0xff5e5e5e,0xff5d5d5d,0xff051e0c,0x99000000,0x66000000,0x3d000000,0x92000000,0xb8000000,0xff5d6760,0xffc8c8c8,0xffa8a8a8,0xff919191, 1051 0xff404040,0xff717171,0xff707070,0xff6f6f6f,0xff0a2b14,0x99000000,0x66000000,0x3d000000,0x92000000,0xb8000000,0xff6f7972,0xffd1d1d1,0xffb5b5b5,0xffa0a0a0,
1052 0xff898989,0xff8e8e8e,0xffa2a2a2,0xffb5b5b5,0xff6b6b6b,0xffe4e4e4,0xffcacbca,0xff1e231e,0xff232b23,0xff323d31,0xff3f4c3e,0xff455644,0xff475946,0xff445642, 1052 0xff999999,0xff9d9d9d,0xffafafaf,0xffc0c0c0,0xff7c7c7c,0xffe8e8e8,0xffd2d3d2,0xff2b312b,0xff313b31,0xff424e41,0xff505e4f,0xff576856,0xff596b58,0xff566853,
1053 0xff41533f,0xff323232,0xff334331,0xff424842,0xff2f2f2f,0xff5e5e5e,0xff5d5d5d,0xff5d5d5d,0xff051e0c,0x99000000,0x66000000,0x3d000000,0x64000000,0x91000000, 1053 0xff526550,0xff424242,0xff435441,0xff535a53,0xff3f3f3f,0xff707070,0xff6f6f6f,0xff6f6f6f,0xff0a2b14,0x99000000,0x66000000,0x3d000000,0x64000000,0x91000000,
1054 0xff04190a,0xff676767,0xffa2a2a2,0xffd8d8d8,0xfffafafa,0xffd5d5d5,0xff979797,0xff4e4e4e,0xffe1e1e1,0xffffffff,0xffffffff,0xffc9c9c9,0xff1a1d19,0xff1e241d, 1054 0xff082512,0xff797979,0xffafafaf,0xffdedede,0xfffbfbfb,0xffdcdcdc,0xffa5a5a5,0xff606060,0xffe6e6e6,0xffffffff,0xffffffff,0xffd1d1d1,0xff272a25,0xff2b332a,
1055 0xff2b352a,0xff374436,0xff3e4d3c,0xff3f503d,0xff3e4e3c,0xff303030,0xff324230,0xff3c403c,0xff2f2f2f,0xff5e5e5e,0xff5e5e5e,0xff5d5d5d,0xff051e0d,0x99000000, 1055 0xff3b4639,0xff485647,0xff4f5f4d,0xff50624e,0xff4f604d,0xff404040,0xff425340,0xff4d514d,0xff3f3f3f,0xff707070,0xff707070,0xff6f6f6f,0xff0a2b16,0x99000000,
1056 0x66000000,0x3d000000,0x40000000,0x6a000000,0xff072911,0xff606060,0xff4b4b4b,0xff3f3f3f,0xff393939,0xff363636,0xff313131,0xff272727,0xff646464,0xfffafafa, 1056 0x66000000,0x3d000000,0x40000000,0x6a000000,0xff0d381b,0xff727272,0xff5d5d5d,0xff505050,0xff4a4a4a,0xff474747,0xff414141,0xff363636,0xff767676,0xfffbfbfb,
1057 0xffffffff,0xffffffff,0xffc8c8c8,0xff161716,0xff191f19,0xff273126,0xff323f31,0xff384735,0xff384a37,0xff394936,0xff2f2f2f,0xff363836,0xff2f2f2f,0xff5e5e5e, 1057 0xffffffff,0xffffffff,0xffd1d1d1,0xff222322,0xff252d25,0xff364135,0xff425041,0xff495946,0xff495c48,0xff4a5b47,0xff3f3f3f,0xff474947,0xff3f3f3f,0xff707070,
1058 0xff5e5e5e,0xff5e5e5e,0xff051f0d,0x99000000,0x66000000,0x3d000000,0x28000000,0x4e000000,0xff083517,0xff919191,0xff7d7d7d,0xff707070,0xff696969,0xff636363, 1058 0xff707070,0xff707070,0xff0a2d16,0x99000000,0x66000000,0x3d000000,0x28000000,0x4e000000,0xff0f4623,0xffa0a0a0,0xff8d8d8d,0xff818181,0xff7a7a7a,0xff757575,
1059 0xff575757,0xff424242,0xff2b2b2b,0xff626262,0xfffafafa,0xffffffff,0xffffffff,0xffc8c8c8,0xff131313,0xff171b17,0xff263024,0xff303e2e,0xff344432,0xff354633, 1059 0xff696969,0xff535353,0xff3b3b3b,0xff747474,0xfffbfbfb,0xffffffff,0xffffffff,0xffd1d1d1,0xff1e1e1e,0xff232823,0xff354033,0xff404f3e,0xff455642,0xff465843,
1060 0xff2f2f2f,0xff313231,0xff2f2f2f,0xff5e5e5e,0xff5e5e5e,0xff5f5f5f,0xff051f0d,0x93000000,0x62000000,0x3b000000,0x1d000000,0x3b000000,0xff0a3b19,0xffaaaaaa, 1060 0xff3f3f3f,0xff414241,0xff3f3f3f,0xff707070,0xff707070,0xff717171,0xff0a2d16,0x93000000,0x62000000,0x3b000000,0x1d000000,0x3b000000,0xff124c25,0xffb6b6b6,
1061 0xffa0a0a0,0xff989898,0xff909090,0xff888888,0xff797979,0xff606060,0xff424242,0xff252525,0xff5e5e5e,0xfffafafa,0xffffffff,0xffffffff,0xffcacaca,0xff161616, 1061 0xffadadad,0xffa6a6a6,0xff9f9f9f,0xff989898,0xff8a8a8a,0xff727272,0xff535353,0xff343434,0xff707070,0xfffbfbfb,0xffffffff,0xffffffff,0xffd2d2d2,0xff222222,
1062 0xff181818,0xff262e25,0xff303f2f,0xff334331,0xff334330,0xff2e2e2e,0xff2e2e2e,0xff5e5e5e,0xff5f5f5f,0xff606060,0xff05200d,0x87000000,0x5a000000,0x36000000, 1062 0xff242424,0xff353e34,0xff40503f,0xff435441,0xff435440,0xff3e3e3e,0xff3e3e3e,0xff707070,0xff717171,0xff727272,0xff0a2e16,0x87000000,0x5a000000,0x36000000,
1063 0x17000000,0x2f000000,0xff093c19,0xff093918,0xff093717,0xff083417,0xff083215,0xff083014,0xff072c13,0xff06260f,0xff041c0c,0xff031208,0xff010a04,0xff545654, 1063 0x17000000,0x2f000000,0xff104d25,0xff104a24,0xff104823,0xff0f4523,0xff0f4220,0xff0f401f,0xff0d3c1e,0xff0c3519,0xff082914,0xff061d0f,0xff031208,0xff666866,
1064 0xfffafafa,0xffffffff,0xffffffff,0xff676a68,0xff020e06,0xff020a04,0xff020d06,0xff020f06,0xff020f06,0xff020f06,0xff051e0d,0xff051f0d,0xff051f0d,0xff05200d, 1064 0xfffbfbfb,0xffffffff,0xffffffff,0xff797b7a,0xff05170c,0xff051208,0xff05160c,0xff05190c,0xff05190c,0xff05190c,0xff0a2b16,0xff0a2d16,0xff0a2d16,0xff0a2e16,
1065 0xff05210e,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x9b000000,0xa1000000, 1065 0xff0a2f17,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x9b000000,0xa1000000,
1066 0xad000000,0xc0000000,0xd5000000,0xe9000000,0xf8555555,0xfffafafa,0xfa858585,0xe6000000,0xcf000000,0xb7000000,0xa4000000,0x9c000000,0x99000000,0x99000000, 1066 0xad000000,0xc0000000,0xd5000000,0xe9000000,0xf8676767,0xfffbfbfb,0xfa959595,0xe6000000,0xcf000000,0xb7000000,0xa4000000,0x9c000000,0x99000000,0x99000000,
1067 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000, 1067 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
1068 0x62000000,0x66000000,0x67000000,0x6a000000,0x74000000,0x89000000,0xab000000,0xce000000,0xe8000000,0xf4303030,0xeb000000,0xd3000000,0xaf000000,0x8c000000, 1068 0x62000000,0x66000000,0x67000000,0x6a000000,0x74000000,0x89000000,0xab000000,0xce000000,0xe8000000,0xf4404040,0xeb000000,0xd3000000,0xaf000000,0x8c000000,
1069 0x75000000,0x6a000000,0x67000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000, 1069 0x75000000,0x6a000000,0x67000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
1070 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3e000000,0x3f000000,0x44000000,0x4b000000,0x54000000,0x5d000000,0x63000000, 1070 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3e000000,0x3f000000,0x44000000,0x4b000000,0x54000000,0x5d000000,0x63000000,
1071 0x65000000,0x60000000,0x57000000,0x4e000000,0x45000000,0x40000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000, 1071 0x65000000,0x60000000,0x57000000,0x4e000000,0x45000000,0x40000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
1072 0x18000000,0xf000000 1072 0x18000000,0xf000000
1073}; 1073};
1074 1074
1075static const QRgb Games_data[] = { 1075static const QRgb Games_data[] = {
1076 0xffffff,0xffffff,0x0,0x3ceee7c6,0x9dd6ceaa,0xf4cac092,0xfff2e396,0xfff2dd78,0xf4cab549,0x9dd6b92f,0x3ceeca15,0x0,0xffffff,0xffffff, 1076 0xffffff,0xffffff,0x0,0x3ceee7c6,0x9dd6ceaa,0xf4cac092,0xfff2e396,0xfff2dd78,0xf4cab549,0x9dd6b92f,0x3ceeca15,0x0,0xffffff,0xffffff,
@@ -1282,27 +1282,27 @@ static const QRgb HelpBrowser_data[] = {
1282 0x7b191919,0x6c151515,0x5b141414,0x49111111,0x350e0e0e,0x250e0e0e,0x170b0b0b,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff, 1282 0x7b191919,0x6c151515,0x5b141414,0x49111111,0x350e0e0e,0x250e0e0e,0x170b0b0b,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,
1283 0xffffff,0x1000000,0x2000000,0x62b2b2b,0xb171717,0x120e0e0e,0x1d121212,0x29131313,0x36131313,0x43131313,0x4e141414,0x58141414,0x5f181818,0x64171717, 1283 0xffffff,0x1000000,0x2000000,0x62b2b2b,0xb171717,0x120e0e0e,0x1d121212,0x29131313,0x36131313,0x43131313,0x4e141414,0x58141414,0x5f181818,0x64171717,
1284 0x65171717,0x63151515,0x5e161616,0x58141414,0x4e141414,0x420f0f0f,0x350e0e0e,0x280d0d0d,0x1c090909,0x120e0e0e,0xa000000,0x5000000,0x2000000,0x1000000, 1284 0x65171717,0x63151515,0x5e161616,0x58141414,0x4e141414,0x420f0f0f,0x350e0e0e,0x280d0d0d,0x1c090909,0x120e0e0e,0xa000000,0x5000000,0x2000000,0x1000000,
1285 0xffffff,0xffffff 1285 0xffffff,0xffffff
1286}; 1286};
1287 1287
1288static const QRgb HelpButton_data[] = { 1288static const QRgb HelpButton_data[] = {
1289 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 1289 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
1290 0xffffff,0xffffff,0xffffff,0x3ed5d5d5,0x93d4d4d4,0xd5d8d8d8,0xfad5d5d5,0xd8c8c8c8,0x9ebebebe,0x508e8e8e,0xc000000,0x3000000,0xffffff,0xffffff, 1290 0xffffff,0xffffff,0xffffff,0x3edcdcdc,0x93dbdbdb,0xd5dedede,0xfadcdcdc,0xd8d1d1d1,0x9ec8c8c8,0x509d9d9d,0xc000000,0x3000000,0xffffff,0xffffff,
1291 0xffffff,0xffffff,0x60d5d5d5,0xdbdddddd,0xffdcdcdc,0xffcbcbcb,0xffc5c5c5,0xffc4c4c4,0xffd0d0d0,0xe6bbbbbb,0x837d7d7d,0x18000000,0x4000000,0xffffff, 1291 0xffffff,0xffffff,0x60dcdcdc,0xdbe3e3e3,0xffe2e2e2,0xffd3d3d3,0xffcecece,0xffcdcdcd,0xffd7d7d7,0xe6c5c5c5,0x838d8d8d,0x18000000,0x4000000,0xffffff,
1292 0xffffff,0x3ed6d5d5,0xdbd3d3d3,0xffd1d1d1,0xff9c9b9b,0xff333333,0xff323132,0xff565556,0xffbababa,0xffb1b2b1,0xec8f8e8f,0x75474747,0x18000000,0x3000000, 1292 0xffffff,0x3edddcdc,0xdbdadada,0xffd8d8d8,0xffaaa9a9,0xff434343,0xff424142,0xff686768,0xffc4c4c4,0xffbdbdbd,0xec9e9d9e,0x75595959,0x18000000,0x3000000,
1293 0xffffff,0x94cdcecd,0xffc8c7c7,0xffb2b2b2,0xff000000,0xff616161,0xffb2b2b2,0xff000000,0xff5f5f5f,0xffaaabaa,0xff9d9c9c,0xc84f4f4f,0x3d000000,0xc000000, 1293 0xffffff,0x94d5d6d5,0xffd1d0d0,0xffbdbdbd,0xff000000,0xff737373,0xffbdbdbd,0xff000000,0xff717171,0xffb6b7b6,0xffabaaaa,0xc8616161,0x3d000000,0xc000000,
1294 0xffffff,0xd5c2c2c2,0xffafafaf,0xffa0a0a0,0xff5b5b5b,0xff757575,0xffa8a8a8,0xff000000,0xff585858,0xffa4a4a4,0xffa4a4a4,0xef4f4f4f,0x61000000,0x1a000000, 1294 0xffffff,0xd5cbcbcb,0xffbbbbbb,0xffadadad,0xff6d6d6d,0xff868686,0xffb5b5b5,0xff000000,0xff6a6a6a,0xffb1b1b1,0xffb1b1b1,0xef616161,0x61000000,0x1a000000,
1295 0xffffff,0xfab4b4b4,0xff9d9d9d,0xff959595,0xffa5a5a5,0xff989898,0xff434343,0xff1d1d1d,0xff878787,0xffa1a1a1,0xff939393,0xfd4b4b4b,0x7c000000,0x25000000, 1295 0xffffff,0xfabfbfbf,0xffababab,0xffa4a4a4,0xffb2b2b2,0xffa6a6a6,0xff545454,0xff2a2a2a,0xff979797,0xffaeaeae,0xffa2a2a2,0xfd5d5d5d,0x7c000000,0x25000000,
1296 0xffffff,0xd9a3a3a3,0xff919191,0xff989898,0xff909090,0xff4e4e4e,0xff000000,0xff919191,0xff989898,0xff949494,0xff7b7b7b,0xf2373737,0x85000000,0x2b000000, 1296 0xffffff,0xd9b0b0b0,0xffa0a0a0,0xffa6a6a6,0xff9f9f9f,0xff606060,0xff000000,0xffa0a0a0,0xffa6a6a6,0xffa3a3a3,0xff8c8c8c,0xf2484848,0x85000000,0x2b000000,
1297 0xffffff,0xa0848484,0xff8c8c8b,0xff8a8b8b,0xff979797,0xff8e8e8e,0xff929291,0xff959595,0xff8c8c8c,0xff8b8c8b,0xff585758,0xdf272727,0x7c000000,0x25000000, 1297 0xffffff,0xa0949494,0xff9b9b9a,0xff9a9a9a,0xffa5a5a5,0xff9d9d9d,0xffa1a1a0,0xffa4a4a4,0xff9b9b9b,0xff9a9b9a,0xff6a696a,0xdf363636,0x7c000000,0x25000000,
1298 0xffffff,0x515d5d5d,0xe7707070,0xff7c7c7c,0xff848484,0xff434343,0xff262626,0xff8f8f8f,0xff7f7f7f,0xff616061,0xf5313131,0xbb101010,0x61000000,0x1a000000, 1298 0xffffff,0x516f6f6f,0xe7818181,0xff8d8d8d,0xff949494,0xff545454,0xff353535,0xff9e9e9e,0xff8f8f8f,0xff737273,0xf5414141,0xbb1a1a1a,0x61000000,0x1a000000,
1299 0xffffff,0xc000000,0x843f3f3f,0xed505050,0xff5d5c5c,0xff535353,0xff262626,0xff646364,0xff515051,0xf5313130,0xcd141414,0x83000000,0x3d000000,0xc000000, 1299 0xffffff,0xc000000,0x84505050,0xed626262,0xff6f6e6e,0xff656565,0xff353535,0xff767576,0xff636263,0xf5414140,0xcd1f1f1f,0x83000000,0x3d000000,0xc000000,
1300 0xffffff,0x3000000,0x18000000,0x76212121,0xc92b2b2b,0xf0303030,0xfd353535,0xf32a2a2a,0xdf1d1d1d,0xbb0d0d0d,0x83000000,0x4b000000,0x18000000,0x3000000, 1300 0xffffff,0x3000000,0x18000000,0x762f2f2f,0xc93b3b3b,0xf0404040,0xfd464646,0xf3393939,0xdf2a2a2a,0xbb161616,0x83000000,0x4b000000,0x18000000,0x3000000,
1301 0xffffff,0xffffff,0x4000000,0x18000000,0x3d000000,0x61000000,0x7c000000,0x85000000,0x7c000000,0x61000000,0x3d000000,0x18000000,0x4000000,0xffffff, 1301 0xffffff,0xffffff,0x4000000,0x18000000,0x3d000000,0x61000000,0x7c000000,0x85000000,0x7c000000,0x61000000,0x3d000000,0x18000000,0x4000000,0xffffff,
1302 0xffffff,0xffffff,0xffffff,0x3000000,0xc000000,0x1a000000,0x25000000,0x2b000000,0x25000000,0x1a000000,0xc000000,0x3000000,0xffffff,0xffffff 1302 0xffffff,0xffffff,0xffffff,0x3000000,0xc000000,0x1a000000,0x25000000,0x2b000000,0x25000000,0x1a000000,0xc000000,0x3000000,0xffffff,0xffffff
1303}; 1303};
1304 1304
1305static const QRgb ImageViewer_data[] = { 1305static const QRgb ImageViewer_data[] = {
1306 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000, 1306 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
1307 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000, 1307 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
1308 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xfff0dc5c,0xfff0dc5c,0xfff0dc5c,0xfff0dc5c,0xfff0dc5c,0x3b000000,0x3d000000,0x3d000000,0x3d000000, 1308 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xfff0dc5c,0xfff0dc5c,0xfff0dc5c,0xfff0dc5c,0xfff0dc5c,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
@@ -1375,89 +1375,89 @@ static const QRgb ImageViewer_data[] = {
1375 0x62000000,0x66000000,0x67000000,0x6a000000,0x74000000,0x89000000,0xab000000,0xce000000,0xe8000000,0xf4303030,0xeb000000,0xd3000000,0xaf000000,0x8c000000, 1375 0x62000000,0x66000000,0x67000000,0x6a000000,0x74000000,0x89000000,0xab000000,0xce000000,0xe8000000,0xf4303030,0xeb000000,0xd3000000,0xaf000000,0x8c000000,
1376 0x75000000,0x6a000000,0x67000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000, 1376 0x75000000,0x6a000000,0x67000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
1377 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3e000000,0x3f000000,0x44000000,0x4b000000,0x54000000,0x5d000000,0x63000000, 1377 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3e000000,0x3f000000,0x44000000,0x4b000000,0x54000000,0x5d000000,0x63000000,
1378 0x65000000,0x60000000,0x57000000,0x4e000000,0x45000000,0x40000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000, 1378 0x65000000,0x60000000,0x57000000,0x4e000000,0x45000000,0x40000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
1379 0x18000000,0xf000000 1379 0x18000000,0xf000000
1380}; 1380};
1381 1381
1382static const QRgb Ipkg_data[] = { 1382static const QRgb Ipkg_data[] = {
1383 0xffffff,0xffffff,0xffffff,0x1181818,0x1181818,0x2181818,0x3181818,0x4000000,0x7242424,0xf111111,0x1e111111,0x30151515,0x44161616,0x51161616, 1383 0xffffff,0xffffff,0xffffff,0x1242424,0x1242424,0x2242424,0x3242424,0x4000000,0x7333333,0xf1b1b1b,0x1e1b1b1b,0x30202020,0x44222222,0x51222222,
1384 0x59141414,0x5b161616,0x5a141414,0x54121212,0x4a151515,0x3e151515,0x2f161616,0x22161616,0x1a141414,0x120e0e0e,0xb171717,0x8202020,0x4181818,0x3181818, 1384 0x591f1f1f,0x5b222222,0x5a1f1f1f,0x541d1d1d,0x4a202020,0x3e202020,0x2f222222,0x22222222,0x1a1f1f1f,0x12171717,0xb232323,0x82e2e2e,0x4242424,0x3242424,
1385 0x2181818,0x1181818,0x1181818,0xffffff,0xffffff,0x1181818,0x2181818,0x3181818,0x5181818,0x7181818,0xb171717,0x10101010,0x1a141414,0x2f161616, 1385 0x2242424,0x1242424,0x1242424,0xffffff,0xffffff,0x1242424,0x2242424,0x3242424,0x5242424,0x7242424,0xb232323,0x101a1a1a,0x1a1f1f1f,0x2f222222,
1386 0x50161616,0x75141414,0x94151515,0xa8151515,0xb2141414,0xb3141414,0xaf141414,0xaa151515,0x9d151515,0x8a141414,0x74161616,0x5d161616,0x48121212,0x36181818, 1386 0x50222222,0x751f1f1f,0x94202020,0xa8202020,0xb21f1f1f,0xb31f1f1f,0xaf1f1f1f,0xaa202020,0x9d202020,0x8a1f1f1f,0x74222222,0x5d222222,0x481d1d1d,0x36242424,
1387 0x27141414,0x1b131313,0x131b1b1b,0xc181818,0x7181818,0x5181818,0x2181818,0x1181818,0x1181818,0x3181818,0x6181818,0xc181818,0x13181818,0x1b131313, 1387 0x271f1f1f,0x1b1e1e1e,0x13282828,0xc242424,0x7242424,0x5242424,0x2242424,0x1242424,0x1242424,0x3242424,0x6242424,0xc242424,0x13242424,0x1b1e1e1e,
1388 0x24151515,0x30151515,0x47161616,0x6d171717,0x9a161616,0xc0151515,0xe4495e64,0xf36f97a2,0xfb89c0d0,0xfe92d6ec,0xf977bacf,0xf1538d9e,0xe6325560,0xd2131313, 1388 0x24202020,0x30202020,0x47222222,0x6d232323,0x9a222222,0xc0202020,0xe45b7076,0xf380a5af,0xfb99cad7,0xfea1ddef,0xf988c4d7,0xf1659cac,0xe6426772,0xd21e1e1e,
1389 0xc4151515,0xaf161616,0x96141414,0x7d161616,0x64141414,0x4e171717,0x39161616,0x28191919,0x1a181818,0x10181818,0x8181818,0x3181818,0x3181818,0x7181818, 1389 0xc4202020,0xaf222222,0x961f1f1f,0x7d222222,0x641f1f1f,0x4e232323,0x39222222,0x28252525,0x1a242424,0x10242424,0x8242424,0x3242424,0x3242424,0x7242424,
1390 0x15181818,0x27181818,0x3c181818,0x4f171717,0x61181818,0x75181818,0x90151515,0xb4151515,0xd9242b2d,0xf4658792,0xffa3deee,0xffa4dff1,0xff9dddf0,0xff91d9ee, 1390 0x15242424,0x27242424,0x3c242424,0x4f232323,0x61242424,0x75242424,0x90202020,0xb4202020,0xd9333b3d,0xf47797a1,0xffb0e3f1,0xffb1e4f3,0xffabe3f3,0xffa0dff1,
1391 0xff82d3ec,0xff6ecce9,0xff5cc4e4,0xff3c7586,0xfc413229,0xf23d2417,0xda1d1916,0xc7161616,0xb1161616,0x9b171717,0x81181818,0x66191919,0x4c181818,0x32181818, 1391 0xff92daef,0xff7fd4ed,0xff6ecde8,0xff4d8696,0xfc524238,0xf24e3323,0xda2a2522,0xc7222222,0xb1222222,0x9b232323,0x81242424,0x66252525,0x4c242424,0x32242424,
1392 0x18181818,0x9181818,0x6181818,0x14181818,0x33181818,0x5f181818,0x83151515,0x9c191919,0xaf171717,0xc1181818,0xd4171717,0xe71e1414,0xf86a828d,0xffa0def0, 1392 0x18242424,0x9242424,0x6242424,0x14242424,0x33242424,0x5f242424,0x83202020,0x9c252525,0xaf232323,0xc1242424,0xd4232323,0xe72b1f1f,0xf87b929c,0xffade3f3,
1393 0xffa2def1,0xffa0def0,0xff99dbef,0xff8bd7ed,0xff78d0ea,0xff62c8e7,0xff4ec1e4,0xff3dbbe1,0xff4c7a83,0xff462617,0xff201915,0xfc3f2518,0xf24c2a19,0xdc342218, 1393 0xffafe3f3,0xffade3f3,0xffa7e1f2,0xff9addf0,0xff89d7ee,0xff74d1eb,0xff60cbe8,0xff4ec5e6,0xff5e8b93,0xff583523,0xff2e2520,0xfc503424,0xf25e3925,0xdc453024,
1394 0xc3161616,0xb2181818,0x96181818,0x6d181818,0x3a181818,0x16181818,0xe181818,0x25181818,0x59181818,0x9c1b1717,0xcb2e1313,0xdf3f0d0d,0xec500a0a,0xf65d0505, 1394 0xc3222222,0xb2242424,0x96242424,0x6d242424,0x3a242424,0x16242424,0xe242424,0x25242424,0x59242424,0x9c282323,0xcb3e1e1e,0xdf501616,0xec621212,0xf66f0a0a,
1395 0xfd680202,0xff75454c,0xff93d6ec,0xff99dbef,0xff9adcf0,0xff99dbef,0xff90d8ee,0xff82d3ec,0xff6acbe8,0xff53c3e5,0xff3dbbe1,0xff2db2da,0xff2ba2c5,0xff89674f, 1395 0xfd7a0505,0xff86575e,0xffa2ddef,0xffa7e1f2,0xffa8e2f3,0xffa7e1f2,0xff9fdef1,0xff92daef,0xff7bd3ec,0xff65cce9,0xff4ec5e6,0xff3dbde0,0xff3bafce,0xff997961,
1396 0xffc3531f,0xff9f481d,0xff6d361b,0xff342119,0xfe322119,0xf6512d1c,0xe34e2c1b,0xa8221c19,0x5e181818,0x24181818,0x21181818,0x3d181818,0x77181818,0xc52d1313, 1396 0xffcc652d,0xffad5a2a,0xff7e4728,0xff452f25,0xfe422f25,0xf6633d29,0xe3603c28,0xa8302925,0x5e242424,0x24242424,0x21242424,0x3d242424,0x77242424,0xc53d1e1e,
1397 0xfd770101,0xff780000,0xff750000,0xff710000,0xff6c0000,0xff778190,0xff87d5ed,0xff8bd7ed,0xff8cd7ed,0xff8bd7ed,0xff82d3ec,0xff70cde9,0xff58c5e5,0xff3ebbe1, 1397 0xfd880303,0xff890000,0xff860000,0xff820000,0xff7d0000,0xff88919f,0xff97dcf0,0xff9addf0,0xff9bddf0,0xff9addf0,0xff92daef,0xff81d5ed,0xff6acee9,0xff4fc5e6,
1398 0xff2cafd6,0xff289ec2,0xff2591b2,0xff586f6f,0xffc0521e,0xffd15920,0xffe16123,0xffed6625,0xffd55f25,0xff9a4921,0xff482a1c,0xd246291c,0x71181818,0x2f181818, 1398 0xff3cbbdd,0xff37accb,0xff34a0bd,0xff6a8080,0xffca642b,0xffd86b2e,0xffe67331,0xfff07834,0xffdc7134,0xffa85b2f,0xff5a3929,0xd2583829,0x71242424,0x2f242424,
1399 0x53181818,0x6c181818,0x99181818,0xcc181818,0xed3f0e0e,0xff780000,0xff740000,0xff6f0000,0xff690000,0xff6eadc4,0xff75cfea,0xff76cfea,0xff76cfea,0xff74ceea, 1399 0x53242424,0x6c242424,0x99242424,0xcc242424,0xed501717,0xff890000,0xff850000,0xff800000,0xff7a0000,0xff7fb9cd,0xff86d7ee,0xff87d7ee,0xff87d7ee,0xff85d6ee,
1400 0xff69cbe8,0xff55c4e5,0xff3abae1,0xff2ba9cf,0xff2696b8,0xff2287a5,0xff1f7b97,0xff326d7c,0xffb64f1e,0xffcb5821,0xffdb5f24,0xffe96628,0xfff36c2b,0xffa04c25, 1400 0xff7ad3ec,0xff67cde9,0xff4bc4e6,0xff3bb6d7,0xff35a4c3,0xff3097b2,0xff2d8ca5,0xff427e8d,0xffc1612b,0xffd36a2f,0xffe17133,0xffed7837,0xfff57d3b,0xffad5e34,
1401 0xf9512e1e,0xc1181818,0x7b181818,0x3a181818,0x9a181818,0xab181818,0xc3181818,0xdd181818,0xea181818,0xf6540808,0xff730000,0xff6e0000,0xff670000,0xff5ec3e1, 1401 0xf9633e2b,0xc1242424,0x7b242424,0x3a242424,0x9a242424,0xab242424,0xc3242424,0xdd242424,0xea242424,0xf6660f0f,0xff840000,0xff7f0000,0xff790000,0xff70cce6,
1402 0xff5ec7e6,0xff5bc6e6,0xff58c5e5,0xff51c2e4,0xff44bee2,0xff2eb6df,0xff289ec2,0xff2389a8,0xff1f7995,0xff1c6d86,0xff19657b,0xff1a6176,0xff8e401c,0xffc45723, 1402 0xff70d0ea,0xff6dcfea,0xff6acee9,0xff63cbe8,0xff56c8e7,0xff3ec1e4,0xff37accb,0xff3199b5,0xff2d8aa4,0xff297e96,0xff25778c,0xff277387,0xff9d5129,0xffcd6931,
1403 0xffd76028,0xffe6682a,0xffe0672c,0xff36241a,0xe7291f1a,0xcc181818,0x92181818,0x5e181818,0xd9593d1f,0xf48a5824,0xf1714a21,0xf0593d1f,0xf13e2e1c,0xf5542e1b, 1403 0xffdd7237,0xffea7a39,0xffe5793c,0xff473327,0xe7382d27,0xcc242424,0x92242424,0x5e242424,0xd96b4e2d,0xf49a6a33,0xf1825c2f,0xf06b4e2d,0xf14f3e29,0xf5663e28,
1404 0xfd5d0f07,0xfe54160a,0xff461c0c,0xff47a6c1,0xff44bee2,0xff3dbbe1,0xff34b8e0,0xff2db1d9,0xff29a3c7,0xff248fb0,0xff1f7a96,0xff1b6981,0xff175c71,0xff155568, 1404 0xfd6f190d,0xfe662212,0xff582914,0xff59b3cb,0xff56c8e7,0xff4ec5e6,0xff45c3e5,0xff3dbddf,0xff38b0d0,0xff339ebc,0xff2d8ba4,0xff287a91,0xff236e82,0xff20677a,
1405 0xff144f61,0xff154756,0xff221712,0xff231913,0xff60321c,0xffa54e25,0xff6c3921,0xf64f2e1e,0xed181818,0xe1181818,0xbd181818,0x93181818,0xbd181818,0xe5553a1e, 1405 0xff1f6173,0xff205968,0xff30231d,0xff31251e,0xff724229,0xffb26034,0xff7d4a2f,0xf6613e2b,0xed242424,0xe1242424,0xbd242424,0x93242424,0xbd242424,0xe5674b2b,
1406 0xffa86927,0xffaa6a27,0xffaa6a27,0xffaa6a27,0xffab6124,0xff5c3714,0xff462c10,0xff38808e,0xff2db2da,0xff2ba8ce,0xff289ec1,0xff2591b2,0xff20809d,0xff1c6d86, 1406 0xffb57a36,0xffb67b36,0xffb67b36,0xffb67b36,0xffb77333,0xff6e481f,0xff583c1a,0xff49909d,0xff3dbde0,0xff3bb5d6,0xff37accb,0xff34a0bd,0xff2e90ab,0xff297e96,
1407 0xff175b70,0xff134d5e,0xff114554,0xff10404f,0xff10404e,0xff0f2f38,0xff101010,0xff131312,0xff271b16,0xfe5e2f19,0xff9a5521,0xffc2812e,0xffd09936,0xfeca9435, 1407 0xff236d81,0xff1e5f70,0xff1b5766,0xff1a5161,0xff1a5160,0xff193f49,0xff1a1a1a,0xff1e1e1d,0xff362822,0xfe703f25,0xffa8672f,0xffcb913e,0xffd7a747,0xfed2a346,
1408 0xed926d2c,0xbc4b3c20,0x93181818,0xbc181818,0xe24a341d,0xfea66827,0xffaa6a27,0xffaa6a27,0xffaa6a27,0xffae6927,0xff8f4f1d,0xff39524d,0xff289dc0,0xff2593b4, 1408 0xeda17e3c,0xbc5d4d2e,0x93242424,0xbc242424,0xe25c452a,0xfeb37a36,0xffb67b36,0xffb67b36,0xffb67b36,0xffba7a36,0xff9e612a,0xff4a645f,0xff37abca,0xff34a2bf,
1409 0xff2286a4,0xff1e7893,0xff1a677e,0xff165669,0xff124656,0xff0f3a47,0xff0d3541,0xff0d333e,0xff0d3540,0xff151a1e,0xff4d2211,0xff91501e,0xffc1802d,0xffd09936, 1409 0xff3096b1,0xff2b89a2,0xff27798e,0xff22687a,0xff1d5868,0xff194b59,0xff164652,0xff16434f,0xff164651,0xff20272b,0xff5f301b,0xffa0622b,0xffcb903d,0xffd7a747,
1410 0xffd09936,0xffc5822e,0xf26d5426,0xd926221a,0xb5181818,0x91181818,0x57181818,0x8a181818,0xbc181818,0xde402f1c,0xfda36626,0xffaa6a27,0xffaa6a27,0xffaa6a27, 1410 0xffd7a747,0xffce923e,0xf27e6635,0xd9353027,0xb5242424,0x91242424,0x57242424,0x8a242424,0xbc242424,0xde513f29,0xfdb07835,0xffb67b36,0xffb67b36,0xffb67b36,
1411 0xffaa6a27,0xffaf6425,0xff536157,0xff21829f,0xff1d748e,0xff19647a,0xff155466,0xff114453,0xff0e3743,0xff0c2e39,0xff1b2730,0xff502f23,0xff8f5120,0xffbe802e, 1411 0xffb67b36,0xffbb7634,0xff657369,0xff2f92ad,0xff2a859d,0xff25768b,0xff206678,0xff1b5665,0xff174854,0xff143e4a,0xff283640,0xff623f31,0xff9e632e,0xffc8903e,
1412 0xffd09936,0xffd09936,0xffce9635,0xffb06825,0xff75290f,0xff3c0101,0xc9181818,0xa3181818,0x76181818,0x53181818,0x28181818,0x52181818,0x8c181818,0xbe181818, 1412 0xffd7a747,0xffd7a747,0xffd6a446,0xffbc7a34,0xff863819,0xff4d0303,0xc9242424,0xa3242424,0x76242424,0x53242424,0x28242424,0x52242424,0x8c242424,0xbe242424,
1413 0xdf37291b,0xffa26525,0xffaa6a27,0xffaa6a27,0xffaa6a27,0xffaa6a27,0xffad6a27,0xff976134,0xff1e6478,0xff155568,0xff144555,0xff272a33,0xff5a2b1e,0xff965020, 1413 0xdf483828,0xffaf7734,0xffb67b36,0xffb67b36,0xffb67b36,0xffb67b36,0xffb97b36,0xffa57345,0xff2b7689,0xff20677a,0xff1f5767,0xff363943,0xff6c3b2b,0xffa4622e,
1414 0xffbf802d,0xffd09936,0xffd09936,0xffd09936,0xffc38930,0xff8a4c1b,0xff3f1006,0xff310000,0xff390101,0xff400202,0x9b191919,0x6a181818,0x40181818,0x25181818, 1414 0xffc9903d,0xffd7a747,0xffd7a747,0xffd7a747,0xffcc9940,0xff9a5e28,0xff501a0c,0xff410000,0xff4a0303,0xff510505,0x9b252525,0x6a242424,0x40242424,0x25242424,
1415 0x10181818,0x29181818,0x56181818,0x93181818,0xc5191919,0xff6c4019,0xff82511e,0xff88551f,0xff905a21,0xffa26327,0xffb66e2e,0xffb26b29,0xffb36727,0xff6a2b1b, 1415 0x10242424,0x29242424,0x56242424,0x93242424,0xc5252525,0xff7d5125,0xff92632b,0xff98672d,0xff9f6c2f,0xffaf7536,0xffc17f3e,0xffbd7c38,0xffbe7936,0xff7b3b28,
1416 0xff9c4f1e,0xffc0802d,0xffd09936,0xffd09936,0xffd09936,0xffd09936,0xffa4732a,0xff593515,0xff2a0403,0xff320000,0xff3d0000,0xff490000,0xff510101,0xff550707, 1416 0xffaa612b,0xffca903d,0xffd7a747,0xffd7a747,0xffd7a747,0xffd7a747,0xffb18439,0xff6b4620,0xff390806,0xff420000,0xff4e0000,0xff5b0000,0xff630303,0xff670d0d,
1417 0x7b171717,0x4a181818,0x26181818,0x12181818,0x8181818,0x15181818,0x33181818,0x65181818,0x9d181818,0xffc86637,0xff9e562b,0xff98552b,0xff894f28,0xff7f4b25, 1417 0x7b232323,0x4a242424,0x26242424,0x12242424,0x8242424,0x15242424,0x33242424,0x65242424,0x9d242424,0xffd17848,0xffac683b,0xffa6673b,0xff996137,0xff8f5d34,
1418 0xff7c4a24,0xffb9693d,0xfff77f4a,0xffa04e1d,0xffd09936,0xffd09936,0xffd09936,0xffc48e32,0xff81561f,0xff3a1b0d,0xff230909,0xff2d0606,0xff3c0202,0xff4a0000, 1418 0xff8d5c33,0xffc47a4e,0xfff88f5c,0xffad602a,0xffd7a747,0xffd7a747,0xffd7a747,0xffcd9d42,0xff91682d,0xff4b2816,0xff311010,0xff3d0c0c,0xff4d0505,0xff5c0000,
1419 0xff580000,0xff660101,0xff6a0707,0xff680f0f,0x6d171717,0x3f181818,0x1f181818,0xd181818,0x5181818,0xf181818,0x23181818,0x49181818,0x7d181818,0xffd66d3e, 1419 0xff6a0000,0xff780303,0xff7b0d0d,0xff7a1919,0x6d232323,0x3f242424,0x1f242424,0xd242424,0x5242424,0xf242424,0x23242424,0x49242424,0x7d242424,0xffdd7e4f,
1420 0xffef7c49,0xfffc8853,0xffff8e5c,0xfffe9261,0xfffd9262,0xfffb9061,0xfff88c5b,0xff460202,0xff7f4d1c,0xffac792b,0xff653a15,0xff2e0502,0xff2c0202,0xff300606, 1420 0xfff28d5b,0xfffd9865,0xffff9d6e,0xfffea173,0xfffda174,0xfffc9f73,0xfff99b6d,0xff580505,0xff8f5f29,0xffb88a3b,0xff774b20,0xff3e0a05,0xff3c0505,0xff400c0c,
1421 0xff320909,0xff400606,0xff550202,0xff670000,0xff770101,0xff7f0808,0xff7f1010,0xff761616,0x6a181818,0x3d181818,0x1e181818,0xd181818,0x4181818,0xd181818, 1421 0xff421010,0xff510c0c,0xff670505,0xff790000,0xff880303,0xff8f0f0f,0xff8f1a1a,0xff872222,0x6a242424,0x3d242424,0x1e242424,0xd242424,0x4242424,0xd242424,
1422 0x1e181818,0x3f181818,0x6c181818,0xffd16c3f,0xffed7d4b,0xfffb8956,0xffff915f,0xffff9666,0xfffe9769,0xfffb9567,0xfff88f61,0xff3a0202,0xff360101,0xff350000, 1422 0x1e242424,0x3f242424,0x6c242424,0xffd87d50,0xfff08d5d,0xfffc9968,0xffffa071,0xffffa478,0xfffea57a,0xfffca479,0xfff99e73,0xff4b0505,0xff470303,0xff460000,
1423 0xff370000,0xff3c0000,0xff420202,0xff440606,0xff420909,0xff560606,0xff710202,0xff840303,0xff8f0b0b,0xff951212,0xff8d1818,0xff7d1d1d,0x68181818,0x3c181818, 1423 0xff480000,0xff4d0000,0xff530505,0xff560c0c,0xff531010,0xff680c0c,0xff820505,0xff940606,0xff9e1313,0xffa41d1d,0xff9c2424,0xff8d2a2a,0x68242424,0x3c242424,
1424 0x1d181818,0xc181818,0x4181818,0xc181818,0x1d181818,0x3b181818,0x66181818,0xffcb6b3f,0xffeb7d4b,0xfffb8b59,0xffff9362,0xffff9869,0xfffd996c,0xfffa976c, 1424 0x1d242424,0xc242424,0x4242424,0xc242424,0x1d242424,0x3b242424,0x66242424,0xffd37c50,0xffee8d5d,0xfffc9a6b,0xffffa274,0xffffa67a,0xfffda77d,0xfffba57d,
1425 0xfff79366,0xff470303,0xff480101,0xff4c0101,0xff500000,0xff570000,0xff5c0202,0xff5a0606,0xff550909,0xff6c0606,0xff890606,0xff990d0d,0xffa11414,0xffa31c1c, 1425 0xfff8a278,0xff590606,0xff5a0303,0xff5e0303,0xff620000,0xff690000,0xff6e0505,0xff6c0c0c,0xff671010,0xff7d0c0c,0xff990c0c,0xffa71616,0xffae1f1f,0xffb02929,
1426 0xff942121,0xff7c2121,0x68181818,0x3c181818,0x1d181818,0xc181818,0x4181818,0xb181818,0x1b181818,0x39181818,0x63181818,0xffc7693f,0xffe97c4c,0xfffb8b59, 1426 0xffa32f2f,0xff8d2f2f,0x68242424,0x3c242424,0x1d242424,0xc242424,0x4242424,0xb242424,0x1b242424,0x39242424,0x63242424,0xffd07a50,0xffed8d5e,0xfffc9a6b,
1427 0xffff9464,0xffff996b,0xfffd9b6e,0xfffa996e,0xfff69469,0xff530505,0xff5b0202,0xff630101,0xff6b0000,0xff720000,0xff760202,0xff6e0606,0xff650a0a,0xff7b0a0a, 1427 0xffffa376,0xffffa77c,0xfffda97f,0xfffba77f,0xfff8a37a,0xff650a0a,0xff6d0505,0xff750303,0xff7c0000,0xff830000,0xff870505,0xff7f0c0c,0xff771212,0xff8c1212,
1428 0xff981010,0xffa81818,0xffae2020,0xffab2323,0xff982626,0xff792525,0x67181818,0x3b181818,0x1d181818,0xc181818,0x3181818,0xa181818,0x19181818,0x35181818, 1428 0xffa61a1a,0xffb52424,0xffba2e2e,0xffb73131,0xffa63535,0xff8a3434,0x67242424,0x3b242424,0x1d242424,0xc242424,0x3242424,0xa242424,0x19242424,0x35242424,
1429 0x5d181818,0xffc0673e,0xffe57b4b,0xfffa8a59,0xfffe9363,0xffff996b,0xfffd9b6f,0xfff99a6f,0xfff5966a,0xff5d0606,0xff6b0303,0xff780101,0xff800000,0xff890000, 1429 0x5d242424,0xffca794f,0xffe98c5d,0xfffb9a6b,0xfffea275,0xffffa77c,0xfffda980,0xfffaa880,0xfff7a47b,0xff6f0c0c,0xff7c0606,0xff890303,0xff900000,0xff990000,
1430 0xff8a0202,0xff7d0909,0xff6f1010,0xff861313,0xffa21b1b,0xffb12323,0xffb42929,0xffb02d2d,0xff972c2c,0xff752727,0x65181818,0x3a181818,0x1c181818,0xc181818, 1430 0xff9a0505,0xff8d1010,0xff801a1a,0xff961e1e,0xffaf2828,0xffbd3131,0xffbf3838,0xffbc3d3d,0xffa53c3c,0xff863636,0x65242424,0x3a242424,0x1c242424,0xc242424,
1431 0x3181818,0x9181818,0x16181818,0x2e181818,0x52181818,0xffb8623c,0xffdc7749,0xfff58756,0xfffd9161,0xfffe996a,0xfffc9b6e,0xfff8996f,0xfff4956b,0xff610808, 1431 0x3242424,0x9242424,0x16242424,0x2e242424,0x52242424,0xffc3744d,0xffe2885b,0xfff79768,0xfffda073,0xfffea77b,0xfffda97f,0xfff9a780,0xfff6a47c,0xff730f0f,
1432 0xff750404,0xff880101,0xff920000,0xff9a0000,0xff980505,0xff871111,0xff761717,0xff8d1c1c,0xffaa2626,0xffb62e2e,0xffb83333,0xffb03434,0xff953030,0xff6e2828, 1432 0xff860808,0xff980303,0xffa10000,0xffa80000,0xffa60a0a,0xff971b1b,0xff872323,0xff9c2929,0xffb63535,0xffc13e3e,0xffc34343,0xffbc4545,0xffa44040,0xff7f3737,
1433 0x60181818,0x37181818,0x1b181818,0xb181818,0x2181818,0x7181818,0x11181818,0x25181818,0x43181818,0xc69e5d40,0xffcb6f46,0xffe98153,0xfff88d5e,0xfffd9667, 1433 0x60242424,0x37242424,0x1b242424,0xb242424,0x2242424,0x7242424,0x11242424,0x25242424,0x43242424,0xc6ac6f51,0xffd38058,0xffed9165,0xfff99c70,0xfffda479,
1434 0xfffb986c,0xfff7986d,0xfff39469,0xff610909,0xff7b0404,0xff920101,0xff9f0000,0xffa60404,0xffa21111,0xff8c1b1b,0xff791f1f,0xff912727,0xffad3131,0xffb73636, 1434 0xfffca67d,0xfff8a67e,0xfff5a37a,0xff731010,0xff8c0808,0xffa10303,0xffad0000,0xffb30808,0xffaf1b1b,0xff9b2828,0xff8a2d2d,0xffa03636,0xffb94141,0xffc24747,
1435 0xffb53a3a,0xffa93838,0xff8a3131,0xff652929,0x57181818,0x31181818,0x18181818,0xa181818,0x1181818,0x5181818,0xc181818,0x1a181818,0x32181818,0x5a363636, 1435 0xffc04b4b,0xffb64949,0xff9a4141,0xff773838,0x57242424,0x31242424,0x18242424,0xa242424,0x1242424,0x5242424,0xc242424,0x1a242424,0x32242424,0x5a474747,
1436 0xc59b6247,0xfed4774e,0xffec8759,0xfff99162,0xfffb9669,0xfff59569,0xfff09267,0xff600a0a,0xff800505,0xff9b0101,0xffa90404,0xffad1010,0xffa71e1e,0xff902424, 1436 0xc5a97459,0xfedb8860,0xffef976b,0xfffaa074,0xfffca47a,0xfff7a47a,0xfff3a179,0xff721212,0xff900a0a,0xffa90303,0xffb60808,0xffb91a1a,0xffb42b2b,0xff9f3333,
1437 0xff7b2828,0xff912f2f,0xffa73838,0xffab3d3d,0xffa03b3b,0xff8d3737,0xff712e2e,0xff582727,0x48181818,0x29181818,0x13181818,0x8181818,0x1181818,0x3181818, 1437 0xff8c3737,0xffa03f3f,0xffb44949,0xffb74e4e,0xffad4c4c,0xff9c4848,0xff823e3e,0xff6a3636,0x48242424,0x29242424,0x13242424,0x8242424,0x1242424,0x3242424,
1438 0x7181818,0x11181818,0x21181818,0x39181818,0x61373737,0xc19c6851,0xfdd97c54,0xffed895c,0xfff69063,0xfff39165,0xffee8e63,0xff600b0b,0xff830505,0xffa10404, 1438 0x7242424,0x11242424,0x21242424,0x39242424,0x61484848,0xc1aa7a63,0xfddf8d66,0xfff0996e,0xfff89f75,0xfff5a077,0xfff19d75,0xff721313,0xff930a0a,0xffae0808,
1439 0xffad1010,0xffb11e1e,0xffa92929,0xff8f2d2d,0xff762d2d,0xff853333,0xff903939,0xff883838,0xff773333,0xfb682f2f,0xd8632c2c,0x834d2424,0x36181818,0x1e181818, 1439 0xffb91a1a,0xffbd2b2b,0xffb63838,0xff9e3d3d,0xff873d3d,0xff954343,0xff9f4a4a,0xff984949,0xff884343,0xfb7a3f3f,0xd8753c3c,0x835f3333,0x36242424,0x1e242424,
1440 0xe181818,0x6181818,0xffffff,0x1181818,0x4181818,0xa181818,0x14181818,0x24181818,0x3b181818,0x62373737,0xb9966a55,0xfed97d54,0xffeb885c,0xffed8b5f, 1440 0xe242424,0x6242424,0xffffff,0x1242424,0x4242424,0xa242424,0x14242424,0x24242424,0x3b242424,0x62484848,0xb9a47b67,0xfedf8d66,0xffee986e,0xfff09a71,
1441 0xffe9895e,0xff5e0b0b,0xff850707,0xffa31010,0xffad1e1e,0xffaa2929,0xff9c3030,0xff7e3030,0xff622c2c,0xff673030,0xfe683030,0xee673131,0xba592b2b,0x6a241c1c, 1441 0xffed9970,0xff701313,0xff950d0d,0xffb01a1a,0xffb92b2b,0xffb63838,0xffaa4040,0xff8e4040,0xff743c3c,0xff794040,0xfe7a4040,0xee794141,0xba6b3b3b,0x6a332929,
1442 0x4d181818,0x37181818,0x23181818,0x13181818,0x9181818,0x4181818,0xffffff,0x1181818,0x2181818,0x5181818,0xa181818,0x15181818,0x24181818,0x3a181818, 1442 0x4d242424,0x37242424,0x23242424,0x13242424,0x9242424,0x4242424,0xffffff,0x1242424,0x2242424,0x5242424,0xa242424,0x15242424,0x24242424,0x3a242424,
1443 0x5f333333,0xb3946957,0xfcd87c53,0xffe18256,0xffe18256,0xff5b0d0d,0xff801010,0xff981b1b,0xff9b2727,0xff902e2e,0xff7b3030,0xff5e2c2c,0xfb4d2929,0xd9582c2c, 1443 0x5f434343,0xb3a37a69,0xfcde8d65,0xffe69268,0xffe69268,0xff6d1616,0xff901a1a,0xffa62828,0xffa93636,0xff9f3e3e,0xff8c4040,0xff703c3c,0xfb5f3838,0xd96a3c3c,
1444 0x8d3d2323,0x5e181818,0x4d181818,0x3d181818,0x2d181818,0x1f181818,0x14181818,0xa181818,0x5181818,0x2181818,0xffffff,0xffffff,0x1181818,0x2181818, 1444 0x8d4e3131,0x5e242424,0x4d242424,0x3d242424,0x2d242424,0x1f242424,0x14242424,0xa242424,0x5242424,0x2242424,0xffffff,0xffffff,0x1242424,0x2242424,
1445 0x5181818,0xb181818,0x14181818,0x23181818,0x38181818,0x5a303030,0xa9896554,0xfacf754f,0xffd7794f,0xff511212,0xff6b1818,0xff792121,0xff732727,0xfe652a2a, 1445 0x5242424,0xb242424,0x14242424,0x23242424,0x38242424,0x5a404040,0xa9997766,0xfad78661,0xffdd8a61,0xff631d1d,0xff7c2424,0xff8a2f2f,0xff843636,0xfe773939,
1446 0xe8602b2b,0xb44d2828,0x691d1919,0x55181818,0x46181818,0x38181818,0x2b181818,0x21181818,0x17181818,0xf181818,0x9181818,0x5181818,0x2181818,0x1181818, 1446 0xe8723b3b,0xb45f3737,0x692a2525,0x55242424,0x46242424,0x38242424,0x2b242424,0x21242424,0x17242424,0xf242424,0x9242424,0x5242424,0x2242424,0x1242424,
1447 0xffffff,0xffffff,0xffffff,0x1181818,0x2181818,0x5181818,0xa181818,0x14181818,0x22181818,0x36181818,0x552a2a2a,0x9a836251,0xf7ca7147,0xff441616, 1447 0xffffff,0xffffff,0xffffff,0x1242424,0x2242424,0x5242424,0xa242424,0x14242424,0x22242424,0x36242424,0x55393939,0x9a937463,0xf7d28259,0xff562222,
1448 0xff4e1b1b,0xf65c2121,0xca5b2525,0x7e321e1e,0x5b181818,0x4c181818,0x3d181818,0x31181818,0x26181818,0x1d181818,0x15181818,0xf181818,0xa181818,0x6181818, 1448 0xff602828,0xf66e2f2f,0xca6d3434,0x7e422b2b,0x5b242424,0x4c242424,0x3d242424,0x31242424,0x26242424,0x1d242424,0x15242424,0xf242424,0xa242424,0x6242424,
1449 0x4181818,0x2181818,0x1181818,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1181818,0x2181818,0x4181818,0xa181818,0x12181818,0x20181818, 1449 0x4242424,0x2242424,0x1242424,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1242424,0x2242424,0x4242424,0xa242424,0x12242424,0x20242424,
1450 0x31181818,0x48272727,0xa782493f,0xdb571818,0x974b1c1c,0x5a181818,0x4f181818,0x42181818,0x35181818,0x2a181818,0x20181818,0x18181818,0x12181818,0xd181818, 1450 0x31242424,0x48363636,0xa7925b50,0xdb692424,0x975d2929,0x5a242424,0x4f242424,0x42242424,0x35242424,0x2a242424,0x20242424,0x18242424,0x12242424,0xd242424,
1451 0x9181818,0x6181818,0x4181818,0x2181818,0x1181818,0x1181818,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1181818, 1451 0x9242424,0x6242424,0x4242424,0x2242424,0x1242424,0x1242424,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1242424,
1452 0x2181818,0x4181818,0x9181818,0x10181818,0x1b181818,0x27181818,0x34272727,0x38181818,0x39181818,0x34181818,0x2c181818,0x23181818,0x1b181818,0x14181818, 1452 0x2242424,0x4242424,0x9242424,0x10242424,0x1b242424,0x27242424,0x34363636,0x38242424,0x39242424,0x34242424,0x2c242424,0x23242424,0x1b242424,0x14242424,
1453 0xe181818,0xa181818,0x7181818,0x5181818,0x3181818,0x2181818,0x1181818,0x1181818,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 1453 0xe242424,0xa242424,0x7242424,0x5242424,0x3242424,0x2242424,0x1242424,0x1242424,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
1454 0xffffff,0xffffff,0xffffff,0xffffff,0x1181818,0x2181818,0x4181818,0x7181818,0xd181818,0x14181818,0x19181818,0x1d181818,0x1d181818,0x1a181818, 1454 0xffffff,0xffffff,0xffffff,0xffffff,0x1242424,0x2242424,0x4242424,0x7242424,0xd242424,0x14242424,0x19242424,0x1d242424,0x1d242424,0x1a242424,
1455 0x15181818,0x10181818,0xc181818,0x8181818,0x5181818,0x4181818,0x2181818,0x1181818,0x1181818,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 1455 0x15242424,0x10242424,0xc242424,0x8242424,0x5242424,0x4242424,0x2242424,0x1242424,0x1242424,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
1456 0xffffff,0xffffff 1456 0xffffff,0xffffff
1457}; 1457};
1458 1458
1459static const QRgb Language_data[] = { 1459static const QRgb Language_data[] = {
1460 0x1000000,0x4000000,0xb000000,0x17000000,0x27000000,0x39000000,0x49000000,0x58000000,0x805f3131,0x90773939,0x90763434,0x73461b1b,0x50000000,0x3d000000, 1460 0x1000000,0x4000000,0xb000000,0x17000000,0x27000000,0x39000000,0x49000000,0x58000000,0x805f3131,0x90773939,0x90763434,0x73461b1b,0x50000000,0x3d000000,
1461 0x28000000,0x16000000,0xb000000,0x7000000,0xb000000,0x18000000,0x26000000,0x31000000,0x34000000,0x2e000000,0x21000000,0x13000000,0x8000000,0x2000000, 1461 0x28000000,0x16000000,0xb000000,0x7000000,0xb000000,0x18000000,0x26000000,0x31000000,0x34000000,0x2e000000,0x21000000,0x13000000,0x8000000,0x2000000,
1462 0xffffff,0xffffff,0xffffff,0xffffff,0x4000000,0xd000000,0x1d000000,0x32000000,0x4b000000,0x8c7b4848,0xc8c17272,0xfffc8b8b,0xfffc7576,0xfffb6666, 1462 0xffffff,0xffffff,0xffffff,0xffffff,0x4000000,0xd000000,0x1d000000,0x32000000,0x4b000000,0x8c7b4848,0xc8c17272,0xfffc8b8b,0xfffc7576,0xfffb6666,
1463 0xfffb5e5f,0xfffb5859,0xefe94849,0xa6981a1b,0x4c000000,0x2d000000,0x17000000,0x10000000,0x18000000,0x2b000000,0x82a66d6f,0xdfe98d8f,0xfffb777a,0xc5d83c40, 1463 0xfffb5e5f,0xfffb5859,0xefe94849,0xa6981a1b,0x4c000000,0x2d000000,0x17000000,0x10000000,0x18000000,0x2b000000,0x82a66d6f,0xdfe98d8f,0xfffb777a,0xc5d83c40,
@@ -1916,38 +1916,38 @@ static const QRgb NetHack_data[] = {
1916 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3e000000,0x3e000000, 1916 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3e000000,0x3e000000,
1917 0x3e000000,0x3e000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000, 1917 0x3e000000,0x3e000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
1918 0x18000000,0xf000000 1918 0x18000000,0xf000000
1919}; 1919};
1920 1920
1921static const QRgb OKButton_data[] = { 1921static const QRgb OKButton_data[] = {
1922 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 1922 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
1923 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 1923 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
1924 0xffffff,0xffffff,0xffffff,0xffffff,0x3ed5d5d5,0x93d4d4d4,0xd5d9d9d9,0xfed8d8d8,0xf8d2d2d2,0xeed5d5d5,0xe1d1d1d1,0xdcd3d3d3,0xe1d3d3d3,0xe6d4d4d4, 1924 0xffffff,0xffffff,0xffffff,0xffffff,0x3edcdcdc,0x93dbdbdb,0xd5dfdfdf,0xfededede,0xf8d9d9d9,0xeedcdcdc,0xe1d8d8d8,0xdcdadada,0xe1dadada,0xe6dbdbdb,
1925 0xecd6d6d6,0xf1d5d5d5,0xf6d5d5d5,0xfbd6d6d6,0xfed7d7d7,0xffd8d8d8,0xffd6d6d6,0xd9cacaca,0xa1bebebe,0x518f8f8f,0xc000000,0x3000000,0xffffff,0xffffff, 1925 0xecdddddd,0xf1dcdcdc,0xf6dcdcdc,0xfbdddddd,0xfedddddd,0xffdedede,0xffdddddd,0xd9d2d2d2,0xa1c8c8c8,0x519e9e9e,0xc000000,0x3000000,0xffffff,0xffffff,
1926 0xffffff,0xffffff,0xffffff,0x5fd5d5d5,0xdbdddddd,0xffdcdcdc,0xffcbcbcb,0xffc5c5c5,0xffc3c3c3,0xffcdcdcd,0xffc7c7c7,0xffc4c4c4,0xffc5c5c5,0xffc5c5c5, 1926 0xffffff,0xffffff,0xffffff,0x5fdcdcdc,0xdbe3e3e3,0xffe2e2e2,0xffd3d3d3,0xffcecece,0xffcccccc,0xffd5d5d5,0xffd0d0d0,0xffcdcdcd,0xffcecece,0xffcecece,
1927 0xffc4c4c4,0xffc3c3c3,0xffc4c4c4,0xffc5c5c5,0xffc8c8c8,0xffcacaca,0xffcbcbcb,0xffcccccc,0xffd5d5d5,0xe7bdbdbd,0x847e7e7e,0x18000000,0x4000000,0xffffff, 1927 0xffcdcdcd,0xffcccccc,0xffcdcdcd,0xffcecece,0xffd1d1d1,0xffd2d2d2,0xffd3d3d3,0xffd4d4d4,0xffdcdcdc,0xe7c7c7c7,0x848e8e8e,0x18000000,0x4000000,0xffffff,
1928 0xffffff,0xffffff,0x3ed6d5d5,0xdbd3d3d3,0xffd1d1d1,0xffc0bfbf,0xffbcbcbc,0xffb7b6b7,0xffb9b8b9,0xff989898,0xff313131,0xff323232,0xff555555,0xffbababa, 1928 0xffffff,0xffffff,0x3edddcdc,0xdbdadada,0xffd8d8d8,0xffcac9c9,0xffc6c6c6,0xffc2c1c2,0xffc4c3c4,0xffa6a6a6,0xff414141,0xff424242,0xff676767,0xffc4c4c4,
1929 0xff969696,0xff323232,0xff989798,0xffc1c0c1,0xff797879,0xffa6a5a6,0xffcecdce,0xffcecdce,0xffcbcbcb,0xffbbbcbb,0xed939293,0x76484848,0x18000000,0x3000000, 1929 0xffa4a4a4,0xff424242,0xffa6a5a6,0xffcbcacb,0xff8a898a,0xffb3b2b3,0xffd6d5d6,0xffd6d5d6,0xffd3d3d3,0xffc5c6c5,0xeda2a1a2,0x765a5a5a,0x18000000,0x3000000,
1930 0xffffff,0xffffff,0x93cccdcc,0xffc8c7c7,0xffb0b0b0,0xffaeadad,0xffb2b2b2,0xffb0b0b0,0xffafaeae,0xff000000,0xff5b5c5b,0xffb2b1b1,0xff000000,0xff606060, 1930 0xffffff,0xffffff,0x93d4d5d4,0xffd1d0d0,0xffbcbcbc,0xffbab9b9,0xffbdbdbd,0xffbcbcbc,0xffbbbaba,0xff000000,0xff6d6e6d,0xffbdbdbd,0xff000000,0xff727272,
1931 0xff828282,0xff000000,0xff878787,0xff6a6a6a,0xff1a1a1a,0xffa4a4a4,0xffc8c8c8,0xffc9c8c8,0xffc7c7c7,0xffbdbebd,0xffa6a5a5,0xc9505050,0x3d000000,0xc000000, 1931 0xff929292,0xff000000,0xff979797,0xff7b7b7b,0xff272727,0xffb1b1b1,0xffd1d1d1,0xffd1d1d1,0xffd0d0d0,0xffc7c8c7,0xffb3b2b2,0xc9626262,0x3d000000,0xc000000,
1932 0xffffff,0xffffff,0xd5c1c1c1,0xffacacac,0xff999999,0xffa1a1a1,0xff9b9a9a,0xffa4a4a4,0xff989898,0xff000000,0xff565656,0xffa9a9a9,0xff000000,0xff565656, 1932 0xffffff,0xffffff,0xd5cbcbcb,0xffb8b8b8,0xffa7a7a7,0xffaeaeae,0xffa9a8a8,0xffb1b1b1,0xffa6a6a6,0xff000000,0xff686868,0xffb6b6b6,0xff000000,0xff686868,
1933 0xff757575,0xff000000,0xff474747,0xff191919,0xff8e8e8e,0xffbababa,0xffb5b5b5,0xffb0b0b0,0xffbcbcbc,0xffbbbbbb,0xffafafaf,0xf0545454,0x61000000,0x1a000000, 1933 0xff868686,0xff000000,0xff595959,0xff252525,0xff9d9d9d,0xffc4c4c4,0xffc0c0c0,0xffbcbcbc,0xffc6c6c6,0xffc5c5c5,0xffbbbbbb,0xf0666666,0x61000000,0x1a000000,
1934 0xffffff,0xffffff,0xfab3b3b3,0xff969696,0xff878787,0xff9a9a9a,0xff919191,0xff8c8c8c,0xff929292,0xff000000,0xff515151,0xff959595,0xff000000,0xff4d4d4d, 1934 0xffffff,0xffffff,0xfabebebe,0xffa4a4a4,0xff979797,0xffa8a8a8,0xffa0a0a0,0xff9b9b9b,0xffa1a1a1,0xff000000,0xff636363,0xffa4a4a4,0xff000000,0xff5f5f5f,
1935 0xff686868,0xff000000,0xff000000,0xff909090,0xffafafaf,0xff9f9f9f,0xff999999,0xffa5a5a5,0xffb0b0b0,0xffb7b7b7,0xff9f9f9f,0xfd505050,0x7c000000,0x25000000, 1935 0xff7a7a7a,0xff000000,0xff000000,0xff9f9f9f,0xffbbbbbb,0xffadadad,0xffa7a7a7,0xffb2b2b2,0xffbcbcbc,0xffc2c2c2,0xffadadad,0xfd626262,0x7c000000,0x25000000,
1936 0xffffff,0xffffff,0xd8a0a0a0,0xff888888,0xff858585,0xff7a7a7a,0xff838383,0xff8a8a8a,0xff838383,0xff000000,0xff464646,0xff878787,0xff000000,0xff494949, 1936 0xffffff,0xffffff,0xd8adadad,0xff989898,0xff959595,0xff8b8b8b,0xff939393,0xff9a9a9a,0xff939393,0xff000000,0xff585858,0xff979797,0xff000000,0xff5b5b5b,
1937 0xff636363,0xff000000,0xff1e1e1e,0xff212121,0xff9b9b9b,0xffa6a6a6,0xff9f9f9f,0xffa0a0a0,0xffacacac,0xffa7a7a7,0xff858585,0xf2393939,0x85000000,0x2b000000, 1937 0xff757575,0xff000000,0xff2b2b2b,0xff2f2f2f,0xffa9a9a9,0xffb3b3b3,0xffadadad,0xffadadad,0xffb8b8b8,0xffb4b4b4,0xff959595,0xf24a4a4a,0x85000000,0x2b000000,
1938 0xffffff,0xffffff,0x9e818181,0xff848483,0xff757676,0xff7b7b7b,0xff707070,0xff777776,0xff797979,0xff000000,0xff434443,0xff737273,0xff000000,0xff3e3e3e, 1938 0xffffff,0xffffff,0x9e919191,0xff949493,0xff868787,0xff8c8c8c,0xff818181,0xff888887,0xff8a8a8a,0xff000000,0xff545654,0xff848384,0xff000000,0xff4f4f4f,
1939 0xff555554,0xff000000,0xff616160,0xff3d3d3c,0xff2c2c2c,0xff8f8f8f,0xffa1a1a1,0xffa5a5a5,0xff9e9e9e,0xff979897,0xff5e5d5e,0xdf282828,0x7c000000,0x25000000, 1939 0xff676766,0xff000000,0xff737372,0xff4e4e4d,0xff3c3c3c,0xff9e9e9e,0xffaeaeae,0xffb2b2b2,0xffacacac,0xffa5a6a5,0xff706f70,0xdf373737,0x7c000000,0x25000000,
1940 0xffffff,0xffffff,0x505b5b5b,0xe66a6a6a,0xff6c6c6c,0xff686868,0xff656666,0xff656565,0xff6c6d6c,0xff373737,0xff0d0d0d,0xff1c1c1c,0xff131414,0xff585959, 1940 0xffffff,0xffffff,0x506d6d6d,0xe67b7b7b,0xff7d7d7d,0xff7a7a7a,0xff777878,0xff777777,0xff7d7e7d,0xff484848,0xff161616,0xff292929,0xff1e1f1f,0xff6a6b6b,
1941 0xff4a4a4a,0xff000000,0xff4f4f4f,0xff727272,0xff373737,0xff6d6d6d,0xff979797,0xff989998,0xff878787,0xff666566,0xf5333333,0xbb101010,0x61000000,0x1a000000, 1941 0xff5c5c5c,0xff000000,0xff616161,0xff838383,0xff484848,0xff7e7e7e,0xffa5a5a5,0xffa6a7a6,0xff979797,0xff787778,0xf5434343,0xbb1a1a1a,0x61000000,0x1a000000,
1942 0xffffff,0xffffff,0xc000000,0x833c3c3c,0xec474747,0xff4c4b4b,0xff535352,0xff575757,0xff575657,0xff595859,0xff585857,0xff545453,0xff525251,0xff535352, 1942 0xffffff,0xffffff,0xc000000,0x834d4d4d,0xec595959,0xff5e5d5d,0xff656564,0xff696969,0xff696869,0xff6b6a6b,0xff6a6a69,0xff666665,0xff646463,0xff656564,
1943 0xff545454,0xff565656,0xff5a5a5a,0xff606060,0xff696969,0xff717171,0xff707070,0xff666566,0xff535253,0xf5323231,0xce161616,0x83000000,0x3d000000,0xc000000, 1943 0xff666666,0xff686868,0xff6c6c6c,0xff727272,0xff7a7a7a,0xff828282,0xff818181,0xff787778,0xff656465,0xf5424241,0xce222222,0x83000000,0x3d000000,0xc000000,
1944 0xffffff,0xffffff,0x3000000,0x18000000,0x751f1f1f,0xc8262626,0xef272727,0xff2e2e2e,0xfd282828,0xfa262626,0xf5242424,0xf3232323,0xf5262626,0xf7262626, 1944 0xffffff,0xffffff,0x3000000,0x18000000,0x752d2d2d,0xc8353535,0xef363636,0xff3e3e3e,0xfd373737,0xfa353535,0xf5333333,0xf3313131,0xf5353535,0xf7353535,
1945 0xf9282828,0xfa292929,0xfc2c2c2c,0xfe2d2d2d,0xff323232,0xff343434,0xff343434,0xf3292929,0xdf1d1d1d,0xbb0d0d0d,0x83000000,0x4b000000,0x18000000,0x3000000, 1945 0xf9373737,0xfa383838,0xfc3c3c3c,0xfe3d3d3d,0xff424242,0xff454545,0xff454545,0xf3383838,0xdf2a2a2a,0xbb161616,0x83000000,0x4b000000,0x18000000,0x3000000,
1946 0xffffff,0xffffff,0xffffff,0x4000000,0x18000000,0x3d000000,0x61000000,0x7c000000,0x8a000000,0x8b000000,0x87000000,0x82000000,0x81000000,0x82000000, 1946 0xffffff,0xffffff,0xffffff,0x4000000,0x18000000,0x3d000000,0x61000000,0x7c000000,0x8a000000,0x8b000000,0x87000000,0x82000000,0x81000000,0x82000000,
1947 0x84000000,0x87000000,0x89000000,0x8b000000,0x8e000000,0x8e000000,0x8f000000,0x8b000000,0x7c000000,0x61000000,0x3d000000,0x18000000,0x4000000,0xffffff, 1947 0x84000000,0x87000000,0x89000000,0x8b000000,0x8e000000,0x8e000000,0x8f000000,0x8b000000,0x7c000000,0x61000000,0x3d000000,0x18000000,0x4000000,0xffffff,
1948 0xffffff,0xffffff,0xffffff,0xffffff,0x3000000,0xc000000,0x1a000000,0x26000000,0x2d000000,0x2e000000,0x2b000000,0x29000000,0x28000000,0x29000000, 1948 0xffffff,0xffffff,0xffffff,0xffffff,0x3000000,0xc000000,0x1a000000,0x26000000,0x2d000000,0x2e000000,0x2b000000,0x29000000,0x28000000,0x29000000,
1949 0x2a000000,0x2b000000,0x2d000000,0x2e000000,0x2e000000,0x2f000000,0x30000000,0x2e000000,0x26000000,0x1a000000,0xc000000,0x3000000,0xffffff,0xffffff 1949 0x2a000000,0x2b000000,0x2d000000,0x2e000000,0x2e000000,0x2f000000,0x30000000,0x2e000000,0x26000000,0x1a000000,0xc000000,0x3000000,0xffffff,0xffffff
1950}; 1950};
1951 1951
1952static const QRgb Opera_data[] = { 1952static const QRgb Opera_data[] = {
1953 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000, 1953 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
@@ -2022,92 +2022,169 @@ static const QRgb Opera_data[] = {
2022 0x62000000,0x66000000,0x66000000,0x66000000,0x67000000,0x67000000,0x67000000,0x67000000,0x67000000,0x67000000,0x67000000,0x67000000,0x67000000,0x66000000, 2022 0x62000000,0x66000000,0x66000000,0x66000000,0x67000000,0x67000000,0x67000000,0x67000000,0x67000000,0x67000000,0x67000000,0x67000000,0x67000000,0x66000000,
2023 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000, 2023 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
2024 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000, 2024 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
2025 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000, 2025 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
2026 0x18000000,0xf000000 2026 0x18000000,0xf000000
2027}; 2027};
2028 2028
2029static const QRgb PPPConnect_data[] = { 2029static const QRgb PPPConnect_data[] = {
2030 0xffffff,0xffffff,0x1000000,0x4000000,0x7000000,0xc232615,0xd000000,0xd000000,0xb262a17,0x5000000,0x2000000,0x2000000,0x3000000,0x5000000, 2030 0xffffff,0xffffff,0x1000000,0x4000000,0x7000000,0xc313520,0xd000000,0xd000000,0xb353923,0x5000000,0x2000000,0x2000000,0x3000000,0x5000000,
2031 0x9000000,0xc000000,0xd000000,0xd000000,0xb000000,0x8000000,0x6000000,0x4000000,0x6000000,0xa111500,0xd000000,0xd000000,0xb0f1200,0x7000000, 2031 0x9000000,0xc000000,0xd000000,0xd000000,0xb000000,0x8000000,0x6000000,0x4000000,0x6000000,0xa1b2000,0xd000000,0xd000000,0xb191d00,0x7000000,
2032 0x4000000,0x1000000,0xffffff,0xffffff,0x1000000,0x6000000,0x13000000,0x34394119,0x76899742,0x5e626d2e,0x989cab4c,0x8a94a347,0x6984923e,0x48717d34, 2032 0x4000000,0x1000000,0xffffff,0xffffff,0x1000000,0x6000000,0x13000000,0x344a5225,0x7699a553,0x5e747e3e,0x98aab75e,0x8aa3b059,0x6994a14f,0x48828d45,
2033 0x26515928,0x12000000,0x12000000,0x1a000000,0x23000000,0x2b000000,0x2f000000,0x2e000000,0x29000000,0x21000000,0x1e000000,0x2a2a3106,0x3e4c5904,0x57647509, 2033 0x26636b37,0x12000000,0x12000000,0x1a000000,0x23000000,0x2b000000,0x2f000000,0x2e000000,0x29000000,0x21000000,0x1e000000,0x2a39410c,0x3e5e6b08,0x57768610,
2034 0x7373870b,0x7f7a900a,0x51445006,0x62667808,0x30282f05,0x13000000,0x6000000,0x1000000,0x7000000,0x324c5423,0xa99cab4e,0xe3b7c766,0xf2c1d170,0xf5c3d373, 2034 0x73849713,0x7f8b9f12,0x5156620c,0x6278890f,0x30373f0a,0x13000000,0x6000000,0x1000000,0x7000000,0x325e6631,0xa9aab760,0xe3c2d078,0xf2cbd881,0xf5ccda84,
2035 0xd8b2c25f,0xd7b3c360,0xd1b6c36d,0xc7b4c16b,0xa9abb960,0x5c757f48,0x3c11151e,0x622f4656,0x99446b82,0xc4517994,0xd8547e99,0xd3517c98,0xb949748f,0x873b5d75, 2035 0xd8bdcb71,0xd7becc72,0xd1c1cc7e,0xc7bfcb7c,0xa9b7c472,0x5c868f5a,0x3c1b202b,0x623f5868,0x99567c92,0xc4638aa3,0xd8668ea7,0xd3638da6,0xb95b859e,0x874c6f86,
2036 0x6f415730,0x967b9112,0xab8aa112,0xb68fa712,0xc293ad0e,0xc293ac0e,0xeda7c311,0xe7a2be11,0xd396af10,0x937a8e0c,0x2c343d06,0x7000000,0x2440481c,0xb5a1b050, 2036 0x6f526940,0x968ca01d,0xab9aae1d,0xb69eb41d,0xc2a2b917,0xc2a2b817,0xedb4cc1b,0xe7afc81b,0xd3a4bb1a,0x938b9d14,0x2c454e0c,0x7000000,0x24515a29,0xb5aebc62,
2037 0xfac8d877,0xffcddc7c,0xd6acbc5a,0x716f7b33,0x6f849141,0x647d8841,0x6d7c8842,0x85909965,0x93959c8f,0xb896a7aa,0xe38ba6b4,0xff759eb1,0xff6498b0,0xff4b8aaa, 2037 0xfad1de88,0xffd5e28d,0xd6b8c66c,0x71808c43,0x6f94a052,0x648d9852,0x6d8d9853,0x859fa777,0x93a4aa9e,0xb8a4b4b6,0xe39ab3bf,0xff86acbd,0xff76a6bc,0xff5d9ab6,
2038 0xff30769b,0xff5e98b4,0xff639ab1,0xff5a90ab,0xf94d81a0,0xc9476e7f,0x924f663d,0x75495919,0x604b580b,0x635e6d0d,0x664f5c08,0xc48ca310,0xffb1ce15,0xf7aac714, 2038 0xff4087a9,0xff70a6bf,0xff75a8bd,0xff6c9fb7,0xf95f91ad,0xc9597f8f,0x9261784e,0x755b6b25,0x605d6a13,0x63707e16,0x66616e0f,0xc49bb01a,0xffbdd620,0xf7b6d01f,
2039 0xa07f950e,0x22303708,0x657a8737,0xefbece68,0xffcddd79,0xe2b0c05c,0x31000000,0x101a1c10,0xe000000,0x19000000,0x350f141e,0x7d264c66,0xe039758b,0xff7ea8b1, 2039 0xa08fa417,0x2240480f,0x658b9748,0xefc8d67a,0xffd5e38a,0xe2bcca6e,0x31000000,0x1027291a,0xe000000,0x19000000,0x35191f2b,0x7d355e78,0xe04a869a,0xff8eb5bd,
2040 0xffb0cccc,0xffa2c7ca,0xff8ec3cd,0xff6dbacf,0xff3f99b1,0xff82c5d9,0xff82c3d3,0xff83bfce,0xff71acbf,0xff4889a3,0xff2b6e91,0xbc356686,0x60284255,0x2a000000, 2040 0xffbcd4d4,0xffafd0d2,0xff9dccd5,0xff7ec4d7,0xff50a7bd,0xff92cedf,0xff92ccda,0xff93c9d6,0xff82b8c9,0xff5a99b0,0xff3b7fa0,0xbc467896,0x60375367,0x2a000000,
2041 0x1c060700,0x34000000,0xd592aa13,0xffb2cf18,0xe5a0b915,0x585e6d0c,0x9591a042,0xf8c5d56c,0xffcbdc74,0xb796a546,0x18000000,0x6000000,0x14000000,0x32191f24, 2041 0x1c0c0d00,0x34000000,0xd5a1b61e,0xffbdd724,0xe5adc420,0x58707e14,0x95a0ad53,0xf8cedc7d,0xffd3e285,0xb7a4b258,0x18000000,0x6000000,0x14000000,0x32252d33,
2042 0x9437647e,0xf90d5a73,0xff317c82,0xff91c1bd,0xff76a49d,0xff558374,0xffa0c6bf,0xffd1f3ef,0xffcbf4f9,0xffbbecf5,0xffb1e8f2,0xffa2dfec,0xff9cd8e7,0xff83c7d6, 2042 0x9448768e,0xf9166c84,0xff418d92,0xffa0cbc7,0xff87b1ab,0xff679385,0xffadcfc9,0xffd8f5f2,0xffd3f6fa,0xffc5eff7,0xffbdecf4,0xffafe4ef,0xffaadeeb,0xff93d0dd,
2043 0xff24748a,0xff004e79,0xe235759d,0x733c5b71,0x27070d0d,0x25000000,0xa7798c11,0xffb3d01b,0xf3a8c319,0x85758811,0xa293a243,0xfcc7d86c,0xffcadb70,0xaf93a242, 2043 0xff33859a,0xff00608a,0xe24686ab,0x734d6d82,0x270d1616,0x25000000,0xa78a9b1b,0xffbed728,0xf3b5cc25,0x8586981b,0xa2a2af54,0xfcd0de7d,0xffd2e181,0xafa2af53,
2044 0x1f262a10,0x12000000,0x2f10161b,0x9d517a8d,0xff176676,0xff015052,0xff2f766b,0xff286a4f,0xff165029,0xff4f845d,0xffbae6dd,0xffbbe9de,0xffd6f5f5,0xffc8f2f7, 2044 0x1f35391a,0x12000000,0x2f1a2228,0x9d638b9c,0xff237887,0xff036264,0xff3f877c,0xff377b61,0xff226238,0xff61946f,0xffc4eae3,0xffc5ede3,0xffddf7f7,0xffd1f4f8,
2045 0xffb1edf7,0xffabe9f7,0xffa7e8f7,0xffa1e5f5,0xff58a5b7,0xff1a6c8b,0xff2c87ac,0xf35292af,0x723c5c70,0x38121405,0xa3778a14,0xffb5d120,0xfab0cb1f,0x93798c13, 2045 0xffbdf0f8,0xffb7edf8,0xffb4ecf8,0xffaee9f7,0xff6ab2c2,0xff277d9a,0xff3c97b8,0xf364a1bb,0x724d6e81,0x381d1f0a,0xa3889a1f,0xffc0d82e,0xfabcd32d,0x938a9b1e,
2046 0x968c9c3d,0xfec8da6a,0xfec6d868,0xc09bab45,0x25000000,0x25000000,0x8558737f,0xff3d838b,0xff065a4a,0xff155a40,0xff07491e,0xff12531b,0xff99c5ad,0xffeaffff, 2046 0x969baa4e,0xfed1e07b,0xfecfde7a,0xc0a9b757,0x25000000,0x25000000,0x856a848f,0xff4e939a,0xff0c6c5c,0xff206c51,0xff0d5b2b,0xff1d6528,0xffa7ceb9,0xffeeffff,
2047 0xffe2ffff,0xffc0eeea,0xffd0f4f5,0xffd9f6f8,0xffcbf3f7,0xffb6edf6,0xffabeaf8,0xffa2e6fb,0xff87daf8,0xff6ac3e4,0xff348fb4,0xff257ea9,0xe04985a4,0x631f2e39, 2047 0xffe7ffff,0xffcaf1ee,0xffd7f6f7,0xffdff8f9,0xffd3f5f8,0xffc1f0f8,0xffb7eef9,0xffafeafc,0xff97e0f9,0xff7bcce8,0xff459ebf,0xff348eb6,0xe05b95b1,0x632d3e4a,
2048 0xb9809417,0xfeb5d023,0xfeb5d124,0x88758815,0x71798631,0xf4bdcf5b,0xffc5d764,0xdda9ba4c,0x3d0e0f08,0x593c484d,0xea759a9f,0xff207365,0xff085529,0xff0b4f0e, 2048 0xb990a323,0xfec0d731,0xfec0d833,0x88869820,0x718a9641,0xf4c7d76d,0xffcedd76,0xddb6c45e,0x3d17190f,0x594d5a5f,0xea86a8ad,0xff2e8477,0xff0f6738,0xff136117,
2049 0xff0f5f12,0xff88c19c,0xffefffff,0xffe9fdff,0xffd8f7fa,0xffd8f9fe,0xffcbf6f8,0xffcbf4f8,0xffd3f5f7,0xffcbf2f7,0xffb5ebf8,0xffa7e7f9,0xff98e8fe,0xff6bc6e0, 2049 0xff19711d,0xff98cbaa,0xfff2ffff,0xffedfdff,0xffdef8fb,0xffdefafe,0xffd3f8f9,0xffd3f6f9,0xffdaf7f8,0xffd3f4f8,0xffc0eef9,0xffb4ebfa,0xffa6ecfe,0xff7ccfe5,
2050 0xff136785,0xff005998,0xff156da2,0xca40677e,0xda93a920,0xffb7d229,0xf1aac325,0x69677716,0x363d4318,0xe2adc04c,0xffc4d75f,0xf4b6c853,0x81545d21,0xb86c8289, 2050 0xff1e7995,0xff006ba6,0xff207eaf,0xca51798e,0xdaa2b62e,0xffc2d938,0xf1b6cc34,0x69798822,0x364e5424,0xe2b9ca5e,0xffcddd71,0xf4c1d165,0x81666f2f,0xb87d9299,
2051 0xff6d9896,0xff09613c,0xff287243,0xff60a882,0xff87c7a5,0xffdffbf6,0xffedfeff,0xffdff9fa,0xffdaf8fa,0xffd5f6f8,0xffcff6f8,0xffc8f5f7,0xffc8f2f7,0xffcef3f7, 2051 0xff7ea6a4,0xff10734d,0xff378354,0xff72b592,0xff97d0b2,0xffe4fcf8,0xfff0feff,0xffe4fafb,0xffe0f9fb,0xffdcf8f9,0xffd7f8f9,0xffd1f7f8,0xffd1f4f8,0xffd6f5f8,
2052 0xffc7eff6,0xffb0e9f7,0xffacf1ff,0xff85d1db,0xff20676f,0xff005b97,0xff0060a3,0xff396f6d,0xf6a7c02b,0xffbad42f,0xdb9eb526,0x3431380a,0x1a1e220a,0xb092a33a, 2052 0xffd0f2f8,0xffbcedf8,0xffb8f3ff,0xff95d8e1,0xff2e7980,0xff006da5,0xff0072b0,0xff4a807e,0xf6b4ca3b,0xffc4db3f,0xdbacc035,0x34414912,0x1a2b3012,0xb0a1b04b,
2053 0xfec0d457,0xffc1d558,0xc5829236,0xf77d9397,0xff6b9e90,0xff18743f,0xff97ccb6,0xffe8fefd,0xffebffff,0xfff1ffff,0xffedfeff,0xffe3fafd,0xffddf9fa,0xffd9f7f9, 2053 0xfecadb69,0xffcbdc6a,0xc592a147,0xf78da2a5,0xff7cac9f,0xff248550,0xffa5d4c1,0xffecfefd,0xffeeffff,0xfff3ffff,0xfff0feff,0xffe8fbfd,0xffe3fafb,0xffdff8fa,
2054 0xffd3f6f8,0xffccf5f8,0xffc5f3f8,0xffc2eff6,0xffc9f1f6,0xffc3eef6,0xffb5effe,0xff9de1ec,0xff2d726f,0xff005b85,0xff0065a4,0xff57864c,0xffbbd534,0xfeb9d333, 2054 0xffdaf8f9,0xffd4f7f9,0xffcef5f9,0xffcbf2f8,0xffd1f3f8,0xffccf1f8,0xffc0f2fe,0xffabe6ef,0xff3d8380,0xff006d95,0xff0077b1,0xff69965e,0xffc5dc45,0xfec4da43,
2055 0xab849721,0x1b1b1f09,0x9000000,0x5e667223,0xefb0c448,0xffbed352,0xf3a5b845,0xff809280,0xff96b7ad,0xff6ab98e,0xfff1fdfd,0xfffdffff,0xffd9f3ed,0xffbdeadc, 2055 0xab94a52f,0x1b282d10,0x9000000,0x5e788331,0xefbccd5a,0xffc8da64,0xf3b2c357,0xff90a190,0xffa4c2b9,0xff7bc49d,0xfff3fdfd,0xfffdffff,0xffdff5f0,0xffc7eee2,
2056 0xffa7decd,0xffd5f5f2,0xffe2fafc,0xffdcf8f9,0xffd9f7f8,0xffcef5f7,0xffc8f3f6,0xffc0f1f6,0xffb8eff5,0xffc2eef7,0xffc2edf9,0xffb2f1fc,0xff438378,0xff00474d, 2056 0xffb4e3d5,0xffdcf7f4,0xffe7fbfd,0xffe2f9fa,0xffdff8f9,0xffd6f7f8,0xffd1f5f8,0xffcaf3f8,0xffc3f2f7,0xffcbf1f8,0xffcbf0fa,0xffbdf3fd,0xff549389,0xff00595f,
2057 0xff146683,0xff94b33d,0xffbdd639,0xefa9bf31,0x63566217,0xb000000,0x2000000,0x1d1a1d09,0xad88992f,0xfdb9cf4b,0xfeb9ce4a,0xff93a556,0xffa5b8af,0xff5caf7f, 2057 0xff1f7893,0xffa3be4e,0xffc7dd4a,0xefb6c941,0x63687423,0xb000000,0x2000000,0x1d272a10,0xad98a73f,0xfdc4d75d,0xfec4d65c,0xffa2b268,0xffb2c3bb,0xff6ebb8f,
2058 0xff84c8a0,0xffdbf2e8,0xffebfbf8,0xffd2f5ec,0xffcbf1ea,0xffdff8f7,0xffe3fafb,0xffdaf7fb,0xffcef5f8,0xffcff5f7,0xffc8f4f7,0xffc1f1f6,0xffb8eef5,0xffb4eaf6, 2058 0xff94d1ad,0xffe1f4ec,0xffeefcf9,0xffd9f7ef,0xffd3f3ee,0xffe4f9f8,0xffe8fbfc,0xffe0f8fc,0xffd6f7f9,0xffd7f7f8,0xffd1f6f8,0xffcbf3f8,0xffc3f1f7,0xffbfeef8,
2059 0xffbfecf7,0xffc1f2fb,0xff8bcad2,0xff1b5043,0xff608341,0xffbcd43f,0xffb9d13f,0xb8788823,0x2b121406,0x4000000,0xffffff,0x9000000,0x50454e17,0xe8a3b73a, 2059 0xffc9eff8,0xffcbf4fc,0xff9ad2d9,0xff286254,0xff729352,0xffc6db50,0xffc4d850,0xb8899831,0x2b1d1f0c,0x4000000,0xffffff,0x9000000,0x50576023,0xe8b0c24b,
2060 0xffb9cf45,0xffadc343,0xffa3b183,0xffa2cfbb,0xff8fcfac,0xffacddc8,0xffecfbfa,0xfff6ffff,0xfff1ffff,0xfff3ffff,0xfff6ffff,0xffddfbfc,0xffc1f3f9,0xffc9f4f6, 2060 0xffc4d757,0xffb9cc54,0xffb0bd93,0xffafd7c5,0xff9ed7b8,0xffb8e3d1,0xffeffcfb,0xfff8ffff,0xfff3ffff,0xfff5ffff,0xfff8ffff,0xffe3fcfd,0xffcbf5fa,0xffd1f6f8,
2061 0xffc9f4f6,0xffc1f1f6,0xffb9eef5,0xffb1eaf6,0xffb0e8f6,0xffbaeaf5,0xffb1e2ec,0xff7aa57c,0xffb1ca45,0xffc1d845,0xfe97b341,0x6f2f350e,0x18000000,0x2000000, 2061 0xffd1f6f8,0xffcbf3f8,0xffc4f1f7,0xffbdeef8,0xffbcecf8,0xffc4eef7,0xffbde7ef,0xff8bb28d,0xffbdd257,0xffcbde57,0xfea5be52,0x6f3f4617,0x18000000,0x2000000,
2062 0xffffff,0x3000000,0x20000000,0x9c616e1d,0xfeabc13e,0xffb5cc42,0xffb8c96a,0xffced7c5,0xffe7f1f0,0xffc4efe5,0xff97d5c0,0xff457955,0xff377847,0xff3d8a53, 2062 0xffffff,0x3000000,0x20000000,0x9c737f2a,0xfeb7cb4f,0xffc0d453,0xffc3d17b,0xffd6ddce,0xffebf3f3,0xffcdf2e9,0xffa5dcca,0xff578a67,0xff488959,0xff4e9a65,
2063 0xff71b192,0xffdcfbfa,0xffe2ffff,0xffd1f9fb,0xffc9f4f7,0xffc3f1f6,0xffb9eef5,0xffb1eaf6,0xffa7e6f5,0xffa7deec,0xffa4cac0,0xffb8ce71,0xffc4da50,0xffb4cc4b, 2063 0xff82bda1,0xffe2fcfb,0xffe7ffff,0xffd8fafc,0xffd1f6f8,0xffccf3f8,0xffc4f1f7,0xffbdeef8,0xffb4eaf7,0xffb4e3ef,0xffb1d2ca,0xffc3d682,0xffcde062,0xffbfd45d,
2064 0xfb446e50,0x47000000,0x12000000,0x2000000,0xffffff,0x2000000,0x14000000,0x57151806,0xfc8ba244,0xffbfd35d,0xffc9d979,0xffb6c578,0xffbeccbb,0xffeef4f4, 2064 0xfb567f62,0x47000000,0x12000000,0x2000000,0xffffff,0x2000000,0x14000000,0x5720240c,0xfc9aaf56,0xffc9da6f,0xffd1df8a,0xffc1ce89,0xffc8d4c5,0xfff1f6f6,
2065 0xffcfe3dd,0xff3e784a,0xff176b22,0xff1d6f1d,0xff115a10,0xff307445,0xff4e876e,0xffbfeff0,0xffddfffe,0xffc6f7fd,0xffbceff7,0xffafe9f3,0xffa0dceb,0xff8ebfb9, 2065 0xffd7e8e3,0xff4f895c,0xff237c30,0xff2a802a,0xff1b6c1a,0xff408557,0xff60977f,0xffc9f2f3,0xffe3fffe,0xffcff8fd,0xffc6f2f8,0xffbbedf5,0xffade2ee,0xff9dc9c4,
2066 0xffaec67b,0xffd0e07b,0xffcadc68,0xff92b05a,0xf91d5569,0x3d000000,0x11000000,0x2000000,0xffffff,0x2000000,0xf000000,0x3c000000,0xf2718d7a,0xffbdcd7c, 2066 0xffbacf8c,0xffd7e58c,0xffd2e27a,0xffa1bc6c,0xf92a677a,0x3d000000,0x11000000,0x2000000,0xffffff,0x2000000,0xf000000,0x3c000000,0xf2829c8b,0xffc7d58d,
2067 0xffc7d870,0xffafc440,0xffa0b453,0xffc3cfb9,0xffcce6e0,0xff4fa26e,0xff22832f,0xff287925,0xff266a22,0xff185613,0xff073404,0xff377053,0xff94cdc8,0xff9ad5d3, 2067 0xffd0de81,0xffbbcd51,0xffadbf65,0xffccd7c4,0xffd4eae5,0xff61af7f,0xff30933f,0xff378a34,0xff357b30,0xff24681e,0xff0d4508,0xff488165,0xffa3d5d1,0xffa8dcda,
2068 0xffb0e9ef,0xffaae4ee,0xff90c0b8,0xff9fbc66,0xffc4d95e,0xffd0e177,0xffbacc7a,0xff769f8e,0xf82a657a,0x3a000000,0x11000000,0x2000000,0xffffff,0x1000000, 2068 0xffbcedf2,0xffb6e8f1,0xff9fcac3,0xffadc678,0xffcddf70,0xffd7e688,0xffc4d48b,0xff87ad9d,0xf839778b,0x3a000000,0x11000000,0x2000000,0xffffff,0x1000000,
2069 0xf000000,0x403f4330,0xdc88a1ad,0xffa9bc9c,0xffb5c759,0xffabc32c,0xffa7be2c,0xffa1b34f,0xffa7c4a9,0xff3e875e,0xff1b6f28,0xff277529,0xff216322,0xff1e571e, 2069 0xf000000,0x40505440,0xdc98aeb9,0xffb6c6aa,0xffc0d06b,0xffb7cc3c,0xffb4c83c,0xffaebe61,0xffb4cdb6,0xff4f9770,0xff288037,0xff368638,0xff2f7530,0xff2b692b,
2070 0xff21561d,0xff0e3e0c,0xff023106,0xff063711,0xff377065,0xff94c7c0,0xffa5c06a,0xffc5da5d,0xffc9de5e,0xffbdd16b,0xff98b794,0xff79a5ab,0xf8346d7b,0x3c000000, 2070 0xff2f682a,0xff174f14,0xff05410c,0xff0c481b,0xff488177,0xffa3d0ca,0xffb2ca7b,0xffcee06f,0xffd1e370,0xffc7d87c,0xffa6c2a3,0xff8ab2b7,0xf8457e8c,0x3c000000,
2071 0x11000000,0x2000000,0xffffff,0x3000000,0x1a16190a,0x7d9aa468,0xc4a6b3ba,0xffa6bab5,0xff99ad63,0xffa3bb2d,0xffa7c027,0xffa1b92a,0xff9cb057,0xff618d6b, 2071 0x11000000,0x2000000,0xffffff,0x3000000,0x1a222512,0x7da8b17a,0xc4b3bec4,0xffb3c4c0,0xffa7b975,0xffb0c53d,0xffb4ca36,0xffaec439,0xffaabc69,0xff739c7c,
2072 0xff185d2a,0xff277c3d,0xff246a2f,0xff1e521d,0xff1e4f1b,0xff1f501e,0xff184418,0xff0f3310,0xff517a64,0xffa2bf74,0xffc4d862,0xffccdf65,0xffc0d561,0xff95b87c, 2072 0xff246f39,0xff368d4e,0xff337b3f,0xff2b642a,0xff2b6128,0xff2d622b,0xff245624,0xff19431a,0xff638b76,0xffafc985,0xffcdde74,0xffd4e477,0xffcadc73,0xffa4c38d,
2073 0xff86b8bd,0xff78a3a3,0xfb4a7a63,0x460a0b04,0x12000000,0x2000000,0xffffff,0xa000000,0x5f7c893b,0xc9becb7a,0xabadb4b5,0xff99b0b4,0xff98aea3,0xff98ad62, 2073 0xff96c3c7,0xff89b0b0,0xfb5c8b75,0x46121308,0x12000000,0x2000000,0xffffff,0xa000000,0x5f8d994c,0xc9c8d38b,0xabb9bfc0,0xffa7bcbf,0xffa6bab0,0xffa6b974,
2074 0xff9fb72b,0xffa3bc22,0xff9db426,0xff8fa342,0xff395c33,0xff196530,0xff216336,0xff1d5321,0xff1c4a1a,0xff1c4a1c,0xff154115,0xff304f24,0xff9fba66,0xffc4d867, 2074 0xffadc23b,0xffb0c630,0xffabbf35,0xff9eb053,0xff4a6e43,0xff257740,0xff2f7547,0xff2a652f,0xff295c27,0xff295c29,0xff205220,0xff406133,0xffadc478,0xffcdde79,
2075 0xffcee06b,0xffbfd365,0xff95b87c,0xff7fbcc6,0xff7fbaca,0xff68918d,0xfa708e3c,0x7f4e5912,0x17000000,0x2000000,0x3000000,0x26333914,0xbaa8b756,0xefcad979, 2075 0xffd6e57c,0xffc9da77,0xffa4c38d,0xff8fc6cf,0xff8fc4d2,0xff7aa09c,0xfa819d4d,0x7f606b1d,0x17000000,0x2000000,0x3000000,0x26434a1f,0xbab5c268,0xefd2df8a,
2076 0x9faaada4,0xe47a98a2,0xff98b3b4,0xffa6bfb8,0xff98af66,0xff9bb326,0xff9fb71d,0xff9cb31d,0xff8aa12f,0xff486735,0xff1d592c,0xff1b5728,0xff1d4e1c,0xff1d471a, 2076 0x9fb6b9b1,0xe48ba6af,0xffa6bebf,0xffb3c9c3,0xffa6bb78,0xffa9be35,0xffadc22a,0xffaabe2a,0xff9aae3f,0xff5a7946,0xff2a6b3c,0xff286937,0xff2a6029,0xff2a5927,
2077 0xff3d5e21,0xff9fb555,0xffcee070,0xffd0e171,0xffc0d46a,0xff96b880,0xff84c0cd,0xff7fc5e2,0xff71afc6,0xff587f72,0xf8849a1e,0xc9718315,0x2f252b06,0x4000000, 2077 0xff4e702f,0xffadc067,0xffd6e581,0xffd7e682,0xffcadb7b,0xffa4c390,0xff94cad5,0xff8fcee7,0xff82bbcf,0xff6a8f83,0xf894a82b,0xc9829320,0x2f343b0c,0x4000000,
2078 0xa000000,0x6e7a8735,0xf1c4d568,0xefc8d77e,0xa8a7af7a,0x8e526b77,0xff85a8ad,0xffa5c3c5,0xffa6c5be,0xff97af58,0xff98b020,0xff9ab319,0xff98b019,0xff8da527, 2078 0xa000000,0x6e8b9746,0xf1cddc7a,0xefd1dd8e,0xa8b4bb8b,0x8e647c88,0xff95b5b9,0xffb2ccce,0xffb3cec8,0xffa5bb6a,0xffa6bc2e,0xffa8be25,0xffa6bc25,0xff9cb236,
2079 0xff567421,0xff23501a,0xff274f1c,0xff668133,0xffb2c661,0xffd1e376,0xffd1e376,0xffc5d86f,0xff9fbe7b,0xff84c1ca,0xff7ac6e5,0xff6ab5d8,0xff5b99b3,0xfa5d7e52, 2079 0xff68852f,0xff316227,0xff366129,0xff789143,0xffbdcf73,0xffd8e887,0xffd8e887,0xffcede80,0xffadc88c,0xff94cbd2,0xff8bcfe9,0xff7bc0de,0xff6da7be,0xfa6f8e64,
2080 0xf47b8e16,0xf47e9311,0x795a690c,0xa000000,0x160c0c0c,0xb5a0b04d,0xfed1e279,0xf3cad781,0xb0a0ad5b,0x48192027,0xc5658c9d,0xff8db2b6,0xffa4c9cc,0xff9ec2ac, 2080 0xf48c9d22,0xf48ea21b,0x796c7a14,0xa000000,0x16141414,0xb5adbc5f,0xfed8e78a,0xf3d2dd91,0xb0adb96d,0x48252e36,0xc5779bab,0xff9cbdc1,0xffb1d1d4,0xffaccbb8,
2081 0xff90ac55,0xff93ab20,0xff96b016,0xff93ac15,0xff8aa316,0xff778c27,0xff889947,0xffbdcd6e,0xffd1e17b,0xffd2e37b,0xffc2d571,0xff9fbd7c,0xff8bc0ba,0xff82cbe5, 2081 0xff9fb867,0xffa2b72e,0xffa4bc22,0xffa2b820,0xff9ab022,0xff889b36,0xff98a759,0xffc7d57f,0xffd8e68c,0xffd9e88c,0xffcbdc82,0xffadc78d,0xff9acac4,0xff92d3e9,
2082 0xff5eb2d8,0xff54a1c5,0xff4986a5,0xd8627b28,0xf6758811,0xfe778c0e,0xc16d7f0c,0x16020200,0x22262626,0xdcb7c861,0xffd5e581,0xfcd1e17c,0xb5a2af5d,0x31050505, 2082 0xff70bdde,0xff66aece,0xff5b96b2,0xd8748c37,0xf686981b,0xfe889b17,0xc17e8f14,0x16050500,0x22353535,0xdcc2d173,0xffdce991,0xfcd8e68d,0xb5afbb6f,0x310a0a0a,
2083 0x582e4651,0xdc6792a2,0xff8db5ba,0xff8bbdc9,0xff7cb5b3,0xff86a75e,0xff8ea71f,0xff97ae1d,0xffa2b73b,0xffb5c466,0xffc1cc86,0xffc2ce85,0xffc7d481,0xffbcce74, 2083 0x583e5863,0xdc79a1af,0xff9cc0c4,0xff9ac7d1,0xff8dc0be,0xff96b470,0xff9db42d,0xffa5ba2a,0xffafc24c,0xffc0cd78,0xffcbd496,0xffcbd695,0xffd0db91,0xffc6d685,
2084 0xff96b681,0xff85bdbf,0xff86cbe0,0xff7bc3de,0xff5fa6c8,0xff4f90b5,0xb72e6383,0xc564750e,0xfd778d0c,0xff70840c,0xe66e820a,0x27101206,0x2d4a4a4a,0xeac2d26e, 2084 0xffa4c191,0xff95c7c9,0xff96d3e5,0xff8ccce3,0xff71b3d1,0xff619fc0,0xb73e7593,0xc5768617,0xfd889c14,0xff819414,0xe67f9212,0x271a1d0c,0x2d5c5c5c,0xeacbd97f,
2085 0xffd6e585,0xffd6e585,0xd7b3c267,0x4e545c2b,0x2f0f100b,0x6c344c5c,0xdf618c9e,0xff709eac,0xff679ea6,0xff7aa08b,0xff8ca25a,0xffaaba5c,0xffc1ce7d,0xffc7d38d, 2085 0xffdde995,0xffdde995,0xd7becb79,0x4e666e3b,0x2f191a13,0x6c455e6e,0xdf739bac,0xff81acb8,0xff79acb3,0xff8bad9a,0xff9baf6c,0xffb6c46e,0xffcbd68d,0xffd0da9c,
2086 0xffc7d28d,0xffc0cc84,0xffabb968,0xff869e5a,0xff749e84,0xff75aeb2,0xff74b2c8,0xff6aa7be,0xff548fad,0xbf346b8d,0x79314120,0xdf6d810c,0xff70850a,0xff6a7e0a, 2086 0xffd0d99c,0xffcad494,0xffb7c47a,0xff96ac6c,0xff85ac94,0xff86babd,0xff85bdd1,0xff7bb4c8,0xff669eb9,0xbf457c9c,0x7941522e,0xdf7e9114,0xff819512,0xff7b8e12,
2087 0xf26b7f09,0x371a1d08,0x2f575757,0xe7c0d06e,0xffd7e689,0xffd8e78a,0xf8ccdb7b,0xb49daa59,0x75747f36,0x74646e30,0x9b607143,0xe26d8868,0xff99af6e,0xffabbf6f, 2087 0xf27c8f10,0x37272a0f,0x2f696969,0xe7cad77f,0xffddea99,0xffdeeb9a,0xf8d4e18c,0xb4abb66b,0x75858f47,0x74767f40,0x9b728254,0xe27e987a,0xffa7bb7f,0xffb7c980,
2088 0xffbccb78,0xffc8d48b,0xffc6d18e,0xffc7d28f,0xffbeca7b,0xffa9ba57,0xff90a52a,0xff7d9619,0xff769125,0xff708e37,0xff5e8360,0xff537e6a,0xc646674b,0x94465913, 2088 0xffc6d389,0xffd1db9a,0xffcfd89d,0xffd0d99e,0xffc8d28c,0xffb6c469,0xff9fb239,0xff8da425,0xff87a034,0xff819d48,0xff709372,0xff658e7b,0xc658795d,0x94586b1e,
2089 0xc0607109,0xfa70850a,0xff6a7d09,0xff657808,0xf0697d07,0x391b1f08,0x24555555,0xd0b4c463,0xffd9e78d,0xffdae88f,0xffdae88f,0xf8ccdc7e,0xebc0cf70,0xe9bfce70, 2089 0xc0728210,0xfa819512,0xff7b8d10,0xff77890f,0xf07a8d0d,0x39282d0f,0x24676767,0xd0bfcd75,0xffdfeb9c,0xffe0ec9e,0xffe0ec9e,0xf8d4e28e,0xebcad781,0xe9c9d681,
2090 0xe8bac96b,0xf6c7d67a,0xffd6e48a,0xffd9e78f,0xffd8e68f,0xffd4e18d,0xffbecb7f,0xffabb96b,0xff99ab49,0xff879d1f,0xff7f970b,0xff7d940b,0xff7b910b,0xff798f0c, 2090 0xe8c4d17c,0xf6d0dd8b,0xffdde89a,0xffdfeb9e,0xffdeea9e,0xffdbe69c,0xffc8d38f,0xffb7c47c,0xffa7b75b,0xff97ab2d,0xff8fa513,0xff8da313,0xff8ca013,0xff8a9e14,
2091 0xfc758c0f,0xf170860d,0xef718609,0xef718509,0xfa6f8309,0xff697d08,0xff657908,0xff627507,0xdd687c06,0x2c191d05,0x113c3c3c,0x8895a34b,0xefc7d679,0xffdbe892, 2091 0xfc869b19,0xf1819616,0xef829610,0xef829510,0xfa809310,0xff7a8d0f,0xff778a0f,0xff74860d,0xdd7a8d0c,0x2c252a0a,0x114d4d4d,0x88a4b05d,0xefd0dd8a,0xffe1eca1,
2092 0xffdbe892,0xffdbe892,0xffdae790,0xffdbe892,0xffdbe892,0xffdbe892,0xffdae891,0xffdae790,0xfccedc84,0xf7b3c470,0xf48ba266,0xf76d8964,0xfb5b7b4e,0xfc5e7d2d, 2092 0xffe1eca1,0xffe1eca1,0xffe0eb9f,0xffe1eca1,0xffe1eca1,0xffe1eca1,0xffe0eca0,0xffe0eb9f,0xfcd6e294,0xf7becd81,0xf49aaf78,0xf77e9976,0xfb6d8c60,0xfc708d3d,
2093 0xfc6f8916,0xfe79900d,0xff798f0a,0xff768c0a,0xff74890a,0xff72870a,0xff6f8308,0xff6d8008,0xff697c08,0xff657907,0xff627507,0xf5677b07,0x95617306,0x130e1100, 2093 0xfc809922,0xfe8a9f16,0xff8a9e12,0xff879b12,0xff859912,0xff839712,0xff80930f,0xff7e900f,0xff7a8d0f,0xff778a0d,0xff74860d,0xf5798c0d,0x9573840c,0x13171b00,
2094 0x4000000,0x1f353919,0x8b93a04b,0xe2becd70,0xf9d0df86,0xfed9e691,0xffdce995,0xfedae793,0xfed8e590,0xfbd3e089,0xf6cfdd84,0xe1b9c76c,0xb597a450,0x8874803a, 2094 0x4000000,0x1f464a25,0x8ba2ad5d,0xe2c8d581,0xf9d7e496,0xfedfeaa0,0xffe2eda4,0xfee0eba2,0xfedee99f,0xfbdae599,0xf6d7e394,0xe1c4d07d,0xb5a5b162,0x8885904b,
2095 0x5d3e431e,0x43000000,0x45000000,0x63283004,0x8d4c5905,0xba607206,0xe4718508,0xf8758a09,0xfb728809,0xfe6f8409,0xfe6c8008,0xff697c08,0xfe677a08,0xfb677a07, 2095 0x5d4f542b,0x43000000,0x45000000,0x63374008,0x8d5e6b0a,0xba72830c,0xe482950f,0xf8869a10,0xfb839810,0xfe809410,0xfe7d900f,0xff7a8d0f,0xfe798b0f,0xfb798b0d,
2096 0xea697c06,0x97607106,0x20252b01,0x4000000,0xffffff,0x4000000,0x13000000,0x6c889544,0xb8a9b85d,0xdabac86d,0xe2bdcc71,0xe6c2d176,0xd1b3c166,0xc1acbb5f, 2096 0xea7a8d0c,0x9772820c,0x20343b03,0x4000000,0xffffff,0x4000000,0x13000000,0x6c98a456,0xb8b6c36f,0xdac4d17e,0xe2c7d482,0xe6cbd887,0xd1becb78,0xc1b8c571,
2097 0x999ba952,0x50697333,0x25313615,0x1d31361a,0x12000000,0x11000000,0x12000000,0x14000000,0x201b1f01,0x2b1d2301,0x54455204,0x9d647607,0xc56b7f07,0xd66c8007, 2097 0x99a9b664,0x507a8443,0x25414720,0x1d414727,0x12000000,0x11000000,0x12000000,0x14000000,0x20282d03,0x2b2a3103,0x54576408,0x9d76870d,0xc57c8f0d,0xd67d900d,
2098 0xeb6e8207,0xe86c8007,0xe16b7e07,0xc2677a05,0x755a6b04,0x13000000,0x4000000,0xffffff,0xffffff,0xffffff,0x3000000,0x1250582b,0x27515927,0x557f8b3f, 2098 0xeb7f920d,0xe87d900d,0xe17c8e0d,0xc2798b0a,0x756c7c08,0x13000000,0x4000000,0xffffff,0xffffff,0xffffff,0x3000000,0x12626a3b,0x27636b36,0x558f9a50,
2099 0x6a8a9746,0x61849142,0x3c60692f,0x346e7936,0x1941471f,0x7000000,0x3000000,0x2000000,0x1000000,0x2000000,0x2000000,0x2000000,0x3000000,0x3000000, 2099 0x6a9aa558,0x6194a053,0x3c727a3f,0x347f8a47,0x1952592d,0x7000000,0x3000000,0x2000000,0x1000000,0x2000000,0x2000000,0x2000000,0x3000000,0x3000000,
2100 0x8000000,0x192c3401,0x364d5b07,0x3e445006,0x66586804,0x705b6c04,0x5b566505,0x29384201,0x12333d01,0x3000000,0xffffff,0xffffff,0xffffff,0xffffff, 2100 0x8000000,0x193c4503,0x365f6d0d,0x3e56620c,0x666a7a08,0x706d7d08,0x5b68770a,0x29495303,0x12434e03,0x3000000,0xffffff,0xffffff,0xffffff,0xffffff,
2101 0xffffff,0x1000000,0x3000000,0x6000000,0x8000000,0x92f321c,0x4000000,0x3000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 2101 0xffffff,0x1000000,0x3000000,0x6000000,0x8000000,0x93f4229,0x4000000,0x3000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
2102 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3000000,0x4000000,0x9181d00,0x8000000,0x6000000,0x3000000,0x1000000,0xffffff, 2102 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3000000,0x4000000,0x9242a00,0x8000000,0x6000000,0x3000000,0x1000000,0xffffff,
2103 0xffffff,0xffffff 2103 0xffffff,0xffffff
2104}; 2104};
2105 2105
2106static const QRgb ParaShoot_data[] = {
2107 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
2108 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
2109 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
2110 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
2111 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff03035a,0xff03035e,0xff03035f,0xff03035e,
2112 0xff03035e,0xff03035e,0xff03035e,0xff03035e,0xff03035e,0xff03035e,0xff03035e,0xff03035e,0xff03035e,0xff03035e,0xff03035e,0xff03035e,0xff03035e,0xff03035e,
2113 0xff03035e,0xff03035e,0xff03035e,0xff03035e,0xff03035e,0xff03035b,0xff030354,0xff030249,0xff02023c,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
2114 0xff03035e,0xff688eb6,0xff6187b3,0xff5981af,0xff567fae,0xff567fae,0xff567fae,0xff567fae,0xff567fae,0xff809fc2,0xff95aecc,0xffaabed6,0xffaabed5,0xffa9bed5,
2115 0xff8aa5c5,0xff7f9cbf,0xff567dab,0xff567dab,0xff567dab,0xff567dac,0xff567eac,0xff567ead,0xff567eac,0xff557ba8,0xff537096,0xff4b5b78,0xff020126,0x5c000000,
2116 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff03035f,0xff6087b3,0xff4971a8,0xff35629f,0xff305e9c,0xff2f5d9c,0xff7090bb,0xffbecce0,0xfffefefe,0xfffefefe,
2117 0xfffdfdfd,0xfffcfcfc,0xfffafafa,0xfff8f8f8,0xfff6f6f6,0xfff2f2f2,0xffefefef,0xffb1bfd0,0xff7690b4,0xff3a6299,0xff2e5a94,0xff2f5b98,0xff2f5c99,0xff2e5993,
2118 0xff2c4d7d,0xff26334b,0xff010111,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff04035f,0xff5b83b1,0xff3966a2,0xff1f5295,0xff5278ae,0xffd3ddea,
2119 0xfffefefe,0xffe7e7e7,0xffdedede,0xffdedede,0xfff4f4f4,0xfff3f3f3,0xffdcdcdc,0xffdadada,0xffbbbbbb,0xffb8b8b8,0xffcacaca,0xffcbcbcb,0xffdadada,0xffcfd2d6,
2120 0xff7990ae,0xff224e89,0xff164788,0xff164686,0xff13376d,0xff0c1a34,0xff000006,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff040361,0xff5c83b2,
2121 0xff3565a2,0xff8da7ca,0xfff6f6f6,0xffaeaeae,0xff868686,0xff8e8e8e,0xff9e9e9e,0xff969696,0xff7f7f7f,0xff7f7f7f,0xff8e8e8e,0xff9d9d9d,0xffacacac,0xffb3b3b3,
2122 0xff999999,0xff8f8f8f,0xff757575,0xff848484,0xffadadad,0xffadb6c1,0xff1c4782,0xff103f7e,0xff0d326a,0xff051430,0xff000003,0x93000000,0x62000000,0x3b000000,
2123 0x1f000000,0x3d000000,0xff040362,0xff6188b5,0xffb4c5dc,0xffd8d8d8,0xff868686,0xffaeaeae,0xffeeeeee,0xfffefefe,0xfffefefe,0xff979797,0xffa7a7a7,0xffbfbfbf,
2124 0xff7f7f7f,0xffcfcfcf,0xffffffff,0xfffefefe,0xfffdfdfd,0xfffbfbfb,0xffefefef,0xffc2c2c2,0xff7e7e7e,0xff747474,0xff949ba5,0xff123b76,0xff0e3167,0xff05142f,
2125 0xff000002,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff040364,0xff9fb6d3,0xffd5d5d5,0xff8b8b8b,0xffd5d5d5,0xfffefefe,0xffffffff,0xffffffff,
2126 0xffb7b7b7,0xff979797,0xffffffff,0xffffffff,0xffe7e7e7,0xff878787,0xffcfcfcf,0xffffffff,0xffffffff,0xfffefefe,0xfffcfcfc,0xfff7f7f7,0xffe9e9e9,0xffa2a2a2,
2127 0xff616161,0xff425772,0xff113264,0xff071530,0xff000002,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff05046b,0xffe5e6e9,0xff989898,0xffdddddd,
2128 0xfffefefe,0xffffffff,0xffffffff,0xffefefef,0xff7f7f7f,0xffefefef,0xffffffff,0xffffffff,0xffffffff,0xffe7e7e7,0xff7f7f7f,0xffe7e7e7,0xffffffff,0xfffefefe,
2129 0xfff8f8f8,0xffededed,0xffdbdbdb,0xffc2c2c2,0xff878787,0xff494c4f,0xff112f59,0xff081630,0xff000002,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
2130 0xff08057c,0xffb4b4b4,0xffc5c5c5,0xfffdfdfd,0xffffffff,0xffffffff,0xffffffff,0xffafafaf,0xffbfbfbf,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
2131 0xffbfbfbf,0xff979797,0xfffefefe,0xfff9f9f9,0xffe9e9e9,0xffd3d3d3,0xffbbbbbb,0xffa9a9a9,0xff9a9a9a,0xff88888a,0xff2c456b,0xff0a1732,0xff000003,0x99000000,
2132 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff080574,0xffadadad,0xfffbfbfb,0xfffefefe,0xffffffff,0xffffffff,0xffefefef,0xff7f7f7f,0xffefefef,0xffffffff,
2133 0xfffefefe,0xfffefefe,0xfffefefe,0xfffefefe,0xffffffff,0xff8e8e8e,0xffcccccc,0xffececec,0xffd2d2d2,0xffb3b6b9,0xff4f6a8c,0xff47658b,0xff3d4d63,0xff3c4d66,
2134 0xff2b4874,0xff0c1a35,0xff000003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff07045c,0xffdcdcdc,0xfffcfcfc,0xfffefefe,0xffffffff,0xffffffff,
2135 0xffc7c7c7,0xffa7a7a7,0xfffefefe,0xfffdfdfd,0xfffafafa,0xfff9f9f9,0xfff8f8f8,0xfff9f9f9,0xfffbfbfb,0xffcccccc,0xff888888,0xffd9d9d9,0xffbbbbbb,0xff687f9b,
2136 0xff183d71,0xff2c5a96,0xff13273f,0xff234777,0xff23477b,0xff0d1c38,0xff000003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff07045b,0xfff5f5f5,
2137 0xfff9f9f9,0xfffcfcfc,0xfffefefe,0xfffefefe,0xffa6a6a6,0xffcecece,0xfffafafa,0xfff2f2f2,0xffe9e9e9,0xffe2e2e2,0xffe0e0e0,0xffe2e2e2,0xffe8e8e8,0xffeaeaea,
2138 0xff7c7c7c,0xffa3a3a3,0xff9ea3a9,0xff2a5489,0xff204a85,0xff386dad,0xff0e1b2b,0xff3465a3,0xff284e86,0xff101f3a,0xff000003,0x99000000,0x66000000,0x3d000000,
2139 0x1f000000,0x3d000000,0xff08056b,0xffededed,0xffeeeeee,0xfff1f1f1,0xfff6f6f6,0xfffbfbfb,0xff858585,0xffe8e8e8,0xffebebeb,0xffd9d9d9,0xffc8c8c8,0xffbdbdbd,
2140 0xffbababa,0xffbbbbbb,0xffc0c0c0,0xffc3c3c3,0xff909090,0xff747474,0xff70839b,0xff2d5990,0xff2d5c9b,0xff37659d,0xff172c43,0xff3d70af,0xff2d548b,0xff11203c,
2141 0xff000003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff080572,0xffdfdfdf,0xffdbdbdb,0xffdadada,0xffe3e3e3,0xffdfdfdf,0xff7f7f7f,0xffe4e4e4,
2142 0xffcfcfcf,0xffbebebe,0xff8695a7,0xff5d7491,0xff6f8199,0xff78889c,0xff9299a2,0xffa4a4a4,0xff929292,0xff818181,0xff466994,0xff2e5b96,0xff3b6eaf,0xff2e537e,
2143 0xff28456a,0xff4275b5,0xff32578f,0xff13223e,0xff000003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff080571,0xffaebccb,0xff889fbc,0xffa0acbd,
2144 0xffcccccc,0xffb9b9b9,0xff858585,0xffc8c8c8,0xffacb0b6,0xff5d7da2,0xff3f6ba1,0xff376399,0xff2f5992,0xff406ea5,0xff3e699e,0xff426998,0xff667f9d,0xff6f747a,
2145 0xff406ca4,0xff2b5796,0xff497fc0,0xff253f5e,0xff395f8f,0xff477aba,0xff355c93,0xff142440,0xff000003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
2146 0xff040349,0xff8ca9c9,0xff658ebf,0xff4d79af,0xff7590af,0xffadadad,0xff8b8b8b,0xffa2a9b2,0xff325788,0xff4776b0,0xff4d81bd,0xff497bba,0xff3463a2,0xff5084c3,
2147 0xff4e81bf,0xff4c7eba,0xff4979b4,0xff121e2c,0xff4a7dbb,0xff305ea0,0xff5389cc,0xff18283b,0xff4b7eba,0xff4c7fbf,0xff3a6097,0xff162541,0xff000003,0x99000000,
2148 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff05034c,0xff6f7e8f,0xff6f9bcf,0xff5b8cc5,0xff4e7eb4,0xff7690b0,0xffa2a8ae,0xff4e76a5,0xff37639e,0xff4778b7,
2149 0xff598fcf,0xff588ecf,0xff3364a5,0xff5a90d2,0xff5990d0,0xff598fd0,0xff5487c3,0xff19293a,0xff4b7ebf,0xff3f72b3,0xff5284c0,0xff1b2c3f,0xff5990d1,0xff5386c5,
2150 0xff3e659b,0xff182743,0xff000003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff07057a,0xff738293,0xff4d617a,0xff6396d3,0xff5d8fcc,0xff5787c1,
2151 0xff304b6b,0xff2a425d,0xff578bca,0xff386aab,0xff5f95d5,0xff6198d8,0xff3a6cae,0xff5d92d4,0xff6197d8,0xff6198d9,0xff5787c1,0xff21344b,0xff477abc,0xff5084c5,
2152 0xff466e9d,0xff314d6e,0xff6096d6,0xff598bca,0xff436a9f,0xff1a2945,0xff000003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff07057e,0xffa5c3e6,
2153 0xff4f647d,0xff384f6c,0xff659ad8,0xff649ad9,0xff6297d4,0xff293f58,0xff436892,0xff4d80c1,0xff4f83c4,0xff679ede,0xff4679bb,0xff5a8fd0,0xff689ede,0xff679ede,
2154 0xff5987be,0xff2a405a,0xff3f72b3,0xff5f95d6,0xff39577a,0xff476e9a,0xff669ddc,0xff5f92cf,0xff476ea4,0xff1c2a47,0xff000003,0x99000000,0x66000000,0x3d000000,
2155 0x1f000000,0x3d000000,0xff070580,0xffabcaec,0xff82b0e4,0xff3a526f,0xff334c6a,0xff6ca1df,0xff6ea3e3,0xff6699d4,0xff213245,0xff5885b9,0xff4073b5,0xff689fde,
2156 0xff5388c8,0xff578ccd,0xff6ea5e4,0xff6ea5e4,0xff5581b2,0xff314a67,0xff3e71b3,0xff6ea5e4,0xff273b52,0xff5f8fc6,0xff6da3e2,0xff6598d5,0xff4c73a8,0xff1e2c49,
2157 0xff000003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff080582,0xffb1cef0,0xff89b8ec,0xff78abe7,0xff364f6c,0xff354e6b,0xff72a8e6,0xff74abe9,
2158 0xff5e8bbd,0xff233446,0xff5789c7,0xff5387c9,0xff6096d6,0xff5388c9,0xff74abe9,0xff74abea,0xff547caa,0xff345072,0xff4f83c5,0xff71a6e3,0xff1f2e3f,0xff74abea,
2159 0xff73aae8,0xff6b9eda,0xff5177ad,0xff1f2e4b,0xff000004,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff080584,0xffb5d3f4,0xff8ebdf1,0xff7fb4f0,
2160 0xff79aeeb,0xff38516e,0xff38516e,0xff78aeeb,0xff7ab1ef,0xff4f739c,0xff334a64,0xff497dbe,0xff679ddd,0xff4e83c5,0xff7ab1ef,0xff7ab1ef,0xff51759e,0xff345277,
2161 0xff6197d7,0xff618dbe,0xff354c67,0xff7ab1ef,0xff79b0ed,0xff70a3df,0xff557bb0,0xff212f4d,0xff000004,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
2162 0xff080585,0xffbad6f6,0xff93c1f4,0xff83b9f2,0xff7fb6f2,0xff7cb3ee,0xff3b536f,0xff3b536f,0xff7cb3ee,0xff7eb6f2,0xff3b536e,0xff3f6085,0xff5288c7,0xff487dbe,
2163 0xff7fb6f2,0xff7fb6f2,0xff4e7096,0xff33557f,0xff72a9e7,0xff4e7096,0xff4e7096,0xff7eb5f2,0xff7eb4f0,0xff75a7e2,0xff587eb3,0xff22304e,0xff000004,0x99000000,
2164 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff080584,0xffb7d1f0,0xff8eb9eb,0xff80b0e9,0xff7bace7,0xff7bade7,0xff78aae4,0xff384f6a,0xff384f6a,0xff79aae4,
2165 0xff74a5dd,0xff293a4d,0xff3b6190,0xff4779b8,0xff74a6e2,0xff7aace8,0xff446082,0xff2f527e,0xff7aace7,0xff354b64,0xff628ab8,0xff7aade8,0xff79ace6,0xff709fd9,
2166 0xff5578ac,0xff212f4d,0xff000004,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff070578,0xffa1b5d2,0xff7898c5,0xff658abd,0xff6085ba,0xff5f85ba,
2167 0xff5f85ba,0xff5e82b7,0xff2c3d55,0xff2c3d55,0xff5e83b7,0xff5373a1,0xff43618a,0xff355b91,0xff5277ad,0xff5f85ba,0xff4c6fa0,0xff3a5e91,0xff5e85ba,0xff5779a9,
2168 0xff5e82b7,0xff5f85ba,0xff5f84b9,0xff577baf,0xff435d8e,0xff1c2844,0xff000004,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff060466,0xff7282a2,
2169 0xff45516a,0xff2d3b58,0xff263553,0xff253452,0xff253452,0xff253452,0xff253350,0xff172033,0xff24324f,0xff253452,0xff253452,0xff162543,0xff1a2845,0xff253452,
2170 0xff1d2c48,0xff1d2b48,0xff253452,0xff253452,0xff253452,0xff253452,0xff253351,0xff23304e,0xff1c2844,0xff0e1425,0xff000000,0x87000000,0x5a000000,0x36000000,
2171 0x17000000,0x2e000000,0xff040356,0xff03022e,0xff010112,0xff000008,0xff000004,0xff000004,0xff000004,0xff000004,0xff000004,0xff000004,0xff000004,0xff000004,
2172 0xff000004,0xff000004,0xff000004,0xff000004,0xff000004,0xff000004,0xff000004,0xff000004,0xff000004,0xff000004,0xff000004,0xff000004,0xff000004,0xff000000,
2173 0xff000000,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
2174 0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,
2175 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
2176 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,
2177 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
2178 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
2179 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
2180 0x18000000,0xf000000
2181};
2182
2106static const QRgb Rotation_data[] = { 2183static const QRgb Rotation_data[] = {
2107 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3000000,0x6000000,0xb000000,0x12000000,0x19000000,0x21000000,0x29000000,0x2f000000, 2184 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3000000,0x6000000,0xb000000,0x12000000,0x19000000,0x21000000,0x29000000,0x2f000000,
2108 0x35000000,0x38000000,0x3b040404,0x4d535353,0x5a828282,0x3d3f3f3f,0x2d060606,0x24070707,0x1b090909,0x140d0d0d,0xc151515,0x7242424,0x3000000,0x1000000, 2185 0x35000000,0x38000000,0x3b040404,0x4d535353,0x5a828282,0x3d3f3f3f,0x2d060606,0x24070707,0x1b090909,0x140d0d0d,0xc151515,0x7242424,0x3000000,0x1000000,
2109 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000, 2186 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,
2110 0x6e647e80,0xab7da6a7,0xd387b7b9,0xeb8bc0c2,0xf98dc6c8,0xfe8ac8ca,0xf97ec0c2,0xed6fb6b7,0xd8629ea2,0xcc90aeb0,0xa1849698,0x460b0b0b,0x390d0d0d,0x2b0c0c0c, 2187 0x6e647e80,0xab7da6a7,0xd387b7b9,0xeb8bc0c2,0xf98dc6c8,0xfe8ac8ca,0xf97ec0c2,0xed6fb6b7,0xd8629ea2,0xcc90aeb0,0xa1849698,0x460b0b0b,0x390d0d0d,0x2b0c0c0c,
2111 0x1f101010,0x130d0d0d,0xb171717,0x5000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000, 2188 0x1f101010,0x130d0d0d,0xb171717,0x5000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,
2112 0x16000000,0x23000000,0x84759496,0xd091b9bb,0xfaabcecf,0xffa9d0d2,0xffa1ccce,0xff9acacc,0xff90c6c8,0xff89c4c6,0xff7fc1c3,0xff74bfc1,0xff69bcbe,0xff60b9bc, 2189 0x16000000,0x23000000,0x84759496,0xd091b9bb,0xfaabcecf,0xffa9d0d2,0xffa1ccce,0xff9acacc,0xff90c6c8,0xff89c4c6,0xff7fc1c3,0xff74bfc1,0xff69bcbe,0xff60b9bc,
2113 0xfd88c1c4,0xe78bb4b7,0xa0395f62,0x4f101010,0x3a121212,0x28131313,0x19141414,0xe121212,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000, 2190 0xfd88c1c4,0xe78bb4b7,0xa0395f62,0x4f101010,0x3a121212,0x28131313,0x19141414,0xe121212,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,
@@ -2176,101 +2253,101 @@ static const QRgb Rotation_data[] = {
2176 0x18151515,0x26141414,0x38171717,0x4a151515,0x5d161616,0x6f171717,0x7e181818,0x8b1a1a1a,0x9c3a3a3a,0xa9575757,0xa74c4c4c,0x9f3a3a3a,0x98353535,0x8a252525, 2253 0x18151515,0x26141414,0x38171717,0x4a151515,0x5d161616,0x6f171717,0x7e181818,0x8b1a1a1a,0x9c3a3a3a,0xa9575757,0xa74c4c4c,0x9f3a3a3a,0x98353535,0x8a252525,
2177 0x7d181818,0x6c151515,0x5b141414,0x49111111,0x350e0e0e,0x250e0e0e,0x170b0b0b,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff, 2254 0x7d181818,0x6c151515,0x5b141414,0x49111111,0x350e0e0e,0x250e0e0e,0x170b0b0b,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,
2178 0xffffff,0x1000000,0x2000000,0x62b2b2b,0xb171717,0x120e0e0e,0x1d121212,0x29131313,0x37131313,0x44131313,0x4f131313,0x59141414,0x60181818,0x65171717, 2255 0xffffff,0x1000000,0x2000000,0x62b2b2b,0xb171717,0x120e0e0e,0x1d121212,0x29131313,0x37131313,0x44131313,0x4f131313,0x59141414,0x60181818,0x65171717,
2179 0x66171717,0x64141414,0x5f151515,0x58141414,0x4e141414,0x420f0f0f,0x350e0e0e,0x280d0d0d,0x1c090909,0x120e0e0e,0xa000000,0x5000000,0x2000000,0x1000000, 2256 0x66171717,0x64141414,0x5f151515,0x58141414,0x4e141414,0x420f0f0f,0x350e0e0e,0x280d0d0d,0x1c090909,0x120e0e0e,0xa000000,0x5000000,0x2000000,0x1000000,
2180 0xffffff,0xffffff 2257 0xffffff,0xffffff
2181}; 2258};
2182 2259
2183static const QRgb SettingsIcon_data[] = { 2260static const QRgb SettingsIcon_data[] = {
2184 0xff778145,0xff788246,0xff788246,0xff778144,0xff768141,0xff75803d,0xff737f37,0xff717d31,0xff6e7c29,0xff6b7a20,0xff697819,0xff677712,0xff627211,0x24000000, 2261 0xff889157,0xff899258,0xff899258,0xff889156,0xff879152,0xff86904e,0xff848f48,0xff828d41,0xff7f8d38,0xff7c8b2e,0xff7a8925,0xff79881d,0xff74831b,0x24000000,
2185 0xff788246,0xffcde06a,0xffcde06a,0xffccdf66,0xffc9de5e,0xffb7cc4f,0xff5c662c,0xff7d7f79,0xff838483,0xff454c23,0xff839a0d,0xff99b604,0xff5d6c11,0x6b000000, 2262 0xff899258,0xffd5e57b,0xffd5e57b,0xffd4e478,0xffd1e370,0xffc2d461,0xff6e783c,0xff8d8f8a,0xff939493,0xff575e31,0xff93a816,0xffa7c108,0xff6f7d1b,0x6b000000,
2186 0xff788246,0xffcde06a,0xffcde069,0xffcbdf64,0xffc8dd5b,0xffbdd24d,0xff687330,0xff87888c,0xffdddde9,0xff9f9fa6,0xff2c3118,0xff768a10,0xff586611,0x8f000000, 2263 0xff899258,0xffd5e57b,0xffd5e57a,0xffd3e476,0xffd1e36d,0xffc7d95f,0xff7a8440,0xff97989b,0xffe3e3ed,0xffadadb3,0xff3c4124,0xff879a1a,0xff6a781b,0x8f000000,
2187 0xff778144,0xffccdf66,0xffcbdf64,0xffc9de5e,0xffc6db54,0xffc1d946,0xffb3ca36,0xff57621e,0xff7b7c7e,0xffcfcfdc,0xff5b5b61,0xff3c4513,0xff525f11,0x8f000000, 2264 0xff889156,0xffd4e478,0xffd3e476,0xffd1e370,0xffcfe166,0xffcbdf58,0xffbed247,0xff69742b,0xff8c8d8e,0xffd7d7e2,0xff6d6d73,0xff4d571e,0xff64711b,0x8f000000,
2188 0xff768141,0xffc9de5e,0xffc8dd5b,0xff97a746,0xffa1b341,0xffbcd537,0xffb1cb26,0xff9ab317,0xff3b4312,0xffb2b2bb,0xff909097,0xff202313,0xff4d5911,0x8f000000, 2265 0xff879152,0xffd1e370,0xffd1e36d,0xffa5b458,0xffaebe52,0xffc6dc48,0xffbdd335,0xffa8be23,0xff4c541d,0xffbdbdc5,0xff9f9fa5,0xff2e311e,0xff5f6b1b,0x8f000000,
2189 0xff75803d,0xffc5db52,0xffb6ca4a,0xff4e513d,0xff585e40,0xff92a726,0xffadc917,0xffa6c601,0xff404b07,0xffb8b8be,0xff8d8d95,0xff10120a,0xff475211,0x8f000000, 2266 0xff86904e,0xffcee164,0xffc1d25c,0xff60634e,0xff6a7051,0xffa1b435,0xffb9d123,0xffb3cf03,0xff515d0d,0xffc3c3c8,0xff9c9ca4,0xff1a1d12,0xff59641b,0x8f000000,
2190 0xff737f37,0xffc1d946,0xff809032,0xff97979b,0xffb8b8c1,0xff494f2f,0xff798f07,0xff647606,0xff707361,0xffd2d2da,0xffa4a4ad,0xff222322,0xff434d11,0x8f000000, 2267 0xff848f48,0xffcbdf58,0xff909f42,0xffa5a5a9,0xffc3c3cb,0xff5b613f,0xff8a9e0d,0xff76870c,0xff818473,0xffd9d9e0,0xffb1b1b9,0xff303130,0xff545f1b,0x8f000000,
2191 0xff717d31,0xffbcd537,0xff94a92c,0xff60615c,0xffdadae6,0xffacacb5,0xff55584a,0xff7b7d73,0xffcdcdd4,0xffa9a9b2,0xff9e9ea7,0xff86868d,0xff404911,0x8f000000, 2268 0xff828d41,0xffc6dc48,0xffa3b63c,0xff72736e,0xffe0e0ea,0xffb8b8c0,0xff676a5c,0xff8c8d84,0xffd5d5db,0xffb6b6bd,0xffacacb4,0xff96969c,0xff515b1b,0x8f000000,
2192 0xff6e7c29,0xffb5d125,0xffafcb1c,0xff546115,0xff5f5f63,0xffb8b8c2,0xffd1d1db,0xffd9d9e3,0xffb5b5c0,0xff8e8e96,0xffbbbbc2,0xffbfbfca,0xff3d4611,0x8f000000, 2269 0xff7f8d38,0xffc0d834,0xffbbd329,0xff667320,0xff717175,0xffc3c3cb,0xffd8d8e1,0xffdfdfe8,0xffc0c0ca,0xff9d9da4,0xffc5c5cb,0xffc9c9d2,0xff4e581b,0x8f000000,
2193 0xff6b7a20,0xffb0ce13,0xffa9c707,0xff91ab09,0xff414b10,0xff2b2c27,0xff414144,0xff4e4e53,0xff8f8f98,0xffb1b1bb,0xffe2e2e8,0xffe8e8ee,0xff3b4311,0x8f000000, 2270 0xff7c8b2e,0xffbcd61e,0xffb6d00d,0xffa0b710,0xff525d1a,0xff3b3c36,0xff525256,0xff606065,0xff9e9ea6,0xffbdbdc5,0xffe7e7ec,0xffececf1,0xff4c541b,0x8f000000,
2194 0xff697819,0xffaaca01,0xffa0bf00,0xff91ac03,0xff7b900b,0xff586516,0xff3d441a,0xff20240e,0xff2f302f,0xff97979f,0xffcdcdd5,0xfff0f0f4,0xff3a4211,0x8f000000, 2271 0xff7a8925,0xffb6d203,0xffadc900,0xffa0b806,0xff8c9f13,0xff6a7722,0xff4e5627,0xff2e3317,0xff3f403f,0xffa5a5ad,0xffd5d5dc,0xfff3f3f6,0xff4b531b,0x8f000000,
2195 0xff677712,0xffa1c000,0xff97b400,0xff8ba501,0xff7c9303,0xff6c7f08,0xff5e6e10,0xff546016,0xff353d11,0xff333430,0xffa4a4ad,0xffd3d3dd,0xff3b4311,0x8f000000, 2272 0xff79881d,0xffaeca00,0xffa5bf00,0xff9ab203,0xff8da206,0xff7d8f0f,0xff707f1a,0xff667222,0xff464e1b,0xff434540,0xffb1b1b9,0xffdadae3,0xff4c541b,0x8f000000,
2196 0xff627211,0xff5d6c11,0xff586611,0xff525f11,0xff4d5911,0xff475211,0xff434d11,0xff404911,0xff3d4611,0xff3b4311,0xff3a4211,0xff3b4311,0xff3c4511,0x8f000000, 2273 0xff74831b,0xff6f7d1b,0xff6a781b,0xff64711b,0xff5f6b1b,0xff59641b,0xff545f1b,0xff515b1b,0xff4e581b,0xff4c541b,0xff4b531b,0xff4c541b,0xff4d571b,0x8f000000,
2197 0x24000000,0x6b000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x6b000000 2274 0x24000000,0x6b000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x6b000000
2198}; 2275};
2199 2276
2200static const QRgb Shutdown_data[] = { 2277static const QRgb Shutdown_data[] = {
2201 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3000000,0x6000000,0xb000000,0x12000000,0x19000000,0x21000000,0x29000000,0x2f000000, 2278 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3000000,0x6000000,0xb000000,0x12000000,0x19000000,0x21000000,0x29000000,0x2f000000,
2202 0x34000000,0x37000000,0x38000000,0x37000000,0x34000000,0x2f000000,0x29000000,0x21000000,0x19000000,0x12000000,0xb000000,0x6000000,0x3000000,0x1000000, 2279 0x34000000,0x37000000,0x38000000,0x37000000,0x34000000,0x2f000000,0x29000000,0x21000000,0x19000000,0x12000000,0xb000000,0x6000000,0x3000000,0x1000000,
2203 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000, 2280 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,
2204 0x5d8b4143,0x93b85357,0xbed15b5f,0xdedf5f63,0xf3e85e63,0xfeee5d61,0xf3e75457,0xe0dc4b4d,0xc4c73e42,0x9fa73032,0x70721d20,0x3f000000,0x33000000,0x26000000, 2281 0x5d9a5254,0x93c36569,0xbed86d71,0xdee47175,0xf3ec7075,0xfef16f73,0xf3eb6669,0xe0e25d5f,0xc4d04f53,0x9fb44042,0x70832a2e,0x3f000000,0x33000000,0x26000000,
2205 0x1b000000,0x11000000,0xa000000,0x5000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000, 2282 0x1b000000,0x11000000,0xa000000,0x5000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,
2206 0x16000000,0x23000000,0x6fa55154,0xbad2666a,0xf5ee7277,0xfff17275,0xffef6d71,0xffeb676a,0xffe96064,0xffe85b5e,0xffe85358,0xffe94e53,0xffec484c,0xffed4146, 2283 0x16000000,0x23000000,0x6fb26366,0xbad9787b,0xf5f18388,0xfff38386,0xfff27e82,0xffee797b,0xffed7276,0xffec6d70,0xffec656a,0xffed6065,0xffef5a5e,0xfff05258,
2207 0xf7e8393e,0xc6c12a2e,0x8884191c,0x45000000,0x33000000,0x23000000,0x16000000,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000, 2284 0xf7ec4a4f,0xc6cb393e,0x88942529,0x45000000,0x33000000,0x23000000,0x16000000,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,
2208 0x2000000,0x7000000,0xe000000,0x1a000000,0x47793d3e,0xa7cc6669,0xf5f0797c,0xfff4787c,0xfff3777b,0xffef7174,0xffe96a6e,0xffe46366,0xffde5b5f,0xffdb5458, 2285 0x2000000,0x7000000,0xe000000,0x1a000000,0x478a4e4f,0xa7d4787a,0xf5f38a8d,0xfff6898d,0xfff5888c,0xfff28285,0xffed7b7f,0xffe87578,0xffe36d71,0xffe1666a,
2209 0xffdd4f53,0xffe2494e,0xffe74348,0xffeb3d42,0xffee373c,0xffef3036,0xf8e7282e,0xbcb01a1e,0x6c4d090b,0x3e000000,0x2a000000,0x1a000000,0xe000000,0x7000000, 2286 0xffe36165,0xffe75b60,0xffeb545a,0xffee4e53,0xfff1484d,0xfff24047,0xf8eb373e,0xbcbc272b,0x6c5f1013,0x3e000000,0x2a000000,0x1a000000,0xe000000,0x7000000,
2210 0x2000000,0x1000000,0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x5f9b4f51,0xc6db7072,0xfff57d80,0xfff57b7e,0xfff47a7d,0xfff07579,0xffea6e71, 2287 0x2000000,0x1000000,0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x5fa96163,0xc6e18183,0xfff78d90,0xfff78c8e,0xfff68b8d,0xfff3868a,0xffee7f82,
2211 0xffe2676a,0xffd85e61,0xffd05457,0xffcc4e51,0xffcf484b,0xffd74447,0xffde3e43,0xffe7393d,0xffeb3237,0xffed2b31,0xffee2429,0xffed1d23,0xd7c11419,0x85670a0d, 2288 0xffe7797b,0xffde7073,0xffd76669,0xffd46063,0xffd75a5d,0xffdd5659,0xffe34f54,0xffeb4a4e,0xffee4248,0xfff03b41,0xfff13338,0xfff02a31,0xd7cb1f25,0x85791216,
2212 0x46000000,0x2e000000,0x1b000000,0xe000000,0x6000000,0x2000000,0x1000000,0x5000000,0xd000000,0x1a000000,0x5f9b4f51,0xd0e07276,0xfff57d81,0xfff47d7f, 2289 0x46000000,0x2e000000,0x1b000000,0xe000000,0x6000000,0x2000000,0x1000000,0x5000000,0xd000000,0x1a000000,0x5fa96163,0xd0e58387,0xfff78d91,0xfff68d8f,
2213 0xfff47b7e,0xfff2797c,0xffec7377,0xffe36b6e,0xffd55f63,0xffc85659,0xffffffff,0xffffffff,0xffffffff,0xffc63c40,0xffd2373b,0xffde3237,0xffe82d31,0xffeb262a, 2290 0xfff68c8e,0xfff48a8d,0xffef8488,0xffe87c7f,0xffdc7175,0xffd1686b,0xffffffff,0xffffffff,0xffffffff,0xffcf4d51,0xffd9484c,0xffe34248,0xffec3d41,0xffee3539,
2214 0xffec1e24,0xffeb181e,0xffe5171d,0xe0bd1318,0x8a5e0a0c,0x48000000,0x2e000000,0x1a000000,0xd000000,0x5000000,0x3000000,0xa000000,0x16000000,0x47793d3e, 2291 0xffef2b33,0xffee242b,0xffe9232a,0xe0c71e24,0x8a701214,0x48000000,0x2e000000,0x1a000000,0xd000000,0x5000000,0x3000000,0xa000000,0x16000000,0x478a4e4f,
2215 0xc6db7072,0xfff57d81,0xfff47d80,0xfff37c7f,0xfff0797c,0xffed7679,0xffe46d71,0xffd76567,0xffc7585b,0xffb94e51,0xffffffff,0xffffffff,0xffffffff,0xffb73438, 2292 0xc6e18183,0xfff78d91,0xfff68d90,0xfff58d8f,0xfff38a8d,0xfff0878a,0xffe87e82,0xffdd7779,0xffd06a6d,0xffc46063,0xffffffff,0xffffffff,0xffffffff,0xffc24549,
2216 0xffc43034,0xffd32b31,0xffde252b,0xffe71f25,0xffe8191e,0xffe4171d,0xffde171c,0xffd9161b,0xdbaa1116,0x7b3b0607,0x46000000,0x2a000000,0x16000000,0xa000000, 2293 0xffcd4045,0xffda3b41,0xffe3343b,0xffeb2d34,0xffec252b,0xffe8232a,0xffe32329,0xffdf2228,0xdbb61b22,0x7b4c0c0d,0x46000000,0x2a000000,0x16000000,0xa000000,
2217 0x6000000,0x11000000,0x23000000,0xa7cc6669,0xfff57d80,0xfff47d7f,0xfff27c7e,0xffee7a7c,0xffe97477,0xffe26f73,0xffd7666a,0xffc85c5f,0xffb64f52,0xffa84548, 2294 0x6000000,0x11000000,0x23000000,0xa7d4787a,0xfff78d90,0xfff68d8f,0xfff48d8e,0xfff18b8d,0xffed8588,0xffe78084,0xffdd787b,0xffd16e71,0xffc16164,0xffb5575a,
2218 0xffffffff,0xffffffff,0xffffffff,0xffa62d30,0xffb3282c,0xffc42428,0xffd21f24,0xffdb191f,0xffda161c,0xffd9161b,0xffd6161b,0xffd2151b,0xffcd151a,0xc88b0e11, 2295 0xffffffff,0xffffffff,0xffffffff,0xffb33d40,0xffbe373c,0xffcd3337,0xffd92d33,0xffe1252d,0xffe02229,0xffdf2228,0xffdd2228,0xffd92028,0xffd52027,0xc89a171b,
2219 0x60000000,0x3e000000,0x23000000,0x11000000,0xb000000,0x1b000000,0x6fa55154,0xf5f0797c,0xfff47b7e,0xfff37a7d,0xffee787b,0xffe87376,0xffdc6c70,0xffd36569, 2296 0x60000000,0x3e000000,0x23000000,0x11000000,0xb000000,0x1b000000,0x6fb26366,0xf5f38a8d,0xfff68c8e,0xfff58b8d,0xfff1898c,0xffec8487,0xffe27d81,0xffda777a,
2220 0xffc65d60,0xffc26e71,0xffcd999a,0xff993d40,0xffffffff,0xffffffff,0xffffffff,0xff982528,0xffcb8486,0xffbe4044,0xffc0181c,0xffca151a,0xffcb1519,0xffcd151a, 2297 0xffcf6f72,0xffcb7f82,0xffd5a7a8,0xffa74e51,0xffffffff,0xffffffff,0xffffffff,0xffa63437,0xffd39496,0xffc85156,0xffca2429,0xffd22027,0xffd32025,0xffd52027,
2221 0xffcb1419,0xffca151a,0xffc41419,0xf9b91217,0xa257090b,0x55000000,0x33000000,0x1b000000,0x12000000,0x26000000,0xbad2666a,0xfff4787c,0xfff47a7d,0xfff0787b, 2298 0xffd31f25,0xffd22027,0xffcd1f25,0xf9c41d23,0xa2691013,0x55000000,0x33000000,0x1b000000,0x12000000,0x26000000,0xbad9787b,0xfff6898d,0xfff68b8d,0xfff3898c,
2222 0xffe97477,0xffdc6c70,0xffce6366,0xffc25c5e,0xffd2999a,0xffeddcdc,0xffffffff,0xff8c3638,0xffffffff,0xffffffff,0xffffffff,0xff8b2023,0xffffffff,0xffedd2d3, 2299 0xffed8588,0xffe27d81,0xffd67578,0xffcb6e70,0xffd9a7a8,0xfff0e2e2,0xffffffff,0xff9b4749,0xffffffff,0xffffffff,0xffffffff,0xff9a2e31,0xffffffff,0xfff0d9da,
2223 0xffce7375,0xffb41217,0xffb71318,0xffbe1318,0xffc11419,0xffc11419,0xffbd1318,0xffb81317,0xd7860d11,0x6c000000,0x45000000,0x26000000,0x19000000,0x5d8b4143, 2300 0xffd68486,0xffbf1d23,0xffc21e24,0xffc81e24,0xffcb1f25,0xffcb1f25,0xffc71e24,0xffc31e23,0xd796161b,0x6c000000,0x45000000,0x26000000,0x19000000,0x5d9a5254,
2224 0xf5ef7377,0xfff3777b,0xfff07579,0xffea7276,0xffdf6b6f,0xffd16367,0xffbe5a5c,0xffd7a6a8,0xfffefefe,0xffffffff,0xffffffff,0xff873234,0xffffffff,0xffffffff, 2301 0xf5f28488,0xfff5888c,0xfff3868a,0xffee8387,0xffe47c80,0xffd87579,0xffc86c6e,0xffddb3b5,0xfffefefe,0xffffffff,0xffffffff,0xff974245,0xffffffff,0xffffffff,
2225 0xffffffff,0xff851b1e,0xffffffff,0xffffffff,0xfffefdfd,0xffce8587,0xffa51015,0xffae1216,0xffb21217,0xffb61217,0xffb41317,0xffb11216,0xfaa61115,0x9b3b0608, 2302 0xffffffff,0xff95282b,0xffffffff,0xffffffff,0xfffefdfd,0xffd69597,0xffb21a20,0xffba1d22,0xffbd1d23,0xffc11d23,0xffbf1e23,0xffbd1d22,0xfab31b20,0x9b4c0c0f,
2226 0x56000000,0x33000000,0x21000000,0x93ba5558,0xfff47376,0xfff37376,0xffee7073,0xffe56c6f,0xffd66467,0xffc35a5d,0xffcf9799,0xfffefefe,0xffffffff,0xffffffff, 2303 0x56000000,0x33000000,0x21000000,0x93c4676a,0xfff68487,0xfff58487,0xfff18184,0xffe97d80,0xffdd7679,0xffcc6c6f,0xffd7a5a7,0xfffefefe,0xffffffff,0xffffffff,
2227 0xffecdfdf,0xff862e31,0xffffffff,0xffffffff,0xffffffff,0xff84171a,0xffecdada,0xffffffff,0xffffffff,0xfffefdfd,0xffbe7173,0xff9b1014,0xffa41115,0xffa91116, 2304 0xffefe4e4,0xff963e41,0xffffffff,0xffffffff,0xffffffff,0xff942327,0xffefe0e0,0xffffffff,0xffffffff,0xfffefdfd,0xffc88284,0xffa91a1f,0xffb11b20,0xffb61b22,
2228 0xffab1215,0xffa81115,0xffa51115,0xc25f0a0c,0x67000000,0x3f000000,0x29000000,0xbed35d61,0xfff46f73,0xfff26e72,0xffeb6b6f,0xffdf6467,0xffcd5b5e,0xffc16b6d, 2305 0xffb71d20,0xffb51b20,0xffb21b20,0xc2711214,0x67000000,0x3f000000,0x29000000,0xbeda6f73,0xfff68084,0xfff47f83,0xffee7c80,0xffe47679,0xffd56d70,0xffcb7c7e,
2229 0xffeddbdc,0xffffffff,0xffffffff,0xffd1adae,0xffa1595a,0xff8c2c2e,0xffffffff,0xffffffff,0xffffffff,0xff8a1317,0xff9c3c3f,0xffcc9c9e,0xffffffff,0xffffffff, 2306 0xfff0e1e2,0xffffffff,0xffffffff,0xffd8b9ba,0xffae6b6c,0xff9b3c3e,0xffffffff,0xffffffff,0xffffffff,0xff9a1e23,0xffaa4d50,0xffd4aaac,0xffffffff,0xffffffff,
2230 0xffe7d0d1,0xff9d3437,0xff950f13,0xff9d1014,0xffa01014,0xffa01014,0xff9e1014,0xde730c0f,0x75000000,0x4a000000,0x2f000000,0xdee26164,0xfff36a6d,0xffef686b, 2307 0xffebd7d8,0xffab4548,0xffa4191e,0xffab1a1f,0xffad1a1f,0xffad1a1f,0xffac1a1f,0xde841419,0x75000000,0x4a000000,0x2f000000,0xdee77376,0xfff57b7e,0xfff27a7c,
2231 0xffe76567,0xffd75c60,0xffc25256,0xffd1999a,0xffffffff,0xffffffff,0xffeedfe0,0xffa85a5c,0xff952f32,0xff982a2d,0xffffffff,0xffffffff,0xffffffff,0xff940f13, 2308 0xffeb7779,0xffdd6e72,0xffcb6468,0xffd8a7a8,0xffffffff,0xffffffff,0xfff1e4e5,0xffb56c6e,0xffa43f42,0xffa6393d,0xffffffff,0xffffffff,0xffffffff,0xffa3191e,
2232 0xff8a0e11,0xff983c3e,0xffead9d9,0xffffffff,0xffffffff,0xffb7797b,0xff870e11,0xff910f13,0xff960f13,0xff960f13,0xff960f13,0xef810d10,0x81000000,0x53000000, 2309 0xff9a171b,0xffa64d4f,0xffeedfdf,0xffffffff,0xffffffff,0xffc28a8c,0xff97171b,0xffa0191e,0xffa4191e,0xffa4191e,0xffa4191e,0xef91161a,0x81000000,0x53000000,
2233 0x34000000,0xf3ec6165,0xfff36468,0xffef6266,0xffe45c60,0xffd35458,0xffbc494c,0xffe2c3c4,0xffffffff,0xffffffff,0xffd0a3a4,0xff9e3034,0xffa32d30,0xffa7282b, 2310 0x34000000,0xf3ef7377,0xfff5767a,0xfff27478,0xffe86e72,0xffda666a,0xffc65b5e,0xffe7cccd,0xffffffff,0xffffffff,0xffd7b0b1,0xffac4045,0xffb03d40,0xffb4373b,
2234 0xffffffff,0xffffffff,0xffffffff,0xff9b1013,0xff8f0e12,0xff830d10,0xffc29294,0xffffffff,0xffffffff,0xffd3b3b4,0xff7b0c0f,0xff850e10,0xff8d0e12,0xff8f0f12, 2311 0xffffffff,0xffffffff,0xffffffff,0xffa91a1e,0xff9e171d,0xff93161a,0xffcba1a3,0xffffffff,0xffffffff,0xffdabebf,0xff8c1419,0xff95171a,0xff9c171d,0xff9e191d,
2235 0xff8e0e12,0xf9870d11,0x89000000,0x59000000,0x37000000,0xfef25f63,0xfff35f63,0xffed5b5f,0xffe15659,0xffce4c50,0xffb74245,0xfff3e7e7,0xffffffff,0xffffffff, 2312 0xff9d171d,0xf997161b,0x89000000,0x59000000,0x37000000,0xfef47175,0xfff57175,0xfff06d71,0xffe6686b,0xffd65e62,0xffc25357,0xfff5ebeb,0xffffffff,0xffffffff,
2236 0xffba6e70,0xffa72c2f,0xffb0292c,0xffb62327,0xffffffff,0xffffffff,0xffffffff,0xffa11015,0xff930f12,0xff830d11,0xff9e5759,0xffffffff,0xffffffff,0xffede1e2, 2313 0xffc47f81,0xffb43c3f,0xffbc383c,0xffc13136,0xffffffff,0xffffffff,0xffffffff,0xffae1a20,0xffa2191d,0xff93161b,0xffac696b,0xffffffff,0xffffffff,0xfff0e6e7,
2237 0xff720b0e,0xff7b0d0f,0xff830d11,0xff870e12,0xff880e11,0xfe870e11,0x8e000000,0x5e000000,0x38000000,0xf3eb5559,0xfff2575c,0xffed5559,0xffe04e51,0xffcb4449, 2314 0xff831317,0xff8c1619,0xff93161b,0xff97171d,0xff98171b,0xfe97171b,0x8e000000,0x5e000000,0x38000000,0xf3ee676b,0xfff4696e,0xfff0676b,0xffe56063,0xffd3565b,
2238 0xffb53a3e,0xfffefdfd,0xffffffff,0xffffffff,0xffa94144,0xffad2629,0xffbb2326,0xffc41d22,0xffc51419,0xffbd1317,0xffb31217,0xffa61015,0xff940f13,0xff810d10, 2315 0xffc04b4f,0xfffefdfd,0xffffffff,0xffffffff,0xffb65256,0xffb93538,0xffc53135,0xffcd2a30,0xffce1f25,0xffc71e23,0xffbe1d23,0xffb31a20,0xffa3191e,0xff91161a,
2239 0xff81292b,0xffffffff,0xffffffff,0xfffdfcfc,0xff6a0a0d,0xff740c0f,0xff7c0d10,0xff800d11,0xff820d10,0xfa7b0c0f,0x90000000,0x5f000000,0x37000000,0xe0df4c4f, 2316 0xff91383b,0xffffffff,0xffffffff,0xfffdfdfd,0xff7b1216,0xff851419,0xff8d161a,0xff90161b,0xff92161a,0xfa8c1419,0x90000000,0x5f000000,0x37000000,0xe0e45e61,
2240 0xfff15156,0xffec4c51,0xffe0474a,0xffcd3e42,0xffb63337,0xfff3e5e6,0xffffffff,0xffffffff,0xffbb6467,0xffad1e22,0xffbd1a1f,0xffc8151a,0xffc41419,0xffbc1318, 2317 0xfff36368,0xffef5e63,0xffe5595c,0xffd54f53,0xffc14348,0xfff5e9ea,0xffffffff,0xffffffff,0xffc57679,0xffb92b30,0xffc7272d,0xffd12027,0xffcd1f25,0xffc61e24,
2241 0xffb11216,0xffa21015,0xff8e0e12,0xff790c0f,0xff975658,0xffffffff,0xffffffff,0xffebe1e1,0xff650b0d,0xff6f0b0e,0xff760c0f,0xff7b0d10,0xff7d0d10,0xf26a0b0e, 2318 0xffbd1d22,0xffaf1a20,0xff9d171d,0xff8a1419,0xffa5686a,0xffffffff,0xffffffff,0xffeee6e6,0xff771316,0xff801317,0xff871419,0xff8c161a,0xff8d161a,0xf27b1317,
2242 0x8e000000,0x5e000000,0x34000000,0xc4c93f43,0xfff1494e,0xffed454a,0xffe13f43,0xffd0373b,0xffb92e31,0xffe2bbbc,0xffffffff,0xffffffff,0xffd09899,0xffa51418, 2319 0x8e000000,0x5e000000,0x34000000,0xc4d15054,0xfff35b60,0xfff0575c,0xffe65054,0xffd7484c,0xffc43e41,0xffe7c5c6,0xffffffff,0xffffffff,0xffd7a6a7,0xffb21f24,
2243 0xffb21216,0xffb91217,0xffb91218,0xffb11216,0xffa51115,0xff950f12,0xff800d10,0xff6d0b0e,0xffb79192,0xffffffff,0xffffffff,0xffcbb3b3,0xff620a0c,0xff6c0b0e, 2320 0xffbd1d22,0xffc41d23,0xffc41d24,0xffbd1d22,0xffb21b20,0xffa4191d,0xff90161a,0xff7e1317,0xffc2a0a1,0xffffffff,0xffffffff,0xffd3bebe,0xff741214,0xff7d1317,
2244 0xff720b0e,0xff760c0f,0xff770c0f,0xe558090b,0x89000000,0x59000000,0x2f000000,0x9fa93034,0xfff04247,0xffec3d42,0xffe4383d,0xffd43034,0xffbf272c,0xffcf8385, 2321 0xff831317,0xff871419,0xff881419,0xe56a1013,0x89000000,0x59000000,0x2f000000,0x9fb64045,0xfff35359,0xffef4e53,0xffe8494e,0xffdb4045,0xffc9363c,0xffd79395,
2245 0xffffffff,0xffffffff,0xffeed9da,0xffab3d40,0xff9f1014,0xffa41014,0xffa51115,0xff9f1014,0xff930f12,0xff830d10,0xff710c0e,0xff7f393b,0xffe4d8d9,0xffffffff, 2322 0xffffffff,0xffffffff,0xfff1dfe0,0xffb74e51,0xffad1a1f,0xffb11a1f,0xffb21b20,0xffad1a1f,0xffa2191d,0xff93161a,0xff821417,0xff8f4a4c,0xffe8dedf,0xffffffff,
2246 0xffffffff,0xffa37778,0xff600a0c,0xff680b0d,0xff6e0b0e,0xff700c0e,0xff740c0f,0xd1400608,0x81000000,0x53000000,0x29000000,0x70721d20,0xf7e9393e,0xffed373c, 2323 0xffffffff,0xffb08889,0xff721214,0xff7a1316,0xff7f1317,0xff811417,0xff851419,0xd1510c0f,0x81000000,0x53000000,0x29000000,0x70832a2e,0xf7ed4a4f,0xfff0484d,
2247 0xffe73136,0xffda2a2f,0xffc82227,0xffbe3e42,0xffecd2d2,0xffffffff,0xffffffff,0xffce9d9e,0xffa13c40,0xff8e0e12,0xff8e0e12,0xff870e11,0xff7e0d10,0xff710b0e, 2324 0xffeb4147,0xffe0393f,0xffd13036,0xffc84f53,0xffefd9d9,0xffffffff,0xffffffff,0xffd6abac,0xffae4d51,0xff9d171d,0xff9d171d,0xff97171b,0xff8e161a,0xff821317,
2248 0xff80393c,0xffba9b9b,0xffffffff,0xffffffff,0xffded0d0,0xff733031,0xff610a0d,0xff670a0d,0xff6c0b0e,0xff6f0b0e,0xfc6c0a0d,0xb5220404,0x75000000,0x4a000000, 2325 0xff904a4d,0xffc4a9a9,0xffffffff,0xffffffff,0xffe3d7d7,0xff844041,0xff731216,0xff791216,0xff7d1317,0xff801317,0xfc7d1216,0xb5300808,0x75000000,0x4a000000,
2249 0x21000000,0x3f000000,0xc6c12a2e,0xffee3036,0xffe82a30,0xffdf2428,0xffd11c21,0xffbe161a,0xffca7274,0xfffefdfd,0xffffffff,0xffffffff,0xffead9d9,0xffc39294, 2326 0x21000000,0x3f000000,0xc6cb393e,0xfff14047,0xffec3940,0xffe43337,0xffd8292f,0xffc82227,0xffd28385,0xfffefdfd,0xffffffff,0xffffffff,0xffeedfdf,0xffcca1a3,
2250 0xffa15759,0xff82292c,0xff975658,0xffb79192,0xffe4d8d9,0xffffffff,0xffffffff,0xfffefdfd,0xff9a6d6f,0xff5b0a0b,0xff620a0c,0xff680a0d,0xff6a0b0e,0xff6d0b0e, 2327 0xffae696b,0xff92383c,0xffa5686a,0xffc2a0a1,0xffe8dedf,0xffffffff,0xffffffff,0xfffefdfd,0xffa87e80,0xff6d1213,0xff741214,0xff7a1216,0xff7b1317,0xff7e1317,
2251 0xe64e080a,0x93000000,0x67000000,0x3f000000,0x19000000,0x33000000,0x8884191c,0xf8e6282e,0xffea2328,0xffe41d23,0xffd9171c,0xffc51419,0xffb01216,0xffcb8587, 2328 0xe6600f12,0x93000000,0x67000000,0x3f000000,0x19000000,0x33000000,0x88942529,0xf8ea373e,0xffee3137,0xffe82a31,0xffdf2329,0xffce1f25,0xffbc1d22,0xffd39597,
2252 0xfffefdfd,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefdfd,0xffa78183,0xff59090b,0xff60090c, 2329 0xfffefdfd,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefdfd,0xffb49193,0xff6b1013,0xff721014,
2253 0xff640a0d,0xff680b0d,0xff6a0b0e,0xfc680a0d,0xc32b0405,0x81000000,0x56000000,0x33000000,0x12000000,0x26000000,0x45000000,0xbcb01a1e,0xffec1d23,0xffe7181d, 2330 0xff761216,0xff7a1316,0xff7b1317,0xfc7a1216,0xc33b080a,0x81000000,0x56000000,0x33000000,0x12000000,0x26000000,0x45000000,0xbcbc272b,0xffef2a31,0xffeb242a,
2254 0xffda161c,0xffc91519,0xffb71318,0xffa51015,0xffbe7173,0xffe7d0d1,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffded0d0, 2331 0xffe02229,0xffd12025,0xffc21e24,0xffb21a20,0xffc88284,0xffebd7d8,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe3d7d7,
2255 0xff9a6d6f,0xff59090b,0xff5e090c,0xff620a0d,0xff660a0d,0xff680b0d,0xff6a0b0d,0xdf430709,0x94000000,0x6c000000,0x45000000,0x26000000,0xb000000,0x1b000000, 2332 0xffa87e80,0xff6b1013,0xff701014,0xff741216,0xff781216,0xff7a1316,0xff7b1316,0xdf540d10,0x94000000,0x6c000000,0x45000000,0x26000000,0xb000000,0x1b000000,
2256 0x33000000,0x6c4d090b,0xd7c01419,0xffe3171d,0xffd9161b,0xffcd151a,0xffbd1317,0xffae1216,0xff9c1014,0xff9e3437,0xffb8797b,0xffd3b3b4,0xffede1e2,0xfffdfcfc, 2333 0x33000000,0x6c5f1013,0xd7ca1f25,0xffe8232a,0xffdf2228,0xffd52027,0xffc71e23,0xffba1d22,0xffaa1a1f,0xffac4548,0xffc38a8c,0xffdabebf,0xfff0e6e7,0xfffdfdfd,
2257 0xffebe1e1,0xffccb3b3,0xffa47778,0xff743031,0xff5d0a0c,0xff60090c,0xff620a0d,0xff660a0d,0xff670b0d,0xff690b0d,0xed50080a,0xae160203,0x7b000000,0x55000000, 2334 0xffeee6e6,0xffd4bebe,0xffb18889,0xff854041,0xff6f1214,0xff721014,0xff741216,0xff781216,0xff791316,0xff7a1316,0xed620f12,0xae220506,0x7b000000,0x55000000,
2258 0x33000000,0x1b000000,0x6000000,0x11000000,0x23000000,0x3e000000,0x85670a0d,0xe0bc1318,0xffd6161b,0xffcd141a,0xffc21419,0xffb41217,0xffa61115,0xff970f13, 2335 0x33000000,0x1b000000,0x6000000,0x11000000,0x23000000,0x3e000000,0x85791216,0xe0c61e24,0xffdd2228,0xffd51f27,0xffcb1f25,0xffbf1d23,0xffb31b20,0xffa5191e,
2259 0xff8a0e12,0xff7f0d10,0xff740c0e,0xff6d0b0d,0xff680b0e,0xff650a0d,0xff640a0d,0xff620a0d,0xff630a0c,0xff650a0d,0xff660a0d,0xff670b0d,0xff690b0d,0xf054080a, 2336 0xff9a171d,0xff8f161a,0xff851417,0xff7e1316,0xff7a1317,0xff771216,0xff761216,0xff741216,0xff751214,0xff771216,0xff781216,0xff791316,0xff7a1316,0xf0660f12,
2260 0xbc220304,0x85000000,0x60000000,0x3e000000,0x23000000,0x11000000,0x3000000,0xa000000,0x16000000,0x2a000000,0x46000000,0x8a5e0a0c,0xdba91116,0xffca151a, 2337 0xbc300608,0x85000000,0x60000000,0x3e000000,0x23000000,0x11000000,0x3000000,0xa000000,0x16000000,0x2a000000,0x46000000,0x8a701214,0xdbb61b22,0xffd22027,
2261 0xffc11419,0xffb71217,0xffac1216,0xffa01014,0xff930f13,0xff890e11,0xff800d10,0xff770c0f,0xff720c0e,0xff6e0b0e,0xff6c0b0d,0xff6a0b0e,0xff690a0d,0xff690b0d, 2338 0xffcb1f25,0xffc21d23,0xffb81d22,0xffad1a1f,0xffa2191e,0xff99171b,0xff90161a,0xff881419,0xff831417,0xff7f1317,0xff7d1316,0xff7b1317,0xff7a1216,0xff7a1316,
2262 0xff6a0b0e,0xff690b0d,0xed50080a,0xbc220304,0x88000000,0x66000000,0x46000000,0x2a000000,0x16000000,0xa000000,0x1000000,0x5000000,0xd000000,0x1a000000, 2339 0xff7b1317,0xff7a1316,0xed620f12,0xbc300608,0x88000000,0x66000000,0x46000000,0x2a000000,0x16000000,0xa000000,0x1000000,0x5000000,0xd000000,0x1a000000,
2263 0x2e000000,0x48000000,0x7b3b0607,0xc88a0e11,0xf9b81217,0xffb51317,0xffae1215,0xffa31014,0xff990f13,0xff8e0e12,0xff870e11,0xff800d11,0xff7a0c10,0xff750c0f, 2340 0x2e000000,0x48000000,0x7b4c0c0d,0xc89a171b,0xf9c31d23,0xffc01e23,0xffba1d20,0xffb01a1f,0xffa7191e,0xff9d171d,0xff97171b,0xff90161b,0xff8b141a,0xff861419,
2264 0xff720b0e,0xff6e0c0e,0xff6d0b0e,0xff6b0b0e,0xfc680a0d,0xdf430709,0xae160203,0x85000000,0x66000000,0x48000000,0x2e000000,0x1a000000,0xd000000,0x5000000, 2341 0xff831317,0xff7f1417,0xff7e1317,0xff7c1317,0xfc7a1216,0xdf540d10,0xae220506,0x85000000,0x66000000,0x48000000,0x2e000000,0x1a000000,0xd000000,0x5000000,
2265 0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x2e000000,0x46000000,0x60000000,0xa257090b,0xd7850d11,0xfaa51115,0xffa41115,0xff9c1014,0xff940f13, 2342 0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x2e000000,0x46000000,0x60000000,0xa2691013,0xd795161b,0xfab21b20,0xffb11b20,0xffaa1a1f,0xffa3191e,
2266 0xff8b0e12,0xff850e11,0xff7f0d10,0xff7b0d10,0xff750c0f,0xff730c0f,0xfc6c0a0d,0xe64e080a,0xc32b0405,0x94000000,0x7b000000,0x60000000,0x46000000,0x2e000000, 2343 0xff9a171d,0xff95171b,0xff8f161a,0xff8c161a,0xff861419,0xff841419,0xfc7d1216,0xe6600f12,0xc33b080a,0x94000000,0x7b000000,0x60000000,0x46000000,0x2e000000,
2267 0x1b000000,0xe000000,0x6000000,0x2000000,0xffffff,0x1000000,0x2000000,0x7000000,0xe000000,0x1a000000,0x2a000000,0x3e000000,0x55000000,0x6c000000, 2344 0x1b000000,0xe000000,0x6000000,0x2000000,0xffffff,0x1000000,0x2000000,0x7000000,0xe000000,0x1a000000,0x2a000000,0x3e000000,0x55000000,0x6c000000,
2268 0x9b3b0608,0xc25f0a0c,0xde730c0f,0xef810d10,0xf9870d11,0xfe870e11,0xfa7b0c0f,0xf26a0b0e,0xe558090b,0xd1400608,0xb5220404,0x93000000,0x81000000,0x6c000000, 2345 0x9b4c0c0f,0xc2711214,0xde841419,0xef91161a,0xf997161b,0xfe97171b,0xfa8c1419,0xf27b1317,0xe56a1013,0xd1510c0f,0xb5300808,0x93000000,0x81000000,0x6c000000,
2269 0x55000000,0x3e000000,0x2a000000,0x1a000000,0xe000000,0x7000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000, 2346 0x55000000,0x3e000000,0x2a000000,0x1a000000,0xe000000,0x7000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,
2270 0x16000000,0x23000000,0x33000000,0x45000000,0x56000000,0x67000000,0x75000000,0x81000000,0x89000000,0x8e000000,0x90000000,0x8e000000,0x89000000,0x81000000, 2347 0x16000000,0x23000000,0x33000000,0x45000000,0x56000000,0x67000000,0x75000000,0x81000000,0x89000000,0x8e000000,0x90000000,0x8e000000,0x89000000,0x81000000,
2271 0x75000000,0x67000000,0x56000000,0x45000000,0x33000000,0x23000000,0x16000000,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff, 2348 0x75000000,0x67000000,0x56000000,0x45000000,0x33000000,0x23000000,0x16000000,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,
2272 0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,0x33000000,0x3f000000,0x4a000000,0x53000000,0x59000000,0x5e000000, 2349 0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,0x33000000,0x3f000000,0x4a000000,0x53000000,0x59000000,0x5e000000,
2273 0x5f000000,0x5e000000,0x59000000,0x53000000,0x4a000000,0x3f000000,0x33000000,0x26000000,0x1b000000,0x11000000,0xa000000,0x5000000,0x2000000,0x1000000, 2350 0x5f000000,0x5e000000,0x59000000,0x53000000,0x4a000000,0x3f000000,0x33000000,0x26000000,0x1b000000,0x11000000,0xa000000,0x5000000,0x2000000,0x1000000,
2274 0xffffff,0xffffff 2351 0xffffff,0xffffff
2275}; 2352};
2276 2353
@@ -3251,44 +3328,44 @@ static const QRgb appearance_data[] = {
3251 0x0,0x0,0xdcdcdc,0xff000000,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xff000000,0xdcdcdc,0x0,0xdcdcdc,0x0, 3328 0x0,0x0,0xdcdcdc,0xff000000,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xff000000,0xdcdcdc,0x0,0xdcdcdc,0x0,
3252 0x0,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0xdcdcdc,0xdcdcdc, 3329 0x0,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0xdcdcdc,0xdcdcdc,
3253 0xdcdcdc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 3330 0xdcdcdc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3254 0x0,0x0,0x0,0x0 3331 0x0,0x0,0x0,0x0
3255}; 3332};
3256 3333
3257static const QRgb back_data[] = { 3334static const QRgb back_data[] = {
3258 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 3335 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
3259 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x7a5a6163,0xff000000,0xff000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,0xffffff, 3336 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x7a6c7375,0xff000000,0xff000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,0xffffff,
3260 0xffffff,0xffffff,0xffffff,0xffffff,0x7a5a6163,0xfc151717,0xffffffff,0xff000000,0x6b000000,0x24000000,0xffffff,0xffffff,0xffffff,0xffffff, 3337 0xffffff,0xffffff,0xffffff,0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xff000000,0x6b000000,0x24000000,0xffffff,0xffffff,0xffffff,0xffffff,
3261 0xffffff,0xffffff,0xffffff,0x7a5a6163,0xfc151717,0xffffffff,0xfffbfbfb,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,0xffffff, 3338 0xffffff,0xffffff,0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xfffcfcfc,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,0xffffff,
3262 0xffffff,0xffffff,0x7a5a6163,0xfc151717,0xffffffff,0xffffffff,0xfff7f7f7,0xff000000,0xff000000,0xff000000,0xff000000,0x24000000,0xc000000,0xffffff, 3339 0xffffff,0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xffffffff,0xfff8f8f8,0xff000000,0xff000000,0xff000000,0xff000000,0x24000000,0xc000000,0xffffff,
3263 0xffffff,0x7a5a6163,0xfc151717,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xffffffff,0xffffffff,0xfff3f3f3,0xff000000,0x6b000000,0x24000000,0xffffff, 3340 0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xffffffff,0xffffffff,0xfff5f5f5,0xff000000,0x6b000000,0x24000000,0xffffff,
3264 0xffffff,0xe0383d3e,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff4f4f4,0xfff4f4f4,0xffeaeaea,0xffcbcbcb,0xff000000,0x8f000000,0x30000000,0xffffff, 3341 0xffffff,0xe0494e4f,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff6f6f6,0xfff6f6f6,0xffeeeeee,0xffd3d3d3,0xff000000,0x8f000000,0x30000000,0xffffff,
3265 0xffffff,0x69545a5b,0xfd151717,0xfffbfbfb,0xfffbfbfb,0xfff2f2f2,0xffd6d6d6,0xffc3c3c3,0xffbfbfbf,0xffbfbfbf,0xff000000,0x8f000000,0x30000000,0xffffff, 3342 0xffffff,0x69666c6d,0xfd202323,0xfffcfcfc,0xfffcfcfc,0xfff4f4f4,0xffdddddd,0xffcccccc,0xffc9c9c9,0xffc9c9c9,0xff000000,0x8f000000,0x30000000,0xffffff,
3266 0xffffff,0xd000000,0x8344494a,0xfd151617,0xfff2f2f2,0xffe9e9e9,0xffc3c3c3,0xff000000,0xff000000,0xff000000,0xff000000,0x8f000000,0x30000000,0xffffff, 3343 0xffffff,0xd000000,0x83565b5c,0xfd202223,0xfff4f4f4,0xffededed,0xffcccccc,0xff000000,0xff000000,0xff000000,0xff000000,0x8f000000,0x30000000,0xffffff,
3267 0xffffff,0x2000000,0x14000000,0x88414648,0xfe151718,0xffe4e4e4,0xffc2c2c2,0xff000000,0xb3000000,0x9b000000,0x8f000000,0x6b000000,0x24000000,0xffffff, 3344 0xffffff,0x2000000,0x14000000,0x8852585a,0xfe202324,0xffe8e8e8,0xffcbcbcb,0xff000000,0xb3000000,0x9b000000,0x8f000000,0x6b000000,0x24000000,0xffffff,
3268 0xffffff,0xffffff,0x2000000,0x14000000,0x88414648,0xfe151718,0xffcbcbcb,0xff000000,0x9b000000,0x54000000,0x30000000,0x24000000,0xc000000,0xffffff, 3345 0xffffff,0xffffff,0x2000000,0x14000000,0x8852585a,0xfe202324,0xffd3d3d3,0xff000000,0x9b000000,0x54000000,0x30000000,0x24000000,0xc000000,0xffffff,
3269 0xffffff,0xffffff,0xffffff,0x2000000,0x14000000,0x88414648,0xff000000,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,0xffffff, 3346 0xffffff,0xffffff,0xffffff,0x2000000,0x14000000,0x8852585a,0xff000000,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,0xffffff,
3270 0xffffff,0xffffff,0xffffff,0xffffff,0x2000000,0x14000000,0x45000000,0x7b000000,0x6b000000,0x24000000,0xffffff,0xffffff,0xffffff,0xffffff, 3347 0xffffff,0xffffff,0xffffff,0xffffff,0x2000000,0x14000000,0x45000000,0x7b000000,0x6b000000,0x24000000,0xffffff,0xffffff,0xffffff,0xffffff,
3271 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x2000000,0x10000000,0x26000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,0xffffff 3348 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x2000000,0x10000000,0x26000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,0xffffff
3272}; 3349};
3273 3350
3274static const QRgb back_inactive_data[] = { 3351static const QRgb back_inactive_data[] = {
3275 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 3352 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
3276 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x3d5e5e5e,0x7f000000,0x7f000000,0x12000000,0x6000000,0xffffff,0xffffff,0xffffff,0xffffff, 3353 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x3d707070,0x7f000000,0x7f000000,0x12000000,0x6000000,0xffffff,0xffffff,0xffffff,0xffffff,
3277 0xffffff,0xffffff,0xffffff,0xffffff,0x3d5e5e5e,0x7e161616,0x7fffffff,0x7f000000,0x35000000,0x12000000,0xffffff,0xffffff,0xffffff,0xffffff, 3354 0xffffff,0xffffff,0xffffff,0xffffff,0x3d707070,0x7e222222,0x7fffffff,0x7f000000,0x35000000,0x12000000,0xffffff,0xffffff,0xffffff,0xffffff,
3278 0xffffff,0xffffff,0xffffff,0x3d5e5e5e,0x7e161616,0x7fffffff,0x7ffbfbfb,0x7f000000,0x47000000,0x18000000,0xffffff,0xffffff,0xffffff,0xffffff, 3355 0xffffff,0xffffff,0xffffff,0x3d707070,0x7e222222,0x7fffffff,0x7ffcfcfc,0x7f000000,0x47000000,0x18000000,0xffffff,0xffffff,0xffffff,0xffffff,
3279 0xffffff,0xffffff,0x3d5e5e5e,0x7e161616,0x7fffffff,0x7fffffff,0x7ff7f7f7,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x12000000,0x6000000,0xffffff, 3356 0xffffff,0xffffff,0x3d707070,0x7e222222,0x7fffffff,0x7fffffff,0x7ff8f8f8,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x12000000,0x6000000,0xffffff,
3280 0xffffff,0x3d5e5e5e,0x7e161616,0x7fffffff,0x7fffffff,0x7fffffff,0x7ffefefe,0x7fffffff,0x7fffffff,0x7ff3f3f3,0x7f000000,0x35000000,0x12000000,0xffffff, 3357 0xffffff,0x3d707070,0x7e222222,0x7fffffff,0x7fffffff,0x7fffffff,0x7ffefefe,0x7fffffff,0x7fffffff,0x7ff5f5f5,0x7f000000,0x35000000,0x12000000,0xffffff,
3281 0xffffff,0x703b3b3b,0x7fffffff,0x7fffffff,0x7fffffff,0x7fffffff,0x7ff4f4f4,0x7ff4f4f4,0x7feaeaea,0x7fcbcbcb,0x7f000000,0x47000000,0x18000000,0xffffff, 3358 0xffffff,0x704c4c4c,0x7fffffff,0x7fffffff,0x7fffffff,0x7fffffff,0x7ff6f6f6,0x7ff6f6f6,0x7feeeeee,0x7fd3d3d3,0x7f000000,0x47000000,0x18000000,0xffffff,
3282 0xffffff,0x34575757,0x7e161616,0x7ffbfbfb,0x7ffbfbfb,0x7ff2f2f2,0x7fd6d6d6,0x7fc3c3c3,0x7fbfbfbf,0x7fbfbfbf,0x7f000000,0x47000000,0x18000000,0xffffff, 3359 0xffffff,0x34696969,0x7e222222,0x7ffcfcfc,0x7ffcfcfc,0x7ff4f4f4,0x7fdddddd,0x7fcccccc,0x7fc9c9c9,0x7fc9c9c9,0x7f000000,0x47000000,0x18000000,0xffffff,
3283 0xffffff,0x6000000,0x41474747,0x7e161616,0x7ff2f2f2,0x7fe9e9e9,0x7fc3c3c3,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x47000000,0x18000000,0xffffff, 3360 0xffffff,0x6000000,0x41595959,0x7e222222,0x7ff4f4f4,0x7fededed,0x7fcccccc,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x47000000,0x18000000,0xffffff,
3284 0xffffff,0x1000000,0xa000000,0x44444444,0x7f161616,0x7fe4e4e4,0x7fc2c2c2,0x7f000000,0x59000000,0x4d000000,0x47000000,0x35000000,0x12000000,0xffffff, 3361 0xffffff,0x1000000,0xa000000,0x44565656,0x7f222222,0x7fe8e8e8,0x7fcbcbcb,0x7f000000,0x59000000,0x4d000000,0x47000000,0x35000000,0x12000000,0xffffff,
3285 0xffffff,0xffffff,0x1000000,0xa000000,0x44444444,0x7f161616,0x7fcbcbcb,0x7f000000,0x4d000000,0x2a000000,0x18000000,0x12000000,0x6000000,0xffffff, 3362 0xffffff,0xffffff,0x1000000,0xa000000,0x44565656,0x7f222222,0x7fd3d3d3,0x7f000000,0x4d000000,0x2a000000,0x18000000,0x12000000,0x6000000,0xffffff,
3286 0xffffff,0xffffff,0xffffff,0x1000000,0xa000000,0x44444444,0x7f000000,0x7f000000,0x47000000,0x18000000,0xffffff,0xffffff,0xffffff,0xffffff, 3363 0xffffff,0xffffff,0xffffff,0x1000000,0xa000000,0x44565656,0x7f000000,0x7f000000,0x47000000,0x18000000,0xffffff,0xffffff,0xffffff,0xffffff,
3287 0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0xa000000,0x22000000,0x3d000000,0x35000000,0x12000000,0xffffff,0xffffff,0xffffff,0xffffff, 3364 0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0xa000000,0x22000000,0x3d000000,0x35000000,0x12000000,0xffffff,0xffffff,0xffffff,0xffffff,
3288 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x8000000,0x13000000,0x12000000,0x6000000,0xffffff,0xffffff,0xffffff,0xffffff 3365 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x8000000,0x13000000,0x12000000,0x6000000,0xffffff,0xffffff,0xffffff,0xffffff
3289}; 3366};
3290 3367
3291static const QRgb background_data[] = { 3368static const QRgb background_data[] = {
3292 0x81a1a1a1,0x81a5a5a5,0x81a9a9a9,0x81acacac,0x81adadad,0x81ababab,0x81a4a4a4,0x819d9d9d,0x81989898,0x81989898,0x819f9f9f,0x81a7a7a7,0x81acacac,0x81adadad, 3369 0x81a1a1a1,0x81a5a5a5,0x81a9a9a9,0x81acacac,0x81adadad,0x81ababab,0x81a4a4a4,0x819d9d9d,0x81989898,0x81989898,0x819f9f9f,0x81a7a7a7,0x81acacac,0x81adadad,
3293 0x81a9a9a9,0x81a4a4a4,0x819d9d9d,0x81989898,0x81969696,0x81999999,0x81a1a1a1,0x81a9a9a9,0x81aeaeae,0x81aeaeae,0x81a9a9a9,0x81a1a1a1,0x81999999,0x81939393, 3370 0x81a9a9a9,0x81a4a4a4,0x819d9d9d,0x81989898,0x81969696,0x81999999,0x81a1a1a1,0x81a9a9a9,0x81aeaeae,0x81aeaeae,0x81a9a9a9,0x81a1a1a1,0x81999999,0x81939393,
3294 0x81909090,0x81939393,0x81989898,0x819d9d9d,0x81a4a4a4,0x81a5a5a5,0x81a8a8a8,0x81a8a8a8,0x81a8a8a8,0x81a7a7a7,0x81a0a0a0,0x819b9b9b,0x81959595,0x81989898, 3371 0x81909090,0x81939393,0x81989898,0x819d9d9d,0x81a4a4a4,0x81a5a5a5,0x81a8a8a8,0x81a8a8a8,0x81a8a8a8,0x81a7a7a7,0x81a0a0a0,0x819b9b9b,0x81959595,0x81989898,
@@ -3378,29 +3455,29 @@ static const QRgb beam_data[] = {
3378 0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff303030,0xff303030,0xff303030,0xff303030,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc, 3455 0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff303030,0xff303030,0xff303030,0xff303030,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,
3379 0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff303030,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff303030,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc, 3456 0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff303030,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff303030,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,
3380 0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff303030,0xff303030,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc, 3457 0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff303030,0xff303030,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,
3381 0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff303030,0xff303030,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc, 3458 0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff303030,0xff303030,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,
3382 0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc 3459 0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc
3383}; 3460};
3384 3461
3385static const QRgb bell_data[] = { 3462static const QRgb bell_data[] = {
3386 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x95020202,0x1c000000,0x32000000,0x2d000000,0x10000000,0xffffff,0xffffff, 3463 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x95050505,0x1c000000,0x32000000,0x2d000000,0x10000000,0xffffff,0xffffff,
3387 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0x56000000,0xb6858585,0xc57b7b7b,0x62000000,0x14000000,0xffffff, 3464 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0x56000000,0xb6959595,0xc58c8c8c,0x62000000,0x14000000,0xffffff,
3388 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffc0c0c0,0xff000000,0x8e000000,0x93000000,0xffdcdcdc,0xe68c8c8c,0x69000000,0x14000000, 3465 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffcacaca,0xff000000,0x8e000000,0x93000000,0xffe2e2e2,0xe69b9b9b,0x69000000,0x14000000,
3389 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffc0c0c0,0xffffffff,0xff000000,0xc6464646,0xba4a4a4a,0xb7000000,0xffdcdcdc,0xe38d8d8d,0x47000000, 3466 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffcacaca,0xffffffff,0xff000000,0xc6585858,0xba5c5c5c,0xb7000000,0xffe2e2e2,0xe39c9c9c,0x47000000,
3390 0xff000000,0xff000000,0xff000000,0xff000000,0xffc0c0c0,0xffffffff,0xffffffff,0xff000000,0xb6000000,0xffdcdcdc,0xc4474747,0xc1000000,0xffdcdcdc,0x71000000, 3467 0xff000000,0xff000000,0xff000000,0xff000000,0xffcacaca,0xffffffff,0xffffffff,0xff000000,0xb6000000,0xffe2e2e2,0xc4595959,0xc1000000,0xffe2e2e2,0x71000000,
3391 0xff000000,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffe6e6e6,0xffe6e6e6,0xffe6e6e6,0xff000000,0x9e000000,0xae000000,0xffdcdcdc,0xc4000000,0xffdcdcdc,0x7d000000, 3468 0xff000000,0xffbababa,0xffbababa,0xffbababa,0xffeaeaea,0xffeaeaea,0xffeaeaea,0xff000000,0x9e000000,0xae000000,0xffe2e2e2,0xc4000000,0xffe2e2e2,0x7d000000,
3392 0xff000000,0xffc6c6c6,0xffc6c6c6,0xffc6c6c6,0xffc6c6c6,0xffc6c6c6,0xffc6c6c6,0xff000000,0x8f000000,0x95000000,0xffdcdcdc,0xd1000000,0xffdcdcdc,0x7d000000, 3469 0xff000000,0xffcfcfcf,0xffcfcfcf,0xffcfcfcf,0xffcfcfcf,0xffcfcfcf,0xffcfcfcf,0xff000000,0x8f000000,0x95000000,0xffe2e2e2,0xd1000000,0xffe2e2e2,0x7d000000,
3393 0xff000000,0xff7d7d7d,0xff7d7d7d,0xff7d7d7d,0xffa7a7a7,0xffa6a6a6,0xffa6a6a6,0xff000000,0x9e000000,0xae000000,0xffdcdcdc,0xc4000000,0xffdcdcdc,0x7d000000, 3470 0xff000000,0xff8d8d8d,0xff8d8d8d,0xff8d8d8d,0xffb4b4b4,0xffb3b3b3,0xffb3b3b3,0xff000000,0x9e000000,0xae000000,0xffe2e2e2,0xc4000000,0xffe2e2e2,0x7d000000,
3394 0xff000000,0xff000000,0xff000000,0xff000000,0xff6b6b6b,0xff8e8e8e,0xff8e8e8e,0xff000000,0xb6000000,0xffdcdcdc,0xc4474747,0xc1000000,0xffdcdcdc,0x71000000, 3471 0xff000000,0xff000000,0xff000000,0xff000000,0xff7c7c7c,0xff9d9d9d,0xff9d9d9d,0xff000000,0xb6000000,0xffe2e2e2,0xc4595959,0xc1000000,0xffe2e2e2,0x71000000,
3395 0x24000000,0x6b000000,0x8f000000,0x8f000000,0xff000000,0xff6b6b6b,0xff8e8e8e,0xff000000,0xc6464646,0xba4a4a4a,0xb7000000,0xffdcdcdc,0xe38d8d8d,0x47000000, 3472 0x24000000,0x6b000000,0x8f000000,0x8f000000,0xff000000,0xff7c7c7c,0xff9d9d9d,0xff000000,0xc6585858,0xba5c5c5c,0xb7000000,0xffe2e2e2,0xe39c9c9c,0x47000000,
3396 0xc000000,0x24000000,0x30000000,0x30000000,0x48000000,0xff000000,0xff6b6b6b,0xff000000,0xa1000000,0x96000000,0xffdcdcdc,0xe68c8c8c,0x69000000,0x14000000, 3473 0xc000000,0x24000000,0x30000000,0x30000000,0x48000000,0xff000000,0xff7c7c7c,0xff000000,0xa1000000,0x96000000,0xffe2e2e2,0xe69b9b9b,0x69000000,0x14000000,
3397 0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x3c000000,0xff000000,0xff000000,0x9c000000,0xbd808080,0xc57b7b7b,0x62000000,0x14000000,0xffffff, 3474 0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x3c000000,0xff000000,0xff000000,0x9c000000,0xbd909090,0xc58c8c8c,0x62000000,0x14000000,0xffffff,
3398 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x3c000000,0xc8010101,0x82000000,0x51000000,0x2d000000,0x10000000,0xffffff,0xffffff, 3475 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x3c000000,0xc8030303,0x82000000,0x51000000,0x2d000000,0x10000000,0xffffff,0xffffff,
3399 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x31000000,0x3f000000,0x19000000,0xffffff,0xffffff,0xffffff,0xffffff 3476 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x31000000,0x3f000000,0x19000000,0xffffff,0xffffff,0xffffff,0xffffff
3400}; 3477};
3401 3478
3402static const unsigned char bg_data[] = { 3479static const unsigned char bg_data[] = {
3403 0x50,0x1a,0x0e,0x03,0x2d,0x2f,0x44,0x29,0x34,0x13,0x52,0x10,0x35,0x2d, 3480 0x50,0x1a,0x0e,0x03,0x2d,0x2f,0x44,0x29,0x34,0x13,0x52,0x10,0x35,0x2d,
3404 0x05,0x44,0x29,0x13,0x3f,0x01,0x50,0x05,0x22,0x4d,0x38,0x1c,0x0a,0x4f, 3481 0x05,0x44,0x29,0x13,0x3f,0x01,0x50,0x05,0x22,0x4d,0x38,0x1c,0x0a,0x4f,
3405 0x18,0x15,0x2c,0x07,0x44,0x1a,0x39,0x30,0x30,0x10,0x47,0x32,0x14,0x34, 3482 0x18,0x15,0x2c,0x07,0x44,0x1a,0x39,0x30,0x30,0x10,0x47,0x32,0x14,0x34,
3406 0x28,0x3b,0x38,0x0e,0x44,0x52,0x13,0x14,0x40,0x0a,0x50,0x0e,0x2e,0x2e, 3483 0x28,0x3b,0x38,0x0e,0x44,0x52,0x13,0x14,0x40,0x0a,0x50,0x0e,0x2e,0x2e,
@@ -3483,23 +3560,23 @@ static const QRgb bg_ctable[] = {
3483 0xff53786f,0xff608a7f,0xff51766d,0xff5f887e,0xff5e887d,0xff5d867c,0xff5b847a,0xff54796f,0xff53776e,0xff52776d,0xff51756c,0xff5e877c,0xff4f736a,0xff5d857b, 3560 0xff53786f,0xff608a7f,0xff51766d,0xff5f887e,0xff5e887d,0xff5d867c,0xff5b847a,0xff54796f,0xff53776e,0xff52776d,0xff51756c,0xff5e877c,0xff4f736a,0xff5d857b,
3484 0xff5c857a,0xff5b8379,0xff5a8378,0xff598177,0xff638f84,0xff53766d,0xff52766c,0xff51746b,0xff4f7269,0xff4e7068,0xff5c8479,0xff5b8278,0xff598076,0xff587e75, 3561 0xff5c857a,0xff5b8379,0xff5a8378,0xff598177,0xff638f84,0xff53766d,0xff52766c,0xff51746b,0xff4f7269,0xff4e7068,0xff5c8479,0xff5b8278,0xff598076,0xff587e75,
3485 0xff577e74,0xff567c73,0xff557c72,0xff638e83,0xff547a71,0xff618c81,0xff608a80,0xff5f8a7f,0xff5e887e,0xff4f7168,0xff577d73,0xff567b72,0xff557b71,0xff547970, 3562 0xff577e74,0xff567c73,0xff557c72,0xff638e83,0xff547a71,0xff618c81,0xff608a80,0xff5f8a7f,0xff5e887e,0xff4f7168,0xff577d73,0xff567b72,0xff557b71,0xff547970,
3486 0xff53796f 3563 0xff53796f
3487}; 3564};
3488 3565
3489static const QRgb binary_data[] = { 3566static const QRgb binary_data[] = {
3490 0x7000000,0xe000000,0x23000000,0x42000000,0x55000000,0x5b000000,0x5d000000,0x5a000000,0x49000000,0x34000000,0x24000000,0x1a000000,0x11000000,0xffffff, 3567 0x7000000,0xe000000,0x23000000,0x42000000,0x55000000,0x5b000000,0x5d000000,0x5a000000,0x49000000,0x34000000,0x24000000,0x1a000000,0x11000000,0xffffff,
3491 0xc000000,0x18000000,0x48000000,0xffffffff,0xfffdfdfd,0xffe6e6e6,0xffa3a3a3,0xffffffff,0xf3bebebe,0x6b000000,0x44000000,0x2d000000,0x1d000000,0xc000000, 3568 0xc000000,0x18000000,0x48000000,0xffffffff,0xfffdfdfd,0xffeaeaea,0xffb0b0b0,0xffffffff,0xf3c8c8c8,0x6b000000,0x44000000,0x2d000000,0x1d000000,0xc000000,
3492 0x11000000,0x24000000,0x62000000,0xffffffff,0xfffbfbfb,0xffdcdcdc,0xff868686,0xffffffff,0xffffffff,0xf7b6b6b6,0x75000000,0x46000000,0x2a000000,0x11000000, 3569 0x11000000,0x24000000,0x62000000,0xffffffff,0xfffcfcfc,0xffe2e2e2,0xff969696,0xffffffff,0xffffffff,0xf7c1c1c1,0x75000000,0x46000000,0x2a000000,0x11000000,
3493 0x16000000,0x2e000000,0x71000000,0xffffffff,0xfffbfbfb,0xffdcdcdc,0xff838383,0xffffffff,0xffffffff,0xffffffff,0xf5bcbcbc,0x65000000,0x36000000,0x16000000, 3570 0x16000000,0x2e000000,0x71000000,0xffffffff,0xfffcfcfc,0xffe2e2e2,0xff939393,0xffffffff,0xffffffff,0xffffffff,0xf5c6c6c6,0x65000000,0x36000000,0x16000000,
3494 0x1a000000,0x35000000,0x7b000000,0xffffffff,0xfffdfdfd,0xffe4e4e4,0xff9d9d9d,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x7c000000,0x3e000000,0x1a000000, 3571 0x1a000000,0x35000000,0x7b000000,0xffffffff,0xfffdfdfd,0xffe8e8e8,0xffababab,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x7c000000,0x3e000000,0x1a000000,
3495 0x1c000000,0x39000000,0x80000000,0xffffffff,0xfffdfdfd,0xfff3f3f3,0xffcfcfcf,0xff9d9d9d,0xff838383,0xff868686,0xffa3a3a3,0x85000000,0x43000000,0x1c000000, 3572 0x1c000000,0x39000000,0x80000000,0xffffffff,0xfffdfdfd,0xfff5f5f5,0xffd7d7d7,0xffababab,0xff939393,0xff969696,0xffb0b0b0,0x85000000,0x43000000,0x1c000000,
3496 0x1d000000,0x3b000000,0x83000000,0xffffffff,0xffffffff,0xfffbfbfb,0xfff3f3f3,0xffe4e4e4,0xffdcdcdc,0xffdcdcdc,0xffe6e6e6,0x88000000,0x46000000,0x1d000000, 3573 0x1d000000,0x3b000000,0x83000000,0xffffffff,0xffffffff,0xfffcfcfc,0xfff5f5f5,0xffe8e8e8,0xffe2e2e2,0xffe2e2e2,0xffeaeaea,0x88000000,0x46000000,0x1d000000,
3497 0x1d000000,0x3c000000,0x84000000,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffdfdfd,0xfffbfbfb,0xfffbfbfb,0xfffdfdfd,0x88000000,0x47000000,0x1d000000, 3574 0x1d000000,0x3c000000,0x84000000,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfffcfcfc,0xfffdfdfd,0x88000000,0x47000000,0x1d000000,
3498 0x1d000000,0x3b000000,0x83000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x88000000,0x46000000,0x1d000000, 3575 0x1d000000,0x3b000000,0x83000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x88000000,0x46000000,0x1d000000,
3499 0x1c000000,0x39000000,0x81000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x85000000,0x44000000,0x1c000000, 3576 0x1c000000,0x39000000,0x81000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x85000000,0x44000000,0x1c000000,
3500 0x1a000000,0x36000000,0x7b000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x80000000,0x3f000000,0x1a000000, 3577 0x1a000000,0x36000000,0x7b000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x80000000,0x3f000000,0x1a000000,
3501 0x17000000,0x30000000,0x73000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x77000000,0x38000000,0x16000000, 3578 0x17000000,0x30000000,0x73000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x77000000,0x38000000,0x16000000,
3502 0x14000000,0x28000000,0x5e000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x61000000,0x2e000000,0x11000000, 3579 0x14000000,0x28000000,0x5e000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x61000000,0x2e000000,0x11000000,
3503 0x10000000,0x20000000,0x3e000000,0x64000000,0x7e000000,0x89000000,0x8f000000,0x8f000000,0x89000000,0x7f000000,0x65000000,0x40000000,0x25000000,0xc000000 3580 0x10000000,0x20000000,0x3e000000,0x64000000,0x7e000000,0x89000000,0x8f000000,0x8f000000,0x89000000,0x7f000000,0x65000000,0x40000000,0x25000000,0xc000000
3504}; 3581};
3505 3582
@@ -3549,29 +3626,29 @@ static const unsigned char c_src_data[] = {
3549 3626
3550static const QRgb c_src_ctable[] = { 3627static const QRgb c_src_ctable[] = {
3551 0xc6c6c6,0xff000000,0xffc3c3c3,0xff303030,0xffc0c0ff,0xffff0000,0xff008080,0xff800000,0xffc0c000,0xff0000c0,0xff808080,0xffc0ffc0,0xff00ffff,0xffffffff, 3628 0xc6c6c6,0xff000000,0xffc3c3c3,0xff303030,0xffc0c0ff,0xffff0000,0xff008080,0xff800000,0xffc0c000,0xff0000c0,0xff808080,0xffc0ffc0,0xff00ffff,0xffffffff,
3552 0xffa0a0a0,0xff00ff00,0xffffff00,0xffffc0ff,0xff404000,0xff00c000,0xff000080,0xffffffc0,0xff400000,0xffc05800,0xff800080,0xff008000,0xff00c0c0,0xffdcdcdc, 3629 0xffa0a0a0,0xff00ff00,0xffffff00,0xffffc0ff,0xff404000,0xff00c000,0xff000080,0xffffffc0,0xff400000,0xffc05800,0xff800080,0xff008000,0xff00c0c0,0xffdcdcdc,
3553 0xffff8000,0xffffc0c0,0xff585858,0xffc00000,0xffffdca8,0xff808000,0xffffa858,0xff004000,0xffc000c0,0xff0000ff,0xffff00ff,0xffc0ffff,0xff004040 3630 0xffff8000,0xffffc0c0,0xff585858,0xffc00000,0xffffdca8,0xff808000,0xffffa858,0xff004000,0xffc000c0,0xff0000ff,0xffff00ff,0xffc0ffff,0xff004040
3554}; 3631};
3555 3632
3556static const QRgb calculator_data[] = { 3633static const QRgb calculator_data[] = {
3557 0x2000000,0xfff8f8f8,0xfff1f1f1,0xffe1e1e1,0xffd4d4d4,0xffdfdfdf,0xffeaeaea,0xffeaeaea,0xffeaeaea,0xffeaeaea,0xffeaeaea,0xffeaeaea,0x13000000,0xe000000, 3634 0x2000000,0xfff9f9f9,0xfff3f3f3,0xffe6e6e6,0xffdbdbdb,0xffe4e4e4,0xffeeeeee,0xffeeeeee,0xffeeeeee,0xffeeeeee,0xffeeeeee,0xffeeeeee,0x13000000,0xe000000,
3558 0x7000000,0xff649c64,0xff549254,0xff3c763c,0xffffffff,0xff3c763c,0xff468946,0xff468946,0xff468946,0xff468946,0xff468946,0xff2e792e,0xff005800,0x2b000000, 3635 0x7000000,0xff76aa76,0xff66a166,0xff4d874d,0xffffffff,0xff4d874d,0xff589958,0xff589958,0xff589958,0xff589958,0xff589958,0xff3e8a3e,0xff006a00,0x2b000000,
3559 0xe000000,0xff508b50,0xff2c6b2c,0xff134a13,0xffffffff,0xff134a13,0xff185e18,0xff1b691b,0xff1c6e1c,0xff1c6e1c,0xff1c6e1c,0xff005b00,0xff004300,0x55000000, 3636 0xe000000,0xff629a62,0xff3c7c3c,0xff1e5c1e,0xffffffff,0xff1e5c1e,0xff247024,0xff287a28,0xff297f29,0xff297f29,0xff297f29,0xff006d00,0xff005400,0x55000000,
3560 0x13000000,0xff3f7c3f,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff005300,0xff005c00,0xff005c00,0xff005c00,0xff005100,0xff003a00,0x71000000, 3637 0x13000000,0xff508d50,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff006500,0xff006e00,0xff006e00,0xff006e00,0xff006300,0xff004b00,0x71000000,
3561 0x15000000,0xff438343,0xff185e18,0xff003e00,0xffffffff,0xff003900,0xff004200,0xff004600,0xff004b00,0xff004b00,0xff004f00,0xff004d00,0xff003a00,0x7f000000, 3638 0x15000000,0xff549354,0xff247024,0xff004f00,0xffffffff,0xff004a00,0xff005300,0xff005800,0xff005d00,0xff005d00,0xff006100,0xff005f00,0xff004b00,0x7f000000,
3562 0x15000000,0xff468946,0xff1c6e1c,0xff004f00,0xffffffff,0xff004600,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff004900,0xff003a00,0x7f000000, 3639 0x15000000,0xff589958,0xff297f29,0xff006100,0xffffffff,0xff005800,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff005b00,0xff004b00,0x7f000000,
3563 0x15000000,0xff438343,0xff196419,0xff005300,0xff005300,0xff004f00,0xff004600,0xff004600,0xff004600,0xff004200,0xff004b00,0xff004d00,0xff003a00,0x7f000000, 3640 0x15000000,0xff549354,0xff257625,0xff006500,0xff006500,0xff006100,0xff005800,0xff005800,0xff005800,0xff005300,0xff005d00,0xff005f00,0xff004b00,0x7f000000,
3564 0x15000000,0xff3f7c3f,0xffffffff,0xff7fa57f,0xff005300,0xff7fa57f,0xffffffff,0xff005300,0xff7fa97f,0xffffffff,0xff7fa97f,0xff005100,0xff003a00,0x7f000000, 3641 0x15000000,0xff508d50,0xffffffff,0xff8fb28f,0xff006500,0xff8fb28f,0xffffffff,0xff006500,0xff8fb68f,0xffffffff,0xff8fb68f,0xff006300,0xff004b00,0x7f000000,
3565 0x15000000,0xff438343,0xff8bac8b,0xffffffff,0xff7fa07f,0xffffffff,0xff7fa27f,0xff004b00,0xff004600,0xff004200,0xff004600,0xff004600,0xff003700,0x7f000000, 3642 0x15000000,0xff549354,0xff9ab89a,0xffffffff,0xff8fad8f,0xffffffff,0xff8faf8f,0xff005d00,0xff005800,0xff005300,0xff005800,0xff005800,0xff004800,0x7f000000,
3566 0x15000000,0xff468946,0xff196419,0xff7fa07f,0xffffffff,0xff7fa07f,0xff004b00,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff003500,0x7f000000, 3643 0x15000000,0xff589958,0xff257625,0xff8fad8f,0xffffffff,0xff8fad8f,0xff005d00,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff004600,0x7f000000,
3567 0x15000000,0xff438343,0xff8bac8b,0xffffffff,0xff7fa07f,0xffffffff,0xff7fa27f,0xff004b00,0xff004600,0xff004200,0xff004600,0xff004600,0xff003700,0x7f000000, 3644 0x15000000,0xff549354,0xff9ab89a,0xffffffff,0xff8fad8f,0xffffffff,0xff8faf8f,0xff005d00,0xff005800,0xff005300,0xff005800,0xff005800,0xff004800,0x7f000000,
3568 0x15000000,0xff2a6e2a,0xffffffff,0xff7fa07f,0xff004900,0xff7fa07f,0xffffffff,0xff004900,0xff7fa47f,0xffffffff,0xff7fa47f,0xff004800,0xff003600,0x7f000000, 3645 0x15000000,0xff397f39,0xffffffff,0xff8fad8f,0xff005b00,0xff8fad8f,0xffffffff,0xff005b00,0xff8fb18f,0xffffffff,0xff8fb18f,0xff005a00,0xff004700,0x7f000000,
3569 0x13000000,0xff005400,0xff003d00,0xff003700,0xff003a00,0xff003700,0xff003500,0xff003700,0xff003700,0xff003500,0xff003700,0xff003600,0xff003000,0x71000000, 3646 0x13000000,0xff006600,0xff004e00,0xff004800,0xff004b00,0xff004800,0xff004600,0xff004800,0xff004800,0xff004600,0xff004800,0xff004700,0xff004000,0x71000000,
3570 0xe000000,0x2b000000,0x55000000,0x71000000,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x71000000,0x55000000 3647 0xe000000,0x2b000000,0x55000000,0x71000000,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x71000000,0x55000000
3571}; 3648};
3572 3649
3573static const QRgb center_data[] = { 3650static const QRgb center_data[] = {
3574 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 3651 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3575 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 3652 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3576 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 3653 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3577 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000, 3654 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
@@ -3614,98 +3691,98 @@ static const unsigned char citytime_icon_data[] = {
3614 0x0c,0x0c,0x0c,0x0c 3691 0x0c,0x0c,0x0c,0x0c
3615}; 3692};
3616 3693
3617static const QRgb citytime_icon_ctable[] = { 3694static const QRgb citytime_icon_ctable[] = {
3618 0xffffa858,0xff000080,0xffc0c000,0xff808000,0xffc05800,0xffc0c0ff,0xff000000,0xffff8000,0xff0000c0,0xff800000,0xffffdca8,0xff0000ff,0xc6c6c6,0xffffffff 3695 0xffffa858,0xff000080,0xffc0c000,0xff808000,0xffc05800,0xffc0c0ff,0xff000000,0xffff8000,0xff0000c0,0xff800000,0xffffdca8,0xff0000ff,0xc6c6c6,0xffffffff
3619}; 3696};
3620 3697
3621static const QRgb close_data[] = { 3698static const QRgb close_data[] = {
3622 0xffffff,0xffffff,0xffffff,0x66a45b5b,0xba884d4d,0xeb6a3939,0xfd572c2c,0xeb682e2e,0xba833232,0x669b2f2f,0xffffff,0xffffff,0xffffff,0xffffff, 3699 0xffffff,0xffffff,0xffffff,0x66b16d6d,0xba985f5f,0xeb7b4a4a,0xfd693c3c,0xeb7a3e3e,0xba934242,0x66a93f3f,0xffffff,0xffffff,0xffffff,0xffffff,
3623 0xffffff,0x1bc26464,0x9dad6060,0xfd9b5858,0xff995353,0xff994d4d,0xff984545,0xff963b3b,0xff913030,0xfd912626,0x9da01d1d,0x1bb21414,0xffffff,0xffffff, 3700 0xffffff,0x1bcb7676,0x9db97272,0xfda96a6a,0xffa76565,0xffa75f5f,0xffa65757,0xffa44c4c,0xffa04040,0xfda03535,0x9dad2a2a,0x1bbd1f1f,0xffffff,0xffffff,
3624 0xffffff,0x9dac5a5a,0xffa65a5a,0xffbc8888,0xffc06161,0xffc65353,0xffc64a4a,0xffc13e3e,0xffb83838,0xffb56262,0xff981111,0x9c9c0606,0xffffff,0xffffff, 3701 0xffffff,0x9db86c6c,0xffb36c6c,0xffc69898,0xffca7373,0xffcf6565,0xffcf5c5c,0xffcb4f4f,0xffc34949,0xffc07474,0xffa61b1b,0x9caa0c0c,0xffffff,0xffffff,
3625 0x66a14a4a,0xfd984c4c,0xffbb8484,0xffe5e5e5,0xffeccfcf,0xffd74c4c,0xffd43737,0xffd33a3a,0xffeac4c4,0xffe5e5e5,0xffb25252,0xfd8a0000,0x60940000,0xffffff, 3702 0x66ae5c5c,0xfda65e5e,0xffc59494,0xffe9e9e9,0xffefd7d7,0xffdd5e5e,0xffdb4848,0xffda4b4b,0xffeecdcd,0xffe9e9e9,0xffbd6464,0xfd9a0000,0x60a30000,0xffffff,
3626 0xba843939,0xff954040,0xffbf5353,0xffeccdcd,0xfffdfdfd,0xfff4cdcd,0xffd63232,0xfff4c9c9,0xfffdfdfd,0xffe9bdbd,0xffa80b0b,0xff830000,0xaf810000,0xffffff, 3703 0xba944a4a,0xffa45151,0xffc96565,0xffefd5d5,0xfffdfdfd,0xfff6d5d5,0xffdd4242,0xfff6d1d1,0xfffdfdfd,0xffedc7c7,0xffb51313,0xff930000,0xaf910000,0xffffff,
3627 0xeb662525,0xff943333,0xffc03a3a,0xffd43b3b,0xfff5cdcd,0xffffffff,0xfffdf2f2,0xffffffff,0xfff3c6c6,0xffbe0d0d,0xffa30000,0xff7e0000,0xe36e0000,0xffffff, 3704 0xeb783434,0xffa34343,0xffca4b4b,0xffdb4c4c,0xfff7d5d5,0xffffffff,0xfffdf4f4,0xffffffff,0xfff5cfcf,0xffc81616,0xffb00000,0xff8e0000,0xe37f0000,0xffffff,
3628 0xfd541717,0xff922525,0xffbf2828,0xffcf1f1f,0xffd42828,0xfffcf2f2,0xffffffff,0xfffcf2f2,0xffc81a1a,0xffb30000,0xff9a0000,0xff760000,0xfc620000,0xffffff, 3705 0xfd662323,0xffa13434,0xffc93737,0xffd72d2d,0xffdb3737,0xfffdf4f4,0xffffffff,0xfffdf4f4,0xffd12727,0xffbe0000,0xffa80000,0xff870000,0xfc740000,0xffffff,
3629 0xeb621212,0xff8e1414,0xffb81313,0xffcd1919,0xfff4c6c6,0xffffffff,0xfffcf2f2,0xffffffff,0xffefc5c5,0xffab0d0d,0xff8b0000,0xff6a0000,0xe35d0000,0xffffff, 3706 0xeb741d1d,0xff9d1f1f,0xffc31e1e,0xffd52525,0xfff6cfcf,0xffffffff,0xfffdf4f4,0xffffffff,0xfff2cece,0xffb71616,0xff9a0000,0xff7b0000,0xe36f0000,0xffffff,
3630 0xba7b0909,0xff890404,0xffae0b0b,0xffe8bdbd,0xfffdfdfd,0xffefc5c5,0xffc11b1b,0xffedc5c5,0xfffdfdfd,0xffdebdbd,0xff7c0b0b,0xff5d0000,0xaf5e0000,0xffffff, 3707 0xba8c1010,0xff990808,0xffba1313,0xffecc7c7,0xfffdfdfd,0xfff2cece,0xffcb2828,0xfff0cece,0xfffdfdfd,0xffe3c7c7,0xff8d1313,0xff6f0000,0xaf700000,0xffffff,
3631 0x668f0000,0xfd830000,0xffa84e4e,0xffe5e5e5,0xffe4bdbd,0xffad0e0e,0xffa40000,0xff9f0e0e,0xffddbdbd,0xffe5e5e5,0xff8b4e4e,0xfd540000,0x60620000,0xffffff, 3708 0x669e0000,0xfd930000,0xffb56060,0xffe9e9e9,0xffe8c7c7,0xffb91717,0xffb10000,0xffad1717,0xffe3c7c7,0xffe9e9e9,0xff9a6060,0xfd660000,0x60740000,0xffffff,
3632 0xffffff,0x9d890000,0xff7e0000,0xff9f4f4f,0xff8c0c0c,0xff8a0000,0xff860000,0xff7b0000,0xff740c0c,0xff884f4f,0xff530000,0x9c590000,0xffffff,0xffffff, 3709 0xffffff,0x9d990000,0xff8e0000,0xffad6161,0xff9b1414,0xff9a0000,0xff960000,0xff8c0000,0xff851414,0xff986161,0xff650000,0x9c6b0000,0xffffff,0xffffff,
3633 0xffffff,0x1b950000,0x9c7d0000,0xfd6b0000,0xff680000,0xff640000,0xff610000,0xff590000,0xff510000,0xfd4d0000,0x9c560000,0x1b660000,0xffffff,0xffffff, 3710 0xffffff,0x1ba40000,0x9c8d0000,0xfd7c0000,0xff7a0000,0xff760000,0xff730000,0xff6b0000,0xff630000,0xfd5f0000,0x9c680000,0x1b780000,0xffffff,0xffffff,
3634 0xffffff,0xffffff,0xffffff,0x60740000,0xaf630000,0xe2550000,0xfc4d0000,0xe24c0000,0xaf500000,0x60570000,0xffffff,0xffffff,0xffffff,0xffffff, 3711 0xffffff,0xffffff,0xffffff,0x60850000,0xaf750000,0xe2670000,0xfc5f0000,0xe25e0000,0xaf620000,0x60690000,0xffffff,0xffffff,0xffffff,0xffffff,
3635 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff 3712 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff
3636}; 3713};
3637 3714
3638static const QRgb copy_data[] = { 3715static const QRgb copy_data[] = {
3639 0xffffff,0x3200,0xa00,0x400,0x28000000,0xa6000000,0x9b000000,0xa6000000,0xb71e1e1e,0x6545454,0x10101,0x0,0x0,0x0, 3716 0xffffff,0x4200,0x1200,0x800,0x28000000,0xa6000000,0x9b000000,0xa6000000,0xb72b2b2b,0x6666666,0x30303,0x0,0x0,0x0,
3640 0xffffff,0x3200,0xa00,0x400,0x28000000,0xa6363636,0x9ba7a7a7,0xa6828282,0xaeb2b2b2,0x7b656565,0xe000000,0x2000000,0x0,0x0, 3717 0xffffff,0x4200,0x1200,0x800,0x28000000,0xa6474747,0x9bb4b4b4,0xa6929292,0xaebdbdbd,0x7b777777,0xe000000,0x2000000,0x0,0x0,
3641 0xffffff,0x3200,0xa00,0x200,0x26000000,0xa5565556,0x9affffff,0xa6b6b6b6,0xa9e6e6e6,0xb3eaeaea,0x8e4a4a4a,0x1c000000,0x2000000,0x0, 3718 0xffffff,0x4200,0x1200,0x500,0x26000000,0xa5686768,0x9affffff,0xa6c1c1c1,0xa9eaeaea,0xb3eeeeee,0x8e5c5c5c,0x1c000000,0x2000000,0x0,
3642 0xffffff,0x5003200,0xc2000a00,0xe2101410,0xe90f100f,0xf9192619,0xd59aaf9a,0xa0a3a2a3,0xa9d5d4d5,0xaaffffff,0xb1f1f1f1,0x914e4e4e,0x1e050505,0x2000000, 3719 0xffffff,0x5004200,0xc2001200,0xe21a1f1a,0xe9191a19,0xf9253525,0xd5a8bba8,0xa0b0afb0,0xa9dcdbdc,0xaaffffff,0xb1f3f3f3,0x91606060,0x1e0a0a0a,0x2000000,
3643 0xffffff,0x5003100,0xd2020f02,0xf5ebefeb,0xf9cfe6cf,0xffbcddbc,0xffbecabe,0xde3e583e,0xb0a9aea9,0xa9e9e8e9,0xaaececec,0xb3d8d8d8,0x86272727,0x5000000, 3720 0xffffff,0x5004100,0xd2051905,0xf5eef2ee,0xf9d7ead7,0xffc6e3c6,0xffc8d2c8,0xde4f6a4f,0xb0b6bab6,0xa9edeced,0xaaefefef,0xb3dedede,0x86363636,0x5000000,
3644 0xffffff,0x5003100,0xd0020f02,0xf3e9eee9,0xf7b9d8b9,0xff8ab78a,0xffffffff,0xffb6c6b6,0xe3385438,0xb26a746a,0xa8a0a0a0,0xaf9a9a9a,0x8a000000,0x10000000, 3721 0xffffff,0x5004100,0xd0051905,0xf3edf1ed,0xf7c4dec4,0xff9ac29a,0xffffffff,0xffc1cfc1,0xe3496649,0xb27b857b,0xa8adadad,0xafa8a8a8,0x8a000000,0x10000000,
3645 0xffffff,0x5003100,0xd0020f02,0xf3e7ece7,0xf7b5d4b5,0xff8ab18a,0xffffffff,0xffffffff,0xffbfcabf,0xe3688668,0xafbac3ba,0xa8bebebe,0x89000000,0x15000000, 3722 0xffffff,0x5004100,0xd0051905,0xf3ebefeb,0xf7c0dbc0,0xff9abd9a,0xffffffff,0xffffffff,0xffc9d2c9,0xe37a967a,0xafc4ccc4,0xa8c8c8c8,0x89000000,0x15000000,
3646 0xffffff,0x4003200,0xd0021002,0xf3e2eae2,0xf7c1ddc1,0xfe78ac78,0xff9dbe9d,0xff9dc39d,0xffcce9cc,0xff364636,0xbb879987,0xa0bfbfbf,0x81000000,0x13000000, 3723 0xffffff,0x4004200,0xd0051a05,0xf3e7eee7,0xf7cbe3cb,0xfe89b889,0xffabc8ab,0xffabccab,0xffd4edd4,0xff475847,0xbb97a797,0xa0c9c9c9,0x81000000,0x13000000,
3647 0xffffff,0x4003300,0xd0020f02,0xf1d7e4d7,0xf4d6ead6,0xfea5cba5,0xfd91bc91,0xfd94c094,0xfdb9dfb9,0xfe1c201c,0xc1687b68,0x9db8b8b8,0x7e000000,0x10000000, 3724 0xffffff,0x4004300,0xd0051905,0xf1dde8dd,0xf4ddeedd,0xfeb2d3b2,0xfda0c6a0,0xfda3caa3,0xfdc4e4c4,0xfe292e29,0xc17a8c7a,0x9dc3c3c3,0x7e000000,0x10000000,
3648 0xffffff,0x4003500,0xcf020f02,0xefcbdccb,0xefd2e8d2,0xfcc7e0c7,0xfbd2e7d2,0xfbd4e8d4,0xfbe9f9e9,0xfc2a2f2a,0xc56b7e6b,0xa5b7b7b7,0x80000000,0xc000000, 3725 0xffffff,0x4004600,0xcf051905,0xefd3e2d3,0xefd9ecd9,0xfcd0e5d0,0xfbd9ebd9,0xfbdbecdb,0xfbedfaed,0xfc393f39,0xc57c8e7c,0xa5c2c2c2,0x80000000,0xc000000,
3649 0xffffff,0x3003700,0xce021002,0xeec0d5c0,0xecc0dec0,0xf7b1d2b1,0xf7b4d5b4,0xf7b9d8b9,0xf7cceacc,0xf8222822,0xc2090c09,0xa4141414,0x7a000000,0x4000000, 3726 0xffffff,0x3004800,0xce051a05,0xeecadcca,0xeccae3ca,0xf7bdd9bd,0xf7bfdcbf,0xf7c4dec4,0xf7d4eed4,0xf8303730,0xc2101410,0xa41f1f1f,0x7a000000,0x4000000,
3650 0xffffff,0x3003600,0xce031003,0xeec2dcc2,0xe9c4e7c4,0xefbde1bd,0xf0bee1be,0xf0c3e4c3,0xefdefcde,0xf1252c25,0x740e240e,0x27313131,0x1c000000,0x2000000, 3727 0xffffff,0x3004700,0xce061a06,0xeecbe2cb,0xe9cdebcd,0xefc7e6c7,0xf0c8e6c8,0xf0cce8cc,0xefe3fde3,0xf1343c34,0x74173317,0x27414141,0x1c000000,0x2000000,
3651 0xffffff,0xa003000,0xdb000800,0xfa7b8b7b,0xf97f947f,0xff7a907a,0xff7b907b,0xff809380,0xff91a291,0xff181a18,0x51001c00,0x1000000,0x2000000,0x0, 3728 0xffffff,0xa004000,0xdb000f00,0xfa8c9a8c,0xf98fa38f,0xff8b9f8b,0xff8c9f8c,0xff90a290,0xffa0afa0,0xff242724,0x51002900,0x1000000,0x2000000,0x0,
3652 0xffffff,0xd002a00,0x82133013,0xaa1c361c,0xb80e220e,0xae0b200b,0xab0b200b,0xab0b200b,0xab0c210c,0xa7021602,0x2a002b00,0x0,0x0,0x0 3729 0xffffff,0xd003900,0x821e401e,0xaa294729,0xb8173017,0xae132e13,0xab132e13,0xab132e13,0xab142f14,0xa7052205,0x2a003b00,0x0,0x0,0x0
3653}; 3730};
3654 3731
3655static const QRgb copy_inactive_data[] = { 3732static const QRgb copy_inactive_data[] = {
3656 0xffffff,0x3200,0xa00,0x400,0x14000000,0x53000000,0x4d000000,0x53000000,0x5b1e1e1e,0x3545454,0x10101,0x0,0x0,0x0, 3733 0xffffff,0x4200,0x1200,0x800,0x14000000,0x53000000,0x4d000000,0x53000000,0x5b2b2b2b,0x3666666,0x30303,0x0,0x0,0x0,
3657 0xffffff,0x3200,0xa00,0x400,0x14000000,0x53363636,0x4da7a7a7,0x53828282,0x57b2b2b2,0x3d656565,0x7000000,0x1000000,0x0,0x0, 3734 0xffffff,0x4200,0x1200,0x800,0x14000000,0x53474747,0x4db4b4b4,0x53929292,0x57bdbdbd,0x3d777777,0x7000000,0x1000000,0x0,0x0,
3658 0xffffff,0x3200,0xa00,0x200,0x13000000,0x52555555,0x4dffffff,0x53b6b6b6,0x54e6e6e6,0x59eaeaea,0x474a4a4a,0xe000000,0x1000000,0x0, 3735 0xffffff,0x4200,0x1200,0x500,0x13000000,0x52676767,0x4dffffff,0x53c1c1c1,0x54eaeaea,0x59eeeeee,0x475c5c5c,0xe000000,0x1000000,0x0,
3659 0xffffff,0x2191919,0x61050505,0x71121212,0x740f0f0f,0x7c1f1f1f,0x6aa4a4a4,0x50a2a2a2,0x54d4d4d4,0x55ffffff,0x58f1f1f1,0x484e4e4e,0xf050505,0x1000000, 3736 0xffffff,0x2252525,0x610a0a0a,0x711d1d1d,0x74191919,0x7c2d2d2d,0x6ab1b1b1,0x50afafaf,0x54dbdbdb,0x55ffffff,0x58f3f3f3,0x48606060,0xf0a0a0a,0x1000000,
3660 0xffffff,0x2181818,0x69080808,0x7aededed,0x7cdadada,0x7fcccccc,0x7fc4c4c4,0x6f4b4b4b,0x58ababab,0x54e8e8e8,0x55ececec,0x59d8d8d8,0x43272727,0x2000000, 3737 0xffffff,0x2242424,0x690f0f0f,0x7af0f0f0,0x7ce0e0e0,0x7fd4d4d4,0x7fcdcdcd,0x6f5d5d5d,0x58b7b7b7,0x54ececec,0x55efefef,0x59dedede,0x43363636,0x2000000,
3661 0xffffff,0x2181818,0x68080808,0x79ebebeb,0x7bc8c8c8,0x7fa0a0a0,0x7fffffff,0x7fbebebe,0x71464646,0x596f6f6f,0x54a0a0a0,0x579a9a9a,0x45000000,0x8000000, 3738 0xffffff,0x2242424,0x680f0f0f,0x79eeeeee,0x7bd1d1d1,0x7fadadad,0x7fffffff,0x7fc8c8c8,0x71585858,0x59808080,0x54adadad,0x57a8a8a8,0x45000000,0x8000000,
3662 0xffffff,0x2181818,0x68080808,0x79e9e9e9,0x7bc4c4c4,0x7f9d9d9d,0x7fffffff,0x7fffffff,0x7fc4c4c4,0x71777777,0x57bebebe,0x54bebebe,0x44000000,0xa000000, 3739 0xffffff,0x2242424,0x680f0f0f,0x79ededed,0x7bcdcdcd,0x7fababab,0x7fffffff,0x7fffffff,0x7fcdcdcd,0x71888888,0x57c8c8c8,0x54c8c8c8,0x44000000,0xa000000,
3663 0xffffff,0x2191919,0x68090909,0x79e6e6e6,0x7bcfcfcf,0x7f929292,0x7fadadad,0x7fb0b0b0,0x7fdadada,0x7f3e3e3e,0x5d909090,0x50bfbfbf,0x40000000,0x9000000, 3740 0xffffff,0x2252525,0x68101010,0x79eaeaea,0x7bd7d7d7,0x7fa1a1a1,0x7fb9b9b9,0x7fbcbcbc,0x7fe0e0e0,0x7f4f4f4f,0x5d9f9f9f,0x50c9c9c9,0x40000000,0x9000000,
3664 0xffffff,0x2191919,0x68080808,0x78dddddd,0x7ae0e0e0,0x7fb8b8b8,0x7ea6a6a6,0x7eaaaaaa,0x7ecccccc,0x7f1e1e1e,0x60717171,0x4eb8b8b8,0x3f000000,0x8000000, 3741 0xffffff,0x2252525,0x680f0f0f,0x78e3e3e3,0x7ae5e5e5,0x7fc3c3c3,0x7eb3b3b3,0x7eb6b6b6,0x7ed4d4d4,0x7f2b2b2b,0x60828282,0x4ec3c3c3,0x3f000000,0x8000000,
3665 0xffffff,0x21a1a1a,0x67080808,0x77d3d3d3,0x77dddddd,0x7ed3d3d3,0x7ddcdcdc,0x7ddedede,0x7df1f1f1,0x7e2c2c2c,0x62747474,0x52b7b7b7,0x40000000,0x6000000, 3742 0xffffff,0x2272727,0x670f0f0f,0x77dadada,0x77e3e3e3,0x7edadada,0x7de2e2e2,0x7de3e3e3,0x7df3f3f3,0x7e3c3c3c,0x62858585,0x52c2c2c2,0x40000000,0x6000000,
3666 0xffffff,0x11b1b1b,0x67090909,0x77cacaca,0x76cfcfcf,0x7bc1c1c1,0x7bc4c4c4,0x7bc8c8c8,0x7bdbdbdb,0x7c252525,0x610a0a0a,0x52141414,0x3d000000,0x2000000, 3743 0xffffff,0x1282828,0x67101010,0x77d2d2d2,0x76d7d7d7,0x7bcbcbcb,0x7bcdcdcd,0x7bd1d1d1,0x7be1e1e1,0x7c343434,0x61121212,0x521f1f1f,0x3d000000,0x2000000,
3667 0xffffff,0x11b1b1b,0x67090909,0x77cfcfcf,0x74d5d5d5,0x77cfcfcf,0x78cfcfcf,0x78d3d3d3,0x77ededed,0x78282828,0x3a191919,0x13313131,0xe000000,0x1000000, 3744 0xffffff,0x1282828,0x67101010,0x77d7d7d7,0x74dcdcdc,0x77d7d7d7,0x78d7d7d7,0x78dadada,0x77f0f0f0,0x78373737,0x3a252525,0x13414141,0xe000000,0x1000000,
3668 0xffffff,0x5181818,0x6d040404,0x7d838383,0x7c898989,0x7f858585,0x7f858585,0x7f898989,0x7f999999,0x7f191919,0x280e0e0e,0x0,0x1000000,0x0, 3745 0xffffff,0x5242424,0x6d080808,0x7d939393,0x7c999999,0x7f959595,0x7f959595,0x7f999999,0x7fa7a7a7,0x7f252525,0x28171717,0x0,0x1000000,0x0,
3669 0xffffff,0x6151515,0x41212121,0x55292929,0x5c181818,0x57151515,0x55151515,0x55151515,0x55161616,0x530c0c0c,0x15151515,0x0,0x0,0x0 3746 0xffffff,0x6202020,0x412f2f2f,0x55383838,0x5c242424,0x57202020,0x55202020,0x55202020,0x55222222,0x53141414,0x15202020,0x0,0x0,0x0
3670}; 3747};
3671 3748
3672static const QRgb cut_data[] = { 3749static const QRgb cut_data[] = {
3673 0xc000000,0x9000000,0xa7494949,0xe7434343,0x5d262626,0x4000000,0x12000000,0xb000000,0xb000000,0xd000000,0x3f424242,0x9e666666,0x422f2f2f,0xe000000, 3750 0xc000000,0x9000000,0xa75b5b5b,0xe7545454,0x5d353535,0x4000000,0x12000000,0xb000000,0xb000000,0xd000000,0x3f535353,0x9e787878,0x423f3f3f,0xe000000,
3674 0x7000000,0x82101010,0xe5232323,0xfb171717,0xd0191919,0x88101010,0xd000000,0x14000000,0x16000000,0x53383838,0xbb555555,0xe22a2a2a,0xb3363636,0x38202020, 3751 0x7000000,0x821a1a1a,0xe5313131,0xfb232323,0xd0252525,0x881a1a1a,0xd000000,0x14000000,0x16000000,0x53494949,0xbb676767,0xe2393939,0xb3474747,0x382e2e2e,
3675 0x13000000,0xc3050505,0xff141414,0xcc393939,0xf94b4b4b,0xff181818,0x91111111,0x1e000000,0x6e3a3a3a,0xe0585858,0xff202020,0xff1b1b1b,0xff282828,0x971a1a1a, 3752 0x13000000,0xc30a0a0a,0xff1f1f1f,0xcc4a4a4a,0xf95d5d5d,0xff242424,0x911b1b1b,0x1e000000,0x6e4b4b4b,0xe06a6a6a,0xff2e2e2e,0xff282828,0xff373737,0x97272727,
3676 0x11000000,0x9d3b3b3b,0xfd393939,0xf21e1e1e,0x981f1f1f,0xe55b5b5b,0xfe191919,0xba3b3b3b,0xda3b3b3b,0xfe252525,0x8d0c0c0c,0x6b0a0a0a,0xc52a2a2a,0xb40f0f0f, 3753 0x11000000,0x9d4c4c4c,0xfd4a4a4a,0xf22b2b2b,0x982d2d2d,0xe56d6d6d,0xfe252525,0xba4c4c4c,0xda4c4c4c,0xfe343434,0x8d141414,0x6b121212,0xc5393939,0xb4191919,
3677 0x12000000,0x27000000,0x9b4d4d4d,0xf83a3a3a,0xf8212121,0xe2333333,0xff303030,0xff1e1e1e,0xff0d0d0d,0xe41e1e1e,0xa6171717,0xaf242424,0xfd3e3e3e,0xaa1a1a1a, 3754 0x12000000,0x27000000,0x9b5f5f5f,0xf84b4b4b,0xf82f2f2f,0xe2434343,0xff404040,0xff2b2b2b,0xff161616,0xe42b2b2b,0xa6232323,0xaf333333,0xfd4f4f4f,0xaa272727,
3678 0xc000000,0x15000000,0x2e000000,0x8f4e4e4e,0xd41b1b1b,0xed212121,0xff373737,0xff5b5b5b,0xff252525,0xff111111,0xf7565656,0xf5626262,0xea5e5e5e,0x7b2e2e2e, 3755 0xc000000,0x15000000,0x2e000000,0x8f606060,0xd4282828,0xed2f2f2f,0xff484848,0xff6d6d6d,0xff343434,0xff1b1b1b,0xf7686868,0xf5747474,0xea707070,0x7b3e3e3e,
3679 0x7000000,0xd000000,0x1a000000,0x2b000000,0x5c010101,0xda121212,0xff5e5e5e,0xfff5f5f5,0xff999999,0xff1a1a1a,0xa7535353,0x96626262,0x734b4b4b,0x37040404, 3756 0x7000000,0xd000000,0x1a000000,0x2b000000,0x5c030303,0xda1d1d1d,0xff707070,0xfff7f7f7,0xffa7a7a7,0xff272727,0xa7656565,0x96747474,0x735d5d5d,0x37080808,
3680 0x4000000,0x8000000,0x14000000,0x32000000,0xca141414,0xff636363,0xff484848,0xfe818181,0xfeefefef,0xffa1a1a1,0xc5000000,0x52000000,0x3e000000,0x2a000000, 3757 0x4000000,0x8000000,0x14000000,0x32000000,0xca1f1f1f,0xff757575,0xff5a5a5a,0xfe919191,0xfef2f2f2,0xffaeaeae,0xc5000000,0x52000000,0x3e000000,0x2a000000,
3681 0x5000000,0xe000000,0x25000000,0xc6151515,0xff9a9a9a,0xfec8c8c8,0xff5f5f5f,0xff151515,0xfda2a2a2,0xfdf8f8f8,0xffa4a4a4,0xbe080808,0x3d000000,0x2b000000, 3758 0x5000000,0xe000000,0x25000000,0xc6202020,0xffa8a8a8,0xfed1d1d1,0xff717171,0xff202020,0xfdafafaf,0xfdf9f9f9,0xffb1b1b1,0xbe0f0f0f,0x3d000000,0x2b000000,
3682 0xe000000,0x1e000000,0xc5151515,0xff9a9a9a,0xffededed,0xffa1a1a1,0xd6111111,0x7d000000,0xdd1e1e1e,0xffababab,0xfff4f4f4,0xffa1a1a1,0xb7090909,0x2d000000, 3759 0xe000000,0x1e000000,0xc5202020,0xffa8a8a8,0xfff0f0f0,0xffaeaeae,0xd61b1b1b,0x7d000000,0xdd2b2b2b,0xffb7b7b7,0xfff6f6f6,0xffaeaeae,0xb7101010,0x2d000000,
3683 0x3000000,0xab0e0e0e,0xff8b8b8b,0xffe3e3e3,0xffadadad,0xf41e1e1e,0xb30e0e0e,0x43000000,0x4f000000,0xda1f1f1f,0xffaeaeae,0xfef5f5f5,0xff9c9c9c,0x98020202, 3760 0x3000000,0xab171717,0xff9a9a9a,0xffe8e8e8,0xffb9b9b9,0xf42b2b2b,0xb3171717,0x43000000,0x4f000000,0xda2d2d2d,0xffbababa,0xfef7f7f7,0xffaaaaaa,0x98050505,
3684 0x6000000,0xb70d0d0d,0xffa9a9a9,0xffb0b0b0,0xd1151515,0x53000000,0x44000000,0x38000000,0x31000000,0x3a000000,0xd7202020,0xffb9b9b9,0xffb6b6b6,0xa7010101, 3761 0x6000000,0xb7161616,0xffb6b6b6,0xffbcbcbc,0xd1202020,0x53000000,0x44000000,0x38000000,0x31000000,0x3a000000,0xd72e2e2e,0xffc4c4c4,0xffc1c1c1,0xa7030303,
3685 0x0,0xc0121212,0xff787878,0xcc1f1f1f,0x4a010101,0x3a000000,0x2f000000,0x22000000,0x1c000000,0x1f000000,0x30000000,0xd32b2b2b,0xff7c7c7c,0xae0b0b0b, 3762 0x0,0xc01d1d1d,0xff898989,0xcc2d2d2d,0x4a030303,0x3a000000,0x2f000000,0x22000000,0x1c000000,0x1f000000,0x30000000,0xd33b3b3b,0xff8d8d8d,0xae131313,
3686 0x5000000,0x650c0c0c,0x97090909,0x38090909,0x2a000000,0x24000000,0x1a000000,0xf000000,0xb000000,0xe000000,0x13000000,0x2d000000,0x990a0a0a,0x650a0a0a 3763 0x5000000,0x65141414,0x97101010,0x38101010,0x2a000000,0x24000000,0x1a000000,0xf000000,0xb000000,0xe000000,0x13000000,0x2d000000,0x99121212,0x65121212
3687}; 3764};
3688 3765
3689static const QRgb cut_inactive_data[] = { 3766static const QRgb cut_inactive_data[] = {
3690 0x6000000,0x4000000,0x53494949,0x73434343,0x2e262626,0x2000000,0x9000000,0x5000000,0x5000000,0x6000000,0x1f424242,0x4f666666,0x212f2f2f,0x7000000, 3767 0x6000000,0x4000000,0x535b5b5b,0x73545454,0x2e353535,0x2000000,0x9000000,0x5000000,0x5000000,0x6000000,0x1f535353,0x4f787878,0x213f3f3f,0x7000000,
3691 0x3000000,0x41101010,0x72232323,0x7d171717,0x68191919,0x44101010,0x6000000,0xa000000,0xb000000,0x29383838,0x5d555555,0x712a2a2a,0x59363636,0x1c202020, 3768 0x3000000,0x411a1a1a,0x72313131,0x7d232323,0x68252525,0x441a1a1a,0x6000000,0xa000000,0xb000000,0x29494949,0x5d676767,0x71393939,0x59474747,0x1c2e2e2e,
3692 0x9000000,0x61050505,0x7f141414,0x66393939,0x7c4b4b4b,0x7f181818,0x48111111,0xf000000,0x373a3a3a,0x70585858,0x7f202020,0x7f1b1b1b,0x7f282828,0x4b1a1a1a, 3769 0x9000000,0x610a0a0a,0x7f1f1f1f,0x664a4a4a,0x7c5d5d5d,0x7f242424,0x481b1b1b,0xf000000,0x374b4b4b,0x706a6a6a,0x7f2e2e2e,0x7f282828,0x7f373737,0x4b272727,
3693 0x8000000,0x4e3b3b3b,0x7e393939,0x791e1e1e,0x4c1f1f1f,0x725b5b5b,0x7f191919,0x5d3b3b3b,0x6d3b3b3b,0x7f252525,0x460c0c0c,0x350a0a0a,0x622a2a2a,0x5a0f0f0f, 3770 0x8000000,0x4e4c4c4c,0x7e4a4a4a,0x792b2b2b,0x4c2d2d2d,0x726d6d6d,0x7f252525,0x5d4c4c4c,0x6d4c4c4c,0x7f343434,0x46141414,0x35121212,0x62393939,0x5a191919,
3694 0x9000000,0x13000000,0x4d4d4d4d,0x7c3a3a3a,0x7c212121,0x71333333,0x7f303030,0x7f1e1e1e,0x7f0d0d0d,0x721e1e1e,0x53171717,0x57242424,0x7e3e3e3e,0x551a1a1a, 3771 0x9000000,0x13000000,0x4d5f5f5f,0x7c4b4b4b,0x7c2f2f2f,0x71434343,0x7f404040,0x7f2b2b2b,0x7f161616,0x722b2b2b,0x53232323,0x57333333,0x7e4f4f4f,0x55272727,
3695 0x6000000,0xa000000,0x17000000,0x474e4e4e,0x6a1b1b1b,0x76212121,0x7f373737,0x7f5b5b5b,0x7f252525,0x7f111111,0x7b565656,0x7a626262,0x755e5e5e,0x3d2e2e2e, 3772 0x6000000,0xa000000,0x17000000,0x47606060,0x6a282828,0x762f2f2f,0x7f484848,0x7f6d6d6d,0x7f343434,0x7f1b1b1b,0x7b686868,0x7a747474,0x75707070,0x3d3e3e3e,
3696 0x3000000,0x6000000,0xd000000,0x15000000,0x2e010101,0x6d121212,0x7f5e5e5e,0x7ff5f5f5,0x7f999999,0x7f1a1a1a,0x53535353,0x4b626262,0x394b4b4b,0x1b040404, 3773 0x3000000,0x6000000,0xd000000,0x15000000,0x2e030303,0x6d1d1d1d,0x7f707070,0x7ff7f7f7,0x7fa7a7a7,0x7f272727,0x53656565,0x4b747474,0x395d5d5d,0x1b080808,
3697 0x2000000,0x4000000,0xa000000,0x19000000,0x65141414,0x7f636363,0x7f484848,0x7f818181,0x7fefefef,0x7fa1a1a1,0x62000000,0x29000000,0x1f000000,0x15000000, 3774 0x2000000,0x4000000,0xa000000,0x19000000,0x651f1f1f,0x7f757575,0x7f5a5a5a,0x7f919191,0x7ff2f2f2,0x7faeaeae,0x62000000,0x29000000,0x1f000000,0x15000000,
3698 0x2000000,0x7000000,0x12000000,0x63151515,0x7f9a9a9a,0x7fc8c8c8,0x7f5f5f5f,0x7f151515,0x7ea2a2a2,0x7ef8f8f8,0x7fa4a4a4,0x5f080808,0x1e000000,0x15000000, 3775 0x2000000,0x7000000,0x12000000,0x63202020,0x7fa8a8a8,0x7fd1d1d1,0x7f717171,0x7f202020,0x7eafafaf,0x7ef9f9f9,0x7fb1b1b1,0x5f0f0f0f,0x1e000000,0x15000000,
3699 0x7000000,0xf000000,0x62151515,0x7f9a9a9a,0x7fededed,0x7fa1a1a1,0x6b111111,0x3e000000,0x6e1e1e1e,0x7fababab,0x7ff4f4f4,0x7fa1a1a1,0x5b090909,0x16000000, 3776 0x7000000,0xf000000,0x62202020,0x7fa8a8a8,0x7ff0f0f0,0x7faeaeae,0x6b1b1b1b,0x3e000000,0x6e2b2b2b,0x7fb7b7b7,0x7ff6f6f6,0x7faeaeae,0x5b101010,0x16000000,
3700 0x1000000,0x550e0e0e,0x7f8b8b8b,0x7fe3e3e3,0x7fadadad,0x7a1e1e1e,0x590e0e0e,0x21000000,0x27000000,0x6d1f1f1f,0x7faeaeae,0x7ff5f5f5,0x7f9c9c9c,0x4c020202, 3777 0x1000000,0x55171717,0x7f9a9a9a,0x7fe8e8e8,0x7fb9b9b9,0x7a2b2b2b,0x59171717,0x21000000,0x27000000,0x6d2d2d2d,0x7fbababa,0x7ff7f7f7,0x7faaaaaa,0x4c050505,
3701 0x3000000,0x5b0d0d0d,0x7fa9a9a9,0x7fb0b0b0,0x68151515,0x29000000,0x22000000,0x1c000000,0x18000000,0x1d000000,0x6b202020,0x7fb9b9b9,0x7fb6b6b6,0x53010101, 3778 0x3000000,0x5b161616,0x7fb6b6b6,0x7fbcbcbc,0x68202020,0x29000000,0x22000000,0x1c000000,0x18000000,0x1d000000,0x6b2e2e2e,0x7fc4c4c4,0x7fc1c1c1,0x53030303,
3702 0x0,0x60121212,0x7f787878,0x661f1f1f,0x25010101,0x1d000000,0x17000000,0x11000000,0xe000000,0xf000000,0x18000000,0x692b2b2b,0x7f7c7c7c,0x570b0b0b, 3779 0x0,0x601d1d1d,0x7f898989,0x662d2d2d,0x25030303,0x1d000000,0x17000000,0x11000000,0xe000000,0xf000000,0x18000000,0x693b3b3b,0x7f8d8d8d,0x57131313,
3703 0x2000000,0x320c0c0c,0x4b090909,0x1c090909,0x15000000,0x12000000,0xd000000,0x7000000,0x5000000,0x7000000,0x9000000,0x16000000,0x4c0a0a0a,0x320a0a0a 3780 0x2000000,0x32141414,0x4b101010,0x1c101010,0x15000000,0x12000000,0xd000000,0x7000000,0x5000000,0x7000000,0x9000000,0x16000000,0x4c121212,0x32121212
3704}; 3781};
3705 3782
3706static const QRgb datebook_icon_data[] = { 3783static const QRgb datebook_icon_data[] = {
3707 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0, 3784 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,
3708 0xff000000,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff00008b,0xff0000ff,0xff00008b,0xff0000ff,0xff00008b,0xff0000ff,0xff000000,0xff000000, 3785 0xff000000,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff00008b,0xff0000ff,0xff00008b,0xff0000ff,0xff00008b,0xff0000ff,0xff000000,0xff000000,
3709 0xff000000,0xff0000ff,0xff0000ff,0xff00008b,0xff0000ff,0xff00008b,0xff0000ff,0xff00008b,0xff0000ff,0xff00008b,0xff00008b,0xff00008b,0xff000000,0xff000000, 3786 0xff000000,0xff0000ff,0xff0000ff,0xff00008b,0xff0000ff,0xff00008b,0xff0000ff,0xff00008b,0xff0000ff,0xff00008b,0xff00008b,0xff00008b,0xff000000,0xff000000,
3710 0xff000000,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffa0a0a0,0xff000000, 3787 0xff000000,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffa0a0a0,0xff000000,
3711 0xff000000,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffa0a0a0,0xff000000, 3788 0xff000000,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffa0a0a0,0xff000000,
@@ -3717,113 +3794,96 @@ static const QRgb datebook_icon_data[] = {
3717 0xff000000,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffa0a0a0,0xff000000, 3794 0xff000000,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffa0a0a0,0xff000000,
3718 0xff000000,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffa0a0a0,0xff000000, 3795 0xff000000,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffa0a0a0,0xff000000,
3719 0x0,0xff000000,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xff000000, 3796 0x0,0xff000000,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xff000000,
3720 0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000 3797 0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000
3721}; 3798};
3722 3799
3723static const QRgb day_data[] = { 3800static const QRgb day_data[] = {
3724 0xe000000,0x18000000,0x23000000,0x2e000000,0x35000000,0x39000000,0x3b000000,0x3b000000,0x3b000000,0x39000000,0x35000000,0x2e000000,0x23000000,0x18000000, 3801 0xe000000,0x18000000,0x23000000,0x2e000000,0x35000000,0x39000000,0x3b000000,0x3b000000,0x3b000000,0x39000000,0x35000000,0x2e000000,0x23000000,0x18000000,
3725 0x18000000,0xff686eaf,0xff595fa6,0xff4b529f,0xff4b529f,0xff4b529f,0xff4b529f,0xff4b529f,0xff4b529f,0xff4b529f,0xff343b93,0xff070f75,0x3d000000,0x2a000000, 3802 0x18000000,0xff7a7fbb,0xff6b71b3,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff454ca2,0xff0d1986,0x3d000000,0x2a000000,
3726 0x24000000,0xff595fa6,0xff394095,0xff222a89,0xff222a89,0xff222a89,0xff222a89,0xff222a89,0xff222a89,0xff222a89,0xff07107a,0xff050c5a,0x5a000000,0x3e000000, 3803 0x24000000,0xff6b71b3,0xff4a51a4,0xff303999,0xff303999,0xff303999,0xff303999,0xff303999,0xff303999,0xff303999,0xff0d1a8b,0xff0a146c,0x5a000000,0x3e000000,
3727 0x2e000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe0e0e0,0xffa1a1a1,0x74000000,0x50000000, 3804 0x2e000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe5e5e5,0xffaeaeae,0x74000000,0x50000000,
3728 0x35000000,0xffffffff,0xffffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffe0e0e0,0xffa1a1a1,0x86000000,0x5c000000, 3805 0x35000000,0xffffffff,0xffffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffe5e5e5,0xffaeaeae,0x86000000,0x5c000000,
3729 0x39000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xffe0e0e0,0xffa1a1a1,0x90000000,0x63000000, 3806 0x39000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xffe5e5e5,0xffaeaeae,0x90000000,0x63000000,
3730 0x3b000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xffe0e0e0,0xffa1a1a1,0x95000000,0x66000000, 3807 0x3b000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xffe5e5e5,0xffaeaeae,0x95000000,0x66000000,
3731 0x3c000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xffe0e0e0,0xffa1a1a1,0x96000000,0x67000000, 3808 0x3c000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xffe5e5e5,0xffaeaeae,0x96000000,0x67000000,
3732 0x3b000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xffe0e0e0,0xffa1a1a1,0x95000000,0x66000000, 3809 0x3b000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xffe5e5e5,0xffaeaeae,0x95000000,0x66000000,
3733 0x39000000,0xffffffff,0xffffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffe0e0e0,0xffa1a1a1,0x90000000,0x63000000, 3810 0x39000000,0xffffffff,0xffffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffe5e5e5,0xffaeaeae,0x90000000,0x63000000,
3734 0x35000000,0xffffffff,0xfffcfcfc,0xffe0e0e0,0xffe0e0e0,0xffe0e0e0,0xffe0e0e0,0xffe0e0e0,0xffe0e0e0,0xffe0e0e0,0xffc8c8c8,0xff959595,0x86000000,0x5c000000, 3811 0x35000000,0xffffffff,0xfffdfdfd,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffd1d1d1,0xffa4a4a4,0x86000000,0x5c000000,
3735 0x2e000000,0xfff3f3f3,0xffbababa,0xffa1a1a1,0xffa1a1a1,0xffa1a1a1,0xffa1a1a1,0xffa1a1a1,0xffa1a1a1,0xffa1a1a1,0xff959595,0xff868686,0x74000000,0x50000000, 3812 0x2e000000,0xfff5f5f5,0xffc4c4c4,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffa4a4a4,0xff969696,0x74000000,0x50000000,
3736 0x24000000,0x3e000000,0x5a000000,0x74000000,0x86000000,0x90000000,0x95000000,0x96000000,0x95000000,0x90000000,0x86000000,0x74000000,0x5a000000,0x3e000000, 3813 0x24000000,0x3e000000,0x5a000000,0x74000000,0x86000000,0x90000000,0x95000000,0x96000000,0x95000000,0x90000000,0x86000000,0x74000000,0x5a000000,0x3e000000,
3737 0x18000000,0x2a000000,0x3d000000,0x4f000000,0x5c000000,0x63000000,0x66000000,0x67000000,0x66000000,0x63000000,0x5c000000,0x4f000000,0x3d000000,0x2a000000 3814 0x18000000,0x2a000000,0x3d000000,0x4f000000,0x5c000000,0x63000000,0x66000000,0x67000000,0x66000000,0x63000000,0x5c000000,0x4f000000,0x3d000000,0x2a000000
3738}; 3815};
3739 3816
3740static const QRgb done_data[] = { 3817static const QRgb done_data[] = {
3741 0xffffff,0xffffff,0xffffff,0x665b925b,0xba4d794d,0xeb395e39,0xfd2c4c2c,0xeb2e592e,0xba326f32,0x662f802f,0xffffff,0xffffff,0xffffff,0xffffff, 3818 0xffffff,0xffffff,0xffffff,0x666da16d,0xba5f8a5f,0xeb4a704a,0xfd3c5e3c,0xeb3e6b3e,0xba428042,0x663f903f,0xffffff,0xffffff,0xffffff,0xffffff,
3742 0xffffff,0x1b64aa64,0x9d609a60,0xfd588a58,0xff538753,0xff4d864d,0xff458445,0xff3b7f3b,0xff307930,0xfd267626,0xa1278227,0x2b6aac6a,0xffffff,0xffffff, 3819 0xffffff,0x1b76b676,0x9d72a872,0xfd6a9a6a,0xff659765,0xff5f965f,0xff579457,0xff4c8f4c,0xff408a40,0xfd358735,0xa1369236,0x2b7bb87b,0xffffff,0xffffff,
3743 0xffffff,0x9d5a975a,0xff5a935a,0xff5f9e5f,0xff5ba65b,0xff53a953,0xff4aa74a,0xff3ea03e,0xff2f942f,0xff2d892d,0xff889888,0xd27da47d,0xffffff,0xffffff, 3820 0xffffff,0x9d6ca56c,0xff6ca26c,0xff71ac71,0xff6db36d,0xff65b665,0xff5cb45c,0xff4fad4f,0xff3fa33f,0xff3d993d,0xff98a698,0xd28db18d,0xffffff,0xffffff,
3744 0x664a8b4a,0xfd4c864c,0xff579b57,0xff5aad5a,0xff50b350,0xff42b042,0xff37ac37,0xff2fa82f,0xff37a637,0xffacbeac,0xffaeaeae,0xff989a98,0x9471a171,0xffffff, 3821 0x665c9a5c,0xfd5e965e,0xff69a969,0xff6cb96c,0xff62be62,0xff53bc53,0xff48b848,0xff3fb53f,0xff48b348,0xffb8c8b8,0xffbababa,0xffa6a8a6,0x9482ae82,0xffffff,
3745 0xba397139,0xff407f40,0xff51a251,0xff50b150,0xff38ae38,0xff26a726,0xff1ca41c,0xff31a931,0xffc0d2c0,0xffd3d3d3,0xffbcbcbc,0xff9c9c9c,0xc7468146,0xffffff, 3822 0xba4a824a,0xff518f51,0xff63af63,0xff62bd62,0xff49ba49,0xff35b435,0xff29b129,0xff41b641,0xffcad9ca,0xffdadada,0xffc6c6c6,0xffaaaaaa,0xc7589158,0xffffff,
3746 0xeb255625,0xff337b33,0xff90b690,0xffb2cdb2,0xff2aa92a,0xff109f10,0xff28a628,0xffc4d5c4,0xffdcdcdc,0xffd8d8d8,0xffc5c5c5,0xff518051,0xe3005200,0xffffff, 3823 0xeb346834,0xff438c43,0xff9fc19f,0xffbdd5bd,0xff39b639,0xff1aad1a,0xff37b337,0xffcddccd,0xffe2e2e2,0xffdedede,0xffcecece,0xff639063,0xe3006400,0xffffff,
3747 0xfd1a451a,0xff6b8a6b,0xffc6c6c6,0xffd9d9d9,0xffaeceae,0xff34a934,0xffc7d6c7,0xffdcdcdc,0xffdcdcdc,0xffd9d9d9,0xff649e64,0xff005800,0xfc004a00,0xffffff, 3824 0xfd275727,0xff7c9a7c,0xffcfcfcf,0xffdfdfdf,0xffbad6ba,0xff45b645,0xffd0ddd0,0xffe2e2e2,0xffe2e2e2,0xffdfdfdf,0xff76ac76,0xff006a00,0xfc005c00,0xffffff,
3748 0xec165016,0xff778c77,0xffc3c3c3,0xffd8d8d8,0xffdcdcdc,0xffd8dbd8,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xff6cab6c,0xff006800,0xff004f00,0xe3004600,0xffffff, 3825 0xec226222,0xff889b88,0xffcccccc,0xffdedede,0xffe2e2e2,0xffdee1de,0xffe2e2e2,0xffe2e2e2,0xffe2e2e2,0xff7db77d,0xff007a00,0xff006100,0xe3005800,0xffffff,
3749 0xba095e09,0xff0b690b,0xff91ae91,0xffd3d3d3,0xffdadada,0xffdbdbdb,0xffdcdcdc,0xffdbdbdb,0xff6dac6d,0xff006e00,0xff005900,0xff004600,0xaf004600,0xffffff, 3826 0xba107010,0xff137a13,0xffa0baa0,0xffdadada,0xffe0e0e0,0xffe1e1e1,0xffe2e2e2,0xffe1e1e1,0xff7eb87e,0xff007f00,0xff006b00,0xff005800,0xaf005800,0xffffff,
3750 0x66006c00,0xfd006200,0xff097209,0xff99b599,0xffd3d3d3,0xffd7d7d7,0xffd9d9d9,0xff6ba66b,0xff006900,0xff005a00,0xff004a00,0xfd003f00,0x60004900,0xffffff, 3827 0x66007d00,0xfd007400,0xff108310,0xffa7c0a7,0xffdadada,0xffdddddd,0xffdfdfdf,0xff7cb37c,0xff007a00,0xff006c00,0xff005c00,0xfd005000,0x60005b00,0xffffff,
3751 0xffffff,0x9d006700,0xff005e00,0xff096609,0xff89a489,0xff88a788,0xff649664,0xff005d00,0xff005300,0xff004700,0xff003f00,0x9c004300,0xffffff,0xffffff, 3828 0xffffff,0x9d007900,0xff007000,0xff107810,0xff99b199,0xff98b498,0xff76a476,0xff006f00,0xff006500,0xff005900,0xff005000,0x9c005400,0xffffff,0xffffff,
3752 0xffffff,0x1b006f00,0x9c005e00,0xfd005000,0xff004d00,0xff004c00,0xff004800,0xff004300,0xff003d00,0xfd003900,0x9c004000,0x1b004d00,0xffffff,0xffffff, 3829 0xffffff,0x1b008000,0x9c007000,0xfd006200,0xff005f00,0xff005e00,0xff005a00,0xff005400,0xff004e00,0xfd004a00,0x9c005100,0x1b005f00,0xffffff,0xffffff,
3753 0xffffff,0xffffff,0xffffff,0x60005700,0xaf004b00,0xe2004000,0xfc003900,0xe2003900,0xaf003b00,0x60004200,0xffffff,0xffffff,0xffffff,0xffffff, 3830 0xffffff,0xffffff,0xffffff,0x60006900,0xaf005d00,0xe2005100,0xfc004a00,0xe2004a00,0xaf004c00,0x60005300,0xffffff,0xffffff,0xffffff,0xffffff,
3754 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff 3831 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff
3755}; 3832};
3756 3833
3757static const QRgb down_data[] = {
3758 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x1000000,0x1000000,0x1000000,0x1000000,0xffffff,0xffffff,0xffffff,
3759 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
3760 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,
3761 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xfff3f3f3,0xff000000,0x6b000000,0x24000000,0xffffff,0xffffff,0xffffff,
3762 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffdbdbdb,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,
3763 0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xffffffff,0xffffffff,0xffe5e5e5,0xff000000,0xff000000,0xff000000,0xff000000,0x24000000,0xc000000,
3764 0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff8f8f8,0xfff7f7f7,0xfff2f2f2,0xffe5e5e5,0xff000000,0x6b000000,0x24000000,
3765 0xffffff,0x8d4e5455,0xfd151617,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffececec,0xffd1d1d1,0xffbfbfbf,0xfe151717,0xce2b2e2f,0x7b000000,0x26000000,
3766 0xffffff,0x13000000,0x9f454b4c,0xfe151718,0xfff2f2f2,0xfff5f5f5,0xffeaeaea,0xffc9c9c9,0xffbfbfbf,0xfe151717,0xcd2c2f2f,0x86000000,0x45000000,0x10000000,
3767 0xffffff,0x3000000,0x18000000,0xa0454a4b,0xfe151718,0xffe9e9e9,0xffcecece,0xffbfbfbf,0xfe151717,0xcd2c2f2f,0x85000000,0x45000000,0x14000000,0x2000000,
3768 0xffffff,0xffffff,0x3000000,0x18000000,0xa0454a4b,0xfe151718,0xffc8c8c8,0xfe151717,0xcd2c2f2f,0x85000000,0x45000000,0x14000000,0x2000000,0xffffff,
3769 0xffffff,0xffffff,0xffffff,0x3000000,0x18000000,0xa0454a4b,0xef35393a,0xc12e3132,0x82000000,0x45000000,0x14000000,0x2000000,0xffffff,0xffffff,
3770 0xffffff,0xffffff,0xffffff,0xffffff,0x3000000,0x18000000,0x41000000,0x57000000,0x3d000000,0x14000000,0x2000000,0xffffff,0xffffff,0xffffff,
3771 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x3000000,0xe000000,0x15000000,0xd000000,0x2000000,0xffffff,0xffffff,0xffffff,0xffffff
3772};
3773
3774static const QRgb edit_data[] = { 3834static const QRgb edit_data[] = {
3775 0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3000000,0x36000000,0xff000000,0xff000000,0xff000000,0x2c000000,0x18000000,0x8000000,0x1000000, 3835 0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3000000,0x36000000,0xff000000,0xff000000,0xff000000,0x2c000000,0x18000000,0x8000000,0x1000000,
3776 0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3f000000,0xff000000,0xff772121,0xffef3434,0xffff0606,0xff000000,0x40000000,0x19000000,0x5000000, 3836 0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3f000000,0xff000000,0xff882f2f,0xfff24545,0xffff0c0c,0xff000000,0x40000000,0x19000000,0x5000000,
3777 0xffffff,0xffffff,0xffffff,0x1000000,0x5000000,0x8f000000,0xff000000,0xff000000,0xff1f0000,0xff610000,0xff000000,0x68000000,0x2c000000,0xa000000, 3837 0xffffff,0xffffff,0xffffff,0x1000000,0x5000000,0x8f000000,0xff000000,0xff000000,0xff2d0000,0xff730000,0xff000000,0x68000000,0x2c000000,0xa000000,
3778 0xffffff,0xffffff,0xffffff,0x1000000,0x14000000,0xff000000,0xfff8f898,0xffffff83,0xff000000,0xff000000,0xff000000,0x79000000,0x36000000,0xd000000, 3838 0xffffff,0xffffff,0xffffff,0x1000000,0x14000000,0xff000000,0xfff9f9a6,0xffffff93,0xff000000,0xff000000,0xff000000,0x79000000,0x36000000,0xd000000,
3779 0xffffff,0xffffff,0xffffff,0x4000000,0x78000000,0xff000000,0xffffff95,0xffffff71,0xffd1d154,0xff000000,0xbe000000,0x71000000,0x31000000,0xb000000, 3839 0xffffff,0xffffff,0xffffff,0x4000000,0x78000000,0xff000000,0xffffffa4,0xffffff82,0xffd8d866,0xff000000,0xbe000000,0x71000000,0x31000000,0xb000000,
3780 0xffffff,0xffffff,0x1000000,0xd000000,0xff000000,0xffdddd84,0xffffff81,0xffd4d455,0xff888837,0xff000000,0x92000000,0x58000000,0x21000000,0x7000000, 3840 0xffffff,0xffffff,0x1000000,0xd000000,0xff000000,0xffe3e394,0xffffff91,0xffdbdb67,0xff989848,0xff000000,0x92000000,0x58000000,0x21000000,0x7000000,
3781 0xffffff,0xffffff,0x4000000,0x62000000,0xff000000,0xffffff90,0xffffff66,0xffa7a743,0xff000000,0xc4000000,0x79000000,0x3c000000,0x12000000,0x3000000, 3841 0xffffff,0xffffff,0x4000000,0x62000000,0xff000000,0xffffff9f,0xffffff78,0xffb4b454,0xff000000,0xc4000000,0x79000000,0x3c000000,0x12000000,0x3000000,
3782 0xffffff,0x1000000,0x7000000,0xff000000,0xffb5b560,0xffffff6e,0xffbaba4a,0xff70702d,0xff000000,0x95000000,0x5b000000,0x24000000,0x8000000,0x1000000, 3842 0xffffff,0x1000000,0x7000000,0xff000000,0xffc0c072,0xffffff7f,0xffc4c45c,0xff81813d,0xff000000,0x95000000,0x5b000000,0x24000000,0x8000000,0x1000000,
3783 0xffffff,0x1000000,0x35000000,0xff000000,0xffe2e25b,0xffaaaa44,0xff818134,0xff000000,0xc9000000,0x7b000000,0x3d000000,0x13000000,0x4000000,0xffffff, 3843 0xffffff,0x1000000,0x35000000,0xff000000,0xffe7e76d,0xffb6b656,0xff919145,0xff000000,0xc9000000,0x7b000000,0x3d000000,0x13000000,0x4000000,0xffffff,
3784 0xffffff,0x2000000,0x11000000,0xff000000,0xff000000,0xff000000,0xff000000,0xfe000000,0xa0000000,0x5c000000,0x26000000,0xa000000,0x1000000,0xffffff, 3844 0xffffff,0x2000000,0x11000000,0xff000000,0xff000000,0xff000000,0xff000000,0xfe000000,0xa0000000,0x5c000000,0x26000000,0xa000000,0x1000000,0xffffff,
3785 0xffffff,0x2000000,0x11000000,0xff000000,0xff000000,0xff000000,0xed000000,0xa6000000,0x73000000,0x3d000000,0x16000000,0x4000000,0x1000000,0xffffff, 3845 0xffffff,0x2000000,0x11000000,0xff000000,0xff000000,0xff000000,0xed000000,0xa6000000,0x73000000,0x3d000000,0x16000000,0x4000000,0x1000000,0xffffff,
3786 0x1000000,0x6000000,0x17000000,0xff000000,0xff000000,0xdc000000,0xa0000000,0x7b000000,0x4d000000,0x25000000,0xf000000,0x7000000,0x6000000,0x3000000, 3846 0x1000000,0x6000000,0x17000000,0xff000000,0xff000000,0xdc000000,0xa0000000,0x7b000000,0x4d000000,0x25000000,0xf000000,0x7000000,0x6000000,0x3000000,
3787 0x4000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x3d000000,0xff000000,0x19000000,0xff000000,0x14000000,0xb000000, 3847 0x4000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x3d000000,0xff000000,0x19000000,0xff000000,0x14000000,0xb000000,
3788 0x6000000,0x17000000,0x37000000,0x67000000,0x70000000,0x78000000,0x6d000000,0x56000000,0x3d000000,0x2a000000,0x25000000,0x22000000,0x20000000,0x11000000 3848 0x6000000,0x17000000,0x37000000,0x67000000,0x70000000,0x78000000,0x6d000000,0x56000000,0x3d000000,0x2a000000,0x25000000,0x22000000,0x20000000,0x11000000
3789}; 3849};
3790 3850
3791static const QRgb editdelete_data[] = { 3851static const QRgb editdelete_data[] = {
3792 0x0,0x261818,0x8d5858,0xdd000000,0x0,0x5000000,0x0,0x0,0x0,0x0,0xde000000,0x663a3a,0x5000000,0x1000000, 3852 0x0,0x352424,0x9c6a6a,0xdd000000,0x0,0x5000000,0x0,0x0,0x0,0x0,0xde000000,0x784b4b,0x5000000,0x1000000,
3793 0x0,0x261818,0x8e201313,0xdf764747,0x90000000,0x0,0x4000000,0x0,0x0,0x8b000000,0xdf795353,0x93150d0d,0x4000000,0xa000000, 3853 0x0,0x352424,0x8e2e1e1e,0xdf875959,0x90000000,0x0,0x4000000,0x0,0x0,0x8b000000,0xdf8a6565,0x93201616,0x4000000,0xa000000,
3794 0x0,0x8f261818,0xff8b5f5f,0xf7e08383,0xf37e3f3f,0xa2000000,0x1000000,0x0,0x98000000,0xec946c6c,0xf6e79696,0xff824141,0xaa000000,0x18100808, 3854 0x0,0x8f352424,0xff9a7171,0xf7e59393,0xf38e5050,0xa2000000,0x1000000,0x0,0x98000000,0xeca37d7d,0xf6eba4a4,0xff925252,0xaa000000,0x181a0f0f,
3795 0xdc000000,0xdf764848,0xf6e08383,0xffd37171,0xf7cf6767,0xf8783c3c,0x8b020101,0x8a040303,0xed946c6c,0xf4e89b9b,0xffca6969,0xfa944a4a,0xfc412121,0x88020101, 3855 0xdc000000,0xdf875a5a,0xf6e59393,0xffda8282,0xf7d77979,0xf8894d4d,0x8b050303,0x8a080606,0xeda37d7d,0xf4eca9a9,0xffd27a7a,0xfaa35c5c,0xfc522f2f,0x88050303,
3796 0x1000000,0x90000000,0xf37f3f3f,0xf8cf6868,0xffcd6666,0xf6d46c6c,0xf1683838,0xea795757,0xf1e99a9a,0xffca6969,0xfb8a4444,0xfb3d1e1e,0xbe000000,0x2e000000, 3856 0x1000000,0x90000000,0xf38f5050,0xf8d77a7a,0xffd57878,0xf6db7d7d,0xf17a4949,0xea8a6969,0xf1eda8a8,0xffd27a7a,0xfb9a5656,0xfb4e2b2b,0xbe000000,0x2e000000,
3797 0x3000000,0x0,0xa2000000,0xf9763b3b,0xf6d46d6d,0xffcd6969,0xfdd77878,0xfedb8383,0xffc76868,0xf98f4646,0xfb3b1d1d,0xc5000000,0x48000000,0x22000000, 3857 0x3000000,0x0,0xa2000000,0xf9874c4c,0xf6db7e7e,0xffd57a7a,0xfddd8989,0xfee19393,0xffd07a7a,0xf99e5858,0xfb4c2a2a,0xc5000000,0x48000000,0x22000000,
3798 0x0,0x4000000,0x1000000,0x8a000000,0xf2683737,0xfcd77777,0xffd06c6c,0xffce6666,0xfdab5555,0xf6361b1b,0xb8000000,0x4e000000,0x29000000,0xb000000, 3858 0x0,0x4000000,0x1000000,0x8a000000,0xf27a4848,0xfcdd8888,0xffd77d7d,0xffd67878,0xfdb76767,0xf6472828,0xb8000000,0x4e000000,0x29000000,0xb000000,
3799 0x0,0x0,0x0,0x88000000,0xea785858,0xfcdb8282,0xffce6767,0xffc86363,0xfdb95c5c,0xf5572c2c,0xb6000000,0x27000000,0x11000000,0x1000000, 3859 0x0,0x0,0x0,0x88000000,0xea896a6a,0xfce19292,0xffd67979,0xffd17575,0xfdc46e6e,0xf5693c3c,0xb6000000,0x27000000,0x11000000,0x1000000,
3800 0x0,0x0,0x95000000,0xed926b6b,0xf2ea9b9b,0xffc86868,0xfeab5454,0xfeb95c5c,0xffc86464,0xf8c66363,0xf5723939,0xa8000000,0x2000000,0x4000000, 3860 0x0,0x0,0x95000000,0xeda17c7c,0xf2eea9a9,0xffd17a7a,0xfeb76666,0xfec46e6e,0xffd17676,0xf8cf7575,0xf5834a4a,0xa8000000,0x2000000,0x4000000,
3801 0x0,0x8e000000,0xec956c6c,0xf4e89b9b,0xffca6969,0xf98f4646,0xf6361b1b,0xf6572c2c,0xf9c76363,0xffd06868,0xf9ca6565,0xf6713939,0xa2000000,0x2000000, 3861 0x0,0x8e000000,0xeca47d7d,0xf4eca9a9,0xffd27a7a,0xf99e5858,0xf6472828,0xf6693c3c,0xf9d07575,0xffd77a7a,0xf9d27777,0xf6824a4a,0xa2000000,0x2000000,
3802 0xdc000000,0xd7785050,0xf3e79595,0xffca6969,0xfa8a4444,0xfa3c1e1e,0xb8000000,0xb6020101,0xf6743a3a,0xf9ca6565,0xffbd5e5e,0xf8a15151,0xf64e2727,0x81000000, 3862 0xdc000000,0xd7896262,0xf3eba4a4,0xffd27a7a,0xfa9a5656,0xfa4d2b2b,0xb8000000,0xb6050303,0xf6854b4b,0xf9d27777,0xffc77070,0xf8ae6363,0xf6603636,0x81000000,
3803 0x0,0x8d000000,0xff884444,0xfa964a4a,0xfa3d1f1f,0xc5000000,0x4e000000,0x28000000,0xa8000000,0xf6713838,0xf9a25050,0xff542929,0xbc000000,0x29000000, 3863 0x0,0x8d000000,0xff985656,0xfaa45c5c,0xfa4e2d2d,0xc5000000,0x4e000000,0x28000000,0xa8000000,0xf6824949,0xf9af6262,0xff663838,0xbc000000,0x29000000,
3804 0x2000000,0x0,0xa5000000,0xf6412121,0xbc000000,0x46000000,0x29000000,0x10000000,0x2000000,0xa3000000,0xf74b2525,0xbc000000,0x4c000000,0x2a000000, 3864 0x2000000,0x0,0xa5000000,0xf6522f2f,0xbc000000,0x46000000,0x29000000,0x10000000,0x2000000,0xa3000000,0xf75d3434,0xbc000000,0x4c000000,0x2a000000,
3805 0x1000000,0x7000000,0xb000000,0x84000000,0x28000000,0x21000000,0xb000000,0x0,0x3000000,0x3000000,0x81000000,0x29000000,0x29000000,0x11000000 3865 0x1000000,0x7000000,0xb000000,0x84000000,0x28000000,0x21000000,0xb000000,0x0,0x3000000,0x3000000,0x81000000,0x29000000,0x29000000,0x11000000
3806}; 3866};
3807 3867
3808static const QRgb enter_data[] = { 3868static const QRgb enter_data[] = {
3809 0xffffff,0xffffff,0xffffff,0x665b925b,0xba4d794d,0xeb395e39,0xfd2c4c2c,0xeb2e592e,0xba326f32,0x662f802f,0xffffff,0xffffff,0xffffff,0xffffff, 3869 0xffffff,0xffffff,0xffffff,0x666da16d,0xba5f8a5f,0xeb4a704a,0xfd3c5e3c,0xeb3e6b3e,0xba428042,0x663f903f,0xffffff,0xffffff,0xffffff,0xffffff,
3810 0xffffff,0x1b64aa64,0x9d609a60,0xfd588a58,0xff538753,0xff4d864d,0xff458445,0xff3b7f3b,0xff307930,0xfd267626,0xa1278227,0x2b6aac6a,0xffffff,0xffffff, 3870 0xffffff,0x1b76b676,0x9d72a872,0xfd6a9a6a,0xff659765,0xff5f965f,0xff579457,0xff4c8f4c,0xff408a40,0xfd358735,0xa1369236,0x2b7bb87b,0xffffff,0xffffff,
3811 0xffffff,0x9d5a975a,0xff5a935a,0xff5f9e5f,0xff5ba65b,0xff53a953,0xff4aa74a,0xff3ea03e,0xff2f942f,0xff2d892d,0xff889888,0xd27da47d,0xffffff,0xffffff, 3871 0xffffff,0x9d6ca56c,0xff6ca26c,0xff71ac71,0xff6db36d,0xff65b665,0xff5cb45c,0xff4fad4f,0xff3fa33f,0xff3d993d,0xff98a698,0xd28db18d,0xffffff,0xffffff,
3812 0x664a8b4a,0xfd4c864c,0xff579b57,0xff5aad5a,0xff50b350,0xff42b042,0xff37ac37,0xff2fa82f,0xff37a637,0xffacbeac,0xffaeaeae,0xff989a98,0x9471a171,0xffffff, 3872 0x665c9a5c,0xfd5e965e,0xff69a969,0xff6cb96c,0xff62be62,0xff53bc53,0xff48b848,0xff3fb53f,0xff48b348,0xffb8c8b8,0xffbababa,0xffa6a8a6,0x9482ae82,0xffffff,
3813 0xba397139,0xff407f40,0xff51a251,0xff50b150,0xff38ae38,0xff26a726,0xff1ca41c,0xff31a931,0xffc0d2c0,0xffd3d3d3,0xffbcbcbc,0xff9c9c9c,0xc7468146,0xffffff, 3873 0xba4a824a,0xff518f51,0xff63af63,0xff62bd62,0xff49ba49,0xff35b435,0xff29b129,0xff41b641,0xffcad9ca,0xffdadada,0xffc6c6c6,0xffaaaaaa,0xc7589158,0xffffff,
3814 0xeb255625,0xff337b33,0xff90b690,0xffb2cdb2,0xff2aa92a,0xff109f10,0xff28a628,0xffc4d5c4,0xffdcdcdc,0xffd8d8d8,0xffc5c5c5,0xff518051,0xe3005200,0xffffff, 3874 0xeb346834,0xff438c43,0xff9fc19f,0xffbdd5bd,0xff39b639,0xff1aad1a,0xff37b337,0xffcddccd,0xffe2e2e2,0xffdedede,0xffcecece,0xff639063,0xe3006400,0xffffff,
3815 0xfd1a451a,0xff6b8a6b,0xffc6c6c6,0xffd9d9d9,0xffaeceae,0xff34a934,0xffc7d6c7,0xffdcdcdc,0xffdcdcdc,0xffd9d9d9,0xff649e64,0xff005800,0xfc004a00,0xffffff, 3875 0xfd275727,0xff7c9a7c,0xffcfcfcf,0xffdfdfdf,0xffbad6ba,0xff45b645,0xffd0ddd0,0xffe2e2e2,0xffe2e2e2,0xffdfdfdf,0xff76ac76,0xff006a00,0xfc005c00,0xffffff,
3816 0xec165016,0xff778c77,0xffc3c3c3,0xffd8d8d8,0xffdcdcdc,0xffd8dbd8,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xff6cab6c,0xff006800,0xff004f00,0xe3004600,0xffffff, 3876 0xec226222,0xff889b88,0xffcccccc,0xffdedede,0xffe2e2e2,0xffdee1de,0xffe2e2e2,0xffe2e2e2,0xffe2e2e2,0xff7db77d,0xff007a00,0xff006100,0xe3005800,0xffffff,
3817 0xba095e09,0xff0b690b,0xff91ae91,0xffd3d3d3,0xffdadada,0xffdbdbdb,0xffdcdcdc,0xffdbdbdb,0xff6dac6d,0xff006e00,0xff005900,0xff004600,0xaf004600,0xffffff, 3877 0xba107010,0xff137a13,0xffa0baa0,0xffdadada,0xffe0e0e0,0xffe1e1e1,0xffe2e2e2,0xffe1e1e1,0xff7eb87e,0xff007f00,0xff006b00,0xff005800,0xaf005800,0xffffff,
3818 0x66006c00,0xfd006200,0xff097209,0xff99b599,0xffd3d3d3,0xffd7d7d7,0xffd9d9d9,0xff6ba66b,0xff006900,0xff005a00,0xff004a00,0xfd003f00,0x60004900,0xffffff, 3878 0x66007d00,0xfd007400,0xff108310,0xffa7c0a7,0xffdadada,0xffdddddd,0xffdfdfdf,0xff7cb37c,0xff007a00,0xff006c00,0xff005c00,0xfd005000,0x60005b00,0xffffff,
3819 0xffffff,0x9d006700,0xff005e00,0xff096609,0xff89a489,0xff88a788,0xff649664,0xff005d00,0xff005300,0xff004700,0xff003f00,0x9c004300,0xffffff,0xffffff, 3879 0xffffff,0x9d007900,0xff007000,0xff107810,0xff99b199,0xff98b498,0xff76a476,0xff006f00,0xff006500,0xff005900,0xff005000,0x9c005400,0xffffff,0xffffff,
3820 0xffffff,0x1b006f00,0x9c005e00,0xfd005000,0xff004d00,0xff004c00,0xff004800,0xff004300,0xff003d00,0xfd003900,0x9c004000,0x1b004d00,0xffffff,0xffffff, 3880 0xffffff,0x1b008000,0x9c007000,0xfd006200,0xff005f00,0xff005e00,0xff005a00,0xff005400,0xff004e00,0xfd004a00,0x9c005100,0x1b005f00,0xffffff,0xffffff,
3821 0xffffff,0xffffff,0xffffff,0x60005700,0xaf004b00,0xe2004000,0xfc003900,0xe2003900,0xaf003b00,0x60004200,0xffffff,0xffffff,0xffffff,0xffffff, 3881 0xffffff,0xffffff,0xffffff,0x60006900,0xaf005d00,0xe2005100,0xfc004a00,0xe2004a00,0xaf004c00,0x60005300,0xffffff,0xffffff,0xffffff,0xffffff,
3822 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff 3882 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff
3823}; 3883};
3824 3884
3825static const unsigned char exec_data[] = { 3885static const unsigned char exec_data[] = {
3826 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00, 3886 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,
3827 0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x01,0x02,0x02,0x01,0x00,0x01, 3887 0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x01,0x02,0x02,0x01,0x00,0x01,
3828 0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x03,0x01,0x03,0x04,0x04,0x03, 3888 0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x03,0x01,0x03,0x04,0x04,0x03,
3829 0x01,0x03,0x02,0x01,0x00,0x00,0x00,0x00,0x01,0x03,0x02,0x05,0x03,0x06, 3889 0x01,0x03,0x02,0x01,0x00,0x00,0x00,0x00,0x01,0x03,0x02,0x05,0x03,0x06,
@@ -3928,114 +3988,114 @@ static const unsigned char faded_bg_data[] = {
3928static const QRgb faded_bg_ctable[] = { 3988static const QRgb faded_bg_ctable[] = {
3929 0xc6c6c6,0xffb5c5c1,0xffb6c7c3,0xffb7c9c4,0xffb8cac5,0xffb8cac6,0xffb7c9c5,0xffb6c7c2,0xffb3c4c0,0xffb2c2be,0xffb3c2be,0xffb6c8c3,0xffb2c1be,0xffb3c3be, 3989 0xc6c6c6,0xffb5c5c1,0xffb6c7c3,0xffb7c9c4,0xffb8cac5,0xffb8cac6,0xffb7c9c5,0xffb6c7c2,0xffb3c4c0,0xffb2c2be,0xffb3c2be,0xffb6c8c3,0xffb2c1be,0xffb3c3be,
3930 0xffb8cbc7,0xffb1c0bc,0xffb1bfbc,0xffb6c8c4,0xffb6c9c4,0xffb4c5c1,0xffb1c1bd,0xffb1c1bc,0xffb3c4c1,0xffb5c7c2,0xffb4c4c1,0xffb1c1be,0xffb3c3bf,0xffb5c6c1, 3990 0xffb8cbc7,0xffb1c0bc,0xffb1bfbc,0xffb6c8c4,0xffb6c9c4,0xffb4c5c1,0xffb1c1bd,0xffb1c1bc,0xffb3c4c1,0xffb5c7c2,0xffb4c4c1,0xffb1c1be,0xffb3c3bf,0xffb5c6c1,
3931 0xffb9cbc7,0xffb9ccc7,0xffb7cac5,0xffb9ccc8,0xffb5c6c2,0xffb8cbc6,0xffb3c4bf,0xffb3c5c1,0xffb7c8c4,0xffb9cdc8,0xffbacdc9,0xffbacdc8 3991 0xffb9cbc7,0xffb9ccc7,0xffb7cac5,0xffb9ccc8,0xffb5c6c2,0xffb8cbc6,0xffb3c4bf,0xffb3c5c1,0xffb7c8c4,0xffb9cdc8,0xffbacdc9,0xffbacdc8
3932}; 3992};
3933 3993
3934static const QRgb fastback_data[] = { 3994static const QRgb fastback_data[] = {
3935 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 3995 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
3936 0xffffff,0xff000000,0xffffff,0xffffff,0xffffff,0xffffff,0x7a5a6163,0xff000000,0xff000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff, 3996 0xffffff,0xff000000,0xffffff,0xffffff,0xffffff,0xffffff,0x7a6c7375,0xff000000,0xff000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,
3937 0xffffff,0xff000000,0xffffff,0xffffff,0xffffff,0x7a5a6163,0xfc151717,0xffffffff,0xff000000,0x6b000000,0x24000000,0xffffff,0xffffff,0xffffff, 3997 0xffffff,0xff000000,0xffffff,0xffffff,0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xff000000,0x6b000000,0x24000000,0xffffff,0xffffff,0xffffff,
3938 0xffffff,0xff000000,0xffffff,0xffffff,0x7a5a6163,0xfc151717,0xffffffff,0xfffbfbfb,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff, 3998 0xffffff,0xff000000,0xffffff,0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xfffcfcfc,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,
3939 0xffffff,0xff000000,0xffffff,0x7a5a6163,0xfc151717,0xffffffff,0xffffffff,0xfff7f7f7,0xff000000,0xff000000,0xff000000,0xff000000,0x24000000,0xc000000, 3999 0xffffff,0xff000000,0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xffffffff,0xfff8f8f8,0xff000000,0xff000000,0xff000000,0xff000000,0x24000000,0xc000000,
3940 0xffffff,0xff000000,0x7a5a6163,0xfc151717,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xffffffff,0xffffffff,0xfff3f3f3,0xff000000,0x6b000000,0x24000000, 4000 0xffffff,0xff000000,0x7a6c7375,0xfc202323,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xffffffff,0xffffffff,0xfff5f5f5,0xff000000,0x6b000000,0x24000000,
3941 0xffffff,0xff000000,0xe0383d3e,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff4f4f4,0xfff4f4f4,0xffeaeaea,0xffcbcbcb,0xff000000,0x8f000000,0x30000000, 4001 0xffffff,0xff000000,0xe0494e4f,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff6f6f6,0xfff6f6f6,0xffeeeeee,0xffd3d3d3,0xff000000,0x8f000000,0x30000000,
3942 0xffffff,0xff000000,0x69545a5b,0xfd151717,0xfffbfbfb,0xfffbfbfb,0xfff2f2f2,0xffd6d6d6,0xffc3c3c3,0xffbfbfbf,0xffbfbfbf,0xff000000,0x8f000000,0x30000000, 4002 0xffffff,0xff000000,0x69666c6d,0xfd202323,0xfffcfcfc,0xfffcfcfc,0xfff4f4f4,0xffdddddd,0xffcccccc,0xffc9c9c9,0xffc9c9c9,0xff000000,0x8f000000,0x30000000,
3943 0xffffff,0xff000000,0xd000000,0x8344494a,0xfd151617,0xfff2f2f2,0xffe9e9e9,0xffc3c3c3,0xff000000,0xff000000,0xff000000,0xff000000,0x8f000000,0x30000000, 4003 0xffffff,0xff000000,0xd000000,0x83565b5c,0xfd202223,0xfff4f4f4,0xffededed,0xffcccccc,0xff000000,0xff000000,0xff000000,0xff000000,0x8f000000,0x30000000,
3944 0xffffff,0xff000000,0x2000000,0x14000000,0x88414648,0xfe151718,0xffe4e4e4,0xffc2c2c2,0xff000000,0xb3000000,0x9b000000,0x8f000000,0x6b000000,0x24000000, 4004 0xffffff,0xff000000,0x2000000,0x14000000,0x8852585a,0xfe202324,0xffe8e8e8,0xffcbcbcb,0xff000000,0xb3000000,0x9b000000,0x8f000000,0x6b000000,0x24000000,
3945 0xffffff,0xff000000,0xffffff,0x2000000,0x14000000,0x88414648,0xfe151718,0xffcbcbcb,0xff000000,0x9b000000,0x54000000,0x30000000,0x24000000,0xc000000, 4005 0xffffff,0xff000000,0xffffff,0x2000000,0x14000000,0x8852585a,0xfe202324,0xffd3d3d3,0xff000000,0x9b000000,0x54000000,0x30000000,0x24000000,0xc000000,
3946 0xffffff,0xff000000,0xffffff,0xffffff,0x2000000,0x14000000,0x88414648,0xff000000,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff, 4006 0xffffff,0xff000000,0xffffff,0xffffff,0x2000000,0x14000000,0x8852585a,0xff000000,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,
3947 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x2000000,0x14000000,0x45000000,0x7b000000,0x6b000000,0x24000000,0xffffff,0xffffff,0xffffff, 4007 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x2000000,0x14000000,0x45000000,0x7b000000,0x6b000000,0x24000000,0xffffff,0xffffff,0xffffff,
3948 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x2000000,0x10000000,0x26000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff 4008 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x2000000,0x10000000,0x26000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff
3949}; 4009};
3950 4010
3951static const QRgb fastforward_data[] = { 4011static const QRgb fastforward_data[] = {
3952 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 4012 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
3953 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0x8d4e5455,0x13000000,0x3000000,0xffffff,0xffffff,0xff000000,0xffffff,0xffffff, 4013 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0x8d606667,0x13000000,0x3000000,0xffffff,0xffffff,0xff000000,0xffffff,0xffffff,
3954 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xfd151617,0x9f454b4c,0x18000000,0x3000000,0xffffff,0xff000000,0xffffff,0xffffff, 4014 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xfd202223,0x9f575d5e,0x18000000,0x3000000,0xffffff,0xff000000,0xffffff,0xffffff,
3955 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xfe151718,0xa0454a4b,0x18000000,0x3000000,0xff000000,0xffffff,0xffffff, 4015 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xfe202324,0xa0575c5d,0x18000000,0x3000000,0xff000000,0xffffff,0xffffff,
3956 0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xffffffff,0xffffffff,0xfff2f2f2,0xfe151718,0xa0454a4b,0x18000000,0xff000000,0xffffff,0xffffff, 4016 0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xffffffff,0xffffffff,0xfff4f4f4,0xfe202324,0xa0575c5d,0x18000000,0xff000000,0xffffff,0xffffff,
3957 0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff5f5f5,0xffe9e9e9,0xfe151718,0xa0454a4b,0xff000000,0x3000000,0xffffff, 4017 0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff7f7f7,0xffededed,0xfe202324,0xa0575c5d,0xff000000,0x3000000,0xffffff,
3958 0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffeaeaea,0xffcecece,0xffc8c8c8,0xef35393a,0xff000000,0xe000000,0xffffff, 4018 0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffeeeeee,0xffd6d6d6,0xffd1d1d1,0xef464a4b,0xff000000,0xe000000,0xffffff,
3959 0xffffff,0xff000000,0xfff3f3f3,0xffdbdbdb,0xffe5e5e5,0xfff8f8f8,0xffececec,0xffc9c9c9,0xffbfbfbf,0xfe151717,0xc12e3132,0xff000000,0x15000000,0xffffff, 4019 0xffffff,0xff000000,0xfff5f5f5,0xffe1e1e1,0xffe9e9e9,0xfff9f9f9,0xffefefef,0xffd1d1d1,0xffc9c9c9,0xfe202323,0xc13e4142,0xff000000,0x15000000,0xffffff,
3960 0x1000000,0xff000000,0xff000000,0xff000000,0xff000000,0xfff7f7f7,0xffd1d1d1,0xffbfbfbf,0xfe151717,0xcd2c2f2f,0x82000000,0xff000000,0xd000000,0xffffff, 4020 0x1000000,0xff000000,0xff000000,0xff000000,0xff000000,0xfff8f8f8,0xffd8d8d8,0xffc9c9c9,0xfe202323,0xcd3c3f3f,0x82000000,0xff000000,0xd000000,0xffffff,
3961 0xffffff,0x24000000,0x6b000000,0x8f000000,0xff000000,0xfff2f2f2,0xffbfbfbf,0xfe151717,0xcd2c2f2f,0x85000000,0x45000000,0xff000000,0x2000000,0xffffff, 4021 0xffffff,0x24000000,0x6b000000,0x8f000000,0xff000000,0xfff4f4f4,0xffc9c9c9,0xfe202323,0xcd3c3f3f,0x85000000,0x45000000,0xff000000,0x2000000,0xffffff,
3962 0xffffff,0xc000000,0x24000000,0x30000000,0xff000000,0xffe5e5e5,0xfe151717,0xcd2c2f2f,0x85000000,0x45000000,0x14000000,0xff000000,0xffffff,0xffffff, 4022 0xffffff,0xc000000,0x24000000,0x30000000,0xff000000,0xffe9e9e9,0xfe202323,0xcd3c3f3f,0x85000000,0x45000000,0x14000000,0xff000000,0xffffff,0xffffff,
3963 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0xce2b2e2f,0x86000000,0x45000000,0x14000000,0x2000000,0xff000000,0xffffff,0xffffff, 4023 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0xce3b3e3f,0x86000000,0x45000000,0x14000000,0x2000000,0xff000000,0xffffff,0xffffff,
3964 0xffffff,0xffffff,0xffffff,0xffffff,0x24000000,0x6b000000,0x7b000000,0x45000000,0x14000000,0x2000000,0xffffff,0xffffff,0xffffff,0xffffff, 4024 0xffffff,0xffffff,0xffffff,0xffffff,0x24000000,0x6b000000,0x7b000000,0x45000000,0x14000000,0x2000000,0xffffff,0xffffff,0xffffff,0xffffff,
3965 0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x24000000,0x26000000,0x10000000,0x2000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff 4025 0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x24000000,0x26000000,0x10000000,0x2000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff
3966}; 4026};
3967 4027
3968static const QRgb fileopen_data[] = { 4028static const QRgb fileopen_data[] = {
3969 0x5000000,0x8000000,0xb000000,0xd000000,0xd000000,0xb000000,0x8000000,0x5000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff, 4029 0x5000000,0x8000000,0xb000000,0xd000000,0xd000000,0xb000000,0x8000000,0x5000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,
3970 0xf000000,0x19000000,0x24000000,0x29000000,0x29000000,0x24000000,0x1b000000,0x10000000,0x9000000,0x3000000,0xffffff,0xffffff,0xffffff,0xffffff, 4030 0xf000000,0x19000000,0x24000000,0x29000000,0x29000000,0x24000000,0x1b000000,0x10000000,0x9000000,0x3000000,0xffffff,0xffffff,0xffffff,0xffffff,
3971 0x20000000,0x43000000,0x72000000,0x87000000,0x89000000,0x79000000,0x53000000,0x36000000,0x2b000000,0x23000000,0x1b000000,0x17000000,0x11000000,0xa000000, 4031 0x20000000,0x43000000,0x72000000,0x87000000,0x89000000,0x79000000,0x53000000,0x36000000,0x2b000000,0x23000000,0x1b000000,0x17000000,0x11000000,0xa000000,
3972 0x39000000,0x84000000,0xffaaaaaa,0xffa9a9a9,0xffa7a7a7,0xffa3a3a3,0xab000000,0x7b000000,0x67000000,0x5a000000,0x4d000000,0x3e000000,0x2e000000,0x1b000000, 4032 0x39000000,0x84000000,0xffb6b6b6,0xffb6b6b6,0xffb4b4b4,0xffb0b0b0,0xab000000,0x7b000000,0x67000000,0x5a000000,0x4d000000,0x3e000000,0x2e000000,0x1b000000,
3973 0x5b000000,0xc9353535,0xffaaaaaa,0xffa9a9a9,0xffa3a3a3,0xff9b9b9b,0xfa555555,0xd8000000,0xca000000,0xc1000000,0xad000000,0x89000000,0x5f000000,0x39000000, 4033 0x5b000000,0xc9464646,0xffb6b6b6,0xffb6b6b6,0xffb0b0b0,0xffa9a9a9,0xfa676767,0xd8000000,0xca000000,0xc1000000,0xad000000,0x89000000,0x5f000000,0x39000000,
3974 0x74000000,0xdc313131,0xffa9a9a9,0xffa6a6a6,0xff9d9d9d,0xff8e8e8e,0xff767676,0xff575757,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x56000000, 4034 0x74000000,0xdc414141,0xffb6b6b6,0xffb3b3b3,0xffababab,0xff9d9d9d,0xff878787,0xff696969,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x56000000,
3975 0x85000000,0xe82e2e2e,0xffa7a7a7,0xff9f9f9f,0xff8f8f8f,0xff777777,0xff535353,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xb4000000,0x6e000000, 4035 0x85000000,0xe83e3e3e,0xffb4b4b4,0xffadadad,0xff9e9e9e,0xff888888,0xff656565,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xb4000000,0x6e000000,
3976 0x91000000,0xef2b2b2b,0xff9f9f9f,0xff929292,0xff7b7b7b,0xff585858,0xff2c2c2c,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xc0000000,0x77000000, 4036 0x91000000,0xef3b3b3b,0xffadadad,0xffa1a1a1,0xff8c8c8c,0xff6a6a6a,0xff3c3c3c,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xc0000000,0x77000000,
3977 0x92000000,0xf02a2a2a,0xff999999,0xff858585,0xff656565,0xff3b3b3b,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xf8000000,0xc0000000,0x77000000, 4037 0x92000000,0xf0393939,0xffa7a7a7,0xff959595,0xff777777,0xff4c4c4c,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xf8000000,0xc0000000,0x77000000,
3978 0x89000000,0xe92d2d2d,0xff8c8c8c,0xff747474,0xff7a7a7a,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xf1000000,0xb2000000,0x6b000000, 4038 0x89000000,0xe93d3d3d,0xff9b9b9b,0xff858585,0xff8b8b8b,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xf1000000,0xb2000000,0x6b000000,
3979 0x78000000,0xd82c2c2c,0xfea6a6a6,0xffa9a9a9,0xffb0b0b0,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfd000000,0xdd000000,0x9b000000,0x59000000, 4039 0x78000000,0xd83c3c3c,0xfeb3b3b3,0xffb6b6b6,0xffbcbcbc,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfd000000,0xdd000000,0x9b000000,0x59000000,
3980 0x5d000000,0x9d000000,0xd7000000,0xf7000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xfa000000,0xe4000000,0xaf000000,0x73000000,0x3c000000, 4040 0x5d000000,0x9d000000,0xd7000000,0xf7000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xfa000000,0xe4000000,0xaf000000,0x73000000,0x3c000000,
3981 0x3e000000,0x65000000,0x92000000,0xb6000000,0xd0000000,0xe1000000,0xe8000000,0xe7000000,0xdf000000,0xcc000000,0xa9000000,0x7a000000,0x4b000000,0x25000000, 4041 0x3e000000,0x65000000,0x92000000,0xb6000000,0xd0000000,0xe1000000,0xe8000000,0xe7000000,0xdf000000,0xcc000000,0xa9000000,0x7a000000,0x4b000000,0x25000000,
3982 0x26000000,0x41000000,0x5f000000,0x7a000000,0x90000000,0xa2000000,0xaa000000,0xa9000000,0x9e000000,0x8a000000,0x6b000000,0x48000000,0x2a000000,0x14000000 4042 0x26000000,0x41000000,0x5f000000,0x7a000000,0x90000000,0xa2000000,0xaa000000,0xa9000000,0x9e000000,0x8a000000,0x6b000000,0x48000000,0x2a000000,0x14000000
3983}; 4043};
3984 4044
3985static const QRgb find_data[] = { 4045static const QRgb find_data[] = {
3986 0x1ffffff,0x420c0c0c,0x9c0b0b0b,0xe10e0e0e,0xe2101010,0xe2101010,0xe10e0e0e,0x9c0b0b0b,0x420c0c0c,0x1ffffff,0xffffff,0xffffff,0xffffff,0xffffff, 4046 0x1ffffff,0x42141414,0x9c131313,0xe1171717,0xe21a1a1a,0xe21a1a1a,0xe1171717,0x9c131313,0x42141414,0x1ffffff,0xffffff,0xffffff,0xffffff,0xffffff,
3987 0x420c0c0c,0xcf101010,0xff545655,0xffa5a9a7,0xffdde2e0,0xffdae1de,0xffa0a7a4,0xff505453,0xd0101010,0x440b0b0b,0x1000000,0x1000000,0xffffff,0xffffff, 4047 0x42141414,0xcf1a1a1a,0xff666867,0xffb2b6b4,0xffe3e7e5,0xffe0e6e3,0xffadb4b1,0xff626665,0xd01a1a1a,0x44131313,0x1000000,0x1000000,0xffffff,0xffffff,
3988 0x9c0b0b0b,0xff535555,0xf6d9dedc,0xfff6fbf9,0xfff5faf8,0xfff1f9f6,0xffeef7f4,0xf6ced9d4,0xff4e5150,0xa00b0b0b,0x8202020,0x4000000,0x1000000,0x1000000, 4048 0x9c131313,0xff656767,0xf6dfe3e2,0xfff8fcfa,0xfff7fbf9,0xfff3faf8,0xfff1f8f6,0xf6d6dfdb,0xff606362,0xa0131313,0x82e2e2e,0x4000000,0x1000000,0x1000000,
3989 0xe10e0e0e,0xffa3a8a5,0xfff4f9f8,0xfff4faf9,0xfff1f9f6,0xffeff8f5,0xffedf7f4,0xffe1ece8,0xff8d9693,0xe40d0d0d,0x110f0f0f,0x9000000,0x4000000,0x1000000, 4049 0xe1171717,0xffb0b5b2,0xfff6faf9,0xfff6fbfa,0xfff3faf8,0xfff2f9f7,0xfff0f8f6,0xffe6efec,0xff9ca4a2,0xe4161616,0x11191919,0x9000000,0x4000000,0x1000000,
3990 0xe2101010,0xffd7e0dc,0xfff0f8f5,0xffeff8f5,0xffeaf6f1,0xffe7f5f0,0xffe2eee9,0xffd5dfdb,0xffaeb8b4,0xe6101010,0x1e090909,0x11000000,0x9000000,0x4000000, 4050 0xe21a1a1a,0xffdde5e2,0xfff3f9f7,0xfff2f9f7,0xffeef8f3,0xffebf7f3,0xffe7f1ed,0xffdce4e1,0xffbac3bf,0xe61a1a1a,0x1e101010,0x11000000,0x9000000,0x4000000,
3991 0xe3101010,0xffd2ddd9,0xffecf6f2,0xffebf7f2,0xffe4f2ed,0xffdfece7,0xffd7e1dd,0xffc7d0cd,0xffa1aaa7,0xe90f0f0f,0x30060606,0x1c000000,0xf000000,0x7000000, 4051 0xe31a1a1a,0xffd9e3df,0xffeff8f4,0xffeef8f4,0xffe8f4f0,0xffe4efeb,0xffdde6e3,0xffd0d7d5,0xffaeb6b4,0xe9191919,0x300c0c0c,0x1c000000,0xf000000,0x7000000,
3992 0xe20e0e0e,0xff98a09e,0xffe0ebe7,0xffdfe9e6,0xffd8e2df,0xffd1dbd8,0xffc9d1cf,0xffbbc3c0,0xff767d7a,0xec0d0d0d,0x41040404,0x28000000,0x16000000,0xa000000, 4052 0xe2171717,0xffa6adac,0xffe5eeeb,0xffe4edea,0xffdee7e4,0xffd8e1de,0xffd1d8d7,0xffc5ccca,0xff878d8b,0xec161616,0x41080808,0x28000000,0x16000000,0xa000000,
3993 0xa10b0b0b,0xff4a4f4d,0xf8b5bebb,0xffc9d3d0,0xffc3ccc9,0xffbcc4c1,0xffbbc3c0,0xfb9da5a2,0xff3f4240,0xdc050505,0x76020202,0x33000000,0x1c000000,0xd000000, 4053 0xa1131313,0xff5c615f,0xf8c0c8c5,0xffd1dad7,0xffccd4d1,0xffc6cdcb,0xffc5ccca,0xfbabb2af,0xff505351,0xdc0a0a0a,0x76050505,0x33000000,0x1c000000,0xd000000,
3994 0x4c0a0a0a,0xd4101010,0xff454847,0xff7b827f,0xff9ba4a1,0xff9ba4a1,0xff767d7a,0xff3f4240,0xed231c17,0xdb836b59,0xf3000000,0x64000000,0x20000000,0xe000000, 4054 0x4c121212,0xd41a1a1a,0xff575a59,0xff8c928f,0xffa9b1ae,0xffa9b1ae,0xff878d8b,0xff505351,0xed312923,0xdb937c6b,0xf3000000,0x64000000,0x20000000,0xe000000,
3995 0xf111111,0x5a090909,0xb10a0a0a,0xec0d0d0d,0xef0f0f0f,0xf20f0f0f,0xf40d0d0d,0xe5050505,0xe4513826,0xffb68059,0xe0bea595,0xf0000000,0x51000000,0xe000000, 4055 0xf1b1b1b,0x5a101010,0xb1121212,0xec161616,0xef191919,0xf2191919,0xf4161616,0xe50a0a0a,0xe4634935,0xffc1906b,0xe0c8b2a4,0xf0000000,0x51000000,0xe000000,
3996 0xd000000,0x1c000000,0x34050505,0x50030303,0x6d020202,0x82020202,0x8f020202,0xc0010101,0xec050302,0xf2453020,0xffb9845f,0xc9b6a08f,0xee000000,0x42000000, 4056 0xd000000,0x1c000000,0x340a0a0a,0x50060606,0x6d050505,0x82050505,0x8f050505,0xc0030303,0xec0a0605,0xf257402e,0xffc49471,0xc9c1ad9e,0xee000000,0x42000000,
3997 0xa000000,0x16000000,0x28000000,0x40000000,0x58000000,0x6c000000,0x77000000,0x77000000,0xac000000,0xe3000000,0xe6412d1e,0xffb7815b,0xc1b79a85,0xed000000, 4057 0xa000000,0x16000000,0x28000000,0x40000000,0x58000000,0x6c000000,0x77000000,0x77000000,0xac000000,0xe3000000,0xe6523d2b,0xffc2916d,0xc1c2a895,0xed000000,
3998 0x7000000,0xf000000,0x1c000000,0x2e000000,0x40000000,0x4f000000,0x58000000,0x58000000,0x4f000000,0x93000000,0xdd000000,0xde4f3625,0xdca26f4c,0xa0000000, 4058 0x7000000,0xf000000,0x1c000000,0x2e000000,0x40000000,0x4f000000,0x58000000,0x58000000,0x4f000000,0x93000000,0xdd000000,0xde614734,0xdcaf805e,0xa0000000,
3999 0x4000000,0x9000000,0x11000000,0x1c000000,0x28000000,0x33000000,0x38000000,0x38000000,0x33000000,0x28000000,0x7f000000,0xd8000000,0xb4000000,0x71000000 4059 0x4000000,0x9000000,0x11000000,0x1c000000,0x28000000,0x33000000,0x38000000,0x38000000,0x33000000,0x28000000,0x7f000000,0xd8000000,0xb4000000,0x71000000
4000}; 4060};
4001 4061
4002static const QRgb finish_data[] = { 4062static const QRgb finish_data[] = {
4003 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 4063 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
4004 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0x8d4e5455,0x13000000,0x3000000,0xffffff,0xffffff,0xff000000,0xffffff,0xffffff, 4064 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0x8d606667,0x13000000,0x3000000,0xffffff,0xffffff,0xff000000,0xffffff,0xffffff,
4005 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xfd151617,0x9f454b4c,0x18000000,0x3000000,0xffffff,0xff000000,0xffffff,0xffffff, 4065 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xfd202223,0x9f575d5e,0x18000000,0x3000000,0xffffff,0xff000000,0xffffff,0xffffff,
4006 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xfe151718,0xa0454a4b,0x18000000,0x3000000,0xff000000,0xffffff,0xffffff, 4066 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xfe202324,0xa0575c5d,0x18000000,0x3000000,0xff000000,0xffffff,0xffffff,
4007 0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xffffffff,0xffffffff,0xfff2f2f2,0xfe151718,0xa0454a4b,0x18000000,0xff000000,0xffffff,0xffffff, 4067 0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xffffffff,0xffffffff,0xfff4f4f4,0xfe202324,0xa0575c5d,0x18000000,0xff000000,0xffffff,0xffffff,
4008 0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff5f5f5,0xffe9e9e9,0xfe151718,0xa0454a4b,0xff000000,0x3000000,0xffffff, 4068 0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff7f7f7,0xffededed,0xfe202324,0xa0575c5d,0xff000000,0x3000000,0xffffff,
4009 0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffeaeaea,0xffcecece,0xffc8c8c8,0xef35393a,0xff000000,0xe000000,0xffffff, 4069 0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffeeeeee,0xffd6d6d6,0xffd1d1d1,0xef464a4b,0xff000000,0xe000000,0xffffff,
4010 0xffffff,0xff000000,0xfff3f3f3,0xffdbdbdb,0xffe5e5e5,0xfff8f8f8,0xffececec,0xffc9c9c9,0xffbfbfbf,0xfe151717,0xc12e3132,0xff000000,0x15000000,0xffffff, 4070 0xffffff,0xff000000,0xfff5f5f5,0xffe1e1e1,0xffe9e9e9,0xfff9f9f9,0xffefefef,0xffd1d1d1,0xffc9c9c9,0xfe202323,0xc13e4142,0xff000000,0x15000000,0xffffff,
4011 0x1000000,0xff000000,0xff000000,0xff000000,0xff000000,0xfff7f7f7,0xffd1d1d1,0xffbfbfbf,0xfe151717,0xcd2c2f2f,0x82000000,0xff000000,0xd000000,0xffffff, 4071 0x1000000,0xff000000,0xff000000,0xff000000,0xff000000,0xfff8f8f8,0xffd8d8d8,0xffc9c9c9,0xfe202323,0xcd3c3f3f,0x82000000,0xff000000,0xd000000,0xffffff,
4012 0xffffff,0x24000000,0x6b000000,0x8f000000,0xff000000,0xfff2f2f2,0xffbfbfbf,0xfe151717,0xcd2c2f2f,0x85000000,0x45000000,0xff000000,0x2000000,0xffffff, 4072 0xffffff,0x24000000,0x6b000000,0x8f000000,0xff000000,0xfff4f4f4,0xffc9c9c9,0xfe202323,0xcd3c3f3f,0x85000000,0x45000000,0xff000000,0x2000000,0xffffff,
4013 0xffffff,0xc000000,0x24000000,0x30000000,0xff000000,0xffe5e5e5,0xfe151717,0xcd2c2f2f,0x85000000,0x45000000,0x14000000,0xff000000,0xffffff,0xffffff, 4073 0xffffff,0xc000000,0x24000000,0x30000000,0xff000000,0xffe9e9e9,0xfe202323,0xcd3c3f3f,0x85000000,0x45000000,0x14000000,0xff000000,0xffffff,0xffffff,
4014 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0xce2b2e2f,0x86000000,0x45000000,0x14000000,0x2000000,0xff000000,0xffffff,0xffffff, 4074 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0xce3b3e3f,0x86000000,0x45000000,0x14000000,0x2000000,0xff000000,0xffffff,0xffffff,
4015 0xffffff,0xffffff,0xffffff,0xffffff,0x24000000,0x6b000000,0x7b000000,0x45000000,0x14000000,0x2000000,0xffffff,0xffffff,0xffffff,0xffffff, 4075 0xffffff,0xffffff,0xffffff,0xffffff,0x24000000,0x6b000000,0x7b000000,0x45000000,0x14000000,0x2000000,0xffffff,0xffffff,0xffffff,0xffffff,
4016 0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x24000000,0x26000000,0x10000000,0x2000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff 4076 0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x24000000,0x26000000,0x10000000,0x2000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff
4017}; 4077};
4018 4078
4019static const QRgb folder_data[] = { 4079static const QRgb folder_data[] = {
4020 0x1000000,0x4000000,0x7000000,0x19000000,0x11000000,0x2c000000,0x19000000,0x19000000,0x16000000,0x13000000,0xe000000,0xa000000,0x7000000,0x4000000, 4080 0x1000000,0x4000000,0x7000000,0x19000000,0x11000000,0x2c000000,0x19000000,0x19000000,0x16000000,0x13000000,0xe000000,0xa000000,0x7000000,0x4000000,
4021 0x5000000,0xa000000,0x5d1f1f1f,0xca3e3e3e,0xf53d463c,0xfe6f7b6e,0xb01d231d,0x40000000,0x2c000000,0x26000000,0x1f000000,0x19000000,0x13000000,0xd000000, 4081 0x5000000,0xa000000,0x5d2d2d2d,0xca4f4f4f,0xf54e584d,0xfe808c7f,0xb02a312a,0x40000000,0x2c000000,0x26000000,0x1f000000,0x19000000,0x13000000,0xd000000,
4022 0xc000000,0x15000000,0x9c212020,0xffb8b7b7,0xff939493,0xff757575,0xff838582,0xfa747f72,0xbb1c221c,0xc4282e26,0xe21d221d,0x7b000000,0x82000000,0x1a000000, 4082 0xc000000,0x15000000,0x9c2f2e2e,0xffc3c2c2,0xffa2a3a2,0xff868686,0xff939592,0xfa858f83,0xbb293029,0xc4373e35,0xe22a302a,0x7b000000,0x82000000,0x1a000000,
4023 0xc03d483d,0xc63b463a,0xcd111010,0xff746969,0xffaaa6a6,0xffc0bfbf,0xff9a9a9a,0xff757675,0xff777f77,0xffa5b0a4,0xffb8bfb7,0xfc818f80,0xc43a4338,0x63000000, 4083 0xc04e5a4e,0xc64c584b,0xcd1b1a1a,0xff857a7a,0xffb6b3b3,0xffcac9c9,0xffa8a8a8,0xff868786,0xff888f88,0xffb2bcb1,0xffc3c9c2,0xfc919e90,0xc44b5449,0x63000000,
4024 0xff798e77,0xffcbe7c9,0xfa91a98f,0xfa474a43,0xff473b3b,0xff5d5454,0xffaaa6a6,0xffc1c0c0,0xff959795,0xff6a716a,0xff7c8c7b,0xffaabba8,0xfe829981,0x9f101510, 4084 0xff8a9d88,0xffd3ebd1,0xfaa0b69e,0xfa595c54,0xff594c4c,0xff6f6666,0xffb6b3b3,0xffcbcaca,0xffa4a5a4,0xff7b827b,0xff8d9b8c,0xffb6c5b5,0xfe92a791,0x9f1a201a,
4025 0xc3131613,0xffb7d4b6,0xffc8e5c6,0xffbfdbbd,0xff90a88f,0xff81877b,0xff483c3c,0xff5d5454,0xffaaa6a6,0xffbfbebe,0xff8f948f,0xff4b564b,0xff769474,0xaf111611, 4085 0xc31e221e,0xffc2dbc1,0xffd1e9cf,0xffc9e1c7,0xff9fb59e,0xff91978c,0xff5a4d4d,0xff6f6666,0xffb6b3b3,0xffc9c8c8,0xff9ea39e,0xff5d685d,0xff87a385,0xaf1b221b,
4026 0x41000000,0xf4627561,0xffc4e1c3,0xffbfdabd,0xffb9d3b7,0xffaec8ac,0xff80977f,0xff7c8176,0xff4b4140,0xff5d5555,0xffb2afaf,0xff767d76,0xff4b5d4a,0xb40e120e, 4086 0x41000000,0xf4748673,0xffcde6cc,0xffc9e0c7,0xffc4dac2,0xffbad1b8,0xff90a58f,0xff8d9187,0xff5d5251,0xff6f6767,0xffbdbbbb,0xff878d87,0xff5d6f5c,0xb4171d17,
4027 0x25000000,0xae0e100d,0xffb0caaf,0xffbad5b8,0xffb4cdb2,0xffaec7ac,0xffa8c0a6,0xff9cb49b,0xff738671,0xff797f74,0xff4c4746,0xff787a78,0xff4e5a4c,0xba0b0e0b, 4087 0x25000000,0xae171a16,0xffbcd2bb,0xffc4dcc3,0xffbfd5bd,0xffbad0b8,0xffb5cab3,0xffaabfa9,0xff849682,0xff8a8f85,0xff5e5958,0xff898b89,0xff606c5e,0xba131713,
4028 0x1f000000,0x49000000,0xf4586857,0xffb0caaf,0xffafc8ad,0xffa9c1a7,0xffa3bba2,0xff9eb49c,0xff98ae97,0xff8da28c,0xff3f453c,0xff757473,0xff4f5a4e,0xbc090b09, 4088 0x1f000000,0x49000000,0xf46a7a69,0xffbcd2bb,0xffbbd1b9,0xffb6cbb4,0xffb0c5af,0xffacbfaa,0xffa6baa5,0xff9caf9b,0xff50574d,0xff868584,0xff616c60,0xbc101310,
4029 0x17000000,0x29000000,0x64000000,0xdb272f26,0xfd70856f,0xff9eb59c,0xff9fb69d,0xff9ab098,0xff94a992,0xff8da18b,0xff6d806b,0xff50514f,0xff535b53,0xbd060806, 4089 0x17000000,0x29000000,0x64000000,0xdb363f35,0xfd819580,0xffacc0aa,0xffadc1ab,0xffa8bca6,0xffa3b6a1,0xff9cae9a,0xff7e907c,0xff626361,0xff656d65,0xbd0c0f0c,
4030 0xe000000,0x1b000000,0x2c000000,0x41000000,0x83000000,0xdd222922,0xfd637662,0xff8fa48d,0xff8fa38d,0xff899c87,0xff839581,0xff3f4a3e,0xff575f56,0xba040504, 4090 0xe000000,0x1b000000,0x2c000000,0x41000000,0x83000000,0xdd303830,0xfd758774,0xff9eb19c,0xff9eb09c,0xff99aa97,0xff93a491,0xff505c4f,0xff697168,0xba080a08,
4031 0x7000000,0x10000000,0x1b000000,0x2b000000,0x3b000000,0x4d000000,0x84000000,0xdc191f19,0xfd566554,0xff7f927d,0xff7e907c,0xff637461,0xff313931,0x99030403, 4091 0x7000000,0x10000000,0x1b000000,0x2b000000,0x3b000000,0x4d000000,0x84000000,0xdc252d25,0xfd687766,0xff8fa18d,0xff8e9f8d,0xff758573,0xff414a41,0x99060806,
4032 0x4000000,0x7000000,0xf000000,0x18000000,0x24000000,0x31000000,0x40000000,0x4f000000,0x84000000,0xda171c17,0xfc384336,0xff687966,0xfd1d231b,0x88000000, 4092 0x4000000,0x7000000,0xf000000,0x18000000,0x24000000,0x31000000,0x40000000,0x4f000000,0x84000000,0xda232923,0xfc495447,0xff7a8a78,0xfd2a3128,0x88000000,
4033 0x1000000,0x3000000,0x7000000,0xb000000,0x13000000,0x1c000000,0x26000000,0x32000000,0x40000000,0x4c000000,0x6d000000,0xa9020302,0x83080a07,0x42000000 4093 0x1000000,0x3000000,0x7000000,0xb000000,0x13000000,0x1c000000,0x26000000,0x32000000,0x40000000,0x4c000000,0x6d000000,0xa9050605,0x830f120d,0x42000000
4034}; 4094};
4035 4095
4036static const unsigned char folder_open_data[] = { 4096static const unsigned char folder_open_data[] = {
4037 0x0a,0x0a,0x0a,0x0a,0x00,0x00,0x00,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a, 4097 0x0a,0x0a,0x0a,0x0a,0x00,0x00,0x00,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
4038 0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x00,0x03,0x04,0x00,0x00,0x0a,0x0a,0x0a, 4098 0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x00,0x03,0x04,0x00,0x00,0x0a,0x0a,0x0a,
4039 0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x00,0x03,0x07,0x03,0x04,0x00, 4099 0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x00,0x03,0x07,0x03,0x04,0x00,
4040 0x00,0x00,0x00,0x0a,0x0a,0x0a,0x00,0x00,0x00,0x0a,0x00,0x03,0x07,0x07, 4100 0x00,0x00,0x00,0x0a,0x0a,0x0a,0x00,0x00,0x00,0x0a,0x00,0x03,0x07,0x07,
4041 0x07,0x07,0x07,0x07,0x03,0x00,0x0a,0x0a,0x00,0x05,0x05,0x02,0x06,0x03, 4101 0x07,0x07,0x07,0x07,0x03,0x00,0x0a,0x0a,0x00,0x05,0x05,0x02,0x06,0x03,
@@ -4056,88 +4116,88 @@ static const unsigned char folder_open_data[] = {
4056}; 4116};
4057 4117
4058static const QRgb folder_open_ctable[] = { 4118static const QRgb folder_open_ctable[] = {
4059 0xff000000,0xffc0c0c0,0xff303030,0xffffa858,0xff808080,0xffa0a0a4,0xff585858,0xffffdca8,0xffdcdcdc,0xffffffff,0xc6c6c6 4119 0xff000000,0xffc0c0c0,0xff303030,0xffffa858,0xff808080,0xffa0a0a4,0xff585858,0xffffdca8,0xffdcdcdc,0xffffffff,0xc6c6c6
4060}; 4120};
4061 4121
4062static const QRgb forward_data[] = { 4122static const QRgb forward_data[] = {
4063 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 4123 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
4064 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0x8d4e5455,0x13000000,0x3000000,0xffffff,0xffffff,0xffffff,0xffffff, 4124 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0x8d606667,0x13000000,0x3000000,0xffffff,0xffffff,0xffffff,0xffffff,
4065 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xfd151617,0x9f454b4c,0x18000000,0x3000000,0xffffff,0xffffff,0xffffff, 4125 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xfd202223,0x9f575d5e,0x18000000,0x3000000,0xffffff,0xffffff,0xffffff,
4066 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xfe151718,0xa0454a4b,0x18000000,0x3000000,0xffffff,0xffffff, 4126 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xfe202324,0xa0575c5d,0x18000000,0x3000000,0xffffff,0xffffff,
4067 0xffffff,0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xffffffff,0xffffffff,0xfff2f2f2,0xfe151718,0xa0454a4b,0x18000000,0x3000000,0xffffff, 4127 0xffffff,0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xffffffff,0xffffffff,0xfff4f4f4,0xfe202324,0xa0575c5d,0x18000000,0x3000000,0xffffff,
4068 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff5f5f5,0xffe9e9e9,0xfe151718,0xa0454a4b,0x18000000,0x3000000, 4128 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff7f7f7,0xffededed,0xfe202324,0xa0575c5d,0x18000000,0x3000000,
4069 0x1000000,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffeaeaea,0xffcecece,0xffc8c8c8,0xef35393a,0x41000000,0xe000000, 4129 0x1000000,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffeeeeee,0xffd6d6d6,0xffd1d1d1,0xef464a4b,0x41000000,0xe000000,
4070 0x1000000,0xffffff,0xff000000,0xfff3f3f3,0xffdbdbdb,0xffe5e5e5,0xfff8f8f8,0xffececec,0xffc9c9c9,0xffbfbfbf,0xfe151717,0xc12e3132,0x57000000,0x15000000, 4130 0x1000000,0xffffff,0xff000000,0xfff5f5f5,0xffe1e1e1,0xffe9e9e9,0xfff9f9f9,0xffefefef,0xffd1d1d1,0xffc9c9c9,0xfe202323,0xc13e4142,0x57000000,0x15000000,
4071 0x1000000,0x1000000,0xff000000,0xff000000,0xff000000,0xff000000,0xfff7f7f7,0xffd1d1d1,0xffbfbfbf,0xfe151717,0xcd2c2f2f,0x82000000,0x3d000000,0xd000000, 4131 0x1000000,0x1000000,0xff000000,0xff000000,0xff000000,0xff000000,0xfff8f8f8,0xffd8d8d8,0xffc9c9c9,0xfe202323,0xcd3c3f3f,0x82000000,0x3d000000,0xd000000,
4072 0x1000000,0xffffff,0x24000000,0x6b000000,0x8f000000,0xff000000,0xfff2f2f2,0xffbfbfbf,0xfe151717,0xcd2c2f2f,0x85000000,0x45000000,0x14000000,0x2000000, 4132 0x1000000,0xffffff,0x24000000,0x6b000000,0x8f000000,0xff000000,0xfff4f4f4,0xffc9c9c9,0xfe202323,0xcd3c3f3f,0x85000000,0x45000000,0x14000000,0x2000000,
4073 0x1000000,0xffffff,0xc000000,0x24000000,0x30000000,0xff000000,0xffe5e5e5,0xfe151717,0xcd2c2f2f,0x85000000,0x45000000,0x14000000,0x2000000,0xffffff, 4133 0x1000000,0xffffff,0xc000000,0x24000000,0x30000000,0xff000000,0xffe9e9e9,0xfe202323,0xcd3c3f3f,0x85000000,0x45000000,0x14000000,0x2000000,0xffffff,
4074 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0xce2b2e2f,0x86000000,0x45000000,0x14000000,0x2000000,0xffffff,0xffffff, 4134 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0xce3b3e3f,0x86000000,0x45000000,0x14000000,0x2000000,0xffffff,0xffffff,
4075 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x24000000,0x6b000000,0x7b000000,0x45000000,0x14000000,0x2000000,0xffffff,0xffffff,0xffffff, 4135 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x24000000,0x6b000000,0x7b000000,0x45000000,0x14000000,0x2000000,0xffffff,0xffffff,0xffffff,
4076 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x24000000,0x26000000,0x10000000,0x2000000,0xffffff,0xffffff,0xffffff,0xffffff 4136 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x24000000,0x26000000,0x10000000,0x2000000,0xffffff,0xffffff,0xffffff,0xffffff
4077}; 4137};
4078 4138
4079static const QRgb forward_inactive_data[] = { 4139static const QRgb forward_inactive_data[] = {
4080 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 4140 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
4081 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x7f000000,0x7f000000,0x46515151,0x9000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff, 4141 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x7f000000,0x7f000000,0x46636363,0x9000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,
4082 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x7f000000,0x7fffffff,0x7e161616,0x4f484848,0xc000000,0x1000000,0xffffff,0xffffff,0xffffff, 4142 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x7f000000,0x7fffffff,0x7e222222,0x4f5a5a5a,0xc000000,0x1000000,0xffffff,0xffffff,0xffffff,
4083 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x7f000000,0x7fffffff,0x7fffffff,0x7f161616,0x50484848,0xc000000,0x1000000,0xffffff,0xffffff, 4143 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x7f000000,0x7fffffff,0x7fffffff,0x7f222222,0x505a5a5a,0xc000000,0x1000000,0xffffff,0xffffff,
4084 0xffffff,0xffffff,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x7fffffff,0x7fffffff,0x7ff2f2f2,0x7f161616,0x50484848,0xc000000,0x1000000,0xffffff, 4144 0xffffff,0xffffff,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x7fffffff,0x7fffffff,0x7ff4f4f4,0x7f222222,0x505a5a5a,0xc000000,0x1000000,0xffffff,
4085 0xffffff,0xffffff,0x7f000000,0x7fffffff,0x7fffffff,0x7fffffff,0x7fffffff,0x7fffffff,0x7ff5f5f5,0x7fe9e9e9,0x7f161616,0x50484848,0xc000000,0x1000000, 4145 0xffffff,0xffffff,0x7f000000,0x7fffffff,0x7fffffff,0x7fffffff,0x7fffffff,0x7fffffff,0x7ff7f7f7,0x7fededed,0x7f222222,0x505a5a5a,0xc000000,0x1000000,
4086 0xffffff,0xffffff,0x7f000000,0x7fffffff,0x7fffffff,0x7fffffff,0x7fffffff,0x7fffffff,0x7feaeaea,0x7fcecece,0x7fc8c8c8,0x77373737,0x20000000,0x7000000, 4146 0xffffff,0xffffff,0x7f000000,0x7fffffff,0x7fffffff,0x7fffffff,0x7fffffff,0x7fffffff,0x7feeeeee,0x7fd6d6d6,0x7fd1d1d1,0x77484848,0x20000000,0x7000000,
4087 0xffffff,0xffffff,0x7f000000,0x7ff3f3f3,0x7fdbdbdb,0x7fe5e5e5,0x7ff8f8f8,0x7fececec,0x7fc9c9c9,0x7fbfbfbf,0x7f161616,0x60303030,0x2b000000,0xa000000, 4147 0xffffff,0xffffff,0x7f000000,0x7ff5f5f5,0x7fe1e1e1,0x7fe9e9e9,0x7ff9f9f9,0x7fefefef,0x7fd1d1d1,0x7fc9c9c9,0x7f222222,0x60404040,0x2b000000,0xa000000,
4088 0xffffff,0xffffff,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x7ff7f7f7,0x7fd1d1d1,0x7fbfbfbf,0x7f161616,0x662d2d2d,0x41000000,0x1e000000,0x6000000, 4148 0xffffff,0xffffff,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x7ff8f8f8,0x7fd8d8d8,0x7fc9c9c9,0x7f222222,0x663d3d3d,0x41000000,0x1e000000,0x6000000,
4089 0xffffff,0xffffff,0x12000000,0x35000000,0x47000000,0x7f000000,0x7ff2f2f2,0x7fbfbfbf,0x7f161616,0x662d2d2d,0x42000000,0x22000000,0xa000000,0x1000000, 4149 0xffffff,0xffffff,0x12000000,0x35000000,0x47000000,0x7f000000,0x7ff4f4f4,0x7fc9c9c9,0x7f222222,0x663d3d3d,0x42000000,0x22000000,0xa000000,0x1000000,
4090 0xffffff,0xffffff,0x6000000,0x12000000,0x18000000,0x7f000000,0x7fe5e5e5,0x7f161616,0x662d2d2d,0x42000000,0x22000000,0xa000000,0x1000000,0xffffff, 4150 0xffffff,0xffffff,0x6000000,0x12000000,0x18000000,0x7f000000,0x7fe9e9e9,0x7f222222,0x663d3d3d,0x42000000,0x22000000,0xa000000,0x1000000,0xffffff,
4091 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x7f000000,0x7f000000,0x672d2d2d,0x43000000,0x22000000,0xa000000,0x1000000,0xffffff,0xffffff, 4151 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x7f000000,0x7f000000,0x673d3d3d,0x43000000,0x22000000,0xa000000,0x1000000,0xffffff,0xffffff,
4092 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x12000000,0x35000000,0x3d000000,0x22000000,0xa000000,0x1000000,0xffffff,0xffffff,0xffffff, 4152 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x12000000,0x35000000,0x3d000000,0x22000000,0xa000000,0x1000000,0xffffff,0xffffff,0xffffff,
4093 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x6000000,0x12000000,0x13000000,0x8000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff 4153 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x6000000,0x12000000,0x13000000,0x8000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff
4094}; 4154};
4095 4155
4096static const QRgb fullscreen_data[] = { 4156static const QRgb fullscreen_data[] = {
4097 0x2e000000,0x5e000000,0x7d000000,0x86000000,0x87000000,0x76000000,0x54000000,0x4b000000,0x68000000,0x7e000000,0x84000000,0x88000000,0x79000000,0x55000000, 4157 0x2e000000,0x5e000000,0x7d000000,0x86000000,0x87000000,0x76000000,0x54000000,0x4b000000,0x68000000,0x7e000000,0x84000000,0x88000000,0x79000000,0x55000000,
4098 0x5f000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x86000000,0x7a000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x93000000, 4158 0x5f000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x86000000,0x7a000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x93000000,
4099 0x7e000000,0xffffffff,0xffffffff,0xffffffff,0xfeeaeaea,0xd8111111,0xa9000000,0x95000000,0xcc353535,0xfff9f9f9,0xffffffff,0xffffffff,0xffffffff,0xc1000000, 4159 0x7e000000,0xffffffff,0xffffffff,0xffffffff,0xfeeeeeee,0xd81b1b1b,0xa9000000,0x95000000,0xcc464646,0xfffafafa,0xffffffff,0xffffffff,0xffffffff,0xc1000000,
4100 0x86000000,0xffffffff,0xffffffff,0xffffffff,0xfda7a7a7,0xe0000000,0xb9000000,0xa0000000,0xbe000000,0xfaacacac,0xffffffff,0xffffffff,0xffffffff,0xd3000000, 4160 0x86000000,0xffffffff,0xffffffff,0xffffffff,0xfdb4b4b4,0xe0000000,0xb9000000,0xa0000000,0xbe000000,0xfab8b8b8,0xffffffff,0xffffffff,0xffffffff,0xd3000000,
4101 0x88000000,0xffffffff,0xfff9f9f9,0xfdaaaaaa,0xfee3e3e3,0xf6a1a1a1,0xbf000000,0xa7000000,0xeba8a8a8,0xfde4e4e4,0xfca8a8a8,0xffe9e9e9,0xffffffff,0xd6000000, 4161 0x88000000,0xffffffff,0xfffafafa,0xfdb6b6b6,0xfee8e8e8,0xf6aeaeae,0xbf000000,0xa7000000,0xebb5b5b5,0xfde8e8e8,0xfcb5b5b5,0xffededed,0xffffffff,0xd6000000,
4102 0x77000000,0xffffffff,0xe0303030,0xe3000000,0xf6a2a2a2,0xee888888,0xb9000000,0xa1000000,0xdf919191,0xefa6a6a6,0xda000000,0xe70f0f0f,0xffffffff,0xc8000000, 4162 0x77000000,0xffffffff,0xe0404040,0xe3000000,0xf6afafaf,0xee989898,0xb9000000,0xa1000000,0xdfa0a0a0,0xefb3b3b3,0xda000000,0xe7191919,0xffffffff,0xc8000000,
4103 0x55000000,0x89000000,0xac000000,0xba000000,0xc0000000,0xb9000000,0x9f000000,0x88000000,0x93000000,0xa9000000,0xb3000000,0xbc000000,0xc0000000,0xa8000000, 4163 0x55000000,0x89000000,0xac000000,0xba000000,0xc0000000,0xb9000000,0x9f000000,0x88000000,0x93000000,0xa9000000,0xb3000000,0xbc000000,0xc0000000,0xa8000000,
4104 0x4b000000,0x79000000,0x95000000,0x9f000000,0xa7000000,0xa1000000,0x88000000,0x74000000,0x81000000,0x94000000,0x9a000000,0xa4000000,0xaa000000,0x93000000, 4164 0x4b000000,0x79000000,0x95000000,0x9f000000,0xa7000000,0xa1000000,0x88000000,0x74000000,0x81000000,0x94000000,0x9a000000,0xa4000000,0xaa000000,0x93000000,
4105 0x68000000,0xffffffff,0xc0131313,0xbc000000,0xeba8a8a8,0xdf919191,0x93000000,0x81000000,0xd4999999,0xe6acacac,0xba000000,0xd3333333,0xffffffff,0xa5000000, 4165 0x68000000,0xffffffff,0xc01e1e1e,0xbc000000,0xebb5b5b5,0xdfa0a0a0,0x93000000,0x81000000,0xd4a7a7a7,0xe6b8b8b8,0xba000000,0xd3434343,0xffffffff,0xa5000000,
4106 0x7d000000,0xffffffff,0xfeeaeaea,0xf9aaaaaa,0xfde4e4e4,0xefa6a6a6,0xa9000000,0x94000000,0xe7acacac,0xfce5e5e5,0xfaacacac,0xfff9f9f9,0xffffffff,0xbe000000, 4166 0x7d000000,0xffffffff,0xfeeeeeee,0xf9b6b6b6,0xfde8e8e8,0xefb3b3b3,0xa9000000,0x94000000,0xe7b8b8b8,0xfce9e9e9,0xfab8b8b8,0xfffafafa,0xffffffff,0xbe000000,
4107 0x83000000,0xffffffff,0xffffffff,0xffffffff,0xfcacacac,0xdb000000,0xb4000000,0x99000000,0xb8000000,0xf9aaaaaa,0xffffffff,0xffffffff,0xffffffff,0xcf000000, 4167 0x83000000,0xffffffff,0xffffffff,0xffffffff,0xfcb8b8b8,0xdb000000,0xb4000000,0x99000000,0xb8000000,0xf9b6b6b6,0xffffffff,0xffffffff,0xffffffff,0xcf000000,
4108 0x87000000,0xffffffff,0xffffffff,0xffffffff,0xfff9f9f9,0xec2d2d2d,0xbe000000,0xa2000000,0xc8121212,0xfeeaeaea,0xffffffff,0xffffffff,0xffffffff,0xd7000000, 4168 0x87000000,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xec3d3d3d,0xbe000000,0xa2000000,0xc81d1d1d,0xfeeeeeee,0xffffffff,0xffffffff,0xffffffff,0xd7000000,
4109 0x79000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xc3000000,0xa9000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xd0000000, 4169 0x79000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xc3000000,0xa9000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xd0000000,
4110 0x54000000,0x92000000,0xc1000000,0xd4000000,0xd7000000,0xc9000000,0xaa000000,0x94000000,0xa4000000,0xbd000000,0xcd000000,0xd6000000,0xcf000000,0xae000000 4170 0x54000000,0x92000000,0xc1000000,0xd4000000,0xd7000000,0xc9000000,0xaa000000,0x94000000,0xa4000000,0xbd000000,0xcd000000,0xd6000000,0xcf000000,0xae000000
4111}; 4171};
4112 4172
4113static const QRgb go_data[] = { 4173static const QRgb go_data[] = {
4114 0xffd2e7a7,0xffc5e18f,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77, 4174 0xffd2e7a7,0xffc5e18f,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,
4115 0xffb9da77,0xffb9da77,0xffb9da77,0xffa7d156,0xff77a719,0xffc5e18f,0xffb5d86f,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a, 4175 0xffb9da77,0xffb9da77,0xffb9da77,0xffa7d156,0xff77a719,0xffc5e18f,0xffb5d86f,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,
4116 0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xff85ba1c,0xff415b0e,0xffb9da77,0xffa1ce4a,0xff8ac21d,0xff8ac21d, 4176 0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xff85ba1c,0xff415b0e,0xffb9da77,0xffa1ce4a,0xff8ac21d,0xff8ac21d,
4117 0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff82b71b,0xff5a7f13,0xff5a7f13,0xff5a7f13,0xff8ac21d,0xff689216, 4177 0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff82b71b,0xff5a7f13,0xff5a7f13,0xff5a7f13,0xff8ac21d,0xff689216,
4118 0xff293909,0xffb9da77,0xffa1ce4a,0xff8ac21d,0xff8ac21d,0xff84ba1c,0xff567812,0xff2a3b09,0xff0d1203,0xff000000,0xff060901,0xff223007,0xff47640f,0xff3b530c, 4178 0xff293909,0xffb9da77,0xffa1ce4a,0xff8ac21d,0xff8ac21d,0xff84ba1c,0xff567812,0xff2a3b09,0xff0d1203,0xff000000,0xff060901,0xff223007,0xff47640f,0xff3b530c,
4119 0xff0b0f03,0xff3e4a25,0xff0a0e02,0xff82b71b,0xff689216,0xff293909,0xffb9da77,0xffa1ce4a,0xff8ac21d,0xff7db01a,0xff364c0b,0xff010100,0xff000000,0xff000000, 4179 0xff0b0f03,0xff3e4a25,0xff0a0e02,0xff82b71b,0xff689216,0xff293909,0xffb9da77,0xffa1ce4a,0xff8ac21d,0xff7db01a,0xff364c0b,0xff010100,0xff000000,0xff000000,
4120 0xff000000,0xff000000,0xff000000,0xff000000,0xff010200,0xff616c4b,0xffe4e8dc,0xff080b02,0xff415c0e,0xff689216,0xff293909,0xffb9da77,0xffa1ce4a,0xff87bd1c, 4180 0xff000000,0xff000000,0xff000000,0xff000000,0xff010200,0xff616c4b,0xffe4e8dc,0xff080b02,0xff415c0e,0xff689216,0xff293909,0xffb9da77,0xffa1ce4a,0xff87bd1c,
4121 0xff374e0c,0xff000000,0xff000000,0xff131b04,0xff374e0c,0xff4e6e10,0xff415b0e,0xff1d2906,0xff000000,0xff030303,0xffeeefee,0xffffffff,0xff68764d,0xff050701, 4181 0xff374e0c,0xff000000,0xff000000,0xff131b04,0xff374e0c,0xff4e6e10,0xff415b0e,0xff1d2906,0xff000000,0xff030303,0xffeeefee,0xffffffff,0xff68764d,0xff050701,
4122 0xff5d8214,0xff293909,0xffb9da77,0xffa1ce4a,0xff5e8414,0xff020200,0xff000000,0xff2c3e09,0xff75a519,0xff87be1c,0xff8ac21d,0xff7fb21b,0xff74a419,0xff161f05, 4182 0xff5d8214,0xff293909,0xffb9da77,0xffa1ce4a,0xff5e8414,0xff020200,0xff000000,0xff2c3e09,0xff75a519,0xff87be1c,0xff8ac21d,0xff7fb21b,0xff74a419,0xff161f05,
4123 0xff747474,0xffffffff,0xffffffff,0xfff2f4ee,0xff101606,0xff4b6a10,0xff293909,0xffb9da77,0xffa1ce4a,0xff33480b,0xff000000,0xff0c1103,0xff6d9a17,0xff8ac21d, 4183 0xff747474,0xffffffff,0xffffffff,0xfff2f4ee,0xff101606,0xff4b6a10,0xff293909,0xffb9da77,0xffa1ce4a,0xff33480b,0xff000000,0xff0c1103,0xff6d9a17,0xff8ac21d,
4124 0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff2c3c0d,0xff55584e,0xff4c4c4c,0xff52544d,0xff6a7752,0xff2f3a19,0xff4b6a10,0xff293909,0xffb9da77,0xffa1ce4a, 4184 0xff8ac21d,0xff5f8514,0xff0c1103,0xff49660f,0xff2c3c0d,0xff55584e,0xff4c4c4c,0xff52544d,0xff6a7752,0xff2f3a19,0xff4b6a10,0xff293909,0xffb9da77,0xffa1ce4a,
4125 0xff161e05,0xff000000,0xff283808,0xff84b91c,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff39510c,0xff222f07,0xff000000,0xff020300,0xff32470a, 4185 0xff161e05,0xff000000,0xff283808,0xff84b91c,0xff8ac21d,0xff628a15,0xff0b1002,0xff000000,0xff121a04,0xff39510c,0xff222f07,0xff000000,0xff020300,0xff32470a,
4126 0xff3f580d,0xff4b6a10,0xff293909,0xffb9da77,0xffa1ce4a,0xff080b02,0xff000000,0xff374d0b,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d, 4186 0xff3f580d,0xff4b6a10,0xff293909,0xffb9da77,0xffa1ce4a,0xff080b02,0xff000000,0xff374d0b,0xff8ac21d,0xff5f8514,0xff0a0e02,0xff000000,0xff000000,0xff2f420a,
4127 0xff8ac21d,0xff5d8314,0xff000000,0xff000000,0xff6a9516,0xff8ac21d,0xff689216,0xff293909,0xffb9da77,0xffa1ce4a,0xff172105,0xff000000,0xff283808,0xff80b41b, 4187 0xff8ac21d,0xff5d8314,0xff000000,0xff000000,0xff6a9516,0xff8ac21d,0xff689216,0xff293909,0xffb9da77,0xffa1ce4a,0xff172105,0xff000000,0xff283808,0xff80b41b,
4128 0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff46630f,0xff000000,0xff050701,0xff709d18,0xff8ac21d,0xff689216,0xff293909,0xffb9da77, 4188 0xff1c2706,0xff000000,0xff000000,0xff000000,0xff050801,0xff445f0e,0xff46630f,0xff000000,0xff050701,0xff709d18,0xff8ac21d,0xff689216,0xff293909,0xffb9da77,
4129 0xffa1ce4a,0xff354b0b,0xff000000,0xff0c1103,0xff6c9717,0xff719e18,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff77a719,0xff0e1403,0xff000000,0xff1b2506, 4189 0xffa1ce4a,0xff354b0b,0xff000000,0xff0c1103,0xff6c9717,0xff719e18,0xff1e2b06,0xff537411,0xff273708,0xff000000,0xff020200,0xff0e1403,0xff000000,0xff1b2506,
4130 0xff7cae1a,0xff8ac21d,0xff689216,0xff293909,0xffb9da77,0xffa1ce4a,0xff608714,0xff030401,0xff000000,0xff293909,0xff73a118,0xff83b81c,0xff8ac21d,0xff77a719, 4190 0xff7cae1a,0xff8ac21d,0xff689216,0xff293909,0xffb9da77,0xffa1ce4a,0xff608714,0xff030401,0xff000000,0xff293909,0xff73a118,0xff83b81c,0xff8ac21d,0xff77a719,
4131 0xff77a719,0xff000000,0xff000000,0xff000000,0xff435e0e,0xff8ac21d,0xff8ac21d,0xff689216,0xff293909,0xffb9da77,0xffa1ce4a,0xff88bf1d,0xff3b530c,0xff000000, 4191 0xff182105,0xff000000,0xff000000,0xff000000,0xff435e0e,0xff8ac21d,0xff8ac21d,0xff689216,0xff293909,0xffb9da77,0xffa1ce4a,0xff88bf1d,0xff3b530c,0xff000000,
4132 0xff000000,0xff101703,0xff32460a,0xff47640f,0xff3d560d,0xff182105,0xff000000,0xff000000,0xff000000,0xff77a719,0xff8ac21d,0xff8ac21d,0xff689216,0xff293909, 4192 0xff000000,0xff101703,0xff32460a,0xff47640f,0xff3d560d,0xff182105,0xff000000,0xff000000,0xff000000,0xff3f590d,0xff82b71b,0xff8ac21d,0xff689216,0xff293909,
4133 0xffb9da77,0xffa1ce4a,0xff8ac21d,0xff7fb31b,0xff3c540d,0xff020300,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff080b02,0xff77a719, 4193 0xffb9da77,0xffa1ce4a,0xff8ac21d,0xff7fb31b,0xff3c540d,0xff020300,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff080b02,0xff000000,
4134 0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff689216,0xff293909,0xffb9da77,0xffa1ce4a,0xff8ac21d,0xff8ac21d,0xff85ba1c,0xff587c13,0xff2c3e09,0xff0f1503,0xff000000, 4194 0xff030401,0xff709d18,0xff8ac21d,0xff689216,0xff293909,0xffb9da77,0xffa1ce4a,0xff8ac21d,0xff8ac21d,0xff85ba1c,0xff587c13,0xff2c3e09,0xff0f1503,0xff000000,
4135 0xff080b02,0xff243308,0xff4d6c10,0xff6a9416,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff689216,0xff293909,0xffb9da77,0xffa1ce4a,0xff8ac21d,0xff8ac21d, 4195 0xff080b02,0xff243308,0xff4d6c10,0xff6a9416,0xff233107,0xff435e0e,0xff84ba1c,0xff8ac21d,0xff689216,0xff293909,0xffb9da77,0xffa1ce4a,0xff8ac21d,0xff8ac21d,
4136 0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff689216, 4196 0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff689216,
4137 0xff293909,0xffa7d156,0xff85ba1c,0xff689216,0xff689216,0xff689216,0xff689216,0xff689216,0xff689216,0xff689216,0xff689216,0xff689216,0xff689216,0xff689216, 4197 0xff293909,0xffa7d156,0xff85ba1c,0xff689216,0xff689216,0xff689216,0xff689216,0xff689216,0xff689216,0xff689216,0xff689216,0xff689216,0xff689216,0xff689216,
4138 0xff689216,0xff689216,0xff689216,0xff689216,0xff4d6d10,0xff233107,0xff77a719,0xff415b0e,0xff293909,0xff293909,0xff293909,0xff293909,0xff293909,0xff293909, 4198 0xff689216,0xff689216,0xff689216,0xff689216,0xff4d6d10,0xff233107,0xff77a719,0xff415b0e,0xff293909,0xff293909,0xff293909,0xff293909,0xff293909,0xff293909,
4139 0xff293909,0xff293909,0xff293909,0xff293909,0xff293909,0xff293909,0xff293909,0xff293909,0xff293909,0xff233107,0xff233107 4199 0xff293909,0xff293909,0xff293909,0xff293909,0xff293909,0xff293909,0xff293909,0xff293909,0xff293909,0xff233107,0xff233107
4140}; 4200};
4141 4201
4142static const unsigned char h_src_data[] = { 4202static const unsigned char h_src_data[] = {
4143 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00, 4203 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
@@ -4165,43 +4225,43 @@ static const QRgb h_src_ctable[] = {
4165 0xc6c6c6,0xff000000,0xffc3c3c3,0xff303030,0xffc0c0ff,0xffff0000,0xff008080,0xff800000,0xffc0c000,0xff0000c0,0xff808080,0xffc0ffc0,0xff00ffff,0xffffffff, 4225 0xc6c6c6,0xff000000,0xffc3c3c3,0xff303030,0xffc0c0ff,0xffff0000,0xff008080,0xff800000,0xffc0c000,0xff0000c0,0xff808080,0xffc0ffc0,0xff00ffff,0xffffffff,
4166 0xffa0a0a0,0xff00ff00,0xffffff00,0xffffc0ff,0xff404000,0xff00c000,0xff000080,0xffffffc0,0xff400000,0xffc05800,0xff800080,0xff008000,0xff00c0c0,0xffdcdcdc, 4226 0xffa0a0a0,0xff00ff00,0xffffff00,0xffffc0ff,0xff404000,0xff00c000,0xff000080,0xffffffc0,0xff400000,0xffc05800,0xff800080,0xff008000,0xff00c0c0,0xffdcdcdc,
4167 0xffff8000,0xffffc0c0,0xff585858,0xffc00000,0xffffdca8,0xff808000,0xffffa858,0xff004000,0xffc000c0,0xff0000ff,0xffff00ff,0xffc0ffff,0xff004040 4227 0xffff8000,0xffffc0c0,0xff585858,0xffc00000,0xffffdca8,0xff808000,0xffffa858,0xff004000,0xffc000c0,0xff0000ff,0xffff00ff,0xffc0ffff,0xff004040
4168}; 4228};
4169 4229
4170static const QRgb help_icon_data[] = { 4230static const QRgb help_icon_data[] = {
4171 0xffffff,0x2000000,0x6000000,0xa000000,0x11000000,0x16000000,0x1a000000,0x1a000000,0x18000000,0x12000000,0xc000000,0x6000000,0x3000000,0x1000000, 4231 0xffffff,0x2000000,0x6000000,0xa000000,0x11000000,0x16000000,0x1a000000,0x1a000000,0x18000000,0x12000000,0xc000000,0x6000000,0x3000000,0x1000000,
4172 0x2000000,0x7000000,0x10000000,0x1b000000,0x2f000000,0x47000000,0x58000000,0x59000000,0x4b000000,0x33000000,0x1e000000,0x12000000,0x9000000,0x3000000, 4232 0x2000000,0x7000000,0x10000000,0x1b000000,0x2f000000,0x47000000,0x58000000,0x59000000,0x4b000000,0x33000000,0x1e000000,0x12000000,0x9000000,0x3000000,
4173 0x5000000,0xe000000,0x1d000000,0x3b000000,0x72000000,0xbf5b5b5b,0xdf868686,0xe0858585,0xca6b6b6b,0x81000000,0x48000000,0x24000000,0x13000000,0x7000000, 4233 0x5000000,0xe000000,0x1d000000,0x3b000000,0x72000000,0xbf6d6d6d,0xdf969696,0xe0959595,0xca7c7c7c,0x81000000,0x48000000,0x24000000,0x13000000,0x7000000,
4174 0x7000000,0x16000000,0x30000000,0x71000000,0xeaa7a7a7,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xf9d3d3d3,0x931c1c1c,0x42000000,0x1e000000,0xb000000, 4234 0x7000000,0x16000000,0x30000000,0x71000000,0xeab4b4b4,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xf9dadada,0x93292929,0x42000000,0x1e000000,0xb000000,
4175 0xa000000,0x1c000000,0x45000000,0xb65f5f5f,0xffffffff,0xffffffff,0xfdababab,0xfd8a8a8a,0xffffffff,0xffffffff,0xdf868686,0x63000000,0x2a000000,0x10000000, 4235 0xa000000,0x1c000000,0x45000000,0xb6717171,0xffffffff,0xffffffff,0xfdb7b7b7,0xfd9a9a9a,0xffffffff,0xffffffff,0xdf969696,0x63000000,0x2a000000,0x10000000,
4176 0xb000000,0x20000000,0x4c000000,0xb1626262,0xe9808080,0xfbbdbdbd,0xf9101010,0xfe303030,0xffffffff,0xffffffff,0xe2848484,0x6d000000,0x31000000,0x13000000, 4236 0xb000000,0x20000000,0x4c000000,0xb1747474,0xe9909090,0xfbc7c7c7,0xf91a1a1a,0xfe404040,0xffffffff,0xffffffff,0xe2949494,0x6d000000,0x31000000,0x13000000,
4177 0xa000000,0x1e000000,0x40000000,0x72000000,0xad000000,0xe0000000,0xfc666666,0xffeeeeee,0xffffffff,0xfbbdbdbd,0xb0000000,0x62000000,0x31000000,0x13000000, 4237 0xa000000,0x1e000000,0x40000000,0x72000000,0xad000000,0xe0000000,0xfc787878,0xfff1f1f1,0xffffffff,0xfbc7c7c7,0xb0000000,0x62000000,0x31000000,0x13000000,
4178 0x8000000,0x17000000,0x33000000,0x5d000000,0x99000000,0xe3363636,0xffffffff,0xffffffff,0xfd9a9a9a,0xd3000000,0x8e000000,0x53000000,0x2a000000,0xf000000, 4238 0x8000000,0x17000000,0x33000000,0x5d000000,0x99000000,0xe3474747,0xffffffff,0xffffffff,0xfda8a8a8,0xd3000000,0x8e000000,0x53000000,0x2a000000,0xf000000,
4179 0x5000000,0x12000000,0x2c000000,0x55000000,0x92000000,0xe76f6f6f,0xfdbbbbbb,0xfdbbbbbb,0xe0000000,0xaa000000,0x72000000,0x41000000,0x1f000000,0xb000000, 4239 0x5000000,0x12000000,0x2c000000,0x55000000,0x92000000,0xe7808080,0xfdc5c5c5,0xfdc5c5c5,0xe0000000,0xaa000000,0x72000000,0x41000000,0x1f000000,0xb000000,
4180 0x3000000,0xc000000,0x23000000,0x48000000,0x83000000,0xd7515151,0xf6797979,0xf47a7a7a,0xbc000000,0x83000000,0x56000000,0x2e000000,0x13000000,0x6000000, 4240 0x3000000,0xc000000,0x23000000,0x48000000,0x83000000,0xd7636363,0xf68a8a8a,0xf48b8b8b,0xbc000000,0x83000000,0x56000000,0x2e000000,0x13000000,0x6000000,
4181 0x1000000,0x7000000,0x1b000000,0x3d000000,0x77000000,0xe2848484,0xffffffff,0xffffffff,0xaa000000,0x66000000,0x3f000000,0x1d000000,0x9000000,0x3000000, 4241 0x1000000,0x7000000,0x1b000000,0x3d000000,0x77000000,0xe2949494,0xffffffff,0xffffffff,0xaa000000,0x66000000,0x3f000000,0x1d000000,0x9000000,0x3000000,
4182 0xffffff,0x5000000,0x18000000,0x37000000,0x6a000000,0xd9898989,0xffffffff,0xffffffff,0x93000000,0x50000000,0x2e000000,0x12000000,0x3000000,0x1000000, 4242 0xffffff,0x5000000,0x18000000,0x37000000,0x6a000000,0xd9999999,0xffffffff,0xffffffff,0x93000000,0x50000000,0x2e000000,0x12000000,0x3000000,0x1000000,
4183 0xffffff,0x5000000,0x14000000,0x2e000000,0x4e000000,0x7b000000,0x9a000000,0x92000000,0x62000000,0x3b000000,0x21000000,0xb000000,0xffffff,0xffffff, 4243 0xffffff,0x5000000,0x14000000,0x2e000000,0x4e000000,0x7b000000,0x9a000000,0x92000000,0x62000000,0x3b000000,0x21000000,0xb000000,0xffffff,0xffffff,
4184 0xffffff,0x3000000,0xe000000,0x1f000000,0x31000000,0x42000000,0x4d000000,0x4a000000,0x38000000,0x27000000,0x15000000,0x7000000,0xffffff,0xffffff 4244 0xffffff,0x3000000,0xe000000,0x1f000000,0x31000000,0x42000000,0x4d000000,0x4a000000,0x38000000,0x27000000,0x15000000,0x7000000,0xffffff,0xffffff
4185}; 4245};
4186 4246
4187static const QRgb home_data[] = { 4247static const QRgb home_data[] = {
4188 0xffffff,0x1000000,0x2000000,0x6000000,0xb000000,0x13000000,0x1c000000,0x21000000,0x21000000,0x20000000,0x1d000000,0x13000000,0xc000000,0x6000000, 4248 0xffffff,0x1000000,0x2000000,0x6000000,0xb000000,0x13000000,0x1c000000,0x21000000,0x21000000,0x20000000,0x1d000000,0x13000000,0xc000000,0x6000000,
4189 0x1000000,0x2000000,0x8000000,0x12000000,0x21000000,0x31000000,0x43000000,0x4e000000,0x51000000,0x4a000000,0x40000000,0x2e000000,0x1f000000,0x11000000, 4249 0x1000000,0x2000000,0x8000000,0x12000000,0x21000000,0x31000000,0x43000000,0x4e000000,0x51000000,0x4a000000,0x40000000,0x2e000000,0x1f000000,0x11000000,
4190 0x2000000,0x8000000,0x14000000,0x27000000,0x42000000,0x5e000000,0xa36a6a6a,0xaf5f5f5f,0x8e0b0b0b,0xab585858,0x93505050,0x57000000,0x3b000000,0x22000000, 4250 0x2000000,0x8000000,0x14000000,0x27000000,0x42000000,0x5e000000,0xa37b7b7b,0xaf717171,0x8e131313,0xab6a6a6a,0x93626262,0x57000000,0x3b000000,0x22000000,
4191 0x7000000,0x13000000,0x28000000,0x4c000000,0x71000000,0xb7585858,0xfff1f1f1,0xffefefef,0xdd535353,0xffa4a4a4,0xf9a6a6a6,0x88000000,0x5f000000,0x39000000, 4251 0x7000000,0x13000000,0x28000000,0x4c000000,0x71000000,0xb76a6a6a,0xfff3f3f3,0xfff2f2f2,0xdd656565,0xffb1b1b1,0xf9b3b3b3,0x88000000,0x5f000000,0x39000000,
4192 0xf000000,0x23000000,0x47000000,0x75000000,0xbf525252,0xffebebeb,0xffffffff,0xffffffff,0xffe3e3e3,0xff838383,0xfc7e7e7e,0xb3000000,0x86000000,0x56000000, 4252 0xf000000,0x23000000,0x47000000,0x75000000,0xbf646464,0xffeeeeee,0xffffffff,0xffffffff,0xffe8e8e8,0xff939393,0xfc8e8e8e,0xb3000000,0x86000000,0x56000000,
4193 0x1a000000,0x38000000,0x66000000,0xbd5d5d5d,0xffebebeb,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffdddddd,0xfe747474,0xd0000000,0xa4000000,0x6f000000, 4253 0x1a000000,0x38000000,0x66000000,0xbd6f6f6f,0xffeeeeee,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe3e3e3,0xfe858585,0xd0000000,0xa4000000,0x6f000000,
4194 0x21000000,0x4d000000,0xa1525252,0xffe7e7e7,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffc2c2c2,0xe8252525,0xb9000000,0x82000000, 4254 0x21000000,0x4d000000,0xa1646464,0xffebebeb,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffcbcbcb,0xe8343434,0xb9000000,0x82000000,
4195 0x2a000000,0x80626262,0xfccdcdcd,0xffeeeeee,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffc6c6c6,0xfe8d8d8d,0xd22f2f2f,0x8d000000, 4255 0x2a000000,0x80747474,0xfcd5d5d5,0xfff1f1f1,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffcfcfcf,0xfe9c9c9c,0xd23f3f3f,0x8d000000,
4196 0x2d000000,0x73353535,0xb74a4a4a,0xfdd8d8d8,0xffffffff,0xfff7f7f7,0xffeeeeee,0xffededed,0xfff6f6f6,0xffffffff,0xffacacac,0xee222222,0xcc181818,0x90000000, 4256 0x2d000000,0x73464646,0xb75c5c5c,0xfddedede,0xffffffff,0xfff8f8f8,0xfff1f1f1,0xfff0f0f0,0xfff8f8f8,0xffffffff,0xffb8b8b8,0xee303030,0xcc242424,0x90000000,
4197 0x2b000000,0x5d000000,0x94000000,0xfad6d6d6,0xffffffff,0xffa5a5a5,0xff444444,0xff3b3b3b,0xff959595,0xffffffff,0xfda1a1a1,0xdf000000,0xb9000000,0x83000000, 4257 0x2b000000,0x5d000000,0x94000000,0xfadddddd,0xffffffff,0xffb2b2b2,0xff565656,0xff4c4c4c,0xffa4a4a4,0xffffffff,0xfdaeaeae,0xdf000000,0xb9000000,0x83000000,
4198 0x23000000,0x51000000,0x85000000,0xfbe0e0e0,0xffffffff,0xffb3b3b3,0xff5a5a5a,0xff525252,0xffa7a7a7,0xffffffff,0xfbb0b0b0,0xcd000000,0xa4000000,0x73000000, 4258 0x23000000,0x51000000,0x85000000,0xfbe5e5e5,0xffffffff,0xffbebebe,0xff6c6c6c,0xff646464,0xffb4b4b4,0xffffffff,0xfbbcbcbc,0xcd000000,0xa4000000,0x73000000,
4199 0x1d000000,0x40000000,0x6c000000,0xddaaaaaa,0xfccecece,0xfda3a3a3,0xfa6b6b6b,0xfb676767,0xfe989898,0xfdc3c3c3,0xe87a7a7a,0xaf000000,0x87000000,0x5b000000, 4259 0x1d000000,0x40000000,0x6c000000,0xddb6b6b6,0xfcd6d6d6,0xfdb0b0b0,0xfa7c7c7c,0xfb797979,0xfea6a6a6,0xfdcccccc,0xe88b8b8b,0xaf000000,0x87000000,0x5b000000,
4200 0x12000000,0x2c000000,0x4d000000,0x71000000,0x94000000,0xab000000,0xb8000000,0xbf000000,0xbd000000,0xb3000000,0xa2000000,0x85000000,0x61000000,0x3e000000, 4260 0x12000000,0x2c000000,0x4d000000,0x71000000,0x94000000,0xab000000,0xb8000000,0xbf000000,0xbd000000,0xb3000000,0xa2000000,0x85000000,0x61000000,0x3e000000,
4201 0x9000000,0x18000000,0x30000000,0x48000000,0x61000000,0x74000000,0x81000000,0x86000000,0x83000000,0x7b000000,0x6a000000,0x55000000,0x3b000000,0x25000000 4261 0x9000000,0x18000000,0x30000000,0x48000000,0x61000000,0x74000000,0x81000000,0x86000000,0x83000000,0x7b000000,0x6a000000,0x55000000,0x3b000000,0x25000000
4202}; 4262};
4203 4263
4204static const unsigned char install_data[] = { 4264static const unsigned char install_data[] = {
4205 0x00,0x00,0x00,0x02,0x00,0x00,0x03,0x03,0x03,0x03,0x00,0x00,0x00,0x00, 4265 0x00,0x00,0x00,0x02,0x00,0x00,0x03,0x03,0x03,0x03,0x00,0x00,0x00,0x00,
4206 0x00,0x00,0x00,0x00,0x02,0x02,0x00,0x03,0x04,0x04,0x05,0x03,0x00,0x00, 4266 0x00,0x00,0x00,0x00,0x02,0x02,0x00,0x03,0x04,0x04,0x05,0x03,0x00,0x00,
4207 0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x02,0x00,0x03,0x04,0x05,0x05,0x03, 4267 0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x02,0x00,0x03,0x04,0x05,0x05,0x03,
@@ -4407,28 +4467,28 @@ static const QRgb left_data[] = {
4407 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0, 4467 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,
4408 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 4468 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4409 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 4469 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4410 0x0,0x0,0x0,0x0 4470 0x0,0x0,0x0,0x0
4411}; 4471};
4412 4472
4413static const QRgb library_data[] = { 4473static const QRgb library_data[] = {
4414 0x6000000,0x10000000,0x26000000,0x3c000000,0x3b000000,0x28000000,0x19000000,0x18000000,0x26000000,0x3a000000,0x3e000000,0x2e000000,0x1b000000,0xf000000, 4474 0x6000000,0x10000000,0x26000000,0x3c000000,0x3b000000,0x28000000,0x19000000,0x18000000,0x26000000,0x3a000000,0x3e000000,0x2e000000,0x1b000000,0xf000000,
4415 0xa000000,0x27000000,0xb3b6b6b6,0xffffffff,0xffffffff,0x817d7d7d,0x31000000,0x30000000,0x7f7e7e7e,0xffffffff,0xffffffff,0xb8b1b1b1,0x3a000000,0x1a000000, 4475 0xa000000,0x27000000,0xb3c1c1c1,0xffffffff,0xffffffff,0x818d8d8d,0x31000000,0x30000000,0x7f8e8e8e,0xffffffff,0xffffffff,0xb8bdbdbd,0x3a000000,0x1a000000,
4416 0xe000000,0x40000000,0xffffffff,0xffffffff,0xffffffff,0xa2636363,0x55000000,0x55000000,0xa0646464,0xffffffff,0xffffffff,0xffffffff,0x5a000000,0x28000000, 4476 0xe000000,0x40000000,0xffffffff,0xffffffff,0xffffffff,0xa2757575,0x55000000,0x55000000,0xa0767676,0xffffffff,0xffffffff,0xffffffff,0x5a000000,0x28000000,
4417 0x13000000,0x4c000000,0xffffffff,0xffffffff,0xffffffff,0xe4bebebe,0xae5c5c5c,0xae5c5c5c,0xe4bebebe,0xffffffff,0xffffffff,0xffffffff,0x6e000000,0x35000000, 4477 0x13000000,0x4c000000,0xffffffff,0xffffffff,0xffffffff,0xe4c8c8c8,0xae6e6e6e,0xae6e6e6e,0xe4c8c8c8,0xffffffff,0xffffffff,0xffffffff,0x6e000000,0x35000000,
4418 0x17000000,0x50000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x7a000000,0x3f000000, 4478 0x17000000,0x50000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x7a000000,0x3f000000,
4419 0x19000000,0x54000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x84000000,0x46000000, 4479 0x19000000,0x54000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x84000000,0x46000000,
4420 0x1a000000,0x55000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x88000000,0x4a000000, 4480 0x1a000000,0x55000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x88000000,0x4a000000,
4421 0x19000000,0x54000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x88000000,0x48000000, 4481 0x19000000,0x54000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x88000000,0x48000000,
4422 0x17000000,0x4b000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x7e000000,0x42000000, 4482 0x17000000,0x4b000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x7e000000,0x42000000,
4423 0x14000000,0x37000000,0xbdadadad,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xd19c9c9c,0x68000000,0x39000000, 4483 0x14000000,0x37000000,0xbdb9b9b9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xd1aaaaaa,0x68000000,0x39000000,
4424 0x10000000,0x20000000,0x42000000,0x67000000,0x91000000,0xf0cccccc,0xffffffff,0xffffffff,0xf3c9c9c9,0xaf000000,0x90000000,0x71000000,0x4c000000,0x2d000000, 4484 0x10000000,0x20000000,0x42000000,0x67000000,0x91000000,0xf0d4d4d4,0xffffffff,0xffffffff,0xf3d1d1d1,0xaf000000,0x90000000,0x71000000,0x4c000000,0x2d000000,
4425 0xb000000,0x12000000,0x20000000,0x35000000,0x62000000,0xe8d3d3d3,0xffffffff,0xffffffff,0xeccfcfcf,0x84000000,0x61000000,0x4b000000,0x34000000,0x1f000000, 4485 0xb000000,0x12000000,0x20000000,0x35000000,0x62000000,0xe8dadada,0xffffffff,0xffffffff,0xecd7d7d7,0x84000000,0x61000000,0x4b000000,0x34000000,0x1f000000,
4426 0x8000000,0xe000000,0x19000000,0x2b000000,0x4b000000,0xa8818181,0xe9d2d2d2,0xead1d1d1,0xb5787878,0x6b000000,0x4e000000,0x3a000000,0x27000000,0x15000000, 4486 0x8000000,0xe000000,0x19000000,0x2b000000,0x4b000000,0xa8919191,0xe9d9d9d9,0xead8d8d8,0xb5898989,0x6b000000,0x4e000000,0x3a000000,0x27000000,0x15000000,
4427 0xe000000,0x19000000,0x2c000000,0x41000000,0x5b000000,0x75000000,0x89000000,0x8e000000,0x83000000,0x70000000,0x58000000,0x41000000,0x28000000,0x16000000 4487 0xe000000,0x19000000,0x2c000000,0x41000000,0x5b000000,0x75000000,0x89000000,0x8e000000,0x83000000,0x70000000,0x58000000,0x41000000,0x28000000,0x16000000
4428}; 4488};
4429 4489
4430static const unsigned char locked_data[] = { 4490static const unsigned char locked_data[] = {
4431 0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04, 4491 0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,
4432 0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x06,0x03,0x03,0x03,0x04, 4492 0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x06,0x03,0x03,0x03,0x04,
4433 0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x06,0x07,0x06,0x07, 4493 0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x06,0x07,0x06,0x07,
4434 0x06,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x07,0x07, 4494 0x06,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x07,0x07,
@@ -4487,94 +4547,94 @@ static const QRgb mag_data[] = {
4487 0xff000000,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff000000,0xffc0c000,0xffc0c000,0xff000000,0xdcdcdc,0xdcdcdc, 4547 0xff000000,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff000000,0xffc0c000,0xffc0c000,0xff000000,0xdcdcdc,0xdcdcdc,
4488 0xdcdcdc,0xffd7d7d7,0xffd7d7d7,0xdcdcdc,0xdcdcdc,0xff000000,0xffc0c000,0xffc0c000,0xff000000,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc, 4548 0xdcdcdc,0xffd7d7d7,0xffd7d7d7,0xdcdcdc,0xdcdcdc,0xff000000,0xffc0c000,0xffc0c000,0xff000000,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,
4489 0xdcdcdc,0xdcdcdc,0xff000000,0xffc0c000,0xff000000,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff000000, 4549 0xdcdcdc,0xdcdcdc,0xff000000,0xffc0c000,0xff000000,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff000000,
4490 0xdcdcdc,0xdcdcdc 4550 0xdcdcdc,0xdcdcdc
4491}; 4551};
4492 4552
4493static const QRgb month_data[] = { 4553static const QRgb month_data[] = {
4494 0xe000000,0x18000000,0x23000000,0x2e000000,0x35000000,0x39000000,0x3b000000,0x3b000000,0x3b000000,0x39000000,0x35000000,0x2e000000,0x23000000,0x18000000, 4554 0xe000000,0x18000000,0x23000000,0x2e000000,0x35000000,0x39000000,0x3b000000,0x3b000000,0x3b000000,0x39000000,0x35000000,0x2e000000,0x23000000,0x18000000,
4495 0x18000000,0xff686eaf,0xff595fa6,0xff4b529f,0xff4b529f,0xff4b529f,0xff4b529f,0xff4b529f,0xff4b529f,0xff4b529f,0xff343b93,0xff070f75,0x3d000000,0x2a000000, 4555 0x18000000,0xff7a7fbb,0xff6b71b3,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff454ca2,0xff0d1986,0x3d000000,0x2a000000,
4496 0x24000000,0xff595fa6,0xff394095,0xff222a89,0xff222a89,0xff222a89,0xff222a89,0xff222a89,0xff222a89,0xff222a89,0xff07107a,0xff050c5a,0x5a000000,0x3e000000, 4556 0x24000000,0xff6b71b3,0xff4a51a4,0xff303999,0xff303999,0xff303999,0xff303999,0xff303999,0xff303999,0xff303999,0xff0d1a8b,0xff0a146c,0x5a000000,0x3e000000,
4497 0x2e000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe0e0e0,0xffa1a1a1,0x74000000,0x50000000, 4557 0x2e000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe5e5e5,0xffaeaeae,0x74000000,0x50000000,
4498 0x35000000,0xffffffff,0xff000000,0xff000000,0xffffffff,0xff000000,0xff000000,0xffffffff,0xff000000,0xff000000,0xffe0e0e0,0xffa1a1a1,0x86000000,0x5c000000, 4558 0x35000000,0xffffffff,0xff000000,0xff000000,0xffffffff,0xff000000,0xff000000,0xffffffff,0xff000000,0xff000000,0xffe5e5e5,0xffaeaeae,0x86000000,0x5c000000,
4499 0x39000000,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffe0e0e0,0xffa1a1a1,0x90000000,0x63000000, 4559 0x39000000,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffe5e5e5,0xffaeaeae,0x90000000,0x63000000,
4500 0x3b000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe0e0e0,0xffa1a1a1,0x95000000,0x66000000, 4560 0x3b000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe5e5e5,0xffaeaeae,0x95000000,0x66000000,
4501 0x3c000000,0xffffffff,0xff000000,0xff000000,0xffffffff,0xff000000,0xff000000,0xffffffff,0xff000000,0xff000000,0xffe0e0e0,0xffa1a1a1,0x96000000,0x67000000, 4561 0x3c000000,0xffffffff,0xff000000,0xff000000,0xffffffff,0xff000000,0xff000000,0xffffffff,0xff000000,0xff000000,0xffe5e5e5,0xffaeaeae,0x96000000,0x67000000,
4502 0x3b000000,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffe0e0e0,0xffa1a1a1,0x95000000,0x66000000, 4562 0x3b000000,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffe5e5e5,0xffaeaeae,0x95000000,0x66000000,
4503 0x39000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe0e0e0,0xffa1a1a1,0x90000000,0x63000000, 4563 0x39000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe5e5e5,0xffaeaeae,0x90000000,0x63000000,
4504 0x35000000,0xffffffff,0xfffcfcfc,0xffe0e0e0,0xffe0e0e0,0xffe0e0e0,0xffe0e0e0,0xffe0e0e0,0xffe0e0e0,0xffe0e0e0,0xffc8c8c8,0xff959595,0x86000000,0x5c000000, 4564 0x35000000,0xffffffff,0xfffdfdfd,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffd1d1d1,0xffa4a4a4,0x86000000,0x5c000000,
4505 0x2e000000,0xfff3f3f3,0xffbababa,0xffa1a1a1,0xffa1a1a1,0xffa1a1a1,0xffa1a1a1,0xffa1a1a1,0xffa1a1a1,0xffa1a1a1,0xff959595,0xff868686,0x74000000,0x50000000, 4565 0x2e000000,0xfff5f5f5,0xffc4c4c4,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffa4a4a4,0xff969696,0x74000000,0x50000000,
4506 0x24000000,0x3e000000,0x5a000000,0x74000000,0x86000000,0x90000000,0x95000000,0x96000000,0x95000000,0x90000000,0x86000000,0x74000000,0x5a000000,0x3e000000, 4566 0x24000000,0x3e000000,0x5a000000,0x74000000,0x86000000,0x90000000,0x95000000,0x96000000,0x95000000,0x90000000,0x86000000,0x74000000,0x5a000000,0x3e000000,
4507 0x18000000,0x2a000000,0x3d000000,0x4f000000,0x5c000000,0x63000000,0x66000000,0x67000000,0x66000000,0x63000000,0x5c000000,0x4f000000,0x3d000000,0x2a000000 4567 0x18000000,0x2a000000,0x3d000000,0x4f000000,0x5c000000,0x63000000,0x66000000,0x67000000,0x66000000,0x63000000,0x5c000000,0x4f000000,0x3d000000,0x2a000000
4508}; 4568};
4509 4569
4510static const QRgb mute_data[] = { 4570static const QRgb mute_data[] = {
4511 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x95020202,0xd000000,0x7000000,0xffffff,0xffffff,0xffffff,0xffffff, 4571 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x95050505,0xd000000,0x7000000,0xffffff,0xffffff,0xffffff,0xffffff,
4512 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0x3f000000,0x19000000,0xffffff,0xffffff,0xffffff,0xffffff, 4572 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0x3f000000,0x19000000,0xffffff,0xffffff,0xffffff,0xffffff,
4513 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffc0c0c0,0xff000000,0x79000000,0x2b000000,0xffffff,0xffffff,0xffffff,0xffffff, 4573 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffcacaca,0xff000000,0x79000000,0x2b000000,0xffffff,0xffffff,0xffffff,0xffffff,
4514 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffc0c0c0,0xffffffff,0xff010101,0xe3020202,0xcb020202,0x2f020202,0xbf020202,0xbf020202,0xbf020202, 4574 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffcacaca,0xffffffff,0xff030303,0xe3050505,0xcb050505,0x2f050505,0xbf050505,0xbf050505,0xbf050505,
4515 0xff000000,0xff000000,0xff000000,0xff000000,0xffc0c0c0,0xffffffff,0xffffffff,0xff010101,0xffffffff,0xbb575757,0xbf020202,0xab5f5f5f,0xffffffff,0xbf020202, 4575 0xff000000,0xff000000,0xff000000,0xff000000,0xffcacaca,0xffffffff,0xffffffff,0xff030303,0xffffffff,0xbb696969,0xbf050505,0xab717171,0xffffffff,0xbf050505,
4516 0xff000000,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffe6e6e6,0xffe6e6e6,0xffe6e6e6,0xff010101,0xda4b4b4b,0xffffffff,0xab5f5f5f,0xffffffff,0xab5f5f5f,0xbf020202, 4576 0xff000000,0xffbababa,0xffbababa,0xffbababa,0xffeaeaea,0xffeaeaea,0xffeaeaea,0xff030303,0xda5d5d5d,0xffffffff,0xab717171,0xffffffff,0xab717171,0xbf050505,
4517 0xff000000,0xffc6c6c6,0xffc6c6c6,0xffc6c6c6,0xffc6c6c6,0xffc6c6c6,0xffc6c6c6,0xff000000,0xe3020202,0xbb575757,0xffffffff,0xab5f5f5f,0xbf020202,0x2f020202, 4577 0xff000000,0xffcfcfcf,0xffcfcfcf,0xffcfcfcf,0xffcfcfcf,0xffcfcfcf,0xffcfcfcf,0xff000000,0xe3050505,0xbb696969,0xffffffff,0xab717171,0xbf050505,0x2f050505,
4518 0xff000000,0xff7d7d7d,0xff7d7d7d,0xff7d7d7d,0xffa7a7a7,0xffa6a6a6,0xffa6a6a6,0xff010101,0xda4b4b4b,0xffffffff,0xab5f5f5f,0xffffffff,0xab5f5f5f,0xbf020202, 4578 0xff000000,0xff8d8d8d,0xff8d8d8d,0xff8d8d8d,0xffb4b4b4,0xffb3b3b3,0xffb3b3b3,0xff030303,0xda5d5d5d,0xffffffff,0xab717171,0xffffffff,0xab717171,0xbf050505,
4519 0xff000000,0xff000000,0xff000000,0xff000000,0xff6b6b6b,0xff8e8e8e,0xff8e8e8e,0xff010101,0xffffffff,0xbb575757,0xbf020202,0xab5f5f5f,0xffffffff,0xbf020202, 4579 0xff000000,0xff000000,0xff000000,0xff000000,0xff7c7c7c,0xff9d9d9d,0xff9d9d9d,0xff030303,0xffffffff,0xbb696969,0xbf050505,0xab717171,0xffffffff,0xbf050505,
4520 0x24000000,0x6b000000,0x8f000000,0x8f000000,0xff000000,0xff6b6b6b,0xff8e8e8e,0xff010101,0xe3020202,0xcb020202,0x2f020202,0xbf020202,0xbf020202,0xbf020202, 4580 0x24000000,0x6b000000,0x8f000000,0x8f000000,0xff000000,0xff7c7c7c,0xff9d9d9d,0xff030303,0xe3050505,0xcb050505,0x2f050505,0xbf050505,0xbf050505,0xbf050505,
4521 0xc000000,0x24000000,0x30000000,0x30000000,0x48000000,0xff000000,0xff6b6b6b,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,0xffffff, 4581 0xc000000,0x24000000,0x30000000,0x30000000,0x48000000,0xff000000,0xff7c7c7c,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,0xffffff,
4522 0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x3c000000,0xff000000,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,0xffffff, 4582 0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x3c000000,0xff000000,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,0xffffff,
4523 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x3c000000,0xc8010101,0x79000000,0x2b000000,0xffffff,0xffffff,0xffffff,0xffffff, 4583 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x3c000000,0xc8030303,0x79000000,0x2b000000,0xffffff,0xffffff,0xffffff,0xffffff,
4524 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x31000000,0x3f000000,0x19000000,0xffffff,0xffffff,0xffffff,0xffffff 4584 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x31000000,0x3f000000,0x19000000,0xffffff,0xffffff,0xffffff,0xffffff
4525}; 4585};
4526 4586
4527static const QRgb new_data[] = { 4587static const QRgb new_data[] = {
4528 0x16000000,0x4f000000,0x9c000000,0xbb000000,0xbe000000,0xbe000000,0xc1000000,0xc4000000,0xbf000000,0xa2000000,0x6d000000,0x3e000000,0x21000000,0x12000000, 4588 0x16000000,0x4f000000,0x9c000000,0xbb000000,0xbe000000,0xbe000000,0xc1000000,0xc4000000,0xbf000000,0xa2000000,0x6d000000,0x3e000000,0x21000000,0x12000000,
4529 0x18000000,0x4b000000,0x86000000,0xffffffff,0xfffdfdfd,0xffe6e6e6,0xffa3a3a3,0xffffffff,0xf5bcbcbc,0xae000000,0x99000000,0x6e000000,0x3f000000,0x21000000, 4589 0x18000000,0x4b000000,0x86000000,0xffffffff,0xfffdfdfd,0xffeaeaea,0xffb0b0b0,0xffffffff,0xf5c6c6c6,0xae000000,0x99000000,0x6e000000,0x3f000000,0x21000000,
4530 0x19000000,0x4b000000,0x7c000000,0xffffffff,0xfffbfbfb,0xffdcdcdc,0xff868686,0xffffffff,0xffffffff,0xf8b6b6b6,0xb5000000,0x99000000,0x61000000,0x33000000, 4590 0x19000000,0x4b000000,0x7c000000,0xffffffff,0xfffcfcfc,0xffe2e2e2,0xff969696,0xffffffff,0xffffffff,0xf8c1c1c1,0xb5000000,0x99000000,0x61000000,0x33000000,
4531 0x1a000000,0x4d000000,0x7e000000,0xffffffff,0xfffbfbfb,0xffdcdcdc,0xff838383,0xffffffff,0xffffffff,0xffffffff,0xf8bababa,0xb0000000,0x7b000000,0x43000000, 4591 0x1a000000,0x4d000000,0x7e000000,0xffffffff,0xfffcfcfc,0xffe2e2e2,0xff939393,0xffffffff,0xffffffff,0xffffffff,0xf8c4c4c4,0xb0000000,0x7b000000,0x43000000,
4532 0x1c000000,0x50000000,0x81000000,0xffffffff,0xfffdfdfd,0xffe4e4e4,0xff9d9d9d,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xb9000000,0x87000000,0x4c000000, 4592 0x1c000000,0x50000000,0x81000000,0xffffffff,0xfffdfdfd,0xffe8e8e8,0xffababab,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xb9000000,0x87000000,0x4c000000,
4533 0x1c000000,0x51000000,0x84000000,0xffffffff,0xfffdfdfd,0xfff3f3f3,0xffcfcfcf,0xff9d9d9d,0xff838383,0xff868686,0xffa3a3a3,0xbd000000,0x8d000000,0x50000000, 4593 0x1c000000,0x51000000,0x84000000,0xffffffff,0xfffdfdfd,0xfff5f5f5,0xffd7d7d7,0xffababab,0xff939393,0xff969696,0xffb0b0b0,0xbd000000,0x8d000000,0x50000000,
4534 0x1d000000,0x52000000,0x85000000,0xffffffff,0xffffffff,0xfffbfbfb,0xfff3f3f3,0xffe4e4e4,0xffdcdcdc,0xffdcdcdc,0xffe6e6e6,0xbf000000,0x8f000000,0x53000000, 4594 0x1d000000,0x52000000,0x85000000,0xffffffff,0xffffffff,0xfffcfcfc,0xfff5f5f5,0xffe8e8e8,0xffe2e2e2,0xffe2e2e2,0xffeaeaea,0xbf000000,0x8f000000,0x53000000,
4535 0x1d000000,0x52000000,0x85000000,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffdfdfd,0xfffbfbfb,0xfffbfbfb,0xfffdfdfd,0xc0000000,0x8f000000,0x54000000, 4595 0x1d000000,0x52000000,0x85000000,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfffcfcfc,0xfffdfdfd,0xc0000000,0x8f000000,0x54000000,
4536 0x1d000000,0x52000000,0x85000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xbf000000,0x8f000000,0x53000000, 4596 0x1d000000,0x52000000,0x85000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xbf000000,0x8f000000,0x53000000,
4537 0x1d000000,0x51000000,0x84000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xbd000000,0x8c000000,0x51000000, 4597 0x1d000000,0x51000000,0x84000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xbd000000,0x8c000000,0x51000000,
4538 0x1c000000,0x51000000,0x86000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xb8000000,0x88000000,0x4d000000, 4598 0x1c000000,0x51000000,0x86000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xb8000000,0x88000000,0x4d000000,
4539 0x1a000000,0x4e000000,0x87000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xb2000000,0x7f000000,0x45000000, 4599 0x1a000000,0x4e000000,0x87000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xb2000000,0x7f000000,0x45000000,
4540 0x16000000,0x41000000,0x79000000,0x92000000,0xa0000000,0xae000000,0xba000000,0xbf000000,0xbf000000,0xbd000000,0xb4000000,0x9e000000,0x6a000000,0x39000000, 4600 0x16000000,0x41000000,0x79000000,0x92000000,0xa0000000,0xae000000,0xba000000,0xbf000000,0xbf000000,0xbd000000,0xb4000000,0x9e000000,0x6a000000,0x39000000,
4541 0xd000000,0x26000000,0x4b000000,0x64000000,0x76000000,0x85000000,0x90000000,0x95000000,0x95000000,0x91000000,0x86000000,0x6e000000,0x49000000,0x2a000000 4601 0xd000000,0x26000000,0x4b000000,0x64000000,0x76000000,0x85000000,0x90000000,0x95000000,0x95000000,0x91000000,0x86000000,0x6e000000,0x49000000,0x2a000000
4542}; 4602};
4543 4603
4544static const QRgb newfolder_data[] = { 4604static const QRgb newfolder_data[] = {
4545 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 4605 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
4546 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 4606 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
4547 0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 4607 0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
4548 0xff000000,0xffe5cca8,0xffffffcc,0xffffffcc,0xffffffcc,0xffffffcc,0xffcc9952,0xff000000,0xff000000,0xff000000,0xff000000,0xffffff,0xffffff,0xffffff, 4608 0xff000000,0xffe9d4b5,0xffffffd4,0xffffffd4,0xffffffd4,0xffffffd4,0xffd4a764,0xff000000,0xff000000,0xff000000,0xff000000,0xffffff,0xffffff,0xffffff,
4549 0xff000000,0xffe5cca8,0xffcc9952,0xffcc9952,0xffcc9952,0xffcc9952,0xffcc9952,0xffcb9852,0xffcb9852,0xffcb9852,0xffcb9852,0xff000000,0xffba8b5d,0xffffff, 4609 0xff000000,0xffe9d4b5,0xffd4a764,0xffd4a764,0xffd4a764,0xffd4a764,0xffd4a764,0xffd3a664,0xffd3a664,0xffd3a664,0xffd3a664,0xff000000,0xffc49a6f,0xffffff,
4550 0xff000000,0xffe5cca8,0xffcc9952,0xffcc9952,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000, 4610 0xff000000,0xffe9d4b5,0xffd4a764,0xffd4a764,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
4551 0xff000000,0xffe5cca8,0xffcc9952,0xff000000,0xffffffff,0xfffefefe,0xfff5f5f5,0xffd3d3d3,0xffa7a7a7,0xffa2a2a2,0xffc8c8c8,0xffe9e9e9,0xfff5f5f5,0xff000000, 4611 0xff000000,0xffe9d4b5,0xffd4a764,0xff000000,0xffffffff,0xfffefefe,0xfff7f7f7,0xffdadada,0xffb4b4b4,0xffafafaf,0xffd1d1d1,0xffededed,0xfff7f7f7,0xff000000,
4552 0xff000000,0xffe5cca8,0xffa35c21,0xff3f3f32,0xfffcfcc9,0xfff5f5c4,0xffdbdbaf,0xff929275,0xff66ff66,0xff66ff66,0xff838368,0xffc3c39c,0xff37372c,0x87717159, 4612 0xff000000,0xffe9d4b5,0xffb06e2f,0xff505042,0xfffdfdd1,0xfff7f7cd,0xffe1e1bb,0xffa1a186,0xff78ff78,0xff78ff78,0xff93937a,0xffccccaa,0xff48483c,0x8782826b,
4553 0xff000000,0xffe5cca8,0xff000000,0xfffefefe,0xfff6f6c5,0xffd3d3a9,0xff929275,0xff48483a,0xff66ff66,0xff66ff66,0xff39392e,0xff73735c,0xff000000,0x6b000000, 4613 0xff000000,0xffe9d4b5,0xff000000,0xfffefefe,0xfff8f8ce,0xffdadab6,0xffa1a186,0xff5a5a4b,0xff78ff78,0xff78ff78,0xff4a4a3e,0xff84846e,0xff000000,0x6b000000,
4554 0xff000000,0xffa35c21,0xff3f3f32,0xfffefecb,0xffeeeebe,0xffa6a684,0xff66ff66,0xff66ff66,0xff66ff66,0xff66ff66,0xff66ff66,0xff66ff66,0xe423231c,0x67000000, 4614 0xff000000,0xffb06e2f,0xff505042,0xfffefed3,0xfff1f1c8,0xffb3b394,0xff78ff78,0xff78ff78,0xff78ff78,0xff78ff78,0xff78ff78,0xff78ff78,0xe4313129,0x67000000,
4555 0xff000000,0xffcc9952,0xffffffff,0xfffefecb,0xffececbd,0xffa1a181,0xff66ff66,0xff66ff66,0xff66ff66,0xff66ff66,0xff66ff66,0xff66ff66,0xc6000000,0x4d000000, 4615 0xff000000,0xffd4a764,0xffffffff,0xfffefed3,0xffefefc7,0xffaeae91,0xff78ff78,0xff78ff78,0xff78ff78,0xff78ff78,0xff78ff78,0xff78ff78,0xc6000000,0x4d000000,
4556 0xff000000,0xffffffff,0xffffffcc,0xfffefecb,0xfff2f2c2,0xffc8c8a0,0xff838368,0xff39392e,0xff66ff66,0xff66ff66,0xff080807,0xee151511,0x99000000,0x37000000, 4616 0xff000000,0xffffffff,0xffffffd4,0xfffefed3,0xfff4f4cb,0xffd1d1ad,0xff93937a,0xff4a4a3e,0xff78ff78,0xff78ff78,0xff0f0f0d,0xee20201b,0x99000000,0x37000000,
4557 0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff66ff66,0xff66ff66,0xff000000,0xb0000000,0x5f000000,0x28000000, 4617 0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff78ff78,0xff78ff78,0xff000000,0xb0000000,0x5f000000,0x28000000,
4558 0xffffff,0x17000000,0x43000000,0x57000000,0x59000000,0x5e000000,0x6c000000,0x8c000000,0xac000000,0xb5000000,0x99000000,0x5f000000,0x34000000,0x19000000 4618 0xffffff,0x17000000,0x43000000,0x57000000,0x59000000,0x5e000000,0x6c000000,0x8c000000,0xac000000,0xb5000000,0x99000000,0x5f000000,0x34000000,0x19000000
4559}; 4619};
4560 4620
4561static const QRgb next_data[] = { 4621static const QRgb next_data[] = {
4562 0x1000000,0x3000000,0x8000000,0xf000000,0x16000000,0x1b000000,0x1d000000,0x1c000000,0x19000000,0x16000000,0x12000000,0xf000000,0xb000000,0x8000000, 4622 0x1000000,0x3000000,0x8000000,0xf000000,0x16000000,0x1b000000,0x1d000000,0x1c000000,0x19000000,0x16000000,0x12000000,0xf000000,0xb000000,0x8000000,
4563 0x3000000,0xa000000,0x15000000,0x30000000,0x5c0e0e0e,0x6c0c0c0c,0x59000000,0x48000000,0x41000000,0x45000000,0x44000000,0x30000000,0x1b000000,0x12000000, 4623 0x3000000,0xa000000,0x15000000,0x30000000,0x5c171717,0x6c141414,0x59000000,0x48000000,0x41000000,0x45000000,0x44000000,0x30000000,0x1b000000,0x12000000,
4564 0x8000000,0x15000000,0x36000000,0x7d0a0a0a,0xebb8b8b8,0xffffffff,0xc9474747,0x95000000,0x8d000000,0xb13d3d3d,0xd7ababab,0x68000000,0x34000000,0x22000000, 4624 0x8000000,0x15000000,0x36000000,0x7d121212,0xebc3c3c3,0xffffffff,0xc9595959,0x95000000,0x8d000000,0xb14e4e4e,0xd7b7b7b7,0x68000000,0x34000000,0x22000000,
4565 0xe000000,0x2e000000,0x7c0a0a0a,0xefb2b2b2,0xffffffff,0xffffffff,0xffffffff,0xf03c3c3c,0xea2e2e2e,0xffffffff,0xffffffff,0x9f000000,0x55000000,0x37000000, 4625 0xe000000,0x2e000000,0x7c121212,0xefbdbdbd,0xffffffff,0xffffffff,0xffffffff,0xf04d4d4d,0xea3e3e3e,0xffffffff,0xffffffff,0x9f000000,0x55000000,0x37000000,
4566 0x14000000,0x55000000,0xeab6b6b6,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffcfcfc,0xffffffff,0xffffffff,0xffffffff,0xca000000,0x79000000,0x4d000000, 4626 0x14000000,0x55000000,0xeac1c1c1,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xffffffff,0xffffffff,0xffffffff,0xca000000,0x79000000,0x4d000000,
4567 0x19000000,0x65000000,0xffffffff,0xffffffff,0xffececec,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xec000000,0x9a000000,0x5f000000, 4627 0x19000000,0x65000000,0xffffffff,0xffffffff,0xffefefef,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xec000000,0x9a000000,0x5f000000,
4568 0x1b000000,0x55000000,0xc0383838,0xfee4e4e4,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xb2000000,0x6d000000, 4628 0x1b000000,0x55000000,0xc0494949,0xfee8e8e8,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xb2000000,0x6d000000,
4569 0x1a000000,0x44000000,0x8f000000,0xec2d2d2d,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xc2000000,0x76000000, 4629 0x1a000000,0x44000000,0x8f000000,0xec3d3d3d,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xc2000000,0x76000000,
4570 0x17000000,0x3e000000,0x86000000,0xe62f2f2f,0xffffffff,0xffffffff,0xffffffff,0xfff8f8f8,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xc2000000,0x75000000, 4630 0x17000000,0x3e000000,0x86000000,0xe63f3f3f,0xffffffff,0xffffffff,0xffffffff,0xfff9f9f9,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xc2000000,0x75000000,
4571 0x14000000,0x41000000,0xab3f3f3f,0xfde1e1e1,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xb3000000,0x6c000000, 4631 0x14000000,0x41000000,0xab505050,0xfde6e6e6,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xb3000000,0x6c000000,
4572 0x11000000,0x3e000000,0xc99a9a9a,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xed000000,0x9b000000,0x5d000000, 4632 0x11000000,0x3e000000,0xc9a8a8a8,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xed000000,0x9b000000,0x5d000000,
4573 0xe000000,0x2d000000,0x63000000,0x9b000000,0xc6000000,0xea000000,0xff000000,0xff000000,0xff000000,0xff000000,0xed000000,0xbc000000,0x7a000000,0x49000000, 4633 0xe000000,0x2d000000,0x63000000,0x9b000000,0xc6000000,0xea000000,0xff000000,0xff000000,0xff000000,0xff000000,0xed000000,0xbc000000,0x7a000000,0x49000000,
4574 0xa000000,0x1a000000,0x32000000,0x52000000,0x76000000,0x97000000,0xb0000000,0xc1000000,0xc1000000,0xb3000000,0x9b000000,0x7a000000,0x52000000,0x31000000, 4634 0xa000000,0x1a000000,0x32000000,0x52000000,0x76000000,0x97000000,0xb0000000,0xc1000000,0xc1000000,0xb3000000,0x9b000000,0x7a000000,0x52000000,0x31000000,
4575 0x7000000,0x11000000,0x20000000,0x35000000,0x4b000000,0x5e000000,0x6c000000,0x75000000,0x74000000,0x6c000000,0x5d000000,0x49000000,0x31000000,0x1d000000 4635 0x7000000,0x11000000,0x20000000,0x35000000,0x4b000000,0x5e000000,0x6c000000,0x75000000,0x74000000,0x6c000000,0x5d000000,0x49000000,0x31000000,0x1d000000
4576}; 4636};
4577 4637
4578static const unsigned char oneoverx_data[] = { 4638static const unsigned char oneoverx_data[] = {
4579 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 4639 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
4580 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00, 4640 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,
@@ -4614,47 +4674,47 @@ static const unsigned char pass_data[] = {
4614 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x00,0x00 4674 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x00,0x00
4615}; 4675};
4616 4676
4617static const QRgb pass_ctable[] = { 4677static const QRgb pass_ctable[] = {
4618 0xc6c6c6,0xff000000,0xffffff00 4678 0xc6c6c6,0xff000000,0xffffff00
4619}; 4679};
4620 4680
4621static const QRgb paste_data[] = { 4681static const QRgb paste_data[] = {
4622 0xffffff,0x0,0x0,0x0,0x38000000,0xff000000,0xff000000,0xff000000,0x57000000,0x0,0x0,0x0,0x0,0x8e8e8e, 4682 0xffffff,0x0,0x0,0x0,0x38000000,0xff000000,0xff000000,0xff000000,0x57000000,0x0,0x0,0x0,0x0,0x9d9d9d,
4623 0xffffff,0x0,0x8b000000,0xaa000000,0xc4141414,0xff979797,0xffadadad,0xffa1a1a1,0xcd232323,0xa9000000,0x9e000000,0x0,0x0,0x272829, 4683 0xffffff,0x0,0x8b000000,0xaa000000,0xc41f1f1f,0xffa5a5a5,0xffb9b9b9,0xffaeaeae,0xcd313131,0xa9000000,0x9e000000,0x0,0x0,0x363738,
4624 0xffffff,0x8e000000,0xe3292929,0xff656565,0xff1b1b1b,0xffbbbbbb,0xffbababa,0xffc2c2c2,0xff2b2b2b,0xff4e4e4e,0xe2202020,0xb0000000,0x221808,0x241907, 4684 0xffffff,0x8e000000,0xe3383838,0xff777777,0xff282828,0xffc5c5c5,0xffc4c4c4,0xffcbcbcb,0xff3b3b3b,0xff606060,0xe22e2e2e,0xb0000000,0x30240f,0x33250d,
4625 0xffffff,0xac000000,0xfc838383,0xfe7f7f7f,0xff535353,0xff565656,0xff4c4c4c,0xff4a4a4a,0xff464747,0xff5d5d5b,0xfb383839,0xda000000,0x2a1e0a,0x362812, 4685 0xffffff,0xac000000,0xfc939393,0xfe8f8f8f,0xff656565,0xff686868,0xff5e5e5e,0xff5c5c5c,0xff585959,0xff6f6f6d,0xfb49494a,0xda000000,0x392b12,0x47371d,
4626 0xffffff,0xa7000000,0xff808080,0xff6e6e6e,0xff6a6a6a,0xff403f3d,0xff111010,0xff32312f,0xff24211d,0xff6b6354,0xff35332d,0xd4000000,0x291d0a,0x342711, 4686 0xffffff,0xa7000000,0xff909090,0xff7f7f7f,0xff7b7b7b,0xff51504e,0xff1b1a1a,0xff42413f,0xff332f2a,0xff7c7566,0xff46433d,0xd4000000,0x382a12,0x45361b,
4627 0xffffff,0xa7000000,0xff7f7f7f,0xff6e6e6e,0xff696968,0xff32322f,0xff716f6b,0xffffffff,0xffcebea4,0xfffcfaf4,0xff928b7e,0xd8110c02,0x271b08,0x352812, 4687 0xffffff,0xa7000000,0xff8f8f8f,0xff7f7f7f,0xff7a7a7a,0xff42423f,0xff82807c,0xffffffff,0xffd6c8b1,0xfffdfbf6,0xffa19a8e,0xd81b1405,0x36280f,0x46371d,
4628 0xffffff,0xa7000000,0xff7f7f7f,0xff6e6e6e,0xff696968,0xff333330,0xff6a6965,0xfffffff4,0xffa3947a,0xffe8e5df,0xffffffff,0xf0989080,0x71281a06,0x32c200c, 4688 0xffffff,0xa7000000,0xff8f8f8f,0xff7f7f7f,0xff7a7a7a,0xff434340,0xff7b7a77,0xfffffff6,0xffb0a38b,0xffece9e4,0xffffffff,0xf0a69f90,0x7137270c,0x33c2e14,
4629 0xffffff,0xa7000000,0xff7f7f7f,0xff6e6e6e,0xff696968,0xff343331,0xff6a6863,0xfffffef1,0xff9e8e74,0xffeeebe7,0xffffffff,0xffffffff,0xfaa0998e,0x6a322612, 4689 0xffffff,0xa7000000,0xff8f8f8f,0xff7f7f7f,0xff7a7a7a,0xff454341,0xff7b7a75,0xfffffef3,0xffac9d85,0xfff1eeeb,0xffffffff,0xffffffff,0xfaada79d,0x6a42351d,
4630 0xffffff,0xa7000000,0xff7f7f7f,0xff6e6e6e,0xff696968,0xff343331,0xff686560,0xfffffbee,0xffb7a890,0xffaa9d89,0xffaea290,0xffc4b8a4,0xffa8a194,0xb2130e07, 4690 0xffffff,0xa7000000,0xff8f8f8f,0xff7f7f7f,0xff7a7a7a,0xff454341,0xff7a7772,0xfffffcf1,0xffc2b59f,0xffb6ab99,0xffbaaf9f,0xffcdc3b1,0xffb5aea3,0xb21e170d,
4631 0xffffff,0xa7000000,0xff7f7f7f,0xff6f6f6f,0xff686767,0xff31302e,0xff64615b,0xfffcf3e6,0xffdcd1bc,0xffc7b79d,0xffc4b39a,0xfed7c7ad,0xff978f83,0xb6000000, 4691 0xffffff,0xa7000000,0xff8f8f8f,0xff808080,0xff7a7979,0xff41403e,0xff76736d,0xfffdf5ea,0xffe2d8c6,0xffd0c2ab,0xffcdbea8,0xfeddd0b9,0xffa59e93,0xb6000000,
4632 0xffffff,0xa7000000,0xff818181,0xff707071,0xff6a6968,0xff343331,0xff625c53,0xffeee2ce,0xffd9cdb9,0xffdacdb8,0xffd7cab3,0xfce6d8c3,0xf2a8a299,0xbf000000, 4692 0xffffff,0xa7000000,0xff919191,0xff818182,0xff7b7a7a,0xff454341,0xff746e65,0xfff1e7d6,0xffdfd5c4,0xffe0d5c3,0xffddd2be,0xfceadecc,0xf2b5afa7,0xbf000000,
4633 0xffffff,0xb1000000,0xf9686868,0xfe686868,0xff626262,0xff31302f,0xff665f53,0xfff3e3ca,0xffd8cab2,0xffd6c7af,0xffd3c5ac,0xfce6d7bf,0xf1aca497,0xb3000000, 4693 0xffffff,0xb1000000,0xf97a7a7a,0xfe7a7a7a,0xff747474,0xff41403f,0xff787165,0xfff5e8d2,0xffded2bd,0xffddd0bb,0xffdaceb8,0xfceaddc9,0xf1b8b1a5,0xb3000000,
4634 0xffffff,0x79000000,0xe60d0d0d,0xff262626,0xff222222,0xff070809,0xff3a3630,0xff9a907f,0xff8b8171,0xff8a8070,0xff8d8373,0xff9a907f,0xff6a665f,0xb1050402, 4694 0xffffff,0x79000000,0xe6161616,0xff353535,0xff303030,0xff0d0f10,0xff4b4740,0xffa89f8f,0xff9a9182,0xff9a9081,0xff9c9384,0xffa89f8f,0xff7b7871,0xb10a0805,
4635 0xffffff,0x0,0x6e000000,0x85000000,0x85000000,0x9018130a,0xa9342e24,0xbd2a251c,0xb81d1911,0xae1e1a11,0xae1f1b12,0xac211c14,0xae1a150d,0x68201709 4695 0xffffff,0x0,0x6e000000,0x85000000,0x85000000,0x90241e12,0xa9453e33,0xbd393429,0xb82a251b,0xae2b271b,0xae2d281d,0xac2f291f,0xae272016,0x682e2310
4636}; 4696};
4637 4697
4638static const QRgb paste_inactive_data[] = { 4698static const QRgb paste_inactive_data[] = {
4639 0xffffff,0x0,0x0,0x0,0x1c000000,0x7f000000,0x7f000000,0x7f000000,0x2b000000,0x0,0x0,0x0,0x0,0x8e8e8e, 4699 0xffffff,0x0,0x0,0x0,0x1c000000,0x7f000000,0x7f000000,0x7f000000,0x2b000000,0x0,0x0,0x0,0x0,0x9d9d9d,
4640 0xffffff,0x0,0x45000000,0x55000000,0x62141414,0x7f979797,0x7fadadad,0x7fa1a1a1,0x66232323,0x54000000,0x4f000000,0x0,0x0,0x272829, 4700 0xffffff,0x0,0x45000000,0x55000000,0x621f1f1f,0x7fa5a5a5,0x7fb9b9b9,0x7faeaeae,0x66313131,0x54000000,0x4f000000,0x0,0x0,0x363738,
4641 0xffffff,0x47000000,0x71292929,0x7f656565,0x7f1b1b1b,0x7fbbbbbb,0x7fbababa,0x7fc2c2c2,0x7f2b2b2b,0x7f4e4e4e,0x71202020,0x58000000,0x221808,0x241907, 4701 0xffffff,0x47000000,0x71383838,0x7f777777,0x7f282828,0x7fc5c5c5,0x7fc4c4c4,0x7fcbcbcb,0x7f3b3b3b,0x7f606060,0x712e2e2e,0x58000000,0x30240f,0x33250d,
4642 0xffffff,0x56000000,0x7e838383,0x7f7f7f7f,0x7f535353,0x7f565656,0x7f4c4c4c,0x7f4a4a4a,0x7f464646,0x7f5c5c5c,0x7d383838,0x6d000000,0x2a1e0a,0x362812, 4702 0xffffff,0x56000000,0x7e939393,0x7f8f8f8f,0x7f656565,0x7f686868,0x7f5e5e5e,0x7f5c5c5c,0x7f585858,0x7f6e6e6e,0x7d494949,0x6d000000,0x392b12,0x47371d,
4643 0xffffff,0x53000000,0x7f808080,0x7f6e6e6e,0x7f6a6a6a,0x7f3e3e3e,0x7f101010,0x7f303030,0x7f202020,0x7f5f5f5f,0x7f313131,0x6a000000,0x291d0a,0x342711, 4703 0xffffff,0x53000000,0x7f909090,0x7f7f7f7f,0x7f7b7b7b,0x7f4f4f4f,0x7f1a1a1a,0x7f404040,0x7f2e2e2e,0x7f717171,0x7f414141,0x6a000000,0x382a12,0x45361b,
4644 0xffffff,0x53000000,0x7f7f7f7f,0x7f6e6e6e,0x7f686868,0x7f303030,0x7f6e6e6e,0x7fffffff,0x7fb9b9b9,0x7ff8f8f8,0x7f888888,0x6c090909,0x271b08,0x352812, 4704 0xffffff,0x53000000,0x7f8f8f8f,0x7f7f7f7f,0x7f7a7a7a,0x7f404040,0x7f7f7f7f,0x7fffffff,0x7fc4c4c4,0x7ff9f9f9,0x7f989898,0x6c101010,0x36280f,0x46371d,
4645 0xffffff,0x53000000,0x7f7f7f7f,0x7f6e6e6e,0x7f686868,0x7f313131,0x7f676767,0x7ff9f9f9,0x7f8e8e8e,0x7fe3e3e3,0x7fffffff,0x788c8c8c,0x38171717,0x11c1c1c, 4705 0xffffff,0x53000000,0x7f8f8f8f,0x7f7f7f7f,0x7f7a7a7a,0x7f414141,0x7f797979,0x7ffafafa,0x7f9d9d9d,0x7fe8e8e8,0x7fffffff,0x789b9b9b,0x38232323,0x1292929,
4646 0xffffff,0x53000000,0x7f7f7f7f,0x7f6e6e6e,0x7f686868,0x7f323232,0x7f666666,0x7ff8f8f8,0x7f898989,0x7feaeaea,0x7fffffff,0x7fffffff,0x7d979797,0x35222222, 4706 0xffffff,0x53000000,0x7f8f8f8f,0x7f7f7f7f,0x7f7a7a7a,0x7f424242,0x7f787878,0x7ff9f9f9,0x7f999999,0x7feeeeee,0x7fffffff,0x7fffffff,0x7da5a5a5,0x35303030,
4647 0xffffff,0x53000000,0x7f7f7f7f,0x7f6e6e6e,0x7f686868,0x7f323232,0x7f646464,0x7ff6f6f6,0x7fa3a3a3,0x7f999999,0x7f9f9f9f,0x7fb4b4b4,0x7f9e9e9e,0x590d0d0d, 4707 0xffffff,0x53000000,0x7f8f8f8f,0x7f7f7f7f,0x7f7a7a7a,0x7f424242,0x7f767676,0x7ff8f8f8,0x7fb0b0b0,0x7fa7a7a7,0x7fadadad,0x7fbfbfbf,0x7facacac,0x59161616,
4648 0xffffff,0x53000000,0x7f7f7f7f,0x7f6f6f6f,0x7f676767,0x7f2f2f2f,0x7f5f5f5f,0x7ff1f1f1,0x7fcccccc,0x7fb2b2b2,0x7fafafaf,0x7fc2c2c2,0x7f8d8d8d,0x5b000000, 4708 0xffffff,0x53000000,0x7f8f8f8f,0x7f808080,0x7f797979,0x7f3f3f3f,0x7f717171,0x7ff3f3f3,0x7fd4d4d4,0x7fbdbdbd,0x7fbbbbbb,0x7fcbcbcb,0x7f9c9c9c,0x5b000000,
4649 0xffffff,0x53000000,0x7f818181,0x7f707070,0x7f696969,0x7f323232,0x7f5a5a5a,0x7fdedede,0x7fc9c9c9,0x7fc9c9c9,0x7fc5c5c5,0x7ed4d4d4,0x79a0a0a0,0x5f000000, 4709 0xffffff,0x53000000,0x7f919191,0x7f818181,0x7f7a7a7a,0x7f424242,0x7f6c6c6c,0x7fe3e3e3,0x7fd1d1d1,0x7fd1d1d1,0x7fcecece,0x7edbdbdb,0x79adadad,0x5f000000,
4650 0xffffff,0x58000000,0x7c686868,0x7f686868,0x7f626262,0x7f303030,0x7f5c5c5c,0x7fdedede,0x7fc5c5c5,0x7fc2c2c2,0x7fbfbfbf,0x7ed2d2d2,0x78a1a1a1,0x59000000, 4710 0xffffff,0x58000000,0x7c7a7a7a,0x7f7a7a7a,0x7f747474,0x7f404040,0x7f6e6e6e,0x7fe3e3e3,0x7fcecece,0x7fcbcbcb,0x7fc9c9c9,0x7ed9d9d9,0x78aeaeae,0x59000000,
4651 0xffffff,0x3c000000,0x730d0d0d,0x7f262626,0x7f222222,0x7f080808,0x7f353535,0x7f8c8c8c,0x7f7e7e7e,0x7f7d7d7d,0x7f808080,0x7f8c8c8c,0x7f646464,0x58030303, 4711 0xffffff,0x3c000000,0x73161616,0x7f353535,0x7f303030,0x7f0f0f0f,0x7f464646,0x7f9b9b9b,0x7f8e8e8e,0x7f8d8d8d,0x7f909090,0x7f9b9b9b,0x7f767676,0x58060606,
4652 0xffffff,0x0,0x37000000,0x42000000,0x42000000,0x48111111,0x542c2c2c,0x5e232323,0x5c171717,0x57171717,0x57181818,0x561a1a1a,0x57131313,0x34141414 4712 0xffffff,0x0,0x37000000,0x42000000,0x42000000,0x481b1b1b,0x543c3c3c,0x5e313131,0x5c232323,0x57232323,0x57242424,0x56272727,0x571e1e1e,0x341f1f1f
4653}; 4713};
4654 4714
4655static const unsigned char pixmap_data[] = { 4715static const unsigned char pixmap_data[] = {
4656 0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x0b,0x0b, 4716 0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x0b,0x0b,
4657 0x0b,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x0b, 4717 0x0b,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x0b,
4658 0x11,0x0c,0x0c,0x0b,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03, 4718 0x11,0x0c,0x0c,0x0b,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
4659 0x0b,0x07,0x0c,0x11,0x0c,0x0b,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03, 4719 0x0b,0x07,0x0c,0x11,0x0c,0x0b,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
4660 0x03,0x0b,0x07,0x0c,0x00,0x00,0x0b,0x03,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b, 4720 0x03,0x0b,0x07,0x0c,0x00,0x00,0x0b,0x03,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
@@ -4676,44 +4736,44 @@ static const unsigned char pixmap_data[] = {
4676 4736
4677static const QRgb pixmap_ctable[] = { 4737static const QRgb pixmap_ctable[] = {
4678 0xffff8000,0xff008000,0xff0000c0,0xc6c6c6,0xffc0ffc0,0xff000080,0xff00ff00,0xffffdca8,0xffffffc0,0xff808000,0xff00c000,0xff000000,0xffffa858,0xffffff00, 4738 0xffff8000,0xff008000,0xff0000c0,0xc6c6c6,0xffc0ffc0,0xff000080,0xff00ff00,0xffffdca8,0xffffffc0,0xff808000,0xff00c000,0xff000000,0xffffa858,0xffffff00,
4679 0xffc0c000,0xff0000ff,0xffffc0c0,0xffc05800,0xffff0000,0xffc0c0ff 4739 0xffc0c000,0xff0000ff,0xffffc0c0,0xffc05800,0xffff0000,0xffc0c0ff
4680}; 4740};
4681 4741
4682static const QRgb play_data[] = { 4742static const QRgb play_data[] = {
4683 0xc6000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xc6000000, 4743 0xc6000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xc6000000,
4684 0xff000000,0xffd6d6d6,0xffe1e1e1,0xffdcdcdc,0xffcfcfcf,0xffcccccc,0xffcbcbcb,0xffcbcbcb,0xffc3c3c3,0xffaeaeae,0xff939393,0xff707070,0xff414141,0xff000000, 4744 0xff000000,0xffdddddd,0xffe6e6e6,0xffe2e2e2,0xffd7d7d7,0xffd4d4d4,0xffd3d3d3,0xffd3d3d3,0xffcccccc,0xffbababa,0xffa2a2a2,0xff818181,0xff525252,0xff000000,
4685 0xff000000,0xffc8c8c8,0xffd6d6d6,0xffc0c0c0,0xff999999,0xffa2a2a2,0xffb8b8b8,0xffbebebe,0xffb1b1b1,0xff959595,0xff707070,0xff414141,0xff2c2c2c,0xff000000, 4745 0xff000000,0xffd1d1d1,0xffdddddd,0xffcacaca,0xffa7a7a7,0xffafafaf,0xffc3c3c3,0xffc8c8c8,0xffbdbdbd,0xffa4a4a4,0xff818181,0xff525252,0xff3c3c3c,0xff000000,
4686 0xff000000,0xffb3b3b3,0xffc1c1c1,0xff9c9c9c,0xff565656,0xffacacac,0xff878787,0xffa1a1a1,0xff989898,0xff717171,0xff464646,0xff2d2d2d,0xff232323,0xff000000, 4746 0xff000000,0xffbebebe,0xffcbcbcb,0xffaaaaaa,0xff686868,0xffb8b8b8,0xff979797,0xffaeaeae,0xffa6a6a6,0xff828282,0xff585858,0xff3d3d3d,0xff313131,0xff000000,
4687 0xff000000,0xff9b9b9b,0xffa6a6a6,0xff808080,0xff2f2f2f,0xffffffff,0xffa0a0a0,0xff6a6a6a,0xff6d6d6d,0xff484848,0xff2e2e2e,0xff252525,0xff1c1c1c,0xff000000, 4747 0xff000000,0xffa9a9a9,0xffb3b3b3,0xff909090,0xff3f3f3f,0xffffffff,0xffadadad,0xff7b7b7b,0xff7e7e7e,0xff5a5a5a,0xff3e3e3e,0xff343434,0xff292929,0xff000000,
4688 0xff000000,0xff818181,0xff868686,0xff626262,0xff1e1e1e,0xffffffff,0xffffffff,0xff949494,0xff323232,0xff2c2c2c,0xff252525,0xff1d1d1d,0xff161616,0xff000000, 4748 0xff000000,0xff919191,0xff969696,0xff747474,0xff2b2b2b,0xffffffff,0xffffffff,0xffa3a3a3,0xff424242,0xff3c3c3c,0xff343434,0xff2a2a2a,0xff222222,0xff000000,
4689 0xff000000,0xff757575,0xff737373,0xff525252,0xff181818,0xffffffff,0xffffffff,0xffffffff,0xff8f8f8f,0xff252525,0xff202020,0xff191919,0xff131313,0xff000000, 4749 0xff000000,0xff868686,0xff848484,0xff646464,0xff242424,0xffffffff,0xffffffff,0xffffffff,0xff9e9e9e,0xff343434,0xff2e2e2e,0xff252525,0xff1e1e1e,0xff000000,
4690 0xff000000,0xff757575,0xff737373,0xff525252,0xff181818,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff939393,0xff202020,0xff191919,0xff131313,0xff000000, 4750 0xff000000,0xff868686,0xff848484,0xff646464,0xff242424,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffa2a2a2,0xff2e2e2e,0xff252525,0xff1e1e1e,0xff000000,
4691 0xff000000,0xff686868,0xff606060,0xff404040,0xff121212,0xffffffff,0xffffffff,0xffffffff,0xff949494,0xff232323,0xff1c1c1c,0xff161616,0xff111111,0xff000000, 4751 0xff000000,0xff7a7a7a,0xff727272,0xff515151,0xff1d1d1d,0xffffffff,0xffffffff,0xffffffff,0xffa3a3a3,0xff313131,0xff292929,0xff222222,0xff1b1b1b,0xff000000,
4692 0xff000000,0xff494949,0xff363636,0xff252525,0xff121212,0xffffffff,0xffffffff,0xff8f8f8f,0xff1e1e1e,0xff181818,0xff141414,0xff101010,0xff0d0d0d,0xff000000, 4752 0xff000000,0xff5b5b5b,0xff474747,0xff343434,0xff1d1d1d,0xffffffff,0xffffffff,0xff9e9e9e,0xff2b2b2b,0xff242424,0xff1f1f1f,0xff1a1a1a,0xff161616,0xff000000,
4693 0xff000000,0xff313131,0xff2b2b2b,0xff1f1f1f,0xff161616,0xffffffff,0xff898989,0xff151515,0xff131313,0xff0f0f0f,0xff0d0d0d,0xff0d0d0d,0xff0d0d0d,0xff000000, 4753 0xff000000,0xff414141,0xff3b3b3b,0xff2d2d2d,0xff222222,0xffffffff,0xff999999,0xff202020,0xff1e1e1e,0xff191919,0xff161616,0xff161616,0xff161616,0xff000000,
4694 0xff000000,0xff292929,0xff212121,0xff191919,0xff121212,0xff868686,0xff0d0d0d,0xff0d0d0d,0xff0d0d0d,0xff0d0d0d,0xff0d0d0d,0xff0d0d0d,0xff0d0d0d,0xff000000, 4754 0xff000000,0xff383838,0xff2f2f2f,0xff252525,0xff1d1d1d,0xff969696,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff000000,
4695 0xff000000,0xff212121,0xff171717,0xff0f0f0f,0xff0d0d0d,0xff0d0d0d,0xff0d0d0d,0xff0d0d0d,0xff0d0d0d,0xff0d0d0d,0xff0d0d0d,0xff0d0d0d,0xff0d0d0d,0xff000000, 4755 0xff000000,0xff2f2f2f,0xff232323,0xff191919,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff000000,
4696 0xc6000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xc6000000 4756 0xc6000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xc6000000
4697}; 4757};
4698 4758
4699static const QRgb play2_data[] = { 4759static const QRgb play2_data[] = {
4700 0xffffff,0x3000000,0x8000000,0x11000000,0x1a000000,0x1b000000,0x16000000,0x12000000,0xd000000,0x8000000,0x2000000,0xffffff,0xffffff,0xffffff, 4760 0xffffff,0x3000000,0x8000000,0x11000000,0x1a000000,0x1b000000,0x16000000,0x12000000,0xd000000,0x8000000,0x2000000,0xffffff,0xffffff,0xffffff,
4701 0xffffff,0x6000000,0xf000000,0x33000000,0x86787878,0x57000000,0x38000000,0x2a000000,0x1f000000,0x14000000,0x8000000,0x2000000,0xffffff,0xffffff, 4761 0xffffff,0x6000000,0xf000000,0x33000000,0x86898989,0x57000000,0x38000000,0x2a000000,0x1f000000,0x14000000,0x8000000,0x2000000,0xffffff,0xffffff,
4702 0xffffff,0x9000000,0x19000000,0x5f000000,0xffffffff,0xdc939393,0x7f000000,0x56000000,0x3e000000,0x2a000000,0x14000000,0x8000000,0x2000000,0xffffff, 4762 0xffffff,0x9000000,0x19000000,0x5f000000,0xffffffff,0xdca2a2a2,0x7f000000,0x56000000,0x3e000000,0x2a000000,0x14000000,0x8000000,0x2000000,0xffffff,
4703 0xffffff,0xd000000,0x24000000,0x7a000000,0xffffffff,0xffffffff,0xe98b8b8b,0xa0000000,0x72000000,0x4d000000,0x2b000000,0x14000000,0x8000000,0x2000000, 4763 0xffffff,0xd000000,0x24000000,0x7a000000,0xffffffff,0xffffffff,0xe99a9a9a,0xa0000000,0x72000000,0x4d000000,0x2b000000,0x14000000,0x8000000,0x2000000,
4704 0xffffff,0x10000000,0x2e000000,0x88000000,0xffffffff,0xffffffff,0xffffffff,0xf2868686,0xb8000000,0x7d000000,0x47000000,0x24000000,0xf000000,0x5000000, 4764 0xffffff,0x10000000,0x2e000000,0x88000000,0xffffffff,0xffffffff,0xffffffff,0xf2969696,0xb8000000,0x7d000000,0x47000000,0x24000000,0xf000000,0x5000000,
4705 0xffffff,0x12000000,0x35000000,0x94000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xf7838383,0xb7000000,0x69000000,0x35000000,0x17000000,0x7000000, 4765 0xffffff,0x12000000,0x35000000,0x94000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xf7939393,0xb7000000,0x69000000,0x35000000,0x17000000,0x7000000,
4706 0xffffff,0x14000000,0x3a000000,0x9b000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xec898989,0x84000000,0x43000000,0x1e000000,0xa000000, 4766 0xffffff,0x14000000,0x3a000000,0x9b000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xec999999,0x84000000,0x43000000,0x1e000000,0xa000000,
4707 0xffffff,0x14000000,0x3c000000,0x9e000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff7f7f7f,0xdb000000,0x88000000,0x49000000,0x22000000,0xb000000, 4767 0xffffff,0x14000000,0x3c000000,0x9e000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff8f8f8f,0xdb000000,0x88000000,0x49000000,0x22000000,0xb000000,
4708 0xffffff,0x14000000,0x3a000000,0x9b000000,0xffffffff,0xffffffff,0xffffffff,0xff7f7f7f,0xfd000000,0xc4000000,0x7a000000,0x43000000,0x1e000000,0xa000000, 4768 0xffffff,0x14000000,0x3a000000,0x9b000000,0xffffffff,0xffffffff,0xffffffff,0xff8f8f8f,0xfd000000,0xc4000000,0x7a000000,0x43000000,0x1e000000,0xa000000,
4709 0xffffff,0x12000000,0x35000000,0x94000000,0xffffffff,0xffffffff,0xfe808080,0xf9000000,0xd7000000,0xa2000000,0x63000000,0x35000000,0x17000000,0x7000000, 4769 0xffffff,0x12000000,0x35000000,0x94000000,0xffffffff,0xffffffff,0xfe909090,0xf9000000,0xd7000000,0xa2000000,0x63000000,0x35000000,0x17000000,0x7000000,
4710 0xffffff,0x10000000,0x2e000000,0x7f000000,0xffffffff,0xf0878787,0xd5000000,0xc2000000,0xa3000000,0x78000000,0x47000000,0x24000000,0xf000000,0x5000000, 4770 0xffffff,0x10000000,0x2e000000,0x7f000000,0xffffffff,0xf0979797,0xd5000000,0xc2000000,0xa3000000,0x78000000,0x47000000,0x24000000,0xf000000,0x5000000,
4711 0xffffff,0xd000000,0x24000000,0x57000000,0xa8606060,0x9c000000,0x94000000,0x85000000,0x6d000000,0x4d000000,0x2b000000,0x14000000,0x8000000,0x2000000, 4771 0xffffff,0xd000000,0x24000000,0x57000000,0xa8727272,0x9c000000,0x94000000,0x85000000,0x6d000000,0x4d000000,0x2b000000,0x14000000,0x8000000,0x2000000,
4712 0xffffff,0x9000000,0x19000000,0x2f000000,0x48000000,0x5a000000,0x5a000000,0x50000000,0x3e000000,0x2a000000,0x14000000,0x8000000,0x2000000,0xffffff, 4772 0xffffff,0x9000000,0x19000000,0x2f000000,0x48000000,0x5a000000,0x5a000000,0x50000000,0x3e000000,0x2a000000,0x14000000,0x8000000,0x2000000,0xffffff,
4713 0xffffff,0x6000000,0xf000000,0x1a000000,0x25000000,0x31000000,0x31000000,0x2a000000,0x1f000000,0x14000000,0x8000000,0x2000000,0xffffff,0xffffff 4773 0xffffff,0x6000000,0xf000000,0x1a000000,0x25000000,0x31000000,0x31000000,0x2a000000,0x1f000000,0x14000000,0x8000000,0x2000000,0xffffff,0xffffff
4714}; 4774};
4715 4775
4716static const QRgb programs_data[] = { 4776static const QRgb programs_data[] = {
4717 0x0,0x0,0x1000000,0x1000000,0x1000000,0x1000000,0x1000000,0x1000000,0x0,0x6000000,0x0,0xb2b2b2,0x0,0xf9e07c, 4777 0x0,0x0,0x1000000,0x1000000,0x1000000,0x1000000,0x1000000,0x1000000,0x0,0x6000000,0x0,0xb2b2b2,0x0,0xf9e07c,
4718 0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0xf9e07c, 4778 0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0xf9e07c,
4719 0x0,0xff000000,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff000000,0x0,0xf9e07c, 4779 0x0,0xff000000,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff000000,0x0,0xf9e07c,
@@ -4726,29 +4786,29 @@ static const QRgb programs_data[] = {
4726 0x1b000000,0xff000000,0xffffffff,0xffadcc47,0xffffffff,0xff49cccc,0xff9740d6,0xffffffff,0xffcc4b85,0xffd1aa10,0xffffffff,0xff000000,0xffffff,0x0, 4786 0x1b000000,0xff000000,0xffffffff,0xffadcc47,0xffffffff,0xff49cccc,0xff9740d6,0xffffffff,0xffcc4b85,0xffd1aa10,0xffffffff,0xff000000,0xffffff,0x0,
4727 0x0,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xffffff,0x0, 4787 0x0,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xffffff,0x0,
4728 0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffffff,0x0, 4788 0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffffff,0x0,
4729 0x0,0x7000000,0x2000000,0xd000000,0x15000000,0x15000000,0x15000000,0x13000000,0x17000000,0x17000000,0x17000000,0x17000000,0xffffff,0x0, 4789 0x0,0x7000000,0x2000000,0xd000000,0x15000000,0x15000000,0x15000000,0x13000000,0x17000000,0x17000000,0x17000000,0x17000000,0xffffff,0x0,
4730 0x0,0xa8a8a8,0xb2b2b2,0xb2b2b2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 4790 0x0,0xa8a8a8,0xb2b2b2,0xb2b2b2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0
4731}; 4791};
4732 4792
4733static const QRgb quit_icon_data[] = { 4793static const QRgb quit_icon_data[] = {
4734 0xffffff,0xffffff,0xffffff,0x55e39797,0xa2e28f8f,0xdbe17f7f,0xfbe16c6c,0xded54d4d,0xabc42f2f,0x65aa1313,0xf000000,0x4000000,0xffffff,0xffffff, 4794 0xffffff,0xffffff,0xffffff,0x55e8a5a5,0xa2e79e9e,0xdbe68f8f,0xfbe67d7d,0xdedc5f5f,0xabcd3f3f,0x65b61e1e,0xf000000,0x4000000,0xffffff,0xffffff,
4735 0xffffff,0x18e39e9e,0x8fe7a3a3,0xfceea7a7,0xffeb9c9c,0xffe68282,0xffe16767,0xffda4848,0xffd63232,0xfdce1010,0xac960000,0x36490000,0x9000000,0x1000000, 4795 0xffffff,0x18e8acac,0x8febb0b0,0xfcf1b4b4,0xffeeaaaa,0xffea9292,0xffe67979,0xffe05a5a,0xffdd4242,0xfdd61a1a,0xaca40000,0x365b0000,0x9000000,0x1000000,
4736 0xffffff,0x8fe7a3a3,0xffeea8a8,0xfff8dcdc,0xfffae6e6,0xffe57f7f,0xffdf5d5d,0xffda4747,0xfff5cbcb,0xffe89f9f,0xffa70000,0xb8700000,0x2a000000,0x9000000, 4796 0xffffff,0x8febb0b0,0xfff1b5b5,0xfff9e2e2,0xfffbeaea,0xffe98f8f,0xffe46f6f,0xffe05959,0xfff7d3d3,0xffecadad,0xffb40000,0xb8810000,0x2a000000,0x9000000,
4737 0x55e39797,0xfceea7a7,0xfff8dcdc,0xffffffff,0xffffffff,0xfff8dcdc,0xffde5a5a,0xfff5cfcf,0xffffffff,0xffffffff,0xffd79e9e,0xfe830b0b,0x943e0000,0x22000000, 4797 0x55e8a5a5,0xfcf1b4b4,0xfff9e2e2,0xffffffff,0xffffffff,0xfff9e2e2,0xffe36c6c,0xfff7d7d7,0xffffffff,0xffffffff,0xffddacac,0xfe931313,0x944f0000,0x22000000,
4738 0xa2e28f8f,0xffeb9c9c,0xfffae6e6,0xffffffff,0xffffffff,0xffffffff,0xfffdf4f4,0xffffffff,0xffffffff,0xffffffff,0xffe3c5c5,0xff6f0d0d,0xd5410000,0x48000000, 4798 0xa2e79e9e,0xffeeaaaa,0xfffbeaea,0xffffffff,0xffffffff,0xffffffff,0xfffdf6f6,0xffffffff,0xffffffff,0xffffffff,0xffe8cece,0xff801616,0xd5520000,0x48000000,
4739 0xdbe17f7f,0xffe68282,0xffe57f7f,0xfff8dcdc,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe6c5c5,0xff750d0d,0xff510000,0xf2390000,0x69000000, 4799 0xdbe68f8f,0xffea9292,0xffe98f8f,0xfff9e2e2,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffeacece,0xff861616,0xff630000,0xf24a0000,0x69000000,
4740 0xfbe16c6c,0xffe16767,0xffdf5d5d,0xffde5a5a,0xfffdf4f4,0xffffffff,0xffffffff,0xffffffff,0xfffbf2f2,0xff8a1919,0xff580000,0xff3a0000,0xfe320000,0x7e000000, 4800 0xfbe67d7d,0xffe67979,0xffe46f6f,0xffe36c6c,0xfffdf6f6,0xffffffff,0xffffffff,0xffffffff,0xfffcf4f4,0xff9a2525,0xff6a0000,0xff4b0000,0xfe420000,0x7e000000,
4741 0xded54d4d,0xffda4848,0xffda4747,0xfff5cfcf,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffdcc5c5,0xff480d0d,0xff330000,0xf42d0000,0x87000000, 4801 0xdedc5f5f,0xffe05a5a,0xffe05959,0xfff7d7d7,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe2cece,0xff5a1616,0xff430000,0xf43d0000,0x87000000,
4742 0xabc42f2f,0xffd42727,0xfff3c2c2,0xffffffff,0xffffffff,0xffffffff,0xfffbf2f2,0xffffffff,0xffffffff,0xffffffff,0xffc9bbbb,0xff330000,0xe3230000,0x7e000000, 4802 0xabcd3f3f,0xffdb3636,0xfff5cbcb,0xffffffff,0xffffffff,0xffffffff,0xfffcf4f4,0xffffffff,0xffffffff,0xffffffff,0xffd1c5c5,0xff430000,0xe3310000,0x7e000000,
4743 0x65aa1313,0xfdcc0606,0xffd95f5f,0xffffffff,0xffffffff,0xffe6c6c6,0xff8b1b1b,0xffddc6c6,0xffffffff,0xffffffff,0xff7f5f5f,0xfe330000,0xc7150000,0x69000000, 4803 0x65b61e1e,0xfdd40c0c,0xffdf7171,0xffffffff,0xffffffff,0xffeacfcf,0xff9a2828,0xffe3cfcf,0xffffffff,0xffffffff,0xff8f7171,0xfe430000,0xc7200000,0x69000000,
4744 0xf000000,0xac960000,0xffa70000,0xffbd6060,0xffdebbbb,0xff760e0e,0xff580000,0xff490e0e,0xffc9bbbb,0xff806060,0xff330000,0xdf200000,0x93000000,0x48000000, 4804 0xf000000,0xaca40000,0xffb40000,0xffc77272,0xffe3c5c5,0xff871717,0xff6a0000,0xff5b1717,0xffd1c5c5,0xff907272,0xff430000,0xdf2e0000,0x93000000,0x48000000,
4745 0x4000000,0x36490000,0xb8700000,0xfe7d0000,0xff670000,0xff510000,0xff3a0000,0xff330000,0xff330000,0xfe330000,0xdf200000,0xa7070000,0x62000000,0x22000000, 4805 0x4000000,0x365b0000,0xb8810000,0xfe8d0000,0xff790000,0xff630000,0xff4b0000,0xff430000,0xff430000,0xfe430000,0xdf2e0000,0xa70d0000,0x62000000,0x22000000,
4746 0xffffff,0x9000000,0x2a000000,0x943e0000,0xd5410000,0xf2390000,0xfe320000,0xf42d0000,0xe3230000,0xc7150000,0x93000000,0x62000000,0x2a000000,0x9000000, 4806 0xffffff,0x9000000,0x2a000000,0x944f0000,0xd5520000,0xf24a0000,0xfe420000,0xf43d0000,0xe3310000,0xc7200000,0x93000000,0x62000000,0x2a000000,0x9000000,
4747 0xffffff,0x1000000,0x9000000,0x22000000,0x48000000,0x69000000,0x7e000000,0x87000000,0x7e000000,0x69000000,0x48000000,0x22000000,0x9000000,0x1000000 4807 0xffffff,0x1000000,0x9000000,0x22000000,0x48000000,0x69000000,0x7e000000,0x87000000,0x7e000000,0x69000000,0x48000000,0x22000000,0x9000000,0x1000000
4748}; 4808};
4749 4809
4750static const QRgb repeat_data[] = { 4810static const QRgb repeat_data[] = {
4751 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 4811 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4752 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,0x0, 4812 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,0x0,
4753 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0, 4813 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,
4754 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0, 4814 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,
@@ -4809,44 +4869,44 @@ static const QRgb right_data[] = {
4809 0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0, 4869 0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,
4810 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 4870 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4811 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 4871 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4812 0x0,0x0,0x0,0x0 4872 0x0,0x0,0x0,0x0
4813}; 4873};
4814 4874
4815static const QRgb rotate_data[] = { 4875static const QRgb rotate_data[] = {
4816 0xb000000,0x16000000,0x26000000,0x3f000000,0x5d000000,0x75000000,0x84000000,0x84000000,0x75000000,0x5d000000,0x3f000000,0x26000000,0x16000000,0xb000000, 4876 0xb000000,0x16000000,0x26000000,0x3f000000,0x5d000000,0x75000000,0x84000000,0x84000000,0x75000000,0x5d000000,0x3f000000,0x26000000,0x16000000,0xb000000,
4817 0x18000000,0x2e000000,0x55000000,0x98313131,0xd9848484,0xf5bebebe,0xfdececec,0xfdececec,0xf5bebebe,0xda838383,0x99303030,0x56000000,0x2e000000,0x18000000, 4877 0x18000000,0x2e000000,0x55000000,0x98414141,0xd9949494,0xf5c8c8c8,0xfdefefef,0xfdefefef,0xf5c8c8c8,0xda939393,0x99404040,0x56000000,0x2e000000,0x18000000,
4818 0x2d000000,0x5b000000,0xb5505050,0xf4b8b8b8,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xf4b8b8b8,0xb6505050,0x5c000000,0x2e000000, 4878 0x2d000000,0x5b000000,0xb5626262,0xf4c3c3c3,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xf4c3c3c3,0xb6626262,0x5c000000,0x2e000000,
4819 0x4c000000,0xa12e2e2e,0xf5b7b7b7,0xffffffff,0xfee3e3e3,0xf8939393,0xf24c4c4c,0xf34c4c4c,0xfa929292,0xffe2e2e2,0xffffffff,0xf6b6b6b6,0xa52d2d2d,0x50000000, 4879 0x4c000000,0xa13e3e3e,0xf5c2c2c2,0xffffffff,0xfee8e8e8,0xf8a2a2a2,0xf25e5e5e,0xf35e5e5e,0xfaa1a1a1,0xffe7e7e7,0xffffffff,0xf6c1c1c1,0xa53d3d3d,0x50000000,
4820 0x70000000,0xe0808080,0xffffffff,0xfee3e3e3,0xf0545454,0xdc000000,0xd9000000,0xde000000,0xeb000000,0xfca9a9a9,0xffe2e2e2,0xffffffff,0xe37e7e7e,0x77000000, 4880 0x70000000,0xe0909090,0xffffffff,0xfee8e8e8,0xf0666666,0xdc000000,0xd9000000,0xde000000,0xeb000000,0xfcb6b6b6,0xffe7e7e7,0xffffffff,0xe38e8e8e,0x77000000,
4821 0x8e000000,0xf7bdbdbd,0xffffffff,0xf8939393,0xd5000000,0xc1000000,0xb9000000,0xc2000000,0xdc000000,0xf4000000,0xffc7c7c7,0xffffffff,0xf9bbbbbb,0x9e000000, 4881 0x8e000000,0xf7c7c7c7,0xffffffff,0xf8a2a2a2,0xd5000000,0xc1000000,0xb9000000,0xc2000000,0xdc000000,0xf4000000,0xffd0d0d0,0xffffffff,0xf9c5c5c5,0x9e000000,
4822 0xa1000000,0xfeebebeb,0xffffffff,0xee4d4d4d,0xc1000000,0xa4000000,0x97000000,0xa5000000,0xe68d8d8d,0xfbc2c2c2,0xffefefef,0xffdfdfdf,0xfde1e1e1,0xd7979797, 4882 0xa1000000,0xfeeeeeee,0xffffffff,0xee5f5f5f,0xc1000000,0xa4000000,0x97000000,0xa5000000,0xe69c9c9c,0xfbcbcbcb,0xfff2f2f2,0xffe4e4e4,0xfde6e6e6,0xd7a5a5a5,
4823 0xa8000000,0xfeebebeb,0xffffffff,0xec4e4e4e,0xb5000000,0x8e000000,0x7a000000,0x84000000,0xb1000000,0xf0878787,0xfdc1c1c1,0xfee0e0e0,0xee888888,0x9c000000, 4883 0xa8000000,0xfeeeeeee,0xffffffff,0xec606060,0xb5000000,0x8e000000,0x7a000000,0x84000000,0xb1000000,0xf0979797,0xfdcbcbcb,0xfee5e5e5,0xee989898,0x9c000000,
4824 0xa2000000,0xfabbbbbb,0xffffffff,0xf7949494,0xbd000000,0x8e000000,0x74000000,0x74000000,0x90000000,0xbd000000,0xed898989,0xec898989,0xb2000000,0x76000000, 4884 0xa2000000,0xfac5c5c5,0xffffffff,0xf7a3a3a3,0xbd000000,0x8e000000,0x74000000,0x74000000,0x90000000,0xbd000000,0xed999999,0xec999999,0xb2000000,0x76000000,
4825 0x90000000,0xeb7a7a7a,0xffffffff,0xfee3e3e3,0xe8575757,0xb3000000,0x95000000,0x8a000000,0x94000000,0xac000000,0xbe000000,0xb2000000,0x89000000,0x5a000000, 4885 0x90000000,0xeb8b8b8b,0xffffffff,0xfee8e8e8,0xe8696969,0xb3000000,0x95000000,0x8a000000,0x94000000,0xac000000,0xbe000000,0xb2000000,0x89000000,0x5a000000,
4826 0x77000000,0xc5262626,0xfab4b4b4,0xffffffff,0xfee3e3e3,0xf4959595,0xdf525252,0xd5565656,0xc2000000,0xe58d8d8d,0xe38f8f8f,0xd3999999,0x70000000,0x43000000, 4886 0x77000000,0xc5353535,0xfabfbfbf,0xffffffff,0xfee8e8e8,0xf4a4a4a4,0xdf646464,0xd5686868,0xc2000000,0xe59c9c9c,0xe39e9e9e,0xd3a7a7a7,0x70000000,0x43000000,
4827 0x5c000000,0x94000000,0xd8434343,0xfab4b4b4,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xf0bbbbbb,0xaf535353,0x5a000000,0x32000000, 4887 0x5c000000,0x94000000,0xd8545454,0xfabfbfbf,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xf0c5c5c5,0xaf656565,0x5a000000,0x32000000,
4828 0x42000000,0x6b000000,0x9c000000,0xce242424,0xef777777,0xfbbababa,0xfeebebeb,0xfeebebeb,0xf8bcbcbc,0xe47d7d7d,0xac2b2b2b,0x6b000000,0x3d000000,0x22000000, 4888 0x42000000,0x6b000000,0x9c000000,0xce333333,0xef888888,0xfbc4c4c4,0xfeeeeeee,0xfeeeeeee,0xf8c6c6c6,0xe48d8d8d,0xac3b3b3b,0x6b000000,0x3d000000,0x22000000,
4829 0x2b000000,0x48000000,0x6a000000,0x8e000000,0xac000000,0xbf000000,0xc5000000,0xbf000000,0xac000000,0x90000000,0x6a000000,0x45000000,0x29000000,0x16000000 4889 0x2b000000,0x48000000,0x6a000000,0x8e000000,0xac000000,0xbf000000,0xc5000000,0xbf000000,0xac000000,0x90000000,0x6a000000,0x45000000,0x29000000,0x16000000
4830}; 4890};
4831 4891
4832static const QRgb start_data[] = { 4892static const QRgb start_data[] = {
4833 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 4893 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
4834 0xffffff,0xff000000,0xffffff,0xffffff,0xffffff,0xffffff,0x7a5a6163,0xff000000,0xff000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff, 4894 0xffffff,0xff000000,0xffffff,0xffffff,0xffffff,0xffffff,0x7a6c7375,0xff000000,0xff000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,
4835 0xffffff,0xff000000,0xffffff,0xffffff,0xffffff,0x7a5a6163,0xfc151717,0xffffffff,0xff000000,0x6b000000,0x24000000,0xffffff,0xffffff,0xffffff, 4895 0xffffff,0xff000000,0xffffff,0xffffff,0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xff000000,0x6b000000,0x24000000,0xffffff,0xffffff,0xffffff,
4836 0xffffff,0xff000000,0xffffff,0xffffff,0x7a5a6163,0xfc151717,0xffffffff,0xfffbfbfb,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff, 4896 0xffffff,0xff000000,0xffffff,0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xfffcfcfc,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,
4837 0xffffff,0xff000000,0xffffff,0x7a5a6163,0xfc151717,0xffffffff,0xffffffff,0xfff7f7f7,0xff000000,0xff000000,0xff000000,0xff000000,0x24000000,0xc000000, 4897 0xffffff,0xff000000,0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xffffffff,0xfff8f8f8,0xff000000,0xff000000,0xff000000,0xff000000,0x24000000,0xc000000,
4838 0xffffff,0xff000000,0x7a5a6163,0xfc151717,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xffffffff,0xffffffff,0xfff3f3f3,0xff000000,0x6b000000,0x24000000, 4898 0xffffff,0xff000000,0x7a6c7375,0xfc202323,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xffffffff,0xffffffff,0xfff5f5f5,0xff000000,0x6b000000,0x24000000,
4839 0xffffff,0xff000000,0xe0383d3e,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff4f4f4,0xfff4f4f4,0xffeaeaea,0xffcbcbcb,0xff000000,0x8f000000,0x30000000, 4899 0xffffff,0xff000000,0xe0494e4f,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff6f6f6,0xfff6f6f6,0xffeeeeee,0xffd3d3d3,0xff000000,0x8f000000,0x30000000,
4840 0xffffff,0xff000000,0x69545a5b,0xfd151717,0xfffbfbfb,0xfffbfbfb,0xfff2f2f2,0xffd6d6d6,0xffc3c3c3,0xffbfbfbf,0xffbfbfbf,0xff000000,0x8f000000,0x30000000, 4900 0xffffff,0xff000000,0x69666c6d,0xfd202323,0xfffcfcfc,0xfffcfcfc,0xfff4f4f4,0xffdddddd,0xffcccccc,0xffc9c9c9,0xffc9c9c9,0xff000000,0x8f000000,0x30000000,
4841 0xffffff,0xff000000,0xd000000,0x8344494a,0xfd151617,0xfff2f2f2,0xffe9e9e9,0xffc3c3c3,0xff000000,0xff000000,0xff000000,0xff000000,0x8f000000,0x30000000, 4901 0xffffff,0xff000000,0xd000000,0x83565b5c,0xfd202223,0xfff4f4f4,0xffededed,0xffcccccc,0xff000000,0xff000000,0xff000000,0xff000000,0x8f000000,0x30000000,
4842 0xffffff,0xff000000,0x2000000,0x14000000,0x88414648,0xfe151718,0xffe4e4e4,0xffc2c2c2,0xff000000,0xb3000000,0x9b000000,0x8f000000,0x6b000000,0x24000000, 4902 0xffffff,0xff000000,0x2000000,0x14000000,0x8852585a,0xfe202324,0xffe8e8e8,0xffcbcbcb,0xff000000,0xb3000000,0x9b000000,0x8f000000,0x6b000000,0x24000000,
4843 0xffffff,0xff000000,0xffffff,0x2000000,0x14000000,0x88414648,0xfe151718,0xffcbcbcb,0xff000000,0x9b000000,0x54000000,0x30000000,0x24000000,0xc000000, 4903 0xffffff,0xff000000,0xffffff,0x2000000,0x14000000,0x8852585a,0xfe202324,0xffd3d3d3,0xff000000,0x9b000000,0x54000000,0x30000000,0x24000000,0xc000000,
4844 0xffffff,0xff000000,0xffffff,0xffffff,0x2000000,0x14000000,0x88414648,0xff000000,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff, 4904 0xffffff,0xff000000,0xffffff,0xffffff,0x2000000,0x14000000,0x8852585a,0xff000000,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,
4845 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x2000000,0x14000000,0x45000000,0x7b000000,0x6b000000,0x24000000,0xffffff,0xffffff,0xffffff, 4905 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x2000000,0x14000000,0x45000000,0x7b000000,0x6b000000,0x24000000,0xffffff,0xffffff,0xffffff,
4846 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x2000000,0x10000000,0x26000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff 4906 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x2000000,0x10000000,0x26000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff
4847}; 4907};
4848 4908
4849static const QRgb stop_data[] = { 4909static const QRgb stop_data[] = {
4850 0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000, 4910 0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,
4851 0xf000000,0x2e000000,0x5f000000,0x7f000000,0x8d000000,0x98000000,0x9e000000,0xa2000000,0x9e000000,0x98000000,0x81000000,0x57000000,0x31000000,0x1d000000, 4911 0xf000000,0x2e000000,0x5f000000,0x7f000000,0x8d000000,0x98000000,0x9e000000,0xa2000000,0x9e000000,0x98000000,0x81000000,0x57000000,0x31000000,0x1d000000,
4852 0x18000000,0x5f000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x98000000,0x52000000,0x31000000, 4912 0x18000000,0x5f000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x98000000,0x52000000,0x31000000,
@@ -4928,29 +4988,29 @@ static const unsigned char tgz_data[] = {
4928 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x01,0x01, 4988 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x01,0x01,
4929 0x06,0x02,0x02,0x02 4989 0x06,0x02,0x02,0x02
4930}; 4990};
4931 4991
4932static const QRgb tgz_ctable[] = { 4992static const QRgb tgz_ctable[] = {
4933 0xffc0c000,0xff000000,0xc6c6c6,0xff800000,0xffffffc0,0xffffffff,0xffff0000 4993 0xffc0c000,0xff000000,0xc6c6c6,0xff800000,0xffffffc0,0xffffffff,0xffff0000
4934}; 4994};
4935 4995
4936static const QRgb to_day_data[] = { 4996static const QRgb today_data[] = {
4937 0xe000000,0x18000000,0x23000000,0x2e000000,0x35000000,0x39000000,0x3b000000,0x3b000000,0x3b000000,0x39000000,0x35000000,0x2e000000,0x23000000,0x18000000, 4997 0xe000000,0x18000000,0x23000000,0x2e000000,0x35000000,0x39000000,0x3b000000,0x3b000000,0x3b000000,0x39000000,0x35000000,0x2e000000,0x23000000,0x18000000,
4938 0x18000000,0xff686eaf,0xff595fa6,0xff4b529f,0xff4b529f,0xff4b529f,0xff4b529f,0xff4b529f,0xff4b529f,0xff4b529f,0xff343b93,0xff070f75,0x3d000000,0x2a000000, 4998 0x18000000,0xff686eaf,0xff595fa6,0xff4b529f,0xff4b529f,0xff4b529f,0xffea0404,0xffea0404,0xff4b529f,0xff4b529f,0xff343b93,0xff070f75,0x3d000000,0x2a000000,
4939 0x24000000,0xff595fa6,0xff394095,0xff222a89,0xff222a89,0xff222a89,0xff222a89,0xff222a89,0xff222a89,0xff222a89,0xff07107a,0xff050c5a,0x5a000000,0x3e000000, 4999 0x24000000,0xff595fa6,0xffdd6c6c,0xffea0404,0xffea0404,0xff222a89,0xff222a89,0xffdd6c6c,0xffea0404,0xffdd6c6c,0xff07107a,0xff050c5a,0x5a000000,0x3e000000,
4940 0x2e000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe0e0e0,0xffa1a1a1,0x74000000,0x50000000, 5000 0x2e000000,0xffffffff,0xffea0404,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffea0404,0xffdd6c6c,0xffa1a1a1,0x74000000,0x50000000,
4941 0x35000000,0xffffffff,0xffff5555,0xffff0000,0xffff0000,0xffff0000,0xffff0000,0xffff0000,0xffff0000,0xffffaaaa,0xffe0e0e0,0xffa1a1a1,0x86000000,0x5c000000, 5001 0x35000000,0xffea0404,0xffdd6c6c,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffffffff,0xffea0404,0xffa1a1a1,0x86000000,0x5c000000,
4942 0x39000000,0xffffffff,0xffff8e8e,0xffff5555,0xffff3939,0xffff0000,0xffff0000,0xffff5555,0xffff5555,0xffffc7c7,0xffe0e0e0,0xffa1a1a1,0x90000000,0x63000000, 5002 0x39000000,0xffea0404,0xffffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffffffff,0xffea0404,0xffa1a1a1,0x90000000,0x63000000,
4943 0x3b000000,0xffffffff,0xffffffff,0xffffffff,0xffffaaaa,0xffff0000,0xffff0000,0xffffffff,0xffffffff,0xffffffff,0xffe0e0e0,0xffa1a1a1,0x95000000,0x66000000, 5003 0x3b000000,0xffea0404,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffea0404,0xffa1a1a1,0x95000000,0x66000000,
4944 0x3c000000,0xffffffff,0xffffffff,0xffffffff,0xffffaaaa,0xffff0000,0xffff0000,0xffffffff,0xffffffff,0xffffffff,0xffe0e0e0,0xffa1a1a1,0x96000000,0x67000000, 5004 0x3c000000,0xffea0404,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffea0404,0xffa1a1a1,0x96000000,0x67000000,
4945 0x3b000000,0xffffffff,0xffffffff,0xffffffff,0xffffaaaa,0xffff0000,0xffff0000,0xffffffff,0xffffffff,0xffffffff,0xffe0e0e0,0xffa1a1a1,0x95000000,0x66000000, 5005 0x3b000000,0xffdd6c6c,0xffea0404,0xffffffff,0xffffffff,0xff000000,0xff000000,0xffffffff,0xffffffff,0xffdd6c6c,0xffea0404,0xffa1a1a1,0x95000000,0x66000000,
4946 0x39000000,0xffffffff,0xffffffff,0xffffffff,0xffffaaaa,0xffff0000,0xffff0000,0xffffffff,0xffffffff,0xffffffff,0xffe0e0e0,0xffa1a1a1,0x90000000,0x63000000, 5006 0x39000000,0xffffffff,0xffea0404,0xffdd6c6c,0xffffffff,0xff000000,0xff000000,0xffffffff,0xffdd6c6c,0xffea0404,0xffe0e0e0,0xffa1a1a1,0x90000000,0x63000000,
4947 0x35000000,0xffffffff,0xfffcfcfc,0xffe0e0e0,0xffea9595,0xffff0000,0xffff0000,0xffe0e0e0,0xffe0e0e0,0xffe0e0e0,0xffc8c8c8,0xff959595,0x86000000,0x5c000000, 5007 0x35000000,0xffffffff,0xfffcfcfc,0xffea0404,0xffea0404,0xffea0404,0xffea0404,0xffea0404,0xffea0404,0xffe0e0e0,0xffc8c8c8,0xff959595,0x86000000,0x5c000000,
4948 0x2e000000,0xfff3f3f3,0xffbababa,0xffa1a1a1,0xffc06b6b,0xffff0000,0xffff0000,0xffa1a1a1,0xffa1a1a1,0xffa1a1a1,0xff959595,0xff868686,0x74000000,0x50000000, 5008 0x2e000000,0xfff3f3f3,0xffbababa,0xffa1a1a1,0xffa1a1a1,0xffa1a1a1,0xffa1a1a1,0xffa1a1a1,0xffa1a1a1,0xffa1a1a1,0xff959595,0xff868686,0x74000000,0x50000000,
4949 0x24000000,0x3e000000,0x5a000000,0x74000000,0x86000000,0x90000000,0x95000000,0x96000000,0x95000000,0x90000000,0x86000000,0x74000000,0x5a000000,0x3e000000, 5009 0x24000000,0x3e000000,0x5a000000,0x74000000,0x86000000,0x90000000,0x95000000,0x96000000,0x95000000,0x90000000,0x86000000,0x74000000,0x5a000000,0x3e000000,
4950 0x18000000,0x2a000000,0x3d000000,0x4f000000,0x5c000000,0x63000000,0x66000000,0x67000000,0x66000000,0x63000000,0x5c000000,0x4f000000,0x3d000000,0x2a000000 5010 0x18000000,0x2a000000,0x3d000000,0x4f000000,0x5c000000,0x63000000,0x66000000,0x67000000,0x66000000,0x63000000,0x5c000000,0x4f000000,0x3d000000,0x2a000000
4951}; 5011};
4952 5012
4953static const QRgb toys_data[] = { 5013static const QRgb toys_data[] = {
4954 0xffffff,0xffffff,0xcccc33,0x0,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x990099,0x663399,0x0,0x0, 5014 0xffffff,0xffffff,0xcccc33,0x0,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x990099,0x663399,0x0,0x0,
4955 0xffffff,0xccff33,0x996666,0x996666,0xff0000,0xffff0000,0xffcc9966,0xff66cccc,0xff6666cc,0xffffff,0xffffff,0xffffff,0x9966cc,0xffffff, 5015 0xffffff,0xccff33,0x996666,0x996666,0xff0000,0xffff0000,0xffcc9966,0xff66cccc,0xff6666cc,0xffffff,0xffffff,0xffffff,0x9966cc,0xffffff,
4956 0xcccc33,0x0,0x0,0xffff0000,0xfff4b0b0,0xffffffff,0xff00cc00,0xff00cc00,0xff6666cc,0xff6666cc,0xff6666cc,0xffffff,0xffffff,0x660099, 5016 0xcccc33,0x0,0x0,0xffff0000,0xfff4b0b0,0xffffffff,0xff00cc00,0xff00cc00,0xff6666cc,0xff6666cc,0xff6666cc,0xffffff,0xffffff,0x660099,
@@ -5080,95 +5140,78 @@ static const unsigned char uninstalled_data[] = {
5080}; 5140};
5081 5141
5082static const QRgb uninstalled_ctable[] = { 5142static const QRgb uninstalled_ctable[] = {
5083 0x40ffffff,0xfff8fcf8,0xfff8b490,0xffb04400,0xfff80000,0xfff86c00 5143 0x40ffffff,0xfff8fcf8,0xfff8b490,0xffb04400,0xfff80000,0xfff86c00
5084}; 5144};
5085 5145
5086static const QRgb up_data[] = { 5146static const QRgb up_data[] = {
5087 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 5147 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
5088 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x5d5e6567,0xe0383d3e,0x84545b5c,0xe000000,0x3000000,0xffffff,0xffffff,0xffffff,0xffffff, 5148 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x5d707779,0xe0494e4f,0x84666d6e,0xe000000,0x3000000,0xffffff,0xffffff,0xffffff,0xffffff,
5089 0xffffff,0xffffff,0xffffff,0xffffff,0x5d5e6567,0xfc151717,0xffffffff,0xfd151717,0x9b474d4f,0x18000000,0x3000000,0xffffff,0xffffff,0xffffff, 5149 0xffffff,0xffffff,0xffffff,0xffffff,0x5d707779,0xfc202323,0xffffffff,0xfd202323,0x9b595f61,0x18000000,0x3000000,0xffffff,0xffffff,0xffffff,
5090 0xffffff,0xffffff,0xffffff,0x5d5e6567,0xfc151717,0xffffffff,0xffffffff,0xfffbfbfb,0xfe151718,0xa0454a4b,0x18000000,0x3000000,0xffffff,0xffffff, 5150 0xffffff,0xffffff,0xffffff,0x5d707779,0xfc202323,0xffffffff,0xffffffff,0xfffcfcfc,0xfe202324,0xa0575c5d,0x18000000,0x3000000,0xffffff,0xffffff,
5091 0xffffff,0xffffff,0x5d5e6567,0xfc151717,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xfff2f2f2,0xfe151718,0xa0454a4b,0x18000000,0x3000000,0xffffff, 5151 0xffffff,0xffffff,0x5d707779,0xfc202323,0xffffffff,0xffffffff,0xffffffff,0xfffcfcfc,0xfff4f4f4,0xfe202324,0xa0575c5d,0x18000000,0x3000000,0xffffff,
5092 0xffffff,0x5d5e6567,0xfc151717,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff2f2f2,0xffe9e9e9,0xffe4e4e4,0xfe151718,0xa0454a4b,0x18000000,0x3000000, 5152 0xffffff,0x5d707779,0xfc202323,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff4f4f4,0xffededed,0xffe8e8e8,0xfe202324,0xa0575c5d,0x18000000,0x3000000,
5093 0xffffff,0xff000000,0xffffffff,0xfffbfbfb,0xfff7f7f7,0xfffefefe,0xfff4f4f4,0xffd6d6d6,0xffc3c3c3,0xffc2c2c2,0xffcbcbcb,0xff000000,0x49000000,0x13000000, 5153 0xffffff,0xff000000,0xffffffff,0xfffcfcfc,0xfff8f8f8,0xfffefefe,0xfff6f6f6,0xffdddddd,0xffcccccc,0xffcbcbcb,0xffd3d3d3,0xff000000,0x49000000,0x13000000,
5094 0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xffffffff,0xfff4f4f4,0xffc3c3c3,0xff000000,0xff000000,0xff000000,0xff000000,0x7c000000,0x27000000, 5154 0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xffffffff,0xfff6f6f6,0xffcccccc,0xff000000,0xff000000,0xff000000,0xff000000,0x7c000000,0x27000000,
5095 0xffffff,0x24000000,0x6b000000,0x8f000000,0xff000000,0xffffffff,0xffeaeaea,0xffbfbfbf,0xff000000,0xb3000000,0x9b000000,0x8f000000,0x6b000000,0x24000000, 5155 0xffffff,0x24000000,0x6b000000,0x8f000000,0xff000000,0xffffffff,0xffeeeeee,0xffc9c9c9,0xff000000,0xb3000000,0x9b000000,0x8f000000,0x6b000000,0x24000000,
5096 0xffffff,0xc000000,0x24000000,0x30000000,0xff000000,0xfff3f3f3,0xffcbcbcb,0xffbfbfbf,0xff000000,0x9b000000,0x54000000,0x30000000,0x24000000,0xc000000, 5156 0xffffff,0xc000000,0x24000000,0x30000000,0xff000000,0xfff5f5f5,0xffd3d3d3,0xffc9c9c9,0xff000000,0x9b000000,0x54000000,0x30000000,0x24000000,0xc000000,
5097 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff, 5157 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,
5098 0xffffff,0xffffff,0xffffff,0xffffff,0x24000000,0x6b000000,0x8f000000,0x8f000000,0x8f000000,0x6b000000,0x24000000,0xffffff,0xffffff,0xffffff, 5158 0xffffff,0xffffff,0xffffff,0xffffff,0x24000000,0x6b000000,0x8f000000,0x8f000000,0x8f000000,0x6b000000,0x24000000,0xffffff,0xffffff,0xffffff,
5099 0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x24000000,0x30000000,0x30000000,0x30000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff, 5159 0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x24000000,0x30000000,0x30000000,0x30000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,
5100 0xffffff,0xffffff,0x1000000,0x1000000,0x2000000,0x2000000,0x3000000,0x1000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff 5160 0xffffff,0xffffff,0x1000000,0x1000000,0x2000000,0x2000000,0x3000000,0x1000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff
5101}; 5161};
5102 5162
5103static const QRgb volume_data[] = { 5163static const QRgb volume_data[] = {
5104 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 5164 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
5105 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,0xffffff, 5165 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,0xffffff,
5106 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xff000000,0x6b000000,0x24000000,0xff000000,0x18000000,0xc000000,0xffffff, 5166 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xff000000,0x6b000000,0x24000000,0xff000000,0x18000000,0xc000000,0xffffff,
5107 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0x8f000000,0x30000000,0x18000000,0xff000000,0x30000000,0xc000000, 5167 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0x8f000000,0x30000000,0x18000000,0xff000000,0x30000000,0xc000000,
5108 0xff000000,0xff000000,0xff000000,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xff000000,0x8f000000,0xff000000,0x24000000,0x3c000000,0xff000000,0x30000000, 5168 0xff000000,0xff000000,0xff000000,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xff000000,0x8f000000,0xff000000,0x24000000,0x3c000000,0xff000000,0x30000000,
5109 0xff000000,0xffcde6ff,0xffcee6ff,0xffcee6ff,0xffcde5ff,0xffcee5ff,0xffcee5ff,0xff000000,0x8f000000,0x48000000,0xff000000,0x3c000000,0xff000000,0x54000000, 5169 0xff000000,0xffd5eaff,0xffd6eaff,0xffd6eaff,0xffd5e9ff,0xffd6e9ff,0xffd6e9ff,0xff000000,0x8f000000,0x48000000,0xff000000,0x3c000000,0xff000000,0x54000000,
5110 0xff000000,0xff8ec5ff,0xff8ec5ff,0xff8ec5ff,0xff8ec5ff,0xff8ec4ff,0xff8ec4ff,0xff000000,0x8f000000,0x3c000000,0xff000000,0x54000000,0xff000000,0x60000000, 5170 0xff000000,0xff9dceff,0xff9dceff,0xff9dceff,0xff9dceff,0xff9dcdff,0xff9dcdff,0xff000000,0x8f000000,0x3c000000,0xff000000,0x54000000,0xff000000,0x60000000,
5111 0xff000000,0xff4ea3ff,0xff4ea4ff,0xff4ea3ff,0xff4fa4ff,0xff4ea4ff,0xff4ea4ff,0xff000000,0x8f000000,0x30000000,0xff000000,0x60000000,0xff000000,0x60000000, 5171 0xff000000,0xff60b0ff,0xff60b1ff,0xff60b0ff,0xff61b1ff,0xff60b1ff,0xff60b1ff,0xff000000,0x8f000000,0x30000000,0xff000000,0x60000000,0xff000000,0x60000000,
5112 0xff000000,0xff000000,0xff000000,0xff000000,0xff1d8aff,0xff1d8aff,0xff1d8aff,0xff000000,0x8f000000,0xff000000,0x3c000000,0x54000000,0xff000000,0x60000000, 5172 0xff000000,0xff000000,0xff000000,0xff000000,0xff2a9aff,0xff2a9aff,0xff2a9aff,0xff000000,0x8f000000,0xff000000,0x3c000000,0x54000000,0xff000000,0x60000000,
5113 0x24000000,0x6b000000,0x8f000000,0x8f000000,0xff000000,0xff1d8aff,0xff1d8aff,0xff000000,0x8f000000,0x48000000,0x3c000000,0xff000000,0x48000000,0x54000000, 5173 0x24000000,0x6b000000,0x8f000000,0x8f000000,0xff000000,0xff2a9aff,0xff2a9aff,0xff000000,0x8f000000,0x48000000,0x3c000000,0xff000000,0x48000000,0x54000000,
5114 0xc000000,0x24000000,0x30000000,0x30000000,0x48000000,0xff000000,0xff1d8aff,0xff000000,0x8f000000,0x3c000000,0xff000000,0x3c000000,0x48000000,0x30000000, 5174 0xc000000,0x24000000,0x30000000,0x30000000,0x48000000,0xff000000,0xff2a9aff,0xff000000,0x8f000000,0x3c000000,0xff000000,0x3c000000,0x48000000,0x30000000,
5115 0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x3c000000,0xff000000,0xff000000,0x8f000000,0x30000000,0x18000000,0x3c000000,0x30000000,0xc000000, 5175 0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x3c000000,0xff000000,0xff000000,0x8f000000,0x30000000,0x18000000,0x3c000000,0x30000000,0xc000000,
5116 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x3c000000,0x77000000,0x6b000000,0x24000000,0xc000000,0x18000000,0xc000000,0xffffff, 5176 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x3c000000,0x77000000,0x6b000000,0x24000000,0xc000000,0x18000000,0xc000000,0xffffff,
5117 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x24000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,0xffffff 5177 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x24000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,0xffffff
5118}; 5178};
5119 5179
5120static const QRgb wait_data[] = { 5180static const QRgb wait_data[] = {
5121 0x1000000,0x1d000000,0xff996633,0xff996633,0xff996633,0xff996633,0xff996633,0xff996633,0xff996633,0xff996633,0xff996633,0x28000000,0xb000000,0x5000000, 5181 0x1000000,0x1d000000,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0x28000000,0xb000000,0x5000000,
5122 0x3000000,0x15000000,0x33000000,0xff777777,0xff7e7e7e,0xff848484,0xff8c8c8c,0xff929292,0xff989898,0xff9d9d9d,0x4b000000,0x29000000,0x12000000,0x9000000, 5182 0x3000000,0x15000000,0x33000000,0xff888888,0xff8e8e8e,0xff949494,0xff9b9b9b,0xffa1a1a1,0xffa6a6a6,0xffababab,0x4b000000,0x29000000,0x12000000,0x9000000,
5123 0x4000000,0xc000000,0x19000000,0xff8a8a8a,0xff929292,0xff989898,0xff9f9f9f,0xffa6a6a6,0xffababab,0xffafafaf,0x41000000,0x2b000000,0x19000000,0xc000000, 5183 0x4000000,0xc000000,0x19000000,0xff9a9a9a,0xffa1a1a1,0xffa6a6a6,0xffadadad,0xffb3b3b3,0xffb7b7b7,0xffbbbbbb,0x41000000,0x2b000000,0x19000000,0xc000000,
5124 0x4000000,0xe000000,0x1d000000,0xff777777,0xff7a7a7a,0xff7e7e7e,0xff818181,0xff828282,0xff848484,0xff828282,0x4d000000,0x32000000,0x1d000000,0xe000000, 5184 0x4000000,0xe000000,0x1d000000,0xff888888,0xff8b8b8b,0xff8e8e8e,0xff919191,0xff929292,0xff949494,0xff929292,0x4d000000,0x32000000,0x1d000000,0xe000000,
5125 0x4000000,0xe000000,0x1e000000,0xcc404040,0xff696969,0xff6a6a6a,0xff6b6b6b,0xff6b6b6b,0xff6a6a6a,0xda3c3c3c,0x51000000,0x34000000,0x1e000000,0xe000000, 5185 0x4000000,0xe000000,0x1e000000,0xcc515151,0xff7a7a7a,0xff7b7b7b,0xff7c7c7c,0xff7c7c7c,0xff7b7b7b,0xda4d4d4d,0x51000000,0x34000000,0x1e000000,0xe000000,
5126 0x4000000,0xc000000,0x1b000000,0x31000000,0xd23d3d3d,0xff686868,0xff686868,0xff686868,0xde3a3a3a,0x6a000000,0x4f000000,0x31000000,0x1b000000,0xc000000, 5186 0x4000000,0xc000000,0x1b000000,0x31000000,0xd24e4e4e,0xff7a7a7a,0xff7a7a7a,0xff7a7a7a,0xde4b4b4b,0x6a000000,0x4f000000,0x31000000,0x1b000000,0xc000000,
5127 0x2000000,0xa000000,0x17000000,0x2c000000,0x48000000,0xd73e3e3e,0xff727272,0xde3d3d3d,0x78000000,0x63000000,0x48000000,0x2c000000,0x17000000,0xa000000, 5187 0x2000000,0xa000000,0x17000000,0x2c000000,0x48000000,0xd74f4f4f,0xff838383,0xde4e4e4e,0x78000000,0x63000000,0x48000000,0x2c000000,0x17000000,0xa000000,
5128 0x2000000,0x7000000,0x13000000,0x28000000,0x41000000,0xd5474747,0xff929292,0xdc494949,0x70000000,0x5b000000,0x41000000,0x28000000,0x13000000,0x7000000, 5188 0x2000000,0x7000000,0x13000000,0x28000000,0x41000000,0xd5595959,0xffa1a1a1,0xdc5b5b5b,0x70000000,0x5b000000,0x41000000,0x28000000,0x13000000,0x7000000,
5129 0x2000000,0x7000000,0x13000000,0x28000000,0xce515151,0xffa0a0a0,0xffa9a9a9,0xffb1b1b1,0xdb5d5d5d,0x5b000000,0x41000000,0x28000000,0x13000000,0x7000000, 5189 0x2000000,0x7000000,0x13000000,0x28000000,0xce636363,0xffadadad,0xffb6b6b6,0xffbdbdbd,0xdb6f6f6f,0x5b000000,0x41000000,0x28000000,0x13000000,0x7000000,
5130 0x2000000,0xa000000,0x17000000,0xca525252,0xff9d9d9d,0xffa1a1a1,0xffa0a0a0,0xffb7b7b7,0xffbdbdbd,0xd86a6a6a,0x48000000,0x2c000000,0x17000000,0xa000000, 5190 0x2000000,0xa000000,0x17000000,0xca646464,0xffababab,0xffaeaeae,0xffadadad,0xffc2c2c2,0xffc7c7c7,0xd87b7b7b,0x48000000,0x2c000000,0x17000000,0xa000000,
5131 0x4000000,0xc000000,0x1b000000,0xff949494,0xff9d9d9d,0xff969696,0xff808080,0xffb7b7b7,0xffbebebe,0xffc5c5c5,0x4f000000,0x31000000,0x1b000000,0xc000000, 5191 0x4000000,0xc000000,0x1b000000,0xffa3a3a3,0xffababab,0xffa4a4a4,0xff909090,0xffc2c2c2,0xffc8c8c8,0xffcecece,0x4f000000,0x31000000,0x1b000000,0xc000000,
5132 0x4000000,0xe000000,0x1e000000,0xff919191,0xff898989,0xff737373,0xff6a6a6a,0xff777777,0xff7e7e7e,0xff7c7c7c,0x51000000,0x34000000,0x1e000000,0xe000000, 5192 0x4000000,0xe000000,0x1e000000,0xffa0a0a0,0xff999999,0xff848484,0xff7b7b7b,0xff888888,0xff8e8e8e,0xff8d8d8d,0x51000000,0x34000000,0x1e000000,0xe000000,
5133 0x4000000,0x19000000,0x3d000000,0xff5e5e5e,0xff575757,0xff535353,0xff535353,0xff535353,0xff535353,0xff535353,0x66000000,0x3c000000,0x1d000000,0xe000000, 5193 0x4000000,0x19000000,0x3d000000,0xff707070,0xff696969,0xff656565,0xff656565,0xff656565,0xff656565,0xff656565,0x66000000,0x3c000000,0x1d000000,0xe000000,
5134 0x4000000,0x23000000,0xff996633,0xff996633,0xff996633,0xff996633,0xff996633,0xff996633,0xff996633,0xff996633,0xff996633,0x3f000000,0x19000000,0xc000000 5194 0x4000000,0x23000000,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0x3f000000,0x19000000,0xc000000
5135}; 5195};
5136 5196
5137static const QRgb week_data[] = { 5197static const QRgb week_data[] = {
5138 0xe000000,0x18000000,0x23000000,0x2e000000,0x35000000,0x39000000,0x3b000000,0x3b000000,0x3b000000,0x39000000,0x35000000,0x2e000000,0x23000000,0x18000000, 5198 0xe000000,0x18000000,0x23000000,0x2e000000,0x35000000,0x39000000,0x3b000000,0x3b000000,0x3b000000,0x39000000,0x35000000,0x2e000000,0x23000000,0x18000000,
5139 0x18000000,0xff686eaf,0xff595fa6,0xff4b529f,0xff4b529f,0xff4b529f,0xff4b529f,0xff4b529f,0xff4b529f,0xff4b529f,0xff343b93,0xff070f75,0x3d000000,0x2a000000, 5199 0x18000000,0xff7a7fbb,0xff6b71b3,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff454ca2,0xff0d1986,0x3d000000,0x2a000000,
5140 0x24000000,0xff595fa6,0xff394095,0xff222a89,0xff222a89,0xff222a89,0xff222a89,0xff222a89,0xff222a89,0xff222a89,0xff07107a,0xff050c5a,0x5a000000,0x3e000000, 5200 0x24000000,0xff6b71b3,0xff4a51a4,0xff303999,0xff303999,0xff303999,0xff303999,0xff303999,0xff303999,0xff303999,0xff0d1a8b,0xff0a146c,0x5a000000,0x3e000000,
5141 0x2e000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe0e0e0,0xffa1a1a1,0x74000000,0x50000000, 5201 0x2e000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe5e5e5,0xffaeaeae,0x74000000,0x50000000,
5142 0x35000000,0xffffffff,0xff000000,0xff000000,0xffffffff,0xff000000,0xff000000,0xffffffff,0xff000000,0xff000000,0xffe0e0e0,0xffa1a1a1,0x86000000,0x5c000000, 5202 0x35000000,0xffffffff,0xff000000,0xff000000,0xffffffff,0xff000000,0xff000000,0xffffffff,0xff000000,0xff000000,0xffe5e5e5,0xffaeaeae,0x86000000,0x5c000000,
5143 0x39000000,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffe0e0e0,0xffa1a1a1,0x90000000,0x63000000, 5203 0x39000000,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffe5e5e5,0xffaeaeae,0x90000000,0x63000000,
5144 0x3b000000,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffe0e0e0,0xffa1a1a1,0x95000000,0x66000000, 5204 0x3b000000,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffe5e5e5,0xffaeaeae,0x95000000,0x66000000,
5145 0x3c000000,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffe0e0e0,0xffa1a1a1,0x96000000,0x67000000, 5205 0x3c000000,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffe5e5e5,0xffaeaeae,0x96000000,0x67000000,
5146 0x3b000000,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffe0e0e0,0xffa1a1a1,0x95000000,0x66000000, 5206 0x3b000000,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffe5e5e5,0xffaeaeae,0x95000000,0x66000000,
5147 0x39000000,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffe0e0e0,0xffa1a1a1,0x90000000,0x63000000, 5207 0x39000000,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffe5e5e5,0xffaeaeae,0x90000000,0x63000000,
5148 0x35000000,0xffffffff,0xfffcfcfc,0xffe0e0e0,0xffe0e0e0,0xffe0e0e0,0xffe0e0e0,0xffe0e0e0,0xffe0e0e0,0xffe0e0e0,0xffc8c8c8,0xff959595,0x86000000,0x5c000000, 5208 0x35000000,0xffffffff,0xfffdfdfd,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffd1d1d1,0xffa4a4a4,0x86000000,0x5c000000,
5149 0x2e000000,0xfff3f3f3,0xffbababa,0xffa1a1a1,0xffa1a1a1,0xffa1a1a1,0xffa1a1a1,0xffa1a1a1,0xffa1a1a1,0xffa1a1a1,0xff959595,0xff868686,0x74000000,0x50000000, 5209 0x2e000000,0xfff5f5f5,0xffc4c4c4,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffa4a4a4,0xff969696,0x74000000,0x50000000,
5150 0x24000000,0x3e000000,0x5a000000,0x74000000,0x86000000,0x90000000,0x95000000,0x96000000,0x95000000,0x90000000,0x86000000,0x74000000,0x5a000000,0x3e000000,
5151 0x18000000,0x2a000000,0x3d000000,0x4f000000,0x5c000000,0x63000000,0x66000000,0x67000000,0x66000000,0x63000000,0x5c000000,0x4f000000,0x3d000000,0x2a000000
5152};
5153
5154static const QRgb weeklst_data[] = {
5155 0xe000000,0x18000000,0x23000000,0x2e000000,0x35000000,0x39000000,0x3b000000,0x3b000000,0x3b000000,0x39000000,0x35000000,0x2e000000,0x23000000,0x18000000,
5156 0x18000000,0xff686eaf,0xff595fa6,0xff4b529f,0xff4b529f,0xff4b529f,0xff4b529f,0xff4b529f,0xff4b529f,0xff4b529f,0xff343b93,0xff070f75,0x3d000000,0x2a000000,
5157 0x24000000,0xff595fa6,0xff394095,0xff222a89,0xff222a89,0xff222a89,0xff222a89,0xff222a89,0xff222a89,0xff222a89,0xff07107a,0xff050c5a,0x5a000000,0x3e000000,
5158 0x2e000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe0e0e0,0xffa1a1a1,0x74000000,0x50000000,
5159 0x35000000,0xffffffff,0xff000000,0xff000000,0xff000000,0xffffffff,0xff000000,0xff000000,0xff000000,0xffffffff,0xffe0e0e0,0xffa1a1a1,0x86000000,0x5c000000,
5160 0x39000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe0e0e0,0xffa1a1a1,0x90000000,0x63000000,
5161 0x3b000000,0xffffffff,0xff000000,0xff000000,0xff000000,0xffffffff,0xff000000,0xff000000,0xff000000,0xffffffff,0xffe0e0e0,0xffa1a1a1,0x95000000,0x66000000,
5162 0x3c000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe0e0e0,0xffa1a1a1,0x96000000,0x67000000,
5163 0x3b000000,0xffffffff,0xff000000,0xff000000,0xff000000,0xffffffff,0xff000000,0xff000000,0xff000000,0xffffffff,0xffe0e0e0,0xffa1a1a1,0x95000000,0x66000000,
5164 0x39000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe0e0e0,0xffa1a1a1,0x90000000,0x63000000,
5165 0x35000000,0xffffffff,0xfffcfcfc,0xffe0e0e0,0xffe0e0e0,0xffe0e0e0,0xffe0e0e0,0xffe0e0e0,0xffe0e0e0,0xffe0e0e0,0xffc8c8c8,0xff959595,0x86000000,0x5c000000,
5166 0x2e000000,0xfff3f3f3,0xffbababa,0xffa1a1a1,0xffa1a1a1,0xffa1a1a1,0xffa1a1a1,0xffa1a1a1,0xffa1a1a1,0xffa1a1a1,0xff959595,0xff868686,0x74000000,0x50000000,
5167 0x24000000,0x3e000000,0x5a000000,0x74000000,0x86000000,0x90000000,0x95000000,0x96000000,0x95000000,0x90000000,0x86000000,0x74000000,0x5a000000,0x3e000000, 5210 0x24000000,0x3e000000,0x5a000000,0x74000000,0x86000000,0x90000000,0x95000000,0x96000000,0x95000000,0x90000000,0x86000000,0x74000000,0x5a000000,0x3e000000,
5168 0x18000000,0x2a000000,0x3d000000,0x4f000000,0x5c000000,0x63000000,0x66000000,0x67000000,0x66000000,0x63000000,0x5c000000,0x4f000000,0x3d000000,0x2a000000 5211 0x18000000,0x2a000000,0x3d000000,0x4f000000,0x5c000000,0x63000000,0x66000000,0x67000000,0x66000000,0x63000000,0x5c000000,0x4f000000,0x3d000000,0x2a000000
5169}; 5212};
5170 5213
5171static const QRgb wordgame_data[] = { 5214static const QRgb wordgame_data[] = {
5172 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffffff, 5215 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffffff,
5173 0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000, 5216 0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,
5174 0xff000000,0xffffffff,0xffffffff,0xffaaaaaa,0xff727272,0xffaaaaaa,0xff8e8e8e,0xff555555,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000, 5217 0xff000000,0xffffffff,0xffffffff,0xffaaaaaa,0xff727272,0xffaaaaaa,0xff8e8e8e,0xff555555,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,
@@ -5367,16 +5410,18 @@ static const unsigned char zoom_data[] = {
5367 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 5410 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
5368 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 5411 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
5369}; 5412};
5370 5413
5371static const QRgb zoom_ctable[] = { 5414static const QRgb zoom_ctable[] = {
5372 0xc6c6c6,0xffffa858,0xffc05800,0xff00ffff,0xff000000,0xffffdca8,0xffffffff 5415 0xc6c6c6,0xffffa858,0xffc05800,0xff00ffff,0xff000000,0xffffdca8,0xffffffff
5373}; 5416};
5374 5417
5418// No tr() anywhere in this file
5419
5375static struct EmbedImage { 5420static struct EmbedImage {
5376 int width, height, depth; 5421 int width, height, depth;
5377 const unsigned char *data; 5422 const unsigned char *data;
5378 int numColors; 5423 int numColors;
5379 const QRgb *colorTable; 5424 const QRgb *colorTable;
5380 bool alpha; 5425 bool alpha;
5381 const char *name; 5426 const char *name;
5382} embed_image_vec[] = { 5427} embed_image_vec[] = {
@@ -5393,33 +5438,34 @@ static struct EmbedImage {
5393 { 32, 32, 32, (const unsigned char*)DateTime_data, 0, 0, TRUE, "DateTime" }, 5438 { 32, 32, 32, (const unsigned char*)DateTime_data, 0, 0, TRUE, "DateTime" },
5394 { 14, 14, 32, (const unsigned char*)DocsIcon_data, 0, 0, TRUE, "DocsIcon" }, 5439 { 14, 14, 32, (const unsigned char*)DocsIcon_data, 0, 0, TRUE, "DocsIcon" },
5395 { 32, 32, 32, (const unsigned char*)DocumentTypeExcel_data, 0, 0, TRUE, "DocumentTypeExcel" }, 5440 { 32, 32, 32, (const unsigned char*)DocumentTypeExcel_data, 0, 0, TRUE, "DocumentTypeExcel" },
5396 { 32, 32, 32, (const unsigned char*)DocumentTypeNone_data, 0, 0, TRUE, "DocumentTypeNone" }, 5441 { 32, 32, 32, (const unsigned char*)DocumentTypeNone_data, 0, 0, TRUE, "DocumentTypeNone" },
5397 { 32, 32, 32, (const unsigned char*)DocumentTypePowerPoint_data, 0, 0, TRUE, "DocumentTypePowerPoint" }, 5442 { 32, 32, 32, (const unsigned char*)DocumentTypePowerPoint_data, 0, 0, TRUE, "DocumentTypePowerPoint" },
5398 { 32, 32, 32, (const unsigned char*)DocumentTypeWord_data, 0, 0, TRUE, "DocumentTypeWord" }, 5443 { 32, 32, 32, (const unsigned char*)DocumentTypeWord_data, 0, 0, TRUE, "DocumentTypeWord" },
5399 { 32, 32, 32, (const unsigned char*)FileBrowser_data, 0, 0, TRUE, "FileBrowser" }, 5444 { 32, 32, 32, (const unsigned char*)FileBrowser_data, 0, 0, TRUE, "FileBrowser" },
5400 { 14, 14, 32, (const unsigned char*)Games_data, 0, 0, TRUE, "Games" }, 5445 { 14, 14, 32, (const unsigned char*)Games_data, 0, 0, TRUE, "Games" },
5401 { 12, 12, 32, (const unsigned char*)Go_black_highlight_data, 0, 0, TRUE, "Go-black-highlight" }, 5446 { 32, 32, 32, (const unsigned char*)Go_data, 0, 0, TRUE, "Go" },
5402 { 12, 12, 32, (const unsigned char*)Go_black_data, 0, 0, TRUE, "Go-black" }, 5447 { 12, 12, 32, (const unsigned char*)Go_black_data, 0, 0, TRUE, "Go-black" },
5448 { 12, 12, 32, (const unsigned char*)Go_black_highlight_data, 0, 0, TRUE, "Go-black-highlight" },
5403 { 12, 12, 32, (const unsigned char*)Go_white_data, 0, 0, TRUE, "Go-white" }, 5449 { 12, 12, 32, (const unsigned char*)Go_white_data, 0, 0, TRUE, "Go-white" },
5404 { 32, 32, 32, (const unsigned char*)Go_data, 0, 0, TRUE, "Go" },
5405 { 32, 32, 32, (const unsigned char*)HelpBrowser_data, 0, 0, TRUE, "HelpBrowser" }, 5450 { 32, 32, 32, (const unsigned char*)HelpBrowser_data, 0, 0, TRUE, "HelpBrowser" },
5406 { 14, 14, 32, (const unsigned char*)HelpButton_data, 0, 0, TRUE, "HelpButton" }, 5451 { 14, 14, 32, (const unsigned char*)HelpButton_data, 0, 0, TRUE, "HelpButton" },
5407 { 32, 32, 32, (const unsigned char*)ImageViewer_data, 0, 0, TRUE, "ImageViewer" }, 5452 { 32, 32, 32, (const unsigned char*)ImageViewer_data, 0, 0, TRUE, "ImageViewer" },
5408 { 32, 32, 32, (const unsigned char*)Ipkg_data, 0, 0, TRUE, "Ipkg" }, 5453 { 32, 32, 32, (const unsigned char*)Ipkg_data, 0, 0, TRUE, "Ipkg" },
5409 { 32, 32, 32, (const unsigned char*)Language_data, 0, 0, TRUE, "Language" }, 5454 { 32, 32, 32, (const unsigned char*)Language_data, 0, 0, TRUE, "Language" },
5410 { 32, 32, 32, (const unsigned char*)Light_data, 0, 0, TRUE, "Light" }, 5455 { 32, 32, 32, (const unsigned char*)Light_data, 0, 0, TRUE, "Light" },
5411 { 32, 32, 32, (const unsigned char*)MPEGPlayer_data, 0, 0, TRUE, "MPEGPlayer" }, 5456 { 32, 32, 32, (const unsigned char*)MPEGPlayer_data, 0, 0, TRUE, "MPEGPlayer" },
5412 { 32, 32, 32, (const unsigned char*)Mindbreaker_data, 0, 0, TRUE, "Mindbreaker" }, 5457 { 32, 32, 32, (const unsigned char*)Mindbreaker_data, 0, 0, TRUE, "Mindbreaker" },
5413 { 32, 32, 32, (const unsigned char*)MineHunt_data, 0, 0, TRUE, "MineHunt" }, 5458 { 32, 32, 32, (const unsigned char*)MineHunt_data, 0, 0, TRUE, "MineHunt" },
5414 { 32, 32, 32, (const unsigned char*)NetHack_data, 0, 0, TRUE, "NetHack" }, 5459 { 32, 32, 32, (const unsigned char*)NetHack_data, 0, 0, TRUE, "NetHack" },
5415 { 28, 14, 32, (const unsigned char*)OKButton_data, 0, 0, TRUE, "OKButton" }, 5460 { 28, 14, 32, (const unsigned char*)OKButton_data, 0, 0, TRUE, "OKButton" },
5416 { 32, 32, 32, (const unsigned char*)Opera_data, 0, 0, TRUE, "Opera" }, 5461 { 32, 32, 32, (const unsigned char*)Opera_data, 0, 0, TRUE, "Opera" },
5417 { 32, 32, 32, (const unsigned char*)PPPConnect_data, 0, 0, TRUE, "PPPConnect" }, 5462 { 32, 32, 32, (const unsigned char*)PPPConnect_data, 0, 0, TRUE, "PPPConnect" },
5463 { 32, 32, 32, (const unsigned char*)ParaShoot_data, 0, 0, TRUE, "ParaShoot" },
5418 { 32, 32, 32, (const unsigned char*)Rotation_data, 0, 0, TRUE, "Rotation" }, 5464 { 32, 32, 32, (const unsigned char*)Rotation_data, 0, 0, TRUE, "Rotation" },
5419 { 14, 14, 32, (const unsigned char*)SettingsIcon_data, 0, 0, TRUE, "SettingsIcon" }, 5465 { 14, 14, 32, (const unsigned char*)SettingsIcon_data, 0, 0, TRUE, "SettingsIcon" },
5420 { 32, 32, 32, (const unsigned char*)Shutdown_data, 0, 0, TRUE, "Shutdown" }, 5466 { 32, 32, 32, (const unsigned char*)Shutdown_data, 0, 0, TRUE, "Shutdown" },
5421 { 32, 32, 32, (const unsigned char*)Snake_data, 0, 0, TRUE, "Snake" }, 5467 { 32, 32, 32, (const unsigned char*)Snake_data, 0, 0, TRUE, "Snake" },
5422 { 32, 32, 32, (const unsigned char*)Solitaire_data, 0, 0, TRUE, "Solitaire" }, 5468 { 32, 32, 32, (const unsigned char*)Solitaire_data, 0, 0, TRUE, "Solitaire" },
5423 { 32, 32, 32, (const unsigned char*)Sound_data, 0, 0, TRUE, "Sound" }, 5469 { 32, 32, 32, (const unsigned char*)Sound_data, 0, 0, TRUE, "Sound" },
5424 { 32, 32, 32, (const unsigned char*)SoundPlayer_data, 0, 0, TRUE, "SoundPlayer" }, 5470 { 32, 32, 32, (const unsigned char*)SoundPlayer_data, 0, 0, TRUE, "SoundPlayer" },
5425 { 32, 32, 32, (const unsigned char*)Spreadsheet_data, 0, 0, TRUE, "Spreadsheet" }, 5471 { 32, 32, 32, (const unsigned char*)Spreadsheet_data, 0, 0, TRUE, "Spreadsheet" },
@@ -5448,17 +5494,16 @@ static struct EmbedImage {
5448 { 14, 14, 32, (const unsigned char*)close_data, 0, 0, TRUE, "close" }, 5494 { 14, 14, 32, (const unsigned char*)close_data, 0, 0, TRUE, "close" },
5449 { 14, 14, 32, (const unsigned char*)copy_data, 0, 0, TRUE, "copy" }, 5495 { 14, 14, 32, (const unsigned char*)copy_data, 0, 0, TRUE, "copy" },
5450 { 14, 14, 32, (const unsigned char*)copy_inactive_data, 0, 0, TRUE, "copy_inactive" }, 5496 { 14, 14, 32, (const unsigned char*)copy_inactive_data, 0, 0, TRUE, "copy_inactive" },
5451 { 14, 14, 32, (const unsigned char*)cut_data, 0, 0, TRUE, "cut" }, 5497 { 14, 14, 32, (const unsigned char*)cut_data, 0, 0, TRUE, "cut" },
5452 { 14, 14, 32, (const unsigned char*)cut_inactive_data, 0, 0, TRUE, "cut_inactive" }, 5498 { 14, 14, 32, (const unsigned char*)cut_inactive_data, 0, 0, TRUE, "cut_inactive" },
5453 { 14, 14, 32, (const unsigned char*)datebook_icon_data, 0, 0, TRUE, "datebook_icon" }, 5499 { 14, 14, 32, (const unsigned char*)datebook_icon_data, 0, 0, TRUE, "datebook_icon" },
5454 { 14, 14, 32, (const unsigned char*)day_data, 0, 0, TRUE, "day" }, 5500 { 14, 14, 32, (const unsigned char*)day_data, 0, 0, TRUE, "day" },
5455 { 14, 14, 32, (const unsigned char*)done_data, 0, 0, TRUE, "done" }, 5501 { 14, 14, 32, (const unsigned char*)done_data, 0, 0, TRUE, "done" },
5456 { 14, 14, 32, (const unsigned char*)down_data, 0, 0, TRUE, "down" },
5457 { 14, 14, 32, (const unsigned char*)edit_data, 0, 0, TRUE, "edit" }, 5502 { 14, 14, 32, (const unsigned char*)edit_data, 0, 0, TRUE, "edit" },
5458 { 14, 14, 32, (const unsigned char*)editdelete_data, 0, 0, TRUE, "editdelete" }, 5503 { 14, 14, 32, (const unsigned char*)editdelete_data, 0, 0, TRUE, "editdelete" },
5459 { 14, 14, 32, (const unsigned char*)enter_data, 0, 0, TRUE, "enter" }, 5504 { 14, 14, 32, (const unsigned char*)enter_data, 0, 0, TRUE, "enter" },
5460 { 16, 16, 8, (const unsigned char*)exec_data, 11, exec_ctable, TRUE, "exec" }, 5505 { 16, 16, 8, (const unsigned char*)exec_data, 11, exec_ctable, TRUE, "exec" },
5461 { 32, 32, 8, (const unsigned char*)faded_bg_data, 40, faded_bg_ctable, TRUE, "faded_bg" }, 5506 { 32, 32, 8, (const unsigned char*)faded_bg_data, 40, faded_bg_ctable, TRUE, "faded_bg" },
5462 { 14, 14, 32, (const unsigned char*)fastback_data, 0, 0, TRUE, "fastback" }, 5507 { 14, 14, 32, (const unsigned char*)fastback_data, 0, 0, TRUE, "fastback" },
5463 { 14, 14, 32, (const unsigned char*)fastforward_data, 0, 0, TRUE, "fastforward" }, 5508 { 14, 14, 32, (const unsigned char*)fastforward_data, 0, 0, TRUE, "fastforward" },
5464 { 14, 14, 32, (const unsigned char*)fileopen_data, 0, 0, TRUE, "fileopen" }, 5509 { 14, 14, 32, (const unsigned char*)fileopen_data, 0, 0, TRUE, "fileopen" },
@@ -5502,57 +5547,60 @@ static struct EmbedImage {
5502 { 14, 14, 8, (const unsigned char*)reset_data, 3, reset_ctable, TRUE, "reset" }, 5547 { 14, 14, 8, (const unsigned char*)reset_data, 3, reset_ctable, TRUE, "reset" },
5503 { 16, 16, 32, (const unsigned char*)right_data, 0, 0, TRUE, "right" }, 5548 { 16, 16, 32, (const unsigned char*)right_data, 0, 0, TRUE, "right" },
5504 { 14, 14, 32, (const unsigned char*)rotate_data, 0, 0, TRUE, "rotate" }, 5549 { 14, 14, 32, (const unsigned char*)rotate_data, 0, 0, TRUE, "rotate" },
5505 { 14, 14, 32, (const unsigned char*)start_data, 0, 0, TRUE, "start" }, 5550 { 14, 14, 32, (const unsigned char*)start_data, 0, 0, TRUE, "start" },
5506 { 14, 14, 32, (const unsigned char*)stop_data, 0, 0, TRUE, "stop" }, 5551 { 14, 14, 32, (const unsigned char*)stop_data, 0, 0, TRUE, "stop" },
5507 { 16, 16, 32, (const unsigned char*)style_data, 0, 0, TRUE, "style" }, 5552 { 16, 16, 32, (const unsigned char*)style_data, 0, 0, TRUE, "style" },
5508 { 16, 16, 32, (const unsigned char*)table_pattern_data, 0, 0, TRUE, "table_pattern" }, 5553 { 16, 16, 32, (const unsigned char*)table_pattern_data, 0, 0, TRUE, "table_pattern" },
5509 { 16, 16, 8, (const unsigned char*)tgz_data, 7, tgz_ctable, TRUE, "tgz" }, 5554 { 16, 16, 8, (const unsigned char*)tgz_data, 7, tgz_ctable, TRUE, "tgz" },
5510 { 14, 14, 32, (const unsigned char*)to_day_data, 0, 0, TRUE, "to_day" }, 5555 { 14, 14, 32, (const unsigned char*)today_data, 0, 0, TRUE, "today" },
5511 { 14, 14, 32, (const unsigned char*)toys_data, 0, 0, TRUE, "toys" }, 5556 { 14, 14, 32, (const unsigned char*)toys_data, 0, 0, TRUE, "toys" },
5512 { 16, 16, 8, (const unsigned char*)trash_data, 10, trash_ctable, TRUE, "trash" }, 5557 { 16, 16, 8, (const unsigned char*)trash_data, 10, trash_ctable, TRUE, "trash" },
5513 { 16, 16, 8, (const unsigned char*)txt_data, 41, txt_ctable, TRUE, "txt" }, 5558 { 16, 16, 8, (const unsigned char*)txt_data, 41, txt_ctable, TRUE, "txt" },
5514 { 16, 16, 32, (const unsigned char*)underline_data, 0, 0, TRUE, "underline" }, 5559 { 16, 16, 32, (const unsigned char*)underline_data, 0, 0, TRUE, "underline" },
5515 { 14, 14, 32, (const unsigned char*)uninstall_data, 0, 0, TRUE, "uninstall" }, 5560 { 14, 14, 32, (const unsigned char*)uninstall_data, 0, 0, TRUE, "uninstall" },
5516 { 14, 14, 8, (const unsigned char*)uninstalled_data, 6, uninstalled_ctable, TRUE, "uninstalled" }, 5561 { 14, 14, 8, (const unsigned char*)uninstalled_data, 6, uninstalled_ctable, TRUE, "uninstalled" },
5517 { 14, 14, 32, (const unsigned char*)up_data, 0, 0, TRUE, "up" }, 5562 { 14, 14, 32, (const unsigned char*)up_data, 0, 0, TRUE, "up" },
5518 { 14, 14, 32, (const unsigned char*)volume_data, 0, 0, TRUE, "volume" }, 5563 { 14, 14, 32, (const unsigned char*)volume_data, 0, 0, TRUE, "volume" },
5519 { 14, 14, 32, (const unsigned char*)wait_data, 0, 0, TRUE, "wait" }, 5564 { 14, 14, 32, (const unsigned char*)wait_data, 0, 0, TRUE, "wait" },
5520 { 14, 14, 32, (const unsigned char*)week_data, 0, 0, TRUE, "week" }, 5565 { 14, 14, 32, (const unsigned char*)week_data, 0, 0, TRUE, "week" },
5521 { 14, 14, 32, (const unsigned char*)weeklst_data, 0, 0, TRUE, "weeklst" },
5522 { 14, 14, 32, (const unsigned char*)wordgame_data, 0, 0, TRUE, "wordgame" }, 5566 { 14, 14, 32, (const unsigned char*)wordgame_data, 0, 0, TRUE, "wordgame" },
5523 { 96, 16, 8, (const unsigned char*)wordgame_shapes_data, 9, wordgame_shapes_ctable, TRUE, "wordgame_shapes" }, 5567 { 96, 16, 8, (const unsigned char*)wordgame_shapes_data, 9, wordgame_shapes_ctable, TRUE, "wordgame_shapes" },
5524 { 9, 8, 8, (const unsigned char*)xtopowerofy_data, 2, xtopowerofy_ctable, TRUE, "xtopowerofy" }, 5568 { 9, 8, 8, (const unsigned char*)xtopowerofy_data, 2, xtopowerofy_ctable, TRUE, "xtopowerofy" },
5525 { 13, 11, 8, (const unsigned char*)ythrootofx_data, 2, ythrootofx_ctable, TRUE, "ythrootofx" }, 5569 { 13, 11, 8, (const unsigned char*)ythrootofx_data, 2, ythrootofx_ctable, TRUE, "ythrootofx" },
5526 { 20, 20, 8, (const unsigned char*)zoom_data, 7, zoom_ctable, TRUE, "zoom" }, 5570 { 20, 20, 8, (const unsigned char*)zoom_data, 7, zoom_ctable, TRUE, "zoom" },
5527 { 0, 0, 0, 0, 0, 0, 0, 0 }
5528}; 5571};
5529 5572
5530static const QImage& qembed_findImage( const QString& name ) 5573static int cmpEmbedImage(const void *a, const void *b)
5574{
5575 const EmbedImage* ea = (const EmbedImage*)a;
5576 const EmbedImage* eb = (const EmbedImage*)b;
5577 return strcmp(ea->name,eb->name);
5578}
5579inline const QImage& qembed_findImage(const char* name)
5531{ 5580{
5532 static QDict<QImage> dict; 5581 EmbedImage key; key.name = name;
5533 QImage* img = dict.find(name); 5582 EmbedImage* r = (EmbedImage*)bsearch( &key, embed_image_vec,
5534 if ( !img ) { 5583 sizeof(embed_image_vec)/sizeof(EmbedImage), sizeof(EmbedImage), cmpEmbedImage );
5535 for (int i=0; embed_image_vec[i].data; i++) { 5584 QImage* img;
5536 if ( 0==strcmp(embed_image_vec[i].name, name) ) { 5585 if ( r ) {
5537 img = new QImage((uchar*)embed_image_vec[i].data, 5586 img = new QImage((uchar*)r->data,
5538 embed_image_vec[i].width, 5587 r->width,
5539 embed_image_vec[i].height, 5588 r->height,
5540 embed_image_vec[i].depth, 5589 r->depth,
5541 (QRgb*)embed_image_vec[i].colorTable, 5590#ifdef _WS_QWS_
5542 embed_image_vec[i].numColors, 5591 (r->width*r->depth+31)/32*4,
5543 QImage::BigEndian 5592#endif
5544 ); 5593 (QRgb*)r->colorTable,
5545 if ( embed_image_vec[i].alpha ) 5594 r->numColors,
5546 img->setAlphaBuffer(TRUE); 5595 QImage::BigEndian
5547 break; 5596 );
5548 } 5597 if ( r->alpha )
5549 } 5598 img->setAlphaBuffer(TRUE);
5550 if ( !img ) { 5599 } else {
5551 static QImage dummy; 5600 static QImage dummy;
5552 return dummy; 5601 img = &dummy;
5553 }
5554 } 5602 }
5555 return *img; 5603 return *img;
5556} 5604}
5557 5605
5558#endif 5606#endif
diff --git a/library/inputmethodinterface.h b/library/inputmethodinterface.h
index ae14218..88a121d 100644
--- a/library/inputmethodinterface.h
+++ b/library/inputmethodinterface.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -31,19 +31,34 @@
31# ifndef IID_InputMethod 31# ifndef IID_InputMethod
32# define IID_InputMethod QUuid( 0x637a8a14, 0xaf98, 0x41da, 0x96, 0x9a, 0x2b, 0xd1, 0x6e, 0xcd, 0xa8, 0xc7) 32# define IID_InputMethod QUuid( 0x637a8a14, 0xaf98, 0x41da, 0x96, 0x9a, 0x2b, 0xd1, 0x6e, 0xcd, 0xa8, 0xc7)
33# endif 33# endif
34#endif 34#endif
35 35
36class QWidget; 36class QWidget;
37class QPixmap; 37class QPixmap;
38class QObject; 38class QObject;
39class QWSInputMethod;
39 40
40struct InputMethodInterface : public QUnknownInterface 41struct InputMethodInterface : public QUnknownInterface
41{ 42{
42 virtual QWidget *inputMethod( QWidget *parent, Qt::WFlags f ) = 0; 43 virtual QWidget *inputMethod( QWidget *parent, Qt::WFlags f ) = 0;
43 virtual void resetState() = 0; 44 virtual void resetState() = 0;
44 virtual QPixmap *icon() = 0; 45 virtual QPixmap *icon() = 0;
45 virtual QString name() = 0; 46 virtual QString name() = 0;
46 virtual void onKeyPress( QObject *receiver, const char *slot ) = 0; 47 virtual void onKeyPress( QObject *receiver, const char *slot ) = 0;
47}; 48};
48 49
50// {70F0991C-8282-4625-A279-BD9D7D959FF6}
51#ifndef IID_ExtInputMethod
52#define IID_ExtInputMethod QUuid( 0x70f0991c, 0x8282, 0x4625, 0xa2, 0x79, 0xbd, 0x9d, 0x7d, 0x95, 0x9f, 0xf6)
53#endif
54
55struct ExtInputMethodInterface : public QUnknownInterface
56{
57 virtual QWSInputMethod *inputMethod() = 0;
58 virtual QPixmap *icon() = 0;
59 virtual QString name() = 0;
60 virtual QWidget *widget( QWidget *parent, Qt::WFlags f )= 0;
61};
62
63
49#endif 64#endif
diff --git a/library/ir.cpp b/library/ir.cpp
index 68345d1..a7cf7b1 100644
--- a/library/ir.cpp
+++ b/library/ir.cpp
@@ -1,79 +1,120 @@
1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3**
4** This file is part of the Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
1#include "ir.h" 21#include "ir.h"
2 22
3#include <qstring.h> 23#include <qstring.h>
24#ifdef QWS
4#include "qcopenvelope_qws.h" 25#include "qcopenvelope_qws.h"
5#include <qcopchannel_qws.h> 26#include <qcopchannel_qws.h>
27#endif
6#include "applnk.h" 28#include "applnk.h"
7 29
8/*! 30/*!
9 \class Ir ir.h 31 \class Ir ir.h
10 \brief The Ir class implements basic support for sending objects over an 32 \brief The Ir class implements basic support for sending objects over an
11 infrared communication link. 33 infrared communication link.
12 34
13 The Ir class is a small helper class to enable sending of objects over an infrared communication link. 35 Both \link doclnk.html DocLnk\endlink objects and files can be
36 sent to another device via the infrared link using the send()
37 function. When the send has completed the done() signal is
38 emitted.
39
40 The supported() function returns whether the device supports
41 infrared communication or not.
42
43 \ingroup qtopiaemb
14*/ 44*/
15 45
16/*! 46/*!
17 Constructs an Ir object. The \a parent and \a name classes are the 47 Constructs an Ir object. The \a parent and \a name classes are the
18 standard QObject parameters. 48 standard QObject parameters.
19*/ 49*/
20Ir::Ir( QObject *parent, const char *name ) 50Ir::Ir( QObject *parent, const char *name )
21 : QObject( parent, name ) 51 : QObject( parent, name )
22{ 52{
53#ifndef QT_NO_COP
23 ch = new QCopChannel( "QPE/Obex" ); 54 ch = new QCopChannel( "QPE/Obex" );
24 connect( ch, SIGNAL(received(const QCString &, const QByteArray &)), 55 connect( ch, SIGNAL(received(const QCString &, const QByteArray &)),
25 this, SLOT(obexMessage( const QCString &, const QByteArray &)) ); 56 this, SLOT(obexMessage( const QCString &, const QByteArray &)) );
57#endif
26} 58}
27 59
28/*! 60/*!
29 Returns TRUE if the system supports infrared communication. 61 Returns TRUE if the system supports infrared communication;
62 otherwise returns FALSE.
30*/ 63*/
31bool Ir::supported() 64bool Ir::supported()
32{ 65{
66#ifndef QT_NO_COP
33 return QCopChannel::isRegistered( "QPE/Obex" ); 67 return QCopChannel::isRegistered( "QPE/Obex" );
68#endif
34} 69}
35 70
36/*! 71/*!
37 Send the object in the file \a fn over the infrared link. 72 Sends the object in file \a fn over the infrared link. The \a
38 The \a description will be shown to the user while 73 description is used in the text shown to the user while sending
39 sending is in progress. 74 is in progress. The optional \a mimetype parameter specifies the
40 The optional \a mimetype parameter specifies the mimetype of the object. If this parameter is not 75 mimetype of the object. If this parameter is not set, it is
41 set, it will be determined by the extension of the filename. 76 determined by the the filename's suffix.
77
78 \sa done()
42*/ 79*/
43void Ir::send( const QString &fn, const QString &description, const QString &mimetype) 80void Ir::send( const QString &fn, const QString &description, const QString &mimetype)
44{ 81{
45 if ( !filename.isEmpty() ) return; 82 if ( !filename.isEmpty() ) return;
46 filename = fn; 83 filename = fn;
84#ifndef QT_NO_COP
47 QCopEnvelope e("QPE/Obex", "send(QString,QString,QString)"); 85 QCopEnvelope e("QPE/Obex", "send(QString,QString,QString)");
48 e << description << filename << mimetype; 86 e << description << filename << mimetype;
87#endif
49} 88}
50 89
51/*! 90/*!
52 \overload 91 \overload
53 92
54 Uses the DocLnk::file() and DocLnk::type() of \a doc. 93 Uses the DocLnk::file() and DocLnk::type() of \a doc.
94
95 \sa done()
55*/ 96*/
56void Ir::send( const DocLnk &doc, const QString &description ) 97void Ir::send( const DocLnk &doc, const QString &description )
57{ 98{
58 send( doc.file(), description, doc.type() ); 99 send( doc.file(), description, doc.type() );
59} 100}
60 101
61/*! 102/*!
62 \fn Ir::done( Ir *ir ); 103 \fn Ir::done( Ir *ir );
63 104
64 This signal is emitted by \a ir, when the send comand has been processed. 105 This signal is emitted by \a ir, when the send comand has been processed.
65*/ 106*/
66 107
67/*!\internal 108/*!\internal
68 */ 109 */
69void Ir::obexMessage( const QCString &msg, const QByteArray &data) 110void Ir::obexMessage( const QCString &msg, const QByteArray &data)
70{ 111{
71 if ( msg == "done(QString)" ) { 112 if ( msg == "done(QString)" ) {
72 QString fn; 113 QString fn;
73 QDataStream stream( data, IO_ReadOnly ); 114 QDataStream stream( data, IO_ReadOnly );
74 stream >> fn; 115 stream >> fn;
75 if ( fn == filename ) 116 if ( fn == filename )
76 emit done( this ); 117 emit done( this );
77 } 118 }
78} 119}
79 120
diff --git a/library/ir.h b/library/ir.h
index 33eedfe..a62f91d 100644
--- a/library/ir.h
+++ b/library/ir.h
@@ -1,8 +1,28 @@
1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3**
4** This file is part of the Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
1#ifndef IR_H 21#ifndef IR_H
2#define IR_H 22#define IR_H
3 23
4#include <qstring.h> 24#include <qstring.h>
5#include <qobject.h> 25#include <qobject.h>
6class DocLnk; 26class DocLnk;
7class QCopChannel; 27class QCopChannel;
8 28
diff --git a/library/library.pro b/library/library.pro
index 1837b4f..af505dd 100644
--- a/library/library.pro
+++ b/library/library.pro
@@ -31,35 +31,38 @@ HEADERS = calendar.h \
31 process.h \ 31 process.h \
32 password.h \ 32 password.h \
33 timestring.h \ 33 timestring.h \
34 fontfactoryinterface.h \ 34 fontfactoryinterface.h \
35 fontdatabase.h \ 35 fontdatabase.h \
36 power.h \ 36 power.h \
37 storage.h \ 37 storage.h \
38 qpemessagebox.h \ 38 qpemessagebox.h \
39 backend/timeconversion.h \ 39 timeconversion.h \
40 qpedebug.h \ 40 qpedebug.h \
41 qpemenubar.h \ 41 qpemenubar.h \
42 qpetoolbar.h \ 42 qpetoolbar.h \
43 backend/categories.h \ 43 backend/categories.h \
44 backend/stringutil.h \ 44 stringutil.h \
45 backend/palmtoprecord.h \ 45 backend/palmtoprecord.h \
46 backend/task.h \ 46 backend/task.h \
47 backend/event.h \ 47 backend/event.h \
48 backend/contact.h\ 48 backend/contact.h\
49 categorymenu.h \ 49 categorymenu.h \
50 categoryedit_p.h \ 50 categoryedit_p.h \
51 categoryselect.h \ 51 categoryselect.h \
52 categorywidget.h \ 52 categorywidget.h \
53 ir.h \ 53 ir.h \
54 backend/vobject_p.h \ 54 backend/vobject_p.h \
55 findwidget_p.h \ 55 findwidget_p.h \
56 finddialog.h \ 56 finddialog.h \
57 lnkproperties.h 57 lnkproperties.h \
58 windowdecorationinterface.h \
59 textcodecinterface.h \
60 imagecodecinterface.h
58 SOURCES= calendar.cpp \ 61 SOURCES= calendar.cpp \
59 global.cpp \ 62 global.cpp \
60 xmlreader.cpp \ 63 xmlreader.cpp \
61 mimetype.cpp \ 64 mimetype.cpp \
62 menubutton.cpp \ 65 menubutton.cpp \
63 network.cpp \ 66 network.cpp \
64 networkinterface.cpp \ 67 networkinterface.cpp \
65 filemanager.cpp \ 68 filemanager.cpp \
diff --git a/library/lnkproperties.cpp b/library/lnkproperties.cpp
index c020328..983c677 100644
--- a/library/lnkproperties.cpp
+++ b/library/lnkproperties.cpp
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -24,17 +24,19 @@
24#include "lnkproperties.h" 24#include "lnkproperties.h"
25#include "lnkproperties.h" 25#include "lnkproperties.h"
26#include "lnkpropertiesbase_p.h" 26#include "lnkpropertiesbase_p.h"
27#include "ir.h" 27#include "ir.h"
28 28
29#include <qpe/applnk.h> 29#include <qpe/applnk.h>
30#include <qpe/global.h> 30#include <qpe/global.h>
31#include <qpe/categorywidget.h> 31#include <qpe/categorywidget.h>
32#ifdef QWS
32#include <qpe/qcopenvelope_qws.h> 33#include <qpe/qcopenvelope_qws.h>
34#endif
33#include <qpe/filemanager.h> 35#include <qpe/filemanager.h>
34#include <qpe/config.h> 36#include <qpe/config.h>
35#include <qpe/storage.h> 37#include <qpe/storage.h>
36#include <qpe/qpemessagebox.h> 38#include <qpe/qpemessagebox.h>
37 39
38#include <qlineedit.h> 40#include <qlineedit.h>
39#include <qtoolbutton.h> 41#include <qtoolbutton.h>
40#include <qpushbutton.h> 42#include <qpushbutton.h>
@@ -49,114 +51,95 @@
49#include <qcombobox.h> 51#include <qcombobox.h>
50#include <qregexp.h> 52#include <qregexp.h>
51 53
52#include <stdlib.h> 54#include <stdlib.h>
53 55
54LnkProperties::LnkProperties( AppLnk* l, QWidget* parent ) 56LnkProperties::LnkProperties( AppLnk* l, QWidget* parent )
55 : QDialog( parent, 0, TRUE ), lnk(l), fileSize( 0 ) 57 : QDialog( parent, 0, TRUE ), lnk(l), fileSize( 0 )
56{ 58{
59 setCaption( tr("Properties") );
60
57 QVBoxLayout *vbox = new QVBoxLayout( this ); 61 QVBoxLayout *vbox = new QVBoxLayout( this );
58 d = new LnkPropertiesBase( this ); 62 d = new LnkPropertiesBase( this );
59 vbox->add( d ); 63 vbox->add( d );
60 64
61 d->docname->setText(l->name()); 65 d->docname->setText(l->name());
62 QString inf; 66 QString inf;
63 if ( l->type().isEmpty() ) { 67 if ( l->type().isEmpty() ) {
64 d->type->hide(); 68 d->type->hide();
65 d->typeLabel->hide(); 69 d->typeLabel->hide();
66 } else { 70 } else {
67 d->type->setText( l->type() ); 71 d->type->setText( l->type() );
68 } 72 }
69 73
70 if ( l->comment().isEmpty() ) { 74 if ( l->comment().isEmpty() ) {
71 d->comment->hide(); 75 d->comment->hide();
72 d->commentLabel->hide(); 76 d->commentLabel->hide();
73 } else { 77 } else {
74 d->comment->setText( l->comment() ); 78 d->comment->setText( l->comment() );
75 } 79 }
76 80
77 connect(d->beam,SIGNAL(clicked()),this,SLOT(beamLnk())); 81 connect(d->beam,SIGNAL(clicked()),this,SLOT(beamLnk()));
78 if ( lnk->type().contains('/') ) { // A document? (#### better predicate needed) 82 if ( lnk->type().contains('/') ) { // A document? (#### better predicate needed)
79 connect(d->unlink,SIGNAL(clicked()),this,SLOT(unlinkLnk())); 83 connect(d->unlink,SIGNAL(clicked()),this,SLOT(unlinkLnk()));
80 connect(d->duplicate,SIGNAL(clicked()),this,SLOT(duplicateLnk())); 84 connect(d->duplicate,SIGNAL(clicked()),this,SLOT(duplicateLnk()));
81 connect(d->delicon,SIGNAL(clicked()),this,SLOT(unlinkIcon())); 85
82 86 d->docname->setReadOnly( FALSE );
83 d->docname->setReadOnly( FALSE ); 87 d->preload->hide();
84 d->preload->hide(); 88 d->spacer->hide();
85 d->spacer->hide(); 89
86 90 // ### THIS MUST GO, FIX WIERD BUG in QLAYOUT
87 // ### THIS MUST GO, FIX WIERD BUG in QLAYOUT 91 d->categoryEdit->kludge();
88 d->categoryEdit->kludge(); 92
89 93 d->categoryEdit->setCategories( lnk->categories(),
90 d->categoryEdit->setCategories( lnk->categories(), 94 "Document View",
91 "Document View", 95 tr("Document View") );
92 tr("Document View") ); 96 setupLocations();
93 setupLocations();
94 } else { 97 } else {
95 d->unlink->hide(); 98 d->unlink->hide();
96 d->duplicate->hide(); 99 d->duplicate->hide();
97 d->beam->hide(); 100 d->beam->hide();
98 d->hline->hide(); 101 d->hline->hide();
99 d->locationLabel->hide(); 102 d->locationLabel->hide();
100 d->locationCombo->hide(); 103 d->locationCombo->hide();
101 104
102 // Can't edit categories, since the app .desktop files are global, 105 // Can't edit categories, since the app .desktop files are global,
103 // possibly read-only. 106 // possibly read-only.
104 d->categoryEdit->hide(); 107 d->categoryEdit->hide();
105 108
106 d->docname->setReadOnly( TRUE ); 109 d->docname->setReadOnly( TRUE );
107 110
108 if ( l->property("CanFastload") == "0" ) 111 if ( l->property("CanFastload") == "0" )
109 d->preload->hide(); 112 d->preload->hide();
110 113
111 Config cfg("Launcher"); 114 Config cfg("Launcher");
112 cfg.setGroup("Preload"); 115 cfg.setGroup("Preload");
113 QStringList apps = cfg.readListEntry("Apps",','); 116 QStringList apps = cfg.readListEntry("Apps",',');
114 d->preload->setChecked( apps.contains(l->exec()) ); 117 d->preload->setChecked( apps.contains(l->exec()) );
115 if ( Global::isBuiltinCommand(lnk->exec()) ) 118 if ( Global::isBuiltinCommand(lnk->exec()) )
116 d->preload->hide(); // builtins are always fast 119 d->preload->hide(); // builtins are always fast
117 120
118 currentLocation = 0; // apps not movable (yet) 121 currentLocation = 0; // apps not movable (yet)
119 } 122 }
120 setCaption( l->file());
121} 123}
122 124
123LnkProperties::~LnkProperties() 125LnkProperties::~LnkProperties()
124{ 126{
125} 127}
126 128
127void LnkProperties::unlinkLnk() 129void LnkProperties::unlinkLnk()
128{ 130{
129 if ( QPEMessageBox::confirmDelete( this, tr("Delete"), lnk->name() ) ) { 131 if ( QPEMessageBox::confirmDelete( this, tr("Delete"), lnk->name() ) ) {
130 if ( QFile::exists(lnk->file()) ) 132 lnk->removeFiles();
131 lnk->removeFiles(); 133 if ( QFile::exists(lnk->file()) ) {
132 else 134 QMessageBox::warning( this, tr("Delete"), tr("File deletion failed.") );
133 QMessageBox::warning( this, tr("Delete"), tr("File does not exist.") ); 135 } else {
134 if ( QFile::exists(lnk->file()) ) { 136 reject();
135 QMessageBox::warning( this, tr("Delete"), tr("File deletion failed.") ); 137 }
136 } else {
137 reject();
138 }
139 }
140}
141
142
143/*
144 * remove only the link from documents, not also the file
145 */
146void LnkProperties::unlinkIcon()
147{
148 if ( QPEMessageBox::confirmDelete( this, tr("Delete Icon and leave file"), lnk->name() ) ) {
149 lnk->removeLinkFile();
150 if ( QFile::exists(lnk->linkFile()) ) {
151 QMessageBox::warning( this, tr("Delete"), tr("Icon deletion failed.") );
152 } else {
153 reject();
154 }
155 } 138 }
156} 139}
157 140
158void LnkProperties::setupLocations() 141void LnkProperties::setupLocations()
159{ 142{
160 QFileInfo fi( lnk->file() ); 143 QFileInfo fi( lnk->file() );
161 fileSize = fi.size(); 144 fileSize = fi.size();
162 StorageInfo storage; 145 StorageInfo storage;
@@ -164,152 +147,163 @@ void LnkProperties::setupLocations()
164 QListIterator<FileSystem> it ( fs ); 147 QListIterator<FileSystem> it ( fs );
165 QString s; 148 QString s;
166 QString homeDir = getenv("HOME"); 149 QString homeDir = getenv("HOME");
167 QString hardDiskHome; 150 QString hardDiskHome;
168 QString hardDiskPath; 151 QString hardDiskPath;
169 int index = 0; 152 int index = 0;
170 currentLocation = -1; 153 currentLocation = -1;
171 for ( ; it.current(); ++it ) { 154 for ( ; it.current(); ++it ) {
172 // we add 10k to the file size so we are sure we can also save the desktop file 155 // we add 10k to the file size so we are sure we can also save the desktop file
173 if ( (*it)->availBlocks() * (*it)->blockSize() > fileSize + 10000 ) { 156 if ( (ulong)(*it)->availBlocks() * (ulong)(*it)->blockSize() > (ulong)fileSize + 10000 ) {
174 if ( (*it)->isRemovable() || 157 if ( (*it)->isRemovable() ||
175 (*it)->disk() == "/dev/mtdblock1" || 158 (*it)->disk() == "/dev/mtdblock1" ||
176 (*it)->disk() == "/dev/mtdblock/1" || (*it)->disk().left(13) == "/dev/mtdblock" || 159 (*it)->disk() == "/dev/mtdblock/1" ||
177 (*it)->disk() == "/dev/mtdblock6" || (*it)->disk() == "tmpfs" ) { 160 (*it)->disk().left(13) == "/dev/mtdblock" ||
178 d->locationCombo->insertItem( (*it)->name(), index ); 161 (*it)->disk() == "/dev/mtdblock6" ||
179 locations.append( ((*it)->isRemovable() || (*it)->disk() == "/dev/mtdblock6" || (*it)->disk() == "tmpfs" ? (*it)->path() : homeDir) ); 162 (*it)->disk() == "tmpfs" ) {
180 if ( lnk->file().contains( (*it)->path() ) ) { 163 d->locationCombo->insertItem( (*it)->name(), index );
181 d->locationCombo->setCurrentItem( index ); 164 locations.append( ( ((*it)->isRemovable() ||
182 currentLocation = index; 165 (*it)->disk() == "/dev/mtdblock6" ||
183 } 166 (*it)->disk() == "tmpfs" )
184 index++; 167 ? (*it)->path() : homeDir) );
185 } else if ( (*it)->name().contains( tr("Hard Disk") ) && 168 if ( lnk->file().contains( (*it)->path() ) ) {
186 homeDir.contains( (*it)->path() ) && 169 d->locationCombo->setCurrentItem( index );
187 (*it)->path().length() > hardDiskHome.length() ) { 170 currentLocation = index;
188 hardDiskHome = (*it)->name(); 171 }
189 hardDiskPath = (*it)->path(); 172 index++;
190 } 173 } else if ( (*it)->name().contains( tr("Hard Disk") ) &&
191 } 174 homeDir.contains( (*it)->path() ) &&
175 (*it)->path().length() > hardDiskHome.length() ) {
176 hardDiskHome = (*it)->name();
177 hardDiskPath = (*it)->path();
178 }
179 }
192 } 180 }
193 if ( !hardDiskHome.isEmpty() ) { 181 if ( !hardDiskHome.isEmpty() ) {
194 d->locationCombo->insertItem( hardDiskHome ); 182 d->locationCombo->insertItem( hardDiskHome );
195 locations.append( hardDiskPath ); 183 locations.append( hardDiskPath );
196 if ( currentLocation == -1 ) { // assume it's the hard disk 184 if ( currentLocation == -1 ) { // assume it's the hard disk
197 d->locationCombo->setCurrentItem( index ); 185 d->locationCombo->setCurrentItem( index );
198 currentLocation = index; 186 currentLocation = index;
199 } 187 }
200 } 188 }
201} 189}
202 190
203void LnkProperties::duplicateLnk() 191void LnkProperties::duplicateLnk()
204{ 192{
205 // The duplicate takes the new properties. 193 // The duplicate takes the new properties.
206 DocLnk newdoc( *((DocLnk *)lnk) ); 194 DocLnk newdoc( *((DocLnk *)lnk) );
207 if ( d->docname->text() == lnk->name() ) 195 if ( d->docname->text() == lnk->name() )
208 newdoc.setName(tr("Copy of ")+d->docname->text()); 196 newdoc.setName(tr("Copy of ")+d->docname->text());
209 else 197 else
210 newdoc.setName(d->docname->text()); 198 newdoc.setName(d->docname->text());
211 199
212 if ( !copyFile( newdoc ) ) { 200 if ( !copyFile( newdoc ) ) {
213 QMessageBox::warning( this, tr("Duplicate"), tr("File copy failed.") ); 201 QMessageBox::warning( this, tr("Duplicate"), tr("File copy failed.") );
214 return; 202 return;
215 } 203 }
216 reject(); 204 reject();
217} 205}
218 206
219bool LnkProperties::moveLnk() 207bool LnkProperties::moveLnk()
220{ 208{
221 DocLnk newdoc( *((DocLnk *)lnk) ); 209 DocLnk newdoc( *((DocLnk *)lnk) );
222 newdoc.setName(d->docname->text()); 210 newdoc.setName(d->docname->text());
223 211
224 if ( !copyFile( newdoc ) ) { 212 if ( !copyFile( newdoc ) ) {
225 QMessageBox::warning( this, tr("Details"), tr("Moving Document failed.") ); 213 QMessageBox::warning( this, tr("Details"), tr("Moving Document failed.") );
226 return FALSE; 214 return FALSE;
227 } 215 }
228 // remove old lnk 216 // remove old lnk
229 lnk->removeFiles(); 217 lnk->removeFiles();
230 218
231 return TRUE; 219 return TRUE;
232} 220}
233 221
234void LnkProperties::beamLnk() 222void LnkProperties::beamLnk()
235{ 223{
236 Ir ir; 224 Ir ir;
237 DocLnk doc( *((DocLnk *)lnk) ); 225 DocLnk doc( *((DocLnk *)lnk) );
226 doc.setName(d->docname->text());
227 reject();
238 ir.send( doc, doc.comment() ); 228 ir.send( doc, doc.comment() );
239} 229}
240 230
241bool LnkProperties::copyFile( DocLnk &newdoc ) 231bool LnkProperties::copyFile( DocLnk &newdoc )
242{ 232{
243 const char *linkExtn = ".desktop"; 233 const char *linkExtn = ".desktop";
244 QString fileExtn; 234 QString fileExtn;
245 int extnPos = lnk->file().findRev( '.' ); 235 int extnPos = lnk->file().findRev( '.' );
246 if ( extnPos > 0 ) 236 if ( extnPos > 0 )
247 fileExtn = lnk->file().mid( extnPos ); 237 fileExtn = lnk->file().mid( extnPos );
248 238
249 QString safename = newdoc.name(); 239 QString safename = newdoc.name();
250 safename.replace(QRegExp("/"),"_"); 240 safename.replace(QRegExp("/"),"_");
251 241
252 QString fn = locations[ d->locationCombo->currentItem() ] 242 QString fn = locations[ d->locationCombo->currentItem() ]
253 + "/Documents/" + newdoc.type() + "/" + safename; 243 + "/Documents/" + newdoc.type() + "/" + safename;
254 if ( QFile::exists(fn + fileExtn) || QFile::exists(fn + linkExtn) ) { 244 if ( QFile::exists(fn + fileExtn) || QFile::exists(fn + linkExtn) ) {
255 int n=1; 245 int n=1;
256 QString nn = fn + "_" + QString::number(n); 246 QString nn = fn + "_" + QString::number(n);
257 while ( QFile::exists(nn+fileExtn) || QFile::exists(nn+linkExtn) ) { 247 while ( QFile::exists(nn+fileExtn) || QFile::exists(nn+linkExtn) ) {
258 n++; 248 n++;
259 nn = fn + "_" + QString::number(n); 249 nn = fn + "_" + QString::number(n);
260 } 250 }
261 fn = nn; 251 fn = nn;
262 } 252 }
263 newdoc.setFile( fn + fileExtn ); 253 newdoc.setFile( fn + fileExtn );
264 newdoc.setLinkFile( fn + linkExtn ); 254 newdoc.setLinkFile( fn + linkExtn );
265 255
266 // Copy file 256 // Copy file
267 FileManager fm; 257 FileManager fm;
268 if ( !fm.copyFile( *lnk, newdoc ) ) 258 if ( !fm.copyFile( *lnk, newdoc ) )
269 return FALSE; 259 return FALSE;
270 return TRUE; 260 return TRUE;
271} 261}
272 262
273void LnkProperties::done(int ok) 263void LnkProperties::done(int ok)
274{ 264{
275 if ( ok ) { 265 if ( ok ) {
276 bool changed=FALSE; 266 bool changed=FALSE;
277 if ( lnk->name() != d->docname->text() ) { 267 if ( lnk->name() != d->docname->text() ) {
278 lnk->setName(d->docname->text()); 268 lnk->setName(d->docname->text());
279 changed=TRUE; 269 changed=TRUE;
280 } 270 }
281 if ( d->categoryEdit->isVisible() ) { 271 if ( d->categoryEdit->isVisible() ) {
282 QArray<int> tmp = d->categoryEdit->newCategories(); 272 QArray<int> tmp = d->categoryEdit->newCategories();
283 if ( lnk->categories() != tmp ) { 273 if ( lnk->categories() != tmp ) {
284 lnk->setCategories( tmp ); 274 lnk->setCategories( tmp );
285 changed = TRUE; 275 changed = TRUE;
286 } 276 }
287 } 277 }
288 if ( d->preload->isHidden() && d->locationCombo->currentItem() != currentLocation ) { 278 if ( d->preload->isHidden() && d->locationCombo->currentItem() != currentLocation ) {
289 moveLnk(); 279 moveLnk();
290 } else if ( changed ) { 280 } else if ( changed ) {
291 lnk->writeLink(); 281 lnk->writeLink();
292 } 282 }
293 283
294 if ( !d->preload->isHidden() ) { 284 if ( !d->preload->isHidden() ) {
295 Config cfg("Launcher"); 285 Config cfg("Launcher");
296 cfg.setGroup("Preload"); 286 cfg.setGroup("Preload");
297 QStringList apps = cfg.readListEntry("Apps",','); 287 QStringList apps = cfg.readListEntry("Apps",',');
298 QString exe = lnk->exec(); 288 QString exe = lnk->exec();
299 if ( apps.contains(exe) != d->preload->isChecked() ) { 289 if ( apps.contains(exe) != d->preload->isChecked() ) {
300 if ( d->preload->isChecked() ) { 290 if ( d->preload->isChecked() ) {
301 apps.append(exe); 291 apps.append(exe);
302 QCopEnvelope e("QPE/Application/"+exe.local8Bit(), 292#ifndef QT_NO_COP
303 "enablePreload()"); 293 QCopEnvelope e("QPE/Application/"+exe.local8Bit(),
304 } else { 294 "enablePreload()");
305 apps.remove(exe); 295#endif
306 QCopEnvelope e("QPE/Application/"+exe.local8Bit(), 296 } else {
307 "quitIfInvisible()"); 297 apps.remove(exe);
308 } 298#ifndef QT_NO_COP
309 cfg.writeEntry("Apps",apps,','); 299 QCopEnvelope e("QPE/Application/"+exe.local8Bit(),
310 } 300 "quitIfInvisible()");
311 } 301#endif
302 }
303 cfg.writeEntry("Apps",apps,',');
304 }
305 }
312 } 306 }
313 QDialog::done( ok ); 307 QDialog::done( ok );
314} 308}
315 309
diff --git a/library/lnkproperties.h b/library/lnkproperties.h
index 38da5b2..a88fc10 100644
--- a/library/lnkproperties.h
+++ b/library/lnkproperties.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -47,17 +47,16 @@ public:
47 LnkProperties( AppLnk* lnk, QWidget* parent = 0 ); 47 LnkProperties( AppLnk* lnk, QWidget* parent = 0 );
48 ~LnkProperties(); 48 ~LnkProperties();
49#endif 49#endif
50 50
51 void done(int); 51 void done(int);
52private slots: 52private slots:
53 void beamLnk(); 53 void beamLnk();
54 void unlinkLnk(); 54 void unlinkLnk();
55 void unlinkIcon();
56 void duplicateLnk(); 55 void duplicateLnk();
57 56
58signals: 57signals:
59 void select(const AppLnk *); 58 void select(const AppLnk *);
60 59
61private: 60private:
62 void setupLocations(); 61 void setupLocations();
63 bool moveLnk(); 62 bool moveLnk();
diff --git a/library/lnkpropertiesbase_p.ui b/library/lnkpropertiesbase_p.ui
index 3d35bca..e7139e7 100644
--- a/library/lnkpropertiesbase_p.ui
+++ b/library/lnkpropertiesbase_p.ui
@@ -6,17 +6,17 @@
6 <name>name</name> 6 <name>name</name>
7 <cstring>Form1</cstring> 7 <cstring>Form1</cstring>
8 </property> 8 </property>
9 <property stdset="1"> 9 <property stdset="1">
10 <name>geometry</name> 10 <name>geometry</name>
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>297</width> 14 <width>289</width>
15 <height>449</height> 15 <height>449</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
19 <name>sizePolicy</name> 19 <name>sizePolicy</name>
20 <sizepolicy> 20 <sizepolicy>
21 <hsizetype>5</hsizetype> 21 <hsizetype>5</hsizetype>
22 <vsizetype>5</vsizetype> 22 <vsizetype>5</vsizetype>
@@ -151,16 +151,20 @@
151 </property> 151 </property>
152 <property stdset="1"> 152 <property stdset="1">
153 <name>sizePolicy</name> 153 <name>sizePolicy</name>
154 <sizepolicy> 154 <sizepolicy>
155 <hsizetype>7</hsizetype> 155 <hsizetype>7</hsizetype>
156 <vsizetype>0</vsizetype> 156 <vsizetype>0</vsizetype>
157 </sizepolicy> 157 </sizepolicy>
158 </property> 158 </property>
159 <property>
160 <name>whatsThis</name>
161 <string>The media the document resides on.</string>
162 </property>
159 </widget> 163 </widget>
160 <widget row="0" column="1" > 164 <widget row="0" column="1" >
161 <class>QLineEdit</class> 165 <class>QLineEdit</class>
162 <property stdset="1"> 166 <property stdset="1">
163 <name>name</name> 167 <name>name</name>
164 <cstring>docname</cstring> 168 <cstring>docname</cstring>
165 </property> 169 </property>
166 <property stdset="1"> 170 <property stdset="1">
@@ -169,16 +173,20 @@
169 <hsizetype>7</hsizetype> 173 <hsizetype>7</hsizetype>
170 <vsizetype>0</vsizetype> 174 <vsizetype>0</vsizetype>
171 </sizepolicy> 175 </sizepolicy>
172 </property> 176 </property>
173 <property stdset="1"> 177 <property stdset="1">
174 <name>text</name> 178 <name>text</name>
175 <string></string> 179 <string></string>
176 </property> 180 </property>
181 <property>
182 <name>whatsThis</name>
183 <string>The name of this document.</string>
184 </property>
177 </widget> 185 </widget>
178 <widget row="0" column="0" > 186 <widget row="0" column="0" >
179 <class>QLabel</class> 187 <class>QLabel</class>
180 <property stdset="1"> 188 <property stdset="1">
181 <name>name</name> 189 <name>name</name>
182 <cstring>TextLabel1</cstring> 190 <cstring>TextLabel1</cstring>
183 </property> 191 </property>
184 <property stdset="1"> 192 <property stdset="1">
@@ -251,16 +259,20 @@
251 <string>Fast load (consumes memory)</string> 259 <string>Fast load (consumes memory)</string>
252 </property> 260 </property>
253 <property> 261 <property>
254 <name>layoutMargin</name> 262 <name>layoutMargin</name>
255 </property> 263 </property>
256 <property> 264 <property>
257 <name>layoutSpacing</name> 265 <name>layoutSpacing</name>
258 </property> 266 </property>
267 <property>
268 <name>whatsThis</name>
269 <string>Preload this application so that it is available instantly.</string>
270 </property>
259 </widget> 271 </widget>
260 </grid> 272 </grid>
261 </widget> 273 </widget>
262 <widget> 274 <widget>
263 <class>Line</class> 275 <class>Line</class>
264 <property stdset="1"> 276 <property stdset="1">
265 <name>name</name> 277 <name>name</name>
266 <cstring>hline</cstring> 278 <cstring>hline</cstring>
@@ -322,48 +334,39 @@
322 <property stdset="1"> 334 <property stdset="1">
323 <name>text</name> 335 <name>text</name>
324 <string>Delete</string> 336 <string>Delete</string>
325 </property> 337 </property>
326 <property stdset="1"> 338 <property stdset="1">
327 <name>autoDefault</name> 339 <name>autoDefault</name>
328 <bool>false</bool> 340 <bool>false</bool>
329 </property> 341 </property>
330 </widget> 342 <property>
331 343 <name>whatsThis</name>
332 <widget> 344 <string>Delete this document.</string>
333 <class>QPushButton</class>
334 <property stdset="1">
335 <name>name</name>
336 <cstring>delicon</cstring>
337 </property>
338 <property stdset="1">
339 <name>text</name>
340 <string>Del Icon</string>
341 </property>
342 <property stdset="1">
343 <name>autoDefault</name>
344 <bool>false</bool>
345 </property> 345 </property>
346 </widget> 346 </widget>
347
348 <widget> 347 <widget>
349 <class>QPushButton</class> 348 <class>QPushButton</class>
350 <property stdset="1"> 349 <property stdset="1">
351 <name>name</name> 350 <name>name</name>
352 <cstring>duplicate</cstring> 351 <cstring>duplicate</cstring>
353 </property> 352 </property>
354 <property stdset="1"> 353 <property stdset="1">
355 <name>text</name> 354 <name>text</name>
356 <string>Copy</string> 355 <string>Copy</string>
357 </property> 356 </property>
358 <property stdset="1"> 357 <property stdset="1">
359 <name>autoDefault</name> 358 <name>autoDefault</name>
360 <bool>false</bool> 359 <bool>false</bool>
361 </property> 360 </property>
361 <property>
362 <name>whatsThis</name>
363 <string>Make a copy of this document.</string>
364 </property>
362 </widget> 365 </widget>
363 <widget> 366 <widget>
364 <class>QPushButton</class> 367 <class>QPushButton</class>
365 <property stdset="1"> 368 <property stdset="1">
366 <name>name</name> 369 <name>name</name>
367 <cstring>beam</cstring> 370 <cstring>beam</cstring>
368 </property> 371 </property>
369 <property stdset="1"> 372 <property stdset="1">
@@ -373,16 +376,20 @@
373 <property stdset="1"> 376 <property stdset="1">
374 <name>text</name> 377 <name>text</name>
375 <string>Beam</string> 378 <string>Beam</string>
376 </property> 379 </property>
377 <property stdset="1"> 380 <property stdset="1">
378 <name>autoDefault</name> 381 <name>autoDefault</name>
379 <bool>false</bool> 382 <bool>false</bool>
380 </property> 383 </property>
384 <property>
385 <name>whatsThis</name>
386 <string>Beam this document to another device.</string>
387 </property>
381 </widget> 388 </widget>
382 </hbox> 389 </hbox>
383 </widget> 390 </widget>
384 </vbox> 391 </vbox>
385</widget> 392</widget>
386<customwidgets> 393<customwidgets>
387 <customwidget> 394 <customwidget>
388 <class>CategoryWidget</class> 395 <class>CategoryWidget</class>
diff --git a/library/menubutton.cpp b/library/menubutton.cpp
index 6b1fa2b..f5c832c 100644
--- a/library/menubutton.cpp
+++ b/library/menubutton.cpp
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -20,48 +20,67 @@
20 20
21#include "menubutton.h" 21#include "menubutton.h"
22#include <qpopupmenu.h> 22#include <qpopupmenu.h>
23 23
24/*! 24/*!
25 \class MenuButton menubutton.h 25 \class MenuButton menubutton.h
26 \brief The MenuButton class is a pushbutton with a menu. 26 \brief The MenuButton class is a pushbutton with a menu.
27 27
28 Similar in function to a QComboBox. 28 When the user presses the menubutton's pushbutton, the menu pops up.
29 A menu is composed of menu items each of which has a string label,
30 and optionally an icon.
31
32 The index of the item that the user's input device (e.g. stylus) is
33 pointing at is the currentItem(), whose text is available using
34 currentText().
35
36 Menu items are inserted with the \link MenuButton::MenuButton()
37 constructor\endlink, insertItem() or insertItems(). Separators are
38 inserted with insertSeparator(). All the items in the menu can be
39 removed by calling clear().
40
41 Items can be selected programmatically using select(). When a menu
42 item is selected (programmatically or by the user), the selected()
43 signal is emitted.
44
45 \ingroup qtopiaemb
29*/ 46*/
30 47
31/*! 48/*!
32 \fn void MenuButton::selected(int index) 49 \overload void MenuButton::selected(int index)
33 50
34 This signal is emitted when the item at \a index is selected. 51 This signal is emitted when the item at position \a index is selected.
35*/ 52*/
36 53
37/*! 54/*!
38 \fn void MenuButton::selected(const QString& text) 55 \fn void MenuButton::selected(const QString& text)
39 56
40 This signal is emitted when the item with the given \a text is selected. 57 This signal is emitted when the item with the label \a text is selected.
41*/ 58*/
42 59
43 60
44/*! 61/*!
45 Constructs a MenuButton with the given \a items added (see insertItems()). 62 Constructs a MenuButton. A menu item is created (see insertItem()
46 The standard \a parent an \a name arguments are passed to the base class. 63 and insertItems()) for each string in the \a items string list. The
64 standard \a parent an \a name arguments are passed to the base
65 class.
47*/ 66*/
48MenuButton::MenuButton( const QStringList& items, QWidget* parent, const char* name) : 67MenuButton::MenuButton( const QStringList& items, QWidget* parent, const char* name) :
49 QPushButton(parent,name) 68 QPushButton(parent,name)
50{ 69{
51 init(); 70 init();
52 insertItems(items); 71 insertItems(items);
53} 72}
54 73
55/*! 74/*!
56 Constructs an empty MenuButton. 75 Constructs an empty MenuButton.
57 The standard \a parent an \a name arguments are passed to the base class. 76 The standard \a parent an \a name arguments are passed to the base class.
58 77
59 \sa insertItems() 78 \sa insertItem() insertItems()
60*/ 79*/
61MenuButton::MenuButton( QWidget* parent, const char* name) : 80MenuButton::MenuButton( QWidget* parent, const char* name) :
62 QPushButton(parent,name) 81 QPushButton(parent,name)
63{ 82{
64 init(); 83 init();
65} 84}
66 85
67void MenuButton::init() 86void MenuButton::init()
@@ -70,109 +89,119 @@ void MenuButton::init()
70 pop = new QPopupMenu(this); 89 pop = new QPopupMenu(this);
71 nitems=0; 90 nitems=0;
72 connect(pop, SIGNAL(activated(int)), this, SLOT(select(int))); 91 connect(pop, SIGNAL(activated(int)), this, SLOT(select(int)));
73 setPopup(pop); 92 setPopup(pop);
74 //setPopupDelay(0); 93 //setPopupDelay(0);
75} 94}
76 95
77/*! 96/*!
78 Removes all items from the button and menu. 97 Removes all the menu items from the button and menu.
79*/ 98*/
80void MenuButton::clear() 99void MenuButton::clear()
81{ 100{
82 delete pop; 101 delete pop;
83 init(); 102 init();
84} 103}
85 104
86/*! 105/*!
87 Inserts string \a items into the menu. The string "--" represents 106 A menu item is created (see insertItem()) for each string in the \a
88 a separator. 107 items string list. If any string is "--" a separator (see
108 insertSeparator()) is inserted in its place.
89*/ 109*/
90void MenuButton::insertItems( const QStringList& items ) 110void MenuButton::insertItems( const QStringList& items )
91{ 111{
92 QStringList::ConstIterator it=items.begin(); 112 QStringList::ConstIterator it=items.begin();
93 for (; it!=items.end(); ++it) { 113 for (; it!=items.end(); ++it) {
94 if ( (*it) == "--" ) 114 if ( (*it) == "--" )
95 insertSeparator(); 115 insertSeparator();
96 else 116 else
97 insertItem(*it); 117 insertItem(*it);
98 } 118 }
99} 119}
100 120
101/*! 121/*!
102 Inserts an \a icon and \a text into the menu. 122 Inserts a menu item with the icon \a icon and label \a text into
123 the menu.
124
125 \sa insertItems()
103*/ 126*/
104void MenuButton::insertItem( const QIconSet& icon, const QString& text ) 127void MenuButton::insertItem( const QIconSet& icon, const QString& text=QString::null )
105{ 128{
106 pop->insertItem(icon, text, nitems++); 129 pop->insertItem(icon, text, nitems++);
107 if ( nitems==1 ) select(0); 130 if ( nitems==1 ) select(0);
108} 131}
109 132
110/*! 133/*!
111 Inserts \a text into the menu. 134 \overload
135 Inserts a menu item with the label \a text into the menu.
136
137 \sa insertItems()
112*/ 138*/
113void MenuButton::insertItem( const QString& text ) 139void MenuButton::insertItem( const QString& text )
114{ 140{
115 pop->insertItem(text, nitems++); 141 pop->insertItem(text, nitems++);
116 if ( nitems==1 ) select(0); 142 if ( nitems==1 ) select(0);
117} 143}
118 144
119/*! 145/*!
120 Inserts a visual separator into the menu. 146 Inserts a separator into the menu.
147
148 \sa insertItems()
121*/ 149*/
122void MenuButton::insertSeparator() 150void MenuButton::insertSeparator()
123{ 151{
124 pop->insertSeparator(); 152 pop->insertSeparator();
125} 153}
126 154
127/*! 155/*!
128 Selects the items with text \a s. 156 Selects the items with label text \a s.
129*/ 157*/
130void MenuButton::select(const QString& s) 158void MenuButton::select(const QString& s)
131{ 159{
132 for (int i=0; i<nitems; i++) { 160 for (int i=0; i<nitems; i++) {
133 if ( pop->text(i) == s ) { 161 if ( pop->text(i) == s ) {
134 select(i); 162 select(i);
135 break; 163 break;
136 } 164 }
137 } 165 }
138} 166}
139 167
140/*! 168/*!
141 Selects the item at index \a s. 169 \overload
170 Selects the item at index position \a s.
142*/ 171*/
143void MenuButton::select(int s) 172void MenuButton::select(int s)
144{ 173{
145 cur = s; 174 cur = s;
146 updateLabel(); 175 updateLabel();
147 if ( pop->iconSet(cur) ) 176 if ( pop->iconSet(cur) )
148 setIconSet(*pop->iconSet(cur)); 177 setIconSet(*pop->iconSet(cur));
149 emit selected(cur); 178 emit selected(cur);
150 emit selected(currentText()); 179 emit selected(currentText());
151} 180}
152 181
153/*! 182/*!
154 Returns the index of the current item. 183 Returns the index position of the current item.
155*/ 184*/
156int MenuButton::currentItem() const 185int MenuButton::currentItem() const
157{ 186{
158 return cur; 187 return cur;
159} 188}
160 189
161/*! 190/*!
162 Returns the text of the current item. 191 Returns the label text of the current item.
163*/ 192*/
164QString MenuButton::currentText() const 193QString MenuButton::currentText() const
165{ 194{
166 return pop->text(cur); 195 return pop->text(cur);
167} 196}
168 197
169/*! 198/*!
170 Sets the label. If \a label is empty, the 199 Sets the menubutton's label. If \a label is empty, the
171 current item text is displayed, otherwise \a label should contain 200 current item text is displayed, otherwise \a label should contain
172 "%1", which will be replaced by the current item text. 201 "%1", which will be replaced by the current item text.
173*/ 202*/
174void MenuButton::setLabel(const QString& label) 203void MenuButton::setLabel(const QString& label)
175{ 204{
176 lab = label; 205 lab = label;
177 updateLabel(); 206 updateLabel();
178} 207}
diff --git a/library/menubutton.h b/library/menubutton.h
index e9c91b7..6582b1e 100644
--- a/library/menubutton.h
+++ b/library/menubutton.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/library/mimetype.cpp b/library/mimetype.cpp
index 9fab160..e2e0dab 100644
--- a/library/mimetype.cpp
+++ b/library/mimetype.cpp
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -18,61 +18,119 @@
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#define QTOPIA_INTERNAL_MIMEEXT 21#define QTOPIA_INTERNAL_MIMEEXT
22#include "mimetype.h" 22#include "mimetype.h"
23#include "applnk.h" 23#include "applnk.h"
24#include "resource.h" 24#include "resource.h"
25#include "qpeapplication.h" 25#include "qpeapplication.h"
26#include "config.h"
27
26#include <qfile.h> 28#include <qfile.h>
27#include <qdict.h> 29#include <qdict.h>
28#include <qregexp.h> 30#include <qregexp.h>
29#include <qstringlist.h> 31#include <qstringlist.h>
30#include <qtextstream.h> 32#include <qtextstream.h>
31#include <qmap.h> 33#include <qmap.h>
32 34
35
36static void cleanupMime()
37{
38 MimeType::clear();
39}
40
33class MimeTypeData { 41class MimeTypeData {
34public: 42public:
35 MimeTypeData(const QString& i, const AppLnk& lnk, const QString& icon ) : 43 MimeTypeData(const QString& i) :
36 id(i), 44 id(i)
37 desc(lnk.name()+" document"),
38 app(lnk)
39 { 45 {
40 if ( icon.isEmpty() ) { 46 apps.setAutoDelete(TRUE);
41 regIcon = lnk.pixmap();
42 bigIcon = lnk.bigPixmap();
43 } else {
44 QImage unscaledIcon = Resource::loadImage( icon );
45 regIcon.convertFromImage( unscaledIcon.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
46 bigIcon.convertFromImage( unscaledIcon.smoothScale( AppLnk::bigIconSize(), AppLnk::bigIconSize() ) );
47 }
48 } 47 }
49 QString id; 48 QString id;
50 QString extension; 49 QString extension;
50 QList<AppLnk> apps;
51
52 QString description()
53 {
54 if ( desc.isEmpty() )
55 desc = QPEApplication::tr("%1 document").arg(apps.first()->name());
56 return desc;
57 }
58
59 QPixmap regIcon()
60 {
61 if ( regicon.isNull() )
62 loadPixmaps();
63 return regicon;
64 }
65
66 QPixmap bigIcon()
67 {
68 if ( bigicon.isNull() )
69 loadPixmaps();
70 return bigicon;
71 }
72
73private:
74 void loadPixmaps()
75 {
76 if ( apps.count() ) {
77 QString icon;
78 for (AppLnk* lnk = apps.first(); icon.isNull() && lnk; lnk=apps.next()) {
79 QStringList icons = lnk->mimeTypeIcons();
80 if ( icons.count() ) {
81 QStringList types = lnk->mimeTypes();
82 for (QStringList::ConstIterator t=types.begin(),i=icons.begin(); t!=types.end() && i!=icons.end(); ++i,++t) {
83 if ( *t == id ) {
84 icon = *i;
85 break;
86 }
87 }
88 }
89 }
90 if ( icon.isNull() ) {
91 AppLnk* lnk = apps.first();
92 regicon = lnk->pixmap();
93 bigicon = lnk->bigPixmap();
94 } else {
95 QImage unscaledIcon = Resource::loadImage( icon );
96 regicon.convertFromImage( unscaledIcon.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
97 bigicon.convertFromImage( unscaledIcon.smoothScale( AppLnk::bigIconSize(), AppLnk::bigIconSize() ) );
98 }
99 }
100 }
101
102 QPixmap regicon;
103 QPixmap bigicon;
51 QString desc; 104 QString desc;
52 QPixmap regIcon;
53 QPixmap bigIcon;
54 AppLnk app;
55}; 105};
56 106
57class MimeType::Dict : public QDict<MimeTypeData> { 107class MimeType::Private : public QDict<MimeTypeData> {
58public: 108public:
59 Dict() {} 109 Private() {}
110 ~Private() {}
111
112 // ...
60}; 113};
61 114
62MimeType::Dict* MimeType::d=0; 115MimeType::Private* MimeType::d=0;
63static QMap<QString,QString> *typeFor = 0; 116static QMap<QString,QString> *typeFor = 0;
64static QMap<QString,QString> *extFor = 0; 117static QMap<QString,QStringList> *extFor = 0;
65 118
66MimeType::Dict& MimeType::dict() 119MimeType::Private& MimeType::data()
67{ 120{
68 if ( !d ) { 121 if ( !d ) {
69 d = new Dict; 122 d = new Private;
70 d->setAutoDelete(TRUE); 123 d->setAutoDelete(TRUE);
124 static bool setCleanup = FALSE;
125 if ( !setCleanup ) {
126 qAddPostRoutine( cleanupMime );
127 setCleanup = TRUE;
128 }
71 } 129 }
72 return *d; 130 return *d;
73} 131}
74 132
75MimeType::MimeType( const QString& ext_or_id ) 133MimeType::MimeType( const QString& ext_or_id )
76{ 134{
77 init(ext_or_id); 135 init(ext_or_id);
78} 136}
@@ -85,64 +143,91 @@ MimeType::MimeType( const DocLnk& lnk )
85QString MimeType::id() const 143QString MimeType::id() const
86{ 144{
87 return i; 145 return i;
88} 146}
89 147
90QString MimeType::description() const 148QString MimeType::description() const
91{ 149{
92 MimeTypeData* d = data(i); 150 MimeTypeData* d = data(i);
93 return d ? d->desc : QString::null; 151 return d ? d->description() : QString::null;
94} 152}
95 153
96QPixmap MimeType::pixmap() const 154QPixmap MimeType::pixmap() const
97{ 155{
98 MimeTypeData* d = data(i); 156 MimeTypeData* d = data(i);
99 return d ? d->regIcon : QPixmap(); 157 return d ? d->regIcon() : QPixmap();
100} 158}
101 159
102QString MimeType::extension() const 160QString MimeType::extension() const
103{ 161{
162 return extensions().first();
163}
164
165QStringList MimeType::extensions() const
166{
104 loadExtensions(); 167 loadExtensions();
105 return *(*extFor).find(i); 168 return *(*extFor).find(i);
106} 169}
107 170
108QPixmap MimeType::bigPixmap() const 171QPixmap MimeType::bigPixmap() const
109{ 172{
110 MimeTypeData* d = data(i); 173 MimeTypeData* d = data(i);
111 return d ? d->bigIcon : QPixmap(); 174 return d ? d->bigIcon() : QPixmap();
112} 175}
113 176
114const AppLnk* MimeType::application() const 177const AppLnk* MimeType::application() const
115{ 178{
116 MimeTypeData* d = data(i); 179 MimeTypeData* d = data(i);
117 return d ? &d->app : 0; 180 return d ? d->apps.first() : 0;
181}
182
183static QString serviceBinding(const QString& service)
184{
185 // Copied from qtopiaservices
186 QString svrc = service;
187 for (int i=0; i<(int)svrc.length(); i++)
188 if ( svrc[i]=='/' ) svrc[i] = '-';
189 return "Service-"+svrc;
118} 190}
119 191
120void MimeType::registerApp( const AppLnk& lnk ) 192void MimeType::registerApp( const AppLnk& lnk )
121{ 193{
122 QStringList list = lnk.mimeTypes(); 194 QStringList list = lnk.mimeTypes();
123 QStringList icons = lnk.mimeTypeIcons(); 195 for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
124 QStringList::ConstIterator icon = icons.begin(); 196 MimeTypeData* cur = data()[*it];
125 for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it, ++icon) { 197 AppLnk* l = new AppLnk(lnk);
126 MimeTypeData *item = new MimeTypeData( *it, lnk, *icon ); 198 if ( !cur ) {
127 dict().replace( *it, item ); 199 cur = new MimeTypeData( *it );
200 data().insert( *it, cur );
201 cur->apps.append(l);
202 } else if ( cur->apps.count() ) {
203 Config binding(serviceBinding("Open/"+*it));
204 binding.setGroup("Service");
205 QString def = binding.readEntry("default");
206 if ( l->exec() == def )
207 cur->apps.prepend(l);
208 else
209 cur->apps.append(l);
210 } else {
211 cur->apps.append(l);
212 }
128 } 213 }
129} 214}
130 215
131void MimeType::clear() 216void MimeType::clear()
132{ 217{
133 delete d; 218 delete d;
134 d = 0; 219 d = 0;
135} 220}
136 221
137void MimeType::loadExtensions() 222void MimeType::loadExtensions()
138{ 223{
139 if ( !typeFor ) { 224 if ( !typeFor ) {
140 extFor = new QMap<QString,QString>; 225 extFor = new QMap<QString,QStringList>;
141 typeFor = new QMap<QString,QString>; 226 typeFor = new QMap<QString,QString>;
142 loadExtensions("/etc/mime.types"); 227 loadExtensions("/etc/mime.types");
143 loadExtensions(QPEApplication::qpeDir()+"etc/mime.types"); 228 loadExtensions(QPEApplication::qpeDir()+"etc/mime.types");
144 } 229 }
145} 230}
146 231
147void MimeType::loadExtensions(const QString& filename) 232void MimeType::loadExtensions(const QString& filename)
148{ 233{
@@ -150,23 +235,29 @@ void MimeType::loadExtensions(const QString& filename)
150 if ( file.open(IO_ReadOnly) ) { 235 if ( file.open(IO_ReadOnly) ) {
151 QTextStream in(&file); 236 QTextStream in(&file);
152 QRegExp space("[ \t]+"); 237 QRegExp space("[ \t]+");
153 while (!in.atEnd()) { 238 while (!in.atEnd()) {
154 QStringList tokens = QStringList::split(space, in.readLine()); 239 QStringList tokens = QStringList::split(space, in.readLine());
155 QStringList::ConstIterator it = tokens.begin(); 240 QStringList::ConstIterator it = tokens.begin();
156 if ( it != tokens.end() ) { 241 if ( it != tokens.end() ) {
157 QString id = *it; ++it; 242 QString id = *it; ++it;
243 // new override old (though left overrides right)
244 QStringList exts = (*extFor)[id];
245 QStringList newexts;
158 if ( it != tokens.end() ) { 246 if ( it != tokens.end() ) {
159 (*extFor)[id] = *it; 247 exts.remove(*it);
248 if ( !newexts.contains(*it) )
249 newexts.append(*it);
160 while (it != tokens.end()) { 250 while (it != tokens.end()) {
161 (*typeFor)[*it] = id; 251 (*typeFor)[*it] = id;
162 ++it; 252 ++it;
163 } 253 }
164 } 254 }
255 (*extFor)[id] = newexts + exts;
165 } 256 }
166 } 257 }
167 } 258 }
168} 259}
169 260
170void MimeType::init( const QString& ext_or_id ) 261void MimeType::init( const QString& ext_or_id )
171{ 262{
172 if ( ext_or_id[0] != '/' && ext_or_id.contains('/') ) { 263 if ( ext_or_id[0] != '/' && ext_or_id.contains('/') ) {
@@ -183,21 +274,21 @@ void MimeType::init( const QString& ext_or_id )
183 if ( !appsUpdated ) { 274 if ( !appsUpdated ) {
184 appsUpdated = TRUE; 275 appsUpdated = TRUE;
185 updateApplications(); 276 updateApplications();
186 } 277 }
187} 278}
188 279
189MimeTypeData* MimeType::data(const QString& id) 280MimeTypeData* MimeType::data(const QString& id)
190{ 281{
191 MimeTypeData* d = dict()[id]; 282 MimeTypeData* d = data()[id];
192 if ( !d ) { 283 if ( !d ) {
193 int s = id.find('/'); 284 int s = id.find('/');
194 QString idw = id.left(s)+"/*"; 285 QString idw = id.left(s)+"/*";
195 d = dict()[idw]; 286 d = data()[idw];
196 } 287 }
197 return d; 288 return d;
198} 289}
199 290
200QString MimeType::appsFolderName() 291QString MimeType::appsFolderName()
201{ 292{
202 return QPEApplication::qpeDir() + "apps"; 293 return QPEApplication::qpeDir() + "apps";
203} 294}
diff --git a/library/mimetype.h b/library/mimetype.h
index b6cca95..94bfe4e 100644
--- a/library/mimetype.h
+++ b/library/mimetype.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -15,18 +15,19 @@
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#ifndef MIMETYPE_H 20#ifndef MIMETYPE_H
21#define MIMETYPE_H 21#define MIMETYPE_H
22 22
23#include <qstring.h> 23#include <qstringlist.h>
24#include <qpixmap.h> 24#include <qpixmap.h>
25#include <qlist.h>
25 26
26class AppLnk; 27class AppLnk;
27class DocLnk; 28class DocLnk;
28class QStringList; 29class QStringList;
29class MimeTypeData; 30class MimeTypeData;
30class AppLnkSet; 31class AppLnkSet;
31 32
32class MimeType 33class MimeType
@@ -38,32 +39,34 @@ public:
38 QString id() const; 39 QString id() const;
39 QString description() const; 40 QString description() const;
40 QPixmap pixmap() const; 41 QPixmap pixmap() const;
41 QPixmap bigPixmap() const; 42 QPixmap bigPixmap() const;
42 43
43// DON'T define this yourself! 44// DON'T define this yourself!
44#ifdef QTOPIA_INTERNAL_MIMEEXT 45#ifdef QTOPIA_INTERNAL_MIMEEXT
45 QString extension() const; 46 QString extension() const;
47 QStringList extensions() const;
48 QList<AppLnk> applications() const;
46#endif 49#endif
47 50
48 const AppLnk* application() const; 51 const AppLnk* application() const;
49 52
50 static QString appsFolderName(); 53 static QString appsFolderName();
51 static void updateApplications(); 54 static void updateApplications();
52 55
53 // These shouldn't be needed 56 // These shouldn't be needed
54 static void clear(); 57 static void clear();
55 static void registerApp( const AppLnk& ); 58 static void registerApp( const AppLnk& );
56 59
57private: 60private:
58 static void updateApplications(AppLnkSet* folder); 61 static void updateApplications(AppLnkSet* folder);
59 static void loadExtensions(); 62 static void loadExtensions();
60 static void loadExtensions(const QString&); 63 static void loadExtensions(const QString&);
61 void init( const QString& ext_or_id ); 64 void init( const QString& ext_or_id );
62 class Dict; 65 class Private;
63 static Dict* d; 66 static Private* d;
64 static Dict& dict(); 67 static Private& data();
65 static MimeTypeData* data(const QString& id); 68 static MimeTypeData* data(const QString& id);
66 QString i; 69 QString i;
67}; 70};
68 71
69#endif 72#endif
diff --git a/library/network.cpp b/library/network.cpp
index e6d2781..185b147 100644
--- a/library/network.cpp
+++ b/library/network.cpp
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -20,27 +20,30 @@
20 20
21#define QTOPIA_INTERNAL_LANGLIST 21#define QTOPIA_INTERNAL_LANGLIST
22#include "qpe/network.h" 22#include "qpe/network.h"
23#include "qpe/networkinterface.h" 23#include "qpe/networkinterface.h"
24#include "qpe/global.h" 24#include "qpe/global.h"
25#include "qpe/config.h" 25#include "qpe/config.h"
26#include "qpe/resource.h" 26#include "qpe/resource.h"
27#include "qpe/qpeapplication.h" 27#include "qpe/qpeapplication.h"
28#ifdef QWS
28#include <qpe/qcopenvelope_qws.h> 29#include <qpe/qcopenvelope_qws.h>
30#endif
29#include <qpe/qlibrary.h> 31#include <qpe/qlibrary.h>
30 32
31#include <qlistbox.h> 33#include <qlistbox.h>
32#include <qdir.h> 34#include <qdir.h>
33#include <qlayout.h> 35#include <qlayout.h>
34#include <qdict.h> 36#include <qdict.h>
35#include <qtranslator.h> 37#include <qtranslator.h>
36 38
37#include <stdlib.h> 39#include <stdlib.h>
38 40
41#ifndef QT_NO_COP
39class NetworkEmitter : public QCopChannel { 42class NetworkEmitter : public QCopChannel {
40 Q_OBJECT 43 Q_OBJECT
41public: 44public:
42 NetworkEmitter() : QCopChannel("QPE/Network",qApp) 45 NetworkEmitter() : QCopChannel("QPE/Network",qApp)
43 { 46 {
44 } 47 }
45 48
46 void receive(const QCString &msg, const QByteArray&) 49 void receive(const QCString &msg, const QByteArray&)
@@ -63,16 +66,17 @@ void Network::start(const QString& choice, const QString& password)
63{ 66{
64 QCopEnvelope e("QPE/Network", "start(QString,QString)"); 67 QCopEnvelope e("QPE/Network", "start(QString,QString)");
65 e << choice << password; 68 e << choice << password;
66} 69}
67 70
68/*! 71/*!
69 \class Network network.h 72 \class Network network.h
70 \brief The Network class provides network access functionality. 73 \brief The Network class provides network access functionality.
74 \internal
71*/ 75*/
72 76
73// copy the proxy settings of the active config over to the Proxies.conf file 77// copy the proxy settings of the active config over to the Proxies.conf file
74/*! 78/*!
75 \internal 79 \internal
76*/ 80*/
77void Network::writeProxySettings( Config &cfg ) 81void Network::writeProxySettings( Config &cfg )
78{ 82{
@@ -108,38 +112,40 @@ static NetworkEmitter *emitter = 0;
108*/ 112*/
109void Network::connectChoiceChange(QObject* receiver, const char* slot) 113void Network::connectChoiceChange(QObject* receiver, const char* slot)
110{ 114{
111 if ( !emitter ) 115 if ( !emitter )
112 emitter = new NetworkEmitter; 116 emitter = new NetworkEmitter;
113 QObject::connect(emitter,SIGNAL(changed()),receiver,slot); 117 QObject::connect(emitter,SIGNAL(changed()),receiver,slot);
114} 118}
115 119
120 #endif// QT_NO_COP
116/*! 121/*!
117 \internal 122 \internal
118*/ 123*/
119QString Network::settingsDir() 124QString Network::settingsDir()
120{ 125{
121 return Global::applicationFileName("Network", "modules"); 126 return Global::applicationFileName("Network", "modules");
122} 127}
123 128
129#ifndef QT_NO_COP
124/*! 130/*!
125 \internal 131 \internal
126*/ 132*/
127QStringList Network::choices(QListBox* lb, const QString& dir) 133QStringList Network::choices(QListBox* lb, const QString& dir)
128{ 134{
129 QStringList list; 135 QStringList list;
130 136
131 if ( lb ) 137 if ( lb )
132 lb->clear(); 138 lb->clear();
133 139
134 QString adir = dir.isEmpty() ? settingsDir() : dir; 140 QString adir = dir.isEmpty() ? settingsDir() : dir;
135 QDir settingsdir(adir); 141 QDir settingsdir(adir);
136 settingsdir.mkdir(adir); 142 settingsdir.mkdir(adir);
137 143
138 QStringList files = settingsdir.entryList("*.conf"); 144 QStringList files = settingsdir.entryList("*.conf");
139 for (QStringList::ConstIterator it=files.begin(); it!=files.end(); ++it ) { 145 for (QStringList::ConstIterator it=files.begin(); it!=files.end(); ++it ) {
140 QString filename = settingsdir.filePath(*it); 146 QString filename = settingsdir.filePath(*it);
141 Config cfg(filename, Config::File); 147 Config cfg(filename, Config::File);
142 cfg.setGroup("Info"); 148 cfg.setGroup("Info");
143 if ( lb ) 149 if ( lb )
144 lb->insertItem(Resource::loadPixmap("Network/" + cfg.readEntry("Type")), 150 lb->insertItem(Resource::loadPixmap("Network/" + cfg.readEntry("Type")),
145 cfg.readEntry("Name")); 151 cfg.readEntry("Name"));
@@ -147,17 +153,17 @@ QStringList Network::choices(QListBox* lb, const QString& dir)
147 } 153 }
148 154
149 return list; 155 return list;
150} 156}
151 157
152class NetworkServer : public QCopChannel { 158class NetworkServer : public QCopChannel {
153 Q_OBJECT 159 Q_OBJECT
154public: 160public:
155 NetworkServer(QObject* parent) : QCopChannel("QPE/Network",parent) 161 NetworkServer(QObject* parent) : QCopChannel("QPE/Network",parent), wait(0)
156 { 162 {
157 up = FALSE; 163 up = FALSE;
158 examineNetworks( TRUE ); 164 examineNetworks( TRUE );
159 QCopChannel* card = new QCopChannel("QPE/Card",parent); 165 QCopChannel* card = new QCopChannel("QPE/Card",parent);
160 connect(card,SIGNAL(received(const QCString &, const QByteArray&)), 166 connect(card,SIGNAL(received(const QCString &, const QByteArray&)),
161 this,SLOT(cardMessage(const QCString &, const QByteArray&))); 167 this,SLOT(cardMessage(const QCString &, const QByteArray&)));
162 } 168 }
163 169
@@ -432,8 +438,9 @@ NetworkInterface* Network::loadPlugin(const QString& type)
432 } 438 }
433 return iface; 439 return iface;
434#else 440#else
435 return 0; 441 return 0;
436#endif 442#endif
437} 443}
438 444
439#include "network.moc" 445#include "network.moc"
446 #endif// QT_NO_COP
diff --git a/library/network.h b/library/network.h
index cee67af..33699a2 100644
--- a/library/network.h
+++ b/library/network.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/library/networkinterface.cpp b/library/networkinterface.cpp
index 56a0e5b..2b5c77e 100644
--- a/library/networkinterface.cpp
+++ b/library/networkinterface.cpp
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -40,17 +40,19 @@ bool NetworkInterface::isActive( Config& cfg ) const
40 if ( f ) { 40 if ( f ) {
41 char line[1024]; 41 char line[1024];
42 char devname[80]; 42 char devname[80];
43 while ( fgets( line, 1024, f ) ) { 43 while ( fgets( line, 1024, f ) ) {
44 if ( sscanf(line," %[^:]:", devname)==1 ) 44 if ( sscanf(line," %[^:]:", devname)==1 )
45 { 45 {
46 if ( devname == dev || devname == dev0 ) { 46 if ( devname == dev || devname == dev0 ) {
47 fclose(f); 47 fclose(f);
48#ifdef QWS
48 Network::writeProxySettings( cfg ); 49 Network::writeProxySettings( cfg );
50#endif
49 return TRUE; 51 return TRUE;
50 } 52 }
51 } 53 }
52 } 54 }
53 fclose(f); 55 fclose(f);
54 } 56 }
55 return FALSE; 57 return FALSE;
56} 58}
diff --git a/library/networkinterface.h b/library/networkinterface.h
index d2ca5ab..bda2119 100644
--- a/library/networkinterface.h
+++ b/library/networkinterface.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/library/password.cpp b/library/password.cpp
index 3be6efe..41b3358 100644
--- a/library/password.cpp
+++ b/library/password.cpp
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -22,17 +22,19 @@
22#include "global.h" 22#include "global.h"
23#include "backend/contact.h" 23#include "backend/contact.h"
24#include <qlabel.h> 24#include <qlabel.h>
25#include <qlineedit.h> 25#include <qlineedit.h>
26#include <qtextview.h> 26#include <qtextview.h>
27#include <qstring.h> 27#include <qstring.h>
28#include <qapplication.h> 28#include <qapplication.h>
29#include <qfile.h> 29#include <qfile.h>
30#ifdef QWS
30#include <qwindowsystem_qws.h> 31#include <qwindowsystem_qws.h>
32#endif
31 33
32#include <qdialog.h> 34#include <qdialog.h>
33 35
34#include <unistd.h> //for sleep 36#include <unistd.h> //for sleep
35#include "passwordbase_p.h" 37#include "passwordbase_p.h"
36 38
37class PasswordDialog : public PasswordBase 39class PasswordDialog : public PasswordBase
38{ 40{
@@ -67,16 +69,26 @@ static QString qcrypt(const QString& k, const char *salt)
67 69
68/* 70/*
69 * Constructs a PasswordDialog which is a child of 'parent', with the 71 * Constructs a PasswordDialog which is a child of 'parent', with the
70 * name 'name' and widget flags set to 'f' 72 * name 'name' and widget flags set to 'f'
71 */ 73 */
72PasswordDialog::PasswordDialog( QWidget* parent, const char* name, WFlags fl ) 74PasswordDialog::PasswordDialog( QWidget* parent, const char* name, WFlags fl )
73 : PasswordBase( parent, name, fl ) 75 : PasswordBase( parent, name, fl )
74{ 76{
77 QRect desk = qApp->desktop()->geometry();
78
79 if ( desk.width() < 220 ) {
80 QFont f( font() );
81 f.setPointSize( 18 );
82 setFont( f );
83 f.setPointSize( 12 );
84 prompt->setFont( f );
85 }
86
75 button_0->installEventFilter( this ); 87 button_0->installEventFilter( this );
76 button_1->installEventFilter( this ); 88 button_1->installEventFilter( this );
77 button_2->installEventFilter( this ); 89 button_2->installEventFilter( this );
78 button_3->installEventFilter( this ); 90 button_3->installEventFilter( this );
79 button_4->installEventFilter( this ); 91 button_4->installEventFilter( this );
80 button_5->installEventFilter( this ); 92 button_5->installEventFilter( this );
81 button_6->installEventFilter( this ); 93 button_6->installEventFilter( this );
82 button_7->installEventFilter( this ); 94 button_7->installEventFilter( this );
diff --git a/library/password.h b/library/password.h
index 30a5377..a3a3e45 100644
--- a/library/password.h
+++ b/library/password.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/library/passwordbase_p.ui b/library/passwordbase_p.ui
index e79777b..a5eed87 100644
--- a/library/passwordbase_p.ui
+++ b/library/passwordbase_p.ui
@@ -6,18 +6,18 @@
6 <name>name</name> 6 <name>name</name>
7 <cstring>PasswordBase</cstring> 7 <cstring>PasswordBase</cstring>
8 </property> 8 </property>
9 <property stdset="1"> 9 <property stdset="1">
10 <name>geometry</name> 10 <name>geometry</name>
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>251</width> 14 <width>243</width>
15 <height>443</height> 15 <height>293</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
19 <name>font</name> 19 <name>font</name>
20 <font> 20 <font>
21 <pointsize>24</pointsize> 21 <pointsize>24</pointsize>
22 </font> 22 </font>
23 </property> 23 </property>
@@ -36,16 +36,23 @@
36 </property> 36 </property>
37 <widget row="2" column="0" > 37 <widget row="2" column="0" >
38 <class>QLabel</class> 38 <class>QLabel</class>
39 <property stdset="1"> 39 <property stdset="1">
40 <name>name</name> 40 <name>name</name>
41 <cstring>button_1</cstring> 41 <cstring>button_1</cstring>
42 </property> 42 </property>
43 <property stdset="1"> 43 <property stdset="1">
44 <name>sizePolicy</name>
45 <sizepolicy>
46 <hsizetype>5</hsizetype>
47 <vsizetype>5</vsizetype>
48 </sizepolicy>
49 </property>
50 <property stdset="1">
44 <name>frameShape</name> 51 <name>frameShape</name>
45 <enum>Box</enum> 52 <enum>Box</enum>
46 </property> 53 </property>
47 <property stdset="1"> 54 <property stdset="1">
48 <name>frameShadow</name> 55 <name>frameShadow</name>
49 <enum>Raised</enum> 56 <enum>Raised</enum>
50 </property> 57 </property>
51 <property stdset="1"> 58 <property stdset="1">
@@ -62,16 +69,23 @@
62 </widget> 69 </widget>
63 <widget row="2" column="1" > 70 <widget row="2" column="1" >
64 <class>QLabel</class> 71 <class>QLabel</class>
65 <property stdset="1"> 72 <property stdset="1">
66 <name>name</name> 73 <name>name</name>
67 <cstring>button_2</cstring> 74 <cstring>button_2</cstring>
68 </property> 75 </property>
69 <property stdset="1"> 76 <property stdset="1">
77 <name>sizePolicy</name>
78 <sizepolicy>
79 <hsizetype>5</hsizetype>
80 <vsizetype>5</vsizetype>
81 </sizepolicy>
82 </property>
83 <property stdset="1">
70 <name>frameShape</name> 84 <name>frameShape</name>
71 <enum>Box</enum> 85 <enum>Box</enum>
72 </property> 86 </property>
73 <property stdset="1"> 87 <property stdset="1">
74 <name>frameShadow</name> 88 <name>frameShadow</name>
75 <enum>Raised</enum> 89 <enum>Raised</enum>
76 </property> 90 </property>
77 <property stdset="1"> 91 <property stdset="1">
@@ -88,16 +102,23 @@
88 </widget> 102 </widget>
89 <widget row="2" column="2" > 103 <widget row="2" column="2" >
90 <class>QLabel</class> 104 <class>QLabel</class>
91 <property stdset="1"> 105 <property stdset="1">
92 <name>name</name> 106 <name>name</name>
93 <cstring>button_3</cstring> 107 <cstring>button_3</cstring>
94 </property> 108 </property>
95 <property stdset="1"> 109 <property stdset="1">
110 <name>sizePolicy</name>
111 <sizepolicy>
112 <hsizetype>5</hsizetype>
113 <vsizetype>5</vsizetype>
114 </sizepolicy>
115 </property>
116 <property stdset="1">
96 <name>frameShape</name> 117 <name>frameShape</name>
97 <enum>Box</enum> 118 <enum>Box</enum>
98 </property> 119 </property>
99 <property stdset="1"> 120 <property stdset="1">
100 <name>frameShadow</name> 121 <name>frameShadow</name>
101 <enum>Raised</enum> 122 <enum>Raised</enum>
102 </property> 123 </property>
103 <property stdset="1"> 124 <property stdset="1">
@@ -114,16 +135,23 @@
114 </widget> 135 </widget>
115 <widget row="3" column="0" > 136 <widget row="3" column="0" >
116 <class>QLabel</class> 137 <class>QLabel</class>
117 <property stdset="1"> 138 <property stdset="1">
118 <name>name</name> 139 <name>name</name>
119 <cstring>button_4</cstring> 140 <cstring>button_4</cstring>
120 </property> 141 </property>
121 <property stdset="1"> 142 <property stdset="1">
143 <name>sizePolicy</name>
144 <sizepolicy>
145 <hsizetype>5</hsizetype>
146 <vsizetype>5</vsizetype>
147 </sizepolicy>
148 </property>
149 <property stdset="1">
122 <name>frameShape</name> 150 <name>frameShape</name>
123 <enum>Box</enum> 151 <enum>Box</enum>
124 </property> 152 </property>
125 <property stdset="1"> 153 <property stdset="1">
126 <name>frameShadow</name> 154 <name>frameShadow</name>
127 <enum>Raised</enum> 155 <enum>Raised</enum>
128 </property> 156 </property>
129 <property stdset="1"> 157 <property stdset="1">
@@ -140,16 +168,23 @@
140 </widget> 168 </widget>
141 <widget row="3" column="1" > 169 <widget row="3" column="1" >
142 <class>QLabel</class> 170 <class>QLabel</class>
143 <property stdset="1"> 171 <property stdset="1">
144 <name>name</name> 172 <name>name</name>
145 <cstring>button_5</cstring> 173 <cstring>button_5</cstring>
146 </property> 174 </property>
147 <property stdset="1"> 175 <property stdset="1">
176 <name>sizePolicy</name>
177 <sizepolicy>
178 <hsizetype>5</hsizetype>
179 <vsizetype>5</vsizetype>
180 </sizepolicy>
181 </property>
182 <property stdset="1">
148 <name>frameShape</name> 183 <name>frameShape</name>
149 <enum>Box</enum> 184 <enum>Box</enum>
150 </property> 185 </property>
151 <property stdset="1"> 186 <property stdset="1">
152 <name>frameShadow</name> 187 <name>frameShadow</name>
153 <enum>Raised</enum> 188 <enum>Raised</enum>
154 </property> 189 </property>
155 <property stdset="1"> 190 <property stdset="1">
@@ -166,16 +201,23 @@
166 </widget> 201 </widget>
167 <widget row="3" column="2" > 202 <widget row="3" column="2" >
168 <class>QLabel</class> 203 <class>QLabel</class>
169 <property stdset="1"> 204 <property stdset="1">
170 <name>name</name> 205 <name>name</name>
171 <cstring>button_6</cstring> 206 <cstring>button_6</cstring>
172 </property> 207 </property>
173 <property stdset="1"> 208 <property stdset="1">
209 <name>sizePolicy</name>
210 <sizepolicy>
211 <hsizetype>5</hsizetype>
212 <vsizetype>5</vsizetype>
213 </sizepolicy>
214 </property>
215 <property stdset="1">
174 <name>frameShape</name> 216 <name>frameShape</name>
175 <enum>Box</enum> 217 <enum>Box</enum>
176 </property> 218 </property>
177 <property stdset="1"> 219 <property stdset="1">
178 <name>frameShadow</name> 220 <name>frameShadow</name>
179 <enum>Raised</enum> 221 <enum>Raised</enum>
180 </property> 222 </property>
181 <property stdset="1"> 223 <property stdset="1">
@@ -192,16 +234,23 @@
192 </widget> 234 </widget>
193 <widget row="4" column="0" > 235 <widget row="4" column="0" >
194 <class>QLabel</class> 236 <class>QLabel</class>
195 <property stdset="1"> 237 <property stdset="1">
196 <name>name</name> 238 <name>name</name>
197 <cstring>button_7</cstring> 239 <cstring>button_7</cstring>
198 </property> 240 </property>
199 <property stdset="1"> 241 <property stdset="1">
242 <name>sizePolicy</name>
243 <sizepolicy>
244 <hsizetype>5</hsizetype>
245 <vsizetype>5</vsizetype>
246 </sizepolicy>
247 </property>
248 <property stdset="1">
200 <name>frameShape</name> 249 <name>frameShape</name>
201 <enum>Box</enum> 250 <enum>Box</enum>
202 </property> 251 </property>
203 <property stdset="1"> 252 <property stdset="1">
204 <name>frameShadow</name> 253 <name>frameShadow</name>
205 <enum>Raised</enum> 254 <enum>Raised</enum>
206 </property> 255 </property>
207 <property stdset="1"> 256 <property stdset="1">
@@ -218,16 +267,23 @@
218 </widget> 267 </widget>
219 <widget row="4" column="1" > 268 <widget row="4" column="1" >
220 <class>QLabel</class> 269 <class>QLabel</class>
221 <property stdset="1"> 270 <property stdset="1">
222 <name>name</name> 271 <name>name</name>
223 <cstring>button_8</cstring> 272 <cstring>button_8</cstring>
224 </property> 273 </property>
225 <property stdset="1"> 274 <property stdset="1">
275 <name>sizePolicy</name>
276 <sizepolicy>
277 <hsizetype>5</hsizetype>
278 <vsizetype>5</vsizetype>
279 </sizepolicy>
280 </property>
281 <property stdset="1">
226 <name>frameShape</name> 282 <name>frameShape</name>
227 <enum>Box</enum> 283 <enum>Box</enum>
228 </property> 284 </property>
229 <property stdset="1"> 285 <property stdset="1">
230 <name>frameShadow</name> 286 <name>frameShadow</name>
231 <enum>Raised</enum> 287 <enum>Raised</enum>
232 </property> 288 </property>
233 <property stdset="1"> 289 <property stdset="1">
@@ -244,16 +300,23 @@
244 </widget> 300 </widget>
245 <widget row="4" column="2" > 301 <widget row="4" column="2" >
246 <class>QLabel</class> 302 <class>QLabel</class>
247 <property stdset="1"> 303 <property stdset="1">
248 <name>name</name> 304 <name>name</name>
249 <cstring>button_9</cstring> 305 <cstring>button_9</cstring>
250 </property> 306 </property>
251 <property stdset="1"> 307 <property stdset="1">
308 <name>sizePolicy</name>
309 <sizepolicy>
310 <hsizetype>5</hsizetype>
311 <vsizetype>5</vsizetype>
312 </sizepolicy>
313 </property>
314 <property stdset="1">
252 <name>frameShape</name> 315 <name>frameShape</name>
253 <enum>Box</enum> 316 <enum>Box</enum>
254 </property> 317 </property>
255 <property stdset="1"> 318 <property stdset="1">
256 <name>frameShadow</name> 319 <name>frameShadow</name>
257 <enum>Raised</enum> 320 <enum>Raised</enum>
258 </property> 321 </property>
259 <property stdset="1"> 322 <property stdset="1">
@@ -276,16 +339,23 @@
276 </widget> 339 </widget>
277 <widget row="5" column="0" > 340 <widget row="5" column="0" >
278 <class>QLabel</class> 341 <class>QLabel</class>
279 <property stdset="1"> 342 <property stdset="1">
280 <name>name</name> 343 <name>name</name>
281 <cstring>button_0</cstring> 344 <cstring>button_0</cstring>
282 </property> 345 </property>
283 <property stdset="1"> 346 <property stdset="1">
347 <name>sizePolicy</name>
348 <sizepolicy>
349 <hsizetype>5</hsizetype>
350 <vsizetype>5</vsizetype>
351 </sizepolicy>
352 </property>
353 <property stdset="1">
284 <name>frameShape</name> 354 <name>frameShape</name>
285 <enum>Box</enum> 355 <enum>Box</enum>
286 </property> 356 </property>
287 <property stdset="1"> 357 <property stdset="1">
288 <name>frameShadow</name> 358 <name>frameShadow</name>
289 <enum>Raised</enum> 359 <enum>Raised</enum>
290 </property> 360 </property>
291 <property stdset="1"> 361 <property stdset="1">
@@ -308,16 +378,23 @@
308 </widget> 378 </widget>
309 <widget row="5" column="1" rowspan="1" colspan="2" > 379 <widget row="5" column="1" rowspan="1" colspan="2" >
310 <class>QLabel</class> 380 <class>QLabel</class>
311 <property stdset="1"> 381 <property stdset="1">
312 <name>name</name> 382 <name>name</name>
313 <cstring>button_OK</cstring> 383 <cstring>button_OK</cstring>
314 </property> 384 </property>
315 <property stdset="1"> 385 <property stdset="1">
386 <name>sizePolicy</name>
387 <sizepolicy>
388 <hsizetype>5</hsizetype>
389 <vsizetype>5</vsizetype>
390 </sizepolicy>
391 </property>
392 <property stdset="1">
316 <name>frameShape</name> 393 <name>frameShape</name>
317 <enum>Box</enum> 394 <enum>Box</enum>
318 </property> 395 </property>
319 <property stdset="1"> 396 <property stdset="1">
320 <name>frameShadow</name> 397 <name>frameShadow</name>
321 <enum>Raised</enum> 398 <enum>Raised</enum>
322 </property> 399 </property>
323 <property stdset="1"> 400 <property stdset="1">
diff --git a/library/power.cpp b/library/power.cpp
index d10a865..d53ecfe 100644
--- a/library/power.cpp
+++ b/library/power.cpp
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -15,17 +15,17 @@
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "power.h" 21#include "power.h"
22 22
23#if defined( QT_QWS_CUSTOM ) || defined( QT_QWS_IPAQ ) 23#ifdef QT_QWS_CUSTOM
24#include "custom.h" 24#include "custom.h"
25#endif 25#endif
26 26
27#include <unistd.h> 27#include <unistd.h>
28#include <stdlib.h> 28#include <stdlib.h>
29#include <stdio.h> 29#include <stdio.h>
30#include <fcntl.h> 30#include <fcntl.h>
31#include <sys/ioctl.h> 31#include <sys/ioctl.h>
diff --git a/library/power.h b/library/power.h
index 99d3595..04499a8 100644
--- a/library/power.h
+++ b/library/power.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/library/process.cpp b/library/process.cpp
index 2e25dd5..103dcae 100644
--- a/library/process.cpp
+++ b/library/process.cpp
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/library/process.h b/library/process.h
index def68d7..e4f613d 100644
--- a/library/process.h
+++ b/library/process.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/library/process_unix.cpp b/library/process_unix.cpp
index b599edb..e0fbf8c 100644
--- a/library/process_unix.cpp
+++ b/library/process_unix.cpp
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/library/qcom.h b/library/qcom.h
index 229be2b..8c0fa60 100644
--- a/library/qcom.h
+++ b/library/qcom.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/library/qcopenvelope_qws.cpp b/library/qcopenvelope_qws.cpp
index 10d1567..81bb0f5 100644
--- a/library/qcopenvelope_qws.cpp
+++ b/library/qcopenvelope_qws.cpp
@@ -1,98 +1,101 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#ifndef QT_NO_COP
21#include "qcopenvelope_qws.h" 22#include "qcopenvelope_qws.h"
23#endif
22#include "global.h" 24#include "global.h"
23#include <qbuffer.h> 25#include <qbuffer.h>
24#include <qdatastream.h> 26#include <qdatastream.h>
25#include <qfile.h> 27#include <qfile.h>
26#include <unistd.h> 28#include <unistd.h>
27#include <errno.h> 29#include <errno.h>
28#include <sys/file.h> 30#include <sys/file.h>
29#include <sys/types.h> 31#include <sys/types.h>
30#include <sys/stat.h> 32#include <sys/stat.h>
31#include <time.h> 33#include <time.h>
32 34
33#ifndef QT_NO_COP 35#ifndef QT_NO_COP
34 36
35/*! 37/*!
36 \class QCopEnvelope qcopenvelope_qws.h 38 \class QCopEnvelope qcopenvelope_qws.h
37 \brief The QCopEnvelope class encapsulates QCop message sending. 39 \brief The QCopEnvelope class encapsulates and sends QCop messages
40 over QCopChannels.
38 41
39 QCop messages allow applications to communicate with each other. 42 QCop messages allow applications to communicate with each other.
40 These messages are send using QCopEnvelope, and received by connecting 43 These messages are sent using QCopEnvelope, and received by connecting
41 to a QCopChannel. 44 to a QCopChannel.
42 45
43 To send a message, use the following protocol: 46 To send a message, use the following protocol:
44 47
45 \code 48 \code
46 QCopEnvelope e(channelname, messagename); 49 QCopEnvelope e(channelname, messagename);
47 e << parameter1 << parameter2 << ...; 50 e << parameter1 << parameter2 << ...;
48 \endcode 51 \endcode
49 52
50 For messages without parameters, you can simply use: 53 For messages without parameters, simply use:
51 54
52 \code 55 \code
53 QCopEnvelope (channelname, messagename); 56 QCopEnvelope e(channelname, messagename);
54 \endcode 57 \endcode
55 58
56 Do not try to simplify further as some compilers may not do 59 (Do not try to simplify this further as it may confuse some
57 as you expect. 60 compilers.)
58 61
59 The <tt>channelname</tt> of channels within Qtopia all start with "QPE/". 62 The \c{channelname} of channels within Qtopia all start with "QPE/".
60 The <tt>messagename</tt> is a function identifier followed by a list of types 63 The \c{messagename} is a function identifier followed by a list of types
61 in parentheses. There are no spaces in the message name. 64 in parentheses. There is no whitespace in the message name.
62 65
63 To receive a message, you will generally just use your applications 66 To receive a message, you will generally just use your application's
64 predefined QPE/Application/<i>appname</i> channel 67 predefined QPE/Application/\e{appname} channel
65 (see QPEApplication::appMessage()), but you can make another channel 68 (see QPEApplication::appMessage()), but you can make another channel
66 and connect it to a slot with: 69 and connect it to a slot like this:
67 70
68 \code 71 \code
69 myChannel = new QCopChannel( "QPE/FooBar", this ); 72 myChannel = new QCopChannel( "QPE/FooBar", this );
70 connect( myChannel, SIGNAL(received(const QCString &, const QByteArray &)), 73 connect( myChannel, SIGNAL(received(const QCString &, const QByteArray &)),
71 this, SLOT(fooBarMessage( const QCString &, const QByteArray &)) ); 74 this, SLOT(fooBarMessage( const QCString &, const QByteArray &)) );
72 \endcode 75 \endcode
73 76
74 See also, the \link qcop.html list of Qtopia messages\endlink. 77 See also, the \link qcop.html list of Qtopia messages\endlink.
75*/ 78*/
76 79
77/*! 80/*!
78 Constructs a QCopEnvelope that will write \a message to \a channel. 81 Constructs a QCopEnvelope that will write \a message to \a channel.
79 If \a message has parameters, you must then user operator<<() to 82 If \a message has parameters, you must then use operator<<() to
80 write the parameters. 83 add these parameters to the envelope.
81*/ 84*/
82QCopEnvelope::QCopEnvelope( const QCString& channel, const QCString& message ) : 85QCopEnvelope::QCopEnvelope( const QCString& channel, const QCString& message ) :
83 QDataStream(new QBuffer), 86 QDataStream(new QBuffer),
84 ch(channel), msg(message) 87 ch(channel), msg(message)
85{ 88{
86 device()->open(IO_WriteOnly); 89 device()->open(IO_WriteOnly);
87} 90}
88 91
89/*! 92/*!
90 Writes the completed message and destroys the QCopEnvelope. 93 Writes the message and then destroys the QCopEnvelope.
91*/ 94*/
92QCopEnvelope::~QCopEnvelope() 95QCopEnvelope::~QCopEnvelope()
93{ 96{
94 QByteArray data = ((QBuffer*)device())->buffer(); 97 QByteArray data = ((QBuffer*)device())->buffer();
95 const int pref=16; 98 const int pref=16;
96 if ( qstrncmp(ch.data(),"QPE/Application/",pref)==0 ) { 99 if ( qstrncmp(ch.data(),"QPE/Application/",pref)==0 ) {
97 QString qcopfn("/tmp/qcop-msg-"); 100 QString qcopfn("/tmp/qcop-msg-");
98 qcopfn += ch.mid(pref); 101 qcopfn += ch.mid(pref);
@@ -106,17 +109,17 @@ QCopEnvelope::~QCopEnvelope()
106 } 109 }
107 /* file locked, but might be stale (e.g. program for whatever 110 /* file locked, but might be stale (e.g. program for whatever
108 reason did not start). I modified more than 1 minute ago, 111 reason did not start). I modified more than 1 minute ago,
109 truncate the file */ 112 truncate the file */
110 struct stat buf; 113 struct stat buf;
111 time_t t; 114 time_t t;
112 if (!fstat(qcopfile.handle(), &buf) && (time(&t) != (time_t)-1) ) { 115 if (!fstat(qcopfile.handle(), &buf) && (time(&t) != (time_t)-1) ) {
113 // success on fstat, lets compare times 116 // success on fstat, lets compare times
114 if (buf.st_mtime + 60 < t) { 117 if (buf.st_ctime + 60 < t) {
115 qWarning("stale file " + qcopfn + " found. Truncating"); 118 qWarning("stale file " + qcopfn + " found. Truncating");
116 ftruncate(qcopfile.handle(), 0); 119 ftruncate(qcopfile.handle(), 0);
117 qcopfile.reset(); 120 qcopfile.reset();
118 } 121 }
119 } 122 }
120 123
121 if ( !QCopChannel::isRegistered(ch) ) { 124 if ( !QCopChannel::isRegistered(ch) ) {
122 int fsize = qcopfile.size(); 125 int fsize = qcopfile.size();
@@ -124,18 +127,17 @@ QCopEnvelope::~QCopEnvelope()
124 QDataStream ds(&qcopfile); 127 QDataStream ds(&qcopfile);
125 ds << ch << msg << data; 128 ds << ch << msg << data;
126 flock(qcopfile.handle(), LOCK_UN); 129 flock(qcopfile.handle(), LOCK_UN);
127 qcopfile.close(); 130 qcopfile.close();
128 } 131 }
129 132
130 if (fsize == 0) { 133 if (fsize == 0) {
131 QString cmd = ch.mid(pref); 134 QString cmd = ch.mid(pref);
132 cmd += " -qcop " + qcopfn; 135 Global::execute(cmd);
133 Global::invoke(cmd);
134 } 136 }
135 137
136 char c; 138 char c;
137 for (int i=0; (c=msg[i]); i++) { 139 for (int i=0; (c=msg[i]); i++) {
138 if ( c == ' ' ) { 140 if ( c == ' ' ) {
139 // Return-value required 141 // Return-value required
140 // ###### wait for it 142 // ###### wait for it
141 break; 143 break;
@@ -149,14 +151,23 @@ QCopEnvelope::~QCopEnvelope()
149 flock(qcopfile.handle(), LOCK_UN); 151 flock(qcopfile.handle(), LOCK_UN);
150 qcopfile.close(); 152 qcopfile.close();
151 qcopfile.remove(); 153 qcopfile.remove();
152 } else { 154 } else {
153 qWarning(QString("Failed to obtain file lock on %1") 155 qWarning(QString("Failed to obtain file lock on %1")
154 .arg(qcopfn)); 156 .arg(qcopfn));
155 } // endif open 157 } // endif open
156 } 158 }
159 else if (qstrncmp(ch.data(), "QPE/SOAP/", 9) == 0) {
160 // If this is a message that should go along the SOAP channel, we move the
161 // endpoint URL to the data section.
162 QString endpoint = ch.mid(9);
163
164 ch = "QPE/SOAP";
165 // Since byte arrays are explicitly shared, this is appended to the data variable..
166 *this << endpoint;
167 }
157 QCopChannel::send(ch,msg,data); 168 QCopChannel::send(ch,msg,data);
158end: 169end:
159 delete device(); 170 delete device();
160} 171}
161 172
162#endif 173#endif
diff --git a/library/qcopenvelope_qws.h b/library/qcopenvelope_qws.h
index f2a94d3..67aa843 100644
--- a/library/qcopenvelope_qws.h
+++ b/library/qcopenvelope_qws.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -15,20 +15,18 @@
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#ifndef QCOPENVELOPE_H 20#ifndef QCOPENVELOPE_H
21#define QCOPENVELOPE_H 21#define QCOPENVELOPE_H
22 22
23#ifndef QT_H
24#include <qcopchannel_qws.h> 23#include <qcopchannel_qws.h>
25#include <qdatastream.h> 24#include <qdatastream.h>
26#endif // QT_H
27 25
28#ifndef QT_NO_COP 26#ifndef QT_NO_COP
29 27
30class QCopEnvelope : public QDataStream { 28class QCopEnvelope : public QDataStream {
31 QCString ch, msg; 29 QCString ch, msg;
32public: 30public:
33 QCopEnvelope( const QCString& channel, const QCString& message ); 31 QCopEnvelope( const QCString& channel, const QCString& message );
34 ~QCopEnvelope(); 32 ~QCopEnvelope();
diff --git a/library/qdawg.cpp b/library/qdawg.cpp
index 3615693..af5dc82 100644
--- a/library/qdawg.cpp
+++ b/library/qdawg.cpp
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -191,17 +191,17 @@ int TriePtr::operator >(const TriePtr& o) const
191 { return letter > o.letter; } 191 { return letter > o.letter; }
192int TriePtr::operator <=(const TriePtr& o) const 192int TriePtr::operator <=(const TriePtr& o) const
193 { return letter <= o.letter; } 193 { return letter <= o.letter; }
194 194
195bool TrieList::equal(TrieList& l) 195bool TrieList::equal(TrieList& l)
196{ 196{
197 if ( count() != l.count() ) 197 if ( count() != l.count() )
198 return FALSE; 198 return FALSE;
199 sort(); l.sort(); 199 sort(); l.sort();
200 ConstIterator it2 = begin(); 200 ConstIterator it2 = begin();
201 ConstIterator it = l.begin(); 201 ConstIterator it = l.begin();
202 for( ; it != l.end(); ++it, ++it2 ) 202 for( ; it != l.end(); ++it, ++it2 )
203 if ( (*it).letter != (*it2).letter || ! (*it).p->equal((*it2).p) ) 203 if ( (*it).letter != (*it2).letter || ! (*it).p->equal((*it2).p) )
204 return FALSE; 204 return FALSE;
205 return TRUE; 205 return TRUE;
206} 206}
207QTrie* TrieList::findAdd(QChar c) 207QTrie* TrieList::findAdd(QChar c)
@@ -395,27 +395,75 @@ private:
395 return t->key; 395 return t->key;
396 } 396 }
397 397
398private: 398private:
399 int nodes; 399 int nodes;
400 QDawg::Node *node; 400 QDawg::Node *node;
401}; 401};
402 402
403/*!
404 \class QDawg qdawg.h
405 \brief The QDawg class provides an implementation of a Directed Acyclic Word Graph.
403 406
407 A DAWG provides very fast look-up of words in a word list.
408
409 The word list is created using readFile(), read() or
410 createFromWords(). A list of all the DAWG's words is returned by
411 allWords(), and the total number of words is returned by
412 countWords(). Use contains() to see if a particular word is in the
413 DAWG. The root \link qdawg-node.html node\endlink is returned by root().
414
415 A global DAWG is maintained for the current locale. See the
416 \l Global class for details.
417
418 The structure of a DAWG is a graph of \link qdawg-node.html
419 Nodes\endlink. There are no cycles in the graph (since there are no
420 inifinitely repeating words). Each \link qdawg-node.html
421 Node\endlink is a member of a list of \link qdawg-node.html
422 Nodes\endlink called a child list. Each \link qdawg-node.html
423 Node\endlink in the child list has a \e letter, an \e isWord flag,
424 at most one \e jump arc, and at most one arc to the next child in
425 the list.
426
427 If you traverse the \link qdawg-node.html Nodes\endlink in a DAWG,
428 starting from the root(), and you concatenate all the letters from
429 the single child in each child list that you visit, at every \link
430 qdawg-node.html Node\endlink which has the isWord flag set your
431 concatenation will be a word in the list represented by the DAWG.
432
433 For example, the DAWG below represents the word list:
434 ban, band, can, cane, cans, pan, pane, pans.
435
436 This structuring not only provides O(1) lookup of words in the word list,
437 but also produces a smaller storage file than a plain text file word list.
438
439 \img qdawg.png
440*/
441
442/*!
443 Constructs a new empty DAWG.
444*/
404QDawg::QDawg() 445QDawg::QDawg()
405{ 446{
406 d = 0; 447 d = 0;
407} 448}
408 449
450/*!
451 Deletes the DAWG.
452*/
409QDawg::~QDawg() 453QDawg::~QDawg()
410{ 454{
411 delete d; 455 delete d;
412} 456}
413 457
458/*!
459 \overload
460 Replaces all the DAWG's words with words read from \a dev.
461*/
414bool QDawg::createFromWords(QIODevice* dev) 462bool QDawg::createFromWords(QIODevice* dev)
415{ 463{
416 delete d; 464 delete d;
417 465
418 QTextStream i(dev); 466 QTextStream i(dev);
419 QTrie* trie = new QTrie; 467 QTrie* trie = new QTrie;
420 int n=0; 468 int n=0;
421 while (!i.atEnd()) { 469 while (!i.atEnd()) {
@@ -424,39 +472,51 @@ bool QDawg::createFromWords(QIODevice* dev)
424 } 472 }
425 if ( n ) 473 if ( n )
426 d = new QDawgPrivate(trie); 474 d = new QDawgPrivate(trie);
427 else 475 else
428 d = 0; 476 d = 0;
429 return TRUE; 477 return TRUE;
430} 478}
431 479
480/*!
481 Replaces all the DAWG's words with the words in the \a list.
482*/
432void QDawg::createFromWords(const QStringList& list) 483void QDawg::createFromWords(const QStringList& list)
433{ 484{
434 delete d; 485 delete d;
435 486
436 if ( list.count() ) { 487 if ( list.count() ) {
437 QTrie* trie = new QTrie; 488 QTrie* trie = new QTrie;
438 for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { 489 for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
439 trie->insertWord(*it); 490 trie->insertWord(*it);
440 } 491 }
441 d = new QDawgPrivate(trie); 492 d = new QDawgPrivate(trie);
442 } else { 493 } else {
443 d = 0; 494 d = 0;
444 } 495 }
445} 496}
446 497
498/*!
499 Returns a list of all the words in the DAWG.
500*/
447QStringList QDawg::allWords() const 501QStringList QDawg::allWords() const
448{ 502{
449 QStringList result; 503 QStringList result;
450 if ( d ) d->appendAllWords(result); 504 if ( d ) d->appendAllWords(result);
451 return result; 505 return result;
452} 506}
453 507
454 508
509/*!
510 Replaces the DAWG with the DAWG in \a filename.
511 The file is memory-mapped.
512
513 \sa write()
514*/
455bool QDawg::readFile(const QString& filename) 515bool QDawg::readFile(const QString& filename)
456{ 516{
457 delete d; 517 delete d;
458 d = 0; 518 d = 0;
459 int f = ::open( QFile::encodeName(filename), O_RDONLY ); 519 int f = ::open( QFile::encodeName(filename), O_RDONLY );
460 if ( f < 0 ) 520 if ( f < 0 )
461 return FALSE; 521 return FALSE;
462 struct stat st; 522 struct stat st;
@@ -467,44 +527,101 @@ bool QDawg::readFile(const QString& filename)
467 f, 0 ); // from offset 0 of f 527 f, 0 ); // from offset 0 of f
468 if ( tmp && tmp != (char*)MAP_FAILED ) 528 if ( tmp && tmp != (char*)MAP_FAILED )
469 d = new QDawgPrivate((uchar*)tmp); 529 d = new QDawgPrivate((uchar*)tmp);
470 } 530 }
471 ::close( f ); 531 ::close( f );
472 return d; 532 return d;
473} 533}
474 534
535/*!
536 Replaces the DAWG with the DAWG in \a dev.
537 The file is memory-mapped.
538
539 \sa write()
540*/
475bool QDawg::read(QIODevice* dev) 541bool QDawg::read(QIODevice* dev)
476{ 542{
477 delete d; 543 delete d;
478 d = new QDawgPrivate(dev); 544 d = new QDawgPrivate(dev);
479 if ( d->ok() ) 545 if ( d->ok() )
480 return TRUE; 546 return TRUE;
481 delete d; 547 delete d;
482 d = 0; 548 d = 0;
483 return FALSE; 549 return FALSE;
484} 550}
485 551
552/*!
553 Writes the DAWG to \a dev, in a custom QDAWG format.
554*/
486bool QDawg::write(QIODevice* dev) const 555bool QDawg::write(QIODevice* dev) const
487{ 556{
488 return d ? d->write(dev) : TRUE; 557 return d ? d->write(dev) : TRUE;
489} 558}
490 559
560/*!
561 Returns the number of words in the DAWG.
562*/
491int QDawg::countWords() const 563int QDawg::countWords() const
492{ 564{
493 return d ? d->countWords() : 0; 565 return d ? d->countWords() : 0;
494} 566}
495 567
568/*!
569 Returns the root \link qdawg-node.html Node\endlink of the DAWG.
570*/
496const QDawg::Node* QDawg::root() const 571const QDawg::Node* QDawg::root() const
497{ 572{
498 return d ? d->root() : 0; 573 return d ? d->root() : 0;
499} 574}
500 575
576/*!
577 Returns TRUE if the DAWG contains the word \a s; otherwise returns
578 FALSE.
579*/
501bool QDawg::contains(const QString& s) const 580bool QDawg::contains(const QString& s) const
502{ 581{
503 return d ? d->contains(s) : FALSE; 582 return d ? d->contains(s) : FALSE;
504} 583}
505 584
585/*!
586 \internal
587
588 For debugging: prints out the DAWG contents.
589*/
506void QDawg::dump() const 590void QDawg::dump() const
507{ 591{
508 if ( d ) d->dump(); 592 if ( d ) d->dump();
509} 593}
510 594
595/*!
596 \class QDawg::Node qdawg.h
597 \brief The QDawg::Node class represents one node of a QDawg.
598*/
599
600/*!
601 \fn QChar QDawg::Node::letter() const
602
603 Returns this Node's letter.
604*/
605/*!
606 \fn bool QDawg::Node::isWord() const
607
608 Returns TRUE if this Node is the end of a word; otherwise returns
609 FALSE.
610*/
611/*!
612 \fn bool QDawg::Node::isLast() const
613
614 Returns TRUE if this Node is the last in the child list; otherwise
615 returns FALSE.
616*/
617/*!
618 \fn const Node* QDawg::Node::next() const
619
620 Returns the next child Node in the child list or 0 if the current
621 Node isLast().
622*/
623/*!
624 \fn const Node* QDawg::Node::jump() const
625
626 Returns the node connected to this Node.
627*/
diff --git a/library/qdawg.h b/library/qdawg.h
index ea182f3..e3b1628 100644
--- a/library/qdawg.h
+++ b/library/qdawg.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/library/qlibrary.cpp b/library/qlibrary.cpp
index 4aabbc5..cbf49a3 100644
--- a/library/qlibrary.cpp
+++ b/library/qlibrary.cpp
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/library/qlibrary.h b/library/qlibrary.h
index d33173b..67ed3bf 100644
--- a/library/qlibrary.h
+++ b/library/qlibrary.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/library/qlibrary_p.h b/library/qlibrary_p.h
index 4734228..33cab6f 100644
--- a/library/qlibrary_p.h
+++ b/library/qlibrary_p.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/library/qlibrary_unix.cpp b/library/qlibrary_unix.cpp
index 50a5478..7740321 100644
--- a/library/qlibrary_unix.cpp
+++ b/library/qlibrary_unix.cpp
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/library/qmath.h b/library/qmath.h
index 629fe99..fc18fdb 100644
--- a/library/qmath.h
+++ b/library/qmath.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index 8aae786..3ca6d73 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -40,16 +40,17 @@
40#include <qpalette.h> 40#include <qpalette.h>
41#include <qbuffer.h> 41#include <qbuffer.h>
42#include <qptrdict.h> 42#include <qptrdict.h>
43#include <qregexp.h> 43#include <qregexp.h>
44#include <qdir.h> 44#include <qdir.h>
45#include <qlabel.h> 45#include <qlabel.h>
46#include <qdialog.h> 46#include <qdialog.h>
47#include <qdragobject.h> 47#include <qdragobject.h>
48#include <qtextcodec.h>
48#include <qevent.h> 49#include <qevent.h>
49#include <qtooltip.h> 50#include <qtooltip.h>
50#include <qsignal.h> 51#include <qsignal.h>
51#include "qpeapplication.h" 52#include "qpeapplication.h"
52#include "qpestyle.h" 53#include "qpestyle.h"
53#include "styleinterface.h" 54#include "styleinterface.h"
54#if QT_VERSION >= 300 55#if QT_VERSION >= 300
55#include <qstylefactory.h> 56#include <qstylefactory.h>
@@ -59,83 +60,184 @@
59#include <qmotifstyle.h> 60#include <qmotifstyle.h>
60#include <qmotifplusstyle.h> 61#include <qmotifplusstyle.h>
61#include "lightstyle.h" 62#include "lightstyle.h"
62 63
63#include <qpe/qlibrary.h> 64#include <qpe/qlibrary.h>
64#endif 65#endif
65#include "global.h" 66#include "global.h"
66#include "resource.h" 67#include "resource.h"
68#if QT_VERSION <= 230 && defined(QT_NO_CODECS)
69#include "qutfcodec.h"
70#endif
67#include "config.h" 71#include "config.h"
72#include "network.h"
73#ifdef QWS
68#include "fontmanager.h" 74#include "fontmanager.h"
69#include "fontdatabase.h" 75#endif
70 76
71#include "alarmserver.h" 77#include "alarmserver.h"
72#include "applnk.h" 78#include "applnk.h"
73#include "qpemenubar.h" 79#include "qpemenubar.h"
80#include "textcodecinterface.h"
81#include "imagecodecinterface.h"
74 82
75#include <unistd.h> 83#include <unistd.h>
76#include <sys/file.h> 84#include <sys/file.h>
77#include <sys/ioctl.h> 85#include <sys/ioctl.h>
78#include <sys/soundcard.h> 86#include <sys/soundcard.h>
79 87
80 88
81class QPEApplicationData 89class QPEApplicationData {
82{
83public: 90public:
84 QPEApplicationData() : presstimer( 0 ), presswidget( 0 ), rightpressed( FALSE ), 91 QPEApplicationData() : presstimer( 0 ), presswidget( 0 ), rightpressed( FALSE ),
85 kbgrabber( 0 ), kbregrab( FALSE ), notbusysent( FALSE ), preloaded( FALSE ), 92 kbgrabber( 0 ), kbregrab( FALSE ), notbusysent( FALSE ), preloaded( FALSE ),
86 forceshow( FALSE ), nomaximize( FALSE ), qpe_main_widget( 0 ), 93 forceshow( FALSE ), nomaximize( FALSE ), qpe_main_widget( 0 ),
87 keep_running( TRUE ) 94 keep_running( TRUE )
88 { 95 {
89 qcopq.setAutoDelete( TRUE ); 96 qcopq.setAutoDelete( TRUE );
90 } 97 }
91 98
92 int presstimer; 99 int presstimer;
93 QWidget* presswidget; 100 QWidget* presswidget;
94 QPoint presspos; 101 QPoint presspos;
95 bool rightpressed; 102 bool rightpressed : 1; // AEH why not use uint foobar :1; if it's tt style -zecke
96 int kbgrabber; 103 int kbgrabber;
97 bool kbregrab; 104 bool kbregrab : 1;
98 bool notbusysent; 105 bool notbusysent : 1;
99 QString appName; 106 QString appName;
100 struct QCopRec 107 struct QCopRec {
101 { 108 QCopRec( const QCString &ch, const QCString &msg,
102 QCopRec( const QCString &ch, const QCString &msg, 109 const QByteArray &d ) :
103 const QByteArray &d ) : 110 channel( ch ), message( msg ), data( d ) { }
104 channel( ch ), message( msg ), data( d )
105 { }
106 111
107 QCString channel; 112 QCString channel;
108 QCString message; 113 QCString message;
109 QByteArray data; 114 QByteArray data;
110 }; 115 };
111 bool preloaded; 116 bool preloaded : 1;
112 bool forceshow; 117 bool forceshow : 1;
113 bool nomaximize; 118 bool nomaximize : 1;
114 QWidget* qpe_main_widget; 119 QWidget* qpe_main_widget;
115 bool keep_running; 120 bool keep_running : 1;
116 QList<QCopRec> qcopq; 121 QList<QCopRec> qcopq;
117 122
118 void enqueueQCop( const QCString &ch, const QCString &msg, 123 void enqueueQCop( const QCString &ch, const QCString &msg,
119 const QByteArray &data ) 124 const QByteArray &data )
120 { 125 {
121 qcopq.append( new QCopRec( ch, msg, data ) ); 126 qcopq.append( new QCopRec( ch, msg, data ) );
122 } 127 }
123 void sendQCopQ() 128 void sendQCopQ() {
124 { 129 QCopRec * r;
125 QCopRec * r; 130#ifndef QT_NO_COP
126 for ( QListIterator<QCopRec> it( qcopq ); ( r = it.current() ); ++it ) 131 for ( QListIterator<QCopRec> it( qcopq ); ( r = it.current() ); ++it )
127 QCopChannel::sendLocally( r->channel, r->message, r->data ); 132 QCopChannel::sendLocally( r->channel, r->message, r->data );
133#endif
128 qcopq.clear(); 134 qcopq.clear();
129 } 135 }
136 static void show_mx(QWidget* mw, bool nomaximize) {
137 if ( mw->layout() && mw->inherits("QDialog") ) {
138 QPEApplication::showDialog((QDialog*)mw,nomaximize);
139 } else {
140#ifdef Q_WS_QWS
141 if ( !nomaximize )
142 mw->showMaximized();
143 else
144#endif
145 mw->show();
146 }
147 }
148 static bool setWidgetCaptionFromAppName( QWidget* /*mw*/, const QString& /*appName*/, const QString& /*appsPath*/ )
149 {
150 /*
151 // This works but disable it for now until it is safe to apply
152 // What is does is scan the .desktop files of all the apps for
153 // the applnk that has the corresponding argv[0] as this program
154 // then it uses the name stored in the .desktop file as the caption
155 // for the main widget. This saves duplicating translations for
156 // the app name in the program and in the .desktop files.
157
158 AppLnkSet apps( appsPath );
159
160 QList<AppLnk> appsList = apps.children();
161 for ( QListIterator<AppLnk> it(appsList); it.current(); ++it ) {
162 if ( (*it)->exec() == appName ) {
163 mw->setCaption( (*it)->name() );
164 return TRUE;
165 }
166 }
167 */
168 return FALSE;
169 }
170
171
172 void show(QWidget* mw, bool nomax)
173 {
174 setWidgetCaptionFromAppName( mw, appName, QPEApplication::qpeDir() + "apps" );
175 nomaximize = nomax;
176 qpe_main_widget = mw;
177#ifndef QT_NO_COP
178 sendQCopQ();
179#endif
180 if ( preloaded ) {
181 if(forceshow)
182 show_mx(mw,nomax);
183 } else if ( keep_running ) {
184 show_mx(mw,nomax);
185 }
186 }
187
188 void loadTextCodecs()
189 {
190 QString path = QPEApplication::qpeDir() + "/plugins/textcodecs";
191 QDir dir( path, "lib*.so" );
192 QStringList list = dir.entryList();
193 QStringList::Iterator it;
194 for ( it = list.begin(); it != list.end(); ++it ) {
195 TextCodecInterface *iface = 0;
196 QLibrary *lib = new QLibrary( path + "/" + *it );
197 if ( lib->queryInterface( IID_QtopiaTextCodec, (QUnknownInterface**)&iface ) == QS_OK && iface ) {
198 QValueList<int> mibs = iface->mibEnums();
199 for (QValueList<int>::ConstIterator i=mibs.begin(); i!=mibs.end(); ++i) {
200 (void)iface->createForMib(*i);
201 // ### it exists now; need to remember if we can delete it
202 }
203 } else {
204 lib->unload();
205 delete lib;
206 }
207 }
208 }
209
210 void loadImageCodecs()
211 {
212 QString path = QPEApplication::qpeDir() + "/plugins/imagecodecs";
213 QDir dir( path, "lib*.so" );
214 QStringList list = dir.entryList();
215 QStringList::Iterator it;
216 for ( it = list.begin(); it != list.end(); ++it ) {
217 ImageCodecInterface *iface = 0;
218 QLibrary *lib = new QLibrary( path + "/" + *it );
219 if ( lib->queryInterface( IID_QtopiaImageCodec, (QUnknownInterface**)&iface ) == QS_OK && iface ) {
220 QStringList formats = iface->keys();
221 for (QStringList::ConstIterator i=formats.begin(); i!=formats.end(); ++i) {
222 (void)iface->installIOHandler(*i);
223 // ### it exists now; need to remember if we can delete it
224 }
225 } else {
226 lib->unload();
227 delete lib;
228 }
229 }
230 }
231 QString styleName;
232 QString decorationName;
130}; 233};
131 234
132class ResourceMimeFactory : public QMimeSourceFactory 235class ResourceMimeFactory : public QMimeSourceFactory {
133{
134public: 236public:
135 ResourceMimeFactory() 237 ResourceMimeFactory()
136 { 238 {
137 setFilePath( Global::helpPath() ); 239 setFilePath( Global::helpPath() );
138 setExtensionType( "html", "text/html;charset=UTF-8" ); 240 setExtensionType( "html", "text/html;charset=UTF-8" );
139 } 241 }
140 242
141 const QMimeSource* data( const QString& abs_name ) const 243 const QMimeSource* data( const QString& abs_name ) const
@@ -159,540 +261,600 @@ public:
159 } 261 }
160}; 262};
161 263
162static int muted = 0; 264static int muted = 0;
163static int micMuted = 0; 265static int micMuted = 0;
164 266
165static void setVolume( int t = 0, int percent = -1 ) 267static void setVolume( int t = 0, int percent = -1 )
166{ 268{
167 switch ( t ) { 269 switch ( t ) {
168 case 0: { 270 case 0: {
169 Config cfg( "qpe" ); 271 Config cfg( "qpe" );
170 cfg.setGroup( "Volume" ); 272 cfg.setGroup( "Volume" );
171 if ( percent < 0 ) 273 if ( percent < 0 )
172 percent = cfg.readNumEntry( "VolumePercent", 50 ); 274 percent = cfg.readNumEntry( "VolumePercent", 50 );
173 int fd = 0; 275 int fd = 0;
174 if ( ( fd = open( "/dev/mixer", O_RDWR ) ) >= 0 ) { 276 if ( ( fd = open( "/dev/mixer", O_RDWR ) ) >= 0 ) {
175 int vol = muted ? 0 : percent; 277 int vol = muted ? 0 : percent;
176 // set both channels to same volume 278 // set both channels to same volume
177 vol |= vol << 8; 279 vol |= vol << 8;
178 ioctl( fd, MIXER_WRITE( 0 ), &vol ); 280 ioctl( fd, MIXER_WRITE( 0 ), &vol );
179 ::close( fd ); 281 ::close( fd );
180 } 282 }
181 } 283 }
182 break; 284 break;
183 } 285 }
184} 286}
185 287
186static void setMic( int t = 0, int percent = -1 ) 288static void setMic( int t = 0, int percent = -1 )
187{ 289{
188 switch ( t ) { 290 switch ( t ) {
189 case 0: { 291 case 0: {
190 Config cfg( "qpe" ); 292 Config cfg( "qpe" );
191 cfg.setGroup( "Volume" ); 293 cfg.setGroup( "Volume" );
192 if ( percent < 0 ) 294 if ( percent < 0 )
193 percent = cfg.readNumEntry( "Mic", 50 ); 295 percent = cfg.readNumEntry( "Mic", 50 );
194 296
195 int fd = 0; 297 int fd = 0;
196 int mic = micMuted ? 0 : percent; 298 int mic = micMuted ? 0 : percent;
197 if ( ( fd = open( "/dev/mixer", O_RDWR ) ) >= 0 ) { 299 if ( ( fd = open( "/dev/mixer", O_RDWR ) ) >= 0 ) {
198 ioctl( fd, MIXER_WRITE( SOUND_MIXER_MIC ), &mic ); 300 ioctl( fd, MIXER_WRITE( SOUND_MIXER_MIC ), &mic );
199 ::close( fd ); 301 ::close( fd );
200 } 302 }
201 } 303 }
202 break; 304 break;
203 } 305 }
204} 306}
205 307
206 308
207/*! 309/*!
208 \class QPEApplication qpeapplication.h 310 \class QPEApplication qpeapplication.h
209 \brief The QPEApplication class implements various system services 311 \brief The QPEApplication class implements various system services
210 that are available to all Qtopia applications. 312 that are available to all Qtopia applications.
211 313
212 Simply by using QPEApplication instead of QApplication, a plain Qt 314 Simply by using QPEApplication instead of QApplication, a standard Qt
213 application becomes a Qtopia application. It automatically follows 315 application becomes a Qtopia application. It automatically follows
214 style changes, quits and raises, and in the 316 style changes, quits and raises, and in the
215 case of \link docwidget.html document-oriented\endlink applications, 317 case of \link docwidget.html document-oriented\endlink applications,
216 changes the current displayed document in response to the environment. 318 changes the currently displayed document in response to the environment.
319
320 To create a \link docwidget.html document-oriented\endlink
321 application use showMainDocumentWidget(); to create a
322 non-document-oriented application use showMainWidget(). The
323 keepRunning() function indicates whether the application will
324 continue running after it's processed the last \link qcop.html
325 QCop\endlink message. This can be changed using setKeepRunning().
326
327 A variety of signals are emitted when certain events occur, for
328 example, timeChanged(), clockChanged(), weekChanged(),
329 dateFormatChanged() and volumeChanged(). If the application receives
330 a \link qcop.html QCop\endlink message on the application's
331 QPE/Application/\e{appname} channel, the appMessage() signal is
332 emitted. There are also flush() and reload() signals, which
333 are emitted when synching begins and ends respectively - upon these
334 signals, the application should save and reload any data
335 files that are involved in synching. Most of these signals will initially
336 be received and unfiltered through the appMessage() signal.
337
338 This class also provides a set of useful static functions. The
339 qpeDir() and documentDir() functions return the respective paths.
340 The grabKeyboard() and ungrabKeyboard() functions are used to
341 control whether the application takes control of the device's
342 physical buttons (e.g. application launch keys). The stylus' mode of
343 operation is set with setStylusOperation() and retrieved with
344 stylusOperation(). There are also setInputMethodHint() and
345 inputMethodHint() functions.
346
347 \ingroup qtopiaemb
217*/ 348*/
218 349
219/*! 350/*!
220 \fn void QPEApplication::clientMoused() 351 \fn void QPEApplication::clientMoused()
221 352
222 \internal 353 \internal
223*/ 354*/
224 355
225/*! 356/*!
226 \fn void QPEApplication::timeChanged(); 357 \fn void QPEApplication::timeChanged();
227 358 This signal is emitted when the time changes outside the normal
228 This signal is emitted when the time jumps forward or backwards 359 passage of time, i.e. if the time is set backwards or forwards.
229 by more than the normal passage of time.
230*/ 360*/
231 361
232/*! 362/*!
233 \fn void QPEApplication::clockChanged( bool ampm ); 363 \fn void QPEApplication::clockChanged( bool ampm );
234 364
235 This signal is emitted when the user changes the style 365 This signal is emitted when the user changes the clock's style. If
236 of clock. If \a ampm is TRUE, the user wants a 12-hour 366 \a ampm is TRUE, the user wants a 12-hour AM/PM clock, otherwise,
237 AM/PM close, otherwise, they want a 24-hour clock. 367 they want a 24-hour clock.
368*/
369
370/*!
371 \fn void QPEApplication::volumeChanged( bool muted )
372
373 This signal is emitted whenever the mute state is changed. If \a
374 muted is TRUE, then sound output has been muted.
375*/
376
377/*!
378 \fn void QPEApplication::weekChanged( bool startOnMonday )
379
380 This signal is emitted if the week start day is changed. If \a
381 startOnMonday is TRUE then the first day of the week is Monday; if
382 \a startOnMonday is FALSE then the first day of the week is
383 Sunday.
384*/
385
386/*!
387 \fn void QPEApplication::dateFormatChanged()
388
389 This signal is emitted whenever the date format is changed.
390*/
391
392/*!
393 \fn void QPEApplication::flush()
394
395 ###
396*/
397
398/*!
399 \fn void QPEApplication::reload()
400
238*/ 401*/
239 402
240/*! 403/*!
241 \fn void QPEApplication::appMessage( const QCString& msg, const QByteArray& data ) 404 \fn void QPEApplication::appMessage( const QCString& msg, const QByteArray& data )
242 405
243 This signal is emitted when a message is received on the 406 This signal is emitted when a message is received on this
244 QPE/Application/<i>appname</i> QCop channel for this application. 407 application's QPE/Application/<i>appname</i> \link qcop.html
408 QCop\endlink channel.
245 409
246 The slot to which you connect this signal uses \a msg and \a data 410 The slot to which you connect this signal uses \a msg and \a data
247 in the following way: 411 in the following way:
248 412
249\code 413\code
250 void MyWidget::receive( const QCString& msg, const QByteArray& data ) 414 void MyWidget::receive( const QCString& msg, const QByteArray& data )
251 { 415 {
252 QDataStream stream( data, IO_ReadOnly ); 416 QDataStream stream( data, IO_ReadOnly );
253 if ( msg == "someMessage(int,int,int)" ) { 417 if ( msg == "someMessage(int,int,int)" ) {
254 int a,b,c; 418 int a,b,c;
255 stream >> a >> b >> c; 419 stream >> a >> b >> c;
256 ... 420 ...
257 } else if ( msg == "otherMessage(QString)" ) { 421 } else if ( msg == "otherMessage(QString)" ) {
258 ... 422 ...
259 } 423 }
260 } 424 }
261\endcode 425\endcode
262 426
263 \sa qcop.html 427 \sa qcop.html
428 Note that messages received here may be processed by qpe application
429 and emitted as signals, such as flush() and reload().
264*/ 430*/
265 431
266/*! 432/*!
267 Constructs a QPEApplication just as you would construct 433 Constructs a QPEApplication just as you would construct
268 a QApplication, passing \a argc, \a argv, and \a t. 434 a QApplication, passing \a argc, \a argv, and \a t.
435
436 For applications, \a t should be the default, GuiClient. Only
437 the Qtopia server passes GuiServer.
269*/ 438*/
270QPEApplication::QPEApplication( int & argc, char **argv, Type t ) 439QPEApplication::QPEApplication( int & argc, char **argv, Type t )
271 : QApplication( argc, argv, t ) 440 : QApplication( argc, argv, t )
272{ 441{
273 int dw = desktop() ->width(); 442 d = new QPEApplicationData;
274 if ( dw < 200 ) { 443 d->loadTextCodecs();
275 // setFont( QFont( "helvetica", 8 ) ); 444 d->loadImageCodecs();
276 AppLnk::setSmallIconSize( 10 ); 445 int dw = desktop() ->width();
277 AppLnk::setBigIconSize( 28 ); 446 if ( dw < 200 ) {
278 } 447 setFont( QFont( "helvetica", 8 ) );
448 AppLnk::setSmallIconSize( 10 );
449 AppLnk::setBigIconSize( 28 );
450 }else if ( dw > 600 ) {
451 setFont( QFont( "helvetica", 12 ) );
452 AppLnk::setSmallIconSize( 24 );
453 AppLnk::setBigIconSize( 48 );
454 }else if ( dw > 400 ) {
455 setFont( QFont( "helvetica", 12 ) );
456 AppLnk::setSmallIconSize( 16 );
457 AppLnk::setBigIconSize( 32 );
458 }
279 459
280 d = new QPEApplicationData;
281 QMimeSourceFactory::setDefaultFactory( new ResourceMimeFactory );
282 460
283 connect( this, SIGNAL( lastWindowClosed() ), this, SLOT( hideOrQuit() ) ); 461 QMimeSourceFactory::setDefaultFactory( new ResourceMimeFactory );
284#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
285 462
286 QString qcopfn( "/tmp/qcop-msg-" ); 463 connect( this, SIGNAL( lastWindowClosed() ), this, SLOT( hideOrQuit() ) );
287 qcopfn += QString( argv[ 0 ] ); // append command name 464#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
288 465
289 QFile f( qcopfn ); 466 QString qcopfn( "/tmp/qcop-msg-" );
290 if ( f.open( IO_ReadOnly ) ) { 467 qcopfn += QString( argv[ 0 ] ); // append command name
291 flock( f.handle(), LOCK_EX );
292 }
293 468
294 sysChannel = new QCopChannel( "QPE/System", this ); 469 QFile f( qcopfn );
295 connect( sysChannel, SIGNAL( received( const QCString &, const QByteArray & ) ), 470 if ( f.open( IO_ReadOnly ) ) {
296 this, SLOT( systemMessage( const QCString &, const QByteArray & ) ) ); 471 flock( f.handle(), LOCK_EX );
297 472 }
298 QCString channel = QCString( argv[ 0 ] );
299 channel.replace( QRegExp( ".*/" ), "" );
300 d->appName = channel;
301 channel = "QPE/Application/" + channel;
302 pidChannel = new QCopChannel( channel, this );
303 connect( pidChannel, SIGNAL( received( const QCString &, const QByteArray & ) ),
304 this, SLOT( pidMessage( const QCString &, const QByteArray & ) ) );
305
306 if ( f.isOpen() ) {
307 d->keep_running = FALSE;
308 QDataStream ds( &f );
309 QCString channel, message;
310 QByteArray data;
311 while ( !ds.atEnd() ) {
312 ds >> channel >> message >> data;
313 d->enqueueQCop( channel, message, data );
314 }
315 473
316 flock( f.handle(), LOCK_UN ); 474 sysChannel = new QCopChannel( "QPE/System", this );
317 f.close(); 475 connect( sysChannel, SIGNAL( received( const QCString &, const QByteArray & ) ),
318 f.remove(); 476 this, SLOT( systemMessage( const QCString &, const QByteArray & ) ) );
319 } 477
478 QCString channel = QCString( argv[ 0 ] );
479 channel.replace( QRegExp( ".*/" ), "" );
480 d->appName = channel;
481 channel = "QPE/Application/" + channel;
482 pidChannel = new QCopChannel( channel, this );
483 connect( pidChannel, SIGNAL( received( const QCString &, const QByteArray & ) ),
484 this, SLOT( pidMessage( const QCString &, const QByteArray & ) ) );
485
486 if ( f.isOpen() ) {
487 d->keep_running = FALSE;
488 QDataStream ds( &f );
489 QCString channel, message;
490 QByteArray data;
491 while ( !ds.atEnd() ) {
492 ds >> channel >> message >> data;
493 d->enqueueQCop( channel, message, data );
494 }
495
496 flock( f.handle(), LOCK_UN );
497 f.close();
498 f.remove();
499 }
320 500
321 for ( int a = 0; a < argc; a++ ) { 501 for ( int a = 0; a < argc; a++ ) {
322 if ( qstrcmp( argv[ a ], "-preload" ) == 0 ) { 502 if ( qstrcmp( argv[ a ], "-preload" ) == 0 ) {
323 argv[ a ] = argv[ a + 1 ]; 503 argv[ a ] = argv[ a + 1 ];
324 a++; 504 a++;
325 d->preloaded = TRUE; 505 d->preloaded = TRUE;
326 argc -= 1; 506 argc -= 1;
327 } 507 }
328 else if ( qstrcmp( argv[ a ], "-preload-show" ) == 0 ) { 508 else if ( qstrcmp( argv[ a ], "-preload-show" ) == 0 ) {
329 argv[ a ] = argv[ a + 1 ]; 509 argv[ a ] = argv[ a + 1 ];
330 a++; 510 a++;
331 d->preloaded = TRUE; 511 d->preloaded = TRUE;
332 d->forceshow = TRUE; 512 d->forceshow = TRUE;
333 argc -= 1; 513 argc -= 1;
334 } 514 }
335 } 515 }
336 516
337 /* overide stored arguments */ 517 /* overide stored arguments */
338 setArgs( argc, argv ); 518 setArgs( argc, argv );
339 519
340#endif 520#endif
341 521
342 qwsSetDecoration( new QPEDecoration() ); 522 //qwsSetDecoration( new QPEDecoration() );
343 523
344#ifndef QT_NO_TRANSLATION 524#ifndef QT_NO_TRANSLATION
345 525
346 QStringList langs = Global::languageList(); 526 QStringList langs = Global::languageList();
347 for ( QStringList::ConstIterator it = langs.begin(); it != langs.end(); ++it ) { 527 for ( QStringList::ConstIterator it = langs.begin(); it != langs.end(); ++it ) {
348 QString lang = *it; 528 QString lang = *it;
349 529
350 QTranslator * trans; 530 QTranslator * trans;
351 QString tfn; 531 QString tfn;
352 532
353 trans = new QTranslator( this ); 533 trans = new QTranslator( this );
354 tfn = qpeDir() + "/i18n/" + lang + "/libqpe.qm"; 534 tfn = qpeDir() + "/i18n/" + lang + "/libqpe.qm";
355 if ( trans->load( tfn ) ) 535 if ( trans->load( tfn ) )
356 installTranslator( trans ); 536 installTranslator( trans );
357 else 537 else
358 delete trans; 538 delete trans;
359 539
360 trans = new QTranslator( this ); 540 trans = new QTranslator( this );
361 tfn = qpeDir() + "/i18n/" + lang + "/" + d->appName + ".qm"; 541 tfn = qpeDir() + "/i18n/" + lang + "/" + d->appName + ".qm";
362 if ( trans->load( tfn ) ) 542 if ( trans->load( tfn ) )
363 installTranslator( trans ); 543 installTranslator( trans );
364 else 544 else
365 delete trans; 545 delete trans;
366 546
367 /* 547 //###language/font hack; should look it up somewhere
368 * not required. if using one of these languages, you might as well install 548#ifdef QWS
369 * a custom font. 549 if ( lang == "ja" || lang == "zh_CN" || lang == "zh_TW" || lang == "ko" ) {
370 550 QFont fn = FontManager::unicodeFont( FontManager::Proportional );
371 //###language/font hack; should look it up somewhere 551 setFont( fn );
372 if ( lang == "ja" || lang == "zh_CN" || lang == "zh_TW" || lang == "ko" ) { 552 }
373 QFont fn = FontManager::unicodeFont( FontManager::Proportional ); 553#endif
374 setFont( fn ); 554 }
375 }
376
377 else {
378 */
379 Config config( "qpe" );
380 config.setGroup( "Appearance" );
381 QString familyStr = config.readEntry( "FontFamily", "helvetica" );
382 QString styleStr = config.readEntry( "FontStyle", "Regular" );
383 QString sizeStr = config.readEntry( "FontSize", "10" );
384 QString charSetStr = config.readEntry( "FontCharSet", QString::null );
385 bool ok;
386 int i_size = sizeStr.toInt( &ok, 10 );
387 FontDatabase fdb;
388 QFont selectedFont = fdb.font( familyStr, styleStr, i_size, charSetStr );
389 setFont( selectedFont );
390 //}
391 }
392
393#endif 555#endif
394 556
395 applyStyle(); 557 applyStyle();
396 558
397 if ( type() == GuiServer ) { 559 if ( type() == GuiServer ) {
398 setVolume(); 560 setVolume();
399 } 561 }
400 562
401 installEventFilter( this ); 563 installEventFilter( this );
402 564
403 QPEMenuToolFocusManager::initialize(); 565 QPEMenuToolFocusManager::initialize();
404 566
405#ifdef QT_NO_QWS_CURSOR 567#ifdef QT_NO_QWS_CURSOR
406 // if we have no cursor, probably don't want tooltips 568 // if we have no cursor, probably don't want tooltips
407 QToolTip::setEnabled( FALSE ); 569 QToolTip::setEnabled( FALSE );
408#endif 570#endif
409} 571}
410 572
411static QPtrDict<void>* inputMethodDict = 0; 573static QPtrDict<void>* inputMethodDict = 0;
412static void createInputMethodDict() 574static void createInputMethodDict()
413{ 575{
414 if ( !inputMethodDict ) 576 if ( !inputMethodDict )
415 inputMethodDict = new QPtrDict<void>; 577 inputMethodDict = new QPtrDict<void>;
416} 578}
417 579
418/*! 580/*!
419 Returns the currently set hint to the system as to whether 581 Returns the currently set hint to the system as to whether
420 \a w has any use for text input methods. 582 widget \a w has any use for text input methods.
421 583
422 \sa setInputMethodHint() 584
585 \sa setInputMethodHint() InputMethodHint
423*/ 586*/
424QPEApplication::InputMethodHint QPEApplication::inputMethodHint( QWidget * w ) 587QPEApplication::InputMethodHint QPEApplication::inputMethodHint( QWidget * w )
425{ 588{
426 if ( inputMethodDict && w ) 589 if ( inputMethodDict && w )
427 return ( InputMethodHint ) ( int ) inputMethodDict->find( w ); 590 return ( InputMethodHint ) ( int ) inputMethodDict->find( w );
428 return Normal; 591 return Normal;
429} 592}
430 593
431/*! 594/*!
432 \enum QPEApplication::InputMethodHint 595 \enum QPEApplication::InputMethodHint
433 596
434 \value Normal the application sometimes needs text input (the default). 597 \value Normal the application sometimes needs text input (the default).
435 \value AlwaysOff the application never needs text input. 598 \value AlwaysOff the application never needs text input.
436 \value AlwaysOn the application always needs text input. 599 \value AlwaysOn the application always needs text input.
437*/ 600*/
438 601
439/*! 602/*!
440 Hints to the system that \a w has use for text input methods 603 Hints to the system that widget \a w has use for text input methods
441 as specified by \a mode. 604 as specified by \a mode.
442 605
443 \sa inputMethodHint() 606 \sa inputMethodHint() InputMethodHint
444*/ 607*/
445void QPEApplication::setInputMethodHint( QWidget * w, InputMethodHint mode ) 608void QPEApplication::setInputMethodHint( QWidget * w, InputMethodHint mode )
446{ 609{
447 createInputMethodDict(); 610 createInputMethodDict();
448 if ( mode == Normal ) { 611 if ( mode == Normal ) {
449 inputMethodDict->remove 612 inputMethodDict->remove
450 ( w ); 613 ( w );
451 } 614 }
452 else { 615 else {
453 inputMethodDict->insert( w, ( void* ) mode ); 616 inputMethodDict->insert( w, ( void* ) mode );
454 } 617 }
455} 618}
456 619
457class HackDialog : public QDialog 620class HackDialog : public QDialog
458{ 621{
459public: 622public:
460 void acceptIt() 623 void acceptIt() { accept(); }
461 { 624 void rejectIt() { reject(); }
462 accept();
463 }
464 void rejectIt()
465 {
466 reject();
467 }
468}; 625};
469 626
470 627
471void QPEApplication::mapToDefaultAction( QWSKeyEvent * ke, int key ) 628void QPEApplication::mapToDefaultAction( QWSKeyEvent * ke, int key )
472{ 629{
473 // specialised actions for certain widgets. May want to 630 // specialised actions for certain widgets. May want to
474 // add more stuff here. 631 // add more stuff here.
475 if ( activePopupWidget() && activePopupWidget() ->inherits( "QListBox" ) 632 if ( activePopupWidget() && activePopupWidget() ->inherits( "QListBox" )
476 && activePopupWidget() ->parentWidget() 633 && activePopupWidget() ->parentWidget()
477 && activePopupWidget() ->parentWidget() ->inherits( "QComboBox" ) ) 634 && activePopupWidget() ->parentWidget() ->inherits( "QComboBox" ) )
478 key = Qt::Key_Return; 635 key = Qt::Key_Return;
479 636
480 if ( activePopupWidget() && activePopupWidget() ->inherits( "QPopupMenu" ) ) 637 if ( activePopupWidget() && activePopupWidget() ->inherits( "QPopupMenu" ) )
481 key = Qt::Key_Return; 638 key = Qt::Key_Return;
482 639
483 ke->simpleData.keycode = key; 640#ifdef QWS
641 ke->simpleData.keycode = key;
642#endif
484} 643}
485 644
486class HackWidget : public QWidget 645class HackWidget : public QWidget
487{ 646{
488public: 647public:
489 bool needsOk() 648 bool needsOk()
490 { 649 { return ( getWState() & WState_Reserved1 ); }
491 return ( getWState() & WState_Reserved1 );
492 }
493}; 650};
494 651
495/*! 652/*!
496 \internal 653 \internal
497*/ 654*/
655
656#ifdef QWS
498bool QPEApplication::qwsEventFilter( QWSEvent * e ) 657bool QPEApplication::qwsEventFilter( QWSEvent * e )
499{ 658{
500 if ( !d->notbusysent && e->type == QWSEvent::Focus ) { 659 if ( !d->notbusysent && e->type == QWSEvent::Focus ) {
501 if ( qApp->type() != QApplication::GuiServer ) { 660 if ( qApp->type() != QApplication::GuiServer ) {
502 QCopEnvelope e( "QPE/System", "notBusy(QString)" ); 661 QCopEnvelope e( "QPE/System", "notBusy(QString)" );
503 e << d->appName; 662 e << d->appName;
504 } 663 }
505 d->notbusysent = TRUE; 664 d->notbusysent = TRUE;
506 } 665 }
507 if ( type() == GuiServer ) { 666 if ( type() == GuiServer ) {
508 switch ( e->type ) { 667 switch ( e->type ) {
509 case QWSEvent::Mouse: 668 case QWSEvent::Mouse:
510 if ( e->asMouse() ->simpleData.state && !QWidget::find( e->window() ) ) 669 if ( e->asMouse() ->simpleData.state && !QWidget::find( e->window() ) )
511 emit clientMoused(); 670 emit clientMoused();
512 } 671 break;
513 } 672 default:
514 if ( e->type == QWSEvent::Key ) { 673 break;
515 if ( d->kbgrabber == 1 ) 674 }
516 return TRUE; 675 }
517 QWSKeyEvent *ke = ( QWSKeyEvent * ) e; 676 if ( e->type == QWSEvent::Key ) {
518 if ( ke->simpleData.keycode == Qt::Key_F33 ) { 677 if ( d->kbgrabber == 1 )
519 // Use special "OK" key to press "OK" on top level widgets 678 return TRUE;
520 QWidget * active = activeWindow(); 679 QWSKeyEvent *ke = ( QWSKeyEvent * ) e;
521 QWidget *popup = 0; 680 if ( ke->simpleData.keycode == Qt::Key_F33 ) {
522 if ( active && active->isPopup() ) { 681 // Use special "OK" key to press "OK" on top level widgets
523 popup = active; 682 QWidget * active = activeWindow();
524 active = active->parentWidget(); 683 QWidget *popup = 0;
525 } 684 if ( active && active->isPopup() ) {
526 if ( active && ( int ) active->winId() == ke->simpleData.window && 685 popup = active;
527 !active->testWFlags( WStyle_Customize | WType_Popup | WType_Desktop ) ) { 686 active = active->parentWidget();
528 if ( ke->simpleData.is_press ) { 687 }
529 if ( popup ) 688 if ( active && ( int ) active->winId() == ke->simpleData.window &&
530 popup->close(); 689 !active->testWFlags( WStyle_Customize | WType_Popup | WType_Desktop ) ) {
531 if ( active->inherits( "QDialog" ) ) { 690 if ( ke->simpleData.is_press ) {
532 HackDialog * d = ( HackDialog * ) active; 691 if ( popup )
533 d->acceptIt(); 692 popup->close();
534 return TRUE; 693 if ( active->inherits( "QDialog" ) ) {
535 } 694 HackDialog * d = ( HackDialog * ) active;
536 else if ( ( ( HackWidget * ) active ) ->needsOk() ) { 695 d->acceptIt();
537 QSignal s; 696 return TRUE;
538 s.connect( active, SLOT( accept() ) ); 697 }
539 s.activate(); 698 else if ( ( ( HackWidget * ) active ) ->needsOk() ) {
540 } 699 QSignal s;
541 else { 700 s.connect( active, SLOT( accept() ) );
542 // do the same as with the select key: Map to the default action of the widget: 701 s.activate();
543 mapToDefaultAction( ke, Qt::Key_Return ); 702 }
544 } 703 else {
545 } 704 // do the same as with the select key: Map to the default action of the widget:
546 } 705 mapToDefaultAction( ke, Qt::Key_Return );
547 } 706 }
548 else if ( ke->simpleData.keycode == Qt::Key_F30 ) { 707 }
549 // Use special "select" key to do whatever default action a widget has 708 }
550 mapToDefaultAction( ke, Qt::Key_Space ); 709 } else if ( ke->simpleData.keycode == Qt::Key_F30 ) {
551 } 710 // Use special "select" key to do whatever default action a widget has
552 else if ( ke->simpleData.keycode == Qt::Key_Escape && 711 mapToDefaultAction( ke, Qt::Key_Space );
553 ke->simpleData.is_press ) { 712 }
554 // Escape key closes app if focus on toplevel 713 else if ( ke->simpleData.keycode == Qt::Key_Escape &&
555 QWidget * active = activeWindow(); 714 ke->simpleData.is_press ) {
556 if ( active && active->testWFlags( WType_TopLevel ) && 715 // Escape key closes app if focus on toplevel
557 ( int ) active->winId() == ke->simpleData.window && 716 QWidget * active = activeWindow();
558 !active->testWFlags( WStyle_Dialog | WStyle_Customize | WType_Popup | WType_Desktop ) ) { 717 if ( active && active->testWFlags( WType_TopLevel ) &&
559 if ( active->inherits( "QDialog" ) ) { 718 ( int ) active->winId() == ke->simpleData.window &&
560 HackDialog * d = ( HackDialog * ) active; 719 !active->testWFlags( WStyle_Dialog | WStyle_Customize | WType_Popup | WType_Desktop ) ) {
561 d->rejectIt(); 720 if ( active->inherits( "QDialog" ) ) {
562 return TRUE; 721 HackDialog * d = ( HackDialog * ) active;
563 } 722 d->rejectIt();
564 else if ( strcmp( argv() [ 0 ], "embeddedkonsole" ) != 0 ) { 723 return TRUE;
565 active->close(); 724 }
566 } 725 else if ( strcmp( argv() [ 0 ], "embeddedkonsole" ) != 0 ) {
567 } 726 active->close();
568 } 727 }
728 }
729 }
569 730
570#if QT_VERSION < 231 731#if QT_VERSION < 231
571 // Filter out the F4/Launcher key from apps 732 // Filter out the F4/Launcher key from apps
572 // ### The launcher key may not always be F4 on all devices 733 // ### The launcher key may not always be F4 on all devices
573 if ( ( ( QWSKeyEvent * ) e ) ->simpleData.keycode == Qt::Key_F4 ) 734 if ( ( ( QWSKeyEvent * ) e ) ->simpleData.keycode == Qt::Key_F4 )
574 return TRUE; 735 return TRUE;
575#endif 736#endif
576 737
577 } 738 }
578 if ( e->type == QWSEvent::Focus ) { 739 if ( e->type == QWSEvent::Focus ) {
579 QWSFocusEvent * fe = ( QWSFocusEvent* ) e; 740 QWSFocusEvent * fe = ( QWSFocusEvent* ) e;
580 QWidget* nfw = QWidget::find( e->window() ); 741 QWidget* nfw = QWidget::find( e->window() );
581 if ( !fe->simpleData.get_focus ) { 742 if ( !fe->simpleData.get_focus ) {
582 QWidget * active = activeWindow(); 743 QWidget * active = activeWindow();
583 while ( active && active->isPopup() ) { 744 while ( active && active->isPopup() ) {
584 active->close(); 745 active->close();
585 active = activeWindow(); 746 active = activeWindow();
586 } 747 }
587 if ( !nfw && d->kbgrabber == 2 ) { 748 if ( !nfw && d->kbgrabber == 2 ) {
588 ungrabKeyboard(); 749 ungrabKeyboard();
589 d->kbregrab = TRUE; // want kb back when we're active 750 d->kbregrab = TRUE; // want kb back when we're active
590 } 751 }
591 } 752 }
592 else { 753 else {
593 // make sure our modal widget is ALWAYS on top 754 // make sure our modal widget is ALWAYS on top
594 QWidget *topm = activeModalWidget(); 755 QWidget *topm = activeModalWidget();
595 if ( topm ) { 756 if ( topm ) {
596 topm->raise(); 757 topm->raise();
597 } 758 }
598 if ( d->kbregrab ) { 759 if ( d->kbregrab ) {
599 grabKeyboard(); 760 grabKeyboard();
600 d->kbregrab = FALSE; 761 d->kbregrab = FALSE;
601 } 762 }
602 } 763 }
603 if ( fe->simpleData.get_focus && inputMethodDict ) { 764 if ( fe->simpleData.get_focus && inputMethodDict ) {
604 InputMethodHint m = inputMethodHint( QWidget::find( e->window() ) ); 765 InputMethodHint m = inputMethodHint( QWidget::find( e->window() ) );
605 if ( m == AlwaysOff ) 766 if ( m == AlwaysOff )
606 Global::hideInputMethod(); 767 Global::hideInputMethod();
607 if ( m == AlwaysOn ) 768 if ( m == AlwaysOn )
608 Global::showInputMethod(); 769 Global::showInputMethod();
609 } 770 }
610 } 771 }
611 return QApplication::qwsEventFilter( e ); 772 return QApplication::qwsEventFilter( e );
612} 773}
774#endif
613 775
614/*! 776/*!
615 Destroys the QPEApplication. 777 Destroys the QPEApplication.
616*/ 778*/
617QPEApplication::~QPEApplication() 779QPEApplication::~QPEApplication()
618{ 780{
619 ungrabKeyboard(); 781 ungrabKeyboard();
620#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 782#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
621 // Need to delete QCopChannels early, since the display will 783 // Need to delete QCopChannels early, since the display will
622 // be gone by the time we get to ~QObject(). 784 // be gone by the time we get to ~QObject().
623 delete sysChannel; 785 delete sysChannel;
624 delete pidChannel; 786 delete pidChannel;
625#endif 787#endif
626 788
627 delete d; 789 delete d;
628} 790}
629 791
630/*! 792/*!
631 Returns <tt>$OPIEDIR/</tt>. 793 Returns <tt>$OPIEDIR/</tt>.
632*/ 794*/
633QString QPEApplication::qpeDir() 795QString QPEApplication::qpeDir()
634{ 796{
635 const char * base = getenv( "OPIEDIR" ); 797 const char * base = getenv( "OPIEDIR" );
636 if ( base ) 798 if ( base )
637 return QString( base ) + "/"; 799 return QString( base ) + "/";
638 800
639 return QString( "../" ); 801 return QString( "../" );
640} 802}
641 803
642/*! 804/*!
643 Returns the user's current Document directory. There is a trailing "/". 805 Returns the user's current Document directory. There is a trailing "/".
644*/ 806*/
645QString QPEApplication::documentDir() 807QString QPEApplication::documentDir()
646{ 808{
647 const char * base = getenv( "HOME" ); 809 return QString( qpeDir() + "Documents");
648 if ( base )
649 return QString( base ) + "/Documents/";
650
651 return QString( "../Documents/" );
652} 810}
653 811
654static int deforient = -1; 812static int deforient = -1;
655 813
656/*! 814/*!
657 \internal 815 \internal
658*/ 816*/
659int QPEApplication::defaultRotation() 817int QPEApplication::defaultRotation()
660{ 818{
661 if ( deforient < 0 ) { 819 if ( deforient < 0 ) {
662 QString d = getenv( "QWS_DISPLAY" ); 820 QString d = getenv( "QWS_DISPLAY" );
663 if ( d.contains( "Rot90" ) ) { 821 if ( d.contains( "Rot90" ) ) {
664 deforient = 90; 822 deforient = 90;
665 } 823 }
666 else if ( d.contains( "Rot180" ) ) { 824 else if ( d.contains( "Rot180" ) ) {
667 deforient = 180; 825 deforient = 180;
668 } 826 }
669 else if ( d.contains( "Rot270" ) ) { 827 else if ( d.contains( "Rot270" ) ) {
670 deforient = 270; 828 deforient = 270;
671 } 829 }
672 else { 830 else {
673 deforient = 0; 831 deforient = 0;
674 } 832 }
675 } 833 }
676 return deforient; 834 return deforient;
677} 835}
678 836
679/*! 837/*!
680 \internal 838 \internal
681*/ 839*/
682void QPEApplication::setDefaultRotation( int r ) 840void QPEApplication::setDefaultRotation( int r )
683{ 841{
684 if ( qApp->type() == GuiServer ) { 842 if ( qApp->type() == GuiServer ) {
685 deforient = r; 843 deforient = r;
686 setenv( "QWS_DISPLAY", QString( "Transformed:Rot%1:0" ).arg( r ).latin1(), 1 ); 844 setenv( "QWS_DISPLAY", QString( "Transformed:Rot%1:0" ).arg( r ).latin1(), 1 );
687 } 845 Config config("qpe");
688 else { 846 config.setGroup( "Rotation" );
689 QCopEnvelope( "QPE/System", "setDefaultRotation(int)" ) << r; 847 config.writeEntry( "Screen", getenv("QWS_DISPLAY") );
690 } 848 } else {
849#ifndef QT_NO_COP
850 { QCopEnvelope e( "QPE/System", "setDefaultRotation(int)" ); e << r; }
851#endif
852 }
691} 853}
692 854
693/*! 855/*!
694 \internal 856 \internal
695*/ 857*/
696void QPEApplication::applyStyle() 858void QPEApplication::applyStyle()
697{ 859{
698 Config config( "qpe" ); 860 Config config( "qpe" );
@@ -717,789 +879,736 @@ void QPEApplication::applyStyle()
717 pal.setColor( QPalette::Active, QColorGroup::ButtonText, QColor( color ) ); 879 pal.setColor( QPalette::Active, QColorGroup::ButtonText, QColor( color ) );
718 color = config.readEntry( "Base", "#FFFFFF" ); 880 color = config.readEntry( "Base", "#FFFFFF" );
719 pal.setColor( QColorGroup::Base, QColor( color ) ); 881 pal.setColor( QColorGroup::Base, QColor( color ) );
720 882
721 pal.setColor( QPalette::Disabled, QColorGroup::Text, 883 pal.setColor( QPalette::Disabled, QColorGroup::Text,
722 pal.color( QPalette::Active, QColorGroup::Background ).dark() ); 884 pal.color( QPalette::Active, QColorGroup::Background ).dark() );
723 885
724 setPalette( pal, TRUE ); 886 setPalette( pal, TRUE );
887
888 // Window Decoration
889 QString dec = config.readEntry( "Decoration", "Qtopia" );
890 if ( dec != d->decorationName ) {
891 qwsSetDecoration( new QPEDecoration( dec ) );
892 d->decorationName = dec;
893 }
894
895 // Font
896 QString ff = config.readEntry( "FontFamily", font().family() );
897 int fs = config.readNumEntry( "FontSize", font().pointSize() );
898 setFont( QFont(ff,fs) );
725} 899}
726 900
727void QPEApplication::systemMessage( const QCString & msg, const QByteArray & data ) 901void QPEApplication::systemMessage( const QCString& msg, const QByteArray& data )
728{ 902{
729#ifdef Q_WS_QWS 903#ifdef Q_WS_QWS
730 QDataStream stream( data, IO_ReadOnly ); 904 QDataStream stream( data, IO_ReadOnly );
731 if ( msg == "applyStyle()" ) { 905 if ( msg == "applyStyle()" ) {
732 applyStyle(); 906 applyStyle();
733 } 907 } else if ( msg == "setDefaultRotation(int)" ) {
734 else if ( msg == "setDefaultRotation(int)" ) { 908 if ( type() == GuiServer ) {
735 if ( type() == GuiServer ) { 909 int r;
736 int r; 910 stream >> r;
737 stream >> r; 911 setDefaultRotation( r );
738 setDefaultRotation( r ); 912 }
739 } 913 } else if ( msg == "shutdown()" ) {
740 } 914 if ( type() == GuiServer )
741 else if ( msg == "shutdown()" ) { 915 shutdown();
742 if ( type() == GuiServer ) 916 } else if ( msg == "quit()" ) {
743 shutdown(); 917 if ( type() != GuiServer )
744 } 918 tryQuit();
745 else if ( msg == "quit()" ) { 919 } else if ( msg == "forceQuit()" ) {
746 if ( type() != GuiServer ) 920 if ( type() != GuiServer )
747 tryQuit(); 921 quit();
748 } 922 } else if ( msg == "restart()" ) {
749 else if ( msg == "forceQuit()" ) { 923 if ( type() == GuiServer )
750 if ( type() != GuiServer ) 924 restart();
751 quit(); 925 } else if ( msg == "grabKeyboard(QString)" ) {
752 } 926 QString who;
753 else if ( msg == "restart()" ) { 927 stream >> who;
754 if ( type() == GuiServer ) 928 if ( who.isEmpty() )
755 restart(); 929 d->kbgrabber = 0;
756 } 930 else if ( who != d->appName )
757 else if ( msg == "grabKeyboard(QString)" ) { 931 d->kbgrabber = 1;
758 QString who; 932 else
759 stream >> who; 933 d->kbgrabber = 2;
760 if ( who.isEmpty() ) 934 } else if ( msg == "language(QString)" ) {
761 d->kbgrabber = 0; 935 if ( type() == GuiServer ) {
762 else if ( who != d->appName ) 936 QString l;
763 d->kbgrabber = 1; 937 stream >> l;
764 else 938 QString cl = getenv( "LANG" );
765 d->kbgrabber = 2; 939 if ( cl != l ) {
766 940 if ( l.isNull() )
767 printf( "'%s' received grabKeyboard ( '%s' ) -> kbgrabber = %d\n", d-> appName.latin1(), who.latin1(), d-> kbgrabber ); 941 unsetenv( "LANG" );
768 } 942 else
769 else if ( msg == "language(QString)" ) { 943 setenv( "LANG", l.latin1(), 1 );
770 if ( type() == GuiServer ) { 944 restart();
771 QString l; 945 }
772 stream >> l; 946 }
773 QString cl = getenv( "LANG" ); 947 } else if ( msg == "timeChange(QString)" ) {
774 if ( cl != l ) { 948 QString t;
775 if ( l.isNull() ) 949 stream >> t;
776 unsetenv( "LANG" ); 950 if ( t.isNull() )
777 else 951 unsetenv( "TZ" );
778 setenv( "LANG", l.latin1(), 1 ); 952 else
779 restart(); 953 setenv( "TZ", t.latin1(), 1 );
780 } 954 // emit the signal so everyone else knows...
781 } 955 emit timeChanged();
782 } 956 } else if ( msg == "execute(QString)" ) {
783 else if ( msg == "timeChange(QString)" ) { 957 if ( type() == GuiServer ) {
784 QString t; 958 QString t;
785 stream >> t; 959 stream >> t;
786 if ( t.isNull() ) 960 Global::execute( t );
787 unsetenv( "TZ" ); 961 }
788 else 962 } else if ( msg == "execute(QString,QString)" ) {
789 setenv( "TZ", t.latin1(), 1 ); 963 if ( type() == GuiServer ) {
790 // emit the signal so everyone else knows... 964 QString t, d;
791 emit timeChanged(); 965 stream >> t >> d;
792 } 966 Global::execute( t, d );
793 else if ( msg == "execute(QString)" ) { 967 }
794 if ( type() == GuiServer ) { 968 } else if ( msg == "addAlarm(QDateTime,QCString,QCString,int)" ) {
795 QString t; 969 if ( type() == GuiServer ) {
796 stream >> t; 970 QDateTime when;
797 Global::execute( t ); 971 QCString channel, message;
798 } 972 int data;
799 } 973 stream >> when >> channel >> message >> data;
800 else if ( msg == "execute(QString,QString)" ) { 974 AlarmServer::addAlarm( when, channel, message, data );
801 if ( type() == GuiServer ) { 975 }
802 QString t, d; 976 } else if ( msg == "deleteAlarm(QDateTime,QCString,QCString,int)" ) {
803 stream >> t >> d; 977 if ( type() == GuiServer ) {
804 Global::execute( t, d ); 978 QDateTime when;
805 } 979 QCString channel, message;
806 } 980 int data;
807 else if ( msg == "addAlarm(QDateTime,QCString,QCString,int)" ) { 981 stream >> when >> channel >> message >> data;
808 if ( type() == GuiServer ) { 982 AlarmServer::deleteAlarm( when, channel, message, data );
809 QDateTime when; 983 }
810 QCString channel, message; 984 } else if ( msg == "clockChange(bool)" ) {
811 int data; 985 int tmp;
812 stream >> when >> channel >> message >> data; 986 stream >> tmp;
813 AlarmServer::addAlarm( when, channel, message, data ); 987 emit clockChanged( tmp );
814 } 988 } else if ( msg == "weekChange(bool)" ) {
815 } 989 int tmp;
816 else if ( msg == "deleteAlarm(QDateTime,QCString,QCString,int)" ) { 990 stream >> tmp;
817 if ( type() == GuiServer ) { 991 emit weekChanged( tmp );
818 QDateTime when; 992 } else if ( msg == "setDateFormat(DateFormat)" ) {
819 QCString channel, message; 993 DateFormat tmp;
820 int data; 994 stream >> tmp;
821 stream >> when >> channel >> message >> data; 995 emit dateFormatChanged( tmp );
822 AlarmServer::deleteAlarm( when, channel, message, data ); 996 } else if ( msg == "setVolume(int,int)" ) {
823 } 997 int t, v;
824 } 998 stream >> t >> v;
825 else if ( msg == "clockChange(bool)" ) { 999 setVolume( t, v );
826 int tmp; 1000 emit volumeChanged( muted );
827 stream >> tmp; 1001 } else if ( msg == "volumeChange(bool)" ) {
828 emit clockChanged( tmp ); 1002 stream >> muted;
829 } 1003 setVolume();
830 else if ( msg == "weekChange(bool)" ) { 1004 emit volumeChanged( muted );
831 int tmp; 1005 } else if ( msg == "setMic(int,int)" ) { // Added: 2002-02-08 by Jeremy Cowgar <jc@cowgar.com>
832 stream >> tmp; 1006 int t, v;
833 emit weekChanged( tmp ); 1007 stream >> t >> v;
834 } 1008 setMic( t, v );
835 else if ( msg == "setDateFormat(DateFormat)" ) { 1009 emit micChanged( micMuted );
836 DateFormat tmp; 1010 } else if ( msg == "micChange(bool)" ) { // Added: 2002-02-08 by Jeremy Cowgar <jc@cowgar.com>
837 stream >> tmp; 1011 stream >> micMuted;
838 emit dateFormatChanged( tmp ); 1012 setMic();
839 } 1013 emit micChanged( micMuted );
840 else if ( msg == "setVolume(int,int)" ) { 1014 }
841 int t, v;
842 stream >> t >> v;
843 setVolume( t, v );
844 emit volumeChanged( muted );
845 }
846 else if ( msg == "volumeChange(bool)" ) {
847 stream >> muted;
848 setVolume();
849 emit volumeChanged( muted );
850 }
851 else if ( msg == "setMic(int,int)" ) { // Added: 2002-02-08 by Jeremy Cowgar <jc@cowgar.com>
852 int t, v;
853 stream >> t >> v;
854 setMic( t, v );
855 emit micChanged( micMuted );
856 }
857 else if ( msg == "micChange(bool)" ) { // Added: 2002-02-08 by Jeremy Cowgar <jc@cowgar.com>
858 stream >> micMuted;
859 setMic();
860 emit micChanged( micMuted );
861 }
862#endif 1015#endif
863} 1016}
864 1017
865/*! 1018/*!
866 \internal 1019 \internal
867*/ 1020*/
868bool QPEApplication::raiseAppropriateWindow() 1021bool QPEApplication::raiseAppropriateWindow()
869{ 1022{
870 bool r = FALSE; 1023 bool r=FALSE;
871 // ########## raise()ing main window should raise and set active 1024 // ########## raise()ing main window should raise and set active
872 // ########## it and then all childen. This belongs in Qt/Embedded 1025 // ########## it and then all childen. This belongs in Qt/Embedded
873 QWidget *top = d->qpe_main_widget; 1026 QWidget *top = d->qpe_main_widget;
874 if ( !top ) 1027 if ( !top ) top =mainWidget();
875 top = mainWidget(); 1028 if ( top && d->keep_running ) {
876 if ( top && d->keep_running ) { 1029 if ( top->isVisible() )
877 if ( top->isVisible() ) 1030 r = TRUE;
878 r = TRUE; 1031 else if (d->preloaded) {
879#ifdef Q_WS_QWS 1032 // We are preloaded and not visible.. pretend we just started..
880 1033 QCopEnvelope e("QPE/System", "fastAppShowing(QString)");
881 if ( !d->nomaximize ) 1034 e << d->appName;
882 top->showMaximized(); 1035 }
883 else 1036
884#endif 1037 d->show_mx(top,d->nomaximize);
885 1038 top->raise();
886 top->show(); 1039 top->setActiveWindow();
887 top->raise(); 1040 }
888 top->setActiveWindow(); 1041 QWidget *topm = activeModalWidget();
889 } 1042 if ( topm && topm != top ) {
890 QWidget *topm = activeModalWidget(); 1043 topm->show();
891 if ( topm && topm != top ) { 1044 topm->raise();
892 topm->show(); 1045 topm->setActiveWindow();
893 topm->raise(); 1046 // If we haven't already handled the fastAppShowing message
894 topm->setActiveWindow(); 1047 if (!top && d->preloaded) {
895 r = FALSE; 1048 QCopEnvelope e("QPE/System", "fastAppShowing(QString)");
896 } 1049 e << d->appName;
897 return r; 1050 }
1051 r = FALSE;
1052 }
1053 return r;
898} 1054}
899 1055
900void QPEApplication::pidMessage( const QCString &msg, const QByteArray & data ) 1056void QPEApplication::pidMessage( const QCString& msg, const QByteArray& data)
901{ 1057{
902#ifdef Q_WS_QWS 1058#ifdef Q_WS_QWS
903 1059
904 if ( msg == "quit()" ) { 1060 if ( msg == "quit()" ) {
905 tryQuit(); 1061 tryQuit();
906 } 1062 } else if ( msg == "quitIfInvisible()" ) {
907 else if ( msg == "quitIfInvisible()" ) { 1063 if ( d->qpe_main_widget && !d->qpe_main_widget->isVisible() )
908 if ( d->qpe_main_widget && !d->qpe_main_widget->isVisible() ) 1064 quit();
909 quit(); 1065 } else if ( msg == "close()" ) {
910 } 1066 hideOrQuit();
911 else if ( msg == "close()" ) { 1067 } else if ( msg == "disablePreload()" ) {
912 hideOrQuit(); 1068 d->preloaded = FALSE;
913 } 1069 d->keep_running = TRUE;
914 else if ( msg == "disablePreload()" ) { 1070 /* so that quit will quit */
915 d->preloaded = FALSE; 1071 } else if ( msg == "enablePreload()" ) {
916 d->keep_running = TRUE; 1072 if (d->qpe_main_widget)
917 /* so that quit will quit */ 1073 d->preloaded = TRUE;
918 } 1074 d->keep_running = TRUE;
919 else if ( msg == "enablePreload()" ) { 1075 /* so next quit won't quit */
920 d->preloaded = TRUE; 1076 } else if ( msg == "raise()" ) {
921 d->keep_running = TRUE; 1077 d->keep_running = TRUE;
922 /* so next quit won't quit */ 1078 d->notbusysent = FALSE;
923 } 1079 raiseAppropriateWindow();
924 else if ( msg == "raise()" ) { 1080 // Tell the system we're still chugging along...
925 d->keep_running = TRUE; 1081 QCopEnvelope e("QPE/System", "appRaised(QString)");
926 d->notbusysent = FALSE; 1082 e << d->appName;
927 raiseAppropriateWindow(); 1083 } else if ( msg == "flush()" ) {
928 } 1084 emit flush();
929 else if ( msg == "flush()" ) { 1085 // we need to tell the desktop
930 emit flush(); 1086 QCopEnvelope e( "QPE/Desktop", "flushDone(QString)" );
931 // we need to tell the desktop 1087 e << d->appName;
932 QCopEnvelope e( "QPE/Desktop", "flushDone(QString)" ); 1088 } else if ( msg == "reload()" ) {
933 e << d->appName; 1089 emit reload();
934 } 1090 } else if ( msg == "setDocument(QString)" ) {
935 else if ( msg == "reload()" ) { 1091 d->keep_running = TRUE;
936 emit reload(); 1092 QDataStream stream( data, IO_ReadOnly );
937 } 1093 QString doc;
938 else if ( msg == "setDocument(QString)" ) { 1094 stream >> doc;
939 d->keep_running = TRUE; 1095 QWidget *mw = mainWidget();
940 QDataStream stream( data, IO_ReadOnly ); 1096 if ( !mw )
941 QString doc; 1097 mw = d->qpe_main_widget;
942 stream >> doc; 1098 if ( mw )
943 QWidget *mw = mainWidget(); 1099 Global::setDocument( mw, doc );
944 if ( !mw ) 1100 } else if ( msg == "nextView()" ) {
945 mw = d->qpe_main_widget; 1101 qDebug("got nextView()");
946 if ( mw ) 1102/*
947 Global::setDocument( mw, doc ); 1103 if ( raiseAppropriateWindow() )
948 } 1104*/
949 else if ( msg == "nextView()" ) { 1105 emit appMessage( msg, data);
950 if ( raiseAppropriateWindow() ) 1106 } else {
951 emit appMessage( msg, data ); 1107 emit appMessage( msg, data);
952 } 1108 }
953 else {
954 emit appMessage( msg, data );
955 }
956#endif
957}
958
959 1109
960static bool setWidgetCaptionFromAppName( QWidget* /*mw*/, const QString& /*appName*/, const QString& /*appsPath*/ ) 1110#endif
961{
962 /*
963 // This works but disable it for now until it is safe to apply
964 // What is does is scan the .desktop files of all the apps for
965 // the applnk that has the corresponding argv[0] as this program
966 // then it uses the name stored in the .desktop file as the caption
967 // for the main widget. This saves duplicating translations for
968 // the app name in the program and in the .desktop files.
969
970 AppLnkSet apps( appsPath );
971
972 QList<AppLnk> appsList = apps.children();
973 for ( QListIterator<AppLnk> it(appsList); it.current(); ++it ) {
974 if ( (*it)->exec() == appName ) {
975 mw->setCaption( (*it)->name() );
976 return TRUE;
977 }
978 }
979 */
980 return FALSE;
981} 1111}
982 1112
983 1113
984/*! 1114/*!
985 Sets \a mw as the mainWidget() and shows it. For small windows, 1115 Sets widget \a mw as the mainWidget() and shows it. For small windows,
986 consider passing TRUE for \a nomaximize rather than the default FALSE. 1116 consider passing TRUE for \a nomaximize rather than the default FALSE.
987 1117
988 \sa showMainDocumentWidget() 1118 \sa showMainDocumentWidget()
989*/ 1119*/
990void QPEApplication::showMainWidget( QWidget* mw, bool nomaximize ) 1120void QPEApplication::showMainWidget( QWidget* mw, bool nomaximize )
991{ 1121{
992 setWidgetCaptionFromAppName( mw, d->appName, qpeDir() + "apps" ); 1122 d->show(mw,nomaximize );
993
994 d->nomaximize = nomaximize;
995 d->qpe_main_widget = mw;
996 d->sendQCopQ();
997 if ( d->preloaded ) {
998 if ( d->forceshow ) {
999#ifdef Q_WS_QWS
1000 if ( !nomaximize )
1001 mw->showMaximized();
1002 else
1003#endif
1004
1005 mw->show();
1006 }
1007 }
1008 else if ( d->keep_running ) {
1009#ifdef Q_WS_QWS
1010 if ( !nomaximize )
1011 mw->showMaximized();
1012 else
1013#endif
1014
1015 mw->show();
1016 }
1017} 1123}
1018 1124
1019/*! 1125/*!
1020 Sets \a mw as the mainWidget() and shows it. For small windows, 1126 Sets widget \a mw as the mainWidget() and shows it. For small windows,
1021 consider passing TRUE for \a nomaximize rather than the default FALSE. 1127 consider passing TRUE for \a nomaximize rather than the default FALSE.
1022 1128
1023 This calls designates the application as 1129 This calls designates the application as
1024 a \link docwidget.html document-oriented\endlink application. 1130 a \link docwidget.html document-oriented\endlink application.
1025 1131
1026 The \a mw widget must have a slot: setDocument(const QString&). 1132 The \a mw widget \e must have this slot: setDocument(const QString&).
1027 1133
1028 \sa showMainWidget() 1134 \sa showMainWidget()
1029*/ 1135*/
1030void QPEApplication::showMainDocumentWidget( QWidget* mw, bool nomaximize ) 1136void QPEApplication::showMainDocumentWidget( QWidget* mw, bool nomaximize )
1031{ 1137{
1032 setWidgetCaptionFromAppName( mw, d->appName, qpeDir() + "apps" ); 1138 if ( mw && argc() == 2 )
1033 1139 Global::setDocument( mw, QString::fromUtf8(argv()[1]) );
1034 if ( mw && argc() == 2 )
1035 Global::setDocument( mw, QString::fromUtf8( argv() [ 1 ] ) );
1036 d->nomaximize = nomaximize;
1037 d->qpe_main_widget = mw;
1038 d->sendQCopQ();
1039 if ( d->preloaded ) {
1040 if ( d->forceshow ) {
1041#ifdef Q_WS_QWS
1042 if ( !nomaximize )
1043 mw->showMaximized();
1044 else
1045#endif
1046 1140
1047 mw->show(); 1141 d->show(mw, nomaximize );
1048 }
1049 }
1050 else if ( d->keep_running ) {
1051#ifdef Q_WS_QWS
1052 if ( !nomaximize )
1053 mw->showMaximized();
1054 else
1055#endif
1056
1057 mw->show();
1058 }
1059} 1142}
1060 1143
1061 1144
1062/*! 1145/*!
1063 Sets that the application should continue running after processing 1146 If an application is started via a \link qcop.html QCop\endlink
1064 qcop messages. Normally if an application is started via a qcop message, 1147 message, the application will process the \link qcop.html
1065 the application will process the qcop message and then quit. If while 1148 QCop\endlink message and then quit. If the application calls this
1066 processing the qcop message it calls this function, then the application 1149 function while processing a \link qcop.html QCop\endlink message,
1067 will show and start proper once it has finished processing qcop messages. 1150 after processing its outstanding \link qcop.html QCop\endlink
1151 messages the application will start 'properly' and show itself.
1068 1152
1069 \sa keepRunning() 1153 \sa keepRunning()
1070*/ 1154*/
1071void QPEApplication::setKeepRunning() 1155void QPEApplication::setKeepRunning()
1072{ 1156{
1073 if ( qApp && qApp->inherits( "QPEApplication" ) ) { 1157 if ( qApp && qApp->inherits( "QPEApplication" ) ) {
1074 QPEApplication * qpeApp = ( QPEApplication* ) qApp; 1158 QPEApplication * qpeApp = ( QPEApplication* ) qApp;
1075 qpeApp->d->keep_running = TRUE; 1159 qpeApp->d->keep_running = TRUE;
1076 } 1160 }
1077} 1161}
1078 1162
1079/*! 1163/*!
1080 Returns whether the application will quit after processing the current 1164 Returns TRUE if the application will quit after processing the
1081 list of qcop messages. 1165 current list of qcop messages; otherwise returns FALSE.
1082 1166
1083 \sa setKeepRunning() 1167 \sa setKeepRunning()
1084*/ 1168*/
1085bool QPEApplication::keepRunning() const 1169bool QPEApplication::keepRunning() const
1086{ 1170{
1087 return d->keep_running; 1171 return d->keep_running;
1088} 1172}
1089 1173
1090/*! 1174/*!
1091 \internal 1175 \internal
1092*/ 1176*/
1093void QPEApplication::internalSetStyle( const QString &style ) 1177void QPEApplication::internalSetStyle( const QString &style )
1094{ 1178{
1095#if QT_VERSION >= 300 1179#if QT_VERSION >= 300
1096 if ( style == "QPE" ) { 1180 if ( style == "QPE" ) {
1097 setStyle( new QPEStyle ); 1181 setStyle( new QPEStyle );
1098 } 1182 }
1099 else { 1183 else {
1100 QStyle *s = QStyleFactory::create( style ); 1184 QStyle *s = QStyleFactory::create( style );
1101 if ( s ) 1185 if ( s )
1102 setStyle( s ); 1186 setStyle( s );
1103 } 1187 }
1104#else 1188#else
1105 if ( style == "Windows" ) { 1189 if ( style == "Windows" ) {
1106 setStyle( new QWindowsStyle ); 1190 setStyle( new QWindowsStyle );
1107 } 1191 }
1108 else if ( style == "QPE" ) { 1192 else if ( style == "QPE" ) {
1109 setStyle( new QPEStyle ); 1193 setStyle( new QPEStyle );
1110 } 1194 }
1111 else if ( style == "Light" ) { 1195 else if ( style == "Light" ) {
1112 setStyle( new LightStyle ); 1196 setStyle( new LightStyle );
1113 } 1197 }
1114#ifndef QT_NO_STYLE_PLATINUM 1198#ifndef QT_NO_STYLE_PLATINUM
1115 else if ( style == "Platinum" ) { 1199 else if ( style == "Platinum" ) {
1116 setStyle( new QPlatinumStyle ); 1200 setStyle( new QPlatinumStyle );
1117 } 1201 }
1118#endif 1202#endif
1119#ifndef QT_NO_STYLE_MOTIF 1203#ifndef QT_NO_STYLE_MOTIF
1120 else if ( style == "Motif" ) { 1204 else if ( style == "Motif" ) {
1121 setStyle( new QMotifStyle ); 1205 setStyle( new QMotifStyle );
1122 } 1206 }
1123#endif 1207#endif
1124#ifndef QT_NO_STYLE_MOTIFPLUS 1208#ifndef QT_NO_STYLE_MOTIFPLUS
1125 else if ( style == "MotifPlus" ) { 1209 else if ( style == "MotifPlus" ) {
1126 setStyle( new QMotifPlusStyle ); 1210 setStyle( new QMotifPlusStyle );
1127 } 1211 }
1128#endif 1212#endif
1129 1213
1130 else { 1214 else {
1131 QStyle *sty = 0; 1215 QStyle *sty = 0;
1132 QString path = QPEApplication::qpeDir ( ) + "/plugins/styles/lib" + style. lower ( ) + ".so"; 1216 QString path = QPEApplication::qpeDir ( ) + "/plugins/styles/lib" + style. lower ( ) + ".so";
1133 1217
1134 static QLibrary *lastlib = 0; 1218 static QLibrary *lastlib = 0;
1135 static StyleInterface *lastiface = 0; 1219 static StyleInterface *lastiface = 0;
1136 1220
1137 QLibrary *lib = new QLibrary ( path ); 1221 QLibrary *lib = new QLibrary ( path );
1138 StyleInterface *iface = 0; 1222 StyleInterface *iface = 0;
1139 1223
1140 if ( lib-> queryInterface ( IID_Style, ( QUnknownInterface ** ) &iface ) == QS_OK ) 1224 if ( lib-> queryInterface ( IID_Style, ( QUnknownInterface ** ) &iface ) == QS_OK )
1141 sty = iface-> create ( ); 1225 sty = iface-> create ( );
1142 1226
1143 if ( sty ) { 1227 if ( sty ) {
1144 setStyle ( sty ); 1228 setStyle ( sty );
1145 1229
1146 if ( lastiface ) 1230 if ( lastiface )
1147 lastiface-> release ( ); 1231 lastiface-> release ( );
1148 lastiface = iface; 1232 lastiface = iface;
1149 1233
1150 if ( lastlib ) { 1234 if ( lastlib ) {
1151 lastlib-> unload ( ); 1235 lastlib-> unload ( );
1152 delete lastlib; 1236 delete lastlib;
1153 } 1237 }
1154 lastlib = lib; 1238 lastlib = lib;
1155 } 1239 }
1156 else { 1240 else {
1157 if ( iface ) 1241 if ( iface )
1158 iface-> release ( ); 1242 iface-> release ( );
1159 delete lib; 1243 delete lib;
1160 1244
1161 setStyle ( new QPEStyle ( )); 1245 setStyle ( new QPEStyle ( ));
1162 } 1246 }
1163 } 1247 }
1164#endif 1248#endif
1165} 1249}
1166 1250
1167/*! 1251/*!
1168 \internal 1252 \internal
1169*/ 1253*/
1170void QPEApplication::prepareForTermination( bool willrestart ) 1254void QPEApplication::prepareForTermination( bool willrestart )
1171{ 1255{
1172 if ( willrestart ) { 1256 if ( willrestart ) {
1173 // Draw a big wait icon, the image can be altered in later revisions 1257 // Draw a big wait icon, the image can be altered in later revisions
1174 // QWidget *d = QApplication::desktop(); 1258 // QWidget *d = QApplication::desktop();
1175 QImage img = Resource::loadImage( "launcher/new_wait" ); 1259 QImage img = Resource::loadImage( "launcher/new_wait" );
1176 QPixmap pix; 1260 QPixmap pix;
1177 pix.convertFromImage( img.smoothScale( 1 * img.width(), 1 * img.height() ) ); 1261 pix.convertFromImage( img.smoothScale( 1 * img.width(), 1 * img.height() ) );
1178 QLabel *lblWait = new QLabel( 0, "wait hack!", QWidget::WStyle_Customize | 1262 QLabel *lblWait = new QLabel( 0, "wait hack!", QWidget::WStyle_Customize |
1179 QWidget::WStyle_NoBorder | QWidget::WStyle_Tool ); 1263 QWidget::WStyle_NoBorder | QWidget::WStyle_Tool );
1180 lblWait->setPixmap( pix ); 1264 lblWait->setPixmap( pix );
1181 lblWait->setAlignment( QWidget::AlignCenter ); 1265 lblWait->setAlignment( QWidget::AlignCenter );
1182 lblWait->show(); 1266 lblWait->show();
1183 lblWait->showMaximized(); 1267 lblWait->showMaximized();
1184 } 1268 }
1185#ifndef SINGLE_APP 1269#ifndef SINGLE_APP
1186 { QCopEnvelope envelope( "QPE/System", "forceQuit()" ); 1270 { QCopEnvelope envelope( "QPE/System", "forceQuit()" );
1187 } 1271 }
1188 processEvents(); // ensure the message goes out. 1272 processEvents(); // ensure the message goes out.
1189 sleep( 1 ); // You have 1 second to comply. 1273 sleep( 1 ); // You have 1 second to comply.
1190#endif 1274#endif
1191} 1275}
1192 1276
1193/*! 1277/*!
1194 \internal 1278 \internal
1195*/ 1279*/
1196void QPEApplication::shutdown() 1280void QPEApplication::shutdown()
1197{ 1281{
1198 // Implement in server's QPEApplication subclass 1282 // Implement in server's QPEApplication subclass
1199} 1283}
1200 1284
1201/*! 1285/*!
1202 \internal 1286 \internal
1203*/ 1287*/
1204void QPEApplication::restart() 1288void QPEApplication::restart()
1205{ 1289{
1206 // Implement in server's QPEApplication subclass 1290 // Implement in server's QPEApplication subclass
1207} 1291}
1208 1292
1209static QPtrDict<void>* stylusDict = 0; 1293static QPtrDict<void>* stylusDict = 0;
1210static void createDict() 1294static void createDict()
1211{ 1295{
1212 if ( !stylusDict ) 1296 if ( !stylusDict )
1213 stylusDict = new QPtrDict<void>; 1297 stylusDict = new QPtrDict<void>;
1214} 1298}
1215 1299
1216/*! 1300/*!
1217 Returns the current StylusMode for \a w. 1301 Returns the current StylusMode for widget \a w.
1218 1302
1219 \sa setStylusOperation() 1303 \sa setStylusOperation() StylusMode
1220*/ 1304*/
1221QPEApplication::StylusMode QPEApplication::stylusOperation( QWidget * w ) 1305QPEApplication::StylusMode QPEApplication::stylusOperation( QWidget* w )
1222{ 1306{
1223 if ( stylusDict ) 1307 if ( stylusDict )
1224 return ( StylusMode ) ( int ) stylusDict->find( w ); 1308 return ( StylusMode ) ( int ) stylusDict->find( w );
1225 return LeftOnly; 1309 return LeftOnly;
1226} 1310}
1227 1311
1228/*! 1312/*!
1229 \enum QPEApplication::StylusMode 1313 \enum QPEApplication::StylusMode
1230 1314
1231 \value LeftOnly the stylus only generates LeftButton 1315 \value LeftOnly the stylus only generates LeftButton
1232 events (the default). 1316 events (the default).
1233 \value RightOnHold the stylus generates RightButton events 1317 \value RightOnHold the stylus generates RightButton events
1234 if the user uses the press-and-hold gesture. 1318 if the user uses the press-and-hold gesture.
1235 1319
1236 See setStylusOperation(). 1320 \sa setStylusOperation() stylusOperation()
1237*/ 1321*/
1238 1322
1239/*! 1323/*!
1240 Causes \a w to receive mouse events according to \a mode. 1324 Causes widget \a w to receive mouse events according to the stylus
1325 \a mode.
1241 1326
1242 \sa stylusOperation() 1327 \sa stylusOperation() StylusMode
1243*/ 1328*/
1244void QPEApplication::setStylusOperation( QWidget * w, StylusMode mode ) 1329void QPEApplication::setStylusOperation( QWidget * w, StylusMode mode )
1245{ 1330{
1246 createDict(); 1331 createDict();
1247 if ( mode == LeftOnly ) { 1332 if ( mode == LeftOnly ) {
1248 stylusDict->remove 1333 stylusDict->remove
1249 ( w ); 1334 ( w );
1250 w->removeEventFilter( qApp ); 1335 w->removeEventFilter( qApp );
1251 } 1336 }
1252 else { 1337 else {
1253 stylusDict->insert( w, ( void* ) mode ); 1338 stylusDict->insert( w, ( void* ) mode );
1254 connect( w, SIGNAL( destroyed() ), qApp, SLOT( removeSenderFromStylusDict() ) ); 1339 connect( w, SIGNAL( destroyed() ), qApp, SLOT( removeSenderFromStylusDict() ) );
1255 w->installEventFilter( qApp ); 1340 w->installEventFilter( qApp );
1256 } 1341 }
1257} 1342}
1258 1343
1259 1344
1260/*! 1345/*!
1261 \reimp 1346 \reimp
1262*/ 1347*/
1263bool QPEApplication::eventFilter( QObject *o, QEvent *e ) 1348bool QPEApplication::eventFilter( QObject *o, QEvent *e )
1264{ 1349{
1265 if ( stylusDict && e->type() >= QEvent::MouseButtonPress && e->type() <= QEvent::MouseMove ) { 1350 if ( stylusDict && e->type() >= QEvent::MouseButtonPress && e->type() <= QEvent::MouseMove ) {
1266 QMouseEvent * me = ( QMouseEvent* ) e; 1351 QMouseEvent * me = ( QMouseEvent* ) e;
1352 StylusMode mode = (StylusMode)(int)stylusDict->find(o);
1353 switch (mode) {
1354 case RightOnHold:
1355 switch ( me->type() ) {
1356 case QEvent::MouseButtonPress:
1267 if ( me->button() == LeftButton ) { 1357 if ( me->button() == LeftButton ) {
1268 StylusMode mode = ( StylusMode ) ( int ) stylusDict->find( o ); 1358 d->presstimer = startTimer(500); // #### pref.
1269 switch ( mode ) { 1359 d->presswidget = (QWidget*)o;
1270 case RightOnHold: 1360 d->presspos = me->pos();
1271 switch ( me->type() ) { 1361 d->rightpressed = FALSE;
1272 case QEvent::MouseButtonPress:
1273 d->presstimer = startTimer( 500 ); // #### pref.
1274 d->presswidget = ( QWidget* ) o;
1275 d->presspos = me->pos();
1276 d->rightpressed = FALSE;
1277 break;
1278 case QEvent::MouseButtonRelease:
1279 if ( d->presstimer ) {
1280 killTimer( d->presstimer );
1281 d->presstimer = 0;
1282 }
1283 if ( d->rightpressed && d->presswidget ) {
1284 // Right released
1285 postEvent( d->presswidget,
1286 new QMouseEvent( QEvent::MouseButtonRelease, me->pos(),
1287 RightButton, LeftButton + RightButton ) );
1288 // Left released, off-widget
1289 postEvent( d->presswidget,
1290 new QMouseEvent( QEvent::MouseMove, QPoint( -1, -1 ),
1291 LeftButton, LeftButton ) );
1292 postEvent( d->presswidget,
1293 new QMouseEvent( QEvent::MouseButtonRelease, QPoint( -1, -1 ),
1294 LeftButton, LeftButton ) );
1295 d->rightpressed = FALSE;
1296 return TRUE; // don't send the real Left release
1297 }
1298 break;
1299 default:
1300 break;
1301 }
1302 break;
1303 default:
1304 ;
1305 }
1306 } 1362 }
1307 } 1363 break;
1308 else if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease ) { 1364 case QEvent::MouseMove:
1309 QKeyEvent * ke = ( QKeyEvent * ) e; 1365 if (d->presstimer && (me->pos()-d->presspos).manhattanLength() > 8) {
1310 if ( ke->key() == Key_Enter ) { 1366 killTimer(d->presstimer);
1311 if ( o->isA( "QRadioButton" ) || o->isA( "QCheckBox" ) ) { 1367 d->presstimer = 0;
1312 postEvent( o, new QKeyEvent( e->type(), Key_Space, ' ', 1368 }
1313 ke->state(), " ", ke->isAutoRepeat(), ke->count() ) ); 1369 break;
1314 return TRUE; 1370 case QEvent::MouseButtonRelease:
1315 } 1371 if ( me->button() == LeftButton ) {
1372 if ( d->presstimer ) {
1373 killTimer(d->presstimer);
1374 d->presstimer = 0;
1375 }
1376 if ( d->rightpressed && d->presswidget ) {
1377 // Right released
1378 postEvent( d->presswidget,
1379 new QMouseEvent( QEvent::MouseButtonRelease, me->pos(),
1380 RightButton, LeftButton+RightButton ) );
1381 // Left released, off-widget
1382 postEvent( d->presswidget,
1383 new QMouseEvent( QEvent::MouseMove, QPoint(-1,-1),
1384 LeftButton, LeftButton ) );
1385 postEvent( d->presswidget,
1386 new QMouseEvent( QEvent::MouseButtonRelease, QPoint(-1,-1),
1387 LeftButton, LeftButton ) );
1388 d->rightpressed = FALSE;
1389 return TRUE; // don't send the real Left release
1390 }
1391 }
1392 break;
1393 default:
1394 break;
1395 }
1396 break;
1397 default:
1398 ;
1399 }
1400 }else if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease ) {
1401 QKeyEvent *ke = (QKeyEvent *)e;
1402 if ( ke->key() == Key_Enter ) {
1403 if ( o->isA( "QRadioButton" ) || o->isA( "QCheckBox" ) ) {
1404 postEvent( o, new QKeyEvent( e->type(), Key_Space, ' ',
1405 ke->state(), " ", ke->isAutoRepeat(), ke->count() ) );
1406 return TRUE;
1316 } 1407 }
1317 } 1408 }
1318 1409 }
1319 return FALSE; 1410 return FALSE;
1320} 1411}
1321 1412
1322/*! 1413/*!
1323 \reimp 1414 \reimp
1324*/ 1415*/
1325void QPEApplication::timerEvent( QTimerEvent *e ) 1416void QPEApplication::timerEvent( QTimerEvent *e )
1326{ 1417{
1327 if ( e->timerId() == d->presstimer && d->presswidget ) { 1418 if ( e->timerId() == d->presstimer && d->presswidget ) {
1328 // Right pressed 1419 // Right pressed
1329 postEvent( d->presswidget, 1420 postEvent( d->presswidget,
1330 new QMouseEvent( QEvent::MouseButtonPress, d->presspos, 1421 new QMouseEvent( QEvent::MouseButtonPress, d->presspos,
1331 RightButton, LeftButton ) ); 1422 RightButton, LeftButton ) );
1332 killTimer( d->presstimer ); 1423 killTimer( d->presstimer );
1333 d->presstimer = 0; 1424 d->presstimer = 0;
1334 d->rightpressed = TRUE; 1425 d->rightpressed = TRUE;
1335 } 1426 }
1336} 1427}
1337 1428
1338void QPEApplication::removeSenderFromStylusDict() 1429void QPEApplication::removeSenderFromStylusDict()
1339{ 1430{
1340 stylusDict->remove 1431 stylusDict->remove
1341 ( ( void* ) sender() ); 1432 ( ( void* ) sender() );
1342 if ( d->presswidget == sender() ) 1433 if ( d->presswidget == sender() )
1343 d->presswidget = 0; 1434 d->presswidget = 0;
1344} 1435}
1345 1436
1346/*! 1437/*!
1347 \internal 1438 \internal
1348*/ 1439*/
1349bool QPEApplication::keyboardGrabbed() const 1440bool QPEApplication::keyboardGrabbed() const
1350{ 1441{
1351 return d->kbgrabber; 1442 return d->kbgrabber;
1352} 1443}
1353 1444
1354 1445
1355/*! 1446/*!
1356 Reverses the effect of grabKeyboard(). This is called automatically 1447 Reverses the effect of grabKeyboard(). This is called automatically
1357 on program exit. 1448 on program exit.
1358*/ 1449*/
1359void QPEApplication::ungrabKeyboard() 1450void QPEApplication::ungrabKeyboard()
1360{ 1451{
1361 QPEApplicationData * d = ( ( QPEApplication* ) qApp ) ->d; 1452 QPEApplicationData * d = ( ( QPEApplication* ) qApp ) ->d;
1362 if ( d->kbgrabber == 2 ) { 1453 if ( d->kbgrabber == 2 ) {
1363 QCopEnvelope e( "QPE/System", "grabKeyboard(QString)" ); 1454#ifndef QT_NO_COP
1364 e << QString::null; 1455 QCopEnvelope e( "QPE/System", "grabKeyboard(QString)" );
1365 d->kbregrab = FALSE; 1456 e << QString::null;
1366 d->kbgrabber = 0; 1457#endif
1367 } 1458 d->kbregrab = FALSE;
1459 d->kbgrabber = 0;
1460 }
1368} 1461}
1369 1462
1370/*! 1463/*!
1371 Grabs the keyboard such that the system's application launching 1464 Grabs the physical keyboard keys, e.g. the application's launching
1372 keys no longer work, and instead they are receivable by this 1465 keys. Instead of launching applications when these keys are pressed
1373 application. 1466 the signals emitted are sent to this application instead. Some games
1467 programs take over the launch keys in this way to make interaction
1468 easier.
1374 1469
1375 \sa ungrabKeyboard() 1470 \sa ungrabKeyboard()
1376*/ 1471*/
1377void QPEApplication::grabKeyboard() 1472void QPEApplication::grabKeyboard()
1378{ 1473{
1379 QPEApplicationData * d = ( ( QPEApplication* ) qApp ) ->d; 1474 QPEApplicationData * d = ( ( QPEApplication* ) qApp ) ->d;
1380 if ( qApp->type() == QApplication::GuiServer ) 1475 if ( qApp->type() == QApplication::GuiServer )
1381 d->kbgrabber = 0; 1476 d->kbgrabber = 0;
1382 else { 1477 else {
1383 QCopEnvelope e( "QPE/System", "grabKeyboard(QString)" ); 1478#ifndef QT_NO_COP
1384 e << d->appName; 1479 QCopEnvelope e( "QPE/System", "grabKeyboard(QString)" );
1385 d->kbgrabber = 2; // me 1480 e << d->appName;
1386 } 1481#endif
1482 d->kbgrabber = 2; // me
1483 }
1387} 1484}
1388 1485
1389/*! 1486/*!
1390 \reimp 1487 \reimp
1391*/ 1488*/
1392int QPEApplication::exec() 1489int QPEApplication::exec()
1393{ 1490{
1394 d->sendQCopQ(); 1491#ifndef QT_NO_COP
1395 if ( d->keep_running ) 1492 d->sendQCopQ();
1396 //|| d->qpe_main_widget && d->qpe_main_widget->isVisible() ) 1493#endif
1397 return QApplication::exec(); 1494 if ( d->keep_running )
1495 //|| d->qpe_main_widget && d->qpe_main_widget->isVisible() )
1496 return QApplication::exec();
1398 1497
1399 { 1498#ifndef QT_NO_COP
1400 QCopEnvelope e( "QPE/System", "closing(QString)" ); 1499 {
1401 e << d->appName; 1500 QCopEnvelope e( "QPE/System", "closing(QString)" );
1402 } 1501 e << d->appName;
1403 processEvents(); 1502 }
1404 return 0; 1503#endif
1504 processEvents();
1505 return 0;
1405} 1506}
1406 1507
1407/*! 1508/*!
1408 \internal 1509 \internal
1409 External request for application to quit. Quits if possible without 1510 External request for application to quit. Quits if possible without
1410 loosing state. 1511 loosing state.
1411*/ 1512*/
1412void QPEApplication::tryQuit() 1513void QPEApplication::tryQuit()
1413{ 1514{
1414 if ( activeModalWidget() || strcmp( argv() [ 0 ], "embeddedkonsole" ) == 0 ) 1515 if ( activeModalWidget() || strcmp( argv() [ 0 ], "embeddedkonsole" ) == 0 )
1415 return ; // Inside modal loop or konsole. Too hard to save state. 1516 return ; // Inside modal loop or konsole. Too hard to save state.
1416 { 1517#ifndef QT_NO_COP
1417 QCopEnvelope e( "QPE/System", "closing(QString)" ); 1518 {
1418 e << d->appName; 1519 QCopEnvelope e( "QPE/System", "closing(QString)" );
1419 } 1520 e << d->appName;
1420 processEvents(); 1521 }
1522#endif
1523 processEvents();
1421 1524
1422 quit(); 1525 quit();
1423} 1526}
1424 1527
1425/*! 1528/*!
1426 \internal 1529 \internal
1427 User initiated quit. Makes the window 'Go Away'. If preloaded this means 1530 User initiated quit. Makes the window 'Go Away'. If preloaded this means
1428 hiding the window. If not it means quitting the application. 1531 hiding the window. If not it means quitting the application.
1429 As this is user initiated we don't need to check state. 1532 As this is user initiated we don't need to check state.
1430*/ 1533*/
1431void QPEApplication::hideOrQuit() 1534void QPEApplication::hideOrQuit()
1432{ 1535{
1433 // notify of our demise :) 1536 processEvents();
1434 { 1537
1435 QCopEnvelope e( "QPE/System", "closing(QString)" ); 1538 // If we are a preloaded application we don't actually quit, so emit
1436 e << d->appName; 1539 // a System message indicating we're quasi-closing.
1437 } 1540 if ( d->preloaded && d->qpe_main_widget )
1438 processEvents(); 1541#ifndef QT_NO_COP
1439 if ( d->preloaded && d->qpe_main_widget ) 1542 {
1440 d->qpe_main_widget->hide(); 1543 QCopEnvelope e("QPE/System", "fastAppHiding(QString)" );
1441 else 1544 e << d->appName;
1442 quit(); 1545 d->qpe_main_widget->hide();
1546 }
1547#endif
1548 else
1549 quit();
1443} 1550}
1444 1551
1445#if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) 1552#if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX)
1446 1553
1447// The libraries with the skiff package (and possibly others) have 1554// The libraries with the skiff package (and possibly others) have
1448// completely useless implementations of builtin new and delete that 1555// completely useless implementations of builtin new and delete that
1449// use about 50% of your CPU. Here we revert to the simple libc 1556// use about 50% of your CPU. Here we revert to the simple libc
1450// functions. 1557// functions.
1451 1558
1452void* operator new[] ( size_t size ) 1559void* operator new[]( size_t size )
1453{ 1560{
1454 return malloc( size ); 1561 return malloc( size );
1455} 1562}
1456 1563
1457void* operator new( size_t size ) 1564void* operator new( size_t size )
1458{ 1565{
1459 return malloc( size ); 1566 return malloc( size );
1460} 1567}
1461 1568
1462void operator delete[] ( void* p ) 1569void operator delete[]( void* p )
1463{ 1570{
1464 free( p ); 1571 free( p );
1465} 1572}
1466 1573
1467void operator delete[] ( void* p, size_t /*size*/ ) 1574void operator delete[]( void* p, size_t /*size*/ )
1468{ 1575{
1469 free( p ); 1576 free( p );
1470} 1577}
1471 1578
1472void operator delete( void* p ) 1579void operator delete( void* p )
1473{ 1580{
1474 free( p ); 1581 free( p );
1475} 1582}
1476 1583
1477void operator delete( void* p, size_t /*size*/ ) 1584void operator delete( void* p, size_t /*size*/ )
1478{ 1585{
1479 free( p ); 1586 free( p );
1480} 1587}
1481 1588
1482#endif 1589#endif
1483 1590
1484#if ( QT_VERSION <= 230 ) && !defined(SINGLE_APP) 1591#if ( QT_VERSION <= 230 ) && !defined(SINGLE_APP)
1485#include <qwidgetlist.h> 1592#include <qwidgetlist.h>
1593#ifdef QWS
1486#include <qgfx_qws.h> 1594#include <qgfx_qws.h>
1487extern QRect qt_maxWindowRect; 1595extern QRect qt_maxWindowRect;
1488void qt_setMaxWindowRect( const QRect & r ) 1596void qt_setMaxWindowRect(const QRect& r )
1489{ 1597{
1490 qt_maxWindowRect = qt_screen->mapFromDevice( r, 1598 qt_maxWindowRect = qt_screen->mapFromDevice( r,
1491 qt_screen->mapToDevice( QSize( qt_screen->width(), qt_screen->height() ) ) ); 1599 qt_screen->mapToDevice( QSize( qt_screen->width(), qt_screen->height() ) ) );
1492 // Re-resize any maximized windows 1600 // Re-resize any maximized windows
1493 QWidgetList* l = QApplication::topLevelWidgets(); 1601 QWidgetList* l = QApplication::topLevelWidgets();
1494 if ( l ) { 1602 if ( l ) {
1495 QWidget * w = l->first(); 1603 QWidget * w = l->first();
1496 while ( w ) { 1604 while ( w ) {
1497 if ( w->isVisible() && w->isMaximized() ) { 1605 if ( w->isVisible() && w->isMaximized() ) {
1498 w->showMaximized(); 1606 w->showMaximized();
1499 } 1607 }
1500 w = l->next(); 1608 w = l->next();
1501 } 1609 }
1502 delete l; 1610 delete l;
1503 } 1611 }
1504} 1612}
1505#endif 1613#endif
1614#endif
diff --git a/library/qpeapplication.h b/library/qpeapplication.h
index 23606db..2515f1b 100644
--- a/library/qpeapplication.h
+++ b/library/qpeapplication.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -17,16 +17,17 @@
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#ifndef __QPE_APPLICATION_H__ 20#ifndef __QPE_APPLICATION_H__
21#define __QPE_APPLICATION_H__ 21#define __QPE_APPLICATION_H__
22 22
23 23
24#include <qapplication.h> 24#include <qapplication.h>
25#include <qdialog.h>
25#if defined(_WS_QWS_) && !defined(Q_WS_QWS) 26#if defined(_WS_QWS_) && !defined(Q_WS_QWS)
26#define Q_WS_QWS 27#define Q_WS_QWS
27#endif 28#endif
28#include "qpedecoration_qws.h" 29#include "qpedecoration_qws.h"
29#include "timestring.h" 30#include "timestring.h"
30 31
31class QCopChannel; 32class QCopChannel;
32class QPEApplicationData; 33class QPEApplicationData;
@@ -56,62 +57,65 @@ public:
56 static void setStylusOperation( QWidget*, StylusMode ); 57 static void setStylusOperation( QWidget*, StylusMode );
57 static StylusMode stylusOperation( QWidget* ); 58 static StylusMode stylusOperation( QWidget* );
58 59
59 enum InputMethodHint { 60 enum InputMethodHint {
60 Normal, 61 Normal,
61 AlwaysOff, 62 AlwaysOff,
62 AlwaysOn 63 AlwaysOn
63 }; 64 };
64 65
65 enum screenSaverHint { 66 enum screenSaverHint {
66 Disable = 0, 67 Disable = 0,
67 DisableLightOff = 1, 68 DisableLightOff = 1,
68 DisableSuspend = 2, 69 DisableSuspend = 2,
69 Enable = 100 70 Enable = 100
70 }; 71 };
71 72
72 static void setInputMethodHint( QWidget *, InputMethodHint ); 73 static void setInputMethodHint( QWidget *, InputMethodHint );
73 static InputMethodHint inputMethodHint( QWidget * ); 74 static InputMethodHint inputMethodHint( QWidget * );
74 75
75 void showMainWidget( QWidget*, bool nomax=FALSE ); 76 void showMainWidget( QWidget*, bool nomax=FALSE );
76 void showMainDocumentWidget( QWidget*, bool nomax=FALSE ); 77 void showMainDocumentWidget( QWidget*, bool nomax=FALSE );
78 static void showDialog( QDialog*, bool nomax=FALSE );
79 static int execDialog( QDialog*, bool nomax=FALSE );
77 80
78 static void setKeepRunning(); 81 static void setKeepRunning();
79 bool keepRunning() const; 82 bool keepRunning() const;
80 83
84 bool keyboardGrabbed() const;
85
81 int exec(); 86 int exec();
82 87
83signals: 88signals:
84 void clientMoused(); 89 void clientMoused();
85 void timeChanged(); 90 void timeChanged();
86 void clockChanged( bool pm ); 91 void clockChanged( bool pm );
92 void micChanged( bool muted );
87 void volumeChanged( bool muted ); 93 void volumeChanged( bool muted );
88 void micChanged( bool muted );
89 void appMessage( const QCString& msg, const QByteArray& data); 94 void appMessage( const QCString& msg, const QByteArray& data);
90 void weekChanged( bool startOnMonday ); 95 void weekChanged( bool startOnMonday );
91 void dateFormatChanged( DateFormat ); 96 void dateFormatChanged( DateFormat );
92 void flush(); 97 void flush();
93 void reload(); 98 void reload();
94 99
95private slots: 100private slots:
96 void systemMessage( const QCString &msg, const QByteArray &data ); 101 void systemMessage( const QCString &msg, const QByteArray &data );
97 void pidMessage( const QCString &msg, const QByteArray &data ); 102 void pidMessage( const QCString &msg, const QByteArray &data );
98 void removeSenderFromStylusDict(); 103 void removeSenderFromStylusDict();
99 void hideOrQuit(); 104 void hideOrQuit();
100 105
101protected: 106protected:
102 bool qwsEventFilter( QWSEvent * ); 107 bool qwsEventFilter( QWSEvent * );
103 void internalSetStyle( const QString &style ); 108 void internalSetStyle( const QString &style );
104 void prepareForTermination(bool willrestart); 109 void prepareForTermination(bool willrestart);
105 virtual void restart(); 110 virtual void restart();
106 virtual void shutdown(); 111 virtual void shutdown();
107 bool eventFilter( QObject *, QEvent * ); 112 bool eventFilter( QObject *, QEvent * );
108 void timerEvent( QTimerEvent * ); 113 void timerEvent( QTimerEvent * );
109 bool keyboardGrabbed() const;
110 bool raiseAppropriateWindow(); 114 bool raiseAppropriateWindow();
111 virtual void tryQuit(); 115 virtual void tryQuit();
112 116
113private: 117private:
114 void mapToDefaultAction( QWSKeyEvent *ke, int defKey ); 118 void mapToDefaultAction( QWSKeyEvent *ke, int defKey );
115 119
116#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 120#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
117 QCopChannel *sysChannel; 121 QCopChannel *sysChannel;
@@ -120,11 +124,33 @@ private:
120 QPEApplicationData *d; 124 QPEApplicationData *d;
121 125
122 bool reserved_sh; 126 bool reserved_sh;
123 127
124 128
125 129
126}; 130};
127 131
132inline void QPEApplication::showDialog( QDialog* d, bool nomax )
133{
134 QSize sh = d->sizeHint();
135 int w = QMAX(sh.width(),d->width());
136 int h = QMAX(sh.height(),d->height());
137 if ( !nomax
138 && ( w > qApp->desktop()->width()*3/4
139 || h > qApp->desktop()->height()*3/4 ) )
140 {
141 d->showMaximized();
142 } else {
143 d->resize(w,h);
144 d->show();
145 }
146}
147
148inline int QPEApplication::execDialog( QDialog* d, bool nomax )
149{
150 showDialog(d,nomax);
151 return d->exec();
152}
153
128 154
129#endif 155#endif
130 156
diff --git a/library/qpedebug.cpp b/library/qpedebug.cpp
index 29bcbb6..b7cbc7b 100644
--- a/library/qpedebug.cpp
+++ b/library/qpedebug.cpp
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/library/qpedebug.h b/library/qpedebug.h
index 434ddec..6bf2e8b 100644
--- a/library/qpedebug.h
+++ b/library/qpedebug.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/library/qpedecoration_qws.cpp b/library/qpedecoration_qws.cpp
index e041945..222d906 100644
--- a/library/qpedecoration_qws.cpp
+++ b/library/qpedecoration_qws.cpp
@@ -1,52 +1,53 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#ifdef QWS
20#define QTOPIA_INTERNAL_LANGLIST 21#define QTOPIA_INTERNAL_LANGLIST
21#include <qapplication.h> 22#include <qapplication.h>
22#include <qstyle.h> 23#include <qstyle.h>
23#include <qwidget.h> 24#include <qwidget.h>
24#include <qpainter.h> 25#include <qpainter.h>
25#include <qtimer.h> 26#include <qtimer.h>
26#include <qwhatsthis.h> 27#include <qwhatsthis.h>
27#include "qcopenvelope_qws.h" 28#include "qcopenvelope_qws.h"
28#include "qpedecoration_qws.h" 29#include "qpedecoration_qws.h"
29#include <qdialog.h> 30#include <qdialog.h>
30#include <qdrawutil.h> 31#include <qdrawutil.h>
31#include <qgfx_qws.h> 32#include <qgfx_qws.h>
32#include "qpeapplication.h" 33#include "qpeapplication.h"
33#include "resource.h" 34#include "resource.h"
34#include "global.h" 35#include "global.h"
36#include "qlibrary.h"
37#include "windowdecorationinterface.h"
35#include <qfile.h> 38#include <qfile.h>
36#include <qsignal.h> 39#include <qsignal.h>
37 40
38#include <stdlib.h> 41#include <stdlib.h>
39 42
40extern QRect qt_maxWindowRect; 43extern QRect qt_maxWindowRect;
41 44
42//#define MINIMIZE_HELP_HACK // use minimize button when not a dialog 45#define WHATSTHIS_MODE
43
44//#define WHATSTHIS_MODE
45 46
46#ifndef QT_NO_QWS_QPE_WM_STYLE 47#ifndef QT_NO_QWS_QPE_WM_STYLE
47 48
48#ifndef QT_NO_IMAGEIO_XPM 49#ifndef QT_NO_IMAGEIO_XPM
49 50
50/* XPM */ 51/* XPM */
51static const char * const qpe_close_xpm[] = { 52static const char * const qpe_close_xpm[] = {
52"16 16 3 1", 53"16 16 3 1",
@@ -90,114 +91,163 @@ static const char * const qpe_accept_xpm[] = {
90" .++..+++++. ", 91" .++..+++++. ",
91" .+++++++++. ", 92" .+++++++++. ",
92" ..+++++.. ", 93" ..+++++.. ",
93" ..... ", 94" ..... ",
94" "}; 95" "};
95 96
96#endif // QT_NO_IMAGEIO_XPM 97#endif // QT_NO_IMAGEIO_XPM
97 98
99class HackWidget : public QWidget
100{
101public:
102 bool needsOk() {
103 return (getWState() & WState_Reserved1 ) ||
104 (inherits( "QDialog" ) && !inherits( "QMessageBox" ) );
105 }
106};
107
108static QImage scaleButton( const QImage &img, int height )
109{
110 if ( img.height() != height ) {
111 return img.smoothScale( img.width()*height/img.height(), height );
112 } else {
113 return img;
114 }
115}
116
98class TLWidget : public QWidget 117class TLWidget : public QWidget
99{ 118{
100public: 119public:
101 QWSManager *manager() 120 QWSManager *manager()
102 { 121 {
103 return topData()->qwsManager; 122 return topData()->qwsManager;
104 } 123 }
105 124
106 QTLWExtra *topExtra() 125 QTLWExtra *topExtra()
107 { 126 {
108 return topData(); 127 return topData();
109 } 128 }
129
130 void setWState( uint s ) { QWidget::setWState( s ); }
131 void clearWState( uint s ) { QWidget::clearWState( s ); }
110}; 132};
111 133
134
112QPEManager::QPEManager( QPEDecoration *d, QObject *parent ) 135QPEManager::QPEManager( QPEDecoration *d, QObject *parent )
113 : QObject( parent ), decoration( d ), helpState(0) 136 : QObject( parent ), decoration( d ), helpState(0), inWhatsThis(FALSE)
114{ 137{
115 wtTimer = new QTimer( this ); 138 wtTimer = new QTimer( this );
116 connect( wtTimer, SIGNAL(timeout()), this, SLOT(whatsThisTimeout()) ); 139 connect( wtTimer, SIGNAL(timeout()), this, SLOT(whatsThisTimeout()) );
117} 140}
118 141
119 142
120void QPEManager::updateActive() 143void QPEManager::updateActive()
121{ 144{
122 QWidget *newActive = qApp->activeWindow(); 145 QWidget *newActive = qApp->activeWindow();
123 if ( (QWidget*)active == newActive ) 146 if ( newActive && (QWidget*)active == newActive )
124 return; 147 return;
125 148
126 if ( active ) { 149 if ( active && (!newActive || ((TLWidget *)newActive)->manager()) ) {
127 ((TLWidget *)(QWidget*)active)->manager()->removeEventFilter( this ); 150 ((TLWidget *)(QWidget*)active)->manager()->removeEventFilter( this );
128 } 151 }
129 152
130 if ( newActive && ((TLWidget *)newActive)->manager() ) { 153 if ( newActive && ((TLWidget *)newActive)->manager() ) {
131 active = newActive; 154 active = newActive;
132 ((TLWidget *)(QWidget*)active)->manager()->installEventFilter( this ); 155 ((TLWidget *)(QWidget*)active)->manager()->installEventFilter( this );
133 } else { 156 } else if ( !newActive ) {
134 active = 0; 157 active = 0;
135 } 158 }
136} 159}
137 160
138int QPEManager::pointInQpeRegion( QWidget *w, const QPoint &p ) 161int QPEManager::pointInQpeRegion( QWidget *w, const QPoint &p )
139{ 162{
140 if ( decoration->region( w, w->geometry(), 163 QRect rect(w->geometry());
141 (QWSDecoration::Region)QPEDecoration::Help ).contains(p) ) { 164
165 if ( decoration->region( w, rect,
166 (QWSDecoration::Region)QPEDecoration::Help ).contains(p) )
142 return QPEDecoration::Help; 167 return QPEDecoration::Help;
168
169 for (int i = QWSDecoration::LastRegion; i >= QWSDecoration::Title; i--) {
170 if (decoration->region(w, rect, (QWSDecoration::Region)i).contains(p))
171 return (QWSDecoration::Region)i;
143 } 172 }
144 173
145 return QWSDecoration::None; 174 return QWSDecoration::None;
146} 175}
147 176
148bool QPEManager::eventFilter( QObject *o, QEvent *e ) 177bool QPEManager::eventFilter( QObject *o, QEvent *e )
149{ 178{
150 QWSManager *mgr = (QWSManager *)o; 179 QWSManager *mgr = (QWSManager *)o;
151 QWidget *w = mgr->widget(); 180 QWidget *w = mgr->widget();
152 switch ( e->type() ) { 181 switch ( e->type() ) {
153 case QEvent::MouseButtonPress: 182 case QEvent::MouseButtonPress:
154 { 183 {
155 if ( QWhatsThis::inWhatsThisMode() ) {
156 QWhatsThis::leaveWhatsThisMode();
157 return true;
158 }
159 pressTime = QTime::currentTime(); 184 pressTime = QTime::currentTime();
160 QPoint p = ((QMouseEvent*)e)->globalPos(); 185 QPoint p = ((QMouseEvent*)e)->globalPos();
161 if ( pointInQpeRegion( w, p ) == QPEDecoration::Help ) { 186 int inRegion = pointInQpeRegion( w, p );
187#ifdef WHATSTHIS_MODE
188 if ( !w->geometry().contains(p) && QWhatsThis::inWhatsThisMode() ) {
189 QString text;
190 switch ( inRegion ) {
191 case QWSDecoration::Close:
192 if ( ((HackWidget*)w)->needsOk() )
193 text = tr("Click to close this window, discarding changes.");
194 else
195 text = tr("Click to close this window.");
196 break;
197 case QWSDecoration::Minimize:
198 text = tr("Click to close this window and apply changes.");
199 break;
200 case QWSDecoration::Maximize:
201 if ( w->isMaximized() )
202 text = tr("Click to make this window moveable.");
203 else
204 text = tr("Click to make this window use all available screen area.");
205 break;
206 default:
207 break;
208 }
209 QWhatsThis::leaveWhatsThisMode( text );
210 whatsThisTimeout();
211 helpState = 0;
212 return true;
213 }
214#endif
215 if ( inRegion == QPEDecoration::Help ) {
216#ifdef WHATSTHIS_MODE
217 wtTimer->start( 400, TRUE );
218#endif
162 helpState = QWSButton::Clicked|QWSButton::MouseOver; 219 helpState = QWSButton::Clicked|QWSButton::MouseOver;
163 drawButton( w, QPEDecoration::Help, helpState ); 220 drawButton( w, QPEDecoration::Help, helpState );
164 return true; 221 return true;
165 } 222 }
166 } 223 }
167 break; 224 break;
168 case QEvent::MouseButtonRelease: 225 case QEvent::MouseButtonRelease:
169 if ( helpState & QWSButton::Clicked ) { 226 if ( helpState & QWSButton::Clicked ) {
227 wtTimer->stop();
170 helpState = 0; 228 helpState = 0;
171 drawButton( w, QPEDecoration::Help, helpState ); 229 drawButton( w, QPEDecoration::Help, helpState );
172 QPoint p = ((QMouseEvent*)e)->globalPos(); 230 QPoint p = ((QMouseEvent*)e)->globalPos();
173 if ( pointInQpeRegion( w, p ) == QPEDecoration::Help ) { 231 if ( pointInQpeRegion( w, p ) == QPEDecoration::Help ) {
174#ifdef WHATSTHIS_MODE
175 if ( pressTime.msecsTo( QTime::currentTime() ) > 250 ) {
176 decoration->help( w );
177 } else {
178 QWhatsThis::enterWhatsThisMode();
179 wtTimer->start( 200 );
180 }
181#else
182 decoration->help( w ); 232 decoration->help( w );
183#endif
184 } 233 }
185 return true; 234 return true;
186 } 235 }
187 break; 236 break;
188 case QEvent::MouseMove: 237 case QEvent::MouseMove:
189 if ( helpState & QWSButton::Clicked ) { 238 if ( helpState & QWSButton::Clicked ) {
190 int oldState = helpState; 239 int oldState = helpState;
191 QPoint p = ((QMouseEvent*)e)->globalPos(); 240 QPoint p = ((QMouseEvent*)e)->globalPos();
192 if ( pointInQpeRegion( w, p ) == QPEDecoration::Help ) 241 if ( pointInQpeRegion( w, p ) == QPEDecoration::Help ) {
193 helpState = QWSButton::Clicked|QWSButton::MouseOver; 242 helpState = QWSButton::Clicked|QWSButton::MouseOver;
194 else 243 } else {
195 helpState = 0; 244 helpState = 0;
245 }
196 if ( helpState != oldState ) 246 if ( helpState != oldState )
197 drawButton( w, QPEDecoration::Help, helpState ); 247 drawButton( w, QPEDecoration::Help, helpState );
198 } 248 }
199 break; 249 break;
200 default: 250 default:
201 break; 251 break;
202 } 252 }
203 return QObject::eventFilter( o, e ); 253 return QObject::eventFilter( o, e );
@@ -207,58 +257,287 @@ void QPEManager::drawButton( QWidget *w, QPEDecoration::QPERegion r, int state )
207{ 257{
208 QPainter painter(w); 258 QPainter painter(w);
209 QRegion rgn = ((TLWidget *)w)->topExtra()->decor_allocated_region; 259 QRegion rgn = ((TLWidget *)w)->topExtra()->decor_allocated_region;
210 painter.internalGfx()->setWidgetDeviceRegion( rgn ); 260 painter.internalGfx()->setWidgetDeviceRegion( rgn );
211 painter.setClipRegion(decoration->region(w, w->rect(),QWSDecoration::All)); 261 painter.setClipRegion(decoration->region(w, w->rect(),QWSDecoration::All));
212 decoration->paintButton( &painter, w, (QWSDecoration::Region)r, state ); 262 decoration->paintButton( &painter, w, (QWSDecoration::Region)r, state );
213} 263}
214 264
265void QPEManager::drawTitle( QWidget *w )
266{
267 QPainter painter(w);
268 QRegion rgn = ((TLWidget *)w)->topExtra()->decor_allocated_region;
269 painter.internalGfx()->setWidgetDeviceRegion( rgn );
270 painter.setClipRegion(decoration->region(w, w->rect(),QWSDecoration::All));
271 decoration->paint( &painter, w );
272 decoration->paintButton(&painter, w, QWSDecoration::Menu, 0);
273 decoration->paintButton(&painter, w, QWSDecoration::Close, 0);
274 decoration->paintButton(&painter, w, QWSDecoration::Minimize, 0);
275 decoration->paintButton(&painter, w, QWSDecoration::Maximize, 0);
276}
277
215void QPEManager::whatsThisTimeout() 278void QPEManager::whatsThisTimeout()
216{ 279{
217 if ( !QWhatsThis::inWhatsThisMode() ) { 280 if ( !QWhatsThis::inWhatsThisMode() ) {
218 wtTimer->stop(); 281 if ( inWhatsThis ) {
219 if ( active ) 282 if ( whatsThis ) {
220 drawButton( active, QPEDecoration::Help, 0 ); 283 QWidget *w = whatsThis;
221 } else if ( active ) { 284 whatsThis = 0;
222 static int state = 0; 285 drawTitle( w );
223 if ( !state ) 286 }
224 state = QWSButton::Clicked|QWSButton::MouseOver; 287 wtTimer->stop();
288 } else {
289 QWhatsThis::enterWhatsThisMode();
290 helpState = 0;
291 updateActive();
292 if ( active ) {
293 whatsThis = active;
294 drawTitle( active );
295 // check periodically to see if we've left whats this mode
296 wtTimer->start( 250 );
297 }
298 }
299 inWhatsThis = !inWhatsThis;
300 }
301}
302
303//===========================================================================
304
305static QImage *okImage( int th )
306{
307 static QImage *i = 0;
308 if ( !i || i->height() != th ) {
309 delete i;
310 i = new QImage(scaleButton(Resource::loadImage("OKButton"),th));
311 }
312 return i;
313}
314
315static QImage *closeImage( int th )
316{
317 static QImage *i = 0;
318 if ( !i || i->height() != th ) {
319 delete i;
320 i = new QImage(scaleButton(Resource::loadImage("CloseButton"),th));
321 }
322 return i;
323}
324
325static QImage *helpImage( int th )
326{
327 static QImage *i = 0;
328 if ( !i || i->height() != th ) {
329 delete i;
330 i = new QImage(scaleButton(Resource::loadImage("HelpButton"),th));
331 }
332 return i;
333}
334
335static QImage *maximizeImage( int th )
336{
337 static QImage *i = 0;
338 if ( !i || i->height() != th ) {
339 delete i;
340 i = new QImage(scaleButton(Resource::loadImage("MaximizeButton"),th));
341 }
342 return i;
343}
344
345int WindowDecorationInterface::metric( Metric m, const WindowData *wd ) const
346{
347 switch ( m ) {
348 case TitleHeight:
349 if ( QApplication::desktop()->height() > 320 )
350 return 19;
351 else
352 return 15;
353 case LeftBorder:
354 case RightBorder:
355 case TopBorder:
356 case BottomBorder:
357 return 4;
358 case OKWidth:
359 return okImage(metric(TitleHeight,wd))->width();
360 case CloseWidth:
361 return closeImage(metric(TitleHeight,wd))->width();
362 case HelpWidth:
363 return helpImage(metric(TitleHeight,wd))->width();
364 case MaximizeWidth:
365 return maximizeImage(metric(TitleHeight,wd))->width();
366 case CornerGrabSize:
367 return 16;
368 }
369
370 return 0;
371}
372
373void WindowDecorationInterface::drawArea( Area a, QPainter *p, const WindowData *wd ) const
374{
375 int th = metric( TitleHeight, wd );
376 QRect r = wd->rect;
377
378 switch ( a ) {
379 case Border:
380 {
381 const QColorGroup &cg = wd->palette.active();
382 qDrawWinPanel(p, r.x()-metric(LeftBorder,wd),
383 r.y()-th-metric(TopBorder,wd),
384 r.width()+metric(LeftBorder,wd)+metric(RightBorder,wd),
385 r.height()+th+metric(TopBorder,wd)+metric(BottomBorder,wd),
386 cg, FALSE, &cg.brush(QColorGroup::Background));
387 }
388 break;
389 case Title:
390 {
391 const QColorGroup &cg = wd->palette.active();
392 QBrush titleBrush;
393 QPen titleLines;
394
395 if ( wd->flags & WindowData::Active ) {
396 titleBrush = cg.brush(QColorGroup::Highlight);
397 titleLines = titleBrush.color().dark();
398 } else {
399 titleBrush = cg.brush(QColorGroup::Background);
400 titleLines = titleBrush.color();
401 }
402
403 p->fillRect( r.x(), r.y()-th, r.width(), th, titleBrush);
404
405 p->setPen( titleLines );
406 for ( int i = r.y()-th; i < r.y(); i += 2 )
407 p->drawLine( r.left(), i, r.right(), i );
408 }
409 break;
410 case TitleText:
411 p->drawText( r.x()+3+metric(HelpWidth,wd), r.top()-th,
412 r.width()-metric(OKWidth,wd)-metric(CloseWidth,wd),
413 th, QPainter::AlignVCenter, wd->caption);
414 break;
415 }
416}
417
418void WindowDecorationInterface::drawButton( Button b, QPainter *p, const WindowData *wd, int x, int y, int, int, QWSButton::State state ) const
419{
420 QImage *img = 0;
421 switch ( b ) {
422 case OK:
423 img = okImage(metric(TitleHeight,wd));
424 break;
425 case Close:
426 img = closeImage(metric(TitleHeight,wd));
427 break;
428 case Help:
429 img = helpImage(metric(TitleHeight,wd));
430 break;
431 case Maximize:
432 img = maximizeImage(metric(TitleHeight,wd));
433 break;
434 }
435
436 if ( img ) {
437 if ((state & QWSButton::MouseOver) && (state & QWSButton::Clicked))
438 p->drawImage(x+2, y+2, *img);
225 else 439 else
226 state = 0; 440 p->drawImage(x+1, y+1, *img);
227 drawButton( active, QPEDecoration::Help, state );
228 } 441 }
229} 442}
230 443
231//========= 444QRegion WindowDecorationInterface::mask( const WindowData *wd ) const
445{
446 int th = metric(TitleHeight,wd);
447 QRect rect( wd->rect );
448 QRect r(rect.left() - metric(LeftBorder,wd),
449 rect.top() - th - metric(TopBorder,wd),
450 rect.width() + metric(LeftBorder,wd) + metric(RightBorder,wd),
451 rect.height() + th + metric(TopBorder,wd) + metric(BottomBorder,wd));
452 return QRegion(r) - rect;
453}
232 454
233class HackWidget : public QWidget 455class DefaultWindowDecoration : public WindowDecorationInterface
234{ 456{
235public: 457public:
236 bool needsOk() { return (getWState() & WState_Reserved1 ); } 458 DefaultWindowDecoration() : ref(0) {}
459 QString name() const {
460 return "Default";
461 }
462 QPixmap icon() const {
463 return QPixmap();
464 }
465 QRESULT queryInterface( const QUuid &uuid, QUnknownInterface **iface ) {
466 *iface = 0;
467 if ( uuid == IID_QUnknown )
468 *iface = this;
469 else if ( uuid == IID_WindowDecoration )
470 *iface = this;
471
472 if ( *iface )
473 (*iface)->addRef();
474 return QS_OK;
475 }
476 Q_REFCOUNT
477
478private:
479 ulong ref;
237}; 480};
238 481
482static WindowDecorationInterface *wdiface = 0;
483static QLibrary *wdlib = 0;
484
239//=========================================================================== 485//===========================================================================
240 486
241QPEDecoration::QPEDecoration() 487QPEDecoration::QPEDecoration()
242 : QWSDefaultDecoration() 488 : QWSDefaultDecoration()
243{ 489{
244 imageOk = Resource::loadImage( "OKButton" ); 490 if ( wdlib ) {
245 imageClose = Resource::loadImage( "CloseButton" ); 491 wdiface->release();
246 imageHelp = Resource::loadImage( "HelpButton" ); 492 wdlib->unload();
493 delete wdlib;
494 wdlib = 0;
495 } else {
496 delete wdiface;
497 }
498 wdiface = new DefaultWindowDecoration;
499
247 helpFile = QString(qApp->argv()[0]) + ".html"; 500 helpFile = QString(qApp->argv()[0]) + ".html";
248 QStringList path = Global::helpPath(); 501 QStringList helpPath = Global::helpPath();
249 helpExists = FALSE; 502 helpExists = FALSE;
250 for (QStringList::ConstIterator it=path.begin(); it!=path.end() && !helpExists; ++it) 503 for (QStringList::ConstIterator it=helpPath.begin(); it!=helpPath.end() && !helpExists; ++it)
504 helpExists = QFile::exists( *it + "/" + helpFile );
505 qpeManager = new QPEManager( this );
506}
507
508QPEDecoration::QPEDecoration( const QString &plugin )
509 : QWSDefaultDecoration()
510{
511 if ( wdlib ) {
512 wdiface->release();
513 wdlib->unload();
514 delete wdlib;
515 wdlib = 0;
516 } else {
517 delete wdiface;
518 }
519 WindowDecorationInterface *iface = 0;
520 QString path = QPEApplication::qpeDir() + "/plugins/decorations";
521 QLibrary *lib = new QLibrary( path + "/" + plugin );
522 if ( lib->queryInterface( IID_WindowDecoration, (QUnknownInterface**)&iface ) == QS_OK && iface ) {
523 wdiface = iface;
524 wdlib = lib;
525 } else {
526 delete lib;
527 wdiface = new DefaultWindowDecoration;
528 }
529
530 helpFile = QString(qApp->argv()[0]) + ".html";
531 QStringList helpPath = Global::helpPath();
532 helpExists = FALSE;
533 for (QStringList::ConstIterator it=helpPath.begin(); it!=helpPath.end() && !helpExists; ++it)
251 helpExists = QFile::exists( *it + "/" + helpFile ); 534 helpExists = QFile::exists( *it + "/" + helpFile );
252#ifndef MINIMIZE_HELP_HACK
253 qpeManager = new QPEManager( this ); 535 qpeManager = new QPEManager( this );
254#else
255 qpeManager = 0;
256#endif
257} 536}
258 537
259QPEDecoration::~QPEDecoration() 538QPEDecoration::~QPEDecoration()
260{ 539{
261 delete qpeManager; 540 delete qpeManager;
262} 541}
263 542
264const char **QPEDecoration::menuPixmap() 543const char **QPEDecoration::menuPixmap()
@@ -281,299 +560,267 @@ const char **QPEDecoration::maximizePixmap()
281 return (const char **)0; 560 return (const char **)0;
282} 561}
283 562
284const char **QPEDecoration::normalizePixmap() 563const char **QPEDecoration::normalizePixmap()
285{ 564{
286 return (const char **)0; 565 return (const char **)0;
287} 566}
288 567
289int QPEDecoration::getTitleHeight(const QWidget *) 568int QPEDecoration::getTitleHeight( const QWidget *w )
290{ 569{
291 return 15; 570 WindowDecorationInterface::WindowData wd;
571 windowData( w, wd );
572 return wdiface->metric(WindowDecorationInterface::TitleHeight,&wd);
292} 573}
293 574
294/* 575/*
295 If rect is empty, no frame is added. (a hack, really) 576 If rect is empty, no frame is added. (a hack, really)
296*/ 577*/
297QRegion QPEDecoration::region(const QWidget *widget, const QRect &rect, QWSDecoration::Region type) 578QRegion QPEDecoration::region(const QWidget *widget, const QRect &rect, QWSDecoration::Region type)
298{ 579{
299 int titleHeight = getTitleHeight(widget);
300// int titleWidth = getTitleWidth(widget);
301// int bw = rect.isEmpty() ? 0 : BORDER_WIDTH;
302 QRegion region;
303
304#ifndef MINIMIZE_HELP_HACK
305 qpeManager->updateActive(); 580 qpeManager->updateActive();
306#endif 581
582 WindowDecorationInterface::WindowData wd;
583 windowData( widget, wd );
584 wd.rect = rect;
585
586 int titleHeight = wdiface->metric(WindowDecorationInterface::TitleHeight,&wd);
587 int okWidth = wdiface->metric(WindowDecorationInterface::OKWidth,&wd);
588 int closeWidth = wdiface->metric(WindowDecorationInterface::CloseWidth,&wd);
589 int helpWidth = wdiface->metric(WindowDecorationInterface::HelpWidth,&wd);
590 int grab = wdiface->metric(WindowDecorationInterface::CornerGrabSize,&wd);
591
592 QRegion region;
307 593
308 switch ((int)type) { 594 switch ((int)type) {
309 case Menu: 595 case Menu:
310 case Maximize:
311 break; 596 break;
312 case Minimize: { 597 case Maximize:
313 if ( ((HackWidget *)widget)->needsOk() || 598 if ( !widget->inherits( "QDialog" ) && qApp->desktop()->width() > 350 ) {
314 (widget->inherits( "QDialog" ) && !widget->inherits( "QMessageBox" ) ) ) { 599 int maximizeWidth = wdiface->metric(WindowDecorationInterface::MaximizeWidth,&wd);
315 QRect r(rect.right() - imageOk.width(), 600 int left = rect.right() - maximizeWidth - closeWidth;
316 rect.top() - titleHeight - 2, 601 if ( ((HackWidget *)widget)->needsOk() )
317 imageOk.width(), titleHeight); 602 left -= okWidth;
318 if (r.left() > rect.left() + titleHeight) 603 QRect r(left, rect.top() - titleHeight, closeWidth, titleHeight);
319 region = r; 604 region = r;
320 } 605 }
321#ifdef MINIMIZE_HELP_HACK 606 break;
322 else if ( helpExists ) { 607 case Minimize:
323 QRect r; 608 if ( ((HackWidget *)widget)->needsOk() ) {
324 r = QRect(rect.right() - imageClose.width() - imageHelp.width(), 609 QRect r(rect.right() - okWidth,
325 rect.top() - titleHeight - 2, 610 rect.top() - titleHeight, okWidth, titleHeight);
326 imageHelp.width(), titleHeight);
327 if (r.left() > rect.left() + titleHeight) 611 if (r.left() > rect.left() + titleHeight)
328 region = r; 612 region = r;
329 } 613 }
330#endif 614 break;
331 } 615 case Close:
332 break; 616 {
333 case Close: { 617 int left = rect.right() - closeWidth;
334 if ( ((HackWidget *)widget)->needsOk() || 618 if ( ((HackWidget *)widget)->needsOk() )
335 (widget->inherits( "QDialog" ) && !widget->inherits( "QMessageBox" ) ) ) { 619 left -= okWidth;
336 QRect r; 620 QRect r(left, rect.top() - titleHeight, closeWidth, titleHeight);
337 r = QRect(rect.right() - imageOk.width() - imageClose.width(), 621 region = r;
338 rect.top() - titleHeight - 2,
339 imageClose.width(), titleHeight);
340 if (r.left() > rect.left() + titleHeight)
341 region = r;
342 } else {
343 QRect r(rect.right() - imageClose.width(),
344 rect.top() - titleHeight - 2,
345 imageClose.width(), titleHeight);
346 if (r.left() > rect.left() + titleHeight)
347 region = r;
348 } 622 }
349 break; 623 break;
350 } 624 case Title:
351 case Title: { 625 if ( !widget->isMaximized() ) {
352 if ( widget->isMaximized() ) { 626 int width = rect.width() - helpWidth - closeWidth;
353 region = QRegion(); 627 if ( ((HackWidget *)widget)->needsOk() )
354 } else { 628 width -= okWidth;
355 int btnWidth = imageClose.width(); 629 QRect r(rect.left()+helpWidth, rect.top() - titleHeight,
356 if ( ((HackWidget *)widget)->needsOk() || 630 width, titleHeight);
357 (widget->inherits( "QDialog" ) && !widget->inherits( "QMessageBox" ) ) )
358 btnWidth += imageOk.width();
359 QRect r(rect.left() + 1, rect.top() - titleHeight,
360 rect.width() - btnWidth - 2, titleHeight);
361 if (r.width() > 0) 631 if (r.width() > 0)
362 region = r; 632 region = r;
363 } 633 }
364 break; 634 break;
365 } 635 case Help:
366 case Help: { 636 if ( helpExists || widget->testWFlags(Qt::WStyle_ContextHelp) ) {
367 if ( helpExists ) { 637 QRect r(rect.left(), rect.top() - titleHeight,
368 QRect r; 638 helpWidth, titleHeight);
369 int l = rect.right() - imageClose.width() - imageHelp.width(); 639 region = r;
370 if ( ((HackWidget *)widget)->needsOk() ||
371 (widget->inherits( "QDialog" ) && !widget->inherits( "QMessageBox" ) ) )
372 l -= imageOk.width();
373 r = QRect(l, rect.top() - titleHeight - 2,
374 imageHelp.width(), titleHeight);
375 if (r.left() > rect.left() + titleHeight)
376 region = r;
377 } 640 }
378 break; 641 break;
379 }
380 case Top: 642 case Top:
643 if ( !widget->isMaximized() ) {
644 QRegion m = wdiface->mask(&wd);
645 QRect br = m.boundingRect();
646 int b = wdiface->metric(WindowDecorationInterface::TopBorder,&wd);
647 region = m & QRect( br.left()+grab, br.top(),
648 br.width()-2*grab, b );
649 }
650 break;
381 case Left: 651 case Left:
652 if ( !widget->isMaximized() ) {
653 QRegion m = wdiface->mask(&wd);
654 QRect br = m.boundingRect();
655 int b = wdiface->metric(WindowDecorationInterface::LeftBorder,&wd);
656 region = m & QRect( br.left(), br.top()+grab,
657 b, br.height()-2*grab );
658 }
659 break;
382 case Right: 660 case Right:
661 if ( !widget->isMaximized() ) {
662 QRegion m = wdiface->mask(&wd);
663 QRect br = m.boundingRect();
664 int b = wdiface->metric(WindowDecorationInterface::RightBorder,&wd);
665 region = m & QRect( rect.right(), br.top()+grab,
666 b, br.height()-2*grab );
667 }
668 break;
383 case Bottom: 669 case Bottom:
670 if ( !widget->isMaximized() ) {
671 QRegion m = wdiface->mask(&wd);
672 QRect br = m.boundingRect();
673 int b = wdiface->metric(WindowDecorationInterface::BottomBorder,&wd);
674 region = m & QRect( br.left()+grab, rect.bottom(),
675 br.width()-2*grab, b );
676 }
677 break;
384 case TopLeft: 678 case TopLeft:
679 if ( !widget->isMaximized() ) {
680 QRegion m = wdiface->mask(&wd);
681 QRect br = m.boundingRect();
682 int tb = wdiface->metric(WindowDecorationInterface::TopBorder,&wd);
683 int lb = wdiface->metric(WindowDecorationInterface::LeftBorder,&wd);
684 QRegion crgn( br.left(), br.top(), grab, tb );
685 crgn |= QRect( br.left(), br.top(), lb, grab );
686 region = m & crgn;
687 }
688 break;
385 case TopRight: 689 case TopRight:
690 if ( !widget->isMaximized() ) {
691 QRegion m = wdiface->mask(&wd);
692 QRect br = m.boundingRect();
693 int tb = wdiface->metric(WindowDecorationInterface::TopBorder,&wd);
694 int rb = wdiface->metric(WindowDecorationInterface::RightBorder,&wd);
695 QRegion crgn( br.right()-grab, br.top(), grab, tb );
696 crgn |= QRect( br.right()-rb, br.top(), rb, grab );
697 region = m & crgn;
698 }
699 break;
386 case BottomLeft: 700 case BottomLeft:
701 if ( !widget->isMaximized() ) {
702 QRegion m = wdiface->mask(&wd);
703 QRect br = m.boundingRect();
704 region = m & QRect( br.left(), br.bottom()-grab, grab, grab );
705 }
706 break;
387 case BottomRight: 707 case BottomRight:
388 if ( widget->isMaximized() ) { 708 if ( !widget->isMaximized() ) {
389 region = QRegion(); 709 QRegion m = wdiface->mask(&wd);
390 break; 710 QRect br = m.boundingRect();
711 region = m & QRect( br.right()-grab, br.bottom()-grab, grab, grab );
391 } 712 }
392 //else fallthrough!!! 713 break;
393 case All: 714 case All:
715 if ( widget->isMaximized() )
716 region = QWSDefaultDecoration::region(widget, rect, type);
717 else
718 region = wdiface->mask(&wd) - rect;
719 break;
394 default: 720 default:
395 region = QWSDefaultDecoration::region(widget, rect, type); 721 region = QWSDefaultDecoration::region(widget, rect, type);
396 break; 722 break;
397 } 723 }
398 724
399 return region; 725 return region;
400} 726}
401 727
402void QPEDecoration::paint(QPainter *painter, const QWidget *widget) 728void QPEDecoration::paint(QPainter *painter, const QWidget *widget)
403{ 729{
404#ifndef QT_NO_STYLE 730 WindowDecorationInterface::WindowData wd;
405// QStyle &style = QApplication::style(); 731 windowData( widget, wd );
406#endif
407 732
408 int titleWidth = getTitleWidth(widget); 733 int titleWidth = getTitleWidth(widget);
409 int titleHeight = getTitleHeight(widget); 734 int titleHeight = wdiface->metric(WindowDecorationInterface::TitleHeight,&wd);
410 735
411 QRect rect(widget->rect()); 736 QRect rect(widget->rect());
412 737
413 // Border rect
414 QRect br( rect.left() - BORDER_WIDTH,
415 rect.top() - BORDER_WIDTH - titleHeight,
416 rect.width() + 2 * BORDER_WIDTH,
417 rect.height() + BORDER_WIDTH + BOTTOM_BORDER_WIDTH + titleHeight );
418
419 // title bar rect 738 // title bar rect
420 QRect tr; 739 QRect tr( rect.left(), rect.top() - titleHeight, rect.width(), titleHeight );
421
422 tr = QRect( rect.left(), rect.top() - titleHeight, rect.width(), titleHeight );
423 740
741#ifndef QT_NO_PALETTE
424 QRegion oldClip = painter->clipRegion(); 742 QRegion oldClip = painter->clipRegion();
425 painter->setClipRegion( oldClip - QRegion( tr ) );// reduce flicker 743 painter->setClipRegion( oldClip - QRegion( tr ) );// reduce flicker
426 744 wdiface->drawArea( WindowDecorationInterface::Border, painter, &wd );
427#ifndef QT_NO_PALETTE
428 // const QColorGroup &cg = QApplication::palette().active();
429 const QColorGroup &cg = widget->palette().active();
430
431 qDrawWinPanel(painter, br.x(), br.y(), br.width(),
432 br.height() - 4, cg, FALSE,
433 &cg.brush(QColorGroup::Background));
434
435 painter->setClipRegion( oldClip ); 745 painter->setClipRegion( oldClip );
436 746
437 if (titleWidth > 0) { 747 if (titleWidth > 0) {
748 const QColorGroup &cg = widget->palette().active();
438 QBrush titleBrush; 749 QBrush titleBrush;
439 QPen titlePen; 750 QPen titlePen;
440 QPen titleLines;
441 int titleLeft = titleHeight + 4;
442 751
443 if (widget == qApp->activeWindow()) { 752 if ( wd.flags & WindowDecorationInterface::WindowData::Active ) {
444 titleBrush = cg.brush(QColorGroup::Highlight); 753 titleBrush = cg.brush(QColorGroup::Highlight);
445 titlePen = cg.color(QColorGroup::HighlightedText); 754 titlePen = cg.color(QColorGroup::HighlightedText);
446 } else { 755 } else {
447 titleBrush = cg.brush(QColorGroup::Background); 756 titleBrush = cg.brush(QColorGroup::Background);
448 titlePen = cg.color(QColorGroup::Text); 757 titlePen = cg.color(QColorGroup::Text);
449 } 758 }
450 759
451 titleLines = titleBrush.color().dark(150); 760 wdiface->drawArea( WindowDecorationInterface::Title, painter, &wd );
452
453 #define CLAMP(x, y) ( ((x) > (y)) ? (y) : (x) )
454 761
455 titleLeft = rect.left() + 5; 762 // Draw caption
456 painter->setPen( cg.midlight() );
457 painter->drawLine( rect.left() - BORDER_WIDTH + 2,
458 rect.bottom() + 1, rect.right() + BORDER_WIDTH - 2,
459 rect.bottom() + 1 );
460
461 fillTitle( painter, widget, rect.left() - 2,
462 rect.top() - titleHeight - 2,
463 rect.width() + 3, titleHeight + 2 );
464/*
465 painter->fillRect(rect.left() - 2,
466 rect.top() - titleHeight - 2,
467 rect.width() + 3, titleHeight + 2,
468 titleBrush);
469
470 painter->setPen( titleLines );
471 for ( int i = rect.top() - titleHeight - 2; i < rect.top(); i += 2 )
472 painter->drawLine( rect.left() - 2, i, rect.left() + rect.width() + 2, i );
473*/
474 painter->setPen(titlePen); 763 painter->setPen(titlePen);
475 QFont f( QApplication::font() ); 764 QFont f( QApplication::font() );
476 f.setWeight( QFont::Bold ); 765 f.setWeight( QFont::Bold );
477 painter->setFont(f); 766 painter->setFont(f);
478 painter->drawText( titleLeft, -titleHeight, 767 wdiface->drawArea( WindowDecorationInterface::TitleText, painter, &wd );
479 rect.width() - titleHeight - 10, titleHeight-1,
480 QPainter::AlignVCenter, widget->caption());
481 } 768 }
482
483#endif //QT_NO_PALETTE 769#endif //QT_NO_PALETTE
484 770
485#ifndef MINIMIZE_HELP_HACK
486 paintButton( painter, widget, (QWSDecoration::Region)Help, 0 ); 771 paintButton( painter, widget, (QWSDecoration::Region)Help, 0 );
487#endif
488} 772}
489 773
490void QPEDecoration::paintButton(QPainter *painter, const QWidget *w, 774void QPEDecoration::paintButton(QPainter *painter, const QWidget *w,
491 QWSDecoration::Region type, int state) 775 QWSDecoration::Region type, int state)
492{ 776{
493#ifndef QT_NO_PALETTE 777 WindowDecorationInterface::Button b;
494#ifndef QT_NO_STYLE 778 switch ((int)type) {
495// QStyle &style = QApplication::style(); 779 case Close:
496#endif 780 b = WindowDecorationInterface::Close;
497 const QColorGroup &cg = w->palette().active(); 781 break;
498 782 case Minimize:
499 QRect brect(region(w, w->rect(), type).boundingRect()); 783 if ( ((HackWidget *)w)->needsOk() )
500 784 b = WindowDecorationInterface::OK;
501// int xoff=2; 785 else if ( helpExists )
502// int yoff=2; 786 b = WindowDecorationInterface::Help;
503 787 else
504// const QPixmap *pm=pixmapFor(w,type,state & QWSButton::On, xoff, yoff);
505
506 const QImage *img = 0;
507
508 switch ((int)type) {
509 case Close:
510 img = &imageClose;
511 break;
512 case Minimize:
513 if ( ((HackWidget *)w)->needsOk() ||
514 (w->inherits( "QDialog" ) && !w->inherits( "QMessageBox" ) ) )
515 img = &imageOk;
516 else if ( helpExists )
517 img = &imageHelp;
518 break;
519 case Help:
520 img = &imageHelp;
521 break;
522 default:
523 return; 788 return;
524 } 789 break;
525 790 case Help:
526 QBrush titleBrush; 791 b = WindowDecorationInterface::Help;
527 792 break;
528 if (w == qApp->activeWindow()) { 793 case Maximize:
529 titleBrush = cg.brush(QColorGroup::Highlight); 794 b = WindowDecorationInterface::Maximize;
530 } else { 795 break;
531 titleBrush = cg.brush(QColorGroup::Background); 796 default:
532 } 797 return;
533 798 }
534 fillTitle( painter, w, brect.x(), brect.y(), brect.width()+1,
535 brect.height()+1 );
536 if ((state & QWSButton::MouseOver) && (state & QWSButton::Clicked)) {
537 if (img) painter->drawImage(brect.x()+1, brect.y()+3, *img);
538 } else {
539 if (img) painter->drawImage(brect.x(), brect.y()+2, *img);
540 }
541
542#endif
543
544}
545
546void QPEDecoration::fillTitle( QPainter *p, const QWidget *widget,
547 int x, int y, int w, int h )
548{
549 QBrush titleBrush;
550 QPen topLine;
551 QPen titleLines;
552 799
553 const QColorGroup &cg = widget->palette().active(); 800 WindowDecorationInterface::WindowData wd;
801 windowData( w, wd );
554 802
555 if (widget == qApp->activeWindow()) { 803 int titleHeight = wdiface->metric(WindowDecorationInterface::TitleHeight,&wd);
556 titleBrush = cg.brush(QColorGroup::Highlight); 804 QRect rect(w->rect());
557 titleLines = titleBrush.color().dark(); 805 QRect tr( rect.left(), rect.top() - titleHeight, rect.width(), titleHeight );
558 topLine = titleBrush.color().light(); 806 QRect brect(region(w, w->rect(), type).boundingRect());
559 } else {
560 titleBrush = cg.brush(QColorGroup::Background);
561 titleLines = titleBrush.color();
562 topLine = titleBrush.color();
563 }
564 807
565 p->fillRect( x, y, w, h, titleBrush); 808 const QColorGroup &cg = w->palette().active();
809 if ( wd.flags & WindowDecorationInterface::WindowData::Active )
810 painter->setPen( cg.color(QColorGroup::HighlightedText) );
811 else
812 painter->setPen( cg.color(QColorGroup::Text) );
566 813
567 p->setPen( topLine ); 814 QRegion oldClip = painter->clipRegion();
568 p->drawLine( x, y+1, x+w-1, y+1 ); 815 painter->setClipRegion( QRect(brect.x(), tr.y(), brect.width(), tr.height()) ); // reduce flicker
569 p->setPen( titleLines ); 816 wdiface->drawArea( WindowDecorationInterface::Title, painter, &wd );
570 for ( int i = y; i < y+h; i += 2 ) 817 wdiface->drawButton( b, painter, &wd, brect.x(), brect.y(), brect.width(), brect.height(), (QWSButton::State)state );
571 p->drawLine( x, i, x+w-1, i ); 818 painter->setClipRegion( oldClip );
572} 819}
573 820
574//#define QPE_DONT_SHOW_TITLEBAR 821//#define QPE_DONT_SHOW_TITLEBAR
575 822
576void QPEDecoration::maximize( QWidget *widget ) 823void QPEDecoration::maximize( QWidget *widget )
577{ 824{
578#ifdef QPE_DONT_SHOW_TITLEBAR 825#ifdef QPE_DONT_SHOW_TITLEBAR
579 if ( !widget->inherits( "QDialog" ) ) { 826 if ( !widget->inherits( "QDialog" ) ) {
@@ -612,29 +859,53 @@ void QPEDecoration::minimize( QWidget *widget )
612 QSignal s; 859 QSignal s;
613 s.connect( widget, SLOT( accept() ) ); 860 s.connect( widget, SLOT( accept() ) );
614 s.activate(); 861 s.activate();
615 } else { 862 } else {
616 help( widget ); 863 help( widget );
617 } 864 }
618} 865}
619 866
620void QPEDecoration::help( QWidget * ) 867void QPEDecoration::help( QWidget *w )
621{ 868{
622 if ( helpExists ) { 869 if ( helpExists ) {
623 Global::execute( "helpbrowser", helpFile ); 870 Global::execute( "helpbrowser", helpFile );
871 } else if ( w && w->testWFlags(Qt::WStyle_ContextHelp) ) {
872 QWhatsThis::enterWhatsThisMode();
873 QWhatsThis::leaveWhatsThisMode( qApp->tr(
874 "<Qt>Comprehensive help is not available for this application, "
875 "however there is context-sensitive help.<p>To use context-sensitive help:<p>"
876 "<ol><li>click and hold the help button."
877 "<li>when the title bar shows <b>What's this...</b>, "
878 "click on any control.</ol></Qt>" ) );
624 } 879 }
625} 880}
626 881
882void QPEDecoration::windowData( const QWidget *w, WindowDecorationInterface::WindowData &wd ) const
883{
884 wd.rect = w->rect();
885 if ( qpeManager->whatsThisWidget() == w )
886 wd.caption = qApp->tr("What's this..." );
887 else
888 wd.caption = w->caption();
889 wd.palette = qApp->palette();
890 wd.flags = 0;
891 wd.flags |= w->isMaximized() ? WindowDecorationInterface::WindowData::Maximized : 0;
892 wd.flags |= w->testWFlags(Qt::WStyle_Dialog) ? WindowDecorationInterface::WindowData::Dialog : 0;
893 const QWidget *active = qpeManager->activeWidget();
894 wd.flags |= w == active ? WindowDecorationInterface::WindowData::Active : 0;
895 wd.reserved = 1;
896}
627 897
628/* 898/*
629#ifndef QT_NO_POPUPMENU 899#ifndef QT_NO_POPUPMENU
630QPopupMenu *QPEDecoration::menu(QWSManager*, const QWidget*, const QPoint&) 900QPopupMenu *QPEDecoration::menu(QWSManager*, const QWidget*, const QPoint&)
631{ 901{
632 return 0; 902 return 0;
633} 903}
634#endif 904#endif
635*/ 905*/
636 906
637 907
638 908
639 909
640#endif // QT_NO_QWS_QPE_WM_STYLE 910#endif // QT_NO_QWS_QPE_WM_STYLE
911#endif
diff --git a/library/qpedecoration_qws.h b/library/qpedecoration_qws.h
index b8afd05..691c6f6 100644
--- a/library/qpedecoration_qws.h
+++ b/library/qpedecoration_qws.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -16,54 +16,58 @@
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#ifndef QPE_DECORATION_QWS_H__ 20#ifndef QPE_DECORATION_QWS_H__
21#define QPE_DECORATION_QWS_H__ 21#define QPE_DECORATION_QWS_H__
22 22
23 23
24#ifdef QWS
24#include <qwsdefaultdecoration_qws.h> 25#include <qwsdefaultdecoration_qws.h>
25#include <qimage.h> 26#include <qimage.h>
26#include <qdatetime.h> 27#include <qdatetime.h>
27#include <qguardedptr.h> 28#include <qguardedptr.h>
29#include "windowdecorationinterface.h"
28 30
29 31
30#ifndef QT_NO_QWS_QPE_WM_STYLE 32#ifndef QT_NO_QWS_QPE_WM_STYLE
31 33
32class QPEManager; 34class QPEManager;
33class QTimer; 35class QTimer;
34 36
35class QPEDecoration : public QWSDefaultDecoration 37class QPEDecoration : public QWSDefaultDecoration
36{ 38{
37public: 39public:
38 QPEDecoration(); 40 QPEDecoration();
41 QPEDecoration( const QString &plugin );
39 virtual ~QPEDecoration(); 42 virtual ~QPEDecoration();
40 43
41 virtual QRegion region(const QWidget *, const QRect &rect, Region); 44 virtual QRegion region(const QWidget *, const QRect &rect, Region);
42 virtual void paint(QPainter *, const QWidget *); 45 virtual void paint(QPainter *, const QWidget *);
43 virtual void paintButton(QPainter *, const QWidget *, Region, int state); 46 virtual void paintButton(QPainter *, const QWidget *, Region, int state);
44 47
45 void maximize( QWidget * ); 48 void maximize( QWidget * );
46 void minimize( QWidget * ); 49 void minimize( QWidget * );
47 virtual void help( QWidget * ); 50 virtual void help( QWidget * );
48 51
49 enum QPERegion { Help=LastRegion+1 }; 52 enum QPERegion { Help=LastRegion+1 };
50 void buttonClicked( QPERegion r ); 53 void buttonClicked( QPERegion r );
51 54
52protected: 55protected:
53 void fillTitle( QPainter *p, const QWidget *w, int x, int y, int w, int h );
54// virtual int getTitleWidth(const QWidget *);
55 virtual int getTitleHeight(const QWidget *); 56 virtual int getTitleHeight(const QWidget *);
56 virtual const char **menuPixmap(); 57 virtual const char **menuPixmap();
57 virtual const char **closePixmap(); 58 virtual const char **closePixmap();
58 virtual const char **minimizePixmap(); 59 virtual const char **minimizePixmap();
59 virtual const char **maximizePixmap(); 60 virtual const char **maximizePixmap();
60 virtual const char **normalizePixmap(); 61 virtual const char **normalizePixmap();
61 62
63private:
64 void windowData( const QWidget *w, WindowDecorationInterface::WindowData &wd ) const;
65
62protected: 66protected:
63 QImage imageOk; 67 QImage imageOk;
64 QImage imageClose; 68 QImage imageClose;
65 QImage imageHelp; 69 QImage imageHelp;
66 QString helpFile; 70 QString helpFile;
67 bool helpExists; 71 bool helpExists;
68 QPEManager *qpeManager; 72 QPEManager *qpeManager;
69}; 73};
@@ -72,30 +76,36 @@ protected:
72class QPEManager : public QObject 76class QPEManager : public QObject
73{ 77{
74 Q_OBJECT 78 Q_OBJECT
75 friend class QPEDecoration; 79 friend class QPEDecoration;
76public: 80public:
77 QPEManager( QPEDecoration *d, QObject *parent=0 ); 81 QPEManager( QPEDecoration *d, QObject *parent=0 );
78 82
79 void updateActive(); 83 void updateActive();
84 const QWidget *activeWidget() const { return (const QWidget *)active; }
85 const QWidget *whatsThisWidget() const { return (const QWidget *)whatsThis; }
80 86
81protected: 87protected:
82 int pointInQpeRegion( QWidget *w, const QPoint &p ); 88 int pointInQpeRegion( QWidget *w, const QPoint &p );
83 virtual bool eventFilter( QObject *, QEvent * ); 89 virtual bool eventFilter( QObject *, QEvent * );
84 void drawButton( QWidget *w, QPEDecoration::QPERegion r, int state ); 90 void drawButton( QWidget *w, QPEDecoration::QPERegion r, int state );
91 void drawTitle( QWidget *w );
85 92
86protected slots: 93protected slots:
87 void whatsThisTimeout(); 94 void whatsThisTimeout();
88 95
89protected: 96protected:
90 QPEDecoration *decoration; 97 QPEDecoration *decoration;
91 QGuardedPtr<QWidget> active; 98 QGuardedPtr<QWidget> active;
92 int helpState; 99 int helpState;
93 QTime pressTime; 100 QTime pressTime;
94 QTimer *wtTimer; 101 QTimer *wtTimer;
102 bool inWhatsThis;
103 QGuardedPtr<QWidget> whatsThis;
95}; 104};
96 105
97 106
98#endif // QT_NO_QWS_QPE_WM_STYLE 107#endif // QT_NO_QWS_QPE_WM_STYLE
99 108
100 109
101#endif // QPE_DECORATION_QWS_H__ 110#endif // QPE_DECORATION_QWS_H__
111#endif // QWS
diff --git a/library/qpedialog.cpp b/library/qpedialog.cpp
index 06b0c94..0db161b 100644
--- a/library/qpedialog.cpp
+++ b/library/qpedialog.cpp
@@ -1,44 +1,45 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "qpedialog.h"
22#include "qpeapplication.h"
23
24#define protected public 21#define protected public
25#include <qdialog.h> 22#include <qdialog.h>
23#undef protected
24
25#include "qpedialog.h"
26#include "qpeapplication.h"
26 27
27QPEDialogListener::QPEDialogListener(QDialog *di ) : QObject(di) 28QPEDialogListener::QPEDialogListener(QDialog *di ) : QObject(di)
28{ 29{
29 dialog = di; 30 dialog = di;
30 connect(qApp, SIGNAL(appMessage(const QCString&, const QByteArray&)), 31 connect(qApp, SIGNAL(appMessage(const QCString&, const QByteArray&)),
31 this, SLOT(appMessage(const QCString&, const QByteArray&)) ); 32 this, SLOT(appMessage(const QCString&, const QByteArray&)) );
32} 33}
33 34
34QPEDialogListener::~QPEDialogListener() {} 35QPEDialogListener::~QPEDialogListener() {}
35 36
36void QPEDialogListener::appMessage( const QCString &msg, const QByteArray &data ) 37void QPEDialogListener::appMessage( const QCString &msg, const QByteArray & )
37{ 38{
38 if (!dialog) 39 if (!dialog)
39 return; 40 return;
40 if (msg == "accept()") { 41 if (msg == "accept()") {
41 dialog->accept(); 42 dialog->accept();
42 } else if (msg == "reject()") { 43 } else if (msg == "reject()") {
43 dialog->reject(); 44 dialog->reject();
44 } 45 }
diff --git a/library/qpedialog.h b/library/qpedialog.h
index 1fde09a..ed77720 100644
--- a/library/qpedialog.h
+++ b/library/qpedialog.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/library/qpemenubar.cpp b/library/qpemenubar.cpp
index bb3ad8d..f0171ba 100644
--- a/library/qpemenubar.cpp
+++ b/library/qpemenubar.cpp
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2001 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -242,29 +242,33 @@ bool QPEMenuToolFocusManager::eventFilter( QObject *object, QEvent *event )
242 // Deaticvate if a menu/tool has been hidden 242 // Deaticvate if a menu/tool has been hidden
243 QWidget *w = (QWidget *)object; 243 QWidget *w = (QWidget *)object;
244 if ( !w->isPopup() && !list.contains( GuardedWidget( w ) ) ) { 244 if ( !w->isPopup() && !list.contains( GuardedWidget( w ) ) ) {
245 setActive( FALSE ); 245 setActive( FALSE );
246 } 246 }
247 } 247 }
248 } else if ( event->type() == QEvent::ChildInserted ) { 248 } else if ( event->type() == QEvent::ChildInserted ) {
249 QChildEvent *ce = (QChildEvent *)event; 249 QChildEvent *ce = (QChildEvent *)event;
250 if ( ce->child()->inherits( "QMenuBar" ) ) { 250 if ( ce->child()->isWidgetType() ) {
251 addWidget( (QWidget *)ce->child() ); 251 if ( ce->child()->inherits( "QMenuBar" ) ) {
252 ce->child()->installEventFilter( this ); 252 addWidget( (QWidget *)ce->child() );
253 } else if ( object->inherits( "QToolBar" ) && ce->child()->isWidgetType() ) { 253 ce->child()->installEventFilter( this );
254 addWidget( (QWidget *)ce->child() ); 254 } else if ( object->inherits( "QToolBar" ) ) {
255 addWidget( (QWidget *)ce->child() );
256 }
255 } 257 }
256 } else if ( event->type() == QEvent::ChildRemoved ) { 258 } else if ( event->type() == QEvent::ChildRemoved ) {
257 QChildEvent *ce = (QChildEvent *)event; 259 QChildEvent *ce = (QChildEvent *)event;
258 if ( ce->child()->inherits( "QMenuBar" ) ) { 260 if ( ce->child()->isWidgetType() ) {
259 removeWidget( (QWidget *)ce->child() ); 261 if ( ce->child()->inherits( "QMenuBar" ) ) {
260 ce->child()->removeEventFilter( this ); 262 removeWidget( (QWidget *)ce->child() );
261 } else if ( object->inherits( "QToolBar" ) && ce->child()->isWidgetType() ) { 263 ce->child()->removeEventFilter( this );
262 removeWidget( (QWidget *)ce->child() ); 264 } else if ( object->inherits( "QToolBar" ) ) {
265 removeWidget( (QWidget *)ce->child() );
266 }
263 } 267 }
264 } 268 }
265 269
266 return FALSE; 270 return FALSE;
267} 271}
268 272
269void QPEMenuToolFocusManager::deactivate() 273void QPEMenuToolFocusManager::deactivate()
270{ 274{
@@ -274,17 +278,16 @@ void QPEMenuToolFocusManager::deactivate()
274/*! 278/*!
275 \class QPEMenuBar qpemenubar.h 279 \class QPEMenuBar qpemenubar.h
276 \brief The QPEMenuBar class is obsolete. Use QMenuBar instead. 280 \brief The QPEMenuBar class is obsolete. Use QMenuBar instead.
277 281
278 \obsolete 282 \obsolete
279 283
280 This class is obsolete. Use QMenuBar instead. 284 This class is obsolete. Use QMenuBar instead.
281 285
282 \sa QMenuBar
283*/ 286*/
284 287
285/*! 288/*!
286 Constructs a QPEMenuBar just as you would construct 289 Constructs a QPEMenuBar just as you would construct
287 a QMenuBar, passing \a parent and \a name. 290 a QMenuBar, passing \a parent and \a name.
288*/ 291*/
289QPEMenuBar::QPEMenuBar( QWidget *parent, const char *name ) 292QPEMenuBar::QPEMenuBar( QWidget *parent, const char *name )
290 : QMenuBar( parent, name ) 293 : QMenuBar( parent, name )
@@ -301,24 +304,22 @@ QPEMenuBar::~QPEMenuBar()
301/*! 304/*!
302 \internal 305 \internal
303*/ 306*/
304void QPEMenuBar::keyPressEvent( QKeyEvent *e ) 307void QPEMenuBar::keyPressEvent( QKeyEvent *e )
305{ 308{
306 QMenuBar::keyPressEvent( e ); 309 QMenuBar::keyPressEvent( e );
307} 310}
308 311
309 312/*!
310void QPEMenuBar::activateItem( int index ) 313 \internal
311{ 314*/
315void QPEMenuBar::activateItem( int index ) {
312 activateItemAt( index ); 316 activateItemAt( index );
313} 317}
314 318void QPEMenuBar::goodbye() {
315void QPEMenuBar::goodbye()
316{
317 activateItemAt(-1); 319 activateItemAt(-1);
318 for ( unsigned int i = 0; i < count(); i++ ) { 320 for ( uint i = 0; i < count(); i++ ) {
319 QMenuItem *mi = findItem( idAt(i) ); 321 QMenuItem* mi = findItem( idAt(i) );
320 if ( mi->popup() ) { 322 if (mi->popup() )
321 mi->popup()->hide(); 323 mi->popup()->hide();
322 }
323 } 324 }
324} 325}
diff --git a/library/qpemenubar.h b/library/qpemenubar.h
index 5bfbe83..05abc4e 100644
--- a/library/qpemenubar.h
+++ b/library/qpemenubar.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2001 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -60,14 +60,19 @@ class QPEMenuBar : public QMenuBar
60{ 60{
61 Q_OBJECT 61 Q_OBJECT
62public: 62public:
63 QPEMenuBar( QWidget *parent=0, const char* name=0 ); 63 QPEMenuBar( QWidget *parent=0, const char* name=0 );
64 ~QPEMenuBar(); 64 ~QPEMenuBar();
65 65
66protected: 66protected:
67 virtual void keyPressEvent( QKeyEvent *e ); 67 virtual void keyPressEvent( QKeyEvent *e );
68
69 /* Patch from Mickey
70 * Sharp Qtopia1.5 seems to have these functions
71 * TO BE RESOLVED - zecke
72 */
68 void activateItem( int index ); 73 void activateItem( int index );
69 void goodbye(); 74 void goodbye();
70}; 75};
71 76
72#endif 77#endif
73 78
diff --git a/library/quickexec.cpp b/library/quickexec.cpp
index f3b5089..fad5677 100644
--- a/library/quickexec.cpp
+++ b/library/quickexec.cpp
@@ -1,8 +1,28 @@
1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3**
4** This file is part of the Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
1#include <stdio.h> 21#include <stdio.h>
2#include <sys/types.h> 22#include <sys/types.h>
3#include <sys/stat.h> 23#include <sys/stat.h>
4#include <unistd.h> 24#include <unistd.h>
5#include <fcntl.h> 25#include <fcntl.h>
6 26
7#define QUICKEXEC "/tmp/.quickexec" 27#define QUICKEXEC "/tmp/.quickexec"
8 28
diff --git a/library/quuid.cpp b/library/quuid.cpp
index fb4387c..46fd816 100644
--- a/library/quuid.cpp
+++ b/library/quuid.cpp
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/library/quuid.h b/library/quuid.h
index 4f7a720..841a00f 100644
--- a/library/quuid.h
+++ b/library/quuid.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -85,16 +85,26 @@ struct Q_EXPORT QUuid
85 return !memcmp( this, &orig, sizeof(QUuid) ); 85 return !memcmp( this, &orig, sizeof(QUuid) );
86 } 86 }
87 87
88 bool operator!=(const QUuid &orig ) const 88 bool operator!=(const QUuid &orig ) const
89 { 89 {
90 return !( *this == orig ); 90 return !( *this == orig );
91 } 91 }
92 92
93 inline bool operator<(const QUuid &orig) const
94 {
95 return ( memcmp(this, &orig, sizeof(QUuid)) < 0);
96 }
97
98 inline bool operator>(const QUuid &orig) const
99 {
100 return ( memcmp(this, &orig, sizeof(QUuid) ) > 0);
101 }
102
93#if defined(Q_OS_WIN32) 103#if defined(Q_OS_WIN32)
94 // On Windows we have a type GUID that is used by the platform API, so we 104 // On Windows we have a type GUID that is used by the platform API, so we
95 // provide convenience operators to cast from and to this type. 105 // provide convenience operators to cast from and to this type.
96 QUuid( const GUID &guid ) 106 QUuid( const GUID &guid )
97 { 107 {
98 memcpy( this, &guid, sizeof(GUID) ); 108 memcpy( this, &guid, sizeof(GUID) );
99 } 109 }
100 110
@@ -114,21 +124,32 @@ struct Q_EXPORT QUuid
114 { 124 {
115 return !memcmp( this, &guid, sizeof(QUuid) ); 125 return !memcmp( this, &guid, sizeof(QUuid) );
116 } 126 }
117 127
118 bool operator!=( const GUID &guid ) const 128 bool operator!=( const GUID &guid ) const
119 { 129 {
120 return !( *this == guid ); 130 return !( *this == guid );
121 } 131 }
132
133 inline bool operator<(const QUuid &orig) const
134 {
135 return ( memcmp(this, &orig, sizeof(QUuid) ) < 0);
136 }
137
138 inline bool operator>(const QUuid &orig) const
139 {
140 return ( memcmp(this, &orig, sizeof(QUuid) ) > 0);
141 }
142
122#endif 143#endif
123#if defined (Q_WS_QWS) 144#if defined (Q_WS_QWS)
124 QUuid( uuid_t uuid ) 145 QUuid( uuid_t uuid )
125 { 146 {
126 memcpy( this, &uuid, sizeof(uuid_t) ); 147 memcpy( this, uuid, sizeof(uuid_t) );
127 } 148 }
128 149
129 QUuid &operator=(const uuid_t &orig ) 150 QUuid &operator=(const uuid_t &orig )
130 { 151 {
131 memcpy( this, &orig, sizeof(uuid_t) ); 152 memcpy( this, &orig, sizeof(uuid_t) );
132 return *this; 153 return *this;
133 } 154 }
134#endif 155#endif
diff --git a/library/resource.cpp b/library/resource.cpp
index 0915c45..0db2a75 100644
--- a/library/resource.cpp
+++ b/library/resource.cpp
@@ -1,104 +1,135 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#define QTOPIA_INTERNAL_MIMEEXT
21#include "qpeapplication.h" 22#include "qpeapplication.h"
22#include "resource.h" 23#include "resource.h"
24#include "mimetype.h"
23#include <qdir.h> 25#include <qdir.h>
24#include <qfile.h> 26#include <qfile.h>
25#include <qregexp.h> 27#include <qregexp.h>
26#include <qpixmapcache.h> 28#include <qpixmapcache.h>
27#include <qpainter.h> 29#include <qpainter.h>
28 30
29#include "inlinepics_p.h" 31#include "inlinepics_p.h"
30 32
31/*! 33/*!
32 \class Resource resource.h 34 \class Resource resource.h
33 \brief The Resource class provides access to named resources. 35 \brief The Resource class provides access to named resources.
34 36
35 The resources may be provided from files or other sources. 37 The resources may be provided from files or other sources.
38
39 The allSounds() function returns a list of all the sounds available.
40 A particular sound can be searched for using findSound().
41
42 Images can be loaded with loadImage(), loadPixmap(), loadBitmap()
43 and loadIconSet().
44
45 \ingroup qtopiaemb
36*/ 46*/
37 47
38/*! 48/*!
39 \fn Resource::Resource() 49 \fn Resource::Resource()
40 \internal 50 \internal
41*/ 51*/
42 52
43/*! 53/*!
44 Returns the QPixmap named \a pix. You should avoid including 54 Returns the QPixmap called \a pix. You should avoid including
45 any filename type extension (eg. .png, .xpm). 55 any filename type extension (e.g. .png, .xpm).
46*/ 56*/
47QPixmap Resource::loadPixmap( const QString &pix ) 57QPixmap Resource::loadPixmap( const QString &pix )
48{ 58{
49 QPixmap pm; 59 QPixmap pm;
50 QString key="QPE_"+pix; 60 QString key="QPE_"+pix;
51 if ( !QPixmapCache::find(key,pm) ) { 61 if ( !QPixmapCache::find(key,pm) ) {
52 pm.convertFromImage(loadImage(pix)); 62 pm.convertFromImage(loadImage(pix));
53 QPixmapCache::insert(key,pm); 63 QPixmapCache::insert(key,pm);
54 } 64 }
55 return pm; 65 return pm;
56} 66}
57 67
58/*! 68/*!
59 Returns the QBitmap named \a pix. You should avoid including 69 Returns the QBitmap called \a pix. You should avoid including
60 any filename type extension (eg. .png, .xpm). 70 any filename type extension (e.g. .png, .xpm).
61*/ 71*/
62QBitmap Resource::loadBitmap( const QString &pix ) 72QBitmap Resource::loadBitmap( const QString &pix )
63{ 73{
64 QBitmap bm; 74 QBitmap bm;
65 bm = loadPixmap(pix); 75 bm = loadPixmap(pix);
66 return bm; 76 return bm;
67} 77}
68 78
69/*! 79/*!
70 Returns the filename of a pixmap named \a pix. You should avoid including 80 Returns the filename of a pixmap called \a pix. You should avoid including
71 any filename type extension (eg. .png, .xpm .jpg .jpeg). 81 any filename type extension (e.g. .png, .xpm).
72 82
73 Normally you will use loadPixmap() rather than this function. 83 Normally you will use loadPixmap() rather than this function.
74*/ 84*/
75QString Resource::findPixmap( const QString &pix ) 85QString Resource::findPixmap( const QString &pix )
76{ 86{
77 QString picsPath = QPEApplication::qpeDir() + "pics/"; 87 QString picsPath = QPEApplication::qpeDir() + "pics/";
78 88
79 if ( QFile( picsPath + pix + ".png").exists() ) 89 QString f;
80 return picsPath + pix + ".png"; 90
81 else if ( QFile( picsPath + pix + ".jpeg").exists() ) 91 // Common case optimizations...
82 return picsPath + pix + ".jpeg"; 92 f = picsPath + pix + ".png";
83 else if ( QFile( picsPath + pix + ".jpg").exists() ) 93 if ( QFile( f ).exists() )
84 return picsPath + pix + ".jpg"; 94 return f;
85 else if ( QFile( picsPath + pix + ".xpm").exists() ) 95 f = picsPath + pix + ".xpm";
86 return picsPath + pix + ".xpm"; 96 if ( QFile( f ).exists() )
87 else if ( QFile( picsPath + pix ).exists() ) 97 return f;
98
99 // All formats...
100 QStrList fileFormats = QImageIO::inputFormats();
101 QString ff = fileFormats.first();
102 while ( fileFormats.current() ) {
103 QStringList exts = MimeType("image/"+ff.lower()).extensions();
104 for ( QStringList::ConstIterator it = exts.begin(); it!=exts.end(); ++it ) {
105 QString f = picsPath + pix + "." + *it;
106 if ( QFile(f).exists() )
107 return f;
108 }
109 ff = fileFormats.next();
110 }
111
112 // Finally, no (or existing) extension...
113 if ( QFile( picsPath + pix ).exists() )
88 return picsPath + pix; 114 return picsPath + pix;
89 115
90 //qDebug("Cannot find pixmap: %s", pix.latin1()); 116 //qDebug("Cannot find pixmap: %s", pix.latin1());
91 return QString(); 117 return QString();
92} 118}
93 119
94/*! 120/*!
95 Returns a sound file for a sound named \a name. 121 Returns a sound file for a sound called \a name.
96 You should avoid including any filename type extension (eg. .wav, .au, .mp3). 122
123 You should avoid including any filename type extension (e.g. .wav),
124 as the system will search for only those fileformats which are supported
125 by the library.
126
127 Currently, only WAV files are supported.
97*/ 128*/
98QString Resource::findSound( const QString &name ) 129QString Resource::findSound( const QString &name )
99{ 130{
100 QString picsPath = QPEApplication::qpeDir() + "sounds/"; 131 QString picsPath = QPEApplication::qpeDir() + "sounds/";
101 132
102 QString result; 133 QString result;
103 if ( QFile( (result = picsPath + name + ".wav") ).exists() ) 134 if ( QFile( (result = picsPath + name + ".wav") ).exists() )
104 return result; 135 return result;
@@ -114,27 +145,67 @@ QStringList Resource::allSounds()
114 QDir resourcedir( QPEApplication::qpeDir() + "sounds/", "*.wav" ); 145 QDir resourcedir( QPEApplication::qpeDir() + "sounds/", "*.wav" );
115 QStringList entries = resourcedir.entryList(); 146 QStringList entries = resourcedir.entryList();
116 QStringList result; 147 QStringList result;
117 for (QStringList::Iterator i=entries.begin(); i != entries.end(); ++i) 148 for (QStringList::Iterator i=entries.begin(); i != entries.end(); ++i)
118 result.append((*i).replace(QRegExp("\\.wav"),"")); 149 result.append((*i).replace(QRegExp("\\.wav"),""));
119 return result; 150 return result;
120} 151}
121 152
153static QImage load_image(const QString &name)
154{
155 QImage img = qembed_findImage(name.latin1());
156 if ( img.isNull() ) {
157 // No inlined image, try file
158 QString f = Resource::findPixmap(name);
159 if ( !f.isEmpty() )
160 img.load(f);
161 }
162 return img;
163}
164
122/*! 165/*!
123 Returns the QImage named \a name. You should avoid including 166 Returns the QImage called \a name. You should avoid including
124 any filename type extension (eg. .png, .xpm .jpg). 167 any filename type extension (e.g. .png, .xpm).
125*/ 168*/
126QImage Resource::loadImage( const QString &name) 169QImage Resource::loadImage( const QString &name)
127{ 170{
128 QImage img = qembed_findImage(name.latin1()); 171 #ifndef QT_NO_DEPTH_32// have alpha-blended pixmaps
129 if ( img.isNull() ) 172 static QImage last_enabled;
130 return QImage(findPixmap(name)); 173 static QString last_enabled_name;
174 if ( name == last_enabled_name )
175 return last_enabled;
176#endif
177 QImage img = load_image(name);
178 #ifndef QT_NO_DEPTH_32// have alpha-blended pixmaps
179 if ( img.isNull() ) {
180 // No file, try generating
181 if ( name[name.length()-1]=='d' && name.right(9)=="_disabled" ) {
182 last_enabled_name = name.left(name.length()-9);
183 last_enabled = load_image(last_enabled_name);
184 if ( last_enabled.isNull() ) {
185 last_enabled_name = QString::null;
186 } else {
187 img.detach();
188 img.create( last_enabled.width(), last_enabled.height(), 32 );
189 for ( int y = 0; y < img.height(); y++ ) {
190 for ( int x = 0; x < img.width(); x++ ) {
191 QRgb p = last_enabled.pixel( x, y );
192 int a = qAlpha(p)/3;
193 int g = qGray(qRed(p),qGreen(p),qBlue(p));
194 img.setPixel( x, y, qRgba(g,g,g,a) );
195 }
196 }
197 img.setAlphaBuffer( TRUE );
198 }
199 }
200 }
201#endif
131 return img; 202 return img;
132} 203}
133 204
134/*! 205/*!
135 \fn QIconSet Resource::loadIconSet( const QString &name ) 206 \fn QIconSet Resource::loadIconSet( const QString &name )
136 207
137 Returns a QIconSet for the pixmap named \a name. A disabled icon is 208 Returns a QIconSet for the pixmap named \a name. A disabled icon is
138 generated that conforms to the Qtopia look & feel. You should avoid 209 generated that conforms to the Qtopia look & feel. You should avoid
139 including any filename type extension (eg. .png, .xpm). 210 including any filename type extension (eg. .png, .xpm).
140*/ 211*/
diff --git a/library/resource.h b/library/resource.h
index 982c58a..1f1ba9a 100644
--- a/library/resource.h
+++ b/library/resource.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -40,41 +40,18 @@ public:
40 40
41 static QString findSound( const QString &name ); 41 static QString findSound( const QString &name );
42 static QStringList allSounds(); 42 static QStringList allSounds();
43}; 43};
44 44
45// Inline for compatibility with SHARP ROMs 45// Inline for compatibility with SHARP ROMs
46inline QIconSet Resource::loadIconSet( const QString &pix ) 46inline QIconSet Resource::loadIconSet( const QString &pix )
47{ 47{
48 QImage img = loadImage( pix );
49 QPixmap pm;
50 pm.convertFromImage( img );
51 QIconSet is( pm );
52 QIconSet::Size size = pm.width() <= 22 ? QIconSet::Small : QIconSet::Large;
53
54 QPixmap dpm = loadPixmap( pix + "_disabled" ); 48 QPixmap dpm = loadPixmap( pix + "_disabled" );
55 49 QPixmap pm = loadPixmap( pix );
56 #ifndef QT_NO_DEPTH_32// have alpha-blended pixmaps 50 QIconSet is( pm );
57 if ( dpm.isNull() ) {
58 QImage dimg( img.width(), img.height(), 32 );
59 for ( int y = 0; y < img.height(); y++ ) {
60 for ( int x = 0; x < img.width(); x++ ) {
61 QRgb p = img.pixel( x, y );
62 uint a = (p & 0xff000000) / 3;
63 p = (p & 0x00ffffff) | (a & 0xff000000);
64 dimg.setPixel( x, y, p );
65 }
66 }
67
68 dimg.setAlphaBuffer( TRUE );
69 dpm.convertFromImage( dimg );
70 }
71#endif
72
73 if ( !dpm.isNull() ) 51 if ( !dpm.isNull() )
74 is.setPixmap( dpm, size, QIconSet::Disabled ); 52 is.setPixmap( dpm, pm.width() <= 22 ? QIconSet::Small : QIconSet::Large, QIconSet::Disabled );
75
76 return is; 53 return is;
77} 54}
78 55
79 56
80#endif 57#endif
diff --git a/library/backend/stringutil.h b/library/stringutil.h
index e9daf70..f6cc3f4 100644
--- a/library/backend/stringutil.h
+++ b/library/stringutil.h
@@ -1,35 +1,34 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free 7** GNU General Public License version 2 as published by the Free Software
8** Software Foundation and appearing in the file LICENSE.GPL included 8** Foundation and appearing in the file LICENSE.GPL included in the
9** in the packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** PARTICULAR PURPOSE.
14** 13**
15** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
16** 15**
17** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
18** not clear to you. 17** not clear to you.
19** 18**
20**********************************************************************/ 19**********************************************************************/
21 20
22 21
23#ifndef QTPALMTOP_stringutil_h__ 22#ifndef QTPALMTOP_stringutil_h__
24#define QTPALMTOP_stringutil_h__ 23#define QTPALMTOP_stringutil_h__
25 24
26#include <qstring.h> 25#include <qstring.h>
27#include "qpcglobal.h" 26#include <qtopia/private/qpcglobal.h>
28 27
29namespace Qtopia 28namespace Qtopia
30{ 29{
31 30
32// Simplifies white space within each line but keeps the new line characters 31// Simplifies white space within each line but keeps the new line characters
33QString QPC_EXPORT simplifyMultiLineSpace( const QString &multiLine ); 32QString QPC_EXPORT simplifyMultiLineSpace( const QString &multiLine );
34 33
35// Creates a QString which doesn't contain any "dangerous" 34// Creates a QString which doesn't contain any "dangerous"
diff --git a/library/taskbarappletinterface.h b/library/taskbarappletinterface.h
index 7e20329..705dd9a 100644
--- a/library/taskbarappletinterface.h
+++ b/library/taskbarappletinterface.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -17,25 +17,37 @@
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#ifndef TASKBARAPPLETINTERFACE_H 21#ifndef TASKBARAPPLETINTERFACE_H
22#define TASKBARAPPLETINTERFACE_H 22#define TASKBARAPPLETINTERFACE_H
23 23
24#include <qpe/qcom.h> 24#include <qpe/qcom.h>
25#include <qpixmap.h>
25 26
26#ifndef QT_NO_COMPONENT 27#ifndef QT_NO_COMPONENT
27// {6CA34D0B-C637-4865-A667-7D4CD8A70407} 28// {6CA34D0B-C637-4865-A667-7D4CD8A70407}
28# ifndef IID_TaskbarApplet 29# ifndef IID_TaskbarApplet
29# define IID_TaskbarApplet QUuid( 0x6ca34d0b, 0xc637, 0x4865, 0xa6, 0x67, 0x7d, 0x4c, 0xd8, 0xa7, 0x04, 0x07) 30# define IID_TaskbarApplet QUuid( 0x6ca34d0b, 0xc637, 0x4865, 0xa6, 0x67, 0x7d, 0x4c, 0xd8, 0xa7, 0x04, 0x07)
30# endif 31# endif
31#endif 32#endif
32 33
33class QWidget; 34class QWidget;
34 35
35struct TaskbarAppletInterface : public QUnknownInterface 36struct TaskbarAppletInterface : public QUnknownInterface
36{ 37{
37 virtual QWidget *applet( QWidget *parent ) = 0; 38 virtual QWidget *applet( QWidget *parent ) = 0;
38 virtual int position() const = 0; 39 virtual int position() const = 0;
39}; 40};
40 41
42// {7505E192-4977-465A-B72F-0A8DD491CF43}
43#ifndef IID_TaskbarNamedApplet
44#define IID_TaskbarNamedApplet QUuid( 0x7505e192, 0x4977, 0x465a, 0xb7, 0x2f, 0x0a, 0x8d, 0xd4, 0x91, 0xcf, 0x43)
45#endif
46
47struct TaskbarNamedAppletInterface : public TaskbarAppletInterface
48{
49 virtual QString name() const = 0;
50 virtual QPixmap icon() const = 0;
51};
52
41#endif 53#endif
diff --git a/library/textcodecinterface.h b/library/textcodecinterface.h
new file mode 100644
index 0000000..3b5fb5b
--- a/dev/null
+++ b/library/textcodecinterface.h
@@ -0,0 +1,44 @@
1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3**
4** This file is part of the Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#ifndef TEXTCODECINTERFACE_H
21#define TEXTCODECINTERFACE_H
22
23#include <qstringlist.h>
24#include <qpe/qcom.h>
25
26class QTextCodec;
27
28#ifndef QT_NO_COMPONENT
29#ifndef IID_QtopiaTextCodec
30#define IID_QtopiaTextCodec QUuid( 0x3ee02ba3, 0x57dc, 0x9b1e, 0x40, 0xf4, 0xda, 0xdf, 0x21, 0x89, 0xb6, 0xb4)
31#endif
32#endif
33
34struct TextCodecInterface : public QUnknownInterface
35{
36public:
37 virtual QStringList names() const = 0;
38 virtual QTextCodec *createForName( const QString &name ) = 0;
39
40 virtual QValueList<int> mibEnums() const = 0;
41 virtual QTextCodec *createForMib( int mib ) = 0;
42};
43
44#endif
diff --git a/library/timestring.cpp b/library/timestring.cpp
index d5d78ae..4c6fa72 100644
--- a/library/timestring.cpp
+++ b/library/timestring.cpp
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -112,78 +112,74 @@ QString DateFormat::toWordString() const
112 } 112 }
113 return buf; 113 return buf;
114} 114}
115 115
116QString DateFormat::numberDate(const QDate &d, int v) const 116QString DateFormat::numberDate(const QDate &d, int v) const
117{ 117{
118 QString buf = ""; 118 QString buf = "";
119 119
120 int pad = 0; 120 int pad = 2;
121 if (v & padNumber)
122 pad = 2;
123 121
124 // for each part of the order 122 // for each part of the order
125 for (int i = 0; i < 3; i++) { 123 for (int i = 0; i < 3; i++) {
126 // switch on the relavent 3 bits. 124 // switch on the relavent 3 bits.
127 switch((_shortOrder >> (i * 3)) & 0x0007) { 125 switch((_shortOrder >> (i * 3)) & 0x0007) {
128 case 0x0001: 126 case 0x0001:
129 buf += QString("%1").arg(d.day(), pad); 127 if (pad==2) buf += QString().sprintf("%02d",d.day());
128 else buf += QString().sprintf("%d",d.day());
130 break; 129 break;
131 case 0x0002: 130 case 0x0002:
132 buf += QString("%1").arg(d.month(), pad); 131 if (i==0) { // no padding with only MM/DD/YY format
132 pad=0;
133 }
134 if (pad==2) buf += QString().sprintf("%02d",d.month());
135 else buf += QString().sprintf("%d",d.month());
133 break; 136 break;
134 case 0x0004: 137 case 0x0004:
135 { 138 {
136 int year = d.year(); 139 int year = d.year();
137 if (!(v & longNumber)) 140 if (!(v & longNumber))
138 year = year % 100; 141 year = year % 100;
139 142 buf += QString().sprintf("%02d",year);
140 if (year < 10)
141 buf += "0";
142
143 buf += QString::number(year);
144
145 } 143 }
146 break; 144 break;
147 } 145 }
148 if (i < 2) 146 if (i < 2)
149 buf = _shortSeparator; 147 buf += _shortSeparator;
150 } 148 }
151 return buf; 149 return buf;
152} 150}
153 151
154QString DateFormat::wordDate(const QDate &d, int v) const 152QString DateFormat::wordDate(const QDate &d, int v) const
155{ 153{
156 QString buf = ""; 154 QString buf = "";
157 // for each part of the order 155 // for each part of the order
158 if (v & showWeekDay) { 156 if (v & showWeekDay) {
159 QString weekDay = d.dayName(d.dayOfWeek()); 157 QString weekDay = d.dayName(d.dayOfWeek());
160 if (!(v & longWord)) { 158 if (!(v & longWord)) {
161 weekDay = weekDay.left(3); 159 weekDay = weekDay.left(3);
162 } 160 }
163 buf += weekDay; 161 buf += weekDay;
164 if (_longOrder & 0x0007 == 0x0002) 162 if ((_longOrder & 0x0007) == 0x0002)
165 buf += ' '; 163 buf += ' ';
166 else 164 else
167 buf += ", "; 165 buf += ", ";
168 } 166 }
169 167
170 int pad = 0;
171 if (v & padNumber)
172 pad = 2;
173
174 for (int i = 0; i < 3; i++) { 168 for (int i = 0; i < 3; i++) {
175 // switch on the relavent 3 bits. 169 // switch on the relavent 3 bits.
176 switch((_longOrder >> (i * 3)) & 0x0007) { 170 switch((_longOrder >> (i * 3)) & 0x0007) {
177 case 0x0001: 171 case 0x0001:
178 buf += QString("%1").arg(d.day(), pad); 172 if (i==1) {
179 if (i < 2) { 173 buf += QString().sprintf("%02d, ",d.day());
180 if ((_shortOrder << ((i+1) * 3)) & 0x0007) 174 } else {
181 buf += ", "; 175 buf += QString().sprintf("%2d",d.day());
176 if (separator()=='.') // 2002/1/11
177 buf += ". ";
182 else 178 else
183 buf += " "; 179 buf += " ";
184 } 180 }
185 break; 181 break;
186 case 0x0002: 182 case 0x0002:
187 { 183 {
188 QString monthName = d.monthName(d.month()); 184 QString monthName = d.monthName(d.month());
189 if (!(v & longWord)) { 185 if (!(v & longWord)) {
@@ -352,9 +348,18 @@ QString TimeString::timeString( const QTime &t, bool ampm)
352 return timeString(t,ampm,FALSE); 348 return timeString(t,ampm,FALSE);
353} 349}
354 350
355QString TimeString::shortTime( bool ampm ) 351QString TimeString::shortTime( bool ampm )
356{ 352{
357 return shortTime(ampm,FALSE); 353 return shortTime(ampm,FALSE);
358} 354}
359 355
356QString TimeString::numberDateString( const QDate &d, DateFormat dtf )
357{
358 return dtf.numberDate(d);
359}
360QString TimeString::longNumberDateString( const QDate &d, DateFormat dtf )
361{
362 return dtf.numberDate(d,DateFormat::longNumber);
363}
364
360#include "timestring.moc" 365#include "timestring.moc"
diff --git a/library/timestring.h b/library/timestring.h
index fd06d5b..f8cb3e6 100644
--- a/library/timestring.h
+++ b/library/timestring.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -109,23 +109,28 @@ public:
109 { return dateString( dt, ampm, seconds, currentDateFormat() ); } 109 { return dateString( dt, ampm, seconds, currentDateFormat() ); }
110 110
111 static QString dateString( const QDateTime &t, bool ampm = false ); 111 static QString dateString( const QDateTime &t, bool ampm = false );
112 static QString timeString( const QTime &t, bool ampm, bool seconds ); 112 static QString timeString( const QTime &t, bool ampm, bool seconds );
113 static QString timeString( const QTime &t, bool ampm = false ); 113 static QString timeString( const QTime &t, bool ampm = false );
114 static QString shortTime( bool ampm, bool seconds ); 114 static QString shortTime( bool ampm, bool seconds );
115 static QString shortTime( bool ampm = false ); 115 static QString shortTime( bool ampm = false );
116 116
117 117 static QString numberDateString( const QDate &d, DateFormat );
118 static QString numberDateString( const QDate &d )
119 { return numberDateString( d, currentDateFormat() ); }
120 static QString longNumberDateString( const QDate &d, DateFormat );
121 static QString longNumberDateString( const QDate &d )
122 { return longNumberDateString( d, currentDateFormat() ); }
118 123
119 static QString shortDate( const QDate &, DateFormat ); 124 static QString shortDate( const QDate &, DateFormat );
120 static QString dateString( const QDate &, DateFormat ); 125 static QString dateString( const QDate &, DateFormat );
121 static QString longDateString( const QDate &, DateFormat ); 126 static QString longDateString( const QDate &, DateFormat );
122 127
123 static DateFormat currentDateFormat(); 128 static DateFormat currentDateFormat();
124 129
125private: 130private:
126 static QString dateString( const QDateTime &t, bool ampm, bool seconds, DateFormat ); 131 static QString dateString( const QDateTime &t, bool ampm, bool seconds, DateFormat );
127 132
128 133
129}; 134};
130#endif
131 135
136#endif
diff --git a/library/tzselect.cpp b/library/tzselect.cpp
index 5f102d5..6cc0bea 100644
--- a/library/tzselect.cpp
+++ b/library/tzselect.cpp
@@ -1,50 +1,65 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#define QTOPIA_INTERNAL_TZSELECT_INC_LOCAL
22
21#include "tzselect.h" 23#include "tzselect.h"
22#include "resource.h" 24#include "resource.h"
23#include "global.h" 25#include "global.h"
24#include "config.h" 26#include "config.h"
25#include <qtoolbutton.h> 27#include <qtoolbutton.h>
26#include <qfile.h> 28#include <qfile.h>
27#include <stdlib.h> 29#include <stdlib.h>
28 30
29#ifdef Q_WS_QWS 31#ifdef Q_WS_QWS
30#include <qcopchannel_qws.h> 32#include <qcopchannel_qws.h>
31#endif 33#endif
32 34
35class TimeZoneSelectorPrivate
36{
37public:
38 TimeZoneSelectorPrivate() : includeLocal(FALSE) {}
39 bool includeLocal;
40};
41
33TZCombo::TZCombo( QWidget *p, const char* n ) 42TZCombo::TZCombo( QWidget *p, const char* n )
34 : QComboBox( p, n ) 43 : QComboBox( p, n )
35{ 44{
36 updateZones(); 45 updateZones();
37 // check to see if TZ is set, if it is set the current item to that 46 // check to see if TZ is set, if it is set the current item to that
38 QString tz = getenv("TZ"); 47 QString tz = getenv("TZ");
48 if (parent()->inherits("TimeZoneSelector")) {
49 if ( ((TimeZoneSelector *)parent())->localIncluded() ) {
50 // overide to the 'local' type.
51 tz = "None";
52 }
53 }
39 if ( !tz.isNull() ) { 54 if ( !tz.isNull() ) {
40 int n = 0, 55 int n = 0,
41 index = 0; 56 index = 0;
42 for ( QStringList::Iterator it=identifiers.begin(); 57 for ( QStringList::Iterator it=identifiers.begin();
43 it!=identifiers.end(); ++it) { 58 it!=identifiers.end(); ++it) {
44 if ( *it == tz ) 59 if ( *it == tz )
45 index = n; 60 index = n;
46 n++; 61 n++;
47 } 62 }
48 setCurrentItem(index); 63 setCurrentItem(index);
49 } else { 64 } else {
50 setCurrentItem(0); 65 setCurrentItem(0);
@@ -71,53 +86,73 @@ TZCombo::~TZCombo()
71void TZCombo::updateZones() 86void TZCombo::updateZones()
72{ 87{
73 QString cur = currentText(); 88 QString cur = currentText();
74 clear(); 89 clear();
75 identifiers.clear(); 90 identifiers.clear();
76 int curix=0; 91 int curix=0;
77 QString tz = getenv("TZ"); 92 QString tz = getenv("TZ");
78 bool tzFound = FALSE; 93 bool tzFound = FALSE;
79 Config cfg("CityTime"); 94 Config cfg("WorldTime");
80 cfg.setGroup("TimeZones"); 95 cfg.setGroup("TimeZones");
81 int i=0; 96 int listIndex = 0;
82 for ( ; 1; i++ ) { 97 if (parent()->inherits("TimeZoneSelector")) {
83 QString zn = cfg.readEntry("Zone"+QString::number(i), QString::null); 98 if ( ((TimeZoneSelector *)parent())->localIncluded() ) {
99 // overide to the 'local' type.
100 identifiers.append( "None" );
101 insertItem( tr("None") );
102 if ( cur == tr("None"))
103 curix = 0;
104 listIndex++;
105 }
106 }
107 int cfgIndex = 0;
108 while (1) {
109 QString zn = cfg.readEntry("Zone"+QString::number(cfgIndex), QString::null);
84 if ( zn.isNull() ) 110 if ( zn.isNull() )
85 break; 111 break;
86 if ( zn == tz ) 112 if ( zn == tz )
87 tzFound = TRUE; 113 tzFound = TRUE;
88 QString nm = cfg.readEntry("ZoneName"+QString::number(i)); 114 QString nm = cfg.readEntry("ZoneName"+QString::number(cfgIndex));
89 identifiers.append(zn); 115 identifiers.append(zn);
90 insertItem(nm); 116 insertItem(nm);
91 if ( nm == cur ) 117 if ( nm == cur )
92 curix = i; 118 curix = listIndex;
119 ++cfgIndex;
120 ++listIndex;
93 } 121 }
94 if ( !tzFound && !tz.isEmpty()) { 122 if ( !listIndex ) {
95 int i = tz.find( '/' ); 123 QStringList list = timezoneDefaults();
96 QString nm = tz.mid( i+1 ); 124 for ( QStringList::Iterator it = list.begin(); it!=list.end(); ++it ) {
97 identifiers.append(tz); 125 QString zn = *it;
98 insertItem(nm); 126 QString nm = *++it;
99 if ( nm == cur ) 127 if ( zn == tz )
100 curix = i; 128 tzFound = TRUE;
101 ++i; 129 if ( nm == cur )
130 curix = listIndex;
131 identifiers.append(zn);
132 insertItem(nm);
133 ++listIndex;
134 }
102 } 135 }
103 for (QStringList::Iterator it=extras.begin(); it!=extras.end(); ++it) { 136 for (QStringList::Iterator it=extras.begin(); it!=extras.end(); ++it) {
104 insertItem(*it); 137 insertItem(*it);
105 identifiers.append(*it); 138 identifiers.append(*it);
106 if ( *it == cur ) 139 if ( *it == cur )
107 curix = i; 140 curix = listIndex;
108 ++i; 141 ++listIndex;
109 } 142 }
110 if ( !i ) { 143 if ( !tzFound && !tz.isEmpty()) {
111 QStringList list = timezoneDefaults(); 144 int i = tz.find( '/' );
112 for ( QStringList::Iterator it = list.begin(); it!=list.end(); ++it ) { 145 QString nm = tz.mid( i+1 ).replace(QRegExp("_"), " ");
113 identifiers.append(*it); ++it; 146 identifiers.append(tz);
114 insertItem(*it); 147 insertItem(nm);
115 } 148 if ( nm == cur )
149 curix = listIndex;
150 ++listIndex;
116 } 151 }
117 setCurrentItem(curix); 152 setCurrentItem(curix);
118} 153}
119 154
120 155
121void TZCombo::keyPressEvent( QKeyEvent *e ) 156void TZCombo::keyPressEvent( QKeyEvent *e )
122{ 157{
123 // ### should popup() in Qt 3.0 (it's virtual there) 158 // ### should popup() in Qt 3.0 (it's virtual there)
@@ -159,36 +194,47 @@ void TZCombo::handleSystemChannel(const QCString&msg, const QByteArray&)
159 updateZones(); 194 updateZones();
160 } 195 }
161} 196}
162 197
163 198
164TimeZoneSelector::TimeZoneSelector(QWidget* p, const char* n) : 199TimeZoneSelector::TimeZoneSelector(QWidget* p, const char* n) :
165 QHBox(p,n) 200 QHBox(p,n)
166{ 201{
202 d = new TimeZoneSelectorPrivate();
167 // build the combobox before we do any updates... 203 // build the combobox before we do any updates...
168 cmbTz = new TZCombo( this, "timezone combo" ); 204 cmbTz = new TZCombo( this, "timezone combo" );
169 205
170 cmdTz = new QToolButton( this, "timezone button" ); 206 cmdTz = new QToolButton( this, "timezone button" );
171 QPixmap pixGlobe = Resource::loadPixmap( "citytime_icon" ); 207 cmdTz->setIconSet( Resource::loadIconSet( "citytime_icon" ) );
172 cmdTz->setPixmap( pixGlobe );
173 cmdTz->setMaximumSize( cmdTz->sizeHint() ); 208 cmdTz->setMaximumSize( cmdTz->sizeHint() );
174 209
175 // set up a connection to catch a newly selected item and throw our 210 // set up a connection to catch a newly selected item and throw our
176 // signal 211 // signal
177 QObject::connect( cmbTz, SIGNAL( activated( int ) ), 212 QObject::connect( cmbTz, SIGNAL( activated( int ) ),
178 this, SLOT( slotTzActive( int ) ) ); 213 this, SLOT( slotTzActive( int ) ) );
179 QObject::connect( cmdTz, SIGNAL( clicked() ), 214 QObject::connect( cmdTz, SIGNAL( clicked() ),
180 this, SLOT( slotExecute() ) ); 215 this, SLOT( slotExecute() ) );
181} 216}
182 217
183TimeZoneSelector::~TimeZoneSelector() 218TimeZoneSelector::~TimeZoneSelector()
184{ 219{
185} 220}
186 221
222void TimeZoneSelector::setLocalIncluded(bool b)
223{
224 d->includeLocal = b;
225 cmbTz->updateZones();
226}
227
228bool TimeZoneSelector::localIncluded() const
229{
230 return d->includeLocal;
231}
232
187 233
188QString TimeZoneSelector::currentZone() const 234QString TimeZoneSelector::currentZone() const
189{ 235{
190 return cmbTz->currZone(); 236 return cmbTz->currZone();
191} 237}
192 238
193void TimeZoneSelector::setCurrentZone( const QString& id ) 239void TimeZoneSelector::setCurrentZone( const QString& id )
194{ 240{
@@ -197,18 +243,18 @@ void TimeZoneSelector::setCurrentZone( const QString& id )
197 243
198void TimeZoneSelector::slotTzActive( int ) 244void TimeZoneSelector::slotTzActive( int )
199{ 245{
200 emit signalNewTz( cmbTz->currZone() ); 246 emit signalNewTz( cmbTz->currZone() );
201} 247}
202 248
203void TimeZoneSelector::slotExecute( void ) 249void TimeZoneSelector::slotExecute( void )
204{ 250{
205 // execute the city time application... 251 // execute the world time application...
206 Global::execute( "citytime" ); 252 Global::execute( "worldtime" );
207} 253}
208 254
209QStringList timezoneDefaults( void ) 255QStringList timezoneDefaults( void )
210{ 256{
211 QStringList tzs; 257 QStringList tzs;
212 // load up the list just like the file format (citytime.cpp) 258 // load up the list just like the file format (citytime.cpp)
213 tzs.append( "America/New_York" ); 259 tzs.append( "America/New_York" );
214 tzs.append( "New York" ); 260 tzs.append( "New York" );
diff --git a/library/tzselect.h b/library/tzselect.h
index 9898d84..55e45a3 100644
--- a/library/tzselect.h
+++ b/library/tzselect.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -20,31 +20,33 @@
20#ifndef TZSELECT_H 20#ifndef TZSELECT_H
21#define TZSELECT_H 21#define TZSELECT_H
22 22
23#include <qhbox.h> 23#include <qhbox.h>
24#include <qcombobox.h> 24#include <qcombobox.h>
25#include <qstringlist.h> 25#include <qstringlist.h>
26 26
27class QToolButton; 27class QToolButton;
28class TimeZoneSelector;
28 29
29// a function to load defaults in case there is no file 30// a function to load defaults in case there is no file
30QStringList timezoneDefaults( void ); 31QStringList timezoneDefaults( void );
31 32
32class TZCombo : public QComboBox 33class TZCombo : public QComboBox
33{ 34{
34 Q_OBJECT 35 Q_OBJECT
35public: 36public:
36 TZCombo( QWidget* parent, const char* name = 0 ); 37 TZCombo( QWidget* parent, const char* name = 0 );
37 ~TZCombo(); 38 ~TZCombo();
38 39
39 QString currZone() const; 40 QString currZone() const;
40 void setCurrZone( const QString& id ); 41 void setCurrZone( const QString& id );
41 42
42protected: 43protected:
44 friend class TimeZoneSelector;
43 void keyPressEvent( QKeyEvent *e ); 45 void keyPressEvent( QKeyEvent *e );
44 void mousePressEvent(QMouseEvent*e); 46 void mousePressEvent(QMouseEvent*e);
45 void updateZones(); 47 void updateZones();
46 48
47private slots: 49private slots:
48 void handleSystemChannel(const QCString&, const QByteArray&); 50 void handleSystemChannel(const QCString&, const QByteArray&);
49 51
50private: 52private:
@@ -54,16 +56,24 @@ private:
54 56
55class TimeZoneSelectorPrivate; 57class TimeZoneSelectorPrivate;
56class TimeZoneSelector : public QHBox 58class TimeZoneSelector : public QHBox
57{ 59{
58 Q_OBJECT 60 Q_OBJECT
59public: 61public:
60 TimeZoneSelector( QWidget* parent = 0, const char* name=0 ); 62 TimeZoneSelector( QWidget* parent = 0, const char* name=0 );
61 ~TimeZoneSelector(); 63 ~TimeZoneSelector();
64
65#ifdef QTOPIA_INTERNAL_TZSELECT_INC_LOCAL
66 // badly named.. not to be used outside of qtopia (not forward compatable)
67 // basically allows the "No Timezone" or "None" option.
68 void setLocalIncluded(bool);
69 bool localIncluded() const;
70#endif
71
62 72
63 QString currentZone() const; 73 QString currentZone() const;
64 void setCurrentZone( const QString& id ); 74 void setCurrentZone( const QString& id );
65 75
66signals: 76signals:
67 void signalNewTz( const QString& id ); 77 void signalNewTz( const QString& id );
68 78
69private slots: 79private slots:
diff --git a/library/windowdecorationinterface.h b/library/windowdecorationinterface.h
new file mode 100644
index 0000000..dbec0fe
--- a/dev/null
+++ b/library/windowdecorationinterface.h
@@ -0,0 +1,65 @@
1/**********************************************************************
2** Copyright (C) 2002 Trolltech AS. All rights reserved.
3**
4** This file is part of the Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
21// !!! IMPORTANT !!!
22// This interface is still experimental and subject to change.
23
24#ifndef WINDOWDECORATIONINTERFACE_H
25#define WINDOWDECORATIONINTERFACE_H
26
27#include <qpe/qcom.h>
28#include <qpixmap.h>
29#include <qpalette.h>
30#include <qwsmanager_qws.h>
31
32// {11A45864-4CBA-4DDA-9846-FF234FD307CC}
33#ifndef IID_WindowDecoration
34#define IID_WindowDecoration QUuid( 0x11a45864, 0x4cba, 0x4dda, 0x98, 0x46, 0xff, 0x23, 0x4f, 0xd3, 0x07, 0xcc)
35#endif
36
37struct WindowDecorationInterface : public QUnknownInterface
38{
39 virtual ~WindowDecorationInterface() {}
40
41 struct WindowData {
42 QRect rect;
43 QPalette palette;
44 QString caption;
45 enum Flags { Maximized=0x01, Dialog=0x02, Active=0x04 };
46 Q_UINT32 flags;
47 Q_UINT32 reserved;
48 };
49
50 enum Metric { TitleHeight, LeftBorder, RightBorder, TopBorder, BottomBorder, OKWidth, CloseWidth, HelpWidth, MaximizeWidth, CornerGrabSize };
51 virtual int metric( Metric m, const WindowData * ) const;
52
53 enum Area { Border, Title, TitleText };
54 virtual void drawArea( Area a, QPainter *, const WindowData * ) const;
55
56 enum Button { OK, Close, Help, Maximize };
57 virtual void drawButton( Button b, QPainter *, const WindowData *, int x, int y, int w, int h, QWSButton::State ) const;
58
59 virtual QRegion mask( const WindowData * ) const;
60
61 virtual QString name() const = 0;
62 virtual QPixmap icon() const = 0;
63};
64
65#endif
diff --git a/library/xmlreader.cpp b/library/xmlreader.cpp
index 1ae4485..1caab28 100644
--- a/library/xmlreader.cpp
+++ b/library/xmlreader.cpp
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -14,16 +14,22 @@
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#include "xmlreader.h" 20#include "xmlreader.h"
21 21
22/*! \class Node xmlreader.h
23 \brief A single element in an XML structure defined by XmlHandler
24
25 \ingroup qtopiaemb
26 */
27
22Node::Node() 28Node::Node()
23 : parent( 0 ), prev( 0 ), 29 : parent( 0 ), prev( 0 ),
24 next( 0 ), first( 0 ), last( 0 ) 30 next( 0 ), first( 0 ), last( 0 )
25{ 31{
26} 32}
27 33
28 34
29Node::~Node() 35Node::~Node()
@@ -73,16 +79,25 @@ QString Node::subData(const QString& tag) const
73 while ( c ) { 79 while ( c ) {
74 if ( c->tagName() == tag ) 80 if ( c->tagName() == tag )
75 return c->data(); 81 return c->data();
76 c = c->nextNode(); 82 c = c->nextNode();
77 } 83 }
78 return QString::null; 84 return QString::null;
79} 85}
80 86
87/*! \class XmlHandler xmlreader.h
88 \brief XML document structure holder
89
90 This class provides a Node structure that developers can read their
91 xml data into.
92
93 \ingroup qtopiaemb
94*/
95
81XmlHandler::XmlHandler() 96XmlHandler::XmlHandler()
82 : node( 0 ), tree( 0 ) 97 : node( 0 ), tree( 0 )
83{ 98{
84} 99}
85 100
86XmlHandler::~XmlHandler() 101XmlHandler::~XmlHandler()
87{ 102{
88} 103}
diff --git a/library/xmlreader.h b/library/xmlreader.h
index 2a51176..a4a6697 100644
--- a/library/xmlreader.h
+++ b/library/xmlreader.h
@@ -1,12 +1,12 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.