summaryrefslogtreecommitdiff
path: root/library
Unidiff
Diffstat (limited to 'library') (more/less context) (ignore whitespace changes)
-rw-r--r--library/.cvsignore13
-rw-r--r--library/Makefile.add4
-rw-r--r--library/Makefile.in905
-rw-r--r--library/alarmserver.cpp376
-rw-r--r--library/alarmserver.h35
-rw-r--r--library/applnk.cpp1093
-rw-r--r--library/applnk.h169
-rw-r--r--library/backend/.cvsignore2
-rw-r--r--library/backend/categories.cpp701
-rw-r--r--library/backend/categories.h232
-rw-r--r--library/backend/contact.cpp909
-rw-r--r--library/backend/contact.h217
-rw-r--r--library/backend/event.cpp830
-rw-r--r--library/backend/event.h229
-rw-r--r--library/backend/palmtoprecord.cpp127
-rw-r--r--library/backend/palmtoprecord.h94
-rw-r--r--library/backend/palmtopuidgen.h83
-rw-r--r--library/backend/qfiledirect_p.h36
-rw-r--r--library/backend/qpcglobal.h50
-rw-r--r--library/backend/recordfields.h135
-rw-r--r--library/backend/stringutil.cpp415
-rw-r--r--library/backend/stringutil.h57
-rw-r--r--library/backend/task.cpp271
-rw-r--r--library/backend/task.h77
-rw-r--r--library/backend/timeconversion.cpp237
-rw-r--r--library/backend/timeconversion.h45
-rw-r--r--library/backend/vcc.y1199
-rw-r--r--library/backend/vobject.cpp1210
-rw-r--r--library/backend/vobject_p.h401
-rw-r--r--library/calendar.cpp66
-rw-r--r--library/calendar.h47
-rw-r--r--library/categoryedit_p.cpp227
-rw-r--r--library/categoryedit_p.h60
-rw-r--r--library/categoryeditbase_p.ui223
-rw-r--r--library/categorymenu.cpp110
-rw-r--r--library/categorymenu.h64
-rw-r--r--library/categoryselect.cpp315
-rw-r--r--library/categoryselect.h105
-rw-r--r--library/categorywidget.cpp71
-rw-r--r--library/categorywidget.h50
-rw-r--r--library/config.cpp557
-rw-r--r--library/config.h102
-rw-r--r--library/custom-sharp.h127
-rw-r--r--library/datebookdb.cpp1121
-rw-r--r--library/datebookdb.h85
-rw-r--r--library/datebookmonth.cpp713
-rw-r--r--library/datebookmonth.h210
-rw-r--r--library/filemanager.cpp274
-rw-r--r--library/filemanager.h56
-rw-r--r--library/fileselector.cpp340
-rw-r--r--library/fileselector.h108
-rw-r--r--library/finddialog.cpp73
-rw-r--r--library/finddialog.h57
-rw-r--r--library/findwidget_p.cpp119
-rw-r--r--library/findwidget_p.h65
-rw-r--r--library/findwidgetbase_p.ui261
-rw-r--r--library/fontdatabase.cpp235
-rw-r--r--library/fontdatabase.h62
-rw-r--r--library/fontfactoryinterface.h41
-rw-r--r--library/fontmanager.cpp101
-rw-r--r--library/fontmanager.h36
-rw-r--r--library/global.cpp644
-rw-r--r--library/global.h85
-rw-r--r--library/imageedit.cpp97
-rw-r--r--library/imageedit.h52
-rw-r--r--library/inlinepics_p.h5586
-rw-r--r--library/inputmethodinterface.h49
-rw-r--r--library/ir.cpp79
-rw-r--r--library/ir.h31
-rw-r--r--library/library.pro132
-rw-r--r--library/lightstyle.cpp1284
-rw-r--r--library/lightstyle.h120
-rw-r--r--library/lnkproperties.cpp289
-rw-r--r--library/lnkproperties.h60
-rw-r--r--library/lnkpropertiesbase_p.ui399
-rw-r--r--library/menubutton.cpp187
-rw-r--r--library/menubutton.h63
-rw-r--r--library/mimetype.cpp204
-rw-r--r--library/mimetype.h64
-rwxr-xr-xlibrary/mkinlinepics3
-rw-r--r--library/network.cpp436
-rw-r--r--library/network.h52
-rw-r--r--library/networkinterface.cpp104
-rw-r--r--library/networkinterface.h54
-rw-r--r--library/password.cpp323
-rw-r--r--library/password.h32
-rw-r--r--library/passwordbase_p.ui590
-rw-r--r--library/power.cpp226
-rw-r--r--library/power.h85
-rw-r--r--library/process.cpp79
-rw-r--r--library/process.h94
-rw-r--r--library/process_unix.cpp502
-rw-r--r--library/proxies.cpp118
-rw-r--r--library/proxies.h45
-rw-r--r--library/proxiesbase_p.ui360
-rw-r--r--library/qcleanuphandler_p.h51
-rw-r--r--library/qcom.h83
-rw-r--r--library/qcopenvelope_qws.cpp162
-rw-r--r--library/qcopenvelope_qws.h39
-rw-r--r--library/qdawg.cpp510
-rw-r--r--library/qdawg.h70
-rw-r--r--library/qlibrary.cpp437
-rw-r--r--library/qlibrary.h77
-rw-r--r--library/qlibrary_p.h113
-rw-r--r--library/qlibrary_unix.cpp132
-rw-r--r--library/qmath.c157
-rw-r--r--library/qmath.h42
-rw-r--r--library/qpe-base.control10
-rw-r--r--library/qpeapplication.cpp1597
-rw-r--r--library/qpeapplication.h124
-rw-r--r--library/qpedebug.cpp51
-rw-r--r--library/qpedebug.h29
-rw-r--r--library/qpedecoration_qws.cpp639
-rw-r--r--library/qpedecoration_qws.h101
-rw-r--r--library/qpedialog.cpp45
-rw-r--r--library/qpedialog.h44
-rw-r--r--library/qpemenubar.cpp308
-rw-r--r--library/qpemenubar.h71
-rw-r--r--library/qpemessagebox.cpp13
-rw-r--r--library/qpemessagebox.h11
-rw-r--r--library/qpestyle.cpp1194
-rw-r--r--library/qpestyle.h102
-rw-r--r--library/qpetoolbar.cpp52
-rw-r--r--library/qpetoolbar.h39
-rw-r--r--library/qprocess.cpp654
-rw-r--r--library/qprocess.h174
-rw-r--r--library/qprocess_unix.cpp1157
-rw-r--r--library/quickexec.cpp41
-rw-r--r--library/quickexec_p.h17
-rw-r--r--library/quuid.cpp146
-rw-r--r--library/quuid.h142
-rw-r--r--library/resource.cpp136
-rw-r--r--library/resource.h80
-rw-r--r--library/sound.cpp173
-rw-r--r--library/sound.h43
-rw-r--r--library/storage.cpp188
-rw-r--r--library/storage.h80
-rw-r--r--library/task-qpe.control10
-rw-r--r--library/taskbarappletinterface.h41
-rw-r--r--library/timestring.cpp360
-rw-r--r--library/timestring.h131
-rw-r--r--library/tzselect.cpp228
-rw-r--r--library/tzselect.h79
-rw-r--r--library/version.h3
-rw-r--r--library/xmlreader.cpp137
-rw-r--r--library/xmlreader.h83
146 files changed, 39167 insertions, 0 deletions
diff --git a/library/.cvsignore b/library/.cvsignore
new file mode 100644
index 0000000..28c0e8a
--- a/dev/null
+++ b/library/.cvsignore
@@ -0,0 +1,13 @@
1moc_*
2*.moc
3Makefile
4proxiesbase_p.h
5proxiesbase_p.cpp
6passwordbase_p.h
7passwordbase_p.cpp
8categoryeditbase_p.cpp
9categoryeditbase_p.h
10findwidgetbase_p.cpp
11findwidgetbase_p.h
12lnkpropertiesbase_p.cpp
13lnkpropertiesbase_p.h
diff --git a/library/Makefile.add b/library/Makefile.add
new file mode 100644
index 0000000..b7b58f5
--- a/dev/null
+++ b/library/Makefile.add
@@ -0,0 +1,4 @@
1backend/vcc_yacc.cpp: backend/vcc.y
2 $(YACC) $(YACCFLAGS) -p vcc backend/vcc.y
3 -rm backend/vcc_yacc.cpp
4 mv y.tab.c backend/vcc_yacc.cpp
diff --git a/library/Makefile.in b/library/Makefile.in
new file mode 100644
index 0000000..c89390f
--- a/dev/null
+++ b/library/Makefile.in
@@ -0,0 +1,905 @@
1#############################################################################
2
3####### Compiler, tools and options
4
5 CXX =$(SYSCONF_CXX) $(QT_CXX_MT)
6 CXXFLAGS=$(SYSCONF_CXXFLAGS_QT) $(SYSCONF_CXXFLAGS) $(SYSCONF_CXXFLAGS_LIB)
7 CC =$(SYSCONF_CC) $(QT_C_MT)
8 CFLAGS =$(SYSCONF_CFLAGS) $(SYSCONF_CFLAGS_LIB)
9 INCPATH =-I$(QPEDIR)/include -Ibackend
10 LFLAGS =$(SYSCONF_LFLAGS_QT) $(SYSCONF_RPATH_QT) $(SYSCONF_LFLAGS) $(QT_LFLAGS_MT)
11 LIBS =$(SUBLIBS) -ldl -lcrypt -lm $(SYSCONF_LIBS_QT) $(SYSCONF_LIBS_QTAPP)
12 MOC =$(SYSCONF_MOC)
13 UIC =$(SYSCONF_UIC)
14
15####### Target
16
17DESTDIR = $(QTDIR)/lib$(PROJMAK)/
18VER_MAJ = 1
19VER_MIN = 5
20VER_PATCH = 0
21 TARGET= qpe
22TARGET1 = lib$(TARGET).so.$(VER_MAJ)
23
24####### Files
25
26 HEADERS =calendar.h \
27 global.h \
28 resource.h \
29 xmlreader.h \
30 mimetype.h \
31 menubutton.h \
32 network.h \
33 networkinterface.h \
34 proxies.h \
35 filemanager.h \
36 fontmanager.h \
37 qdawg.h \
38 datebookmonth.h \
39 fileselector.h \
40 imageedit.h \
41 qcopenvelope_qws.h \
42 qpedecoration_qws.h \
43 qpeapplication.h \
44 qpestyle.h \
45 qpedialog.h \
46 lightstyle.h \
47 config.h \
48 applnk.h \
49 sound.h \
50 tzselect.h \
51 qmath.h \
52 datebookdb.h \
53 alarmserver.h \
54 process.h \
55 password.h \
56 timestring.h \
57 fontfactoryinterface.h \
58 fontdatabase.h \
59 power.h \
60 storage.h \
61 qpemessagebox.h \
62 backend/timeconversion.h \
63 qpedebug.h \
64 qpemenubar.h \
65 qpetoolbar.h \
66 backend/categories.h \
67 backend/stringutil.h \
68 backend/palmtopuid.h \
69 backend/palmtoprecord.h \
70 backend/task.h \
71 backend/event.h \
72 backend/contact.h \
73 categorymenu.h \
74 categoryedit_p.h \
75 categoryselect.h \
76 categorywidget.h \
77 ir.h \
78 backend/vobject_p.h \
79 findwidget_p.h \
80 finddialog.h \
81 lnkproperties.h \
82 quuid.h \
83 qcom.h \
84 qlibrary.h \
85 qlibrary_p.h \
86 qprocess.h
87 SOURCES =calendar.cpp \
88 global.cpp \
89 xmlreader.cpp \
90 mimetype.cpp \
91 menubutton.cpp \
92 network.cpp \
93 networkinterface.cpp \
94 proxies.cpp \
95 filemanager.cpp \
96 fontmanager.cpp \
97 qdawg.cpp \
98 datebookmonth.cpp \
99 fileselector.cpp \
100 imageedit.cpp \
101 resource.cpp \
102 qpedecoration_qws.cpp \
103 qcopenvelope_qws.cpp \
104 qpeapplication.cpp \
105 qpestyle.cpp \
106 qpedialog.cpp \
107 lightstyle.cpp \
108 config.cpp \
109 applnk.cpp \
110 sound.cpp \
111 tzselect.cpp \
112 qmath.c \
113 datebookdb.cpp \
114 alarmserver.cpp \
115 password.cpp \
116 process.cpp \
117 process_unix.cpp \
118 timestring.cpp \
119 fontdatabase.cpp \
120 power.cpp \
121 storage.cpp \
122 qpemessagebox.cpp \
123 backend/timeconversion.cpp \
124 qpedebug.cpp \
125 qpemenubar.cpp \
126 qpetoolbar.cpp \
127 backend/categories.cpp \
128 backend/stringutil.cpp \
129 backend/palmtoprecord.cpp \
130 backend/task.cpp \
131 backend/event.cpp \
132 backend/contact.cpp \
133 categorymenu.cpp \
134 categoryedit_p.cpp \
135 categoryselect.cpp \
136 categorywidget.cpp \
137 ir.cpp \
138 backend/vcc_yacc.cpp \
139 backend/vobject.cpp \
140 findwidget_p.cpp \
141 finddialog.cpp \
142 lnkproperties.cpp \
143 quuid.cpp \
144 qlibrary.cpp \
145 qlibrary_unix.cpp \
146 qprocess.cpp \
147 qprocess_unix.cpp
148 OBJECTS =calendar.o \
149 global.o \
150 xmlreader.o \
151 mimetype.o \
152 menubutton.o \
153 network.o \
154 networkinterface.o \
155 proxies.o \
156 filemanager.o \
157 fontmanager.o \
158 qdawg.o \
159 datebookmonth.o \
160 fileselector.o \
161 imageedit.o \
162 resource.o \
163 qpedecoration_qws.o \
164 qcopenvelope_qws.o \
165 qpeapplication.o \
166 qpestyle.o \
167 qpedialog.o \
168 lightstyle.o \
169 config.o \
170 applnk.o \
171 sound.o \
172 tzselect.o \
173 qmath.o \
174 datebookdb.o \
175 alarmserver.o \
176 password.o \
177 process.o \
178 process_unix.o \
179 timestring.o \
180 fontdatabase.o \
181 power.o \
182 storage.o \
183 qpemessagebox.o \
184 backend/timeconversion.o \
185 qpedebug.o \
186 qpemenubar.o \
187 qpetoolbar.o \
188 backend/categories.o \
189 backend/stringutil.o \
190 backend/palmtoprecord.o \
191 backend/task.o \
192 backend/event.o \
193 backend/contact.o \
194 categorymenu.o \
195 categoryedit_p.o \
196 categoryselect.o \
197 categorywidget.o \
198 ir.o \
199 backend/vcc_yacc.o \
200 backend/vobject.o \
201 findwidget_p.o \
202 finddialog.o \
203 lnkproperties.o \
204 quuid.o \
205 qlibrary.o \
206 qlibrary_unix.o \
207 qprocess.o \
208 qprocess_unix.o \
209 passwordbase_p.o \
210 proxiesbase_p.o \
211 categoryeditbase_p.o \
212 findwidgetbase_p.o \
213 lnkpropertiesbase_p.o
214INTERFACES = passwordbase_p.ui \
215 proxiesbase_p.ui \
216 categoryeditbase_p.ui \
217 findwidgetbase_p.ui \
218 lnkpropertiesbase_p.ui
219UICDECLS = passwordbase_p.h \
220 proxiesbase_p.h \
221 categoryeditbase_p.h \
222 findwidgetbase_p.h \
223 lnkpropertiesbase_p.h
224UICIMPLS = passwordbase_p.cpp \
225 proxiesbase_p.cpp \
226 categoryeditbase_p.cpp \
227 findwidgetbase_p.cpp \
228 lnkpropertiesbase_p.cpp
229 SRCMOC =moc_menubutton.cpp \
230 moc_proxies.cpp \
231 moc_datebookmonth.cpp \
232 moc_fileselector.cpp \
233 moc_imageedit.cpp \
234 moc_qpedecoration_qws.cpp \
235 moc_qpeapplication.cpp \
236 moc_qpedialog.cpp \
237 moc_tzselect.cpp \
238 moc_process.cpp \
239 moc_storage.cpp \
240 moc_qpemenubar.cpp \
241 moc_qpetoolbar.cpp \
242 backend/moc_categories.cpp \
243 moc_categorymenu.cpp \
244 moc_categoryedit_p.cpp \
245 moc_categoryselect.cpp \
246 moc_ir.cpp \
247 moc_findwidget_p.cpp \
248 moc_finddialog.cpp \
249 moc_lnkproperties.cpp \
250 moc_qlibrary_p.cpp \
251 moc_qprocess.cpp \
252 global.moc \
253 network.moc \
254 password.moc \
255 process_unix.moc \
256 timestring.moc \
257 qprocess_unix.moc \
258 moc_passwordbase_p.cpp \
259 moc_proxiesbase_p.cpp \
260 moc_categoryeditbase_p.cpp \
261 moc_findwidgetbase_p.cpp \
262 moc_lnkpropertiesbase_p.cpp
263 OBJMOC =moc_menubutton.o \
264 moc_proxies.o \
265 moc_datebookmonth.o \
266 moc_fileselector.o \
267 moc_imageedit.o \
268 moc_qpedecoration_qws.o \
269 moc_qpeapplication.o \
270 moc_qpedialog.o \
271 moc_tzselect.o \
272 moc_process.o \
273 moc_storage.o \
274 moc_qpemenubar.o \
275 moc_qpetoolbar.o \
276 backend/moc_categories.o \
277 moc_categorymenu.o \
278 moc_categoryedit_p.o \
279 moc_categoryselect.o \
280 moc_ir.o \
281 moc_findwidget_p.o \
282 moc_finddialog.o \
283 moc_lnkproperties.o \
284 moc_qlibrary_p.o \
285 moc_qprocess.o \
286 moc_passwordbase_p.o \
287 moc_proxiesbase_p.o \
288 moc_categoryeditbase_p.o \
289 moc_findwidgetbase_p.o \
290 moc_lnkpropertiesbase_p.o
291
292
293####### Implicit rules
294
295.SUFFIXES: .cpp .cxx .cc .C .c
296
297.cpp.o:
298 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
299
300.cxx.o:
301 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
302
303.cc.o:
304 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
305
306.C.o:
307 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
308
309.c.o:
310 $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
311
312####### Build rules
313
314
315all: $(DESTDIR)$(SYSCONF_LINK_TARGET)
316
317$(DESTDIR)$(SYSCONF_LINK_TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) $(SUBLIBS)
318 $(SYSCONF_LINK_LIB)
319
320moc: $(SRCMOC)
321
322tmake:
323 tmake library.pro
324
325clean:
326 -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS)
327 -rm -f *~ core
328 -rm -f allmoc.cpp
329
330####### Extension Modules
331
332listpromodules:
333 @echo
334
335listallmodules:
336 @echo
337
338listaddonpromodules:
339 @echo
340
341listaddonentmodules:
342 @echo
343
344
345REQUIRES=
346
347####### Sub-libraries
348
349
350###### Combined headers
351
352
353
354####### Compile
355
356calendar.o: calendar.cpp \
357 calendar.h
358
359global.o: global.cpp \
360 global.moc
361
362xmlreader.o: xmlreader.cpp \
363 xmlreader.h
364
365mimetype.o: mimetype.cpp \
366 mimetype.h \
367 applnk.h \
368 resource.h \
369 qpeapplication.h \
370 qpedecoration_qws.h \
371 timestring.h
372
373menubutton.o: menubutton.cpp \
374 menubutton.h
375
376network.o: network.cpp \
377 network.moc
378
379networkinterface.o: networkinterface.cpp \
380 networkinterface.h \
381 network.h \
382 config.h
383
384proxies.o: proxies.cpp \
385 proxies.h \
386 config.h \
387 proxiesbase_p.h
388
389filemanager.o: filemanager.cpp \
390 filemanager.h \
391 applnk.h
392
393fontmanager.o: fontmanager.cpp \
394 fontmanager.h
395
396qdawg.o: qdawg.cpp \
397 qdawg.h
398
399datebookmonth.o: datebookmonth.cpp \
400 config.h \
401 datebookmonth.h \
402 calendar.h \
403 timestring.h \
404 datebookdb.h \
405 resource.h \
406 qpeapplication.h \
407 qpedecoration_qws.h
408
409fileselector.o: fileselector.cpp \
410 fileselector.h \
411 filemanager.h \
412 applnk.h \
413 global.h \
414 resource.h \
415 config.h \
416 storage.h \
417 qpemenubar.h \
418 lnkproperties.h \
419 qpeapplication.h \
420 qpedecoration_qws.h \
421 timestring.h \
422 categorymenu.h
423
424imageedit.o: imageedit.cpp \
425 imageedit.h
426
427resource.o: resource.cpp \
428 qpeapplication.h \
429 qpedecoration_qws.h \
430 timestring.h \
431 resource.h \
432 inlinepics_p.h
433
434qpedecoration_qws.o: qpedecoration_qws.cpp \
435 qcopenvelope_qws.h \
436 qpedecoration_qws.h \
437 qpeapplication.h \
438 timestring.h \
439 resource.h \
440 global.h
441
442qcopenvelope_qws.o: qcopenvelope_qws.cpp \
443 qcopenvelope_qws.h \
444 global.h
445
446qpeapplication.o: qpeapplication.cpp \
447 qcopenvelope_qws.h \
448 qpeapplication.h \
449 qpedecoration_qws.h \
450 timestring.h \
451 qpestyle.h \
452 lightstyle.h \
453 global.h \
454 resource.h \
455 config.h \
456 network.h \
457 fontmanager.h \
458 power.h \
459 alarmserver.h \
460 applnk.h
461
462qpestyle.o: qpestyle.cpp \
463 qpestyle.h \
464 qpeapplication.h \
465 qpedecoration_qws.h \
466 timestring.h
467
468qpedialog.o: qpedialog.cpp \
469 qpedialog.h \
470 qpeapplication.h \
471 qpedecoration_qws.h \
472 timestring.h
473
474lightstyle.o: lightstyle.cpp \
475 lightstyle.h
476
477config.o: config.cpp \
478 config.h
479
480applnk.o: applnk.cpp \
481 applnk.h
482
483sound.o: sound.cpp
484
485tzselect.o: tzselect.cpp \
486 tzselect.h \
487 resource.h \
488 global.h \
489 config.h
490
491qmath.o: qmath.c \
492 qmath.h
493
494datebookdb.o: datebookdb.cpp \
495 datebookdb.h
496
497alarmserver.o: alarmserver.cpp \
498 qpeapplication.h \
499 qpedecoration_qws.h \
500 timestring.h \
501 global.h \
502 resource.h \
503 qcopenvelope_qws.h \
504 alarmserver.h
505
506password.o: password.cpp \
507 password.moc \
508 password.h \
509 config.h \
510 global.h \
511 backend/contact.h \
512 passwordbase_p.h
513
514process.o: process.cpp \
515 process.h
516
517process_unix.o: process_unix.cpp \
518 process_unix.moc \
519 process.h
520
521timestring.o: timestring.cpp \
522 timestring.moc \
523 timestring.h \
524 qpeapplication.h \
525 qpedecoration_qws.h \
526 config.h
527
528fontdatabase.o: fontdatabase.cpp \
529 qpeapplication.h \
530 qpedecoration_qws.h \
531 timestring.h \
532 fontfactoryinterface.h \
533 fontdatabase.h
534
535power.o: power.cpp \
536 power.h
537
538storage.o: storage.cpp
539
540qpemessagebox.o: qpemessagebox.cpp \
541 qpemessagebox.h
542
543backend/timeconversion.o: backend/timeconversion.cpp \
544 backend/timeconversion.h
545
546qpedebug.o: qpedebug.cpp \
547 qpedebug.h
548
549qpemenubar.o: qpemenubar.cpp \
550 qpemenubar.h
551
552qpetoolbar.o: qpetoolbar.cpp \
553 qpetoolbar.h \
554 qpemenubar.h
555
556backend/categories.o: backend/categories.cpp \
557 backend/categories.h \
558 backend/qpcglobal.h \
559 backend/palmtopuidgen.h \
560 backend/stringutil.h
561
562backend/stringutil.o: backend/stringutil.cpp \
563 backend/stringutil.h \
564 backend/qpcglobal.h
565
566backend/palmtoprecord.o: backend/palmtoprecord.cpp \
567 backend/palmtoprecord.h \
568 backend/qpcglobal.h \
569 backend/palmtopuidgen.h \
570 backend/stringutil.h
571
572backend/task.o: backend/task.cpp \
573 backend/vobject_p.h \
574 backend/timeconversion.h \
575 backend/qfiledirect_p.h
576
577backend/event.o: backend/event.cpp \
578 backend/event.h \
579 backend/qfiledirect_p.h \
580 backend/vobject_p.h
581
582backend/contact.o: backend/contact.cpp \
583 backend/contact.h \
584 backend/vobject_p.h \
585 backend/qfiledirect_p.h
586
587categorymenu.o: categorymenu.cpp \
588 categorymenu.h \
589 backend/categories.h \
590 backend/qpcglobal.h \
591 backend/palmtopuidgen.h \
592 categoryselect.h
593
594categoryedit_p.o: categoryedit_p.cpp \
595 categoryedit_p.h \
596 categoryeditbase_p.h
597
598categoryselect.o: categoryselect.cpp \
599 categorywidget.h \
600 categoryselect.h
601
602categorywidget.o: categorywidget.cpp \
603 categoryedit_p.h \
604 categoryeditbase_p.h \
605 categorywidget.h
606
607ir.o: ir.cpp \
608 ir.h \
609 qcopenvelope_qws.h \
610 applnk.h
611
612backend/vcc_yacc.o: backend/vcc_yacc.cpp \
613 backend/vobject_p.h
614
615backend/vobject.o: backend/vobject.cpp \
616 backend/vobject_p.h \
617 backend/qfiledirect_p.h
618
619findwidget_p.o: findwidget_p.cpp \
620 findwidget_p.h \
621 findwidgetbase_p.h
622
623finddialog.o: finddialog.cpp \
624 finddialog.h \
625 findwidget_p.h \
626 findwidgetbase_p.h
627
628lnkproperties.o: lnkproperties.cpp \
629 lnkproperties.h \
630 lnkpropertiesbase_p.h \
631 ir.h
632
633quuid.o: quuid.cpp \
634 quuid.h
635
636qlibrary.o: qlibrary.cpp \
637 qlibrary_p.h \
638 qlibrary.h
639
640qlibrary_unix.o: qlibrary_unix.cpp \
641 qlibrary_p.h \
642 qlibrary.h
643
644qprocess.o: qprocess.cpp \
645 qprocess.h
646
647qprocess_unix.o: qprocess_unix.cpp \
648 qprocess_unix.moc \
649 qprocess.h \
650 qcleanuphandler_p.h
651
652passwordbase_p.h: passwordbase_p.ui
653 $(UIC) passwordbase_p.ui -o $(INTERFACE_DECL_PATH)/passwordbase_p.h
654
655passwordbase_p.cpp: passwordbase_p.ui
656 $(UIC) passwordbase_p.ui -i passwordbase_p.h -o passwordbase_p.cpp
657
658proxiesbase_p.h: proxiesbase_p.ui
659 $(UIC) proxiesbase_p.ui -o $(INTERFACE_DECL_PATH)/proxiesbase_p.h
660
661proxiesbase_p.cpp: proxiesbase_p.ui
662 $(UIC) proxiesbase_p.ui -i proxiesbase_p.h -o proxiesbase_p.cpp
663
664categoryeditbase_p.h: categoryeditbase_p.ui
665 $(UIC) categoryeditbase_p.ui -o $(INTERFACE_DECL_PATH)/categoryeditbase_p.h
666
667categoryeditbase_p.cpp: categoryeditbase_p.ui
668 $(UIC) categoryeditbase_p.ui -i categoryeditbase_p.h -o categoryeditbase_p.cpp
669
670findwidgetbase_p.h: findwidgetbase_p.ui
671 $(UIC) findwidgetbase_p.ui -o $(INTERFACE_DECL_PATH)/findwidgetbase_p.h
672
673findwidgetbase_p.cpp: findwidgetbase_p.ui
674 $(UIC) findwidgetbase_p.ui -i findwidgetbase_p.h -o findwidgetbase_p.cpp
675
676lnkpropertiesbase_p.h: lnkpropertiesbase_p.ui
677 $(UIC) lnkpropertiesbase_p.ui -o $(INTERFACE_DECL_PATH)/lnkpropertiesbase_p.h
678
679lnkpropertiesbase_p.cpp: lnkpropertiesbase_p.ui
680 $(UIC) lnkpropertiesbase_p.ui -i lnkpropertiesbase_p.h -o lnkpropertiesbase_p.cpp
681
682passwordbase_p.o: passwordbase_p.cpp \
683 passwordbase_p.h
684
685proxiesbase_p.o: proxiesbase_p.cpp \
686 proxiesbase_p.h
687
688categoryeditbase_p.o: categoryeditbase_p.cpp \
689 categoryeditbase_p.h
690
691findwidgetbase_p.o: findwidgetbase_p.cpp \
692 findwidgetbase_p.h
693
694lnkpropertiesbase_p.o: lnkpropertiesbase_p.cpp \
695 lnkpropertiesbase_p.h
696
697moc_menubutton.o: moc_menubutton.cpp \
698 menubutton.h
699
700moc_proxies.o: moc_proxies.cpp \
701 proxies.h \
702 config.h
703
704moc_datebookmonth.o: moc_datebookmonth.cpp \
705 datebookmonth.h \
706 calendar.h \
707 timestring.h
708
709moc_fileselector.o: moc_fileselector.cpp \
710 fileselector.h \
711 filemanager.h \
712 applnk.h
713
714moc_imageedit.o: moc_imageedit.cpp \
715 imageedit.h
716
717moc_qpedecoration_qws.o: moc_qpedecoration_qws.cpp \
718 qpedecoration_qws.h
719
720moc_qpeapplication.o: moc_qpeapplication.cpp \
721 qpeapplication.h \
722 qpedecoration_qws.h \
723 timestring.h
724
725moc_qpedialog.o: moc_qpedialog.cpp \
726 qpedialog.h
727
728moc_tzselect.o: moc_tzselect.cpp \
729 tzselect.h
730
731moc_process.o: moc_process.cpp \
732 process.h
733
734moc_storage.o: moc_storage.cpp \
735 storage.h
736
737moc_qpemenubar.o: moc_qpemenubar.cpp \
738 qpemenubar.h
739
740moc_qpetoolbar.o: moc_qpetoolbar.cpp \
741 qpetoolbar.h
742
743backend/moc_categories.o: backend/moc_categories.cpp \
744 backend/categories.h \
745 backend/qpcglobal.h \
746 backend/palmtopuidgen.h
747
748moc_categorymenu.o: moc_categorymenu.cpp \
749 categorymenu.h
750
751moc_categoryedit_p.o: moc_categoryedit_p.cpp \
752 categoryedit_p.h \
753 categoryeditbase_p.h
754
755moc_categoryselect.o: moc_categoryselect.cpp \
756 categoryselect.h
757
758moc_ir.o: moc_ir.cpp \
759 ir.h
760
761moc_findwidget_p.o: moc_findwidget_p.cpp \
762 findwidget_p.h \
763 findwidgetbase_p.h
764
765moc_finddialog.o: moc_finddialog.cpp \
766 finddialog.h
767
768moc_lnkproperties.o: moc_lnkproperties.cpp \
769 lnkproperties.h
770
771moc_qlibrary_p.o: moc_qlibrary_p.cpp \
772 qlibrary_p.h \
773 qlibrary.h
774
775moc_qprocess.o: moc_qprocess.cpp \
776 qprocess.h
777
778moc_passwordbase_p.o: global.moc \
779 global.cpp
780
781moc_proxiesbase_p.o: network.moc \
782 network.cpp
783
784moc_categoryeditbase_p.o: password.moc \
785 password.cpp \
786 password.h \
787 config.h \
788 global.h \
789 backend/contact.h \
790 passwordbase_p.h
791
792moc_findwidgetbase_p.o: process_unix.moc \
793 process_unix.cpp \
794 process.h
795
796moc_lnkpropertiesbase_p.o: timestring.moc \
797 timestring.cpp \
798 timestring.h \
799 qpeapplication.h \
800 qpedecoration_qws.h \
801 config.h
802
803moc_menubutton.cpp: menubutton.h
804 $(MOC) menubutton.h -o moc_menubutton.cpp
805
806moc_proxies.cpp: proxies.h
807 $(MOC) proxies.h -o moc_proxies.cpp
808
809moc_datebookmonth.cpp: datebookmonth.h
810 $(MOC) datebookmonth.h -o moc_datebookmonth.cpp
811
812moc_fileselector.cpp: fileselector.h
813 $(MOC) fileselector.h -o moc_fileselector.cpp
814
815moc_imageedit.cpp: imageedit.h
816 $(MOC) imageedit.h -o moc_imageedit.cpp
817
818moc_qpedecoration_qws.cpp: qpedecoration_qws.h
819 $(MOC) qpedecoration_qws.h -o moc_qpedecoration_qws.cpp
820
821moc_qpeapplication.cpp: qpeapplication.h
822 $(MOC) qpeapplication.h -o moc_qpeapplication.cpp
823
824moc_qpedialog.cpp: qpedialog.h
825 $(MOC) qpedialog.h -o moc_qpedialog.cpp
826
827moc_tzselect.cpp: tzselect.h
828 $(MOC) tzselect.h -o moc_tzselect.cpp
829
830moc_process.cpp: process.h
831 $(MOC) process.h -o moc_process.cpp
832
833moc_storage.cpp: storage.h
834 $(MOC) storage.h -o moc_storage.cpp
835
836moc_qpemenubar.cpp: qpemenubar.h
837 $(MOC) qpemenubar.h -o moc_qpemenubar.cpp
838
839moc_qpetoolbar.cpp: qpetoolbar.h
840 $(MOC) qpetoolbar.h -o moc_qpetoolbar.cpp
841
842backend/moc_categories.cpp: backend/categories.h
843 $(MOC) backend/categories.h -o backend/moc_categories.cpp
844
845moc_categorymenu.cpp: categorymenu.h
846 $(MOC) categorymenu.h -o moc_categorymenu.cpp
847
848moc_categoryedit_p.cpp: categoryedit_p.h
849 $(MOC) categoryedit_p.h -o moc_categoryedit_p.cpp
850
851moc_categoryselect.cpp: categoryselect.h
852 $(MOC) categoryselect.h -o moc_categoryselect.cpp
853
854moc_ir.cpp: ir.h
855 $(MOC) ir.h -o moc_ir.cpp
856
857moc_findwidget_p.cpp: findwidget_p.h
858 $(MOC) findwidget_p.h -o moc_findwidget_p.cpp
859
860moc_finddialog.cpp: finddialog.h
861 $(MOC) finddialog.h -o moc_finddialog.cpp
862
863moc_lnkproperties.cpp: lnkproperties.h
864 $(MOC) lnkproperties.h -o moc_lnkproperties.cpp
865
866moc_qlibrary_p.cpp: qlibrary_p.h
867 $(MOC) qlibrary_p.h -o moc_qlibrary_p.cpp
868
869moc_qprocess.cpp: qprocess.h
870 $(MOC) qprocess.h -o moc_qprocess.cpp
871
872global.moc: global.cpp
873 $(MOC) global.cpp -o global.moc
874
875network.moc: network.cpp
876 $(MOC) network.cpp -o network.moc
877
878password.moc: password.cpp
879 $(MOC) password.cpp -o password.moc
880
881process_unix.moc: process_unix.cpp
882 $(MOC) process_unix.cpp -o process_unix.moc
883
884timestring.moc: timestring.cpp
885 $(MOC) timestring.cpp -o timestring.moc
886
887qprocess_unix.moc: qprocess_unix.cpp
888 $(MOC) qprocess_unix.cpp -o qprocess_unix.moc
889
890moc_passwordbase_p.cpp: passwordbase_p.h
891 $(MOC) passwordbase_p.h -o moc_passwordbase_p.cpp
892
893moc_proxiesbase_p.cpp: proxiesbase_p.h
894 $(MOC) proxiesbase_p.h -o moc_proxiesbase_p.cpp
895
896moc_categoryeditbase_p.cpp: categoryeditbase_p.h
897 $(MOC) categoryeditbase_p.h -o moc_categoryeditbase_p.cpp
898
899moc_findwidgetbase_p.cpp: findwidgetbase_p.h
900 $(MOC) findwidgetbase_p.h -o moc_findwidgetbase_p.cpp
901
902moc_lnkpropertiesbase_p.cpp: lnkpropertiesbase_p.h
903 $(MOC) lnkpropertiesbase_p.h -o moc_lnkpropertiesbase_p.cpp
904
905
diff --git a/library/alarmserver.cpp b/library/alarmserver.cpp
new file mode 100644
index 0000000..a1a7142
--- a/dev/null
+++ b/library/alarmserver.cpp
@@ -0,0 +1,376 @@
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 <qdir.h>
22#include <qfile.h>
23#include <qmessagebox.h>
24#include <qtextstream.h>
25
26
27#include "qpeapplication.h"
28#include "global.h"
29#include "resource.h"
30
31#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
32#include "qcopenvelope_qws.h"
33#endif
34#include "alarmserver.h"
35#include <qpe/timeconversion.h>
36
37#include <sys/types.h>
38#include <sys/stat.h>
39
40#include <stdlib.h>
41#include <unistd.h>
42
43struct timerEventItem {
44 time_t UTCtime;
45 QCString channel, message;
46 int data;
47 bool operator==( const timerEventItem &right ) const
48 {
49 return ( UTCtime == right.UTCtime
50 && channel == right.channel
51 && message == right.message
52 && data == right.data );
53 }
54};
55
56class TimerReceiverObject : public QObject
57{
58public:
59 TimerReceiverObject() { }
60 ~TimerReceiverObject() { }
61 void resetTimer();
62 void setTimerEventItem();
63 void deleteTimer();
64protected:
65 void timerEvent( QTimerEvent *te );
66private:
67 QString atfilename;
68};
69
70TimerReceiverObject *timerEventReceiver = NULL;
71QList<timerEventItem> timerEventList;
72timerEventItem *nearestTimerEvent = NULL;
73
74
75// set the timer to go off on the next event in the list
76void setNearestTimerEvent()
77{
78 nearestTimerEvent = NULL;
79 QListIterator<timerEventItem> it( timerEventList );
80 if ( *it )
81 nearestTimerEvent = *it;
82 for ( ; *it; ++it )
83 if ( (*it)->UTCtime < nearestTimerEvent->UTCtime )
84 nearestTimerEvent = *it;
85 if (nearestTimerEvent)
86 timerEventReceiver->resetTimer();
87 else
88 timerEventReceiver->deleteTimer();
89}
90
91
92//store current state to file
93//Simple implementation. Should run on a timer.
94
95static void saveState()
96{
97 QString savefilename = Global::applicationFileName( "AlarmServer", "saveFile" );
98 if ( timerEventList.isEmpty() ) {
99 unlink( savefilename );
100 return;
101 }
102
103 QFile savefile(savefilename+".new");
104 if ( savefile.open(IO_WriteOnly) ) {
105 QDataStream ds( &savefile );
106
107 //save
108
109 QListIterator<timerEventItem> it( timerEventList );
110 for ( ; *it; ++it ) {
111 ds << it.current()->UTCtime;
112 ds << it.current()->channel;
113 ds << it.current()->message;
114 ds << it.current()->data;
115 }
116
117
118 savefile.close();
119 unlink( savefilename );
120 QDir d; d.rename(savefilename+".new",savefilename);
121
122 }
123}
124
125/*!
126 Sets up the alarm server. Restoring to previous state (session management).
127 */
128void AlarmServer::initialize()
129{
130 //read autosave file and put events in timerEventList
131
132 QString savefilename = Global::applicationFileName( "AlarmServer", "saveFile" );
133
134 QFile savefile(savefilename);
135 if ( savefile.open(IO_ReadOnly) ) {
136 QDataStream ds( &savefile );
137 while ( !ds.atEnd() ) {
138 timerEventItem *newTimerEventItem = new timerEventItem;
139 ds >> newTimerEventItem->UTCtime;
140 ds >> newTimerEventItem->channel;
141 ds >> newTimerEventItem->message;
142 ds >> newTimerEventItem->data;
143 timerEventList.append( newTimerEventItem );
144 }
145 savefile.close();
146 if (!timerEventReceiver)
147 timerEventReceiver = new TimerReceiverObject;
148 setNearestTimerEvent();
149 }
150}
151
152
153
154
155static const char* atdir = "/var/spool/at/";
156
157static bool triggerAtd( bool writeHWClock = FALSE )
158{
159 QFile trigger(QString(atdir) + "trigger");
160 if ( trigger.open(IO_WriteOnly|IO_Raw) ) {
161
162 const char* data =
163#ifdef QT_QWS_CUSTOM
164 //custom atd only writes HW Clock if we write a 'W'
165 ( writeHWClock ) ? "W\n" :
166#endif
167 data = "\n";
168 int len = strlen(data);
169 int total_written = trigger.writeBlock(data,len);
170 if ( total_written != len ) {
171 QMessageBox::critical( 0, QObject::tr( "Out of Space" ),
172 QObject::tr( "Unable to schedule alarm.\nFree some memory and try again." ) );
173 trigger.close();
174 QFile::remove( trigger.name() );
175 return FALSE;
176 }
177 return TRUE;
178 }
179 return FALSE;
180}
181
182void TimerReceiverObject::deleteTimer()
183{
184 if ( !atfilename.isEmpty() ) {
185 unlink( atfilename );
186 atfilename = QString::null;
187 triggerAtd( FALSE );
188 }
189}
190
191void TimerReceiverObject::resetTimer()
192{
193 const int maxsecs = 2147000;
194 int total_written;
195 QDateTime nearest = TimeConversion::fromUTC(nearestTimerEvent->UTCtime);
196 QDateTime now = QDateTime::currentDateTime();
197 int secs = TimeConversion::secsTo( now, nearest );
198 if ( secs > maxsecs ) {
199 // too far for millisecond timing
200 secs = maxsecs;
201 }
202
203 // System timer (needed so that we wake from deep sleep),
204 // from the Epoch in seconds.
205 //
206 int at_secs = TimeConversion::toUTC(nearest);
207 // qDebug("reset timer to %d seconds from Epoch",at_secs);
208 QString fn = atdir + QString::number(at_secs) + "."
209 + QString::number(getpid());
210 if ( fn != atfilename ) {
211 QFile atfile(fn+".new");
212 if ( atfile.open(IO_WriteOnly|IO_Raw) ) {
213 // just wake up and delete the at file
214 QString cmd = "#!/bin/sh\nrm " + fn;
215 total_written = atfile.writeBlock(cmd.latin1(),cmd.length());
216 if ( total_written != int(cmd.length()) ) {
217 QMessageBox::critical( 0, tr("Out of Space"),
218 tr("Unable to schedule alarm.\n"
219 "Please free up space and try again") );
220 atfile.close();
221 QFile::remove( atfile.name() );
222 return;
223 }
224 atfile.close();
225 unlink( atfilename );
226 QDir d; d.rename(fn+".new",fn);
227 chmod(fn.latin1(),0755);
228 atfilename = fn;
229 triggerAtd( FALSE );
230 } else {
231 qWarning("Cannot open atd file %s",fn.latin1());
232 }
233 }
234 // Qt timers (does the actual alarm)
235 // from now in milliseconds
236 //
237 qDebug("AlarmServer waiting %d seconds",secs);
238 startTimer( 1000 * secs + 500 );
239}
240
241void TimerReceiverObject::timerEvent( QTimerEvent * )
242{
243 bool needSave = FALSE;
244 killTimers();
245 if (nearestTimerEvent) {
246 if ( nearestTimerEvent->UTCtime
247 <= TimeConversion::toUTC(QDateTime::currentDateTime()) ) {
248 QCopEnvelope e( nearestTimerEvent->channel,
249 nearestTimerEvent->message );
250 e << TimeConversion::fromUTC( nearestTimerEvent->UTCtime )
251 << nearestTimerEvent->data;
252 timerEventList.remove( nearestTimerEvent );
253 needSave = TRUE;
254 }
255 setNearestTimerEvent();
256 } else {
257 resetTimer();
258 }
259 if ( needSave )
260 saveState();
261}
262
263/*!
264 \class AlarmServer alarmserver.h
265 \brief The AlarmServer class provides alarms to be scheduled.
266
267 Applications which wish to be informed when a certain time instant
268 passes use the functions of AlarmServer to request so.
269*/
270
271/*!
272 Schedules an alarm for \a when. Soon after this time,
273 \a message will be sent to \a channel, with \a data as
274 a parameter. \a message must be of the form "someMessage(int)".
275
276 \sa deleteAlarm()
277*/
278void AlarmServer::addAlarm ( QDateTime when, const QCString& channel,
279 const QCString& message, int data)
280{
281 if ( qApp->type() == QApplication::GuiServer ) {
282 bool needSave = FALSE;
283 // Here we are the server so either it has been directly called from
284 // within the server or it has been sent to us from a client via QCop
285 if (!timerEventReceiver)
286 timerEventReceiver = new TimerReceiverObject;
287
288 timerEventItem *newTimerEventItem = new timerEventItem;
289 newTimerEventItem->UTCtime = TimeConversion::toUTC( when );
290 newTimerEventItem->channel = channel;
291 newTimerEventItem->message = message;
292 newTimerEventItem->data = data;
293 // explore the case of already having the event in here...
294 QListIterator<timerEventItem> it( timerEventList );
295 for ( ; *it; ++it )
296 if ( *(*it) == *newTimerEventItem )
297 return;
298 // if we made it here, it is okay to add the item...
299 timerEventList.append( newTimerEventItem );
300 needSave = TRUE;
301 // quicker than using setNearestTimerEvent()
302 if ( nearestTimerEvent ) {
303 if (newTimerEventItem->UTCtime < nearestTimerEvent->UTCtime) {
304 nearestTimerEvent = newTimerEventItem;
305 timerEventReceiver->killTimers();
306 timerEventReceiver->resetTimer();
307 }
308 } else {
309 nearestTimerEvent = newTimerEventItem;
310 timerEventReceiver->resetTimer();
311 }
312 if ( needSave )
313 saveState();
314 } else {
315 QCopEnvelope e( "QPE/System", "addAlarm(QDateTime,QCString,QCString,int)" );
316 e << when << channel << message << data;
317 }
318}
319
320/*!
321 Deletes previously scheduled alarms which match \a when, \a channel, \a message,
322 and \a data.
323
324 Passing null values for \a when, \a channel, or \a message indicates "any".
325 Passing -1 for \a data indicates "any".
326
327 \sa deleteAlarm()
328*/
329void AlarmServer::deleteAlarm (QDateTime when, const QCString& channel, const QCString& message, int data)
330{
331 if ( qApp->type() == QApplication::GuiServer) {
332 bool needSave = FALSE;
333 if ( timerEventReceiver != NULL ) {
334 timerEventReceiver->killTimers();
335
336 // iterate over the list of events
337 QListIterator<timerEventItem> it( timerEventList );
338 time_t deleteTime = TimeConversion::toUTC( when );
339 for ( ; *it; ++it ) {
340 // if its a match, delete it
341 if ( ( (*it)->UTCtime == deleteTime || when.isNull() )
342 && ( channel.isNull() || (*it)->channel == channel )
343 && ( message.isNull() || (*it)->message == message )
344 && ( data==-1 || (*it)->data == data ) )
345 {
346 // if it's first, then we need to update the timer
347 if ( (*it) == nearestTimerEvent ) {
348 timerEventList.remove(*it);
349 setNearestTimerEvent();
350 } else {
351 timerEventList.remove(*it);
352 }
353 needSave = TRUE;
354 }
355 }
356 if ( nearestTimerEvent )
357 timerEventReceiver->resetTimer();
358 }
359 if ( needSave )
360 saveState();
361 } else {
362 QCopEnvelope e( "QPE/System", "deleteAlarm(QDateTime,QCString,QCString,int)" );
363 e << when << channel << message << data;
364 }
365}
366
367/*!
368 Writes the system clock to the hardware clock.
369*/
370void Global::writeHWClock()
371{
372 if ( !triggerAtd( TRUE ) ) {
373 // atd not running? set it ourselves
374 system("/sbin/hwclock --systohc"); // ##### UTC?
375 }
376}
diff --git a/library/alarmserver.h b/library/alarmserver.h
new file mode 100644
index 0000000..665c3ae
--- a/dev/null
+++ b/library/alarmserver.h
@@ -0,0 +1,35 @@
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#ifndef ALARM_SERVER_H
21#define ALARM_SERVER_H
22
23#include <qstring.h>
24#include <qdatetime.h>
25
26class AlarmServer
27{
28public:
29 static void addAlarm ( QDateTime when, const QCString& channel, const QCString& msg, int data=0);
30 static void deleteAlarm (QDateTime when, const QCString& channel, const QCString& msg, int data=0);
31 static void initialize();
32};
33
34#endif
35
diff --git a/library/applnk.cpp b/library/applnk.cpp
new file mode 100644
index 0000000..2af6cf4
--- a/dev/null
+++ b/library/applnk.cpp
@@ -0,0 +1,1093 @@
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 "applnk.h"
22
23#include <qpe/qpeapplication.h>
24#include <qpe/categories.h>
25#include <qpe/categoryselect.h>
26#include <qpe/qcopenvelope_qws.h>
27#include <qpe/global.h>
28#include <qpe/mimetype.h>
29#include <qpe/config.h>
30#include <qpe/storage.h>
31#include <qpe/resource.h>
32
33#include <qdict.h>
34#include <qdir.h>
35#include <qregexp.h>
36
37#ifdef Q_WS_QWS
38#include <qgfx_qws.h>
39#endif
40
41#include <stdlib.h>
42
43int AppLnk::lastId = 5000;
44
45static int smallSize = 14;
46static int bigSize = 32;
47
48static QString safeFileName(const QString& n)
49{
50 QString safename=n;
51 safename.replace(QRegExp("[^0-9A-Za-z.]"),"_");
52 safename.replace(QRegExp("^[^A-Za-z]*"),"");
53 if ( safename.isEmpty() )
54 safename = "_";
55 return safename;
56}
57
58
59class AppLnkPrivate
60{
61public:
62 QArray<int> mCat;
63};
64
65/*!
66 \class AppLnk applnk.h
67 \brief The AppLnk class represents an application available on the system.
68
69 Information about applications are stored in Qtopia as ".desktop" files.
70 When read, these files are stored as AppLnk objects.
71*/
72
73/*!
74 Sets the size used for small icons to \a small pixels.
75 Only affects AppLnk objects created after the call.
76*/
77void AppLnk::setSmallIconSize(int small)
78{
79 smallSize = small;
80}
81
82/*!
83 Returns the size used for small icons.
84*/
85int AppLnk::smallIconSize()
86{
87 return smallSize;
88}
89
90
91/*!
92 Sets the size used for large icons to \a big pixels.
93 Only affects AppLnk objects created after the call.
94*/
95void AppLnk::setBigIconSize(int big)
96{
97 bigSize = big;
98}
99
100/*!
101 Returns the size used for large icons.
102*/
103int AppLnk::bigIconSize()
104{
105 return bigSize;
106}
107
108
109/*!
110 \fn QString AppLnk::name() const
111
112 Returns the Name property.
113*/
114/*!
115 \fn QString AppLnk::exec() const
116
117 Returns the Exec property. This is the executable program associated
118 with the AppLnk.
119*/
120/*!
121 \fn QString AppLnk::rotation() const
122
123 Returns the Rotation property.
124*/
125/*!
126 \fn QString AppLnk::comment() const
127
128 Returns the Comment property.
129*/
130/*!
131 \fn QStringList AppLnk::mimeTypes() const
132
133 Returns the MimeTypes property. This is the list of MIME types
134 that the application can view or edit.
135*/
136/*!
137 \fn const QArray<int>& AppLnk::categories() const
138
139 Returns the Categories property.
140*/
141
142const QArray<int>& AppLnk::categories() const
143{
144 return d->mCat;
145}
146
147/*!
148 \fn int AppLnk::id() const
149
150 Returns the id of the AppLnk. If the AppLnk is not in an AppLnkSet,
151 this value is 0, otherwise it is a value that is unique for the
152 duration of the current process.
153*/
154
155/*!
156 \fn bool AppLnk::isValid() const
157
158 Returns whether this AppLnk is valid.
159*/
160
161/*!
162 Creates an invalid AppLnk.
163
164 \sa isValid()
165*/
166AppLnk::AppLnk()
167{
168 mId = 0;
169 d = new AppLnkPrivate();
170}
171
172/*!
173 Loads \a file as an AppLnk.
174*/
175AppLnk::AppLnk( const QString &file )
176{
177 QStringList sl;
178 d = new AppLnkPrivate();
179 if ( !file.isNull() ) {
180 Config config( file, Config::File );
181
182 if ( config.isValid() ) {
183 config.setGroup( "Desktop Entry" );
184
185 mName = config.readEntry( "Name", file );
186 mExec = config.readEntry( "Exec" );
187 mType = config.readEntry( "Type", QString::null );
188 mIconFile = config.readEntry( "Icon", QString::null );
189 mRotation = config.readEntry( "Rotation", "" );
190 mComment = config.readEntry( "Comment", QString::null );
191 mMimeTypes = config.readListEntry( "MimeType", ';' );
192 mMimeTypeIcons = config.readListEntry( "MimeTypeIcons", ';' );
193 mLinkFile = file;
194 mFile = config.readEntry("File", QString::null);
195 sl = config.readListEntry("Categories", ';');
196 }
197 }
198 // let's try our darndest to create categories...
199 Categories cat( 0 );
200 cat.load( categoryFileName() );
201 d->mCat.resize( sl.count() );
202 int i;
203 QStringList::Iterator it;
204 for ( i = 0, it = sl.begin(); it != sl.end();
205 ++it, i++ ) {
206
207 bool number;
208 int id = (*it).toInt( &number );
209 if ( !number ) {
210 // convert from old school...
211 id = cat.id( "Document Viewer", *it );
212 if ( id == 0 )
213 id = cat.addCategory( "Document Viewer", *it );
214 }
215 d->mCat[i] = id;
216 }
217 mId = 0;
218}
219
220/*!
221 Returns a small pixmap associated with the application.
222*/
223const QPixmap& AppLnk::pixmap() const
224{
225 if ( mPixmap.isNull() ) {
226 AppLnk* that = (AppLnk*)this;
227 if ( mIconFile.isEmpty() ) {
228 MimeType mt(type());
229 that->mPixmap = mt.pixmap();
230 if ( that->mPixmap.isNull() )
231 that->mPixmap = Resource::loadPixmap("UnknownDocument-14");
232 return that->mPixmap;
233 }
234 QImage unscaledIcon = Resource::loadImage( that->mIconFile );
235 that->mPixmap.convertFromImage( unscaledIcon.smoothScale( smallSize, smallSize ) );
236 that->mBigPixmap.convertFromImage( unscaledIcon.smoothScale( bigSize, bigSize ) );
237 return that->mPixmap;
238 }
239 return mPixmap;
240}
241
242/*!
243 Returns a large pixmap associated with the application.
244*/
245const QPixmap& AppLnk::bigPixmap() const
246{
247 if ( mBigPixmap.isNull() ) {
248 AppLnk* that = (AppLnk*)this;
249 if ( mIconFile.isEmpty() ) {
250 MimeType mt(type());
251 that->mBigPixmap = mt.bigPixmap();
252 if ( that->mBigPixmap.isNull() )
253 that->mBigPixmap = Resource::loadPixmap("UnknownDocument");
254 return that->mBigPixmap;
255 }
256 QImage unscaledIcon = Resource::loadImage( that->mIconFile );
257 that->mPixmap.convertFromImage( unscaledIcon.smoothScale( smallSize, smallSize ) );
258 that->mBigPixmap.convertFromImage( unscaledIcon.smoothScale( bigSize, bigSize ) );
259 return that->mBigPixmap;
260 }
261 return mBigPixmap;
262}
263
264/*!
265 Returns the type of the application.
266*/
267QString AppLnk::type() const
268{
269 if ( mType.isNull() ) {
270 AppLnk* that = (AppLnk*)this;
271 MimeType mt(file());
272 that->mType = mt.id();
273 return that->mType;
274 }
275 return mType;
276}
277
278/*!
279 Returns the file associated with the AppLnk.
280
281 \sa exec()
282*/
283QString AppLnk::file() const
284{
285 if ( mFile.isNull() ) {
286 AppLnk* that = (AppLnk*)this;
287 if ( !mLinkFile.isEmpty() ) {
288 that->mFile =
289 mLinkFile.right(8)==".desktop" // 8 = strlen(".desktop")
290 ? mLinkFile.left(mLinkFile.length()-8) : mLinkFile;
291 } else if ( mType.contains('/') ) {
292 that->mFile =
293 QString(getenv("HOME"))+"/Documents/"+mType+"/"+safeFileName(that->mName);
294 if ( QFile::exists(that->mFile) || QFile::exists(that->mFile+".desktop") ) {
295 int n=1;
296 QString nn;
297 while (QFile::exists((nn=(that->mFile+"_"+QString::number(n))))
298 || QFile::exists(nn+".desktop"))
299 n++;
300 that->mFile = nn;
301 }
302 that->mLinkFile = that->mFile+".desktop";
303 }
304 return that->mFile;
305 }
306 return mFile;
307}
308
309/*!
310 Returns the desktop file coresponding to this AppLnk.
311
312 \sa file(), exec()
313*/
314QString AppLnk::linkFile() const
315{
316 if ( mLinkFile.isNull() ) {
317 AppLnk* that = (AppLnk*)this;
318 if ( type().contains('/') ) {
319 StorageInfo storage;
320 const FileSystem *fs = storage.fileSystemOf( that->mFile );
321 // qDebug("creating lnkFile for %s", mFile.latin1() );
322 // if ( fs )
323 // qDebug("fs is %s", fs->path().latin1() );
324 if ( fs && fs->isRemovable() ) {
325 // qDebug("isRemovable");
326 that->mLinkFile = fs->path();
327 } else
328 that->mLinkFile = getenv( "HOME" );
329 that->mLinkFile += "/Documents/"+type()+"/"+safeFileName(that->mName);
330 if ( QFile::exists(that->mLinkFile+".desktop") ) {
331 int n=1;
332 QString nn;
333 while (QFile::exists((nn=that->mLinkFile+"_"+QString::number(n))+".desktop"))
334 n++;
335 that->mLinkFile = nn;
336 }
337 that->mLinkFile += ".desktop";
338 // qDebug("file is %s", mLinkFile.latin1() );
339 }
340 return that->mLinkFile;
341 }
342 return mLinkFile;
343}
344
345/*!
346 Copies \a copy.
347*/
348AppLnk::AppLnk( const AppLnk &copy )
349{
350 mName = copy.mName;
351 mPixmap = copy.mPixmap;
352 mBigPixmap = copy.mBigPixmap;
353 mExec = copy.mExec;
354 mType = copy.mType;
355 mRotation = copy.mRotation;
356 mComment = copy.mComment;
357 mFile = copy.mFile;
358 mLinkFile = copy.mLinkFile;
359 mIconFile = copy.mIconFile;
360 mMimeTypes = copy.mMimeTypes;
361 mMimeTypeIcons = copy.mMimeTypeIcons;
362 mId = 0;
363 d = new AppLnkPrivate();
364 d->mCat = copy.d->mCat;
365}
366
367/*!
368 Destroys the AppLnk. Note that if the AppLnk is current a member of
369 an AppLnkSet, this will produce a run-time warning.
370
371 \sa AppLnkSet::add(), AppLnkSet::remove()
372*/
373AppLnk::~AppLnk()
374{
375 if ( mId )
376 qWarning("Deleting AppLnk that is in an AppLnkSet");
377 if ( d )
378 delete d;
379}
380
381/*!
382 Executes the application associated with this AppLnk.
383*/
384void AppLnk::execute() const
385{
386 execute(QStringList());
387}
388
389/*!
390 Executes the application associated with this AppLnk, with
391 \a args as arguments.
392*/
393void AppLnk::execute(const QStringList& args) const
394{
395#ifdef Q_WS_QWS
396 if ( !mRotation.isEmpty() ) {
397 // ######## this will only work in the server
398 int rot = QPEApplication::defaultRotation();
399 rot = (rot+mRotation.toInt())%360;
400 QCString old = getenv("QWS_DISPLAY");
401 setenv("QWS_DISPLAY", QString("Transformed:Rot%1:0").arg(rot), 1);
402 invoke(args);
403 setenv("QWS_DISPLAY", old.data(), 1);
404 } else
405#endif
406 invoke(args);
407}
408
409/*!
410 Invokes the application associated with this AppLnk, with
411 \a args as arguments. Rotation is not taken into account by
412 this function, you should not call it directly.
413
414 \sa execute()
415*/
416void AppLnk::invoke(const QStringList& args) const
417{
418 Global::execute( exec(), args[0] );
419}
420
421/*!
422 Sets the Exec property to \a exec.
423
424 \sa exec()
425*/
426void AppLnk::setExec( const QString& exec )
427{
428 mExec = exec;
429}
430
431/*!
432 Sets the Name property to \a docname.
433
434 \sa name()
435*/
436void AppLnk::setName( const QString& docname )
437{
438 mName = docname;
439}
440
441/*!
442 Sets the File property to \a filename.
443
444 \sa file()
445*/
446void AppLnk::setFile( const QString& filename )
447{
448 mFile = filename;
449}
450
451/*!
452 Sets the LinkFile property to \a filename.
453
454 \sa linkFile()
455*/
456void AppLnk::setLinkFile( const QString& filename )
457{
458 mLinkFile = filename;
459}
460
461/*!
462 Sets the Comment property to \a comment.
463
464 \sa comment()
465*/
466void AppLnk::setComment( const QString& comment )
467{
468 mComment = comment;
469}
470
471/*!
472 Sets the Type property to \a type.
473
474 \sa type()
475*/
476void AppLnk::setType( const QString& type )
477{
478 mType = type;
479}
480
481/*!
482 Sets the Icon property to \a iconname.
483
484 \sa pixmap(), bigPixmap()
485*/
486void AppLnk::setIcon( const QString& iconname )
487{
488 mIconFile = iconname;
489 QImage unscaledIcon = Resource::loadImage( mIconFile );
490 mPixmap.convertFromImage( unscaledIcon.smoothScale( smallSize, smallSize ) );
491 mBigPixmap.convertFromImage( unscaledIcon.smoothScale( bigSize, bigSize ) );
492}
493
494/*!
495 Sets the Categories property to \a c.
496
497 \sa categories()
498*/
499void AppLnk::setCategories( const QArray<int>& c )
500{
501 d->mCat = c;
502}
503
504/*!
505 \fn QStringList AppLnk::mimeTypeIcons() const
506
507 Returns the MimeTypeIcons property of the AppLnk.
508*/
509
510/*!
511 Attempts to ensure that the link file for this AppLnk exists, including
512 creating any required directories. Returns TRUE if successful.
513*/
514bool AppLnk::ensureLinkExists() const
515{
516 QString lf = linkFile();
517 if ( !QFile::exists(lf) ) {
518 // May need to create directories
519 QFileInfo fi(lf);
520 if ( system(("mkdir -p "+fi.dirPath(TRUE))) )
521 return FALSE;
522 }
523 return TRUE;
524}
525
526/*!
527 Commits the AppLnk to disk. Returns whether the operation succeeded.
528
529 The "linkChanged(QString)" message is sent to the
530 "QPE/System" QCop channel as a result.
531*/
532bool AppLnk::writeLink() const
533{
534 // Only re-writes settable parts
535 QString lf = linkFile();
536 if ( !ensureLinkExists() )
537 return FALSE;
538 Config config( lf, Config::File );
539 config.setGroup("Desktop Entry");
540 config.writeEntry("Name",mName);
541 if ( !mIconFile.isNull() ) config.writeEntry("Icon",mIconFile);
542 config.writeEntry("Type",type());
543 if ( !mComment.isNull() ) config.writeEntry("Comment",mComment);
544 config.writeEntry("File",file());
545 // write out the id...
546 int i;
547 QStringList sl;
548 for ( i = 0; i < int(d->mCat.count()); i++ ) {
549 sl.append( QString::number( d->mCat[i] ) );
550 }
551 config.writeEntry( "Categories", sl, ';' );
552
553 QCopEnvelope e("QPE/System", "linkChanged(QString)");
554 e << lf;
555
556 return TRUE;
557}
558
559/*!
560 Sets the property named \a key to \a value.
561*/
562void AppLnk::setProperty(const QString& key, const QString& value)
563{
564 if ( ensureLinkExists() ) {
565 Config cfg(linkFile(), Config::File);
566 cfg.writeEntry(key,value);
567 }
568}
569
570/*!
571 Returns the property named \a key.
572*/
573QString AppLnk::property(const QString& key) const
574{
575 QString lf = linkFile();
576 if ( !QFile::exists(lf) )
577 return QString::null;
578 Config cfg(lf, Config::File);
579 return cfg.readEntry(key);
580}
581
582
583/*!
584 Deletes both the linkFile() and file() associated with this AppLnk.
585*/
586void AppLnk::removeFiles()
587{
588 bool valid = isValid();
589 if ( !valid || QFile::remove(linkFile()) ) {
590 if ( QFile::remove(file()) ) {
591 QCopEnvelope e("QPE/System", "linkChanged(QString)");
592 e << linkFile();
593 } else if ( valid ) {
594 // restore link
595 writeLink();
596 }
597 }
598}
599
600/*!
601 Delete the linkFile(), leaving any file() untouched.
602*/
603void AppLnk::removeLinkFile()
604{
605 if ( isValid() && QFile::remove(linkFile()) ) {
606 QCopEnvelope e("QPE/System", "linkChanged(QString)");
607 e << linkFile();
608 }
609}
610
611class AppLnkSetPrivate {
612public:
613 AppLnkSetPrivate()
614 {
615 typPix.setAutoDelete(TRUE);
616 typPixBig.setAutoDelete(TRUE);
617 typName.setAutoDelete(TRUE);
618 }
619
620 QDict<QPixmap> typPix;
621 QDict<QPixmap> typPixBig;
622 QDict<QString> typName;
623};
624
625/*!
626 \class AppLnkSet applnk.h
627 \brief The AppLnkSet class is a set of AppLnk objects.
628*/
629
630/*!
631 \fn QStringList AppLnkSet::types() const
632
633 Returns the list of types in the set.
634
635 \sa AppLnk::type(), typeName(), typePixmap(), typeBigPixmap()
636*/
637
638/*!
639 \fn const QList<AppLnk>& AppLnkSet::children() const
640
641 Returns the members of the set.
642*/
643
644/*!
645 Constructs an empty AppLnkSet.
646*/
647AppLnkSet::AppLnkSet() :
648 d(new AppLnkSetPrivate)
649{
650}
651
652/*!
653 Constructs an AppLnkSet that contains AppLnk objects representing
654 all the files in a \a directory (recursively).
655
656 The directories may contain ".directory" files which overrides
657 any AppLnk::type() value of AppLnk objects found in the directory.
658 This allows simple localization of application types.
659*/
660AppLnkSet::AppLnkSet( const QString &directory ) :
661 d(new AppLnkSetPrivate)
662{
663 QDir dir( directory );
664 mFile = directory;
665 findChildren(directory,QString::null,QString::null);
666}
667
668/*!
669 Detaches all AppLnk objects from the set. The set become empty
670 and the call becomes responsible for deleting the AppLnk objects.
671*/
672void AppLnkSet::detachChildren()
673{
674 QListIterator<AppLnk> it( mApps );
675 for ( ; it.current(); ) {
676 AppLnk* a = *it;
677 ++it;
678 a->mId = 0;
679 }
680 mApps.clear();
681}
682
683/*!
684 Destroys the set, deleting all AppLnk objects it contains.
685
686 \sa detachChildren()
687*/
688AppLnkSet::~AppLnkSet()
689{
690 QListIterator<AppLnk> it( mApps );
691 for ( ; it.current(); ) {
692 AppLnk* a = *it;
693 ++it;
694 a->mId = 0;
695 delete a;
696 }
697 delete d;
698}
699
700void AppLnkSet::findChildren(const QString &dr, const QString& typ, const QString& typName, int depth)
701{
702 depth++;
703 if ( depth > 10 )
704 return;
705
706 QDir dir( dr );
707 QString typNameLocal = typName;
708
709 if ( dir.exists( ".directory" ) ) {
710 Config config( dr + "/.directory", Config::File );
711 config.setGroup( "Desktop Entry" );
712 typNameLocal = config.readEntry( "Name", typNameLocal );
713 if ( !typ.isEmpty() ) {
714 QString iconFile = config.readEntry( "Icon", "AppsIcon" );
715 QImage unscaledIcon = Resource::loadImage( iconFile );
716 QPixmap pm, bpm;
717 pm.convertFromImage( unscaledIcon.smoothScale( smallSize, smallSize ) );
718 bpm.convertFromImage( unscaledIcon.smoothScale( bigSize, bigSize ) );
719 d->typPix.insert(typ, new QPixmap(pm));
720 d->typPixBig.insert(typ, new QPixmap(bpm));
721 d->typName.insert(typ, new QString(typNameLocal));
722 }
723 }
724
725 const QFileInfoList *list = dir.entryInfoList();
726 if ( list ) {
727 QFileInfo* fi;
728 bool cadded=FALSE;
729 for ( QFileInfoListIterator it(*list); (fi=*it); ++it ) {
730 QString bn = fi->fileName();
731 if ( bn[0] != '.' && bn != "CVS" ) {
732 if ( fi->isDir() ) {
733 QString c = typ.isNull() ? bn : typ+"/"+bn;
734 QString d = typNameLocal.isNull() ? bn : typNameLocal+"/"+bn;
735 findChildren(fi->filePath(), c, d, depth );
736 } else {
737 if ( fi->extension(FALSE) == "desktop" ) {
738 AppLnk* app = new AppLnk( fi->filePath() );
739#ifdef QT_NO_QWS_MULTIPROCESS
740 if ( !Global::isBuiltinCommand( app->exec() ) )
741 delete app;
742 else
743#endif
744 {
745 if ( !typ.isEmpty() ) {
746 if ( !cadded ) {
747 typs.append(typ);
748 cadded = TRUE;
749 }
750 app->setType(typ);
751 }
752 add(app);
753 }
754 }
755 }
756 }
757 }
758 }
759}
760
761/*!
762 Adds \a f to the set. The set takes over responsibility for deleting \a f.
763
764 \sa remove()
765*/
766void AppLnkSet::add( AppLnk *f )
767{
768 if ( f->mId == 0 ) {
769 AppLnk::lastId++;
770 f->mId = AppLnk::lastId;
771 mApps.append( f );
772 } else {
773 qWarning("Attempt to add an AppLnk twice");
774 }
775}
776
777/*!
778 Removes \a f to the set, returning whether \a f was in the set.
779 The caller becomes responsible for deleting \a f.
780
781 \sa add()
782*/
783bool AppLnkSet::remove( AppLnk *f )
784{
785 if ( mApps.remove( f ) ) {
786 f->mId = 0;
787 return TRUE;
788 }
789 return FALSE;
790}
791
792/*!
793 Returns the localized name for type \a t.
794*/
795QString AppLnkSet::typeName( const QString& t ) const
796{
797 QString *st = d->typName.find(t);
798 return st ? *st : QString::null;
799}
800
801/*!
802 Returns the small pixmap associated with type \a t.
803*/
804QPixmap AppLnkSet::typePixmap( const QString& t ) const
805{
806 QPixmap *pm = d->typPix.find(t);
807 return pm ? *pm : QPixmap();
808}
809
810/*!
811 Returns the large pixmap associated with type \a t.
812*/
813QPixmap AppLnkSet::typeBigPixmap( const QString& t ) const
814{
815 QPixmap *pm = d->typPixBig.find(t);
816 return pm ? *pm : QPixmap();
817}
818
819/*!
820 Returns the AppLnk with the given \a id.
821*/
822const AppLnk *AppLnkSet::find( int id ) const
823{
824 QListIterator<AppLnk> it( children() );
825
826 for ( ; it.current(); ++it ) {
827 const AppLnk *app = it.current();
828 if ( app->id() == id )
829 return app;
830 }
831
832 return 0;
833}
834
835/*!
836 Returns the AppLnk with the given \a exec attribute.
837*/
838const AppLnk *AppLnkSet::findExec( const QString& exec ) const
839{
840 QListIterator<AppLnk> it( children() );
841
842 for ( ; it.current(); ++it ) {
843 const AppLnk *app = it.current();
844 if ( app->exec() == exec )
845 return app;
846 }
847
848 return 0;
849}
850
851/*!
852 \class DocLnkSet applnk.h
853 \brief The DocLnkSet class is a set of DocLnk objects.
854*/
855
856/*!
857 \fn const QList<DocLnk>& DocLnkSet::children() const
858
859 Returns the members of the set.
860*/
861
862/*!
863 Constructs an empty DocLnkSet.
864
865 \sa appendFrom()
866*/
867DocLnkSet::DocLnkSet()
868{
869}
870
871/*!
872 Constructs an DocLnkSet that contains DocLnk objects representing
873 all the files in a \a directory (recursively).
874
875 If \a mimefilter is not null,
876 only documents with a MIME type matching \a mimefilter are selected.
877 The value may contain multiple wild-card patterns separated by ";",
878 such as "*o/mpeg;audio/x-wav".
879*/
880DocLnkSet::DocLnkSet( const QString &directory, const QString& mimefilter ) :
881 AppLnkSet()
882{
883 QDir dir( directory );
884 mFile = dir.dirName();
885 QDict<void> reference;
886
887 QStringList subFilter = QStringList::split(";", mimefilter);
888 QValueList<QRegExp> mimeFilters;
889 for( QStringList::Iterator it = subFilter.begin(); it != subFilter.end(); ++ it )
890 mimeFilters.append( QRegExp(*it, FALSE, TRUE) );
891
892 findChildren(directory, mimeFilters, reference);
893
894 const QList<DocLnk> &list = children();
895 for ( QListIterator<DocLnk> it( list ); it.current(); ++it ) {
896 reference.remove( (*it)->file() );
897 }
898
899 for ( QDictIterator<void> dit(reference); dit.current(); ++dit ) {
900 if ( dit.current() == (void*)2 ) {
901 // Unreferenced, make an unwritten link
902 DocLnk* dl = new DocLnk;
903 QFileInfo fi( dit.currentKey() );
904 dl->setFile(fi.filePath());
905 dl->setName(fi.baseName());
906 // #### default to current path?
907 // dl->setCategories( ... );
908 bool match = mimefilter.isNull();
909 if ( !match )
910 for( QValueList<QRegExp>::Iterator it = mimeFilters.begin(); it != mimeFilters.end() && !match; ++ it )
911 if ( (*it).match(dl->type()) >= 0 )
912 match = TRUE;
913 if ( match /* && dl->type() != "application/octet-stream" */
914 && !!dl->exec() )
915 add(dl);
916 else
917 delete dl;
918 }
919 }
920}
921
922// other becomes empty
923/*!
924 Transfers all DocLnk objects from \a other to this set. \a other becomes
925 empty.
926*/
927void DocLnkSet::appendFrom( DocLnkSet& other )
928{
929 if ( &other == this )
930 return;
931 QListIterator<AppLnk> it( other.mApps );
932 for ( ; it.current(); ) {
933 mApps.append(*it);
934 ++it;
935 }
936 other.mApps.clear();
937}
938
939void DocLnkSet::findChildren(const QString &dr, const QValueList<QRegExp> &mimeFilters, QDict<void> &reference, int depth)
940{
941 depth++;
942 if ( depth > 10 )
943 return;
944
945 QDir dir( dr );
946
947 const QFileInfoList *list = dir.entryInfoList();
948 if ( list ) {
949 QFileInfo* fi;
950 for ( QFileInfoListIterator it(*list); (fi=*it); ++it ) {
951 QString bn = fi->fileName();
952 if ( bn[0] != '.' && bn != "CVS" ) {
953 if ( fi->isDir() ) {
954 findChildren(fi->filePath(), mimeFilters, reference, depth);
955 } else {
956 if ( fi->extension(FALSE) == "desktop" ) {
957 DocLnk* dl = new DocLnk( fi->filePath() );
958 QFileInfo fi2(dl->file());
959 bool match = FALSE;
960 if ( !fi2.exists() ) {
961 dir.remove( dl->file() );
962 }
963 if ( mimeFilters.count() == 0 ) {
964 add( dl );
965 match = TRUE;
966 } else {
967 for( QValueList<QRegExp>::ConstIterator it = mimeFilters.begin(); it != mimeFilters.end(); ++ it ) {
968 if ( (*it).match(dl->type()) >= 0 ) {
969 add(dl);
970 match = TRUE;
971 }
972 }
973 }
974 if ( !match )
975 delete dl;
976 } else {
977 if ( !reference.find(fi->fileName()) )
978 reference.insert(fi->filePath(), (void*)2);
979 }
980 }
981 }
982 }
983 }
984}
985
986/*!
987 \class DocLnk applnk.h
988 \brief The DocLnk class represents loaded document references.
989*/
990
991/*!
992 \fn DocLnk::DocLnk( const DocLnk &o )
993
994 Copies \a o.
995*/
996
997/*!
998 Constructs a DocLnk from a valid .desktop \a file or a new .desktop
999 \a file for other files.
1000*/
1001DocLnk::DocLnk( const QString &file ) :
1002 AppLnk(file)
1003{
1004 init(file);
1005}
1006
1007/*!
1008 Constructs a DocLnk from a valid .desktop \a file or a new .desktop
1009 \a file for other files. If \a may_be_desktopfile is TRUE, then \a file
1010 is first attempted to be read as a .desktop file.
1011*/
1012DocLnk::DocLnk( const QString &file, bool may_be_desktopfile ) :
1013 AppLnk(may_be_desktopfile ? file : QString::null)
1014{
1015 init(file);
1016}
1017
1018void DocLnk::init(const QString &file)
1019{
1020 if ( isValid() ) {
1021#ifndef FORCED_DIR_STRUCTURE_WAY
1022 if ( mType.isNull() )
1023 // try to infer it
1024#endif
1025 {
1026 int s0 = file.findRev('/');
1027 if ( s0 > 0 ) {
1028 int s1 = file.findRev('/',s0-1);
1029 if ( s1 > 0 ) {
1030 int s2 = file.findRev('/',s1-1);
1031 if ( s2 > 0 ) {
1032 mType = file.mid(s2+1,s0-s2-1);
1033 }
1034 }
1035 }
1036 }
1037 } else if ( QFile::exists(file) ) {
1038 QString n = file;
1039 n.replace(QRegExp("\\..*"),"");
1040 n.replace(QRegExp(".*/"),"");
1041 setName( n );
1042 setFile( file );
1043 }
1044 MimeType mt(mType);
1045 if( mt.application() )
1046 mExec = mt.application()->exec();
1047}
1048
1049/*!
1050 Constructs an invalid DocLnk.
1051*/
1052DocLnk::DocLnk()
1053{
1054}
1055
1056/*!
1057 Destroys the DocLnk. As with AppLnk objects, a run-time error
1058 occurs if the DocLnk is a member of a DocLnkSet (or AppLnkSet).
1059*/
1060DocLnk::~DocLnk()
1061{
1062}
1063
1064/*!
1065 \reimp
1066*/
1067QString DocLnk::exec() const
1068{
1069 MimeType mt(type());
1070 const AppLnk* app = mt.application();
1071 if ( app )
1072 return app->exec();
1073 else
1074 return QString::null;
1075}
1076
1077/*!
1078 \reimp
1079*/
1080void DocLnk::invoke(const QStringList& args) const
1081{
1082 MimeType mt(type());
1083 const AppLnk* app = mt.application();
1084 if ( app ) {
1085 QStringList a = args;
1086 if ( QFile::exists( linkFile() ) )
1087 a.append(linkFile());
1088 else
1089 a.append(file());
1090 app->execute(a);
1091 }
1092}
1093
diff --git a/library/applnk.h b/library/applnk.h
new file mode 100644
index 0000000..c6f92a3
--- a/dev/null
+++ b/library/applnk.h
@@ -0,0 +1,169 @@
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#ifndef __APPLNK_H__
21#define __APPLNK_H__
22
23#include <qobject.h>
24#include <qiconset.h>
25#include <qlist.h>
26#include <qdict.h>
27#include <qstringlist.h>
28
29class AppLnkSetPrivate;
30class AppLnkPrivate;
31
32class AppLnk
33{
34public:
35 AppLnk();
36 AppLnk( const QString &file );
37 AppLnk( const AppLnk &copy ); // copy constructor
38 virtual ~AppLnk();
39
40 bool isValid() const { return !mLinkFile.isNull(); }
41
42 static void setSmallIconSize(int);
43 static void setBigIconSize(int);
44 static int smallIconSize();
45 static int bigIconSize();
46
47 QString name() const { return mName; }
48 const QPixmap& pixmap() const;
49 const QPixmap& bigPixmap() const;
50 virtual QString exec() const { return mExec; }
51 QString type() const;
52 QString rotation() const { return mRotation; }
53 QString comment() const { return mComment; }
54 QString file() const;
55 QString linkFile() const;
56 QStringList mimeTypes() const { return mMimeTypes; }
57 QStringList mimeTypeIcons() const { return mMimeTypeIcons; }
58 const QArray<int> &categories() const;
59 int id() const { return mId; }
60
61 void execute() const;
62 void execute(const QStringList& args) const;
63 void removeFiles();
64 void removeLinkFile();
65
66 void setName( const QString& docname );
67 void setExec( const QString& exec );
68 void setFile( const QString& filename );
69 void setLinkFile( const QString& filename );
70 void setComment( const QString& comment );
71 void setType( const QString& mimetype );
72 void setIcon( const QString& iconname );
73 void setCategories( const QArray<int> &v );
74 bool writeLink() const;
75
76 void setProperty(const QString& key, const QString& value);
77 QString property(const QString& key) const;
78
79protected:
80 QString mName;
81 QPixmap mPixmap;
82 QPixmap mBigPixmap;
83 QString mExec;
84 QString mType;
85 QString mRotation;
86 QString mComment;
87 QString mFile;
88 QString mLinkFile;
89 QString mIconFile;
90 QStringList mMimeTypes;
91 QStringList mMimeTypeIcons;
92 int mId;
93 static int lastId;
94 AppLnkPrivate *d;
95 friend class AppLnkSet;
96
97 virtual void invoke(const QStringList& args) const;
98 bool ensureLinkExists() const;
99};
100
101class DocLnk : public AppLnk
102{
103public:
104 DocLnk();
105 DocLnk( const DocLnk &o ) : AppLnk(o) { }
106 DocLnk( const QString &file );
107 DocLnk( const QString &file, bool may_be_desktopfile );
108 virtual ~DocLnk();
109
110 QString exec() const;
111
112protected:
113 void invoke(const QStringList& args) const;
114
115private:
116 void init(const QString &file);
117};
118
119class AppLnkSet
120{
121public:
122 AppLnkSet();
123 AppLnkSet( const QString &dir );
124 ~AppLnkSet();
125
126 const AppLnk *find( int id ) const;
127 const AppLnk *findExec( const QString& execname ) const;
128
129 QStringList types() const { return typs; }
130 QString typeName( const QString& ) const;
131 QPixmap typePixmap( const QString& ) const;
132 QPixmap typeBigPixmap( const QString& ) const;
133
134 void add(AppLnk*);
135 bool remove(AppLnk*);
136
137 const QList<AppLnk> &children() const { return mApps; }
138 void detachChildren();
139
140protected:
141 friend class AppLnk;
142 QList<AppLnk> mApps;
143 QString mFile;
144 QStringList typs;
145 AppLnkSetPrivate *d;
146
147private:
148 AppLnkSet( const AppLnkSet & ); // no copying!
149 void findChildren(const QString &, const QString& t, const QString& lt, int depth = 0);
150};
151
152class DocLnkSet : public AppLnkSet
153{
154public:
155 DocLnkSet();
156 DocLnkSet( const QString &dir, const QString &mimefilter=QString::null );
157
158 const QList<DocLnk> &children() const { return (const QList<DocLnk> &)mApps; }
159
160 void appendFrom( DocLnkSet& other );
161
162private:
163 DocLnkSet( const DocLnkSet & ); // no copying!
164 void findChildren(const QString &dr, const QValueList<QRegExp> &mimeFilters, QDict<void> &reference, int depth=0);
165};
166
167
168#endif // __APPLNK_H__
169
diff --git a/library/backend/.cvsignore b/library/backend/.cvsignore
new file mode 100644
index 0000000..e047b1f
--- a/dev/null
+++ b/library/backend/.cvsignore
@@ -0,0 +1,2 @@
1moc_*
2*.moc
diff --git a/library/backend/categories.cpp b/library/backend/categories.cpp
new file mode 100644
index 0000000..91331db
--- a/dev/null
+++ b/library/backend/categories.cpp
@@ -0,0 +1,701 @@
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#include "categories.h"
22#include <qfile.h>
23#include <qcstring.h>
24#include <qtextstream.h>
25#include "stringutil.h"
26
27using namespace Qtopia;
28
29/***********************************************************
30 *
31 * CategoryGroup
32 *
33 **********************************************************/
34
35#ifdef PALMTOPCENTER
36UidGen CategoryGroup::sUidGen( UidGen::PalmtopCenter );
37#else
38UidGen CategoryGroup::sUidGen( UidGen::Qtopia );
39#endif
40
41int CategoryGroup::add( const QString &label )
42{
43 if ( label == QObject::tr("All") || label == QObject::tr("Unfiled") )
44 return 0;
45
46 QMap<QString,int>::Iterator findIt = mLabelIdMap.find( label );
47 if ( findIt != mLabelIdMap.end() )
48 return 0;
49 int newUid = uidGen().generate();
50 insert( newUid, label );
51 return newUid;
52}
53
54void CategoryGroup::insert( int uid, const QString &label )
55{
56 uidGen().store( uid );
57 mIdLabelMap[uid] = label;
58 mLabelIdMap[label] = uid;
59}
60
61bool CategoryGroup::add( int uid, const QString &label )
62{
63 if ( label == QObject::tr("All") || label == QObject::tr("Unfiled") )
64 return FALSE;
65
66 QMap<QString,int>::ConstIterator labelIt = mLabelIdMap.find( label );
67 if ( labelIt != mLabelIdMap.end() )
68 return FALSE;
69 QMap<int,QString>::ConstIterator idIt = mIdLabelMap.find( uid );
70 if ( idIt != mIdLabelMap.end() )
71 return FALSE;
72 insert( uid, label );
73 return TRUE;
74}
75
76bool CategoryGroup::remove( const QString &label )
77{
78 QMap<QString,int>::Iterator findIt = mLabelIdMap.find( label );
79 if ( findIt == mLabelIdMap.end() )
80 return FALSE;
81
82 mIdLabelMap.remove( *findIt );
83 mLabelIdMap.remove( findIt );
84
85 return TRUE;
86}
87
88bool CategoryGroup::remove( int uid )
89{
90 QMap<int,QString>::Iterator idIt = mIdLabelMap.find( uid );
91 if ( idIt == mIdLabelMap.end() )
92 return FALSE;
93
94 mLabelIdMap.remove( *idIt );
95 mIdLabelMap.remove( idIt );
96
97 return TRUE;
98}
99
100bool CategoryGroup::rename( int uid, const QString &newLabel )
101{
102 if ( newLabel == QObject::tr("All") || newLabel == QObject::tr("Unfiled") )
103 return FALSE;
104
105 QMap<int, QString>::Iterator idIt = mIdLabelMap.find( uid );
106 if ( idIt == mIdLabelMap.end() )
107 return FALSE;
108
109 mLabelIdMap.remove( *idIt );
110 mLabelIdMap[newLabel] = uid;
111 *idIt = newLabel;
112
113 return TRUE;
114}
115
116bool CategoryGroup::rename( const QString &oldLabel, const QString &newLabel )
117{
118 return rename( id(oldLabel), newLabel );
119}
120
121bool CategoryGroup::contains(int uid) const
122{
123 return ( mIdLabelMap.find( uid ) != mIdLabelMap.end() );
124}
125
126bool CategoryGroup::contains(const QString &label) const
127{
128 return ( mLabelIdMap.find( label ) != mLabelIdMap.end() );
129}
130
131/** Returns label associated with the uid or QString::null if
132 * not found
133 */
134const QString &CategoryGroup::label(int uid) const
135{
136 QMap<int,QString>::ConstIterator idIt = mIdLabelMap.find( uid );
137 if ( idIt == mIdLabelMap.end() )
138 return QString::null;
139 return *idIt;
140}
141
142/** Returns the uid associated with label or 0 if not found */
143int CategoryGroup::id(const QString &label) const
144{
145 QMap<QString,int>::ConstIterator labelIt = mLabelIdMap.find( label );
146 if ( labelIt == mLabelIdMap.end() )
147 return 0;
148 return *labelIt;
149}
150
151QStringList CategoryGroup::labels() const
152{
153 QStringList labels;
154 for ( QMap<int, QString>::ConstIterator it = mIdLabelMap.begin();
155 it != mIdLabelMap.end(); ++it )
156 labels += *it;
157 // ### I don't think this is the place for this...
158// labels.sort();
159 return labels;
160}
161
162QStringList CategoryGroup::labels(const QArray<int> &catids ) const
163{
164 QStringList labels;
165 if ( catids.count() == 0 )
166 return labels;
167 for ( QMap<int, QString>::ConstIterator it = mIdLabelMap.begin();
168 it != mIdLabelMap.end(); ++it )
169 if ( catids.find( it.key() ) != -1 )
170 labels += *it;
171 return labels;
172}
173
174QArray<int> CategoryGroup::ids( const QStringList &cats ) const
175{
176 QArray<int> results;
177
178 for ( QStringList::ConstIterator catIt = cats.begin();
179 catIt != cats.end(); ++catIt ) {
180 if ( *catIt == QObject::tr("All") || *catIt == QObject::tr("Unfiled") )
181 continue;
182 int value = id( *catIt );
183 if ( value != 0 ) {
184 int tmp = results.size();
185 results.resize( tmp + 1 );
186 results[ tmp ] = value;
187 }
188 }
189
190 return results;
191}
192
193QArray<int> CategoryGroup::ids() const
194{
195 QArray<int> results( mIdLabelMap.count() );
196 int i = 0;
197 for ( QMap<int, QString>::ConstIterator it = mIdLabelMap.begin();
198 it != mIdLabelMap.end(); ++it )
199 results[i++] = it.key();
200
201 return results;
202}
203
204/***********************************************************
205 *
206 * Categories
207 *
208 **********************************************************/
209
210/** Add the category name as long as it doesn't already exist locally
211 * or globally. Return TRUE if added, FALSE if conflicts.
212 */
213int Categories::addCategory( const QString &appname,
214 const QString &catname,
215 int uid )
216{
217 if ( mGlobalCats.contains(catname) )
218 return 0;
219
220 QMap< QString, CategoryGroup >::Iterator
221 appIt = mAppCats.find( appname );
222
223 if ( appIt == mAppCats.end() ) {
224 CategoryGroup newgroup;
225 newgroup.add( uid, catname );
226 mAppCats.insert( appname, newgroup );
227 emit categoryAdded( *this, appname, uid );
228 return uid;
229 }
230
231 CategoryGroup &cats = *appIt;
232 cats.add( uid, catname );
233 emit categoryAdded( *this, appname, uid );
234 return uid;
235}
236
237int Categories::addCategory( const QString &appname,
238 const QString &catname )
239{
240 if ( mGlobalCats.contains(catname) )
241 return 0;
242
243 QMap< QString, CategoryGroup >::Iterator
244 appIt = mAppCats.find( appname );
245
246 if ( appIt == mAppCats.end() ) {
247 CategoryGroup newgroup;
248 int uid = newgroup.add( catname );
249 mAppCats.insert( appname, newgroup );
250 emit categoryAdded( *this, appname, uid );
251 return uid;
252 }
253
254 CategoryGroup &cats = *appIt;
255 int uid = cats.add( catname );
256 if ( !uid )
257 return 0;
258 emit categoryAdded( *this, appname, uid );
259 return uid;
260}
261
262int Categories::addGlobalCategory( const QString &catname, int uid )
263{
264 mGlobalCats.add( uid, catname );
265 emit categoryAdded( *this, QString::null, uid );
266 return uid;
267}
268
269int Categories::addGlobalCategory( const QString &catname )
270{
271 int uid = mGlobalCats.add( catname );
272 if ( !uid )
273 return 0;
274 emit categoryAdded( *this, QString::null, uid );
275 return uid;
276}
277
278/** Removes the category from the application; if it is not found
279 * in the application, then it attempts to remove it from
280 * the global list
281 */
282bool Categories::removeCategory( const QString &appname,
283 const QString &catname,
284 bool checkGlobal )
285{
286 QMap< QString, CategoryGroup >::Iterator
287 appIt = mAppCats.find( appname );
288 if ( appIt != mAppCats.end() ) {
289 CategoryGroup &cats = *appIt;
290 int uid = cats.id( catname );
291 if ( cats.remove( uid ) ) {
292 emit categoryRemoved( *this, appname, uid );
293 return TRUE;
294 }
295 }
296 if ( !checkGlobal )
297 return FALSE;
298 return removeGlobalCategory( catname );
299}
300
301bool Categories::removeCategory( const QString &appname, int uid )
302{
303 QMap< QString, CategoryGroup >::Iterator
304 appIt = mAppCats.find( appname );
305 if ( appIt != mAppCats.end() ) {
306 CategoryGroup &cats = *appIt;
307 if ( cats.remove( uid ) ) {
308 emit categoryRemoved( *this, appname, uid );
309 return TRUE;
310 }
311 }
312 return FALSE;
313}
314
315bool Categories::removeGlobalCategory( const QString &catname )
316{
317 int uid = mGlobalCats.id( catname );
318 if ( mGlobalCats.remove( uid ) ) {
319 emit categoryRemoved( *this, QString::null, uid );
320 return TRUE;
321 }
322 return FALSE;
323}
324
325
326bool Categories::removeGlobalCategory( int uid )
327{
328 if ( mGlobalCats.remove( uid ) ) {
329 emit categoryRemoved( *this, QString::null, uid );
330 return TRUE;
331 }
332 return FALSE;
333}
334
335/** Returns the sorted list of all categories that are associated with
336 * the app. If includeGlobal parameter is TRUE then the returned
337 * categories will include the global category items.
338 */
339QStringList Categories::labels( const QString &app,
340 bool includeGlobal,
341 ExtraLabels extra ) const
342{
343 QMap< QString, CategoryGroup >::ConstIterator
344 appIt = mAppCats.find( app );
345 QStringList cats;
346 switch ( extra ) {
347 case NoExtra: break;
348 case AllUnfiled:
349 cats.append( tr("All") );
350 cats.append( tr("Unfiled") );
351 break;
352 case AllLabel:
353 cats.append( tr("All") );
354 break;
355 case UnfiledLabel:
356 cats.append( tr("Unfiled") );
357 break;
358 }
359 if ( appIt != mAppCats.end() )
360 cats += (*appIt).labels();
361 else qDebug("Categories::labels didn't find app %s", app.latin1() );
362 if ( includeGlobal )
363 cats += mGlobalCats.labels();
364 // I don't think a sorted list is useful, the user might find prefer
365 // it in the original order.
366// cats.sort();
367 return cats;
368}
369
370QString Categories::label( const QString &app, int id ) const
371{
372 if ( mGlobalCats.contains( id ) )
373 return mGlobalCats.label( id );
374 QMap< QString, CategoryGroup >::ConstIterator
375 appIt = mAppCats.find( app );
376 if ( appIt == mAppCats.end() )
377 return QString::null;
378 return (*appIt).label( id );
379}
380
381QStringList Categories::labels( const QString & app,
382 const QArray<int> &catids ) const
383{
384 QStringList strs = mGlobalCats.labels( catids );
385 strs += mAppCats[app].labels( catids );
386 return strs;
387}
388
389/** Returns a single string associated with the cat ids for display in
390 * a combobox or any area that requires one string. If catids are empty
391 * then "Unfiled" will be returned. If multiple categories are assigned
392 * the first cat id is shown with " (multi)" appended to the string.
393 */
394QString Categories::displaySingle( const QString &app,
395 const QArray<int> &catids,
396 DisplaySingle display ) const
397{
398 QStringList strs = labels( app, catids );
399 if ( !strs.count() )
400 return tr("Unfiled");
401 strs.sort();
402 QString r;
403 if ( strs.count() > 1 ) {
404 switch ( display ) {
405 case ShowFirst:
406 r = strs.first();
407 break;
408 case ShowMulti:
409 r = strs.first() + tr(" (multi.)");
410 break;
411 case ShowAll:
412 r = strs.join(" ");
413 break;
414 }
415 }
416 else r = strs.first();
417 return r;
418}
419
420QArray<int> Categories::ids( const QString &app ) const
421{
422 QArray<int> allIds = mGlobalCats.ids();
423 QArray<int> appIds = mAppCats[app].ids();
424
425 // we should make the guarentee that the ids are in the
426 // same order as the labels, (i.e. app cats then global)
427 // otherwise there is no point in having these two separate functions.
428 uint appSize = appIds.size();
429 appIds.resize( appSize + allIds.size() );
430 for ( uint i = appSize; i < appIds.size(); ++i )
431 appIds[int(i)] = allIds[int(i - appSize)];
432
433 return appIds;
434}
435
436QArray<int> Categories::ids( const QString &app, const QStringList &cats ) const
437{
438 QArray<int> allIds = mGlobalCats.ids( cats );
439 QArray<int> appIds = mAppCats[app].ids( cats );
440
441 uint appSize = appIds.size();
442 appIds.resize( appSize + allIds.size() );
443 for ( uint i = appSize; i < appIds.size(); ++i )
444 appIds[int(i)] = allIds[int(i - appSize)];
445
446 return appIds;
447}
448
449int Categories::id( const QString &app, const QString &cat ) const
450{
451 if ( cat == tr("Unfiled") || cat.contains( tr(" (multi.)") ) )
452 return 0;
453 int uid = mGlobalCats.id( cat );
454 if ( uid != 0 )
455 return uid;
456 return mAppCats[app].id( cat );
457}
458
459
460/** Return TRUE if renaming succeeded; FALSE if app name not found,
461 * or if there was a name conflict
462 */
463bool Categories::renameCategory( const QString &appname,
464 const QString &oldName,
465 const QString &newName )
466{
467 QMap< QString, CategoryGroup >::Iterator
468 appIt = mAppCats.find( appname );
469
470 if ( appIt != mAppCats.end() ) {
471 CategoryGroup &cats = *appIt;
472 int id = cats.id( oldName );
473 if ( id != 0 && cats.rename( id, newName ) ) {
474 emit categoryRenamed( *this, appname, id );
475 return TRUE;
476 }
477 }
478 return renameGlobalCategory( oldName, newName );
479}
480
481bool Categories::renameGlobalCategory( const QString &oldName,
482 const QString &newName )
483{
484 int uid = mGlobalCats.id( oldName );
485 if ( uid != 0 && mGlobalCats.rename( uid, newName ) ) {
486 emit categoryRenamed( *this, QString::null, uid );
487 return TRUE;
488 }
489 return FALSE;
490}
491
492void Categories::setGlobal( const QString &appname,
493 const QString &catname,
494 bool global )
495{
496 // if in global and should be in app; then move it
497 if ( mGlobalCats.contains( catname ) && !global ) {
498 mGlobalCats.remove( catname );
499 addCategory( appname, catname );
500 return ;
501 }
502
503 // if in app and should be in global, then move it
504 if ( !global )
505 return;
506 if ( removeCategory( appname, catname, FALSE ) )
507 addGlobalCategory( catname );
508}
509
510bool Categories::isGlobal( const QString &catname ) const
511{
512 return mGlobalCats.contains( catname );
513}
514
515
516/** Returns true if the catname is associated with any application
517 */
518bool Categories::exists( const QString &catname ) const
519{
520 if ( isGlobal(catname) )
521 return TRUE;
522
523 for ( QMap<QString, CategoryGroup>::ConstIterator appsIt = mAppCats.begin(); appsIt != mAppCats.end(); ++appsIt )
524 if ( exists( appsIt.key(), catname ) )
525 return TRUE;
526
527 return FALSE;
528}
529
530bool Categories::exists( const QString &appname,
531 const QString &catname) const
532{
533 QMap< QString, CategoryGroup >::ConstIterator
534 appIt = mAppCats.find( appname );
535
536 if ( appIt == mAppCats.end() )
537 return FALSE;
538
539 return (*appIt).contains( catname );
540}
541
542bool Categories::save( const QString &fname ) const
543{
544 QFile file( fname );
545 if ( !file.open( IO_WriteOnly ) ) {
546 qWarning("Unable to write to %s", fname.latin1());
547 return FALSE;
548 }
549
550 QTextStream ts( &file );
551 ts << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
552 ts << "<!DOCTYPE CategoryList>" << endl;
553
554 ts << "<Categories>" << endl;
555 for ( QMap<int, QString>::ConstIterator git = mGlobalCats.idMap().begin();
556 git != mGlobalCats.idMap().end(); ++git )
557 ts << "<Category id=\"" << git.key() << "\""
558 << " name=\"" << escapeString(*git) << "\" />" << endl;
559
560 for ( QMap<QString, CategoryGroup>::ConstIterator appsIt=mAppCats.begin();
561 appsIt != mAppCats.end(); ++appsIt ) {
562 const QString &app = appsIt.key();
563 const QMap<int, QString> &appcats = (*appsIt).idMap();
564 for ( QMap<int, QString>::ConstIterator appcatit = appcats.begin();
565 appcatit != appcats.end(); ++appcatit )
566 ts << "<Category id=\"" << appcatit.key() << "\""
567 << " app=\"" << escapeString(app) << "\""
568 << " name=\"" << escapeString(*appcatit) << "\" />" << endl;
569 }
570 ts << "</Categories>" << endl;
571
572 file.close();
573 return TRUE;
574}
575
576bool Categories::load( const QString &fname )
577{
578 QFile file( fname );
579 if ( !file.open( IO_ReadOnly ) ) {
580 qWarning("Unable to open %s", fname.latin1());
581 return FALSE;
582 }
583
584 clear();
585 QByteArray ba = file.readAll();
586 QString data = QString::fromUtf8( ba.data(), ba.size() );
587 QChar *uc = (QChar *)data.unicode();
588 int len = data.length();
589
590 // QTime t;
591 // t.start();
592 QString name;
593 QString id;
594 QString app;
595 int i = 0;
596 while ( (i = data.find( "<Category ", i)) != -1 ) {
597
598 i += 10;
599 name = QString::null;
600 app = QString::null;
601 while ( 1 ) {
602 // skip white space
603 while ( i < len &&
604 (uc[i] == ' ' || uc[i] == '\n' || uc[i] == '\r') )
605 i++;
606 // if at the end, then done
607 if ( i >= len-2 || (uc[i] == '/' && uc[i+1] == '>') )
608 break;
609 // we have another attribute read it.
610 int j = i;
611 while ( j < len && uc[j] != '=' )
612 j++;
613 QString attr = QConstString( uc+i, j-i ).string();
614 i = ++j; // skip =
615 while ( i < len && uc[i] != '"' )
616 i++;
617 j = ++i;
618 while ( j < len && uc[j] != '"' )
619 j++;
620 QString value = Qtopia::plainString( QConstString( uc+i, j-i ).string() );
621 i = j + 1;
622
623 // qDebug("attr='%s' value='%s'", attr.latin1(), value.latin1() );
624 if ( attr == "id" )
625 id = value;
626 else if ( attr == "app" )
627 app = value;
628
629 else if ( attr == "name" )
630 name = value;
631 }
632
633 if ( name.isNull() || id.isNull() ) {
634 qWarning("No name or id in the category");
635 continue;
636 }
637 if ( app.isNull() )
638 mGlobalCats.add( id.toInt(), name );
639 else
640 mAppCats[ app ].add( id.toInt(), name );
641 }
642
643 return TRUE;
644}
645
646void Categories::clear()
647{
648 mGlobalCats.clear();
649 mAppCats.clear();
650}
651
652void Categories::dump() const
653{
654 qDebug("\tglobal categories = %s", mGlobalCats.labels().join(", ").latin1() );
655 for ( QMap<QString, CategoryGroup>::ConstIterator appsIt = mAppCats.begin(); appsIt != mAppCats.end(); ++appsIt ) {
656 const QString &app = appsIt.key();
657 QStringList appcats = (*appsIt).labels();
658 qDebug("\tapp = %s\tcategories = %s", app.latin1(),
659 appcats.join(", ").latin1() );
660
661 }
662}
663
664QStringList CheckedListView::checked() const
665{
666 QStringList strs;
667 for ( QCheckListItem *i = (QCheckListItem *) firstChild();
668 i; i = (QCheckListItem *)i->nextSibling() )
669 if ( i->isOn() )
670 strs += i->text( 0 );
671 return strs;
672}
673
674void CheckedListView::addCheckableList( const QStringList &options )
675{
676 for ( QStringList::ConstIterator it = options.begin();
677 it != options.end(); ++it ) {
678 (void) new QCheckListItem( this, *it,
679 QCheckListItem::CheckBox );
680 }
681}
682
683void CheckedListView::setChecked( const QStringList &checked )
684{
685 // iterate over all items
686 bool showingChecked = FALSE;
687 for ( QCheckListItem *i = (QCheckListItem *) firstChild();
688 i; i = (QCheckListItem *)i->nextSibling() )
689 // see if the item should be checked by searching the
690 // checked list
691 if ( checked.find( i->text( 0 ) ) != checked.end() ) {
692 i->setOn( TRUE );
693 // make sure it is showing at least one checked item
694 if ( !showingChecked ) {
695 ensureItemVisible( i );
696 showingChecked = TRUE;
697 }
698 }
699 else
700 i->setOn( FALSE );
701}
diff --git a/library/backend/categories.h b/library/backend/categories.h
new file mode 100644
index 0000000..82d765b
--- a/dev/null
+++ b/library/backend/categories.h
@@ -0,0 +1,232 @@
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#ifndef QTPALMTOP_CATEGORIES_H
23#define QTPALMTOP_CATEGORIES_H
24
25#include <qstring.h>
26#include <qstringlist.h>
27#include <qmap.h>
28#include <qlistview.h>
29#include <qarray.h>
30#include "qpcglobal.h"
31#include "palmtopuidgen.h"
32
33class CategoryGroup;
34
35#if defined(QPC_TEMPLATEDLL)
36// MOC_SKIP_BEGIN
37template class QPC_EXPORT QMap<int, QString>;
38template class QPC_EXPORT QMap<QString, int>;
39template class QPC_EXPORT QMap< QString, CategoryGroup >;
40// MOC_SKIP_END
41#endif
42
43class QPC_EXPORT CategoryGroup
44{
45 friend class Categories;
46public:
47 CategoryGroup(): mIdLabelMap(), mLabelIdMap() { }
48 CategoryGroup( const CategoryGroup &c ) :
49 mIdLabelMap( c.mIdLabelMap), mLabelIdMap( c.mLabelIdMap ) { }
50
51 void clear() { mIdLabelMap.clear(); mLabelIdMap.clear(); }
52
53 int add( const QString &label );
54 bool add( int uid, const QString &label );
55
56 bool remove( const QString &label );
57 bool remove( int uid );
58
59 bool rename( int uid, const QString &newLabel );
60 bool rename( const QString &oldLabel, const QString &newLabel );
61
62 bool contains(int id) const;
63 bool contains(const QString &label) const;
64
65 /** Returns label associated with the uid or QString::null if
66 * not found
67 */
68 const QString &label(int id) const;
69 /** Returns the uid associated with label or 0 if not found */
70 int id(const QString &label) const;
71
72 /** Returns a sorted list of labels */
73 QStringList labels() const;
74 QArray<int> ids( const QStringList &cats ) const;
75 QArray<int> ids() const;
76 QStringList labels( const QArray<int> &catids ) const;
77
78 const QMap<int, QString> &idMap() const { return mIdLabelMap; }
79
80private:
81 void insert( int uid, const QString &label );
82 QMap<int, QString> mIdLabelMap;
83 QMap<QString, int> mLabelIdMap;
84
85 static Qtopia::UidGen &uidGen() { return sUidGen; }
86 static Qtopia::UidGen sUidGen;
87};
88
89/** Map from application name to categories */
90class QPC_EXPORT Categories : public QObject
91{
92 Q_OBJECT
93public:
94 Categories( QObject *parent=0, const char *name = 0 )
95 : QObject( parent, name ), mGlobalCats(), mAppCats() { }
96 Categories( const Categories &copyFrom ) : QObject( copyFrom.parent() ),
97 mGlobalCats( copyFrom.mGlobalCats ),
98 mAppCats( copyFrom.mAppCats ) { }
99 virtual ~Categories() { }
100
101 Categories &operator= ( const Categories &c )
102{ mAppCats = c.mAppCats; mGlobalCats = c.mGlobalCats; return *this; }
103
104 void clear();
105
106 /** Add the category name as long as it doesn't already exist
107 * locally or globally. Return UID if added, 0 if conflicts
108 * (error).
109 */
110 int addCategory( const QString &appname, const QString &catname);
111 /** Add the category name as long as it doesn't already exist
112 * locally or globally. Return UID if added, 0 if conflicts
113 * (error).
114 */
115 int addCategory( const QString &appname, const QString &catname, int uid);
116 /** Add the global category just checking that it doesn't
117 * already exist globally. Return UID if added, 0 if conflicts.
118 */
119 int addGlobalCategory( const QString &catname );
120 /** Add the global category just checking that it doesn't
121 * already exist globally. Return UID if added, 0 if conflicts.
122 */
123 int addGlobalCategory( const QString &catname, int uid );
124 /** Removes the category from the application; if it is not found
125 * in the application, then it removes it from the global list
126 */
127 bool removeCategory( const QString &appName, const QString &catName,
128 bool checkGlobal = TRUE);
129 bool removeCategory( const QString &appName, int uid );
130 bool removeGlobalCategory( const QString &catName );
131 bool removeGlobalCategory( int uid );
132
133 QArray<int> ids( const QString &app ) const;
134 QArray<int> ids( const QString &app,
135 const QStringList &cats ) const;
136 /** Returns the id associated with the app */
137 int id( const QString &app, const QString &cat ) const;
138 /** Returns the label associated with the id */
139 QString label( const QString &app, int id ) const;
140
141 enum ExtraLabels { NoExtra, AllUnfiled, AllLabel, UnfiledLabel };
142 /** Returns the sorted list of all categories that are
143 * associated with the app.
144 * If includeGlobal parameter is TRUE then the returned
145 * categories will include the global category items.
146 * If extra = NoExtra, then
147 * If extra = AllUnfiled, then All and Unfiled will be prepended to
148 * the list
149 * If extra = AllLabel, then All is prepended
150 * If extra = UnfiledLabel, then Unfiled is prepended
151 */
152 QStringList labels( const QString &app,
153 bool includeGlobal = TRUE,
154 ExtraLabels extra = NoExtra ) const;
155
156 /** Returns the labels of the categories associated with the uids */
157 QStringList labels( const QString & app,
158 const QArray<int> &catids ) const;
159
160 enum DisplaySingle { ShowMulti, ShowAll, ShowFirst };
161
162 /** Returns a single string associated with the cat ids for display in
163 * a combobox or any area that requires one string. If catids are empty
164 * then "Unfiled" will be returned. If multiple categories are assigned
165 * then the behavior depends on the DisplaySingle type.
166 * If /a display is set to ShowMulti then " (multi)" appended to the
167 * first string. If /a display is set to ShowAll, then a space seperated
168 * string is returned with all categories. If ShowFirst is returned,
169 * the just the first string is returned.
170 */
171 QString displaySingle( const QString &app,
172 const QArray<int> &catids,
173 DisplaySingle display ) const;
174
175 QStringList globalCategories() const { return mGlobalCats.labels();}
176
177 bool renameCategory( const QString &appname,
178 const QString &oldName,
179 const QString &newName );
180 bool renameGlobalCategory( const QString &oldName,
181 const QString &newName );
182
183 void setGlobal( const QString &appname, const QString &catname,
184 bool value );
185 bool isGlobal( const QString &catname ) const;
186
187
188 /** Returns true if the catname is associated with any application
189 */
190 bool exists( const QString &catname ) const;
191 bool exists( const QString &appname, const QString &catname) const;
192
193 bool save( const QString &fname ) const;
194 bool load( const QString &fname );
195
196 // for debugging
197 void dump() const;
198
199 const QMap<QString, CategoryGroup> &appGroupMap() const{ return mAppCats; }
200 const CategoryGroup &globalGroup() const { return mGlobalCats; }
201
202signals:
203 /** emitted if added a category;
204 * the second param is the application the category was added to
205 * or null if global
206 * the third param is the uid of the newly added category
207 */
208 void categoryAdded( const Categories &, const QString &, int );
209 /** emitted if removed a category
210 * the second param is the application the category was removed from
211 * or null if global
212 * the third param is the uid of the removed category
213 */
214 void categoryRemoved( const Categories &, const QString &, int );
215 /** emitted if a category is renamed; the second param is the uid of
216 * the removed category */
217 void categoryRenamed( const Categories &, const QString &, int );
218
219private:
220 CategoryGroup mGlobalCats;
221 QMap< QString, CategoryGroup > mAppCats;
222};
223
224class QPC_EXPORT CheckedListView : public QListView
225{
226public:
227 void addCheckableList( const QStringList &options );
228 void setChecked( const QStringList &checked );
229 QStringList checked() const;
230};
231
232#endif
diff --git a/library/backend/contact.cpp b/library/backend/contact.cpp
new file mode 100644
index 0000000..a5f10ab
--- a/dev/null
+++ b/library/backend/contact.cpp
@@ -0,0 +1,909 @@
1/**********************************************************************
2** Copyright (C) 2001 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 "contact.h"
22#include "vobject_p.h"
23#include "qfiledirect_p.h"
24
25#include <qpe/stringutil.h>
26#include <qpe/timeconversion.h>
27
28#include <qobject.h>
29#include <qregexp.h>
30#include <qstylesheet.h>
31#include <qfileinfo.h>
32
33#include <stdio.h>
34
35Qtopia::UidGen Contact::sUidGen( Qtopia::UidGen::Qtopia );
36
37Contact::Contact()
38 : Record(), mMap(), d( 0 )
39{
40}
41
42Contact::Contact( const QMap<int, QString> &fromMap ) :
43 Record(), mMap( fromMap ), d( 0 )
44{
45 QString cats = mMap[ Qtopia::AddressCategory ];
46 if ( !cats.isEmpty() )
47 setCategories( idsFromString( cats ) );
48 QString uidStr = find( Qtopia::AddressUid );
49 if ( uidStr.isEmpty() )
50 setUid( uidGen().generate() );
51 else
52 setUid( uidStr.toInt() );
53}
54
55Contact::~Contact()
56{
57}
58
59QMap<int, QString> Contact::toMap() const
60{
61 QMap<int, QString> map = mMap;
62 map.insert( Qtopia::AddressCategory, idsToString( categories() ));
63 return map;
64}
65
66/*!
67 Returns a rich text formatted QString of the Contact.
68*/
69QString Contact::toRichText() const
70{
71 QString text;
72 QString value, comp, state;
73
74 // name, jobtitle and company
75 if ( !(value = fullName()).isEmpty() )
76 text += "<b>" + Qtopia::escapeString(value) + "</b><br>";
77 if ( !(value = jobTitle()).isEmpty() )
78 text += Qtopia::escapeString(value) + "<br>";
79
80 comp = company();
81 if ( !(value = department()).isEmpty() ) {
82 text += Qtopia::escapeString(value);
83 if ( comp )
84 text += ", ";
85 else
86 text += "<br>";
87 }
88 if ( !comp.isEmpty() )
89 text += Qtopia::escapeString(comp) + "<br>";
90
91 // business address
92 if ( !businessStreet().isEmpty() || !businessCity().isEmpty() ||
93 !businessZip().isEmpty() || !businessCountry().isEmpty() ) {
94 text += "<br>";
95 text += QObject::tr( "<b>Work Address:</b>" );
96 text += "<br>";
97 }
98
99 if ( !(value = businessStreet()).isEmpty() )
100 text += Qtopia::escapeString(value) + "<br>";
101 state = businessState();
102 if ( !(value = businessCity()).isEmpty() ) {
103 text += Qtopia::escapeString(value);
104 if ( state )
105 text += ", " + Qtopia::escapeString(state);
106 text += "<br>";
107 } else if ( !state.isEmpty() )
108 text += Qtopia::escapeString(state) + "<br>";
109 if ( !(value = businessZip()).isEmpty() )
110 text += Qtopia::escapeString(value) + "<br>";
111 if ( !(value = businessCountry()).isEmpty() )
112 text += Qtopia::escapeString(value) + "<br>";
113
114 // home address
115 if ( !homeStreet().isEmpty() || !homeCity().isEmpty() ||
116 !homeZip().isEmpty() || !homeCountry().isEmpty() ) {
117 text += "<br>";
118 text += QObject::tr( "<b>Home Address:</b>" );
119 text += "<br>";
120 }
121
122 if ( !(value = homeStreet()).isEmpty() )
123 text += Qtopia::escapeString(value) + "<br>";
124 state = homeState();
125 if ( !(value = homeCity()).isEmpty() ) {
126 text += Qtopia::escapeString(value);
127 if ( !state.isEmpty() )
128 text += ", " + Qtopia::escapeString(state);
129 text += "<br>";
130 } else if (!state.isEmpty())
131 text += Qtopia::escapeString(state) + "<br>";
132 if ( !(value = homeZip()).isEmpty() )
133 text += Qtopia::escapeString(value) + "<br>";
134 if ( !(value = homeCountry()).isEmpty() )
135 text += Qtopia::escapeString(value) + "<br>";
136
137 // the others...
138 QString str;
139 str = emails();
140 if ( !str.isEmpty() )
141 text += "<b>" + QObject::tr("Email Addresses: ") + "</b>"
142 + Qtopia::escapeString(str) + "<br>";
143 str = homePhone();
144 if ( !str.isEmpty() )
145 text += "<b>" + QObject::tr("Home Phone: ") + "</b>"
146 + Qtopia::escapeString(str) + "<br>";
147 str = homeFax();
148 if ( !str.isEmpty() )
149 text += "<b>" + QObject::tr("Home Fax: ") + "</b>"
150 + Qtopia::escapeString(str) + "<br>";
151 str = homeMobile();
152 if ( !str.isEmpty() )
153 text += "<b>" + QObject::tr("Home Mobile: ") + "</b>"
154 + Qtopia::escapeString(str) + "<br>";
155 str = homeWebpage();
156 if ( !str.isEmpty() )
157 text += "<b>" + QObject::tr("Home Web Page: ") + "</b>"
158 + Qtopia::escapeString(str) + "<br>";
159 str = businessWebpage();
160 if ( !str.isEmpty() )
161 text += "<b>" + QObject::tr("Business Web Page: ") + "</b>"
162 + Qtopia::escapeString(str) + "<br>";
163 str = office();
164 if ( !str.isEmpty() )
165 text += "<b>" + QObject::tr("Office: ") + "</b>"
166 + Qtopia::escapeString(str) + "<br>";
167 str = businessPhone();
168 if ( !str.isEmpty() )
169 text += "<b>" + QObject::tr("Business Phone: ") + "</b>"
170 + Qtopia::escapeString(str) + "<br>";
171 str = businessFax();
172 if ( !str.isEmpty() )
173 text += "<b>" + QObject::tr("Business Fax: ") + "</b>"
174 + Qtopia::escapeString(str) + "<br>";
175 str = businessMobile();
176 if ( !str.isEmpty() )
177 text += "<b>" + QObject::tr("Business Mobile: ") + "</b>"
178 + Qtopia::escapeString(str) + "<br>";
179 str = businessPager();
180 if ( !str.isEmpty() )
181 text += "<b>" + QObject::tr("Business Pager: ") + "</b>"
182 + Qtopia::escapeString(str) + "<br>";
183 str = profession();
184 if ( !str.isEmpty() )
185 text += "<b>" + QObject::tr("Profession: ") + "</b>"
186 + Qtopia::escapeString(str) + "<br>";
187 str = assistant();
188 if ( !str.isEmpty() )
189 text += "<b>" + QObject::tr("Assistant: ") + "</b>"
190 + Qtopia::escapeString(str) + "<br>";
191 str = manager();
192 if ( !str.isEmpty() )
193 text += "<b>" + QObject::tr("Manager: ") + "</b>"
194 + Qtopia::escapeString(str) + "<br>";
195 str = gender();
196 if ( !str.isEmpty() && str.toInt() != 0 ) {
197 if ( str.toInt() == 1 )
198 str = QObject::tr( "Male" );
199 else if ( str.toInt() == 2 )
200 str = QObject::tr( "Female" );
201 text += "<b>" + QObject::tr("Gender: ") + "</b>" + str + "<br>";
202 }
203 str = spouse();
204 if ( !str.isEmpty() )
205 text += "<b>" + QObject::tr("Spouse: ") + "</b>"
206 + Qtopia::escapeString(str) + "<br>";
207 str = birthday();
208 if ( !str.isEmpty() )
209 text += "<b>" + QObject::tr("Birthday: ") + "</b>"
210 + Qtopia::escapeString(str) + "<br>";
211 str = anniversary();
212 if ( !str.isEmpty() )
213 text += "<b>" + QObject::tr("Anniversary: ") + "</b>"
214 + Qtopia::escapeString(str) + "<br>";
215 str = nickname();
216 if ( !str.isEmpty() )
217 text += "<b>" + QObject::tr("Nickname: ") + "</b>"
218 + Qtopia::escapeString(str) + "<br>";
219
220 // notes last
221 if ( (value = notes()) ) {
222 QRegExp reg("\n");
223
224 //QString tmp = Qtopia::escapeString(value);
225 QString tmp = QStyleSheet::convertFromPlainText(value);
226 //tmp.replace( reg, "<br>" );
227 text += "<br>" + tmp + "<br>";
228 }
229 return text;
230}
231
232void Contact::insert( int key, const QString &v )
233{
234 QString value = v.stripWhiteSpace();
235 if ( value.isEmpty() )
236 mMap.remove( key );
237 else
238 mMap.insert( key, value );
239}
240
241void Contact::replace( int key, const QString & v )
242{
243 QString value = v.stripWhiteSpace();
244 if ( value.isEmpty() )
245 mMap.remove( key );
246 else
247 mMap.replace( key, value );
248}
249
250QString Contact::find( int key ) const
251{
252 return mMap[key];
253}
254
255QString Contact::displayAddress( const QString &street,
256 const QString &city,
257 const QString &state,
258 const QString &zip,
259 const QString &country ) const
260{
261 QString s = street;
262 if ( !street.isEmpty() )
263 s+= "\n";
264 s += city;
265 if ( !city.isEmpty() && !state.isEmpty() )
266 s += ", ";
267 s += state;
268 if ( !state.isEmpty() && !zip.isEmpty() )
269 s += " ";
270 s += zip;
271 if ( !country.isEmpty() && !s.isEmpty() )
272 s += "\n";
273 s += country;
274 return s;
275}
276
277QString Contact::displayBusinessAddress() const
278{
279 return displayAddress( businessStreet(), businessCity(),
280 businessState(), businessZip(),
281 businessCountry() );
282}
283
284QString Contact::displayHomeAddress() const
285{
286 return displayAddress( homeStreet(), homeCity(),
287 homeState(), homeZip(),
288 homeCountry() );
289}
290
291QString Contact::fullName() const
292{
293 QString title = find( Qtopia::Title );
294 QString firstName = find( Qtopia::FirstName );
295 QString middleName = find( Qtopia::MiddleName );
296 QString lastName = find( Qtopia::LastName );
297 QString suffix = find( Qtopia::Suffix );
298
299 QString name = title;
300 if ( !firstName.isEmpty() ) {
301 if ( !name.isEmpty() )
302 name += " ";
303 name += firstName;
304 }
305 if ( !middleName.isEmpty() ) {
306 if ( !name.isEmpty() )
307 name += " ";
308 name += middleName;
309 }
310 if ( !lastName.isEmpty() ) {
311 if ( !name.isEmpty() )
312 name += " ";
313 name += lastName;
314 }
315 if ( !suffix.isEmpty() ) {
316 if ( !name.isEmpty() )
317 name += " ";
318 name += suffix;
319 }
320 return name.simplifyWhiteSpace();
321}
322
323QStringList Contact::childrenList() const
324{
325 return QStringList::split( " ", find( Qtopia::Children ) );
326}
327
328QStringList Contact::emailList() const
329{
330 return QStringList::split( ";", find( Qtopia::Emails ) );
331}
332
333void Contact::setFileAs()
334{
335 QString lastName, firstName, middleName, fileas;
336
337 lastName = find( Qtopia::LastName );
338 firstName = find( Qtopia::FirstName );
339 middleName = find( Qtopia::MiddleName );
340 if ( !lastName.isEmpty() && !firstName.isEmpty()
341 && !middleName.isEmpty() )
342 fileas = lastName + ", " + firstName + " " + middleName;
343 else if ( !lastName.isEmpty() && !firstName.isEmpty() )
344 fileas = lastName + ", " + firstName;
345 else if ( !lastName.isEmpty() || !firstName.isEmpty() ||
346 !middleName.isEmpty() )
347 fileas = firstName + ( firstName.isEmpty() ? "" : " " )
348 + middleName + ( middleName.isEmpty() ? "" : " " )
349 + lastName;
350
351 replace( Qtopia::FileAs, fileas );
352}
353
354void Contact::save( QString &buf ) const
355{
356 static const QStringList SLFIELDS = fields();
357 // I'm expecting "<Contact " in front of this...
358 for ( QMap<int, QString>::ConstIterator it = mMap.begin();
359 it != mMap.end(); ++it ) {
360 const QString &value = it.data();
361 int key = it.key();
362 if ( !value.isEmpty() ) {
363 if ( key == Qtopia::AddressCategory || key == Qtopia::AddressUid)
364 continue;
365
366 key -= Qtopia::AddressCategory+1;
367 buf += SLFIELDS[key];
368 buf += "=\"" + Qtopia::escapeString(value) + "\" ";
369 }
370 }
371 buf += customToXml();
372 if ( categories().count() > 0 )
373 buf += "Categories=\"" + idsToString( categories() ) + "\" ";
374 buf += "Uid=\"" + QString::number( uid() ) + "\" ";
375 // You need to close this yourself
376}
377
378QStringList Contact::fields()
379{
380 QStringList list;
381
382 list.append( "Title" ); // Not Used!
383 list.append( "FirstName" );
384 list.append( "MiddleName" );
385 list.append( "LastName" );
386 list.append( "Suffix" );
387 list.append( "FileAs" );
388
389 list.append( "DefaultEmail" );
390 list.append( "Emails" );
391
392 list.append( "HomeStreet" );
393 list.append( "HomeCity" );
394 list.append( "HomeState" );
395 list.append( "HomeZip" );
396 list.append( "HomeCountry" );
397 list.append( "HomePhone" );
398 list.append( "HomeFax" );
399 list.append( "HomeMobile" );
400 list.append( "HomeWebPage" );
401
402 list.append( "Company" );
403 list.append( "BusinessStreet" );
404 list.append( "BusinessCity" );
405 list.append( "BusinessState" );
406 list.append( "BusinessZip" );
407 list.append( "BusinessCountry" );
408 list.append( "BusinessWebPage" );
409 list.append( "JobTitle" );
410 list.append( "Department" );
411 list.append( "Office" );
412 list.append( "BusinessPhone" );
413 list.append( "BusinessFax" );
414 list.append( "BusinessMobile" );
415 list.append( "BusinessPager" );
416 list.append( "Profession" );
417 list.append( "Assistant" );
418 list.append( "Manager" );
419
420 list.append( "Spouse" );
421 list.append( "Gender" );
422 list.append( "Birthday" );
423 list.append( "Anniversary" );
424 list.append( "Nickname" );
425
426 list.append( "Children" );
427 list.append( "Notes" );
428
429 return list;
430}
431
432QStringList Contact::trfields()
433{
434 QStringList list;
435
436 list.append( QObject::tr( "Name Title") );
437 list.append( QObject::tr( "First Name" ) );
438 list.append( QObject::tr( "Middle Name" ) );
439 list.append( QObject::tr( "Last Name" ) );
440 list.append( QObject::tr( "Suffix" ) );
441 list.append( QObject::tr( "File As" ) );
442
443 list.append( QObject::tr( "Default Email" ) );
444 list.append( QObject::tr( "Emails" ) );
445
446 list.append( QObject::tr( "Home Street" ) );
447 list.append( QObject::tr( "Home City" ) );
448 list.append( QObject::tr( "Home State" ) );
449 list.append( QObject::tr( "Home Zip" ) );
450 list.append( QObject::tr( "Home Country" ) );
451 list.append( QObject::tr( "Home Phone" ) );
452 list.append( QObject::tr( "Home Fax" ) );
453 list.append( QObject::tr( "Home Mobile" ) );
454 list.append( QObject::tr( "Home Web Page" ) );
455
456 list.append( QObject::tr( "Company" ) );
457 list.append( QObject::tr( "Business Street" ) );
458 list.append( QObject::tr( "Business City" ) );
459 list.append( QObject::tr( "Business State" ) );
460 list.append( QObject::tr( "Business Zip" ) );
461 list.append( QObject::tr( "Business Country" ) );
462 list.append( QObject::tr( "Business WebPage" ) );
463 list.append( QObject::tr( "Job Title" ) );
464 list.append( QObject::tr( "Department" ) );
465 list.append( QObject::tr( "Office" ) );
466 list.append( QObject::tr( "Business Phone" ) );
467 list.append( QObject::tr( "Business Fax" ) );
468 list.append( QObject::tr( "Business Mobile" ) );
469 list.append( QObject::tr( "Business Pager" ) );
470 list.append( QObject::tr( "Profession" ) );
471 list.append( QObject::tr( "Assistant" ) );
472 list.append( QObject::tr( "Manager" ) );
473
474 list.append( QObject::tr( "Spouse" ) );
475 list.append( QObject::tr( "Gender" ) );
476 list.append( QObject::tr( "Birthday" ) );
477 list.append( QObject::tr( "Anniversary" ) );
478 list.append( QObject::tr( "Nickname" ) );
479
480 list.append( QObject::tr( "Children" ) );
481 list.append( QObject::tr( "Notes" ) );
482
483 return list;
484}
485
486void Contact::setEmails( const QString &v )
487{
488 replace( Qtopia::Emails, v );
489 if ( v.isEmpty() )
490 setDefaultEmail( QString::null );
491}
492
493void Contact::setChildren( const QString &v )
494{
495 replace( Qtopia::Children, v );
496}
497
498// vcard conversion code
499static inline VObject *safeAddPropValue( VObject *o, const char *prop, const QString &value )
500{
501 VObject *ret = 0;
502 if ( o && !value.isEmpty() )
503 ret = addPropValue( o, prop, value.latin1() );
504 return ret;
505}
506
507static inline VObject *safeAddProp( VObject *o, const char *prop)
508{
509 VObject *ret = 0;
510 if ( o )
511 ret = addProp( o, prop );
512 return ret;
513}
514
515static VObject *createVObject( const Contact &c )
516{
517 VObject *vcard = newVObject( VCCardProp );
518 safeAddPropValue( vcard, VCVersionProp, "2.1" );
519 safeAddPropValue( vcard, VCLastRevisedProp, TimeConversion::toISO8601( QDateTime::currentDateTime() ) );
520 safeAddPropValue( vcard, VCUniqueStringProp, QString::number(c.uid()) );
521
522 // full name
523 safeAddPropValue( vcard, VCFullNameProp, c.fullName() );
524
525 // name properties
526 VObject *name = safeAddProp( vcard, VCNameProp );
527 safeAddPropValue( name, VCFamilyNameProp, c.lastName() );
528 safeAddPropValue( name, VCGivenNameProp, c.firstName() );
529 safeAddPropValue( name, VCAdditionalNamesProp, c.middleName() );
530 safeAddPropValue( name, VCNamePrefixesProp, c.title() );
531 safeAddPropValue( name, VCNameSuffixesProp, c.suffix() );
532
533 // home properties
534 VObject *home_adr= safeAddProp( vcard, VCAdrProp );
535 safeAddProp( home_adr, VCHomeProp );
536 safeAddPropValue( home_adr, VCStreetAddressProp, c.homeStreet() );
537 safeAddPropValue( home_adr, VCCityProp, c.homeCity() );
538 safeAddPropValue( home_adr, VCRegionProp, c.homeState() );
539 safeAddPropValue( home_adr, VCPostalCodeProp, c.homeZip() );
540 safeAddPropValue( home_adr, VCCountryNameProp, c.homeCountry() );
541
542 VObject *home_phone = safeAddPropValue( vcard, VCTelephoneProp, c.homePhone() );
543 safeAddProp( home_phone, VCHomeProp );
544 home_phone = safeAddPropValue( vcard, VCTelephoneProp, c.homeMobile() );
545 safeAddProp( home_phone, VCHomeProp );
546 safeAddProp( home_phone, VCCellularProp );
547 home_phone = safeAddPropValue( vcard, VCTelephoneProp, c.homeFax() );
548 safeAddProp( home_phone, VCHomeProp );
549 safeAddProp( home_phone, VCFaxProp );
550
551 VObject *url = safeAddPropValue( vcard, VCURLProp, c.homeWebpage() );
552 safeAddProp( url, VCHomeProp );
553
554 // work properties
555 VObject *work_adr= safeAddProp( vcard, VCAdrProp );
556 safeAddProp( work_adr, VCWorkProp );
557 safeAddPropValue( work_adr, VCStreetAddressProp, c.businessStreet() );
558 safeAddPropValue( work_adr, VCCityProp, c.businessCity() );
559 safeAddPropValue( work_adr, VCRegionProp, c.businessState() );
560 safeAddPropValue( work_adr, VCPostalCodeProp, c.businessZip() );
561 safeAddPropValue( work_adr, VCCountryNameProp, c.businessCountry() );
562
563 VObject *work_phone = safeAddPropValue( vcard, VCTelephoneProp, c.businessPhone() );
564 safeAddProp( work_phone, VCWorkProp );
565 work_phone = safeAddPropValue( vcard, VCTelephoneProp, c.businessMobile() );
566 safeAddProp( work_phone, VCWorkProp );
567 safeAddProp( work_phone, VCCellularProp );
568 work_phone = safeAddPropValue( vcard, VCTelephoneProp, c.businessFax() );
569 safeAddProp( work_phone, VCWorkProp );
570 safeAddProp( work_phone, VCFaxProp );
571 work_phone = safeAddPropValue( vcard, VCTelephoneProp, c.businessPager() );
572 safeAddProp( work_phone, VCWorkProp );
573 safeAddProp( work_phone, VCPagerProp );
574
575 url = safeAddPropValue( vcard, VCURLProp, c.businessWebpage() );
576 safeAddProp( url, VCWorkProp );
577
578 VObject *title = safeAddPropValue( vcard, VCTitleProp, c.jobTitle() );
579 safeAddProp( title, VCWorkProp );
580
581
582 QStringList emails = c.emailList();
583 emails.prepend( c.defaultEmail() );
584 for( QStringList::Iterator it = emails.begin(); it != emails.end(); ++it ) {
585 VObject *email = safeAddPropValue( vcard, VCEmailAddressProp, *it );
586 safeAddProp( email, VCInternetProp );
587 }
588
589 safeAddPropValue( vcard, VCNoteProp, c.notes() );
590
591 safeAddPropValue( vcard, VCBirthDateProp, c.birthday() );
592
593 if ( !c.company().isEmpty() || !c.department().isEmpty() || !c.office().isEmpty() ) {
594 VObject *org = safeAddProp( vcard, VCOrgProp );
595 safeAddPropValue( org, VCOrgNameProp, c.company() );
596 safeAddPropValue( org, VCOrgUnitProp, c.department() );
597 safeAddPropValue( org, VCOrgUnit2Prop, c.office() );
598 }
599
600 // some values we have to export as custom fields
601 safeAddPropValue( vcard, "X-Qtopia-Profession", c.profession() );
602 safeAddPropValue( vcard, "X-Qtopia-Manager", c.manager() );
603 safeAddPropValue( vcard, "X-Qtopia-Assistant", c.assistant() );
604
605 safeAddPropValue( vcard, "X-Qtopia-Spouse", c.spouse() );
606 safeAddPropValue( vcard, "X-Qtopia-Gender", c.gender() );
607 safeAddPropValue( vcard, "X-Qtopia-Anniversary", c.anniversary() );
608 safeAddPropValue( vcard, "X-Qtopia-Nickname", c.nickname() );
609 safeAddPropValue( vcard, "X-Qtopia-Children", c.children() );
610
611 return vcard;
612}
613
614
615static Contact parseVObject( VObject *obj )
616{
617 Contact c;
618
619 bool haveDefaultEmail = FALSE;
620
621 VObjectIterator it;
622 initPropIterator( &it, obj );
623 while( moreIteration( &it ) ) {
624 VObject *o = nextVObject( &it );
625 QCString name = vObjectName( o );
626 QCString value = vObjectStringZValue( o );
627 if ( name == VCNameProp ) {
628 VObjectIterator nit;
629 initPropIterator( &nit, o );
630 while( moreIteration( &nit ) ) {
631 VObject *o = nextVObject( &nit );
632 QCString name = vObjectName( o );
633 QString value = vObjectStringZValue( o );
634 if ( name == VCNamePrefixesProp )
635 c.setTitle( value );
636 else if ( name == VCNameSuffixesProp )
637 c.setSuffix( value );
638 else if ( name == VCFamilyNameProp )
639 c.setLastName( value );
640 else if ( name == VCGivenNameProp )
641 c.setFirstName( value );
642 else if ( name == VCAdditionalNamesProp )
643 c.setMiddleName( value );
644 }
645 }
646 else if ( name == VCAdrProp ) {
647 bool work = TRUE; // default address is work address
648 QString street;
649 QString city;
650 QString region;
651 QString postal;
652 QString country;
653
654 VObjectIterator nit;
655 initPropIterator( &nit, o );
656 while( moreIteration( &nit ) ) {
657 VObject *o = nextVObject( &nit );
658 QCString name = vObjectName( o );
659 QString value = vObjectStringZValue( o );
660 if ( name == VCHomeProp )
661 work = FALSE;
662 else if ( name == VCWorkProp )
663 work = TRUE;
664 else if ( name == VCStreetAddressProp )
665 street = value;
666 else if ( name == VCCityProp )
667 city = value;
668 else if ( name == VCRegionProp )
669 region = value;
670 else if ( name == VCPostalCodeProp )
671 postal = value;
672 else if ( name == VCCountryNameProp )
673 country = value;
674 }
675 if ( work ) {
676 c.setBusinessStreet( street );
677 c.setBusinessCity( city );
678 c.setBusinessCountry( country );
679 c.setBusinessZip( postal );
680 c.setBusinessState( region );
681 } else {
682 c.setHomeStreet( street );
683 c.setHomeCity( city );
684 c.setHomeCountry( country );
685 c.setHomeZip( postal );
686 c.setHomeState( region );
687 }
688 }
689 else if ( name == VCTelephoneProp ) {
690 enum {
691 HOME = 0x01,
692 WORK = 0x02,
693 VOICE = 0x04,
694 CELL = 0x08,
695 FAX = 0x10,
696 PAGER = 0x20,
697 UNKNOWN = 0x80
698 };
699 int type = 0;
700
701 VObjectIterator nit;
702 initPropIterator( &nit, o );
703 while( moreIteration( &nit ) ) {
704 VObject *o = nextVObject( &nit );
705 QCString name = vObjectName( o );
706 if ( name == VCHomeProp )
707 type |= HOME;
708 else if ( name == VCWorkProp )
709 type |= WORK;
710 else if ( name == VCVoiceProp )
711 type |= VOICE;
712 else if ( name == VCCellularProp )
713 type |= CELL;
714 else if ( name == VCFaxProp )
715 type |= FAX;
716 else if ( name == VCPagerProp )
717 type |= PAGER;
718 else if ( name == VCPreferredProp )
719 ;
720 else
721 type |= UNKNOWN;
722 }
723 if ( (type & UNKNOWN) != UNKNOWN ) {
724 if ( ( type & (HOME|WORK) ) == 0 ) // default
725 type |= HOME;
726 if ( ( type & (VOICE|CELL|FAX|PAGER) ) == 0 ) // default
727 type |= VOICE;
728
729 if ( (type & (VOICE|HOME) ) == (VOICE|HOME) )
730 c.setHomePhone( value );
731 if ( ( type & (FAX|HOME) ) == (FAX|HOME) )
732 c.setHomeFax( value );
733 if ( ( type & (CELL|HOME) ) == (CELL|HOME) )
734 c.setHomeMobile( value );
735 if ( ( type & (VOICE|WORK) ) == (VOICE|WORK) )
736 c.setBusinessPhone( value );
737 if ( ( type & (FAX|WORK) ) == (FAX|WORK) )
738 c.setBusinessFax( value );
739 if ( ( type & (CELL|WORK) ) == (CELL|WORK) )
740 c.setBusinessMobile( value );
741 if ( ( type & (PAGER|WORK) ) == (PAGER|WORK) )
742 c.setBusinessPager( value );
743 }
744 }
745 else if ( name == VCEmailAddressProp ) {
746 QString email = vObjectStringZValue( o );
747 bool valid = TRUE;
748 VObjectIterator nit;
749 initPropIterator( &nit, o );
750 while( moreIteration( &nit ) ) {
751 VObject *o = nextVObject( &nit );
752 QCString name = vObjectName( o );
753 if ( name != VCInternetProp && name != VCHomeProp &&
754 name != VCWorkProp &&
755 name != VCPreferredProp )
756 // ### preffered should map to default email
757 valid = FALSE;
758 }
759 if ( valid ) {
760 if ( haveDefaultEmail ) {
761 QString str = c.emails();
762 if ( !str.isEmpty() )
763 str += ","+email;
764 c.setEmails( str );
765 } else {
766 c.setDefaultEmail( email );
767 }
768 }
769 }
770 else if ( name == VCURLProp ) {
771 VObjectIterator nit;
772 initPropIterator( &nit, o );
773 while( moreIteration( &nit ) ) {
774 VObject *o = nextVObject( &nit );
775 QCString name = vObjectName( o );
776 if ( name == VCHomeProp )
777 c.setHomeWebpage( value );
778 else if ( name == VCWorkProp )
779 c.setBusinessWebpage( value );
780 }
781 }
782 else if ( name == VCOrgProp ) {
783 VObjectIterator nit;
784 initPropIterator( &nit, o );
785 while( moreIteration( &nit ) ) {
786 VObject *o = nextVObject( &nit );
787 QCString name = vObjectName( o );
788 QString value = vObjectStringZValue( o );
789 if ( name == VCOrgNameProp )
790 c.setCompany( value );
791 else if ( name == VCOrgUnitProp )
792 c.setDepartment( value );
793 else if ( name == VCOrgUnit2Prop )
794 c.setOffice( value );
795 }
796 }
797 else if ( name == VCTitleProp ) {
798 c.setJobTitle( value );
799 }
800 else if ( name == "X-Qtopia-Profession" ) {
801 c.setProfession( value );
802 }
803 else if ( name == "X-Qtopia-Manager" ) {
804 c.setManager( value );
805 }
806 else if ( name == "X-Qtopia-Assistant" ) {
807 c.setAssistant( value );
808 }
809 else if ( name == "X-Qtopia-Spouse" ) {
810 c.setSpouse( value );
811 }
812 else if ( name == "X-Qtopia-Gender" ) {
813 c.setGender( value );
814 }
815 else if ( name == "X-Qtopia-Anniversary" ) {
816 c.setAnniversary( value );
817 }
818 else if ( name == "X-Qtopia-Nickname" ) {
819 c.setNickname( value );
820 }
821 else if ( name == "X-Qtopia-Children" ) {
822 c.setChildren( value );
823 }
824
825
826#if 0
827 else {
828 printf("Name: %s, value=%s\n", name.data(), vObjectStringZValue( o ) );
829 VObjectIterator nit;
830 initPropIterator( &nit, o );
831 while( moreIteration( &nit ) ) {
832 VObject *o = nextVObject( &nit );
833 QCString name = vObjectName( o );
834 QString value = vObjectStringZValue( o );
835 printf(" subprop: %s = %s\n", name.data(), value.latin1() );
836 }
837 }
838#endif
839 }
840 c.setFileAs();
841 return c;
842}
843
844void Contact::writeVCard( const QString &filename, const QValueList<Contact> &contacts)
845{
846 QFileDirect f( filename.utf8().data() );
847 if ( !f.open( IO_WriteOnly ) ) {
848 qWarning("Unable to open vcard write");
849 return;
850 }
851
852 QValueList<Contact>::ConstIterator it;
853 for( it = contacts.begin(); it != contacts.end(); ++it ) {
854 VObject *obj = createVObject( *it );
855 writeVObject(f.directHandle() , obj );
856 cleanVObject( obj );
857 }
858 cleanStrTbl();
859}
860
861void Contact::writeVCard( const QString &filename, const Contact &contact)
862{
863 QFileDirect f( filename.utf8().data() );
864 if ( !f.open( IO_WriteOnly ) ) {
865 qWarning("Unable to open vcard write");
866 return;
867 }
868
869 VObject *obj = createVObject( contact );
870 writeVObject( f.directHandle() , obj );
871 cleanVObject( obj );
872
873 cleanStrTbl();
874}
875
876
877QValueList<Contact> Contact::readVCard( const QString &filename )
878{
879 qDebug("trying to open %s, exists=%d", filename.utf8().data(), QFileInfo( filename.utf8().data() ).size() );
880 VObject *obj = Parse_MIME_FromFileName( (char *)filename.utf8().data() );
881
882 qDebug("vobject = %p", obj );
883
884 QValueList<Contact> contacts;
885
886 while ( obj ) {
887 contacts.append( parseVObject( obj ) );
888
889 VObject *t = obj;
890 obj = nextVObjectInList(obj);
891 cleanVObject( t );
892 }
893
894 return contacts;
895}
896
897bool Contact::match( const QRegExp &r ) const
898{
899 bool match;
900 match = false;
901 QMap<int, QString>::ConstIterator it;
902 for ( it = mMap.begin(); it != mMap.end(); ++it ) {
903 if ( (*it).find( r ) > -1 ) {
904 match = true;
905 break;
906 }
907 }
908 return match;
909}
diff --git a/library/backend/contact.h b/library/backend/contact.h
new file mode 100644
index 0000000..6abdab6
--- a/dev/null
+++ b/library/backend/contact.h
@@ -0,0 +1,217 @@
1/**********************************************************************
2** Copyright (C) 2001 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 __CONTACT_H__
22#define __CONTACT_H__
23
24#include <qpe/palmtoprecord.h>
25#include <qpe/recordfields.h>
26
27#include <qstringlist.h>
28
29#if defined(QPC_TEMPLATEDLL)
30// MOC_SKIP_BEGIN
31template class QPC_EXPORT QMap<int, QString>;
32// MOC_SKIP_END
33#endif
34
35class ContactPrivate;
36class QPC_EXPORT Contact : public Qtopia::Record
37{
38 friend class DataSet;
39public:
40 Contact();
41 Contact( const QMap<int, QString> &fromMap );
42 virtual ~Contact();
43
44 static void writeVCard( const QString &filename, const QValueList<Contact> &contacts);
45 static void writeVCard( const QString &filename, const Contact &c );
46 static QValueList<Contact> readVCard( const QString &filename );
47
48 enum journal_action { ACTION_ADD, ACTION_REMOVE, ACTION_REPLACE };
49
50 void setTitle( const QString &v ) { replace( Qtopia::Title, v ); }
51 void setFirstName( const QString &v ) { replace( Qtopia::FirstName, v ); }
52 void setMiddleName( const QString &v ) { replace( Qtopia::MiddleName, v ); }
53 void setLastName( const QString &v ) { replace( Qtopia::LastName, v ); }
54 void setSuffix( const QString &v ) { replace( Qtopia::Suffix, v ); }
55 void setFileAs( const QString &v ) { replace( Qtopia::FileAs, v ); }
56 void setFileAs();
57
58 // default email address
59 void setDefaultEmail( const QString &v ) { replace( Qtopia::DefaultEmail, v ); }
60 // the emails should be seperated by a semicolon
61 void setEmails( const QString &v );
62
63 // home
64 void setHomeStreet( const QString &v ) { replace( Qtopia::HomeStreet, v ); }
65 void setHomeCity( const QString &v ) { replace( Qtopia::HomeCity, v ); }
66 void setHomeState( const QString &v ) { replace( Qtopia::HomeState, v ); }
67 void setHomeZip( const QString &v ) { replace( Qtopia::HomeZip, v ); }
68 void setHomeCountry( const QString &v ) { replace( Qtopia::HomeCountry, v ); }
69 void setHomePhone( const QString &v ) { replace( Qtopia::HomePhone, v ); }
70 void setHomeFax( const QString &v ) { replace( Qtopia::HomeFax, v ); }
71 void setHomeMobile( const QString &v ) { replace( Qtopia::HomeMobile, v ); }
72 void setHomeWebpage( const QString &v ) { replace( Qtopia::HomeWebPage, v ); }
73
74 // business
75 void setCompany( const QString &v ) { replace( Qtopia::Company, v ); }
76 void setBusinessStreet( const QString &v ) { replace( Qtopia::BusinessStreet, v ); }
77 void setBusinessCity( const QString &v ) { replace( Qtopia::BusinessCity, v ); }
78 void setBusinessState( const QString &v ) { replace( Qtopia::BusinessState, v ); }
79 void setBusinessZip( const QString &v ) { replace( Qtopia::BusinessZip, v ); }
80 void setBusinessCountry( const QString &v ) { replace( Qtopia::BusinessCountry, v ); }
81 void setBusinessWebpage( const QString &v ) { replace( Qtopia::BusinessWebPage, v ); }
82 void setJobTitle( const QString &v ) { replace( Qtopia::JobTitle, v ); }
83 void setDepartment( const QString &v ) { replace( Qtopia::Department, v ); }
84 void setOffice( const QString &v ) { replace( Qtopia::Office, v ); }
85 void setBusinessPhone( const QString &v ) { replace( Qtopia::BusinessPhone, v ); }
86 void setBusinessFax( const QString &v ) { replace( Qtopia::BusinessFax, v ); }
87 void setBusinessMobile( const QString &v ) { replace( Qtopia::BusinessMobile, v ); }
88 void setBusinessPager( const QString &v ) { replace( Qtopia::BusinessPager, v ); }
89 void setProfession( const QString &v ) { replace( Qtopia::Profession, v ); }
90 void setAssistant( const QString &v ) { replace( Qtopia::Assistant, v ); }
91 void setManager( const QString &v ) { replace( Qtopia::Manager, v ); }
92
93 // personal
94 void setSpouse( const QString &v ) { replace( Qtopia::Spouse, v ); }
95 void setGender( const QString &v ) { replace( Qtopia::Gender, v ); }
96 void setBirthday( const QString &v ) { replace( Qtopia::Birthday, v ); }
97 void setAnniversary( const QString &v ) { replace( Qtopia::Anniversary, v ); }
98 void setNickname( const QString &v ) { replace( Qtopia::Nickname, v ); }
99 void setChildren( const QString &v );
100
101 // other
102 void setNotes( const QString &v ) { replace( Qtopia::Notes, v); }
103
104 bool match( const QRegExp &r ) const;
105
106// // custom
107// void setCustomField( const QString &key, const QString &v )
108// { replace(Custom- + key, v ); }
109
110 // name
111 QString fullName() const;
112 QString title() const { return find( Qtopia::Title ); }
113 QString firstName() const { return find( Qtopia::FirstName ); }
114 QString middleName() const { return find( Qtopia::MiddleName ); }
115 QString lastName() const { return find( Qtopia::LastName ); }
116 QString suffix() const { return find( Qtopia::Suffix ); }
117 QString fileAs() const { return find( Qtopia::FileAs ); }
118
119 // email
120 QString defaultEmail() const { return find( Qtopia::DefaultEmail ); }
121 QString emails() const { return find( Qtopia::Emails ); }
122 QStringList emailList() const;
123
124 // home
125 QString homeStreet() const { return find( Qtopia::HomeStreet ); }
126 QString homeCity() const { return find( Qtopia::HomeCity ); }
127 QString homeState() const { return find( Qtopia::HomeState ); }
128 QString homeZip() const { return find( Qtopia::HomeZip ); }
129 QString homeCountry() const { return find( Qtopia::HomeCountry ); }
130 QString homePhone() const { return find( Qtopia::HomePhone ); }
131 QString homeFax() const { return find( Qtopia::HomeFax ); }
132 QString homeMobile() const { return find( Qtopia::HomeMobile ); }
133 QString homeWebpage() const { return find( Qtopia::HomeWebPage ); }
134 /** Multi line string containing all non-empty address info in the form
135 * Street
136 * City, State Zip
137 * Country
138 */
139 QString displayHomeAddress() const;
140
141 // business
142 QString company() const { return find( Qtopia::Company ); }
143 QString businessStreet() const { return find( Qtopia::BusinessStreet ); }
144 QString businessCity() const { return find( Qtopia::BusinessCity ); }
145 QString businessState() const { return find( Qtopia::BusinessState ); }
146 QString businessZip() const { return find( Qtopia::BusinessZip ); }
147 QString businessCountry() const { return find( Qtopia::BusinessCountry ); }
148 QString businessWebpage() const { return find( Qtopia::BusinessWebPage ); }
149 QString jobTitle() const { return find( Qtopia::JobTitle ); }
150 QString department() const { return find( Qtopia::Department ); }
151 QString office() const { return find( Qtopia::Office ); }
152 QString businessPhone() const { return find( Qtopia::BusinessPhone ); }
153 QString businessFax() const { return find( Qtopia::BusinessFax ); }
154 QString businessMobile() const { return find( Qtopia::BusinessMobile ); }
155 QString businessPager() const { return find( Qtopia::BusinessPager ); }
156 QString profession() const { return find( Qtopia::Profession ); }
157 QString assistant() const { return find( Qtopia::Assistant ); }
158 QString manager() const { return find( Qtopia::Manager ); }
159 /** Multi line string containing all non-empty address info in the form
160 * Street
161 * City, State Zip
162 * Country
163 */
164 QString displayBusinessAddress() const;
165
166 //personal
167 QString spouse() const { return find( Qtopia::Spouse ); }
168 QString gender() const { return find( Qtopia::Gender ); }
169 QString birthday() const { return find( Qtopia::Birthday ); }
170 QString anniversary() const { return find( Qtopia::Anniversary ); }
171 QString nickname() const { return find( Qtopia::Nickname ); }
172 QString children() const { return find( Qtopia::Children ); }
173 QStringList childrenList() const;
174
175 // other
176 QString notes() const { return find( Qtopia::Notes ); }
177 QString groups() const { return find( Qtopia::Groups ); }
178 QStringList groupList() const;
179
180// // custom
181// const QString &customField( const QString &key )
182// { return find( Custom- + key ); }
183
184 static QStringList fields();
185 static QStringList trfields();
186
187 QString toRichText() const;
188 QMap<int, QString> toMap() const;
189 QString field( int key ) const { return find( key ); }
190
191
192 // journaling...
193 void saveJournal( journal_action action, const QString &key = QString::null );
194 void save( QString &buf ) const;
195
196 void setUid( int i )
197{ Record::setUid(i); replace( Qtopia::AddressUid , QString::number(i)); }
198
199private:
200 friend class AbTable;
201 void insert( int key, const QString &value );
202 void replace( int key, const QString &value );
203 QString find( int key ) const;
204
205 QString displayAddress( const QString &street,
206 const QString &city,
207 const QString &state,
208 const QString &zip,
209 const QString &country ) const;
210
211 Qtopia::UidGen &uidGen() { return sUidGen; }
212 static Qtopia::UidGen sUidGen;
213 QMap<int, QString> mMap;
214 ContactPrivate *d;
215};
216
217#endif
diff --git a/library/backend/event.cpp b/library/backend/event.cpp
new file mode 100644
index 0000000..50a663d
--- a/dev/null
+++ b/library/backend/event.cpp
@@ -0,0 +1,830 @@
1/**********************************************************************
2** Copyright (C) 2001 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 "event.h"
22#include "qfiledirect_p.h"
23#include <qpe/timeconversion.h>
24#include <qpe/stringutil.h>
25#include <qpe/recordfields.h>
26#include <qbuffer.h>
27#include <time.h>
28#include "vobject_p.h"
29
30#include <stdio.h>
31
32using namespace Qtopia;
33
34static void write( QString& buf, const Event::RepeatPattern &r )
35{
36 buf += " rtype=\"";
37 switch ( r.type ) {
38 case Event::Daily:
39 buf += "Daily";
40 break;
41 case Event::Weekly:
42 buf += "Weekly";
43 break;
44 case Event::MonthlyDay:
45 buf += "MonthlyDay";
46 break;
47 case Event::MonthlyDate:
48 buf += "MonthlyDate";
49 break;
50 case Event::Yearly:
51 buf += "Yearly";
52 break;
53 default:
54 buf += "NoRepeat";
55 break;
56 }
57 buf += "\"";
58 if ( r.days > 0 )
59 buf += " rweekdays=\"" + QString::number( static_cast<int>( r.days ) ) + "\"";
60 if ( r.position != 0 )
61 buf += " rposition=\"" + QString::number( r.position ) + "\"";
62
63 buf += " rfreq=\"" + QString::number( r.frequency ) + "\"";
64 buf += " rhasenddate=\"" + QString::number( static_cast<int>( r.hasEndDate ) ) + "\"";
65 if ( r.hasEndDate )
66 buf += " enddt=\""
67 + QString::number( r.endDateUTC ? r.endDateUTC : time( 0 ) )
68 + "\"";
69 buf += " created=\"" + QString::number( r.createTime ) + "\"";
70}
71
72Qtopia::UidGen Event::sUidGen( Qtopia::UidGen::Qtopia );
73
74Event::Event() : Record()
75{
76 startUTC = endUTC = time( 0 );
77 typ = Normal;
78 hAlarm = FALSE;
79 hRepeat = FALSE;
80 aMinutes = 0;
81 aSound = Silent;
82 pattern.type = NoRepeat;
83 pattern.frequency = -1;
84}
85
86Event::Event( const QMap<int, QString> &map )
87{
88 setDescription( map[DatebookDescription] );
89 setLocation( map[Location] );
90 setCategories( idsFromString( map[DatebookCategory] ) );
91 setTimeZone( map[TimeZone] );
92 setNotes( map[Note] );
93 setStart( TimeConversion::fromUTC( map[StartDateTime].toUInt() ) );
94 setEnd( TimeConversion::fromUTC( map[EndDateTime].toUInt() ) );
95 setType( (Event::Type) map[DatebookType].toInt() );
96 setAlarm( ( map[HasAlarm] == "1" ? TRUE : FALSE ), map[AlarmTime].toInt(), (Event::SoundTypeChoice)map[SoundType].toInt() );
97 Event::RepeatPattern p;
98 p.type = (Event::RepeatType) map[ RepeatPatternType ].toInt();
99 p.frequency = map[ RepeatPatternFrequency ].toInt();
100 p.position = map[ RepeatPatternPosition ].toInt();
101 p.days = map[ RepeatPatternDays ].toInt();
102 p.hasEndDate = map[ RepeatPatternHasEndDate ].toInt();
103 p.endDateUTC = map[ RepeatPatternEndDate ].toUInt();
104 setRepeat( p );
105
106 setUid( map[ DatebookUid ].toInt() );
107}
108
109Event::~Event()
110{
111}
112
113int Event::week( const QDate& date )
114{
115 // Calculates the week this date is in within that
116 // month. Equals the "row" is is in in the month view
117 int week = 1;
118 QDate tmp( date.year(), date.month(), 1 );
119
120 if ( date.dayOfWeek() < tmp.dayOfWeek() )
121 ++week;
122
123 week += ( date.day() - 1 ) / 7;
124 return week;
125}
126
127int Event::occurrence( const QDate& date )
128{
129 // calculates the number of occurrances of this day of the
130 // week till the given date (e.g 3rd Wednesday of the month)
131 return ( date.day() - 1 ) / 7 + 1;
132}
133
134int Event::dayOfWeek( char day )
135{
136 int dayOfWeek = 1;
137 char i = Event::MON;
138 while ( !( i & day ) && i <= Event::SUN ) {
139 i <<= 1;
140 ++dayOfWeek;
141 }
142 return dayOfWeek;
143}
144
145int Event::monthDiff( const QDate& first, const QDate& second )
146{
147 return ( second.year() - first.year() ) * 12 +
148 second.month() - first.month();
149}
150
151QMap<int, QString> Event::toMap() const
152{
153 QMap<int, QString> m;
154 m.insert( DatebookDescription, description() );
155 m.insert ( Location, location() );
156 m.insert ( DatebookCategory, idsToString( categories() ) );
157 m.insert ( TimeZone, timeZone() );
158 m.insert ( Note, notes() );
159 m.insert ( StartDateTime, QString::number( TimeConversion::toUTC( start() ) ) );
160 m.insert ( EndDateTime, QString::number( TimeConversion::toUTC( end() ) ) );
161 m.insert ( DatebookType, QString::number( (int)type() ) );
162 m.insert ( HasAlarm, ( hasAlarm() ? "1" : "0" ) );
163 m.insert ( SoundType, QString::number( (int)alarmSound() ) );
164 m.insert ( AlarmTime, QString::number( alarmTime() ) );
165 m.insert ( RepeatPatternType, QString::number( static_cast<int>( repeatPattern().type ) ) );
166 m.insert ( RepeatPatternFrequency, QString::number( repeatPattern().frequency ) );
167 m.insert ( RepeatPatternPosition, QString::number( repeatPattern().position ) );
168 m.insert ( RepeatPatternDays, QString::number( repeatPattern().days ) );
169 m.insert ( RepeatPatternHasEndDate, QString::number( static_cast<int>( repeatPattern().hasEndDate ) ) );
170 m.insert ( RepeatPatternEndDate, QString::number( repeatPattern().endDateUTC ) );
171
172 m.insert( DatebookUid, QString::number( uid()) );
173
174 return m;
175}
176
177void Event::setRepeat( const RepeatPattern &p )
178{
179 setRepeat( p.type != NoRepeat, p );
180}
181
182void Event::setDescription( const QString &s )
183{
184 descript = s;
185}
186
187void Event::setLocation( const QString &s )
188{
189 locat = s;
190}
191
192// void Event::setCategory( const QString &s )
193// {
194// categ = s;
195// }
196
197void Event::setType( Type t )
198{
199 typ = t;
200}
201
202void Event::setStart( const QDateTime &d )
203{
204 startUTC = TimeConversion::toUTC( d );
205}
206
207void Event::setStart( time_t time )
208{
209 startUTC = time;
210}
211
212void Event::setEnd( const QDateTime &d )
213{
214 endUTC = TimeConversion::toUTC( d );
215}
216
217void Event::setEnd( time_t time )
218{
219 endUTC = time;
220}
221
222void Event::setTimeZone( const QString &z )
223{
224 tz = z;
225}
226
227void Event::setAlarm( bool b, int minutes, SoundTypeChoice s )
228{
229 hAlarm = b;
230 aMinutes = minutes;
231 aSound = s;
232}
233
234void Event::setRepeat( bool b, const RepeatPattern &p )
235{
236 hRepeat = b;
237 pattern = p;
238}
239
240void Event::setNotes( const QString &n )
241{
242 note = n;
243}
244
245const QString &Event::description() const
246{
247 return descript;
248}
249
250const QString &Event::location() const
251{
252 return locat;
253}
254
255// QString Event::category() const
256// {
257// return categ;
258// }
259
260Event::Type Event::type() const
261{
262 return typ;
263}
264
265QDateTime Event::start( bool actual ) const
266{
267 QDateTime dt = (startUTC > 0) ? TimeConversion::fromUTC( startUTC ) : QDateTime::currentDateTime();
268
269 if ( actual && typ == AllDay ) {
270 QTime t = dt.time();
271 t.setHMS( 0, 0, 0 );
272 dt.setTime( t );
273 }
274 return dt;
275}
276
277QDateTime Event::end( bool actual ) const
278{
279 QDateTime dt = (endUTC > 0) ? TimeConversion::fromUTC( endUTC ) : QDateTime::currentDateTime();
280
281 if ( actual && typ == AllDay ) {
282 QTime t = dt.time();
283 t.setHMS( 23, 59, 59 );
284 dt.setTime( t );
285 }
286 return dt;
287}
288
289const QString &Event::timeZone() const
290{
291 return tz;
292}
293
294bool Event::hasAlarm() const
295{
296 return hAlarm;
297}
298
299int Event::alarmTime() const
300{
301 return aMinutes;
302}
303
304Event::SoundTypeChoice Event::alarmSound() const
305{
306 return aSound;
307}
308
309bool Event::hasRepeat() const
310{
311 return doRepeat();
312}
313
314const Event::RepeatPattern &Event::repeatPattern() const
315{
316 return pattern;
317}
318
319Event::RepeatPattern &Event::repeatPattern()
320{
321 return pattern;
322}
323
324const QString &Event::notes() const
325{
326 return note;
327}
328
329bool Event::operator==( const Event &e ) const
330{
331 return ( e.descript == descript &&
332 e.locat == locat &&
333 e.categ == categ &&
334 e.typ == typ &&
335 e.startUTC == startUTC &&
336 e.endUTC == endUTC &&
337 e.tz == tz &&
338 e.hAlarm == hAlarm &&
339 e.aMinutes == aMinutes &&
340 e.aSound == aSound &&
341 e.hRepeat == hRepeat &&
342 e.pattern == pattern &&
343 e.note == note );
344}
345
346void Event::save( QString& buf )
347{
348 buf += " description=\"" + Qtopia::escapeString(descript) + "\"";
349 if ( !locat.isEmpty() )
350 buf += " location=\"" + Qtopia::escapeString(locat) + "\"";
351 // save the categoies differently....
352 QString strCats = idsToString( categories() );
353 buf += " categories=\"" + Qtopia::escapeString(strCats) + "\"";
354 buf += " uid=\"" + QString::number( uid() ) + "\"";
355 if ( (Type)typ != Normal )
356 buf += " type=\"AllDay\"";
357 if ( hAlarm ) {
358 buf += " alarm=\"" + QString::number( aMinutes ) + "\" sound=\"";
359 if ( aSound == Event::Loud )
360 buf += "loud";
361 else
362 buf += "silent";
363 buf += "\"";
364 }
365 if ( hRepeat )
366 write( buf, pattern );
367
368 buf += " start=\""
369 + QString::number( startUTC )
370 + "\"";
371
372 buf += " end=\""
373 + QString::number( endUTC )
374 + "\"";
375
376 if ( !note.isEmpty() )
377 buf += " note=\"" + Qtopia::escapeString( note ) + "\"";
378 buf += customToXml();
379}
380
381bool Event::RepeatPattern::operator==( const Event::RepeatPattern &right ) const
382{
383 // *sigh*
384 return ( type == right.type
385 && frequency == right.frequency
386 && position == right.position
387 && days == right.days
388 && hasEndDate == right.hasEndDate
389 && endDateUTC == right.endDateUTC
390 && createTime == right.createTime );
391}
392
393
394class EffectiveEventPrivate
395{
396public:
397 //currently the existence of the d pointer means multi-day repeating,
398 //msut be changed if we use the d pointer for anything else.
399 QDate startDate;
400 QDate endDate;
401};
402
403
404EffectiveEvent::EffectiveEvent()
405{
406 mDate = QDate::currentDate();
407 mStart = mEnd = QTime::currentTime();
408 d = 0;
409}
410
411EffectiveEvent::EffectiveEvent( const Event &e, const QDate &date, Position pos )
412{
413 mEvent = e;
414 mDate = date;
415 if ( pos & Start )
416 mStart = e.start( TRUE ).time();
417 else
418 mStart = QTime( 0, 0, 0 );
419
420 if ( pos & End )
421 mEnd = e.end( TRUE ).time();
422 else
423 mEnd = QTime( 23, 59, 59 );
424 d = 0;
425}
426
427EffectiveEvent::~EffectiveEvent()
428{
429 delete d;
430}
431
432EffectiveEvent::EffectiveEvent( const EffectiveEvent &e )
433{
434 d = 0;
435 *this = e;
436}
437
438EffectiveEvent& EffectiveEvent::operator=( const EffectiveEvent & e )
439{
440 if ( &e == this )
441 return *this;
442 delete d;
443 if ( e.d ) {
444 d = new EffectiveEventPrivate;
445 d->startDate = e.d->startDate;
446 d->endDate = e.d->endDate;
447 } else {
448 d = 0;
449 }
450 mEvent = e.mEvent;
451 mDate = e.mDate;
452 mStart = e.mStart;
453 mEnd = e.mEnd;
454
455 return *this;
456
457}
458
459// QString EffectiveEvent::category() const
460// {
461// return mEvent.category();
462// }
463
464const QString &EffectiveEvent::description( ) const
465{
466 return mEvent.description();
467}
468
469const QString &EffectiveEvent::location( ) const
470{
471 return mEvent.location();
472}
473
474const QString &EffectiveEvent::notes() const
475{
476 return mEvent.notes();
477}
478
479const Event &EffectiveEvent::event() const
480{
481 return mEvent;
482}
483
484const QTime &EffectiveEvent::end() const
485{
486 return mEnd;
487}
488
489const QTime &EffectiveEvent::start() const
490{
491 return mStart;
492}
493
494const QDate &EffectiveEvent::date() const
495{
496 return mDate;
497}
498
499int EffectiveEvent::length() const
500{
501 return (mEnd.hour() * 60 - mStart.hour() * 60)
502 + QABS(mStart.minute() - mEnd.minute() );
503}
504
505void EffectiveEvent::setDate( const QDate &dt )
506{
507 mDate = dt;
508}
509
510void EffectiveEvent::setStart( const QTime &start )
511{
512 mStart = start;
513}
514
515void EffectiveEvent::setEnd( const QTime &end )
516{
517 mEnd = end;
518}
519
520void EffectiveEvent::setEvent( Event e )
521{
522 mEvent = e;
523}
524
525bool EffectiveEvent::operator<( const EffectiveEvent &e ) const
526{
527 if ( mDate < e.date() )
528 return TRUE;
529 if ( mDate == e.date() )
530 return ( mStart < e.start() );
531 else
532 return FALSE;
533}
534
535bool EffectiveEvent::operator<=( const EffectiveEvent &e ) const
536{
537 return (mDate <= e.date() );
538}
539
540bool EffectiveEvent::operator==( const EffectiveEvent &e ) const
541{
542 return ( mDate == e.date()
543 && mStart == e.start()
544 && mEnd == e.end()
545 && mEvent == e.event() );
546}
547
548bool EffectiveEvent::operator!=( const EffectiveEvent &e ) const
549{
550 return !(*this == e);
551}
552
553bool EffectiveEvent::operator>( const EffectiveEvent &e ) const
554{
555 return !(*this <= e );
556}
557
558bool EffectiveEvent::operator>=(const EffectiveEvent &e) const
559{
560 return !(*this < e);
561}
562
563void EffectiveEvent::setEffectiveDates( const QDate &from, const QDate &to )
564{
565 if ( !from.isValid() ) {
566 delete d;
567 d = 0;
568 return;
569 }
570 if ( !d )
571 d = new EffectiveEventPrivate;
572 d->startDate = from;
573 d->endDate = to;
574}
575
576QDate EffectiveEvent::startDate() const
577{
578 if ( d )
579 return d->startDate;
580 else if ( mEvent.hasRepeat() )
581 return mDate; // single day, since multi-day should have a d pointer
582 else
583 return mEvent.start().date();
584}
585
586QDate EffectiveEvent::endDate() const
587{
588 if ( d )
589 return d->endDate;
590 else if ( mEvent.hasRepeat() )
591 return mDate; // single day, since multi-day should have a d pointer
592 else
593 return mEvent.end().date();
594}
595
596int EffectiveEvent::size() const
597{
598 return ( mEnd.hour() - mStart.hour() ) * 3600
599 + (mEnd.minute() - mStart.minute() * 60
600 + mEnd.second() - mStart.second() );
601}
602
603
604// vcal conversion code
605static inline VObject *safeAddPropValue( VObject *o, const char *prop, const QString &value )
606{
607 VObject *ret = 0;
608 if ( o && !value.isEmpty() )
609 ret = addPropValue( o, prop, value.latin1() );
610 return ret;
611}
612
613static inline VObject *safeAddProp( VObject *o, const char *prop)
614{
615 VObject *ret = 0;
616 if ( o )
617 ret = addProp( o, prop );
618 return ret;
619}
620
621static VObject *createVObject( const Event &e )
622{
623 VObject *vcal = newVObject( VCCalProp );
624 safeAddPropValue( vcal, VCVersionProp, "1.0" );
625 VObject *event = safeAddProp( vcal, VCEventProp );
626
627 safeAddPropValue( event, VCDTstartProp, TimeConversion::toISO8601( e.start() ) );
628 safeAddPropValue( event, VCDTendProp, TimeConversion::toISO8601( e.end() ) );
629 safeAddPropValue( event, "X-Qtopia-NOTES", e.description() );
630 safeAddPropValue( event, VCDescriptionProp, e.description() );
631 safeAddPropValue( event, VCLocationProp, e.location() );
632
633 if ( e.hasAlarm() ) {
634 VObject *alarm = safeAddProp( event, VCAAlarmProp );
635 QDateTime dt = e.start();
636 dt = dt.addSecs( -e.alarmTime()*60 );
637 safeAddPropValue( alarm, VCRunTimeProp, TimeConversion::toISO8601( dt ) );
638 safeAddPropValue( alarm, VCAudioContentProp,
639 (e.alarmSound() == Event::Silent ? "silent" : "alarm" ) );
640 }
641
642 safeAddPropValue( event, "X-Qtopia-TIMEZONE", e.timeZone() );
643
644 if ( e.type() == Event::AllDay )
645 safeAddPropValue( event, "X-Qtopia-AllDay", e.timeZone() );
646
647 // ### repeat missing
648
649 // ### categories missing
650
651 return vcal;
652}
653
654
655static Event parseVObject( VObject *obj )
656{
657 Event e;
658
659 bool haveAlarm = FALSE;
660 bool haveStart = FALSE;
661 bool haveEnd = FALSE;
662 QDateTime alarmTime;
663 Event::SoundTypeChoice soundType = Event::Silent;
664
665 VObjectIterator it;
666 initPropIterator( &it, obj );
667 while( moreIteration( &it ) ) {
668 VObject *o = nextVObject( &it );
669 QCString name = vObjectName( o );
670 QCString value = vObjectStringZValue( o );
671 if ( name == VCDTstartProp ) {
672 e.setStart( TimeConversion::fromISO8601( value ) );
673 haveStart = TRUE;
674 }
675 else if ( name == VCDTendProp ) {
676 e.setEnd( TimeConversion::fromISO8601( value ) );
677 haveEnd = TRUE;
678 }
679 else if ( name == "X-Qtopia-NOTES" ) {
680 e.setNotes( value );
681 }
682 else if ( name == VCDescriptionProp ) {
683 e.setDescription( value );
684 }
685 else if ( name == VCLocationProp ) {
686 e.setLocation( value );
687 }
688 else if ( name == VCAudioContentProp ) {
689 haveAlarm = TRUE;
690 VObjectIterator nit;
691 initPropIterator( &nit, o );
692 while( moreIteration( &nit ) ) {
693 VObject *o = nextVObject( &nit );
694 QCString name = vObjectName( o );
695 QCString value = vObjectStringZValue( o );
696 if ( name == VCRunTimeProp )
697 alarmTime = TimeConversion::fromISO8601( value );
698 else if ( name == VCAudioContentProp ) {
699 if ( value == "silent" )
700 soundType = Event::Silent;
701 else
702 soundType = Event::Loud;
703 }
704 }
705 }
706 else if ( name == "X-Qtopia-TIMEZONE") {
707 e.setTimeZone( value );
708 }
709 else if ( name == "X-Qtopia-AllDay" ) {
710 e.setType( Event::AllDay );
711 }
712#if 0
713 else {
714 printf("Name: %s, value=%s\n", name.data(), vObjectStringZValue( o ) );
715 VObjectIterator nit;
716 initPropIterator( &nit, o );
717 while( moreIteration( &nit ) ) {
718 VObject *o = nextVObject( &nit );
719 QCString name = vObjectName( o );
720 QString value = vObjectStringZValue( o );
721 printf(" subprop: %s = %s\n", name.data(), value.latin1() );
722 }
723 }
724#endif
725 }
726
727 if ( !haveStart && !haveEnd )
728 e.setStart( QDateTime::currentDateTime() );
729
730 if ( !haveEnd ) {
731 e.setType( Event::AllDay );
732 e.setEnd( e.start() );
733 }
734
735 if ( haveAlarm ) {
736 int minutes = alarmTime.secsTo( e.start() ) / 60;
737 e.setAlarm( TRUE, minutes, soundType );
738 }
739 return e;
740}
741
742
743
744void Event::writeVCalendar( const QString &filename, const QValueList<Event> &events)
745{
746 QFileDirect f( filename.utf8().data() );
747 if ( !f.open( IO_WriteOnly ) ) {
748 qWarning("Unable to open vcard write");
749 return;
750 }
751
752 QValueList<Event>::ConstIterator it;
753 for( it = events.begin(); it != events.end(); ++it ) {
754 VObject *obj = createVObject( *it );
755 writeVObject( f.directHandle() , obj );
756 cleanVObject( obj );
757 }
758
759 cleanStrTbl();
760}
761
762void Event::writeVCalendar( const QString &filename, const Event &event)
763{
764 QFileDirect f( filename.utf8().data() );
765 if ( !f.open( IO_WriteOnly ) ) {
766 qWarning("Unable to open vcard write");
767 return;
768 }
769
770 VObject *obj = createVObject( event );
771 writeVObject( f.directHandle() , obj );
772 cleanVObject( obj );
773
774 cleanStrTbl();
775}
776
777
778QValueList<Event> Event::readVCalendar( const QString &filename )
779{
780 VObject *obj = Parse_MIME_FromFileName( (char *)filename.utf8().data() );
781
782 QValueList<Event> events;
783
784 while ( obj ) {
785 QCString name = vObjectName( obj );
786 if ( name == VCCalProp ) {
787 VObjectIterator nit;
788 initPropIterator( &nit, obj );
789 while( moreIteration( &nit ) ) {
790 VObject *o = nextVObject( &nit );
791 QCString name = vObjectName( o );
792 if ( name == VCEventProp )
793 events.append( parseVObject( o ) );
794 }
795 } else if ( name == VCEventProp ) {
796 // shouldn't happen, but just to be sure
797 events.append( parseVObject( obj ) );
798 }
799 VObject *t = obj;
800 obj = nextVObjectInList(obj);
801 cleanVObject( t );
802 }
803
804 return events;
805}
806
807bool Event::match( const QRegExp &r ) const
808{
809 bool returnMe;
810 returnMe = false;
811
812 if ( descript.find( r ) > -1 )
813 returnMe = true;
814 else if ( locat.find( r ) > -1 )
815 returnMe = true;
816 else if ( TimeConversion::fromUTC( startUTC ).toString().find( r ) > -1 )
817 returnMe = true;
818 else if ( TimeConversion::fromUTC( endUTC ).toString().find( r ) > -1 )
819 returnMe = true;
820 else if ( tz.find( r ) > -1 )
821 returnMe = true;
822 else if ( note.find( r ) > -1 )
823 returnMe = true;
824 else if ( doRepeat() ) {
825 if ( pattern.hasEndDate )
826 if ( TimeConversion::fromUTC( pattern.endDateUTC ).toString().find(r) > -1 )
827 returnMe = true;
828 }
829 return returnMe;
830}
diff --git a/library/backend/event.h b/library/backend/event.h
new file mode 100644
index 0000000..0ebe9ea
--- a/dev/null
+++ b/library/backend/event.h
@@ -0,0 +1,229 @@
1/**********************************************************************
2** Copyright (C) 2001 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 __EVENT_H__
22#define __EVENT_H__
23
24#include <qdatetime.h>
25#include <qvaluelist.h>
26
27#ifdef PALMTOPCENTER
28#include <qpc/qsorter.h>
29#endif
30#include <qpe/palmtoprecord.h>
31
32#include <qpe/timeconversion.h>
33
34class EventPrivate;
35class QPC_EXPORT Event : public Qtopia::Record
36{
37public:
38 enum RepeatType { NoRepeat = -1, Daily, Weekly, MonthlyDay,
39 MonthlyDate, Yearly };
40 enum Days { MON = 0x01, TUE = 0x02, WED = 0x04, THU = 0x08,
41 FRI = 0x10, SAT = 0x20, SUN = 0x40 };
42 struct QPC_EXPORT RepeatPattern
43 {
44 RepeatPattern() {
45 type = NoRepeat; frequency = -1; days = 0; position = 0; createTime = -1;
46 hasEndDate = FALSE; endDateUTC = 0; }
47 bool operator ==( const RepeatPattern &right ) const;
48
49 RepeatType type;
50 int frequency;
51 int position;// the posistion in the month (e.g. the first sunday, etc) positive, count from the front negative count from the end...
52 char days; // a mask for days OR in your days!
53 bool hasEndDate;
54 QDate endDate() const { return TimeConversion::fromUTC( endDateUTC ).date(); }
55 void setEndDate( const QDate &dt ) { endDateUTC = TimeConversion::toUTC( dt ); }
56 time_t endDateUTC;
57 time_t createTime;
58 };
59
60 Event();
61 Event( const QMap<int, QString > & map );
62 virtual ~Event();
63
64 QMap<int, QString> toMap() const;
65
66 static void writeVCalendar( const QString &filename, const QValueList<Event> &events);
67 static void writeVCalendar( const QString &filename, const Event &event);
68 static QValueList<Event> readVCalendar( const QString &filename );
69
70 enum Type { Normal, AllDay };
71 enum SoundTypeChoice { Silent, Loud };
72
73 bool operator<( const Event &e1) const { return start() < e1.start(); };
74 bool operator<=( const Event &e1 ) const { return start() <= e1.start(); };
75 bool operator!=( const Event &e1 ) const { return !( *this == e1 ); };
76 bool operator>( const Event &e1 ) const { return start() > e1.start(); };
77 bool operator>=(const Event &e1 ) const { return start() >= e1.start(); };
78 bool operator==( const Event &e ) const;
79
80 void setDescription( const QString &s );
81 const QString &description() const;
82
83 void setLocation( const QString &s );
84 const QString &location() const;
85
86 void setType( Type t );
87 Type type() const;
88 void setStart( const QDateTime &d );
89 void setStart( time_t time );
90 QDateTime start( bool actual = FALSE ) const;
91 time_t startTime() const { return startUTC; }
92 void setEnd( const QDateTime &e );
93 void setEnd( time_t time );
94 QDateTime end( bool actual = FALSE ) const;
95 time_t endTime() const { return endUTC; }
96 void setTimeZone( const QString & );
97 const QString &timeZone() const;
98 void setAlarm( bool b, int minutes, SoundTypeChoice );
99 bool hasAlarm() const;
100 int alarmTime() const;
101 SoundTypeChoice alarmSound() const;
102 void setRepeat( bool b, const RepeatPattern &p );
103 void setRepeat( const RepeatPattern &p );
104 bool hasRepeat() const;
105 const RepeatPattern &repeatPattern() const;
106 RepeatPattern &repeatPattern();
107 void setNotes( const QString &n );
108 const QString &notes() const;
109 bool doRepeat() const { return pattern.type != NoRepeat; }
110
111 void save( QString& buf );
112 //void load( Node *n );
113
114 // helper function to calculate the week of the given date
115 static int week( const QDate& date );
116 // calculates the number of occurrences of the week day of
117 // the given date from the start of the month
118 static int occurrence( const QDate& date );
119 // returns a proper days-char for a given dayOfWeek()
120 static char day( int dayOfWeek ) { return 1 << ( dayOfWeek - 1 ); }
121 // returns the dayOfWeek for the *first* day it finds (ignores
122 // any further days!). Returns 1 (Monday) if there isn't any day found
123 static int dayOfWeek( char day );
124 // returns the difference of months from first to second.
125 static int monthDiff( const QDate& first, const QDate& second );
126 bool match( const QRegExp &r ) const;
127
128private:
129 Qtopia::UidGen &uidGen() { return sUidGen; }
130 static Qtopia::UidGen sUidGen;
131
132 QString descript, locat, categ;
133 Type typ : 4;
134 bool startTimeDirty : 1;
135 bool endTimeDirty : 1;
136 time_t startUTC, endUTC;
137 QString tz;
138 bool hAlarm, hRepeat;
139 int aMinutes;
140 SoundTypeChoice aSound;
141 RepeatPattern pattern;
142 QString note;
143 EventPrivate *d;
144};
145
146// Since an event spans multiple day, it is better to have this
147// class to represent a day instead of creating many
148// dummy events...
149
150class EffectiveEventPrivate;
151class QPC_EXPORT EffectiveEvent
152{
153public:
154 // If we calculate the effective event of a multi-day event
155 // we have to figure out whether we are at the first day,
156 // at the end, or anywhere else ("middle"). This is important
157 // for the start/end times (00:00/23:59)
158 // MidWay: 00:00 -> 23:59, as we are "in the middle" of a multi-
159 // day event
160 // Start: start time -> 23:59
161 // End: 00:00 -> end time
162 // Start | End == StartEnd: for single-day events (default)
163 // here we draw start time -> end time
164 enum Position { MidWay = 0, Start = 1, End = 2, StartEnd = 3 };
165
166 EffectiveEvent();
167 EffectiveEvent( const Event &event, const QDate &startDate, Position pos = StartEnd );
168 EffectiveEvent( const EffectiveEvent & );
169 EffectiveEvent& operator=( const EffectiveEvent & );
170 ~EffectiveEvent();
171
172
173 bool operator<( const EffectiveEvent &e ) const;
174 bool operator<=( const EffectiveEvent &e ) const;
175 bool operator==( const EffectiveEvent &e ) const;
176 bool operator!=( const EffectiveEvent &e ) const;
177 bool operator>( const EffectiveEvent &e ) const;
178 bool operator>= ( const EffectiveEvent &e ) const;
179
180 void setStart( const QTime &start );
181 void setEnd( const QTime &end );
182 void setEvent( Event e );
183 void setDate( const QDate &date );
184 void setEffectiveDates( const QDate &from, const QDate &to );
185
186 // QString category() const;
187 const QString &description() const;
188 const QString &location() const;
189 const QString &notes() const;
190 const Event &event() const;
191 const QTime &start() const;
192 const QTime &end() const;
193 const QDate &date() const;
194 int length() const;
195 int size() const;
196
197 QDate startDate() const;
198 QDate endDate() const;
199
200private:
201 class EffectiveEventPrivate *d;
202 Event mEvent;
203 QDate mDate;
204 QTime mStart,
205 mEnd;
206
207};
208
209#ifdef PALMTOPCENTER
210class QPC_EXPORT EffectiveEventSizeSorter : public QSorter<EffectiveEvent>
211{
212public:
213 int compare( const EffectiveEvent& a, const EffectiveEvent& b ) const
214 {
215 return a.size() - b.size();
216 }
217};
218
219class QPC_EXPORT EffectiveEventTimeSorter : public QSorter<EffectiveEvent>
220{
221public:
222 int compare( const EffectiveEvent& a, const EffectiveEvent& b ) const
223 {
224 return a.start().secsTo( b.start() );
225 }
226};
227#endif
228
229#endif
diff --git a/library/backend/palmtoprecord.cpp b/library/backend/palmtoprecord.cpp
new file mode 100644
index 0000000..0d57699
--- a/dev/null
+++ b/library/backend/palmtoprecord.cpp
@@ -0,0 +1,127 @@
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#include "palmtoprecord.h"
22#include "stringutil.h"
23#include <qstringlist.h>
24
25namespace Qtopia {
26
27Record &Record::operator=( const Record &c )
28{
29 mUid = c.mUid;
30 mCats = c.mCats;
31 customMap = c.customMap;
32 return *this;
33}
34
35void Record::setCategories( int single )
36{
37 if ( single == 0 )
38 return;
39 mCats.resize(1);
40 mCats[0] = single;
41}
42
43// convenience methods provided for loading and saving to xml
44QString Record::idsToString( const QArray<int> &cats )
45{
46 QString str;
47 for ( uint i = 0; i < cats.size(); i++ )
48 if ( i == 0 )
49 str = QString::number( cats[int(i)] );
50 else
51 str += ";" + QString::number( cats[int(i)] );
52
53 return str;
54}
55
56// convenience methods provided for loading and saving to xml
57QArray<int> Record::idsFromString( const QString &str )
58{
59 QStringList catStrs = QStringList::split( ";", str );
60 QArray<int> cats( catStrs.count() );
61 uint i = 0;
62 for ( QStringList::ConstIterator it = catStrs.begin();
63 it != catStrs.end(); ++it ) {
64 cats[int(i)] = (*it).toInt();
65 i++;
66 }
67 return cats;
68}
69
70/*!
71 Returns the string stored for the custom field \a key.
72 Returns a null string if the field does not exist.
73 */
74QString Record::customField( const QString &key) const
75{
76 if (customMap.contains(key))
77 return customMap[key];
78
79 return QString::null;
80}
81
82/*!
83 Sets the string stored for the custom field \a key to \a value.
84 */
85void Record::setCustomField( const QString &key, const QString &value)
86{
87 qWarning("setting custom " + key + " to " + value);
88 if (customMap.contains(key))
89 customMap.replace(key, value);
90 else
91 customMap.insert(key, value);
92
93 qWarning(QString("custom size %1").arg(customMap.count()));
94}
95
96/*!
97 Removes the custom field \a key.
98 */
99void Record::removeCustomField(const QString &key)
100{
101 customMap.remove(key);
102}
103
104QString Record::customToXml() const
105{
106 //qWarning(QString("writing custom %1").arg(customMap.count()));
107 QString buf(" ");
108 for ( QMap<QString, QString>::ConstIterator cit = customMap.begin();
109 cit != customMap.end(); ++cit) {
110 qWarning(".ITEM.");
111 buf += cit.key();
112 buf += "=\"";
113 buf += escapeString(cit.data());
114 buf += "\" ";
115 }
116 return buf;
117}
118
119void Record::dump( const QMap<int, QString> &map )
120{
121 QMap<int, QString>::ConstIterator it;
122 for( it = map.begin(); it != map.end(); ++it )
123 qDebug("%d : %s", it.key(), it.data().local8Bit().data() );
124}
125
126}
127
diff --git a/library/backend/palmtoprecord.h b/library/backend/palmtoprecord.h
new file mode 100644
index 0000000..0372011
--- a/dev/null
+++ b/library/backend/palmtoprecord.h
@@ -0,0 +1,94 @@
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#ifndef QTPALMTOP_RECORD_H
23#define QTPALMTOP_RECORD_H
24
25#include <qglobal.h>
26#include "qpcglobal.h"
27#include "palmtopuidgen.h"
28#include <qarray.h>
29#include <qmap.h>
30
31#if defined(QPC_TEMPLATEDLL)
32// MOC_SKIP_BEGIN
33template class QPC_EXPORT QMap<QString, QString>;
34// MOC_SKIP_END
35#endif
36
37class QRegExp;
38namespace Qtopia {
39
40class RecordPrivate;
41class QPC_EXPORT Record
42{
43public:
44 Record() : mUid(0), mCats() { }
45 Record( const Record &c ) :mUid( c.mUid ), mCats ( c.mCats ), customMap(c.customMap) { }
46 virtual ~Record() { }
47
48 Record &operator=( const Record &c );
49
50 virtual bool match( const QRegExp & ) const { return FALSE; }
51
52 void setCategories( const QArray<int> &v ) { mCats = v; }
53 void setCategories( int single );
54 const QArray<int> &categories() const { return mCats; }
55
56 int uid() const { return mUid; };
57 virtual void setUid( int i ) { mUid = i; uidGen().store( mUid ); }
58 bool isValidUid() const { return mUid != 0; }
59 void assignUid() { setUid( uidGen().generate() ); }
60
61 virtual QString customField(const QString &) const;
62 virtual void setCustomField(const QString &, const QString &);
63 virtual void removeCustomField(const QString &);
64
65 virtual bool operator == ( const Record &r ) const
66{ return mUid == r.mUid; }
67 virtual bool operator != ( const Record &r ) const
68{ return mUid != r.mUid; }
69
70 // convenience methods provided for loading and saving to xml
71 static QString idsToString( const QArray<int> &ids );
72 // convenience methods provided for loading and saving to xml
73 static QArray<int> idsFromString( const QString &str );
74
75 // for debugging
76 static void dump( const QMap<int, QString> &map );
77
78protected:
79 virtual UidGen &uidGen() = 0;
80
81 virtual QString customToXml() const;
82
83private:
84 int mUid;
85 QArray<int> mCats;
86
87 QMap<QString, QString> customMap;
88
89 RecordPrivate *d;
90};
91
92}
93
94#endif
diff --git a/library/backend/palmtopuidgen.h b/library/backend/palmtopuidgen.h
new file mode 100644
index 0000000..1a16681
--- a/dev/null
+++ b/library/backend/palmtopuidgen.h
@@ -0,0 +1,83 @@
1#ifndef QTPALMTOP_UIDGEN_H
2#define QTPALMTOP_UIDGEN_H
3/**********************************************************************
4** Copyright (C) 2000 Trolltech AS. All rights reserved.
5**
6** This file is part of Qtopia Environment.
7**
8** Licensees holding valid Qtopia Developer license may use this
9** file in accordance with the Qtopia Developer License Agreement
10** provided with the Software.
11**
12** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING
13** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14** PURPOSE.
15**
16** email sales@trolltech.com for information about Qtopia License
17** Agreements.
18**
19** Contact info@trolltech.com if any conditions of this licensing are
20** not clear to you.
21**
22**********************************************************************/
23
24#include <time.h>
25#include <qmap.h>
26#include "qpcglobal.h"
27
28#if defined(QPC_TEMPLATEDLL)
29// MOC_SKIP_BEGIN
30template class QPC_EXPORT QMap< int, bool >;
31// MOC_SKIP_END
32#endif
33
34namespace Qtopia {
35
36
37class QPC_EXPORT UidGen
38{
39public:
40 enum Type { Qtopia, PalmtopCenter };
41
42 UidGen() : type( Qtopia ), sign( -1 ), ids()
43{
44#ifdef PALMTOPCENTER
45 type = PalmtopCenter;
46 sign = 1;
47#endif
48}
49 UidGen( Type t ) : type(t), sign(1), ids()
50{
51 if ( t == Qtopia )
52 sign = -1;
53}
54
55 virtual ~UidGen() { }
56
57 int generate() const
58{
59 int id = sign * (int) ::time(NULL);
60 while ( ids.contains( id ) ) {
61 id += sign;
62
63 // check for overflow cases; if so, wrap back to beginning of
64 // set ( -1 or 1 )
65 if ( sign == -1 && id > 0 || sign == 1 && id < 0 )
66 id = sign;
67 }
68 return id;
69}
70
71 void store(int id) { ids.insert(id, TRUE); }
72 bool isUnique(int id) const { return (!ids.contains(id)); }
73
74private:
75 Type type;
76 int sign;
77 QMap<int, bool> ids;
78
79};
80
81}
82
83#endif
diff --git a/library/backend/qfiledirect_p.h b/library/backend/qfiledirect_p.h
new file mode 100644
index 0000000..fc29ac5
--- a/dev/null
+++ b/library/backend/qfiledirect_p.h
@@ -0,0 +1,36 @@
1/**********************************************************************
2** Copyright (C) 2001 Trolltech AS. All rights reserved.
3**
4** This file is part of the Qtopia Environment.
5**
6** Licensees holding valid Qtopia Developer license may use this
7** file in accordance with the Qtopia Developer License Agreement
8** provided with the Software.
9**
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
12** PURPOSE.
13**
14** email sales@trolltech.com for information about Qtopia License
15** Agreements.
16**
17** Contact info@trolltech.com if any conditions of this licensing are
18** not clear to you.
19**
20**********************************************************************/
21
22#ifndef QFILE_DIRECT_H
23#define QFILE_DIRECT_H
24#include <qfile.h>
25#include <qpe/qpcglobal.h>
26
27class QPC_EXPORT QFileDirect : public QFile
28{
29public:
30 QFileDirect() : QFile() { }
31 QFileDirect( const QString &name ) : QFile(name) { }
32
33 FILE *directHandle() { return fh; }
34};
35
36#endif \ No newline at end of file
diff --git a/library/backend/qpcglobal.h b/library/backend/qpcglobal.h
new file mode 100644
index 0000000..0d60272
--- a/dev/null
+++ b/library/backend/qpcglobal.h
@@ -0,0 +1,50 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** Licensees holding valid Qtopia Developer license may use this
7** file in accordance with the Qtopia Developer License Agreement
8** provided with the Software.
9**
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
12** PURPOSE.
13**
14** email sales@trolltech.com for information about Qtopia License
15** Agreements.
16**
17** Contact info@trolltech.com if any conditions of this licensing are
18** not clear to you.
19**
20**********************************************************************/
21
22#ifndef QPC_GLOBAL_H
23#define QPC_GLOBAL_H
24
25#if ( defined(Q_OS_WIN32) || defined(Q_OS_WIN64) ) && defined(PALMTOPCENTER)
26#include <qglobal.h>
27// # if defined(QT_NODLL)
28//# undef QPC_MAKEDLL
29//# undef QPC_DLL
30 # if defined(QPC_MAKEDLL)/* create a Qt DLL library */
31# if defined(QPC_DLL)
32# undef QPC_DLL
33# endif
34# define QPC_EXPORT __declspec(dllexport)
35# define QPC_TEMPLATEDLL
36 # undef QPC_DISABLE_COPY/* avoid unresolved externals */
37 # elif defined(QPC_DLL) /* use a Qt DLL library */
38# define QPC_EXPORT __declspec(dllimport)
39# define QPC_TEMPLATEDLL
40 # undef QPC_DISABLE_COPY/* avoid unresolved externals */
41# endif
42#else
43 # undef QPC_MAKEDLL /* ignore these for other platforms */
44# undef QPC_DLL
45#endif
46#endif
47
48#ifndef QPC_EXPORT
49# define QPC_EXPORT
50#endif
diff --git a/library/backend/recordfields.h b/library/backend/recordfields.h
new file mode 100644
index 0000000..3cddde2
--- a/dev/null
+++ b/library/backend/recordfields.h
@@ -0,0 +1,135 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** Licensees holding valid Qtopia Developer license may use this
7** file in accordance with the Qtopia Developer License Agreement
8** provided with the Software.
9**
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
12** PURPOSE.
13**
14** email sales@trolltech.com for information about Qtopia License
15** Agreements.
16**
17** Contact info@trolltech.com if any conditions of this licensing are
18** not clear to you.
19**
20**********************************************************************/
21#ifndef QPC_RECORD_FIELDS_H
22#define QPC_RECORD_FIELDS_H
23#include "qpcglobal.h"
24
25// dataset = "addressbook"
26namespace Qtopia
27{
28 static const int UID_ID = 0;
29 static const int CATEGORY_ID = 1;
30
31 enum AddressBookFields {
32 AddressUid = UID_ID,
33 AddressCategory = CATEGORY_ID,
34
35 Title,
36 FirstName,
37 MiddleName,
38 LastName,
39 Suffix,
40 FileAs,
41
42 // email
43 DefaultEmail,
44 Emails,
45
46 // home
47 HomeStreet,
48 HomeCity,
49 HomeState,
50 HomeZip,
51 HomeCountry,
52 HomePhone,
53 HomeFax,
54 HomeMobile,
55 HomeWebPage,
56
57 // business
58 Company,
59 BusinessStreet,
60 BusinessCity,
61 BusinessState,
62 BusinessZip,
63 BusinessCountry,
64 BusinessWebPage,
65 JobTitle,
66 Department,
67 Office,
68 BusinessPhone,
69 BusinessFax,
70 BusinessMobile,
71 BusinessPager,
72 Profession,
73 Assistant,
74 Manager,
75
76 //personal
77 Spouse,
78 Gender,
79 Birthday,
80 Anniversary,
81 Nickname,
82 Children,
83
84 // other
85 Notes,
86 Groups
87 };
88
89 // dataset = "todolist"
90 enum TaskFields {
91 TaskUid = UID_ID,
92 TaskCategory = CATEGORY_ID,
93
94 HasDate,
95 Completed,
96 TaskDescription,
97 Priority,
98 Date
99 };
100
101 // dataset = "categories" for todos
102 enum CategoryFields {
103 CatUid = UID_ID,
104 CatName,
105 CatAppGroup
106 };
107
108
109// dataset = "datebook"
110 enum DatebookFields {
111 DatebookUid = UID_ID,
112 DatebookCategory = CATEGORY_ID,
113
114 DatebookDescription,
115 Location,
116 TimeZone,
117 Note,
118 StartDateTime,
119 EndDateTime,
120 DatebookType,
121 HasAlarm,
122 SoundType,
123 AlarmTime,
124
125 RepeatPatternType,
126 RepeatPatternFrequency,
127 RepeatPatternPosition,
128 RepeatPatternDays,
129 RepeatPatternHasEndDate,
130 RepeatPatternEndDate,
131 };
132};
133
134
135#endif
diff --git a/library/backend/stringutil.cpp b/library/backend/stringutil.cpp
new file mode 100644
index 0000000..df58f54
--- a/dev/null
+++ b/library/backend/stringutil.cpp
@@ -0,0 +1,415 @@
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/stringutil.h b/library/backend/stringutil.h
new file mode 100644
index 0000000..e9daf70
--- a/dev/null
+++ b/library/backend/stringutil.h
@@ -0,0 +1,57 @@
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
23#ifndef QTPALMTOP_stringutil_h__
24#define QTPALMTOP_stringutil_h__
25
26#include <qstring.h>
27#include "qpcglobal.h"
28
29namespace Qtopia
30{
31
32// Simplifies white space within each line but keeps the new line characters
33QString QPC_EXPORT simplifyMultiLineSpace( const QString &multiLine );
34
35// Creates a QString which doesn't contain any "dangerous"
36// characters (i.e. <, >, &, ")
37QString QPC_EXPORT escapeString( const QString& plain );
38
39// Takes a UTF-8!! string and removes all the XML thingies (entities?)
40// from the string and also calls fromUtf8() on it... so make sure
41// to pass a QCString/const char* with UTF-8 data only
42QString QPC_EXPORT plainString( const char* escaped, unsigned int length );
43QString QPC_EXPORT plainString( const QCString& string );
44
45QString QPC_EXPORT plainString( const QString& string );
46
47
48// collation functions
49int compare( const QString & s1, const QString & s2 );
50QString buildSortKey( const QString & s );
51QString buildSortKey( const QString & s1, const QString & s2 );
52QString buildSortKey( const QString & s1, const QString & s2,
53 const QString & s3 );
54
55}
56
57#endif
diff --git a/library/backend/task.cpp b/library/backend/task.cpp
new file mode 100644
index 0000000..e7d697d
--- a/dev/null
+++ b/library/backend/task.cpp
@@ -0,0 +1,271 @@
1/**********************************************************************
2** Copyright (C) 2001 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 <qpe/task.h>
22#include <qregexp.h>
23#include <qstring.h>
24#include <qpe/recordfields.h>
25#include "vobject_p.h"
26#include "timeconversion.h"
27#include "qfiledirect_p.h"
28
29#include <stdio.h>
30
31using namespace Qtopia;
32UidGen Task::sUidGen( UidGen::Qtopia );
33
34Task::Task() : Record(), mDue( FALSE ),
35mDueDate( QDate::currentDate() ),
36mCompleted( FALSE ), mPriority( 3 ), mDesc()
37{
38}
39
40Task::Task( const QMap<int, QString> &m ) : Record(), mDue( FALSE ),
41mDueDate( QDate::currentDate() ), mCompleted( FALSE ), mPriority( 3 ), mDesc()
42{
43 //qDebug("Task::Task fromMap");
44 //dump( m );
45 for ( QMap<int,QString>::ConstIterator it = m.begin(); it != m.end();++it )
46 switch ( (TaskFields) it.key() ) {
47 case HasDate: if ( *it == "1" ) mDue = TRUE; break;
48 case Completed: setCompleted( *it == "1" ); break;
49 case TaskCategory: setCategories( idsFromString( *it ) ); break;
50 case TaskDescription: setDescription( *it ); break;
51 case Priority: setPriority( (*it).toInt() ); break;
52 case Date: mDueDate = TimeConversion::fromString( (*it) ); break;
53 case TaskUid: setUid( (*it).toInt() ); break;
54 }
55}
56
57Task::~Task()
58{
59}
60
61QMap<int, QString> Task::toMap() const
62{
63 QMap<int, QString> m;
64 m.insert( HasDate, hasDueDate() ? "1" : "0" );
65 m.insert( Completed, isCompleted() ? "1" : "0" );
66 m.insert( TaskCategory, idsToString( categories() ) );
67 m.insert( TaskDescription, description() );
68 m.insert( Priority, QString::number( priority() ) );
69 m.insert( Date, TimeConversion::toString( dueDate() ) );
70 m.insert( TaskUid, QString::number(uid()) );
71
72 //qDebug("Task::toMap");
73 //dump( m );
74 return m;
75}
76
77void Task::save( QString& buf ) const
78{
79 buf += " Completed=\"";
80 // qDebug( "writing %d", complete );
81 buf += QString::number( (int)mCompleted );
82 buf += "\"";
83 buf += " HasDate=\"";
84 // qDebug( "writing %d", );
85 buf += QString::number( (int)mDue );
86 buf += "\"";
87 buf += " Priority=\"";
88 // qDebug ("writing %d", prior );
89 buf += QString::number( mPriority );
90 buf += "\"";
91 buf += " Categories=\"";
92 buf += Qtopia::Record::idsToString( categories() );
93 buf += "\"";
94 buf += " Description=\"";
95 // qDebug( "writing note %s", note.latin1() );
96 buf += Qtopia::escapeString( mDesc );
97 buf += "\"";
98 if ( mDue ) {
99 // qDebug("saving ymd %d %d %d", mDueDate.year(), mDueDate.month(),
100 // mDueDate.day() );
101 buf += " DateYear=\"";
102 buf += QString::number( mDueDate.year() );
103 buf += "\"";
104 buf += " DateMonth=\"";
105 buf += QString::number( mDueDate.month() );
106 buf += "\"";
107 buf += " DateDay=\"";
108 buf += QString::number( mDueDate.day() );
109 buf += "\"";
110 }
111 buf += customToXml();
112 // qDebug ("writing uid %d", uid() );
113 buf += " Uid=\"";
114 buf += QString::number( uid() );
115 // terminate it in the application...
116 buf += "\"";
117}
118
119bool Task::match ( const QRegExp &r ) const
120{
121 // match on priority, description on due date...
122 bool match;
123 match = false;
124 if ( QString::number( mPriority ).find( r ) > -1 )
125 match = true;
126 else if ( mDue && mDueDate.toString().find( r ) > -1 )
127 match = true;
128 else if ( mDesc.find( r ) > -1 )
129 match = true;
130 return match;
131}
132
133static inline VObject *safeAddPropValue( VObject *o, const char *prop, const QString &value )
134{
135 VObject *ret = 0;
136 if ( o && !value.isEmpty() )
137 ret = addPropValue( o, prop, value.latin1() );
138 return ret;
139}
140
141static inline VObject *safeAddProp( VObject *o, const char *prop)
142{
143 VObject *ret = 0;
144 if ( o )
145 ret = addProp( o, prop );
146 return ret;
147}
148
149
150static VObject *createVObject( const Task &t )
151{
152 VObject *vcal = newVObject( VCCalProp );
153 safeAddPropValue( vcal, VCVersionProp, "1.0" );
154 VObject *task = safeAddProp( vcal, VCTodoProp );
155
156 if ( t.hasDueDate() )
157 safeAddPropValue( task, VCDueProp, TimeConversion::toISO8601( t.dueDate() ) );
158 safeAddPropValue( task, VCDescriptionProp, t.description() );
159 if ( t.isCompleted() )
160 safeAddPropValue( task, VCStatusProp, "COMPLETED" );
161 safeAddPropValue( task, VCPriorityProp, QString::number( t.priority() ) );
162
163 return vcal;
164}
165
166
167static Task parseVObject( VObject *obj )
168{
169 Task t;
170
171 VObjectIterator it;
172 initPropIterator( &it, obj );
173 while( moreIteration( &it ) ) {
174 VObject *o = nextVObject( &it );
175 QCString name = vObjectName( o );
176 QCString value = vObjectStringZValue( o );
177 if ( name == VCDueProp ) {
178 t.setDueDate( TimeConversion::fromISO8601( value ).date(), TRUE );
179 }
180 else if ( name == VCDescriptionProp ) {
181 t.setDescription( value );
182 }
183 else if ( name == VCStatusProp ) {
184 if ( value == "COMPLETED" )
185 t.setCompleted( TRUE );
186 }
187 else if ( name == VCPriorityProp ) {
188 t.setPriority( value.toInt() );
189 }
190#if 0
191 else {
192 printf("Name: %s, value=%s\n", name.data(), vObjectStringZValue( o ) );
193 VObjectIterator nit;
194 initPropIterator( &nit, o );
195 while( moreIteration( &nit ) ) {
196 VObject *o = nextVObject( &nit );
197 QCString name = vObjectName( o );
198 QString value = vObjectStringZValue( o );
199 printf(" subprop: %s = %s\n", name.data(), value.latin1() );
200 }
201 }
202#endif
203 }
204
205 return t;
206}
207
208
209
210void Task::writeVCalendar( const QString &filename, const QValueList<Task> &tasks)
211{
212 QFileDirect f( filename.utf8().data() );
213 if ( !f.open( IO_WriteOnly ) ) {
214 qWarning("Unable to open vcard write");
215 return;
216 }
217
218 QValueList<Task>::ConstIterator it;
219 for( it = tasks.begin(); it != tasks.end(); ++it ) {
220 VObject *obj = createVObject( *it );
221 writeVObject(f.directHandle() , obj );
222 cleanVObject( obj );
223 }
224
225 cleanStrTbl();
226}
227
228void Task::writeVCalendar( const QString &filename, const Task &task)
229{
230 QFileDirect f( filename.utf8().data() );
231 if ( !f.open( IO_WriteOnly ) ) {
232 qWarning("Unable to open vcard write");
233 return;
234 }
235
236 VObject *obj = createVObject( task );
237 writeVObject(f.directHandle() , obj );
238 cleanVObject( obj );
239
240 cleanStrTbl();
241}
242
243
244QValueList<Task> Task::readVCalendar( const QString &filename )
245{
246 VObject *obj = Parse_MIME_FromFileName( (char *)filename.utf8().data() );
247
248 QValueList<Task> tasks;
249
250 while ( obj ) {
251 QCString name = vObjectName( obj );
252 if ( name == VCCalProp ) {
253 VObjectIterator nit;
254 initPropIterator( &nit, obj );
255 while( moreIteration( &nit ) ) {
256 VObject *o = nextVObject( &nit );
257 QCString name = vObjectName( o );
258 if ( name == VCTodoProp )
259 tasks.append( parseVObject( o ) );
260 }
261 } else if ( name == VCTodoProp ) {
262 // shouldn't happen, but just to be sure
263 tasks.append( parseVObject( obj ) );
264 }
265 VObject *t = obj;
266 obj = nextVObjectInList(obj);
267 cleanVObject( t );
268 }
269
270 return tasks;
271}
diff --git a/library/backend/task.h b/library/backend/task.h
new file mode 100644
index 0000000..ffe26b0
--- a/dev/null
+++ b/library/backend/task.h
@@ -0,0 +1,77 @@
1/**********************************************************************
2** Copyright (C) 2001 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#ifndef __TASK_H__
21#define __TASK_H__
22
23#include <qpe/palmtoprecord.h>
24#include <qpe/stringutil.h>
25
26#include <qvaluelist.h>
27#include <qdatetime.h>
28
29class TaskPrivate;
30class QPC_EXPORT Task : public Qtopia::Record
31{
32public:
33 Task();
34 Task( const QMap<int, QString> &fromMap );
35 ~Task();
36
37 QMap<int, QString> toMap() const;
38
39 static void writeVCalendar( const QString &filename, const QValueList<Task> &tasks);
40 static void writeVCalendar( const QString &filename, const Task &task);
41 static QValueList<Task> readVCalendar( const QString &filename );
42
43 void setPriority( int priority ) { mPriority = priority; }
44 int priority() const { return mPriority; }
45
46// void setCategory( const QString& category )
47// { mCategory = category.stripWhiteSpace(); }
48// const QString &category() const { return mCategory; }
49
50 void setDescription( const QString& description )
51 { mDesc = Qtopia::simplifyMultiLineSpace(description); }
52 const QString &description() const { return mDesc; }
53
54 void setDueDate( const QDate& date, bool hasDue ) { mDueDate = date; mDue = hasDue; }
55 const QDate &dueDate() const { return mDueDate; }
56 bool hasDueDate() const { return mDue; }
57 void setHasDueDate( bool b ) { mDue = b; }
58
59 void setCompleted( bool b ) { mCompleted = b; }
60 bool isCompleted() const { return mCompleted; }
61
62 void save( QString& buf ) const;
63 bool match( const QRegExp &r ) const;
64
65private:
66 Qtopia::UidGen &uidGen() { return sUidGen; }
67 static Qtopia::UidGen sUidGen;
68
69 bool mDue;
70 QDate mDueDate;
71 bool mCompleted;
72 int mPriority;
73 QString mDesc;
74 TaskPrivate *d;
75};
76
77#endif
diff --git a/library/backend/timeconversion.cpp b/library/backend/timeconversion.cpp
new file mode 100644
index 0000000..a4a2547
--- a/dev/null
+++ b/library/backend/timeconversion.cpp
@@ -0,0 +1,237 @@
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
new file mode 100644
index 0000000..1724812
--- a/dev/null
+++ b/library/backend/timeconversion.h
@@ -0,0 +1,45 @@
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
new file mode 100644
index 0000000..0225982
--- a/dev/null
+++ b/library/backend/vcc.y
@@ -0,0 +1,1199 @@
1%{
2
3/***************************************************************************
4(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
5Business Machines Corporation and Siemens Rolm Communications Inc.
6
7For purposes of this license notice, the term Licensors shall mean,
8collectively, Apple Computer, Inc., AT&T Corp., International
9Business Machines Corporation and Siemens Rolm Communications Inc.
10The term Licensor shall mean any of the Licensors.
11
12Subject to acceptance of the following conditions, permission is hereby
13granted by Licensors without the need for written agreement and without
14license or royalty fees, to use, copy, modify and distribute this
15software for any purpose.
16
17The above copyright notice and the following four paragraphs must be
18reproduced in all copies of this software and any software including
19this software.
20
21THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE
22ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR
23MODIFICATIONS.
24
25IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,
26INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
27OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
28DAMAGE.
29
30EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,
31INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE
32IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
33PURPOSE.
34
35The software is provided with RESTRICTED RIGHTS. Use, duplication, or
36disclosure by the government are subject to restrictions set forth in
37DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
38
39***************************************************************************/
40
41/*
42 * src: vcc.c
43 * doc: Parser for vCard and vCalendar. Note that this code is
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
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
48 * be fixed in vcc.y and this file regenerated.
49 */
50
51
52/* debugging utilities */
53#if __DEBUG
54#define DBG_(x) printf x
55#else
56#define DBG_(x)
57#endif
58
59/**** External Functions ****/
60
61/* assign local name to parser variables and functions so that
62 we can use more than one yacc based parser.
63*/
64
65#if 0
66#define yyparse mime_parse
67#define yylex mime_lex
68#define yyerror mime_error
69#define yychar mime_char
70/* #define p_yyval p_mime_val */
71#undef yyval
72#define yyval mime_yyval
73/* #define p_yylval p_mime_lval */
74#undef yylval
75#define yylval mime_yylval
76#define yydebug mime_debug
77#define yynerrs mime_nerrs
78#define yyerrflag mime_errflag
79#define yyss mime_ss
80#define yyssp mime_ssp
81#define yyvs mime_vs
82#define yyvsp mime_vsp
83#define yylhs mime_lhs
84#define yylen mime_len
85#define yydefred mime_defred
86#define yydgoto mime_dgoto
87#define yysindex mime_sindex
88#define yyrindex mime_rindex
89#define yygindex mime_gindex
90#define yytable mime_table
91#define yycheck mime_check
92#define yyname mime_name
93#define yyrule mime_rule
94#ifdef YYPREFIX
95#undef YYPREFIX
96#endif
97#define YYPREFIX "mime_"
98#endif
99
100
101#ifndef _NO_LINE_FOLDING
102#define _SUPPORT_LINE_FOLDING 1
103#endif
104
105/* undef below if compile with MFC */
106/* #define INCLUDEMFC 1 */
107
108#if defined(WIN32) || defined(_WIN32)
109#ifdef INCLUDEMFC
110#include <afx.h>
111#endif
112#endif
113
114#include <string.h>
115#ifndef __MWERKS__
116#include <stdlib.h>
117#endif
118#include <stdio.h>
119#include <stdlib.h>
120#include <ctype.h>
121
122//#ifdef PALMTOPCENTER
123//#include <qpe/vobject_p.h>
124//#else
125#include "vobject_p.h"
126//#endif
127
128/**** Types, Constants ****/
129
130 #define YYDEBUG 0/* 1 to compile in some debugging code */
131 #define MAXTOKEN 256/* maximum token (line) length */
132 #define YYSTACKSIZE 100// ~unref ?
133 #define MAXLEVEL 10/* max # of nested objects parseable */
134 /* (includes outermost) */
135
136
137/**** Global Variables ****/
138int mime_lineNum, mime_numErrors; /* yyerror() can use these */
139static VObject* vObjList;
140static VObject *curProp;
141static VObject *curObj;
142static VObject* ObjStack[MAXLEVEL];
143static int ObjStackTop;
144
145
146/* A helpful utility for the rest of the app. */
147#if __CPLUSPLUS__
148extern "C" {
149#endif
150
151 extern void yyerror(char *s);
152
153#if __CPLUSPLUS__
154 };
155#endif
156
157int yyparse();
158
159enum LexMode {
160 L_NORMAL,
161 L_VCARD,
162 L_VCAL,
163 L_VEVENT,
164 L_VTODO,
165 L_VALUES,
166 L_BASE64,
167 L_QUOTED_PRINTABLE
168 };
169
170/**** Private Forward Declarations ****/
171static int pushVObject(const char *prop);
172static VObject* popVObject();
173static void lexPopMode(int top);
174static int lexWithinMode(enum LexMode mode);
175static void lexPushMode(enum LexMode mode);
176static void enterProps(const char *s);
177static void enterAttr(const char *s1, const char *s2);
178static void enterValues(const char *value);
179#define mime_error yyerror
180void mime_error(char *s);
181void mime_error_(char *s);
182
183%}
184
185/***************************************************************************/
186/*** The grammar ****/
187/***************************************************************************/
188
189%union {
190 char *str;
191 VObject *vobj;
192 }
193
194%token
195 EQ COLON DOT SEMICOLON SPACE HTAB LINESEP NEWLINE
196 BEGIN_VCARD END_VCARD BEGIN_VCAL END_VCAL
197 BEGIN_VEVENT END_VEVENT BEGIN_VTODO END_VTODO
198 ID
199
200/*
201 * NEWLINE is the token that would occur outside a vCard,
202 * while LINESEP is the token that would occur inside a vCard.
203 */
204
205%token <str>
206 STRING ID
207
208%type <str> name value
209
210%type <vobj> vcard vcal vobject
211
212%start mime
213
214%%
215
216
217mime: vobjects
218 ;
219
220vobjects: vobjects vobject
221 { addList(&vObjList, $2); curObj = 0; }
222 | vobject
223 { addList(&vObjList, $1); curObj = 0; }
224 ;
225
226vobject: vcard
227 | vcal
228 ;
229
230vcard:
231 BEGIN_VCARD
232 {
233 lexPushMode(L_VCARD);
234 if (!pushVObject(VCCardProp)) YYERROR;
235 }
236 items END_VCARD
237 {
238 lexPopMode(0);
239 $$ = popVObject();
240 }
241 | BEGIN_VCARD
242 {
243 lexPushMode(L_VCARD);
244 if (!pushVObject(VCCardProp)) YYERROR;
245 }
246 END_VCARD
247 {
248 lexPopMode(0);
249 $$ = popVObject();
250 }
251 ;
252
253items: items item
254 | item
255 ;
256
257item: prop COLON
258 {
259 lexPushMode(L_VALUES);
260 }
261 values LINESEP
262 {
263 if (lexWithinMode(L_BASE64) || lexWithinMode(L_QUOTED_PRINTABLE))
264 lexPopMode(0);
265 lexPopMode(0);
266 }
267 | error
268 ;
269
270prop: name
271 {
272 enterProps($1);
273 }
274 attr_params
275 | name
276 {
277 enterProps($1);
278 }
279 ;
280
281attr_params: attr_params attr_param
282 | attr_param
283 ;
284
285attr_param: SEMICOLON attr
286 ;
287
288attr: name
289 {
290 enterAttr($1,0);
291 }
292 | name EQ name
293 {
294 enterAttr($1,$3);
295
296 }
297 ;
298
299name: ID
300 ;
301
302values: value SEMICOLON { enterValues($1); } values
303 | value
304 { enterValues($1); }
305 ;
306
307value: STRING
308 |
309 { $$ = 0; }
310 ;
311
312vcal:
313 BEGIN_VCAL
314 { if (!pushVObject(VCCalProp)) YYERROR; }
315 calitems
316 END_VCAL
317 { $$ = popVObject(); }
318 | BEGIN_VCAL
319 { if (!pushVObject(VCCalProp)) YYERROR; }
320 END_VCAL
321 { $$ = popVObject(); }
322 ;
323
324calitems: calitems calitem
325 | calitem
326 ;
327
328calitem:
329 eventitem
330 | todoitem
331 | items
332 ;
333
334eventitem:
335 BEGIN_VEVENT
336 {
337 lexPushMode(L_VEVENT);
338 if (!pushVObject(VCEventProp)) YYERROR;
339 }
340 items
341 END_VEVENT
342 {
343 lexPopMode(0);
344 popVObject();
345 }
346 | BEGIN_VEVENT
347 {
348 lexPushMode(L_VEVENT);
349 if (!pushVObject(VCEventProp)) YYERROR;
350 }
351 END_VEVENT
352 {
353 lexPopMode(0);
354 popVObject();
355 }
356 ;
357
358todoitem:
359 BEGIN_VTODO
360 {
361 lexPushMode(L_VTODO);
362 if (!pushVObject(VCTodoProp)) YYERROR;
363 }
364 items
365 END_VTODO
366 {
367 lexPopMode(0);
368 popVObject();
369 }
370 | BEGIN_VTODO
371 {
372 lexPushMode(L_VTODO);
373 if (!pushVObject(VCTodoProp)) YYERROR;
374 }
375 END_VTODO
376 {
377 lexPopMode(0);
378 popVObject();
379 }
380 ;
381
382%%
383/*------------------------------------*/
384static int pushVObject(const char *prop)
385 {
386 VObject *newObj;
387 if (ObjStackTop == MAXLEVEL)
388 return FALSE;
389
390 ObjStack[++ObjStackTop] = curObj;
391
392 if (curObj) {
393 newObj = addProp(curObj,prop);
394 curObj = newObj;
395 }
396 else
397 curObj = newVObject(prop);
398
399 return TRUE;
400 }
401
402
403/*---------------------------------------*/
404/* This pops the recently built vCard off the stack and returns it. */
405static VObject* popVObject()
406 {
407 VObject *oldObj;
408 if (ObjStackTop < 0) {
409 yyerror("pop on empty Object Stack\n");
410 return 0;
411 }
412 oldObj = curObj;
413 curObj = ObjStack[ObjStackTop--];
414
415 return oldObj;
416 }
417
418
419static void enterValues(const char *value)
420 {
421 if (fieldedProp && *fieldedProp) {
422 if (value) {
423 addPropValue(curProp,*fieldedProp,value);
424 }
425 /* else this field is empty, advance to next field */
426 fieldedProp++;
427 }
428 else {
429 if (value) {
430 setVObjectStringZValue_(curProp,strdup( value ));
431 }
432 }
433 deleteStr(value);
434 }
435
436static void enterProps(const char *s)
437 {
438 curProp = addGroup(curObj,s);
439 deleteStr(s);
440 }
441
442static void enterAttr(const char *s1, const char *s2)
443 {
444 const char *p1, *p2;
445 p1 = lookupProp_(s1);
446 if (s2) {
447 VObject *a;
448 p2 = lookupProp_(s2);
449 a = addProp(curProp,p1);
450 setVObjectStringZValue(a,p2);
451 }
452 else
453 addProp(curProp,p1);
454 if (qstricmp(p1,VCBase64Prop) == 0 || (s2 && qstricmp(p2,VCBase64Prop)==0))
455 lexPushMode(L_BASE64);
456 else if (qstricmp(p1,VCQuotedPrintableProp) == 0
457 || (s2 && qstricmp(p2,VCQuotedPrintableProp)==0))
458 lexPushMode(L_QUOTED_PRINTABLE);
459 deleteStr(s1); deleteStr(s2);
460 }
461
462
463#define MAX_LEX_LOOKAHEAD_0 32
464#define MAX_LEX_LOOKAHEAD 64
465#define MAX_LEX_MODE_STACK_SIZE 10
466#define LEXMODE() (lexBuf.lexModeStack[lexBuf.lexModeStackTop])
467
468struct LexBuf {
469 /* input */
470#ifdef INCLUDEMFC
471 CFile *inputFile;
472#else
473 FILE *inputFile;
474#endif
475 char *inputString;
476 unsigned long curPos;
477 unsigned long inputLen;
478 /* lookahead buffer */
479 /* -- lookahead buffer is short instead of char so that EOF
480 / can be represented correctly.
481 */
482 unsigned long len;
483 short buf[MAX_LEX_LOOKAHEAD];
484 unsigned long getPtr;
485 /* context stack */
486 unsigned long lexModeStackTop;
487 enum LexMode lexModeStack[MAX_LEX_MODE_STACK_SIZE];
488 /* token buffer */
489 unsigned long maxToken;
490 char *strs;
491 unsigned long strsLen;
492 } lexBuf;
493
494static void lexPushMode(enum LexMode mode)
495 {
496 if (lexBuf.lexModeStackTop == (MAX_LEX_MODE_STACK_SIZE-1))
497 yyerror("lexical context stack overflow");
498 else {
499 lexBuf.lexModeStack[++lexBuf.lexModeStackTop] = mode;
500 }
501 }
502
503static void lexPopMode(int top)
504 {
505 /* special case of pop for ease of error recovery -- this
506 version will never underflow */
507 if (top)
508 lexBuf.lexModeStackTop = 0;
509 else
510 if (lexBuf.lexModeStackTop > 0) lexBuf.lexModeStackTop--;
511 }
512
513static int lexWithinMode(enum LexMode mode) {
514 unsigned long i;
515 for (i=0;i<lexBuf.lexModeStackTop;i++)
516 if (mode == lexBuf.lexModeStack[i]) return 1;
517 return 0;
518 }
519
520static char lexGetc_()
521 {
522 /* get next char from input, no buffering. */
523 if (lexBuf.curPos == lexBuf.inputLen)
524 return EOF;
525 else if (lexBuf.inputString)
526 return *(lexBuf.inputString + lexBuf.curPos++);
527 else {
528#ifdef INCLUDEMFC
529 char result;
530 return lexBuf.inputFile->Read(&result, 1) == 1 ? result : EOF;
531#else
532 return fgetc(lexBuf.inputFile);
533#endif
534 }
535 }
536
537static int lexGeta()
538 {
539 ++lexBuf.len;
540 return (lexBuf.buf[lexBuf.getPtr] = lexGetc_());
541 }
542
543static int lexGeta_(int i)
544 {
545 ++lexBuf.len;
546 return (lexBuf.buf[(lexBuf.getPtr+i)%MAX_LEX_LOOKAHEAD] = lexGetc_());
547 }
548
549static void lexSkipLookahead() {
550 if (lexBuf.len > 0 && lexBuf.buf[lexBuf.getPtr]!=EOF) {
551 /* don't skip EOF. */
552 lexBuf.getPtr = (lexBuf.getPtr + 1) % MAX_LEX_LOOKAHEAD;
553 lexBuf.len--;
554 }
555 }
556
557static int lexLookahead() {
558 int c = (lexBuf.len)?
559 lexBuf.buf[lexBuf.getPtr]:
560 lexGeta();
561 /* do the \r\n -> \n or \r -> \n translation here */
562 if (c == '\r') {
563 int a = (lexBuf.len>1)?
564 lexBuf.buf[(lexBuf.getPtr+1)%MAX_LEX_LOOKAHEAD]:
565 lexGeta_(1);
566 if (a == '\n') {
567 lexSkipLookahead();
568 }
569 lexBuf.buf[lexBuf.getPtr] = c = '\n';
570 }
571 else if (c == '\n') {
572 int a = (lexBuf.len>1)?
573 lexBuf.buf[lexBuf.getPtr+1]:
574 lexGeta_(1);
575 if (a == '\r') {
576 lexSkipLookahead();
577 }
578 lexBuf.buf[lexBuf.getPtr] = '\n';
579 }
580 return c;
581 }
582
583static int lexGetc() {
584 int c = lexLookahead();
585 if (lexBuf.len > 0 && lexBuf.buf[lexBuf.getPtr]!=EOF) {
586 /* EOF will remain in lookahead buffer */
587 lexBuf.getPtr = (lexBuf.getPtr + 1) % MAX_LEX_LOOKAHEAD;
588 lexBuf.len--;
589 }
590 return c;
591 }
592
593static void lexSkipLookaheadWord() {
594 if (lexBuf.strsLen <= lexBuf.len) {
595 lexBuf.len -= lexBuf.strsLen;
596 lexBuf.getPtr = (lexBuf.getPtr + lexBuf.strsLen) % MAX_LEX_LOOKAHEAD;
597 }
598 }
599
600static void lexClearToken()
601 {
602 lexBuf.strsLen = 0;
603 }
604
605static void lexAppendc(int c)
606 {
607 lexBuf.strs[lexBuf.strsLen] = c;
608 /* append up to zero termination */
609 if (c == 0) return;
610 lexBuf.strsLen++;
611 if (lexBuf.strsLen > lexBuf.maxToken) {
612 /* double the token string size */
613 lexBuf.maxToken <<= 1;
614 lexBuf.strs = (char*) realloc(lexBuf.strs,(size_t)lexBuf.maxToken);
615 }
616 }
617
618static char* lexStr() {
619 return dupStr(lexBuf.strs,(size_t)lexBuf.strsLen+1);
620 }
621
622static void lexSkipWhite() {
623 int c = lexLookahead();
624 while (c == ' ' || c == '\t') {
625 lexSkipLookahead();
626 c = lexLookahead();
627 }
628 }
629
630static char* lexGetWord() {
631 int c;
632 lexSkipWhite();
633 lexClearToken();
634 c = lexLookahead();
635 while (c != EOF && !strchr("\t\n ;:=",c)) {
636 lexAppendc(c);
637 lexSkipLookahead();
638 c = lexLookahead();
639 }
640 lexAppendc(0);
641 return lexStr();
642 }
643
644static void lexPushLookaheadc(int c) {
645 int putptr;
646 /* can't putback EOF, because it never leaves lookahead buffer */
647 if (c == EOF) return;
648 putptr = (int)lexBuf.getPtr - 1;
649 if (putptr < 0) putptr += MAX_LEX_LOOKAHEAD;
650 lexBuf.getPtr = putptr;
651 lexBuf.buf[putptr] = c;
652 lexBuf.len += 1;
653 }
654
655static char* lexLookaheadWord() {
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;
658 / leading white spaces are not recoverable.
659 */
660 int c;
661 int len = 0;
662 int curgetptr = 0;
663 lexSkipWhite();
664 lexClearToken();
665 curgetptr = (int)lexBuf.getPtr;// remember!
666 while (len < (MAX_LEX_LOOKAHEAD_0)) {
667 c = lexGetc();
668 len++;
669 if (c == EOF || strchr("\t\n ;:=", c)) {
670 lexAppendc(0);
671 /* restore lookahead buf. */
672 lexBuf.len += len;
673 lexBuf.getPtr = curgetptr;
674 return lexStr();
675 }
676 else
677 lexAppendc(c);
678 }
679 lexBuf.len += len;/* char that has been moved to lookahead buffer */
680 lexBuf.getPtr = curgetptr;
681 return 0;
682 }
683
684#ifdef _SUPPORT_LINE_FOLDING
685static void handleMoreRFC822LineBreak(int c) {
686 /* suport RFC 822 line break in cases like
687 *ADR: foo;
688 * morefoo;
689 * more foo;
690 */
691 if (c == ';') {
692 int a;
693 lexSkipLookahead();
694 /* skip white spaces */
695 a = lexLookahead();
696 while (a == ' ' || a == '\t') {
697 lexSkipLookahead();
698 a = lexLookahead();
699 }
700 if (a == '\n') {
701 lexSkipLookahead();
702 a = lexLookahead();
703 if (a == ' ' || a == '\t') {
704 /* continuation, throw away all the \n and spaces read so
705 * far
706 */
707 lexSkipWhite();
708 lexPushLookaheadc(';');
709 }
710 else {
711 lexPushLookaheadc('\n');
712 lexPushLookaheadc(';');
713 }
714 }
715 else {
716 lexPushLookaheadc(';');
717 }
718 }
719 }
720
721static char* lexGet1Value() {
722 int c;
723 lexSkipWhite();
724 c = lexLookahead();
725 lexClearToken();
726 while (c != EOF && c != ';') {
727 if (c == '\\' ) {
728 int a;
729 lexSkipLookahead();
730 a = lexLookahead();
731 if ( a != ';' ) {
732 lexAppendc('\\');
733 } else {
734 lexAppendc( ';' );
735 lexSkipLookahead();
736 }
737 } else if (c == '\n') {
738 int a;
739 lexSkipLookahead();
740 a = lexLookahead();
741 if (a == ' ' || a == '\t') {
742 lexAppendc(' ');
743 lexSkipLookahead();
744 }
745 else {
746 lexPushLookaheadc('\n');
747 break;
748 }
749 }
750 else {
751 lexAppendc(c);
752 lexSkipLookahead();
753 }
754 c = lexLookahead();
755 }
756 lexAppendc(0);
757 handleMoreRFC822LineBreak(c);
758 return c==EOF?0:lexStr();
759 }
760#endif
761
762static int match_begin_name(int end) {
763 char *n = lexLookaheadWord();
764 int token = ID;
765 if (n) {
766 if (!qstricmp(n,"vcard")) token = end?END_VCARD:BEGIN_VCARD;
767 else if (!qstricmp(n,"vcalendar")) token = end?END_VCAL:BEGIN_VCAL;
768 else if (!qstricmp(n,"vevent")) token = end?END_VEVENT:BEGIN_VEVENT;
769 else if (!qstricmp(n,"vtodo")) token = end?END_VTODO:BEGIN_VTODO;
770 deleteStr(n);
771 return token;
772 }
773 return 0;
774 }
775
776
777#ifdef INCLUDEMFC
778void initLex(const char *inputstring, unsigned long inputlen, CFile *inputfile)
779#else
780void initLex(const char *inputstring, unsigned long inputlen, FILE *inputfile)
781#endif
782 {
783 // initialize lex mode stack
784 lexBuf.lexModeStack[lexBuf.lexModeStackTop=0] = L_NORMAL;
785
786 // iniatialize lex buffer.
787 lexBuf.inputString = (char*) inputstring;
788 lexBuf.inputLen = inputlen;
789 lexBuf.curPos = 0;
790 lexBuf.inputFile = inputfile;
791
792 lexBuf.len = 0;
793 lexBuf.getPtr = 0;
794
795 lexBuf.maxToken = MAXTOKEN;
796 lexBuf.strs = (char*)malloc(MAXTOKEN);
797 lexBuf.strsLen = 0;
798
799 }
800
801static void finiLex() {
802 free(lexBuf.strs);
803 }
804
805
806/*-----------------------------------*/
807/* This parses and converts the base64 format for binary encoding into
808 * a decoded buffer (allocated with new). See RFC 1521.
809 */
810static char * lexGetDataFromBase64()
811 {
812 unsigned long bytesLen = 0, bytesMax = 0;
813 int quadIx = 0, pad = 0;
814 unsigned long trip = 0;
815 unsigned char b;
816 int c;
817 unsigned char *bytes = NULL;
818 unsigned char *oldBytes = NULL;
819
820 DBG_(("db: lexGetDataFromBase64\n"));
821 while (1) {
822 c = lexGetc();
823 if (c == '\n') {
824 ++mime_lineNum;
825 if (lexLookahead() == '\n') {
826 /* a '\n' character by itself means end of data */
827 break;
828 }
829 else continue; /* ignore '\n' */
830 }
831 else {
832 if ((c >= 'A') && (c <= 'Z'))
833 b = (unsigned char)(c - 'A');
834 else if ((c >= 'a') && (c <= 'z'))
835 b = (unsigned char)(c - 'a') + 26;
836 else if ((c >= '0') && (c <= '9'))
837 b = (unsigned char)(c - '0') + 52;
838 else if (c == '+')
839 b = 62;
840 else if (c == '/')
841 b = 63;
842 else if (c == '=') {
843 b = 0;
844 pad++;
845 } else if ((c == ' ') || (c == '\t')) {
846 continue;
847 } else { /* error condition */
848 if (bytes) free(bytes);
849 else if (oldBytes) free(oldBytes);
850 // error recovery: skip until 2 adjacent newlines.
851 DBG_(("db: invalid character 0x%x '%c'\n", c,c));
852 if (c != EOF) {
853 c = lexGetc();
854 while (c != EOF) {
855 if (c == '\n' && lexLookahead() == '\n') {
856 ++mime_lineNum;
857 break;
858 }
859 c = lexGetc();
860 }
861 }
862 return NULL;
863 }
864 trip = (trip << 6) | b;
865 if (++quadIx == 4) {
866 unsigned char outBytes[3];
867 int numOut;
868 int i;
869 for (i = 0; i < 3; i++) {
870 outBytes[2-i] = (unsigned char)(trip & 0xFF);
871 trip >>= 8;
872 }
873 numOut = 3 - pad;
874 if (bytesLen + numOut > bytesMax) {
875 if (!bytes) {
876 bytesMax = 1024;
877 bytes = (unsigned char*)malloc((size_t)bytesMax);
878 }
879 else {
880 bytesMax <<= 2;
881 oldBytes = bytes;
882 bytes = (unsigned char*)realloc(bytes,(size_t)bytesMax);
883 }
884 if (bytes == 0) {
885 mime_error("out of memory while processing BASE64 data\n");
886 }
887 }
888 if (bytes) {
889 memcpy(bytes + bytesLen, outBytes, numOut);
890 bytesLen += numOut;
891 }
892 trip = 0;
893 quadIx = 0;
894 }
895 }
896 } /* while */
897 DBG_(("db: bytesLen = %d\n", bytesLen));
898 /* kludge: all this won't be necessary if we have tree form
899 representation */
900 if (bytes) {
901 setValueWithSize(curProp,bytes,(unsigned int)bytesLen);
902 free(bytes);
903 }
904 else if (oldBytes) {
905 setValueWithSize(curProp,oldBytes,(unsigned int)bytesLen);
906 free(oldBytes);
907 }
908 return 0;
909 }
910
911static int match_begin_end_name(int end) {
912 int token;
913 lexSkipWhite();
914 if (lexLookahead() != ':') return ID;
915 lexSkipLookahead();
916 lexSkipWhite();
917 token = match_begin_name(end);
918 if (token == ID) {
919 lexPushLookaheadc(':');
920 DBG_(("db: ID '%s'\n", yylval.str));
921 return ID;
922 }
923 else if (token != 0) {
924 lexSkipLookaheadWord();
925 deleteStr(yylval.str);
926 DBG_(("db: begin/end %d\n", token));
927 return token;
928 }
929 return 0;
930 }
931
932static char* lexGetQuotedPrintable()
933 {
934 char cur;
935
936 lexClearToken();
937 do {
938 cur = lexGetc();
939 switch (cur) {
940 case '=': {
941 int c = 0;
942 int next[2];
943 int i;
944 for (i = 0; i < 2; i++) {
945 next[i] = lexGetc();
946 if (next[i] >= '0' && next[i] <= '9')
947 c = c * 16 + next[i] - '0';
948 else if (next[i] >= 'A' && next[i] <= 'F')
949 c = c * 16 + next[i] - 'A' + 10;
950 else
951 break;
952 }
953 if (i == 0) {
954 /* single '=' follow by LINESEP is continuation sign? */
955 if (next[0] == '\n') {
956 ++mime_lineNum;
957 }
958 else {
959 lexPushLookaheadc('=');
960 goto EndString;
961 }
962 }
963 else if (i == 1) {
964 lexPushLookaheadc(next[1]);
965 lexPushLookaheadc(next[0]);
966 lexAppendc('=');
967 } else {
968 lexAppendc(c);
969 }
970 break;
971 } /* '=' */
972 case '\n': {
973 lexPushLookaheadc('\n');
974 goto EndString;
975 }
976 case (char)EOF:
977 break;
978 default:
979 lexAppendc(cur);
980 break;
981 } /* switch */
982 } while (cur != (char)EOF);
983
984EndString:
985 lexAppendc(0);
986 return lexStr();
987 } /* LexQuotedPrintable */
988
989static int yylex() {
990
991 int lexmode = LEXMODE();
992 if (lexmode == L_VALUES) {
993 int c = lexGetc();
994 if (c == ';') {
995 DBG_(("db: SEMICOLON\n"));
996 lexPushLookaheadc(c);
997 handleMoreRFC822LineBreak(c);
998 lexSkipLookahead();
999 return SEMICOLON;
1000 }
1001 else if (strchr("\n",c)) {
1002 ++mime_lineNum;
1003 /* consume all line separator(s) adjacent to each other */
1004 c = lexLookahead();
1005 while (strchr("\n",c)) {
1006 lexSkipLookahead();
1007 c = lexLookahead();
1008 ++mime_lineNum;
1009 }
1010 DBG_(("db: LINESEP\n"));
1011 return LINESEP;
1012 }
1013 else {
1014 char *p = 0;
1015 lexPushLookaheadc(c);
1016 if (lexWithinMode(L_BASE64)) {
1017 /* get each char and convert to bin on the fly... */
1018 p = lexGetDataFromBase64();
1019 yylval.str = p;
1020 return STRING;
1021 }
1022 else if (lexWithinMode(L_QUOTED_PRINTABLE)) {
1023 p = lexGetQuotedPrintable();
1024 }
1025 else {
1026#ifdef _SUPPORT_LINE_FOLDING
1027 p = lexGet1Value();
1028#else
1029 p = lexGetStrUntil(";\n");
1030#endif
1031 }
1032 if (p) {
1033 DBG_(("db: STRING: '%s'\n", p));
1034 yylval.str = p;
1035 return STRING;
1036 }
1037 else return 0;
1038 }
1039 }
1040 else {
1041 /* normal mode */
1042 while (1) {
1043 int c = lexGetc();
1044 switch(c) {
1045 case ':': {
1046 /* consume all line separator(s) adjacent to each other */
1047 /* ignoring linesep immediately after colon. */
1048 c = lexLookahead();
1049 while (strchr("\n",c)) {
1050 lexSkipLookahead();
1051 c = lexLookahead();
1052 ++mime_lineNum;
1053 }
1054 DBG_(("db: COLON\n"));
1055 return COLON;
1056 }
1057 case ';':
1058 DBG_(("db: SEMICOLON\n"));
1059 return SEMICOLON;
1060 case '=':
1061 DBG_(("db: EQ\n"));
1062 return EQ;
1063 /* ignore whitespace in this mode */
1064 case '\t':
1065 case ' ': continue;
1066 case '\n': {
1067 ++mime_lineNum;
1068 continue;
1069 }
1070 case EOF: return 0;
1071 break;
1072 default: {
1073 lexPushLookaheadc(c);
1074 if (isalnum(c)) {
1075 char *t = lexGetWord();
1076 yylval.str = t;
1077 if (!qstricmp(t, "begin")) {
1078 return match_begin_end_name(0);
1079 }
1080 else if (!qstricmp(t,"end")) {
1081 return match_begin_end_name(1);
1082 }
1083 else {
1084 DBG_(("db: ID '%s'\n", t));
1085 return ID;
1086 }
1087 }
1088 else {
1089 /* unknow token */
1090 return 0;
1091 }
1092 break;
1093 }
1094 }
1095 }
1096 }
1097 return 0;
1098 }
1099
1100
1101/***************************************************************************/
1102 /*** Public Functions ****/
1103/***************************************************************************/
1104
1105static VObject* Parse_MIMEHelper()
1106 {
1107 ObjStackTop = -1;
1108 mime_numErrors = 0;
1109 mime_lineNum = 1;
1110 vObjList = 0;
1111 curObj = 0;
1112
1113 if (yyparse() != 0)
1114 return 0;
1115
1116 finiLex();
1117 return vObjList;
1118 }
1119
1120/*--------------------------------------------*/
1121DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len)
1122 {
1123 initLex(input, len, 0);
1124 return Parse_MIMEHelper();
1125 }
1126
1127
1128#if INCLUDEMFC
1129
1130DLLEXPORT(VObject*) Parse_MIME_FromFile(CFile *file)
1131 {
1132 unsigned long startPos;
1133 VObject *result;
1134
1135 initLex(0,-1,file);
1136 startPos = file->GetPosition();
1137 if (!(result = Parse_MIMEHelper()))
1138 file->Seek(startPos, CFile::begin);
1139 return result;
1140 }
1141
1142#else
1143
1144VObject* Parse_MIME_FromFile(FILE *file)
1145 {
1146 VObject *result;
1147 long startPos;
1148
1149 initLex(0,(unsigned long)-1,file);
1150 startPos = ftell(file);
1151 if (!(result = Parse_MIMEHelper())) {
1152 fseek(file,startPos,SEEK_SET);
1153 }
1154 return result;
1155 }
1156
1157DLLEXPORT(VObject*) Parse_MIME_FromFileName(char *fname)
1158 {
1159 FILE *fp = fopen(fname,"r");
1160 if (fp) {
1161 VObject* o = Parse_MIME_FromFile(fp);
1162 fclose(fp);
1163 return o;
1164 }
1165 else {
1166 char msg[80];
1167 sprintf(msg, "can't open file '%s' for reading\n", fname);
1168 mime_error_(msg);
1169 return 0;
1170 }
1171 }
1172
1173#endif
1174
1175/*-------------------------------------*/
1176
1177static MimeErrorHandler mimeErrorHandler;
1178
1179DLLEXPORT(void) registerMimeErrorHandler(MimeErrorHandler me)
1180 {
1181 mimeErrorHandler = me;
1182 }
1183
1184void mime_error(char *s)
1185 {
1186 char msg[256];
1187 if (mimeErrorHandler) {
1188 sprintf(msg,"%s at line %d", s, mime_lineNum);
1189 mimeErrorHandler(msg);
1190 }
1191 }
1192
1193void mime_error_(char *s)
1194 {
1195 if (mimeErrorHandler) {
1196 mimeErrorHandler(s);
1197 }
1198 }
1199
diff --git a/library/backend/vobject.cpp b/library/backend/vobject.cpp
new file mode 100644
index 0000000..af112a7
--- a/dev/null
+++ b/library/backend/vobject.cpp
@@ -0,0 +1,1210 @@
1/***************************************************************************
2(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
3Business Machines Corporation and Siemens Rolm Communications Inc.
4
5For purposes of this license notice, the term Licensors shall mean,
6collectively, Apple Computer, Inc., AT&T Corp., International
7Business Machines Corporation and Siemens Rolm Communications Inc.
8The term Licensor shall mean any of the Licensors.
9
10Subject to acceptance of the following conditions, permission is hereby
11granted by Licensors without the need for written agreement and without
12license or royalty fees, to use, copy, modify and distribute this
13software for any purpose.
14
15The above copyright notice and the following four paragraphs must be
16reproduced in all copies of this software and any software including
17this software.
18
19THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE
20ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR
21MODIFICATIONS.
22
23IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,
24INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
25OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
26DAMAGE.
27
28EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,
29INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE
30IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
31PURPOSE.
32
33The software is provided with RESTRICTED RIGHTS. Use, duplication, or
34disclosure by the government are subject to restrictions set forth in
35DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
36
37***************************************************************************/
38
39/*
40 * src: vobject.c
41 * doc: vobject and APIs to construct vobject, APIs pretty print
42 * vobject, and convert a vobject into its textual representation.
43 */
44
45 #ifndef MWERKS
46#include <malloc.h>
47#endif
48
49#include "vobject_p.h"
50#include "qfiledirect_p.h"
51#include <string.h>
52#include <stdio.h>
53#include <fcntl.h>
54//#include <io.h>
55
56
57 #define NAME_OF(o) o->id
58 #define VALUE_TYPE(o) o->valType
59 #define STRINGZ_VALUE_OF(o) o->val.strs
60 #define INTEGER_VALUE_OF(o) o->val.i
61 #define LONG_VALUE_OF(o) o->val.l
62 #define ANY_VALUE_OF(o) o->val.any
63 #define VOBJECT_VALUE_OF(o) o->val.vobj
64
65typedef union ValueItem {
66 const char *strs;
67 unsigned int i;
68 unsigned long l;
69 void *any;
70 VObject *vobj;
71 } ValueItem;
72
73struct VObject {
74 VObject *next;
75 const char *id;
76 VObject *prop;
77 unsigned short valType;
78 ValueItem val;
79 };
80
81typedef struct StrItem StrItem;
82
83struct StrItem {
84 StrItem *next;
85 const char *s;
86 unsigned int refCnt;
87 };
88
89const char** fieldedProp;
90
91
92
93/*----------------------------------------------------------------------
94 The following functions involve with memory allocation:
95 newVObject
96 deleteVObject
97 dupStr
98 deleteStr
99 newStrItem
100 deleteStrItem
101 ----------------------------------------------------------------------*/
102
103DLLEXPORT(VObject*) newVObject_(const char *id)
104{
105 VObject *p = (VObject*)malloc(sizeof(VObject));
106 p->next = 0;
107 p->id = id;
108 p->prop = 0;
109 VALUE_TYPE(p) = 0;
110 ANY_VALUE_OF(p) = 0;
111 return p;
112}
113
114DLLEXPORT(VObject*) newVObject(const char *id)
115{
116 return newVObject_(lookupStr(id));
117}
118
119DLLEXPORT(void) deleteVObject(VObject *p)
120{
121 unUseStr(p->id);
122 free(p);
123}
124
125DLLEXPORT(char*) dupStr(const char *s, unsigned int size)
126{
127 char *t;
128 if (size == 0) {
129 size = strlen(s);
130 }
131 t = (char*)malloc(size+1);
132 if (t) {
133 memcpy(t,s,size);
134 t[size] = 0;
135 return t;
136 }
137 else {
138 return (char*)0;
139 }
140}
141
142DLLEXPORT(void) deleteStr(const char *p)
143{
144 if (p) free((void*)p);
145}
146
147
148static StrItem* newStrItem(const char *s, StrItem *next)
149{
150 StrItem *p = (StrItem*)malloc(sizeof(StrItem));
151 p->next = next;
152 p->s = s;
153 p->refCnt = 1;
154 return p;
155}
156
157static void deleteStrItem(StrItem *p)
158{
159 free((void*)p);
160}
161
162
163/*----------------------------------------------------------------------
164 The following function provide accesses to VObject's value.
165 ----------------------------------------------------------------------*/
166
167DLLEXPORT(const char*) vObjectName(VObject *o)
168{
169 return NAME_OF(o);
170}
171
172DLLEXPORT(void) setVObjectName(VObject *o, const char* id)
173{
174 NAME_OF(o) = id;
175}
176
177DLLEXPORT(const char*) vObjectStringZValue(VObject *o)
178{
179 return STRINGZ_VALUE_OF(o);
180}
181
182DLLEXPORT(void) setVObjectStringZValue(VObject *o, const char *s)
183{
184 STRINGZ_VALUE_OF(o) = dupStr(s,0);
185 VALUE_TYPE(o) = VCVT_STRINGZ;
186}
187
188DLLEXPORT(void) setVObjectStringZValue_(VObject *o, const char *s)
189{
190 STRINGZ_VALUE_OF(o) = s;
191 VALUE_TYPE(o) = VCVT_STRINGZ;
192}
193
194DLLEXPORT(unsigned int) vObjectIntegerValue(VObject *o)
195{
196 return INTEGER_VALUE_OF(o);
197}
198
199DLLEXPORT(void) setVObjectIntegerValue(VObject *o, unsigned int i)
200{
201 INTEGER_VALUE_OF(o) = i;
202 VALUE_TYPE(o) = VCVT_UINT;
203}
204
205DLLEXPORT(unsigned long) vObjectLongValue(VObject *o)
206{
207 return LONG_VALUE_OF(o);
208}
209
210DLLEXPORT(void) setVObjectLongValue(VObject *o, unsigned long l)
211{
212 LONG_VALUE_OF(o) = l;
213 VALUE_TYPE(o) = VCVT_ULONG;
214}
215
216DLLEXPORT(void*) vObjectAnyValue(VObject *o)
217{
218 return ANY_VALUE_OF(o);
219}
220
221DLLEXPORT(void) setVObjectAnyValue(VObject *o, void *t)
222{
223 ANY_VALUE_OF(o) = t;
224 VALUE_TYPE(o) = VCVT_RAW;
225}
226
227DLLEXPORT(VObject*) vObjectVObjectValue(VObject *o)
228{
229 return VOBJECT_VALUE_OF(o);
230}
231
232DLLEXPORT(void) setVObjectVObjectValue(VObject *o, VObject *p)
233{
234 VOBJECT_VALUE_OF(o) = p;
235 VALUE_TYPE(o) = VCVT_VOBJECT;
236}
237
238DLLEXPORT(int) vObjectValueType(VObject *o)
239{
240 return VALUE_TYPE(o);
241}
242
243
244/*----------------------------------------------------------------------
245 The following functions can be used to build VObject.
246 ----------------------------------------------------------------------*/
247
248DLLEXPORT(VObject*) addVObjectProp(VObject *o, VObject *p)
249{
250 /* circular link list pointed to tail */
251 /*
252 o {next,id,prop,val}
253 V
254 pn {next,id,prop,val}
255 V
256 ...
257 p1 {next,id,prop,val}
258 V
259 pn
260 -->
261 o {next,id,prop,val}
262 V
263 pn {next,id,prop,val}
264 V
265 p {next,id,prop,val}
266 ...
267 p1 {next,id,prop,val}
268 V
269 pn
270 */
271
272 VObject *tail = o->prop;
273 if (tail) {
274 p->next = tail->next;
275 o->prop = tail->next = p;
276 }
277 else {
278 o->prop = p->next = p;
279 }
280 return p;
281}
282
283DLLEXPORT(VObject*) addProp(VObject *o, const char *id)
284{
285 return addVObjectProp(o,newVObject(id));
286}
287
288DLLEXPORT(VObject*) addProp_(VObject *o, const char *id)
289{
290 return addVObjectProp(o,newVObject_(id));
291}
292
293DLLEXPORT(void) addList(VObject **o, VObject *p)
294{
295 p->next = 0;
296 if (*o == 0) {
297 *o = p;
298 }
299 else {
300 VObject *t = *o;
301 while (t->next) {
302 t = t->next;
303 }
304 t->next = p;
305 }
306}
307
308DLLEXPORT(VObject*) nextVObjectInList(VObject *o)
309{
310 return o->next;
311}
312
313DLLEXPORT(VObject*) setValueWithSize_(VObject *prop, void *val, unsigned int size)
314{
315 VObject *sizeProp;
316 setVObjectAnyValue(prop, val);
317 sizeProp = addProp(prop,VCDataSizeProp);
318 setVObjectLongValue(sizeProp, size);
319 return prop;
320}
321
322DLLEXPORT(VObject*) setValueWithSize(VObject *prop, void *val, unsigned int size)
323{
324 void *p = dupStr((const char *)val,size);
325 return setValueWithSize_(prop,p,p?size:0);
326}
327
328DLLEXPORT(void) initPropIterator(VObjectIterator *i, VObject *o)
329{
330 i->start = o->prop;
331 i->next = 0;
332}
333
334DLLEXPORT(void) initVObjectIterator(VObjectIterator *i, VObject *o)
335{
336 i->start = o->next;
337 i->next = 0;
338}
339
340DLLEXPORT(int) moreIteration(VObjectIterator *i)
341{
342 return (i->start && (i->next==0 || i->next!=i->start));
343}
344
345DLLEXPORT(VObject*) nextVObject(VObjectIterator *i)
346{
347 if (i->start && i->next != i->start) {
348 if (i->next == 0) {
349 i->next = i->start->next;
350 return i->next;
351 }
352 else {
353 i->next = i->next->next;
354 return i->next;
355 }
356 }
357 else return (VObject*)0;
358}
359
360DLLEXPORT(VObject*) isAPropertyOf(VObject *o, const char *id)
361{
362 VObjectIterator i;
363 initPropIterator(&i,o);
364 while (moreIteration(&i)) {
365 VObject *each = nextVObject(&i);
366 if (!qstricmp(id,each->id))
367 return each;
368 }
369 return (VObject*)0;
370}
371
372DLLEXPORT(VObject*) addGroup(VObject *o, const char *g)
373{
374 /*
375 a.b.c
376 -->
377 prop(c)
378 prop(VCGrouping=b)
379 prop(VCGrouping=a)
380 */
381 char *dot = strrchr(g,'.');
382 if (dot) {
383 VObject *p, *t;
384 char *gs, *n = dot+1;
385 gs = dupStr(g,0);/* so we can write to it. */
386 /* used to be
387 * t = p = addProp_(o,lookupProp_(n));
388 */
389 t = p = addProp_(o,lookupProp(n));
390 dot = strrchr(gs,'.');
391 *dot = 0;
392 do {
393 dot = strrchr(gs,'.');
394 if (dot) {
395 n = dot+1;
396 *dot=0;
397 }
398 else
399 n = gs;
400 /* property(VCGroupingProp=n);
401 *and the value may have VCGrouping property
402 */
403 t = addProp(t,VCGroupingProp);
404 setVObjectStringZValue(t,lookupProp_(n));
405 } while (n != gs);
406 deleteStr(gs);
407 return p;
408 }
409 else
410 return addProp_(o,lookupProp(g));
411}
412
413DLLEXPORT(VObject*) addPropValue(VObject *o, const char *p, const char *v)
414{
415 VObject *prop;
416 prop = addProp(o,p);
417 setVObjectStringZValue_(prop, strdup( v ) );
418 return prop;
419}
420
421DLLEXPORT(VObject*) addPropSizedValue_(VObject *o, const char *p, const char *v,
422 unsigned int size)
423{
424 VObject *prop;
425 prop = addProp(o,p);
426 setValueWithSize_(prop, (void*)v, size);
427 return prop;
428}
429
430DLLEXPORT(VObject*) addPropSizedValue(VObject *o, const char *p, const char *v,
431 unsigned int size)
432{
433 return addPropSizedValue_(o,p,dupStr(v,size),size);
434}
435
436
437DLLEXPORT(void) cleanVObject(VObject *o)
438{
439 if (o == 0) return;
440 if (o->prop) {
441 /* destroy time: cannot use the iterator here.
442 Have to break the cycle in the circular link
443 list and turns it into regular NULL-terminated
444 list -- since at some point of destruction,
445 the reference entry for the iterator to work
446 will not longer be valid.
447 */
448 VObject *p;
449 p = o->prop->next;
450 o->prop->next = 0;
451 do {
452 VObject *t = p->next;
453 cleanVObject(p);
454 p = t;
455 } while (p);
456 }
457 switch (VALUE_TYPE(o)) {
458 case VCVT_STRINGZ:
459 case VCVT_RAW:
460 // assume they are all allocated by malloc.
461 free((char*)STRINGZ_VALUE_OF(o));
462 break;
463 case VCVT_VOBJECT:
464 cleanVObject(VOBJECT_VALUE_OF(o));
465 break;
466 }
467 deleteVObject(o);
468}
469
470DLLEXPORT(void) cleanVObjects(VObject *list)
471{
472 while (list) {
473 VObject *t = list;
474 list = nextVObjectInList(list);
475 cleanVObject(t);
476 }
477}
478
479/*----------------------------------------------------------------------
480 The following is a String Table Facilities.
481 ----------------------------------------------------------------------*/
482
483#define STRTBLSIZE 255
484
485static StrItem *strTbl[STRTBLSIZE];
486
487static unsigned int hashStr(const char *s)
488{
489 unsigned int h = 0;
490 int i;
491 for (i=0;s[i];i++) {
492 h += s[i]*i;
493 }
494 return h % STRTBLSIZE;
495}
496
497DLLEXPORT(const char*) lookupStr(const char *s)
498{
499 StrItem *t;
500 unsigned int h = hashStr(s);
501 if ((t = strTbl[h]) != 0) {
502 do {
503 if (qstricmp(t->s,s) == 0) {
504 t->refCnt++;
505 return t->s;
506 }
507 t = t->next;
508 } while (t);
509 }
510 s = dupStr(s,0);
511 strTbl[h] = newStrItem(s,strTbl[h]);
512 return s;
513}
514
515DLLEXPORT(void) unUseStr(const char *s)
516{
517 StrItem *t, *p;
518 unsigned int h = hashStr(s);
519 if ((t = strTbl[h]) != 0) {
520 p = t;
521 do {
522 if (qstricmp(t->s,s) == 0) {
523 t->refCnt--;
524 if (t->refCnt == 0) {
525 if (p == strTbl[h]) {
526 strTbl[h] = t->next;
527 }
528 else {
529 p->next = t->next;
530 }
531 deleteStr(t->s);
532 deleteStrItem(t);
533 return;
534 }
535 }
536 p = t;
537 t = t->next;
538 } while (t);
539 }
540}
541
542DLLEXPORT(void) cleanStrTbl()
543{
544 int i;
545 for (i=0; i<STRTBLSIZE;i++) {
546 StrItem *t = strTbl[i];
547 while (t) {
548 StrItem *p;
549 deleteStr(t->s);
550 p = t;
551 t = t->next;
552 deleteStrItem(p);
553 } while (t);
554 strTbl[i] = 0;
555 }
556}
557
558
559struct PreDefProp {
560 const char *name;
561 const char *alias;
562 const char** fields;
563 unsigned int flags;
564 };
565
566/* flags in PreDefProp */
567 #define PD_BEGIN0x1
568 #define PD_INTERNAL0x2
569
570static const char *adrFields[] = {
571 VCPostalBoxProp,
572 VCExtAddressProp,
573 VCStreetAddressProp,
574 VCCityProp,
575 VCRegionProp,
576 VCPostalCodeProp,
577 VCCountryNameProp,
578 0
579};
580
581static const char *nameFields[] = {
582 VCFamilyNameProp,
583 VCGivenNameProp,
584 VCAdditionalNamesProp,
585 VCNamePrefixesProp,
586 VCNameSuffixesProp,
587 NULL
588 };
589
590static const char *orgFields[] = {
591 VCOrgNameProp,
592 VCOrgUnitProp,
593 VCOrgUnit2Prop,
594 VCOrgUnit3Prop,
595 VCOrgUnit4Prop,
596 NULL
597 };
598
599static const char *AAlarmFields[] = {
600 VCRunTimeProp,
601 VCSnoozeTimeProp,
602 VCRepeatCountProp,
603 VCAudioContentProp,
604 0
605 };
606
607/* ExDate -- has unamed fields */
608/* RDate -- has unamed fields */
609
610static const char *DAlarmFields[] = {
611 VCRunTimeProp,
612 VCSnoozeTimeProp,
613 VCRepeatCountProp,
614 VCDisplayStringProp,
615 0
616 };
617
618static const char *MAlarmFields[] = {
619 VCRunTimeProp,
620 VCSnoozeTimeProp,
621 VCRepeatCountProp,
622 VCEmailAddressProp,
623 VCNoteProp,
624 0
625 };
626
627static const char *PAlarmFields[] = {
628 VCRunTimeProp,
629 VCSnoozeTimeProp,
630 VCRepeatCountProp,
631 VCProcedureNameProp,
632 0
633 };
634
635static struct PreDefProp propNames[] = {
636 { VC7bitProp, 0, 0, 0 },
637 { VC8bitProp, 0, 0, 0 },
638 { VCAAlarmProp, 0, AAlarmFields, 0 },
639 { VCAdditionalNamesProp, 0, 0, 0 },
640 { VCAdrProp, 0, adrFields, 0 },
641 { VCAgentProp, 0, 0, 0 },
642 { VCAIFFProp, 0, 0, 0 },
643 { VCAOLProp, 0, 0, 0 },
644 { VCAppleLinkProp, 0, 0, 0 },
645 { VCAttachProp, 0, 0, 0 },
646 { VCAttendeeProp, 0, 0, 0 },
647 { VCATTMailProp, 0, 0, 0 },
648 { VCAudioContentProp, 0, 0, 0 },
649 { VCAVIProp, 0, 0, 0 },
650 { VCBase64Prop, 0, 0, 0 },
651 { VCBBSProp, 0, 0, 0 },
652 { VCBirthDateProp, 0, 0, 0 },
653 { VCBMPProp, 0, 0, 0 },
654 { VCBodyProp, 0, 0, 0 },
655 { VCBusinessRoleProp, 0, 0, 0 },
656 { VCCalProp, 0, 0, PD_BEGIN },
657 { VCCaptionProp, 0, 0, 0 },
658 { VCCardProp, 0, 0, PD_BEGIN },
659 { VCCarProp, 0, 0, 0 },
660 { VCCategoriesProp, 0, 0, 0 },
661 { VCCellularProp, 0, 0, 0 },
662 { VCCGMProp, 0, 0, 0 },
663 { VCCharSetProp, 0, 0, 0 },
664 { VCCIDProp, VCContentIDProp, 0, 0 },
665 { VCCISProp, 0, 0, 0 },
666 { VCCityProp, 0, 0, 0 },
667 { VCClassProp, 0, 0, 0 },
668 { VCCommentProp, 0, 0, 0 },
669 { VCCompletedProp, 0, 0, 0 },
670 { VCContentIDProp, 0, 0, 0 },
671 { VCCountryNameProp, 0, 0, 0 },
672 { VCDAlarmProp, 0, DAlarmFields, 0 },
673 { VCDataSizeProp, 0, 0, PD_INTERNAL },
674 { VCDayLightProp, 0, 0, 0 },
675 { VCDCreatedProp, 0, 0, 0 },
676 { VCDeliveryLabelProp, 0, 0, 0 },
677 { VCDescriptionProp, 0, 0, 0 },
678 { VCDIBProp, 0, 0, 0 },
679 { VCDisplayStringProp, 0, 0, 0 },
680 { VCDomesticProp, 0, 0, 0 },
681 { VCDTendProp, 0, 0, 0 },
682 { VCDTstartProp, 0, 0, 0 },
683 { VCDueProp, 0, 0, 0 },
684 { VCEmailAddressProp, 0, 0, 0 },
685 { VCEncodingProp, 0, 0, 0 },
686 { VCEndProp, 0, 0, 0 },
687 { VCEventProp, 0, 0, PD_BEGIN },
688 { VCEWorldProp, 0, 0, 0 },
689 { VCExNumProp, 0, 0, 0 },
690 { VCExpDateProp, 0, 0, 0 },
691 { VCExpectProp, 0, 0, 0 },
692 { VCExtAddressProp, 0, 0, 0 },
693 { VCFamilyNameProp, 0, 0, 0 },
694 { VCFaxProp, 0, 0, 0 },
695 { VCFullNameProp, 0, 0, 0 },
696 { VCGeoLocationProp, 0, 0, 0 },
697 { VCGeoProp, 0, 0, 0 },
698 { VCGIFProp, 0, 0, 0 },
699 { VCGivenNameProp, 0, 0, 0 },
700 { VCGroupingProp, 0, 0, 0 },
701 { VCHomeProp, 0, 0, 0 },
702 { VCIBMMailProp, 0, 0, 0 },
703 { VCInlineProp, 0, 0, 0 },
704 { VCInternationalProp, 0, 0, 0 },
705 { VCInternetProp, 0, 0, 0 },
706 { VCISDNProp, 0, 0, 0 },
707 { VCJPEGProp, 0, 0, 0 },
708 { VCLanguageProp, 0, 0, 0 },
709 { VCLastModifiedProp, 0, 0, 0 },
710 { VCLastRevisedProp, 0, 0, 0 },
711 { VCLocationProp, 0, 0, 0 },
712 { VCLogoProp, 0, 0, 0 },
713 { VCMailerProp, 0, 0, 0 },
714 { VCMAlarmProp, 0, MAlarmFields, 0 },
715 { VCMCIMailProp, 0, 0, 0 },
716 { VCMessageProp, 0, 0, 0 },
717 { VCMETProp, 0, 0, 0 },
718 { VCModemProp, 0, 0, 0 },
719 { VCMPEG2Prop, 0, 0, 0 },
720 { VCMPEGProp, 0, 0, 0 },
721 { VCMSNProp, 0, 0, 0 },
722 { VCNamePrefixesProp, 0, 0, 0 },
723 { VCNameProp, 0, nameFields, 0 },
724 { VCNameSuffixesProp, 0, 0, 0 },
725 { VCNoteProp, 0, 0, 0 },
726 { VCOrgNameProp, 0, 0, 0 },
727 { VCOrgProp, 0, orgFields, 0 },
728 { VCOrgUnit2Prop, 0, 0, 0 },
729 { VCOrgUnit3Prop, 0, 0, 0 },
730 { VCOrgUnit4Prop, 0, 0, 0 },
731 { VCOrgUnitProp, 0, 0, 0 },
732 { VCPagerProp, 0, 0, 0 },
733 { VCPAlarmProp, 0, PAlarmFields, 0 },
734 { VCParcelProp, 0, 0, 0 },
735 { VCPartProp, 0, 0, 0 },
736 { VCPCMProp, 0, 0, 0 },
737 { VCPDFProp, 0, 0, 0 },
738 { VCPGPProp, 0, 0, 0 },
739 { VCPhotoProp, 0, 0, 0 },
740 { VCPICTProp, 0, 0, 0 },
741 { VCPMBProp, 0, 0, 0 },
742 { VCPostalBoxProp, 0, 0, 0 },
743 { VCPostalCodeProp, 0, 0, 0 },
744 { VCPostalProp, 0, 0, 0 },
745 { VCPowerShareProp, 0, 0, 0 },
746 { VCPreferredProp, 0, 0, 0 },
747 { VCPriorityProp, 0, 0, 0 },
748 { VCProcedureNameProp, 0, 0, 0 },
749 { VCProdIdProp, 0, 0, 0 },
750 { VCProdigyProp, 0, 0, 0 },
751 { VCPronunciationProp, 0, 0, 0 },
752 { VCPSProp, 0, 0, 0 },
753 { VCPublicKeyProp, 0, 0, 0 },
754 { VCQPProp, VCQuotedPrintableProp, 0, 0 },
755 { VCQuickTimeProp, 0, 0, 0 },
756 { VCQuotedPrintableProp, 0, 0, 0 },
757 { VCRDateProp, 0, 0, 0 },
758 { VCRegionProp, 0, 0, 0 },
759 { VCRelatedToProp, 0, 0, 0 },
760 { VCRepeatCountProp, 0, 0, 0 },
761 { VCResourcesProp, 0, 0, 0 },
762 { VCRNumProp, 0, 0, 0 },
763 { VCRoleProp, 0, 0, 0 },
764 { VCRRuleProp, 0, 0, 0 },
765 { VCRSVPProp, 0, 0, 0 },
766 { VCRunTimeProp, 0, 0, 0 },
767 { VCSequenceProp, 0, 0, 0 },
768 { VCSnoozeTimeProp, 0, 0, 0 },
769 { VCStartProp, 0, 0, 0 },
770 { VCStatusProp, 0, 0, 0 },
771 { VCStreetAddressProp, 0, 0, 0 },
772 { VCSubTypeProp, 0, 0, 0 },
773 { VCSummaryProp, 0, 0, 0 },
774 { VCTelephoneProp, 0, 0, 0 },
775 { VCTIFFProp, 0, 0, 0 },
776 { VCTimeZoneProp, 0, 0, 0 },
777 { VCTitleProp, 0, 0, 0 },
778 { VCTLXProp, 0, 0, 0 },
779 { VCTodoProp, 0, 0, PD_BEGIN },
780 { VCTranspProp, 0, 0, 0 },
781 { VCUniqueStringProp, 0, 0, 0 },
782 { VCURLProp, 0, 0, 0 },
783 { VCURLValueProp, 0, 0, 0 },
784 { VCValueProp, 0, 0, 0 },
785 { VCVersionProp, 0, 0, 0 },
786 { VCVideoProp, 0, 0, 0 },
787 { VCVoiceProp, 0, 0, 0 },
788 { VCWAVEProp, 0, 0, 0 },
789 { VCWMFProp, 0, 0, 0 },
790 { VCWorkProp, 0, 0, 0 },
791 { VCX400Prop, 0, 0, 0 },
792 { VCX509Prop, 0, 0, 0 },
793 { VCXRuleProp, 0, 0, 0 },
794 { 0,0,0,0 }
795 };
796
797
798static struct PreDefProp* lookupPropInfo(const char* str)
799{
800 /* brute force for now, could use a hash table here. */
801 int i;
802
803 for (i = 0; propNames[i].name; i++)
804 if (qstricmp(str, propNames[i].name) == 0) {
805 return &propNames[i];
806 }
807
808 return 0;
809}
810
811
812DLLEXPORT(const char*) lookupProp_(const char* str)
813{
814 int i;
815
816 for (i = 0; propNames[i].name; i++)
817 if (qstricmp(str, propNames[i].name) == 0) {
818 const char* s;
819 s = propNames[i].alias?propNames[i].alias:propNames[i].name;
820 return lookupStr(s);
821 }
822 return lookupStr(str);
823}
824
825
826DLLEXPORT(const char*) lookupProp(const char* str)
827{
828 int i;
829
830 for (i = 0; propNames[i].name; i++)
831 if (qstricmp(str, propNames[i].name) == 0) {
832 const char *s;
833 fieldedProp = propNames[i].fields;
834 s = propNames[i].alias?propNames[i].alias:propNames[i].name;
835 return lookupStr(s);
836 }
837 fieldedProp = 0;
838 return lookupStr(str);
839}
840
841
842/*----------------------------------------------------------------------
843 APIs to Output text form.
844 ----------------------------------------------------------------------*/
845#define OFILE_REALLOC_SIZE 256
846typedef struct OFile {
847 FILE *fp;
848 char *s;
849 int len;
850 int limit;
851 int alloc:1;
852 int fail:1;
853 } OFile;
854
855#if 0
856static void appendsOFile(OFile *fp, const char *s)
857{
858 int slen;
859 if (fp->fail) return;
860 slen = strlen(s);
861 if (fp->fp) {
862 fwrite(s,1,slen,fp->fp);
863 }
864 else {
865stuff:
866 if (fp->len + slen < fp->limit) {
867 memcpy(fp->s+fp->len,s,slen);
868 fp->len += slen;
869 return;
870 }
871 else if (fp->alloc) {
872 fp->limit = fp->limit + OFILE_REALLOC_SIZE;
873 if (OFILE_REALLOC_SIZE <= slen) fp->limit += slen;
874 fp->s = (char *) realloc(fp->s,fp->limit);
875 if (fp->s) goto stuff;
876 }
877 if (fp->alloc)
878 free(fp->s);
879 fp->s = 0;
880 fp->fail = 1;
881 }
882}
883
884static void appendcOFile(OFile *fp, char c)
885{
886 if (fp->fail) return;
887 if (fp->fp) {
888 fputc(c,fp->fp);
889 }
890 else {
891stuff:
892 if (fp->len+1 < fp->limit) {
893 fp->s[fp->len] = c;
894 fp->len++;
895 return;
896 }
897 else if (fp->alloc) {
898 fp->limit = fp->limit + OFILE_REALLOC_SIZE;
899 fp->s = (char *) realloc(fp->s,fp->limit);
900 if (fp->s) goto stuff;
901 }
902 if (fp->alloc)
903 free(fp->s);
904 fp->s = 0;
905 fp->fail = 1;
906 }
907}
908#else
909static void appendcOFile_(OFile *fp, char c)
910{
911 if (fp->fail) return;
912 if (fp->fp) {
913 fputc(c,fp->fp);
914 }
915 else {
916stuff:
917 if (fp->len+1 < fp->limit) {
918 fp->s[fp->len] = c;
919 fp->len++;
920 return;
921 }
922 else if (fp->alloc) {
923 fp->limit = fp->limit + OFILE_REALLOC_SIZE;
924 fp->s = (char *)realloc(fp->s,fp->limit);
925 if (fp->s) goto stuff;
926 }
927 if (fp->alloc)
928 free(fp->s);
929 fp->s = 0;
930 fp->fail = 1;
931 }
932}
933
934static void appendcOFile(OFile *fp, char c)
935{
936 if (c == '\n') {
937 /* write out as <CR><LF> */
938 appendcOFile_(fp,0xd);
939 appendcOFile_(fp,0xa);
940 }
941 else
942 appendcOFile_(fp,c);
943}
944
945static void appendsOFile(OFile *fp, const char *s)
946{
947 int i, slen;
948 slen = strlen(s);
949 for (i=0; i<slen; i++) {
950 appendcOFile(fp,s[i]);
951 }
952}
953
954#endif
955
956static void initOFile(OFile *fp, FILE *ofp)
957{
958 fp->fp = ofp;
959 fp->s = 0;
960 fp->len = 0;
961 fp->limit = 0;
962 fp->alloc = 0;
963 fp->fail = 0;
964}
965
966static int writeBase64(OFile *fp, unsigned char *s, long len)
967{
968 long cur = 0;
969 int i, numQuads = 0;
970 unsigned long trip;
971 unsigned char b;
972 char quad[5];
973#define MAXQUADS 16
974
975 quad[4] = 0;
976
977 while (cur < len) {
978 // collect the triplet of bytes into 'trip'
979 trip = 0;
980 for (i = 0; i < 3; i++) {
981 b = (cur < len) ? *(s + cur) : 0;
982 cur++;
983 trip = trip << 8 | b;
984 }
985 // fill in 'quad' with the appropriate four characters
986 for (i = 3; i >= 0; i--) {
987 b = (unsigned char)(trip & 0x3F);
988 trip = trip >> 6;
989 if ((3 - i) < (cur - len))
990 quad[i] = '='; // pad char
991 else if (b < 26) quad[i] = (char)b + 'A';
992 else if (b < 52) quad[i] = (char)(b - 26) + 'a';
993 else if (b < 62) quad[i] = (char)(b - 52) + '0';
994 else if (b == 62) quad[i] = '+';
995 else quad[i] = '/';
996 }
997 // now output 'quad' with appropriate whitespace and line ending
998 appendsOFile(fp, (numQuads == 0 ? " " : ""));
999 appendsOFile(fp, quad);
1000 appendsOFile(fp, ((cur >= len)?"\n" :(numQuads==MAXQUADS-1?"\n" : "")));
1001 numQuads = (numQuads + 1) % MAXQUADS;
1002 }
1003 appendcOFile(fp,'\n');
1004
1005 return 1;
1006}
1007
1008static void writeQPString(OFile *fp, const char *s)
1009{
1010 const char *p = s;
1011 while (*p) {
1012 if (*p == '\n') {
1013 if (p[1]) appendsOFile(fp,"=0A=");
1014 }
1015 appendcOFile(fp,*p);
1016 p++;
1017 }
1018}
1019
1020
1021
1022static void writeVObject_(OFile *fp, VObject *o);
1023
1024static void writeValue(OFile *fp, VObject *o, unsigned long size)
1025{
1026 if (o == 0) return;
1027 switch (VALUE_TYPE(o)) {
1028 case VCVT_STRINGZ: {
1029 writeQPString(fp, STRINGZ_VALUE_OF(o));
1030 break;
1031 }
1032 case VCVT_UINT: {
1033 char buf[16];
1034 sprintf(buf,"%u", INTEGER_VALUE_OF(o));
1035 appendsOFile(fp,buf);
1036 break;
1037 }
1038 case VCVT_ULONG: {
1039 char buf[16];
1040 sprintf(buf,"%lu", LONG_VALUE_OF(o));
1041 appendsOFile(fp,buf);
1042 break;
1043 }
1044 case VCVT_RAW: {
1045 appendcOFile(fp,'\n');
1046 writeBase64(fp,(unsigned char*)(ANY_VALUE_OF(o)),size);
1047 break;
1048 }
1049 case VCVT_VOBJECT:
1050 appendcOFile(fp,'\n');
1051 writeVObject_(fp,VOBJECT_VALUE_OF(o));
1052 break;
1053 }
1054}
1055
1056static void writeAttrValue(OFile *fp, VObject *o)
1057{
1058 if (NAME_OF(o)) {
1059 struct PreDefProp *pi;
1060 pi = lookupPropInfo(NAME_OF(o));
1061 if (pi && ((pi->flags & PD_INTERNAL) != 0)) return;
1062 appendcOFile(fp,';');
1063 appendsOFile(fp,NAME_OF(o));
1064 }
1065 else
1066 appendcOFile(fp,';');
1067 if (VALUE_TYPE(o)) {
1068 appendcOFile(fp,'=');
1069 writeValue(fp,o,0);
1070 }
1071}
1072
1073static void writeGroup(OFile *fp, VObject *o)
1074{
1075 char buf1[256];
1076 char buf2[256];
1077 strcpy(buf1,NAME_OF(o));
1078 while ((o=isAPropertyOf(o,VCGroupingProp)) != 0) {
1079 strcpy(buf2,STRINGZ_VALUE_OF(o));
1080 strcat(buf2,".");
1081 strcat(buf2,buf1);
1082 strcpy(buf1,buf2);
1083 }
1084 appendsOFile(fp,buf1);
1085}
1086
1087static int inList(const char **list, const char *s)
1088{
1089 if (list == 0) return 0;
1090 while (*list) {
1091 if (qstricmp(*list,s) == 0) return 1;
1092 list++;
1093 }
1094 return 0;
1095}
1096
1097static void writeProp(OFile *fp, VObject *o)
1098{
1099 if (NAME_OF(o)) {
1100 struct PreDefProp *pi;
1101 VObjectIterator t;
1102 const char **fields_ = 0;
1103 pi = lookupPropInfo(NAME_OF(o));
1104 if (pi && ((pi->flags & PD_BEGIN) != 0)) {
1105 writeVObject_(fp,o);
1106 return;
1107 }
1108 if (isAPropertyOf(o,VCGroupingProp))
1109 writeGroup(fp,o);
1110 else
1111 appendsOFile(fp,NAME_OF(o));
1112 if (pi) fields_ = pi->fields;
1113 initPropIterator(&t,o);
1114 while (moreIteration(&t)) {
1115 const char *s;
1116 VObject *eachProp = nextVObject(&t);
1117 s = NAME_OF(eachProp);
1118 if (qstricmp(VCGroupingProp,s) && !inList(fields_,s))
1119 writeAttrValue(fp,eachProp);
1120 }
1121 if (fields_) {
1122 int i = 0, n = 0;
1123 const char** fields = fields_;
1124 /* output prop as fields */
1125 appendcOFile(fp,':');
1126 while (*fields) {
1127 VObject *t = isAPropertyOf(o,*fields);
1128 i++;
1129 if (t) n = i;
1130 fields++;
1131 }
1132 fields = fields_;
1133 for (i=0;i<n;i++) {
1134 writeValue(fp,isAPropertyOf(o,*fields),0);
1135 fields++;
1136 if (i<(n-1)) appendcOFile(fp,';');
1137 }
1138 }
1139 }
1140
1141 if (VALUE_TYPE(o)) {
1142 unsigned long size = 0;
1143 VObject *p = isAPropertyOf(o,VCDataSizeProp);
1144 if (p) size = LONG_VALUE_OF(p);
1145 appendcOFile(fp,':');
1146 writeValue(fp,o,size);
1147 }
1148
1149 appendcOFile(fp,'\n');
1150}
1151
1152static void writeVObject_(OFile *fp, VObject *o)
1153{
1154 if (NAME_OF(o)) {
1155 struct PreDefProp *pi;
1156 pi = lookupPropInfo(NAME_OF(o));
1157
1158 if (pi && ((pi->flags & PD_BEGIN) != 0)) {
1159 VObjectIterator t;
1160 const char *begin = NAME_OF(o);
1161 appendsOFile(fp,"BEGIN:");
1162 appendsOFile(fp,begin);
1163 appendcOFile(fp,'\n');
1164 initPropIterator(&t,o);
1165 while (moreIteration(&t)) {
1166 VObject *eachProp = nextVObject(&t);
1167 writeProp(fp, eachProp);
1168 }
1169 appendsOFile(fp,"END:");
1170 appendsOFile(fp,begin);
1171 appendsOFile(fp,"\n\n");
1172 }
1173 }
1174}
1175
1176void writeVObject(FILE *fp, VObject *o)
1177{
1178 OFile ofp;
1179 // #####
1180 //_setmode(_fileno(fp), _O_BINARY);
1181 initOFile(&ofp,fp);
1182 writeVObject_(&ofp,o);
1183}
1184
1185DLLEXPORT(void) writeVObjectToFile(char *fname, VObject *o)
1186{
1187 QFileDirect f( fname);
1188 if ( !f.open( IO_WriteOnly ) ) {
1189 qWarning("Unable to open vobject write %s", fname);
1190 return;
1191 }
1192
1193 writeVObject( f.directHandle(),o );
1194}
1195
1196DLLEXPORT(void) writeVObjectsToFile(char *fname, VObject *list)
1197{
1198 QFileDirect f( fname);
1199 if ( !f.open( IO_WriteOnly ) ) {
1200 qWarning("Unable to open vobject write %s", fname);
1201 return;
1202 }
1203
1204 while (list) {
1205 writeVObject(f.directHandle(),list);
1206 list = nextVObjectInList(list);
1207 }
1208}
1209
1210// end of source file vobject.c
diff --git a/library/backend/vobject_p.h b/library/backend/vobject_p.h
new file mode 100644
index 0000000..b6a2c0a
--- a/dev/null
+++ b/library/backend/vobject_p.h
@@ -0,0 +1,401 @@
1/***************************************************************************
2(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
3Business Machines Corporation and Siemens Rolm Communications Inc.
4
5For purposes of this license notice, the term Licensors shall mean,
6collectively, Apple Computer, Inc., AT&T Corp., International
7Business Machines Corporation and Siemens Rolm Communications Inc.
8The term Licensor shall mean any of the Licensors.
9
10Subject to acceptance of the following conditions, permission is hereby
11granted by Licensors without the need for written agreement and without
12license or royalty fees, to use, copy, modify and distribute this
13software for any purpose.
14
15The above copyright notice and the following four paragraphs must be
16reproduced in all copies of this software and any software including
17this software.
18
19THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE
20ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR
21MODIFICATIONS.
22
23IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,
24INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
25OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
26DAMAGE.
27
28EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,
29INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE
30IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
31PURPOSE.
32
33The software is provided with RESTRICTED RIGHTS. Use, duplication, or
34disclosure by the government are subject to restrictions set forth in
35DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
36
37***************************************************************************/
38
39/*
40
41The vCard/vCalendar C interface is implemented in the set
42of files as follows:
43
44vcc.y, yacc source, and vcc.c, the yacc output you will use
45implements the core parser
46
47vobject.c implements an API that insulates the caller from
48the parser and changes in the vCard/vCalendar BNF
49
50port.h defines compilation environment dependent stuff
51
52vcc.h and vobject.h are header files for their .c counterparts
53
54vcaltmp.h and vcaltmp.c implement vCalendar "macro" functions
55which you may find useful.
56
57test.c is a standalone test driver that exercises some of
58the features of the APIs provided. Invoke test.exe on a
59VCARD/VCALENDAR input text file and you will see the pretty
60print output of the internal representation (this pretty print
61output should give you a good idea of how the internal
62representation looks like -- there is one such output in the
63following too). Also, a file with the .out suffix is generated
64to show that the internal representation can be written back
65in the original text format.
66
67For more information on this API see the readme.txt file
68which accompanied this distribution.
69
70 Also visit:
71
72 http://www.versit.com
73 http://www.ralden.com
74
75*/
76
77
78#ifndef __VOBJECT_H__
79#define __VOBJECT_H__ 1
80
81#include <qstring.h>
82
83 #define vCardClipboardFormat "+//ISBN 1-887687-00-9::versit::PDI//vCard"
84 #define vCalendarClipboardFormat"+//ISBN 1-887687-00-9::versit::PDI//vCalendar"
85
86/* The above strings vCardClipboardFormat and vCalendarClipboardFormat
87are globally unique IDs which can be used to generate clipboard format
88ID's as per the requirements of a specific platform. For example, in
89Windows they are used as the parameter in a call to RegisterClipboardFormat.
90For example:
91
92 CLIPFORMAT foo = RegisterClipboardFormat(vCardClipboardFormat);
93
94*/
95
96 #define vCardMimeType "text/x-vCard"
97 #define vCalendarMimeType"text/x-vCalendar"
98
99#undef DLLEXPORT
100#include <qglobal.h>
101#if defined(Q_WS_WIN)
102#define DLLEXPORT(t) __declspec(dllexport) t
103#else
104#define DLLEXPORT(t) t
105#endif
106
107#ifndef FALSE
108 #define FALSE0
109#endif
110#ifndef TRUE
111 #define TRUE1
112#endif
113
114#include <stdlib.h>
115#include <stdio.h>
116
117
118 #define VC7bitProp "7BIT"
119 #define VC8bitProp "8BIT"
120 #define VCAAlarmProp "AALARM"
121 #define VCAdditionalNamesProp"ADDN"
122 #define VCAdrProp "ADR"
123 #define VCAgentProp "AGENT"
124 #define VCAIFFProp "AIFF"
125 #define VCAOLProp "AOL"
126 #define VCAppleLinkProp "APPLELINK"
127 #define VCAttachProp "ATTACH"
128 #define VCAttendeeProp "ATTENDEE"
129 #define VCATTMailProp "ATTMAIL"
130 #define VCAudioContentProp "AUDIOCONTENT"
131 #define VCAVIProp "AVI"
132 #define VCBase64Prop "BASE64"
133 #define VCBBSProp "BBS"
134 #define VCBirthDateProp "BDAY"
135 #define VCBMPProp "BMP"
136 #define VCBodyProp "BODY"
137 #define VCBusinessRoleProp "ROLE"
138 #define VCCalProp "VCALENDAR"
139 #define VCCaptionProp "CAP"
140 #define VCCardProp "VCARD"
141 #define VCCarProp "CAR"
142 #define VCCategoriesProp "CATEGORIES"
143 #define VCCellularProp "CELL"
144 #define VCCGMProp "CGM"
145 #define VCCharSetProp "CS"
146 #define VCCIDProp "CID"
147 #define VCCISProp "CIS"
148 #define VCCityProp "L"
149 #define VCClassProp "CLASS"
150 #define VCCommentProp "NOTE"
151 #define VCCompletedProp "COMPLETED"
152 #define VCContentIDProp "CONTENT-ID"
153 #define VCCountryNameProp "C"
154 #define VCDAlarmProp "DALARM"
155 #define VCDataSizeProp "DATASIZE"
156 #define VCDayLightProp "DAYLIGHT"
157 #define VCDCreatedProp "DCREATED"
158#define VCDeliveryLabelProp "LABEL"
159 #define VCDescriptionProp "DESCRIPTION"
160 #define VCDIBProp "DIB"
161 #define VCDisplayStringProp "DISPLAYSTRING"
162 #define VCDomesticProp "DOM"
163 #define VCDTendProp "DTEND"
164 #define VCDTstartProp "DTSTART"
165 #define VCDueProp "DUE"
166 #define VCEmailAddressProp "EMAIL"
167 #define VCEncodingProp "ENCODING"
168 #define VCEndProp "END"
169 #define VCEventProp "VEVENT"
170 #define VCEWorldProp "EWORLD"
171 #define VCExNumProp "EXNUM"
172 #define VCExpDateProp "EXDATE"
173 #define VCExpectProp "EXPECT"
174 #define VCExtAddressProp "EXT ADD"
175 #define VCFamilyNameProp "F"
176 #define VCFaxProp "FAX"
177 #define VCFullNameProp "FN"
178 #define VCGeoProp "GEO"
179 #define VCGeoLocationProp "GEO"
180 #define VCGIFProp "GIF"
181 #define VCGivenNameProp "G"
182 #define VCGroupingProp "Grouping"
183 #define VCHomeProp "HOME"
184 #define VCIBMMailProp "IBMMail"
185 #define VCInlineProp "INLINE"
186 #define VCInternationalProp "INTL"
187 #define VCInternetProp "INTERNET"
188 #define VCISDNProp "ISDN"
189 #define VCJPEGProp "JPEG"
190 #define VCLanguageProp "LANG"
191 #define VCLastModifiedProp "LAST-MODIFIED"
192 #define VCLastRevisedProp "REV"
193 #define VCLocationProp "LOCATION"
194 #define VCLogoProp "LOGO"
195 #define VCMailerProp "MAILER"
196 #define VCMAlarmProp "MALARM"
197 #define VCMCIMailProp "MCIMAIL"
198 #define VCMessageProp "MSG"
199 #define VCMETProp "MET"
200 #define VCModemProp "MODEM"
201 #define VCMPEG2Prop "MPEG2"
202 #define VCMPEGProp "MPEG"
203 #define VCMSNProp "MSN"
204 #define VCNamePrefixesProp "NPRE"
205 #define VCNameProp "N"
206 #define VCNameSuffixesProp "NSUF"
207 #define VCNoteProp "NOTE"
208 #define VCOrgNameProp "ORGNAME"
209 #define VCOrgProp "ORG"
210 #define VCOrgUnit2Prop "OUN2"
211 #define VCOrgUnit3Prop "OUN3"
212 #define VCOrgUnit4Prop "OUN4"
213 #define VCOrgUnitProp "OUN"
214 #define VCPagerProp "PAGER"
215 #define VCPAlarmProp "PALARM"
216 #define VCParcelProp "PARCEL"
217 #define VCPartProp "PART"
218 #define VCPCMProp "PCM"
219 #define VCPDFProp "PDF"
220 #define VCPGPProp "PGP"
221 #define VCPhotoProp "PHOTO"
222 #define VCPICTProp "PICT"
223 #define VCPMBProp "PMB"
224 #define VCPostalBoxProp "BOX"
225 #define VCPostalCodeProp "PC"
226 #define VCPostalProp "POSTAL"
227 #define VCPowerShareProp "POWERSHARE"
228 #define VCPreferredProp "PREF"
229 #define VCPriorityProp "PRIORITY"
230 #define VCProcedureNameProp "PROCEDURENAME"
231 #define VCProdIdProp "PRODID"
232 #define VCProdigyProp "PRODIGY"
233 #define VCPronunciationProp "SOUND"
234 #define VCPSProp "PS"
235 #define VCPublicKeyProp "KEY"
236 #define VCQPProp "QP"
237 #define VCQuickTimeProp "QTIME"
238 #define VCQuotedPrintableProp"QUOTED-PRINTABLE"
239 #define VCRDateProp "RDATE"
240 #define VCRegionProp "R"
241 #define VCRelatedToProp "RELATED-TO"
242 #define VCRepeatCountProp "REPEATCOUNT"
243 #define VCResourcesProp "RESOURCES"
244 #define VCRNumProp "RNUM"
245 #define VCRoleProp "ROLE"
246 #define VCRRuleProp "RRULE"
247 #define VCRSVPProp "RSVP"
248 #define VCRunTimeProp "RUNTIME"
249 #define VCSequenceProp "SEQUENCE"
250 #define VCSnoozeTimeProp "SNOOZETIME"
251 #define VCStartProp "START"
252 #define VCStatusProp "STATUS"
253 #define VCStreetAddressProp "STREET"
254 #define VCSubTypeProp "SUBTYPE"
255 #define VCSummaryProp "SUMMARY"
256 #define VCTelephoneProp "TEL"
257 #define VCTIFFProp "TIFF"
258 #define VCTimeZoneProp "TZ"
259 #define VCTitleProp "TITLE"
260 #define VCTLXProp "TLX"
261 #define VCTodoProp "VTODO"
262 #define VCTranspProp "TRANSP"
263 #define VCUniqueStringProp "UID"
264 #define VCURLProp "URL"
265 #define VCURLValueProp "URLVAL"
266 #define VCValueProp "VALUE"
267 #define VCVersionProp "VERSION"
268 #define VCVideoProp "VIDEO"
269 #define VCVoiceProp "VOICE"
270 #define VCWAVEProp "WAVE"
271 #define VCWMFProp "WMF"
272 #define VCWorkProp "WORK"
273 #define VCX400Prop "X400"
274 #define VCX509Prop "X509"
275 #define VCXRuleProp "XRULE"
276
277
278typedef struct VObject VObject;
279
280typedef struct VObjectIterator {
281 VObject* start;
282 VObject* next;
283 } VObjectIterator;
284
285extern DLLEXPORT(VObject*) newVObject(const char *id);
286extern DLLEXPORT(void) deleteVObject(VObject *p);
287extern DLLEXPORT(char*) dupStr(const char *s, unsigned int size);
288extern DLLEXPORT(void) deleteStr(const char *p);
289extern DLLEXPORT(void) unUseStr(const char *s);
290
291extern DLLEXPORT(void) setVObjectName(VObject *o, const char* id);
292extern DLLEXPORT(void) setVObjectStringZValue(VObject *o, const char *s);
293extern DLLEXPORT(void) setVObjectStringZValue_(VObject *o, const char *s);
294extern DLLEXPORT(void) setVObjectIntegerValue(VObject *o, unsigned int i);
295extern DLLEXPORT(void) setVObjectLongValue(VObject *o, unsigned long l);
296extern DLLEXPORT(void) setVObjectAnyValue(VObject *o, void *t);
297extern DLLEXPORT(VObject*) setValueWithSize(VObject *prop, void *val, unsigned int size);
298extern DLLEXPORT(VObject*) setValueWithSize_(VObject *prop, void *val, unsigned int size);
299
300extern DLLEXPORT(const char*) vObjectName(VObject *o);
301extern DLLEXPORT(const char*) vObjectStringZValue(VObject *o);
302extern DLLEXPORT(unsigned int) vObjectIntegerValue(VObject *o);
303extern DLLEXPORT(unsigned long) vObjectLongValue(VObject *o);
304extern DLLEXPORT(void*) vObjectAnyValue(VObject *o);
305extern DLLEXPORT(VObject*) vObjectVObjectValue(VObject *o);
306extern DLLEXPORT(void) setVObjectVObjectValue(VObject *o, VObject *p);
307
308extern DLLEXPORT(VObject*) addVObjectProp(VObject *o, VObject *p);
309extern DLLEXPORT(VObject*) addProp(VObject *o, const char *id);
310extern DLLEXPORT(VObject*) addProp_(VObject *o, const char *id);
311extern DLLEXPORT(VObject*) addPropValue(VObject *o, const char *p, const char *v);
312extern DLLEXPORT(VObject*) addPropSizedValue_(VObject *o, const char *p, const char *v, unsigned int size);
313extern DLLEXPORT(VObject*) addPropSizedValue(VObject *o, const char *p, const char *v, unsigned int size);
314extern DLLEXPORT(VObject*) addGroup(VObject *o, const char *g);
315extern DLLEXPORT(void) addList(VObject **o, VObject *p);
316
317extern DLLEXPORT(VObject*) isAPropertyOf(VObject *o, const char *id);
318
319extern DLLEXPORT(VObject*) nextVObjectInList(VObject *o);
320extern DLLEXPORT(void) initPropIterator(VObjectIterator *i, VObject *o);
321extern DLLEXPORT(int) moreIteration(VObjectIterator *i);
322extern DLLEXPORT(VObject*) nextVObject(VObjectIterator *i);
323
324extern DLLEXPORT(const char*) lookupStr(const char *s);
325extern DLLEXPORT(void) cleanStrTbl();
326
327extern DLLEXPORT(void) cleanVObject(VObject *o);
328extern DLLEXPORT(void) cleanVObjects(VObject *list);
329
330extern DLLEXPORT(const char*) lookupProp(const char* str);
331extern DLLEXPORT(const char*) lookupProp_(const char* str);
332
333extern DLLEXPORT(void) writeVObjectToFile(char *fname, VObject *o);
334extern DLLEXPORT(void) writeVObjectsToFile(char *fname, VObject *list);
335
336extern DLLEXPORT(int) vObjectValueType(VObject *o);
337
338/* return type of vObjectValueType: */
339 #define VCVT_NOVALUE0
340 /* if the VObject has no value associated with it. */
341 #define VCVT_STRINGZ1
342 /* if the VObject has value set by setVObjectStringZValue. */
343 #define VCVT_UINT 2
344 /* if the VObject has value set by setVObjectIntegerValue. */
345 #define VCVT_ULONG 3
346 /* if the VObject has value set by setVObjectLongValue. */
347 #define VCVT_RAW 4
348 /* if the VObject has value set by setVObjectAnyValue. */
349 #define VCVT_VOBJECT5
350 /* if the VObject has value set by setVObjectVObjectValue. */
351
352extern const char** fieldedProp;
353
354/***************************************************
355 * The methods below are implemented in vcc.c (generated from vcc.y )
356 ***************************************************/
357
358/* NOTE regarding printVObject and writeVObject
359
360The functions below are not exported from the DLL because they
361take a FILE* as a parameter, which cannot be passed across a DLL
362interface (at least that is my experience). Instead you can use
363their companion functions which take file names or pointers
364to memory. However, if you are linking this code into
365your build directly then you may find them a more convenient API
366and you can go ahead and use them. If you try to use them with
367the DLL LIB you will get a link error.
368*/
369extern void writeVObject(FILE *fp, VObject *o);
370
371
372
373typedef void (*MimeErrorHandler)(char *);
374
375extern DLLEXPORT(void) registerMimeErrorHandler(MimeErrorHandler);
376
377extern DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len);
378extern DLLEXPORT(VObject*) Parse_MIME_FromFileName(char* fname);
379
380
381/* NOTE regarding Parse_MIME_FromFile
382The function above, Parse_MIME_FromFile, comes in two flavors,
383neither of which is exported from the DLL. Each version takes
384a CFile or FILE* as a parameter, neither of which can be
385passed across a DLL interface (at least that is my experience).
386If you are linking this code into your build directly then
387you may find them a more convenient API that the other flavors
388that take a file name. If you use them with the DLL LIB you
389will get a link error.
390*/
391
392
393#if INCLUDEMFC
394extern VObject* Parse_MIME_FromFile(CFile *file);
395#else
396extern VObject* Parse_MIME_FromFile(FILE *file);
397#endif
398
399#endif /* __VOBJECT_H__ */
400
401
diff --git a/library/calendar.cpp b/library/calendar.cpp
new file mode 100644
index 0000000..b9ef585
--- a/dev/null
+++ b/library/calendar.cpp
@@ -0,0 +1,66 @@
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#include "calendar.h"
21
22#include <qdatetime.h>
23
24QString Calendar::nameOfMonth( int m )
25{
26 QDate d;
27 return d.monthName( m );
28}
29
30QString Calendar::nameOfDay( int d )
31{
32 QDate dt;
33 return dt.dayName( d );
34}
35
36QValueList<Calendar::Day> Calendar::daysOfMonth( int year, int month,
37 bool startWithMonday )
38{
39 QDate temp;
40 temp.setYMD( year, month, 1 );
41 int firstDay = temp.dayOfWeek();
42 int i;
43 QDate prev;
44 QValueList<Day> days;
45
46 if ( startWithMonday )
47 i = 1;
48 else
49 i = 0;
50
51 if ( month > 1 )
52 prev.setYMD( year, month - 1, 1 );
53 else
54 prev.setYMD( year - 1, 12, 1 );
55 for ( ; i < firstDay; i++ ) {
56 days.append( Day( prev.daysInMonth() - ( firstDay - i - 1 ),
57 Day::PrevMonth, FALSE ) );
58 }
59 for ( i = 1; i <= temp.daysInMonth(); i++ )
60 days.append( Day( i, Day::ThisMonth, FALSE ) );
61 i = 0;
62 while ( days.count() < 6 * 7 )
63 days.append( Day( ++i, Day::NextMonth, FALSE ) );
64
65 return days;
66}
diff --git a/library/calendar.h b/library/calendar.h
new file mode 100644
index 0000000..b716f8e
--- a/dev/null
+++ b/library/calendar.h
@@ -0,0 +1,47 @@
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#ifndef CALENDAR_H
21#define CALENDAR_H
22
23#include <qstring.h>
24#include <qvaluelist.h>
25
26class Calendar
27{
28public:
29 struct Day
30 {
31 enum Type { PrevMonth, ThisMonth, NextMonth };
32
33 Day() : date( 0 ), type( ThisMonth ), holiday( FALSE ) {}
34 Day( int d, Type t, bool h ) : date( d ), type( t ), holiday( h ) {}
35
36 int date;
37 Type type;
38 bool holiday;
39 };
40
41 static QString nameOfMonth( int m );
42 static QString nameOfDay( int d );
43 static QValueList<Day> daysOfMonth( int year, int month, bool startWithMonday = FALSE );
44
45};
46
47#endif
diff --git a/library/categoryedit_p.cpp b/library/categoryedit_p.cpp
new file mode 100644
index 0000000..06e5fec
--- a/dev/null
+++ b/library/categoryedit_p.cpp
@@ -0,0 +1,227 @@
1/**********************************************************************
2** Copyright (C) 2001 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 "categoryedit_p.h"
22
23#include <qpe/categories.h>
24
25#include <qdir.h>
26#include <qcheckbox.h>
27#include <qlineedit.h>
28#include <qlistview.h>
29#include <qstringlist.h>
30#include <qtoolbutton.h>
31
32#include <sys/types.h>
33#include <sys/stat.h>
34
35#include <stdlib.h>
36
37
38using namespace Qtopia;
39
40class CategoryEditPrivate
41{
42public:
43 CategoryEditPrivate( QWidget *parent, const QString &appName )
44 : mCategories( parent, "" ),
45 mStrApp( appName )
46 {
47 editItem = 0;
48 mCategories.load( categoryFileName() );
49 }
50 Categories mCategories;
51 QListViewItem *editItem;
52 QString mStrApp;
53 QString mVisible;
54};
55
56CategoryEdit::CategoryEdit( QWidget *parent, const char *name )
57 : CategoryEditBase( parent, name )
58{
59 d = 0;
60}
61
62CategoryEdit::CategoryEdit( const QArray<int> &recCats,
63 const QString &appName, const QString &visibleName,
64 QWidget *parent, const char *name )
65 : CategoryEditBase( parent, name )
66{
67 d = 0;
68 setCategories( recCats, appName, visibleName );
69}
70
71void CategoryEdit::setCategories( const QArray<int> &recCats,
72 const QString &appName, const QString &visibleName )
73{
74 if ( !d )
75 d = new CategoryEditPrivate( (QWidget*)parent(), name() );
76 d->mStrApp = appName;
77 d->mVisible = visibleName;
78 QArray<int> cats = d->mCategories.ids( d->mStrApp );
79 lvView->clear();
80 QStringList appCats = d->mCategories.labels( d->mStrApp );
81 QStringList::ConstIterator it;
82 int i, j;
83 for ( i = 0, it = appCats.begin(); it != appCats.end(); i++, ++it ) {
84 QCheckListItem *chk;
85 chk = new QCheckListItem( lvView, (*it), QCheckListItem::CheckBox );
86 if ( !d->mCategories.isGlobal((*it)) )
87 chk->setText( 1, tr(d->mVisible) );
88 else
89 chk->setText( 1, tr("All") );
90 // Is this record using this category, then we should check it
91 for ( j = 0; j < int(recCats.count()); j++ ) {
92 if ( cats[i] == recCats[j] ) {
93 chk->setOn( true );
94 break;
95 }
96 }
97 }
98 lvView->setSorting( 0, TRUE );
99 lvView->sort();
100 if ( lvView->childCount() < 1 )
101 txtCat->setEnabled( FALSE );
102 else {
103 lvView->setSelected( lvView->firstChild(), true );
104 }
105}
106
107CategoryEdit::~CategoryEdit()
108{
109 if ( d )
110 delete d;
111}
112
113void CategoryEdit::slotSetText( QListViewItem *selected )
114{
115 d->editItem = selected;
116 if ( !d->editItem )
117 return;
118 txtCat->setText( d->editItem->text(0) );
119 txtCat->setEnabled( true );
120 if ( d->editItem->text(1) == tr("All") )
121 chkGlobal->setChecked( true );
122 else
123 chkGlobal->setChecked( false );
124}
125
126void CategoryEdit::slotAdd()
127{
128 QString name = tr( "New Category" );
129 bool insertOk = FALSE;
130 int num = 0;
131 while ( !insertOk ) {
132 if ( num++ > 0 )
133 name = tr("New Category ") + QString::number(num);
134 insertOk = d->mCategories.addCategory( d->mStrApp, name );
135 }
136 QCheckListItem *chk;
137 chk = new QCheckListItem( lvView, name, QCheckListItem::CheckBox );
138 if ( !chkGlobal->isChecked() )
139 chk->setText( 1, tr(d->mVisible) );
140 else
141 chk->setText( 1, tr("All") );
142
143 lvView->setSelected( chk, TRUE );
144 txtCat->selectAll();
145}
146
147void CategoryEdit::slotRemove()
148{
149 d->editItem = lvView->selectedItem();
150 if ( d->editItem ) {
151 QListViewItem *sibling = d->editItem->nextSibling();
152
153 d->mCategories.removeCategory( d->mStrApp, d->editItem->text(0) );
154
155 delete d->editItem;
156 d->editItem = 0;
157
158 if ( sibling )
159 lvView->setSelected( sibling, TRUE );
160 }
161 if ( lvView->childCount() < 1 ) {
162 txtCat->clear();
163 txtCat->setEnabled( FALSE );
164 }
165}
166
167void CategoryEdit::slotSetGlobal( bool isChecked )
168{
169 if ( d->editItem ) {
170 if ( isChecked )
171 d->editItem->setText( 1, tr("All") );
172 else
173 d->editItem->setText( 1, tr(d->mVisible) );
174
175 d->mCategories.setGlobal( d->mStrApp, d->editItem->text( 0 ), isChecked );
176 }
177}
178
179void CategoryEdit::slotTextChanged( const QString &strNew )
180{
181 if ( d->editItem ) {
182 if ( chkGlobal->isChecked() )
183 d->mCategories.renameGlobalCategory( d->editItem->text(0), strNew );
184 else
185 d->mCategories.renameCategory( d->mStrApp, d->editItem->text(0), strNew );
186 d->editItem->setText( 0, strNew );
187 }
188}
189
190QArray<int> CategoryEdit::newCategories()
191{
192 QArray<int> a;
193 if ( d ) {
194 d->mCategories.save( categoryFileName() );
195 QListViewItemIterator it( lvView );
196 QValueList<int> l;
197 for ( ; it.current(); ++it ) {
198 if ( reinterpret_cast<QCheckListItem*>(it.current())->isOn() )
199 l.append( d->mCategories.id( d->mStrApp, it.current()->text(0) ) );
200 }
201 uint i = 0;
202 a.resize( l.count() );
203 for ( QValueList<int>::Iterator lit = l.begin(); lit != l.end(); ++lit )
204 a[i++] = *lit;
205 }
206 return a;
207}
208
209void CategoryEdit::accept()
210{
211 // write our categories out...
212 d->mCategories.save( categoryFileName() );
213 // QDialog::accept();
214}
215
216QString categoryFileName()
217{
218 QDir dir = (QString(getenv("HOME")) + "/Settings");
219 if ( !dir.exists() )
220 mkdir( dir.path().local8Bit(), 0700 );
221 return dir.path() + "/" + "Categories" + ".xml";
222}
223
224void CategoryEdit::kludge()
225{
226 lvView->setMaximumHeight( 130 );
227}
diff --git a/library/categoryedit_p.h b/library/categoryedit_p.h
new file mode 100644
index 0000000..bb7f571
--- a/dev/null
+++ b/library/categoryedit_p.h
@@ -0,0 +1,60 @@
1/**********************************************************************
2** Copyright (C) 2001 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 __CATEGORYEDIT_H__
22#define __CATEGORYEDIT_H__
23
24#include "categoryeditbase_p.h"
25#include <qarray.h>
26
27class CategoryEditPrivate;
28
29class CategoryEdit : public CategoryEditBase
30{
31 Q_OBJECT
32
33public:
34 CategoryEdit( QWidget *parent = 0, const char *name = 0 );
35 CategoryEdit( const QArray<int> &vlRecs, const QString &appName,
36 const QString &visibleName,
37 QWidget *parent = 0, const char *name = 0 );
38 ~CategoryEdit();
39 void setCategories( const QArray<int> &vlRecs,
40 const QString &appName, const QString &visibleName );
41 QArray<int> newCategories();
42 void kludge();
43
44protected:
45 void accept();
46
47protected slots:
48 void slotAdd();
49 void slotRemove();
50 void slotSetText( QListViewItem *selected );
51 void slotSetGlobal( bool isChecked );
52 void slotTextChanged( const QString &strNew );
53
54private:
55 CategoryEditPrivate *d;
56};
57
58QString categoryFileName();
59
60#endif
diff --git a/library/categoryeditbase_p.ui b/library/categoryeditbase_p.ui
new file mode 100644
index 0000000..a76e433
--- a/dev/null
+++ b/library/categoryeditbase_p.ui
@@ -0,0 +1,223 @@
1<!DOCTYPE UI><UI>
2<class>CategoryEditBase</class>
3<comment>/**********************************************************************
4** Copyright (C) 2001 Trolltech AS. All rights reserved.
5**
6** This file is part of Qtopia Environment.
7**
8** This file may be distributed and/or modified under the terms of the
9** GNU General Public License version 2 as published by the Free Software
10** Foundation and appearing in the file LICENSE.GPL included in the
11** packaging of this file.
12**
13** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
14** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15**
16** See http://www.trolltech.com/gpl/ for GPL licensing information.
17**
18** Contact info@trolltech.com if any conditions of this licensing are
19** not clear to you.
20**
21**********************************************************************/</comment>
22<widget>
23 <class>QWidget</class>
24 <property stdset="1">
25 <name>name</name>
26 <cstring>CategoryEditBase</cstring>
27 </property>
28 <property stdset="1">
29 <name>geometry</name>
30 <rect>
31 <x>0</x>
32 <y>0</y>
33 <width>201</width>
34 <height>287</height>
35 </rect>
36 </property>
37 <property stdset="1">
38 <name>caption</name>
39 <string>Category Edit</string>
40 </property>
41 <property>
42 <name>layoutMargin</name>
43 </property>
44 <property>
45 <name>layoutSpacing</name>
46 </property>
47 <vbox>
48 <property stdset="1">
49 <name>margin</name>
50 <number>3</number>
51 </property>
52 <property stdset="1">
53 <name>spacing</name>
54 <number>3</number>
55 </property>
56 <widget>
57 <class>QListView</class>
58 <column>
59 <property>
60 <name>text</name>
61 <string>Categories</string>
62 </property>
63 <property>
64 <name>clickable</name>
65 <bool>true</bool>
66 </property>
67 <property>
68 <name>resizeable</name>
69 <bool>true</bool>
70 </property>
71 </column>
72 <column>
73 <property>
74 <name>text</name>
75 <string>Application</string>
76 </property>
77 <property>
78 <name>clickable</name>
79 <bool>true</bool>
80 </property>
81 <property>
82 <name>resizeable</name>
83 <bool>true</bool>
84 </property>
85 </column>
86 <item>
87 <property>
88 <name>text</name>
89 <string>Categories Go Here</string>
90 </property>
91 <property>
92 <name>text</name>
93 <string></string>
94 </property>
95 <property>
96 <name>pixmap</name>
97 <pixmap></pixmap>
98 </property>
99 <property>
100 <name>pixmap</name>
101 <pixmap></pixmap>
102 </property>
103 </item>
104 <property stdset="1">
105 <name>name</name>
106 <cstring>lvView</cstring>
107 </property>
108 </widget>
109 <widget>
110 <class>QLayoutWidget</class>
111 <property stdset="1">
112 <name>name</name>
113 <cstring>Layout2</cstring>
114 </property>
115 <hbox>
116 <property stdset="1">
117 <name>margin</name>
118 <number>0</number>
119 </property>
120 <property stdset="1">
121 <name>spacing</name>
122 <number>6</number>
123 </property>
124 <widget>
125 <class>QLineEdit</class>
126 <property stdset="1">
127 <name>name</name>
128 <cstring>txtCat</cstring>
129 </property>
130 </widget>
131 <widget>
132 <class>QToolButton</class>
133 <property stdset="1">
134 <name>name</name>
135 <cstring>cmdAdd</cstring>
136 </property>
137 <property stdset="1">
138 <name>focusPolicy</name>
139 <enum>TabFocus</enum>
140 </property>
141 <property stdset="1">
142 <name>text</name>
143 <string>Add</string>
144 </property>
145 </widget>
146 <widget>
147 <class>QToolButton</class>
148 <property stdset="1">
149 <name>name</name>
150 <cstring>cmdDel</cstring>
151 </property>
152 <property stdset="1">
153 <name>focusPolicy</name>
154 <enum>TabFocus</enum>
155 </property>
156 <property stdset="1">
157 <name>text</name>
158 <string></string>
159 </property>
160 <property stdset="1">
161 <name>pixmap</name>
162 <pixmap>image0</pixmap>
163 </property>
164 </widget>
165 <widget>
166 <class>QCheckBox</class>
167 <property stdset="1">
168 <name>name</name>
169 <cstring>chkGlobal</cstring>
170 </property>
171 <property stdset="1">
172 <name>text</name>
173 <string>Global</string>
174 </property>
175 </widget>
176 </hbox>
177 </widget>
178 </vbox>
179</widget>
180<images>
181 <image>
182 <name>image0</name>
183 <data format="XPM.GZ" length="499">789ccd904d6ac3301046f73e85f0ec4c71a2ca2a36214748e9b250b2188d4649164e203f8b527af7ea934963e805fa49a0790f4948b368ccfbdbc6348bea72e5eb418cecf96c9a781bc7cf8fedfaabaaed8bc97330b67eaaead688793d1d1535e59a9625c01dd059b77465a7003dfbc13330017bd7dbde0103903bb6dc0115285e9ec503191815031881a9a4bc0121626aa74c8eb2092479a1bba318a3aa26520d74771cb46811a1dfb38939e4a4448ffb0a8ba4dddcc5c0b0ffc1f15f87aee48fa4d28276d6aba92970dfabea074d4776b4</data>
184 </image>
185</images>
186<connections>
187 <connection>
188 <sender>lvView</sender>
189 <signal>selectionChanged(QListViewItem*)</signal>
190 <receiver>CategoryEditBase</receiver>
191 <slot>slotSetText( QListViewItem* )</slot>
192 </connection>
193 <connection>
194 <sender>cmdAdd</sender>
195 <signal>clicked()</signal>
196 <receiver>CategoryEditBase</receiver>
197 <slot>slotAdd()</slot>
198 </connection>
199 <connection>
200 <sender>cmdDel</sender>
201 <signal>clicked()</signal>
202 <receiver>CategoryEditBase</receiver>
203 <slot>slotRemove()</slot>
204 </connection>
205 <connection>
206 <sender>txtCat</sender>
207 <signal>textChanged(const QString&amp;)</signal>
208 <receiver>CategoryEditBase</receiver>
209 <slot>slotTextChanged(const QString &amp;)</slot>
210 </connection>
211 <connection>
212 <sender>chkGlobal</sender>
213 <signal>toggled(bool)</signal>
214 <receiver>CategoryEditBase</receiver>
215 <slot>slotSetGlobal( bool )</slot>
216 </connection>
217 <slot access="public">slotSetGlobal( bool )</slot>
218 <slot access="public">slotAdd()</slot>
219 <slot access="public">slotRemove()</slot>
220 <slot access="public">slotSetText( QListViewItem* )</slot>
221 <slot access="public">slotTextChanged(const QString &amp;)</slot>
222</connections>
223</UI>
diff --git a/library/categorymenu.cpp b/library/categorymenu.cpp
new file mode 100644
index 0000000..52a127c
--- a/dev/null
+++ b/library/categorymenu.cpp
@@ -0,0 +1,110 @@
1/**********************************************************************
2** Copyright (C) 2001 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 "categorymenu.h"
22#include "backend/categories.h"
23#include "categoryselect.h"
24#include <qstring.h>
25#include <qmap.h>
26
27CategoryMenu::CategoryMenu( const QString &n, bool ig = TRUE,
28 QWidget *parent = 0, const char *name = 0 ) :
29 QPopupMenu(parent, name),
30 appName(n),
31 includeGlobal(ig)
32{
33 currentMid = 1;
34 reload();
35 connect(this, SIGNAL(activated(int)), this, SLOT(mapMenuId(int)));
36}
37
38CategoryMenu::~CategoryMenu( )
39{
40}
41
42void CategoryMenu::reload()
43{
44 clear();
45 Categories c;
46
47 c.load(categoryFileName());
48
49 QStringList sl = c.labels(appName, includeGlobal);
50 int mid = 1;
51
52 insertItem(tr("All"), mid);
53 mid++;
54 insertItem(tr("Unfiled"), mid);
55 mid++;
56
57 for (QStringList::Iterator it = sl.begin();
58 it != sl.end(); ++it ) {
59 int cid = c.id(appName, *it);
60 insertItem(*it, mid);
61 menuToId.insert(mid, cid);
62 idToMenu.insert(cid, mid);
63 mid++;
64 }
65
66 setItemChecked(currentMid, TRUE );
67}
68
69void CategoryMenu::mapMenuId(int id)
70{
71 if (id == currentMid)
72 return;
73 setItemChecked( currentMid, FALSE );
74 setItemChecked( id, TRUE );
75 currentMid = id;
76
77 emit categoryChange();
78}
79
80bool CategoryMenu::isSelected(const QArray<int> &cUids) const
81{
82 if (currentMid == 1)
83 return TRUE;
84
85 if (currentMid == 2 && cUids.count() == 0)
86 return TRUE;
87
88 if (cUids.contains(menuToId[currentMid]))
89 return TRUE;
90
91 return FALSE;
92}
93
94void CategoryMenu::setCurrentCategory( int newCatUid )
95{
96 if (!idToMenu.contains(newCatUid))
97 return;
98
99 mapMenuId(idToMenu[newCatUid]);
100}
101
102void CategoryMenu::setCurrentCategoryAll( )
103{
104 mapMenuId(1);
105}
106
107void CategoryMenu::setCurrentCategoryUnfiled( )
108{
109 mapMenuId(2);
110}
diff --git a/library/categorymenu.h b/library/categorymenu.h
new file mode 100644
index 0000000..c45bfca
--- a/dev/null
+++ b/library/categorymenu.h
@@ -0,0 +1,64 @@
1/**********************************************************************
2** Copyright (C) 2001 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 __CATEGORYMENU_H__
22#define __CATEGORYMENU_H__
23
24#include <qpopupmenu.h>
25#include <qstring.h>
26#include <qarray.h>
27#include <qmap.h>
28
29class CategoryMenuPrivate;
30class CategoryMenu : public QPopupMenu
31{
32 Q_OBJECT
33public:
34 CategoryMenu( const QString &appName, bool, QWidget *parent = 0,
35 const char *name = 0 );
36 ~CategoryMenu();
37
38 bool isSelected(const QArray<int> &cUids) const;
39
40 void setCurrentCategory( int newCatUid );
41 void setCurrentCategoryAll( );
42 void setCurrentCategoryUnfiled( );
43
44signals:
45 void categoryChange();
46
47public slots:
48 void reload();
49
50private slots:
51 void mapMenuId(int);
52
53private:
54 QString appName;
55 bool includeGlobal;
56
57 QMap<int, int> menuToId;
58 QMap<int, int> idToMenu;
59 int currentMid;
60
61 CategoryMenuPrivate *d;
62};
63
64#endif
diff --git a/library/categoryselect.cpp b/library/categoryselect.cpp
new file mode 100644
index 0000000..dc5d1fa
--- a/dev/null
+++ b/library/categoryselect.cpp
@@ -0,0 +1,315 @@
1/**********************************************************************
2** Copyright (C) 2001 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 <qpe/categories.h>
22
23#include <qdialog.h>
24#include <qlayout.h>
25#include <qtoolbutton.h>
26
27#include "categorywidget.h"
28#include "categoryselect.h"
29
30
31class CategoryComboPrivate
32{
33public:
34 CategoryComboPrivate(QObject *o)
35 : mCat( o )
36 {
37 }
38 QArray<int> mAppCats;
39 QString mStrAppName;
40 QString mStrVisibleName;
41 Categories mCat;
42};
43
44class CategorySelectPrivate
45{
46public:
47 CategorySelectPrivate( const QArray<int> &cats)
48 : mRec( cats ),
49 usingAll( false )
50 {
51 }
52 CategorySelectPrivate()
53 {
54 }
55 QArray<int> mRec;
56 bool usingAll;
57 QString mVisibleName;
58};
59
60CategoryCombo::CategoryCombo( QWidget *parent, const char *name )
61 : QComboBox( parent, name )
62{
63 d = new CategoryComboPrivate(this);
64}
65
66void CategoryCombo::initCombo( const QArray<int> &recCats,
67 const QString &appName )
68{
69 initCombo( recCats, appName, appName );
70}
71
72void CategoryCombo::initCombo( const QArray<int> &recCats,
73 const QString &appName,
74 const QString &visibleName )
75{
76 d->mStrAppName = appName;
77 d->mStrVisibleName = visibleName;
78 clear();
79 QStringList slApp;
80
81 QObject::connect( this, SIGNAL(activated(int)),
82 this, SLOT(slotValueChanged(int)) );
83 bool loadOk = d->mCat.load( categoryFileName() );
84 slApp = d->mCat.labels( d->mStrAppName, TRUE, Categories::UnfiledLabel );
85 d->mAppCats = d->mCat.ids( d->mStrAppName );
86
87 int i,
88 j,
89 saveMe,
90 recCount;
91 QStringList::Iterator it;
92 // now add in all the items...
93 recCount = recCats.count();
94 saveMe = -1;
95 if ( recCount > 1 && loadOk ) {
96 it = slApp.begin();
97 insertItem( *it );
98 ++it;
99 for ( j = 0; it != slApp.end(); ++it, j++ ) {
100 // grr... we have to go through and compare...
101 if ( j < int(d->mAppCats.size()) ) {
102 for ( i = 0; i < recCount; i++ ) {
103 if ( recCats[i] == d->mAppCats[j] ) {
104 (*it).append( tr(" (Multi.)") );
105 if ( saveMe < 0 )
106 saveMe = j;
107 // no need to continue through the list.
108 break;
109 }
110 }
111 }
112 insertItem( *it );
113 }
114 } else
115 insertStringList( slApp );
116
117 if ( recCount > 0 && loadOk ) {
118 for ( i = 0; i < int(d->mAppCats.size()); i++ ) {
119 if ( d->mAppCats[i] == recCats[0] ) {
120 setCurrentItem( i + 1 );
121 break;
122 }
123 }
124 } else
125 setCurrentItem( 0 ); // unfiled
126 QObject::connect( this, SIGNAL(activated(int)),
127 this, SLOT(slotValueChanged(int)) );
128}
129
130CategoryCombo::~CategoryCombo()
131{
132 delete d;
133}
134
135int CategoryCombo::currentCategory() const
136{
137 int returnMe;
138 returnMe = currentItem();
139 // unfiled is now 0...
140 if ( returnMe == 0 )
141 returnMe = -1;
142 else if ( returnMe > (int)d->mAppCats.count() ) // only happen on "All"
143 returnMe = -2;
144 else
145 returnMe = d->mAppCats[returnMe - 1];
146 return returnMe;
147}
148
149void CategoryCombo::setCurrentCategory( int newCatUid )
150{
151 int i;
152 for ( i = 0; i < int(d->mAppCats.size()); i++ ) {
153 if ( d->mAppCats[i] == newCatUid )
154 setCurrentItem( i );
155 }
156}
157
158void CategoryCombo::setCurrentText( const QString &str )
159{
160 int i;
161 int stop;
162 stop = count();
163 for ( i = 0; i < stop; i++ ) {
164 if ( text( i ) == str ) {
165 setCurrentItem( i );
166 break;
167 }
168 }
169}
170
171void CategoryCombo::slotValueChanged( int )
172{
173 emit sigCatChanged( currentCategory() );
174}
175
176CategorySelect::CategorySelect( QWidget *parent, const char *name )
177 : QHBox( parent, name ),
178 cmbCat( 0 ),
179 cmdCat( 0 ),
180 d( 0 )
181{
182 d = new CategorySelectPrivate();
183 init();
184}
185
186CategorySelect::CategorySelect( const QArray<int> &vl,
187 const QString &appName, QWidget *parent,
188 const char *name )
189 : QHBox( parent, name )
190{
191 d = new CategorySelectPrivate( vl );
192 init();
193 setCategories( vl, appName, appName );
194}
195
196CategorySelect::CategorySelect( const QArray<int> &vl,
197 const QString &appName,
198 const QString &visibleName,
199 QWidget *parent, const char *name )
200 : QHBox( parent, name )
201{
202 d = new CategorySelectPrivate( vl );
203 init();
204 setCategories( vl, appName, visibleName );
205}
206
207CategorySelect::~CategorySelect()
208{
209 delete d;
210}
211
212void CategorySelect::slotDialog()
213{
214 QDialog editDlg( this, 0, TRUE );
215 editDlg.setCaption( tr("Edit Categories") );
216 QVBoxLayout *vb = new QVBoxLayout( &editDlg );
217 QScrollView *sv = new QScrollView( &editDlg );
218 sv->setResizePolicy( QScrollView::AutoOneFit );
219 sv->setHScrollBarMode( QScrollView::AlwaysOff );
220 vb->addWidget( sv );
221 CategoryWidget ce( d->mRec, mStrAppName, d->mVisibleName, &editDlg );
222 sv->addChild( &ce );
223 editDlg.showMaximized();
224
225 if ( editDlg.exec() ) {
226 d->mRec = ce.newCategories();
227 cmbCat->initCombo( d->mRec, mStrAppName );
228 }
229}
230
231void CategorySelect::slotNewCat( int newUid )
232{
233 if ( newUid != -1 ) {
234 bool alreadyIn = false;
235 for ( uint it = 0; it < d->mRec.count(); ++it ) {
236 if ( d->mRec[it] == newUid ) {
237 alreadyIn = true;
238 break;
239 }
240 }
241 if ( !alreadyIn ) {
242 d->mRec.resize( 1 );
243 d->mRec[ 0 ] = newUid;
244 }
245 } else
246 d->mRec.resize(0); // now Unfiled.
247 emit signalSelected( currentCategory() );
248}
249
250void CategorySelect::setCategories( const QArray<int> &rec,
251 const QString &appName )
252{
253 setCategories( rec, appName, appName );
254}
255
256void CategorySelect::setCategories( const QArray<int> &rec,
257 const QString &appName,
258 const QString &visibleName )
259{
260 d->mRec = rec;
261 d->mVisibleName = visibleName;
262 mStrAppName = appName;
263 cmbCat->initCombo( rec, appName );
264}
265
266void CategorySelect::init()
267{
268 cmbCat = new CategoryCombo( this );
269 QObject::connect( cmbCat, SIGNAL(sigCatChanged(int)),
270 this, SLOT(slotNewCat(int)) );
271 cmdCat = new QToolButton( this );
272 QObject::connect( cmdCat, SIGNAL(clicked()), this, SLOT(slotDialog()) );
273 cmdCat->setTextLabel( "...", FALSE );
274 cmdCat->setUsesTextLabel( true );
275 cmdCat->setMaximumSize( cmdCat->sizeHint() );
276 cmdCat->setFocusPolicy( TabFocus );
277}
278
279
280int CategorySelect::currentCategory() const
281{
282 return cmbCat->currentCategory();
283}
284
285void CategorySelect::setCurrentCategory( int newCatUid )
286{
287 cmbCat->setCurrentCategory( newCatUid );
288}
289
290
291const QArray<int> &CategorySelect::currentCategories() const
292{
293 return d->mRec;
294}
295
296void CategorySelect::setRemoveCategoryEdit( bool remove )
297{
298 if ( remove ) {
299 cmdCat->setEnabled( FALSE );
300 cmdCat->hide();
301 } else {
302 cmdCat->setEnabled( TRUE );
303 cmdCat->show();
304 }
305}
306
307void CategorySelect::setAllCategories( bool add )
308{
309 d->usingAll = add;
310 if ( add ) {
311 cmbCat->insertItem( tr( "All" ), cmbCat->count() );
312 cmbCat->setCurrentItem( cmbCat->count() - 1 );
313 } else
314 cmbCat->removeItem( cmbCat->count() - 1 );
315}
diff --git a/library/categoryselect.h b/library/categoryselect.h
new file mode 100644
index 0000000..5c6b565
--- a/dev/null
+++ b/library/categoryselect.h
@@ -0,0 +1,105 @@
1/**********************************************************************
2** Copyright (C) 2001 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 __CATEGORYCOMBO_H__
22#define __CATEGORYCOMBO_H__
23
24#include <qcombobox.h>
25#include <qhbox.h>
26#include <qstring.h>
27#include <qarray.h>
28
29extern QString categoryFileName();
30
31class QToolButton;
32
33class CategoryComboPrivate;
34class CategoryCombo : public QComboBox
35{
36 Q_OBJECT
37
38public:
39 CategoryCombo( QWidget *parent, const char* name = 0 );
40 ~CategoryCombo();
41
42 int currentCategory() const;
43 void setCurrentCategory( int id );
44 // depreciated.
45 void initCombo( const QArray<int> &recCats, const QString &appName );
46 void initCombo( const QArray<int> &recCats, const QString &appName,
47 const QString &visibleName /* = appName */ );
48
49signals:
50 void sigCatChanged( int newUid );
51
52private slots:
53 void slotValueChanged( int );
54
55private:
56 void setCurrentText( const QString &str );
57 CategoryComboPrivate *d;
58};
59
60#endif
61
62class CategorySelectPrivate;
63class CategorySelect : public QHBox
64{
65 Q_OBJECT
66public:
67 // we need two constructors, the first gets around designer limitations
68 CategorySelect( QWidget *parent = 0, const char *name = 0 );
69
70 CategorySelect( const QArray<int> &vlCats, const QString &appName,
71 QWidget *parent = 0, const char *name = 0 );
72 CategorySelect( const QArray<int> &vlCats, const QString &appName,
73 const QString &visibleName, QWidget *parent = 0,
74 const char *name = 0 );
75 ~CategorySelect();
76
77 const QArray<int> &currentCategories() const;
78 int currentCategory() const;
79 void setCurrentCategory( int newCatUid );
80 // pretty much if you don't set it the constructor, you need to
81 // call it here ASAP!
82 // however this call is depreciated...
83 void setCategories( const QArray<int> &vlCats, const QString &appName );
84 // use this one instead (for translating )
85 void setCategories( const QArray<int> &vlCats, const QString &appName,
86 const QString &visibleName );
87
88 // these were added for find dialog.
89 void setRemoveCategoryEdit( bool remove );
90 void setAllCategories( bool add );
91
92signals:
93 void signalSelected( int );
94
95private slots:
96 void slotDialog();
97 void slotNewCat( int id );
98
99private:
100 void init();
101 QString mStrAppName;
102 CategoryCombo *cmbCat;
103 QToolButton *cmdCat;
104 CategorySelectPrivate *d;
105};
diff --git a/library/categorywidget.cpp b/library/categorywidget.cpp
new file mode 100644
index 0000000..c4e78e6
--- a/dev/null
+++ b/library/categorywidget.cpp
@@ -0,0 +1,71 @@
1/**********************************************************************
2** Copyright (C) 2001 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 "categoryedit_p.h"
22#include "categorywidget.h"
23
24CategoryWidget::CategoryWidget( QWidget *parent, const char *name )
25 : QVBox( parent, name )
26{
27 ce = new CategoryEdit( this, name );
28}
29
30CategoryWidget::CategoryWidget( const QArray<int> &vlRecs,
31 const QString &appName, QWidget *parent,
32 const char *name )
33 : QVBox( parent, name )
34{
35 ce = new CategoryEdit( vlRecs, appName, appName, this, name );
36}
37
38CategoryWidget::CategoryWidget( const QArray<int> &vlRecs,
39 const QString &appName, const QString &visibleName,
40 QWidget *parent, const char *name )
41 : QVBox( parent, name )
42{
43 ce = new CategoryEdit( vlRecs, appName, visibleName, this, name );
44}
45
46CategoryWidget::~CategoryWidget()
47{
48}
49
50void CategoryWidget::setCategories( const QArray<int> &vlRecs,
51 const QString &appName )
52{
53 ce->setCategories( vlRecs, appName, appName );
54}
55
56void CategoryWidget::setCategories( const QArray<int> &vlRecs,
57 const QString &appName,
58 const QString &visibleName )
59{
60 ce->setCategories( vlRecs, appName, visibleName );
61}
62
63QArray<int> CategoryWidget::newCategories()
64{
65 return ce->newCategories();
66}
67
68void CategoryWidget::kludge()
69{
70 ce->kludge();
71}
diff --git a/library/categorywidget.h b/library/categorywidget.h
new file mode 100644
index 0000000..12e3eb5
--- a/dev/null
+++ b/library/categorywidget.h
@@ -0,0 +1,50 @@
1/**********************************************************************
2** Copyright (C) 2001 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 __CATEGORYWIDGET_H__
22#define __CATEGORYWIDGET_H__
23
24#include <qvbox.h>
25#include <qarray.h>
26
27class CategoryEdit;
28
29class CategoryWidget : public QVBox
30{
31public:
32 CategoryWidget( QWidget *parent = 0, const char *name = 0 );
33 CategoryWidget( const QArray<int> &vlRecs, const QString &appName,
34 QWidget *parent = 0, const char *name = 0 );
35 CategoryWidget( const QArray<int> &vlRecs, const QString &appName,
36 const QString &visibleName,
37 QWidget *parent = 0, const char *name = 0 );
38 ~CategoryWidget();
39 void setCategories( const QArray<int> &vlRecs, const QString &appName );
40 void setCategories( const QArray<int> &vlRecs, const QString &appName,
41 const QString &visibleName );
42 QArray<int> newCategories();
43 void kludge();
44
45private:
46 CategoryEdit *ce;
47};
48
49
50#endif
diff --git a/library/config.cpp b/library/config.cpp
new file mode 100644
index 0000000..9634571
--- a/dev/null
+++ b/library/config.cpp
@@ -0,0 +1,557 @@
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 <qdir.h>
22#include <qfile.h>
23#include <qfileinfo.h>
24#include <qmessagebox.h>
25#if QT_VERSION <= 230 && defined(QT_NO_CODECS)
26#include <qtextcodec.h>
27#endif
28#include <qtextstream.h>
29
30#include <sys/stat.h>
31#include <sys/types.h>
32#include <fcntl.h>
33#include <stdlib.h>
34#include <unistd.h>
35
36#include "config.h"
37
38
39/*!
40 \internal
41*/
42QString Config::configFilename(const QString& name, Domain d)
43{
44 switch (d) {
45 case File:
46 return name;
47 case User: {
48 QDir dir = (QString(getenv("HOME")) + "/Settings");
49 if ( !dir.exists() )
50 mkdir(dir.path().local8Bit(),0700);
51 return dir.path() + "/" + name + ".conf";
52 }
53 }
54 return name;
55}
56
57/*!
58 \class Config config.h
59 \brief The Config class provides for saving application cofniguration state.
60
61 You should keep a Config in existence only while you do not want others
62 to be able to change the state. There is no locking currently, but there
63 may be in the future.
64*/
65
66/*!
67 \enum Config::ConfigGroup
68 \internal
69*/
70
71/*!
72 \enum Config::Domain
73
74 \value File
75 \value User
76
77 See Config for details.
78*/
79
80/*!
81 Constructs a config that will load or create a configuration with the
82 given \a name in the given \a domain.
83
84 You must call setGroup() before doing much else with the Config.
85
86 In the default Domain, \e User,
87 the configuration is user-specific. \a name should not contain "/" in
88 this case, and in general should be the name of the C++ class that is
89 primarily responsible for maintaining the configuration.
90
91 In the File Domain, \a name is an absolute filename.
92*/
93Config::Config( const QString &name, Domain domain )
94 : filename( configFilename(name,domain) )
95{
96 git = groups.end();
97 read();
98
99 lang = getenv("LANG");
100 int i = lang.find(".");
101 if ( i > 0 )
102 lang = lang.left( i );
103 i = lang.find( "_" );
104 if ( i > 0 )
105 glang = lang.left(i);
106}
107
108/*!
109 Writes any changes to disk and destroys the in-memory object.
110*/
111Config::~Config()
112{
113 if ( changed )
114 write();
115}
116
117/*!
118 Returns whether the current group has an entry called \a key.
119*/
120bool Config::hasKey( const QString &key ) const
121{
122 if ( groups.end() == git )
123 return FALSE;
124 ConfigGroup::ConstIterator it = ( *git ).find( key );
125 return it != ( *git ).end();
126}
127
128/*!
129 Sets the current group for subsequent reading and writing of
130 entries to \a gname. Grouping allows the application to partition the namespace.
131
132 This function must be called prior to any reading or writing
133 of entries.
134
135 The \a gname must not be empty.
136*/
137void Config::setGroup( const QString &gname )
138{
139 QMap< QString, ConfigGroup>::Iterator it = groups.find( gname );
140 if ( it == groups.end() ) {
141 git = groups.insert( gname, ConfigGroup() );
142 changed = TRUE;
143 return;
144 }
145 git = it;
146}
147
148/*!
149 Writes a (\a key, \a value) entry to the current group.
150
151 \sa readEntry()
152*/
153void Config::writeEntry( const QString &key, const char* value )
154{
155 writeEntry(key,QString(value));
156}
157
158/*!
159 Writes a (\a key, \a value) entry to the current group.
160
161 \sa readEntry()
162*/
163void Config::writeEntry( const QString &key, const QString &value )
164{
165 if ( git == groups.end() ) {
166 qWarning( "no group set" );
167 return;
168 }
169 if ( (*git)[key] != value ) {
170 ( *git ).insert( key, value );
171 changed = TRUE;
172 }
173}
174
175/*
176 Note that the degree of protection offered by the encryption here is
177 only sufficient to avoid the most casual observation of the configuration
178 files. People with access to the files can write down the contents and
179 decrypt it using this source code.
180
181 Conceivably, and at some burden to the user, this encryption could
182 be improved.
183*/
184static QString encipher(const QString& plain)
185{
186 // mainly, we make it long
187 QString cipher;
188 int mix=28730492;
189 for (int i=0; i<(int)plain.length(); i++) {
190 int u = plain[i].unicode();
191 int c = u ^ mix;
192 QString x = QString::number(c,36);
193 cipher.append(QChar('a'+x.length()));
194 cipher.append(x);
195 mix *= u;
196 }
197 return cipher;
198}
199
200static QString decipher(const QString& cipher)
201{
202 QString plain;
203 int mix=28730492;
204 for (int i=0; i<(int)cipher.length();) {
205 int l = cipher[i].unicode()-'a';
206 QString x = cipher.mid(i+1,l); i+=l+1;
207 int u = x.toInt(0,36) ^ mix;
208 plain.append(QChar(u));
209 mix *= u;
210 }
211 return plain;
212}
213
214/*!
215 Writes an encrypted (\a key, \a value) entry to the current group.
216
217 Note that the degree of protection offered by the encryption is
218 only sufficient to avoid the most casual observation of the configuration
219 files.
220
221 \sa readEntry()
222*/
223void Config::writeEntryCrypt( const QString &key, const QString &value )
224{
225 if ( git == groups.end() ) {
226 qWarning( "no group set" );
227 return;
228 }
229 QString evalue = encipher(value);
230 if ( (*git)[key] != evalue ) {
231 ( *git ).insert( key, evalue );
232 changed = TRUE;
233 }
234}
235
236/*!
237 Writes a (\a key, \a num) entry to the current group.
238
239 \sa readNumEntry()
240*/
241void Config::writeEntry( const QString &key, int num )
242{
243 QString s;
244 s.setNum( num );
245 writeEntry( key, s );
246}
247
248#ifdef Q_HAS_BOOL_TYPE
249/*!
250 Writes a (\a key, \a b) entry to the current group. This is equivalent
251 to writing a 0 or 1 as an integer entry.
252
253 \sa readBoolEntry()
254*/
255void Config::writeEntry( const QString &key, bool b )
256{
257 QString s;
258 s.setNum( ( int )b );
259 writeEntry( key, s );
260}
261#endif
262
263/*!
264 Writes a (\a key, \a lst) entry to the current group. The list
265 is separated by \a sep, so the strings must not contain that character.
266
267 \sa readListEntry()
268*/
269void Config::writeEntry( const QString &key, const QStringList &lst, const QChar &sep )
270{
271 QString s;
272 QStringList::ConstIterator it = lst.begin();
273 for ( ; it != lst.end(); ++it )
274 s += *it + sep;
275 writeEntry( key, s );
276}
277
278/*!
279 Removes the \a key entry from the current group. Does nothing if
280 there is no such entry.
281*/
282
283void Config::removeEntry( const QString &key )
284{
285 if ( git == groups.end() ) {
286 qWarning( "no group set" );
287 return;
288 }
289 ( *git ).remove( key );
290 changed = TRUE;
291}
292
293/*!
294 \fn bool Config::operator == ( const Config & other ) const
295
296 Tests for equality with \a other. Config objects are equal if they refer to the same filename.
297*/
298
299/*!
300 \fn bool Config::operator != ( const Config & other ) const
301
302 Tests for inequality with \a other. Config objects are equal if they refer to the same filename.
303*/
304
305/*!
306 \fn QString Config::readEntry( const QString &key, const QString &deflt ) const
307
308 Reads a string entry stored with \a key, defaulting to \a deflt if there is no entry.
309*/
310
311/*!
312 \internal
313 For compatibility, non-const version.
314*/
315QString Config::readEntry( const QString &key, const QString &deflt )
316{
317 QString res = readEntryDirect( key+"["+lang+"]" );
318 if ( !res.isNull() )
319 return res;
320 if ( !glang.isEmpty() ) {
321 res = readEntryDirect( key+"["+glang+"]" );
322 if ( !res.isNull() )
323 return res;
324 }
325 return readEntryDirect( key, deflt );
326}
327
328/*!
329 \fn QString Config::readEntryCrypt( const QString &key, const QString &deflt ) const
330
331 Reads an encrypted string entry stored with \a key, defaulting to \a deflt if there is no entry.
332*/
333
334/*!
335 \internal
336 For compatibility, non-const version.
337*/
338QString Config::readEntryCrypt( const QString &key, const QString &deflt )
339{
340 QString res = readEntryDirect( key+"["+lang+"]" );
341 if ( res.isNull() && glang.isEmpty() )
342 res = readEntryDirect( key+"["+glang+"]" );
343 if ( res.isNull() )
344 res = readEntryDirect( key, QString::null );
345 if ( res.isNull() )
346 return deflt;
347 return decipher(res);
348}
349
350/*!
351 \fn QString Config::readEntryDirect( const QString &key, const QString &deflt ) const
352 \internal
353*/
354
355/*!
356 \internal
357 For compatibility, non-const version.
358*/
359QString Config::readEntryDirect( const QString &key, const QString &deflt )
360{
361 if ( git == groups.end() ) {
362 //qWarning( "no group set" );
363 return deflt;
364 }
365 ConfigGroup::ConstIterator it = ( *git ).find( key );
366 if ( it != ( *git ).end() )
367 return *it;
368 else
369 return deflt;
370}
371
372/*!
373 \fn int Config::readNumEntry( const QString &key, int deflt ) const
374 Reads a numeric entry stored with \a key, defaulting to \a deflt if there is no entry.
375*/
376
377/*!
378 \internal
379 For compatibility, non-const version.
380*/
381int Config::readNumEntry( const QString &key, int deflt )
382{
383 QString s = readEntry( key );
384 if ( s.isEmpty() )
385 return deflt;
386 else
387 return s.toInt();
388}
389
390/*!
391 \fn bool Config::readBoolEntry( const QString &key, bool deflt ) const
392 Reads a bool entry stored with \a key, defaulting to \a deflt if there is no entry.
393*/
394
395/*!
396 \internal
397 For compatibility, non-const version.
398*/
399bool Config::readBoolEntry( const QString &key, bool deflt )
400{
401 QString s = readEntry( key );
402 if ( s.isEmpty() )
403 return deflt;
404 else
405 return (bool)s.toInt();
406}
407
408/*!
409 \fn QStringList Config::readListEntry( const QString &key, const QChar &sep ) const
410 Reads a string list entry stored with \a key, and with \a sep as the separator.
411*/
412
413/*!
414 \internal
415 For compatibility, non-const version.
416*/
417QStringList Config::readListEntry( const QString &key, const QChar &sep )
418{
419 QString s = readEntry( key );
420 if ( s.isEmpty() )
421 return QStringList();
422 else
423 return QStringList::split( sep, s );
424}
425
426/*!
427 Removes all entries from the current group.
428*/
429void Config::clearGroup()
430{
431 if ( git == groups.end() ) {
432 qWarning( "no group set" );
433 return;
434 }
435 if ( !(*git).isEmpty() ) {
436 ( *git ).clear();
437 changed = TRUE;
438 }
439}
440
441/*!
442 \internal
443*/
444void Config::write( const QString &fn )
445{
446 QString strNewFile;
447 if ( !fn.isEmpty() )
448 filename = fn;
449 strNewFile = filename + ".new";
450
451 QFile f( strNewFile );
452 if ( !f.open( IO_WriteOnly|IO_Raw ) ) {
453 qWarning( "could not open for writing `%s'", strNewFile.latin1() );
454 git = groups.end();
455 return;
456 }
457
458 QString str;
459 QCString cstr;
460 QMap< QString, ConfigGroup >::Iterator g_it = groups.begin();
461
462 for ( ; g_it != groups.end(); ++g_it ) {
463 str += "[" + g_it.key() + "]\n";
464 ConfigGroup::Iterator e_it = ( *g_it ).begin();
465 for ( ; e_it != ( *g_it ).end(); ++e_it )
466 str += e_it.key() + " = " + *e_it + "\n";
467 }
468 cstr = str.utf8();
469
470 int total_length;
471 total_length = f.writeBlock( cstr.data(), cstr.length() );
472 if ( total_length != int(cstr.length()) ) {
473 QMessageBox::critical( 0, QObject::tr("Out of Space"),
474 QObject::tr("There was a problem creating\nConfiguration Information \nfor this program.\n\nPlease free up some space and\ntry again.") );
475 f.close();
476 QFile::remove( strNewFile );
477 return;
478 }
479
480 f.close();
481 // now rename the file...
482 if ( rename( strNewFile, filename ) < 0 ) {
483 qWarning( "problem renaming the file %s to %s", strNewFile.latin1(),
484 filename.latin1() );
485 QFile::remove( strNewFile );
486 }
487}
488
489/*!
490 Returns whether the Config is in a valid state.
491*/
492bool Config::isValid() const
493{
494 return groups.end() != git;
495}
496
497/*!
498 \internal
499*/
500void Config::read()
501{
502 changed = FALSE;
503
504 if ( !QFileInfo( filename ).exists() ) {
505 git = groups.end();
506 return;
507 }
508
509 QFile f( filename );
510 if ( !f.open( IO_ReadOnly ) ) {
511 git = groups.end();
512 return;
513 }
514
515 QTextStream s( &f );
516#if QT_VERSION <= 230 && defined(QT_NO_CODECS)
517 // The below should work, but doesn't in Qt 2.3.0
518 s.setCodec( QTextCodec::codecForMib( 106 ) );
519#else
520 s.setEncoding( QTextStream::UnicodeUTF8 );
521#endif
522
523 QStringList list = QStringList::split('\n', s.read() );
524 f.close();
525
526 for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
527 if ( !parse( *it ) ) {
528 git = groups.end();
529 return;
530 }
531 }
532}
533
534/*!
535 \internal
536*/
537bool Config::parse( const QString &l )
538{
539 QString line = l.stripWhiteSpace();
540 if ( line[ 0 ] == QChar( '[' ) ) {
541 QString gname = line;
542 gname = gname.remove( 0, 1 );
543 if ( gname[ (int)gname.length() - 1 ] == QChar( ']' ) )
544 gname = gname.remove( gname.length() - 1, 1 );
545 git = groups.insert( gname, ConfigGroup() );
546 } else if ( !line.isEmpty() ) {
547 if ( git == groups.end() )
548 return FALSE;
549 int eq = line.find( '=' );
550 if ( eq == -1 )
551 return FALSE;
552 QString key = line.left(eq).stripWhiteSpace();
553 QString value = line.mid(eq+1).stripWhiteSpace();
554 ( *git ).insert( key, value );
555 }
556 return TRUE;
557}
diff --git a/library/config.h b/library/config.h
new file mode 100644
index 0000000..1dc32fa
--- a/dev/null
+++ b/library/config.h
@@ -0,0 +1,102 @@
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 CONFIG_H
22#define CONFIG_H
23
24// ##### could use QSettings with Qt 3.0
25
26#include <qmap.h>
27#include <qstringlist.h>
28
29class ConfigPrivate;
30class Config
31{
32public:
33 typedef QMap< QString, QString > ConfigGroup;
34
35 enum Domain { File, User };
36 Config( const QString &name, Domain domain=User );
37 ~Config();
38
39 bool operator == ( const Config & other ) const { return (filename == other.filename); }
40 bool operator != ( const Config & other ) const { return (filename != other.filename); }
41
42 bool isValid() const;
43 bool hasKey( const QString &key ) const;
44
45 void setGroup( const QString &gname );
46 void writeEntry( const QString &key, const char* value );
47 void writeEntry( const QString &key, const QString &value );
48 void writeEntryCrypt( const QString &key, const QString &value );
49 void writeEntry( const QString &key, int num );
50#ifdef Q_HAS_BOOL_TYPE
51 void writeEntry( const QString &key, bool b );
52#endif
53 void writeEntry( const QString &key, const QStringList &lst, const QChar &sep );
54 void removeEntry( const QString &key );
55
56 QString readEntry( const QString &key, const QString &deflt = QString::null ) const;
57 QString readEntryCrypt( const QString &key, const QString &deflt = QString::null ) const;
58 QString readEntryDirect( const QString &key, const QString &deflt = QString::null ) const;
59 int readNumEntry( const QString &key, int deflt = -1 ) const;
60 bool readBoolEntry( const QString &key, bool deflt = FALSE ) const;
61 QStringList readListEntry( const QString &key, const QChar &sep ) const;
62
63 // For compatibility, non-const versions.
64 QString readEntry( const QString &key, const QString &deflt );
65 QString readEntryCrypt( const QString &key, const QString &deflt );
66 QString readEntryDirect( const QString &key, const QString &deflt );
67 int readNumEntry( const QString &key, int deflt );
68 bool readBoolEntry( const QString &key, bool deflt );
69 QStringList readListEntry( const QString &key, const QChar &sep );
70
71 void clearGroup();
72
73 void write( const QString &fn = QString::null );
74
75protected:
76 void read();
77 bool parse( const QString &line );
78
79 QMap< QString, ConfigGroup > groups;
80 QMap< QString, ConfigGroup >::Iterator git;
81 QString filename;
82 QString lang;
83 QString glang;
84 bool changed;
85 ConfigPrivate *d;
86 static QString configFilename(const QString& name, Domain);
87};
88
89inline QString Config::readEntry( const QString &key, const QString &deflt ) const
90{ return ((Config*)this)->readEntry(key,deflt); }
91inline QString Config::readEntryCrypt( const QString &key, const QString &deflt ) const
92{ return ((Config*)this)->readEntryCrypt(key,deflt); }
93inline QString Config::readEntryDirect( const QString &key, const QString &deflt ) const
94{ return ((Config*)this)->readEntryDirect(key,deflt); }
95inline int Config::readNumEntry( const QString &key, int deflt ) const
96{ return ((Config*)this)->readNumEntry(key,deflt); }
97inline bool Config::readBoolEntry( const QString &key, bool deflt ) const
98{ return ((Config*)this)->readBoolEntry(key,deflt); }
99inline QStringList Config::readListEntry( const QString &key, const QChar &sep ) const
100{ return ((Config*)this)->readListEntry(key,sep); }
101
102#endif
diff --git a/library/custom-sharp.h b/library/custom-sharp.h
new file mode 100644
index 0000000..a149bbd
--- a/dev/null
+++ b/library/custom-sharp.h
@@ -0,0 +1,127 @@
1#define QPE_OWNAPM
2#define QPE_HAVE_TOGGLELIGHT
3#define QPE_NOCIBAUD
4#define QPE_STARTMENU
5#include <asm/sharp_apm.h>
6#ifndef APM_IOC_BATTERY_BACK_CHK
7#define APM_IOC_BATTERY_BACK_CHK _IO(APM_IOC_MAGIC, 32)
8#endif
9#ifndef APM_IOC_BATTERY_MAIN_CHK
10#define APM_IOC_BATTERY_MAIN_CHK _IO(APM_IOC_MAGIC, 33)
11#endif
12
13#include <unistd.h>
14#include <stdio.h>
15#include <signal.h>
16#include <fcntl.h>
17#include <sys/ioctl.h>
18
19#define SHARP_DEV_IOCTL_COMMAND_START 0x5680
20
21/* --- for SHARP_BUZZER device --- */
22 #defineSHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START)
23#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START)
24#define SHARP_BUZZER_SETVOLUME (SHARP_BUZZER_IOCTL_START+1)
25#define SHARP_BUZZER_GETVOLUME (SHARP_BUZZER_IOCTL_START+2)
26#define SHARP_BUZZER_ISSUPPORTED (SHARP_BUZZER_IOCTL_START+3)
27#define SHARP_BUZZER_SETMUTE (SHARP_BUZZER_IOCTL_START+4)
28#define SHARP_BUZZER_STOPSOUND (SHARP_BUZZER_IOCTL_START+5)
29
30#define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */
31#define SHARP_BUZ_KEYSOUND 2 /* key sound */
32#define SHARP_PDA_ILLCLICKSOUND 3 /* illegal click */
33#define SHARP_PDA_WARNSOUND 4 /* warning occurred */
34#define SHARP_PDA_ERRORSOUND 5 /* error occurred */
35#define SHARP_PDA_CRITICALSOUND 6 /* critical error occurred */
36#define SHARP_PDA_SYSSTARTSOUND 7 /* system start */
37#define SHARP_PDA_SYSTEMENDSOUND 8 /* system shutdown */
38#define SHARP_PDA_APPSTART 9 /* application start */
39#define SHARP_PDA_APPQUIT 10 /* application ends */
40#define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */
41#define SHARP_BUZ_DAILY_ALARM 12 /* daily alarm */
42#define SHARP_BUZ_GOT_PHONE_CALL 13 /* phone call sound */
43#define SHARP_BUZ_GOT_MAIL 14 /* mail sound */
44
45
46#define CUSTOM_BUZZER( sound ) \
47{ \
48 static int fd = open( "/dev/sharp_buz", O_RDWR|O_NONBLOCK ); \
49 ioctl( fd, SHARP_BUZZER_MAKESOUND, sound ); \
50}
51
52#define CUSTOM_SOUND_ALARM CUSTOM_BUZZER( SHARP_BUZ_SCHEDULE_ALARM )
53
54#include <sys/ioctl.h>
55#include <asm/sharp_char.h>
56
57// a bit awkward, as this value is defined in emailclient.cpp aswell...
58#define LED_MAIL 0
59#define SHARP_LED_MAIL 9
60
61#define CUSTOM_LEDS( led, status ) \
62{ \
63 if ( led == LED_MAIL ) \
64 led = SHARP_LED_MAIL; \
65 static int fd = open( "/dev/sharp_led", O_RDWR|O_NONBLOCK ); \
66 sharp_led_status leds; \
67 memset(&leds, 0, sizeof(leds)); \
68 leds.which = led; \
69 leds.status = status; \
70 ioctl( fd, SHARP_LED_SETSTATUS, (char*)&leds ); \
71}
72
73#define QPE_HAVE_MEMALERTER
74
75#define QPE_MEMALERTER_IMPL \
76static void sig_handler(int sig) \
77{ \
78 switch (sig) { \
79 case SIGHUP: \
80 memstate = VeryLow; \
81 break; \
82 case SIGUSR1: \
83 memstate = Normal; \
84 break; \
85 case SIGUSR2: \
86 memstate = Low; \
87 break; \
88 } \
89} \
90static void initMemalerter() \
91{ \
92 struct sigaction sa; \
93 memset(&sa, '\0', sizeof sa); \
94 sa.sa_handler = sig_handler; \
95 sa.sa_flags = SA_RESTART; \
96 if (sigaction(SIGHUP, &sa, NULL) < 0) { \
97 return; \
98 } \
99 if (sigaction(SIGUSR1, &sa, NULL) < 0) { \
100 return; \
101 } \
102 if (sigaction(SIGUSR2, &sa, NULL) < 0) { \
103 return; \
104 } \
105 FILE *fo = fopen("/proc/sys/vm/freepg_signal_proc", "w"); \
106 \
107 if (!fo) \
108 return; \
109 fprintf(fo, "qpe\n"); \
110 fclose(fo); \
111}
112
113#define QPE_INITIAL_NUMLOCK_STATE \
114{ \
115 bool numLock = FALSE; \
116 sharp_kbdctl_modifstat st; \
117 int dev = ::open("/dev/sharp_kbdctl", O_RDWR); \
118 if( dev >= 0 ) { \
119 memset(&st, 0, sizeof(st)); \
120 st.which = 3; \
121 int ret = ioctl(dev, SHARP_KBDCTL_GETMODIFSTAT, (char*)&st); \
122 if( !ret ) \
123 numLock = (bool)st.stat; \
124 ::close(dev); \
125 } \
126 return numLock; \
127}
diff --git a/library/datebookdb.cpp b/library/datebookdb.cpp
new file mode 100644
index 0000000..bf7fd94
--- a/dev/null
+++ b/library/datebookdb.cpp
@@ -0,0 +1,1121 @@
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 <qasciidict.h>
22#include <qfile.h>
23#include <qmessagebox.h>
24#include <qstring.h>
25#include <qtextcodec.h>
26#include <qtextstream.h>
27#include <qtl.h>
28
29#include <qpe/alarmserver.h>
30#include <qpe/global.h>
31#include "datebookdb.h"
32#include <qpe/stringutil.h>
33#include <qpe/timeconversion.h>
34
35#include <errno.h>
36#include <stdlib.h>
37
38
39class DateBookDBPrivate
40{
41public:
42 bool clean; // indcate whether we need to write to disk...
43};
44
45
46// Helper functions
47
48static QString dateBookJournalFile()
49{
50 QString str = getenv("HOME");
51 return QString( str +"/.caljournal" );
52}
53
54static QString dateBookFilename()
55{
56 return Global::applicationFileName("datebook","datebook.xml");
57}
58
59/* Calculating the next event of a recuring event is actually
60 computationally inexpensive, esp. compared to checking each day
61 individually. There are bad worse cases for say the 29th of
62 february or the 31st of some other months. However
63 these are still bounded */
64bool nextOccurance(const Event &e, const QDate &from, QDateTime &next)
65{
66 // easy checks, first are we too far in the future or too far in the past?
67 QDate tmpDate;
68 int freq = e.repeatPattern().frequency;
69 int diff, diff2, a;
70 int iday, imonth, iyear;
71 int dayOfWeek = 0;
72 int firstOfWeek = 0;
73 int weekOfMonth;
74
75
76 if (e.repeatPattern().hasEndDate && e.repeatPattern().endDate() < from)
77 return FALSE;
78
79 if (e.start() >= from) {
80 next = e.start();
81 return TRUE;
82 }
83
84 switch ( e.repeatPattern().type ) {
85 case Event::Weekly:
86 /* weekly is just daily by 7 */
87 /* first convert the repeatPattern.Days() mask to the next
88 day of week valid after from */
89 dayOfWeek = from.dayOfWeek();
90 dayOfWeek--; /* we want 0-6, doco for above specs 1-7 */
91
92 /* this is done in case freq > 1 and from in week not
93 for this round */
94 // firstOfWeek = 0; this is already done at decl.
95 while(!((1 << firstOfWeek) & e.repeatPattern().days))
96 firstOfWeek++;
97
98 /* there is at least one 'day', or there would be no event */
99 while(!((1 << (dayOfWeek % 7)) & e.repeatPattern().days))
100 dayOfWeek++;
101
102 dayOfWeek = dayOfWeek % 7; /* the actual day of week */
103 dayOfWeek -= e.start().date().dayOfWeek() -1;
104
105 firstOfWeek = firstOfWeek % 7; /* the actual first of week */
106 firstOfWeek -= e.start().date().dayOfWeek() -1;
107
108 // dayOfWeek may be negitive now
109 // day of week is number of days to add to start day
110
111 freq *= 7;
112 // FALL-THROUGH !!!!!
113 case Event::Daily:
114 // the add is for the possible fall through from weekly */
115 if(e.start().date().addDays(dayOfWeek) > from) {
116 /* first week exception */
117 next = QDateTime(e.start().date().addDays(dayOfWeek),
118 e.start().time());
119 if ((next.date() > e.repeatPattern().endDate())
120 && e.repeatPattern().hasEndDate)
121 return FALSE;
122 return TRUE;
123 }
124 /* if from is middle of a non-week */
125
126 diff = e.start().date().addDays(dayOfWeek).daysTo(from) % freq;
127 diff2 = e.start().date().addDays(firstOfWeek).daysTo(from) % freq;
128
129 if(diff != 0)
130 diff = freq - diff;
131 if(diff2 != 0)
132 diff2 = freq - diff2;
133 diff = QMIN(diff, diff2);
134
135 next = QDateTime(from.addDays(diff), e.start().time());
136 if ( (next.date() > e.repeatPattern().endDate())
137 && e.repeatPattern().hasEndDate )
138 return FALSE;
139 return TRUE;
140 case Event::MonthlyDay:
141 iday = from.day();
142 iyear = from.year();
143 imonth = from.month();
144 /* find equivelent day of month for this month */
145 dayOfWeek = e.start().date().dayOfWeek();
146 weekOfMonth = (e.start().date().day() - 1) / 7;
147
148 /* work out when the next valid month is */
149 a = from.year() - e.start().date().year();
150 a *= 12;
151 a = a + (imonth - e.start().date().month());
152 /* a is e.start()monthsFrom(from); */
153 if(a % freq) {
154 a = freq - (a % freq);
155 imonth = from.month() + a;
156 if (imonth > 12) {
157 imonth--;
158 iyear += imonth / 12;
159 imonth = imonth % 12;
160 imonth++;
161 }
162 }
163 /* imonth is now the first month after or on
164 from that matches the frequency given */
165
166 /* find for this month */
167 tmpDate = QDate( iyear, imonth, 1 );
168
169 iday = 1;
170 iday += (7 + dayOfWeek - tmpDate.dayOfWeek()) % 7;
171 iday += 7 * weekOfMonth;
172 while (iday > tmpDate.daysInMonth()) {
173 imonth += freq;
174 if (imonth > 12) {
175 imonth--;
176 iyear += imonth / 12;
177 imonth = imonth % 12;
178 imonth++;
179 }
180 tmpDate = QDate( iyear, imonth, 1 );
181 /* these loops could go for a while, check end case now */
182 if ((tmpDate > e.repeatPattern().endDate()) && e.repeatPattern().hasEndDate)
183 return FALSE;
184 iday = 1;
185 iday += (7 + dayOfWeek - tmpDate.dayOfWeek()) % 7;
186 iday += 7 * weekOfMonth;
187 }
188 tmpDate = QDate(iyear, imonth, iday);
189
190 if (tmpDate >= from) {
191 next = QDateTime(tmpDate, e.start().time());
192 if ((next.date() > e.repeatPattern().endDate()) && e.repeatPattern().hasEndDate)
193 return FALSE;
194 return TRUE;
195 }
196
197 /* need to find the next iteration */
198 do {
199 imonth += freq;
200 if (imonth > 12) {
201 imonth--;
202 iyear += imonth / 12;
203 imonth = imonth % 12;
204 imonth++;
205 }
206 tmpDate = QDate( iyear, imonth, 1 );
207 /* these loops could go for a while, check end case now */
208 if ((tmpDate > e.repeatPattern().endDate()) && e.repeatPattern().hasEndDate)
209 return FALSE;
210 iday = 1;
211 iday += (7 + dayOfWeek - tmpDate.dayOfWeek()) % 7;
212 iday += 7 * weekOfMonth;
213 } while (iday > tmpDate.daysInMonth());
214 tmpDate = QDate(iyear, imonth, iday);
215
216 next = QDateTime(tmpDate, e.start().time());
217 if ((next.date() > e.repeatPattern().endDate()) && e.repeatPattern().hasEndDate)
218 return FALSE;
219 return TRUE;
220 case Event::MonthlyDate:
221 iday = e.start().date().day();
222 iyear = from.year();
223 imonth = from.month();
224
225 a = from.year() - e.start().date().year();
226 a *= 12;
227 a = a + (imonth - e.start().date().month());
228 /* a is e.start()monthsFrom(from); */
229 if(a % freq) {
230 a = freq - (a % freq);
231 imonth = from.month() + a;
232 if (imonth > 12) {
233 imonth--;
234 iyear += imonth / 12;
235 imonth = imonth % 12;
236 imonth++;
237 }
238 }
239 /* imonth is now the first month after or on
240 from that matches the frequencey given */
241
242 /* this could go for a while, worse case, 4*12 iterations, probably */
243 while(!QDate::isValid(iyear, imonth, iday) ) {
244 imonth += freq;
245 if (imonth > 12) {
246 imonth--;
247 iyear += imonth / 12;
248 imonth = imonth % 12;
249 imonth++;
250 }
251 /* these loops could go for a while, check end case now */
252 if ((QDate(iyear, imonth, 1) > e.repeatPattern().endDate()) && e.repeatPattern().hasEndDate)
253 return FALSE;
254 }
255
256 if(QDate(iyear, imonth, iday) >= from) {
257 /* done */
258 next = QDateTime(QDate(iyear, imonth, iday),
259 e.start().time());
260 if ((next.date() > e.repeatPattern().endDate()) && e.repeatPattern().hasEndDate)
261 return FALSE;
262 return TRUE;
263 }
264
265 /* ok, need to cycle */
266 imonth += freq;
267 imonth--;
268 iyear += imonth / 12;
269 imonth = imonth % 12;
270 imonth++;
271
272 while(!QDate::isValid(iyear, imonth, iday) ) {
273 imonth += freq;
274 imonth--;
275 iyear += imonth / 12;
276 imonth = imonth % 12;
277 imonth++;
278 if ((QDate(iyear, imonth, 1) > e.repeatPattern().endDate()) && e.repeatPattern().hasEndDate)
279 return FALSE;
280 }
281
282 next = QDateTime(QDate(iyear, imonth, iday), e.start().time());
283 if ((next.date() > e.repeatPattern().endDate()) && e.repeatPattern().hasEndDate)
284 return FALSE;
285 return TRUE;
286 case Event::Yearly:
287 iday = e.start().date().day();
288 imonth = e.start().date().month();
289 iyear = from.year(); // after all, we want to start in this year
290
291 diff = 1;
292 if(imonth == 2 && iday > 28) {
293 /* leap year, and it counts, calculate actual frequency */
294 if(freq % 4)
295 if (freq % 2)
296 freq = freq * 4;
297 else
298 freq = freq * 2;
299 /* else divides by 4 already, leave freq alone */
300 diff = 4;
301 }
302
303 a = from.year() - e.start().date().year();
304 if(a % freq) {
305 a = freq - (a % freq);
306 iyear = iyear + a;
307 }
308
309 /* under the assumption we won't hit one of the special not-leap years twice */
310 if(!QDate::isValid(iyear, imonth, iday)) {
311 /* must have been skipping by leap years and hit one that wasn't, (e.g. 2100) */
312 iyear += freq;
313 }
314
315 if(QDate(iyear, imonth, iday) >= from) {
316 next = QDateTime(QDate(iyear, imonth, iday),
317 e.start().time());
318 if ((next.date() > e.repeatPattern().endDate()) && e.repeatPattern().hasEndDate)
319 return FALSE;
320 return TRUE;
321 }
322 /* iyear == from.year(), need to advance again */
323 iyear += freq;
324 /* under the assumption we won't hit one of the special not-leap years twice */
325 if(!QDate::isValid(iyear, imonth, iday)) {
326 /* must have been skipping by leap years and hit one that wasn't, (e.g. 2100) */
327 iyear += freq;
328 }
329
330 next = QDateTime(QDate(iyear, imonth, iday), e.start().time());
331 if ((next.date() > e.repeatPattern().endDate()) && e.repeatPattern().hasEndDate)
332 return FALSE;
333 return TRUE;
334 default:
335 return FALSE;
336 }
337}
338
339static bool nextAlarm( const Event &ev, QDateTime& when, int& warn)
340{
341 QDateTime now = QDateTime::currentDateTime();
342 if ( ev.hasRepeat() ) {
343 QDateTime ralarm;
344 if (nextOccurance(ev, now.date(), ralarm)) {
345 ralarm = ralarm.addSecs(-ev.alarmTime()*60);
346 if ( ralarm > now ) {
347 when = ralarm;
348 warn = ev.alarmTime();
349 } else if ( nextOccurance(ev, now.date().addDays(1), ralarm) ) {
350 ralarm = ralarm.addSecs( -ev.alarmTime()*60 );
351 if ( ralarm > now ) {
352 when = ralarm;
353 warn = ev.alarmTime();
354 }
355 }
356 }
357 } else {
358 warn = ev.alarmTime();
359 when = ev.start().addSecs( -ev.alarmTime()*60 );
360 }
361 return when > now;
362}
363
364static void addEventAlarm( const Event &ev )
365{
366 QDateTime when;
367 int warn;
368 if ( nextAlarm(ev,when,warn) )
369 AlarmServer::addAlarm( when,
370 "QPE/Application/datebook",
371 "alarm(QDateTime,int)", warn );
372}
373
374static void delEventAlarm( const Event &ev )
375{
376 QDateTime when;
377 int warn;
378 if ( nextAlarm(ev,when,warn) )
379 AlarmServer::deleteAlarm( when,
380 "QPE/Application/datebook",
381 "alarm(QDateTime,int)", warn );
382}
383
384
385DateBookDB::DateBookDB()
386{
387 init();
388}
389
390DateBookDB::~DateBookDB()
391{
392 save();
393 eventList.clear();
394 repeatEvents.clear();
395}
396
397
398//#### Why is this code duplicated in getEffectiveEvents ?????
399//#### Addendum. Don't use this function, lets faze it out if we can.
400QValueList<Event> DateBookDB::getEvents( const QDate &from, const QDate &to )
401{
402 QValueList<Event> tmpList;
403 tmpList = getNonRepeatingEvents( from, to );
404
405 // check for repeating events...
406 for (QValueList<Event>::ConstIterator it = repeatEvents.begin();
407 it != repeatEvents.end(); ++it) {
408 QDate itDate = from;
409 QDateTime due;
410
411 /* create a false end date, to short circuit on hard
412 MonthlyDay recurences */
413 Event dummy_event = *it;
414 Event::RepeatPattern r = dummy_event.repeatPattern();
415 if ( !r.hasEndDate || r.endDate() > to ) {
416 r.setEndDate( to );
417 r.hasEndDate = TRUE;
418 }
419 dummy_event.setRepeat(TRUE, r);
420
421 while (nextOccurance(dummy_event, itDate, due)) {
422 if (due.date() > to)
423 break;
424 Event newEvent = *it;
425 newEvent.setStart(due);
426 newEvent.setEnd(due.addSecs((*it).start().secsTo((*it).end())));
427
428 tmpList.append(newEvent);
429 itDate = due.date().addDays(1); /* the next event */
430 }
431 }
432 qHeapSort(tmpList);
433 return tmpList;
434}
435
436QValueList<Event> DateBookDB::getEvents( const QDateTime &start )
437{
438 QValueList<Event> day = getEvents(start.date(),start.date());
439
440 QValueListConstIterator<Event> it;
441 QDateTime dtTmp;
442 QValueList<Event> tmpList;
443 for (it = day.begin(); it != day.end(); ++it ) {
444 dtTmp = (*it).start(TRUE);
445 if ( dtTmp == start )
446 tmpList.append( *it );
447 }
448 return tmpList;
449}
450
451//#### Why is this code duplicated in getEvents ?????
452
453QValueList<EffectiveEvent> DateBookDB::getEffectiveEvents( const QDate &from,
454 const QDate &to )
455{
456 QValueList<EffectiveEvent> tmpList;
457 QValueListIterator<Event> it;
458
459 EffectiveEvent effEv;
460 QDateTime dtTmp,
461 dtEnd;
462
463 for (it = eventList.begin(); it != eventList.end(); ++it ) {
464 dtTmp = (*it).start(TRUE);
465 dtEnd = (*it).end(TRUE);
466
467 if ( dtTmp.date() >= from && dtTmp.date() <= to ) {
468 Event tmpEv = *it;
469 effEv.setEvent(tmpEv);
470 effEv.setDate( dtTmp.date() );
471 effEv.setStart( dtTmp.time() );
472 if ( dtTmp.date() != dtEnd.date() )
473 effEv.setEnd( QTime(23, 59, 0) );
474 else
475 effEv.setEnd( dtEnd.time() );
476 tmpList.append( effEv );
477 }
478 // we must also check for end date information...
479 if ( dtEnd.date() != dtTmp.date() && dtEnd.date() >= from ) {
480 QDateTime dt = dtTmp.addDays( 1 );
481 dt.setTime( QTime(0, 0, 0) );
482 QDateTime dtStop;
483 if ( dtEnd > to ) {
484 dtStop = to;
485 } else
486 dtStop = dtEnd;
487 while ( dt <= dtStop ) {
488 Event tmpEv = *it;
489 effEv.setEvent( tmpEv );
490 effEv.setDate( dt.date() );
491 if ( dt >= from ) {
492 effEv.setStart( QTime(0, 0, 0) );
493 if ( dt.date() == dtEnd.date() )
494 effEv.setEnd( dtEnd.time() );
495 else
496 effEv.setEnd( QTime(23, 59, 59) );
497 tmpList.append( effEv );
498 }
499 dt = dt.addDays( 1 );
500 }
501 }
502 }
503 // check for repeating events...
504 QDateTime repeat;
505 for ( it = repeatEvents.begin(); it != repeatEvents.end(); ++it ) {
506
507 /* create a false end date, to short circuit on hard
508 MonthlyDay recurences */
509 Event dummy_event = *it;
510 int duration = (*it).start().date().daysTo( (*it).end().date() );
511 QDate itDate = from.addDays(-duration);
512
513 Event::RepeatPattern r = dummy_event.repeatPattern();
514 if ( !r.hasEndDate || r.endDate() > to ) {
515 r.setEndDate( to );
516 r.hasEndDate = TRUE;
517 }
518 dummy_event.setRepeat(TRUE, r);
519
520 while (nextOccurance(dummy_event, itDate, repeat)) {
521 if(repeat.date() > to)
522 break;
523 effEv.setDate( repeat.date() );
524 if ((*it).type() == Event::AllDay) {
525 effEv.setStart( QTime(0,0,0) );
526 effEv.setEnd( QTime(23,59,59) );
527 } else {
528 /* we only occur by days, not hours/minutes/seconds. Hence
529 the actual end and start times will be the same for
530 every repeated event. For multi day events this is
531 fixed up later if on wronge day span */
532 effEv.setStart( (*it).start().time() );
533 effEv.setEnd( (*it).end().time() );
534 }
535 if ( duration != 0 ) {
536 // multi-day repeating events
537 QDate sub_it = QMAX( repeat.date(), from );
538 QDate startDate = repeat.date();
539 QDate endDate = startDate.addDays( duration );
540
541 while ( sub_it <= endDate && sub_it <= to ) {
542 EffectiveEvent tmpEffEv = effEv;
543 Event tmpEv = *it;
544 tmpEffEv.setEvent( tmpEv );
545
546 if ( sub_it != startDate )
547 tmpEffEv.setStart( QTime(0,0,0) );
548 if ( sub_it != endDate )
549 tmpEffEv.setEnd( QTime(23,59,59) );
550 tmpEffEv.setDate( sub_it );
551 tmpEffEv.setEffectiveDates( startDate, endDate );
552 tmpList.append( tmpEffEv );
553 sub_it = sub_it.addDays( 1 );
554 }
555 itDate = endDate;
556 } else {
557 Event tmpEv = *it;
558 effEv.setEvent( tmpEv );
559 tmpList.append( effEv );
560 itDate = repeat.date().addDays( 1 );
561 }
562 }
563 }
564
565 qHeapSort( tmpList );
566 return tmpList;
567}
568
569QValueList<EffectiveEvent> DateBookDB::getEffectiveEvents( const QDateTime &dt)
570{
571 QValueList<EffectiveEvent> day = getEffectiveEvents(dt.date(), dt.date());
572 QValueListConstIterator<EffectiveEvent> it;
573 QValueList<EffectiveEvent> tmpList;
574 QDateTime dtTmp;
575
576 for (it = day.begin(); it != day.end(); ++it ) {
577 dtTmp = QDateTime( (*it).date(), (*it).start() );
578 // at the moment we don't have second granularity, be nice about that..
579 if ( QABS(dt.secsTo(dtTmp)) < 60 )
580 tmpList.append( *it );
581 }
582 return tmpList;
583}
584
585
586void DateBookDB::addEvent( const Event &ev, bool doalarm )
587{
588 // write to the journal...
589 saveJournalEntry( ev, ACTION_ADD, -1, false );
590 addJFEvent( ev, doalarm );
591 d->clean = false;
592}
593
594void DateBookDB::addJFEvent( const Event &ev, bool doalarm )
595{
596 if ( doalarm && ev.hasAlarm() )
597 addEventAlarm( ev );
598 if ( ev.hasRepeat() )
599 repeatEvents.append( ev );
600 else
601 eventList.append( ev );
602}
603
604void DateBookDB::editEvent( const Event &old, Event &editedEv )
605{
606 int oldIndex=0;
607 bool oldHadRepeat = old.hasRepeat();
608 Event orig;
609
610 // write to the journal...
611 if ( oldHadRepeat ) {
612 if ( origRepeat( old, orig ) ) // should work always...
613 oldIndex = repeatEvents.findIndex( orig );
614 } else
615 oldIndex = eventList.findIndex( old );
616 saveJournalEntry( editedEv, ACTION_REPLACE, oldIndex, oldHadRepeat );
617
618 if ( old.hasAlarm() )
619 delEventAlarm( old );
620 if ( oldHadRepeat ) {
621 if ( oldHadRepeat && editedEv.hasRepeat() ) {
622 // assumption, when someone edits a repeating event, they
623 // want to change them all, maybe not perfect, but it works
624 // for the moment...
625 repeatEvents.remove( orig );
626 } else
627 removeRepeat( old );
628 } else {
629 QValueList<Event>::Iterator it = eventList.find( old );
630 if ( it != eventList.end() )
631 eventList.remove( it );
632 }
633 if ( editedEv.hasAlarm() )
634 addEventAlarm( editedEv );
635 if ( editedEv.hasRepeat() )
636 repeatEvents.append( editedEv );
637 else
638 eventList.append( editedEv );
639 d->clean = false;
640}
641
642void DateBookDB::removeEvent( const Event &ev )
643{
644 // write to the journal...
645 saveJournalEntry( ev, ACTION_REMOVE, -1, false );
646 removeJFEvent( ev );
647 d->clean = false;
648}
649
650void DateBookDB::removeJFEvent( const Event&ev )
651{
652 if ( ev.hasAlarm() )
653 delEventAlarm( ev );
654 if ( ev.hasRepeat() ) {
655 removeRepeat( ev );
656 } else {
657 QValueList<Event>::Iterator it = eventList.find( ev );
658 if ( it != eventList.end() )
659 eventList.remove( it );
660 }
661}
662
663// also handles journaling...
664void DateBookDB::loadFile( const QString &strFile )
665{
666
667 QFile f( strFile );
668 if ( !f.open( IO_ReadOnly ) )
669 return;
670
671 enum Attribute {
672 FDescription = 0,
673 FLocation,
674 FCategories,
675 FUid,
676 FType,
677 FAlarm,
678 FSound,
679 FRType,
680 FRWeekdays,
681 FRPosition,
682 FRFreq,
683 FRHasEndDate,
684 FREndDate,
685 FRStart,
686 FREnd,
687 FNote,
688 FCreated,
689 FAction,
690 FActionKey,
691 FJournalOrigHadRepeat
692 };
693
694 QAsciiDict<int> dict( 97 );
695 dict.setAutoDelete( TRUE );
696 dict.insert( "description", new int(FDescription) );
697 dict.insert( "location", new int(FLocation) );
698 dict.insert( "categories", new int(FCategories) );
699 dict.insert( "uid", new int(FUid) );
700 dict.insert( "type", new int(FType) );
701 dict.insert( "alarm", new int(FAlarm) );
702 dict.insert( "sound", new int(FSound) );
703 dict.insert( "rtype", new int(FRType) );
704 dict.insert( "rweekdays", new int(FRWeekdays) );
705 dict.insert( "rposition", new int(FRPosition) );
706 dict.insert( "rfreq", new int(FRFreq) );
707 dict.insert( "rhasenddate", new int(FRHasEndDate) );
708 dict.insert( "enddt", new int(FREndDate) );
709 dict.insert( "start", new int(FRStart) );
710 dict.insert( "end", new int(FREnd) );
711 dict.insert( "note", new int(FNote) );
712 dict.insert( "created", new int(FCreated) );
713 dict.insert( "action", new int(FAction) );
714 dict.insert( "actionkey", new int(FActionKey) );
715 dict.insert( "actionorig", new int (FJournalOrigHadRepeat) );
716
717
718 QByteArray ba = f.readAll();
719 char* dt = ba.data();
720 int len = ba.size();
721 int currentAction,
722 journalKey,
723 origHadRepeat; // should be bool, but we need tri-state(not being used)
724
725 int i = 0;
726 char *point;
727 while ( ( point = strstr( dt+i, "<event " ) ) != 0 ) {
728 i = point - dt;
729 // if we are reading in events in the general case,
730 // we are just adding them, so let the actions represent that...
731 currentAction = ACTION_ADD;
732 journalKey = -1;
733 origHadRepeat = -1;
734 // some temporary variables for dates and times ...
735 //int startY = 0, startM = 0, startD = 0, starth = 0, startm = 0, starts = 0;
736 //int endY = 0, endM = 0, endD = 0, endh = 0, endm = 0, ends = 0;
737 //int enddtY = 0, enddtM = 0, enddtD = 0;
738
739 // ... for the alarm settings ...
740 int alarmTime = -1; Event::SoundTypeChoice alarmSound = Event::Silent;
741 // ... and for the recurrence
742 Event::RepeatPattern rp;
743 Event e;
744
745 i += 7;
746
747 while( 1 ) {
748 while ( i < len && (dt[i] == ' ' || dt[i] == '\n' || dt[i] == '\r') )
749 ++i;
750 if ( i >= len-2 || (dt[i] == '/' && dt[i+1] == '>') )
751 break;
752 // we have another attribute, read it.
753 int j = i;
754 while ( j < len && dt[j] != '=' )
755 ++j;
756 char *attr = dt+i;
757 dt[j] = '\0';
758 i = ++j; // skip =
759 while ( i < len && dt[i] != '"' )
760 ++i;
761 j = ++i;
762 bool haveAmp = FALSE;
763 bool haveUtf = FALSE;
764 while ( j < len && dt[j] != '"' ) {
765 if ( dt[j] == '&' )
766 haveAmp = TRUE;
767 if ( ((unsigned char)dt[j]) > 0x7f )
768 haveUtf = TRUE;
769 ++j;
770 }
771
772 if ( i == j ) {
773 // leave out empty attributes
774 i = j + 1;
775 continue;
776 }
777
778 QString value = haveUtf ? QString::fromUtf8( dt+i, j-i )
779 : QString::fromLatin1( dt+i, j-i );
780 if ( haveAmp )
781 value = Qtopia::plainString( value );
782 i = j + 1;
783
784 //qDebug("attr='%s' value='%s'", attr.data(), value.latin1() );
785 int * find = dict[ attr ];
786#if 1
787 if ( !find ) {
788 // custom field
789 e.setCustomField(attr, value);
790 continue;
791 }
792
793 switch( *find ) {
794 case FDescription:
795 e.setDescription( value );
796 break;
797 case FLocation:
798 e.setLocation( value );
799 break;
800 case FCategories:
801 e.setCategories( Qtopia::Record::idsFromString( value ) );
802 break;
803 case FUid:
804 e.setUid( value.toInt() );
805 break;
806 case FType:
807 if ( value == "AllDay" )
808 e.setType( Event::AllDay );
809 else
810 e.setType( Event::Normal );
811 break;
812 case FAlarm:
813 alarmTime = value.toInt();
814 break;
815 case FSound:
816 alarmSound = value == "loud" ? Event::Loud : Event::Silent;
817 break;
818 // recurrence stuff
819 case FRType:
820 if ( value == "Daily" )
821 rp.type = Event::Daily;
822 else if ( value == "Weekly" )
823 rp.type = Event::Weekly;
824 else if ( value == "MonthlyDay" )
825 rp.type = Event::MonthlyDay;
826 else if ( value == "MonthlyDate" )
827 rp.type = Event::MonthlyDate;
828 else if ( value == "Yearly" )
829 rp.type = Event::Yearly;
830 else
831 rp.type = Event::NoRepeat;
832 break;
833 case FRWeekdays:
834 rp.days = value.toInt();
835 break;
836 case FRPosition:
837 rp.position = value.toInt();
838 break;
839 case FRFreq:
840 rp.frequency = value.toInt();
841 break;
842 case FRHasEndDate:
843 rp.hasEndDate = value.toInt();
844 break;
845 case FREndDate: {
846 rp.endDateUTC = (time_t) value.toLong();
847 break;
848 }
849 case FRStart: {
850 e.setStart( (time_t) value.toLong() );
851 break;
852 }
853 case FREnd: {
854 e.setEnd( (time_t) value.toLong() );
855 break;
856 }
857 case FNote:
858 e.setNotes( value );
859 break;
860 case FCreated:
861 rp.createTime = value.toInt();
862 break;
863 case FAction:
864 currentAction = value.toInt();
865 break;
866 case FActionKey:
867 journalKey = value.toInt();
868 break;
869 case FJournalOrigHadRepeat:
870 origHadRepeat = value.toInt();
871 break;
872 default:
873 qDebug( "huh??? missing enum? -- attr.: %s", attr );
874 break;
875 }
876#endif
877 }
878 // "post processing" (dates, times, alarm, recurrence)
879 // start date/time
880 e.setRepeat( rp.type != Event::NoRepeat, rp );
881
882 if ( alarmTime != -1 )
883 e.setAlarm( TRUE, alarmTime, alarmSound );
884
885 // now do our action based on the current action...
886 switch ( currentAction ) {
887 case ACTION_ADD:
888 addJFEvent( e );
889 break;
890 case ACTION_REMOVE:
891 removeJFEvent( e );
892 break;
893 case ACTION_REPLACE:
894 // be a little bit careful,
895 // in case of a messed up journal...
896 if ( journalKey > -1 && origHadRepeat > -1 ) {
897 // get the original from proper list...
898 if ( origHadRepeat )
899 removeJFEvent( *(repeatEvents.at(journalKey)) );
900 else
901 removeJFEvent( *(eventList.at(journalKey)) );
902 addJFEvent( e );
903 }
904 break;
905 default:
906 break;
907 }
908 }
909 f.close();
910}
911
912void DateBookDB::init()
913{
914 d = new DateBookDBPrivate;
915 d->clean = false;
916 QString str = dateBookFilename();
917 if ( str.isNull() ) {
918 QMessageBox::warning( 0, QObject::tr("Out of Space"),
919 QObject::tr("Unable to create start up files\n"
920 "Please free up some space\n"
921 "before entering data") );
922 }
923 // continuing along, we call this datebook filename again,
924 // because they may fix it before continuing, though it seems
925 // pretty unlikely...
926 loadFile( dateBookFilename() );
927
928 if ( QFile::exists( dateBookJournalFile() ) ) {
929 // merge the journal
930 loadFile( dateBookJournalFile() );
931 // save in our changes and remove the journal...
932 save();
933 }
934 d->clean = true;
935}
936
937bool DateBookDB::save()
938{
939 if ( d->clean == true )
940 return true;
941 QValueListIterator<Event> it;
942 int total_written;
943 QString strFileNew = dateBookFilename() + ".new";
944
945 QFile f( strFileNew );
946 if ( !f.open( IO_WriteOnly|IO_Raw ) )
947 return FALSE;
948
949 QString buf( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" );
950 buf += "<!DOCTYPE DATEBOOK><DATEBOOK>\n";
951 buf += "<events>\n";
952 QCString str = buf.utf8();
953 total_written = f.writeBlock( str.data(), str.length() );
954 if ( total_written != int(str.length()) ) {
955 f.close();
956 QFile::remove( strFileNew );
957 return false;
958 }
959
960 for ( it = eventList.begin(); it != eventList.end(); ++it ) {
961 buf = "<event";
962 (*it).save( buf );
963 buf += " />\n";
964 str = buf.utf8();
965 total_written = f.writeBlock( str.data(), str.length() );
966 if ( total_written != int(str.length()) ) {
967 f.close();
968 QFile::remove( strFileNew );
969 return false;
970 }
971 }
972 for ( it = repeatEvents.begin(); it != repeatEvents.end(); ++it ) {
973 buf = "<event";
974 (*it).save( buf );
975 buf += " />\n";
976 str = buf.utf8();
977 total_written = f.writeBlock( str.data(), str.length() );
978 if ( total_written != int(str.length()) ) {
979 f.close();
980 QFile::remove( strFileNew );
981 return false;
982 }
983 }
984 buf = "</events>\n</DATEBOOK>\n";
985 str = buf.utf8();
986 total_written = f.writeBlock( str.data(), str.length() );
987 if ( total_written != int(str.length()) ) {
988 f.close();
989 QFile::remove( strFileNew );
990 return false;
991 }
992 f.close();
993
994 // now rename... I like to use the systemcall
995 if ( ::rename( strFileNew, dateBookFilename() ) < 0 ) {
996 qWarning( "problem renaming file %s to %s errno %d",
997 strFileNew.latin1(), dateBookFilename().latin1(), errno );
998 // remove the file, otherwise it will just stick around...
999 QFile::remove( strFileNew );
1000 }
1001
1002 // may as well remove the journal file...
1003 QFile::remove( dateBookJournalFile() );
1004 d->clean = true;
1005 return true;
1006}
1007
1008void DateBookDB::reload()
1009{
1010 QValueList<Event>::Iterator it = eventList.begin();
1011 for ( ; it != eventList.end(); ++it ) {
1012 if ( (*it).hasAlarm() )
1013 delEventAlarm( *it );
1014 if ( (*it).hasRepeat() )
1015 removeRepeat( *it );
1016 }
1017 eventList.clear();
1018 repeatEvents.clear(); // should be a NOP
1019 init();
1020}
1021
1022bool DateBookDB::removeRepeat( const Event &ev )
1023{
1024 time_t removeMe = ev.repeatPattern().createTime;
1025 QValueListIterator<Event> it;
1026 for ( it = repeatEvents.begin(); it != repeatEvents.end(); ++it ) {
1027 if ( removeMe == (*it).repeatPattern().createTime ) {
1028 repeatEvents.remove( *it );
1029 // best break, or we are going into undefined territory!
1030 return TRUE;
1031 }
1032 }
1033 return FALSE;
1034}
1035
1036bool DateBookDB::origRepeat( const Event &ev, Event &orig ) const
1037{
1038 time_t removeMe = ev.repeatPattern().createTime;
1039 QValueListConstIterator<Event> it;
1040 for ( it = repeatEvents.begin(); it != repeatEvents.end(); ++it ) {
1041 if ( removeMe == (*it).repeatPattern().createTime ) {
1042 orig = (*it);
1043 return TRUE;
1044 }
1045 }
1046 return FALSE;
1047}
1048
1049void DateBookDB::saveJournalEntry( const Event &ev, journal_action action )
1050{
1051 saveJournalEntry( ev, action, -1, false );
1052}
1053
1054bool DateBookDB::saveJournalEntry( const Event &evOld, journal_action action,
1055 int key, bool origHadRepeat )
1056{
1057 bool status = false;
1058 Event ev = evOld;
1059 // write our log based on the action
1060 QFile f( dateBookJournalFile() );
1061 if ( !f.open( IO_WriteOnly|IO_Append ) )
1062 return false;
1063 QString buf = "<event";
1064 ev.save( buf );
1065 buf += " action=";
1066 buf += "\"" + QString::number(action) + "\"";
1067 buf += " actionkey=\"" + QString::number(key) + "\"";
1068 buf += " actionorig=\"" + QString::number(origHadRepeat) +"\"";
1069 buf += " />\n";
1070 QString str = buf.utf8();
1071 status = ( f.writeBlock( str.data(), str.length() ) == int(str.length()) );
1072 f.close();
1073 return status;
1074}
1075
1076QValueList<Event> DateBookDB::getRawRepeats() const
1077{
1078 return repeatEvents;
1079}
1080
1081QValueList<Event> DateBookDB::getNonRepeatingEvents( const QDate &from,
1082 const QDate &to ) const
1083{
1084 QValueListConstIterator<Event> it;
1085 QDateTime dtTmp, dtEnd;
1086 QValueList<Event> tmpList;
1087 for (it = eventList.begin(); it != eventList.end(); ++it ) {
1088 dtTmp = (*it).start(TRUE);
1089 dtEnd = (*it).end(TRUE);
1090
1091 if ( dtTmp.date() >= from && dtTmp.date() <= to ) {
1092 Event e = *it;
1093 if ( dtTmp.date() != dtEnd.date() )
1094 e.setEnd( QDateTime(dtTmp.date(), QTime(23, 59, 0)) );
1095 tmpList.append( e );
1096 }
1097 // we must also check for end date information...
1098 if ( dtEnd.date() != dtTmp.date() && dtEnd.date() >= from ) {
1099 QDateTime dt = dtTmp.addDays( 1 );
1100 dt.setTime( QTime(0, 0, 0) );
1101 QDateTime dtStop;
1102 if ( dtEnd > to ) {
1103 dtStop = to;
1104 } else
1105 dtStop = dtEnd;
1106 while ( dt <= dtStop ) {
1107 Event ev = *it;
1108 if ( dt >= from ) {
1109 ev.setStart( QDateTime(dt.date(), QTime(0, 0, 0)) );
1110 if ( dt.date() == dtEnd.date() )
1111 ev.setEnd( QDateTime(dt.date(), dtEnd.time()) );
1112 else
1113 ev.setEnd( QDateTime(dt.date(), QTime(23, 59, 0)) );
1114 tmpList.append( ev );
1115 }
1116 dt = dt.addDays( 1 );
1117 }
1118 }
1119 }
1120 return tmpList;
1121}
diff --git a/library/datebookdb.h b/library/datebookdb.h
new file mode 100644
index 0000000..aadb397
--- a/dev/null
+++ b/library/datebookdb.h
@@ -0,0 +1,85 @@
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 DATEBOOKDB_H
22#define DATEBOOKDB_H
23
24#include <qdatetime.h>
25#include <qfile.h>
26#include <qvaluelist.h>
27#include <qpe/event.h>
28
29// journal actions...
30enum journal_action { ACTION_ADD, ACTION_REMOVE, ACTION_REPLACE };
31
32class DateBookDBPrivate;
33class DateBookDB
34{
35public:
36 DateBookDB();
37 ~DateBookDB();
38
39 // very depreciated now!!!
40 QValueList<Event> getEvents( const QDate &from, const QDate &to );
41 QValueList<Event> getEvents( const QDateTime &start );
42
43 // USE THESE!!!
44 QValueList<EffectiveEvent> getEffectiveEvents( const QDate &from,
45 const QDate &to );
46 QValueList<EffectiveEvent> getEffectiveEvents( const QDateTime &start );
47
48 QValueList<Event> getRawRepeats() const;
49 QValueList<Event> getNonRepeatingEvents( const QDate &from,
50 const QDate &to ) const;
51
52 // Use these when dealing with adding removing events...
53 void addEvent( const Event &ev, bool doalarm=TRUE );
54 void removeEvent( const Event &ev );
55 void editEvent( const Event &old, Event &ev );
56 // add/remove event without journaling ( these ended up in public by accident, never
57 // use them unless you know what you are doing...),
58 // please put them in private if we ever can change the class...
59 void addJFEvent( const Event &ev, bool doalarm=TRUE );
60 void removeJFEvent( const Event &ev );
61
62 bool save();
63 void reload();
64private:
65 //find the real repeat...
66 bool origRepeat( const Event &ev, Event &orig ) const;
67 bool removeRepeat( const Event &ev );
68 void init();
69 void loadFile( const QString &strFile );
70 // depreciated...
71 void saveJournalEntry( const Event &ev, journal_action action );
72 // new version, uncomment the "= -1" when we remove the above
73 // function..
74 bool saveJournalEntry( const Event &ev, journal_action action,
75 int key/* = -1*/, bool origHadRepeat = false );
76
77 QValueList<Event> eventList; // non-repeating events...
78 QValueList<Event> repeatEvents; // the repeating events...
79 DateBookDBPrivate *d;
80 QFile journalFile;
81};
82
83/* helper functions, also useful to other apps. */
84bool nextOccurance( const Event &e, const QDate &from, QDateTime &next);
85#endif
diff --git a/library/datebookmonth.cpp b/library/datebookmonth.cpp
new file mode 100644
index 0000000..b2074e6
--- a/dev/null
+++ b/library/datebookmonth.cpp
@@ -0,0 +1,713 @@
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#include "config.h"
21#include "datebookmonth.h"
22#include "datebookdb.h"
23#include <qpe/event.h>
24#include "resource.h"
25#include "qpeapplication.h"
26#include "timestring.h"
27
28#include <qtoolbutton.h>
29#include <qspinbox.h>
30#include <qcombobox.h>
31#include <qdatetime.h>
32#include <qpainter.h>
33#include <qpopupmenu.h>
34
35
36DateBookMonthHeader::DateBookMonthHeader( QWidget *parent, const char *name )
37 : QHBox( parent, name )
38{
39 setBackgroundMode( PaletteButton );
40
41 begin = new QToolButton( this );
42 begin->setFocusPolicy(NoFocus);
43 begin->setPixmap( Resource::loadPixmap( "start" ) );
44 begin->setAutoRaise( TRUE );
45 begin->setFixedSize( begin->sizeHint() );
46
47 back = new QToolButton( this );
48 back->setFocusPolicy(NoFocus);
49 back->setPixmap( Resource::loadPixmap( "back" ) );
50 back->setAutoRaise( TRUE );
51 back->setFixedSize( back->sizeHint() );
52
53 month = new QComboBox( FALSE, this );
54 for ( int i = 0; i < 12; ++i )
55 month->insertItem( Calendar::nameOfMonth( i + 1 ) );
56
57 year = new QSpinBox( 1970, 2037, 1, this );
58
59 next = new QToolButton( this );
60 next->setFocusPolicy(NoFocus);
61 next->setPixmap( Resource::loadPixmap( "forward" ) );
62 next->setAutoRaise( TRUE );
63 next->setFixedSize( next->sizeHint() );
64
65 end = new QToolButton( this );
66 end->setFocusPolicy(NoFocus);
67 end->setPixmap( Resource::loadPixmap( "finish" ) );
68 end->setAutoRaise( TRUE );
69 end->setFixedSize( end->sizeHint() );
70
71 connect( month, SIGNAL( activated( int ) ),
72 this, SLOT( updateDate() ) );
73 connect( year, SIGNAL( valueChanged( int ) ),
74 this, SLOT( updateDate() ) );
75 connect( begin, SIGNAL( clicked() ),
76 this, SLOT( firstMonth() ) );
77 connect( end, SIGNAL( clicked() ),
78 this, SLOT( lastMonth() ) );
79 connect( back, SIGNAL( clicked() ),
80 this, SLOT( monthBack() ) );
81 connect( next, SIGNAL( clicked() ),
82 this, SLOT( monthForward() ) );
83 back->setAutoRepeat( TRUE );
84 next->setAutoRepeat( TRUE );
85}
86
87
88DateBookMonthHeader::~DateBookMonthHeader()
89{
90
91}
92
93void DateBookMonthHeader::updateDate()
94{
95 emit dateChanged( year->value(), month->currentItem() + 1 );
96}
97
98void DateBookMonthHeader::firstMonth()
99{
100 emit dateChanged( year->value(), 1 );
101 month->setCurrentItem( 0 );
102}
103
104void DateBookMonthHeader::lastMonth()
105{
106 emit dateChanged( year->value(), 12 );
107 month->setCurrentItem( 11 );
108}
109
110void DateBookMonthHeader::monthBack()
111{
112 if ( month->currentItem() > 0 ) {
113 emit dateChanged( year->value(), month->currentItem() );
114 month->setCurrentItem( month->currentItem() - 1 );
115 } else {
116 emit dateChanged( year->value() - 1, 12 );
117 // we have a signal set to a changed value in year so we only need to change
118 // year to get the result...
119 month->setCurrentItem( 11 );
120 year->setValue( year->value() - 1 );
121 }
122}
123
124void DateBookMonthHeader::monthForward()
125{
126 if ( month->currentItem() < 11 ) {
127 emit dateChanged( year->value(), month->currentItem() + 2 );
128 month->setCurrentItem( month->currentItem() + 1 );
129 } else {
130 // we have a signal set to a changed value in year so we only need to change
131 // year to get the result...
132 month->setCurrentItem( 0 );
133 year->setValue( year->value() + 1 );
134 }
135}
136
137void DateBookMonthHeader::setDate( int y, int m )
138{
139 year->setValue( y );
140 month->setCurrentItem( m - 1 );
141}
142
143//---------------------------------------------------------------------------
144
145class DateBookMonthTablePrivate
146{
147public:
148 DateBookMonthTablePrivate() {};
149 ~DateBookMonthTablePrivate() { mMonthEvents.clear(); };
150
151 QValueList<EffectiveEvent> mMonthEvents;
152 bool onMonday;
153};
154
155DateBookMonthTable::DateBookMonthTable( QWidget *parent, const char *name,
156 DateBookDB *newDb )
157 : QTable( 6, 7, parent, name ),
158 db( newDb )
159{
160 d = new DateBookMonthTablePrivate();
161 selYear = -1;
162 selMonth = -1;
163 selDay = -1;
164
165 Config cfg( "qpe" );
166 cfg.setGroup( "Time" );
167 d->onMonday = cfg.readBoolEntry( "MONDAY" );
168
169 horizontalHeader()->setResizeEnabled( FALSE );
170 // we have to do this here... or suffer the consequences later...
171 for ( int i = 0; i < 7; i++ ){
172 horizontalHeader()->resizeSection( i, 30 );
173 setColumnStretchable( i, TRUE );
174 }
175 setupLabels();
176
177 verticalHeader()->hide();
178 setLeftMargin( 0 );
179 for ( int i = 0; i < 6; ++i )
180 setRowStretchable( i, TRUE );
181
182 setSelectionMode( NoSelection );
183
184 connect( this, SIGNAL( clicked( int, int, int, const QPoint & ) ),
185 this, SLOT( dayClicked( int, int ) ) );
186 connect( this, SIGNAL( currentChanged( int, int ) ),
187 this, SLOT( dragDay( int, int ) ) );
188 setVScrollBarMode( AlwaysOff );
189 setHScrollBarMode( AlwaysOff );
190}
191
192DateBookMonthTable::~DateBookMonthTable()
193{
194 monthsEvents.clear();
195 delete d;
196}
197
198void DateBookMonthTable::setDate(int y, int m, int d)
199{
200 if (month == m && year == y) {
201 if ( selYear == -1 )
202 year = selYear;
203 if ( selMonth == -1 )
204 month = selMonth;
205 int r1, c1, r2, c2;
206 findDay(selDay, r1, c1);
207 selDay = day = d;
208 findDay(selDay, r2, c2);
209 setCurrentCell( r2, c2 );
210 //updateCell(r1,c1);
211 //updateCell(r2,c2);
212 } else {
213 selYear = year = y;
214 selMonth = month = m;
215 selDay = day = d;
216 setupTable();
217 }
218}
219
220void DateBookMonthTable::redraw()
221{
222 setupLabels();
223 setupTable();
224}
225
226void DateBookMonthTable::setWeekStart( bool onMonday )
227{
228 d->onMonday = onMonday;
229 setupLabels();
230 setupTable();
231}
232
233void DateBookMonthTable::setupTable()
234{
235 QValueList<Calendar::Day> days = Calendar::daysOfMonth( year, month, d->onMonday );
236 QValueList<Calendar::Day>::Iterator it = days.begin();
237 int row = 0, col = 0;
238 int crow = 0;
239 int ccol = 0;
240 for ( ; it != days.end(); ++it ) {
241 DayItemMonth *i = (DayItemMonth *)item( row, col );
242 if ( !i ) {
243 i = new DayItemMonth( this, QTableItem::Never, "" );
244 setItem( row, col, i );
245 }
246 Calendar::Day calDay = *it;
247 i->clearEffEvents();
248 i->setDay( calDay.date );
249 i->setType( calDay.type );
250 if ( i->day() == day && calDay.type == Calendar::Day::ThisMonth ) {
251 crow = row;
252 ccol = col;
253 }
254
255 updateCell( row, col );
256
257 if ( col == 6 ) {
258 ++row;
259 col = 0;
260 } else {
261 ++col;
262 }
263 }
264 setCurrentCell( crow, ccol );
265 getEvents();
266}
267
268void DateBookMonthTable::findDay( int day, int &row, int &col )
269{
270 QDate dtBegin( year, month, 1 );
271 int skips = dtBegin.dayOfWeek();
272 int effective_day = day + skips - 1; // row/columns begin at 0
273 // make an extra adjustment if we start on Mondays.
274 if ( d->onMonday )
275 effective_day--;
276 row = effective_day / 7;
277 col = effective_day % 7;
278}
279
280void DateBookMonthTable::dayClicked( int row, int col )
281{
282 changeDaySelection( row, col );
283 emit dateClicked( selYear, selMonth, selDay );
284}
285
286void DateBookMonthTable::dragDay( int row, int col )
287{
288 changeDaySelection( row, col );
289}
290
291void DateBookMonthTable::changeDaySelection( int row, int col )
292{
293 DayItemMonth *i = (DayItemMonth*)item( row, col );
294 if ( !i )
295 return;
296 switch ( i->type() ) {
297 case Calendar::Day::ThisMonth:
298 selMonth = month;
299 break;
300 case Calendar::Day::PrevMonth:
301 selMonth = month-1;
302 break;
303 default:
304 selMonth = month+1;
305 }
306
307 selYear = year;
308 if ( selMonth <= 0 ) {
309 selMonth = 12;
310 selYear--;
311 } else if ( selMonth > 12 ) {
312 selMonth = 1;
313 selYear++;
314 }
315 selDay = i->day();
316}
317
318
319void DateBookMonthTable::viewportMouseReleaseEvent( QMouseEvent * )
320{
321 dayClicked( currentRow(), currentColumn() );
322}
323
324void DateBookMonthTable::getEvents()
325{
326 if ( !db )
327 return;
328
329 QDate dtStart( year, month, 1 );
330 d->mMonthEvents = db->getEffectiveEvents( dtStart,
331 QDate( year, month,
332 dtStart.daysInMonth() ) );
333 QValueListIterator<EffectiveEvent> it = d->mMonthEvents.begin();
334 // now that the events are sorted, basically go through the list, make
335 // a small list for every day and set it for each item...
336 // clear all the items...
337 while ( it != d->mMonthEvents.end() ) {
338 QValueList<EffectiveEvent> dayEvent;
339 EffectiveEvent e = *it;
340 ++it;
341 dayEvent.append( e );
342 while ( it != d->mMonthEvents.end()
343 && e.date() == (*it).date() ) {
344 dayEvent.append( *it );
345 ++it;
346 }
347 int row, col;
348 findDay( e.date().day(), row, col );
349 DayItemMonth* w = static_cast<DayItemMonth*>( item( row, col ) );
350 w->setEvents( dayEvent );
351 updateCell( row, col );
352 dayEvent.clear();
353 }
354}
355
356
357void DateBookMonthTable::setupLabels()
358{
359 for ( int i = 0; i < 7; ++i ) {
360 // horizontalHeader()->resizeSection( i, 30 );
361 // setColumnStretchable( i, TRUE );
362 if ( d->onMonday )
363 horizontalHeader()->setLabel( i, Calendar::nameOfDay( i + 1 ) );
364 else {
365 if ( i == 0 )
366 horizontalHeader()->setLabel( i, Calendar::nameOfDay( 7 ) );
367 else
368 horizontalHeader()->setLabel( i, Calendar::nameOfDay( i ) );
369 }
370 }
371}
372
373
374//---------------------------------------------------------------------------
375
376DateBookMonth::DateBookMonth( QWidget *parent, const char *name, bool ac,
377 DateBookDB *data )
378 : QVBox( parent, name ),
379 autoClose( ac )
380{
381 setFocusPolicy(StrongFocus);
382 year = QDate::currentDate().year();
383 month = QDate::currentDate().month();
384 day = QDate::currentDate().day();
385 header = new DateBookMonthHeader( this, "DateBookMonthHeader" );
386 table = new DateBookMonthTable( this, "DateBookMonthTable", data );
387 header->setDate( year, month );
388 table->setDate( year, month, QDate::currentDate().day() );
389 header->setFocusPolicy(NoFocus);
390 table->setFocusPolicy(NoFocus);
391 connect( header, SIGNAL( dateChanged( int, int ) ),
392 this, SLOT( setDate( int, int ) ) );
393 connect( table, SIGNAL( dateClicked( int, int, int ) ),
394 this, SLOT( finalDate(int, int, int) ) );
395 connect( qApp, SIGNAL(weekChanged(bool)), this,
396 SLOT(slotWeekChange(bool)) );
397 table->setFocus();
398}
399
400DateBookMonth::~DateBookMonth()
401{
402
403}
404
405void DateBookMonth::setDate( int y, int m )
406{
407 /* only change the date if this is a different date,
408 * other wise we may mistakenly overide the day */
409 if ( (y != year) || (m != month) ) {
410 year = y;
411 month = m;
412 QDate nd( y, m, 1 );
413 if ( nd.daysInMonth() < day )
414 day = nd.daysInMonth();
415 table->setDate( year, month, day );
416 }
417}
418
419void DateBookMonth::setDate( int y, int m, int d )
420{
421 header->setDate( y, m);
422 table->setDate( y, m, d);
423 year = y;
424 month = m;
425 day = d;
426}
427
428/* called when we wish to close or pass back the date */
429void DateBookMonth::finalDate(int y, int m, int d)
430{
431 setDate( y, m, d );
432
433 emit dateClicked(y, m, d);
434 // emit dateClicked(QDate(y, m, d).toString());
435
436 if ( autoClose && parentWidget() )
437 parentWidget()->close();
438}
439
440void DateBookMonth::setDate( QDate d)
441{
442 setDate(d.year(), d.month(), d.day());
443}
444
445void DateBookMonth::redraw()
446{
447 table->setDate( year, month, day );
448 table->redraw();
449}
450
451QDate DateBookMonth::selectedDate() const
452{
453 if ( !table )
454 return QDate::currentDate();
455 int y, m, d;
456 table->getDate( y, m, d );
457 qDebug( "got %d %d %d", y, m, d );
458 return QDate( y, m, d );
459}
460
461void DateBookMonth::slotWeekChange( bool startOnMonday )
462{
463 table->setWeekStart( startOnMonday );
464}
465
466void DateBookMonth::keyPressEvent( QKeyEvent *e )
467{
468 switch(e->key()) {
469 case Key_Up:
470 setDate(QDate(year, month, day).addDays(-7));
471 break;
472 case Key_Down:
473 setDate(QDate(year, month, day).addDays(7));
474 break;
475 case Key_Left:
476 setDate(QDate(year, month, day).addDays(-1));
477 break;
478 case Key_Right:
479 setDate(QDate(year, month, day).addDays(1));
480 break;
481 case Key_Space:
482 qWarning("space");
483 emit dateClicked(year, month, day);
484 if ( autoClose && parentWidget() )
485 parentWidget()->close();
486 break;
487 default:
488 qWarning("ignore");
489 e->ignore();
490 break;
491 }
492}
493
494//---------------------------------------------------------------------------
495class DayItemMonthPrivate
496{
497public:
498 DayItemMonthPrivate() {};
499 ~DayItemMonthPrivate() { mDayEvents.clear(); };
500 QValueList<EffectiveEvent> mDayEvents;
501};
502
503DayItemMonth::DayItemMonth( QTable *table, EditType et, const QString &t )
504 : QTableItem( table, et, t )
505{
506 d = new DayItemMonthPrivate();
507}
508
509DayItemMonth::~DayItemMonth()
510{
511 daysEvents.clear();
512 delete d;
513}
514
515void DayItemMonth::setEvents( const QValueList<EffectiveEvent> &effEv )
516{
517 d->mDayEvents = effEv;
518}
519
520void DayItemMonth::clearEffEvents()
521{
522 d->mDayEvents.clear();
523}
524
525void DayItemMonth::paint( QPainter *p, const QColorGroup &cg,
526 const QRect &cr, bool selected )
527{
528 QColorGroup g( cg );
529 g.setBrush( QColorGroup::Base, back );
530 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 )
534 p->setPen( g.highlightedText() );
535 else
536 p->setPen( g.text() );
537
538 p->save();
539 QFont f = p->font();
540 f.setPointSize( ( f.pointSize() / 3 ) * 2 );
541 p->setFont( f );
542 QFontMetrics fm( f );
543 p->drawText( 1, 1 + fm.ascent(), QString::number( day() ) );
544 p->restore();
545 // Put indicators for something like this, (similar to PalmOS)
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();
560 for ( ; itDays != d->mDayEvents.end(); ++itDays ) {
561 if ( (*itDays).event().type() == Event::AllDay )
562 bAllDay = TRUE;
563 else if ( (*itDays).start().hour() < 12 ) {
564 beforeNoon = TRUE;
565 if ( (*itDays).end().hour() > 12 ) {
566 atNoon = TRUE;
567 straddleBefore = TRUE;
568 }
569 if ( (*itDays).end().hour() > 14 ||
570 (*itDays).end().hour() == 14 && (*itDays).end().minute() > 0 ) {
571 afterNoon = TRUE;
572 straddleAfter = TRUE;
573 }
574 if ( (*itDays).event().hasRepeat() )
575 bRepeatBefore = TRUE;
576 } else if ( (*itDays).start().hour() == 12 ) {
577 if ( !atNoon )
578 atNoon = TRUE;
579 if ( (*itDays).event().hasRepeat() )
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 }
586 } else if ( (*itDays).start().hour() > 12 ) {
587 afterNoon = TRUE;
588 if ( (*itDays).event().hasRepeat() )
589 bRepeatAfter = TRUE;
590 }
591 }
592 int x = cr.width() - 13;
593 if ( beforeNoon ) {
594 p->setBrush( blue );
595 p->drawRect( x, 2, 10, 10 );
596 if ( bRepeatBefore )
597 p->fillRect( x + 5, 4, 3, 3, white );
598 }
599 if ( atNoon ) {
600 p->setBrush( blue );
601 p->drawRect( x, 14, 10, 5 );
602 if ( bRepeatNoon )
603 p->fillRect( x + 5, 16, 3, 2, white );
604 }
605 if ( straddleBefore ) {
606 p->drawLine( x, 11, x, 14 );
607 p->fillRect( x + 1, 11, 8, 4, blue );
608 p->drawLine( x + 9, 11, x + 9, 14 );
609 }
610 if ( afterNoon ) {
611 p->setBrush( blue );
612 p->drawRect( x, 21, 10, 10 );
613 if ( bRepeatAfter )
614 p->fillRect( x + 5, 23, 3, 3, white );
615 }
616 if ( straddleAfter ) {
617 p->drawLine( x, 18, x, 21 );
618 p->fillRect( x + 1, 18, 8, 4, blue );
619 p->drawLine( x + 9, 18, x + 9, 21 );
620 }
621 if ( bAllDay ) {
622 p->setBrush( green );
623 p->drawEllipse( cr.width() / 2 - 7, cr.height() / 2 - 5, 10, 10 );
624 }
625}
626
627
628
629void DayItemMonth::setType( Calendar::Day::Type t )
630{
631 switch ( t ) {
632 case Calendar::Day::PrevMonth:
633 case Calendar::Day::NextMonth:
634 back = QBrush( QColor( 224, 224, 224 ) );
635 forg = black;
636 break;
637 case Calendar::Day::ThisMonth:
638 back = QBrush( white );
639 forg = black;
640 break;
641 }
642 typ = t;
643}
644
645
646
647DateButton::DateButton( bool longDate, QWidget *parent, const char * name )
648 :QPushButton( parent, name )
649{
650 longFormat = longDate;
651 df = DateFormat('/', DateFormat::MonthDayYear, DateFormat::MonthDayYear);
652 setDate( QDate::currentDate() );
653
654 connect(this,SIGNAL(pressed()),this,SLOT(pickDate()));
655
656
657}
658
659
660void DateButton::pickDate()
661{
662 static QPopupMenu *m1 = 0;
663 static DateBookMonth *picker = 0;
664 if ( !m1 ) {
665 m1 = new QPopupMenu( this );
666 picker = new DateBookMonth( m1, 0, TRUE );
667 m1->insertItem( picker );
668 connect( picker, SIGNAL( dateClicked( int, int, int ) ),
669 this, SLOT( setDate( int, int, int ) ) );
670 connect( picker, SIGNAL( dateClicked( int, int, int ) ),
671 this, SIGNAL( dateSelected( int, int, int ) ) );
672 connect( m1, SIGNAL( aboutToHide() ),
673 this, SLOT( gotHide() ) );
674 }
675 picker->slotWeekChange( weekStartsMonday );
676 picker->setDate( currDate.year(), currDate.month(), currDate.day() );
677 m1->popup(mapToGlobal(QPoint(0,height())));
678 picker->setFocus();
679}
680
681
682void DateButton::gotHide()
683{
684 // we have to redo the button...
685 setDown( false );
686}
687
688
689// void dateSelected( int year, int month, int day );
690
691void DateButton::setWeekStartsMonday( int b )
692{
693 weekStartsMonday = b;
694}
695
696void DateButton::setDate( int y, int m, int d )
697{
698 setDate( QDate( y,m,d) );
699}
700
701void DateButton::setDate( QDate d )
702{
703 currDate = d;
704 setText( longFormat ? TimeString::longDateString( d, df ) :
705 TimeString::shortDate( d, df ) );
706
707}
708
709void DateButton::setDateFormat( DateFormat f )
710{
711 df = f;
712 setDate( currDate );
713}
diff --git a/library/datebookmonth.h b/library/datebookmonth.h
new file mode 100644
index 0000000..6cd1ac5
--- a/dev/null
+++ b/library/datebookmonth.h
@@ -0,0 +1,210 @@
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#ifndef DATEBOOKMONTH
21#define DATEBOOKMONTH
22
23#include <qpe/event.h>
24
25#include <qvbox.h>
26#include <qhbox.h>
27#include <qdatetime.h>
28#include <qvaluelist.h>
29#include <qtable.h>
30#include <qpushbutton.h>
31
32#include "calendar.h"
33#include "timestring.h"
34
35class QToolButton;
36class QComboBox;
37class QSpinBox;
38class Event;
39class DateBookDB;
40
41class DateBookMonthHeaderPrivate;
42class DateBookMonthHeader : public QHBox
43{
44 Q_OBJECT
45
46public:
47 DateBookMonthHeader( QWidget *parent = 0, const char *name = 0 );
48 ~DateBookMonthHeader();
49 void setDate( int year, int month );
50
51signals:
52 void dateChanged( int year, int month );
53
54protected slots:
55 void keyPressEvent(QKeyEvent *e ) {
56 e->ignore();
57 }
58
59private slots:
60 void updateDate();
61 void firstMonth();
62 void lastMonth();
63 void monthBack();
64 void monthForward();
65
66private:
67 QToolButton *begin, *back, *next, *end;
68 QComboBox *month;
69 QSpinBox *year;
70 DateBookMonthHeaderPrivate *d;
71};
72
73class DayItemMonthPrivate;
74class DayItemMonth : public QTableItem
75{
76public:
77 DayItemMonth( QTable *table, EditType et, const QString &t );
78 ~DayItemMonth();
79 void paint( QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected );
80 void setDay( int d ) { dy = d; }
81 void setEvents( const QValueList<Event> &events ) { daysEvents = events; };
82 void setEvents( const QValueList<EffectiveEvent> &effEvents );
83 void clearEvents() { daysEvents.clear(); };
84 void clearEffEvents();
85 int day() const { return dy; }
86 void setType( Calendar::Day::Type t );
87 Calendar::Day::Type type() const { return typ; }
88
89private:
90 QBrush back;
91 QColor forg;
92 int dy;
93 Calendar::Day::Type typ;
94 QValueList<Event> daysEvents; // not used anymore...
95 DayItemMonthPrivate *d;
96};
97
98class DateBookMonthTablePrivate;
99class DateBookMonthTable : public QTable
100{
101 Q_OBJECT
102
103public:
104 DateBookMonthTable( QWidget *parent = 0, const char *name = 0,
105 DateBookDB *newDb = 0 );
106 ~DateBookMonthTable();
107 void setDate( int y, int m, int d );
108 void redraw();
109
110 QSize minimumSizeHint() const { return sizeHint(); }
111 QSize minimumSize() const { return sizeHint(); }
112 void getDate( int& y, int &m, int &d ) const {y=selYear;m=selMonth;d=selDay;}
113 void setWeekStart( bool onMonday );
114signals:
115 void dateClicked( int year, int month, int day );
116
117protected:
118 void viewportMouseReleaseEvent( QMouseEvent * );
119
120protected slots:
121
122 void keyPressEvent(QKeyEvent *e ) {
123 e->ignore();
124 }
125
126private slots:
127 void dayClicked( int row, int col );
128 void dragDay( int row, int col );
129
130private:
131 void setupTable();
132 void setupLabels();
133
134 void findDay( int day, int &row, int &col );
135 void getEvents();
136 void changeDaySelection( int row, int col );
137
138 int year, month, day;
139 int selYear, selMonth, selDay;
140 QValueList<Event> monthsEvents; // not used anymore...
141 DateBookDB *db;
142 DateBookMonthTablePrivate *d;
143};
144
145class DateBookMonthPrivate;
146class DateBookMonth : public QVBox
147{
148 Q_OBJECT
149
150public:
151 DateBookMonth( QWidget *parent = 0, const char *name = 0, bool ac = FALSE,
152 DateBookDB *data = 0 );
153 ~DateBookMonth();
154 QDate selectedDate() const;
155
156signals:
157 void dateClicked( int year, int month, int day );
158
159public slots:
160 void setDate( int y, int m );
161 void setDate( int y, int m, int d );
162 void setDate( QDate );
163 void redraw();
164 void slotWeekChange( bool );
165
166protected slots:
167 virtual void keyPressEvent(QKeyEvent *e);
168
169private slots:
170 void forwardDateClicked( int y, int m, int d ) { emit dateClicked( y, m, d ); }
171 void finalDate(int, int, int);
172
173private:
174 DateBookMonthHeader *header;
175 DateBookMonthTable *table;
176 int year, month, day;
177 bool autoClose;
178 class DateBookMonthPrivate *d;
179};
180
181class DateButton : public QPushButton
182{
183 Q_OBJECT
184
185public:
186 DateButton( bool longDate, QWidget *parent, const char * name = 0 );
187 QDate date() const { return currDate; }
188
189signals:
190 void dateSelected( int year, int month, int day );
191
192public slots:
193 void setDate( int y, int m, int d );
194 void setDate( QDate );
195 void setWeekStartsMonday( int );
196 void setDateFormat( DateFormat );
197
198private slots:
199 void pickDate();
200 void gotHide();
201
202private:
203 bool longFormat;
204 bool weekStartsMonday;
205 QDate currDate;
206 DateFormat df;
207};
208
209
210#endif
diff --git a/library/filemanager.cpp b/library/filemanager.cpp
new file mode 100644
index 0000000..2b97846
--- a/dev/null
+++ b/library/filemanager.cpp
@@ -0,0 +1,274 @@
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#include "filemanager.h"
21#include "applnk.h"
22
23#include <qdir.h>
24#include <qfile.h>
25#include <qfileinfo.h>
26#include <qtextstream.h>
27#include <qtextcodec.h>
28
29#include <errno.h>
30#include <stdlib.h>
31
32/*!
33 \class FileManager
34 \brief The FileManager class assists with AppLnk input/output.
35*/
36
37/*!
38 Constructs a FileManager.
39*/
40FileManager::FileManager()
41{
42}
43
44/*!
45 Destroys a FileManager.
46*/
47FileManager::~FileManager()
48{
49
50}
51
52/*!
53 Saves \a data as the document specified by \a f.
54
55 Returns whether the operation succeeded.
56*/
57bool FileManager::saveFile( const DocLnk &f, const QByteArray &data )
58{
59 QString fn = f.file() + ".new";
60 ensurePathExists( fn );
61 QFile fl( fn );
62 if ( !fl.open( IO_WriteOnly|IO_Raw ) )
63 return FALSE;
64 int total_written = fl.writeBlock( data );
65 fl.close();
66 if ( total_written != int(data.size()) || !f.writeLink() ) {
67 QFile::remove( fn );
68 return FALSE;
69 }
70 // else rename the file...
71 if ( ::rename( fn.latin1(), f.file().latin1() ) < 0 ) {
72 qWarning( "problem renaming file %s to %s, errno: %d", fn.latin1(),
73 f.file().latin1(), errno );
74 // remove the file...
75 QFile::remove( fn );
76 }
77 return TRUE;
78}
79
80/*!
81 Saves \a text as the document specified by \a f.
82
83 The text is saved in UTF8 format.
84
85 Returns whether the operation succeeded.
86*/
87bool FileManager::saveFile( const DocLnk &f, const QString &text )
88{
89 QString fn = f.file() + ".new";
90 ensurePathExists( fn );
91 QFile fl( fn );
92 if ( !fl.open( IO_WriteOnly|IO_Raw ) ) {
93 qDebug( "open failed: %s", fn.latin1() );
94 return FALSE;
95 }
96
97 QCString cstr = text.utf8();
98 int total_written;
99 total_written = fl.writeBlock( cstr.data(), cstr.length() );
100 fl.close();
101 if ( total_written != int(cstr.length()) || !f.writeLink() ) {
102 QFile::remove( fn );
103 return FALSE;
104 }
105 // okay now rename the file...
106 if ( ::rename( fn.latin1(), f.file().latin1() ) < 0 ) {
107 qWarning( "problem renaming file %s to %s, errno: %d", fn.latin1(),
108 f.file().latin1(), errno );
109 // remove the tmp file, otherwise, it will just lay around...
110 QFile::remove( fn.latin1() );
111 }
112 return TRUE;
113}
114
115
116/*!
117 Loads \a text from the document specified by \a f.
118
119 The text is required to be in UTF8 format.
120
121 Returns whether the operation succeeded.
122*/
123bool FileManager::loadFile( const DocLnk &f, QString &text )
124{
125 QString fn = f.file();
126 QFile fl( fn );
127 if ( !fl.open( IO_ReadOnly ) )
128 return FALSE;
129 QTextStream ts( &fl );
130#if QT_VERSION <= 230 && defined(QT_NO_CODECS)
131 // The below should work, but doesn't in Qt 2.3.0
132 ts.setCodec( QTextCodec::codecForMib( 106 ) );
133#else
134 ts.setEncoding( QTextStream::UnicodeUTF8 );
135#endif
136 text = ts.read();
137 fl.close();
138 return TRUE;
139}
140
141
142/*!
143 Loads \a ba from the document specified by \a f.
144
145 Returns whether the operation succeeded.
146*/
147bool FileManager::loadFile( const DocLnk &f, QByteArray &ba )
148{
149 QString fn = f.file();
150 QFile fl( fn );
151 if ( !fl.open( IO_ReadOnly ) )
152 return FALSE;
153 ba.resize( fl.size() );
154 if ( fl.size() > 0 )
155 fl.readBlock( ba.data(), fl.size() );
156 fl.close();
157 return TRUE;
158}
159
160/*!
161 Copies the document specified by \a src to the document specified
162 by \a dest.
163
164 Returns whether the operation succeeded.
165*/
166bool FileManager::copyFile( const AppLnk &src, const AppLnk &dest )
167{
168 QFile sf( src.file() );
169 if ( !sf.open( IO_ReadOnly ) )
170 return FALSE;
171
172 QString fn = dest.file() + ".new";
173 ensurePathExists( fn );
174 QFile df( fn );
175 if ( !df.open( IO_WriteOnly|IO_Raw ) )
176 return FALSE;
177
178 const int bufsize = 16384;
179 char buffer[bufsize];
180 bool ok = TRUE;
181 int bytesRead = 0;
182 while ( ok && !sf.atEnd() ) {
183 bytesRead = sf.readBlock( buffer, bufsize );
184 if ( bytesRead < 0 )
185 ok = FALSE;
186 while ( ok && bytesRead > 0 ) {
187 int bytesWritten = df.writeBlock( buffer, bytesRead );
188 if ( bytesWritten < 0 )
189 ok = FALSE;
190 else
191 bytesRead -= bytesWritten;
192 }
193 }
194
195 if ( ok )
196 ok = dest.writeLink();
197
198 if ( ok ) {
199 // okay now rename the file...
200 if ( ::rename( fn.latin1(), dest.file().latin1() ) < 0 ) {
201 qWarning( "problem renaming file %s to %s, errno: %d", fn.latin1(),
202 dest.file().latin1(), errno );
203 // remove the tmp file, otherwise, it will just lay around...
204 QFile::remove( fn.latin1() );
205 }
206 } else {
207 QFile::remove( fn.latin1() );
208 }
209
210 return ok;
211}
212
213/*!
214 Opens the document specified by \a f as a readable QIODevice.
215 The caller must delete the return value.
216
217 Returns 0 if the operation fails.
218*/
219QIODevice* FileManager::openFile( const DocLnk& f )
220{
221 QString fn = f.file();
222 QFile* fl = new QFile( fn );
223 if ( !fl->open( IO_ReadOnly ) ) {
224 delete fl;
225 fl = 0;
226 }
227 return fl;
228}
229
230/*!
231 Opens the document specified by \a f as a writable QIODevice.
232 The caller must delete the return value.
233
234 Returns 0 if the operation fails.
235*/
236QIODevice* FileManager::saveFile( const DocLnk& f )
237{
238 QString fn = f.file();
239 ensurePathExists( fn );
240 QFile* fl = new QFile( fn );
241 if ( fl->open( IO_WriteOnly ) ) {
242 f.writeLink();
243 } else {
244 delete fl;
245 fl = 0;
246 }
247 return fl;
248}
249
250/*!
251 Returns whether the document specified by \a f current exists
252 as a file on disk.
253*/
254bool FileManager::exists( const DocLnk &f )
255{
256 return QFile::exists(f.file());
257}
258
259
260/*!
261 Ensures that the path \a fn exists, by creating required directories.
262 Returns TRUE if successful.
263*/
264bool FileManager::ensurePathExists( const QString &fn )
265{
266 QFileInfo fi(fn);
267 fi.setFile( fi.dirPath(TRUE) );
268 if ( !fi.exists() ) {
269 if ( system(("mkdir -p "+fi.filePath())) )
270 return FALSE;
271 }
272
273 return TRUE;
274}
diff --git a/library/filemanager.h b/library/filemanager.h
new file mode 100644
index 0000000..f8d9425
--- a/dev/null
+++ b/library/filemanager.h
@@ -0,0 +1,56 @@
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#ifndef FILEMANAGER_H
21#define FILEMANAGER_H
22
23#include <qstring.h>
24#include <qstringlist.h>
25
26class AppLnk;
27class DocLnk;
28class FileManagerPrivate;
29
30class FileManager
31{
32public:
33 FileManager();
34 ~FileManager();
35
36 bool saveFile( const DocLnk&, const QByteArray &data );
37 bool saveFile( const DocLnk&, const QString &text );
38 bool loadFile( const DocLnk&, QByteArray &data );
39 bool loadFile( const DocLnk&, QString &text );
40 bool copyFile( const AppLnk &src, const AppLnk &dest );
41
42 // The caller must delete the return values.
43 QIODevice* openFile( const DocLnk& );
44 QIODevice* saveFile( const DocLnk& );
45
46 bool exists( const DocLnk& );
47
48protected:
49 bool ensurePathExists( const QString &fn );
50
51private:
52 FileManagerPrivate *d;
53};
54
55
56#endif
diff --git a/library/fileselector.cpp b/library/fileselector.cpp
new file mode 100644
index 0000000..365f383
--- a/dev/null
+++ b/library/fileselector.cpp
@@ -0,0 +1,340 @@
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#include "fileselector.h"
21#include "global.h"
22#include "resource.h"
23#include "config.h"
24#include "applnk.h"
25#include "storage.h"
26#include "qpemenubar.h"
27#include "qcopchannel_qws.h"
28#include "lnkproperties.h"
29#include "applnk.h"
30#include "qpeapplication.h"
31#include "categorymenu.h"
32
33#include <stdlib.h>
34
35#include <qdir.h>
36#include <qwidget.h>
37#include <qpopupmenu.h>
38#include <qtoolbutton.h>
39#include <qpushbutton.h>
40#include <qheader.h>
41#include <qtooltip.h>
42
43
44FileSelectorItem::FileSelectorItem( QListView *parent, const DocLnk &f )
45 : QListViewItem( parent ), fl( f )
46{
47 setText( 0, f.name() );
48 setPixmap( 0, f.pixmap() );
49}
50
51FileSelectorItem::~FileSelectorItem()
52{
53}
54
55class FileSelectorViewPrivate
56{
57public:
58 CategoryMenu *cm;
59};
60
61FileSelectorView::FileSelectorView( const QString &f, QWidget *parent, const char *name )
62 : QListView( parent, name ), filter( f ), count( 0 )
63{
64 d = new FileSelectorViewPrivate();
65 d->cm = 0;
66 setAllColumnsShowFocus( TRUE );
67 addColumn( tr( "Name" ) );
68 header()->hide();
69
70 fileManager = new FileManager;
71 reread();
72 QCopChannel *channel = new QCopChannel( "QPE/Card", this );
73 connect( channel, SIGNAL(received(const QCString &, const QByteArray &)),
74 this, SLOT(cardMessage( const QCString &, const QByteArray &)) );
75}
76
77FileSelectorView::~FileSelectorView()
78{
79}
80
81void FileSelectorView::reread()
82{
83 FileSelectorItem *item = (FileSelectorItem *)selectedItem();
84 QString oldFile;
85 if ( item )
86 oldFile = item->file().file();
87 clear();
88 DocLnkSet files;
89 Global::findDocuments(&files, filter);
90 count = files.children().count();
91 QListIterator<DocLnk> dit( files.children() );
92 for ( ; dit.current(); ++dit ) {
93 if (d->cm)
94 if (!d->cm->isSelected((**dit).categories()))
95 continue;
96 item = new FileSelectorItem( this, **dit );
97 if ( item->file().file() == oldFile )
98 setCurrentItem( item );
99 }
100 if ( !selectedItem() )
101 setCurrentItem( firstChild() );
102}
103
104void FileSelectorView::setCategoryFilter(CategoryMenu *cm)
105{
106 d->cm = cm;
107 connect(cm, SIGNAL(categoryChange()), this, SLOT(categoryChanged()) );
108}
109
110void FileSelectorView::categoryChanged() { reread(); }
111
112void FileSelectorView::cardMessage( const QCString &msg, const QByteArray &)
113{
114 if ( msg == "mtabChanged()" )
115 reread();
116}
117
118void FileSelectorView::keyPressEvent( QKeyEvent *e )
119{
120 QString txt = e->text();
121 if (e->key() == Key_Space)
122 emit returnPressed( currentItem() );
123 else if ( !txt.isNull() && txt[0] > ' ' && e->key() < 0x1000 )
124 e->ignore();
125 else
126 QListView::keyPressEvent(e);
127}
128
129class FileSelectorPrivate
130{
131public:
132 CategoryMenu *cm;
133 QMenuBar *mb;
134};
135
136/*!
137 \class FileSelector fileselector.h
138 \brief The FileSelector widget allows the user to select DocLnk objects.
139*/
140
141/*!
142 Constructs a FileSelector with mime filter \a f.
143 The standard Qt \a parent and \a name parameters are passed to the
144 parent.
145
146 If \a newVisible is TRUE, the widget has an button allowing the user
147 the create "new" documents - editor applications will have this while
148 viewer applications will not.
149
150 If \a closeVisible is TRUE, the widget has an button allowinf the user
151 to select "no document".
152
153 \sa DocLnkSet::DocLnkSet()
154*/
155FileSelector::FileSelector( const QString &f, QWidget *parent, const char *name, bool newVisible, bool closeVisible )
156 : QVBox( parent, name ), filter( f )
157{
158 setMargin( 0 );
159 setSpacing( 0 );
160 QHBox *top = new QHBox( this );
161 top->setBackgroundMode( PaletteButton );// same colour as toolbars
162 top->setSpacing( 0 );
163
164 QWidget *spacer = new QWidget( top );
165 spacer->setBackgroundMode( PaletteButton );
166
167 d = new FileSelectorPrivate();
168 d->mb = new QMenuBar(spacer);
169 d->cm = new CategoryMenu("Document View", this);
170 QPEMenuToolFocusManager::manager()->addWidget( d->mb );
171 d->mb->insertItem(tr("View"), d->cm);
172
173
174 QToolButton *tb = new QToolButton( top );
175 tb->setPixmap( Resource::loadPixmap( "new" ) );
176 connect( tb, SIGNAL( clicked() ), this, SLOT( createNew() ) );
177 buttonNew = tb;
178 tb->setFixedSize( 18, 20 ); // tb->sizeHint() );
179 tb->setAutoRaise( TRUE );
180 QToolTip::add( tb, tr( "Create a new Document" ) );
181 QPEMenuToolFocusManager::manager()->addWidget( tb );
182
183 tb = new QToolButton( top );
184 tb->setPixmap( Resource::loadPixmap( "close" ) );
185 connect( tb, SIGNAL( clicked() ), this, SIGNAL( closeMe() ) );
186 buttonClose = tb;
187 tb->setFixedSize( 18, 20 ); // tb->sizeHint() );
188 tb->setAutoRaise( TRUE );
189 QToolTip::add( tb, tr( "Close the File Selector" ) );
190 QPEMenuToolFocusManager::manager()->addWidget( tb );
191
192 view = new FileSelectorView( filter, this, "fileview" );
193 view->setCategoryFilter(d->cm);
194 QPEApplication::setStylusOperation( view->viewport(), QPEApplication::RightOnHold );
195 connect( view, SIGNAL( mouseButtonClicked( int, QListViewItem *, const QPoint &, int ) ),
196 this, SLOT( fileClicked( int, QListViewItem *, const QPoint &, int ) ) );
197 connect( view, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint &, int ) ),
198 this, SLOT( filePressed( int, QListViewItem *, const QPoint &, int ) ) );
199 connect( view, SIGNAL( returnPressed( QListViewItem * ) ),
200 this, SLOT( fileClicked( QListViewItem * ) ) );
201
202 setNewVisible( newVisible );
203 setCloseVisible( closeVisible );
204}
205
206/*!
207 Destroys the widget.
208*/
209FileSelector::~FileSelector()
210{
211
212}
213
214/*!
215 Returns the number of files in the view. If this is zero, and editor
216 application might avoid using the selector and immediately start with
217 a "new" document.
218*/
219int FileSelector::fileCount()
220{
221 return view->fileCount();
222}
223
224/*!
225 Causes the file selector to act as if the "new" button was chosen.
226
227 \sa newSelected(), closeMe()
228*/
229void FileSelector::createNew()
230{
231 DocLnk f;
232 emit newSelected( f );
233 emit closeMe();
234}
235
236void FileSelector::fileClicked( int button, QListViewItem *i, const QPoint &, int )
237{
238 if ( !i )
239 return;
240 if ( button == Qt::LeftButton ) {
241 fileClicked( i );
242 }
243}
244
245void FileSelector::filePressed( int button, QListViewItem *i, const QPoint &, int )
246{
247 if ( !i )
248 return;
249 if ( button == Qt::RightButton ) {
250 DocLnk l = ((FileSelectorItem *)i)->file();
251 LnkProperties prop( &l );
252 prop.showMaximized();
253 prop.exec();
254 d->cm->reload();
255 reread();
256 }
257}
258
259void FileSelector::fileClicked( QListViewItem *i )
260{
261 if ( !i )
262 return;
263 emit fileSelected( ( (FileSelectorItem*)i )->file() );
264 emit closeMe();
265}
266
267/*!
268 Returns the selected DocLnk. The caller is responsible for deleting
269 the returned value.
270*/
271const DocLnk *FileSelector::selected()
272{
273 FileSelectorItem *item = (FileSelectorItem *)view->selectedItem();
274 if ( item )
275 return new DocLnk( item->file() );
276 return NULL;
277}
278
279/*!
280 \fn void FileSelector::fileSelected( const DocLnk &f )
281
282 This signal is emitted when the user selects a file.
283 \a f is the file.
284*/
285
286/*!
287 \fn void FileSelector::newSelected( const DocLnk &f )
288
289 This signal is emitted when the user selects "new" file.
290 \a f is a DocLnk for the file. You will need to set the type
291 of the value after copying it.
292*/
293
294/*!
295 \fn void FileSelector::closeMe()
296
297 This signal is emitted when the user no longer needs to view the widget.
298*/
299
300
301/*!
302 Sets whether a "new document" button is visible, according to \a b.
303*/
304void FileSelector::setNewVisible( bool b )
305{
306 if ( b )
307 buttonNew->show();
308 else
309 buttonNew->hide();
310}
311
312/*!
313 Sets whether a "no document" button is visible, according to \a b.
314*/
315void FileSelector::setCloseVisible( bool b )
316{
317 if ( b )
318 buttonClose->show();
319 else
320 buttonClose->hide();
321}
322
323/*!
324 Sets whether a categories menu is visible, according to \a b.
325*/
326void FileSelector::setCategoriesVisible( bool b )
327{
328 if ( b )
329 d->mb->show();
330 else
331 d->mb->hide();
332}
333
334/*!
335 Rereads the list of files.
336*/
337void FileSelector::reread()
338{
339 view->reread();
340}
diff --git a/library/fileselector.h b/library/fileselector.h
new file mode 100644
index 0000000..ef8efea
--- a/dev/null
+++ b/library/fileselector.h
@@ -0,0 +1,108 @@
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#ifndef FILESELECTOR_H
21#define FILESELECTOR_H
22
23#include <qhbox.h>
24#include <qvbox.h>
25#include <qlistview.h>
26#include <qtoolbutton.h>
27
28#include "filemanager.h"
29#include "applnk.h"
30
31class QPopupMenu;
32class QPushButton;
33
34class FileSelectorItem : public QListViewItem
35{
36public:
37 FileSelectorItem( QListView *parent, const DocLnk& f );
38 ~FileSelectorItem();
39
40 DocLnk file() const { return fl; }
41
42private:
43 DocLnk fl;
44};
45
46class CategoryMenu;
47class FileSelectorViewPrivate;
48class FileSelectorView : public QListView
49{
50 Q_OBJECT
51
52public:
53 FileSelectorView( const QString &mimefilter, QWidget *parent, const char *name );
54 ~FileSelectorView();
55 void reread();
56 int fileCount() { return count; }
57
58 void setCategoryFilter(CategoryMenu *);
59protected:
60 void keyPressEvent( QKeyEvent *e );
61
62protected slots:
63 void cardMessage( const QCString &, const QByteArray &);
64
65 void categoryChanged();
66
67private:
68 QString filter;
69 FileManager *fileManager;
70 int count;
71 FileSelectorViewPrivate *d;
72};
73
74class FileSelectorPrivate;
75class FileSelector : public QVBox
76{
77 Q_OBJECT
78
79public:
80 FileSelector( const QString &mimefilter, QWidget *parent, const char *name, bool newVisible = TRUE, bool closeVisible = TRUE );
81 ~FileSelector();
82 void setNewVisible( bool b );
83 void setCloseVisible( bool b );
84 void setCategoriesVisible( bool b );
85 void reread();
86 int fileCount();
87 const DocLnk *selected();
88
89signals:
90 void fileSelected( const DocLnk & );
91 void newSelected( const DocLnk & );
92 void closeMe();
93
94private slots:
95 void createNew();
96 void fileClicked( int, QListViewItem *, const QPoint &, int );
97 // pressed to get 'right down'
98 void filePressed( int, QListViewItem *, const QPoint &, int );
99 void fileClicked( QListViewItem *);
100
101private:
102 FileSelectorView *view;
103 QString filter;
104 QToolButton *buttonNew, *buttonClose;
105 FileSelectorPrivate *d;
106};
107
108#endif
diff --git a/library/finddialog.cpp b/library/finddialog.cpp
new file mode 100644
index 0000000..7a9367b
--- a/dev/null
+++ b/library/finddialog.cpp
@@ -0,0 +1,73 @@
1/**********************************************************************
2** Copyright (C) 2001 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 "finddialog.h"
22#include "findwidget_p.h"
23
24#include <qlayout.h>
25#include <qpushbutton.h>
26
27FindDialog::FindDialog( const QString &appName, QWidget *parent,
28 const char *name, bool modal )
29 : QDialog( parent, name, modal )
30{
31 QVBoxLayout *vb;
32 vb = new QVBoxLayout( this );
33 fw = new FindWidget( appName, this, "Find Widget" );
34 vb->addWidget( fw );
35 QObject::connect( fw, SIGNAL(signalFindClicked(const QString&,
36 bool,bool,int)),
37 this, SIGNAL(signalFindClicked(const QString&,
38 bool,bool,int)) );
39 QObject::connect( fw, SIGNAL(signalFindClicked(const QString&,const QDate&,
40 bool,bool,int)),
41 this, SIGNAL(signalFindClicked(const QString&,
42 const QDate&,bool,bool,int)) );
43 d = 0;
44}
45
46FindDialog::~FindDialog()
47{
48}
49
50QString FindDialog::findText() const
51{
52 return fw->findText();
53}
54
55void FindDialog::setUseDate( bool show )
56{
57 fw->setUseDate( show );
58}
59
60void FindDialog::setDate( const QDate &dt )
61{
62 fw->setDate( dt );
63}
64
65void FindDialog::slotNotFound()
66{
67 fw->slotNotFound();
68}
69
70void FindDialog::slotWrapAround()
71{
72 fw->slotWrapAround();
73}
diff --git a/library/finddialog.h b/library/finddialog.h
new file mode 100644
index 0000000..265b5ae
--- a/dev/null
+++ b/library/finddialog.h
@@ -0,0 +1,57 @@
1/**********************************************************************
2** Copyright (C) 2001 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 __FINDDIALOG_H__
22#define __FINDDIALOG_H__
23
24#include <qdatetime.h>
25#include <qdialog.h>
26
27class FindWidget;
28
29class FindDialogPrivate;
30class FindDialog : public QDialog
31{
32 Q_OBJECT
33public:
34 FindDialog( const QString &appName,
35 QWidget *parent = 0, const char *name = 0, bool modal = TRUE );
36 ~FindDialog();
37
38 QString findText() const;
39 void setUseDate( bool show );
40 void setDate( const QDate &dt );
41
42public slots:
43 void slotNotFound();
44 void slotWrapAround();
45
46signals:
47 void signalFindClicked( const QString &txt, bool caseSensitive,
48 bool backwards, int category );
49 void signalFindClicked( const QString &txt, const QDate &dt,
50 bool caseSensitive, bool backwards, int category );
51
52private:
53 FindWidget *fw;
54 FindDialogPrivate *d;
55};
56
57#endif
diff --git a/library/findwidget_p.cpp b/library/findwidget_p.cpp
new file mode 100644
index 0000000..7ed8bca
--- a/dev/null
+++ b/library/findwidget_p.cpp
@@ -0,0 +1,119 @@
1/**********************************************************************
2** Copyright (C) 2001 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 "findwidget_p.h"
22
23#include <qpe/categories.h>
24#include <qpe/categoryselect.h>
25#include <qpe/datebookmonth.h>
26#include <qpe/timestring.h>
27
28#include <qcheckbox.h>
29#include <qlabel.h>
30#include <qlineedit.h>
31#include <qmessagebox.h>
32#include <qpushbutton.h>
33#include <qpopupmenu.h>
34#include <qtoolbutton.h>
35
36FindWidget::FindWidget( const QString &appName, QWidget *parent,
37 const char *name )
38 : FindWidgetBase( parent, name ),
39 mStrApp( appName ),
40 mDate( QDate::currentDate() )
41{
42 setMaximumSize( sizeHint() );
43 QArray<int> vl(0);
44 cmbCat->setCategories( vl, mStrApp );
45 cmbCat->setRemoveCategoryEdit( TRUE );
46 cmbCat->setAllCategories( TRUE );
47 // hide junk for the moment...
48 lblStartDate->hide();
49 cmdStartDate->hide();
50 QPopupMenu *m1 = new QPopupMenu( this );
51 dtPicker = new DateBookMonth( m1, 0, TRUE );
52 dtPicker->setDate( mDate.year(), mDate.month(), mDate.day() );
53 m1->insertItem( dtPicker );
54 cmdStartDate->setPopup( m1 );
55 cmdStartDate->setText( TimeString::shortDate(mDate) );
56 QObject::connect( dtPicker, SIGNAL(dateClicked(int, int, int)),
57 this, SLOT(slotDateChanged(int, int, int)) );
58
59 QObject::connect( cmdFind, SIGNAL(clicked()),
60 this, SLOT(slotFindClicked()) );
61}
62
63FindWidget::~FindWidget()
64{
65}
66
67QString FindWidget::findText() const
68{
69 return txtFind->text();
70}
71
72void FindWidget::slotFindClicked()
73{
74 lblStatus->setText( "" );
75 if ( cmdStartDate->isVisible() )
76 emit signalFindClicked( findText(),
77 mDate,
78 chkCase->isChecked(),
79 chkBackwards->isChecked(),
80 cmbCat->currentCategory() );
81 else
82 emit signalFindClicked( findText(), chkCase->isChecked(),
83 chkBackwards->isChecked(),
84 cmbCat->currentCategory() );
85}
86
87void FindWidget::setUseDate( bool show )
88{
89 if ( show ) {
90 lblStartDate->show();
91 cmdStartDate->show();
92 } else {
93 lblStartDate->hide();
94 cmdStartDate->hide();
95 }
96 chkBackwards->setDisabled( show );
97}
98
99void FindWidget::setDate( const QDate &dt )
100{
101 slotDateChanged( dt.year(), dt.month(), dt.day() );
102}
103
104void FindWidget::slotNotFound()
105{
106 lblStatus->setText( tr("String Not Found.") );
107}
108
109void FindWidget::slotWrapAround()
110{
111 lblStatus->setText( tr("End reached, starting at beginning") );
112}
113
114void FindWidget::slotDateChanged( int year, int month, int day )
115{
116 mDate.setYMD( year, month, day );
117 cmdStartDate->setText( TimeString::shortDate( mDate ) );
118 dtPicker->setDate( year, month, day );
119}
diff --git a/library/findwidget_p.h b/library/findwidget_p.h
new file mode 100644
index 0000000..418242c
--- a/dev/null
+++ b/library/findwidget_p.h
@@ -0,0 +1,65 @@
1/**********************************************************************
2** Copyright (C) 2001 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 __FINDWIDGET_H__
22#define __FINDWIDGET_H__
23
24#include "findwidgetbase_p.h"
25
26#include <qdatetime.h>
27
28class Categories;
29class DateBookMonth;
30
31class FindWidgetPrivate;
32class FindWidget : public FindWidgetBase
33{
34 Q_OBJECT
35public:
36 FindWidget( const QString &appName,
37 QWidget *parent = 0, const char *name = 0 );
38 ~FindWidget();
39
40 QString findText() const;
41 void setUseDate( bool show );
42 void setDate( const QDate &dt );
43
44public slots:
45 void slotNotFound();
46 void slotWrapAround();
47 void slotDateChanged( int year, int month, int day );
48
49signals:
50 void signalFindClicked( const QString &txt, bool caseSensitive,
51 bool backwards, int category );
52 void signalFindClicked( const QString &txt, const QDate &dt,
53 bool caseSensitive, bool backwards, int category );
54
55private slots:
56 void slotFindClicked();
57
58private:
59 QString mStrApp;
60 Categories *mpCat;
61 DateBookMonth *dtPicker;
62 QDate mDate;
63};
64
65#endif
diff --git a/library/findwidgetbase_p.ui b/library/findwidgetbase_p.ui
new file mode 100644
index 0000000..5eceaad
--- a/dev/null
+++ b/library/findwidgetbase_p.ui
@@ -0,0 +1,261 @@
1<!DOCTYPE UI><UI>
2<class>FindWidgetBase</class>
3<widget>
4 <class>QWidget</class>
5 <property stdset="1">
6 <name>name</name>
7 <cstring>FindWidgetBase</cstring>
8 </property>
9 <property stdset="1">
10 <name>geometry</name>
11 <rect>
12 <x>0</x>
13 <y>0</y>
14 <width>245</width>
15 <height>183</height>
16 </rect>
17 </property>
18 <property stdset="1">
19 <name>sizePolicy</name>
20 <sizepolicy>
21 <hsizetype>1</hsizetype>
22 <vsizetype>1</vsizetype>
23 </sizepolicy>
24 </property>
25 <property stdset="1">
26 <name>caption</name>
27 <string>Find</string>
28 </property>
29 <property>
30 <name>layoutMargin</name>
31 </property>
32 <property>
33 <name>layoutSpacing</name>
34 </property>
35 <vbox>
36 <property stdset="1">
37 <name>margin</name>
38 <number>0</number>
39 </property>
40 <property stdset="1">
41 <name>spacing</name>
42 <number>0</number>
43 </property>
44 <widget>
45 <class>QLayoutWidget</class>
46 <property stdset="1">
47 <name>name</name>
48 <cstring>Layout1</cstring>
49 </property>
50 <hbox>
51 <property stdset="1">
52 <name>margin</name>
53 <number>0</number>
54 </property>
55 <property stdset="1">
56 <name>spacing</name>
57 <number>6</number>
58 </property>
59 <widget>
60 <class>QLabel</class>
61 <property stdset="1">
62 <name>name</name>
63 <cstring>lblFindWhat</cstring>
64 </property>
65 <property stdset="1">
66 <name>frameShape</name>
67 <enum>MShape</enum>
68 </property>
69 <property stdset="1">
70 <name>frameShadow</name>
71 <enum>MShadow</enum>
72 </property>
73 <property stdset="1">
74 <name>text</name>
75 <string>Find what:</string>
76 </property>
77 </widget>
78 <widget>
79 <class>QLineEdit</class>
80 <property stdset="1">
81 <name>name</name>
82 <cstring>txtFind</cstring>
83 </property>
84 </widget>
85 <widget>
86 <class>QPushButton</class>
87 <property stdset="1">
88 <name>name</name>
89 <cstring>cmdFind</cstring>
90 </property>
91 <property stdset="1">
92 <name>text</name>
93 <string>&amp;Find</string>
94 </property>
95 <property stdset="1">
96 <name>default</name>
97 <bool>true</bool>
98 </property>
99 </widget>
100 </hbox>
101 </widget>
102 <widget>
103 <class>QLayoutWidget</class>
104 <property stdset="1">
105 <name>name</name>
106 <cstring>Layout2</cstring>
107 </property>
108 <hbox>
109 <property stdset="1">
110 <name>margin</name>
111 <number>0</number>
112 </property>
113 <property stdset="1">
114 <name>spacing</name>
115 <number>6</number>
116 </property>
117 <widget>
118 <class>QLabel</class>
119 <property stdset="1">
120 <name>name</name>
121 <cstring>lblCategory</cstring>
122 </property>
123 <property stdset="1">
124 <name>text</name>
125 <string>Category:</string>
126 </property>
127 </widget>
128 <widget>
129 <class>CategorySelect</class>
130 <property stdset="1">
131 <name>name</name>
132 <cstring>cmbCat</cstring>
133 </property>
134 </widget>
135 </hbox>
136 </widget>
137 <widget>
138 <class>QFrame</class>
139 <property stdset="1">
140 <name>name</name>
141 <cstring>Frame3</cstring>
142 </property>
143 <property stdset="1">
144 <name>sizePolicy</name>
145 <sizepolicy>
146 <hsizetype>5</hsizetype>
147 <vsizetype>1</vsizetype>
148 </sizepolicy>
149 </property>
150 <property stdset="1">
151 <name>frameShape</name>
152 <enum>NoFrame</enum>
153 </property>
154 <property stdset="1">
155 <name>frameShadow</name>
156 <enum>Raised</enum>
157 </property>
158 <property>
159 <name>layoutMargin</name>
160 </property>
161 <property>
162 <name>layoutSpacing</name>
163 </property>
164 <hbox>
165 <property stdset="1">
166 <name>margin</name>
167 <number>0</number>
168 </property>
169 <property stdset="1">
170 <name>spacing</name>
171 <number>0</number>
172 </property>
173 <widget>
174 <class>QLabel</class>
175 <property stdset="1">
176 <name>name</name>
177 <cstring>lblStartDate</cstring>
178 </property>
179 <property stdset="1">
180 <name>text</name>
181 <string>Start Search at:</string>
182 </property>
183 </widget>
184 <widget>
185 <class>QPushButton</class>
186 <property stdset="1">
187 <name>name</name>
188 <cstring>cmdStartDate</cstring>
189 </property>
190 <property stdset="1">
191 <name>sizePolicy</name>
192 <sizepolicy>
193 <hsizetype>1</hsizetype>
194 <vsizetype>1</vsizetype>
195 </sizepolicy>
196 </property>
197 <property stdset="1">
198 <name>text</name>
199 <string>Dec 02 01</string>
200 </property>
201 </widget>
202 </hbox>
203 </widget>
204 <widget>
205 <class>QCheckBox</class>
206 <property stdset="1">
207 <name>name</name>
208 <cstring>chkCase</cstring>
209 </property>
210 <property stdset="1">
211 <name>text</name>
212 <string>Case Sensitive</string>
213 </property>
214 </widget>
215 <widget>
216 <class>QCheckBox</class>
217 <property stdset="1">
218 <name>name</name>
219 <cstring>chkBackwards</cstring>
220 </property>
221 <property stdset="1">
222 <name>text</name>
223 <string>Search Backwards</string>
224 </property>
225 </widget>
226 <widget>
227 <class>QLabel</class>
228 <property stdset="1">
229 <name>name</name>
230 <cstring>lblStatus</cstring>
231 </property>
232 <property stdset="1">
233 <name>text</name>
234 <string></string>
235 </property>
236 </widget>
237 </vbox>
238</widget>
239<customwidgets>
240 <customwidget>
241 <class>CategorySelect</class>
242 <header location="global">qpe/categoryselect.h</header>
243 <sizehint>
244 <width>-1</width>
245 <height>-1</height>
246 </sizehint>
247 <container>0</container>
248 <sizepolicy>
249 <hordata>7</hordata>
250 <verdata>1</verdata>
251 </sizepolicy>
252 <pixmap>image0</pixmap>
253 </customwidget>
254</customwidgets>
255<images>
256 <image>
257 <name>image0</name>
258 <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
259 </image>
260</images>
261</UI>
diff --git a/library/fontdatabase.cpp b/library/fontdatabase.cpp
new file mode 100644
index 0000000..50dcf3d
--- a/dev/null
+++ b/library/fontdatabase.cpp
@@ -0,0 +1,235 @@
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 "qpeapplication.h"
22#include "fontfactoryinterface.h"
23#include "fontdatabase.h"
24
25#include <qpe/qlibrary.h>
26
27#include <qfontmanager_qws.h>
28#include <qdir.h>
29#include <qdict.h>
30#include <stdio.h>
31#include <stdlib.h>
32
33static QString fontDir()
34{
35 QString qtdir = getenv("QTDIR");
36 if ( qtdir.isEmpty() ) qtdir = "/usr/local/qt-embedded";
37 return qtdir+"/lib/fonts/";
38}
39
40#ifdef QT_NO_FONTDATABASE
41static QString fontFamily( const QString& key )
42{
43 int u0 = key.find('_');
44 int u1 = key.find('_',u0+1);
45 int u2 = key.find('_',u1+1);
46 QString family = key.left(u0);
47 //int pointSize = key.mid(u0+1,u1-u0-1).toInt();
48 //int weight = key.mid(u1+1,u2-u1-1).toInt();
49 //bool italic = key.mid(u2-1,1) == "i";
50 // #### ignores _t and _I fields
51 return family;
52}
53#endif
54
55QValueList<FontFactory> *FontDatabase::factoryList = 0;
56
57/*!
58 \class FontDatabase fontdatabase.h
59 \brief The FontDatabase class provides information about available fonts.
60
61 Provides information about available fonts.
62
63 FontDatabase provides information about the available fonts of the
64 underlying window system.
65
66 Most often you will simply want to query the database for all font
67 families(), and their respective pointSizes(), styles() and charSets().
68
69 Use FontDatabase rather than QFontDatabase when you may need access to
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*/
76
77/*!
78 Constructs the FontDatabase class.
79*/
80FontDatabase::FontDatabase()
81#ifndef QT_NO_FONTDATABASE
82 : QFontDatabase()
83#endif
84{
85 if ( !factoryList )
86 loadRenderers();
87}
88
89/*!
90 Returns a list of names of all available font families.
91*/
92QStringList FontDatabase::families() const
93{
94#ifndef QT_NO_FONTDATABASE
95 return QFontDatabase::families();
96#else
97 QStringList list;
98 QDict<void> familyDict;
99 QDiskFont *qdf;
100 for ( qdf=qt_fontmanager->diskfonts.first(); qdf!=0;
101 qdf=qt_fontmanager->diskfonts.next()) {
102 QString familyname = qdf->name;
103 if ( !familyDict.find( familyname ) ) {
104 familyDict.insert( familyname, (void *)1 );
105 list.append( familyname );
106 }
107 }
108
109 QDir dir(fontDir(),"*.qpf");
110 for (int i=0; i<(int)dir.count(); i++) {
111 QString familyname = fontFamily(dir[i]);
112 if ( !familyDict.find( familyname ) ) {
113 familyDict.insert( familyname, (void *)1 );
114 list.append( familyname );
115 }
116 }
117
118 return list;
119#endif
120}
121
122#ifdef QT_NO_FONTDATABASE
123/*!
124 Returns a list of standard fontsizes.
125*/
126QValueList<int> FontDatabase::standardSizes()
127{
128 static int s[]={ 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28,
129 36, 48, 72, 0 };
130 static bool first = TRUE;
131 static QValueList<int> sList;
132 if ( first ) {
133 first = FALSE;
134 int i = 0;
135 while( s[i] )
136 sList.append( s[i++] );
137 }
138 return sList;
139}
140
141#endif
142
143/*!
144 Load any font renderer plugins that are available and make fonts that
145 the plugins can read available.
146*/
147void FontDatabase::loadRenderers()
148{
149#ifndef QT_NO_COMPONENT
150 if ( !factoryList )
151 factoryList = new QValueList<FontFactory>;
152
153 QValueList<FontFactory>::Iterator mit;
154 for ( mit = factoryList->begin(); mit != factoryList->end(); ++mit ) {
155 qt_fontmanager->factories.setAutoDelete( false );
156 qt_fontmanager->factories.removeRef( (*mit).factory );
157 qt_fontmanager->factories.setAutoDelete( true );
158 (*mit).interface->release();
159 (*mit).library->unload();
160 delete (*mit).library;
161 }
162 factoryList->clear();
163
164 QString path = QPEApplication::qpeDir() + "/plugins/fontfactories";
165 QDir dir( path, "lib*.so" );
166 QStringList list = dir.entryList();
167 QStringList::Iterator it;
168 for ( it = list.begin(); it != list.end(); ++it ) {
169 FontFactoryInterface *iface = 0;
170 QLibrary *lib = new QLibrary( path + "/" + *it );
171 if ( lib->queryInterface( IID_FontFactory, (QUnknownInterface**)&iface ) == QS_OK ) {
172 FontFactory factory;
173 factory.library = lib;
174 factory.interface = iface;
175 factory.factory = factory.interface->fontFactory();
176 factoryList->append( factory );
177 qt_fontmanager->factories.append( factory.factory );
178 readFonts( factory.factory );
179 } else {
180 delete lib;
181 }
182 }
183#endif
184}
185
186/*!
187 \internal
188*/
189void FontDatabase::readFonts( QFontFactory *factory )
190{
191
192 // Load in font definition file
193 QString fn = fontDir() + "fontdir";
194 FILE* fontdef=fopen(fn.local8Bit(),"r");
195 if(!fontdef) {
196 QCString temp=fn.local8Bit();
197 qWarning("Cannot find font definition file %s - is $QTDIR set correctly?",
198 temp.data());
199 return;
200 }
201 char buf[200]="";
202 char name[200]="";
203 char render[200]="";
204 char file[200]="";
205 char flags[200]="";
206 char isitalic[10]="";
207 fgets(buf,200,fontdef);
208 while(!feof(fontdef)) {
209 if ( buf[0] != '#' ) {
210 int weight=50;
211 int size=0;
212 flags[0]=0;
213 sscanf(buf,"%s %s %s %s %d %d %s",name,file,render,isitalic,&weight,&size,flags);
214 QString filename;
215 if ( file[0] != '/' )
216 filename = fontDir();
217 filename += file;
218 if ( QFile::exists(filename) ) {
219 if( factory->name() == render ) {
220 QDiskFont * qdf=new QDiskFont(factory,name,isitalic[0]=='y',
221 weight,size,flags,filename);
222 qt_fontmanager->diskfonts.append(qdf);
223#ifndef QT_NO_FONTDATABASE
224#if QT_VERSION >= 232
225 QFontDatabase::qwsAddDiskFont( qdf );
226#endif
227#endif
228 }
229 }
230 }
231 fgets(buf,200,fontdef);
232 }
233 fclose(fontdef);
234}
235
diff --git a/library/fontdatabase.h b/library/fontdatabase.h
new file mode 100644
index 0000000..9160ab0
--- a/dev/null
+++ b/library/fontdatabase.h
@@ -0,0 +1,62 @@
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#ifndef FONTFACTORY_H
21#define FONTFACTORY_H
22
23#include <qpe/fontfactoryinterface.h>
24
25#include <qfontdatabase.h>
26#include <qvaluelist.h>
27
28class QLibrary;
29
30struct FontFactory
31{
32#ifndef QT_NO_COMPONENT
33 QLibrary *library;
34#endif
35 FontFactoryInterface *interface;
36 QFontFactory *factory;
37};
38
39class FontDatabase
40#ifndef QT_NO_FONTDATABASE
41 : public QFontDatabase
42#endif
43{
44public:
45 FontDatabase();
46
47 // minimal functionality
48 QStringList families () const;
49#ifdef QT_NO_FONTDATABASE
50 static QValueList<int> standardSizes ();
51#endif
52
53 static void loadRenderers();
54
55private:
56 static void readFonts( QFontFactory *factory );
57
58private:
59 static QValueList<FontFactory> *factoryList;
60};
61
62#endif
diff --git a/library/fontfactoryinterface.h b/library/fontfactoryinterface.h
new file mode 100644
index 0000000..ed65dfa
--- a/dev/null
+++ b/library/fontfactoryinterface.h
@@ -0,0 +1,41 @@
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#ifndef FONTFACTORYINTERFACE_H
21#define FONTFACTORYINTERFACE_H
22
23#include <qnamespace.h>
24#include <qstring.h>
25#include <qpe/qcom.h>
26
27class QFontFactory;
28
29#ifndef QT_NO_COMPONENT
30// {7F194DD6-FAA3-498F-8F30-9C297A570DFA}
31#ifndef IID_FontFactory
32#define IID_FontFactory QUuid( 0x7f194dd6, 0xfaa3, 0x498f, 0x8f, 0x30, 0x9c, 0x29, 0x7a, 0x57, 0x0d, 0xfa)
33#endif
34#endif
35
36struct FontFactoryInterface : public QUnknownInterface
37{
38 virtual QFontFactory *fontFactory() = 0;
39};
40
41#endif
diff --git a/library/fontmanager.cpp b/library/fontmanager.cpp
new file mode 100644
index 0000000..adbe57b
--- a/dev/null
+++ b/library/fontmanager.cpp
@@ -0,0 +1,101 @@
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 "fontmanager.h"
22#include <qfile.h>
23#include <stdlib.h>
24#include <qgfx_qws.h>
25
26
27
28/*
29 QFontInfo doesn't work in QWS at the moment,
30 otherwise we would just have used that to check
31 the real values
32
33 For now, there are only two Unicode fonts in
34 the known universe...
35
36*/
37
38bool FontManager::hasUnicodeFont()
39{
40 QString fontDir = getenv("QTDIR") + QString("/lib/fonts/");
41
42 QString suffix;
43 if ( qt_screen->isTransformed() ) {
44 suffix += "_t";
45 QPoint a = qt_screen->mapToDevice(QPoint(0,0),QSize(2,2));
46 QPoint b = qt_screen->mapToDevice(QPoint(1,1),QSize(2,2));
47 suffix += QString::number( a.x()*8+a.y()*4+(1-b.x())*2+(1-b.y()) );
48 }
49 suffix += ".qpf";
50
51 return QFile::exists( fontDir+"cyberbit_120_50"+suffix )
52 || QFile::exists( fontDir+"unifont_160_50"+suffix ) ||
53 QFile::exists( fontDir+"arial_140_50" + suffix );
54}
55
56QFont FontManager::unicodeFont( Spacing sp )
57{
58 QString key;
59 QString fontName;
60 QString fontDir = getenv("QTDIR") + QString("/lib/fonts/");
61
62 int size;
63 if ( sp == Proportional ) {
64 fontName = "Arial";
65 size=14;
66 key = "arial_140_50";
67 } else {
68 fontName = "Unifont";
69 size=16;
70 key = "unifont_160_50";
71 }
72
73 QString suffix;
74 if ( qt_screen->isTransformed() ) {
75 suffix += "_t";
76 QPoint a = qt_screen->mapToDevice(QPoint(0,0),QSize(2,2));
77 QPoint b = qt_screen->mapToDevice(QPoint(1,1),QSize(2,2));
78 suffix += QString::number( a.x()*8+a.y()*4+(1-b.x())*2+(1-b.y()) );
79 }
80 suffix += ".qpf";
81
82 // if we cannot find it, try the other one
83
84 if ( !QFile::exists(fontDir+key+suffix) ) {
85 key = (sp == Fixed ) ? "arial_140_50" : "unifont_160_50";
86 if ( QFile::exists(fontDir+key+suffix) ) {
87 fontName = (sp == Fixed) ? "Arial" : "Unifont";
88 size = (sp == Fixed) ? 14 : 16;
89 } else {
90 key = "cyberbit_120_50";
91 if ( QFile::exists(fontDir+key+suffix) ) {
92 fontName = "Cyberbit";
93 size = 12;
94 } else {
95 fontName = "Helvetica";
96 size = 14;
97 }
98 }
99 }
100 return QFont(fontName,size);
101}
diff --git a/library/fontmanager.h b/library/fontmanager.h
new file mode 100644
index 0000000..7498df8
--- a/dev/null
+++ b/library/fontmanager.h
@@ -0,0 +1,36 @@
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 FONTMANAGER_H
22#define FONTMANAGER_H
23
24#include <qfont.h>
25
26class FontManager
27{
28public:
29 enum Spacing { Fixed, Proportional };
30 static bool hasUnicodeFont();
31 static QFont unicodeFont( Spacing );
32
33};
34
35
36#endif
diff --git a/library/global.cpp b/library/global.cpp
new file mode 100644
index 0000000..e1bbf3e
--- a/dev/null
+++ b/library/global.cpp
@@ -0,0 +1,644 @@
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#include <qpe/qpedebug.h>
21#include <qpe/global.h>
22#include <qpe/qdawg.h>
23#include <qpe/qpeapplication.h>
24#include <qpe/resource.h>
25#include <qpe/storage.h>
26#include <qpe/applnk.h>
27#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
28#include "qpe/qcopenvelope_qws.h"
29#endif
30
31#include <qfile.h>
32#include <qlabel.h>
33#include <qtimer.h>
34#include <qmap.h>
35#include <qdict.h>
36#include <qdir.h>
37#include <qmessagebox.h>
38#include <qregexp.h>
39
40#include <stdlib.h>
41#include <sys/stat.h>
42#include <sys/wait.h>
43#include <sys/types.h>
44#include <fcntl.h>
45#include <unistd.h>
46
47#include <qwindowsystem_qws.h> // for qwsServer
48#include <qdatetime.h>
49
50//#include "quickexec_p.h"
51
52class Emitter : public QObject {
53 Q_OBJECT
54public:
55 Emitter( QWidget* receiver, const QString& document )
56 {
57 connect(this, SIGNAL(setDocument(const QString&)),
58 receiver, SLOT(setDocument(const QString&)));
59 emit setDocument(document);
60 disconnect(this, SIGNAL(setDocument(const QString&)),
61 receiver, SLOT(setDocument(const QString&)));
62 }
63
64signals:
65 void setDocument(const QString&);
66};
67
68
69class StartingAppList : public QObject {
70 Q_OBJECT
71public:
72 static void add( const QString& name );
73 static bool isStarting( const QString name );
74private slots:
75 void handleNewChannel( const QString &);
76private:
77 StartingAppList( QObject *parent=0, const char* name=0 ) ;
78
79 QDict<QTime> dict;
80 static StartingAppList *appl;
81};
82
83StartingAppList* StartingAppList::appl = 0;
84
85StartingAppList::StartingAppList( QObject *parent, const char* name )
86 :QObject( parent, name )
87{
88#if QT_VERSION >= 232 && !defined(QT_NO_COP)
89 connect( qwsServer, SIGNAL( newChannel(const QString&)),
90 this, SLOT( handleNewChannel(const QString&)) );
91 dict.setAutoDelete( TRUE );
92#endif
93}
94
95void StartingAppList::add( const QString& name )
96{
97#if QT_VERSION >= 232 && !defined(QT_NO_COP)
98 if ( !appl )
99 appl = new StartingAppList;
100 QTime *t = new QTime;
101 t->start();
102 appl->dict.insert( "QPE/Application/" + name, t );
103#endif
104}
105
106bool StartingAppList::isStarting( const QString name )
107{
108#if QT_VERSION >= 232 && !defined(QT_NO_COP)
109 if ( appl ) {
110 QTime *t = appl->dict.find( "QPE/Application/" + name );
111 if ( !t )
112 return FALSE;
113 if ( t->elapsed() > 10000 ) {
114 // timeout in case of crash or something
115 appl->dict.remove( "QPE/Application/" + name );
116 return FALSE;
117 }
118 return TRUE;
119 }
120#endif
121 return FALSE;
122}
123
124void StartingAppList::handleNewChannel( const QString & name )
125{
126#if QT_VERSION >= 232 && !defined(QT_NO_COP)
127 dict.remove( name );
128#endif
129}
130
131static bool docDirCreated = FALSE;
132static QDawg* fixed_dawg = 0;
133static QDict<QDawg> *named_dawg = 0;
134
135static QString qpeDir()
136{
137 QString dir = getenv("QPEDIR");
138 if ( dir.isEmpty() ) dir = "..";
139 return dir;
140}
141
142static QString dictDir()
143{
144 return qpeDir() + "/etc/dict";
145}
146
147/*!
148 \class Global global.h
149 \brief The Global class collects application-wide global functions.
150*/
151
152/*!
153 \internal
154*/
155Global::Global()
156{
157}
158
159/*!
160 Returns the unchangeable QDawg that contains general
161 words for the current locale.
162
163 \sa addedDawg()
164*/
165const QDawg& Global::fixedDawg()
166{
167 if ( !fixed_dawg ) {
168 if ( !docDirCreated )
169 createDocDir();
170
171 fixed_dawg = new QDawg;
172 QString dawgfilename = dictDir() + "/dawg";
173 QString lang = getenv( "LANG" );
174 QString dawgfilename_lang = dawgfilename + "." + lang;
175 QString words_lang = dictDir() + "/words." + lang;
176 if ( QFile::exists(dawgfilename_lang) ||
177 QFile::exists(words_lang) )
178 dawgfilename = dawgfilename_lang;
179 QFile dawgfile(dawgfilename);
180
181 if ( !dawgfile.exists() ) {
182 QString fn = dictDir() + "/words";
183 if ( QFile::exists(words_lang) )
184 fn = words_lang;
185 QFile in(fn);
186 if ( in.open(IO_ReadOnly) ) {
187 fixed_dawg->createFromWords(&in);
188 dawgfile.open(IO_WriteOnly);
189 fixed_dawg->write(&dawgfile);
190 dawgfile.close();
191 }
192 } else {
193 fixed_dawg->readFile(dawgfilename);
194 }
195 }
196
197 return *fixed_dawg;
198}
199
200/*!
201 Returns the changeable QDawg that contains general
202 words for the current locale.
203
204 \sa fixedDawg()
205*/
206const QDawg& Global::addedDawg()
207{
208 return dawg("local");
209}
210
211/*!
212 Returns the QDawg with the given \a name.
213 This is an application-specific word list.
214
215 \a name should not contain "/".
216*/
217const QDawg& Global::dawg(const QString& name)
218{
219 createDocDir();
220 if ( !named_dawg )
221 named_dawg = new QDict<QDawg>;
222 QDawg* r = named_dawg->find(name);
223 if ( !r ) {
224 r = new QDawg;
225 named_dawg->insert(name,r);
226 QString dawgfilename = dictDir() + "/" + name + ".dawg";
227 QFile dawgfile(dawgfilename);
228 if ( dawgfile.open(IO_ReadOnly) )
229 r->readFile(dawgfilename);
230 }
231 return *r;
232}
233
234/*!
235 Adds \a wordlist to the addedDawg().
236*/
237void Global::addWords(const QStringList& wordlist)
238{
239 addWords("local",wordlist);
240}
241
242/*!
243 Adds \a wordlist to the dawg() named \a dictname.
244*/
245void Global::addWords(const QString& dictname, const QStringList& wordlist)
246{
247 QDawg& d = (QDawg&)dawg(dictname);
248 QStringList all = d.allWords() + wordlist;
249 d.createFromWords(all);
250
251 QString dawgfilename = dictDir() + "/" + dictname + ".dawg";
252 QFile dawgfile(dawgfilename);
253 if ( dawgfile.open(IO_WriteOnly) ) {
254 d.write(&dawgfile);
255 dawgfile.close();
256 }
257
258 // #### Re-read the dawg here if we use mmap().
259
260 // #### Signal other processes to re-read.
261}
262
263
264/*!
265 Returns a full path for the application named \a appname, with the
266 given \a filename or QString::null if there was a problem creating
267 the directory tree for \a appname.
268 If \a filename contains "/", it is the caller's responsibility to
269 ensure those directories exist.
270*/
271QString Global::applicationFileName(const QString& appname, const QString& filename)
272{
273 QDir d;
274 QString r = getenv("HOME");
275 r += "/Applications/";
276 if ( !QFile::exists( r ) )
277 if ( d.mkdir(r) == false )
278 return QString::null;
279 r += appname;
280 if ( !QFile::exists( r ) )
281 if ( d.mkdir(r) == false )
282 return QString::null;
283 r += "/"; r += filename;
284 return r;
285}
286
287/*!
288 \internal
289*/
290void Global::createDocDir()
291{
292 if ( !docDirCreated ) {
293 docDirCreated = TRUE;
294 mkdir( QPEApplication::documentDir().latin1(), 0755 );
295 }
296}
297
298
299/*!
300 Displays a status \a message to the user. This generally appears
301 in the taskbar for some amount of time, then disappears.
302*/
303void Global::statusMessage(const QString& message)
304{
305#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
306 QCopEnvelope e( "QPE/TaskBar", "message(QString)" );
307 e << message;
308#endif
309}
310
311/*!
312 \internal
313*/
314void Global::applyStyle()
315{
316#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
317 QCopChannel::send( "QPE/System", "applyStyle()" );
318#else
319 ((QPEApplication *)qApp)->applyStyle(); // apply without needing QCop for floppy version
320#endif
321}
322
323/*!
324 \internal
325*/
326QWidget *Global::shutdown( bool )
327{
328#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
329 QCopChannel::send( "QPE/System", "shutdown()" );
330#endif
331 return 0;
332}
333
334/*!
335 \internal
336*/
337QWidget *Global::restart( bool )
338{
339#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
340 QCopChannel::send( "QPE/System", "restart()" );
341#endif
342 return 0;
343}
344
345/*!
346 Explicitly show the current input method.
347*/
348void Global::showInputMethod()
349{
350#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
351 QCopChannel::send( "QPE/TaskBar", "showInputMethod()" );
352#endif
353}
354
355/*!
356 Explicitly hide the current input method.
357*/
358void Global::hideInputMethod()
359{
360#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
361 QCopChannel::send( "QPE/TaskBar", "hideInputMethod()" );
362#endif
363}
364
365
366/*!
367 \internal
368*/
369bool Global::isBuiltinCommand( const QString &name )
370{
371 if(!builtin)
372 return FALSE; // yes, it can happen
373 for (int i = 0; builtin[i].file; i++) {
374 if ( builtin[i].file == name ) {
375 return TRUE;
376 }
377 }
378 return FALSE;
379}
380
381Global::Command* Global::builtin=0;
382QGuardedPtr<QWidget> *Global::running=0;
383
384/*!
385 \class Global::Command
386 \brief The Global::Command class is internal.
387 \internal
388*/
389
390/*!
391 \internal
392*/
393void Global::setBuiltinCommands( Command* list )
394{
395 if ( running )
396 delete [] running;
397
398 builtin = list;
399 int count = 0;
400 if (!builtin)
401 return;
402 while ( builtin[count].file )
403 count++;
404
405 running = new QGuardedPtr<QWidget> [ count ];
406}
407
408/*!
409 \internal
410*/
411void Global::setDocument( QWidget* receiver, const QString& document )
412{
413 Emitter emitter(receiver,document);
414}
415
416/*!
417 \internal
418*/
419bool Global::terminateBuiltin( const QString& n )
420{
421 if (!builtin)
422 return FALSE;
423 for (int i = 0; builtin[i].file; i++) {
424 if ( builtin[i].file == n ) {
425 delete running[i];
426 return TRUE;
427 }
428 }
429 return FALSE;
430}
431
432/*!
433 \internal
434*/
435void Global::terminate( const AppLnk* app )
436{
437 //if ( terminateBuiltin(app->exec()) ) return; // maybe? haven't tried this
438
439 QCString channel = "QPE/Application/" + app->exec().utf8();
440 if ( QCopChannel::isRegistered(channel) ) {
441 QCopEnvelope e(channel, "quit()");
442 }
443}
444
445/*!
446 Low-level function to run command \a c. Not recommended.
447*/
448void Global::invoke(const QString &c)
449{
450 // Convert the command line in to a list of arguments
451 QStringList list = QStringList::split(QRegExp(" *"),c);
452
453#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
454 QString ap=list[0];
455 // see if the application is already running
456 // XXX should lock file /tmp/qcop-msg-ap
457 if ( QCopChannel::isRegistered( ("QPE/Application/" + ap).latin1() ) ) {
458 QCopEnvelope e("QPE/System", "notBusy(QString)" );
459 e << ap;
460 return;
461 }
462 // XXX should unlock file /tmp/qcop-msg-ap
463 //see if it is being started
464 if ( StartingAppList::isStarting( ap ) ) {
465 QCopEnvelope e("QPE/System", "notBusy(QString)" );
466 e << ap;
467 return;
468 }
469
470#endif
471
472#ifdef QT_NO_QWS_MULTIPROCESS
473 QMessageBox::warning( 0, "Error", "Could not find the application " + c, "Ok", 0, 0, 0, 1 );
474#else
475
476 QStrList slist;
477 unsigned int j;
478 for ( j = 0; j < list.count(); j++ )
479 slist.append( list[j].utf8() );
480
481 const char **args = new (const char *)[slist.count() + 1];
482 for ( j = 0; j < slist.count(); j++ )
483 args[j] = slist.at(j);
484 args[j] = NULL;
485
486#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
487 // an attempt to show a wait...
488 // more logic should be used, but this will be fine for the moment...
489 QCopEnvelope ( "QPE/System", "busy()" );
490#endif
491
492#ifdef HAVE_QUICKEXEC
493 QString libexe = qpeDir()+"/binlib/lib"+args[0] + ".so";
494 qDebug("libfile = %s", libexe.latin1() );
495 if ( QFile::exists( libexe ) ) {
496 qDebug("calling quickexec %s", libexe.latin1() );
497 quickexecv( libexe.utf8().data(), (const char **)args );
498 } else
499#endif
500 {
501 if ( !::vfork() ) {
502 for ( int fd = 3; fd < 100; fd++ )
503 ::close( fd );
504 ::setpgid( ::getpid(), ::getppid() );
505 // Try bindir first, so that foo/bar works too
506 ::execv( qpeDir()+"/bin/"+args[0], (char * const *)args );
507 ::execvp( args[0], (char * const *)args );
508 exit( -1 );
509 }
510 }
511 StartingAppList::add( list[0] );
512#endif //QT_NO_QWS_MULTIPROCESS
513}
514
515/*!
516 Executes application identfied by \a c, passing \a document.
517
518 Note that you might be better off sending a QCop message to
519 the application's QPE/Application/<i>appname</i> channel.
520*/
521void Global::execute( const QString &c, const QString& document )
522{
523 if ( qApp->type() != QApplication::GuiServer ) {
524 // ask the server to do the work
525#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
526 if ( document.isNull() ) {
527 QCopEnvelope e( "QPE/System", "execute(QString)" );
528 e << c;
529 } else {
530 QCopEnvelope e( "QPE/System", "execute(QString,QString)" );
531 e << c << document;
532 }
533#endif
534 return;
535 }
536
537 // Attempt to execute the app using a builtin class for the app first
538 // else try and find it in the bin directory
539 if (builtin) {
540 for (int i = 0; builtin[i].file; i++) {
541 if ( builtin[i].file == c ) {
542 if ( running[i] ) {
543 if ( !document.isNull() && builtin[i].documentary )
544 setDocument(running[i], document);
545 running[i]->raise();
546 running[i]->show();
547 running[i]->setActiveWindow();
548 } else {
549 running[i] = builtin[i].func( builtin[i].maximized );
550 }
551 QCopEnvelope e("QPE/System", "notBusy(QString)" );
552 e << c; // that was quick ;-)
553 return;
554 }
555 }
556 }
557
558 //Global::invoke(c, document);
559
560 // Convert the command line in to a list of arguments
561 QStringList list = QStringList::split(QRegExp(" *"),c);
562
563#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
564 QString ap=list[0];
565
566 qDebug("executing %s", ap.latin1() );
567 if ( ap == "suspend" ) {
568 QWSServer::sendKeyEvent( 0xffff, Qt::Key_F34, FALSE, TRUE, FALSE );
569 return;
570 }
571
572 /* if need be, sending a qcop message will result in an invoke, see
573 preceeding function */
574 { QCopEnvelope env( ("QPE/Application/" + ap).latin1(), "raise()" ); }
575 if ( !document.isEmpty() ) {
576 QCopEnvelope env( ("QPE/Application/" + ap).latin1(), "setDocument(QString)" );
577 env << document;
578 }
579#endif
580}
581
582/*!
583 Returns the string \a s with the characters backslash, ", and $
584 quoted by a preceeding backslash.
585*/
586QString Global::shellQuote(const QString& s)
587{
588 QString r="\"";
589 for (int i=0; i<(int)s.length(); i++) {
590 char c = s[i].latin1();
591 switch (c) {
592 case '\\': case '"': case '$':
593 r+="\\";
594 }
595 r += s[i];
596 }
597 r += "\"";
598 return r;
599}
600
601/*!
602 Returns the string \a s with the characters backslash and "
603 quoted by a preceeding backslash.
604*/
605QString Global::stringQuote(const QString& s)
606{
607 QString r="\"";
608 for (int i=0; i<(int)s.length(); i++) {
609 char c = s[i].latin1();
610 switch (c) {
611 case '\\': case '"':
612 r+="\\";
613 }
614 r += s[i];
615 }
616 r += "\"";
617 return r;
618}
619
620/*!
621 Finds all documents on the system's document directories which
622 match the filter \a mimefilter, and appends the resulting DocLnk
623 objects to \a folder.
624*/
625void Global::findDocuments(DocLnkSet* folder, const QString &mimefilter)
626{
627 QString homedocs = QString(getenv("HOME")) + "/Documents";
628 DocLnkSet d(homedocs,mimefilter);
629 folder->appendFrom(d);
630 StorageInfo storage;
631 const QList<FileSystem> &fs = storage.fileSystems();
632 QListIterator<FileSystem> it ( fs );
633 for ( ; it.current(); ++it ) {
634 if ( (*it)->isRemovable() ) {
635 QString path = (*it)->path();
636 DocLnkSet ide( path, mimefilter );
637 folder->appendFrom(ide);
638 }
639 }
640}
641
642
643
644#include "global.moc"
diff --git a/library/global.h b/library/global.h
new file mode 100644
index 0000000..d9ff8f8
--- a/dev/null
+++ b/library/global.h
@@ -0,0 +1,85 @@
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#ifndef GLOBAL_H
21#define GLOBAL_H
22
23#include <qstringlist.h>
24#include <qguardedptr.h>
25class QDawg;
26class QLabel;
27class QWidget;
28class AppLnk;
29class DocLnkSet;
30
31class Global
32{
33public:
34 Global();
35
36 // Dictionaries
37 static const QDawg& fixedDawg();
38 static const QDawg& addedDawg();
39 static const QDawg& dawg(const QString& name);
40
41 static void addWords(const QStringList& word);
42 static void addWords(const QString& dictname, const QStringList& word);
43 // static void removeWords(const QStringList& word); -- if someone wants it
44
45 static void createDocDir();
46
47 static void findDocuments(DocLnkSet* folder, const QString &mimefilter=QString::null);
48
49 static QString applicationFileName(const QString& appname, const QString& filename);
50
51 struct Command {
52 const char *file;
53 QWidget *(*func)( bool );
54 bool maximized;
55 bool documentary;
56 };
57 static void setBuiltinCommands( Command* );
58
59 static void invoke( const QString &exec);
60 static void execute( const QString &exec, const QString &document=QString::null );
61 static void setDocument( QWidget* receiver, const QString& document );
62 static bool terminateBuiltin( const QString& );
63 static void terminate( const AppLnk* );
64
65 static bool isBuiltinCommand( const QString &name );
66
67 // system messaging
68 static void applyStyle();
69 static void statusMessage(const QString&);
70 static QWidget *shutdown( bool = FALSE );
71 static QWidget *restart( bool = FALSE );
72 static void hideInputMethod();
73 static void showInputMethod();
74
75 static void writeHWClock();
76
77 static QString shellQuote(const QString& s);
78 static QString stringQuote(const QString& s);
79
80private:
81 static Command* builtin;
82 static QGuardedPtr<QWidget> *running;
83};
84
85#endif
diff --git a/library/imageedit.cpp b/library/imageedit.cpp
new file mode 100644
index 0000000..7f98ebb
--- a/dev/null
+++ b/library/imageedit.cpp
@@ -0,0 +1,97 @@
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#include "imageedit.h"
21#include <qpainter.h>
22
23ImageEdit::ImageEdit( QWidget *parent = 0, const char *name = 0 )
24 : QScrollView( parent, name, WNorthWestGravity | WResizeNoErase ), buffer()
25{
26 buffer.resize( size() );
27 buffer.fill( colorGroup().color( QColorGroup::Base ) );
28}
29
30ImageEdit::~ImageEdit()
31{
32
33}
34
35void ImageEdit::contentsMousePressEvent( QMouseEvent *e )
36{
37 lastPos = e->pos();
38}
39
40void ImageEdit::contentsMouseMoveEvent( QMouseEvent *e )
41{
42 QPainter pw( viewport() );
43 QPainter pb( &buffer );
44 pb.drawLine( lastPos, e->pos() );
45 pw.drawLine( contentsToViewport( lastPos ),
46 contentsToViewport( e->pos() ) );
47 lastPos = e->pos();
48}
49
50void ImageEdit::contentsMouseReleaseEvent( QMouseEvent * )
51{
52}
53
54void ImageEdit::viewportResizeEvent( QResizeEvent *e )
55{
56 enlargeBuffer(e->size());
57}
58
59void ImageEdit::enlargeBuffer( const QSize& sz )
60{
61 QSize osz = buffer.size();
62 QSize nsz( QMAX( osz.width(), sz.width() ), QMAX( osz.height(), sz.height() ) );
63 buffer.resize( nsz.width(), nsz.height() );
64 // clear new area
65 QPainter p( &buffer );
66 if ( sz.width() > osz.width() )
67 p.fillRect( osz.width(), 0, sz.width() - osz.width(), nsz.height(), colorGroup().color( QColorGroup::Base ) );
68 if ( sz.height() > osz.height() )
69 p.fillRect( 0, osz.height(), nsz.width(), sz.height() - osz.height(), colorGroup().color( QColorGroup::Base ) );
70 p.end();
71}
72
73void ImageEdit::drawContents( QPainter *p, int cx, int cy, int cw, int ch )
74{
75 p->drawPixmap( cx, cy, buffer, cx, cy, cw, ch );
76}
77
78void ImageEdit::setPixmap( const QPixmap &pm )
79{
80 QSize osz = buffer.size();
81 if ( pm.width() < osz.width() || pm.height() < osz.height() ) {
82 buffer.fill(white);
83 enlargeBuffer( pm.size() );
84 QPainter p(&buffer);
85 p.drawPixmap(0,0,pm);
86 } else {
87 buffer = pm;
88 }
89 resizeContents( buffer.width(), buffer.height() );
90 viewport()->repaint( FALSE );
91}
92
93QPixmap ImageEdit::pixmap() const
94{
95 return buffer;
96}
97
diff --git a/library/imageedit.h b/library/imageedit.h
new file mode 100644
index 0000000..ccedbcd
--- a/dev/null
+++ b/library/imageedit.h
@@ -0,0 +1,52 @@
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#ifndef IMAGEEDIT_H
21#define IMAGEEDIT_H
22
23#include <qscrollview.h>
24#include <qpixmap.h>
25
26class ImageEditPrivate;
27class ImageEdit : public QScrollView
28{
29 Q_OBJECT
30
31public:
32 ImageEdit( QWidget *parent = 0, const char *name = 0 );
33 ~ImageEdit();
34
35 void setPixmap( const QPixmap &pm );
36 QPixmap pixmap() const;
37
38protected:
39 void drawContents( QPainter *p, int cx, int cy, int cw, int ch );
40 void contentsMousePressEvent( QMouseEvent *e );
41 void contentsMouseMoveEvent( QMouseEvent *e );
42 void contentsMouseReleaseEvent( QMouseEvent *e );
43 void viewportResizeEvent( QResizeEvent *e );
44
45private:
46 QPoint lastPos;
47 QPixmap buffer;
48 ImageEditPrivate *d;
49 void enlargeBuffer( const QSize& sz );
50};
51
52#endif
diff --git a/library/inlinepics_p.h b/library/inlinepics_p.h
new file mode 100644
index 0000000..1e242d2
--- a/dev/null
+++ b/library/inlinepics_p.h
@@ -0,0 +1,5586 @@
1/* Generated by qembed */
2#ifndef _2110060599
3#define _2110060599
4#include <qimage.h>
5#include <stdlib.h>
6static const QRgb _to1_data[] = {
7 0x2000000,0x5000000,0x9000000,0xd000000,0x11000000,0x12000000,0xe000000,0xc000000,0xc000000,0xc000000,0xd000000,0x11000000,0x12000000,0xe000000,
8 0x6000000,0xf000000,0x1d000000,0x3a000000,0x4c000000,0x39000000,0x21000000,0x1c000000,0x1c000000,0x22000000,0x3a000000,0x4c000000,0x39000000,0x1f000000,
9 0x10000000,0x25000000,0x51000000,0xb46b6b6b,0xffffffff,0x76000000,0x42000000,0x3b000000,0x3e000000,0x5b000000,0xb46b6b6b,0xffffffff,0x72000000,0x38000000,
10 0x1e000000,0x54000000,0xbc676767,0xffffffff,0xffffffff,0xa6000000,0x6d000000,0x65000000,0x7a000000,0xc4646464,0xffffffff,0xffffffff,0x9d000000,0x57000000,
11 0x45000000,0xb56b6b6b,0xffffffff,0xffffffff,0xffffffff,0xcf000000,0xaa000000,0xa3000000,0xce606060,0xffffffff,0xffffffff,0xffffffff,0xb8000000,0x74000000,
12 0x88878787,0xffffffff,0xf4a7a7a7,0xffffffff,0xffffffff,0xf2535353,0xffffffff,0xdc5b5b5b,0xffffffff,0xf7a5a5a5,0xffffffff,0xffffffff,0xcd000000,0x8a000000,
13 0x48000000,0x84000000,0xc6000000,0xffffffff,0xffffffff,0xfa515151,0xf9cfcfcf,0xd5000000,0xcd000000,0xdd000000,0xffffffff,0xffffffff,0xd9000000,0x97000000,
14 0x2c000000,0x5e000000,0xb1000000,0xffffffff,0xffffffff,0xf8000000,0xdc000000,0xcc000000,0xc3000000,0xd3000000,0xffffffff,0xffffffff,0xdb000000,0x9a000000,
15 0x25000000,0x53000000,0xa7000000,0xffffffff,0xffffffff,0xf0000000,0xd2000000,0xc2000000,0xb6000000,0xc8000000,0xffffffff,0xffffffff,0xd3000000,0x92000000,
16 0x1d000000,0x44000000,0x99000000,0xffffffff,0xffffffff,0xf1545454,0xf5d1d1d1,0xbc000000,0xa3000000,0xba000000,0xffffffff,0xffffffff,0xc4000000,0x83000000,
17 0x14000000,0x34000000,0x7d000000,0xffffffff,0xffffffff,0xe5585858,0xffffffff,0xab000000,0x8c000000,0x9e000000,0xffffffff,0xffffffff,0xa8000000,0x6e000000,
18 0xc000000,0x25000000,0x4d000000,0x84000000,0xa0000000,0xa2000000,0x92000000,0x7f000000,0x6c000000,0x6f000000,0x88000000,0x94000000,0x79000000,0x56000000,
19 0x8000000,0x18000000,0x2a000000,0x41000000,0x58000000,0x5e000000,0x55000000,0x50000000,0x4a000000,0x43000000,0x45000000,0x4e000000,0x49000000,0x39000000,
20 0x5000000,0xf000000,0x19000000,0x28000000,0x36000000,0x3b000000,0x36000000,0x34000000,0x2f000000,0x2a000000,0x2b000000,0x30000000,0x2c000000,0x22000000
21};
22
23static const QRgb AddressBook_data[] = {
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,
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,
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,
30 0xff0a068a,0xff080567,0xff03032c,0xff01030b,0xff010309,0xff010307,0xff010303,0xff010300,0xff010300,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
31 0xff040437,0xff70b365,0xff67a75d,0xff58904e,0xff678f61,0xffc8d4c6,0xffffffff,0xffffffff,0xffa3b8a0,0xff5b8854,0xff4a8342,0xff4c8a42,0xff4a8b3f,0xff46893b,
32 0xff408434,0xff387c2d,0xff2c6e22,0xff789b72,0xffeff3ef,0xffffffff,0xffffffff,0xff7fa07a,0xff166c09,0xff157e04,0xff148400,0xff138100,0xff010300,0x5c000000,
33 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff040436,0xff65a45b,0xff518849,0xff94ad91,0xffffffff,0xffffffff,0xffc8d3c6,0xff5b8754,0xff548d4b,0xff5d9d53,
34 0xff60a454,0xff5da551,0xff57a24a,0xff509f43,0xff4b9d3d,0xff429735,0xff378c29,0xff2a781d,0xff2a6720,0xffd1dad0,0xffffffff,0xffffffff,0xff6c9466,0xff0f6a00,
35 0xff127a00,0xff127c00,0xff010300,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff040431,0xff4f8547,0xffaebfac,0xffffffff,0xffffffff,0xffaebfab,
36 0xff4c8244,0xff5e9b54,0xff67a95c,0xff68ae5d,0xff63a957,0xff59a24d,0xff529c45,0xff4a963d,0xff469738,0xff3e942f,0xff368f27,0xff2a841c,0xff1f7111,0xff3f7337,
37 0xffffffff,0xffffffff,0xffeef2ee,0xff2a6a20,0xff0f6d00,0xff117600,0xff010300,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff030326,0xffadbfab,
38 0xffffffff,0xffffffff,0xff92aa8e,0xff4f8647,0xff62a158,0xff6bae60,0xff69ae5e,0xff61a556,0xff539548,0xff47873d,0xff548b4c,0xff6b9964,0xff327627,0xff2d7722,
39 0xff26731a,0xff206f13,0xff1a6b0d,0xff125d06,0xff9cb199,0xffffffff,0xffffffff,0xff8da889,0xff0e6100,0xff106f00,0xff010300,0x93000000,0x62000000,0x3b000000,
40 0x1f000000,0x3d000000,0xff07045d,0xffffffff,0xffffffff,0xffacbdaa,0xff4e8546,0xff63a359,0xff6db061,0xff69ad5e,0xff5e9f54,0xff4b8542,0xff88a883,0xffe4ebe3,
41 0xffffffff,0xffffffff,0xffd3dcd2,0xff819b7e,0xffffffff,0xffffffff,0xffbed1bb,0xff0f5e02,0xff5b8455,0xffffffff,0xffffffff,0xffdfe5de,0xff0c5700,0xff0f6900,
42 0xff010200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a068a,0xffffffff,0xffe3e8e3,0xff53834b,0xff609f56,0xff6cb061,0xff6aae5f,0xff5b9b52,
43 0xff52854a,0xffc8d4c6,0xffffffff,0xff8da98a,0xff396d32,0xff86a082,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff6c9566,0xff0e6200,0xff1a5b10,0xffffffff,
44 0xffffffff,0xffffffff,0xff0a4e00,0xff0e6200,0xff010200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a068a,0xffffffff,0xff6f926a,0xff599550,
45 0xff69ac5e,0xff69ad5d,0xff5b9c52,0xff4f8248,0xffd6dfd5,0xffffffff,0xff9eb49a,0xff3a7831,0xff397d2e,0xff255e1c,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
46 0xff1b6210,0xff0f6a00,0xff0c5600,0xffffffff,0xffffffff,0xffffffff,0xff4b7744,0xff0d5b00,0xff010200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
47 0xff0a068a,0xffc5d0c4,0xff4d8344,0xff64a55a,0xff69ad5d,0xff5d9e53,0xff518449,0xffd6ded5,0xffffffff,0xffe3e8e2,0xff457d3d,0xff448d38,0xff3c8730,0xff407538,
48 0xffffffff,0xffffffff,0xffffffff,0xff9cb399,0xff0d6300,0xff106d00,0xff0c5700,0xffffffff,0xffffffff,0xffffffff,0xff4a7444,0xff0d5700,0xff010200,0x99000000,
49 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a068a,0xff7a9a76,0xff58964e,0xff66ab5b,0xff5fa355,0xff48823f,0xffb8c7b6,0xffffffff,0xffffffff,0xff819f7d,
50 0xff438738,0xff449437,0xff368029,0xff769871,0xffffffff,0xffffffff,0xffffffff,0xff5c8855,0xff0f6800,0xff0f6a00,0xff0b5200,0xffffffff,0xffffffff,0xffffffff,
51 0xff376530,0xff0c5400,0xff010200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff090682,0xff447b3c,0xff5da051,0xff60a655,0xff4f8f44,0xff90aa8c,
52 0xffffffff,0xffffffff,0xfff0f3f0,0xff38752f,0xff459238,0xff3c8d2f,0xff286d1d,0xffbfccbd,0xffffffff,0xffffffff,0xffeef2ee,0xff0c5600,0xff0f6900,0xff0e6300,
53 0xff376930,0xffffffff,0xffffffff,0xffffffff,0xff094400,0xff0c5300,0xff010200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff070562,0xff49853f,
54 0xff5aa24f,0xff539948,0xff487f41,0xfff0f3f0,0xffffffff,0xffffffff,0xff9ab096,0xff3a802f,0xff3d8f2f,0xff2f7d23,0xff668e60,0xffffffff,0xffffffff,0xffffffff,
55 0xff9cb199,0xff0d5c00,0xff0f6700,0xff0c5800,0xff698865,0xffffffff,0xffffffff,0xffacbaaa,0xff0a4600,0xff0c5200,0xff000200,0x99000000,0x66000000,0x3d000000,
56 0x1f000000,0x3d000000,0xff05044a,0xff498a3f,0xff549c47,0xff478a3c,0xff8ca788,0xffffffff,0xffffffff,0xffffffff,0xff51804b,0xff38852b,0xff318324,0xff2e7025,
57 0xffe0e6df,0xffffffff,0xffffffff,0xffffffff,0xff5b8455,0xff0d5f00,0xff0e6100,0xff0a4c00,0xffacb9aa,0xffffffff,0xffffffff,0xff496c44,0xff0b4900,0xff0c4f00,
58 0xff000200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff040334,0xff478b3c,0xff4a943e,0xff38772e,0xfff0f3ef,0xffffffff,0xffffffff,0xffffffff,
59 0xff296a1f,0xff2f7f23,0xff236e17,0xffb0c3ad,0xffeef1ee,0xffffffff,0xffffffff,0xffffffff,0xff0a4e00,0xff0d5d00,0xff0c5500,0xff275620,0xffffffff,0xffffffff,
60 0xffbbc6ba,0xff083e00,0xff0b4b00,0xff0c4d00,0xff000200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff040333,0xff428836,0xff418a34,0xff648e5d,
61 0xffffffff,0xffffffff,0xffffffff,0xffbfcabe,0xff216217,0xff216a15,0xff729a6c,0xffd0dacf,0xff9aa899,0xffffffff,0xffffffff,0xffbcc8ba,0xff0a4d00,0xff0c5400,
62 0xff094600,0xff9bac99,0xffffffff,0xffeef1ee,0xff265120,0xff0a4600,0xff0b4b00,0xff0b4b00,0xff000200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
63 0xff040332,0xff3b8330,0xff37812b,0xff87a583,0xffffffff,0xffffffff,0xffffffff,0xffd0d8cf,0xff144d0c,0xff70976a,0xffeff3ee,0xff265420,0xffeef1ee,0xffffffff,
64 0xffffffff,0xff8b9f89,0xff094300,0xff094300,0xff698465,0xffffffff,0xffeef1ee,0xff365a30,0xff0a4200,0xff0a4800,0xff0b4900,0xff0b4800,0xff000200,0x99000000,
65 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff040338,0xff347e28,0xff317f25,0xff86a681,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffd0dacf,0xffeff3ee,
66 0xff397130,0xff285b20,0xffffffff,0xffffffff,0xffffffff,0xff8b9c89,0xff073600,0xff789175,0xffffffff,0xffbcc6ba,0xff265020,0xff094000,0xff0a4700,0xff0b4900,
67 0xff0a4700,0xff0a4500,0xff000200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff050445,0xff2b7620,0xff2d801f,0xff3c7b32,0xffeff3ef,0xffffffff,
68 0xffffffff,0xffffffff,0xffbdceba,0xff1b6410,0xff0d5f00,0xff397130,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffacbbaa,0xff5a7855,0xff083b00,
69 0xff094200,0xff0a4600,0xff0b4800,0xff0a4600,0xff0a4500,0xff0a4200,0xff000200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff080571,0xff226717,
70 0xff287f19,0xff217913,0xff35772a,0xff7da278,0xff7ba076,0xff2a6e20,0xff0e6500,0xff106e00,0xff106c00,0xff0d5f00,0xff4b7a44,0xff799475,0xff799375,0xff496e44,
71 0xff184910,0xff093f00,0xff094100,0xff0a4400,0xff0b4700,0xff0b4700,0xff0a4600,0xff0a4400,0xff0a4300,0xff0a4200,0xff000200,0x99000000,0x66000000,0x3d000000,
72 0x1f000000,0x3d000000,0xff0a068a,0xff73966d,0xff1f7312,0xff208010,0xff197c09,0xff137403,0xff107000,0xff107300,0xff117600,0xff117600,0xff107200,0xff0f6800,
73 0xff0d5c00,0xff0c5200,0xff0b4e00,0xff0b4b00,0xff0b4b00,0xff0b4a00,0xff0b4800,0xff0b4900,0xff0b4700,0xff0a4600,0xff0a4500,0xff0a4400,0xff0a4200,0xff0a4200,
74 0xff000200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a068a,0xffe0e6df,0xff246519,0xff177408,0xff157e03,0xff137f00,0xff127d00,0xff127b00,
75 0xff127b00,0xff117600,0xff107000,0xff106900,0xff0e6200,0xff0d5b00,0xff0c5600,0xff0c5100,0xff0c4f00,0xff0b4c00,0xff0b4a00,0xff0b4800,0xff0a4600,0xff0a4500,
76 0xff0a4400,0xff0a4300,0xff0a4200,0xff0a4200,0xff000200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a068a,0xffffffff,0xffd0dacf,0xff1c6212,
77 0xff0f6900,0xff117300,0xff127700,0xff117400,0xff107300,0xff106e00,0xff0f6900,0xff0e6300,0xff0d5d00,0xff0d5600,0xff0c5000,0xff0b4a00,0xff0a4800,0xff0b4800,
78 0xff0b4800,0xff0a4600,0xff0a4500,0xff0a4400,0xff0a4300,0xff0a4200,0xff0a4200,0xff0a4200,0xff000200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
79 0xff0a068a,0xffffffff,0xffffffff,0xffeef2ee,0xff6a9065,0xff0b5500,0xff0d5d00,0xff0d6000,0xff0e5f00,0xff0d5c00,0xff0c5700,0xff0c5100,0xff0b4c00,0xff094500,
80 0xff083e00,0xff6a8965,0xff184c10,0xff0a4400,0xff0a4500,0xff0a4500,0xff0a4400,0xff0a4300,0xff0a4300,0xff0a4200,0xff0a4200,0xff0a4200,0xff000200,0x99000000,
81 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff030328,0xffdfe6de,0xffffffff,0xffffffff,0xffffffff,0xffdfe5de,0xff8ca589,0xff5a8055,0xff4a7444,0xff4a7344,
82 0xff4a7144,0xff496e44,0xff799175,0xffacb9aa,0xffeef1ee,0xffeef1ee,0xff4a6f44,0xff094000,0xff0a4300,0xff0a4400,0xff0a4300,0xff0a4200,0xff0a4200,0xff0a4200,
83 0xff0a4200,0xff0a4200,0xff000200,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff010303,0xff0d5f00,0xff6b9265,0xffacbeaa,0xffffffff,0xffffffff,
84 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffcfd7ce,0xff788f75,0xff174410,0xff083d00,0xff094200,0xff0a4200,0xff0a4200,
85 0xff0a4200,0xff0a4200,0xff0a4200,0xff0a4200,0xff0a4200,0xff0a4300,0xff000200,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff010300,0xff117500,
86 0xff0e6700,0xff0d5c00,0xff0b5200,0xff376b30,0xff4b7444,0xff799475,0xff799375,0xff799275,0xff5a7955,0xff4a6e44,0xff083b00,0xff093d00,0xff093e00,0xff0a4000,
87 0xff094200,0xff0a4100,0xff0a4200,0xff0a4200,0xff0a4200,0xff0a4200,0xff0a4200,0xff0a4200,0xff0a4300,0xff0a4400,0xff000200,0x87000000,0x5a000000,0x36000000,
88 0x17000000,0x2e000000,0xff010300,0xff010300,0xff010300,0xff010300,0xff010200,0xff010200,0xff000200,0xff000200,0xff000200,0xff000200,0xff000200,0xff000200,
89 0xff000200,0xff000200,0xff000200,0xff000200,0xff000200,0xff000200,0xff000200,0xff000200,0xff000200,0xff000200,0xff000200,0xff000200,0xff000200,0xff000200,
90 0xff000200,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
91 0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,
92 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
93 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,
94 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
95 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
96 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
97 0x18000000,0xf000000
98};
99
100static const QRgb Appearance_data[] = {
101 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3000000,0x6000000,0xb000000,0x12000000,0x19000000,0x21000000,0x29000000,0x2f000000,
102 0x34000000,0x37000000,0x38000000,0x37000000,0x34000000,0x2f000000,0x29000000,0x21000000,0x19000000,0x12000000,0xb000000,0x6000000,0x3000000,0x1000000,
103 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,
104 0x5d494b73,0x93666a9d,0xbe777cb4,0xde8186c0,0xf3878dc9,0xfe888ecc,0xf37c82c4,0xe06d73b8,0xc4595ea4,0x9f404686,0x70222756,0x3f000000,0x33000000,0x26000000,
105 0x1b000000,0x11000000,0xa000000,0x5000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,
106 0x16000000,0x23000000,0x6f5c608b,0xba7f84b6,0xf5989dcf,0xff9b9fd3,0xff979cd2,0xff9297d0,0xff8e93cf,0xff888ecc,0xff8287ca,0xff7b82c8,0xff737ac5,0xff6b72c3,
107 0xf76067bb,0xc6404797,0x881f2562,0x45000000,0x33000000,0x23000000,0x16000000,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,
108 0x2000000,0x7000000,0xe000000,0x1a000000,0x47414464,0xa77b7fb1,0xf59da1d2,0xff9fa4d5,0xff9ea3d5,0xff9b9fd3,0xff979cd2,0xff9297d0,0xff8e93cf,0xff868dcc,
109 0xff8186ca,0xff787fc7,0xff7077c4,0xff666fc1,0xff5e67be,0xff5660bc,0xf84953b3,0xbc273185,0x6c090b35,0x3e000000,0x2a000000,0x1a000000,0xe000000,0x7000000,
110 0x2000000,0x1000000,0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x5f575a83,0xc68a8fc0,0xffa3a7d7,0xffa1a5d6,0xffa0a4d5,0xff9ea3d5,0xff9b9fd3,
111 0xff979cd2,0xff9297d0,0xff8c91ce,0xff868ccc,0xff7e85c9,0xff757cc6,0xff6d74c3,0xff646cc0,0xff5a63bd,0xff505aba,0xff4551b8,0xff3a47b5,0xd71e2d91,0x850a1048,
112 0x46000000,0x2e000000,0x1b000000,0xe000000,0x6000000,0x2000000,0x1000000,0x5000000,0xd000000,0x1a000000,0x5f575a83,0xd09094c5,0xffa4a8d7,0xffa3a7d7,
113 0xffa1a5d6,0xffa0a4d5,0xff9ea3d5,0xff9b9fd3,0xff969bd1,0xff9096cf,0xff8b90cd,0xff8389ca,0xff7b82c8,0xff737ac5,0xff6770c1,0xff5d66be,0xff525dbb,0xff4753b8,
114 0xff3c49b5,0xff2d40b2,0xff2b3eaf,0xe0202d92,0x8a0a0f43,0x48000000,0x2e000000,0x1a000000,0xd000000,0x5000000,0x3000000,0xa000000,0x16000000,0x47414464,
115 0xc68a8fc0,0xffa4a8d7,0xffa4a8d7,0xffa3a7d7,0xffa1a5d6,0xffa0a4d5,0xff9da1d4,0xff9a9ed3,0xff959ad1,0xff9095cf,0xff888ecc,0xff8186ca,0xff787fc7,0xff6e75c3,
116 0xff646cc0,0xff5761bd,0xff4c56b9,0xff3e4cb6,0xff2f41b3,0xff2d3eb0,0xff2b3ead,0xff2b3caa,0xdb1a2886,0x7b050829,0x46000000,0x2a000000,0x16000000,0xa000000,
117 0x6000000,0x11000000,0x23000000,0xa77b7fb1,0xffa3a7d7,0xffa3a7d7,0xffa3a7d7,0xffa3a7d7,0xffa0a4d5,0xff9fa4d4,0xff9ca0d3,0xff979bd1,0xff9297cf,0xff8d91cc,
118 0xff848aca,0xff7c83c6,0xff7279c3,0xff6970bf,0xff5c65bc,0xff505ab9,0xff4350b5,0xff3445b3,0xff2d3eaf,0xff2b3ead,0xff2b3caa,0xff283aa8,0xff283aa4,0xc8131e6d,
119 0x60000000,0x3e000000,0x23000000,0x11000000,0xb000000,0x1b000000,0x6f5c608b,0xf59da1d2,0xffa1a5d6,0xffa1a5d6,0xffa1a5d6,0xffa0a4d5,0xff9ea3d3,0xff9ba0d1,
120 0xff989bcf,0xff9398cc,0xff868ac1,0xff666b98,0xff575a86,0xff505583,0xff494d7f,0xff41467d,0xff41478d,0xff4650b1,0xff3845af,0xff2b3ead,0xff2b3cab,0xff2b3ca8,
121 0xff283aa5,0xff2838a4,0xff2638a0,0xf9253298,0xa20a0e42,0x55000000,0x33000000,0x1b000000,0x12000000,0x26000000,0xba7f84b6,0xff9fa4d5,0xffa0a4d5,0xffa0a4d5,
122 0xffa0a4d4,0xff9ca1d1,0xff999dcf,0xff7d80ab,0xff4a4c65,0xff1e3446,0xff2f6079,0xff5584a2,0xff5383a3,0xff286a8e,0xff034d6e,0xff004969,0xff002b41,0xff000000,
123 0xff06092b,0xff121e63,0xff202f8e,0xff2636a0,0xff26369f,0xff26369d,0xff26369b,0xff233499,0xd7141e6d,0x6c000000,0x45000000,0x26000000,0x19000000,0x5d494b73,
124 0xf5989dcf,0xff9ea3d4,0xff9da2d4,0xff9ba0d2,0xff999dcf,0xff8a8ebb,0xff404157,0xff000000,0xff414c51,0xff4989b2,0xff80abc9,0xffacbdca,0xffacb4b9,0xff818d96,
125 0xff345569,0xff00638c,0xff006f9e,0xff006794,0xff004967,0xff000000,0xff000000,0xff090934,0xff15206f,0xff233294,0xff203295,0xff233294,0xfa222d8c,0x9c040a2b,
126 0x57000000,0x33000000,0x21000000,0x93666a9d,0xff9b9fd3,0xff9a9ed2,0xff989bcf,0xff9699cc,0xff74769f,0xff12121e,0xff8d8d8d,0xffe5e5e5,0xff8aaec8,0xff5091b9,
127 0xff99abb9,0xffc9c9c9,0xffcacaca,0xff989898,0xff525252,0xff060606,0xff00618a,0xff006c99,0xff00648f,0xff8093a2,0xff848584,0xff000000,0xff000000,0xff060620,
128 0xff121e67,0xff1e2d8a,0xff1e2d8b,0xc40d134c,0x69000000,0x41000000,0x29000000,0xbe757bb3,0xff969bd0,0xff9499ce,0xff9196c9,0xff5c5e80,0xff5e5e5e,0xffe0e0e0,
129 0xfff3f3f3,0xfff8f8f8,0xff3282af,0xff418dba,0xff818486,0xffacacac,0xffacacac,0xff7f7f7f,0xff414141,0xff090909,0xff003a55,0xff006e9c,0xff006691,0xff3e7496,
130 0xff909191,0xff8a8a89,0xff797878,0xff232323,0xff000000,0xff03061e,0xff152069,0xe010175e,0x7a000000,0x4d000000,0x30000000,0xdf7f85be,0xff8f94cb,0xff8b8fc6,
131 0xff4c4d6a,0xff969696,0xffe4e4e4,0xffedeeed,0xfff4f5f5,0xfffafafa,0xff0677a9,0xff1e85b6,0xff494949,0xff636363,0xff626262,0xff474747,0xff1b1b1b,0xff030303,
132 0xff001b2d,0xff006f9d,0xff006692,0xff2f7093,0xff8c8c8b,0xff7c7a7a,0xff6e6667,0xff644e50,0xff635051,0xff000000,0xff000000,0xfa080d39,0x89000000,0x58000000,
133 0x36000000,0xf38388c5,0xff878cc6,0xff494c6a,0xffb3a7a8,0xffdbd1d1,0xffe4e3e3,0xffececec,0xfff3f3f3,0xfff8f8f8,0xff0076a8,0xff007cb1,0xff121212,0xff1e1e1e,
134 0xff1e1e1e,0xff121212,0xff060606,0xff000000,0xff00324a,0xff006e9c,0xff006691,0xff2d6e91,0xff848484,0xff737272,0xff645657,0xff552f2f,0xff4a1212,0xff562628,
135 0xff1b1b1b,0xff03030e,0x95000000,0x60000000,0x3a000000,0xfe8489c6,0xff474a6b,0xffb88081,0xffce8687,0xffd8b7b8,0xffe1dada,0xffe9e8e8,0xffefefef,0xfff3f3f3,
136 0xff0073a4,0xff0079ad,0xff034966,0xff030303,0xff000000,0xff000000,0xff000000,0xff000000,0xff005c83,0xff006c99,0xff00648f,0xff286c8f,0xff797879,0xff6a6666,
137 0xff5a4c4a,0xff4c2023,0xff400c0f,0xff400909,0xff383232,0xff000003,0x9c000000,0x67000000,0x3d000000,0xf4767cbb,0xffb87278,0xffc1494c,0xffca6061,0xffd39c9c,
138 0xffdccfcf,0xffe3e1e1,0xffe8e8e8,0xffebecec,0xff729dbb,0xff0075a6,0xff0074a6,0xff004c6d,0xff000000,0xff000000,0xff000f18,0xff004d6e,0xff006f9d,0xff006794,
139 0xff00628b,0xff53758c,0xff6e6e6e,0xff5d5b5b,0xff504646,0xff3e2020,0xff381212,0xff413240,0xff0c1250,0xfc0e1754,0x9e000000,0x68000000,0x3c000000,0xe2676dae,
140 0xff9b85a2,0xffaa7a8b,0xffc76365,0xffce9999,0xffd6c8c8,0xffdcdbdb,0xffe1e1e1,0xffe4e4e4,0xffccd3d9,0xff1b76a2,0xff0073a4,0xff0076a8,0xff0076a8,0xff0076a8,
141 0xff0073a4,0xff006f9d,0xff006a96,0xff00648e,0xff1b678d,0xff717171,0xff636363,0xff535353,0xff464343,0xff3e3234,0xff282846,0xff0c1553,0xff0f1b60,0xf5101558,
142 0x9b000000,0x66000000,0x39000000,0xc854589b,0xff6a70b5,0xff6166a8,0xff696b9c,0xffaea3b0,0xffcfc8c8,0xffd2d1d1,0xffd4d4d4,0xffd4d5d4,0xffd3d3d3,0xff8da7ba,
143 0xff15719d,0xff006e9c,0xff006f9d,0xff006e9c,0xff006c99,0xff006794,0xff00648e,0xff12658c,0xff657581,0xff6b6b6b,0xff5d5d5d,0xff515151,0xff3c3e49,0xff090f46,
144 0xff0c1250,0xff0f185a,0xff121e63,0xe9091048,0x94000000,0x60000000,0x33000000,0xa43c437f,0xff646cb8,0xff5c63ad,0xff535aa0,0xff474e92,0xff555a8d,0xffa8a8b3,
145 0xffc3c3c4,0xffc4c4c4,0xffc3c3c3,0xffbebebe,0xffa4aeb5,0xff5282a1,0xff006692,0xff006691,0xff00648f,0xff266586,0xff5e7585,0xff7a7b7d,0xff727272,0xff636364,
146 0xff464651,0xff181e46,0xff0c1249,0xff0c1252,0xff0f185a,0xff121b61,0xff151e69,0xd6080b34,0x88000000,0x57000000,0x2c000000,0x741d224e,0xf85b62b3,0xff5861b2,
147 0xff5058a8,0xff46509f,0xff3a4593,0xff2d3886,0xff202d7b,0xff777992,0xff95969e,0xffa0a0a3,0xffaaaaa9,0xffa3a3a3,0xff9e9d9e,0xff989899,0xff919191,0xff888989,
148 0xff787979,0xff636369,0xff404355,0xff0c0f47,0xff0c124c,0xff0c1552,0xff0f1557,0xff12185c,0xff121b62,0xff151e66,0xfc141d66,0xb9010419,0x79000000,0x4c000000,
149 0x23000000,0x42000000,0xc83d4593,0xff535cb5,0xff4c55af,0xff414da9,0xff3443a0,0xff283897,0xff202f8e,0xff1b2b83,0xff182679,0xff152070,0xff151e67,0xff121b61,
150 0xff0f185b,0xff0c1556,0xff0c1553,0xff0c1551,0xff0c1551,0xff0c1552,0xff0f1553,0xff0f1556,0xff0f185a,0xff12185d,0xff121b61,0xff121e65,0xff121e69,0xff121e6c,
151 0xe70e1047,0x96000000,0x69000000,0x40000000,0x19000000,0x34000000,0x891e2562,0xf84852b1,0xff4350b3,0xff3a46af,0xff2b3ea9,0xff2838a1,0xff23369b,0xff233292,
152 0xff1e2d8a,0xff1e2883,0xff1b267b,0xff182375,0xff15206f,0xff151e6b,0xff121e66,0xff121b64,0xff121b62,0xff121b61,0xff121b61,0xff121b62,0xff121b64,0xff151e66,
153 0xff121e69,0xff121e6a,0xff151e6c,0xfc141d69,0xc4050824,0x82000000,0x56000000,0x33000000,0x12000000,0x26000000,0x45000000,0xbc273184,0xff3a47b5,0xff2d40b0,
154 0xff2b3cac,0xff283ca7,0xff2838a1,0xff23349b,0xff233295,0xff202d8f,0xff1e2d88,0xff1b2b82,0xff18287c,0xff182377,0xff182373,0xff152370,0xff15206d,0xff121e6b,
155 0xff15206b,0xff151e6a,0xff15206a,0xff121e6c,0xff151e6c,0xff15206d,0xff15206e,0xdf060f3f,0x94000000,0x6c000000,0x45000000,0x26000000,0xb000000,0x1b000000,
156 0x33000000,0x6c090b35,0xd71e2d91,0xff2b3eaf,0xff2b3eac,0xff2b3ca8,0xff2838a4,0xff2636a0,0xff23369a,0xff233294,0xff202f8f,0xff1e2d89,0xff1e2b84,0xff1b287f,
157 0xff1b267b,0xff182377,0xff182374,0xff152370,0xff152070,0xff18206e,0xff15206e,0xff15206e,0xff15206e,0xff15206f,0xed0c1350,0xae010310,0x7b000000,0x55000000,
158 0x33000000,0x1b000000,0x6000000,0x11000000,0x23000000,0x3e000000,0x850a1048,0xe0202d92,0xff2b3caa,0xff283aa8,0xff2838a4,0xff2638a0,0xff26369b,0xff233496,
159 0xff233291,0xff202d8d,0xff1e2b87,0xff1e2883,0xff1b287f,0xff1b287b,0xff182678,0xff182374,0xff182372,0xff152371,0xff15206f,0xff15206f,0xff15206f,0xf00f1655,
160 0xbc03041c,0x85000000,0x60000000,0x3e000000,0x23000000,0x11000000,0x3000000,0xa000000,0x16000000,0x2a000000,0x46000000,0x8a0a0f43,0xdb1a2886,0xff2838a4,
161 0xff2638a0,0xff26369d,0xff23349a,0xff233296,0xff203291,0xff202f8d,0xff1e2d88,0xff1e2b84,0xff1b2880,0xff1b267c,0xff182678,0xff182375,0xff182372,0xff152071,
162 0xff152070,0xff15206f,0xed0c1350,0xbc03041c,0x88000000,0x66000000,0x46000000,0x2a000000,0x16000000,0xa000000,0x1000000,0x5000000,0xd000000,0x1a000000,
163 0x2e000000,0x48000000,0x7b050829,0xc8131e6d,0xf9253298,0xff23349a,0xff233497,0xff203293,0xff202f8f,0xff1e2d8a,0xff1e2b86,0xff1b2b82,0xff1b287e,0xff18267b,
164 0xff182677,0xff182374,0xff182372,0xff152071,0xfc141d6b,0xdf080f41,0xae010310,0x85000000,0x66000000,0x48000000,0x2e000000,0x1a000000,0xd000000,0x5000000,
165 0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x2e000000,0x46000000,0x60000000,0xa20a0e42,0xd7141e6e,0xfa222d8e,0xff202f90,0xff202f8d,0xff1e2d88,
166 0xff1e2b85,0xff1b2881,0xff1b287d,0xff18267a,0xff182677,0xff182375,0xfc171f6d,0xe60e124b,0xc3050824,0x94000000,0x7b000000,0x60000000,0x46000000,0x2e000000,
167 0x1b000000,0xe000000,0x6000000,0x2000000,0xffffff,0x1000000,0x2000000,0x7000000,0xe000000,0x1a000000,0x2a000000,0x3e000000,0x55000000,0x6c000000,
168 0x9b06082c,0xc20b134d,0xde121b64,0xef182374,0xf91a267d,0xfe1b2881,0xfa1a2475,0xf2121c67,0xe50e1552,0xd1080d39,0xb503061b,0x93000000,0x81000000,0x6c000000,
169 0x55000000,0x3e000000,0x2a000000,0x1a000000,0xe000000,0x7000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,
170 0x16000000,0x23000000,0x33000000,0x45000000,0x56000000,0x67000000,0x75000000,0x81000000,0x89000000,0x8e000000,0x90000000,0x8e000000,0x89000000,0x81000000,
171 0x75000000,0x67000000,0x56000000,0x45000000,0x33000000,0x23000000,0x16000000,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,
172 0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,0x33000000,0x3f000000,0x4a000000,0x53000000,0x59000000,0x5e000000,
173 0x5f000000,0x5e000000,0x59000000,0x53000000,0x4a000000,0x3f000000,0x33000000,0x26000000,0x1b000000,0x11000000,0xa000000,0x5000000,0x2000000,0x1000000,
174 0xffffff,0xffffff
175};
176
177static const QRgb AppsIcon_data[] = {
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,
180 0xffffff,0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0x6c000000,0x5c000000,0xff000000,0xff000000,0xff000000,0xff000000,0x24000000,0xc000000,
181 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0x9c000000,0x6c000000,0xffa7d400,0xffa7d400,0xffa7d400,0xff000000,0x6b000000,0x24000000,
182 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xb4000000,0x74000000,0xffa7d400,0xffa7d400,0xffa7d400,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,
185 0xffffff,0xffffff,0x5c000000,0x6c000000,0x74000000,0x74000000,0x6c000000,0x5c000000,0x5c000000,0x6c000000,0x74000000,0x74000000,0x24000000,0xc000000,
186 0xffffff,0xffffff,0xff000000,0xffa7d400,0xffa7d400,0xffa7d400,0x6c000000,0x5c000000,0xffa7d400,0xffa7d400,0xffa7d400,0xff000000,0x24000000,0xc000000,
187 0xffffff,0xffffff,0xff000000,0xffa7d400,0xffa7d400,0xffa7d400,0x9c000000,0x6c000000,0xffa7d400,0xffa7d400,0xffa7d400,0xff000000,0x6b000000,0x24000000,
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,
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
192};
193
194static const QRgb Calculator_data[] = {
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,
197 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
198 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3e040404,0x3f080808,0x3f080808,0x3f0c0c0c,0x3f0c0c0c,0x3f0c0c0c,0x3f0c0c0c,0x3f0c0c0c,0x3f080808,
199 0x3f080808,0x3e040404,0x3c040404,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff447420,0xff447421,0xff457521,0xff457521,
200 0xff457521,0xff457521,0xff457521,0xff457521,0xff447421,0xff437220,0xff41711e,0xff3f6e1d,0xff3d6c1c,0xff3a6a1a,0xff376518,0xff356316,0xff315f14,0xff2d5b11,
201 0xff2b570f,0xff29550e,0xff26520c,0xff234f0a,0xff1f4b07,0xff1c4805,0xff184303,0xff153f00,0xff133c00,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
202 0xff447421,0xff7f9a69,0xff7f9a69,0xff809a6a,0xff809a6a,0xff809a6a,0xff7f9a69,0xff7f9a69,0xff7e9867,0xff7b9664,0xff799461,0xff74915b,0xff6f8d56,0xff6a8a51,
203 0xff65844a,0xff608044,0xff597b3c,0xff527634,0xff4c712d,0xff476d27,0xff426921,0xff3b6419,0xff355f12,0xff2d5909,0xff285403,0xff265002,0xff133b00,0x5c000000,
204 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff457521,0xff7f9a69,0xff809a6a,0xff809a6a,0xff809a6a,0xff809a6a,0xff7f9a69,0xff7e9867,0xff7e9867,0xff7b9664,
205 0xff77935f,0xff738f5a,0xff6e8c54,0xff68874e,0xff638448,0xff5e7f42,0xff577939,0xff507431,0xff4a702a,0xff446b24,0xff3f671e,0xff396216,0xff315c0d,0xff2c5608,
206 0xff295306,0xff264f04,0xff133801,0x75020202,0x4f030303,0x2e000000,0x1b000000,0x36000000,0xff457521,0xff809a6a,0xff809a6a,0xff809a6a,0xff809a6a,0xff7f9969,
207 0xff7f9969,0xff7e9767,0xff7e9767,0xff7b9664,0xff779360,0xff718d58,0xff6d8a54,0xff68854d,0xff628147,0xff5b7d3e,0xff557837,0xff4e722f,0xff486e28,0xff436a23,
208 0xff3e661b,0xff376014,0xff325b0f,0xff2e570c,0xff2b5209,0xff284e07,0xff133801,0x88060606,0x5b030303,0x37050505,0x1d000000,0x3b000000,0xff7db049,0xffe1e1e1,
209 0xffdadada,0xffdadada,0xffdadada,0xffdadada,0xffdadada,0xffdadada,0xffdadada,0xffdadada,0xffdadada,0xffdadada,0xffdadada,0xffdadada,0xffdadada,0xffdadada,
210 0xffdadada,0xffdadada,0xffdadada,0xffd6d6d6,0xffb2b9ad,0xff5d7747,0xff345c14,0xff315711,0xff2d520e,0xff294c0a,0xff133602,0x95070707,0x63050505,0x3c040404,
211 0x1f000000,0x3d000000,0xff7aab47,0xffd8d8d8,0xffcecece,0xffcecece,0xffcecece,0xffcecece,0xffcecece,0xffcecece,0xffcecece,0xffcecece,0xffcecece,0xffcecece,
212 0xffcecece,0xffcecece,0xffcecece,0xffcecece,0xffcecece,0xffcecece,0xffcecece,0xffcccccc,0xffb1b1b1,0xff666c61,0xff375a19,0xff345616,0xff2e5111,0xff2a4c0e,
213 0xff143603,0x9b0a0a0a,0x68070707,0x3e040404,0x1f000000,0x3d000000,0xff76a645,0xffcecece,0xffc2c2c2,0xffc2c2c2,0xffc2c2c2,0xffc2c2c2,0xffc2c2c2,0xffc2c2c2,
214 0xffc2c2c2,0xffc2c2c2,0xffc2c2c2,0xffc2c2c2,0xffc2c2c2,0xffc2c2c2,0xffc2c2c2,0xffc2c2c2,0xffc2c2c2,0xffc2c2c2,0xffc1c1c1,0xffbfbfbf,0xff909090,0xff444543,
215 0xff37561c,0xff345319,0xff2f4f15,0xff2b4a11,0xff163404,0x9c0d0d0d,0x690c0c0c,0x3f080808,0x1f000000,0x3d000000,0xff50712f,0xff6a6a6a,0xff616161,0xff626262,
216 0xff626262,0xff626262,0xff626262,0xff626262,0xff626262,0xff626262,0xff626262,0xff626262,0xff626262,0xff626262,0xff626262,0xff626262,0xff737373,0xff9d9d9d,
217 0xffbdbdbd,0xffbdbdbd,0xff848484,0xff363735,0xff324c1c,0xff324b1b,0xff2e4918,0xff2b4714,0xff163405,0x9d121212,0x6a0e0e0e,0x3f0c0c0c,0x1f000000,0x3d000000,
218 0xff3d5524,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
219 0xff000000,0xff000000,0xff000000,0xff000000,0xffc2c2c2,0xffb8b8b8,0xff7d7d7d,0xff30342d,0xff293d18,0xff2a3e19,0xff2a4118,0xff294115,0xff163106,0x9e151515,
220 0x6b131313,0x40101010,0x1f000000,0x3d000000,0xff3b5323,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
221 0xff000000,0xff73716b,0xffe5e1d5,0xff000000,0xff73716b,0xffe5e1d5,0xff73716b,0xff000000,0xffc2c2c2,0xffb7b7b7,0xff7a7a7a,0xff2e312b,0xff1e2c13,0xff213015,
222 0xff253517,0xff273a16,0xff152e06,0xa01b1b1b,0x6c181818,0x41141414,0x1f000000,0x3d000000,0xff3c5423,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
223 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffe5e1d5,0xff000000,0xffe5e1d5,0xff000000,0xffe5e1d5,0xff000000,0xffc2c2c2,0xffb7b7b7,
224 0xff7a7a7a,0xff2e302d,0xff131c0c,0xff182210,0xff1e2a13,0xff223216,0xff132b07,0xa1202020,0x6d1c1c1c,0x42171717,0x20000000,0x3f000000,0xff456128,0xff000000,
225 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff6e6d67,0xffdcd8cd,0xff6e6d67,0xff6e6d67,0xffddd9cd,
226 0xff706e68,0xff000000,0xffc0c0c0,0xffb6b6b6,0xff7a7a7a,0xff2d2e2c,0xff0c1108,0xff11180c,0xff192211,0xff202d15,0xff132807,0xa2232323,0x6e202020,0x421b1b1b,
227 0x21000000,0x41000000,0xff5c8136,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
228 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffbababa,0xffb3b3b3,0xff797979,0xff2c2d2c,0xff080b05,0xff0e130a,0xff171e10,0xff1f2a15,
229 0xff132707,0xa3262626,0x6f222222,0x44222222,0x22000000,0x46040404,0xff6a953e,0xffb7b7b7,0xffa2a2a2,0xff9a9a9a,0xff959595,0xff959595,0xff939393,0xff939393,
230 0xff939393,0xff959595,0xff939393,0xff939393,0xff939393,0xff959595,0xff959595,0xff9a9a9a,0xffa2a2a2,0xffacacac,0xffb3b3b3,0xffb0b0b0,0xff797979,0xff2c2c2b,
231 0xff060804,0xff0c1009,0xff161c10,0xff1e2916,0xff132607,0xa3292929,0x70242424,0x44222222,0x24070707,0x4a070707,0xff68933d,0xff383838,0xff303030,0xff2c2c2c,
232 0xff2a2a2a,0xff2a2a2a,0xff292929,0xff292929,0xff292929,0xff2a2a2a,0xff292929,0xff292929,0xff292929,0xff2a2a2a,0xff2a2a2a,0xff2c2c2c,0xff303030,0xff353535,
233 0xffacacac,0xffacacac,0xff787878,0xff2b2c2b,0xff050704,0xff0c1009,0xff161c10,0xff1e2916,0xff132507,0xa3292929,0x70242424,0x44222222,0x26070707,0x4f060606,
234 0xff628a3a,0xff333333,0xffffffe9,0xfffeffdd,0xffe4e5ad,0xff202020,0xffffffe9,0xfffeffdd,0xffe4e5ad,0xff202020,0xffffffe9,0xfffeffdd,0xffe4e5ad,0xff202020,
235 0xffffffe9,0xfffeffdd,0xffe4e5ad,0xff303030,0xffa2a2a2,0xffa8a8a8,0xff777777,0xff2b2c2b,0xff050704,0xff0c0f09,0xff161c11,0xff1e2816,0xff132508,0xa3272727,
236 0x6f222222,0x431e1e1e,0x28060606,0x53090909,0xff5e8437,0xff2f2f2f,0xfffeffdd,0xfffeffc1,0xff575742,0xff191919,0xfffeffdd,0xfffeffc1,0xff575742,0xff191919,
237 0xfffeffdd,0xfffeffc1,0xff575742,0xff191919,0xfffeffdd,0xfffeffc1,0xff575742,0xff2c2c2c,0xff9a9a9a,0xffa4a4a4,0xff767676,0xff2b2c2b,0xff060704,0xff0d100a,
238 0xff161c11,0xff1e2816,0xff122407,0xa3262626,0x6f222222,0x431e1e1e,0x29060606,0x55090909,0xff5b8035,0xff2d2d2d,0xffe4e5ad,0xff575742,0xff29291f,0xff141414,
239 0xffe4e5ad,0xff575742,0xff29291f,0xff141414,0xffe4e5ad,0xff575742,0xff29291f,0xff141414,0xffe4e5ad,0xff575742,0xff29291f,0xff2a2a2a,0xff959595,0xffa2a2a2,
240 0xff757575,0xff2b2c2b,0xff060705,0xff0d100a,0xff161b11,0xff1d2615,0xff122207,0xa2232323,0x6e1e1e1e,0x421b1b1b,0x29060606,0x55090909,0xff5b8035,0xff2d2d2d,
241 0xff202020,0xff191919,0xff141414,0xff141414,0xff111111,0xff111111,0xff111111,0xff141414,0xff111111,0xff111111,0xff111111,0xff131313,0xff121212,0xff171717,
242 0xff1f1f1f,0xff292929,0xff939393,0xffa1a1a1,0xff757575,0xff2b2c2b,0xff060705,0xff0c0f0a,0xff151b10,0xff1b2514,0xff112106,0xa11e1e1e,0x6d1c1c1c,0x42171717,
243 0x29060606,0x56060606,0xff597e34,0xff2b2b2b,0xffffffe9,0xfffeffdd,0xffe4e5ad,0xff111111,0xffffffe9,0xfffeffdd,0xffe4e5ad,0xff111111,0xffffffe9,0xfffeffdd,
244 0xffe4e5ad,0xff0f0f0f,0xffffffe9,0xfffeffdd,0xffe4e5ad,0xff262626,0xff8e8e8e,0xff9f9f9f,0xff757575,0xff2b2c2b,0xff060705,0xff0c0f09,0xff14190f,0xff192312,
245 0xff0f1f06,0x9f1a1a1a,0x6b151515,0x40101010,0x29060606,0x56060606,0xff597e34,0xff2b2b2b,0xfffeffdd,0xfffeffc1,0xff575742,0xff111111,0xfffeffdd,0xfffeffc1,
246 0xff575742,0xff111111,0xfffeffdd,0xfffeffc1,0xff575742,0xff0e0e0e,0xfffeffdd,0xfffeffc1,0xff575742,0xff252525,0xff8b8b8b,0xff9d9d9d,0xff747474,0xff2b2c2b,
247 0xff060704,0xff0b0e09,0xff12180d,0xff17210f,0xff0e1e04,0x9e151515,0x6a111111,0x3f0c0c0c,0x29060606,0x56030303,0xff597e34,0xff2b2b2b,0xffe4e5ad,0xff575742,
248 0xff29291f,0xff111111,0xffe4e5ad,0xff575742,0xff29291f,0xff111111,0xffe4e5ad,0xff575742,0xff29291f,0xff0d0d0d,0xfffeffdd,0xfffeffc1,0xff575742,0xff242424,
249 0xff898989,0xff9c9c9c,0xff747474,0xff2b2c2b,0xff050704,0xff0a0d08,0xff10170b,0xff141e0c,0xff0c1b04,0x9d101010,0x690c0c0c,0x3f080808,0x29060606,0x55060606,
250 0xff5b8035,0xff2d2d2d,0xff202020,0xff191919,0xff141414,0xff141414,0xff111111,0xff111111,0xff111111,0xff141414,0xff111111,0xff0f0f0f,0xff0d0d0d,0xff0e0e0e,
251 0xfffeffdd,0xfffeffc1,0xff575742,0xff242424,0xff898989,0xff9c9c9c,0xff747474,0xff2b2c2b,0xff050604,0xff090c06,0xff0e1509,0xff121c0a,0xff0b1a03,0x9c0b0b0b,
252 0x68070707,0x3e040404,0x29060606,0x54030303,0xff5b8035,0xff2d2d2d,0xffffffe9,0xfffeffdd,0xffe4e5ad,0xff141414,0xffffffe9,0xfffeffdd,0xffe4e5ad,0xff141414,
253 0xffffffe9,0xfffeffdd,0xffe4e5ad,0xff0f0f0f,0xfffeffdd,0xfffeffc1,0xff575742,0xff252525,0xff8b8b8b,0xff9d9d9d,0xff747474,0xff2b2b2b,0xff040603,0xff080b05,
254 0xff0c1307,0xff0f1a07,0xff091802,0x9b080808,0x67050505,0x3e040404,0x25000000,0x50030303,0xff5e8437,0xff2f2f2f,0xfffeffdd,0xfffeffc1,0xff575742,0xff191919,
255 0xfffeffdd,0xfffeffc1,0xff575742,0xff191919,0xfffeffdd,0xfffeffc1,0xff575742,0xff151515,0xfffeffdd,0xfffeffc1,0xff575742,0xff292929,0xff939393,0xffa1a1a1,
256 0xff757575,0xff2b2b2b,0xff030502,0xff070a04,0xff0a1105,0xff0d1804,0xff091801,0x94050505,0x63030303,0x3b000000,0x21000000,0x47000000,0xff5f8538,0xff2e2e2e,
257 0xffe4e5ad,0xff575742,0xff29291f,0xff181818,0xffe4e5ad,0xff575742,0xff29291f,0xff181818,0xffe4e5ad,0xff575742,0xff29291f,0xff161616,0xffe4e5ad,0xff575742,
258 0xff29291f,0xff222222,0xff767676,0xff7c7c7c,0xff585858,0xff252525,0xff030402,0xff050902,0xff091003,0xff0c1602,0xff081801,0x87020202,0x5a000000,0x36000000,
259 0x1c000000,0x3a000000,0xff50712f,0xff0e1308,0xff080b04,0xff070a04,0xff060904,0xff060904,0xff060904,0xff060904,0xff060904,0xff060904,0xff060904,0xff060904,
260 0xff060904,0xff060904,0xff060904,0xff070a04,0xff080b04,0xff080b05,0xff1b2610,0xff1c2710,0xff1a250f,0xff141c0c,0xff010300,0xff020600,0xff040b01,0xff061100,
261 0xff081700,0x74000000,0x4e000000,0x2e000000,0x15000000,0x2e000000,0x4c000000,0x6f000000,0x8c040404,0xa0030303,0xae060606,0xb2060606,0xb4080808,0xb50b0b0b,
262 0xb60e0e0e,0xb6121212,0xb8151515,0xb9171717,0xb9191919,0xb81c1c1c,0xb81c1c1c,0xb61c1c1c,0xb21d1d1d,0xad1d1d1d,0xa81a1a1a,0xa3191919,0x9f151515,0x9d101010,
263 0x9c0b0b0b,0x9b080808,0x94050505,0x87020202,0x74000000,0x5c000000,0x3d000000,0x25000000,0xe000000,0x1d000000,0x31000000,0x48000000,0x5d030303,0x6c020202,
264 0x75040404,0x79040404,0x7b080808,0x7c0a0a0a,0x7d0e0e0e,0x7d121212,0x7f161616,0x801a1a1a,0x811c1c1c,0x801c1c1c,0x801c1c1c,0x7e1c1c1c,0x7b1d1d1d,0x771c1c1c,
265 0x731b1b1b,0x6e151515,0x6b111111,0x690c0c0c,0x68070707,0x67050505,0x63030303,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x8000000,0x11000000,
266 0x1b000000,0x29000000,0x34000000,0x3e040404,0x44040404,0x46040404,0x47070707,0x470b0b0b,0x470b0b0b,0x480e0e0e,0x49111111,0x49151515,0x4b1b1b1b,0x4b1b1b1b,
267 0x4b1b1b1b,0x4a1c1c1c,0x481c1c1c,0x46191919,0x44161616,0x410c0c0c,0x400c0c0c,0x3f080808,0x3e040404,0x3e040404,0x3b000000,0x36000000,0x2e000000,0x25000000,
268 0x18000000,0xf000000
269};
270
271static const QRgb Calibrate_data[] = {
272 0xffffff,0xffffff,0x1ffffff,0x3ffffff,0x5ffffff,0x8dfdfdf,0xdc4c4c4,0x13aeaeae,0x1ba1a1a1,0x258a8a8a,0x2f828282,0x39797979,0x41727272,0x486e6e6e,
273 0x4d6a6a6a,0x51686868,0x51656565,0x4f646464,0x4b636363,0x45646464,0x3d646464,0x32666666,0x286c6c6c,0x1e6f6f6f,0x15797979,0xd898989,0x104f4f4f,0x4bfbfbf,
274 0x1ffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1ffffff,0x3ffffff,0x6d5d5d5,0xacccccc,0x11b4b4b4,0x1aa7a7a7,0x26949494,0x33878787,0x417e7e7e,
275 0x9c84939a,0xda74889d,0xf461749c,0xfd52659b,0xff48589b,0xff46599e,0xff4c5e9a,0xfd586c99,0xf5657b97,0xdd728791,0xa6758484,0x575e5e5e,0x495e5e5e,0x39626262,
276 0x2a676767,0x4e1f1f1f,0xaa040404,0xffb0b0b0,0x5999999,0x2808080,0xffffff,0xffffff,0x1ffffff,0x3ffffff,0x6d5d5d5,0xbd1d1d1,0x14b3b3b3,0x209f9f9f,
277 0x2e909090,0x3f868686,0xb681939e,0xf365799d,0xff596fa4,0xff6d89ab,0xff84a7af,0xff97c0b4,0xffa2d0b5,0xffa8d7b7,0xffa2d0b4,0xff97c1af,0xff87aeaa,0xff7696a3,
278 0xff658199,0xf4657d8d,0xc3728384,0x5d5a5a5a,0x702e2e2e,0xf0020202,0xffc2c2c2,0xffa7a7a7,0xff636363,0x5999999,0x2808080,0xffffff,0x3ffffff,0x6d5d5d5,
279 0xbd1d1d1,0x16aeaeae,0x229e9e9e,0x348e8e8e,0x8089999b,0xe97186a1,0xff647da7,0xff81a4b0,0xffa4d2ba,0xffb5e8bc,0xffbcf0bf,0xffbef4be,0xffbff6be,0xffbff6bc,
280 0xffbef4bc,0xffb7edb7,0xffb3e7b5,0xffaadcae,0xff98c5a5,0xff7ca197,0xff638086,0xf249595e,0xf7040405,0xffc2c2c2,0xffaaaaaa,0xff6b6b6b,0xff2e2e2e,0xff0f0f0f,
281 0x5999999,0x2808080,0x5ffffff,0xacccccc,0x14b3b3b3,0x229e9e9e,0x358c8c8c,0xa48697a0,0xf7687ca2,0xff7c9db0,0xffa4d2b9,0xffbbefc0,0xffc2f9c1,0xffc4fbc1,
282 0xffc3fac0,0xffc3fac0,0xffc1f8be,0xffc0f7bd,0xffbdf4ba,0xffbbf1b8,0xffb6ebb3,0xffaee2ab,0xffa3d4a1,0xff90bc92,0xff050707,0xff060808,0xff8b89b4,0xff9b9ba6,
283 0xff6b6b6b,0xff2f2e2e,0xff0b0b0b,0x8c070707,0xb747474,0x4808080,0x8dfdfdf,0x10afafaf,0x1f9c9c9c,0x338c8c8c,0xa38396a0,0xfa6379a2,0xff87aab2,0xffb3e5be,
284 0xffc3fac2,0xffc6fdc3,0xffc5fcc2,0xffc4fbc1,0xffc2f9bf,0xffc1f8be,0xffc0f7bd,0xffbdf4ba,0xffbbf1b8,0xffb6ebb3,0xffaee2ab,0xffa4d5a1,0xff96c294,0xff919291,
285 0xff080b08,0xffb8b8c0,0xff8d8ca3,0xff4d4d64,0xff2b2a2d,0xff0b0b0b,0xf1020202,0x541a1a1a,0x14595959,0x8606060,0xcbfbfbf,0x19a3a3a3,0x2c8b8b8b,0x7e88989a,
286 0xf7667ca1,0xff87aab2,0xffb6e9be,0xffc6fdc3,0xffc5fcc2,0xffc5fcc2,0xffc4fbc1,0xffc3fac0,0xffc1f8be,0xffc0f7bd,0xffbdf4ba,0xffbaf0b7,0xffb5eab2,0xffaee2ab,
287 0xffa3d4a0,0xff95c092,0xff0f1210,0xff080b08,0xffc2c2c2,0xffaaaaaa,0xff67676a,0xff27272d,0xff08080a,0xf8040404,0x7f252525,0x374a4a4a,0x1e4d4d4d,0xf555555,
288 0x11a5a5a5,0x238a8a8a,0x3c7b7b7b,0xe97184a0,0xff7c9db0,0xffb3e5be,0xffc6fdc3,0xffc6fdc3,0xffc5fcc2,0xffc4fbc1,0xffc2f9bf,0xffc1f8be,0xffbff6bc,0xffbcf3b9,
289 0xffb9efb6,0xffb4e9b1,0xfface0a9,0xffa1d29e,0xff95c192,0xff878b85,0xff080b08,0xffc2c2c2,0xffaaaaaa,0xff6b6b6b,0xff2f2f2f,0xff0b0b0b,0xff020303,0xf72e3a39,
290 0x72414141,0x4c404040,0x2c404040,0x17434343,0x18959595,0x307a7a7a,0xb57f919c,0xff637ca6,0xffa4d1b8,0xffc2f9c1,0xffbdf4ba,0xff96cd93,0xff71a86e,0xff50874d,
291 0xff356c32,0xff235a20,0xff2b6228,0xff3f763c,0xff5a9058,0xff7baf78,0xff98c996,0xff93be91,0xff202520,0xff090b08,0xffc2c2c2,0xffaaaaaa,0xff6b6b6b,0xff2f2e2e,
292 0xff0b0b0b,0xff030403,0xff212d21,0xff33463c,0xd34c5c55,0x643b3b3b,0x3e3a3a3a,0x223c3c3c,0x217c7c7c,0x3c6f6f6f,0xf263779a,0xff80a2af,0xffb9edbe,0xff8ec58b,
293 0xff5a9157,0xff5f965c,0xff80b77d,0xff9ad197,0xffb0e7ad,0xffb9f0b6,0xffa9dfa6,0xff8ac087,0xff679b64,0xff3c6d39,0xff366134,0xff787f78,0xff080a08,0xffa8a9a8,
294 0xffa8a8a8,0xff6b6b6c,0xff2e2f2e,0xff0b0b0b,0xff030403,0xff243123,0xff3b523b,0xff425c48,0xf7475d56,0x7b363636,0x51323232,0x2f363636,0x29707070,0x977b8c93,
295 0xff576da2,0xff94c1a6,0xff6ea56c,0xff659c62,0xff9ad197,0xffc1f8be,0xffc0f7bd,0xffbef5bb,0xffbbf2b8,0xffb9efb6,0xffb3e8b0,0xfface0a9,0xffa1d29e,0xff94bf91,
296 0xff212720,0xff050704,0xffbdbdbd,0xff000000,0xff606160,0xff2e2e2e,0xff0b0b0b,0xff030403,0xff233022,0xff3c543b,0xff4c6b4b,0xff557857,0xff50715d,0xbe48554c,
297 0x622f2f2f,0x3c2f2f2f,0x32616161,0xd8738598,0xff627e98,0xff5b8e5d,0xff7fb67c,0xffc0f7bd,0xffc1f8be,0xffa7dea4,0xff76ad73,0xff487f45,0xff235a20,0xff0b4108,
298 0xff1b5018,0xff366834,0xff588456,0xff778178,0xff080b08,0xffc2c2c2,0xffa9a9a9,0xff686868,0xff000000,0xff111111,0xff030402,0xff222f21,0xff3b533a,0xff4c6a4a,
299 0xff5a7f58,0xff618b60,0xff5c8663,0xe64e6458,0x722b2b2b,0x47282828,0x39555555,0xf35f7397,0xff466b5c,0xff77ab77,0xffc0f7bd,0xffbff6bc,0xff80b77d,0xff3d743a,
300 0xff60975d,0xff84bb81,0xffa0d69d,0xffaee4ab,0xff93c690,0xff6b9a69,0xff192219,0xff030603,0xffc2c2c2,0xffaaaaaa,0xff6b6b6b,0xff2f2e2f,0xff0c0c0c,0xff020302,
301 0xff202e1f,0xff395038,0xff486747,0xff587d56,0xff638e60,0xff689766,0xff629167,0xf74d6a5b,0x7f262626,0x53252525,0x3e4e4e4e,0xfd3b4e79,0xff456f51,0xffb9efb9,
302 0xffbff6bc,0xff73aa70,0xff60975d,0xff9dd49a,0xffb9f0b6,0xffb5ebb2,0xffb1e7af,0xffabdfa8,0xff9ecf9c,0xff87b185,0xff1d261d,0xffc2c2c2,0xffaaaaaa,0xff6b6b6b,
303 0xff2f2f2f,0xff0b0b0b,0xff010201,0xff152214,0xff364d35,0xff456343,0xff537851,0xff608b5d,0xff679765,0xff6a9b67,0xff649665,0xfd51745d,0x8a232323,0x5b222222,
304 0x43484848,0xff1d2f45,0xff7aa888,0xffbbf1b9,0xff7eb57b,0xff60975d,0xffb9f0b6,0xffb9f0b6,0xff8ec58b,0xff548a51,0xff245921,0xff063904,0xff1b4a19,0xff152515,
305 0xffbfbfbf,0xffaaaaaa,0xff6b6b6b,0xff2e2f2e,0xff0b0b0b,0xff020302,0xff162315,0xff112810,0xff3e5c3c,0xff4f744d,0xff5a8558,0xff639260,0xff679a64,0xff689d65,
306 0xff629761,0xff537f5b,0x92212121,0x61202020,0x45434343,0xff1c2f3e,0xffa3d3b2,0xffa2d99f,0xff3e753b,0xff9cd399,0xffb8efb5,0xff7bb278,0xff356c32,0xff659b62,
307 0xff89be86,0xff97c894,0xff486547,0xff0c140c,0xffb6b6b6,0xff6b6b6b,0xff2e2e2e,0xff0b0b0b,0xff010200,0xff192718,0xff324a31,0xff173616,0xff355a33,0xff558052,
308 0xff5d8c5a,0xff62955f,0xff659a62,0xff649b61,0xff5e945d,0xff548459,0x961f1f1f,0x651c1c1c,0x443c3c3c,0xff2f4264,0xff9eccaf,0xff73aa71,0xff639a60,0xffb7eeb4,
309 0xff91c88e,0xff397036,0xff96cc93,0xffabe1a8,0xffa2d69f,0xff93c391,0xff040504,0xffbfbfbf,0xff6b6b6b,0xff232423,0xff0b0b0b,0xff0a0e0a,0xff0f1d0e,0xff1c351b,
310 0xff3d5b3b,0xff2b5029,0xff2a5527,0xff588755,0xff5d8f5a,0xff60955d,0xff60975e,0xff5d945a,0xff5a8f59,0xff4e7b53,0x971b1b1b,0x65191919,0x42363636,0xfd465a7f,
311 0xff92bcaa,0xff497e47,0xff86bd83,0xffb5ecb2,0xff5c9359,0xff6ba268,0xffade3aa,0xff85bb82,0xff3c703a,0xff0a3908,0xff000000,0xff636363,0xff191919,0xff0a120a,
312 0xff040704,0xff273927,0xff253f24,0xff143312,0xff456b43,0xff3c673a,0xff1e4d1b,0xff588b55,0xff5b9058,0xff5d935a,0xff5b9258,0xff598e56,0xff548952,0xfd446a4a,
313 0x94181818,0x64171717,0x3e313131,0xf45a708a,0xff83a9a4,0xff295e27,0xffa0d79d,0xffb2e9af,0xff336a30,0xff91c88e,0xfface2a9,0xff437940,0xff063903,0xff033201,
314 0xff000000,0xff000000,0xff040504,0xff192719,0xff0b2409,0xff3c593a,0xff395b37,0xff0b3209,0xff4a7648,0xff497946,0xff144711,0xff558a52,0xff578d54,0xff568d53,
315 0xff568c53,0xff538950,0xff4d824b,0xf73d5c43,0x8f151515,0x5e161616,0x372e2e2e,0xd9677d87,0xff72939f,0xff154913,0xffafe6ac,0xffb0e7ad,0xff195016,0xffa8dfa5,
316 0xffa9dfa6,0xff144911,0xff073a04,0xff043502,0xff022e00,0xff072d05,0xff537551,0xff476845,0xff022300,0xff476c45,0xff487146,0xff043102,0xff4d7d4a,0xff4e824c,
317 0xff0e440c,0xff52884f,0xff50874d,0xff51874e,0xff50874d,0xff4c834a,0xff497f48,0xea344d3b,0x86131313,0x57121212,0x302b2b2b,0x9f607273,0xff638096,0xff1f4f1f,
318 0xff9ad198,0xffade4aa,0xff2f662c,0xff8ec58b,0xffa6dca3,0xff437940,0xff093d06,0xff053803,0xff043302,0xff295427,0xff5d855a,0xff456d43,0xff113a0e,0xff507b4d,
319 0xff457442,0xff0e400c,0xff4e824b,0xff487d45,0xff154b12,0xff4d844a,0xff4d834a,0xff4c8349,0xff4a8147,0xff477e45,0xff427342,0xc929382c,0x79111111,0x4e101010,
320 0x26282828,0x46212121,0xf2617888,0xff2f5938,0xff77ac77,0xffabe2a8,0xff548b51,0xff659c62,0xffa2d99f,0xff7cb279,0xff3e733b,0xff0f430c,0xff31642f,0xff598956,
321 0xff659463,0xff356433,0xff295927,0xff558652,0xff3a6d38,0xff1e521b,0xff4d824a,0xff3c7339,0xff1d531a,0xff4a8047,0xff498046,0xff498046,0xff457c42,0xff427840,
322 0xf7335338,0x970f0f0f,0x6b0e0e0e,0x410c0c0c,0x1d232323,0x391f1f1f,0xb8607473,0xff42645d,0xff497a4d,0xffa7dea5,0xff82b97f,0xff31682e,0xff86bd83,0xff96cd93,
323 0xff8fc68c,0xff87bc84,0xff7bb079,0xff73a770,0xff598c56,0xff1b4e18,0xff477b44,0xff588c55,0xff2a5f27,0xff2f652c,0xff4b8148,0xff2f662c,0xff285f25,0xff477e44,
324 0xff457c42,0xff437a40,0xff42783f,0xff3d6f3d,0xd9283b2d,0x840e0e0e,0x590b0b0b,0x350a0a0a,0x15242424,0x29191919,0x49151515,0xeb5b727b,0xff1e4922,0xff80b483,
325 0xffa1d89e,0xff689f65,0xff2d642a,0xff568c53,0xff73a970,0xff7eb57c,0xff659b62,0xff42783f,0xff1e541b,0xff41773e,0xff5c9159,0xff477d44,0xff164c13,0xff40773e,
326 0xff497f46,0xff1f561c,0xff31682e,0xff437a40,0xff41783e,0xff40773d,0xff3d743b,0xf32e4b32,0x970c0c0c,0x6e090909,0x470b0b0b,0x27070707,0xd272727,0x1e1a1a1a,
327 0x36131313,0x88495852,0xf948626d,0xff39663f,0xff93c894,0xff94cb91,0xff6fa66c,0xff42793f,0xff1f561c,0xff0b4208,0xff1c5219,0xff356b32,0xff4f864c,0xff5f965c,
328 0xff578e54,0xff275e24,0xff31682e,0xff487f45,0xff356c32,0xff195016,0xff3e753b,0xff3f763c,0xff3e753b,0xff3c733a,0xfb335435,0xbd1c241e,0x7d080808,0x57090909,
329 0x350a0a0a,0x1c090909,0x7242424,0x120e0e0e,0x250e0e0e,0x400c0c0c,0xac52625f,0xfb3e5a5f,0xff35633a,0xff70a571,0xff89c087,0xff84bb81,0xff7eb57b,0xff77ae74,
330 0xff71a86e,0xff6aa067,0xff62985f,0xff4b8148,0xff265d23,0xff2b6228,0xff4b8248,0xff447b41,0xff1d541a,0xff2c6329,0xff3d743a,0xff3c7339,0xff3b7239,0xfb305531,
331 0xd0213024,0x86060606,0x61050505,0x3f040404,0x24070707,0x11000000,0x3000000,0xb171717,0x170b0b0b,0x2c0c0c0c,0x47070707,0xae4b5b56,0xf9425d5f,0xff174518,
332 0xff386b38,0xff568c55,0xff6aa067,0xff70a76d,0xff5e955b,0xff467d43,0xff2d642a,0xff144b11,0xff32692f,0xff4c8349,0xff487f45,0xff285f25,0xff1d541a,0xff3d743a,
333 0xff3b7138,0xff397037,0xfa2e5131,0xd0202d24,0x89040404,0x67050505,0x47040404,0x2b060606,0x16000000,0xa000000,0x1000000,0x5000000,0xd000000,0x1b090909,
334 0x2f050505,0x49030303,0x9236423d,0xed4b6461,0xff3a6346,0xff215122,0xff0f430d,0xff033900,0xff0e440b,0xff1e551b,0xff32692f,0xff467d43,0xff4d844a,0xff487f45,
335 0xff275e24,0xff194f16,0xff356c33,0xff3a7038,0xff376835,0xf22a462d,0xbc18221a,0x85020202,0x67020202,0x49030303,0x2e000000,0x1a000000,0xd000000,0x5000000,
336 0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x2e000000,0x47040404,0x61030303,0xc3415249,0xf349675a,0xff578063,0xff5a8a61,0xff598b5c,0xff568a57,
337 0xff538851,0xff4e844d,0xff366c34,0xff194f17,0xff1c511a,0xff376d36,0xff3a6a39,0xf72b4b2f,0xd8223426,0x94020202,0x7c020202,0x60000000,0x46000000,0x2e000000,
338 0x1b000000,0xe000000,0x6000000,0x2000000,0xffffff,0x1000000,0x2000000,0x7000000,0xe000000,0x1a000000,0x2a000000,0x3e000000,0x55000000,0x6c000000,
339 0xb6314039,0xe23e5648,0xf63d5a4b,0xfd355a44,0xff295432,0xff174817,0xff15421e,0xfd284f34,0xf7315236,0xe82b422e,0xc71d2c20,0x93000000,0x81000000,0x6c000000,
340 0x55000000,0x3e000000,0x2a000000,0x1a000000,0xe000000,0x7000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,
341 0x16000000,0x23000000,0x33000000,0x45000000,0x56000000,0x67000000,0x75000000,0x81000000,0x89000000,0x8e000000,0x90000000,0x8e000000,0x89000000,0x81000000,
342 0x75000000,0x67000000,0x56000000,0x45000000,0x33000000,0x23000000,0x16000000,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,
343 0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,0x33000000,0x3f000000,0x4a000000,0x53000000,0x59000000,0x5e000000,
344 0x5f000000,0x5e000000,0x59000000,0x53000000,0x4a000000,0x3f000000,0x33000000,0x26000000,0x1b000000,0x11000000,0xa000000,0x5000000,0x2000000,0x1000000,
345 0xffffff,0xffffff
346};
347
348static const QRgb CityTime_data[] = {
349 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
350 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
351 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
352 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
353 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff05034a,0xff05034b,0xff05034c,0xff05034d,
354 0xff05034d,0xff05034e,0xff05034e,0xff05034e,0xff05034d,0xff05034c,0xff050349,0xff040347,0xff040244,0xff040240,0xff03023c,0xff030238,0xff030233,0xff02012f,
355 0xff02012a,0xff020128,0xff010124,0xff010121,0xff01011d,0xff01001a,0xff000016,0xff000013,0xff000012,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
356 0xff05034e,0xff838393,0xff848495,0xff878797,0xff898999,0xff898999,0xff898999,0xff898999,0xff878797,0xff848495,0xff7f7f90,0xff77778a,0xff707083,0xff67677c,
357 0xff5d5d73,0xff53536a,0xff474760,0xff3b3b56,0xff30304d,0xff282846,0xff1f1f3e,0xff171736,0xff101030,0xff070729,0xff020224,0xff010122,0xff000012,0x5c000000,
358 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff050354,0xff8e8e9d,0xff9191a0,0xff9393a2,0xff9595a3,0xff9696a4,0xff9696a4,0xff9397a7,0xff92a1b5,0xff8cadca,
359 0xff8ab7dc,0xff8bbfe6,0xff83b9e0,0xff7baace,0xff6e8bac,0xff5d6985,0xff4a4b65,0xff3d3d57,0xff31314d,0xff262644,0xff1c1c3b,0xff121233,0xff09092b,0xff040426,
360 0xff030324,0xff020222,0xff000011,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff06045a,0xff9c9ca9,0xff9f9fac,0xffa1a1ae,0xffa3a3b0,0xffa2a5b3,
361 0xff96b7d1,0xff95cced,0xff90d6f9,0xff8ad6fc,0xff69bfee,0xff4ba8dc,0xff7ecff9,0xff89d7fa,0xff7dcff8,0xff6cbdec,0xff5e9ccc,0xff506688,0xff333451,0xff272745,
362 0xff1a1a3a,0xff0f0f30,0xff080829,0xff060626,0xff040424,0xff030322,0xff000011,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff070461,0xffababb6,
363 0xffaeaeb9,0xffb1b1bb,0xff85accc,0xff5bb0d3,0xffa4eafa,0xffb6f5ff,0xff93e6f6,0xff8de1f9,0xff67c9e8,0xff33a1c2,0xff83d8f3,0xff87dbf1,0xff8fe0f8,0xff8ddcf8,
364 0xff6ec7ec,0xff49addc,0xff4f95c9,0xff3f5275,0xff1b1b3a,0xff121232,0xff0c0c2c,0xff080827,0xff060624,0xff040421,0xff000010,0x93000000,0x62000000,0x3b000000,
365 0x1f000000,0x3d000000,0xff070468,0xffbbbbc4,0xffb9bdc9,0xff72aed0,0xff0d7e9d,0xff83d8dd,0xffcefdfe,0xff7fbec1,0xff337570,0xff74bbb7,0xffc1faff,0xffb4f1fd,
366 0xffb1eefb,0xffafedfa,0xffa8ebfa,0xffa4e9fa,0xffa0e8ff,0xff62c3da,0xff03709f,0xff309add,0xff4a6e95,0xff191a38,0xff121230,0xff0c0c2a,0xff080825,0xff050522,
367 0xff000010,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08056f,0xffc7cad3,0xff73b9d9,0xff047589,0xff127577,0xff68b3a8,0xff397e69,0xff0e451c,
368 0xff317042,0xffa2dfd4,0xff9ce3d6,0xffbbf0f4,0xffb9f1f8,0xffb1eef8,0xffacebfa,0xffa8eafa,0xffa9edfe,0xff89dbec,0xff0d6b82,0xff027cb4,0xff57c5f5,0xff6190b6,
369 0xff181935,0xff11112d,0xff0b0b27,0xff070721,0xff000010,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff080577,0xff9cd4eb,0xff1e8c8e,0xff0b665e,
370 0xff186957,0xff0d522f,0xff13541f,0xff8cc1a9,0xffd4f9f7,0xffd4fbfe,0xffa1e2d5,0xffbef0f2,0xffbff1f7,0xffb6eff7,0xffb1edf7,0xffaaeaf8,0xffa7eafb,0xff97e3fb,
371 0xff6bc5e4,0xff62c4e8,0xff49bbe8,0xff67ccf8,0xff527697,0xff171731,0xff0f0f29,0xff0a0a23,0xff000010,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
372 0xff080583,0xff58babd,0xff127a5d,0xff1b663b,0xff196026,0xff125511,0xff88c09e,0xffefffff,0xffdffbfe,0xffd4f8fa,0xffd3f9fd,0xffc8f5f8,0xffc3f2f7,0xffbdf1f6,
373 0xffb6eef6,0xffafebf8,0xffaae8f9,0xff98e3fb,0xff7edbff,0xff52b1d3,0xff036d9f,0xff0b8cd6,0xff57b8ed,0xff394b68,0xff14142d,0xff0d0d26,0xff000011,0x99000000,
374 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff080687,0xff38a08b,0xff116637,0xff1a6329,0xff16641a,0xff62b27f,0xffe1fcfa,0xffe5fcfd,0xffdcf8fb,0xffd7f8fa,
375 0xffd2f6f8,0xffcdf6f7,0xffc7f4f7,0xffc1f2f7,0xffb9eff6,0xffb1ecf7,0xffabe9f8,0xffa4e8f9,0xff97e8ff,0xff4ea5b5,0xff045573,0xff0071c6,0xff098bdb,0xff63afe0,
376 0xff1d1f37,0xff111127,0xff000012,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff07057c,0xff198156,0xff287946,0xff9adccf,0xffa8e0cd,0xffd4f9f5,
377 0xffebfcfe,0xffe2fafa,0xffdef9fa,0xffdaf8fa,0xffd6f7f9,0xffd1f6f8,0xffcbf5f7,0xffc4f2f7,0xffbdf0f6,0xffb4edf6,0xfface9f7,0xffa8e9f9,0xffabeeff,0xff6fb6b9,
378 0xff075360,0xff0072bc,0xff0084d7,0xff249ee5,0xff415c7b,0xff16162b,0xff010013,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff07067a,0xff298f53,
379 0xff95d3b8,0xfff0ffff,0xffeefeff,0xffe6fafc,0xffe5faf9,0xffe3fafc,0xffe1f9fc,0xffddf9fa,0xffd9f7f9,0xffd4f6f8,0xffcef5f8,0xffc7f4f8,0xffc0f0f6,0xffb7eef5,
380 0xffaeebf6,0xffa8e7f8,0xffacecfd,0xff82cbd3,0xff0c5453,0xff01679a,0xff0085d8,0xff018dde,0xff4595cc,0xff1a1a2e,0xff010014,0x99000000,0x66000000,0x3d000000,
381 0x1f000000,0x3d000000,0xff090688,0xff70c998,0xffd6f7f0,0xffe9fbfb,0xffeffcfe,0xffaee3ce,0xffb8e8db,0xff9bd8c4,0xffe3fcfd,0xffe1f9fb,0xffdbf8f9,0xffd8f7f8,
382 0xffcff5f7,0xffc9f3f6,0xffc2f1f6,0xffbaeff5,0xffb0ebf6,0xffaae8f8,0xffa8e8fb,0xff9ce3f4,0xff256250,0xff014f60,0xff017ecd,0xff008be0,0xff1391d8,0xff1f1f31,
383 0xff010015,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff09068a,0xff75c39a,0xff3fa666,0xff8dd0af,0xfff8ffff,0xffd8f5ee,0xffe0fbf8,0xffd6f6f3,
384 0xffe5fafb,0xffe3fafb,0xffd9f7fb,0xffcbf5f8,0xffcef5f7,0xffc9f4f7,0xffc3f2f6,0xffbbeff5,0xffb2ecf6,0xffabe8f7,0xffa5e7f8,0xffa8ebfc,0xff75bac4,0xff0e4f48,
385 0xff005c95,0xff007acf,0xff0283d1,0xff242435,0xff010116,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff090689,0xffbae7d7,0xff7bc9a0,0xff8dd0b1,
386 0xffc7eadf,0xfff3ffff,0xffe2f8f5,0xffe7fbfa,0xffe7fdfe,0xffedffff,0xffdbfafc,0xffc2f4f9,0xffc9f4f6,0xffcaf4f6,0xffc3f2f6,0xffbceff5,0xffb4ecf6,0xfface8f6,
387 0xffa5e6f6,0xffa1e4f7,0xffa5ecfe,0xff70bdcc,0xff4fa5c1,0xff4db3df,0xff0881c6,0xff292939,0xff010117,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
388 0xff090688,0xffeefdfe,0xfff6ffff,0xffdbf5f2,0xffabe6d3,0xff7bb59d,0xff255a2c,0xff3d8753,0xff3d8a52,0xff7bb89d,0xffddfbfb,0xffdfffff,0xffd2fafb,0xffcbf5f7,
389 0xffc5f2f6,0xffbceff5,0xffb4ecf6,0xfface8f6,0xffa5e6f6,0xff9fe3f6,0xff9ae2f8,0xff9be7fe,0xff9fedff,0xff8ee2fc,0xff1584bf,0xff2d2d3c,0xff010118,0x99000000,
390 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff090688,0xffe6f9f9,0xffe8f9fa,0xffebfbfc,0xfff6ffff,0xff91b8a5,0xff165b1d,0xff20752c,0xff1b6a19,0xff155d18,
391 0xff397b50,0xff548d75,0xffbceded,0xffddfeff,0xffcbf9fe,0xffc0f1f9,0xffb4ecf4,0xffabe7f5,0xffa4e5f6,0xff9ee2f5,0xff98e0f6,0xff93dff8,0xff90e0fd,0xff8ce1fe,
392 0xff278ebd,0xff31313f,0xff01011a,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff090688,0xffe6f9fa,0xffe5f9fa,0xffe6fafb,0xfff4feff,0xffa2d4be,
393 0xff27873f,0xff29842f,0xff267423,0xff246720,0xff185515,0xff0a370a,0xff3c755a,0xff9ed6d1,0xffa5e0e0,0xffb9f2f8,0xffb8f1fa,0xffabe8f6,0xffa3e5f5,0xff9de2f5,
394 0xff98e0f6,0xff92def7,0xff8edefc,0xff8ee3ff,0xff43a0c6,0xff333341,0xff01011b,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff090687,0xffe5f9f9,
395 0xffe4f9fa,0xffe5f9fb,0xfff4ffff,0xff88c6ab,0xff1e7037,0xff24782a,0xff277125,0xff205f1f,0xff1e571d,0xff1f531b,0xff124212,0xff0f3f18,0xff154923,0xff26604c,
396 0xff93d6de,0xffb0edfc,0xffa2e4f5,0xff9de1f4,0xff97dff6,0xff91ddf7,0xff8edefc,0xff8de0fe,0xff46a4cb,0xff353542,0xff01011b,0x99000000,0x66000000,0x3d000000,
397 0x1f000000,0x3d000000,0xff090687,0xffe2fafa,0xffe1f9fa,0xffe2f8f9,0xffefffff,0xffb0ddd1,0xff2a764b,0xff206c2c,0xff287839,0xff236729,0xff1e511c,0xff1f511b,
398 0xff1e501d,0xff19461a,0xff0f340d,0xff1a452d,0xff96d8e2,0xffadedfc,0xffa0e2f4,0xff9be0f5,0xff95def6,0xff8fdcf7,0xff8cddfb,0xff89dcfd,0xff339dcb,0xff363643,
399 0xff01011c,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff090687,0xffdef8fa,0xffdff9fa,0xffdff9fa,0xffe3fbfd,0xffe7f9fb,0xff577c75,0xff125826,
400 0xff2f894a,0xff1f5c2e,0xff1e541d,0xff1c491a,0xff1c4c1c,0xff1b4c1d,0xff0b330d,0xff639d97,0xffbdf8ff,0xffa5e6f6,0xff9fe1f4,0xff9ae0f4,0xff93ddf5,0xff8edbf7,
401 0xff8bdcfb,0xff7ed6f8,0xff319dcf,0xff363643,0xff01011c,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff080687,0xffd9f8fa,0xffdaf8fa,0xffdcf8fb,
402 0xffdcf9fb,0xffe6fefe,0xffc6dce5,0xff32574d,0xff135024,0xff216739,0xff1b4f26,0xff1e4e1c,0xff1d4a1c,0xff194918,0xff072908,0xff67a5a1,0xffb7f6ff,0xffa1e3f6,
403 0xff9de0f4,0xff98e0f4,0xff91dbf5,0xff8cd9f7,0xff88dafb,0xff6ecbf3,0xff4185b0,0xff353542,0xff01011b,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
404 0xff080686,0xffd2f6fb,0xffd3f7fa,0xffd6f7fa,0xffd7f7fa,0xffd5f8fa,0xffddfeff,0xffd0f3f7,0xff5c8483,0xff165422,0xff1f6026,0xff1d501d,0xff1b4a1a,0xff1a4c22,
405 0xff4b8979,0xff9adbe9,0xffaaeafb,0xff9ee1f4,0xff99e0f5,0xff94ddf4,0xff88d6f4,0xff81d3f6,0xff7fd5fb,0xff64c2f3,0xff48596d,0xff333341,0xff01011b,0x99000000,
406 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff070687,0xffc7f4f9,0xffccf5fa,0xffcef6f9,0xffcff6f8,0xffcff7f8,0xffccf6fa,0xffd7fdff,0xffb3eced,0xff194b33,
407 0xff184a1b,0xff1a4a1a,0xff0e3c0d,0xff518d79,0xffc1fbff,0xffacecfc,0xff9fe1f5,0xff9bdff4,0xff97def4,0xff87d5f2,0xff6ac5ee,0xff6ec8f3,0xff72ccf8,0xff5f9bc3,
408 0xff454551,0xff30303e,0xff010119,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff090689,0xffb0eaf9,0xffc2f3f9,0xffc2f2f9,0xffbbf0f8,0xffc1f1f7,
409 0xffc5f3f8,0xffc9f7fc,0xffb2e9ed,0xff195742,0xff15441e,0xff154116,0xff0b3010,0xff72b4b5,0xffb2f3ff,0xffa1e3f5,0xff9ce0f4,0xff97def4,0xff92dcf4,0xff79cff2,
410 0xff5ebeed,0xff6cc7f5,0xff63b5e5,0xff585d6a,0xff40404d,0xff2d2d3c,0xff010118,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff0a068a,0xffcdecfc,
411 0xfface9fa,0xffb3edf9,0xff8eddf9,0xff92e0f7,0xffb6edf7,0xffbef3fb,0xffb3eff6,0xff206254,0xff0c3810,0xff2b664e,0xff76bac2,0xff9ce4f7,0xff9fe3f8,0xff9adff4,
412 0xff95ddf3,0xff91dbf4,0xff8edbf5,0xff82d3f6,0xff74c9f5,0xff63bdf1,0xff67798c,0xff52525e,0xff3c3c4a,0xff292938,0xff010117,0x87000000,0x5a000000,0x36000000,
413 0x17000000,0x2e000000,0xff0a068a,0xff0a068a,0xff080688,0xff060587,0xff060587,0xff050586,0xff070586,0xff070688,0xff070688,0xff02033b,0xff01010f,0xff04045f,
414 0xff07068a,0xff060587,0xff060585,0xff060584,0xff060584,0xff060585,0xff050586,0xff050586,0xff040480,0xff050359,0xff04023c,0xff030230,0xff020125,0xff02011d,
415 0xff010116,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
416 0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,
417 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
418 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,
419 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
420 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
421 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
422 0x18000000,0xf000000
423};
424
425static const QRgb Clock_data[] = {
426 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
427 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
428 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
429 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
430 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff040264,0xff040263,0xff040263,0xff040262,
431 0xff040262,0xff040261,0xff040261,0xff040260,0xff04025f,0xff04025f,0xff04025e,0xff03025d,0xff03025c,0xff03025b,0xff030259,0xff030259,0xff020158,0xff020156,
432 0xff020155,0xff020154,0xff020152,0xff010151,0xff010150,0xff01004e,0xff01004c,0xff00004a,0xff000047,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
433 0xff040262,0xff6a68b6,0xff6765b4,0xff6563b2,0xff6260b0,0xff5f5dad,0xff5b59aa,0xff5957a9,0xff5655a7,0xff5452a6,0xff504ea4,0xff4c4aa1,0xff4946a0,0xff46439f,
434 0xff413e9d,0xff3e3b9d,0xff38359b,0xff312e9a,0xff2c2897,0xff272396,0xff211e94,0xff1b1891,0xff161290,0xff0e0a8c,0xff0a0688,0xff090683,0xff000045,0x5c000000,
435 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff040261,0xff6361b1,0xff5f5dae,0xff5a58a9,0xff5453a5,0xff504ea1,0xff4b4a9e,0xff47459a,0xff454499,0xff424096,
436 0xff3f3d95,0xff3d3a93,0xff393792,0xff363491,0xff343291,0xff322f92,0xff2d2a91,0xff282591,0xff242090,0xff1f1b90,0xff1a178f,0xff14108d,0xff0d098a,0xff0a0687,
437 0xff090683,0xff09057e,0xff000042,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff04025e,0xff5a58a9,0xff5250a3,0xff4a499d,0xff474778,0xff49495b,
438 0xff4e4e46,0xff555539,0xff5c5c33,0xff5f5f38,0xff64633d,0xff686842,0xff64654e,0xff5c5c5b,0xff504f6a,0xff3c3a77,0xff222085,0xff1f1c86,0xff1a1787,0xff171589,
439 0xff120f89,0xff0c0988,0xff0a0685,0xff090682,0xff09057e,0xff09057a,0xff00003f,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff030259,0xff4c4a9e,
440 0xff48466f,0xff4b4a45,0xff565626,0xff93936b,0xffc0c0a4,0xffdfdfce,0xfff2f2e9,0xfff4f4ef,0xfff8f9f4,0xfff4f4ec,0xffe4e4d5,0xffcdcdb6,0xffacac8e,0xff828260,
441 0xff62626a,0xff3d3b74,0xff12107c,0xff0f0c7f,0xff0b0880,0xff090581,0xff090680,0xff09067d,0xff090579,0xff080575,0xff00003d,0x93000000,0x62000000,0x3b000000,
442 0x1f000000,0x3d000000,0xff03024b,0xff484853,0xff525225,0xff9e9e7a,0xffd9d9c6,0xffffffff,0xffffffff,0xfffbfbf9,0xffd4d4c1,0xffb6b696,0xffc3c3a9,0xffeeeee7,
443 0xffffffff,0xffffffff,0xffffffff,0xffe6e6d7,0xffbfbfa6,0xff8d8d71,0xff585774,0xff1c1a75,0xff070478,0xff070579,0xff080579,0xff090578,0xff090575,0xff080571,
444 0xff00003a,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff030225,0xff727244,0xffc6c6aa,0xfff8f8f5,0xfff8f8f5,0xfffdfdfd,0xffffffff,0xfff2f2ec,
445 0xffb4b391,0xffb0b08c,0xffb2b38f,0xffd2d2bd,0xffffffff,0xfffffffe,0xfffefefe,0xfffbfbf9,0xfffbfbf9,0xffddddcc,0xffadae93,0xff6d6c7b,0xff242273,0xff070470,
446 0xff080472,0xff080572,0xff080570,0xff08056c,0xff000038,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff05032c,0xffd5d5c5,0xffe7e8df,0xffbcbca3,
447 0xffb2b292,0xffd8d8c7,0xfffefefd,0xfff4f4f0,0xffb4b492,0xffa8a88d,0xffb4b490,0xffd2d2bb,0xfffffffe,0xfff7f7f2,0xffd7d7c3,0xffc6c6ac,0xffdfdfd1,0xfffcfcfa,
448 0xffe6e6dd,0xffbcbca6,0xff737382,0xff1c1a6d,0xff07046a,0xff07046c,0xff07056a,0xff080567,0xff000036,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
449 0xff08056a,0xfffcfcfb,0xffcdcdbb,0xffa7a784,0xffabab88,0xffb9b998,0xfff9f9f7,0xfff8f8f7,0xffcecebc,0xff77768f,0xffc2c2a8,0xffeaeae3,0xfffdfdfd,0xffddddca,
450 0xffbbba96,0xffb7b792,0xffb8b796,0xffedece4,0xfffffffe,0xffe7e7df,0xffbdbca8,0xff656481,0xff050361,0xff060464,0xff070466,0xff070464,0xff000034,0x99000000,
451 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a0687,0xfffafaf8,0xffddddd0,0xffafaf8e,0xffafaf8b,0xffc8c7ad,0xfffafaf7,0xfff3f3f3,0xffe7e7e6,0xff605da8,
452 0xffe3e3e1,0xfff2f2f2,0xfffcfcfa,0xffd6d5bc,0xffbfbf9a,0xffbcbb96,0xffb7b793,0xffe4e4d8,0xfffffffe,0xffffffff,0xffe6e6db,0xffb2b2a1,0xff434174,0xff06045d,
453 0xff06035f,0xff06045e,0xff000032,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08055f,0xffd8d8ca,0xffeeeee7,0xffdfdfd1,0xffd6d6c3,0xfff0f0e8,
454 0xfffefefd,0xffefefef,0xffdddddd,0xff312e97,0xffd7d7d9,0xffececec,0xfffcfcfa,0xffe9e9db,0xffc6c6a3,0xffbfbf9a,0xffc5c4a6,0xfff1f1eb,0xfff9f9f6,0xfffbfbf9,
455 0xfffcfcfc,0xffdadacc,0xff848491,0xff060455,0xff060358,0xff060458,0xff00002f,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff060443,0xffacac8d,
456 0xffe4e4d9,0xfffefefd,0xfffdfdfc,0xffffffff,0xfffefefe,0xffececec,0xffd4d4d4,0xff17148e,0xffb2b2c5,0xffe6e6e6,0xfffcfcfc,0xfffbfbf8,0xffeeeee3,0xffe5e5d5,
457 0xfff0f0e8,0xffe2e2d4,0xffc0bfa1,0xffbebea1,0xffe0e0d4,0xffeeeee7,0xffc7c6b7,0xff39386c,0xff050351,0xff050353,0xff00002c,0x99000000,0x66000000,0x3d000000,
458 0x1f000000,0x3d000000,0xff060444,0xffadad8e,0xffe3e3d8,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xffe8e8e8,0xffc5c5ca,0xff0a068a,0xff908fb3,0xffdfdfdf,
459 0xfff9f9f9,0xffffffff,0xfffefefd,0xffffffff,0xfff9f9f5,0xffc7c7a9,0xffb3b38f,0xffaeae8a,0xffb9b99c,0xfff3f3ef,0xffdeddd1,0xff6b6a86,0xff04034b,0xff05034d,
460 0xff00002a,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff080560,0xffd9d9cb,0xfff7f7f3,0xffffffff,0xffffffff,0xffffffff,0xfffcfcfc,0xffe3e3e3,
461 0xffa7a7ba,0xff0a068a,0xff7271a6,0xffd9d9d9,0xfff7f7f7,0xffffffff,0xffffffff,0xffffffff,0xfffcfcfa,0xffd2d2ba,0xffb4b490,0xffafaf8c,0xffc2c1a8,0xfff5f5f1,
462 0xffedece5,0xff9797a2,0xff040346,0xff050249,0xff000028,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a0687,0xfffdfdfd,0xffffffff,0xffffffff,
463 0xffffffff,0xffffffff,0xfffafafa,0xffdfdfdf,0xff8c8bad,0xff0a068a,0xff57559b,0xffd4d4d4,0xfff4f4f4,0xffffffff,0xffffffff,0xffffffff,0xfffefefd,0xfff2f2ea,
464 0xffd5d5c1,0xffcfcfba,0xffe9e9e0,0xfffdfdfc,0xfff7f7f2,0xffbdbcbc,0xff040242,0xff040245,0xff000026,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
465 0xff0a068a,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff7f7f7,0xffdadada,0xff706fa1,0xff0a068a,0xff3b3992,0xffcecece,0xfff1f1f1,0xffffffff,
466 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfc,0xffefefe8,0xffd7d7c7,0xffe0e0d4,0xfff2f2ed,0xffd8d8d1,0xff03023e,0xff040242,0xff000024,0x99000000,
467 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a068a,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff5f5f5,0xffd6d6d6,0xff5a5899,0xff0a068a,
468 0xff2a278e,0xffcacaca,0xffefefef,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff9faf7,0xffc5c5ab,0xffa7a784,0xffa2a280,0xffbebfaa,0xffd6d6d0,
469 0xff03023a,0xff04023f,0xff000023,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a068a,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
470 0xfff5f5f5,0xffd7d7d7,0xff494696,0xff0a068a,0xff15118b,0xffc3c3c3,0xffe4e4e4,0xfff5f5f5,0xfff8f8f8,0xfffcfcfc,0xfffefefe,0xffffffff,0xfff6f6f1,0xffb2b292,
471 0xffa5a482,0xff9f9f7d,0xff9f9f81,0xffd3d4cf,0xff030239,0xff04023c,0xff000022,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a068a,0xffffffff,
472 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff8f8f8,0xffdddddd,0xff5c5a9f,0xff0a068a,0xff2b288f,0xffb9b9b9,0xffcbcbcb,0xffd6d6d6,0xffdddddd,0xffe9e9e9,
473 0xfff2f2f2,0xfff8f8f8,0xfff8f8f6,0xffd1d1bf,0xffa7a786,0xffa1a180,0xffbdbdac,0xffdfdfdc,0xff030238,0xff04023c,0xff000021,0x99000000,0x66000000,0x3d000000,
474 0x1f000000,0x3d000000,0xff0a068a,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xffe9e9e9,0xffcacace,0xff272492,0xff9595ac,0xff8c8ba8,
475 0xff1c188e,0xff4b4898,0xff8786aa,0xffc8c8c8,0xffd8d8d8,0xffe6e6e6,0xfff1f1f1,0xfff1f1ee,0xfff2f2ee,0xfff5f5f1,0xfff8f8f5,0xffd0d0d4,0xff030238,0xff04023c,
476 0xff000021,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a068a,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfff5f5f5,
477 0xffebebeb,0xffd0d0d7,0xffcccccc,0xff3c3996,0xff0a068a,0xff0a068a,0xff0a068a,0xff16128d,0xff5350a0,0xff9b9abe,0xffcfcfc6,0xffc3c3b1,0xffe3e3db,0xfffefefe,
478 0xfffafaf8,0xffadacba,0xff030239,0xff04023c,0xff000022,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a068a,0xffffffff,0xffffffff,0xffffffff,
479 0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffafafa,0xfff2f2f2,0xffe3e3e3,0xffa1a0bd,0xff4e4c9b,0xff4a4796,0xff4a4897,0xff4e4c9b,0xff5350a0,0xff5654a2,
480 0xff504e88,0xff777778,0xffaaaa90,0xfff8f8f7,0xfff9f9f6,0xff7e7e96,0xff040239,0xff04033d,0xff000022,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
481 0xff0a068a,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffcfcfc,0xfff5f5f5,0xffe7e7e7,0xffdadada,0xffd3d3d3,
482 0xffd1d1d1,0xffd4d4d4,0xffdadada,0xffd7d7d5,0xff969678,0xff919171,0xff9a9a7b,0xffededea,0xfff9f9f8,0xff45456b,0xff04023b,0xff04033e,0xff000023,0x99000000,
483 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a068a,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,
484 0xfffdfdfd,0xfff9f9f9,0xfff5f5f5,0xfff3f3f3,0xfff2f2f2,0xfff2f2f2,0xfff2f2f2,0xffefefee,0xffbebeac,0xff9b9b7d,0xffc1c1b1,0xfff3f3f1,0xffacabbb,0xff040339,
485 0xff04023d,0xff040340,0xff000024,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff0a068a,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
486 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffafaf8,0xffe3e3da,0xffd7d7ca,0xffecece5,0xfff6f6f3,
487 0xfff9f9f8,0xfff6f5f6,0xff585779,0xff04023a,0xff04033e,0xff050342,0xff000024,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff090575,0xffffffff,
488 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff3f3f0,0xffc8c8b7,
489 0xff9d9e7f,0xff969575,0xffc2c2b0,0xfff0f0f0,0xfffdfcfc,0xff8f8fa5,0xff030238,0xff04023d,0xff040341,0xff050342,0xff000025,0x87000000,0x5a000000,0x36000000,
490 0x17000000,0x2e000000,0xff07045b,0xff090577,0xff0a068a,0xff0a068a,0xff0a068a,0xff0a068a,0xff0a068a,0xff0a068a,0xff0a068a,0xff0a068a,0xff0a068a,0xff0a068a,
491 0xff0a068a,0xff0a0689,0xff090574,0xff060444,0xff06033c,0xff06033b,0xff060448,0xff0a0684,0xff070465,0xff01012c,0xff000020,0xff000022,0xff000024,0xff000025,
492 0xff000026,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
493 0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,
494 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
495 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,
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,
498 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
499 0x18000000,0xf000000
500};
501
502static const QRgb CloseButton_data[] = {
503 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
504 0xffffff,0xffffff,0xffffff,0x3edcdcdc,0x93dbdbdb,0xd5dedede,0xfadcdcdc,0xd8d1d1d1,0x9ec8c8c8,0x509d9d9d,0xc000000,0x3000000,0xffffff,0xffffff,
505 0xffffff,0xffffff,0x60dcdcdc,0xdbe3e3e3,0xffe2e2e2,0xffd3d3d3,0xffcecece,0xffcdcdcd,0xffd7d7d7,0xe6c5c5c5,0x838d8d8d,0x18000000,0x4000000,0xffffff,
506 0xffffff,0x3edddcdc,0xdbdadada,0xffcbcbcb,0xff353535,0xff888888,0xffc2c1c2,0xff878687,0xff343434,0xffb1b2b1,0xec9e9d9e,0x75595959,0x18000000,0x3000000,
507 0xffffff,0x94d5d6d5,0xffd1d0d0,0xff8c8c8c,0xff000000,0xff000000,0xff5a5a5a,0xff000000,0xff000000,0xff868786,0xffabaaaa,0xc8616161,0x3d000000,0xc000000,
508 0xffffff,0xd5cbcbcb,0xffbbbbbb,0xffadadad,0xff7a7a7a,0xff000000,0xff000000,0xff000000,0xff777777,0xffb1b1b1,0xffb1b1b1,0xef616161,0x61000000,0x1a000000,
509 0xffffff,0xfabfbfbf,0xffababab,0xffa4a4a4,0xff7a7a7a,0xff000000,0xff000000,0xff000000,0xff747474,0xffaeaeae,0xffa2a2a2,0xfd5d5d5d,0x7c000000,0x25000000,
510 0xffffff,0xd9b0b0b0,0xffa0a0a0,0xff7d7d7d,0xff000000,0xff000000,0xff4a4a4a,0xff000000,0xff000000,0xff7a7a7a,0xff8c8c8c,0xf2484848,0x85000000,0x2b000000,
511 0xffffff,0xa0949494,0xff9b9b9a,0xff959696,0xff383838,0xff6a6a6a,0xffa1a1a0,0xff6e6e6e,0xff353535,0xff969796,0xff6a696a,0xdf363636,0x7c000000,0x25000000,
512 0xffffff,0x516f6f6f,0xe7818181,0xff8d8d8d,0xff949494,0xff999a9a,0xff9b9b9b,0xff9e9e9e,0xff8f8f8f,0xff737273,0xf5414141,0xbb1a1a1a,0x61000000,0x1a000000,
513 0xffffff,0xc000000,0x84505050,0xed626262,0xff6f6e6e,0xff7b7b7a,0xff7d7d7d,0xff767576,0xff636263,0xf5414140,0xcd1f1f1f,0x83000000,0x3d000000,0xc000000,
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,
516 0xffffff,0xffffff,0xffffff,0x3000000,0xc000000,0x1a000000,0x25000000,0x2b000000,0x25000000,0x1a000000,0xc000000,0x3000000,0xffffff,0xffffff
517};
518
519static const QRgb DateBook_data[] = {
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,
522 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
523 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
524 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff0b471e,0xff0b471e,0xff0b471e,0xff0b471e,
525 0xff0b461e,0xff0b461e,0xff0b461d,0xff0b451d,0xff0a441c,0xff0a431c,0xff0a411b,0xff093f1a,0xff093d19,0xff083a17,0xff083716,0xff073514,0xff073213,0xff062e11,
526 0xff052b0f,0xff05280e,0xff04250c,0xff03220b,0xff031f09,0xff021708,0xff011305,0xff011705,0xff011504,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
527 0xff0b471e,0xffd8d9d8,0xffd7d8d8,0xffd4d7d5,0xffd2d4d2,0xffced2cf,0xffc9cecb,0xffc4cbc6,0xffbdc6bf,0xffb4bfb8,0xffabb9af,0xffa0b0a5,0xff93a699,0xff879d8d,
528 0xff7a9481,0xff6c8975,0xff5e7f69,0xff52775d,0xff466c52,0xff3a6347,0xff2b4e37,0xff465658,0xff9492ae,0xffe1daff,0xff6a6b7f,0xff0d3a1b,0xff011404,0x5c000000,
529 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff0b461e,0xffd4d7d5,0xffd1d3d2,0xffccd0cd,0xffc5ccc7,0xffbfc6c1,0xffb6c1b9,0xffaebab2,0xffa3b3a7,0xff97ab9d,
530 0xff8aa191,0xff7e9785,0xff708d78,0xff61836c,0xff567961,0xff4a7056,0xff3f684b,0xff2b4e35,0xff4a5c59,0xff7d7f95,0xffd9d2fd,0xffd3ccf2,0xffcfc8ee,0xffcac3ef,
531 0xffaba6c9,0xff072510,0xff011303,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff0b451d,0xffccd1ce,0xffc4cbc6,0xffbac4bd,0xffb1bdb4,0xffa5b4aa,
532 0xff9aada0,0xff8ea495,0xff819b89,0xff73917d,0xff678771,0xff597d65,0xff4d7458,0xff406b4e,0xff2e533b,0xff354c42,0xff8a8ba1,0xffb6aed4,0xffc4bde8,0xffc1bbe8,
533 0xffbdb6d9,0xffbbb7d9,0xffbbb5da,0xffb9b2dc,0xffcfc9f1,0xff23322f,0xff001103,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff0a431c,0xffc0c7c2,
534 0xffb2beb5,0xffa2b3a7,0xff93a799,0xff859d8c,0xff769480,0xff698a74,0xff5c8168,0xff50785c,0xff436f52,0xff355d42,0xff2e463b,0xff83889a,0xffb8b3d9,0xffd8d0fb,
535 0xffc2bae2,0xffbcb7db,0xffb4afd3,0xffb7b0d5,0xffbcb6d7,0xffbbb4dc,0xffb0aad3,0xffc0b8e1,0xffd3cdef,0xff6a6a7b,0xff000e03,0x93000000,0x62000000,0x3b000000,
536 0x1f000000,0x3d000000,0xff0a411b,0xffaebbb2,0xff98ac9e,0xff849d8c,0xff71907b,0xff61846b,0xff527b5f,0xff467154,0xff396346,0xff344d41,0xff58626a,0xffbfb8df,
537 0xffcfcaf5,0xffc2bde6,0xff908aaa,0xffb5afd3,0xffccc4ea,0xffc1bee1,0xffc1bbdc,0xffbeb8db,0xffbab2da,0xffbeb9dd,0xffc5c0e6,0xffbdb8e0,0xffbfb9df,0xffb9b4d5,
538 0xff000a02,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff093e19,0xff98ac9e,0xff7d9886,0xff648770,0xff51785d,0xff3d664a,0xff325340,0xff57626a,
539 0xffbdb8d8,0xffc0bae2,0xffccc5ed,0xffc0b9e2,0xffbab2d8,0xff34303f,0xff33313d,0xff9c95b1,0xffb1a8ce,0xffa49fc1,0xffb5afd6,0xffbfb8e1,0xffb8b2db,0xffc6c2e9,
540 0xffa9a5c7,0xffafa8c9,0xffc1bbe3,0xffd0c9f1,0xff020f06,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff083a17,0xff829d8b,0xff63856e,0xff3b5945,
541 0xff626d76,0xff9390ab,0xffcec8f0,0xffccc6f1,0xffc1badd,0xffc0badd,0xffb9b2d2,0xffb1a7c7,0xffbfb7d6,0xff5d5c6e,0xff464356,0xffaba3c5,0xffc3bddf,0xffc4c0e7,
542 0xffcdcaf5,0xffb5afd5,0xff9f96b0,0xff82777f,0xff5a4b38,0xff9f959f,0xffc9c2ee,0xffd5cff7,0xff062814,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
543 0xff073615,0xff6f8e79,0xff4d635a,0xffe7e1ff,0xffc4bfe6,0xffc4bde5,0xffb5b0d4,0xffb8b3d5,0xffb9b2d7,0xffb3accc,0xffbab3d1,0xffb4abd2,0xffc6c0e7,0xffd5cff2,
544 0xffcec8ef,0xffc6c0e9,0xffb3aed4,0xff8f899e,0xff83787e,0xff726767,0xff6f5d43,0xffaaa1b5,0xff56432a,0xff948687,0xffc3bee8,0xffc7c0e2,0xff0a3c1e,0x99000000,
545 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff073313,0xff60856d,0xff7a7b89,0xffbdb7da,0xffbab5db,0xffbdb8dc,0xffb9b2d7,0xffbdb7dd,0xffc5bee6,0xffc0bae0,
546 0xffc9c3e8,0xffc5bfe6,0xffb7b4db,0xffafabce,0xffa5a0c4,0xff847c8e,0xff7a7074,0xff999098,0xff5e4f41,0xff766866,0xff716458,0xffcecaee,0xff746a76,0xff8d7f7c,
547 0xffbfbade,0xffb6b0d3,0xff0b4221,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff063112,0xff4f615b,0xffb1aac4,0xffa49ec1,0xffb9b3dc,0xffc8c1e7,
548 0xffbeb9dd,0xffbbb5dd,0xff9f97ac,0xffc7c1e1,0xffb7b2d3,0xffb8b2d7,0xff79707c,0xff615546,0xff8b828f,0xff655850,0xff6c5e50,0xff756859,0xff655545,0xff7c6e61,
549 0xffa097a7,0xffc5c2eb,0xff8f8799,0xffa79fb5,0xffb7b2dd,0xffbfbbe0,0xff0b4322,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff063012,0xff43594c,
550 0xffb4aecd,0xffa59dbc,0xffcbc5ea,0xffbdb6db,0xffbbb5dc,0xffb0abd3,0xff4e4034,0xff9c939a,0xff83787e,0xff786a5d,0xff817675,0xff6f6254,0xff877a71,0xff7f757b,
551 0xff6c5b45,0xffa79da9,0xffafa6c2,0xffc7c2eb,0xffa9a4d2,0xff7f7585,0xff786c68,0xff6e5e54,0xff7d6f6f,0xffb7aed2,0xff0a3f20,0x99000000,0x66000000,0x3d000000,
552 0x1f000000,0x3d000000,0xff063112,0xff557861,0xff8581a0,0xff9f97b5,0xffc0badd,0xffbdb7d8,0xffb4add0,0xffbfbaea,0xff716878,0xff75665f,0xff887e8d,0xff5f4e36,
553 0xff736458,0xff867b77,0xffa195a0,0xffb1a9cb,0xffc6bfe2,0xffc6c0e7,0xffc6c2ea,0xff787082,0xff4f3d2c,0xff523d1d,0xff513d1a,0xff624b27,0xff604c2a,0xff74624a,
554 0xff0a3a1c,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff073213,0xff5f816a,0xff445454,0xffb9b0cd,0xffa39dba,0xffbeb9dd,0xffc4c0e3,0xffafaac7,
555 0xff6c6267,0xff615440,0xff8d8087,0xff7f7067,0xffc4bccf,0xffd6d4f8,0xffd6d1fe,0xffd2cbf2,0xffc1bbde,0xffc9c1eb,0xff7d7488,0xff3e2b0e,0xff67502e,0xff7a684f,
556 0xff8f817f,0xff74645c,0xff624e33,0xff604b27,0xff082f13,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff073414,0xff698873,0xff405b4c,0xffb6b0d1,
557 0xffaea6c3,0xffb9b3dc,0xffc0badf,0xffbcb5d1,0xff776964,0xffaca0a8,0xffd2cef9,0xffc4bfe8,0xffa199ad,0xff8c8186,0xff7b7073,0xff9b95ac,0xffcdcaf5,0xffbbb7e0,
558 0xff4f4339,0xff624b28,0xff736047,0xffbbb5cc,0xffcbc6f5,0xffaca6d3,0xff544336,0xff5b4525,0xff072b11,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
559 0xff083615,0xff748f7d,0xff4f745b,0xff908ea8,0xffaca2bd,0xffb8b0d6,0xffb9b0d5,0xffbeb6d8,0xffcac3e6,0xffcbc6ee,0xff817a91,0xff554737,0xff544122,0xff533f1e,
560 0xff4d3817,0xff5a472c,0xff8b7c74,0xffb5b0d4,0xff4c4035,0xff51390e,0xff837155,0xffd7d3f8,0xffc4bee7,0xff797286,0xff56432d,0xff715d3d,0xff093a1a,0x99000000,
561 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff083816,0xff7e9585,0xff5b7c66,0xff435152,0xffbab3d3,0xffaca3c1,0xffb8b0d4,0xffb8b3d6,0xffc6bfe1,0xff696172,
562 0xff4b391c,0xff685432,0xff6b5739,0xff6f5d44,0xff685336,0xff675336,0xff5e4724,0xffa09699,0xff8a7e7c,0xff97897e,0xffb7aebc,0xffb5adce,0xff5b4e44,0xff5c4826,
563 0xff675130,0xff745e40,0xff061f0a,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff083a17,0xff899c8e,0xff668470,0xff3b5945,0xffb8aed6,0xffa49eba,
564 0xffbfb7d9,0xffc5bfe3,0xffaea9cd,0xff4b3b31,0xff604c2e,0xff604c2f,0xffaa9ea2,0xffcdc8ed,0xff81757c,0xff5a462c,0xff654f31,0xff84725d,0xffccc5e8,0xffd2ccef,
565 0xffd4cff4,0xffb7b2d3,0xff5c4e3d,0xff6e5835,0xff826e5b,0xff6b573a,0xff051805,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff093b18,0xff91a297,
566 0xff708a78,0xff4e7158,0xff767689,0xffada7c4,0xffa8a0c1,0xffbeb5dc,0xff9890b1,0xff51402b,0xff5e492a,0xff7a6854,0xffcbc8eb,0xffd4d0fe,0xff9892b3,0xff54422b,
567 0xff634d2c,0xff908068,0xffc2bae1,0xffb7aed2,0xffc3bbdf,0xffc3bee2,0xffb8b1ca,0xffc0b7ce,0xffc3bbe2,0xff867c8c,0xff041605,0x99000000,0x66000000,0x3d000000,
568 0x1f000000,0x3d000000,0xff093d19,0xff9aa79e,0xff7b9282,0xff597862,0xff455452,0xffa7a0bf,0xffa79fbf,0xffc1bae0,0xff9893b4,0xff453521,0xff4f3a16,0xff7a6850,
569 0xffc4bcde,0xffc7c0ef,0xff797182,0xff544222,0xff5f4a2b,0xffa79ca2,0xffc4bce3,0xffb7afd0,0xff9791a9,0xff9a8e98,0xffccc3e6,0xffd0c6ec,0xffcdc3ed,0xff807a92,
570 0xff041606,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff093e19,0xffa2ada5,0xff85988b,0xff64806d,0xff375542,0xffaaa2c1,0xffa59ebb,0xffc4bde4,
571 0xffaea9cd,0xff7c6f69,0xff95877c,0xffb5abc2,0xffc9c0eb,0xff918bad,0xff423426,0xff5b4523,0xff816f57,0xffcac3e0,0xffc9c3e5,0xff6e656a,0xff463314,0xff553e1f,
572 0xff988b93,0xffada5c7,0xff8d8495,0xff4f4135,0xff051605,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff093e1a,0xffa8b0ab,0xff8e9e93,0xff6f8777,
573 0xff4c6c56,0xff68687e,0xffb2acc9,0xffafa8c6,0xffc5bddf,0xffc6bfdf,0xffcdc8f3,0xffd4cdf5,0xffbdb7dc,0xff453933,0xff4d3817,0xff6e593d,0xffbdb3c6,0xffcac5ec,
574 0xffc9c1e8,0xff8b8196,0xff564121,0xff634a28,0xff5e482c,0xff5b4a35,0xff4d391e,0xff5a421f,0xff051805,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
575 0xff0a3e1a,0xffaeb4af,0xff97a49a,0xff768b7c,0xff55715e,0xff3c4d47,0xffc4bee1,0xffa8a1c0,0xffbfbadb,0xffb6b0d3,0xffb9b3d7,0xffc0bce1,0xff655b61,0xff564122,
576 0xff645130,0xffbcb1bc,0xffcac3ed,0xff9d99b6,0xff726974,0xff978b92,0xff91878b,0xff685235,0xff634b27,0xff68512a,0xff6c5432,0xff7d6950,0xff093517,0x99000000,
577 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a3e1a,0xffb1b7b3,0xff9aa59e,0xff7d8e83,0xff5c7463,0xff36503e,0xff9d96b5,0xffb2a8ce,0xffb5aed2,0xffbab6d6,
578 0xffc2bcdf,0xff746f82,0xff473316,0xff665031,0xff837268,0xff8c829a,0xff665758,0xff594831,0xff59431e,0xff69532d,0xffb6aec5,0xffc2b8d3,0xff9e9096,0xffa3969a,
579 0xffb6adbc,0xffcac1dd,0xff0a3e1f,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff0a3e1a,0xffb2b6b3,0xff9da5a0,0xff828f86,0xff637869,0xff43604d,
580 0xff707283,0xffafaaca,0xffb2accb,0xffb6b1d4,0xffb5afd8,0xff4f423f,0xff5c4624,0xff655135,0xff69553e,0xff584528,0xff57401b,0xff59431f,0xff644e2f,0xff7a6953,
581 0xffc1b6c5,0xffc8c2e0,0xffc2bbdf,0xffc8bfe8,0xffc7c0de,0xffc6bfdc,0xff0a3b1d,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff0a3e1a,0xffafb2af,
582 0xff9da29e,0xff869089,0xff67796d,0xff496352,0xff2c3c36,0xffbbb5d7,0xffa49dbb,0xffc1bae1,0xffa8a1c3,0xff483929,0xff604c2d,0xff604c30,0xff614d2a,0xff6a5533,
583 0xff7c6a56,0xff938587,0xffb4abc0,0xffc5bbdb,0xffbdb3cd,0xffb2a7c4,0xffb4acc7,0xffa398b6,0xffaea5bd,0xffb2a8c2,0xff09381b,0x87000000,0x5a000000,0x36000000,
584 0x17000000,0x2e000000,0xff093c19,0xff093818,0xff083416,0xff072f13,0xff05280f,0xff04210c,0xff021708,0xff08311a,0xff09371b,0xff09391d,0xff09351b,0xff041306,
585 0xff051906,0xff061f0b,0xff072a11,0xff093518,0xff0a3e1e,0xff0a3b1e,0xff09381c,0xff09371b,0xff09341a,0xff09351b,0xff09371b,0xff09361b,0xff09371b,0xff09381c,
586 0xff09371b,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
587 0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,
588 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
589 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,
590 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
591 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
592 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
593 0x18000000,0xf000000
594};
595
596static const QRgb DateTime_data[] = {
597 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3000000,0x6000000,0xb000000,0x12000000,0x19000000,0x21000000,0x29000000,0x2f000000,
598 0x34000000,0x37000000,0x38000000,0x37000000,0x34000000,0x2f000000,0x29000000,0x21000000,0x19000000,0x12000000,0xb000000,0x6000000,0x3000000,0x1000000,
599 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,
600 0x5d3f5669,0x9352718b,0xbe5a7e9c,0xde5c85a5,0xf35c88ac,0xfe5a87ad,0xf3507fa5,0xe047759a,0xc43a6689,0x9f2c5371,0x701b354a,0x3f000000,0x33000000,0x26000000,
601 0x1b000000,0x11000000,0xa000000,0x5000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,
602 0x16000000,0x24000000,0x724a6577,0xbf587790,0xf75e7e98,0xff53728b,0xff476379,0xff3e586e,0xff39536a,0xff365268,0xff335169,0xff335470,0xff325a7a,0xff326085,
603 0xf82f628a,0xc8245277,0x89163652,0x46000000,0x33000000,0x23000000,0x16000000,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,
604 0x2000000,0x7000000,0xe000000,0x1a000000,0x49384d5b,0xab5b798f,0xf762819b,0xff4f6a80,0xff3f5465,0xff435662,0xff74837b,0xffa4af93,0xffcad1a7,0xffcad1a7,
605 0xffc9d1a8,0xffbbc5a2,0xff93a492,0xff4d6a77,0xff234d6f,0xff23547c,0xf81f5684,0xbd134268,0x6d071c2c,0x3f000000,0x2a000000,0x1a000000,0xe000000,0x7000000,
606 0x2000000,0x1000000,0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x614a6174,0xca617f99,0xff5d7991,0xff44596b,0xff475964,0xffb4bc9b,0xfff2f4bb,
607 0xfffeffc1,0xfffeffc1,0xffcfd0a6,0xffbabc9b,0xfff2f4ba,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffe2e8b6,0xff708c8b,0xff174b74,0xff155080,0xd80e426d,0x8508233a,
608 0x47000000,0x2e000000,0x1b000000,0xe000000,0x6000000,0x2000000,0x1000000,0x5000000,0xd000000,0x1a000000,0x614a6174,0xd465839c,0xff5a768c,0xff3e5161,
609 0xff78867d,0xfff2f4bb,0xffd5d7aa,0xffecedb7,0xfffeffc1,0xfffafbbf,0xffadaf93,0xffadaf93,0xffbbbd9b,0xfffeffc1,0xfffeffc1,0xffd5d7aa,0xffebecb6,0xfffeffc1,
610 0xffd2dcb2,0xff2c5d7d,0xff0f4b7c,0xe00d426c,0x8a071f36,0x49000000,0x2e000000,0x1a000000,0xd000000,0x5000000,0x3000000,0xa000000,0x16000000,0x48354a59,
611 0xca64819a,0xff5b778e,0xff3e5060,0xff859183,0xfffeffc1,0xffc1c39f,0xffadaf93,0xffadaf93,0xfffbfcbf,0xfffeffc1,0xffadaf93,0xff0f448d,0xff0f448d,0xff96aeaa,
612 0xffc2c49f,0xffadaf93,0xffadaf93,0xfff8f9be,0xfffeffc1,0xffeff3bc,0xff3b6a84,0xff0f4a7a,0xdb0d3e64,0x7c061723,0x46000000,0x2a000000,0x16000000,0xa000000,
613 0x6000000,0x11000000,0x23000000,0xaa5e7c93,0xff617f98,0xff415465,0xff859183,0xfffeffc1,0xfffeffc1,0xffc9cba3,0xffadaf93,0xffadaf93,0xfff9fabe,0xfffeffc1,
614 0xfffeffc1,0xff0f448d,0xff0f448d,0xffafc1b0,0xffc2c49f,0xffadaf93,0xffadaf93,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffeff4bc,0xff2d6081,0xff124b7a,0xc80d3353,
615 0x61000000,0x3e000000,0x23000000,0x11000000,0xb000000,0x1b000000,0x6f4e697e,0xf6698ba6,0xff4c6477,0xff606f71,0xfffeffc1,0xfff1f3ba,0xfffeffc1,0xfffeffc1,
616 0xffdddfae,0xfff2f4ba,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xff0f448d,0xff0f448d,0xffc8d4b5,0xfffeffc1,0xffdddfae,0xfff3f5bb,0xfffeffc1,0xfffeffc1,0xfffeffc1,
617 0xfffeffc1,0xffd2ddb4,0xff174d78,0xf9174871,0xa2082134,0x55000000,0x33000000,0x1b000000,0x12000000,0x26000000,0xba6384a0,0xff5c7b95,0xff3b4e5e,0xffcdd3a8,
618 0xffb3b596,0xffadaf93,0xffc9cba3,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xff0f448d,0xff0f448d,0xffcdd9b6,0xfffeffc1,0xfffeffc1,
619 0xfffeffc1,0xfffbfcbf,0xffadaf93,0xffadaf93,0xffebecb6,0xfffeffc1,0xff749394,0xff1f4f76,0xd8113553,0x6d000000,0x45000000,0x26000000,0x19000000,0x5d3f5669,
620 0xf56f96b5,0xff4e687d,0xff5e6f70,0xfffeffc1,0xffadaf93,0xffadaf93,0xffb4b697,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffeff3be,0xff0f448d,
621 0xff0f448d,0xffccd8b6,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffdddfae,0xffadaf93,0xffadaf93,0xffd5d7aa,0xfffeffc1,0xffe3eab8,0xff2a5679,0xfa1b476a,0x9b051724,
622 0x56000000,0x33000000,0x21000000,0x9352718b,0xff6e97b8,0xff40586b,0xffa7b095,0xfffeffc1,0xffe6e7b3,0xffb4b697,0xffecedb7,0xfffeffc1,0xfffeffc1,0xfffeffc1,
623 0xfffeffc1,0xfffeffc1,0xffccd8b6,0xff0f448d,0xff0f448d,0xffccd8b6,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffc1c39f,0xffc2c49f,0xfffeffc1,0xfffeffc1,
624 0xfffeffc1,0xff587a88,0xff254e70,0xc30c263b,0x67000000,0x3f000000,0x29000000,0xbe5a7e9c,0xff6b94b6,0xff394f61,0xffe5e8b4,0xfffeffc1,0xfffeffc1,0xfffeffc1,
625 0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffacbeaf,0xff0f448d,0xff0f448d,0xffcdd9b6,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,
626 0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xff9caf9f,0xff2f5674,0xdf15334b,0x75000000,0x4a000000,0x2f000000,0xde5c85a5,0xff6590b3,0xff354c5e,
627 0xfffeffc1,0xffcfd0a6,0xffbbbd9b,0xfff3f5bb,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xff87a2a7,0xff0f448d,0xff0f448d,0xffcdd9b6,
628 0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffd1d2a7,0xffbbbd9b,0xfff2f4ba,0xfffeffc1,0xffc3ceac,0xff3c5d79,0xf01c3f59,0x81000000,0x53000000,
629 0x34000000,0xf35c88ac,0xff5f8cb1,0xff324a5e,0xfffeffc1,0xffadaf93,0xffadaf93,0xffbabc9b,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,
630 0xff5d819e,0xff0f448d,0xff0f448d,0xffcedab7,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfff1f3ba,0xffadaf93,0xffadaf93,0xffbabc9b,0xfffeffc1,0xffd0d9b1,
631 0xff44627b,0xfa224360,0x89000000,0x59000000,0x37000000,0xfe5a87ad,0xff5a88ae,0xff2f485c,0xfffeffc1,0xffadaf93,0xffadaf93,0xffd0d1a7,0xfffeffc1,0xfffeffc1,
632 0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffcedab7,0xff15488e,0xff0f448d,0xffd5dfb8,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffadaf93,
633 0xffadaf93,0xffd6d8ab,0xfffeffc1,0xffd2dab1,0xff47647b,0xfe244662,0x8e000000,0x5e000000,0x38000000,0xf3507fa5,0xff5283aa,0xff2d485e,0xfffeffc1,0xfffeffc1,
634 0xfffafbbf,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xff92abaa,0xff3c6797,0xff436c98,0xfffeffc1,0xfffeffc1,
635 0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffafbbf,0xfffeffc1,0xfffeffc1,0xffd3dab1,0xff4b667c,0xfb24425b,0x90000000,0x5f000000,0x37000000,0xe047759a,
636 0xff4c7ea7,0xff2c4b65,0xfff1f3bb,0xfffeffc1,0xfffeffc1,0xfff3f5bb,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xff0f448d,
637 0xff0f448d,0xff0f448d,0xff0f448d,0xff5c809e,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffbfcbf,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffb6c1a7,0xff4d667b,0xf3213b51,
638 0x8e000000,0x5e000000,0x34000000,0xc43a6689,0xff4378a3,0xff2e5371,0xffbbc6a4,0xfffeffc1,0xffb4b697,0xffadaf93,0xffc1c39f,0xfffeffc1,0xfffeffc1,0xfffeffc1,
639 0xfffeffc1,0xfffeffc1,0xfffeffc1,0xff809da6,0xff164a8f,0xff0f448d,0xff0f448d,0xff0f448d,0xff0f448d,0xffadbeac,0xffadaf93,0xffadaf93,0xffecedb7,0xfffeffc1,
640 0xfffeffc1,0xff90a099,0xff486074,0xe7193143,0x89000000,0x59000000,0x2f000000,0x9f2c5371,0xff3c739f,0xff2d5b7f,0xff768e8a,0xfffeffc1,0xffadaf93,0xffadaf93,
641 0xffb4b697,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfff8fbc0,0xff61859f,0xff0f448d,0xff0f448d,0xff2c5a92,
642 0xffadaf93,0xffadaf93,0xffd5d7aa,0xfffeffc1,0xfff4f6bd,0xff687d89,0xff3b556b,0xd311222f,0x81000000,0x53000000,0x29000000,0x701b354a,0xf7346b98,0xff2d618c,
643 0xff224d71,0xffe2e8b6,0xffe4e5b2,0xffbabc9b,0xfff3f5bb,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,
644 0xfffeffc1,0xfffeffc1,0xff7695a3,0xffecf1bd,0xffc2c49f,0xffc1c39f,0xfffeffc1,0xfffeffc1,0xffc6cdad,0xff596f80,0xfc2b4559,0xb6061118,0x75000000,0x4a000000,
645 0x21000000,0x3f000000,0xc625557b,0xff296391,0xff1f537d,0xff6e8c8d,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffedeeb7,0xffb4b697,0xffc8caa2,0xfffeffc1,0xfffeffc1,
646 0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffe4e5b2,0xffb4b697,0xffc9cba3,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfff5f7be,0xff71838d,0xff485f71,
647 0xe8192d3e,0x93020202,0x67000000,0x3f000000,0x19000000,0x33000000,0x88163752,0xf8225d8d,0xff1b5888,0xff144b76,0xffb3c5a8,0xfffeffc1,0xfffeffc1,0xffb3b596,
648 0xffadaf93,0xffadaf93,0xfff2f4ba,0xfffeffc1,0xffd0d1a7,0xffbabc9b,0xfff3f5bb,0xfffeffc1,0xffb4b697,0xffadaf93,0xffadaf93,0xfff9fabe,0xfffeffc1,0xfffeffc1,
649 0xfffeffc1,0xff9ba79e,0xff596d7e,0xfc2c4558,0xc409151f,0x81000000,0x56000000,0x33000000,0x12000000,0x26000000,0x45000000,0xbc14446a,0xff17578b,0xff104e80,
650 0xff1e537b,0xffd1dcb3,0xfffeffc1,0xffe4e5b2,0xffadaf93,0xffb4b697,0xfffeffc1,0xfffafbbf,0xffadaf93,0xffadaf93,0xffbbbd9b,0xfffeffc1,0xffe6e7b3,0xffadaf93,
651 0xffb3b596,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffa5b0a2,0xff607383,0xff395165,0xe1122432,0x94020202,0x6c000000,0x45000000,0x26000000,0xb000000,0x1b000000,
652 0x33000000,0x6c071c2e,0xd70e446e,0xff105083,0xff0f4c7d,0xff1e547d,0xffb3c6aa,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffadaf93,0xffadaf93,
653 0xffcfd0a6,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffa5b0a2,0xff627584,0xff3e5668,0xee1a2d3f,0xaf040a10,0x7b000000,0x55000000,
654 0x33000000,0x1b000000,0x6000000,0x11000000,0x23000000,0x3e000000,0x8508233a,0xe00e436d,0xff104d7e,0xff0f4b7b,0xff134b79,0xff709195,0xffe3e9b8,0xfffeffc1,
655 0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffd8deb3,0xff869595,0xff5d7181,0xff3d5568,0xf11a3042,
656 0xbd071018,0x85000000,0x60000000,0x3e000000,0x23000000,0x11000000,0x3000000,0xa000000,0x16000000,0x2a000000,0x46000000,0x8a071f36,0xdb0d3e64,0xff104978,
657 0xff144a76,0xff1b4d76,0xff235278,0xff7a9694,0xffbfccab,0xfff2f5bd,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffeaedb9,0xffb9c3a8,0xff809192,0xff5e7282,
658 0xff4f6476,0xff334b5f,0xee182b3d,0xbd071018,0x88000000,0x66000000,0x46000000,0x2a000000,0x16000000,0xa000000,0x1000000,0x5000000,0xd000000,0x1a000000,
659 0x2e000000,0x48000000,0x7b041522,0xc80a3052,0xf90f436d,0xff13456e,0xff19496f,0xff244f71,0xff335978,0xff40617d,0xff47667f,0xff4b687f,0xff4c677c,0xff4f687d,
660 0xff536a7e,0xff536a7c,0xff486072,0xff344d61,0xfc1f3b4e,0xe00e202f,0xaf040a10,0x85000000,0x66000000,0x48000000,0x2e000000,0x1a000000,0xd000000,0x5000000,
661 0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x2e000000,0x46000000,0x60000000,0xa2061f33,0xd7092f4e,0xfa0e3d62,0xff133f64,0xff1b4567,0xff244a68,
662 0xff294c69,0xff2b4c66,0xff2b4b65,0xff2b4962,0xff29465d,0xff224058,0xfc18354c,0xe70d2234,0xc305111b,0x94000000,0x7b000000,0x60000000,0x46000000,0x2e000000,
663 0x1b000000,0xe000000,0x6000000,0x2000000,0xffffff,0x1000000,0x2000000,0x7000000,0xe000000,0x1a000000,0x2a000000,0x3e000000,0x55000000,0x6c000000,
664 0x9b041522,0xc2072137,0xde082943,0xef092e4b,0xf9092f4f,0xfe0a304f,0xfa092b48,0xf208253e,0xe5061f33,0xd1051725,0xb5020c14,0x93000000,0x81000000,0x6c000000,
665 0x55000000,0x3e000000,0x2a000000,0x1a000000,0xe000000,0x7000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,
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,
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,
670 0xffffff,0xffffff
671};
672
673static const QRgb DocsIcon_data[] = {
674 0xffffff,0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff676767,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,0xffffff,
675 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffe4e4e4,0xffbebebe,0xffffffff,0xff676767,0x3c000000,0xc000000,0xffffff,0xffffff,0xffffff,
676 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffdbdbdb,0xff999999,0xffffffff,0xffffffff,0xff676767,0x3c000000,0xc000000,0xffffff,0xffffff,
677 0xffffff,0xffffff,0xff000000,0xfffdfdfd,0xfffdfdfd,0xffd9d9d9,0xff8d8d8d,0xffffffff,0xffffffff,0xffffffff,0xff676767,0x3c000000,0xc000000,0xffffff,
678 0xffffff,0xffffff,0xff000000,0xfffcfcfc,0xfffcfcfc,0xffd7d7d7,0xff8c8c8c,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff676767,0x3c000000,0xc000000,
679 0xffffff,0xffffff,0xff000000,0xfff9f9f9,0xfff8f8f8,0xffdddddd,0xffa7a7a7,0xff8a8a8a,0xff8a8a8a,0xff949494,0xffbababa,0xff000000,0x77000000,0x24000000,
680 0xffffff,0xffffff,0xff000000,0xfff5f5f5,0xfff3f3f3,0xffe9e9e9,0xffd7d7d7,0xffcfcfcf,0xffd0d0d0,0xffd1d1d1,0xffdcdcdc,0xff000000,0x8f000000,0x30000000,
681 0xffffff,0xffffff,0xff000000,0xfff0f0f0,0xffededed,0xffebebeb,0xffe9e9e9,0xffe9e9e9,0xffebebeb,0xffededed,0xfff0f0f0,0xff000000,0x8f000000,0x30000000,
682 0xffffff,0xffffff,0xff000000,0xffebebeb,0xffe7e7e7,0xffe3e3e3,0xffe2e2e2,0xffe2e2e2,0xffe3e3e3,0xffe7e7e7,0xffebebeb,0xff000000,0x8f000000,0x30000000,
683 0xffffff,0xffffff,0xff000000,0xffe5e5e5,0xffe0e0e0,0xffdcdcdc,0xffdadada,0xffdadada,0xffdcdcdc,0xffe0e0e0,0xffe5e5e5,0xff000000,0x8f000000,0x30000000,
684 0xffffff,0xffffff,0xff000000,0xffdfdfdf,0xffd8d8d8,0xffd3d3d3,0xffd1d1d1,0xffd1d1d1,0xffd3d3d3,0xffd8d8d8,0xffdfdfdf,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,
687 0xffffff,0xffffff,0x24000000,0x6b000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x6b000000,0x24000000
688};
689
690static const QRgb DocumentTypeExcel_data[] = {
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,
693 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000500,0x2000500,0x5000500,0x9000500,0x10000500,0x18000500,0x22000500,
694 0x2c000500,0x36000500,0x3f000500,0x45000500,0x4a000500,0x4d000500,0x4e000500,0x4e000500,0x4e000500,0x4c000500,0x49000500,0x45000500,0x3f000500,0x37000500,
695 0x2e000500,0x25000500,0x1c000500,0x13000500,0xd000500,0x8000500,0x4000500,0x2000500,0xffffff,0xffffff,0xffffff,0x1000500,0x3000500,0x7000500,
696 0xd000500,0x16000500,0x22000500,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
697 0xff000000,0xff000000,0xfd373737,0x72545754,0x44000500,0x37000500,0x2b000500,0x1f000500,0x15000500,0xd000500,0x8000500,0x4000500,0xffffff,0xffffff,
698 0xffffff,0x1000500,0x4000500,0x9000500,0x11000500,0x1d000500,0x2c000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,
699 0xfffefefe,0xfffdfdfd,0xfffafafa,0xfff5f5f5,0xffededed,0xffe3e3e3,0xffd1d1d1,0xfd363636,0x76404240,0x4e000500,0x3d000500,0x2e000500,0x21000500,0x16000500,
700 0xe000500,0x8000500,0xffffff,0xffffff,0xffffff,0x2000500,0x5000500,0xb000500,0x15000500,0x24000500,0x36000500,0xff000000,0xffffffff,0xffffffff,
701 0xffffffff,0xffffffff,0xfffefefe,0xfffefefe,0xfffdfdfd,0xfffdfdfd,0xfff8f8f8,0xfff0f0f0,0xffe3e3e3,0xffd4d4d4,0xfffefefe,0xffbebebe,0xfd383838,0x803e403e,
702 0x53000500,0x40000500,0x2f000500,0x21000500,0x16000500,0xd000500,0xffffff,0xffffff,0xffffff,0x2000500,0x6000500,0xd000500,0x18000500,0x29000500,
703 0x3f000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffdfdfd,0xfffdfdfd,0xfffbfbfb,0xfff6f6f6,0xffededed,0xffdbdbdb,0xffc6c6c6,
704 0xffffffff,0xfffdfdfd,0xffaeaeae,0xfd3b3b3b,0x7e353735,0x55000500,0x41000500,0x2f000500,0x20000500,0x15000500,0xffffff,0xffffff,0x1000500,0x2000500,
705 0x6000500,0xe000500,0x1b000500,0x2d000500,0x45000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfffafafa,
706 0xfff4f4f4,0xffe8e8e8,0xffd5d5d5,0xffbababa,0xffffffff,0xffffffff,0xfffdfdfd,0xffa3a3a3,0xfd3e3e3e,0x7a2a2d2a,0x55000500,0x40000500,0x2d000500,0x1e000500,
707 0xffffff,0xffffff,0x1000500,0x2000500,0x7000500,0xf000500,0x1d000500,0x30000500,0x4a000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
708 0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfff8f8f8,0xfff3f3f3,0xffe7e7e7,0xffd1d1d1,0xffb4b4b4,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff9d9d9d,0xfd454545,
709 0x782b2b2b,0x52000500,0x3c000500,0x29000500,0xffffff,0xffffff,0x1000500,0x3000500,0x7000500,0x10000500,0x1e000500,0x32000500,0x4d000500,0xff000000,
710 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffcfcfc,0xfffbfbfb,0xfff8f8f8,0xfff3f3f3,0xffe6e6e6,0xffd1d1d1,0xffb3b3b3,0xffffffff,0xffffffff,
711 0xffffffff,0xffffffff,0xfff9f9f9,0xff9e9e9e,0xfc4c4c4c,0x701f231f,0x4c000500,0x36000500,0x1000000,0x2000000,0x5000000,0x9000000,0xf000000,0x18000000,
712 0x27000000,0x3b000000,0x55000600,0xff000000,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7,0xfff8f8f8,0xfff6f6f6,0xfff7f7f7,0xfff7f7f7,0xfff6f6f6,0xfff2f2f2,0xffe8e8e8,
713 0xffd4d4d4,0xffb9b9b9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xffa1a1a1,0xfb545454,0x5c000500,0x42000500,0x4000000,0x7000000,
714 0xd000000,0x16000000,0x1e000000,0x2a000000,0x39000000,0x4d000000,0x65000000,0xff000000,0xffe3e3e3,0xffe3e3e3,0xffe5e5e5,0xffe8e8e8,0xffe8e8e8,0xffebebeb,
715 0xffefefef,0xfff3f3f3,0xfff0f0f0,0xffeaeaea,0xffdddddd,0xffc9c9c9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xff3e3e3e,
716 0x6a000500,0x4e000500,0x7000000,0xf000000,0x1b000000,0x2b000000,0x39000000,0x49000000,0x58000000,0x69000000,0x7e000500,0xff000000,0xffc4c4c4,0xffc4c4c4,
717 0xffc6c6c6,0xffcccccc,0xffd3d3d3,0xffdbdbdb,0xffe6e6e6,0xffececec,0xffefefef,0xffefefef,0xffe7e7e7,0xffc5c5c5,0xff9f9f9f,0xff7f7f7f,0xff6f6f6f,0xff6b6b6b,
718 0xff717171,0xff8c8c8c,0xffb5b5b5,0xff000000,0x76000500,0x58000500,0xc000000,0x19000000,0xfff1656a,0xffec6165,0xffef9699,0xffe56c70,0xffde5157,0xffe26469,
719 0xffe88b8d,0xffdb4348,0xffe36d72,0xffe67f83,0xffe14b50,0xffe2292f,0xffe3252d,0xffc4c4c4,0xffd7d7d7,0xffe5e5e5,0xffeeeeee,0xfff2f2f2,0xffcfcfcf,0xffa0a0a0,
720 0xff8d8d8d,0xff828282,0xff828282,0xff7d7d7d,0xff717171,0xff707070,0xff747474,0xff000000,0x80000500,0x60000500,0x12000000,0x26000000,0xffee6266,0xfff1a8aa,
721 0xffffffff,0xffedbdbe,0xffcb474b,0xffeababb,0xffffffff,0xffdf9699,0xffedc1c2,0xffffffff,0xffdd787a,0xffd22329,0xffd6232a,0xffa7a7a7,0xffc6c6c6,0xffdcdcdc,
722 0xffececec,0xffd9d9d9,0xffababab,0xff9a9a9a,0xffa4a4a4,0xffc0c0c0,0xffcecece,0xffcfcfcf,0xffc4c4c4,0xff919191,0xff6e6e6e,0xff000000,0x87000500,0x66000500,
723 0x17000000,0x2f000000,0xffec5e62,0xffe36d71,0xfffefbfb,0xfffefcfc,0xffc87578,0xfffdfcfc,0xfffdfbfb,0xffb94b4f,0xffe6bebf,0xffffffff,0xffcf7477,0xffc22025,
724 0xffc92227,0xff919191,0xffb6b6b6,0xffd6d6d6,0xffdedede,0xffbdbdbd,0xffa8a8a8,0xffb5b5b5,0xffe6e6e6,0xfff3f3f3,0xfff7f7f7,0xfff3f3f3,0xffd1d1d1,0xffe7e7e7,
725 0xff9f9f9f,0xff000000,0x8b000500,0x6a000500,0x1b000000,0x37000000,0xffec5a5f,0xffdd5056,0xffecbebf,0xffffffff,0xfff3e7e8,0xffffffff,0xffdab6b6,0xff9e2327,
726 0xffe2bdbd,0xffffffff,0xffc57375,0xffb41e23,0xffbe2025,0xff7e7e7e,0xffacacac,0xffcecece,0xffcbcbcb,0xffb3b3b3,0xffb1b1b1,0xffe3e3e3,0xfffafafa,0xfff8f8f8,
727 0xfff7f7f7,0xffafafaf,0xff7a7a7a,0xffb6b6b6,0xffe1e1e1,0xff000000,0x8e000500,0x6d000500,0x1d000000,0x3c000000,0xffec565b,0xffde4c50,0xffd26265,0xfffefdfd,
728 0xffffffff,0xfffdfdfd,0xffa0494b,0xff951b1f,0xffdfbbbc,0xffffffff,0xffbf7274,0xffaa1d20,0xffb61e23,0xff737373,0xffa5a5a5,0xffc8c8c8,0xffc0c0c0,0xffb2b2b2,
729 0xffc5c5c5,0xfff5f5f5,0xfffbfbfb,0xfffafafa,0xffb6b6b6,0xff7c7c7c,0xff777777,0xff9b9b9b,0xffefefef,0xff000000,0x8f000500,0x6e000500,0x1f000000,0x3e000000,
730 0xffee5056,0xffe1484c,0xffcb3c40,0xfff6ebeb,0xffffffff,0xfff3e9e9,0xff891a1d,0xff91191d,0xffddbbbc,0xffffffff,0xffbd7274,0xffa41b20,0xffb11d22,0xff6e6e6e,
731 0xffa2a2a2,0xffc5c5c5,0xffbababa,0xffb2b2b2,0xffcecece,0xfffdfdfd,0xfffcfcfc,0xffbababa,0xff828282,0xff7a7a7a,0xff808080,0xffe4e4e4,0xffffffff,0xff000000,
732 0x90000500,0x6e000500,0x1f000000,0x3d000000,0xffef4c51,0xffe14247,0xffd76468,0xfffffefe,0xffffffff,0xfffefefe,0xffa04f51,0xff8e171b,0xffddbbbc,0xffffffff,
733 0xffb97174,0xff9f1b1f,0xffab1d22,0xff6d6d6d,0xffa1a1a1,0xffc5c5c5,0xffbdbdbd,0xffaeaeae,0xffc6c6c6,0xfff9f9f9,0xffbcbcbc,0xff868686,0xff7e7e7e,0xff777777,
734 0xff747474,0xffa4a4a4,0xfff4f4f4,0xff000000,0x90000500,0x6f000500,0x1f000000,0x3e000000,0xffed464b,0xffdf3c41,0xffefc9cb,0xffffffff,0xfff5eded,0xffffffff,
735 0xffddc4c4,0xff88171b,0xffdbbbbc,0xffffffff,0xffb57072,0xff95191e,0xffa21b1f,0xff6b6b6b,0xff9f9f9f,0xffc7c7c7,0xffc6c6c6,0xffa8a8a8,0xffadadad,0xffeaeaea,
736 0xffb9b9b9,0xff7e7e7e,0xff9b9b9b,0xff9a9a9a,0xff696969,0xff676767,0xff939393,0xff000000,0x90000500,0x6f000500,0x1f000000,0x3e000000,0xffec3e42,0xffe4696d,
737 0xffffffff,0xffffffff,0xffbb7b7d,0xffffffff,0xffffffff,0xffa4575a,0xffdabbbc,0xffffffff,0xffe5d1d2,0xffdbbbbc,0xff9a1a1e,0xff6a6a6a,0xff9d9d9d,0xffc7c7c7,
738 0xffd4d4d4,0xffa8a8a8,0xff949494,0xffb5b5b5,0xfff0f0f0,0xffc5c5c5,0xffebebeb,0xfffcfcfc,0xff9e9e9e,0xff686868,0xff686868,0xff000000,0x90000500,0x6f000500,
739 0x1d000000,0x3c000000,0xffe9353c,0xffe77a7e,0xfffdf8f8,0xffe9c9ca,0xff95191d,0xffe2c8c9,0xfffbf8f8,0xffb47173,0xffdabbbc,0xffffffff,0xffffffff,0xffffffff,
740 0xff96191d,0xff6d6d6d,0xffa0a0a0,0xffc6c6c6,0xffe3e3e3,0xffc5c5c5,0xff8d8d8d,0xff818181,0xffa5a5a5,0xffdddddd,0xffe8e8e8,0xffeaeaea,0xffcbcbcb,0xff707070,
741 0xff696969,0xff000000,0x90000500,0x6f000500,0x1b000000,0x37000000,0xffe82e34,0xffdc242b,0xffcc353b,0xffbd4043,0xffa31b20,0xffaa3d41,0xff9e2e33,0xff96191d,
742 0xff95191e,0xff8e171d,0xff8d171b,0xff92191d,0xff981a1e,0xff7a7a7a,0xffa5a5a5,0xffc9c9c9,0xffe4e4e4,0xffeeeeee,0xffb7b7b7,0xff7d7d7d,0xff767676,0xff797979,
743 0xff868686,0xff868686,0xff7c7c7c,0xff6d6d6d,0xff6d6d6d,0xff000000,0x90000500,0x6f000500,0x17000000,0x2f000000,0xffe8272e,0xffdb242a,0xffcd2229,0xffbf1f25,
744 0xffb31e23,0xffaf1d23,0xffa91d20,0xffa61d20,0xffa41b20,0xff9e1b1f,0xff9c1a1e,0xff9d1a1f,0xffa01a20,0xff8d8d8d,0xffb2b2b2,0xffd1d1d1,0xffe3e3e3,0xfff3f3f3,
745 0xfff5f5f5,0xffc7c7c7,0xff969696,0xff727272,0xff727272,0xff727272,0xff727272,0xff939393,0xffbebebe,0xff000000,0x90000500,0x6e000500,0x12000000,0x26000000,
746 0x41000000,0x64000000,0x7f000000,0x98000000,0xa9000000,0xb5000000,0xbf000000,0xff000000,0xff6e6e6e,0xff6d6d6d,0xff737373,0xff7d7d7d,0xff8d8d8d,0xffa6a6a6,
747 0xffc3c3c3,0xffd7d7d7,0xffe8e8e8,0xffefefef,0xfff7f7f7,0xfff9f9f9,0xffebebeb,0xffd7d7d7,0xffc9c9c9,0xffc9c9c9,0xffd6d6d6,0xffeaeaea,0xfffafafa,0xff000000,
748 0x8e000500,0x6d000500,0xc000000,0x18000000,0x2b000000,0x41000000,0x55000000,0x68000000,0x78000000,0x88000000,0x98000000,0xff000000,0xffa3a3a3,0xffa2a2a2,
749 0xffa5a5a5,0xffadadad,0xffb6b6b6,0xffc4c4c4,0xffd6d6d6,0xffe3e3e3,0xffededed,0xfff2f2f2,0xfff4f4f4,0xfff5f5f5,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,
750 0xfff8f8f8,0xfff7f7f7,0xfff4f4f4,0xff000000,0x8c000500,0x6b000500,0x7000000,0xf000000,0x19000000,0x27000000,0x34000000,0x43000000,0x52000000,0x63000000,
751 0x76000000,0xff000000,0xffcbcbcb,0xffcbcbcb,0xffcdcdcd,0xffd1d1d1,0xffd6d6d6,0xffdcdcdc,0xffe6e6e6,0xffececec,0xfff2f2f2,0xfff5f5f5,0xfff6f6f6,0xfff6f6f6,
752 0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xff000000,0x87000500,0x68000500,0x4000000,0x7000000,0xd000000,0x14000000,
753 0x1c000000,0x28000000,0x35000000,0x47000000,0x5c000600,0xff000000,0xffe5e5e5,0xffe5e5e5,0xffe7e7e7,0xffe8e8e8,0xffe8e8e8,0xffececec,0xfff1f1f1,0xfff3f3f3,
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,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7,0xfff8f8f8,
756 0xfff8f8f8,0xfffafafa,0xfffcfcfc,0xfffdfdfd,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
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,
759 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x63000500,0x4c000500,0xffffff,0xffffff,0xffffff,0x1000500,0x4000500,0x9000500,
760 0x11000500,0x1d000500,0x2c000500,0x3e000500,0x51000500,0x63000500,0x73000500,0x7f000500,0x87000500,0x8c000500,0x8e000500,0x90000500,0x90000500,0x90000500,
761 0x90000500,0x90000500,0x90000500,0x90000500,0x8e000500,0x8c000500,0x87000500,0x7f000500,0x73000500,0x63000500,0x51000500,0x3e000500,0xffffff,0xffffff,
762 0xffffff,0x1000500,0x3000500,0x7000500,0xd000500,0x16000500,0x22000500,0x30000500,0x3e000500,0x4c000500,0x58000500,0x61000500,0x68000500,0x6b000500,
763 0x6d000500,0x6e000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6e000500,0x6d000500,0x6b000500,0x68000500,0x61000500,0x58000500,0x4c000500,
764 0x3e000500,0x30000500
765};
766
767static const QRgb DocumentTypeNone_data[] = {
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,
770 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000500,0x2000500,0x5000500,0x9000500,0x10000500,0x18000500,0x22000500,
771 0x2c000500,0x36000500,0x3f000500,0x45000500,0x4a000500,0x4d000500,0x4e000500,0x4e000500,0x4e000500,0x4c000500,0x49000500,0x45000500,0x3f000500,0x37000500,
772 0x2e000500,0x25000500,0x1c000500,0x13000500,0xd000500,0x8000500,0x4000500,0x2000500,0xffffff,0xffffff,0xffffff,0x1000500,0x3000500,0x7000500,
773 0xd000500,0x16000500,0x22000500,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
774 0xff000000,0xff000000,0xfd373737,0x72545754,0x44000500,0x37000500,0x2b000500,0x1f000500,0x15000500,0xd000500,0x8000500,0x4000500,0xffffff,0xffffff,
775 0xffffff,0x1000500,0x4000500,0x9000500,0x11000500,0x1d000500,0x2c000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,
776 0xfffefefe,0xfffdfdfd,0xfffafafa,0xfff5f5f5,0xffededed,0xffe3e3e3,0xffd1d1d1,0xfd363636,0x76404240,0x4e000500,0x3d000500,0x2e000500,0x21000500,0x16000500,
777 0xe000500,0x8000500,0xffffff,0xffffff,0xffffff,0x2000500,0x5000500,0xb000500,0x15000500,0x24000500,0x36000500,0xff000000,0xfffefefe,0xfffefefe,
778 0xffffffff,0xffffffff,0xfffefefe,0xfffefefe,0xfffdfdfd,0xfffdfdfd,0xfff8f8f8,0xfff0f0f0,0xffe3e3e3,0xffd4d4d4,0xfffefefe,0xffbebebe,0xfd383838,0x803e403e,
779 0x53000500,0x40000500,0x2f000500,0x21000500,0x16000500,0xd000500,0xffffff,0xffffff,0xffffff,0x3000500,0x7000500,0xe000500,0x19000500,0x2a000500,
780 0x40000500,0xff000000,0xfffdfdfd,0xfffdfdfd,0xfffdfdfd,0xfffdfdfd,0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfffbfbfb,0xfff6f6f6,0xffededed,0xffdbdbdb,0xffc6c6c6,
781 0xffffffff,0xfffdfdfd,0xffaeaeae,0xfd3b3b3b,0x7e353735,0x55000500,0x41000500,0x2f000500,0x20000500,0x15000500,0x1000500,0x1000500,0x3000500,0x4000500,
782 0x9000500,0x11000500,0x1e000500,0x2f000500,0x47000500,0xff000000,0xfff9f9f9,0xfffafafa,0xfffafafa,0xfffbfbfb,0xfffafafa,0xfffbfbfb,0xfffafafa,0xfff9f9f9,
783 0xfff3f3f3,0xffe8e8e8,0xffd5d5d5,0xffbababa,0xffffffff,0xffffffff,0xfffdfdfd,0xffa3a3a3,0xfd3e3e3e,0x7a2a2d2a,0x55000500,0x40000500,0x2d000500,0x1e000500,
784 0x2000500,0x3000500,0x5000500,0x7000500,0xd000500,0x16000500,0x23000500,0x36000500,0x50000500,0xff000000,0xfff3f3f3,0xfff3f3f3,0xfff4f4f4,0xfff6f6f6,
785 0xfff6f6f6,0xfff7f7f7,0xfff8f8f8,0xfff6f6f6,0xfff1f1f1,0xffe6e6e6,0xffd1d1d1,0xffb4b4b4,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff9d9d9d,0xfd454545,
786 0x782b2b2b,0x52000500,0x3c000500,0x29000500,0x4000500,0x6000500,0x9000500,0xd000500,0x13000500,0x1c000500,0x2a000500,0x3e000500,0x57000500,0xff000000,
787 0xffe7e7e7,0xffe8e8e8,0xffebebeb,0xffeeeeee,0xffeeeeee,0xfff1f1f1,0xfff3f3f3,0xfff3f3f3,0xfff0f0f0,0xffe4e4e4,0xffd0d0d0,0xffb3b3b3,0xffffffff,0xffffffff,
788 0xffffffff,0xffffffff,0xfff9f9f9,0xff9e9e9e,0xfc4c4c4c,0x701f231f,0x4c000500,0x36000500,0x8000500,0xb000500,0xf000500,0x15000500,0x1a000500,0x25000500,
789 0x33000500,0x47000500,0x5f000500,0xff000000,0xffd7d7d7,0xffd9d9d9,0xffdddddd,0xffe1e1e1,0xffe4e5e4,0xffe9eae9,0xffedeeed,0xffefefef,0xffeeeeee,0xffe6e6e6,
790 0xffd3d3d3,0xffb9b9b9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xffa1a1a1,0xfb545454,0x5c000500,0x42000500,0xc000500,0x11000500,
791 0x17000500,0x1e000500,0x25000500,0x30000500,0x3f000500,0x51000500,0x69000500,0xff000300,0xffc0c1c0,0xffc4c5c4,0xffcacaca,0xffd1d1d1,0xffd7d7d7,0xffdfdfdf,
792 0xffe6e6e6,0xffececec,0xffecedec,0xffe7e8e7,0xffdcdcdc,0xffc8c8c8,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xff3e3e3e,
793 0x6a000500,0x4e000500,0x11000500,0x18000500,0x20000500,0x29000500,0x32000500,0x3d000500,0x4c000500,0x5d000500,0x74000500,0xff000300,0xffa5a6a5,0xffacadac,
794 0xffb4b5b4,0xffbebfbe,0xffc8c8c8,0xffd3d3d3,0xffdedede,0xffe6e6e6,0xffebebeb,0xffebeceb,0xffe4e4e4,0xffc4c4c4,0xff9f9f9f,0xff7f7f7f,0xff6f6f6f,0xff6b6b6b,
795 0xff717171,0xff8c8c8c,0xffb5b5b5,0xff000000,0x76000500,0x58000500,0x16000500,0x1f000500,0xf8fefefe,0xf0fcfcfc,0xecfafafa,0xecf8f8f8,0xedf7f7f7,0xeff5f5f5,
796 0xf1f3f3f3,0xffe8e8e8,0xfff3f3f3,0xfff4f4f4,0xfff6f6f6,0xfff9f9f9,0xfffdfdfd,0xffc7c8c7,0xffd6d6d6,0xffe1e1e1,0xffebebeb,0xffeeeeee,0xffcccccc,0xff9f9f9f,
797 0xff8d8d8d,0xff828282,0xff828282,0xff7d7d7d,0xff717171,0xff707070,0xff747474,0xff000000,0x80000500,0x60000500,0x1b000500,0x26000500,0xf0fcfcfc,0xe0f6f6f6,
798 0xd8efefef,0xd8ebebeb,0xdbe8e8e8,0xdfe3e3e3,0xe3e0e1e0,0xffcbcccb,0xffdedede,0xffe1e1e1,0xffe6e6e6,0xffefefef,0xfff9f9f9,0xffbbbbbb,0xffcdcecd,0xffdddddd,
799 0xffe9eae9,0xffd6d6d6,0xffa8a8a8,0xff9a9a9a,0xffa4a4a4,0xffc0c0c0,0xffcecece,0xffcfcfcf,0xffc4c4c4,0xff919191,0xff6e6e6e,0xff000000,0x87000500,0x66000500,
800 0x1f000500,0x2c000500,0xecfafafa,0xd8f0f0f0,0xcee5e5e5,0xcedfdfdf,0xd3dadada,0xd7d7d7d7,0xddd1d2d1,0xffbabbba,0xffcccccc,0xffd1d1d1,0xffd7d7d7,0xffe6e6e6,
801 0xfff5f6f5,0xffb0b1b0,0xffc5c5c5,0xffdadada,0xffdddddd,0xffbababa,0xffa4a4a4,0xffb4b4b4,0xffe6e6e6,0xfff3f3f3,0xfff7f7f7,0xfff3f3f3,0xffd1d1d1,0xffe7e7e7,
802 0xff9f9f9f,0xff000000,0x8b000500,0x6a000500,0x22000500,0x30000500,0xebf9f9f9,0xd6ededed,0xcde0e0e0,0xcedadada,0xd3d5d5d5,0xd8d1d1d1,0xddcdcdcd,0xffb6b7b6,
803 0xffc4c4c4,0xffc8c9c8,0xffd1d1d1,0xffe1e1e1,0xfff4f4f4,0xffa8a9a8,0xffc1c1c1,0xffd6d6d6,0xffcbcbcb,0xffb0b0b0,0xffadadad,0xffe2e2e2,0xfff9f9f9,0xfff8f8f8,
804 0xfff7f7f7,0xffafafaf,0xff7a7a7a,0xffb6b6b6,0xffe1e1e1,0xff000000,0x8e000500,0x6d000500,0x25000500,0x33000500,0xebf8f8f8,0xd7ebeceb,0xcededede,0xd0d7d7d7,
805 0xd5d4d4d4,0xdad0d0d0,0xdfcbcbcb,0xffb6b7b6,0xffc0c1c0,0xffc4c4c4,0xffcccdcc,0xffdedede,0xfff3f3f3,0xffa3a4a3,0xffbdbdbd,0xffd1d1d1,0xffc0c0c0,0xffafafaf,
806 0xffc1c1c1,0xfff3f3f3,0xfffafafa,0xfffafafa,0xffb6b6b6,0xff7c7c7c,0xff777777,0xff9b9b9b,0xffefefef,0xff000000,0x8f000500,0x6e000500,0x26000500,0x35000500,
807 0xebf8f8f8,0xd7ebebeb,0xcedddedd,0xd1d7d7d7,0xd6d3d3d3,0xdbcfcfcf,0xe0cbcbcb,0xffb6b7b6,0xffbebebe,0xffc2c3c2,0xffcbcbcb,0xffdddddd,0xfff3f3f3,0xffa0a1a0,
808 0xffbbbbbb,0xffcfcfcf,0xffbbbbbb,0xffaeaeae,0xffcacaca,0xfffafafa,0xfffbfbfb,0xffbababa,0xff828282,0xff7a7a7a,0xff808080,0xffe4e4e4,0xffffffff,0xff000000,
809 0x90000500,0x6e000500,0x26000500,0x35000500,0xebf8f8f8,0xd7ebebeb,0xcedddedd,0xd1d7d7d7,0xd6d3d3d3,0xdbcfcfcf,0xe0cbcbcb,0xffb6b7b6,0xffbebebe,0xffc2c3c2,
810 0xffcbcbcb,0xffdddddd,0xfff3f3f3,0xffa0a1a0,0xffbbbbbb,0xffd0d0d0,0xffbdbdbd,0xffabacab,0xffc2c2c2,0xfff7f7f7,0xffbbbbbb,0xff868686,0xff7e7e7e,0xff777777,
811 0xff747474,0xffa4a4a4,0xfff4f4f4,0xff000000,0x90000500,0x6f000500,0x25000500,0x33000500,0xebf8f8f8,0xd7ebeceb,0xcededede,0xd0d7d7d7,0xd5d4d4d4,0xdad0d0d0,
812 0xdfcbcbcb,0xffb6b7b6,0xffc0c1c0,0xffc4c4c4,0xffcccdcc,0xffdedede,0xfff3f3f3,0xffa3a4a3,0xffbdbdbd,0xffd3d3d3,0xffc8c8c8,0xffa5a5a5,0xffa9a9a9,0xffe8e8e8,
813 0xffb8b8b8,0xff7e7e7e,0xff9b9b9b,0xff9a9a9a,0xff696969,0xff676767,0xff939393,0xff000000,0x90000500,0x6f000500,0x22000500,0x30000500,0xebf9f9f9,0xd6ededed,
814 0xcde0e0e0,0xcedadada,0xd3d5d5d5,0xd8d1d1d1,0xddcdcdcd,0xffb6b7b6,0xffc4c4c4,0xffc8c9c8,0xffd1d1d1,0xffe1e1e1,0xfff4f4f4,0xffa8a9a8,0xffc0c0c0,0xffd7d7d7,
815 0xffd7d7d7,0xffa5a5a5,0xff919191,0xffb4b4b4,0xffefefef,0xffc5c5c5,0xffebebeb,0xfffcfcfc,0xff9e9e9e,0xff686868,0xff686868,0xff000000,0x90000500,0x6f000500,
816 0x1f000500,0x2c000500,0xecfafafa,0xd8f0f0f0,0xcee5e5e5,0xcedfdfdf,0xd3dadada,0xd7d7d7d7,0xddd1d2d1,0xffbabbba,0xffcccccc,0xffd1d1d1,0xffd7d7d7,0xffe6e6e6,
817 0xfff5f6f5,0xffb0b1b0,0xffc5c6c5,0xffd7d7d7,0xffe7e8e7,0xffc4c4c4,0xff8a8a8a,0xff808080,0xffa5a5a5,0xffdddddd,0xffe8e8e8,0xffeaeaea,0xffcbcbcb,0xff707070,
818 0xff696969,0xff000000,0x90000500,0x6f000500,0x1b000500,0x26000500,0xf0fcfcfc,0xe0f6f6f6,0xd8efefef,0xd8ebebeb,0xdbe8e8e8,0xdfe3e3e3,0xe3e0e1e0,0xffcbcccb,
819 0xffdedede,0xffe1e1e1,0xffe6e6e6,0xffefefef,0xfff9f9f9,0xffbbbcbb,0xffcccdcc,0xffdadbda,0xffe8e9e8,0xffedeeed,0xffb5b5b5,0xff7c7c7c,0xff767676,0xff797979,
820 0xff868686,0xff868686,0xff7c7c7c,0xff6d6d6d,0xff6d6d6d,0xff000000,0x90000500,0x6f000500,0x16000500,0x1f000500,0xf8fefefe,0xf0fcfcfc,0xecfafafa,0xecf8f8f8,
821 0xedf7f7f7,0xeff5f5f5,0xf1f3f3f3,0xffe8e8e8,0xfff3f3f3,0xfff4f4f4,0xfff6f6f6,0xfff9f9f9,0xfffdfdfd,0xffc6c7c6,0xffd5d6d5,0xffe0e0e0,0xffe8e8e8,0xfff2f2f2,
822 0xfff2f2f2,0xffc6c6c6,0xff969696,0xff727272,0xff727272,0xff727272,0xff727272,0xff939393,0xffbebebe,0xff000000,0x90000500,0x6e000500,0x11000500,0x18000500,
823 0x20000500,0x29000500,0x32000500,0x3d000500,0x4c000500,0x5d000500,0x73000500,0xff000300,0xffa5a6a5,0xffacadac,0xffb4b5b4,0xffbebfbe,0xffc7c8c7,0xffd2d3d2,
824 0xffdddddd,0xffe6e6e6,0xffededed,0xffeeeeee,0xfff4f4f4,0xfff8f8f8,0xffebebeb,0xffd7d7d7,0xffc9c9c9,0xffc9c9c9,0xffd6d6d6,0xffeaeaea,0xfffafafa,0xff000000,
825 0x8e000500,0x6d000500,0xc000500,0x11000500,0x17000500,0x1e000500,0x25000500,0x30000500,0x3f000500,0x51000500,0x68000500,0xff000300,0xffc0c1c0,0xffc4c5c4,
826 0xffcacaca,0xffd1d1d1,0xffd7d7d7,0xffdedede,0xffe6e6e6,0xffebebeb,0xffefefef,0xfff1f1f1,0xfff3f3f3,0xfff4f4f4,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,
827 0xfff8f8f8,0xfff7f7f7,0xfff4f4f4,0xff000000,0x8c000500,0x6b000500,0x8000500,0xb000500,0xf000500,0x14000500,0x1a000500,0x24000500,0x32000500,0x44000500,
828 0x5c000500,0xff000000,0xffd7d7d7,0xffd9d9d9,0xffdddddd,0xffe1e1e1,0xffe3e4e3,0xffe8e8e8,0xffecedec,0xfff0f0f0,0xfff3f3f3,0xfff4f4f4,0xfff5f5f5,0xfff6f6f6,
829 0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xff000000,0x87000500,0x68000500,0x4000500,0x6000500,0x9000500,0xc000500,
830 0x12000500,0x1a000500,0x28000500,0x39000500,0x50000500,0xff000000,0xffe7e7e7,0xffe8e8e8,0xffebebeb,0xffeeeeee,0xffeeeeee,0xfff0f0f0,0xfff3f3f3,0xfff4f4f4,
831 0xfff6f6f6,0xfff7f7f7,0xfff7f7f7,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xff000000,0x7f000500,0x61000500,
832 0x2000500,0x3000500,0x4000500,0x7000500,0xc000500,0x14000500,0x1e000500,0x30000500,0x45000500,0xff000000,0xfff3f3f3,0xfff3f3f3,0xfff4f4f4,0xfff6f6f6,
833 0xfff8f8f8,0xfff9f9f9,0xfffbfbfb,0xfffdfdfd,0xfffdfdfd,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
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,
836 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x63000500,0x4c000500,0xffffff,0xffffff,0xffffff,0x2000500,0x5000500,0xa000500,
837 0x12000500,0x1e000500,0x2d000500,0x3f000500,0x52000500,0x64000500,0x74000500,0x80000500,0x87000500,0x8c000500,0x8e000500,0x90000500,0x90000500,0x90000500,
838 0x90000500,0x90000500,0x90000500,0x90000500,0x8e000500,0x8c000500,0x87000500,0x7f000500,0x73000500,0x63000500,0x51000500,0x3e000500,0xffffff,0xffffff,
839 0xffffff,0x1000500,0x3000500,0x7000500,0xd000500,0x16000500,0x22000500,0x30000500,0x3e000500,0x4c000500,0x58000500,0x61000500,0x68000500,0x6b000500,
840 0x6d000500,0x6e000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6e000500,0x6d000500,0x6b000500,0x68000500,0x61000500,0x58000500,0x4c000500,
841 0x3e000500,0x30000500
842};
843
844static const QRgb DocumentTypePowerPoint_data[] = {
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,
847 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000500,0x2000500,0x5000500,0x9000500,0x10000500,0x18000500,0x22000500,
848 0x2c000500,0x36000500,0x3f000500,0x45000500,0x4a000500,0x4d000500,0x4e000500,0x4e000500,0x4e000500,0x4c000500,0x49000500,0x45000500,0x3f000500,0x37000500,
849 0x2e000500,0x25000500,0x1c000500,0x13000500,0xd000500,0x8000500,0x4000500,0x2000500,0xffffff,0xffffff,0xffffff,0x1000500,0x3000500,0x7000500,
850 0xd000500,0x16000500,0x22000500,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
851 0xff000000,0xff000000,0xfd373737,0x72545754,0x44000500,0x37000500,0x2b000500,0x1f000500,0x15000500,0xd000500,0x8000500,0x4000500,0xffffff,0xffffff,
852 0xffffff,0x1000500,0x4000500,0x9000500,0x11000500,0x1d000500,0x2c000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,
853 0xfffefefe,0xfffdfdfd,0xfffafafa,0xfff5f5f5,0xffededed,0xffe3e3e3,0xffd1d1d1,0xfd363636,0x76404240,0x4e000500,0x3d000500,0x2e000500,0x21000500,0x16000500,
854 0xe000500,0x8000500,0xffffff,0xffffff,0xffffff,0x2000500,0x5000500,0xb000500,0x15000500,0x24000500,0x36000500,0xff000000,0xffffffff,0xffffffff,
855 0xffffffff,0xffffffff,0xfffefefe,0xfffefefe,0xfffdfdfd,0xfffdfdfd,0xfff8f8f8,0xfff0f0f0,0xffe3e3e3,0xffd4d4d4,0xfffefefe,0xffbebebe,0xfd383838,0x803e403e,
856 0x53000500,0x40000500,0x2f000500,0x21000500,0x16000500,0xd000500,0xffffff,0xffffff,0xffffff,0x2000500,0x6000500,0xd000500,0x18000500,0x29000500,
857 0x3f000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffdfdfd,0xfffdfdfd,0xfffbfbfb,0xfff6f6f6,0xffededed,0xffdbdbdb,0xffc6c6c6,
858 0xffffffff,0xfffdfdfd,0xffaeaeae,0xfd3b3b3b,0x7e353735,0x55000500,0x41000500,0x2f000500,0x20000500,0x15000500,0xffffff,0xffffff,0x1000500,0x2000500,
859 0x6000500,0xe000500,0x1b000500,0x2d000500,0x45000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfffafafa,
860 0xfff4f4f4,0xffe8e8e8,0xffd5d5d5,0xffbababa,0xffffffff,0xffffffff,0xfffdfdfd,0xffa3a3a3,0xfd3e3e3e,0x7a2a2d2a,0x55000500,0x40000500,0x2d000500,0x1e000500,
861 0xffffff,0xffffff,0x1000500,0x2000500,0x7000500,0xf000500,0x1d000500,0x30000500,0x4a000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
862 0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfff8f8f8,0xfff3f3f3,0xffe7e7e7,0xffd1d1d1,0xffb4b4b4,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff9d9d9d,0xfd454545,
863 0x782b2b2b,0x52000500,0x3c000500,0x29000500,0xffffff,0xffffff,0x1000500,0x3000500,0x7000500,0x10000500,0x1e000500,0x32000500,0x4d000500,0xff000000,
864 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffcfcfc,0xfffbfbfb,0xfff8f8f8,0xfff3f3f3,0xffe6e6e6,0xffd1d1d1,0xffb3b3b3,0xffffffff,0xffffffff,
865 0xffffffff,0xffffffff,0xfff9f9f9,0xff9e9e9e,0xfc4c4c4c,0x701f231f,0x4c000500,0x36000500,0x1000000,0x2000000,0x5000000,0x9000000,0xf000000,0x18000000,
866 0x27000000,0x3b000000,0x55000600,0xff000000,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7,0xfff8f8f8,0xfff6f6f6,0xfff7f7f7,0xfff7f7f7,0xfff6f6f6,0xfff2f2f2,0xffe8e8e8,
867 0xffd4d4d4,0xffb9b9b9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xffa1a1a1,0xfb545454,0x5c000500,0x42000500,0x4000000,0x7000000,
868 0xd000000,0x15000000,0x1d000000,0x29000000,0x38000000,0x4c000000,0x64000000,0xff000000,0xffe5e5e5,0xffe5e5e5,0xffe7e7e7,0xffe8e8e8,0xffe8e8e8,0xffececec,
869 0xffefefef,0xfff3f3f3,0xfff0f0f0,0xffeaeaea,0xffdddddd,0xffc9c9c9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xff3e3e3e,
870 0x6a000500,0x4e000500,0x7000000,0xf000000,0x19000000,0x28000000,0x34000000,0x43000000,0x52000000,0x64000000,0x79000500,0xff000000,0xffcbcbcb,0xffcbcbcb,
871 0xffcdcdcd,0xffd1d1d1,0xffd6d6d6,0xffdddddd,0xffe7e7e7,0xffececec,0xffefefef,0xffefefef,0xffe7e7e7,0xffc5c5c5,0xff9f9f9f,0xff7f7f7f,0xff6f6f6f,0xff6b6b6b,
872 0xff717171,0xff8c8c8c,0xffb5b5b5,0xff000000,0x76000500,0x58000500,0xc000000,0x19000000,0xff78cf7b,0xff75cd78,0xff71cb75,0xff6ec872,0xff69c56d,0xff67c56b,
873 0xff62c466,0xff5ec463,0xff58c15d,0xff51bf57,0xff4dbd50,0xff45bc4a,0xff42b948,0xffc6c6c6,0xffd7d7d7,0xffe5e5e5,0xffeeeeee,0xfff2f2f2,0xffcfcfcf,0xffa0a0a0,
874 0xff8d8d8d,0xff828282,0xff828282,0xff7d7d7d,0xff717171,0xff707070,0xff747474,0xff000000,0x80000500,0x60000500,0x12000000,0x27000000,0xff74cb77,0xff6fc673,
875 0xff6ac16d,0xff64bc68,0xff61ba65,0xff5db860,0xff59b95d,0xff53b757,0xff4db552,0xff48b24c,0xff41b047,0xff3ead43,0xff3ead42,0xffa7a7a7,0xffc4c4c4,0xffdbdbdb,
876 0xffececec,0xffd9d9d9,0xffababab,0xff9a9a9a,0xffa4a4a4,0xffc0c0c0,0xffcecece,0xffcfcfcf,0xffc4c4c4,0xff919191,0xff6e6e6e,0xff000000,0x87000500,0x66000500,
877 0x17000000,0x31000000,0xff6fc673,0xffffffff,0xffffffff,0xffffffff,0xfff4f9f5,0xffa5d1a7,0xff4ca74f,0xffffffff,0xffffffff,0xffffffff,0xfff3f9f3,0xff9acb9c,
878 0xff399e3d,0xff8d8d8d,0xffb1b1b1,0xffd3d3d3,0xffdddddd,0xffbdbdbd,0xffa8a8a8,0xffb5b5b5,0xffe6e6e6,0xfff3f3f3,0xfff7f7f7,0xfff3f3f3,0xffd1d1d1,0xffe7e7e7,
879 0xff9f9f9f,0xff000000,0x8b000500,0x6a000500,0x1b000000,0x3c000000,0xff69bf6c,0xffffffff,0xffe0eee1,0xff7fb582,0xffc6ddc7,0xffffffff,0xff78b07a,0xffffffff,
880 0xffdceadd,0xff6fa972,0xffc0d9c1,0xffffffff,0xff70ad73,0xff767676,0xffa2a2a2,0xffc8c8c8,0xffcacaca,0xffb3b3b3,0xffb1b1b1,0xffe3e3e3,0xfffafafa,0xfff8f8f8,
881 0xfff7f7f7,0xffafafaf,0xff7a7a7a,0xffb6b6b6,0xffe1e1e1,0xff000000,0x8e000500,0x6d000500,0x1d000000,0x43000000,0xff62ba66,0xffffffff,0xffd1e3d2,0xff418943,
882 0xff77a778,0xffffffff,0xff99bd9a,0xffffffff,0xffcbddcc,0xff2a772e,0xff6b9f6d,0xffffffff,0xff96bc98,0xff666666,0xff979797,0xffbfbfbf,0xffbfbfbf,0xffb2b2b2,
883 0xffc5c5c5,0xfff5f5f5,0xfffbfbfb,0xfffafafa,0xffb6b6b6,0xff7c7c7c,0xff777777,0xff9b9b9b,0xffefefef,0xff000000,0x8f000500,0x6e000500,0x1f000000,0x45000000,
884 0xff5eb661,0xffffffff,0xffd1e2d1,0xff3b803d,0xff9abc9a,0xffffffff,0xff88af8a,0xffffffff,0xffcbdacb,0xff276c29,0xff93b495,0xffffffff,0xff88b089,0xff606060,
885 0xff919191,0xffbcbcbc,0xffb8b8b8,0xffb2b2b2,0xffcecece,0xfffdfdfd,0xfffcfcfc,0xffbababa,0xff828282,0xff7a7a7a,0xff808080,0xffe4e4e4,0xffffffff,0xff000000,
886 0x90000500,0x6e000500,0x1f000000,0x46000000,0xff58b35d,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffdbe7dc,0xff397e3d,0xffffffff,0xffffffff,0xffffffff,
887 0xffffffff,0xffdae5db,0xff3b803e,0xff616161,0xff929292,0xffbdbdbd,0xffbbbbbb,0xffaeaeae,0xffc6c6c6,0xfff9f9f9,0xffbcbcbc,0xff868686,0xff7e7e7e,0xff777777,
888 0xff747474,0xffa4a4a4,0xfff4f4f4,0xff000000,0x90000500,0x6f000500,0x1f000000,0x46000000,0xff53b257,0xffffffff,0xffdde9dd,0xff70a473,0xff5d9a5f,0xff2d7d30,
889 0xff2b7a2f,0xffffffff,0xffdae4da,0xff68936a,0xff578c5a,0xff29722b,0xff2b7a2f,0xff656565,0xff969696,0xffc2c2c2,0xffc5c5c5,0xffa8a8a8,0xffadadad,0xffeaeaea,
890 0xffb9b9b9,0xff7e7e7e,0xff9b9b9b,0xff9a9a9a,0xff696969,0xff676767,0xff939393,0xff000000,0x90000500,0x6f000500,0x1f000000,0x46000000,0xff4eaf51,0xffffffff,
891 0xffcee1ce,0xff2f8334,0xff308734,0xff2f8634,0xff2f8433,0xffffffff,0xffcbdbcb,0xff286f2a,0xff29732b,0xff2b7a2f,0xff2f8233,0xff6b6b6b,0xff9b9b9b,0xffc5c5c5,
892 0xffd3d3d3,0xffa8a8a8,0xff949494,0xffb5b5b5,0xfff0f0f0,0xffc5c5c5,0xffebebeb,0xfffcfcfc,0xff9e9e9e,0xff686868,0xff686868,0xff000000,0x90000500,0x6f000500,
893 0x1d000000,0x43000000,0xff49b04e,0xffffffff,0xffcde2ce,0xff318834,0xff338d37,0xff348e37,0xff318c36,0xffffffff,0xffcbdccc,0xff29752d,0xff2b7a2f,0xff2e7f31,
894 0xff318834,0xff757575,0xffa4a4a4,0xffc7c7c7,0xffe3e3e3,0xffc5c5c5,0xff8d8d8d,0xff818181,0xffa5a5a5,0xffdddddd,0xffe8e8e8,0xffeaeaea,0xffcbcbcb,0xff707070,
895 0xff696969,0xff000000,0x90000500,0x6f000500,0x1b000000,0x3e000000,0xff45b148,0xffffffff,0xffcde3ce,0xff348f37,0xff359439,0xff359539,0xff349138,0xffffffff,
896 0xffcbddcc,0xff2d7b30,0xff2e8031,0xff308734,0xff338d37,0xff858585,0xffadadad,0xffcbcbcb,0xffe4e4e4,0xffeeeeee,0xffb7b7b7,0xff7d7d7d,0xff767676,0xff797979,
897 0xff868686,0xff868686,0xff7c7c7c,0xff6d6d6d,0xff6d6d6d,0xff000000,0x90000500,0x6f000500,0x17000000,0x34000000,0xff3fb245,0xff3ba43f,0xff36993b,0xff369639,
898 0xff369a3c,0xff36993b,0xff359539,0xff338e37,0xff2f8433,0xff2f8331,0xff308634,0xff318a35,0xff338e37,0xff979797,0xffb8b8b8,0xffd2d2d2,0xffe3e3e3,0xfff3f3f3,
899 0xfff5f5f5,0xffc7c7c7,0xff969696,0xff727272,0xff727272,0xff727272,0xff727272,0xff939393,0xffbebebe,0xff000000,0x90000500,0x6e000500,0x12000000,0x28000000,
900 0x47000000,0x6b000000,0x87000000,0x9a000000,0xa7000000,0xb2000000,0xbc000000,0xff000000,0xff6d6d6d,0xff6e6e6e,0xff767676,0xff848484,0xff969696,0xffadadad,
901 0xffc6c6c6,0xffd9d9d9,0xffe8e8e8,0xffefefef,0xfff7f7f7,0xfff9f9f9,0xffebebeb,0xffd7d7d7,0xffc9c9c9,0xffc9c9c9,0xffd6d6d6,0xffeaeaea,0xfffafafa,0xff000000,
902 0x8e000500,0x6d000500,0xc000000,0x1a000000,0x2f000000,0x47000000,0x5b000000,0x6c000000,0x79000000,0x87000000,0x97000000,0xff000000,0xffa0a0a0,0xffa0a0a0,
903 0xffa5a5a5,0xffafafaf,0xffbababa,0xffc7c7c7,0xffd7d7d7,0xffe4e4e4,0xffededed,0xfff2f2f2,0xfff4f4f4,0xfff5f5f5,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,
904 0xfff8f8f8,0xfff7f7f7,0xfff4f4f4,0xff000000,0x8c000500,0x6b000500,0x7000000,0x10000000,0x1b000000,0x2a000000,0x37000000,0x45000000,0x53000000,0x63000000,
905 0x76000000,0xff000000,0xffc9c9c9,0xffc9c9c9,0xffcbcbcb,0xffd1d1d1,0xffd5d5d5,0xffdcdcdc,0xffe6e6e6,0xffececec,0xfff2f2f2,0xfff5f5f5,0xfff6f6f6,0xfff6f6f6,
906 0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xff000000,0x87000500,0x68000500,0x4000000,0x7000000,0xd000000,0x14000000,
907 0x1c000000,0x28000000,0x35000000,0x47000000,0x5c000600,0xff000000,0xffe5e5e5,0xffe5e5e5,0xffe7e7e7,0xffe8e8e8,0xffe8e8e8,0xffececec,0xfff1f1f1,0xfff3f3f3,
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,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7,0xfff8f8f8,
910 0xfff8f8f8,0xfffafafa,0xfffcfcfc,0xfffdfdfd,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
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,
913 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x63000500,0x4c000500,0xffffff,0xffffff,0xffffff,0x1000500,0x4000500,0x9000500,
914 0x11000500,0x1d000500,0x2c000500,0x3e000500,0x51000500,0x63000500,0x73000500,0x7f000500,0x87000500,0x8c000500,0x8e000500,0x90000500,0x90000500,0x90000500,
915 0x90000500,0x90000500,0x90000500,0x90000500,0x8e000500,0x8c000500,0x87000500,0x7f000500,0x73000500,0x63000500,0x51000500,0x3e000500,0xffffff,0xffffff,
916 0xffffff,0x1000500,0x3000500,0x7000500,0xd000500,0x16000500,0x22000500,0x30000500,0x3e000500,0x4c000500,0x58000500,0x61000500,0x68000500,0x6b000500,
917 0x6d000500,0x6e000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6e000500,0x6d000500,0x6b000500,0x68000500,0x61000500,0x58000500,0x4c000500,
918 0x3e000500,0x30000500
919};
920
921static const QRgb DocumentTypeWord_data[] = {
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,
924 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000500,0x2000500,0x5000500,0x9000500,0x10000500,0x18000500,0x22000500,
925 0x2c000500,0x36000500,0x3f000500,0x45000500,0x4a000500,0x4d000500,0x4e000500,0x4e000500,0x4e000500,0x4c000500,0x49000500,0x45000500,0x3f000500,0x37000500,
926 0x2e000500,0x25000500,0x1c000500,0x13000500,0xd000500,0x8000500,0x4000500,0x2000500,0xffffff,0xffffff,0xffffff,0x1000500,0x3000500,0x7000500,
927 0xd000500,0x16000500,0x22000500,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
928 0xff000000,0xff000000,0xfd373737,0x72545754,0x44000500,0x37000500,0x2b000500,0x1f000500,0x15000500,0xd000500,0x8000500,0x4000500,0xffffff,0xffffff,
929 0xffffff,0x1000500,0x4000500,0x9000500,0x11000500,0x1d000500,0x2c000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,
930 0xfffefefe,0xfffdfdfd,0xfffafafa,0xfff5f5f5,0xffededed,0xffe3e3e3,0xffd1d1d1,0xfd363636,0x76404240,0x4e000500,0x3d000500,0x2e000500,0x21000500,0x16000500,
931 0xe000500,0x8000500,0xffffff,0xffffff,0xffffff,0x2000500,0x5000500,0xb000500,0x15000500,0x24000500,0x36000500,0xff000000,0xffffffff,0xffffffff,
932 0xffffffff,0xffffffff,0xfffefefe,0xfffefefe,0xfffdfdfd,0xfffdfdfd,0xfff8f8f8,0xfff0f0f0,0xffe3e3e3,0xffd4d4d4,0xfffefefe,0xffbebebe,0xfd383838,0x803e403e,
933 0x53000500,0x40000500,0x2f000500,0x21000500,0x16000500,0xd000500,0xffffff,0xffffff,0xffffff,0x2000500,0x6000500,0xd000500,0x18000500,0x29000500,
934 0x3f000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffdfdfd,0xfffdfdfd,0xfffbfbfb,0xfff6f6f6,0xffededed,0xffdbdbdb,0xffc6c6c6,
935 0xffffffff,0xfffdfdfd,0xffaeaeae,0xfd3b3b3b,0x7e353735,0x55000500,0x41000500,0x2f000500,0x20000500,0x15000500,0xffffff,0xffffff,0x1000500,0x2000500,
936 0x6000500,0xe000500,0x1b000500,0x2d000500,0x45000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfffafafa,
937 0xfff4f4f4,0xffe8e8e8,0xffd5d5d5,0xffbababa,0xffffffff,0xffffffff,0xfffdfdfd,0xffa3a3a3,0xfd3e3e3e,0x7a2a2d2a,0x55000500,0x40000500,0x2d000500,0x1e000500,
938 0xffffff,0xffffff,0x1000500,0x2000500,0x7000500,0xf000500,0x1d000500,0x30000500,0x4a000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
939 0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfff8f8f8,0xfff3f3f3,0xffe7e7e7,0xffd1d1d1,0xffb4b4b4,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff9d9d9d,0xfd454545,
940 0x782b2b2b,0x52000500,0x3c000500,0x29000500,0xffffff,0xffffff,0x1000500,0x3000500,0x7000500,0x10000500,0x1e000500,0x32000500,0x4d000500,0xff000000,
941 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffcfcfc,0xfffbfbfb,0xfff8f8f8,0xfff3f3f3,0xffe6e6e6,0xffd1d1d1,0xffb3b3b3,0xffffffff,0xffffffff,
942 0xffffffff,0xffffffff,0xfff9f9f9,0xff9e9e9e,0xfc4c4c4c,0x701f231f,0x4c000500,0x36000500,0x1000000,0x2000000,0x5000000,0x9000000,0xf000000,0x18000000,
943 0x27000000,0x3b000000,0x55000600,0xff000000,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7,0xfff8f8f8,0xfff6f6f6,0xfff7f7f7,0xfff7f7f7,0xfff6f6f6,0xfff2f2f2,0xffe8e8e8,
944 0xffd4d4d4,0xffb9b9b9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xffa1a1a1,0xfb545454,0x5c000500,0x42000500,0x4000000,0x7000000,
945 0xd000000,0x15000000,0x1d000000,0x29000000,0x38000000,0x4c000000,0x64000000,0xff000000,0xffe5e5e5,0xffe5e5e5,0xffe7e7e7,0xffe8e8e8,0xffe8e8e8,0xffececec,
946 0xffefefef,0xfff3f3f3,0xfff0f0f0,0xffeaeaea,0xffdddddd,0xffc9c9c9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xff3e3e3e,
947 0x6a000500,0x4e000500,0x7000000,0xf000000,0x19000000,0x28000000,0x34000000,0x43000000,0x52000000,0x64000000,0x79000500,0xff000000,0xffcbcbcb,0xffcbcbcb,
948 0xffcdcdcd,0xffd1d1d1,0xffd6d6d6,0xffdddddd,0xffe7e7e7,0xffececec,0xffefefef,0xffefefef,0xffe7e7e7,0xffc5c5c5,0xff9f9f9f,0xff7f7f7f,0xff6f6f6f,0xff6b6b6b,
949 0xff717171,0xff8c8c8c,0xffb5b5b5,0xff000000,0x76000500,0x58000500,0xc000000,0x18000000,0xff6568f3,0xff6365f3,0xff5f61f3,0xff5b5ef2,0xff5759f2,0xff5256f2,
950 0xff4e50f2,0xff494bf1,0xff4246f1,0xff3b3ef0,0xff3437f0,0xff2a2eee,0xff2529ea,0xffc7c7c7,0xffd7d7d7,0xffe5e5e5,0xffeeeeee,0xfff2f2f2,0xffcfcfcf,0xffa0a0a0,
951 0xff8d8d8d,0xff828282,0xff828282,0xff7d7d7d,0xff717171,0xff707070,0xff747474,0xff000000,0x80000500,0x60000500,0x12000000,0x26000000,0xff6264f1,0xff5e60ee,
952 0xff595ced,0xff5457eb,0xff5053eb,0xff4c4eec,0xff4749eb,0xff3e41eb,0xff383cea,0xff3335ea,0xff2a2ee8,0xff2428e3,0xff2327dd,0xffa9a9a9,0xffc4c4c4,0xffdbdbdb,
953 0xffececec,0xffd9d9d9,0xffababab,0xff9a9a9a,0xffa4a4a4,0xffc0c0c0,0xffcecece,0xffcfcfcf,0xffc4c4c4,0xff919191,0xff6e6e6e,0xff000000,0x87000500,0x66000500,
954 0x17000000,0x30000000,0xff5e60ee,0xffa9abf3,0xffa6a7f0,0xff6666e3,0xff484add,0xff5e5fe3,0xff9b9dee,0xff5356e2,0xff2f33dd,0xff494be1,0xff9193e9,0xff9193e8,
955 0xff2224d0,0xff919191,0xffb4b4b4,0xffd4d4d4,0xffdedede,0xffbdbdbd,0xffa8a8a8,0xffb5b5b5,0xffe6e6e6,0xfff3f3f3,0xfff7f7f7,0xfff3f3f3,0xffd1d1d1,0xffe7e7e7,
956 0xff9f9f9f,0xff000000,0x8b000500,0x6a000500,0x1b000000,0x38000000,0xff595cec,0xffb4b5f1,0xffffffff,0xff9fa0e5,0xff3b3dcb,0xff9a9ae3,0xffffffff,0xff9596e2,
957 0xff2427c7,0xff9091e0,0xffffffff,0xffa1a2e2,0xff1f22c0,0xff7b7b7b,0xffa8a8a8,0xffcccccc,0xffcbcbcb,0xffb3b3b3,0xffb1b1b1,0xffe3e3e3,0xfffafafa,0xfff8f8f8,
958 0xfff7f7f7,0xffafafaf,0xff7a7a7a,0xffb6b6b6,0xffe1e1e1,0xff000000,0x8e000500,0x6d000500,0x1d000000,0x3d000000,0xff5256e9,0xff6566e1,0xffffffff,0xffe8e8f7,
959 0xff3033b5,0xffe7e7f5,0xffffffff,0xffe6e6f5,0xff1b1eab,0xffe5e5f4,0xffffffff,0xff3f41b7,0xff1d1fb3,0xff6f6f6f,0xffa0a0a0,0xffc6c6c6,0xffc0c0c0,0xffb2b2b2,
960 0xffc5c5c5,0xfff5f5f5,0xfffbfbfb,0xfffafafa,0xffb6b6b6,0xff7c7c7c,0xff777777,0xff9b9b9b,0xffefefef,0xff000000,0x8f000500,0x6e000500,0x1f000000,0x3f000000,
961 0xff4f51ea,0xff4547da,0xffc3c4ee,0xffffffff,0xff9394cf,0xffffffff,0xffffffff,0xffffffff,0xff8d8ec4,0xffffffff,0xffbbbbdd,0xff191b9d,0xff1d1eac,0xff6a6a6a,
962 0xff9d9d9d,0xffc4c4c4,0xffbababa,0xffb2b2b2,0xffcecece,0xfffdfdfd,0xfffcfcfc,0xffbababa,0xff828282,0xff7a7a7a,0xff808080,0xffe4e4e4,0xffffffff,0xff000000,
963 0x90000500,0x6e000500,0x1f000000,0x3e000000,0xff4a4deb,0xff3f42dd,0xff7373d9,0xffffffff,0xffffffff,0xffffffff,0xff6061a9,0xffffffff,0xffffffff,0xffffffff,
964 0xff6061ab,0xff191a99,0xff1b1da8,0xff6b6b6b,0xff9e9e9e,0xffc5c5c5,0xffbdbdbd,0xffaeaeae,0xffc6c6c6,0xfff9f9f9,0xffbcbcbc,0xff868686,0xff7e7e7e,0xff777777,
965 0xff747474,0xffa4a4a4,0xfff4f4f4,0xff000000,0x90000500,0x6f000500,0x1f000000,0x3e000000,0xff4548ee,0xff3c3ee3,0xff2f33d0,0xffdadaf2,0xffffffff,0xffadadd4,
966 0xff161987,0xffacadd0,0xffffffff,0xffe5e5f0,0xff16198c,0xff191b9a,0xff1b1ea9,0xff6e6e6e,0xffa0a0a0,0xffc7c7c7,0xffc6c6c6,0xffa8a8a8,0xffadadad,0xffeaeaea,
967 0xffb9b9b9,0xff7e7e7e,0xff9b9b9b,0xff9a9a9a,0xff696969,0xff676767,0xff939393,0xff000000,0x90000500,0x6f000500,0x1f000000,0x3d000000,0xff3e40f0,0xff3538e8,
968 0xff2b2fd9,0xff8384dc,0xffffffff,0xff6263b9,0xff171a94,0xff6062af,0xffffffff,0xff7e7fbc,0xff171a94,0xff191da0,0xff1b1ead,0xff717171,0xffa3a3a3,0xffc9c9c9,
969 0xffd4d4d4,0xffa8a8a8,0xff949494,0xffb5b5b5,0xfff0f0f0,0xffc5c5c5,0xffebebeb,0xfffcfcfc,0xff9e9e9e,0xff686868,0xff686868,0xff000000,0x90000500,0x6f000500,
970 0x1d000000,0x3b000000,0xff3639f1,0xff2d30eb,0xff2428df,0xff2024cd,0xff6465cd,0xff1d1ead,0xff1b1ea6,0xff1a1da1,0xff6262b9,0xff2b2fa3,0xff191da0,0xff1b1ea7,
971 0xff1b1eae,0xff787878,0xffa6a6a6,0xffc9c9c9,0xffe3e3e3,0xffc5c5c5,0xff8d8d8d,0xff818181,0xffa5a5a5,0xffdddddd,0xffe8e8e8,0xffeaeaea,0xffcbcbcb,0xff707070,
972 0xff696969,0xff000000,0x90000500,0x6f000500,0x1b000000,0x36000000,0xff2e31f1,0xff272aee,0xff2428e2,0xff2225d4,0xff2023c7,0xff1e22bd,0xff1d20b6,0xff1d1fb3,
973 0xff1d1eae,0xff1b1eac,0xff1b1eac,0xff1b1faf,0xff1d1fb3,0xff858585,0xffadadad,0xffcbcbcb,0xffe4e4e4,0xffeeeeee,0xffb7b7b7,0xff7d7d7d,0xff767676,0xff797979,
974 0xff868686,0xff868686,0xff7c7c7c,0xff6d6d6d,0xff6d6d6d,0xff000000,0x90000500,0x6f000500,0x17000000,0x2e000000,0xff272aee,0xff2529e7,0xff2427de,0xff2225d7,
975 0xff2224cc,0xff1f23c6,0xff1e22c0,0xff1e20bc,0xff1e20b7,0xff1e1fb5,0xff1d1fb2,0xff1d1fb3,0xff1e20b4,0xff979797,0xffb8b8b8,0xffd2d2d2,0xffe3e3e3,0xfff3f3f3,
976 0xfff5f5f5,0xffc7c7c7,0xff969696,0xff727272,0xff727272,0xff727272,0xff727272,0xff939393,0xffbebebe,0xff000000,0x90000500,0x6e000500,0x12000000,0x25000000,
977 0x3e000000,0x5e000000,0x79000000,0x91000000,0xa2000000,0xaf000000,0xba000000,0xff000000,0xff757575,0xff757575,0xff7b7b7b,0xff878787,0xff979797,0xffacacac,
978 0xffc6c6c6,0xffd9d9d9,0xffe8e8e8,0xffefefef,0xfff7f7f7,0xfff9f9f9,0xffebebeb,0xffd7d7d7,0xffc9c9c9,0xffc9c9c9,0xffd6d6d6,0xffeaeaea,0xfffafafa,0xff000000,
979 0x8e000500,0x6d000500,0xc000000,0x18000000,0x2a000000,0x3f000000,0x52000000,0x65000000,0x75000000,0x84000000,0x94000000,0xff000000,0xffa6a6a6,0xffa6a6a6,
980 0xffaaaaaa,0xffb1b1b1,0xffbbbbbb,0xffc7c7c7,0xffd7d7d7,0xffe4e4e4,0xffededed,0xfff2f2f2,0xfff4f4f4,0xfff5f5f5,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,
981 0xfff8f8f8,0xfff7f7f7,0xfff4f4f4,0xff000000,0x8c000500,0x6b000500,0x7000000,0xf000000,0x19000000,0x27000000,0x34000000,0x42000000,0x51000000,0x62000000,
982 0x75000000,0xff000000,0xffcbcbcb,0xffcbcbcb,0xffcdcdcd,0xffd1d1d1,0xffd6d6d6,0xffdcdcdc,0xffe6e6e6,0xffececec,0xfff2f2f2,0xfff5f5f5,0xfff6f6f6,0xfff6f6f6,
983 0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xff000000,0x87000500,0x68000500,0x4000000,0x7000000,0xd000000,0x14000000,
984 0x1c000000,0x28000000,0x35000000,0x47000000,0x5c000600,0xff000000,0xffe5e5e5,0xffe5e5e5,0xffe7e7e7,0xffe8e8e8,0xffe8e8e8,0xffececec,0xfff1f1f1,0xfff3f3f3,
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,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7,0xfff8f8f8,
987 0xfff8f8f8,0xfffafafa,0xfffcfcfc,0xfffdfdfd,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
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,
990 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x63000500,0x4c000500,0xffffff,0xffffff,0xffffff,0x1000500,0x4000500,0x9000500,
991 0x11000500,0x1d000500,0x2c000500,0x3e000500,0x51000500,0x63000500,0x73000500,0x7f000500,0x87000500,0x8c000500,0x8e000500,0x90000500,0x90000500,0x90000500,
992 0x90000500,0x90000500,0x90000500,0x90000500,0x8e000500,0x8c000500,0x87000500,0x7f000500,0x73000500,0x63000500,0x51000500,0x3e000500,0xffffff,0xffffff,
993 0xffffff,0x1000500,0x3000500,0x7000500,0xd000500,0x16000500,0x22000500,0x30000500,0x3e000500,0x4c000500,0x58000500,0x61000500,0x68000500,0x6b000500,
994 0x6d000500,0x6e000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6e000500,0x6d000500,0x6b000500,0x68000500,0x61000500,0x58000500,0x4c000500,
995 0x3e000500,0x30000500
996};
997
998static const QRgb FileBrowser_data[] = {
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,
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,
1003 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff0f4120,0xff0c3119,0xff0c3119,0xff0c3819,
1004 0xff0c3619,0xff0c3319,0xff0c3119,0xff0c3119,0xff13592b,0xff13592b,0xff13592b,0xff13582b,0xff13582b,0xff13572a,0xff13572a,0xff13562a,0xff13562a,0xff135429,
1005 0xff125329,0xff125329,0xff125329,0xff125228,0xff125228,0xff125128,0xff125028,0xff124f27,0xff104d25,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
1006 0xff135429,0xffd0d0d0,0xffa7a7a7,0xff7e7e7e,0xff7e7e7e,0xff889786,0xff879286,0xff838882,0xff7e7e7e,0xff7e7e7e,0xffdfdfdf,0xffdedede,0xffdddddd,0xffdcdcdc,
1007 0xffdadada,0xffd8d8d8,0xffd7d7d7,0xffd5d5d5,0xffd3d3d3,0xffd1d1d1,0xffd1d1d1,0xffcfcfcf,0xffcecece,0xffcccccc,0xffc9c9c9,0xffc3c3c3,0xff104b24,0x5c000000,
1008 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff125329,0xffd5d5d5,0xffd6d6d6,0xffd1d1d1,0xffadadad,0xff7e7e7e,0xff7e7e7e,0xff92a390,0xff93a391,0xff8b948a,
1009 0xff7d7d7d,0xff7c7c7c,0xffdcdcdc,0xffdadada,0xff7a7a7a,0xff7a7a7a,0xff787878,0xffd3d3d3,0xffd1d1d1,0xffd1d1d1,0xffcfcfcf,0xffcdcdcd,0xffcccccc,0xffc7c7c7,
1010 0xffc3c3c3,0xffbdbdbd,0xff104923,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff124f27,0xffd1d0d0,0xffd4d3d3,0xffd5d5d5,0xffd6d6d6,0xffd1d1d1,
1011 0xffafafaf,0xff7e7e7e,0xff7e7e7e,0xff9caf9a,0xff9fb19d,0xff95a294,0xff7b7b7b,0xff7a7a7a,0xff919e90,0xff909d8f,0xff7e817d,0xff777777,0xff767676,0xffcfcfcf,
1012 0xffcdcdcd,0xffcccccc,0xffc7c7c7,0xffc3c3c3,0xffbdbdbd,0xffb7b7b7,0xff0f4623,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff104723,0xffc3bfbf,
1013 0xffcbcaca,0xffd1d0d0,0xffd4d3d3,0xffd5d5d5,0xffd6d6d6,0xffd2d2d2,0xffb2b2b2,0xff7d7d7d,0xff7d7d7d,0xffa5b9a4,0xffa6baa4,0xffa4b7a3,0xffa6bba4,0xffa4b9a3,
1014 0xffa3b6a1,0xff92a091,0xff7c7f7b,0xff747474,0xff737373,0xffc7c7c7,0xffc3c3c3,0xffbdbdbd,0xffb7b7b7,0xffb1b1b1,0xff0f4322,0x93000000,0x62000000,0x3b000000,
1015 0x1f000000,0x3d000000,0xff0d3c1e,0xffaba4a4,0xffb8b3b3,0xffc3bfbf,0xffcbcaca,0xffd1d0d0,0xffd4d3d3,0xffd5d5d5,0xffd5d5d5,0xffd3d3d3,0xffb2b2b2,0xff7b7b7b,
1016 0xff7a7a7a,0xffacc0aa,0xffadc1ab,0xffacc0ab,0xffabbfa9,0xffa8bda6,0xffa5baa4,0xff93a192,0xff7a7d79,0xff6e6e6e,0xffbdbdbd,0xffb9b9b9,0xffb3b3b3,0xffadadad,
1017 0xff0f4120,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0c341a,0xff978d8d,0xffa09797,0xffaba4a4,0xffb8b3b3,0xffc3bfbf,0xffcbc9c9,0xffd1d0d0,
1018 0xffd3d2d2,0xffd4d4d4,0xffd3d3d3,0xffd3d3d3,0xffb4b4b4,0xff7a7a7a,0xff797979,0xffb2c7b0,0xffb2c7b0,0xffb0c5ae,0xffadc3ac,0xffaabea8,0xffa4b8a2,0xffc6e0c5,
1019 0xff686868,0xffb4b4b4,0xffadadad,0xffa7a7a7,0xff0d401f,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0c3119,0xff7e7e7e,0xff8c8383,0xff978d8d,
1020 0xffa09797,0xffaba4a4,0xffb7b3b3,0xffc2bebe,0xffcac8c8,0xffd0cfcf,0xffd1d1d1,0xffd2d2d2,0xffd1d1d1,0xffd1d1d1,0xffb3b3b3,0xff777777,0xff757575,0xffb6ccb5,
1021 0xffb5cbb3,0xffb0c6ae,0xffaac0a9,0xffc4ddc2,0xff656565,0xffaeaeae,0xffa8a8a8,0xffa3a3a3,0xff0d3e1e,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3e000000,
1022 0xff105425,0xff9ca69b,0xff7c7c7c,0xff7c7c7c,0xff877f7f,0xff948a8a,0xff9d9494,0xffa8a1a1,0xffb6b1b1,0xffc0bdbd,0xffc9c7c7,0xffcdcccc,0xffd0cfcf,0xffd0d0d0,
1023 0xffcfcfcf,0xffcecece,0xffb5b5b5,0xff737373,0xff6f6f6f,0xffb4cbb3,0xffb0c7ae,0xffbed7bd,0xff636363,0xffa9a9a9,0xffa4a4a4,0xff9e9e9e,0xff0d3c1e,0x99000000,
1024 0x66000000,0x3d000000,0x21000000,0x42000000,0xff125725,0xffbdd3bc,0xffb0c4af,0xff909a8f,0xff717171,0xff727272,0xff7c7777,0xff8c8282,0xff988f8f,0xffa59f9f,
1025 0xffb4afaf,0xffbebbbb,0xffc6c4c4,0xffcbcaca,0xffcccccc,0xffcccccc,0xffcbcbcb,0xffcacaca,0xffafafaf,0xff686868,0xffaec5ad,0xffb8d0b6,0xff5f5f5f,0xffa4a4a4,
1026 0xff9e9e9e,0xff989898,0xff0d391d,0x99000000,0x66000000,0x3d000000,0x2a000000,0x4f000000,0xff0f4d22,0xff9daf9c,0xff8f9f8d,0xff859584,0xff7f8d7e,0xff6e776e,
1027 0xff5b5b5b,0xff636363,0xff746e6e,0xff887e7e,0xff988e8e,0xffa49d9d,0xffb2adad,0xffbbb8b8,0xffc3c1c1,0xffc7c6c6,0xffc8c8c8,0xffc5c4c4,0xffc2c2c2,0xff656565,
1028 0xffa7bda6,0xffb0c6ae,0xff5c5c5c,0xff9d9d9d,0xff989898,0xff919191,0xff0c371b,0x99000000,0x66000000,0x3d000000,0x40000000,0x6a000000,0xff0d3c1a,0xff6e7b6d,
1029 0xff5b655a,0xff4f584e,0xff4a524a,0xff4c564b,0xff545e53,0xff596059,0xff535353,0xff636363,0xff777272,0xff8b8181,0xff988e8e,0xffa39b9b,0xffaeaaaa,0xffb8b6b6,
1030 0xffbebdbd,0xffbfbfbf,0xffbebebe,0xff606060,0xff9bb09a,0xffa7bda6,0xff585858,0xff979797,0xff919191,0xff8c8c8c,0xff0c351a,0x99000000,0x66000000,0x3d000000,
1031 0x64000000,0x91000000,0xff082812,0xff767a75,0xffaeb0ad,0xffdddedd,0xfffbfbfb,0xffdddedd,0xffadafad,0xff717771,0xff525d52,0xff646d63,0xff616161,0xff6e6e6e,
1032 0xff7a7777,0xff8b8080,0xff968d8d,0xffa19a9a,0xffb0adad,0xffb9b8b8,0xffbababa,0xff5d5d5d,0xff8fa38e,0xff9eb29c,0xff545454,0xff909090,0xff8b8b8b,0xff858585,
1033 0xff0c3319,0x99000000,0x66000000,0x3d000000,0x92000000,0xb8000000,0xff6f7972,0xffd0d1d0,0xffb3b5b3,0xff9ca19c,0xff959a94,0xff9b9f9b,0xffb1b5b1,0xffcfd0cf,
1034 0xff878b87,0xff505a4f,0xff727f71,0xff828d80,0xff6f6f6f,0xff727272,0xff777272,0xff898181,0xffa09a9a,0xffafadad,0xffb5b4b4,0xff595959,0xff839682,0xff96a895,
1035 0xff505050,0xff8a8a8a,0xff858585,0xff818181,0xff0a3119,0x99000000,0x66000000,0x3d000000,0xbd000000,0xdd575757,0xffc7cac7,0xffa4a8a4,0xffa0a69f,0xffacb4ab,
1036 0xffaeb6ae,0xffaab1a9,0xff9ca39c,0xffa2a6a2,0xffcfd0ce,0xff6f736f,0xff5b675b,0xff7e8e7c,0xff92a491,0xff8b9a8a,0xff696969,0xff656565,0xff8a8383,0xffa29e9e,
1037 0xffadadad,0xff545454,0xff798a77,0xff8c9d8b,0xff4d4d4d,0xff858585,0xff808080,0xff7c7c7c,0xff0a2f17,0x99000000,0x66000000,0x3d000000,0xd9000000,0xf0a5a5a5,
1038 0xffa3a8a4,0xffa0a69f,0xffb5bdb4,0xffbcc6bb,0xffbcc6bc,0xffb9c3b8,0xffafb8ae,0xff9ba19a,0xffb0b3b0,0xffabadab,0xff4a534a,0xff728071,0xff899b88,0xff8da18c,
1039 0xff899c87,0xff81947f,0xff5b5b5b,0xff938d8d,0xffa4a3a3,0xff505050,0xff6e7f6d,0xff839281,0xff494949,0xff7f7f7f,0xff7a7a7a,0xff787878,0xff0a2e16,0x99000000,
1040 0x66000000,0x3d000000,0xe7000000,0xf9dcdcdc,0xff808b83,0xffabb4ab,0xffbcc6bb,0xffbec9bd,0xffbdc8bd,0xffbcc6bb,0xffb6c0b6,0xffa5ada5,0xff989c98,0xffdddddd,
1041 0xff404940,0xff667466,0xff81937f,0xff869984,0xff81957f,0xff7a8d79,0xff565656,0xff7a7474,0xff989494,0xff4c4c4c,0xff647563,0xff7a887a,0xff464646,0xff7a7a7a,
1042 0xff767676,0xff747474,0xff0a2d16,0x99000000,0x66000000,0x3d000000,0xec000000,0xfefbfbfb,0xff757a77,0xffa6aca6,0xffbcc6bc,0xffbdc8bd,0xffbcc6bb,0xffbac4b9,
1043 0xffb7c0b6,0xffa7b0a7,0xff90948f,0xfffbfbfb,0xff394039,0xff5f6c5e,0xff7a8c79,0xff7e927c,0xff7a8d79,0xff748772,0xff6e806c,0xff4d4d4d,0xff898383,0xff494949,
1044 0xff5b6b59,0xff717e71,0xff434343,0xff767676,0xff737373,0xff707070,0xff0a2b14,0x99000000,0x66000000,0x3d000000,0xe7000000,0xf9dcdcdc,0xff818b85,0xff959595,
1045 0xff9f9f9f,0xffb2b9b1,0xffbac4b9,0xffb8c3b7,0xffb3bdb3,0xffa3aaa2,0xff969a95,0xffd9dad9,0xff343c34,0xff576356,0xff71826f,0xff778975,0xff758874,0xff6f816d,
1046 0xff687b66,0xff4a4a4a,0xff6d6767,0xff464646,0xff51624f,0xff6a7569,0xff424242,0xff727272,0xff717171,0xff6f6f6f,0xff0a2b14,0x99000000,0x66000000,0x3d000000,
1047 0xd9000000,0xf0a5a5a5,0xffa3a8a4,0xffa6a6a6,0xffbebebe,0xff9f9f9f,0xff9f9f9f,0xffacb2ab,0xffa9b2a9,0xff969b96,0xffabadaa,0xffa0a2a0,0xff2e352d,0xff4a5449,
1048 0xff617160,0xff6c7d6a,0xff6d7f6b,0xff697c68,0xff647762,0xff5f715c,0xff464646,0xff454545,0xff4c5d4a,0xff636c62,0xff404040,0xff727272,0xff707070,0xff6f6f6f,
1049 0xff0a2b14,0x99000000,0x66000000,0x3d000000,0xbd000000,0xdd575757,0xffc7cac8,0xffa8a8a8,0xffa6a6a6,0xffb4b4b4,0xffb8b8b8,0xff939393,0xff8b8b8b,0xff999a99,
1050 0xffc1c2c1,0xff6a6b6a,0xff2d312b,0xff374036,0xff4c574a,0xff596858,0xff61725f,0xff637660,0xff60735e,0xff5b6d59,0xff454545,0xff434343,0xff475845,0xff5b635b,
1051 0xff404040,0xff717171,0xff707070,0xff6f6f6f,0xff0a2b14,0x99000000,0x66000000,0x3d000000,0x92000000,0xb8000000,0xff6f7972,0xffd1d1d1,0xffb5b5b5,0xffa0a0a0,
1052 0xff999999,0xff9d9d9d,0xffafafaf,0xffc0c0c0,0xff7c7c7c,0xffe8e8e8,0xffd2d3d2,0xff2b312b,0xff313b31,0xff424e41,0xff505e4f,0xff576856,0xff596b58,0xff566853,
1053 0xff526550,0xff424242,0xff435441,0xff535a53,0xff3f3f3f,0xff707070,0xff6f6f6f,0xff6f6f6f,0xff0a2b14,0x99000000,0x66000000,0x3d000000,0x64000000,0x91000000,
1054 0xff082512,0xff797979,0xffafafaf,0xffdedede,0xfffbfbfb,0xffdcdcdc,0xffa5a5a5,0xff606060,0xffe6e6e6,0xffffffff,0xffffffff,0xffd1d1d1,0xff272a25,0xff2b332a,
1055 0xff3b4639,0xff485647,0xff4f5f4d,0xff50624e,0xff4f604d,0xff404040,0xff425340,0xff4d514d,0xff3f3f3f,0xff707070,0xff707070,0xff6f6f6f,0xff0a2b16,0x99000000,
1056 0x66000000,0x3d000000,0x40000000,0x6a000000,0xff0d381b,0xff727272,0xff5d5d5d,0xff505050,0xff4a4a4a,0xff474747,0xff414141,0xff363636,0xff767676,0xfffbfbfb,
1057 0xffffffff,0xffffffff,0xffd1d1d1,0xff222322,0xff252d25,0xff364135,0xff425041,0xff495946,0xff495c48,0xff4a5b47,0xff3f3f3f,0xff474947,0xff3f3f3f,0xff707070,
1058 0xff707070,0xff707070,0xff0a2d16,0x99000000,0x66000000,0x3d000000,0x28000000,0x4e000000,0xff0f4623,0xffa0a0a0,0xff8d8d8d,0xff818181,0xff7a7a7a,0xff757575,
1059 0xff696969,0xff535353,0xff3b3b3b,0xff747474,0xfffbfbfb,0xffffffff,0xffffffff,0xffd1d1d1,0xff1e1e1e,0xff232823,0xff354033,0xff404f3e,0xff455642,0xff465843,
1060 0xff3f3f3f,0xff414241,0xff3f3f3f,0xff707070,0xff707070,0xff717171,0xff0a2d16,0x93000000,0x62000000,0x3b000000,0x1d000000,0x3b000000,0xff124c25,0xffb6b6b6,
1061 0xffadadad,0xffa6a6a6,0xff9f9f9f,0xff989898,0xff8a8a8a,0xff727272,0xff535353,0xff343434,0xff707070,0xfffbfbfb,0xffffffff,0xffffffff,0xffd2d2d2,0xff222222,
1062 0xff242424,0xff353e34,0xff40503f,0xff435441,0xff435440,0xff3e3e3e,0xff3e3e3e,0xff707070,0xff717171,0xff727272,0xff0a2e16,0x87000000,0x5a000000,0x36000000,
1063 0x17000000,0x2f000000,0xff104d25,0xff104a24,0xff104823,0xff0f4523,0xff0f4220,0xff0f401f,0xff0d3c1e,0xff0c3519,0xff082914,0xff061d0f,0xff031208,0xff666866,
1064 0xfffbfbfb,0xffffffff,0xffffffff,0xff797b7a,0xff05170c,0xff051208,0xff05160c,0xff05190c,0xff05190c,0xff05190c,0xff0a2b16,0xff0a2d16,0xff0a2d16,0xff0a2e16,
1065 0xff0a2f17,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x9b000000,0xa1000000,
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,
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,
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,
1072 0x18000000,0xf000000
1073};
1074
1075static const QRgb Games_data[] = {
1076 0xffffff,0xffffff,0x0,0x3ceee7c6,0x9dd6ceaa,0xf4cac092,0xfff2e396,0xfff2dd78,0xf4cab549,0x9dd6b92f,0x3ceeca15,0x0,0xffffff,0xffffff,
1077 0xffffff,0xfff8d8,0x7ac4c0ac,0xfbdbd6bd,0xfff6eec9,0xfffbefb5,0xffffee9c,0xffffe878,0xfffbdd4f,0xfff6d225,0xfbd9b400,0x7ab79800,0xe4be00,0xffffff,
1078 0x0,0x7ac4c0ac,0xffdbd7c2,0xff84763c,0xff84763c,0xff84763c,0xffac9f5e,0xffac9b47,0xff84763c,0xff84763c,0xff84763c,0xffc09f00,0x7aa28700,0x1000000,
1079 0x38fff8d4,0xfadbd6bd,0xff84763c,0xffa9a9a9,0xffd9d9d9,0xffe0e0e0,0xfff5e594,0xfff5e182,0xffe0e0e0,0xffd9d9d9,0xffa9a9a9,0xff84763c,0xfaa68900,0x33b99a00,
1080 0x9dd6ceaa,0xfffbf3cd,0xff84763c,0xffffffff,0xffa3a3a4,0xff777777,0xffd3bd52,0xffd3ba44,0xff777777,0xffa3a3a4,0xffffffff,0xff84763c,0xffad9000,0x98887100,
1081 0xf4cac092,0xfffbefb5,0xff84763c,0xffd2d0cb,0xff1e1f23,0xff000000,0xffac920f,0xffac9008,0xff000000,0xff1e1f23,0xffd2d0cb,0xff84763c,0xff9d8200,0xf36f5d00,
1082 0xfff2e396,0xffffee9c,0xff84763c,0xff81784c,0xff3b3415,0xff1d1800,0xffb39504,0xffb29400,0xff1d1800,0xff3b3415,0xff81784c,0xff84763c,0xff8e7600,0xfe766300,
1083 0xfff2dd78,0xffffe878,0xffffe66a,0xff8b7511,0xff917a03,0xffc7a500,0xffdab500,0xffd8b400,0xffc7a500,0xff8e7700,0xff7b6600,0xff957c00,0xff7f6a00,0xfe766300,
1084 0xf4cab549,0xfffbdd4f,0xff84763c,0xffd9bb2b,0xffffd816,0xfffdd200,0xfff8ce00,0xfff3ca00,0xffe5be00,0xffc7a500,0xff887100,0xff84763c,0xff7d6800,0xf3625100,
1085 0x9dd6b92f,0xfffbd725,0xff312900,0xff0a0800,0xffc7a500,0xffc7a500,0xffc7a500,0xffc7a500,0xffc7a500,0xffc7a500,0xff0a0800,0xff332b00,0xff7d6800,0x98695800,
1086 0x38ffd816,0xfad9b400,0xfff2c900,0xff8e7600,0xff4b3f00,0xff181500,0xff161200,0xff161200,0xff151300,0xff312a00,0xff645400,0xff7f6a00,0xfa6d5b00,0x337f6a00,
1087 0x0,0x7ab79800,0xffc09f00,0xffd1ae00,0xffc3a200,0xff625200,0xff564900,0xff544700,0xff4d4100,0xff7f6a00,0xff7f6a00,0xff6d5b00,0x7a625100,0x0,
1088 0xffffff,0x8e4be00,0x7aa18700,0xfba68900,0xffaa8d00,0xff9d8200,0xff8e7600,0xff7f6a00,0xff7d6800,0xff7b6600,0xfb6d5b00,0x7a625100,0x7f6a00,0xffffff,
1089 0xffffff,0xffffff,0x0,0x37ab8f00,0x98887100,0xf36f5d00,0xfe766300,0xfe766300,0xf3625100,0x98695800,0x37766200,0x1000000,0xffffff,0xffffff
1090};
1091
1092static const QRgb Go_black_highlight_data[] = {
1093 0x28999b9c,0x2d949697,0x32959798,0x43868788,0x776f6f70,0x9a626263,0x93606060,0x60646565,0x31818384,0x22969899,0x1e939596,0x1b919394,0x2e9a9b9c,0x369c9d9f,
1094 0x6b7c7d7e,0xbc737474,0xe2696a6a,0xed656565,0xed616162,0xe35a5a5a,0xb24b4c4c,0x51555555,0x25818384,0x1c919394,0x34949697,0x6a848586,0xce7d7e7e,0xf97b7c7d,
1095 0xff767777,0xff767777,0xff727373,0xff5e5e5f,0xfa494a4a,0xcd393939,0x5b414243,0x237d7e7f,0x409c9e9f,0xb97f8080,0xf9838484,0xffaaabac,0xffa6a7a8,0xff9b9c9c,
1096 0xff717272,0xff5e5e5e,0xff505151,0xfc3f3f3f,0xb62e2f2f,0x46464748,0x68848585,0xde828283,0xffa0a1a2,0xffe5e6e6,0xffffffff,0xffa6a8a8,0xff7b7c7c,0xff666666,
1097 0xff545555,0xff434343,0xeb2d2d2e,0x7a2d2d2e,0x82777878,0xea757676,0xff919292,0xffbdbebe,0xffe6e6e7,0xffa2a3a4,0xff7f8080,0xff646565,0xff515152,0xff404040,
1098 0xfa2d2d2d,0xa3232324,0x766f7071,0xea6e6f6f,0xff787a7a,0xff7e8080,0xff949595,0xff757676,0xff646464,0xff575858,0xff4d4d4e,0xff404040,0xfc2d2d2d,0xb2202020,
1099 0x4a7c7e7e,0xda59595a,0xfe565757,0xff6c6d6d,0xff787878,0xff626262,0xff525354,0xff484849,0xff3c3c3c,0xff373838,0xfa242424,0xa91e1e1e,0x2e8d8f90,0x9b464747,
1100 0xf7484949,0xff5a5a5b,0xff636364,0xff515152,0xff454545,0xff3c3c3c,0xff373838,0xff2a2a2a,0xee191919,0x871e1f1f,0x26909293,0x4b585859,0xc0393939,0xfa414141,
1101 0xff4e4e4f,0xff434343,0xff3b3c3c,0xff333334,0xff2a2b2b,0xf81b1b1c,0xc0171717,0x572b2b2c,0x218e9091,0x28818384,0x5d444445,0xb52d2d2d,0xeb2e2f2f,0xfa2d2d2d,
1102 0xfd272728,0xfb1f2020,0xf1181818,0xc4171717,0x6f232424,0x2e4b4c4d,0x1e8e9091,0x1f929495,0x28787a7b,0x4b434445,0x842c2c2c,0xaf232323,0xc01c1d1d,0xb71a1a1b,
1103 0x931c1c1c,0x5c282929,0x2f4a4b4c,0x1b7c7e7e
1104};
1105
1106static const QRgb Go_black_data[] = {
1107 0x0,0x0,0x0,0x184a4a4a,0x664a4a4a,0x89454545,0x763c3c3c,0x302d2d2d,0x2000000,0x0,0x0,0x0,0x0,0x0,
1108 0x6d505050,0xf5535353,0xff525252,0xff4d4d4d,0xff454545,0xfd393939,0xb3272727,0x18080808,0x1000000,0x0,0x0,0x64505050,0xfe575757,0xff595959,
1109 0xff585858,0xff4d4d4d,0xff464646,0xff3d3d3d,0xff313131,0xce1a1a1a,0x1d000000,0x1000000,0xb474747,0xec525252,0xff575757,0xff989898,0xffa2a2a2,0xff4f4f4f,
1110 0xff434343,0xff3b3b3b,0xff313131,0xff212121,0x98090909,0x12000000,0x48474747,0xff515151,0xff545454,0xff888888,0xff787878,0xff474747,0xff3f3f3f,0xff373737,
1111 0xff2d2d2d,0xff212121,0xe80f0f0f,0x3f000000,0x64424242,0xff4b4b4b,0xff4c4c4c,0xff4c4c4c,0xff474747,0xff404040,0xff3a3a3a,0xff323232,0xff282828,0xff1e1e1e,
1112 0xf8111111,0x6e000000,0x4b363636,0xff434343,0xff444444,0xff424242,0xff3f3f3f,0xff3a3a3a,0xff333333,0xff2b2b2b,0xff222222,0xff1b1b1b,0xfa0e0e0e,0x82000000,
1113 0x101b1b1b,0xf1343434,0xff3b3b3b,0xff3a3a3a,0xff363636,0xff313131,0xff2b2b2b,0xff232323,0xff1c1c1c,0xff1a1a1a,0xf3050505,0x75000000,0x2000000,0x861d1d1d,
1114 0xff2d2d2d,0xff2f2f2f,0xff2c2c2c,0xff282828,0xff212121,0xff1c1c1c,0xff1b1b1b,0xfe0f0f0f,0xd8000000,0x4a000000,0x0,0x15000000,0xb4101010,0xfe1e1e1e,
1115 0xff1f1f1f,0xff1d1d1d,0xff1b1b1b,0xff1a1a1a,0xfe0e0e0e,0xed000000,0x8f000000,0x18000000,0x0,0x2000000,0x28000000,0x97020202,0xe90a0a0a,0xf90d0d0d,
1116 0xfb0a0a0a,0xf6030303,0xdf000000,0x95000000,0x2c000000,0x3000000,0x0,0x0,0x2000000,0x1b000000,0x55000000,0x89000000,0x9c000000,0x8b000000,
1117 0x58000000,0x1d000000,0x3000000,0x0
1118};
1119
1120static const QRgb Go_white_data[] = {
1121 0x0,0x0,0x0,0x0,0x10d0d0d,0x730302c,0xb282825,0x7000000,0x2000000,0x0,0x0,0x0,0x0,0x0,
1122 0x1000000,0x50bdbdac,0xc7cecebb,0xf5d3d3c0,0xf8c3c3b1,0xde99998b,0x875b5b52,0x17030303,0x2000000,0x0,0x0,0x0,0x86cdcdba,0xfef7f7e2,
1123 0xfffdfde8,0xfff8f8e1,0xffe7e7d2,0xffcdcdba,0xffa6a697,0xd355554d,0x2a020202,0x2000000,0x0,0x4dc5c5b2,0xfef7f7e2,0xfffffff0,0xfffffff1,0xfffdfde9,
1124 0xffeeeed8,0xffd7d7c3,0xffb7b7a6,0xff87877a,0xbf2b2b27,0x1a000000,0x1000000,0xc4d1d1be,0xfffdfde8,0xfffffff1,0xfffffffd,0xfffffff7,0xffececd6,0xffd5d5c1,
1125 0xffb7b7a6,0xff8e8e81,0xfa474740,0x51000000,0x53e3e38,0xf4d4d4c0,0xfff8f8e1,0xfffdfde9,0xfffffff7,0xfffafaec,0xffe2e2cd,0xffcbcbb8,0xffafaf9e,0xff88887b,
1126 0xff4c4c45,0x8b070706,0x8383833,0xf7c3c3b2,0xffe7e7d2,0xffeeeed8,0xffececd6,0xffe2e2cd,0xffd1d1be,0xffbcbcaa,0xff9f9f90,0xff79796d,0xff40403a,0x9d070706,
1127 0x3000000,0xd89d9d8f,0xffcdcdba,0xffd7d7c3,0xffd5d5c1,0xffcbcbb8,0xffbcbcaa,0xffa6a697,0xff89897c,0xff616158,0xfe2c2c28,0x87010101,0x1000000,0x7a65655b,
1128 0xffa6a697,0xffb7b7a6,0xffb7b7a6,0xffafaf9e,0xff9f9f90,0xff89897c,0xff6a6a60,0xff3f3f39,0xf2161613,0x5b000000,0x0,0xe060605,0xca585851,0xff87877a,
1129 0xff8e8e81,0xff88887b,0xff79796d,0xff616158,0xff3f3f39,0xfc1e1e1b,0xa7010101,0x23000000,0x0,0x1000000,0x1f030303,0xb62d2d29,0xfa474740,0xff4c4c45,
1130 0xff40403a,0xfe2c2c28,0xf2161613,0xa7010101,0x39000000,0x5000000,0x0,0x0,0x1000000,0x14000000,0x44010100,0x7e080807,0x8e080807,0x7a010101,
1131 0x55000000,0x22000000,0x5000000,0x0
1132};
1133
1134static const QRgb Go_data[] = {
1135 0x5000000,0x8000000,0xd000000,0x14000000,0x19000000,0x1d000000,0x20000000,0x22000000,0x22000000,0x22000000,0x22000000,0x22000000,0x22000000,0x22000000,
1136 0x22000000,0x22000000,0x22000000,0x22000000,0x22000000,0x22000000,0x22000000,0x22000000,0x22000000,0x22000000,0x22000000,0x22000000,0x20000000,0x1e000000,
1137 0x19000000,0x14000000,0xe000000,0x9000000,0x8000000,0x11010112,0x2a04033b,0x3803022d,0x40020221,0x4702021d,0x4b02021b,0x4d02021a,0x4d02021a,0x4d02021a,
1138 0x4d02021a,0x4d02021b,0x4d02021b,0x4c02021b,0x4c02021b,0x4c02021c,0x4c02021c,0x4c02021c,0x4c02021c,0x4c02021c,0x4c02021c,0x4c02021c,0x4c02021c,0x4c02021c,
1139 0x4c02021c,0x4c02021c,0x4a02021b,0x46010115,0x3e010108,0x27000001,0x19000000,0x10000000,0xd000000,0x2a04023a,0xbf09076c,0xde121764,0xe00f1752,0xe10e164e,
1140 0xe20e164e,0xe20d154d,0xe20d154d,0xe20e164d,0xe20e164e,0xe20e164f,0xe20e174f,0xe20e174f,0xe20e174f,0xe20e1750,0xe20e1750,0xe20e1750,0xe20e1750,0xe20e1750,
1141 0xe20e1750,0xe20e1750,0xe20e1750,0xe20e1750,0xe20e1750,0xe20e1750,0xe20e174d,0xe1071135,0xd0020513,0x53000105,0x2a000000,0x1a000000,0x14000000,0x3803022d,
1142 0xde121764,0xffb5a364,0xffd6d66a,0xffd5d867,0xffd5d96d,0xffd5d562,0xffd5d769,0xffd5d764,0xffd5d76a,0xffd5d663,0xffd5d866,0xffd6da6f,0xffd6d86a,0xffd6d968,
1143 0xffd6da6d,0xffd6d763,0xffd6d86a,0xffd6d865,0xffd6d96a,0xffd6d764,0xffd6d966,0xffd6da70,0xffd6d86a,0xffd6d968,0xffd5da6c,0xffcfd25b,0xf2ac9e48,0x70000002,
1144 0x3e000000,0x28000000,0x19000000,0x41020221,0xe00f1752,0xff9f7f42,0xfff7ba50,0xfffdc155,0xfffdc35a,0xfffcbf53,0xfffcc056,0xffdaa342,0xffc8973e,0xfffcbf52,
1145 0xfffdbf50,0xfffdc359,0xfffcbf53,0xfffdc155,0xfffdc35a,0xfffcbf53,0xfffcc056,0xffdaa342,0xffc8973e,0xfffcbf52,0xfffdbf50,0xfffdc359,0xfffcbf53,0xfffdc155,
1146 0xfffdc35a,0xfffcc053,0xf5c49142,0x84000000,0x4f000000,0x32000000,0x1e000001,0x4802011e,0xe10d154d,0xff987a40,0xfff2af4a,0xfffcb853,0xfffcb751,0xfffab64f,
1147 0xfffab54f,0xffc9903b,0xffb07d33,0xfffab54d,0xfffcb64f,0xfffcba56,0xfffab54c,0xfffcb853,0xfffcb751,0xfffab64f,0xfffab54f,0xffc9903b,0xffb07d33,0xfffab54d,
1148 0xfffcb64f,0xfffcba56,0xfffab54c,0xfffcb853,0xfffcb751,0xfffab64f,0xf6be893d,0x93000000,0x5c000000,0x3b000000,0x20000001,0x4d02011c,0xe20c144b,0xff98793f,
1149 0xfff2b04c,0xfffcb853,0xfffcb64f,0xfff8b24c,0xfff2b04d,0xffbe8737,0xffa4742e,0xffeead4c,0xfff7b24d,0xfffbb753,0xfffab54e,0xfffcb853,0xfffcb64f,0xfffab44d,
1150 0xfffab650,0xffca903b,0xffb07d32,0xfffab650,0xfffcb64f,0xfffcb854,0xfffab54e,0xfffcb853,0xfffcb64f,0xfffab54d,0xf7bd8a3d,0x9d000000,0x65000000,0x40000000,
1151 0x22000001,0x5102011d,0xe30c134a,0xff987940,0xfff2b04e,0xfffcb64e,0xfff9b451,0xffe8a745,0xffd8ba84,0xffd7d1b6,0xffc3c0a9,0xffac9972,0xffd09945,0xfff2b04f,
1152 0xfff9b54f,0xfffcb64e,0xfffcb752,0xfffab349,0xfffab54f,0xffc98f39,0xffaf7d32,0xfffab54d,0xfffcb64e,0xfffcb853,0xfffab650,0xfffcb64e,0xfffcb752,0xfffab44a,
1153 0xf8bd893c,0xa3000000,0x6a000000,0x43000000,0x23000001,0x5202011c,0xe30c1249,0xff97783f,0xfff2b251,0xfffbb54c,0xffedad4e,0xffd9c293,0xfffefeed,0xfffefeea,
1154 0xffeaead4,0xffc1c1af,0xff827b66,0xffd29945,0xfff3b250,0xfffcb64d,0xfffcb853,0xfffab44c,0xfffab54e,0xffc9903b,0xffae7c31,0xfffab651,0xfffcb64f,0xfffcb752,
1155 0xfffab853,0xfffcb64d,0xfffcb853,0xfffab54d,0xf8bb883d,0xa5000002,0x6c000001,0x44000000,0x23000001,0x5202011c,0xe30b1249,0xff97773e,0xffcb9543,0xffc78f3d,
1156 0xffaf8442,0xfff0f0d9,0xfffffff2,0xfffffffb,0xffe9e9d4,0xffc2c2b0,0xff87877a,0xff715831,0xffba883c,0xffc9903d,0xffc99342,0xffc8913f,0xffc8913e,0xffa17533,
1157 0xff8b6429,0xffc8913e,0xffc9913d,0xffca9240,0xffc89241,0xffca913e,0xffc99342,0xffc8913f,0xf8ac7e39,0xa7000003,0x6e000002,0x46000001,0x23000001,0x5202011c,
1158 0xe30b1248,0xff97763c,0xffb7863c,0xffad7d36,0xff967846,0xffe4e4cf,0xfff4f4df,0xfff0f0dd,0xffd5d5c1,0xffb1b1a1,0xff79796e,0xff504128,0xff9d7232,0xffae7e36,
1159 0xffaf7f38,0xffb07f36,0xffaf7f37,0xff8d6428,0xff7a5927,0xffaf7f37,0xffb07e34,0xffb07e35,0xffaf7f38,0xffb07f37,0xffaf7f38,0xffb17f36,0xf9a57938,0xab000005,
1160 0x71000005,0x49000004,0x23000001,0x5202011c,0xe30b1248,0xff97773e,0xfff2b04d,0xfff8b24c,0xffc89446,0xffbab9a6,0xffd2d2be,0xffcbcbb8,0xffb5b5a4,0xff919183,
1161 0xff56564e,0xff75592d,0xffe2a448,0xfffab34d,0xfffab751,0xfffbb44c,0xfffab651,0xffc9903d,0xffae7d33,0xfffbb54c,0xfffcb54e,0xfffcb751,0xfffab650,0xfffcb54e,
1162 0xfffab751,0xfffbb54c,0xf9bc8a41,0xb1000008,0x77000007,0x4d000007,0x23000001,0x5202011c,0xe30b1248,0xff97783f,0xfff2b04d,0xfffab34c,0xffdea24a,0xff8e7952,
1163 0xff99998b,0xff9a9a8b,0xff858578,0xff5c5c54,0xff3c3629,0xffb7863d,0xffebab4a,0xfffbb44c,0xfffcb854,0xfffab34a,0xfffbb650,0xffc9903b,0xffaf7e35,0xfffab44b,
1164 0xfffcb64e,0xfffcb854,0xfffab64f,0xfffcb54d,0xfffcb854,0xfffab44a,0xfabb883f,0xb700000b,0x7e00000a,0x51000008,0x23000001,0x5202011c,0xe30b1248,0xff97783f,
1165 0xfff2b14e,0xfffbb54d,0xfff0af4f,0xffcb923c,0xff7b6139,0xff514a3b,0xff403c32,0xff4f3f26,0xffa47632,0xffdfa34b,0xfff5b24e,0xfffcb64e,0xfffcb853,0xfffab34a,
1166 0xfffab651,0xffc9903a,0xffaf7e36,0xfffab44b,0xfffcb54c,0xfffcb955,0xfffab650,0xfffcb64e,0xfffcb853,0xfffab44a,0xfabb883e,0xbd00000e,0x8400000c,0x5500000a,
1167 0x23000001,0x5202011c,0xe30b1248,0xff97773e,0xfff2b04c,0xfffcb751,0xfffab754,0xffecab4a,0xffd79d46,0xff9b6e2b,0xff835c24,0xffc9923f,0xffe3a344,0xfff5b351,
1168 0xfff9b44d,0xfffcb751,0xfffcb955,0xfff9b54f,0xfffab652,0xffc98f38,0xffaf7c31,0xfffab54e,0xfffcb54c,0xfffcb954,0xfffab54e,0xfffcb751,0xfffcb955,0xfffab64f,
1169 0xfabb8840,0xc0000010,0x8700000e,0x5700000b,0x23000001,0x5202011c,0xe30c1249,0xff97783f,0xfff2af4a,0xfffcb853,0xfffcb751,0xfff9b54e,0xfff4b04d,0xffbe8837,
1170 0xffa4752f,0xffeeac49,0xfff7b24d,0xfffbb955,0xfffab54c,0xfffcb853,0xfffcb751,0xfff9b54e,0xfff4b04d,0xffbd8837,0xffa4742f,0xffecab48,0xfff6b14d,0xfffbb955,
1171 0xfffab54c,0xfffcb853,0xfffcb751,0xfffab64f,0xfabb873e,0xc0000010,0x8700000e,0x5700000b,0x23000002,0x5102011d,0xe30c134a,0xff97783e,0xfff2b04c,0xfffcb853,
1172 0xfffcb64f,0xfff5b04b,0xffac7d41,0xff614631,0xff4e3829,0xff7a592f,0xffda9d44,0xfff4b251,0xfff9b44d,0xfffcb853,0xfffab44e,0xffecaa4a,0xffdbbd85,0xffd7d1b6,
1173 0xffc4c0a9,0xffaa9872,0xffcb9545,0xffefae4f,0xfff8b34d,0xfffcb853,0xfffcb64f,0xfffab54d,0xfabb883f,0xbd00000e,0x8400000d,0x5500000a,0x23000001,0x5002011c,
1174 0xe30c144b,0xff987940,0xfff2b04e,0xfffbb54d,0xfff7b350,0xff966c3b,0xff543e3a,0xff503c38,0xff402f2c,0xff312421,0xff3a2a1a,0xffd69c45,0xfff3b14d,0xfffbb54d,
1175 0xfff2af4e,0xffddc593,0xfffefeed,0xfffefeea,0xffeaead4,0xffc1c1af,0xff807966,0xffc89243,0xfff0ae4c,0xfffbb54d,0xfffcb752,0xfffab44a,0xfabb883d,0xb800000c,
1176 0x7e00000a,0x52000008,0x22000001,0x4f02011c,0xe20d154c,0xff987a40,0xfff2b251,0xfffab44c,0xffe1a44b,0xff4f3a35,0xff6c5854,0xff65534f,0xff3a2b28,0xff2d211f,
1177 0xff1b1312,0xff755528,0xffe4a84b,0xfff9b34c,0xffe0a853,0xfff1f0d9,0xfffffff2,0xfffffffb,0xffe9e9d4,0xffc2c2b0,0xff87877a,0xff7d6136,0xffe2a64b,0xfffab44c,
1178 0xfffcb853,0xfffab54d,0xf9ba883e,0xb2000008,0x78000008,0x4d000007,0x22000000,0x4e02021b,0xe20e164e,0xff997a3f,0xffcb9543,0xffc78f3d,0xff9a7137,0xff45332f,
1179 0xff45332f,0xff3d2d2a,0xff322422,0xff251b19,0xff150f0e,0xff3b2b15,0xffaa7c37,0xffc58d3c,0xffaf8a4f,0xffe4e4cf,0xfff4f4df,0xfff0f0dd,0xffd5d5c1,0xffb1b1a1,
1180 0xff79796e,0xff504229,0xffac7d38,0xffc68e3d,0xffc99342,0xffc8913f,0xf9ac7e39,0xac000006,0x72000005,0x49000004,0x22000000,0x4d02021b,0xe20e174f,0xff997a3e,
1181 0xffb7863c,0xffae7e36,0xff90692f,0xff362824,0xff362825,0xff302320,0xff261c1a,0xff191311,0xff100b0a,0xff3b2a13,0xff926a2e,0xffab7b35,0xff967035,0xffb9b9a6,
1182 0xffd2d2be,0xffcbcbb8,0xffb5b5a4,0xff919183,0xff56564e,0xff4d3b20,0xff976e30,0xffad7d36,0xffaf7f38,0xffb17f36,0xf8a57937,0xa8000003,0x6e000002,0x46000001,
1183 0x22000000,0x4d02021b,0xe20e174f,0xff997b40,0xfff2b04d,0xfffbb44d,0xffe3a649,0xff594022,0xff251b19,0xff201816,0xff171110,0xff100c0b,0xff16100b,0xff8d662d,
1184 0xffda9f45,0xfff8b24c,0xffe5a74a,0xff967f55,0xff99998b,0xff9a9a8b,0xff858578,0xff5c5c54,0xff393428,0xffa77a35,0xffe5a749,0xfffab34d,0xfffab751,0xfffbb54c,
1185 0xf8bc8b41,0xa5000002,0x6c000001,0x44000000,0x22000000,0x4c02021b,0xe20e1750,0xff997c42,0xfff2b04d,0xfffcb54d,0xfff2b050,0xffc68e3a,0xff503a1c,0xff17110c,
1186 0xff110d0a,0xff241a0e,0xff705123,0xffbf8b3f,0xffebab4a,0xfffbb44c,0xfff4b251,0xffd4983e,0xff82663b,0xff524b3c,0xff403c32,0xff4b3d25,0xff996f30,0xffd69c47,
1187 0xfff2b04c,0xfffcb54d,0xfffcb854,0xfffab44a,0xf8bc893e,0xa4000000,0x6a000000,0x43000000,0x22000000,0x4c02021c,0xe20e1750,0xff997c41,0xfff2b14e,0xfffcb64e,
1188 0xfffab652,0xffeaa745,0xffcb9442,0xff876127,0xff6a4c20,0xffa37531,0xffc68e3b,0xffe7a94e,0xfff6b34e,0xfffcb64e,0xfffbb752,0xfff1ac47,0xffdda147,0xff9f722d,
1189 0xff835e28,0xffc68e3b,0xffdfa043,0xfff3b252,0xfff9b54f,0xfffcb64e,0xfffcb853,0xfffab44a,0xf8bc893d,0xa3000000,0x6a000000,0x43000000,0x22000000,0x4c02021c,
1190 0xe20e1750,0xff997b40,0xfff2b04c,0xfffcb751,0xfffcb955,0xfff7b34e,0xfff0ae4e,0xffb88333,0xff9c6e2b,0xffe4a547,0xfff1ad48,0xfff9b653,0xfffab54e,0xfffcb751,
1191 0xfffcb955,0xfff8b44e,0xfff7b351,0xffc28a36,0xffa8772f,0xfff2af4b,0xfff9b24b,0xfffbb853,0xfffab54e,0xfffcb751,0xfffcb955,0xfffab64f,0xf8bd8a3f,0xa3000000,
1192 0x6a000000,0x43000000,0x22000000,0x4c02021c,0xe20e1750,0xff997c41,0xfff2af4a,0xfffcb853,0xfffcb751,0xfffab64f,0xfffab54f,0xffc9903b,0xffb07d33,0xfffab54d,
1193 0xfffcb64f,0xfffcba56,0xfffab54c,0xfffcb853,0xfffcb751,0xfffab64f,0xfffab54f,0xffc9903b,0xffb07d33,0xfffab54d,0xfffcb64f,0xfffcba56,0xfffab54c,0xfffcb853,
1194 0xfffcb751,0xfffab64f,0xf8bd893c,0xa3000000,0x69000000,0x43000000,0x20000000,0x4a02021b,0xe20e174d,0xff987b3f,0xfff2b04c,0xfffcb853,0xfffcb64f,0xfffab44d,
1195 0xfffab650,0xffca903b,0xffb07d32,0xfffab650,0xfffcb64f,0xfffcb854,0xfffab54e,0xfffcb853,0xfffcb64f,0xfffab44d,0xfffab650,0xffca903b,0xffb07d32,0xfffab650,
1196 0xfffcb64f,0xfffcb854,0xfffab54e,0xfffcb853,0xfffcb64f,0xfffab54d,0xf7bd893d,0x9e000000,0x65000000,0x41000000,0x1e000000,0x46010115,0xe1071135,0xff8f7438,
1197 0xffe2a448,0xffebaa49,0xffebab4c,0xffe9a744,0xffe9a94a,0xffbf8736,0xffa97830,0xffe9a848,0xffeba949,0xffebab4d,0xffe9a94b,0xffebaa49,0xffebab4c,0xffe9a744,
1198 0xffe9a94a,0xffbf8736,0xffa97830,0xffe9a848,0xffeba949,0xffebab4d,0xffe9a94b,0xffeaaa49,0xffebab4c,0xffeaa745,0xf7b6843a,0x94000000,0x5d000000,0x3b000000,
1199 0x19000000,0x3e010108,0xcf020513,0xf6624a23,0xf93e2d15,0xfa3c2b12,0xfb3d2c14,0xfb3c2b12,0xfb3c2b13,0xfb3d2b12,0xfb3c2b12,0xfb3c2b13,0xfb3c2b13,0xfb3c2c14,
1200 0xfb3c2c14,0xfb3c2b13,0xfc3d2c15,0xfc3c2b13,0xfd3c2b13,0xfd3c2b13,0xfd3c2b13,0xfd3c2b14,0xfc3c2b14,0xfc3c2c14,0xfc3c2c14,0xfb3c2b13,0xfb3c2c14,0xfa3e2c13,
1201 0xef5f451e,0x83000000,0x51000000,0x33000000,0x14000000,0x27000001,0x53000105,0x70000002,0x84000000,0x93000000,0x9d000000,0xa3000000,0xa3000000,0xa3000000,
1202 0xa3000000,0xa3000000,0xa4000002,0xa6000002,0xa9000003,0xaf000007,0xb801010c,0xc102010e,0xc9020112,0xce020113,0xce020113,0xca010112,0xc201010f,0xb900000c,
1203 0xb0000007,0xa9000004,0xa1000002,0x95000002,0x84000000,0x60000000,0x40000000,0x29000000,0xe000000,0x19000000,0x2a000000,0x3e000000,0x4f000000,0x5c000000,
1204 0x65000000,0x69000000,0x6a000000,0x6a000000,0x6a000000,0x6a000000,0x6b000000,0x6d000002,0x70000004,0x77000007,0x8100000c,0x8d000010,0x96000013,0x9b000014,
1205 0x9b000014,0x97000013,0x8e000011,0x8300000d,0x78000008,0x71000005,0x68000003,0x5e000001,0x50000000,0x40000000,0x2c000000,0x1c000000,0x8000000,0x10000000,
1206 0x1a000000,0x28000000,0x32000000,0x3b000000,0x40000000,0x43000000,0x43000000,0x43000000,0x43000000,0x43000000,0x44000000,0x45000001,0x49000004,0x4e000007,
1207 0x5600000c,0x5f00000f,0x66000011,0x6b000012,0x6b000012,0x67000011,0x6000000f,0x5700000d,0x4f000008,0x49000004,0x43000001,0x3c000000,0x33000000,0x29000000,
1208 0x1c000000,0x12000000
1209};
1210
1211static const QRgb HelpBrowser_data[] = {
1212 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3000000,0x6000000,0xb000000,0x12000000,0x19000000,0x21000000,0x29000000,0x2f000000,
1213 0x34000000,0x37000000,0x39040404,0x38050505,0x35050505,0x30050505,0x2a060606,0x22080808,0x1a0a0a0a,0x130d0d0d,0xc151515,0x7242424,0x3000000,0x1000000,
1214 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,
1215 0x5d686839,0x938a8a4a,0xbe9a9a50,0xdea5a552,0xf3aaaa52,0xfeabab4f,0xf3a5a545,0xe09a9a3d,0xc58a8a33,0xa0737327,0x724f4f1a,0x410c0c0c,0x350e0e0e,0x280d0d0d,
1216 0x1d121212,0x120e0e0e,0xb171717,0x5000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,
1217 0x16000000,0x23000000,0x6f7d7d47,0xba9f9f5a,0xf7aca55c,0xffa69750,0xff9c8744,0xff937a3a,0xff8c6e31,0xff86672b,0xff856729,0xff866b27,0xff887327,0xff8c7d26,
1218 0xf9908928,0xc77d7d20,0x8a575716,0x49111111,0x36131313,0x26141414,0x18151515,0xe121212,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,
1219 0x2000000,0x7000000,0xe000000,0x1a000000,0x475c5c36,0xa79b9b5b,0xf8ada35f,0xffa28e4e,0xff977b41,0xff95783c,0xff93783b,0xff917638,0xff8d7333,0xff896e2f,
1220 0xff856a2a,0xff816424,0xff7d5e20,0xff78591b,0xff755617,0xff7e6918,0xfa837a17,0xbe6f6f14,0x6f39390f,0x42131313,0x2d111111,0x1c121212,0xf111111,0x7000000,
1221 0x2000000,0x1000000,0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x5f777746,0xcba5a15f,0xffa79655,0xff9a7e44,0xff997d44,0xff9a8044,0xff987f43,
1222 0xff988041,0xff947e3c,0xff907a38,0xff8b7433,0xff866e2d,0xff816727,0xff7b6122,0xff765c1e,0xff725619,0xff6f5015,0xff6c4d12,0xff786610,0xdc726e0d,0x8945450f,
1223 0x4a151515,0x31151515,0x1d121212,0xf111111,0x7242424,0x2000000,0x1000000,0x5000000,0xd000000,0x1a000000,0x5f777746,0xd8a69f5e,0xffa28c4f,0xff997d44,
1224 0xff9b8347,0xff9e8649,0xff9e894b,0xff9e8948,0xff9a8845,0xff958240,0xff8e7c3a,0xff887533,0xff806c2c,0xff7b6627,0xff755f22,0xff705a1d,0xff6e561a,0xff6b5117,
1225 0xff684c14,0xff654510,0xff6c550f,0xe66d670e,0x8e414110,0x4d171717,0x31151515,0x1d1a1a1a,0xe121212,0x62b2b2b,0x3000000,0xa000000,0x16000000,0x475c5c36,
1226 0xcba5a15f,0xffa28b4f,0xff997d45,0xff9e8549,0xffa18a4c,0xffa18d50,0xffa1914e,0xff9e8f4d,0xff998a48,0xff928341,0xff8f8245,0xffa09669,0xffb4ad8c,0xffb1a888,
1227 0xffaea586,0xff908258,0xff6f5c26,0xff654f17,0xff644c14,0xff634914,0xff5f4313,0xff675011,0xe0686410,0x80323212,0x4a151515,0x2d171717,0x18151515,0xb171717,
1228 0x6000000,0x11000000,0x23000000,0xa79b9b5b,0xffa69454,0xff997b43,0xff9d8248,0xffa18b4d,0xffa28f51,0xffa39553,0xffa29652,0xff9d924d,0xff9a9053,0xffcfcbb2,
1229 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff4f3ef,0xffa69c80,0xff5c4716,0xff5e4718,0xff5e4418,0xff5c3f16,0xff685612,0xcb5c5c12,
1230 0x66171717,0x43171717,0x26141414,0x120e0e0e,0xb000000,0x1b000000,0x6f7d7d47,0xf8aca25e,0xff987941,0xff9a7f44,0xff9e884a,0xffa18e50,0xffa49554,0xffa49955,
1231 0xffa19752,0xff9e9758,0xffe8e7db,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffa19881,0xff584319,
1232 0xff5b441b,0xff5a411a,0xff583d16,0xfb696113,0xa7424214,0x5a171717,0x37171717,0x1d121212,0x12000000,0x26000000,0xba9f9f5a,0xff9f8b4b,0xff967840,0xff9b8146,
1233 0xffa08a4d,0xffa49251,0xffa59a55,0xffa49a54,0xff9d9651,0xffe9e9dc,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
1234 0xffffffff,0xffffffff,0xfff3f2ef,0xff4f3e19,0xff56431d,0xff59421e,0xff573d1b,0xff5f4d17,0xda5b5b14,0x72191919,0x49151515,0x29131313,0x19000000,0x5d686839,
1235 0xf7aba45b,0xff93743c,0xff95793f,0xff9b8246,0xffa08c4b,0xffa59552,0xffa59a54,0xffa29a53,0xffc8c59f,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffc4c3b2,
1236 0xff777451,0xff807c5e,0xfff2f1ef,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff473a18,0xff52411e,0xff564120,0xff583e1f,0xff553a1b,0xfb655f15,0xa0343415,
1237 0x5b161616,0x36131313,0x21000000,0x938a8a4a,0xffa4944e,0xff907037,0xff957a3d,0xff9b8243,0xffa08c4a,0xffa3934e,0xffa49851,0xff9d9850,0xfff1f1e8,0xffffffff,
1238 0xffffffff,0xffffffff,0xffeae9e2,0xff4e4a15,0xff46420f,0xff40390a,0xffd9d7cf,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff433617,0xff503f1f,0xff564223,
1239 0xff574124,0xff523a1f,0xff5e5218,0xc6474716,0x6d171717,0x43131313,0x29000000,0xbe9a9a50,0xff998240,0xff8e6f35,0xff93783c,0xff988141,0xff9d8946,0xff9f9149,
1240 0xffa0954c,0xff9b9449,0xffa7a367,0xffa6a36f,0xffb4b38f,0xffacac88,0xff929066,0xff514d12,0xff49440b,0xff989478,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
1241 0xffafab9f,0xff423618,0xff4e3e20,0xff564425,0xff574226,0xff543c23,0xff59481c,0xe1535317,0x7b191919,0x4e141414,0x2f000000,0xdea5a552,0xff8e7336,0xff8c6b32,
1242 0xff907537,0xff957e3d,0xff9b8642,0xff9c8e45,0xff9d9045,0xff999042,0xff928b3d,0xff858235,0xff79752a,0xff6b6820,0xff5f5b16,0xff5e591c,0xffc3c1ac,0xffffffff,
1243 0xffffffff,0xffffffff,0xffffffff,0xfff1f1ef,0xff443a20,0xff443619,0xff4f4023,0xff564529,0xff59442b,0xff543d26,0xff523e1f,0xf05a5a17,0x881a1a1a,0x58141414,
1244 0x34000000,0xf3aaaa52,0xff86662c,0xff88692d,0xff8d7133,0xff927a39,0xff96813c,0xff98863e,0xff9a8b3e,0xff968b3b,0xff8f8735,0xff86802c,0xff7a7523,0xff6e6819,
1245 0xff7e793c,0xffe9e8df,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffd7d5cf,0xff4d452a,0xff3c3113,0xff473a1d,0xff524226,0xff59472d,0xff59442d,0xff543e2a,
1246 0xff4d3821,0xfa5f5f18,0x901b1b1b,0x5f181818,0x37000000,0xfeabab4f,0xff805d25,0xff856329,0xff8a6d2f,0xff8d7432,0xff917a35,0xff938037,0xff928234,0xff928532,
1247 0xff8c822c,0xff857b23,0xff79711a,0xff7e772f,0xfff4f4ef,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff9f9b8b,0xff3f3517,0xff392e0e,0xff423616,0xff4c3e20,
1248 0xff544429,0xff594830,0xff584630,0xff543f2c,0xff4b3323,0xfe60601a,0x951b1b1b,0x64171717,0x39040404,0xf3a5a545,0xff815e24,0xff815f25,0xff85672a,0xff886e2d,
1249 0xff8c742f,0xff8e792f,0xff8e7d2d,0xff8c7d2a,0xff877a23,0xff7f741b,0xff746a12,0xffd6d3bc,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff837d66,0xff312805,
1250 0xff372c0a,0xff3e3211,0xff47391a,0xff504125,0xff57462d,0xff5b4933,0xff584632,0xff523e2d,0xff4b3623,0xfb5a5a1a,0x971b1b1b,0x65171717,0x38050505,0xe09a9a3d,
1251 0xff816224,0xff7d5b21,0xff816225,0xff846929,0xff866d28,0xff877229,0xff887326,0xff867522,0xff81711a,0xff786a13,0xff766a19,0xffffffff,0xffffffff,0xffffffff,
1252 0xffffffff,0xff908b76,0xff312803,0xff352a07,0xff3b2f0d,0xff423515,0xff4d3d1f,0xff55452b,0xff594a32,0xff5b4935,0xff594735,0xff503d2d,0xff4c3b24,0xf351511a,
1253 0x951a1a1a,0x63151515,0x35050505,0xc58a8a33,0xff846c24,0xff78551c,0xff7c5b20,0xff7e6222,0xff816725,0xff826a24,0xff826c21,0xff7f6b1b,0xff7a6715,0xff72610c,
1254 0xff786a25,0xffa39c77,0xff9b9577,0xff959076,0xff918c76,0xff4c4323,0xff332906,0xff392d0b,0xff403412,0xff493b1c,0xff514226,0xff584830,0xff5c4b36,0xff5c4b39,
1255 0xff574535,0xff4e3b2d,0xff4c3f22,0xe747471a,0x901b1b1b,0x5e161616,0x30050505,0xa0737327,0xff897925,0xff734f17,0xff77561c,0xff7a5c1e,0xff7c6120,0xff7d6420,
1256 0xff7c651d,0xff796318,0xff736011,0xff69570c,0xff7b6e37,0xff7c7349,0xff736b48,0xff6c6447,0xff696148,0xff332907,0xff372c0a,0xff3d3110,0xff453719,0xff4e4023,
1257 0xff56472e,0xff5a4b35,0xff5c4d3a,0xff5a493a,0xff544234,0xff4b372b,0xff4f4620,0xd53b3b1a,0x87191919,0x58141414,0x2a060606,0x724f4f1a,0xf98f8727,0xff714d16,
1258 0xff725018,0xff75561b,0xff765b1c,0xff79601d,0xff78601b,0xff745e17,0xff6d5815,0xff635011,0xffd1cdbe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff352a0c,
1259 0xff3b2f11,0xff433518,0xff4b3d22,0xff53442b,0xff594a34,0xff5c4d3a,0xff5c4d3c,0xff574739,0xff503f32,0xff483528,0xfd4f4c1e,0xbb2c2c1a,0x7b191919,0x4e141414,
1260 0x22080808,0x410c0c0c,0xc77d7d20,0xff7b6317,0xff6d4915,0xff6f4f18,0xff72551b,0xff74591b,0xff745b1c,0xff70591b,0xff695519,0xff604c17,0xffffffff,0xffffffff,
1261 0xffffffff,0xffffffff,0xffc8c5be,0xff372c12,0xff413319,0xff483a21,0xff50422a,0xff574833,0xff5c4d3a,0xff5d4d3d,0xff5a4a3c,0xff544437,0xff4b392e,0xff4a3f24,
1262 0xe943431c,0x9a1a1a1a,0x6c151515,0x420f0f0f,0x1a0a0a0a,0x350e0e0e,0x8a575716,0xfa837717,0xff694612,0xff694814,0xff6d4e17,0xff6f531c,0xff71551f,0xff6d541f,
1263 0xff67521f,0xff706038,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffafaaa1,0xff3c3019,0xff443821,0xff4d3f29,0xff554632,0xff5a4c39,0xff5d4d3d,0xff5c4c3e,
1264 0xff564539,0xff4f3e33,0xff483629,0xfd4c471f,0xc830301b,0x87191919,0x5b141414,0x350e0e0e,0x130d0d0d,0x280d0d0d,0x480e0e0e,0xbe6f6f14,0xff77610f,0xff634011,
1265 0xff674616,0xff694b1c,0xff6c4f20,0xff685022,0xff634e23,0xff92856b,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff958f84,0xff413621,0xff4a3d29,0xff524330,
1266 0xff564937,0xff5b4c3c,0xff5b4b3d,0xff57473b,0xff513f34,0xff48362c,0xff4b4023,0xe23f3f1c,0x9b1c1c1c,0x72161616,0x49111111,0x280d0d0d,0xc151515,0x1d121212,
1267 0x36131313,0x703a3a11,0xdc726d0d,0xff6b520f,0xff603d14,0xff63431a,0xff65481f,0xff644a22,0xff614824,0xff5b4524,0xff524022,0xff493920,0xff433520,0xff413420,
1268 0xff423623,0xff473a28,0xff4f402f,0xff544535,0xff58483a,0xff59493b,0xff554539,0xff514035,0xff4a382e,0xff493b25,0xf146441e,0xb427271c,0x81181818,0x5a141414,
1269 0x350e0e0e,0x1c090909,0x7242424,0x120e0e0e,0x26141414,0x42131313,0x8947470f,0xe66d660d,0xff664d11,0xff5c3a17,0xff5e401c,0xff5f4320,0xff5d4324,0xff594326,
1270 0xff544026,0xff4f3d26,0xff4b3b27,0xff493a28,0xff4a3b2a,0xff4e3e2e,0xff524333,0xff554537,0xff554437,0xff534236,0xff4f3e33,0xff48362c,0xff493b25,0xf446421e,
1271 0xc22e2e1c,0x8c1a1a1a,0x65141414,0x42131313,0x250e0e0e,0x120e0e0e,0x3000000,0xb171717,0x18151515,0x2d111111,0x4a151515,0x8e434310,0xe0686510,0xff685412,
1272 0xff593a17,0xff57391c,0xff583c20,0xff563e24,0xff543d26,0xff523d28,0xff503c29,0xff4d3c2b,0xff4f3d2d,0xff503f30,0xff514032,0xff504032,0xff4f3d31,0xff4b392e,
1273 0xff473629,0xff4b3f23,0xf146441e,0xc22e2e1c,0x8f1b1b1b,0x6b151515,0x4a111111,0x2d111111,0x170b0b0b,0xa000000,0x1000000,0x5000000,0xe121212,0x1c121212,
1274 0x31151515,0x4d171717,0x80333314,0xcb5c5c12,0xfb696013,0xff5f4a17,0xff52361b,0xff51351f,0xff503723,0xff4e3825,0xff4e3827,0xff4e3929,0xff4c392a,0xff4d382b,
1275 0xff4c372c,0xff4a362a,0xff483528,0xff4a3e24,0xfd4c471f,0xe23f3f1c,0xb427271c,0x8c1a1a1a,0x6b151515,0x4c111111,0x30101010,0x1b090909,0xd000000,0x5000000,
1276 0xffffff,0x2000000,0x6000000,0xf111111,0x1d121212,0x31151515,0x4a151515,0x66171717,0xa7424214,0xda5b5b14,0xfb655e15,0xff5c4f18,0xff56441c,0xff4f3b1f,
1277 0xff4b3420,0xff483122,0xff483322,0xff4b3823,0xff4b3f22,0xff504621,0xfd4f4c1e,0xe943431c,0xc830301b,0x9b1c1c1c,0x81181818,0x65141414,0x4a111111,0x30101010,
1278 0x1c090909,0xe000000,0x6000000,0x2000000,0xffffff,0x1000000,0x2000000,0x7000000,0x10202020,0x1d1a1a1a,0x2d171717,0x43171717,0x5a171717,0x72191919,
1279 0xa0343415,0xc6474716,0xe1535317,0xf05a5a17,0xfa5f5f18,0xfe60601a,0xfb5a5a1a,0xf351511a,0xe747471a,0xd53b3b1a,0xbb2c2c1a,0x9a1a1a1a,0x87191919,0x72161616,
1280 0x5a141414,0x42131313,0x2d111111,0x1b090909,0xe000000,0x7000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,0x2000000,0x7242424,0xe121212,
1281 0x18151515,0x26141414,0x37171717,0x49151515,0x5b161616,0x6d171717,0x7b191919,0x881a1a1a,0x901b1b1b,0x951b1b1b,0x971b1b1b,0x951a1a1a,0x901b1b1b,0x87191919,
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,
1284 0x65171717,0x63151515,0x5e161616,0x58141414,0x4e141414,0x420f0f0f,0x350e0e0e,0x280d0d0d,0x1c090909,0x120e0e0e,0xa000000,0x5000000,0x2000000,0x1000000,
1285 0xffffff,0xffffff
1286};
1287
1288static const QRgb HelpButton_data[] = {
1289 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
1290 0xffffff,0xffffff,0xffffff,0x3edcdcdc,0x93dbdbdb,0xd5dedede,0xfadcdcdc,0xd8d1d1d1,0x9ec8c8c8,0x509d9d9d,0xc000000,0x3000000,0xffffff,0xffffff,
1291 0xffffff,0xffffff,0x60dcdcdc,0xdbe3e3e3,0xffe2e2e2,0xffd3d3d3,0xffcecece,0xffcdcdcd,0xffd7d7d7,0xe6c5c5c5,0x838d8d8d,0x18000000,0x4000000,0xffffff,
1292 0xffffff,0x3edddcdc,0xdbdadada,0xffd8d8d8,0xffaaa9a9,0xff434343,0xff424142,0xff686768,0xffc4c4c4,0xffbdbdbd,0xec9e9d9e,0x75595959,0x18000000,0x3000000,
1293 0xffffff,0x94d5d6d5,0xffd1d0d0,0xffbdbdbd,0xff000000,0xff737373,0xffbdbdbd,0xff000000,0xff717171,0xffb6b7b6,0xffabaaaa,0xc8616161,0x3d000000,0xc000000,
1294 0xffffff,0xd5cbcbcb,0xffbbbbbb,0xffadadad,0xff6d6d6d,0xff868686,0xffb5b5b5,0xff000000,0xff6a6a6a,0xffb1b1b1,0xffb1b1b1,0xef616161,0x61000000,0x1a000000,
1295 0xffffff,0xfabfbfbf,0xffababab,0xffa4a4a4,0xffb2b2b2,0xffa6a6a6,0xff545454,0xff2a2a2a,0xff979797,0xffaeaeae,0xffa2a2a2,0xfd5d5d5d,0x7c000000,0x25000000,
1296 0xffffff,0xd9b0b0b0,0xffa0a0a0,0xffa6a6a6,0xff9f9f9f,0xff606060,0xff000000,0xffa0a0a0,0xffa6a6a6,0xffa3a3a3,0xff8c8c8c,0xf2484848,0x85000000,0x2b000000,
1297 0xffffff,0xa0949494,0xff9b9b9a,0xff9a9a9a,0xffa5a5a5,0xff9d9d9d,0xffa1a1a0,0xffa4a4a4,0xff9b9b9b,0xff9a9b9a,0xff6a696a,0xdf363636,0x7c000000,0x25000000,
1298 0xffffff,0x516f6f6f,0xe7818181,0xff8d8d8d,0xff949494,0xff545454,0xff353535,0xff9e9e9e,0xff8f8f8f,0xff737273,0xf5414141,0xbb1a1a1a,0x61000000,0x1a000000,
1299 0xffffff,0xc000000,0x84505050,0xed626262,0xff6f6e6e,0xff656565,0xff353535,0xff767576,0xff636263,0xf5414140,0xcd1f1f1f,0x83000000,0x3d000000,0xc000000,
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,
1302 0xffffff,0xffffff,0xffffff,0x3000000,0xc000000,0x1a000000,0x25000000,0x2b000000,0x25000000,0x1a000000,0xc000000,0x3000000,0xffffff,0xffffff
1303};
1304
1305static const QRgb ImageViewer_data[] = {
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,
1308 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xfff0dc5c,0xfff0dc5c,0xfff0dc5c,0xfff0dc5c,0xfff0dc5c,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
1309 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
1310 0x3d000000,0xfff0dc5c,0xfff0dc5c,0xfff0dc5c,0xfff0dc5c,0xfff0dc5c,0x18000000,0xf000000,0xc000000,0xfff0dc5c,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,
1311 0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,
1312 0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xff7c4000,0x29000000,0x18000000,0x12000000,0xfff0dc5c,
1313 0xffbc8000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,
1314 0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xff9c6000,0xff7c4000,
1315 0x3d000000,0x25000000,0x17000000,0xfff0dc5c,0xffbc8000,0xffac7000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,
1316 0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,
1317 0xffd09c14,0xffac7000,0xff9c6000,0xff7c4000,0x4e000000,0x2e000000,0x1b000000,0xfff0dc5c,0xffbc8000,0xffac7000,0xff9c6000,0xff7c4000,0xff7c4000,0xff7c4000,
1318 0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,
1319 0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,0xffd09c14,0xffac7000,0xff9c6000,0xff7c4000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xffbc8000,0xffac7000,
1320 0xff9c6000,0xff7c4000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
1321 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,0xff9c6000,0x93000000,0x62000000,0x3b000000,
1322 0x1f000000,0x3d000000,0xffbc8000,0xffac7000,0xff9c6000,0xff7c4000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
1323 0xffffffff,0xff020204,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,
1324 0xff9c6000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xffbc8000,0xffac7000,0xff9c6000,0xff7c4000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
1325 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff020204,0xff020204,0xff060507,0xff1f1e1d,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
1326 0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,0xff9c6000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xffbc8000,0xffac7000,0xff9c6000,0xff7c4000,
1327 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff020204,0xff030305,0xff020204,0xff030304,0xff020204,0xff020204,0xffffffff,
1328 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,0xff9c6000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3e000000,
1329 0xffbc8000,0xffac7000,0xff9c6000,0xff7c4000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff020204,0xffd6d6d5,0xff030204,
1330 0xff8a8a89,0xff121214,0xff020204,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,0xff9c6000,0x99000000,
1331 0x66000000,0x3d000000,0x21000000,0x42000000,0xffbc8000,0xffac7000,0xff9c6000,0xff7c4000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
1332 0xffffffff,0xff020204,0xff795407,0xffd7b00b,0xff4d3c06,0xff1d1d1e,0xff020204,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffbc8000,
1333 0xffd09c14,0xffac7000,0xff9c6000,0x99000000,0x66000000,0x3d000000,0x2a000000,0x4f000000,0xffbc8000,0xffac7000,0xff9c6000,0xff7c4000,0xffffffff,0xffffffff,
1334 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff020204,0xffedb50b,0xfff2d523,0xffb68608,0xff302305,0xff020204,0xffffffff,0xffffffff,0xffffffff,
1335 0xffffffff,0xffffffff,0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,0xff9c6000,0x99000000,0x66000000,0x3d000000,0x40000000,0x6a000000,0xffbc8000,0xffac7000,
1336 0xff645730,0xff524428,0xff7b807b,0xff7c827b,0xff434c42,0xff707570,0xffffffff,0xffffffff,0xffffffff,0xff020204,0xffbdbbba,0xff9c7226,0xffc3c3c2,0xfff4f4f3,
1337 0xff030304,0xff6a696a,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,0xff9c6000,0x99000000,0x66000000,0x3d000000,
1338 0x64000000,0x91000000,0xffbc8000,0xff7c6b42,0xffa1a3a0,0xffd7d8d7,0xfffafafa,0xffd7d8d7,0xff9fa29f,0xff5f655f,0xff808780,0xffffffff,0xff8a8a8b,0xfff9f9f7,
1339 0xfffefefc,0xfffdfdfb,0xfffefefc,0xfffefefc,0xff020204,0xff020204,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,
1340 0xff9c6000,0x99000000,0x66000000,0x3d000000,0x92000000,0xb8000000,0xff7c6f40,0xffc7c9c7,0xffa28c67,0xff825e35,0xffdcdddb,0xffd3d5d3,0xffc6c8c6,0xffc6c7c6,
1341 0xff767a76,0xff3f483e,0xff020204,0xffd5d5d4,0xfffdfdfb,0xfffdfdfb,0xfff9f9f8,0xffcccccc,0xffd2d2d2,0xff151515,0xff020204,0xffffffff,0xffffffff,0xffffffff,
1342 0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,0xff9c6000,0x99000000,0x66000000,0x3d000000,0xbd000000,0xf1454545,0xffbdc0bd,0xffa18344,0xff987029,0xff855d2c,
1343 0xffe4e6e4,0xffe2e4e2,0xffdee0de,0xffcdcfcd,0xffc6c7c5,0xff5d615d,0xff596159,0xfffcfcfa,0xfffcfcfa,0xfffcfcfa,0xfffcfcfa,0xfffdfdfb,0xfffcfcfa,0xff1e1e1d,
1344 0xff080709,0xff343436,0xffffffff,0xffffffff,0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,0xff9c6000,0x99000000,0x66000000,0x3d000000,0xef000000,0xfe979797,
1345 0xffa3905c,0xffa47b29,0xff9f772f,0xff8a6332,0xffe8ebe8,0xffe7eae7,0xffe4e7e4,0xffdedfdd,0xffc5c7c5,0xff9d9f9d,0xff394239,0xfffcfcfa,0xffeaeae9,0xfffdfdfb,
1346 0xfffdfdfb,0xfffcfcfa,0xfffdfdfb,0xff1f1f21,0xff2f2f2f,0xff020204,0xffffffff,0xffffffff,0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,0xff9c6000,0x99000000,
1347 0x66000000,0x3d000000,0xfd000000,0xffd5d5d5,0xff9f7d2a,0xffa77f2c,0xffa17a32,0xff8b6432,0xffe8ece8,0xffe8ebe8,0xffe6e9e6,0xffe1e3e1,0xff535554,0xffd6d7d6,
1348 0xff303830,0xfffdfdfb,0xffe5e5e5,0xfffcfcfa,0xfffbfbf9,0xfffcfcfb,0xfffcfcfa,0xff454546,0xff070709,0xff020204,0xffffffff,0xffffffff,0xffffffff,0xffbc8000,
1349 0xffd09c14,0xffac7000,0xff9c6000,0x99000000,0x66000000,0x3d000000,0xfe000000,0xfffafafa,0xffa2791c,0xffa67d2b,0xffa17a32,0xff8b6432,0xffe8ebe8,0xffe7ebe7,
1350 0xffe6e9e6,0xffe1e4e1,0xffb89031,0xfffafafa,0xff2a302a,0xfffdfdfb,0xffe5e5e5,0xfffdfdfb,0xfffcfcfa,0xfffcfcfa,0xfff4e8c8,0xff654f0c,0xff020204,0xff211f19,
1351 0xffffffff,0xffffffff,0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,0xff9c6000,0x99000000,0x66000000,0x3d000000,0xfd000000,0xffd5d5d5,0xff9f7d2b,0xffa07626,
1352 0xff986d29,0xff875f2e,0xffe7ebe7,0xffe7eae6,0xffe5e8e5,0xffd5af32,0xffcba939,0xffd2d3d2,0xff252c25,0xff4d4d4d,0xfffdfdfb,0xfffcfcfb,0xfffdfdfb,0xfffcfcfa,
1353 0xffccb688,0xffc08708,0xff684907,0xffecb50b,0xffffffff,0xffffffff,0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,0xff9c6000,0x99000000,0x66000000,0x3d000000,
1354 0xe4000000,0xfe979797,0xffa3905d,0xffa67b2b,0xffa27733,0xff815629,0xffdfdfdf,0xffe3e5e2,0xffe2e5e2,0xffd4ae2e,0xffbeaa65,0xff919391,0xff20261f,0xff020204,
1355 0xfffdfdfb,0xfffcfcfa,0xfffcfcfb,0xfffdfdfb,0xff604309,0xfff3ba0c,0xfff2b90c,0xfff5bd0c,0xfff4bc0c,0xffffffff,0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,
1356 0xff9c6000,0x99000000,0x66000000,0x3d000000,0xbd000000,0xe7454545,0xffbdc0be,0xffa38346,0xff9a702b,0xff885d2f,0xffe7e7e7,0xffdbdbdb,0xffa57c29,0xffc2a445,
1357 0xffb6b7b6,0xff585958,0xff1f231e,0xff62561d,0xfff2f2f0,0xfffcfcfa,0xffc0c0be,0xff020204,0xff7d5306,0xfff5bd0c,0xfff5bd0c,0xfff5bc0c,0xffe2a60c,0xffffffff,
1358 0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,0xff9c6000,0x99000000,0x66000000,0x3d000000,0x92000000,0xb8000000,0xff9c7720,0xffc8c8c8,0xffa38c68,0xff835e36,
1359 0xffdddddd,0xffd4d4d4,0xffc5c5c5,0xffb5b5b5,0xff6b6b6b,0xffe4e4e4,0xffcacbca,0xff1e231e,0xff262c27,0xff2e2e30,0xff2e2e30,0xff2e2e31,0xff754a04,0xffe2a90a,
1360 0xffd29609,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,0xff9c6000,0x99000000,0x66000000,0x3d000000,0x64000000,0x91000000,
1361 0xffbc8000,0xff956d22,0xffa2a2a2,0xffd8d8d8,0xfffafafa,0xffd5d5d5,0xff979797,0xff4e4e4e,0xffe1e1e1,0xffffffff,0xffffffff,0xffc9c9c9,0xff1a1d19,0xff696d68,
1362 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,0xff9c6000,0x99000000,
1363 0x66000000,0x3d000000,0x40000000,0xfff0dc5c,0xffbc8000,0xffac7000,0xff815919,0xff926a15,0xff906813,0xff8f6712,0xff8d6510,0xff8a620d,0xff646464,0xfffafafa,
1364 0xffffffff,0xffffffff,0xffc8c8c8,0xff161716,0xff191f19,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,
1365 0xffd09c14,0xffac7000,0xff9c6000,0xff7c4000,0x66000000,0x3d000000,0x28000000,0xfff0dc5c,0xffbc8000,0xffac7000,0xffd09c14,0xffd09c14,0xffd09c14,0xffd09c14,
1366 0xffd09c14,0xffd09c14,0xff2b2b2b,0xff626262,0xfffafafa,0xffffffff,0xffffffff,0xffc8c8c8,0xff131313,0xff171b17,0xffd09c14,0xffd09c14,0xffd09c14,0xffd09c14,
1367 0xffd09c14,0xffd09c14,0xffd09c14,0xffd09c14,0xffd09c14,0xffac7000,0xff9c6000,0xff7c4000,0x62000000,0x3b000000,0x1d000000,0xfff0dc5c,0xffbc8000,0xffac7000,
1368 0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xff252525,0xff5e5e5e,0xfffafafa,0xffffffff,0xffffffff,0xffcacaca,0xff161616,
1369 0xff181818,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xff9c6000,0xff7c4000,0x5a000000,0x36000000,
1370 0x17000000,0xfff0dc5c,0xffbc8000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff010a04,0xff545654,
1371 0xfffafafa,0xffffffff,0xffffffff,0xff676a68,0xff020e06,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,
1372 0xff9c6000,0xff7c4000,0x4e000000,0x2e000000,0x12000000,0xfff0dc5c,0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,0x93000000,0x99000000,0x9b000000,0xa1000000,
1373 0xad000000,0xc0000000,0xd5000000,0xe9000000,0xf8555555,0xfffafafa,0xfa858585,0xe6000000,0xcf000000,0xb7000000,0xa4000000,0x9c000000,0x99000000,0x99000000,
1374 0x99000000,0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
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,
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,
1379 0x18000000,0xf000000
1380};
1381
1382static const QRgb Ipkg_data[] = {
1383 0xffffff,0xffffff,0xffffff,0x1242424,0x1242424,0x2242424,0x3242424,0x4000000,0x7333333,0xf1b1b1b,0x1e1b1b1b,0x30202020,0x44222222,0x51222222,
1384 0x591f1f1f,0x5b222222,0x5a1f1f1f,0x541d1d1d,0x4a202020,0x3e202020,0x2f222222,0x22222222,0x1a1f1f1f,0x12171717,0xb232323,0x82e2e2e,0x4242424,0x3242424,
1385 0x2242424,0x1242424,0x1242424,0xffffff,0xffffff,0x1242424,0x2242424,0x3242424,0x5242424,0x7242424,0xb232323,0x101a1a1a,0x1a1f1f1f,0x2f222222,
1386 0x50222222,0x751f1f1f,0x94202020,0xa8202020,0xb21f1f1f,0xb31f1f1f,0xaf1f1f1f,0xaa202020,0x9d202020,0x8a1f1f1f,0x74222222,0x5d222222,0x481d1d1d,0x36242424,
1387 0x271f1f1f,0x1b1e1e1e,0x13282828,0xc242424,0x7242424,0x5242424,0x2242424,0x1242424,0x1242424,0x3242424,0x6242424,0xc242424,0x13242424,0x1b1e1e1e,
1388 0x24202020,0x30202020,0x47222222,0x6d232323,0x9a222222,0xc0202020,0xe45b7076,0xf380a5af,0xfb99cad7,0xfea1ddef,0xf988c4d7,0xf1659cac,0xe6426772,0xd21e1e1e,
1389 0xc4202020,0xaf222222,0x961f1f1f,0x7d222222,0x641f1f1f,0x4e232323,0x39222222,0x28252525,0x1a242424,0x10242424,0x8242424,0x3242424,0x3242424,0x7242424,
1390 0x15242424,0x27242424,0x3c242424,0x4f232323,0x61242424,0x75242424,0x90202020,0xb4202020,0xd9333b3d,0xf47797a1,0xffb0e3f1,0xffb1e4f3,0xffabe3f3,0xffa0dff1,
1391 0xff92daef,0xff7fd4ed,0xff6ecde8,0xff4d8696,0xfc524238,0xf24e3323,0xda2a2522,0xc7222222,0xb1222222,0x9b232323,0x81242424,0x66252525,0x4c242424,0x32242424,
1392 0x18242424,0x9242424,0x6242424,0x14242424,0x33242424,0x5f242424,0x83202020,0x9c252525,0xaf232323,0xc1242424,0xd4232323,0xe72b1f1f,0xf87b929c,0xffade3f3,
1393 0xffafe3f3,0xffade3f3,0xffa7e1f2,0xff9addf0,0xff89d7ee,0xff74d1eb,0xff60cbe8,0xff4ec5e6,0xff5e8b93,0xff583523,0xff2e2520,0xfc503424,0xf25e3925,0xdc453024,
1394 0xc3222222,0xb2242424,0x96242424,0x6d242424,0x3a242424,0x16242424,0xe242424,0x25242424,0x59242424,0x9c282323,0xcb3e1e1e,0xdf501616,0xec621212,0xf66f0a0a,
1395 0xfd7a0505,0xff86575e,0xffa2ddef,0xffa7e1f2,0xffa8e2f3,0xffa7e1f2,0xff9fdef1,0xff92daef,0xff7bd3ec,0xff65cce9,0xff4ec5e6,0xff3dbde0,0xff3bafce,0xff997961,
1396 0xffcc652d,0xffad5a2a,0xff7e4728,0xff452f25,0xfe422f25,0xf6633d29,0xe3603c28,0xa8302925,0x5e242424,0x24242424,0x21242424,0x3d242424,0x77242424,0xc53d1e1e,
1397 0xfd880303,0xff890000,0xff860000,0xff820000,0xff7d0000,0xff88919f,0xff97dcf0,0xff9addf0,0xff9bddf0,0xff9addf0,0xff92daef,0xff81d5ed,0xff6acee9,0xff4fc5e6,
1398 0xff3cbbdd,0xff37accb,0xff34a0bd,0xff6a8080,0xffca642b,0xffd86b2e,0xffe67331,0xfff07834,0xffdc7134,0xffa85b2f,0xff5a3929,0xd2583829,0x71242424,0x2f242424,
1399 0x53242424,0x6c242424,0x99242424,0xcc242424,0xed501717,0xff890000,0xff850000,0xff800000,0xff7a0000,0xff7fb9cd,0xff86d7ee,0xff87d7ee,0xff87d7ee,0xff85d6ee,
1400 0xff7ad3ec,0xff67cde9,0xff4bc4e6,0xff3bb6d7,0xff35a4c3,0xff3097b2,0xff2d8ca5,0xff427e8d,0xffc1612b,0xffd36a2f,0xffe17133,0xffed7837,0xfff57d3b,0xffad5e34,
1401 0xf9633e2b,0xc1242424,0x7b242424,0x3a242424,0x9a242424,0xab242424,0xc3242424,0xdd242424,0xea242424,0xf6660f0f,0xff840000,0xff7f0000,0xff790000,0xff70cce6,
1402 0xff70d0ea,0xff6dcfea,0xff6acee9,0xff63cbe8,0xff56c8e7,0xff3ec1e4,0xff37accb,0xff3199b5,0xff2d8aa4,0xff297e96,0xff25778c,0xff277387,0xff9d5129,0xffcd6931,
1403 0xffdd7237,0xffea7a39,0xffe5793c,0xff473327,0xe7382d27,0xcc242424,0x92242424,0x5e242424,0xd96b4e2d,0xf49a6a33,0xf1825c2f,0xf06b4e2d,0xf14f3e29,0xf5663e28,
1404 0xfd6f190d,0xfe662212,0xff582914,0xff59b3cb,0xff56c8e7,0xff4ec5e6,0xff45c3e5,0xff3dbddf,0xff38b0d0,0xff339ebc,0xff2d8ba4,0xff287a91,0xff236e82,0xff20677a,
1405 0xff1f6173,0xff205968,0xff30231d,0xff31251e,0xff724229,0xffb26034,0xff7d4a2f,0xf6613e2b,0xed242424,0xe1242424,0xbd242424,0x93242424,0xbd242424,0xe5674b2b,
1406 0xffb57a36,0xffb67b36,0xffb67b36,0xffb67b36,0xffb77333,0xff6e481f,0xff583c1a,0xff49909d,0xff3dbde0,0xff3bb5d6,0xff37accb,0xff34a0bd,0xff2e90ab,0xff297e96,
1407 0xff236d81,0xff1e5f70,0xff1b5766,0xff1a5161,0xff1a5160,0xff193f49,0xff1a1a1a,0xff1e1e1d,0xff362822,0xfe703f25,0xffa8672f,0xffcb913e,0xffd7a747,0xfed2a346,
1408 0xeda17e3c,0xbc5d4d2e,0x93242424,0xbc242424,0xe25c452a,0xfeb37a36,0xffb67b36,0xffb67b36,0xffb67b36,0xffba7a36,0xff9e612a,0xff4a645f,0xff37abca,0xff34a2bf,
1409 0xff3096b1,0xff2b89a2,0xff27798e,0xff22687a,0xff1d5868,0xff194b59,0xff164652,0xff16434f,0xff164651,0xff20272b,0xff5f301b,0xffa0622b,0xffcb903d,0xffd7a747,
1410 0xffd7a747,0xffce923e,0xf27e6635,0xd9353027,0xb5242424,0x91242424,0x57242424,0x8a242424,0xbc242424,0xde513f29,0xfdb07835,0xffb67b36,0xffb67b36,0xffb67b36,
1411 0xffb67b36,0xffbb7634,0xff657369,0xff2f92ad,0xff2a859d,0xff25768b,0xff206678,0xff1b5665,0xff174854,0xff143e4a,0xff283640,0xff623f31,0xff9e632e,0xffc8903e,
1412 0xffd7a747,0xffd7a747,0xffd6a446,0xffbc7a34,0xff863819,0xff4d0303,0xc9242424,0xa3242424,0x76242424,0x53242424,0x28242424,0x52242424,0x8c242424,0xbe242424,
1413 0xdf483828,0xffaf7734,0xffb67b36,0xffb67b36,0xffb67b36,0xffb67b36,0xffb97b36,0xffa57345,0xff2b7689,0xff20677a,0xff1f5767,0xff363943,0xff6c3b2b,0xffa4622e,
1414 0xffc9903d,0xffd7a747,0xffd7a747,0xffd7a747,0xffcc9940,0xff9a5e28,0xff501a0c,0xff410000,0xff4a0303,0xff510505,0x9b252525,0x6a242424,0x40242424,0x25242424,
1415 0x10242424,0x29242424,0x56242424,0x93242424,0xc5252525,0xff7d5125,0xff92632b,0xff98672d,0xff9f6c2f,0xffaf7536,0xffc17f3e,0xffbd7c38,0xffbe7936,0xff7b3b28,
1416 0xffaa612b,0xffca903d,0xffd7a747,0xffd7a747,0xffd7a747,0xffd7a747,0xffb18439,0xff6b4620,0xff390806,0xff420000,0xff4e0000,0xff5b0000,0xff630303,0xff670d0d,
1417 0x7b232323,0x4a242424,0x26242424,0x12242424,0x8242424,0x15242424,0x33242424,0x65242424,0x9d242424,0xffd17848,0xffac683b,0xffa6673b,0xff996137,0xff8f5d34,
1418 0xff8d5c33,0xffc47a4e,0xfff88f5c,0xffad602a,0xffd7a747,0xffd7a747,0xffd7a747,0xffcd9d42,0xff91682d,0xff4b2816,0xff311010,0xff3d0c0c,0xff4d0505,0xff5c0000,
1419 0xff6a0000,0xff780303,0xff7b0d0d,0xff7a1919,0x6d232323,0x3f242424,0x1f242424,0xd242424,0x5242424,0xf242424,0x23242424,0x49242424,0x7d242424,0xffdd7e4f,
1420 0xfff28d5b,0xfffd9865,0xffff9d6e,0xfffea173,0xfffda174,0xfffc9f73,0xfff99b6d,0xff580505,0xff8f5f29,0xffb88a3b,0xff774b20,0xff3e0a05,0xff3c0505,0xff400c0c,
1421 0xff421010,0xff510c0c,0xff670505,0xff790000,0xff880303,0xff8f0f0f,0xff8f1a1a,0xff872222,0x6a242424,0x3d242424,0x1e242424,0xd242424,0x4242424,0xd242424,
1422 0x1e242424,0x3f242424,0x6c242424,0xffd87d50,0xfff08d5d,0xfffc9968,0xffffa071,0xffffa478,0xfffea57a,0xfffca479,0xfff99e73,0xff4b0505,0xff470303,0xff460000,
1423 0xff480000,0xff4d0000,0xff530505,0xff560c0c,0xff531010,0xff680c0c,0xff820505,0xff940606,0xff9e1313,0xffa41d1d,0xff9c2424,0xff8d2a2a,0x68242424,0x3c242424,
1424 0x1d242424,0xc242424,0x4242424,0xc242424,0x1d242424,0x3b242424,0x66242424,0xffd37c50,0xffee8d5d,0xfffc9a6b,0xffffa274,0xffffa67a,0xfffda77d,0xfffba57d,
1425 0xfff8a278,0xff590606,0xff5a0303,0xff5e0303,0xff620000,0xff690000,0xff6e0505,0xff6c0c0c,0xff671010,0xff7d0c0c,0xff990c0c,0xffa71616,0xffae1f1f,0xffb02929,
1426 0xffa32f2f,0xff8d2f2f,0x68242424,0x3c242424,0x1d242424,0xc242424,0x4242424,0xb242424,0x1b242424,0x39242424,0x63242424,0xffd07a50,0xffed8d5e,0xfffc9a6b,
1427 0xffffa376,0xffffa77c,0xfffda97f,0xfffba77f,0xfff8a37a,0xff650a0a,0xff6d0505,0xff750303,0xff7c0000,0xff830000,0xff870505,0xff7f0c0c,0xff771212,0xff8c1212,
1428 0xffa61a1a,0xffb52424,0xffba2e2e,0xffb73131,0xffa63535,0xff8a3434,0x67242424,0x3b242424,0x1d242424,0xc242424,0x3242424,0xa242424,0x19242424,0x35242424,
1429 0x5d242424,0xffca794f,0xffe98c5d,0xfffb9a6b,0xfffea275,0xffffa77c,0xfffda980,0xfffaa880,0xfff7a47b,0xff6f0c0c,0xff7c0606,0xff890303,0xff900000,0xff990000,
1430 0xff9a0505,0xff8d1010,0xff801a1a,0xff961e1e,0xffaf2828,0xffbd3131,0xffbf3838,0xffbc3d3d,0xffa53c3c,0xff863636,0x65242424,0x3a242424,0x1c242424,0xc242424,
1431 0x3242424,0x9242424,0x16242424,0x2e242424,0x52242424,0xffc3744d,0xffe2885b,0xfff79768,0xfffda073,0xfffea77b,0xfffda97f,0xfff9a780,0xfff6a47c,0xff730f0f,
1432 0xff860808,0xff980303,0xffa10000,0xffa80000,0xffa60a0a,0xff971b1b,0xff872323,0xff9c2929,0xffb63535,0xffc13e3e,0xffc34343,0xffbc4545,0xffa44040,0xff7f3737,
1433 0x60242424,0x37242424,0x1b242424,0xb242424,0x2242424,0x7242424,0x11242424,0x25242424,0x43242424,0xc6ac6f51,0xffd38058,0xffed9165,0xfff99c70,0xfffda479,
1434 0xfffca67d,0xfff8a67e,0xfff5a37a,0xff731010,0xff8c0808,0xffa10303,0xffad0000,0xffb30808,0xffaf1b1b,0xff9b2828,0xff8a2d2d,0xffa03636,0xffb94141,0xffc24747,
1435 0xffc04b4b,0xffb64949,0xff9a4141,0xff773838,0x57242424,0x31242424,0x18242424,0xa242424,0x1242424,0x5242424,0xc242424,0x1a242424,0x32242424,0x5a474747,
1436 0xc5a97459,0xfedb8860,0xffef976b,0xfffaa074,0xfffca47a,0xfff7a47a,0xfff3a179,0xff721212,0xff900a0a,0xffa90303,0xffb60808,0xffb91a1a,0xffb42b2b,0xff9f3333,
1437 0xff8c3737,0xffa03f3f,0xffb44949,0xffb74e4e,0xffad4c4c,0xff9c4848,0xff823e3e,0xff6a3636,0x48242424,0x29242424,0x13242424,0x8242424,0x1242424,0x3242424,
1438 0x7242424,0x11242424,0x21242424,0x39242424,0x61484848,0xc1aa7a63,0xfddf8d66,0xfff0996e,0xfff89f75,0xfff5a077,0xfff19d75,0xff721313,0xff930a0a,0xffae0808,
1439 0xffb91a1a,0xffbd2b2b,0xffb63838,0xff9e3d3d,0xff873d3d,0xff954343,0xff9f4a4a,0xff984949,0xff884343,0xfb7a3f3f,0xd8753c3c,0x835f3333,0x36242424,0x1e242424,
1440 0xe242424,0x6242424,0xffffff,0x1242424,0x4242424,0xa242424,0x14242424,0x24242424,0x3b242424,0x62484848,0xb9a47b67,0xfedf8d66,0xffee986e,0xfff09a71,
1441 0xffed9970,0xff701313,0xff950d0d,0xffb01a1a,0xffb92b2b,0xffb63838,0xffaa4040,0xff8e4040,0xff743c3c,0xff794040,0xfe7a4040,0xee794141,0xba6b3b3b,0x6a332929,
1442 0x4d242424,0x37242424,0x23242424,0x13242424,0x9242424,0x4242424,0xffffff,0x1242424,0x2242424,0x5242424,0xa242424,0x15242424,0x24242424,0x3a242424,
1443 0x5f434343,0xb3a37a69,0xfcde8d65,0xffe69268,0xffe69268,0xff6d1616,0xff901a1a,0xffa62828,0xffa93636,0xff9f3e3e,0xff8c4040,0xff703c3c,0xfb5f3838,0xd96a3c3c,
1444 0x8d4e3131,0x5e242424,0x4d242424,0x3d242424,0x2d242424,0x1f242424,0x14242424,0xa242424,0x5242424,0x2242424,0xffffff,0xffffff,0x1242424,0x2242424,
1445 0x5242424,0xb242424,0x14242424,0x23242424,0x38242424,0x5a404040,0xa9997766,0xfad78661,0xffdd8a61,0xff631d1d,0xff7c2424,0xff8a2f2f,0xff843636,0xfe773939,
1446 0xe8723b3b,0xb45f3737,0x692a2525,0x55242424,0x46242424,0x38242424,0x2b242424,0x21242424,0x17242424,0xf242424,0x9242424,0x5242424,0x2242424,0x1242424,
1447 0xffffff,0xffffff,0xffffff,0x1242424,0x2242424,0x5242424,0xa242424,0x14242424,0x22242424,0x36242424,0x55393939,0x9a937463,0xf7d28259,0xff562222,
1448 0xff602828,0xf66e2f2f,0xca6d3434,0x7e422b2b,0x5b242424,0x4c242424,0x3d242424,0x31242424,0x26242424,0x1d242424,0x15242424,0xf242424,0xa242424,0x6242424,
1449 0x4242424,0x2242424,0x1242424,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1242424,0x2242424,0x4242424,0xa242424,0x12242424,0x20242424,
1450 0x31242424,0x48363636,0xa7925b50,0xdb692424,0x975d2929,0x5a242424,0x4f242424,0x42242424,0x35242424,0x2a242424,0x20242424,0x18242424,0x12242424,0xd242424,
1451 0x9242424,0x6242424,0x4242424,0x2242424,0x1242424,0x1242424,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1242424,
1452 0x2242424,0x4242424,0x9242424,0x10242424,0x1b242424,0x27242424,0x34363636,0x38242424,0x39242424,0x34242424,0x2c242424,0x23242424,0x1b242424,0x14242424,
1453 0xe242424,0xa242424,0x7242424,0x5242424,0x3242424,0x2242424,0x1242424,0x1242424,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
1454 0xffffff,0xffffff,0xffffff,0xffffff,0x1242424,0x2242424,0x4242424,0x7242424,0xd242424,0x14242424,0x19242424,0x1d242424,0x1d242424,0x1a242424,
1455 0x15242424,0x10242424,0xc242424,0x8242424,0x5242424,0x4242424,0x2242424,0x1242424,0x1242424,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
1456 0xffffff,0xffffff
1457};
1458
1459static const QRgb Language_data[] = {
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,
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,
1464 0x47350506,0x22000000,0x10000000,0x5000000,0x1000000,0xffffff,0xffffff,0xffffff,0x9000000,0x19000000,0x32000000,0x5c2b1a1a,0xcfcf8586,0xfffc8787,
1465 0xfffb5253,0xfff90e0f,0xffe40506,0xfff30607,0xfff70607,0xfff70607,0xfff90a0b,0xfff90e0f,0xc7ac0405,0x49000000,0x29000000,0x1d000000,0x26000000,0x5a5a3738,
1466 0xfffd9fa2,0xfffb5a5e,0xfff9282e,0xfff5161c,0xdea50f13,0x33000000,0x19000000,0x8000000,0x1000000,0xffffff,0xffffff,0xffffff,0xe000000,0x23000000,
1467 0x4f341f1f,0xe2e69596,0xfffb6464,0xffc40506,0xff610203,0xf1430202,0xe3490202,0xf9960404,0xffde0506,0xfff70607,0xfff90607,0xfff70607,0xffc60506,0xa1630303,
1468 0x3b000000,0x2b000000,0x36000000,0xa4b46b6d,0xfffb7579,0xfff9161c,0xfff9161c,0xfff7161c,0xff7a0b0e,0x63360506,0x1f000000,0xa000000,0x1000000,0xffffff,
1469 0xffffff,0xffffff,0x10000000,0x28000000,0xcde46667,0xfffb5253,0xff950404,0xe6320102,0x99150000,0x6a000000,0x6e000000,0x83000000,0xdaa10404,0xfff91011,
1470 0xfff90607,0xfff90607,0xffca0506,0xda570204,0x49000000,0x37000000,0x42000000,0xd6db8183,0xfffb5459,0xfff9161c,0xfff9161c,0xffeb151a,0xff5b080a,0x66240304,
1471 0x20000000,0xb000000,0x1000000,0xffffff,0xffffff,0xffffff,0xe000000,0x23000000,0x62740303,0xde900404,0xe1350102,0x67090000,0x53000000,0x4c000000,
1472 0x7d000000,0xb1000000,0xd9000000,0xfffb4849,0xfff90607,0xfff90607,0xffb90405,0xfe380101,0xfb000000,0xf0000000,0xe0000000,0xfffc8f92,0xfffa3035,0xfff9161c,
1473 0xfff9161c,0xffb31014,0xed360506,0x4c000000,0x29000000,0x12000000,0x6000000,0x3000000,0x1000000,0x1000000,0xa000000,0x18000000,0x29000000,0x442c0101,
1474 0x572b0101,0x4b000000,0x89000000,0xc7000000,0xfd000000,0xff000000,0xff000000,0xfffc7f80,0xfff90607,0xfff90607,0xff820304,0xff1f0101,0xff000000,0xff000000,
1475 0xff432627,0xfffc8083,0xfff9161c,0xfff9161c,0xffeb151a,0xff67090c,0xb41a0203,0x52000000,0x31000000,0x1a000000,0xe000000,0x7000000,0x4000000,0x2000000,
1476 0x5000000,0xe000000,0x18000000,0x21000000,0x67000000,0xbe000000,0xff000000,0xff000000,0xff000000,0xff212121,0xff8d6565,0xfffc7778,0xfff90607,0xffb90405,
1477 0xff410202,0xff8f8787,0xffa8a8a8,0xff909090,0xffa97879,0xfffb6a6e,0xfff9161c,0xfff9161c,0xffb31014,0xff340406,0xd9000000,0x8f000000,0x43000000,0x2b000000,
1478 0x1a000000,0x10000000,0x8000000,0x4000000,0x1000000,0x7000000,0xf000000,0x71000000,0xe0000000,0xff000000,0xfc180f0f,0xff765858,0xff8d6d6d,0xffc38888,
1479 0xfffc8787,0xfffa3536,0xffb50405,0xff4f0202,0xff655656,0xffb4b4b4,0xffc4c4c4,0xffb7b7b7,0xffe09496,0xfffb5459,0xfff9161c,0xfff1151b,0xff6a090c,0xfe160606,
1480 0xff000000,0xec000000,0x9d000000,0x46000000,0x30000000,0x1e000000,0x11000000,0x9000000,0xffffff,0x8000000,0x65000000,0xe8000000,0xff000000,0xf9383838,
1481 0xff8d8484,0xfffc8f8f,0xfffb6a6a,0xfffb5e5f,0xfffa2f30,0xffbc0505,0xff540808,0xff625151,0xffaeaeae,0xffcbcbcb,0xffcdcdcd,0xffb7b7b7,0xfffc8f92,0xfffa3035,
1482 0xfff9161c,0xffbc1115,0xff430e10,0xff7b7b7b,0xfc353535,0xff000000,0xf2000000,0x9d000000,0x4d000000,0x33000000,0x1f000000,0x11000000,0xffffff,0x35000000,
1483 0xcd000000,0xff000000,0xf9505050,0xffc1c1c1,0xffc2c2c2,0xffe06768,0xfff91213,0xfff90607,0xffdc0506,0xff860304,0xff624747,0xffa9a9a9,0xffcccccc,0xffdcdcdc,
1484 0xffd6d6d6,0xffccb0b0,0xfffc8083,0xfff9161c,0xfff1151b,0xff740a0d,0xff6e5b5c,0xffc9c9c9,0xffc5c5c5,0xfd4f4f4f,0xff000000,0xe6000000,0x84000000,0x4d000000,
1485 0x31000000,0x1c000000,0xffffff,0x83000000,0xff000000,0xf9212121,0xffc2c2c2,0xffe6e6e6,0xffc9c9c9,0xffca7373,0xffcc0506,0xff700303,0xff4d0202,0xff4a2223,
1486 0xff846969,0xffc1c1c1,0xffdcdcdc,0xffe5e5e5,0xffdadada,0xffda7e81,0xffe7141a,0xffc81217,0xffb31014,0xff471011,0xffb5b1b1,0xffdadada,0xffefefef,0xffc4c4c4,
1487 0xfd202020,0xff000000,0xc3000000,0x69000000,0x47000000,0x2a000000,0xffffff,0xc3000000,0xff000000,0xff787878,0xfffafafa,0xffededed,0xffd7d7d7,0xffc29697,
1488 0xff954040,0xff705a5a,0xff807a7a,0xff909090,0xffacacac,0xffcacaca,0xffe0e0e0,0xffe3e3e3,0xffd6d6d6,0xffc2c2c2,0xffaa9899,0xff8e5c5e,0xff601d1e,0xff7b6667,
1489 0xffd2d2d2,0xffe8e8e8,0xfff6f6f6,0xfffefefe,0xff787878,0xff000000,0xe8000000,0x84000000,0x5c000000,0x38000000,0xffffff,0xef000000,0xff000000,0xffbbbbbb,
1490 0xfffdfdfd,0xfff6f6f6,0xffe7e7e7,0xffcfcfcf,0xffb2b2b2,0xff979797,0xff908788,0xffaa8585,0xffa79999,0xffbdbdbd,0xffd1d1d1,0xffd5d5d5,0xffc9c9c9,0xffb9b9b9,
1491 0xffadadad,0xffafafaf,0xffbcbcbc,0xffd0d0d0,0xffe4e4e4,0xfff3f3f3,0xfffbfbfb,0xfffefefe,0xffbbbbbb,0xff000000,0xfa000000,0x9a000000,0x6f000000,0x46000000,
1492 0xffffff,0xef000000,0xff000000,0xffececec,0xfffefefe,0xfffbfbfb,0xfff0f0f0,0xffd9d9d9,0xffb9b9b9,0xffb69898,0xfff39393,0xfffb6c6c,0xfff02d2e,0xffaa8485,
1493 0xffb9b9b9,0xffbdbdbd,0xffd9abac,0xfff68c8f,0xffef6d71,0xffc76f71,0xffc2c2c2,0xffdbdbdb,0xffeeeeee,0xfff9f9f9,0xfffefefe,0xffffffff,0xffececec,0xff000000,
1494 0xfb000000,0xaa000000,0x7e000000,0x52000000,0xffffff,0xf0000000,0xff000000,0xffececec,0xffffffff,0xfffefefe,0xfff4f4f4,0xffdddddd,0xffb9b9b9,0xfff49292,
1495 0xfffb4c4d,0xfff90e0f,0xffe20606,0xff7a1d1d,0xffa7a7a7,0xffc9a4a5,0xfffc9093,0xfffa4449,0xfff92127,0xff9d0e12,0xffbdabac,0xffdedede,0xfff2f2f2,0xfffdfdfd,
1496 0xffffffff,0xffffffff,0xffececec,0xff000000,0xfc000000,0xb4000000,0x88000000,0x5a000000,0xffffff,0xf0000000,0xff000000,0xffbbbbbb,0xffffffff,0xffffffff,
1497 0xfff5f5f5,0xffdfdfdf,0xffbbbbbb,0xfffb6c6c,0xfff90e0f,0xfff90607,0xffc10506,0xff490a0a,0xffa2a2a2,0xffd88c8e,0xfffb585c,0xfff9161c,0xfff9161c,0xff700a0d,
1498 0xffa49090,0xffe0e0e0,0xfff4f4f4,0xfffefefe,0xffffffff,0xffffffff,0xffbbbbbb,0xff000000,0xfc000000,0xb9000000,0x8c000000,0x5e000000,0xffffff,0xc9000000,
1499 0xff000000,0xff787878,0xffffffff,0xffffffff,0xfff7f7f7,0xffe3e3e3,0xffc4c4c4,0xffe03d3e,0xffc40506,0xffaf0405,0xff580202,0xff5c4646,0xffacacac,0xffca8183,
1500 0xfffa3137,0xffe9151a,0xffb31014,0xff410607,0xffb7aeae,0xffe3e3e3,0xfff5f5f5,0xfffefefe,0xffffffff,0xffffffff,0xff787878,0xff000000,0xf5000000,0xb9000000,
1501 0x8c000000,0x5e000000,0xffffff,0x92000000,0xff000000,0xfb212121,0xffc7c7c7,0xffffffff,0xfffafafa,0xffececec,0xffd6d6d6,0xffbbaeae,0xff985959,0xff672b2b,
1502 0xff705858,0xffb6b6b6,0xffc4c4c4,0xffc1c1c1,0xffb75b5e,0xff65090b,0xff491b1b,0xff847374,0xffd5d5d5,0xffeaeaea,0xfff8f8f8,0xfffefefe,0xffffffff,0xffc7c7c7,
1503 0xff202020,0xff000000,0xe9000000,0xb4000000,0x88000000,0x5a000000,0xffffff,0x4f000000,0xd9000000,0xff000000,0xfc525252,0xffdadada,0xfffcfcfc,0xfff5f5f5,
1504 0xffe9e9e9,0xffd9d9d9,0xffcbcbcb,0xffc7c7c7,0xffcccccc,0xffd7d7d7,0xffdedede,0xffdcdcdc,0xffd3d3d3,0xffcecece,0xffcfcfcf,0xffd8d8d8,0xffe7e7e7,0xfff4f4f4,
1505 0xfffbfbfb,0xfffefefe,0xffdadada,0xff515151,0xff000000,0xf9000000,0xd5000000,0xaa000000,0x7e000000,0x52000000,0xffffff,0x26000000,0x88000000,0xf0000000,
1506 0xff000000,0xfc3e3e3e,0xffd9d9d9,0xfffbfbfb,0xfff6f6f6,0xffefefef,0xffe9e9e9,0xffe7e7e7,0xffeaeaea,0xffeeeeee,0xfff1f1f1,0xfff0f0f0,0xffebebeb,0xffe8e8e8,
1507 0xffe9e9e9,0xffededed,0xfff5f5f5,0xfffafafa,0xfffefefe,0xffadadad,0xff3e3e3e,0xff000000,0xfd000000,0xe7000000,0xbf000000,0x9a000000,0x6f000000,0x46000000,
1508 0xffffff,0x1e000000,0x39000000,0x9b000000,0xee000000,0xff000000,0xff464646,0xfff7f7f7,0xfffdfdfd,0xfffbfbfb,0xfffafafa,0xfff9f9f9,0xfffafafa,0xfffbfbfb,
1509 0xfffcfcfc,0xfffcfcfc,0xfffafafa,0xfff8f8f8,0xfff8f8f8,0xfffafafa,0xfff9f9f9,0xffb1b1b1,0xff626262,0xff0a0a0a,0xff000000,0xfc000000,0xea000000,0xc8000000,
1510 0xa9000000,0x84000000,0x5c000000,0x38000000,0xffffff,0x16000000,0x2b000000,0x4a000000,0xae000000,0xff000000,0xff2a2a2a,0xffffffff,0xffffffff,0xffffffff,
1511 0xffe0e0e0,0xffa8a8a8,0xffc7c7c7,0xffe5e5e5,0xfff9f9f9,0xfff9f9f9,0xffe5e5e5,0xffc7c7c7,0xff9f9f9f,0xff707070,0xff393939,0xff000000,0xff000000,0xff000000,
1512 0xf7000000,0xe4000000,0xc7000000,0xae000000,0x8d000000,0x69000000,0x47000000,0x2a000000,0xffffff,0xf000000,0x1f000000,0x39000000,0xcd000000,0xff000000,
1513 0xff6f6f6f,0xffffffff,0xffffffff,0xffacacac,0xff080808,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
1514 0xff000000,0xff000000,0xf7000000,0xe9000000,0xd3000000,0xbf000000,0xa8000000,0x8c000000,0x6d000000,0x4d000000,0x31000000,0x1c000000,0xffffff,0xa000000,
1515 0x16000000,0x30000000,0xf2000000,0xff000000,0xffb0b0b0,0xffffffff,0xff909090,0xff000000,0xff000000,0xfd000000,0xfd000000,0xfe000000,0xfe000000,0xfe000000,
1516 0xfe000000,0xfc000000,0xf8000000,0xf2000000,0xe9000000,0xdc000000,0xca000000,0xbe000000,0xae000000,0x9a000000,0x82000000,0x68000000,0x4d000000,0x33000000,
1517 0x1f000000,0x11000000,0xffffff,0x7000000,0x11000000,0x55000000,0xff000000,0xff050505,0xffececec,0xff6f6f6f,0xff000000,0xff000000,0xf8000000,0xe4000000,
1518 0xd9000000,0xd0000000,0xc9000000,0xc5000000,0xc2000000,0xc0000000,0xbe000000,0xba000000,0xb5000000,0xae000000,0xa3000000,0x95000000,0x85000000,0x71000000,
1519 0x5b000000,0x45000000,0x30000000,0x1e000000,0x11000000,0x9000000,0xffffff,0x6000000,0x10000000,0x8b000000,0xff000000,0xff383838,0xff535353,0xff000000,
1520 0xff000000,0xf0000000,0xd8000000,0xcb000000,0xbb000000,0xac000000,0xa1000000,0x9a000000,0x97000000,0x94000000,0x92000000,0x8e000000,0x88000000,0x80000000,
1521 0x76000000,0x69000000,0x5a000000,0x49000000,0x38000000,0x28000000,0x1a000000,0x10000000,0x8000000,0x4000000,0xffffff,0x6000000,0x10000000,0xb8000000,
1522 0xff000000,0xfe3a3a3a,0xff000000,0xff000000,0xe2000000,0xcc000000,0xbf000000,0xab000000,0x95000000,0x81000000,0x74000000,0x6b000000,0x68000000,0x65000000,
1523 0x63000000,0x5f000000,0x5a000000,0x53000000,0x4a000000,0x40000000,0x35000000,0x29000000,0x1e000000,0x14000000,0xd000000,0x7000000,0x4000000,0x2000000,
1524 0xffffff,0x7000000,0x11000000,0xb8000000,0xfd060606,0xfb020202,0xfb000000,0xca000000,0xba000000,0xb3000000,0x9f000000,0x85000000,0x6c000000,0x57000000,
1525 0x49000000,0x40000000,0x3c000000,0x3a000000,0x38000000,0x36000000,0x32000000,0x2e000000,0x28000000,0x21000000,0x1a000000,0x14000000,0xe000000,0x9000000,
1526 0x5000000,0x3000000,0x1000000,0x1000000,0xffffff,0x7000000,0x11000000,0xb8000000,0xc90c0c0c,0xce000000,0xa5000000,0x9d000000,0x9f000000,0x92000000,
1527 0x7a000000,0x5f000000,0x47000000,0x34000000,0x28000000,0x21000000,0x1e000000,0x1c000000,0x1b000000,0x1a000000,0x18000000,0x15000000,0x12000000,0xf000000,
1528 0xb000000,0x8000000,0x5000000,0x3000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,0x6000000,0x10000000,0x3a000000,0x52000000,0x6c000000,
1529 0x74000000,0x80000000,0x7d000000,0x6d000000,0x56000000,0x3e000000,0x2a000000,0x1c000000,0x13000000,0xe000000,0xd000000,0xc000000,0xb000000,0xa000000,
1530 0xa000000,0x8000000,0x7000000,0x6000000,0x4000000,0x3000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x5000000,
1531 0xd000000,0x1b000000,0x30000000,0x46000000,0x57000000,0x5e000000,0x58000000,0x49000000,0x36000000,0x25000000,0x17000000,0xd000000,0x8000000,0x5000000,
1532 0x4000000,0x4000000,0x4000000,0x3000000,0x3000000,0x3000000,0x2000000,0x2000000,0x1000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,
1533 0xffffff,0xffffff
1534};
1535
1536static const QRgb Light_data[] = {
1537 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3000000,0x6000000,0xb000000,0x12000000,0x19000000,0x21000000,0x29000000,0x2f000000,
1538 0x34000000,0x37000000,0x39040404,0x38050505,0x35050505,0x30050505,0x2a060606,0x22080808,0x1a0a0a0a,0x130d0d0d,0xc151515,0x7242424,0x3000000,0x1000000,
1539 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,
1540 0x5d393939,0x934a4a4a,0xbe505050,0xde525252,0xf3525252,0xfe4f4f4f,0xf3454545,0xe03d3d3d,0xc5333333,0xa0272727,0x721a1a1a,0x410c0c0c,0x350e0e0e,0x280d0d0d,
1541 0x1d121212,0x120e0e0e,0xb171717,0x5000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,
1542 0x16000000,0x23000000,0x70474747,0xba595959,0xf7615e5c,0xff59524f,0xff514743,0xff4b3f3a,0xff433631,0xff3e302b,0xff392d29,0xff352b27,0xff312927,0xff2c2826,
1543 0xf92a2828,0xc7202020,0x8a161616,0x49111111,0x36131313,0x26141414,0x18151515,0xe121212,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,
1544 0x2000000,0x7000000,0xe000000,0x1a000000,0x48353535,0xa75a5a5a,0xf865605e,0xff5c514d,0xff54443f,0xff4e3f3a,0xff4c3d39,0xff473a36,0xff433631,0xff3e312d,
1545 0xff382d29,0xff322823,0xff2d2420,0xff271f1b,0xff221a17,0xff1e1a18,0xfa1a1817,0xbe141414,0x6f0f0f0f,0x42131313,0x2d111111,0x1c121212,0xf111111,0x7000000,
1546 0x2000000,0x1000000,0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x60454545,0xcb625f5e,0xff605854,0xff564742,0xff544541,0xff51443f,0xff58483b,
1547 0xff4a3e3b,0xff463a37,0xff463b32,0xff3d3430,0xff372e2b,0xff322b27,0xff2c2623,0xff28201e,0xff221c1a,0xff1b1616,0xff161312,0xff111010,0xdc0f0e0d,0x890f0f0f,
1548 0x4a151515,0x31151515,0x1d121212,0xf111111,0x7242424,0x2000000,0x1000000,0x5000000,0xd000000,0x1a000000,0x60454545,0xd864605d,0xff5e524d,0xff574741,
1549 0xff544642,0xff725f3c,0xff705f3f,0xff90793f,0xff9c8541,0xff84703b,0xff6a5934,0xff54472d,0xff3e3429,0xff312a27,0xff2a2523,0xff26211f,0xff221e1c,0xff1c1919,
1550 0xff171515,0xff111111,0xff0f0f0f,0xe6100e0e,0x8e101010,0x4d171717,0x31151515,0x1d1a1a1a,0xe121212,0x62b2b2b,0x3000000,0xa000000,0x16000000,0x48353535,
1551 0xcb625f5e,0xff5d514d,0xff564741,0xff554742,0xff8f773a,0xffb99c45,0xffe8c75a,0xffdbbe62,0xfff8d970,0xfff2d369,0xffd2b554,0xffab903c,0xff7a652a,0xff2a2523,
1552 0xff282321,0xff23201f,0xff201d1b,0xff1c1b1a,0xff181817,0xff161616,0xff141414,0xff111111,0xe0121110,0x80141414,0x4a151515,0x2d171717,0x18151515,0xb171717,
1553 0x6000000,0x11000000,0x23000000,0xa75a5a5a,0xff605652,0xff554540,0xff544641,0xff9f8235,0xffedc647,0xfff4d465,0xfffde080,0xfffee590,0xfffee696,0xfffde490,
1554 0xfffde17f,0xfffeda68,0xffe4bf44,0xff9d8024,0xff372e1b,0xff201c1c,0xff1c1a1a,0xff1a1a1a,0xff1b1b1b,0xff1c1c1c,0xff1a1a1a,0xff171717,0xff121212,0xcb121212,
1555 0x66171717,0x43171717,0x26141414,0x120e0e0e,0xb000000,0x1b000000,0x70474747,0xf8655f5d,0xff55433e,0xff53443e,0xff876e31,0xfffccf38,0xfffbd75e,0xfffde07f,
1556 0xfffde89e,0xfffeeeb6,0xfffef0bf,0xfffeedb6,0xfffee89e,0xfffee17f,0xfffdd85e,0xfffcd039,0xff8a6e17,0xff201c16,0xff191817,0xff191919,0xff1e1e1e,0xff1f1f1f,
1557 0xff1f1f1f,0xff1c1c1c,0xff171717,0xfb131313,0xa7141414,0x5a171717,0x37171717,0x1d121212,0x12000000,0x26000000,0xba595959,0xff594e49,0xff52423c,0xff695534,
1558 0xffe1b523,0xfffcd344,0xfffddb6c,0xfffee590,0xfffeedb6,0xfffff5d6,0xfffff9e5,0xfffff5d6,0xffffeeb6,0xfffee490,0xfffedc6d,0xfffdd344,0xffd2a71b,0xff4d3e0d,
1559 0xff131313,0xff181818,0xff1e1e1e,0xff222222,0xff232323,0xff212121,0xff1c1c1c,0xff171717,0xda141414,0x72191919,0x49151515,0x29131313,0x19000000,0x5d393939,
1560 0xf7605c5a,0xff503f3a,0xff4e3f3a,0xff9a7922,0xfffac821,0xfffdd348,0xfffddd71,0xfffee697,0xfffef0bf,0xfffff9e5,0xffffffff,0xfffff9e5,0xfffef0bf,0xfffde696,
1561 0xfffddd70,0xfffdd449,0xfff9c822,0xff977507,0xff101010,0xff161616,0xff1d1d1d,0xff222222,0xff272727,0xff252525,0xff212121,0xff1b1b1b,0xfb161515,0xa0151515,
1562 0x5b161616,0x36131313,0x21000000,0x934a4a4a,0xff58504d,0xff4a3a34,0xff4e4035,0xffba9115,0xfffcc91f,0xfffdd245,0xfffedb6c,0xfffee590,0xfffeedb6,0xfffef5d7,
1563 0xfffff9e5,0xfffff5d6,0xfffeedb6,0xfffee490,0xfffddb6c,0xfffdd345,0xfffcc91e,0xffc29604,0xff211c0b,0xff131313,0xff1c1c1c,0xff232323,0xff282828,0xff292929,
1564 0xff262626,0xff202020,0xff181818,0xc6161616,0x6d171717,0x43131313,0x29000000,0xbe505050,0xff50443f,0xff473732,0xff56462f,0xffd0a10c,0xfffcc816,0xfffdcf39,
1565 0xfffdd95e,0xfffee180,0xfffde89e,0xfffeedb6,0xfffff0c0,0xfffeeeb6,0xfffde89d,0xfffee07f,0xfffdd95e,0xfffdcf39,0xfffcc816,0xffdeab01,0xff392d08,0xff121212,
1566 0xff1b1b1b,0xff232323,0xff292929,0xff2b2b2b,0xff292929,0xff242424,0xff1c1c1c,0xe1171717,0x7b191919,0x4e141414,0x2f000000,0xde525252,0xff483a35,0xff42342f,
1567 0xff554429,0xffcfa00b,0xfffcc40b,0xfffccb27,0xfffdd349,0xfffedb68,0xfffee080,0xfffee590,0xfffee696,0xfffee590,0xfffde07f,0xfffedb68,0xfffdd349,0xfffccb27,
1568 0xfffcc50c,0xffdfac00,0xff372c06,0xff101010,0xff191919,0xff232323,0xff2b2b2b,0xff2e2e2e,0xff2d2d2d,0xff272727,0xff1f1f1f,0xf0171717,0x881a1a1a,0x58141414,
1569 0x34000000,0xf3525252,0xff41312b,0xff3f302a,0xff483a29,0xffbb910e,0xfffcc200,0xfffcc714,0xfffdcd2e,0xfffcd348,0xfffdd95e,0xfffddb6d,0xfffddd71,0xfffedc6c,
1570 0xfffdd85e,0xfffdd348,0xfffccd2e,0xfffcc713,0xfffcc200,0xffd1a101,0xff1f1906,0xff0f0f0f,0xff191919,0xff242424,0xff2c2c2c,0xff313131,0xff2f2f2f,0xff2a2a2a,
1571 0xff212121,0xfa181818,0x901b1b1b,0x5f181818,0x37000000,0xfe4f4f4f,0xff3b2a24,0xff392b26,0xff372d29,0xff957413,0xfff9c001,0xfffcc302,0xfffcc714,0xfffdcb27,
1572 0xfffcd039,0xfffdd344,0xfffcd348,0xfffdd244,0xfffcd039,0xfffccc27,0xfffcc714,0xfffcc303,0xfffcc200,0xffa57f01,0xff0a0907,0xff0f0f0f,0xff191919,0xff242424,
1573 0xff2e2e2e,0xff333333,0xff313131,0xff2c2c2c,0xff232323,0xfe1a1a1a,0x951b1b1b,0x64171717,0x39040404,0xf3454545,0xff352923,0xff352823,0xff322925,0xff55431c,
1574 0xffd1a206,0xfffcc200,0xfffcc200,0xfffcc40b,0xfffcc716,0xfffdca1e,0xfffcca21,0xfffcc91f,0xfffcc716,0xfffcc50b,0xfffcc200,0xfffcc200,0xfffbc100,0xff9b7801,
1575 0xff080808,0xff101010,0xff1b1b1b,0xff262626,0xff2f2f2f,0xff343434,0xff333333,0xff2d2d2d,0xff232323,0xfb1a1a1a,0x971b1b1b,0x65171717,0x38050505,0xe03d3d3d,
1576 0xff332824,0xff302520,0xff2e2522,0xff2c2422,0xff846710,0xfff9bf00,0xfffcc200,0xfffcc200,0xfffcc200,0xfffcc303,0xfffcc304,0xfffcc302,0xfffcc200,0xfffcc200,
1577 0xfffcc200,0xfffcc200,0xfffcc200,0xfffcc200,0xffb68d03,0xff121212,0xff1c1c1c,0xff282828,0xff313131,0xff353535,0xff353535,0xff2d2d2d,0xff242424,0xf31a1a1a,
1578 0x951a1a1a,0x63151515,0x35050505,0xc5333333,0xff302724,0xff2b1f1b,0xff2a221e,0xff27201d,0xff3a2f1a,0xffad8608,0xfffcc200,0xfffcc200,0xfffcc200,0xfffbc100,
1579 0xfffcc200,0xfffcc200,0xfffcc200,0xfffcc200,0xfffcc200,0xfffcc200,0xfffcc200,0xfffcc200,0xff806406,0xff2d2713,0xff1f1f1f,0xff2a2a2a,0xff333333,0xff373737,
1580 0xff343434,0xff2d2d2d,0xff222222,0xe71a1a1a,0x901b1b1b,0x5e161616,0x30050505,0xa0272727,0xff2c2725,0xff241b17,0xff251e1b,0xff231e1b,0xff201d1b,0xff252017,
1581 0xff745b0b,0xffaf8805,0xfff2ba00,0xfffbc100,0xffecb500,0xffe6b100,0xfffcc200,0xffd5a400,0xffefb800,0xfffcc200,0xfffcc200,0xff816405,0xff1a180f,0xffdeab03,
1582 0xffa9850d,0xff2c2c2c,0xff343434,0xff373737,0xff333333,0xff2b2b2b,0xff202020,0xd51a1a1a,0x87191919,0x58141414,0x2a060606,0x721a1a1a,0xf92a2827,0xff201816,
1583 0xff201917,0xff201b1a,0xff1e1b19,0xff1b1918,0xff161414,0xff31290e,0xff55440a,0xff866805,0xff957404,0xff7c6004,0xff654f04,0xff433405,0xff8a6b03,0xfffcc200,
1584 0xff8d6e05,0xff17150e,0xffdaa903,0xfffcc200,0xffd6a607,0xff2d2d2d,0xff343434,0xff353535,0xff303030,0xff282828,0xfd1f1f1e,0xbb1a1a1a,0x7b191919,0x4e141414,
1585 0x22080808,0x410c0c0c,0xc7202020,0xff1d1917,0xff1b1715,0xff1b1817,0xff1a1919,0xff191918,0xff181818,0xff1a1916,0xff141414,0xff121212,0xff211d0f,0xff28220c,
1586 0xff0d0d0d,0xff0e0e0e,0xff2a230c,0xff8f7007,0xff131313,0xffddab03,0xfffcc200,0xffc69a08,0xff292928,0xff2e2e2e,0xff323232,0xff323232,0xff2c2c2c,0xff232323,
1587 0xe91c1c1c,0x9a1a1a1a,0x6c151515,0x420f0f0f,0x1a0a0a0a,0x350e0e0e,0x8a161616,0xfa191817,0xff161212,0xff171514,0xff171616,0xff1b1b1b,0xff1c1c1c,0xff1c1c1c,
1588 0xff1c1c1c,0xff1a1a1a,0xff181818,0xff171717,0xff171717,0xff171717,0xff181818,0xff1a1a1a,0xff655213,0xfffcc200,0xffca9e08,0xff292826,0xffa88511,0xff615324,
1589 0xff2f2f2f,0xff2e2e2e,0xff272727,0xfd1f1e1e,0xc81b1b1b,0x87191919,0x5b141414,0x350e0e0e,0x130d0d0d,0x280d0d0d,0x480e0e0e,0xbe141414,0xff11100f,0xff111111,
1590 0xff161616,0xff1b1b1b,0xff1f1f1f,0xff212121,0xff222222,0xff222222,0xff222222,0xff212121,0xff222222,0xff222222,0xff232323,0xff252525,0xff52461f,0xffa78410,
1591 0xff2e2d28,0xff826a19,0xfffcc200,0xffa08014,0xff2b2b2b,0xff272727,0xff212121,0xe31c1c1c,0x9b1c1c1c,0x72161616,0x49111111,0x280d0d0d,0xc151515,0x1d121212,
1592 0x36131313,0x70111111,0xdc0f0d0d,0xff0f0f0f,0xff141414,0xff1a1a1a,0xff1f1f1f,0xff222222,0xff252525,0xff262626,0xff282828,0xff292929,0xff2a2a2a,0xff2c2c2c,
1593 0xff2d2d2d,0xff2e2e2e,0xff2f2f2f,0xff34332f,0xff2f2f2f,0xff8b7119,0xffedb703,0xff443d25,0xff272727,0xff212121,0xf21c1c1c,0xb61b1b1b,0x81161616,0x5a141414,
1594 0x350e0e0e,0x1c090909,0x7242424,0x120e0e0e,0x26141414,0x42131313,0x890f0f0f,0xe6100e0d,0xff111111,0xff171717,0xff1c1c1c,0xff212121,0xff252525,0xff292929,
1595 0xff2b2b2b,0xff2d2d2d,0xff303030,0xff323232,0xff333333,0xff343434,0xff353535,0xff343434,0xff313131,0xff2d2d2d,0xff534822,0xff252525,0xff212121,0xf51e1d1c,
1596 0xc51a1a1a,0x8f191919,0x66141414,0x42131313,0x250e0e0e,0x120e0e0e,0x3000000,0xb171717,0x18151515,0x2d111111,0x4a151515,0x8e101010,0xe0121110,0xff121212,
1597 0xff171717,0xff1c1c1c,0xff212121,0xff262626,0xff292929,0xff2d2d2d,0xff2f2f2f,0xff313131,0xff323232,0xff343434,0xff333333,0xff313131,0xff2e2e2e,0xff292929,
1598 0xff242424,0xff1f1f1f,0xf21b1b1a,0xc5191919,0x931a1a1a,0x6d151515,0x4b111111,0x2d111111,0x170b0b0b,0xa000000,0x1000000,0x5000000,0xe121212,0x1c121212,
1599 0x31151515,0x4d171717,0x80141414,0xcb121212,0xfb131313,0xff171717,0xff1b1b1b,0xff202020,0xff242424,0xff272727,0xff2a2a2a,0xff2c2c2c,0xff2d2d2d,0xff2d2d2d,
1600 0xff2c2c2c,0xff2a2a2a,0xff262626,0xff222222,0xfd1e1d1d,0xe41b1b1b,0xb81a1a1a,0x90171717,0x6e131313,0x4e101010,0x31101010,0x1b090909,0xd000000,0x5000000,
1601 0xffffff,0x2000000,0x6000000,0xf111111,0x1d121212,0x31151515,0x4a151515,0x66171717,0xa7141414,0xda141414,0xfb161515,0xff181818,0xff1c1c1c,0xff1f1f1f,
1602 0xff212121,0xff232323,0xff232323,0xff242424,0xff222222,0xff212121,0xfd1e1d1d,0xea1c1c1c,0xca1b1b1b,0x9e1a1a1a,0x84151515,0x68141414,0x4c111111,0x31101010,
1603 0x1c090909,0xe000000,0x6000000,0x2000000,0xffffff,0x1000000,0x2000000,0x7000000,0x10202020,0x1d1a1a1a,0x2d171717,0x43171717,0x5a171717,0x72191919,
1604 0xa0151515,0xc6161616,0xe1171717,0xf0171717,0xfa181818,0xfe1a1a1a,0xfb1a1a1a,0xf31a1a1a,0xe71a1a1a,0xd51a1a1a,0xbb1a1a1a,0x9a1a1a1a,0x88181818,0x74161616,
1605 0x5b141414,0x43131313,0x2e111111,0x1c090909,0xe000000,0x7000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,0x2000000,0x7242424,0xe121212,
1606 0x18151515,0x26141414,0x37171717,0x49151515,0x5b161616,0x6d171717,0x7b191919,0x881a1a1a,0x901b1b1b,0x951b1b1b,0x971b1b1b,0x951a1a1a,0x901b1b1b,0x87191919,
1607 0x7b191919,0x6c151515,0x5b141414,0x49111111,0x350e0e0e,0x250e0e0e,0x170b0b0b,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,
1608 0xffffff,0x1000000,0x2000000,0x62b2b2b,0xb171717,0x120e0e0e,0x1d121212,0x29131313,0x36131313,0x43131313,0x4e141414,0x58141414,0x5f181818,0x64171717,
1609 0x65171717,0x63151515,0x5e161616,0x58141414,0x4e141414,0x420f0f0f,0x350e0e0e,0x280d0d0d,0x1c090909,0x120e0e0e,0xa000000,0x5000000,0x2000000,0x1000000,
1610 0xffffff,0xffffff
1611};
1612
1613static const QRgb MPEGPlayer_data[] = {
1614 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
1615 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
1616 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
1617 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
1618 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff1d6366,0xff1d6367,0xff1d6469,0xff1d6469,
1619 0xff1d6469,0xff1d6469,0xff1d6469,0xff000000,0xff1d81e1,0xff1d8afe,0xff1d80df,0xff000000,0xff1d8afe,0xff1d8afe,0xff1d8afe,0xff1d8afe,0xff1d8afe,0xff1d8afe,
1620 0xff1d8afe,0xff1d8afe,0xff1d8afe,0xff1d8afe,0xff000000,0xff1d7bcf,0xff1d8afe,0xff1d7acc,0xff000000,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
1621 0xff1d6266,0xfffab667,0xfffab667,0xfffab668,0xfffab668,0xfffab668,0xfffbb768,0xff000000,0xffbaa673,0xfffdecde,0xffbba46e,0xff000000,0xfffffffe,0xfffffffe,
1622 0xfffffffe,0xfffffffe,0xfffffffe,0xfffffffe,0xfffffffe,0xfffffffe,0xfffffffe,0xfffffffe,0xff000000,0xffb97e1a,0xfffde2cc,0xffaf7516,0xff000000,0x5c000000,
1623 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff1c6165,0xfff6b264,0xfff6b265,0xfff5b165,0xfff6b265,0xfff6b265,0xfff6b365,0xff000000,0xff000000,0xff000000,
1624 0xff000000,0xff000000,0xfffefbf9,0xfffffdfa,0xfffffcfa,0xfffffcfa,0xfffffcfb,0xfffffcfb,0xfffffcfb,0xfffffbf9,0xfffffcf8,0xfffffcf8,0xff000000,0xff000000,
1625 0xff000000,0xff000000,0xff000000,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff1b5b5f,0xffeba85f,0xffeaa75e,0xffeaa75e,0xffeaa75e,0xffeba85e,
1626 0xffeca95f,0xff000000,0xffac9968,0xfff5e0cf,0xffb09863,0xff000000,0xfffdf7f3,0xfffef7f4,0xfffef8f4,0xfffff9f5,0xfffff8f4,0xfffff8f4,0xfffff8f3,0xfffff8f3,
1627 0xfffff7f3,0xfffff7f2,0xff000000,0xffaa7210,0xfff6d8c2,0xff9e6a10,0xff000000,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff195254,0xffd79653,
1628 0xffd69552,0xffd69552,0xffd69552,0xffd79652,0xffda9852,0xff000000,0xffe4c9b5,0xffebded6,0xfff0d5c1,0xff000000,0xfff9ddc9,0xfffcf3ec,0xfffef3ed,0xfffef4ed,
1629 0xfffff4ed,0xfffff4ec,0xfffff3eb,0xfffff3eb,0xfffff3ea,0xfffbd7ba,0xff000000,0xfff5d4ba,0xfffbf1ea,0xffefd1ba,0xff000000,0x93000000,0x62000000,0x3b000000,
1630 0x1f000000,0x3d000000,0xff164543,0xffbb7c41,0xffb97a40,0xffb97a3f,0xffba7a40,0xffbc7c40,0xffbf7f42,0xff000000,0xff89744a,0xffd8b7a0,0xff97814d,0xff000000,
1631 0xffa28647,0xfff7e9df,0xfffbede2,0xfffdeee3,0xfffdeee3,0xfffeeee3,0xfffeeee1,0xfffeede0,0xfffeece0,0xffa16c06,0xff000000,0xff956606,0xffeecbb2,0xff895e06,
1632 0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff123530,0xff9b5e2d,0xff995c2c,0xff985c2c,0xff995c2b,0xff9c5e2d,0xffa0622f,0xff000000,
1633 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
1634 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0f261e,0xff7e421b,0xff7b4019,0xff7b4019,
1635 0xff7b4019,0xff7e421a,0xff82461c,0xff000000,0xff5d4524,0xffa3785c,0xff70582e,0xff000000,0xff866c32,0xffe5cbb6,0xfff0d7c2,0xfff7dcc8,0xfffbe0ca,0xfffde1ca,
1636 0xfffce0c9,0xfffbe0ca,0xfff8dfca,0xff8d6200,0xff000000,0xff835a00,0xffe2bda2,0xff785200,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
1637 0xff1b80e9,0xfffdfcfb,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff3efec,0xffc3c3c3,0xffb59b8b,0xff9a775f,0xff9a6b4d,0xff000000,0xffc29473,0xffd6b59e,
1638 0xffe6c6ad,0xfff1d1b8,0xfff8d5bd,0xfffbd7bd,0xfff9d9bd,0xfff7d7c0,0xfff5d7c0,0xffe9bb96,0xff000000,0xffdfb596,0xffead1be,0xffd6b196,0xff000000,0x99000000,
1639 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff1d88fb,0xffe5e5e5,0xffaaaaaa,0xff888888,0xffa5a5a5,0xffdbdbdb,0xfffafafa,0xfffafafa,0xfff1f1f0,0xffe1d6d0,
1640 0xff816e5a,0xff020202,0xffae8469,0xffc49c80,0xffd9b195,0xffe7c0a3,0xfff2c9ab,0xfff5cdaf,0xfff5d0b1,0xfff1cfb1,0xffefceb4,0xffecccb4,0xff000000,0xff714f00,
1641 0xffd2a98a,0xff664800,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff1978df,0xff7d7d7d,0xff797979,0xff9d9d9d,0xffa7a7a7,0xffadadad,
1642 0xffdedede,0xfff9f9f9,0xfff6f6f6,0xfff5f5f5,0xffe2e2e2,0xff676767,0xff926449,0xffb18264,0xffc89a7a,0xffddae8b,0xffeabb98,0xffedc2a1,0xffecc3a5,0xffebc4a7,
1643 0xffe8c3a8,0xffe4c1a8,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff115195,0xff797979,
1644 0xffb5b5b5,0xffb9b9b9,0xffb9b9b9,0xffb5b5b5,0xffc3c7c3,0xffececea,0xfff3f3f3,0xfff0f1f1,0xfff1f1f1,0xffe5e5e6,0xffad9384,0xff956545,0xffb98561,0xffd09b74,
1645 0xffddab86,0xffe1b592,0xffe3b998,0xffe2ba9b,0xffdeb999,0xffdbb89c,0xff000000,0xff5d4200,0xffbc9476,0xff553c00,0xff000000,0x99000000,0x66000000,0x3d000000,
1646 0x1f000000,0x3d000000,0xff0c3969,0xffa2a2a2,0xffb5b5b5,0xffb2b2b2,0xffb2b2b2,0xffb2b2b2,0xffb9b9b8,0xffe0e0df,0xffeeeeec,0xffeaeaea,0xffeaeaea,0xffeaeaea,
1647 0xffe2dedc,0xff91705c,0xffa96e4b,0xffbe8963,0xffcf9d75,0xffd7a885,0xffd8ad8c,0xffd8af90,0xffd4ae91,0xffd1ad92,0xff000000,0xffb68c6c,0xffc4a792,0xffab876c,
1648 0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0d3f75,0xffa6a7a7,0xffadaaad,0xffaaadad,0xffaaadaa,0xffadadad,0xffb8b8b8,0xffd9d9da,
1649 0xffe4e4e4,0xffe1e3e3,0xffe1e3e1,0xffe3e3e3,0xffe4e4e5,0xffc5bcb7,0xff7c5137,0xffaf7753,0xffc08c66,0xffc99874,0xffcc9f7f,0xffcca281,0xffc8a183,0xff533b00,
1650 0xff000000,0xff4c3700,0xffa57f62,0xff473200,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff1359a4,0xff939593,0xffa5a5a5,0xffa4a4a4,
1651 0xffa4a4a4,0xffa8a8aa,0xffbfbfbd,0xffd5d5d5,0xffdcdcdb,0xffdcdcdc,0xffdcdbdc,0xffdadbdb,0xffd9d9da,0xffe0e0e0,0xff4c4c4c,0xff000000,0xff000000,0xff000000,
1652 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
1653 0xff176cc9,0xffaaaaaa,0xffa2a2a2,0xff9f9f9f,0xffa6a6a6,0xffb4b4b4,0xffc7c7c7,0xffd2d2d2,0xffc9c9c9,0xffbcbcbc,0xffb9b9b9,0xffc4c4c7,0xffcfcfcf,0xffd5d5d5,
1654 0xffaba4a0,0xff835a40,0xffa37150,0xffae7f5f,0xffb28669,0xffb3896d,0xffb28a6f,0xff463100,0xff000000,0xff412e00,0xff8c6850,0xff3c2a00,0xff000000,0x99000000,
1655 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff176cc7,0xffc3c3c3,0xffb8b9b9,0xffb4b2b2,0xffb8b8b9,0xffc0c0c1,0xffc9c9c9,0xffaeaeae,0xff6d6d6d,0xff525252,
1656 0xff595959,0xff7c7c7c,0xffadadad,0xffc7c7c7,0xffb7b7b7,0xff866551,0xff966746,0xffa07454,0xffa37b5e,0xffa67f63,0xffa57e65,0xff8d6346,0xff000000,0xff845e46,
1657 0xff967966,0xff7d5b46,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff1566bd,0xffc0bfbf,0xffc3c3c1,0xffc1c1c1,0xffc0c0bf,0xffc3c3c1,
1658 0xffb2b2b2,0xff5b5a5b,0xff565656,0xff848484,0xff919191,0xff868686,0xff8c8c8c,0xffb1b1b1,0xffb6b8b8,0xff8d7261,0xff8a5c3e,0xff93684b,0xff956d53,0xff977257,
1659 0xff967259,0xff92705a,0xff000000,0xff372600,0xff75513c,0xff332400,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff1461b4,0xffa4a5a5,
1660 0xff969896,0xffa2a4a4,0xffb4b4b4,0xffbcbcbc,0xff8c8c8c,0xff4c4c4a,0xff7e8181,0xff89898a,0xff888688,0xff888888,0xff868688,0xff9b9d9b,0xffb2b2b2,0xff90796b,
1661 0xff805436,0xff865e41,0xff8a6248,0xff8a654c,0xff89654f,0xff87644e,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x99000000,0x66000000,0x3d000000,
1662 0x1f000000,0x3d000000,0xff135ba8,0xff868686,0xff7c7c7c,0xff848484,0xffa8a8a8,0xffb4b5b5,0xff777977,0xff545454,0xff818281,0xff7e7e7e,0xff7e7e7e,0xff7e7e7e,
1663 0xff818181,0xff929393,0xffadadad,0xff8d776a,0xff774b2e,0xff7d5338,0xff7f573d,0xff805a40,0xff7e5941,0xff7c5942,0xff000000,0xff302200,0xff634128,0xff2d2000,
1664 0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff12589f,0xff818181,0xff757575,0xff818182,0xff9f9f9f,0xffa7a8a7,0xff848684,0xff5f5f5f,
1665 0xff757575,0xff777777,0xff777777,0xff777777,0xff7e7d7e,0xff929292,0xffa2a2a2,0xff7c685c,0xff6d4427,0xff734a2e,0xff744d32,0xff754f35,0xff724e38,0xff724e38,
1666 0xff000000,0xff5e3f1c,0xff6d4b38,0xff5b3d1c,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff115298,0xff8e9191,0xff888988,0xff919191,
1667 0xff989898,0xff9a9a9a,0xff939393,0xff707070,0xff6c6c6c,0xff6f6f6f,0xff707070,0xff757575,0xff818181,0xff939393,0xff929292,0xff6a5545,0xff643d21,0xff684226,
1668 0xff6a4329,0xff6b4529,0xff6a452a,0xff2a1d00,0xff000000,0xff291d00,0xff55390e,0xff281d00,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
1669 0xff104c8c,0xff919191,0xff929292,0xff929292,0xff929291,0xff919191,0xff8e8e8e,0xff888888,0xff797979,0xff717171,0xff717171,0xff7d7c7d,0xff888888,0xff919191,
1670 0xff7e817e,0xff1e1e1e,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x99000000,
1671 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0f4784,0xff838384,0xff676867,0xff3e3d3e,0xff2e2e2c,0xff4a4a4a,0xff6f706f,0xff838483,0xff838383,0xff838383,
1672 0xff828283,0xff838383,0xff848383,0xff888988,0xff61605d,0xff382308,0xff55380d,0xff573a0f,0xff57390f,0xff583a10,0xff583b10,0xff241a00,0xff000000,0xff241a00,
1673 0xff4a3400,0xff241a00,0xff000000,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff0e437c,0xff595959,0xff202020,0xff39393a,0xff505050,0xff4d4d4d,
1674 0xff505050,0xff6f6f6f,0xff7a7a7a,0xff7a7a7a,0xff7c7a7a,0xff7a7a7c,0xff7a7a7c,0xff7d7d7d,0xff342b20,0xff402a02,0xff503504,0xff513604,0xff513704,0xff513704,
1675 0xff513704,0xff453000,0xff000000,0xff453100,0xff513704,0xff463200,0xff000000,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff0c3b6d,0xff262626,
1676 0xff353737,0xff545452,0xff515151,0xff515151,0xff505050,0xff5a5a5a,0xff707070,0xff717171,0xff717171,0xff747170,0xff757575,0xff575552,0xff251800,0xff462f00,
1677 0xff4b3300,0xff493200,0xff493200,0xff4a3300,0xff4a3300,0xff4a3300,0xff000000,0xff201700,0xff432f00,0xff211700,0xff000000,0x87000000,0x5a000000,0x36000000,
1678 0x17000000,0x2e000000,0xff0b335f,0xff020b14,0xff082748,0xff082748,0xff082748,0xff082748,0xff082648,0xff092c51,0xff0c3968,0xff0c3a6b,0xff0c3a6b,0xff0c3a6c,
1679 0xff0b345e,0xff030900,0xff061500,0xff081a00,0xff081a00,0xff081900,0xff081900,0xff081900,0xff081a00,0xff081a00,0xff000000,0xff000000,0xff000000,0xff000000,
1680 0xff000000,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
1681 0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,
1682 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
1683 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,
1684 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
1685 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
1686 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
1687 0x18000000,0xf000000
1688};
1689
1690static const QRgb Mindbreaker_data[] = {
1691 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
1692 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
1693 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
1694 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
1695 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff522300,0xff522300,0xff522300,0xff522300,
1696 0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,
1697 0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
1698 0xff522300,0xff9b4326,0xffa14322,0xffa64422,0xffa04425,0xff944025,0xff974326,0xffa64623,0xffa34623,0xff924226,0xff8a3f25,0xff944628,0xff914227,0xff8f3f26,
1699 0xff883f26,0xff823f25,0xff823f25,0xff843d23,0xff863d25,0xff8b3f26,0xff883b23,0xff8b3a23,0xff8d3d25,0xff883f28,0xff7d3c27,0xff843f28,0xff522300,0x5c000000,
1700 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff522300,0xff743825,0xff863d25,0xff8d4025,0xff923f22,0xff944222,0xff914022,0xff964022,0xff974223,0xff974223,
1701 0xff8f4225,0xff8f4226,0xff914326,0xff8f4226,0xff8f4026,0xff8f4023,0xff8f4325,0xff8d4225,0xff843d23,0xff7b3b23,0xff7d3d26,0xff7d3823,0xff863c25,0xff743825,
1702 0xff7d3b25,0xff843c23,0xff522300,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff522300,0xff7d3c23,0xff793823,0xff793723,0xff863b23,0xff944225,
1703 0xff8d4225,0xff803c25,0xff883f23,0xff924625,0xff9b4725,0xffa44823,0xffa64a23,0xffae4a22,0xffaf4d22,0xffb24e22,0xffab4a21,0xffa84821,0xffa84721,0xffa04221,
1704 0xffa84721,0xffa84821,0xffa94721,0xffa14422,0xffb14a21,0xffb24a21,0xff522300,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff522300,0xff974726,
1705 0xff9c4725,0xffa04825,0xff9d4420,0xff8b5641,0xff83736d,0xff848484,0xff80706a,0xff764836,0xff70311a,0xff7d3922,0xff894025,0xff8f4227,0xff863f25,0xff843f23,
1706 0xff823f25,0xffae8777,0xffe5dbd6,0xffffffff,0xffe0d4d1,0xff9d7668,0xff6d341f,0xff753b23,0xff834125,0xff864226,0xff522300,0x93000000,0x62000000,0x3b000000,
1707 0x1f000000,0x3d000000,0xff522300,0xff743a26,0xff793823,0xff7b3822,0xff794f41,0xff777777,0xff4a4a4a,0xff383838,0xff4a4a4a,0xff777777,0xff4d362f,0xff4e2718,
1708 0xff603022,0xff733a25,0xff7d3f27,0xff8d3f21,0xffb68778,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff7e5f55,0xff69311b,0xff833b21,0xff853d24,
1709 0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff974022,0xff8a3f23,0xff883c23,0xff7d716d,0xff4a4a4a,0xff171717,0xff000000,
1710 0xff171717,0xff4a4a4a,0xff6f6460,0xff401d10,0xff692f1c,0xff843c24,0xff883f25,0xff8f3f22,0xffe7dbd7,0xffffffff,0xffbbbaba,0xff8c8989,0xffbbbaba,0xffffffff,
1711 0xffc7bab6,0xff471e0f,0xff7c391c,0xff9d4520,0xff502200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xffaf4621,0xffa44421,0xffa44321,
1712 0xff848484,0xff383838,0xff000000,0xff000000,0xff000000,0xff383838,0xff848484,0xff31140a,0xff612b17,0xff883d22,0xff963e21,0xff973c22,0xffffffff,0xffffffff,
1713 0xff8c8989,0xff8c8989,0xff8c8989,0xffffffff,0xffffffff,0xff271108,0xff5d2812,0xff8b3d1c,0xff4f2100,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
1714 0xff522300,0xffb14621,0xffb74b21,0xffb94b20,0xff81706a,0xff4a4a4a,0xff171717,0xff000000,0xff171717,0xff4a4a4a,0xff685e5b,0xff25110a,0xff4d2516,0xff6c3520,
1715 0xff723a25,0xff723b28,0xffddd4d1,0xffffffff,0xffbbbaba,0xff8c8989,0xffbbbaba,0xffffffff,0xffb3aaa6,0xff170b06,0xff3e1d11,0xff6a311d,0xff4d2100,0x99000000,
1716 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff994b27,0xff944827,0xff974426,0xff6f4839,0xff777777,0xff4a4a4a,0xff383838,0xff4a4a4a,0xff777777,
1717 0xff2c1f1b,0xff21120c,0xff3f2017,0xff542d1f,0xff5b3022,0xff563025,0xff826e68,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff3a2b24,0xff1b0c06,
1718 0xff492210,0xff813e1d,0xff4c2000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff803c27,0xff743823,0xff743a26,0xff5a2e1d,0xff4f392f,
1719 0xff6d6461,0xff848484,0xff6b5f5a,0xff39221a,0xff251008,0xff461d0f,0xff6c2e1a,0xff7e3b22,0xff864027,0xff8b3f26,0xff773620,0xff856256,0xffc7bbb6,0xffffffff,
1720 0xffb8aba6,0xff402c23,0xff150903,0xff2d1409,0xff532413,0xff7c341d,0xff4d2100,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xffbb4b20,
1721 0xffc35421,0xffc05020,0xffa7441b,0xff803415,0xff55250f,0xff3c1c0c,0xff2f1409,0xff2e150b,0xff381a10,0xff4b2517,0xff5b301e,0xff5b3022,0xff5c3123,0xff643223,
1722 0xff5e2f20,0xff4a2519,0xff2d1710,0xff170d09,0xff100906,0xff120a06,0xff1b0f09,0xff35180e,0xff4e2919,0xff603221,0xff4f2100,0x99000000,0x66000000,0x3d000000,
1723 0x1f000000,0x3d000000,0xff522300,0xffa94a22,0xffa84d25,0xffa04625,0xff903f20,0xff79371d,0xff6a2e19,0xff612715,0xff5d2614,0xff5d2919,0xff73311a,0xff8b371c,
1724 0xff963f20,0xff974325,0xff9b4423,0xffa34221,0xffa34220,0xff98431f,0xff77361b,0xff5c2a15,0xff4b2211,0xff4c200f,0xff582410,0xff742f15,0xff953c1b,0xffa2461f,
1725 0xff502200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff863f26,0xff8d3a22,0xff924226,0xff9c4b27,0xff994825,0xff8b4023,0xff7d3b23,
1726 0xff7a3b23,0xff853b1e,0xff843e22,0xff733924,0xff703a27,0xff6b3826,0xff6d3b27,0xff703826,0xff753c27,0xff6f3b26,0xff663624,0xff653521,0xff60331f,0xff61341e,
1727 0xff67351f,0xff77381f,0xff813d22,0xff8a4225,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff7f3d26,0xff864227,0xff8b4627,
1728 0xff924a27,0xff9b4726,0xff974623,0xff813c25,0xff6f3c27,0xff633726,0xff643827,0xff633827,0xff573326,0xff513126,0xff5c3326,0xff643223,0xff683827,0xff6b3a27,
1729 0xff673725,0xff623624,0xff673725,0xff6a3b24,0xff763c25,0xff7b3f28,0xff834129,0xff8d4427,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
1730 0xff522300,0xff8f4627,0xff864225,0xff863f22,0xff8f4025,0xff964225,0xff8f4426,0xff803f27,0xff7b3d27,0xff703b26,0xff663625,0xff663625,0xff643525,0xff5f3325,
1731 0xff613525,0xff643523,0xff693725,0xff6b3825,0xff6e3a25,0xff793b25,0xff844227,0xff8a4427,0xff8b4626,0xff844226,0xff884326,0xff8a4025,0xff522300,0x99000000,
1732 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xffa14723,0xff9c4625,0xff994222,0xff924023,0xffbb8c78,0xffe9dcd7,0xffffffff,0xffe0d5d1,0xff9d7669,
1733 0xff793821,0xff844124,0xff8c4226,0xff8b4328,0xff884628,0xff8f4627,0xff8f4627,0xff8f4427,0xff944627,0xff8b4427,0xff8d4227,0xff944426,0xff994626,0xff8f4226,
1734 0xff8f4226,0xff8f4225,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff964a27,0xff8d4627,0xff884627,0xffb18978,0xffffffff,
1735 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff836255,0xff6f331c,0xff904121,0xff964424,0xff924225,0xff964325,0xff944426,0xff76361e,0xff210f09,0xff000000,
1736 0xff231109,0xff7d3a1f,0xff9b4623,0xff964323,0xff924425,0xff914727,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff964626,
1737 0xff864027,0xff8b4326,0xffe8dbd6,0xffffffff,0xffbbbaba,0xff8c8989,0xffbbbaba,0xffffffff,0xffc8bcb6,0xff4d2110,0xff7c3518,0xff97411f,0xff964424,0xffa04622,
1738 0xffa04a25,0xff241109,0xff000000,0xff000000,0xff000000,0xff281208,0xffae5125,0xffae4d22,0xffab4721,0xffa64a25,0xff522300,0x99000000,0x66000000,0x3d000000,
1739 0x1f000000,0x3d000000,0xff522300,0xff6d3a27,0xff743d27,0xff8d4027,0xffffffff,0xffffffff,0xff8c8989,0xff8c8989,0xff8c8989,0xffffffff,0xffffffff,0xff271109,
1740 0xff4e2515,0xff723921,0xff7b3d25,0xff7f3f26,0xff844026,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff863f27,0xff864627,0xff864025,0xff7d3f27,
1741 0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xffa34423,0xff9e4625,0xffa84a23,0xffe8d8d0,0xffffffff,0xffbbbaba,0xff8c8989,
1742 0xffbbbaba,0xffffffff,0xffb7aba6,0xff190c06,0xff3e1d11,0xff69321d,0xff833f24,0xff974826,0xff9b4a26,0xff271209,0xff000000,0xff000000,0xff000000,0xff291309,
1743 0xffa14a26,0xffa84823,0xffa84823,0xffa44723,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xffa94a21,0xffa44825,0xffa84a25,
1744 0xffae7e68,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff3f2c23,0xff1e0e06,0xff4c2410,0xff833f1d,0xffa34d23,0xffaf5326,0xffaf5326,0xff91451f,
1745 0xff2a1408,0xff000000,0xff291309,0xff91451f,0xffaf5326,0xffaf5326,0xffac5326,0xffac5326,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
1746 0xff522300,0xffb85121,0xffb85021,0xffb45023,0xff95401e,0xff906654,0xffc8bbb6,0xffffffff,0xffb7aba6,0xff3b2b24,0xff120804,0xff2b1409,0xff592913,0xff88401f,
1747 0xffa74a21,0xffb95021,0xffaf5025,0xffa84d26,0xffa65027,0xffa95327,0xffa04d27,0xffa85127,0xffac5126,0xffa84a23,0xffb25023,0xffa84a25,0xff522300,0x99000000,
1748 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xffb85322,0xffb75323,0xffb85725,0xffae5122,0xff89401b,0xff532710,0xff2a140a,0xff210e05,0xff220f05,
1749 0xff301708,0xff4d230e,0xff793717,0xff99451e,0xffa84b23,0xffa64e27,0xff974a27,0xff944728,0xff9c4d27,0xffa34a25,0xffa14825,0xffa64b25,0xffa04625,0xffa14722,
1750 0xff9e4826,0xffa04a26,0xff522300,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff522300,0xffc55721,0xffc85b21,0xffc55721,0xffc15520,0xffb2501d,
1751 0xff944419,0xff713413,0xff5d2a0f,0xff59280e,0xff662e10,0xff7c3716,0xff9a441b,0xffb04e1e,0xffb85221,0xffb55325,0xffaf5026,0xffaf4e27,0xffae5026,0xffa85025,
1752 0xffac5326,0xffaf5326,0xffaf5325,0xffac5326,0xffac5326,0xffac5326,0xff522300,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff522300,0xff9b4826,
1753 0xffaf4a21,0xffb44d22,0xffbc5623,0xffb95421,0xffb54f1e,0xffa6491c,0xff9c4519,0xff964219,0xff9c421a,0xffa1471c,0xffae4d1e,0xffb34c20,0xffac4822,0xff9e4426,
1754 0xff974427,0xff964627,0xff9e4627,0xffa04627,0xff9b4327,0xffa64a26,0xff9e4427,0xffa64b25,0xffaf5125,0xffae5025,0xff522300,0x87000000,0x5a000000,0x36000000,
1755 0x17000000,0x2e000000,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff502200,0xff4f2100,0xff4d2100,0xff4c2000,0xff4d2100,0xff4f2100,
1756 0xff502200,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,
1757 0xff522300,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
1758 0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,
1759 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
1760 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,
1761 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
1762 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
1763 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
1764 0x18000000,0xf000000
1765};
1766
1767static const QRgb MineHunt_data[] = {
1768 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
1769 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
1770 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
1771 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
1772 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff010114,0xff010009,0xff010008,0xff000008,
1773 0xff050340,0xff05033f,0xff050349,0xff06034f,0xff070465,0xff06045d,0xff050346,0xff03022c,0xff020119,0xff020119,0xff02011e,0xff040237,0xff050346,0xff05033f,
1774 0xff040237,0xff03022a,0xff03022b,0xff030225,0xff02011f,0xff04022b,0xff03021f,0xff07033b,0xff080224,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
1775 0xff01010c,0xff0c0b0c,0xff060606,0xff393939,0xff676b68,0xff808481,0xff848684,0xff8e9392,0xff969997,0xff868b8c,0xff616262,0xff3f3e3e,0xff2f2f2f,0xff2d2d2d,
1776 0xff3a3a3a,0xff6c6968,0xff7f7b7a,0xff72736e,0xff646464,0xff474848,0xff292a2c,0xff1b2121,0xff141313,0xff0c0a09,0xff181413,0xffd35555,0xff030112,0x5c000000,
1777 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff030223,0xff2e3032,0xff414343,0xffb5b5b5,0xffefefef,0xffd8d7d7,0xffc3c4c3,0xff9a9d9b,0xff848684,0xff757877,
1778 0xff5f6160,0xff4e5150,0xff454747,0xff3f4446,0xff3d3c3e,0xff5f605f,0xff6d6c69,0xff62625f,0xff4e4e4e,0xff2d2d30,0xff1e2022,0xff111111,0xff000000,0xff161617,
1779 0xffbc706e,0xff9e5c5c,0xff020119,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff050344,0xff747677,0xff8c8988,0xfff7f7f8,0xffe4e4e4,0xffd1d0d0,
1780 0xffb4b7b6,0xff8d9190,0xff727374,0xff707370,0xff606262,0xff535453,0xff494c4c,0xff424445,0xff434245,0xff4b4b4b,0xff4d4d4d,0xff404043,0xff29282a,0xff1e1e1e,
1781 0xff0a0a0a,0xff000000,0xff353536,0xffb19696,0xffa78686,0xff966f6e,0xff030121,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff05034a,0xff808484,
1782 0xff8e8e8b,0xff878784,0xffe5e4e5,0xffcccbcb,0xff9da6a6,0xff696f6b,0xff4b4d4d,0xff656967,0xff636563,0xff5b5d60,0xff515356,0xff4c4f51,0xff4a4c4c,0xff444849,
1783 0xff27292c,0xff252427,0xff171e1c,0xff060606,0xff010101,0xff2d2f2d,0xffb0acac,0xffa19696,0xffa38282,0xff966564,0xff020117,0x93000000,0x62000000,0x3b000000,
1784 0x1f000000,0x3d000000,0xff06034f,0xff909291,0xff72726f,0xff6b6a68,0xff484a46,0xffc4c7c6,0xff6f7270,0xff403f3f,0xff272727,0xff525455,0xff5b5d5d,0xff5d5f60,
1785 0xff575a59,0xff616262,0xff757775,0xff727472,0xff2c2e2e,0xff161a19,0xff111111,0xff020202,0xff1d1c1e,0xff050505,0xff121212,0xff9a7f7f,0xffbd7271,0xff9e4e4e,
1786 0xff01000a,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff050349,0xff8f9190,0xff555656,0xff464948,0xff323335,0xff636564,0xff343333,0xff232622,
1787 0xff272626,0xff4c4f51,0xff4e5052,0xff656865,0xff999999,0xffaaaaaa,0xff999e9d,0xff8d8f8d,0xff767878,0xff121111,0xff000000,0xff212727,0xff232324,0xff5f5c5c,
1788 0xffb78e8e,0xffc57474,0xffde6161,0xffa63e3e,0xff010003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff02011e,0xff7f8282,0xff5c5f5f,0xff39383a,
1789 0xff303334,0xff282928,0xff1f1f1f,0xff212121,0xff393838,0xff444749,0xff45474a,0xffa3a8a7,0xffababab,0xffa2a2a2,0xff939292,0xff818384,0xff747777,0xff535758,
1790 0xff2c2e31,0xff2f2f30,0xff5b5a5a,0xffbe8d8e,0xffcb7271,0xffe15f5f,0xfff25656,0xffa83737,0xff010003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
1791 0xff010110,0xff686a69,0xff727574,0xff4e4f4f,0xff252525,0xff151817,0xff1b1a1a,0xff383838,0xff46484a,0xff424445,0xff545856,0xffa8a7a7,0xff9e9e9e,0xff939896,
1792 0xff8e8a89,0xff787b7c,0xff636464,0xff545756,0xff3a3a3e,0xff29292a,0xff8c7775,0xffd17070,0xffe65e5e,0xfff45555,0xfffa5252,0xffa83737,0xff010003,0x99000000,
1793 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff01010c,0xff535758,0xff606363,0xff6a6d6b,0xff626565,0xff565857,0xff4b4e51,0xff454748,0xff454547,0xff434747,
1794 0xff505350,0xff9a9695,0xff8a8886,0xff7d8180,0xff747877,0xff5d6061,0xff454746,0xff3f3e3e,0xff373939,0xff292e30,0xffc57a7a,0xffe6605f,0xfff55555,0xfffa5252,
1795 0xfffa5252,0xffa83737,0xff010003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff020119,0xff484a4c,0xff4f5453,0xff5d6263,0xff616361,0xff545758,
1796 0xff4c4d50,0xff494c4e,0xff494d4c,0xff4c4e4e,0xff4b504f,0xff787777,0xff727675,0xff626663,0xff535353,0xff3d3c3c,0xff272a2a,0xff222323,0xff202121,0xff1e211d,
1797 0xffa77878,0xffe46160,0xfff55555,0xfffa5252,0xfffa5252,0xffa83737,0xff010003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff020123,0xff3f4445,
1798 0xff494c4e,0xff575a5b,0xff5f6164,0xff686a68,0xff606161,0xff535758,0xff535556,0xff535556,0xff535558,0xff535658,0xff595c59,0xff434548,0xff313533,0xff202121,
1799 0xff1e231e,0xff201f1f,0xff171b19,0xff262727,0xff585758,0xffce6e6e,0xffe85b5b,0xfff75353,0xfffa5252,0xffa83737,0xff010003,0x99000000,0x66000000,0x3d000000,
1800 0x1f000000,0x3d000000,0xff020122,0xff434344,0xff45494a,0xff646565,0xff908e8d,0xff8c8b87,0xff7e7d7e,0xff6d6c6c,0xff545958,0xff505454,0xff535556,0xff4f5253,
1801 0xff444949,0xff383737,0xff2c2d2f,0xff2a2d2d,0xff302f32,0xff2b3030,0xff2b2c2f,0xffb4a4a5,0xffa98f8e,0xffbb7676,0xffd96161,0xfff15655,0xfffa5252,0xffa83737,
1802 0xff010003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff020123,0xff424244,0xff525151,0xff959595,0xff929190,0xff848481,0xff6e6e6e,0xff5c5e5e,
1803 0xff4f5352,0xff484c4e,0xff4b4e4f,0xff4f5050,0xff46494b,0xff3f4343,0xff37393a,0xff343639,0xff303335,0xff343334,0xff131212,0xff70615e,0xffbc7e7e,0xffc46f6f,
1804 0xffd9605f,0xfff05757,0xfff95253,0xffa83737,0xff010003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff030225,0xff434648,0xff747373,0xff8a8a86,
1805 0xff898985,0xff7d7b79,0xff616464,0xff474b49,0xff363836,0xff38383d,0xff444645,0xff444748,0xff454848,0xff474a4c,0xff3f4345,0xff303033,0xff353839,0xff222223,
1806 0xff000000,0xff000000,0xffcf6161,0xffe65d5c,0xffee5758,0xfff65353,0xfff95252,0xffa83737,0xff010003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
1807 0xff020224,0xff464a4a,0xff777676,0xff7a7a7a,0xff777777,0xff696c6c,0xff4e5051,0xff313333,0xff212020,0xff202322,0xff333837,0xff474b4c,0xff989693,0xff9da2a1,
1808 0xff343335,0xff151a1a,0xff3d3c3d,0xffde6a69,0xffcb5b5a,0xff9b4e4e,0xffac4e4c,0xfffa5252,0xfff95252,0xfffa5252,0xfffa5252,0xffa83737,0xff010003,0x99000000,
1809 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff040234,0xff424447,0xff525252,0xff696a6a,0xff626364,0xff535654,0xff363939,0xff1a1c1c,0xff191818,0xff28292b,
1810 0xff4a4a49,0xffa4a3a4,0xff989898,0xff949393,0xff8d9191,0xff0b0d0e,0xff5e4c4c,0xffdb6c6c,0xffeb5b5b,0xfffa5252,0xfffa5252,0xfffa5252,0xfffa5252,0xfffa5252,
1811 0xfffa5252,0xffa83737,0xff010003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff030229,0xff444444,0xff3d4243,0xff575957,0xff505151,0xff403f42,
1812 0xff242323,0xff181818,0xff222222,0xff323335,0xff999594,0xff969596,0xff8d908b,0xff878987,0xff808487,0xff5e6262,0xff222122,0xffbd7d7c,0xffd66464,0xfff15656,
1813 0xfffa5252,0xfffa5252,0xfffa5252,0xfffa5252,0xfffa5252,0xffa83737,0xff010003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff020115,0xff2b2e2e,
1814 0xff373939,0xff414647,0xff464848,0xff313332,0xff191919,0xff191919,0xff2a292b,0xff535252,0xff909391,0xff888b89,0xff818383,0xff7f8282,0xff696b6a,0xff484a4a,
1815 0xff3b3e3d,0xffa78585,0xffc46b6b,0xffea5959,0xfff95252,0xfffa5252,0xfffa5252,0xfffa5252,0xfffa5252,0xffa83737,0xff010003,0x99000000,0x66000000,0x3d000000,
1816 0x1f000000,0x3d000000,0xff010111,0xff353836,0xff29292a,0xff2d3334,0xff383b3d,0xff2a2929,0xff111111,0xff1c1f1f,0xff1b2121,0xff3e4144,0xff717678,0xff7e807f,
1817 0xff747876,0xff666767,0xff4d5050,0xff3a3939,0xff202120,0xff8e807e,0xffb97171,0xffe25a5a,0xfff85353,0xfffa5252,0xfffa5252,0xfffa5252,0xfffa5252,0xffa83737,
1818 0xff010003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff060452,0xff74716f,0xff010101,0xff5e4b4b,0xffb67373,0xff1b1a1c,0xff222222,0xffada1a1,
1819 0xffaa9898,0xffbd8282,0xffa05e5d,0xff222426,0xff575858,0xff4a4d4d,0xff3a3c41,0xff2d2c2d,0xff1a1d1d,0xff6a6a6a,0xffad7373,0xffda5e5d,0xfff55353,0xfffa5252,
1820 0xfffa5252,0xfffa5252,0xfffa5252,0xffa83737,0xff010003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff060454,0xff716c6c,0xff2b2b2b,0xffdb6d6d,
1821 0xffef5a5a,0xff353535,0xff98706d,0xffa88b8b,0xffaa8383,0xffc96f6f,0xffe55f5f,0xffa15a57,0xff655050,0xff636363,0xff303130,0xff272828,0xff1a1b1b,0xff4c4c4c,
1822 0xffa67676,0xffd06161,0xfff15555,0xfffa5252,0xfffa5252,0xfffa5252,0xfffa5252,0xffa83737,0xff010003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
1823 0xff070451,0xffbe8989,0xffd76868,0xffea5b5b,0xfff75353,0xffef5757,0xffd26969,0xffb57676,0xffbd7171,0xffdb6161,0xfff25656,0xfff25656,0xffe15f5f,0xffcb6c6c,
1824 0xff947573,0xff414141,0xff1b1a1a,0xff323533,0xff9f7b7b,0xffc46565,0xffeb5757,0xfffa5252,0xfffa5252,0xfffa5252,0xfffa5252,0xffa83737,0xff010003,0x99000000,
1825 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff080454,0xffe08181,0xffef5857,0xfff85353,0xfffa5252,0xfff75454,0xffe45c5c,0xffd06363,0xffd76161,0xffed5858,
1826 0xfffa5252,0xfffa5252,0xfff55555,0xffe75a5a,0xffd56262,0xffbf6e6e,0xff736a6a,0xff262c2c,0xff9b7979,0xffbb6868,0xffe55959,0xfff85252,0xfffa5252,0xfffa5252,
1827 0xfffa5252,0xffa83737,0xff010003,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff09045b,0xfff68080,0xfffa5252,0xfffa5252,0xfffa5252,0xfffa5252,
1828 0xfff45454,0xffec5857,0xffef5656,0xfff75353,0xfffa5252,0xfffa5252,0xfffa5252,0xfff85353,0xfff15555,0xffe25b5b,0xffcd6464,0xffb56d6d,0xffa8706e,0xffbb6868,
1829 0xffe15a5a,0xfff75353,0xfffa5252,0xfffa5252,0xfffa5252,0xffa83737,0xff010003,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff0a034c,0xffec4d4d,
1830 0xffa83737,0xffa83737,0xffa83737,0xffa83737,0xffa83737,0xffa73838,0xffa83838,0xffa83737,0xffa83737,0xffa83737,0xffa83737,0xffa83737,0xffa83737,0xffa73939,
1831 0xffa43f3f,0xff9d4947,0xff985151,0xff994f4f,0xffa24141,0xffa83938,0xffa83737,0xffa83737,0xffa83737,0xff672222,0xff000000,0x87000000,0x5a000000,0x36000000,
1832 0x17000000,0x2e000000,0xff080224,0xff03010d,0xff010003,0xff010003,0xff010003,0xff010003,0xff010003,0xff010003,0xff010003,0xff010003,0xff010003,0xff010003,
1833 0xff010003,0xff010003,0xff010003,0xff010003,0xff010003,0xff010006,0xff01000a,0xff01000b,0xff010006,0xff010003,0xff010003,0xff010003,0xff010003,0xff000000,
1834 0xff000000,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
1835 0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,
1836 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
1837 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,
1838 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
1839 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
1840 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
1841 0x18000000,0xf000000
1842};
1843
1844static const QRgb NetHack_data[] = {
1845 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
1846 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
1847 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
1848 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
1849 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff521e00,0xff521b00,0xff521800,0xff521800,
1850 0xff541a00,0xff561a00,0xff571c00,0xff581c00,0xff5b1d00,0xff5c1f00,0xff5f2000,0xff602100,0xff632300,0xff662400,0xff682600,0xff6a2700,0xff6c2900,0xff6f2a00,
1851 0xff722d00,0xff752e00,0xff772f00,0xff793100,0xff7c3200,0xff7a3200,0xff6e2f00,0xff5c2200,0xff4d1200,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
1852 0xff521b00,0xfffdadad,0xfffa8585,0xfff67d7d,0xfff47a7a,0xfff37a7a,0xfff37a7a,0xfff37a7a,0xfff37a7a,0xfff37a7a,0xfff37a7a,0xfff37a7a,0xfff37a7a,0xfff37a7a,
1853 0xfff37a7a,0xfff37a7a,0xfff37a7a,0xfff37a7a,0xfff37a7a,0xfff37a7a,0xfff37a7a,0xfff37a7a,0xfff27a7a,0xffe97778,0xffc76e6f,0xff924848,0xff2b1200,0x5c000000,
1854 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff511800,0xfffa8584,0xffee4242,0xffdd2e2e,0xffd12828,0xffce2727,0xffcd2727,0xffcd2727,0xffcd2727,0xffcd2727,
1855 0xffcd2727,0xffcd2727,0xffcd2727,0xffcd2727,0xffcd2727,0xffcd2727,0xffcd2727,0xffcd2727,0xffcd2727,0xffcd2727,0xffcd2727,0xffce2727,0xffce2727,0xffc92727,
1856 0xffaa2727,0xff5b2424,0xff110900,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff521800,0xfff67d7d,0xffdd2e2e,0xffaf1313,0xff930b0b,0xff8b0a0a,
1857 0xff8a0a0a,0xff8a0a0a,0xff8a0a0a,0xff8a0a0a,0xff8a0a0a,0xff8a0a0a,0xff8a0a0a,0xff8a0a0a,0xff8a0a0a,0xff8a0a0a,0xff8a0a0a,0xff8a0a0a,0xff8a0a0a,0xff8a0a0a,
1858 0xff8a0a0a,0xff8a0a0a,0xff8e0a0a,0xff940a0a,0xff8a0a0a,0xff430909,0xff070200,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff531a00,0xfff47a7a,
1859 0xffd12828,0xff930b0b,0xff6a0202,0xff600101,0xff5e0101,0xff5e0101,0xff5e0101,0xff5e0101,0xff5e0101,0xff5e0101,0xff5e0101,0xff5e0101,0xff5e0101,0xff5e0101,
1860 0xff5e0101,0xff5e0101,0xff5e0101,0xff5e0101,0xff5e0101,0xff5f0101,0xff640101,0xff730101,0xff780101,0xff3b0101,0xff040000,0x93000000,0x62000000,0x3b000000,
1861 0x1f000000,0x3d000000,0xff551a00,0xfff37a7a,0xffce2727,0xff8b0a0a,0xff600101,0xffd8bd8c,0xffdfc693,0xffdec591,0xffdcc28b,0xffdbbf86,0xffd9ba7d,0xffd7b775,
1862 0xffd4b36b,0xffd2ae61,0xffcea855,0xffcba146,0xffc79a39,0xffc49328,0xffbf8a17,0xffb98105,0xffb07802,0xff722a00,0xff580000,0xff690000,0xff730000,0xff390000,
1863 0xff030000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff561b00,0xfff37a7a,0xffcd2727,0xff8a0a0a,0xff5e0101,0xffe0c996,0xffe6d09a,0xffe5cd96,
1864 0xffe3cb92,0xffe2c88b,0xffe0c482,0xffddc079,0xffdabb6e,0xffd8b462,0xffd4af54,0xffd1a845,0xffcc9f34,0xffc7961f,0xffc28c0c,0xffb98405,0xffaf7d02,0xff722c00,
1865 0xff560000,0xff680000,0xff720000,0xff390000,0xff030000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff581c00,0xfff37a7a,0xffcd2727,0xff8a0a0a,
1866 0xff5e0101,0xffdbc390,0xffe1cb96,0xffe2ca94,0xffdfc88d,0xffdec486,0xffdcc07d,0xffd9bb73,0xffd6b667,0xffd3b05a,0xffcfa94b,0xffcba13a,0xffc69827,0xffc08e13,
1867 0xffb98509,0xffaf7e05,0xffa37402,0xff6d2900,0xff560000,0xff680000,0xff720000,0xff390000,0xff040000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
1868 0xff5a1d00,0xfff37a7a,0xffcd2727,0xff8a0a0a,0xff5e0101,0xffd6be8c,0xffdcc691,0xffdbc58e,0xffdac288,0xffd8be7f,0xffd7bb77,0xffd4b66c,0xffd0af5e,0xffcda951,
1869 0xffc9a241,0xffc5982e,0xffbe901a,0xffb8860d,0xffae7e09,0xffa47605,0xff9a6c02,0xff6a2700,0xff560000,0xff680000,0xff720000,0xff390000,0xff040000,0x99000000,
1870 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff5b1e00,0xfff37a7a,0xffcd2727,0xff8a0a0a,0xff5e0101,0xffd1b884,0xffd7c089,0xffd6bf86,0xffd4bb7f,0xffd3b878,
1871 0xffcfb46d,0xffcdad62,0xffc87843,0xffc57138,0xffc29836,0xffbd9022,0xffb88711,0xffad7e0c,0xffa37708,0xff986e05,0xff8f6502,0xff672400,0xff560000,0xff680000,
1872 0xff720000,0xff390000,0xff040000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff5d2000,0xfff37a7a,0xffcd2727,0xff8a0a0a,0xff5e0101,0xffccb17d,
1873 0xffd1ba81,0xffd0b87e,0xffceb576,0xffcbb16e,0xffc9ac64,0xffc57d48,0xffbf2923,0xffbb231e,0xffb96723,0xffb58615,0xffac7f11,0xffa2760c,0xff996e08,0xff8e6605,
1874 0xff865e02,0xff632200,0xff560000,0xff670000,0xff710000,0xff390000,0xff040000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff602100,0xfff37a7a,
1875 0xffcd2727,0xff8a0a0a,0xff5e0101,0xffc5ac76,0xffcab279,0xffc8b072,0xffc7ad6c,0xffc5a863,0xffc17c49,0xffbb2d26,0xffb81f1f,0xffb31c1c,0xffae1e18,0xffa95915,
1876 0xffa17610,0xff976e0c,0xff8e6708,0xff845f04,0xff7c5702,0xff622300,0xff550000,0xff650000,0xff6f0000,0xff390000,0xff040000,0x99000000,0x66000000,0x3d000000,
1877 0x1f000000,0x3d000000,0xff622200,0xfff37a7a,0xffcd2727,0xff8a0a0a,0xff5e0101,0xffc0a56d,0xffc2ab6f,0xffc1a76a,0xffc0a461,0xffbc7b49,0xffb7312b,0xffb32323,
1878 0xffb01f1f,0xffab1b1b,0xffa51818,0xff9c1b14,0xff954d10,0xff8d670b,0xff846008,0xff7c5904,0xff755302,0xff642e00,0xff540000,0xff630000,0xff6b0000,0xff380000,
1879 0xff030000,0x9a000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff652400,0xfff37a7a,0xffcd2727,0xff8a0a0a,0xff5e0101,0xffb99f65,0xffbca265,0xffbba05e,
1880 0xffb77848,0xffb2322d,0xffaf2626,0xffac2222,0xffa81e1e,0xffa31a1a,0xff9a1717,0xff921313,0xff8a140f,0xff84420b,0xff7b5908,0xff745204,0xff6c4d02,0xff5d2300,
1881 0xff540000,0xff630000,0xff6b0000,0xff380000,0xff030000,0x9a000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff662400,0xfff37a7a,0xffcd2727,0xff8a0a0a,
1882 0xff5e0101,0xffb3985c,0xffb59b5b,0xffb27647,0xffae332e,0xffab2828,0xffa82525,0xffa42121,0xffa01e1e,0xff981a1a,0xff911616,0xff881212,0xff800f0f,0xff780f0b,
1883 0xff723807,0xff6c4d04,0xff664802,0xff591c00,0xff550000,0xff650000,0xff6f0000,0xff390000,0xff040000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
1884 0xff692600,0xfff37a7a,0xffcd2727,0xff8a0a0a,0xff5e0101,0xffad9154,0xffae7447,0xffa93631,0xffa62b2b,0xffa32727,0xffa12424,0xff9c2020,0xff951e1c,0xff8d1a19,
1885 0xff861616,0xff7f1212,0xff780e0e,0xff700a0a,0xff690c07,0xff642f04,0xff5f4302,0xff581b00,0xff560000,0xff670000,0xff720000,0xff390000,0xff040000,0x99000000,
1886 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff6b2800,0xfff37a7a,0xffce2727,0xff8b0a0a,0xff5f0101,0xffa48446,0xffa43831,0xffa22d2d,0xff9f2a2a,0xff9c2626,
1887 0xff972323,0xff91211f,0xff8c471c,0xff854618,0xff7c1715,0xff761211,0xff6f0e0e,0xff690a0a,0xff620707,0xff5b0904,0xff5a3e02,0xff541200,0xff570000,0xff690000,
1888 0xff730000,0xff3a0000,0xff040000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff6e2a00,0xfff47a7a,0xffd02727,0xff900a0a,0xff620101,0xff8b5929,
1889 0xff9d2e2e,0xff9b2c2c,0xff982929,0xff922525,0xff8d2222,0xff88461e,0xff83651b,0xff7c5e18,0xff753d14,0xff6d1211,0xff670e0e,0xff600a0a,0xff5b0707,0xff560404,
1890 0xff563402,0xff510300,0xff580000,0xff6d0000,0xff770000,0xff3b0000,0xff040000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff712b00,0xfff57b7a,
1891 0xffd82727,0xff9d0a0a,0xff6c0101,0xff621308,0xff8f3526,0xff922b2b,0xff8d2828,0xff882724,0xff844821,0xff80631d,0xff7a5e1a,0xff735817,0xff6d5314,0xff663610,
1892 0xff5f100d,0xff590909,0xff550707,0xff520604,0xff521901,0xff520000,0xff5c0000,0xff760000,0xff800000,0xff3c0000,0xff040000,0x99000000,0x66000000,0x3d000000,
1893 0x1f000000,0x3d000000,0xff732d00,0xfff87c7c,0xffe22727,0xffb20a0a,0xff7f0101,0xff5f0000,0xff621709,0xff853123,0xff842827,0xff814823,0xff7c6120,0xff775c1c,
1894 0xff715719,0xff6b5216,0xff664d13,0xff604810,0xff5a2e0d,0xff540b09,0xff500806,0xff511202,0xff510000,0xff550000,0xff680000,0xff870000,0xff8c0000,0xff3f0000,
1895 0xff040000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff752e00,0xfffa7d7d,0xffed2727,0xffcd0a0a,0xff9d0101,0xff730000,0xff5c0000,0xff5b0d05,
1896 0xff79401b,0xff7b6021,0xff765c1f,0xff70581c,0xff6b5318,0xff664e15,0xff614a13,0xff5b450f,0xff57410c,0xff532909,0xff521303,0xff510000,0xff540000,0xff610000,
1897 0xff7d0000,0xffa00000,0xff980000,0xff400000,0xff040000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff782f00,0xfffc7d7d,0xfff62727,0xffe40a0a,
1898 0xffc10101,0xff960000,0xff720000,0xff5d0000,0xff540000,0xff693110,0xff71521b,0xff6d541b,0xff685018,0xff624c16,0xff5e4812,0xff59430e,0xff583209,0xff541403,
1899 0xff510000,0xff550000,0xff600000,0xff790000,0xffa10000,0xffbd0000,0xffa20000,0xff410000,0xff040000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
1900 0xff7a3100,0xfffb7d7d,0xfff72727,0xfff10a0a,0xffde0101,0xffbe0000,0xff980000,0xff760000,0xff600000,0xff550000,0xff591006,0xff663710,0xff6d5416,0xff664e14,
1901 0xff5d370d,0xff571d06,0xff500000,0xff510000,0xff560000,0xff620000,0xff7a0000,0xffa00000,0xffc60000,0xffd20000,0xffa80000,0xff410000,0xff040000,0x99000000,
1902 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff783100,0xfff07a7a,0xffe92727,0xffe50a0a,0xffdf0101,0xffd00000,0xffb60000,0xff960000,0xff780000,0xff610000,
1903 0xff540000,0xff4d0000,0xff6c4700,0xff684400,0xff4b0000,0xff4c0000,0xff4e0000,0xff560000,0xff630000,0xff7a0000,0xff990000,0xffbb0000,0xffd20000,0xffd00000,
1904 0xff9f0000,0xff3e0000,0xff040000,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff6d2e00,0xffcb6f71,0xffba2727,0xffb00a0a,0xffac0101,0xffa80000,
1905 0xffa00000,0xff900000,0xff7c0000,0xff650000,0xff520000,0xff460000,0xff3e0000,0xff3c0000,0xff3c0000,0xff410000,0xff480000,0xff550000,0xff670000,0xff7d0000,
1906 0xff920000,0xffa10000,0xffa80000,0xff9f0000,0xff790000,0xff330000,0xff040000,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff5a2100,0xff934848,
1907 0xff5e2424,0xff490909,0xff430101,0xff420000,0xff410000,0xff3f0000,0xff3b0000,0xff340000,0xff2d0000,0xff250000,0xff200000,0xff1d0000,0xff1e0000,0xff220000,
1908 0xff270000,0xff2e0000,0xff350000,0xff3b0000,0xff3f0000,0xff410000,0xff410000,0xff3e0000,0xff320000,0xff190000,0xff000000,0x87000000,0x5a000000,0x36000000,
1909 0x17000000,0x2e000000,0xff4c1100,0xff2a1200,0xff110900,0xff070200,0xff040000,0xff030000,0xff030000,0xff040000,0xff040000,0xff030000,0xff030000,0xff030000,
1910 0xff030000,0xff030000,0xff030000,0xff030000,0xff030000,0xff030000,0xff030000,0xff040000,0xff040000,0xff040000,0xff040000,0xff040000,0xff040000,0xff000000,
1911 0xff000000,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
1912 0x9a000000,0x9b020000,0x9f030200,0xa4050200,0xab090300,0xb00a0400,0xaf0a0400,0xa9080500,0xa2050200,0x9d020000,0x9b020200,0x99000000,0x99000000,0x99000000,
1913 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
1914 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x67020000,0x67000000,0x69020000,0x6c050200,0x6e070200,0x6d050200,0x6b050200,0x68000000,0x67020000,
1915 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
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,
1918 0x18000000,0xf000000
1919};
1920
1921static const QRgb OKButton_data[] = {
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,
1924 0xffffff,0xffffff,0xffffff,0xffffff,0x3edcdcdc,0x93dbdbdb,0xd5dfdfdf,0xfededede,0xf8d9d9d9,0xeedcdcdc,0xe1d8d8d8,0xdcdadada,0xe1dadada,0xe6dbdbdb,
1925 0xecdddddd,0xf1dcdcdc,0xf6dcdcdc,0xfbdddddd,0xfedddddd,0xffdedede,0xffdddddd,0xd9d2d2d2,0xa1c8c8c8,0x519e9e9e,0xc000000,0x3000000,0xffffff,0xffffff,
1926 0xffffff,0xffffff,0xffffff,0x5fdcdcdc,0xdbe3e3e3,0xffe2e2e2,0xffd3d3d3,0xffcecece,0xffcccccc,0xffd5d5d5,0xffd0d0d0,0xffcdcdcd,0xffcecece,0xffcecece,
1927 0xffcdcdcd,0xffcccccc,0xffcdcdcd,0xffcecece,0xffd1d1d1,0xffd2d2d2,0xffd3d3d3,0xffd4d4d4,0xffdcdcdc,0xe7c7c7c7,0x848e8e8e,0x18000000,0x4000000,0xffffff,
1928 0xffffff,0xffffff,0x3edddcdc,0xdbdadada,0xffd8d8d8,0xffcac9c9,0xffc6c6c6,0xffc2c1c2,0xffc4c3c4,0xffa6a6a6,0xff414141,0xff424242,0xff676767,0xffc4c4c4,
1929 0xffa4a4a4,0xff424242,0xffa6a5a6,0xffcbcacb,0xff8a898a,0xffb3b2b3,0xffd6d5d6,0xffd6d5d6,0xffd3d3d3,0xffc5c6c5,0xeda2a1a2,0x765a5a5a,0x18000000,0x3000000,
1930 0xffffff,0xffffff,0x93d4d5d4,0xffd1d0d0,0xffbcbcbc,0xffbab9b9,0xffbdbdbd,0xffbcbcbc,0xffbbbaba,0xff000000,0xff6d6e6d,0xffbdbdbd,0xff000000,0xff727272,
1931 0xff929292,0xff000000,0xff979797,0xff7b7b7b,0xff272727,0xffb1b1b1,0xffd1d1d1,0xffd1d1d1,0xffd0d0d0,0xffc7c8c7,0xffb3b2b2,0xc9626262,0x3d000000,0xc000000,
1932 0xffffff,0xffffff,0xd5cbcbcb,0xffb8b8b8,0xffa7a7a7,0xffaeaeae,0xffa9a8a8,0xffb1b1b1,0xffa6a6a6,0xff000000,0xff686868,0xffb6b6b6,0xff000000,0xff686868,
1933 0xff868686,0xff000000,0xff595959,0xff252525,0xff9d9d9d,0xffc4c4c4,0xffc0c0c0,0xffbcbcbc,0xffc6c6c6,0xffc5c5c5,0xffbbbbbb,0xf0666666,0x61000000,0x1a000000,
1934 0xffffff,0xffffff,0xfabebebe,0xffa4a4a4,0xff979797,0xffa8a8a8,0xffa0a0a0,0xff9b9b9b,0xffa1a1a1,0xff000000,0xff636363,0xffa4a4a4,0xff000000,0xff5f5f5f,
1935 0xff7a7a7a,0xff000000,0xff000000,0xff9f9f9f,0xffbbbbbb,0xffadadad,0xffa7a7a7,0xffb2b2b2,0xffbcbcbc,0xffc2c2c2,0xffadadad,0xfd626262,0x7c000000,0x25000000,
1936 0xffffff,0xffffff,0xd8adadad,0xff989898,0xff959595,0xff8b8b8b,0xff939393,0xff9a9a9a,0xff939393,0xff000000,0xff585858,0xff979797,0xff000000,0xff5b5b5b,
1937 0xff757575,0xff000000,0xff2b2b2b,0xff2f2f2f,0xffa9a9a9,0xffb3b3b3,0xffadadad,0xffadadad,0xffb8b8b8,0xffb4b4b4,0xff959595,0xf24a4a4a,0x85000000,0x2b000000,
1938 0xffffff,0xffffff,0x9e919191,0xff949493,0xff868787,0xff8c8c8c,0xff818181,0xff888887,0xff8a8a8a,0xff000000,0xff545654,0xff848384,0xff000000,0xff4f4f4f,
1939 0xff676766,0xff000000,0xff737372,0xff4e4e4d,0xff3c3c3c,0xff9e9e9e,0xffaeaeae,0xffb2b2b2,0xffacacac,0xffa5a6a5,0xff706f70,0xdf373737,0x7c000000,0x25000000,
1940 0xffffff,0xffffff,0x506d6d6d,0xe67b7b7b,0xff7d7d7d,0xff7a7a7a,0xff777878,0xff777777,0xff7d7e7d,0xff484848,0xff161616,0xff292929,0xff1e1f1f,0xff6a6b6b,
1941 0xff5c5c5c,0xff000000,0xff616161,0xff838383,0xff484848,0xff7e7e7e,0xffa5a5a5,0xffa6a7a6,0xff979797,0xff787778,0xf5434343,0xbb1a1a1a,0x61000000,0x1a000000,
1942 0xffffff,0xffffff,0xc000000,0x834d4d4d,0xec595959,0xff5e5d5d,0xff656564,0xff696969,0xff696869,0xff6b6a6b,0xff6a6a69,0xff666665,0xff646463,0xff656564,
1943 0xff666666,0xff686868,0xff6c6c6c,0xff727272,0xff7a7a7a,0xff828282,0xff818181,0xff787778,0xff656465,0xf5424241,0xce222222,0x83000000,0x3d000000,0xc000000,
1944 0xffffff,0xffffff,0x3000000,0x18000000,0x752d2d2d,0xc8353535,0xef363636,0xff3e3e3e,0xfd373737,0xfa353535,0xf5333333,0xf3313131,0xf5353535,0xf7353535,
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,
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,
1949 0x2a000000,0x2b000000,0x2d000000,0x2e000000,0x2e000000,0x2f000000,0x30000000,0x2e000000,0x26000000,0x1a000000,0xc000000,0x3000000,0xffffff,0xffffff
1950};
1951
1952static const QRgb Opera_data[] = {
1953 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
1954 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
1955 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
1956 0x3d000000,0x3e000000,0x3e000000,0x3e000000,0x3e000000,0x3e000000,0x3e000000,0x3e000000,0x3e000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
1957 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5323,
1958 0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5223,0xff0d5223,0xff0d5223,0xff0d5223,0xff0d5222,0xff0d5222,0xff0d5223,0xff0d5223,0xff0d5223,0xff0d5323,
1959 0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5323,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
1960 0xff0d5323,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffdfdfd,0xfffcfcfc,0xfffafafa,0xfff8f8f8,0xfff7f7f7,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,
1961 0xfff6f6f6,0xfff8f8f8,0xfff9f9f9,0xfffbfbfb,0xfffcfcfc,0xfffefefe,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff0d5323,0x5c000000,
1962 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff0d5323,0xffffffff,0xffffffff,0xfffefefe,0xfffdfdfd,0xfffcfcfc,0xfff9f9f9,0xfff6f6f6,0xfff3f3f3,0xffefefef,
1963 0xffededed,0xffececec,0xffebebeb,0xffebebeb,0xffececec,0xffeeeeee,0xfff1f1f1,0xfff4f4f4,0xfff8f8f8,0xfffbfbfb,0xfffdfdfd,0xfffefefe,0xffffffff,0xffffffff,
1964 0xffffffff,0xffffffff,0xff0d5323,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff0d5323,0xffffffff,0xfffefefe,0xfffdfdfd,0xfffbfbfb,0xfff7f7f7,
1965 0xfff2f2f2,0xffebebeb,0xffe5e5e5,0xffe0e0e0,0xffdddddd,0xffdbdbdb,0xffdbdbdb,0xffdbdbdb,0xffdbdbdb,0xffdedede,0xffe2e2e2,0xffe8e8e8,0xffefefef,0xfff5f5f5,
1966 0xfff9f9f9,0xfffcfcfc,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xff0d5323,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff0d5323,0xffffffff,
1967 0xfffdfdfd,0xfffbfbfb,0xfff6f6f6,0xffeeeeee,0xffe4e4e4,0xffdadada,0xffd0d0d0,0xffcbcbcb,0xffc8c8c8,0xffcfb6b6,0xffd6a0a0,0xffd6a0a0,0xffc8c8c8,0xffc8c8c8,
1968 0xffcdcdcd,0xffd4d4d4,0xffdfdfdf,0xffeaeaea,0xfff3f3f3,0xfff9f9f9,0xfffcfcfc,0xfffefefe,0xffffffff,0xffffffff,0xff0d5323,0x93000000,0x62000000,0x3b000000,
1969 0x1f000000,0x3d000000,0xff0d5323,0xfffefefe,0xfffcfcfc,0xfff7f7f7,0xffeeeeee,0xffe1e1e1,0xffd1d1d1,0xffc2c2c2,0xffc0acac,0xffdf6f6f,0xfff62323,0xffed0d0d,
1970 0xffdf3434,0xffed2c2c,0xfffa2727,0xffed4a4a,0xffd07a7a,0xffbcbcbc,0xffc9c9c9,0xffdadada,0xffe8e8e8,0xfff3f3f3,0xfffafafa,0xfffdfdfd,0xfffefefe,0xffffffff,
1971 0xff0d5323,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0d5323,0xfffdfdfd,0xfff8f8f8,0xfff0f0f0,0xffe1e1e1,0xffcecece,0xffb9b9b9,0xffc98c8c,
1972 0xfff54b4b,0xfff10000,0xffa64545,0xffb5acac,0xffbdbdbd,0xffbbbbbb,0xffc28383,0xfff42424,0xfffa2121,0xffe23535,0xffb4a5a5,0xffc4c4c4,0xffd8d8d8,0xffe9e9e9,
1973 0xfff5f5f5,0xfffbfbfb,0xfffefefe,0xffffffff,0xff0d5323,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0d5323,0xfffbfbfb,0xfff4f4f4,0xffe6e6e6,
1974 0xffd2d2d2,0xffb8b8b8,0xffc38888,0xfffb5151,0xfff70000,0xff8a1e1e,0xffadadad,0xffbebebe,0xffc6c6c6,0xffc3c3c3,0xffb5b5b5,0xffbf7272,0xfffa1e1e,0xfff90c0c,
1975 0xffd71d1d,0xffafa1a1,0xffc6c6c6,0xffdddddd,0xffeeeeee,0xfff8f8f8,0xfffcfcfc,0xfffefefe,0xff0d5323,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3e000000,
1976 0xff0d5223,0xfff8f8f8,0xffeeeeee,0xffdbdbdb,0xffc0c0c0,0xffb39696,0xfffb5d5d,0xfffa2121,0xff9d0000,0xff866666,0xffb4b4b4,0xffc9c9c9,0xffd4d4d4,0xffd0d0d0,
1977 0xffbfbfbf,0xffa5a5a5,0xffec3131,0xfff91515,0xffe70000,0xffb73131,0xffb1b1b1,0xffcecece,0xffe5e5e5,0xfff4f4f4,0xfffbfbfb,0xfffefefe,0xff0d5323,0x99000000,
1978 0x66000000,0x3d000000,0x1f000000,0x3e000000,0xff0d5222,0xfff5f5f5,0xffe7e7e7,0xffcfcfcf,0xffafafaf,0xffdd6d6d,0xfffb4040,0xffe20000,0xff740000,0xff9d9d9d,
1979 0xffbdbdbd,0xffd5d5d5,0xffdfdfdf,0xffdcdcdc,0xffcacaca,0xffacacac,0xffbe6262,0xfffa2222,0xfff50000,0xffc00000,0xffa47474,0xffbfbfbf,0xffdcdcdc,0xffefefef,
1980 0xfff9f9f9,0xfffdfdfd,0xff0d5323,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3e000000,0xff0d5122,0xfff1f1f1,0xffe0e0e0,0xffc4c4c4,0xffab9696,0xfffb5555,
1981 0xfffa2222,0xffbb0000,0xff712323,0xffa2a2a2,0xffc5c5c5,0xffdedede,0xffe8e8e8,0xffe5e5e5,0xffd3d3d3,0xffb4b4b4,0xffac7878,0xfffa3131,0xfff90c0c,0xffc80000,
1982 0xff983838,0xffb1b1b1,0xffd3d3d3,0xffeaeaea,0xfff6f6f6,0xfffcfcfc,0xff0d5323,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3f000000,0xff0d5122,0xffeeeeee,
1983 0xffd9d9d9,0xffbababa,0xffc37777,0xfffb4646,0xfff90c0c,0xffa90000,0xff773434,0xffa8a8a8,0xffcbcbcb,0xffe3e3e3,0xffededed,0xffeaeaea,0xffd9d9d9,0xffbababa,
1984 0xffa08888,0xfffa3a3a,0xfff91515,0xffd40000,0xff950909,0xffa6a6a6,0xffcbcbcb,0xffe5e5e5,0xfff4f4f4,0xfffbfbfb,0xff0d5223,0x99000000,0x66000000,0x3d000000,
1985 0x20000000,0x3f000000,0xff0d5022,0xffebebeb,0xffd5d5d5,0xffb3b3b3,0xffce6868,0xfffa3939,0xfff70000,0xffa30000,0xff7e4747,0xffacacac,0xffcfcfcf,0xffe7e7e7,
1986 0xfff0f0f0,0xffeeeeee,0xffdedede,0xffbfbfbf,0xff969696,0xfffb4040,0xfffa1919,0xffda0000,0xff950000,0xff9a8888,0xffc4c4c4,0xffe0e0e0,0xfff0f0f0,0xfff6f6f6,
1987 0xff0d5122,0x99000000,0x66000000,0x3d000000,0x20000000,0x3f000000,0xff0d5022,0xffeaeaea,0xffd2d2d2,0xffafafaf,0xffdb5b5b,0xfffa3030,0xfff10000,0xffa30000,
1988 0xff814848,0xffaeaeae,0xffd1d1d1,0xffe8e8e8,0xfff2f2f2,0xffefefef,0xffdfdfdf,0xffc1c1c1,0xff989898,0xfffb4545,0xfffa1b1b,0xffda0000,0xff930000,0xff906d6d,
1989 0xffb9b9b9,0xffd4d4d4,0xffe2e2e2,0xffe5e5e5,0xff0c4b20,0x99000000,0x66000000,0x3d000000,0x20000000,0x3f000000,0xff0d5022,0xffeaeaea,0xffd2d2d2,0xffaeaeae,
1990 0xffdb5555,0xfffa2a2a,0xffef0000,0xffa50000,0xff824949,0xffaeaeae,0xffd2d2d2,0xffe8e8e8,0xfff2f2f2,0xffefefef,0xffe0e0e0,0xffc1c1c1,0xff979797,0xfffb4646,
1991 0xfffa1c1c,0xffd80000,0xff8c0000,0xff856464,0xffa7a7a7,0xffbababa,0xffc6c6c6,0xffcbcbcb,0xff0b431c,0x99000000,0x66000000,0x3d000000,0x20000000,0x3f000000,
1992 0xff0d5022,0xffebebeb,0xffd4d4d4,0xffb2b2b2,0xffd55656,0xfffa2727,0xfff30000,0xffab0000,0xff844848,0xffacacac,0xffd0d0d0,0xffe7e7e7,0xfff1f1f1,0xffeeeeee,
1993 0xffdddddd,0xffbdbdbd,0xff939393,0xfffb4848,0xfffa1b1b,0xffce0000,0xff7e0000,0xff715c5c,0xff878787,0xff9b9b9b,0xffafafaf,0xffc2c2c2,0xff0a421c,0x99000000,
1994 0x66000000,0x3d000000,0x1f000000,0x3f000000,0xff0d5122,0xffededed,0xffd8d8d8,0xffb8b8b8,0xffc16767,0xfffa2828,0xfff90303,0xffb90000,0xff863c3c,0xffa9a9a9,
1995 0xffcccccc,0xffe4e4e4,0xffeeeeee,0xffe9e9e9,0xffd6d6d6,0xffb3b3b3,0xff8e8383,0xfffb4949,0xfff91515,0xffbb0000,0xff6e0000,0xff5f5f5f,0xff888888,0xffaeaeae,
1996 0xffc8c8c8,0xffd5d5d5,0xff0b451d,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3f000000,0xff0d5122,0xfff0f0f0,0xffdedede,0xffc1c1c1,0xffaf8888,0xfffa2a2a,
1997 0xfff90c0c,0xffc80000,0xff8c2323,0xffa4a4a4,0xffc7c7c7,0xffdfdfdf,0xffe8e8e8,0xffe1e1e1,0xffc5c5c5,0xff949494,0xff8a5e5e,0xfffb4646,0xfff90707,0xff9b0000,
1998 0xff602020,0xff8a8a8a,0xffb3b3b3,0xffcfcfcf,0xffdbdbdb,0xffd6d6d6,0xff0a3f1a,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3e000000,0xff0d5222,0xfff4f4f4,
1999 0xffe5e5e5,0xffcccccc,0xffababab,0xffeb2f2f,0xfff91010,0xffda0000,0xff990808,0xff9e9e9e,0xffbfbfbf,0xffd6d6d6,0xffd9d9d9,0xffc2c2c2,0xff969696,0xff6c6c6c,
2000 0xff9f5454,0xfffa3a3a,0xffde0000,0xff780000,0xff775252,0xffacacac,0xffc7c7c7,0xffd3d3d3,0xffc9c9c9,0xffb3b3b3,0xff072f14,0x99000000,0x66000000,0x3d000000,
2001 0x1f000000,0x3e000000,0xff0d5223,0xfff7f7f7,0xffececec,0xffd8d8d8,0xffbcbcbc,0xffbc6f6f,0xfff90c0c,0xffeb0000,0xffb50000,0xff9c7d7d,0xffb5b5b5,0xffc5c5c5,
2002 0xffbababa,0xff9d9d9d,0xff818181,0xff707070,0xffd35a5a,0xfffa1c1c,0xffa10000,0xff611919,0xffa0a0a0,0xffb8b8b8,0xffbfbfbf,0xffb3b3b3,0xff9b9b9b,0xff828282,
2003 0xff062710,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0d5223,0xfffafafa,0xfff2f2f2,0xffe4e4e4,0xffcecece,0xffb3b3b3,0xffd13e3e,0xffeb0000,
2004 0xffd40000,0xffb33333,0xffaaaaaa,0xffb0b0b0,0xffa4a4a4,0xff969696,0xff8d8d8d,0xff9f8181,0xfffa3a3a,0xffca0000,0xff670909,0xff8d7b7b,0xffa6a6a6,0xffa6a6a6,
2005 0xff959595,0xff868686,0xff808080,0xff898989,0xff083215,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0d5323,0xfffcfcfc,0xfff7f7f7,0xffeeeeee,
2006 0xffdedede,0xffc9c9c9,0xffb3b3b3,0xffc54141,0xffd20000,0xffce0000,0xffbe6565,0xffa7a7a7,0xffa1a1a1,0xff9e9e9e,0xffa49999,0xffe74b4b,0xffe00000,0xff760a0a,
2007 0xff877676,0xff8c8c8c,0xff818181,0xff7c7c7c,0xff898989,0xffa0a0a0,0xffb4b4b4,0xffc8c8c8,0xff0b461d,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
2008 0xff0d5323,0xfffdfdfd,0xfffbfbfb,0xfff5f5f5,0xffebebeb,0xffdddddd,0xffcccccc,0xffbcbcbc,0xffb77777,0xffb31717,0xffbe0000,0xffd62f2f,0xffce6363,0xffd45e5e,
2009 0xfff31a1a,0xffcc0000,0xff873939,0xff837d7d,0xff848484,0xff919191,0xffaaaaaa,0xffc2c2c2,0xffd3d3d3,0xffdddddd,0xffe6e6e6,0xffefefef,0xff0c5022,0x99000000,
2010 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0d5323,0xfffefefe,0xfffdfdfd,0xfffafafa,0xfff5f5f5,0xffececec,0xffe0e0e0,0xffd4d4d4,0xffcacaca,0xffc5c5c5,
2011 0xffbd9d9d,0xffb97474,0xffbe6666,0xffbe6464,0xffb18383,0xffafa6a6,0xffb5b5b5,0xffbfbfbf,0xffcbcbcb,0xffd8d8d8,0xffe3e3e3,0xffebebeb,0xfff2f2f2,0xfff7f7f7,
2012 0xfffafafa,0xfffdfdfd,0xff0d5223,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff0d5323,0xffffffff,0xfffefefe,0xfffdfdfd,0xfffafafa,0xfff6f6f6,
2013 0xffefefef,0xffe8e8e8,0xffe0e0e0,0xffdbdbdb,0xffd8d8d8,0xffd7d7d7,0xffd7d7d7,0xffd6d6d6,0xffd6d6d6,0xffd7d7d7,0xffdbdbdb,0xffe0e0e0,0xffe8e8e8,0xffefefef,
2014 0xfff5f5f5,0xfff9f9f9,0xfffcfcfc,0xfffefefe,0xfffefefe,0xffffffff,0xff0d5323,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff0d5323,0xffffffff,
2015 0xffffffff,0xfffefefe,0xfffdfdfd,0xfffbfbfb,0xfff8f8f8,0xfff4f4f4,0xfff0f0f0,0xffececec,0xffe9e9e9,0xffe8e8e8,0xffe8e8e8,0xffe8e8e8,0xffe9e9e9,0xffebebeb,
2016 0xffeeeeee,0xfff2f2f2,0xfff5f5f5,0xfffafafa,0xfffcfcfc,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff0d5323,0x87000000,0x5a000000,0x36000000,
2017 0x17000000,0x2e000000,0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5223,0xff0d5222,0xff0d5122,0xff0d5022,0xff0c5022,0xff0c4f21,
2018 0xff0c4f21,0xff0c4f21,0xff0c5022,0xff0d5022,0xff0d5122,0xff0d5122,0xff0d5223,0xff0d5223,0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5323,
2019 0xff0d5323,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
2020 0x9a000000,0x9a000000,0x9b000000,0x9b000000,0x9b000000,0x9b000000,0x9b000000,0x9a000000,0x9a000000,0x9a000000,0x99000000,0x99000000,0x99000000,0x99000000,
2021 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
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,
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,
2026 0x18000000,0xf000000
2027};
2028
2029static const QRgb PPPConnect_data[] = {
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,0xa1b2000,0xd000000,0xd000000,0xb191d00,0x7000000,
2032 0x4000000,0x1000000,0xffffff,0xffffff,0x1000000,0x6000000,0x13000000,0x344a5225,0x7699a553,0x5e747e3e,0x98aab75e,0x8aa3b059,0x6994a14f,0x48828d45,
2033 0x26636b37,0x12000000,0x12000000,0x1a000000,0x23000000,0x2b000000,0x2f000000,0x2e000000,0x29000000,0x21000000,0x1e000000,0x2a39410c,0x3e5e6b08,0x57768610,
2034 0x73849713,0x7f8b9f12,0x5156620c,0x6278890f,0x30373f0a,0x13000000,0x6000000,0x1000000,0x7000000,0x325e6631,0xa9aab760,0xe3c2d078,0xf2cbd881,0xf5ccda84,
2035 0xd8bdcb71,0xd7becc72,0xd1c1cc7e,0xc7bfcb7c,0xa9b7c472,0x5c868f5a,0x3c1b202b,0x623f5868,0x99567c92,0xc4638aa3,0xd8668ea7,0xd3638da6,0xb95b859e,0x874c6f86,
2036 0x6f526940,0x968ca01d,0xab9aae1d,0xb69eb41d,0xc2a2b917,0xc2a2b817,0xedb4cc1b,0xe7afc81b,0xd3a4bb1a,0x938b9d14,0x2c454e0c,0x7000000,0x24515a29,0xb5aebc62,
2037 0xfad1de88,0xffd5e28d,0xd6b8c66c,0x71808c43,0x6f94a052,0x648d9852,0x6d8d9853,0x859fa777,0x93a4aa9e,0xb8a4b4b6,0xe39ab3bf,0xff86acbd,0xff76a6bc,0xff5d9ab6,
2038 0xff4087a9,0xff70a6bf,0xff75a8bd,0xff6c9fb7,0xf95f91ad,0xc9597f8f,0x9261784e,0x755b6b25,0x605d6a13,0x63707e16,0x66616e0f,0xc49bb01a,0xffbdd620,0xf7b6d01f,
2039 0xa08fa417,0x2240480f,0x658b9748,0xefc8d67a,0xffd5e38a,0xe2bcca6e,0x31000000,0x1027291a,0xe000000,0x19000000,0x35191f2b,0x7d355e78,0xe04a869a,0xff8eb5bd,
2040 0xffbcd4d4,0xffafd0d2,0xff9dccd5,0xff7ec4d7,0xff50a7bd,0xff92cedf,0xff92ccda,0xff93c9d6,0xff82b8c9,0xff5a99b0,0xff3b7fa0,0xbc467896,0x60375367,0x2a000000,
2041 0x1c0c0d00,0x34000000,0xd5a1b61e,0xffbdd724,0xe5adc420,0x58707e14,0x95a0ad53,0xf8cedc7d,0xffd3e285,0xb7a4b258,0x18000000,0x6000000,0x14000000,0x32252d33,
2042 0x9448768e,0xf9166c84,0xff418d92,0xffa0cbc7,0xff87b1ab,0xff679385,0xffadcfc9,0xffd8f5f2,0xffd3f6fa,0xffc5eff7,0xffbdecf4,0xffafe4ef,0xffaadeeb,0xff93d0dd,
2043 0xff33859a,0xff00608a,0xe24686ab,0x734d6d82,0x270d1616,0x25000000,0xa78a9b1b,0xffbed728,0xf3b5cc25,0x8586981b,0xa2a2af54,0xfcd0de7d,0xffd2e181,0xafa2af53,
2044 0x1f35391a,0x12000000,0x2f1a2228,0x9d638b9c,0xff237887,0xff036264,0xff3f877c,0xff377b61,0xff226238,0xff61946f,0xffc4eae3,0xffc5ede3,0xffddf7f7,0xffd1f4f8,
2045 0xffbdf0f8,0xffb7edf8,0xffb4ecf8,0xffaee9f7,0xff6ab2c2,0xff277d9a,0xff3c97b8,0xf364a1bb,0x724d6e81,0x381d1f0a,0xa3889a1f,0xffc0d82e,0xfabcd32d,0x938a9b1e,
2046 0x969baa4e,0xfed1e07b,0xfecfde7a,0xc0a9b757,0x25000000,0x25000000,0x856a848f,0xff4e939a,0xff0c6c5c,0xff206c51,0xff0d5b2b,0xff1d6528,0xffa7ceb9,0xffeeffff,
2047 0xffe7ffff,0xffcaf1ee,0xffd7f6f7,0xffdff8f9,0xffd3f5f8,0xffc1f0f8,0xffb7eef9,0xffafeafc,0xff97e0f9,0xff7bcce8,0xff459ebf,0xff348eb6,0xe05b95b1,0x632d3e4a,
2048 0xb990a323,0xfec0d731,0xfec0d833,0x88869820,0x718a9641,0xf4c7d76d,0xffcedd76,0xddb6c45e,0x3d17190f,0x594d5a5f,0xea86a8ad,0xff2e8477,0xff0f6738,0xff136117,
2049 0xff19711d,0xff98cbaa,0xfff2ffff,0xffedfdff,0xffdef8fb,0xffdefafe,0xffd3f8f9,0xffd3f6f9,0xffdaf7f8,0xffd3f4f8,0xffc0eef9,0xffb4ebfa,0xffa6ecfe,0xff7ccfe5,
2050 0xff1e7995,0xff006ba6,0xff207eaf,0xca51798e,0xdaa2b62e,0xffc2d938,0xf1b6cc34,0x69798822,0x364e5424,0xe2b9ca5e,0xffcddd71,0xf4c1d165,0x81666f2f,0xb87d9299,
2051 0xff7ea6a4,0xff10734d,0xff378354,0xff72b592,0xff97d0b2,0xffe4fcf8,0xfff0feff,0xffe4fafb,0xffe0f9fb,0xffdcf8f9,0xffd7f8f9,0xffd1f7f8,0xffd1f4f8,0xffd6f5f8,
2052 0xffd0f2f8,0xffbcedf8,0xffb8f3ff,0xff95d8e1,0xff2e7980,0xff006da5,0xff0072b0,0xff4a807e,0xf6b4ca3b,0xffc4db3f,0xdbacc035,0x34414912,0x1a2b3012,0xb0a1b04b,
2053 0xfecadb69,0xffcbdc6a,0xc592a147,0xf78da2a5,0xff7cac9f,0xff248550,0xffa5d4c1,0xffecfefd,0xffeeffff,0xfff3ffff,0xfff0feff,0xffe8fbfd,0xffe3fafb,0xffdff8fa,
2054 0xffdaf8f9,0xffd4f7f9,0xffcef5f9,0xffcbf2f8,0xffd1f3f8,0xffccf1f8,0xffc0f2fe,0xffabe6ef,0xff3d8380,0xff006d95,0xff0077b1,0xff69965e,0xffc5dc45,0xfec4da43,
2055 0xab94a52f,0x1b282d10,0x9000000,0x5e788331,0xefbccd5a,0xffc8da64,0xf3b2c357,0xff90a190,0xffa4c2b9,0xff7bc49d,0xfff3fdfd,0xfffdffff,0xffdff5f0,0xffc7eee2,
2056 0xffb4e3d5,0xffdcf7f4,0xffe7fbfd,0xffe2f9fa,0xffdff8f9,0xffd6f7f8,0xffd1f5f8,0xffcaf3f8,0xffc3f2f7,0xffcbf1f8,0xffcbf0fa,0xffbdf3fd,0xff549389,0xff00595f,
2057 0xff1f7893,0xffa3be4e,0xffc7dd4a,0xefb6c941,0x63687423,0xb000000,0x2000000,0x1d272a10,0xad98a73f,0xfdc4d75d,0xfec4d65c,0xffa2b268,0xffb2c3bb,0xff6ebb8f,
2058 0xff94d1ad,0xffe1f4ec,0xffeefcf9,0xffd9f7ef,0xffd3f3ee,0xffe4f9f8,0xffe8fbfc,0xffe0f8fc,0xffd6f7f9,0xffd7f7f8,0xffd1f6f8,0xffcbf3f8,0xffc3f1f7,0xffbfeef8,
2059 0xffc9eff8,0xffcbf4fc,0xff9ad2d9,0xff286254,0xff729352,0xffc6db50,0xffc4d850,0xb8899831,0x2b1d1f0c,0x4000000,0xffffff,0x9000000,0x50576023,0xe8b0c24b,
2060 0xffc4d757,0xffb9cc54,0xffb0bd93,0xffafd7c5,0xff9ed7b8,0xffb8e3d1,0xffeffcfb,0xfff8ffff,0xfff3ffff,0xfff5ffff,0xfff8ffff,0xffe3fcfd,0xffcbf5fa,0xffd1f6f8,
2061 0xffd1f6f8,0xffcbf3f8,0xffc4f1f7,0xffbdeef8,0xffbcecf8,0xffc4eef7,0xffbde7ef,0xff8bb28d,0xffbdd257,0xffcbde57,0xfea5be52,0x6f3f4617,0x18000000,0x2000000,
2062 0xffffff,0x3000000,0x20000000,0x9c737f2a,0xfeb7cb4f,0xffc0d453,0xffc3d17b,0xffd6ddce,0xffebf3f3,0xffcdf2e9,0xffa5dcca,0xff578a67,0xff488959,0xff4e9a65,
2063 0xff82bda1,0xffe2fcfb,0xffe7ffff,0xffd8fafc,0xffd1f6f8,0xffccf3f8,0xffc4f1f7,0xffbdeef8,0xffb4eaf7,0xffb4e3ef,0xffb1d2ca,0xffc3d682,0xffcde062,0xffbfd45d,
2064 0xfb567f62,0x47000000,0x12000000,0x2000000,0xffffff,0x2000000,0x14000000,0x5720240c,0xfc9aaf56,0xffc9da6f,0xffd1df8a,0xffc1ce89,0xffc8d4c5,0xfff1f6f6,
2065 0xffd7e8e3,0xff4f895c,0xff237c30,0xff2a802a,0xff1b6c1a,0xff408557,0xff60977f,0xffc9f2f3,0xffe3fffe,0xffcff8fd,0xffc6f2f8,0xffbbedf5,0xffade2ee,0xff9dc9c4,
2066 0xffbacf8c,0xffd7e58c,0xffd2e27a,0xffa1bc6c,0xf92a677a,0x3d000000,0x11000000,0x2000000,0xffffff,0x2000000,0xf000000,0x3c000000,0xf2829c8b,0xffc7d58d,
2067 0xffd0de81,0xffbbcd51,0xffadbf65,0xffccd7c4,0xffd4eae5,0xff61af7f,0xff30933f,0xff378a34,0xff357b30,0xff24681e,0xff0d4508,0xff488165,0xffa3d5d1,0xffa8dcda,
2068 0xffbcedf2,0xffb6e8f1,0xff9fcac3,0xffadc678,0xffcddf70,0xffd7e688,0xffc4d48b,0xff87ad9d,0xf839778b,0x3a000000,0x11000000,0x2000000,0xffffff,0x1000000,
2069 0xf000000,0x40505440,0xdc98aeb9,0xffb6c6aa,0xffc0d06b,0xffb7cc3c,0xffb4c83c,0xffaebe61,0xffb4cdb6,0xff4f9770,0xff288037,0xff368638,0xff2f7530,0xff2b692b,
2070 0xff2f682a,0xff174f14,0xff05410c,0xff0c481b,0xff488177,0xffa3d0ca,0xffb2ca7b,0xffcee06f,0xffd1e370,0xffc7d87c,0xffa6c2a3,0xff8ab2b7,0xf8457e8c,0x3c000000,
2071 0x11000000,0x2000000,0xffffff,0x3000000,0x1a222512,0x7da8b17a,0xc4b3bec4,0xffb3c4c0,0xffa7b975,0xffb0c53d,0xffb4ca36,0xffaec439,0xffaabc69,0xff739c7c,
2072 0xff246f39,0xff368d4e,0xff337b3f,0xff2b642a,0xff2b6128,0xff2d622b,0xff245624,0xff19431a,0xff638b76,0xffafc985,0xffcdde74,0xffd4e477,0xffcadc73,0xffa4c38d,
2073 0xff96c3c7,0xff89b0b0,0xfb5c8b75,0x46121308,0x12000000,0x2000000,0xffffff,0xa000000,0x5f8d994c,0xc9c8d38b,0xabb9bfc0,0xffa7bcbf,0xffa6bab0,0xffa6b974,
2074 0xffadc23b,0xffb0c630,0xffabbf35,0xff9eb053,0xff4a6e43,0xff257740,0xff2f7547,0xff2a652f,0xff295c27,0xff295c29,0xff205220,0xff406133,0xffadc478,0xffcdde79,
2075 0xffd6e57c,0xffc9da77,0xffa4c38d,0xff8fc6cf,0xff8fc4d2,0xff7aa09c,0xfa819d4d,0x7f606b1d,0x17000000,0x2000000,0x3000000,0x26434a1f,0xbab5c268,0xefd2df8a,
2076 0x9fb6b9b1,0xe48ba6af,0xffa6bebf,0xffb3c9c3,0xffa6bb78,0xffa9be35,0xffadc22a,0xffaabe2a,0xff9aae3f,0xff5a7946,0xff2a6b3c,0xff286937,0xff2a6029,0xff2a5927,
2077 0xff4e702f,0xffadc067,0xffd6e581,0xffd7e682,0xffcadb7b,0xffa4c390,0xff94cad5,0xff8fcee7,0xff82bbcf,0xff6a8f83,0xf894a82b,0xc9829320,0x2f343b0c,0x4000000,
2078 0xa000000,0x6e8b9746,0xf1cddc7a,0xefd1dd8e,0xa8b4bb8b,0x8e647c88,0xff95b5b9,0xffb2ccce,0xffb3cec8,0xffa5bb6a,0xffa6bc2e,0xffa8be25,0xffa6bc25,0xff9cb236,
2079 0xff68852f,0xff316227,0xff366129,0xff789143,0xffbdcf73,0xffd8e887,0xffd8e887,0xffcede80,0xffadc88c,0xff94cbd2,0xff8bcfe9,0xff7bc0de,0xff6da7be,0xfa6f8e64,
2080 0xf48c9d22,0xf48ea21b,0x796c7a14,0xa000000,0x16141414,0xb5adbc5f,0xfed8e78a,0xf3d2dd91,0xb0adb96d,0x48252e36,0xc5779bab,0xff9cbdc1,0xffb1d1d4,0xffaccbb8,
2081 0xff9fb867,0xffa2b72e,0xffa4bc22,0xffa2b820,0xff9ab022,0xff889b36,0xff98a759,0xffc7d57f,0xffd8e68c,0xffd9e88c,0xffcbdc82,0xffadc78d,0xff9acac4,0xff92d3e9,
2082 0xff70bdde,0xff66aece,0xff5b96b2,0xd8748c37,0xf686981b,0xfe889b17,0xc17e8f14,0x16050500,0x22353535,0xdcc2d173,0xffdce991,0xfcd8e68d,0xb5afbb6f,0x310a0a0a,
2083 0x583e5863,0xdc79a1af,0xff9cc0c4,0xff9ac7d1,0xff8dc0be,0xff96b470,0xff9db42d,0xffa5ba2a,0xffafc24c,0xffc0cd78,0xffcbd496,0xffcbd695,0xffd0db91,0xffc6d685,
2084 0xffa4c191,0xff95c7c9,0xff96d3e5,0xff8ccce3,0xff71b3d1,0xff619fc0,0xb73e7593,0xc5768617,0xfd889c14,0xff819414,0xe67f9212,0x271a1d0c,0x2d5c5c5c,0xeacbd97f,
2085 0xffdde995,0xffdde995,0xd7becb79,0x4e666e3b,0x2f191a13,0x6c455e6e,0xdf739bac,0xff81acb8,0xff79acb3,0xff8bad9a,0xff9baf6c,0xffb6c46e,0xffcbd68d,0xffd0da9c,
2086 0xffd0d99c,0xffcad494,0xffb7c47a,0xff96ac6c,0xff85ac94,0xff86babd,0xff85bdd1,0xff7bb4c8,0xff669eb9,0xbf457c9c,0x7941522e,0xdf7e9114,0xff819512,0xff7b8e12,
2087 0xf27c8f10,0x37272a0f,0x2f696969,0xe7cad77f,0xffddea99,0xffdeeb9a,0xf8d4e18c,0xb4abb66b,0x75858f47,0x74767f40,0x9b728254,0xe27e987a,0xffa7bb7f,0xffb7c980,
2088 0xffc6d389,0xffd1db9a,0xffcfd89d,0xffd0d99e,0xffc8d28c,0xffb6c469,0xff9fb239,0xff8da425,0xff87a034,0xff819d48,0xff709372,0xff658e7b,0xc658795d,0x94586b1e,
2089 0xc0728210,0xfa819512,0xff7b8d10,0xff77890f,0xf07a8d0d,0x39282d0f,0x24676767,0xd0bfcd75,0xffdfeb9c,0xffe0ec9e,0xffe0ec9e,0xf8d4e28e,0xebcad781,0xe9c9d681,
2090 0xe8c4d17c,0xf6d0dd8b,0xffdde89a,0xffdfeb9e,0xffdeea9e,0xffdbe69c,0xffc8d38f,0xffb7c47c,0xffa7b75b,0xff97ab2d,0xff8fa513,0xff8da313,0xff8ca013,0xff8a9e14,
2091 0xfc869b19,0xf1819616,0xef829610,0xef829510,0xfa809310,0xff7a8d0f,0xff778a0f,0xff74860d,0xdd7a8d0c,0x2c252a0a,0x114d4d4d,0x88a4b05d,0xefd0dd8a,0xffe1eca1,
2092 0xffe1eca1,0xffe1eca1,0xffe0eb9f,0xffe1eca1,0xffe1eca1,0xffe1eca1,0xffe0eca0,0xffe0eb9f,0xfcd6e294,0xf7becd81,0xf49aaf78,0xf77e9976,0xfb6d8c60,0xfc708d3d,
2093 0xfc809922,0xfe8a9f16,0xff8a9e12,0xff879b12,0xff859912,0xff839712,0xff80930f,0xff7e900f,0xff7a8d0f,0xff778a0d,0xff74860d,0xf5798c0d,0x9573840c,0x13171b00,
2094 0x4000000,0x1f464a25,0x8ba2ad5d,0xe2c8d581,0xf9d7e496,0xfedfeaa0,0xffe2eda4,0xfee0eba2,0xfedee99f,0xfbdae599,0xf6d7e394,0xe1c4d07d,0xb5a5b162,0x8885904b,
2095 0x5d4f542b,0x43000000,0x45000000,0x63374008,0x8d5e6b0a,0xba72830c,0xe482950f,0xf8869a10,0xfb839810,0xfe809410,0xfe7d900f,0xff7a8d0f,0xfe798b0f,0xfb798b0d,
2096 0xea7a8d0c,0x9772820c,0x20343b03,0x4000000,0xffffff,0x4000000,0x13000000,0x6c98a456,0xb8b6c36f,0xdac4d17e,0xe2c7d482,0xe6cbd887,0xd1becb78,0xc1b8c571,
2097 0x99a9b664,0x507a8443,0x25414720,0x1d414727,0x12000000,0x11000000,0x12000000,0x14000000,0x20282d03,0x2b2a3103,0x54576408,0x9d76870d,0xc57c8f0d,0xd67d900d,
2098 0xeb7f920d,0xe87d900d,0xe17c8e0d,0xc2798b0a,0x756c7c08,0x13000000,0x4000000,0xffffff,0xffffff,0xffffff,0x3000000,0x12626a3b,0x27636b36,0x558f9a50,
2099 0x6a9aa558,0x6194a053,0x3c727a3f,0x347f8a47,0x1952592d,0x7000000,0x3000000,0x2000000,0x1000000,0x2000000,0x2000000,0x2000000,0x3000000,0x3000000,
2100 0x8000000,0x193c4503,0x365f6d0d,0x3e56620c,0x666a7a08,0x706d7d08,0x5b68770a,0x29495303,0x12434e03,0x3000000,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,0x9242a00,0x8000000,0x6000000,0x3000000,0x1000000,0xffffff,
2103 0xffffff,0xffffff
2104};
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
2183static const QRgb Rotation_data[] = {
2184 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3000000,0x6000000,0xb000000,0x12000000,0x19000000,0x21000000,0x29000000,0x2f000000,
2185 0x35000000,0x38000000,0x3b040404,0x4d535353,0x5a828282,0x3d3f3f3f,0x2d060606,0x24070707,0x1b090909,0x140d0d0d,0xc151515,0x7242424,0x3000000,0x1000000,
2186 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,
2187 0x6e647e80,0xab7da6a7,0xd387b7b9,0xeb8bc0c2,0xf98dc6c8,0xfe8ac8ca,0xf97ec0c2,0xed6fb6b7,0xd8629ea2,0xcc90aeb0,0xa1849698,0x460b0b0b,0x390d0d0d,0x2b0c0c0c,
2188 0x1f101010,0x130d0d0d,0xb171717,0x5000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,
2189 0x16000000,0x23000000,0x84759496,0xd091b9bb,0xfaabcecf,0xffa9d0d2,0xffa1ccce,0xff9acacc,0xff90c6c8,0xff89c4c6,0xff7fc1c3,0xff74bfc1,0xff69bcbe,0xff60b9bc,
2190 0xfd88c1c4,0xe78bb4b7,0xa0395f62,0x4f101010,0x3a121212,0x28131313,0x19141414,0xe121212,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,
2191 0x2000000,0x7000000,0xe000000,0x1a000000,0x545f7474,0xc08eb5b6,0xfaafcfd1,0xffafcfd0,0xffadcccd,0xffa3c8ca,0xff9ac4c6,0xff93c0c2,0xff8abfbf,0xff80bbbd,
2192 0xff79babc,0xff6fb8bb,0xff65b8ba,0xff5cb6b9,0xff50b2b5,0xff69a2a7,0xfe76b0b5,0xd2377579,0x7f293d3d,0x47121212,0x2f101010,0x1d121212,0xf111111,0x7000000,
2193 0x2000000,0x1000000,0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x73728f8f,0xda9fc1c3,0xffb6d1d3,0xffb0cdce,0xffaac6c8,0xffa2bfc1,0xff96b8b9,
2194 0xff8db3b5,0xff84adaf,0xff7cabac,0xff76aaac,0xff6fadae,0xff6ab1b3,0xff63b4b5,0xff58b4b6,0xff4eadb3,0xff61a1a6,0xff4f8a8f,0xff5f9ea3,0xe82d777c,0x9d2a4a4c,
2195 0x50131313,0x33141414,0x1e111111,0xf111111,0x7242424,0x2000000,0x1000000,0x5000000,0xd000000,0x1a000000,0x736f8f8f,0xe2a1c3c5,0xffb5cfd1,0xffaec9cb,
2196 0xffa2bec0,0xff98b4b5,0xff8ba6a8,0xff7e9a9d,0xff739395,0xff6b8c8e,0xff658c8d,0xff639092,0xff70a1a4,0xff88b3b6,0xff5aadaf,0xff53adb3,0xff4ba9b2,0xff40a0a8,
2197 0xff5c9398,0xff4a8488,0xff418d95,0xef2b7378,0xa2294449,0x53161616,0x33141414,0x1e1a1a1a,0xe121212,0x62b2b2b,0x3000000,0xa000000,0x16000000,0x545c7174,
2198 0xda9abec2,0xffb2cfd2,0xffacc8cb,0xffa2bdc0,0xff91abae,0xff80989b,0xff788e90,0xff9dadae,0xffa9babb,0xffb6c9ca,0xffc0d5d7,0xffb9d2d4,0xffb3cdce,0xff8fb4b7,
2199 0xff52a4a7,0xff4da8b1,0xff45a6ad,0xff3b9da6,0xff6fa2a7,0xff5b9095,0xff498086,0xff297e86,0xec2a676e,0x91243537,0x4e141414,0x2f161616,0x18151515,0xb171717,
2200 0x6000000,0x11000000,0x23000000,0xbf88b0b4,0xffafced2,0xffaac9cd,0xffa2bfc3,0xff92adb0,0xffb0c7c9,0xffc0d5d6,0xffcadcde,0xffd1e1e1,0xffd4e3e4,0xffd2e3e4,
2201 0xffcedfe1,0xffc7dcdd,0xffbfd6d7,0xff4c8b8f,0xff4c9ca2,0xff47a2ab,0xff40a0ab,0xff399aa4,0xff6aa2a9,0xff6b9da1,0xff598c91,0xff427d83,0xff28767e,0xdd2a585d,
2202 0x6c151515,0x45161616,0x27141414,0x120e0e0e,0xb000000,0x1b000000,0x846f8e93,0xfaa3c7cd,0xffa5c9cd,0xff9fc2c6,0xff92b2b6,0xff7f9a9e,0xff667e80,0xffd0dfe0,
2203 0xffd9e6e6,0xffe0eaea,0xffe2eced,0xffe0eced,0xffdbe8e9,0xffd3e3e3,0xffa4bcbe,0xff43868c,0xff44969f,0xff429da8,0xff3a9ea8,0xff3796a1,0xff45949c,0xff77a6a9,
2204 0xff65979b,0xff5c888b,0xff296c73,0xfc276b74,0xbb284146,0x5f151515,0x39161616,0x1d121212,0x12000000,0x26000000,0xd085afb6,0xff9dc7cd,0xff9dc3c9,0xff94b8be,
2205 0xff84a4aa,0xff6d898d,0xff687b7e,0xffd9e6e8,0xffe4eded,0xffecf2f3,0xffeef3f4,0xffebf3f3,0xffe4eef0,0xffdbe8ea,0xff628a8e,0xff3f848c,0xff3c919d,0xff3796a2,
2206 0xff3396a2,0xff36929d,0xff45919a,0xff7eabaf,0xff6e9ea2,0xff5c8e92,0xff2b646c,0xff28676e,0xe9285659,0x79171717,0x4b141414,0x2a121212,0x19000000,0x6e59747b,
2207 0xfa93c0c7,0xff98c2ca,0xff92bbc3,0xff87acb3,0xff73959b,0xff5c767b,0xffd2e2e2,0xffdfeaeb,0xffebf2f3,0xfff4f7f8,0xfff8fafb,0xfff4f8f8,0xffebf2f3,0xffe1ebec,
2208 0xff356f76,0xff37848e,0xff348e99,0xff2c909d,0xff308f9c,0xff328c98,0xff72a3a9,0xff83aeb2,0xff75a4a8,0xff639598,0xff2e5e65,0xff295f66,0xfc266069,0xb0233437,
2209 0x5e161616,0x37131313,0x21000000,0xab6b969e,0xff8ebec7,0xff8bbbc3,0xff84b1ba,0xff779fa7,0xff62858c,0xffaabcbe,0xffd5e4e5,0xffe3eded,0xffedf4f4,0xfff7fafa,
2210 0xffffffff,0xfff8fafa,0xffedf4f4,0xff8fa8ab,0xff30727c,0xff2e808e,0xff288795,0xff278795,0xff2b8795,0xff2f8491,0xff88aeb2,0xff85b0b3,0xff7aa7ab,0xff69999e,
2211 0xff305960,0xff2b5a61,0xff265e66,0xd6264448,0x71171717,0x45121212,0x29000000,0xd370a1ac,0xff83b9c4,0xff80b4be,0xff78a8b2,0xff68939c,0xff54767d,0xffc4d8da,
2212 0xffd3e2e3,0xffe0ecec,0xffebf2f2,0xfff3f8f8,0xfff7fafb,0xfff4f8f8,0xffebf2f3,0xff2b656f,0xff2a7481,0xff257d8e,0xff1f808e,0xff23818e,0xff277e8d,0xff2c7c87,
2213 0xff8fb6ba,0xff86b1b4,0xff7aa8ab,0xff6c9b9f,0xff32545a,0xff2e545b,0xff285961,0xed264d51,0x80181818,0x4f131313,0x2f000000,0xeb70a7b3,0xff79b3bf,0xff75aeb9,
2214 0xff6c9fa9,0xff5b858f,0xff81989c,0xffc1d7d8,0xffd0e1e1,0xffdbe8e9,0xffe5eeef,0xffebf2f3,0xff98a8ab,0xffd7e1e3,0xffe4edee,0xff276c7a,0xff237585,0xff1b7787,
2215 0xff1e7888,0xff1e7585,0xff227382,0xff5c8f98,0xff8db6b8,0xff84b0b3,0xff7aa8ac,0xff6d9da2,0xff345056,0xff2f5056,0xff2a555c,0xf7264f57,0x8d191919,0x5a141414,
2216 0x34000000,0xf96da9b8,0xff6dacba,0xff69a5b3,0xff5f95a1,0xff507b85,0xffa7c1c3,0xffbcd3d6,0xffc9dbdd,0xffd2e3e4,0xffdbe8e9,0xffb3c2c5,0xff28525c,0xff29606c,
2217 0xff64929d,0xff206f7f,0xff187283,0xff1a7183,0xff1a6f81,0xff1a6b7c,0xff1f6978,0xff92b9bb,0xff8ab3b7,0xff82afb2,0xff79a8ab,0xff6e9ea2,0xff364c51,0xff324d53,
2218 0xff2b5157,0xfc265259,0x961a1a1a,0x61181818,0x37000000,0xfe65a7b7,0xff64a6b6,0xff5f9ead,0xff558d9b,0xff47737e,0xffa7c5c7,0xffb4ced0,0xffc0d6d9,0xffc9dbdd,
2219 0xffcfe1e2,0xff26535e,0xff28616e,0xff266a7a,0xff1f6e7f,0xff166e80,0xff166e80,0xff548d9a,0xff186677,0xff196071,0xff87abae,0xff8db6b9,0xff87b2b4,0xff7facb0,
2220 0xff77a6a9,0xff749c9f,0xff36494d,0xff324b50,0xff2c4e56,0xfe25515b,0x9a1a1a1a,0x66171717,0x39040404,0xf9599daf,0xff5a9fb1,0xff5596a8,0xff4c8795,0xff3e6d78,
2221 0xffa0c0c3,0xffabc8ca,0xffb6cfd2,0xffbdd5d7,0xff5c7b82,0xff265d6b,0xff25687a,0xff206d81,0xff176e81,0xff166c7f,0xff166a7d,0xffa9c7c9,0xff9ab9be,0xff769aa1,
2222 0xff8fb7ba,0xff88b3b6,0xff83afb2,0xff7babae,0xff74a5a8,0xff6d7e80,0xff37484c,0xff334a4f,0xff2c4c52,0xfc244a53,0x9c1a1a1a,0x66171717,0x38050505,0xed4d8fa2,
2223 0xff5099ac,0xff4c91a4,0xff448091,0xff396a77,0xff97bbbd,0xffa3c2c5,0xffabc8cb,0xffb1cccf,0xff235362,0xff216172,0xff1e687e,0xff176a80,0xff166a7e,0xff15667b,
2224 0xff156175,0xff9fc1c4,0xff97bcbf,0xff90b8bb,0xff8ab4b7,0xff83afb3,0xff7eacb0,0xff79a9ab,0xff71a3a7,0xff394649,0xff39484c,0xff32494e,0xff2c4c53,0xf924444b,
2225 0x98191919,0x64141414,0x35050505,0xd7447d90,0xff4691a7,0xff428a9f,0xff3d7b8e,0xff336675,0xff8fb4b8,0xff99bec1,0xffa0c1c3,0xff8ca6ab,0xff215667,0xff1c6274,
2226 0xff19667b,0xff19677d,0xff16637b,0xff166074,0xff7097a1,0xff96bbbe,0xff8fb7ba,0xff88b4b7,0xff84b1b3,0xff7eadaf,0xff7aa9ac,0xff75a6a9,0xff7a9799,0xff3b4649,
2227 0xff38474c,0xff32494f,0xff294851,0xf1233d44,0x931a1a1a,0x5f151515,0x30050505,0xb5366775,0xff3d88a2,0xff39829a,0xff36778c,0xff2e6376,0xff85aeb1,0xff8fb7b9,
2228 0xff96bcbe,0xff6a878f,0xff1e5769,0xff1c6073,0xff1b6478,0xff196378,0xff185f74,0xff175a6e,0xff92b9bb,0xff8db6b8,0xff87b3b6,0xff82afb2,0xff7eadb0,0xff7aa9ad,
2229 0xff77a6aa,0xff71a2a6,0xff3c4346,0xff3c4649,0xff37474c,0xff30474e,0xff274650,0xe121353b,0x89181818,0x59141414,0x2a060606,0x81294953,0xfb357e99,0xff337c97,
2230 0xff30738b,0xff2c6377,0xff79a6aa,0xff85afb3,0xff8cb6b8,0xff315966,0xff225869,0xff215e72,0xff206177,0xff1c5f74,0xff1b5c72,0xff467483,0xff89b4b7,0xff85b1b4,
2231 0xff81afb2,0xff7eacaf,0xff7aaaad,0xff76a7a9,0xff73a4a7,0xff545a5b,0xff3e4447,0xff3b464a,0xff36474d,0xff2d464f,0xfd25434c,0xc51f2a2d,0x7d181818,0x4f131313,
2232 0x22080808,0x420c0c0c,0xd92c647a,0xff2d7593,0xff2a6d88,0xff276177,0xff6f9399,0xff78a6aa,0xff82adb2,0xff365b69,0xff265769,0xff265d72,0xff256074,0xff245e73,
2233 0xff225a6f,0xff7e9fa5,0xff82afb2,0xff7fadb0,0xff7cabaf,0xff79a8ac,0xff75a6aa,0xff72a3a7,0xff6ea0a4,0xff3f4446,0xff3e4649,0xff3a474b,0xff33464c,0xff2a444c,
2234 0xf2223940,0x9d1a1a1a,0x6d151515,0x420f0f0f,0x1a0a0a0a,0x350e0e0e,0x9d244b57,0xfb256b88,0xff246985,0xff236078,0xff456d7c,0xff6c9b9f,0xff76a5a8,0xff69858d,
2235 0xff2b5769,0xff2a5d70,0xff295e73,0xff295d72,0xff295a6e,0xff7eacb0,0xff7cabaf,0xff78a9ad,0xff76a6a9,0xff74a5a9,0xff71a2a6,0xff6ca0a4,0xff689b9e,0xff6b9395,
2236 0xff3b4549,0xff36454c,0xff2d434c,0xfd254049,0xd31f2c30,0x89181818,0x5c131313,0x350e0e0e,0x130d0d0d,0x280d0d0d,0x490e0e0e,0xd1215669,0xff1e6581,0xff1e5e7a,
2237 0xff21576d,0xff5c8e93,0xff68999e,0xff74949a,0xff2e5768,0xff2f5c6d,0xff305e72,0xff2f5d71,0xff77959d,0xff76a7ab,0xff75a6a9,0xff73a5a8,0xff7a9fa3,0xff7b969a,
2238 0xff788a8d,0xff4e5558,0xff3f474a,0xff3d474b,0xff36454b,0xff30434b,0xff28404b,0xec20343a,0x9e1b1b1b,0x73161616,0x49111111,0x280d0d0d,0xc151515,0x1d121212,
2239 0x36131313,0x7b193339,0xe71a556a,0xff1c5b77,0xff20576f,0xff486b7a,0xff588a8f,0xff619497,0xff2e5465,0xff30596a,0xff325c6e,0xff335d6f,0xff718d95,0xff516d7b,
2240 0xff375663,0xff39515c,0xff3b4e56,0xff3d4b52,0xff3e4b50,0xff3e4a4e,0xff3b484d,0xff38464e,0xff32434c,0xff29404b,0xf522383f,0xbe1e2528,0x83171717,0x5b141414,
2241 0x350e0e0e,0x1c090909,0x7242424,0x120e0e0e,0x26141414,0x43131313,0x97173a46,0xee1a5167,0xff1c5670,0xff21526a,0xff507981,0xff508389,0xff638089,0xff315567,
2242 0xff335a6b,0xff355b6c,0xff385b6c,0xff395a69,0xff3b5765,0xff3c555f,0xff3d515b,0xff3d4e56,0xff3c4c53,0xff394951,0xff364850,0xff2f434c,0xff29404b,0xf8233841,
2243 0xcc1e282c,0x8e191919,0x66141414,0x42131313,0x250e0e0e,0x120e0e0e,0x3000000,0xb171717,0x18151515,0x2d111111,0x4b141414,0x9e193642,0xea1a4a5f,0xff1c4f6a,
2244 0xff1f4e64,0xff3c6e75,0xff46787e,0xff2d5164,0xff315365,0xff345668,0xff365868,0xff375666,0xff395563,0xff3a5360,0xff3a505d,0xff384d57,0xff354a55,0xff324750,
2245 0xff2d444f,0xff273f4b,0xf521363f,0xcc1e282c,0x921a1a1a,0x6c151515,0x4b111111,0x2d111111,0x170b0b0b,0xa000000,0x1000000,0x5000000,0xe121212,0x1c121212,
2246 0x31151515,0x4e171717,0x8b182c33,0xdb194251,0xfc1c4b64,0xff1f4a62,0xff39666d,0xff386a70,0xff2b4e60,0xff2d4f61,0xff305062,0xff325161,0xff33505e,0xff324d5c,
2247 0xff324b59,0xff2f4855,0xff2c4653,0xff28414e,0xfd243d49,0xeb1f323a,0xbc1e2526,0x8e191919,0x6c151515,0x4d111111,0x30101010,0x1b090909,0xd000000,0x5000000,
2248 0xffffff,0x2000000,0x6000000,0xf111111,0x1d121212,0x31151515,0x4b141414,0x68161616,0xb719333e,0xe81c404f,0xfc1c465b,0xff5b7984,0xff50727b,0xff25485c,
2249 0xff27495a,0xff29495a,0xff294658,0xff294757,0xff274252,0xff264251,0xfd223f4c,0xf1213640,0xd11e2b30,0x9d1c1c1c,0x82181818,0x66141414,0x4a111111,0x30101010,
2250 0x1c090909,0xe000000,0x6000000,0x2000000,0xffffff,0x1000000,0x2000000,0x7000000,0x10202020,0x1d1a1a1a,0x2d171717,0x44171717,0x5c161616,0x75181818,
2251 0xad192b32,0xd41a3841,0xed39555f,0xfa6f858f,0xfd466371,0xfe214253,0xfc20404f,0xf81f3c4a,0xef1f3842,0xde1e3139,0xc31c282e,0x9b1a1a1a,0x87191919,0x73161616,
2252 0x5a141414,0x42131313,0x2d111111,0x1b090909,0xe000000,0x7000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,0x2000000,0x7242424,0xe121212,
2253 0x18151515,0x26141414,0x38171717,0x4a151515,0x5d161616,0x6f171717,0x7e181818,0x8b1a1a1a,0x9c3a3a3a,0xa9575757,0xa74c4c4c,0x9f3a3a3a,0x98353535,0x8a252525,
2254 0x7d181818,0x6c151515,0x5b141414,0x49111111,0x350e0e0e,0x250e0e0e,0x170b0b0b,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,
2255 0xffffff,0x1000000,0x2000000,0x62b2b2b,0xb171717,0x120e0e0e,0x1d121212,0x29131313,0x37131313,0x44131313,0x4f131313,0x59141414,0x60181818,0x65171717,
2256 0x66171717,0x64141414,0x5f151515,0x58141414,0x4e141414,0x420f0f0f,0x350e0e0e,0x280d0d0d,0x1c090909,0x120e0e0e,0xa000000,0x5000000,0x2000000,0x1000000,
2257 0xffffff,0xffffff
2258};
2259
2260static const QRgb SettingsIcon_data[] = {
2261 0xff889157,0xff899258,0xff899258,0xff889156,0xff879152,0xff86904e,0xff848f48,0xff828d41,0xff7f8d38,0xff7c8b2e,0xff7a8925,0xff79881d,0xff74831b,0x24000000,
2262 0xff899258,0xffd5e57b,0xffd5e57b,0xffd4e478,0xffd1e370,0xffc2d461,0xff6e783c,0xff8d8f8a,0xff939493,0xff575e31,0xff93a816,0xffa7c108,0xff6f7d1b,0x6b000000,
2263 0xff899258,0xffd5e57b,0xffd5e57a,0xffd3e476,0xffd1e36d,0xffc7d95f,0xff7a8440,0xff97989b,0xffe3e3ed,0xffadadb3,0xff3c4124,0xff879a1a,0xff6a781b,0x8f000000,
2264 0xff889156,0xffd4e478,0xffd3e476,0xffd1e370,0xffcfe166,0xffcbdf58,0xffbed247,0xff69742b,0xff8c8d8e,0xffd7d7e2,0xff6d6d73,0xff4d571e,0xff64711b,0x8f000000,
2265 0xff879152,0xffd1e370,0xffd1e36d,0xffa5b458,0xffaebe52,0xffc6dc48,0xffbdd335,0xffa8be23,0xff4c541d,0xffbdbdc5,0xff9f9fa5,0xff2e311e,0xff5f6b1b,0x8f000000,
2266 0xff86904e,0xffcee164,0xffc1d25c,0xff60634e,0xff6a7051,0xffa1b435,0xffb9d123,0xffb3cf03,0xff515d0d,0xffc3c3c8,0xff9c9ca4,0xff1a1d12,0xff59641b,0x8f000000,
2267 0xff848f48,0xffcbdf58,0xff909f42,0xffa5a5a9,0xffc3c3cb,0xff5b613f,0xff8a9e0d,0xff76870c,0xff818473,0xffd9d9e0,0xffb1b1b9,0xff303130,0xff545f1b,0x8f000000,
2268 0xff828d41,0xffc6dc48,0xffa3b63c,0xff72736e,0xffe0e0ea,0xffb8b8c0,0xff676a5c,0xff8c8d84,0xffd5d5db,0xffb6b6bd,0xffacacb4,0xff96969c,0xff515b1b,0x8f000000,
2269 0xff7f8d38,0xffc0d834,0xffbbd329,0xff667320,0xff717175,0xffc3c3cb,0xffd8d8e1,0xffdfdfe8,0xffc0c0ca,0xff9d9da4,0xffc5c5cb,0xffc9c9d2,0xff4e581b,0x8f000000,
2270 0xff7c8b2e,0xffbcd61e,0xffb6d00d,0xffa0b710,0xff525d1a,0xff3b3c36,0xff525256,0xff606065,0xff9e9ea6,0xffbdbdc5,0xffe7e7ec,0xffececf1,0xff4c541b,0x8f000000,
2271 0xff7a8925,0xffb6d203,0xffadc900,0xffa0b806,0xff8c9f13,0xff6a7722,0xff4e5627,0xff2e3317,0xff3f403f,0xffa5a5ad,0xffd5d5dc,0xfff3f3f6,0xff4b531b,0x8f000000,
2272 0xff79881d,0xffaeca00,0xffa5bf00,0xff9ab203,0xff8da206,0xff7d8f0f,0xff707f1a,0xff667222,0xff464e1b,0xff434540,0xffb1b1b9,0xffdadae3,0xff4c541b,0x8f000000,
2273 0xff74831b,0xff6f7d1b,0xff6a781b,0xff64711b,0xff5f6b1b,0xff59641b,0xff545f1b,0xff515b1b,0xff4e581b,0xff4c541b,0xff4b531b,0xff4c541b,0xff4d571b,0x8f000000,
2274 0x24000000,0x6b000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x6b000000
2275};
2276
2277static const QRgb Shutdown_data[] = {
2278 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3000000,0x6000000,0xb000000,0x12000000,0x19000000,0x21000000,0x29000000,0x2f000000,
2279 0x34000000,0x37000000,0x38000000,0x37000000,0x34000000,0x2f000000,0x29000000,0x21000000,0x19000000,0x12000000,0xb000000,0x6000000,0x3000000,0x1000000,
2280 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,
2281 0x5d9a5254,0x93c36569,0xbed86d71,0xdee47175,0xf3ec7075,0xfef16f73,0xf3eb6669,0xe0e25d5f,0xc4d04f53,0x9fb44042,0x70832a2e,0x3f000000,0x33000000,0x26000000,
2282 0x1b000000,0x11000000,0xa000000,0x5000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,
2283 0x16000000,0x23000000,0x6fb26366,0xbad9787b,0xf5f18388,0xfff38386,0xfff27e82,0xffee797b,0xffed7276,0xffec6d70,0xffec656a,0xffed6065,0xffef5a5e,0xfff05258,
2284 0xf7ec4a4f,0xc6cb393e,0x88942529,0x45000000,0x33000000,0x23000000,0x16000000,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,
2285 0x2000000,0x7000000,0xe000000,0x1a000000,0x478a4e4f,0xa7d4787a,0xf5f38a8d,0xfff6898d,0xfff5888c,0xfff28285,0xffed7b7f,0xffe87578,0xffe36d71,0xffe1666a,
2286 0xffe36165,0xffe75b60,0xffeb545a,0xffee4e53,0xfff1484d,0xfff24047,0xf8eb373e,0xbcbc272b,0x6c5f1013,0x3e000000,0x2a000000,0x1a000000,0xe000000,0x7000000,
2287 0x2000000,0x1000000,0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x5fa96163,0xc6e18183,0xfff78d90,0xfff78c8e,0xfff68b8d,0xfff3868a,0xffee7f82,
2288 0xffe7797b,0xffde7073,0xffd76669,0xffd46063,0xffd75a5d,0xffdd5659,0xffe34f54,0xffeb4a4e,0xffee4248,0xfff03b41,0xfff13338,0xfff02a31,0xd7cb1f25,0x85791216,
2289 0x46000000,0x2e000000,0x1b000000,0xe000000,0x6000000,0x2000000,0x1000000,0x5000000,0xd000000,0x1a000000,0x5fa96163,0xd0e58387,0xfff78d91,0xfff68d8f,
2290 0xfff68c8e,0xfff48a8d,0xffef8488,0xffe87c7f,0xffdc7175,0xffd1686b,0xffffffff,0xffffffff,0xffffffff,0xffcf4d51,0xffd9484c,0xffe34248,0xffec3d41,0xffee3539,
2291 0xffef2b33,0xffee242b,0xffe9232a,0xe0c71e24,0x8a701214,0x48000000,0x2e000000,0x1a000000,0xd000000,0x5000000,0x3000000,0xa000000,0x16000000,0x478a4e4f,
2292 0xc6e18183,0xfff78d91,0xfff68d90,0xfff58d8f,0xfff38a8d,0xfff0878a,0xffe87e82,0xffdd7779,0xffd06a6d,0xffc46063,0xffffffff,0xffffffff,0xffffffff,0xffc24549,
2293 0xffcd4045,0xffda3b41,0xffe3343b,0xffeb2d34,0xffec252b,0xffe8232a,0xffe32329,0xffdf2228,0xdbb61b22,0x7b4c0c0d,0x46000000,0x2a000000,0x16000000,0xa000000,
2294 0x6000000,0x11000000,0x23000000,0xa7d4787a,0xfff78d90,0xfff68d8f,0xfff48d8e,0xfff18b8d,0xffed8588,0xffe78084,0xffdd787b,0xffd16e71,0xffc16164,0xffb5575a,
2295 0xffffffff,0xffffffff,0xffffffff,0xffb33d40,0xffbe373c,0xffcd3337,0xffd92d33,0xffe1252d,0xffe02229,0xffdf2228,0xffdd2228,0xffd92028,0xffd52027,0xc89a171b,
2296 0x60000000,0x3e000000,0x23000000,0x11000000,0xb000000,0x1b000000,0x6fb26366,0xf5f38a8d,0xfff68c8e,0xfff58b8d,0xfff1898c,0xffec8487,0xffe27d81,0xffda777a,
2297 0xffcf6f72,0xffcb7f82,0xffd5a7a8,0xffa74e51,0xffffffff,0xffffffff,0xffffffff,0xffa63437,0xffd39496,0xffc85156,0xffca2429,0xffd22027,0xffd32025,0xffd52027,
2298 0xffd31f25,0xffd22027,0xffcd1f25,0xf9c41d23,0xa2691013,0x55000000,0x33000000,0x1b000000,0x12000000,0x26000000,0xbad9787b,0xfff6898d,0xfff68b8d,0xfff3898c,
2299 0xffed8588,0xffe27d81,0xffd67578,0xffcb6e70,0xffd9a7a8,0xfff0e2e2,0xffffffff,0xff9b4749,0xffffffff,0xffffffff,0xffffffff,0xff9a2e31,0xffffffff,0xfff0d9da,
2300 0xffd68486,0xffbf1d23,0xffc21e24,0xffc81e24,0xffcb1f25,0xffcb1f25,0xffc71e24,0xffc31e23,0xd796161b,0x6c000000,0x45000000,0x26000000,0x19000000,0x5d9a5254,
2301 0xf5f28488,0xfff5888c,0xfff3868a,0xffee8387,0xffe47c80,0xffd87579,0xffc86c6e,0xffddb3b5,0xfffefefe,0xffffffff,0xffffffff,0xff974245,0xffffffff,0xffffffff,
2302 0xffffffff,0xff95282b,0xffffffff,0xffffffff,0xfffefdfd,0xffd69597,0xffb21a20,0xffba1d22,0xffbd1d23,0xffc11d23,0xffbf1e23,0xffbd1d22,0xfab31b20,0x9b4c0c0f,
2303 0x56000000,0x33000000,0x21000000,0x93c4676a,0xfff68487,0xfff58487,0xfff18184,0xffe97d80,0xffdd7679,0xffcc6c6f,0xffd7a5a7,0xfffefefe,0xffffffff,0xffffffff,
2304 0xffefe4e4,0xff963e41,0xffffffff,0xffffffff,0xffffffff,0xff942327,0xffefe0e0,0xffffffff,0xffffffff,0xfffefdfd,0xffc88284,0xffa91a1f,0xffb11b20,0xffb61b22,
2305 0xffb71d20,0xffb51b20,0xffb21b20,0xc2711214,0x67000000,0x3f000000,0x29000000,0xbeda6f73,0xfff68084,0xfff47f83,0xffee7c80,0xffe47679,0xffd56d70,0xffcb7c7e,
2306 0xfff0e1e2,0xffffffff,0xffffffff,0xffd8b9ba,0xffae6b6c,0xff9b3c3e,0xffffffff,0xffffffff,0xffffffff,0xff9a1e23,0xffaa4d50,0xffd4aaac,0xffffffff,0xffffffff,
2307 0xffebd7d8,0xffab4548,0xffa4191e,0xffab1a1f,0xffad1a1f,0xffad1a1f,0xffac1a1f,0xde841419,0x75000000,0x4a000000,0x2f000000,0xdee77376,0xfff57b7e,0xfff27a7c,
2308 0xffeb7779,0xffdd6e72,0xffcb6468,0xffd8a7a8,0xffffffff,0xffffffff,0xfff1e4e5,0xffb56c6e,0xffa43f42,0xffa6393d,0xffffffff,0xffffffff,0xffffffff,0xffa3191e,
2309 0xff9a171b,0xffa64d4f,0xffeedfdf,0xffffffff,0xffffffff,0xffc28a8c,0xff97171b,0xffa0191e,0xffa4191e,0xffa4191e,0xffa4191e,0xef91161a,0x81000000,0x53000000,
2310 0x34000000,0xf3ef7377,0xfff5767a,0xfff27478,0xffe86e72,0xffda666a,0xffc65b5e,0xffe7cccd,0xffffffff,0xffffffff,0xffd7b0b1,0xffac4045,0xffb03d40,0xffb4373b,
2311 0xffffffff,0xffffffff,0xffffffff,0xffa91a1e,0xff9e171d,0xff93161a,0xffcba1a3,0xffffffff,0xffffffff,0xffdabebf,0xff8c1419,0xff95171a,0xff9c171d,0xff9e191d,
2312 0xff9d171d,0xf997161b,0x89000000,0x59000000,0x37000000,0xfef47175,0xfff57175,0xfff06d71,0xffe6686b,0xffd65e62,0xffc25357,0xfff5ebeb,0xffffffff,0xffffffff,
2313 0xffc47f81,0xffb43c3f,0xffbc383c,0xffc13136,0xffffffff,0xffffffff,0xffffffff,0xffae1a20,0xffa2191d,0xff93161b,0xffac696b,0xffffffff,0xffffffff,0xfff0e6e7,
2314 0xff831317,0xff8c1619,0xff93161b,0xff97171d,0xff98171b,0xfe97171b,0x8e000000,0x5e000000,0x38000000,0xf3ee676b,0xfff4696e,0xfff0676b,0xffe56063,0xffd3565b,
2315 0xffc04b4f,0xfffefdfd,0xffffffff,0xffffffff,0xffb65256,0xffb93538,0xffc53135,0xffcd2a30,0xffce1f25,0xffc71e23,0xffbe1d23,0xffb31a20,0xffa3191e,0xff91161a,
2316 0xff91383b,0xffffffff,0xffffffff,0xfffdfdfd,0xff7b1216,0xff851419,0xff8d161a,0xff90161b,0xff92161a,0xfa8c1419,0x90000000,0x5f000000,0x37000000,0xe0e45e61,
2317 0xfff36368,0xffef5e63,0xffe5595c,0xffd54f53,0xffc14348,0xfff5e9ea,0xffffffff,0xffffffff,0xffc57679,0xffb92b30,0xffc7272d,0xffd12027,0xffcd1f25,0xffc61e24,
2318 0xffbd1d22,0xffaf1a20,0xff9d171d,0xff8a1419,0xffa5686a,0xffffffff,0xffffffff,0xffeee6e6,0xff771316,0xff801317,0xff871419,0xff8c161a,0xff8d161a,0xf27b1317,
2319 0x8e000000,0x5e000000,0x34000000,0xc4d15054,0xfff35b60,0xfff0575c,0xffe65054,0xffd7484c,0xffc43e41,0xffe7c5c6,0xffffffff,0xffffffff,0xffd7a6a7,0xffb21f24,
2320 0xffbd1d22,0xffc41d23,0xffc41d24,0xffbd1d22,0xffb21b20,0xffa4191d,0xff90161a,0xff7e1317,0xffc2a0a1,0xffffffff,0xffffffff,0xffd3bebe,0xff741214,0xff7d1317,
2321 0xff831317,0xff871419,0xff881419,0xe56a1013,0x89000000,0x59000000,0x2f000000,0x9fb64045,0xfff35359,0xffef4e53,0xffe8494e,0xffdb4045,0xffc9363c,0xffd79395,
2322 0xffffffff,0xffffffff,0xfff1dfe0,0xffb74e51,0xffad1a1f,0xffb11a1f,0xffb21b20,0xffad1a1f,0xffa2191d,0xff93161a,0xff821417,0xff8f4a4c,0xffe8dedf,0xffffffff,
2323 0xffffffff,0xffb08889,0xff721214,0xff7a1316,0xff7f1317,0xff811417,0xff851419,0xd1510c0f,0x81000000,0x53000000,0x29000000,0x70832a2e,0xf7ed4a4f,0xfff0484d,
2324 0xffeb4147,0xffe0393f,0xffd13036,0xffc84f53,0xffefd9d9,0xffffffff,0xffffffff,0xffd6abac,0xffae4d51,0xff9d171d,0xff9d171d,0xff97171b,0xff8e161a,0xff821317,
2325 0xff904a4d,0xffc4a9a9,0xffffffff,0xffffffff,0xffe3d7d7,0xff844041,0xff731216,0xff791216,0xff7d1317,0xff801317,0xfc7d1216,0xb5300808,0x75000000,0x4a000000,
2326 0x21000000,0x3f000000,0xc6cb393e,0xfff14047,0xffec3940,0xffe43337,0xffd8292f,0xffc82227,0xffd28385,0xfffefdfd,0xffffffff,0xffffffff,0xffeedfdf,0xffcca1a3,
2327 0xffae696b,0xff92383c,0xffa5686a,0xffc2a0a1,0xffe8dedf,0xffffffff,0xffffffff,0xfffefdfd,0xffa87e80,0xff6d1213,0xff741214,0xff7a1216,0xff7b1317,0xff7e1317,
2328 0xe6600f12,0x93000000,0x67000000,0x3f000000,0x19000000,0x33000000,0x88942529,0xf8ea373e,0xffee3137,0xffe82a31,0xffdf2329,0xffce1f25,0xffbc1d22,0xffd39597,
2329 0xfffefdfd,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefdfd,0xffb49193,0xff6b1013,0xff721014,
2330 0xff761216,0xff7a1316,0xff7b1317,0xfc7a1216,0xc33b080a,0x81000000,0x56000000,0x33000000,0x12000000,0x26000000,0x45000000,0xbcbc272b,0xffef2a31,0xffeb242a,
2331 0xffe02229,0xffd12025,0xffc21e24,0xffb21a20,0xffc88284,0xffebd7d8,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe3d7d7,
2332 0xffa87e80,0xff6b1013,0xff701014,0xff741216,0xff781216,0xff7a1316,0xff7b1316,0xdf540d10,0x94000000,0x6c000000,0x45000000,0x26000000,0xb000000,0x1b000000,
2333 0x33000000,0x6c5f1013,0xd7ca1f25,0xffe8232a,0xffdf2228,0xffd52027,0xffc71e23,0xffba1d22,0xffaa1a1f,0xffac4548,0xffc38a8c,0xffdabebf,0xfff0e6e7,0xfffdfdfd,
2334 0xffeee6e6,0xffd4bebe,0xffb18889,0xff854041,0xff6f1214,0xff721014,0xff741216,0xff781216,0xff791316,0xff7a1316,0xed620f12,0xae220506,0x7b000000,0x55000000,
2335 0x33000000,0x1b000000,0x6000000,0x11000000,0x23000000,0x3e000000,0x85791216,0xe0c61e24,0xffdd2228,0xffd51f27,0xffcb1f25,0xffbf1d23,0xffb31b20,0xffa5191e,
2336 0xff9a171d,0xff8f161a,0xff851417,0xff7e1316,0xff7a1317,0xff771216,0xff761216,0xff741216,0xff751214,0xff771216,0xff781216,0xff791316,0xff7a1316,0xf0660f12,
2337 0xbc300608,0x85000000,0x60000000,0x3e000000,0x23000000,0x11000000,0x3000000,0xa000000,0x16000000,0x2a000000,0x46000000,0x8a701214,0xdbb61b22,0xffd22027,
2338 0xffcb1f25,0xffc21d23,0xffb81d22,0xffad1a1f,0xffa2191e,0xff99171b,0xff90161a,0xff881419,0xff831417,0xff7f1317,0xff7d1316,0xff7b1317,0xff7a1216,0xff7a1316,
2339 0xff7b1317,0xff7a1316,0xed620f12,0xbc300608,0x88000000,0x66000000,0x46000000,0x2a000000,0x16000000,0xa000000,0x1000000,0x5000000,0xd000000,0x1a000000,
2340 0x2e000000,0x48000000,0x7b4c0c0d,0xc89a171b,0xf9c31d23,0xffc01e23,0xffba1d20,0xffb01a1f,0xffa7191e,0xff9d171d,0xff97171b,0xff90161b,0xff8b141a,0xff861419,
2341 0xff831317,0xff7f1417,0xff7e1317,0xff7c1317,0xfc7a1216,0xdf540d10,0xae220506,0x85000000,0x66000000,0x48000000,0x2e000000,0x1a000000,0xd000000,0x5000000,
2342 0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x2e000000,0x46000000,0x60000000,0xa2691013,0xd795161b,0xfab21b20,0xffb11b20,0xffaa1a1f,0xffa3191e,
2343 0xff9a171d,0xff95171b,0xff8f161a,0xff8c161a,0xff861419,0xff841419,0xfc7d1216,0xe6600f12,0xc33b080a,0x94000000,0x7b000000,0x60000000,0x46000000,0x2e000000,
2344 0x1b000000,0xe000000,0x6000000,0x2000000,0xffffff,0x1000000,0x2000000,0x7000000,0xe000000,0x1a000000,0x2a000000,0x3e000000,0x55000000,0x6c000000,
2345 0x9b4c0c0f,0xc2711214,0xde841419,0xef91161a,0xf997161b,0xfe97171b,0xfa8c1419,0xf27b1317,0xe56a1013,0xd1510c0f,0xb5300808,0x93000000,0x81000000,0x6c000000,
2346 0x55000000,0x3e000000,0x2a000000,0x1a000000,0xe000000,0x7000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,
2347 0x16000000,0x23000000,0x33000000,0x45000000,0x56000000,0x67000000,0x75000000,0x81000000,0x89000000,0x8e000000,0x90000000,0x8e000000,0x89000000,0x81000000,
2348 0x75000000,0x67000000,0x56000000,0x45000000,0x33000000,0x23000000,0x16000000,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,
2349 0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,0x33000000,0x3f000000,0x4a000000,0x53000000,0x59000000,0x5e000000,
2350 0x5f000000,0x5e000000,0x59000000,0x53000000,0x4a000000,0x3f000000,0x33000000,0x26000000,0x1b000000,0x11000000,0xa000000,0x5000000,0x2000000,0x1000000,
2351 0xffffff,0xffffff
2352};
2353
2354static const QRgb Snake_data[] = {
2355 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
2356 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
2357 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
2358 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
2359 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff522300,0xff522300,0xff522300,0xff522300,
2360 0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,
2361 0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
2362 0xff522300,0xff282d0c,0xff285b16,0xff326f18,0xff42a025,0xff409d25,0xff2f6213,0xff337219,0xff2e6415,0xff3b8a1e,0xff43a325,0xff38861e,0xff367f1d,0xff3f9824,
2363 0xff234b10,0xff2b5b12,0xff326e18,0xff387d1a,0xff2f6615,0xff2b5711,0xff255112,0xff254e0f,0xff326a15,0xff2e5e12,0xff1c3609,0xff0d4b00,0xff522300,0x5c000000,
2364 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff522300,0xff347117,0xff126d00,0xff0c3d00,0xff072000,0xff093200,0xff126000,0xff157b00,0xff147500,0xff178100,
2365 0xff199d00,0xff126e00,0xff116800,0xff0b4000,0xff093100,0xff115e00,0xff146a00,0xff115b00,0xff0d3b00,0xff105200,0xff0f4b00,0xff146300,0xff1a9400,0xff1da800,
2366 0xff105600,0xff062600,0xff522300,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff522300,0xff1e450e,0xff0e5600,0xff126f00,0xff0e5300,0xff0f5800,
2367 0xff115e00,0xff157f00,0xff126600,0xff0e5900,0xff0d4f00,0xff062400,0xff083300,0xff0a3d00,0xff0a3600,0xff0f5500,0xff0d4a00,0xff0d4400,0xff0c4200,0xff0f4e00,
2368 0xff0e4b00,0xff0f5800,0xff167700,0xff178400,0xff0e5000,0xff051a00,0xff522300,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff522300,0xff122a08,
2369 0xff0c4900,0xff0e5e00,0xff0c5200,0xff0c4d00,0xff0c4e00,0xff0c5300,0xff083800,0xff072e00,0xff062a00,0xff052200,0xff052000,0xff062500,0xff062300,0xff072400,
2370 0xff072700,0xff0d5600,0xff105f00,0xff116400,0xff0b3600,0xff0c4000,0xff147500,0xff1a9600,0xff147400,0xff0d4b00,0xff522300,0x93000000,0x62000000,0x3b000000,
2371 0x1f000000,0x3d000000,0xff522300,0xff143508,0xff073700,0xff094700,0xff084a00,0xff063600,0xff042100,0xff042600,0xff021300,0xff021400,0xff021200,0xff021900,
2372 0xff021b00,0xff021c00,0xff021b00,0xff020f00,0xff031a00,0xff073400,0xff083a00,0xff0a4500,0xff051b00,0xff041400,0xff0e5900,0xff147800,0xff189600,0xff116600,
2373 0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff0b3206,0xff032c00,0xff032e00,0xff022800,0xff011100,0xff010f00,0xff000b00,
2374 0xff000d00,0xff001600,0xff001400,0xff000e00,0xff000c00,0xff000b00,0xff011400,0xff011600,0xff011a00,0xff022100,0xff032700,0xff042c00,0xff052c00,0xff052600,
2375 0xff093a00,0xff0f6100,0xff127200,0xff093700,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff041c02,0xff011200,0xff001300,
2376 0xff000f00,0xff001000,0xff001900,0xff001800,0xff0a1b07,0xff182f0e,0xff293a1d,0xff384427,0xff435030,0xff3f4b27,0xff35451d,0xff273810,0xff1b320a,0xff061901,
2377 0xff000f00,0xff010f00,0xff021800,0xff021800,0xff042100,0xff052400,0xff062600,0xff083000,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
2378 0xff522300,0xff021000,0xff001600,0xff001b00,0xff001800,0xff001500,0xff061f04,0xff365025,0xff7f9354,0xffaeb874,0xffabac96,0xff9c9c93,0xff7e7e79,0xff4e4e49,
2379 0xff1b1a10,0xff232314,0xff4a4f24,0xff485c15,0xff273d0b,0xff0a1f02,0xff001a00,0xff000f00,0xff010f00,0xff010c00,0xff021300,0xff052500,0xff522300,0x99000000,
2380 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff021200,0xff001700,0xff001c00,0xff001c00,0xff0c2209,0xff799359,0xffbbc988,0xffd9da95,0xffcbc891,
2381 0xffa2a19b,0xff919191,0xff696969,0xff212121,0xff000000,0xff111006,0xff726c22,0xffa8b528,0xff97b621,0xff527b09,0xff1f4103,0xff031300,0xff000900,0xff000700,
2382 0xff010e00,0xff031b00,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff031601,0xff001800,0xff001900,0xff001700,0xff89a168,
2383 0xffe1ebb3,0xffebeebb,0xffe9e9a0,0xffc2be99,0xff95948e,0xff818181,0xff4b4b4b,0xff000000,0xff000000,0xff443e14,0xffad9f2d,0xffbdc927,0xffb7d138,0xff8eba01,
2384 0xff7ea32c,0xff2e5305,0xff050f01,0xff000500,0xff000a00,0xff010700,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff051b02,
2385 0xff001000,0xff000e00,0xff374b29,0xffe2eebc,0xffdfe9a5,0xffe1e69a,0xffe5e595,0xffb6af6f,0xff797979,0xff616161,0xff1c1c1c,0xff000000,0xff030201,0xff918743,
2386 0xffc4bc29,0xffc0cb2c,0xff9fb412,0xffb5cd4c,0xff7db20c,0xff5f9816,0xff204204,0xff020600,0xff000a00,0xff010c00,0xff522300,0x99000000,0x66000000,0x3d000000,
2387 0x1f000000,0x3d000000,0xff522300,0xff081e03,0xff010b00,0xff26371c,0xffadc586,0xffdfecb4,0xffd3e096,0xffd8df80,0xffe6e192,0xffa39951,0xff5e5d59,0xff383837,
2388 0xff000000,0xff000000,0xff2c2605,0xffc0af61,0xffc1bc18,0xffc3d036,0xffb9d23a,0xffbdc969,0xff8cbd2f,0xff6aa71b,0xff4b8318,0xff0f2803,0xff010e00,0xff021200,
2389 0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff091e03,0xff011300,0xff81a261,0xffc2dc94,0xffcee191,0xffc7d27f,0xffdae185,
2390 0xffd5d85a,0xffa39f3d,0xff59563a,0xff181818,0xff000000,0xff000000,0xff564e1a,0xffb8ae06,0xffd4d154,0xffbdce2b,0xff91a301,0xff78a800,0xff639c00,0xff57940f,
2391 0xff60972e,0xff1e4b04,0xff011000,0xff031500,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff154007,0xff042000,0xff96bb69,
2392 0xffbdd88a,0xffb3cf73,0xffd7ddad,0xffced973,0xffbcc729,0xff9c9916,0xff514f25,0xff080807,0xff000000,0xff080700,0xff716b26,0xffc2c627,0xffb2bd01,0xffa5be01,
2393 0xff9ec316,0xff8aba1f,0xff478400,0xff3f7d01,0xff609137,0xff3e6923,0xff032000,0xff052200,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
2394 0xff522300,0xff1e630a,0xff0b4600,0xff8db163,0xffa3c072,0xffa1c35b,0xffb9ce70,0xff9ebc28,0xffc3cf51,0xff9c9c07,0xff595913,0xff030300,0xff000000,0xff131301,
2395 0xff626200,0xffa4af00,0xffa4bb00,0xffb3ce37,0xff9cc623,0xff5f9900,0xff5f9919,0xff2d6a00,0xff052400,0xff072e02,0xff093900,0xff083b00,0xff522300,0x99000000,
2396 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff2c8e0e,0xff177a00,0xff5b8c31,0xff749945,0xff78a233,0xff75a220,0xff96b835,0xff819a03,0xff9bb310,
2397 0xff727d20,0xff070800,0xff000000,0xff090900,0xff596300,0xff90a300,0xffbecc52,0xff9cc423,0xff8fbe25,0xff4f8c00,0xff236100,0xff568535,0xff5a7e3e,0xff174902,
2398 0xff106000,0xff106100,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff3aad12,0xff21a700,0xff327810,0xff426e1b,0xff627f37,
2399 0xff6b8d2d,0xff618c08,0xff709710,0xff678900,0xff637e01,0xff30390a,0xff010100,0xff050601,0xff595e2b,0xff7a9d00,0xff85b107,0xff74a601,0xff9ab056,0xff427e02,
2400 0xff748651,0xff6a7a4e,0xff2d5f12,0xff3c5e26,0xff188400,0xff178100,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff42b818,
2401 0xff26ba00,0xff27a203,0xff265a04,0xff1d4900,0xff255100,0xff4f6c27,0xff426a06,0xff476e00,0xff567c0b,0xff415c01,0xff111604,0xff000000,0xff253500,0xff598102,
2402 0xff568800,0xff3a6400,0xff3f7606,0xff184c00,0xff002a00,0xff002100,0xff3e6627,0xff155f03,0xff1c9300,0xff178100,0xff522300,0x99000000,0x66000000,0x3d000000,
2403 0x1f000000,0x3d000000,0xff522300,0xff44ae19,0xff27b800,0xff25b600,0xff28a002,0xff274f0f,0xff1d4006,0xff153800,0xff2d4f11,0xff1c3700,0xff315408,0xff3d6014,
2404 0xff172c00,0xff020400,0xff0a1200,0xff284a00,0xff1f4500,0xff586f38,0xff335e19,0xff2f591a,0xff093100,0xff012800,0xff265a11,0xff1d8e01,0xff1e9800,0xff157100,
2405 0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff4eb821,0xff26c000,0xff25b500,0xff23a800,0xff229701,0xff164701,0xff1a380c,
2406 0xff153306,0xff203b10,0xff203f0c,0xff1f3f0a,0xff264411,0xff071500,0xff040800,0xff202c14,0xff062400,0xff0c2c00,0xff0e2e00,0xff404931,0xff022100,0xff124203,
2407 0xff1d8202,0xff1c8b00,0xff1a8000,0xff0c4600,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff4fbd26,0xff20b000,0xff1b8300,
2408 0xff1d9100,0xff1f9700,0xff1d8d00,0xff1e6c02,0xff1a4406,0xff15300a,0xff0a2300,0xff051d00,0xff0c2600,0xff233118,0xff071501,0xff020c00,0xff021400,0xff1a3511,
2409 0xff000900,0xff17350a,0xff194b06,0xff176b01,0xff146900,0xff156200,0xff135f00,0xff093300,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
2410 0xff522300,0xff3b861a,0xff146c00,0xff198600,0xff1da200,0xff1a8e00,0xff1c9300,0xff20a300,0xff24b900,0xff195f02,0xff0c2f01,0xff0d2704,0xff0f2807,0xff0e2607,
2411 0xff122a0c,0xff071601,0xff10220a,0xff0c2801,0xff0e3303,0xff124703,0xff145d00,0xff146500,0xff0a3a00,0xff0d3d00,0xff135e00,0xff0b3b00,0xff522300,0x99000000,
2412 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff2f6c17,0xff198a00,0xff1da400,0xff20c200,0xff1fb900,0xff1a9100,0xff188200,0xff177b00,0xff136500,
2413 0xff198700,0xff1a7f02,0xff196d02,0xff1c8103,0xff1d7506,0xff165a04,0xff124803,0xff0e4401,0xff072d00,0xff072d00,0xff082d00,0xff0f5300,0xff093900,0xff072100,
2414 0xff0a3700,0xff0b3900,0xff522300,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff522300,0xff46ae2a,0xff1ca600,0xff1b9a00,0xff21d100,0xff1fba00,
2415 0xff136200,0xff156f00,0xff146e00,0xff157400,0xff1a9d00,0xff188c00,0xff157400,0xff1b9d00,0xff1eb200,0xff136700,0xff135900,0xff125300,0xff0c4200,0xff041e00,
2416 0xff041b00,0xff105e00,0xff177a00,0xff0b3a00,0xff052100,0xff051a00,0xff522300,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff522300,0xff1db500,
2417 0xff116700,0xff0e4b00,0xff0e5400,0xff0c4200,0xff0e4e00,0xff116700,0xff0d4f00,0xff0c4500,0xff127300,0xff127300,0xff0e5900,0xff0b4200,0xff0c4a00,0xff0b3e00,
2418 0xff106000,0xff0b3700,0xff072700,0xff031300,0xff031000,0xff0b3c00,0xff0f5800,0xff093600,0xff041a00,0xff030e00,0xff522300,0x87000000,0x5a000000,0x36000000,
2419 0x17000000,0x2e000000,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,
2420 0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,
2421 0xff522300,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
2422 0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,
2423 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
2424 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,
2425 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
2426 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
2427 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
2428 0x18000000,0xf000000
2429};
2430
2431static const QRgb Solitaire_data[] = {
2432 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
2433 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
2434 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
2435 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
2436 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff0a4c00,0xff084700,0xff074100,0xff074100,
2437 0xff074000,0xff074000,0xff073f00,0xff073e00,0xff063d00,0xff063c00,0xff063b00,0xff063b00,0xff063c00,0xff063d00,0xff063d00,0xff073e00,0xff073f00,0xff073f00,
2438 0xff074000,0xff074000,0xff074000,0xff074000,0xff074000,0xff073f00,0xff063e00,0xff043500,0xff012100,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
2439 0xff084700,0xff87c28d,0xff53a75c,0xff52a75b,0xff52a55b,0xff50a259,0xff4e9d56,0xff4b9753,0xff48914f,0xff458c4d,0xff44894b,0xff43884b,0xff448a4c,0xff468e4e,
2440 0xff489250,0xff4b9753,0xff4c9a54,0xff4e9e57,0xff4fa058,0xff50a259,0xff51a35a,0xff51a45a,0xff51a35a,0xff50a058,0xff4f9b57,0xff177220,0xff010d00,0x5c000000,
2441 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff074100,0xff53a75c,0xff158821,0xff158720,0xff148420,0xff14801f,0xff13791d,0xff11701b,0xff106819,0xff0f6117,
2442 0xff0e5d17,0xff0e5d16,0xff0f5f17,0xff0f6318,0xff106819,0xff116d1a,0xff12721c,0xff12771d,0xff137b1d,0xff137e1e,0xff14801f,0xff158221,0xff148120,0xff178021,
2443 0xff177a21,0xff135019,0xff000500,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff074000,0xff52a55b,0xff158620,0xff148420,0xff14801f,0xff13791d,
2444 0xff116f1b,0xff0f6318,0xff0d5715,0xff0c4e13,0xff0b4812,0xff0b4711,0xff0b4a12,0xff0c4f13,0xff0d5414,0xff0e5b16,0xff0f6118,0xff106819,0xff116d1a,0xff12721c,
2445 0xff12771d,0xff147b1f,0xff147c1f,0xff15781f,0xff177421,0xff134c19,0xff010600,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff073e00,0xff4fa158,
2446 0xff14821f,0xff147f1f,0xff137a1d,0xff11701b,0xff106419,0xff185b1e,0xff1c5121,0xff28522b,0xff456445,0xff365838,0xff284e2a,0xff506e4e,0xff426943,0xff306033,
2447 0xff4f7a51,0xff467a49,0xff327137,0xff568b58,0xff49894d,0xff38833e,0xff5a945b,0xff519055,0xff3b7e41,0xff476847,0xff031700,0x93000000,0x62000000,0x3b000000,
2448 0x1f000000,0x3d000000,0xff063b00,0xff4a9652,0xff137a1d,0xff12761c,0xff11701b,0xff0f6418,0xff3c7540,0xff8a9d84,0xffafb3a6,0xffcfcec3,0xffb7bbad,0xffbbbfb2,
2449 0xffd5d1c7,0xffcac6bc,0xffc0bab2,0xffd2ccc4,0xffcbccc2,0xffbabfb1,0xffcccac0,0xffcfcfc2,0xffb9bfaf,0xffcbcac0,0xffcecfc4,0xffaeb9a8,0xffa8a9a2,0xffa1a29b,
2450 0xff062d00,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff053400,0xff428549,0xff106b1a,0xff106819,0xff0f6117,0xff3e7440,0xffc3c0b0,0xffc8c5b8,
2451 0xffd3d9cd,0xffd1d6c9,0xffcfd2c6,0xffd4d3c9,0xffdad7ce,0xffdbd7cf,0xffdadad1,0xffd0d3c8,0xffd8d9cc,0xffd6d4c6,0xffd7d7cc,0xffd7d6cc,0xffd3d4cb,0xffd6d8cf,
2452 0xffd2d3cb,0xffc3c5bd,0xffb5b7b0,0xffa4a69f,0xff073100,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff042a00,0xff356c3b,0xff0d5715,0xff0d5414,
2453 0xff0f5015,0xff8da286,0xffd4cdbc,0xffdddbc8,0xffcdd5c7,0xffd6dbce,0xffe2e2d7,0xffd9d9ce,0xffd2d0c8,0xffd7d9d0,0xffd5dfd2,0xffd0e5d5,0xffd5e0cf,0xffdad8ce,
2454 0xffd7d8cf,0xffdddfd6,0xffdee0d6,0xffdbddd4,0xffd6d8d0,0xffcacbc3,0xffb5b6af,0xffa2a39c,0xff073200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
2455 0xff032000,0xff28522d,0xff0a4110,0xff0a400f,0xff0d3d11,0xffaeb5a2,0xffcdcdbe,0xffd9dac8,0xffe0dfd4,0xfff0e9df,0xffdcd6cd,0xffe2e4db,0xffebebe1,0xffdae2d7,
2456 0xffdad6d2,0xffd6e7db,0xffd7dcd2,0xffdadcd4,0xffdbdcd4,0xffdee1d6,0xffdfe1d6,0xffdbddd4,0xffd5d8cf,0xffc9cac2,0xffb5b7b0,0xffa3a49e,0xff073100,0x99000000,
2457 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff021600,0xff1c391f,0xff072d0b,0xff072c0b,0xff0f3113,0xffaeb5a5,0xffd4d4c9,0xffd6d8ce,0xffe0e0d7,0xffbdada9,
2458 0xffae8e8d,0xffb1676e,0xffca9b98,0xffe0e3d7,0xffdee4df,0xffd8dbd6,0xffecd5d6,0xffe0e2d8,0xffdddfd6,0xffdde0d6,0xffdfe1d6,0xffddded5,0xffd7dad1,0xffcbcdc4,
2459 0xffb8bab2,0xffa3a59e,0xff073100,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff020f00,0xff142816,0xff052008,0xff051f08,0xff263c28,0xffbfc8bc,
2460 0xffd1d3c7,0xffd9e2da,0xffceb9ae,0xff93454e,0xffbc6d72,0xffbc827c,0xff9d404a,0xffc58b8c,0xffe0e3db,0xffddded9,0xffdde1dd,0xffdce7db,0xffe1e2d8,0xffe0e2d7,
2461 0xffe0e2d7,0xffe0e2d8,0xffdcded4,0xffcfd2c8,0xffbabdb5,0xffa5a7a1,0xff073300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff010c00,0xff0f1f11,
2462 0xff041806,0xff041806,0xff1c2d1d,0xffd0c0ba,0xffdcdbe4,0xffd6fbf9,0xffcc8b88,0xffc1606f,0xffedf6e8,0xffefffe4,0xffb9807a,0xffb15d66,0xffe8e8d9,0xffe2dfd9,
2463 0xffe1dcda,0xffe0e3dd,0xffe2e4d9,0xffe2e4d9,0xffe1e3d8,0xffdfe1d7,0xffdcded4,0xffd0d2c8,0xffbabcb4,0xffa5a6a0,0xff073300,0x99000000,0x66000000,0x3d000000,
2464 0x1f000000,0x3d000000,0xff010a00,0xff1d281d,0xff536054,0xff797c71,0xff44392c,0xffb0958c,0xffeaf2f0,0xffdbf4f2,0xffcc888a,0xffbe636b,0xffdcfff7,0xffe6ebd8,
2465 0xffd8a19d,0xffa14953,0xffe6f2db,0xffe9eae0,0xffddddd9,0xffe6dfdc,0xffe0e0d7,0xffe2e4d9,0xffe1e3d8,0xffdee0d6,0xffdbddd3,0xffd0d3c9,0xffbbbeb5,0xffa6a8a1,
2466 0xff073400,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff073200,0xffd9cfcc,0xffd9d7d0,0xffc7bfbd,0xff3c2a26,0xff9d9a86,0xffd1d3c7,0xffd9e2da,
2467 0xffceb9ae,0xffb25254,0xffe9eff6,0xffdceae2,0xffd09195,0xffbe5c68,0xffdedecd,0xffe1e0d8,0xffd8e5db,0xffdce9d8,0xffdbebd9,0xffe5e5dc,0xffe8e8dd,0xffe4e7dc,
2468 0xffdcded4,0xffdcd6d1,0xffc7c2ba,0xffa4a7a1,0xff073400,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff094100,0xffd5d4d0,0xffd8dad2,0xffd8e4d9,
2469 0xff292720,0xffb5bca2,0xffdcdbe4,0xffd6fbf9,0xffcc8b88,0xffb86e64,0xffe0e8df,0xffe2ffff,0xffc89796,0xffbb676d,0xffe4ebda,0xffe1eee6,0xffe7f1eb,0xffcfc5bc,
2470 0xffcdd3c0,0xfff0f1e8,0xffc6d2c8,0xffc7c4c3,0xffe5dddb,0xffcdb9bd,0xffa0a79f,0xffa6b2a9,0xff072e00,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
2471 0xff0a4200,0xffd2d1cd,0xffced8d2,0xffc4cfc5,0xff3a342e,0xffa7b19c,0xffeaf2f0,0xffdbf4f2,0xffcc888a,0xff892c2e,0xffbd8486,0xffe4e2dd,0xffe3bdb5,0xff983f4b,
2472 0xffe9f0e0,0xffcce0da,0xff696c6b,0xff8c7577,0xffa1958a,0xff707471,0xff788e86,0xff949996,0xff696665,0xff6e6c6a,0xff757d79,0xff5b5656,0xff041d00,0x99000000,
2473 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a4400,0xffcecdc9,0xffe8edea,0xffc5c0c0,0xff4a3a35,0xffa9ae9d,0xffe6e2d7,0xffcdf5e3,0xffcc9895,0xff9b2e3a,
2474 0xffb65667,0xffae5e63,0xffce8082,0xffb94756,0xffd6edda,0xffb5b7b4,0xff8a7c7f,0xffaaafa7,0xffb9c5b7,0xffd9d7cf,0xffe1c7c2,0xffc1b0a8,0xffc5d9ce,0xffbeb0ae,
2475 0xff979a98,0xff99a89d,0xff073300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a4500,0xffd5d4d0,0xffdededb,0xffe0dadb,0xff423131,0xffb5baa6,
2476 0xffd2e5d6,0xffe7fcf2,0xffb47c7a,0xffca6f70,0xffd3c4b8,0xffb47e82,0xffa42132,0xffa05a5b,0xffe1ffe8,0xffb6bfb5,0xff73696b,0xffebfff7,0xffcbb9b6,0xffb34f5c,
2477 0xffb02d3b,0xffbe696b,0xffcf9d9b,0xffd1e5d6,0xffccd6ce,0xffa78d8e,0xff061100,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a4500,0xffd7d7d4,
2478 0xffe5e5e1,0xffd1cbcc,0xff37302f,0xff93a28e,0xffe9faeb,0xffe0f6ec,0xffcd838a,0xffaa4c4c,0xffffffff,0xffd0dad4,0xffa9353e,0xff81282d,0xfff4e4d0,0xffc6ccbe,
2479 0xff76706e,0xfff7d4d0,0xff8f1727,0xff7a020c,0xff76050a,0xff600101,0xff911923,0xffb9a190,0xffc5beac,0xff772531,0xff040500,0x99000000,0x66000000,0x3d000000,
2480 0x1f000000,0x3d000000,0xff0a4500,0xffd6d6d4,0xffeaebe7,0xffbcbab8,0xff2a2525,0xff998b81,0xfff8f8ea,0xffe8ece0,0xffd2b1a4,0xff9f2e39,0xffbe7077,0xffdca5ad,
2481 0xff9d4b49,0xff9b1826,0xffbb3d52,0xffc1a9a5,0xff869082,0xffb36b67,0xff750004,0xff6c0608,0xff6b090b,0xff70080c,0xff760207,0xff914646,0xffab6c66,0xff550b0e,
2482 0xff040600,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a4500,0xffd5d4d1,0xffdededa,0xffdbdbd8,0xff291f21,0xffb0b3a0,0xffe0e9d6,0xffdde6df,
2483 0xfff4ede7,0xffc9848b,0xffb36973,0xffa23e50,0xffb1726e,0xffe1bcb6,0xffeadcd9,0xffaca8a7,0xff757269,0xffc26365,0xff690102,0xff770910,0xff7f0812,0xff6d080c,
2484 0xff6a090d,0xff80161d,0xff811f25,0xff5e0e14,0xff040700,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a4600,0xffdadcd8,0xffe7d9dd,0xffcfcfd1,
2485 0xff3c2328,0xff949485,0xffe8f5e8,0xffd6e9e9,0xfffbfefe,0xffe8f3e8,0xffe9e2de,0xfff2efe8,0xfff4ecd8,0xfff2dfdb,0xffedf6ed,0xffc5c8c5,0xff71786e,0xffae5058,
2486 0xff720a11,0xff7c060f,0xff6f0813,0xff7e0810,0xff63090e,0xff700911,0xff5c090c,0xff611113,0xff040600,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
2487 0xff0a4a00,0xffe2ede8,0xffe3fcfc,0xffb8adb4,0xff312b26,0xff9a837a,0xfff4faf4,0xffe3e8e9,0xffc27f86,0xffb24351,0xffc29f9d,0xffdecbc2,0xff85202d,0xffa8424c,
2488 0xffd6cbb7,0xffc1bcb0,0xff8d9f92,0xffaf6f72,0xff890c17,0xff720209,0xff6f0a10,0xff730910,0xff6c0a12,0xff6e0a11,0xff650d11,0xff5f1013,0xff040600,0x99000000,
2489 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a4500,0xffc0c7bd,0xff987d7e,0xff8c555a,0xff15140e,0xff9f9c88,0xffd3e8d7,0xffdababb,0xff85232c,0xff5f0202,
2490 0xff82252a,0xffaa3943,0xff7b030e,0xff750202,0xffc47770,0xffb7c3b0,0xff7c7d7b,0xffd0c4ba,0xff8e1b24,0xff6f0205,0xff780c10,0xff6e0b11,0xff6d0913,0xff680b12,
2491 0xff690d13,0xff611117,0xff040600,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff062400,0xff89635f,0xff771b23,0xff600308,0xff150303,0xff929486,
2492 0xffe6eaea,0xffc69192,0xff7d0a12,0xff5d0507,0xff770f13,0xff740a12,0xff6d090f,0xff70050d,0xffac6765,0xffd0ded0,0xff605f5e,0xffd7e4d8,0xffa35b5f,0xff770d12,
2493 0xff6f070b,0xff680c11,0xff640c11,0xff630d12,0xff591014,0xff531217,0xff040600,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff050f00,0xff4a151a,
2494 0xff39080d,0xff1e0609,0xff17110d,0xff91928c,0xffd6cbd4,0xffbcafa3,0xff811c23,0xff68090e,0xff660c13,0xff670c12,0xff680d11,0xff610b0f,0xffb5928f,0xffa0a9a0,
2495 0xff6e6a64,0xffb9c2ba,0xffbb9e9b,0xff87393c,0xff5c0707,0xff610e12,0xff600e13,0xff610f12,0xff551114,0xff4c1316,0xff040700,0x87000000,0x5a000000,0x36000000,
2496 0x17000000,0x2e000000,0xff010300,0xff010200,0xff000300,0xff000400,0xff010800,0xff062c00,0xff083400,0xff083e00,0xff071b00,0xff040700,0xff040500,0xff050600,
2497 0xff040400,0xff050c00,0xff093a00,0xff072e00,0xff041e00,0xff083800,0xff083700,0xff072900,0xff040600,0xff040500,0xff040500,0xff050600,0xff040600,0xff040700,
2498 0xff040700,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
2499 0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,
2500 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
2501 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,
2502 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
2503 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
2504 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
2505 0x18000000,0xf000000
2506};
2507
2508static const QRgb Sound_data[] = {
2509 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3000000,0x6000000,0xb000000,0x12000000,0x19000000,0x21000000,0x29000000,0x2f000000,
2510 0x34000000,0x37000000,0x38000000,0x37000000,0x34000000,0x2f000000,0x29000000,0x21000000,0x19000000,0x12000000,0xb000000,0x6000000,0x3000000,0x1000000,
2511 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,
2512 0x5d5f4144,0x937e5559,0xbe8d5e62,0xde956166,0xf39a6267,0xfe995f65,0xf392565b,0xe0874c52,0xc4773f45,0x9f613136,0x70401e21,0x3f000000,0x33000000,0x26000000,
2513 0x1b000000,0x11000000,0xa000000,0x5000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,
2514 0x16000000,0x23000000,0x6f735254,0xba92676a,0xf5a67479,0xffa77378,0xffa57075,0xffa16a6f,0xff9e656a,0xff9a5f65,0xff96585e,0xff925258,0xff8d4a50,0xff884249,
2515 0xf7803a41,0xc6672b30,0x88451a1e,0x45000000,0x33000000,0x23000000,0x16000000,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,
2516 0x2000000,0x7000000,0xe000000,0x1a000000,0x47553d3f,0xa78f666a,0xf5a9797d,0xffaa797d,0xffaa787c,0xffa77378,0xffa57075,0xffa16a6f,0xff9e656a,0xff995e63,
2517 0xff95575d,0xff904f55,0xff8b474d,0xff863f46,0xff81383f,0xff7d3139,0xf8752930,0xbc571b20,0x6c24090c,0x3e000000,0x2a000000,0x1a000000,0xe000000,0x7000000,
2518 0x2000000,0x1000000,0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x5f6d4f52,0xc69b7074,0xffad7d82,0xffac7b80,0xffab7a7f,0xffaa787c,0xffa77378,
2519 0xffa47075,0xffa06a6f,0xff9c6368,0xff985d62,0xff93555a,0xff8d4c53,0xff88444b,0xff833c43,0xff7e343b,0xff792b32,0xff74252b,0xff701e26,0xd759151b,0x852e0a0c,
2520 0x47000000,0x2e000000,0x1b000000,0xe000000,0x6000000,0x2000000,0x1000000,0x5000000,0xd000000,0x1a000000,0x5f6d4f52,0xd09f7378,0xffae7e83,0xffad7d82,
2521 0xffac7b80,0xffab7a7f,0xffa9787c,0xffa67378,0xffa26d72,0xff9d666c,0xff9a6066,0xff95595e,0xff905157,0xff8b494f,0xff843f45,0xff7e363d,0xff792e35,0xff72252c,
2522 0xff6e1e25,0xff6a1820,0xff67171f,0xe156141a,0x8b2a090d,0x49000000,0x2e000000,0x1a000000,0xd000000,0x5000000,0x3000000,0xa000000,0x16000000,0x47553d3f,
2523 0xc69b7074,0xffae7e83,0xffae7e83,0xffad7d82,0xffac7b80,0xffab7a7f,0xffa8767b,0xffa37075,0xff764f52,0xff362325,0xff321e20,0xff46292c,0xff8a4c52,0xff854249,
2524 0xff7f3a40,0xff2b1113,0xff000000,0xff000000,0xff000000,0xff150506,0xff60161c,0xff61161d,0xdc4c1116,0x7d1b0608,0x47000000,0x2a000000,0x16000000,0xa000000,
2525 0x6000000,0x11000000,0x23000000,0xa78f666a,0xffad7d82,0xffad7d82,0xffad7d82,0xffad7d82,0xffab7a7f,0xffa9797d,0xffa57378,0xff875b60,0xff0f090a,0xff2c2c2c,
2526 0xff828282,0xff130b0c,0xff7e4448,0xff371b1d,0xff2c1215,0xff17080a,0xff4d5e8b,0xff7996e3,0xff4361ae,0xff000000,0xff24080b,0xff59141b,0xff5a151c,0xc93f0e12,
2527 0x61000000,0x3e000000,0x23000000,0x11000000,0xb000000,0x1b000000,0x6f735254,0xf5a9797d,0xffac7b80,0xffac7b80,0xffac7b80,0xffab7a7f,0xffa9797d,0xffa67479,
2528 0xff885e62,0xff120c0c,0xff000000,0xffffffff,0xfff2f2f2,0xff100909,0xff613135,0xff010000,0xff3c496c,0xff25304b,0xff1e2841,0xff6385df,0xff4a71da,0xff1a284f,
2529 0xff020001,0xff380d10,0xff541319,0xf9521219,0xa327080b,0x56000000,0x33000000,0x1b000000,0x12000000,0x26000000,0xba92676a,0xffaa797d,0xffab7a7f,0xffab7a7f,
2530 0xffab7a7f,0xffa9797d,0xffa67479,0xff865c60,0xff110b0c,0xff000000,0xffe3e3e5,0xfffbfbfd,0xff939396,0xff030101,0xff070304,0xff010000,0xff7b98e4,0xff6284df,
2531 0xff0d1325,0xff212e56,0xff4a71da,0xff3f62bf,0xff04070d,0xff110405,0xff491115,0xff4f1218,0xd83c0e12,0x6d000000,0x45000000,0x26000000,0x19000000,0x5d5f4144,
2532 0xf5a67479,0xffa9787c,0xffa9787c,0xffa8777b,0xffa67479,0xffa37277,0xff835a5e,0xff100a0b,0xff000000,0xffd9dbdd,0xfff5f5fc,0xffe0e2e9,0xff75757a,0xff222324,
2533 0xff708fe1,0xff1f2943,0xff324373,0xff5479dc,0xff4369ce,0xff010000,0xff3f5ba9,0xff446bd1,0xff263b73,0xff010000,0xff350c10,0xff4a1117,0xfa491016,0x9d1a0608,
2534 0x57000000,0x33000000,0x21000000,0x937e5559,0xffa67378,0xffa57277,0xffa47176,0xffa26f74,0xff9e6c71,0xff80575b,0xff0f0b0b,0xff000000,0xffdcdde3,0xffedeffa,
2535 0xffe7ebf9,0xffbdbfcb,0xff616269,0xff424348,0xff6687df,0xff4e75da,0xff010001,0xff405dad,0xff456cd3,0xff273c76,0xff010001,0xff5076db,0xff3a5bb3,0xff020305,
2536 0xff1e0609,0xff451015,0xff471016,0xc32a090c,0x68000000,0x3f000000,0x29000000,0xbe8d5e62,0xffa47075,0xffa26e73,0xff140d0e,0xff120c0d,0xff120c0d,0xff060404,
2537 0xff000000,0xffd0d3dd,0xffe6e9f9,0xffdee3f6,0xffd6dcf3,0xffaeb1c3,0xff5f6169,0xff000000,0xff4a69bb,0xff476fd8,0xff2c4383,0xff010001,0xff5076db,0xff3d5fba,
2538 0xff010001,0xff4662ae,0xff4065c5,0xff121d38,0xff0e0304,0xff400f13,0xff431014,0xdf320a0f,0x76000000,0x4a000000,0x2f000000,0xde956166,0xff9f696e,0xff9b666b,
2539 0xff000000,0xffe2e6f7,0xffbbbfcf,0xffa1a4b2,0xffd6dbec,0xffdde2f6,0xffd3d9f4,0xffcdd6f1,0xffc7cde9,0xffa5abc3,0xff5e616f,0xff010101,0xff070910,0xff557adc,
2540 0xff3d5fba,0xff010000,0xff5377d5,0xff3e60bc,0xff0c1223,0xff222f52,0xff4971d9,0xff223568,0xff070102,0xff3b0d11,0xff3e0e13,0xf0390e11,0x82000000,0x53000000,
2541 0x34000000,0xf39a6267,0xff9c6368,0xff966065,0xff000000,0xffd7ddf5,0xffcfd7f3,0xffcbd3f2,0xffcbd3f2,0xffc7cfef,0xffc4cbef,0xffc2cbee,0xffbbc4e7,0xff9da4c2,
2542 0xff585c6e,0xff060202,0xff020101,0xff5d7bcb,0xff3f62bf,0xff090d18,0xff2a3966,0xff4165c6,0xff162242,0xff0a0e18,0xff567bdc,0xff2c4587,0xff070102,0xff370c10,
2543 0xff3a0d12,0xf93b0d12,0x8b000000,0x59000000,0x37000000,0xfe995f65,0xff975d63,0xff8f585d,0xff000000,0xffcbd2f1,0xffbfc9ed,0xffb8c2ec,0xffb7c2ec,0xffb7c1eb,
2544 0xffb6c0ec,0xffb6c1ec,0xffb0bae4,0xff949dc0,0xff53586d,0xff0a0203,0xff070202,0xff5d77bc,0xff4064c4,0xff1c284d,0xff242f53,0xff446bd0,0xff1d2e59,0xff000000,
2545 0xff5d80dd,0xff2d468a,0xff060102,0xff340c0f,0xff370c11,0xfe3b0d12,0x90000000,0x5e000000,0x38000000,0xf392565b,0xff92565c,0xff8a5156,0xff000000,0xffbbc5ed,
2546 0xffa8b9e8,0xff9ca8d7,0xffa2b0e3,0xffa8b5e5,0xffa9b6e8,0xffaab5e8,0xffa4b0e1,0xff8995bc,0xff4f556b,0xff080202,0xff040101,0xff617bc0,0xff3f63c1,0xff141d38,
2547 0xff253052,0xff456cd3,0xff1c2b54,0xff000000,0xff5b7fdd,0xff2c4586,0xff060101,0xff310b0e,0xff340c10,0xfa350c0f,0x92000000,0x5f000000,0x37000000,0xe0874c52,
2548 0xff8f5056,0xff864a4f,0xff000000,0xff95a5e5,0xff7482b2,0xff6c79a7,0xff8190c5,0xff93a3dd,0xff99a9e6,0xff99a9e5,0xff94a2dd,0xff7b88b8,0xff4b516c,0xff020001,
2549 0xff000000,0xff6e8de1,0xff3d5fba,0xff010000,0xff435a98,0xff4368cc,0xff121d38,0xff171f34,0xff5378db,0xff253a71,0xff050101,0xff2f0a0e,0xff320b0f,0xf32e090d,
2550 0x90000000,0x5e000000,0x34000000,0xc4773f45,0xff8a494e,0xff834348,0xff010101,0xff24293a,0xff12151d,0xff090a0e,0xff272e43,0xff7a8fd1,0xff869ae0,0xff879be2,
2551 0xff8395d7,0xff6c7db4,0xff404a6d,0xff000000,0xff364263,0xff587ddd,0xff3b5db5,0xff010000,0xff5d80dd,0xff3f62bf,0xff06080f,0xff3a4c7b,0xff446bd0,0xff172345,
2552 0xff070102,0xff2d0b0e,0xff300b0f,0xe727090c,0x8b000000,0x59000000,0x2f000000,0x9f613136,0xff864148,0xff813d43,0xff462024,0xff3f1b1e,0xff3a171a,0xff210c0e,
2553 0xff000000,0xff232c47,0xff6e85d6,0xff728cdc,0xff7189d5,0xff6073b3,0xff344066,0xff000000,0xff6587df,0xff4369ce,0xff0e1426,0xff1e2948,0xff4c73da,0xff324d97,
2554 0xff010000,0xff6385df,0xff3a5bb2,0xff070b16,0xff0d0304,0xff2b0a0d,0xff300b0e,0xd31c0607,0x83000000,0x53000000,0x29000000,0x70401e21,0xf77f3940,0xff7d363d,
2555 0xff793138,0xff722b32,0xff68242b,0xff601e23,0xff270a0d,0xff000000,0xff1c2644,0xff5678d3,0xff5e79d2,0xff516ab4,0xff2e3c65,0xff29375b,0xff446bd0,0xff2e488d,
2556 0xff010102,0xff5b7fdd,0xff4267c9,0xff121b35,0xff1b233d,0xff4e75da,0xff2f488e,0xff000000,0xff180508,0xff2c0a0d,0xfc2e0a0d,0xb80f0406,0x76000000,0x4a000000,
2557 0x21000000,0x3f000000,0xc6662a30,0xff7b3038,0xff772b32,0xff72252c,0xff6b1f26,0xff651920,0xff5c151b,0xff25090b,0xff000000,0xff162243,0xff4d6fd0,0xff4161ba,
2558 0xff283763,0xff000000,0xff1b2a52,0xff090f1d,0xff557adc,0xff466ed6,0xff2b4382,0xff010000,0xff5f82de,0xff3a5bb3,0xff0e162a,0xff030101,0xff22070a,0xff2b090d,
2559 0xe821080a,0x96000000,0x68000000,0x3f000000,0x19000000,0x33000000,0x8843181c,0xf8752930,0xff74252b,0xff701f26,0xff6c1921,0xff66171e,0xff60161d,0xff59141a,
2560 0xff24080b,0xff000000,0xff122348,0xff345dbb,0xff1f3d7f,0xff050101,0xff140506,0xff06070f,0xff4166c7,0xff3d5eb9,0xff020305,0xff5879d1,0xff4267c9,0xff263b73,
2561 0xff000000,0xff110405,0xff29090c,0xfc2a090c,0xc6120405,0x83000000,0x57000000,0x33000000,0x12000000,0x26000000,0x45000000,0xbc571b20,0xff711e26,0xff6e1921,
2562 0xff6b1820,0xff67181f,0xff62161d,0xff5c151b,0xff541319,0xff22070a,0xff000000,0xff233a71,0xff243e7f,0xff080102,0xff26090c,0xff030101,0xff010001,0xff010000,
2563 0xff3554a3,0xff4267ca,0xff2e498e,0xff010103,0xff040101,0xff22080a,0xff2a090d,0xe21c0709,0x98000000,0x6e000000,0x45000000,0x26000000,0xb000000,0x1b000000,
2564 0x33000000,0x6c24090c,0xd75a151b,0xff6a1820,0xff68181f,0xff65171e,0xff60161d,0xff5b141b,0xff561419,0xff4e1217,0xff1b0609,0xff060102,0xff0c0c18,0xff0d0304,
2565 0xff350c10,0xff290a0d,0xff25080b,0xff090202,0xff18264b,0xff2e478c,0xff0b1223,0xff010001,0xff1c0608,0xff29090d,0xef21060a,0xb2090001,0x7e000000,0x56000000,
2566 0x33000000,0x1b000000,0x6000000,0x11000000,0x23000000,0x3e000000,0x85300b0e,0xe058141a,0xff65171e,0xff62161d,0xff5e151c,0xff5a151b,0xff561319,0xff4f1218,
2567 0xff471015,0xff3b0d12,0xff350c10,0xff320b0f,0xff380d11,0xff360c10,0xff330b0f,0xff1f0709,0xff100405,0xff0f0405,0xff0f0305,0xff1c0609,0xff29090d,0xf223070b,
2568 0xc00f0104,0x89000000,0x62000000,0x3f000000,0x23000000,0x11000000,0x3000000,0xa000000,0x16000000,0x2a000000,0x46000000,0x8a2c0a0d,0xdb4f1217,0xff5e151c,
2569 0xff5b151b,0xff58141a,0xff541319,0xff4f1217,0xff4a1116,0xff451015,0xff400f14,0xff3d0e13,0xff3a0d12,0xff370c11,0xff350c10,0xff310b0f,0xff2e0b0e,0xff2c0a0d,
2570 0xff2b0a0d,0xff2b0a0d,0xef21070a,0xc00f0104,0x8d000000,0x68000000,0x47000000,0x2a000000,0x16000000,0xa000000,0x1000000,0x5000000,0xd000000,0x1a000000,
2571 0x2e000000,0x48000000,0x7b1b0608,0xc8410f13,0xf956131a,0xff55131a,0xff521319,0xff4e1218,0xff4a1116,0xff451015,0xff410f13,0xff3e0f12,0xff3b0e12,0xff380d11,
2572 0xff360d10,0xff330c0f,0xff310b0f,0xff2f0a0e,0xfc2c090d,0xe11c0608,0xb20a0103,0x89000000,0x68000000,0x49000000,0x2e000000,0x1a000000,0xd000000,0x5000000,
2573 0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x2e000000,0x46000000,0x60000000,0xa229090c,0xd73f0e13,0xfa4d1117,0xff4c1117,0xff491116,0xff451015,
2574 0xff410f14,0xff3f0e13,0xff3c0e12,0xff3a0d11,0xff360d11,0xff350c10,0xfc320b0f,0xe722080b,0xc5130506,0x97000000,0x7e000000,0x62000000,0x47000000,0x2f000000,
2575 0x1b000000,0xe000000,0x6000000,0x2000000,0xffffff,0x1000000,0x2000000,0x7000000,0xe000000,0x1a000000,0x2a000000,0x3e000000,0x55000000,0x6c000000,
2576 0x9b1b0608,0xc22c0a0d,0xde350c10,0xef3c0e12,0xf93f0e13,0xfe3f0e13,0xfa390d11,0xf2310b0e,0xe529090c,0xd11f0709,0xb50f0406,0x93000000,0x82000000,0x6d000000,
2577 0x56000000,0x3f000000,0x2b000000,0x1a000000,0xe000000,0x7000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,
2578 0x16000000,0x23000000,0x33000000,0x45000000,0x56000000,0x67000000,0x75000000,0x81000000,0x89000000,0x8e000000,0x90000000,0x8e000000,0x89000000,0x81000000,
2579 0x75000000,0x67000000,0x56000000,0x45000000,0x33000000,0x23000000,0x16000000,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,
2580 0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,0x33000000,0x3f000000,0x4a000000,0x53000000,0x59000000,0x5e000000,
2581 0x5f000000,0x5e000000,0x59000000,0x53000000,0x4a000000,0x3f000000,0x33000000,0x26000000,0x1b000000,0x11000000,0xa000000,0x5000000,0x2000000,0x1000000,
2582 0xffffff,0xffffff
2583};
2584
2585static const QRgb SoundPlayer_data[] = {
2586 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
2587 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
2588 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
2589 0x3d000000,0x3d000000,0x3d000000,0x3e000000,0x3e000000,0x3f000000,0x3f000000,0x3f000000,0x3f000000,0x3e000000,0x3e000000,0x3d000000,0x3d000000,0x3d000000,
2590 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff070566,0xff08056e,0xff08056d,0xff07056c,
2591 0xff07056c,0xff07056c,0xff07056c,0xff07056c,0xff07056c,0xff07056c,0xff07056c,0xff07056b,0xff07056b,0xff07056b,0xff07056b,0xff07056b,0xff07056b,0xff07056b,
2592 0xff07056c,0xff07056c,0xff07056c,0xff07056c,0xff07056c,0xff07056b,0xff070567,0xff06045d,0xff040346,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
2593 0xff070567,0xffcfd8d5,0xffbfcec8,0xffb0c3bc,0xffabbfb8,0xffaabfb7,0xffaabfb7,0xffaabeb7,0xffaabeb7,0xffaabeb6,0xffaabcb5,0xffa9bcb5,0xffa9bab4,0xffa8bab4,
2594 0xffa8bab3,0xffa8bab3,0xffa9bbb4,0xffa9bcb4,0xffaabdb6,0xffaabeb6,0xffaabeb7,0xffaabeb7,0xffaabeb6,0xffa9bcb6,0xffa5b4af,0xff929e9c,0xff04033d,0x5c000000,
2595 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff08056d,0xffc2d6cf,0xff8cb8a8,0xff67a28d,0xff5b9b84,0xff5a9983,0xff5a9882,0xff5a9781,0xff5a947f,0xff59927e,
2596 0xff588f7c,0xff588b79,0xff578876,0xff578674,0xff578474,0xff648f7f,0xff578977,0xff588d7a,0xff58917d,0xff5a947f,0xff5a9780,0xff5a9881,0xff5a9881,0xff5a937f,
2597 0xff568174,0xff4c5e5a,0xff02011e,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff070567,0xffafc3bc,0xff649282,0xff316d58,0xff22614b,0xff1f5e49,
2598 0xff1f5b46,0xff1f5743,0xff1d5441,0xff1d4f3d,0xff1d4a3a,0xff1b4436,0xff1a4033,0xff5c766d,0xffb8c3bf,0xfffafbfb,0xff1b4334,0xff1b493a,0xff1c4f3d,0xff1d543f,
2599 0xff1e5641,0xff1e5843,0xff1e5844,0xff1e5541,0xff1b473a,0xff162623,0xff010008,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff07056c,0xffb0cac1,
2600 0xff5b9b84,0xff26795b,0xff156b4c,0xff136446,0xff115c41,0xff0f553c,0xff0e4c36,0xff0d4230,0xff375d4f,0xff90a29b,0xffe9eceb,0xffffffff,0xffffffff,0xffffffff,
2601 0xff093121,0xff0b3b28,0xff0b422c,0xff0d4931,0xff0e4e34,0xff0e5137,0xff0f5339,0xff0f5239,0xff0c4130,0xff061c17,0xff000002,0x93000000,0x62000000,0x3b000000,
2602 0x1f000000,0x3d000000,0xff070566,0xffaabfb7,0xff578877,0xff205e49,0xff0e4e37,0xff0b4531,0xff0a3d2b,0xff1a4334,0xff6f847c,0xffd2d7d6,0xffffffff,0xffffffff,
2603 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff03180e,0xff031d11,0xff052314,0xff052616,0xff052a18,0xff062c1a,0xff062f1c,0xff062f1e,0xff06271b,0xff02100d,
2604 0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff07056c,0xffafcac1,0xff5a9983,0xff247456,0xff116044,0xff0d533a,0xffb3c5bf,0xfffafbfb,
2605 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff021209,0xff03170b,0xff031c0c,0xff092211,0xff0d2816,0xff0f2c18,
2606 0xff153320,0xff0d2c1a,0xff072517,0xff02100c,0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff070566,0xffaabfb7,0xff578776,0xff1f5b47,
2607 0xff0d4632,0xff093a29,0xfff6f8f7,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe8e9e8,0xffd1d2d2,0xff767977,0xff09100a,0xff202520,
2608 0xff3d423c,0xff4b4d49,0xff5f605e,0xff565755,0xff585a57,0xff464846,0xff282c29,0xff101314,0xff000005,0x9b020202,0x66000000,0x3d000000,0x1f000000,0x3d000000,
2609 0xff07056c,0xffafcac1,0xff5a9882,0xff247055,0xff115940,0xff0c4732,0xffe6eae9,0xffffffff,0xffffffff,0xffffffff,0xfff6f6f6,0xffa7aaa9,0xff4b4f4c,0xff010702,
2610 0xffa5a6a5,0xff6f706f,0xff343434,0xff5d5959,0xff5e5b5a,0xff716a68,0xff7a6f6a,0xff656060,0xff5b524e,0xff5f595a,0xff2f2f31,0xff1a1a1f,0xff010110,0xb9212117,
2611 0x7d242419,0x3f060604,0x1f000000,0x3d000000,0xff070566,0xffaabfb7,0xff578776,0xff1f5945,0xff0c4230,0xff083425,0xffeef0f0,0xffffffff,0xffc7cbc9,0xff626865,
2612 0xff0f1612,0xff010602,0xff050a06,0xff1a1c1a,0xffb2b1b1,0xff838181,0xff534c4b,0xff635a5a,0xff8c8383,0xff9d908e,0xff827777,0xff736a69,0xff695d57,0xff5a595a,
2613 0xff474a4a,0xff222429,0xff020119,0xcc313122,0xac4f4f37,0x6e57573d,0x1f000000,0x3d000000,0xff07056c,0xffafcac1,0xff5a9882,0xff236e53,0xff0f543c,0xff0b422d,
2614 0xffe9eceb,0xff3c5048,0xff03140b,0xff010e07,0xff010a04,0xff171c17,0xff343434,0xff423f3e,0xffbfbcba,0xff898485,0xff484141,0xff5f5757,0xff847a7a,0xff928380,
2615 0xff776c6c,0xff695e5b,0xff5d5757,0xff515552,0xff3b3f3f,0xff25272c,0xff02011b,0xcc313122,0xb354543b,0x9e777754,0x1f000000,0x3d000000,0xff070566,0xffaabfb7,
2616 0xff578676,0xff1f5643,0xff0c402c,0xff072f20,0xffe8ebea,0xff192a22,0xff020e06,0xff010b03,0xff1f241f,0xff414040,0xff5a5150,0xff5c5050,0xffbdb9b8,0xff898484,
2617 0xff4b4344,0xff5d5455,0xff877d7d,0xff90837f,0xff756967,0xff645954,0xff595b59,0xff4f5650,0xff3f4343,0xff2a2c33,0xff02011e,0xcc313122,0xb354543b,0x9e777754,
2618 0x1f000000,0x3e000000,0xff07056c,0xffafc9c0,0xff5a9580,0xff22684e,0xff0e4b34,0xff083724,0xffe8ebea,0xff1a2c21,0xff011005,0xff2a2f2a,0xff4b4b48,0xff655c54,
2619 0xff645954,0xff544949,0xffbfbbbb,0xff8f8784,0xff4e4444,0xff5a5151,0xff837879,0xff8c8080,0xff6d6260,0xff5d595a,0xff555c55,0xff535954,0xff4a4d4d,0xff303039,
2620 0xff020122,0xcc313122,0xb354543b,0x9e777754,0x1f000000,0x3e000000,0xff070566,0xffaabeb6,0xff568172,0xff1d4d3c,0xff0a3323,0xff052215,0xffe8eae9,0xff18241c,
2621 0xff161d16,0xff4a4a49,0xff766856,0xffaba195,0xffdad7d4,0xffd6d3d2,0xffd3d1d1,0xff8f8888,0xff524848,0xff584f4f,0xff7b7171,0xff83736f,0xff675e5b,0xff535853,
2622 0xff555c54,0xff5f6460,0xff56575c,0xff363540,0xff020122,0xcc313122,0xb354543b,0x9e777754,0x1f000000,0x3e000000,0xff07056b,0xffadc6be,0xff588c7a,0xff1f5642,
2623 0xff0a3624,0xff052314,0xffe8eae9,0xff1d2920,0xff444643,0xff655b4f,0xff877451,0xffdcd8d1,0xffffffff,0xffffffff,0xffefeeee,0xff908988,0xff554948,0xff5f5454,
2624 0xff978d8d,0xffa3948c,0xff8d8e8d,0xff7d857d,0xff797e7a,0xff737375,0xff656064,0xff3d383e,0xff030123,0xcc313122,0xb354543b,0x9e777754,0x1f000000,0x3f000000,
2625 0xff070565,0xffa8bab4,0xff557a6c,0xff677f76,0xffc1c8c5,0xffc0c5c3,0xfff0f1f0,0xff363a35,0xff474441,0xff7e6743,0xff715c38,0xffdad6ce,0xffffffff,0xffffffff,
2626 0xffd7d5cf,0xff5f5446,0xff70635e,0xff827978,0xff4b4746,0xff383737,0xff363837,0xff6e6f6d,0xffb0adad,0xff9f938c,0xff726764,0xff443e44,0xff030226,0xcc313122,
2627 0xb354543b,0x9e777754,0x1f000000,0x3f000000,0xff07056b,0xffacc3bb,0xff568373,0xffc7d2cd,0xffffffff,0xffffffff,0xffd8dad9,0xff3a3b39,0xff574736,0xff6c4e26,
2628 0xff694c28,0xff978570,0xffd7d1ca,0xffd5d0ca,0xff928572,0xff736340,0xff837968,0xff1c1b19,0xff111810,0xff131e14,0xff131912,0xff111310,0xff3a3837,0xffbeb4ae,
2629 0xff817571,0xff4c454d,0xff03022a,0xcc313122,0xb354543b,0x9e777754,0x1f000000,0x3f000000,0xff070465,0xffa8b9b2,0xff547569,0xffc6ceca,0xffffffff,0xffffffff,
2630 0xffc6c8c6,0xff383735,0xff664d33,0xff705133,0xff735333,0xff6f4f30,0xff65472d,0xff5f442a,0xff5f442c,0xff856f5d,0xff26211d,0xff080c08,0xff11291b,0xff031b0d,
2631 0xff011406,0xff2f362e,0xff373737,0xffc4bbb5,0xff8b7e7a,0xff4e464e,0xff03022a,0xcc313122,0xb354543b,0x9e777754,0x1f000000,0x3f000000,0xff07056b,0xffacc2bb,
2632 0xff568371,0xff678378,0xffc1c8c5,0xffc0c5c2,0xff6c706c,0xff463f35,0xff7b5e3b,0xff83643e,0xff896840,0xff886942,0xff836541,0xff7d5f3e,0xff876d51,0xff86796d,
2633 0xff070706,0xff102517,0xff04230f,0xff021c0a,0xff091d0d,0xff575c56,0xff696763,0xffc9beb3,0xff837871,0xff4c454b,0xff030229,0xcc313122,0xb354543b,0x9e777754,
2634 0x1f000000,0x3e000000,0xff070565,0xffa8bab4,0xff54786b,0xff1a3d2f,0xff061e12,0xff06140b,0xff313331,0xff564935,0xff947749,0xff987b4e,0xff9f8154,0xffa3845a,
2635 0xffa08460,0xff9f8765,0xffbcae93,0xff868276,0xff080907,0xff212d22,0xff19261b,0xff1f2a1f,0xff515650,0xff696a69,0xffb2b5b2,0xff9a9a96,0xff706c6a,0xff444147,
2636 0xff030226,0xcc313122,0xb354543b,0x9e777754,0x1f000000,0x3e000000,0xff07056b,0xffadc5bd,0xff588a78,0xff1d523d,0xff082f1c,0xff102518,0xff474844,0xff766244,
2637 0xffa58a62,0xffa88c68,0xffb39677,0xffbaa182,0xffbcac8e,0xffbdb097,0xffbfb09f,0xffb6a9a3,0xff433f3e,0xff262725,0xff474846,0xff595b58,0xff606060,0xff9c9f9c,
2638 0xffb0b7b0,0xff7b857e,0xff65686c,0xff3b3b47,0xff020126,0xcc313122,0xb354543b,0x9e777754,0x1f000000,0x3e000000,0xff070566,0xffa9bcb5,0xff567f70,0xff1b4938,
2639 0xff072b1b,0xff12271a,0xff484847,0xff8a745a,0xffbba084,0xffbaa089,0xffc0a793,0xffc7b99f,0xffc7b9a5,0xffc2ad9d,0xffb99f91,0xffd0b9af,0xffd0c0ba,0xff9e9898,
2640 0xff857f7f,0xff888787,0xffd0d1d0,0xffa1a4a1,0xff7f867f,0xff7b847e,0xff5e6564,0xff373a42,0xff020126,0xcc313122,0xb354543b,0x9e777754,0x1f000000,0x3d000000,
2641 0xff07056c,0xffafc8bf,0xff59927d,0xff216149,0xff0c412b,0xff103320,0xff4f524c,0xff897665,0xffc6ae9d,0xffc1ac9c,0xffc4b4a4,0xffc4b4a3,0xffc2ad9c,0xffbfa899,
2642 0xffc0a599,0xffb89a90,0xffae9a8e,0xff9e9191,0xff998f8f,0xffb4b0b0,0xffacb0ac,0xff909390,0xff80847f,0xff797d7a,0xff5a5f5f,0xff33373d,0xff020123,0xcc313122,
2643 0xb354543b,0x9e777754,0x1f000000,0x3d000000,0xff070465,0xffa9bcb5,0xff568172,0xff1d503e,0xff093725,0xff09291b,0xff414641,0xff9a8778,0xffc0b0a4,0xffb7aa9c,
2644 0xffb6a798,0xffb5a092,0xffb49e92,0xffb39d94,0xffac9189,0xffa38d82,0xff8d7c78,0xff736769,0xff786d6f,0xff888385,0xffa1a3a4,0xff9d9f9f,0xff7e7f80,0xff6c6f6f,
2645 0xff54575a,0xff31333b,0xff020120,0xcc313122,0xb354543b,0x9e777754,0x1d000000,0x3b000000,0xff070567,0xffa9bcb7,0xff558173,0xff1e5443,0xff0b3d2c,0xff072f1f,
2646 0xff18241b,0xff4c4746,0xff978b87,0xff8b7e78,0xff877772,0xff877571,0xff877673,0xff85706f,0xff7e6b68,0xff776865,0xff63565a,0xff574e53,0xff5d565c,0xff6b666c,
2647 0xff78777e,0xff797b81,0xff6b6d72,0xff55575c,0xff3f4048,0xff282a34,0xff020120,0xc9343425,0xb157573d,0x9d797955,0x1b000000,0x36000000,0xff060459,0xff929e9c,
2648 0xff4b5855,0xff152623,0xff051512,0xff02100d,0xff040d0a,0xff101013,0xff4f464d,0xff4f464b,0xff4e444b,0xff4e444d,0xff4c4048,0xff483d44,0xff473f44,0xff41383e,
2649 0xff352e38,0xff332f39,0xff34313c,0xff3d3a46,0xff444452,0xff464855,0xff41424f,0xff363743,0xff262733,0xff20212d,0xff020122,0xc33b3b2a,0xad5d5d41,0x9b7e7e59,
2650 0x17000000,0x2e000000,0xff040346,0xff04033e,0xff02011e,0xff010009,0xff000002,0xff000001,0xff000001,0xff000003,0xff010113,0xff03022a,0xff03022b,0xff030226,
2651 0xff030125,0xff030225,0xff030123,0xff02011f,0xff02011e,0xff02011e,0xff020120,0xff020126,0xff03022c,0xff03022e,0xff03022d,0xff020129,0xff020122,0xff020120,
2652 0xff03022a,0xba494933,0xa7676749,0x7e7b7b56,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x9b020202,
2653 0xbc242419,0xcc313122,0xcc313122,0xcc313122,0xcc313122,0xcc313122,0xcc313122,0xcc313122,0xcc313122,0xcc313122,0xcc313122,0xcc313122,0xcc313122,0xcc313122,
2654 0xcc313122,0xcc313122,0xc9343425,0xc33b3b2a,0xba494933,0xad5b5b3f,0x7b626245,0x2f29291d,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
2655 0x62000000,0x66000000,0x66000000,0x66000000,0x7113130d,0x9941412d,0xb354543b,0xb354543b,0xb354543b,0xb354543b,0xb354543b,0xb354543b,0xb354543b,0xb354543b,
2656 0xb354543b,0xb354543b,0xb354543b,0xb354543b,0xb354543b,0xb354543b,0xb157573d,0xad5d5d41,0xa4676748,0x735b5b40,0x3326261b,0x18000000,0x7000000,0xf000000,
2657 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x481e1e15,0x735b5b40,0x98747452,0x9e777754,0x9e777754,
2658 0x9e777754,0x9e777754,0x9e777754,0x9e777754,0x9e777754,0x9e777754,0x9e777754,0x9e777754,0x9e777754,0x9e777754,0x9d797955,0x7f70704e,0x5052523a,0x25000000,
2659 0x18000000,0xf000000
2660};
2661
2662static const QRgb Spreadsheet_data[] = {
2663 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
2664 0x1f000000,0x1f000000,0x20000000,0x20000000,0x20000000,0x20000000,0x20000000,0x20000000,0x20000000,0x20000000,0x20000000,0x20000000,0x1d000000,0x1b000000,
2665 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
2666 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3e000000,0x3f000000,0x3f000000,0x3f000000,0x3f000000,0x3f000000,0x3f000000,0x3f000000,0x3f000000,
2667 0x3f000000,0x3e000000,0x3c000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff09068a,0xff09068a,0xff09068a,0xff090689,
2668 0xff090689,0xff090689,0xff090689,0xff090689,0xff090689,0xff090689,0xff090689,0xff080688,0xff080688,0xff080688,0xff080687,0xff080687,0xff080686,0xff080686,
2669 0xff080686,0xff080686,0xff080686,0xff080686,0xff080687,0xff080687,0xff080688,0xff070686,0xff070682,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
2670 0xff09068a,0xffddffff,0xffdbfefd,0xffd9fcfa,0xffd2f8f3,0xffcef7ef,0xffcdf6ee,0xffcdf6ee,0xffccf6ee,0xffccf6ee,0xffcbf5ed,0xffc8f4ec,0xffc7f3eb,0xffc5f2ea,
2671 0xffc2f1e9,0xffbff0e8,0xffbceee7,0xffb9ede6,0xffb8ede6,0xffb7ede6,0xffb6ede6,0xffb5eee7,0xffb6f0e8,0xffb4f1e9,0xffb2efe7,0xffade7e0,0xff070575,0x5c000000,
2672 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff09068a,0xffdcfefe,0xffd9fcfa,0xffc9f3e9,0xffb1e5cf,0xffa3ddbf,0xff9fdbba,0xff9ddab9,0xff9ddab9,0xff9cd9b8,
2673 0xff9bd8b8,0xff99d7b7,0xff97d6b5,0xff95d4b4,0xff92d3b3,0xff90d1b2,0xff8ed1b1,0xff8cd0b0,0xff8bcfb0,0xff89cfb0,0xff88cfb0,0xff87d0b0,0xff87d1b2,0xff85ceaf,
2674 0xff82caab,0xff7fc4a6,0xff050458,0x75000000,0x4f000000,0x2e000000,0x1b000000,0x36000000,0xff09068a,0xffdcfffe,0xffd2f9f3,0xffb2e6cf,0xff7dc897,0xff5bb472,
2675 0xff52af68,0xff51ae67,0xff51ad67,0xff50ad66,0xff4fab65,0xff4dab65,0xff4da964,0xff4ba863,0xff4ba763,0xff49a562,0xff48a461,0xff46a361,0xff45a260,0xff45a260,
2676 0xff44a260,0xff44a260,0xff43a05f,0xff429d5d,0xff40995b,0xff3e9659,0xff02032f,0x88000000,0x5b000000,0x37000000,0x1d000000,0x3b000000,0xff09068a,0xffdbfefd,
2677 0xffcff7f0,0xffa2ddbe,0xff5db573,0xff86c28c,0xff63b06b,0xff63af6b,0xff62af6a,0xff61ad69,0xff61ad69,0xff60ab68,0xff60aa68,0xff5fa967,0xff5ea866,0xff5ea665,
2678 0xff5ca464,0xff5ca363,0xff5ba262,0xff5aa061,0xff5aa061,0xff5aa162,0xff5ba263,0xff5ca464,0xff5ea665,0xff5fa967,0xff040438,0x95000000,0x63000000,0x3c000000,
2679 0x1f000000,0x3d000000,0xff09068a,0xffdbfefd,0xffcdf6ee,0xff9fdbba,0xff52ae68,0xff63b06b,0xff158821,0xff158821,0xff158720,0xff158620,0xff158620,0xff148520,
2680 0xff148420,0xff148320,0xff14821f,0xff14811f,0xff147f1f,0xff137e1e,0xff137d1e,0xff137b1e,0xff137a1d,0xff137a1d,0xff137b1e,0xff137d1e,0xff147f1f,0xff14811f,
2681 0xff010311,0x9b000000,0x68000000,0x3e000000,0x1f000000,0x3d000000,0xff09068a,0xffdbfefd,0xffcdf6ee,0xff9edab9,0xff51ae67,0xff63af6b,0xff158721,0xff158720,
2682 0xff158620,0xff158620,0xff148520,0xff148520,0xff148420,0xff148420,0xff14831f,0xff14811f,0xff14801f,0xff137e1e,0xff137c1e,0xff137a1d,0xff12781d,0xff12781d,
2683 0xff12781d,0xff137a1d,0xff137d1e,0xff147f1f,0xff010311,0x9c000000,0x69000000,0x3f000000,0x1f000000,0x3d000000,0xff09068a,0xffdbfefd,0xffccf6ee,0xff9ddab9,
2684 0xff51ad67,0xff137e1f,0xff0b4411,0xff0b4411,0xff0b4311,0xff0b4311,0xff0b4311,0xff0b4311,0xff0b4310,0xff0b4310,0xff0b4210,0xff0a4210,0xff0a4110,0xff0a4010,
2685 0xff0a3f0f,0xff0a3d0f,0xff0a3c0f,0xff093c0f,0xff093c0f,0xff0a3c0f,0xff0a3d0f,0xff0a3f0f,0xff000209,0x9d000000,0x6a000000,0x3f000000,0x1f000000,0x3d000000,
2686 0xff09068a,0xffdafefd,0xffccf6ee,0xff9cd9b8,0xff50ad66,0xff4a4a4a,0xff616161,0xff6c6c6c,0xff6c6c6c,0xff6c6c6c,0xff6c6c6c,0xff6c6c6c,0xff6c6c6c,0xff6c6c6c,
2687 0xff6c6c6c,0xff6b6b6b,0xff6a6a6a,0xff686868,0xff656565,0xff636363,0xff616161,0xff5f5f5f,0xff5e5e5e,0xff5f5f5f,0xff616161,0xff636363,0xff040237,0x9e000000,
2688 0x6b000000,0x40000000,0x1f000000,0x3d000000,0xff09068a,0xffdafefd,0xffcbf5ed,0xff9cd8b8,0xff4fab65,0xff616161,0xffa6a6a6,0xffc8c8c8,0xffc9c9c9,0xffc9c9c9,
2689 0xffcacaca,0xffcbcbcb,0xffcbcbcb,0xffcbcbcb,0xffcacaca,0xff9a9a9a,0xffc7c7c7,0xffc3c3c3,0xffbfbfbf,0xff8f8f8f,0xffb4b4b4,0xffb0b0b0,0xffadadad,0xff858585,
2690 0xffafafaf,0xffb4b4b4,0xff070465,0xa0000000,0x6c000000,0x41000000,0x1f000000,0x3d000000,0xff09068a,0xffd8fdfc,0xffc9f4ec,0xff9ad7b6,0xff4eab65,0xff6c6c6c,
2691 0xffc8c8c8,0xfff8f8f8,0xfff9f9f9,0xfffafafa,0xfffbfbfb,0xfffcfcfc,0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xffc1c1c1,0xfff8f8f8,0xfff4f4f4,0xffeeeeee,0xffb2b2b2,
2692 0xffe0e0e0,0xffd9d9d9,0xffd5d5d5,0xffa3a3a3,0xffd6d6d6,0xffdbdbdb,0xff09057b,0xa1000000,0x6d000000,0x42000000,0x1f000000,0x3d000000,0xff090689,0xffd5fcfb,
2693 0xffc8f3eb,0xff97d6b5,0xff4da964,0xff6c6c6c,0xffc8c8c8,0xfff8f8f8,0xfff9f9f9,0xfffbfbfb,0xfffcfcfc,0xfffdfdfd,0xfffefefe,0xfffefefe,0xfffdfdfd,0xffc2c2c2,
2694 0xfffafafa,0xfff7f7f7,0xfff1f1f1,0xffb3b3b3,0xffe1e1e1,0xffd9d9d9,0xffd3d3d3,0xffa1a1a1,0xffd2d2d2,0xffd8d8d8,0xff090579,0xa2000000,0x6e000000,0x42000000,
2695 0x1f000000,0x3d000000,0xff080689,0xffd3fbfa,0xffc4f1e9,0xff96d4b4,0xff4ca863,0xff484848,0xff606060,0xff6c6c6c,0xff6c6c6c,0xff6d6d6d,0xff6e6e6e,0xff6f6f6f,
2696 0xff6f6f6f,0xff6f6f6f,0xff6f6f6f,0xff545454,0xff6d6d6d,0xff6c6c6c,0xff696969,0xff4e4e4e,0xff626262,0xff5e5e5e,0xff5b5b5b,0xff454545,0xff5b5b5b,0xff5d5d5d,
2697 0xff040234,0xa3000000,0x6f000000,0x44000000,0x1f000000,0x3e000000,0xff080689,0xffd2faf9,0xffc2efe7,0xff93d2b2,0xff4ba763,0xff5f5f5f,0xffa3a3a3,0xffc7c7c7,
2698 0xffc9c9c9,0xffcbcbcb,0xffcccccc,0xffcdcdcd,0xffcecece,0xffcecece,0xffcecece,0xff9d9d9d,0xffcbcbcb,0xffc8c8c8,0xffc3c3c3,0xff909090,0xffb5b5b5,0xffaeaeae,
2699 0xffa8a8a8,0xff7e7e7e,0xffa6a6a6,0xffaaaaaa,0xff070460,0xa3000000,0x70000000,0x44000000,0x20000000,0x3f000000,0xff080688,0xffcff9f8,0xffbfeee7,0xff90d1b2,
2700 0xff49a662,0xff696969,0xffc4c4c4,0xfff5f5f5,0xfff8f8f8,0xfffafafa,0xfffcfcfc,0xfffdfdfd,0xfffefefe,0xffffffff,0xfffefefe,0xffc2c2c2,0xfffbfbfb,0xfff7f7f7,
2701 0xfff0f0f0,0xffb2b2b2,0xffdedede,0xffd5d5d5,0xffcecece,0xff9b9b9b,0xffcccccc,0xffd2d2d2,0xff090577,0xa3000000,0x70000000,0x44000000,0x20000000,0x3f000000,
2702 0xff080688,0xffcbf7f6,0xffbbece5,0xff8dcfb0,0xff48a461,0xff686868,0xffc3c3c3,0xfff3f3f3,0xfff6f6f6,0xfff9f9f9,0xfffbfbfb,0xfffdfdfd,0xfffdfdfd,0xfffefefe,
2703 0xfffdfdfd,0xffc2c2c2,0xfff9f9f9,0xfff4f4f4,0xffededed,0xffb0b0b0,0xffdbdbdb,0xffd1d1d1,0xffcbcbcb,0xff9a9a9a,0xffcacaca,0xffd2d2d2,0xff090577,0xa3000000,
2704 0x6f000000,0x43000000,0x20000000,0x3f000000,0xff080687,0xffc9f6f5,0xffb9ebe4,0xff8cceaf,0xff46a260,0xff464646,0xff5c5c5c,0xff686868,0xff6a6a6a,0xff6b6b6b,
2705 0xff6c6c6c,0xff6d6d6d,0xff6d6d6d,0xff6d6d6d,0xff6d6d6d,0xff535353,0xff6b6b6b,0xff686868,0xff656565,0xff4a4a4a,0xff5d5d5d,0xff595959,0xff575757,0xff424242,
2706 0xff585858,0xff5b5b5b,0xff040234,0xa3000000,0x6f000000,0x43000000,0x20000000,0x3f000000,0xff080687,0xffc7f6f5,0xffb6eae3,0xff89ccad,0xff45a15f,0xff5b5b5b,
2707 0xff9c9c9c,0xffbfbfbf,0xffc0c0c0,0xffc3c3c3,0xffc5c5c5,0xffc7c7c7,0xffc8c8c8,0xffc8c8c8,0xffc8c8c8,0xff979797,0xffc2c2c2,0xffbdbdbd,0xffb7b7b7,0xff868686,
2708 0xffa8a8a8,0xffa2a2a2,0xff9f9f9f,0xff7a7a7a,0xffa4a4a4,0xffababab,0xff070461,0xa2000000,0x6e000000,0x42000000,0x20000000,0x3f000000,0xff080687,0xffc4f5f4,
2709 0xffb4e9e2,0xff86cbac,0xff44a05f,0xff656565,0xffbbbbbb,0xffe8e8e8,0xffe9e9e9,0xffececec,0xffeeeeee,0xfff1f1f1,0xfff2f2f2,0xfff2f2f2,0xfff0f0f0,0xffb6b6b6,
2710 0xffe8e8e8,0xffe2e2e2,0xffdadada,0xffa1a1a1,0xffcacaca,0xffc5c5c5,0xffc3c3c3,0xff989898,0xffcdcdcd,0xffd7d7d7,0xff09057a,0xa1000000,0x6d000000,0x42000000,
2711 0x20000000,0x3f000000,0xff080687,0xffc3f5f4,0xffb2e8e1,0xff85cbac,0xff429e5e,0xff646464,0xffb7b7b7,0xffe3e3e3,0xffe4e4e4,0xffe5e5e5,0xffe7e7e7,0xffe9e9e9,
2712 0xffeaeaea,0xffe9e9e9,0xffe8e8e8,0xffafafaf,0xffdfdfdf,0xffd9d9d9,0xffd2d2d2,0xff9c9c9c,0xffc5c5c5,0xffc2c2c2,0xffc3c3c3,0xff9a9a9a,0xffd1d1d1,0xffdbdbdb,
2713 0xff09057c,0x9f000000,0x6b000000,0x40000000,0x20000000,0x3f000000,0xff080687,0xffc2f5f4,0xffb1e9e2,0xff84cbac,0xff429e5e,0xff434343,0xff575757,0xff616161,
2714 0xff616161,0xff616161,0xff626262,0xff626262,0xff626262,0xff626262,0xff616161,0xff494949,0xff5d5d5d,0xff5b5b5b,0xff585858,0xff424242,0xff545454,0xff545454,
2715 0xff565656,0xff444444,0xff5d5d5d,0xff626262,0xff040237,0x9e000000,0x6a000000,0x3f000000,0x20000000,0x3f000000,0xff080688,0xffc1f6f5,0xffb0eae3,0xff84cbad,
2716 0xff419b5c,0xff585858,0xff959595,0xffb2b2b2,0xffb0b0b0,0xffafafaf,0xffafafaf,0xffafafaf,0xffaeaeae,0xffaeaeae,0xffacacac,0xff818181,0xffa6a6a6,0xffa2a2a2,
2717 0xff9f9f9f,0xff787878,0xff9d9d9d,0xff9e9e9e,0xffa4a4a4,0xff838383,0xffb2b2b2,0xffbababa,0xff080568,0x9d000000,0x69000000,0x3f000000,0x20000000,0x3f000000,
2718 0xff080688,0xffc1f7f6,0xffb1ece5,0xff81c8aa,0xff40985a,0xff646464,0xffb5b5b5,0xffdcdcdc,0xffd9d9d9,0xffd7d7d7,0xffd5d5d5,0xffd4d4d4,0xffd2d2d2,0xffd0d0d0,
2719 0xffcecece,0xff9c9c9c,0xffc8c8c8,0xffc5c5c5,0xffc3c3c3,0xff969696,0xffc6c6c6,0xffcacaca,0xffd1d1d1,0xffa8a8a8,0xffe3e3e3,0xffebebeb,0xff0a0684,0x9c000000,
2720 0x68000000,0x3e000000,0x20000000,0x3e000000,0xff080688,0xffc0f9f8,0xffade8e1,0xff7fc5a7,0xff3e9559,0xff656565,0xffb7b7b7,0xffdedede,0xffdadada,0xffd6d6d6,
2721 0xffd3d3d3,0xffd1d1d1,0xffcecece,0xffcccccc,0xffcacaca,0xff9a9a9a,0xffc6c6c6,0xffc5c5c5,0xffc6c6c6,0xff9a9a9a,0xffcccccc,0xffd3d3d3,0xffdadada,0xffaeaeae,
2722 0xffeaeaea,0xfff1f1f1,0xff0a0686,0x9b000000,0x67000000,0x3e000000,0x1d000000,0x3c000000,0xff080689,0xffbef7f6,0xffaae4dd,0xff7cc1a4,0xff3d9157,0xff464646,
2723 0xff5a5a5a,0xff636363,0xff616161,0xff5e5e5e,0xff5d5d5d,0xff5b5b5b,0xff5b5b5b,0xff5a5a5a,0xff595959,0xff434343,0xff585858,0xff585858,0xff595959,0xff464646,
2724 0xff5d5d5d,0xff606060,0xff636363,0xff4e4e4e,0xff686868,0xff6b6b6b,0xff04033b,0x94000000,0x63000000,0x3b000000,0x1b000000,0x36000000,0xff080687,0xffb9efee,
2725 0xffa6ded8,0xff7cbea3,0xff43935d,0xff5e5e5e,0xff9e9e9e,0xffbbbbbb,0xffb8b8b8,0xffb4b4b4,0xffb1b1b1,0xffaeaeae,0xffacacac,0xffaaaaaa,0xffaaaaaa,0xff828282,
2726 0xffaaaaaa,0xffababab,0xffaeaeae,0xff888888,0xffb5b5b5,0xffbababa,0xffbebebe,0xff959595,0xffc7c7c7,0xffcacaca,0xff08056e,0x87000000,0x5a000000,0x36000000,
2727 0x17000000,0x2e000000,0xff070684,0xff07057e,0xff060573,0xff05055d,0xff030441,0xff04033a,0xff08056a,0xff090681,0xff09067f,0xff09057d,0xff09057b,0xff090579,
2728 0xff090578,0xff090577,0xff090577,0xff07045b,0xff090578,0xff090578,0xff09057a,0xff07045f,0xff09067f,0xff090681,0xff0a0684,0xff070467,0xff0a0687,0xff0a0688,
2729 0xff0a0689,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x75000000,0x88000000,0x95000000,0x9b000000,0x9c000000,0x9d000000,
2730 0x9e000000,0xa0000000,0xa1000000,0xa2000000,0xa3000000,0xa3000000,0xa3000000,0xa3000000,0xa3000000,0xa2000000,0xa1000000,0x9f000000,0x9e000000,0x9d000000,
2731 0x9c000000,0x9b000000,0x94000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4e000000,0x5b000000,
2732 0x63000000,0x68000000,0x69000000,0x6a000000,0x6b000000,0x6c000000,0x6d000000,0x6e000000,0x6f000000,0x70000000,0x70000000,0x6f000000,0x6f000000,0x6e000000,
2733 0x6d000000,0x6b000000,0x6a000000,0x69000000,0x68000000,0x67000000,0x63000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
2734 0x18000000,0x25000000,0x2e000000,0x37000000,0x3c000000,0x3e000000,0x3f000000,0x3f000000,0x40000000,0x41000000,0x42000000,0x42000000,0x44000000,0x44000000,
2735 0x44000000,0x43000000,0x43000000,0x42000000,0x42000000,0x40000000,0x3f000000,0x3f000000,0x3e000000,0x3e000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
2736 0x18000000,0xf000000
2737};
2738
2739static const QRgb SystemInfo_data[] = {
2740 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3000000,0x6000000,0xb000000,0x12000000,0x19000000,0x21000000,0x29000000,0x2f000000,
2741 0x34000000,0x37000000,0x39040404,0x38050505,0x35050505,0x30050505,0x2a060606,0x22080808,0x1a0a0a0a,0x130d0d0d,0xc151515,0x7242424,0x3000000,0x1000000,
2742 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,
2743 0x5d406844,0x93548a59,0xbe5b9b62,0xde5fa566,0xf35fab67,0xfe5eac66,0xf354a55c,0xe04b9b53,0xc5408a48,0xa033743a,0x72224f27,0x410c0c0c,0x350e0e0e,0x280d0d0d,
2744 0x1d121212,0x120e0e0e,0xb171717,0x5000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,
2745 0x16000000,0x23000000,0x6f507d54,0xba64a06a,0xf7639d6b,0xff50825a,0xff3f684a,0xff30523c,0xff254131,0xff1e3529,0xff1e3829,0xff23422c,0xff265231,0xff2c6736,
2746 0xf933803d,0xc72f7e36,0x8a205826,0x49111111,0x36131313,0x26141414,0x18151515,0xe121212,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,
2747 0x2000000,0x7000000,0xe000000,0x1a000000,0x473c5c3f,0xa7659b6a,0xf863976b,0xff497354,0xff335240,0xff2e4a3a,0xff2d493a,0xff2b4837,0xff284533,0xff23402f,
2748 0xff203b2b,0xff1b3626,0xff183023,0xff162a1f,0xff15291d,0xff1d4b27,0xfa246e2e,0xbe22702a,0x6f163919,0x42131313,0x2d111111,0x1c121212,0xf111111,0x7000000,
2749 0x2000000,0x1000000,0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x5f4e7752,0xcb679c6f,0xff54805f,0xff395946,0xff375643,0xff375743,0xff365742,
2750 0xff355541,0xff31543d,0xff2e503a,0xff2b4b37,0xff264630,0xff21402c,0xff1d3828,0xff193223,0xff172c1e,0xff14251b,0xff132619,0xff184f21,0xdc1a6b25,0x8917471c,
2751 0x4a151515,0x31151515,0x1d121212,0xf111111,0x7242424,0x2000000,0x1000000,0x5000000,0xd000000,0x1a000000,0x5f4e7752,0xd866986e,0xff4c7457,0xff3a5947,
2752 0xff3d5e49,0xff3e604a,0xff3e634b,0xff3e6249,0xff3b6247,0xff385f44,0xff355b3f,0xff305539,0xff2a4e34,0xff27482f,0xff214029,0xff1d3925,0xff1c3323,0xff182d1f,
2753 0xff16271b,0xff132018,0xff163b1c,0xe6196122,0x8e17441c,0x4d171717,0x31151515,0x1d1a1a1a,0xe121212,0x62b2b2b,0x3000000,0xa000000,0x16000000,0x473c5c3f,
2754 0xcb679d6f,0xff4d7658,0xff3d5e4a,0xff41634d,0xff43684f,0xff476e52,0xff456f51,0xff466f50,0xff436e4e,0xff3f6a4a,0xff396343,0xff325c3c,0xff3a5f43,0xff8a9e8f,
2755 0xff7a8f7f,0xff1f3e26,0xff1d3924,0xff1c3523,0xff1a2e20,0xff19281e,0xff16201a,0xff18381d,0xe01c6225,0x8019331b,0x4a151515,0x2d171717,0x18151515,0xb171717,
2756 0x6000000,0x11000000,0x23000000,0xa7659b6a,0xff568461,0xff3e5e4a,0xff43664f,0xff476d53,0xff4b7456,0xff4d7857,0xff4e7b59,0xff4d7c56,0xff497853,0xff44744e,
2757 0xff3c6b47,0xff35623e,0xffd6dfd8,0xffffffff,0xffffffff,0xff788c7b,0xff1d3c23,0xff1d3a24,0xff1e3524,0xff1f2f23,0xff1c2820,0xff181f1c,0xff1a4621,0xcb1d5d24,
2758 0x66171717,0x43171717,0x26141414,0x120e0e0e,0xb000000,0x1b000000,0x6f507d54,0xf8659a6c,0xff40624b,0xff41664d,0xff476f53,0xff4d7858,0xff527f5c,0xff55855f,
2759 0xff55875f,0xff54875d,0xff4f8459,0xff487e53,0xff3f7349,0xff35663e,0xfff1f4f2,0xffffffff,0xffffffff,0xff778d7b,0xff1d3f23,0xff1f3c24,0xff213b27,0xff223627,
2760 0xff222f26,0xff1e2621,0xff19211c,0xfb1d5a24,0xa71b421f,0x5a171717,0x37171717,0x1d121212,0x12000000,0x26000000,0xba64a06a,0xff4f7d59,0xff40624b,0xff466d51,
2761 0xff4d7858,0xff52815c,0xff588a62,0xff5a8e63,0xff5b9264,0xff599161,0xff538e5d,0xff4a8553,0xff3f7a49,0xff346b3e,0xff709376,0xffc3d0c5,0xff849b88,0xff1a4220,
2762 0xff1b4120,0xff1f3e24,0xff233c28,0xff253a2b,0xff26332a,0xff232c26,0xff1d2120,0xff1c3c22,0xda1f5b26,0x72191919,0x49151515,0x29131313,0x19000000,0x5d406844,
2763 0xf766a16d,0xff3d624a,0xff41674c,0xff497454,0xff4f7e59,0xff578861,0xff5c9164,0xff5f9868,0xff5e9b67,0xff5c9b65,0xff55975f,0xff4b8d54,0xff3e7f47,0xff326e3b,
2764 0xff27602f,0xff1e5226,0xff184820,0xff16421d,0xff1a4121,0xff1e4024,0xff233e28,0xff263b2c,0xff2a382e,0xff27302a,0xff222725,0xff1c231f,0xfb1f5c26,0xa01a341c,
2765 0x5b161616,0x36131313,0x21000000,0x93548a59,0xff568c5f,0xff3a5e46,0xff426a4d,0xff497654,0xff52825c,0xff578e61,0xff5e9767,0xff609f67,0xff60a369,0xff5ca265,
2766 0xff559d5d,0xff499151,0xff3a8044,0xff2d7036,0xff215f2b,0xff185222,0xff14481a,0xff13421a,0xff18401e,0xff1e3f23,0xff243f28,0xff273d2d,0xff2c3b30,0xff2b352e,
2767 0xff272d2a,0xff212323,0xff1f4825,0xc61d4822,0x6d171717,0x43131313,0x29000000,0xbe5b9b62,0xff487752,0xff3a6146,0xff416b4d,0xff497954,0xff50855a,0xff579160,
2768 0xff5c9a64,0xff5ea266,0xff5ea667,0xff5aa762,0xff509e59,0xff418f4b,0xff347d3c,0xff266d30,0xff387040,0xff407046,0xff104616,0xff134018,0xff163f1d,0xff1c3f23,
2769 0xff233e29,0xff293f2f,0xff2d3c31,0xff2d3730,0xff2a302d,0xff242727,0xff203825,0xe1205326,0x7b191919,0x4e141414,0x2f000000,0xde5fa566,0xff3d6747,0xff396043,
2770 0xff406d4a,0xff487951,0xff4f8459,0xff54915d,0xff579860,0xff59a160,0xff58a561,0xff54a85c,0xff469a50,0xff3b8b43,0xff529159,0xffc2d6c5,0xffffffff,0xffffffff,
2771 0xff4e7453,0xff0f3c14,0xff143b19,0xff1a3b20,0xff213c27,0xff293e2e,0xff2e3d33,0xff303933,0xff2e3331,0xff272a2a,0xff212e24,0xf0215a27,0x881a1a1a,0x58141414,
2772 0x34000000,0xf35fab67,0xff335a3e,0xff355f41,0xff3c6a47,0xff44764e,0xff4a8353,0xff4d8c56,0xff50955a,0xff509b59,0xff4d9d56,0xff469c50,0xff3c9044,0xff55985d,
2773 0xffc3d7c5,0xffe1eae2,0xffffffff,0xffffffff,0xff395e3f,0xff0d3614,0xff133617,0xff19381e,0xff213b26,0xff2a3d2f,0xff2f3d33,0xff333b35,0xff303532,0xff2a2d2d,
2774 0xff222624,0xfa235f29,0x901b1b1b,0x5f181818,0x37000000,0xfe5eac66,0xff2d5137,0xff325c3d,0xff3a6843,0xff3f7249,0xff437c4d,0xff478550,0xff478d50,0xff479250,
2775 0xff43944b,0xff398f43,0xff499452,0xffc3d9c6,0xff256b2c,0xffd0ddd2,0xffffffff,0xffdfe5e0,0xff0a3310,0xff0d3112,0xff113216,0xff19351e,0xff223927,0xff2b3c2f,
2776 0xff313d34,0xff353c37,0xff323634,0xff2c2e2e,0xff232426,0xfe25602b,0x951b1b1b,0x64171717,0x39040404,0xf354a55c,0xff2c5336,0xff2e5739,0xff35633d,0xff396c43,
2777 0xff3d7646,0xff3e7e48,0xff3f8448,0xff3b8745,0xff37863f,0xff2d8138,0xff24772c,0xff26712f,0xff2b6933,0xffffffff,0xffffffff,0xff8d9f8f,0xff092d0e,0xff0d2d11,
2778 0xff133017,0xff1a341e,0xff233827,0xff2d3c30,0xff333d36,0xff373d39,0xff343736,0xff2d2f2f,0xff242826,0xfb245a29,0x971b1b1b,0x65171717,0x38050505,0xe04b9b53,
2779 0xff2d5b37,0xff2a5334,0xff2f5d39,0xff34663d,0xff366e3f,0xff377541,0xff367a3e,0xff327b3c,0xff2c7a36,0xff22742d,0xff1a6a22,0xff0f5a18,0xff7c9d80,0xffffffff,
2780 0xffffffff,0xff36533b,0xff0a2a0f,0xff0e2b12,0xff152e18,0xff1c3320,0xff26382a,0xff303d33,0xff363e38,0xff373c39,0xff363837,0xff2d2e2f,0xff263028,0xf3225227,
2781 0x951a1a1a,0x63151515,0x35050505,0xc5408a48,0xff2f6539,0xff254d2f,0xff2a5733,0xff2d5f37,0xff316639,0xff306c3a,0xff2f6f37,0xff297033,0xff246f2d,0xff1b6924,
2782 0xff145d1c,0xff104e18,0xffd0dad2,0xffffffff,0xffdfe4e0,0xff0a270e,0xff0b2710,0xff112a14,0xff192f1c,0xff213525,0xff2b3a2e,0xff343e37,0xff39403b,0xff3a3e3c,
2783 0xff353737,0xff2d2e2f,0xff253828,0xe7214725,0x901b1b1b,0x5e161616,0x30050505,0xa033743a,0xff31743b,0xff1f4629,0xff25502e,0xff285731,0xff2a5f33,0xff2b6333,
2784 0xff296732,0xff25662d,0xff1e6427,0xff185e22,0xff15521d,0xff2f5c34,0xffffffff,0xffffffff,0xff7b8a7d,0xff0d260f,0xff0f2713,0xff152b18,0xff1e3020,0xff27372a,
2785 0xff303c33,0xff38403a,0xff3b413d,0xff3b3e3c,0xff343636,0xff2b2b2d,0xff254129,0xd51f3b22,0x87191919,0x58141414,0x2a060606,0x72224f27,0xf935853f,0xff1d4526,
2786 0xff204929,0xff25502d,0xff26572f,0xff275d2f,0xff265f2d,0xff225e2a,0xff215c29,0xff1c5625,0xff184b1f,0xff7f9783,0xffffffff,0xffffffff,0xff3b503f,0xff3d5040,
2787 0xff637065,0xff1b2f1f,0xff243528,0xff2d3b30,0xff373f39,0xff3c423e,0xff3d413f,0xff3a3c3b,0xff323334,0xff292b2b,0xfd254a29,0xbb1d2c1e,0x7b191919,0x4e141414,
2788 0x22080808,0x410c0c0c,0xc72f7e36,0xff235b2c,0xff1c4124,0xff1f4927,0xff234f2a,0xff24542c,0xff25582c,0xff25592c,0xff24562a,0xff215027,0xff1d4623,0xffd3dad4,
2789 0xffffffff,0xffffffff,0xff707d72,0xffc0c5c1,0xff2a3a2d,0xff233126,0xff2b382f,0xff343e37,0xff3b413c,0xff3e4340,0xff3d403e,0xff373939,0xff2e2e30,0xff27382a,
2790 0xe9224326,0x9a1a1a1a,0x6c151515,0x420f0f0f,0x1a0a0a0a,0x350e0e0e,0x8a205826,0xfa267431,0xff173d20,0xff1b4022,0xff1f4726,0xff234d2a,0xff27522d,0xff28522e,
2791 0xff29522e,0xff254c2b,0xff214426,0xffffffff,0xffffffff,0xfff0f1f0,0xff959d96,0xff2b3a2e,0xff233126,0xff2a372e,0xff333d36,0xff3a413c,0xff3e433f,0xff3f4340,
2792 0xff393b3b,0xff333435,0xff2a2c2c,0xfd254529,0xc81f3120,0x87191919,0x5b141414,0x350e0e0e,0x130d0d0d,0x280d0d0d,0x480e0e0e,0xbe22702a,0xff1b5b24,0xff17361d,
2793 0xff1c3d22,0xff224528,0xff264a2c,0xff2a4c2f,0xff2a4c30,0xff2a4a2f,0xff27442c,0xff4e6250,0xff5e6c60,0xff213224,0xff223125,0xff263429,0xff2b372e,0xff323c35,
2794 0xff39403b,0xff3d433f,0xff3e413f,0xff3c3d3d,0xff343536,0xff2c2c2e,0xff263b2a,0xe2213f24,0x9b1c1c1c,0x72161616,0x49111111,0x280d0d0d,0xc151515,0x1d121212,
2795 0x36131313,0x70173a1b,0xdc1b6d26,0xff18491f,0xff19331e,0xff1f3a25,0xff24402a,0xff28442d,0xff2b4530,0xff2c442f,0xff2b4230,0xff2a3e2d,0xff293a2c,0xff29372c,
2796 0xff2a372d,0xff2e3831,0xff333b35,0xff383e3a,0xff3b413d,0xff3c403e,0xff3a3c3b,0xff353737,0xff2e2e30,0xff28352a,0xf1244328,0xb41e281f,0x81181818,0x5a141414,
2797 0x350e0e0e,0x1c090909,0x7242424,0x120e0e0e,0x26141414,0x42131313,0x8917471c,0xe61a6323,0xff19451f,0xff1b3020,0xff203625,0xff243b2a,0xff293e2e,0xff2b3e30,
2798 0xff2d3f31,0xff2e3d31,0xff2e3c32,0xff2f3b33,0xff313b34,0xff343b35,0xff373d39,0xff383d3a,0xff393d3a,0xff373938,0xff333535,0xff2c2c2e,0xff28352a,0xf4234027,
2799 0xc21f2e20,0x8c1a1a1a,0x65141414,0x42131313,0x250e0e0e,0x120e0e0e,0x3000000,0xb171717,0x18151515,0x2d111111,0x4a151515,0x8e17441c,0xe01d6425,0xff1b4e22,
2800 0xff1b2f1f,0xff1f3023,0xff243428,0xff29372c,0xff2b382e,0xff2d3a31,0xff2f3931,0xff303833,0xff323834,0xff333935,0xff343936,0xff343735,0xff323434,0xff2e2f30,
2801 0xff2a2c2c,0xff263b2a,0xf1244328,0xc21f2e20,0x8f1b1b1b,0x6b151515,0x4a111111,0x2d111111,0x170b0b0b,0xa000000,0x1000000,0x5000000,0xe121212,0x1c121212,
2802 0x31151515,0x4d171717,0x8019331b,0xcb1d5d24,0xfb1e5c26,0xff1d4324,0xff1e2d21,0xff222c25,0xff262f29,0xff28302a,0xff2b322d,0xff2c322e,0xff2d322f,0xff2d302e,
2803 0xff2d2f2e,0xff2b2d2d,0xff292c2b,0xff27382a,0xfd254529,0xe2213f24,0xb41e281f,0x8c1a1a1a,0x6b151515,0x4c111111,0x30101010,0x1b090909,0xd000000,0x5000000,
2804 0xffffff,0x2000000,0x6000000,0xf111111,0x1d121212,0x31151515,0x4a151515,0x66171717,0xa71b421f,0xda1f5b26,0xfb205d27,0xff204c26,0xff213d26,0xff223225,
2805 0xff232b25,0xff242826,0xff252b26,0xff263229,0xff253829,0xff26422a,0xfd254a29,0xe9224326,0xc81f3120,0x9b1c1c1c,0x81181818,0x65141414,0x4a111111,0x30101010,
2806 0x1c090909,0xe000000,0x6000000,0x2000000,0xffffff,0x1000000,0x2000000,0x7000000,0x10202020,0x1d1a1a1a,0x2d171717,0x43171717,0x5a171717,0x72191919,
2807 0xa01a341c,0xc61d4822,0xe1205326,0xf0215a27,0xfa235f29,0xfe25602b,0xfb245a29,0xf3225227,0xe7214725,0xd51f3b22,0xbb1d2c1e,0x9a1a1a1a,0x87191919,0x72161616,
2808 0x5a141414,0x42131313,0x2d111111,0x1b090909,0xe000000,0x7000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,0x2000000,0x7242424,0xe121212,
2809 0x18151515,0x26141414,0x37171717,0x49151515,0x5b161616,0x6d171717,0x7b191919,0x881a1a1a,0x901b1b1b,0x951b1b1b,0x971b1b1b,0x951a1a1a,0x901b1b1b,0x87191919,
2810 0x7b191919,0x6c151515,0x5b141414,0x49111111,0x350e0e0e,0x250e0e0e,0x170b0b0b,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,
2811 0xffffff,0x1000000,0x2000000,0x62b2b2b,0xb171717,0x120e0e0e,0x1d121212,0x29131313,0x36131313,0x43131313,0x4e141414,0x58141414,0x5f181818,0x64171717,
2812 0x65171717,0x63151515,0x5e161616,0x58141414,0x4e141414,0x420f0f0f,0x350e0e0e,0x280d0d0d,0x1c090909,0x120e0e0e,0xa000000,0x5000000,0x2000000,0x1000000,
2813 0xffffff,0xffffff
2814};
2815
2816static const QRgb Terminal_data[] = {
2817 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
2818 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
2819 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
2820 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
2821 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff050343,0xff050343,0xff050344,0xff050344,
2822 0xff050344,0xff050344,0xff050344,0xff050344,0xff050343,0xff050342,0xff050340,0xff04033e,0xff04033c,0xff040239,0xff040236,0xff040233,0xff03022f,0xff03022b,
2823 0xff030228,0xff030225,0xff030223,0xff020120,0xff02011c,0xff020119,0xff020116,0xff010113,0xff010112,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
2824 0xff050343,0xff7e7e7e,0xff7e7e7e,0xff7f7f7f,0xff7f7f7f,0xff7f7f7f,0xff7e7e7e,0xff7e7e7e,0xff7c7c7c,0xff7a7a7a,0xff767676,0xff717171,0xff6c6c6c,0xff676767,
2825 0xff606060,0xff5a5a5a,0xff525252,0xff4b4b4b,0xff444444,0xff3f3f3f,0xff393939,0xff333333,0xff2e2e2e,0xff272727,0xff232323,0xff222222,0xff010112,0x5c000000,
2826 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff050344,0xff7e7e7e,0xff7f7f7f,0xff7f7f7f,0xff7e7e7e,0xff7e7e7e,0xff7d7d7d,0xff7b7b7b,0xff7c7c7c,0xff797979,
2827 0xff757575,0xff707070,0xff6a6a6a,0xff636363,0xff5d5d5d,0xff565656,0xff4d4d4d,0xff454545,0xff3f3f3f,0xff393939,0xff333333,0xff2d2d2d,0xff272727,0xff232323,
2828 0xff222222,0xff212121,0xff010111,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff050344,0xff7f7f7f,0xff7e7e7e,0xff7d7d7d,0xff7b7b7b,0xff787878,
2829 0xff787878,0xff777777,0xff797979,0xff787878,0xff747474,0xff6d6d6d,0xff686868,0xff606060,0xff5a5a5a,0xff515151,0xff494949,0xff404040,0xff393939,0xff333333,
2830 0xff2d2d2d,0xff272727,0xff232323,0xff222222,0xff212121,0xff202020,0xff010110,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff050344,0xff7f7f7f,
2831 0xff7c7c7c,0xff787878,0xff727272,0xff6d6d6d,0xff6a6a6a,0xff6e6e6e,0xff717171,0xff737373,0xff707070,0xff6c6c6c,0xff656565,0xff5e5e5e,0xff565656,0xff4d4d4d,
2832 0xff444444,0xff3b3b3b,0xff333333,0xff2d2d2d,0xff272727,0xff232323,0xff222222,0xff212121,0xff202020,0xff1e1e1e,0xff010110,0x93000000,0x62000000,0x3b000000,
2833 0x1f000000,0x3d000000,0xff050344,0xff7e7e7e,0xff7a7a7a,0xff717171,0xff666666,0xff52864b,0xff4b9b40,0xff5d5d5d,0xff656565,0xff6a6a6a,0xff6c6c6c,0xff696969,
2834 0xff626262,0xff5a5a5a,0xff525252,0xff494949,0xff404040,0xff363636,0xff2d2d2d,0xff272727,0xff232323,0xff222222,0xff212121,0xff202020,0xff1f1f1f,0xff1e1e1e,
2835 0xff01010f,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff050344,0xff7d7d7d,0xff777777,0xff6b6b6b,0xff51844a,0xff37f91c,0xff36ff1a,0xff419236,
2836 0xff545454,0xff5f5f5f,0xff636363,0xff636363,0xff5e5e5e,0xff585858,0xff4e4e4e,0xff454545,0xff3b3b3b,0xff313131,0xff272727,0xff232323,0xff222222,0xff212121,
2837 0xff202020,0xff1f1f1f,0xff1e1e1e,0xff1c1c1c,0xff01010f,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff050344,0xff7c7c7c,0xff747474,0xff686868,
2838 0xff40c82e,0xff36ff1a,0xff36ff1a,0xff36ff1a,0xff3d8d31,0xff4e4e4e,0xff565656,0xff5b5b5b,0xff5a5a5a,0xff525252,0xff4b4b4b,0xff404040,0xff363636,0xff2c2c2c,
2839 0xff242424,0xff232323,0xff212121,0xff202020,0xff1f1f1f,0xff1e1e1e,0xff1d1d1d,0xff1b1b1b,0xff01010e,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
2840 0xff050343,0xff7b7b7b,0xff767676,0xff6b6b6b,0xff585c58,0xff3ac926,0xff36ff1a,0xff36ff1a,0xff36ff1a,0xff3a8b2f,0xff474747,0xff4e4e4e,0xff505050,0xff4d4d4d,
2841 0xff454545,0xff3c3c3c,0xff313131,0xff252525,0xff232323,0xff212121,0xff202020,0xff1f1f1f,0xff1e1e1e,0xff1d1d1d,0xff1c1c1c,0xff1b1b1b,0xff01010e,0x99000000,
2842 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff050342,0xff797979,0xff757575,0xff6e6e6e,0xff5f5f5f,0xff4d504c,0xff38c624,0xff36ff1a,0xff36ff1a,0xff36ff1a,
2843 0xff37872b,0xff3e3e3e,0xff444444,0xff444444,0xff3e3e3e,0xff333333,0xff2a2a2a,0xff232323,0xff212121,0xff202020,0xff1f1f1f,0xff1e1e1e,0xff1d1d1d,0xff1c1c1c,
2844 0xff1b1b1b,0xff191919,0xff01010d,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff050340,0xff767676,0xff737373,0xff6f6f6f,0xff646464,0xff575757,
2845 0xff454944,0xff35c422,0xff36ff1a,0xff36ff1a,0xff36ff1a,0xff318125,0xff343434,0xff363636,0xff333333,0xff2b2b2b,0xff232323,0xff212121,0xff202020,0xff1f1f1f,
2846 0xff1e1e1e,0xff1d1d1d,0xff1b1b1b,0xff1a1a1a,0xff191919,0xff181818,0xff01010c,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff04033e,0xff717171,
2847 0xff707070,0xff6b6b6b,0xff666666,0xff5d5d5d,0xff4e4e4e,0xff3c403b,0xff33c11f,0xff36ff1a,0xff36ff1a,0xff36ff1a,0xff2d7d22,0xff2b2b2b,0xff292929,0xff232323,
2848 0xff222222,0xff202020,0xff1e1e1e,0xff1d1d1d,0xff1c1c1c,0xff1b1b1b,0xff1a1a1a,0xff191919,0xff181818,0xff171717,0xff01010c,0x99000000,0x66000000,0x3d000000,
2849 0x1f000000,0x3d000000,0xff04033c,0xff6c6c6c,0xff6a6a6a,0xff686868,0xff636363,0xff5b5b5b,0xff4e4e4e,0xff3e3e3e,0xff2a2e2a,0xff2fc41a,0xff36ff1a,0xff36ff1a,
2850 0xff36ff1a,0xff28751e,0xff1f1f1f,0xff202020,0xff202020,0xff1e1e1e,0xff1d1d1d,0xff1c1c1c,0xff1b1b1b,0xff1a1a1a,0xff191919,0xff181818,0xff171717,0xff161616,
2851 0xff01000b,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff040239,0xff676767,0xff636363,0xff606060,0xff5c5c5c,0xff535353,0xff484848,0xff363636,
2852 0xff283e25,0xff32df1a,0xff36ff1a,0xff36ff1a,0xff35f41a,0xff1f401a,0xff1d1d1d,0xff1e1e1e,0xff1e1e1e,0xff1d1d1d,0xff1b1b1b,0xff1a1a1a,0xff191919,0xff181818,
2853 0xff181818,0xff161616,0xff161616,0xff151515,0xff01000b,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff040236,0xff606060,0xff5d5d5d,0xff585858,
2854 0xff515151,0xff464646,0xff393939,0xff2c4229,0xff33de1b,0xff36ff1a,0xff36ff1a,0xff35fa1a,0xff216717,0xff1a1a1a,0xff1c1c1c,0xff1e1e1e,0xff1d1d1d,0xff1b1b1b,
2855 0xff1a1a1a,0xff191919,0xff181818,0xff171717,0xff161616,0xff151515,0xff151515,0xff141414,0xff01000a,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
2856 0xff040233,0xff5a5a5a,0xff545454,0xff4c4c4c,0xff424242,0xff373737,0xff2b4128,0xff33de1b,0xff36ff1a,0xff36ff1a,0xff34f21a,0xff1c4816,0xff181818,0xff1b1b1b,
2857 0xff1d1d1d,0xff1c1c1c,0xff1a1a1a,0xff181818,0xff171717,0xff161616,0xff161616,0xff151515,0xff141414,0xff141414,0xff131313,0xff131313,0xff01000a,0x99000000,
2858 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff03022f,0xff515151,0xff4b4b4b,0xff414141,0xff343434,0xff2a4026,0xff32de1a,0xff36ff1a,0xff36ff1a,0xff34f21a,
2859 0xff1b4815,0xff181818,0xff1b1b1b,0xff1b1b1b,0xff1b1b1b,0xff191919,0xff161616,0xff151515,0xff131313,0xff121212,0xff121212,0xff121212,0xff121212,0xff121212,
2860 0xff121212,0xff121212,0xff01000a,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff03022b,0xff4a4a4a,0xff404040,0xff363636,0xff2a4027,0xff32de1a,
2861 0xff36ff1a,0xff36ff1a,0xff34f21a,0xff1b4815,0xff181818,0xff1b1b1b,0xff1c1c1c,0xff1b1b1b,0xff191919,0xff151515,0xff131313,0xff101010,0xff0e0e0e,0xff0e0e0e,
2862 0xff0d0d0d,0xff0d0d0d,0xff0f0f0f,0xff0f0f0f,0xff101010,0xff101010,0xff010009,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff030228,0xff434343,
2863 0xff3a3a3a,0xff2e352d,0xff33db1b,0xff36ff1a,0xff36ff1a,0xff34f21a,0xff1b4815,0xff181818,0xff1b1b1b,0xff1c1c1c,0xff1c1c1c,0xff191919,0xff171717,0xff1a4614,
2864 0xff2ecf18,0xff2ece17,0xff2dce17,0xff2dce17,0xff2dce17,0xff2dce17,0xff2dce17,0xff1a5411,0xff101010,0xff101010,0xff010009,0x99000000,0x66000000,0x3d000000,
2865 0x1f000000,0x3d000000,0xff030225,0xff3e3e3e,0xff353535,0xff2a2a2a,0xff28711e,0xff35fa1a,0xff34f21a,0xff1d4917,0xff181818,0xff1b1b1b,0xff1d1d1d,0xff1c1c1c,
2866 0xff1c1c1c,0xff181818,0xff151515,0xff1b5213,0xff36ff1a,0xff36ff1a,0xff36ff1a,0xff36ff1a,0xff36ff1a,0xff36ff1a,0xff36ff1a,0xff1c6512,0xff0e0e0e,0xff101010,
2867 0xff010009,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff030223,0xff383838,0xff303030,0xff282828,0xff1f1f1f,0xff246e1a,0xff1f4c19,0xff1a1a1a,
2868 0xff1b1b1b,0xff1d1d1d,0xff1d1d1d,0xff1c1c1c,0xff1b1b1b,0xff181818,0xff151515,0xff1b5213,0xff36ff1a,0xff36ff1a,0xff36ff1a,0xff36ff1a,0xff36ff1a,0xff36ff1a,
2869 0xff36ff1a,0xff1c6512,0xff0e0e0e,0xff101010,0xff010009,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff020120,0xff333333,0xff2c2c2c,0xff252525,
2870 0xff1f1f1f,0xff1d1d1d,0xff1d1d1d,0xff1d1d1d,0xff1d1d1d,0xff1d1d1d,0xff1d1d1d,0xff1b1b1b,0xff1a1a1a,0xff171717,0xff151515,0xff141f12,0xff173f11,0xff143d0f,
2871 0xff143d0f,0xff143c0e,0xff143c0e,0xff143d0f,0xff153d10,0xff11200f,0xff0f0f0f,0xff101010,0xff010009,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
2872 0xff02011c,0xff2e2e2e,0xff272727,0xff222222,0xff212121,0xff1f1f1f,0xff1e1e1e,0xff1e1e1e,0xff1d1d1d,0xff1d1d1d,0xff1b1b1b,0xff1a1a1a,0xff191919,0xff171717,
2873 0xff151515,0xff131313,0xff111111,0xff0f0f0f,0xff0e0e0e,0xff0e0e0e,0xff0e0e0e,0xff0f0f0f,0xff0f0f0f,0xff0f0f0f,0xff101010,0xff111111,0xff010009,0x99000000,
2874 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff020119,0xff272727,0xff232323,0xff222222,0xff212121,0xff202020,0xff1f1f1f,0xff1e1e1e,0xff1d1d1d,0xff1c1c1c,
2875 0xff1a1a1a,0xff191919,0xff181818,0xff161616,0xff151515,0xff131313,0xff121212,0xff111111,0xff111111,0xff101010,0xff111111,0xff101010,0xff101010,0xff101010,
2876 0xff111111,0xff111111,0xff010009,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff020116,0xff232323,0xff222222,0xff212121,0xff202020,0xff1f1f1f,
2877 0xff1e1e1e,0xff1d1d1d,0xff1c1c1c,0xff1b1b1b,0xff191919,0xff181818,0xff171717,0xff161616,0xff151515,0xff141414,0xff131313,0xff121212,0xff121212,0xff111111,
2878 0xff111111,0xff111111,0xff111111,0xff111111,0xff111111,0xff121212,0xff01000a,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff010113,0xff222222,
2879 0xff212121,0xff202020,0xff1e1e1e,0xff1e1e1e,0xff1c1c1c,0xff1b1b1b,0xff1b1b1b,0xff191919,0xff181818,0xff171717,0xff161616,0xff151515,0xff141414,0xff131313,
2880 0xff121212,0xff111111,0xff111111,0xff111111,0xff111111,0xff111111,0xff111111,0xff111111,0xff121212,0xff121212,0xff01000a,0x87000000,0x5a000000,0x36000000,
2881 0x17000000,0x2e000000,0xff010112,0xff010112,0xff010111,0xff010110,0xff010110,0xff01010f,0xff01010f,0xff01010e,0xff01010e,0xff01010d,0xff01010c,0xff01010c,
2882 0xff01000b,0xff01000b,0xff01000a,0xff01000a,0xff01000a,0xff010009,0xff010009,0xff010009,0xff010009,0xff010009,0xff010009,0xff010009,0xff01000a,0xff01000a,
2883 0xff01000a,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
2884 0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,
2885 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
2886 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,
2887 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
2888 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
2889 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
2890 0x18000000,0xf000000
2891};
2892
2893static const QRgb Tetrix_data[] = {
2894 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
2895 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
2896 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x26000000,0x30000000,0x38000000,0x3d000000,0x3f000000,0x3f000000,0x3f000000,
2897 0x3f000000,0x3f000000,0x3e000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
2898 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x19000000,0xff080573,0xff070562,0xff060551,0xff060550,
2899 0xff060550,0xff05054f,0xff05054f,0xff060550,0xff060550,0xff060551,0xff060551,0xff060551,0xff060551,0xff060552,0xff060552,0xff060552,0xff060552,0xff060552,
2900 0xff060552,0xff060552,0xff060552,0xff060552,0xff060552,0xff060552,0xff060552,0xff04043a,0xff01030f,0x3d000000,0x29000000,0x18000000,0x12000000,0x26000000,
2901 0xff070562,0xff83bd8a,0xff4fa05a,0xff4d9d58,0xff4c9a57,0xff4b9856,0xff4b9856,0xff4c9a57,0xff4d9d58,0xff4fa05a,0xff51a35a,0xff52a65b,0xff53a75c,0xff53a85c,
2902 0xff53a85c,0xff53a85c,0xff53a85c,0xff53a85c,0xff53a85c,0xff53a85c,0xff53a85c,0xff53a85c,0xff53a85c,0xff53a85c,0xff53a85c,0xff14811f,0xff000105,0x5c000000,
2903 0x3d000000,0x25000000,0x17000000,0x30000000,0xff060550,0xff4e9f59,0xff137c22,0xff127621,0xff117121,0xff116e22,0xff116e22,0xff117121,0xff127621,0xff137c22,
2904 0xff148121,0xff148521,0xff158721,0xff158821,0xff158921,0xff158921,0xff158921,0xff158921,0xff158921,0xff158921,0xff158921,0xff158921,0xff158921,0xff158921,
2905 0xff158921,0xff0e5c16,0xff000001,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x3a000004,0xff05044f,0xff4b9856,0xfffdc1a4,0xfffc9f72,0xfffc9f72,0xfffc9f72,
2906 0xfffc9f72,0xffe74c00,0xff106822,0xff127221,0xff137c21,0xff148321,0xff158621,0xff158821,0xff158921,0xff158921,0xff158921,0xff158921,0xff158921,0xff158921,
2907 0xff158921,0xff158921,0xff158921,0xff158921,0xff158921,0xff0e5c16,0xff000001,0x87000000,0x5a000000,0x36000000,0x1d000000,0x40000004,0xff05044d,0xff479054,
2908 0xfffc9f72,0xfffa5200,0xfffa5200,0xfffa5200,0xfffa5200,0xff7e2900,0xff0f5a22,0xff106822,0xff127621,0xff147f21,0xff148521,0xff158722,0xff158821,0xff158821,
2909 0xff158821,0xff158821,0xff158821,0xff158821,0xff158821,0xff158821,0xff158821,0xff158821,0xff158821,0xff0e5c16,0xff000001,0x93000000,0x62000000,0x3b000000,
2910 0x1f000000,0x44000008,0xff05044c,0xff448a51,0xfffc9f72,0xfffa5200,0xfffa5200,0xfffa5200,0xfffa5200,0xff7e2900,0xff0c4c22,0xff0e5d22,0xff116f22,0xff137b22,
2911 0xff148221,0xff158521,0xff158621,0xff158721,0xff158621,0xff158721,0xff158721,0xff158721,0xff158721,0xff158721,0xff158721,0xff158721,0xff158721,0xff0e5b16,
2912 0xff000001,0x9a000000,0x67000000,0x3d000000,0x1f000000,0x45000007,0xff05044c,0xff428550,0xfffc9f72,0xfffa5200,0xfffa5200,0xfffa5200,0xfffa5200,0xff7e2900,
2913 0xff0b4022,0xff0d5422,0xff106821,0xff127521,0xff137d21,0xff148021,0xff148221,0xff148221,0xff148221,0xff148222,0xff148222,0xff148321,0xff148321,0xff148321,
2914 0xff148321,0xff148322,0xff148322,0xff0e5916,0xff000002,0x9b000002,0x68000000,0x3e000000,0x1f000000,0x45000007,0xff05044b,0xff40824f,0xfffc9f72,0xfffa5200,
2915 0xfffa5200,0xfffa5200,0xfffa5200,0xff7e2900,0xff093723,0xff0b4b23,0xff0e5f22,0xff116c21,0xff127421,0xff127822,0xff137a21,0xff137a21,0xff127a21,0xff137a22,
2916 0xff137a21,0xff137a21,0xff137921,0xff137921,0xff137a21,0xff137a21,0xff137b22,0xff0d5417,0xff000002,0x9e000003,0x6a000002,0x3f000000,0x1f000000,0x46000007,
2917 0xff05044b,0xff40814f,0xffe74c00,0xff7e2900,0xff7e2900,0xff7e2900,0xff7e2900,0xff5d1f00,0xff082d23,0xff0a3f23,0xff0c5121,0xff0e5d22,0xff0f6522,0xff106822,
2918 0xff106a22,0xff106b22,0xff106a22,0xff116a22,0xff106922,0xff106921,0xff106921,0xff106921,0xff106921,0xff106a22,0xff116d22,0xff0b4b19,0xff000004,0xa3000006,
2919 0x6e000005,0x42000004,0x1f000000,0x46000007,0xff05044b,0xff3f804e,0xfffdc1a4,0xfffc9f72,0xfffc9f72,0xfffc9f72,0xfffc9f72,0xffe74c00,0xfffdc1a4,0xfffc9f72,
2920 0xfffc9f72,0xfffc9f72,0xfffc9f72,0xffe74c00,0xffeaffad,0xffdeff7f,0xffdeff7f,0xffdeff7f,0xffdeff7f,0xffb4ec16,0xffeaffad,0xffdeff7f,0xffdeff7f,0xffdeff7f,
2921 0xffdeff7f,0xffb4ec16,0xff000006,0xaa000009,0x74000007,0x46000007,0x1f000000,0x46000007,0xff05044b,0xff3f804e,0xfffc9f72,0xfffa5200,0xfffa5200,0xfffa5200,
2922 0xfffa5200,0xff7e2900,0xfffc9f72,0xfffa5200,0xfffa5200,0xfffa5200,0xfffa5200,0xff7e2900,0xffdeff7f,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,
2923 0xffdeff7f,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,0xff000007,0xb100000d,0x7b00000a,0x4a000007,0x1f000000,0x46000007,0xff05044b,0xff40814f,
2924 0xfffc9f72,0xfffa5200,0xfffa5200,0xfffa5200,0xfffa5200,0xff7e2900,0xfffc9f72,0xfffa5200,0xfffa5200,0xfffa5200,0xfffa5200,0xff7e2900,0xffdeff7f,0xffc3ff18,
2925 0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,0xffdeff7f,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,0xff000009,0xb800000f,0x8100000c,0x4e00000a,
2926 0x1f000000,0x45000007,0xff05044b,0xff40824f,0xfffc9f72,0xfffa5200,0xfffa5200,0xfffa5200,0xfffa5200,0xff7e2900,0xfffc9f72,0xfffa5200,0xfffa5200,0xfffa5200,
2927 0xfffa5200,0xff7e2900,0xffdeff7f,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,0xffdeff7f,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,
2928 0xff00000a,0xbc000012,0x8400000e,0x4f00000a,0x1f000000,0x45000007,0xff05044c,0xff428550,0xfffc9f72,0xfffa5200,0xfffa5200,0xfffa5200,0xfffa5200,0xff7e2900,
2929 0xfffc9f72,0xfffa5200,0xfffa5200,0xfffa5200,0xfffa5200,0xff7e2900,0xffdeff7f,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,0xffdeff7f,0xffc3ff18,
2930 0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,0xff00000a,0xbc000012,0x8400000e,0x4f00000a,0x1f000000,0x44000008,0xff05044c,0xff448a51,0xffe74c00,0xff7e2900,
2931 0xff7e2900,0xff7e2900,0xff7e2900,0xff5d1f00,0xffe74c00,0xff7e2900,0xff7e2900,0xff7e2900,0xff7e2900,0xff5d1f00,0xffb4ec16,0xff63810c,0xff63810c,0xff63810c,
2932 0xff63810c,0xff495f09,0xffb4ec16,0xff63810c,0xff63810c,0xff63810c,0xff63810c,0xff495f09,0xff000009,0xb800000f,0x8100000c,0x4e00000a,0x1f000000,0x42000004,
2933 0xff05044d,0xff479054,0xff106822,0xff0f5a21,0xff0c4b23,0xff0b3f23,0xff093623,0xff072d22,0xfffdc1a4,0xfffc9f72,0xfffc9f72,0xfffc9f72,0xfffc9f72,0xffe74c00,
2934 0xffeaffad,0xffdeff7f,0xffdeff7f,0xffdeff7f,0xffdeff7f,0xffb4ec16,0xff041823,0xff062323,0xff082d23,0xff093723,0xff0b4023,0xff08331d,0xff000007,0xb100000d,
2935 0x7b00000a,0x4a000007,0x1f000000,0x41000004,0xff05044f,0xff4b9856,0xff127221,0xff106822,0xff0e5d22,0xff0d5422,0xff0b4b22,0xff0a3f22,0xfffc9f72,0xfffa5200,
2936 0xfffa5200,0xfffa5200,0xfffa5200,0xff7e2900,0xffdeff7f,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,0xff062323,0xff073024,0xff0a3f22,0xff0b4b22,
2937 0xff0d5422,0xff093e1b,0xff000006,0xaa000009,0x74000007,0x46000007,0x1f000000,0x3f000000,0xff060550,0xff4e9f59,0xff137c22,0xff127621,0xff116f22,0xff106822,
2938 0xff0e5f22,0xff0c5121,0xfffc9f72,0xfffa5200,0xfffa5200,0xfffa5200,0xfffa5200,0xff7e2900,0xffdeff7f,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,
2939 0xff072c24,0xff0a3e23,0xff0c5121,0xff0e5f22,0xff106822,0xff0b4a19,0xff000004,0xa3000006,0x6e000005,0x42000004,0x1f000000,0x3e000000,0xff060551,0xff51a35a,
2940 0xff148321,0xff147f21,0xff137c22,0xff127621,0xff116d21,0xff0e5f22,0xfffc9f72,0xfffa5200,0xfffa5200,0xfffa5200,0xfffa5200,0xff7e2900,0xffdeff7f,0xffc3ff18,
2941 0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,0xff093323,0xff0b4822,0xff0e5d21,0xff116d21,0xff127621,0xff0d5318,0xff000002,0x9e000003,0x6a000002,0x3f000000,
2942 0x1f000000,0x3e000000,0xff060551,0xff52a65b,0xff158621,0xff148521,0xff148221,0xff137e21,0xff127621,0xff106821,0xfffc9f72,0xfffa5200,0xfffa5200,0xfffa5200,
2943 0xfffa5200,0xff7e2900,0xffdeff7f,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,0xff093723,0xff0c4d23,0xff0f6421,0xff127421,0xff137d21,0xff0d5717,
2944 0xff000002,0x9b000002,0x68000000,0x3e000000,0x1f000000,0x3d000000,0xff060552,0xff53a75c,0xff158821,0xff158721,0xff158621,0xff148221,0xff137b22,0xff116f22,
2945 0xffe74c00,0xff7e2900,0xff7e2900,0xff7e2900,0xff7e2900,0xff5d1f00,0xffb4ec16,0xff63810c,0xff63810c,0xff63810c,0xff63810c,0xff495f09,0xff0a3922,0xff0c5022,
2946 0xff106721,0xff127821,0xff148121,0xff0e5916,0xff000001,0x9a000000,0x67000000,0x3d000000,0x1f000000,0x3d000000,0xff060552,0xff53a85c,0xff158921,0xff158821,
2947 0xff158722,0xff148521,0xff147f21,0xff127621,0xff106822,0xff0f5a22,0xff0d4c22,0xff0b4322,0xff0b3e22,0xff0a3b22,0xffeaffad,0xffdeff7f,0xffdeff7f,0xffdeff7f,
2948 0xffdeff7f,0xffb4ec16,0xff0a3a23,0xff0c5122,0xff106821,0xff137921,0xff148221,0xff0e5a17,0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
2949 0xff060552,0xff53a85c,0xff158921,0xff158921,0xff158821,0xff158621,0xff148321,0xff137c21,0xff127221,0xff106722,0xff0f5e22,0xff0d5622,0xff0d5022,0xff0b4922,
2950 0xffdeff7f,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,0xff0a3a23,0xff0c5123,0xff106921,0xff137921,0xff148321,0xff0e5b17,0xff000001,0x99000000,
2951 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff060552,0xff53a85c,0xff158921,0xff158921,0xff158821,0xff158721,0xff148521,0xff148121,0xff137c22,0xff127521,
2952 0xff116f21,0xff106922,0xff0f6122,0xff0d5621,0xffdeff7f,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,0xff0a3b23,0xff0d5223,0xff106921,0xff137921,
2953 0xff148321,0xff0e5b17,0xff000001,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff060552,0xff53a85c,0xff158921,0xff158921,0xff158921,0xff158821,
2954 0xff158721,0xff148521,0xff148321,0xff147f21,0xff137b21,0xff127722,0xff116f21,0xff0f6122,0xffdeff7f,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,
2955 0xff0a3d23,0xff0d5422,0xff106a22,0xff137a21,0xff148322,0xff0e5b17,0xff000001,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff04043a,0xff14811f,
2956 0xff0e5c16,0xff0e5c16,0xff0e5c16,0xff0e5c16,0xff0e5c16,0xff0e5b16,0xff0e5a17,0xff0e5916,0xff0e5817,0xff0c5517,0xff0c5018,0xff0b4618,0xffdeff7f,0xffc3ff18,
2957 0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,0xff082d1d,0xff093b1b,0xff0b4918,0xff0d5318,0xff0d5817,0xff09370f,0xff000000,0x87000000,0x5a000000,0x36000000,
2958 0x17000000,0x2e000000,0xff01030f,0xff000105,0xff000001,0xff000001,0xff000001,0xff000001,0xff000001,0xff000001,0xff000001,0xff000001,0xff000002,0xff000002,
2959 0xff000003,0xff000004,0xff07060c,0xff040306,0xff040306,0xff040306,0xff040306,0xff030205,0xff000009,0xff000006,0xff000004,0xff000003,0xff000002,0xff000001,
2960 0xff000000,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
2961 0x99000000,0x99000000,0x9a000002,0x9c000002,0xa0000003,0xa7000008,0xb200000d,0xbd010110,0xc6010115,0xcc010116,0xcc010116,0xc6010115,0xbd010110,0xb200000d,
2962 0xa7000008,0xa0000003,0x96000002,0x88000002,0x75000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
2963 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x67000000,0x69000002,0x6d000005,0x74000007,0x7f00000c,0x8b000011,0x95000013,0x9a000014,
2964 0x9a000014,0x95000013,0x8b000011,0x7f00000c,0x74000007,0x6d000005,0x65000003,0x5b000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
2965 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3e000000,0x3f000000,0x42000004,0x48000007,
2966 0x4f00000d,0x5800000e,0x5f000010,0x63000012,0x63000012,0x5f000010,0x5800000e,0x4f00000d,0x48000007,0x42000004,0x3d000000,0x37000000,0x2e000000,0x25000000,
2967 0x18000000,0xf000000
2968};
2969
2970static const QRgb TextEditor_data[] = {
2971 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
2972 0x1f000000,0x1f000000,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x1d000000,0x1b000000,
2973 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
2974 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3e040404,0x3f080808,0x3f080808,0x3f0c0c0c,0x3f0c0c0c,0x3f0c0c0c,0x3f0c0c0c,0x3f0c0c0c,0x3f080808,
2975 0x3f080808,0x3e040404,0x3c040404,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff888800,0xff888800,0xff888800,0xff888800,
2976 0xff888800,0xff888800,0xff888800,0xff888800,0xff888800,0xff888800,0xff888800,0xff888800,0xff888800,0xff888800,0xff878700,0xff868600,0xff848400,0xff808000,
2977 0xff7a7900,0xff736100,0xff835a00,0xff805e00,0xff775b00,0xff7d5900,0xff6f5300,0xff624600,0xff573600,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
2978 0xff888800,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffefefc,
2979 0xfffdfdf9,0xfff9f9f1,0xfff2f2e4,0xffe9e6cb,0xffe8c697,0xffeeac4f,0xffe89f3a,0xffe89a25,0xffec9025,0xffbe851e,0xffb76f0c,0xff944f02,0xff261b00,0x5c000000,
2980 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff888800,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
2981 0xffffffff,0xfffefefe,0xfffefefd,0xfffcfcf9,0xfff9f9f2,0xfff3f3e6,0xffeae9d2,0xffe1cda9,0xffeba958,0xffe8a22c,0xffe39313,0xffe18c13,0xffca790c,0xffa36511,
2982 0xff824e06,0xff4b2f0d,0xff343400,0x75020202,0x4f030303,0x2e000000,0x1b000000,0x36000000,0xff888800,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
2983 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffefefd,0xfffcfcf9,0xfffafaf3,0xfff4f4e8,0xffecebd5,0xffe5d6b5,0xffe8aa60,0xfff3a837,0xffe3981f,
2984 0xffec9017,0xffca7a11,0xffae700f,0xff90550c,0xff4d3811,0xff60602c,0xff535300,0x88060606,0x5b030303,0x37050505,0x1d000000,0x3b000000,0xff888800,0xffffffff,
2985 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffefefd,0xfffdfdfa,0xfffafaf4,0xfff4f4e9,0xffedecd6,0xffdecfa3,
2986 0xffefb067,0xfffaac3f,0xffea9829,0xffe9931d,0xffd38117,0xffb06d1a,0xff905a18,0xff593d14,0xff5d5b2d,0xff999956,0xff565600,0x95070707,0x63050505,0x3c040404,
2987 0x1f000000,0x3d000000,0xff888800,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffefefd,0xfffdfdfb,0xfff9f9f4,
2988 0xfff5f5eb,0xffeeeedb,0xffdbd3bc,0xffe7b26e,0xffeda240,0xffe9a326,0xffef9523,0xffd8851c,0xffb47a20,0xff97631c,0xff6b491b,0xff605f36,0xff9d9d5a,0xffa4a46f,
2989 0xff5a5a00,0x9b0a0a0a,0x68070707,0x3e040404,0x1f000000,0x3d000000,0xff888800,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
2990 0xfffffffe,0xfffdfdfb,0xfffbfbf6,0xfff5f5ec,0xffefefdc,0xffe6dec2,0xffe2ac63,0xfff6a541,0xffe3a024,0xffec981d,0xffd4831b,0xffb97b20,0xff9d6d22,0xff765121,
2991 0xff5f5c37,0xff9d9d5d,0xffa8a872,0xffaaaa85,0xff5c5c00,0x9c0d0d0d,0x690c0c0c,0x3f080808,0x1f000000,0x3d000000,0xff888800,0xffffffff,0xffffffff,0xffffffff,
2992 0xffffffff,0xffffffff,0xffffffff,0xfffffffe,0xfffefefc,0xfffbfbf7,0xfff7f7ee,0xfff0f0df,0xffebe6cf,0xffe7b172,0xffeca33f,0xfff89e24,0xffe79712,0xffdd8615,
2993 0xffbb7f1f,0xffa26b26,0xff7c5520,0xff463e32,0xff9d9d5e,0xffabab76,0xffafaf89,0xffb2b298,0xff5e5e00,0x9d121212,0x6a0e0e0e,0x3f0c0c0c,0x1f000000,0x3d000000,
2994 0xff888800,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffdfdfc,0xfffcfcf8,0xfff8f8f0,0xfff1f1e2,0xffe8e6c8,0xffe2be7f,0xffe59d42,
2995 0xffe3a022,0xffeb9114,0xffe38410,0xffc07c11,0xffa46c1c,0xff7d571c,0xff4c402c,0xffa4a45e,0xffadad77,0xffb1b18b,0xffb7b79c,0xffb5b5a6,0xff5f5f00,0x9e151515,
2996 0x6b131313,0x40101010,0x1f000000,0x3d000000,0xff888800,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffefefd,0xfffdfdfa,0xfff9f9f2,0xfff3f3e6,
2997 0xffe8e8cf,0xffdbc8a4,0xffe99c48,0xfff2972b,0xffde990d,0xffe3870a,0xffc77e13,0xffa7690d,0xff895313,0xff4c4223,0xff8c8c51,0xffaaaa72,0xffb2b28a,0xffb7b79d,
2998 0xffb8b8a8,0xffb5b5ab,0xff5d5d00,0xa01b1b1b,0x6c181818,0x41141414,0x1f000000,0x3d000000,0xff888800,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffffffe,
2999 0xfffdfdfb,0xfffafaf5,0xfff5f5ea,0xffebebd6,0xffc1bdb8,0xffab8850,0xfff89f24,0xffe09219,0xffec8d06,0xffc57004,0xff9c6c09,0xff8d530b,0xff533718,0xff6e7240,
3000 0xffa5a56a,0xffaeae84,0xffb4b498,0xffb7b7a6,0xffb7b7ae,0xffb2b2ad,0xff5b5b00,0xa1202020,0x6d1c1c1c,0x42171717,0x1f000000,0x3d000000,0xff888800,0xffffffff,
3001 0xffffffff,0xffffffff,0xfffefefe,0xfffdfdfc,0xfffbfbf7,0xfff6f6ed,0xffefefdd,0xffe0dacc,0xff716a63,0xffac7c4d,0xfffeaa0d,0xffe79602,0xffd0710a,0xffa86c09,
3002 0xff895006,0xff4f360b,0xff5c5b31,0xff9c9c5e,0xffa8a87a,0xffb0b092,0xffb5b5a3,0xffb7b7ad,0xffb5b5b0,0xffaeaeac,0xff595900,0xa2232323,0x6e202020,0x421b1b1b,
3003 0x1f000000,0x3d000000,0xff888800,0xffffffff,0xffffffff,0xffffffff,0xfffefefd,0xfffcfcf9,0xfff9f9f2,0xfff2f2e4,0xffe0deca,0xffa09692,0xff796550,0xff805b56,
3004 0xff9c7040,0xff895538,0xffae640c,0xff8b4b02,0xff543509,0xff4c4a23,0xff959553,0xffa0a070,0xffa9a98a,0xffb0b09d,0xffb5b5aa,0xffb4b4ae,0xffb0b0ad,0xffa9a9a8,
3005 0xff565600,0xa3262626,0x6f222222,0x44222222,0x1f000000,0x3e040404,0xff888800,0xffffffff,0xffffffff,0xfffefefe,0xfffdfdfb,0xfffbfbf6,0xfff5f5eb,0xffebebd6,
3006 0xff999f9e,0xff7e7168,0xff7d604d,0xff7b563c,0xff685c45,0xff59383f,0xff955802,0xff543609,0xff4f4e24,0xff8b8c49,0xff979765,0xffa2a280,0xffaaaa95,0xffb0b0a4,
3007 0xffb2b2ac,0xffb0b0ad,0xffababaa,0xffa5a5a5,0xff535300,0xa3292929,0x70242424,0x44222222,0x20080808,0x3f080808,0xff888800,0xffffffff,0xfffefefe,0xfffefefd,
3008 0xfffdfdf9,0xfff8f8f1,0xfff1f1e1,0xffd5d4be,0xff8a8779,0xff796249,0xff7c6151,0xff8c6452,0xff604933,0xff483d31,0xff423322,0xff3b3f1f,0xff828443,0xff93935d,
3009 0xff9a9a77,0xffa3a38c,0xffaaaa9d,0xffadada6,0xffaeaeab,0xffadadab,0xffa7a7a7,0xff9f9f9f,0xff515100,0xa3292929,0x70242424,0x44222222,0x20080808,0x3f080808,
3010 0xff888800,0xffffffff,0xfffffffe,0xfffdfdfb,0xfffafaf5,0xfff5f5e8,0xffeaead4,0xffbbb2b1,0xff614f47,0xff7e6046,0xff846156,0xff725149,0xff402f23,0xff1d2015,
3011 0xff23262e,0xff6a6e3c,0xff919159,0xff96966f,0xff9c9c83,0xffa2a294,0xffa7a7a1,0xffaaaaa6,0xffa9a9a7,0xffa7a7a7,0xffa2a2a2,0xff9b9b9b,0xff4e4e00,0xa3272727,
3012 0x6f222222,0x431e1e1e,0x20080808,0x3f0c0c0c,0xff888800,0xfffefefe,0xfffdfdfc,0xfffcfcf8,0xfff8f8ef,0xfff0f0de,0xffe5e6d0,0xff796e5d,0xff8b6b5f,0xff76605b,
3013 0xff4e423d,0xff242211,0xff161c21,0xff2e302b,0xff737141,0xff8f8f57,0xff93936b,0xff98987f,0xff9c9c8d,0xffa1a19a,0xffa5a5a2,0xffa6a6a4,0xffa5a5a4,0xffa3a3a3,
3014 0xff9e9e9e,0xff979797,0xff4c4c00,0xa3262626,0x6f222222,0x431e1e1e,0x20080808,0x3f0c0c0c,0xff888800,0xfffefefd,0xfffcfcfa,0xfffafaf4,0xfff3f3e6,0xffe4e3ce,
3015 0xffa2a198,0xff81766a,0xff896c64,0xff4c3f39,0xff122417,0xff181e1a,0xff454534,0xff878847,0xff919159,0xff94946d,0xff97977d,0xff99998a,0xff9b9b92,0xffa0a09b,
3016 0xffa2a2a0,0xffa2a2a1,0xffa2a2a2,0xff9f9f9f,0xff9a9a9a,0xff919191,0xff494900,0xa2232323,0x6e1e1e1e,0x421b1b1b,0x20080808,0x3f0c0c0c,0xff888800,0xfffefefc,
3017 0xfffafaf6,0xfff6f6ec,0xffeeeedb,0xffb3b7b0,0xff706d62,0xff827568,0xff504740,0xff2c2e2a,0xff292e2b,0xff5f5f3e,0xff929252,0xff979762,0xff989873,0xff9b9b81,
3018 0xff9c9c8b,0xff9a9a91,0xff9c9c98,0xff9f9f9d,0xffa1a1a0,0xffa2a2a1,0xffa0a0a0,0xff9b9b9b,0xff969696,0xff8f8f8f,0xff484800,0xa11e1e1e,0x6d1c1c1c,0x42171717,
3019 0x20080808,0x3f0c0c0c,0xff888800,0xfffcfcf9,0xfff8f8f2,0xfff3f3e4,0xffd2d2c1,0xff767a7c,0xff937e75,0xff4e483a,0xff282b22,0xff3e4339,0xff818350,0xff9f9f63,
3020 0xffa1a171,0xffa2a27e,0xffa2a28a,0xffa1a192,0xffa1a198,0xff9f9f9b,0xff9f9f9c,0xffa0a09f,0xffa2a2a1,0xffa1a1a1,0xff9e9e9e,0xff9a9a9a,0xff939393,0xff8d8d8d,
3021 0xff474700,0x9f1a1a1a,0x6b151515,0x40101010,0x20080808,0x3f0c0c0c,0xff888800,0xfffbfbf6,0xfff6f6eb,0xffececd8,0xff898981,0xff514f4d,0xff635446,0xff2e312a,
3022 0xff5a5b45,0xff9e9f67,0xffa9a973,0xffa9a97f,0xffa9a98a,0xffaaaa94,0xffa9a99c,0xffa7a79f,0xffa5a5a0,0xffa2a2a0,0xffa1a1a0,0xffa1a1a1,0xffa0a0a0,0xffa0a0a0,
3023 0xff9b9b9b,0xff979797,0xff909090,0xff8a8a8a,0xff464600,0x9e151515,0x6a111111,0x3f0c0c0c,0x20080808,0x3f080808,0xff888800,0xfff8f8f1,0xfff3f3e3,0xffc5c5b2,
3024 0xff4e4e4e,0xff1c1c1c,0xff282825,0xff78785a,0xffaeae78,0xffb2b282,0xffb2b28c,0xffb2b296,0xffb1b19e,0xffb0b0a4,0xffadada6,0xffaaaaa6,0xffa6a6a3,0xffa2a2a1,
3025 0xffa1a1a1,0xffa0a0a0,0xff9f9f9f,0xff9c9c9c,0xff989898,0xff929292,0xff8c8c8c,0xff878787,0xff454500,0x9d101010,0x690c0c0c,0x3f080808,0x20080808,0x3f080808,
3026 0xff888800,0xfff6f6ed,0xffdedecd,0xff63635e,0xff141414,0xff2b2b26,0xff848462,0xffb5b584,0xffb6b68b,0xffb6b696,0xffb6b69f,0xffb7b7a7,0xffb6b6ab,0xffb2b2ad,
3027 0xffadadab,0xffa9a9a7,0xffa5a5a4,0xffa2a2a2,0xff9f9f9f,0xff9e9e9e,0xff9b9b9b,0xff989898,0xff949494,0xff8e8e8e,0xff898989,0xff848484,0xff444400,0x9c0b0b0b,
3028 0x68070707,0x3e040404,0x20080808,0x3e040404,0xff888800,0xffefefe4,0xff7d7d74,0xff0c0c0c,0xff3c3c33,0xffa2a27d,0xffbaba8e,0xffb8b893,0xffbaba9c,0xffbcbca6,
3029 0xffb9b9ac,0xffb8b8af,0xffb5b5b0,0xffb1b1ad,0xffacacab,0xffa7a7a7,0xffa3a3a3,0xff9f9f9f,0xff9b9b9b,0xff999999,0xff979797,0xff929292,0xff8e8e8e,0xff8a8a8a,
3030 0xff868686,0xff828282,0xff444400,0x9b080808,0x67050505,0x3e040404,0x1d000000,0x3c040404,0xff888800,0xffe3e3d8,0xff111110,0xff67675a,0xffc4c4a2,0xffbebe9a,
3031 0xffbaba99,0xffbabaa0,0xffbcbca9,0xffbbbbaf,0xffb9b9b1,0xffb5b5b2,0xffb1b1af,0xffacacab,0xffa7a7a7,0xffa3a3a3,0xff9e9e9e,0xff9a9a9a,0xff969696,0xff939393,
3032 0xff909090,0xff8c8c8c,0xff898989,0xff868686,0xff838383,0xff828282,0xff444400,0x94050505,0x63030303,0x3b000000,0x1b000000,0x36000000,0xff868600,0xfff2f2f2,
3033 0xffe9e9e9,0xffe2e2e2,0xffdadada,0xffd4d4d4,0xffcdcdcd,0xffc8c8c8,0xffc3c3c3,0xffbdbdbd,0xffb6b6b6,0xffb0b0b0,0xffaaaaaa,0xffa6a6a6,0xffa0a0a0,0xff9b9b9b,
3034 0xff979797,0xff919191,0xff8f8f8f,0xff8d8d8d,0xff8a8a8a,0xff878787,0xff848484,0xff828282,0xff828282,0xff818181,0xff454500,0x87020202,0x5a000000,0x36000000,
3035 0x17000000,0x2e000000,0xff828200,0xff7d7d00,0xff787800,0xff747400,0xff6f6f00,0xff6c6c00,0xff686800,0xff656500,0xff636300,0xff5f5f00,0xff5c5c00,0xff595900,
3036 0xff565600,0xff535300,0xff515100,0xff4e4e00,0xff4c4c00,0xff494900,0xff484800,0xff474700,0xff464600,0xff454500,0xff444400,0xff444400,0xff444400,0xff454500,
3037 0xff464600,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x75040404,0x88060606,0x95070707,0x9b0a0a0a,0x9c0d0d0d,0x9d121212,
3038 0x9e151515,0xa01b1b1b,0xa1202020,0xa2232323,0xa3262626,0xa3292929,0xa3292929,0xa3272727,0xa3262626,0xa2232323,0xa11e1e1e,0x9f1a1a1a,0x9e151515,0x9d101010,
3039 0x9c0b0b0b,0x9b080808,0x94050505,0x87020202,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4e030303,0x5b030303,
3040 0x63050505,0x68070707,0x690c0c0c,0x6a0e0e0e,0x6b131313,0x6c181818,0x6d1c1c1c,0x6e202020,0x6f222222,0x70242424,0x70242424,0x6f222222,0x6f222222,0x6e1e1e1e,
3041 0x6d1c1c1c,0x6b151515,0x6a111111,0x690c0c0c,0x68070707,0x67050505,0x63030303,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
3042 0x18000000,0x25000000,0x2e000000,0x37050505,0x3c040404,0x3e040404,0x3f080808,0x3f0c0c0c,0x40101010,0x41141414,0x42171717,0x421b1b1b,0x44222222,0x44222222,
3043 0x44222222,0x431e1e1e,0x431e1e1e,0x421b1b1b,0x42171717,0x40101010,0x3f0c0c0c,0x3f080808,0x3e040404,0x3e040404,0x3b000000,0x36000000,0x2e000000,0x25000000,
3044 0x18000000,0xf000000
3045};
3046
3047static const QRgb TodoList_data[] = {
3048 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
3049 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
3050 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
3051 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
3052 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
3053 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
3054 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x1000000,0x1000000,0x1000000,0x1000000,0x1000000,0x1000000,0xffffff,0xffffff,
3055 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
3056 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x4000000,0x5000000,0x7000000,0x7000000,0x6000000,
3057 0x4000000,0x3000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
3058 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,
3059 0xd000000,0x11000000,0x12000000,0x10000000,0xc000000,0x8000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
3060 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,
3061 0x2000000,0x6000000,0xd000000,0x14000000,0x56a17f7f,0xc7a65151,0x30210000,0x20000000,0x19000000,0x11000000,0xffffff,0xffffff,0xffffff,0xffffff,
3062 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
3063 0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,0x19000000,0x5d977979,0xf8d2a5a5,0xffa64646,0xd4660000,0x461e0000,0x2b000000,0x1d000000,
3064 0x1000000,0x2000000,0x4000000,0x6000000,0x8000000,0x9000000,0xa000000,0xa000000,0xa000000,0xa000000,0xa000000,0xa000000,0xa000000,0xa000000,
3065 0xa000000,0xa000000,0xa000000,0xa000000,0xa000000,0xa000000,0xa000000,0xc000000,0x11000000,0x1b000000,0x60937676,0xf8d2a5a5,0xffb66767,0xff870404,
3066 0xff780000,0xd8550000,0x48140000,0x29000000,0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,
3067 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1e000000,0x1d000000,0x1c000000,0x1e000000,0x24000000,0x658b7070,
3068 0xf8d2a5a5,0xffb66767,0xff880606,0xff850000,0xff6f0000,0xff220000,0xb11b0000,0x33000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,
3069 0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3e000000,0x3d000000,0x3b000000,
3070 0x39000000,0x3a000000,0x6f7e6666,0xf9d2a4a4,0xffb66767,0xff880606,0xff850000,0xff6f0000,0xff210000,0xda1d0000,0x59030000,0x37000000,0xc000000,0x18000000,
3071 0xff474747,0xff474747,0xff474747,0xff474747,0xff474747,0xff464646,0xff464646,0xff464646,0xff454545,0xff454545,0xff444444,0xff444444,0xff434343,0xff424242,
3072 0xff414141,0xff404040,0xff3e3e3e,0xff3c3c3c,0xff363636,0x86695555,0xf9d2a4a4,0xffb66767,0xff880606,0xff850000,0xff6f0000,0xff210000,0xdf1c0000,0x6f030000,
3073 0x4f000000,0x34000000,0x12000000,0x25000000,0xff474747,0xffdadada,0xffdadada,0xffd9d9d9,0xffd8d8d8,0xffd8d8d8,0xffd6d6d6,0xffd5d5d5,0xffd3d3d3,0xffd2d2d2,
3074 0xffd0d0d0,0xffcecece,0xffcccccc,0xffc9c9c9,0xffc5c5c5,0xffc0c0c0,0xffb8b8b8,0xffa7a7a7,0xff5b5050,0xfbd0a3a3,0xffb66767,0xff880606,0xff850000,0xff6f0000,
3075 0xff210000,0xe11c0000,0x7c020000,0x5e000000,0x43000000,0x2b000000,0x17000000,0x2e000000,0xff474747,0xffdadada,0xffd9d9d9,0xffd8d8d8,0xffd8d8d8,0xffd6d6d6,
3076 0xffd4d4d4,0xffd3d3d3,0xffd1d1d1,0xffcfcfcf,0xffcdcdcd,0xffcbcbcb,0xffc9c9c9,0xffc6c6c6,0xffc0c0c0,0xffb8b8b8,0xffa8a8a8,0xffa59a9a,0xffcea2a2,0xffb66767,
3077 0xff880606,0xff850000,0xff6f0000,0xff210000,0xe11c0000,0x80020000,0x64000000,0x4b000000,0x33000000,0x1f000000,0x1b000000,0x36000000,0xff474747,0xffd9d9d9,
3078 0xffd8d8d8,0xffd8d8d8,0xffd6d6d6,0xffd4d4d4,0xffd2d2d2,0xffd0d0d0,0xffcccccc,0xffc8c8c8,0xffc8c8c8,0xffc6c6c6,0xffc4c4c4,0xffc1c1c1,0xffb9b9b9,0xffa9a9a9,
3079 0xffa59b9b,0xffd1a5a5,0xffb66767,0xff880606,0xff850000,0xff6f0000,0xff210000,0xe21c0000,0x81020000,0x65000000,0x4d000000,0x35000000,0x22000000,0x13000000,
3080 0x1d000000,0x3b000000,0xff474747,0xffd8d8d8,0xffd8d8d8,0xffd6d6d6,0xffd4d4d4,0xffd1d1d1,0xffcccccc,0xffc6c6c6,0xffc2c0c0,0xffbfbfbf,0xffbdbdbd,0xffbcbcbc,
3081 0xffbababa,0xffb5b5b5,0xffa9a9a9,0xffa79c9c,0xffd1a5a5,0xffb66767,0xff880606,0xff850000,0xff6f0000,0xff210000,0xe51b0000,0x85020000,0x65000000,0x4d000000,
3082 0x36000000,0x22000000,0x13000000,0xa000000,0x1f000000,0x3d000000,0xff464646,0xffd8d8d8,0xffd6d6d6,0xffd4d4d4,0xffd1d1d1,0xffcbcbcb,0xffc1c1c1,0xffbcb7b7,
3083 0xffb87b7b,0xffa89b9b,0xffadadad,0xffadadad,0xffacacac,0xffa3a3a3,0xffa59b9b,0xffd1a5a5,0xffb66767,0xff880606,0xff850000,0xff6f0000,0xff210000,0xe91b0000,
3084 0x90020000,0x6b000000,0x4d000000,0x36000000,0x22000000,0x13000000,0xa000000,0x4000000,0x1f000000,0x3d000000,0xff464646,0xffd6d6d6,0xffd4d4d4,0xffd2d2d2,
3085 0xffcccccc,0xffc1c1c1,0xffbab5b5,0xffd2acac,0xffb36161,0xff761111,0xff928686,0xff979797,0xff979797,0xff9f9595,0xffd1a5a5,0xffb66767,0xff880606,0xff850000,
3086 0xff6f0000,0xff210000,0xed1a0000,0x9f020000,0x78000000,0x54000000,0x36000000,0x22000000,0x13000000,0xa000000,0x4000000,0x1000000,0x1f000000,0x3d000000,
3087 0xff464646,0xffd5d5d5,0xffd3d3d3,0xffd0d0d0,0xffc6c6c6,0xffbcb7b7,0xffd2acac,0xffc07b7b,0xff8d1010,0xff7b0000,0xff6f0e0e,0xff827777,0xff918585,0xffd1a4a4,
3088 0xffb66767,0xff880606,0xff850000,0xff6f0000,0xff210000,0xf31a0000,0xb3020000,0x8a000000,0x63000000,0x3e000000,0x22000000,0x13000000,0xa000000,0x4000000,
3089 0x1000000,0xffffff,0x1f000000,0x3d000000,0xff454545,0xffd3d3d3,0xffd1d1d1,0xffcccccc,0xffc2c0c0,0xffb87b7b,0xffb36161,0xff8d1010,0xff850000,0xff840000,
3090 0xff7d0000,0xff953030,0xffc68d8d,0xffb66767,0xff880606,0xff850000,0xff6f0000,0xff210000,0xff1d0505,0xcd010000,0xa3000000,0x78000000,0x4e000000,0x2b000000,
3091 0x13000000,0xa000000,0x4000000,0x1000000,0xffffff,0xffffff,0x1f000000,0x3d000000,0xff454545,0xffd2d2d2,0xffcfcfcf,0xffc8c8c8,0xffbfbfbf,0xffa89b9b,
3092 0xff761111,0xff7b0000,0xff840000,0xff850000,0xff840000,0xff880707,0xff8c0f0f,0xff880606,0xff850000,0xff6f0000,0xff210000,0xff270f0f,0xff141313,0xc2000000,
3093 0x94000000,0x66000000,0x3d000000,0x1c000000,0xa000000,0x4000000,0x1000000,0xffffff,0xffffff,0xffffff,0x1f000000,0x3d000000,0xff444444,0xffd0d0d0,
3094 0xffcdcdcd,0xffc8c8c8,0xffbebebe,0xffafafaf,0xff968a8a,0xff6e0e0e,0xff7b0000,0xff840000,0xff850000,0xff850000,0xff850000,0xff850000,0xff720000,0xff220000,
3095 0xff270f0f,0xff3d3c3c,0xff171717,0xb8000000,0x86000000,0x57000000,0x30000000,0x14000000,0x4000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,
3096 0x1f000000,0x3d000000,0xff444444,0xffcecece,0xffcbcbcb,0xffc7c7c7,0xffbebebe,0xffb1b1b1,0xffa0a0a0,0xff877b7b,0xff6c0c0c,0xff7b0000,0xff840000,0xff850000,
3097 0xff850000,0xff840000,0xff410000,0xff260d0d,0xff3d3c3c,0xff464646,0xff1a1a1a,0xaf000000,0x7a000000,0x4b000000,0x28000000,0xe000000,0x1000000,0xffffff,
3098 0xffffff,0xffffff,0xffffff,0xffffff,0x1f000000,0x3d000000,0xff434343,0xffcccccc,0xffc9c9c9,0xffc6c6c6,0xffbfbfbf,0xffb5b5b5,0xffa6a6a6,0xff909090,
3099 0xff776c6c,0xff6a0b0b,0xff7b0000,0xff840000,0xff830000,0xff490000,0xff210000,0xff352b2b,0xff464646,0xff4d4d4d,0xff1b1b1b,0xa7000000,0x71000000,0x45000000,
3100 0x23000000,0xb000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1f000000,0x3d000000,0xff424242,0xffcacaca,0xffc8c8c8,0xffc5c5c5,
3101 0xffc0c0c0,0xffb5b5b5,0xffa7a7a7,0xff969696,0xff828282,0xff6d6161,0xff690a0a,0xff780000,0xff460000,0xff220202,0xff362c2c,0xff454545,0xff4e4e4e,0xff555555,
3102 0xff1e1e1e,0xa1000000,0x6c000000,0x40000000,0x20000000,0xa000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1f000000,0x3d000000,
3103 0xff414141,0xffc7c7c7,0xffc5c5c5,0xffc2c2c2,0xffbcbcbc,0xffb0b0b0,0xffa6a6a6,0xff999999,0xff898989,0xff767676,0xff665a5a,0xff460909,0xff230303,0xff3d3434,
3104 0xff4a4a4a,0xff4f4f4f,0xff545454,0xff5a5a5a,0xff1f1f1f,0x9d000000,0x68000000,0x3e000000,0x1f000000,0xa000000,0xffffff,0xffffff,0xffffff,0xffffff,
3105 0xffffff,0xffffff,0x1f000000,0x3d000000,0xff414141,0xffc5c5c5,0xffc2c2c2,0xffbbbbbb,0xffb3b3b3,0xffaaaaaa,0xffa1a1a1,0xff969696,0xff8a8a8a,0xff7b7b7b,
3106 0xff6d6d6d,0xff605656,0xff494040,0xff545454,0xff545454,0xff575757,0xff5a5a5a,0xff5d5d5d,0xff1f1f1f,0x9b000000,0x67000000,0x3d000000,0x1f000000,0xa000000,
3107 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1d000000,0x3b000000,0xff404040,0xffc2c2c2,0xffbababa,0xffb1b1b1,0xffaaaaaa,0xffa1a1a1,
3108 0xff9a9a9a,0xff919191,0xff888888,0xff7d7d7d,0xff727272,0xff686868,0xff616161,0xff5d5d5d,0xff5b5b5b,0xff5d5d5d,0xff5f5f5f,0xff5f5f5f,0xff202020,0x94000000,
3109 0x63000000,0x3b000000,0x1d000000,0xa000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1b000000,0x36000000,0xff3f3f3f,0xffb9b9b9,
3110 0xffb0b0b0,0xffa8a8a8,0xffa0a0a0,0xff999999,0xff919191,0xff8a8a8a,0xff838383,0xff7b7b7b,0xff727272,0xff6b6b6b,0xff656565,0xff626262,0xff616161,0xff5f5f5f,
3111 0xff5f5f5f,0xff606060,0xff202020,0x87000000,0x5a000000,0x36000000,0x1b000000,0x9000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
3112 0x17000000,0x2e000000,0xff3c3c3c,0xff3a3a3a,0xff373737,0xff343434,0xff313131,0xff2f2f2f,0xff2d2d2d,0xff2b2b2b,0xff292929,0xff262626,0xff252525,0xff242424,
3113 0xff212121,0xff212121,0xff212121,0xff202020,0xff202020,0xff202020,0xff212121,0x74000000,0x4e000000,0x2e000000,0x17000000,0x8000000,0xffffff,0xffffff,
3114 0xffffff,0xffffff,0xffffff,0xffffff,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
3115 0x99000000,0x99000000,0x9a000000,0x9a000000,0x9b000000,0x9b000000,0x9a000000,0x9a000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,
3116 0x12000000,0x6000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
3117 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x67000000,0x67000000,0x67000000,0x66000000,0x62000000,0x5a000000,
3118 0x4d000000,0x3d000000,0x29000000,0x18000000,0xc000000,0x4000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x7000000,0xf000000,
3119 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
3120 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0x7000000,0x2000000,0xffffff,0xffffff,0xffffff,0xffffff,
3121 0xffffff,0xffffff
3122};
3123
3124static const QRgb Tux_data[] = {
3125 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
3126 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
3127 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
3128 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
3129 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff090684,0xff090682,0xff090680,0xff090680,
3130 0xff090681,0xff090681,0xff090682,0xff090683,0xff060456,0xff060454,0xff060454,0xff060454,0xff060454,0xff060454,0xff060454,0xff060454,0xff060454,0xff060454,
3131 0xff060454,0xff060454,0xff060454,0xff060457,0xff070465,0xff070467,0xff060456,0xff06034d,0xff04033a,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
3132 0xff090682,0xffe4f8f0,0xffd2f3e7,0xffccf1e2,0xffcdf1e2,0xffd2f3e4,0xffd9f4e7,0xffafafae,0xff9b9b9b,0xff9c9c9c,0xff9c9c9c,0xff9c9c9c,0xff9c9c9c,0xff9c9c9c,
3133 0xff9c9c9c,0xff9c9c9c,0xff9c9c9c,0xff9c9c9c,0xff9c9c9c,0xff9c9c9c,0xff9c9c9c,0xff9d9d9d,0xffb1b1b1,0xffb4b4b5,0xffa1a1a1,0xff8f8f8f,0xff04033a,0x5c000000,
3134 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff08067f,0xffcff2e5,0xff97e3c7,0xff7ddcb8,0xff7fdcb7,0xff8ee0bc,0xffa1e5c3,0xff565656,0xff4f4f4f,0xff4f4f4f,
3135 0xff4f4f4f,0xff4f4f4f,0xff4f4f4f,0xff4f4f4f,0xff4f4f4f,0xff4f4f4f,0xff4f4f4f,0xff4f4f4f,0xff4f4f4f,0xff4f4f4f,0xff4f4f4f,0xff505050,0xff595858,0xff525253,
3136 0xff4e4e4e,0xff494949,0xff02011d,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff08067e,0xffc4efdf,0xff76d9b5,0xff50cfa0,0xff53d09f,0xff69d6a7,
3137 0xff605f5c,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,
3138 0xff161616,0xff161616,0xff161616,0xff161616,0xff151515,0xff131313,0xff010008,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff08067e,0xffc0eede,
3139 0xff6ad6af,0xff43cc99,0xff46cd98,0xff5fd3a0,0xff3a3937,0xff030303,0xff040404,0xff040404,0xff040404,0xff040404,0xff040404,0xff040404,0xff040404,0xff040404,
3140 0xff040404,0xff040404,0xff040404,0xff040404,0xff040404,0xff040404,0xff030303,0xff040404,0xff030303,0xff030303,0xff000001,0x93000000,0x62000000,0x3b000000,
3141 0x1f000000,0x3d000000,0xff08067e,0xffbfeedd,0xff69d6ae,0xff41cb98,0xff46cc97,0xff61d4a1,0xff2a2928,0xff000000,0xff020202,0xff020202,0xff020202,0xff020202,
3142 0xff010101,0xff000201,0xff020202,0xff020202,0xff020202,0xff020202,0xff020202,0xff020202,0xff010101,0xff050505,0xff0f0e0e,0xff060606,0xff010101,0xff010101,
3143 0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08067e,0xffbfeedd,0xff69d6ae,0xff41cb98,0xff47cc97,0xff63d4a1,0xff242523,0xff000000,
3144 0xff020202,0xff010101,0xff020202,0xff131111,0xff171515,0xff020202,0xff000201,0xff020202,0xff020202,0xff020202,0xff010101,0xff030303,0xff060606,0xff060606,
3145 0xff161615,0xff383535,0xff050505,0xff010101,0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08067e,0xffbfeedd,0xff69d6ae,0xff42cb98,
3146 0xff48cd98,0xff64d5a1,0xff20201f,0xff000000,0xff010101,0xff090909,0xff1b1918,0xff0e0e0d,0xff141414,0xff100f0f,0xff020202,0xff020202,0xff020202,0xff010101,
3147 0xff252220,0xff716d6c,0xff73706f,0xff565352,0xff1b1b1b,0xff090908,0xff0c0c0c,0xff010101,0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
3148 0xff08067e,0xffbfeedd,0xff69d6ae,0xff42cb98,0xff48cd98,0xff64d5a2,0xff20201f,0xff000000,0xff090909,0xff7f7c7b,0xff888888,0xff797979,0xff2f2d2b,0xff020202,
3149 0xff020202,0xff020202,0xff010101,0xff181717,0xffb2b2b2,0xffa9a9a9,0xffa4a4a4,0xff9a9a9a,0xff9e9e9e,0xff383534,0xff010101,0xff010101,0xff000001,0x99000000,
3150 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08067e,0xffbfeedd,0xff69d6ae,0xff42cb98,0xff48cd98,0xff64d5a2,0xff252423,0xff000000,0xff2e2c2a,0xffdddddd,
3151 0xffefefef,0xfff3f3f3,0xffe1e1e1,0xff1e1c1b,0xff000101,0xff020202,0xff010101,0xff6f6866,0xfff3f3f3,0xffeaeaea,0xff7d7d7d,0xff8a8a8a,0xffdcdcdc,0xffbcbcbe,
3152 0xff0d0c0c,0xff000000,0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08067e,0xffbfeedd,0xff69d6ae,0xff42cb98,0xff48cd98,0xff64d5a2,
3153 0xff252624,0xff000000,0xff5f5856,0xfff3f3f3,0xff868686,0xff8b8b8b,0xfffefefe,0xff6a6663,0xff010101,0xff010101,0xff030303,0xffb9b3b0,0xffffffff,0xff595959,
3154 0xff000000,0xff050505,0xff949494,0xffebebee,0xff2f2c2d,0xff000000,0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08067e,0xffbfeedd,
3155 0xff69d6ae,0xff42cb98,0xff48cd98,0xff64d5a2,0xff282826,0xff000000,0xff837c78,0xff6d6d6d,0xff050505,0xff202020,0xff868686,0xff908c88,0xff020202,0xff060606,
3156 0xff0b0a09,0xffbfbab8,0xffd4d4d4,0xff070707,0xff030303,0xff282828,0xff3f3f3f,0xffebebee,0xff504c4e,0xff000000,0xff000001,0x99000000,0x66000000,0x3d000000,
3157 0x1f000000,0x3d000000,0xff08067e,0xffbfeedd,0xff69d6ae,0xff42cb98,0xff48cd98,0xff64d5a2,0xff2b2c2a,0xff000000,0xff837c7a,0xff484848,0xff020202,0xff1b1b1b,
3158 0xff525252,0xff757072,0xff020202,0xff050505,0xff070707,0xff837d7f,0xffc7c7c7,0xff090909,0xff080808,0xff0b0b0b,0xff1c1c1c,0xffeaeaed,0xff575255,0xff000000,
3159 0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08067e,0xffbfeedd,0xff69d6ae,0xff42cb98,0xff48cd98,0xff64d5a2,0xff31302f,0xff000000,
3160 0xff6d6765,0xff636363,0xff020202,0xff000000,0xff524f47,0xff9f8948,0xff7e6717,0xff8b741b,0xff5f4f20,0xff968343,0xffddd3a1,0xff101010,0xff050505,0xff020202,
3161 0xff383838,0xffebebee,0xff443f42,0xff000000,0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08067e,0xffbfeedd,0xff69d6ae,0xff42cb98,
3162 0xff48cd98,0xff64d5a2,0xff363634,0xff000000,0xff44403e,0xffa1a1a1,0xff020202,0xff39362b,0xffb89421,0xffc7a21f,0xfff2c711,0xfff0c915,0xffd1b333,0xffc2a228,
3163 0xffe8bf12,0xff97833d,0xff353229,0xff0e0e0e,0xffa8a8a8,0xffebebee,0xff1d1b1c,0xff000000,0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
3164 0xff08067e,0xffbfeedd,0xff69d6ae,0xff42cb98,0xff48cd98,0xff64d5a2,0xff3a3937,0xff000000,0xff0b0b0b,0xffc6c7cd,0xffa28f5a,0xffd3a200,0xffe4b200,0xffe7bb10,
3165 0xffe9c51f,0xffeac827,0xffedcc2c,0xffefcd2e,0xffedcc2c,0xffe9bf0c,0xffe2b70b,0xffcda833,0xffeccd91,0xff938577,0xff030304,0xff000000,0xff000001,0x99000000,
3166 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08067e,0xffbfeedd,0xff69d6ae,0xff42cb98,0xff48cd98,0xff64d5a1,0xff42413e,0xff000101,0xff000000,0xff564a2d,
3167 0xffd6a200,0xffdca900,0xffe4b600,0xffe6be14,0xffe9c521,0xffedcc2d,0xffeed436,0xfff2d949,0xfff5e164,0xfff3dc51,0xffeecc27,0xffe6b700,0xffd5a200,0xff9d6d05,
3168 0xff241c0f,0xff000000,0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08067e,0xffbfeedd,0xff69d6ae,0xff42cb98,0xff47cc98,0xff64d5a1,
3169 0xff474642,0xff000000,0xff14110d,0xffa07300,0xffcd9800,0xffddaa00,0xffe6b300,0xffe7bb10,0xffe9c51f,0xffecca28,0xffedce2e,0xfff4db58,0xfffae97f,0xfff0d547,
3170 0xffeec310,0xffae8a0e,0xff564214,0xffa37605,0xff3c2f11,0xff000000,0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08067e,0xffbfeedd,
3171 0xff69d6ae,0xff41cb98,0xff47cc97,0xff62d4a1,0xff4b4a47,0xff000000,0xff3c2e17,0xffbe8600,0xffc79400,0xffd9a700,0xffe3b200,0xffe6b90d,0xffe9c018,0xffe9c51f,
3172 0xffefd135,0xfff5e462,0xfff3d644,0xffeec30c,0xffb08c14,0xff624e17,0xffa2780b,0xffb68400,0xff2e2411,0xff000000,0xff000001,0x99000000,0x66000000,0x3d000000,
3173 0x1f000000,0x3d000000,0xff08067e,0xffbfeedd,0xff69d6ae,0xff41cb98,0xff46cc97,0xff62d4a1,0xff504f4c,0xff010101,0xff2d2414,0xff815c0e,0xffb68700,0xffd5a100,
3174 0xffe2b100,0xffe7b700,0xffe9bc0f,0xffecc214,0xfff8d625,0xfff2cf26,0xffb6941c,0xff6e561b,0xff785d18,0xffd3a100,0xffcb9700,0xffaf7b00,0xff1f1a0e,0xff000000,
3175 0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08067e,0xffbfeedd,0xff69d6ae,0xff41cb98,0xff46cc98,0xff61d4a1,0xff595854,0xff020202,
3176 0xff070706,0xff523f20,0xff755414,0xff7f6213,0xffac8408,0xffbf9500,0xffc09809,0xffba9413,0xff886d1b,0xff5c4b1a,0xff5f4918,0xff9d7610,0xffe2ae00,0xffce9d00,
3177 0xffc6992b,0xffbfa262,0xff242120,0xff000000,0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08067e,0xffc0eedd,0xff6ad7ae,0xff44cc99,
3178 0xff48cd98,0xff64d5a1,0xff82ddad,0xff030303,0xff020202,0xff96928d,0xffbe9643,0xff926407,0xff795d15,0xff7b6820,0xff7c661f,0xff7e681f,0xff957819,0xffbc920e,
3179 0xffe3af00,0xffe0ac00,0xffcf9d00,0xffd0b262,0xffcecbc3,0xffc3c3c6,0xff716f77,0xff020203,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
3180 0xff08067e,0xffc0eddd,0xff6cd5af,0xff49cb99,0xff4ecd9a,0xff69d4a3,0xff494845,0xff010101,0xff090908,0xffcbcbce,0xffdad2c5,0xffba8d2a,0xffb77f00,0xffd8a90b,
3181 0xffecc110,0xffeaba00,0xffdcad00,0xffd3a100,0xffcc9800,0xffcb9b15,0xffd4bf87,0xffd2d2d2,0xffd3d3d3,0xffc9c9cc,0xff9696a0,0xff08080a,0xff000000,0x99000000,
3182 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08067c,0xffbee8da,0xff6dcdaa,0xff4bc094,0xff53c293,0xff6cc89d,0xff0f0f0f,0xff000000,0xff060606,0xffbab6b8,
3183 0xffd0d0d3,0xffcbc3ba,0xffaf8735,0xffa07100,0xffaa7a00,0xffad7e00,0xffb08000,0xffb88d22,0xffcaaf71,0xffcfc8be,0xffcbcbcd,0xffcdcdcf,0xffdedee1,0xffd8d8de,
3184 0xffa0a0ac,0xff1d1c21,0xff000000,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff080577,0xffb7d6cd,0xff69af98,0xff45987c,0xff489579,0xff1a1a1b,
3185 0xff000000,0xff010101,0xff080707,0xffa0a0a9,0xffababb5,0xff9e9ea7,0xffa0a0a9,0xff95866e,0xff907b52,0xff927d55,0xff9a8c75,0xff9e9da2,0xff9e9ea7,0xff9e9ea7,
3186 0xffa2a2ac,0xffacacb7,0xffafafba,0xffa3a3b0,0xff7c7c8f,0xff3e3d4f,0xff000002,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff070568,0xff98b4ae,
3187 0xff59736d,0xff314e48,0xff202025,0xff010101,0xff000000,0xff000000,0xff232227,0xff65657a,0xff65657a,0xff616174,0xff5f5f72,0xff5e5e71,0xff5e5e71,0xff5e5e71,
3188 0xff5e5e71,0xff5f5f72,0xff5f5f72,0xff616174,0xff646478,0xff656579,0xff646479,0xff5e5e74,0xff4d4d65,0xff40405a,0xff01000c,0x87000000,0x5a000000,0x36000000,
3189 0x17000000,0x2e000000,0xff050451,0xff050343,0xff030226,0xff020117,0xff000005,0xff000000,0xff000000,0xff000002,0xff030238,0xff040242,0xff040241,0xff040241,
3190 0xff040240,0xff040240,0xff040240,0xff040240,0xff040240,0xff040240,0xff040241,0xff040241,0xff040241,0xff040241,0xff040241,0xff040241,0xff040240,0xff040242,
3191 0xff03022c,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
3192 0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,
3193 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
3194 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,
3195 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
3196 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
3197 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
3198 0x18000000,0xf000000
3199};
3200
3201static const QRgb UtilsIcon_data[] = {
3202 0x0,0x1000000,0x5000000,0x171b2b1d,0x4b416845,0x85487a4f,0xa2457d4d,0x9d397341,0x7b2a5f31,0x4419381d,0x1e111311,0xb131313,0x2040404,0x0,
3203 0x1000000,0x8000000,0x35416346,0xaf53805c,0xf6446c4f,0xff345640,0xff274433,0xff203d2a,0xff1e4028,0xe81f4e27,0x911a5121,0x36142015,0x10101010,0x30e0e0e,
3204 0x5000000,0x35416446,0xce527d5c,0xfe41634d,0xff40644b,0xff3c6348,0xff335a3e,0xff3e5d46,0xff284330,0xff192e1f,0xfa17331c,0xaa194a1f,0x39161c17,0xe181818,
3205 0x171b2b1d,0xaf56845d,0xfe446950,0xff4c7657,0xff51805b,0xff4b7d55,0xff3b6b44,0xffe4eae6,0xff819485,0xff1e3a24,0xff1f2f24,0xf81b3420,0x8c1b3d1e,0x29151515,
3206 0x4b426a46,0xf64b7856,0xff497454,0xff588b61,0xff5d9866,0xff53935c,0xff3a7843,0xff4c7853,0xff244d2b,0xff1f3f25,0xff27392c,0xff222b25,0xd71d4222,0x50161c17,
3207 0x854a7e51,0xff406a4b,0xff4a7a54,0xff589461,0xff5ca464,0xff4d9a55,0xff4a8a52,0xff678f6d,0xff19461e,0xff1d3e23,0xff2a3d2f,0xff2a312d,0xf5213c25,0x7419251a,
3208 0xa2488250,0xff355f40,0xff43774d,0xff4c8d55,0xff4a9953,0xff569e5e,0xff9fbfa2,0xffdee4df,0xff173d1c,0xff1b3820,0xff2d3d31,0xff313633,0xfe253928,0x891c291d,
3209 0x9d3c7843,0xff2d5837,0xff36693f,0xff397a42,0xff307d3a,0xff1e6d27,0xff9ebaa2,0xff95a497,0xff0e2c12,0xff1e3522,0xff323d34,0xff343836,0xfc263a29,0x8b1b261c,
3210 0x7b2c6232,0xff275831,0xff295932,0xff2b6633,0xff21652a,0xff225c29,0xffe0e7e1,0xff4b5f4e,0xff1c311f,0xff29382c,0xff39403b,0xff353736,0xf1253a28,0x7c191f1a,
3211 0x441a391d,0xe8235d2c,0xff1f4827,0xff25552c,0xff25552b,0xff57775c,0xfff7f8f7,0xff6a766c,0xff2b392e,0xff363f38,0xff3c403e,0xff2f3431,0xd2213624,0x5d151615,
3212 0x1e101210,0x911b5422,0xfa194420,0xff224228,0xff2a482f,0xff334b37,0xff415044,0xff2c392f,0xff343c36,0xff3b403d,0xff343636,0xf0263729,0x911b231c,0x37101010,
3213 0xb131313,0x36142015,0xaa194d20,0xf81d4022,0xff243728,0xff2b392e,0xff2e3931,0xff323834,0xff343735,0xff2f3531,0xf0263729,0xa51d291e,0x4f141414,0x170c0c0c,
3214 0x2040404,0x10111111,0x39171c17,0x8c1b3e1f,0xd71e4623,0xf5224026,0xfe253d29,0xfc273b29,0xf1253a28,0xd2213624,0x911b231c,0x4f141414,0x1d0b0b0b,0x6010101,
3215 0x0,0x3101010,0xe181818,0x29151515,0x50161c17,0x7419251a,0x891c291d,0x8b1b261c,0x7c191f1a,0x5d151615,0x37101010,0x170c0c0c,0x6010101,0x1000000
3216};
3217
3218static const QRgb WordGame_data[] = {
3219 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
3220 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
3221 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
3222 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
3223 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xffffffdd,0xfff8edc5,0xffe9d9aa,0xffe9d9aa,
3224 0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,
3225 0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffd2bd87,0xff8d7132,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
3226 0xfff8edc5,0xffe4d2a3,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,
3227 0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffa38441,0xff312600,0x5c000000,
3228 0x3d000000,0x25000000,0x17000000,0x2e000000,0xffe9d9aa,0xffcab37a,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,
3229 0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,
3230 0xffac8b46,0xff755d22,0xff000000,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xffe9d9aa,0xffcab37a,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,
3231 0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,
3232 0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xff755d22,0xff000000,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xffe7d7a8,0xffc7b079,
3233 0xffa88744,0xffa58543,0xffa08141,0xff997b3d,0xff92763b,0xff8d7139,0xff7d6432,0xff544120,0xff3d2e16,0xff382914,0xff3b2b15,0xff594522,0xff796030,0xffac8b46,
3234 0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xff755d22,0xff000000,0x93000000,0x62000000,0x3b000000,
3235 0x1f000000,0x3d000000,0xffe5d5a7,0xffc1aa74,0xff9d7f40,0xff96783c,0xff8a6f38,0xff7a6030,0xff6b552a,0xff392b15,0xff0a0502,0xff0b0502,0xff0d0602,0xff0f0703,
3236 0xff110803,0xff120903,0xff120903,0xff2f200f,0xff896a34,0xffa37e3d,0xffa17b3b,0xffa07a3a,0xffa07a3a,0xffa17b3b,0xffa27d3c,0xffa4803e,0xffa78441,0xff735a21,
3237 0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xffe9d9aa,0xffcab37a,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xff503d1e,0xff120903,
3238 0xff120903,0xff120903,0xff1c1207,0xff3c2c15,0xff302210,0xff120903,0xff120903,0xff120803,0xff1b1007,0xff886832,0xffa17b3b,0xffa07a3a,0xffa07a3a,0xffa17b3a,
3239 0xffa27d3c,0xffa4803e,0xffa78441,0xff735a21,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xffe9d9aa,0xffcab37a,0xffac8b46,0xffac8b46,
3240 0xffac8b46,0xff836834,0xff120903,0xff120903,0xff1c1207,0xff6f582b,0xffac8b46,0xffac8b46,0xffac8b46,0xff997b3e,0xff453419,0xff120903,0xff120903,0xff3c2c15,
3241 0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xff755d22,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
3242 0xffd4b784,0xffba9a62,0xffa27c3b,0xffa68340,0xffaa8944,0xff453419,0xff120903,0xff120903,0xff836834,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,
3243 0xffac8b46,0xff3c2c15,0xff120903,0xff120903,0xff8f7339,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xff755d22,0xff000000,0x99000000,
3244 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xffa38b63,0xff967b4e,0xff8f6d34,0xff9f7c3d,0xffaa8944,0xff120903,0xff120903,0xff302210,0xffac8b46,0xffac8b46,
3245 0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xff796030,0xff120903,0xff120903,0xff5f4b25,0xff997b3e,0xff91743b,0xff8d7139,0xff8d7139,0xff91743b,
3246 0xff97793d,0xff6c561f,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff887b5f,0xff84724d,0xff876c36,0xff9d7e40,0xff836834,0xff120903,
3247 0xff120903,0xff594522,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffa28342,0xff120903,0xff120803,0xff332512,0xff7e6432,
3248 0xff6a542a,0xff604b25,0xff604b25,0xff685228,0xff765d2e,0xff5b481b,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xffe9d9aa,0xffcab37a,
3249 0xffac8b46,0xffac8b46,0xff836834,0xff120903,0xff120903,0xff644d26,0xffa88542,0xffa78341,0xffa68340,0xffa68240,0xffa68340,0xffa78341,0xffa88542,0xffa98643,
3250 0xff120903,0xff120903,0xff3c2c15,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xff755d22,0xff000000,0x99000000,0x66000000,0x3d000000,
3251 0x1f000000,0x3d000000,0xffe9d9aa,0xffcab37a,0xffac8b46,0xffac8b46,0xff836834,0xff120903,0xff120803,0xff604822,0xff9f7939,0xff9c7536,0xff9b7234,0xff9a7134,
3252 0xff9a7234,0xff9d7536,0xff9f7939,0xffa37e3d,0xff120803,0xff120903,0xff3c2c15,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xff755d22,
3253 0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xffe9d9aa,0xffcab37a,0xffac8b46,0xffac8b46,0xff997b3e,0xff120903,0xff120903,0xff453419,
3254 0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xff836834,0xff120903,0xff120903,0xff503d1e,0xffac8b46,0xffac8b46,0xffac8b46,
3255 0xffac8b46,0xffac8b46,0xffac8b46,0xff755d22,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xffdfd0a3,0xffb19c6a,0xff876c36,0xff7a6030,
3256 0xff6f582c,0xff170f07,0xff0b0502,0xff110a05,0xff685229,0xff796030,0xff886d36,0xff624c26,0xff3a2a14,0xff836834,0xffac8b46,0xff453419,0xff120903,0xff120903,
3257 0xff6f582b,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xff755d22,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
3258 0xffe6d6a7,0xffc1ab74,0xff9f8040,0xff9a7c3f,0xff96783c,0xff574422,0xff0f0703,0xff100703,0xff46351a,0xff9a7c3f,0xffa08140,0xff2d200f,0xff120903,0xff120903,
3259 0xff453419,0xff120903,0xff120903,0xff120903,0xffa28342,0xffac8b46,0xffac8b46,0xffac8b46,0xffa68743,0xffa28342,0xff9c7e3f,0xff634e1c,0xff000000,0x99000000,
3260 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xffe8d7a7,0xffcab37a,0xffac8b46,0xffac8b46,0xffac8b46,0xffa28342,0xff1c1207,0xff120903,0xff120903,0xff302210,
3261 0xff6f582b,0xff836834,0xff3c2c15,0xff120903,0xff120803,0xff110803,0xff110703,0xff5a401d,0xff997033,0xff9d7536,0xffa27d3c,0xffa88642,0xffaa8945,0xffa98844,
3262 0xffa68743,0xff6f5820,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xffe8d8a9,0xffcab37a,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,
3263 0xff8f7339,0xff1c1207,0xff120903,0xff120903,0xff120903,0xff120903,0xff120903,0xff110803,0xff100703,0xff0d0602,0xff0c0502,0xff443218,0xff6c5227,0xff765a2b,
3264 0xff866833,0xff93763a,0xff9f8040,0xffa58443,0xffa78744,0xff745c22,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xffe9d9aa,0xffcab37a,
3265 0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffa28342,0xff503d1e,0xff1c1207,0xff120903,0xff120903,0xff120903,0xff110803,0xff2a1d0e,0xff160d05,
3266 0xff0c0602,0xff0c0602,0xff20160a,0xff755c2e,0xff8a6e37,0xff95783c,0xff9f8040,0xffa58443,0xffa78744,0xff745c22,0xff000000,0x99000000,0x66000000,0x3d000000,
3267 0x1f000000,0x3d000000,0xffe9d9aa,0xffcab37a,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xff8f7339,0xff836834,
3268 0xff836834,0xffa28342,0xffac8b46,0xffa28342,0xff453419,0xff120903,0xff3c2c15,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xff755d22,
3269 0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xffb7a883,0xffa99465,0xff9b7c3f,0xffa58543,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,
3270 0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xff836834,0xff8f7339,0xffac8b46,0xffac8b46,0xffac8b46,
3271 0xffac8b46,0xffac8b46,0xffac8b46,0xff755d22,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xffb7a984,0xffa99565,0xff9b7c3f,0xffa58543,
3272 0xffac8b46,0xffaa8944,0xffa5803e,0xff9f7939,0xff9a7133,0xff976e31,0xff986f32,0xff9b7335,0xff9f7939,0xffa47f3e,0xffa78341,0xffa98643,0xffaa8844,0xffab8a45,
3273 0xff7c6233,0xff1b100c,0xffac8b46,0xff7c6233,0xff1b100c,0xff7c6233,0xffac8b46,0xff755d22,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
3274 0xffe9d9aa,0xffcab37a,0xffac8b46,0xffac8b46,0xffac8b46,0xffab8a45,0xffa98743,0xffa78441,0xffa5813f,0xffa4803e,0xffa5803e,0xffa68240,0xffa88541,0xffa98743,
3275 0xffaa8944,0xffab8945,0xffab8a45,0xffac8b46,0xffac8b46,0xff1b100c,0xffac8b46,0xff1b100c,0xffac8b46,0xff1b100c,0xffac8b46,0xff755d22,0xff000000,0x99000000,
3276 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xffe9d9aa,0xffcab37a,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,
3277 0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xff7c6233,0xff1b100c,0xff7c6233,0xff7c6233,0xff1b100c,0xff765d30,
3278 0xff9c7e3f,0xff634e1c,0xff000000,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xffe9d9aa,0xffcab37a,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,
3279 0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,
3280 0xffac8b46,0xffac8b46,0xffaa8945,0xffa98844,0xffa68743,0xff6f5820,0xff000000,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xffd2bd87,0xffa38441,
3281 0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,
3282 0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff483900,0xff000000,0x87000000,0x5a000000,0x36000000,
3283 0x17000000,0x2e000000,0xff8d7132,0xff312600,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
3284 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
3285 0xff000000,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
3286 0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,
3287 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
3288 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,
3289 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
3290 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
3291 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
3292 0x18000000,0xf000000
3293};
3294
3295static const QRgb accessories_data[] = {
3296 0x0,0x0,0x0,0x0,0xffffff,0xcc9900,0xcc9900,0xcccc33,0xcc9900,0xcc9900,0xcc9900,0xcccc33,0xcc9900,0xffcc66,
3297 0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x9999ff,
3298 0x0,0x0,0xffcc66,0x0,0xff000000,0xffffcc99,0xffffcc99,0xffffcc99,0xffffcc99,0xffffcc99,0xffffcc99,0xffffcc99,0xff000000,0xffcc66,
3299 0x0,0xffff99,0x0,0xff000000,0xffffcc99,0xffffcc99,0xffffcc99,0xffffcc99,0xffffcc99,0xffffcc99,0xffffcc99,0xff000000,0xffcc66,0x0,
3300 0xffcc66,0xffcc99,0xffffcc99,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffff99,0xffcc66,
3301 0xffff66,0xffffcc99,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffffcc99,0xffffcc99,0xff000000,0xffcc66,
3302 0xffffcc99,0xff000000,0xff000000,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xff000000,0xffffcc99,0xffffcc99,0xffffcc99,0xff000000,
3303 0xff000000,0xffcc99,0xff000000,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xff000000,0xff666633,0xffffcc99,0xff000000,0x0,
3304 0xffff66,0xcccc33,0xff000000,0xffffcc66,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xff000000,0xff666633,0xff000000,0xffff99,0x0,
3305 0x0,0xcc9900,0xff000000,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xff000000,0xff666633,0xff000000,0x6666cc,0x0,
3306 0x0,0xcc9933,0xff000000,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xff000000,0xff666633,0xff000000,0x0,0x0,
3307 0x0,0x0,0xff000000,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xff000000,0xff000000,0x0,0x0,0x0,
3308 0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,
3309 0x0,0xcc9900,0x0,0x0,0x0,0xcc9933,0xcc9933,0xcc9933,0xcc9933,0xffcc33,0x0,0x0,0x0,0x0
3310};
3311
3312static const QRgb appearance_data[] = {
3313 0x0,0x0,0x0,0x0,0x0,0xff404000,0xff404000,0xff404000,0xff404000,0xff404000,0xff404000,0xff404000,0x0,0x0,
3314 0x0,0x0,0x0,0xc0c0c0,0x0,0xff404000,0xff404000,0xff404000,0xff404000,0xff404000,0xff404000,0xff404000,0xff404000,0xff404000,
3315 0xff404000,0xff404000,0xdcdcdc,0x0,0x0,0x0,0xff404000,0xff404000,0xff404000,0xff404000,0xff404000,0xff404000,0xff404000,0xff404000,
3316 0xff404000,0xff404000,0xff404000,0xff404000,0xff404000,0x0,0x0,0xff404000,0xff404000,0xff404000,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,
3317 0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xff404000,0xff404000,0xff404000,0x0,0xff404000,0xff000000,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,
3318 0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xff000000,0xff404000,0x0,0xff404000,0xff000000,0xffdcdcdc,
3319 0xff000000,0xff000000,0xff000000,0xff000000,0xffdcdcdc,0xff000000,0xff000000,0xff000000,0xff000000,0xffdcdcdc,0xff000000,0xff404000,0x0,0x0,
3320 0xff000000,0xff000000,0xff000000,0xff585858,0xff585858,0xff000000,0xff000000,0xff000000,0xff585858,0xff585858,0xff000000,0xff000000,0xff000000,0x0,
3321 0x0,0xffffff,0xff000000,0xffdcdcdc,0xff000000,0xff000000,0xff000000,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xff000000,0xff000000,0xff000000,0xffdcdcdc,
3322 0xff000000,0x0,0x0,0x0,0xff000000,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,
3323 0xffdcdcdc,0xffdcdcdc,0xff000000,0x0,0x0,0xffffff,0xff000000,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xff400000,0xffdcdcdc,0xff400000,
3324 0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xff000000,0x0,0x0,0x0,0xff000000,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,
3325 0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xff000000,0x0,0x0,0x0,0x0,0xff000000,0xffdcdcdc,0xffdcdcdc,
3326 0xff800000,0xff400000,0xff400000,0xff400000,0xff800000,0xffdcdcdc,0xffdcdcdc,0xff000000,0x585858,0x0,0x0,0xdcdcdc,0xdcdcdc,0xdcdcdc,
3327 0xff000000,0xffdcdcdc,0xffdcdcdc,0xff800000,0xff800000,0xff800000,0xffdcdcdc,0xffdcdcdc,0xff000000,0xdcdcdc,0xdcdcdc,0x0,0x0,0xdcdcdc,
3328 0x0,0x0,0xdcdcdc,0xff000000,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xff000000,0xdcdcdc,0x0,0xdcdcdc,0x0,
3329 0x0,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0xdcdcdc,0xdcdcdc,
3330 0xdcdcdc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3331 0x0,0x0,0x0,0x0
3332};
3333
3334static const QRgb back_data[] = {
3335 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
3336 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x7a6c7375,0xff000000,0xff000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,0xffffff,
3337 0xffffff,0xffffff,0xffffff,0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xff000000,0x6b000000,0x24000000,0xffffff,0xffffff,0xffffff,0xffffff,
3338 0xffffff,0xffffff,0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xfffcfcfc,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,0xffffff,
3339 0xffffff,0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xffffffff,0xfff8f8f8,0xff000000,0xff000000,0xff000000,0xff000000,0x24000000,0xc000000,0xffffff,
3340 0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xffffffff,0xffffffff,0xfff5f5f5,0xff000000,0x6b000000,0x24000000,0xffffff,
3341 0xffffff,0xe0494e4f,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff6f6f6,0xfff6f6f6,0xffeeeeee,0xffd3d3d3,0xff000000,0x8f000000,0x30000000,0xffffff,
3342 0xffffff,0x69666c6d,0xfd202323,0xfffcfcfc,0xfffcfcfc,0xfff4f4f4,0xffdddddd,0xffcccccc,0xffc9c9c9,0xffc9c9c9,0xff000000,0x8f000000,0x30000000,0xffffff,
3343 0xffffff,0xd000000,0x83565b5c,0xfd202223,0xfff4f4f4,0xffededed,0xffcccccc,0xff000000,0xff000000,0xff000000,0xff000000,0x8f000000,0x30000000,0xffffff,
3344 0xffffff,0x2000000,0x14000000,0x8852585a,0xfe202324,0xffe8e8e8,0xffcbcbcb,0xff000000,0xb3000000,0x9b000000,0x8f000000,0x6b000000,0x24000000,0xffffff,
3345 0xffffff,0xffffff,0x2000000,0x14000000,0x8852585a,0xfe202324,0xffd3d3d3,0xff000000,0x9b000000,0x54000000,0x30000000,0x24000000,0xc000000,0xffffff,
3346 0xffffff,0xffffff,0xffffff,0x2000000,0x14000000,0x8852585a,0xff000000,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,0xffffff,
3347 0xffffff,0xffffff,0xffffff,0xffffff,0x2000000,0x14000000,0x45000000,0x7b000000,0x6b000000,0x24000000,0xffffff,0xffffff,0xffffff,0xffffff,
3348 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x2000000,0x10000000,0x26000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,0xffffff
3349};
3350
3351static const QRgb back_inactive_data[] = {
3352 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
3353 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x3d707070,0x7f000000,0x7f000000,0x12000000,0x6000000,0xffffff,0xffffff,0xffffff,0xffffff,
3354 0xffffff,0xffffff,0xffffff,0xffffff,0x3d707070,0x7e222222,0x7fffffff,0x7f000000,0x35000000,0x12000000,0xffffff,0xffffff,0xffffff,0xffffff,
3355 0xffffff,0xffffff,0xffffff,0x3d707070,0x7e222222,0x7fffffff,0x7ffcfcfc,0x7f000000,0x47000000,0x18000000,0xffffff,0xffffff,0xffffff,0xffffff,
3356 0xffffff,0xffffff,0x3d707070,0x7e222222,0x7fffffff,0x7fffffff,0x7ff8f8f8,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x12000000,0x6000000,0xffffff,
3357 0xffffff,0x3d707070,0x7e222222,0x7fffffff,0x7fffffff,0x7fffffff,0x7ffefefe,0x7fffffff,0x7fffffff,0x7ff5f5f5,0x7f000000,0x35000000,0x12000000,0xffffff,
3358 0xffffff,0x704c4c4c,0x7fffffff,0x7fffffff,0x7fffffff,0x7fffffff,0x7ff6f6f6,0x7ff6f6f6,0x7feeeeee,0x7fd3d3d3,0x7f000000,0x47000000,0x18000000,0xffffff,
3359 0xffffff,0x34696969,0x7e222222,0x7ffcfcfc,0x7ffcfcfc,0x7ff4f4f4,0x7fdddddd,0x7fcccccc,0x7fc9c9c9,0x7fc9c9c9,0x7f000000,0x47000000,0x18000000,0xffffff,
3360 0xffffff,0x6000000,0x41595959,0x7e222222,0x7ff4f4f4,0x7fededed,0x7fcccccc,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x47000000,0x18000000,0xffffff,
3361 0xffffff,0x1000000,0xa000000,0x44565656,0x7f222222,0x7fe8e8e8,0x7fcbcbcb,0x7f000000,0x59000000,0x4d000000,0x47000000,0x35000000,0x12000000,0xffffff,
3362 0xffffff,0xffffff,0x1000000,0xa000000,0x44565656,0x7f222222,0x7fd3d3d3,0x7f000000,0x4d000000,0x2a000000,0x18000000,0x12000000,0x6000000,0xffffff,
3363 0xffffff,0xffffff,0xffffff,0x1000000,0xa000000,0x44565656,0x7f000000,0x7f000000,0x47000000,0x18000000,0xffffff,0xffffff,0xffffff,0xffffff,
3364 0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0xa000000,0x22000000,0x3d000000,0x35000000,0x12000000,0xffffff,0xffffff,0xffffff,0xffffff,
3365 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x8000000,0x13000000,0x12000000,0x6000000,0xffffff,0xffffff,0xffffff,0xffffff
3366};
3367
3368static const QRgb background_data[] = {
3369 0x81a1a1a1,0x81a5a5a5,0x81a9a9a9,0x81acacac,0x81adadad,0x81ababab,0x81a4a4a4,0x819d9d9d,0x81989898,0x81989898,0x819f9f9f,0x81a7a7a7,0x81acacac,0x81adadad,
3370 0x81a9a9a9,0x81a4a4a4,0x819d9d9d,0x81989898,0x81969696,0x81999999,0x81a1a1a1,0x81a9a9a9,0x81aeaeae,0x81aeaeae,0x81a9a9a9,0x81a1a1a1,0x81999999,0x81939393,
3371 0x81909090,0x81939393,0x81989898,0x819d9d9d,0x81a4a4a4,0x81a5a5a5,0x81a8a8a8,0x81a8a8a8,0x81a8a8a8,0x81a7a7a7,0x81a0a0a0,0x819b9b9b,0x81959595,0x81989898,
3372 0x819d9d9d,0x81a5a5a5,0x81a9a9a9,0x81a9a9a9,0x81a4a4a4,0x819f9f9f,0x81989898,0x81959595,0x81939393,0x81999999,0x81a1a1a1,0x81a9a9a9,0x81adadad,0x81adadad,
3373 0x81a7a7a7,0x819d9d9d,0x81959595,0x81929292,0x81939393,0x81999999,0x819f9f9f,0x81a3a3a3,0x81a8a8a8,0x81a7a7a7,0x81a5a5a5,0x81a5a5a5,0x81a5a5a5,0x81a3a3a3,
3374 0x819d9d9d,0x81999999,0x81959595,0x81989898,0x819d9d9d,0x81a3a3a3,0x81a7a7a7,0x81a4a4a4,0x819f9f9f,0x819b9b9b,0x81959595,0x81939393,0x81969696,0x819c9c9c,
3375 0x81a1a1a1,0x81a8a8a8,0x81ababab,0x81ababab,0x81a5a5a5,0x819c9c9c,0x81959595,0x81959595,0x819b9b9b,0x81a1a1a1,0x81a7a7a7,0x81a8a8a8,0x81ababab,0x81a8a8a8,
3376 0x81a4a4a4,0x81a4a4a4,0x81a4a4a4,0x81a1a1a1,0x819d9d9d,0x81999999,0x81969696,0x81999999,0x819f9f9f,0x81a3a3a3,0x81a4a4a4,0x81a1a1a1,0x819f9f9f,0x819b9b9b,
3377 0x81999999,0x81999999,0x819b9b9b,0x819f9f9f,0x81a1a1a1,0x81a7a7a7,0x81a9a9a9,0x81a9a9a9,0x81a4a4a4,0x819f9f9f,0x819b9b9b,0x819c9c9c,0x81a3a3a3,0x81a9a9a9,
3378 0x81adadad,0x81adadad,0x81acacac,0x81a8a8a8,0x81a4a4a4,0x81a4a4a4,0x81a4a4a4,0x81a1a1a1,0x819f9f9f,0x819b9b9b,0x81999999,0x819c9c9c,0x81a0a0a0,0x81a3a3a3,
3379 0x81a4a4a4,0x81a3a3a3,0x81a1a1a1,0x81a1a1a1,0x81a0a0a0,0x81a0a0a0,0x81a0a0a0,0x81a1a1a1,0x81a3a3a3,0x81a5a5a5,0x81a8a8a8,0x81a8a8a8,0x81a5a5a5,0x81a1a1a1,
3380 0x81a0a0a0,0x81a3a3a3,0x81a9a9a9,0x81b0b0b0,0x81b1b1b1,0x81b0b0b0,0x81ababab,0x81a7a7a7,0x81a3a3a3,0x81a3a3a3,0x81a3a3a3,0x81a1a1a1,0x81a0a0a0,0x819f9f9f,
3381 0x819f9f9f,0x81a0a0a0,0x81a3a3a3,0x81a7a7a7,0x81a8a8a8,0x81a9a9a9,0x81a9a9a9,0x81a8a8a8,0x81a8a8a8,0x81a7a7a7,0x81a5a5a5,0x81a5a5a5,0x81a4a4a4,0x81a5a5a5,
3382 0x81a5a5a5,0x81a7a7a7,0x81a5a5a5,0x81a4a4a4,0x81a3a3a3,0x81a7a7a7,0x81acacac,0x81b0b0b0,0x81b1b1b1,0x81aeaeae,0x81a5a5a5,0x81a1a1a1,0x819f9f9f,0x819f9f9f,
3383 0x81a0a0a0,0x81a1a1a1,0x81a1a1a1,0x81a1a1a1,0x81a1a1a1,0x81a3a3a3,0x81a7a7a7,0x81a9a9a9,0x81adadad,0x81aeaeae,0x81aeaeae,0x81aeaeae,0x81adadad,0x81acacac,
3384 0x81a9a9a9,0x81a9a9a9,0x81a7a7a7,0x81a5a5a5,0x81a5a5a5,0x81a5a5a5,0x81a5a5a5,0x81a4a4a4,0x81a4a4a4,0x81a5a5a5,0x81a9a9a9,0x81acacac,0x81acacac,0x81a8a8a8,
3385 0x819f9f9f,0x819b9b9b,0x81999999,0x819b9b9b,0x819c9c9c,0x81a0a0a0,0x81a1a1a1,0x81a3a3a3,0x81a3a3a3,0x81a5a5a5,0x81a8a8a8,0x81acacac,0x81b0b0b0,0x81b2b2b2,
3386 0x81b1b1b1,0x81b0b0b0,0x81aeaeae,0x81acacac,0x81a9a9a9,0x81a9a9a9,0x81a7a7a7,0x81a5a5a5,0x81a4a4a4,0x81a4a4a4,0x81a4a4a4,0x81a3a3a3,0x81a1a1a1,0x81a3a3a3,
3387 0x81a4a4a4,0x81a4a4a4,0x81a3a3a3,0x81a0a0a0,0x81989898,0x81969696,0x81959595,0x81969696,0x819b9b9b,0x819f9f9f,0x81a1a1a1,0x81a3a3a3,0x81a4a4a4,0x81a5a5a5,
3388 0x81a9a9a9,0x81adadad,0x81b0b0b0,0x81b0b0b0,0x81b0b0b0,0x81acacac,0x81a9a9a9,0x81a7a7a7,0x81a4a4a4,0x81a4a4a4,0x81a5a5a5,0x81a5a5a5,0x81a4a4a4,0x81a4a4a4,
3389 0x81a3a3a3,0x81a3a3a3,0x81a1a1a1,0x81a0a0a0,0x819f9f9f,0x819d9d9d,0x819c9c9c,0x819b9b9b,0x81969696,0x81959595,0x81969696,0x81999999,0x819c9c9c,0x81a0a0a0,
3390 0x81a3a3a3,0x81a4a4a4,0x81a4a4a4,0x81a5a5a5,0x81a9a9a9,0x81acacac,0x81b0b0b0,0x81b0b0b0,0x81acacac,0x81a7a7a7,0x81a1a1a1,0x819d9d9d,0x819c9c9c,0x81a0a0a0,
3391 0x81a3a3a3,0x81a4a4a4,0x81a4a4a4,0x81a3a3a3,0x81a3a3a3,0x81a3a3a3,0x81a1a1a1,0x81a0a0a0,0x819d9d9d,0x819b9b9b,0x81999999,0x81989898,0x819c9c9c,0x819b9b9b,
3392 0x819c9c9c,0x819d9d9d,0x81a0a0a0,0x81a3a3a3,0x81a5a5a5,0x81a8a8a8,0x81a8a8a8,0x81a8a8a8,0x81ababab,0x81aeaeae,0x81b0b0b0,0x81adadad,0x81a7a7a7,0x819f9f9f,
3393 0x81989898,0x81959595,0x81969696,0x819c9c9c,0x81a1a1a1,0x81a4a4a4,0x81a3a3a3,0x81a1a1a1,0x81a1a1a1,0x81a1a1a1,0x81a1a1a1,0x81a1a1a1,0x81a0a0a0,0x81a0a0a0,
3394 0x819d9d9d,0x819c9c9c,0x81a3a3a3,0x81a3a3a3,0x81a1a1a1,0x81a1a1a1,0x81a3a3a3,0x81a7a7a7,0x81a9a9a9,0x81ababab,0x81ababab,0x81acacac,0x81aeaeae,0x81b0b0b0,
3395 0x81b0b0b0,0x81acacac,0x81a3a3a3,0x81999999,0x81929292,0x81929292,0x81969696,0x819d9d9d,0x81a4a4a4,0x81a7a7a7,0x81a5a5a5,0x81a1a1a1,0x81a1a1a1,0x81a1a1a1,
3396 0x81a3a3a3,0x81a4a4a4,0x81a4a4a4,0x81a4a4a4,0x81a4a4a4,0x81a4a4a4,0x81ababab,0x81a8a8a8,0x81a5a5a5,0x81a4a4a4,0x81a4a4a4,0x81a8a8a8,0x81acacac,0x81b0b0b0,
3397 0x81b0b0b0,0x81b0b0b0,0x81b0b0b0,0x81b1b1b1,0x81aeaeae,0x81a7a7a7,0x819c9c9c,0x81939393,0x81929292,0x81959595,0x819c9c9c,0x81a4a4a4,0x81ababab,0x81acacac,
3398 0x81a8a8a8,0x81a3a3a3,0x819f9f9f,0x819f9f9f,0x81a1a1a1,0x81a5a5a5,0x81a9a9a9,0x81ababab,0x81acacac,0x81acacac,0x81adadad,0x81a9a9a9,0x81a4a4a4,0x81a3a3a3,
3399 0x81a4a4a4,0x81a9a9a9,0x81aeaeae,0x81b1b1b1,0x81b0b0b0,0x81b0b0b0,0x81aeaeae,0x81adadad,0x81a8a8a8,0x819f9f9f,0x81959595,0x81929292,0x81939393,0x819b9b9b,
3400 0x81a4a4a4,0x81acacac,0x81b1b1b1,0x81b0b0b0,0x81a9a9a9,0x81a3a3a3,0x819d9d9d,0x819d9d9d,0x81a1a1a1,0x81a7a7a7,0x81acacac,0x81b0b0b0,0x81b1b1b1,0x81b0b0b0,
3401 0x81ababab,0x81a5a5a5,0x81a0a0a0,0x81a0a0a0,0x81a3a3a3,0x81a9a9a9,0x81aeaeae,0x81b1b1b1,0x81b0b0b0,0x81acacac,0x81a8a8a8,0x81a3a3a3,0x819c9c9c,0x81959595,
3402 0x81929292,0x81939393,0x819b9b9b,0x81a1a1a1,0x81a9a9a9,0x81b0b0b0,0x81b2b2b2,0x81b1b1b1,0x81a9a9a9,0x81a0a0a0,0x819b9b9b,0x819b9b9b,0x81a1a1a1,0x81a8a8a8,
3403 0x81aeaeae,0x81b2b2b2,0x81b1b1b1,0x81aeaeae,0x81a7a7a7,0x81a0a0a0,0x819c9c9c,0x819c9c9c,0x81a1a1a1,0x81a9a9a9,0x81aeaeae,0x81b1b1b1,0x81acacac,0x81a7a7a7,
3404 0x81a0a0a0,0x819b9b9b,0x81939393,0x81929292,0x81939393,0x81999999,0x81a0a0a0,0x81a5a5a5,0x81ababab,0x81b0b0b0,0x81b0b0b0,0x81adadad,0x81a5a5a5,0x819d9d9d,
3405 0x81999999,0x819b9b9b,0x81a0a0a0,0x81a8a8a8,0x81aeaeae,0x81b2b2b2,0x81b0b0b0,0x81acacac,0x819f9f9f,0x819b9b9b,0x81969696,0x81999999,0x81a0a0a0,0x81a8a8a8,
3406 0x81aeaeae,0x81aeaeae,0x81a9a9a9,0x81a1a1a1,0x81999999,0x81939393,0x81929292,0x81939393,0x819b9b9b,0x81a0a0a0,0x81a3a3a3,0x81a5a5a5,0x81a9a9a9,0x81ababab,
3407 0x81ababab,0x81a8a8a8,0x81a1a1a1,0x819b9b9b,0x81969696,0x81989898,0x819f9f9f,0x81a8a8a8,0x81adadad,0x81aeaeae,0x81ababab,0x81a4a4a4,0x81999999,0x81969696,
3408 0x81959595,0x81999999,0x81a0a0a0,0x81a8a8a8,0x81acacac,0x81adadad,0x81a7a7a7,0x819f9f9f,0x81959595,0x81929292,0x81959595,0x819b9b9b,0x81a1a1a1,0x81a5a5a5,
3409 0x81a7a7a7,0x81a7a7a7,0x81a7a7a7,0x81a7a7a7,0x81a7a7a7,0x81a4a4a4,0x819f9f9f,0x81999999,0x81959595,0x81989898,0x819f9f9f,0x81a7a7a7,0x81ababab,0x81a9a9a9,
3410 0x81a4a4a4,0x819f9f9f,0x81969696,0x81959595,0x81959595,0x819b9b9b,0x81a0a0a0,0x81a5a5a5,0x81ababab,0x81ababab,0x81a5a5a5,0x819d9d9d,0x81989898,0x81989898,
3411 0x819c9c9c,0x81a4a4a4,0x81a9a9a9,0x81ababab,0x81a9a9a9,0x81a7a7a7,0x81a4a4a4,0x81a4a4a4,0x81a4a4a4,0x81a1a1a1,0x819c9c9c,0x81999999,0x81959595,0x81999999,
3412 0x819f9f9f,0x81a4a4a4,0x81a7a7a7,0x81a4a4a4,0x819f9f9f,0x819b9b9b,0x81989898,0x81989898,0x81999999,0x819c9c9c,0x81a0a0a0,0x81a5a5a5,0x81a9a9a9,0x81a9a9a9,
3413 0x81a5a5a5,0x81a0a0a0,0x819c9c9c,0x819f9f9f,0x81a4a4a4,0x81acacac,0x81b0b0b0,0x81b0b0b0,0x81ababab,0x81a8a8a8,0x81a4a4a4,0x81a4a4a4,0x81a3a3a3,0x81a1a1a1,
3414 0x819d9d9d,0x81999999,0x81989898,0x819b9b9b,0x81a0a0a0,0x81a4a4a4,0x81a4a4a4,0x81a1a1a1,0x819d9d9d,0x819b9b9b,0x819f9f9f,0x819f9f9f,0x819f9f9f,0x81a0a0a0,
3415 0x81a1a1a1,0x81a4a4a4,0x81a7a7a7,0x81a8a8a8,0x81a5a5a5,0x81a3a3a3,0x81a1a1a1,0x81a4a4a4,0x81a9a9a9,0x81b0b0b0,0x81b2b2b2,0x81b0b0b0,0x81ababab,0x81a7a7a7,
3416 0x81a4a4a4,0x81a3a3a3,0x81a3a3a3,0x81a1a1a1,0x819f9f9f,0x819c9c9c,0x819b9b9b,0x819f9f9f,0x81a1a1a1,0x81a3a3a3,0x81a3a3a3,0x81a1a1a1,0x81a1a1a1,0x819f9f9f,
3417 0x81a7a7a7,0x81a5a5a5,0x81a5a5a5,0x81a4a4a4,0x81a4a4a4,0x81a4a4a4,0x81a5a5a5,0x81a5a5a5,0x81a5a5a5,0x81a4a4a4,0x81a4a4a4,0x81a7a7a7,0x81ababab,0x81b0b0b0,
3418 0x81b0b0b0,0x81adadad,0x81a9a9a9,0x81a4a4a4,0x81a1a1a1,0x81a1a1a1,0x81a1a1a1,0x81a1a1a1,0x81a1a1a1,0x81a0a0a0,0x81a0a0a0,0x81a1a1a1,0x81a4a4a4,0x81a7a7a7,
3419 0x81a8a8a8,0x81a8a8a8,0x81a8a8a8,0x81a8a8a8,0x81adadad,0x81ababab,0x81a9a9a9,0x81a8a8a8,0x81a7a7a7,0x81a5a5a5,0x81a4a4a4,0x81a4a4a4,0x81a4a4a4,0x81a3a3a3,
3420 0x81a3a3a3,0x81a4a4a4,0x81a7a7a7,0x81a9a9a9,0x81a8a8a8,0x81a5a5a5,0x81a1a1a1,0x819f9f9f,0x819c9c9c,0x819d9d9d,0x819f9f9f,0x81a1a1a1,0x81a1a1a1,0x81a3a3a3,
3421 0x81a3a3a3,0x81a5a5a5,0x81a8a8a8,0x81ababab,0x81adadad,0x81aeaeae,0x81aeaeae,0x81aeaeae,0x81b0b0b0,0x81adadad,0x81ababab,0x81a9a9a9,0x81a7a7a7,0x81a5a5a5,
3422 0x81a4a4a4,0x81a4a4a4,0x81a3a3a3,0x81a3a3a3,0x81a1a1a1,0x81a1a1a1,0x81a1a1a1,0x81a1a1a1,0x81a0a0a0,0x819d9d9d,0x819b9b9b,0x81999999,0x81999999,0x81999999,
3423 0x819c9c9c,0x81a0a0a0,0x81a3a3a3,0x81a4a4a4,0x81a8a8a8,0x81ababab,0x81aeaeae,0x81b1b1b1,0x81b2b2b2,0x81b2b2b2,0x81b1b1b1,0x81b0b0b0,0x81a9a9a9,0x81a8a8a8,
3424 0x81a5a5a5,0x81a5a5a5,0x81a5a5a5,0x81a5a5a5,0x81a4a4a4,0x81a4a4a4,0x81a3a3a3,0x81a3a3a3,0x81a1a1a1,0x81a0a0a0,0x819d9d9d,0x819c9c9c,0x819b9b9b,0x81999999,
3425 0x81969696,0x81959595,0x81959595,0x81969696,0x819b9b9b,0x81a0a0a0,0x81a3a3a3,0x81a8a8a8,0x81acacac,0x81b0b0b0,0x81b3b3b3,0x81b5b5b5,0x81b3b3b3,0x81b1b1b1,
3426 0x81aeaeae,0x81acacac,0x81a3a3a3,0x81a0a0a0,0x819f9f9f,0x81a0a0a0,0x81a3a3a3,0x81a4a4a4,0x81a4a4a4,0x81a3a3a3,0x81a3a3a3,0x81a3a3a3,0x81a1a1a1,0x81a1a1a1,
3427 0x819f9f9f,0x819d9d9d,0x819b9b9b,0x81999999,0x81989898,0x81989898,0x81989898,0x819b9b9b,0x819d9d9d,0x81a1a1a1,0x81a7a7a7,0x81ababab,0x81b0b0b0,0x81b5b5b5,
3428 0x81b5b5b5,0x81b2b2b2,0x81aeaeae,0x81acacac,0x81a9a9a9,0x81a7a7a7,0x819b9b9b,0x81969696,0x81969696,0x819c9c9c,0x81a0a0a0,0x81a3a3a3,0x81a3a3a3,0x81a1a1a1,
3429 0x81a1a1a1,0x81a1a1a1,0x81a3a3a3,0x81a3a3a3,0x81a1a1a1,0x81a1a1a1,0x81a0a0a0,0x81a0a0a0,0x819f9f9f,0x819f9f9f,0x819f9f9f,0x81a0a0a0,0x81a1a1a1,0x81a4a4a4,
3430 0x81a9a9a9,0x81aeaeae,0x81b3b3b3,0x81b5b5b5,0x81b1b1b1,0x81aeaeae,0x81a9a9a9,0x81a7a7a7,0x81a3a3a3,0x819d9d9d,0x81939393,0x81929292,0x81959595,0x819c9c9c,
3431 0x81a3a3a3,0x81a7a7a7,0x81a5a5a5,0x81a1a1a1,0x81a1a1a1,0x81a1a1a1,0x81a3a3a3,0x81a4a4a4,0x81a7a7a7,0x81a8a8a8,0x81a8a8a8,0x81a8a8a8,0x81a7a7a7,0x81a5a5a5,
3432 0x81a4a4a4,0x81a3a3a3,0x81a4a4a4,0x81a7a7a7,0x81acacac,0x81b1b1b1,0x81b5b5b5,0x81b2b2b2,0x81adadad,0x81a8a8a8,0x81a4a4a4,0x81a1a1a1,0x819c9c9c,0x81989898,
3433 0x81909090,0x81939393,0x819b9b9b,0x81a3a3a3,0x81a9a9a9,0x81ababab,0x81a8a8a8,0x81a3a3a3,0x819f9f9f,0x81a0a0a0,0x81a1a1a1,0x81a7a7a7,0x81a9a9a9,0x81adadad,
3434 0x81aeaeae,0x81aeaeae,0x81acacac,0x81a9a9a9,0x81a5a5a5,0x81a3a3a3,0x81a4a4a4,0x81a9a9a9,0x81aeaeae,0x81b3b3b3,0x81b2b2b2,0x81aeaeae,0x81a9a9a9,0x81a4a4a4,
3435 0x81a1a1a1,0x819c9c9c,0x81969696,0x81929292,0x81939393,0x81999999,0x81a1a1a1,0x81a9a9a9,0x81b0b0b0,0x81b0b0b0,0x81ababab,0x81a3a3a3,0x819d9d9d,0x819d9d9d,
3436 0x81a1a1a1,0x81a8a8a8,0x81adadad,0x81b1b1b1,0x81b1b1b1,0x81b1b1b1,0x81adadad,0x81a8a8a8,0x81a3a3a3,0x81a1a1a1,0x81a4a4a4,0x81a9a9a9,0x81b0b0b0,0x81b3b3b3,
3437 0x81b1b1b1,0x81ababab,0x81a5a5a5,0x81a1a1a1,0x819c9c9c,0x81989898,0x81929292,0x81909090,0x81999999,0x81a0a0a0,0x81a8a8a8,0x81aeaeae,0x81b2b2b2,0x81b1b1b1,
3438 0x81ababab,0x81a1a1a1,0x819c9c9c,0x819b9b9b,0x81a0a0a0,0x81a8a8a8,0x81aeaeae,0x81b1b1b1,0x81b1b1b1,0x81aeaeae,0x81a9a9a9,0x81a3a3a3,0x819f9f9f,0x819d9d9d,
3439 0x81a3a3a3,0x81a9a9a9,0x81b0b0b0,0x81b1b1b1,0x81adadad,0x81a8a8a8,0x81a1a1a1,0x819c9c9c,0x81969696,0x81929292,0x81909090,0x81939393,0x819d9d9d,0x81a3a3a3,
3440 0x81a9a9a9,0x81b0b0b0,0x81b1b1b1,0x81aeaeae,0x81a7a7a7,0x819f9f9f,0x81999999,0x81999999,0x819f9f9f,0x81a7a7a7,0x81aeaeae,0x81b1b1b1,0x81aeaeae,0x81ababab,
3441 0x81a3a3a3,0x819d9d9d,0x81999999,0x819c9c9c,0x81a1a1a1,0x81a9a9a9,0x81b0b0b0,0x81b0b0b0,0x81ababab,0x81a4a4a4,0x819c9c9c,0x81989898,0x81929292,0x81909090,
3442 0x81939393,0x81999999
3443};
3444
3445static const QRgb beam_data[] = {
3446 0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,
3447 0xdcdcdc,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xdcdcdc,
3448 0xffc3c3c3,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xffc3c3c3,
3449 0xdcdcdc,0xdcdcdc,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xdcdcdc,0xdcdcdc,
3450 0xdcdcdc,0xffa0a0a0,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xffa0a0a0,0xdcdcdc,
3451 0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff808080,0xff808080,0xff808080,0xff808080,0xff808080,0xff808080,0xff808080,0xff808080,0xdcdcdc,0xdcdcdc,0xdcdcdc,
3452 0xdcdcdc,0xdcdcdc,0xff808080,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff808080,0xdcdcdc,0xdcdcdc,
3453 0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff585858,0xff585858,0xff585858,0xff585858,0xff585858,0xff585858,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,
3454 0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff585858,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff585858,0xdcdcdc,0xdcdcdc,0xdcdcdc,
3455 0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff303030,0xff303030,0xff303030,0xff303030,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,
3456 0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff303030,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff303030,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,
3457 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,
3459 0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc
3460};
3461
3462static const QRgb bell_data[] = {
3463 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x95050505,0x1c000000,0x32000000,0x2d000000,0x10000000,0xffffff,0xffffff,
3464 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0x56000000,0xb6959595,0xc58c8c8c,0x62000000,0x14000000,0xffffff,
3465 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffcacaca,0xff000000,0x8e000000,0x93000000,0xffe2e2e2,0xe69b9b9b,0x69000000,0x14000000,
3466 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffcacaca,0xffffffff,0xff000000,0xc6585858,0xba5c5c5c,0xb7000000,0xffe2e2e2,0xe39c9c9c,0x47000000,
3467 0xff000000,0xff000000,0xff000000,0xff000000,0xffcacaca,0xffffffff,0xffffffff,0xff000000,0xb6000000,0xffe2e2e2,0xc4595959,0xc1000000,0xffe2e2e2,0x71000000,
3468 0xff000000,0xffbababa,0xffbababa,0xffbababa,0xffeaeaea,0xffeaeaea,0xffeaeaea,0xff000000,0x9e000000,0xae000000,0xffe2e2e2,0xc4000000,0xffe2e2e2,0x7d000000,
3469 0xff000000,0xffcfcfcf,0xffcfcfcf,0xffcfcfcf,0xffcfcfcf,0xffcfcfcf,0xffcfcfcf,0xff000000,0x8f000000,0x95000000,0xffe2e2e2,0xd1000000,0xffe2e2e2,0x7d000000,
3470 0xff000000,0xff8d8d8d,0xff8d8d8d,0xff8d8d8d,0xffb4b4b4,0xffb3b3b3,0xffb3b3b3,0xff000000,0x9e000000,0xae000000,0xffe2e2e2,0xc4000000,0xffe2e2e2,0x7d000000,
3471 0xff000000,0xff000000,0xff000000,0xff000000,0xff7c7c7c,0xff9d9d9d,0xff9d9d9d,0xff000000,0xb6000000,0xffe2e2e2,0xc4595959,0xc1000000,0xffe2e2e2,0x71000000,
3472 0x24000000,0x6b000000,0x8f000000,0x8f000000,0xff000000,0xff7c7c7c,0xff9d9d9d,0xff000000,0xc6585858,0xba5c5c5c,0xb7000000,0xffe2e2e2,0xe39c9c9c,0x47000000,
3473 0xc000000,0x24000000,0x30000000,0x30000000,0x48000000,0xff000000,0xff7c7c7c,0xff000000,0xa1000000,0x96000000,0xffe2e2e2,0xe69b9b9b,0x69000000,0x14000000,
3474 0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x3c000000,0xff000000,0xff000000,0x9c000000,0xbd909090,0xc58c8c8c,0x62000000,0x14000000,0xffffff,
3475 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x3c000000,0xc8030303,0x82000000,0x51000000,0x2d000000,0x10000000,0xffffff,0xffffff,
3476 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x31000000,0x3f000000,0x19000000,0xffffff,0xffffff,0xffffff,0xffffff
3477};
3478
3479static const unsigned char bg_data[] = {
3480 0x50,0x1a,0x0e,0x03,0x2d,0x2f,0x44,0x29,0x34,0x13,0x52,0x10,0x35,0x2d,
3481 0x05,0x44,0x29,0x13,0x3f,0x01,0x50,0x05,0x22,0x4d,0x38,0x1c,0x0a,0x4f,
3482 0x18,0x15,0x2c,0x07,0x44,0x1a,0x39,0x30,0x30,0x10,0x47,0x32,0x14,0x34,
3483 0x28,0x3b,0x38,0x0e,0x44,0x52,0x13,0x14,0x40,0x0a,0x50,0x0e,0x2e,0x2e,
3484 0x10,0x28,0x14,0x41,0x4f,0x3e,0x1e,0x1b,0x39,0x10,0x1a,0x1a,0x3b,0x1b,
3485 0x28,0x0a,0x14,0x13,0x28,0x1b,0x10,0x44,0x51,0x32,0x14,0x40,0x0c,0x08,
3486 0x50,0x39,0x2f,0x2f,0x3b,0x53,0x14,0x14,0x32,0x50,0x10,0x30,0x2f,0x39,
3487 0x44,0x44,0x44,0x46,0x28,0x0a,0x3f,0x0a,0x52,0x1b,0x44,0x46,0x52,0x2a,
3488 0x0a,0x0a,0x32,0x52,0x46,0x10,0x38,0x0e,0x44,0x52,0x32,0x53,0x25,0x0e,
3489 0x4e,0x0b,0x03,0x39,0x44,0x44,0x44,0x46,0x52,0x2a,0x01,0x53,0x47,0x1b,
3490 0x44,0x1b,0x46,0x50,0x27,0x27,0x47,0x1c,0x1b,0x1a,0x39,0x39,0x1a,0x46,
3491 0x47,0x1b,0x0e,0x2b,0x4b,0x21,0x37,0x10,0x1b,0x1b,0x1b,0x46,0x47,0x52,
3492 0x52,0x1d,0x1b,0x10,0x39,0x0e,0x0e,0x30,0x39,0x10,0x1a,0x1a,0x44,0x1a,
3493 0x1a,0x10,0x1a,0x44,0x1b,0x43,0x35,0x21,0x4b,0x22,0x3b,0x1c,0x51,0x51,
3494 0x47,0x1c,0x46,0x46,0x46,0x1b,0x10,0x05,0x2e,0x4d,0x4d,0x4d,0x4e,0x03,
3495 0x38,0x0e,0x10,0x1a,0x1a,0x1a,0x1a,0x44,0x44,0x1a,0x0e,0x03,0x04,0x30,
3496 0x52,0x2a,0x01,0x32,0x53,0x27,0x46,0x1b,0x1b,0x1a,0x0f,0x03,0x21,0x1f,
3497 0x4b,0x21,0x22,0x03,0x05,0x0e,0x10,0x1a,0x44,0x44,0x44,0x1b,0x46,0x1b,
3498 0x44,0x44,0x1b,0x26,0x13,0x3f,0x14,0x3f,0x32,0x1e,0x46,0x1b,0x44,0x1a,
3499 0x0e,0x2e,0x21,0x21,0x2b,0x03,0x0e,0x10,0x44,0x44,0x1a,0x1a,0x44,0x44,
3500 0x1b,0x1b,0x46,0x47,0x51,0x28,0x08,0x32,0x3f,0x14,0x0c,0x0a,0x53,0x1d,
3501 0x1b,0x44,0x44,0x1a,0x0e,0x03,0x4c,0x2b,0x04,0x10,0x1c,0x28,0x53,0x27,
3502 0x45,0x44,0x44,0x1b,0x1b,0x1b,0x46,0x47,0x28,0x2a,0x33,0x34,0x08,0x2a,
3503 0x08,0x29,0x27,0x1b,0x1a,0x39,0x39,0x39,0x0d,0x02,0x4c,0x2e,0x10,0x51,
3504 0x34,0x36,0x3f,0x31,0x1c,0x44,0x1b,0x46,0x46,0x46,0x46,0x46,0x47,0x27,
3505 0x28,0x53,0x1b,0x1b,0x46,0x46,0x1b,0x10,0x0e,0x2f,0x2f,0x04,0x02,0x21,
3506 0x21,0x35,0x25,0x0a,0x16,0x41,0x3f,0x28,0x44,0x43,0x1a,0x46,0x1c,0x1c,
3507 0x1b,0x44,0x44,0x44,0x44,0x44,0x37,0x0f,0x1a,0x44,0x44,0x39,0x03,0x4c,
3508 0x2b,0x2b,0x21,0x4b,0x02,0x10,0x08,0x40,0x24,0x36,0x31,0x44,0x37,0x35,
3509 0x39,0x1b,0x52,0x1e,0x46,0x1a,0x0e,0x0d,0x04,0x04,0x2d,0x38,0x44,0x1b,
3510 0x44,0x0e,0x22,0x4b,0x21,0x4c,0x22,0x2e,0x19,0x52,0x14,0x41,0x40,0x2a,
3511 0x11,0x04,0x00,0x21,0x05,0x45,0x29,0x28,0x46,0x43,0x04,0x21,0x4b,0x21,
3512 0x2f,0x1a,0x26,0x27,0x1b,0x05,0x4d,0x4b,0x2b,0x03,0x39,0x1b,0x53,0x14,
3513 0x41,0x40,0x32,0x46,0x0e,0x2b,0x1f,0x00,0x0e,0x47,0x09,0x2a,0x50,0x39,
3514 0x02,0x1f,0x4b,0x4d,0x10,0x1d,0x54,0x53,0x46,0x0e,0x4d,0x20,0x03,0x06,
3515 0x27,0x32,0x40,0x41,0x40,0x3d,0x27,0x3b,0x0d,0x2b,0x21,0x23,0x1a,0x28,
3516 0x0a,0x32,0x27,0x39,0x4d,0x1f,0x4c,0x04,0x48,0x32,0x3f,0x01,0x47,0x0f,
3517 0x02,0x22,0x38,0x1c,0x0a,0x15,0x41,0x40,0x32,0x27,0x1b,0x1a,0x0e,0x2f,
3518 0x2f,0x17,0x46,0x2a,0x3f,0x13,0x51,0x39,0x2e,0x22,0x0d,0x44,0x0a,0x3f,
3519 0x14,0x0a,0x27,0x19,0x03,0x2e,0x10,0x52,0x14,0x16,0x14,0x2a,0x46,0x3b,
3520 0x10,0x10,0x10,0x43,0x10,0x44,0x52,0x0a,0x14,0x13,0x51,0x10,0x37,0x05,
3521 0x44,0x52,0x3f,0x14,0x14,0x32,0x27,0x1a,0x37,0x37,0x3b,0x28,0x34,0x34,
3522 0x53,0x11,0x0e,0x0d,0x0e,0x10,0x44,0x44,0x44,0x46,0x53,0x0a,0x14,0x0a,
3523 0x51,0x44,0x43,0x44,0x51,0x32,0x13,0x13,0x0a,0x53,0x1d,0x1a,0x0e,0x0e,
3524 0x1a,0x1d,0x53,0x52,0x44,0x04,0x2b,0x2b,0x2f,0x39,0x44,0x44,0x1b,0x1c,
3525 0x07,0x0a,0x34,0x09,0x27,0x44,0x44,0x1c,0x29,0x32,0x52,0x52,0x1e,0x47,
3526 0x46,0x44,0x10,0x39,0x1a,0x1b,0x46,0x44,0x05,0x21,0x1f,0x21,0x2f,0x10,
3527 0x44,0x1b,0x1b,0x46,0x1e,0x31,0x2a,0x52,0x1c,0x1b,0x1b,0x46,0x50,0x51,
3528 0x10,0x1a,0x3b,0x44,0x44,0x44,0x1a,0x1a,0x1a,0x44,0x44,0x10,0x2f,0x4c,
3529 0x21,0x4e,0x0e,0x44,0x46,0x1c,0x46,0x46,0x50,0x47,0x47,0x46,0x44,0x10,
3530 0x19,0x39,0x39,0x19,0x2e,0x2f,0x38,0x39,0x10,0x1a,0x44,0x44,0x44,0x1b,
3531 0x1b,0x44,0x43,0x0e,0x0f,0x1a,0x46,0x1e,0x53,0x07,0x52,0x1c,0x46,0x1b,
3532 0x1b,0x1a,0x30,0x2f,0x2d,0x02,0x02,0x02,0x4c,0x2e,0x2f,0x0e,0x10,0x1a,
3533 0x44,0x44,0x1b,0x1b,0x46,0x46,0x46,0x46,0x47,0x28,0x2a,0x0a,0x0a,0x0a,
3534 0x31,0x27,0x1b,0x44,0x39,0x2f,0x02,0x4b,0x1f,0x1f,0x4b,0x21,0x05,0x39,
3535 0x1a,0x1a,0x1a,0x1a,0x44,0x44,0x1b,0x1b,0x46,0x47,0x28,0x53,0x32,0x0a,
3536 0x0c,0x14,0x14,0x3f,0x2a,0x27,0x1b,0x39,0x04,0x21,0x12,0x3c,0x12,0x4b,
3537 0x22,0x03,0x1b,0x27,0x52,0x27,0x1b,0x44,0x44,0x1b,0x1b,0x1b,0x46,0x1c,
3538 0x52,0x29,0x09,0x0a,0x13,0x13,0x13,0x09,0x28,0x46,0x10,0x2f,0x21,0x3c,
3539 0x3c,0x1f,0x4d,0x03,0x38,0x10,0x32,0x0c,0x3f,0x08,0x1d,0x1b,0x1b,0x46,
3540 0x46,0x46,0x1b,0x1b,0x46,0x46,0x47,0x27,0x52,0x52,0x52,0x27,0x1c,0x44,
3541 0x0e,0x4d,0x49,0x3c,0x4b,0x02,0x38,0x10,0x45,0x4a,0x15,0x41,0x14,0x53,
3542 0x1b,0x10,0x1a,0x46,0x1c,0x1c,0x1b,0x44,0x10,0x19,0x39,0x39,0x10,0x3b,
3543 0x44,0x1b,0x44,0x43,0x03,0x4b,0x3c,0x1f,0x2e,0x30,0x44,0x50,0x53,0x34,
3544 0x18,0x15,0x32,0x25,0x0e,0x2f,0x39,0x1b,0x1e,0x27,0x46,0x10,0x05,0x2e,
3545 0x02,0x02,0x03,0x0e,0x1a,0x1b,0x44,0x0e,0x4d,0x12,0x1f,0x4d,0x0e,0x44,
3546 0x50,0x53,0x3f,0x41,0x4f,0x0a,0x1c,0x05,0x2b,0x21,0x0d,0x1b,0x28,0x28,
3547 0x46,0x19,0x2e,0x4b,0x4b,0x20,0x2e,0x0f,0x1b,0x46,0x44,0x05,0x21,0x12,
3548 0x00,0x2f,0x3b,0x50,0x53,0x34,0x16,0x18,0x0a,0x27,0x39,0x22,0x1f,0x4b,
3549 0x37,0x46,0x08,0x2a,0x47,0x19,0x02,0x4b,0x4b,0x4d,0x42,0x1b,0x52,0x28,
3550 0x45,0x05,0x21,0x4b,0x2d,0x30,0x46,0x53,0x3f,0x41,0x18,0x40,0x28,0x1b,
3551 0x05,0x2b,0x4b,0x22,0x3a,0x51,0x0a,0x33,0x51,0x10,0x02,0x20,0x02,0x37,
3552 0x1b,0x07,0x33,0x08,0x46,0x05,0x2b,0x21,0x2f,0x44,0x53,0x34,0x16,0x18,
3553 0x40,0x3d
3554};
3555
3556static const QRgb bg_ctable[] = {
3557 0xff618b80,0xff52776e,0xff5f897e,0xff5e877d,0xff5d877c,0xff5c857b,0xff5a8379,0xff557a70,0xff54786f,0xff53786e,0xff52766d,0xff5f887d,0xff50746b,0xff5d867b,
3558 0xff5c847a,0xff5b8479,0xff5a8278,0xff588076,0xff628e83,0xff52756c,0xff50736a,0xff4f7169,0xff4e7168,0xff5c8379,0xff4d6f67,0xff5b8378,0xff5a8177,0xff587f75,
3559 0xff577d74,0xff567d73,0xff557b72,0xff628d82,0xff618b81,0xff608b80,0xff5f897f,0xff5e897e,0xff4e7067,0xff587e74,0xff577c73,0xff567c72,0xff557a71,0xff547a70,
3560 0xff53786f,0xff608a7f,0xff51766d,0xff5f887e,0xff5e887d,0xff5d867c,0xff5b847a,0xff54796f,0xff53776e,0xff52776d,0xff51756c,0xff5e877c,0xff4f736a,0xff5d857b,
3561 0xff5c857a,0xff5b8379,0xff5a8378,0xff598177,0xff638f84,0xff53766d,0xff52766c,0xff51746b,0xff4f7269,0xff4e7068,0xff5c8479,0xff5b8278,0xff598076,0xff587e75,
3562 0xff577e74,0xff567c73,0xff557c72,0xff638e83,0xff547a71,0xff618c81,0xff608a80,0xff5f8a7f,0xff5e887e,0xff4f7168,0xff577d73,0xff567b72,0xff557b71,0xff547970,
3563 0xff53796f
3564};
3565
3566static const QRgb binary_data[] = {
3567 0x7000000,0xe000000,0x23000000,0x42000000,0x55000000,0x5b000000,0x5d000000,0x5a000000,0x49000000,0x34000000,0x24000000,0x1a000000,0x11000000,0xffffff,
3568 0xc000000,0x18000000,0x48000000,0xffffffff,0xfffdfdfd,0xffeaeaea,0xffb0b0b0,0xffffffff,0xf3c8c8c8,0x6b000000,0x44000000,0x2d000000,0x1d000000,0xc000000,
3569 0x11000000,0x24000000,0x62000000,0xffffffff,0xfffcfcfc,0xffe2e2e2,0xff969696,0xffffffff,0xffffffff,0xf7c1c1c1,0x75000000,0x46000000,0x2a000000,0x11000000,
3570 0x16000000,0x2e000000,0x71000000,0xffffffff,0xfffcfcfc,0xffe2e2e2,0xff939393,0xffffffff,0xffffffff,0xffffffff,0xf5c6c6c6,0x65000000,0x36000000,0x16000000,
3571 0x1a000000,0x35000000,0x7b000000,0xffffffff,0xfffdfdfd,0xffe8e8e8,0xffababab,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x7c000000,0x3e000000,0x1a000000,
3572 0x1c000000,0x39000000,0x80000000,0xffffffff,0xfffdfdfd,0xfff5f5f5,0xffd7d7d7,0xffababab,0xff939393,0xff969696,0xffb0b0b0,0x85000000,0x43000000,0x1c000000,
3573 0x1d000000,0x3b000000,0x83000000,0xffffffff,0xffffffff,0xfffcfcfc,0xfff5f5f5,0xffe8e8e8,0xffe2e2e2,0xffe2e2e2,0xffeaeaea,0x88000000,0x46000000,0x1d000000,
3574 0x1d000000,0x3c000000,0x84000000,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfffcfcfc,0xfffdfdfd,0x88000000,0x47000000,0x1d000000,
3575 0x1d000000,0x3b000000,0x83000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x88000000,0x46000000,0x1d000000,
3576 0x1c000000,0x39000000,0x81000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x85000000,0x44000000,0x1c000000,
3577 0x1a000000,0x36000000,0x7b000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x80000000,0x3f000000,0x1a000000,
3578 0x17000000,0x30000000,0x73000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x77000000,0x38000000,0x16000000,
3579 0x14000000,0x28000000,0x5e000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x61000000,0x2e000000,0x11000000,
3580 0x10000000,0x20000000,0x3e000000,0x64000000,0x7e000000,0x89000000,0x8f000000,0x8f000000,0x89000000,0x7f000000,0x65000000,0x40000000,0x25000000,0xc000000
3581};
3582
3583static const QRgb bold_data[] = {
3584 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3585 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3586 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3587 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,
3588 0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,
3589 0xff000000,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3590 0x0,0xff000000,0xff000000,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,
3591 0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,
3592 0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,
3593 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,
3594 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,
3595 0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,
3596 0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,
3597 0xff000000,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3598 0x0,0xff000000,0xff000000,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,
3599 0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,
3600 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3601 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3602 0x0,0x0,0x0,0x0
3603};
3604
3605static const unsigned char c_src_data[] = {
3606 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
3607 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x15,0x01,0x01,0x01,0x00,
3608 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x15,0x0d,0x15,0x0d,
3609 0x15,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0d,0x08,
3610 0x0d,0x0d,0x0d,0x15,0x0d,0x15,0x01,0x01,0x00,0x00,0x00,0x00,0x01,0x15,
3611 0x0d,0x0d,0x08,0x08,0x08,0x0d,0x15,0x0d,0x15,0x01,0x00,0x00,0x00,0x00,
3612 0x01,0x15,0x0d,0x0d,0x0d,0x15,0x0d,0x08,0x08,0x15,0x15,0x01,0x00,0x00,
3613 0x00,0x01,0x15,0x0d,0x08,0x0d,0x15,0x0d,0x15,0x0d,0x15,0x15,0x15,0x01,
3614 0x00,0x00,0x00,0x01,0x0d,0x15,0x0d,0x08,0x08,0x08,0x0d,0x15,0x0d,0x15,
3615 0x08,0x01,0x00,0x00,0x01,0x0d,0x15,0x0d,0x15,0x0d,0x15,0x0d,0x08,0x08,
3616 0x15,0x15,0x01,0x00,0x00,0x01,0x15,0x15,0x08,0x15,0x15,0x15,0x0d,0x15,
3617 0x15,0x15,0x15,0x15,0x01,0x00,0x01,0x15,0x15,0x15,0x15,0x08,0x08,0x08,
3618 0x15,0x0d,0x15,0x0d,0x15,0x15,0x01,0x00,0x01,0x08,0x15,0x15,0x15,0x15,
3619 0x15,0x15,0x08,0x08,0x08,0x15,0x15,0x08,0x01,0x00,0x00,0x01,0x01,0x08,
3620 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x01,0x00,0x00,0x00,0x00,
3621 0x00,0x01,0x01,0x01,0x08,0x15,0x15,0x15,0x15,0x15,0x08,0x01,0x00,0x00,
3622 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x08,0x15,0x08,0x01,0x00,
3623 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,
3624 0x00,0x00,0x00,0x00
3625};
3626
3627static const QRgb c_src_ctable[] = {
3628 0xc6c6c6,0xff000000,0xffc3c3c3,0xff303030,0xffc0c0ff,0xffff0000,0xff008080,0xff800000,0xffc0c000,0xff0000c0,0xff808080,0xffc0ffc0,0xff00ffff,0xffffffff,
3629 0xffa0a0a0,0xff00ff00,0xffffff00,0xffffc0ff,0xff404000,0xff00c000,0xff000080,0xffffffc0,0xff400000,0xffc05800,0xff800080,0xff008000,0xff00c0c0,0xffdcdcdc,
3630 0xffff8000,0xffffc0c0,0xff585858,0xffc00000,0xffffdca8,0xff808000,0xffffa858,0xff004000,0xffc000c0,0xff0000ff,0xffff00ff,0xffc0ffff,0xff004040
3631};
3632
3633static const QRgb calculator_data[] = {
3634 0x2000000,0xfff9f9f9,0xfff3f3f3,0xffe6e6e6,0xffdbdbdb,0xffe4e4e4,0xffeeeeee,0xffeeeeee,0xffeeeeee,0xffeeeeee,0xffeeeeee,0xffeeeeee,0x13000000,0xe000000,
3635 0x7000000,0xff76aa76,0xff66a166,0xff4d874d,0xffffffff,0xff4d874d,0xff589958,0xff589958,0xff589958,0xff589958,0xff589958,0xff3e8a3e,0xff006a00,0x2b000000,
3636 0xe000000,0xff629a62,0xff3c7c3c,0xff1e5c1e,0xffffffff,0xff1e5c1e,0xff247024,0xff287a28,0xff297f29,0xff297f29,0xff297f29,0xff006d00,0xff005400,0x55000000,
3637 0x13000000,0xff508d50,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff006500,0xff006e00,0xff006e00,0xff006e00,0xff006300,0xff004b00,0x71000000,
3638 0x15000000,0xff549354,0xff247024,0xff004f00,0xffffffff,0xff004a00,0xff005300,0xff005800,0xff005d00,0xff005d00,0xff006100,0xff005f00,0xff004b00,0x7f000000,
3639 0x15000000,0xff589958,0xff297f29,0xff006100,0xffffffff,0xff005800,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff005b00,0xff004b00,0x7f000000,
3640 0x15000000,0xff549354,0xff257625,0xff006500,0xff006500,0xff006100,0xff005800,0xff005800,0xff005800,0xff005300,0xff005d00,0xff005f00,0xff004b00,0x7f000000,
3641 0x15000000,0xff508d50,0xffffffff,0xff8fb28f,0xff006500,0xff8fb28f,0xffffffff,0xff006500,0xff8fb68f,0xffffffff,0xff8fb68f,0xff006300,0xff004b00,0x7f000000,
3642 0x15000000,0xff549354,0xff9ab89a,0xffffffff,0xff8fad8f,0xffffffff,0xff8faf8f,0xff005d00,0xff005800,0xff005300,0xff005800,0xff005800,0xff004800,0x7f000000,
3643 0x15000000,0xff589958,0xff257625,0xff8fad8f,0xffffffff,0xff8fad8f,0xff005d00,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff004600,0x7f000000,
3644 0x15000000,0xff549354,0xff9ab89a,0xffffffff,0xff8fad8f,0xffffffff,0xff8faf8f,0xff005d00,0xff005800,0xff005300,0xff005800,0xff005800,0xff004800,0x7f000000,
3645 0x15000000,0xff397f39,0xffffffff,0xff8fad8f,0xff005b00,0xff8fad8f,0xffffffff,0xff005b00,0xff8fb18f,0xffffffff,0xff8fb18f,0xff005a00,0xff004700,0x7f000000,
3646 0x13000000,0xff006600,0xff004e00,0xff004800,0xff004b00,0xff004800,0xff004600,0xff004800,0xff004800,0xff004600,0xff004800,0xff004700,0xff004000,0x71000000,
3647 0xe000000,0x2b000000,0x55000000,0x71000000,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x71000000,0x55000000
3648};
3649
3650static const QRgb center_data[] = {
3651 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,
3653 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3654 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
3655 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3656 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,
3657 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,
3658 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3659 0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
3660 0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3661 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
3662 0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3663 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
3664 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,
3665 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3666 0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,
3667 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3668 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
3669 0x0,0x0,0x0,0x0
3670};
3671
3672static const unsigned char citytime_icon_data[] = {
3673 0x0c,0x0c,0x0c,0x0c,0x0c,0x06,0x06,0x06,0x06,0x06,0x06,0x0c,0x0c,0x0c,
3674 0x0c,0x0c,0x0c,0x0c,0x0c,0x06,0x06,0x0d,0x02,0x0d,0x02,0x0d,0x0d,0x06,
3675 0x06,0x0c,0x0c,0x0c,0x0c,0x0c,0x06,0x02,0x00,0x02,0x00,0x03,0x00,0x03,
3676 0x00,0x02,0x0d,0x06,0x0c,0x0c,0x0c,0x06,0x0b,0x00,0x09,0x08,0x09,0x00,
3677 0x00,0x08,0x03,0x00,0x03,0x00,0x06,0x0c,0x0c,0x06,0x0b,0x08,0x08,0x08,
3678 0x08,0x08,0x00,0x02,0x00,0x02,0x00,0x03,0x06,0x0c,0x06,0x0b,0x08,0x03,
3679 0x02,0x03,0x08,0x07,0x03,0x00,0x02,0x01,0x02,0x00,0x03,0x06,0x06,0x0b,
3680 0x07,0x0a,0x00,0x0a,0x00,0x02,0x07,0x08,0x00,0x08,0x01,0x02,0x0b,0x06,
3681 0x06,0x0b,0x02,0x00,0x0a,0x00,0x0a,0x00,0x00,0x04,0x08,0x01,0x08,0x01,
3682 0x0b,0x06,0x06,0x0b,0x08,0x02,0x03,0x02,0x07,0x02,0x00,0x07,0x01,0x08,
3683 0x05,0x08,0x0b,0x06,0x06,0x0b,0x08,0x01,0x08,0x03,0x02,0x07,0x02,0x01,
3684 0x08,0x01,0x08,0x05,0x0b,0x06,0x06,0x0b,0x08,0x08,0x01,0x03,0x00,0x02,
3685 0x03,0x08,0x01,0x08,0x01,0x08,0x0b,0x06,0x0c,0x06,0x0b,0x01,0x08,0x01,
3686 0x0a,0x00,0x08,0x01,0x00,0x01,0x08,0x0b,0x06,0x0c,0x0c,0x06,0x0b,0x08,
3687 0x08,0x08,0x07,0x02,0x01,0x08,0x01,0x08,0x0b,0x0b,0x06,0x0c,0x0c,0x0c,
3688 0x06,0x05,0x05,0x08,0x08,0x01,0x08,0x08,0x01,0x0b,0x05,0x06,0x0c,0x0c,
3689 0x0c,0x0c,0x0c,0x06,0x06,0x05,0x08,0x05,0x05,0x08,0x05,0x06,0x06,0x0c,
3690 0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x06,0x06,0x06,0x06,0x06,0x06,0x0c,
3691 0x0c,0x0c,0x0c,0x0c
3692};
3693
3694static const QRgb citytime_icon_ctable[] = {
3695 0xffffa858,0xff000080,0xffc0c000,0xff808000,0xffc05800,0xffc0c0ff,0xff000000,0xffff8000,0xff0000c0,0xff800000,0xffffdca8,0xff0000ff,0xc6c6c6,0xffffffff
3696};
3697
3698static const QRgb close_data[] = {
3699 0xffffff,0xffffff,0xffffff,0x66b16d6d,0xba985f5f,0xeb7b4a4a,0xfd693c3c,0xeb7a3e3e,0xba934242,0x66a93f3f,0xffffff,0xffffff,0xffffff,0xffffff,
3700 0xffffff,0x1bcb7676,0x9db97272,0xfda96a6a,0xffa76565,0xffa75f5f,0xffa65757,0xffa44c4c,0xffa04040,0xfda03535,0x9dad2a2a,0x1bbd1f1f,0xffffff,0xffffff,
3701 0xffffff,0x9db86c6c,0xffb36c6c,0xffc69898,0xffca7373,0xffcf6565,0xffcf5c5c,0xffcb4f4f,0xffc34949,0xffc07474,0xffa61b1b,0x9caa0c0c,0xffffff,0xffffff,
3702 0x66ae5c5c,0xfda65e5e,0xffc59494,0xffe9e9e9,0xffefd7d7,0xffdd5e5e,0xffdb4848,0xffda4b4b,0xffeecdcd,0xffe9e9e9,0xffbd6464,0xfd9a0000,0x60a30000,0xffffff,
3703 0xba944a4a,0xffa45151,0xffc96565,0xffefd5d5,0xfffdfdfd,0xfff6d5d5,0xffdd4242,0xfff6d1d1,0xfffdfdfd,0xffedc7c7,0xffb51313,0xff930000,0xaf910000,0xffffff,
3704 0xeb783434,0xffa34343,0xffca4b4b,0xffdb4c4c,0xfff7d5d5,0xffffffff,0xfffdf4f4,0xffffffff,0xfff5cfcf,0xffc81616,0xffb00000,0xff8e0000,0xe37f0000,0xffffff,
3705 0xfd662323,0xffa13434,0xffc93737,0xffd72d2d,0xffdb3737,0xfffdf4f4,0xffffffff,0xfffdf4f4,0xffd12727,0xffbe0000,0xffa80000,0xff870000,0xfc740000,0xffffff,
3706 0xeb741d1d,0xff9d1f1f,0xffc31e1e,0xffd52525,0xfff6cfcf,0xffffffff,0xfffdf4f4,0xffffffff,0xfff2cece,0xffb71616,0xff9a0000,0xff7b0000,0xe36f0000,0xffffff,
3707 0xba8c1010,0xff990808,0xffba1313,0xffecc7c7,0xfffdfdfd,0xfff2cece,0xffcb2828,0xfff0cece,0xfffdfdfd,0xffe3c7c7,0xff8d1313,0xff6f0000,0xaf700000,0xffffff,
3708 0x669e0000,0xfd930000,0xffb56060,0xffe9e9e9,0xffe8c7c7,0xffb91717,0xffb10000,0xffad1717,0xffe3c7c7,0xffe9e9e9,0xff9a6060,0xfd660000,0x60740000,0xffffff,
3709 0xffffff,0x9d990000,0xff8e0000,0xffad6161,0xff9b1414,0xff9a0000,0xff960000,0xff8c0000,0xff851414,0xff986161,0xff650000,0x9c6b0000,0xffffff,0xffffff,
3710 0xffffff,0x1ba40000,0x9c8d0000,0xfd7c0000,0xff7a0000,0xff760000,0xff730000,0xff6b0000,0xff630000,0xfd5f0000,0x9c680000,0x1b780000,0xffffff,0xffffff,
3711 0xffffff,0xffffff,0xffffff,0x60850000,0xaf750000,0xe2670000,0xfc5f0000,0xe25e0000,0xaf620000,0x60690000,0xffffff,0xffffff,0xffffff,0xffffff,
3712 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff
3713};
3714
3715static const QRgb copy_data[] = {
3716 0xffffff,0x4200,0x1200,0x800,0x28000000,0xa6000000,0x9b000000,0xa6000000,0xb72b2b2b,0x6666666,0x30303,0x0,0x0,0x0,
3717 0xffffff,0x4200,0x1200,0x800,0x28000000,0xa6474747,0x9bb4b4b4,0xa6929292,0xaebdbdbd,0x7b777777,0xe000000,0x2000000,0x0,0x0,
3718 0xffffff,0x4200,0x1200,0x500,0x26000000,0xa5686768,0x9affffff,0xa6c1c1c1,0xa9eaeaea,0xb3eeeeee,0x8e5c5c5c,0x1c000000,0x2000000,0x0,
3719 0xffffff,0x5004200,0xc2001200,0xe21a1f1a,0xe9191a19,0xf9253525,0xd5a8bba8,0xa0b0afb0,0xa9dcdbdc,0xaaffffff,0xb1f3f3f3,0x91606060,0x1e0a0a0a,0x2000000,
3720 0xffffff,0x5004100,0xd2051905,0xf5eef2ee,0xf9d7ead7,0xffc6e3c6,0xffc8d2c8,0xde4f6a4f,0xb0b6bab6,0xa9edeced,0xaaefefef,0xb3dedede,0x86363636,0x5000000,
3721 0xffffff,0x5004100,0xd0051905,0xf3edf1ed,0xf7c4dec4,0xff9ac29a,0xffffffff,0xffc1cfc1,0xe3496649,0xb27b857b,0xa8adadad,0xafa8a8a8,0x8a000000,0x10000000,
3722 0xffffff,0x5004100,0xd0051905,0xf3ebefeb,0xf7c0dbc0,0xff9abd9a,0xffffffff,0xffffffff,0xffc9d2c9,0xe37a967a,0xafc4ccc4,0xa8c8c8c8,0x89000000,0x15000000,
3723 0xffffff,0x4004200,0xd0051a05,0xf3e7eee7,0xf7cbe3cb,0xfe89b889,0xffabc8ab,0xffabccab,0xffd4edd4,0xff475847,0xbb97a797,0xa0c9c9c9,0x81000000,0x13000000,
3724 0xffffff,0x4004300,0xd0051905,0xf1dde8dd,0xf4ddeedd,0xfeb2d3b2,0xfda0c6a0,0xfda3caa3,0xfdc4e4c4,0xfe292e29,0xc17a8c7a,0x9dc3c3c3,0x7e000000,0x10000000,
3725 0xffffff,0x4004600,0xcf051905,0xefd3e2d3,0xefd9ecd9,0xfcd0e5d0,0xfbd9ebd9,0xfbdbecdb,0xfbedfaed,0xfc393f39,0xc57c8e7c,0xa5c2c2c2,0x80000000,0xc000000,
3726 0xffffff,0x3004800,0xce051a05,0xeecadcca,0xeccae3ca,0xf7bdd9bd,0xf7bfdcbf,0xf7c4dec4,0xf7d4eed4,0xf8303730,0xc2101410,0xa41f1f1f,0x7a000000,0x4000000,
3727 0xffffff,0x3004700,0xce061a06,0xeecbe2cb,0xe9cdebcd,0xefc7e6c7,0xf0c8e6c8,0xf0cce8cc,0xefe3fde3,0xf1343c34,0x74173317,0x27414141,0x1c000000,0x2000000,
3728 0xffffff,0xa004000,0xdb000f00,0xfa8c9a8c,0xf98fa38f,0xff8b9f8b,0xff8c9f8c,0xff90a290,0xffa0afa0,0xff242724,0x51002900,0x1000000,0x2000000,0x0,
3729 0xffffff,0xd003900,0x821e401e,0xaa294729,0xb8173017,0xae132e13,0xab132e13,0xab132e13,0xab142f14,0xa7052205,0x2a003b00,0x0,0x0,0x0
3730};
3731
3732static const QRgb copy_inactive_data[] = {
3733 0xffffff,0x4200,0x1200,0x800,0x14000000,0x53000000,0x4d000000,0x53000000,0x5b2b2b2b,0x3666666,0x30303,0x0,0x0,0x0,
3734 0xffffff,0x4200,0x1200,0x800,0x14000000,0x53474747,0x4db4b4b4,0x53929292,0x57bdbdbd,0x3d777777,0x7000000,0x1000000,0x0,0x0,
3735 0xffffff,0x4200,0x1200,0x500,0x13000000,0x52676767,0x4dffffff,0x53c1c1c1,0x54eaeaea,0x59eeeeee,0x475c5c5c,0xe000000,0x1000000,0x0,
3736 0xffffff,0x2252525,0x610a0a0a,0x711d1d1d,0x74191919,0x7c2d2d2d,0x6ab1b1b1,0x50afafaf,0x54dbdbdb,0x55ffffff,0x58f3f3f3,0x48606060,0xf0a0a0a,0x1000000,
3737 0xffffff,0x2242424,0x690f0f0f,0x7af0f0f0,0x7ce0e0e0,0x7fd4d4d4,0x7fcdcdcd,0x6f5d5d5d,0x58b7b7b7,0x54ececec,0x55efefef,0x59dedede,0x43363636,0x2000000,
3738 0xffffff,0x2242424,0x680f0f0f,0x79eeeeee,0x7bd1d1d1,0x7fadadad,0x7fffffff,0x7fc8c8c8,0x71585858,0x59808080,0x54adadad,0x57a8a8a8,0x45000000,0x8000000,
3739 0xffffff,0x2242424,0x680f0f0f,0x79ededed,0x7bcdcdcd,0x7fababab,0x7fffffff,0x7fffffff,0x7fcdcdcd,0x71888888,0x57c8c8c8,0x54c8c8c8,0x44000000,0xa000000,
3740 0xffffff,0x2252525,0x68101010,0x79eaeaea,0x7bd7d7d7,0x7fa1a1a1,0x7fb9b9b9,0x7fbcbcbc,0x7fe0e0e0,0x7f4f4f4f,0x5d9f9f9f,0x50c9c9c9,0x40000000,0x9000000,
3741 0xffffff,0x2252525,0x680f0f0f,0x78e3e3e3,0x7ae5e5e5,0x7fc3c3c3,0x7eb3b3b3,0x7eb6b6b6,0x7ed4d4d4,0x7f2b2b2b,0x60828282,0x4ec3c3c3,0x3f000000,0x8000000,
3742 0xffffff,0x2272727,0x670f0f0f,0x77dadada,0x77e3e3e3,0x7edadada,0x7de2e2e2,0x7de3e3e3,0x7df3f3f3,0x7e3c3c3c,0x62858585,0x52c2c2c2,0x40000000,0x6000000,
3743 0xffffff,0x1282828,0x67101010,0x77d2d2d2,0x76d7d7d7,0x7bcbcbcb,0x7bcdcdcd,0x7bd1d1d1,0x7be1e1e1,0x7c343434,0x61121212,0x521f1f1f,0x3d000000,0x2000000,
3744 0xffffff,0x1282828,0x67101010,0x77d7d7d7,0x74dcdcdc,0x77d7d7d7,0x78d7d7d7,0x78dadada,0x77f0f0f0,0x78373737,0x3a252525,0x13414141,0xe000000,0x1000000,
3745 0xffffff,0x5242424,0x6d080808,0x7d939393,0x7c999999,0x7f959595,0x7f959595,0x7f999999,0x7fa7a7a7,0x7f252525,0x28171717,0x0,0x1000000,0x0,
3746 0xffffff,0x6202020,0x412f2f2f,0x55383838,0x5c242424,0x57202020,0x55202020,0x55202020,0x55222222,0x53141414,0x15202020,0x0,0x0,0x0
3747};
3748
3749static const QRgb cut_data[] = {
3750 0xc000000,0x9000000,0xa75b5b5b,0xe7545454,0x5d353535,0x4000000,0x12000000,0xb000000,0xb000000,0xd000000,0x3f535353,0x9e787878,0x423f3f3f,0xe000000,
3751 0x7000000,0x821a1a1a,0xe5313131,0xfb232323,0xd0252525,0x881a1a1a,0xd000000,0x14000000,0x16000000,0x53494949,0xbb676767,0xe2393939,0xb3474747,0x382e2e2e,
3752 0x13000000,0xc30a0a0a,0xff1f1f1f,0xcc4a4a4a,0xf95d5d5d,0xff242424,0x911b1b1b,0x1e000000,0x6e4b4b4b,0xe06a6a6a,0xff2e2e2e,0xff282828,0xff373737,0x97272727,
3753 0x11000000,0x9d4c4c4c,0xfd4a4a4a,0xf22b2b2b,0x982d2d2d,0xe56d6d6d,0xfe252525,0xba4c4c4c,0xda4c4c4c,0xfe343434,0x8d141414,0x6b121212,0xc5393939,0xb4191919,
3754 0x12000000,0x27000000,0x9b5f5f5f,0xf84b4b4b,0xf82f2f2f,0xe2434343,0xff404040,0xff2b2b2b,0xff161616,0xe42b2b2b,0xa6232323,0xaf333333,0xfd4f4f4f,0xaa272727,
3755 0xc000000,0x15000000,0x2e000000,0x8f606060,0xd4282828,0xed2f2f2f,0xff484848,0xff6d6d6d,0xff343434,0xff1b1b1b,0xf7686868,0xf5747474,0xea707070,0x7b3e3e3e,
3756 0x7000000,0xd000000,0x1a000000,0x2b000000,0x5c030303,0xda1d1d1d,0xff707070,0xfff7f7f7,0xffa7a7a7,0xff272727,0xa7656565,0x96747474,0x735d5d5d,0x37080808,
3757 0x4000000,0x8000000,0x14000000,0x32000000,0xca1f1f1f,0xff757575,0xff5a5a5a,0xfe919191,0xfef2f2f2,0xffaeaeae,0xc5000000,0x52000000,0x3e000000,0x2a000000,
3758 0x5000000,0xe000000,0x25000000,0xc6202020,0xffa8a8a8,0xfed1d1d1,0xff717171,0xff202020,0xfdafafaf,0xfdf9f9f9,0xffb1b1b1,0xbe0f0f0f,0x3d000000,0x2b000000,
3759 0xe000000,0x1e000000,0xc5202020,0xffa8a8a8,0xfff0f0f0,0xffaeaeae,0xd61b1b1b,0x7d000000,0xdd2b2b2b,0xffb7b7b7,0xfff6f6f6,0xffaeaeae,0xb7101010,0x2d000000,
3760 0x3000000,0xab171717,0xff9a9a9a,0xffe8e8e8,0xffb9b9b9,0xf42b2b2b,0xb3171717,0x43000000,0x4f000000,0xda2d2d2d,0xffbababa,0xfef7f7f7,0xffaaaaaa,0x98050505,
3761 0x6000000,0xb7161616,0xffb6b6b6,0xffbcbcbc,0xd1202020,0x53000000,0x44000000,0x38000000,0x31000000,0x3a000000,0xd72e2e2e,0xffc4c4c4,0xffc1c1c1,0xa7030303,
3762 0x0,0xc01d1d1d,0xff898989,0xcc2d2d2d,0x4a030303,0x3a000000,0x2f000000,0x22000000,0x1c000000,0x1f000000,0x30000000,0xd33b3b3b,0xff8d8d8d,0xae131313,
3763 0x5000000,0x65141414,0x97101010,0x38101010,0x2a000000,0x24000000,0x1a000000,0xf000000,0xb000000,0xe000000,0x13000000,0x2d000000,0x99121212,0x65121212
3764};
3765
3766static const QRgb cut_inactive_data[] = {
3767 0x6000000,0x4000000,0x535b5b5b,0x73545454,0x2e353535,0x2000000,0x9000000,0x5000000,0x5000000,0x6000000,0x1f535353,0x4f787878,0x213f3f3f,0x7000000,
3768 0x3000000,0x411a1a1a,0x72313131,0x7d232323,0x68252525,0x441a1a1a,0x6000000,0xa000000,0xb000000,0x29494949,0x5d676767,0x71393939,0x59474747,0x1c2e2e2e,
3769 0x9000000,0x610a0a0a,0x7f1f1f1f,0x664a4a4a,0x7c5d5d5d,0x7f242424,0x481b1b1b,0xf000000,0x374b4b4b,0x706a6a6a,0x7f2e2e2e,0x7f282828,0x7f373737,0x4b272727,
3770 0x8000000,0x4e4c4c4c,0x7e4a4a4a,0x792b2b2b,0x4c2d2d2d,0x726d6d6d,0x7f252525,0x5d4c4c4c,0x6d4c4c4c,0x7f343434,0x46141414,0x35121212,0x62393939,0x5a191919,
3771 0x9000000,0x13000000,0x4d5f5f5f,0x7c4b4b4b,0x7c2f2f2f,0x71434343,0x7f404040,0x7f2b2b2b,0x7f161616,0x722b2b2b,0x53232323,0x57333333,0x7e4f4f4f,0x55272727,
3772 0x6000000,0xa000000,0x17000000,0x47606060,0x6a282828,0x762f2f2f,0x7f484848,0x7f6d6d6d,0x7f343434,0x7f1b1b1b,0x7b686868,0x7a747474,0x75707070,0x3d3e3e3e,
3773 0x3000000,0x6000000,0xd000000,0x15000000,0x2e030303,0x6d1d1d1d,0x7f707070,0x7ff7f7f7,0x7fa7a7a7,0x7f272727,0x53656565,0x4b747474,0x395d5d5d,0x1b080808,
3774 0x2000000,0x4000000,0xa000000,0x19000000,0x651f1f1f,0x7f757575,0x7f5a5a5a,0x7f919191,0x7ff2f2f2,0x7faeaeae,0x62000000,0x29000000,0x1f000000,0x15000000,
3775 0x2000000,0x7000000,0x12000000,0x63202020,0x7fa8a8a8,0x7fd1d1d1,0x7f717171,0x7f202020,0x7eafafaf,0x7ef9f9f9,0x7fb1b1b1,0x5f0f0f0f,0x1e000000,0x15000000,
3776 0x7000000,0xf000000,0x62202020,0x7fa8a8a8,0x7ff0f0f0,0x7faeaeae,0x6b1b1b1b,0x3e000000,0x6e2b2b2b,0x7fb7b7b7,0x7ff6f6f6,0x7faeaeae,0x5b101010,0x16000000,
3777 0x1000000,0x55171717,0x7f9a9a9a,0x7fe8e8e8,0x7fb9b9b9,0x7a2b2b2b,0x59171717,0x21000000,0x27000000,0x6d2d2d2d,0x7fbababa,0x7ff7f7f7,0x7faaaaaa,0x4c050505,
3778 0x3000000,0x5b161616,0x7fb6b6b6,0x7fbcbcbc,0x68202020,0x29000000,0x22000000,0x1c000000,0x18000000,0x1d000000,0x6b2e2e2e,0x7fc4c4c4,0x7fc1c1c1,0x53030303,
3779 0x0,0x601d1d1d,0x7f898989,0x662d2d2d,0x25030303,0x1d000000,0x17000000,0x11000000,0xe000000,0xf000000,0x18000000,0x693b3b3b,0x7f8d8d8d,0x57131313,
3780 0x2000000,0x32141414,0x4b101010,0x1c101010,0x15000000,0x12000000,0xd000000,0x7000000,0x5000000,0x7000000,0x9000000,0x16000000,0x4c121212,0x32121212
3781};
3782
3783static const QRgb datebook_icon_data[] = {
3784 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,
3785 0xff000000,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff00008b,0xff0000ff,0xff00008b,0xff0000ff,0xff00008b,0xff0000ff,0xff000000,0xff000000,
3786 0xff000000,0xff0000ff,0xff0000ff,0xff00008b,0xff0000ff,0xff00008b,0xff0000ff,0xff00008b,0xff0000ff,0xff00008b,0xff00008b,0xff00008b,0xff000000,0xff000000,
3787 0xff000000,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffa0a0a0,0xff000000,
3788 0xff000000,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffa0a0a0,0xff000000,
3789 0xff000000,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffa0a0a0,0xff000000,
3790 0xff000000,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffa0a0a0,0xff000000,
3791 0xff000000,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffa0a0a0,0xff000000,
3792 0xff000000,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffa0a0a0,0xff000000,
3793 0xff000000,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffa0a0a0,0xff000000,
3794 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,
3796 0x0,0xff000000,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xff000000,
3797 0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000
3798};
3799
3800static const QRgb day_data[] = {
3801 0xe000000,0x18000000,0x23000000,0x2e000000,0x35000000,0x39000000,0x3b000000,0x3b000000,0x3b000000,0x39000000,0x35000000,0x2e000000,0x23000000,0x18000000,
3802 0x18000000,0xff7a7fbb,0xff6b71b3,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff454ca2,0xff0d1986,0x3d000000,0x2a000000,
3803 0x24000000,0xff6b71b3,0xff4a51a4,0xff303999,0xff303999,0xff303999,0xff303999,0xff303999,0xff303999,0xff303999,0xff0d1a8b,0xff0a146c,0x5a000000,0x3e000000,
3804 0x2e000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe5e5e5,0xffaeaeae,0x74000000,0x50000000,
3805 0x35000000,0xffffffff,0xffffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffe5e5e5,0xffaeaeae,0x86000000,0x5c000000,
3806 0x39000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xffe5e5e5,0xffaeaeae,0x90000000,0x63000000,
3807 0x3b000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xffe5e5e5,0xffaeaeae,0x95000000,0x66000000,
3808 0x3c000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xffe5e5e5,0xffaeaeae,0x96000000,0x67000000,
3809 0x3b000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xffe5e5e5,0xffaeaeae,0x95000000,0x66000000,
3810 0x39000000,0xffffffff,0xffffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffe5e5e5,0xffaeaeae,0x90000000,0x63000000,
3811 0x35000000,0xffffffff,0xfffdfdfd,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffd1d1d1,0xffa4a4a4,0x86000000,0x5c000000,
3812 0x2e000000,0xfff5f5f5,0xffc4c4c4,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffa4a4a4,0xff969696,0x74000000,0x50000000,
3813 0x24000000,0x3e000000,0x5a000000,0x74000000,0x86000000,0x90000000,0x95000000,0x96000000,0x95000000,0x90000000,0x86000000,0x74000000,0x5a000000,0x3e000000,
3814 0x18000000,0x2a000000,0x3d000000,0x4f000000,0x5c000000,0x63000000,0x66000000,0x67000000,0x66000000,0x63000000,0x5c000000,0x4f000000,0x3d000000,0x2a000000
3815};
3816
3817static const QRgb done_data[] = {
3818 0xffffff,0xffffff,0xffffff,0x666da16d,0xba5f8a5f,0xeb4a704a,0xfd3c5e3c,0xeb3e6b3e,0xba428042,0x663f903f,0xffffff,0xffffff,0xffffff,0xffffff,
3819 0xffffff,0x1b76b676,0x9d72a872,0xfd6a9a6a,0xff659765,0xff5f965f,0xff579457,0xff4c8f4c,0xff408a40,0xfd358735,0xa1369236,0x2b7bb87b,0xffffff,0xffffff,
3820 0xffffff,0x9d6ca56c,0xff6ca26c,0xff71ac71,0xff6db36d,0xff65b665,0xff5cb45c,0xff4fad4f,0xff3fa33f,0xff3d993d,0xff98a698,0xd28db18d,0xffffff,0xffffff,
3821 0x665c9a5c,0xfd5e965e,0xff69a969,0xff6cb96c,0xff62be62,0xff53bc53,0xff48b848,0xff3fb53f,0xff48b348,0xffb8c8b8,0xffbababa,0xffa6a8a6,0x9482ae82,0xffffff,
3822 0xba4a824a,0xff518f51,0xff63af63,0xff62bd62,0xff49ba49,0xff35b435,0xff29b129,0xff41b641,0xffcad9ca,0xffdadada,0xffc6c6c6,0xffaaaaaa,0xc7589158,0xffffff,
3823 0xeb346834,0xff438c43,0xff9fc19f,0xffbdd5bd,0xff39b639,0xff1aad1a,0xff37b337,0xffcddccd,0xffe2e2e2,0xffdedede,0xffcecece,0xff639063,0xe3006400,0xffffff,
3824 0xfd275727,0xff7c9a7c,0xffcfcfcf,0xffdfdfdf,0xffbad6ba,0xff45b645,0xffd0ddd0,0xffe2e2e2,0xffe2e2e2,0xffdfdfdf,0xff76ac76,0xff006a00,0xfc005c00,0xffffff,
3825 0xec226222,0xff889b88,0xffcccccc,0xffdedede,0xffe2e2e2,0xffdee1de,0xffe2e2e2,0xffe2e2e2,0xffe2e2e2,0xff7db77d,0xff007a00,0xff006100,0xe3005800,0xffffff,
3826 0xba107010,0xff137a13,0xffa0baa0,0xffdadada,0xffe0e0e0,0xffe1e1e1,0xffe2e2e2,0xffe1e1e1,0xff7eb87e,0xff007f00,0xff006b00,0xff005800,0xaf005800,0xffffff,
3827 0x66007d00,0xfd007400,0xff108310,0xffa7c0a7,0xffdadada,0xffdddddd,0xffdfdfdf,0xff7cb37c,0xff007a00,0xff006c00,0xff005c00,0xfd005000,0x60005b00,0xffffff,
3828 0xffffff,0x9d007900,0xff007000,0xff107810,0xff99b199,0xff98b498,0xff76a476,0xff006f00,0xff006500,0xff005900,0xff005000,0x9c005400,0xffffff,0xffffff,
3829 0xffffff,0x1b008000,0x9c007000,0xfd006200,0xff005f00,0xff005e00,0xff005a00,0xff005400,0xff004e00,0xfd004a00,0x9c005100,0x1b005f00,0xffffff,0xffffff,
3830 0xffffff,0xffffff,0xffffff,0x60006900,0xaf005d00,0xe2005100,0xfc004a00,0xe2004a00,0xaf004c00,0x60005300,0xffffff,0xffffff,0xffffff,0xffffff,
3831 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff
3832};
3833
3834static const QRgb edit_data[] = {
3835 0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3000000,0x36000000,0xff000000,0xff000000,0xff000000,0x2c000000,0x18000000,0x8000000,0x1000000,
3836 0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3f000000,0xff000000,0xff882f2f,0xfff24545,0xffff0c0c,0xff000000,0x40000000,0x19000000,0x5000000,
3837 0xffffff,0xffffff,0xffffff,0x1000000,0x5000000,0x8f000000,0xff000000,0xff000000,0xff2d0000,0xff730000,0xff000000,0x68000000,0x2c000000,0xa000000,
3838 0xffffff,0xffffff,0xffffff,0x1000000,0x14000000,0xff000000,0xfff9f9a6,0xffffff93,0xff000000,0xff000000,0xff000000,0x79000000,0x36000000,0xd000000,
3839 0xffffff,0xffffff,0xffffff,0x4000000,0x78000000,0xff000000,0xffffffa4,0xffffff82,0xffd8d866,0xff000000,0xbe000000,0x71000000,0x31000000,0xb000000,
3840 0xffffff,0xffffff,0x1000000,0xd000000,0xff000000,0xffe3e394,0xffffff91,0xffdbdb67,0xff989848,0xff000000,0x92000000,0x58000000,0x21000000,0x7000000,
3841 0xffffff,0xffffff,0x4000000,0x62000000,0xff000000,0xffffff9f,0xffffff78,0xffb4b454,0xff000000,0xc4000000,0x79000000,0x3c000000,0x12000000,0x3000000,
3842 0xffffff,0x1000000,0x7000000,0xff000000,0xffc0c072,0xffffff7f,0xffc4c45c,0xff81813d,0xff000000,0x95000000,0x5b000000,0x24000000,0x8000000,0x1000000,
3843 0xffffff,0x1000000,0x35000000,0xff000000,0xffe7e76d,0xffb6b656,0xff919145,0xff000000,0xc9000000,0x7b000000,0x3d000000,0x13000000,0x4000000,0xffffff,
3844 0xffffff,0x2000000,0x11000000,0xff000000,0xff000000,0xff000000,0xff000000,0xfe000000,0xa0000000,0x5c000000,0x26000000,0xa000000,0x1000000,0xffffff,
3845 0xffffff,0x2000000,0x11000000,0xff000000,0xff000000,0xff000000,0xed000000,0xa6000000,0x73000000,0x3d000000,0x16000000,0x4000000,0x1000000,0xffffff,
3846 0x1000000,0x6000000,0x17000000,0xff000000,0xff000000,0xdc000000,0xa0000000,0x7b000000,0x4d000000,0x25000000,0xf000000,0x7000000,0x6000000,0x3000000,
3847 0x4000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x3d000000,0xff000000,0x19000000,0xff000000,0x14000000,0xb000000,
3848 0x6000000,0x17000000,0x37000000,0x67000000,0x70000000,0x78000000,0x6d000000,0x56000000,0x3d000000,0x2a000000,0x25000000,0x22000000,0x20000000,0x11000000
3849};
3850
3851static const QRgb editdelete_data[] = {
3852 0x0,0x352424,0x9c6a6a,0xdd000000,0x0,0x5000000,0x0,0x0,0x0,0x0,0xde000000,0x784b4b,0x5000000,0x1000000,
3853 0x0,0x352424,0x8e2e1e1e,0xdf875959,0x90000000,0x0,0x4000000,0x0,0x0,0x8b000000,0xdf8a6565,0x93201616,0x4000000,0xa000000,
3854 0x0,0x8f352424,0xff9a7171,0xf7e59393,0xf38e5050,0xa2000000,0x1000000,0x0,0x98000000,0xeca37d7d,0xf6eba4a4,0xff925252,0xaa000000,0x181a0f0f,
3855 0xdc000000,0xdf875a5a,0xf6e59393,0xffda8282,0xf7d77979,0xf8894d4d,0x8b050303,0x8a080606,0xeda37d7d,0xf4eca9a9,0xffd27a7a,0xfaa35c5c,0xfc522f2f,0x88050303,
3856 0x1000000,0x90000000,0xf38f5050,0xf8d77a7a,0xffd57878,0xf6db7d7d,0xf17a4949,0xea8a6969,0xf1eda8a8,0xffd27a7a,0xfb9a5656,0xfb4e2b2b,0xbe000000,0x2e000000,
3857 0x3000000,0x0,0xa2000000,0xf9874c4c,0xf6db7e7e,0xffd57a7a,0xfddd8989,0xfee19393,0xffd07a7a,0xf99e5858,0xfb4c2a2a,0xc5000000,0x48000000,0x22000000,
3858 0x0,0x4000000,0x1000000,0x8a000000,0xf27a4848,0xfcdd8888,0xffd77d7d,0xffd67878,0xfdb76767,0xf6472828,0xb8000000,0x4e000000,0x29000000,0xb000000,
3859 0x0,0x0,0x0,0x88000000,0xea896a6a,0xfce19292,0xffd67979,0xffd17575,0xfdc46e6e,0xf5693c3c,0xb6000000,0x27000000,0x11000000,0x1000000,
3860 0x0,0x0,0x95000000,0xeda17c7c,0xf2eea9a9,0xffd17a7a,0xfeb76666,0xfec46e6e,0xffd17676,0xf8cf7575,0xf5834a4a,0xa8000000,0x2000000,0x4000000,
3861 0x0,0x8e000000,0xeca47d7d,0xf4eca9a9,0xffd27a7a,0xf99e5858,0xf6472828,0xf6693c3c,0xf9d07575,0xffd77a7a,0xf9d27777,0xf6824a4a,0xa2000000,0x2000000,
3862 0xdc000000,0xd7896262,0xf3eba4a4,0xffd27a7a,0xfa9a5656,0xfa4d2b2b,0xb8000000,0xb6050303,0xf6854b4b,0xf9d27777,0xffc77070,0xf8ae6363,0xf6603636,0x81000000,
3863 0x0,0x8d000000,0xff985656,0xfaa45c5c,0xfa4e2d2d,0xc5000000,0x4e000000,0x28000000,0xa8000000,0xf6824949,0xf9af6262,0xff663838,0xbc000000,0x29000000,
3864 0x2000000,0x0,0xa5000000,0xf6522f2f,0xbc000000,0x46000000,0x29000000,0x10000000,0x2000000,0xa3000000,0xf75d3434,0xbc000000,0x4c000000,0x2a000000,
3865 0x1000000,0x7000000,0xb000000,0x84000000,0x28000000,0x21000000,0xb000000,0x0,0x3000000,0x3000000,0x81000000,0x29000000,0x29000000,0x11000000
3866};
3867
3868static const QRgb enter_data[] = {
3869 0xffffff,0xffffff,0xffffff,0x666da16d,0xba5f8a5f,0xeb4a704a,0xfd3c5e3c,0xeb3e6b3e,0xba428042,0x663f903f,0xffffff,0xffffff,0xffffff,0xffffff,
3870 0xffffff,0x1b76b676,0x9d72a872,0xfd6a9a6a,0xff659765,0xff5f965f,0xff579457,0xff4c8f4c,0xff408a40,0xfd358735,0xa1369236,0x2b7bb87b,0xffffff,0xffffff,
3871 0xffffff,0x9d6ca56c,0xff6ca26c,0xff71ac71,0xff6db36d,0xff65b665,0xff5cb45c,0xff4fad4f,0xff3fa33f,0xff3d993d,0xff98a698,0xd28db18d,0xffffff,0xffffff,
3872 0x665c9a5c,0xfd5e965e,0xff69a969,0xff6cb96c,0xff62be62,0xff53bc53,0xff48b848,0xff3fb53f,0xff48b348,0xffb8c8b8,0xffbababa,0xffa6a8a6,0x9482ae82,0xffffff,
3873 0xba4a824a,0xff518f51,0xff63af63,0xff62bd62,0xff49ba49,0xff35b435,0xff29b129,0xff41b641,0xffcad9ca,0xffdadada,0xffc6c6c6,0xffaaaaaa,0xc7589158,0xffffff,
3874 0xeb346834,0xff438c43,0xff9fc19f,0xffbdd5bd,0xff39b639,0xff1aad1a,0xff37b337,0xffcddccd,0xffe2e2e2,0xffdedede,0xffcecece,0xff639063,0xe3006400,0xffffff,
3875 0xfd275727,0xff7c9a7c,0xffcfcfcf,0xffdfdfdf,0xffbad6ba,0xff45b645,0xffd0ddd0,0xffe2e2e2,0xffe2e2e2,0xffdfdfdf,0xff76ac76,0xff006a00,0xfc005c00,0xffffff,
3876 0xec226222,0xff889b88,0xffcccccc,0xffdedede,0xffe2e2e2,0xffdee1de,0xffe2e2e2,0xffe2e2e2,0xffe2e2e2,0xff7db77d,0xff007a00,0xff006100,0xe3005800,0xffffff,
3877 0xba107010,0xff137a13,0xffa0baa0,0xffdadada,0xffe0e0e0,0xffe1e1e1,0xffe2e2e2,0xffe1e1e1,0xff7eb87e,0xff007f00,0xff006b00,0xff005800,0xaf005800,0xffffff,
3878 0x66007d00,0xfd007400,0xff108310,0xffa7c0a7,0xffdadada,0xffdddddd,0xffdfdfdf,0xff7cb37c,0xff007a00,0xff006c00,0xff005c00,0xfd005000,0x60005b00,0xffffff,
3879 0xffffff,0x9d007900,0xff007000,0xff107810,0xff99b199,0xff98b498,0xff76a476,0xff006f00,0xff006500,0xff005900,0xff005000,0x9c005400,0xffffff,0xffffff,
3880 0xffffff,0x1b008000,0x9c007000,0xfd006200,0xff005f00,0xff005e00,0xff005a00,0xff005400,0xff004e00,0xfd004a00,0x9c005100,0x1b005f00,0xffffff,0xffffff,
3881 0xffffff,0xffffff,0xffffff,0x60006900,0xaf005d00,0xe2005100,0xfc004a00,0xe2004a00,0xaf004c00,0x60005300,0xffffff,0xffffff,0xffffff,0xffffff,
3882 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff
3883};
3884
3885static const unsigned char exec_data[] = {
3886 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,
3887 0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x01,0x02,0x02,0x01,0x00,0x01,
3888 0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x03,0x01,0x03,0x04,0x04,0x03,
3889 0x01,0x03,0x02,0x01,0x00,0x00,0x00,0x00,0x01,0x03,0x02,0x05,0x03,0x06,
3890 0x06,0x03,0x05,0x02,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x05,0x06,
3891 0x06,0x07,0x06,0x07,0x06,0x05,0x01,0x00,0x00,0x00,0x00,0x01,0x01,0x02,
3892 0x03,0x06,0x07,0x05,0x05,0x06,0x07,0x03,0x02,0x01,0x01,0x00,0x01,0x02,
3893 0x04,0x03,0x06,0x07,0x06,0x03,0x03,0x07,0x08,0x06,0x03,0x04,0x02,0x01,
3894 0x01,0x05,0x03,0x02,0x05,0x07,0x08,0x07,0x07,0x09,0x08,0x05,0x02,0x03,
3895 0x05,0x01,0x00,0x01,0x0a,0x0a,0x02,0x05,0x07,0x08,0x09,0x07,0x05,0x02,
3896 0x0a,0x0a,0x01,0x00,0x00,0x00,0x01,0x05,0x04,0x02,0x02,0x05,0x05,0x02,
3897 0x02,0x04,0x05,0x01,0x00,0x00,0x00,0x01,0x03,0x09,0x05,0x0a,0x05,0x02,
3898 0x02,0x05,0x0a,0x05,0x09,0x03,0x01,0x00,0x00,0x01,0x02,0x03,0x0a,0x01,
3899 0x01,0x03,0x03,0x01,0x01,0x0a,0x03,0x02,0x01,0x00,0x00,0x00,0x01,0x01,
3900 0x01,0x00,0x01,0x02,0x09,0x01,0x00,0x01,0x01,0x01,0x00,0x00,0x00,0x00,
3901 0x00,0x00,0x00,0x00,0x01,0x0a,0x05,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
3902 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,
3903 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
3904 0x00,0x00,0x00,0x00
3905};
3906
3907static const QRgb exec_ctable[] = {
3908 0xc6c6c6,0xff000000,0xffdcdcdc,0xffa0a0a0,0xffc3c3c3,0xff808080,0xffffa858,0xffffdca8,0xffffffc0,0xffffffff,0xff585858
3909};
3910
3911static const unsigned char faded_bg_data[] = {
3912 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x08,0x0b,0x04,0x05,
3913 0x03,0x07,0x08,0x0a,0x0c,0x0d,0x01,0x03,0x0e,0x0e,0x03,0x01,0x0a,0x0f,
3914 0x10,0x0f,0x09,0x08,0x07,0x02,0x11,0x12,0x12,0x0b,0x13,0x0d,0x14,0x09,
3915 0x08,0x02,0x03,0x03,0x07,0x08,0x0a,0x14,0x15,0x0a,0x01,0x03,0x04,0x04,
3916 0x0b,0x08,0x14,0x0f,0x0f,0x0a,0x16,0x17,0x11,0x0b,0x02,0x02,0x02,0x17,
3917 0x08,0x0a,0x14,0x0a,0x08,0x17,0x0b,0x07,0x18,0x0d,0x14,0x15,0x19,0x1a,
3918 0x01,0x11,0x06,0x06,0x02,0x08,0x14,0x14,0x0d,0x01,0x0b,0x12,0x06,0x11,
3919 0x07,0x07,0x07,0x1b,0x08,0x0a,0x0c,0x0a,0x08,0x17,0x07,0x1b,0x08,0x1a,
3920 0x0a,0x0a,0x0d,0x08,0x1b,0x0b,0x03,0x03,0x07,0x08,0x0d,0x08,0x1b,0x03,
3921 0x05,0x04,0x04,0x11,0x07,0x07,0x07,0x1b,0x08,0x1a,0x0d,0x08,0x13,0x17,
3922 0x07,0x17,0x1b,0x01,0x13,0x13,0x13,0x01,0x17,0x02,0x11,0x11,0x02,0x1b,
3923 0x13,0x17,0x03,0x1c,0x1d,0x1d,0x03,0x0b,0x17,0x17,0x17,0x1b,0x13,0x08,
3924 0x08,0x13,0x17,0x0b,0x11,0x03,0x03,0x12,0x11,0x0b,0x02,0x02,0x07,0x02,
3925 0x02,0x0b,0x02,0x07,0x17,0x0b,0x04,0x1d,0x1d,0x0e,0x02,0x01,0x18,0x18,
3926 0x13,0x01,0x1b,0x1b,0x1b,0x17,0x0b,0x03,0x04,0x0e,0x0e,0x0e,0x05,0x04,
3927 0x03,0x03,0x0b,0x02,0x02,0x02,0x02,0x07,0x07,0x02,0x03,0x04,0x1e,0x12,
3928 0x08,0x1a,0x0d,0x0d,0x08,0x13,0x1b,0x17,0x17,0x02,0x12,0x04,0x1d,0x1f,
3929 0x1d,0x1d,0x0e,0x04,0x03,0x03,0x0b,0x02,0x07,0x07,0x07,0x17,0x1b,0x17,
3930 0x07,0x07,0x17,0x01,0x0a,0x0c,0x14,0x0c,0x0d,0x16,0x1b,0x17,0x07,0x02,
3931 0x03,0x04,0x1d,0x1d,0x1c,0x04,0x03,0x0b,0x07,0x07,0x02,0x02,0x07,0x07,
3932 0x17,0x17,0x1b,0x13,0x18,0x08,0x1a,0x0d,0x0c,0x14,0x19,0x0a,0x08,0x13,
3933 0x17,0x07,0x07,0x02,0x03,0x04,0x1c,0x1c,0x1e,0x0b,0x01,0x08,0x08,0x13,
3934 0x20,0x07,0x07,0x17,0x17,0x17,0x1b,0x13,0x08,0x1a,0x0d,0x09,0x1a,0x1a,
3935 0x1a,0x08,0x13,0x17,0x02,0x11,0x11,0x11,0x03,0x21,0x1c,0x04,0x0b,0x18,
3936 0x09,0x14,0x0c,0x22,0x01,0x07,0x17,0x1b,0x1b,0x1b,0x1b,0x1b,0x13,0x13,
3937 0x08,0x08,0x17,0x17,0x1b,0x1b,0x17,0x0b,0x03,0x06,0x06,0x1e,0x21,0x1d,
3938 0x1d,0x04,0x1b,0x0a,0x0f,0x0f,0x0c,0x08,0x07,0x0b,0x02,0x1b,0x01,0x01,
3939 0x17,0x07,0x07,0x07,0x07,0x07,0x03,0x12,0x02,0x07,0x07,0x11,0x04,0x1c,
3940 0x1c,0x1c,0x1d,0x1d,0x21,0x0b,0x1a,0x15,0x0f,0x14,0x22,0x07,0x03,0x04,
3941 0x11,0x17,0x08,0x16,0x1b,0x02,0x03,0x03,0x1e,0x1e,0x05,0x03,0x07,0x17,
3942 0x07,0x03,0x0e,0x1d,0x1d,0x1c,0x0e,0x04,0x0b,0x08,0x14,0x0f,0x15,0x1a,
3943 0x17,0x1e,0x1d,0x1d,0x03,0x20,0x08,0x08,0x1b,0x0b,0x1e,0x1d,0x1d,0x1d,
3944 0x06,0x02,0x01,0x13,0x17,0x03,0x0e,0x1d,0x1c,0x04,0x11,0x17,0x08,0x14,
3945 0x0f,0x15,0x0d,0x1b,0x03,0x1c,0x1f,0x1d,0x03,0x13,0x0d,0x1a,0x01,0x11,
3946 0x21,0x1f,0x1d,0x0e,0x0b,0x13,0x22,0x08,0x1b,0x03,0x0e,0x1d,0x04,0x11,
3947 0x13,0x0d,0x15,0x0f,0x15,0x0a,0x13,0x02,0x03,0x1c,0x1d,0x21,0x02,0x08,
3948 0x0a,0x0d,0x13,0x11,0x0e,0x1f,0x1c,0x1e,0x23,0x0d,0x0c,0x0d,0x13,0x12,
3949 0x21,0x0e,0x03,0x01,0x0a,0x0f,0x0f,0x15,0x0d,0x13,0x17,0x02,0x03,0x06,
3950 0x06,0x24,0x1b,0x1a,0x0c,0x0a,0x18,0x11,0x04,0x0e,0x03,0x07,0x0a,0x0c,
3951 0x14,0x0a,0x13,0x0b,0x04,0x04,0x0b,0x08,0x14,0x0f,0x14,0x1a,0x1b,0x02,
3952 0x0b,0x0b,0x0b,0x0b,0x0b,0x07,0x08,0x0a,0x14,0x0a,0x18,0x0b,0x03,0x03,
3953 0x07,0x08,0x0c,0x14,0x14,0x0d,0x13,0x02,0x03,0x03,0x02,0x08,0x09,0x09,
3954 0x08,0x17,0x03,0x03,0x03,0x0b,0x07,0x07,0x07,0x1b,0x08,0x0a,0x14,0x0a,
3955 0x18,0x07,0x0b,0x07,0x18,0x0d,0x0a,0x0a,0x0a,0x08,0x13,0x02,0x03,0x03,
3956 0x02,0x13,0x08,0x08,0x07,0x1e,0x1c,0x1c,0x06,0x11,0x07,0x07,0x17,0x01,
3957 0x08,0x0a,0x09,0x0d,0x13,0x07,0x07,0x01,0x08,0x0d,0x08,0x08,0x16,0x13,
3958 0x1b,0x07,0x0b,0x11,0x02,0x17,0x1b,0x07,0x03,0x1d,0x1f,0x1d,0x06,0x0b,
3959 0x07,0x17,0x17,0x1b,0x16,0x22,0x1a,0x08,0x01,0x17,0x17,0x1b,0x01,0x18,
3960 0x0b,0x02,0x02,0x07,0x07,0x07,0x02,0x02,0x02,0x07,0x07,0x0b,0x06,0x1c,
3961 0x1d,0x05,0x03,0x07,0x1b,0x01,0x1b,0x1b,0x01,0x13,0x13,0x1b,0x07,0x0b,
3962 0x0b,0x11,0x11,0x0b,0x04,0x06,0x03,0x11,0x0b,0x02,0x07,0x07,0x07,0x17,
3963 0x17,0x07,0x0b,0x03,0x12,0x02,0x1b,0x16,0x08,0x08,0x08,0x01,0x1b,0x17,
3964 0x17,0x02,0x12,0x06,0x05,0x21,0x21,0x21,0x1c,0x04,0x06,0x03,0x0b,0x02,
3965 0x07,0x07,0x17,0x17,0x1b,0x1b,0x1b,0x1b,0x13,0x08,0x1a,0x0a,0x0a,0x0a,
3966 0x22,0x13,0x17,0x07,0x11,0x06,0x21,0x1d,0x1f,0x1f,0x1d,0x1d,0x03,0x11,
3967 0x02,0x02,0x02,0x02,0x07,0x07,0x17,0x17,0x1b,0x13,0x08,0x08,0x0d,0x0a,
3968 0x19,0x14,0x14,0x0c,0x1a,0x13,0x17,0x11,0x1e,0x1d,0x25,0x26,0x25,0x1d,
3969 0x0e,0x04,0x17,0x13,0x08,0x13,0x17,0x07,0x07,0x17,0x17,0x17,0x1b,0x01,
3970 0x08,0x08,0x0d,0x0a,0x0a,0x0a,0x0a,0x0d,0x08,0x1b,0x0b,0x06,0x1d,0x26,
3971 0x26,0x1f,0x0e,0x04,0x03,0x0b,0x0d,0x19,0x0c,0x1a,0x13,0x17,0x17,0x1b,
3972 0x1b,0x1b,0x17,0x17,0x1b,0x1b,0x13,0x13,0x08,0x08,0x08,0x13,0x01,0x07,
3973 0x03,0x0e,0x27,0x26,0x1d,0x21,0x03,0x0b,0x20,0x08,0x0f,0x0f,0x14,0x08,
3974 0x17,0x0b,0x02,0x1b,0x01,0x01,0x17,0x07,0x0b,0x0b,0x11,0x11,0x0b,0x02,
3975 0x07,0x17,0x07,0x0b,0x04,0x1d,0x26,0x1f,0x04,0x12,0x07,0x01,0x08,0x09,
3976 0x10,0x0f,0x0d,0x1b,0x03,0x06,0x11,0x17,0x16,0x13,0x1b,0x0b,0x03,0x04,
3977 0x21,0x21,0x04,0x03,0x02,0x17,0x07,0x03,0x0e,0x25,0x1f,0x0e,0x03,0x07,
3978 0x01,0x08,0x0c,0x0f,0x0f,0x0a,0x01,0x03,0x1c,0x1d,0x03,0x17,0x08,0x08,
3979 0x1b,0x0b,0x04,0x1d,0x1d,0x1d,0x04,0x12,0x17,0x1b,0x07,0x03,0x1d,0x25,
3980 0x1d,0x06,0x02,0x01,0x08,0x09,0x0f,0x10,0x0a,0x13,0x11,0x0e,0x1f,0x1d,
3981 0x03,0x1b,0x1a,0x1a,0x13,0x0b,0x21,0x1d,0x1d,0x0e,0x03,0x17,0x08,0x08,
3982 0x20,0x03,0x1d,0x1d,0x05,0x12,0x1b,0x08,0x0c,0x0f,0x10,0x15,0x08,0x17,
3983 0x03,0x1c,0x1d,0x0e,0x0b,0x18,0x0a,0x0d,0x18,0x0b,0x21,0x1d,0x21,0x03,
3984 0x17,0x08,0x0d,0x1a,0x1b,0x03,0x1c,0x1d,0x06,0x07,0x08,0x09,0x0f,0x10,
3985 0x15,0x0a
3986};
3987
3988static const QRgb faded_bg_ctable[] = {
3989 0xc6c6c6,0xffb5c5c1,0xffb6c7c3,0xffb7c9c4,0xffb8cac5,0xffb8cac6,0xffb7c9c5,0xffb6c7c2,0xffb3c4c0,0xffb2c2be,0xffb3c2be,0xffb6c8c3,0xffb2c1be,0xffb3c3be,
3990 0xffb8cbc7,0xffb1c0bc,0xffb1bfbc,0xffb6c8c4,0xffb6c9c4,0xffb4c5c1,0xffb1c1bd,0xffb1c1bc,0xffb3c4c1,0xffb5c7c2,0xffb4c4c1,0xffb1c1be,0xffb3c3bf,0xffb5c6c1,
3991 0xffb9cbc7,0xffb9ccc7,0xffb7cac5,0xffb9ccc8,0xffb5c6c2,0xffb8cbc6,0xffb3c4bf,0xffb3c5c1,0xffb7c8c4,0xffb9cdc8,0xffbacdc9,0xffbacdc8
3992};
3993
3994static const QRgb fastback_data[] = {
3995 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
3996 0xffffff,0xff000000,0xffffff,0xffffff,0xffffff,0xffffff,0x7a6c7375,0xff000000,0xff000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,
3997 0xffffff,0xff000000,0xffffff,0xffffff,0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xff000000,0x6b000000,0x24000000,0xffffff,0xffffff,0xffffff,
3998 0xffffff,0xff000000,0xffffff,0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xfffcfcfc,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,
3999 0xffffff,0xff000000,0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xffffffff,0xfff8f8f8,0xff000000,0xff000000,0xff000000,0xff000000,0x24000000,0xc000000,
4000 0xffffff,0xff000000,0x7a6c7375,0xfc202323,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xffffffff,0xffffffff,0xfff5f5f5,0xff000000,0x6b000000,0x24000000,
4001 0xffffff,0xff000000,0xe0494e4f,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff6f6f6,0xfff6f6f6,0xffeeeeee,0xffd3d3d3,0xff000000,0x8f000000,0x30000000,
4002 0xffffff,0xff000000,0x69666c6d,0xfd202323,0xfffcfcfc,0xfffcfcfc,0xfff4f4f4,0xffdddddd,0xffcccccc,0xffc9c9c9,0xffc9c9c9,0xff000000,0x8f000000,0x30000000,
4003 0xffffff,0xff000000,0xd000000,0x83565b5c,0xfd202223,0xfff4f4f4,0xffededed,0xffcccccc,0xff000000,0xff000000,0xff000000,0xff000000,0x8f000000,0x30000000,
4004 0xffffff,0xff000000,0x2000000,0x14000000,0x8852585a,0xfe202324,0xffe8e8e8,0xffcbcbcb,0xff000000,0xb3000000,0x9b000000,0x8f000000,0x6b000000,0x24000000,
4005 0xffffff,0xff000000,0xffffff,0x2000000,0x14000000,0x8852585a,0xfe202324,0xffd3d3d3,0xff000000,0x9b000000,0x54000000,0x30000000,0x24000000,0xc000000,
4006 0xffffff,0xff000000,0xffffff,0xffffff,0x2000000,0x14000000,0x8852585a,0xff000000,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,
4007 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x2000000,0x14000000,0x45000000,0x7b000000,0x6b000000,0x24000000,0xffffff,0xffffff,0xffffff,
4008 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x2000000,0x10000000,0x26000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff
4009};
4010
4011static const QRgb fastforward_data[] = {
4012 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
4013 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0x8d606667,0x13000000,0x3000000,0xffffff,0xffffff,0xff000000,0xffffff,0xffffff,
4014 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xfd202223,0x9f575d5e,0x18000000,0x3000000,0xffffff,0xff000000,0xffffff,0xffffff,
4015 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xfe202324,0xa0575c5d,0x18000000,0x3000000,0xff000000,0xffffff,0xffffff,
4016 0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xffffffff,0xffffffff,0xfff4f4f4,0xfe202324,0xa0575c5d,0x18000000,0xff000000,0xffffff,0xffffff,
4017 0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff7f7f7,0xffededed,0xfe202324,0xa0575c5d,0xff000000,0x3000000,0xffffff,
4018 0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffeeeeee,0xffd6d6d6,0xffd1d1d1,0xef464a4b,0xff000000,0xe000000,0xffffff,
4019 0xffffff,0xff000000,0xfff5f5f5,0xffe1e1e1,0xffe9e9e9,0xfff9f9f9,0xffefefef,0xffd1d1d1,0xffc9c9c9,0xfe202323,0xc13e4142,0xff000000,0x15000000,0xffffff,
4020 0x1000000,0xff000000,0xff000000,0xff000000,0xff000000,0xfff8f8f8,0xffd8d8d8,0xffc9c9c9,0xfe202323,0xcd3c3f3f,0x82000000,0xff000000,0xd000000,0xffffff,
4021 0xffffff,0x24000000,0x6b000000,0x8f000000,0xff000000,0xfff4f4f4,0xffc9c9c9,0xfe202323,0xcd3c3f3f,0x85000000,0x45000000,0xff000000,0x2000000,0xffffff,
4022 0xffffff,0xc000000,0x24000000,0x30000000,0xff000000,0xffe9e9e9,0xfe202323,0xcd3c3f3f,0x85000000,0x45000000,0x14000000,0xff000000,0xffffff,0xffffff,
4023 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0xce3b3e3f,0x86000000,0x45000000,0x14000000,0x2000000,0xff000000,0xffffff,0xffffff,
4024 0xffffff,0xffffff,0xffffff,0xffffff,0x24000000,0x6b000000,0x7b000000,0x45000000,0x14000000,0x2000000,0xffffff,0xffffff,0xffffff,0xffffff,
4025 0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x24000000,0x26000000,0x10000000,0x2000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff
4026};
4027
4028static const QRgb fileopen_data[] = {
4029 0x5000000,0x8000000,0xb000000,0xd000000,0xd000000,0xb000000,0x8000000,0x5000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,
4030 0xf000000,0x19000000,0x24000000,0x29000000,0x29000000,0x24000000,0x1b000000,0x10000000,0x9000000,0x3000000,0xffffff,0xffffff,0xffffff,0xffffff,
4031 0x20000000,0x43000000,0x72000000,0x87000000,0x89000000,0x79000000,0x53000000,0x36000000,0x2b000000,0x23000000,0x1b000000,0x17000000,0x11000000,0xa000000,
4032 0x39000000,0x84000000,0xffb6b6b6,0xffb6b6b6,0xffb4b4b4,0xffb0b0b0,0xab000000,0x7b000000,0x67000000,0x5a000000,0x4d000000,0x3e000000,0x2e000000,0x1b000000,
4033 0x5b000000,0xc9464646,0xffb6b6b6,0xffb6b6b6,0xffb0b0b0,0xffa9a9a9,0xfa676767,0xd8000000,0xca000000,0xc1000000,0xad000000,0x89000000,0x5f000000,0x39000000,
4034 0x74000000,0xdc414141,0xffb6b6b6,0xffb3b3b3,0xffababab,0xff9d9d9d,0xff878787,0xff696969,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x56000000,
4035 0x85000000,0xe83e3e3e,0xffb4b4b4,0xffadadad,0xff9e9e9e,0xff888888,0xff656565,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xb4000000,0x6e000000,
4036 0x91000000,0xef3b3b3b,0xffadadad,0xffa1a1a1,0xff8c8c8c,0xff6a6a6a,0xff3c3c3c,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xc0000000,0x77000000,
4037 0x92000000,0xf0393939,0xffa7a7a7,0xff959595,0xff777777,0xff4c4c4c,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xf8000000,0xc0000000,0x77000000,
4038 0x89000000,0xe93d3d3d,0xff9b9b9b,0xff858585,0xff8b8b8b,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xf1000000,0xb2000000,0x6b000000,
4039 0x78000000,0xd83c3c3c,0xfeb3b3b3,0xffb6b6b6,0xffbcbcbc,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfd000000,0xdd000000,0x9b000000,0x59000000,
4040 0x5d000000,0x9d000000,0xd7000000,0xf7000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xfa000000,0xe4000000,0xaf000000,0x73000000,0x3c000000,
4041 0x3e000000,0x65000000,0x92000000,0xb6000000,0xd0000000,0xe1000000,0xe8000000,0xe7000000,0xdf000000,0xcc000000,0xa9000000,0x7a000000,0x4b000000,0x25000000,
4042 0x26000000,0x41000000,0x5f000000,0x7a000000,0x90000000,0xa2000000,0xaa000000,0xa9000000,0x9e000000,0x8a000000,0x6b000000,0x48000000,0x2a000000,0x14000000
4043};
4044
4045static const QRgb find_data[] = {
4046 0x1ffffff,0x42141414,0x9c131313,0xe1171717,0xe21a1a1a,0xe21a1a1a,0xe1171717,0x9c131313,0x42141414,0x1ffffff,0xffffff,0xffffff,0xffffff,0xffffff,
4047 0x42141414,0xcf1a1a1a,0xff666867,0xffb2b6b4,0xffe3e7e5,0xffe0e6e3,0xffadb4b1,0xff626665,0xd01a1a1a,0x44131313,0x1000000,0x1000000,0xffffff,0xffffff,
4048 0x9c131313,0xff656767,0xf6dfe3e2,0xfff8fcfa,0xfff7fbf9,0xfff3faf8,0xfff1f8f6,0xf6d6dfdb,0xff606362,0xa0131313,0x82e2e2e,0x4000000,0x1000000,0x1000000,
4049 0xe1171717,0xffb0b5b2,0xfff6faf9,0xfff6fbfa,0xfff3faf8,0xfff2f9f7,0xfff0f8f6,0xffe6efec,0xff9ca4a2,0xe4161616,0x11191919,0x9000000,0x4000000,0x1000000,
4050 0xe21a1a1a,0xffdde5e2,0xfff3f9f7,0xfff2f9f7,0xffeef8f3,0xffebf7f3,0xffe7f1ed,0xffdce4e1,0xffbac3bf,0xe61a1a1a,0x1e101010,0x11000000,0x9000000,0x4000000,
4051 0xe31a1a1a,0xffd9e3df,0xffeff8f4,0xffeef8f4,0xffe8f4f0,0xffe4efeb,0xffdde6e3,0xffd0d7d5,0xffaeb6b4,0xe9191919,0x300c0c0c,0x1c000000,0xf000000,0x7000000,
4052 0xe2171717,0xffa6adac,0xffe5eeeb,0xffe4edea,0xffdee7e4,0xffd8e1de,0xffd1d8d7,0xffc5ccca,0xff878d8b,0xec161616,0x41080808,0x28000000,0x16000000,0xa000000,
4053 0xa1131313,0xff5c615f,0xf8c0c8c5,0xffd1dad7,0xffccd4d1,0xffc6cdcb,0xffc5ccca,0xfbabb2af,0xff505351,0xdc0a0a0a,0x76050505,0x33000000,0x1c000000,0xd000000,
4054 0x4c121212,0xd41a1a1a,0xff575a59,0xff8c928f,0xffa9b1ae,0xffa9b1ae,0xff878d8b,0xff505351,0xed312923,0xdb937c6b,0xf3000000,0x64000000,0x20000000,0xe000000,
4055 0xf1b1b1b,0x5a101010,0xb1121212,0xec161616,0xef191919,0xf2191919,0xf4161616,0xe50a0a0a,0xe4634935,0xffc1906b,0xe0c8b2a4,0xf0000000,0x51000000,0xe000000,
4056 0xd000000,0x1c000000,0x340a0a0a,0x50060606,0x6d050505,0x82050505,0x8f050505,0xc0030303,0xec0a0605,0xf257402e,0xffc49471,0xc9c1ad9e,0xee000000,0x42000000,
4057 0xa000000,0x16000000,0x28000000,0x40000000,0x58000000,0x6c000000,0x77000000,0x77000000,0xac000000,0xe3000000,0xe6523d2b,0xffc2916d,0xc1c2a895,0xed000000,
4058 0x7000000,0xf000000,0x1c000000,0x2e000000,0x40000000,0x4f000000,0x58000000,0x58000000,0x4f000000,0x93000000,0xdd000000,0xde614734,0xdcaf805e,0xa0000000,
4059 0x4000000,0x9000000,0x11000000,0x1c000000,0x28000000,0x33000000,0x38000000,0x38000000,0x33000000,0x28000000,0x7f000000,0xd8000000,0xb4000000,0x71000000
4060};
4061
4062static const QRgb finish_data[] = {
4063 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
4064 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0x8d606667,0x13000000,0x3000000,0xffffff,0xffffff,0xff000000,0xffffff,0xffffff,
4065 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xfd202223,0x9f575d5e,0x18000000,0x3000000,0xffffff,0xff000000,0xffffff,0xffffff,
4066 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xfe202324,0xa0575c5d,0x18000000,0x3000000,0xff000000,0xffffff,0xffffff,
4067 0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xffffffff,0xffffffff,0xfff4f4f4,0xfe202324,0xa0575c5d,0x18000000,0xff000000,0xffffff,0xffffff,
4068 0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff7f7f7,0xffededed,0xfe202324,0xa0575c5d,0xff000000,0x3000000,0xffffff,
4069 0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffeeeeee,0xffd6d6d6,0xffd1d1d1,0xef464a4b,0xff000000,0xe000000,0xffffff,
4070 0xffffff,0xff000000,0xfff5f5f5,0xffe1e1e1,0xffe9e9e9,0xfff9f9f9,0xffefefef,0xffd1d1d1,0xffc9c9c9,0xfe202323,0xc13e4142,0xff000000,0x15000000,0xffffff,
4071 0x1000000,0xff000000,0xff000000,0xff000000,0xff000000,0xfff8f8f8,0xffd8d8d8,0xffc9c9c9,0xfe202323,0xcd3c3f3f,0x82000000,0xff000000,0xd000000,0xffffff,
4072 0xffffff,0x24000000,0x6b000000,0x8f000000,0xff000000,0xfff4f4f4,0xffc9c9c9,0xfe202323,0xcd3c3f3f,0x85000000,0x45000000,0xff000000,0x2000000,0xffffff,
4073 0xffffff,0xc000000,0x24000000,0x30000000,0xff000000,0xffe9e9e9,0xfe202323,0xcd3c3f3f,0x85000000,0x45000000,0x14000000,0xff000000,0xffffff,0xffffff,
4074 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0xce3b3e3f,0x86000000,0x45000000,0x14000000,0x2000000,0xff000000,0xffffff,0xffffff,
4075 0xffffff,0xffffff,0xffffff,0xffffff,0x24000000,0x6b000000,0x7b000000,0x45000000,0x14000000,0x2000000,0xffffff,0xffffff,0xffffff,0xffffff,
4076 0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x24000000,0x26000000,0x10000000,0x2000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff
4077};
4078
4079static const QRgb folder_data[] = {
4080 0x1000000,0x4000000,0x7000000,0x19000000,0x11000000,0x2c000000,0x19000000,0x19000000,0x16000000,0x13000000,0xe000000,0xa000000,0x7000000,0x4000000,
4081 0x5000000,0xa000000,0x5d2d2d2d,0xca4f4f4f,0xf54e584d,0xfe808c7f,0xb02a312a,0x40000000,0x2c000000,0x26000000,0x1f000000,0x19000000,0x13000000,0xd000000,
4082 0xc000000,0x15000000,0x9c2f2e2e,0xffc3c2c2,0xffa2a3a2,0xff868686,0xff939592,0xfa858f83,0xbb293029,0xc4373e35,0xe22a302a,0x7b000000,0x82000000,0x1a000000,
4083 0xc04e5a4e,0xc64c584b,0xcd1b1a1a,0xff857a7a,0xffb6b3b3,0xffcac9c9,0xffa8a8a8,0xff868786,0xff888f88,0xffb2bcb1,0xffc3c9c2,0xfc919e90,0xc44b5449,0x63000000,
4084 0xff8a9d88,0xffd3ebd1,0xfaa0b69e,0xfa595c54,0xff594c4c,0xff6f6666,0xffb6b3b3,0xffcbcaca,0xffa4a5a4,0xff7b827b,0xff8d9b8c,0xffb6c5b5,0xfe92a791,0x9f1a201a,
4085 0xc31e221e,0xffc2dbc1,0xffd1e9cf,0xffc9e1c7,0xff9fb59e,0xff91978c,0xff5a4d4d,0xff6f6666,0xffb6b3b3,0xffc9c8c8,0xff9ea39e,0xff5d685d,0xff87a385,0xaf1b221b,
4086 0x41000000,0xf4748673,0xffcde6cc,0xffc9e0c7,0xffc4dac2,0xffbad1b8,0xff90a58f,0xff8d9187,0xff5d5251,0xff6f6767,0xffbdbbbb,0xff878d87,0xff5d6f5c,0xb4171d17,
4087 0x25000000,0xae171a16,0xffbcd2bb,0xffc4dcc3,0xffbfd5bd,0xffbad0b8,0xffb5cab3,0xffaabfa9,0xff849682,0xff8a8f85,0xff5e5958,0xff898b89,0xff606c5e,0xba131713,
4088 0x1f000000,0x49000000,0xf46a7a69,0xffbcd2bb,0xffbbd1b9,0xffb6cbb4,0xffb0c5af,0xffacbfaa,0xffa6baa5,0xff9caf9b,0xff50574d,0xff868584,0xff616c60,0xbc101310,
4089 0x17000000,0x29000000,0x64000000,0xdb363f35,0xfd819580,0xffacc0aa,0xffadc1ab,0xffa8bca6,0xffa3b6a1,0xff9cae9a,0xff7e907c,0xff626361,0xff656d65,0xbd0c0f0c,
4090 0xe000000,0x1b000000,0x2c000000,0x41000000,0x83000000,0xdd303830,0xfd758774,0xff9eb19c,0xff9eb09c,0xff99aa97,0xff93a491,0xff505c4f,0xff697168,0xba080a08,
4091 0x7000000,0x10000000,0x1b000000,0x2b000000,0x3b000000,0x4d000000,0x84000000,0xdc252d25,0xfd687766,0xff8fa18d,0xff8e9f8d,0xff758573,0xff414a41,0x99060806,
4092 0x4000000,0x7000000,0xf000000,0x18000000,0x24000000,0x31000000,0x40000000,0x4f000000,0x84000000,0xda232923,0xfc495447,0xff7a8a78,0xfd2a3128,0x88000000,
4093 0x1000000,0x3000000,0x7000000,0xb000000,0x13000000,0x1c000000,0x26000000,0x32000000,0x40000000,0x4c000000,0x6d000000,0xa9050605,0x830f120d,0x42000000
4094};
4095
4096static const unsigned char folder_open_data[] = {
4097 0x0a,0x0a,0x0a,0x0a,0x00,0x00,0x00,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
4098 0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x00,0x03,0x04,0x00,0x00,0x0a,0x0a,0x0a,
4099 0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x00,0x03,0x07,0x03,0x04,0x00,
4100 0x00,0x00,0x00,0x0a,0x0a,0x0a,0x00,0x00,0x00,0x0a,0x00,0x03,0x07,0x07,
4101 0x07,0x07,0x07,0x07,0x03,0x00,0x0a,0x0a,0x00,0x05,0x05,0x02,0x06,0x03,
4102 0x03,0x03,0x07,0x07,0x07,0x07,0x07,0x03,0x00,0x0a,0x00,0x04,0x05,0x05,
4103 0x05,0x04,0x03,0x03,0x03,0x03,0x07,0x07,0x07,0x03,0x04,0x00,0x0a,0x02,
4104 0x05,0x05,0x05,0x05,0x04,0x04,0x03,0x03,0x03,0x03,0x07,0x03,0x04,0x00,
4105 0x0a,0x00,0x04,0x05,0x05,0x01,0x01,0x05,0x04,0x04,0x03,0x03,0x03,0x03,
4106 0x04,0x00,0x0a,0x0a,0x02,0x05,0x01,0x05,0x01,0x01,0x01,0x01,0x04,0x04,
4107 0x03,0x03,0x04,0x00,0x0a,0x0a,0x00,0x04,0x01,0x01,0x01,0x01,0x08,0x01,
4108 0x08,0x05,0x03,0x03,0x04,0x00,0x0a,0x0a,0x0a,0x02,0x04,0x08,0x01,0x01,
4109 0x01,0x08,0x09,0x07,0x06,0x03,0x04,0x00,0x0a,0x0a,0x0a,0x0a,0x00,0x02,
4110 0x05,0x08,0x08,0x09,0x09,0x09,0x05,0x03,0x04,0x00,0x0a,0x0a,0x0a,0x0a,
4111 0x0a,0x0a,0x00,0x02,0x01,0x09,0x09,0x09,0x07,0x06,0x04,0x00,0x0a,0x0a,
4112 0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x00,0x02,0x01,0x09,0x09,0x04,0x04,0x00,
4113 0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x00,0x02,0x01,0x09,
4114 0x04,0x00,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
4115 0x00,0x02,0x02,0x00
4116};
4117
4118static const QRgb folder_open_ctable[] = {
4119 0xff000000,0xffc0c0c0,0xff303030,0xffffa858,0xff808080,0xffa0a0a4,0xff585858,0xffffdca8,0xffdcdcdc,0xffffffff,0xc6c6c6
4120};
4121
4122static const QRgb forward_data[] = {
4123 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
4124 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0x8d606667,0x13000000,0x3000000,0xffffff,0xffffff,0xffffff,0xffffff,
4125 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xfd202223,0x9f575d5e,0x18000000,0x3000000,0xffffff,0xffffff,0xffffff,
4126 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xfe202324,0xa0575c5d,0x18000000,0x3000000,0xffffff,0xffffff,
4127 0xffffff,0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xffffffff,0xffffffff,0xfff4f4f4,0xfe202324,0xa0575c5d,0x18000000,0x3000000,0xffffff,
4128 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff7f7f7,0xffededed,0xfe202324,0xa0575c5d,0x18000000,0x3000000,
4129 0x1000000,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffeeeeee,0xffd6d6d6,0xffd1d1d1,0xef464a4b,0x41000000,0xe000000,
4130 0x1000000,0xffffff,0xff000000,0xfff5f5f5,0xffe1e1e1,0xffe9e9e9,0xfff9f9f9,0xffefefef,0xffd1d1d1,0xffc9c9c9,0xfe202323,0xc13e4142,0x57000000,0x15000000,
4131 0x1000000,0x1000000,0xff000000,0xff000000,0xff000000,0xff000000,0xfff8f8f8,0xffd8d8d8,0xffc9c9c9,0xfe202323,0xcd3c3f3f,0x82000000,0x3d000000,0xd000000,
4132 0x1000000,0xffffff,0x24000000,0x6b000000,0x8f000000,0xff000000,0xfff4f4f4,0xffc9c9c9,0xfe202323,0xcd3c3f3f,0x85000000,0x45000000,0x14000000,0x2000000,
4133 0x1000000,0xffffff,0xc000000,0x24000000,0x30000000,0xff000000,0xffe9e9e9,0xfe202323,0xcd3c3f3f,0x85000000,0x45000000,0x14000000,0x2000000,0xffffff,
4134 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0xce3b3e3f,0x86000000,0x45000000,0x14000000,0x2000000,0xffffff,0xffffff,
4135 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x24000000,0x6b000000,0x7b000000,0x45000000,0x14000000,0x2000000,0xffffff,0xffffff,0xffffff,
4136 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x24000000,0x26000000,0x10000000,0x2000000,0xffffff,0xffffff,0xffffff,0xffffff
4137};
4138
4139static const QRgb forward_inactive_data[] = {
4140 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
4141 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x7f000000,0x7f000000,0x46636363,0x9000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,
4142 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x7f000000,0x7fffffff,0x7e222222,0x4f5a5a5a,0xc000000,0x1000000,0xffffff,0xffffff,0xffffff,
4143 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x7f000000,0x7fffffff,0x7fffffff,0x7f222222,0x505a5a5a,0xc000000,0x1000000,0xffffff,0xffffff,
4144 0xffffff,0xffffff,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x7fffffff,0x7fffffff,0x7ff4f4f4,0x7f222222,0x505a5a5a,0xc000000,0x1000000,0xffffff,
4145 0xffffff,0xffffff,0x7f000000,0x7fffffff,0x7fffffff,0x7fffffff,0x7fffffff,0x7fffffff,0x7ff7f7f7,0x7fededed,0x7f222222,0x505a5a5a,0xc000000,0x1000000,
4146 0xffffff,0xffffff,0x7f000000,0x7fffffff,0x7fffffff,0x7fffffff,0x7fffffff,0x7fffffff,0x7feeeeee,0x7fd6d6d6,0x7fd1d1d1,0x77484848,0x20000000,0x7000000,
4147 0xffffff,0xffffff,0x7f000000,0x7ff5f5f5,0x7fe1e1e1,0x7fe9e9e9,0x7ff9f9f9,0x7fefefef,0x7fd1d1d1,0x7fc9c9c9,0x7f222222,0x60404040,0x2b000000,0xa000000,
4148 0xffffff,0xffffff,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x7ff8f8f8,0x7fd8d8d8,0x7fc9c9c9,0x7f222222,0x663d3d3d,0x41000000,0x1e000000,0x6000000,
4149 0xffffff,0xffffff,0x12000000,0x35000000,0x47000000,0x7f000000,0x7ff4f4f4,0x7fc9c9c9,0x7f222222,0x663d3d3d,0x42000000,0x22000000,0xa000000,0x1000000,
4150 0xffffff,0xffffff,0x6000000,0x12000000,0x18000000,0x7f000000,0x7fe9e9e9,0x7f222222,0x663d3d3d,0x42000000,0x22000000,0xa000000,0x1000000,0xffffff,
4151 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x7f000000,0x7f000000,0x673d3d3d,0x43000000,0x22000000,0xa000000,0x1000000,0xffffff,0xffffff,
4152 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x12000000,0x35000000,0x3d000000,0x22000000,0xa000000,0x1000000,0xffffff,0xffffff,0xffffff,
4153 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x6000000,0x12000000,0x13000000,0x8000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff
4154};
4155
4156static const QRgb fullscreen_data[] = {
4157 0x2e000000,0x5e000000,0x7d000000,0x86000000,0x87000000,0x76000000,0x54000000,0x4b000000,0x68000000,0x7e000000,0x84000000,0x88000000,0x79000000,0x55000000,
4158 0x5f000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x86000000,0x7a000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x93000000,
4159 0x7e000000,0xffffffff,0xffffffff,0xffffffff,0xfeeeeeee,0xd81b1b1b,0xa9000000,0x95000000,0xcc464646,0xfffafafa,0xffffffff,0xffffffff,0xffffffff,0xc1000000,
4160 0x86000000,0xffffffff,0xffffffff,0xffffffff,0xfdb4b4b4,0xe0000000,0xb9000000,0xa0000000,0xbe000000,0xfab8b8b8,0xffffffff,0xffffffff,0xffffffff,0xd3000000,
4161 0x88000000,0xffffffff,0xfffafafa,0xfdb6b6b6,0xfee8e8e8,0xf6aeaeae,0xbf000000,0xa7000000,0xebb5b5b5,0xfde8e8e8,0xfcb5b5b5,0xffededed,0xffffffff,0xd6000000,
4162 0x77000000,0xffffffff,0xe0404040,0xe3000000,0xf6afafaf,0xee989898,0xb9000000,0xa1000000,0xdfa0a0a0,0xefb3b3b3,0xda000000,0xe7191919,0xffffffff,0xc8000000,
4163 0x55000000,0x89000000,0xac000000,0xba000000,0xc0000000,0xb9000000,0x9f000000,0x88000000,0x93000000,0xa9000000,0xb3000000,0xbc000000,0xc0000000,0xa8000000,
4164 0x4b000000,0x79000000,0x95000000,0x9f000000,0xa7000000,0xa1000000,0x88000000,0x74000000,0x81000000,0x94000000,0x9a000000,0xa4000000,0xaa000000,0x93000000,
4165 0x68000000,0xffffffff,0xc01e1e1e,0xbc000000,0xebb5b5b5,0xdfa0a0a0,0x93000000,0x81000000,0xd4a7a7a7,0xe6b8b8b8,0xba000000,0xd3434343,0xffffffff,0xa5000000,
4166 0x7d000000,0xffffffff,0xfeeeeeee,0xf9b6b6b6,0xfde8e8e8,0xefb3b3b3,0xa9000000,0x94000000,0xe7b8b8b8,0xfce9e9e9,0xfab8b8b8,0xfffafafa,0xffffffff,0xbe000000,
4167 0x83000000,0xffffffff,0xffffffff,0xffffffff,0xfcb8b8b8,0xdb000000,0xb4000000,0x99000000,0xb8000000,0xf9b6b6b6,0xffffffff,0xffffffff,0xffffffff,0xcf000000,
4168 0x87000000,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xec3d3d3d,0xbe000000,0xa2000000,0xc81d1d1d,0xfeeeeeee,0xffffffff,0xffffffff,0xffffffff,0xd7000000,
4169 0x79000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xc3000000,0xa9000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xd0000000,
4170 0x54000000,0x92000000,0xc1000000,0xd4000000,0xd7000000,0xc9000000,0xaa000000,0x94000000,0xa4000000,0xbd000000,0xcd000000,0xd6000000,0xcf000000,0xae000000
4171};
4172
4173static const QRgb go_data[] = {
4174 0xffd2e7a7,0xffc5e18f,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,
4175 0xffb9da77,0xffb9da77,0xffb9da77,0xffa7d156,0xff77a719,0xffc5e18f,0xffb5d86f,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,
4176 0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xff85ba1c,0xff415b0e,0xffb9da77,0xffa1ce4a,0xff8ac21d,0xff8ac21d,
4177 0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff82b71b,0xff5a7f13,0xff5a7f13,0xff5a7f13,0xff8ac21d,0xff689216,
4178 0xff293909,0xffb9da77,0xffa1ce4a,0xff8ac21d,0xff8ac21d,0xff84ba1c,0xff567812,0xff2a3b09,0xff0d1203,0xff000000,0xff060901,0xff223007,0xff47640f,0xff3b530c,
4179 0xff0b0f03,0xff3e4a25,0xff0a0e02,0xff82b71b,0xff689216,0xff293909,0xffb9da77,0xffa1ce4a,0xff8ac21d,0xff7db01a,0xff364c0b,0xff010100,0xff000000,0xff000000,
4180 0xff000000,0xff000000,0xff000000,0xff000000,0xff010200,0xff616c4b,0xffe4e8dc,0xff080b02,0xff415c0e,0xff689216,0xff293909,0xffb9da77,0xffa1ce4a,0xff87bd1c,
4181 0xff374e0c,0xff000000,0xff000000,0xff131b04,0xff374e0c,0xff4e6e10,0xff415b0e,0xff1d2906,0xff000000,0xff030303,0xffeeefee,0xffffffff,0xff68764d,0xff050701,
4182 0xff5d8214,0xff293909,0xffb9da77,0xffa1ce4a,0xff5e8414,0xff020200,0xff000000,0xff2c3e09,0xff75a519,0xff87be1c,0xff8ac21d,0xff7fb21b,0xff74a419,0xff161f05,
4183 0xff747474,0xffffffff,0xffffffff,0xfff2f4ee,0xff101606,0xff4b6a10,0xff293909,0xffb9da77,0xffa1ce4a,0xff33480b,0xff000000,0xff0c1103,0xff6d9a17,0xff8ac21d,
4184 0xff8ac21d,0xff5f8514,0xff0c1103,0xff49660f,0xff2c3c0d,0xff55584e,0xff4c4c4c,0xff52544d,0xff6a7752,0xff2f3a19,0xff4b6a10,0xff293909,0xffb9da77,0xffa1ce4a,
4185 0xff161e05,0xff000000,0xff283808,0xff84b91c,0xff8ac21d,0xff628a15,0xff0b1002,0xff000000,0xff121a04,0xff39510c,0xff222f07,0xff000000,0xff020300,0xff32470a,
4186 0xff3f580d,0xff4b6a10,0xff293909,0xffb9da77,0xffa1ce4a,0xff080b02,0xff000000,0xff374d0b,0xff8ac21d,0xff5f8514,0xff0a0e02,0xff000000,0xff000000,0xff2f420a,
4187 0xff8ac21d,0xff5d8314,0xff000000,0xff000000,0xff6a9516,0xff8ac21d,0xff689216,0xff293909,0xffb9da77,0xffa1ce4a,0xff172105,0xff000000,0xff283808,0xff80b41b,
4188 0xff1c2706,0xff000000,0xff000000,0xff000000,0xff050801,0xff445f0e,0xff46630f,0xff000000,0xff050701,0xff709d18,0xff8ac21d,0xff689216,0xff293909,0xffb9da77,
4189 0xffa1ce4a,0xff354b0b,0xff000000,0xff0c1103,0xff6c9717,0xff719e18,0xff1e2b06,0xff537411,0xff273708,0xff000000,0xff020200,0xff0e1403,0xff000000,0xff1b2506,
4190 0xff7cae1a,0xff8ac21d,0xff689216,0xff293909,0xffb9da77,0xffa1ce4a,0xff608714,0xff030401,0xff000000,0xff293909,0xff73a118,0xff83b81c,0xff8ac21d,0xff77a719,
4191 0xff182105,0xff000000,0xff000000,0xff000000,0xff435e0e,0xff8ac21d,0xff8ac21d,0xff689216,0xff293909,0xffb9da77,0xffa1ce4a,0xff88bf1d,0xff3b530c,0xff000000,
4192 0xff000000,0xff101703,0xff32460a,0xff47640f,0xff3d560d,0xff182105,0xff000000,0xff000000,0xff000000,0xff3f590d,0xff82b71b,0xff8ac21d,0xff689216,0xff293909,
4193 0xffb9da77,0xffa1ce4a,0xff8ac21d,0xff7fb31b,0xff3c540d,0xff020300,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff080b02,0xff000000,
4194 0xff030401,0xff709d18,0xff8ac21d,0xff689216,0xff293909,0xffb9da77,0xffa1ce4a,0xff8ac21d,0xff8ac21d,0xff85ba1c,0xff587c13,0xff2c3e09,0xff0f1503,0xff000000,
4195 0xff080b02,0xff243308,0xff4d6c10,0xff6a9416,0xff233107,0xff435e0e,0xff84ba1c,0xff8ac21d,0xff689216,0xff293909,0xffb9da77,0xffa1ce4a,0xff8ac21d,0xff8ac21d,
4196 0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff689216,
4197 0xff293909,0xffa7d156,0xff85ba1c,0xff689216,0xff689216,0xff689216,0xff689216,0xff689216,0xff689216,0xff689216,0xff689216,0xff689216,0xff689216,0xff689216,
4198 0xff689216,0xff689216,0xff689216,0xff689216,0xff4d6d10,0xff233107,0xff77a719,0xff415b0e,0xff293909,0xff293909,0xff293909,0xff293909,0xff293909,0xff293909,
4199 0xff293909,0xff293909,0xff293909,0xff293909,0xff293909,0xff293909,0xff293909,0xff293909,0xff293909,0xff233107,0xff233107
4200};
4201
4202static const unsigned char h_src_data[] = {
4203 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
4204 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x15,0x01,0x01,0x01,0x00,
4205 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x15,0x0d,0x15,0x0d,
4206 0x15,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0d,0x08,
4207 0x0d,0x0d,0x0d,0x15,0x0d,0x15,0x01,0x01,0x00,0x00,0x00,0x00,0x01,0x15,
4208 0x0d,0x0d,0x08,0x08,0x08,0x0d,0x15,0x0d,0x15,0x01,0x00,0x00,0x00,0x00,
4209 0x01,0x15,0x0d,0x0d,0x0d,0x15,0x0d,0x08,0x08,0x15,0x15,0x01,0x00,0x00,
4210 0x00,0x01,0x15,0x0d,0x08,0x0d,0x15,0x0d,0x15,0x0d,0x15,0x15,0x15,0x01,
4211 0x00,0x00,0x00,0x01,0x0d,0x15,0x0d,0x08,0x08,0x08,0x0d,0x15,0x0d,0x15,
4212 0x08,0x01,0x00,0x00,0x01,0x0d,0x15,0x0d,0x15,0x0d,0x15,0x0d,0x08,0x08,
4213 0x15,0x15,0x01,0x00,0x00,0x01,0x15,0x15,0x08,0x15,0x15,0x15,0x0d,0x15,
4214 0x15,0x15,0x15,0x15,0x01,0x00,0x01,0x15,0x15,0x15,0x15,0x08,0x08,0x08,
4215 0x15,0x0d,0x15,0x0d,0x15,0x15,0x01,0x00,0x01,0x08,0x15,0x15,0x15,0x15,
4216 0x15,0x15,0x08,0x08,0x08,0x15,0x15,0x08,0x01,0x00,0x00,0x01,0x01,0x08,
4217 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x01,0x00,0x00,0x00,0x00,
4218 0x00,0x01,0x01,0x01,0x08,0x15,0x15,0x15,0x15,0x15,0x08,0x01,0x00,0x00,
4219 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x08,0x15,0x08,0x01,0x00,
4220 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,
4221 0x00,0x00,0x00,0x00
4222};
4223
4224static const QRgb h_src_ctable[] = {
4225 0xc6c6c6,0xff000000,0xffc3c3c3,0xff303030,0xffc0c0ff,0xffff0000,0xff008080,0xff800000,0xffc0c000,0xff0000c0,0xff808080,0xffc0ffc0,0xff00ffff,0xffffffff,
4226 0xffa0a0a0,0xff00ff00,0xffffff00,0xffffc0ff,0xff404000,0xff00c000,0xff000080,0xffffffc0,0xff400000,0xffc05800,0xff800080,0xff008000,0xff00c0c0,0xffdcdcdc,
4227 0xffff8000,0xffffc0c0,0xff585858,0xffc00000,0xffffdca8,0xff808000,0xffffa858,0xff004000,0xffc000c0,0xff0000ff,0xffff00ff,0xffc0ffff,0xff004040
4228};
4229
4230static const QRgb help_icon_data[] = {
4231 0xffffff,0x2000000,0x6000000,0xa000000,0x11000000,0x16000000,0x1a000000,0x1a000000,0x18000000,0x12000000,0xc000000,0x6000000,0x3000000,0x1000000,
4232 0x2000000,0x7000000,0x10000000,0x1b000000,0x2f000000,0x47000000,0x58000000,0x59000000,0x4b000000,0x33000000,0x1e000000,0x12000000,0x9000000,0x3000000,
4233 0x5000000,0xe000000,0x1d000000,0x3b000000,0x72000000,0xbf6d6d6d,0xdf969696,0xe0959595,0xca7c7c7c,0x81000000,0x48000000,0x24000000,0x13000000,0x7000000,
4234 0x7000000,0x16000000,0x30000000,0x71000000,0xeab4b4b4,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xf9dadada,0x93292929,0x42000000,0x1e000000,0xb000000,
4235 0xa000000,0x1c000000,0x45000000,0xb6717171,0xffffffff,0xffffffff,0xfdb7b7b7,0xfd9a9a9a,0xffffffff,0xffffffff,0xdf969696,0x63000000,0x2a000000,0x10000000,
4236 0xb000000,0x20000000,0x4c000000,0xb1747474,0xe9909090,0xfbc7c7c7,0xf91a1a1a,0xfe404040,0xffffffff,0xffffffff,0xe2949494,0x6d000000,0x31000000,0x13000000,
4237 0xa000000,0x1e000000,0x40000000,0x72000000,0xad000000,0xe0000000,0xfc787878,0xfff1f1f1,0xffffffff,0xfbc7c7c7,0xb0000000,0x62000000,0x31000000,0x13000000,
4238 0x8000000,0x17000000,0x33000000,0x5d000000,0x99000000,0xe3474747,0xffffffff,0xffffffff,0xfda8a8a8,0xd3000000,0x8e000000,0x53000000,0x2a000000,0xf000000,
4239 0x5000000,0x12000000,0x2c000000,0x55000000,0x92000000,0xe7808080,0xfdc5c5c5,0xfdc5c5c5,0xe0000000,0xaa000000,0x72000000,0x41000000,0x1f000000,0xb000000,
4240 0x3000000,0xc000000,0x23000000,0x48000000,0x83000000,0xd7636363,0xf68a8a8a,0xf48b8b8b,0xbc000000,0x83000000,0x56000000,0x2e000000,0x13000000,0x6000000,
4241 0x1000000,0x7000000,0x1b000000,0x3d000000,0x77000000,0xe2949494,0xffffffff,0xffffffff,0xaa000000,0x66000000,0x3f000000,0x1d000000,0x9000000,0x3000000,
4242 0xffffff,0x5000000,0x18000000,0x37000000,0x6a000000,0xd9999999,0xffffffff,0xffffffff,0x93000000,0x50000000,0x2e000000,0x12000000,0x3000000,0x1000000,
4243 0xffffff,0x5000000,0x14000000,0x2e000000,0x4e000000,0x7b000000,0x9a000000,0x92000000,0x62000000,0x3b000000,0x21000000,0xb000000,0xffffff,0xffffff,
4244 0xffffff,0x3000000,0xe000000,0x1f000000,0x31000000,0x42000000,0x4d000000,0x4a000000,0x38000000,0x27000000,0x15000000,0x7000000,0xffffff,0xffffff
4245};
4246
4247static const QRgb home_data[] = {
4248 0xffffff,0x1000000,0x2000000,0x6000000,0xb000000,0x13000000,0x1c000000,0x21000000,0x21000000,0x20000000,0x1d000000,0x13000000,0xc000000,0x6000000,
4249 0x1000000,0x2000000,0x8000000,0x12000000,0x21000000,0x31000000,0x43000000,0x4e000000,0x51000000,0x4a000000,0x40000000,0x2e000000,0x1f000000,0x11000000,
4250 0x2000000,0x8000000,0x14000000,0x27000000,0x42000000,0x5e000000,0xa37b7b7b,0xaf717171,0x8e131313,0xab6a6a6a,0x93626262,0x57000000,0x3b000000,0x22000000,
4251 0x7000000,0x13000000,0x28000000,0x4c000000,0x71000000,0xb76a6a6a,0xfff3f3f3,0xfff2f2f2,0xdd656565,0xffb1b1b1,0xf9b3b3b3,0x88000000,0x5f000000,0x39000000,
4252 0xf000000,0x23000000,0x47000000,0x75000000,0xbf646464,0xffeeeeee,0xffffffff,0xffffffff,0xffe8e8e8,0xff939393,0xfc8e8e8e,0xb3000000,0x86000000,0x56000000,
4253 0x1a000000,0x38000000,0x66000000,0xbd6f6f6f,0xffeeeeee,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe3e3e3,0xfe858585,0xd0000000,0xa4000000,0x6f000000,
4254 0x21000000,0x4d000000,0xa1646464,0xffebebeb,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffcbcbcb,0xe8343434,0xb9000000,0x82000000,
4255 0x2a000000,0x80747474,0xfcd5d5d5,0xfff1f1f1,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffcfcfcf,0xfe9c9c9c,0xd23f3f3f,0x8d000000,
4256 0x2d000000,0x73464646,0xb75c5c5c,0xfddedede,0xffffffff,0xfff8f8f8,0xfff1f1f1,0xfff0f0f0,0xfff8f8f8,0xffffffff,0xffb8b8b8,0xee303030,0xcc242424,0x90000000,
4257 0x2b000000,0x5d000000,0x94000000,0xfadddddd,0xffffffff,0xffb2b2b2,0xff565656,0xff4c4c4c,0xffa4a4a4,0xffffffff,0xfdaeaeae,0xdf000000,0xb9000000,0x83000000,
4258 0x23000000,0x51000000,0x85000000,0xfbe5e5e5,0xffffffff,0xffbebebe,0xff6c6c6c,0xff646464,0xffb4b4b4,0xffffffff,0xfbbcbcbc,0xcd000000,0xa4000000,0x73000000,
4259 0x1d000000,0x40000000,0x6c000000,0xddb6b6b6,0xfcd6d6d6,0xfdb0b0b0,0xfa7c7c7c,0xfb797979,0xfea6a6a6,0xfdcccccc,0xe88b8b8b,0xaf000000,0x87000000,0x5b000000,
4260 0x12000000,0x2c000000,0x4d000000,0x71000000,0x94000000,0xab000000,0xb8000000,0xbf000000,0xbd000000,0xb3000000,0xa2000000,0x85000000,0x61000000,0x3e000000,
4261 0x9000000,0x18000000,0x30000000,0x48000000,0x61000000,0x74000000,0x81000000,0x86000000,0x83000000,0x7b000000,0x6a000000,0x55000000,0x3b000000,0x25000000
4262};
4263
4264static const unsigned char install_data[] = {
4265 0x00,0x00,0x00,0x02,0x00,0x00,0x03,0x03,0x03,0x03,0x00,0x00,0x00,0x00,
4266 0x00,0x00,0x00,0x00,0x02,0x02,0x00,0x03,0x04,0x04,0x05,0x03,0x00,0x00,
4267 0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x02,0x00,0x03,0x04,0x05,0x05,0x03,
4268 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x02,0x06,0x03,0x05,0x05,
4269 0x05,0x03,0x06,0x06,0x07,0x07,0x00,0x00,0x00,0x02,0x02,0x06,0x06,0x06,
4270 0x03,0x03,0x03,0x06,0x06,0x07,0x07,0x07,0x00,0x00,0x00,0x02,0x06,0x06,
4271 0x06,0x06,0x06,0x06,0x06,0x06,0x07,0x07,0x07,0x00,0x00,0x00,0x08,0x08,
4272 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x07,0x07,0x07,0x02,0x00,0x00,0x00,
4273 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x07,0x07,0x02,0x09,0x09,0x00,
4274 0x00,0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x07,0x02,0x02,0x09,
4275 0x02,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x09,0x07,0x07,0x07,0x07,0x07,
4276 0x09,0x09,0x02,0x00,0x00,0x00,0x00,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
4277 0x09,0x09,0x02,0x09,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x09,0x07,
4278 0x07,0x07,0x07,0x07,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x07,
4279 0x09,0x07,0x07,0x07,0x07,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
4280 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
4281};
4282
4283static const QRgb install_ctable[] = {
4284 0x40ffffff,0xffffff00,0xffff0000,0xff0000ff,0xffffffff,0xff00b6ff,0xff000000,0xffff6d00,0xffffb696,0xffb64500
4285};
4286
4287static const QRgb installed_data[] = {
4288 0xff,0xff3300,0xff,0xff3300,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
4289 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
4290 0xff,0xff,0xff,0xff,0xff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff,0xff,0xff,0xff,0xff,
4291 0xff,0xff,0xff,0xff0000ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff0000ff,0xff0000ff,0xff,0xff,0xff,
4292 0xff,0xff,0xff,0xff00b6ff,0xff00b6ff,0xffffffff,0xffffffff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff0000ff,0xffff,0xff,0xffff,
4293 0xff,0xffff,0xff0000ff,0xff00b6ff,0xffffffff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff0000ff,0xff,0xff,
4294 0xff,0xff,0xff0000ff,0xff00b6ff,0xffffffff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff0000ff,0xff,0xffff,
4295 0xff,0xffff,0xff0000ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff0000ff,0xff,0xff,
4296 0xff,0xff,0xff0000ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff0000ff,0xff,0xffff,
4297 0xff,0xffff,0xff,0xff0000ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff0000ff,0xff,0xff,0xff,
4298 0xff,0xff,0xff,0xff0000ff,0xff0000ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff0000ff,0xff0000ff,0xffff,0xff,0xffff,
4299 0xff,0xffff,0xff,0xffff,0xff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xffff,0xff,0xff,0xff,0xff,
4300 0xff,0xff,0xff,0xff,0xff,0xffff,0xff,0xffff,0xff,0xffff,0xff,0xffff,0xff,0xffff,
4301 0xff,0xffff,0xff,0xffff,0xff,0xffff,0xff,0xffff,0xff,0xffff,0xff,0xff,0xff,0xff
4302};
4303
4304static const QRgb italic_data[] = {
4305 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4306 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4307 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4308 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,
4309 0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4310 0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4311 0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4312 0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,
4313 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,
4314 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,
4315 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,
4316 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,
4317 0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4318 0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4319 0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4320 0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4321 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4322 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4323 0x0,0x0,0x0,0x0
4324};
4325
4326static const unsigned char konsole_data[] = {
4327 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
4328 0x01,0x01,0x01,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
4329 0x03,0x03,0x03,0x01,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
4330 0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
4331 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x04,0x00,0x03,0x03,0x03,
4332 0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x00,0x03,0x03,0x04,0x00,0x03,
4333 0x02,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x00,0x03,0x03,0x04,
4334 0x00,0x03,0x02,0x03,0x02,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x00,0x03,
4335 0x03,0x04,0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,
4336 0x00,0x03,0x03,0x04,0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
4337 0x03,0x04,0x00,0x03,0x03,0x04,0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
4338 0x03,0x03,0x03,0x04,0x00,0x03,0x03,0x04,0x00,0x03,0x03,0x03,0x03,0x03,
4339 0x03,0x03,0x03,0x03,0x03,0x04,0x00,0x03,0x03,0x04,0x00,0x03,0x03,0x03,
4340 0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x00,0x03,0x03,0x04,0x04,0x04,
4341 0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00,0x03,0x03,0x00,
4342 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,
4343 0x01,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
4344 0x03,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
4345 0x01,0x01,0x01,0x01
4346};
4347
4348static const QRgb konsole_ctable[] = {
4349 0xff808080,0xc6c6c6,0xffc0ffff,0xff000000,0xffffffff
4350};
4351
4352static const QRgb language_data[] = {
4353 0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0x404000,0x404000,0x404000,0x404000,0x404000,0x404000,0x0,0x0,
4354 0x0,0x0,0xff000000,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0x404000,0x404000,0x404000,0xff000000,0xff000000,
4355 0x0,0x404000,0xdcdcdc,0x0,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,0xff000000,
4356 0xffffffff,0xff000000,0x0,0x0,0x404000,0x0,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
4357 0xffffffff,0xffffffff,0xffffffff,0xff000000,0x0,0x0,0x404000,0x404000,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,
4358 0xff000000,0xff000000,0xff000000,0xffffffff,0xffffffff,0xff000000,0x0,0x0,0x0,0x404000,0xff000000,0xffffffff,0xffffffff,0xff000000,
4359 0xff000000,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff000000,0xffffffff,0xff000000,0x0,0xff000000,0xff000000,0x404000,0xff000000,0xffffffff,
4360 0xffffffff,0xff000000,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff000000,0xff000000,0xff000000,0xff0000ff,0xff000000,0x0,
4361 0xff000000,0xffffffff,0xff000000,0xff000000,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,
4362 0xff000000,0x0,0xff000000,0xff000000,0x80,0xff000000,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,
4363 0xff0000ff,0xff0000ff,0xff000000,0x0,0xff000000,0x0,0x0,0xff000000,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,
4364 0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff000000,0x0,0xff000000,0x0,0x0,0xff000000,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,
4365 0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff000000,0x0,0xff000000,0x0,0x0,0xff000000,0xff0000ff,0xff000000,
4366 0xff000000,0xff000000,0xff000000,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff000000,0x0,0xff000000,0x0,0xdcdcdc,0xff000000,
4367 0xff000000,0xdcdcdc,0xdcdcdc,0x800000,0x800000,0xff000000,0xff0000ff,0xff0000ff,0xff0000ff,0xff000000,0xff000000,0x0,0x0,0x0,
4368 0x0,0xff000000,0xdcdcdc,0x0,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff000000,0xff000000,0xff000000,0x0,0xdcdcdc,0x0,
4369 0x0,0x0,0xdcdcdc,0xff000000,0xdcdcdc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xdcdcdc,0xdcdcdc,
4370 0xdcdcdc,0x0,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4371 0x0,0x0,0x0,0x0
4372};
4373
4374static const QRgb launching_data[] = {
4375 0xb000000,0x2d000000,0x0,0x48000000,0x53000000,0x51000000,0x23000000,0x0,0x0,0x2f3b3700,0x25b3a700,0x6b282500,0x5a0e0d00,0x190a0900,
4376 0xadffee00,0x76ffee00,0x0,0x2d000000,0xb000000,0x0,0x5ffee00,0x8ffee00,0x5ffee00,0x0,0x0,0x0,0x0,0x0,
4377 0xcffee00,0xaffee00,0x0,0x0,0x17000000,0x5c050500,0x71635c00,0x9b887f00,0xbd8f8500,0xb9877e00,0x6a282600,0x57000000,0x2c000000,0x69242200,
4378 0x78413d00,0x83363300,0x8b151300,0x59000000,0x7be8d800,0xe6ffee00,0x0,0x59000000,0x48000000,0x6ffee00,0x14ffee00,0x15ffee00,0x58171500,0x61000000,
4379 0x58000000,0xf000000,0xcffee00,0x3dffee00,0x27ffee00,0x5ffee00,0x0,0x0,0xb000000,0x63010100,0x68060500,0x5f181600,0x51dccd00,0xc7ffee00,
4380 0xf5e6d600,0xaa7f7700,0x5a000000,0x8c131200,0x7a665f00,0x8e665f00,0x7e464100,0x90040400,0x4b000000,0xf4ffee00,0x5cffee00,0x54000000,0x55060500,0x1dffee00,
4381 0x2dffee00,0x42776f00,0x780e0d00,0x71000000,0x4d000000,0x40f7e600,0x94ffee00,0x4bffee00,0x4ffee00,0x0,0x0,0x0,0x53000000,0x5d080700,
4382 0x6f0d0c00,0x990a0900,0x94060600,0x71030200,0xb0efdf00,0xfdffee00,0xa9aca000,0x960a0900,0xa1474200,0x74ffee00,0x7eb8ab00,0x7f262300,0x44000000,0xfbffee00,
4383 0x87fbea00,0x59000000,0x57403c00,0x48ffee00,0x45ffee00,0x73383400,0x92030300,0x53090800,0x98ffee00,0xdcffee00,0x68c4b700,0x52000000,0x100f0e00,0x0,
4384 0x0,0x0,0x4f000000,0x5c080700,0x1f6a6300,0x48514c00,0x90222000,0xa0131200,0x94050500,0xd6a19600,0xeefcec00,0x6f040400,0x9c433e00,0x9affee00,
4385 0xa2ffee00,0x93696200,0x56000000,0xfdffee00,0x88787000,0x69262400,0x72faed37,0x80fff131,0x61e2d300,0x9a121100,0xbf625c00,0xf5fcec00,0xf3ffee00,0x88b2a600,
4386 0x5d080700,0x590e0d00,0x28131100,0x54030200,0x0,0x0,0x2000000,0x57020200,0x5e100f00,0x31a69b00,0x39ffee00,0x58b3a800,0x9c2a2700,0x9b0a0900,
4387 0x63000000,0x36000000,0x613e3a00,0x94f0e00e,0xd2f2e20c,0xb9cec000,0x6b282500,0xaeb2a600,0x61151300,0x7b797100,0x11fffef5,0x2fffcda,0x413c3800,0xac222000,
4388 0xfdd2c400,0xd5ffee00,0x693c3800,0x68222000,0x5e2b2800,0x30454000,0x5f0d0c00,0x4b030300,0x0,0xbffee00,0x54000000,0x4a000000,0x59020200,0x63191800,
4389 0x42bdb000,0x63ffee00,0x3affee00,0x17b0a400,0x61232100,0x5a000000,0x3191700,0x2fefefe,0x4f5f4eb,0x17ffffff,0x887b7300,0x5a000000,0x905f5900,0x0,
4390 0x0,0x0,0x73141300,0x70000000,0xeffee00,0x694b4600,0x834e4900,0x56857c00,0x57494400,0x64191700,0x50060500,0x0,0x14ffee00,0x22ffee00,
4391 0x57000000,0x5a000000,0x5d000000,0x59010100,0x68232001,0x74cdc00b,0x44f8e806,0x0,0x5ffee00,0x52615a00,0x4000000,0x0,0x0,0x0,
4392 0x7ffee09,0x4a09e85,0x1bfb85c,0x0,0x0,0x1736c00,0x71080700,0x35a89d00,0x96706800,0xaa706807,0x79aea206,0x74655e00,0x6d2c2900,0x3d191700,
4393 0x0,0x3cffee00,0x61ffee00,0xeffee00,0x36000000,0x5a000000,0x5a000000,0x5b000000,0x8e000000,0x84474204,0xacc6ba1e,0x20f1ea96,0x0,0x1ffee08,
4394 0xbffee00,0x0,0x0,0x0,0x0,0x1fffefc,0x0,0x0,0x0,0x3f1f0e4,0x54ffee00,0x6df6e610,0x20a49d4d,0xaea59b10,
4395 0x73c9bc00,0x71333000,0x42171500,0x1ffee00,0x6dffee00,0xadffee00,0x1fffee00,0x0,0x0,0x2c000000,0x59000000,0x5a000000,0x5b000000,0x70141200,
4396 0x94615b05,0xeaebe59b,0x1dfefefd,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4397 0x0,0x1fefefe,0x1faf9ef,0x75fbea00,0x733e3900,0x59080800,0x1affee00,0xd5ffee00,0xe4ffee00,0x43ffee00,0x0,0x0,0x0,0x0,
4398 0x0,0x3d000000,0x5a000000,0x5a000000,0x61121100,0xa77e7600,0xdee8e080,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4399 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x163e3900,0x5b050500,0xb5e7d700,0xfdffee00,0xefffee00,0x21ffee00,0x0,
4400 0x0,0x0,0x0,0x13ffee00,0x6fffee00,0xc6ffee00,0xe2e9d900,0xe8c9bb00,0x90c1b400,0x67201e00,0xb6a89c00,0x1cf6ef9f,0x0,0x0,
4401 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x12c2900,0x56000000,0x23000000,0xbbccbe00,
4402 0xd2a19600,0x53000000,0x53000000,0x58000000,0x55000000,0x0,0xa1ffee00,0xbcffee00,0xc9ffee00,0xcaffee00,0xe0ffee00,0xe2ffee00,0x7effee00,0x48000000,
4403 0x6b2a2800,0x30ffee00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4404 0x56000000,0x60000000,0x5a000000,0x5a000000,0x57000000,0x53000000,0x53000000,0x4e000000,0x20000000,0x0,0x1ffee00,0x0,0x0,0x0,
4405 0x0,0x0,0x2000000,0x50000000,0x5a000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4406 0x0,0x0,0x0,0x0,0x3ad0d0d0,0x5a000000,0x5a000000,0x59000000,0x51000000,0x28000000,0x0,0x0,0x0,0x0,
4407 0x0,0x0,0x0,0x0,0x2000000,0x46000000,0x59000000,0x5d100f00,0x6cfcb95,0x0,0x0,0x0,0x0,0x0,
4408 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xd5ffee00,0xd7f4e400,0xd3aa9f00,0xbd8c8200,0xa4736b00,
4409 0x93645d00,0x6f625c00,0x22ffee00,0x16ffee00,0x0,0x0,0x0,0xb000000,0x58000000,0x60121100,0x32756d00,0x0,0x0,0x0,
4410 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe4aca784,
4411 0xf3c5ba39,0xe0e0d21e,0xc5f1e10d,0x96f6e503,0x98867d00,0x8e5d5700,0x47938900,0x1effee00,0x0,0x0,0x18000000,0x58000000,0x66232000,0x6fd5c700,
4412 0x5acdc131,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4413 0x0,0x5bfffcd7,0xf8ffee00,0xecffee00,0xd6ffee00,0xc2fceb00,0xaebbaf00,0x988c8300,0x92655e00,0x7e4c4700,0x24f0e000,0x16ffee00,0x0,0x11000000,
4414 0x5e0d0c00,0x682e2b00,0x5ff9e800,0xb0e1d31d,0xdbada452,0x56e6e090,0x15fffef0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4415 0x0,0x0,0x0,0x0,0x0,0x0,0x5a000000,0x5a000000,0x59000000,0x5a000000,0x59000000,0x5a000000,0x53000000,0x11000000,
4416 0x0,0x0,0x0,0x56111000,0x6e332f00,0x47f7e700,0x7cf7e607,0xa4ded021,0xadf9e805,0x83ffee00,0x4baa9e00,0x10f0e00,0x0,0x0,
4417 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3a69b00,0x67222000,0x59000000,0x3a000000,0x28928800,
4418 0x19ffee00,0x0,0x0,0x0,0x0,0x0,0x7ffee00,0x66282500,0x70464100,0x48ffee00,0x60f9e900,0x887b7300,0x76454000,0x5f0d0c00,
4419 0x5a000000,0x16282500,0x5ebdb00,0x0,0x0,0x0,0x3bffee00,0x14f7f7fb,0x0,0x0,0x1ffee00,0x2ccc68e,0x0,0x26dbce23,
4420 0x7ffdec01,0x6d333000,0x5b050500,0xc0fceb00,0xfcffee00,0xd6ffee00,0x40ffee00,0x0,0x0,0x0,0xcffee00,0x68242200,0x5f484300,0x575a5400,
4421 0x6d2e2b00,0x600f0e00,0x6a262300,0x6a262300,0x410b0a00,0x7ecabc00,0xef2eb8e,0x0,0x0,0x0,0x45030300,0xb3faea12,0x0,0x0,
4422 0x0,0x96ffee00,0x76e7d817,0xd7c9bd35,0xbce0d21e,0x82e3d404,0x7c454100,0x48383400,0xb3ffee00,0xe4ffee00,0xf6ffee00,0xbbffee00,0x69ffee00,0x6ffee00,
4423 0x9ffee00,0x5e1d1b00,0x62141300,0x5d080700,0x5b020200,0x5d080700,0xf9b2a600,0xbafceb00,0x682e2b00,0xcd8b8202,0x16ede8b1,0x11faf7ce,0x4fbea00,0x2b0f0e00,
4424 0x5a000000,0x72ffee00,0x26eae6af,0x0,0x13dad36f,0x6d2e2b00,0x7baa9e00,0xa1ffee00,0xa6f9e805,0x88f4e40a,0x926f6800,0x77464200,0x12ffee00,0x3ffee00,
4425 0x1dffee00,0x70ffee00,0x84ffee00,0x68ffee00,0x3ffee00,0xc3f3b00,0x6b000000,0x90000000,0x57080700,0xebfceb00,0xf7ffee00,0x70565000,0x8d5c5600,0xd28e8505,
4426 0xccf1e20d,0x9cffee00,0x5c343100,0x5a000000,0x5a000000,0x307f7700,0xa7ffee00,0x1bcb672,0x8867f3c,0x70322e00,0x5f0d0c00,0x54615a00,0x53ffee00,0x65fceb02,
4427 0x62c0b300,0x7e484400,0x2cbfb200,0xdffee00,0x3ffee00,0x0,0x0,0xcffee00,0x0,0x4a000000,0x94000000,0x6b020200,0xb9fceb00,0xebffee00,
4428 0x66464100,0x67201e00,0xa4736b00,0xabc5b804,0x97fbeb03,0x39ffee00,0x59000000,0x34000000,0x56000000,0x51000000,0x61ffee00,0x4ce6d718,0x596f6928,0x814d4807,
4429 0x46000000,0x5a000000,0x47030300,0xdffee00,0x1fffee00,0x72373400,0x484d4800,0xfffee00,0x6ffee00,0x2ffee00,0x0,0x0,0x18000000,0x7e000000,
4430 0x7a010100,0x91fbea00,0xbfffee00,0x513e3a00,0x5d080700,0x75413d00,0x99716900,0x77ffee00,0x4bffee00,0x1f393500,0x5a000000,0x99ffee00,0x42000000,0x59000000,
4431 0x36ffee00,0x79ffee00,0xad7a7208,0x86595404,0x47ffee00,0x99a89d00,0x5a000000,0x58000000,0x36040400,0x5c080700,0x3b222000,0x9ffee00,0x4ffee00,0x2ffee00,
4432 0x0,0x0,0x56000000,0x7a040400,0x71807800,0x6bffee00,0x4f1d1b00,0x5b020200,0x4c2a2700,0x9a2d2a00,0x9a433e00,0x3fffee00,0x13ffee00,0x57000000,
4433 0xb2857c00,0xffffee00,0x44000000,0x85000000,0x443c3800,0x4dffee00,0x926e6600,0x835d5700,0x6bffee00,0xffffee00,0xbaefdf00,0x51000000,0x59000000,0x5a000000,
4434 0x25000000,0x0,0x0,0x0,0x0,0x0,0x59000000,0x534c4700,0x29f2e200,0x4e030300,0x5a000000,0x540c0b00,0x94111000,0xa3181600,
4435 0x73373300,0x54242200,0x39040400,0x5a000000,0xf7eddd00,0xc8ffee00,0x90000000,0xaa000000,0x5b020200,0x29958b00,0x79504a00,0x764b4600,0x1dffee00,0x8affee00,
4436 0xf8ffee00,0xd4ffee00,0x17ffee00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x5a0e0d00,0x62171500,0x59000000,0x5a000000,
4437 0x23000000,0x600f0e00,0x970d0c00,0x7b151400,0x61121100,0x5d030300,0x5a000000,0x7e6b6400,0xf5ffee00,0x18ffee00,0x90000000,0x7b000000,0x57000000,0x5a050500,
4438 0x63292600,0x69353100,0x18ffee00,0x7ffee00,0x1effee00,0xc1ffee00,0xbfffee00,0x2bffee00,0x0,0x0,0x0,0x0,0x0,0x0,
4439 0xf443f00,0x4c000000,0x42000000,0x2000000,0x1ffee00,0x57070700,0x680b0a00,0x19262300,0x46000000,0x59000000,0x55000000,0x94ffee00,0xa2ffee00,0x0,
4440 0x70000000,0x59000000,0xb000000,0x5a000000,0x5d080700,0x541b1900,0xeffee00,0x8ffee00,0x1ffee00,0x0,0x49ffee00,0x77ffee00,0x2bffee00,0x6ffee00,
4441 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x29060500,0x5b020200,0x58000000,0x5a000000,0x49000000,
4442 0x8bfb200,0xa0ffee00,0x3bffee00,0x0,0x2000000,0x47000000,0x0,0x40000000,0x58000000,0x47f7700,0x6ffee00,0x4ffee00,0x1ffee00,0x0,
4443 0x0,0x9ffee00,0x22ffee00,0x1cffee00,0x1ffee00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x12000000,
4444 0x59000000,0x53000000,0x12000000,0x0,0x32ffee00,0x51ffee00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4445 0x1ffee00,0x1ffee00,0x0,0x0,0x0,0x0,0x0,0x7ffee00,0x5ffee00,0x0,0x0,0x0,0x0,0x0,
4446 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ffee00,0x31ffee00,0x11ffee00,0x0,0x0,0x0,0x0,
4447 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4448 0x0,0x0
4449};
4450
4451static const QRgb left_data[] = {
4452 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4453 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4454 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4455 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
4456 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4457 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,
4458 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4459 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4460 0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
4461 0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4462 0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
4463 0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4464 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
4465 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,
4466 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,
4467 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,
4468 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,
4470 0x0,0x0,0x0,0x0
4471};
4472
4473static const QRgb library_data[] = {
4474 0x6000000,0x10000000,0x26000000,0x3c000000,0x3b000000,0x28000000,0x19000000,0x18000000,0x26000000,0x3a000000,0x3e000000,0x2e000000,0x1b000000,0xf000000,
4475 0xa000000,0x27000000,0xb3c1c1c1,0xffffffff,0xffffffff,0x818d8d8d,0x31000000,0x30000000,0x7f8e8e8e,0xffffffff,0xffffffff,0xb8bdbdbd,0x3a000000,0x1a000000,
4476 0xe000000,0x40000000,0xffffffff,0xffffffff,0xffffffff,0xa2757575,0x55000000,0x55000000,0xa0767676,0xffffffff,0xffffffff,0xffffffff,0x5a000000,0x28000000,
4477 0x13000000,0x4c000000,0xffffffff,0xffffffff,0xffffffff,0xe4c8c8c8,0xae6e6e6e,0xae6e6e6e,0xe4c8c8c8,0xffffffff,0xffffffff,0xffffffff,0x6e000000,0x35000000,
4478 0x17000000,0x50000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x7a000000,0x3f000000,
4479 0x19000000,0x54000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x84000000,0x46000000,
4480 0x1a000000,0x55000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x88000000,0x4a000000,
4481 0x19000000,0x54000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x88000000,0x48000000,
4482 0x17000000,0x4b000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x7e000000,0x42000000,
4483 0x14000000,0x37000000,0xbdb9b9b9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xd1aaaaaa,0x68000000,0x39000000,
4484 0x10000000,0x20000000,0x42000000,0x67000000,0x91000000,0xf0d4d4d4,0xffffffff,0xffffffff,0xf3d1d1d1,0xaf000000,0x90000000,0x71000000,0x4c000000,0x2d000000,
4485 0xb000000,0x12000000,0x20000000,0x35000000,0x62000000,0xe8dadada,0xffffffff,0xffffffff,0xecd7d7d7,0x84000000,0x61000000,0x4b000000,0x34000000,0x1f000000,
4486 0x8000000,0xe000000,0x19000000,0x2b000000,0x4b000000,0xa8919191,0xe9d9d9d9,0xead8d8d8,0xb5898989,0x6b000000,0x4e000000,0x3a000000,0x27000000,0x15000000,
4487 0xe000000,0x19000000,0x2c000000,0x41000000,0x5b000000,0x75000000,0x89000000,0x8e000000,0x83000000,0x70000000,0x58000000,0x41000000,0x28000000,0x16000000
4488};
4489
4490static const unsigned char locked_data[] = {
4491 0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,
4492 0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x06,0x03,0x03,0x03,0x04,
4493 0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x06,0x07,0x06,0x07,
4494 0x06,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x07,0x07,
4495 0x07,0x07,0x07,0x06,0x07,0x06,0x03,0x03,0x04,0x04,0x04,0x04,0x03,0x06,
4496 0x07,0x07,0x07,0x07,0x06,0x07,0x06,0x07,0x06,0x03,0x04,0x04,0x04,0x04,
4497 0x03,0x05,0x07,0x07,0x00,0x06,0x07,0x06,0x06,0x06,0x06,0x03,0x04,0x04,
4498 0x04,0x03,0x05,0x05,0x05,0x00,0x00,0x00,0x00,0x07,0x06,0x06,0x06,0x03,
4499 0x04,0x04,0x04,0x03,0x01,0x05,0x00,0x00,0x05,0x05,0x05,0x00,0x07,0x06,
4500 0x02,0x03,0x04,0x04,0x03,0x07,0x06,0x00,0x00,0x05,0x05,0x05,0x00,0x00,
4501 0x05,0x06,0x03,0x04,0x04,0x03,0x06,0x06,0x07,0x01,0x00,0x00,0x00,0x00,
4502 0x00,0x05,0x05,0x05,0x03,0x04,0x03,0x06,0x06,0x06,0x06,0x07,0x06,0x01,
4503 0x00,0x00,0x01,0x05,0x05,0x05,0x03,0x04,0x03,0x02,0x06,0x06,0x06,0x06,
4504 0x06,0x06,0x07,0x06,0x06,0x06,0x01,0x02,0x03,0x04,0x04,0x03,0x03,0x02,
4505 0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x03,0x04,0x04,0x04,0x04,
4506 0x04,0x03,0x03,0x03,0x02,0x06,0x06,0x06,0x06,0x06,0x02,0x03,0x04,0x04,
4507 0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x02,0x06,0x02,0x03,0x04,
4508 0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x03,
4509 0x04,0x04,0x04,0x04
4510};
4511
4512static const QRgb locked_ctable[] = {
4513 0xffffa858,0xffa0a0a0,0xffc0c000,0xff000000,0xc6c6c6,0xff800000,0xffffffc0,0xffffffff
4514};
4515
4516static const unsigned char lockedfolder_data[] = {
4517 0x06,0x06,0x04,0x07,0x04,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
4518 0x06,0x06,0x06,0x04,0x07,0x01,0x05,0x04,0x04,0x04,0x04,0x06,0x06,0x06,
4519 0x06,0x06,0x06,0x06,0x06,0x04,0x09,0x07,0x07,0x04,0x03,0x03,0x03,0x04,
4520 0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x04,0x09,0x09,0x02,0x04,0x03,0x04,
4521 0x04,0x01,0x04,0x06,0x06,0x06,0x06,0x06,0x06,0x04,0x09,0x02,0x09,0x04,
4522 0x03,0x04,0x01,0x05,0x01,0x04,0x04,0x06,0x06,0x06,0x06,0x04,0x02,0x09,
4523 0x05,0x05,0x05,0x04,0x09,0x07,0x07,0x07,0x01,0x04,0x06,0x06,0x06,0x04,
4524 0x09,0x02,0x01,0x01,0x01,0x05,0x05,0x08,0x02,0x08,0x04,0x01,0x07,0x06,
4525 0x06,0x04,0x02,0x02,0x01,0x04,0x03,0x01,0x01,0x02,0x08,0x08,0x04,0x01,
4526 0x07,0x06,0x06,0x04,0x02,0x02,0x01,0x01,0x03,0x04,0x01,0x08,0x08,0x08,
4527 0x04,0x01,0x07,0x06,0x06,0x04,0x02,0x02,0x02,0x01,0x01,0x03,0x01,0x08,
4528 0x08,0x08,0x04,0x01,0x07,0x06,0x06,0x04,0x04,0x00,0x02,0x04,0x03,0x01,
4529 0x01,0x08,0x08,0x08,0x04,0x01,0x07,0x06,0x06,0x06,0x06,0x04,0x04,0x04,
4530 0x03,0x04,0x08,0x08,0x08,0x08,0x04,0x01,0x07,0x06,0x06,0x06,0x06,0x06,
4531 0x06,0x04,0x03,0x04,0x08,0x08,0x08,0x08,0x04,0x01,0x07,0x06,0x06,0x06,
4532 0x06,0x06,0x06,0x06,0x04,0x04,0x04,0x08,0x08,0x08,0x04,0x01,0x04,0x04,
4533 0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x04,0x04,0x08,0x04,0x01,
4534 0x04,0x04,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x04,
4535 0x04,0x04,0x04,0x06
4536};
4537
4538static const QRgb lockedfolder_ctable[] = {
4539 0xff808080,0xffffa858,0xffc0c0c0,0xffc05800,0xff000000,0xffffdca8,0xc6c6c6,0xff585858,0xffa0a0a4,0xffffffff
4540};
4541
4542static const QRgb mag_data[] = {
4543 0xffdbdbdb,0xff000000,0xff000000,0xff000000,0xff000000,0xffdbdbdb,0xffdadada,0xffd7d7d7,0xdcdcdc,0xdcdcdc,0xff000000,0xff000000,0xff2effff,0xff52ffff,
4544 0xff000000,0xff000000,0xffd9d9d9,0xffd7d7d7,0xdcdcdc,0xdcdcdc,0xff000000,0xff00ffff,0xff00ffff,0xff00ffff,0xff00ffff,0xff000000,0xdcdcdc,0xdcdcdc,
4545 0xdcdcdc,0xdcdcdc,0xff000000,0xff00ffff,0xff00ffff,0xff00ffff,0xff00ffff,0xff000000,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff000000,0xff000000,
4546 0xff00ffff,0xff00ffff,0xff000000,0xff000000,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff000000,0xff000000,0xff000000,0xff000000,0xffc0c000,
4547 0xff000000,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff000000,0xffc0c000,0xffc0c000,0xff000000,0xdcdcdc,0xdcdcdc,
4548 0xdcdcdc,0xffd7d7d7,0xffd7d7d7,0xdcdcdc,0xdcdcdc,0xff000000,0xffc0c000,0xffc0c000,0xff000000,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,
4549 0xdcdcdc,0xdcdcdc,0xff000000,0xffc0c000,0xff000000,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff000000,
4550 0xdcdcdc,0xdcdcdc
4551};
4552
4553static const QRgb month_data[] = {
4554 0xe000000,0x18000000,0x23000000,0x2e000000,0x35000000,0x39000000,0x3b000000,0x3b000000,0x3b000000,0x39000000,0x35000000,0x2e000000,0x23000000,0x18000000,
4555 0x18000000,0xff7a7fbb,0xff6b71b3,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff454ca2,0xff0d1986,0x3d000000,0x2a000000,
4556 0x24000000,0xff6b71b3,0xff4a51a4,0xff303999,0xff303999,0xff303999,0xff303999,0xff303999,0xff303999,0xff303999,0xff0d1a8b,0xff0a146c,0x5a000000,0x3e000000,
4557 0x2e000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe5e5e5,0xffaeaeae,0x74000000,0x50000000,
4558 0x35000000,0xffffffff,0xff000000,0xff000000,0xffffffff,0xff000000,0xff000000,0xffffffff,0xff000000,0xff000000,0xffe5e5e5,0xffaeaeae,0x86000000,0x5c000000,
4559 0x39000000,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffe5e5e5,0xffaeaeae,0x90000000,0x63000000,
4560 0x3b000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe5e5e5,0xffaeaeae,0x95000000,0x66000000,
4561 0x3c000000,0xffffffff,0xff000000,0xff000000,0xffffffff,0xff000000,0xff000000,0xffffffff,0xff000000,0xff000000,0xffe5e5e5,0xffaeaeae,0x96000000,0x67000000,
4562 0x3b000000,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffe5e5e5,0xffaeaeae,0x95000000,0x66000000,
4563 0x39000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe5e5e5,0xffaeaeae,0x90000000,0x63000000,
4564 0x35000000,0xffffffff,0xfffdfdfd,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffd1d1d1,0xffa4a4a4,0x86000000,0x5c000000,
4565 0x2e000000,0xfff5f5f5,0xffc4c4c4,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffa4a4a4,0xff969696,0x74000000,0x50000000,
4566 0x24000000,0x3e000000,0x5a000000,0x74000000,0x86000000,0x90000000,0x95000000,0x96000000,0x95000000,0x90000000,0x86000000,0x74000000,0x5a000000,0x3e000000,
4567 0x18000000,0x2a000000,0x3d000000,0x4f000000,0x5c000000,0x63000000,0x66000000,0x67000000,0x66000000,0x63000000,0x5c000000,0x4f000000,0x3d000000,0x2a000000
4568};
4569
4570static const QRgb mute_data[] = {
4571 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x95050505,0xd000000,0x7000000,0xffffff,0xffffff,0xffffff,0xffffff,
4572 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0x3f000000,0x19000000,0xffffff,0xffffff,0xffffff,0xffffff,
4573 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffcacaca,0xff000000,0x79000000,0x2b000000,0xffffff,0xffffff,0xffffff,0xffffff,
4574 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffcacaca,0xffffffff,0xff030303,0xe3050505,0xcb050505,0x2f050505,0xbf050505,0xbf050505,0xbf050505,
4575 0xff000000,0xff000000,0xff000000,0xff000000,0xffcacaca,0xffffffff,0xffffffff,0xff030303,0xffffffff,0xbb696969,0xbf050505,0xab717171,0xffffffff,0xbf050505,
4576 0xff000000,0xffbababa,0xffbababa,0xffbababa,0xffeaeaea,0xffeaeaea,0xffeaeaea,0xff030303,0xda5d5d5d,0xffffffff,0xab717171,0xffffffff,0xab717171,0xbf050505,
4577 0xff000000,0xffcfcfcf,0xffcfcfcf,0xffcfcfcf,0xffcfcfcf,0xffcfcfcf,0xffcfcfcf,0xff000000,0xe3050505,0xbb696969,0xffffffff,0xab717171,0xbf050505,0x2f050505,
4578 0xff000000,0xff8d8d8d,0xff8d8d8d,0xff8d8d8d,0xffb4b4b4,0xffb3b3b3,0xffb3b3b3,0xff030303,0xda5d5d5d,0xffffffff,0xab717171,0xffffffff,0xab717171,0xbf050505,
4579 0xff000000,0xff000000,0xff000000,0xff000000,0xff7c7c7c,0xff9d9d9d,0xff9d9d9d,0xff030303,0xffffffff,0xbb696969,0xbf050505,0xab717171,0xffffffff,0xbf050505,
4580 0x24000000,0x6b000000,0x8f000000,0x8f000000,0xff000000,0xff7c7c7c,0xff9d9d9d,0xff030303,0xe3050505,0xcb050505,0x2f050505,0xbf050505,0xbf050505,0xbf050505,
4581 0xc000000,0x24000000,0x30000000,0x30000000,0x48000000,0xff000000,0xff7c7c7c,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,0xffffff,
4582 0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x3c000000,0xff000000,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,0xffffff,
4583 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x3c000000,0xc8030303,0x79000000,0x2b000000,0xffffff,0xffffff,0xffffff,0xffffff,
4584 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x31000000,0x3f000000,0x19000000,0xffffff,0xffffff,0xffffff,0xffffff
4585};
4586
4587static const QRgb new_data[] = {
4588 0x16000000,0x4f000000,0x9c000000,0xbb000000,0xbe000000,0xbe000000,0xc1000000,0xc4000000,0xbf000000,0xa2000000,0x6d000000,0x3e000000,0x21000000,0x12000000,
4589 0x18000000,0x4b000000,0x86000000,0xffffffff,0xfffdfdfd,0xffeaeaea,0xffb0b0b0,0xffffffff,0xf5c6c6c6,0xae000000,0x99000000,0x6e000000,0x3f000000,0x21000000,
4590 0x19000000,0x4b000000,0x7c000000,0xffffffff,0xfffcfcfc,0xffe2e2e2,0xff969696,0xffffffff,0xffffffff,0xf8c1c1c1,0xb5000000,0x99000000,0x61000000,0x33000000,
4591 0x1a000000,0x4d000000,0x7e000000,0xffffffff,0xfffcfcfc,0xffe2e2e2,0xff939393,0xffffffff,0xffffffff,0xffffffff,0xf8c4c4c4,0xb0000000,0x7b000000,0x43000000,
4592 0x1c000000,0x50000000,0x81000000,0xffffffff,0xfffdfdfd,0xffe8e8e8,0xffababab,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xb9000000,0x87000000,0x4c000000,
4593 0x1c000000,0x51000000,0x84000000,0xffffffff,0xfffdfdfd,0xfff5f5f5,0xffd7d7d7,0xffababab,0xff939393,0xff969696,0xffb0b0b0,0xbd000000,0x8d000000,0x50000000,
4594 0x1d000000,0x52000000,0x85000000,0xffffffff,0xffffffff,0xfffcfcfc,0xfff5f5f5,0xffe8e8e8,0xffe2e2e2,0xffe2e2e2,0xffeaeaea,0xbf000000,0x8f000000,0x53000000,
4595 0x1d000000,0x52000000,0x85000000,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfffcfcfc,0xfffdfdfd,0xc0000000,0x8f000000,0x54000000,
4596 0x1d000000,0x52000000,0x85000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xbf000000,0x8f000000,0x53000000,
4597 0x1d000000,0x51000000,0x84000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xbd000000,0x8c000000,0x51000000,
4598 0x1c000000,0x51000000,0x86000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xb8000000,0x88000000,0x4d000000,
4599 0x1a000000,0x4e000000,0x87000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xb2000000,0x7f000000,0x45000000,
4600 0x16000000,0x41000000,0x79000000,0x92000000,0xa0000000,0xae000000,0xba000000,0xbf000000,0xbf000000,0xbd000000,0xb4000000,0x9e000000,0x6a000000,0x39000000,
4601 0xd000000,0x26000000,0x4b000000,0x64000000,0x76000000,0x85000000,0x90000000,0x95000000,0x95000000,0x91000000,0x86000000,0x6e000000,0x49000000,0x2a000000
4602};
4603
4604static const QRgb newfolder_data[] = {
4605 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,
4607 0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
4608 0xff000000,0xffe9d4b5,0xffffffd4,0xffffffd4,0xffffffd4,0xffffffd4,0xffd4a764,0xff000000,0xff000000,0xff000000,0xff000000,0xffffff,0xffffff,0xffffff,
4609 0xff000000,0xffe9d4b5,0xffd4a764,0xffd4a764,0xffd4a764,0xffd4a764,0xffd4a764,0xffd3a664,0xffd3a664,0xffd3a664,0xffd3a664,0xff000000,0xffc49a6f,0xffffff,
4610 0xff000000,0xffe9d4b5,0xffd4a764,0xffd4a764,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
4611 0xff000000,0xffe9d4b5,0xffd4a764,0xff000000,0xffffffff,0xfffefefe,0xfff7f7f7,0xffdadada,0xffb4b4b4,0xffafafaf,0xffd1d1d1,0xffededed,0xfff7f7f7,0xff000000,
4612 0xff000000,0xffe9d4b5,0xffb06e2f,0xff505042,0xfffdfdd1,0xfff7f7cd,0xffe1e1bb,0xffa1a186,0xff78ff78,0xff78ff78,0xff93937a,0xffccccaa,0xff48483c,0x8782826b,
4613 0xff000000,0xffe9d4b5,0xff000000,0xfffefefe,0xfff8f8ce,0xffdadab6,0xffa1a186,0xff5a5a4b,0xff78ff78,0xff78ff78,0xff4a4a3e,0xff84846e,0xff000000,0x6b000000,
4614 0xff000000,0xffb06e2f,0xff505042,0xfffefed3,0xfff1f1c8,0xffb3b394,0xff78ff78,0xff78ff78,0xff78ff78,0xff78ff78,0xff78ff78,0xff78ff78,0xe4313129,0x67000000,
4615 0xff000000,0xffd4a764,0xffffffff,0xfffefed3,0xffefefc7,0xffaeae91,0xff78ff78,0xff78ff78,0xff78ff78,0xff78ff78,0xff78ff78,0xff78ff78,0xc6000000,0x4d000000,
4616 0xff000000,0xffffffff,0xffffffd4,0xfffefed3,0xfff4f4cb,0xffd1d1ad,0xff93937a,0xff4a4a3e,0xff78ff78,0xff78ff78,0xff0f0f0d,0xee20201b,0x99000000,0x37000000,
4617 0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff78ff78,0xff78ff78,0xff000000,0xb0000000,0x5f000000,0x28000000,
4618 0xffffff,0x17000000,0x43000000,0x57000000,0x59000000,0x5e000000,0x6c000000,0x8c000000,0xac000000,0xb5000000,0x99000000,0x5f000000,0x34000000,0x19000000
4619};
4620
4621static const QRgb next_data[] = {
4622 0x1000000,0x3000000,0x8000000,0xf000000,0x16000000,0x1b000000,0x1d000000,0x1c000000,0x19000000,0x16000000,0x12000000,0xf000000,0xb000000,0x8000000,
4623 0x3000000,0xa000000,0x15000000,0x30000000,0x5c171717,0x6c141414,0x59000000,0x48000000,0x41000000,0x45000000,0x44000000,0x30000000,0x1b000000,0x12000000,
4624 0x8000000,0x15000000,0x36000000,0x7d121212,0xebc3c3c3,0xffffffff,0xc9595959,0x95000000,0x8d000000,0xb14e4e4e,0xd7b7b7b7,0x68000000,0x34000000,0x22000000,
4625 0xe000000,0x2e000000,0x7c121212,0xefbdbdbd,0xffffffff,0xffffffff,0xffffffff,0xf04d4d4d,0xea3e3e3e,0xffffffff,0xffffffff,0x9f000000,0x55000000,0x37000000,
4626 0x14000000,0x55000000,0xeac1c1c1,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xffffffff,0xffffffff,0xffffffff,0xca000000,0x79000000,0x4d000000,
4627 0x19000000,0x65000000,0xffffffff,0xffffffff,0xffefefef,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xec000000,0x9a000000,0x5f000000,
4628 0x1b000000,0x55000000,0xc0494949,0xfee8e8e8,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xb2000000,0x6d000000,
4629 0x1a000000,0x44000000,0x8f000000,0xec3d3d3d,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xc2000000,0x76000000,
4630 0x17000000,0x3e000000,0x86000000,0xe63f3f3f,0xffffffff,0xffffffff,0xffffffff,0xfff9f9f9,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xc2000000,0x75000000,
4631 0x14000000,0x41000000,0xab505050,0xfde6e6e6,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xb3000000,0x6c000000,
4632 0x11000000,0x3e000000,0xc9a8a8a8,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xed000000,0x9b000000,0x5d000000,
4633 0xe000000,0x2d000000,0x63000000,0x9b000000,0xc6000000,0xea000000,0xff000000,0xff000000,0xff000000,0xff000000,0xed000000,0xbc000000,0x7a000000,0x49000000,
4634 0xa000000,0x1a000000,0x32000000,0x52000000,0x76000000,0x97000000,0xb0000000,0xc1000000,0xc1000000,0xb3000000,0x9b000000,0x7a000000,0x52000000,0x31000000,
4635 0x7000000,0x11000000,0x20000000,0x35000000,0x4b000000,0x5e000000,0x6c000000,0x75000000,0x74000000,0x6c000000,0x5d000000,0x49000000,0x31000000,0x1d000000
4636};
4637
4638static const unsigned char oneoverx_data[] = {
4639 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
4640 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,
4641 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
4642 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,
4643 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
4644 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,
4645 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
4646 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
4647 0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,
4648 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
4649 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
4650 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x01,
4651 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00
4652};
4653
4654static const QRgb oneoverx_ctable[] = {
4655 0xc6c6c6,0xff000000
4656};
4657
4658static const unsigned char pass_data[] = {
4659 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
4660 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
4661 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00,
4662 0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x02,0x02,0x01,0x00,
4663 0x00,0x00,0x01,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x02,0x02,
4664 0x01,0x00,0x00,0x01,0x02,0x02,0x02,0x01,0x00,0x00,0x00,0x00,0x01,0x02,
4665 0x02,0x02,0x01,0x00,0x01,0x02,0x02,0x02,0x02,0x02,0x01,0x00,0x00,0x00,
4666 0x01,0x02,0x02,0x02,0x01,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,
4667 0x01,0x01,0x01,0x02,0x02,0x02,0x01,0x01,0x01,0x01,0x02,0x02,0x02,0x01,
4668 0x01,0x01,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x01,0x02,0x02,
4669 0x02,0x01,0x00,0x00,0x00,0x01,0x02,0x02,0x02,0x02,0x02,0x01,0x00,0x01,
4670 0x02,0x02,0x02,0x01,0x00,0x00,0x00,0x00,0x01,0x02,0x02,0x02,0x01,0x00,
4671 0x00,0x01,0x02,0x02,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x01,
4672 0x00,0x00,0x00,0x01,0x02,0x02,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
4673 0x01,0x00,0x00,0x00,0x00,0x01,0x02,0x02,0x02,0x01,0x00,0x00,0x00,0x00,
4674 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x00,0x00
4675};
4676
4677static const QRgb pass_ctable[] = {
4678 0xc6c6c6,0xff000000,0xffffff00
4679};
4680
4681static const QRgb paste_data[] = {
4682 0xffffff,0x0,0x0,0x0,0x38000000,0xff000000,0xff000000,0xff000000,0x57000000,0x0,0x0,0x0,0x0,0x9d9d9d,
4683 0xffffff,0x0,0x8b000000,0xaa000000,0xc41f1f1f,0xffa5a5a5,0xffb9b9b9,0xffaeaeae,0xcd313131,0xa9000000,0x9e000000,0x0,0x0,0x363738,
4684 0xffffff,0x8e000000,0xe3383838,0xff777777,0xff282828,0xffc5c5c5,0xffc4c4c4,0xffcbcbcb,0xff3b3b3b,0xff606060,0xe22e2e2e,0xb0000000,0x30240f,0x33250d,
4685 0xffffff,0xac000000,0xfc939393,0xfe8f8f8f,0xff656565,0xff686868,0xff5e5e5e,0xff5c5c5c,0xff585959,0xff6f6f6d,0xfb49494a,0xda000000,0x392b12,0x47371d,
4686 0xffffff,0xa7000000,0xff909090,0xff7f7f7f,0xff7b7b7b,0xff51504e,0xff1b1a1a,0xff42413f,0xff332f2a,0xff7c7566,0xff46433d,0xd4000000,0x382a12,0x45361b,
4687 0xffffff,0xa7000000,0xff8f8f8f,0xff7f7f7f,0xff7a7a7a,0xff42423f,0xff82807c,0xffffffff,0xffd6c8b1,0xfffdfbf6,0xffa19a8e,0xd81b1405,0x36280f,0x46371d,
4688 0xffffff,0xa7000000,0xff8f8f8f,0xff7f7f7f,0xff7a7a7a,0xff434340,0xff7b7a77,0xfffffff6,0xffb0a38b,0xffece9e4,0xffffffff,0xf0a69f90,0x7137270c,0x33c2e14,
4689 0xffffff,0xa7000000,0xff8f8f8f,0xff7f7f7f,0xff7a7a7a,0xff454341,0xff7b7a75,0xfffffef3,0xffac9d85,0xfff1eeeb,0xffffffff,0xffffffff,0xfaada79d,0x6a42351d,
4690 0xffffff,0xa7000000,0xff8f8f8f,0xff7f7f7f,0xff7a7a7a,0xff454341,0xff7a7772,0xfffffcf1,0xffc2b59f,0xffb6ab99,0xffbaaf9f,0xffcdc3b1,0xffb5aea3,0xb21e170d,
4691 0xffffff,0xa7000000,0xff8f8f8f,0xff808080,0xff7a7979,0xff41403e,0xff76736d,0xfffdf5ea,0xffe2d8c6,0xffd0c2ab,0xffcdbea8,0xfeddd0b9,0xffa59e93,0xb6000000,
4692 0xffffff,0xa7000000,0xff919191,0xff818182,0xff7b7a7a,0xff454341,0xff746e65,0xfff1e7d6,0xffdfd5c4,0xffe0d5c3,0xffddd2be,0xfceadecc,0xf2b5afa7,0xbf000000,
4693 0xffffff,0xb1000000,0xf97a7a7a,0xfe7a7a7a,0xff747474,0xff41403f,0xff787165,0xfff5e8d2,0xffded2bd,0xffddd0bb,0xffdaceb8,0xfceaddc9,0xf1b8b1a5,0xb3000000,
4694 0xffffff,0x79000000,0xe6161616,0xff353535,0xff303030,0xff0d0f10,0xff4b4740,0xffa89f8f,0xff9a9182,0xff9a9081,0xff9c9384,0xffa89f8f,0xff7b7871,0xb10a0805,
4695 0xffffff,0x0,0x6e000000,0x85000000,0x85000000,0x90241e12,0xa9453e33,0xbd393429,0xb82a251b,0xae2b271b,0xae2d281d,0xac2f291f,0xae272016,0x682e2310
4696};
4697
4698static const QRgb paste_inactive_data[] = {
4699 0xffffff,0x0,0x0,0x0,0x1c000000,0x7f000000,0x7f000000,0x7f000000,0x2b000000,0x0,0x0,0x0,0x0,0x9d9d9d,
4700 0xffffff,0x0,0x45000000,0x55000000,0x621f1f1f,0x7fa5a5a5,0x7fb9b9b9,0x7faeaeae,0x66313131,0x54000000,0x4f000000,0x0,0x0,0x363738,
4701 0xffffff,0x47000000,0x71383838,0x7f777777,0x7f282828,0x7fc5c5c5,0x7fc4c4c4,0x7fcbcbcb,0x7f3b3b3b,0x7f606060,0x712e2e2e,0x58000000,0x30240f,0x33250d,
4702 0xffffff,0x56000000,0x7e939393,0x7f8f8f8f,0x7f656565,0x7f686868,0x7f5e5e5e,0x7f5c5c5c,0x7f585858,0x7f6e6e6e,0x7d494949,0x6d000000,0x392b12,0x47371d,
4703 0xffffff,0x53000000,0x7f909090,0x7f7f7f7f,0x7f7b7b7b,0x7f4f4f4f,0x7f1a1a1a,0x7f404040,0x7f2e2e2e,0x7f717171,0x7f414141,0x6a000000,0x382a12,0x45361b,
4704 0xffffff,0x53000000,0x7f8f8f8f,0x7f7f7f7f,0x7f7a7a7a,0x7f404040,0x7f7f7f7f,0x7fffffff,0x7fc4c4c4,0x7ff9f9f9,0x7f989898,0x6c101010,0x36280f,0x46371d,
4705 0xffffff,0x53000000,0x7f8f8f8f,0x7f7f7f7f,0x7f7a7a7a,0x7f414141,0x7f797979,0x7ffafafa,0x7f9d9d9d,0x7fe8e8e8,0x7fffffff,0x789b9b9b,0x38232323,0x1292929,
4706 0xffffff,0x53000000,0x7f8f8f8f,0x7f7f7f7f,0x7f7a7a7a,0x7f424242,0x7f787878,0x7ff9f9f9,0x7f999999,0x7feeeeee,0x7fffffff,0x7fffffff,0x7da5a5a5,0x35303030,
4707 0xffffff,0x53000000,0x7f8f8f8f,0x7f7f7f7f,0x7f7a7a7a,0x7f424242,0x7f767676,0x7ff8f8f8,0x7fb0b0b0,0x7fa7a7a7,0x7fadadad,0x7fbfbfbf,0x7facacac,0x59161616,
4708 0xffffff,0x53000000,0x7f8f8f8f,0x7f808080,0x7f797979,0x7f3f3f3f,0x7f717171,0x7ff3f3f3,0x7fd4d4d4,0x7fbdbdbd,0x7fbbbbbb,0x7fcbcbcb,0x7f9c9c9c,0x5b000000,
4709 0xffffff,0x53000000,0x7f919191,0x7f818181,0x7f7a7a7a,0x7f424242,0x7f6c6c6c,0x7fe3e3e3,0x7fd1d1d1,0x7fd1d1d1,0x7fcecece,0x7edbdbdb,0x79adadad,0x5f000000,
4710 0xffffff,0x58000000,0x7c7a7a7a,0x7f7a7a7a,0x7f747474,0x7f404040,0x7f6e6e6e,0x7fe3e3e3,0x7fcecece,0x7fcbcbcb,0x7fc9c9c9,0x7ed9d9d9,0x78aeaeae,0x59000000,
4711 0xffffff,0x3c000000,0x73161616,0x7f353535,0x7f303030,0x7f0f0f0f,0x7f464646,0x7f9b9b9b,0x7f8e8e8e,0x7f8d8d8d,0x7f909090,0x7f9b9b9b,0x7f767676,0x58060606,
4712 0xffffff,0x0,0x37000000,0x42000000,0x42000000,0x481b1b1b,0x543c3c3c,0x5e313131,0x5c232323,0x57232323,0x57242424,0x56272727,0x571e1e1e,0x341f1f1f
4713};
4714
4715static const unsigned char pixmap_data[] = {
4716 0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x0b,0x0b,
4717 0x0b,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x0b,
4718 0x11,0x0c,0x0c,0x0b,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
4719 0x0b,0x07,0x0c,0x11,0x0c,0x0b,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
4720 0x03,0x0b,0x07,0x0c,0x00,0x00,0x0b,0x03,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
4721 0x03,0x03,0x0b,0x07,0x0c,0x00,0x00,0x0b,0x03,0x03,0x0b,0x10,0x10,0x12,
4722 0x12,0x0b,0x03,0x03,0x0b,0x11,0x00,0x00,0x0b,0x03,0x03,0x03,0x0b,0x10,
4723 0x10,0x12,0x12,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x03,0x03,0x03,0x03,
4724 0x0b,0x07,0x07,0x00,0x0c,0x00,0x00,0x0b,0x03,0x03,0x03,0x03,0x03,0x03,
4725 0x03,0x03,0x0b,0x00,0x00,0x00,0x0c,0x00,0x00,0x0b,0x0b,0x0b,0x03,0x03,
4726 0x03,0x03,0x03,0x03,0x0b,0x08,0x08,0x0e,0x0d,0x0e,0x0e,0x09,0x09,0x0b,
4727 0x03,0x03,0x03,0x03,0x03,0x03,0x0b,0x0e,0x0e,0x0e,0x0d,0x0e,0x0e,0x09,
4728 0x09,0x0b,0x0b,0x0b,0x03,0x03,0x03,0x03,0x0b,0x04,0x04,0x0a,0x06,0x0a,
4729 0x0a,0x01,0x01,0x01,0x01,0x0b,0x03,0x03,0x03,0x03,0x0b,0x0a,0x0a,0x0a,
4730 0x06,0x0a,0x0a,0x01,0x01,0x01,0x01,0x0b,0x03,0x03,0x03,0x03,0x0b,0x13,
4731 0x13,0x02,0x0f,0x02,0x02,0x05,0x02,0x05,0x05,0x0b,0x03,0x03,0x03,0x03,
4732 0x0b,0x13,0x13,0x02,0x0f,0x02,0x02,0x05,0x02,0x05,0x05,0x0b,0x03,0x03,
4733 0x03,0x03,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
4734 0x03,0x03,0x03,0x03
4735};
4736
4737static const QRgb pixmap_ctable[] = {
4738 0xffff8000,0xff008000,0xff0000c0,0xc6c6c6,0xffc0ffc0,0xff000080,0xff00ff00,0xffffdca8,0xffffffc0,0xff808000,0xff00c000,0xff000000,0xffffa858,0xffffff00,
4739 0xffc0c000,0xff0000ff,0xffffc0c0,0xffc05800,0xffff0000,0xffc0c0ff
4740};
4741
4742static const QRgb play_data[] = {
4743 0xc6000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xc6000000,
4744 0xff000000,0xffdddddd,0xffe6e6e6,0xffe2e2e2,0xffd7d7d7,0xffd4d4d4,0xffd3d3d3,0xffd3d3d3,0xffcccccc,0xffbababa,0xffa2a2a2,0xff818181,0xff525252,0xff000000,
4745 0xff000000,0xffd1d1d1,0xffdddddd,0xffcacaca,0xffa7a7a7,0xffafafaf,0xffc3c3c3,0xffc8c8c8,0xffbdbdbd,0xffa4a4a4,0xff818181,0xff525252,0xff3c3c3c,0xff000000,
4746 0xff000000,0xffbebebe,0xffcbcbcb,0xffaaaaaa,0xff686868,0xffb8b8b8,0xff979797,0xffaeaeae,0xffa6a6a6,0xff828282,0xff585858,0xff3d3d3d,0xff313131,0xff000000,
4747 0xff000000,0xffa9a9a9,0xffb3b3b3,0xff909090,0xff3f3f3f,0xffffffff,0xffadadad,0xff7b7b7b,0xff7e7e7e,0xff5a5a5a,0xff3e3e3e,0xff343434,0xff292929,0xff000000,
4748 0xff000000,0xff919191,0xff969696,0xff747474,0xff2b2b2b,0xffffffff,0xffffffff,0xffa3a3a3,0xff424242,0xff3c3c3c,0xff343434,0xff2a2a2a,0xff222222,0xff000000,
4749 0xff000000,0xff868686,0xff848484,0xff646464,0xff242424,0xffffffff,0xffffffff,0xffffffff,0xff9e9e9e,0xff343434,0xff2e2e2e,0xff252525,0xff1e1e1e,0xff000000,
4750 0xff000000,0xff868686,0xff848484,0xff646464,0xff242424,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffa2a2a2,0xff2e2e2e,0xff252525,0xff1e1e1e,0xff000000,
4751 0xff000000,0xff7a7a7a,0xff727272,0xff515151,0xff1d1d1d,0xffffffff,0xffffffff,0xffffffff,0xffa3a3a3,0xff313131,0xff292929,0xff222222,0xff1b1b1b,0xff000000,
4752 0xff000000,0xff5b5b5b,0xff474747,0xff343434,0xff1d1d1d,0xffffffff,0xffffffff,0xff9e9e9e,0xff2b2b2b,0xff242424,0xff1f1f1f,0xff1a1a1a,0xff161616,0xff000000,
4753 0xff000000,0xff414141,0xff3b3b3b,0xff2d2d2d,0xff222222,0xffffffff,0xff999999,0xff202020,0xff1e1e1e,0xff191919,0xff161616,0xff161616,0xff161616,0xff000000,
4754 0xff000000,0xff383838,0xff2f2f2f,0xff252525,0xff1d1d1d,0xff969696,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff000000,
4755 0xff000000,0xff2f2f2f,0xff232323,0xff191919,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff000000,
4756 0xc6000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xc6000000
4757};
4758
4759static const QRgb play2_data[] = {
4760 0xffffff,0x3000000,0x8000000,0x11000000,0x1a000000,0x1b000000,0x16000000,0x12000000,0xd000000,0x8000000,0x2000000,0xffffff,0xffffff,0xffffff,
4761 0xffffff,0x6000000,0xf000000,0x33000000,0x86898989,0x57000000,0x38000000,0x2a000000,0x1f000000,0x14000000,0x8000000,0x2000000,0xffffff,0xffffff,
4762 0xffffff,0x9000000,0x19000000,0x5f000000,0xffffffff,0xdca2a2a2,0x7f000000,0x56000000,0x3e000000,0x2a000000,0x14000000,0x8000000,0x2000000,0xffffff,
4763 0xffffff,0xd000000,0x24000000,0x7a000000,0xffffffff,0xffffffff,0xe99a9a9a,0xa0000000,0x72000000,0x4d000000,0x2b000000,0x14000000,0x8000000,0x2000000,
4764 0xffffff,0x10000000,0x2e000000,0x88000000,0xffffffff,0xffffffff,0xffffffff,0xf2969696,0xb8000000,0x7d000000,0x47000000,0x24000000,0xf000000,0x5000000,
4765 0xffffff,0x12000000,0x35000000,0x94000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xf7939393,0xb7000000,0x69000000,0x35000000,0x17000000,0x7000000,
4766 0xffffff,0x14000000,0x3a000000,0x9b000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xec999999,0x84000000,0x43000000,0x1e000000,0xa000000,
4767 0xffffff,0x14000000,0x3c000000,0x9e000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff8f8f8f,0xdb000000,0x88000000,0x49000000,0x22000000,0xb000000,
4768 0xffffff,0x14000000,0x3a000000,0x9b000000,0xffffffff,0xffffffff,0xffffffff,0xff8f8f8f,0xfd000000,0xc4000000,0x7a000000,0x43000000,0x1e000000,0xa000000,
4769 0xffffff,0x12000000,0x35000000,0x94000000,0xffffffff,0xffffffff,0xfe909090,0xf9000000,0xd7000000,0xa2000000,0x63000000,0x35000000,0x17000000,0x7000000,
4770 0xffffff,0x10000000,0x2e000000,0x7f000000,0xffffffff,0xf0979797,0xd5000000,0xc2000000,0xa3000000,0x78000000,0x47000000,0x24000000,0xf000000,0x5000000,
4771 0xffffff,0xd000000,0x24000000,0x57000000,0xa8727272,0x9c000000,0x94000000,0x85000000,0x6d000000,0x4d000000,0x2b000000,0x14000000,0x8000000,0x2000000,
4772 0xffffff,0x9000000,0x19000000,0x2f000000,0x48000000,0x5a000000,0x5a000000,0x50000000,0x3e000000,0x2a000000,0x14000000,0x8000000,0x2000000,0xffffff,
4773 0xffffff,0x6000000,0xf000000,0x1a000000,0x25000000,0x31000000,0x31000000,0x2a000000,0x1f000000,0x14000000,0x8000000,0x2000000,0xffffff,0xffffff
4774};
4775
4776static const QRgb programs_data[] = {
4777 0x0,0x0,0x1000000,0x1000000,0x1000000,0x1000000,0x1000000,0x1000000,0x0,0x6000000,0x0,0xb2b2b2,0x0,0xf9e07c,
4778 0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0xf9e07c,
4779 0x0,0xff000000,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff000000,0x0,0xf9e07c,
4780 0x0,0xff000000,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff000000,0x0,0x0,
4781 0x1000000,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xdb,0x0,
4782 0x0,0xff000000,0xffffffff,0xff5743cc,0xffffffff,0xffd1aa10,0xffdd3ee0,0xffffffff,0xff5743cc,0xff49cccc,0xffffffff,0xff000000,0xdb,0x0,
4783 0x0,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xffffff,0x0,
4784 0x0,0xff000000,0xffffffff,0xffdd3ee0,0xffffffff,0xff3fdb80,0xff49cccc,0xffffffff,0xff9740d6,0xffdd3ee0,0xffffffff,0xff000000,0xffffff,0x0,
4785 0x1000000,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xffffff,0x0,
4786 0x1b000000,0xff000000,0xffffffff,0xffadcc47,0xffffffff,0xff49cccc,0xff9740d6,0xffffffff,0xffcc4b85,0xffd1aa10,0xffffffff,0xff000000,0xffffff,0x0,
4787 0x0,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xffffff,0x0,
4788 0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffffff,0x0,
4789 0x0,0x7000000,0x2000000,0xd000000,0x15000000,0x15000000,0x15000000,0x13000000,0x17000000,0x17000000,0x17000000,0x17000000,0xffffff,0x0,
4790 0x0,0xa8a8a8,0xb2b2b2,0xb2b2b2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0
4791};
4792
4793static const QRgb quit_icon_data[] = {
4794 0xffffff,0xffffff,0xffffff,0x55e8a5a5,0xa2e79e9e,0xdbe68f8f,0xfbe67d7d,0xdedc5f5f,0xabcd3f3f,0x65b61e1e,0xf000000,0x4000000,0xffffff,0xffffff,
4795 0xffffff,0x18e8acac,0x8febb0b0,0xfcf1b4b4,0xffeeaaaa,0xffea9292,0xffe67979,0xffe05a5a,0xffdd4242,0xfdd61a1a,0xaca40000,0x365b0000,0x9000000,0x1000000,
4796 0xffffff,0x8febb0b0,0xfff1b5b5,0xfff9e2e2,0xfffbeaea,0xffe98f8f,0xffe46f6f,0xffe05959,0xfff7d3d3,0xffecadad,0xffb40000,0xb8810000,0x2a000000,0x9000000,
4797 0x55e8a5a5,0xfcf1b4b4,0xfff9e2e2,0xffffffff,0xffffffff,0xfff9e2e2,0xffe36c6c,0xfff7d7d7,0xffffffff,0xffffffff,0xffddacac,0xfe931313,0x944f0000,0x22000000,
4798 0xa2e79e9e,0xffeeaaaa,0xfffbeaea,0xffffffff,0xffffffff,0xffffffff,0xfffdf6f6,0xffffffff,0xffffffff,0xffffffff,0xffe8cece,0xff801616,0xd5520000,0x48000000,
4799 0xdbe68f8f,0xffea9292,0xffe98f8f,0xfff9e2e2,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffeacece,0xff861616,0xff630000,0xf24a0000,0x69000000,
4800 0xfbe67d7d,0xffe67979,0xffe46f6f,0xffe36c6c,0xfffdf6f6,0xffffffff,0xffffffff,0xffffffff,0xfffcf4f4,0xff9a2525,0xff6a0000,0xff4b0000,0xfe420000,0x7e000000,
4801 0xdedc5f5f,0xffe05a5a,0xffe05959,0xfff7d7d7,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe2cece,0xff5a1616,0xff430000,0xf43d0000,0x87000000,
4802 0xabcd3f3f,0xffdb3636,0xfff5cbcb,0xffffffff,0xffffffff,0xffffffff,0xfffcf4f4,0xffffffff,0xffffffff,0xffffffff,0xffd1c5c5,0xff430000,0xe3310000,0x7e000000,
4803 0x65b61e1e,0xfdd40c0c,0xffdf7171,0xffffffff,0xffffffff,0xffeacfcf,0xff9a2828,0xffe3cfcf,0xffffffff,0xffffffff,0xff8f7171,0xfe430000,0xc7200000,0x69000000,
4804 0xf000000,0xaca40000,0xffb40000,0xffc77272,0xffe3c5c5,0xff871717,0xff6a0000,0xff5b1717,0xffd1c5c5,0xff907272,0xff430000,0xdf2e0000,0x93000000,0x48000000,
4805 0x4000000,0x365b0000,0xb8810000,0xfe8d0000,0xff790000,0xff630000,0xff4b0000,0xff430000,0xff430000,0xfe430000,0xdf2e0000,0xa70d0000,0x62000000,0x22000000,
4806 0xffffff,0x9000000,0x2a000000,0x944f0000,0xd5520000,0xf24a0000,0xfe420000,0xf43d0000,0xe3310000,0xc7200000,0x93000000,0x62000000,0x2a000000,0x9000000,
4807 0xffffff,0x1000000,0x9000000,0x22000000,0x48000000,0x69000000,0x7e000000,0x87000000,0x7e000000,0x69000000,0x48000000,0x22000000,0x9000000,0x1000000
4808};
4809
4810static const QRgb repeat_data[] = {
4811 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4812 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,0x0,
4813 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,
4814 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,
4815 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0xff000000,0xff000000,0x0,
4816 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,0xff000000,0x0,
4817 0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,
4818 0x0,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,0x0,
4819 0x0,0x0,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,
4820 0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,
4821 0x0,0xff000000,0x0,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4822 0x0,0xff000000,0xff000000,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4823 0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4824 0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4825 0x0,0x0,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4826 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4827 0x0
4828};
4829
4830static const unsigned char reset_data[] = {
4831 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
4832 0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
4833 0x01,0x01,0x00,0x00,0x00,0x01,0x02,0x02,0x01,0x00,0x00,0x00,0x00,0x01,
4834 0x01,0x02,0x02,0x01,0x00,0x00,0x01,0x02,0x02,0x02,0x02,0x01,0x00,0x01,
4835 0x01,0x02,0x02,0x02,0x02,0x01,0x00,0x00,0x00,0x01,0x01,0x02,0x02,0x02,
4836 0x01,0x02,0x02,0x02,0x02,0x02,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x01,
4837 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
4838 0x00,0x00,0x01,0x02,0x02,0x02,0x02,0x02,0x01,0x00,0x00,0x00,0x00,0x00,
4839 0x00,0x00,0x00,0x01,0x02,0x02,0x02,0x02,0x02,0x01,0x00,0x00,0x00,0x00,
4840 0x00,0x00,0x00,0x00,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x00,
4841 0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
4842 0x02,0x01,0x00,0x00,0x00,0x00,0x01,0x02,0x02,0x02,0x02,0x01,0x01,0x01,
4843 0x02,0x02,0x02,0x02,0x01,0x00,0x00,0x00,0x01,0x02,0x02,0x02,0x01,0x00,
4844 0x00,0x01,0x01,0x02,0x02,0x02,0x01,0x00,0x00,0x00,0x01,0x02,0x02,0x02,
4845 0x01,0x00,0x00,0x00,0x01,0x02,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x01,
4846 0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00
4847};
4848
4849static const QRgb reset_ctable[] = {
4850 0xc6c6c6,0xff000000,0xffff0000
4851};
4852
4853static const QRgb right_data[] = {
4854 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4855 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4856 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4857 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
4858 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4859 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4860 0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,
4861 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4862 0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
4863 0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4864 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
4865 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4866 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
4867 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,
4868 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4869 0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,
4870 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,
4872 0x0,0x0,0x0,0x0
4873};
4874
4875static const QRgb rotate_data[] = {
4876 0xb000000,0x16000000,0x26000000,0x3f000000,0x5d000000,0x75000000,0x84000000,0x84000000,0x75000000,0x5d000000,0x3f000000,0x26000000,0x16000000,0xb000000,
4877 0x18000000,0x2e000000,0x55000000,0x98414141,0xd9949494,0xf5c8c8c8,0xfdefefef,0xfdefefef,0xf5c8c8c8,0xda939393,0x99404040,0x56000000,0x2e000000,0x18000000,
4878 0x2d000000,0x5b000000,0xb5626262,0xf4c3c3c3,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xf4c3c3c3,0xb6626262,0x5c000000,0x2e000000,
4879 0x4c000000,0xa13e3e3e,0xf5c2c2c2,0xffffffff,0xfee8e8e8,0xf8a2a2a2,0xf25e5e5e,0xf35e5e5e,0xfaa1a1a1,0xffe7e7e7,0xffffffff,0xf6c1c1c1,0xa53d3d3d,0x50000000,
4880 0x70000000,0xe0909090,0xffffffff,0xfee8e8e8,0xf0666666,0xdc000000,0xd9000000,0xde000000,0xeb000000,0xfcb6b6b6,0xffe7e7e7,0xffffffff,0xe38e8e8e,0x77000000,
4881 0x8e000000,0xf7c7c7c7,0xffffffff,0xf8a2a2a2,0xd5000000,0xc1000000,0xb9000000,0xc2000000,0xdc000000,0xf4000000,0xffd0d0d0,0xffffffff,0xf9c5c5c5,0x9e000000,
4882 0xa1000000,0xfeeeeeee,0xffffffff,0xee5f5f5f,0xc1000000,0xa4000000,0x97000000,0xa5000000,0xe69c9c9c,0xfbcbcbcb,0xfff2f2f2,0xffe4e4e4,0xfde6e6e6,0xd7a5a5a5,
4883 0xa8000000,0xfeeeeeee,0xffffffff,0xec606060,0xb5000000,0x8e000000,0x7a000000,0x84000000,0xb1000000,0xf0979797,0xfdcbcbcb,0xfee5e5e5,0xee989898,0x9c000000,
4884 0xa2000000,0xfac5c5c5,0xffffffff,0xf7a3a3a3,0xbd000000,0x8e000000,0x74000000,0x74000000,0x90000000,0xbd000000,0xed999999,0xec999999,0xb2000000,0x76000000,
4885 0x90000000,0xeb8b8b8b,0xffffffff,0xfee8e8e8,0xe8696969,0xb3000000,0x95000000,0x8a000000,0x94000000,0xac000000,0xbe000000,0xb2000000,0x89000000,0x5a000000,
4886 0x77000000,0xc5353535,0xfabfbfbf,0xffffffff,0xfee8e8e8,0xf4a4a4a4,0xdf646464,0xd5686868,0xc2000000,0xe59c9c9c,0xe39e9e9e,0xd3a7a7a7,0x70000000,0x43000000,
4887 0x5c000000,0x94000000,0xd8545454,0xfabfbfbf,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xf0c5c5c5,0xaf656565,0x5a000000,0x32000000,
4888 0x42000000,0x6b000000,0x9c000000,0xce333333,0xef888888,0xfbc4c4c4,0xfeeeeeee,0xfeeeeeee,0xf8c6c6c6,0xe48d8d8d,0xac3b3b3b,0x6b000000,0x3d000000,0x22000000,
4889 0x2b000000,0x48000000,0x6a000000,0x8e000000,0xac000000,0xbf000000,0xc5000000,0xbf000000,0xac000000,0x90000000,0x6a000000,0x45000000,0x29000000,0x16000000
4890};
4891
4892static const QRgb start_data[] = {
4893 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
4894 0xffffff,0xff000000,0xffffff,0xffffff,0xffffff,0xffffff,0x7a6c7375,0xff000000,0xff000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,
4895 0xffffff,0xff000000,0xffffff,0xffffff,0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xff000000,0x6b000000,0x24000000,0xffffff,0xffffff,0xffffff,
4896 0xffffff,0xff000000,0xffffff,0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xfffcfcfc,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,
4897 0xffffff,0xff000000,0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xffffffff,0xfff8f8f8,0xff000000,0xff000000,0xff000000,0xff000000,0x24000000,0xc000000,
4898 0xffffff,0xff000000,0x7a6c7375,0xfc202323,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xffffffff,0xffffffff,0xfff5f5f5,0xff000000,0x6b000000,0x24000000,
4899 0xffffff,0xff000000,0xe0494e4f,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff6f6f6,0xfff6f6f6,0xffeeeeee,0xffd3d3d3,0xff000000,0x8f000000,0x30000000,
4900 0xffffff,0xff000000,0x69666c6d,0xfd202323,0xfffcfcfc,0xfffcfcfc,0xfff4f4f4,0xffdddddd,0xffcccccc,0xffc9c9c9,0xffc9c9c9,0xff000000,0x8f000000,0x30000000,
4901 0xffffff,0xff000000,0xd000000,0x83565b5c,0xfd202223,0xfff4f4f4,0xffededed,0xffcccccc,0xff000000,0xff000000,0xff000000,0xff000000,0x8f000000,0x30000000,
4902 0xffffff,0xff000000,0x2000000,0x14000000,0x8852585a,0xfe202324,0xffe8e8e8,0xffcbcbcb,0xff000000,0xb3000000,0x9b000000,0x8f000000,0x6b000000,0x24000000,
4903 0xffffff,0xff000000,0xffffff,0x2000000,0x14000000,0x8852585a,0xfe202324,0xffd3d3d3,0xff000000,0x9b000000,0x54000000,0x30000000,0x24000000,0xc000000,
4904 0xffffff,0xff000000,0xffffff,0xffffff,0x2000000,0x14000000,0x8852585a,0xff000000,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,
4905 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x2000000,0x14000000,0x45000000,0x7b000000,0x6b000000,0x24000000,0xffffff,0xffffff,0xffffff,
4906 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x2000000,0x10000000,0x26000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff
4907};
4908
4909static const QRgb stop_data[] = {
4910 0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,
4911 0xf000000,0x2e000000,0x5f000000,0x7f000000,0x8d000000,0x98000000,0x9e000000,0xa2000000,0x9e000000,0x98000000,0x81000000,0x57000000,0x31000000,0x1d000000,
4912 0x18000000,0x5f000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x98000000,0x52000000,0x31000000,
4913 0x25000000,0x7f000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xcd000000,0x7a000000,0x49000000,
4914 0x2e000000,0x8d000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xf0000000,0x9b000000,0x5d000000,
4915 0x36000000,0x98000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xb4000000,0x6c000000,
4916 0x3b000000,0x9e000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xc4000000,0x75000000,
4917 0x3d000000,0xa2000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xcc000000,0x7a000000,
4918 0x3b000000,0x9e000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xc4000000,0x75000000,
4919 0x36000000,0x98000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xb4000000,0x6c000000,
4920 0x2e000000,0x81000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xee000000,0x9b000000,0x5d000000,
4921 0x25000000,0x57000000,0x98000000,0xcd000000,0xef000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xed000000,0xbd000000,0x7a000000,0x49000000,
4922 0x18000000,0x31000000,0x52000000,0x7a000000,0x9b000000,0xb3000000,0xc4000000,0xcc000000,0xc4000000,0xb3000000,0x9b000000,0x7a000000,0x52000000,0x31000000,
4923 0xf000000,0x1d000000,0x31000000,0x49000000,0x5d000000,0x6c000000,0x75000000,0x7a000000,0x75000000,0x6c000000,0x5d000000,0x49000000,0x31000000,0x1d000000
4924};
4925
4926static const QRgb style_data[] = {
4927 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4928 0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
4929 0xff000000,0xff000000,0xff000000,0xffdcdcdc,0xff000000,0xff000000,0xffdcdcdc,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xffdcdcdc,
4930 0x0,0x0,0x0,0xff000000,0xff000000,0xffdcdcdc,0xff000000,0xffdcdcdc,0x0,0x0,0x0,0x0,0xff000000,0xff000000,
4931 0xff000000,0xffdcdcdc,0x0,0x0,0x0,0x0,0xff000000,0xffdcdcdc,0xff000000,0xffdcdcdc,0x0,0x0,0x0,0x0,
4932 0xff000000,0xff000000,0xff000000,0xffdcdcdc,0x0,0x0,0x0,0x0,0xff000000,0xffdcdcdc,0x0,0x0,0x0,0x0,
4933 0x0,0xff000000,0xff000000,0xff000000,0xffdcdcdc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4934 0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xffdcdcdc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4935 0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xffdcdcdc,0x0,0x0,0x0,0x0,0x0,
4936 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xffdcdcdc,0x0,0x0,0x0,
4937 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xffdcdcdc,0x0,0x0,
4938 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xffdcdcdc,
4939 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,
4940 0xff000000,0xffdcdcdc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4941 0xff000000,0xff000000,0xff000000,0xffdcdcdc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4942 0x0,0xff000000,0xff000000,0xff000000,0xffdcdcdc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4943 0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xffdcdcdc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
4944 0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffdcdcdc,0x0,0x0,0x0,
4945 0x0,0x0,0x0,0x0
4946};
4947
4948static const QRgb table_pattern_data[] = {
4949 0xff598076,0xff5c857b,0xff5c857b,0xff567b72,0xff51756c,0xff577e74,0xff5d867c,0xff598076,0xff52766d,0xff51756c,0xff5a8177,0xff5f897e,0xff598076,0xff50736a,
4950 0xff4f7269,0xff557b71,0xff5b847a,0xff5a8177,0xff588076,0xff54786f,0xff51756c,0xff577d73,0xff598076,0xff547970,0xff51746b,0xff53786e,0xff598076,0xff5d857b,
4951 0xff577d74,0xff52766d,0xff587e74,0xff5d867b,0xff5c847a,0xff598076,0xff587f75,0xff557b71,0xff547a71,0xff587f75,0xff5a8278,0xff598177,0xff587f75,0xff587f75,
4952 0xff598076,0xff5b8278,0xff598076,0xff587f75,0xff5f887d,0xff608b80,0xff567c73,0xff547970,0xff567c72,0xff577e74,0xff587f75,0xff5c857a,0xff608b80,0xff608b80,
4953 0xff5e887e,0xff5c857a,0xff5a8278,0xff5a8177,0xff598076,0xff598076,0xff5b8379,0xff5a8278,0xff51746b,0xff51746b,0xff557a71,0xff587f75,0xff5a8177,0xff5d867c,
4954 0xff608b80,0xff5d877c,0xff597f76,0xff577d74,0xff598076,0xff598076,0xff587f75,0xff577d74,0xff557a71,0xff53776e,0xff567c72,0xff567c72,0xff587f75,0xff5c847a,
4955 0xff5c857b,0xff5f897e,0xff5f897e,0xff577c73,0xff4f726a,0xff53776e,0xff598076,0xff587f75,0xff577e74,0xff587f75,0xff587e74,0xff577d73,0xff5d867b,0xff598076,
4956 0xff5a8278,0xff608a7f,0xff608a80,0xff608a7f,0xff5a8278,0xff50736b,0xff50736a,0xff598076,0xff5f897e,0xff5a8178,0xff557b71,0xff598076,0xff5e877c,0xff5f897e,
4957 0xff5a8278,0xff557b71,0xff5a8278,0xff608b80,0xff5e877d,0xff577d74,0xff50746b,0xff50736a,0xff567d73,0xff5e887d,0xff608b80,0xff587f75,0xff53776e,0xff598076,
4958 0xff618b80,0xff5f8a7f,0xff53776e,0xff51756c,0xff598076,0xff5f887e,0xff598076,0xff50736a,0xff50736b,0xff567d73,0xff5a8177,0xff5c847a,0xff5b8379,0xff547a70,
4959 0xff51746b,0xff587f75,0xff5e877d,0xff598076,0xff51746b,0xff52766d,0xff587f75,0xff5d857b,0xff587e75,0xff53786e,0xff598076,0xff5e887d,0xff5c847a,0xff598076,
4960 0xff587f75,0xff53786f,0xff52766c,0xff587e74,0xff598076,0xff547970,0xff587e74,0xff577e75,0xff598076,0xff5a8278,0xff598076,0xff598076,0xff5e887e,0xff608b80,
4961 0xff5b8379,0xff587f75,0xff577e74,0xff567b72,0xff557b72,0xff598076,0xff598177,0xff598076,0xff5e887e,0xff5c857a,0xff5a8278,0xff598076,0xff587f75,0xff587f75,
4962 0xff598177,0xff587f75,0xff547a71,0xff53786f,0xff567b72,0xff587f75,0xff5b8278,0xff5e887d,0xff618b80,0xff608a7f,0xff598177,0xff587e74,0xff598076,0xff598076,
4963 0xff587f75,0xff577d74,0xff557a71,0xff53776e,0xff51746b,0xff52756c,0xff557b72,0xff5b8379,0xff608b80,0xff638e83,0xff608b80,0xff5d867c,0xff50736b,0xff52766d,
4964 0xff587f75,0xff587f75,0xff577e74,0xff587f75,0xff598076,0xff598076,0xff577e74,0xff577e74,0xff598076,0xff5f887e,0xff638e83,0xff5e887e,0xff5a8177,0xff547a71,
4965 0xff4f7269,0xff587e74,0xff5e887d,0xff5a8278,0xff557b72,0xff598076,0xff5e887e,0xff608a80,0xff5d867b,0xff587f75,0xff5b8278,0xff618c81,0xff608a7f,0xff598177,
4966 0xff547970,0xff4f7169,0xff557b71,0xff5e877d,0xff618c81,0xff598076,0xff53776e,0xff587f75,0xff608a80,0xff5f897e,0xff587f75,0xff547970,0xff5a8278,0xff608b80,
4967 0xff5c857b,0xff547970,0xff4f7169,0xff50726a
4968};
4969
4970static const unsigned char tgz_data[] = {
4971 0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x01,0x02,0x02,0x02,0x02,0x02,0x02,
4972 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x04,0x01,0x01,0x01,0x02,
4973 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x06,0x02,0x01,0x04,0x05,0x04,0x05,
4974 0x04,0x01,0x01,0x01,0x02,0x02,0x02,0x02,0x06,0x06,0x02,0x01,0x05,0x05,
4975 0x05,0x05,0x05,0x04,0x05,0x04,0x01,0x01,0x02,0x06,0x06,0x06,0x01,0x04,
4976 0x05,0x05,0x05,0x05,0x04,0x05,0x04,0x05,0x04,0x01,0x03,0x03,0x03,0x03,
4977 0x01,0x04,0x05,0x05,0x05,0x04,0x05,0x04,0x04,0x04,0x04,0x01,0x02,0x02,
4978 0x02,0x01,0x04,0x05,0x04,0x05,0x04,0x05,0x04,0x05,0x04,0x04,0x04,0x01,
4979 0x02,0x02,0x02,0x01,0x05,0x04,0x05,0x04,0x05,0x04,0x05,0x04,0x05,0x04,
4980 0x00,0x01,0x02,0x02,0x01,0x05,0x04,0x05,0x04,0x05,0x04,0x05,0x04,0x05,
4981 0x04,0x04,0x01,0x02,0x02,0x01,0x04,0x04,0x05,0x04,0x04,0x04,0x05,0x04,
4982 0x04,0x04,0x04,0x04,0x01,0x02,0x01,0x04,0x04,0x04,0x04,0x05,0x04,0x05,
4983 0x04,0x05,0x04,0x05,0x04,0x04,0x01,0x02,0x01,0x00,0x04,0x04,0x04,0x04,
4984 0x04,0x04,0x05,0x04,0x04,0x04,0x04,0x00,0x01,0x02,0x02,0x01,0x01,0x00,
4985 0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x02,0x02,
4986 0x02,0x01,0x01,0x01,0x00,0x04,0x04,0x04,0x04,0x04,0x06,0x06,0x06,0x02,
4987 0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x01,0x01,0x00,0x04,0x00,0x06,0x06,
4988 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x01,0x01,
4989 0x06,0x02,0x02,0x02
4990};
4991
4992static const QRgb tgz_ctable[] = {
4993 0xffc0c000,0xff000000,0xc6c6c6,0xff800000,0xffffffc0,0xffffffff,0xffff0000
4994};
4995
4996static const QRgb toys_data[] = {
4997 0xffffff,0xffffff,0xcccc33,0x0,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x990099,0x663399,0x0,0x0,
4998 0xffffff,0xccff33,0x996666,0x996666,0xff0000,0xffff0000,0xffcc9966,0xff66cccc,0xff6666cc,0xffffff,0xffffff,0xffffff,0x9966cc,0xffffff,
4999 0xcccc33,0x0,0x0,0xffff0000,0xfff4b0b0,0xffffffff,0xff00cc00,0xff00cc00,0xff6666cc,0xff6666cc,0xff6666cc,0xffffff,0xffffff,0x660099,
5000 0xffff33,0x0,0xffff0000,0xfff4b0b0,0xffffffff,0xffffffff,0xffb8efb8,0xff00cc00,0xff66cc99,0xff6666cc,0xff6666cc,0xff6666cc,0xffffff,0x663366,
5001 0x0,0x0,0xffff0000,0xfff4b0b0,0xffffffff,0xffffffff,0xffb8efb8,0xff00cc00,0xff00cc00,0xff6666cc,0xff6666cc,0xff6666cc,0xffffff,0xffffff,
5002 0x0,0xffff0000,0xffff0000,0xffff0000,0xffffffff,0xffb8efb8,0xff00cc00,0xff33cc00,0xff00cc00,0xff66cc99,0xff6666cc,0xff6666cc,0xff3366cc,0xffffff,
5003 0x0,0xff996666,0xffff0000,0xffff0000,0xffcc9966,0xff00cc00,0xff33cc00,0xff00cc00,0xff00cc00,0xff66cccc,0xff6666cc,0xff6666cc,0xff3366cc,0xffffff,
5004 0x0,0xff996666,0xffff0000,0xffff0000,0xffcc9966,0xff33cc00,0xff00cc00,0xff00cc00,0xff00cc00,0xff66cc99,0xff6666cc,0xff6666cc,0xff333366,0x333366,
5005 0x0,0xff996666,0xff996666,0xffff0000,0xffcc9966,0xff00cc00,0xff00cc00,0xff00cc00,0xff00cc00,0xff66cccc,0xff6666cc,0xff6666cc,0xff336666,0x0,
5006 0x0,0xff663333,0xff996666,0xffff0000,0xffff0000,0xff00cc00,0xff33cc00,0xff00cc00,0xff00cc00,0xff6666cc,0xff6666cc,0xff6666cc,0xff000000,0x0,
5007 0xffff33,0x333333,0xff663333,0xff996666,0xffff0000,0xffcc6666,0xff00cc00,0xff00cc00,0xff66cccc,0xff6666cc,0xff6666cc,0xff663366,0x663366,0x660099,
5008 0xcccc33,0x0,0xff000000,0xff663333,0xff996666,0xff996666,0xff497a49,0xff497a49,0xff6666cc,0xff6666cc,0xff663366,0xff000000,0x0,0x663366,
5009 0x0,0xffff33,0x0,0x0,0xff000000,0xff663333,0xff663333,0xff663366,0xff663366,0xff663366,0xff000000,0xff000000,0xff000000,0xff000000,
5010 0x0,0x0,0xcccc33,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000
5011};
5012
5013static const unsigned char trash_data[] = {
5014 0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x02,0x01,0x00,0x00,0x00,0x00,0x00,
5015 0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x02,0x03,0x01,0x04,0x01,0x01,0x01,
5016 0x01,0x00,0x00,0x00,0x00,0x01,0x05,0x05,0x05,0x06,0x06,0x06,0x07,0x01,
5017 0x06,0x06,0x03,0x01,0x00,0x00,0x00,0x01,0x02,0x03,0x06,0x05,0x05,0x05,
5018 0x06,0x06,0x04,0x04,0x04,0x01,0x00,0x00,0x00,0x00,0x01,0x07,0x02,0x02,
5019 0x03,0x03,0x03,0x03,0x07,0x07,0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x03,
5020 0x03,0x03,0x07,0x07,0x04,0x04,0x07,0x08,0x01,0x00,0x00,0x00,0x00,0x00,
5021 0x01,0x03,0x05,0x03,0x02,0x09,0x07,0x07,0x04,0x08,0x01,0x00,0x00,0x00,
5022 0x00,0x00,0x01,0x03,0x05,0x03,0x02,0x09,0x07,0x07,0x04,0x08,0x01,0x00,
5023 0x00,0x00,0x00,0x00,0x01,0x03,0x05,0x03,0x02,0x09,0x07,0x07,0x04,0x08,
5024 0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x05,0x03,0x02,0x09,0x07,0x07,
5025 0x04,0x08,0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x05,0x03,0x02,0x09,
5026 0x07,0x07,0x04,0x08,0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x05,0x03,
5027 0x02,0x09,0x07,0x07,0x04,0x08,0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x03,
5028 0x05,0x03,0x02,0x09,0x07,0x07,0x04,0x08,0x01,0x00,0x00,0x00,0x00,0x00,
5029 0x01,0x02,0x05,0x03,0x02,0x09,0x07,0x07,0x04,0x08,0x01,0x00,0x00,0x00,
5030 0x00,0x00,0x00,0x01,0x01,0x02,0x02,0x03,0x03,0x07,0x01,0x01,0x00,0x00,
5031 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x00,0x00,
5032 0x00,0x00,0x00,0x00
5033};
5034
5035static const QRgb trash_ctable[] = {
5036 0xc6c6c6,0xff000000,0xffdcdcdc,0xffa0a0a4,0xff585858,0xffffffff,0xffc0c0c0,0xff808080,0xff303030,0xffa0a0a0
5037};
5038
5039static const unsigned char txt_data[] = {
5040 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
5041 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x15,0x01,0x01,0x01,0x00,
5042 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x15,0x0d,0x15,0x0d,
5043 0x15,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0d,0x0d,
5044 0x0d,0x0d,0x0d,0x15,0x0d,0x15,0x01,0x01,0x00,0x00,0x00,0x00,0x01,0x15,
5045 0x0d,0x0d,0x0d,0x0d,0x15,0x0d,0x15,0x0d,0x15,0x01,0x00,0x00,0x00,0x00,
5046 0x01,0x15,0x0d,0x0d,0x0d,0x15,0x0d,0x15,0x15,0x15,0x15,0x01,0x00,0x00,
5047 0x00,0x01,0x15,0x0d,0x15,0x0d,0x15,0x0d,0x15,0x0d,0x15,0x15,0x15,0x01,
5048 0x00,0x00,0x00,0x01,0x0d,0x15,0x0d,0x15,0x0d,0x15,0x0d,0x15,0x0d,0x15,
5049 0x08,0x01,0x00,0x00,0x01,0x0d,0x15,0x0d,0x15,0x0d,0x15,0x0d,0x15,0x0d,
5050 0x15,0x15,0x01,0x00,0x00,0x01,0x15,0x15,0x0d,0x15,0x15,0x15,0x0d,0x15,
5051 0x15,0x15,0x15,0x15,0x01,0x00,0x01,0x15,0x15,0x15,0x15,0x0d,0x15,0x0d,
5052 0x15,0x0d,0x15,0x0d,0x15,0x15,0x01,0x00,0x01,0x08,0x15,0x15,0x15,0x15,
5053 0x15,0x15,0x0d,0x15,0x15,0x15,0x15,0x08,0x01,0x00,0x00,0x01,0x01,0x08,
5054 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x01,0x00,0x00,0x00,0x00,
5055 0x00,0x01,0x01,0x01,0x08,0x15,0x15,0x15,0x15,0x15,0x08,0x01,0x00,0x00,
5056 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x08,0x15,0x08,0x01,0x00,
5057 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,
5058 0x00,0x00,0x00,0x00
5059};
5060
5061static const QRgb txt_ctable[] = {
5062 0xc6c6c6,0xff000000,0xffc3c3c3,0xff303030,0xffc0c0ff,0xffff0000,0xff008080,0xff800000,0xffc0c000,0xff0000c0,0xff808080,0xffc0ffc0,0xff00ffff,0xffffffff,
5063 0xffa0a0a0,0xff00ff00,0xffffff00,0xffffc0ff,0xff404000,0xff00c000,0xff000080,0xffffffc0,0xff400000,0xffc05800,0xff800080,0xff008000,0xff00c0c0,0xffdcdcdc,
5064 0xffff8000,0xffffc0c0,0xff585858,0xffc00000,0xffffdca8,0xff808000,0xffffa858,0xff004000,0xffc000c0,0xff0000ff,0xffff00ff,0xffc0ffff,0xff004040
5065};
5066
5067static const QRgb underline_data[] = {
5068 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
5069 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
5070 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,
5071 0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,
5072 0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,
5073 0x0,0x0,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
5074 0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,
5075 0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,
5076 0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0xff000000,0x0,0x0,
5077 0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0xff000000,
5078 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,
5079 0x0,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,
5080 0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,
5081 0xff000000,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
5082 0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
5083 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
5084 0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,
5085 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
5086 0x0,0x0,0x0,0x0
5087};
5088
5089static const QRgb uninstall_data[] = {
5090 0xff,0xff3300,0xff,0xff3300,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
5091 0xff,0xfff80000,0xfff80000,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfff80000,0xfff80000,0xff,
5092 0xff,0xfff80000,0xfff80000,0xfff80000,0xff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff,0xfff80000,0xfff80000,0xfff80000,0xff,
5093 0xff,0xff,0xfff80000,0xfff80000,0xfff80000,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xfff80000,0xfff80000,0xfff80000,0xff,0xff,
5094 0xff,0xff,0xff,0xfff80000,0xfff80000,0xfff80000,0xffffffff,0xff00b6ff,0xfff80000,0xfff80000,0xfff80000,0xffff,0xff,0xffff,
5095 0xff,0xffff,0xff0000ff,0xff00b6ff,0xfff80000,0xfff80000,0xfff80000,0xfff80000,0xfff80000,0xfff80000,0xff00b6ff,0xff0000ff,0xff,0xff,
5096 0xff,0xff,0xff0000ff,0xff00b6ff,0xffffffff,0xfff80000,0xfff80000,0xfff80000,0xfff80000,0xff00b6ff,0xff00b6ff,0xff0000ff,0xff,0xffff,
5097 0xff,0xffff,0xff0000ff,0xff00b6ff,0xff00b6ff,0xfff80000,0xfff80000,0xfff80000,0xfff80000,0xff00b6ff,0xff00b6ff,0xff0000ff,0xff,0xff,
5098 0xff,0xff,0xff0000ff,0xff00b6ff,0xfff80000,0xfff80000,0xfff80000,0xfff80000,0xfff80000,0xfff80000,0xff00b6ff,0xff0000ff,0xff,0xffff,
5099 0xff,0xffff,0xff,0xfff80000,0xfff80000,0xfff80000,0xff00b6ff,0xff00b6ff,0xfff80000,0xfff80000,0xfff80000,0xff,0xff,0xff,
5100 0xff,0xff,0xfff80000,0xfff80000,0xfff80000,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xfff80000,0xfff80000,0xfff80000,0xff,0xffff,
5101 0xff,0xfff80000,0xfff80000,0xfff80000,0xff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xffff,0xfff80000,0xfff80000,0xfff80000,0xff,
5102 0xff,0xfff80000,0xfff80000,0xff,0xff,0xffff,0xff,0xffff,0xff,0xffff,0xff,0xfff80000,0xfff80000,0xffff,
5103 0xff,0xffff,0xff,0xffff,0xff,0xffff,0xff,0xffff,0xff,0xffff,0xff,0xff,0xff,0xff
5104};
5105
5106static const unsigned char uninstalled_data[] = {
5107 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
5108 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
5109 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
5110 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x02,0x03,
5111 0x02,0x02,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x03,
5112 0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x02,0x02,
5113 0x02,0x03,0x02,0x02,0x02,0x02,0x04,0x03,0x04,0x00,0x00,0x00,0x00,0x02,
5114 0x05,0x02,0x03,0x02,0x05,0x02,0x05,0x04,0x04,0x03,0x04,0x00,0x00,0x00,
5115 0x00,0x05,0x05,0x05,0x03,0x05,0x05,0x05,0x05,0x05,0x04,0x03,0x03,0x00,
5116 0x00,0x00,0x00,0x05,0x05,0x05,0x03,0x05,0x05,0x05,0x05,0x04,0x04,0x03,
5117 0x04,0x00,0x00,0x00,0x00,0x05,0x05,0x05,0x03,0x05,0x05,0x05,0x05,0x05,
5118 0x03,0x03,0x04,0x00,0x00,0x00,0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
5119 0x03,0x03,0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x05,0x05,0x05,0x03,0x05,
5120 0x05,0x05,0x05,0x05,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x05,0x05,
5121 0x03,0x05,0x05,0x05,0x05,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
5122 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
5123};
5124
5125static const QRgb uninstalled_ctable[] = {
5126 0x40ffffff,0xfff8fcf8,0xfff8b490,0xffb04400,0xfff80000,0xfff86c00
5127};
5128
5129static const QRgb up_data[] = {
5130 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
5131 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x5d707779,0xe0494e4f,0x84666d6e,0xe000000,0x3000000,0xffffff,0xffffff,0xffffff,0xffffff,
5132 0xffffff,0xffffff,0xffffff,0xffffff,0x5d707779,0xfc202323,0xffffffff,0xfd202323,0x9b595f61,0x18000000,0x3000000,0xffffff,0xffffff,0xffffff,
5133 0xffffff,0xffffff,0xffffff,0x5d707779,0xfc202323,0xffffffff,0xffffffff,0xfffcfcfc,0xfe202324,0xa0575c5d,0x18000000,0x3000000,0xffffff,0xffffff,
5134 0xffffff,0xffffff,0x5d707779,0xfc202323,0xffffffff,0xffffffff,0xffffffff,0xfffcfcfc,0xfff4f4f4,0xfe202324,0xa0575c5d,0x18000000,0x3000000,0xffffff,
5135 0xffffff,0x5d707779,0xfc202323,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff4f4f4,0xffededed,0xffe8e8e8,0xfe202324,0xa0575c5d,0x18000000,0x3000000,
5136 0xffffff,0xff000000,0xffffffff,0xfffcfcfc,0xfff8f8f8,0xfffefefe,0xfff6f6f6,0xffdddddd,0xffcccccc,0xffcbcbcb,0xffd3d3d3,0xff000000,0x49000000,0x13000000,
5137 0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xffffffff,0xfff6f6f6,0xffcccccc,0xff000000,0xff000000,0xff000000,0xff000000,0x7c000000,0x27000000,
5138 0xffffff,0x24000000,0x6b000000,0x8f000000,0xff000000,0xffffffff,0xffeeeeee,0xffc9c9c9,0xff000000,0xb3000000,0x9b000000,0x8f000000,0x6b000000,0x24000000,
5139 0xffffff,0xc000000,0x24000000,0x30000000,0xff000000,0xfff5f5f5,0xffd3d3d3,0xffc9c9c9,0xff000000,0x9b000000,0x54000000,0x30000000,0x24000000,0xc000000,
5140 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,
5141 0xffffff,0xffffff,0xffffff,0xffffff,0x24000000,0x6b000000,0x8f000000,0x8f000000,0x8f000000,0x6b000000,0x24000000,0xffffff,0xffffff,0xffffff,
5142 0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x24000000,0x30000000,0x30000000,0x30000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,
5143 0xffffff,0xffffff,0x1000000,0x1000000,0x2000000,0x2000000,0x3000000,0x1000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff
5144};
5145
5146static const QRgb volume_data[] = {
5147 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
5148 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,0xffffff,
5149 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xff000000,0x6b000000,0x24000000,0xff000000,0x18000000,0xc000000,0xffffff,
5150 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0x8f000000,0x30000000,0x18000000,0xff000000,0x30000000,0xc000000,
5151 0xff000000,0xff000000,0xff000000,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xff000000,0x8f000000,0xff000000,0x24000000,0x3c000000,0xff000000,0x30000000,
5152 0xff000000,0xffd5eaff,0xffd6eaff,0xffd6eaff,0xffd5e9ff,0xffd6e9ff,0xffd6e9ff,0xff000000,0x8f000000,0x48000000,0xff000000,0x3c000000,0xff000000,0x54000000,
5153 0xff000000,0xff9dceff,0xff9dceff,0xff9dceff,0xff9dceff,0xff9dcdff,0xff9dcdff,0xff000000,0x8f000000,0x3c000000,0xff000000,0x54000000,0xff000000,0x60000000,
5154 0xff000000,0xff60b0ff,0xff60b1ff,0xff60b0ff,0xff61b1ff,0xff60b1ff,0xff60b1ff,0xff000000,0x8f000000,0x30000000,0xff000000,0x60000000,0xff000000,0x60000000,
5155 0xff000000,0xff000000,0xff000000,0xff000000,0xff2a9aff,0xff2a9aff,0xff2a9aff,0xff000000,0x8f000000,0xff000000,0x3c000000,0x54000000,0xff000000,0x60000000,
5156 0x24000000,0x6b000000,0x8f000000,0x8f000000,0xff000000,0xff2a9aff,0xff2a9aff,0xff000000,0x8f000000,0x48000000,0x3c000000,0xff000000,0x48000000,0x54000000,
5157 0xc000000,0x24000000,0x30000000,0x30000000,0x48000000,0xff000000,0xff2a9aff,0xff000000,0x8f000000,0x3c000000,0xff000000,0x3c000000,0x48000000,0x30000000,
5158 0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x3c000000,0xff000000,0xff000000,0x8f000000,0x30000000,0x18000000,0x3c000000,0x30000000,0xc000000,
5159 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x3c000000,0x77000000,0x6b000000,0x24000000,0xc000000,0x18000000,0xc000000,0xffffff,
5160 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x24000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,0xffffff
5161};
5162
5163static const QRgb wait_data[] = {
5164 0x1000000,0x1d000000,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0x28000000,0xb000000,0x5000000,
5165 0x3000000,0x15000000,0x33000000,0xff888888,0xff8e8e8e,0xff949494,0xff9b9b9b,0xffa1a1a1,0xffa6a6a6,0xffababab,0x4b000000,0x29000000,0x12000000,0x9000000,
5166 0x4000000,0xc000000,0x19000000,0xff9a9a9a,0xffa1a1a1,0xffa6a6a6,0xffadadad,0xffb3b3b3,0xffb7b7b7,0xffbbbbbb,0x41000000,0x2b000000,0x19000000,0xc000000,
5167 0x4000000,0xe000000,0x1d000000,0xff888888,0xff8b8b8b,0xff8e8e8e,0xff919191,0xff929292,0xff949494,0xff929292,0x4d000000,0x32000000,0x1d000000,0xe000000,
5168 0x4000000,0xe000000,0x1e000000,0xcc515151,0xff7a7a7a,0xff7b7b7b,0xff7c7c7c,0xff7c7c7c,0xff7b7b7b,0xda4d4d4d,0x51000000,0x34000000,0x1e000000,0xe000000,
5169 0x4000000,0xc000000,0x1b000000,0x31000000,0xd24e4e4e,0xff7a7a7a,0xff7a7a7a,0xff7a7a7a,0xde4b4b4b,0x6a000000,0x4f000000,0x31000000,0x1b000000,0xc000000,
5170 0x2000000,0xa000000,0x17000000,0x2c000000,0x48000000,0xd74f4f4f,0xff838383,0xde4e4e4e,0x78000000,0x63000000,0x48000000,0x2c000000,0x17000000,0xa000000,
5171 0x2000000,0x7000000,0x13000000,0x28000000,0x41000000,0xd5595959,0xffa1a1a1,0xdc5b5b5b,0x70000000,0x5b000000,0x41000000,0x28000000,0x13000000,0x7000000,
5172 0x2000000,0x7000000,0x13000000,0x28000000,0xce636363,0xffadadad,0xffb6b6b6,0xffbdbdbd,0xdb6f6f6f,0x5b000000,0x41000000,0x28000000,0x13000000,0x7000000,
5173 0x2000000,0xa000000,0x17000000,0xca646464,0xffababab,0xffaeaeae,0xffadadad,0xffc2c2c2,0xffc7c7c7,0xd87b7b7b,0x48000000,0x2c000000,0x17000000,0xa000000,
5174 0x4000000,0xc000000,0x1b000000,0xffa3a3a3,0xffababab,0xffa4a4a4,0xff909090,0xffc2c2c2,0xffc8c8c8,0xffcecece,0x4f000000,0x31000000,0x1b000000,0xc000000,
5175 0x4000000,0xe000000,0x1e000000,0xffa0a0a0,0xff999999,0xff848484,0xff7b7b7b,0xff888888,0xff8e8e8e,0xff8d8d8d,0x51000000,0x34000000,0x1e000000,0xe000000,
5176 0x4000000,0x19000000,0x3d000000,0xff707070,0xff696969,0xff656565,0xff656565,0xff656565,0xff656565,0xff656565,0x66000000,0x3c000000,0x1d000000,0xe000000,
5177 0x4000000,0x23000000,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0x3f000000,0x19000000,0xc000000
5178};
5179
5180static const QRgb week_data[] = {
5181 0xe000000,0x18000000,0x23000000,0x2e000000,0x35000000,0x39000000,0x3b000000,0x3b000000,0x3b000000,0x39000000,0x35000000,0x2e000000,0x23000000,0x18000000,
5182 0x18000000,0xff7a7fbb,0xff6b71b3,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff454ca2,0xff0d1986,0x3d000000,0x2a000000,
5183 0x24000000,0xff6b71b3,0xff4a51a4,0xff303999,0xff303999,0xff303999,0xff303999,0xff303999,0xff303999,0xff303999,0xff0d1a8b,0xff0a146c,0x5a000000,0x3e000000,
5184 0x2e000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe5e5e5,0xffaeaeae,0x74000000,0x50000000,
5185 0x35000000,0xffffffff,0xff000000,0xff000000,0xffffffff,0xff000000,0xff000000,0xffffffff,0xff000000,0xff000000,0xffe5e5e5,0xffaeaeae,0x86000000,0x5c000000,
5186 0x39000000,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffe5e5e5,0xffaeaeae,0x90000000,0x63000000,
5187 0x3b000000,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffe5e5e5,0xffaeaeae,0x95000000,0x66000000,
5188 0x3c000000,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffe5e5e5,0xffaeaeae,0x96000000,0x67000000,
5189 0x3b000000,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffe5e5e5,0xffaeaeae,0x95000000,0x66000000,
5190 0x39000000,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffe5e5e5,0xffaeaeae,0x90000000,0x63000000,
5191 0x35000000,0xffffffff,0xfffdfdfd,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffd1d1d1,0xffa4a4a4,0x86000000,0x5c000000,
5192 0x2e000000,0xfff5f5f5,0xffc4c4c4,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffa4a4a4,0xff969696,0x74000000,0x50000000,
5193 0x24000000,0x3e000000,0x5a000000,0x74000000,0x86000000,0x90000000,0x95000000,0x96000000,0x95000000,0x90000000,0x86000000,0x74000000,0x5a000000,0x3e000000,
5194 0x18000000,0x2a000000,0x3d000000,0x4f000000,0x5c000000,0x63000000,0x66000000,0x67000000,0x66000000,0x63000000,0x5c000000,0x4f000000,0x3d000000,0x2a000000
5195};
5196
5197static const QRgb wordgame_data[] = {
5198 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffffff,
5199 0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,
5200 0xff000000,0xffffffff,0xffffffff,0xffaaaaaa,0xff727272,0xffaaaaaa,0xff8e8e8e,0xff555555,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,
5201 0xff000000,0xffffffff,0xffaaaaaa,0xff555555,0xffffffff,0xffffffff,0xffffffff,0xffaaaaaa,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,
5202 0xff000000,0xffffffff,0xff555555,0xffaaaaaa,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,
5203 0xff000000,0xffffffff,0xff555555,0xffaaaaaa,0xffffffff,0xffffffff,0xff8e8e8e,0xff555555,0xff8e8e8e,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,
5204 0xff000000,0xffffffff,0xff727272,0xff8e8e8e,0xffffffff,0xffffffff,0xffffffff,0xff555555,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,
5205 0xff000000,0xffffffff,0xffe3e3e3,0xff555555,0xffc7c7c7,0xffffffff,0xffc7c7c7,0xff1d1d1d,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,
5206 0xff000000,0xffffffff,0xffffffff,0xffe3e3e3,0xff727272,0xff8e8e8e,0xff8e8e8e,0xffc7c7c7,0xffffffff,0xff737373,0xffb6b6b6,0xffffffff,0xff000000,0xff000000,
5207 0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff747474,0xff525252,0xffffffff,0xff000000,0xff000000,
5208 0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffc7c7c7,0xff909090,0xffffffff,0xff000000,0xff000000,
5209 0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,
5210 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
5211 0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000
5212};
5213
5214static const unsigned char wordgame_shapes_data[] = {
5215 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
5216 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
5217 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
5218 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
5219 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
5220 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
5221 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02,
5222 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
5223 0x01,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
5224 0x03,0x03,0x01,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
5225 0x04,0x04,0x04,0x04,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
5226 0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
5227 0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x01,0x05,0x05,0x05,0x05,0x05,
5228 0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x02,0x02,0x02,
5229 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x03,
5230 0x03,0x07,0x07,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
5231 0x01,0x04,0x04,0x08,0x08,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
5232 0x04,0x04,0x01,0x05,0x05,0x07,0x07,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
5233 0x05,0x05,0x05,0x05,0x01,0x06,0x06,0x08,0x08,0x06,0x06,0x06,0x06,0x06,
5234 0x06,0x06,0x06,0x06,0x06,0x06,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
5235 0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x02,0x02,0x02,0x02,0x02,
5236 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x03,0x07,0x03,
5237 0x03,0x07,0x03,0x03,0x07,0x03,0x03,0x03,0x07,0x03,0x03,0x03,0x01,0x04,
5238 0x08,0x04,0x04,0x08,0x04,0x04,0x08,0x04,0x04,0x04,0x08,0x04,0x04,0x04,
5239 0x01,0x05,0x07,0x05,0x05,0x07,0x05,0x05,0x07,0x05,0x05,0x05,0x07,0x05,
5240 0x05,0x05,0x01,0x06,0x08,0x06,0x06,0x08,0x06,0x06,0x08,0x06,0x06,0x06,
5241 0x08,0x06,0x06,0x06,0x01,0x05,0x05,0x08,0x08,0x05,0x05,0x05,0x05,0x05,
5242 0x05,0x05,0x08,0x08,0x05,0x05,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
5243 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x03,0x03,0x03,0x03,0x07,
5244 0x03,0x03,0x03,0x07,0x03,0x07,0x03,0x03,0x03,0x03,0x01,0x04,0x04,0x04,
5245 0x08,0x04,0x04,0x04,0x04,0x08,0x04,0x08,0x04,0x04,0x04,0x04,0x01,0x05,
5246 0x05,0x05,0x05,0x07,0x05,0x05,0x05,0x07,0x05,0x07,0x05,0x05,0x05,0x05,
5247 0x01,0x06,0x06,0x06,0x08,0x06,0x06,0x06,0x06,0x08,0x06,0x08,0x06,0x06,
5248 0x06,0x06,0x01,0x05,0x05,0x08,0x08,0x08,0x05,0x05,0x05,0x05,0x05,0x08,
5249 0x08,0x08,0x05,0x05,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
5250 0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x03,0x03,0x03,0x07,0x03,0x03,0x03,
5251 0x03,0x03,0x07,0x03,0x03,0x03,0x03,0x03,0x01,0x04,0x04,0x04,0x04,0x08,
5252 0x04,0x04,0x04,0x04,0x08,0x04,0x04,0x04,0x04,0x04,0x01,0x05,0x05,0x05,
5253 0x07,0x05,0x05,0x05,0x05,0x05,0x07,0x05,0x05,0x05,0x05,0x05,0x01,0x06,
5254 0x06,0x06,0x06,0x08,0x06,0x06,0x06,0x06,0x08,0x06,0x06,0x06,0x06,0x06,
5255 0x01,0x05,0x05,0x05,0x08,0x08,0x08,0x05,0x05,0x05,0x08,0x08,0x08,0x05,
5256 0x05,0x05,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
5257 0x02,0x02,0x02,0x02,0x01,0x03,0x03,0x07,0x03,0x03,0x03,0x03,0x03,0x07,
5258 0x03,0x07,0x03,0x03,0x03,0x03,0x01,0x04,0x08,0x04,0x04,0x08,0x04,0x04,
5259 0x04,0x08,0x04,0x08,0x04,0x04,0x04,0x04,0x01,0x05,0x05,0x07,0x05,0x05,
5260 0x05,0x05,0x05,0x07,0x05,0x07,0x05,0x05,0x05,0x05,0x01,0x06,0x08,0x06,
5261 0x06,0x08,0x06,0x06,0x06,0x08,0x06,0x08,0x06,0x06,0x06,0x06,0x01,0x05,
5262 0x05,0x05,0x05,0x08,0x08,0x08,0x05,0x08,0x08,0x08,0x05,0x05,0x05,0x05,
5263 0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
5264 0x02,0x02,0x01,0x03,0x07,0x07,0x07,0x07,0x03,0x03,0x07,0x03,0x03,0x03,
5265 0x07,0x03,0x03,0x03,0x01,0x04,0x04,0x08,0x08,0x04,0x04,0x04,0x08,0x04,
5266 0x04,0x04,0x08,0x04,0x04,0x04,0x01,0x05,0x07,0x07,0x07,0x07,0x05,0x05,
5267 0x07,0x05,0x05,0x05,0x07,0x05,0x05,0x05,0x01,0x06,0x06,0x08,0x08,0x06,
5268 0x06,0x06,0x08,0x06,0x06,0x06,0x08,0x06,0x06,0x06,0x01,0x05,0x05,0x05,
5269 0x05,0x05,0x08,0x08,0x08,0x08,0x08,0x05,0x05,0x05,0x05,0x05,0x01,0x02,
5270 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
5271 0x01,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
5272 0x03,0x03,0x01,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
5273 0x04,0x04,0x04,0x04,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
5274 0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
5275 0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x01,0x05,0x05,0x05,0x05,0x05,
5276 0x05,0x08,0x08,0x08,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x02,0x02,0x02,
5277 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x03,
5278 0x03,0x07,0x07,0x03,0x03,0x07,0x03,0x03,0x07,0x03,0x07,0x07,0x07,0x03,
5279 0x01,0x04,0x04,0x08,0x08,0x04,0x04,0x08,0x04,0x04,0x08,0x04,0x08,0x08,
5280 0x08,0x04,0x01,0x05,0x05,0x05,0x07,0x07,0x05,0x05,0x07,0x05,0x05,0x05,
5281 0x07,0x05,0x05,0x05,0x01,0x06,0x06,0x06,0x08,0x08,0x06,0x06,0x08,0x06,
5282 0x06,0x06,0x08,0x06,0x06,0x06,0x01,0x05,0x05,0x05,0x05,0x05,0x08,0x08,
5283 0x08,0x08,0x08,0x05,0x05,0x05,0x05,0x05,0x01,0x02,0x02,0x02,0x02,0x02,
5284 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x03,0x07,0x03,
5285 0x03,0x07,0x03,0x07,0x07,0x03,0x07,0x03,0x07,0x03,0x03,0x03,0x01,0x04,
5286 0x08,0x04,0x04,0x08,0x04,0x08,0x08,0x04,0x08,0x04,0x08,0x04,0x04,0x04,
5287 0x01,0x05,0x05,0x07,0x05,0x05,0x07,0x05,0x07,0x05,0x05,0x05,0x07,0x05,
5288 0x05,0x05,0x01,0x06,0x06,0x08,0x06,0x06,0x08,0x06,0x08,0x06,0x06,0x06,
5289 0x08,0x06,0x06,0x06,0x01,0x05,0x05,0x05,0x05,0x08,0x08,0x08,0x05,0x08,
5290 0x08,0x08,0x05,0x05,0x05,0x05,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
5291 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x03,0x07,0x03,0x03,0x07,
5292 0x03,0x07,0x03,0x07,0x07,0x03,0x07,0x07,0x03,0x03,0x01,0x04,0x08,0x04,
5293 0x04,0x08,0x04,0x08,0x04,0x08,0x08,0x04,0x08,0x08,0x04,0x04,0x01,0x05,
5294 0x05,0x07,0x07,0x07,0x07,0x05,0x07,0x05,0x05,0x05,0x07,0x05,0x05,0x05,
5295 0x01,0x06,0x06,0x08,0x08,0x08,0x08,0x06,0x08,0x06,0x06,0x06,0x08,0x06,
5296 0x06,0x06,0x01,0x05,0x05,0x05,0x08,0x08,0x08,0x05,0x05,0x05,0x08,0x08,
5297 0x08,0x05,0x05,0x05,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
5298 0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x03,0x07,0x03,0x03,0x07,0x03,0x07,
5299 0x03,0x03,0x07,0x03,0x07,0x03,0x03,0x03,0x01,0x04,0x08,0x04,0x04,0x08,
5300 0x04,0x08,0x04,0x04,0x08,0x04,0x08,0x04,0x04,0x04,0x01,0x05,0x05,0x07,
5301 0x05,0x05,0x07,0x05,0x07,0x05,0x05,0x05,0x07,0x05,0x05,0x05,0x01,0x06,
5302 0x06,0x08,0x06,0x06,0x08,0x06,0x08,0x06,0x06,0x06,0x08,0x06,0x06,0x06,
5303 0x01,0x05,0x05,0x08,0x08,0x08,0x05,0x05,0x05,0x05,0x05,0x08,0x08,0x08,
5304 0x05,0x05,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
5305 0x02,0x02,0x02,0x02,0x01,0x03,0x07,0x03,0x03,0x07,0x03,0x07,0x03,0x03,
5306 0x07,0x03,0x07,0x03,0x03,0x03,0x01,0x04,0x08,0x04,0x04,0x08,0x04,0x08,
5307 0x04,0x04,0x08,0x04,0x08,0x04,0x04,0x04,0x01,0x05,0x05,0x07,0x05,0x05,
5308 0x07,0x05,0x07,0x05,0x05,0x05,0x07,0x05,0x05,0x05,0x01,0x06,0x06,0x08,
5309 0x06,0x06,0x08,0x06,0x08,0x06,0x06,0x06,0x08,0x06,0x06,0x06,0x01,0x05,
5310 0x05,0x08,0x08,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x08,0x08,0x05,0x05,
5311 0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
5312 0x02,0x02,0x01,0x03,0x03,0x07,0x07,0x03,0x03,0x07,0x03,0x03,0x07,0x03,
5313 0x07,0x07,0x07,0x03,0x01,0x04,0x04,0x08,0x08,0x04,0x04,0x08,0x04,0x04,
5314 0x08,0x04,0x08,0x08,0x08,0x04,0x01,0x05,0x05,0x07,0x05,0x05,0x07,0x05,
5315 0x07,0x07,0x07,0x05,0x07,0x07,0x07,0x05,0x01,0x06,0x06,0x08,0x06,0x06,
5316 0x08,0x06,0x08,0x08,0x08,0x06,0x08,0x08,0x08,0x06,0x01,0x05,0x05,0x05,
5317 0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x02,
5318 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
5319 0x01,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
5320 0x03,0x03,0x01,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
5321 0x04,0x04,0x04,0x04,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
5322 0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
5323 0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x01,0x05,0x05,0x05,0x05,0x05,
5324 0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05
5325};
5326
5327static const QRgb wordgame_shapes_ctable[] = {
5328 0xc6c6c6,0xff005e5e,0xff007f7f,0xff00ffff,0xff0000ff,0xffffa100,0xffff0000,0xff000000,0xffffffff
5329};
5330
5331static const unsigned char xtopowerofy_data[] = {
5332 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
5333 0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
5334 0x00,0x00,0x01,0x01,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,
5335 0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x01,0x01,
5336 0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
5337 0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
5338 0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00
5339};
5340
5341static const QRgb xtopowerofy_ctable[] = {
5342 0xc6c6c6,0xff000000
5343};
5344
5345static const unsigned char ythrootofx_data[] = {
5346 0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
5347 0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
5348 0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x00,0x00,0x01,0x01,0x01,0x01,
5349 0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x01,0x00,0x00,
5350 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x00,0x01,
5351 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
5352 0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x01,
5353 0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
5354 0x01,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
5355 0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,
5356 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,
5357 0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
5358 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
5359};
5360
5361static const QRgb ythrootofx_ctable[] = {
5362 0xc6c6c6,0xff000000
5363};
5364
5365static const unsigned char zoom_data[] = {
5366 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
5367 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x04,0x04,
5368 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
5369 0x00,0x04,0x03,0x03,0x03,0x03,0x03,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
5370 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x03,0x03,0x00,0x00,0x00,0x00,0x03,
5371 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x03,0x03,
5372 0x03,0x03,0x03,0x00,0x00,0x00,0x03,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
5373 0x00,0x00,0x00,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x00,0x03,0x04,
5374 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x03,0x03,0x03,0x03,
5375 0x03,0x03,0x03,0x00,0x03,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
5376 0x00,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x00,0x00,
5377 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x03,0x03,0x03,0x03,0x03,0x03,
5378 0x03,0x03,0x03,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
5379 0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x00,0x00,0x00,0x00,0x00,
5380 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x03,0x03,0x03,0x03,0x03,0x04,
5381 0x05,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
5382 0x04,0x04,0x04,0x04,0x04,0x00,0x04,0x05,0x05,0x04,0x00,0x00,0x00,0x00,
5383 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x05,
5384 0x01,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
5385 0x00,0x00,0x00,0x00,0x00,0x04,0x05,0x01,0x02,0x04,0x00,0x00,0x00,0x00,
5386 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x05,
5387 0x01,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
5388 0x00,0x00,0x00,0x00,0x00,0x04,0x05,0x01,0x02,0x04,0x00,0x00,0x00,0x00,
5389 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x02,
5390 0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
5391 0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
5392 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
5393 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
5394 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
5395};
5396
5397static const QRgb zoom_ctable[] = {
5398 0xc6c6c6,0xffffa858,0xffc05800,0xff00ffff,0xff000000,0xffffdca8,0xffffffff
5399};
5400
5401static struct EmbedImage {
5402 int width, height, depth;
5403 const unsigned char *data;
5404 int numColors;
5405 const QRgb *colorTable;
5406 bool alpha;
5407 const char *name;
5408} embed_image_vec[] = {
5409 { 14, 14, 32, (const unsigned char*)_to1_data, 0, 0, TRUE, "1to1" },
5410 { 32, 32, 32, (const unsigned char*)AddressBook_data, 0, 0, TRUE, "AddressBook" },
5411 { 32, 32, 32, (const unsigned char*)Appearance_data, 0, 0, TRUE, "Appearance" },
5412 { 14, 14, 32, (const unsigned char*)AppsIcon_data, 0, 0, TRUE, "AppsIcon" },
5413 { 32, 32, 32, (const unsigned char*)Calculator_data, 0, 0, TRUE, "Calculator" },
5414 { 32, 32, 32, (const unsigned char*)Calibrate_data, 0, 0, TRUE, "Calibrate" },
5415 { 32, 32, 32, (const unsigned char*)CityTime_data, 0, 0, TRUE, "CityTime" },
5416 { 32, 32, 32, (const unsigned char*)Clock_data, 0, 0, TRUE, "Clock" },
5417 { 14, 14, 32, (const unsigned char*)CloseButton_data, 0, 0, TRUE, "CloseButton" },
5418 { 32, 32, 32, (const unsigned char*)DateBook_data, 0, 0, TRUE, "DateBook" },
5419 { 32, 32, 32, (const unsigned char*)DateTime_data, 0, 0, TRUE, "DateTime" },
5420 { 14, 14, 32, (const unsigned char*)DocsIcon_data, 0, 0, TRUE, "DocsIcon" },
5421 { 32, 32, 32, (const unsigned char*)DocumentTypeExcel_data, 0, 0, TRUE, "DocumentTypeExcel" },
5422 { 32, 32, 32, (const unsigned char*)DocumentTypeNone_data, 0, 0, TRUE, "DocumentTypeNone" },
5423 { 32, 32, 32, (const unsigned char*)DocumentTypePowerPoint_data, 0, 0, TRUE, "DocumentTypePowerPoint" },
5424 { 32, 32, 32, (const unsigned char*)DocumentTypeWord_data, 0, 0, TRUE, "DocumentTypeWord" },
5425 { 32, 32, 32, (const unsigned char*)FileBrowser_data, 0, 0, TRUE, "FileBrowser" },
5426 { 14, 14, 32, (const unsigned char*)Games_data, 0, 0, TRUE, "Games" },
5427 { 32, 32, 32, (const unsigned char*)Go_data, 0, 0, TRUE, "Go" },
5428 { 12, 12, 32, (const unsigned char*)Go_black_data, 0, 0, TRUE, "Go-black" },
5429 { 12, 12, 32, (const unsigned char*)Go_black_highlight_data, 0, 0, TRUE, "Go-black-highlight" },
5430 { 12, 12, 32, (const unsigned char*)Go_white_data, 0, 0, TRUE, "Go-white" },
5431 { 32, 32, 32, (const unsigned char*)HelpBrowser_data, 0, 0, TRUE, "HelpBrowser" },
5432 { 14, 14, 32, (const unsigned char*)HelpButton_data, 0, 0, TRUE, "HelpButton" },
5433 { 32, 32, 32, (const unsigned char*)ImageViewer_data, 0, 0, TRUE, "ImageViewer" },
5434 { 32, 32, 32, (const unsigned char*)Ipkg_data, 0, 0, TRUE, "Ipkg" },
5435 { 32, 32, 32, (const unsigned char*)Language_data, 0, 0, TRUE, "Language" },
5436 { 32, 32, 32, (const unsigned char*)Light_data, 0, 0, TRUE, "Light" },
5437 { 32, 32, 32, (const unsigned char*)MPEGPlayer_data, 0, 0, TRUE, "MPEGPlayer" },
5438 { 32, 32, 32, (const unsigned char*)Mindbreaker_data, 0, 0, TRUE, "Mindbreaker" },
5439 { 32, 32, 32, (const unsigned char*)MineHunt_data, 0, 0, TRUE, "MineHunt" },
5440 { 32, 32, 32, (const unsigned char*)NetHack_data, 0, 0, TRUE, "NetHack" },
5441 { 28, 14, 32, (const unsigned char*)OKButton_data, 0, 0, TRUE, "OKButton" },
5442 { 32, 32, 32, (const unsigned char*)Opera_data, 0, 0, TRUE, "Opera" },
5443 { 32, 32, 32, (const unsigned char*)PPPConnect_data, 0, 0, TRUE, "PPPConnect" },
5444 { 32, 32, 32, (const unsigned char*)ParaShoot_data, 0, 0, TRUE, "ParaShoot" },
5445 { 32, 32, 32, (const unsigned char*)Rotation_data, 0, 0, TRUE, "Rotation" },
5446 { 14, 14, 32, (const unsigned char*)SettingsIcon_data, 0, 0, TRUE, "SettingsIcon" },
5447 { 32, 32, 32, (const unsigned char*)Shutdown_data, 0, 0, TRUE, "Shutdown" },
5448 { 32, 32, 32, (const unsigned char*)Snake_data, 0, 0, TRUE, "Snake" },
5449 { 32, 32, 32, (const unsigned char*)Solitaire_data, 0, 0, TRUE, "Solitaire" },
5450 { 32, 32, 32, (const unsigned char*)Sound_data, 0, 0, TRUE, "Sound" },
5451 { 32, 32, 32, (const unsigned char*)SoundPlayer_data, 0, 0, TRUE, "SoundPlayer" },
5452 { 32, 32, 32, (const unsigned char*)Spreadsheet_data, 0, 0, TRUE, "Spreadsheet" },
5453 { 32, 32, 32, (const unsigned char*)SystemInfo_data, 0, 0, TRUE, "SystemInfo" },
5454 { 32, 32, 32, (const unsigned char*)Terminal_data, 0, 0, TRUE, "Terminal" },
5455 { 32, 32, 32, (const unsigned char*)Tetrix_data, 0, 0, TRUE, "Tetrix" },
5456 { 32, 32, 32, (const unsigned char*)TextEditor_data, 0, 0, TRUE, "TextEditor" },
5457 { 32, 32, 32, (const unsigned char*)TodoList_data, 0, 0, TRUE, "TodoList" },
5458 { 32, 32, 32, (const unsigned char*)Tux_data, 0, 0, TRUE, "Tux" },
5459 { 14, 14, 32, (const unsigned char*)UtilsIcon_data, 0, 0, TRUE, "UtilsIcon" },
5460 { 32, 32, 32, (const unsigned char*)WordGame_data, 0, 0, TRUE, "WordGame" },
5461 { 14, 14, 32, (const unsigned char*)accessories_data, 0, 0, TRUE, "accessories" },
5462 { 16, 16, 32, (const unsigned char*)appearance_data, 0, 0, TRUE, "appearance" },
5463 { 14, 14, 32, (const unsigned char*)back_data, 0, 0, TRUE, "back" },
5464 { 14, 14, 32, (const unsigned char*)back_inactive_data, 0, 0, TRUE, "back_inactive" },
5465 { 32, 32, 32, (const unsigned char*)background_data, 0, 0, TRUE, "background" },
5466 { 14, 14, 32, (const unsigned char*)beam_data, 0, 0, TRUE, "beam" },
5467 { 14, 14, 32, (const unsigned char*)bell_data, 0, 0, TRUE, "bell" },
5468 { 32, 32, 8, (const unsigned char*)bg_data, 85, bg_ctable, FALSE, "bg" },
5469 { 14, 14, 32, (const unsigned char*)binary_data, 0, 0, TRUE, "binary" },
5470 { 16, 16, 32, (const unsigned char*)bold_data, 0, 0, TRUE, "bold" },
5471 { 16, 16, 8, (const unsigned char*)c_src_data, 41, c_src_ctable, TRUE, "c_src" },
5472 { 14, 14, 32, (const unsigned char*)calculator_data, 0, 0, TRUE, "calculator" },
5473 { 16, 16, 32, (const unsigned char*)center_data, 0, 0, TRUE, "center" },
5474 { 16, 16, 8, (const unsigned char*)citytime_icon_data, 14, citytime_icon_ctable, TRUE, "citytime_icon" },
5475 { 14, 14, 32, (const unsigned char*)close_data, 0, 0, TRUE, "close" },
5476 { 14, 14, 32, (const unsigned char*)copy_data, 0, 0, TRUE, "copy" },
5477 { 14, 14, 32, (const unsigned char*)copy_inactive_data, 0, 0, TRUE, "copy_inactive" },
5478 { 14, 14, 32, (const unsigned char*)cut_data, 0, 0, TRUE, "cut" },
5479 { 14, 14, 32, (const unsigned char*)cut_inactive_data, 0, 0, TRUE, "cut_inactive" },
5480 { 14, 14, 32, (const unsigned char*)datebook_icon_data, 0, 0, TRUE, "datebook_icon" },
5481 { 14, 14, 32, (const unsigned char*)day_data, 0, 0, TRUE, "day" },
5482 { 14, 14, 32, (const unsigned char*)done_data, 0, 0, TRUE, "done" },
5483 { 14, 14, 32, (const unsigned char*)edit_data, 0, 0, TRUE, "edit" },
5484 { 14, 14, 32, (const unsigned char*)editdelete_data, 0, 0, TRUE, "editdelete" },
5485 { 14, 14, 32, (const unsigned char*)enter_data, 0, 0, TRUE, "enter" },
5486 { 16, 16, 8, (const unsigned char*)exec_data, 11, exec_ctable, TRUE, "exec" },
5487 { 32, 32, 8, (const unsigned char*)faded_bg_data, 40, faded_bg_ctable, TRUE, "faded_bg" },
5488 { 14, 14, 32, (const unsigned char*)fastback_data, 0, 0, TRUE, "fastback" },
5489 { 14, 14, 32, (const unsigned char*)fastforward_data, 0, 0, TRUE, "fastforward" },
5490 { 14, 14, 32, (const unsigned char*)fileopen_data, 0, 0, TRUE, "fileopen" },
5491 { 14, 14, 32, (const unsigned char*)find_data, 0, 0, TRUE, "find" },
5492 { 14, 14, 32, (const unsigned char*)finish_data, 0, 0, TRUE, "finish" },
5493 { 14, 14, 32, (const unsigned char*)folder_data, 0, 0, TRUE, "folder" },
5494 { 16, 16, 8, (const unsigned char*)folder_open_data, 11, folder_open_ctable, TRUE, "folder_open" },
5495 { 14, 14, 32, (const unsigned char*)forward_data, 0, 0, TRUE, "forward" },
5496 { 14, 14, 32, (const unsigned char*)forward_inactive_data, 0, 0, TRUE, "forward_inactive" },
5497 { 14, 14, 32, (const unsigned char*)fullscreen_data, 0, 0, TRUE, "fullscreen" },
5498 { 19, 19, 32, (const unsigned char*)go_data, 0, 0, FALSE, "go" },
5499 { 16, 16, 8, (const unsigned char*)h_src_data, 41, h_src_ctable, TRUE, "h_src" },
5500 { 14, 14, 32, (const unsigned char*)help_icon_data, 0, 0, TRUE, "help_icon" },
5501 { 14, 14, 32, (const unsigned char*)home_data, 0, 0, TRUE, "home" },
5502 { 14, 14, 8, (const unsigned char*)install_data, 10, install_ctable, TRUE, "install" },
5503 { 14, 14, 32, (const unsigned char*)installed_data, 0, 0, TRUE, "installed" },
5504 { 16, 16, 32, (const unsigned char*)italic_data, 0, 0, TRUE, "italic" },
5505 { 16, 16, 8, (const unsigned char*)konsole_data, 5, konsole_ctable, TRUE, "konsole" },
5506 { 16, 16, 32, (const unsigned char*)language_data, 0, 0, TRUE, "language" },
5507 { 32, 32, 32, (const unsigned char*)launching_data, 0, 0, TRUE, "launching" },
5508 { 16, 16, 32, (const unsigned char*)left_data, 0, 0, TRUE, "left" },
5509 { 14, 14, 32, (const unsigned char*)library_data, 0, 0, TRUE, "library" },
5510 { 16, 16, 8, (const unsigned char*)locked_data, 8, locked_ctable, TRUE, "locked" },
5511 { 16, 16, 8, (const unsigned char*)lockedfolder_data, 10, lockedfolder_ctable, TRUE, "lockedfolder" },
5512 { 10, 10, 32, (const unsigned char*)mag_data, 0, 0, TRUE, "mag" },
5513 { 14, 14, 32, (const unsigned char*)month_data, 0, 0, TRUE, "month" },
5514 { 14, 14, 32, (const unsigned char*)mute_data, 0, 0, TRUE, "mute" },
5515 { 14, 14, 32, (const unsigned char*)new_data, 0, 0, TRUE, "new" },
5516 { 14, 14, 32, (const unsigned char*)newfolder_data, 0, 0, TRUE, "newfolder" },
5517 { 14, 14, 32, (const unsigned char*)next_data, 0, 0, TRUE, "next" },
5518 { 13, 11, 8, (const unsigned char*)oneoverx_data, 2, oneoverx_ctable, TRUE, "oneoverx" },
5519 { 16, 14, 8, (const unsigned char*)pass_data, 3, pass_ctable, TRUE, "pass" },
5520 { 14, 14, 32, (const unsigned char*)paste_data, 0, 0, TRUE, "paste" },
5521 { 14, 14, 32, (const unsigned char*)paste_inactive_data, 0, 0, TRUE, "paste_inactive" },
5522 { 16, 16, 8, (const unsigned char*)pixmap_data, 20, pixmap_ctable, TRUE, "pixmap" },
5523 { 14, 14, 32, (const unsigned char*)play_data, 0, 0, TRUE, "play" },
5524 { 14, 14, 32, (const unsigned char*)play2_data, 0, 0, TRUE, "play2" },
5525 { 14, 14, 32, (const unsigned char*)programs_data, 0, 0, TRUE, "programs" },
5526 { 14, 14, 32, (const unsigned char*)quit_icon_data, 0, 0, TRUE, "quit_icon" },
5527 { 15, 15, 32, (const unsigned char*)repeat_data, 0, 0, TRUE, "repeat" },
5528 { 14, 14, 8, (const unsigned char*)reset_data, 3, reset_ctable, TRUE, "reset" },
5529 { 16, 16, 32, (const unsigned char*)right_data, 0, 0, TRUE, "right" },
5530 { 14, 14, 32, (const unsigned char*)rotate_data, 0, 0, TRUE, "rotate" },
5531 { 14, 14, 32, (const unsigned char*)start_data, 0, 0, TRUE, "start" },
5532 { 14, 14, 32, (const unsigned char*)stop_data, 0, 0, TRUE, "stop" },
5533 { 16, 16, 32, (const unsigned char*)style_data, 0, 0, TRUE, "style" },
5534 { 16, 16, 32, (const unsigned char*)table_pattern_data, 0, 0, TRUE, "table_pattern" },
5535 { 16, 16, 8, (const unsigned char*)tgz_data, 7, tgz_ctable, TRUE, "tgz" },
5536 { 14, 14, 32, (const unsigned char*)toys_data, 0, 0, TRUE, "toys" },
5537 { 16, 16, 8, (const unsigned char*)trash_data, 10, trash_ctable, TRUE, "trash" },
5538 { 16, 16, 8, (const unsigned char*)txt_data, 41, txt_ctable, TRUE, "txt" },
5539 { 16, 16, 32, (const unsigned char*)underline_data, 0, 0, TRUE, "underline" },
5540 { 14, 14, 32, (const unsigned char*)uninstall_data, 0, 0, TRUE, "uninstall" },
5541 { 14, 14, 8, (const unsigned char*)uninstalled_data, 6, uninstalled_ctable, TRUE, "uninstalled" },
5542 { 14, 14, 32, (const unsigned char*)up_data, 0, 0, TRUE, "up" },
5543 { 14, 14, 32, (const unsigned char*)volume_data, 0, 0, TRUE, "volume" },
5544 { 14, 14, 32, (const unsigned char*)wait_data, 0, 0, TRUE, "wait" },
5545 { 14, 14, 32, (const unsigned char*)week_data, 0, 0, TRUE, "week" },
5546 { 14, 14, 32, (const unsigned char*)wordgame_data, 0, 0, TRUE, "wordgame" },
5547 { 96, 16, 8, (const unsigned char*)wordgame_shapes_data, 9, wordgame_shapes_ctable, TRUE, "wordgame_shapes" },
5548 { 9, 8, 8, (const unsigned char*)xtopowerofy_data, 2, xtopowerofy_ctable, TRUE, "xtopowerofy" },
5549 { 13, 11, 8, (const unsigned char*)ythrootofx_data, 2, ythrootofx_ctable, TRUE, "ythrootofx" },
5550 { 20, 20, 8, (const unsigned char*)zoom_data, 7, zoom_ctable, TRUE, "zoom" },
5551};
5552
5553static int cmpEmbedImage(const void *a, const void *b)
5554{
5555 const EmbedImage* ea = (const EmbedImage*)a;
5556 const EmbedImage* eb = (const EmbedImage*)b;
5557 return strcmp(ea->name,eb->name);
5558}
5559inline const QImage& qembed_findImage(const char* name)
5560{
5561 EmbedImage key; key.name = name;
5562 EmbedImage* r = (EmbedImage*)bsearch( &key, embed_image_vec,
5563 sizeof(embed_image_vec)/sizeof(EmbedImage), sizeof(EmbedImage), cmpEmbedImage );
5564 QImage* img;
5565 if ( r ) {
5566 img = new QImage((uchar*)r->data,
5567 r->width,
5568 r->height,
5569 r->depth,
5570#ifdef _WS_QWS_
5571 (r->width*r->depth+31)/32*4,
5572#endif
5573 (QRgb*)r->colorTable,
5574 r->numColors,
5575 QImage::BigEndian
5576 );
5577 if ( r->alpha )
5578 img->setAlphaBuffer(TRUE);
5579 } else {
5580 static QImage dummy;
5581 img = &dummy;
5582 }
5583 return *img;
5584}
5585
5586#endif
diff --git a/library/inputmethodinterface.h b/library/inputmethodinterface.h
new file mode 100644
index 0000000..ae14218
--- a/dev/null
+++ b/library/inputmethodinterface.h
@@ -0,0 +1,49 @@
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 INPUTMETHODINTERFACE_H
22#define INPUTMETHODINTERFACE_H
23
24#include <qpe/qcom.h>
25
26#include <qnamespace.h>
27#include <qstring.h>
28
29#ifndef QT_NO_COMPONENT
30// {637A8A14-AF98-41DA-969A-2BD16ECDA8C7}
31# ifndef IID_InputMethod
32# define IID_InputMethod QUuid( 0x637a8a14, 0xaf98, 0x41da, 0x96, 0x9a, 0x2b, 0xd1, 0x6e, 0xcd, 0xa8, 0xc7)
33# endif
34#endif
35
36class QWidget;
37class QPixmap;
38class QObject;
39
40struct InputMethodInterface : public QUnknownInterface
41{
42 virtual QWidget *inputMethod( QWidget *parent, Qt::WFlags f ) = 0;
43 virtual void resetState() = 0;
44 virtual QPixmap *icon() = 0;
45 virtual QString name() = 0;
46 virtual void onKeyPress( QObject *receiver, const char *slot ) = 0;
47};
48
49#endif
diff --git a/library/ir.cpp b/library/ir.cpp
new file mode 100644
index 0000000..68345d1
--- a/dev/null
+++ b/library/ir.cpp
@@ -0,0 +1,79 @@
1#include "ir.h"
2
3#include <qstring.h>
4#include "qcopenvelope_qws.h"
5#include <qcopchannel_qws.h>
6#include "applnk.h"
7
8/*!
9 \class Ir ir.h
10 \brief The Ir class implements basic support for sending objects over an
11 infrared communication link.
12
13 The Ir class is a small helper class to enable sending of objects over an infrared communication link.
14*/
15
16/*!
17 Constructs an Ir object. The \a parent and \a name classes are the
18 standard QObject parameters.
19*/
20Ir::Ir( QObject *parent, const char *name )
21 : QObject( parent, name )
22{
23 ch = new QCopChannel( "QPE/Obex" );
24 connect( ch, SIGNAL(received(const QCString &, const QByteArray &)),
25 this, SLOT(obexMessage( const QCString &, const QByteArray &)) );
26}
27
28/*!
29 Returns TRUE if the system supports infrared communication.
30*/
31bool Ir::supported()
32{
33 return QCopChannel::isRegistered( "QPE/Obex" );
34}
35
36/*!
37 Send the object in the file \a fn over the infrared link.
38 The \a description will be shown to the user while
39 sending is in progress.
40 The optional \a mimetype parameter specifies the mimetype of the object. If this parameter is not
41 set, it will be determined by the extension of the filename.
42*/
43void Ir::send( const QString &fn, const QString &description, const QString &mimetype)
44{
45 if ( !filename.isEmpty() ) return;
46 filename = fn;
47 QCopEnvelope e("QPE/Obex", "send(QString,QString,QString)");
48 e << description << filename << mimetype;
49}
50
51/*!
52 \overload
53
54 Uses the DocLnk::file() and DocLnk::type() of \a doc.
55*/
56void Ir::send( const DocLnk &doc, const QString &description )
57{
58 send( doc.file(), description, doc.type() );
59}
60
61/*!
62 \fn Ir::done( Ir *ir );
63
64 This signal is emitted by \a ir, when the send comand has been processed.
65*/
66
67/*!\internal
68 */
69void Ir::obexMessage( const QCString &msg, const QByteArray &data)
70{
71 if ( msg == "done(QString)" ) {
72 QString fn;
73 QDataStream stream( data, IO_ReadOnly );
74 stream >> fn;
75 if ( fn == filename )
76 emit done( this );
77 }
78}
79
diff --git a/library/ir.h b/library/ir.h
new file mode 100644
index 0000000..33eedfe
--- a/dev/null
+++ b/library/ir.h
@@ -0,0 +1,31 @@
1#ifndef IR_H
2#define IR_H
3
4#include <qstring.h>
5#include <qobject.h>
6class DocLnk;
7class QCopChannel;
8
9class Ir : public QObject
10{
11 Q_OBJECT
12public:
13 static bool supported();
14
15 Ir( QObject *parent = 0, const char *name = 0);
16
17 void send( const QString &filename, const QString &description, const QString &mimetype = QString::null );
18 void send( const DocLnk &doc, const QString &description );
19
20signals:
21 void done( Ir * );
22
23private slots:
24 void obexMessage( const QCString &msg, const QByteArray &data);
25private:
26 QString filename;
27 QCopChannel *ch;
28};
29
30
31#endif
diff --git a/library/library.pro b/library/library.pro
new file mode 100644
index 0000000..06dfc8f
--- a/dev/null
+++ b/library/library.pro
@@ -0,0 +1,132 @@
1 TEMPLATE= lib
2 CONFIG += qt warn_on release
3 HEADERS= calendar.h \
4 global.h \
5 resource.h \
6 xmlreader.h \
7 mimetype.h \
8 menubutton.h \
9 network.h \
10 networkinterface.h \
11 proxies.h \
12 filemanager.h \
13 fontmanager.h \
14 qdawg.h \
15 datebookmonth.h \
16 fileselector.h \
17 imageedit.h \
18 qcopenvelope_qws.h \
19 qpedecoration_qws.h \
20 qpeapplication.h \
21 qpestyle.h \
22 qpedialog.h \
23 lightstyle.h \
24 config.h \
25 applnk.h \
26 sound.h \
27 tzselect.h \
28 qmath.h \
29 datebookdb.h \
30 alarmserver.h \
31 process.h \
32 password.h \
33 timestring.h \
34 fontfactoryinterface.h \
35 fontdatabase.h \
36 power.h \
37 storage.h \
38 qpemessagebox.h \
39 backend/timeconversion.h \
40 qpedebug.h \
41 qpemenubar.h \
42 qpetoolbar.h \
43 backend/categories.h \
44 backend/stringutil.h \
45 backend/palmtopuid.h \
46 backend/palmtoprecord.h \
47 backend/task.h \
48 backend/event.h \
49 backend/contact.h\
50 categorymenu.h \
51 categoryedit_p.h \
52 categoryselect.h \
53 categorywidget.h \
54 ir.h \
55 backend/vobject_p.h \
56 findwidget_p.h \
57 finddialog.h \
58 lnkproperties.h
59
60 SOURCES= calendar.cpp \
61 global.cpp \
62 xmlreader.cpp \
63 mimetype.cpp \
64 menubutton.cpp \
65 network.cpp \
66 networkinterface.cpp \
67 proxies.cpp \
68 filemanager.cpp \
69 fontmanager.cpp \
70 qdawg.cpp \
71 datebookmonth.cpp \
72 fileselector.cpp \
73 imageedit.cpp \
74 resource.cpp \
75 qpedecoration_qws.cpp \
76 qcopenvelope_qws.cpp \
77 qpeapplication.cpp \
78 qpestyle.cpp \
79 qpedialog.cpp \
80 lightstyle.cpp \
81 config.cpp \
82 applnk.cpp \
83 sound.cpp \
84 tzselect.cpp \
85 qmath.c \
86 datebookdb.cpp \
87 alarmserver.cpp \
88 password.cpp \
89 process.cpp \
90 process_unix.cpp \
91 timestring.cpp \
92 fontdatabase.cpp \
93 power.cpp \
94 storage.cpp \
95 qpemessagebox.cpp \
96 backend/timeconversion.cpp \
97 qpedebug.cpp \
98 qpemenubar.cpp \
99 qpetoolbar.cpp \
100 backend/categories.cpp \
101 backend/stringutil.cpp \
102 backend/palmtoprecord.cpp \
103 backend/task.cpp \
104 backend/event.cpp \
105 backend/contact.cpp \
106 categorymenu.cpp \
107 categoryedit_p.cpp \
108 categoryselect.cpp \
109 categorywidget.cpp \
110 ir.cpp \
111 backend/vcc_yacc.cpp \
112 backend/vobject.cpp \
113 findwidget_p.cpp \
114 finddialog.cpp \
115 lnkproperties.cpp
116
117# Qt 3 compatibility
118qt2:HEADERS += quuid.h qcom.h qlibrary.h qlibrary_p.h qprocess.h
119qt2:SOURCES += quuid.cpp qlibrary.cpp qlibrary_unix.cpp qprocess.cpp \
120 qprocess_unix.cpp
121
122INCLUDEPATH += $(QPEDIR)/include backend
123 LIBS += -ldl -lcrypt -lm
124
125INTERFACES = passwordbase_p.ui proxiesbase_p.ui categoryeditbase_p.ui findwidgetbase_p.ui lnkpropertiesbase_p.ui
126
127 TARGET = qpe
128 DESTDIR = $(QTDIR)/lib$(PROJMAK)
129# This is set by configure$(QPEDIR).
130 VERSION = 1.5.0
131
132TRANSLATIONS = ../i18n/de/libqpe.ts
diff --git a/library/lightstyle.cpp b/library/lightstyle.cpp
new file mode 100644
index 0000000..f18bdca
--- a/dev/null
+++ b/library/lightstyle.cpp
@@ -0,0 +1,1284 @@
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#include "lightstyle.h"
21
22#if QT_VERSION < 300
23
24#define INCLUDE_MENUITEM_DEF
25#include "qmenubar.h"
26#include "qapplication.h"
27#include "qpainter.h"
28#include "qpalette.h"
29#include "qframe.h"
30#include "qpushbutton.h"
31#include "qdrawutil.h"
32#include "qscrollbar.h"
33#include "qtabbar.h"
34#include "qguardedptr.h"
35#include "qlayout.h"
36#include "qlineedit.h"
37
38
39class LightStylePrivate
40{
41public:
42 LightStylePrivate()
43 : hoverWidget(0), ref(1), savePalette(0)
44 {
45 }
46
47 QGuardedPtr<QWidget> hoverWidget;
48 QPalette oldPalette, hoverPalette;
49 int ref;
50 QPoint mousePos;
51 QPalette *savePalette;
52};
53
54
55static LightStylePrivate *singleton = 0;
56
57
58LightStyle::LightStyle()
59 : QWindowsStyle()
60{
61 if (! singleton) {
62 singleton = new LightStylePrivate;
63
64 QPalette pal = QApplication::palette();
65 singleton->oldPalette = pal;
66
67 QColor bg = pal.color(QPalette::Active, QColorGroup::Background);
68 QColor prelight;
69
70 if ( (bg.red() + bg.green() + bg.blue()) / 3 > 128)
71 prelight = pal.color(QPalette::Active,
72 QColorGroup::Background).light(110);
73 else
74 prelight = pal.color(QPalette::Active,
75 QColorGroup::Background).light(120);
76
77 QColorGroup active2(pal.color(QPalette::Active,
78 QColorGroup::Foreground), // foreground
79 prelight, // button
80 prelight.light(), // light
81 prelight.dark(), // dark
82 prelight.dark(120), // mid
83 pal.color(QPalette::Active,
84 QColorGroup::Text), // text
85 pal.color(QPalette::Active,
86 QColorGroup::BrightText), // bright text
87 pal.color(QPalette::Active,
88 QColorGroup::Base), // base
89 bg); // background
90 active2.setColor(QColorGroup::Highlight,
91 pal.color(QPalette::Active, QColorGroup::Highlight));
92
93 singleton->hoverPalette = pal;
94 singleton->hoverPalette.setActive(active2);
95 singleton->hoverPalette.setInactive(active2);
96 } else
97 singleton->ref++;
98}
99
100
101LightStyle::~LightStyle()
102{
103 if (singleton && singleton->ref-- <= 0) {
104 delete singleton;
105 singleton = 0;
106 }
107}
108
109
110QSize LightStyle::scrollBarExtent() const
111{
112 return QSize(12 + defaultFrameWidth(), 12 + defaultFrameWidth());
113}
114
115
116int LightStyle::buttonDefaultIndicatorWidth() const
117{
118 return 2;
119}
120
121
122int LightStyle::sliderThickness() const
123{
124 return 16;
125}
126
127int LightStyle::sliderLength() const
128{
129 return 13;
130}
131
132
133int LightStyle::buttonMargin() const
134{
135 return 4;
136}
137
138
139QSize LightStyle::exclusiveIndicatorSize() const
140{
141 return QSize(13, 13);
142}
143
144
145int LightStyle::defaultFrameWidth() const
146{
147 return 2;
148}
149
150
151QSize LightStyle::indicatorSize() const
152{
153 return QSize(13, 13);
154}
155
156
157void LightStyle::polish(QWidget *widget)
158{
159 if (widget->inherits("QPushButton"))
160 widget->installEventFilter(this);
161
162#if QT_VERSION >= 300
163 if (widget->inherits("QLineEdit")) {
164 QLineEdit *lineedit = (QLineEdit *) widget;
165 lineedit->setFrameShape(QFrame::StyledPanel);
166 lineedit->setLineWidth(2);
167 }
168#endif
169
170 QWindowsStyle::polish(widget);
171}
172
173
174void LightStyle::unPolish(QWidget *widget)
175{
176 if (widget->inherits("QPushButton"))
177 widget->removeEventFilter(this);
178
179#if QT_VERSION >= 300
180 if (widget->inherits("QLineEdit")) {
181 QLineEdit *lineedit = (QLineEdit *) widget;
182 lineedit->setLineWidth(1);
183 lineedit->setFrameShape(QFrame::WinPanel);
184 }
185#endif
186
187 QWindowsStyle::unPolish(widget);
188}
189
190
191void LightStyle::polish(QApplication *app)
192{
193 QPalette pal = app->palette();
194
195 QColorGroup active(pal.color(QPalette::Active,
196 QColorGroup::Foreground), // foreground
197 pal.color(QPalette::Active,
198 QColorGroup::Button), // button
199 pal.color(QPalette::Active,
200 QColorGroup::Background).light(), // light
201 pal.color(QPalette::Active,
202 QColorGroup::Background).dark(175), // dark
203 pal.color(QPalette::Active,
204 QColorGroup::Background).dark(110), // mid
205 pal.color(QPalette::Active,
206 QColorGroup::Text), // text
207 pal.color(QPalette::Active,
208 QColorGroup::BrightText), // bright text
209 pal.color(QPalette::Active,
210 QColorGroup::Base), // base
211 pal.color(QPalette::Active,
212 QColorGroup::Background)), // background
213
214
215 disabled(pal.color(QPalette::Disabled,
216 QColorGroup::Foreground), // foreground
217 pal.color(QPalette::Disabled,
218 QColorGroup::Button), // button
219 pal.color(QPalette::Disabled,
220 QColorGroup::Background).light(), // light
221 pal.color(QPalette::Disabled,
222 QColorGroup::Background).dark(), // dark
223 pal.color(QPalette::Disabled,
224 QColorGroup::Background).dark(110), // mid
225 pal.color(QPalette::Disabled,
226 QColorGroup::Text), // text
227 pal.color(QPalette::Disabled,
228 QColorGroup::BrightText), // bright text
229 pal.color(QPalette::Disabled,
230 QColorGroup::Base), // base
231 pal.color(QPalette::Disabled,
232 QColorGroup::Background)); // background
233
234 active.setColor(QColorGroup::Highlight,
235 pal.color(QPalette::Active, QColorGroup::Highlight));
236 disabled.setColor(QColorGroup::Highlight,
237 pal.color(QPalette::Disabled, QColorGroup::Highlight));
238
239 active.setColor(QColorGroup::HighlightedText,
240 pal.color(QPalette::Active, QColorGroup::HighlightedText));
241 disabled.setColor(QColorGroup::HighlightedText,
242 pal.color(QPalette::Disabled, QColorGroup::HighlightedText));
243
244 pal.setActive(active);
245 pal.setInactive(active);
246 pal.setDisabled(disabled);
247
248 singleton->oldPalette = pal;
249
250 QColor bg = pal.color(QPalette::Active, QColorGroup::Background);
251 QColor prelight;
252
253 if ( (bg.red() + bg.green() + bg.blue()) / 3 > 128)
254 prelight = pal.color(QPalette::Active,
255 QColorGroup::Background).light(110);
256 else
257 prelight = pal.color(QPalette::Active,
258 QColorGroup::Background).light(120);
259
260 QColorGroup active2(pal.color(QPalette::Active,
261 QColorGroup::Foreground), // foreground
262 prelight, // button
263 prelight.light(), // light
264 prelight.dark(), // dark
265 prelight.dark(120), // mid
266 pal.color(QPalette::Active,
267 QColorGroup::Text), // text
268 pal.color(QPalette::Active,
269 QColorGroup::BrightText), // bright text
270 pal.color(QPalette::Active,
271 QColorGroup::Base), // base
272 bg); // background
273 active2.setColor(QColorGroup::Highlight,
274 pal.color(QPalette::Active, QColorGroup::Highlight));
275
276 singleton->hoverPalette = pal;
277 singleton->hoverPalette.setActive(active2);
278 singleton->hoverPalette.setInactive(active2);
279
280 app->setPalette(pal);
281}
282
283
284void LightStyle::unPolish(QApplication *app)
285{
286 app->setPalette(singleton->oldPalette);
287}
288
289
290void LightStyle::polishPopupMenu(QPopupMenu *menu)
291{
292 menu->setMouseTracking(TRUE);
293}
294
295
296void LightStyle::drawPushButton(QPushButton *button, QPainter *p)
297{
298 int x1, y1, x2, y2;
299 button->rect().coords(&x1, &y1, &x2, &y2);
300
301 if (button->isDefault()) {
302 p->save();
303 p->setPen(button->palette().active().color(QColorGroup::Highlight));
304 p->setBrush(button->palette().active().brush(QColorGroup::Highlight));
305 p->drawRoundRect(x1, y1, x2 - x1 + 1, y2 - y1 + 1, 15, 15);
306 p->restore();
307 }
308
309 if (button->isDefault() || button->autoDefault()) {
310 x1 += buttonDefaultIndicatorWidth();
311 y1 += buttonDefaultIndicatorWidth();
312 x2 -= buttonDefaultIndicatorWidth();
313 y2 -= buttonDefaultIndicatorWidth();
314
315 if (button->isDefault()) {
316 QPointArray pa(8);
317 pa.setPoint(0, x1 + 2, y1 );
318 pa.setPoint(1, x2 - 1, y1 );
319 pa.setPoint(2, x2 + 1, y1 + 2);
320 pa.setPoint(3, x2 + 1, y2 - 2);
321 pa.setPoint(4, x2 - 2, y2 + 1);
322 pa.setPoint(5, x1 + 2, y2 + 1);
323 pa.setPoint(6, x1, y2 - 1);
324 pa.setPoint(7, x1, y1 + 2);
325 QRegion r(pa);
326 p->setClipRegion(r);
327 }
328 }
329
330 QBrush fill;
331 if (button->isDown() || button->isOn())
332 fill = button->colorGroup().brush(QColorGroup::Mid);
333 else
334 fill = button->colorGroup().brush(QColorGroup::Button);
335
336 if ( !button->isFlat() || button->isOn() || button->isDown() )
337 drawButton(p, x1, y1, x2 - x1 + 1, y2 - y1 + 1,
338 button->colorGroup(), button->isOn() || button->isDown(), &fill);
339}
340
341
342void LightStyle::drawButton(QPainter *p, int x, int y, int w, int h,
343 const QColorGroup &g,
344 bool sunken, const QBrush *fill)
345{
346 p->save();
347 if ( fill )
348 p->fillRect(x + 2, y + 2, w - 4, h - 4, *fill);
349 else
350 p->fillRect(x + 2, y + 2, w - 4, h - 4,
351 QBrush(sunken ? g.mid() : g.button()));
352
353 // frame
354 p->setPen(g.dark());
355 p->drawLine(x, y + 2, x, y + h - 3); // left
356 p->drawLine(x + 2, y, x + w - 3, y); // top
357 p->drawLine(x + w - 1, y + 2, x + w - 1, y + h - 3); // right
358 p->drawLine(x + 2, y + h - 1, x + w - 3, y + h - 1); // bottom
359 p->drawPoint(x + 1, y + 1);
360 p->drawPoint(x + 1, y + h - 2);
361 p->drawPoint(x + w - 2, y + 1);
362 p->drawPoint(x + w - 2, y + h - 2);
363
364 // bevel
365 if (sunken)
366 p->setPen(g.mid());
367 else
368 p->setPen(g.light());
369
370 p->drawLine(x + 1, y + 2, x + 1, y + h - 3); // left
371 p->drawLine(x + 2, y + 1, x + w - 3, y + 1); // top
372
373 if (sunken)
374 p->setPen(g.light());
375 else
376 p->setPen(g.mid());
377
378 p->drawLine(x + w - 2, y + 2, x + w - 2, y + h - 3); // right + 1
379 p->drawLine(x + 2, y + h - 2, x + w - 3, y + h - 2); // bottom + 1
380
381 p->restore();
382}
383
384
385void LightStyle::drawBevelButton(QPainter *p, int x, int y, int w, int h,
386 const QColorGroup &g,
387 bool sunken, const QBrush *fill)
388{
389 drawButton(p, x, y, w, h, g, sunken, fill);
390}
391
392
393void LightStyle::getButtonShift(int &x, int &y) const
394{
395 x = y = 0;
396}
397
398
399void LightStyle::drawComboButton(QPainter *p, int x, int y, int w, int h,
400 const QColorGroup &g, bool,
401 bool editable, bool,
402 const QBrush *fill)
403{
404 drawButton(p, x, y, w, h, g, FALSE, fill);
405
406 if (editable) {
407 QRect r = comboButtonRect(x, y, w, h);
408 qDrawShadePanel(p, r.x() - 1, r.y() - 1,
409 r.width() + defaultFrameWidth(),
410 r.height() + defaultFrameWidth(),
411 g, TRUE);
412 }
413
414 int indent = ((y + h) / 2) - 3;
415 int xpos = x;
416
417#if QT_VERSION >= 300
418 if( QApplication::reverseLayout() )
419 xpos += indent;
420 else
421#endif
422 xpos += w - indent - 5;
423
424 drawArrow(p, Qt::DownArrow, TRUE, xpos, indent, 5, 5, g, TRUE, fill);
425}
426
427
428QRect LightStyle::comboButtonRect( int x, int y, int w, int h ) const
429{
430 QRect r(x + 3, y + 3, w - 6, h - 6);
431 int indent = ((y + h) / 2) - 3;
432 r.setRight(r.right() - indent - 10);
433
434#if QT_VERSION >= 300
435 if( QApplication::reverseLayout() )
436 r.moveBy( indent + 10, 0 );
437#endif
438
439 return r;
440}
441
442
443QRect LightStyle::comboButtonFocusRect(int x, int y, int w, int h ) const
444{
445 return comboButtonRect(x, y, w, h);
446}
447
448
449void LightStyle::drawPanel(QPainter *p, int x, int y, int w, int h,
450 const QColorGroup &g, bool sunken,
451 int lw, const QBrush *fill)
452{
453 if (lw >= 2) {
454 if ( fill )
455 p->fillRect(x + 2, y + 2, w - 4, h - 4, *fill);
456
457 QPen oldpen = p->pen();
458
459 // frame
460 p->setPen(g.dark());
461 p->drawLine(x, y + 2, x, y + h - 3); // left
462 p->drawLine(x + 2, y, x + w - 3, y); // top
463 p->drawLine(x + w - 1, y + 2, x + w - 1, y + h - 3); // right
464 p->drawLine(x + 2, y + h - 1, x + w - 3, y + h - 1); // bottom
465 p->drawPoint(x + 1, y + 1);
466 p->drawPoint(x + 1, y + h - 2);
467 p->drawPoint(x + w - 2, y + 1);
468 p->drawPoint(x + w - 2, y + h - 2);
469
470 // bevel
471 if (sunken)
472 p->setPen(g.mid());
473 else
474 p->setPen(g.light());
475
476 p->drawLine(x + 1, y + 2, x + 1, y + h - 3); // left
477 p->drawLine(x + 2, y + 1, x + w - 3, y + 1); // top
478
479 if (sunken)
480 p->setPen(g.light());
481 else
482 p->setPen(g.mid());
483
484 p->drawLine(x + w - 2, y + 2, x + w - 2, y + h - 3); // right + 1
485 p->drawLine(x + 2, y + h - 2, x + w - 3, y + h - 2); // bottom + 1
486
487 // corners
488 p->setPen(g.background());
489 p->drawLine(x, y, x + 1, y);
490 p->drawLine(x, y + h - 1, x + 1, y + h - 1);
491 p->drawLine(x + w - 2, y, x + w - 1, y);
492 p->drawLine(x + w - 2, y + h - 1, x + w - 1, y + h - 1);
493 p->drawPoint(x, y + 1);
494 p->drawPoint(x, y + h - 2);
495 p->drawPoint(x + w - 1, y + 1);
496 p->drawPoint(x + w - 1, y + h - 2);
497
498 p->setPen(oldpen);
499 } else
500 qDrawShadePanel(p, x, y, w, h, g, sunken, lw, fill);
501}
502
503
504void LightStyle::drawIndicator(QPainter *p, int x, int y ,int w, int h,
505 const QColorGroup &g, int state,
506 bool down, bool)
507{
508 drawButton(p, x, y, w, h, g, TRUE,
509 &g.brush(down ? QColorGroup::Mid : QColorGroup::Base));
510
511 p->save();
512
513 p->setPen(g.foreground());
514 if (state == QButton::NoChange) {
515 p->drawLine(x + 3, y + h / 2, x + w - 4, y + h / 2);
516 p->drawLine(x + 3, y + 1 + h / 2, x + w - 4, y + 1 + h / 2);
517 p->drawLine(x + 3, y - 1 + h / 2, x + w - 4, y - 1 + h / 2);
518 } else if (state == QButton::On) {
519 p->drawLine(x + 4, y + 3, x + w - 4, y + h - 5);
520 p->drawLine(x + 3, y + 3, x + w - 4, y + h - 4);
521 p->drawLine(x + 3, y + 4, x + w - 5, y + h - 4);
522 p->drawLine(x + 3, y + h - 5, x + w - 5, y + 3);
523 p->drawLine(x + 3, y + h - 4, x + w - 4, y + 3);
524 p->drawLine(x + 4, y + h - 4, x + w - 4, y + 4);
525 }
526
527 p->restore();
528}
529
530
531void LightStyle::drawExclusiveIndicator(QPainter *p, int x, int y, int w, int h,
532 const QColorGroup &g, bool on,
533 bool down, bool)
534{
535 p->save();
536
537 p->fillRect(x, y, w, h, g.brush(QColorGroup::Background));
538
539 p->setPen(g.dark());
540 p->drawArc(x, y, w, h, 0, 16*360);
541 p->setPen(g.mid());
542 p->drawArc(x + 1, y + 1, w - 2, h - 2, 45*16, 180*16);
543 p->setPen(g.light());
544 p->drawArc(x + 1, y + 1, w - 2, h - 2, 235*16, 180*16);
545
546 p->setPen(down ? g.mid() : g.base());
547 p->setBrush(down ? g.mid() : g.base());
548 p->drawEllipse(x + 2, y + 2, w - 4, h - 4);
549
550 if (on) {
551 p->setBrush(g.foreground());
552 p->drawEllipse(x + 3, y + 3, w - x - 6, h - y - 6);
553 }
554
555 p->restore();
556}
557
558
559
560#if 1
561//copied from QPE style
562void LightStyle::drawTab( QPainter *p, const QTabBar *tb, QTab *t, bool selected )
563{
564#if 0
565 //We can't do this, because QTabBar::focusInEvent redraws the
566 // tab label with the default font.
567 QFont f = tb->font();
568 f.setBold( selected );
569 p->setFont( f );
570#endif
571 QRect r( t->rect() );
572 if ( tb->shape() == QTabBar::RoundedAbove ) {
573 p->setPen( tb->colorGroup().light() );
574 p->drawLine( r.left(), r.bottom(), r.right(), r.bottom() );
575 if ( r.left() == 0 )
576 p->drawPoint( tb->rect().bottomLeft() );
577 else {
578 p->setPen( tb->colorGroup().light() );
579 p->drawLine( r.left(), r.bottom(), r.right(), r.bottom() );
580 }
581
582 if ( selected ) {
583 p->setPen( tb->colorGroup().background() );
584 p->drawLine( r.left()+2, r.top()+1, r.right()-2, r.top()+1 );
585 p->fillRect( QRect( r.left()+1, r.top()+2, r.width()-2, r.height()-2),
586 tb->colorGroup().brush( QColorGroup::Background ));
587
588 } else {
589 r.setRect( r.left() + 2, r.top() + 2,
590 r.width() - 4, r.height() - 2 );
591 p->setPen( tb->colorGroup().button() );
592 p->drawLine( r.left()+2, r.top()+1, r.right()-2, r.top()+1 );
593 p->fillRect( QRect( r.left()+1, r.top()+2, r.width()-2, r.height()-3),
594 tb->colorGroup().brush( QColorGroup::Button ));
595 //do shading; will not work for pixmap brushes
596 QColor bg = tb->colorGroup().button();
597 // int h,s,v;
598 // bg.hsv( &h, &s, &v );
599 int n = r.height()/2;
600 int dark = 100;
601 for ( int i = 1; i < n; i++ ) {
602 dark = (dark * (100+(i*15)/n) )/100;
603 p->setPen( bg.dark( dark ) );
604 int y = r.bottom()-n+i;
605 int x1 = r.left()+1;
606 int x2 = r.right()-1;
607 p->drawLine( x1, y, x2, y );
608 }
609
610 }
611
612 p->setPen( tb->colorGroup().light() );
613 p->drawLine( r.left(), r.bottom()-1, r.left(), r.top() + 2 );
614 p->drawPoint( r.left()+1, r.top() + 1 );
615 p->drawLine( r.left()+2, r.top(),
616 r.right() - 2, r.top() );
617
618 p->setPen( tb->colorGroup().dark() );
619 p->drawPoint( r.right() - 1, r.top() + 1 );
620 p->drawLine( r.right(), r.top() + 2, r.right(), r.bottom() - 1);
621 } else if ( tb->shape() == QTabBar::RoundedBelow ) {
622 if ( selected ) {
623 p->setPen( tb->colorGroup().background() );
624 p->drawLine( r.left()+2, r.bottom()-1, r.right()-2, r.bottom()-1 );
625 p->fillRect( QRect( r.left()+1, r.top(), r.width()-2, r.height()-2),
626 tb->palette().normal().brush( QColorGroup::Background ));
627 } else {
628 p->setPen( tb->colorGroup().dark() );
629 p->drawLine( r.left(), r.top(),
630 r.right(), r.top() );
631 r.setRect( r.left() + 2, r.top(),
632 r.width() - 4, r.height() - 2 );
633 p->setPen( tb->colorGroup().button() );
634 p->drawLine( r.left()+2, r.bottom()-1, r.right()-2, r.bottom()-1 );
635 p->fillRect( QRect( r.left()+1, r.top()+1, r.width()-2, r.height()-3),
636 tb->palette().normal().brush( QColorGroup::Button ));
637 }
638
639 p->setPen( tb->colorGroup().dark() );
640 p->drawLine( r.right(), r.top(),
641 r.right(), r.bottom() - 2 );
642 p->drawPoint( r.right() - 1, r.bottom() - 1 );
643 p->drawLine( r.right() - 2, r.bottom(),
644 r.left() + 2, r.bottom() );
645
646 p->setPen( tb->colorGroup().light() );
647 p->drawLine( r.left(), r.top()+1,
648 r.left(), r.bottom() - 2 );
649 p->drawPoint( r.left() + 1, r.bottom() - 1 );
650 if ( r.left() == 0 )
651 p->drawPoint( tb->rect().topLeft() );
652
653 } else {
654 QCommonStyle::drawTab( p, tb, t, selected );
655 }
656}
657
658#else
659
660void LightStyle::drawTab(QPainter *p, const QTabBar *tabbar, QTab *tab,
661 bool selected)
662{
663 p->save();
664
665 QColorGroup g = tabbar->colorGroup();
666 QRect fr(tab->r);
667 fr.setLeft(fr.left() + 2);
668
669 if (! selected) {
670 if (tabbar->shape() == QTabBar::RoundedAbove ||
671 tabbar->shape() == QTabBar::TriangularAbove) {
672
673 fr.setTop(fr.top() + 2);
674 } else {
675 fr.setBottom(fr.bottom() - 2);
676 }
677 }
678
679 QRegion tabr(tab->r);
680
681 QPointArray cliptri(4);
682 cliptri.setPoint(0, fr.left(), fr.top());
683 cliptri.setPoint(1, fr.left(), fr.top() + 5);
684 cliptri.setPoint(2, fr.left() + 5, fr.top());
685 cliptri.setPoint(3, fr.left(), fr.top());
686 QRegion trir(cliptri);
687 p->setClipRegion(tabr - trir);
688
689 p->setPen( NoPen );
690 p->setBrush(g.brush(selected ? QColorGroup::Background : QColorGroup::Mid));
691
692 fr.setWidth(fr.width() - 1);
693 p->drawRect(fr.left() + 1, fr.top() + 1, fr.width() - 2, fr.height() - 2);
694
695 if (tabbar->shape() == QTabBar::RoundedAbove) {
696 // "rounded" tabs on top
697 fr.setBottom(fr.bottom() - 1);
698
699 p->setPen(g.dark());
700 p->drawLine(fr.left(), fr.top() + 5, fr.left(), fr.bottom() - 1);
701 p->drawLine(fr.left(), fr.top() + 5, fr.left() + 5, fr.top());
702 p->drawLine(fr.left() + 5, fr.top(), fr.right() - 1, fr.top());
703 p->drawLine(fr.right(), fr.top() + 1, fr.right(), fr.bottom() - 1);
704
705 if (selected) {
706 p->drawLine(fr.right(), fr.bottom(), fr.right() + 2, fr.bottom());
707 p->drawPoint(fr.left(), fr.bottom());
708 } else
709 p->drawLine(fr.left(), fr.bottom(), fr.right() + 2, fr.bottom());
710
711 if (fr.left() == 2) {
712 p->drawPoint(fr.left() - 1, fr.bottom() + 1);
713 p->drawPoint(fr.left() - 2, fr.bottom() + 2);
714 }
715
716 if (selected) {
717 p->setPen(g.mid());
718 p->drawLine(fr.right() - 1, fr.top() + 1, fr.right() - 1, fr.bottom() - 2);
719 }
720
721 p->setPen(g.light()); p->setPen(red);
722 p->drawLine(fr.left() + 1, fr.top() + 6, fr.left() + 1,
723 fr.bottom() - (selected ? 0 : 1));
724 p->drawLine(fr.left() + 1, fr.top() + 5, fr.left() + 5, fr.top() + 1);
725 p->drawLine(fr.left() + 6, fr.top() + 1, fr.right() - 3, fr.top() + 1);
726 if (selected) {
727 p->drawLine(fr.right() + 1, fr.bottom() + 1,
728 fr.right() + 2, fr.bottom() + 1);
729 p->drawLine(fr.left(), fr.bottom() + 1, fr.left() + 1, fr.bottom() + 1);
730 } else
731 p->drawLine(fr.left(), fr.bottom() + 1,
732 fr.right() + 2, fr.bottom() + 1);
733 } else if (tabbar->shape() == QTabBar::RoundedBelow) {
734 // "rounded" tabs on bottom
735 fr.setTop(fr.top() + 1);
736
737 p->setPen(g.dark());
738 p->drawLine(fr.left(), fr.top(), fr.left(), fr.bottom() - 1);
739 p->drawLine(fr.left() + 1, fr.bottom(), fr.right() - 1, fr.bottom());
740 p->drawLine(fr.right(), fr.top(), fr.right(), fr.bottom() - 1);
741
742 if (! selected)
743 p->drawLine(fr.left(), fr.top(), fr.right() + 3, fr.top());
744 else
745 p->drawLine(fr.right(), fr.top(), fr.right() + 3, fr.top());
746
747 p->setPen(g.mid());
748 if (selected)
749 p->drawLine(fr.right() - 1, fr.top() + 1, fr.right() - 1, fr.bottom() - 1);
750 else
751 p->drawLine(fr.left(), fr.top() - 1, fr.right() + 3, fr.top() - 1);
752
753 p->setPen(g.light());
754 p->drawLine(fr.left() + 1, fr.top() + (selected ? -1 : 2),
755 fr.left() + 1, fr.bottom() - 1);
756
757 } else {
758 // triangular drawing code
759 QCommonStyle::drawTab(p, tabbar, tab, selected);
760 }
761
762 p->restore();
763}
764#endif
765
766void LightStyle::drawSlider(QPainter *p, int x, int y, int w, int h,
767 const QColorGroup &g, Qt::Orientation orientation,
768 bool above, bool below)
769{
770 drawButton(p, x, y, w, h, g, FALSE, &g.brush(QColorGroup::Button));
771
772 if (orientation == Horizontal) {
773 if (above && below) {
774 drawArrow(p, Qt::UpArrow, FALSE, x + 1, y + 1, w, h / 2, g, TRUE);
775 drawArrow(p, Qt::DownArrow, FALSE, x + 1, y + (h / 2) - 1,
776 w, h / 2, g, TRUE);
777 } else
778 drawArrow(p, (above) ? Qt::UpArrow : Qt::DownArrow,
779 FALSE, x + 1, y, w, h, g, TRUE);
780 } else {
781 if (above && below) {
782 drawArrow(p, Qt::LeftArrow, FALSE, x + 1, y, w / 2, h, g, TRUE);
783 drawArrow(p, Qt::RightArrow, FALSE, x + (w / 2) - 2, y, w / 2, h, g, TRUE);
784 } else
785 drawArrow(p, (above) ? Qt::LeftArrow : Qt::RightArrow,
786 FALSE, x, y, w, h, g, TRUE);
787 }
788}
789
790
791void LightStyle::drawSliderGroove(QPainter *p, int x, int y, int w, int h,
792 const QColorGroup& g, QCOORD c,
793 Qt::Orientation orientation)
794{
795 if (orientation == Horizontal)
796 drawButton(p, x, y+c - 3, w, 6, g, TRUE, &g.brush(QColorGroup::Mid));
797 else
798 drawButton(p, x+c - 3, y, 6, h, g, TRUE, &g.brush(QColorGroup::Mid));
799}
800
801
802void LightStyle::scrollBarMetrics(const QScrollBar *scrollbar,
803 int &sliderMin, int &sliderMax,
804 int &sliderLength, int &buttonDim) const
805{
806 int maxLength;
807 int length = ((scrollbar->orientation() == Horizontal) ?
808 scrollbar->width() : scrollbar->height());
809 int extent = ((scrollbar->orientation() == Horizontal) ?
810 scrollbar->height() : scrollbar->width());
811 extent--;
812
813 if (length > (extent + defaultFrameWidth() - 1) * 2 + defaultFrameWidth())
814 buttonDim = extent - defaultFrameWidth();
815 else
816 buttonDim = (length - defaultFrameWidth()) / 2 - 1;
817
818 sliderMin = buttonDim;
819 maxLength = length - buttonDim * 3;
820
821 if (scrollbar->maxValue() != scrollbar->minValue()) {
822 uint range = scrollbar->maxValue() - scrollbar->minValue();
823 sliderLength = (scrollbar->pageStep() * maxLength) /
824 (range + scrollbar->pageStep());
825
826 if (sliderLength < buttonDim || range > INT_MAX / 2)
827 sliderLength = buttonDim;
828 if (sliderLength > maxLength)
829 sliderLength = maxLength;
830 } else
831 sliderLength = maxLength;
832
833 sliderMax = sliderMin + maxLength - sliderLength;
834}
835
836
837QStyle::ScrollControl LightStyle::scrollBarPointOver(const QScrollBar *scrollbar,
838 int sliderStart, const QPoint &p)
839{
840 if (! scrollbar->rect().contains(p))
841 return NoScroll;
842
843 int sliderMin, sliderMax, sliderLength, buttonDim, pos;
844 scrollBarMetrics( scrollbar, sliderMin, sliderMax, sliderLength, buttonDim );
845
846 if (scrollbar->orientation() == Horizontal)
847 pos = p.x();
848 else
849 pos = p.y();
850
851 if (pos < buttonDim)
852 return SubLine;
853 if (pos < sliderStart)
854 return SubPage;
855 if (pos < sliderStart + sliderLength)
856 return Slider;
857 if (pos < sliderMax + sliderLength)
858 return AddPage;
859 if (pos < sliderMax + sliderLength + buttonDim)
860 return SubLine;
861 return AddLine;
862}
863
864
865
866void LightStyle::drawScrollBarControls( QPainter* p, const QScrollBar* scrollbar,
867 int sliderStart, uint controls,
868 uint activeControl )
869{
870 QColorGroup g = scrollbar->colorGroup();
871
872 int sliderMin, sliderMax, sliderLength, buttonDim;
873 scrollBarMetrics( scrollbar, sliderMin, sliderMax, sliderLength, buttonDim );
874
875 if (sliderStart > sliderMax) { // sanity check
876 sliderStart = sliderMax;
877 }
878
879 QRect addR, subR, subR2, addPageR, subPageR, sliderR;
880 int length = ((scrollbar->orientation() == Horizontal) ?
881 scrollbar->width() : scrollbar->height());
882 int extent = ((scrollbar->orientation() == Horizontal) ?
883 scrollbar->height() : scrollbar->width());
884
885
886 int fudge = 3; //####disgusting hack
887
888 if (scrollbar->orientation() == Horizontal) {
889 subR.setRect(0, defaultFrameWidth(),
890 buttonDim + fudge, buttonDim);
891 subR2.setRect(length - (buttonDim * 2), defaultFrameWidth() ,
892 buttonDim, buttonDim);
893 addR.setRect(length - buttonDim, defaultFrameWidth(),
894 buttonDim, buttonDim);
895 } else {
896 subR.setRect(defaultFrameWidth() + 1, 0,
897 buttonDim, buttonDim + fudge);
898 subR2.setRect(defaultFrameWidth() + 1, length - (buttonDim * 2),
899 buttonDim, buttonDim);
900 addR.setRect(defaultFrameWidth() + 1, length - buttonDim,
901 buttonDim, buttonDim);
902 }
903
904 int sliderEnd = sliderStart + sliderLength;
905 int sliderW = extent - defaultFrameWidth() - 1;
906 if (scrollbar->orientation() == Horizontal) {
907 subPageR.setRect( subR.right() + 1, defaultFrameWidth(),
908 sliderStart - subR.right() - 1 , sliderW );
909 addPageR.setRect( sliderEnd, defaultFrameWidth(),
910 subR2.left() - sliderEnd, sliderW );
911 sliderR.setRect( sliderStart, defaultFrameWidth(), sliderLength, sliderW );
912 } else {
913 subPageR.setRect( defaultFrameWidth(), subR.bottom() + 1,
914 sliderW, sliderStart - subR.bottom() - 1 );
915 addPageR.setRect( defaultFrameWidth(), sliderEnd,
916 sliderW, subR2.top() - sliderEnd );
917 sliderR .setRect( defaultFrameWidth(), sliderStart,
918 sliderW, sliderLength );
919 }
920
921 if ( controls == ( AddLine | SubLine | AddPage | SubPage |
922 Slider | First | Last ) ) {
923 if (scrollbar->orientation() == Horizontal)
924 qDrawShadePanel(p, 0, 0, length, 2, g, TRUE, 1,
925 &g.brush(QColorGroup::Background));
926 else
927 qDrawShadePanel(p, 0, 0, 2, length, g, TRUE, 1,
928 &g.brush(QColorGroup::Background));
929 }
930
931 if ( controls & AddLine )
932 drawArrow( p, (scrollbar->orientation() == Vertical) ? DownArrow : RightArrow,
933 FALSE, addR.x(), addR.y(),
934 addR.width(), addR.height(),
935 (( activeControl == AddLine ) ?
936 singleton->hoverPalette.active() : g),
937 TRUE, &g.brush(QColorGroup::Background));
938 if ( controls & SubLine ) {
939 drawArrow( p, (scrollbar->orientation() == Vertical) ? UpArrow : LeftArrow,
940 FALSE, subR.x(), subR.y(),
941 subR.width(), subR.height(),
942 (( activeControl == SubLine ) ?
943 singleton->hoverPalette.active() : g),
944 TRUE, &g.brush(QColorGroup::Background));
945 drawArrow( p, (scrollbar->orientation() == Vertical) ? UpArrow : LeftArrow,
946 FALSE, subR2.x(), subR2.y(),
947 subR2.width(), subR2.height(),
948 (( activeControl == SubLine ) ?
949 singleton->hoverPalette.active() : g),
950 TRUE, &g.brush(QColorGroup::Background));
951 }
952
953 if ( controls & SubPage )
954 p->fillRect( subPageR,
955 ((activeControl == SubPage) ?
956 g.brush( QColorGroup::Dark ) :
957 g.brush( QColorGroup::Mid )));
958 if ( controls & AddPage )
959 p->fillRect( addPageR,
960 ((activeControl == AddPage) ?
961 g.brush( QColorGroup::Dark ) :
962 g.brush( QColorGroup::Mid )));
963
964 if ( controls & Slider ) {
965
966 QPoint bo = p->brushOrigin();
967 p->setBrushOrigin(sliderR.topLeft());
968 if ( sliderR.isValid() ) {
969 p->fillRect( sliderR.x(), sliderR.y(), 2, 2,
970 g.brush( QColorGroup::Mid ));
971 p->fillRect( sliderR.x() + sliderR.width() - 2,
972 sliderR.y(), 2, 2,
973 g.brush( QColorGroup::Mid ));
974 p->fillRect( sliderR.x() + sliderR.width() - 2,
975 sliderR.y() + sliderR.height() - 2, 2, 2,
976 g.brush( QColorGroup::Mid ));
977 p->fillRect( sliderR.x(),
978 sliderR.y() + sliderR.height() - 2, 2, 2,
979 g.brush( QColorGroup::Mid ));
980
981 QColorGroup cg( g );
982 cg.setBrush( QColorGroup::Background, g.brush( QColorGroup::Mid ) );
983 drawBevelButton( p, sliderR.x(), sliderR.y(),
984 sliderR.width(), sliderR.height(),
985 cg, FALSE, &g.brush( QColorGroup::Button ) );
986 }
987
988 p->setBrushOrigin(bo);
989 }
990}
991
992
993void LightStyle::drawToolBarHandle(QPainter *p, const QRect &rect,
994 Qt::Orientation orientation,
995 bool, const QColorGroup &g, bool)
996{
997 p->save();
998 p->setPen(g.mid());
999 p->setBrush(g.brush(QColorGroup::Mid));
1000
1001 if (orientation == Qt::Horizontal) {
1002 QRect l, r;
1003 l.setRect(rect.x() + 1, rect.y() + 1, rect.width() - 5, rect.height() - 2);
1004 r.setRect(l.right() + 1, l.y(), 3, l.height());
1005
1006 p->drawRect(l);
1007 qDrawShadePanel(p, r, g, FALSE);
1008 } else {
1009 QRect t, b;
1010 t.setRect(rect.x() + 1, rect.y() + 1, rect.width() - 2, rect.height() - 5);
1011 b.setRect(t.x(), t.bottom() + 1, t.width(), 3);
1012
1013 p->drawRect(t);
1014 qDrawShadePanel(p, b, g, FALSE);
1015 }
1016
1017 p->restore();
1018}
1019
1020
1021bool LightStyle::eventFilter(QObject *object, QEvent *event)
1022{
1023 switch(event->type()) {
1024 case QEvent::Enter:
1025 {
1026 if (! object->isWidgetType() ||
1027 ! object->inherits("QPushButton"))
1028 break;
1029
1030 singleton->hoverWidget = (QWidget *) object;
1031 if (! singleton->hoverWidget->isEnabled()) {
1032 singleton->hoverWidget = 0;
1033 break;
1034 }
1035
1036 QPalette pal = singleton->hoverWidget->palette();
1037 if (singleton->hoverWidget->ownPalette())
1038 singleton->savePalette = new QPalette(pal);
1039
1040 singleton->hoverWidget->setPalette(singleton->hoverPalette);
1041
1042 break;
1043 }
1044
1045 case QEvent::Leave:
1046 {
1047 if (object != singleton->hoverWidget)
1048 break;
1049
1050 if (singleton->savePalette) {
1051 singleton->hoverWidget->setPalette(*(singleton->savePalette));
1052 delete singleton->savePalette;
1053 singleton->savePalette = 0;
1054 } else
1055 singleton->hoverWidget->unsetPalette();
1056
1057 singleton->hoverWidget = 0;
1058
1059 break;
1060 }
1061
1062 default:
1063 {
1064 ;
1065 }
1066 }
1067
1068 return QWindowsStyle::eventFilter(object, event);
1069}
1070
1071
1072 static const int motifItemFrame = 1;// menu item frame width
1073 static const int motifSepHeight = 2;// separator item height
1074 static const int motifItemHMargin = 1;// menu item hor text margin
1075 static const int motifItemVMargin = 2;// menu item ver text margin
1076 static const int motifArrowHMargin = 0;// arrow horizontal margin
1077 static const int motifTabSpacing = 12;// space between text and tab
1078 static const int motifCheckMarkHMargin = 1;// horiz. margins of check mark
1079 static const int windowsRightBorder= 8; // right border on windows
1080static const int windowsCheckMarkWidth = 2; // checkmarks width on windows
1081
1082/*! \reimp
1083*/
1084int LightStyle::extraPopupMenuItemWidth( bool checkable, int maxpmw, QMenuItem* mi, const QFontMetrics& /*fm*/ )
1085{
1086#ifndef QT_NO_MENUDATA
1087 int w = 2*motifItemHMargin + 2*motifItemFrame; // a little bit of border can never harm
1088
1089 if ( mi->isSeparator() )
1090 return 10; // arbitrary
1091 else if ( mi->pixmap() )
1092 w += mi->pixmap()->width();// pixmap only
1093
1094 if ( !mi->text().isNull() ) {
1095 if ( mi->text().find('\t') >= 0 )// string contains tab
1096 w += motifTabSpacing;
1097 }
1098
1099 if ( maxpmw ) { // we have iconsets
1100 w += maxpmw;
1101 w += 6; // add a little extra border around the iconset
1102 }
1103
1104 if ( checkable && maxpmw < windowsCheckMarkWidth ) {
1105 w += windowsCheckMarkWidth - maxpmw; // space for the checkmarks
1106 }
1107
1108 if ( maxpmw > 0 || checkable ) // we have a check-column ( iconsets or checkmarks)
1109 w += motifCheckMarkHMargin; // add space to separate the columns
1110
1111 w += windowsRightBorder; // windows has a strange wide border on the right side
1112
1113 return w;
1114#endif
1115}
1116
1117/*! \reimp
1118*/
1119int LightStyle::popupMenuItemHeight( bool /*checkable*/, QMenuItem* mi, const QFontMetrics& fm )
1120{
1121#ifndef QT_NO_MENUDATA
1122 int h = 0;
1123 if ( mi->isSeparator() ) // separator height
1124 h = motifSepHeight;
1125 else if ( mi->pixmap() ) // pixmap height
1126 h = mi->pixmap()->height() + 2*motifItemFrame;
1127 else // text height
1128 h = fm.height() + 2*motifItemVMargin + 2*motifItemFrame;
1129
1130 if ( !mi->isSeparator() && mi->iconSet() != 0 ) {
1131 h = QMAX( h, mi->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).height() + 2*motifItemFrame );
1132 }
1133 if ( mi->custom() )
1134 h = QMAX( h, mi->custom()->sizeHint().height() + 2*motifItemVMargin + 2*motifItemFrame ) - 1;
1135 return h;
1136#endif
1137}
1138
1139void LightStyle::drawPopupMenuItem( QPainter* p, bool checkable, int maxpmw, int tab, QMenuItem* mi,
1140 const QPalette& pal,
1141 bool act, bool enabled, int x, int y, int w, int h)
1142{
1143#ifndef QT_NO_MENUDATA
1144 const QColorGroup & g = pal.active();
1145 bool dis = !enabled;
1146 QColorGroup itemg = dis ? pal.disabled() : pal.active();
1147
1148 if ( checkable )
1149 maxpmw = QMAX( maxpmw, 8 ); // space for the checkmarks
1150
1151 int checkcol = maxpmw;
1152
1153 if ( mi && mi->isSeparator() ) { // draw separator
1154 p->setPen( g.dark() );
1155 p->drawLine( x, y, x+w, y );
1156 p->setPen( g.light() );
1157 p->drawLine( x, y+1, x+w, y+1 );
1158 return;
1159 }
1160
1161 QBrush fill = act? g.brush( QColorGroup::Highlight ) :
1162 g.brush( QColorGroup::Button );
1163 p->fillRect( x, y, w, h, fill);
1164
1165 if ( !mi )
1166 return;
1167
1168 if ( mi->isChecked() ) {
1169 if ( act && !dis ) {
1170 qDrawShadePanel( p, x, y, checkcol, h,
1171 g, TRUE, 1, &g.brush( QColorGroup::Button ) );
1172 } else {
1173 qDrawShadePanel( p, x, y, checkcol, h,
1174 g, TRUE, 1, &g.brush( QColorGroup::Midlight ) );
1175 }
1176 } else if ( !act ) {
1177 p->fillRect(x, y, checkcol , h,
1178 g.brush( QColorGroup::Button ));
1179 }
1180
1181 if ( mi->iconSet() ) { // draw iconset
1182 QIconSet::Mode mode = dis ? QIconSet::Disabled : QIconSet::Normal;
1183 if (act && !dis )
1184 mode = QIconSet::Active;
1185 QPixmap pixmap = mi->iconSet()->pixmap( QIconSet::Small, mode );
1186 int pixw = pixmap.width();
1187 int pixh = pixmap.height();
1188 if ( act && !dis ) {
1189 if ( !mi->isChecked() )
1190 qDrawShadePanel( p, x, y, checkcol, h, g, FALSE, 1, &g.brush( QColorGroup::Button ) );
1191 }
1192 QRect cr( x, y, checkcol, h );
1193 QRect pmr( 0, 0, pixw, pixh );
1194 pmr.moveCenter( cr.center() );
1195 p->setPen( itemg.text() );
1196 p->drawPixmap( pmr.topLeft(), pixmap );
1197
1198 QBrush fill = act? g.brush( QColorGroup::Highlight ) :
1199 g.brush( QColorGroup::Button );
1200 p->fillRect( x+checkcol + 1, y, w - checkcol - 1, h, fill);
1201 } else if ( checkable ) {// just "checking"...
1202 int mw = checkcol + motifItemFrame;
1203 int mh = h - 2*motifItemFrame;
1204 if ( mi->isChecked() ) {
1205 drawCheckMark( p, x + motifItemFrame + 2,
1206 y+motifItemFrame, mw, mh, itemg, act, dis );
1207 }
1208 }
1209
1210 p->setPen( act ? g.highlightedText() : g.buttonText() );
1211
1212 QColor discol;
1213 if ( dis ) {
1214 discol = itemg.text();
1215 p->setPen( discol );
1216 }
1217
1218 int xm = motifItemFrame + checkcol + motifItemHMargin;
1219
1220 if ( mi->custom() ) {
1221 int m = motifItemVMargin;
1222 p->save();
1223 if ( dis && !act ) {
1224 p->setPen( g.light() );
1225 mi->custom()->paint( p, itemg, act, enabled,
1226 x+xm+1, y+m+1, w-xm-tab+1, h-2*m );
1227 p->setPen( discol );
1228 }
1229 mi->custom()->paint( p, itemg, act, enabled,
1230 x+xm, y+m, w-xm-tab+1, h-2*m );
1231 p->restore();
1232 }
1233 QString s = mi->text();
1234 if ( !s.isNull() ) { // draw text
1235 int t = s.find( '\t' );
1236 int m = motifItemVMargin;
1237 const int text_flags = AlignVCenter|ShowPrefix | DontClip | SingleLine;
1238 if ( t >= 0 ) { // draw tab text
1239 if ( dis && !act ) {
1240 p->setPen( g.light() );
1241 p->drawText( x+w-tab-windowsRightBorder-motifItemHMargin-motifItemFrame+1,
1242 y+m+1, tab, h-2*m, text_flags, s.mid( t+1 ));
1243 p->setPen( discol );
1244 }
1245 p->drawText( x+w-tab-windowsRightBorder-motifItemHMargin-motifItemFrame,
1246 y+m, tab, h-2*m, text_flags, s.mid( t+1 ) );
1247 }
1248 if ( dis && !act ) {
1249 p->setPen( g.light() );
1250 p->drawText( x+xm+1, y+m+1, w-xm+1, h-2*m, text_flags, s, t );
1251 p->setPen( discol );
1252 }
1253 p->drawText( x+xm, y+m, w-xm-tab+1, h-2*m, text_flags, s, t );
1254 } else if ( mi->pixmap() ) { // draw pixmap
1255 QPixmap *pixmap = mi->pixmap();
1256 if ( pixmap->depth() == 1 )
1257 p->setBackgroundMode( OpaqueMode );
1258 p->drawPixmap( x+xm, y+motifItemFrame, *pixmap );
1259 if ( pixmap->depth() == 1 )
1260 p->setBackgroundMode( TransparentMode );
1261 }
1262 if ( mi->popup() ) { // draw sub menu arrow
1263 int dim = (h-2*motifItemFrame) / 2;
1264 if ( act ) {
1265 if ( !dis )
1266 discol = white;
1267 QColorGroup g2( discol, g.highlight(),
1268 white, white,
1269 dis ? discol : white,
1270 discol, white );
1271 drawArrow( p, RightArrow, FALSE,
1272 x+w - motifArrowHMargin - motifItemFrame - dim, y+h/2-dim/2,
1273 dim, dim, g2, TRUE );
1274 } else {
1275 drawArrow( p, RightArrow,
1276 FALSE,
1277 x+w - motifArrowHMargin - motifItemFrame - dim, y+h/2-dim/2,
1278 dim, dim, g, mi->isEnabled() );
1279 }
1280 }
1281#endif
1282}
1283
1284#endif
diff --git a/library/lightstyle.h b/library/lightstyle.h
new file mode 100644
index 0000000..c377cc2
--- a/dev/null
+++ b/library/lightstyle.h
@@ -0,0 +1,120 @@
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#ifndef LIGHTSTYLE_H
21#define LIGHTSTYLE_H
22
23
24#ifndef QT_H
25#include <qstyle.h>
26#include <qwindowsstyle.h>
27#endif // QT_H
28
29#if QT_VERSION < 300
30
31#ifdef QT_PLUGIN_STYLE_LIGHT
32# define Q_EXPORT_STYLE_LIGHT
33#else
34# define Q_EXPORT_STYLE_LIGHT Q_EXPORT
35#endif // QT_PLUGIN_STYLE_LIGHT
36
37
38class Q_EXPORT_STYLE_LIGHT LightStyle : public QWindowsStyle
39{
40public:
41 LightStyle();
42 virtual ~LightStyle();
43
44 void polish(QWidget *widget);
45 void unPolish(QWidget*widget);
46
47 void polish(QApplication *app);
48 void unPolish(QApplication *app);
49
50 void polishPopupMenu(QPopupMenu *menu);
51
52 void drawPushButton(QPushButton *button, QPainter *p);
53 void drawButton(QPainter *p, int x, int y, int w, int h,
54 const QColorGroup &g, bool sunken = FALSE,
55 const QBrush *fill = 0);
56 void drawBevelButton(QPainter *p, int x, int y, int w, int h,
57 const QColorGroup &g, bool sunken = FALSE,
58 const QBrush *fill = 0);
59 void getButtonShift(int &x, int &y) const;
60
61 void drawComboButton(QPainter *p, int x, int y, int w, int h,
62 const QColorGroup &g, bool sunken = FALSE,
63 bool editable = FALSE, bool = TRUE,
64 const QBrush *fill = 0);
65 QRect comboButtonRect(int x, int y, int w, int h) const;
66 QRect comboButtonFocusRect(int x, int y, int w, int h) const;
67
68 void drawIndicator(QPainter *p, int x, int y ,int w, int h,
69 const QColorGroup &g, int state,
70 bool = FALSE, bool = TRUE);
71 QSize indicatorSize() const;
72
73 void drawExclusiveIndicator(QPainter *p, int x, int y ,int w, int h,
74 const QColorGroup &g, bool on,
75 bool = FALSE, bool = TRUE);
76 QSize exclusiveIndicatorSize() const;
77
78 void drawPanel(QPainter * p, int x, int y, int w, int h,
79 const QColorGroup &g, bool sunken = FALSE,
80 int = 1, const QBrush * = 0);
81
82 void scrollBarMetrics( const QScrollBar *,
83 int &, int &, int &, int & ) const;
84 void drawScrollBarControls(QPainter* p, const QScrollBar* sb,
85 int sliderStart, uint controls,
86 uint activeControl);
87 QStyle::ScrollControl scrollBarPointOver(const QScrollBar *, int, const QPoint& p);
88
89 void drawTab(QPainter *p, const QTabBar *tabbar, QTab *tab, bool selected);
90
91 void drawSlider(QPainter *p, int x, int y, int w, int h,
92 const QColorGroup &g, Qt::Orientation orientation,
93 bool, bool);
94 void drawSliderGroove(QPainter *p, int x, int y, int w, int h,
95 const QColorGroup& g, QCOORD,
96 Qt::Orientation );
97
98 void drawToolBarHandle(QPainter *, const QRect &, Qt::Orientation,
99 bool, const QColorGroup &, bool = FALSE );
100
101 QSize scrollBarExtent() const;
102 int buttonDefaultIndicatorWidth() const;
103 int buttonMargin() const;
104 int sliderThickness() const;
105 int sliderLength() const;
106 int defaultFrameWidth() const;
107
108 int extraPopupMenuItemWidth( bool checkable, int maxpmw, QMenuItem*, const QFontMetrics& );
109 int popupMenuItemHeight( bool checkable, QMenuItem*, const QFontMetrics& );
110 void drawPopupMenuItem( QPainter* p, bool checkable, int maxpmw, int tab, QMenuItem* mi,
111 const QPalette& pal,
112 bool act, bool enabled, int x, int y, int w, int h);
113
114protected:
115 bool eventFilter(QObject *, QEvent *);
116};
117
118#endif
119
120#endif // LIGHTSTYLE_H
diff --git a/library/lnkproperties.cpp b/library/lnkproperties.cpp
new file mode 100644
index 0000000..e278cb2
--- a/dev/null
+++ b/library/lnkproperties.cpp
@@ -0,0 +1,289 @@
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 "lnkproperties.h"
22#include "lnkpropertiesbase_p.h"
23#include "ir.h"
24
25#include <qpe/applnk.h>
26#include <qpe/global.h>
27#include <qpe/categorywidget.h>
28#include <qpe/qcopenvelope_qws.h>
29#include <qpe/filemanager.h>
30#include <qpe/config.h>
31#include <qpe/storage.h>
32#include <qpe/qpemessagebox.h>
33
34#include <qlineedit.h>
35#include <qtoolbutton.h>
36#include <qpushbutton.h>
37#include <qgroupbox.h>
38#include <qcheckbox.h>
39#include <qlabel.h>
40#include <qlayout.h>
41#include <qfile.h>
42#include <qfileinfo.h>
43#include <qmessagebox.h>
44#include <qsize.h>
45#include <qcombobox.h>
46#include <qregexp.h>
47
48#include <stdlib.h>
49
50LnkProperties::LnkProperties( AppLnk* l, QWidget* parent )
51 : QDialog( parent, 0, TRUE ), lnk(l), fileSize( 0 )
52{
53 QVBoxLayout *vbox = new QVBoxLayout( this );
54 d = new LnkPropertiesBase( this );
55 vbox->add( d );
56
57 d->docname->setText(l->name());
58 QString inf;
59 if ( l->type().isEmpty() ) {
60 d->type->hide();
61 d->typeLabel->hide();
62 } else {
63 d->type->setText( l->type() );
64 }
65
66 if ( l->comment().isEmpty() ) {
67 d->comment->hide();
68 d->commentLabel->hide();
69 } else {
70 d->comment->setText( l->comment() );
71 }
72
73 connect(d->beam,SIGNAL(clicked()),this,SLOT(beamLnk()));
74 if ( lnk->type().contains('/') ) { // A document? (#### better predicate needed)
75 connect(d->unlink,SIGNAL(clicked()),this,SLOT(unlinkLnk()));
76 connect(d->duplicate,SIGNAL(clicked()),this,SLOT(duplicateLnk()));
77
78 d->docname->setReadOnly( FALSE );
79 d->preload->hide();
80 d->spacer->hide();
81
82 // ### THIS MUST GO, FIX WIERD BUG in QLAYOUT
83 d->categoryEdit->kludge();
84
85 d->categoryEdit->setCategories( lnk->categories(),
86 "Document View",
87 tr("Document View") );
88 setupLocations();
89 } else {
90 d->unlink->hide();
91 d->duplicate->hide();
92 d->beam->hide();
93 d->hline->hide();
94 d->locationLabel->hide();
95 d->locationCombo->hide();
96
97 // Can't edit categories, since the app .desktop files are global,
98 // possibly read-only.
99 d->categoryEdit->hide();
100
101 d->docname->setReadOnly( TRUE );
102
103 if ( l->property("CanFastload") == "0" )
104 d->preload->hide();
105
106 Config cfg("Launcher");
107 cfg.setGroup("Preload");
108 QStringList apps = cfg.readListEntry("Apps",',');
109 d->preload->setChecked( apps.contains(l->exec()) );
110 if ( Global::isBuiltinCommand(lnk->exec()) )
111 d->preload->hide(); // builtins are always fast
112
113 currentLocation = 0; // apps not movable (yet)
114 }
115}
116
117LnkProperties::~LnkProperties()
118{
119}
120
121void LnkProperties::unlinkLnk()
122{
123 if ( QPEMessageBox::confirmDelete( this, tr("Delete"), lnk->name() ) ) {
124 lnk->removeFiles();
125 if ( QFile::exists(lnk->file()) ) {
126 QMessageBox::warning( this, tr("Delete"), tr("File deletion failed.") );
127 } else {
128 reject();
129 }
130 }
131}
132
133void LnkProperties::setupLocations()
134{
135 QFileInfo fi( lnk->file() );
136 fileSize = fi.size();
137 StorageInfo storage;
138 const QList<FileSystem> &fs = storage.fileSystems();
139 QListIterator<FileSystem> it ( fs );
140 QString s;
141 QString homeDir = getenv("HOME");
142 QString hardDiskHome;
143 QString hardDiskPath;
144 int index = 0;
145 currentLocation = -1;
146 for ( ; it.current(); ++it ) {
147 // we add 10k to the file size so we are sure we can also save the desktop file
148 if ( (*it)->availBlocks() * (*it)->blockSize() > fileSize + 10000 ) {
149 if ( (*it)->isRemovable() ||
150 (*it)->disk() == "/dev/mtdblock1" ||
151 (*it)->disk() == "/dev/mtdblock/1" ) {
152 d->locationCombo->insertItem( (*it)->name(), index );
153 locations.append( ((*it)->isRemovable() ? (*it)->path() : homeDir) );
154 if ( lnk->file().contains( (*it)->path() ) ) {
155 d->locationCombo->setCurrentItem( index );
156 currentLocation = index;
157 }
158 index++;
159 } else if ( (*it)->name().contains( "Hard Disk") &&
160 homeDir.contains( (*it)->path() ) &&
161 (*it)->path().length() > hardDiskHome.length() ) {
162 hardDiskHome = (*it)->name();
163 hardDiskPath = (*it)->path();
164 }
165 }
166 }
167 if ( !hardDiskHome.isEmpty() ) {
168 d->locationCombo->insertItem( hardDiskHome );
169 locations.append( hardDiskPath );
170 if ( currentLocation == -1 ) { // assume it's the hard disk
171 d->locationCombo->setCurrentItem( index );
172 currentLocation = index;
173 }
174 }
175}
176
177void LnkProperties::duplicateLnk()
178{
179 // The duplicate takes the new properties.
180 DocLnk newdoc( *((DocLnk *)lnk) );
181 if ( d->docname->text() == lnk->name() )
182 newdoc.setName(tr("Copy of ")+d->docname->text());
183 else
184 newdoc.setName(d->docname->text());
185
186 if ( !copyFile( newdoc ) ) {
187 QMessageBox::warning( this, tr("Duplicate"), tr("File copy failed.") );
188 return;
189 }
190 reject();
191}
192
193bool LnkProperties::moveLnk()
194{
195 DocLnk newdoc( *((DocLnk *)lnk) );
196 newdoc.setName(d->docname->text());
197
198 if ( !copyFile( newdoc ) ) {
199 QMessageBox::warning( this, tr("Details"), tr("Moving Document failed.") );
200 return FALSE;
201 }
202 // remove old lnk
203 lnk->removeFiles();
204
205 return TRUE;
206}
207
208void LnkProperties::beamLnk()
209{
210 Ir ir;
211 DocLnk doc( *((DocLnk *)lnk) );
212 ir.send( doc, doc.comment() );
213}
214
215bool LnkProperties::copyFile( DocLnk &newdoc )
216{
217 const char *linkExtn = ".desktop";
218 QString fileExtn;
219 int extnPos = lnk->file().findRev( '.' );
220 if ( extnPos > 0 )
221 fileExtn = lnk->file().mid( extnPos );
222
223 QString safename = newdoc.name();
224 safename.replace(QRegExp("/"),"_");
225
226 QString fn = locations[ d->locationCombo->currentItem() ]
227 + "/Documents/" + newdoc.type() + "/" + safename;
228 if ( QFile::exists(fn + fileExtn) || QFile::exists(fn + linkExtn) ) {
229 int n=1;
230 QString nn = fn + "_" + QString::number(n);
231 while ( QFile::exists(nn+fileExtn) || QFile::exists(nn+linkExtn) ) {
232 n++;
233 nn = fn + "_" + QString::number(n);
234 }
235 fn = nn;
236 }
237 newdoc.setFile( fn + fileExtn );
238 newdoc.setLinkFile( fn + linkExtn );
239
240 // Copy file
241 FileManager fm;
242 if ( !fm.copyFile( *lnk, newdoc ) )
243 return FALSE;
244 return TRUE;
245}
246
247void LnkProperties::done(int ok)
248{
249 if ( ok ) {
250 bool changed=FALSE;
251 if ( lnk->name() != d->docname->text() ) {
252 lnk->setName(d->docname->text());
253 changed=TRUE;
254 }
255 if ( d->categoryEdit->isVisible() ) {
256 QArray<int> tmp = d->categoryEdit->newCategories();
257 if ( lnk->categories() != tmp ) {
258 lnk->setCategories( tmp );
259 changed = TRUE;
260 }
261 }
262 if ( d->preload->isHidden() && d->locationCombo->currentItem() != currentLocation ) {
263 moveLnk();
264 } else if ( changed ) {
265 lnk->writeLink();
266 }
267
268 if ( !d->preload->isHidden() ) {
269 Config cfg("Launcher");
270 cfg.setGroup("Preload");
271 QStringList apps = cfg.readListEntry("Apps",',');
272 QString exe = lnk->exec();
273 if ( apps.contains(exe) != d->preload->isChecked() ) {
274 if ( d->preload->isChecked() ) {
275 apps.append(exe);
276 QCopEnvelope e("QPE/Application/"+exe.local8Bit(),
277 "enablePreload()");
278 } else {
279 apps.remove(exe);
280 QCopEnvelope e("QPE/Application/"+exe.local8Bit(),
281 "quitIfInvisible()");
282 }
283 cfg.writeEntry("Apps",apps,',');
284 }
285 }
286 }
287 QDialog::done( ok );
288}
289
diff --git a/library/lnkproperties.h b/library/lnkproperties.h
new file mode 100644
index 0000000..501692e
--- a/dev/null
+++ b/library/lnkproperties.h
@@ -0,0 +1,60 @@
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#ifndef LNKPROPERTIES_H
21#define LNKPROPERTIES_H
22#include <qstringlist.h>
23#include <qdialog.h>
24
25class AppLnk;
26class QListViewItem;
27class DocLnk;
28
29class LnkPropertiesBase;
30
31class LnkProperties : public QDialog
32{
33 Q_OBJECT
34
35public:
36 LnkProperties( AppLnk* lnk, QWidget* parent = 0 );
37 ~LnkProperties();
38
39 void done(int);
40private slots:
41 void beamLnk();
42 void unlinkLnk();
43 void duplicateLnk();
44
45signals:
46 void select(const AppLnk *);
47
48private:
49 void setupLocations();
50 bool moveLnk();
51 bool copyFile( DocLnk &newdoc );
52
53 AppLnk* lnk;
54 int fileSize;
55 int currentLocation;
56 QStringList locations;
57 LnkPropertiesBase *d;
58};
59
60#endif // LNKPROPERTIES_H
diff --git a/library/lnkpropertiesbase_p.ui b/library/lnkpropertiesbase_p.ui
new file mode 100644
index 0000000..d99b228
--- a/dev/null
+++ b/library/lnkpropertiesbase_p.ui
@@ -0,0 +1,399 @@
1<!DOCTYPE UI><UI>
2<class>LnkPropertiesBase</class>
3<widget>
4 <class>QWidget</class>
5 <property stdset="1">
6 <name>name</name>
7 <cstring>Form1</cstring>
8 </property>
9 <property stdset="1">
10 <name>geometry</name>
11 <rect>
12 <x>0</x>
13 <y>0</y>
14 <width>297</width>
15 <height>449</height>
16 </rect>
17 </property>
18 <property stdset="1">
19 <name>sizePolicy</name>
20 <sizepolicy>
21 <hsizetype>5</hsizetype>
22 <vsizetype>5</vsizetype>
23 </sizepolicy>
24 </property>
25 <property stdset="1">
26 <name>font</name>
27 <font>
28 </font>
29 </property>
30 <property stdset="1">
31 <name>caption</name>
32 <string>Details</string>
33 </property>
34 <property>
35 <name>layoutMargin</name>
36 </property>
37 <property>
38 <name>layoutSpacing</name>
39 </property>
40 <vbox>
41 <property stdset="1">
42 <name>margin</name>
43 <number>0</number>
44 </property>
45 <property stdset="1">
46 <name>spacing</name>
47 <number>0</number>
48 </property>
49 <widget>
50 <class>QFrame</class>
51 <property stdset="1">
52 <name>name</name>
53 <cstring>Frame8</cstring>
54 </property>
55 <property stdset="1">
56 <name>focusPolicy</name>
57 <enum>NoFocus</enum>
58 </property>
59 <property stdset="1">
60 <name>frameShape</name>
61 <enum>NoFrame</enum>
62 </property>
63 <property stdset="1">
64 <name>frameShadow</name>
65 <enum>Plain</enum>
66 </property>
67 <property>
68 <name>layoutMargin</name>
69 </property>
70 <property>
71 <name>layoutSpacing</name>
72 </property>
73 <grid>
74 <property stdset="1">
75 <name>margin</name>
76 <number>3</number>
77 </property>
78 <property stdset="1">
79 <name>spacing</name>
80 <number>3</number>
81 </property>
82 <widget row="6" column="0" rowspan="1" colspan="2" >
83 <class>CategoryWidget</class>
84 <property stdset="1">
85 <name>name</name>
86 <cstring>categoryEdit</cstring>
87 </property>
88 <property stdset="1">
89 <name>sizePolicy</name>
90 <sizepolicy>
91 <hsizetype>1</hsizetype>
92 <vsizetype>7</vsizetype>
93 </sizepolicy>
94 </property>
95 </widget>
96 <widget row="5" column="0" rowspan="1" colspan="2" >
97 <class>QLabel</class>
98 <property stdset="1">
99 <name>name</name>
100 <cstring>spacer</cstring>
101 </property>
102 <property stdset="1">
103 <name>sizePolicy</name>
104 <sizepolicy>
105 <hsizetype>1</hsizetype>
106 <vsizetype>7</vsizetype>
107 </sizepolicy>
108 </property>
109 <property stdset="1">
110 <name>text</name>
111 <string></string>
112 </property>
113 </widget>
114 <widget row="3" column="0" >
115 <class>QLabel</class>
116 <property stdset="1">
117 <name>name</name>
118 <cstring>commentLabel</cstring>
119 </property>
120 <property stdset="1">
121 <name>text</name>
122 <string>Comment:</string>
123 </property>
124 </widget>
125 <widget row="2" column="0" >
126 <class>QLabel</class>
127 <property stdset="1">
128 <name>name</name>
129 <cstring>typeLabel</cstring>
130 </property>
131 <property stdset="1">
132 <name>focusPolicy</name>
133 <enum>NoFocus</enum>
134 </property>
135 <property stdset="1">
136 <name>text</name>
137 <string>Type:</string>
138 </property>
139 <property>
140 <name>layoutMargin</name>
141 </property>
142 <property>
143 <name>layoutSpacing</name>
144 </property>
145 </widget>
146 <widget row="1" column="1" >
147 <class>QComboBox</class>
148 <property stdset="1">
149 <name>name</name>
150 <cstring>locationCombo</cstring>
151 </property>
152 <property stdset="1">
153 <name>sizePolicy</name>
154 <sizepolicy>
155 <hsizetype>7</hsizetype>
156 <vsizetype>0</vsizetype>
157 </sizepolicy>
158 </property>
159 </widget>
160 <widget row="0" column="1" >
161 <class>QLineEdit</class>
162 <property stdset="1">
163 <name>name</name>
164 <cstring>docname</cstring>
165 </property>
166 <property stdset="1">
167 <name>sizePolicy</name>
168 <sizepolicy>
169 <hsizetype>7</hsizetype>
170 <vsizetype>0</vsizetype>
171 </sizepolicy>
172 </property>
173 <property stdset="1">
174 <name>text</name>
175 <string></string>
176 </property>
177 </widget>
178 <widget row="0" column="0" >
179 <class>QLabel</class>
180 <property stdset="1">
181 <name>name</name>
182 <cstring>TextLabel1</cstring>
183 </property>
184 <property stdset="1">
185 <name>frameShadow</name>
186 <enum>MShadow</enum>
187 </property>
188 <property stdset="1">
189 <name>text</name>
190 <string>Name:</string>
191 </property>
192 </widget>
193 <widget row="1" column="0" >
194 <class>QLabel</class>
195 <property stdset="1">
196 <name>name</name>
197 <cstring>locationLabel</cstring>
198 </property>
199 <property stdset="1">
200 <name>sizePolicy</name>
201 <sizepolicy>
202 <hsizetype>1</hsizetype>
203 <vsizetype>1</vsizetype>
204 </sizepolicy>
205 </property>
206 <property stdset="1">
207 <name>caption</name>
208 <string></string>
209 </property>
210 <property stdset="1">
211 <name>text</name>
212 <string>Location:</string>
213 </property>
214 <property>
215 <name>layoutMargin</name>
216 </property>
217 <property>
218 <name>layoutSpacing</name>
219 </property>
220 </widget>
221 <widget row="2" column="1" >
222 <class>QLabel</class>
223 <property stdset="1">
224 <name>name</name>
225 <cstring>type</cstring>
226 </property>
227 <property stdset="1">
228 <name>text</name>
229 <string></string>
230 </property>
231 </widget>
232 <widget row="3" column="1" >
233 <class>QLabel</class>
234 <property stdset="1">
235 <name>name</name>
236 <cstring>comment</cstring>
237 </property>
238 <property stdset="1">
239 <name>text</name>
240 <string></string>
241 </property>
242 </widget>
243 <widget row="4" column="0" rowspan="1" colspan="2" >
244 <class>QCheckBox</class>
245 <property stdset="1">
246 <name>name</name>
247 <cstring>preload</cstring>
248 </property>
249 <property stdset="1">
250 <name>text</name>
251 <string>Fast load (consumes memory)</string>
252 </property>
253 <property>
254 <name>layoutMargin</name>
255 </property>
256 <property>
257 <name>layoutSpacing</name>
258 </property>
259 </widget>
260 </grid>
261 </widget>
262 <widget>
263 <class>Line</class>
264 <property stdset="1">
265 <name>name</name>
266 <cstring>hline</cstring>
267 </property>
268 <property stdset="1">
269 <name>frameShadow</name>
270 <enum>Sunken</enum>
271 </property>
272 <property stdset="1">
273 <name>orientation</name>
274 <enum>Horizontal</enum>
275 </property>
276 <property>
277 <name>layoutMargin</name>
278 </property>
279 <property>
280 <name>layoutSpacing</name>
281 </property>
282 </widget>
283 <widget>
284 <class>QFrame</class>
285 <property stdset="1">
286 <name>name</name>
287 <cstring>Frame9</cstring>
288 </property>
289 <property stdset="1">
290 <name>frameShape</name>
291 <enum>NoFrame</enum>
292 </property>
293 <property stdset="1">
294 <name>frameShadow</name>
295 <enum>Plain</enum>
296 </property>
297 <property>
298 <name>layoutMargin</name>
299 </property>
300 <property>
301 <name>layoutSpacing</name>
302 </property>
303 <hbox>
304 <property stdset="1">
305 <name>margin</name>
306 <number>3</number>
307 </property>
308 <property stdset="1">
309 <name>spacing</name>
310 <number>5</number>
311 </property>
312 <widget>
313 <class>QPushButton</class>
314 <property stdset="1">
315 <name>name</name>
316 <cstring>unlink</cstring>
317 </property>
318 <property stdset="1">
319 <name>focusPolicy</name>
320 <enum>TabFocus</enum>
321 </property>
322 <property stdset="1">
323 <name>text</name>
324 <string>Delete</string>
325 </property>
326 <property stdset="1">
327 <name>autoDefault</name>
328 <bool>false</bool>
329 </property>
330 </widget>
331 <widget>
332 <class>QPushButton</class>
333 <property stdset="1">
334 <name>name</name>
335 <cstring>duplicate</cstring>
336 </property>
337 <property stdset="1">
338 <name>text</name>
339 <string>Copy</string>
340 </property>
341 <property stdset="1">
342 <name>autoDefault</name>
343 <bool>false</bool>
344 </property>
345 </widget>
346 <widget>
347 <class>QPushButton</class>
348 <property stdset="1">
349 <name>name</name>
350 <cstring>beam</cstring>
351 </property>
352 <property stdset="1">
353 <name>focusPolicy</name>
354 <enum>TabFocus</enum>
355 </property>
356 <property stdset="1">
357 <name>text</name>
358 <string>Beam</string>
359 </property>
360 <property stdset="1">
361 <name>autoDefault</name>
362 <bool>false</bool>
363 </property>
364 </widget>
365 </hbox>
366 </widget>
367 </vbox>
368</widget>
369<customwidgets>
370 <customwidget>
371 <class>CategoryWidget</class>
372 <header location="global">qpe/categorywidget.h</header>
373 <sizehint>
374 <width>-1</width>
375 <height>-1</height>
376 </sizehint>
377 <container>0</container>
378 <sizepolicy>
379 <hordata>7</hordata>
380 <verdata>7</verdata>
381 </sizepolicy>
382 <pixmap>image0</pixmap>
383 </customwidget>
384</customwidgets>
385<images>
386 <image>
387 <name>image0</name>
388 <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
389 </image>
390</images>
391<tabstops>
392 <tabstop>docname</tabstop>
393 <tabstop>preload</tabstop>
394 <tabstop>locationCombo</tabstop>
395 <tabstop>unlink</tabstop>
396 <tabstop>duplicate</tabstop>
397 <tabstop>beam</tabstop>
398</tabstops>
399</UI>
diff --git a/library/menubutton.cpp b/library/menubutton.cpp
new file mode 100644
index 0000000..c34383a
--- a/dev/null
+++ b/library/menubutton.cpp
@@ -0,0 +1,187 @@
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 "menubutton.h"
22#include <qpopupmenu.h>
23
24/*!
25 \class MenuButton menubutton.h
26 \brief The MenuButton class is a pushbutton with a menu.
27
28 Similar in function to a QComboBox.
29*/
30
31/*!
32 \fn void MenuButton::selected(int index)
33
34 This signal is emitted when the item at \a index is selected.
35*/
36
37/*!
38 \fn void MenuButton::selected(const QString& text)
39
40 This signal is emitted when the item with the given \a text is selected.
41*/
42
43
44/*!
45 Constructs a MenuButton with the given \a items added (see insertItems()).
46 The standard \a parent an \a name arguments are passed to the base class.
47*/
48MenuButton::MenuButton( const QStringList& items, QWidget* parent, const char* name) :
49 QPushButton(parent,name)
50{
51 init();
52 insertItems(items);
53}
54
55/*!
56 Constructs an empty MenuButton.
57 The standard \a parent an \a name arguments are passed to the base class.
58
59 \sa insertItems()
60*/
61MenuButton::MenuButton( QWidget* parent, const char* name) :
62 QPushButton(parent,name)
63{
64 init();
65}
66
67void MenuButton::init()
68{
69 setAutoDefault(FALSE);
70 pop = new QPopupMenu(this);
71 nitems=0;
72 connect(pop, SIGNAL(activated(int)), this, SLOT(select(int)));
73 setPopup(pop);
74 //setPopupDelay(0);
75}
76
77/*!
78 Removes all items from the button and menu.
79*/
80void MenuButton::clear()
81{
82 delete pop;
83 init();
84}
85
86/*!
87 Inserts string \a items into the menu. The string "--" represents
88 a separator.
89*/
90void MenuButton::insertItems( const QStringList& items )
91{
92 QStringList::ConstIterator it=items.begin();
93 for (; it!=items.end(); ++it) {
94 if ( (*it) == "--" )
95 insertSeparator();
96 else
97 insertItem(*it);
98 }
99}
100
101/*!
102 Inserts an \a icon and \a text into the menu.
103*/
104void MenuButton::insertItem( const QIconSet& icon, const QString& text=QString::null )
105{
106 pop->insertItem(icon, text, nitems++);
107 if ( nitems==1 ) select(0);
108}
109
110/*!
111 Inserts \a text into the menu.
112*/
113void MenuButton::insertItem( const QString& text )
114{
115 pop->insertItem(text, nitems++);
116 if ( nitems==1 ) select(0);
117}
118
119/*!
120 Inserts a visual separator into the menu.
121*/
122void MenuButton::insertSeparator()
123{
124 pop->insertSeparator();
125}
126
127/*!
128 Selects the items with text \a s.
129*/
130void MenuButton::select(const QString& s)
131{
132 for (int i=0; i<nitems; i++) {
133 if ( pop->text(i) == s ) {
134 select(i);
135 break;
136 }
137 }
138}
139
140/*!
141 Selects the item at index \a s.
142*/
143void MenuButton::select(int s)
144{
145 cur = s;
146 updateLabel();
147 if ( pop->iconSet(cur) )
148 setIconSet(*pop->iconSet(cur));
149 emit selected(cur);
150 emit selected(currentText());
151}
152
153/*!
154 Returns the index of the current item.
155*/
156int MenuButton::currentItem() const
157{
158 return cur;
159}
160
161/*!
162 Returns the text of the current item.
163*/
164QString MenuButton::currentText() const
165{
166 return pop->text(cur);
167}
168
169/*!
170 Sets the label. If \a label is empty, the
171 current item text is displayed, otherwise \a label should contain
172 "%1", which will be replaced by the current item text.
173*/
174void MenuButton::setLabel(const QString& label)
175{
176 lab = label;
177 updateLabel();
178}
179
180void MenuButton::updateLabel()
181{
182 QString t = pop->text(cur);
183 if ( !lab.isEmpty() )
184 t = lab.arg(t);
185 setText(t);
186}
187
diff --git a/library/menubutton.h b/library/menubutton.h
new file mode 100644
index 0000000..e9c91b7
--- a/dev/null
+++ b/library/menubutton.h
@@ -0,0 +1,63 @@
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#ifndef MENUBUTTON_H
21#define MENUBUTTON_H
22
23#include <qpushbutton.h>
24#include <qstringlist.h>
25
26class MenuButton : public QPushButton {
27 Q_OBJECT
28public:
29 MenuButton( QWidget* parent, const char* name=0);
30 MenuButton( const QStringList& items, QWidget* parent, const char* name=0);
31
32 void clear();
33
34 int currentItem() const;
35 QString currentText() const;
36
37 void insertItems( const QStringList& items );
38 void insertItem( const QIconSet& icon, const QString& text=QString::null );
39 void insertItem( const QString& text );
40 void insertSeparator();
41
42 void setLabel(const QString& label);
43
44signals:
45 void selected(int);
46 void selected(const QString&);
47
48public slots:
49 void select(int);
50 void select(const QString&);
51
52private:
53 void init();
54 QStringList txts;
55 QPopupMenu* pop;
56 int nitems;
57 int cur;
58 QString lab;
59 void updateLabel();
60};
61
62#endif
63
diff --git a/library/mimetype.cpp b/library/mimetype.cpp
new file mode 100644
index 0000000..c6a4453
--- a/dev/null
+++ b/library/mimetype.cpp
@@ -0,0 +1,204 @@
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 "mimetype.h"
22#include "applnk.h"
23#include "resource.h"
24#include "qpeapplication.h"
25#include <qfile.h>
26#include <qdict.h>
27#include <qregexp.h>
28#include <qstringlist.h>
29#include <qtextstream.h>
30#include <qmap.h>
31
32class MimeTypeData {
33public:
34 MimeTypeData(const QString& i, const AppLnk& lnk, const QString& icon ) :
35 id(i),
36 desc(lnk.name()+" document"),
37 app(lnk)
38 {
39 if ( icon.isEmpty() ) {
40 regIcon = lnk.pixmap();
41 bigIcon = lnk.bigPixmap();
42 } else {
43 QImage unscaledIcon = Resource::loadImage( icon );
44 regIcon.convertFromImage( unscaledIcon.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
45 bigIcon.convertFromImage( unscaledIcon.smoothScale( AppLnk::bigIconSize(), AppLnk::bigIconSize() ) );
46 }
47 }
48 QString id;
49 QString desc;
50 QPixmap regIcon;
51 QPixmap bigIcon;
52 AppLnk app;
53};
54
55class MimeType::Dict : public QDict<MimeTypeData> {
56public:
57 Dict() {}
58};
59
60MimeType::Dict* MimeType::d=0;
61static QMap<QString,QString> *typeFor = 0;
62
63MimeType::Dict& MimeType::dict()
64{
65 if ( !d ) {
66 d = new Dict;
67 d->setAutoDelete(TRUE);
68 }
69 return *d;
70}
71
72MimeType::MimeType( const QString& ext_or_id )
73{
74 init(ext_or_id);
75}
76
77MimeType::MimeType( const DocLnk& lnk )
78{
79 init(lnk.type());
80}
81
82QString MimeType::id() const
83{
84 return i;
85}
86
87QString MimeType::description() const
88{
89 MimeTypeData* d = data(i);
90 return d ? d->desc : QString::null;
91}
92
93QPixmap MimeType::pixmap() const
94{
95 MimeTypeData* d = data(i);
96 return d ? d->regIcon : QPixmap();
97}
98
99QPixmap MimeType::bigPixmap() const
100{
101 MimeTypeData* d = data(i);
102 return d ? d->bigIcon : QPixmap();
103}
104
105const AppLnk* MimeType::application() const
106{
107 MimeTypeData* d = data(i);
108 return d ? &d->app : 0;
109}
110
111void MimeType::registerApp( const AppLnk& lnk )
112{
113 QStringList list = lnk.mimeTypes();
114 QStringList icons = lnk.mimeTypeIcons();
115 QStringList::ConstIterator icon = icons.begin();
116 for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it, ++icon) {
117 MimeTypeData *item = new MimeTypeData( *it, lnk, *icon );
118 dict().replace( *it, item );
119 }
120}
121
122void MimeType::clear()
123{
124 delete d;
125 d = 0;
126}
127
128void MimeType::loadExtensions()
129{
130 if ( !typeFor ) {
131 typeFor = new QMap<QString,QString>;
132 loadExtensions("/etc/mime.types");
133 loadExtensions(QPEApplication::qpeDir()+"etc/mime.types");
134 }
135}
136
137void MimeType::loadExtensions(const QString& filename)
138{
139 QFile file(filename);
140 if ( file.open(IO_ReadOnly) ) {
141 QTextStream in(&file);
142 QRegExp space("[ \t]+");
143 while (!in.atEnd()) {
144 QStringList tokens = QStringList::split(space, in.readLine());
145 QStringList::ConstIterator it = tokens.begin();
146 if ( it != tokens.end() ) {
147 QString id = *it; ++it;
148 while (it != tokens.end()) {
149 (*typeFor)[*it] = id;
150 ++it;
151 }
152 }
153 }
154 }
155}
156
157void MimeType::init( const QString& ext_or_id )
158{
159 if ( ext_or_id[0] != '/' && ext_or_id.contains('/') ) {
160 i = ext_or_id.lower();
161 } else {
162 loadExtensions();
163 int dot = ext_or_id.findRev('.');
164 QString ext = dot >= 0 ? ext_or_id.mid(dot+1) : ext_or_id;
165 i = (*typeFor)[ext.lower()];
166 if ( i.isNull() )
167 i = "application/octet-stream";
168 }
169 static bool appsUpdated = FALSE;
170 if ( !appsUpdated ) {
171 appsUpdated = TRUE;
172 updateApplications();
173 }
174}
175
176MimeTypeData* MimeType::data(const QString& id)
177{
178 MimeTypeData* d = dict()[id];
179 if ( !d ) {
180 int s = id.find('/');
181 QString idw = id.left(s)+"/*";
182 d = dict()[idw];
183 }
184 return d;
185}
186
187QString MimeType::appsFolderName()
188{
189 return QPEApplication::qpeDir() + "apps";
190}
191
192void MimeType::updateApplications()
193{
194 clear();
195 AppLnkSet apps( appsFolderName() );
196 updateApplications(&apps);
197}
198
199void MimeType::updateApplications(AppLnkSet* folder)
200{
201 for ( QListIterator<AppLnk> it( folder->children() ); it.current(); ++it ) {
202 registerApp(*it.current());
203 }
204}
diff --git a/library/mimetype.h b/library/mimetype.h
new file mode 100644
index 0000000..58725d7
--- a/dev/null
+++ b/library/mimetype.h
@@ -0,0 +1,64 @@
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#ifndef MIMETYPE_H
21#define MIMETYPE_H
22
23#include <qstring.h>
24#include <qpixmap.h>
25
26class AppLnk;
27class DocLnk;
28class QStringList;
29class MimeTypeData;
30class AppLnkSet;
31
32class MimeType
33{
34public:
35 MimeType( const QString& ext_or_id );
36 MimeType( const DocLnk& );
37
38 QString id() const;
39 QString description() const;
40 QPixmap pixmap() const;
41 QPixmap bigPixmap() const;
42
43 const AppLnk* application() const;
44
45 static QString appsFolderName();
46 static void updateApplications();
47
48 // These shouldn't be needed
49 static void clear();
50 static void registerApp( const AppLnk& );
51
52private:
53 static void updateApplications(AppLnkSet* folder);
54 static void loadExtensions();
55 static void loadExtensions(const QString&);
56 void init( const QString& ext_or_id );
57 class Dict;
58 static Dict* d;
59 static Dict& dict();
60 static MimeTypeData* data(const QString& id);
61 QString i;
62};
63
64#endif
diff --git a/library/mkinlinepics b/library/mkinlinepics
new file mode 100755
index 0000000..6d89a6a
--- a/dev/null
+++ b/library/mkinlinepics
@@ -0,0 +1,3 @@
1# NOTE: Only qembed in Qt > 2.3.1 includes the #ifdef _WS_QWS_, so if you
2# re-run this, be sure to use such a version, or to add it manually.
3qembed --images ../pics/inline/*.* >inlinepics_p.h
diff --git a/library/network.cpp b/library/network.cpp
new file mode 100644
index 0000000..7d51016
--- a/dev/null
+++ b/library/network.cpp
@@ -0,0 +1,436 @@
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 "qpe/network.h"
22#include "qpe/networkinterface.h"
23#include "qpe/global.h"
24#include "qpe/config.h"
25#include "qpe/resource.h"
26#include "qpe/qpeapplication.h"
27#include <qpe/qcopenvelope_qws.h>
28#include <qpe/qlibrary.h>
29
30#include <qlistbox.h>
31#include <qdir.h>
32#include <qlayout.h>
33#include <qdict.h>
34#include <qtranslator.h>
35
36#include <stdlib.h>
37
38class NetworkEmitter : public QCopChannel {
39 Q_OBJECT
40public:
41 NetworkEmitter() : QCopChannel("QPE/Network",qApp)
42 {
43 }
44
45 void receive(const QCString &msg, const QByteArray&)
46 {
47 if ( msg == "choicesChanged()" )
48 emit changed();
49 }
50
51signals:
52 void changed();
53};
54
55/*!
56 \internal
57
58 Requests that the service \a choice be started. The \a password is
59 the password to use if required.
60*/
61void Network::start(const QString& choice, const QString& password)
62{
63 QCopEnvelope e("QPE/Network", "start(QString,QString)");
64 e << choice << password;
65}
66
67/*!
68 \class Network network.h
69 \brief The Network class provides network access functionality.
70*/
71
72// copy the proxy settings of the active config over to the Proxies.conf file
73/*!
74 \internal
75*/
76void Network::writeProxySettings( Config &cfg )
77{
78 Config proxy( Network::settingsDir() + "/Proxies.conf", Config::File );
79 proxy.setGroup("Properties");
80 cfg.setGroup("Proxy");
81 proxy.writeEntry("type", cfg.readEntry("type") );
82 proxy.writeEntry("autoconfig", cfg.readEntry("autoconfig") );
83 proxy.writeEntry("httphost", cfg.readEntry("httphost") );
84 proxy.writeEntry("httpport", cfg.readEntry("httpport") );
85 proxy.writeEntry("ftphost", cfg.readEntry("ftphost") );
86 proxy.writeEntry("ftpport", cfg.readEntry("ftpport") );
87 proxy.writeEntry("noproxies", cfg.readEntry("noproxies") );
88 cfg.setGroup("Properties");
89}
90
91
92
93/*!
94 \internal
95
96 Stops the current network service.
97*/
98void Network::stop()
99{
100 QCopEnvelope e("QPE/Network", "stop()");
101}
102
103static NetworkEmitter *emitter = 0;
104
105/*!
106 \internal
107*/
108void Network::connectChoiceChange(QObject* receiver, const char* slot)
109{
110 if ( !emitter )
111 emitter = new NetworkEmitter;
112 QObject::connect(emitter,SIGNAL(changed()),receiver,slot);
113}
114
115/*!
116 \internal
117*/
118QString Network::settingsDir()
119{
120 return Global::applicationFileName("Network", "modules");
121}
122
123/*!
124 \internal
125*/
126QStringList Network::choices(QListBox* lb, const QString& dir)
127{
128 QStringList list;
129
130 if ( lb )
131 lb->clear();
132
133 QString adir = dir.isEmpty() ? settingsDir() : dir;
134 QDir settingsdir(adir);
135 settingsdir.mkdir(adir);
136
137 QStringList files = settingsdir.entryList("*.conf");
138 for (QStringList::ConstIterator it=files.begin(); it!=files.end(); ++it ) {
139 QString filename = settingsdir.filePath(*it);
140 Config cfg(filename, Config::File);
141 cfg.setGroup("Info");
142 if ( lb )
143 lb->insertItem(Resource::loadPixmap("Network/" + cfg.readEntry("Type")),
144 cfg.readEntry("Name"));
145 list.append(filename);
146 }
147
148 return list;
149}
150
151class NetworkServer : public QCopChannel {
152 Q_OBJECT
153public:
154 NetworkServer(QObject* parent) : QCopChannel("QPE/Network",parent)
155 {
156 up = FALSE;
157 examineNetworks( TRUE );
158 QCopChannel* card = new QCopChannel("QPE/Card",parent);
159 connect(card,SIGNAL(received(const QCString &, const QByteArray&)),
160 this,SLOT(cardMessage(const QCString &, const QByteArray&)));
161 }
162
163 ~NetworkServer()
164 {
165 stop();
166 }
167
168 bool networkOnline() const
169 {
170 return up;
171 }
172
173private:
174 void receive(const QCString &msg, const QByteArray& data)
175 {
176 if ( msg == "start(QString,QString)" ) {
177 QDataStream stream(data,IO_ReadOnly);
178 QString file,password;
179 stream >> file >> password;
180 if ( file.isEmpty() ) {
181 QStringList l = Network::choices();
182 for (QStringList::ConstIterator i=l.begin(); i!=l.end(); ++i) {
183 Config cfg(*i,Config::File);
184 cfg.setGroup("Info");
185 QString type = cfg.readEntry("Type");
186 NetworkInterface* plugin = Network::loadPlugin(type);
187 cfg.setGroup("Properties");
188 if ( plugin && plugin->isAvailable(cfg) ) {
189 file = *i;
190 break;
191 }
192 }
193 if ( file.isEmpty() ) {
194 QCopEnvelope("QPE/Network", "failed()");
195 return;
196 }
197 }
198 start(file,password);
199 } else if ( msg == "stop()" ) {
200 stop();
201 } else if ( msg == "choicesChanged()" ) {
202 examineNetworks();
203 }
204 }
205
206private slots:
207 void cardMessage(const QCString &msg, const QByteArray&)
208 {
209 if ( msg == "stabChanged()" )
210 examineNetworks();
211 }
212
213private:
214 void examineNetworks( bool firstStart = FALSE )
215 {
216 QStringList l = Network::choices();
217 bool wasup = up; up=FALSE;
218 QStringList pavailable = available;
219 available.clear();
220 for (QStringList::ConstIterator it=l.begin(); it!=l.end(); ++it) {
221 Config cfg(*it,Config::File);
222 cfg.setGroup("Info");
223 QString type = cfg.readEntry("Type");
224 NetworkInterface* plugin = Network::loadPlugin(type);
225 cfg.setGroup("Properties");
226 if ( plugin ) {
227 if ( plugin->isActive(cfg) ) {
228 up = TRUE;
229 if ( firstStart )
230 plugin->start( cfg );
231 }
232 if ( plugin->isAvailable(cfg) )
233 available.append(*it);
234 }
235 }
236
237 // Try to work around unreproducible bug whereby
238 // the netmon applet shows wrong state.
239 bool reannounce = wait<0;
240
241 if ( available != pavailable || reannounce ) {
242 QCopEnvelope e("QPE/Network", "available(QStringList)");
243 e << available;
244 }
245 if ( up != wasup || reannounce ) {
246 QCopEnvelope("QPE/Network", up ? "up()" : "down()");
247 }
248 }
249
250 void start( const QString& file, const QString& password )
251 {
252 if ( !current.isEmpty() )
253 stop();
254 current = QString::null;
255 Config cfg(file, Config::File);
256 cfg.setGroup("Info");
257 QString type = cfg.readEntry("Type");
258 NetworkInterface* plugin = Network::loadPlugin(type);
259 bool started = FALSE;
260 if ( plugin ) {
261 cfg.setGroup("Properties");
262 if ( plugin->start(cfg,password) ) {
263 Network::writeProxySettings( cfg );
264 current = file;
265 wait=0;
266 startTimer(400);
267 started = TRUE;
268 }
269 }
270 if ( !started ) {
271 QCopEnvelope("QPE/Network", "failed()");
272 }
273 }
274
275 void stop()
276 {
277 bool stopped = FALSE;
278 if ( !current.isEmpty() ) {
279 Config cfg(current, Config::File);
280 cfg.setGroup("Info");
281 QString type = cfg.readEntry("Type");
282 NetworkInterface* plugin = Network::loadPlugin(type);
283 if ( plugin ) {
284 cfg.setGroup("Properties");
285 if ( plugin->stop(cfg) ) {
286 current = QString::null;
287 wait=0;
288 startTimer(400);
289 stopped = TRUE;
290 }
291 }
292 }
293 if ( !stopped ) {
294 QCopEnvelope("QPE/Network", "failed()");
295 }
296 }
297
298 void timerEvent(QTimerEvent*)
299 {
300 examineNetworks();
301 if ( wait >= 0 ) {
302 if ( up == !current.isNull() ) {
303 // done
304 killTimers();
305 if ( up ) {
306 startTimer(3000); // monitor link
307 wait = -1;
308 }
309 } else {
310 wait++;
311 if ( wait == 600 ) {
312 killTimers(); // forget about it after 240 s
313 QCopEnvelope("QPE/Network", "failed()");
314 up = !current.isNull();
315 }
316 }
317 } else if ( !up ) {
318 killTimers();
319 }
320 }
321
322private:
323 QStringList available;
324 QString current;
325 bool up;
326 int wait;
327};
328
329static NetworkServer* ns=0;
330
331/*!
332 \internal
333*/
334QString Network::serviceName(const QString& service)
335{
336 Config cfg(service, Config::File);
337 cfg.setGroup("Info");
338 return cfg.readEntry("Name");
339}
340
341/*!
342 \internal
343*/
344QString Network::serviceType(const QString& service)
345{
346 Config cfg(service, Config::File);
347 cfg.setGroup("Info");
348 return cfg.readEntry("Type");
349}
350
351/*!
352 \internal
353*/
354bool Network::serviceNeedsPassword(const QString& service)
355{
356 Config cfg(service,Config::File);
357 cfg.setGroup("Info");
358 QString type = cfg.readEntry("Type");
359 NetworkInterface* plugin = Network::loadPlugin(type);
360 cfg.setGroup("Properties");
361 return plugin ? plugin->needPassword(cfg) : FALSE;
362}
363
364/*!
365 \internal
366*/
367bool Network::networkOnline()
368{
369 return ns && ns->networkOnline();
370}
371
372/*!
373 \internal
374*/
375void Network::createServer(QObject* parent)
376{
377 ns = new NetworkServer(parent);
378}
379
380/*!
381 \internal
382*/
383int Network::addStateWidgets(QWidget* parent)
384{
385 int n=0;
386 QStringList l = Network::choices();
387 QVBoxLayout* vb = new QVBoxLayout(parent);
388 for (QStringList::ConstIterator it=l.begin(); it!=l.end(); ++it) {
389 Config cfg(*it,Config::File);
390 cfg.setGroup("Info");
391 QString type = cfg.readEntry("Type");
392 NetworkInterface* plugin = Network::loadPlugin(type);
393 cfg.setGroup("Properties");
394 if ( plugin ) {
395 QWidget* w;
396 if ( (w=plugin->addStateWidget(parent,cfg)) ) {
397 n++;
398 vb->addWidget(w);
399 }
400 }
401 }
402 return n;
403}
404
405static QDict<NetworkInterface> *ifaces;
406
407/*!
408 \internal
409*/
410NetworkInterface* Network::loadPlugin(const QString& type)
411{
412#ifndef QT_NO_COMPONENT
413 if ( !ifaces ) ifaces = new QDict<NetworkInterface>;
414 NetworkInterface *iface = ifaces->find(type);
415 if ( !iface ) {
416 QString libfile = QPEApplication::qpeDir() + "/plugins/network/lib" + type + ".so";
417 QLibrary lib(libfile);
418 if ( !lib.queryInterface( IID_Network, (QUnknownInterface**)&iface ) == QS_OK )
419 return 0;
420 ifaces->insert(type,iface);
421 QString lang = getenv( "LANG" );
422 QTranslator * trans = new QTranslator(qApp);
423 QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/lib"+type+".qm";
424 if ( trans->load( tfn ))
425 qApp->installTranslator( trans );
426 else
427 delete trans;
428
429 }
430 return iface;
431#else
432 return 0;
433#endif
434}
435
436#include "network.moc"
diff --git a/library/network.h b/library/network.h
new file mode 100644
index 0000000..cee67af
--- a/dev/null
+++ b/library/network.h
@@ -0,0 +1,52 @@
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#ifndef NETWORK_H
21#define NETWORK_H
22
23#include <qstringlist.h>
24class QListBox;
25class QObject;
26class QWidget;
27struct NetworkInterface;
28class Config;
29
30class Network {
31public:
32 static void start(const QString& service=QString::null, const QString& password=QString::null);
33 static void stop();
34
35 static QString settingsDir();
36 static QString serviceName(const QString& service);
37 static QString serviceType(const QString& service);
38 static bool serviceNeedsPassword(const QString& service);
39 static void connectChoiceChange(QObject* receiver, const char* slot);
40 static QStringList choices(QListBox* = 0, const QString& dir=QString::null);
41 static void writeProxySettings( Config &cfg );
42
43 static NetworkInterface* loadPlugin(const QString& type);
44
45 static int addStateWidgets(QWidget* parent);
46
47 // Server only
48 static void createServer(QObject* parent);
49 static bool networkOnline();
50};
51
52#endif
diff --git a/library/networkinterface.cpp b/library/networkinterface.cpp
new file mode 100644
index 0000000..56a0e5b
--- a/dev/null
+++ b/library/networkinterface.cpp
@@ -0,0 +1,104 @@
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 "networkinterface.h"
22#include "network.h"
23#include "config.h"
24#include <stdio.h>
25
26QString NetworkInterface::device( Config& cfg ) const
27{
28 return cfg.readEntry("Device");
29}
30
31bool NetworkInterface::isActive( Config& cfg ) const
32{
33 QString dev = device(cfg);
34 if ( dev.isEmpty() )
35 return FALSE;
36 QString dev0 = dev+'0';
37
38 FILE* f;
39 f = fopen("/proc/net/dev", "r");
40 if ( f ) {
41 char line[1024];
42 char devname[80];
43 while ( fgets( line, 1024, f ) ) {
44 if ( sscanf(line," %[^:]:", devname)==1 )
45 {
46 if ( devname == dev || devname == dev0 ) {
47 fclose(f);
48 Network::writeProxySettings( cfg );
49 return TRUE;
50 }
51 }
52 }
53 fclose(f);
54 }
55 return FALSE;
56}
57
58QString NetworkInterface::cardType( Config& cfg ) const
59{
60 return cfg.readEntry("CardType");
61}
62
63bool NetworkInterface::isAvailable( Config& cfg ) const
64{
65 QString ct = cardType(cfg);
66 if ( ct.isEmpty() )
67 return FALSE;
68
69 FILE* f = fopen("/var/run/stab", "r");
70 if (!f) f = fopen("/var/state/pcmcia/stab", "r");
71 if (!f) f = fopen("/var/lib/pcmcia/stab", "r");
72
73 if ( f ) {
74 char line[1024];
75 char devtype[80];
76 while ( fgets( line, 1024, f ) ) {
77 if ( sscanf(line,"%*d %s %*s", devtype )==1 )
78 {
79 if ( ct == devtype ) {
80 fclose(f);
81 return TRUE;
82 }
83 }
84 }
85 fclose(f);
86 }
87
88 return FALSE;
89}
90
91bool NetworkInterface::start( Config& cfg, const QString& /*password*/ )
92{
93 return start(cfg);
94}
95
96bool NetworkInterface::needPassword( Config& ) const
97{
98 return FALSE;
99}
100
101QWidget* NetworkInterface::addStateWidget( QWidget*, Config& ) const
102{
103 return 0;
104}
diff --git a/library/networkinterface.h b/library/networkinterface.h
new file mode 100644
index 0000000..d2ca5ab
--- a/dev/null
+++ b/library/networkinterface.h
@@ -0,0 +1,54 @@
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#ifndef NETWORKINTERFACE_H
21#define NETWORKINTERFACE_H
22
23#include <qnamespace.h>
24#include <qstring.h>
25#include <qpe/qcom.h>
26
27#ifndef QT_NO_COMPONENT
28// {09794290-69d5-4c42-8a53-230cf2e53c50}
29# ifndef IID_Network
30# define IID_Network QUuid( 0x09794290, 0x69d5, 0x4c42, 0x8a, 0x53, 0x23, 0x0c, 0xf2, 0xe5, 0x3c, 0x50)
31# endif
32#endif
33
34class QWidget;
35class Config;
36
37struct NetworkInterface : public QUnknownInterface
38{
39 virtual bool doProperties( QWidget *parent, Config& ) = 0;
40 virtual bool create( Config& ) = 0;
41 virtual bool remove( Config& ) = 0;
42 virtual QString device( Config& ) const;
43 virtual QString cardType( Config& ) const;
44 virtual bool isActive( Config& ) const;
45 virtual bool isAvailable( Config& ) const;
46 virtual bool start( Config& ) = 0;
47 virtual bool start( Config&, const QString& password );
48 virtual bool stop( Config& ) = 0;
49 virtual bool needPassword( Config& ) const;
50 virtual QWidget* addStateWidget( QWidget* parent, Config& ) const;
51};
52
53#endif
54
diff --git a/library/password.cpp b/library/password.cpp
new file mode 100644
index 0000000..3be6efe
--- a/dev/null
+++ b/library/password.cpp
@@ -0,0 +1,323 @@
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#include "password.h"
21#include "config.h"
22#include "global.h"
23#include "backend/contact.h"
24#include <qlabel.h>
25#include <qlineedit.h>
26#include <qtextview.h>
27#include <qstring.h>
28#include <qapplication.h>
29#include <qfile.h>
30#include <qwindowsystem_qws.h>
31
32#include <qdialog.h>
33
34#include <unistd.h> //for sleep
35#include "passwordbase_p.h"
36
37class PasswordDialog : public PasswordBase
38{
39 Q_OBJECT
40
41public:
42 PasswordDialog( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
43 ~PasswordDialog();
44
45 void clear();
46 void setPrompt( const QString& );
47
48signals:
49 void passwordEntered( const QString& );
50
51protected:
52 bool eventFilter( QObject*, QEvent* );
53 void keyPressEvent( QKeyEvent * );
54
55private:
56 void input( QString );
57 friend class Password;
58 QString text;
59};
60
61
62extern "C" char *crypt(const char *key, const char *salt);
63static QString qcrypt(const QString& k, const char *salt)
64{
65 return QString::fromUtf8(crypt(k.utf8(),salt));
66}
67
68/*
69 * Constructs a PasswordDialog which is a child of 'parent', with the
70 * name 'name' and widget flags set to 'f'
71 */
72PasswordDialog::PasswordDialog( QWidget* parent, const char* name, WFlags fl )
73 : PasswordBase( parent, name, fl )
74{
75 button_0->installEventFilter( this );
76 button_1->installEventFilter( this );
77 button_2->installEventFilter( this );
78 button_3->installEventFilter( this );
79 button_4->installEventFilter( this );
80 button_5->installEventFilter( this );
81 button_6->installEventFilter( this );
82 button_7->installEventFilter( this );
83 button_8->installEventFilter( this );
84 button_9->installEventFilter( this );
85 button_OK->installEventFilter( this );
86 setFocus();
87}
88
89/*
90 * Destroys the object and frees any allocated resources
91 */
92PasswordDialog::~PasswordDialog()
93{
94 // no need to delete child widgets, Qt does it all for us
95}
96
97
98
99/*!
100 \reimp
101*/
102
103bool PasswordDialog::eventFilter( QObject*o, QEvent*e )
104{
105 if ( e->type() == QEvent::MouseButtonRelease ) {
106 if ( o == button_OK ) {
107 emit passwordEntered( text );
108 } else {
109 QLabel *l = (QLabel*)o;
110 input(l->text());
111 }
112 }
113 return FALSE;
114}
115
116
117/*!
118 \reimp
119*/
120
121void PasswordDialog::keyPressEvent( QKeyEvent * )
122{
123#if 0
124 if ( e->key() == Key_Enter || e->key() == Key_Return )
125 emit passwordEntered( text );
126 else
127 input( e->text() );
128#endif
129}
130
131
132/*!
133
134*/
135
136void PasswordDialog::input( QString c )
137{
138 text += c;
139 display->setText( text );
140}
141
142/*!
143
144*/
145
146void PasswordDialog::setPrompt( const QString& s )
147{
148 prompt->setText( s );
149}
150
151void PasswordDialog::clear()
152{
153 text = "";
154 input("");
155}
156
157class PasswdDlg : public QDialog
158{
159public:
160 PasswdDlg( QWidget *parent, const char * name, bool modal, bool fullscreen = FALSE )
161 : QDialog( parent, name, modal, fullscreen ? WStyle_NoBorder | WStyle_Customize | WStyle_StaysOnTop : 0 ),
162 modl(modal)
163 {
164 passw = new PasswordDialog( this );
165
166 if ( fullscreen ) {
167 QRect desk = qApp->desktop()->geometry();
168 setGeometry( 0, 0, desk.width(), desk.height() );
169 }
170
171 connect( passw, SIGNAL(passwordEntered(const QString&)),
172 this, SLOT(accept()) );
173 }
174
175 void resizeEvent( QResizeEvent * )
176 {
177 passw->resize( size() );
178 }
179
180 void reset()
181 {
182 passw->clear();
183 }
184
185 void execNonModal()
186 {
187 if ( !modl ) {
188 reset();
189 showFullScreen();
190 do {
191 qApp->enter_loop();
192 } while (result()!=1);
193 }
194 }
195
196 void accept()
197 {
198 if ( !modl )
199 qApp->exit_loop();
200 QDialog::accept();
201 }
202
203 PasswordDialog *passw;
204 bool modl;
205};
206
207class OwnerDlg : public QDialog
208{
209public:
210
211 OwnerDlg( QWidget *parent, const char * name, Contact c,
212 bool modal, bool fullscreen = FALSE )
213 : QDialog( parent, name, modal,
214 fullscreen ?
215 WStyle_NoBorder | WStyle_Customize | WStyle_StaysOnTop : 0 )
216 {
217 if ( fullscreen ) {
218 QRect desk = qApp->desktop()->geometry();
219 setGeometry( 0, 0, desk.width(), desk.height() );
220 }
221
222 // set up contents.
223 QString text = "<H1>" + tr("Owner Information") + "</H1>";
224 text += c.toRichText();
225 tv = new QTextView(this);
226 tv->setText(text);
227
228 tv->viewport()->installEventFilter(this);
229 }
230
231 void resizeEvent( QResizeEvent * )
232 {
233 tv->resize( size() );
234 }
235
236 bool eventFilter(QObject *o, QEvent *e)
237 {
238 if (e->type() == QEvent::KeyPress || e->type() == QEvent::MouseButtonPress ) {
239 accept();
240 return TRUE;
241 }
242 return QWidget::eventFilter(o, e);
243 }
244
245 void mousePressEvent( QMouseEvent * ) { accept(); }
246
247private:
248 QTextView *tv;
249};
250
251/*!
252 Returns a crypted password entered by the user when prompted with \a prompt
253 The returned value is QString::null if the user cancels the operation,
254 or the empty string if the user enters no password (but confirms the
255 dialog).
256*/
257
258QString Password::getPassword( const QString& prompt )
259{
260 PasswdDlg pd(0,0,TRUE);
261 pd.passw->setPrompt( prompt );
262
263 pd.showMaximized();
264 int r = pd.exec();
265
266 if ( r == QDialog::Accepted ) {
267 if (pd.passw->text.isEmpty())
268 return "";
269 else
270 return qcrypt(pd.passw->text,"a0");
271 } else {
272 return QString::null;
273 }
274}
275
276
277/*!
278 Prompt, fullscreen, for the user's passcode until they get it right.
279
280 If \a at_poweron is TRUE, the dialog is only used if the user's
281 preference request it at poweron; either way, the screen is always repainted
282 by this function. (this functionality may move to the caller of this function).
283*/
284
285void Password::authenticate(bool at_poweron)
286{
287 Config cfg("Security");
288 cfg.setGroup("Passcode");
289 QString passcode = cfg.readEntry("passcode");
290 if ( !passcode.isEmpty()
291 && (!at_poweron || cfg.readNumEntry("passcode_poweron",0)) )
292 {
293 // Do it as a fullscreen modal dialog
294 PasswdDlg pd(0,0,TRUE,TRUE);
295
296 // see if there is contact information.
297 OwnerDlg *oi = 0;
298 QString vfilename = Global::applicationFileName("addressbook",
299 "businesscard.vcf");
300 if (QFile::exists(vfilename)) {
301 Contact c;
302 c = Contact::readVCard( vfilename )[0];
303
304 oi = new OwnerDlg(0, 0, c, TRUE, TRUE);
305 }
306
307 pd.reset();
308 pd.exec();
309 while (qcrypt(pd.passw->text, "a0") != passcode) {
310 if (oi)
311 oi->exec();
312 pd.reset();
313 pd.exec();
314 }
315 } else if ( at_poweron ) {
316 // refresh screen #### should probably be in caller
317 // Not needed (we took away the screen blacking)
318 //if ( qwsServer )
319 //qwsServer->refresh();
320 }
321}
322
323#include "password.moc"
diff --git a/library/password.h b/library/password.h
new file mode 100644
index 0000000..30a5377
--- a/dev/null
+++ b/library/password.h
@@ -0,0 +1,32 @@
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#ifndef PASSWORD_H
21#define PASSWORD_H
22
23#include <qstring.h>
24
25class Password
26{
27public:
28 static void authenticate(bool atpoweron=FALSE);
29 static QString getPassword( const QString& prompt );
30};
31
32#endif // PASSWORD_H
diff --git a/library/passwordbase_p.ui b/library/passwordbase_p.ui
new file mode 100644
index 0000000..e79777b
--- a/dev/null
+++ b/library/passwordbase_p.ui
@@ -0,0 +1,590 @@
1<!DOCTYPE UI><UI>
2<class>PasswordBase</class>
3<widget>
4 <class>QWidget</class>
5 <property stdset="1">
6 <name>name</name>
7 <cstring>PasswordBase</cstring>
8 </property>
9 <property stdset="1">
10 <name>geometry</name>
11 <rect>
12 <x>0</x>
13 <y>0</y>
14 <width>251</width>
15 <height>443</height>
16 </rect>
17 </property>
18 <property stdset="1">
19 <name>font</name>
20 <font>
21 <pointsize>24</pointsize>
22 </font>
23 </property>
24 <property stdset="1">
25 <name>caption</name>
26 <string>Form1</string>
27 </property>
28 <grid>
29 <property stdset="1">
30 <name>margin</name>
31 <number>11</number>
32 </property>
33 <property stdset="1">
34 <name>spacing</name>
35 <number>6</number>
36 </property>
37 <widget row="2" column="0" >
38 <class>QLabel</class>
39 <property stdset="1">
40 <name>name</name>
41 <cstring>button_1</cstring>
42 </property>
43 <property stdset="1">
44 <name>frameShape</name>
45 <enum>Box</enum>
46 </property>
47 <property stdset="1">
48 <name>frameShadow</name>
49 <enum>Raised</enum>
50 </property>
51 <property stdset="1">
52 <name>text</name>
53 <string>1</string>
54 </property>
55 <property stdset="1">
56 <name>alignment</name>
57 <set>AlignCenter</set>
58 </property>
59 <property>
60 <name>hAlign</name>
61 </property>
62 </widget>
63 <widget row="2" column="1" >
64 <class>QLabel</class>
65 <property stdset="1">
66 <name>name</name>
67 <cstring>button_2</cstring>
68 </property>
69 <property stdset="1">
70 <name>frameShape</name>
71 <enum>Box</enum>
72 </property>
73 <property stdset="1">
74 <name>frameShadow</name>
75 <enum>Raised</enum>
76 </property>
77 <property stdset="1">
78 <name>text</name>
79 <string>2</string>
80 </property>
81 <property stdset="1">
82 <name>alignment</name>
83 <set>AlignCenter</set>
84 </property>
85 <property>
86 <name>hAlign</name>
87 </property>
88 </widget>
89 <widget row="2" column="2" >
90 <class>QLabel</class>
91 <property stdset="1">
92 <name>name</name>
93 <cstring>button_3</cstring>
94 </property>
95 <property stdset="1">
96 <name>frameShape</name>
97 <enum>Box</enum>
98 </property>
99 <property stdset="1">
100 <name>frameShadow</name>
101 <enum>Raised</enum>
102 </property>
103 <property stdset="1">
104 <name>text</name>
105 <string>3</string>
106 </property>
107 <property stdset="1">
108 <name>alignment</name>
109 <set>AlignCenter</set>
110 </property>
111 <property>
112 <name>hAlign</name>
113 </property>
114 </widget>
115 <widget row="3" column="0" >
116 <class>QLabel</class>
117 <property stdset="1">
118 <name>name</name>
119 <cstring>button_4</cstring>
120 </property>
121 <property stdset="1">
122 <name>frameShape</name>
123 <enum>Box</enum>
124 </property>
125 <property stdset="1">
126 <name>frameShadow</name>
127 <enum>Raised</enum>
128 </property>
129 <property stdset="1">
130 <name>text</name>
131 <string>4</string>
132 </property>
133 <property stdset="1">
134 <name>alignment</name>
135 <set>AlignCenter</set>
136 </property>
137 <property>
138 <name>hAlign</name>
139 </property>
140 </widget>
141 <widget row="3" column="1" >
142 <class>QLabel</class>
143 <property stdset="1">
144 <name>name</name>
145 <cstring>button_5</cstring>
146 </property>
147 <property stdset="1">
148 <name>frameShape</name>
149 <enum>Box</enum>
150 </property>
151 <property stdset="1">
152 <name>frameShadow</name>
153 <enum>Raised</enum>
154 </property>
155 <property stdset="1">
156 <name>text</name>
157 <string>5</string>
158 </property>
159 <property stdset="1">
160 <name>alignment</name>
161 <set>AlignCenter</set>
162 </property>
163 <property>
164 <name>hAlign</name>
165 </property>
166 </widget>
167 <widget row="3" column="2" >
168 <class>QLabel</class>
169 <property stdset="1">
170 <name>name</name>
171 <cstring>button_6</cstring>
172 </property>
173 <property stdset="1">
174 <name>frameShape</name>
175 <enum>Box</enum>
176 </property>
177 <property stdset="1">
178 <name>frameShadow</name>
179 <enum>Raised</enum>
180 </property>
181 <property stdset="1">
182 <name>text</name>
183 <string>6</string>
184 </property>
185 <property stdset="1">
186 <name>alignment</name>
187 <set>AlignCenter</set>
188 </property>
189 <property>
190 <name>hAlign</name>
191 </property>
192 </widget>
193 <widget row="4" column="0" >
194 <class>QLabel</class>
195 <property stdset="1">
196 <name>name</name>
197 <cstring>button_7</cstring>
198 </property>
199 <property stdset="1">
200 <name>frameShape</name>
201 <enum>Box</enum>
202 </property>
203 <property stdset="1">
204 <name>frameShadow</name>
205 <enum>Raised</enum>
206 </property>
207 <property stdset="1">
208 <name>text</name>
209 <string>7</string>
210 </property>
211 <property stdset="1">
212 <name>alignment</name>
213 <set>AlignCenter</set>
214 </property>
215 <property>
216 <name>hAlign</name>
217 </property>
218 </widget>
219 <widget row="4" column="1" >
220 <class>QLabel</class>
221 <property stdset="1">
222 <name>name</name>
223 <cstring>button_8</cstring>
224 </property>
225 <property stdset="1">
226 <name>frameShape</name>
227 <enum>Box</enum>
228 </property>
229 <property stdset="1">
230 <name>frameShadow</name>
231 <enum>Raised</enum>
232 </property>
233 <property stdset="1">
234 <name>text</name>
235 <string>8</string>
236 </property>
237 <property stdset="1">
238 <name>alignment</name>
239 <set>AlignCenter</set>
240 </property>
241 <property>
242 <name>hAlign</name>
243 </property>
244 </widget>
245 <widget row="4" column="2" >
246 <class>QLabel</class>
247 <property stdset="1">
248 <name>name</name>
249 <cstring>button_9</cstring>
250 </property>
251 <property stdset="1">
252 <name>frameShape</name>
253 <enum>Box</enum>
254 </property>
255 <property stdset="1">
256 <name>frameShadow</name>
257 <enum>Raised</enum>
258 </property>
259 <property stdset="1">
260 <name>text</name>
261 <string>9</string>
262 </property>
263 <property stdset="1">
264 <name>alignment</name>
265 <set>AlignCenter</set>
266 </property>
267 <property>
268 <name>hAlign</name>
269 </property>
270 <property>
271 <name>layoutMargin</name>
272 </property>
273 <property>
274 <name>layoutSpacing</name>
275 </property>
276 </widget>
277 <widget row="5" column="0" >
278 <class>QLabel</class>
279 <property stdset="1">
280 <name>name</name>
281 <cstring>button_0</cstring>
282 </property>
283 <property stdset="1">
284 <name>frameShape</name>
285 <enum>Box</enum>
286 </property>
287 <property stdset="1">
288 <name>frameShadow</name>
289 <enum>Raised</enum>
290 </property>
291 <property stdset="1">
292 <name>text</name>
293 <string>0</string>
294 </property>
295 <property stdset="1">
296 <name>alignment</name>
297 <set>AlignCenter</set>
298 </property>
299 <property>
300 <name>hAlign</name>
301 </property>
302 <property>
303 <name>layoutMargin</name>
304 </property>
305 <property>
306 <name>layoutSpacing</name>
307 </property>
308 </widget>
309 <widget row="5" column="1" rowspan="1" colspan="2" >
310 <class>QLabel</class>
311 <property stdset="1">
312 <name>name</name>
313 <cstring>button_OK</cstring>
314 </property>
315 <property stdset="1">
316 <name>frameShape</name>
317 <enum>Box</enum>
318 </property>
319 <property stdset="1">
320 <name>frameShadow</name>
321 <enum>Raised</enum>
322 </property>
323 <property stdset="1">
324 <name>text</name>
325 <string>OK</string>
326 </property>
327 <property stdset="1">
328 <name>alignment</name>
329 <set>AlignCenter</set>
330 </property>
331 <property>
332 <name>hAlign</name>
333 </property>
334 </widget>
335 <widget row="0" column="0" rowspan="1" colspan="3" >
336 <class>QLabel</class>
337 <property stdset="1">
338 <name>name</name>
339 <cstring>prompt</cstring>
340 </property>
341 <property stdset="1">
342 <name>font</name>
343 <font>
344 <pointsize>18</pointsize>
345 </font>
346 </property>
347 <property stdset="1">
348 <name>text</name>
349 <string>Enter passcode</string>
350 </property>
351 </widget>
352 <widget row="1" column="0" rowspan="1" colspan="3" >
353 <class>QLineEdit</class>
354 <property stdset="1">
355 <name>name</name>
356 <cstring>display</cstring>
357 </property>
358 <property stdset="1">
359 <name>enabled</name>
360 <bool>false</bool>
361 </property>
362 <property stdset="1">
363 <name>palette</name>
364 <palette>
365 <active>
366 <color>
367 <red>0</red>
368 <green>0</green>
369 <blue>0</blue>
370 </color>
371 <color>
372 <red>228</red>
373 <green>228</green>
374 <blue>228</blue>
375 </color>
376 <color>
377 <red>255</red>
378 <green>255</green>
379 <blue>255</blue>
380 </color>
381 <color>
382 <red>242</red>
383 <green>242</green>
384 <blue>242</blue>
385 </color>
386 <color>
387 <red>78</red>
388 <green>78</green>
389 <blue>78</blue>
390 </color>
391 <color>
392 <red>183</red>
393 <green>183</green>
394 <blue>183</blue>
395 </color>
396 <color>
397 <red>0</red>
398 <green>0</green>
399 <blue>0</blue>
400 </color>
401 <color>
402 <red>255</red>
403 <green>255</green>
404 <blue>255</blue>
405 </color>
406 <color>
407 <red>0</red>
408 <green>0</green>
409 <blue>0</blue>
410 </color>
411 <color>
412 <red>255</red>
413 <green>255</green>
414 <blue>255</blue>
415 </color>
416 <color>
417 <red>220</red>
418 <green>220</green>
419 <blue>220</blue>
420 </color>
421 <color>
422 <red>0</red>
423 <green>0</green>
424 <blue>0</blue>
425 </color>
426 <color>
427 <red>10</red>
428 <green>95</green>
429 <blue>137</blue>
430 </color>
431 <color>
432 <red>255</red>
433 <green>255</green>
434 <blue>255</blue>
435 </color>
436 </active>
437 <disabled>
438 <color>
439 <red>128</red>
440 <green>128</green>
441 <blue>128</blue>
442 </color>
443 <color>
444 <red>228</red>
445 <green>228</green>
446 <blue>228</blue>
447 </color>
448 <color>
449 <red>255</red>
450 <green>255</green>
451 <blue>255</blue>
452 </color>
453 <color>
454 <red>255</red>
455 <green>255</green>
456 <blue>255</blue>
457 </color>
458 <color>
459 <red>114</red>
460 <green>114</green>
461 <blue>114</blue>
462 </color>
463 <color>
464 <red>152</red>
465 <green>152</green>
466 <blue>152</blue>
467 </color>
468 <color>
469 <red>0</red>
470 <green>0</green>
471 <blue>0</blue>
472 </color>
473 <color>
474 <red>255</red>
475 <green>255</green>
476 <blue>255</blue>
477 </color>
478 <color>
479 <red>0</red>
480 <green>0</green>
481 <blue>0</blue>
482 </color>
483 <color>
484 <red>255</red>
485 <green>255</green>
486 <blue>255</blue>
487 </color>
488 <color>
489 <red>220</red>
490 <green>220</green>
491 <blue>220</blue>
492 </color>
493 <color>
494 <red>0</red>
495 <green>0</green>
496 <blue>0</blue>
497 </color>
498 <color>
499 <red>0</red>
500 <green>0</green>
501 <blue>128</blue>
502 </color>
503 <color>
504 <red>255</red>
505 <green>255</green>
506 <blue>255</blue>
507 </color>
508 </disabled>
509 <inactive>
510 <color>
511 <red>0</red>
512 <green>0</green>
513 <blue>0</blue>
514 </color>
515 <color>
516 <red>228</red>
517 <green>228</green>
518 <blue>228</blue>
519 </color>
520 <color>
521 <red>255</red>
522 <green>255</green>
523 <blue>255</blue>
524 </color>
525 <color>
526 <red>242</red>
527 <green>242</green>
528 <blue>242</blue>
529 </color>
530 <color>
531 <red>78</red>
532 <green>78</green>
533 <blue>78</blue>
534 </color>
535 <color>
536 <red>183</red>
537 <green>183</green>
538 <blue>183</blue>
539 </color>
540 <color>
541 <red>0</red>
542 <green>0</green>
543 <blue>0</blue>
544 </color>
545 <color>
546 <red>255</red>
547 <green>255</green>
548 <blue>255</blue>
549 </color>
550 <color>
551 <red>0</red>
552 <green>0</green>
553 <blue>0</blue>
554 </color>
555 <color>
556 <red>255</red>
557 <green>255</green>
558 <blue>255</blue>
559 </color>
560 <color>
561 <red>220</red>
562 <green>220</green>
563 <blue>220</blue>
564 </color>
565 <color>
566 <red>0</red>
567 <green>0</green>
568 <blue>0</blue>
569 </color>
570 <color>
571 <red>10</red>
572 <green>95</green>
573 <blue>137</blue>
574 </color>
575 <color>
576 <red>255</red>
577 <green>255</green>
578 <blue>255</blue>
579 </color>
580 </inactive>
581 </palette>
582 </property>
583 <property stdset="1">
584 <name>echoMode</name>
585 <enum>Password</enum>
586 </property>
587 </widget>
588 </grid>
589</widget>
590</UI>
diff --git a/library/power.cpp b/library/power.cpp
new file mode 100644
index 0000000..990ff62
--- a/dev/null
+++ b/library/power.cpp
@@ -0,0 +1,226 @@
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 "power.h"
22
23#ifdef QT_QWS_CUSTOM
24#include "custom.h"
25#endif
26
27#include <unistd.h>
28#include <stdlib.h>
29#include <stdio.h>
30#include <fcntl.h>
31#include <sys/ioctl.h>
32
33#ifdef QT_QWS_IPAQ_NO_APM
34#include <linux/h3600_ts.h>
35#endif
36
37PowerStatusManager *PowerStatusManager::powerManager = 0;
38PowerStatus *PowerStatusManager::ps = 0;
39
40static bool haveProcApm = false;
41
42PowerStatusManager::PowerStatusManager()
43{
44 powerManager = this;
45 ps = new PowerStatus;
46 FILE *f = fopen("/proc/apm", "r");
47 if ( f ) {
48 fclose(f);
49 haveProcApm = TRUE;
50 }
51}
52
53const PowerStatus &PowerStatusManager::readStatus()
54{
55 if ( !powerManager )
56 (void)new PowerStatusManager;
57
58 powerManager->getStatus();
59
60 return *ps;
61}
62
63// Standard /proc/apm reader
64bool PowerStatusManager::getProcApmStatus( int &ac, int &bs, int &bf, int &pc, int &sec )
65{
66 bool ok = false;
67
68 ac = 0xff;
69 bs = 0xff;
70 bf = 0xff;
71 pc = -1;
72 sec = -1;
73
74 FILE *f = fopen("/proc/apm", "r");
75 if ( f ) {
76 //I 1.13 1.2 0x02 0x00 0xff 0xff 49% 147 sec
77 char u;
78 fscanf(f, "%*[^ ] %*d.%*d 0x%*x 0x%x 0x%x 0x%x %d%% %i %c",
79 &ac, &bs, &bf, &pc, &sec, &u);
80 fclose(f);
81 switch ( u ) {
82 case 'm': sec *= 60;
83 case 's': break; // ok
84 default: sec = -1; // unknown
85 }
86
87 // extract data
88 switch ( bs ) {
89 case 0x00:
90 ps->bs = PowerStatus::High;
91 break;
92 case 0x01:
93 ps->bs = PowerStatus::Low;
94 break;
95 case 0x7f:
96 ps->bs = PowerStatus::VeryLow;
97 break;
98 case 0x02:
99 ps->bs = PowerStatus::Critical;
100 break;
101 case 0x03:
102 ps->bs = PowerStatus::Charging;
103 break;
104 case 0x04:
105 ps->bs = PowerStatus::NotPresent;
106 break;
107 }
108
109 switch ( ac ) {
110 case 0x00:
111 ps->ac = PowerStatus::Offline;
112 break;
113 case 0x01:
114 ps->ac = PowerStatus::Online;
115 break;
116 case 0x02:
117 ps->ac = PowerStatus::Backup;
118 break;
119 }
120
121 if ( pc > 100 )
122 pc = -1;
123
124 ps->percentRemain = pc;
125 ps->secsRemain = sec;
126
127 ok = true;
128 }
129
130 return ok;
131}
132
133#ifdef QT_QWS_CUSTOM
134
135void PowerStatusManager::getStatus()
136{
137 int ac, bs, bf, pc, sec;
138 ps->percentAccurate = TRUE; // not for long...
139
140 if ( haveProcApm && getProcApmStatus( ac, bs, bf, pc, sec ) ) {
141 // special case
142 if ( bs == 0x7f )
143 ps->bs = PowerStatus::VeryLow;
144 pc = -1; // fake percentage
145 if ( pc < 0 ) {
146 switch ( bs ) {
147 case 0x00: ps->percentRemain = 100; break; // High
148 case 0x01: ps->percentRemain = 30; break; // Low
149 case 0x7f: ps->percentRemain = 10; break; // Very Low
150 case 0x02: ps->percentRemain = 5; break; // Critical
151 case 0x03: ps->percentRemain = -1; break; // Charging
152 }
153 ps->percentAccurate = FALSE;
154 }
155 }
156
157 char *device = "/dev/apm_bios";
158 int fd = ::open (device, O_WRONLY);
159 if ( fd >= 0 ) {
160 int bbat_status = ioctl( fd, APM_IOC_BATTERY_BACK_CHK, 0 );
161 switch ( bbat_status ) {
162 case 0x00:
163 ps->bbs = PowerStatus::High;
164 break;
165 case 0x01:
166 ps->bbs = PowerStatus::Low;
167 break;
168 case 0x7f:
169 ps->bbs = PowerStatus::VeryLow;
170 break;
171 case 0x02:
172 ps->bbs = PowerStatus::Critical;
173 break;
174 case 0x03:
175 ps->bbs = PowerStatus::Charging;
176 break;
177 case 0x04:
178 ps->bbs = PowerStatus::NotPresent;
179 break;
180 }
181 ::close(fd);
182 }
183}
184
185#else
186
187void PowerStatusManager::getStatus()
188{
189 bool usedApm = FALSE;
190
191 ps->percentAccurate = TRUE;
192
193 // Some iPAQ kernel builds don't have APM. If this is not the case we
194 // save ourselves an ioctl by testing if /proc/apm exists in the
195 // constructor and we use /proc/apm instead
196 int ac, bs, bf, pc, sec;
197 if ( haveProcApm )
198 usedApm = getProcApmStatus( ac, bs, bf, pc, sec );
199
200 if ( !usedApm ) {
201#ifdef QT_QWS_IPAQ_NO_APM
202 int fd;
203 int err;
204 struct bat_dev batt_info;
205
206 memset(&batt_info, 0, sizeof(batt_info));
207
208 fd = ::open("/dev/ts",O_RDONLY);
209 if( fd < 0 )
210 return;
211
212 ioctl(fd, GET_BATTERY_STATUS, &batt_info);
213 ac_status = batt_info.ac_status;
214 ps->percentRemain = ( 425 * batt_info.batt1_voltage ) / 1000 - 298; // from h3600_ts.c
215 ps->secsRemain = -1; // seconds is bogus on iPAQ
216 ::close (fd);
217#else
218 ps->percentRemain = 100;
219 ps->secsRemain = -1;
220 ps->percentAccurate = FALSE;
221#endif
222 }
223}
224
225#endif
226
diff --git a/library/power.h b/library/power.h
new file mode 100644
index 0000000..99d3595
--- a/dev/null
+++ b/library/power.h
@@ -0,0 +1,85 @@
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 POWER_H
22#define POWER_H
23
24#include <qobject.h>
25
26class PowerStatus
27{
28public:
29 PowerStatus() {
30 ac = Offline;
31 bs = NotPresent;
32 bbs = NotPresent;
33 percentRemain = -1;
34 secsRemain = -1;
35 }
36
37 enum ACStatus { Offline, Online, Backup };
38 ACStatus acStatus() const { return ac; }
39
40 enum BatteryStatus { High=0x01, Low=0x02, VeryLow=0x04, Critical=0x08,
41 Charging=0x10, NotPresent=0x20 };
42 BatteryStatus batteryStatus() const { return bs; }
43 BatteryStatus backupBatteryStatus() const { return bbs; }
44
45 bool batteryPercentAccurate() const { return percentAccurate; }
46 int batteryPercentRemaining() const { return percentRemain; }
47 int batteryTimeRemaining() const { return secsRemain; }
48
49 bool operator!=( const PowerStatus &ps ) {
50 return (ps.ac != ac) || (ps.bs != bs) || (ps.bbs != bbs) ||
51 (ps.percentRemain != percentRemain) ||
52 (ps.secsRemain != secsRemain );
53 }
54
55private:
56 ACStatus ac;
57 BatteryStatus bs;
58 BatteryStatus bbs;
59 int percentRemain;
60 int secsRemain;
61 bool percentAccurate;
62
63 friend class PowerStatusManager;
64};
65
66
67class PowerStatusManager
68{
69public:
70 PowerStatusManager();
71
72 static const PowerStatus &readStatus();
73
74protected:
75 bool getProcApmStatus( int &ac, int &bs, int &bf, int &pc, int &sec );
76 void getStatus();
77
78private:
79 static PowerStatus *ps;
80 static PowerStatusManager *powerManager;
81};
82
83
84#endif
85
diff --git a/library/process.cpp b/library/process.cpp
new file mode 100644
index 0000000..2e25dd5
--- a/dev/null
+++ b/library/process.cpp
@@ -0,0 +1,79 @@
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 <stdio.h>
22#include <stdlib.h>
23
24#include "process.h"
25
26#ifndef QT_NO_PROCESS
27
28#include "qapplication.h"
29
30
31Process::Process( QObject *parent, const char *name )
32 : QObject( parent, name ), ioRedirection( FALSE ), notifyOnExit( FALSE ),
33 wroteToStdinConnected( FALSE )
34{
35 init();
36}
37
38Process::Process( const QString& arg0, QObject *parent, const char *name )
39 : QObject( parent, name ), ioRedirection( FALSE ), notifyOnExit( FALSE ),
40 wroteToStdinConnected( FALSE )
41{
42 init();
43 addArgument( arg0 );
44}
45
46Process::Process( const QStringList& args, QObject *parent, const char *name )
47 : QObject( parent, name ), ioRedirection( FALSE ), notifyOnExit( FALSE ),
48 wroteToStdinConnected( FALSE )
49{
50 init();
51 setArguments( args );
52}
53
54
55QStringList Process::arguments() const
56{
57 return _arguments;
58}
59
60void Process::setArguments( const QStringList& args )
61{
62 _arguments = args;
63}
64
65void Process::addArgument( const QString& arg )
66{
67 _arguments.append( arg );
68}
69
70bool Process::exec( const QString& in, QString& out, QStringList *env )
71{
72 QByteArray sout;
73 QByteArray sin = in.local8Bit(); sin.resize(sin.size()-1); // cut nul
74 bool r = exec( sin, sout, env );
75 out = QString::fromLocal8Bit(sout);
76 return r;
77}
78
79#endif
diff --git a/library/process.h b/library/process.h
new file mode 100644
index 0000000..def68d7
--- a/dev/null
+++ b/library/process.h
@@ -0,0 +1,94 @@
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 PROCESS_H
22#define PROCESS_H
23
24//#ifndef QT_H
25#include "qobject.h"
26#include "qstringlist.h"
27#include "qdir.h"
28//#endif // QT_H
29
30//#ifndef QT_NO_PROCESS
31
32class ProcessPrivate;
33
34//
35//
36//
37//
38//
39//
40//
41//
42//
43//
44// This is a subset of the Process API found in Qt 3.0
45//
46//
47//
48//
49//
50//
51//
52//
53//
54//
55//
56
57class Q_EXPORT Process : public QObject
58{
59 Q_OBJECT
60public:
61 Process( QObject *parent=0, const char *name=0 );
62 Process( const QString& arg0, QObject *parent=0, const char *name=0 );
63 Process( const QStringList& args, QObject *parent=0, const char *name=0 );
64 ~Process();
65
66 // set and get the arguments and working directory
67 QStringList arguments() const;
68 virtual void setArguments( const QStringList& args );
69 virtual void addArgument( const QString& arg );
70 // control the execution
71 virtual bool exec( const QString& in, QString& out, QStringList *env=0 );
72 virtual bool exec( const QByteArray& in, QByteArray& out, QStringList *env=0 );
73
74private:
75 void init();
76
77private:
78 ProcessPrivate *d;
79 QStringList _arguments;
80
81 int exitStat; // exit status
82 bool exitNormal; // normal exit?
83 bool ioRedirection; // automatically set be (dis)connectNotify
84 bool notifyOnExit; // automatically set be (dis)connectNotify
85 bool wroteToStdinConnected; // automatically set be (dis)connectNotify
86
87 friend class ProcessPrivate;
88 friend class ProcessManager;
89 friend class Proc;
90};
91
92//#endif // QT_NO_PROCESS
93
94#endif // QPROCESS_H
diff --git a/library/process_unix.cpp b/library/process_unix.cpp
new file mode 100644
index 0000000..b599edb
--- a/dev/null
+++ b/library/process_unix.cpp
@@ -0,0 +1,502 @@
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 QT_H
22# include <qfeatures.h>
23#endif // QT_H
24
25#ifndef QT_NO_PROCESS
26
27//#include "qplatformdefs.h"
28#include <stdio.h>
29#include <unistd.h>
30#include <signal.h>
31#include <sys/types.h>
32#include <sys/socket.h>
33#include <fcntl.h>
34
35#include "process.h"
36#include "qapplication.h"
37//#include "qptrqueue.h"
38//#include "qptrlist.h"
39#include "qsocketnotifier.h"
40#include "qtimer.h"
41//#include "qcleanuphandler.h"
42#include "qregexp.h"
43
44#include <stdlib.h>
45#include <errno.h>
46
47#define QPtrList QList
48
49//#define QT_QPROCESS_DEBUG
50
51
52class Proc;
53class ProcessManager;
54class ProcessPrivate
55{
56public:
57 ProcessPrivate();
58 ~ProcessPrivate();
59
60 void closeOpenSocketsForChild();
61 void newProc( pid_t pid, Process *process );
62
63 QByteArray bufStdout;
64 QByteArray bufStderr;
65
66 QSocketNotifier *notifierStdin;
67 QSocketNotifier *notifierStdout;
68 QSocketNotifier *notifierStderr;
69
70 ssize_t stdinBufRead;
71 Proc *proc;
72
73 bool exitValuesCalculated;
74 bool socketReadCalled;
75
76 static ProcessManager *procManager;
77};
78
79
80/***********************************************************************
81 *
82 * Proc
83 *
84 **********************************************************************/
85/*
86 The class Process does not necessarily map exactly to the running
87 child processes: if the process is finished, the Process class may still be
88 there; furthermore a user can use Process to start more than one process.
89
90 The helper-class Proc has the semantics that one instance of this class maps
91 directly to a running child process.
92*/
93class Proc
94{
95public:
96 Proc( pid_t p, Process *proc=0 ) : pid(p), process(proc)
97 {
98#if defined(QT_QPROCESS_DEBUG)
99 qDebug( "Proc: Constructor for pid %d and Process %p", pid, process );
100#endif
101 socketStdin = 0;
102 socketStdout = 0;
103 socketStderr = 0;
104 }
105 ~Proc()
106 {
107#if defined(QT_QPROCESS_DEBUG)
108 qDebug( "Proc: Destructor for pid %d and Process %p", pid, process );
109#endif
110 if ( process != 0 ) {
111 if ( process->d->notifierStdin )
112 process->d->notifierStdin->setEnabled( FALSE );
113 if ( process->d->notifierStdout )
114 process->d->notifierStdout->setEnabled( FALSE );
115 if ( process->d->notifierStderr )
116 process->d->notifierStderr->setEnabled( FALSE );
117 process->d->proc = 0;
118 }
119 if( socketStdin != 0 )
120 ::close( socketStdin );
121 // ### close these sockets even on parent exit or is it better only on
122 // sigchld (but what do I have to do with them on exit then)?
123 if( socketStdout != 0 )
124 ::close( socketStdout );
125 if( socketStderr != 0 )
126 ::close( socketStderr );
127 }
128
129 pid_t pid;
130 int socketStdin;
131 int socketStdout;
132 int socketStderr;
133 Process *process;
134};
135
136/***********************************************************************
137 *
138 * ProcessManager
139 *
140 **********************************************************************/
141class ProcessManager : public QObject
142{
143 Q_OBJECT
144
145public:
146 ProcessManager();
147 ~ProcessManager();
148
149 void append( Proc *p );
150 void remove( Proc *p );
151
152public slots:
153 void removeMe();
154
155public:
156 struct sigaction oldactChld;
157 struct sigaction oldactPipe;
158 QPtrList<Proc> *procList;
159 int sigchldFd[2];
160};
161
162
163ProcessManager::ProcessManager()
164{
165 procList = new QPtrList<Proc>;
166 procList->setAutoDelete( TRUE );
167}
168
169ProcessManager::~ProcessManager()
170{
171 delete procList;
172}
173
174void ProcessManager::append( Proc *p )
175{
176 procList->append( p );
177#if defined(QT_QPROCESS_DEBUG)
178 qDebug( "ProcessManager: append process (procList.count(): %d)", procList->count() );
179#endif
180}
181
182void ProcessManager::remove( Proc *p )
183{
184 procList->remove( p );
185#if defined(QT_QPROCESS_DEBUG)
186 qDebug( "ProcessManager: remove process (procList.count(): %d)", procList->count() );
187#endif
188 if ( procList->count() == 0 ) {
189 QTimer::singleShot( 0, this, SLOT(removeMe()) );
190 }
191}
192
193void ProcessManager::removeMe()
194{
195 ProcessPrivate::procManager = 0;
196 delete this;
197}
198
199#include "process_unix.moc"
200
201
202/***********************************************************************
203 *
204 * ProcessPrivate
205 *
206 **********************************************************************/
207ProcessManager *ProcessPrivate::procManager = 0;
208
209ProcessPrivate::ProcessPrivate()
210{
211#if defined(QT_QPROCESS_DEBUG)
212 qDebug( "ProcessPrivate: Constructor" );
213#endif
214 stdinBufRead = 0;
215
216 notifierStdin = 0;
217 notifierStdout = 0;
218 notifierStderr = 0;
219
220 exitValuesCalculated = FALSE;
221 socketReadCalled = FALSE;
222
223 proc = 0;
224}
225
226ProcessPrivate::~ProcessPrivate()
227{
228#if defined(QT_QPROCESS_DEBUG)
229 qDebug( "ProcessPrivate: Destructor" );
230#endif
231
232 if ( proc != 0 ) {
233 if ( proc->socketStdin != 0 ) {
234 ::close( proc->socketStdin );
235 proc->socketStdin = 0;
236 }
237 proc->process = 0;
238 }
239
240 delete notifierStdin;
241 delete notifierStdout;
242 delete notifierStderr;
243}
244
245/*
246 Closes all open sockets in the child process that are not needed by the child
247 process. Otherwise one child may have an open socket on standard input, etc.
248 of another child.
249*/
250void ProcessPrivate::closeOpenSocketsForChild()
251{
252 if ( procManager != 0 ) {
253 if ( procManager->sigchldFd[0] != 0 )
254 ::close( procManager->sigchldFd[0] );
255 if ( procManager->sigchldFd[1] != 0 )
256 ::close( procManager->sigchldFd[1] );
257
258 // close also the sockets from other Process instances
259 Proc *proc;
260 for ( proc=procManager->procList->first(); proc!=0; proc=procManager->procList->next() ) {
261 ::close( proc->socketStdin );
262 ::close( proc->socketStdout );
263 ::close( proc->socketStderr );
264 }
265 }
266}
267
268void ProcessPrivate::newProc( pid_t pid, Process *process )
269{
270 proc = new Proc( pid, process );
271 if ( procManager == 0 ) {
272 procManager = new ProcessManager;
273 }
274 // the ProcessManager takes care of deleting the Proc instances
275 procManager->append( proc );
276}
277
278
279/***********************************************************************
280 *
281 * Process
282 *
283 **********************************************************************/
284/*!
285 This private class does basic initialization.
286*/
287void Process::init()
288{
289 d = new ProcessPrivate();
290 exitStat = 0;
291 exitNormal = FALSE;
292}
293
294/*!
295 Destroys the class.
296
297 If the process is running, it is NOT terminated! Standard input, standard
298 output and standard error of the process are closed.
299
300 \sa hangUp() kill()
301*/
302Process::~Process()
303{
304 delete d;
305}
306
307bool Process::exec( const QByteArray& in, QByteArray& out, QStringList *env )
308{
309#if defined(QT_QPROCESS_DEBUG)
310 qDebug( "Process::exec()" );
311#endif
312
313 int sStdin[2];
314 int sStdout[2];
315 int sStderr[2];
316
317 // open sockets for piping
318 if ( ::socketpair( AF_UNIX, SOCK_STREAM, 0, sStdin ) ) {
319 return FALSE;
320 }
321 if ( ::socketpair( AF_UNIX, SOCK_STREAM, 0, sStderr ) ) {
322 return FALSE;
323 }
324 if ( ::socketpair( AF_UNIX, SOCK_STREAM, 0, sStdout ) ) {
325 return FALSE;
326 }
327
328 // the following pipe is only used to determine if the process could be
329 // started
330 int fd[2];
331 if ( pipe( fd ) < 0 ) {
332 // non critical error, go on
333 fd[0] = 0;
334 fd[1] = 0;
335 }
336
337 // construct the arguments for exec
338 QCString *arglistQ = new QCString[ _arguments.count() + 1 ];
339 const char** arglist = new const char*[ _arguments.count() + 1 ];
340 int i = 0;
341 for ( QStringList::Iterator it = _arguments.begin(); it != _arguments.end(); ++it ) {
342 arglistQ[i] = (*it).local8Bit();
343 arglist[i] = arglistQ[i];
344#if defined(QT_QPROCESS_DEBUG)
345 qDebug( "Process::start(): arg %d = %s", i, arglist[i] );
346#endif
347 i++;
348 }
349 arglist[i] = 0;
350
351 // fork and exec
352 QApplication::flushX();
353 pid_t pid = fork();
354 if ( pid == 0 ) {
355 // child
356 d->closeOpenSocketsForChild();
357 ::close( sStdin[1] );
358 ::close( sStdout[0] );
359 ::close( sStderr[0] );
360 ::dup2( sStdin[0], STDIN_FILENO );
361 ::dup2( sStdout[1], STDOUT_FILENO );
362 ::dup2( sStderr[1], STDERR_FILENO );
363 if ( fd[0] )
364 ::close( fd[0] );
365 if ( fd[1] )
366 ::fcntl( fd[1], F_SETFD, FD_CLOEXEC ); // close on exec shows sucess
367
368 if ( env == 0 ) { // inherit environment and start process
369 ::execvp( arglist[0], (char*const*)arglist ); // ### cast not nice
370 } else { // start process with environment settins as specified in env
371 // construct the environment for exec
372 int numEntries = env->count();
373 bool setLibraryPath =
374 env->grep( QRegExp( "^LD_LIBRARY_PATH=" ) ).isEmpty() &&
375 getenv( "LD_LIBRARY_PATH" ) != 0;
376 if ( setLibraryPath )
377 numEntries++;
378 QCString *envlistQ = new QCString[ numEntries + 1 ];
379 const char** envlist = new const char*[ numEntries + 1 ];
380 int i = 0;
381 if ( setLibraryPath ) {
382 envlistQ[i] = QString( "LD_LIBRARY_PATH=%1" ).arg( getenv( "LD_LIBRARY_PATH" ) ).local8Bit();
383 envlist[i] = envlistQ[i];
384 i++;
385 }
386 for ( QStringList::Iterator it = env->begin(); it != env->end(); ++it ) {
387 envlistQ[i] = (*it).local8Bit();
388 envlist[i] = envlistQ[i];
389 i++;
390 }
391 envlist[i] = 0;
392
393 // look for the executable in the search path
394 if ( _arguments.count()>0 && getenv("PATH")!=0 ) {
395 QString command = _arguments[0];
396 if ( !command.contains( '/' ) ) {
397 QStringList pathList = QStringList::split( ':', getenv( "PATH" ) );
398 for (QStringList::Iterator it = pathList.begin(); it != pathList.end(); ++it ) {
399 QFileInfo fileInfo( *it, command );
400 if ( fileInfo.isExecutable() ) {
401 arglistQ[0] = fileInfo.filePath().local8Bit();
402 arglist[0] = arglistQ[0];
403 break;
404 }
405 }
406 }
407 }
408 ::execve( arglist[0], (char*const*)arglist, (char*const*)envlist ); // ### casts not nice
409 }
410 if ( fd[1] ) {
411 char buf = 0;
412 ::write( fd[1], &buf, 1 );
413 ::close( fd[1] );
414 }
415 ::exit( -1 );
416 } else if ( pid == -1 ) {
417 // error forking
418 goto error;
419 }
420 // test if exec was successful
421 if ( fd[1] )
422 close( fd[1] );
423 if ( fd[0] ) {
424 char buf;
425 for ( ;; ) {
426 int n = ::read( fd[0], &buf, 1 );
427 if ( n==1 ) {
428 // socket was not closed => error
429 goto error;
430 } else if ( n==-1 ) {
431 if ( errno==EAGAIN || errno==EINTR )
432 // try it again
433 continue;
434 }
435 break;
436 }
437 }
438
439
440 ::close( sStdin[0] );
441 ::close( sStdout[1] );
442 ::close( sStderr[1] );
443
444 // DIFFERENT
445
446 {
447 int written=0;
448 int readden=0; // sic.
449 while (1) {
450 const int bufsize=4096;
451 struct timeval *timeout = 0; // #### could have this
452 fd_set r; FD_ZERO(&r);
453 fd_set w; FD_ZERO(&w);
454 FD_SET( sStdout[0], &r );
455 out.resize( readden+bufsize );
456 if ( int(in.size()) > written )
457 FD_SET( sStdin[1], &w );
458 int highest = QMAX(sStdout[0],sStdin[1])+1;
459 select(highest, &r, &w, 0, timeout);
460 if ( FD_ISSET( sStdout[0], &r ) ) {
461 int n = read( sStdout[0], out.data()+readden, bufsize );
462 if ( n > 0 )
463 readden += n;
464 else
465 break;
466 }
467 if ( FD_ISSET( sStdin[1], &w ) ) {
468 int n = write( sStdin[1], in.data()+written, in.size()-written );
469 if ( n > 0 )
470 written += n;
471 }
472 }
473 out.resize(readden);
474 }
475
476 // cleanup and return
477 delete[] arglistQ;
478 delete[] arglist;
479 ::close( sStdin[1] );
480 ::close( sStdout[0] );
481 ::close( sStderr[0] );
482 return TRUE;
483
484error:
485#if defined(QT_QPROCESS_DEBUG)
486 qDebug( "Process::start(): error starting process" );
487#endif
488 ::close( sStdin[1] );
489 ::close( sStdout[0] );
490 ::close( sStderr[0] );
491 ::close( sStdin[0] );
492 ::close( sStdout[1] );
493 ::close( sStderr[1] );
494 ::close( fd[0] );
495 ::close( fd[1] );
496 delete[] arglistQ;
497 delete[] arglist;
498 return FALSE;
499}
500
501
502#endif // QT_NO_PROCESS
diff --git a/library/proxies.cpp b/library/proxies.cpp
new file mode 100644
index 0000000..eff943e
--- a/dev/null
+++ b/library/proxies.cpp
@@ -0,0 +1,118 @@
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 "proxies.h"
22#include "proxiesbase_p.h"
23#include "config.h"
24
25#include <qcombobox.h>
26#include <qlineedit.h>
27#include <qframe.h>
28#include <qvalidator.h>
29#include <qspinbox.h>
30#include <qradiobutton.h>
31
32Proxies::Proxies( QWidget* parent ) :
33 QVBox(parent)
34{
35 d = new ProxiesBase( this );
36 connect(d->type,SIGNAL(activated(int)),this,SLOT(typeChanged(int)));
37}
38
39void Proxies::typeChanged(int t)
40{
41 switch (t) {
42 case 0: d->autopanel->hide(); d->setpanel->hide(); break;
43 case 1: d->setpanel->hide(); d->autopanel->show(); break;
44 case 2: d->autopanel->hide(); d->setpanel->show(); break;
45 }
46}
47
48class ProxyValidator : public QValidator {
49public:
50 ProxyValidator( QWidget * parent, const char *name = 0 ) :
51 QValidator(parent,name)
52 {
53 }
54
55 State validate( QString &s, int &pos ) const
56 {
57 int i;
58 for (i=0; i<(int)s.length(); i++) {
59 if ( s[i] == ',' || s[i] == ';' || s[i] == '\n' || s[i] == '\r' )
60 s[i] = ' ';
61 }
62 for (i=0; i<(int)s.length()-1; ) {
63 if ( s[i] == ' ' && s[i+1] == ' ' ) {
64 if (pos>i) pos--;
65 s = s.left(i)+s.mid(i+2);
66 } else
67 i++;
68 }
69 return Valid;
70 }
71};
72
73void Proxies::readConfig(Config& cfg)
74{
75 int t = cfg.readNumEntry("type",0);
76 d->type->setCurrentItem(t);
77 typeChanged(t);
78
79 QString s;
80
81 s = cfg.readEntry("autoconfig");
82 if ( !s.isEmpty() )
83 d->autoconfig->insertItem(s);
84
85
86 s = cfg.readEntry("httphost");
87 if ( !s.isEmpty() )
88 d->httphost->setText(s);
89
90 int i;
91 i = cfg.readNumEntry("httpport");
92 if ( i>0 )
93 d->httpport->setValue(i);
94
95 s = cfg.readEntry("ftphost");
96 if ( !s.isEmpty() )
97 d->ftphost->setText(s);
98
99 i = cfg.readNumEntry("ftpport");
100 if ( i>0 )
101 d->ftpport->setValue(i);
102
103 s = cfg.readEntry("noproxies");
104 d->noproxies->setValidator(new ProxyValidator(this));
105 d->noproxies->setText(s);
106}
107
108void Proxies::writeConfig( Config &cfg )
109{
110 cfg.writeEntry("type",d->type->currentItem());
111 cfg.writeEntry("autoconfig", d->autoconfig->currentText());
112 cfg.writeEntry("httphost", d->httphost->text());
113 cfg.writeEntry("httpport", d->httpport->text());
114 cfg.writeEntry("ftphost", d->ftphost->text());
115 cfg.writeEntry("ftpport", d->ftpport->text());
116 cfg.writeEntry("noproxies", d->noproxies->text());
117}
118
diff --git a/library/proxies.h b/library/proxies.h
new file mode 100644
index 0000000..665de89
--- a/dev/null
+++ b/library/proxies.h
@@ -0,0 +1,45 @@
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#ifndef PROXIESSETTINGS_H
21#define PROXIESSETTINGS_H
22
23#include <qvbox.h>
24#include "config.h"
25
26class ProxiesBase;
27
28class Proxies : public QVBox {
29 Q_OBJECT
30
31public:
32 Proxies( QWidget* parent );
33
34 void readConfig( Config &cfg );
35 void writeConfig( Config &cfg );
36
37private slots:
38 void typeChanged(int);
39
40private:
41 ProxiesBase* d;
42};
43
44#endif
45
diff --git a/library/proxiesbase_p.ui b/library/proxiesbase_p.ui
new file mode 100644
index 0000000..b005a78
--- a/dev/null
+++ b/library/proxiesbase_p.ui
@@ -0,0 +1,360 @@
1<!DOCTYPE UI><UI>
2<class>ProxiesBase</class>
3<widget>
4 <class>QWidget</class>
5 <property stdset="1">
6 <name>name</name>
7 <cstring>ProxiesBase</cstring>
8 </property>
9 <property stdset="1">
10 <name>geometry</name>
11 <rect>
12 <x>0</x>
13 <y>0</y>
14 <width>321</width>
15 <height>366</height>
16 </rect>
17 </property>
18 <property stdset="1">
19 <name>caption</name>
20 <string>Proxy Settings</string>
21 </property>
22 <property>
23 <name>layoutMargin</name>
24 </property>
25 <property>
26 <name>layoutSpacing</name>
27 </property>
28 <vbox>
29 <property stdset="1">
30 <name>margin</name>
31 <number>2</number>
32 </property>
33 <property stdset="1">
34 <name>spacing</name>
35 <number>0</number>
36 </property>
37 <widget>
38 <class>QComboBox</class>
39 <item>
40 <property>
41 <name>text</name>
42 <string>No proxies</string>
43 </property>
44 </item>
45 <item>
46 <property>
47 <name>text</name>
48 <string>Auto configure proxies</string>
49 </property>
50 </item>
51 <item>
52 <property>
53 <name>text</name>
54 <string>Set proxies</string>
55 </property>
56 </item>
57 <property stdset="1">
58 <name>name</name>
59 <cstring>type</cstring>
60 </property>
61 </widget>
62 <widget>
63 <class>QFrame</class>
64 <property stdset="1">
65 <name>name</name>
66 <cstring>autopanel</cstring>
67 </property>
68 <property stdset="1">
69 <name>frameShape</name>
70 <enum>NoFrame</enum>
71 </property>
72 <property stdset="1">
73 <name>frameShadow</name>
74 <enum>Raised</enum>
75 </property>
76 <property>
77 <name>layoutMargin</name>
78 </property>
79 <property>
80 <name>layoutSpacing</name>
81 </property>
82 <vbox>
83 <property stdset="1">
84 <name>margin</name>
85 <number>1</number>
86 </property>
87 <property stdset="1">
88 <name>spacing</name>
89 <number>0</number>
90 </property>
91 <spacer>
92 <property>
93 <name>name</name>
94 <cstring>Spacer5</cstring>
95 </property>
96 <property stdset="1">
97 <name>orientation</name>
98 <enum>Vertical</enum>
99 </property>
100 <property stdset="1">
101 <name>sizeType</name>
102 <enum>Fixed</enum>
103 </property>
104 <property>
105 <name>sizeHint</name>
106 <size>
107 <width>20</width>
108 <height>21</height>
109 </size>
110 </property>
111 </spacer>
112 <widget>
113 <class>QLayoutWidget</class>
114 <property stdset="1">
115 <name>name</name>
116 <cstring>Layout6</cstring>
117 </property>
118 <hbox>
119 <property stdset="1">
120 <name>margin</name>
121 <number>0</number>
122 </property>
123 <property stdset="1">
124 <name>spacing</name>
125 <number>6</number>
126 </property>
127 <widget>
128 <class>QLabel</class>
129 <property stdset="1">
130 <name>name</name>
131 <cstring>TextLabel10</cstring>
132 </property>
133 <property stdset="1">
134 <name>text</name>
135 <string>Config:</string>
136 </property>
137 </widget>
138 <widget>
139 <class>QComboBox</class>
140 <property stdset="1">
141 <name>name</name>
142 <cstring>autoconfig</cstring>
143 </property>
144 <property stdset="1">
145 <name>sizePolicy</name>
146 <sizepolicy>
147 <hsizetype>7</hsizetype>
148 <vsizetype>0</vsizetype>
149 </sizepolicy>
150 </property>
151 <property stdset="1">
152 <name>editable</name>
153 <bool>true</bool>
154 </property>
155 </widget>
156 </hbox>
157 </widget>
158 <spacer>
159 <property>
160 <name>name</name>
161 <cstring>Spacer27</cstring>
162 </property>
163 <property stdset="1">
164 <name>orientation</name>
165 <enum>Vertical</enum>
166 </property>
167 <property stdset="1">
168 <name>sizeType</name>
169 <enum>Expanding</enum>
170 </property>
171 <property>
172 <name>sizeHint</name>
173 <size>
174 <width>20</width>
175 <height>20</height>
176 </size>
177 </property>
178 </spacer>
179 </vbox>
180 </widget>
181 <widget>
182 <class>QFrame</class>
183 <property stdset="1">
184 <name>name</name>
185 <cstring>setpanel</cstring>
186 </property>
187 <property stdset="1">
188 <name>frameShape</name>
189 <enum>NoFrame</enum>
190 </property>
191 <property stdset="1">
192 <name>frameShadow</name>
193 <enum>Raised</enum>
194 </property>
195 <property>
196 <name>layoutMargin</name>
197 </property>
198 <property>
199 <name>layoutSpacing</name>
200 </property>
201 <grid>
202 <property stdset="1">
203 <name>margin</name>
204 <number>11</number>
205 </property>
206 <property stdset="1">
207 <name>spacing</name>
208 <number>6</number>
209 </property>
210 <widget row="0" column="2" >
211 <class>QLabel</class>
212 <property stdset="1">
213 <name>name</name>
214 <cstring>TextLabel9</cstring>
215 </property>
216 <property stdset="1">
217 <name>text</name>
218 <string>Port:</string>
219 </property>
220 </widget>
221 <widget row="1" column="0" >
222 <class>QLabel</class>
223 <property stdset="1">
224 <name>name</name>
225 <cstring>TextLabel1</cstring>
226 </property>
227 <property stdset="1">
228 <name>text</name>
229 <string>HTTP:</string>
230 </property>
231 </widget>
232 <widget row="2" column="0" >
233 <class>QLabel</class>
234 <property stdset="1">
235 <name>name</name>
236 <cstring>TextLabel2</cstring>
237 </property>
238 <property stdset="1">
239 <name>text</name>
240 <string>FTP:</string>
241 </property>
242 </widget>
243 <widget row="0" column="1" >
244 <class>QLabel</class>
245 <property stdset="1">
246 <name>name</name>
247 <cstring>TextLabel8</cstring>
248 </property>
249 <property stdset="1">
250 <name>text</name>
251 <string>Host:</string>
252 </property>
253 </widget>
254 <widget row="1" column="2" >
255 <class>QSpinBox</class>
256 <property stdset="1">
257 <name>name</name>
258 <cstring>httpport</cstring>
259 </property>
260 <property stdset="1">
261 <name>buttonSymbols</name>
262 <enum>PlusMinus</enum>
263 </property>
264 <property stdset="1">
265 <name>maxValue</name>
266 <number>32767</number>
267 </property>
268 <property stdset="1">
269 <name>value</name>
270 <number>8080</number>
271 </property>
272 </widget>
273 <widget row="2" column="2" >
274 <class>QSpinBox</class>
275 <property stdset="1">
276 <name>name</name>
277 <cstring>ftpport</cstring>
278 </property>
279 <property stdset="1">
280 <name>buttonSymbols</name>
281 <enum>PlusMinus</enum>
282 </property>
283 <property stdset="1">
284 <name>maxValue</name>
285 <number>32767</number>
286 </property>
287 <property stdset="1">
288 <name>value</name>
289 <number>8080</number>
290 </property>
291 </widget>
292 <widget row="4" column="0" rowspan="1" colspan="3" >
293 <class>QLabel</class>
294 <property stdset="1">
295 <name>name</name>
296 <cstring>TextLabel3</cstring>
297 </property>
298 <property stdset="1">
299 <name>text</name>
300 <string>No proxies for:</string>
301 </property>
302 </widget>
303 <widget row="5" column="0" rowspan="1" colspan="3" >
304 <class>QLineEdit</class>
305 <property stdset="1">
306 <name>name</name>
307 <cstring>noproxies</cstring>
308 </property>
309 </widget>
310 <widget row="1" column="1" >
311 <class>QLineEdit</class>
312 <property stdset="1">
313 <name>name</name>
314 <cstring>httphost</cstring>
315 </property>
316 </widget>
317 <widget row="2" column="1" >
318 <class>QLineEdit</class>
319 <property stdset="1">
320 <name>name</name>
321 <cstring>ftphost</cstring>
322 </property>
323 </widget>
324 <widget row="3" column="0" rowspan="1" colspan="3" >
325 <class>Line</class>
326 <property stdset="1">
327 <name>name</name>
328 <cstring>Line1</cstring>
329 </property>
330 <property stdset="1">
331 <name>orientation</name>
332 <enum>Horizontal</enum>
333 </property>
334 </widget>
335 </grid>
336 </widget>
337 <spacer>
338 <property>
339 <name>name</name>
340 <cstring>Spacer6</cstring>
341 </property>
342 <property stdset="1">
343 <name>orientation</name>
344 <enum>Vertical</enum>
345 </property>
346 <property stdset="1">
347 <name>sizeType</name>
348 <enum>Expanding</enum>
349 </property>
350 <property>
351 <name>sizeHint</name>
352 <size>
353 <width>20</width>
354 <height>20</height>
355 </size>
356 </property>
357 </spacer>
358 </vbox>
359</widget>
360</UI>
diff --git a/library/qcleanuphandler_p.h b/library/qcleanuphandler_p.h
new file mode 100644
index 0000000..d8cddac
--- a/dev/null
+++ b/library/qcleanuphandler_p.h
@@ -0,0 +1,51 @@
1#ifndef QCLEANUPHANDLER_H
2#define QCLEANUPHANDLER_H
3
4#ifndef QT_H
5#include <qlist.h>
6#endif // QT_H
7
8template<class Type>
9class Q_EXPORT QCleanupHandler
10{
11public:
12 QCleanupHandler() : cleanupObjects( 0 ) {}
13 ~QCleanupHandler() { clear(); }
14
15 Type* add( Type **object ) {
16 if ( !cleanupObjects )
17 cleanupObjects = new QList<Type*>;
18 cleanupObjects->insert( 0, object );
19 return *object;
20 }
21
22 void remove( Type **object ) {
23 if ( !cleanupObjects )
24 return;
25 if ( cleanupObjects->findRef( object ) >= 0 )
26 (void) cleanupObjects->take();
27 }
28
29 bool isEmpty() const {
30 return cleanupObjects ? cleanupObjects->isEmpty() : TRUE;
31 }
32
33 void clear() {
34 if ( !cleanupObjects )
35 return;
36 QListIterator<Type*> it( *cleanupObjects );
37 Type **object;
38 while ( ( object = it.current() ) ) {
39 delete *object;
40 *object = 0;
41 cleanupObjects->remove( object );
42 }
43 delete cleanupObjects;
44 cleanupObjects = 0;
45 }
46
47private:
48 QList<Type*> *cleanupObjects;
49};
50
51#endif //QCLEANUPHANDLER_H
diff --git a/library/qcom.h b/library/qcom.h
new file mode 100644
index 0000000..229be2b
--- a/dev/null
+++ b/library/qcom.h
@@ -0,0 +1,83 @@
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 QCOM_H
22#define QCOM_H
23
24#include <qstringlist.h>
25
26#ifndef QT_NO_COMPONENT
27
28#include <qpe/quuid.h>
29
30#define QRESULT unsigned long
31#define QS_OK (QRESULT)0x00000000
32#define QS_FALSE (QRESULT)0x00000001
33
34#define QE_NOTIMPL (QRESULT)0x80000001
35#define QE_OUTOFMEMORY (QRESULT)0x80000002
36#define QE_INVALIDARG (QRESULT)0x80000003
37#define QE_NOINTERFACE (QRESULT)0x80000004
38#define QE_NOCOMPONENT (QRESULT)0x80000005
39
40// {1D8518CD-E8F5-4366-99E8-879FD7E482DE}
41#ifndef IID_QUnknown
42#define IID_QUnknown QUuid(0x1d8518cd, 0xe8f5, 0x4366, 0x99, 0xe8, 0x87, 0x9f, 0xd7, 0xe4, 0x82, 0xde)
43#endif
44
45struct Q_EXPORT QUnknownInterface
46{
47 virtual QRESULT queryInterface( const QUuid&, QUnknownInterface** ) = 0;
48 virtual ulong addRef() = 0;
49 virtual ulong release() = 0;
50};
51
52// {D16111D4-E1E7-4C47-8599-24483DAE2E07}
53#ifndef IID_QLibrary
54#define IID_QLibrary QUuid( 0xd16111d4, 0xe1e7, 0x4c47, 0x85, 0x99, 0x24, 0x48, 0x3d, 0xae, 0x2e, 0x07)
55#endif
56
57struct Q_EXPORT QLibraryInterface : public QUnknownInterface
58{
59 virtual bool init() = 0;
60 virtual void cleanup() = 0;
61 virtual bool canUnload() const = 0;
62};
63
64#define Q_CREATE_INSTANCE( IMPLEMENTATION ) \
65 IMPLEMENTATION *i = new IMPLEMENTATION; \
66 QUnknownInterface* iface = 0; \
67 i->queryInterface( IID_QUnknown, &iface ); \
68 return iface;
69
70#define Q_EXPORT_INTERFACE() \
71 extern "C" QUnknownInterface* ucm_instantiate()
72
73#define Q_REFCOUNT ulong addRef() {return ref++;}ulong release() {if(!--ref){delete this;return 0;}return ref;}
74
75#else // QT_NO_COMPONENT
76
77struct Q_EXPORT QUnknownInterface
78{
79};
80
81#endif // QT_NO_COMPONENT
82
83#endif // QCOM_H
diff --git a/library/qcopenvelope_qws.cpp b/library/qcopenvelope_qws.cpp
new file mode 100644
index 0000000..10d1567
--- a/dev/null
+++ b/library/qcopenvelope_qws.cpp
@@ -0,0 +1,162 @@
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 "qcopenvelope_qws.h"
22#include "global.h"
23#include <qbuffer.h>
24#include <qdatastream.h>
25#include <qfile.h>
26#include <unistd.h>
27#include <errno.h>
28#include <sys/file.h>
29#include <sys/types.h>
30#include <sys/stat.h>
31#include <time.h>
32
33#ifndef QT_NO_COP
34
35/*!
36 \class QCopEnvelope qcopenvelope_qws.h
37 \brief The QCopEnvelope class encapsulates QCop message sending.
38
39 QCop messages allow applications to communicate with each other.
40 These messages are send using QCopEnvelope, and received by connecting
41 to a QCopChannel.
42
43 To send a message, use the following protocol:
44
45 \code
46 QCopEnvelope e(channelname, messagename);
47 e << parameter1 << parameter2 << ...;
48 \endcode
49
50 For messages without parameters, you can simply use:
51
52 \code
53 QCopEnvelope (channelname, messagename);
54 \endcode
55
56 Do not try to simplify further as some compilers may not do
57 as you expect.
58
59 The <tt>channelname</tt> of channels within Qtopia all start with "QPE/".
60 The <tt>messagename</tt> is a function identifier followed by a list of types
61 in parentheses. There are no spaces in the message name.
62
63 To receive a message, you will generally just use your applications
64 predefined QPE/Application/<i>appname</i> channel
65 (see QPEApplication::appMessage()), but you can make another channel
66 and connect it to a slot with:
67
68 \code
69 myChannel = new QCopChannel( "QPE/FooBar", this );
70 connect( myChannel, SIGNAL(received(const QCString &, const QByteArray &)),
71 this, SLOT(fooBarMessage( const QCString &, const QByteArray &)) );
72 \endcode
73
74 See also, the \link qcop.html list of Qtopia messages\endlink.
75*/
76
77/*!
78 Constructs a QCopEnvelope that will write \a message to \a channel.
79 If \a message has parameters, you must then user operator<<() to
80 write the parameters.
81*/
82QCopEnvelope::QCopEnvelope( const QCString& channel, const QCString& message ) :
83 QDataStream(new QBuffer),
84 ch(channel), msg(message)
85{
86 device()->open(IO_WriteOnly);
87}
88
89/*!
90 Writes the completed message and destroys the QCopEnvelope.
91*/
92QCopEnvelope::~QCopEnvelope()
93{
94 QByteArray data = ((QBuffer*)device())->buffer();
95 const int pref=16;
96 if ( qstrncmp(ch.data(),"QPE/Application/",pref)==0 ) {
97 QString qcopfn("/tmp/qcop-msg-");
98 qcopfn += ch.mid(pref);
99 QFile qcopfile(qcopfn);
100
101 if ( qcopfile.open(IO_WriteOnly | IO_Append) ) {
102 if(flock(qcopfile.handle(), LOCK_EX)) {
103 /* some error occured */
104 qWarning(QString("Failed to obtain file lock on %1 (%2)")
105 .arg(qcopfn).arg( errno ));
106 }
107 /* file locked, but might be stale (e.g. program for whatever
108 reason did not start). I modified more than 1 minute ago,
109 truncate the file */
110 struct stat buf;
111 time_t t;
112 if (!fstat(qcopfile.handle(), &buf) && (time(&t) != (time_t)-1) ) {
113 // success on fstat, lets compare times
114 if (buf.st_mtime + 60 < t) {
115 qWarning("stale file " + qcopfn + " found. Truncating");
116 ftruncate(qcopfile.handle(), 0);
117 qcopfile.reset();
118 }
119 }
120
121 if ( !QCopChannel::isRegistered(ch) ) {
122 int fsize = qcopfile.size();
123 {
124 QDataStream ds(&qcopfile);
125 ds << ch << msg << data;
126 flock(qcopfile.handle(), LOCK_UN);
127 qcopfile.close();
128 }
129
130 if (fsize == 0) {
131 QString cmd = ch.mid(pref);
132 cmd += " -qcop " + qcopfn;
133 Global::invoke(cmd);
134 }
135
136 char c;
137 for (int i=0; (c=msg[i]); i++) {
138 if ( c == ' ' ) {
139 // Return-value required
140 // ###### wait for it
141 break;
142 } else if ( c == '(' ) {
143 // No return value
144 break;
145 }
146 }
147 goto end;
148 } // endif isRegisterd
149 flock(qcopfile.handle(), LOCK_UN);
150 qcopfile.close();
151 qcopfile.remove();
152 } else {
153 qWarning(QString("Failed to obtain file lock on %1")
154 .arg(qcopfn));
155 } // endif open
156 }
157 QCopChannel::send(ch,msg,data);
158end:
159 delete device();
160}
161
162#endif
diff --git a/library/qcopenvelope_qws.h b/library/qcopenvelope_qws.h
new file mode 100644
index 0000000..f2a94d3
--- a/dev/null
+++ b/library/qcopenvelope_qws.h
@@ -0,0 +1,39 @@
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#ifndef QCOPENVELOPE_H
21#define QCOPENVELOPE_H
22
23#ifndef QT_H
24#include <qcopchannel_qws.h>
25#include <qdatastream.h>
26#endif // QT_H
27
28#ifndef QT_NO_COP
29
30class QCopEnvelope : public QDataStream {
31 QCString ch, msg;
32public:
33 QCopEnvelope( const QCString& channel, const QCString& message );
34 ~QCopEnvelope();
35};
36
37#endif
38
39#endif
diff --git a/library/qdawg.cpp b/library/qdawg.cpp
new file mode 100644
index 0000000..3615693
--- a/dev/null
+++ b/library/qdawg.cpp
@@ -0,0 +1,510 @@
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#include "qdawg.h"
21#include <qintdict.h>
22#include <qvaluelist.h>
23#include <qtextstream.h>
24#include <qfile.h>
25#include <qtl.h>
26
27#include <limits.h>
28#include <stdio.h>
29
30// for mmap
31#include <sys/types.h>
32#include <sys/stat.h>
33#include <sys/mman.h>
34#include <fcntl.h>
35#include <errno.h>
36#include <unistd.h>
37
38class QDawgPrivate;
39class QTrie;
40
41typedef QValueList<QTrie*> TrieClub;
42typedef QIntDict<TrieClub> TrieClubDirectory;
43
44class TriePtr {
45public:
46 QChar letter;
47 QTrie* p;
48 int operator <(const TriePtr& o) const;
49 int operator >(const TriePtr& o) const;
50 int operator <=(const TriePtr& o) const;
51};
52
53class TrieList : public QValueList<TriePtr> {
54 bool sorted;
55public:
56 TrieList()
57 {
58 sorted=TRUE;
59 }
60
61 QTrie* findAdd(QChar c);
62 bool equal(TrieList& l);
63
64 void sort()
65 {
66 if ( !sorted ) {
67 qHeapSort(*this);
68 sorted = TRUE;
69 }
70 }
71};
72
73// A fast but memory-wasting temporary class. The Dawg is the goal.
74class QTrie {
75public:
76 QTrie();
77 ~QTrie();
78
79 void insertWord(const QString& s, uint index=0);
80 bool equal(QTrie* o);
81 void dump(int indent=0);
82
83private:
84 TrieList children;
85 bool isword;
86
87 friend class QDawgPrivate;
88 int maxdepth;
89 int decendants;
90 int key;
91 void distributeKeys(TrieClubDirectory& directory);
92 QTrie* clubLeader(TrieClubDirectory& directory);
93 int collectKeys();
94 friend class TriePtr;
95 friend class TrieList;
96};
97
98QTrie::QTrie()
99{
100 key = 0;
101 isword = FALSE;
102}
103
104QTrie::~QTrie()
105{
106 // NOTE: we do not delete the children - after conversion to DAWG
107 // it's too difficult. The QTrie's are deleted via the directory.
108}
109
110void QTrie::insertWord(const QString& s, uint index)
111{
112 if ( index == s.length() ) {
113 isword = TRUE;
114 } else {
115 QTrie* t = children.findAdd(s[index]);
116 t->insertWord(s,index+1);
117 }
118}
119
120bool QTrie::equal(QTrie* o)
121{
122 if ( o == this ) return TRUE;
123 if ( isword != o->isword )
124 return FALSE;
125 return children.equal(o->children);
126}
127
128void QTrie::dump(int indent)
129{
130 for (TrieList::Iterator it=children.begin(); it!=children.end(); ++it) {
131 QTrie* s = (*it).p;
132 for (int in=0; in<indent; in++)
133 fputc(' ',stderr);
134 fprintf(stderr," %c %d %s %p\n",(*it).letter.unicode(),
135 s->key,s->isword?"word":"",s);
136 s->dump(indent+2);
137 }
138}
139
140void QTrie::distributeKeys(TrieClubDirectory& directory)
141{
142 maxdepth = INT_MIN;
143 decendants = children.count();
144 key = 0;
145 for (TrieList::Iterator it=children.begin(); it!=children.end(); ++it) {
146 QTrie* s = (*it).p;
147 QChar l = (*it).letter;
148 s->distributeKeys(directory);
149 key = key*64+l.unicode()+s->key*5;
150 decendants += s->decendants;
151 if ( s->maxdepth+1 > maxdepth )
152 maxdepth = s->maxdepth+1;
153 }
154 if ( decendants ) {
155 key += decendants + maxdepth*256 + children.count() * 65536;
156 if ( !key ) key++; // unlikely
157 }
158 TrieClub* c = directory[key];
159 if ( !c ) directory.insert(key, (c = new TrieClub) );
160 c->prepend(this);
161}
162
163QTrie* QTrie::clubLeader(TrieClubDirectory& directory)
164{
165 if ( !key ) return directory[0]->first();
166 for (TrieList::Iterator it=children.begin(); it!=children.end(); ++it) {
167 QTrie* t= (*it).p->clubLeader(directory);
168 (*it).p = t;
169 }
170 TrieClub *club = directory[key];
171 for (TrieClub::Iterator it = club->begin(); it != club->end(); ++it) {
172 QTrie* o = *it;
173 if ( o->equal(this) )
174 return o;
175 }
176 return this;
177}
178
179int QTrie::collectKeys()
180{
181 int n=0;
182 if ( key ) key=0,n+=children.count();
183 for (TrieList::Iterator it=children.begin(); it!=children.end(); ++it)
184 n += (*it).p->collectKeys();
185 return n;
186}
187
188int TriePtr::operator <(const TriePtr& o) const
189 { return letter < o.letter; }
190int TriePtr::operator >(const TriePtr& o) const
191 { return letter > o.letter; }
192int TriePtr::operator <=(const TriePtr& o) const
193 { return letter <= o.letter; }
194
195bool TrieList::equal(TrieList& l)
196{
197 if ( count() != l.count() )
198 return FALSE;
199 sort(); l.sort();
200 ConstIterator it2 = begin();
201 ConstIterator it = l.begin();
202 for( ; it != l.end(); ++it, ++it2 )
203 if ( (*it).letter != (*it2).letter || ! (*it).p->equal((*it2).p) )
204 return FALSE;
205 return TRUE;
206}
207QTrie* TrieList::findAdd(QChar c)
208{
209 for (Iterator it=begin(); it!=end(); ++it) {
210 if ( (*it).letter == c )
211 return (*it).p;
212 }
213 TriePtr p;
214 p.p = new QTrie;
215 p.letter = c;
216 prepend(p);
217 sorted=FALSE;
218 sort();
219 return p.p;
220}
221
222static const char* dawg_sig = "QDAWG100";
223
224class QDawgPrivate {
225public:
226 QDawgPrivate(QIODevice* dev)
227 {
228 QDataStream ds(dev);
229 char sig[8];
230 ds.readRawBytes(sig,8);
231 if ( !strncmp(dawg_sig,sig,8) ) {
232 uint n;
233 char* nn;
234 ds.readBytes(nn,n);
235
236 // #### endianness problem ignored.
237 node = (QDawg::Node*)nn;
238 nodes = n / sizeof(QDawg::Node);
239 } else {
240 node = 0;
241 }
242 }
243
244 bool ok() const { return node; }
245
246 QDawgPrivate(uchar* mem)
247 {
248 if ( !strncmp(dawg_sig,(char*)mem,8) ) {
249 mem += 8;
250
251 int n = ((mem[0]*256+mem[1])*256+mem[2])*256+mem[3];
252 mem += 4;
253
254 // #### endianness problem ignored.
255 node = (QDawg::Node*)((char*)mem);
256 nodes = n / sizeof(QDawg::Node);
257 }
258 }
259
260 QDawgPrivate(QTrie* t) // destroys the QTrie.
261 {
262 TrieClubDirectory directory(9973);
263 t->distributeKeys(directory);
264 QTrie* l = t->clubLeader(directory);
265 ASSERT(l==t);
266 generateArray(t);
267
268 TrieClub *club;
269 for (QIntDictIterator<TrieClub> dit(directory); (club=dit); ++dit)
270 {
271 for (TrieClub::Iterator it = club->begin(); it != club->end(); ++it) {
272 delete *it;
273 }
274 delete club;
275 }
276 }
277
278 bool write(QIODevice* dev)
279 {
280 QDataStream ds(dev);
281 ds.writeRawBytes(dawg_sig,8);
282 // #### endianness problem ignored.
283 ds.writeBytes((char*)node,sizeof(QDawg::Node)*nodes);
284 return dev->state() == IO_Ok;
285 }
286
287 void dumpWords(int nid=0, int index=0)
288 {
289 static char word[256]; // ick latin1
290 int i=0;
291 do {
292 QDawg::Node& n = node[nid+i];
293 word[index] = n.let;
294 if ( n.isword )
295 fprintf(stderr,"%.*s\n",index+1,word);
296 if ( n.offset ) dumpWords(n.offset+nid+i,index+1);
297 } while (!node[nid+i++].islast);
298 }
299
300 void dump(int nid=0, int indent=0)
301 {
302 int i=0;
303 do {
304 QDawg::Node& n = node[nid+i];
305 fprintf(stderr,"%d: ",nid+i);
306 for (int in=0; in<indent; in++)
307 fputc(' ',stderr);
308 fprintf(stderr," %c %d %d %d\n",n.let,
309 n.isword,n.islast,n.offset);
310 if ( n.offset ) dump(n.offset+nid+i,indent+2);
311 } while (!node[nid+i++].islast);
312 }
313
314 int countWords(int nid=0)
315 {
316 int t=0;
317 int i=0;
318 do {
319 QDawg::Node& n = node[nid+i];
320 if ( n.isword )
321 t++;
322 if ( n.offset )
323 t+=countWords(n.offset+nid+i);
324 } while (!node[nid+i++].islast);
325 return t;
326 }
327
328 bool contains(const QString& s, int nid=0, int index=0) const
329 {
330 int i=0;
331 do {
332 QDawg::Node& n = node[nid+i];
333 if ( s[index] == QChar((ushort)n.let) ) {
334 if ( n.isword && index == (int)s.length()-1 )
335 return TRUE;
336 if ( n.offset )
337 return contains(s,n.offset+nid+i,index+1);
338 }
339 } while (!node[nid+i++].islast);
340 return FALSE;
341 }
342
343 void appendAllWords(QStringList& list, int nid=0, QString s="") const
344 {
345 int i=0;
346 int next = s.length();
347 do {
348 QDawg::Node& n = node[nid+i];
349 s[next] = QChar((ushort)n.let);
350 if ( n.isword )
351 list.append(s);
352 if ( n.offset )
353 appendAllWords(list, n.offset+nid+i, s);
354 } while (!node[nid+i++].islast);
355 }
356
357 const QDawg::Node* root() { return node; }
358
359private:
360 void generateArray(QTrie* t)
361 {
362 nodes = 0;
363 int n = t->collectKeys();
364 node = new QDawg::Node[n];
365 appendToArray(t);
366 ASSERT(n == nodes);
367 }
368
369 int appendToArray(QTrie* t)
370 {
371 if ( !t->key ) {
372 if ( !t->children.count() )
373 return 0;
374 t->key = nodes;
375 nodes += t->children.count();
376 QDawg::Node* n = &node[t->key-1];
377 int here = t->key;
378 for (TrieList::Iterator it=t->children.begin(); it!=t->children.end(); ++it) {
379 QTrie* s = (*it).p;
380 ++n;
381 n->let = (*it).letter.unicode();
382 n->isword = s->isword;
383 n->islast = 0;
384 n->offset = appendToArray(s);
385 if ( n->offset ) {
386 int t = n->offset-here;
387 n->offset=t;
388 if ( n->offset != t )
389 qWarning("Overflow: too many words");
390 }
391 here++;
392 }
393 n->islast = 1;
394 }
395 return t->key;
396 }
397
398private:
399 int nodes;
400 QDawg::Node *node;
401};
402
403
404QDawg::QDawg()
405{
406 d = 0;
407}
408
409QDawg::~QDawg()
410{
411 delete d;
412}
413
414bool QDawg::createFromWords(QIODevice* dev)
415{
416 delete d;
417
418 QTextStream i(dev);
419 QTrie* trie = new QTrie;
420 int n=0;
421 while (!i.atEnd()) {
422 trie->insertWord(QString::fromUtf8(i.readLine()));
423 n++;
424 }
425 if ( n )
426 d = new QDawgPrivate(trie);
427 else
428 d = 0;
429 return TRUE;
430}
431
432void QDawg::createFromWords(const QStringList& list)
433{
434 delete d;
435
436 if ( list.count() ) {
437 QTrie* trie = new QTrie;
438 for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
439 trie->insertWord(*it);
440 }
441 d = new QDawgPrivate(trie);
442 } else {
443 d = 0;
444 }
445}
446
447QStringList QDawg::allWords() const
448{
449 QStringList result;
450 if ( d ) d->appendAllWords(result);
451 return result;
452}
453
454
455bool QDawg::readFile(const QString& filename)
456{
457 delete d;
458 d = 0;
459 int f = ::open( QFile::encodeName(filename), O_RDONLY );
460 if ( f < 0 )
461 return FALSE;
462 struct stat st;
463 if ( !fstat( f, &st ) ) {
464 char * tmp = (char*)mmap( 0, st.st_size, // any address, whole file
465 PROT_READ, // read-only memory
466 MAP_FILE | MAP_PRIVATE, // swap-backed map from file
467 f, 0 ); // from offset 0 of f
468 if ( tmp && tmp != (char*)MAP_FAILED )
469 d = new QDawgPrivate((uchar*)tmp);
470 }
471 ::close( f );
472 return d;
473}
474
475bool QDawg::read(QIODevice* dev)
476{
477 delete d;
478 d = new QDawgPrivate(dev);
479 if ( d->ok() )
480 return TRUE;
481 delete d;
482 d = 0;
483 return FALSE;
484}
485
486bool QDawg::write(QIODevice* dev) const
487{
488 return d ? d->write(dev) : TRUE;
489}
490
491int QDawg::countWords() const
492{
493 return d ? d->countWords() : 0;
494}
495
496const QDawg::Node* QDawg::root() const
497{
498 return d ? d->root() : 0;
499}
500
501bool QDawg::contains(const QString& s) const
502{
503 return d ? d->contains(s) : FALSE;
504}
505
506void QDawg::dump() const
507{
508 if ( d ) d->dump();
509}
510
diff --git a/library/qdawg.h b/library/qdawg.h
new file mode 100644
index 0000000..ea182f3
--- a/dev/null
+++ b/library/qdawg.h
@@ -0,0 +1,70 @@
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#ifndef QDAWG_H
21#define QDAWG_H
22
23#include <qstringlist.h>
24
25class QIODevice;
26class QDawgPrivate;
27
28class QDawg {
29public:
30 QDawg();
31 ~QDawg();
32
33 bool readFile(const QString&); // may mmap
34 bool read(QIODevice* dev);
35 bool write(QIODevice* dev) const;
36 bool createFromWords(QIODevice* dev);
37 void createFromWords(const QStringList&);
38 QStringList allWords() const;
39
40 bool contains(const QString&) const;
41 int countWords() const;
42
43 // Unicode 0..3FFF; an offset can be used for other ranges
44 static const int nodebits=18;
45
46 class Node {
47 friend class QDawgPrivate;
48 uint let:(30-nodebits);
49 uint isword:1;
50 uint islast:1;
51 int offset:nodebits;
52 Node() { }
53 public:
54 QChar letter() const { return QChar((ushort)let); }
55 bool isWord() const { return isword; }
56 bool isLast() const { return islast; }
57 const Node* next() const { return islast ? 0 : this+1; }
58 const Node* jump() const { return offset ? this+offset : 0; }
59 };
60
61 const Node* root() const;
62
63 void dump() const; // debug
64
65private:
66 friend class QDawgPrivate;
67 QDawgPrivate* d;
68};
69
70#endif
diff --git a/library/qlibrary.cpp b/library/qlibrary.cpp
new file mode 100644
index 0000000..4aabbc5
--- a/dev/null
+++ b/library/qlibrary.cpp
@@ -0,0 +1,437 @@
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
22#include "qlibrary_p.h"
23
24// uncomment this to get error messages
25//#define QT_DEBUG_COMPONENT 1
26// uncomment this to get error and success messages
27//#define QT_DEBUG_COMPONENT 2
28
29#ifndef QT_DEBUG_COMPONENT
30# if defined(QT_DEBUG)
31# define QT_DEBUG_COMPONENT 1
32# endif
33#endif
34
35#ifndef QT_NO_COMPONENT
36
37// KAI C++ has at the moment problems with unloading the Qt plugins. So don't
38// unload them as a workaround for now.
39#if defined(Q_CC_KAI) || defined(Q_OS_MAC)
40#define QT_NO_LIBRARY_UNLOAD
41#endif
42
43#if defined(Q_WS_WIN) && !defined(QT_MAKEDLL)
44#define QT_NO_LIBRARY_UNLOAD
45#endif
46
47/* Platform independent QLibraryPrivate implementations */
48#ifndef QT_LITE_COMPONENT
49
50#include "qtimer.h"
51
52extern Q_EXPORT QApplication *qApp;
53
54QLibraryPrivate::QLibraryPrivate( QLibrary *lib )
55 : QObject( 0, lib->library().latin1() ), pHnd( 0 ), libIface( 0 ), unloadTimer( 0 ), library( lib )
56{
57}
58
59QLibraryPrivate::~QLibraryPrivate()
60{
61 if ( libIface )
62 libIface->release();
63 killTimer();
64}
65
66/*
67 Only components that implement the QLibraryInterface can
68 be unloaded automatically.
69*/
70void QLibraryPrivate::tryUnload()
71{
72 if ( library->policy() == QLibrary::Manual || !pHnd || !libIface )
73 return;
74
75 if ( !libIface->canUnload() )
76 return;
77
78#if defined(QT_DEBUG_COMPONENT) && QT_DEBUG_COMPONENT == 2
79 if ( library->unload() )
80 qDebug( "%s has been automatically unloaded", library->library().latin1() );
81#else
82 library->unload();
83#endif
84}
85
86#else // QT_LITE_COMPOINENT
87
88QLibraryPrivate::QLibraryPrivate( QLibrary *lib )
89 : pHnd( 0 ), libIface( 0 ), library( lib )
90{
91}
92
93#endif // QT_LITE_COMPOINENT
94
95void QLibraryPrivate::startTimer()
96{
97#ifndef QT_LITE_COMPONENT
98 unloadTimer = new QTimer( this );
99 connect( unloadTimer, SIGNAL( timeout() ), this, SLOT( tryUnload() ) );
100 unloadTimer->start( 5000, FALSE );
101#endif
102}
103
104void QLibraryPrivate::killTimer()
105{
106#ifndef QT_LITE_COMPONENT
107 delete unloadTimer;
108 unloadTimer = 0;
109#endif
110}
111
112/*!
113 \class QLibrary qlibrary.h
114
115 \brief The QLibrary class provides a wrapper for handling shared libraries.
116
117 This class is temporarily copied from Qt 3.0.
118*/
119
120/*!
121 \enum QLibrary::Policy
122
123 This enum type defines the various policies a QLibrary can have with respect to
124 loading and unloading the shared library.
125
126 The \e policy can be:
127
128 \value Delayed The library get's loaded as soon as needed and unloaded in the destructor
129 \value Immediately The library is loaded immediately and unloaded in the destructor
130 \value Manual Like delayed, and library has to be unloaded manually
131*/
132
133/*!
134 Creates a QLibrary object for the shared library \a filename.
135 The library get's loaded if \a pol is Immediately.
136
137 Note that \a filename does not need to include the (platform specific)
138 file extension, so calling
139
140 \code
141 QLibrary lib( "mylib" );
142 \endcode
143
144 would be equivalent to
145
146 \code
147 QLibrary lib( "mylib.dll" );
148 \endcode
149
150 on Windows. But \e "mylib.dll" will obviously not work on other platforms.
151
152 \sa setPolicy(), unload()
153*/
154QLibrary::QLibrary( const QString& filename, Policy pol )
155 : libfile( filename ), libPol( pol ), entry( 0 )
156{
157 d = new QLibraryPrivate( this );
158 if ( pol == Immediately )
159 load();
160}
161
162/*!
163 Deletes the QLibrary object.
164 The library will be unloaded if the policy is not Manual.
165
166 \sa unload(), setPolicy()
167*/
168QLibrary::~QLibrary()
169{
170 if ( libPol == Manual || !unload() ) {
171 if ( entry ) {
172 entry->release();
173 entry = 0;
174 }
175 }
176 delete d;
177}
178
179void QLibrary::createInstanceInternal()
180{
181 if ( libfile.isEmpty() )
182 return;
183
184 if ( !d->pHnd ) {
185 ASSERT( entry == 0 );
186 load();
187 }
188
189 if ( d->pHnd && !entry ) {
190#if defined(QT_DEBUG_COMPONENT) && QT_DEBUG_COMPONENT == 2
191 qWarning( "%s has been loaded.", library().latin1() );
192#endif
193 typedef QUnknownInterface* (*UCMInstanceProc)();
194 UCMInstanceProc ucmInstanceProc;
195 ucmInstanceProc = (UCMInstanceProc) resolve( "ucm_instantiate" );
196 entry = ucmInstanceProc ? ucmInstanceProc() : 0;
197 if ( entry ) {
198 entry->queryInterface( IID_QLibrary, (QUnknownInterface**)&d->libIface);
199 if ( d->libIface ) {
200 if ( !d->libIface->init() ) {
201#if defined(QT_DEBUG_COMPONENT)
202 qWarning( "%s: QLibraryInterface::init() failed.", library().latin1() );
203#endif
204 unload();
205 return;
206 }
207
208 d->killTimer();
209 if ( libPol != Manual )
210 d->startTimer();
211 }
212 } else {
213#if defined(QT_DEBUG_COMPONENT)
214 qWarning( "%s: No interface implemented.", library().latin1() );
215#endif
216 unload();
217 }
218 }
219}
220
221/*!
222 Returns the address of the exported symbol \a symb. The library gets
223 loaded if necessary. The function returns NULL if the symbol could
224 not be resolved, or if loading the library failed.
225
226 \code
227 typedef int (*addProc)( int, int );
228
229 addProc add = (addProc) library->resolve( "add" );
230 if ( add )
231 return add( 5, 8 );
232 else
233 return 5 + 8;
234 \endcode
235
236 \sa queryInterface()
237*/
238void *QLibrary::resolve( const char* symb )
239{
240 if ( !d->pHnd )
241 load();
242 if ( !d->pHnd )
243 return 0;
244
245 void *address = d->resolveSymbol( symb );
246 if ( !address ) {
247#if defined(QT_DEBUG_COMPONENT)
248 // resolveSymbol() might give a warning; so let that warning look so fatal
249 qWarning( QString("Trying to resolve symbol \"_%1\" instead").arg( symb ) );
250#endif
251 address = d->resolveSymbol( QString( "_" ) + symb );
252 }
253 return address;
254}
255
256/*!
257 \overload
258
259 Loads the library \a filename and returns the address of the exported symbol \a symb.
260 Note that like for the constructor, \a filename does not need to include the (platform specific)
261 file extension. The library staying loaded until the process exits.
262
263 The function returns a null pointer if the symbol could not be resolved or if loading
264 the library failed.
265*/
266void *QLibrary::resolve( const QString &filename, const char *symb )
267{
268 QLibrary lib( filename, Manual );
269 return lib.resolve( symb );
270}
271
272/*!
273 Returns whether the library is loaded.
274
275 \sa unload()
276*/
277bool QLibrary::isLoaded() const
278{
279 return d->pHnd != 0;
280}
281
282/*!
283 Loads the library.
284*/
285bool QLibrary::load()
286{
287 return d->loadLibrary();
288}
289
290/*!
291 Releases the component and unloads the library when successful.
292 Returns TRUE if the library could be unloaded, otherwise FALSE.
293 If the component implements the QLibraryInterface, the cleanup()
294 function of this interface will be called. The unloading will be
295 cancelled if the subsequent call to canUnload() returns FALSE.
296
297 This function gets called automatically in the destructor if
298 the policy is not Manual.
299
300 \warning
301 If \a force is set to TRUE, the library gets unloaded at any cost,
302 which is in most cases a segmentation fault, so you should know what
303 you're doing!
304
305 \sa queryInterface(), resolve()
306*/
307bool QLibrary::unload( bool force )
308{
309 if ( !d->pHnd )
310 return TRUE;
311
312 if ( entry ) {
313 if ( d->libIface ) {
314 d->libIface->cleanup();
315
316 bool can = d->libIface->canUnload();
317 can = ( d->libIface->release() <= 1 ) && can;
318 // the "entry" member must be the last reference to the component
319 if ( can || force ) {
320 d->libIface = 0;
321 } else {
322#if defined(QT_DEBUG_COMPONENT)
323 qWarning( "%s prevents unloading!", library().latin1() );
324#endif
325 d->libIface->addRef();
326 return FALSE;
327 }
328 }
329
330 if ( entry->release() ) {
331#if defined(QT_DEBUG_COMPONENT)
332 qWarning( "%s is still in use!", library().latin1() );
333#endif
334 if ( force ) {
335 delete entry;
336 } else {
337 entry->addRef();
338 return FALSE;
339 }
340 }
341 d->killTimer();
342
343 entry = 0;
344 }
345
346// ### this is a hack to solve problems with plugin unloading und KAI C++
347// (other compilers may have the same problem)
348#if !defined(QT_NO_LIBRARY_UNLOAD)
349 if ( !d->freeLibrary() ) {
350#if defined(QT_DEBUG_COMPONENT)
351 qWarning( "%s could not be unloaded.", library().latin1() );
352#endif
353 return FALSE;
354#else
355 return TRUE;
356#endif
357#if !defined(QT_NO_LIBRARY_UNLOAD)
358 }
359
360#if defined(QT_DEBUG_COMPONENT) && QT_DEBUG_COMPONENT == 2
361 qWarning( "%s has been unloaded.", library().latin1() );
362#endif
363
364 d->pHnd = 0;
365 return TRUE;
366#endif
367}
368
369/*!
370 Sets the current policy to \a pol.
371 The library is loaded if \a pol is set to Immediately.
372*/
373void QLibrary::setPolicy( Policy pol )
374{
375 libPol = pol;
376
377 if ( libPol == Immediately && !d->pHnd )
378 load();
379}
380
381/*!
382 Returns the current policy.
383
384 \sa setPolicy()
385*/
386QLibrary::Policy QLibrary::policy() const
387{
388 return libPol;
389}
390
391/*!
392 Returns the filename of the shared library this QLibrary object handles,
393 including the platform specific file extension.
394
395 \code
396 QLibrary lib( "mylib" );
397 QString str = lib.library();
398 \endcode
399
400 will set \e str to "mylib.dll" on Windows, and "libmylib.so" on Linux.
401*/
402QString QLibrary::library() const
403{
404 if ( libfile.isEmpty() )
405 return libfile;
406
407 QString filename = libfile;
408#if defined(Q_WS_WIN)
409 if ( filename.find( ".dll" ) == -1 )
410 filename += ".dll";
411#elif defined(Q_OS_MACX)
412 if ( filename.find( ".dylib" ) == -1 )
413 filename += ".dylib";
414#else
415 if ( filename.find( ".so" ) == -1 )
416 filename = QString( "lib%1.so" ).arg( filename );
417#endif
418
419 return filename;
420}
421
422/*!
423 Forwards the query to the component and returns the result. \a request and \a iface
424 are propagated to the component's queryInterface implementation.
425
426 The library gets loaded if necessary.
427*/
428QRESULT QLibrary::queryInterface( const QUuid& request, QUnknownInterface** iface )
429{
430 if ( !entry ) {
431 createInstanceInternal();
432 }
433
434 return entry ? entry->queryInterface( request, iface ) : QE_NOINTERFACE;
435}
436
437#endif // QT_NO_COMPONENT
diff --git a/library/qlibrary.h b/library/qlibrary.h
new file mode 100644
index 0000000..d33173b
--- a/dev/null
+++ b/library/qlibrary.h
@@ -0,0 +1,77 @@
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 QLIBRARY_H
22#define QLIBRARY_H
23
24#include <qstring.h>
25
26#ifndef QT_NO_COMPONENT
27
28#include <qpe/qcom.h>
29
30class QLibraryPrivate;
31
32class Q_EXPORT QLibrary
33{
34public:
35 enum Policy
36 {
37 Delayed,
38 Immediately,
39 Manual
40 };
41
42 QLibrary( const QString& filename, Policy = Delayed );
43 ~QLibrary();
44
45 void *resolve( const char* );
46 static void *resolve( const QString &filename, const char * );
47
48 bool unload( bool force = FALSE );
49 bool isLoaded() const;
50
51 void setPolicy( Policy pol );
52 Policy policy() const;
53
54 QString library() const;
55
56 QRESULT queryInterface( const QUuid&, QUnknownInterface** );
57
58private:
59 bool load();
60 void createInstanceInternal();
61
62 QLibraryPrivate *d;
63
64 QString libfile;
65 Policy libPol;
66 QUnknownInterface *entry;
67
68 private:// Disabled copy constructor and operator=
69#if defined(Q_DISABLE_COPY)
70 QLibrary( const QLibrary & );
71 QLibrary &operator=( const QLibrary & );
72#endif
73};
74
75#endif // QT_NO_COMPONENT
76
77#endif //QLIBRARY_H
diff --git a/library/qlibrary_p.h b/library/qlibrary_p.h
new file mode 100644
index 0000000..4734228
--- a/dev/null
+++ b/library/qlibrary_p.h
@@ -0,0 +1,113 @@
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 QLIBRARY_P_H
22#define QLIBRARY_P_H
23
24//
25// W A R N I N G
26// -------------
27//
28// This file is not part of the Qt API. It exists for the convenience
29// of the QLibrary class. This header file may change from
30// version to version without notice, or even be removed.
31//
32// We mean it.
33//
34//
35
36#include "qlibrary.h"
37
38//#ifndef QT_NO_COMPONENT
39
40//#ifndef QT_H
41#include "qwindowdefs.h"
42//#ifndef QT_LITE_COMPONENT
43#include "qobject.h"
44//#endif
45//#endif // QT_H
46
47class QTimer;
48class QLibrary;
49class QLibraryInterface;
50
51/*
52 Private helper class that saves the platform dependent handle
53 and does the unload magic using a QTimer.
54*/
55//#ifndef QT_LITE_COMPONENT
56class QLibraryPrivate : public QObject
57{
58 Q_OBJECT
59public:
60 QLibraryPrivate( QLibrary *lib );
61 ~QLibraryPrivate();
62
63 void startTimer();
64 void killTimer();
65
66#ifdef Q_WS_WIN
67 HINSTANCE pHnd;
68#else
69 void *pHnd;
70#endif
71
72 QLibraryInterface *libIface;
73
74 bool loadLibrary();
75 bool freeLibrary();
76 void *resolveSymbol( const char * );
77
78private slots:
79 void tryUnload();
80
81private:
82 QTimer *unloadTimer;
83 QLibrary *library;
84};
85
86#else // QT_LITE_COMPONENT
87class QLibraryPrivate
88{
89public:
90 QLibraryPrivate( QLibrary *lib );
91
92 void startTimer();
93 void killTimer();
94
95#ifdef Q_WS_WIN
96 HINSTANCE pHnd;
97#else
98 void *pHnd;
99#endif
100 QLibraryInterface *libIface;
101
102 bool loadLibrary();
103 bool freeLibrary();
104 void *resolveSymbol( const char * );
105
106private:
107 QLibrary *library;
108};
109//#endif // QT_LITE_COMPONENT
110
111//#endif // QT_NO_COMPONENT
112
113#endif // QLIBRARY_P_H
diff --git a/library/qlibrary_unix.cpp b/library/qlibrary_unix.cpp
new file mode 100644
index 0000000..50a5478
--- a/dev/null
+++ b/library/qlibrary_unix.cpp
@@ -0,0 +1,132 @@
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 "qlibrary_p.h"
22
23#ifndef QT_NO_COMPONENT
24
25/*
26 The platform dependent implementations of
27 - loadLibrary
28 - freeLibrary
29 - resolveSymbol
30
31 It's not too hard to guess what the functions do.
32*/
33#if defined(Q_OS_HPUX)
34// for HP-UX < 11.x and 32 bit
35#include <dl.h>
36
37bool QLibraryPrivate::loadLibrary()
38{
39 if ( pHnd )
40 return TRUE;
41
42 QString filename = library->library();
43
44 pHnd = (void*)shl_load( filename.latin1(), BIND_DEFERRED | BIND_NONFATAL | DYNAMIC_PATH, 0 );
45#if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT)
46 if ( !pHnd )
47 qDebug( "Failed to load library %s!", filename.latin1() );
48#endif
49 return pHnd != 0;
50}
51
52bool QLibraryPrivate::freeLibrary()
53{
54 if ( !pHnd )
55 return TRUE;
56
57 if ( !shl_unload( (shl_t)pHnd ) ) {
58 pHnd = 0;
59 return TRUE;
60 }
61 return FALSE;
62}
63
64void* QLibraryPrivate::resolveSymbol( const char* symbol )
65{
66 if ( !pHnd )
67 return 0;
68
69 void* address = 0;
70 if ( shl_findsym( (shl_t*)&pHnd, symbol, TYPE_UNDEFINED, address ) < 0 ) {
71#if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT)
72 qDebug( "Couldn't resolve symbol \"%s\"", symbol );
73#endif
74 return 0;
75 }
76 return address;
77}
78
79#else // Q_OS_HPUX
80// Something else, assuming POSIX
81#include <dlfcn.h>
82
83bool QLibraryPrivate::loadLibrary()
84{
85 if ( pHnd )
86 return TRUE;
87
88 QString filename = library->library();
89
90 pHnd = dlopen( filename.latin1() , RTLD_LAZY );
91#if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT)
92 if ( !pHnd )
93 qWarning( "%s", dlerror() );
94#endif
95 return pHnd != 0;
96}
97
98bool QLibraryPrivate::freeLibrary()
99{
100 if ( !pHnd )
101 return TRUE;
102
103 int ec = dlclose( pHnd );
104 if ( !ec )
105 pHnd = 0;
106#if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT)
107 else {
108 const char* error = dlerror();
109 if ( error )
110 qWarning( "%s", error );
111 }
112#endif
113 return pHnd == 0;
114}
115
116void* QLibraryPrivate::resolveSymbol( const char* f )
117{
118 if ( !pHnd )
119 return 0;
120
121 void* address = dlsym( pHnd, f );
122#if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT)
123 const char* error = dlerror();
124 if ( error )
125 qWarning( "%s", error );
126#endif
127 return address;
128}
129
130#endif // POSIX
131
132#endif // QT_NO_COMPONENT
diff --git a/library/qmath.c b/library/qmath.c
new file mode 100644
index 0000000..7af8706
--- a/dev/null
+++ b/library/qmath.c
@@ -0,0 +1,157 @@
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 <math.h>
22#include <float.h>
23#include "qmath.h"
24
25#ifdef QT_QWS_CASSIOPEIA
26
27double qFabs( double a )
28{
29 if ( a < 0.0 )
30 return -a;
31 return a;
32}
33
34double qSqrt( double value )
35{
36 const double tol = 0.000005; // relative error tolerance
37 double old_app, new_app;
38 if (value == 0.0)
39 return 0.0;
40 old_app = value; // take value as first approximation
41 new_app = (old_app + value/old_app)/2;
42 while (qFabs((new_app-old_app)/new_app) > tol)
43 {
44 old_app = new_app;
45 new_app = (old_app + value/old_app)/2;
46 }
47
48 return new_app;
49}
50
51const double Q_PI = 3.14159265358979323846; // pi
52const double Q_2PI = 6.28318530717958647693; // 2*pi
53const double Q_PI2 = 1.57079632679489661923; // pi/2
54
55static double qsincos( double a, int calcCos )
56{
57 int sign;
58 double a2;
59 double a3;
60 double a5;
61 double a7;
62 double a9;
63 double a11;
64
65 if ( calcCos ) // calculate cosine
66 a -= Q_PI2;
67 if ( a >= Q_2PI || a <= -Q_2PI ) { // fix range: -2*pi < a < 2*pi
68 int m = (int)(a/Q_2PI);
69 a -= Q_2PI*m;
70 }
71 if ( a < 0.0 ) // 0 <= a < 2*pi
72 a += Q_2PI;
73 sign = a > Q_PI ? -1 : 1;
74 if ( a >= Q_PI )
75 a = Q_2PI - a;
76 if ( a >= Q_PI2 )
77 a = Q_PI - a;
78 if ( calcCos )
79 sign = -sign;
80 a2 = a*a; // here: 0 <= a < pi/4
81 a3 = a2*a; // make taylor sin sum
82 a5 = a3*a2;
83 a7 = a5*a2;
84 a9 = a7*a2;
85 a11 = a9*a2;
86 return (a-a3/6+a5/120-a7/5040+a9/362880-a11/39916800)*sign;
87}
88
89double qSin( double a ) { return qsincos(a,0); }
90double qCos( double a ) { return qsincos(a,1); }
91
92//atan2 returns values from -PI to PI, so we have to do the same
93double qATan2( double y, double x )
94{
95 double r;
96 if ( x != 0.0 ) {
97 double a = qFabs(y/x);
98 if ( a <= 1 )
99 r = a/(1+ 0.28*a*a);
100 else
101 r = Q_PI2 - a/(a*a + 0.28);
102 } else {
103 r = Q_PI2;
104 }
105
106 if ( y >= 0.0 ) {
107 if ( x >= 0.0 )
108 return r;
109 else
110 return Q_PI - r;
111 } else {
112 if ( x >= 0.0 )
113 return 0.0 - r;
114 else
115 return -Q_PI + r;
116 }
117}
118
119double qATan( double a )
120{
121 return qATan2( a, 1.0 );
122}
123
124double qASin( double a )
125{
126 return qATan2( a, qSqrt(1-a*a) );
127}
128
129double qTan( double a )
130{
131 double ca = qCos(a);
132 if ( ca != 0.0 )
133 return qSin( a ) / ca;
134
135 return MAXDOUBLE;
136}
137
138double qFloor( double a )
139{
140 long i = (long) a;
141 return (double) i;
142}
143
144#else
145
146double qSqrt( double value ) { return sqrt( value ); }
147double qSin( double a ) { return sin(a); }
148double qCos( double a ) { return cos(a); }
149double qATan2( double y, double x ) { return atan2(y,x); }
150double qATan( double a ) { return atan(a); }
151double qASin( double a ) { return asin(a); }
152double qTan( double a ) { return tan(a); }
153double qFloor( double a ) { return floor(a); }
154double qFabs( double a ) { return fabs(a); }
155
156#endif
157
diff --git a/library/qmath.h b/library/qmath.h
new file mode 100644
index 0000000..629fe99
--- a/dev/null
+++ b/library/qmath.h
@@ -0,0 +1,42 @@
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#ifndef QMATH_H
21#define QMATH_H
22
23#ifdef __cplusplus
24extern "C"
25{
26#endif
27
28double qSqrt( double value );
29double qSin( double a );
30double qCos( double a );
31double qATan2( double y, double x );
32double qATan( double a );
33double qASin( double a );
34double qTan( double a );
35double qFloor( double a );
36double qFabs( double a );
37
38#ifdef __cplusplus
39}
40#endif
41
42#endif
diff --git a/library/qpe-base.control b/library/qpe-base.control
new file mode 100644
index 0000000..bd8a0f9
--- a/dev/null
+++ b/library/qpe-base.control
@@ -0,0 +1,10 @@
1Files: etc/qimpen etc/colors etc/init.d/qpe etc/rc2.d/S98qpe bin/qpe-reorgfiles $QTDIR/lib/libqpe.so.$VERSION_MAJ.$VERSION_MIN.$VERSION_PAT $QTDIR/lib/libqpe.so.$VERSION_MAJ.$VERSION_MIN $QTDIR/lib/libqpe.so.$VERSION_MAJ apps/__7separator.desktop apps/__9quit.desktop apps/*/.directory etc/mime.types apps/Settings/quit.desktop pics/UnknownDocument-14.png pics/UnknownDocument.png
2Priority: required
3Section: qpe/system
4Maintainer: Warwick Allison <warwick@trolltech.com>
5Architecture: arm
6Version: $QPE_VERSION-4
7Depends: qt-embedded (>=$QTE_VERSION), qpe-qcop, qpe-taskbar, qpe-pics, qpe-sounds, atd, apmd
8Description: Base Qtopia environment
9 A complete GUI environment for handhelds.
10 You will probably want to install one of the qpe-i18n-* packages.
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
new file mode 100644
index 0000000..f0a68cf
--- a/dev/null
+++ b/library/qpeapplication.cpp
@@ -0,0 +1,1597 @@
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** $Id$
20**
21**********************************************************************/
22#include <stdlib.h>
23#include <unistd.h>
24#include <qfile.h>
25#ifdef Q_WS_QWS
26#ifndef QT_NO_COP
27#if QT_VERSION <= 231
28#define private public
29#define sendLocally processEvent
30#include "qcopenvelope_qws.h"
31#undef private
32#else
33#include "qcopenvelope_qws.h"
34#endif
35#endif
36#include <qwindowsystem_qws.h>
37#endif
38#include <qtextstream.h>
39#include <qpalette.h>
40#include <qbuffer.h>
41#include <qptrdict.h>
42#include <qregexp.h>
43#include <qdir.h>
44#include <qlabel.h>
45#include <qdialog.h>
46#include <qdragobject.h>
47#include <qevent.h>
48#include <qtooltip.h>
49#include <qsignal.h>
50#include "qpeapplication.h"
51#include "qpestyle.h"
52#if QT_VERSION >= 300
53#include <qstylefactory.h>
54#else
55#include <qplatinumstyle.h>
56#include <qwindowsstyle.h>
57#include <qmotifstyle.h>
58#include <qmotifplusstyle.h>
59#include "lightstyle.h"
60#endif
61#include "global.h"
62#include "resource.h"
63#if QT_VERSION <= 230 && defined(QT_NO_CODECS)
64#include "qutfcodec.h"
65#endif
66#include "config.h"
67#include "network.h"
68#include "fontmanager.h"
69#include "power.h"
70#include "alarmserver.h"
71#include "applnk.h"
72#include "qpemenubar.h"
73
74#include <unistd.h>
75#include <sys/file.h>
76#include <sys/ioctl.h>
77#include <sys/soundcard.h>
78
79// for setBacklight()
80#if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX)
81#include <linux/fb.h>
82#include <sys/types.h>
83#include <sys/stat.h>
84#endif
85#include <stdlib.h>
86
87
88class QPEApplicationData {
89public:
90 QPEApplicationData() : presstimer(0), presswidget(0), rightpressed(FALSE),
91 kbgrabber(0), kbregrab(FALSE), notbusysent(FALSE), preloaded(FALSE),
92 forceshow(FALSE), nomaximize(FALSE), qpe_main_widget(0),
93 keep_running(TRUE)
94 {
95 qcopq.setAutoDelete(TRUE);
96 }
97
98 int presstimer;
99 QWidget* presswidget;
100 QPoint presspos;
101 bool rightpressed;
102 int kbgrabber;
103 bool kbregrab;
104 bool notbusysent;
105 QString appName;
106 struct QCopRec {
107 QCopRec(const QCString &ch, const QCString &msg,
108 const QByteArray &d) :
109 channel(ch), message(msg), data(d) { }
110
111 QCString channel;
112 QCString message;
113 QByteArray data;
114 };
115 bool preloaded;
116 bool forceshow;
117 bool nomaximize;
118 QWidget* qpe_main_widget;
119 bool keep_running;
120 QList<QCopRec> qcopq;
121
122 void enqueueQCop(const QCString &ch, const QCString &msg,
123 const QByteArray &data)
124 {
125 qcopq.append(new QCopRec(ch,msg,data));
126 }
127 void sendQCopQ()
128 {
129 QCopRec* r;
130 for (QListIterator<QCopRec> it(qcopq); (r=it.current()); ++it)
131 QCopChannel::sendLocally(r->channel,r->message,r->data);
132 qcopq.clear();
133 }
134};
135
136class ResourceMimeFactory : public QMimeSourceFactory {
137public:
138 ResourceMimeFactory()
139 {
140 QStringList path;
141 QString lang = getenv("LANG");
142 if ( !lang.isEmpty() )
143 path += QPEApplication::qpeDir() + "/help/" + lang + "/html";
144 path += QPEApplication::qpeDir() + "/pics";
145 path += QPEApplication::qpeDir() + "/help/en/html";
146 path += QPEApplication::qpeDir() + "/docs";
147 QString dir = QDir::current().canonicalPath();
148 if ( dir == "/" )
149 dir += "/docs";
150 else {
151 path += dir + "/../pics";
152 dir += "/../docs";
153 path += dir;
154 }
155 setFilePath( path );
156 setExtensionType("html","text/html;charset=UTF-8");
157 }
158
159 const QMimeSource* data(const QString& abs_name) const
160 {
161 const QMimeSource* r = QMimeSourceFactory::data(abs_name);
162 if ( !r ) {
163 int sl = abs_name.length();
164 do {
165 sl = abs_name.findRev('/',sl-1);
166 QString name = sl>=0 ? abs_name.mid(sl+1) : abs_name;
167 int dot = name.findRev('.');
168 if ( dot >= 0 )
169 name = name.left(dot);
170 QImage img = Resource::loadImage(name);
171 if ( !img.isNull() )
172 r = new QImageDrag(img);
173 } while (!r && sl>0);
174 }
175 return r;
176 }
177};
178
179static int muted=0;
180
181static void setVolume(int t=0, int percent=-1)
182{
183 switch (t) {
184 case 0: {
185 Config cfg("Sound");
186 cfg.setGroup("System");
187 if ( percent < 0 )
188 percent = cfg.readNumEntry("Volume",50);
189 int fd = 0;
190 if ((fd = open("/dev/mixer", O_RDWR))>=0) {
191 int vol = muted ? 0 : percent;
192 // set both channels to same volume
193 vol |= vol << 8;
194 ioctl(fd, MIXER_WRITE(0), &vol);
195 ::close(fd);
196 }
197 } break;
198 }
199}
200
201int qpe_sysBrightnessSteps()
202{
203#if defined(QT_QWS_IPAQ)
204 return 255;
205#elif defined(QT_QWS_EBX)
206 return 4;
207#else
208 return 255; // ?
209#endif
210}
211
212
213static int& hack(int& i)
214{
215#if QT_VERSION <= 230 && defined(QT_NO_CODECS)
216 // These should be created, but aren't in Qt 2.3.0
217 (void)new QUtf8Codec;
218 (void)new QUtf16Codec;
219#endif
220 return i;
221}
222
223static bool forced_off = FALSE;
224static int curbl=-1;
225
226static int backlight()
227{
228 if ( curbl == -1 ) {
229 // Read from config
230 Config config( "qpe" );
231 config.setGroup( "Screensaver" );
232 curbl = config.readNumEntry("Brightness",255);
233 }
234 return curbl;
235}
236
237static void setBacklight(int bright)
238{
239 if ( bright == -3 ) {
240 // Forced on
241 forced_off = FALSE;
242 bright = -1;
243 }
244 if ( forced_off && bright != -2 )
245 return;
246 if ( bright == -2 ) {
247 // Toggle between off and on
248 bright = curbl ? 0 : -1;
249 forced_off = !bright;
250 }
251 if ( bright == -1 ) {
252 // Read from config
253 Config config( "qpe" );
254 config.setGroup( "Screensaver" );
255 bright = config.readNumEntry("Brightness",255);
256 }
257#if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX)
258 if ( QFile::exists("/usr/bin/bl") ) {
259 QString cmd = "/usr/bin/bl 1 ";
260 cmd += bright<=0 ? "0 " : "1 ";
261 cmd += QString::number(bright);
262 system(cmd.latin1());
263#if defined(QT_QWS_EBX)
264 } else if ( QFile::exists("/dev/fl") ) {
265#define FL_IOCTL_STEP_CONTRAST 100
266 int fd = open("/dev/fl", O_WRONLY);
267 if (fd >= 0 ) {
268 int steps = qpe_sysBrightnessSteps();
269 int bl = ( bright * steps + 127 ) / 255;
270 if ( bright && !bl ) bl = 1;
271 bl = ioctl(fd, FL_IOCTL_STEP_CONTRAST, bl);
272 close(fd);
273 }
274 }
275#elif defined(QT_QWS_IPAQ)
276 } else if ( QFile::exists("/dev/ts") || QFile::exists("/dev/h3600_ts") ) {
277 typedef struct {
278 unsigned char mode;
279 unsigned char pwr;
280 unsigned char brightness;
281 } FLITE_IN;
282# ifndef FLITE_ON
283# ifndef _LINUX_IOCTL_H
284# include <linux/ioctl.h>
285# endif
286# define FLITE_ON _IOW('f', 7, FLITE_IN)
287# endif
288 int fd;
289 if ( QFile::exists("/dev/ts") )
290 fd = open("/dev/ts", O_WRONLY);
291 else
292 fd = open("/dev/h3600_ts", O_WRONLY);
293 if (fd >= 0 ) {
294 FLITE_IN bl;
295 bl.mode = 1;
296 bl.pwr = bright ? 1 : 0;
297 bl.brightness = bright;
298 ioctl(fd, FLITE_ON, &bl);
299 close(fd);
300 }
301 }
302#endif
303#endif
304 curbl = bright;
305}
306
307void qpe_setBacklight(int bright) { setBacklight(bright); }
308
309static bool dim_on = FALSE;
310static bool lightoff_on = FALSE;
311static int disable_suspend = 100;
312
313static bool powerOnline()
314{
315 return PowerStatusManager::readStatus().acStatus() == PowerStatus::Online;
316}
317
318static bool networkOnline()
319{
320 return Network::networkOnline();
321}
322
323class QPEScreenSaver : public QWSScreenSaver
324{
325
326public:
327 QPEScreenSaver()
328 {
329 }
330 void restore()
331 {
332 setBacklight(-1);
333 }
334 bool save(int level)
335 {
336 switch ( level ) {
337 case 0:
338 if ( disable_suspend > 0 && dim_on ) {
339 if (backlight() > 1)
340 setBacklight(1); // lowest non-off
341 }
342 return TRUE;
343 break;
344 case 1:
345 if ( disable_suspend > 1 && lightoff_on ) {
346 setBacklight(0); // off
347 }
348 return TRUE;
349 break;
350 case 2:
351 if ( disable_suspend > 2 && !powerOnline() && !networkOnline() ) {
352 QWSServer::sendKeyEvent( 0xffff, Qt::Key_F34, FALSE, TRUE, FALSE );
353 return TRUE;
354 }
355 break;
356 }
357 return FALSE;
358 }
359};
360
361static int ssi(int interval, Config &config, const QString &enable, const QString& value, int def)
362{
363 if ( !enable.isEmpty() && config.readNumEntry(enable,0) == 0 )
364 return 0;
365
366 if ( interval < 0 ) {
367 // Restore screen blanking and power saving state
368 interval = config.readNumEntry( value, def );
369 }
370 return interval;
371}
372
373static void setScreenSaverIntervals(int i1, int i2, int i3)
374{
375 Config config( "qpe" );
376 config.setGroup( "Screensaver" );
377
378 int v[4];
379 i1 = ssi(i1, config, "Dim","Interval_Dim", 30);
380 i2 = ssi(i2, config, "LightOff","Interval_LightOff", 20);
381 i3 = ssi(i3, config, "","Interval", 60);
382
383 //qDebug("screen saver intervals: %d %d %d", i1, i2, i3);
384
385 v[0] = QMAX( 1000*i1, 100);
386 v[1] = QMAX( 1000*i2, 100);
387 v[2] = QMAX( 1000*i3, 100);
388 v[3] = 0;
389 dim_on = ( (i1 != 0) ? config.readNumEntry("Dim",1) : FALSE );
390 lightoff_on = ( (i2 != 0 ) ? config.readNumEntry("LightOff",1) : FALSE );
391 if ( !i1 && !i2 && !i3 )
392 QWSServer::setScreenSaverInterval(0);
393 else
394 QWSServer::setScreenSaverIntervals(v);
395}
396
397static void setScreenSaverInterval(int interval)
398{
399 setScreenSaverIntervals(-1,-1,interval);
400}
401
402
403/*!
404 \class QPEApplication qpeapplication.h
405 \brief The QPEApplication class implements various system services
406 that are available to all Qtopia applications.
407
408 Simply by using QPEApplication instead of QApplication, a plain Qt
409 application becomes a Qtopia application. It automatically follows
410 style changes, quits and raises, and in the
411 case of \link docwidget.html document-oriented\endlink applications,
412 changes the current displayed document in response to the environment.
413*/
414
415/*!
416 \fn void QPEApplication::clientMoused()
417
418 \internal
419*/
420
421/*!
422 \fn void QPEApplication::timeChanged();
423
424 This signal is emitted when the time jumps forward or backwards
425 by more than the normal passage of time.
426*/
427
428/*!
429 \fn void QPEApplication::clockChanged( bool ampm );
430
431 This signal is emitted when the user changes the style
432 of clock. If \a ampm is TRUE, the user wants a 12-hour
433 AM/PM close, otherwise, they want a 24-hour clock.
434*/
435
436/*!
437 \fn void QPEApplication::appMessage( const QCString& msg, const QByteArray& data )
438
439 This signal is emitted when a message is received on the
440 QPE/Application/<i>appname</i> QCop channel for this application.
441
442 The slot to which you connect this signal uses \a msg and \a data
443 in the following way:
444
445\code
446 void MyWidget::receive( const QCString& msg, const QByteArray& data )
447 {
448 QDataStream stream( data, IO_ReadOnly );
449 if ( msg == "someMessage(int,int,int)" ) {
450 int a,b,c;
451 stream >> a >> b >> c;
452 ...
453 } else if ( msg == "otherMessage(QString)" ) {
454 ...
455 }
456 }
457\endcode
458
459 \sa qcop.html
460*/
461
462/*!
463 Constructs a QPEApplication just as you would construct
464 a QApplication, passing \a argc, \a argv, and \a t.
465*/
466QPEApplication::QPEApplication( int& argc, char **argv, Type t )
467 : QApplication( hack(argc), argv, t )
468{
469 int dw = desktop()->width();
470 if ( dw < 200 ) {
471 setFont( QFont( "helvetica", 8 ) );
472 AppLnk::setSmallIconSize(10);
473 AppLnk::setBigIconSize(28);
474 }
475
476 d = new QPEApplicationData;
477 QMimeSourceFactory::setDefaultFactory(new ResourceMimeFactory);
478
479 connect(this, SIGNAL(lastWindowClosed()), this, SLOT(hideOrQuit()));
480#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
481
482 QString qcopfn("/tmp/qcop-msg-");
483 qcopfn += QString(argv[0]); // append command name
484
485 QFile f(qcopfn);
486 if ( f.open(IO_ReadOnly) ) {
487 flock(f.handle(), LOCK_EX);
488 }
489
490 sysChannel = new QCopChannel( "QPE/System", this );
491 connect( sysChannel, SIGNAL(received(const QCString &, const QByteArray &)),
492 this, SLOT(systemMessage( const QCString &, const QByteArray &)) );
493
494 QCString channel = QCString(argv[0]);
495 channel.replace(QRegExp(".*/"),"");
496 d->appName = channel;
497 channel = "QPE/Application/" + channel;
498 pidChannel = new QCopChannel( channel, this);
499 connect( pidChannel, SIGNAL(received(const QCString &, const QByteArray &)),
500 this, SLOT(pidMessage(const QCString &, const QByteArray &)));
501
502 if ( f.isOpen() ) {
503 d->keep_running = FALSE;
504 QDataStream ds(&f);
505 QCString channel, message;
506 QByteArray data;
507 while(!ds.atEnd()) {
508 ds >> channel >> message >> data;
509 d->enqueueQCop(channel,message,data);
510 }
511
512 flock(f.handle(), LOCK_UN);
513 f.close();
514 f.remove();
515 }
516
517 for (int a=0; a<argc; a++) {
518 if ( qstrcmp(argv[a],"-preload")==0 ) {
519 argv[a] = argv[a+1];
520 a++;
521 d->preloaded = TRUE;
522 argc-=1;
523 } else if ( qstrcmp(argv[a],"-preload-show")==0 ) {
524 argv[a] = argv[a+1];
525 a++;
526 d->preloaded = TRUE;
527 d->forceshow = TRUE;
528 argc-=1;
529 }
530 }
531
532 /* overide stored arguments */
533 setArgs(argc, argv);
534
535#endif
536
537 qwsSetDecoration( new QPEDecoration() );
538
539#ifndef QT_NO_TRANSLATION
540 char *l = getenv( "LANG" );
541 QString lang;
542 if ( l ) {
543 lang = l;
544
545 /*
546 Config config("qpe");
547 config.setGroup( "Appearance" );
548 lang = config.readEntry( "Language", lang );
549 */
550
551 QTranslator * trans = new QTranslator(this);
552 QString tfn = qpeDir()+"/i18n/"+lang+"/"+d->appName+".qm";
553 if ( trans->load( tfn ))
554 installTranslator( trans );
555 else
556 delete trans;
557
558 trans = new QTranslator(this);
559 tfn = qpeDir()+"/i18n/"+lang+"/libqpe.qm";
560 if ( trans->load( tfn ))
561 installTranslator( trans );
562 else
563 delete trans;
564
565 //###language/font hack; should look it up somewhere
566 if ( lang == "ja" || lang == "zh_CN" || lang == "zh_TW" || lang == "ko" ) {
567 QFont fn = FontManager::unicodeFont( FontManager::Proportional );
568 setFont( fn );
569 }
570 }
571#endif
572
573 applyStyle();
574
575 if ( type() == GuiServer ) {
576 setScreenSaverInterval(-1);
577 setVolume();
578 QWSServer::setScreenSaver(new QPEScreenSaver);
579 }
580
581 installEventFilter( this );
582
583 QPEMenuToolFocusManager::initialize();
584
585#ifdef QT_NO_QWS_CURSOR
586 // if we have no cursor, probably don't want tooltips
587 QToolTip::setEnabled( FALSE );
588#endif
589}
590
591static QPtrDict<void>* inputMethodDict=0;
592static void createInputMethodDict()
593{
594 if ( !inputMethodDict )
595 inputMethodDict = new QPtrDict<void>;
596}
597
598/*!
599 Returns the currently set hint to the system as to whether
600 \a w has any use for text input methods.
601
602 \sa setInputMethodHint()
603*/
604QPEApplication::InputMethodHint QPEApplication::inputMethodHint( QWidget* w )
605{
606 if ( inputMethodDict && w )
607 return (InputMethodHint)(int)inputMethodDict->find(w);
608 return Normal;
609}
610
611/*!
612 \enum QPEApplication::InputMethodHint
613
614 \value Normal the application sometimes needs text input (the default).
615 \value AlwaysOff the application never needs text input.
616 \value AlwaysOn the application always needs text input.
617*/
618
619/*!
620 Hints to the system that \a w has use for text input methods
621 as specified by \a mode.
622
623 \sa inputMethodHint()
624*/
625void QPEApplication::setInputMethodHint( QWidget* w, InputMethodHint mode )
626{
627 createInputMethodDict();
628 if ( mode == Normal ) {
629 inputMethodDict->remove(w);
630 } else {
631 inputMethodDict->insert(w,(void*)mode);
632 }
633}
634
635class HackDialog : public QDialog
636{
637public:
638 void acceptIt() { accept(); }
639 void rejectIt() { reject(); }
640};
641
642
643void QPEApplication::mapToDefaultAction( QWSKeyEvent *ke, int key )
644{
645 // specialised actions for certain widgets. May want to
646 // add more stuff here.
647 if ( activePopupWidget() && activePopupWidget()->inherits( "QListBox" )
648 && activePopupWidget()->parentWidget()
649 && activePopupWidget()->parentWidget()->inherits( "QComboBox" ) )
650 key = Qt::Key_Return;
651
652 if ( activePopupWidget() && activePopupWidget()->inherits( "QPopupMenu" ) )
653 key = Qt::Key_Return;
654
655 ke->simpleData.keycode = key;
656}
657
658class HackWidget : public QWidget
659{
660public:
661 bool needsOk()
662 { return (getWState() & WState_Reserved1 ); }
663};
664
665/*!
666 \internal
667*/
668bool QPEApplication::qwsEventFilter( QWSEvent *e )
669{
670 if ( !d->notbusysent && e->type == QWSEvent::Focus ) {
671 if ( qApp->type() != QApplication::GuiServer ) {
672 QCopEnvelope e("QPE/System", "notBusy(QString)" );
673 e << d->appName;
674 }
675 d->notbusysent=TRUE;
676 }
677 if ( type() == GuiServer ) {
678 switch ( e->type ) {
679 case QWSEvent::Mouse:
680 if ( e->asMouse()->simpleData.state && !QWidget::find(e->window()) )
681 emit clientMoused();
682 }
683 }
684 if ( e->type == QWSEvent::Key ) {
685 if ( d->kbgrabber == 1 )
686 return TRUE;
687 QWSKeyEvent *ke = (QWSKeyEvent *)e;
688 if ( ke->simpleData.keycode == Qt::Key_F33 ) {
689 // Use special "OK" key to press "OK" on top level widgets
690 QWidget *active = activeWindow();
691 QWidget *popup = 0;
692 if ( active && active->isPopup() ) {
693 popup = active;
694 active = active->parentWidget();
695 }
696 if ( active && (int)active->winId() == ke->simpleData.window &&
697 !active->testWFlags( WStyle_Customize|WType_Popup|WType_Desktop )) {
698 if ( ke->simpleData.is_press ) {
699 if ( popup )
700 popup->close();
701 if ( active->inherits( "QDialog" ) ) {
702 HackDialog *d = (HackDialog *)active;
703 d->acceptIt();
704 return TRUE;
705 } else if ( ((HackWidget *)active)->needsOk() ) {
706 QSignal s;
707 s.connect( active, SLOT( accept() ) );
708 s.activate();
709 } else {
710 // do the same as with the select key: Map to the default action of the widget:
711 mapToDefaultAction( ke, Qt::Key_Return );
712 }
713 }
714 }
715 } else if ( ke->simpleData.keycode == Qt::Key_F30 ) {
716 // Use special "select" key to do whatever default action a widget has
717 mapToDefaultAction( ke, Qt::Key_Space );
718 } else if ( ke->simpleData.keycode == Qt::Key_Escape &&
719 ke->simpleData.is_press ) {
720 // Escape key closes app if focus on toplevel
721 QWidget *active = activeWindow();
722 if ( active && active->testWFlags( WType_TopLevel ) &&
723 (int)active->winId() == ke->simpleData.window &&
724 !active->testWFlags( WStyle_Dialog|WStyle_Customize|WType_Popup|WType_Desktop )) {
725 if ( active->inherits( "QDialog" ) ) {
726 HackDialog *d = (HackDialog *)active;
727 d->rejectIt();
728 return TRUE;
729 } else if ( strcmp( argv()[0], "embeddedkonsole") != 0 ) {
730 active->close();
731 }
732 }
733 }
734
735#if QT_VERSION < 231
736 // Filter out the F4/Launcher key from apps
737 // ### The launcher key may not always be F4 on all devices
738 if ( ((QWSKeyEvent *)e)->simpleData.keycode == Qt::Key_F4 )
739 return TRUE;
740#endif
741 }
742 if ( e->type == QWSEvent::Focus ) {
743 QWSFocusEvent *fe = (QWSFocusEvent*)e;
744 QWidget* nfw = QWidget::find(e->window());
745 if ( !fe->simpleData.get_focus ) {
746 QWidget *active = activeWindow();
747 while ( active && active->isPopup() ) {
748 active->close();
749 active = activeWindow();
750 }
751 if ( !nfw && d->kbgrabber == 2 ) {
752 ungrabKeyboard();
753 d->kbregrab = TRUE; // want kb back when we're active
754 }
755 } else {
756 // make sure our modal widget is ALWAYS on top
757 QWidget *topm = activeModalWidget();
758 if ( topm ) {
759 topm->raise();
760 }
761 if ( d->kbregrab ) {
762 grabKeyboard();
763 d->kbregrab = FALSE;
764 }
765 }
766 if ( fe->simpleData.get_focus && inputMethodDict ) {
767 InputMethodHint m = inputMethodHint( QWidget::find(e->window()) );
768 if ( m == AlwaysOff )
769 Global::hideInputMethod();
770 if ( m == AlwaysOn )
771 Global::showInputMethod();
772 }
773 }
774 return QApplication::qwsEventFilter( e );
775}
776
777/*!
778 Destroys the QPEApplication.
779*/
780QPEApplication::~QPEApplication()
781{
782 ungrabKeyboard();
783#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
784 // Need to delete QCopChannels early, since the display will
785 // be gone by the time we get to ~QObject().
786 delete sysChannel;
787 delete pidChannel;
788#endif
789 delete d;
790}
791
792/*!
793 Returns <tt>$QPEDIR/</tt>.
794*/
795QString QPEApplication::qpeDir()
796{
797 const char *base = getenv( "QPEDIR" );
798 if ( base )
799 return QString( base ) + "/";
800
801 return QString( "../" );
802}
803
804/*!
805 Returns the user's current Document directory. There is a trailing "/".
806*/
807QString QPEApplication::documentDir()
808{
809 const char *base = getenv( "HOME" );
810 if ( base )
811 return QString( base ) + "/Documents/";
812
813 return QString( "../Documents/" );
814}
815
816static int deforient=-1;
817
818/*!
819 \internal
820*/
821int QPEApplication::defaultRotation()
822{
823 if ( deforient < 0 ) {
824 QString d = getenv("QWS_DISPLAY");
825 if ( d.contains("Rot90") ) {
826 deforient = 90;
827 } else if ( d.contains("Rot180") ) {
828 deforient = 180;
829 } else if ( d.contains("Rot270") ) {
830 deforient = 270;
831 } else {
832 deforient=0;
833 }
834 }
835 return deforient;
836}
837
838/*!
839 \internal
840*/
841void QPEApplication::setDefaultRotation(int r)
842{
843 if ( qApp->type() == GuiServer ) {
844 deforient = r;
845 setenv("QWS_DISPLAY", QString("Transformed:Rot%1:0").arg(r).latin1(), 1);
846 } else {
847 QCopEnvelope("QPE/System", "setDefaultRotation(int)") << r;
848 }
849}
850
851/*!
852 \internal
853*/
854void QPEApplication::applyStyle()
855{
856 Config config( "qpe" );
857
858 config.setGroup( "Appearance" );
859
860 // Widget style
861 QString style = config.readEntry( "Style", "Light" );
862 internalSetStyle( style );
863
864 // Colors
865 QColor bgcolor( config.readEntry( "Background", "#E5E1D5" ) );
866 QColor btncolor( config.readEntry( "Button", "#D6CDBB" ) );
867 QPalette pal( btncolor, bgcolor );
868 QString color = config.readEntry( "Highlight", "#800000" );
869 pal.setColor( QColorGroup::Highlight, QColor(color) );
870 color = config.readEntry( "HighlightedText", "#FFFFFF" );
871 pal.setColor( QColorGroup::HighlightedText, QColor(color) );
872 color = config.readEntry( "Text", "#000000" );
873 pal.setColor( QColorGroup::Text, QColor(color) );
874 color = config.readEntry( "ButtonText", "#000000" );
875 pal.setColor( QPalette::Active, QColorGroup::ButtonText, QColor(color) );
876 color = config.readEntry( "Base", "#FFFFFF" );
877 pal.setColor( QColorGroup::Base, QColor(color) );
878
879 pal.setColor( QPalette::Disabled, QColorGroup::Text,
880 pal.color(QPalette::Active, QColorGroup::Background).dark() );
881
882 setPalette( pal, TRUE );
883}
884
885void QPEApplication::systemMessage( const QCString &msg, const QByteArray &data)
886{
887#ifdef Q_WS_QWS
888 QDataStream stream( data, IO_ReadOnly );
889 if ( msg == "applyStyle()" ) {
890 applyStyle();
891 } else if ( msg == "setScreenSaverInterval(int)" ) {
892 if ( type() == GuiServer ) {
893 int time;
894 stream >> time;
895 setScreenSaverInterval(time);
896 }
897 } else if ( msg == "setScreenSaverIntervals(int,int,int)" ) {
898 if ( type() == GuiServer ) {
899 int t1,t2,t3;
900 stream >> t1 >> t2 >> t3;
901 setScreenSaverIntervals(t1,t2,t3);
902 }
903 } else if ( msg == "setBacklight(int)" ) {
904 if ( type() == GuiServer ) {
905 int bright;
906 stream >> bright;
907 setBacklight(bright);
908 }
909 } else if ( msg == "setDefaultRotation(int)" ) {
910 if ( type() == GuiServer ) {
911 int r;
912 stream >> r;
913 setDefaultRotation(r);
914 }
915 } else if ( msg == "shutdown()" ) {
916 if ( type() == GuiServer )
917 shutdown();
918 } else if ( msg == "quit()" ) {
919 if ( type() != GuiServer )
920 tryQuit();
921 } else if ( msg == "forceQuit()" ) {
922 if ( type() != GuiServer )
923 quit();
924 } else if ( msg == "restart()" ) {
925 if ( type() == GuiServer )
926 restart();
927 } else if ( msg == "grabKeyboard(QString)" ) {
928 QString who;
929 stream >> who;
930 if ( who.isEmpty() )
931 d->kbgrabber = 0;
932 else if ( who != d->appName )
933 d->kbgrabber = 1;
934 else
935 d->kbgrabber = 2;
936 } else if ( msg == "language(QString)" ) {
937 if ( type() == GuiServer ) {
938 QString l;
939 stream >> l;
940 QString cl = getenv("LANG");
941 if ( cl != l ) {
942 if ( l.isNull() )
943 unsetenv( "LANG" );
944 else
945 setenv( "LANG", l.latin1(), 1 );
946 restart();
947 }
948 }
949 } else if ( msg == "timeChange(QString)" ) {
950 QString t;
951 stream >> t;
952 if ( t.isNull() )
953 unsetenv( "TZ" );
954 else
955 setenv( "TZ", t.latin1(), 1 );
956 // emit the signal so everyone else knows...
957 emit timeChanged();
958 } else if ( msg == "execute(QString)" ) {
959 if ( type() == GuiServer ) {
960 QString t;
961 stream >> t;
962 Global::execute( t );
963 }
964 } else if ( msg == "execute(QString,QString)" ) {
965 if ( type() == GuiServer ) {
966 QString t,d;
967 stream >> t >> d;
968 Global::execute( t, d );
969 }
970 } else if ( msg == "addAlarm(QDateTime,QCString,QCString,int)" ) {
971 if ( type() == GuiServer ) {
972 QDateTime when;
973 QCString channel, message;
974 int data;
975 stream >> when >> channel >> message >> data;
976 AlarmServer::addAlarm( when, channel, message, data );
977 }
978 } else if ( msg == "deleteAlarm(QDateTime,QCString,QCString,int)" ) {
979 if ( type() == GuiServer ) {
980 QDateTime when;
981 QCString channel, message;
982 int data;
983 stream >> when >> channel >> message >> data;
984 AlarmServer::deleteAlarm( when, channel, message, data );
985 }
986 } else if ( msg == "clockChange(bool)" ) {
987 int tmp;
988 stream >> tmp;
989 emit clockChanged( tmp );
990 } else if ( msg == "weekChange(bool)" ) {
991 int tmp;
992 stream >> tmp;
993 emit weekChanged( tmp );
994 } else if ( msg == "setDateFormat(DateFormat)" ) {
995 DateFormat tmp;
996 stream >> tmp;
997 emit dateFormatChanged( tmp );
998 } else if ( msg == "setVolume(int,int)" ) {
999 int t,v;
1000 stream >> t >> v;
1001 setVolume(t,v);
1002 emit volumeChanged( muted );
1003 } else if ( msg == "volumeChange(bool)" ) {
1004 stream >> muted;
1005 setVolume();
1006 emit volumeChanged( muted );
1007 } else if ( msg == "setScreenSaverMode(int)" ) {
1008 if ( type() == GuiServer ) {
1009 int old = disable_suspend;
1010 stream >> disable_suspend;
1011 //qDebug("setScreenSaverMode(%d)", disable_suspend );
1012 if ( disable_suspend > old )
1013 setScreenSaverInterval( -1 );
1014 }
1015 }
1016#endif
1017}
1018
1019/*!
1020 \internal
1021*/
1022bool QPEApplication::raiseAppropriateWindow()
1023{
1024 bool r=FALSE;
1025 // ########## raise()ing main window should raise and set active
1026 // ########## it and then all childen. This belongs in Qt/Embedded
1027 QWidget *top = d->qpe_main_widget;
1028 if ( !top ) top =mainWidget();
1029 if ( top && d->keep_running ) {
1030 if ( top->isVisible() )
1031 r = TRUE;
1032#ifdef Q_WS_QWS
1033 if ( !d->nomaximize )
1034 top->showMaximized();
1035 else
1036#endif
1037 top->show();
1038 top->raise();
1039 top->setActiveWindow();
1040 }
1041 QWidget *topm = activeModalWidget();
1042 if ( topm && topm != top ) {
1043 topm->show();
1044 topm->raise();
1045 topm->setActiveWindow();
1046 r = FALSE;
1047 }
1048 return r;
1049}
1050
1051void QPEApplication::pidMessage( const QCString &msg, const QByteArray & data)
1052{
1053#ifdef Q_WS_QWS
1054
1055 if ( msg == "quit()" ) {
1056 tryQuit();
1057 } else if ( msg == "quitIfInvisible()" ) {
1058 if ( d->qpe_main_widget && !d->qpe_main_widget->isVisible() )
1059 quit();
1060 } else if ( msg == "close()" ) {
1061 hideOrQuit();
1062 } else if ( msg == "disablePreload()" ) {
1063 d->preloaded = FALSE;
1064 d->keep_running = TRUE;
1065 /* so that quit will quit */
1066 } else if ( msg == "enablePreload()" ) {
1067 d->preloaded = TRUE;
1068 d->keep_running = TRUE;
1069 /* so next quit won't quit */
1070 } else if ( msg == "raise()" ) {
1071 d->keep_running = TRUE;
1072 d->notbusysent = FALSE;
1073 raiseAppropriateWindow();
1074 } else if ( msg == "flush()" ) {
1075 emit flush();
1076 // we need to tell the desktop
1077 QCopEnvelope e( "QPE/Desktop", "flushDone(QString)" );
1078 e << d->appName;
1079 } else if ( msg == "reload()" ) {
1080 emit reload();
1081 } else if ( msg == "setDocument(QString)" ) {
1082 d->keep_running = TRUE;
1083 QDataStream stream( data, IO_ReadOnly );
1084 QString doc;
1085 stream >> doc;
1086 QWidget *mw = mainWidget();
1087 if ( !mw )
1088 mw = d->qpe_main_widget;
1089 if ( mw )
1090 Global::setDocument( mw, doc );
1091 } else if ( msg == "nextView()" ) {
1092 if ( raiseAppropriateWindow() )
1093 emit appMessage( msg, data);
1094 } else {
1095 emit appMessage( msg, data);
1096 }
1097#endif
1098}
1099
1100
1101static bool setWidgetCaptionFromAppName( QWidget* /*mw*/, const QString& /*appName*/, const QString& /*appsPath*/ )
1102{
1103/*
1104 // This works but disable it for now until it is safe to apply
1105 // What is does is scan the .desktop files of all the apps for
1106 // the applnk that has the corresponding argv[0] as this program
1107 // then it uses the name stored in the .desktop file as the caption
1108 // for the main widget. This saves duplicating translations for
1109 // the app name in the program and in the .desktop files.
1110
1111 AppLnkSet apps( appsPath );
1112
1113 QList<AppLnk> appsList = apps.children();
1114 for ( QListIterator<AppLnk> it(appsList); it.current(); ++it ) {
1115 if ( (*it)->exec() == appName ) {
1116 mw->setCaption( (*it)->name() );
1117 return TRUE;
1118 }
1119 }
1120*/
1121 return FALSE;
1122}
1123
1124
1125/*!
1126 Sets \a mw as the mainWidget() and shows it. For small windows,
1127 consider passing TRUE for \a nomaximize rather than the default FALSE.
1128
1129 \sa showMainDocumentWidget()
1130*/
1131void QPEApplication::showMainWidget( QWidget* mw, bool nomaximize )
1132{
1133 setWidgetCaptionFromAppName( mw, d->appName, qpeDir() + "apps" );
1134
1135 d->nomaximize = nomaximize;
1136 d->qpe_main_widget = mw;
1137 d->sendQCopQ();
1138 if ( d->preloaded ) {
1139 if(d->forceshow) {
1140#ifdef Q_WS_QWS
1141 if ( !nomaximize )
1142 mw->showMaximized();
1143 else
1144#endif
1145 mw->show();
1146 }
1147 } else if ( d->keep_running ) {
1148#ifdef Q_WS_QWS
1149 if ( !nomaximize )
1150 mw->showMaximized();
1151 else
1152#endif
1153 mw->show();
1154 }
1155}
1156
1157/*!
1158 Sets \a mw as the mainWidget() and shows it. For small windows,
1159 consider passing TRUE for \a nomaximize rather than the default FALSE.
1160
1161 This calls designates the application as
1162 a \link docwidget.html document-oriented\endlink application.
1163
1164 The \a mw widget must have a slot: setDocument(const QString&).
1165
1166 \sa showMainWidget()
1167*/
1168void QPEApplication::showMainDocumentWidget( QWidget* mw, bool nomaximize )
1169{
1170 setWidgetCaptionFromAppName( mw, d->appName, qpeDir() + "apps" );
1171
1172 if ( mw && argc() == 2 )
1173 Global::setDocument( mw, QString::fromUtf8(argv()[1]) );
1174 d->nomaximize = nomaximize;
1175 d->qpe_main_widget = mw;
1176 d->sendQCopQ();
1177 if ( d->preloaded ) {
1178 if(d->forceshow) {
1179#ifdef Q_WS_QWS
1180 if ( !nomaximize )
1181 mw->showMaximized();
1182 else
1183#endif
1184 mw->show();
1185 }
1186 } else if ( d->keep_running ) {
1187#ifdef Q_WS_QWS
1188 if ( !nomaximize )
1189 mw->showMaximized();
1190 else
1191#endif
1192 mw->show();
1193 }
1194}
1195
1196
1197/*!
1198 Sets that the application should continue running after processing
1199 qcop messages. Normally if an application is started via a qcop message,
1200 the application will process the qcop message and then quit. If while
1201 processing the qcop message it calls this function, then the application
1202 will show and start proper once it has finished processing qcop messages.
1203
1204 \sa keepRunning()
1205*/
1206void QPEApplication::setKeepRunning()
1207{
1208 if ( qApp && qApp->inherits( "QPEApplication" ) ) {
1209 QPEApplication *qpeApp = (QPEApplication*)qApp;
1210 qpeApp->d->keep_running = TRUE;
1211 }
1212}
1213
1214/*!
1215 Returns whether the application will quit after processing the current
1216 list of qcop messages.
1217
1218 \sa setKeepRunning()
1219*/
1220bool QPEApplication::keepRunning() const
1221{
1222 return d->keep_running;
1223}
1224
1225/*!
1226 \internal
1227*/
1228void QPEApplication::internalSetStyle( const QString &style )
1229{
1230#if QT_VERSION >= 300
1231 if ( style == "QPE" ) {
1232 setStyle( new QPEStyle );
1233 } else {
1234 QStyle *s = QStyleFactory::create(style);
1235 if ( s ) setStyle(s);
1236 }
1237#else
1238 if ( style == "Windows" ) {
1239 setStyle( new QWindowsStyle );
1240 } else if ( style == "QPE" ) {
1241 setStyle( new QPEStyle );
1242 } else if ( style == "Light" ) {
1243 setStyle( new LightStyle );
1244 }
1245#ifndef QT_NO_STYLE_PLATINUM
1246 else if ( style == "Platinum" ) {
1247 setStyle( new QPlatinumStyle );
1248 }
1249#endif
1250#ifndef QT_NO_STYLE_MOTIF
1251 else if ( style == "Motif" ) {
1252 setStyle( new QMotifStyle );
1253 }
1254#endif
1255#ifndef QT_NO_STYLE_MOTIFPLUS
1256 else if ( style == "MotifPlus" ) {
1257 setStyle( new QMotifPlusStyle );
1258 }
1259#endif
1260#endif
1261}
1262
1263/*!
1264 \internal
1265*/
1266void QPEApplication::prepareForTermination(bool willrestart)
1267{
1268 if ( willrestart ) {
1269 // Draw a big wait icon, the image can be altered in later revisions
1270 //QWidget *d = QApplication::desktop();
1271 QImage img = Resource::loadImage( "wait" );
1272 QPixmap pix;
1273 pix.convertFromImage(img.smoothScale(3*img.width(), 3*img.height()));
1274 QLabel *lblWait = new QLabel(0, "wait hack!", QWidget::WStyle_Customize |
1275 QWidget::WStyle_NoBorder | QWidget::WStyle_Tool );
1276 lblWait->setPixmap( pix );
1277 lblWait->setAlignment( QWidget::AlignCenter );
1278 lblWait->show();
1279 lblWait->showMaximized();
1280 }
1281#ifndef SINGLE_APP
1282 { QCopEnvelope envelope("QPE/System", "forceQuit()"); }
1283 processEvents(); // ensure the message goes out.
1284 sleep(1); // You have 1 second to comply.
1285#endif
1286}
1287
1288/*!
1289 \internal
1290*/
1291void QPEApplication::shutdown()
1292{
1293 // Implement in server's QPEApplication subclass
1294}
1295
1296/*!
1297 \internal
1298*/
1299void QPEApplication::restart()
1300{
1301 // Implement in server's QPEApplication subclass
1302}
1303
1304static QPtrDict<void>* stylusDict=0;
1305static void createDict()
1306{
1307 if ( !stylusDict )
1308 stylusDict = new QPtrDict<void>;
1309}
1310
1311/*!
1312 Returns the current StylusMode for \a w.
1313
1314 \sa setStylusOperation()
1315*/
1316QPEApplication::StylusMode QPEApplication::stylusOperation( QWidget* w )
1317{
1318 if ( stylusDict )
1319 return (StylusMode)(int)stylusDict->find(w);
1320 return LeftOnly;
1321}
1322
1323/*!
1324 \enum QPEApplication::StylusMode
1325
1326 \value LeftOnly the stylus only generates LeftButton
1327 events (the default).
1328 \value RightOnHold the stylus generates RightButton events
1329 if the user uses the press-and-hold gesture.
1330
1331 See setStylusOperation().
1332*/
1333
1334/*!
1335 Causes \a w to receive mouse events according to \a mode.
1336
1337 \sa stylusOperation()
1338*/
1339void QPEApplication::setStylusOperation( QWidget* w, StylusMode mode )
1340{
1341 createDict();
1342 if ( mode == LeftOnly ) {
1343 stylusDict->remove(w);
1344 w->removeEventFilter(qApp);
1345 } else {
1346 stylusDict->insert(w,(void*)mode);
1347 connect(w,SIGNAL(destroyed()),qApp,SLOT(removeSenderFromStylusDict()));
1348 w->installEventFilter(qApp);
1349 }
1350}
1351
1352
1353/*!
1354 \reimp
1355*/
1356bool QPEApplication::eventFilter( QObject *o, QEvent *e )
1357{
1358 if ( stylusDict && e->type() >= QEvent::MouseButtonPress && e->type() <= QEvent::MouseMove ) {
1359 QMouseEvent* me = (QMouseEvent*)e;
1360 if ( me->button() == LeftButton ) {
1361 StylusMode mode = (StylusMode)(int)stylusDict->find(o);
1362 switch (mode) {
1363 case RightOnHold:
1364 switch ( me->type() ) {
1365 case QEvent::MouseButtonPress:
1366 d->presstimer = startTimer(500); // #### pref.
1367 d->presswidget = (QWidget*)o;
1368 d->presspos = me->pos();
1369 d->rightpressed = FALSE;
1370 break;
1371 case QEvent::MouseButtonRelease:
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 break;
1392 default:
1393 break;
1394 }
1395 break;
1396 default:
1397 ;
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;
1407 }
1408 }
1409 }
1410
1411 return FALSE;
1412}
1413
1414/*!
1415 \reimp
1416*/
1417void QPEApplication::timerEvent( QTimerEvent *e )
1418{
1419 if ( e->timerId() == d->presstimer && d->presswidget ) {
1420 // Right pressed
1421 postEvent( d->presswidget,
1422 new QMouseEvent( QEvent::MouseButtonPress, d->presspos,
1423 RightButton, LeftButton ) );
1424 killTimer( d->presstimer );
1425 d->presstimer = 0;
1426 d->rightpressed = TRUE;
1427 }
1428}
1429
1430void QPEApplication::removeSenderFromStylusDict()
1431{
1432 stylusDict->remove((void*)sender());
1433 if ( d->presswidget == sender() )
1434 d->presswidget = 0;
1435}
1436
1437/*!
1438 \internal
1439*/
1440bool QPEApplication::keyboardGrabbed() const
1441{
1442 return d->kbgrabber;
1443}
1444
1445
1446/*!
1447 Reverses the effect of grabKeyboard(). This is called automatically
1448 on program exit.
1449*/
1450void QPEApplication::ungrabKeyboard()
1451{
1452 QPEApplicationData* d = ((QPEApplication*)qApp)->d;
1453 if ( d->kbgrabber == 2 ) {
1454 QCopEnvelope e("QPE/System", "grabKeyboard(QString)" );
1455 e << QString::null;
1456 d->kbregrab = FALSE;
1457 d->kbgrabber = 0;
1458 }
1459}
1460
1461/*!
1462 Grabs the keyboard such that the system's application launching
1463 keys no longer work, and instead they are receivable by this
1464 application.
1465
1466 \sa ungrabKeyboard()
1467*/
1468void QPEApplication::grabKeyboard()
1469{
1470 QPEApplicationData* d = ((QPEApplication*)qApp)->d;
1471 if ( qApp->type() == QApplication::GuiServer )
1472 d->kbgrabber = 0;
1473 else {
1474 QCopEnvelope e("QPE/System", "grabKeyboard(QString)" );
1475 e << d->appName;
1476 d->kbgrabber = 2; // me
1477 }
1478}
1479
1480/*!
1481 \reimp
1482*/
1483int QPEApplication::exec()
1484{
1485 d->sendQCopQ();
1486 if ( d->keep_running)
1487 //|| d->qpe_main_widget && d->qpe_main_widget->isVisible() )
1488 return QApplication::exec();
1489
1490 {
1491 QCopEnvelope e("QPE/System", "closing(QString)" );
1492 e << d->appName;
1493 }
1494 processEvents();
1495 return 0;
1496}
1497
1498/*!
1499 \internal
1500 External request for application to quit. Quits if possible without
1501 loosing state.
1502*/
1503void QPEApplication::tryQuit()
1504{
1505 if ( activeModalWidget() || strcmp( argv()[0], "embeddedkonsole") == 0 )
1506 return; // Inside modal loop or konsole. Too hard to save state.
1507 {
1508 QCopEnvelope e("QPE/System", "closing(QString)" );
1509 e << d->appName;
1510 }
1511 processEvents();
1512
1513 quit();
1514}
1515
1516/*!
1517 \internal
1518 User initiated quit. Makes the window 'Go Away'. If preloaded this means
1519 hiding the window. If not it means quitting the application.
1520 As this is user initiated we don't need to check state.
1521*/
1522void QPEApplication::hideOrQuit()
1523{
1524 // notify of our demise :)
1525 {
1526 QCopEnvelope e("QPE/System", "closing(QString)" );
1527 e << d->appName;
1528 }
1529 processEvents();
1530 if ( d->preloaded && d->qpe_main_widget )
1531 d->qpe_main_widget->hide();
1532 else
1533 quit();
1534}
1535
1536#if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX)
1537
1538// The libraries with the skiff package (and possibly others) have
1539// completely useless implementations of builtin new and delete that
1540// use about 50% of your CPU. Here we revert to the simple libc
1541// functions.
1542
1543void* operator new[](size_t size)
1544{
1545 return malloc(size);
1546}
1547
1548void* operator new(size_t size)
1549{
1550 return malloc(size);
1551}
1552
1553void operator delete[](void* p)
1554{
1555 free(p);
1556}
1557
1558void operator delete[](void* p, size_t /*size*/)
1559{
1560 free(p);
1561}
1562
1563void operator delete(void* p)
1564{
1565 free(p);
1566}
1567
1568void operator delete(void* p, size_t /*size*/)
1569{
1570 free(p);
1571}
1572
1573#endif
1574
1575#if ( QT_VERSION <= 230 ) && !defined(SINGLE_APP)
1576#include <qwidgetlist.h>
1577#include <qgfx_qws.h>
1578extern QRect qt_maxWindowRect;
1579void qt_setMaxWindowRect(const QRect& r)
1580{
1581 qt_maxWindowRect = qt_screen->mapFromDevice(r,
1582 qt_screen->mapToDevice(QSize(qt_screen->width(),qt_screen->height())));
1583 // Re-resize any maximized windows
1584 QWidgetList* l = QApplication::topLevelWidgets();
1585 if ( l ) {
1586 QWidget *w = l->first();
1587 while ( w ) {
1588 if ( w->isVisible() && w->isMaximized() )
1589 {
1590 w->showMaximized();
1591 }
1592 w = l->next();
1593 }
1594 delete l;
1595 }
1596}
1597#endif
diff --git a/library/qpeapplication.h b/library/qpeapplication.h
new file mode 100644
index 0000000..fd5e57d
--- a/dev/null
+++ b/library/qpeapplication.h
@@ -0,0 +1,124 @@
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#ifndef __QPE_APPLICATION_H__
21#define __QPE_APPLICATION_H__
22
23
24#include <qapplication.h>
25#if defined(_WS_QWS_) && !defined(Q_WS_QWS)
26#define Q_WS_QWS
27#endif
28#include "qpedecoration_qws.h"
29#include "timestring.h"
30
31class QCopChannel;
32class QPEApplicationData;
33class QWSEvent;
34class QWSKeyEvent;
35
36class QPEApplication : public QApplication
37{
38 Q_OBJECT
39public:
40 QPEApplication( int& argc, char **argv, Type=GuiClient );
41 ~QPEApplication();
42
43 static QString qpeDir();
44 static QString documentDir();
45 void applyStyle();
46 static int defaultRotation();
47 static void setDefaultRotation(int r);
48 static void grabKeyboard();
49 static void ungrabKeyboard();
50
51 enum StylusMode {
52 LeftOnly,
53 RightOnHold
54 // RightOnHoldLeftDelayed, etc.
55 };
56 static void setStylusOperation( QWidget*, StylusMode );
57 static StylusMode stylusOperation( QWidget* );
58
59 enum InputMethodHint {
60 Normal,
61 AlwaysOff,
62 AlwaysOn
63 };
64
65 enum screenSaverHint {
66 Disable = 0,
67 DisableLightOff = 1,
68 DisableSuspend = 2,
69 Enable = 100
70 };
71
72 static void setInputMethodHint( QWidget *, InputMethodHint );
73 static InputMethodHint inputMethodHint( QWidget * );
74
75 void showMainWidget( QWidget*, bool nomax=FALSE );
76 void showMainDocumentWidget( QWidget*, bool nomax=FALSE );
77
78 static void setKeepRunning();
79 bool keepRunning() const;
80
81 int exec();
82
83signals:
84 void clientMoused();
85 void timeChanged();
86 void clockChanged( bool pm );
87 void volumeChanged( bool muted );
88 void appMessage( const QCString& msg, const QByteArray& data);
89 void weekChanged( bool startOnMonday );
90 void dateFormatChanged( DateFormat );
91 void flush();
92 void reload();
93
94private slots:
95 void systemMessage( const QCString &msg, const QByteArray &data );
96 void pidMessage( const QCString &msg, const QByteArray &data );
97 void removeSenderFromStylusDict();
98 void hideOrQuit();
99
100protected:
101 bool qwsEventFilter( QWSEvent * );
102 void internalSetStyle( const QString &style );
103 void prepareForTermination(bool willrestart);
104 virtual void restart();
105 virtual void shutdown();
106 bool eventFilter( QObject *, QEvent * );
107 void timerEvent( QTimerEvent * );
108 bool keyboardGrabbed() const;
109 bool raiseAppropriateWindow();
110 virtual void tryQuit();
111
112private:
113 void mapToDefaultAction( QWSKeyEvent *ke, int defKey );
114
115#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
116 QCopChannel *sysChannel;
117 QCopChannel *pidChannel;
118#endif
119 QPEApplicationData *d;
120};
121
122
123#endif
124
diff --git a/library/qpedebug.cpp b/library/qpedebug.cpp
new file mode 100644
index 0000000..29bcbb6
--- a/dev/null
+++ b/library/qpedebug.cpp
@@ -0,0 +1,51 @@
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 "qpedebug.h"
22#include <stdio.h>
23#include <sys/time.h>
24#include <unistd.h>
25
26struct timeval qpe_debuglast;
27
28void qpe_debugTime( const char *file, int line, const char *desc )
29{
30 struct timeval tv;
31 gettimeofday( &tv, 0 );
32
33 int tdiff = tv.tv_usec - qpe_debuglast.tv_usec;
34 tdiff += (tv.tv_sec - qpe_debuglast.tv_sec) * 1000000;
35
36 fprintf( stderr, "%s:%d Time: %ld.%06ld", file, line, tv.tv_sec, tv.tv_usec);
37
38 static int pid = getpid();
39
40 if ( qpe_debuglast.tv_sec )
41 fprintf( stderr, " (pid %d delta %dus)", pid, tdiff );
42
43 if ( desc )
44 fprintf( stderr, " (%s)", desc );
45
46 fprintf( stderr, "\n" );
47
48 qpe_debuglast = tv;
49}
50
51
diff --git a/library/qpedebug.h b/library/qpedebug.h
new file mode 100644
index 0000000..434ddec
--- a/dev/null
+++ b/library/qpedebug.h
@@ -0,0 +1,29 @@
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#ifndef QPEDEBUG_H
21#define QPEDEBUG_H
22
23#define QPE_DEBUGTIMEDESC(X) qpe_debugTime( __FILE__, __LINE__, X );
24#define QPE_DEBUGTIME qpe_debugTime( __FILE__, __LINE__ );
25
26void qpe_debugTime( const char *file, int line, const char *desc=0 );
27
28#endif
29
diff --git a/library/qpedecoration_qws.cpp b/library/qpedecoration_qws.cpp
new file mode 100644
index 0000000..b6085ef
--- a/dev/null
+++ b/library/qpedecoration_qws.cpp
@@ -0,0 +1,639 @@
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#include <qapplication.h>
21#include <qstyle.h>
22#include <qwidget.h>
23#include <qpainter.h>
24#include <qtimer.h>
25#include <qwhatsthis.h>
26#include "qcopenvelope_qws.h"
27#include "qpedecoration_qws.h"
28#include <qdialog.h>
29#include <qdrawutil.h>
30#include <qgfx_qws.h>
31#include "qpeapplication.h"
32#include "resource.h"
33#include "global.h"
34#include <qfile.h>
35#include <qsignal.h>
36
37#include <stdlib.h>
38
39extern QRect qt_maxWindowRect;
40
41//#define MINIMIZE_HELP_HACK // use minimize button when not a dialog
42
43//#define WHATSTHIS_MODE
44
45#ifndef QT_NO_QWS_QPE_WM_STYLE
46
47#ifndef QT_NO_IMAGEIO_XPM
48
49/* XPM */
50static const char * const qpe_close_xpm[] = {
51"16 16 3 1",
52" c None",
53". c #FFFFFF",
54"+ c #000000",
55" ",
56" ",
57" ..... ",
58" ..+++++.. ",
59" .+++++++++. ",
60" .+..+++..+. ",
61" .++...+...++. ",
62" .+++.....+++. ",
63" .++++...++++. ",
64" .+++.....+++. ",
65" .++...+...++. ",
66" .+..+++..+. ",
67" .+++++++++. ",
68" ..+++++.. ",
69" ..... ",
70" "};
71
72/* XPM */
73static const char * const qpe_accept_xpm[] = {
74"16 16 3 1",
75" c None",
76". c #FFFFFF",
77"+ c #000000",
78" ",
79" ",
80" ..... ",
81" ..+++++.. ",
82" .+++++++++. ",
83" .+++++++++. ",
84" .+++++++..++. ",
85" .++.+++...++. ",
86" .+...+...+++. ",
87" .+......++++. ",
88" .++....+++++. ",
89" .++..+++++. ",
90" .+++++++++. ",
91" ..+++++.. ",
92" ..... ",
93" "};
94
95#endif // QT_NO_IMAGEIO_XPM
96
97class TLWidget : public QWidget
98{
99public:
100 QWSManager *manager()
101 {
102 return topData()->qwsManager;
103 }
104
105 QTLWExtra *topExtra()
106 {
107 return topData();
108 }
109};
110
111QPEManager::QPEManager( QPEDecoration *d, QObject *parent )
112 : QObject( parent ), decoration( d ), helpState(0)
113{
114 wtTimer = new QTimer( this );
115 connect( wtTimer, SIGNAL(timeout()), this, SLOT(whatsThisTimeout()) );
116}
117
118
119void QPEManager::updateActive()
120{
121 QWidget *newActive = qApp->activeWindow();
122 if ( (QWidget*)active == newActive )
123 return;
124
125 if ( active ) {
126 ((TLWidget *)(QWidget*)active)->manager()->removeEventFilter( this );
127 }
128
129 if ( newActive && ((TLWidget *)newActive)->manager() ) {
130 active = newActive;
131 ((TLWidget *)(QWidget*)active)->manager()->installEventFilter( this );
132 } else {
133 active = 0;
134 }
135}
136
137int QPEManager::pointInQpeRegion( QWidget *w, const QPoint &p )
138{
139 if ( decoration->region( w, w->geometry(),
140 (QWSDecoration::Region)QPEDecoration::Help ).contains(p) ) {
141 return QPEDecoration::Help;
142 }
143
144 return QWSDecoration::None;
145}
146
147bool QPEManager::eventFilter( QObject *o, QEvent *e )
148{
149 QWSManager *mgr = (QWSManager *)o;
150 QWidget *w = mgr->widget();
151 switch ( e->type() ) {
152 case QEvent::MouseButtonPress:
153 {
154 if ( QWhatsThis::inWhatsThisMode() ) {
155 QWhatsThis::leaveWhatsThisMode();
156 return true;
157 }
158 pressTime = QTime::currentTime();
159 QPoint p = ((QMouseEvent*)e)->globalPos();
160 if ( pointInQpeRegion( w, p ) == QPEDecoration::Help ) {
161 helpState = QWSButton::Clicked|QWSButton::MouseOver;
162 drawButton( w, QPEDecoration::Help, helpState );
163 return true;
164 }
165 }
166 break;
167 case QEvent::MouseButtonRelease:
168 if ( helpState & QWSButton::Clicked ) {
169 helpState = 0;
170 drawButton( w, QPEDecoration::Help, helpState );
171 QPoint p = ((QMouseEvent*)e)->globalPos();
172 if ( pointInQpeRegion( w, p ) == QPEDecoration::Help ) {
173#ifdef WHATSTHIS_MODE
174 if ( pressTime.msecsTo( QTime::currentTime() ) > 250 ) {
175 decoration->help( w );
176 } else {
177 QWhatsThis::enterWhatsThisMode();
178 wtTimer->start( 200 );
179 }
180#else
181 decoration->help( w );
182#endif
183 }
184 return true;
185 }
186 break;
187 case QEvent::MouseMove:
188 if ( helpState & QWSButton::Clicked ) {
189 int oldState = helpState;
190 QPoint p = ((QMouseEvent*)e)->globalPos();
191 if ( pointInQpeRegion( w, p ) == QPEDecoration::Help )
192 helpState = QWSButton::Clicked|QWSButton::MouseOver;
193 else
194 helpState = 0;
195 if ( helpState != oldState )
196 drawButton( w, QPEDecoration::Help, helpState );
197 }
198 break;
199 default:
200 break;
201 }
202 return QObject::eventFilter( o, e );
203}
204
205void QPEManager::drawButton( QWidget *w, QPEDecoration::QPERegion r, int state )
206{
207 QPainter painter(w);
208 QRegion rgn = ((TLWidget *)w)->topExtra()->decor_allocated_region;
209 painter.internalGfx()->setWidgetDeviceRegion( rgn );
210 painter.setClipRegion(decoration->region(w, w->rect(),QWSDecoration::All));
211 decoration->paintButton( &painter, w, (QWSDecoration::Region)r, state );
212}
213
214void QPEManager::whatsThisTimeout()
215{
216 if ( !QWhatsThis::inWhatsThisMode() ) {
217 wtTimer->stop();
218 if ( active )
219 drawButton( active, QPEDecoration::Help, 0 );
220 } else if ( active ) {
221 static int state = 0;
222 if ( !state )
223 state = QWSButton::Clicked|QWSButton::MouseOver;
224 else
225 state = 0;
226 drawButton( active, QPEDecoration::Help, state );
227 }
228}
229
230//=========
231
232class HackWidget : public QWidget
233{
234public:
235 bool needsOk() { return (getWState() & WState_Reserved1 ); }
236};
237
238//===========================================================================
239
240QPEDecoration::QPEDecoration()
241 : QWSDefaultDecoration()
242{
243 imageOk = Resource::loadImage( "OKButton" );
244 imageClose = Resource::loadImage( "CloseButton" );
245 imageHelp = Resource::loadImage( "HelpButton" );
246 helpFile = QString(qApp->argv()[0]) + ".html";
247 QString lang = getenv( "LANG" );
248 helpExists = QFile::exists( QPEApplication::qpeDir() + "/help/" + lang + "/html/" + helpFile );
249 if ( !helpExists )
250 helpExists = QFile::exists( QPEApplication::qpeDir() + "/help/en/html/" + helpFile );
251#ifndef MINIMIZE_HELP_HACK
252 qpeManager = new QPEManager( this );
253#else
254 qpeManager = 0;
255#endif
256}
257
258QPEDecoration::~QPEDecoration()
259{
260 delete qpeManager;
261}
262
263const char **QPEDecoration::menuPixmap()
264{
265 return (const char **)0;
266}
267
268const char **QPEDecoration::closePixmap()
269{
270 return (const char **)qpe_close_xpm;
271}
272
273const char **QPEDecoration::minimizePixmap()
274{
275 return (const char **)qpe_accept_xpm;
276}
277
278const char **QPEDecoration::maximizePixmap()
279{
280 return (const char **)0;
281}
282
283const char **QPEDecoration::normalizePixmap()
284{
285 return (const char **)0;
286}
287
288int QPEDecoration::getTitleHeight(const QWidget *)
289{
290 return 15;
291}
292
293/*
294 If rect is empty, no frame is added. (a hack, really)
295*/
296QRegion QPEDecoration::region(const QWidget *widget, const QRect &rect, QWSDecoration::Region type)
297{
298 int titleHeight = getTitleHeight(widget);
299// int titleWidth = getTitleWidth(widget);
300// int bw = rect.isEmpty() ? 0 : BORDER_WIDTH;
301 QRegion region;
302
303#ifndef MINIMIZE_HELP_HACK
304 qpeManager->updateActive();
305#endif
306
307 switch ((int)type) {
308 case Menu:
309 case Maximize:
310 break;
311 case Minimize: {
312 if ( ((HackWidget *)widget)->needsOk() ||
313 (widget->inherits( "QDialog" ) && !widget->inherits( "QMessageBox" ) ) ) {
314 QRect r(rect.right() - imageOk.width(),
315 rect.top() - titleHeight - 2,
316 imageOk.width(), titleHeight);
317 if (r.left() > rect.left() + titleHeight)
318 region = r;
319 }
320#ifdef MINIMIZE_HELP_HACK
321 else if ( helpExists ) {
322 QRect r;
323 r = QRect(rect.right() - imageClose.width() - imageHelp.width(),
324 rect.top() - titleHeight - 2,
325 imageHelp.width(), titleHeight);
326 if (r.left() > rect.left() + titleHeight)
327 region = r;
328 }
329#endif
330 }
331 break;
332 case Close: {
333 if ( ((HackWidget *)widget)->needsOk() ||
334 (widget->inherits( "QDialog" ) && !widget->inherits( "QMessageBox" ) ) ) {
335 QRect r;
336 r = QRect(rect.right() - imageOk.width() - imageClose.width(),
337 rect.top() - titleHeight - 2,
338 imageClose.width(), titleHeight);
339 if (r.left() > rect.left() + titleHeight)
340 region = r;
341 } else {
342 QRect r(rect.right() - imageClose.width(),
343 rect.top() - titleHeight - 2,
344 imageClose.width(), titleHeight);
345 if (r.left() > rect.left() + titleHeight)
346 region = r;
347 }
348 break;
349 }
350 case Title: {
351 if ( widget->isMaximized() ) {
352 region = QRegion();
353 } else {
354 int btnWidth = imageClose.width();
355 if ( ((HackWidget *)widget)->needsOk() ||
356 (widget->inherits( "QDialog" ) && !widget->inherits( "QMessageBox" ) ) )
357 btnWidth += imageOk.width();
358 QRect r(rect.left() + 1, rect.top() - titleHeight,
359 rect.width() - btnWidth - 2, titleHeight);
360 if (r.width() > 0)
361 region = r;
362 }
363 break;
364 }
365 case Help: {
366 if ( helpExists ) {
367 QRect r;
368 int l = rect.right() - imageClose.width() - imageHelp.width();
369 if ( ((HackWidget *)widget)->needsOk() ||
370 (widget->inherits( "QDialog" ) && !widget->inherits( "QMessageBox" ) ) )
371 l -= imageOk.width();
372 r = QRect(l, rect.top() - titleHeight - 2,
373 imageHelp.width(), titleHeight);
374 if (r.left() > rect.left() + titleHeight)
375 region = r;
376 }
377 break;
378 }
379 case Top:
380 case Left:
381 case Right:
382 case Bottom:
383 case TopLeft:
384 case TopRight:
385 case BottomLeft:
386 case BottomRight:
387 if ( widget->isMaximized() ) {
388 region = QRegion();
389 break;
390 }
391 //else fallthrough!!!
392 case All:
393 default:
394 region = QWSDefaultDecoration::region(widget, rect, type);
395 break;
396 }
397
398 return region;
399}
400
401void QPEDecoration::paint(QPainter *painter, const QWidget *widget)
402{
403#ifndef QT_NO_STYLE
404// QStyle &style = QApplication::style();
405#endif
406
407 int titleWidth = getTitleWidth(widget);
408 int titleHeight = getTitleHeight(widget);
409
410 QRect rect(widget->rect());
411
412 // Border rect
413 QRect br( rect.left() - BORDER_WIDTH,
414 rect.top() - BORDER_WIDTH - titleHeight,
415 rect.width() + 2 * BORDER_WIDTH,
416 rect.height() + BORDER_WIDTH + BOTTOM_BORDER_WIDTH + titleHeight );
417
418 // title bar rect
419 QRect tr;
420
421 tr = QRect( rect.left(), rect.top() - titleHeight, rect.width(), titleHeight );
422
423 QRegion oldClip = painter->clipRegion();
424 painter->setClipRegion( oldClip - QRegion( tr ) );// reduce flicker
425
426#ifndef QT_NO_PALETTE
427 // const QColorGroup &cg = QApplication::palette().active();
428 const QColorGroup &cg = widget->palette().active();
429
430 qDrawWinPanel(painter, br.x(), br.y(), br.width(),
431 br.height() - 4, cg, FALSE,
432 &cg.brush(QColorGroup::Background));
433
434 painter->setClipRegion( oldClip );
435
436 if (titleWidth > 0) {
437 QBrush titleBrush;
438 QPen titlePen;
439 QPen titleLines;
440 int titleLeft = titleHeight + 4;
441
442 if (widget == qApp->activeWindow()) {
443 titleBrush = cg.brush(QColorGroup::Highlight);
444 titlePen = cg.color(QColorGroup::HighlightedText);
445 } else {
446 titleBrush = cg.brush(QColorGroup::Background);
447 titlePen = cg.color(QColorGroup::Text);
448 }
449
450 titleLines = titleBrush.color().dark(150);
451
452 #define CLAMP(x, y) ( ((x) > (y)) ? (y) : (x) )
453
454 titleLeft = rect.left() + 5;
455 painter->setPen( cg.midlight() );
456 painter->drawLine( rect.left() - BORDER_WIDTH + 2,
457 rect.bottom() + 1, rect.right() + BORDER_WIDTH - 2,
458 rect.bottom() + 1 );
459
460 fillTitle( painter, widget, rect.left() - 2,
461 rect.top() - titleHeight - 2,
462 rect.width() + 3, titleHeight + 2 );
463/*
464 painter->fillRect(rect.left() - 2,
465 rect.top() - titleHeight - 2,
466 rect.width() + 3, titleHeight + 2,
467 titleBrush);
468
469 painter->setPen( titleLines );
470 for ( int i = rect.top() - titleHeight - 2; i < rect.top(); i += 2 )
471 painter->drawLine( rect.left() - 2, i, rect.left() + rect.width() + 2, i );
472*/
473 painter->setPen(titlePen);
474 QFont f( QApplication::font() );
475 f.setWeight( QFont::Bold );
476 painter->setFont(f);
477 painter->drawText( titleLeft, -titleHeight,
478 rect.width() - titleHeight - 10, titleHeight-1,
479 QPainter::AlignVCenter, widget->caption());
480 }
481
482#endif //QT_NO_PALETTE
483
484#ifndef MINIMIZE_HELP_HACK
485 paintButton( painter, widget, (QWSDecoration::Region)Help, 0 );
486#endif
487}
488
489void QPEDecoration::paintButton(QPainter *painter, const QWidget *w,
490 QWSDecoration::Region type, int state)
491{
492#ifndef QT_NO_PALETTE
493#ifndef QT_NO_STYLE
494// QStyle &style = QApplication::style();
495#endif
496 const QColorGroup &cg = w->palette().active();
497
498 QRect brect(region(w, w->rect(), type).boundingRect());
499
500// int xoff=2;
501// int yoff=2;
502
503// const QPixmap *pm=pixmapFor(w,type,state & QWSButton::On, xoff, yoff);
504
505 const QImage *img = 0;
506
507 switch ((int)type) {
508 case Close:
509 img = &imageClose;
510 break;
511 case Minimize:
512 if ( ((HackWidget *)w)->needsOk() ||
513 (w->inherits( "QDialog" ) && !w->inherits( "QMessageBox" ) ) )
514 img = &imageOk;
515 else if ( helpExists )
516 img = &imageHelp;
517 break;
518 case Help:
519 img = &imageHelp;
520 break;
521 default:
522 return;
523 }
524
525 QBrush titleBrush;
526
527 if (w == qApp->activeWindow()) {
528 titleBrush = cg.brush(QColorGroup::Highlight);
529 } else {
530 titleBrush = cg.brush(QColorGroup::Background);
531 }
532
533 fillTitle( painter, w, brect.x(), brect.y(), brect.width()+1,
534 brect.height()+1 );
535 if ((state & QWSButton::MouseOver) && (state & QWSButton::Clicked)) {
536 if (img) painter->drawImage(brect.x()+1, brect.y()+3, *img);
537 } else {
538 if (img) painter->drawImage(brect.x(), brect.y()+2, *img);
539 }
540
541#endif
542
543}
544
545void QPEDecoration::fillTitle( QPainter *p, const QWidget *widget,
546 int x, int y, int w, int h )
547{
548 QBrush titleBrush;
549 QPen topLine;
550 QPen titleLines;
551
552 const QColorGroup &cg = widget->palette().active();
553
554 if (widget == qApp->activeWindow()) {
555 titleBrush = cg.brush(QColorGroup::Highlight);
556 titleLines = titleBrush.color().dark();
557 topLine = titleBrush.color().light();
558 } else {
559 titleBrush = cg.brush(QColorGroup::Background);
560 titleLines = titleBrush.color();
561 topLine = titleBrush.color();
562 }
563
564 p->fillRect( x, y, w, h, titleBrush);
565
566 p->setPen( topLine );
567 p->drawLine( x, y+1, x+w-1, y+1 );
568 p->setPen( titleLines );
569 for ( int i = y; i < y+h; i += 2 )
570 p->drawLine( x, i, x+w-1, i );
571}
572
573//#define QPE_DONT_SHOW_TITLEBAR
574
575void QPEDecoration::maximize( QWidget *widget )
576{
577#ifdef QPE_DONT_SHOW_TITLEBAR
578 if ( !widget->inherits( "QDialog" ) ) {
579 widget->setGeometry( qt_maxWindowRect );
580 } else
581 #endif
582 {
583 QWSDecoration::maximize( widget );
584 }
585}
586
587#ifndef QT_NO_DIALOG
588class HackDialog : public QDialog
589{
590public:
591 void acceptIt() {
592 if ( isA( "QMessageBox" ) )
593 qApp->postEvent( this, new QKeyEvent( QEvent::KeyPress, Key_Enter, '\n', 0, "\n" ) );
594 else
595 accept();
596 }
597};
598#endif
599
600
601void QPEDecoration::minimize( QWidget *widget )
602{
603#ifndef QT_NO_DIALOG
604 // We use the minimize button as an "accept" button.
605 if ( widget->inherits( "QDialog" ) ) {
606 HackDialog *d = (HackDialog *)widget;
607 d->acceptIt();
608 }
609#endif
610 else if ( ((HackWidget *)widget)->needsOk() ) {
611 QSignal s;
612 s.connect( widget, SLOT( accept() ) );
613 s.activate();
614 } else {
615 help( widget );
616 }
617}
618
619void QPEDecoration::help( QWidget * )
620{
621 if ( helpExists ) {
622 Global::execute( "helpbrowser", helpFile );
623 }
624}
625
626
627/*
628#ifndef QT_NO_POPUPMENU
629QPopupMenu *QPEDecoration::menu(QWSManager*, const QWidget*, const QPoint&)
630{
631 return 0;
632}
633#endif
634*/
635
636
637
638
639#endif // QT_NO_QWS_QPE_WM_STYLE
diff --git a/library/qpedecoration_qws.h b/library/qpedecoration_qws.h
new file mode 100644
index 0000000..b8afd05
--- a/dev/null
+++ b/library/qpedecoration_qws.h
@@ -0,0 +1,101 @@
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#ifndef QPE_DECORATION_QWS_H__
21#define QPE_DECORATION_QWS_H__
22
23
24#include <qwsdefaultdecoration_qws.h>
25#include <qimage.h>
26#include <qdatetime.h>
27#include <qguardedptr.h>
28
29
30#ifndef QT_NO_QWS_QPE_WM_STYLE
31
32class QPEManager;
33class QTimer;
34
35class QPEDecoration : public QWSDefaultDecoration
36{
37public:
38 QPEDecoration();
39 virtual ~QPEDecoration();
40
41 virtual QRegion region(const QWidget *, const QRect &rect, Region);
42 virtual void paint(QPainter *, const QWidget *);
43 virtual void paintButton(QPainter *, const QWidget *, Region, int state);
44
45 void maximize( QWidget * );
46 void minimize( QWidget * );
47 virtual void help( QWidget * );
48
49 enum QPERegion { Help=LastRegion+1 };
50 void buttonClicked( QPERegion r );
51
52protected:
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 const char **menuPixmap();
57 virtual const char **closePixmap();
58 virtual const char **minimizePixmap();
59 virtual const char **maximizePixmap();
60 virtual const char **normalizePixmap();
61
62protected:
63 QImage imageOk;
64 QImage imageClose;
65 QImage imageHelp;
66 QString helpFile;
67 bool helpExists;
68 QPEManager *qpeManager;
69};
70
71
72class QPEManager : public QObject
73{
74 Q_OBJECT
75 friend class QPEDecoration;
76public:
77 QPEManager( QPEDecoration *d, QObject *parent=0 );
78
79 void updateActive();
80
81protected:
82 int pointInQpeRegion( QWidget *w, const QPoint &p );
83 virtual bool eventFilter( QObject *, QEvent * );
84 void drawButton( QWidget *w, QPEDecoration::QPERegion r, int state );
85
86protected slots:
87 void whatsThisTimeout();
88
89protected:
90 QPEDecoration *decoration;
91 QGuardedPtr<QWidget> active;
92 int helpState;
93 QTime pressTime;
94 QTimer *wtTimer;
95};
96
97
98#endif // QT_NO_QWS_QPE_WM_STYLE
99
100
101#endif // QPE_DECORATION_QWS_H__
diff --git a/library/qpedialog.cpp b/library/qpedialog.cpp
new file mode 100644
index 0000000..06b0c94
--- a/dev/null
+++ b/library/qpedialog.cpp
@@ -0,0 +1,45 @@
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 "qpedialog.h"
22#include "qpeapplication.h"
23
24#define protected public
25#include <qdialog.h>
26
27QPEDialogListener::QPEDialogListener(QDialog *di ) : QObject(di)
28{
29 dialog = di;
30 connect(qApp, SIGNAL(appMessage(const QCString&, const QByteArray&)),
31 this, SLOT(appMessage(const QCString&, const QByteArray&)) );
32}
33
34QPEDialogListener::~QPEDialogListener() {}
35
36void QPEDialogListener::appMessage( const QCString &msg, const QByteArray &data )
37{
38 if (!dialog)
39 return;
40 if (msg == "accept()") {
41 dialog->accept();
42 } else if (msg == "reject()") {
43 dialog->reject();
44 }
45}
diff --git a/library/qpedialog.h b/library/qpedialog.h
new file mode 100644
index 0000000..1fde09a
--- a/dev/null
+++ b/library/qpedialog.h
@@ -0,0 +1,44 @@
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#ifndef __QPE_DIALOG_H__
21#define __QPE_DIALOG_H__
22
23#include <qobject.h>
24
25class QPEDialogListenerData;
26
27class QPEDialogListener : public QObject
28{
29 Q_OBJECT
30public:
31 QPEDialogListener(QDialog *di);
32 ~QPEDialogListener();
33
34private slots:
35 void appMessage( const QCString &msg, const QByteArray &data );
36
37private:
38
39 QDialog *dialog;
40 QPEDialogListenerData *d;
41};
42
43#endif
44
diff --git a/library/qpemenubar.cpp b/library/qpemenubar.cpp
new file mode 100644
index 0000000..39f8fd6
--- a/dev/null
+++ b/library/qpemenubar.cpp
@@ -0,0 +1,308 @@
1/**********************************************************************
2** Copyright (C) 2001 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#define INCLUDE_MENUITEM_DEF
22
23#include "qpemenubar.h"
24#include <qapplication.h>
25#include <qguardedptr.h>
26#include <qtimer.h>
27
28
29class QMenuBarHack : public QMenuBar
30{
31public:
32 int activeItem() const { return actItem; }
33
34 void goodbye()
35 {
36 activateItemAt(-1);
37 for ( unsigned int i = 0; i < count(); i++ ) {
38 QMenuItem *mi = findItem( idAt(i) );
39 if ( mi->popup() ) {
40 mi->popup()->hide();
41 }
42 }
43 }
44};
45
46
47QPEMenuToolFocusManager *QPEMenuToolFocusManager::me = 0;
48
49QPEMenuToolFocusManager::QPEMenuToolFocusManager() : QObject()
50{
51 qApp->installEventFilter( this );
52}
53
54void QPEMenuToolFocusManager::addWidget( QWidget *w )
55{
56 list.append( GuardedWidget(w) );
57}
58
59void QPEMenuToolFocusManager::removeWidget( QWidget *w )
60{
61 list.remove( GuardedWidget(w) );
62}
63
64void QPEMenuToolFocusManager::setActive( bool a )
65{
66 if ( a ) {
67 oldFocus = qApp->focusWidget();
68 QValueList<GuardedWidget>::Iterator it;
69 it = list.begin();
70 while ( it != list.end() ) {
71 QWidget *w = (*it);
72 if ( w && w->isEnabled() && w->isVisible() &&
73 w->topLevelWidget() == qApp->activeWindow() ) {
74 setFocus( w );
75 return;
76 }
77 ++it;
78 }
79 } else {
80 if ( inFocus ) {
81 if ( inFocus->inherits( "QMenuBar" ) )
82 ((QMenuBarHack *)(QWidget *)inFocus)->goodbye();
83 if ( inFocus->hasFocus() ) {
84 if ( oldFocus && oldFocus->isVisible() && oldFocus->isEnabled() ) {
85 oldFocus->setFocus();
86 } else {
87 inFocus->clearFocus();
88 }
89 }
90 }
91 inFocus = 0;
92 oldFocus = 0;
93 }
94}
95
96bool QPEMenuToolFocusManager::isActive() const
97{
98 return !inFocus.isNull();
99}
100
101void QPEMenuToolFocusManager::moveFocus( bool next )
102{
103 if ( !isActive() )
104 return;
105
106 int n = list.count();
107 QValueList<GuardedWidget>::Iterator it;
108 it = list.find( inFocus );
109 if ( it == list.end() )
110 it = list.begin();
111 while ( --n ) {
112 if ( next ) {
113 ++it;
114 if ( it == list.end() )
115 it = list.begin();
116 } else {
117 if ( it == list.begin() )
118 it = list.end();
119 --it;
120 }
121 QWidget *w = (*it);
122 if ( w && w->isEnabled() && w->isVisible() &&
123 w->topLevelWidget() == qApp->activeWindow() ) {
124 setFocus( w, next );
125 return;
126 }
127 }
128}
129
130void QPEMenuToolFocusManager::initialize()
131{
132 if ( !me )
133 me = new QPEMenuToolFocusManager;
134}
135
136QPEMenuToolFocusManager *QPEMenuToolFocusManager::manager()
137{
138 if ( !me )
139 me = new QPEMenuToolFocusManager;
140
141 return me;
142}
143
144void QPEMenuToolFocusManager::setFocus( QWidget *w, bool next )
145{
146 inFocus = w;
147// qDebug( "Set focus on %s", w->className() );
148 if ( inFocus->inherits( "QMenuBar" ) ) {
149 QMenuBar *mb = (QMenuBar *)(QWidget *)inFocus;
150 if ( next )
151 mb->activateItemAt( 0 );
152 else
153 mb->activateItemAt( mb->count()-1 );
154 }
155 inFocus->setFocus();
156}
157
158bool QPEMenuToolFocusManager::eventFilter( QObject *object, QEvent *event )
159{
160 if ( event->type() == QEvent::KeyPress ) {
161 QKeyEvent *ke = (QKeyEvent *)event;
162 if ( isActive() ) {
163 if ( object->inherits( "QButton" ) ) {
164 switch ( ke->key() ) {
165 case Key_Left:
166 moveFocus( FALSE );
167 return TRUE;
168
169 case Key_Right:
170 moveFocus( TRUE );
171 return TRUE;
172
173 case Key_Up:
174 case Key_Down:
175 return TRUE;
176 }
177 } else if ( object->inherits( "QPopupMenu" ) ) {
178 // Deactivate when a menu item is selected
179 if ( ke->key() == Key_Enter || ke->key() == Key_Return ||
180 ke->key() == Key_Escape ) {
181 QTimer::singleShot( 0, this, SLOT(deactivate()) );
182 }
183 } else if ( object->inherits( "QMenuBar" ) ) {
184 int dx = 0;
185 switch ( ke->key() ) {
186 case Key_Left:
187 dx = -1;
188 break;
189
190 case Key_Right:
191 dx = 1;
192 break;
193 }
194
195 QMenuBarHack *mb = (QMenuBarHack *)object;
196 if ( dx && mb->activeItem() >= 0 ) {
197 int i = mb->activeItem();
198 int c = mb->count();
199 int n = c;
200 while ( n-- ) {
201 i = i + dx;
202 if ( i == c ) {
203 mb->goodbye();
204 moveFocus( TRUE );
205 return TRUE;
206 } else if ( i < 0 ) {
207 mb->goodbye();
208 moveFocus( FALSE );
209 return TRUE;
210 }
211 QMenuItem *mi = mb->findItem( mb->idAt(i) );
212 if ( mi->isEnabled() && !mi->isSeparator() ) {
213 break;
214 }
215 }
216 }
217 }
218 }
219 if ( ke->key() == Key_F11 ) {
220 setActive( !isActive() );
221 return TRUE;
222 }
223 } else if ( event->type() == QEvent::KeyRelease ) {
224 QKeyEvent *ke = (QKeyEvent *)event;
225 if ( isActive() ) {
226 if ( object->inherits( "QButton" ) ) {
227 // Deactivate when a button is selected
228 if ( ke->key() == Key_Space )
229 QTimer::singleShot( 0, this, SLOT(deactivate()) );
230 }
231 }
232 } else if ( event->type() == QEvent::FocusIn ) {
233 if ( isActive() ) {
234 // A non-menu/tool widget has been selected - we're deactivated
235 QWidget *w = (QWidget *)object;
236 if ( !w->isPopup() && !list.contains( GuardedWidget( w ) ) ) {
237 inFocus = 0;
238 }
239 }
240 } else if ( event->type() == QEvent::Hide ) {
241 if ( isActive() ) {
242 // Deaticvate if a menu/tool has been hidden
243 QWidget *w = (QWidget *)object;
244 if ( !w->isPopup() && !list.contains( GuardedWidget( w ) ) ) {
245 setActive( FALSE );
246 }
247 }
248 } else if ( event->type() == QEvent::ChildInserted ) {
249 QChildEvent *ce = (QChildEvent *)event;
250 if ( ce->child()->inherits( "QMenuBar" ) ) {
251 addWidget( (QWidget *)ce->child() );
252 ce->child()->installEventFilter( this );
253 } else if ( object->inherits( "QToolBar" ) && ce->child()->isWidgetType() ) {
254 addWidget( (QWidget *)ce->child() );
255 }
256 } else if ( event->type() == QEvent::ChildRemoved ) {
257 QChildEvent *ce = (QChildEvent *)event;
258 if ( ce->child()->inherits( "QMenuBar" ) ) {
259 removeWidget( (QWidget *)ce->child() );
260 ce->child()->removeEventFilter( this );
261 } else if ( object->inherits( "QToolBar" ) && ce->child()->isWidgetType() ) {
262 removeWidget( (QWidget *)ce->child() );
263 }
264 }
265
266 return FALSE;
267}
268
269void QPEMenuToolFocusManager::deactivate()
270{
271 setActive( FALSE );
272}
273
274/*!
275 \class QPEMenuBar qpemenubar.h
276 \brief The QPEMenuBar class is obsolete. Use QMenuBar instead.
277
278 \obsolete
279
280 This class is obsolete. Use QMenuBar instead.
281
282 \sa QMenuBar
283*/
284
285/*!
286 Constructs a QPEMenuBar just as you would construct
287 a QMenuBar, passing \a parent and \a name.
288*/
289QPEMenuBar::QPEMenuBar( QWidget *parent, const char *name )
290 : QMenuBar( parent, name )
291{
292}
293
294/*!
295 \reimp
296*/
297QPEMenuBar::~QPEMenuBar()
298{
299}
300
301/*!
302 \internal
303*/
304void QPEMenuBar::keyPressEvent( QKeyEvent *e )
305{
306 QMenuBar::keyPressEvent( e );
307}
308
diff --git a/library/qpemenubar.h b/library/qpemenubar.h
new file mode 100644
index 0000000..736b12b
--- a/dev/null
+++ b/library/qpemenubar.h
@@ -0,0 +1,71 @@
1/**********************************************************************
2** Copyright (C) 2001 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 QPEMENUBAR_H
22#define QPEMENUBAR_H
23
24#include <qmenubar.h>
25#include <qguardedptr.h>
26#include <qvaluelist.h>
27
28class QPEMenuToolFocusManager : public QObject
29{
30 Q_OBJECT
31public:
32 QPEMenuToolFocusManager();
33
34 void addWidget( QWidget *w );
35 void removeWidget( QWidget *w );
36 void setActive( bool a );
37 bool isActive() const;
38 void moveFocus( bool next );
39
40 static QPEMenuToolFocusManager *manager();
41 static void initialize();
42
43protected:
44 void setFocus( QWidget *w, bool next=TRUE );
45 bool eventFilter( QObject *object, QEvent *event );
46
47private slots:
48 void deactivate();
49
50private:
51 typedef QGuardedPtr<QWidget> GuardedWidget;
52 QValueList<GuardedWidget> list;
53 GuardedWidget inFocus;
54 GuardedWidget oldFocus;
55 static QPEMenuToolFocusManager *me;
56};
57
58
59class QPEMenuBar : public QMenuBar
60{
61 Q_OBJECT
62public:
63 QPEMenuBar( QWidget *parent=0, const char* name=0 );
64 ~QPEMenuBar();
65
66protected:
67 virtual void keyPressEvent( QKeyEvent *e );
68};
69
70#endif
71
diff --git a/library/qpemessagebox.cpp b/library/qpemessagebox.cpp
new file mode 100644
index 0000000..02db760
--- a/dev/null
+++ b/library/qpemessagebox.cpp
@@ -0,0 +1,13 @@
1#include "qpemessagebox.h"
2#include <qmessagebox.h>
3
4bool QPEMessageBox::confirmDelete( QWidget *parent, const QString & caption,
5 const QString & object )
6{
7 QString msg = QObject::tr("Are you sure you want to delete\n %1?").arg( object );
8 int r = QMessageBox::warning( parent, caption, msg, QMessageBox::Yes,
9 QMessageBox::No|QMessageBox::Default|
10 QMessageBox::Escape, 0 );
11
12 return r == QMessageBox::Yes;
13}
diff --git a/library/qpemessagebox.h b/library/qpemessagebox.h
new file mode 100644
index 0000000..6f3f00f
--- a/dev/null
+++ b/library/qpemessagebox.h
@@ -0,0 +1,11 @@
1#include <qstring.h>
2
3class QWidget;
4
5class QPEMessageBox
6{
7public:
8 static bool confirmDelete( QWidget *parent, const QString & caption,
9 const QString & object );
10
11};
diff --git a/library/qpestyle.cpp b/library/qpestyle.cpp
new file mode 100644
index 0000000..dfd300f
--- a/dev/null
+++ b/library/qpestyle.cpp
@@ -0,0 +1,1194 @@
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 "qpestyle.h"
22#include "qpeapplication.h"
23#include <qpushbutton.h>
24
25#include <qpainter.h>
26
27#define QCOORDARRLEN(x) sizeof(x)/(sizeof(QCOORD)*2)
28
29#if QT_VERSION >= 300
30
31#include <qdrawutil.h>
32#include <qcombobox.h>
33#include <qtabbar.h>
34
35QPEStyle::QPEStyle()
36{
37}
38
39QPEStyle::~QPEStyle()
40{
41}
42
43void QPEStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRect &r,
44 const QColorGroup &cg, SFlags flags, const QStyleOption &data) const
45{
46 switch ( pe ) {
47 case PE_ButtonTool:
48 {
49 QColorGroup mycg = cg;
50 if ( flags & Style_On ) {
51 QBrush fill( cg.mid(), Dense4Pattern );
52 mycg.setBrush( QColorGroup::Button, fill );
53 }
54 drawPrimitive( PE_ButtonBevel, p, r, mycg, flags, data );
55 break;
56 }
57 case PE_ButtonCommand:
58 case PE_ButtonDefault:
59 case PE_ButtonBevel:
60 case PE_HeaderSection:
61 {
62 QPen oldPen = p->pen();
63 p->fillRect( r.x()+1, r.y()+1, r.width()-2, r.height()-2, cg.brush(QColorGroup::Button) );
64
65 int x2 = r.right();
66 int y2 = r.bottom();
67
68 if ( flags & (Style_Sunken | Style_Down | Style_On) )
69 p->setPen( cg.dark() );
70 else
71 p->setPen( cg.light() );
72 p->drawLine( r.x(), r.y()+1, r.x(), y2-1 );
73 p->drawLine( r.x()+1, r.y(), x2-1, r.y() );
74
75 if ( flags & (Style_Sunken | Style_Down | Style_On) )
76 p->setPen( cg.light() );
77 else
78 p->setPen( cg.dark() );
79 p->drawLine( x2, r.y()+1, x2, y2-1 );
80 p->drawLine( r.x()+1, y2, x2-1, y2 );
81 p->setPen( oldPen );
82 break;
83 }
84 case PE_FocusRect:
85 break;
86 case PE_Indicator:
87 {
88 QColorGroup mycg( cg );
89 QBrush fill;
90 if ( flags & Style_Down )
91 fill = cg.brush( QColorGroup::Button );
92 else
93 fill = cg.brush( (flags&Style_Enabled) ? QColorGroup::Base : QColorGroup::Background );
94 mycg.setBrush( QColorGroup::Button, fill );
95 if ( flags&Style_Enabled )
96 flags |= Style_Sunken;
97 drawPrimitive( PE_ButtonBevel, p, r, mycg, flags );
98 if ( flags & Style_On ) {
99 QPointArray a( 7*2 );
100 int i, xx, yy;
101 xx = r.x()+3;
102 yy = r.y()+5;
103 for ( i=0; i<3; i++ ) {
104 a.setPoint( 2*i, xx, yy );
105 a.setPoint( 2*i+1, xx, yy+2 );
106 xx++; yy++;
107 }
108 yy -= 2;
109 for ( i=3; i<7; i++ ) {
110 a.setPoint( 2*i, xx, yy );
111 a.setPoint( 2*i+1, xx, yy+2 );
112 xx++; yy--;
113 }
114 if ( flags & Style_NoChange ) {
115 p->setPen( mycg.dark() );
116 } else {
117 p->setPen( mycg.text() );
118 }
119 p->drawLineSegments( a );
120 }
121 break;
122 }
123 case PE_ExclusiveIndicator:
124 {
125 static const QCOORD pts1[] = { // dark lines
126 1,9, 1,8, 0,7, 0,4, 1,3, 1,2, 2,1, 3,1, 4,0, 7,0, 8,1, 9,1 };
127 static const QCOORD pts4[] = { // white lines
128 2,10, 3,10, 4,11, 7,11, 8,10, 9,10, 10,9, 10,8, 11,7,
129 11,4, 10,3, 10,2 };
130 static const QCOORD pts5[] = { // inner fill
131 4,2, 7,2, 9,4, 9,7, 7,9, 4,9, 2,7, 2,4 };
132
133 int x, y, w, h;
134 r.rect( &x, &y, &w, &h );
135 p->eraseRect( x, y, w, h );
136 QPointArray a( QCOORDARRLEN(pts1), pts1 );
137 a.translate( x, y );
138 p->setPen( cg.dark() );
139 p->drawPolyline( a );
140 a.setPoints( QCOORDARRLEN(pts4), pts4 );
141 a.translate( x, y );
142 p->setPen( cg.light() );
143 p->drawPolyline( a );
144 a.setPoints( QCOORDARRLEN(pts5), pts5 );
145 a.translate( x, y );
146 QColor fillColor = ( flags&Style_Down || !(flags&Style_Enabled) ) ? cg.button() : cg.base();
147 p->setPen( fillColor );
148 p->setBrush( fillColor ) ;
149 p->drawPolygon( a );
150 if ( flags&Style_On ) {
151 p->setPen( NoPen );
152 p->setBrush( cg.text() );
153 p->drawRect( x+5, y+4, 2, 4 );
154 p->drawRect( x+4, y+5, 4, 2 );
155 }
156 break;
157 }
158 default:
159 QWindowsStyle::drawPrimitive( pe, p, r, cg, flags, data );
160 break;
161 }
162}
163
164void QPEStyle::drawControl( ControlElement ce, QPainter *p,
165 const QWidget *widget, const QRect &r,
166 const QColorGroup &cg, SFlags how, const QStyleOption &data) const
167{
168 switch ( ce ) {
169 case CE_PushButton:
170 {
171 const QPushButton *btn = (QPushButton*)widget;
172 SFlags flags;
173 flags = Style_Default;
174 if ( btn->isDown() )
175 flags |= Style_Down;
176 if ( btn->isOn() )
177 flags |= Style_On;
178 if ( btn->isEnabled() )
179 flags |= Style_Enabled;
180 if ( btn->isDefault() )
181 flags |= Style_Default;
182 if (! btn->isFlat() && !(flags & Style_Down))
183 flags |= Style_Raised;
184 p->setPen( cg.foreground() );
185 p->setBrush( QBrush(cg.button(), NoBrush) );
186 QColorGroup mycg( cg );
187 if ( flags & Style_On ) {
188 QBrush fill = QBrush( cg.mid(), Dense4Pattern );
189 mycg.setBrush( QColorGroup::Button, fill );
190 }
191 drawPrimitive( PE_ButtonBevel, p, r, mycg, flags, data );
192 break;
193 }
194 case CE_TabBarTab:
195 {
196 if ( !widget || !widget->parentWidget() )
197 break;
198
199 const QTabBar *tb = (const QTabBar *) widget;
200 bool selected = how & Style_Selected;
201
202 QRect r2(r);
203 if ( tb->shape() == QTabBar::RoundedAbove ) {
204 p->setPen( cg.light() );
205 p->drawLine( r2.left(), r2.bottom(), r2.right(), r2.bottom() );
206 if ( r2.left() == 0 )
207 p->drawPoint( tb->rect().bottomLeft() );
208 else {
209 p->setPen( cg.light() );
210 p->drawLine( r2.left(), r2.bottom(), r2.right(), r2.bottom() );
211 }
212
213 if ( selected ) {
214 p->setPen( cg.background() );
215 p->drawLine( r2.left()+2, r2.top()+1, r2.right()-2, r2.top()+1 );
216 p->fillRect( QRect( r2.left()+1, r2.top()+2, r2.width()-2, r2.height()-2),
217 cg.brush( QColorGroup::Background ));
218 } else {
219 r2.setRect( r2.left() + 2, r2.top() + 2,
220 r2.width() - 4, r2.height() - 2 );
221 p->setPen( cg.button() );
222 p->drawLine( r2.left()+2, r2.top()+1, r2.right()-2, r2.top()+1 );
223 p->fillRect( QRect( r2.left()+1, r2.top()+2, r2.width()-2, r2.height()-3),
224 cg.brush( QColorGroup::Button ));
225
226 //do shading; will not work for pixmap brushes
227 QColor bg = cg.button();
228 // int h,s,v;
229 // bg.hsv( &h, &s, &v );
230 int n = r2.height()/2;
231 int dark = 100;
232 for ( int i = 1; i < n; i++ ) {
233 dark = (dark * (100+(i*15)/n) )/100;
234 p->setPen( bg.dark( dark ) );
235 int y = r2.bottom()-n+i;
236 int x1 = r2.left()+1;
237 int x2 = r2.right()-1;
238 p->drawLine( x1, y, x2, y );
239 }
240 }
241
242 p->setPen( cg.light() );
243 p->drawLine( r2.left(), r2.bottom()-1, r2.left(), r2.top() + 2 );
244 p->drawPoint( r2.left()+1, r2.top() + 1 );
245 p->drawLine( r2.left()+2, r2.top(),
246 r2.right() - 2, r2.top() );
247
248 p->setPen( cg.dark() );
249 p->drawPoint( r2.right() - 1, r2.top() + 1 );
250 p->drawLine( r2.right(), r2.top() + 2, r2.right(), r2.bottom() - 1);
251 } else if ( tb->shape() == QTabBar::RoundedBelow ) {
252 if ( selected ) {
253 p->setPen( cg.background() );
254 p->drawLine( r2.left()+2, r2.bottom()-1, r2.right()-2, r2.bottom()-1 );
255 p->fillRect( QRect( r2.left()+1, r2.top(), r2.width()-2, r2.height()-2),
256 tb->palette().normal().brush( QColorGroup::Background ));
257 } else {
258 p->setPen( cg.dark() );
259 p->drawLine( r2.left(), r2.top(),
260 r2.right(), r2.top() );
261 r2.setRect( r2.left() + 2, r2.top(),
262 r2.width() - 4, r2.height() - 2 );
263 p->setPen( cg.button() );
264 p->drawLine( r2.left()+2, r2.bottom()-1, r2.right()-2, r2.bottom()-1 );
265 p->fillRect( QRect( r2.left()+1, r2.top()+1, r2.width()-2, r2.height()-3),
266 tb->palette().normal().brush( QColorGroup::Button ));
267 }
268
269 p->setPen( cg.dark() );
270 p->drawLine( r2.right(), r2.top(),
271 r2.right(), r2.bottom() - 2 );
272 p->drawPoint( r2.right() - 1, r2.bottom() - 1 );
273 p->drawLine( r2.right() - 2, r2.bottom(),
274 r2.left() + 2, r2.bottom() );
275
276 p->setPen( cg.light() );
277 p->drawLine( r2.left(), r2.top()+1,
278 r2.left(), r2.bottom() - 2 );
279 p->drawPoint( r2.left() + 1, r2.bottom() - 1 );
280 if ( r2.left() == 0 )
281 p->drawPoint( tb->rect().topLeft() );
282
283 } else {
284 QCommonStyle::drawControl( ce, p, widget, r, cg, how, data );
285 }
286 break;
287 }
288 default:
289 QWindowsStyle::drawControl( ce, p, widget, r, cg, how, data );
290 break;
291 }
292}
293
294void QPEStyle::drawComplexControl( ComplexControl control, QPainter *p,
295 const QWidget *widget, const QRect &r,
296 const QColorGroup &cg, SFlags how,
297 SCFlags sub, SCFlags subActive, const QStyleOption &data) const
298{
299 switch ( control ) {
300 case CC_ComboBox:
301 if ( sub & SC_ComboBoxArrow ) {
302 SFlags flags = Style_Default;
303
304 drawPrimitive( PE_ButtonBevel, p, r, cg, flags, data );
305
306 QRect ar =
307 QStyle::visualRect( querySubControlMetrics( CC_ComboBox, widget,
308 SC_ComboBoxArrow ), widget );
309
310 if ( subActive == SC_ComboBoxArrow ) {
311 p->setPen( cg.dark() );
312 p->setBrush( cg.brush( QColorGroup::Button ) );
313 p->drawRect( ar );
314 }
315
316 ar.addCoords( 2, 2, -2, -2 );
317 if ( widget->isEnabled() )
318 flags |= Style_Enabled;
319
320 if ( subActive & Style_Sunken ) {
321 flags |= Style_Sunken;
322 }
323 drawPrimitive( PE_ArrowDown, p, ar, cg, flags );
324 }
325
326 if ( sub & SC_ComboBoxEditField ) {
327 const QComboBox * cb = (const QComboBox *) widget;
328 QRect re =
329 QStyle::visualRect( querySubControlMetrics( CC_ComboBox, widget,
330 SC_ComboBoxEditField ), widget );
331 if ( cb->hasFocus() && !cb->editable() )
332 p->fillRect( re.x(), re.y(), re.width(), re.height(),
333 cg.brush( QColorGroup::Highlight ) );
334
335 if ( cb->hasFocus() ) {
336 p->setPen( cg.highlightedText() );
337 p->setBackgroundColor( cg.highlight() );
338
339 } else {
340 p->setPen( cg.text() );
341 p->setBackgroundColor( cg.background() );
342 }
343
344 if ( cb->hasFocus() && !cb->editable() ) {
345 QRect re =
346 QStyle::visualRect( subRect( SR_ComboBoxFocusRect, cb ), widget );
347 drawPrimitive( PE_FocusRect, p, re, cg, Style_FocusAtBorder, QStyleOption(cg.highlight()));
348 }
349 }
350 break;
351 default:
352 QWindowsStyle::drawComplexControl( control, p, widget, r, cg, how,
353 sub, subActive, data );
354 break;
355 }
356}
357
358int QPEStyle::pixelMetric( PixelMetric metric, const QWidget *widget ) const
359{
360 int ret;
361 switch( metric ) {
362 case PM_ButtonMargin:
363 ret = 2;
364 break;
365 case PM_DefaultFrameWidth:
366 ret = 1;
367 break;
368 case PM_ButtonDefaultIndicator:
369 ret = 2;
370 break;
371 case PM_ButtonShiftHorizontal:
372 case PM_ButtonShiftVertical:
373 ret = -1;
374 break;
375 case PM_IndicatorWidth:
376 ret = 15;
377 break;
378 case PM_IndicatorHeight:
379 ret = 13;
380 break;
381 case PM_ExclusiveIndicatorHeight:
382 case PM_ExclusiveIndicatorWidth:
383 ret = 15;
384 break;
385 case PM_ScrollBarExtent:
386 ret = 13;
387 break;
388 case PM_SliderLength:
389 ret = 12;
390 break;
391 default:
392 ret = QWindowsStyle::pixelMetric( metric, widget );
393 break;
394 }
395 return ret;
396}
397
398QSize QPEStyle::sizeFromContents( ContentsType contents, const QWidget *widget,
399 const QSize &contentsSize, const QStyleOption &data) const
400{
401 QSize sz(contentsSize);
402
403 switch ( contents ) {
404 case CT_PopupMenuItem:
405 {
406 if ( !widget || data.isDefault() )
407 break;
408 sz = QWindowsStyle::sizeFromContents( contents, widget, contentsSize, data );
409 sz = QSize( sz.width(), sz.height()-2 );
410 break;
411 }
412 default:
413 sz = QWindowsStyle::sizeFromContents( contents, widget, contentsSize, data );
414 break;
415 }
416
417 return sz;
418}
419
420#else
421
422#include <qfontmetrics.h>
423#include <qpalette.h>
424#include <qdrawutil.h>
425#include <qscrollbar.h>
426#include <qbutton.h>
427#include <qframe.h>
428#include <qtabbar.h>
429
430#define INCLUDE_MENUITEM_DEF
431#include <qmenudata.h>
432
433QPEStyle::QPEStyle()
434{
435#if QT_VERSION < 300
436 setButtonMargin(buttonMargin());
437 setScrollBarExtent(scrollBarExtent().width(),scrollBarExtent().height());
438#endif
439}
440
441QPEStyle::~QPEStyle()
442{
443}
444
445int QPEStyle::buttonMargin() const
446{
447 return 2;
448}
449
450QSize QPEStyle::scrollBarExtent() const
451{
452 return QSize(13,13);
453}
454
455void QPEStyle::polish ( QPalette & )
456{
457}
458
459void QPEStyle::polish( QWidget *w )
460{
461 if ( w->inherits( "QListBox" ) ||
462 w->inherits( "QListView" ) ||
463 w->inherits( "QPopupMenu" ) ||
464 w->inherits( "QSpinBox" ) ) {
465 QFrame *f = (QFrame *)w;
466 f->setFrameShape( QFrame::StyledPanel );
467 f->setLineWidth( 1 );
468 }
469}
470
471void QPEStyle::unPolish( QWidget *w )
472{
473 if ( w->inherits( "QListBox" ) ||
474 w->inherits( "QListView" ) ||
475 w->inherits( "QPopupMenu" ) ||
476 w->inherits( "QSpinBox" ) ) {
477 QFrame *f = (QFrame *)w;
478 f->setFrameShape( QFrame::StyledPanel );
479 f->setLineWidth( 2 );
480 }
481}
482
483int QPEStyle::defaultFrameWidth() const
484{
485 return 1;
486}
487
488void QPEStyle::drawPanel ( QPainter * p, int x, int y, int w, int h,
489 const QColorGroup &g, bool sunken, int lineWidth, const QBrush * fill )
490{
491 qDrawShadePanel( p, QRect(x, y, w, h), g, sunken, lineWidth, fill );
492}
493
494void QPEStyle::drawButton( QPainter *p, int x, int y, int w, int h,
495 const QColorGroup &g, bool sunken, const QBrush* fill )
496{
497 QPen oldPen = p->pen();
498 if ( sunken )
499 p->setPen( g.dark() );
500 else
501 p->setPen( g.light() );
502
503 int x2 = x+w-1;
504 int y2 = y+h-1;
505
506 p->drawLine( x, y, x, y2 );
507 p->drawLine( x, y, x2, y );
508
509 if ( sunken )
510 p->setPen( g.light() );
511 else
512 p->setPen( g.dark() );
513
514 p->drawLine( x2, y, x2, y2 );
515 p->drawLine( x, y2, x2, y2 );
516 p->setPen( oldPen );
517
518 p->fillRect( x+1, y+1, w-2, h-2, fill?(*fill):g.brush(QColorGroup::Button) );
519}
520
521void QPEStyle::drawButtonMask ( QPainter * p, int x, int y, int w, int h )
522{
523 p->fillRect( x, y, w, h, color1 );
524}
525
526void QPEStyle::drawBevelButton( QPainter *p, int x, int y, int w, int h,
527 const QColorGroup &g, bool sunken, const QBrush* fill )
528{
529 drawButton( p, x, y, w, h, g, sunken, fill );
530}
531
532QRect QPEStyle::comboButtonRect( int x, int y, int w, int h)
533{
534 return QRect(x+1, y+1, w-2-14, h-2);
535}
536
537
538QRect QPEStyle::comboButtonFocusRect( int x, int y, int w, int h)
539{
540 return QRect(x+2, y+2, w-4-14, h-4);
541}
542
543void QPEStyle::drawComboButton( QPainter *p, int x, int y, int w, int h,
544 const QColorGroup &g, bool sunken,
545 bool /*editable*/,
546 bool enabled,
547 const QBrush *fill )
548{
549 drawBevelButton( p, x, y, w, h, g, FALSE, fill );
550 drawBevelButton( p, x+w-14, y, 14, h, g, sunken, fill );
551 drawArrow( p, QStyle::DownArrow, sunken,
552 x+w-14+ 2, y+ 2, 14- 4, h- 4, g, enabled,
553 &g.brush( QColorGroup::Button ) );
554
555}
556
557
558void QPEStyle::drawExclusiveIndicator ( QPainter * p, int x, int y, int w,
559 int h, const QColorGroup & g, bool on, bool down, bool enabled )
560{
561 static const QCOORD pts1[] = { // dark lines
562 1,9, 1,8, 0,7, 0,4, 1,3, 1,2, 2,1, 3,1, 4,0, 7,0, 8,1, 9,1 };
563 static const QCOORD pts4[] = { // white lines
564 2,10, 3,10, 4,11, 7,11, 8,10, 9,10, 10,9, 10,8, 11,7,
565 11,4, 10,3, 10,2 };
566 static const QCOORD pts5[] = { // inner fill
567 4,2, 7,2, 9,4, 9,7, 7,9, 4,9, 2,7, 2,4 };
568
569 p->eraseRect( x, y, w, h );
570 QPointArray a( QCOORDARRLEN(pts1), pts1 );
571 a.translate( x, y );
572 p->setPen( g.dark() );
573 p->drawPolyline( a );
574 a.setPoints( QCOORDARRLEN(pts4), pts4 );
575 a.translate( x, y );
576 p->setPen( g.light() );
577 p->drawPolyline( a );
578 a.setPoints( QCOORDARRLEN(pts5), pts5 );
579 a.translate( x, y );
580 QColor fillColor = ( down || !enabled ) ? g.button() : g.base();
581 p->setPen( fillColor );
582 p->setBrush( fillColor ) ;
583 p->drawPolygon( a );
584 if ( on ) {
585 p->setPen( NoPen );
586 p->setBrush( g.text() );
587 p->drawRect( x+5, y+4, 2, 4 );
588 p->drawRect( x+4, y+5, 4, 2 );
589 }
590}
591
592void QPEStyle::drawIndicator ( QPainter * p, int x, int y, int w, int h,
593 const QColorGroup & g, int state, bool down, bool enabled )
594{
595
596 QBrush fill;
597 if ( state == QButton::NoChange ) {
598 QBrush b = p->brush();
599 QColor c = p->backgroundColor();
600 p->setBackgroundMode( TransparentMode );
601 p->setBackgroundColor( green );
602 fill = QBrush(g.base(), Dense4Pattern);
603 p->setBackgroundColor( c );
604 p->setBrush( b );
605 } else if ( down )
606 fill = g.brush( QColorGroup::Button );
607 else
608 fill = g.brush( enabled ? QColorGroup::Base : QColorGroup::Background );
609 drawPanel( p, x, y, w, h, g, TRUE, 1, &fill );
610 if ( state != QButton::Off ) {
611 QPointArray a( 7*2 );
612 int i, xx, yy;
613 xx = x+3;
614 yy = y+5;
615 for ( i=0; i<3; i++ ) {
616 a.setPoint( 2*i, xx, yy );
617 a.setPoint( 2*i+1, xx, yy+2 );
618 xx++; yy++;
619 }
620 yy -= 2;
621 for ( i=3; i<7; i++ ) {
622 a.setPoint( 2*i, xx, yy );
623 a.setPoint( 2*i+1, xx, yy+2 );
624 xx++; yy--;
625 }
626 if ( state == QButton::NoChange ) {
627 p->setPen( g.dark() );
628 } else {
629 p->setPen( g.text() );
630 }
631 p->drawLineSegments( a );
632 }
633}
634
635 #define HORIZONTAL(sb->orientation() == QScrollBar::Horizontal)
636 #define VERTICAL!HORIZONTAL
637 #define MOTIF_BORDER2
638 #define SLIDER_MIN9 // ### motif says 6 but that's too small
639
640/*! \reimp */
641
642void QPEStyle::scrollBarMetrics( const QScrollBar* sb, int &sliderMin, int &sliderMax, int &sliderLength, int& buttonDim )
643{
644 int maxLength;
645 int length = HORIZONTAL ? sb->width() : sb->height();
646 int extent = HORIZONTAL ? sb->height() : sb->width();
647
648 if ( length > (extent - 1)*2 )
649 buttonDim = extent;
650 else
651 buttonDim = length/2 - 1;
652
653 sliderMin = 0;
654 maxLength = length - buttonDim*2;
655
656 if ( sb->maxValue() == sb->minValue() ) {
657 sliderLength = maxLength;
658 } else {
659 sliderLength = (sb->pageStep()*maxLength)/
660 (sb->maxValue()-sb->minValue()+sb->pageStep());
661 uint range = sb->maxValue()-sb->minValue();
662 if ( sliderLength < SLIDER_MIN || range > INT_MAX/2 )
663 sliderLength = SLIDER_MIN;
664 if ( sliderLength > maxLength )
665 sliderLength = maxLength;
666 }
667
668 sliderMax = sliderMin + maxLength - sliderLength;
669}
670
671/*!\reimp
672 */
673QStyle::ScrollControl QPEStyle::scrollBarPointOver( const QScrollBar* sb, int sliderStart, const QPoint& p )
674{
675 if ( !sb->rect().contains( p ) )
676 return NoScroll;
677 int sliderMin, sliderMax, sliderLength, buttonDim, pos;
678 scrollBarMetrics( sb, sliderMin, sliderMax, sliderLength, buttonDim );
679
680 if (sb->orientation() == QScrollBar::Horizontal)
681 pos = p.x();
682 else
683 pos = p.y();
684
685 if (pos < sliderStart)
686 return SubPage;
687 if (pos < sliderStart + sliderLength)
688 return Slider;
689 if (pos < sliderMax + sliderLength)
690 return AddPage;
691 if (pos < sliderMax + sliderLength + buttonDim)
692 return SubLine;
693 return AddLine;
694}
695
696/*! \reimp */
697
698void QPEStyle::drawScrollBarControls( QPainter* p, const QScrollBar* sb, int sliderStart, uint controls, uint activeControl )
699{
700#define ADD_LINE_ACTIVE ( activeControl == AddLine )
701#define SUB_LINE_ACTIVE ( activeControl == SubLine )
702 QColorGroup g = sb->colorGroup();
703
704 int sliderMin, sliderMax, sliderLength, buttonDim;
705 scrollBarMetrics( sb, sliderMin, sliderMax, sliderLength, buttonDim );
706
707 if ( controls == (AddLine | SubLine | AddPage | SubPage | Slider | First | Last ) )
708 p->fillRect( 0, 0, sb->width(), sb->height(), g.brush( QColorGroup::Mid ));
709
710 if (sliderStart > sliderMax) { // sanity check
711 sliderStart = sliderMax;
712 }
713
714 int dimB = buttonDim;
715 QRect addB;
716 QRect subB;
717 QRect addPageR;
718 QRect subPageR;
719 QRect sliderR;
720 int addX, addY, subX, subY;
721 int length = HORIZONTAL ? sb->width() : sb->height();
722 int extent = HORIZONTAL ? sb->height() : sb->width();
723
724 if ( HORIZONTAL ) {
725 subY = addY = ( extent - dimB ) / 2;
726 subX = length - dimB - dimB;
727 addX = length - dimB;
728 } else {
729 subX = addX = ( extent - dimB ) / 2;
730 subY = length - dimB - dimB;
731 addY = length - dimB;
732 }
733
734 int sliderEnd = sliderStart + sliderLength;
735 int sliderW = extent;
736 if ( HORIZONTAL ) {
737 subB.setRect( subX,subY+1,dimB,dimB-1 );
738 addB.setRect( addX,addY+1,dimB,dimB-1 );
739
740 subPageR.setRect( 0, 0,
741 sliderStart+1, sliderW );
742 addPageR.setRect( sliderEnd-1, 0, subX - sliderEnd+1, sliderW );
743 sliderR .setRect( sliderStart, 1, sliderLength, sliderW-1 );
744
745 } else {
746 subB.setRect( subX+1,subY,dimB-1,dimB );
747 addB.setRect( addX+1,addY,dimB-1,dimB );
748
749 subPageR.setRect( 0, 0, sliderW,
750 sliderStart+1 );
751 addPageR.setRect( 0, sliderEnd-1, sliderW, subY - sliderEnd+1 );
752 sliderR .setRect( 1, sliderStart, sliderW-1, sliderLength );
753 }
754
755 bool maxedOut = (sb->maxValue() == sb->minValue());
756 if ( controls & AddLine ) {
757 drawBevelButton( p, addB.x(), addB.y(),
758 addB.width(), addB.height(), g,
759 ADD_LINE_ACTIVE);
760 p->setPen(g.shadow());
761 drawArrow( p, VERTICAL ? DownArrow : RightArrow,
762 FALSE, addB.x()+2, addB.y()+2,
763 addB.width()-4, addB.height()-4, g, !maxedOut,
764 &g.brush( QColorGroup::Button ));
765 }
766 if ( controls & SubLine ) {
767 drawBevelButton( p, subB.x(), subB.y(),
768 subB.width(), subB.height(), g,
769 SUB_LINE_ACTIVE );
770 p->setPen(g.shadow());
771 drawArrow( p, VERTICAL ? UpArrow : LeftArrow,
772 FALSE, subB.x()+2, subB.y()+2,
773 subB.width()-4, subB.height()-4, g, !maxedOut,
774 &g.brush( QColorGroup::Button ));
775 }
776
777
778 if ( controls & SubPage )
779 p->fillRect( subPageR.x(), subPageR.y(), subPageR.width(),
780 subPageR.height(), g.brush( QColorGroup::Mid ));
781 if ( controls & AddPage )
782 p->fillRect( addPageR.x(), addPageR.y(), addPageR.width(),
783 addPageR.height(), g.brush( QColorGroup::Mid ));
784 if ( controls & Slider ) {
785 QPoint bo = p->brushOrigin();
786 p->setBrushOrigin(sliderR.topLeft());
787 drawBevelButton( p, sliderR.x(), sliderR.y(),
788 sliderR.width(), sliderR.height(), g,
789 FALSE, &g.brush( QColorGroup::Button ) );
790 p->setBrushOrigin(bo);
791 drawRiffles( p, sliderR.x(), sliderR.y(),
792 sliderR.width(), sliderR.height(), g, HORIZONTAL );
793 }
794
795 // ### perhaps this should not be able to accept focus if maxedOut?
796 if ( sb->hasFocus() && (controls & Slider) )
797 p->drawWinFocusRect( sliderR.x()+2, sliderR.y()+2,
798 sliderR.width()-5, sliderR.height()-5,
799 sb->backgroundColor() );
800
801}
802
803void QPEStyle::drawRiffles( QPainter* p, int x, int y, int w, int h,
804 const QColorGroup &g, bool horizontal )
805{
806 if (!horizontal) {
807 if (h > 20) {
808 y += (h-20)/2 ;
809 h = 20;
810 }
811 if (h > 12) {
812 int n = 3;
813 int my = y+h/2-4;
814 int i ;
815 p->setPen(g.light());
816 for (i=0; i<n; i++) {
817 p->drawLine(x+2, my+3*i, x+w-4, my+3*i);
818 }
819 p->setPen(g.dark());
820 my++;
821 for (i=0; i<n; i++) {
822 p->drawLine(x+2, my+3*i, x+w-4, my+3*i);
823 }
824 }
825 }
826 else {
827 if (w > 20) {
828 x += (w-20)/2 ;
829 w = 20;
830 }
831 if (w > 12) {
832 int n = 3;
833 int mx = x+w/2-4;
834 int i ;
835 p->setPen(g.light());
836 for (i=0; i<n; i++) {
837 p->drawLine(mx+3*i, y+2, mx + 3*i, y+h-4);
838 }
839 p->setPen(g.dark());
840 mx++;
841 for (i=0; i<n; i++) {
842 p->drawLine(mx+3*i, y+2, mx + 3*i, y+h-4);
843 }
844 }
845 }
846}
847
848int QPEStyle::sliderLength() const
849{
850 return 12;
851}
852
853void QPEStyle::drawSlider( QPainter *p, int x, int y, int w, int h,
854 const QColorGroup &g, Orientation o, bool tickAbove, bool tickBelow )
855{
856 int a = tickAbove ? 3 : 0;
857 int b = tickBelow ? 3 : 0;
858
859 if ( o == Horizontal ) {
860 drawBevelButton( p, x, y+a, w, h-a-b, g, FALSE, &g.brush( QColorGroup::Button ) );
861 int xp = x + w/2;
862 qDrawShadeLine( p, xp, y+a+2, xp, y+h-b-3, g );
863 } else {
864 drawBevelButton( p, x+a, y, w-a-b, h, g, FALSE, &g.brush( QColorGroup::Button ) );
865 int yp = y + h/2;
866 qDrawShadeLine( p, x+a+2, yp, x+w-b-3, yp, g );
867 }
868}
869
870void QPEStyle::drawSliderMask ( QPainter * p, int x, int y, int w, int h,
871 Orientation o, bool tickAbove, bool tickBelow )
872{
873 int a = tickAbove ? 3 : 0;
874 int b = tickBelow ? 3 : 0;
875 if ( o == Horizontal )
876 p->fillRect( x, y+a, w, h-a-b, color1 );
877 else
878 p->fillRect( x+a, y, w-a-b, h, color1 );
879}
880
881/*!\reimp
882 */
883void QPEStyle::drawSliderGrooveMask( QPainter *p,
884 int x, int y, int w, int h,
885 const QColorGroup& , QCOORD c,
886 Orientation orient )
887{
888 if ( orient == Horizontal )
889 p->fillRect( x, y + c - 2, w, 4, color1 );
890 else
891 p->fillRect( x + c - 2, y, 4, h, color1 );
892}
893
894void QPEStyle::drawTab( QPainter *p, const QTabBar *tb, QTab *t, bool selected )
895{
896 QRect r( t->rect() );
897 if ( tb->shape() == QTabBar::RoundedAbove ) {
898 p->setPen( tb->colorGroup().light() );
899 p->drawLine( r.left(), r.bottom(), r.right(), r.bottom() );
900 if ( r.left() == 0 )
901 p->drawPoint( tb->rect().bottomLeft() );
902 else {
903 p->setPen( tb->colorGroup().light() );
904 p->drawLine( r.left(), r.bottom(), r.right(), r.bottom() );
905 }
906
907 if ( selected ) {
908 p->setPen( tb->colorGroup().background() );
909 p->drawLine( r.left()+2, r.top()+1, r.right()-2, r.top()+1 );
910 p->fillRect( QRect( r.left()+1, r.top()+2, r.width()-2, r.height()-2),
911 tb->colorGroup().brush( QColorGroup::Background ));
912 } else {
913 r.setRect( r.left() + 2, r.top() + 2,
914 r.width() - 4, r.height() - 2 );
915 p->setPen( tb->colorGroup().button() );
916 p->drawLine( r.left()+2, r.top()+1, r.right()-2, r.top()+1 );
917 p->fillRect( QRect( r.left()+1, r.top()+2, r.width()-2, r.height()-3),
918 tb->colorGroup().brush( QColorGroup::Button ));
919
920 //do shading; will not work for pixmap brushes
921 QColor bg = tb->colorGroup().button();
922 // int h,s,v;
923 // bg.hsv( &h, &s, &v );
924 int n = r.height()/2;
925 int dark = 100;
926 for ( int i = 1; i < n; i++ ) {
927 dark = (dark * (100+(i*15)/n) )/100;
928 p->setPen( bg.dark( dark ) );
929 int y = r.bottom()-n+i;
930 int x1 = r.left()+1;
931 int x2 = r.right()-1;
932 p->drawLine( x1, y, x2, y );
933 }
934 }
935
936 p->setPen( tb->colorGroup().light() );
937 p->drawLine( r.left(), r.bottom()-1, r.left(), r.top() + 2 );
938 p->drawPoint( r.left()+1, r.top() + 1 );
939 p->drawLine( r.left()+2, r.top(),
940 r.right() - 2, r.top() );
941
942 p->setPen( tb->colorGroup().dark() );
943 p->drawPoint( r.right() - 1, r.top() + 1 );
944 p->drawLine( r.right(), r.top() + 2, r.right(), r.bottom() - 1);
945 } else if ( tb->shape() == QTabBar::RoundedBelow ) {
946 if ( selected ) {
947 p->setPen( tb->colorGroup().background() );
948 p->drawLine( r.left()+2, r.bottom()-1, r.right()-2, r.bottom()-1 );
949 p->fillRect( QRect( r.left()+1, r.top(), r.width()-2, r.height()-2),
950 tb->palette().normal().brush( QColorGroup::Background ));
951 } else {
952 p->setPen( tb->colorGroup().dark() );
953 p->drawLine( r.left(), r.top(),
954 r.right(), r.top() );
955 r.setRect( r.left() + 2, r.top(),
956 r.width() - 4, r.height() - 2 );
957 p->setPen( tb->colorGroup().button() );
958 p->drawLine( r.left()+2, r.bottom()-1, r.right()-2, r.bottom()-1 );
959 p->fillRect( QRect( r.left()+1, r.top()+1, r.width()-2, r.height()-3),
960 tb->palette().normal().brush( QColorGroup::Button ));
961 }
962
963 p->setPen( tb->colorGroup().dark() );
964 p->drawLine( r.right(), r.top(),
965 r.right(), r.bottom() - 2 );
966 p->drawPoint( r.right() - 1, r.bottom() - 1 );
967 p->drawLine( r.right() - 2, r.bottom(),
968 r.left() + 2, r.bottom() );
969
970 p->setPen( tb->colorGroup().light() );
971 p->drawLine( r.left(), r.top()+1,
972 r.left(), r.bottom() - 2 );
973 p->drawPoint( r.left() + 1, r.bottom() - 1 );
974 if ( r.left() == 0 )
975 p->drawPoint( tb->rect().topLeft() );
976
977 } else {
978 QCommonStyle::drawTab( p, tb, t, selected );
979 }
980}
981
982 static const int motifItemFrame = 0;// menu item frame width
983 static const int motifSepHeight = 2;// separator item height
984 static const int motifItemHMargin = 1;// menu item hor text margin
985 static const int motifItemVMargin = 2;// menu item ver text margin
986 static const int motifArrowHMargin = 0;// arrow horizontal margin
987 static const int motifTabSpacing = 12;// space between text and tab
988 static const int motifCheckMarkHMargin = 1;// horiz. margins of check mark
989 static const int windowsRightBorder= 8; // right border on windows
990static const int windowsCheckMarkWidth = 2; // checkmarks width on windows
991
992/*! \reimp
993*/
994int QPEStyle::extraPopupMenuItemWidth( bool checkable, int maxpmw, QMenuItem* mi, const QFontMetrics& /*fm*/ )
995{
996#ifndef QT_NO_MENUDATA
997 int w = 2*motifItemHMargin + 2*motifItemFrame; // a little bit of border can never harm
998
999 if ( mi->isSeparator() )
1000 return 10; // arbitrary
1001 else if ( mi->pixmap() )
1002 w += mi->pixmap()->width();// pixmap only
1003
1004 if ( !mi->text().isNull() ) {
1005 if ( mi->text().find('\t') >= 0 )// string contains tab
1006 w += motifTabSpacing;
1007 }
1008
1009 if ( maxpmw ) { // we have iconsets
1010 w += maxpmw;
1011 w += 6; // add a little extra border around the iconset
1012 }
1013
1014 if ( checkable && maxpmw < windowsCheckMarkWidth ) {
1015 w += windowsCheckMarkWidth - maxpmw; // space for the checkmarks
1016 }
1017
1018 if ( maxpmw > 0 || checkable ) // we have a check-column ( iconsets or checkmarks)
1019 w += motifCheckMarkHMargin; // add space to separate the columns
1020
1021 w += windowsRightBorder; // windows has a strange wide border on the right side
1022
1023 return w;
1024#endif
1025}
1026
1027/*! \reimp
1028*/
1029int QPEStyle::popupMenuItemHeight( bool /*checkable*/, QMenuItem* mi, const QFontMetrics& fm )
1030{
1031#ifndef QT_NO_MENUDATA
1032 int h = 0;
1033 if ( mi->isSeparator() ) // separator height
1034 h = motifSepHeight;
1035 else if ( mi->pixmap() ) // pixmap height
1036 h = mi->pixmap()->height() + 2*motifItemFrame;
1037 else // text height
1038 h = fm.height() + 2*motifItemVMargin + 2*motifItemFrame - 1;
1039
1040 if ( !mi->isSeparator() && mi->iconSet() != 0 ) {
1041 h = QMAX( h, mi->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).height() + 2*motifItemFrame );
1042 }
1043 if ( mi->custom() )
1044 h = QMAX( h, mi->custom()->sizeHint().height() + 2*motifItemVMargin + 2*motifItemFrame ) - 1;
1045 return h;
1046#endif
1047}
1048
1049void QPEStyle::drawPopupMenuItem( QPainter* p, bool checkable, int maxpmw, int tab, QMenuItem* mi,
1050 const QPalette& pal,
1051 bool act, bool enabled, int x, int y, int w, int h)
1052{
1053#ifndef QT_NO_MENUDATA
1054 const QColorGroup & g = pal.active();
1055 bool dis = !enabled;
1056 QColorGroup itemg = dis ? pal.disabled() : pal.active();
1057
1058 if ( checkable )
1059 maxpmw = QMAX( maxpmw, 8 ); // space for the checkmarks
1060
1061 int checkcol = maxpmw;
1062
1063 if ( mi && mi->isSeparator() ) { // draw separator
1064 p->setPen( g.dark() );
1065 p->drawLine( x, y, x+w, y );
1066 p->setPen( g.light() );
1067 p->drawLine( x, y+1, x+w, y+1 );
1068 return;
1069 }
1070
1071 QBrush fill = act? g.brush( QColorGroup::Highlight ) :
1072 g.brush( QColorGroup::Button );
1073 p->fillRect( x, y, w, h, fill);
1074
1075 if ( !mi )
1076 return;
1077
1078 if ( mi->isChecked() ) {
1079 if ( act && !dis ) {
1080 qDrawShadePanel( p, x, y, checkcol, h,
1081 g, TRUE, 1, &g.brush( QColorGroup::Button ) );
1082 } else {
1083 qDrawShadePanel( p, x, y, checkcol, h,
1084 g, TRUE, 1, &g.brush( QColorGroup::Midlight ) );
1085 }
1086 } else if ( !act ) {
1087 p->fillRect(x, y, checkcol , h,
1088 g.brush( QColorGroup::Button ));
1089 }
1090
1091 if ( mi->iconSet() ) { // draw iconset
1092 QIconSet::Mode mode = dis ? QIconSet::Disabled : QIconSet::Normal;
1093 if (act && !dis )
1094 mode = QIconSet::Active;
1095 QPixmap pixmap = mi->iconSet()->pixmap( QIconSet::Small, mode );
1096 int pixw = pixmap.width();
1097 int pixh = pixmap.height();
1098 if ( act && !dis ) {
1099 if ( !mi->isChecked() )
1100 qDrawShadePanel( p, x, y, checkcol, h, g, FALSE, 1, &g.brush( QColorGroup::Button ) );
1101 }
1102 QRect cr( x, y, checkcol, h );
1103 QRect pmr( 0, 0, pixw, pixh );
1104 pmr.moveCenter( cr.center() );
1105 p->setPen( itemg.text() );
1106 p->drawPixmap( pmr.topLeft(), pixmap );
1107
1108 QBrush fill = act? g.brush( QColorGroup::Highlight ) :
1109 g.brush( QColorGroup::Button );
1110 p->fillRect( x+checkcol + 1, y, w - checkcol - 1, h, fill);
1111 } else if ( checkable ) {// just "checking"...
1112 int mw = checkcol + motifItemFrame;
1113 int mh = h - 2*motifItemFrame;
1114 if ( mi->isChecked() ) {
1115 drawCheckMark( p, x + motifItemFrame + 2,
1116 y+motifItemFrame, mw, mh, itemg, act, dis );
1117 }
1118 }
1119
1120 p->setPen( act ? g.highlightedText() : g.buttonText() );
1121
1122 QColor discol;
1123 if ( dis ) {
1124 discol = itemg.text();
1125 p->setPen( discol );
1126 }
1127
1128 int xm = motifItemFrame + checkcol + motifItemHMargin;
1129
1130 if ( mi->custom() ) {
1131 int m = motifItemVMargin;
1132 p->save();
1133 if ( dis && !act ) {
1134 p->setPen( g.light() );
1135 mi->custom()->paint( p, itemg, act, enabled,
1136 x+xm+1, y+m+1, w-xm-tab+1, h-2*m );
1137 p->setPen( discol );
1138 }
1139 mi->custom()->paint( p, itemg, act, enabled,
1140 x+xm, y+m, w-xm-tab+1, h-2*m );
1141 p->restore();
1142 }
1143 QString s = mi->text();
1144 if ( !s.isNull() ) { // draw text
1145 int t = s.find( '\t' );
1146 int m = motifItemVMargin;
1147 const int text_flags = AlignVCenter|ShowPrefix | DontClip | SingleLine;
1148 if ( t >= 0 ) { // draw tab text
1149 if ( dis && !act ) {
1150 p->setPen( g.light() );
1151 p->drawText( x+w-tab-windowsRightBorder-motifItemHMargin-motifItemFrame+1,
1152 y+m+1, tab, h-2*m, text_flags, s.mid( t+1 ));
1153 p->setPen( discol );
1154 }
1155 p->drawText( x+w-tab-windowsRightBorder-motifItemHMargin-motifItemFrame,
1156 y+m, tab, h-2*m, text_flags, s.mid( t+1 ) );
1157 }
1158 if ( dis && !act ) {
1159 p->setPen( g.light() );
1160 p->drawText( x+xm+1, y+m+1, w-xm+1, h-2*m, text_flags, s, t );
1161 p->setPen( discol );
1162 }
1163 p->drawText( x+xm, y+m, w-xm-tab+1, h-2*m, text_flags, s, t );
1164 } else if ( mi->pixmap() ) { // draw pixmap
1165 QPixmap *pixmap = mi->pixmap();
1166 if ( pixmap->depth() == 1 )
1167 p->setBackgroundMode( OpaqueMode );
1168 p->drawPixmap( x+xm, y+motifItemFrame, *pixmap );
1169 if ( pixmap->depth() == 1 )
1170 p->setBackgroundMode( TransparentMode );
1171 }
1172 if ( mi->popup() ) { // draw sub menu arrow
1173 int dim = (h-2*motifItemFrame) / 2;
1174 if ( act ) {
1175 if ( !dis )
1176 discol = white;
1177 QColorGroup g2( discol, g.highlight(),
1178 white, white,
1179 dis ? discol : white,
1180 discol, white );
1181 drawArrow( p, RightArrow, FALSE,
1182 x+w - motifArrowHMargin - motifItemFrame - dim, y+h/2-dim/2,
1183 dim, dim, g2, TRUE );
1184 } else {
1185 drawArrow( p, RightArrow,
1186 FALSE,
1187 x+w - motifArrowHMargin - motifItemFrame - dim, y+h/2-dim/2,
1188 dim, dim, g, mi->isEnabled() );
1189 }
1190 }
1191#endif
1192}
1193
1194#endif
diff --git a/library/qpestyle.h b/library/qpestyle.h
new file mode 100644
index 0000000..19ef346
--- a/dev/null
+++ b/library/qpestyle.h
@@ -0,0 +1,102 @@
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 QPESTYLE_H
22#define QPESTYLE_H
23
24#ifndef QT_H
25#include "qwindowsstyle.h"
26#endif // QT_H
27
28#if QT_VERSION >= 300
29
30class Q_EXPORT QPEStyle : public QWindowsStyle
31{
32public:
33 QPEStyle();
34 virtual ~QPEStyle();
35
36 virtual void drawPrimitive( PrimitiveElement pe, QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags=Style_Default, const QStyleOption & = QStyleOption::Default) const;
37 virtual void drawControl( ControlElement ce, QPainter *p, const QWidget *widget, const QRect &r, const QColorGroup &cg, SFlags how=Style_Default, const QStyleOption & = QStyleOption::Default) const;
38 virtual void drawComplexControl( ComplexControl control, QPainter *p, const QWidget *widget, const QRect &r, const QColorGroup &cg, SFlags how=Style_Default, SCFlags sub=SC_All, SCFlags subActive=SC_None, const QStyleOption & = QStyleOption::Default) const;
39 virtual int pixelMetric( PixelMetric metric, const QWidget *widget=0 ) const;
40 virtual QSize sizeFromContents( ContentsType contents, const QWidget *widget, const QSize &contentsSize, const QStyleOption & = QStyleOption::Default) const;
41};
42
43#else
44
45class Q_EXPORT QPEStyle : public QWindowsStyle
46{
47public:
48 QPEStyle();
49 virtual ~QPEStyle();
50 virtual void polish( QPalette &p );
51 virtual void polish( QWidget *w );
52 virtual void unPolish( QWidget *w );
53
54 int defaultFrameWidth () const;
55 void drawPanel ( QPainter * p, int x, int y, int w, int h,
56 const QColorGroup &, bool sunken=FALSE, int lineWidth = 1, const QBrush * fill = 0 );
57 void drawButton( QPainter *p, int x, int y, int w, int h,
58 const QColorGroup &g, bool sunken, const QBrush* fill );
59 void drawButtonMask ( QPainter * p, int x, int y, int w, int h );
60 void drawBevelButton( QPainter *p, int x, int y, int w, int h,
61 const QColorGroup &g, bool sunken=FALSE, const QBrush* fill=0 );
62 QRect comboButtonRect( int x, int y, int w, int h);
63 QRect comboButtonFocusRect( int x, int y, int w, int h);
64 void drawComboButton( QPainter *p, int x, int y, int w, int h,
65 const QColorGroup &g, bool sunken, bool, bool enabled,
66 const QBrush *fill );
67 void drawExclusiveIndicator ( QPainter * p, int x, int y, int w, int h,
68 const QColorGroup & g, bool on, bool down = FALSE, bool enabled = TRUE );
69 void drawIndicator ( QPainter * p, int x, int y, int w, int h,
70 const QColorGroup & g, int state, bool down = FALSE, bool enabled = TRUE );
71 void scrollBarMetrics( const QScrollBar*, int&, int&, int&, int&);
72 void drawScrollBarControls( QPainter*, const QScrollBar*, int sliderStart, uint controls, uint activeControl );
73 ScrollControl scrollBarPointOver( const QScrollBar* sb, int sliderStart, const QPoint& p );
74 void drawRiffles( QPainter* p, int x, int y, int w, int h,
75 const QColorGroup &g, bool horizontal );
76 int sliderLength() const;
77 void drawSlider( QPainter *p, int x, int y, int w, int h,
78 const QColorGroup &g, Orientation, bool tickAbove, bool tickBelow );
79 void drawSliderMask( QPainter *p, int x, int y, int w, int h,
80 Orientation, bool tickAbove, bool tickBelow );
81 void drawSliderGrooveMask( QPainter *p, int x, int y, int w, int h,
82 const QColorGroup& , QCOORD c, Orientation orient );
83 void drawTab( QPainter *, const QTabBar *, QTab *, bool selected );
84 int extraPopupMenuItemWidth( bool checkable, int maxpmw, QMenuItem*, const QFontMetrics& );
85 int popupMenuItemHeight( bool checkable, QMenuItem*, const QFontMetrics& );
86 void drawPopupMenuItem( QPainter* p, bool checkable, int maxpmw, int tab, QMenuItem* mi,
87 const QPalette& pal,
88 bool act, bool enabled, int x, int y, int w, int h);
89
90 int buttonMargin() const;
91 QSize scrollBarExtent() const;
92
93 private:// Disabled copy constructor and operator=
94#if defined(Q_DISABLE_COPY)
95 QPEStyle( const QPEStyle & );
96 QPEStyle& operator=( const QPEStyle & );
97#endif
98};
99
100#endif
101
102#endif // QPESTYLE_H
diff --git a/library/qpetoolbar.cpp b/library/qpetoolbar.cpp
new file mode 100644
index 0000000..7f95eda
--- a/dev/null
+++ b/library/qpetoolbar.cpp
@@ -0,0 +1,52 @@
1/**********************************************************************
2** Copyright (C) 2001 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 "qpetoolbar.h"
22#include "qpemenubar.h"
23#include <qtoolbutton.h>
24
25/*!
26 \class QPEToolBar qpemenubar.h
27 \brief The QPEToolBar class is obsolete. Use QToolBar instead.
28
29 \obsolete
30
31 The QPEToolBar class is obsolete. Use QToolBar instead.
32
33 \sa QToolBar
34 */
35
36/*!
37 Constructs a QPEToolBar just as you would construct
38 a QToolBar, passing \a parent and \a name.
39 */
40QPEToolBar::QPEToolBar( QMainWindow *parent, const char *name )
41 : QToolBar( parent, name )
42{
43}
44
45/*!
46 \internal
47*/
48void QPEToolBar::childEvent( QChildEvent *e )
49{
50 QToolBar::childEvent( e );
51}
52
diff --git a/library/qpetoolbar.h b/library/qpetoolbar.h
new file mode 100644
index 0000000..53d21c0
--- a/dev/null
+++ b/library/qpetoolbar.h
@@ -0,0 +1,39 @@
1/**********************************************************************
2** Copyright (C) 2001 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 QPETOOLBAR_H
22#define QPETOOLBAR_H
23
24#include <qtoolbar.h>
25
26class QMainWindow;
27
28class QPEToolBar : public QToolBar
29{
30 Q_OBJECT
31public:
32 QPEToolBar( QMainWindow *parent = 0, const char *name = 0 );
33
34protected:
35 virtual void childEvent( QChildEvent *e );
36};
37
38#endif
39
diff --git a/library/qprocess.cpp b/library/qprocess.cpp
new file mode 100644
index 0000000..618c0e0
--- a/dev/null
+++ b/library/qprocess.cpp
@@ -0,0 +1,654 @@
1/****************************************************************************
2** $Id$
3**
4** Implementation of QProcess class
5**
6** Created : 20000905
7**
8** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
9**
10** This file is part of the kernel module of the Qt GUI Toolkit.
11**
12** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file
14** LICENSE.QPL included in the packaging of this file.
15**
16** This file may be distributed and/or modified under the terms of the
17** GNU General Public License version 2 as published by the Free Software
18** Foundation and appearing in the file LICENSE.GPL included in the
19** packaging of this file.
20**
21** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
22** licenses may use this file in accordance with the Qt Commercial License
23** Agreement provided with the Software.
24**
25** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
26** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27**
28** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
29** information about Qt Commercial License Agreements.
30** See http://www.trolltech.com/qpl/ for QPL licensing information.
31** See http://www.trolltech.com/gpl/ for GPL licensing information.
32**
33** Contact info@trolltech.com if any conditions of this licensing are
34** not clear to you.
35**
36**********************************************************************/
37
38#include <stdio.h>
39#include <stdlib.h>
40
41#include "qprocess.h"
42
43#ifndef QT_NO_PROCESS
44
45#include "qapplication.h"
46
47
48//#define QT_QPROCESS_DEBUG
49
50
51/*!
52 \class QProcess qprocess.h
53
54 \brief The QProcess class is used to start external programs and to
55 communicate with them.
56
57 This is a temporary class. This will be replaced by Qt 3's QProcess class.
58*/
59
60/*!
61 \enum QProcess::Communication
62
63 This enum type defines the communication channels connected to the
64 process.
65
66 \value Stdin Data can be written to the process's standard input.
67
68 \value Stdout Data can be read from the process's standard output.
69
70 \value Stderr Data can be read from the process's standard error.
71
72 \value DupStderr Duplicates standard error to standard output for new
73 processes; i.e. everything that the process writes to standard error, is
74 reported by QProcess on standard output instead. This is especially useful if
75 your application requires that the output on standard output and standard
76 error is read in the same order as the process output it. Please note that
77 this is a binary flag, so if you want to activate this together with standard
78 input, output and error redirection (the default), you have to specify
79 \c{Stdin|Stdout|Stderr|DupStderr} for the setCommunication() call.
80
81 \sa setCommunication() communication()
82*/
83
84/*!
85 Constructs a QProcess object. The \a parent and \a name parameters are passed
86 to the QObject constructor.
87
88 \sa setArguments() addArgument() start()
89*/
90QProcess::QProcess( QObject *parent, const char *name )
91 : QObject( parent, name ), ioRedirection( FALSE ), notifyOnExit( FALSE ),
92 wroteToStdinConnected( FALSE ),
93 readStdoutCalled( FALSE ), readStderrCalled( FALSE ),
94 comms( Stdin|Stdout|Stderr )
95{
96 init();
97}
98
99/*!
100 Constructs a QProcess with \a arg0 as the command to be executed. The
101 \a parent and \a name parameters are passed to the QObject constructor.
102
103 The process is not started. You must call start() or launch()
104 to start the process.
105
106 \sa setArguments() addArgument() start()
107*/
108QProcess::QProcess( const QString& arg0, QObject *parent, const char *name )
109 : QObject( parent, name ), ioRedirection( FALSE ), notifyOnExit( FALSE ),
110 wroteToStdinConnected( FALSE ),
111 readStdoutCalled( FALSE ), readStderrCalled( FALSE ),
112 comms( Stdin|Stdout|Stderr )
113{
114 init();
115 addArgument( arg0 );
116}
117
118/*!
119 Constructs a QProcess with \a args as the arguments of the process. The first
120 element in the list is the command to be executed. The other elements in the
121 list are the arguments to this command. The \a parent and \a name
122 parameters are passed to the QObject constructor.
123
124 The process is not started. You must call start() or launch()
125 to start the process.
126
127 \sa setArguments() addArgument() start()
128*/
129QProcess::QProcess( const QStringList& args, QObject *parent, const char *name )
130 : QObject( parent, name ), ioRedirection( FALSE ), notifyOnExit( FALSE ),
131 wroteToStdinConnected( FALSE ),
132 readStdoutCalled( FALSE ), readStderrCalled( FALSE ),
133 comms( Stdin|Stdout|Stderr )
134{
135 init();
136 setArguments( args );
137}
138
139
140/*!
141 Returns the list of arguments that are set for the process. Arguments can be
142 specified with the constructor or with the functions setArguments() and
143 addArgument().
144
145 \sa setArguments() addArgument()
146*/
147QStringList QProcess::arguments() const
148{
149 return _arguments;
150}
151
152/*!
153 Clears the list of arguments that are set for the process.
154
155 \sa setArguments() addArgument()
156*/
157void QProcess::clearArguments()
158{
159 _arguments.clear();
160}
161
162/*!
163 Sets \a args as the arguments for the process. The first element in the list
164 is the command to be executed. The other elements in the list are the
165 arguments to the command. Any previous arguments are deleted.
166
167 \sa arguments() addArgument()
168*/
169void QProcess::setArguments( const QStringList& args )
170{
171 _arguments = args;
172}
173
174/*!
175 Adds \a arg to the end of the list of arguments.
176
177 The first element in the list of arguments is the command to be
178 executed; the following elements are the arguments to the command.
179
180 \sa arguments() setArguments()
181*/
182void QProcess::addArgument( const QString& arg )
183{
184 _arguments.append( arg );
185}
186
187#ifndef QT_NO_DIR
188/*!
189 Returns the working directory that was set with
190 setWorkingDirectory(), or the current directory if none has been
191 set.
192
193 \sa setWorkingDirectory() QDir::current()
194*/
195QDir QProcess::workingDirectory() const
196{
197 return workingDir;
198}
199
200/*!
201 Sets \a dir as the working directory for a process. This does not affect
202 running processes; only processes that are started afterwards are affected.
203
204 Setting the working directory is especially useful for processes that try to
205 access files with relative filenames.
206
207 \sa workingDirectory() start()
208*/
209void QProcess::setWorkingDirectory( const QDir& dir )
210{
211 workingDir = dir;
212}
213#endif //QT_NO_DIR
214
215/*!
216 Returns the communication required with the process.
217
218 \sa setCommunication()
219*/
220int QProcess::communication() const
221{
222 return comms;
223}
224
225/*!
226 Sets \a commFlags as the communication required with the process.
227
228 \a commFlags is a bitwise OR between the flags defined in \c Communication.
229
230 The default is \c{Stdin|Stdout|Stderr}.
231
232 \sa communication()
233*/
234void QProcess::setCommunication( int commFlags )
235{
236 comms = commFlags;
237}
238
239/*!
240 Returns TRUE if the process has exited normally; otherwise returns
241 FALSE. This implies that this function returns FALSE if the process
242 is still running.
243
244 \sa isRunning() exitStatus() processExited()
245*/
246bool QProcess::normalExit() const
247{
248 // isRunning() has the side effect that it determines the exit status!
249 if ( isRunning() )
250 return FALSE;
251 else
252 return exitNormal;
253}
254
255/*!
256 Returns the exit status of the process or 0 if the process is still
257 running. This function returns immediately and does not wait until
258 the process is finished.
259
260 If normalExit() is FALSE (e.g. if the program was killed or
261 crashed), this function returns 0, so you should check the return
262 value of normalExit() before relying on this value.
263
264 \sa normalExit() processExited()
265*/
266int QProcess::exitStatus() const
267{
268 // isRunning() has the side effect that it determines the exit status!
269 if ( isRunning() )
270 return 0;
271 else
272 return exitStat;
273}
274
275
276/*!
277 Reads the data that the process has written to standard output. When
278 new data is written to standard output, the class emits the signal
279 readyReadStdout().
280
281 If there is no data to read, this function returns a QByteArray of
282 size 0: it does not wait until there is something to read.
283
284 \sa readyReadStdout() readLineStdout() readStderr() writeToStdin()
285*/
286QByteArray QProcess::readStdout()
287{
288 if ( readStdoutCalled ) {
289 return QByteArray();
290 }
291 readStdoutCalled = TRUE;
292
293 QByteArray buf = bufStdout()->copy();
294 consumeBufStdout( -1 ); // consume everything
295
296 readStdoutCalled = FALSE;
297 return buf;
298}
299
300/*!
301 Reads the data that the process has written to standard error. When
302 new data is written to standard error, the class emits the signal
303 readyReadStderr().
304
305 If there is no data to read, this function returns a QByteArray of
306 size 0: it does not wait until there is something to read.
307
308 \sa readyReadStderr() readLineStderr() readStdout() writeToStdin()
309*/
310QByteArray QProcess::readStderr()
311{
312 if ( readStderrCalled ) {
313 return QByteArray();
314 }
315 readStderrCalled = TRUE;
316
317 QByteArray buf = bufStderr()->copy();
318 consumeBufStderr( -1 ); // consume everything
319
320 readStderrCalled = FALSE;
321 return buf;
322}
323
324/*!
325 Returns TRUE if it's possible to read an entire line of text from
326 standard output at this time; otherwise returns FALSE.
327
328 \sa readLineStdout() canReadLineStderr()
329*/
330bool QProcess::canReadLineStdout() const
331{
332 QProcess *that = (QProcess*)this;
333 return that->scanNewline( TRUE, 0 );
334}
335
336/*!
337 Returns TRUE if it's possible to read an entire line of text from
338 standard error at this time; otherwise returns FALSE.
339
340 \sa readLineStderr() canReadLineStdout()
341*/
342bool QProcess::canReadLineStderr() const
343{
344 QProcess *that = (QProcess*)this;
345 return that->scanNewline( FALSE, 0 );
346}
347
348/*!
349 Reads a line of text from standard output, excluding any trailing newline or
350 carriage return characters, and returns it. Returns QString::null if
351 canReadLineStdout() returns FALSE.
352
353 \sa canReadLineStdout() readyReadStdout() readStdout() readLineStderr()
354*/
355QString QProcess::readLineStdout()
356{
357 QByteArray a;
358 QString s;
359 if ( scanNewline( TRUE, &a ) ) {
360 if ( a.isEmpty() )
361 s = "";
362 else
363 s = QString( a );
364 }
365 return s;
366}
367
368/*!
369 Reads a line of text from standard error, excluding any trailing newline or
370 carriage return characters and returns it. Returns QString::null if
371 canReadLineStderr() returns FALSE.
372
373 \sa canReadLineStderr() readyReadStderr() readStderr() readLineStdout()
374*/
375QString QProcess::readLineStderr()
376{
377 QByteArray a;
378 QString s;
379 if ( scanNewline( FALSE, &a ) ) {
380 if ( a.isEmpty() )
381 s = "";
382 else
383 s = QString( a );
384 }
385 return s;
386}
387
388/*!
389 This private function scans for any occurrence of \n or \r\n in the
390 buffer \e buf. It stores the text in the byte array \a store if it is
391 non-null.
392*/
393bool QProcess::scanNewline( bool stdOut, QByteArray *store )
394{
395 QByteArray *buf;
396 if ( stdOut )
397 buf = bufStdout();
398 else
399 buf = bufStderr();
400 uint n = buf->size();
401 uint i;
402 for ( i=0; i<n; i++ ) {
403 if ( buf->at(i) == '\n' ) {
404 break;
405 }
406 }
407 if ( i >= n )
408 return FALSE;
409
410 if ( store ) {
411 uint lineLength = i;
412 if ( lineLength>0 && buf->at(lineLength-1) == '\r' )
413 lineLength--; // (if there are two \r, let one stay)
414 store->resize( lineLength );
415 memcpy( store->data(), buf->data(), lineLength );
416 if ( stdOut )
417 consumeBufStdout( i+1 );
418 else
419 consumeBufStderr( i+1 );
420 }
421 return TRUE;
422}
423
424/*!
425 \fn void QProcess::launchFinished()
426
427 This signal is emitted when the process was started with launch().
428 If the start was successful, this signal is emitted after all the
429 data has been written to standard input. If the start failed, then
430 this signal is emitted immediately.
431
432 \sa launch() QObject::deleteLater()
433*/
434
435/*!
436 Runs the process and writes the data \a buf to the process's standard input.
437 If all the data is written to standard input, standard input is
438 closed. The command is searched for in the path for executable programs;
439 you can also use an absolute path in the command itself.
440
441 If \a env is null, then the process is started with the same environment as
442 the starting process. If \a env is non-null, then the values in the
443 stringlist are interpreted as environment setttings of the form \c
444 {key=value} and the process is started with these environment settings. For
445 convenience, there is a small exception to this rule under Unix: if \a env
446 does not contain any settings for the environment variable \c
447 LD_LIBRARY_PATH, then this variable is inherited from the starting process.
448
449 Returns TRUE if the process could be started; otherwise returns FALSE.
450
451 Note that you should not use the slots writeToStdin() and closeStdin() on
452 processes started with launch(), since the result is not well-defined. If you
453 need these slots, use start() instead.
454
455 The process may or may not read the \a buf data sent to its standard
456 input.
457
458 You can call this function even when a process that was started with
459 this instance is still running. Be aware that if you do this the
460 standard input of the process that was launched first will be
461 closed, with any pending data being deleted, and the process will be
462 left to run out of your control. Similarly, if the process could not
463 be started the standard input will be closed and the pending data
464 deleted. (On operating systems that have zombie processes, Qt will
465 also wait() on the old process.)
466
467 The object emits the signal launchFinished() when this function
468 call is finished. If the start was successful, this signal is
469 emitted after all the data has been written to standard input. If
470 the start failed, then this signal is emitted immediately.
471
472 \sa start() launchFinished();
473*/
474bool QProcess::launch( const QByteArray& buf, QStringList *env )
475{
476 if ( start( env ) ) {
477 if ( !buf.isEmpty() ) {
478 connect( this, SIGNAL(wroteToStdin()),
479 this, SLOT(closeStdinLaunch()) );
480 writeToStdin( buf );
481 } else {
482 closeStdin();
483 emit launchFinished();
484 }
485 return TRUE;
486 } else {
487 emit launchFinished();
488 return FALSE;
489 }
490}
491
492/*! \overload
493
494 The data \a buf is written to standard input with writeToStdin()
495 using the QString::local8Bit() representation of the strings.
496*/
497bool QProcess::launch( const QString& buf, QStringList *env )
498{
499 if ( start( env ) ) {
500 if ( !buf.isEmpty() ) {
501 connect( this, SIGNAL(wroteToStdin()),
502 this, SLOT(closeStdinLaunch()) );
503 writeToStdin( buf );
504 } else {
505 closeStdin();
506 emit launchFinished();
507 }
508 return TRUE;
509 } else {
510 emit launchFinished();
511 return FALSE;
512 }
513}
514
515/*!
516 This private slot is used by the launch() functions to close standard input.
517*/
518void QProcess::closeStdinLaunch()
519{
520 disconnect( this, SIGNAL(wroteToStdin()),
521 this, SLOT(closeStdinLaunch()) );
522 closeStdin();
523 emit launchFinished();
524}
525
526
527/*!
528 \fn void QProcess::readyReadStdout()
529
530 This signal is emitted when the process has written data to standard output.
531 You can read the data with readStdout().
532
533 Note that this signal is only emitted when there is new data and not
534 when there is old, but unread data. In the slot connected to this signal, you
535 should always read everything that is available at that moment to make sure
536 that you don't lose any data.
537
538 \sa readStdout() readLineStdout() readyReadStderr()
539*/
540/*!
541 \fn void QProcess::readyReadStderr()
542
543 This signal is emitted when the process has written data to standard error.
544 You can read the data with readStderr().
545
546 Note that this signal is only emitted when there is new data and not
547 when there is old, but unread data. In the slot connected to this signal, you
548 should always read everything that is available at that moment to make sure
549 that you don't lose any data.
550
551 \sa readStderr() readLineStderr() readyReadStdout()
552*/
553/*!
554 \fn void QProcess::processExited()
555
556 This signal is emitted when the process has exited.
557
558 \sa isRunning() normalExit() exitStatus() start() launch()
559*/
560/*!
561 \fn void QProcess::wroteToStdin()
562
563 This signal is emitted if the data sent to standard input (via
564 writeToStdin()) was actually written to the process. This does not
565 imply that the process really read the data, since this class only detects
566 when it was able to write the data to the operating system. But it is now
567 safe to close standard input without losing pending data.
568
569 \sa writeToStdin() closeStdin()
570*/
571
572
573/*! \overload
574
575 The string \a buf is handled as text using
576 the QString::local8Bit() representation.
577*/
578void QProcess::writeToStdin( const QString& buf )
579{
580 QByteArray tmp = buf.local8Bit();
581 tmp.resize( buf.length() );
582 writeToStdin( tmp );
583}
584
585
586/*
587 * Under Windows the implementation is not so nice: it is not that easy to
588 * detect when one of the signals should be emitted; therefore there are some
589 * timers that query the information.
590 * To keep it a little efficient, use the timers only when they are needed.
591 * They are needed, if you are interested in the signals. So use
592 * connectNotify() and disconnectNotify() to keep track of your interest.
593 */
594/*! \reimp
595*/
596void QProcess::connectNotify( const char * signal )
597{
598#if defined(QT_QPROCESS_DEBUG)
599 qDebug( "QProcess::connectNotify(): signal %s has been connected", signal );
600#endif
601 if ( !ioRedirection )
602 if ( qstrcmp( signal, SIGNAL(readyReadStdout()) )==0 ||
603 qstrcmp( signal, SIGNAL(readyReadStderr()) )==0
604 ) {
605#if defined(QT_QPROCESS_DEBUG)
606 qDebug( "QProcess::connectNotify(): set ioRedirection to TRUE" );
607#endif
608 setIoRedirection( TRUE );
609 return;
610 }
611 if ( !notifyOnExit && qstrcmp( signal, SIGNAL(processExited()) )==0 ) {
612#if defined(QT_QPROCESS_DEBUG)
613 qDebug( "QProcess::connectNotify(): set notifyOnExit to TRUE" );
614#endif
615 setNotifyOnExit( TRUE );
616 return;
617 }
618 if ( !wroteToStdinConnected && qstrcmp( signal, SIGNAL(wroteToStdin()) )==0 ) {
619#if defined(QT_QPROCESS_DEBUG)
620 qDebug( "QProcess::connectNotify(): set wroteToStdinConnected to TRUE" );
621#endif
622 setWroteStdinConnected( TRUE );
623 return;
624 }
625}
626
627/*! \reimp
628*/
629void QProcess::disconnectNotify( const char * )
630{
631 if ( ioRedirection &&
632 receivers( SIGNAL(readyReadStdout()) ) ==0 &&
633 receivers( SIGNAL(readyReadStderr()) ) ==0
634 ) {
635#if defined(QT_QPROCESS_DEBUG)
636 qDebug( "QProcess::disconnectNotify(): set ioRedirection to FALSE" );
637#endif
638 setIoRedirection( FALSE );
639 }
640 if ( notifyOnExit && receivers( SIGNAL(processExited()) ) == 0 ) {
641#if defined(QT_QPROCESS_DEBUG)
642 qDebug( "QProcess::disconnectNotify(): set notifyOnExit to FALSE" );
643#endif
644 setNotifyOnExit( FALSE );
645 }
646 if ( wroteToStdinConnected && receivers( SIGNAL(wroteToStdin()) ) == 0 ) {
647#if defined(QT_QPROCESS_DEBUG)
648 qDebug( "QProcess::disconnectNotify(): set wroteToStdinConnected to FALSE" );
649#endif
650 setWroteStdinConnected( FALSE );
651 }
652}
653
654#endif // QT_NO_PROCESS
diff --git a/library/qprocess.h b/library/qprocess.h
new file mode 100644
index 0000000..306e659
--- a/dev/null
+++ b/library/qprocess.h
@@ -0,0 +1,174 @@
1/****************************************************************************
2** $Id$
3**
4** Implementation of QProcess class
5**
6** Created : 20000905
7**
8** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
9**
10** This file is part of the kernel module of the Qt GUI Toolkit.
11**
12** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file
14** LICENSE.QPL included in the packaging of this file.
15**
16** This file may be distributed and/or modified under the terms of the
17** GNU General Public License version 2 as published by the Free Software
18** Foundation and appearing in the file LICENSE.GPL included in the
19** packaging of this file.
20**
21** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
22** licenses may use this file in accordance with the Qt Commercial License
23** Agreement provided with the Software.
24**
25** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
26** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27**
28** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
29** information about Qt Commercial License Agreements.
30** See http://www.trolltech.com/qpl/ for QPL licensing information.
31** See http://www.trolltech.com/gpl/ for GPL licensing information.
32**
33** Contact info@trolltech.com if any conditions of this licensing are
34** not clear to you.
35**
36**********************************************************************/
37
38#ifndef QPROCESS_H
39#define QPROCESS_H
40
41#ifndef QT_H
42#include "qobject.h"
43#include "qstringlist.h"
44#include "qdir.h"
45#endif // QT_H
46
47#ifndef QT_NO_PROCESS
48
49class QProcessPrivate;
50
51
52class Q_EXPORT QProcess : public QObject
53{
54 Q_OBJECT
55public:
56 QProcess( QObject *parent=0, const char *name=0 );
57 QProcess( const QString& arg0, QObject *parent=0, const char *name=0 );
58 QProcess( const QStringList& args, QObject *parent=0, const char *name=0 );
59 ~QProcess();
60
61 // set and get the arguments and working directory
62 QStringList arguments() const;
63 void clearArguments();
64 virtual void setArguments( const QStringList& args );
65 virtual void addArgument( const QString& arg );
66#ifndef QT_NO_DIR
67 QDir workingDirectory() const;
68 virtual void setWorkingDirectory( const QDir& dir );
69#endif
70
71 // set and get the comms wanted
72 enum Communication { Stdin=0x01, Stdout=0x02, Stderr=0x04, DupStderr=0x08 };
73 void setCommunication( int c );
74 int communication() const;
75
76 // start the execution
77 virtual bool start( QStringList *env=0 );
78 virtual bool launch( const QString& buf, QStringList *env=0 );
79 virtual bool launch( const QByteArray& buf, QStringList *env=0 );
80
81 // inquire the status
82 bool isRunning() const;
83 bool normalExit() const;
84 int exitStatus() const;
85
86 // reading
87 virtual QByteArray readStdout();
88 virtual QByteArray readStderr();
89 bool canReadLineStdout() const;
90 bool canReadLineStderr() const;
91 virtual QString readLineStdout();
92 virtual QString readLineStderr();
93
94 // get platform dependent process information
95#if defined(Q_OS_WIN32)
96 typedef void* PID;
97#else
98 typedef long Q_LONG;
99 typedef Q_LONG PID;
100#endif
101 PID processIdentifier();
102
103 void flushStdin();
104
105signals:
106 void readyReadStdout();
107 void readyReadStderr();
108 void processExited();
109 void wroteToStdin();
110 void launchFinished();
111
112public slots:
113 // end the execution
114 void tryTerminate() const;
115 void kill() const;
116
117 // input
118 virtual void writeToStdin( const QByteArray& buf );
119 virtual void writeToStdin( const QString& buf );
120 virtual void closeStdin();
121
122protected: // ### or private?
123 void connectNotify( const char * signal );
124 void disconnectNotify( const char * signal );
125private:
126 void setIoRedirection( bool value );
127 void setNotifyOnExit( bool value );
128 void setWroteStdinConnected( bool value );
129
130 void init();
131 void reset();
132#if defined(Q_OS_WIN32)
133 uint readStddev( HANDLE dev, char *buf, uint bytes );
134#endif
135 bool scanNewline( bool stdOut, QByteArray *store );
136
137 QByteArray* bufStdout();
138 QByteArray* bufStderr();
139 void consumeBufStdout( int consume );
140 void consumeBufStderr( int consume );
141
142private slots:
143 void socketRead( int fd );
144 void socketWrite( int fd );
145 void timeout();
146 void closeStdinLaunch();
147
148private:
149 QProcessPrivate *d;
150#ifndef QT_NO_DIR
151 QDir workingDir;
152#endif
153 QStringList _arguments;
154
155 int exitStat; // exit status
156 bool exitNormal; // normal exit?
157 bool ioRedirection; // automatically set be (dis)connectNotify
158 bool notifyOnExit; // automatically set be (dis)connectNotify
159 bool wroteToStdinConnected; // automatically set be (dis)connectNotify
160
161 bool readStdoutCalled;
162 bool readStderrCalled;
163 int comms;
164
165 friend class QProcessPrivate;
166#if defined(Q_OS_UNIX) || defined(_OS_UNIX) || defined(UNIX)
167 friend class QProcessManager;
168 friend class QProc;
169#endif
170};
171
172#endif // QT_NO_PROCESS
173
174#endif // QPROCESS_H
diff --git a/library/qprocess_unix.cpp b/library/qprocess_unix.cpp
new file mode 100644
index 0000000..cb421c2
--- a/dev/null
+++ b/library/qprocess_unix.cpp
@@ -0,0 +1,1157 @@
1/****************************************************************************
2** $Id$
3**
4** Implementation of QProcess class for Unix
5**
6** Created : 20000905
7**
8** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
9**
10** This file is part of the kernel module of the Qt GUI Toolkit.
11**
12** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file
14** LICENSE.QPL included in the packaging of this file.
15**
16** This file may be distributed and/or modified under the terms of the
17** GNU General Public License version 2 as published by the Free Software
18** Foundation and appearing in the file LICENSE.GPL included in the
19** packaging of this file.
20**
21** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
22** licenses may use this file in accordance with the Qt Commercial License
23** Agreement provided with the Software.
24**
25** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
26** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27**
28** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
29** information about Qt Commercial License Agreements.
30** See http://www.trolltech.com/qpl/ for QPL licensing information.
31** See http://www.trolltech.com/gpl/ for GPL licensing information.
32**
33** Contact info@trolltech.com if any conditions of this licensing are
34** not clear to you.
35**
36**********************************************************************/
37
38//#include "qplatformdefs.h"
39
40// Solaris redefines connect -> __xnet_connect with _XOPEN_SOURCE_EXTENDED.
41#if defined(connect)
42#undef connect
43#endif
44
45#include "qprocess.h"
46
47#ifndef QT_NO_PROCESS
48
49#include "qapplication.h"
50#include "qqueue.h"
51#include "qlist.h"
52#include "qsocketnotifier.h"
53#include "qtimer.h"
54#include "qcleanuphandler_p.h"
55#include "qregexp.h"
56
57#include <stdlib.h>
58
59// ### FOR Qt 2.3 compat
60#include <unistd.h>
61#include <signal.h>
62#include <sys/socket.h>
63#include <sys/ioctl.h>
64#include <sys/wait.h>
65#include <sys/fcntl.h>
66
67#include <errno.h>
68
69#ifdef __MIPSEL__
70# ifndef SOCK_DGRAM
71# define SOCK_DGRAM 1
72# endif
73# ifndef SOCK_STREAM
74# define SOCK_STREAM 2
75# endif
76#endif
77
78//#define QT_QPROCESS_DEBUG
79
80
81#ifdef Q_C_CALLBACKS
82extern "C" {
83#endif // Q_C_CALLBACKS
84
85#define QT_SIGNAL_RETTYPE void
86#define QT_SIGNAL_ARGS int
87#define QT_SIGNAL_IGNORE SIG_IGN
88
89 QT_SIGNAL_RETTYPE qt_C_sigchldHnd(QT_SIGNAL_ARGS);
90
91#ifdef Q_C_CALLBACKS
92}
93#endif // Q_C_CALLBACKS
94
95
96class QProc;
97class QProcessManager;
98class QProcessPrivate
99{
100public:
101 QProcessPrivate();
102 ~QProcessPrivate();
103
104 void closeOpenSocketsForChild();
105 void newProc( pid_t pid, QProcess *process );
106
107 QByteArray bufStdout;
108 QByteArray bufStderr;
109
110 QQueue<QByteArray> stdinBuf;
111
112 QSocketNotifier *notifierStdin;
113 QSocketNotifier *notifierStdout;
114 QSocketNotifier *notifierStderr;
115
116 ssize_t stdinBufRead;
117 QProc *proc;
118
119 bool exitValuesCalculated;
120 bool socketReadCalled;
121
122 static QProcessManager *procManager;
123};
124
125
126/***********************************************************************
127 *
128 * QProc
129 *
130 **********************************************************************/
131/*
132 The class QProcess does not necessarily map exactly to the running
133 child processes: if the process is finished, the QProcess class may still be
134 there; furthermore a user can use QProcess to start more than one process.
135
136 The helper-class QProc has the semantics that one instance of this class maps
137 directly to a running child process.
138*/
139class QProc
140{
141public:
142 QProc( pid_t p, QProcess *proc=0 ) : pid(p), process(proc)
143 {
144#if defined(QT_QPROCESS_DEBUG)
145 qDebug( "QProc: Constructor for pid %d and QProcess %p", pid, process );
146#endif
147 socketStdin = 0;
148 socketStdout = 0;
149 socketStderr = 0;
150 }
151 ~QProc()
152 {
153#if defined(QT_QPROCESS_DEBUG)
154 qDebug( "QProc: Destructor for pid %d and QProcess %p", pid, process );
155#endif
156 if ( process != 0 ) {
157 if ( process->d->notifierStdin )
158 process->d->notifierStdin->setEnabled( FALSE );
159 if ( process->d->notifierStdout )
160 process->d->notifierStdout->setEnabled( FALSE );
161 if ( process->d->notifierStderr )
162 process->d->notifierStderr->setEnabled( FALSE );
163 process->d->proc = 0;
164 }
165 if( socketStdin != 0 )
166 ::close( socketStdin );
167 // ### close these sockets even on parent exit or is it better only on
168 // sigchld (but what do I have to do with them on exit then)?
169 if( socketStdout != 0 )
170 ::close( socketStdout );
171 if( socketStderr != 0 )
172 ::close( socketStderr );
173 }
174
175 pid_t pid;
176 int socketStdin;
177 int socketStdout;
178 int socketStderr;
179 QProcess *process;
180};
181
182/***********************************************************************
183 *
184 * QProcessManager
185 *
186 **********************************************************************/
187class QProcessManager : public QObject
188{
189 Q_OBJECT
190
191public:
192 QProcessManager();
193 ~QProcessManager();
194
195 void append( QProc *p );
196 void remove( QProc *p );
197
198 void cleanup();
199
200public slots:
201 void removeMe();
202 void sigchldHnd( int );
203
204public:
205 struct sigaction oldactChld;
206 struct sigaction oldactPipe;
207 QList<QProc> *procList;
208 int sigchldFd[2];
209};
210
211QCleanupHandler<QProcessManager> qprocess_cleanup_procmanager;
212
213QProcessManager::QProcessManager()
214{
215 procList = new QList<QProc>;
216 procList->setAutoDelete( TRUE );
217
218 // The SIGCHLD handler writes to a socket to tell the manager that
219 // something happened. This is done to get the processing in sync with the
220 // event reporting.
221 if ( ::socketpair( AF_UNIX, SOCK_STREAM, 0, sigchldFd ) ) {
222 sigchldFd[0] = 0;
223 sigchldFd[1] = 0;
224 } else {
225#if defined(QT_QPROCESS_DEBUG)
226 qDebug( "QProcessManager: install socket notifier (%d)", sigchldFd[1] );
227#endif
228 QSocketNotifier *sn = new QSocketNotifier( sigchldFd[1],
229 QSocketNotifier::Read, this );
230 connect( sn, SIGNAL(activated(int)),
231 this, SLOT(sigchldHnd(int)) );
232 sn->setEnabled( TRUE );
233 }
234
235 // install a SIGCHLD handler and ignore SIGPIPE
236 struct sigaction act;
237
238#if defined(QT_QPROCESS_DEBUG)
239 qDebug( "QProcessManager: install a SIGCHLD handler" );
240#endif
241 act.sa_handler = qt_C_sigchldHnd;
242 sigemptyset( &(act.sa_mask) );
243 sigaddset( &(act.sa_mask), SIGCHLD );
244 act.sa_flags = SA_NOCLDSTOP;
245#if defined(SA_RESTART)
246 act.sa_flags |= SA_RESTART;
247#endif
248 if ( sigaction( SIGCHLD, &act, &oldactChld ) != 0 )
249 qWarning( "Error installing SIGCHLD handler" );
250
251#if defined(QT_QPROCESS_DEBUG)
252 qDebug( "QProcessManager: install a SIGPIPE handler (SIG_IGN)" );
253#endif
254 act.sa_handler = QT_SIGNAL_IGNORE;
255 sigemptyset( &(act.sa_mask) );
256 sigaddset( &(act.sa_mask), SIGPIPE );
257 act.sa_flags = 0;
258 if ( sigaction( SIGPIPE, &act, &oldactPipe ) != 0 )
259 qWarning( "Error installing SIGPIPE handler" );
260}
261
262QProcessManager::~QProcessManager()
263{
264 delete procList;
265
266 if ( sigchldFd[0] != 0 )
267 ::close( sigchldFd[0] );
268 if ( sigchldFd[1] != 0 )
269 ::close( sigchldFd[1] );
270
271 // restore SIGCHLD handler
272#if defined(QT_QPROCESS_DEBUG)
273 qDebug( "QProcessManager: restore old sigchild handler" );
274#endif
275 if ( sigaction( SIGCHLD, &oldactChld, 0 ) != 0 )
276 qWarning( "Error restoring SIGCHLD handler" );
277
278#if defined(QT_QPROCESS_DEBUG)
279 qDebug( "QProcessManager: restore old sigpipe handler" );
280#endif
281 if ( sigaction( SIGPIPE, &oldactPipe, 0 ) != 0 )
282 qWarning( "Error restoring SIGPIPE handler" );
283}
284
285void QProcessManager::append( QProc *p )
286{
287 procList->append( p );
288#if defined(QT_QPROCESS_DEBUG)
289 qDebug( "QProcessManager: append process (procList.count(): %d)", procList->count() );
290#endif
291}
292
293void QProcessManager::remove( QProc *p )
294{
295 procList->remove( p );
296#if defined(QT_QPROCESS_DEBUG)
297 qDebug( "QProcessManager: remove process (procList.count(): %d)", procList->count() );
298#endif
299 cleanup();
300}
301
302void QProcessManager::cleanup()
303{
304 if ( procList->count() == 0 ) {
305 QTimer::singleShot( 0, this, SLOT(removeMe()) );
306 }
307}
308
309void QProcessManager::removeMe()
310{
311 if ( procList->count() == 0 ) {
312 qprocess_cleanup_procmanager.remove( &QProcessPrivate::procManager );
313 QProcessPrivate::procManager = 0;
314 delete this;
315 }
316}
317
318void QProcessManager::sigchldHnd( int fd )
319{
320 char tmp;
321 ::read( fd, &tmp, sizeof(tmp) );
322#if defined(QT_QPROCESS_DEBUG)
323 qDebug( "QProcessManager::sigchldHnd()" );
324#endif
325 QProc *proc;
326 QProcess *process;
327 bool removeProc;
328 proc = procList->first();
329 while ( proc != 0 ) {
330 removeProc = FALSE;
331 process = proc->process;
332 if ( process != 0 ) {
333 if ( !process->isRunning() ) {
334#if defined(QT_QPROCESS_DEBUG)
335 qDebug( "QProcessManager::sigchldHnd() (PID: %d): process exited (QProcess available)", proc->pid );
336#endif
337 // read pending data
338 int nbytes = 0;
339 if ( ::ioctl(proc->socketStdout, FIONREAD, (char*)&nbytes)==0 && nbytes>0 ) {
340#if defined(QT_QPROCESS_DEBUG)
341 qDebug( "QProcessManager::sigchldHnd() (PID: %d): reading %d bytes of pending data on stdout", proc->pid, nbytes );
342#endif
343 process->socketRead( proc->socketStdout );
344 }
345 nbytes = 0;
346 if ( ::ioctl(proc->socketStderr, FIONREAD, (char*)&nbytes)==0 && nbytes>0 ) {
347#if defined(QT_QPROCESS_DEBUG)
348 qDebug( "QProcessManager::sigchldHnd() (PID: %d): reading %d bytes of pending data on stderr", proc->pid, nbytes );
349#endif
350 process->socketRead( proc->socketStderr );
351 }
352
353 if ( process->notifyOnExit )
354 emit process->processExited();
355
356 removeProc = TRUE;
357 }
358 } else {
359 int status;
360 if ( ::waitpid( proc->pid, &status, WNOHANG ) == proc->pid ) {
361#if defined(QT_QPROCESS_DEBUG)
362 qDebug( "QProcessManager::sigchldHnd() (PID: %d): process exited (QProcess not available)", proc->pid );
363#endif
364 removeProc = TRUE;
365 }
366 }
367 if ( removeProc ) {
368 QProc *oldproc = proc;
369 proc = procList->next();
370 remove( oldproc );
371 } else {
372 proc = procList->next();
373 }
374 }
375}
376
377#include "qprocess_unix.moc"
378
379
380/***********************************************************************
381 *
382 * QProcessPrivate
383 *
384 **********************************************************************/
385QProcessManager *QProcessPrivate::procManager = 0;
386
387QProcessPrivate::QProcessPrivate()
388{
389#if defined(QT_QPROCESS_DEBUG)
390 qDebug( "QProcessPrivate: Constructor" );
391#endif
392 stdinBufRead = 0;
393
394 notifierStdin = 0;
395 notifierStdout = 0;
396 notifierStderr = 0;
397
398 exitValuesCalculated = FALSE;
399 socketReadCalled = FALSE;
400
401 proc = 0;
402}
403
404QProcessPrivate::~QProcessPrivate()
405{
406#if defined(QT_QPROCESS_DEBUG)
407 qDebug( "QProcessPrivate: Destructor" );
408#endif
409
410 if ( proc != 0 ) {
411 if ( proc->socketStdin != 0 ) {
412 ::close( proc->socketStdin );
413 proc->socketStdin = 0;
414 }
415 proc->process = 0;
416 }
417
418 while ( !stdinBuf.isEmpty() ) {
419 delete stdinBuf.dequeue();
420 }
421 delete notifierStdin;
422 delete notifierStdout;
423 delete notifierStderr;
424}
425
426/*
427 Closes all open sockets in the child process that are not needed by the child
428 process. Otherwise one child may have an open socket on standard input, etc.
429 of another child.
430*/
431void QProcessPrivate::closeOpenSocketsForChild()
432{
433 if ( procManager != 0 ) {
434 if ( procManager->sigchldFd[0] != 0 )
435 ::close( procManager->sigchldFd[0] );
436 if ( procManager->sigchldFd[1] != 0 )
437 ::close( procManager->sigchldFd[1] );
438
439 // close also the sockets from other QProcess instances
440 QProc *proc;
441 for ( proc=procManager->procList->first(); proc!=0; proc=procManager->procList->next() ) {
442 ::close( proc->socketStdin );
443 ::close( proc->socketStdout );
444 ::close( proc->socketStderr );
445 }
446 }
447}
448
449void QProcessPrivate::newProc( pid_t pid, QProcess *process )
450{
451 proc = new QProc( pid, process );
452 if ( procManager == 0 ) {
453 procManager = new QProcessManager;
454 qprocess_cleanup_procmanager.add( &procManager );
455 }
456 // the QProcessManager takes care of deleting the QProc instances
457 procManager->append( proc );
458}
459
460/***********************************************************************
461 *
462 * sigchld handler callback
463 *
464 **********************************************************************/
465QT_SIGNAL_RETTYPE qt_C_sigchldHnd( QT_SIGNAL_ARGS )
466{
467 if ( QProcessPrivate::procManager == 0 )
468 return;
469 if ( QProcessPrivate::procManager->sigchldFd[0] == 0 )
470 return;
471
472 char a = 1;
473 ::write( QProcessPrivate::procManager->sigchldFd[0], &a, sizeof(a) );
474}
475
476
477/***********************************************************************
478 *
479 * QProcess
480 *
481 **********************************************************************/
482/*!
483 This private class does basic initialization.
484*/
485void QProcess::init()
486{
487 d = new QProcessPrivate();
488 exitStat = 0;
489 exitNormal = FALSE;
490}
491
492/*!
493 This private class resets the process variables, etc. so that it can be used
494 for another process to start.
495*/
496void QProcess::reset()
497{
498 delete d;
499 d = new QProcessPrivate();
500 exitStat = 0;
501 exitNormal = FALSE;
502 d->bufStdout.resize( 0 );
503 d->bufStderr.resize( 0 );
504}
505
506QByteArray* QProcess::bufStdout()
507{
508 if ( d->proc && d->proc->socketStdout ) {
509 // ### can this cause a blocking behaviour (maybe do a ioctl() to see
510 // if data is available)?
511 socketRead( d->proc->socketStdout );
512 }
513 return &d->bufStdout;
514}
515
516QByteArray* QProcess::bufStderr()
517{
518 if ( d->proc && d->proc->socketStderr ) {
519 // ### can this cause a blocking behaviour (maybe do a ioctl() to see
520 // if data is available)?
521 socketRead( d->proc->socketStderr );
522 }
523 return &d->bufStderr;
524}
525
526void QProcess::consumeBufStdout( int consume )
527{
528 uint n = d->bufStdout.size();
529 if ( consume==-1 || (uint)consume >= n ) {
530 d->bufStdout.resize( 0 );
531 } else {
532 QByteArray tmp( n - consume );
533 memcpy( tmp.data(), d->bufStdout.data()+consume, n-consume );
534 d->bufStdout = tmp;
535 }
536}
537
538void QProcess::consumeBufStderr( int consume )
539{
540 uint n = d->bufStderr.size();
541 if ( consume==-1 || (uint)consume >= n ) {
542 d->bufStderr.resize( 0 );
543 } else {
544 QByteArray tmp( n - consume );
545 memcpy( tmp.data(), d->bufStderr.data()+consume, n-consume );
546 d->bufStderr = tmp;
547 }
548}
549
550/*!
551 Destroys the class.
552
553 If the process is running, it is NOT terminated! Standard input, standard
554 output and standard error of the process are closed.
555
556 You can connect the destroyed() signal to the kill() slot, if you want the
557 process to be terminated automatically when the class is destroyed.
558
559 \sa tryTerminate() kill()
560*/
561QProcess::~QProcess()
562{
563 delete d;
564}
565
566/*!
567 Tries to run a process for the command and arguments that were specified with
568 setArguments(), addArgument() or that were specified in the constructor. The
569 command is searched in the path for executable programs; you can also use an
570 absolute path to the command.
571
572 If \a env is null, then the process is started with the same environment as
573 the starting process. If \a env is non-null, then the values in the
574 stringlist are interpreted as environment setttings of the form \c
575 {key=value} and the process is started in these environment settings. For
576 convenience, there is a small exception to this rule: under Unix, if \a env
577 does not contain any settings for the environment variable \c
578 LD_LIBRARY_PATH, then this variable is inherited from the starting process;
579 under Windows the same applies for the enverionment varialbe \c PATH.
580
581 Returns TRUE if the process could be started, otherwise FALSE.
582
583 You can write data to standard input of the process with
584 writeToStdin(), you can close standard input with closeStdin() and you can
585 terminate the process tryTerminate() resp. kill().
586
587 You can call this function even when there already is a running
588 process in this object. In this case, QProcess closes standard input
589 of the old process and deletes pending data, i.e., you loose all
590 control over that process, but the process is not terminated. This applies
591 also if the process could not be started. (On operating systems that have
592 zombie processes, Qt will also wait() on the old process.)
593
594 \sa launch() closeStdin()
595*/
596bool QProcess::start( QStringList *env )
597{
598#if defined(QT_QPROCESS_DEBUG)
599 qDebug( "QProcess::start()" );
600#endif
601 reset();
602
603 int sStdin[2];
604 int sStdout[2];
605 int sStderr[2];
606
607 // open sockets for piping
608 if ( (comms & Stdin) && ::socketpair( AF_UNIX, SOCK_STREAM, 0, sStdin ) == -1 ) {
609 return FALSE;
610 }
611 if ( (comms & Stderr) && ::socketpair( AF_UNIX, SOCK_STREAM, 0, sStderr ) == -1 ) {
612 return FALSE;
613 }
614 if ( (comms & Stdout) && ::socketpair( AF_UNIX, SOCK_STREAM, 0, sStdout ) == -1 ) {
615 return FALSE;
616 }
617
618 // the following pipe is only used to determine if the process could be
619 // started
620 int fd[2];
621 if ( pipe( fd ) < 0 ) {
622 // non critical error, go on
623 fd[0] = 0;
624 fd[1] = 0;
625 }
626
627 // construct the arguments for exec
628 QCString *arglistQ = new QCString[ _arguments.count() + 1 ];
629 const char** arglist = new const char*[ _arguments.count() + 1 ];
630 int i = 0;
631 for ( QStringList::Iterator it = _arguments.begin(); it != _arguments.end(); ++it ) {
632 arglistQ[i] = (*it).local8Bit();
633 arglist[i] = arglistQ[i];
634#if defined(QT_QPROCESS_DEBUG)
635 qDebug( "QProcess::start(): arg %d = %s", i, arglist[i] );
636#endif
637 i++;
638 }
639 arglist[i] = 0;
640
641 // Must make sure signal handlers are installed before exec'ing
642 // in case the process exits quickly.
643 if ( d->procManager == 0 ) {
644 d->procManager = new QProcessManager;
645 qprocess_cleanup_procmanager.add( &d->procManager );
646 }
647
648 // fork and exec
649 QApplication::flushX();
650 pid_t pid = fork();
651 if ( pid == 0 ) {
652 // child
653 d->closeOpenSocketsForChild();
654 if ( comms & Stdin ) {
655 ::close( sStdin[1] );
656 ::dup2( sStdin[0], STDIN_FILENO );
657 }
658 if ( comms & Stdout ) {
659 ::close( sStdout[0] );
660 ::dup2( sStdout[1], STDOUT_FILENO );
661 }
662 if ( comms & Stderr ) {
663 ::close( sStderr[0] );
664 ::dup2( sStderr[1], STDERR_FILENO );
665 }
666 if ( comms & DupStderr ) {
667 ::dup2( STDOUT_FILENO, STDERR_FILENO );
668 }
669#ifndef QT_NO_DIR
670 ::chdir( workingDir.absPath().latin1() );
671#endif
672 if ( fd[0] )
673 ::close( fd[0] );
674 if ( fd[1] )
675 ::fcntl( fd[1], F_SETFD, FD_CLOEXEC ); // close on exec shows sucess
676
677 if ( env == 0 ) { // inherit environment and start process
678 ::execvp( arglist[0], (char*const*)arglist ); // ### cast not nice
679 } else { // start process with environment settins as specified in env
680 // construct the environment for exec
681 int numEntries = env->count();
682 bool setLibraryPath =
683 env->grep( QRegExp( "^LD_LIBRARY_PATH=" ) ).isEmpty() &&
684 getenv( "LD_LIBRARY_PATH" ) != 0;
685 if ( setLibraryPath )
686 numEntries++;
687 QCString *envlistQ = new QCString[ numEntries + 1 ];
688 const char** envlist = new const char*[ numEntries + 1 ];
689 int i = 0;
690 if ( setLibraryPath ) {
691 envlistQ[i] = QString( "LD_LIBRARY_PATH=%1" ).arg( getenv( "LD_LIBRARY_PATH" ) ).local8Bit();
692 envlist[i] = envlistQ[i];
693 i++;
694 }
695 for ( QStringList::Iterator it = env->begin(); it != env->end(); ++it ) {
696 envlistQ[i] = (*it).local8Bit();
697 envlist[i] = envlistQ[i];
698 i++;
699 }
700 envlist[i] = 0;
701
702 // look for the executable in the search path
703 if ( _arguments.count()>0 && getenv("PATH")!=0 ) {
704 QString command = _arguments[0];
705 if ( !command.contains( '/' ) ) {
706 QStringList pathList = QStringList::split( ':', getenv( "PATH" ) );
707 for (QStringList::Iterator it = pathList.begin(); it != pathList.end(); ++it ) {
708 QString dir = *it;
709#ifdef Q_OS_MACX
710 if(QFile::exists(dir + "/" + command + ".app")) //look in a bundle
711 dir += "/" + command + ".app/Contents/MacOS";
712#endif
713#ifndef QT_NO_DIR
714 QFileInfo fileInfo( dir, command );
715#else
716 QFileInfo fileInfo( dir + "/" + command );
717#endif
718 if ( fileInfo.isExecutable() ) {
719 arglistQ[0] = fileInfo.filePath().local8Bit();
720 arglist[0] = arglistQ[0];
721 break;
722 }
723 }
724 }
725 }
726 ::execve( arglist[0], (char*const*)arglist, (char*const*)envlist ); // ### casts not nice
727 }
728 if ( fd[1] ) {
729 char buf = 0;
730 ::write( fd[1], &buf, 1 );
731 ::close( fd[1] );
732 }
733 ::exit( -1 );
734 } else if ( pid == -1 ) {
735 // error forking
736 goto error;
737 }
738
739 // test if exec was successful
740 if ( fd[1] )
741 ::close( fd[1] );
742 if ( fd[0] ) {
743 char buf;
744 for ( ;; ) {
745 int n = ::read( fd[0], &buf, 1 );
746 if ( n==1 ) {
747 // socket was not closed => error
748 d->proc = 0;
749 goto error;
750 } else if ( n==-1 ) {
751 if ( errno==EAGAIN || errno==EINTR )
752 // try it again
753 continue;
754 }
755 break;
756 }
757 ::close( fd[0] );
758 }
759
760 d->newProc( pid, this );
761
762 if ( comms & Stdin ) {
763 ::close( sStdin[0] );
764 d->proc->socketStdin = sStdin[1];
765 d->notifierStdin = new QSocketNotifier( sStdin[1], QSocketNotifier::Write );
766 connect( d->notifierStdin, SIGNAL(activated(int)),
767 this, SLOT(socketWrite(int)) );
768 // setup notifiers for the sockets
769 if ( !d->stdinBuf.isEmpty() ) {
770 d->notifierStdin->setEnabled( TRUE );
771 }
772 }
773 if ( comms & Stdout ) {
774 ::close( sStdout[1] );
775 d->proc->socketStdout = sStdout[0];
776 d->notifierStdout = new QSocketNotifier( sStdout[0], QSocketNotifier::Read );
777 connect( d->notifierStdout, SIGNAL(activated(int)),
778 this, SLOT(socketRead(int)) );
779 if ( ioRedirection )
780 d->notifierStdout->setEnabled( TRUE );
781 }
782 if ( comms & Stderr ) {
783 ::close( sStderr[1] );
784 d->proc->socketStderr = sStderr[0];
785 d->notifierStderr = new QSocketNotifier( sStderr[0], QSocketNotifier::Read );
786 connect( d->notifierStderr, SIGNAL(activated(int)),
787 this, SLOT(socketRead(int)) );
788 if ( ioRedirection )
789 d->notifierStderr->setEnabled( TRUE );
790 }
791
792 // cleanup and return
793 delete[] arglistQ;
794 delete[] arglist;
795 return TRUE;
796
797error:
798#if defined(QT_QPROCESS_DEBUG)
799 qDebug( "QProcess::start(): error starting process" );
800#endif
801 if ( d->procManager )
802 d->procManager->cleanup();
803 if ( comms & Stdin ) {
804 ::close( sStdin[1] );
805 ::close( sStdin[0] );
806 }
807 if ( comms & Stdout ) {
808 ::close( sStdout[0] );
809 ::close( sStdout[1] );
810 }
811 if ( comms & Stderr ) {
812 ::close( sStderr[0] );
813 ::close( sStderr[1] );
814 }
815 ::close( fd[0] );
816 ::close( fd[1] );
817 delete[] arglistQ;
818 delete[] arglist;
819 return FALSE;
820}
821
822
823/*!
824 Asks the process to terminate. Processes can ignore this wish. If you want to
825 be sure that the process really terminates, you must use kill() instead.
826
827 The slot returns immediately: it does not wait until the process has
828 finished. When the process really exited, the signal processExited() is
829 emitted.
830
831 \sa kill() processExited()
832*/
833void QProcess::tryTerminate() const
834{
835 if ( d->proc != 0 )
836 ::kill( d->proc->pid, SIGTERM );
837}
838
839/*!
840 Terminates the process. This is not a safe way to end a process since the
841 process will not be able to do cleanup. tryTerminate() is a safer way to do
842 it, but processes might ignore a tryTerminate().
843
844 The nice way to end a process and to be sure that it is finished, is doing
845 something like this:
846 \code
847 process->tryTerminate();
848 QTimer::singleShot( 5000, process, SLOT( kill() ) );
849 \endcode
850
851 This tries to terminate the process the nice way. If the process is still
852 running after 5 seconds, it terminates the process the hard way. The timeout
853 should be chosen depending on the time the process needs to do all the
854 cleanup: use a higher value if the process is likely to do heavy computation
855 on cleanup.
856
857 The slot returns immediately: it does not wait until the process has
858 finished. When the process really exited, the signal processExited() is
859 emitted.
860
861 \sa tryTerminate() processExited()
862*/
863void QProcess::kill() const
864{
865 if ( d->proc != 0 )
866 ::kill( d->proc->pid, SIGKILL );
867}
868
869/*!
870 Returns TRUE if the process is running, otherwise FALSE.
871
872 \sa normalExit() exitStatus() processExited()
873*/
874bool QProcess::isRunning() const
875{
876 if ( d->exitValuesCalculated ) {
877#if defined(QT_QPROCESS_DEBUG)
878 qDebug( "QProcess::isRunning(): FALSE (already computed)" );
879#endif
880 return FALSE;
881 }
882 if ( d->proc == 0 )
883 return FALSE;
884 int status;
885 if ( ::waitpid( d->proc->pid, &status, WNOHANG ) == d->proc->pid )
886 {
887 // compute the exit values
888 QProcess *that = (QProcess*)this; // mutable
889 that->exitNormal = WIFEXITED( status ) != 0;
890 if ( exitNormal ) {
891 that->exitStat = (char)WEXITSTATUS( status );
892 }
893 d->exitValuesCalculated = TRUE;
894#if defined(QT_QPROCESS_DEBUG)
895 qDebug( "QProcess::isRunning() (PID: %d): FALSE", d->proc->pid );
896#endif
897 return FALSE;
898 }
899#if defined(QT_QPROCESS_DEBUG)
900 qDebug( "QProcess::isRunning() (PID: %d): TRUE", d->proc->pid );
901#endif
902 return TRUE;
903}
904
905/*!
906 Writes the data \a buf to the standard input of the process. The process may
907 or may not read this data.
908
909 This function returns immediately; the QProcess class might write the data at
910 a later point (you have to enter the event loop for that). When all the data
911 is written to the process, the signal wroteToStdin() is emitted. This does
912 not mean that the process really read the data, since this class only detects
913 when it was able to write the data to the operating system.
914
915 \sa wroteToStdin() closeStdin() readStdout() readStderr()
916*/
917void QProcess::writeToStdin( const QByteArray& buf )
918{
919#if defined(QT_QPROCESS_DEBUG)
920// qDebug( "QProcess::writeToStdin(): write to stdin (%d)", d->socketStdin );
921#endif
922 d->stdinBuf.enqueue( new QByteArray(buf) );
923 if ( d->notifierStdin != 0 )
924 d->notifierStdin->setEnabled( TRUE );
925}
926
927
928/*!
929 Closes standard input of the process.
930
931 This function also deletes pending data that is not written to standard input
932 yet.
933
934 \sa wroteToStdin()
935*/
936void QProcess::closeStdin()
937{
938 if ( d->proc == 0 )
939 return;
940 if ( d->proc->socketStdin !=0 ) {
941 while ( !d->stdinBuf.isEmpty() ) {
942 delete d->stdinBuf.dequeue();
943 }
944 delete d->notifierStdin;
945 d->notifierStdin = 0;
946 if ( ::close( d->proc->socketStdin ) != 0 ) {
947 qWarning( "Could not close stdin of child process" );
948 }
949#if defined(QT_QPROCESS_DEBUG)
950 qDebug( "QProcess::closeStdin(): stdin (%d) closed", d->proc->socketStdin );
951#endif
952 d->proc->socketStdin = 0;
953 }
954}
955
956
957/*
958 This private slot is called when the process has outputted data to either
959 standard output or standard error.
960*/
961void QProcess::socketRead( int fd )
962{
963 if ( d->socketReadCalled ) {
964 // the slots that are connected to the readyRead...() signals might
965 // trigger a recursive call of socketRead(). Avoid this since you get a
966 // blocking read otherwise.
967 return;
968 }
969#if defined(QT_QPROCESS_DEBUG)
970 qDebug( "QProcess::socketRead(): %d", fd );
971#endif
972 if ( fd == 0 )
973 return;
974 const int bufsize = 4096;
975 QByteArray *buffer = 0;
976 uint oldSize;
977 int n;
978 if ( fd == d->proc->socketStdout ) {
979 buffer = &d->bufStdout;
980 } else if ( fd == d->proc->socketStderr ) {
981 buffer = &d->bufStderr;
982 } else {
983 // this case should never happen, but just to be safe
984 return;
985 }
986
987 // read data
988 oldSize = buffer->size();
989 buffer->resize( oldSize + bufsize );
990 n = ::read( fd, buffer->data()+oldSize, bufsize );
991 if ( n > 0 )
992 buffer->resize( oldSize + n );
993 else
994 buffer->resize( oldSize );
995 // eof or error?
996 if ( n == 0 || n == -1 ) {
997 if ( fd == d->proc->socketStdout ) {
998#if defined(QT_QPROCESS_DEBUG)
999 qDebug( "QProcess::socketRead(): stdout (%d) closed", fd );
1000#endif
1001 d->notifierStdout->setEnabled( FALSE );
1002 delete d->notifierStdout;
1003 d->notifierStdout = 0;
1004 ::close( d->proc->socketStdout );
1005 d->proc->socketStdout = 0;
1006 return;
1007 } else if ( fd == d->proc->socketStderr ) {
1008#if defined(QT_QPROCESS_DEBUG)
1009 qDebug( "QProcess::socketRead(): stderr (%d) closed", fd );
1010#endif
1011 d->notifierStderr->setEnabled( FALSE );
1012 delete d->notifierStderr;
1013 d->notifierStderr = 0;
1014 ::close( d->proc->socketStderr );
1015 d->proc->socketStderr = 0;
1016 return;
1017 }
1018 }
1019 // read all data that is available
1020 while ( n == bufsize ) {
1021 oldSize = buffer->size();
1022 buffer->resize( oldSize + bufsize );
1023 n = ::read( fd, buffer->data()+oldSize, bufsize );
1024 if ( n > 0 )
1025 buffer->resize( oldSize + n );
1026 else
1027 buffer->resize( oldSize );
1028 }
1029
1030 d->socketReadCalled = TRUE;
1031 if ( fd == d->proc->socketStdout ) {
1032#if defined(QT_QPROCESS_DEBUG)
1033 qDebug( "QProcess::socketRead(): %d bytes read from stdout (%d)",
1034 buffer->size()-oldSize, fd );
1035#endif
1036 emit readyReadStdout();
1037 } else if ( fd == d->proc->socketStderr ) {
1038#if defined(QT_QPROCESS_DEBUG)
1039 qDebug( "QProcess::socketRead(): %d bytes read from stderr (%d)",
1040 buffer->size()-oldSize, fd );
1041#endif
1042 emit readyReadStderr();
1043 }
1044 d->socketReadCalled = FALSE;
1045}
1046
1047
1048/*
1049 This private slot is called when the process tries to read data from standard
1050 input.
1051*/
1052void QProcess::socketWrite( int fd )
1053{
1054 if ( fd != d->proc->socketStdin || d->proc->socketStdin == 0 )
1055 return;
1056 if ( d->stdinBuf.isEmpty() ) {
1057 d->notifierStdin->setEnabled( FALSE );
1058 return;
1059 }
1060#if defined(QT_QPROCESS_DEBUG)
1061 qDebug( "QProcess::socketWrite(): write to stdin (%d)", fd );
1062#endif
1063 ssize_t ret = ::write( fd,
1064 d->stdinBuf.head()->data() + d->stdinBufRead,
1065 d->stdinBuf.head()->size() - d->stdinBufRead );
1066 if ( ret > 0 )
1067 d->stdinBufRead += ret;
1068 if ( d->stdinBufRead == (ssize_t)d->stdinBuf.head()->size() ) {
1069 d->stdinBufRead = 0;
1070 delete d->stdinBuf.dequeue();
1071 if ( wroteToStdinConnected && d->stdinBuf.isEmpty() )
1072 emit wroteToStdin();
1073 socketWrite( fd );
1074 }
1075}
1076
1077/*!
1078 \internal
1079 Flushes standard input. This is useful if you want to use QProcess in a
1080 synchronous manner.
1081
1082 This function should probably go into the public API.
1083*/
1084void QProcess::flushStdin()
1085{
1086 socketWrite( d->proc->socketStdin );
1087}
1088
1089/*
1090 This private slot is only used under Windows (but moc does not know about #if
1091 defined()).
1092*/
1093void QProcess::timeout()
1094{
1095}
1096
1097
1098/*
1099 This private function is used by connectNotify() and disconnectNotify() to
1100 change the value of ioRedirection (and related behaviour)
1101*/
1102void QProcess::setIoRedirection( bool value )
1103{
1104 ioRedirection = value;
1105 if ( ioRedirection ) {
1106 if ( d->notifierStdout )
1107 d->notifierStdout->setEnabled( TRUE );
1108 if ( d->notifierStderr )
1109 d->notifierStderr->setEnabled( TRUE );
1110 } else {
1111 if ( d->notifierStdout )
1112 d->notifierStdout->setEnabled( FALSE );
1113 if ( d->notifierStderr )
1114 d->notifierStderr->setEnabled( FALSE );
1115 }
1116}
1117
1118/*
1119 This private function is used by connectNotify() and
1120 disconnectNotify() to change the value of notifyOnExit (and related
1121 behaviour)
1122*/
1123void QProcess::setNotifyOnExit( bool value )
1124{
1125 notifyOnExit = value;
1126}
1127
1128/*
1129 This private function is used by connectNotify() and disconnectNotify() to
1130 change the value of wroteToStdinConnected (and related behaviour)
1131*/
1132void QProcess::setWroteStdinConnected( bool value )
1133{
1134 wroteToStdinConnected = value;
1135}
1136
1137/*! \enum QProcess::PID
1138 \internal
1139*/
1140/*!
1141 Returns platform dependent information about the process. This can be used
1142 together with platform specific system calls.
1143
1144 Under Unix the return value is the PID of the process, or -1 if no process is
1145 belonging to this object.
1146
1147 Under Windows it is a pointer to the \c PROCESS_INFORMATION struct, or 0 if
1148 no process is belonging to this object.
1149*/
1150QProcess::PID QProcess::processIdentifier()
1151{
1152 if ( d->proc == 0 )
1153 return -1;
1154 return d->proc->pid;
1155}
1156
1157#endif // QT_NO_PROCESS
diff --git a/library/quickexec.cpp b/library/quickexec.cpp
new file mode 100644
index 0000000..f3b5089
--- a/dev/null
+++ b/library/quickexec.cpp
@@ -0,0 +1,41 @@
1#include <stdio.h>
2#include <sys/types.h>
3#include <sys/stat.h>
4#include <unistd.h>
5#include <fcntl.h>
6
7#define QUICKEXEC "/tmp/.quickexec"
8
9int quickexecv( const char *path, const char *argv[] )
10{
11 int fd = open( QUICKEXEC, O_WRONLY );
12 if ( fd == -1 ) {
13 perror( "quickexec pipe" );
14 return -1;
15 }
16 write( fd, path, strlen( path )+1 );
17 const char **s = argv;
18 while( *s ) {
19 write( fd, *s, strlen( *s )+1 );
20 ++s;
21 }
22 close(fd);
23 return 0;
24}
25
26int quickexec( const char *path, const char *, ...)
27{
28 int fd = open( QUICKEXEC, O_WRONLY );
29 if ( fd == -1 ) {
30 perror( "quickexec pipe" );
31 return -1;
32 }
33 const char** s = &path;
34 do {
35 write( fd, *s, strlen( *s )+1 );
36 } while ( *(++s) );
37
38 close( fd );
39
40 return 0;
41}
diff --git a/library/quickexec_p.h b/library/quickexec_p.h
new file mode 100644
index 0000000..79f58af
--- a/dev/null
+++ b/library/quickexec_p.h
@@ -0,0 +1,17 @@
1#ifndef QUICKEXEC_H
2#define QUICKEXEC_H
3
4#define HAVE_QUICKEXEC
5/*
6 A special version of execl that opens a shared library and executes the main() function in
7 the lib. Requires the quickexec daemon to run.
8
9 Note: You do not need to call fork() before calling quickexec, the function actually returns.
10
11 WARNING: path has to be a shared library, otherwise quickexec will hang
12*/
13
14extern int quickexecl( const char *path, const char *, ...);
15extern int quickexecv( const char *path, const char *argv[] );
16
17#endif
diff --git a/library/quuid.cpp b/library/quuid.cpp
new file mode 100644
index 0000000..fb4387c
--- a/dev/null
+++ b/library/quuid.cpp
@@ -0,0 +1,146 @@
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 "quuid.h"
22
23/*!
24 \class QUuid quuid.h
25 \brief The QUuid class defines a Universally Unique Identifier (UUID).
26
27 This class is temporarily copied from Qt 3.0.
28*/
29
30/*!
31 \fn QUuid::QUuid()
32
33 Creates the null UUID {00000000-0000-0000-0000-000000000000}.
34*/
35
36/*!
37 \fn QUuid::QUuid( uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8 )
38
39 Creates an UUID with the value specified by the parameters, \a l, \a
40 w1, \a w2, \a b1, \a b2, \a b3, \a b4, \a b5, \a b6, \a b7, \a b8.
41
42 Example:
43 \code
44 // {67C8770B-44F1-410A-AB9A-F9B5446F13EE}
45 QUuid IID_MyInterface( 0x67c8770b, 0x44f1, 0x410a, 0xab, 0x9a, 0xf9, 0xb5, 0x44, 0x6f, 0x13, 0xee )
46 \endcode
47*/
48
49/*!
50 \fn QUuid::QUuid( const QUuid &orig )
51
52 Creates a copy of the QUuid \a orig.
53*/
54#ifndef QT_NO_QUUID_STRING
55/*!
56 Creates a QUuid object from the string \a text. Right now, the function
57 can only convert the format {12345678-1234-1234-1234-123456789ABC} and
58 will create the null UUID when the conversion fails.
59*/
60QUuid::QUuid( const QString &text )
61{
62 bool ok;
63 QString temp = text.upper();
64
65 data1 = temp.mid( 1, 8 ).toULong( &ok, 16 );
66 if ( !ok ) {
67 *this = QUuid();
68 return;
69 }
70
71 data2 = temp.mid( 10, 4 ).toUInt( &ok, 16 );
72 if ( !ok ) {
73 *this = QUuid();
74 return;
75 }
76 data3 = temp.mid( 15, 4 ).toUInt( &ok, 16 );
77 if ( !ok ) {
78 *this = QUuid();
79 return;
80 }
81 data4[0] = temp.mid( 20, 2 ).toUInt( &ok, 16 );
82 if ( !ok ) {
83 *this = QUuid();
84 return;
85 }
86 data4[1] = temp.mid( 22, 2 ).toUInt( &ok, 16 );
87 if ( !ok ) {
88 *this = QUuid();
89 return;
90 }
91 for ( int i = 2; i<8; i++ ) {
92 data4[i] = temp.mid( 25 + (i-2)*2, 2 ).toUShort( &ok, 16 );
93 if ( !ok ) {
94 *this = QUuid();
95 return;
96 }
97 }
98}
99#endif
100/*!
101 \fn QUuid QUuid::operator=(const QUuid &uuid )
102
103 Assigns the value of \a uuid to this QUuid object.
104*/
105
106/*!
107 \fn bool QUuid::operator==(const QUuid &other) const
108
109 Returns TRUE if this QUuid and the \a other QUuid are identical, otherwise returns FALSE.
110*/
111
112/*!
113 \fn bool QUuid::operator!=(const QUuid &other) const
114
115 Returns TRUE if this QUuid and the \a other QUuid are different, otherwise returns FALSE.
116*/
117#ifndef QT_NO_QUUID_STRING
118/*!
119 QString QUuid::toString() const
120
121 Returns a string in {12345678-1234-1234-1234-123456789ABC} format.
122*/
123QString QUuid::toString() const
124{
125 QString result;
126
127 result = "{" + QString::number( data1, 16 ).rightJustify( 8, '0' ) + "-";
128 result += QString::number( (int)data2, 16 ).rightJustify( 4, '0' ) + "-";
129 result += QString::number( (int)data3, 16 ).rightJustify( 4, '0' ) + "-";
130 result += QString::number( (int)data4[0], 16 ).rightJustify( 2, '0' );
131 result += QString::number( (int)data4[1], 16 ).rightJustify( 2, '0' ) + "-";
132 for ( int i = 2; i < 8; i++ )
133 result += QString::number( (int)data4[i], 16 ).rightJustify( 2, '0' );
134
135 return result + "}";
136}
137#endif
138/*!
139 Returns TRUE if this is the null UUID {00000000-0000-0000-0000-000000000000}, otherwise returns FALSE.
140*/
141bool QUuid::isNull() const
142{
143 return data4[0] == 0 && data4[1] == 0 && data4[2] == 0 && data4[3] == 0 &&
144 data4[4] == 0 && data4[5] == 0 && data4[6] == 0 && data4[7] == 0 &&
145 data1 == 0 && data2 == 0 && data3 == 0;
146}
diff --git a/library/quuid.h b/library/quuid.h
new file mode 100644
index 0000000..4f7a720
--- a/dev/null
+++ b/library/quuid.h
@@ -0,0 +1,142 @@
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 QUUID_H
22#define QUUID_H
23
24#ifndef QT_H
25#include <qstring.h>
26#endif // QT_H
27
28#include <memory.h>
29
30#if defined(Q_OS_WIN32)
31#ifndef GUID_DEFINED
32#define GUID_DEFINED
33typedef struct _GUID
34{
35 ulong Data1;
36 ushort Data2;
37 ushort Data3;
38 uchar Data4[ 8 ];
39} GUID;
40#endif
41#endif
42
43#if defined( Q_WS_QWS ) && !defined( UUID_H_INCLUDED )
44typedef unsigned char uuid_t[16];
45#endif
46
47struct Q_EXPORT QUuid
48{
49 QUuid()
50 {
51 memset( this, 0, sizeof(QUuid) );
52 }
53 QUuid( uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8 )
54 {
55 data1 = l;
56 data2 = w1;
57 data3 = w2;
58 data4[0] = b1;
59 data4[1] = b2;
60 data4[2] = b3;
61 data4[3] = b4;
62 data4[4] = b5;
63 data4[5] = b6;
64 data4[6] = b7;
65 data4[7] = b8;
66 }
67 QUuid( const QUuid &uuid )
68 {
69 memcpy( this, &uuid, sizeof(QUuid) );
70 }
71#ifndef QT_NO_QUUID_STRING
72 QUuid( const QString & );
73 QString toString() const;
74#endif
75 bool isNull() const;
76
77 QUuid &operator=(const QUuid &orig )
78 {
79 memcpy( this, &orig, sizeof(QUuid) );
80 return *this;
81 }
82
83 bool operator==(const QUuid &orig ) const
84 {
85 return !memcmp( this, &orig, sizeof(QUuid) );
86 }
87
88 bool operator!=(const QUuid &orig ) const
89 {
90 return !( *this == orig );
91 }
92
93#if defined(Q_OS_WIN32)
94 // 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.
96 QUuid( const GUID &guid )
97 {
98 memcpy( this, &guid, sizeof(GUID) );
99 }
100
101 QUuid &operator=(const GUID &orig )
102 {
103 memcpy( this, &orig, sizeof(QUuid) );
104 return *this;
105 }
106
107 operator GUID() const
108 {
109 GUID guid = { data1, data2, data3, { data4[0], data4[1], data4[2], data4[3], data4[4], data4[5], data4[6], data4[7] } };
110 return guid;
111 }
112
113 bool operator==( const GUID &guid ) const
114 {
115 return !memcmp( this, &guid, sizeof(QUuid) );
116 }
117
118 bool operator!=( const GUID &guid ) const
119 {
120 return !( *this == guid );
121 }
122#endif
123#if defined (Q_WS_QWS)
124 QUuid( uuid_t uuid )
125 {
126 memcpy( this, &uuid, sizeof(uuid_t) );
127 }
128
129 QUuid &operator=(const uuid_t &orig )
130 {
131 memcpy( this, &orig, sizeof(uuid_t) );
132 return *this;
133 }
134#endif
135
136 ulong data1;
137 ushort data2;
138 ushort data3;
139 uchar data4[ 8 ];
140};
141
142#endif //QUUID_H
diff --git a/library/resource.cpp b/library/resource.cpp
new file mode 100644
index 0000000..dc19880
--- a/dev/null
+++ b/library/resource.cpp
@@ -0,0 +1,136 @@
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 "qpeapplication.h"
22#include "resource.h"
23#include <qdir.h>
24#include <qfile.h>
25#include <qregexp.h>
26#include <qpixmapcache.h>
27#include <qpainter.h>
28
29#include "inlinepics_p.h"
30
31/*!
32 \class Resource resource.h
33 \brief The Resource class provides access to named resources.
34
35 The resources may be provided from files or other sources.
36*/
37
38/*!
39 \fn Resource::Resource()
40 \internal
41*/
42
43/*!
44 Returns the QPixmap named \a pix. You should avoid including
45 any filename type extension (eg. .png, .xpm).
46*/
47QPixmap Resource::loadPixmap( const QString &pix )
48{
49 QPixmap pm;
50 QString key="QPE_"+pix;
51 if ( !QPixmapCache::find(key,pm) ) {
52 pm.convertFromImage(loadImage(pix));
53 QPixmapCache::insert(key,pm);
54 }
55 return pm;
56}
57
58/*!
59 Returns the QBitmap named \a pix. You should avoid including
60 any filename type extension (eg. .png, .xpm).
61*/
62QBitmap Resource::loadBitmap( const QString &pix )
63{
64 QBitmap bm;
65 bm = loadPixmap(pix);
66 return bm;
67}
68
69/*!
70 Returns the filename of a pixmap named \a pix. You should avoid including
71 any filename type extension (eg. .png, .xpm).
72
73 Normally you will use loadPixmap() rather than this function.
74*/
75QString Resource::findPixmap( const QString &pix )
76{
77 QString picsPath = QPEApplication::qpeDir() + "pics/";
78
79 if ( QFile( picsPath + pix + ".png").exists() )
80 return picsPath + pix + ".png";
81 else if ( QFile( picsPath + pix + ".xpm").exists() )
82 return picsPath + pix + ".xpm";
83 else if ( QFile( picsPath + pix ).exists() )
84 return picsPath + pix;
85
86 //qDebug("Cannot find pixmap: %s", pix.latin1());
87 return QString();
88}
89
90/*!
91 Returns a sound file for a sound named \a name.
92 You should avoid including any filename type extension (eg. .wav, .au, .mp3).
93*/
94QString Resource::findSound( const QString &name )
95{
96 QString picsPath = QPEApplication::qpeDir() + "sounds/";
97
98 QString result;
99 if ( QFile( (result = picsPath + name + ".wav") ).exists() )
100 return result;
101
102 return QString();
103}
104
105/*!
106 Returns a list of all sound names.
107*/
108QStringList Resource::allSounds()
109{
110 QDir resourcedir( QPEApplication::qpeDir() + "sounds/", "*.wav" );
111 QStringList entries = resourcedir.entryList();
112 QStringList result;
113 for (QStringList::Iterator i=entries.begin(); i != entries.end(); ++i)
114 result.append((*i).replace(QRegExp("\\.wav"),""));
115 return result;
116}
117
118/*!
119 Returns the QImage named \a name. You should avoid including
120 any filename type extension (eg. .png, .xpm).
121*/
122QImage Resource::loadImage( const QString &name)
123{
124 QImage img = qembed_findImage(name.latin1());
125 if ( img.isNull() )
126 return QImage(findPixmap(name));
127 return img;
128}
129
130/*!
131 \fn QIconSet Resource::loadIconSet( const QString &name )
132
133 Returns a QIconSet for the pixmap named \a name. A disabled icon is
134 generated that conforms to the Qtopia look & feel. You should avoid
135 including any filename type extension (eg. .png, .xpm).
136*/
diff --git a/library/resource.h b/library/resource.h
new file mode 100644
index 0000000..982c58a
--- a/dev/null
+++ b/library/resource.h
@@ -0,0 +1,80 @@
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#ifndef PIXMAPLOADER_H
21#define PIXMAPLOADER_H
22
23#include <qimage.h>
24#include <qbitmap.h>
25#include <qiconset.h>
26#include <qstringlist.h>
27
28class Resource
29{
30public:
31 Resource() {}
32
33 static QImage loadImage( const QString &name);
34
35 static QPixmap loadPixmap( const QString &name );
36 static QBitmap loadBitmap( const QString &name );
37 static QString findPixmap( const QString &name );
38
39 static QIconSet loadIconSet( const QString &name );
40
41 static QString findSound( const QString &name );
42 static QStringList allSounds();
43};
44
45// Inline for compatibility with SHARP ROMs
46inline QIconSet Resource::loadIconSet( const QString &pix )
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" );
55
56 #ifndef QT_NO_DEPTH_32// have alpha-blended pixmaps
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() )
74 is.setPixmap( dpm, size, QIconSet::Disabled );
75
76 return is;
77}
78
79
80#endif
diff --git a/library/sound.cpp b/library/sound.cpp
new file mode 100644
index 0000000..373fd4c
--- a/dev/null
+++ b/library/sound.cpp
@@ -0,0 +1,173 @@
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 <qpe/resource.h>
22#include <qpe/sound.h>
23#include <qpe/qcopenvelope_qws.h>
24
25#include <qsound.h>
26#include <qfile.h>
27
28#ifndef QT_NO_SOUND
29static int WAVsoundDuration(const QString& filename)
30{
31 // bad solution
32
33 // most of this is copied from qsoundqss.cpp
34
35 QFile input(filename);
36 if ( !input.open(IO_ReadOnly) )
37 return 0;
38
39 struct QRiffChunk {
40 char id[4];
41 Q_UINT32 size;
42 char data[4/*size*/];
43 } chunk;
44
45 struct {
46 Q_INT16 formatTag;
47 Q_INT16 channels;
48 Q_INT32 samplesPerSec;
49 Q_INT32 avgBytesPerSec;
50 Q_INT16 blockAlign;
51 Q_INT16 wBitsPerSample;
52 } chunkdata;
53
54 int total = 0;
55
56 while(1) {
57 // Keep reading chunks...
58 const int n = sizeof(chunk)-sizeof(chunk.data);
59 if ( input.readBlock((char*)&chunk,n) != n )
60 break;
61 if ( qstrncmp(chunk.id,"data",4) == 0 ) {
62 total += chunkdata.avgBytesPerSec ?
63 chunk.size * 1000 / chunkdata.avgBytesPerSec : 0;
64//qDebug("%d bytes of PCM (%dms)", chunk.size,chunkdata.avgBytesPerSec ? chunk.size * 1000 / chunkdata.avgBytesPerSec : 0);
65 input.at(input.at()+chunk.size-4);
66 } else if ( qstrncmp(chunk.id,"RIFF",4) == 0 ) {
67 char d[4];
68 if ( input.readBlock(d,4) != 4 )
69 return 0;
70 if ( qstrncmp(d,"WAVE",4) != 0 ) {
71 // skip
72//qDebug("skip %.4s RIFF chunk",d);
73 if ( chunk.size < 10000000 )
74 (void)input.at(input.at()+chunk.size-4);
75 }
76 } else if ( qstrncmp(chunk.id,"fmt ",4) == 0 ) {
77 if ( input.readBlock((char*)&chunkdata,sizeof(chunkdata)) != sizeof(chunkdata) )
78 return 0;
79#define WAVE_FORMAT_PCM 1
80 if ( chunkdata.formatTag != WAVE_FORMAT_PCM ) {
81 //qDebug("WAV file: UNSUPPORTED FORMAT %d",chunkdata.formatTag);
82 return 0;
83 }
84 } else {
85//qDebug("skip %.4s chunk",chunk.id);
86 // ignored chunk
87 if ( chunk.size < 10000000 )
88 (void)input.at(input.at()+chunk.size);
89 }
90 }
91
92//qDebug("%dms",total);
93 return total;
94}
95
96class SoundData : public QSound {
97public:
98 SoundData(const QString& name) :
99 QSound(Resource::findSound(name)),
100 filename(Resource::findSound(name))
101 {
102 }
103
104 void playLoop()
105 {
106 // needs server support
107
108 int ms = WAVsoundDuration(filename);
109 if ( ms )
110 startTimer(ms > 50 ? ms-50 : 0); // 50 for latency
111 play();
112 }
113
114 void timerEvent(QTimerEvent*)
115 {
116 play();
117 }
118
119private:
120 QString filename;
121};
122#endif
123
124Sound::Sound(const QString& name)
125{
126#ifndef QT_NO_SOUND
127 d = new SoundData(name);
128#endif
129}
130
131Sound::~Sound()
132{
133#ifndef QT_NO_SOUND
134 delete d;
135#endif
136}
137
138void Sound::play()
139{
140#ifndef QT_NO_SOUND
141 d->killTimers();
142 d->play();
143#endif
144}
145
146void Sound::playLoop()
147{
148#ifndef QT_NO_SOUND
149 d->killTimers();
150 d->playLoop();
151#endif
152}
153
154void Sound::stop()
155{
156#ifndef QT_NO_SOUND
157 d->killTimers();
158#endif
159}
160
161
162void Sound::soundAlarm()
163{
164#ifdef QT_QWS_CUSTOM
165# ifndef QT_NO_COP
166 QCopEnvelope( "QPE/TaskBar", "soundAlarm()" );
167# endif
168#else
169# ifndef QT_NO_SOUND
170 QSound::play(Resource::findSound("alarm"));
171# endif
172#endif
173}
diff --git a/library/sound.h b/library/sound.h
new file mode 100644
index 0000000..98fae34
--- a/dev/null
+++ b/library/sound.h
@@ -0,0 +1,43 @@
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#ifndef SOUND_H
21#define SOUND_H
22
23class QString;
24class SoundData;
25
26class Sound {
27public:
28 Sound(const QString& name);
29 ~Sound();
30
31 void play();
32 void playLoop();
33 void stop();
34
35 static void soundAlarm();
36 //static void soundClick();
37 //static void soundTap();
38
39private:
40 SoundData* d;
41};
42
43#endif
diff --git a/library/storage.cpp b/library/storage.cpp
new file mode 100644
index 0000000..bd34a5f
--- a/dev/null
+++ b/library/storage.cpp
@@ -0,0 +1,188 @@
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 <qpe/storage.h>
22#ifdef QT_QWS_CUSTOM
23#include <qpe/custom.h>
24#endif
25
26#include <qtimer.h>
27#include <qcopchannel_qws.h>
28
29#include <stdio.h>
30
31#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
32#include <sys/vfs.h>
33#include <mntent.h>
34#endif
35
36#include <qstringlist.h>
37
38static bool isCF(const QString& m)
39{
40 FILE* f = fopen("/var/run/stab", "r");
41 if (!f) f = fopen("/var/state/pcmcia/stab", "r");
42 if (!f) f = fopen("/var/lib/pcmcia/stab", "r");
43 if ( f ) {
44 char line[1024];
45 char devtype[80];
46 char devname[80];
47 while ( fgets( line, 1024, f ) ) {
48 // 0 ide ide-cs 0 hda 3 0
49 if ( sscanf(line,"%*d %s %*s %*s %s", devtype, devname )==2 )
50 {
51 if ( QString(devtype) == "ide" && m.find(devname)>0 ) {
52 fclose(f);
53 return TRUE;
54 }
55 }
56 }
57 fclose(f);
58 }
59 return FALSE;
60}
61
62StorageInfo::StorageInfo( QObject *parent )
63 : QObject( parent )
64{
65 mFileSystems.setAutoDelete( TRUE );
66 channel = new QCopChannel( "QPE/Card", this );
67 connect( channel, SIGNAL(received(const QCString &, const QByteArray &)),
68 this, SLOT(cardMessage( const QCString &, const QByteArray &)) );
69 update();
70}
71
72const FileSystem *StorageInfo::fileSystemOf( const QString &filename )
73{
74 for (QListIterator<FileSystem> i(mFileSystems); i.current(); ++i) {
75 if ( filename.startsWith( (*i)->path() ) )
76 return (*i);
77 }
78 return 0;
79}
80
81
82void StorageInfo::cardMessage( const QCString& msg, const QByteArray& )
83{
84 if ( msg == "mtabChanged()" )
85 update();
86}
87
88void StorageInfo::update()
89{
90 //qDebug("StorageInfo::updating");
91#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
92 struct mntent *me;
93 FILE *mntfp = setmntent( "/etc/mtab", "r" );
94
95 QStringList curdisks;
96 QStringList curopts;
97 QStringList curfs;
98 bool rebuild = FALSE;
99 int n=0;
100 if ( mntfp ) {
101 while ( (me = getmntent( mntfp )) != 0 ) {
102 QString fs = me->mnt_fsname;
103 if ( fs.left(7)=="/dev/hd" || fs.left(7)=="/dev/sd"
104 || fs.left(8)=="/dev/mtd" || fs.left(9) == "/dev/mmcd" )
105 {
106 n++;
107 curdisks.append(fs);
108 curopts.append( me->mnt_opts );
109 //qDebug("-->fs %s opts %s", fs.latin1(), me->mnt_opts );
110 curfs.append( me->mnt_dir );
111 bool found = FALSE;
112 for (QListIterator<FileSystem> i(mFileSystems); i.current(); ++i) {
113 if ( (*i)->disk() == fs ) {
114 found = TRUE;
115 break;
116 }
117 }
118 if ( !found )
119 rebuild = TRUE;
120 }
121 }
122 endmntent( mntfp );
123 }
124 if ( rebuild || n != (int)mFileSystems.count() ) {
125 mFileSystems.clear();
126 QStringList::ConstIterator it=curdisks.begin();
127 QStringList::ConstIterator fsit=curfs.begin();
128 QStringList::ConstIterator optsIt=curopts.begin();
129 for (; it!=curdisks.end(); ++it, ++fsit, ++optsIt) {
130 QString opts = *optsIt;
131
132 QString disk = *it;
133 QString humanname;
134 bool removable = FALSE;
135 if ( isCF(disk) ) {
136 humanname = tr("CF Card");
137 removable = TRUE;
138 } else if ( disk == "/dev/hda1" ) {
139 humanname = tr("Hard Disk");
140 } else if ( disk.left(9) == "/dev/mmcd" ) {
141 humanname = tr("SD Card");
142 removable = TRUE;
143 } else if ( disk.left(7) == "/dev/hd" )
144 humanname = tr("Hard Disk") + " " + humanname.mid(7);
145 else if ( disk.left(7) == "/dev/sd" )
146 humanname = tr("SCSI Hard Disk") + " " + humanname.mid(7);
147 else if ( disk == "/dev/mtdblock1" || humanname == "/dev/mtdblock/1" )
148 humanname = tr("Internal Storage");
149 else if ( disk.left(14) == "/dev/mtdblock/" )
150 humanname = tr("Internal Storage") + " " + humanname.mid(14);
151 else if ( disk.left(13) == "/dev/mtdblock" )
152 humanname = tr("Internal Storage") + " " + humanname.mid(13);
153 FileSystem *fs = new FileSystem( disk, *fsit, humanname, removable, opts );
154 mFileSystems.append( fs );
155 }
156 emit disksChanged();
157 } else {
158 // just update them
159 for (QListIterator<FileSystem> i(mFileSystems); i.current(); ++i)
160 i.current()->update();
161 }
162#endif
163}
164
165//---------------------------------------------------------------------------
166
167FileSystem::FileSystem( const QString &disk, const QString &path, const QString &name, bool rem, const QString &o )
168 : fsdisk( disk ), fspath( path ), humanname( name ), blkSize(512), totalBlks(0), availBlks(0), removable( rem ), opts( o )
169{
170 update();
171}
172
173void FileSystem::update()
174{
175#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
176 struct statfs fs;
177 if ( !statfs( fspath.latin1(), &fs ) ) {
178 blkSize = fs.f_bsize;
179 totalBlks = fs.f_blocks;
180 availBlks = fs.f_bavail;
181 } else {
182 blkSize = 0;
183 totalBlks = 0;
184 availBlks = 0;
185 }
186#endif
187}
188
diff --git a/library/storage.h b/library/storage.h
new file mode 100644
index 0000000..66a9f9d
--- a/dev/null
+++ b/library/storage.h
@@ -0,0 +1,80 @@
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#ifndef __storage_h__
21#define __storage_h__
22
23#include <qobject.h>
24#include <qlist.h>
25
26class FileSystem;
27class QCopChannel;
28
29class StorageInfo : public QObject
30{
31 Q_OBJECT
32public:
33 StorageInfo( QObject *parent=0 );
34
35 const QList<FileSystem> &fileSystems() const { return mFileSystems; }
36 const FileSystem *fileSystemOf( const QString &filename );
37
38signals:
39 void disksChanged();
40
41public slots:
42 void update();
43
44private slots:
45 void cardMessage( const QCString& msg, const QByteArray& data );
46private:
47 QList<FileSystem> mFileSystems;
48 QCopChannel *channel;
49};
50
51class FileSystem
52{
53public:
54 const QString &disk() const { return fsdisk; }
55 const QString &path() const { return fspath; }
56 const QString &name() const { return humanname; }
57 const QString &options() const { return opts; }
58 long blockSize() const { return blkSize; }
59 long totalBlocks() const { return totalBlks; }
60 long availBlocks() const { return availBlks; }
61 bool isRemovable() const { return removable; }
62 bool isWritable() const { return opts.contains("rw"); }
63
64private:
65 friend class StorageInfo;
66 FileSystem( const QString &disk, const QString &path, const QString &humanname, bool rem, const QString &opts );
67 void update();
68
69 QString fsdisk;
70 QString fspath;
71 QString humanname;
72 long blkSize;
73 long totalBlks;
74 long availBlks;
75 bool removable;
76 QString opts;
77};
78
79
80#endif
diff --git a/library/task-qpe.control b/library/task-qpe.control
new file mode 100644
index 0000000..57092f9
--- a/dev/null
+++ b/library/task-qpe.control
@@ -0,0 +1,10 @@
1Files:
2Priority: required
3Section: qpe/system
4Maintainer: Warwick Allison <warwick@trolltech.com>
5Architecture: arm
6Version: $QPE_VERSION-3
7Depends: qpe-qipkg qpe-base
8Description: Bootstrap Qtopia environment
9 A complete GUI environment for handhelds.
10 You will probably want to install one of the qpe-i18n-* packages.
diff --git a/library/taskbarappletinterface.h b/library/taskbarappletinterface.h
new file mode 100644
index 0000000..7e20329
--- a/dev/null
+++ b/library/taskbarappletinterface.h
@@ -0,0 +1,41 @@
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 TASKBARAPPLETINTERFACE_H
22#define TASKBARAPPLETINTERFACE_H
23
24#include <qpe/qcom.h>
25
26#ifndef QT_NO_COMPONENT
27// {6CA34D0B-C637-4865-A667-7D4CD8A70407}
28# ifndef IID_TaskbarApplet
29# define IID_TaskbarApplet QUuid( 0x6ca34d0b, 0xc637, 0x4865, 0xa6, 0x67, 0x7d, 0x4c, 0xd8, 0xa7, 0x04, 0x07)
30# endif
31#endif
32
33class QWidget;
34
35struct TaskbarAppletInterface : public QUnknownInterface
36{
37 virtual QWidget *applet( QWidget *parent ) = 0;
38 virtual int position() const = 0;
39};
40
41#endif
diff --git a/library/timestring.cpp b/library/timestring.cpp
new file mode 100644
index 0000000..d5d78ae
--- a/dev/null
+++ b/library/timestring.cpp
@@ -0,0 +1,360 @@
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 "timestring.h"
22#include <qobject.h>
23#include "qpeapplication.h" //for qApp
24#include "config.h"
25
26
27class TimeStringFormatKeeper : public QObject
28{
29 Q_OBJECT
30public:
31 static DateFormat currentFormat()
32 {
33 if ( !self )
34 self = new TimeStringFormatKeeper;
35 return self->format;
36 }
37private slots:
38 void formatChanged( DateFormat f )
39 {
40 format = f;
41 }
42private:
43 static TimeStringFormatKeeper *self;
44 DateFormat format;
45
46 TimeStringFormatKeeper()
47 : QObject( qApp )
48 {
49 Config config("qpe");
50 config.setGroup( "Date" );
51 format = DateFormat(QChar(config.readEntry("Separator", "/")[0]),
52 (DateFormat::Order)config .readNumEntry("ShortOrder", DateFormat::DayMonthYear),
53 (DateFormat::Order)config.readNumEntry("LongOrder", DateFormat::DayMonthYear));
54
55 connect( qApp, SIGNAL( dateFormatChanged(DateFormat) ),
56 this, SLOT( formatChanged( DateFormat ) ) );
57 }
58};
59
60TimeStringFormatKeeper *TimeStringFormatKeeper::self = 0;
61
62QString DateFormat::toNumberString() const
63{
64 QString buf = "";
65 // for each part of the order
66 for (int i = 0; i < 3; i++) {
67 // switch on the relavent 3 bits.
68 switch((_shortOrder >> (i * 3)) & 0x0007) {
69 case 0x0001:
70 buf += QObject::tr( "D" );
71 break;
72 case 0x0002:
73 buf += QObject::tr( "M" );
74 break;
75 case 0x0004:
76 buf += QObject::tr( "Y" );
77 break;
78 }
79 if (i < 2)
80 buf += _shortSeparator;
81 }
82 return buf;
83}
84
85QString DateFormat::toWordString() const
86{
87 QString buf = "";
88 // for each part of the order
89 for (int i = 0; i < 3; i++) {
90 // switch on the relavent 3 bits.
91 switch((_longOrder >> (i * 3)) & 0x0007) {
92 case 0x0001:
93 buf += QObject::tr( "day" );
94 if (i < 2) {
95 if ((_shortOrder << ((i+1) * 3)) & 0x0007)
96 buf += ", ";
97 else
98 buf += " ";
99 }
100 break;
101 case 0x0002:
102 buf += QObject::tr( "month" );
103 if (i < 2)
104 buf += " ";
105 break;
106 case 0x0004:
107 buf += QObject::tr( "year" );
108 if (i < 2)
109 buf += ", ";
110 break;
111 }
112 }
113 return buf;
114}
115
116QString DateFormat::numberDate(const QDate &d, int v) const
117{
118 QString buf = "";
119
120 int pad = 0;
121 if (v & padNumber)
122 pad = 2;
123
124 // for each part of the order
125 for (int i = 0; i < 3; i++) {
126 // switch on the relavent 3 bits.
127 switch((_shortOrder >> (i * 3)) & 0x0007) {
128 case 0x0001:
129 buf += QString("%1").arg(d.day(), pad);
130 break;
131 case 0x0002:
132 buf += QString("%1").arg(d.month(), pad);
133 break;
134 case 0x0004:
135 {
136 int year = d.year();
137 if (!(v & longNumber))
138 year = year % 100;
139
140 if (year < 10)
141 buf += "0";
142
143 buf += QString::number(year);
144
145 }
146 break;
147 }
148 if (i < 2)
149 buf = _shortSeparator;
150 }
151 return buf;
152}
153
154QString DateFormat::wordDate(const QDate &d, int v) const
155{
156 QString buf = "";
157 // for each part of the order
158 if (v & showWeekDay) {
159 QString weekDay = d.dayName(d.dayOfWeek());
160 if (!(v & longWord)) {
161 weekDay = weekDay.left(3);
162 }
163 buf += weekDay;
164 if (_longOrder & 0x0007 == 0x0002)
165 buf += ' ';
166 else
167 buf += ", ";
168 }
169
170 int pad = 0;
171 if (v & padNumber)
172 pad = 2;
173
174 for (int i = 0; i < 3; i++) {
175 // switch on the relavent 3 bits.
176 switch((_longOrder >> (i * 3)) & 0x0007) {
177 case 0x0001:
178 buf += QString("%1").arg(d.day(), pad);
179 if (i < 2) {
180 if ((_shortOrder << ((i+1) * 3)) & 0x0007)
181 buf += ", ";
182 else
183 buf += " ";
184 }
185 break;
186 case 0x0002:
187 {
188 QString monthName = d.monthName(d.month());
189 if (!(v & longWord)) {
190 monthName = monthName.left(3);
191 }
192 buf += monthName;
193 }
194 if (i < 2)
195 buf += " ";
196 break;
197 case 0x0004:
198 {
199 int year = d.year();
200 if (!(v & longNumber))
201 year = year % 100;
202
203 if (year < 10)
204 buf += "0";
205
206 buf += QString::number(year);
207 }
208 if (i < 2)
209 buf += ", ";
210 break;
211 }
212 }
213 return buf;
214}
215
216#ifndef QT_NO_DATASTREAM
217void DateFormat::save(QDataStream &d) const
218{
219 d << _shortSeparator.unicode();
220 uint v= _shortOrder;
221 d << v;
222 v = _longOrder;
223 d << v;
224}
225
226void DateFormat::load(QDataStream &d)
227{
228 ushort value;
229 d >> value;
230 _shortSeparator = QChar(value);
231 uint v = 0;
232 d >> v;
233 _shortOrder = (Order)v;
234 v = 0;
235 d >> v;
236 _longOrder = (Order)v;
237}
238
239QDataStream &operator<<(QDataStream &s, const DateFormat&df)
240{
241 df.save(s);
242 return s;
243}
244QDataStream &operator>>(QDataStream &s, DateFormat&df)
245{
246 df.load(s);
247 return s;
248}
249#endif
250
251QString TimeString::shortDate( const QDate &d, DateFormat dtf )
252{
253 return dtf.wordDate(d);
254}
255
256QString TimeString::dateString( const QDate &d, DateFormat dtf )
257{
258 return dtf.wordDate(d, DateFormat::longNumber | DateFormat::longWord);
259}
260
261
262QString TimeString::longDateString( const QDate &d, DateFormat dtf )
263{
264 return dtf.wordDate(d, DateFormat::showWeekDay | DateFormat::longNumber
265 | DateFormat::longWord);
266}
267
268DateFormat TimeString::currentDateFormat()
269{
270 return TimeStringFormatKeeper::currentFormat();
271}
272
273
274QString TimeString::dateString( const QDateTime &dt, bool ampm, bool seconds, DateFormat dtf )
275{
276 const QDate& d = dt.date();
277 const QTime& t = dt.time();
278
279 // based on QDateTime::toString()
280 QString buf = timeString(t,ampm,seconds);
281 buf += " ";
282 buf += longDateString( d, dtf );
283
284 return buf;
285}
286
287QString TimeString::timeString( const QTime &t, bool ampm, bool seconds )
288{
289 if ( !ampm ) {
290 if ( seconds )
291 return t.toString();
292 QString r = QString::number(t.hour());
293 if ( t.hour() < 10 ) r.prepend( "0" );
294 r.append( ":" );
295 if ( t.minute() < 10 ) r.append( "0" );
296 r.append(QString::number(t.minute()));
297 return r;
298 }
299 // ### else the hard case that should disappear in Qt 3.0
300 QString argString = seconds ? "%4:%5:%6 %7" : "%4:%5 %7";
301 int hour = t.hour();
302 QString strMin = QString::number( t.minute() );
303 QString strSec = QString::number( t.second() );
304 if ( hour > 12 )
305 argString = argString.arg( hour - 12, 2 );
306 else {
307 if ( hour == 0 )
308 argString = argString.arg( 12 );
309 else
310 argString = argString.arg( hour, 2 );
311 }
312 if ( t.minute() < 10 )
313 strMin.prepend( "0" );
314 if ( t.second() < 10 )
315 strSec.prepend( "0" );
316 argString = argString.arg( strMin );
317 if ( seconds )
318 argString = argString.arg( strSec );
319 if ( hour >= 12 )
320 argString = argString.arg( QObject::tr("PM") );
321 else
322 argString = argString.arg( QObject::tr("AM") );
323 return argString;
324}
325
326QString TimeString::shortTime( bool ampm, bool seconds )
327{
328 static const char* const day[] = {
329 QT_TRANSLATE_NOOP( "QObject", "Mon" ),
330 QT_TRANSLATE_NOOP( "QObject", "Tue" ),
331 QT_TRANSLATE_NOOP( "QObject", "Wed" ),
332 QT_TRANSLATE_NOOP( "QObject", "Thu" ),
333 QT_TRANSLATE_NOOP( "QObject", "Fri" ),
334 QT_TRANSLATE_NOOP( "QObject", "Sat" ),
335 QT_TRANSLATE_NOOP( "QObject", "Sun" )
336 };
337 // just create a shorter time String
338 QDateTime dtTmp = QDateTime::currentDateTime();
339 QString strTime;
340 strTime = QObject::tr( day[dtTmp.date().dayOfWeek()-1] ) + " " +
341 timeString( dtTmp.time(), ampm, seconds );
342 return strTime;
343}
344
345QString TimeString::dateString( const QDateTime &t, bool ampm )
346{
347 return dateString(t,ampm,FALSE);
348}
349
350QString TimeString::timeString( const QTime &t, bool ampm)
351{
352 return timeString(t,ampm,FALSE);
353}
354
355QString TimeString::shortTime( bool ampm )
356{
357 return shortTime(ampm,FALSE);
358}
359
360#include "timestring.moc"
diff --git a/library/timestring.h b/library/timestring.h
new file mode 100644
index 0000000..fd06d5b
--- a/dev/null
+++ b/library/timestring.h
@@ -0,0 +1,131 @@
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 _TIMESTRING_H_
22#define _TIMESTRING_H_
23#include <qdatetime.h>
24#include <qstring.h>
25
26// return a string with the time based on whether or not you want
27// you want it in 12 hour form. if ampm is true, then return
28// it in 12 hour (am/pm) form otherwise return it in 24 hour form
29// in theory Qt 3,0 handles this better (hopefully obsoleteing this)
30class DateFormat
31{
32public:
33 // date format type 001,010,100 = day month year
34 enum Order {
35 DayMonthYear = 0x0111, // 0x001 + 0x010(0x2 << 3) + 0x100(0x4 << 3)
36 MonthDayYear = 0x010A,
37 YearMonthDay = 0x0054
38 };
39
40 DateFormat(QChar s = '/', Order so = MonthDayYear) : _shortOrder(so),
41 _longOrder(so), _shortSeparator(s) { }
42 DateFormat(QChar s, Order so, Order lo) : _shortOrder(so),
43 _longOrder(lo), _shortSeparator(s) { }
44 DateFormat(const DateFormat &o) : _shortOrder(o._shortOrder),
45 _longOrder(o._longOrder), _shortSeparator(o._shortSeparator) { }
46
47 bool operator==(const DateFormat &o)
48 {
49 if (o._shortOrder == _shortOrder && o._longOrder == _longOrder &&
50 o._shortSeparator == _shortSeparator)
51 return TRUE;
52 return FALSE;
53 }
54
55 // verbosity specifiers
56 enum Verbosity {
57 shortNumber = 0x01, // default
58 longNumber = 0x02,
59
60 padNumber = 0x04,
61
62 shortWord = 0x08, // default
63 longWord = 0x10,
64
65 showWeekDay = 0x20
66 };
67
68 QString toNumberString() const; // the M/D/Y string.
69 QString toWordString() const; // the Month day, year string.
70
71 QString numberDate(const QDate &d, int v = 0) const;
72 QString wordDate(const QDate &d, int v = 0) const;
73
74#ifndef QT_NO_DATASTREAM
75 void load(QDataStream&);
76 void save(QDataStream&) const;
77#endif
78
79 QChar separator() const { return _shortSeparator; };
80 Order shortOrder() const { return _shortOrder; };
81 Order longOrder() const { return _longOrder; };
82
83private:
84 Order _shortOrder;
85 Order _longOrder;
86 QChar _shortSeparator;
87};
88
89#ifndef QT_NO_DATASTREAM
90QDataStream &operator<<(QDataStream &s, const DateFormat&df);
91QDataStream &operator>>(QDataStream &s, DateFormat&df);
92#endif
93
94class TimeString
95{
96public:
97
98 //enum DateFormat { MonthDayYear, DayMonthYear, ISO8601,
99 //YearMonthDay = ISO8601 };
100
101
102 static QString shortDate( const QDate &d )
103 { return shortDate( d, currentDateFormat() ); }
104 static QString dateString( const QDate &d )
105 { return dateString( d, currentDateFormat() ); }
106 static QString longDateString( const QDate &d )
107 { return longDateString( d, currentDateFormat() ); }
108 static QString dateString( const QDateTime &dt, bool ampm, bool seconds )
109 { return dateString( dt, ampm, seconds, currentDateFormat() ); }
110
111 static QString dateString( const QDateTime &t, bool ampm = false );
112 static QString timeString( const QTime &t, bool ampm, bool seconds );
113 static QString timeString( const QTime &t, bool ampm = false );
114 static QString shortTime( bool ampm, bool seconds );
115 static QString shortTime( bool ampm = false );
116
117
118
119 static QString shortDate( const QDate &, DateFormat );
120 static QString dateString( const QDate &, DateFormat );
121 static QString longDateString( const QDate &, DateFormat );
122
123 static DateFormat currentDateFormat();
124
125private:
126 static QString dateString( const QDateTime &t, bool ampm, bool seconds, DateFormat );
127
128
129};
130#endif
131
diff --git a/library/tzselect.cpp b/library/tzselect.cpp
new file mode 100644
index 0000000..5f102d5
--- a/dev/null
+++ b/library/tzselect.cpp
@@ -0,0 +1,228 @@
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 "tzselect.h"
22#include "resource.h"
23#include "global.h"
24#include "config.h"
25#include <qtoolbutton.h>
26#include <qfile.h>
27#include <stdlib.h>
28
29#ifdef Q_WS_QWS
30#include <qcopchannel_qws.h>
31#endif
32
33TZCombo::TZCombo( QWidget *p, const char* n )
34 : QComboBox( p, n )
35{
36 updateZones();
37 // check to see if TZ is set, if it is set the current item to that
38 QString tz = getenv("TZ");
39 if ( !tz.isNull() ) {
40 int n = 0,
41 index = 0;
42 for ( QStringList::Iterator it=identifiers.begin();
43 it!=identifiers.end(); ++it) {
44 if ( *it == tz )
45 index = n;
46 n++;
47 }
48 setCurrentItem(index);
49 } else {
50 setCurrentItem(0);
51 }
52
53
54
55 // listen on QPE/System
56#if defined(Q_WS_QWS)
57#if !defined(QT_NO_COP)
58 QCopChannel *channel = new QCopChannel( "QPE/System", this );
59 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)),
60 this, SLOT(handleSystemChannel(const QCString&, const QByteArray&)) );
61#endif
62#endif
63
64
65}
66
67TZCombo::~TZCombo()
68{
69}
70
71void TZCombo::updateZones()
72{
73 QString cur = currentText();
74 clear();
75 identifiers.clear();
76 int curix=0;
77 QString tz = getenv("TZ");
78 bool tzFound = FALSE;
79 Config cfg("CityTime");
80 cfg.setGroup("TimeZones");
81 int i=0;
82 for ( ; 1; i++ ) {
83 QString zn = cfg.readEntry("Zone"+QString::number(i), QString::null);
84 if ( zn.isNull() )
85 break;
86 if ( zn == tz )
87 tzFound = TRUE;
88 QString nm = cfg.readEntry("ZoneName"+QString::number(i));
89 identifiers.append(zn);
90 insertItem(nm);
91 if ( nm == cur )
92 curix = i;
93 }
94 if ( !tzFound && !tz.isEmpty()) {
95 int i = tz.find( '/' );
96 QString nm = tz.mid( i+1 );
97 identifiers.append(tz);
98 insertItem(nm);
99 if ( nm == cur )
100 curix = i;
101 ++i;
102 }
103 for (QStringList::Iterator it=extras.begin(); it!=extras.end(); ++it) {
104 insertItem(*it);
105 identifiers.append(*it);
106 if ( *it == cur )
107 curix = i;
108 ++i;
109 }
110 if ( !i ) {
111 QStringList list = timezoneDefaults();
112 for ( QStringList::Iterator it = list.begin(); it!=list.end(); ++it ) {
113 identifiers.append(*it); ++it;
114 insertItem(*it);
115 }
116 }
117 setCurrentItem(curix);
118}
119
120
121void TZCombo::keyPressEvent( QKeyEvent *e )
122{
123 // ### should popup() in Qt 3.0 (it's virtual there)
124// updateZones();
125 QComboBox::keyPressEvent(e);
126}
127
128void TZCombo::mousePressEvent(QMouseEvent*e)
129{
130 // ### should popup() in Qt 3.0 (it's virtual there)
131// updateZones();
132 QComboBox::mousePressEvent(e);
133}
134
135QString TZCombo::currZone() const
136{
137 return identifiers[currentItem()];
138}
139
140void TZCombo::setCurrZone( const QString& id )
141{
142 for (int i=0; i< count(); i++) {
143 if ( identifiers[i] == id ) {
144 setCurrentItem(i);
145 return;
146 }
147 }
148 insertItem(id);
149 setCurrentItem( count() - 1);
150 identifiers.append(id);
151 extras.append(id);
152}
153
154
155
156void TZCombo::handleSystemChannel(const QCString&msg, const QByteArray&)
157{
158 if ( msg == "timeZoneListChange()" ) {
159 updateZones();
160 }
161}
162
163
164TimeZoneSelector::TimeZoneSelector(QWidget* p, const char* n) :
165 QHBox(p,n)
166{
167 // build the combobox before we do any updates...
168 cmbTz = new TZCombo( this, "timezone combo" );
169
170 cmdTz = new QToolButton( this, "timezone button" );
171 QPixmap pixGlobe = Resource::loadPixmap( "citytime_icon" );
172 cmdTz->setPixmap( pixGlobe );
173 cmdTz->setMaximumSize( cmdTz->sizeHint() );
174
175 // set up a connection to catch a newly selected item and throw our
176 // signal
177 QObject::connect( cmbTz, SIGNAL( activated( int ) ),
178 this, SLOT( slotTzActive( int ) ) );
179 QObject::connect( cmdTz, SIGNAL( clicked() ),
180 this, SLOT( slotExecute() ) );
181}
182
183TimeZoneSelector::~TimeZoneSelector()
184{
185}
186
187
188QString TimeZoneSelector::currentZone() const
189{
190 return cmbTz->currZone();
191}
192
193void TimeZoneSelector::setCurrentZone( const QString& id )
194{
195 cmbTz->setCurrZone( id );
196}
197
198void TimeZoneSelector::slotTzActive( int )
199{
200 emit signalNewTz( cmbTz->currZone() );
201}
202
203void TimeZoneSelector::slotExecute( void )
204{
205 // execute the city time application...
206 Global::execute( "citytime" );
207}
208
209QStringList timezoneDefaults( void )
210{
211 QStringList tzs;
212 // load up the list just like the file format (citytime.cpp)
213 tzs.append( "America/New_York" );
214 tzs.append( "New York" );
215 tzs.append( "America/Los_Angeles" );
216 tzs.append( "Los Angeles" );
217 tzs.append( "Australia/Brisbane" );
218 tzs.append( "Brisbane" );
219 tzs.append( "Europe/Oslo" );
220 tzs.append( "Oslo" );
221 tzs.append( "Asia/Tokyo" );
222 tzs.append( "Tokyo" );
223 tzs.append( "Asia/Hong_Kong" );
224 tzs.append( "Hong Kong" );
225 return tzs;
226}
227
228
diff --git a/library/tzselect.h b/library/tzselect.h
new file mode 100644
index 0000000..9898d84
--- a/dev/null
+++ b/library/tzselect.h
@@ -0,0 +1,79 @@
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#ifndef TZSELECT_H
21#define TZSELECT_H
22
23#include <qhbox.h>
24#include <qcombobox.h>
25#include <qstringlist.h>
26
27class QToolButton;
28
29// a function to load defaults in case there is no file
30QStringList timezoneDefaults( void );
31
32class TZCombo : public QComboBox
33{
34 Q_OBJECT
35public:
36 TZCombo( QWidget* parent, const char* name = 0 );
37 ~TZCombo();
38
39 QString currZone() const;
40 void setCurrZone( const QString& id );
41
42protected:
43 void keyPressEvent( QKeyEvent *e );
44 void mousePressEvent(QMouseEvent*e);
45 void updateZones();
46
47private slots:
48 void handleSystemChannel(const QCString&, const QByteArray&);
49
50private:
51 QStringList identifiers;
52 QStringList extras;
53};
54
55class TimeZoneSelectorPrivate;
56class TimeZoneSelector : public QHBox
57{
58 Q_OBJECT
59public:
60 TimeZoneSelector( QWidget* parent = 0, const char* name=0 );
61 ~TimeZoneSelector();
62
63 QString currentZone() const;
64 void setCurrentZone( const QString& id );
65
66signals:
67 void signalNewTz( const QString& id );
68
69private slots:
70 void slotTzActive( int index );
71 void slotExecute( void );
72
73private:
74 TZCombo *cmbTz;
75 QToolButton *cmdTz;
76 TimeZoneSelectorPrivate *d;
77};
78
79#endif
diff --git a/library/version.h b/library/version.h
new file mode 100644
index 0000000..992c086
--- a/dev/null
+++ b/library/version.h
@@ -0,0 +1,3 @@
1//#define QPE_VENDOR "Your Name Here"
2#define QPE_VERSION "1.5.0"
3
diff --git a/library/xmlreader.cpp b/library/xmlreader.cpp
new file mode 100644
index 0000000..1ae4485
--- a/dev/null
+++ b/library/xmlreader.cpp
@@ -0,0 +1,137 @@
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#include "xmlreader.h"
21
22Node::Node()
23 : parent( 0 ), prev( 0 ),
24 next( 0 ), first( 0 ), last( 0 )
25{
26}
27
28
29Node::~Node()
30{
31 Node *n = first, *m;
32
33 while ( n ) {
34 m = n->next;
35 delete n;
36 n = m;
37 }
38}
39
40
41void Node::addChild( Node *child )
42{
43 child->parent = this;
44
45 if ( last )
46 last->next = child;
47 child->prev = last;
48
49 if ( !first )
50 first = child;
51 last = child;
52}
53
54QString Node::attribute( const QString& name )
55{
56 return attributes[name];
57}
58
59void Node::setAttributes( const QXmlAttributes &a )
60{
61 for ( int i = 0; i < a.length(); i++ )
62 attributes[ a.qName( i ) ] = a.value( i );
63}
64
65QMap<QString, QString> Node::attributeMap()
66{
67 return attributes;
68}
69
70QString Node::subData(const QString& tag) const
71{
72 Node* c = firstChild();
73 while ( c ) {
74 if ( c->tagName() == tag )
75 return c->data();
76 c = c->nextNode();
77 }
78 return QString::null;
79}
80
81XmlHandler::XmlHandler()
82 : node( 0 ), tree( 0 )
83{
84}
85
86XmlHandler::~XmlHandler()
87{
88}
89
90
91bool XmlHandler::startDocument()
92{
93 tree = node = new Node;
94 node->setTagName( "DOCUMENT" );
95
96 return TRUE;
97}
98
99
100bool XmlHandler::endDocument()
101{
102 if ( node != tree )
103 return FALSE;
104
105 return TRUE;
106}
107
108bool XmlHandler::startElement( const QString &, const QString &,
109 const QString &qName, const QXmlAttributes &attr )
110{
111 Node *nnode = new Node;
112 nnode->setAttributes( attr );
113 nnode->setTagName( qName );
114
115 node->addChild( nnode );
116 node = nnode;
117
118 return TRUE;
119}
120
121
122bool XmlHandler::endElement( const QString &, const QString &, const QString & )
123{
124 if ( node == tree )
125 return FALSE;
126
127 node = node->parentNode();
128 return TRUE;
129}
130
131
132bool XmlHandler::characters( const QString &ch )
133{
134 node->appendData( ch );
135
136 return TRUE;
137}
diff --git a/library/xmlreader.h b/library/xmlreader.h
new file mode 100644
index 0000000..2a51176
--- a/dev/null
+++ b/library/xmlreader.h
@@ -0,0 +1,83 @@
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#ifndef XMLREADER_H
21#define XMLREADER_H
22
23#include <qstring.h>
24#include <qxml.h>
25#include <qmap.h>
26
27class Node
28{
29public:
30 Node();
31 ~Node();
32
33 void addChild( Node *child );
34
35 void setAttributes( const QXmlAttributes &a );
36 QMap<QString, QString> attributeMap();
37 QString attribute( const QString& name );
38
39 Node *nextNode() const { return next; }
40 Node *prevNode() const { return prev; }
41 Node *parentNode() const { return parent; }
42 Node *lastChild() const { return last; }
43 Node *firstChild() const { return first; }
44
45 void setTagName( const QString &s ) { tagN = s; }
46 QString tagName() const { return tagN; }
47 void setData( const QString &s ) { dt = s; }
48 QString data() const { return dt; }
49 QString subData(const QString& tag) const;
50 void appendData( const QString s ) { dt += s; }
51
52
53private:
54 QMap<QString, QString> attributes;
55 QString dt, tagN;
56
57 Node *parent, *prev, *next, *first, *last;
58};
59
60class XmlHandlerPrivate;
61class XmlHandler : public QXmlDefaultHandler
62{
63public:
64 XmlHandler();
65 ~XmlHandler();
66
67 bool startDocument();
68 bool endDocument();
69 bool startElement( const QString &ns, const QString &ln, const QString &qName,
70 const QXmlAttributes &attr );
71 bool endElement( const QString &ns, const QString &ln, const QString &qName );
72 bool characters( const QString &ch );
73
74 Node *firstNode() const { return tree; }
75
76private:
77 Node *node, *tree;
78 XmlHandlerPrivate *d;
79};
80
81
82
83#endif