summaryrefslogtreecommitdiff
path: root/library
authorkergoth <kergoth>2002-01-25 22:14:26 (UTC)
committer kergoth <kergoth>2002-01-25 22:14:26 (UTC)
commit15318cad33835e4e2dc620d033e43cd930676cdd (patch) (side-by-side diff)
treec2fa0399a2c47fda8e2cd0092c73a809d17f68eb /library
downloadopie-15318cad33835e4e2dc620d033e43cd930676cdd.zip
opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.gz
opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.bz2
Initial revision
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 @@
+moc_*
+*.moc
+Makefile
+proxiesbase_p.h
+proxiesbase_p.cpp
+passwordbase_p.h
+passwordbase_p.cpp
+categoryeditbase_p.cpp
+categoryeditbase_p.h
+findwidgetbase_p.cpp
+findwidgetbase_p.h
+lnkpropertiesbase_p.cpp
+lnkpropertiesbase_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 @@
+backend/vcc_yacc.cpp: backend/vcc.y
+ $(YACC) $(YACCFLAGS) -p vcc backend/vcc.y
+ -rm backend/vcc_yacc.cpp
+ 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 @@
+#############################################################################
+
+####### Compiler, tools and options
+
+CXX = $(SYSCONF_CXX) $(QT_CXX_MT)
+CXXFLAGS= $(SYSCONF_CXXFLAGS_QT) $(SYSCONF_CXXFLAGS) $(SYSCONF_CXXFLAGS_LIB)
+CC = $(SYSCONF_CC) $(QT_C_MT)
+CFLAGS = $(SYSCONF_CFLAGS) $(SYSCONF_CFLAGS_LIB)
+INCPATH = -I$(QPEDIR)/include -Ibackend
+LFLAGS = $(SYSCONF_LFLAGS_QT) $(SYSCONF_RPATH_QT) $(SYSCONF_LFLAGS) $(QT_LFLAGS_MT)
+LIBS = $(SUBLIBS) -ldl -lcrypt -lm $(SYSCONF_LIBS_QT) $(SYSCONF_LIBS_QTAPP)
+MOC = $(SYSCONF_MOC)
+UIC = $(SYSCONF_UIC)
+
+####### Target
+
+DESTDIR = $(QTDIR)/lib$(PROJMAK)/
+VER_MAJ = 1
+VER_MIN = 5
+VER_PATCH = 0
+TARGET = qpe
+TARGET1 = lib$(TARGET).so.$(VER_MAJ)
+
+####### Files
+
+HEADERS = calendar.h \
+ global.h \
+ resource.h \
+ xmlreader.h \
+ mimetype.h \
+ menubutton.h \
+ network.h \
+ networkinterface.h \
+ proxies.h \
+ filemanager.h \
+ fontmanager.h \
+ qdawg.h \
+ datebookmonth.h \
+ fileselector.h \
+ imageedit.h \
+ qcopenvelope_qws.h \
+ qpedecoration_qws.h \
+ qpeapplication.h \
+ qpestyle.h \
+ qpedialog.h \
+ lightstyle.h \
+ config.h \
+ applnk.h \
+ sound.h \
+ tzselect.h \
+ qmath.h \
+ datebookdb.h \
+ alarmserver.h \
+ process.h \
+ password.h \
+ timestring.h \
+ fontfactoryinterface.h \
+ fontdatabase.h \
+ power.h \
+ storage.h \
+ qpemessagebox.h \
+ backend/timeconversion.h \
+ qpedebug.h \
+ qpemenubar.h \
+ qpetoolbar.h \
+ backend/categories.h \
+ backend/stringutil.h \
+ backend/palmtopuid.h \
+ backend/palmtoprecord.h \
+ backend/task.h \
+ backend/event.h \
+ backend/contact.h \
+ categorymenu.h \
+ categoryedit_p.h \
+ categoryselect.h \
+ categorywidget.h \
+ ir.h \
+ backend/vobject_p.h \
+ findwidget_p.h \
+ finddialog.h \
+ lnkproperties.h \
+ quuid.h \
+ qcom.h \
+ qlibrary.h \
+ qlibrary_p.h \
+ qprocess.h
+SOURCES = calendar.cpp \
+ global.cpp \
+ xmlreader.cpp \
+ mimetype.cpp \
+ menubutton.cpp \
+ network.cpp \
+ networkinterface.cpp \
+ proxies.cpp \
+ filemanager.cpp \
+ fontmanager.cpp \
+ qdawg.cpp \
+ datebookmonth.cpp \
+ fileselector.cpp \
+ imageedit.cpp \
+ resource.cpp \
+ qpedecoration_qws.cpp \
+ qcopenvelope_qws.cpp \
+ qpeapplication.cpp \
+ qpestyle.cpp \
+ qpedialog.cpp \
+ lightstyle.cpp \
+ config.cpp \
+ applnk.cpp \
+ sound.cpp \
+ tzselect.cpp \
+ qmath.c \
+ datebookdb.cpp \
+ alarmserver.cpp \
+ password.cpp \
+ process.cpp \
+ process_unix.cpp \
+ timestring.cpp \
+ fontdatabase.cpp \
+ power.cpp \
+ storage.cpp \
+ qpemessagebox.cpp \
+ backend/timeconversion.cpp \
+ qpedebug.cpp \
+ qpemenubar.cpp \
+ qpetoolbar.cpp \
+ backend/categories.cpp \
+ backend/stringutil.cpp \
+ backend/palmtoprecord.cpp \
+ backend/task.cpp \
+ backend/event.cpp \
+ backend/contact.cpp \
+ categorymenu.cpp \
+ categoryedit_p.cpp \
+ categoryselect.cpp \
+ categorywidget.cpp \
+ ir.cpp \
+ backend/vcc_yacc.cpp \
+ backend/vobject.cpp \
+ findwidget_p.cpp \
+ finddialog.cpp \
+ lnkproperties.cpp \
+ quuid.cpp \
+ qlibrary.cpp \
+ qlibrary_unix.cpp \
+ qprocess.cpp \
+ qprocess_unix.cpp
+OBJECTS = calendar.o \
+ global.o \
+ xmlreader.o \
+ mimetype.o \
+ menubutton.o \
+ network.o \
+ networkinterface.o \
+ proxies.o \
+ filemanager.o \
+ fontmanager.o \
+ qdawg.o \
+ datebookmonth.o \
+ fileselector.o \
+ imageedit.o \
+ resource.o \
+ qpedecoration_qws.o \
+ qcopenvelope_qws.o \
+ qpeapplication.o \
+ qpestyle.o \
+ qpedialog.o \
+ lightstyle.o \
+ config.o \
+ applnk.o \
+ sound.o \
+ tzselect.o \
+ qmath.o \
+ datebookdb.o \
+ alarmserver.o \
+ password.o \
+ process.o \
+ process_unix.o \
+ timestring.o \
+ fontdatabase.o \
+ power.o \
+ storage.o \
+ qpemessagebox.o \
+ backend/timeconversion.o \
+ qpedebug.o \
+ qpemenubar.o \
+ qpetoolbar.o \
+ backend/categories.o \
+ backend/stringutil.o \
+ backend/palmtoprecord.o \
+ backend/task.o \
+ backend/event.o \
+ backend/contact.o \
+ categorymenu.o \
+ categoryedit_p.o \
+ categoryselect.o \
+ categorywidget.o \
+ ir.o \
+ backend/vcc_yacc.o \
+ backend/vobject.o \
+ findwidget_p.o \
+ finddialog.o \
+ lnkproperties.o \
+ quuid.o \
+ qlibrary.o \
+ qlibrary_unix.o \
+ qprocess.o \
+ qprocess_unix.o \
+ passwordbase_p.o \
+ proxiesbase_p.o \
+ categoryeditbase_p.o \
+ findwidgetbase_p.o \
+ lnkpropertiesbase_p.o
+INTERFACES = passwordbase_p.ui \
+ proxiesbase_p.ui \
+ categoryeditbase_p.ui \
+ findwidgetbase_p.ui \
+ lnkpropertiesbase_p.ui
+UICDECLS = passwordbase_p.h \
+ proxiesbase_p.h \
+ categoryeditbase_p.h \
+ findwidgetbase_p.h \
+ lnkpropertiesbase_p.h
+UICIMPLS = passwordbase_p.cpp \
+ proxiesbase_p.cpp \
+ categoryeditbase_p.cpp \
+ findwidgetbase_p.cpp \
+ lnkpropertiesbase_p.cpp
+SRCMOC = moc_menubutton.cpp \
+ moc_proxies.cpp \
+ moc_datebookmonth.cpp \
+ moc_fileselector.cpp \
+ moc_imageedit.cpp \
+ moc_qpedecoration_qws.cpp \
+ moc_qpeapplication.cpp \
+ moc_qpedialog.cpp \
+ moc_tzselect.cpp \
+ moc_process.cpp \
+ moc_storage.cpp \
+ moc_qpemenubar.cpp \
+ moc_qpetoolbar.cpp \
+ backend/moc_categories.cpp \
+ moc_categorymenu.cpp \
+ moc_categoryedit_p.cpp \
+ moc_categoryselect.cpp \
+ moc_ir.cpp \
+ moc_findwidget_p.cpp \
+ moc_finddialog.cpp \
+ moc_lnkproperties.cpp \
+ moc_qlibrary_p.cpp \
+ moc_qprocess.cpp \
+ global.moc \
+ network.moc \
+ password.moc \
+ process_unix.moc \
+ timestring.moc \
+ qprocess_unix.moc \
+ moc_passwordbase_p.cpp \
+ moc_proxiesbase_p.cpp \
+ moc_categoryeditbase_p.cpp \
+ moc_findwidgetbase_p.cpp \
+ moc_lnkpropertiesbase_p.cpp
+OBJMOC = moc_menubutton.o \
+ moc_proxies.o \
+ moc_datebookmonth.o \
+ moc_fileselector.o \
+ moc_imageedit.o \
+ moc_qpedecoration_qws.o \
+ moc_qpeapplication.o \
+ moc_qpedialog.o \
+ moc_tzselect.o \
+ moc_process.o \
+ moc_storage.o \
+ moc_qpemenubar.o \
+ moc_qpetoolbar.o \
+ backend/moc_categories.o \
+ moc_categorymenu.o \
+ moc_categoryedit_p.o \
+ moc_categoryselect.o \
+ moc_ir.o \
+ moc_findwidget_p.o \
+ moc_finddialog.o \
+ moc_lnkproperties.o \
+ moc_qlibrary_p.o \
+ moc_qprocess.o \
+ moc_passwordbase_p.o \
+ moc_proxiesbase_p.o \
+ moc_categoryeditbase_p.o \
+ moc_findwidgetbase_p.o \
+ moc_lnkpropertiesbase_p.o
+
+
+####### Implicit rules
+
+.SUFFIXES: .cpp .cxx .cc .C .c
+
+.cpp.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+
+.cxx.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+
+.cc.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+
+.C.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+
+.c.o:
+ $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
+
+####### Build rules
+
+
+all: $(DESTDIR)$(SYSCONF_LINK_TARGET)
+
+$(DESTDIR)$(SYSCONF_LINK_TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) $(SUBLIBS)
+ $(SYSCONF_LINK_LIB)
+
+moc: $(SRCMOC)
+
+tmake:
+ tmake library.pro
+
+clean:
+ -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS)
+ -rm -f *~ core
+ -rm -f allmoc.cpp
+
+####### Extension Modules
+
+listpromodules:
+ @echo
+
+listallmodules:
+ @echo
+
+listaddonpromodules:
+ @echo
+
+listaddonentmodules:
+ @echo
+
+
+REQUIRES=
+
+####### Sub-libraries
+
+
+###### Combined headers
+
+
+
+####### Compile
+
+calendar.o: calendar.cpp \
+ calendar.h
+
+global.o: global.cpp \
+ global.moc
+
+xmlreader.o: xmlreader.cpp \
+ xmlreader.h
+
+mimetype.o: mimetype.cpp \
+ mimetype.h \
+ applnk.h \
+ resource.h \
+ qpeapplication.h \
+ qpedecoration_qws.h \
+ timestring.h
+
+menubutton.o: menubutton.cpp \
+ menubutton.h
+
+network.o: network.cpp \
+ network.moc
+
+networkinterface.o: networkinterface.cpp \
+ networkinterface.h \
+ network.h \
+ config.h
+
+proxies.o: proxies.cpp \
+ proxies.h \
+ config.h \
+ proxiesbase_p.h
+
+filemanager.o: filemanager.cpp \
+ filemanager.h \
+ applnk.h
+
+fontmanager.o: fontmanager.cpp \
+ fontmanager.h
+
+qdawg.o: qdawg.cpp \
+ qdawg.h
+
+datebookmonth.o: datebookmonth.cpp \
+ config.h \
+ datebookmonth.h \
+ calendar.h \
+ timestring.h \
+ datebookdb.h \
+ resource.h \
+ qpeapplication.h \
+ qpedecoration_qws.h
+
+fileselector.o: fileselector.cpp \
+ fileselector.h \
+ filemanager.h \
+ applnk.h \
+ global.h \
+ resource.h \
+ config.h \
+ storage.h \
+ qpemenubar.h \
+ lnkproperties.h \
+ qpeapplication.h \
+ qpedecoration_qws.h \
+ timestring.h \
+ categorymenu.h
+
+imageedit.o: imageedit.cpp \
+ imageedit.h
+
+resource.o: resource.cpp \
+ qpeapplication.h \
+ qpedecoration_qws.h \
+ timestring.h \
+ resource.h \
+ inlinepics_p.h
+
+qpedecoration_qws.o: qpedecoration_qws.cpp \
+ qcopenvelope_qws.h \
+ qpedecoration_qws.h \
+ qpeapplication.h \
+ timestring.h \
+ resource.h \
+ global.h
+
+qcopenvelope_qws.o: qcopenvelope_qws.cpp \
+ qcopenvelope_qws.h \
+ global.h
+
+qpeapplication.o: qpeapplication.cpp \
+ qcopenvelope_qws.h \
+ qpeapplication.h \
+ qpedecoration_qws.h \
+ timestring.h \
+ qpestyle.h \
+ lightstyle.h \
+ global.h \
+ resource.h \
+ config.h \
+ network.h \
+ fontmanager.h \
+ power.h \
+ alarmserver.h \
+ applnk.h
+
+qpestyle.o: qpestyle.cpp \
+ qpestyle.h \
+ qpeapplication.h \
+ qpedecoration_qws.h \
+ timestring.h
+
+qpedialog.o: qpedialog.cpp \
+ qpedialog.h \
+ qpeapplication.h \
+ qpedecoration_qws.h \
+ timestring.h
+
+lightstyle.o: lightstyle.cpp \
+ lightstyle.h
+
+config.o: config.cpp \
+ config.h
+
+applnk.o: applnk.cpp \
+ applnk.h
+
+sound.o: sound.cpp
+
+tzselect.o: tzselect.cpp \
+ tzselect.h \
+ resource.h \
+ global.h \
+ config.h
+
+qmath.o: qmath.c \
+ qmath.h
+
+datebookdb.o: datebookdb.cpp \
+ datebookdb.h
+
+alarmserver.o: alarmserver.cpp \
+ qpeapplication.h \
+ qpedecoration_qws.h \
+ timestring.h \
+ global.h \
+ resource.h \
+ qcopenvelope_qws.h \
+ alarmserver.h
+
+password.o: password.cpp \
+ password.moc \
+ password.h \
+ config.h \
+ global.h \
+ backend/contact.h \
+ passwordbase_p.h
+
+process.o: process.cpp \
+ process.h
+
+process_unix.o: process_unix.cpp \
+ process_unix.moc \
+ process.h
+
+timestring.o: timestring.cpp \
+ timestring.moc \
+ timestring.h \
+ qpeapplication.h \
+ qpedecoration_qws.h \
+ config.h
+
+fontdatabase.o: fontdatabase.cpp \
+ qpeapplication.h \
+ qpedecoration_qws.h \
+ timestring.h \
+ fontfactoryinterface.h \
+ fontdatabase.h
+
+power.o: power.cpp \
+ power.h
+
+storage.o: storage.cpp
+
+qpemessagebox.o: qpemessagebox.cpp \
+ qpemessagebox.h
+
+backend/timeconversion.o: backend/timeconversion.cpp \
+ backend/timeconversion.h
+
+qpedebug.o: qpedebug.cpp \
+ qpedebug.h
+
+qpemenubar.o: qpemenubar.cpp \
+ qpemenubar.h
+
+qpetoolbar.o: qpetoolbar.cpp \
+ qpetoolbar.h \
+ qpemenubar.h
+
+backend/categories.o: backend/categories.cpp \
+ backend/categories.h \
+ backend/qpcglobal.h \
+ backend/palmtopuidgen.h \
+ backend/stringutil.h
+
+backend/stringutil.o: backend/stringutil.cpp \
+ backend/stringutil.h \
+ backend/qpcglobal.h
+
+backend/palmtoprecord.o: backend/palmtoprecord.cpp \
+ backend/palmtoprecord.h \
+ backend/qpcglobal.h \
+ backend/palmtopuidgen.h \
+ backend/stringutil.h
+
+backend/task.o: backend/task.cpp \
+ backend/vobject_p.h \
+ backend/timeconversion.h \
+ backend/qfiledirect_p.h
+
+backend/event.o: backend/event.cpp \
+ backend/event.h \
+ backend/qfiledirect_p.h \
+ backend/vobject_p.h
+
+backend/contact.o: backend/contact.cpp \
+ backend/contact.h \
+ backend/vobject_p.h \
+ backend/qfiledirect_p.h
+
+categorymenu.o: categorymenu.cpp \
+ categorymenu.h \
+ backend/categories.h \
+ backend/qpcglobal.h \
+ backend/palmtopuidgen.h \
+ categoryselect.h
+
+categoryedit_p.o: categoryedit_p.cpp \
+ categoryedit_p.h \
+ categoryeditbase_p.h
+
+categoryselect.o: categoryselect.cpp \
+ categorywidget.h \
+ categoryselect.h
+
+categorywidget.o: categorywidget.cpp \
+ categoryedit_p.h \
+ categoryeditbase_p.h \
+ categorywidget.h
+
+ir.o: ir.cpp \
+ ir.h \
+ qcopenvelope_qws.h \
+ applnk.h
+
+backend/vcc_yacc.o: backend/vcc_yacc.cpp \
+ backend/vobject_p.h
+
+backend/vobject.o: backend/vobject.cpp \
+ backend/vobject_p.h \
+ backend/qfiledirect_p.h
+
+findwidget_p.o: findwidget_p.cpp \
+ findwidget_p.h \
+ findwidgetbase_p.h
+
+finddialog.o: finddialog.cpp \
+ finddialog.h \
+ findwidget_p.h \
+ findwidgetbase_p.h
+
+lnkproperties.o: lnkproperties.cpp \
+ lnkproperties.h \
+ lnkpropertiesbase_p.h \
+ ir.h
+
+quuid.o: quuid.cpp \
+ quuid.h
+
+qlibrary.o: qlibrary.cpp \
+ qlibrary_p.h \
+ qlibrary.h
+
+qlibrary_unix.o: qlibrary_unix.cpp \
+ qlibrary_p.h \
+ qlibrary.h
+
+qprocess.o: qprocess.cpp \
+ qprocess.h
+
+qprocess_unix.o: qprocess_unix.cpp \
+ qprocess_unix.moc \
+ qprocess.h \
+ qcleanuphandler_p.h
+
+passwordbase_p.h: passwordbase_p.ui
+ $(UIC) passwordbase_p.ui -o $(INTERFACE_DECL_PATH)/passwordbase_p.h
+
+passwordbase_p.cpp: passwordbase_p.ui
+ $(UIC) passwordbase_p.ui -i passwordbase_p.h -o passwordbase_p.cpp
+
+proxiesbase_p.h: proxiesbase_p.ui
+ $(UIC) proxiesbase_p.ui -o $(INTERFACE_DECL_PATH)/proxiesbase_p.h
+
+proxiesbase_p.cpp: proxiesbase_p.ui
+ $(UIC) proxiesbase_p.ui -i proxiesbase_p.h -o proxiesbase_p.cpp
+
+categoryeditbase_p.h: categoryeditbase_p.ui
+ $(UIC) categoryeditbase_p.ui -o $(INTERFACE_DECL_PATH)/categoryeditbase_p.h
+
+categoryeditbase_p.cpp: categoryeditbase_p.ui
+ $(UIC) categoryeditbase_p.ui -i categoryeditbase_p.h -o categoryeditbase_p.cpp
+
+findwidgetbase_p.h: findwidgetbase_p.ui
+ $(UIC) findwidgetbase_p.ui -o $(INTERFACE_DECL_PATH)/findwidgetbase_p.h
+
+findwidgetbase_p.cpp: findwidgetbase_p.ui
+ $(UIC) findwidgetbase_p.ui -i findwidgetbase_p.h -o findwidgetbase_p.cpp
+
+lnkpropertiesbase_p.h: lnkpropertiesbase_p.ui
+ $(UIC) lnkpropertiesbase_p.ui -o $(INTERFACE_DECL_PATH)/lnkpropertiesbase_p.h
+
+lnkpropertiesbase_p.cpp: lnkpropertiesbase_p.ui
+ $(UIC) lnkpropertiesbase_p.ui -i lnkpropertiesbase_p.h -o lnkpropertiesbase_p.cpp
+
+passwordbase_p.o: passwordbase_p.cpp \
+ passwordbase_p.h
+
+proxiesbase_p.o: proxiesbase_p.cpp \
+ proxiesbase_p.h
+
+categoryeditbase_p.o: categoryeditbase_p.cpp \
+ categoryeditbase_p.h
+
+findwidgetbase_p.o: findwidgetbase_p.cpp \
+ findwidgetbase_p.h
+
+lnkpropertiesbase_p.o: lnkpropertiesbase_p.cpp \
+ lnkpropertiesbase_p.h
+
+moc_menubutton.o: moc_menubutton.cpp \
+ menubutton.h
+
+moc_proxies.o: moc_proxies.cpp \
+ proxies.h \
+ config.h
+
+moc_datebookmonth.o: moc_datebookmonth.cpp \
+ datebookmonth.h \
+ calendar.h \
+ timestring.h
+
+moc_fileselector.o: moc_fileselector.cpp \
+ fileselector.h \
+ filemanager.h \
+ applnk.h
+
+moc_imageedit.o: moc_imageedit.cpp \
+ imageedit.h
+
+moc_qpedecoration_qws.o: moc_qpedecoration_qws.cpp \
+ qpedecoration_qws.h
+
+moc_qpeapplication.o: moc_qpeapplication.cpp \
+ qpeapplication.h \
+ qpedecoration_qws.h \
+ timestring.h
+
+moc_qpedialog.o: moc_qpedialog.cpp \
+ qpedialog.h
+
+moc_tzselect.o: moc_tzselect.cpp \
+ tzselect.h
+
+moc_process.o: moc_process.cpp \
+ process.h
+
+moc_storage.o: moc_storage.cpp \
+ storage.h
+
+moc_qpemenubar.o: moc_qpemenubar.cpp \
+ qpemenubar.h
+
+moc_qpetoolbar.o: moc_qpetoolbar.cpp \
+ qpetoolbar.h
+
+backend/moc_categories.o: backend/moc_categories.cpp \
+ backend/categories.h \
+ backend/qpcglobal.h \
+ backend/palmtopuidgen.h
+
+moc_categorymenu.o: moc_categorymenu.cpp \
+ categorymenu.h
+
+moc_categoryedit_p.o: moc_categoryedit_p.cpp \
+ categoryedit_p.h \
+ categoryeditbase_p.h
+
+moc_categoryselect.o: moc_categoryselect.cpp \
+ categoryselect.h
+
+moc_ir.o: moc_ir.cpp \
+ ir.h
+
+moc_findwidget_p.o: moc_findwidget_p.cpp \
+ findwidget_p.h \
+ findwidgetbase_p.h
+
+moc_finddialog.o: moc_finddialog.cpp \
+ finddialog.h
+
+moc_lnkproperties.o: moc_lnkproperties.cpp \
+ lnkproperties.h
+
+moc_qlibrary_p.o: moc_qlibrary_p.cpp \
+ qlibrary_p.h \
+ qlibrary.h
+
+moc_qprocess.o: moc_qprocess.cpp \
+ qprocess.h
+
+moc_passwordbase_p.o: global.moc \
+ global.cpp
+
+moc_proxiesbase_p.o: network.moc \
+ network.cpp
+
+moc_categoryeditbase_p.o: password.moc \
+ password.cpp \
+ password.h \
+ config.h \
+ global.h \
+ backend/contact.h \
+ passwordbase_p.h
+
+moc_findwidgetbase_p.o: process_unix.moc \
+ process_unix.cpp \
+ process.h
+
+moc_lnkpropertiesbase_p.o: timestring.moc \
+ timestring.cpp \
+ timestring.h \
+ qpeapplication.h \
+ qpedecoration_qws.h \
+ config.h
+
+moc_menubutton.cpp: menubutton.h
+ $(MOC) menubutton.h -o moc_menubutton.cpp
+
+moc_proxies.cpp: proxies.h
+ $(MOC) proxies.h -o moc_proxies.cpp
+
+moc_datebookmonth.cpp: datebookmonth.h
+ $(MOC) datebookmonth.h -o moc_datebookmonth.cpp
+
+moc_fileselector.cpp: fileselector.h
+ $(MOC) fileselector.h -o moc_fileselector.cpp
+
+moc_imageedit.cpp: imageedit.h
+ $(MOC) imageedit.h -o moc_imageedit.cpp
+
+moc_qpedecoration_qws.cpp: qpedecoration_qws.h
+ $(MOC) qpedecoration_qws.h -o moc_qpedecoration_qws.cpp
+
+moc_qpeapplication.cpp: qpeapplication.h
+ $(MOC) qpeapplication.h -o moc_qpeapplication.cpp
+
+moc_qpedialog.cpp: qpedialog.h
+ $(MOC) qpedialog.h -o moc_qpedialog.cpp
+
+moc_tzselect.cpp: tzselect.h
+ $(MOC) tzselect.h -o moc_tzselect.cpp
+
+moc_process.cpp: process.h
+ $(MOC) process.h -o moc_process.cpp
+
+moc_storage.cpp: storage.h
+ $(MOC) storage.h -o moc_storage.cpp
+
+moc_qpemenubar.cpp: qpemenubar.h
+ $(MOC) qpemenubar.h -o moc_qpemenubar.cpp
+
+moc_qpetoolbar.cpp: qpetoolbar.h
+ $(MOC) qpetoolbar.h -o moc_qpetoolbar.cpp
+
+backend/moc_categories.cpp: backend/categories.h
+ $(MOC) backend/categories.h -o backend/moc_categories.cpp
+
+moc_categorymenu.cpp: categorymenu.h
+ $(MOC) categorymenu.h -o moc_categorymenu.cpp
+
+moc_categoryedit_p.cpp: categoryedit_p.h
+ $(MOC) categoryedit_p.h -o moc_categoryedit_p.cpp
+
+moc_categoryselect.cpp: categoryselect.h
+ $(MOC) categoryselect.h -o moc_categoryselect.cpp
+
+moc_ir.cpp: ir.h
+ $(MOC) ir.h -o moc_ir.cpp
+
+moc_findwidget_p.cpp: findwidget_p.h
+ $(MOC) findwidget_p.h -o moc_findwidget_p.cpp
+
+moc_finddialog.cpp: finddialog.h
+ $(MOC) finddialog.h -o moc_finddialog.cpp
+
+moc_lnkproperties.cpp: lnkproperties.h
+ $(MOC) lnkproperties.h -o moc_lnkproperties.cpp
+
+moc_qlibrary_p.cpp: qlibrary_p.h
+ $(MOC) qlibrary_p.h -o moc_qlibrary_p.cpp
+
+moc_qprocess.cpp: qprocess.h
+ $(MOC) qprocess.h -o moc_qprocess.cpp
+
+global.moc: global.cpp
+ $(MOC) global.cpp -o global.moc
+
+network.moc: network.cpp
+ $(MOC) network.cpp -o network.moc
+
+password.moc: password.cpp
+ $(MOC) password.cpp -o password.moc
+
+process_unix.moc: process_unix.cpp
+ $(MOC) process_unix.cpp -o process_unix.moc
+
+timestring.moc: timestring.cpp
+ $(MOC) timestring.cpp -o timestring.moc
+
+qprocess_unix.moc: qprocess_unix.cpp
+ $(MOC) qprocess_unix.cpp -o qprocess_unix.moc
+
+moc_passwordbase_p.cpp: passwordbase_p.h
+ $(MOC) passwordbase_p.h -o moc_passwordbase_p.cpp
+
+moc_proxiesbase_p.cpp: proxiesbase_p.h
+ $(MOC) proxiesbase_p.h -o moc_proxiesbase_p.cpp
+
+moc_categoryeditbase_p.cpp: categoryeditbase_p.h
+ $(MOC) categoryeditbase_p.h -o moc_categoryeditbase_p.cpp
+
+moc_findwidgetbase_p.cpp: findwidgetbase_p.h
+ $(MOC) findwidgetbase_p.h -o moc_findwidgetbase_p.cpp
+
+moc_lnkpropertiesbase_p.cpp: lnkpropertiesbase_p.h
+ $(MOC) lnkpropertiesbase_p.h -o moc_lnkpropertiesbase_p.cpp
+
+
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include <qdir.h>
+#include <qfile.h>
+#include <qmessagebox.h>
+#include <qtextstream.h>
+
+
+#include "qpeapplication.h"
+#include "global.h"
+#include "resource.h"
+
+#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
+#include "qcopenvelope_qws.h"
+#endif
+#include "alarmserver.h"
+#include <qpe/timeconversion.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include <stdlib.h>
+#include <unistd.h>
+
+struct timerEventItem {
+ time_t UTCtime;
+ QCString channel, message;
+ int data;
+ bool operator==( const timerEventItem &right ) const
+ {
+ return ( UTCtime == right.UTCtime
+ && channel == right.channel
+ && message == right.message
+ && data == right.data );
+ }
+};
+
+class TimerReceiverObject : public QObject
+{
+public:
+ TimerReceiverObject() { }
+ ~TimerReceiverObject() { }
+ void resetTimer();
+ void setTimerEventItem();
+ void deleteTimer();
+protected:
+ void timerEvent( QTimerEvent *te );
+private:
+ QString atfilename;
+};
+
+TimerReceiverObject *timerEventReceiver = NULL;
+QList<timerEventItem> timerEventList;
+timerEventItem *nearestTimerEvent = NULL;
+
+
+// set the timer to go off on the next event in the list
+void setNearestTimerEvent()
+{
+ nearestTimerEvent = NULL;
+ QListIterator<timerEventItem> it( timerEventList );
+ if ( *it )
+ nearestTimerEvent = *it;
+ for ( ; *it; ++it )
+ if ( (*it)->UTCtime < nearestTimerEvent->UTCtime )
+ nearestTimerEvent = *it;
+ if (nearestTimerEvent)
+ timerEventReceiver->resetTimer();
+ else
+ timerEventReceiver->deleteTimer();
+}
+
+
+//store current state to file
+//Simple implementation. Should run on a timer.
+
+static void saveState()
+{
+ QString savefilename = Global::applicationFileName( "AlarmServer", "saveFile" );
+ if ( timerEventList.isEmpty() ) {
+ unlink( savefilename );
+ return;
+ }
+
+ QFile savefile(savefilename+".new");
+ if ( savefile.open(IO_WriteOnly) ) {
+ QDataStream ds( &savefile );
+
+ //save
+
+ QListIterator<timerEventItem> it( timerEventList );
+ for ( ; *it; ++it ) {
+ ds << it.current()->UTCtime;
+ ds << it.current()->channel;
+ ds << it.current()->message;
+ ds << it.current()->data;
+ }
+
+
+ savefile.close();
+ unlink( savefilename );
+ QDir d; d.rename(savefilename+".new",savefilename);
+
+ }
+}
+
+/*!
+ Sets up the alarm server. Restoring to previous state (session management).
+ */
+void AlarmServer::initialize()
+{
+ //read autosave file and put events in timerEventList
+
+ QString savefilename = Global::applicationFileName( "AlarmServer", "saveFile" );
+
+ QFile savefile(savefilename);
+ if ( savefile.open(IO_ReadOnly) ) {
+ QDataStream ds( &savefile );
+ while ( !ds.atEnd() ) {
+ timerEventItem *newTimerEventItem = new timerEventItem;
+ ds >> newTimerEventItem->UTCtime;
+ ds >> newTimerEventItem->channel;
+ ds >> newTimerEventItem->message;
+ ds >> newTimerEventItem->data;
+ timerEventList.append( newTimerEventItem );
+ }
+ savefile.close();
+ if (!timerEventReceiver)
+ timerEventReceiver = new TimerReceiverObject;
+ setNearestTimerEvent();
+ }
+}
+
+
+
+
+static const char* atdir = "/var/spool/at/";
+
+static bool triggerAtd( bool writeHWClock = FALSE )
+{
+ QFile trigger(QString(atdir) + "trigger");
+ if ( trigger.open(IO_WriteOnly|IO_Raw) ) {
+
+ const char* data =
+#ifdef QT_QWS_CUSTOM
+ //custom atd only writes HW Clock if we write a 'W'
+ ( writeHWClock ) ? "W\n" :
+#endif
+ data = "\n";
+ int len = strlen(data);
+ int total_written = trigger.writeBlock(data,len);
+ if ( total_written != len ) {
+ QMessageBox::critical( 0, QObject::tr( "Out of Space" ),
+ QObject::tr( "Unable to schedule alarm.\nFree some memory and try again." ) );
+ trigger.close();
+ QFile::remove( trigger.name() );
+ return FALSE;
+ }
+ return TRUE;
+ }
+ return FALSE;
+}
+
+void TimerReceiverObject::deleteTimer()
+{
+ if ( !atfilename.isEmpty() ) {
+ unlink( atfilename );
+ atfilename = QString::null;
+ triggerAtd( FALSE );
+ }
+}
+
+void TimerReceiverObject::resetTimer()
+{
+ const int maxsecs = 2147000;
+ int total_written;
+ QDateTime nearest = TimeConversion::fromUTC(nearestTimerEvent->UTCtime);
+ QDateTime now = QDateTime::currentDateTime();
+ int secs = TimeConversion::secsTo( now, nearest );
+ if ( secs > maxsecs ) {
+ // too far for millisecond timing
+ secs = maxsecs;
+ }
+
+ // System timer (needed so that we wake from deep sleep),
+ // from the Epoch in seconds.
+ //
+ int at_secs = TimeConversion::toUTC(nearest);
+ // qDebug("reset timer to %d seconds from Epoch",at_secs);
+ QString fn = atdir + QString::number(at_secs) + "."
+ + QString::number(getpid());
+ if ( fn != atfilename ) {
+ QFile atfile(fn+".new");
+ if ( atfile.open(IO_WriteOnly|IO_Raw) ) {
+ // just wake up and delete the at file
+ QString cmd = "#!/bin/sh\nrm " + fn;
+ total_written = atfile.writeBlock(cmd.latin1(),cmd.length());
+ if ( total_written != int(cmd.length()) ) {
+ QMessageBox::critical( 0, tr("Out of Space"),
+ tr("Unable to schedule alarm.\n"
+ "Please free up space and try again") );
+ atfile.close();
+ QFile::remove( atfile.name() );
+ return;
+ }
+ atfile.close();
+ unlink( atfilename );
+ QDir d; d.rename(fn+".new",fn);
+ chmod(fn.latin1(),0755);
+ atfilename = fn;
+ triggerAtd( FALSE );
+ } else {
+ qWarning("Cannot open atd file %s",fn.latin1());
+ }
+ }
+ // Qt timers (does the actual alarm)
+ // from now in milliseconds
+ //
+ qDebug("AlarmServer waiting %d seconds",secs);
+ startTimer( 1000 * secs + 500 );
+}
+
+void TimerReceiverObject::timerEvent( QTimerEvent * )
+{
+ bool needSave = FALSE;
+ killTimers();
+ if (nearestTimerEvent) {
+ if ( nearestTimerEvent->UTCtime
+ <= TimeConversion::toUTC(QDateTime::currentDateTime()) ) {
+ QCopEnvelope e( nearestTimerEvent->channel,
+ nearestTimerEvent->message );
+ e << TimeConversion::fromUTC( nearestTimerEvent->UTCtime )
+ << nearestTimerEvent->data;
+ timerEventList.remove( nearestTimerEvent );
+ needSave = TRUE;
+ }
+ setNearestTimerEvent();
+ } else {
+ resetTimer();
+ }
+ if ( needSave )
+ saveState();
+}
+
+/*!
+ \class AlarmServer alarmserver.h
+ \brief The AlarmServer class provides alarms to be scheduled.
+
+ Applications which wish to be informed when a certain time instant
+ passes use the functions of AlarmServer to request so.
+*/
+
+/*!
+ Schedules an alarm for \a when. Soon after this time,
+ \a message will be sent to \a channel, with \a data as
+ a parameter. \a message must be of the form "someMessage(int)".
+
+ \sa deleteAlarm()
+*/
+void AlarmServer::addAlarm ( QDateTime when, const QCString& channel,
+ const QCString& message, int data)
+{
+ if ( qApp->type() == QApplication::GuiServer ) {
+ bool needSave = FALSE;
+ // Here we are the server so either it has been directly called from
+ // within the server or it has been sent to us from a client via QCop
+ if (!timerEventReceiver)
+ timerEventReceiver = new TimerReceiverObject;
+
+ timerEventItem *newTimerEventItem = new timerEventItem;
+ newTimerEventItem->UTCtime = TimeConversion::toUTC( when );
+ newTimerEventItem->channel = channel;
+ newTimerEventItem->message = message;
+ newTimerEventItem->data = data;
+ // explore the case of already having the event in here...
+ QListIterator<timerEventItem> it( timerEventList );
+ for ( ; *it; ++it )
+ if ( *(*it) == *newTimerEventItem )
+ return;
+ // if we made it here, it is okay to add the item...
+ timerEventList.append( newTimerEventItem );
+ needSave = TRUE;
+ // quicker than using setNearestTimerEvent()
+ if ( nearestTimerEvent ) {
+ if (newTimerEventItem->UTCtime < nearestTimerEvent->UTCtime) {
+ nearestTimerEvent = newTimerEventItem;
+ timerEventReceiver->killTimers();
+ timerEventReceiver->resetTimer();
+ }
+ } else {
+ nearestTimerEvent = newTimerEventItem;
+ timerEventReceiver->resetTimer();
+ }
+ if ( needSave )
+ saveState();
+ } else {
+ QCopEnvelope e( "QPE/System", "addAlarm(QDateTime,QCString,QCString,int)" );
+ e << when << channel << message << data;
+ }
+}
+
+/*!
+ Deletes previously scheduled alarms which match \a when, \a channel, \a message,
+ and \a data.
+
+ Passing null values for \a when, \a channel, or \a message indicates "any".
+ Passing -1 for \a data indicates "any".
+
+ \sa deleteAlarm()
+*/
+void AlarmServer::deleteAlarm (QDateTime when, const QCString& channel, const QCString& message, int data)
+{
+ if ( qApp->type() == QApplication::GuiServer) {
+ bool needSave = FALSE;
+ if ( timerEventReceiver != NULL ) {
+ timerEventReceiver->killTimers();
+
+ // iterate over the list of events
+ QListIterator<timerEventItem> it( timerEventList );
+ time_t deleteTime = TimeConversion::toUTC( when );
+ for ( ; *it; ++it ) {
+ // if its a match, delete it
+ if ( ( (*it)->UTCtime == deleteTime || when.isNull() )
+ && ( channel.isNull() || (*it)->channel == channel )
+ && ( message.isNull() || (*it)->message == message )
+ && ( data==-1 || (*it)->data == data ) )
+ {
+ // if it's first, then we need to update the timer
+ if ( (*it) == nearestTimerEvent ) {
+ timerEventList.remove(*it);
+ setNearestTimerEvent();
+ } else {
+ timerEventList.remove(*it);
+ }
+ needSave = TRUE;
+ }
+ }
+ if ( nearestTimerEvent )
+ timerEventReceiver->resetTimer();
+ }
+ if ( needSave )
+ saveState();
+ } else {
+ QCopEnvelope e( "QPE/System", "deleteAlarm(QDateTime,QCString,QCString,int)" );
+ e << when << channel << message << data;
+ }
+}
+
+/*!
+ Writes the system clock to the hardware clock.
+*/
+void Global::writeHWClock()
+{
+ if ( !triggerAtd( TRUE ) ) {
+ // atd not running? set it ourselves
+ system("/sbin/hwclock --systohc"); // ##### UTC?
+ }
+}
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef ALARM_SERVER_H
+#define ALARM_SERVER_H
+
+#include <qstring.h>
+#include <qdatetime.h>
+
+class AlarmServer
+{
+public:
+ static void addAlarm ( QDateTime when, const QCString& channel, const QCString& msg, int data=0);
+ static void deleteAlarm (QDateTime when, const QCString& channel, const QCString& msg, int data=0);
+ static void initialize();
+};
+
+#endif
+
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "applnk.h"
+
+#include <qpe/qpeapplication.h>
+#include <qpe/categories.h>
+#include <qpe/categoryselect.h>
+#include <qpe/qcopenvelope_qws.h>
+#include <qpe/global.h>
+#include <qpe/mimetype.h>
+#include <qpe/config.h>
+#include <qpe/storage.h>
+#include <qpe/resource.h>
+
+#include <qdict.h>
+#include <qdir.h>
+#include <qregexp.h>
+
+#ifdef Q_WS_QWS
+#include <qgfx_qws.h>
+#endif
+
+#include <stdlib.h>
+
+int AppLnk::lastId = 5000;
+
+static int smallSize = 14;
+static int bigSize = 32;
+
+static QString safeFileName(const QString& n)
+{
+ QString safename=n;
+ safename.replace(QRegExp("[^0-9A-Za-z.]"),"_");
+ safename.replace(QRegExp("^[^A-Za-z]*"),"");
+ if ( safename.isEmpty() )
+ safename = "_";
+ return safename;
+}
+
+
+class AppLnkPrivate
+{
+public:
+ QArray<int> mCat;
+};
+
+/*!
+ \class AppLnk applnk.h
+ \brief The AppLnk class represents an application available on the system.
+
+ Information about applications are stored in Qtopia as ".desktop" files.
+ When read, these files are stored as AppLnk objects.
+*/
+
+/*!
+ Sets the size used for small icons to \a small pixels.
+ Only affects AppLnk objects created after the call.
+*/
+void AppLnk::setSmallIconSize(int small)
+{
+ smallSize = small;
+}
+
+/*!
+ Returns the size used for small icons.
+*/
+int AppLnk::smallIconSize()
+{
+ return smallSize;
+}
+
+
+/*!
+ Sets the size used for large icons to \a big pixels.
+ Only affects AppLnk objects created after the call.
+*/
+void AppLnk::setBigIconSize(int big)
+{
+ bigSize = big;
+}
+
+/*!
+ Returns the size used for large icons.
+*/
+int AppLnk::bigIconSize()
+{
+ return bigSize;
+}
+
+
+/*!
+ \fn QString AppLnk::name() const
+
+ Returns the Name property.
+*/
+/*!
+ \fn QString AppLnk::exec() const
+
+ Returns the Exec property. This is the executable program associated
+ with the AppLnk.
+*/
+/*!
+ \fn QString AppLnk::rotation() const
+
+ Returns the Rotation property.
+*/
+/*!
+ \fn QString AppLnk::comment() const
+
+ Returns the Comment property.
+*/
+/*!
+ \fn QStringList AppLnk::mimeTypes() const
+
+ Returns the MimeTypes property. This is the list of MIME types
+ that the application can view or edit.
+*/
+/*!
+ \fn const QArray<int>& AppLnk::categories() const
+
+ Returns the Categories property.
+*/
+
+const QArray<int>& AppLnk::categories() const
+{
+ return d->mCat;
+}
+
+/*!
+ \fn int AppLnk::id() const
+
+ Returns the id of the AppLnk. If the AppLnk is not in an AppLnkSet,
+ this value is 0, otherwise it is a value that is unique for the
+ duration of the current process.
+*/
+
+/*!
+ \fn bool AppLnk::isValid() const
+
+ Returns whether this AppLnk is valid.
+*/
+
+/*!
+ Creates an invalid AppLnk.
+
+ \sa isValid()
+*/
+AppLnk::AppLnk()
+{
+ mId = 0;
+ d = new AppLnkPrivate();
+}
+
+/*!
+ Loads \a file as an AppLnk.
+*/
+AppLnk::AppLnk( const QString &file )
+{
+ QStringList sl;
+ d = new AppLnkPrivate();
+ if ( !file.isNull() ) {
+ Config config( file, Config::File );
+
+ if ( config.isValid() ) {
+ config.setGroup( "Desktop Entry" );
+
+ mName = config.readEntry( "Name", file );
+ mExec = config.readEntry( "Exec" );
+ mType = config.readEntry( "Type", QString::null );
+ mIconFile = config.readEntry( "Icon", QString::null );
+ mRotation = config.readEntry( "Rotation", "" );
+ mComment = config.readEntry( "Comment", QString::null );
+ mMimeTypes = config.readListEntry( "MimeType", ';' );
+ mMimeTypeIcons = config.readListEntry( "MimeTypeIcons", ';' );
+ mLinkFile = file;
+ mFile = config.readEntry("File", QString::null);
+ sl = config.readListEntry("Categories", ';');
+ }
+ }
+ // let's try our darndest to create categories...
+ Categories cat( 0 );
+ cat.load( categoryFileName() );
+ d->mCat.resize( sl.count() );
+ int i;
+ QStringList::Iterator it;
+ for ( i = 0, it = sl.begin(); it != sl.end();
+ ++it, i++ ) {
+
+ bool number;
+ int id = (*it).toInt( &number );
+ if ( !number ) {
+ // convert from old school...
+ id = cat.id( "Document Viewer", *it );
+ if ( id == 0 )
+ id = cat.addCategory( "Document Viewer", *it );
+ }
+ d->mCat[i] = id;
+ }
+ mId = 0;
+}
+
+/*!
+ Returns a small pixmap associated with the application.
+*/
+const QPixmap& AppLnk::pixmap() const
+{
+ if ( mPixmap.isNull() ) {
+ AppLnk* that = (AppLnk*)this;
+ if ( mIconFile.isEmpty() ) {
+ MimeType mt(type());
+ that->mPixmap = mt.pixmap();
+ if ( that->mPixmap.isNull() )
+ that->mPixmap = Resource::loadPixmap("UnknownDocument-14");
+ return that->mPixmap;
+ }
+ QImage unscaledIcon = Resource::loadImage( that->mIconFile );
+ that->mPixmap.convertFromImage( unscaledIcon.smoothScale( smallSize, smallSize ) );
+ that->mBigPixmap.convertFromImage( unscaledIcon.smoothScale( bigSize, bigSize ) );
+ return that->mPixmap;
+ }
+ return mPixmap;
+}
+
+/*!
+ Returns a large pixmap associated with the application.
+*/
+const QPixmap& AppLnk::bigPixmap() const
+{
+ if ( mBigPixmap.isNull() ) {
+ AppLnk* that = (AppLnk*)this;
+ if ( mIconFile.isEmpty() ) {
+ MimeType mt(type());
+ that->mBigPixmap = mt.bigPixmap();
+ if ( that->mBigPixmap.isNull() )
+ that->mBigPixmap = Resource::loadPixmap("UnknownDocument");
+ return that->mBigPixmap;
+ }
+ QImage unscaledIcon = Resource::loadImage( that->mIconFile );
+ that->mPixmap.convertFromImage( unscaledIcon.smoothScale( smallSize, smallSize ) );
+ that->mBigPixmap.convertFromImage( unscaledIcon.smoothScale( bigSize, bigSize ) );
+ return that->mBigPixmap;
+ }
+ return mBigPixmap;
+}
+
+/*!
+ Returns the type of the application.
+*/
+QString AppLnk::type() const
+{
+ if ( mType.isNull() ) {
+ AppLnk* that = (AppLnk*)this;
+ MimeType mt(file());
+ that->mType = mt.id();
+ return that->mType;
+ }
+ return mType;
+}
+
+/*!
+ Returns the file associated with the AppLnk.
+
+ \sa exec()
+*/
+QString AppLnk::file() const
+{
+ if ( mFile.isNull() ) {
+ AppLnk* that = (AppLnk*)this;
+ if ( !mLinkFile.isEmpty() ) {
+ that->mFile =
+ mLinkFile.right(8)==".desktop" // 8 = strlen(".desktop")
+ ? mLinkFile.left(mLinkFile.length()-8) : mLinkFile;
+ } else if ( mType.contains('/') ) {
+ that->mFile =
+ QString(getenv("HOME"))+"/Documents/"+mType+"/"+safeFileName(that->mName);
+ if ( QFile::exists(that->mFile) || QFile::exists(that->mFile+".desktop") ) {
+ int n=1;
+ QString nn;
+ while (QFile::exists((nn=(that->mFile+"_"+QString::number(n))))
+ || QFile::exists(nn+".desktop"))
+ n++;
+ that->mFile = nn;
+ }
+ that->mLinkFile = that->mFile+".desktop";
+ }
+ return that->mFile;
+ }
+ return mFile;
+}
+
+/*!
+ Returns the desktop file coresponding to this AppLnk.
+
+ \sa file(), exec()
+*/
+QString AppLnk::linkFile() const
+{
+ if ( mLinkFile.isNull() ) {
+ AppLnk* that = (AppLnk*)this;
+ if ( type().contains('/') ) {
+ StorageInfo storage;
+ const FileSystem *fs = storage.fileSystemOf( that->mFile );
+// qDebug("creating lnkFile for %s", mFile.latin1() );
+// if ( fs )
+// qDebug("fs is %s", fs->path().latin1() );
+ if ( fs && fs->isRemovable() ) {
+// qDebug("isRemovable");
+ that->mLinkFile = fs->path();
+ } else
+ that->mLinkFile = getenv( "HOME" );
+ that->mLinkFile += "/Documents/"+type()+"/"+safeFileName(that->mName);
+ if ( QFile::exists(that->mLinkFile+".desktop") ) {
+ int n=1;
+ QString nn;
+ while (QFile::exists((nn=that->mLinkFile+"_"+QString::number(n))+".desktop"))
+ n++;
+ that->mLinkFile = nn;
+ }
+ that->mLinkFile += ".desktop";
+// qDebug("file is %s", mLinkFile.latin1() );
+ }
+ return that->mLinkFile;
+ }
+ return mLinkFile;
+}
+
+/*!
+ Copies \a copy.
+*/
+AppLnk::AppLnk( const AppLnk &copy )
+{
+ mName = copy.mName;
+ mPixmap = copy.mPixmap;
+ mBigPixmap = copy.mBigPixmap;
+ mExec = copy.mExec;
+ mType = copy.mType;
+ mRotation = copy.mRotation;
+ mComment = copy.mComment;
+ mFile = copy.mFile;
+ mLinkFile = copy.mLinkFile;
+ mIconFile = copy.mIconFile;
+ mMimeTypes = copy.mMimeTypes;
+ mMimeTypeIcons = copy.mMimeTypeIcons;
+ mId = 0;
+ d = new AppLnkPrivate();
+ d->mCat = copy.d->mCat;
+}
+
+/*!
+ Destroys the AppLnk. Note that if the AppLnk is current a member of
+ an AppLnkSet, this will produce a run-time warning.
+
+ \sa AppLnkSet::add(), AppLnkSet::remove()
+*/
+AppLnk::~AppLnk()
+{
+ if ( mId )
+ qWarning("Deleting AppLnk that is in an AppLnkSet");
+ if ( d )
+ delete d;
+}
+
+/*!
+ Executes the application associated with this AppLnk.
+*/
+void AppLnk::execute() const
+{
+ execute(QStringList());
+}
+
+/*!
+ Executes the application associated with this AppLnk, with
+ \a args as arguments.
+*/
+void AppLnk::execute(const QStringList& args) const
+{
+#ifdef Q_WS_QWS
+ if ( !mRotation.isEmpty() ) {
+ // ######## this will only work in the server
+ int rot = QPEApplication::defaultRotation();
+ rot = (rot+mRotation.toInt())%360;
+ QCString old = getenv("QWS_DISPLAY");
+ setenv("QWS_DISPLAY", QString("Transformed:Rot%1:0").arg(rot), 1);
+ invoke(args);
+ setenv("QWS_DISPLAY", old.data(), 1);
+ } else
+#endif
+ invoke(args);
+}
+
+/*!
+ Invokes the application associated with this AppLnk, with
+ \a args as arguments. Rotation is not taken into account by
+ this function, you should not call it directly.
+
+ \sa execute()
+*/
+void AppLnk::invoke(const QStringList& args) const
+{
+ Global::execute( exec(), args[0] );
+}
+
+/*!
+ Sets the Exec property to \a exec.
+
+ \sa exec()
+*/
+void AppLnk::setExec( const QString& exec )
+{
+ mExec = exec;
+}
+
+/*!
+ Sets the Name property to \a docname.
+
+ \sa name()
+*/
+void AppLnk::setName( const QString& docname )
+{
+ mName = docname;
+}
+
+/*!
+ Sets the File property to \a filename.
+
+ \sa file()
+*/
+void AppLnk::setFile( const QString& filename )
+{
+ mFile = filename;
+}
+
+/*!
+ Sets the LinkFile property to \a filename.
+
+ \sa linkFile()
+*/
+void AppLnk::setLinkFile( const QString& filename )
+{
+ mLinkFile = filename;
+}
+
+/*!
+ Sets the Comment property to \a comment.
+
+ \sa comment()
+*/
+void AppLnk::setComment( const QString& comment )
+{
+ mComment = comment;
+}
+
+/*!
+ Sets the Type property to \a type.
+
+ \sa type()
+*/
+void AppLnk::setType( const QString& type )
+{
+ mType = type;
+}
+
+/*!
+ Sets the Icon property to \a iconname.
+
+ \sa pixmap(), bigPixmap()
+*/
+void AppLnk::setIcon( const QString& iconname )
+{
+ mIconFile = iconname;
+ QImage unscaledIcon = Resource::loadImage( mIconFile );
+ mPixmap.convertFromImage( unscaledIcon.smoothScale( smallSize, smallSize ) );
+ mBigPixmap.convertFromImage( unscaledIcon.smoothScale( bigSize, bigSize ) );
+}
+
+/*!
+ Sets the Categories property to \a c.
+
+ \sa categories()
+*/
+void AppLnk::setCategories( const QArray<int>& c )
+{
+ d->mCat = c;
+}
+
+/*!
+ \fn QStringList AppLnk::mimeTypeIcons() const
+
+ Returns the MimeTypeIcons property of the AppLnk.
+*/
+
+/*!
+ Attempts to ensure that the link file for this AppLnk exists, including
+ creating any required directories. Returns TRUE if successful.
+*/
+bool AppLnk::ensureLinkExists() const
+{
+ QString lf = linkFile();
+ if ( !QFile::exists(lf) ) {
+ // May need to create directories
+ QFileInfo fi(lf);
+ if ( system(("mkdir -p "+fi.dirPath(TRUE))) )
+ return FALSE;
+ }
+ return TRUE;
+}
+
+/*!
+ Commits the AppLnk to disk. Returns whether the operation succeeded.
+
+ The "linkChanged(QString)" message is sent to the
+ "QPE/System" QCop channel as a result.
+*/
+bool AppLnk::writeLink() const
+{
+ // Only re-writes settable parts
+ QString lf = linkFile();
+ if ( !ensureLinkExists() )
+ return FALSE;
+ Config config( lf, Config::File );
+ config.setGroup("Desktop Entry");
+ config.writeEntry("Name",mName);
+ if ( !mIconFile.isNull() ) config.writeEntry("Icon",mIconFile);
+ config.writeEntry("Type",type());
+ if ( !mComment.isNull() ) config.writeEntry("Comment",mComment);
+ config.writeEntry("File",file());
+ // write out the id...
+ int i;
+ QStringList sl;
+ for ( i = 0; i < int(d->mCat.count()); i++ ) {
+ sl.append( QString::number( d->mCat[i] ) );
+ }
+ config.writeEntry( "Categories", sl, ';' );
+
+ QCopEnvelope e("QPE/System", "linkChanged(QString)");
+ e << lf;
+
+ return TRUE;
+}
+
+/*!
+ Sets the property named \a key to \a value.
+*/
+void AppLnk::setProperty(const QString& key, const QString& value)
+{
+ if ( ensureLinkExists() ) {
+ Config cfg(linkFile(), Config::File);
+ cfg.writeEntry(key,value);
+ }
+}
+
+/*!
+ Returns the property named \a key.
+*/
+QString AppLnk::property(const QString& key) const
+{
+ QString lf = linkFile();
+ if ( !QFile::exists(lf) )
+ return QString::null;
+ Config cfg(lf, Config::File);
+ return cfg.readEntry(key);
+}
+
+
+/*!
+ Deletes both the linkFile() and file() associated with this AppLnk.
+*/
+void AppLnk::removeFiles()
+{
+ bool valid = isValid();
+ if ( !valid || QFile::remove(linkFile()) ) {
+ if ( QFile::remove(file()) ) {
+ QCopEnvelope e("QPE/System", "linkChanged(QString)");
+ e << linkFile();
+ } else if ( valid ) {
+ // restore link
+ writeLink();
+ }
+ }
+}
+
+/*!
+ Delete the linkFile(), leaving any file() untouched.
+*/
+void AppLnk::removeLinkFile()
+{
+ if ( isValid() && QFile::remove(linkFile()) ) {
+ QCopEnvelope e("QPE/System", "linkChanged(QString)");
+ e << linkFile();
+ }
+}
+
+class AppLnkSetPrivate {
+public:
+ AppLnkSetPrivate()
+ {
+ typPix.setAutoDelete(TRUE);
+ typPixBig.setAutoDelete(TRUE);
+ typName.setAutoDelete(TRUE);
+ }
+
+ QDict<QPixmap> typPix;
+ QDict<QPixmap> typPixBig;
+ QDict<QString> typName;
+};
+
+/*!
+ \class AppLnkSet applnk.h
+ \brief The AppLnkSet class is a set of AppLnk objects.
+*/
+
+/*!
+ \fn QStringList AppLnkSet::types() const
+
+ Returns the list of types in the set.
+
+ \sa AppLnk::type(), typeName(), typePixmap(), typeBigPixmap()
+*/
+
+/*!
+ \fn const QList<AppLnk>& AppLnkSet::children() const
+
+ Returns the members of the set.
+*/
+
+/*!
+ Constructs an empty AppLnkSet.
+*/
+AppLnkSet::AppLnkSet() :
+ d(new AppLnkSetPrivate)
+{
+}
+
+/*!
+ Constructs an AppLnkSet that contains AppLnk objects representing
+ all the files in a \a directory (recursively).
+
+ The directories may contain ".directory" files which overrides
+ any AppLnk::type() value of AppLnk objects found in the directory.
+ This allows simple localization of application types.
+*/
+AppLnkSet::AppLnkSet( const QString &directory ) :
+ d(new AppLnkSetPrivate)
+{
+ QDir dir( directory );
+ mFile = directory;
+ findChildren(directory,QString::null,QString::null);
+}
+
+/*!
+ Detaches all AppLnk objects from the set. The set become empty
+ and the call becomes responsible for deleting the AppLnk objects.
+*/
+void AppLnkSet::detachChildren()
+{
+ QListIterator<AppLnk> it( mApps );
+ for ( ; it.current(); ) {
+ AppLnk* a = *it;
+ ++it;
+ a->mId = 0;
+ }
+ mApps.clear();
+}
+
+/*!
+ Destroys the set, deleting all AppLnk objects it contains.
+
+ \sa detachChildren()
+*/
+AppLnkSet::~AppLnkSet()
+{
+ QListIterator<AppLnk> it( mApps );
+ for ( ; it.current(); ) {
+ AppLnk* a = *it;
+ ++it;
+ a->mId = 0;
+ delete a;
+ }
+ delete d;
+}
+
+void AppLnkSet::findChildren(const QString &dr, const QString& typ, const QString& typName, int depth)
+{
+ depth++;
+ if ( depth > 10 )
+ return;
+
+ QDir dir( dr );
+ QString typNameLocal = typName;
+
+ if ( dir.exists( ".directory" ) ) {
+ Config config( dr + "/.directory", Config::File );
+ config.setGroup( "Desktop Entry" );
+ typNameLocal = config.readEntry( "Name", typNameLocal );
+ if ( !typ.isEmpty() ) {
+ QString iconFile = config.readEntry( "Icon", "AppsIcon" );
+ QImage unscaledIcon = Resource::loadImage( iconFile );
+ QPixmap pm, bpm;
+ pm.convertFromImage( unscaledIcon.smoothScale( smallSize, smallSize ) );
+ bpm.convertFromImage( unscaledIcon.smoothScale( bigSize, bigSize ) );
+ d->typPix.insert(typ, new QPixmap(pm));
+ d->typPixBig.insert(typ, new QPixmap(bpm));
+ d->typName.insert(typ, new QString(typNameLocal));
+ }
+ }
+
+ const QFileInfoList *list = dir.entryInfoList();
+ if ( list ) {
+ QFileInfo* fi;
+ bool cadded=FALSE;
+ for ( QFileInfoListIterator it(*list); (fi=*it); ++it ) {
+ QString bn = fi->fileName();
+ if ( bn[0] != '.' && bn != "CVS" ) {
+ if ( fi->isDir() ) {
+ QString c = typ.isNull() ? bn : typ+"/"+bn;
+ QString d = typNameLocal.isNull() ? bn : typNameLocal+"/"+bn;
+ findChildren(fi->filePath(), c, d, depth );
+ } else {
+ if ( fi->extension(FALSE) == "desktop" ) {
+ AppLnk* app = new AppLnk( fi->filePath() );
+#ifdef QT_NO_QWS_MULTIPROCESS
+ if ( !Global::isBuiltinCommand( app->exec() ) )
+ delete app;
+ else
+#endif
+ {
+ if ( !typ.isEmpty() ) {
+ if ( !cadded ) {
+ typs.append(typ);
+ cadded = TRUE;
+ }
+ app->setType(typ);
+ }
+ add(app);
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+/*!
+ Adds \a f to the set. The set takes over responsibility for deleting \a f.
+
+ \sa remove()
+*/
+void AppLnkSet::add( AppLnk *f )
+{
+ if ( f->mId == 0 ) {
+ AppLnk::lastId++;
+ f->mId = AppLnk::lastId;
+ mApps.append( f );
+ } else {
+ qWarning("Attempt to add an AppLnk twice");
+ }
+}
+
+/*!
+ Removes \a f to the set, returning whether \a f was in the set.
+ The caller becomes responsible for deleting \a f.
+
+ \sa add()
+*/
+bool AppLnkSet::remove( AppLnk *f )
+{
+ if ( mApps.remove( f ) ) {
+ f->mId = 0;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+/*!
+ Returns the localized name for type \a t.
+*/
+QString AppLnkSet::typeName( const QString& t ) const
+{
+ QString *st = d->typName.find(t);
+ return st ? *st : QString::null;
+}
+
+/*!
+ Returns the small pixmap associated with type \a t.
+*/
+QPixmap AppLnkSet::typePixmap( const QString& t ) const
+{
+ QPixmap *pm = d->typPix.find(t);
+ return pm ? *pm : QPixmap();
+}
+
+/*!
+ Returns the large pixmap associated with type \a t.
+*/
+QPixmap AppLnkSet::typeBigPixmap( const QString& t ) const
+{
+ QPixmap *pm = d->typPixBig.find(t);
+ return pm ? *pm : QPixmap();
+}
+
+/*!
+ Returns the AppLnk with the given \a id.
+*/
+const AppLnk *AppLnkSet::find( int id ) const
+{
+ QListIterator<AppLnk> it( children() );
+
+ for ( ; it.current(); ++it ) {
+ const AppLnk *app = it.current();
+ if ( app->id() == id )
+ return app;
+ }
+
+ return 0;
+}
+
+/*!
+ Returns the AppLnk with the given \a exec attribute.
+*/
+const AppLnk *AppLnkSet::findExec( const QString& exec ) const
+{
+ QListIterator<AppLnk> it( children() );
+
+ for ( ; it.current(); ++it ) {
+ const AppLnk *app = it.current();
+ if ( app->exec() == exec )
+ return app;
+ }
+
+ return 0;
+}
+
+/*!
+ \class DocLnkSet applnk.h
+ \brief The DocLnkSet class is a set of DocLnk objects.
+*/
+
+/*!
+ \fn const QList<DocLnk>& DocLnkSet::children() const
+
+ Returns the members of the set.
+*/
+
+/*!
+ Constructs an empty DocLnkSet.
+
+ \sa appendFrom()
+*/
+DocLnkSet::DocLnkSet()
+{
+}
+
+/*!
+ Constructs an DocLnkSet that contains DocLnk objects representing
+ all the files in a \a directory (recursively).
+
+ If \a mimefilter is not null,
+ only documents with a MIME type matching \a mimefilter are selected.
+ The value may contain multiple wild-card patterns separated by ";",
+ such as "*o/mpeg;audio/x-wav".
+*/
+DocLnkSet::DocLnkSet( const QString &directory, const QString& mimefilter ) :
+ AppLnkSet()
+{
+ QDir dir( directory );
+ mFile = dir.dirName();
+ QDict<void> reference;
+
+ QStringList subFilter = QStringList::split(";", mimefilter);
+ QValueList<QRegExp> mimeFilters;
+ for( QStringList::Iterator it = subFilter.begin(); it != subFilter.end(); ++ it )
+ mimeFilters.append( QRegExp(*it, FALSE, TRUE) );
+
+ findChildren(directory, mimeFilters, reference);
+
+ const QList<DocLnk> &list = children();
+ for ( QListIterator<DocLnk> it( list ); it.current(); ++it ) {
+ reference.remove( (*it)->file() );
+ }
+
+ for ( QDictIterator<void> dit(reference); dit.current(); ++dit ) {
+ if ( dit.current() == (void*)2 ) {
+ // Unreferenced, make an unwritten link
+ DocLnk* dl = new DocLnk;
+ QFileInfo fi( dit.currentKey() );
+ dl->setFile(fi.filePath());
+ dl->setName(fi.baseName());
+ // #### default to current path?
+ // dl->setCategories( ... );
+ bool match = mimefilter.isNull();
+ if ( !match )
+ for( QValueList<QRegExp>::Iterator it = mimeFilters.begin(); it != mimeFilters.end() && !match; ++ it )
+ if ( (*it).match(dl->type()) >= 0 )
+ match = TRUE;
+ if ( match /* && dl->type() != "application/octet-stream" */
+ && !!dl->exec() )
+ add(dl);
+ else
+ delete dl;
+ }
+ }
+}
+
+// other becomes empty
+/*!
+ Transfers all DocLnk objects from \a other to this set. \a other becomes
+ empty.
+*/
+void DocLnkSet::appendFrom( DocLnkSet& other )
+{
+ if ( &other == this )
+ return;
+ QListIterator<AppLnk> it( other.mApps );
+ for ( ; it.current(); ) {
+ mApps.append(*it);
+ ++it;
+ }
+ other.mApps.clear();
+}
+
+void DocLnkSet::findChildren(const QString &dr, const QValueList<QRegExp> &mimeFilters, QDict<void> &reference, int depth)
+{
+ depth++;
+ if ( depth > 10 )
+ return;
+
+ QDir dir( dr );
+
+ const QFileInfoList *list = dir.entryInfoList();
+ if ( list ) {
+ QFileInfo* fi;
+ for ( QFileInfoListIterator it(*list); (fi=*it); ++it ) {
+ QString bn = fi->fileName();
+ if ( bn[0] != '.' && bn != "CVS" ) {
+ if ( fi->isDir() ) {
+ findChildren(fi->filePath(), mimeFilters, reference, depth);
+ } else {
+ if ( fi->extension(FALSE) == "desktop" ) {
+ DocLnk* dl = new DocLnk( fi->filePath() );
+ QFileInfo fi2(dl->file());
+ bool match = FALSE;
+ if ( !fi2.exists() ) {
+ dir.remove( dl->file() );
+ }
+ if ( mimeFilters.count() == 0 ) {
+ add( dl );
+ match = TRUE;
+ } else {
+ for( QValueList<QRegExp>::ConstIterator it = mimeFilters.begin(); it != mimeFilters.end(); ++ it ) {
+ if ( (*it).match(dl->type()) >= 0 ) {
+ add(dl);
+ match = TRUE;
+ }
+ }
+ }
+ if ( !match )
+ delete dl;
+ } else {
+ if ( !reference.find(fi->fileName()) )
+ reference.insert(fi->filePath(), (void*)2);
+ }
+ }
+ }
+ }
+ }
+}
+
+/*!
+ \class DocLnk applnk.h
+ \brief The DocLnk class represents loaded document references.
+*/
+
+/*!
+ \fn DocLnk::DocLnk( const DocLnk &o )
+
+ Copies \a o.
+*/
+
+/*!
+ Constructs a DocLnk from a valid .desktop \a file or a new .desktop
+ \a file for other files.
+*/
+DocLnk::DocLnk( const QString &file ) :
+ AppLnk(file)
+{
+ init(file);
+}
+
+/*!
+ Constructs a DocLnk from a valid .desktop \a file or a new .desktop
+ \a file for other files. If \a may_be_desktopfile is TRUE, then \a file
+ is first attempted to be read as a .desktop file.
+*/
+DocLnk::DocLnk( const QString &file, bool may_be_desktopfile ) :
+ AppLnk(may_be_desktopfile ? file : QString::null)
+{
+ init(file);
+}
+
+void DocLnk::init(const QString &file)
+{
+ if ( isValid() ) {
+#ifndef FORCED_DIR_STRUCTURE_WAY
+ if ( mType.isNull() )
+ // try to infer it
+#endif
+ {
+ int s0 = file.findRev('/');
+ if ( s0 > 0 ) {
+ int s1 = file.findRev('/',s0-1);
+ if ( s1 > 0 ) {
+ int s2 = file.findRev('/',s1-1);
+ if ( s2 > 0 ) {
+ mType = file.mid(s2+1,s0-s2-1);
+ }
+ }
+ }
+ }
+ } else if ( QFile::exists(file) ) {
+ QString n = file;
+ n.replace(QRegExp("\\..*"),"");
+ n.replace(QRegExp(".*/"),"");
+ setName( n );
+ setFile( file );
+ }
+ MimeType mt(mType);
+ if( mt.application() )
+ mExec = mt.application()->exec();
+}
+
+/*!
+ Constructs an invalid DocLnk.
+*/
+DocLnk::DocLnk()
+{
+}
+
+/*!
+ Destroys the DocLnk. As with AppLnk objects, a run-time error
+ occurs if the DocLnk is a member of a DocLnkSet (or AppLnkSet).
+*/
+DocLnk::~DocLnk()
+{
+}
+
+/*!
+ \reimp
+*/
+QString DocLnk::exec() const
+{
+ MimeType mt(type());
+ const AppLnk* app = mt.application();
+ if ( app )
+ return app->exec();
+ else
+ return QString::null;
+}
+
+/*!
+ \reimp
+*/
+void DocLnk::invoke(const QStringList& args) const
+{
+ MimeType mt(type());
+ const AppLnk* app = mt.application();
+ if ( app ) {
+ QStringList a = args;
+ if ( QFile::exists( linkFile() ) )
+ a.append(linkFile());
+ else
+ a.append(file());
+ app->execute(a);
+ }
+}
+
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef __APPLNK_H__
+#define __APPLNK_H__
+
+#include <qobject.h>
+#include <qiconset.h>
+#include <qlist.h>
+#include <qdict.h>
+#include <qstringlist.h>
+
+class AppLnkSetPrivate;
+class AppLnkPrivate;
+
+class AppLnk
+{
+public:
+ AppLnk();
+ AppLnk( const QString &file );
+ AppLnk( const AppLnk &copy ); // copy constructor
+ virtual ~AppLnk();
+
+ bool isValid() const { return !mLinkFile.isNull(); }
+
+ static void setSmallIconSize(int);
+ static void setBigIconSize(int);
+ static int smallIconSize();
+ static int bigIconSize();
+
+ QString name() const { return mName; }
+ const QPixmap& pixmap() const;
+ const QPixmap& bigPixmap() const;
+ virtual QString exec() const { return mExec; }
+ QString type() const;
+ QString rotation() const { return mRotation; }
+ QString comment() const { return mComment; }
+ QString file() const;
+ QString linkFile() const;
+ QStringList mimeTypes() const { return mMimeTypes; }
+ QStringList mimeTypeIcons() const { return mMimeTypeIcons; }
+ const QArray<int> &categories() const;
+ int id() const { return mId; }
+
+ void execute() const;
+ void execute(const QStringList& args) const;
+ void removeFiles();
+ void removeLinkFile();
+
+ void setName( const QString& docname );
+ void setExec( const QString& exec );
+ void setFile( const QString& filename );
+ void setLinkFile( const QString& filename );
+ void setComment( const QString& comment );
+ void setType( const QString& mimetype );
+ void setIcon( const QString& iconname );
+ void setCategories( const QArray<int> &v );
+ bool writeLink() const;
+
+ void setProperty(const QString& key, const QString& value);
+ QString property(const QString& key) const;
+
+protected:
+ QString mName;
+ QPixmap mPixmap;
+ QPixmap mBigPixmap;
+ QString mExec;
+ QString mType;
+ QString mRotation;
+ QString mComment;
+ QString mFile;
+ QString mLinkFile;
+ QString mIconFile;
+ QStringList mMimeTypes;
+ QStringList mMimeTypeIcons;
+ int mId;
+ static int lastId;
+ AppLnkPrivate *d;
+ friend class AppLnkSet;
+
+ virtual void invoke(const QStringList& args) const;
+ bool ensureLinkExists() const;
+};
+
+class DocLnk : public AppLnk
+{
+public:
+ DocLnk();
+ DocLnk( const DocLnk &o ) : AppLnk(o) { }
+ DocLnk( const QString &file );
+ DocLnk( const QString &file, bool may_be_desktopfile );
+ virtual ~DocLnk();
+
+ QString exec() const;
+
+protected:
+ void invoke(const QStringList& args) const;
+
+private:
+ void init(const QString &file);
+};
+
+class AppLnkSet
+{
+public:
+ AppLnkSet();
+ AppLnkSet( const QString &dir );
+ ~AppLnkSet();
+
+ const AppLnk *find( int id ) const;
+ const AppLnk *findExec( const QString& execname ) const;
+
+ QStringList types() const { return typs; }
+ QString typeName( const QString& ) const;
+ QPixmap typePixmap( const QString& ) const;
+ QPixmap typeBigPixmap( const QString& ) const;
+
+ void add(AppLnk*);
+ bool remove(AppLnk*);
+
+ const QList<AppLnk> &children() const { return mApps; }
+ void detachChildren();
+
+protected:
+ friend class AppLnk;
+ QList<AppLnk> mApps;
+ QString mFile;
+ QStringList typs;
+ AppLnkSetPrivate *d;
+
+private:
+ AppLnkSet( const AppLnkSet & ); // no copying!
+ void findChildren(const QString &, const QString& t, const QString& lt, int depth = 0);
+};
+
+class DocLnkSet : public AppLnkSet
+{
+public:
+ DocLnkSet();
+ DocLnkSet( const QString &dir, const QString &mimefilter=QString::null );
+
+ const QList<DocLnk> &children() const { return (const QList<DocLnk> &)mApps; }
+
+ void appendFrom( DocLnkSet& other );
+
+private:
+ DocLnkSet( const DocLnkSet & ); // no copying!
+ void findChildren(const QString &dr, const QValueList<QRegExp> &mimeFilters, QDict<void> &reference, int depth=0);
+};
+
+
+#endif // __APPLNK_H__
+
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 @@
+moc_*
+*.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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included
+** in the packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING
+** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A
+** PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#include "categories.h"
+#include <qfile.h>
+#include <qcstring.h>
+#include <qtextstream.h>
+#include "stringutil.h"
+
+using namespace Qtopia;
+
+/***********************************************************
+ *
+ * CategoryGroup
+ *
+ **********************************************************/
+
+#ifdef PALMTOPCENTER
+UidGen CategoryGroup::sUidGen( UidGen::PalmtopCenter );
+#else
+UidGen CategoryGroup::sUidGen( UidGen::Qtopia );
+#endif
+
+int CategoryGroup::add( const QString &label )
+{
+ if ( label == QObject::tr("All") || label == QObject::tr("Unfiled") )
+ return 0;
+
+ QMap<QString,int>::Iterator findIt = mLabelIdMap.find( label );
+ if ( findIt != mLabelIdMap.end() )
+ return 0;
+ int newUid = uidGen().generate();
+ insert( newUid, label );
+ return newUid;
+}
+
+void CategoryGroup::insert( int uid, const QString &label )
+{
+ uidGen().store( uid );
+ mIdLabelMap[uid] = label;
+ mLabelIdMap[label] = uid;
+}
+
+bool CategoryGroup::add( int uid, const QString &label )
+{
+ if ( label == QObject::tr("All") || label == QObject::tr("Unfiled") )
+ return FALSE;
+
+ QMap<QString,int>::ConstIterator labelIt = mLabelIdMap.find( label );
+ if ( labelIt != mLabelIdMap.end() )
+ return FALSE;
+ QMap<int,QString>::ConstIterator idIt = mIdLabelMap.find( uid );
+ if ( idIt != mIdLabelMap.end() )
+ return FALSE;
+ insert( uid, label );
+ return TRUE;
+}
+
+bool CategoryGroup::remove( const QString &label )
+{
+ QMap<QString,int>::Iterator findIt = mLabelIdMap.find( label );
+ if ( findIt == mLabelIdMap.end() )
+ return FALSE;
+
+ mIdLabelMap.remove( *findIt );
+ mLabelIdMap.remove( findIt );
+
+ return TRUE;
+}
+
+bool CategoryGroup::remove( int uid )
+{
+ QMap<int,QString>::Iterator idIt = mIdLabelMap.find( uid );
+ if ( idIt == mIdLabelMap.end() )
+ return FALSE;
+
+ mLabelIdMap.remove( *idIt );
+ mIdLabelMap.remove( idIt );
+
+ return TRUE;
+}
+
+bool CategoryGroup::rename( int uid, const QString &newLabel )
+{
+ if ( newLabel == QObject::tr("All") || newLabel == QObject::tr("Unfiled") )
+ return FALSE;
+
+ QMap<int, QString>::Iterator idIt = mIdLabelMap.find( uid );
+ if ( idIt == mIdLabelMap.end() )
+ return FALSE;
+
+ mLabelIdMap.remove( *idIt );
+ mLabelIdMap[newLabel] = uid;
+ *idIt = newLabel;
+
+ return TRUE;
+}
+
+bool CategoryGroup::rename( const QString &oldLabel, const QString &newLabel )
+{
+ return rename( id(oldLabel), newLabel );
+}
+
+bool CategoryGroup::contains(int uid) const
+{
+ return ( mIdLabelMap.find( uid ) != mIdLabelMap.end() );
+}
+
+bool CategoryGroup::contains(const QString &label) const
+{
+ return ( mLabelIdMap.find( label ) != mLabelIdMap.end() );
+}
+
+/** Returns label associated with the uid or QString::null if
+ * not found
+ */
+const QString &CategoryGroup::label(int uid) const
+{
+ QMap<int,QString>::ConstIterator idIt = mIdLabelMap.find( uid );
+ if ( idIt == mIdLabelMap.end() )
+ return QString::null;
+ return *idIt;
+}
+
+/** Returns the uid associated with label or 0 if not found */
+int CategoryGroup::id(const QString &label) const
+{
+ QMap<QString,int>::ConstIterator labelIt = mLabelIdMap.find( label );
+ if ( labelIt == mLabelIdMap.end() )
+ return 0;
+ return *labelIt;
+}
+
+QStringList CategoryGroup::labels() const
+{
+ QStringList labels;
+ for ( QMap<int, QString>::ConstIterator it = mIdLabelMap.begin();
+ it != mIdLabelMap.end(); ++it )
+ labels += *it;
+ // ### I don't think this is the place for this...
+// labels.sort();
+ return labels;
+}
+
+QStringList CategoryGroup::labels(const QArray<int> &catids ) const
+{
+ QStringList labels;
+ if ( catids.count() == 0 )
+ return labels;
+ for ( QMap<int, QString>::ConstIterator it = mIdLabelMap.begin();
+ it != mIdLabelMap.end(); ++it )
+ if ( catids.find( it.key() ) != -1 )
+ labels += *it;
+ return labels;
+}
+
+QArray<int> CategoryGroup::ids( const QStringList &cats ) const
+{
+ QArray<int> results;
+
+ for ( QStringList::ConstIterator catIt = cats.begin();
+ catIt != cats.end(); ++catIt ) {
+ if ( *catIt == QObject::tr("All") || *catIt == QObject::tr("Unfiled") )
+ continue;
+ int value = id( *catIt );
+ if ( value != 0 ) {
+ int tmp = results.size();
+ results.resize( tmp + 1 );
+ results[ tmp ] = value;
+ }
+ }
+
+ return results;
+}
+
+QArray<int> CategoryGroup::ids() const
+{
+ QArray<int> results( mIdLabelMap.count() );
+ int i = 0;
+ for ( QMap<int, QString>::ConstIterator it = mIdLabelMap.begin();
+ it != mIdLabelMap.end(); ++it )
+ results[i++] = it.key();
+
+ return results;
+}
+
+/***********************************************************
+ *
+ * Categories
+ *
+ **********************************************************/
+
+/** Add the category name as long as it doesn't already exist locally
+ * or globally. Return TRUE if added, FALSE if conflicts.
+ */
+int Categories::addCategory( const QString &appname,
+ const QString &catname,
+ int uid )
+{
+ if ( mGlobalCats.contains(catname) )
+ return 0;
+
+ QMap< QString, CategoryGroup >::Iterator
+ appIt = mAppCats.find( appname );
+
+ if ( appIt == mAppCats.end() ) {
+ CategoryGroup newgroup;
+ newgroup.add( uid, catname );
+ mAppCats.insert( appname, newgroup );
+ emit categoryAdded( *this, appname, uid );
+ return uid;
+ }
+
+ CategoryGroup &cats = *appIt;
+ cats.add( uid, catname );
+ emit categoryAdded( *this, appname, uid );
+ return uid;
+}
+
+int Categories::addCategory( const QString &appname,
+ const QString &catname )
+{
+ if ( mGlobalCats.contains(catname) )
+ return 0;
+
+ QMap< QString, CategoryGroup >::Iterator
+ appIt = mAppCats.find( appname );
+
+ if ( appIt == mAppCats.end() ) {
+ CategoryGroup newgroup;
+ int uid = newgroup.add( catname );
+ mAppCats.insert( appname, newgroup );
+ emit categoryAdded( *this, appname, uid );
+ return uid;
+ }
+
+ CategoryGroup &cats = *appIt;
+ int uid = cats.add( catname );
+ if ( !uid )
+ return 0;
+ emit categoryAdded( *this, appname, uid );
+ return uid;
+}
+
+int Categories::addGlobalCategory( const QString &catname, int uid )
+{
+ mGlobalCats.add( uid, catname );
+ emit categoryAdded( *this, QString::null, uid );
+ return uid;
+}
+
+int Categories::addGlobalCategory( const QString &catname )
+{
+ int uid = mGlobalCats.add( catname );
+ if ( !uid )
+ return 0;
+ emit categoryAdded( *this, QString::null, uid );
+ return uid;
+}
+
+/** Removes the category from the application; if it is not found
+ * in the application, then it attempts to remove it from
+ * the global list
+ */
+bool Categories::removeCategory( const QString &appname,
+ const QString &catname,
+ bool checkGlobal )
+{
+ QMap< QString, CategoryGroup >::Iterator
+ appIt = mAppCats.find( appname );
+ if ( appIt != mAppCats.end() ) {
+ CategoryGroup &cats = *appIt;
+ int uid = cats.id( catname );
+ if ( cats.remove( uid ) ) {
+ emit categoryRemoved( *this, appname, uid );
+ return TRUE;
+ }
+ }
+ if ( !checkGlobal )
+ return FALSE;
+ return removeGlobalCategory( catname );
+}
+
+bool Categories::removeCategory( const QString &appname, int uid )
+{
+ QMap< QString, CategoryGroup >::Iterator
+ appIt = mAppCats.find( appname );
+ if ( appIt != mAppCats.end() ) {
+ CategoryGroup &cats = *appIt;
+ if ( cats.remove( uid ) ) {
+ emit categoryRemoved( *this, appname, uid );
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+bool Categories::removeGlobalCategory( const QString &catname )
+{
+ int uid = mGlobalCats.id( catname );
+ if ( mGlobalCats.remove( uid ) ) {
+ emit categoryRemoved( *this, QString::null, uid );
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
+bool Categories::removeGlobalCategory( int uid )
+{
+ if ( mGlobalCats.remove( uid ) ) {
+ emit categoryRemoved( *this, QString::null, uid );
+ return TRUE;
+ }
+ return FALSE;
+}
+
+/** Returns the sorted list of all categories that are associated with
+ * the app. If includeGlobal parameter is TRUE then the returned
+ * categories will include the global category items.
+ */
+QStringList Categories::labels( const QString &app,
+ bool includeGlobal,
+ ExtraLabels extra ) const
+{
+ QMap< QString, CategoryGroup >::ConstIterator
+ appIt = mAppCats.find( app );
+ QStringList cats;
+ switch ( extra ) {
+ case NoExtra: break;
+ case AllUnfiled:
+ cats.append( tr("All") );
+ cats.append( tr("Unfiled") );
+ break;
+ case AllLabel:
+ cats.append( tr("All") );
+ break;
+ case UnfiledLabel:
+ cats.append( tr("Unfiled") );
+ break;
+ }
+ if ( appIt != mAppCats.end() )
+ cats += (*appIt).labels();
+ else qDebug("Categories::labels didn't find app %s", app.latin1() );
+ if ( includeGlobal )
+ cats += mGlobalCats.labels();
+ // I don't think a sorted list is useful, the user might find prefer
+ // it in the original order.
+// cats.sort();
+ return cats;
+}
+
+QString Categories::label( const QString &app, int id ) const
+{
+ if ( mGlobalCats.contains( id ) )
+ return mGlobalCats.label( id );
+ QMap< QString, CategoryGroup >::ConstIterator
+ appIt = mAppCats.find( app );
+ if ( appIt == mAppCats.end() )
+ return QString::null;
+ return (*appIt).label( id );
+}
+
+QStringList Categories::labels( const QString & app,
+ const QArray<int> &catids ) const
+{
+ QStringList strs = mGlobalCats.labels( catids );
+ strs += mAppCats[app].labels( catids );
+ return strs;
+}
+
+/** Returns a single string associated with the cat ids for display in
+ * a combobox or any area that requires one string. If catids are empty
+ * then "Unfiled" will be returned. If multiple categories are assigned
+ * the first cat id is shown with " (multi)" appended to the string.
+ */
+QString Categories::displaySingle( const QString &app,
+ const QArray<int> &catids,
+ DisplaySingle display ) const
+{
+ QStringList strs = labels( app, catids );
+ if ( !strs.count() )
+ return tr("Unfiled");
+ strs.sort();
+ QString r;
+ if ( strs.count() > 1 ) {
+ switch ( display ) {
+ case ShowFirst:
+ r = strs.first();
+ break;
+ case ShowMulti:
+ r = strs.first() + tr(" (multi.)");
+ break;
+ case ShowAll:
+ r = strs.join(" ");
+ break;
+ }
+ }
+ else r = strs.first();
+ return r;
+}
+
+QArray<int> Categories::ids( const QString &app ) const
+{
+ QArray<int> allIds = mGlobalCats.ids();
+ QArray<int> appIds = mAppCats[app].ids();
+
+ // we should make the guarentee that the ids are in the
+ // same order as the labels, (i.e. app cats then global)
+ // otherwise there is no point in having these two separate functions.
+ uint appSize = appIds.size();
+ appIds.resize( appSize + allIds.size() );
+ for ( uint i = appSize; i < appIds.size(); ++i )
+ appIds[int(i)] = allIds[int(i - appSize)];
+
+ return appIds;
+}
+
+QArray<int> Categories::ids( const QString &app, const QStringList &cats ) const
+{
+ QArray<int> allIds = mGlobalCats.ids( cats );
+ QArray<int> appIds = mAppCats[app].ids( cats );
+
+ uint appSize = appIds.size();
+ appIds.resize( appSize + allIds.size() );
+ for ( uint i = appSize; i < appIds.size(); ++i )
+ appIds[int(i)] = allIds[int(i - appSize)];
+
+ return appIds;
+}
+
+int Categories::id( const QString &app, const QString &cat ) const
+{
+ if ( cat == tr("Unfiled") || cat.contains( tr(" (multi.)") ) )
+ return 0;
+ int uid = mGlobalCats.id( cat );
+ if ( uid != 0 )
+ return uid;
+ return mAppCats[app].id( cat );
+}
+
+
+/** Return TRUE if renaming succeeded; FALSE if app name not found,
+ * or if there was a name conflict
+ */
+bool Categories::renameCategory( const QString &appname,
+ const QString &oldName,
+ const QString &newName )
+{
+ QMap< QString, CategoryGroup >::Iterator
+ appIt = mAppCats.find( appname );
+
+ if ( appIt != mAppCats.end() ) {
+ CategoryGroup &cats = *appIt;
+ int id = cats.id( oldName );
+ if ( id != 0 && cats.rename( id, newName ) ) {
+ emit categoryRenamed( *this, appname, id );
+ return TRUE;
+ }
+ }
+ return renameGlobalCategory( oldName, newName );
+}
+
+bool Categories::renameGlobalCategory( const QString &oldName,
+ const QString &newName )
+{
+ int uid = mGlobalCats.id( oldName );
+ if ( uid != 0 && mGlobalCats.rename( uid, newName ) ) {
+ emit categoryRenamed( *this, QString::null, uid );
+ return TRUE;
+ }
+ return FALSE;
+}
+
+void Categories::setGlobal( const QString &appname,
+ const QString &catname,
+ bool global )
+{
+ // if in global and should be in app; then move it
+ if ( mGlobalCats.contains( catname ) && !global ) {
+ mGlobalCats.remove( catname );
+ addCategory( appname, catname );
+ return ;
+ }
+
+ // if in app and should be in global, then move it
+ if ( !global )
+ return;
+ if ( removeCategory( appname, catname, FALSE ) )
+ addGlobalCategory( catname );
+}
+
+bool Categories::isGlobal( const QString &catname ) const
+{
+ return mGlobalCats.contains( catname );
+}
+
+
+/** Returns true if the catname is associated with any application
+ */
+bool Categories::exists( const QString &catname ) const
+{
+ if ( isGlobal(catname) )
+ return TRUE;
+
+ for ( QMap<QString, CategoryGroup>::ConstIterator appsIt = mAppCats.begin(); appsIt != mAppCats.end(); ++appsIt )
+ if ( exists( appsIt.key(), catname ) )
+ return TRUE;
+
+ return FALSE;
+}
+
+bool Categories::exists( const QString &appname,
+ const QString &catname) const
+{
+ QMap< QString, CategoryGroup >::ConstIterator
+ appIt = mAppCats.find( appname );
+
+ if ( appIt == mAppCats.end() )
+ return FALSE;
+
+ return (*appIt).contains( catname );
+}
+
+bool Categories::save( const QString &fname ) const
+{
+ QFile file( fname );
+ if ( !file.open( IO_WriteOnly ) ) {
+ qWarning("Unable to write to %s", fname.latin1());
+ return FALSE;
+ }
+
+ QTextStream ts( &file );
+ ts << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+ ts << "<!DOCTYPE CategoryList>" << endl;
+
+ ts << "<Categories>" << endl;
+ for ( QMap<int, QString>::ConstIterator git = mGlobalCats.idMap().begin();
+ git != mGlobalCats.idMap().end(); ++git )
+ ts << "<Category id=\"" << git.key() << "\""
+ << " name=\"" << escapeString(*git) << "\" />" << endl;
+
+ for ( QMap<QString, CategoryGroup>::ConstIterator appsIt=mAppCats.begin();
+ appsIt != mAppCats.end(); ++appsIt ) {
+ const QString &app = appsIt.key();
+ const QMap<int, QString> &appcats = (*appsIt).idMap();
+ for ( QMap<int, QString>::ConstIterator appcatit = appcats.begin();
+ appcatit != appcats.end(); ++appcatit )
+ ts << "<Category id=\"" << appcatit.key() << "\""
+ << " app=\"" << escapeString(app) << "\""
+ << " name=\"" << escapeString(*appcatit) << "\" />" << endl;
+ }
+ ts << "</Categories>" << endl;
+
+ file.close();
+ return TRUE;
+}
+
+bool Categories::load( const QString &fname )
+{
+ QFile file( fname );
+ if ( !file.open( IO_ReadOnly ) ) {
+ qWarning("Unable to open %s", fname.latin1());
+ return FALSE;
+ }
+
+ clear();
+ QByteArray ba = file.readAll();
+ QString data = QString::fromUtf8( ba.data(), ba.size() );
+ QChar *uc = (QChar *)data.unicode();
+ int len = data.length();
+
+ // QTime t;
+ // t.start();
+ QString name;
+ QString id;
+ QString app;
+ int i = 0;
+ while ( (i = data.find( "<Category ", i)) != -1 ) {
+
+ i += 10;
+ name = QString::null;
+ app = QString::null;
+ while ( 1 ) {
+ // skip white space
+ while ( i < len &&
+ (uc[i] == ' ' || uc[i] == '\n' || uc[i] == '\r') )
+ i++;
+ // if at the end, then done
+ if ( i >= len-2 || (uc[i] == '/' && uc[i+1] == '>') )
+ break;
+ // we have another attribute read it.
+ int j = i;
+ while ( j < len && uc[j] != '=' )
+ j++;
+ QString attr = QConstString( uc+i, j-i ).string();
+ i = ++j; // skip =
+ while ( i < len && uc[i] != '"' )
+ i++;
+ j = ++i;
+ while ( j < len && uc[j] != '"' )
+ j++;
+ QString value = Qtopia::plainString( QConstString( uc+i, j-i ).string() );
+ i = j + 1;
+
+// qDebug("attr='%s' value='%s'", attr.latin1(), value.latin1() );
+ if ( attr == "id" )
+ id = value;
+ else if ( attr == "app" )
+ app = value;
+
+ else if ( attr == "name" )
+ name = value;
+ }
+
+ if ( name.isNull() || id.isNull() ) {
+ qWarning("No name or id in the category");
+ continue;
+ }
+ if ( app.isNull() )
+ mGlobalCats.add( id.toInt(), name );
+ else
+ mAppCats[ app ].add( id.toInt(), name );
+ }
+
+ return TRUE;
+}
+
+void Categories::clear()
+{
+ mGlobalCats.clear();
+ mAppCats.clear();
+}
+
+void Categories::dump() const
+{
+ qDebug("\tglobal categories = %s", mGlobalCats.labels().join(", ").latin1() );
+ for ( QMap<QString, CategoryGroup>::ConstIterator appsIt = mAppCats.begin(); appsIt != mAppCats.end(); ++appsIt ) {
+ const QString &app = appsIt.key();
+ QStringList appcats = (*appsIt).labels();
+ qDebug("\tapp = %s\tcategories = %s", app.latin1(),
+ appcats.join(", ").latin1() );
+
+ }
+}
+
+QStringList CheckedListView::checked() const
+{
+ QStringList strs;
+ for ( QCheckListItem *i = (QCheckListItem *) firstChild();
+ i; i = (QCheckListItem *)i->nextSibling() )
+ if ( i->isOn() )
+ strs += i->text( 0 );
+ return strs;
+}
+
+void CheckedListView::addCheckableList( const QStringList &options )
+{
+ for ( QStringList::ConstIterator it = options.begin();
+ it != options.end(); ++it ) {
+ (void) new QCheckListItem( this, *it,
+ QCheckListItem::CheckBox );
+ }
+}
+
+void CheckedListView::setChecked( const QStringList &checked )
+{
+ // iterate over all items
+ bool showingChecked = FALSE;
+ for ( QCheckListItem *i = (QCheckListItem *) firstChild();
+ i; i = (QCheckListItem *)i->nextSibling() )
+ // see if the item should be checked by searching the
+ // checked list
+ if ( checked.find( i->text( 0 ) ) != checked.end() ) {
+ i->setOn( TRUE );
+ // make sure it is showing at least one checked item
+ if ( !showingChecked ) {
+ ensureItemVisible( i );
+ showingChecked = TRUE;
+ }
+ }
+ else
+ i->setOn( FALSE );
+}
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included
+** in the packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING
+** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A
+** PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QTPALMTOP_CATEGORIES_H
+#define QTPALMTOP_CATEGORIES_H
+
+#include <qstring.h>
+#include <qstringlist.h>
+#include <qmap.h>
+#include <qlistview.h>
+#include <qarray.h>
+#include "qpcglobal.h"
+#include "palmtopuidgen.h"
+
+class CategoryGroup;
+
+#if defined(QPC_TEMPLATEDLL)
+// MOC_SKIP_BEGIN
+template class QPC_EXPORT QMap<int, QString>;
+template class QPC_EXPORT QMap<QString, int>;
+template class QPC_EXPORT QMap< QString, CategoryGroup >;
+// MOC_SKIP_END
+#endif
+
+class QPC_EXPORT CategoryGroup
+{
+ friend class Categories;
+public:
+ CategoryGroup(): mIdLabelMap(), mLabelIdMap() { }
+ CategoryGroup( const CategoryGroup &c ) :
+ mIdLabelMap( c.mIdLabelMap), mLabelIdMap( c.mLabelIdMap ) { }
+
+ void clear() { mIdLabelMap.clear(); mLabelIdMap.clear(); }
+
+ int add( const QString &label );
+ bool add( int uid, const QString &label );
+
+ bool remove( const QString &label );
+ bool remove( int uid );
+
+ bool rename( int uid, const QString &newLabel );
+ bool rename( const QString &oldLabel, const QString &newLabel );
+
+ bool contains(int id) const;
+ bool contains(const QString &label) const;
+
+ /** Returns label associated with the uid or QString::null if
+ * not found
+ */
+ const QString &label(int id) const;
+ /** Returns the uid associated with label or 0 if not found */
+ int id(const QString &label) const;
+
+ /** Returns a sorted list of labels */
+ QStringList labels() const;
+ QArray<int> ids( const QStringList &cats ) const;
+ QArray<int> ids() const;
+ QStringList labels( const QArray<int> &catids ) const;
+
+ const QMap<int, QString> &idMap() const { return mIdLabelMap; }
+
+private:
+ void insert( int uid, const QString &label );
+ QMap<int, QString> mIdLabelMap;
+ QMap<QString, int> mLabelIdMap;
+
+ static Qtopia::UidGen &uidGen() { return sUidGen; }
+ static Qtopia::UidGen sUidGen;
+};
+
+/** Map from application name to categories */
+class QPC_EXPORT Categories : public QObject
+{
+ Q_OBJECT
+public:
+ Categories( QObject *parent=0, const char *name = 0 )
+ : QObject( parent, name ), mGlobalCats(), mAppCats() { }
+ Categories( const Categories &copyFrom ) : QObject( copyFrom.parent() ),
+ mGlobalCats( copyFrom.mGlobalCats ),
+ mAppCats( copyFrom.mAppCats ) { }
+ virtual ~Categories() { }
+
+ Categories &operator= ( const Categories &c )
+{ mAppCats = c.mAppCats; mGlobalCats = c.mGlobalCats; return *this; }
+
+ void clear();
+
+ /** Add the category name as long as it doesn't already exist
+ * locally or globally. Return UID if added, 0 if conflicts
+ * (error).
+ */
+ int addCategory( const QString &appname, const QString &catname);
+ /** Add the category name as long as it doesn't already exist
+ * locally or globally. Return UID if added, 0 if conflicts
+ * (error).
+ */
+ int addCategory( const QString &appname, const QString &catname, int uid);
+ /** Add the global category just checking that it doesn't
+ * already exist globally. Return UID if added, 0 if conflicts.
+ */
+ int addGlobalCategory( const QString &catname );
+ /** Add the global category just checking that it doesn't
+ * already exist globally. Return UID if added, 0 if conflicts.
+ */
+ int addGlobalCategory( const QString &catname, int uid );
+ /** Removes the category from the application; if it is not found
+ * in the application, then it removes it from the global list
+ */
+ bool removeCategory( const QString &appName, const QString &catName,
+ bool checkGlobal = TRUE);
+ bool removeCategory( const QString &appName, int uid );
+ bool removeGlobalCategory( const QString &catName );
+ bool removeGlobalCategory( int uid );
+
+ QArray<int> ids( const QString &app ) const;
+ QArray<int> ids( const QString &app,
+ const QStringList &cats ) const;
+ /** Returns the id associated with the app */
+ int id( const QString &app, const QString &cat ) const;
+ /** Returns the label associated with the id */
+ QString label( const QString &app, int id ) const;
+
+ enum ExtraLabels { NoExtra, AllUnfiled, AllLabel, UnfiledLabel };
+ /** Returns the sorted list of all categories that are
+ * associated with the app.
+ * If includeGlobal parameter is TRUE then the returned
+ * categories will include the global category items.
+ * If extra = NoExtra, then
+ * If extra = AllUnfiled, then All and Unfiled will be prepended to
+ * the list
+ * If extra = AllLabel, then All is prepended
+ * If extra = UnfiledLabel, then Unfiled is prepended
+ */
+ QStringList labels( const QString &app,
+ bool includeGlobal = TRUE,
+ ExtraLabels extra = NoExtra ) const;
+
+ /** Returns the labels of the categories associated with the uids */
+ QStringList labels( const QString & app,
+ const QArray<int> &catids ) const;
+
+ enum DisplaySingle { ShowMulti, ShowAll, ShowFirst };
+
+ /** Returns a single string associated with the cat ids for display in
+ * a combobox or any area that requires one string. If catids are empty
+ * then "Unfiled" will be returned. If multiple categories are assigned
+ * then the behavior depends on the DisplaySingle type.
+ * If /a display is set to ShowMulti then " (multi)" appended to the
+ * first string. If /a display is set to ShowAll, then a space seperated
+ * string is returned with all categories. If ShowFirst is returned,
+ * the just the first string is returned.
+ */
+ QString displaySingle( const QString &app,
+ const QArray<int> &catids,
+ DisplaySingle display ) const;
+
+ QStringList globalCategories() const { return mGlobalCats.labels();}
+
+ bool renameCategory( const QString &appname,
+ const QString &oldName,
+ const QString &newName );
+ bool renameGlobalCategory( const QString &oldName,
+ const QString &newName );
+
+ void setGlobal( const QString &appname, const QString &catname,
+ bool value );
+ bool isGlobal( const QString &catname ) const;
+
+
+ /** Returns true if the catname is associated with any application
+ */
+ bool exists( const QString &catname ) const;
+ bool exists( const QString &appname, const QString &catname) const;
+
+ bool save( const QString &fname ) const;
+ bool load( const QString &fname );
+
+ // for debugging
+ void dump() const;
+
+ const QMap<QString, CategoryGroup> &appGroupMap() const{ return mAppCats; }
+ const CategoryGroup &globalGroup() const { return mGlobalCats; }
+
+signals:
+ /** emitted if added a category;
+ * the second param is the application the category was added to
+ * or null if global
+ * the third param is the uid of the newly added category
+ */
+ void categoryAdded( const Categories &, const QString &, int );
+ /** emitted if removed a category
+ * the second param is the application the category was removed from
+ * or null if global
+ * the third param is the uid of the removed category
+ */
+ void categoryRemoved( const Categories &, const QString &, int );
+ /** emitted if a category is renamed; the second param is the uid of
+ * the removed category */
+ void categoryRenamed( const Categories &, const QString &, int );
+
+private:
+ CategoryGroup mGlobalCats;
+ QMap< QString, CategoryGroup > mAppCats;
+};
+
+class QPC_EXPORT CheckedListView : public QListView
+{
+public:
+ void addCheckableList( const QStringList &options );
+ void setChecked( const QStringList &checked );
+ QStringList checked() const;
+};
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2001 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "contact.h"
+#include "vobject_p.h"
+#include "qfiledirect_p.h"
+
+#include <qpe/stringutil.h>
+#include <qpe/timeconversion.h>
+
+#include <qobject.h>
+#include <qregexp.h>
+#include <qstylesheet.h>
+#include <qfileinfo.h>
+
+#include <stdio.h>
+
+Qtopia::UidGen Contact::sUidGen( Qtopia::UidGen::Qtopia );
+
+Contact::Contact()
+ : Record(), mMap(), d( 0 )
+{
+}
+
+Contact::Contact( const QMap<int, QString> &fromMap ) :
+ Record(), mMap( fromMap ), d( 0 )
+{
+ QString cats = mMap[ Qtopia::AddressCategory ];
+ if ( !cats.isEmpty() )
+ setCategories( idsFromString( cats ) );
+ QString uidStr = find( Qtopia::AddressUid );
+ if ( uidStr.isEmpty() )
+ setUid( uidGen().generate() );
+ else
+ setUid( uidStr.toInt() );
+}
+
+Contact::~Contact()
+{
+}
+
+QMap<int, QString> Contact::toMap() const
+{
+ QMap<int, QString> map = mMap;
+ map.insert( Qtopia::AddressCategory, idsToString( categories() ));
+ return map;
+}
+
+/*!
+ Returns a rich text formatted QString of the Contact.
+*/
+QString Contact::toRichText() const
+{
+ QString text;
+ QString value, comp, state;
+
+ // name, jobtitle and company
+ if ( !(value = fullName()).isEmpty() )
+ text += "<b>" + Qtopia::escapeString(value) + "</b><br>";
+ if ( !(value = jobTitle()).isEmpty() )
+ text += Qtopia::escapeString(value) + "<br>";
+
+ comp = company();
+ if ( !(value = department()).isEmpty() ) {
+ text += Qtopia::escapeString(value);
+ if ( comp )
+ text += ", ";
+ else
+ text += "<br>";
+ }
+ if ( !comp.isEmpty() )
+ text += Qtopia::escapeString(comp) + "<br>";
+
+ // business address
+ if ( !businessStreet().isEmpty() || !businessCity().isEmpty() ||
+ !businessZip().isEmpty() || !businessCountry().isEmpty() ) {
+ text += "<br>";
+ text += QObject::tr( "<b>Work Address:</b>" );
+ text += "<br>";
+ }
+
+ if ( !(value = businessStreet()).isEmpty() )
+ text += Qtopia::escapeString(value) + "<br>";
+ state = businessState();
+ if ( !(value = businessCity()).isEmpty() ) {
+ text += Qtopia::escapeString(value);
+ if ( state )
+ text += ", " + Qtopia::escapeString(state);
+ text += "<br>";
+ } else if ( !state.isEmpty() )
+ text += Qtopia::escapeString(state) + "<br>";
+ if ( !(value = businessZip()).isEmpty() )
+ text += Qtopia::escapeString(value) + "<br>";
+ if ( !(value = businessCountry()).isEmpty() )
+ text += Qtopia::escapeString(value) + "<br>";
+
+ // home address
+ if ( !homeStreet().isEmpty() || !homeCity().isEmpty() ||
+ !homeZip().isEmpty() || !homeCountry().isEmpty() ) {
+ text += "<br>";
+ text += QObject::tr( "<b>Home Address:</b>" );
+ text += "<br>";
+ }
+
+ if ( !(value = homeStreet()).isEmpty() )
+ text += Qtopia::escapeString(value) + "<br>";
+ state = homeState();
+ if ( !(value = homeCity()).isEmpty() ) {
+ text += Qtopia::escapeString(value);
+ if ( !state.isEmpty() )
+ text += ", " + Qtopia::escapeString(state);
+ text += "<br>";
+ } else if (!state.isEmpty())
+ text += Qtopia::escapeString(state) + "<br>";
+ if ( !(value = homeZip()).isEmpty() )
+ text += Qtopia::escapeString(value) + "<br>";
+ if ( !(value = homeCountry()).isEmpty() )
+ text += Qtopia::escapeString(value) + "<br>";
+
+ // the others...
+ QString str;
+ str = emails();
+ if ( !str.isEmpty() )
+ text += "<b>" + QObject::tr("Email Addresses: ") + "</b>"
+ + Qtopia::escapeString(str) + "<br>";
+ str = homePhone();
+ if ( !str.isEmpty() )
+ text += "<b>" + QObject::tr("Home Phone: ") + "</b>"
+ + Qtopia::escapeString(str) + "<br>";
+ str = homeFax();
+ if ( !str.isEmpty() )
+ text += "<b>" + QObject::tr("Home Fax: ") + "</b>"
+ + Qtopia::escapeString(str) + "<br>";
+ str = homeMobile();
+ if ( !str.isEmpty() )
+ text += "<b>" + QObject::tr("Home Mobile: ") + "</b>"
+ + Qtopia::escapeString(str) + "<br>";
+ str = homeWebpage();
+ if ( !str.isEmpty() )
+ text += "<b>" + QObject::tr("Home Web Page: ") + "</b>"
+ + Qtopia::escapeString(str) + "<br>";
+ str = businessWebpage();
+ if ( !str.isEmpty() )
+ text += "<b>" + QObject::tr("Business Web Page: ") + "</b>"
+ + Qtopia::escapeString(str) + "<br>";
+ str = office();
+ if ( !str.isEmpty() )
+ text += "<b>" + QObject::tr("Office: ") + "</b>"
+ + Qtopia::escapeString(str) + "<br>";
+ str = businessPhone();
+ if ( !str.isEmpty() )
+ text += "<b>" + QObject::tr("Business Phone: ") + "</b>"
+ + Qtopia::escapeString(str) + "<br>";
+ str = businessFax();
+ if ( !str.isEmpty() )
+ text += "<b>" + QObject::tr("Business Fax: ") + "</b>"
+ + Qtopia::escapeString(str) + "<br>";
+ str = businessMobile();
+ if ( !str.isEmpty() )
+ text += "<b>" + QObject::tr("Business Mobile: ") + "</b>"
+ + Qtopia::escapeString(str) + "<br>";
+ str = businessPager();
+ if ( !str.isEmpty() )
+ text += "<b>" + QObject::tr("Business Pager: ") + "</b>"
+ + Qtopia::escapeString(str) + "<br>";
+ str = profession();
+ if ( !str.isEmpty() )
+ text += "<b>" + QObject::tr("Profession: ") + "</b>"
+ + Qtopia::escapeString(str) + "<br>";
+ str = assistant();
+ if ( !str.isEmpty() )
+ text += "<b>" + QObject::tr("Assistant: ") + "</b>"
+ + Qtopia::escapeString(str) + "<br>";
+ str = manager();
+ if ( !str.isEmpty() )
+ text += "<b>" + QObject::tr("Manager: ") + "</b>"
+ + Qtopia::escapeString(str) + "<br>";
+ str = gender();
+ if ( !str.isEmpty() && str.toInt() != 0 ) {
+ if ( str.toInt() == 1 )
+ str = QObject::tr( "Male" );
+ else if ( str.toInt() == 2 )
+ str = QObject::tr( "Female" );
+ text += "<b>" + QObject::tr("Gender: ") + "</b>" + str + "<br>";
+ }
+ str = spouse();
+ if ( !str.isEmpty() )
+ text += "<b>" + QObject::tr("Spouse: ") + "</b>"
+ + Qtopia::escapeString(str) + "<br>";
+ str = birthday();
+ if ( !str.isEmpty() )
+ text += "<b>" + QObject::tr("Birthday: ") + "</b>"
+ + Qtopia::escapeString(str) + "<br>";
+ str = anniversary();
+ if ( !str.isEmpty() )
+ text += "<b>" + QObject::tr("Anniversary: ") + "</b>"
+ + Qtopia::escapeString(str) + "<br>";
+ str = nickname();
+ if ( !str.isEmpty() )
+ text += "<b>" + QObject::tr("Nickname: ") + "</b>"
+ + Qtopia::escapeString(str) + "<br>";
+
+ // notes last
+ if ( (value = notes()) ) {
+ QRegExp reg("\n");
+
+ //QString tmp = Qtopia::escapeString(value);
+ QString tmp = QStyleSheet::convertFromPlainText(value);
+ //tmp.replace( reg, "<br>" );
+ text += "<br>" + tmp + "<br>";
+ }
+ return text;
+}
+
+void Contact::insert( int key, const QString &v )
+{
+ QString value = v.stripWhiteSpace();
+ if ( value.isEmpty() )
+ mMap.remove( key );
+ else
+ mMap.insert( key, value );
+}
+
+void Contact::replace( int key, const QString & v )
+{
+ QString value = v.stripWhiteSpace();
+ if ( value.isEmpty() )
+ mMap.remove( key );
+ else
+ mMap.replace( key, value );
+}
+
+QString Contact::find( int key ) const
+{
+ return mMap[key];
+}
+
+QString Contact::displayAddress( const QString &street,
+ const QString &city,
+ const QString &state,
+ const QString &zip,
+ const QString &country ) const
+{
+ QString s = street;
+ if ( !street.isEmpty() )
+ s+= "\n";
+ s += city;
+ if ( !city.isEmpty() && !state.isEmpty() )
+ s += ", ";
+ s += state;
+ if ( !state.isEmpty() && !zip.isEmpty() )
+ s += " ";
+ s += zip;
+ if ( !country.isEmpty() && !s.isEmpty() )
+ s += "\n";
+ s += country;
+ return s;
+}
+
+QString Contact::displayBusinessAddress() const
+{
+ return displayAddress( businessStreet(), businessCity(),
+ businessState(), businessZip(),
+ businessCountry() );
+}
+
+QString Contact::displayHomeAddress() const
+{
+ return displayAddress( homeStreet(), homeCity(),
+ homeState(), homeZip(),
+ homeCountry() );
+}
+
+QString Contact::fullName() const
+{
+ QString title = find( Qtopia::Title );
+ QString firstName = find( Qtopia::FirstName );
+ QString middleName = find( Qtopia::MiddleName );
+ QString lastName = find( Qtopia::LastName );
+ QString suffix = find( Qtopia::Suffix );
+
+ QString name = title;
+ if ( !firstName.isEmpty() ) {
+ if ( !name.isEmpty() )
+ name += " ";
+ name += firstName;
+ }
+ if ( !middleName.isEmpty() ) {
+ if ( !name.isEmpty() )
+ name += " ";
+ name += middleName;
+ }
+ if ( !lastName.isEmpty() ) {
+ if ( !name.isEmpty() )
+ name += " ";
+ name += lastName;
+ }
+ if ( !suffix.isEmpty() ) {
+ if ( !name.isEmpty() )
+ name += " ";
+ name += suffix;
+ }
+ return name.simplifyWhiteSpace();
+}
+
+QStringList Contact::childrenList() const
+{
+ return QStringList::split( " ", find( Qtopia::Children ) );
+}
+
+QStringList Contact::emailList() const
+{
+ return QStringList::split( ";", find( Qtopia::Emails ) );
+}
+
+void Contact::setFileAs()
+{
+ QString lastName, firstName, middleName, fileas;
+
+ lastName = find( Qtopia::LastName );
+ firstName = find( Qtopia::FirstName );
+ middleName = find( Qtopia::MiddleName );
+ if ( !lastName.isEmpty() && !firstName.isEmpty()
+ && !middleName.isEmpty() )
+ fileas = lastName + ", " + firstName + " " + middleName;
+ else if ( !lastName.isEmpty() && !firstName.isEmpty() )
+ fileas = lastName + ", " + firstName;
+ else if ( !lastName.isEmpty() || !firstName.isEmpty() ||
+ !middleName.isEmpty() )
+ fileas = firstName + ( firstName.isEmpty() ? "" : " " )
+ + middleName + ( middleName.isEmpty() ? "" : " " )
+ + lastName;
+
+ replace( Qtopia::FileAs, fileas );
+}
+
+void Contact::save( QString &buf ) const
+{
+ static const QStringList SLFIELDS = fields();
+ // I'm expecting "<Contact " in front of this...
+ for ( QMap<int, QString>::ConstIterator it = mMap.begin();
+ it != mMap.end(); ++it ) {
+ const QString &value = it.data();
+ int key = it.key();
+ if ( !value.isEmpty() ) {
+ if ( key == Qtopia::AddressCategory || key == Qtopia::AddressUid)
+ continue;
+
+ key -= Qtopia::AddressCategory+1;
+ buf += SLFIELDS[key];
+ buf += "=\"" + Qtopia::escapeString(value) + "\" ";
+ }
+ }
+ buf += customToXml();
+ if ( categories().count() > 0 )
+ buf += "Categories=\"" + idsToString( categories() ) + "\" ";
+ buf += "Uid=\"" + QString::number( uid() ) + "\" ";
+ // You need to close this yourself
+}
+
+QStringList Contact::fields()
+{
+ QStringList list;
+
+ list.append( "Title" ); // Not Used!
+ list.append( "FirstName" );
+ list.append( "MiddleName" );
+ list.append( "LastName" );
+ list.append( "Suffix" );
+ list.append( "FileAs" );
+
+ list.append( "DefaultEmail" );
+ list.append( "Emails" );
+
+ list.append( "HomeStreet" );
+ list.append( "HomeCity" );
+ list.append( "HomeState" );
+ list.append( "HomeZip" );
+ list.append( "HomeCountry" );
+ list.append( "HomePhone" );
+ list.append( "HomeFax" );
+ list.append( "HomeMobile" );
+ list.append( "HomeWebPage" );
+
+ list.append( "Company" );
+ list.append( "BusinessStreet" );
+ list.append( "BusinessCity" );
+ list.append( "BusinessState" );
+ list.append( "BusinessZip" );
+ list.append( "BusinessCountry" );
+ list.append( "BusinessWebPage" );
+ list.append( "JobTitle" );
+ list.append( "Department" );
+ list.append( "Office" );
+ list.append( "BusinessPhone" );
+ list.append( "BusinessFax" );
+ list.append( "BusinessMobile" );
+ list.append( "BusinessPager" );
+ list.append( "Profession" );
+ list.append( "Assistant" );
+ list.append( "Manager" );
+
+ list.append( "Spouse" );
+ list.append( "Gender" );
+ list.append( "Birthday" );
+ list.append( "Anniversary" );
+ list.append( "Nickname" );
+
+ list.append( "Children" );
+ list.append( "Notes" );
+
+ return list;
+}
+
+QStringList Contact::trfields()
+{
+ QStringList list;
+
+ list.append( QObject::tr( "Name Title") );
+ list.append( QObject::tr( "First Name" ) );
+ list.append( QObject::tr( "Middle Name" ) );
+ list.append( QObject::tr( "Last Name" ) );
+ list.append( QObject::tr( "Suffix" ) );
+ list.append( QObject::tr( "File As" ) );
+
+ list.append( QObject::tr( "Default Email" ) );
+ list.append( QObject::tr( "Emails" ) );
+
+ list.append( QObject::tr( "Home Street" ) );
+ list.append( QObject::tr( "Home City" ) );
+ list.append( QObject::tr( "Home State" ) );
+ list.append( QObject::tr( "Home Zip" ) );
+ list.append( QObject::tr( "Home Country" ) );
+ list.append( QObject::tr( "Home Phone" ) );
+ list.append( QObject::tr( "Home Fax" ) );
+ list.append( QObject::tr( "Home Mobile" ) );
+ list.append( QObject::tr( "Home Web Page" ) );
+
+ list.append( QObject::tr( "Company" ) );
+ list.append( QObject::tr( "Business Street" ) );
+ list.append( QObject::tr( "Business City" ) );
+ list.append( QObject::tr( "Business State" ) );
+ list.append( QObject::tr( "Business Zip" ) );
+ list.append( QObject::tr( "Business Country" ) );
+ list.append( QObject::tr( "Business WebPage" ) );
+ list.append( QObject::tr( "Job Title" ) );
+ list.append( QObject::tr( "Department" ) );
+ list.append( QObject::tr( "Office" ) );
+ list.append( QObject::tr( "Business Phone" ) );
+ list.append( QObject::tr( "Business Fax" ) );
+ list.append( QObject::tr( "Business Mobile" ) );
+ list.append( QObject::tr( "Business Pager" ) );
+ list.append( QObject::tr( "Profession" ) );
+ list.append( QObject::tr( "Assistant" ) );
+ list.append( QObject::tr( "Manager" ) );
+
+ list.append( QObject::tr( "Spouse" ) );
+ list.append( QObject::tr( "Gender" ) );
+ list.append( QObject::tr( "Birthday" ) );
+ list.append( QObject::tr( "Anniversary" ) );
+ list.append( QObject::tr( "Nickname" ) );
+
+ list.append( QObject::tr( "Children" ) );
+ list.append( QObject::tr( "Notes" ) );
+
+ return list;
+}
+
+void Contact::setEmails( const QString &v )
+{
+ replace( Qtopia::Emails, v );
+ if ( v.isEmpty() )
+ setDefaultEmail( QString::null );
+}
+
+void Contact::setChildren( const QString &v )
+{
+ replace( Qtopia::Children, v );
+}
+
+// vcard conversion code
+static inline VObject *safeAddPropValue( VObject *o, const char *prop, const QString &value )
+{
+ VObject *ret = 0;
+ if ( o && !value.isEmpty() )
+ ret = addPropValue( o, prop, value.latin1() );
+ return ret;
+}
+
+static inline VObject *safeAddProp( VObject *o, const char *prop)
+{
+ VObject *ret = 0;
+ if ( o )
+ ret = addProp( o, prop );
+ return ret;
+}
+
+static VObject *createVObject( const Contact &c )
+{
+ VObject *vcard = newVObject( VCCardProp );
+ safeAddPropValue( vcard, VCVersionProp, "2.1" );
+ safeAddPropValue( vcard, VCLastRevisedProp, TimeConversion::toISO8601( QDateTime::currentDateTime() ) );
+ safeAddPropValue( vcard, VCUniqueStringProp, QString::number(c.uid()) );
+
+ // full name
+ safeAddPropValue( vcard, VCFullNameProp, c.fullName() );
+
+ // name properties
+ VObject *name = safeAddProp( vcard, VCNameProp );
+ safeAddPropValue( name, VCFamilyNameProp, c.lastName() );
+ safeAddPropValue( name, VCGivenNameProp, c.firstName() );
+ safeAddPropValue( name, VCAdditionalNamesProp, c.middleName() );
+ safeAddPropValue( name, VCNamePrefixesProp, c.title() );
+ safeAddPropValue( name, VCNameSuffixesProp, c.suffix() );
+
+ // home properties
+ VObject *home_adr= safeAddProp( vcard, VCAdrProp );
+ safeAddProp( home_adr, VCHomeProp );
+ safeAddPropValue( home_adr, VCStreetAddressProp, c.homeStreet() );
+ safeAddPropValue( home_adr, VCCityProp, c.homeCity() );
+ safeAddPropValue( home_adr, VCRegionProp, c.homeState() );
+ safeAddPropValue( home_adr, VCPostalCodeProp, c.homeZip() );
+ safeAddPropValue( home_adr, VCCountryNameProp, c.homeCountry() );
+
+ VObject *home_phone = safeAddPropValue( vcard, VCTelephoneProp, c.homePhone() );
+ safeAddProp( home_phone, VCHomeProp );
+ home_phone = safeAddPropValue( vcard, VCTelephoneProp, c.homeMobile() );
+ safeAddProp( home_phone, VCHomeProp );
+ safeAddProp( home_phone, VCCellularProp );
+ home_phone = safeAddPropValue( vcard, VCTelephoneProp, c.homeFax() );
+ safeAddProp( home_phone, VCHomeProp );
+ safeAddProp( home_phone, VCFaxProp );
+
+ VObject *url = safeAddPropValue( vcard, VCURLProp, c.homeWebpage() );
+ safeAddProp( url, VCHomeProp );
+
+ // work properties
+ VObject *work_adr= safeAddProp( vcard, VCAdrProp );
+ safeAddProp( work_adr, VCWorkProp );
+ safeAddPropValue( work_adr, VCStreetAddressProp, c.businessStreet() );
+ safeAddPropValue( work_adr, VCCityProp, c.businessCity() );
+ safeAddPropValue( work_adr, VCRegionProp, c.businessState() );
+ safeAddPropValue( work_adr, VCPostalCodeProp, c.businessZip() );
+ safeAddPropValue( work_adr, VCCountryNameProp, c.businessCountry() );
+
+ VObject *work_phone = safeAddPropValue( vcard, VCTelephoneProp, c.businessPhone() );
+ safeAddProp( work_phone, VCWorkProp );
+ work_phone = safeAddPropValue( vcard, VCTelephoneProp, c.businessMobile() );
+ safeAddProp( work_phone, VCWorkProp );
+ safeAddProp( work_phone, VCCellularProp );
+ work_phone = safeAddPropValue( vcard, VCTelephoneProp, c.businessFax() );
+ safeAddProp( work_phone, VCWorkProp );
+ safeAddProp( work_phone, VCFaxProp );
+ work_phone = safeAddPropValue( vcard, VCTelephoneProp, c.businessPager() );
+ safeAddProp( work_phone, VCWorkProp );
+ safeAddProp( work_phone, VCPagerProp );
+
+ url = safeAddPropValue( vcard, VCURLProp, c.businessWebpage() );
+ safeAddProp( url, VCWorkProp );
+
+ VObject *title = safeAddPropValue( vcard, VCTitleProp, c.jobTitle() );
+ safeAddProp( title, VCWorkProp );
+
+
+ QStringList emails = c.emailList();
+ emails.prepend( c.defaultEmail() );
+ for( QStringList::Iterator it = emails.begin(); it != emails.end(); ++it ) {
+ VObject *email = safeAddPropValue( vcard, VCEmailAddressProp, *it );
+ safeAddProp( email, VCInternetProp );
+ }
+
+ safeAddPropValue( vcard, VCNoteProp, c.notes() );
+
+ safeAddPropValue( vcard, VCBirthDateProp, c.birthday() );
+
+ if ( !c.company().isEmpty() || !c.department().isEmpty() || !c.office().isEmpty() ) {
+ VObject *org = safeAddProp( vcard, VCOrgProp );
+ safeAddPropValue( org, VCOrgNameProp, c.company() );
+ safeAddPropValue( org, VCOrgUnitProp, c.department() );
+ safeAddPropValue( org, VCOrgUnit2Prop, c.office() );
+ }
+
+ // some values we have to export as custom fields
+ safeAddPropValue( vcard, "X-Qtopia-Profession", c.profession() );
+ safeAddPropValue( vcard, "X-Qtopia-Manager", c.manager() );
+ safeAddPropValue( vcard, "X-Qtopia-Assistant", c.assistant() );
+
+ safeAddPropValue( vcard, "X-Qtopia-Spouse", c.spouse() );
+ safeAddPropValue( vcard, "X-Qtopia-Gender", c.gender() );
+ safeAddPropValue( vcard, "X-Qtopia-Anniversary", c.anniversary() );
+ safeAddPropValue( vcard, "X-Qtopia-Nickname", c.nickname() );
+ safeAddPropValue( vcard, "X-Qtopia-Children", c.children() );
+
+ return vcard;
+}
+
+
+static Contact parseVObject( VObject *obj )
+{
+ Contact c;
+
+ bool haveDefaultEmail = FALSE;
+
+ VObjectIterator it;
+ initPropIterator( &it, obj );
+ while( moreIteration( &it ) ) {
+ VObject *o = nextVObject( &it );
+ QCString name = vObjectName( o );
+ QCString value = vObjectStringZValue( o );
+ if ( name == VCNameProp ) {
+ VObjectIterator nit;
+ initPropIterator( &nit, o );
+ while( moreIteration( &nit ) ) {
+ VObject *o = nextVObject( &nit );
+ QCString name = vObjectName( o );
+ QString value = vObjectStringZValue( o );
+ if ( name == VCNamePrefixesProp )
+ c.setTitle( value );
+ else if ( name == VCNameSuffixesProp )
+ c.setSuffix( value );
+ else if ( name == VCFamilyNameProp )
+ c.setLastName( value );
+ else if ( name == VCGivenNameProp )
+ c.setFirstName( value );
+ else if ( name == VCAdditionalNamesProp )
+ c.setMiddleName( value );
+ }
+ }
+ else if ( name == VCAdrProp ) {
+ bool work = TRUE; // default address is work address
+ QString street;
+ QString city;
+ QString region;
+ QString postal;
+ QString country;
+
+ VObjectIterator nit;
+ initPropIterator( &nit, o );
+ while( moreIteration( &nit ) ) {
+ VObject *o = nextVObject( &nit );
+ QCString name = vObjectName( o );
+ QString value = vObjectStringZValue( o );
+ if ( name == VCHomeProp )
+ work = FALSE;
+ else if ( name == VCWorkProp )
+ work = TRUE;
+ else if ( name == VCStreetAddressProp )
+ street = value;
+ else if ( name == VCCityProp )
+ city = value;
+ else if ( name == VCRegionProp )
+ region = value;
+ else if ( name == VCPostalCodeProp )
+ postal = value;
+ else if ( name == VCCountryNameProp )
+ country = value;
+ }
+ if ( work ) {
+ c.setBusinessStreet( street );
+ c.setBusinessCity( city );
+ c.setBusinessCountry( country );
+ c.setBusinessZip( postal );
+ c.setBusinessState( region );
+ } else {
+ c.setHomeStreet( street );
+ c.setHomeCity( city );
+ c.setHomeCountry( country );
+ c.setHomeZip( postal );
+ c.setHomeState( region );
+ }
+ }
+ else if ( name == VCTelephoneProp ) {
+ enum {
+ HOME = 0x01,
+ WORK = 0x02,
+ VOICE = 0x04,
+ CELL = 0x08,
+ FAX = 0x10,
+ PAGER = 0x20,
+ UNKNOWN = 0x80
+ };
+ int type = 0;
+
+ VObjectIterator nit;
+ initPropIterator( &nit, o );
+ while( moreIteration( &nit ) ) {
+ VObject *o = nextVObject( &nit );
+ QCString name = vObjectName( o );
+ if ( name == VCHomeProp )
+ type |= HOME;
+ else if ( name == VCWorkProp )
+ type |= WORK;
+ else if ( name == VCVoiceProp )
+ type |= VOICE;
+ else if ( name == VCCellularProp )
+ type |= CELL;
+ else if ( name == VCFaxProp )
+ type |= FAX;
+ else if ( name == VCPagerProp )
+ type |= PAGER;
+ else if ( name == VCPreferredProp )
+ ;
+ else
+ type |= UNKNOWN;
+ }
+ if ( (type & UNKNOWN) != UNKNOWN ) {
+ if ( ( type & (HOME|WORK) ) == 0 ) // default
+ type |= HOME;
+ if ( ( type & (VOICE|CELL|FAX|PAGER) ) == 0 ) // default
+ type |= VOICE;
+
+ if ( (type & (VOICE|HOME) ) == (VOICE|HOME) )
+ c.setHomePhone( value );
+ if ( ( type & (FAX|HOME) ) == (FAX|HOME) )
+ c.setHomeFax( value );
+ if ( ( type & (CELL|HOME) ) == (CELL|HOME) )
+ c.setHomeMobile( value );
+ if ( ( type & (VOICE|WORK) ) == (VOICE|WORK) )
+ c.setBusinessPhone( value );
+ if ( ( type & (FAX|WORK) ) == (FAX|WORK) )
+ c.setBusinessFax( value );
+ if ( ( type & (CELL|WORK) ) == (CELL|WORK) )
+ c.setBusinessMobile( value );
+ if ( ( type & (PAGER|WORK) ) == (PAGER|WORK) )
+ c.setBusinessPager( value );
+ }
+ }
+ else if ( name == VCEmailAddressProp ) {
+ QString email = vObjectStringZValue( o );
+ bool valid = TRUE;
+ VObjectIterator nit;
+ initPropIterator( &nit, o );
+ while( moreIteration( &nit ) ) {
+ VObject *o = nextVObject( &nit );
+ QCString name = vObjectName( o );
+ if ( name != VCInternetProp && name != VCHomeProp &&
+ name != VCWorkProp &&
+ name != VCPreferredProp )
+ // ### preffered should map to default email
+ valid = FALSE;
+ }
+ if ( valid ) {
+ if ( haveDefaultEmail ) {
+ QString str = c.emails();
+ if ( !str.isEmpty() )
+ str += ","+email;
+ c.setEmails( str );
+ } else {
+ c.setDefaultEmail( email );
+ }
+ }
+ }
+ else if ( name == VCURLProp ) {
+ VObjectIterator nit;
+ initPropIterator( &nit, o );
+ while( moreIteration( &nit ) ) {
+ VObject *o = nextVObject( &nit );
+ QCString name = vObjectName( o );
+ if ( name == VCHomeProp )
+ c.setHomeWebpage( value );
+ else if ( name == VCWorkProp )
+ c.setBusinessWebpage( value );
+ }
+ }
+ else if ( name == VCOrgProp ) {
+ VObjectIterator nit;
+ initPropIterator( &nit, o );
+ while( moreIteration( &nit ) ) {
+ VObject *o = nextVObject( &nit );
+ QCString name = vObjectName( o );
+ QString value = vObjectStringZValue( o );
+ if ( name == VCOrgNameProp )
+ c.setCompany( value );
+ else if ( name == VCOrgUnitProp )
+ c.setDepartment( value );
+ else if ( name == VCOrgUnit2Prop )
+ c.setOffice( value );
+ }
+ }
+ else if ( name == VCTitleProp ) {
+ c.setJobTitle( value );
+ }
+ else if ( name == "X-Qtopia-Profession" ) {
+ c.setProfession( value );
+ }
+ else if ( name == "X-Qtopia-Manager" ) {
+ c.setManager( value );
+ }
+ else if ( name == "X-Qtopia-Assistant" ) {
+ c.setAssistant( value );
+ }
+ else if ( name == "X-Qtopia-Spouse" ) {
+ c.setSpouse( value );
+ }
+ else if ( name == "X-Qtopia-Gender" ) {
+ c.setGender( value );
+ }
+ else if ( name == "X-Qtopia-Anniversary" ) {
+ c.setAnniversary( value );
+ }
+ else if ( name == "X-Qtopia-Nickname" ) {
+ c.setNickname( value );
+ }
+ else if ( name == "X-Qtopia-Children" ) {
+ c.setChildren( value );
+ }
+
+
+#if 0
+ else {
+ printf("Name: %s, value=%s\n", name.data(), vObjectStringZValue( o ) );
+ VObjectIterator nit;
+ initPropIterator( &nit, o );
+ while( moreIteration( &nit ) ) {
+ VObject *o = nextVObject( &nit );
+ QCString name = vObjectName( o );
+ QString value = vObjectStringZValue( o );
+ printf(" subprop: %s = %s\n", name.data(), value.latin1() );
+ }
+ }
+#endif
+ }
+ c.setFileAs();
+ return c;
+}
+
+void Contact::writeVCard( const QString &filename, const QValueList<Contact> &contacts)
+{
+ QFileDirect f( filename.utf8().data() );
+ if ( !f.open( IO_WriteOnly ) ) {
+ qWarning("Unable to open vcard write");
+ return;
+ }
+
+ QValueList<Contact>::ConstIterator it;
+ for( it = contacts.begin(); it != contacts.end(); ++it ) {
+ VObject *obj = createVObject( *it );
+ writeVObject(f.directHandle() , obj );
+ cleanVObject( obj );
+ }
+ cleanStrTbl();
+}
+
+void Contact::writeVCard( const QString &filename, const Contact &contact)
+{
+ QFileDirect f( filename.utf8().data() );
+ if ( !f.open( IO_WriteOnly ) ) {
+ qWarning("Unable to open vcard write");
+ return;
+ }
+
+ VObject *obj = createVObject( contact );
+ writeVObject( f.directHandle() , obj );
+ cleanVObject( obj );
+
+ cleanStrTbl();
+}
+
+
+QValueList<Contact> Contact::readVCard( const QString &filename )
+{
+ qDebug("trying to open %s, exists=%d", filename.utf8().data(), QFileInfo( filename.utf8().data() ).size() );
+ VObject *obj = Parse_MIME_FromFileName( (char *)filename.utf8().data() );
+
+ qDebug("vobject = %p", obj );
+
+ QValueList<Contact> contacts;
+
+ while ( obj ) {
+ contacts.append( parseVObject( obj ) );
+
+ VObject *t = obj;
+ obj = nextVObjectInList(obj);
+ cleanVObject( t );
+ }
+
+ return contacts;
+}
+
+bool Contact::match( const QRegExp &r ) const
+{
+ bool match;
+ match = false;
+ QMap<int, QString>::ConstIterator it;
+ for ( it = mMap.begin(); it != mMap.end(); ++it ) {
+ if ( (*it).find( r ) > -1 ) {
+ match = true;
+ break;
+ }
+ }
+ return match;
+}
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 @@
+/**********************************************************************
+** Copyright (C) 2001 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef __CONTACT_H__
+#define __CONTACT_H__
+
+#include <qpe/palmtoprecord.h>
+#include <qpe/recordfields.h>
+
+#include <qstringlist.h>
+
+#if defined(QPC_TEMPLATEDLL)
+// MOC_SKIP_BEGIN
+template class QPC_EXPORT QMap<int, QString>;
+// MOC_SKIP_END
+#endif
+
+class ContactPrivate;
+class QPC_EXPORT Contact : public Qtopia::Record
+{
+ friend class DataSet;
+public:
+ Contact();
+ Contact( const QMap<int, QString> &fromMap );
+ virtual ~Contact();
+
+ static void writeVCard( const QString &filename, const QValueList<Contact> &contacts);
+ static void writeVCard( const QString &filename, const Contact &c );
+ static QValueList<Contact> readVCard( const QString &filename );
+
+ enum journal_action { ACTION_ADD, ACTION_REMOVE, ACTION_REPLACE };
+
+ void setTitle( const QString &v ) { replace( Qtopia::Title, v ); }
+ void setFirstName( const QString &v ) { replace( Qtopia::FirstName, v ); }
+ void setMiddleName( const QString &v ) { replace( Qtopia::MiddleName, v ); }
+ void setLastName( const QString &v ) { replace( Qtopia::LastName, v ); }
+ void setSuffix( const QString &v ) { replace( Qtopia::Suffix, v ); }
+ void setFileAs( const QString &v ) { replace( Qtopia::FileAs, v ); }
+ void setFileAs();
+
+ // default email address
+ void setDefaultEmail( const QString &v ) { replace( Qtopia::DefaultEmail, v ); }
+ // the emails should be seperated by a semicolon
+ void setEmails( const QString &v );
+
+ // home
+ void setHomeStreet( const QString &v ) { replace( Qtopia::HomeStreet, v ); }
+ void setHomeCity( const QString &v ) { replace( Qtopia::HomeCity, v ); }
+ void setHomeState( const QString &v ) { replace( Qtopia::HomeState, v ); }
+ void setHomeZip( const QString &v ) { replace( Qtopia::HomeZip, v ); }
+ void setHomeCountry( const QString &v ) { replace( Qtopia::HomeCountry, v ); }
+ void setHomePhone( const QString &v ) { replace( Qtopia::HomePhone, v ); }
+ void setHomeFax( const QString &v ) { replace( Qtopia::HomeFax, v ); }
+ void setHomeMobile( const QString &v ) { replace( Qtopia::HomeMobile, v ); }
+ void setHomeWebpage( const QString &v ) { replace( Qtopia::HomeWebPage, v ); }
+
+ // business
+ void setCompany( const QString &v ) { replace( Qtopia::Company, v ); }
+ void setBusinessStreet( const QString &v ) { replace( Qtopia::BusinessStreet, v ); }
+ void setBusinessCity( const QString &v ) { replace( Qtopia::BusinessCity, v ); }
+ void setBusinessState( const QString &v ) { replace( Qtopia::BusinessState, v ); }
+ void setBusinessZip( const QString &v ) { replace( Qtopia::BusinessZip, v ); }
+ void setBusinessCountry( const QString &v ) { replace( Qtopia::BusinessCountry, v ); }
+ void setBusinessWebpage( const QString &v ) { replace( Qtopia::BusinessWebPage, v ); }
+ void setJobTitle( const QString &v ) { replace( Qtopia::JobTitle, v ); }
+ void setDepartment( const QString &v ) { replace( Qtopia::Department, v ); }
+ void setOffice( const QString &v ) { replace( Qtopia::Office, v ); }
+ void setBusinessPhone( const QString &v ) { replace( Qtopia::BusinessPhone, v ); }
+ void setBusinessFax( const QString &v ) { replace( Qtopia::BusinessFax, v ); }
+ void setBusinessMobile( const QString &v ) { replace( Qtopia::BusinessMobile, v ); }
+ void setBusinessPager( const QString &v ) { replace( Qtopia::BusinessPager, v ); }
+ void setProfession( const QString &v ) { replace( Qtopia::Profession, v ); }
+ void setAssistant( const QString &v ) { replace( Qtopia::Assistant, v ); }
+ void setManager( const QString &v ) { replace( Qtopia::Manager, v ); }
+
+ // personal
+ void setSpouse( const QString &v ) { replace( Qtopia::Spouse, v ); }
+ void setGender( const QString &v ) { replace( Qtopia::Gender, v ); }
+ void setBirthday( const QString &v ) { replace( Qtopia::Birthday, v ); }
+ void setAnniversary( const QString &v ) { replace( Qtopia::Anniversary, v ); }
+ void setNickname( const QString &v ) { replace( Qtopia::Nickname, v ); }
+ void setChildren( const QString &v );
+
+ // other
+ void setNotes( const QString &v ) { replace( Qtopia::Notes, v); }
+
+ bool match( const QRegExp &r ) const;
+
+// // custom
+// void setCustomField( const QString &key, const QString &v )
+// { replace(Custom- + key, v ); }
+
+ // name
+ QString fullName() const;
+ QString title() const { return find( Qtopia::Title ); }
+ QString firstName() const { return find( Qtopia::FirstName ); }
+ QString middleName() const { return find( Qtopia::MiddleName ); }
+ QString lastName() const { return find( Qtopia::LastName ); }
+ QString suffix() const { return find( Qtopia::Suffix ); }
+ QString fileAs() const { return find( Qtopia::FileAs ); }
+
+ // email
+ QString defaultEmail() const { return find( Qtopia::DefaultEmail ); }
+ QString emails() const { return find( Qtopia::Emails ); }
+ QStringList emailList() const;
+
+ // home
+ QString homeStreet() const { return find( Qtopia::HomeStreet ); }
+ QString homeCity() const { return find( Qtopia::HomeCity ); }
+ QString homeState() const { return find( Qtopia::HomeState ); }
+ QString homeZip() const { return find( Qtopia::HomeZip ); }
+ QString homeCountry() const { return find( Qtopia::HomeCountry ); }
+ QString homePhone() const { return find( Qtopia::HomePhone ); }
+ QString homeFax() const { return find( Qtopia::HomeFax ); }
+ QString homeMobile() const { return find( Qtopia::HomeMobile ); }
+ QString homeWebpage() const { return find( Qtopia::HomeWebPage ); }
+ /** Multi line string containing all non-empty address info in the form
+ * Street
+ * City, State Zip
+ * Country
+ */
+ QString displayHomeAddress() const;
+
+ // business
+ QString company() const { return find( Qtopia::Company ); }
+ QString businessStreet() const { return find( Qtopia::BusinessStreet ); }
+ QString businessCity() const { return find( Qtopia::BusinessCity ); }
+ QString businessState() const { return find( Qtopia::BusinessState ); }
+ QString businessZip() const { return find( Qtopia::BusinessZip ); }
+ QString businessCountry() const { return find( Qtopia::BusinessCountry ); }
+ QString businessWebpage() const { return find( Qtopia::BusinessWebPage ); }
+ QString jobTitle() const { return find( Qtopia::JobTitle ); }
+ QString department() const { return find( Qtopia::Department ); }
+ QString office() const { return find( Qtopia::Office ); }
+ QString businessPhone() const { return find( Qtopia::BusinessPhone ); }
+ QString businessFax() const { return find( Qtopia::BusinessFax ); }
+ QString businessMobile() const { return find( Qtopia::BusinessMobile ); }
+ QString businessPager() const { return find( Qtopia::BusinessPager ); }
+ QString profession() const { return find( Qtopia::Profession ); }
+ QString assistant() const { return find( Qtopia::Assistant ); }
+ QString manager() const { return find( Qtopia::Manager ); }
+ /** Multi line string containing all non-empty address info in the form
+ * Street
+ * City, State Zip
+ * Country
+ */
+ QString displayBusinessAddress() const;
+
+ //personal
+ QString spouse() const { return find( Qtopia::Spouse ); }
+ QString gender() const { return find( Qtopia::Gender ); }
+ QString birthday() const { return find( Qtopia::Birthday ); }
+ QString anniversary() const { return find( Qtopia::Anniversary ); }
+ QString nickname() const { return find( Qtopia::Nickname ); }
+ QString children() const { return find( Qtopia::Children ); }
+ QStringList childrenList() const;
+
+ // other
+ QString notes() const { return find( Qtopia::Notes ); }
+ QString groups() const { return find( Qtopia::Groups ); }
+ QStringList groupList() const;
+
+// // custom
+// const QString &customField( const QString &key )
+// { return find( Custom- + key ); }
+
+ static QStringList fields();
+ static QStringList trfields();
+
+ QString toRichText() const;
+ QMap<int, QString> toMap() const;
+ QString field( int key ) const { return find( key ); }
+
+
+ // journaling...
+ void saveJournal( journal_action action, const QString &key = QString::null );
+ void save( QString &buf ) const;
+
+ void setUid( int i )
+{ Record::setUid(i); replace( Qtopia::AddressUid , QString::number(i)); }
+
+private:
+ friend class AbTable;
+ void insert( int key, const QString &value );
+ void replace( int key, const QString &value );
+ QString find( int key ) const;
+
+ QString displayAddress( const QString &street,
+ const QString &city,
+ const QString &state,
+ const QString &zip,
+ const QString &country ) const;
+
+ Qtopia::UidGen &uidGen() { return sUidGen; }
+ static Qtopia::UidGen sUidGen;
+ QMap<int, QString> mMap;
+ ContactPrivate *d;
+};
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2001 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "event.h"
+#include "qfiledirect_p.h"
+#include <qpe/timeconversion.h>
+#include <qpe/stringutil.h>
+#include <qpe/recordfields.h>
+#include <qbuffer.h>
+#include <time.h>
+#include "vobject_p.h"
+
+#include <stdio.h>
+
+using namespace Qtopia;
+
+static void write( QString& buf, const Event::RepeatPattern &r )
+{
+ buf += " rtype=\"";
+ switch ( r.type ) {
+ case Event::Daily:
+ buf += "Daily";
+ break;
+ case Event::Weekly:
+ buf += "Weekly";
+ break;
+ case Event::MonthlyDay:
+ buf += "MonthlyDay";
+ break;
+ case Event::MonthlyDate:
+ buf += "MonthlyDate";
+ break;
+ case Event::Yearly:
+ buf += "Yearly";
+ break;
+ default:
+ buf += "NoRepeat";
+ break;
+ }
+ buf += "\"";
+ if ( r.days > 0 )
+ buf += " rweekdays=\"" + QString::number( static_cast<int>( r.days ) ) + "\"";
+ if ( r.position != 0 )
+ buf += " rposition=\"" + QString::number( r.position ) + "\"";
+
+ buf += " rfreq=\"" + QString::number( r.frequency ) + "\"";
+ buf += " rhasenddate=\"" + QString::number( static_cast<int>( r.hasEndDate ) ) + "\"";
+ if ( r.hasEndDate )
+ buf += " enddt=\""
+ + QString::number( r.endDateUTC ? r.endDateUTC : time( 0 ) )
+ + "\"";
+ buf += " created=\"" + QString::number( r.createTime ) + "\"";
+}
+
+Qtopia::UidGen Event::sUidGen( Qtopia::UidGen::Qtopia );
+
+Event::Event() : Record()
+{
+ startUTC = endUTC = time( 0 );
+ typ = Normal;
+ hAlarm = FALSE;
+ hRepeat = FALSE;
+ aMinutes = 0;
+ aSound = Silent;
+ pattern.type = NoRepeat;
+ pattern.frequency = -1;
+}
+
+Event::Event( const QMap<int, QString> &map )
+{
+ setDescription( map[DatebookDescription] );
+ setLocation( map[Location] );
+ setCategories( idsFromString( map[DatebookCategory] ) );
+ setTimeZone( map[TimeZone] );
+ setNotes( map[Note] );
+ setStart( TimeConversion::fromUTC( map[StartDateTime].toUInt() ) );
+ setEnd( TimeConversion::fromUTC( map[EndDateTime].toUInt() ) );
+ setType( (Event::Type) map[DatebookType].toInt() );
+ setAlarm( ( map[HasAlarm] == "1" ? TRUE : FALSE ), map[AlarmTime].toInt(), (Event::SoundTypeChoice)map[SoundType].toInt() );
+ Event::RepeatPattern p;
+ p.type = (Event::RepeatType) map[ RepeatPatternType ].toInt();
+ p.frequency = map[ RepeatPatternFrequency ].toInt();
+ p.position = map[ RepeatPatternPosition ].toInt();
+ p.days = map[ RepeatPatternDays ].toInt();
+ p.hasEndDate = map[ RepeatPatternHasEndDate ].toInt();
+ p.endDateUTC = map[ RepeatPatternEndDate ].toUInt();
+ setRepeat( p );
+
+ setUid( map[ DatebookUid ].toInt() );
+}
+
+Event::~Event()
+{
+}
+
+int Event::week( const QDate& date )
+{
+ // Calculates the week this date is in within that
+ // month. Equals the "row" is is in in the month view
+ int week = 1;
+ QDate tmp( date.year(), date.month(), 1 );
+
+ if ( date.dayOfWeek() < tmp.dayOfWeek() )
+ ++week;
+
+ week += ( date.day() - 1 ) / 7;
+ return week;
+}
+
+int Event::occurrence( const QDate& date )
+{
+ // calculates the number of occurrances of this day of the
+ // week till the given date (e.g 3rd Wednesday of the month)
+ return ( date.day() - 1 ) / 7 + 1;
+}
+
+int Event::dayOfWeek( char day )
+{
+ int dayOfWeek = 1;
+ char i = Event::MON;
+ while ( !( i & day ) && i <= Event::SUN ) {
+ i <<= 1;
+ ++dayOfWeek;
+ }
+ return dayOfWeek;
+}
+
+int Event::monthDiff( const QDate& first, const QDate& second )
+{
+ return ( second.year() - first.year() ) * 12 +
+ second.month() - first.month();
+}
+
+QMap<int, QString> Event::toMap() const
+{
+ QMap<int, QString> m;
+ m.insert( DatebookDescription, description() );
+ m.insert ( Location, location() );
+ m.insert ( DatebookCategory, idsToString( categories() ) );
+ m.insert ( TimeZone, timeZone() );
+ m.insert ( Note, notes() );
+ m.insert ( StartDateTime, QString::number( TimeConversion::toUTC( start() ) ) );
+ m.insert ( EndDateTime, QString::number( TimeConversion::toUTC( end() ) ) );
+ m.insert ( DatebookType, QString::number( (int)type() ) );
+ m.insert ( HasAlarm, ( hasAlarm() ? "1" : "0" ) );
+ m.insert ( SoundType, QString::number( (int)alarmSound() ) );
+ m.insert ( AlarmTime, QString::number( alarmTime() ) );
+ m.insert ( RepeatPatternType, QString::number( static_cast<int>( repeatPattern().type ) ) );
+ m.insert ( RepeatPatternFrequency, QString::number( repeatPattern().frequency ) );
+ m.insert ( RepeatPatternPosition, QString::number( repeatPattern().position ) );
+ m.insert ( RepeatPatternDays, QString::number( repeatPattern().days ) );
+ m.insert ( RepeatPatternHasEndDate, QString::number( static_cast<int>( repeatPattern().hasEndDate ) ) );
+ m.insert ( RepeatPatternEndDate, QString::number( repeatPattern().endDateUTC ) );
+
+ m.insert( DatebookUid, QString::number( uid()) );
+
+ return m;
+}
+
+void Event::setRepeat( const RepeatPattern &p )
+{
+ setRepeat( p.type != NoRepeat, p );
+}
+
+void Event::setDescription( const QString &s )
+{
+ descript = s;
+}
+
+void Event::setLocation( const QString &s )
+{
+ locat = s;
+}
+
+// void Event::setCategory( const QString &s )
+// {
+// categ = s;
+// }
+
+void Event::setType( Type t )
+{
+ typ = t;
+}
+
+void Event::setStart( const QDateTime &d )
+{
+ startUTC = TimeConversion::toUTC( d );
+}
+
+void Event::setStart( time_t time )
+{
+ startUTC = time;
+}
+
+void Event::setEnd( const QDateTime &d )
+{
+ endUTC = TimeConversion::toUTC( d );
+}
+
+void Event::setEnd( time_t time )
+{
+ endUTC = time;
+}
+
+void Event::setTimeZone( const QString &z )
+{
+ tz = z;
+}
+
+void Event::setAlarm( bool b, int minutes, SoundTypeChoice s )
+{
+ hAlarm = b;
+ aMinutes = minutes;
+ aSound = s;
+}
+
+void Event::setRepeat( bool b, const RepeatPattern &p )
+{
+ hRepeat = b;
+ pattern = p;
+}
+
+void Event::setNotes( const QString &n )
+{
+ note = n;
+}
+
+const QString &Event::description() const
+{
+ return descript;
+}
+
+const QString &Event::location() const
+{
+ return locat;
+}
+
+// QString Event::category() const
+// {
+// return categ;
+// }
+
+Event::Type Event::type() const
+{
+ return typ;
+}
+
+QDateTime Event::start( bool actual ) const
+{
+ QDateTime dt = (startUTC > 0) ? TimeConversion::fromUTC( startUTC ) : QDateTime::currentDateTime();
+
+ if ( actual && typ == AllDay ) {
+ QTime t = dt.time();
+ t.setHMS( 0, 0, 0 );
+ dt.setTime( t );
+ }
+ return dt;
+}
+
+QDateTime Event::end( bool actual ) const
+{
+ QDateTime dt = (endUTC > 0) ? TimeConversion::fromUTC( endUTC ) : QDateTime::currentDateTime();
+
+ if ( actual && typ == AllDay ) {
+ QTime t = dt.time();
+ t.setHMS( 23, 59, 59 );
+ dt.setTime( t );
+ }
+ return dt;
+}
+
+const QString &Event::timeZone() const
+{
+ return tz;
+}
+
+bool Event::hasAlarm() const
+{
+ return hAlarm;
+}
+
+int Event::alarmTime() const
+{
+ return aMinutes;
+}
+
+Event::SoundTypeChoice Event::alarmSound() const
+{
+ return aSound;
+}
+
+bool Event::hasRepeat() const
+{
+ return doRepeat();
+}
+
+const Event::RepeatPattern &Event::repeatPattern() const
+{
+ return pattern;
+}
+
+Event::RepeatPattern &Event::repeatPattern()
+{
+ return pattern;
+}
+
+const QString &Event::notes() const
+{
+ return note;
+}
+
+bool Event::operator==( const Event &e ) const
+{
+ return ( e.descript == descript &&
+ e.locat == locat &&
+ e.categ == categ &&
+ e.typ == typ &&
+ e.startUTC == startUTC &&
+ e.endUTC == endUTC &&
+ e.tz == tz &&
+ e.hAlarm == hAlarm &&
+ e.aMinutes == aMinutes &&
+ e.aSound == aSound &&
+ e.hRepeat == hRepeat &&
+ e.pattern == pattern &&
+ e.note == note );
+}
+
+void Event::save( QString& buf )
+{
+ buf += " description=\"" + Qtopia::escapeString(descript) + "\"";
+ if ( !locat.isEmpty() )
+ buf += " location=\"" + Qtopia::escapeString(locat) + "\"";
+ // save the categoies differently....
+ QString strCats = idsToString( categories() );
+ buf += " categories=\"" + Qtopia::escapeString(strCats) + "\"";
+ buf += " uid=\"" + QString::number( uid() ) + "\"";
+ if ( (Type)typ != Normal )
+ buf += " type=\"AllDay\"";
+ if ( hAlarm ) {
+ buf += " alarm=\"" + QString::number( aMinutes ) + "\" sound=\"";
+ if ( aSound == Event::Loud )
+ buf += "loud";
+ else
+ buf += "silent";
+ buf += "\"";
+ }
+ if ( hRepeat )
+ write( buf, pattern );
+
+ buf += " start=\""
+ + QString::number( startUTC )
+ + "\"";
+
+ buf += " end=\""
+ + QString::number( endUTC )
+ + "\"";
+
+ if ( !note.isEmpty() )
+ buf += " note=\"" + Qtopia::escapeString( note ) + "\"";
+ buf += customToXml();
+}
+
+bool Event::RepeatPattern::operator==( const Event::RepeatPattern &right ) const
+{
+ // *sigh*
+ return ( type == right.type
+ && frequency == right.frequency
+ && position == right.position
+ && days == right.days
+ && hasEndDate == right.hasEndDate
+ && endDateUTC == right.endDateUTC
+ && createTime == right.createTime );
+}
+
+
+class EffectiveEventPrivate
+{
+public:
+ //currently the existence of the d pointer means multi-day repeating,
+ //msut be changed if we use the d pointer for anything else.
+ QDate startDate;
+ QDate endDate;
+};
+
+
+EffectiveEvent::EffectiveEvent()
+{
+ mDate = QDate::currentDate();
+ mStart = mEnd = QTime::currentTime();
+ d = 0;
+}
+
+EffectiveEvent::EffectiveEvent( const Event &e, const QDate &date, Position pos )
+{
+ mEvent = e;
+ mDate = date;
+ if ( pos & Start )
+ mStart = e.start( TRUE ).time();
+ else
+ mStart = QTime( 0, 0, 0 );
+
+ if ( pos & End )
+ mEnd = e.end( TRUE ).time();
+ else
+ mEnd = QTime( 23, 59, 59 );
+ d = 0;
+}
+
+EffectiveEvent::~EffectiveEvent()
+{
+ delete d;
+}
+
+EffectiveEvent::EffectiveEvent( const EffectiveEvent &e )
+{
+ d = 0;
+ *this = e;
+}
+
+EffectiveEvent& EffectiveEvent::operator=( const EffectiveEvent & e )
+{
+ if ( &e == this )
+ return *this;
+ delete d;
+ if ( e.d ) {
+ d = new EffectiveEventPrivate;
+ d->startDate = e.d->startDate;
+ d->endDate = e.d->endDate;
+ } else {
+ d = 0;
+ }
+ mEvent = e.mEvent;
+ mDate = e.mDate;
+ mStart = e.mStart;
+ mEnd = e.mEnd;
+
+ return *this;
+
+}
+
+// QString EffectiveEvent::category() const
+// {
+// return mEvent.category();
+// }
+
+const QString &EffectiveEvent::description( ) const
+{
+ return mEvent.description();
+}
+
+const QString &EffectiveEvent::location( ) const
+{
+ return mEvent.location();
+}
+
+const QString &EffectiveEvent::notes() const
+{
+ return mEvent.notes();
+}
+
+const Event &EffectiveEvent::event() const
+{
+ return mEvent;
+}
+
+const QTime &EffectiveEvent::end() const
+{
+ return mEnd;
+}
+
+const QTime &EffectiveEvent::start() const
+{
+ return mStart;
+}
+
+const QDate &EffectiveEvent::date() const
+{
+ return mDate;
+}
+
+int EffectiveEvent::length() const
+{
+ return (mEnd.hour() * 60 - mStart.hour() * 60)
+ + QABS(mStart.minute() - mEnd.minute() );
+}
+
+void EffectiveEvent::setDate( const QDate &dt )
+{
+ mDate = dt;
+}
+
+void EffectiveEvent::setStart( const QTime &start )
+{
+ mStart = start;
+}
+
+void EffectiveEvent::setEnd( const QTime &end )
+{
+ mEnd = end;
+}
+
+void EffectiveEvent::setEvent( Event e )
+{
+ mEvent = e;
+}
+
+bool EffectiveEvent::operator<( const EffectiveEvent &e ) const
+{
+ if ( mDate < e.date() )
+ return TRUE;
+ if ( mDate == e.date() )
+ return ( mStart < e.start() );
+ else
+ return FALSE;
+}
+
+bool EffectiveEvent::operator<=( const EffectiveEvent &e ) const
+{
+ return (mDate <= e.date() );
+}
+
+bool EffectiveEvent::operator==( const EffectiveEvent &e ) const
+{
+ return ( mDate == e.date()
+ && mStart == e.start()
+ && mEnd == e.end()
+ && mEvent == e.event() );
+}
+
+bool EffectiveEvent::operator!=( const EffectiveEvent &e ) const
+{
+ return !(*this == e);
+}
+
+bool EffectiveEvent::operator>( const EffectiveEvent &e ) const
+{
+ return !(*this <= e );
+}
+
+bool EffectiveEvent::operator>=(const EffectiveEvent &e) const
+{
+ return !(*this < e);
+}
+
+void EffectiveEvent::setEffectiveDates( const QDate &from, const QDate &to )
+{
+ if ( !from.isValid() ) {
+ delete d;
+ d = 0;
+ return;
+ }
+ if ( !d )
+ d = new EffectiveEventPrivate;
+ d->startDate = from;
+ d->endDate = to;
+}
+
+QDate EffectiveEvent::startDate() const
+{
+ if ( d )
+ return d->startDate;
+ else if ( mEvent.hasRepeat() )
+ return mDate; // single day, since multi-day should have a d pointer
+ else
+ return mEvent.start().date();
+}
+
+QDate EffectiveEvent::endDate() const
+{
+ if ( d )
+ return d->endDate;
+ else if ( mEvent.hasRepeat() )
+ return mDate; // single day, since multi-day should have a d pointer
+ else
+ return mEvent.end().date();
+}
+
+int EffectiveEvent::size() const
+{
+ return ( mEnd.hour() - mStart.hour() ) * 3600
+ + (mEnd.minute() - mStart.minute() * 60
+ + mEnd.second() - mStart.second() );
+}
+
+
+// vcal conversion code
+static inline VObject *safeAddPropValue( VObject *o, const char *prop, const QString &value )
+{
+ VObject *ret = 0;
+ if ( o && !value.isEmpty() )
+ ret = addPropValue( o, prop, value.latin1() );
+ return ret;
+}
+
+static inline VObject *safeAddProp( VObject *o, const char *prop)
+{
+ VObject *ret = 0;
+ if ( o )
+ ret = addProp( o, prop );
+ return ret;
+}
+
+static VObject *createVObject( const Event &e )
+{
+ VObject *vcal = newVObject( VCCalProp );
+ safeAddPropValue( vcal, VCVersionProp, "1.0" );
+ VObject *event = safeAddProp( vcal, VCEventProp );
+
+ safeAddPropValue( event, VCDTstartProp, TimeConversion::toISO8601( e.start() ) );
+ safeAddPropValue( event, VCDTendProp, TimeConversion::toISO8601( e.end() ) );
+ safeAddPropValue( event, "X-Qtopia-NOTES", e.description() );
+ safeAddPropValue( event, VCDescriptionProp, e.description() );
+ safeAddPropValue( event, VCLocationProp, e.location() );
+
+ if ( e.hasAlarm() ) {
+ VObject *alarm = safeAddProp( event, VCAAlarmProp );
+ QDateTime dt = e.start();
+ dt = dt.addSecs( -e.alarmTime()*60 );
+ safeAddPropValue( alarm, VCRunTimeProp, TimeConversion::toISO8601( dt ) );
+ safeAddPropValue( alarm, VCAudioContentProp,
+ (e.alarmSound() == Event::Silent ? "silent" : "alarm" ) );
+ }
+
+ safeAddPropValue( event, "X-Qtopia-TIMEZONE", e.timeZone() );
+
+ if ( e.type() == Event::AllDay )
+ safeAddPropValue( event, "X-Qtopia-AllDay", e.timeZone() );
+
+ // ### repeat missing
+
+ // ### categories missing
+
+ return vcal;
+}
+
+
+static Event parseVObject( VObject *obj )
+{
+ Event e;
+
+ bool haveAlarm = FALSE;
+ bool haveStart = FALSE;
+ bool haveEnd = FALSE;
+ QDateTime alarmTime;
+ Event::SoundTypeChoice soundType = Event::Silent;
+
+ VObjectIterator it;
+ initPropIterator( &it, obj );
+ while( moreIteration( &it ) ) {
+ VObject *o = nextVObject( &it );
+ QCString name = vObjectName( o );
+ QCString value = vObjectStringZValue( o );
+ if ( name == VCDTstartProp ) {
+ e.setStart( TimeConversion::fromISO8601( value ) );
+ haveStart = TRUE;
+ }
+ else if ( name == VCDTendProp ) {
+ e.setEnd( TimeConversion::fromISO8601( value ) );
+ haveEnd = TRUE;
+ }
+ else if ( name == "X-Qtopia-NOTES" ) {
+ e.setNotes( value );
+ }
+ else if ( name == VCDescriptionProp ) {
+ e.setDescription( value );
+ }
+ else if ( name == VCLocationProp ) {
+ e.setLocation( value );
+ }
+ else if ( name == VCAudioContentProp ) {
+ haveAlarm = TRUE;
+ VObjectIterator nit;
+ initPropIterator( &nit, o );
+ while( moreIteration( &nit ) ) {
+ VObject *o = nextVObject( &nit );
+ QCString name = vObjectName( o );
+ QCString value = vObjectStringZValue( o );
+ if ( name == VCRunTimeProp )
+ alarmTime = TimeConversion::fromISO8601( value );
+ else if ( name == VCAudioContentProp ) {
+ if ( value == "silent" )
+ soundType = Event::Silent;
+ else
+ soundType = Event::Loud;
+ }
+ }
+ }
+ else if ( name == "X-Qtopia-TIMEZONE") {
+ e.setTimeZone( value );
+ }
+ else if ( name == "X-Qtopia-AllDay" ) {
+ e.setType( Event::AllDay );
+ }
+#if 0
+ else {
+ printf("Name: %s, value=%s\n", name.data(), vObjectStringZValue( o ) );
+ VObjectIterator nit;
+ initPropIterator( &nit, o );
+ while( moreIteration( &nit ) ) {
+ VObject *o = nextVObject( &nit );
+ QCString name = vObjectName( o );
+ QString value = vObjectStringZValue( o );
+ printf(" subprop: %s = %s\n", name.data(), value.latin1() );
+ }
+ }
+#endif
+ }
+
+ if ( !haveStart && !haveEnd )
+ e.setStart( QDateTime::currentDateTime() );
+
+ if ( !haveEnd ) {
+ e.setType( Event::AllDay );
+ e.setEnd( e.start() );
+ }
+
+ if ( haveAlarm ) {
+ int minutes = alarmTime.secsTo( e.start() ) / 60;
+ e.setAlarm( TRUE, minutes, soundType );
+ }
+ return e;
+}
+
+
+
+void Event::writeVCalendar( const QString &filename, const QValueList<Event> &events)
+{
+ QFileDirect f( filename.utf8().data() );
+ if ( !f.open( IO_WriteOnly ) ) {
+ qWarning("Unable to open vcard write");
+ return;
+ }
+
+ QValueList<Event>::ConstIterator it;
+ for( it = events.begin(); it != events.end(); ++it ) {
+ VObject *obj = createVObject( *it );
+ writeVObject( f.directHandle() , obj );
+ cleanVObject( obj );
+ }
+
+ cleanStrTbl();
+}
+
+void Event::writeVCalendar( const QString &filename, const Event &event)
+{
+ QFileDirect f( filename.utf8().data() );
+ if ( !f.open( IO_WriteOnly ) ) {
+ qWarning("Unable to open vcard write");
+ return;
+ }
+
+ VObject *obj = createVObject( event );
+ writeVObject( f.directHandle() , obj );
+ cleanVObject( obj );
+
+ cleanStrTbl();
+}
+
+
+QValueList<Event> Event::readVCalendar( const QString &filename )
+{
+ VObject *obj = Parse_MIME_FromFileName( (char *)filename.utf8().data() );
+
+ QValueList<Event> events;
+
+ while ( obj ) {
+ QCString name = vObjectName( obj );
+ if ( name == VCCalProp ) {
+ VObjectIterator nit;
+ initPropIterator( &nit, obj );
+ while( moreIteration( &nit ) ) {
+ VObject *o = nextVObject( &nit );
+ QCString name = vObjectName( o );
+ if ( name == VCEventProp )
+ events.append( parseVObject( o ) );
+ }
+ } else if ( name == VCEventProp ) {
+ // shouldn't happen, but just to be sure
+ events.append( parseVObject( obj ) );
+ }
+ VObject *t = obj;
+ obj = nextVObjectInList(obj);
+ cleanVObject( t );
+ }
+
+ return events;
+}
+
+bool Event::match( const QRegExp &r ) const
+{
+ bool returnMe;
+ returnMe = false;
+
+ if ( descript.find( r ) > -1 )
+ returnMe = true;
+ else if ( locat.find( r ) > -1 )
+ returnMe = true;
+ else if ( TimeConversion::fromUTC( startUTC ).toString().find( r ) > -1 )
+ returnMe = true;
+ else if ( TimeConversion::fromUTC( endUTC ).toString().find( r ) > -1 )
+ returnMe = true;
+ else if ( tz.find( r ) > -1 )
+ returnMe = true;
+ else if ( note.find( r ) > -1 )
+ returnMe = true;
+ else if ( doRepeat() ) {
+ if ( pattern.hasEndDate )
+ if ( TimeConversion::fromUTC( pattern.endDateUTC ).toString().find(r) > -1 )
+ returnMe = true;
+ }
+ return returnMe;
+}
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 @@
+/**********************************************************************
+** Copyright (C) 2001 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef __EVENT_H__
+#define __EVENT_H__
+
+#include <qdatetime.h>
+#include <qvaluelist.h>
+
+#ifdef PALMTOPCENTER
+#include <qpc/qsorter.h>
+#endif
+#include <qpe/palmtoprecord.h>
+
+#include <qpe/timeconversion.h>
+
+class EventPrivate;
+class QPC_EXPORT Event : public Qtopia::Record
+{
+public:
+ enum RepeatType { NoRepeat = -1, Daily, Weekly, MonthlyDay,
+ MonthlyDate, Yearly };
+ enum Days { MON = 0x01, TUE = 0x02, WED = 0x04, THU = 0x08,
+ FRI = 0x10, SAT = 0x20, SUN = 0x40 };
+ struct QPC_EXPORT RepeatPattern
+ {
+ RepeatPattern() {
+ type = NoRepeat; frequency = -1; days = 0; position = 0; createTime = -1;
+ hasEndDate = FALSE; endDateUTC = 0; }
+ bool operator ==( const RepeatPattern &right ) const;
+
+ RepeatType type;
+ int frequency;
+ int position; // the posistion in the month (e.g. the first sunday, etc) positive, count from the front negative count from the end...
+ char days; // a mask for days OR in your days!
+ bool hasEndDate;
+ QDate endDate() const { return TimeConversion::fromUTC( endDateUTC ).date(); }
+ void setEndDate( const QDate &dt ) { endDateUTC = TimeConversion::toUTC( dt ); }
+ time_t endDateUTC;
+ time_t createTime;
+ };
+
+ Event();
+ Event( const QMap<int, QString > & map );
+ virtual ~Event();
+
+ QMap<int, QString> toMap() const;
+
+ static void writeVCalendar( const QString &filename, const QValueList<Event> &events);
+ static void writeVCalendar( const QString &filename, const Event &event);
+ static QValueList<Event> readVCalendar( const QString &filename );
+
+ enum Type { Normal, AllDay };
+ enum SoundTypeChoice { Silent, Loud };
+
+ bool operator<( const Event &e1) const { return start() < e1.start(); };
+ bool operator<=( const Event &e1 ) const { return start() <= e1.start(); };
+ bool operator!=( const Event &e1 ) const { return !( *this == e1 ); };
+ bool operator>( const Event &e1 ) const { return start() > e1.start(); };
+ bool operator>=(const Event &e1 ) const { return start() >= e1.start(); };
+ bool operator==( const Event &e ) const;
+
+ void setDescription( const QString &s );
+ const QString &description() const;
+
+ void setLocation( const QString &s );
+ const QString &location() const;
+
+ void setType( Type t );
+ Type type() const;
+ void setStart( const QDateTime &d );
+ void setStart( time_t time );
+ QDateTime start( bool actual = FALSE ) const;
+ time_t startTime() const { return startUTC; }
+ void setEnd( const QDateTime &e );
+ void setEnd( time_t time );
+ QDateTime end( bool actual = FALSE ) const;
+ time_t endTime() const { return endUTC; }
+ void setTimeZone( const QString & );
+ const QString &timeZone() const;
+ void setAlarm( bool b, int minutes, SoundTypeChoice );
+ bool hasAlarm() const;
+ int alarmTime() const;
+ SoundTypeChoice alarmSound() const;
+ void setRepeat( bool b, const RepeatPattern &p );
+ void setRepeat( const RepeatPattern &p );
+ bool hasRepeat() const;
+ const RepeatPattern &repeatPattern() const;
+ RepeatPattern &repeatPattern();
+ void setNotes( const QString &n );
+ const QString &notes() const;
+ bool doRepeat() const { return pattern.type != NoRepeat; }
+
+ void save( QString& buf );
+ //void load( Node *n );
+
+ // helper function to calculate the week of the given date
+ static int week( const QDate& date );
+ // calculates the number of occurrences of the week day of
+ // the given date from the start of the month
+ static int occurrence( const QDate& date );
+ // returns a proper days-char for a given dayOfWeek()
+ static char day( int dayOfWeek ) { return 1 << ( dayOfWeek - 1 ); }
+ // returns the dayOfWeek for the *first* day it finds (ignores
+ // any further days!). Returns 1 (Monday) if there isn't any day found
+ static int dayOfWeek( char day );
+ // returns the difference of months from first to second.
+ static int monthDiff( const QDate& first, const QDate& second );
+ bool match( const QRegExp &r ) const;
+
+private:
+ Qtopia::UidGen &uidGen() { return sUidGen; }
+ static Qtopia::UidGen sUidGen;
+
+ QString descript, locat, categ;
+ Type typ : 4;
+ bool startTimeDirty : 1;
+ bool endTimeDirty : 1;
+ time_t startUTC, endUTC;
+ QString tz;
+ bool hAlarm, hRepeat;
+ int aMinutes;
+ SoundTypeChoice aSound;
+ RepeatPattern pattern;
+ QString note;
+ EventPrivate *d;
+};
+
+// Since an event spans multiple day, it is better to have this
+// class to represent a day instead of creating many
+// dummy events...
+
+class EffectiveEventPrivate;
+class QPC_EXPORT EffectiveEvent
+{
+public:
+ // If we calculate the effective event of a multi-day event
+ // we have to figure out whether we are at the first day,
+ // at the end, or anywhere else ("middle"). This is important
+ // for the start/end times (00:00/23:59)
+ // MidWay: 00:00 -> 23:59, as we are "in the middle" of a multi-
+ // day event
+ // Start: start time -> 23:59
+ // End: 00:00 -> end time
+ // Start | End == StartEnd: for single-day events (default)
+ // here we draw start time -> end time
+ enum Position { MidWay = 0, Start = 1, End = 2, StartEnd = 3 };
+
+ EffectiveEvent();
+ EffectiveEvent( const Event &event, const QDate &startDate, Position pos = StartEnd );
+ EffectiveEvent( const EffectiveEvent & );
+ EffectiveEvent& operator=( const EffectiveEvent & );
+ ~EffectiveEvent();
+
+
+ bool operator<( const EffectiveEvent &e ) const;
+ bool operator<=( const EffectiveEvent &e ) const;
+ bool operator==( const EffectiveEvent &e ) const;
+ bool operator!=( const EffectiveEvent &e ) const;
+ bool operator>( const EffectiveEvent &e ) const;
+ bool operator>= ( const EffectiveEvent &e ) const;
+
+ void setStart( const QTime &start );
+ void setEnd( const QTime &end );
+ void setEvent( Event e );
+ void setDate( const QDate &date );
+ void setEffectiveDates( const QDate &from, const QDate &to );
+
+ // QString category() const;
+ const QString &description() const;
+ const QString &location() const;
+ const QString &notes() const;
+ const Event &event() const;
+ const QTime &start() const;
+ const QTime &end() const;
+ const QDate &date() const;
+ int length() const;
+ int size() const;
+
+ QDate startDate() const;
+ QDate endDate() const;
+
+private:
+ class EffectiveEventPrivate *d;
+ Event mEvent;
+ QDate mDate;
+ QTime mStart,
+ mEnd;
+
+};
+
+#ifdef PALMTOPCENTER
+class QPC_EXPORT EffectiveEventSizeSorter : public QSorter<EffectiveEvent>
+{
+public:
+ int compare( const EffectiveEvent& a, const EffectiveEvent& b ) const
+ {
+ return a.size() - b.size();
+ }
+};
+
+class QPC_EXPORT EffectiveEventTimeSorter : public QSorter<EffectiveEvent>
+{
+public:
+ int compare( const EffectiveEvent& a, const EffectiveEvent& b ) const
+ {
+ return a.start().secsTo( b.start() );
+ }
+};
+#endif
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included
+** in the packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING
+** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A
+** PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#include "palmtoprecord.h"
+#include "stringutil.h"
+#include <qstringlist.h>
+
+namespace Qtopia {
+
+Record &Record::operator=( const Record &c )
+{
+ mUid = c.mUid;
+ mCats = c.mCats;
+ customMap = c.customMap;
+ return *this;
+}
+
+void Record::setCategories( int single )
+{
+ if ( single == 0 )
+ return;
+ mCats.resize(1);
+ mCats[0] = single;
+}
+
+// convenience methods provided for loading and saving to xml
+QString Record::idsToString( const QArray<int> &cats )
+{
+ QString str;
+ for ( uint i = 0; i < cats.size(); i++ )
+ if ( i == 0 )
+ str = QString::number( cats[int(i)] );
+ else
+ str += ";" + QString::number( cats[int(i)] );
+
+ return str;
+}
+
+// convenience methods provided for loading and saving to xml
+QArray<int> Record::idsFromString( const QString &str )
+{
+ QStringList catStrs = QStringList::split( ";", str );
+ QArray<int> cats( catStrs.count() );
+ uint i = 0;
+ for ( QStringList::ConstIterator it = catStrs.begin();
+ it != catStrs.end(); ++it ) {
+ cats[int(i)] = (*it).toInt();
+ i++;
+ }
+ return cats;
+}
+
+/*!
+ Returns the string stored for the custom field \a key.
+ Returns a null string if the field does not exist.
+ */
+QString Record::customField( const QString &key) const
+{
+ if (customMap.contains(key))
+ return customMap[key];
+
+ return QString::null;
+}
+
+/*!
+ Sets the string stored for the custom field \a key to \a value.
+ */
+void Record::setCustomField( const QString &key, const QString &value)
+{
+ qWarning("setting custom " + key + " to " + value);
+ if (customMap.contains(key))
+ customMap.replace(key, value);
+ else
+ customMap.insert(key, value);
+
+ qWarning(QString("custom size %1").arg(customMap.count()));
+}
+
+/*!
+ Removes the custom field \a key.
+ */
+void Record::removeCustomField(const QString &key)
+{
+ customMap.remove(key);
+}
+
+QString Record::customToXml() const
+{
+ //qWarning(QString("writing custom %1").arg(customMap.count()));
+ QString buf(" ");
+ for ( QMap<QString, QString>::ConstIterator cit = customMap.begin();
+ cit != customMap.end(); ++cit) {
+ qWarning(".ITEM.");
+ buf += cit.key();
+ buf += "=\"";
+ buf += escapeString(cit.data());
+ buf += "\" ";
+ }
+ return buf;
+}
+
+void Record::dump( const QMap<int, QString> &map )
+{
+ QMap<int, QString>::ConstIterator it;
+ for( it = map.begin(); it != map.end(); ++it )
+ qDebug("%d : %s", it.key(), it.data().local8Bit().data() );
+}
+
+}
+
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included
+** in the packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING
+** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A
+** PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QTPALMTOP_RECORD_H
+#define QTPALMTOP_RECORD_H
+
+#include <qglobal.h>
+#include "qpcglobal.h"
+#include "palmtopuidgen.h"
+#include <qarray.h>
+#include <qmap.h>
+
+#if defined(QPC_TEMPLATEDLL)
+// MOC_SKIP_BEGIN
+template class QPC_EXPORT QMap<QString, QString>;
+// MOC_SKIP_END
+#endif
+
+class QRegExp;
+namespace Qtopia {
+
+class RecordPrivate;
+class QPC_EXPORT Record
+{
+public:
+ Record() : mUid(0), mCats() { }
+ Record( const Record &c ) : mUid( c.mUid ), mCats ( c.mCats ), customMap(c.customMap) { }
+ virtual ~Record() { }
+
+ Record &operator=( const Record &c );
+
+ virtual bool match( const QRegExp & ) const { return FALSE; }
+
+ void setCategories( const QArray<int> &v ) { mCats = v; }
+ void setCategories( int single );
+ const QArray<int> &categories() const { return mCats; }
+
+ int uid() const { return mUid; };
+ virtual void setUid( int i ) { mUid = i; uidGen().store( mUid ); }
+ bool isValidUid() const { return mUid != 0; }
+ void assignUid() { setUid( uidGen().generate() ); }
+
+ virtual QString customField(const QString &) const;
+ virtual void setCustomField(const QString &, const QString &);
+ virtual void removeCustomField(const QString &);
+
+ virtual bool operator == ( const Record &r ) const
+{ return mUid == r.mUid; }
+ virtual bool operator != ( const Record &r ) const
+{ return mUid != r.mUid; }
+
+ // convenience methods provided for loading and saving to xml
+ static QString idsToString( const QArray<int> &ids );
+ // convenience methods provided for loading and saving to xml
+ static QArray<int> idsFromString( const QString &str );
+
+ // for debugging
+ static void dump( const QMap<int, QString> &map );
+
+protected:
+ virtual UidGen &uidGen() = 0;
+
+ virtual QString customToXml() const;
+
+private:
+ int mUid;
+ QArray<int> mCats;
+
+ QMap<QString, QString> customMap;
+
+ RecordPrivate *d;
+};
+
+}
+
+#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 @@
+#ifndef QTPALMTOP_UIDGEN_H
+#define QTPALMTOP_UIDGEN_H
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** Licensees holding valid Qtopia Developer license may use this
+** file in accordance with the Qtopia Developer License Agreement
+** provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING
+** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+** PURPOSE.
+**
+** email sales@trolltech.com for information about Qtopia License
+** Agreements.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include <time.h>
+#include <qmap.h>
+#include "qpcglobal.h"
+
+#if defined(QPC_TEMPLATEDLL)
+// MOC_SKIP_BEGIN
+template class QPC_EXPORT QMap< int, bool >;
+// MOC_SKIP_END
+#endif
+
+namespace Qtopia {
+
+
+class QPC_EXPORT UidGen
+{
+public:
+ enum Type { Qtopia, PalmtopCenter };
+
+ UidGen() : type( Qtopia ), sign( -1 ), ids()
+{
+#ifdef PALMTOPCENTER
+ type = PalmtopCenter;
+ sign = 1;
+#endif
+}
+ UidGen( Type t ) : type(t), sign(1), ids()
+{
+ if ( t == Qtopia )
+ sign = -1;
+}
+
+ virtual ~UidGen() { }
+
+ int generate() const
+{
+ int id = sign * (int) ::time(NULL);
+ while ( ids.contains( id ) ) {
+ id += sign;
+
+ // check for overflow cases; if so, wrap back to beginning of
+ // set ( -1 or 1 )
+ if ( sign == -1 && id > 0 || sign == 1 && id < 0 )
+ id = sign;
+ }
+ return id;
+}
+
+ void store(int id) { ids.insert(id, TRUE); }
+ bool isUnique(int id) const { return (!ids.contains(id)); }
+
+private:
+ Type type;
+ int sign;
+ QMap<int, bool> ids;
+
+};
+
+}
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2001 Trolltech AS. All rights reserved.
+**
+** This file is part of the Qtopia Environment.
+**
+** Licensees holding valid Qtopia Developer license may use this
+** file in accordance with the Qtopia Developer License Agreement
+** provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING
+** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+** PURPOSE.
+**
+** email sales@trolltech.com for information about Qtopia License
+** Agreements.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QFILE_DIRECT_H
+#define QFILE_DIRECT_H
+#include <qfile.h>
+#include <qpe/qpcglobal.h>
+
+class QPC_EXPORT QFileDirect : public QFile
+{
+public:
+ QFileDirect() : QFile() { }
+ QFileDirect( const QString &name ) : QFile(name) { }
+
+ FILE *directHandle() { return fh; }
+};
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** Licensees holding valid Qtopia Developer license may use this
+** file in accordance with the Qtopia Developer License Agreement
+** provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING
+** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+** PURPOSE.
+**
+** email sales@trolltech.com for information about Qtopia License
+** Agreements.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QPC_GLOBAL_H
+#define QPC_GLOBAL_H
+
+#if ( defined(Q_OS_WIN32) || defined(Q_OS_WIN64) ) && defined(PALMTOPCENTER)
+#include <qglobal.h>
+// # if defined(QT_NODLL)
+//# undef QPC_MAKEDLL
+//# undef QPC_DLL
+# if defined(QPC_MAKEDLL) /* create a Qt DLL library */
+# if defined(QPC_DLL)
+# undef QPC_DLL
+# endif
+# define QPC_EXPORT __declspec(dllexport)
+# define QPC_TEMPLATEDLL
+# undef QPC_DISABLE_COPY /* avoid unresolved externals */
+# elif defined(QPC_DLL) /* use a Qt DLL library */
+# define QPC_EXPORT __declspec(dllimport)
+# define QPC_TEMPLATEDLL
+# undef QPC_DISABLE_COPY /* avoid unresolved externals */
+# endif
+#else
+# undef QPC_MAKEDLL /* ignore these for other platforms */
+# undef QPC_DLL
+#endif
+#endif
+
+#ifndef QPC_EXPORT
+# define QPC_EXPORT
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** Licensees holding valid Qtopia Developer license may use this
+** file in accordance with the Qtopia Developer License Agreement
+** provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING
+** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+** PURPOSE.
+**
+** email sales@trolltech.com for information about Qtopia License
+** Agreements.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef QPC_RECORD_FIELDS_H
+#define QPC_RECORD_FIELDS_H
+#include "qpcglobal.h"
+
+// dataset = "addressbook"
+namespace Qtopia
+{
+ static const int UID_ID = 0;
+ static const int CATEGORY_ID = 1;
+
+ enum AddressBookFields {
+ AddressUid = UID_ID,
+ AddressCategory = CATEGORY_ID,
+
+ Title,
+ FirstName,
+ MiddleName,
+ LastName,
+ Suffix,
+ FileAs,
+
+ // email
+ DefaultEmail,
+ Emails,
+
+ // home
+ HomeStreet,
+ HomeCity,
+ HomeState,
+ HomeZip,
+ HomeCountry,
+ HomePhone,
+ HomeFax,
+ HomeMobile,
+ HomeWebPage,
+
+ // business
+ Company,
+ BusinessStreet,
+ BusinessCity,
+ BusinessState,
+ BusinessZip,
+ BusinessCountry,
+ BusinessWebPage,
+ JobTitle,
+ Department,
+ Office,
+ BusinessPhone,
+ BusinessFax,
+ BusinessMobile,
+ BusinessPager,
+ Profession,
+ Assistant,
+ Manager,
+
+ //personal
+ Spouse,
+ Gender,
+ Birthday,
+ Anniversary,
+ Nickname,
+ Children,
+
+ // other
+ Notes,
+ Groups
+ };
+
+ // dataset = "todolist"
+ enum TaskFields {
+ TaskUid = UID_ID,
+ TaskCategory = CATEGORY_ID,
+
+ HasDate,
+ Completed,
+ TaskDescription,
+ Priority,
+ Date
+ };
+
+ // dataset = "categories" for todos
+ enum CategoryFields {
+ CatUid = UID_ID,
+ CatName,
+ CatAppGroup
+ };
+
+
+// dataset = "datebook"
+ enum DatebookFields {
+ DatebookUid = UID_ID,
+ DatebookCategory = CATEGORY_ID,
+
+ DatebookDescription,
+ Location,
+ TimeZone,
+ Note,
+ StartDateTime,
+ EndDateTime,
+ DatebookType,
+ HasAlarm,
+ SoundType,
+ AlarmTime,
+
+ RepeatPatternType,
+ RepeatPatternFrequency,
+ RepeatPatternPosition,
+ RepeatPatternDays,
+ RepeatPatternHasEndDate,
+ RepeatPatternEndDate,
+ };
+};
+
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included
+** in the packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING
+** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A
+** PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "stringutil.h"
+#include <qregexp.h>
+#include <qstringlist.h>
+
+namespace Qtopia
+{
+
+
+
+/*
+ Very, very simple Latin-1 only collation guaranteed to displease anyone
+ who actually uses the non-ASCII characters.
+ */
+
+static const char collationHack[] = {
+0x00, //C-@
+0x01, //C-A
+0x02, //C-B
+0x03, //C-C
+0x04, //C-D
+0x05, //C-E
+0x06, //C-F
+0x07, //C-G
+0x08, //C-H
+0x09, //C-I
+0x0a, //C-J
+0x0b, //C-K
+0x0c, //C-L
+0x0d, //C-M
+0x0e, //C-N
+0x0f, //C-O
+0x10, //C-P
+0x11, //C-Q
+0x12, //C-R
+0x13, //C-S
+0x14, //C-T
+0x15, //C-U
+0x16, //C-V
+0x17, //C-W
+0x18, //C-X
+0x19, //C-Y
+0x1a, //C-Z
+0x1b, //C-[
+0x1c, //C-\
+0x1d, //C-]
+0x1e, //C-^
+0x1f, //C-_
+' ', //
+'!', //!
+'"', //"
+'#', //#
+'$', //$
+'%', //%
+'&', //&
+'\'', //'
+'(', //(
+')', //)
+'*', //*
+'+', //+
+',', //,
+'-', //-
+'.', //.
+'/', ///
+0x80, //0
+0x81, //1
+0x82, //2
+0x83, //3
+0x84, //4
+0x85, //5
+0x86, //6
+0x87, //7
+0x88, //8
+0x89, //9
+':', //:
+';', //;
+'<', //<
+'=', //=
+'>', //>
+'?', //?
+'@', //@
+'A', //A
+'B', //B
+'C', //C
+'D', //D
+'E', //E
+'F', //F
+'G', //G
+'H', //H
+'I', //I
+'J', //J
+'K', //K
+'L', //L
+'M', //M
+'N', //N
+'O', //O
+'P', //P
+'Q', //Q
+'R', //R
+'S', //S
+'T', //T
+'U', //U
+'V', //V
+'W', //W
+'X', //X
+'Y', //Y
+'Z', //Z
+'[', //[
+'\\', //\
+']', //]
+'^', //^
+'_', //_
+'`', //`
+'A', //a
+'B', //b
+'C', //c
+'D', //d
+'E', //e
+'F', //f
+'G', //g
+'H', //h
+'I', //i
+'J', //j
+'K', //k
+'L', //l
+'M', //m
+'N', //n
+'O', //o
+'P', //p
+'Q', //q
+'R', //r
+'S', //s
+'T', //t
+'U', //u
+'V', //v
+'W', //w
+'X', //x
+'Y', //y
+'Z', //z
+'{', //{
+'|', //|
+'}', //}
+'~', //~
+'', //
+0x80, //C-M-@
+0x81, //C-M-A
+0x82, //C-M-B
+0x83, //C-M-C
+0x84, //C-M-D
+0x85, //C-M-E
+0x86, //C-M-F
+0x87, //C-M-G
+0x88, //C-M-H
+0x89, //C-M-I
+0x8a, //C-M-J
+0x8b, //C-M-K
+0x8c, //C-M-L
+0x8d, //C-M-M
+0x8e, //C-M-N
+0x8f, //C-M-O
+0x90, //C-M-P
+0x91, //C-M-Q
+0x92, //C-M-R
+0x93, //C-M-S
+0x94, //C-M-T
+0x95, //C-M-U
+0x96, //C-M-V
+0x97, //C-M-W
+0x98, //C-M-X
+0x99, //C-M-Y
+0x9a, //C-M-Z
+0x9b, //C-M-[
+0x9c, //C-M-\
+0x9d, //C-M-]
+0x9e, //C-M-^
+0x9f, //C-M-_
+' ', // 
+'¡', //¡
+'¢', //¢
+'£', //£
+'¤', //¤
+'¥', //¥
+'¦', //¦
+'§', //§
+'¨', //¨
+'©', //©
+'A', //ª
+'«', //«
+'¬', //¬
+'­', //­
+'®', //®
+'¯', //¯
+'O', //°
+'±', //±
+'²', //²
+'³', //³
+'´', //´
+'µ', //µ
+'P', //¶
+'·', //·
+'¸', //¸
+'¹', //¹
+'O', //º
+'»', //»
+'¼', //¼
+'½', //½
+'¾', //¾
+'¿', //¿
+'A', //À
+'A', //Á
+'A', //Â
+'A', //Ã
+'A', //Ä
+'A', //Å
+'A', //Æ
+'C', //Ç
+'E', //È
+'E', //É
+'E', //Ê
+'E', //Ë
+'I', //Ì
+'I', //Í
+'I', //Î
+'I', //Ï
+'D', //Ð
+'N', //Ñ
+'O', //Ò
+'O', //Ó
+'O', //Ô
+'O', //Õ
+'O', //Ö
+'×', //×
+'O', //Ø
+'U', //Ù
+'U', //Ú
+'U', //Û
+'U', //Ü
+'Y', //Ý
+'T', //Þ
+'S', //ß
+'A', //à
+'A', //á
+'A', //â
+'A', //ã
+'A', //ä
+'A', //å
+'A', //æ
+'C', //ç
+'E', //è
+'E', //é
+'E', //ê
+'E', //ë
+'I', //ì
+'I', //í
+'I', //î
+'I', //ï
+'D', //ð
+'N', //ñ
+'O', //ò
+'O', //ó
+'O', //ô
+'O', //õ
+'O', //ö
+'÷', //÷
+'O', //ø
+'U', //ù
+'U', //ú
+'U', //û
+'U', //ü
+'Y', //ý
+'T', //þ
+'Y', //ÿ
+};
+
+
+
+
+
+static void hackString ( QString &s )
+{
+ int len = s.length();
+ const QChar* uc = s.unicode();
+ for ( int i = 0; i < len; i++ ) {
+ if ( !uc++->row() )
+ s[i] = collationHack[s[i].cell()];
+ }
+}
+
+QString buildSortKey( const QString & s )
+{
+ QString res = s;
+ hackString( res );
+ return res;
+}
+
+QString buildSortKey( const QString & s1, const QString & s2 )
+{
+ QString res = s1 + QChar( '\0' ) + s2;
+ hackString( res );
+ return res;
+}
+
+QString buildSortKey( const QString & s1, const QString & s2,
+ const QString & s3 )
+{
+ QString res = s1 + QChar( '\0' ) + s2 + QChar( '\0' ) + s3;
+ hackString( res );
+ return res;
+}
+
+static inline QChar coll( QChar u )
+{
+ return u.row() ? u : QChar(collationHack[ u.cell() ]);
+}
+
+
+int compare( const QString & s1, const QString & s2 )
+{
+ const QChar* u1 = s1.unicode();
+ const QChar* u2 = s2.unicode();
+
+ if ( u1 == u2 )
+ return 0;
+ if ( u1 == 0 )
+ return 1;
+ if ( u2 == 0 )
+ return -1;
+ int l=QMIN(s1.length(),s2.length());
+ while ( l-- && coll(*u1) == coll(*u2) )
+ u1++,u2++;
+ if ( l==-1 )
+ return ( s1.length()-s2.length() );
+ return u1->unicode() - u2->unicode();
+}
+
+QString simplifyMultiLineSpace( const QString &multiLine )
+{
+ QString result;
+ QStringList lines = QStringList::split("\n", multiLine);
+ for ( QStringList::Iterator it = lines.begin(); it != lines.end(); ++it ) {
+ if ( it != lines.begin() )
+ result += "\n";
+ result += (*it).simplifyWhiteSpace();
+ }
+ return result;
+}
+
+QString escapeString( const QString& plain )
+{
+ QString tmp(plain);
+ int pos = tmp.length();
+ const QChar *uc = plain.unicode();
+ while ( pos-- ) {
+ unsigned char ch = uc[pos].latin1();
+ if ( ch == '&' )
+ tmp.replace( pos, 1, "&amp;" );
+ else if ( ch == '<' )
+ tmp.replace( pos, 1, "&lt;" );
+ else if ( ch == '>' )
+ tmp.replace( pos, 1, "&gt;" );
+ else if ( ch == '\"' )
+ tmp.replace( pos, 1, "&quot;" );
+ }
+ return tmp;
+}
+
+QString plainString( const char* escaped, unsigned int length )
+{
+ return plainString( QString::fromUtf8( escaped, length ) );
+}
+
+QString plainString( const QCString& string )
+{
+ // We first have to pass it through a ::fromUtf8()
+ return plainString( string.data(), string.length() );
+}
+
+QString plainString( const QString& string )
+{
+ QString tmp( string );
+ int pos = -1;
+ while ( (pos = tmp.find( "&", pos +1 ) ) != -1 ) {
+ if ( tmp.find( "&amp;", pos ) == pos )
+ tmp.replace( pos, 5, "&" );
+ else if ( tmp.find( "&lt;", pos ) == pos )
+ tmp.replace( pos, 4, "<" );
+ else if( tmp.find( "&gt;", pos ) == pos )
+ tmp.replace( pos, 4, ">" );
+ else if ( tmp.find( "&quot;", pos ) == pos )
+ tmp.replace( pos, 6, "\"" );
+ }
+ return tmp;
+}
+
+} // 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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included
+** in the packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING
+** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A
+** PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+
+#ifndef QTPALMTOP_stringutil_h__
+#define QTPALMTOP_stringutil_h__
+
+#include <qstring.h>
+#include "qpcglobal.h"
+
+namespace Qtopia
+{
+
+// Simplifies white space within each line but keeps the new line characters
+QString QPC_EXPORT simplifyMultiLineSpace( const QString &multiLine );
+
+// Creates a QString which doesn't contain any "dangerous"
+// characters (i.e. <, >, &, ")
+QString QPC_EXPORT escapeString( const QString& plain );
+
+// Takes a UTF-8!! string and removes all the XML thingies (entities?)
+// from the string and also calls fromUtf8() on it... so make sure
+// to pass a QCString/const char* with UTF-8 data only
+QString QPC_EXPORT plainString( const char* escaped, unsigned int length );
+QString QPC_EXPORT plainString( const QCString& string );
+
+QString QPC_EXPORT plainString( const QString& string );
+
+
+// collation functions
+int compare( const QString & s1, const QString & s2 );
+QString buildSortKey( const QString & s );
+QString buildSortKey( const QString & s1, const QString & s2 );
+QString buildSortKey( const QString & s1, const QString & s2,
+ const QString & s3 );
+
+}
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2001 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include <qpe/task.h>
+#include <qregexp.h>
+#include <qstring.h>
+#include <qpe/recordfields.h>
+#include "vobject_p.h"
+#include "timeconversion.h"
+#include "qfiledirect_p.h"
+
+#include <stdio.h>
+
+using namespace Qtopia;
+UidGen Task::sUidGen( UidGen::Qtopia );
+
+Task::Task() : Record(), mDue( FALSE ),
+mDueDate( QDate::currentDate() ),
+mCompleted( FALSE ), mPriority( 3 ), mDesc()
+{
+}
+
+Task::Task( const QMap<int, QString> &m ) : Record(), mDue( FALSE ),
+mDueDate( QDate::currentDate() ), mCompleted( FALSE ), mPriority( 3 ), mDesc()
+{
+ //qDebug("Task::Task fromMap");
+ //dump( m );
+ for ( QMap<int,QString>::ConstIterator it = m.begin(); it != m.end();++it )
+ switch ( (TaskFields) it.key() ) {
+ case HasDate: if ( *it == "1" ) mDue = TRUE; break;
+ case Completed: setCompleted( *it == "1" ); break;
+ case TaskCategory: setCategories( idsFromString( *it ) ); break;
+ case TaskDescription: setDescription( *it ); break;
+ case Priority: setPriority( (*it).toInt() ); break;
+ case Date: mDueDate = TimeConversion::fromString( (*it) ); break;
+ case TaskUid: setUid( (*it).toInt() ); break;
+ }
+}
+
+Task::~Task()
+{
+}
+
+QMap<int, QString> Task::toMap() const
+{
+ QMap<int, QString> m;
+ m.insert( HasDate, hasDueDate() ? "1" : "0" );
+ m.insert( Completed, isCompleted() ? "1" : "0" );
+ m.insert( TaskCategory, idsToString( categories() ) );
+ m.insert( TaskDescription, description() );
+ m.insert( Priority, QString::number( priority() ) );
+ m.insert( Date, TimeConversion::toString( dueDate() ) );
+ m.insert( TaskUid, QString::number(uid()) );
+
+ //qDebug("Task::toMap");
+ //dump( m );
+ return m;
+}
+
+void Task::save( QString& buf ) const
+{
+ buf += " Completed=\"";
+ // qDebug( "writing %d", complete );
+ buf += QString::number( (int)mCompleted );
+ buf += "\"";
+ buf += " HasDate=\"";
+ // qDebug( "writing %d", );
+ buf += QString::number( (int)mDue );
+ buf += "\"";
+ buf += " Priority=\"";
+ // qDebug ("writing %d", prior );
+ buf += QString::number( mPriority );
+ buf += "\"";
+ buf += " Categories=\"";
+ buf += Qtopia::Record::idsToString( categories() );
+ buf += "\"";
+ buf += " Description=\"";
+ // qDebug( "writing note %s", note.latin1() );
+ buf += Qtopia::escapeString( mDesc );
+ buf += "\"";
+ if ( mDue ) {
+ // qDebug("saving ymd %d %d %d", mDueDate.year(), mDueDate.month(),
+ // mDueDate.day() );
+ buf += " DateYear=\"";
+ buf += QString::number( mDueDate.year() );
+ buf += "\"";
+ buf += " DateMonth=\"";
+ buf += QString::number( mDueDate.month() );
+ buf += "\"";
+ buf += " DateDay=\"";
+ buf += QString::number( mDueDate.day() );
+ buf += "\"";
+ }
+ buf += customToXml();
+ // qDebug ("writing uid %d", uid() );
+ buf += " Uid=\"";
+ buf += QString::number( uid() );
+ // terminate it in the application...
+ buf += "\"";
+}
+
+bool Task::match ( const QRegExp &r ) const
+{
+ // match on priority, description on due date...
+ bool match;
+ match = false;
+ if ( QString::number( mPriority ).find( r ) > -1 )
+ match = true;
+ else if ( mDue && mDueDate.toString().find( r ) > -1 )
+ match = true;
+ else if ( mDesc.find( r ) > -1 )
+ match = true;
+ return match;
+}
+
+static inline VObject *safeAddPropValue( VObject *o, const char *prop, const QString &value )
+{
+ VObject *ret = 0;
+ if ( o && !value.isEmpty() )
+ ret = addPropValue( o, prop, value.latin1() );
+ return ret;
+}
+
+static inline VObject *safeAddProp( VObject *o, const char *prop)
+{
+ VObject *ret = 0;
+ if ( o )
+ ret = addProp( o, prop );
+ return ret;
+}
+
+
+static VObject *createVObject( const Task &t )
+{
+ VObject *vcal = newVObject( VCCalProp );
+ safeAddPropValue( vcal, VCVersionProp, "1.0" );
+ VObject *task = safeAddProp( vcal, VCTodoProp );
+
+ if ( t.hasDueDate() )
+ safeAddPropValue( task, VCDueProp, TimeConversion::toISO8601( t.dueDate() ) );
+ safeAddPropValue( task, VCDescriptionProp, t.description() );
+ if ( t.isCompleted() )
+ safeAddPropValue( task, VCStatusProp, "COMPLETED" );
+ safeAddPropValue( task, VCPriorityProp, QString::number( t.priority() ) );
+
+ return vcal;
+}
+
+
+static Task parseVObject( VObject *obj )
+{
+ Task t;
+
+ VObjectIterator it;
+ initPropIterator( &it, obj );
+ while( moreIteration( &it ) ) {
+ VObject *o = nextVObject( &it );
+ QCString name = vObjectName( o );
+ QCString value = vObjectStringZValue( o );
+ if ( name == VCDueProp ) {
+ t.setDueDate( TimeConversion::fromISO8601( value ).date(), TRUE );
+ }
+ else if ( name == VCDescriptionProp ) {
+ t.setDescription( value );
+ }
+ else if ( name == VCStatusProp ) {
+ if ( value == "COMPLETED" )
+ t.setCompleted( TRUE );
+ }
+ else if ( name == VCPriorityProp ) {
+ t.setPriority( value.toInt() );
+ }
+#if 0
+ else {
+ printf("Name: %s, value=%s\n", name.data(), vObjectStringZValue( o ) );
+ VObjectIterator nit;
+ initPropIterator( &nit, o );
+ while( moreIteration( &nit ) ) {
+ VObject *o = nextVObject( &nit );
+ QCString name = vObjectName( o );
+ QString value = vObjectStringZValue( o );
+ printf(" subprop: %s = %s\n", name.data(), value.latin1() );
+ }
+ }
+#endif
+ }
+
+ return t;
+}
+
+
+
+void Task::writeVCalendar( const QString &filename, const QValueList<Task> &tasks)
+{
+ QFileDirect f( filename.utf8().data() );
+ if ( !f.open( IO_WriteOnly ) ) {
+ qWarning("Unable to open vcard write");
+ return;
+ }
+
+ QValueList<Task>::ConstIterator it;
+ for( it = tasks.begin(); it != tasks.end(); ++it ) {
+ VObject *obj = createVObject( *it );
+ writeVObject(f.directHandle() , obj );
+ cleanVObject( obj );
+ }
+
+ cleanStrTbl();
+}
+
+void Task::writeVCalendar( const QString &filename, const Task &task)
+{
+ QFileDirect f( filename.utf8().data() );
+ if ( !f.open( IO_WriteOnly ) ) {
+ qWarning("Unable to open vcard write");
+ return;
+ }
+
+ VObject *obj = createVObject( task );
+ writeVObject(f.directHandle() , obj );
+ cleanVObject( obj );
+
+ cleanStrTbl();
+}
+
+
+QValueList<Task> Task::readVCalendar( const QString &filename )
+{
+ VObject *obj = Parse_MIME_FromFileName( (char *)filename.utf8().data() );
+
+ QValueList<Task> tasks;
+
+ while ( obj ) {
+ QCString name = vObjectName( obj );
+ if ( name == VCCalProp ) {
+ VObjectIterator nit;
+ initPropIterator( &nit, obj );
+ while( moreIteration( &nit ) ) {
+ VObject *o = nextVObject( &nit );
+ QCString name = vObjectName( o );
+ if ( name == VCTodoProp )
+ tasks.append( parseVObject( o ) );
+ }
+ } else if ( name == VCTodoProp ) {
+ // shouldn't happen, but just to be sure
+ tasks.append( parseVObject( obj ) );
+ }
+ VObject *t = obj;
+ obj = nextVObjectInList(obj);
+ cleanVObject( t );
+ }
+
+ return tasks;
+}
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 @@
+/**********************************************************************
+** Copyright (C) 2001 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef __TASK_H__
+#define __TASK_H__
+
+#include <qpe/palmtoprecord.h>
+#include <qpe/stringutil.h>
+
+#include <qvaluelist.h>
+#include <qdatetime.h>
+
+class TaskPrivate;
+class QPC_EXPORT Task : public Qtopia::Record
+{
+public:
+ Task();
+ Task( const QMap<int, QString> &fromMap );
+ ~Task();
+
+ QMap<int, QString> toMap() const;
+
+ static void writeVCalendar( const QString &filename, const QValueList<Task> &tasks);
+ static void writeVCalendar( const QString &filename, const Task &task);
+ static QValueList<Task> readVCalendar( const QString &filename );
+
+ void setPriority( int priority ) { mPriority = priority; }
+ int priority() const { return mPriority; }
+
+// void setCategory( const QString& category )
+// { mCategory = category.stripWhiteSpace(); }
+// const QString &category() const { return mCategory; }
+
+ void setDescription( const QString& description )
+ { mDesc = Qtopia::simplifyMultiLineSpace(description); }
+ const QString &description() const { return mDesc; }
+
+ void setDueDate( const QDate& date, bool hasDue ) { mDueDate = date; mDue = hasDue; }
+ const QDate &dueDate() const { return mDueDate; }
+ bool hasDueDate() const { return mDue; }
+ void setHasDueDate( bool b ) { mDue = b; }
+
+ void setCompleted( bool b ) { mCompleted = b; }
+ bool isCompleted() const { return mCompleted; }
+
+ void save( QString& buf ) const;
+ bool match( const QRegExp &r ) const;
+
+private:
+ Qtopia::UidGen &uidGen() { return sUidGen; }
+ static Qtopia::UidGen sUidGen;
+
+ bool mDue;
+ QDate mDueDate;
+ bool mCompleted;
+ int mPriority;
+ QString mDesc;
+ TaskPrivate *d;
+};
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include <qglobal.h>
+#include "timeconversion.h"
+#include <qregexp.h>
+#include <stdlib.h>
+
+QString TimeConversion::toString( const QDate &d )
+{
+ QString r = QString::number( d.day() ) + "." +
+ QString::number( d.month() ) + "." +
+ QString::number( d.year() );
+ //qDebug("TimeConversion::toString %s", r.latin1());
+ return r;
+}
+
+QDate TimeConversion::fromString( const QString &datestr )
+{
+ int monthPos = datestr.find('.');
+ int yearPos = datestr.find('.', monthPos+1 );
+ if ( monthPos == -1 || yearPos == -1 ) {
+ qDebug("fromString didn't find . in str = %s; mpos = %d ypos = %d", datestr.latin1(), monthPos, yearPos );
+ return QDate();
+ }
+ int d = datestr.left( monthPos ).toInt();
+ int m = datestr.mid( monthPos+1, yearPos - monthPos - 1 ).toInt();
+ int y = datestr.mid( yearPos+1 ).toInt();
+ QDate date ( y,m,d );
+ //qDebug("TimeConversion::fromString ymd = %s => %d %d %d; mpos = %d ypos = %d", datestr.latin1(), y, m, d, monthPos, yearPos);
+ return date;
+}
+
+time_t TimeConversion::toUTC( const QDateTime& dt )
+{
+ time_t tmp;
+ struct tm *lt;
+
+#if defined(_OS_WIN32) || defined (Q_OS_WIN32) || defined (Q_OS_WIN64)
+ _tzset();
+#else
+ tzset();
+#endif
+
+ // get a tm structure from the system to get the correct tz_name
+ tmp = time( 0 );
+ lt = localtime( &tmp );
+
+ lt->tm_sec = dt.time().second();
+ lt->tm_min = dt.time().minute();
+ lt->tm_hour = dt.time().hour();
+ lt->tm_mday = dt.date().day();
+ lt->tm_mon = dt.date().month() - 1; // 0-11 instead of 1-12
+ lt->tm_year = dt.date().year() - 1900; // year - 1900
+ //lt->tm_wday = dt.date().dayOfWeek(); ignored anyway
+ //lt->tm_yday = dt.date().dayOfYear(); ignored anyway
+ lt->tm_wday = -1;
+ lt->tm_yday = -1;
+ // tm_isdst negative -> mktime will find out about DST
+ lt->tm_isdst = -1;
+ // keep tm_zone and tm_gmtoff
+ tmp = mktime( lt );
+ return tmp;
+}
+
+QDateTime TimeConversion::fromUTC( time_t time )
+{
+ struct tm *lt;
+
+#if defined(_OS_WIN32) || defined (Q_OS_WIN32) || defined (Q_OS_WIN64)
+ _tzset();
+#else
+ tzset();
+#endif
+ lt = localtime( &time );
+ QDateTime dt;
+ dt.setDate( QDate( lt->tm_year + 1900, lt->tm_mon + 1, lt->tm_mday ) );
+ dt.setTime( QTime( lt->tm_hour, lt->tm_min, lt->tm_sec ) );
+ return dt;
+}
+
+
+int TimeConversion::secsTo( const QDateTime &from, const QDateTime &to )
+{
+ return toUTC( to ) - toUTC( from );
+}
+
+QCString TimeConversion::toISO8601( const QDate &d )
+{
+ time_t tmp = toUTC( d );
+ struct tm *utc = gmtime( &tmp );
+
+ QCString str;
+ str.sprintf("%04d%02d%02d", (utc->tm_year + 1900), utc->tm_mon+1, utc->tm_mday );
+ return str;
+}
+
+QCString TimeConversion::toISO8601( const QDateTime &dt )
+{
+ time_t tmp = toUTC( dt );
+ struct tm *utc = gmtime( &tmp );
+
+ QCString str;
+ str.sprintf("%04d%02d%02dT%02d%02d%02dZ",
+ (utc->tm_year + 1900), utc->tm_mon+1, utc->tm_mday,
+ utc->tm_hour, utc->tm_min, utc->tm_sec );
+ return str;
+}
+
+QDateTime TimeConversion::fromISO8601( const QCString &s )
+{
+
+#if defined(_OS_WIN32) || defined (Q_OS_WIN32) || defined (Q_OS_WIN64)
+ _tzset();
+#else
+ tzset();
+#endif
+
+ struct tm *thetime = new tm;
+
+ QCString str = s.copy();
+ str.replace(QRegExp("-"), "" );
+ str.replace(QRegExp(":"), "" );
+ str.stripWhiteSpace();
+ str = str.lower();
+
+ int i = str.find( "t" );
+ QCString date;
+ QCString timestr;
+ if ( i != -1 ) {
+ date = str.left( i );
+ timestr = str.mid( i+1 );
+ } else {
+ date = str;
+ }
+
+// qDebug("--- parsing ISO time---");
+ thetime->tm_year = 100;
+ thetime->tm_mon = 0;
+ thetime->tm_mday = 0;
+ thetime->tm_hour = 0;
+ thetime->tm_min = 0;
+ thetime->tm_sec = 0;
+
+// qDebug("date = %s", date.data() );
+
+ switch( date.length() ) {
+ case 8:
+ thetime->tm_mday = date.right( 2 ).toInt();
+ case 6:
+ thetime->tm_mon = date.mid( 4, 2 ).toInt() - 1;
+ case 4:
+ thetime->tm_year = date.left( 4 ).toInt();
+ thetime->tm_year -= 1900;
+ break;
+ default:
+ break;
+ }
+
+ int tzoff = 0;
+ bool inLocalTime = FALSE;
+ if ( timestr.find( 'z' ) == (int)timestr.length() - 1 )
+ // UTC
+ timestr = timestr.left( timestr.length() -1 );
+ else {
+ int plus = timestr.find( "+" );
+ int minus = timestr.find( "-" );
+ if ( plus != -1 || minus != -1 ) {
+ // have a timezone offset
+ plus = (plus != -1) ? plus : minus;
+ QCString off = timestr.mid( plus );
+ timestr = timestr.left( plus );
+
+ int tzoffhour = 0;
+ int tzoffmin = 0;
+ switch( off.length() ) {
+ case 5:
+ tzoffmin = off.mid(3).toInt();
+ case 3:
+ tzoffhour = off.left(3).toInt();
+ default:
+ break;
+ }
+ tzoff = 60*tzoffhour + tzoffmin;
+ } else
+ inLocalTime = TRUE;
+ }
+
+ // get the time:
+ switch( timestr.length() ) {
+ case 6:
+ thetime->tm_sec = timestr.mid( 4 ).toInt();
+ case 4:
+ thetime->tm_min = timestr.mid( 2, 2 ).toInt();
+ case 2:
+ thetime->tm_hour = timestr.left( 2 ).toInt();
+ default:
+ break;
+ }
+
+ int tzloc = 0;
+ time_t tmp = time( 0 );
+ if ( !inLocalTime ) {
+ // have to get the offset between gmt and local time
+ struct tm *lt = localtime( &tmp );
+ tzloc = mktime( lt );
+ struct tm *ut = gmtime( &tmp );
+ tzloc -= mktime( ut );
+ }
+// qDebug("time: %d %d %d, tzloc=%d, tzoff=%d", thetime->tm_hour, thetime->tm_min, thetime->tm_sec,
+// tzloc, tzoff );
+
+ tmp = mktime( thetime );
+ tmp += 60*(-tzloc + tzoff);
+
+ delete thetime;
+
+ return fromUTC( tmp );
+}
+
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef __timeconversion_h__
+#define __timeconversion_h__
+
+#include <time.h>
+#include <sys/types.h>
+#include <qdatetime.h>
+
+#include <qpe/qpcglobal.h>
+
+class QPC_EXPORT TimeConversion
+{
+public:
+ static QString toString( const QDate &d );
+ static QDate fromString( const QString &datestr );
+
+ static time_t toUTC( const QDateTime& dt );
+ static QDateTime fromUTC( time_t time );
+ static int secsTo( const QDateTime &from, const QDateTime &to );
+
+ static QCString toISO8601( const QDate & );
+ static QCString toISO8601( const QDateTime & );
+ static QDateTime fromISO8601( const QCString & );
+};
+
+#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 @@
+%{
+
+/***************************************************************************
+(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
+Business Machines Corporation and Siemens Rolm Communications Inc.
+
+For purposes of this license notice, the term Licensors shall mean,
+collectively, Apple Computer, Inc., AT&T Corp., International
+Business Machines Corporation and Siemens Rolm Communications Inc.
+The term Licensor shall mean any of the Licensors.
+
+Subject to acceptance of the following conditions, permission is hereby
+granted by Licensors without the need for written agreement and without
+license or royalty fees, to use, copy, modify and distribute this
+software for any purpose.
+
+The above copyright notice and the following four paragraphs must be
+reproduced in all copies of this software and any software including
+this software.
+
+THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE
+ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR
+MODIFICATIONS.
+
+IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,
+INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
+OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
+
+EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.
+
+The software is provided with RESTRICTED RIGHTS. Use, duplication, or
+disclosure by the government are subject to restrictions set forth in
+DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
+
+***************************************************************************/
+
+/*
+ * src: vcc.c
+ * doc: Parser for vCard and vCalendar. Note that this code is
+ * generated by a yacc parser generator. Generally it should not
+ * be edited by hand. The real source is vcc.y. The #line directives
+ * can be commented out here to make it easier to trace through
+ * in a debugger. However, if a bug is found it should
+ * be fixed in vcc.y and this file regenerated.
+ */
+
+
+/* debugging utilities */
+#if __DEBUG
+#define DBG_(x) printf x
+#else
+#define DBG_(x)
+#endif
+
+/**** External Functions ****/
+
+/* assign local name to parser variables and functions so that
+ we can use more than one yacc based parser.
+*/
+
+#if 0
+#define yyparse mime_parse
+#define yylex mime_lex
+#define yyerror mime_error
+#define yychar mime_char
+/* #define p_yyval p_mime_val */
+#undef yyval
+#define yyval mime_yyval
+/* #define p_yylval p_mime_lval */
+#undef yylval
+#define yylval mime_yylval
+#define yydebug mime_debug
+#define yynerrs mime_nerrs
+#define yyerrflag mime_errflag
+#define yyss mime_ss
+#define yyssp mime_ssp
+#define yyvs mime_vs
+#define yyvsp mime_vsp
+#define yylhs mime_lhs
+#define yylen mime_len
+#define yydefred mime_defred
+#define yydgoto mime_dgoto
+#define yysindex mime_sindex
+#define yyrindex mime_rindex
+#define yygindex mime_gindex
+#define yytable mime_table
+#define yycheck mime_check
+#define yyname mime_name
+#define yyrule mime_rule
+#ifdef YYPREFIX
+#undef YYPREFIX
+#endif
+#define YYPREFIX "mime_"
+#endif
+
+
+#ifndef _NO_LINE_FOLDING
+#define _SUPPORT_LINE_FOLDING 1
+#endif
+
+/* undef below if compile with MFC */
+/* #define INCLUDEMFC 1 */
+
+#if defined(WIN32) || defined(_WIN32)
+#ifdef INCLUDEMFC
+#include <afx.h>
+#endif
+#endif
+
+#include <string.h>
+#ifndef __MWERKS__
+#include <stdlib.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+
+//#ifdef PALMTOPCENTER
+//#include <qpe/vobject_p.h>
+//#else
+#include "vobject_p.h"
+//#endif
+
+/**** Types, Constants ****/
+
+#define YYDEBUG 0 /* 1 to compile in some debugging code */
+#define MAXTOKEN 256 /* maximum token (line) length */
+#define YYSTACKSIZE 100 // ~unref ?
+#define MAXLEVEL 10 /* max # of nested objects parseable */
+ /* (includes outermost) */
+
+
+/**** Global Variables ****/
+int mime_lineNum, mime_numErrors; /* yyerror() can use these */
+static VObject* vObjList;
+static VObject *curProp;
+static VObject *curObj;
+static VObject* ObjStack[MAXLEVEL];
+static int ObjStackTop;
+
+
+/* A helpful utility for the rest of the app. */
+#if __CPLUSPLUS__
+extern "C" {
+#endif
+
+ extern void yyerror(char *s);
+
+#if __CPLUSPLUS__
+ };
+#endif
+
+int yyparse();
+
+enum LexMode {
+ L_NORMAL,
+ L_VCARD,
+ L_VCAL,
+ L_VEVENT,
+ L_VTODO,
+ L_VALUES,
+ L_BASE64,
+ L_QUOTED_PRINTABLE
+ };
+
+/**** Private Forward Declarations ****/
+static int pushVObject(const char *prop);
+static VObject* popVObject();
+static void lexPopMode(int top);
+static int lexWithinMode(enum LexMode mode);
+static void lexPushMode(enum LexMode mode);
+static void enterProps(const char *s);
+static void enterAttr(const char *s1, const char *s2);
+static void enterValues(const char *value);
+#define mime_error yyerror
+void mime_error(char *s);
+void mime_error_(char *s);
+
+%}
+
+/***************************************************************************/
+/*** The grammar ****/
+/***************************************************************************/
+
+%union {
+ char *str;
+ VObject *vobj;
+ }
+
+%token
+ EQ COLON DOT SEMICOLON SPACE HTAB LINESEP NEWLINE
+ BEGIN_VCARD END_VCARD BEGIN_VCAL END_VCAL
+ BEGIN_VEVENT END_VEVENT BEGIN_VTODO END_VTODO
+ ID
+
+/*
+ * NEWLINE is the token that would occur outside a vCard,
+ * while LINESEP is the token that would occur inside a vCard.
+ */
+
+%token <str>
+ STRING ID
+
+%type <str> name value
+
+%type <vobj> vcard vcal vobject
+
+%start mime
+
+%%
+
+
+mime: vobjects
+ ;
+
+vobjects: vobjects vobject
+ { addList(&vObjList, $2); curObj = 0; }
+ | vobject
+ { addList(&vObjList, $1); curObj = 0; }
+ ;
+
+vobject: vcard
+ | vcal
+ ;
+
+vcard:
+ BEGIN_VCARD
+ {
+ lexPushMode(L_VCARD);
+ if (!pushVObject(VCCardProp)) YYERROR;
+ }
+ items END_VCARD
+ {
+ lexPopMode(0);
+ $$ = popVObject();
+ }
+ | BEGIN_VCARD
+ {
+ lexPushMode(L_VCARD);
+ if (!pushVObject(VCCardProp)) YYERROR;
+ }
+ END_VCARD
+ {
+ lexPopMode(0);
+ $$ = popVObject();
+ }
+ ;
+
+items: items item
+ | item
+ ;
+
+item: prop COLON
+ {
+ lexPushMode(L_VALUES);
+ }
+ values LINESEP
+ {
+ if (lexWithinMode(L_BASE64) || lexWithinMode(L_QUOTED_PRINTABLE))
+ lexPopMode(0);
+ lexPopMode(0);
+ }
+ | error
+ ;
+
+prop: name
+ {
+ enterProps($1);
+ }
+ attr_params
+ | name
+ {
+ enterProps($1);
+ }
+ ;
+
+attr_params: attr_params attr_param
+ | attr_param
+ ;
+
+attr_param: SEMICOLON attr
+ ;
+
+attr: name
+ {
+ enterAttr($1,0);
+ }
+ | name EQ name
+ {
+ enterAttr($1,$3);
+
+ }
+ ;
+
+name: ID
+ ;
+
+values: value SEMICOLON { enterValues($1); } values
+ | value
+ { enterValues($1); }
+ ;
+
+value: STRING
+ |
+ { $$ = 0; }
+ ;
+
+vcal:
+ BEGIN_VCAL
+ { if (!pushVObject(VCCalProp)) YYERROR; }
+ calitems
+ END_VCAL
+ { $$ = popVObject(); }
+ | BEGIN_VCAL
+ { if (!pushVObject(VCCalProp)) YYERROR; }
+ END_VCAL
+ { $$ = popVObject(); }
+ ;
+
+calitems: calitems calitem
+ | calitem
+ ;
+
+calitem:
+ eventitem
+ | todoitem
+ | items
+ ;
+
+eventitem:
+ BEGIN_VEVENT
+ {
+ lexPushMode(L_VEVENT);
+ if (!pushVObject(VCEventProp)) YYERROR;
+ }
+ items
+ END_VEVENT
+ {
+ lexPopMode(0);
+ popVObject();
+ }
+ | BEGIN_VEVENT
+ {
+ lexPushMode(L_VEVENT);
+ if (!pushVObject(VCEventProp)) YYERROR;
+ }
+ END_VEVENT
+ {
+ lexPopMode(0);
+ popVObject();
+ }
+ ;
+
+todoitem:
+ BEGIN_VTODO
+ {
+ lexPushMode(L_VTODO);
+ if (!pushVObject(VCTodoProp)) YYERROR;
+ }
+ items
+ END_VTODO
+ {
+ lexPopMode(0);
+ popVObject();
+ }
+ | BEGIN_VTODO
+ {
+ lexPushMode(L_VTODO);
+ if (!pushVObject(VCTodoProp)) YYERROR;
+ }
+ END_VTODO
+ {
+ lexPopMode(0);
+ popVObject();
+ }
+ ;
+
+%%
+/*------------------------------------*/
+static int pushVObject(const char *prop)
+ {
+ VObject *newObj;
+ if (ObjStackTop == MAXLEVEL)
+ return FALSE;
+
+ ObjStack[++ObjStackTop] = curObj;
+
+ if (curObj) {
+ newObj = addProp(curObj,prop);
+ curObj = newObj;
+ }
+ else
+ curObj = newVObject(prop);
+
+ return TRUE;
+ }
+
+
+/*---------------------------------------*/
+/* This pops the recently built vCard off the stack and returns it. */
+static VObject* popVObject()
+ {
+ VObject *oldObj;
+ if (ObjStackTop < 0) {
+ yyerror("pop on empty Object Stack\n");
+ return 0;
+ }
+ oldObj = curObj;
+ curObj = ObjStack[ObjStackTop--];
+
+ return oldObj;
+ }
+
+
+static void enterValues(const char *value)
+ {
+ if (fieldedProp && *fieldedProp) {
+ if (value) {
+ addPropValue(curProp,*fieldedProp,value);
+ }
+ /* else this field is empty, advance to next field */
+ fieldedProp++;
+ }
+ else {
+ if (value) {
+ setVObjectStringZValue_(curProp,strdup( value ));
+ }
+ }
+ deleteStr(value);
+ }
+
+static void enterProps(const char *s)
+ {
+ curProp = addGroup(curObj,s);
+ deleteStr(s);
+ }
+
+static void enterAttr(const char *s1, const char *s2)
+ {
+ const char *p1, *p2;
+ p1 = lookupProp_(s1);
+ if (s2) {
+ VObject *a;
+ p2 = lookupProp_(s2);
+ a = addProp(curProp,p1);
+ setVObjectStringZValue(a,p2);
+ }
+ else
+ addProp(curProp,p1);
+ if (qstricmp(p1,VCBase64Prop) == 0 || (s2 && qstricmp(p2,VCBase64Prop)==0))
+ lexPushMode(L_BASE64);
+ else if (qstricmp(p1,VCQuotedPrintableProp) == 0
+ || (s2 && qstricmp(p2,VCQuotedPrintableProp)==0))
+ lexPushMode(L_QUOTED_PRINTABLE);
+ deleteStr(s1); deleteStr(s2);
+ }
+
+
+#define MAX_LEX_LOOKAHEAD_0 32
+#define MAX_LEX_LOOKAHEAD 64
+#define MAX_LEX_MODE_STACK_SIZE 10
+#define LEXMODE() (lexBuf.lexModeStack[lexBuf.lexModeStackTop])
+
+struct LexBuf {
+ /* input */
+#ifdef INCLUDEMFC
+ CFile *inputFile;
+#else
+ FILE *inputFile;
+#endif
+ char *inputString;
+ unsigned long curPos;
+ unsigned long inputLen;
+ /* lookahead buffer */
+ /* -- lookahead buffer is short instead of char so that EOF
+ / can be represented correctly.
+ */
+ unsigned long len;
+ short buf[MAX_LEX_LOOKAHEAD];
+ unsigned long getPtr;
+ /* context stack */
+ unsigned long lexModeStackTop;
+ enum LexMode lexModeStack[MAX_LEX_MODE_STACK_SIZE];
+ /* token buffer */
+ unsigned long maxToken;
+ char *strs;
+ unsigned long strsLen;
+ } lexBuf;
+
+static void lexPushMode(enum LexMode mode)
+ {
+ if (lexBuf.lexModeStackTop == (MAX_LEX_MODE_STACK_SIZE-1))
+ yyerror("lexical context stack overflow");
+ else {
+ lexBuf.lexModeStack[++lexBuf.lexModeStackTop] = mode;
+ }
+ }
+
+static void lexPopMode(int top)
+ {
+ /* special case of pop for ease of error recovery -- this
+ version will never underflow */
+ if (top)
+ lexBuf.lexModeStackTop = 0;
+ else
+ if (lexBuf.lexModeStackTop > 0) lexBuf.lexModeStackTop--;
+ }
+
+static int lexWithinMode(enum LexMode mode) {
+ unsigned long i;
+ for (i=0;i<lexBuf.lexModeStackTop;i++)
+ if (mode == lexBuf.lexModeStack[i]) return 1;
+ return 0;
+ }
+
+static char lexGetc_()
+ {
+ /* get next char from input, no buffering. */
+ if (lexBuf.curPos == lexBuf.inputLen)
+ return EOF;
+ else if (lexBuf.inputString)
+ return *(lexBuf.inputString + lexBuf.curPos++);
+ else {
+#ifdef INCLUDEMFC
+ char result;
+ return lexBuf.inputFile->Read(&result, 1) == 1 ? result : EOF;
+#else
+ return fgetc(lexBuf.inputFile);
+#endif
+ }
+ }
+
+static int lexGeta()
+ {
+ ++lexBuf.len;
+ return (lexBuf.buf[lexBuf.getPtr] = lexGetc_());
+ }
+
+static int lexGeta_(int i)
+ {
+ ++lexBuf.len;
+ return (lexBuf.buf[(lexBuf.getPtr+i)%MAX_LEX_LOOKAHEAD] = lexGetc_());
+ }
+
+static void lexSkipLookahead() {
+ if (lexBuf.len > 0 && lexBuf.buf[lexBuf.getPtr]!=EOF) {
+ /* don't skip EOF. */
+ lexBuf.getPtr = (lexBuf.getPtr + 1) % MAX_LEX_LOOKAHEAD;
+ lexBuf.len--;
+ }
+ }
+
+static int lexLookahead() {
+ int c = (lexBuf.len)?
+ lexBuf.buf[lexBuf.getPtr]:
+ lexGeta();
+ /* do the \r\n -> \n or \r -> \n translation here */
+ if (c == '\r') {
+ int a = (lexBuf.len>1)?
+ lexBuf.buf[(lexBuf.getPtr+1)%MAX_LEX_LOOKAHEAD]:
+ lexGeta_(1);
+ if (a == '\n') {
+ lexSkipLookahead();
+ }
+ lexBuf.buf[lexBuf.getPtr] = c = '\n';
+ }
+ else if (c == '\n') {
+ int a = (lexBuf.len>1)?
+ lexBuf.buf[lexBuf.getPtr+1]:
+ lexGeta_(1);
+ if (a == '\r') {
+ lexSkipLookahead();
+ }
+ lexBuf.buf[lexBuf.getPtr] = '\n';
+ }
+ return c;
+ }
+
+static int lexGetc() {
+ int c = lexLookahead();
+ if (lexBuf.len > 0 && lexBuf.buf[lexBuf.getPtr]!=EOF) {
+ /* EOF will remain in lookahead buffer */
+ lexBuf.getPtr = (lexBuf.getPtr + 1) % MAX_LEX_LOOKAHEAD;
+ lexBuf.len--;
+ }
+ return c;
+ }
+
+static void lexSkipLookaheadWord() {
+ if (lexBuf.strsLen <= lexBuf.len) {
+ lexBuf.len -= lexBuf.strsLen;
+ lexBuf.getPtr = (lexBuf.getPtr + lexBuf.strsLen) % MAX_LEX_LOOKAHEAD;
+ }
+ }
+
+static void lexClearToken()
+ {
+ lexBuf.strsLen = 0;
+ }
+
+static void lexAppendc(int c)
+ {
+ lexBuf.strs[lexBuf.strsLen] = c;
+ /* append up to zero termination */
+ if (c == 0) return;
+ lexBuf.strsLen++;
+ if (lexBuf.strsLen > lexBuf.maxToken) {
+ /* double the token string size */
+ lexBuf.maxToken <<= 1;
+ lexBuf.strs = (char*) realloc(lexBuf.strs,(size_t)lexBuf.maxToken);
+ }
+ }
+
+static char* lexStr() {
+ return dupStr(lexBuf.strs,(size_t)lexBuf.strsLen+1);
+ }
+
+static void lexSkipWhite() {
+ int c = lexLookahead();
+ while (c == ' ' || c == '\t') {
+ lexSkipLookahead();
+ c = lexLookahead();
+ }
+ }
+
+static char* lexGetWord() {
+ int c;
+ lexSkipWhite();
+ lexClearToken();
+ c = lexLookahead();
+ while (c != EOF && !strchr("\t\n ;:=",c)) {
+ lexAppendc(c);
+ lexSkipLookahead();
+ c = lexLookahead();
+ }
+ lexAppendc(0);
+ return lexStr();
+ }
+
+static void lexPushLookaheadc(int c) {
+ int putptr;
+ /* can't putback EOF, because it never leaves lookahead buffer */
+ if (c == EOF) return;
+ putptr = (int)lexBuf.getPtr - 1;
+ if (putptr < 0) putptr += MAX_LEX_LOOKAHEAD;
+ lexBuf.getPtr = putptr;
+ lexBuf.buf[putptr] = c;
+ lexBuf.len += 1;
+ }
+
+static char* lexLookaheadWord() {
+ /* this function can lookahead word with max size of MAX_LEX_LOOKAHEAD_0
+ / and thing bigger than that will stop the lookahead and return 0;
+ / leading white spaces are not recoverable.
+ */
+ int c;
+ int len = 0;
+ int curgetptr = 0;
+ lexSkipWhite();
+ lexClearToken();
+ curgetptr = (int)lexBuf.getPtr; // remember!
+ while (len < (MAX_LEX_LOOKAHEAD_0)) {
+ c = lexGetc();
+ len++;
+ if (c == EOF || strchr("\t\n ;:=", c)) {
+ lexAppendc(0);
+ /* restore lookahead buf. */
+ lexBuf.len += len;
+ lexBuf.getPtr = curgetptr;
+ return lexStr();
+ }
+ else
+ lexAppendc(c);
+ }
+ lexBuf.len += len; /* char that has been moved to lookahead buffer */
+ lexBuf.getPtr = curgetptr;
+ return 0;
+ }
+
+#ifdef _SUPPORT_LINE_FOLDING
+static void handleMoreRFC822LineBreak(int c) {
+ /* suport RFC 822 line break in cases like
+ * ADR: foo;
+ * morefoo;
+ * more foo;
+ */
+ if (c == ';') {
+ int a;
+ lexSkipLookahead();
+ /* skip white spaces */
+ a = lexLookahead();
+ while (a == ' ' || a == '\t') {
+ lexSkipLookahead();
+ a = lexLookahead();
+ }
+ if (a == '\n') {
+ lexSkipLookahead();
+ a = lexLookahead();
+ if (a == ' ' || a == '\t') {
+ /* continuation, throw away all the \n and spaces read so
+ * far
+ */
+ lexSkipWhite();
+ lexPushLookaheadc(';');
+ }
+ else {
+ lexPushLookaheadc('\n');
+ lexPushLookaheadc(';');
+ }
+ }
+ else {
+ lexPushLookaheadc(';');
+ }
+ }
+ }
+
+static char* lexGet1Value() {
+ int c;
+ lexSkipWhite();
+ c = lexLookahead();
+ lexClearToken();
+ while (c != EOF && c != ';') {
+ if (c == '\\' ) {
+ int a;
+ lexSkipLookahead();
+ a = lexLookahead();
+ if ( a != ';' ) {
+ lexAppendc('\\');
+ } else {
+ lexAppendc( ';' );
+ lexSkipLookahead();
+ }
+ } else if (c == '\n') {
+ int a;
+ lexSkipLookahead();
+ a = lexLookahead();
+ if (a == ' ' || a == '\t') {
+ lexAppendc(' ');
+ lexSkipLookahead();
+ }
+ else {
+ lexPushLookaheadc('\n');
+ break;
+ }
+ }
+ else {
+ lexAppendc(c);
+ lexSkipLookahead();
+ }
+ c = lexLookahead();
+ }
+ lexAppendc(0);
+ handleMoreRFC822LineBreak(c);
+ return c==EOF?0:lexStr();
+ }
+#endif
+
+static int match_begin_name(int end) {
+ char *n = lexLookaheadWord();
+ int token = ID;
+ if (n) {
+ if (!qstricmp(n,"vcard")) token = end?END_VCARD:BEGIN_VCARD;
+ else if (!qstricmp(n,"vcalendar")) token = end?END_VCAL:BEGIN_VCAL;
+ else if (!qstricmp(n,"vevent")) token = end?END_VEVENT:BEGIN_VEVENT;
+ else if (!qstricmp(n,"vtodo")) token = end?END_VTODO:BEGIN_VTODO;
+ deleteStr(n);
+ return token;
+ }
+ return 0;
+ }
+
+
+#ifdef INCLUDEMFC
+void initLex(const char *inputstring, unsigned long inputlen, CFile *inputfile)
+#else
+void initLex(const char *inputstring, unsigned long inputlen, FILE *inputfile)
+#endif
+ {
+ // initialize lex mode stack
+ lexBuf.lexModeStack[lexBuf.lexModeStackTop=0] = L_NORMAL;
+
+ // iniatialize lex buffer.
+ lexBuf.inputString = (char*) inputstring;
+ lexBuf.inputLen = inputlen;
+ lexBuf.curPos = 0;
+ lexBuf.inputFile = inputfile;
+
+ lexBuf.len = 0;
+ lexBuf.getPtr = 0;
+
+ lexBuf.maxToken = MAXTOKEN;
+ lexBuf.strs = (char*)malloc(MAXTOKEN);
+ lexBuf.strsLen = 0;
+
+ }
+
+static void finiLex() {
+ free(lexBuf.strs);
+ }
+
+
+/*-----------------------------------*/
+/* This parses and converts the base64 format for binary encoding into
+ * a decoded buffer (allocated with new). See RFC 1521.
+ */
+static char * lexGetDataFromBase64()
+ {
+ unsigned long bytesLen = 0, bytesMax = 0;
+ int quadIx = 0, pad = 0;
+ unsigned long trip = 0;
+ unsigned char b;
+ int c;
+ unsigned char *bytes = NULL;
+ unsigned char *oldBytes = NULL;
+
+ DBG_(("db: lexGetDataFromBase64\n"));
+ while (1) {
+ c = lexGetc();
+ if (c == '\n') {
+ ++mime_lineNum;
+ if (lexLookahead() == '\n') {
+ /* a '\n' character by itself means end of data */
+ break;
+ }
+ else continue; /* ignore '\n' */
+ }
+ else {
+ if ((c >= 'A') && (c <= 'Z'))
+ b = (unsigned char)(c - 'A');
+ else if ((c >= 'a') && (c <= 'z'))
+ b = (unsigned char)(c - 'a') + 26;
+ else if ((c >= '0') && (c <= '9'))
+ b = (unsigned char)(c - '0') + 52;
+ else if (c == '+')
+ b = 62;
+ else if (c == '/')
+ b = 63;
+ else if (c == '=') {
+ b = 0;
+ pad++;
+ } else if ((c == ' ') || (c == '\t')) {
+ continue;
+ } else { /* error condition */
+ if (bytes) free(bytes);
+ else if (oldBytes) free(oldBytes);
+ // error recovery: skip until 2 adjacent newlines.
+ DBG_(("db: invalid character 0x%x '%c'\n", c,c));
+ if (c != EOF) {
+ c = lexGetc();
+ while (c != EOF) {
+ if (c == '\n' && lexLookahead() == '\n') {
+ ++mime_lineNum;
+ break;
+ }
+ c = lexGetc();
+ }
+ }
+ return NULL;
+ }
+ trip = (trip << 6) | b;
+ if (++quadIx == 4) {
+ unsigned char outBytes[3];
+ int numOut;
+ int i;
+ for (i = 0; i < 3; i++) {
+ outBytes[2-i] = (unsigned char)(trip & 0xFF);
+ trip >>= 8;
+ }
+ numOut = 3 - pad;
+ if (bytesLen + numOut > bytesMax) {
+ if (!bytes) {
+ bytesMax = 1024;
+ bytes = (unsigned char*)malloc((size_t)bytesMax);
+ }
+ else {
+ bytesMax <<= 2;
+ oldBytes = bytes;
+ bytes = (unsigned char*)realloc(bytes,(size_t)bytesMax);
+ }
+ if (bytes == 0) {
+ mime_error("out of memory while processing BASE64 data\n");
+ }
+ }
+ if (bytes) {
+ memcpy(bytes + bytesLen, outBytes, numOut);
+ bytesLen += numOut;
+ }
+ trip = 0;
+ quadIx = 0;
+ }
+ }
+ } /* while */
+ DBG_(("db: bytesLen = %d\n", bytesLen));
+ /* kludge: all this won't be necessary if we have tree form
+ representation */
+ if (bytes) {
+ setValueWithSize(curProp,bytes,(unsigned int)bytesLen);
+ free(bytes);
+ }
+ else if (oldBytes) {
+ setValueWithSize(curProp,oldBytes,(unsigned int)bytesLen);
+ free(oldBytes);
+ }
+ return 0;
+ }
+
+static int match_begin_end_name(int end) {
+ int token;
+ lexSkipWhite();
+ if (lexLookahead() != ':') return ID;
+ lexSkipLookahead();
+ lexSkipWhite();
+ token = match_begin_name(end);
+ if (token == ID) {
+ lexPushLookaheadc(':');
+ DBG_(("db: ID '%s'\n", yylval.str));
+ return ID;
+ }
+ else if (token != 0) {
+ lexSkipLookaheadWord();
+ deleteStr(yylval.str);
+ DBG_(("db: begin/end %d\n", token));
+ return token;
+ }
+ return 0;
+ }
+
+static char* lexGetQuotedPrintable()
+ {
+ char cur;
+
+ lexClearToken();
+ do {
+ cur = lexGetc();
+ switch (cur) {
+ case '=': {
+ int c = 0;
+ int next[2];
+ int i;
+ for (i = 0; i < 2; i++) {
+ next[i] = lexGetc();
+ if (next[i] >= '0' && next[i] <= '9')
+ c = c * 16 + next[i] - '0';
+ else if (next[i] >= 'A' && next[i] <= 'F')
+ c = c * 16 + next[i] - 'A' + 10;
+ else
+ break;
+ }
+ if (i == 0) {
+ /* single '=' follow by LINESEP is continuation sign? */
+ if (next[0] == '\n') {
+ ++mime_lineNum;
+ }
+ else {
+ lexPushLookaheadc('=');
+ goto EndString;
+ }
+ }
+ else if (i == 1) {
+ lexPushLookaheadc(next[1]);
+ lexPushLookaheadc(next[0]);
+ lexAppendc('=');
+ } else {
+ lexAppendc(c);
+ }
+ break;
+ } /* '=' */
+ case '\n': {
+ lexPushLookaheadc('\n');
+ goto EndString;
+ }
+ case (char)EOF:
+ break;
+ default:
+ lexAppendc(cur);
+ break;
+ } /* switch */
+ } while (cur != (char)EOF);
+
+EndString:
+ lexAppendc(0);
+ return lexStr();
+ } /* LexQuotedPrintable */
+
+static int yylex() {
+
+ int lexmode = LEXMODE();
+ if (lexmode == L_VALUES) {
+ int c = lexGetc();
+ if (c == ';') {
+ DBG_(("db: SEMICOLON\n"));
+ lexPushLookaheadc(c);
+ handleMoreRFC822LineBreak(c);
+ lexSkipLookahead();
+ return SEMICOLON;
+ }
+ else if (strchr("\n",c)) {
+ ++mime_lineNum;
+ /* consume all line separator(s) adjacent to each other */
+ c = lexLookahead();
+ while (strchr("\n",c)) {
+ lexSkipLookahead();
+ c = lexLookahead();
+ ++mime_lineNum;
+ }
+ DBG_(("db: LINESEP\n"));
+ return LINESEP;
+ }
+ else {
+ char *p = 0;
+ lexPushLookaheadc(c);
+ if (lexWithinMode(L_BASE64)) {
+ /* get each char and convert to bin on the fly... */
+ p = lexGetDataFromBase64();
+ yylval.str = p;
+ return STRING;
+ }
+ else if (lexWithinMode(L_QUOTED_PRINTABLE)) {
+ p = lexGetQuotedPrintable();
+ }
+ else {
+#ifdef _SUPPORT_LINE_FOLDING
+ p = lexGet1Value();
+#else
+ p = lexGetStrUntil(";\n");
+#endif
+ }
+ if (p) {
+ DBG_(("db: STRING: '%s'\n", p));
+ yylval.str = p;
+ return STRING;
+ }
+ else return 0;
+ }
+ }
+ else {
+ /* normal mode */
+ while (1) {
+ int c = lexGetc();
+ switch(c) {
+ case ':': {
+ /* consume all line separator(s) adjacent to each other */
+ /* ignoring linesep immediately after colon. */
+ c = lexLookahead();
+ while (strchr("\n",c)) {
+ lexSkipLookahead();
+ c = lexLookahead();
+ ++mime_lineNum;
+ }
+ DBG_(("db: COLON\n"));
+ return COLON;
+ }
+ case ';':
+ DBG_(("db: SEMICOLON\n"));
+ return SEMICOLON;
+ case '=':
+ DBG_(("db: EQ\n"));
+ return EQ;
+ /* ignore whitespace in this mode */
+ case '\t':
+ case ' ': continue;
+ case '\n': {
+ ++mime_lineNum;
+ continue;
+ }
+ case EOF: return 0;
+ break;
+ default: {
+ lexPushLookaheadc(c);
+ if (isalnum(c)) {
+ char *t = lexGetWord();
+ yylval.str = t;
+ if (!qstricmp(t, "begin")) {
+ return match_begin_end_name(0);
+ }
+ else if (!qstricmp(t,"end")) {
+ return match_begin_end_name(1);
+ }
+ else {
+ DBG_(("db: ID '%s'\n", t));
+ return ID;
+ }
+ }
+ else {
+ /* unknow token */
+ return 0;
+ }
+ break;
+ }
+ }
+ }
+ }
+ return 0;
+ }
+
+
+/***************************************************************************/
+/*** Public Functions ****/
+/***************************************************************************/
+
+static VObject* Parse_MIMEHelper()
+ {
+ ObjStackTop = -1;
+ mime_numErrors = 0;
+ mime_lineNum = 1;
+ vObjList = 0;
+ curObj = 0;
+
+ if (yyparse() != 0)
+ return 0;
+
+ finiLex();
+ return vObjList;
+ }
+
+/*--------------------------------------------*/
+DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len)
+ {
+ initLex(input, len, 0);
+ return Parse_MIMEHelper();
+ }
+
+
+#if INCLUDEMFC
+
+DLLEXPORT(VObject*) Parse_MIME_FromFile(CFile *file)
+ {
+ unsigned long startPos;
+ VObject *result;
+
+ initLex(0,-1,file);
+ startPos = file->GetPosition();
+ if (!(result = Parse_MIMEHelper()))
+ file->Seek(startPos, CFile::begin);
+ return result;
+ }
+
+#else
+
+VObject* Parse_MIME_FromFile(FILE *file)
+ {
+ VObject *result;
+ long startPos;
+
+ initLex(0,(unsigned long)-1,file);
+ startPos = ftell(file);
+ if (!(result = Parse_MIMEHelper())) {
+ fseek(file,startPos,SEEK_SET);
+ }
+ return result;
+ }
+
+DLLEXPORT(VObject*) Parse_MIME_FromFileName(char *fname)
+ {
+ FILE *fp = fopen(fname,"r");
+ if (fp) {
+ VObject* o = Parse_MIME_FromFile(fp);
+ fclose(fp);
+ return o;
+ }
+ else {
+ char msg[80];
+ sprintf(msg, "can't open file '%s' for reading\n", fname);
+ mime_error_(msg);
+ return 0;
+ }
+ }
+
+#endif
+
+/*-------------------------------------*/
+
+static MimeErrorHandler mimeErrorHandler;
+
+DLLEXPORT(void) registerMimeErrorHandler(MimeErrorHandler me)
+ {
+ mimeErrorHandler = me;
+ }
+
+void mime_error(char *s)
+ {
+ char msg[256];
+ if (mimeErrorHandler) {
+ sprintf(msg,"%s at line %d", s, mime_lineNum);
+ mimeErrorHandler(msg);
+ }
+ }
+
+void mime_error_(char *s)
+ {
+ if (mimeErrorHandler) {
+ mimeErrorHandler(s);
+ }
+ }
+
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 @@
+/***************************************************************************
+(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
+Business Machines Corporation and Siemens Rolm Communications Inc.
+
+For purposes of this license notice, the term Licensors shall mean,
+collectively, Apple Computer, Inc., AT&T Corp., International
+Business Machines Corporation and Siemens Rolm Communications Inc.
+The term Licensor shall mean any of the Licensors.
+
+Subject to acceptance of the following conditions, permission is hereby
+granted by Licensors without the need for written agreement and without
+license or royalty fees, to use, copy, modify and distribute this
+software for any purpose.
+
+The above copyright notice and the following four paragraphs must be
+reproduced in all copies of this software and any software including
+this software.
+
+THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE
+ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR
+MODIFICATIONS.
+
+IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,
+INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
+OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
+
+EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.
+
+The software is provided with RESTRICTED RIGHTS. Use, duplication, or
+disclosure by the government are subject to restrictions set forth in
+DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
+
+***************************************************************************/
+
+/*
+ * src: vobject.c
+ * doc: vobject and APIs to construct vobject, APIs pretty print
+ * vobject, and convert a vobject into its textual representation.
+ */
+
+#ifndef MWERKS
+#include <malloc.h>
+#endif
+
+#include "vobject_p.h"
+#include "qfiledirect_p.h"
+#include <string.h>
+#include <stdio.h>
+#include <fcntl.h>
+//#include <io.h>
+
+
+#define NAME_OF(o) o->id
+#define VALUE_TYPE(o) o->valType
+#define STRINGZ_VALUE_OF(o) o->val.strs
+#define INTEGER_VALUE_OF(o) o->val.i
+#define LONG_VALUE_OF(o) o->val.l
+#define ANY_VALUE_OF(o) o->val.any
+#define VOBJECT_VALUE_OF(o) o->val.vobj
+
+typedef union ValueItem {
+ const char *strs;
+ unsigned int i;
+ unsigned long l;
+ void *any;
+ VObject *vobj;
+ } ValueItem;
+
+struct VObject {
+ VObject *next;
+ const char *id;
+ VObject *prop;
+ unsigned short valType;
+ ValueItem val;
+ };
+
+typedef struct StrItem StrItem;
+
+struct StrItem {
+ StrItem *next;
+ const char *s;
+ unsigned int refCnt;
+ };
+
+const char** fieldedProp;
+
+
+
+/*----------------------------------------------------------------------
+ The following functions involve with memory allocation:
+ newVObject
+ deleteVObject
+ dupStr
+ deleteStr
+ newStrItem
+ deleteStrItem
+ ----------------------------------------------------------------------*/
+
+DLLEXPORT(VObject*) newVObject_(const char *id)
+{
+ VObject *p = (VObject*)malloc(sizeof(VObject));
+ p->next = 0;
+ p->id = id;
+ p->prop = 0;
+ VALUE_TYPE(p) = 0;
+ ANY_VALUE_OF(p) = 0;
+ return p;
+}
+
+DLLEXPORT(VObject*) newVObject(const char *id)
+{
+ return newVObject_(lookupStr(id));
+}
+
+DLLEXPORT(void) deleteVObject(VObject *p)
+{
+ unUseStr(p->id);
+ free(p);
+}
+
+DLLEXPORT(char*) dupStr(const char *s, unsigned int size)
+{
+ char *t;
+ if (size == 0) {
+ size = strlen(s);
+ }
+ t = (char*)malloc(size+1);
+ if (t) {
+ memcpy(t,s,size);
+ t[size] = 0;
+ return t;
+ }
+ else {
+ return (char*)0;
+ }
+}
+
+DLLEXPORT(void) deleteStr(const char *p)
+{
+ if (p) free((void*)p);
+}
+
+
+static StrItem* newStrItem(const char *s, StrItem *next)
+{
+ StrItem *p = (StrItem*)malloc(sizeof(StrItem));
+ p->next = next;
+ p->s = s;
+ p->refCnt = 1;
+ return p;
+}
+
+static void deleteStrItem(StrItem *p)
+{
+ free((void*)p);
+}
+
+
+/*----------------------------------------------------------------------
+ The following function provide accesses to VObject's value.
+ ----------------------------------------------------------------------*/
+
+DLLEXPORT(const char*) vObjectName(VObject *o)
+{
+ return NAME_OF(o);
+}
+
+DLLEXPORT(void) setVObjectName(VObject *o, const char* id)
+{
+ NAME_OF(o) = id;
+}
+
+DLLEXPORT(const char*) vObjectStringZValue(VObject *o)
+{
+ return STRINGZ_VALUE_OF(o);
+}
+
+DLLEXPORT(void) setVObjectStringZValue(VObject *o, const char *s)
+{
+ STRINGZ_VALUE_OF(o) = dupStr(s,0);
+ VALUE_TYPE(o) = VCVT_STRINGZ;
+}
+
+DLLEXPORT(void) setVObjectStringZValue_(VObject *o, const char *s)
+{
+ STRINGZ_VALUE_OF(o) = s;
+ VALUE_TYPE(o) = VCVT_STRINGZ;
+}
+
+DLLEXPORT(unsigned int) vObjectIntegerValue(VObject *o)
+{
+ return INTEGER_VALUE_OF(o);
+}
+
+DLLEXPORT(void) setVObjectIntegerValue(VObject *o, unsigned int i)
+{
+ INTEGER_VALUE_OF(o) = i;
+ VALUE_TYPE(o) = VCVT_UINT;
+}
+
+DLLEXPORT(unsigned long) vObjectLongValue(VObject *o)
+{
+ return LONG_VALUE_OF(o);
+}
+
+DLLEXPORT(void) setVObjectLongValue(VObject *o, unsigned long l)
+{
+ LONG_VALUE_OF(o) = l;
+ VALUE_TYPE(o) = VCVT_ULONG;
+}
+
+DLLEXPORT(void*) vObjectAnyValue(VObject *o)
+{
+ return ANY_VALUE_OF(o);
+}
+
+DLLEXPORT(void) setVObjectAnyValue(VObject *o, void *t)
+{
+ ANY_VALUE_OF(o) = t;
+ VALUE_TYPE(o) = VCVT_RAW;
+}
+
+DLLEXPORT(VObject*) vObjectVObjectValue(VObject *o)
+{
+ return VOBJECT_VALUE_OF(o);
+}
+
+DLLEXPORT(void) setVObjectVObjectValue(VObject *o, VObject *p)
+{
+ VOBJECT_VALUE_OF(o) = p;
+ VALUE_TYPE(o) = VCVT_VOBJECT;
+}
+
+DLLEXPORT(int) vObjectValueType(VObject *o)
+{
+ return VALUE_TYPE(o);
+}
+
+
+/*----------------------------------------------------------------------
+ The following functions can be used to build VObject.
+ ----------------------------------------------------------------------*/
+
+DLLEXPORT(VObject*) addVObjectProp(VObject *o, VObject *p)
+{
+ /* circular link list pointed to tail */
+ /*
+ o {next,id,prop,val}
+ V
+ pn {next,id,prop,val}
+ V
+ ...
+ p1 {next,id,prop,val}
+ V
+ pn
+ -->
+ o {next,id,prop,val}
+ V
+ pn {next,id,prop,val}
+ V
+ p {next,id,prop,val}
+ ...
+ p1 {next,id,prop,val}
+ V
+ pn
+ */
+
+ VObject *tail = o->prop;
+ if (tail) {
+ p->next = tail->next;
+ o->prop = tail->next = p;
+ }
+ else {
+ o->prop = p->next = p;
+ }
+ return p;
+}
+
+DLLEXPORT(VObject*) addProp(VObject *o, const char *id)
+{
+ return addVObjectProp(o,newVObject(id));
+}
+
+DLLEXPORT(VObject*) addProp_(VObject *o, const char *id)
+{
+ return addVObjectProp(o,newVObject_(id));
+}
+
+DLLEXPORT(void) addList(VObject **o, VObject *p)
+{
+ p->next = 0;
+ if (*o == 0) {
+ *o = p;
+ }
+ else {
+ VObject *t = *o;
+ while (t->next) {
+ t = t->next;
+ }
+ t->next = p;
+ }
+}
+
+DLLEXPORT(VObject*) nextVObjectInList(VObject *o)
+{
+ return o->next;
+}
+
+DLLEXPORT(VObject*) setValueWithSize_(VObject *prop, void *val, unsigned int size)
+{
+ VObject *sizeProp;
+ setVObjectAnyValue(prop, val);
+ sizeProp = addProp(prop,VCDataSizeProp);
+ setVObjectLongValue(sizeProp, size);
+ return prop;
+}
+
+DLLEXPORT(VObject*) setValueWithSize(VObject *prop, void *val, unsigned int size)
+{
+ void *p = dupStr((const char *)val,size);
+ return setValueWithSize_(prop,p,p?size:0);
+}
+
+DLLEXPORT(void) initPropIterator(VObjectIterator *i, VObject *o)
+{
+ i->start = o->prop;
+ i->next = 0;
+}
+
+DLLEXPORT(void) initVObjectIterator(VObjectIterator *i, VObject *o)
+{
+ i->start = o->next;
+ i->next = 0;
+}
+
+DLLEXPORT(int) moreIteration(VObjectIterator *i)
+{
+ return (i->start && (i->next==0 || i->next!=i->start));
+}
+
+DLLEXPORT(VObject*) nextVObject(VObjectIterator *i)
+{
+ if (i->start && i->next != i->start) {
+ if (i->next == 0) {
+ i->next = i->start->next;
+ return i->next;
+ }
+ else {
+ i->next = i->next->next;
+ return i->next;
+ }
+ }
+ else return (VObject*)0;
+}
+
+DLLEXPORT(VObject*) isAPropertyOf(VObject *o, const char *id)
+{
+ VObjectIterator i;
+ initPropIterator(&i,o);
+ while (moreIteration(&i)) {
+ VObject *each = nextVObject(&i);
+ if (!qstricmp(id,each->id))
+ return each;
+ }
+ return (VObject*)0;
+}
+
+DLLEXPORT(VObject*) addGroup(VObject *o, const char *g)
+{
+ /*
+ a.b.c
+ -->
+ prop(c)
+ prop(VCGrouping=b)
+ prop(VCGrouping=a)
+ */
+ char *dot = strrchr(g,'.');
+ if (dot) {
+ VObject *p, *t;
+ char *gs, *n = dot+1;
+ gs = dupStr(g,0); /* so we can write to it. */
+ /* used to be
+ * t = p = addProp_(o,lookupProp_(n));
+ */
+ t = p = addProp_(o,lookupProp(n));
+ dot = strrchr(gs,'.');
+ *dot = 0;
+ do {
+ dot = strrchr(gs,'.');
+ if (dot) {
+ n = dot+1;
+ *dot=0;
+ }
+ else
+ n = gs;
+ /* property(VCGroupingProp=n);
+ * and the value may have VCGrouping property
+ */
+ t = addProp(t,VCGroupingProp);
+ setVObjectStringZValue(t,lookupProp_(n));
+ } while (n != gs);
+ deleteStr(gs);
+ return p;
+ }
+ else
+ return addProp_(o,lookupProp(g));
+}
+
+DLLEXPORT(VObject*) addPropValue(VObject *o, const char *p, const char *v)
+{
+ VObject *prop;
+ prop = addProp(o,p);
+ setVObjectStringZValue_(prop, strdup( v ) );
+ return prop;
+}
+
+DLLEXPORT(VObject*) addPropSizedValue_(VObject *o, const char *p, const char *v,
+ unsigned int size)
+{
+ VObject *prop;
+ prop = addProp(o,p);
+ setValueWithSize_(prop, (void*)v, size);
+ return prop;
+}
+
+DLLEXPORT(VObject*) addPropSizedValue(VObject *o, const char *p, const char *v,
+ unsigned int size)
+{
+ return addPropSizedValue_(o,p,dupStr(v,size),size);
+}
+
+
+DLLEXPORT(void) cleanVObject(VObject *o)
+{
+ if (o == 0) return;
+ if (o->prop) {
+ /* destroy time: cannot use the iterator here.
+ Have to break the cycle in the circular link
+ list and turns it into regular NULL-terminated
+ list -- since at some point of destruction,
+ the reference entry for the iterator to work
+ will not longer be valid.
+ */
+ VObject *p;
+ p = o->prop->next;
+ o->prop->next = 0;
+ do {
+ VObject *t = p->next;
+ cleanVObject(p);
+ p = t;
+ } while (p);
+ }
+ switch (VALUE_TYPE(o)) {
+ case VCVT_STRINGZ:
+ case VCVT_RAW:
+ // assume they are all allocated by malloc.
+ free((char*)STRINGZ_VALUE_OF(o));
+ break;
+ case VCVT_VOBJECT:
+ cleanVObject(VOBJECT_VALUE_OF(o));
+ break;
+ }
+ deleteVObject(o);
+}
+
+DLLEXPORT(void) cleanVObjects(VObject *list)
+{
+ while (list) {
+ VObject *t = list;
+ list = nextVObjectInList(list);
+ cleanVObject(t);
+ }
+}
+
+/*----------------------------------------------------------------------
+ The following is a String Table Facilities.
+ ----------------------------------------------------------------------*/
+
+#define STRTBLSIZE 255
+
+static StrItem *strTbl[STRTBLSIZE];
+
+static unsigned int hashStr(const char *s)
+{
+ unsigned int h = 0;
+ int i;
+ for (i=0;s[i];i++) {
+ h += s[i]*i;
+ }
+ return h % STRTBLSIZE;
+}
+
+DLLEXPORT(const char*) lookupStr(const char *s)
+{
+ StrItem *t;
+ unsigned int h = hashStr(s);
+ if ((t = strTbl[h]) != 0) {
+ do {
+ if (qstricmp(t->s,s) == 0) {
+ t->refCnt++;
+ return t->s;
+ }
+ t = t->next;
+ } while (t);
+ }
+ s = dupStr(s,0);
+ strTbl[h] = newStrItem(s,strTbl[h]);
+ return s;
+}
+
+DLLEXPORT(void) unUseStr(const char *s)
+{
+ StrItem *t, *p;
+ unsigned int h = hashStr(s);
+ if ((t = strTbl[h]) != 0) {
+ p = t;
+ do {
+ if (qstricmp(t->s,s) == 0) {
+ t->refCnt--;
+ if (t->refCnt == 0) {
+ if (p == strTbl[h]) {
+ strTbl[h] = t->next;
+ }
+ else {
+ p->next = t->next;
+ }
+ deleteStr(t->s);
+ deleteStrItem(t);
+ return;
+ }
+ }
+ p = t;
+ t = t->next;
+ } while (t);
+ }
+}
+
+DLLEXPORT(void) cleanStrTbl()
+{
+ int i;
+ for (i=0; i<STRTBLSIZE;i++) {
+ StrItem *t = strTbl[i];
+ while (t) {
+ StrItem *p;
+ deleteStr(t->s);
+ p = t;
+ t = t->next;
+ deleteStrItem(p);
+ } while (t);
+ strTbl[i] = 0;
+ }
+}
+
+
+struct PreDefProp {
+ const char *name;
+ const char *alias;
+ const char** fields;
+ unsigned int flags;
+ };
+
+/* flags in PreDefProp */
+#define PD_BEGIN 0x1
+#define PD_INTERNAL 0x2
+
+static const char *adrFields[] = {
+ VCPostalBoxProp,
+ VCExtAddressProp,
+ VCStreetAddressProp,
+ VCCityProp,
+ VCRegionProp,
+ VCPostalCodeProp,
+ VCCountryNameProp,
+ 0
+};
+
+static const char *nameFields[] = {
+ VCFamilyNameProp,
+ VCGivenNameProp,
+ VCAdditionalNamesProp,
+ VCNamePrefixesProp,
+ VCNameSuffixesProp,
+ NULL
+ };
+
+static const char *orgFields[] = {
+ VCOrgNameProp,
+ VCOrgUnitProp,
+ VCOrgUnit2Prop,
+ VCOrgUnit3Prop,
+ VCOrgUnit4Prop,
+ NULL
+ };
+
+static const char *AAlarmFields[] = {
+ VCRunTimeProp,
+ VCSnoozeTimeProp,
+ VCRepeatCountProp,
+ VCAudioContentProp,
+ 0
+ };
+
+/* ExDate -- has unamed fields */
+/* RDate -- has unamed fields */
+
+static const char *DAlarmFields[] = {
+ VCRunTimeProp,
+ VCSnoozeTimeProp,
+ VCRepeatCountProp,
+ VCDisplayStringProp,
+ 0
+ };
+
+static const char *MAlarmFields[] = {
+ VCRunTimeProp,
+ VCSnoozeTimeProp,
+ VCRepeatCountProp,
+ VCEmailAddressProp,
+ VCNoteProp,
+ 0
+ };
+
+static const char *PAlarmFields[] = {
+ VCRunTimeProp,
+ VCSnoozeTimeProp,
+ VCRepeatCountProp,
+ VCProcedureNameProp,
+ 0
+ };
+
+static struct PreDefProp propNames[] = {
+ { VC7bitProp, 0, 0, 0 },
+ { VC8bitProp, 0, 0, 0 },
+ { VCAAlarmProp, 0, AAlarmFields, 0 },
+ { VCAdditionalNamesProp, 0, 0, 0 },
+ { VCAdrProp, 0, adrFields, 0 },
+ { VCAgentProp, 0, 0, 0 },
+ { VCAIFFProp, 0, 0, 0 },
+ { VCAOLProp, 0, 0, 0 },
+ { VCAppleLinkProp, 0, 0, 0 },
+ { VCAttachProp, 0, 0, 0 },
+ { VCAttendeeProp, 0, 0, 0 },
+ { VCATTMailProp, 0, 0, 0 },
+ { VCAudioContentProp, 0, 0, 0 },
+ { VCAVIProp, 0, 0, 0 },
+ { VCBase64Prop, 0, 0, 0 },
+ { VCBBSProp, 0, 0, 0 },
+ { VCBirthDateProp, 0, 0, 0 },
+ { VCBMPProp, 0, 0, 0 },
+ { VCBodyProp, 0, 0, 0 },
+ { VCBusinessRoleProp, 0, 0, 0 },
+ { VCCalProp, 0, 0, PD_BEGIN },
+ { VCCaptionProp, 0, 0, 0 },
+ { VCCardProp, 0, 0, PD_BEGIN },
+ { VCCarProp, 0, 0, 0 },
+ { VCCategoriesProp, 0, 0, 0 },
+ { VCCellularProp, 0, 0, 0 },
+ { VCCGMProp, 0, 0, 0 },
+ { VCCharSetProp, 0, 0, 0 },
+ { VCCIDProp, VCContentIDProp, 0, 0 },
+ { VCCISProp, 0, 0, 0 },
+ { VCCityProp, 0, 0, 0 },
+ { VCClassProp, 0, 0, 0 },
+ { VCCommentProp, 0, 0, 0 },
+ { VCCompletedProp, 0, 0, 0 },
+ { VCContentIDProp, 0, 0, 0 },
+ { VCCountryNameProp, 0, 0, 0 },
+ { VCDAlarmProp, 0, DAlarmFields, 0 },
+ { VCDataSizeProp, 0, 0, PD_INTERNAL },
+ { VCDayLightProp, 0, 0, 0 },
+ { VCDCreatedProp, 0, 0, 0 },
+ { VCDeliveryLabelProp, 0, 0, 0 },
+ { VCDescriptionProp, 0, 0, 0 },
+ { VCDIBProp, 0, 0, 0 },
+ { VCDisplayStringProp, 0, 0, 0 },
+ { VCDomesticProp, 0, 0, 0 },
+ { VCDTendProp, 0, 0, 0 },
+ { VCDTstartProp, 0, 0, 0 },
+ { VCDueProp, 0, 0, 0 },
+ { VCEmailAddressProp, 0, 0, 0 },
+ { VCEncodingProp, 0, 0, 0 },
+ { VCEndProp, 0, 0, 0 },
+ { VCEventProp, 0, 0, PD_BEGIN },
+ { VCEWorldProp, 0, 0, 0 },
+ { VCExNumProp, 0, 0, 0 },
+ { VCExpDateProp, 0, 0, 0 },
+ { VCExpectProp, 0, 0, 0 },
+ { VCExtAddressProp, 0, 0, 0 },
+ { VCFamilyNameProp, 0, 0, 0 },
+ { VCFaxProp, 0, 0, 0 },
+ { VCFullNameProp, 0, 0, 0 },
+ { VCGeoLocationProp, 0, 0, 0 },
+ { VCGeoProp, 0, 0, 0 },
+ { VCGIFProp, 0, 0, 0 },
+ { VCGivenNameProp, 0, 0, 0 },
+ { VCGroupingProp, 0, 0, 0 },
+ { VCHomeProp, 0, 0, 0 },
+ { VCIBMMailProp, 0, 0, 0 },
+ { VCInlineProp, 0, 0, 0 },
+ { VCInternationalProp, 0, 0, 0 },
+ { VCInternetProp, 0, 0, 0 },
+ { VCISDNProp, 0, 0, 0 },
+ { VCJPEGProp, 0, 0, 0 },
+ { VCLanguageProp, 0, 0, 0 },
+ { VCLastModifiedProp, 0, 0, 0 },
+ { VCLastRevisedProp, 0, 0, 0 },
+ { VCLocationProp, 0, 0, 0 },
+ { VCLogoProp, 0, 0, 0 },
+ { VCMailerProp, 0, 0, 0 },
+ { VCMAlarmProp, 0, MAlarmFields, 0 },
+ { VCMCIMailProp, 0, 0, 0 },
+ { VCMessageProp, 0, 0, 0 },
+ { VCMETProp, 0, 0, 0 },
+ { VCModemProp, 0, 0, 0 },
+ { VCMPEG2Prop, 0, 0, 0 },
+ { VCMPEGProp, 0, 0, 0 },
+ { VCMSNProp, 0, 0, 0 },
+ { VCNamePrefixesProp, 0, 0, 0 },
+ { VCNameProp, 0, nameFields, 0 },
+ { VCNameSuffixesProp, 0, 0, 0 },
+ { VCNoteProp, 0, 0, 0 },
+ { VCOrgNameProp, 0, 0, 0 },
+ { VCOrgProp, 0, orgFields, 0 },
+ { VCOrgUnit2Prop, 0, 0, 0 },
+ { VCOrgUnit3Prop, 0, 0, 0 },
+ { VCOrgUnit4Prop, 0, 0, 0 },
+ { VCOrgUnitProp, 0, 0, 0 },
+ { VCPagerProp, 0, 0, 0 },
+ { VCPAlarmProp, 0, PAlarmFields, 0 },
+ { VCParcelProp, 0, 0, 0 },
+ { VCPartProp, 0, 0, 0 },
+ { VCPCMProp, 0, 0, 0 },
+ { VCPDFProp, 0, 0, 0 },
+ { VCPGPProp, 0, 0, 0 },
+ { VCPhotoProp, 0, 0, 0 },
+ { VCPICTProp, 0, 0, 0 },
+ { VCPMBProp, 0, 0, 0 },
+ { VCPostalBoxProp, 0, 0, 0 },
+ { VCPostalCodeProp, 0, 0, 0 },
+ { VCPostalProp, 0, 0, 0 },
+ { VCPowerShareProp, 0, 0, 0 },
+ { VCPreferredProp, 0, 0, 0 },
+ { VCPriorityProp, 0, 0, 0 },
+ { VCProcedureNameProp, 0, 0, 0 },
+ { VCProdIdProp, 0, 0, 0 },
+ { VCProdigyProp, 0, 0, 0 },
+ { VCPronunciationProp, 0, 0, 0 },
+ { VCPSProp, 0, 0, 0 },
+ { VCPublicKeyProp, 0, 0, 0 },
+ { VCQPProp, VCQuotedPrintableProp, 0, 0 },
+ { VCQuickTimeProp, 0, 0, 0 },
+ { VCQuotedPrintableProp, 0, 0, 0 },
+ { VCRDateProp, 0, 0, 0 },
+ { VCRegionProp, 0, 0, 0 },
+ { VCRelatedToProp, 0, 0, 0 },
+ { VCRepeatCountProp, 0, 0, 0 },
+ { VCResourcesProp, 0, 0, 0 },
+ { VCRNumProp, 0, 0, 0 },
+ { VCRoleProp, 0, 0, 0 },
+ { VCRRuleProp, 0, 0, 0 },
+ { VCRSVPProp, 0, 0, 0 },
+ { VCRunTimeProp, 0, 0, 0 },
+ { VCSequenceProp, 0, 0, 0 },
+ { VCSnoozeTimeProp, 0, 0, 0 },
+ { VCStartProp, 0, 0, 0 },
+ { VCStatusProp, 0, 0, 0 },
+ { VCStreetAddressProp, 0, 0, 0 },
+ { VCSubTypeProp, 0, 0, 0 },
+ { VCSummaryProp, 0, 0, 0 },
+ { VCTelephoneProp, 0, 0, 0 },
+ { VCTIFFProp, 0, 0, 0 },
+ { VCTimeZoneProp, 0, 0, 0 },
+ { VCTitleProp, 0, 0, 0 },
+ { VCTLXProp, 0, 0, 0 },
+ { VCTodoProp, 0, 0, PD_BEGIN },
+ { VCTranspProp, 0, 0, 0 },
+ { VCUniqueStringProp, 0, 0, 0 },
+ { VCURLProp, 0, 0, 0 },
+ { VCURLValueProp, 0, 0, 0 },
+ { VCValueProp, 0, 0, 0 },
+ { VCVersionProp, 0, 0, 0 },
+ { VCVideoProp, 0, 0, 0 },
+ { VCVoiceProp, 0, 0, 0 },
+ { VCWAVEProp, 0, 0, 0 },
+ { VCWMFProp, 0, 0, 0 },
+ { VCWorkProp, 0, 0, 0 },
+ { VCX400Prop, 0, 0, 0 },
+ { VCX509Prop, 0, 0, 0 },
+ { VCXRuleProp, 0, 0, 0 },
+ { 0,0,0,0 }
+ };
+
+
+static struct PreDefProp* lookupPropInfo(const char* str)
+{
+ /* brute force for now, could use a hash table here. */
+ int i;
+
+ for (i = 0; propNames[i].name; i++)
+ if (qstricmp(str, propNames[i].name) == 0) {
+ return &propNames[i];
+ }
+
+ return 0;
+}
+
+
+DLLEXPORT(const char*) lookupProp_(const char* str)
+{
+ int i;
+
+ for (i = 0; propNames[i].name; i++)
+ if (qstricmp(str, propNames[i].name) == 0) {
+ const char* s;
+ s = propNames[i].alias?propNames[i].alias:propNames[i].name;
+ return lookupStr(s);
+ }
+ return lookupStr(str);
+}
+
+
+DLLEXPORT(const char*) lookupProp(const char* str)
+{
+ int i;
+
+ for (i = 0; propNames[i].name; i++)
+ if (qstricmp(str, propNames[i].name) == 0) {
+ const char *s;
+ fieldedProp = propNames[i].fields;
+ s = propNames[i].alias?propNames[i].alias:propNames[i].name;
+ return lookupStr(s);
+ }
+ fieldedProp = 0;
+ return lookupStr(str);
+}
+
+
+/*----------------------------------------------------------------------
+ APIs to Output text form.
+ ----------------------------------------------------------------------*/
+#define OFILE_REALLOC_SIZE 256
+typedef struct OFile {
+ FILE *fp;
+ char *s;
+ int len;
+ int limit;
+ int alloc:1;
+ int fail:1;
+ } OFile;
+
+#if 0
+static void appendsOFile(OFile *fp, const char *s)
+{
+ int slen;
+ if (fp->fail) return;
+ slen = strlen(s);
+ if (fp->fp) {
+ fwrite(s,1,slen,fp->fp);
+ }
+ else {
+stuff:
+ if (fp->len + slen < fp->limit) {
+ memcpy(fp->s+fp->len,s,slen);
+ fp->len += slen;
+ return;
+ }
+ else if (fp->alloc) {
+ fp->limit = fp->limit + OFILE_REALLOC_SIZE;
+ if (OFILE_REALLOC_SIZE <= slen) fp->limit += slen;
+ fp->s = (char *) realloc(fp->s,fp->limit);
+ if (fp->s) goto stuff;
+ }
+ if (fp->alloc)
+ free(fp->s);
+ fp->s = 0;
+ fp->fail = 1;
+ }
+}
+
+static void appendcOFile(OFile *fp, char c)
+{
+ if (fp->fail) return;
+ if (fp->fp) {
+ fputc(c,fp->fp);
+ }
+ else {
+stuff:
+ if (fp->len+1 < fp->limit) {
+ fp->s[fp->len] = c;
+ fp->len++;
+ return;
+ }
+ else if (fp->alloc) {
+ fp->limit = fp->limit + OFILE_REALLOC_SIZE;
+ fp->s = (char *) realloc(fp->s,fp->limit);
+ if (fp->s) goto stuff;
+ }
+ if (fp->alloc)
+ free(fp->s);
+ fp->s = 0;
+ fp->fail = 1;
+ }
+}
+#else
+static void appendcOFile_(OFile *fp, char c)
+{
+ if (fp->fail) return;
+ if (fp->fp) {
+ fputc(c,fp->fp);
+ }
+ else {
+stuff:
+ if (fp->len+1 < fp->limit) {
+ fp->s[fp->len] = c;
+ fp->len++;
+ return;
+ }
+ else if (fp->alloc) {
+ fp->limit = fp->limit + OFILE_REALLOC_SIZE;
+ fp->s = (char *)realloc(fp->s,fp->limit);
+ if (fp->s) goto stuff;
+ }
+ if (fp->alloc)
+ free(fp->s);
+ fp->s = 0;
+ fp->fail = 1;
+ }
+}
+
+static void appendcOFile(OFile *fp, char c)
+{
+ if (c == '\n') {
+ /* write out as <CR><LF> */
+ appendcOFile_(fp,0xd);
+ appendcOFile_(fp,0xa);
+ }
+ else
+ appendcOFile_(fp,c);
+}
+
+static void appendsOFile(OFile *fp, const char *s)
+{
+ int i, slen;
+ slen = strlen(s);
+ for (i=0; i<slen; i++) {
+ appendcOFile(fp,s[i]);
+ }
+}
+
+#endif
+
+static void initOFile(OFile *fp, FILE *ofp)
+{
+ fp->fp = ofp;
+ fp->s = 0;
+ fp->len = 0;
+ fp->limit = 0;
+ fp->alloc = 0;
+ fp->fail = 0;
+}
+
+static int writeBase64(OFile *fp, unsigned char *s, long len)
+{
+ long cur = 0;
+ int i, numQuads = 0;
+ unsigned long trip;
+ unsigned char b;
+ char quad[5];
+#define MAXQUADS 16
+
+ quad[4] = 0;
+
+ while (cur < len) {
+ // collect the triplet of bytes into 'trip'
+ trip = 0;
+ for (i = 0; i < 3; i++) {
+ b = (cur < len) ? *(s + cur) : 0;
+ cur++;
+ trip = trip << 8 | b;
+ }
+ // fill in 'quad' with the appropriate four characters
+ for (i = 3; i >= 0; i--) {
+ b = (unsigned char)(trip & 0x3F);
+ trip = trip >> 6;
+ if ((3 - i) < (cur - len))
+ quad[i] = '='; // pad char
+ else if (b < 26) quad[i] = (char)b + 'A';
+ else if (b < 52) quad[i] = (char)(b - 26) + 'a';
+ else if (b < 62) quad[i] = (char)(b - 52) + '0';
+ else if (b == 62) quad[i] = '+';
+ else quad[i] = '/';
+ }
+ // now output 'quad' with appropriate whitespace and line ending
+ appendsOFile(fp, (numQuads == 0 ? " " : ""));
+ appendsOFile(fp, quad);
+ appendsOFile(fp, ((cur >= len)?"\n" :(numQuads==MAXQUADS-1?"\n" : "")));
+ numQuads = (numQuads + 1) % MAXQUADS;
+ }
+ appendcOFile(fp,'\n');
+
+ return 1;
+}
+
+static void writeQPString(OFile *fp, const char *s)
+{
+ const char *p = s;
+ while (*p) {
+ if (*p == '\n') {
+ if (p[1]) appendsOFile(fp,"=0A=");
+ }
+ appendcOFile(fp,*p);
+ p++;
+ }
+}
+
+
+
+static void writeVObject_(OFile *fp, VObject *o);
+
+static void writeValue(OFile *fp, VObject *o, unsigned long size)
+{
+ if (o == 0) return;
+ switch (VALUE_TYPE(o)) {
+ case VCVT_STRINGZ: {
+ writeQPString(fp, STRINGZ_VALUE_OF(o));
+ break;
+ }
+ case VCVT_UINT: {
+ char buf[16];
+ sprintf(buf,"%u", INTEGER_VALUE_OF(o));
+ appendsOFile(fp,buf);
+ break;
+ }
+ case VCVT_ULONG: {
+ char buf[16];
+ sprintf(buf,"%lu", LONG_VALUE_OF(o));
+ appendsOFile(fp,buf);
+ break;
+ }
+ case VCVT_RAW: {
+ appendcOFile(fp,'\n');
+ writeBase64(fp,(unsigned char*)(ANY_VALUE_OF(o)),size);
+ break;
+ }
+ case VCVT_VOBJECT:
+ appendcOFile(fp,'\n');
+ writeVObject_(fp,VOBJECT_VALUE_OF(o));
+ break;
+ }
+}
+
+static void writeAttrValue(OFile *fp, VObject *o)
+{
+ if (NAME_OF(o)) {
+ struct PreDefProp *pi;
+ pi = lookupPropInfo(NAME_OF(o));
+ if (pi && ((pi->flags & PD_INTERNAL) != 0)) return;
+ appendcOFile(fp,';');
+ appendsOFile(fp,NAME_OF(o));
+ }
+ else
+ appendcOFile(fp,';');
+ if (VALUE_TYPE(o)) {
+ appendcOFile(fp,'=');
+ writeValue(fp,o,0);
+ }
+}
+
+static void writeGroup(OFile *fp, VObject *o)
+{
+ char buf1[256];
+ char buf2[256];
+ strcpy(buf1,NAME_OF(o));
+ while ((o=isAPropertyOf(o,VCGroupingProp)) != 0) {
+ strcpy(buf2,STRINGZ_VALUE_OF(o));
+ strcat(buf2,".");
+ strcat(buf2,buf1);
+ strcpy(buf1,buf2);
+ }
+ appendsOFile(fp,buf1);
+}
+
+static int inList(const char **list, const char *s)
+{
+ if (list == 0) return 0;
+ while (*list) {
+ if (qstricmp(*list,s) == 0) return 1;
+ list++;
+ }
+ return 0;
+}
+
+static void writeProp(OFile *fp, VObject *o)
+{
+ if (NAME_OF(o)) {
+ struct PreDefProp *pi;
+ VObjectIterator t;
+ const char **fields_ = 0;
+ pi = lookupPropInfo(NAME_OF(o));
+ if (pi && ((pi->flags & PD_BEGIN) != 0)) {
+ writeVObject_(fp,o);
+ return;
+ }
+ if (isAPropertyOf(o,VCGroupingProp))
+ writeGroup(fp,o);
+ else
+ appendsOFile(fp,NAME_OF(o));
+ if (pi) fields_ = pi->fields;
+ initPropIterator(&t,o);
+ while (moreIteration(&t)) {
+ const char *s;
+ VObject *eachProp = nextVObject(&t);
+ s = NAME_OF(eachProp);
+ if (qstricmp(VCGroupingProp,s) && !inList(fields_,s))
+ writeAttrValue(fp,eachProp);
+ }
+ if (fields_) {
+ int i = 0, n = 0;
+ const char** fields = fields_;
+ /* output prop as fields */
+ appendcOFile(fp,':');
+ while (*fields) {
+ VObject *t = isAPropertyOf(o,*fields);
+ i++;
+ if (t) n = i;
+ fields++;
+ }
+ fields = fields_;
+ for (i=0;i<n;i++) {
+ writeValue(fp,isAPropertyOf(o,*fields),0);
+ fields++;
+ if (i<(n-1)) appendcOFile(fp,';');
+ }
+ }
+ }
+
+ if (VALUE_TYPE(o)) {
+ unsigned long size = 0;
+ VObject *p = isAPropertyOf(o,VCDataSizeProp);
+ if (p) size = LONG_VALUE_OF(p);
+ appendcOFile(fp,':');
+ writeValue(fp,o,size);
+ }
+
+ appendcOFile(fp,'\n');
+}
+
+static void writeVObject_(OFile *fp, VObject *o)
+{
+ if (NAME_OF(o)) {
+ struct PreDefProp *pi;
+ pi = lookupPropInfo(NAME_OF(o));
+
+ if (pi && ((pi->flags & PD_BEGIN) != 0)) {
+ VObjectIterator t;
+ const char *begin = NAME_OF(o);
+ appendsOFile(fp,"BEGIN:");
+ appendsOFile(fp,begin);
+ appendcOFile(fp,'\n');
+ initPropIterator(&t,o);
+ while (moreIteration(&t)) {
+ VObject *eachProp = nextVObject(&t);
+ writeProp(fp, eachProp);
+ }
+ appendsOFile(fp,"END:");
+ appendsOFile(fp,begin);
+ appendsOFile(fp,"\n\n");
+ }
+ }
+}
+
+void writeVObject(FILE *fp, VObject *o)
+{
+ OFile ofp;
+ // #####
+ //_setmode(_fileno(fp), _O_BINARY);
+ initOFile(&ofp,fp);
+ writeVObject_(&ofp,o);
+}
+
+DLLEXPORT(void) writeVObjectToFile(char *fname, VObject *o)
+{
+ QFileDirect f( fname);
+ if ( !f.open( IO_WriteOnly ) ) {
+ qWarning("Unable to open vobject write %s", fname);
+ return;
+ }
+
+ writeVObject( f.directHandle(),o );
+}
+
+DLLEXPORT(void) writeVObjectsToFile(char *fname, VObject *list)
+{
+ QFileDirect f( fname);
+ if ( !f.open( IO_WriteOnly ) ) {
+ qWarning("Unable to open vobject write %s", fname);
+ return;
+ }
+
+ while (list) {
+ writeVObject(f.directHandle(),list);
+ list = nextVObjectInList(list);
+ }
+}
+
+// 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 @@
+/***************************************************************************
+(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
+Business Machines Corporation and Siemens Rolm Communications Inc.
+
+For purposes of this license notice, the term Licensors shall mean,
+collectively, Apple Computer, Inc., AT&T Corp., International
+Business Machines Corporation and Siemens Rolm Communications Inc.
+The term Licensor shall mean any of the Licensors.
+
+Subject to acceptance of the following conditions, permission is hereby
+granted by Licensors without the need for written agreement and without
+license or royalty fees, to use, copy, modify and distribute this
+software for any purpose.
+
+The above copyright notice and the following four paragraphs must be
+reproduced in all copies of this software and any software including
+this software.
+
+THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE
+ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR
+MODIFICATIONS.
+
+IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,
+INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
+OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
+
+EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.
+
+The software is provided with RESTRICTED RIGHTS. Use, duplication, or
+disclosure by the government are subject to restrictions set forth in
+DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
+
+***************************************************************************/
+
+/*
+
+The vCard/vCalendar C interface is implemented in the set
+of files as follows:
+
+vcc.y, yacc source, and vcc.c, the yacc output you will use
+implements the core parser
+
+vobject.c implements an API that insulates the caller from
+the parser and changes in the vCard/vCalendar BNF
+
+port.h defines compilation environment dependent stuff
+
+vcc.h and vobject.h are header files for their .c counterparts
+
+vcaltmp.h and vcaltmp.c implement vCalendar "macro" functions
+which you may find useful.
+
+test.c is a standalone test driver that exercises some of
+the features of the APIs provided. Invoke test.exe on a
+VCARD/VCALENDAR input text file and you will see the pretty
+print output of the internal representation (this pretty print
+output should give you a good idea of how the internal
+representation looks like -- there is one such output in the
+following too). Also, a file with the .out suffix is generated
+to show that the internal representation can be written back
+in the original text format.
+
+For more information on this API see the readme.txt file
+which accompanied this distribution.
+
+ Also visit:
+
+ http://www.versit.com
+ http://www.ralden.com
+
+*/
+
+
+#ifndef __VOBJECT_H__
+#define __VOBJECT_H__ 1
+
+#include <qstring.h>
+
+#define vCardClipboardFormat "+//ISBN 1-887687-00-9::versit::PDI//vCard"
+#define vCalendarClipboardFormat "+//ISBN 1-887687-00-9::versit::PDI//vCalendar"
+
+/* The above strings vCardClipboardFormat and vCalendarClipboardFormat
+are globally unique IDs which can be used to generate clipboard format
+ID's as per the requirements of a specific platform. For example, in
+Windows they are used as the parameter in a call to RegisterClipboardFormat.
+For example:
+
+ CLIPFORMAT foo = RegisterClipboardFormat(vCardClipboardFormat);
+
+*/
+
+#define vCardMimeType "text/x-vCard"
+#define vCalendarMimeType "text/x-vCalendar"
+
+#undef DLLEXPORT
+#include <qglobal.h>
+#if defined(Q_WS_WIN)
+#define DLLEXPORT(t) __declspec(dllexport) t
+#else
+#define DLLEXPORT(t) t
+#endif
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+#ifndef TRUE
+#define TRUE 1
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+
+
+#define VC7bitProp "7BIT"
+#define VC8bitProp "8BIT"
+#define VCAAlarmProp "AALARM"
+#define VCAdditionalNamesProp "ADDN"
+#define VCAdrProp "ADR"
+#define VCAgentProp "AGENT"
+#define VCAIFFProp "AIFF"
+#define VCAOLProp "AOL"
+#define VCAppleLinkProp "APPLELINK"
+#define VCAttachProp "ATTACH"
+#define VCAttendeeProp "ATTENDEE"
+#define VCATTMailProp "ATTMAIL"
+#define VCAudioContentProp "AUDIOCONTENT"
+#define VCAVIProp "AVI"
+#define VCBase64Prop "BASE64"
+#define VCBBSProp "BBS"
+#define VCBirthDateProp "BDAY"
+#define VCBMPProp "BMP"
+#define VCBodyProp "BODY"
+#define VCBusinessRoleProp "ROLE"
+#define VCCalProp "VCALENDAR"
+#define VCCaptionProp "CAP"
+#define VCCardProp "VCARD"
+#define VCCarProp "CAR"
+#define VCCategoriesProp "CATEGORIES"
+#define VCCellularProp "CELL"
+#define VCCGMProp "CGM"
+#define VCCharSetProp "CS"
+#define VCCIDProp "CID"
+#define VCCISProp "CIS"
+#define VCCityProp "L"
+#define VCClassProp "CLASS"
+#define VCCommentProp "NOTE"
+#define VCCompletedProp "COMPLETED"
+#define VCContentIDProp "CONTENT-ID"
+#define VCCountryNameProp "C"
+#define VCDAlarmProp "DALARM"
+#define VCDataSizeProp "DATASIZE"
+#define VCDayLightProp "DAYLIGHT"
+#define VCDCreatedProp "DCREATED"
+#define VCDeliveryLabelProp "LABEL"
+#define VCDescriptionProp "DESCRIPTION"
+#define VCDIBProp "DIB"
+#define VCDisplayStringProp "DISPLAYSTRING"
+#define VCDomesticProp "DOM"
+#define VCDTendProp "DTEND"
+#define VCDTstartProp "DTSTART"
+#define VCDueProp "DUE"
+#define VCEmailAddressProp "EMAIL"
+#define VCEncodingProp "ENCODING"
+#define VCEndProp "END"
+#define VCEventProp "VEVENT"
+#define VCEWorldProp "EWORLD"
+#define VCExNumProp "EXNUM"
+#define VCExpDateProp "EXDATE"
+#define VCExpectProp "EXPECT"
+#define VCExtAddressProp "EXT ADD"
+#define VCFamilyNameProp "F"
+#define VCFaxProp "FAX"
+#define VCFullNameProp "FN"
+#define VCGeoProp "GEO"
+#define VCGeoLocationProp "GEO"
+#define VCGIFProp "GIF"
+#define VCGivenNameProp "G"
+#define VCGroupingProp "Grouping"
+#define VCHomeProp "HOME"
+#define VCIBMMailProp "IBMMail"
+#define VCInlineProp "INLINE"
+#define VCInternationalProp "INTL"
+#define VCInternetProp "INTERNET"
+#define VCISDNProp "ISDN"
+#define VCJPEGProp "JPEG"
+#define VCLanguageProp "LANG"
+#define VCLastModifiedProp "LAST-MODIFIED"
+#define VCLastRevisedProp "REV"
+#define VCLocationProp "LOCATION"
+#define VCLogoProp "LOGO"
+#define VCMailerProp "MAILER"
+#define VCMAlarmProp "MALARM"
+#define VCMCIMailProp "MCIMAIL"
+#define VCMessageProp "MSG"
+#define VCMETProp "MET"
+#define VCModemProp "MODEM"
+#define VCMPEG2Prop "MPEG2"
+#define VCMPEGProp "MPEG"
+#define VCMSNProp "MSN"
+#define VCNamePrefixesProp "NPRE"
+#define VCNameProp "N"
+#define VCNameSuffixesProp "NSUF"
+#define VCNoteProp "NOTE"
+#define VCOrgNameProp "ORGNAME"
+#define VCOrgProp "ORG"
+#define VCOrgUnit2Prop "OUN2"
+#define VCOrgUnit3Prop "OUN3"
+#define VCOrgUnit4Prop "OUN4"
+#define VCOrgUnitProp "OUN"
+#define VCPagerProp "PAGER"
+#define VCPAlarmProp "PALARM"
+#define VCParcelProp "PARCEL"
+#define VCPartProp "PART"
+#define VCPCMProp "PCM"
+#define VCPDFProp "PDF"
+#define VCPGPProp "PGP"
+#define VCPhotoProp "PHOTO"
+#define VCPICTProp "PICT"
+#define VCPMBProp "PMB"
+#define VCPostalBoxProp "BOX"
+#define VCPostalCodeProp "PC"
+#define VCPostalProp "POSTAL"
+#define VCPowerShareProp "POWERSHARE"
+#define VCPreferredProp "PREF"
+#define VCPriorityProp "PRIORITY"
+#define VCProcedureNameProp "PROCEDURENAME"
+#define VCProdIdProp "PRODID"
+#define VCProdigyProp "PRODIGY"
+#define VCPronunciationProp "SOUND"
+#define VCPSProp "PS"
+#define VCPublicKeyProp "KEY"
+#define VCQPProp "QP"
+#define VCQuickTimeProp "QTIME"
+#define VCQuotedPrintableProp "QUOTED-PRINTABLE"
+#define VCRDateProp "RDATE"
+#define VCRegionProp "R"
+#define VCRelatedToProp "RELATED-TO"
+#define VCRepeatCountProp "REPEATCOUNT"
+#define VCResourcesProp "RESOURCES"
+#define VCRNumProp "RNUM"
+#define VCRoleProp "ROLE"
+#define VCRRuleProp "RRULE"
+#define VCRSVPProp "RSVP"
+#define VCRunTimeProp "RUNTIME"
+#define VCSequenceProp "SEQUENCE"
+#define VCSnoozeTimeProp "SNOOZETIME"
+#define VCStartProp "START"
+#define VCStatusProp "STATUS"
+#define VCStreetAddressProp "STREET"
+#define VCSubTypeProp "SUBTYPE"
+#define VCSummaryProp "SUMMARY"
+#define VCTelephoneProp "TEL"
+#define VCTIFFProp "TIFF"
+#define VCTimeZoneProp "TZ"
+#define VCTitleProp "TITLE"
+#define VCTLXProp "TLX"
+#define VCTodoProp "VTODO"
+#define VCTranspProp "TRANSP"
+#define VCUniqueStringProp "UID"
+#define VCURLProp "URL"
+#define VCURLValueProp "URLVAL"
+#define VCValueProp "VALUE"
+#define VCVersionProp "VERSION"
+#define VCVideoProp "VIDEO"
+#define VCVoiceProp "VOICE"
+#define VCWAVEProp "WAVE"
+#define VCWMFProp "WMF"
+#define VCWorkProp "WORK"
+#define VCX400Prop "X400"
+#define VCX509Prop "X509"
+#define VCXRuleProp "XRULE"
+
+
+typedef struct VObject VObject;
+
+typedef struct VObjectIterator {
+ VObject* start;
+ VObject* next;
+ } VObjectIterator;
+
+extern DLLEXPORT(VObject*) newVObject(const char *id);
+extern DLLEXPORT(void) deleteVObject(VObject *p);
+extern DLLEXPORT(char*) dupStr(const char *s, unsigned int size);
+extern DLLEXPORT(void) deleteStr(const char *p);
+extern DLLEXPORT(void) unUseStr(const char *s);
+
+extern DLLEXPORT(void) setVObjectName(VObject *o, const char* id);
+extern DLLEXPORT(void) setVObjectStringZValue(VObject *o, const char *s);
+extern DLLEXPORT(void) setVObjectStringZValue_(VObject *o, const char *s);
+extern DLLEXPORT(void) setVObjectIntegerValue(VObject *o, unsigned int i);
+extern DLLEXPORT(void) setVObjectLongValue(VObject *o, unsigned long l);
+extern DLLEXPORT(void) setVObjectAnyValue(VObject *o, void *t);
+extern DLLEXPORT(VObject*) setValueWithSize(VObject *prop, void *val, unsigned int size);
+extern DLLEXPORT(VObject*) setValueWithSize_(VObject *prop, void *val, unsigned int size);
+
+extern DLLEXPORT(const char*) vObjectName(VObject *o);
+extern DLLEXPORT(const char*) vObjectStringZValue(VObject *o);
+extern DLLEXPORT(unsigned int) vObjectIntegerValue(VObject *o);
+extern DLLEXPORT(unsigned long) vObjectLongValue(VObject *o);
+extern DLLEXPORT(void*) vObjectAnyValue(VObject *o);
+extern DLLEXPORT(VObject*) vObjectVObjectValue(VObject *o);
+extern DLLEXPORT(void) setVObjectVObjectValue(VObject *o, VObject *p);
+
+extern DLLEXPORT(VObject*) addVObjectProp(VObject *o, VObject *p);
+extern DLLEXPORT(VObject*) addProp(VObject *o, const char *id);
+extern DLLEXPORT(VObject*) addProp_(VObject *o, const char *id);
+extern DLLEXPORT(VObject*) addPropValue(VObject *o, const char *p, const char *v);
+extern DLLEXPORT(VObject*) addPropSizedValue_(VObject *o, const char *p, const char *v, unsigned int size);
+extern DLLEXPORT(VObject*) addPropSizedValue(VObject *o, const char *p, const char *v, unsigned int size);
+extern DLLEXPORT(VObject*) addGroup(VObject *o, const char *g);
+extern DLLEXPORT(void) addList(VObject **o, VObject *p);
+
+extern DLLEXPORT(VObject*) isAPropertyOf(VObject *o, const char *id);
+
+extern DLLEXPORT(VObject*) nextVObjectInList(VObject *o);
+extern DLLEXPORT(void) initPropIterator(VObjectIterator *i, VObject *o);
+extern DLLEXPORT(int) moreIteration(VObjectIterator *i);
+extern DLLEXPORT(VObject*) nextVObject(VObjectIterator *i);
+
+extern DLLEXPORT(const char*) lookupStr(const char *s);
+extern DLLEXPORT(void) cleanStrTbl();
+
+extern DLLEXPORT(void) cleanVObject(VObject *o);
+extern DLLEXPORT(void) cleanVObjects(VObject *list);
+
+extern DLLEXPORT(const char*) lookupProp(const char* str);
+extern DLLEXPORT(const char*) lookupProp_(const char* str);
+
+extern DLLEXPORT(void) writeVObjectToFile(char *fname, VObject *o);
+extern DLLEXPORT(void) writeVObjectsToFile(char *fname, VObject *list);
+
+extern DLLEXPORT(int) vObjectValueType(VObject *o);
+
+/* return type of vObjectValueType: */
+#define VCVT_NOVALUE 0
+ /* if the VObject has no value associated with it. */
+#define VCVT_STRINGZ 1
+ /* if the VObject has value set by setVObjectStringZValue. */
+#define VCVT_UINT 2
+ /* if the VObject has value set by setVObjectIntegerValue. */
+#define VCVT_ULONG 3
+ /* if the VObject has value set by setVObjectLongValue. */
+#define VCVT_RAW 4
+ /* if the VObject has value set by setVObjectAnyValue. */
+#define VCVT_VOBJECT 5
+ /* if the VObject has value set by setVObjectVObjectValue. */
+
+extern const char** fieldedProp;
+
+/***************************************************
+ * The methods below are implemented in vcc.c (generated from vcc.y )
+ ***************************************************/
+
+/* NOTE regarding printVObject and writeVObject
+
+The functions below are not exported from the DLL because they
+take a FILE* as a parameter, which cannot be passed across a DLL
+interface (at least that is my experience). Instead you can use
+their companion functions which take file names or pointers
+to memory. However, if you are linking this code into
+your build directly then you may find them a more convenient API
+and you can go ahead and use them. If you try to use them with
+the DLL LIB you will get a link error.
+*/
+extern void writeVObject(FILE *fp, VObject *o);
+
+
+
+typedef void (*MimeErrorHandler)(char *);
+
+extern DLLEXPORT(void) registerMimeErrorHandler(MimeErrorHandler);
+
+extern DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len);
+extern DLLEXPORT(VObject*) Parse_MIME_FromFileName(char* fname);
+
+
+/* NOTE regarding Parse_MIME_FromFile
+The function above, Parse_MIME_FromFile, comes in two flavors,
+neither of which is exported from the DLL. Each version takes
+a CFile or FILE* as a parameter, neither of which can be
+passed across a DLL interface (at least that is my experience).
+If you are linking this code into your build directly then
+you may find them a more convenient API that the other flavors
+that take a file name. If you use them with the DLL LIB you
+will get a link error.
+*/
+
+
+#if INCLUDEMFC
+extern VObject* Parse_MIME_FromFile(CFile *file);
+#else
+extern VObject* Parse_MIME_FromFile(FILE *file);
+#endif
+
+#endif /* __VOBJECT_H__ */
+
+
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#include "calendar.h"
+
+#include <qdatetime.h>
+
+QString Calendar::nameOfMonth( int m )
+{
+ QDate d;
+ return d.monthName( m );
+}
+
+QString Calendar::nameOfDay( int d )
+{
+ QDate dt;
+ return dt.dayName( d );
+}
+
+QValueList<Calendar::Day> Calendar::daysOfMonth( int year, int month,
+ bool startWithMonday )
+{
+ QDate temp;
+ temp.setYMD( year, month, 1 );
+ int firstDay = temp.dayOfWeek();
+ int i;
+ QDate prev;
+ QValueList<Day> days;
+
+ if ( startWithMonday )
+ i = 1;
+ else
+ i = 0;
+
+ if ( month > 1 )
+ prev.setYMD( year, month - 1, 1 );
+ else
+ prev.setYMD( year - 1, 12, 1 );
+ for ( ; i < firstDay; i++ ) {
+ days.append( Day( prev.daysInMonth() - ( firstDay - i - 1 ),
+ Day::PrevMonth, FALSE ) );
+ }
+ for ( i = 1; i <= temp.daysInMonth(); i++ )
+ days.append( Day( i, Day::ThisMonth, FALSE ) );
+ i = 0;
+ while ( days.count() < 6 * 7 )
+ days.append( Day( ++i, Day::NextMonth, FALSE ) );
+
+ return days;
+}
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef CALENDAR_H
+#define CALENDAR_H
+
+#include <qstring.h>
+#include <qvaluelist.h>
+
+class Calendar
+{
+public:
+ struct Day
+ {
+ enum Type { PrevMonth, ThisMonth, NextMonth };
+
+ Day() : date( 0 ), type( ThisMonth ), holiday( FALSE ) {}
+ Day( int d, Type t, bool h ) : date( d ), type( t ), holiday( h ) {}
+
+ int date;
+ Type type;
+ bool holiday;
+ };
+
+ static QString nameOfMonth( int m );
+ static QString nameOfDay( int d );
+ static QValueList<Day> daysOfMonth( int year, int month, bool startWithMonday = FALSE );
+
+};
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2001 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "categoryedit_p.h"
+
+#include <qpe/categories.h>
+
+#include <qdir.h>
+#include <qcheckbox.h>
+#include <qlineedit.h>
+#include <qlistview.h>
+#include <qstringlist.h>
+#include <qtoolbutton.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include <stdlib.h>
+
+
+using namespace Qtopia;
+
+class CategoryEditPrivate
+{
+public:
+ CategoryEditPrivate( QWidget *parent, const QString &appName )
+ : mCategories( parent, "" ),
+ mStrApp( appName )
+ {
+ editItem = 0;
+ mCategories.load( categoryFileName() );
+ }
+ Categories mCategories;
+ QListViewItem *editItem;
+ QString mStrApp;
+ QString mVisible;
+};
+
+CategoryEdit::CategoryEdit( QWidget *parent, const char *name )
+ : CategoryEditBase( parent, name )
+{
+ d = 0;
+}
+
+CategoryEdit::CategoryEdit( const QArray<int> &recCats,
+ const QString &appName, const QString &visibleName,
+ QWidget *parent, const char *name )
+ : CategoryEditBase( parent, name )
+{
+ d = 0;
+ setCategories( recCats, appName, visibleName );
+}
+
+void CategoryEdit::setCategories( const QArray<int> &recCats,
+ const QString &appName, const QString &visibleName )
+{
+ if ( !d )
+ d = new CategoryEditPrivate( (QWidget*)parent(), name() );
+ d->mStrApp = appName;
+ d->mVisible = visibleName;
+ QArray<int> cats = d->mCategories.ids( d->mStrApp );
+ lvView->clear();
+ QStringList appCats = d->mCategories.labels( d->mStrApp );
+ QStringList::ConstIterator it;
+ int i, j;
+ for ( i = 0, it = appCats.begin(); it != appCats.end(); i++, ++it ) {
+ QCheckListItem *chk;
+ chk = new QCheckListItem( lvView, (*it), QCheckListItem::CheckBox );
+ if ( !d->mCategories.isGlobal((*it)) )
+ chk->setText( 1, tr(d->mVisible) );
+ else
+ chk->setText( 1, tr("All") );
+ // Is this record using this category, then we should check it
+ for ( j = 0; j < int(recCats.count()); j++ ) {
+ if ( cats[i] == recCats[j] ) {
+ chk->setOn( true );
+ break;
+ }
+ }
+ }
+ lvView->setSorting( 0, TRUE );
+ lvView->sort();
+ if ( lvView->childCount() < 1 )
+ txtCat->setEnabled( FALSE );
+ else {
+ lvView->setSelected( lvView->firstChild(), true );
+ }
+}
+
+CategoryEdit::~CategoryEdit()
+{
+ if ( d )
+ delete d;
+}
+
+void CategoryEdit::slotSetText( QListViewItem *selected )
+{
+ d->editItem = selected;
+ if ( !d->editItem )
+ return;
+ txtCat->setText( d->editItem->text(0) );
+ txtCat->setEnabled( true );
+ if ( d->editItem->text(1) == tr("All") )
+ chkGlobal->setChecked( true );
+ else
+ chkGlobal->setChecked( false );
+}
+
+void CategoryEdit::slotAdd()
+{
+ QString name = tr( "New Category" );
+ bool insertOk = FALSE;
+ int num = 0;
+ while ( !insertOk ) {
+ if ( num++ > 0 )
+ name = tr("New Category ") + QString::number(num);
+ insertOk = d->mCategories.addCategory( d->mStrApp, name );
+ }
+ QCheckListItem *chk;
+ chk = new QCheckListItem( lvView, name, QCheckListItem::CheckBox );
+ if ( !chkGlobal->isChecked() )
+ chk->setText( 1, tr(d->mVisible) );
+ else
+ chk->setText( 1, tr("All") );
+
+ lvView->setSelected( chk, TRUE );
+ txtCat->selectAll();
+}
+
+void CategoryEdit::slotRemove()
+{
+ d->editItem = lvView->selectedItem();
+ if ( d->editItem ) {
+ QListViewItem *sibling = d->editItem->nextSibling();
+
+ d->mCategories.removeCategory( d->mStrApp, d->editItem->text(0) );
+
+ delete d->editItem;
+ d->editItem = 0;
+
+ if ( sibling )
+ lvView->setSelected( sibling, TRUE );
+ }
+ if ( lvView->childCount() < 1 ) {
+ txtCat->clear();
+ txtCat->setEnabled( FALSE );
+ }
+}
+
+void CategoryEdit::slotSetGlobal( bool isChecked )
+{
+ if ( d->editItem ) {
+ if ( isChecked )
+ d->editItem->setText( 1, tr("All") );
+ else
+ d->editItem->setText( 1, tr(d->mVisible) );
+
+ d->mCategories.setGlobal( d->mStrApp, d->editItem->text( 0 ), isChecked );
+ }
+}
+
+void CategoryEdit::slotTextChanged( const QString &strNew )
+{
+ if ( d->editItem ) {
+ if ( chkGlobal->isChecked() )
+ d->mCategories.renameGlobalCategory( d->editItem->text(0), strNew );
+ else
+ d->mCategories.renameCategory( d->mStrApp, d->editItem->text(0), strNew );
+ d->editItem->setText( 0, strNew );
+ }
+}
+
+QArray<int> CategoryEdit::newCategories()
+{
+ QArray<int> a;
+ if ( d ) {
+ d->mCategories.save( categoryFileName() );
+ QListViewItemIterator it( lvView );
+ QValueList<int> l;
+ for ( ; it.current(); ++it ) {
+ if ( reinterpret_cast<QCheckListItem*>(it.current())->isOn() )
+ l.append( d->mCategories.id( d->mStrApp, it.current()->text(0) ) );
+ }
+ uint i = 0;
+ a.resize( l.count() );
+ for ( QValueList<int>::Iterator lit = l.begin(); lit != l.end(); ++lit )
+ a[i++] = *lit;
+ }
+ return a;
+}
+
+void CategoryEdit::accept()
+{
+ // write our categories out...
+ d->mCategories.save( categoryFileName() );
+ // QDialog::accept();
+}
+
+QString categoryFileName()
+{
+ QDir dir = (QString(getenv("HOME")) + "/Settings");
+ if ( !dir.exists() )
+ mkdir( dir.path().local8Bit(), 0700 );
+ return dir.path() + "/" + "Categories" + ".xml";
+}
+
+void CategoryEdit::kludge()
+{
+ lvView->setMaximumHeight( 130 );
+}
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 @@
+/**********************************************************************
+** Copyright (C) 2001 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef __CATEGORYEDIT_H__
+#define __CATEGORYEDIT_H__
+
+#include "categoryeditbase_p.h"
+#include <qarray.h>
+
+class CategoryEditPrivate;
+
+class CategoryEdit : public CategoryEditBase
+{
+ Q_OBJECT
+
+public:
+ CategoryEdit( QWidget *parent = 0, const char *name = 0 );
+ CategoryEdit( const QArray<int> &vlRecs, const QString &appName,
+ const QString &visibleName,
+ QWidget *parent = 0, const char *name = 0 );
+ ~CategoryEdit();
+ void setCategories( const QArray<int> &vlRecs,
+ const QString &appName, const QString &visibleName );
+ QArray<int> newCategories();
+ void kludge();
+
+protected:
+ void accept();
+
+protected slots:
+ void slotAdd();
+ void slotRemove();
+ void slotSetText( QListViewItem *selected );
+ void slotSetGlobal( bool isChecked );
+ void slotTextChanged( const QString &strNew );
+
+private:
+ CategoryEditPrivate *d;
+};
+
+QString categoryFileName();
+
+#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 @@
+<!DOCTYPE UI><UI>
+<class>CategoryEditBase</class>
+<comment>/**********************************************************************
+** Copyright (C) 2001 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/</comment>
+<widget>
+ <class>QWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>CategoryEditBase</cstring>
+ </property>
+ <property stdset="1">
+ <name>geometry</name>
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>201</width>
+ <height>287</height>
+ </rect>
+ </property>
+ <property stdset="1">
+ <name>caption</name>
+ <string>Category Edit</string>
+ </property>
+ <property>
+ <name>layoutMargin</name>
+ </property>
+ <property>
+ <name>layoutSpacing</name>
+ </property>
+ <vbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>3</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>3</number>
+ </property>
+ <widget>
+ <class>QListView</class>
+ <column>
+ <property>
+ <name>text</name>
+ <string>Categories</string>
+ </property>
+ <property>
+ <name>clickable</name>
+ <bool>true</bool>
+ </property>
+ <property>
+ <name>resizeable</name>
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property>
+ <name>text</name>
+ <string>Application</string>
+ </property>
+ <property>
+ <name>clickable</name>
+ <bool>true</bool>
+ </property>
+ <property>
+ <name>resizeable</name>
+ <bool>true</bool>
+ </property>
+ </column>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Categories Go Here</string>
+ </property>
+ <property>
+ <name>text</name>
+ <string></string>
+ </property>
+ <property>
+ <name>pixmap</name>
+ <pixmap></pixmap>
+ </property>
+ <property>
+ <name>pixmap</name>
+ <pixmap></pixmap>
+ </property>
+ </item>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>lvView</cstring>
+ </property>
+ </widget>
+ <widget>
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout2</cstring>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QLineEdit</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>txtCat</cstring>
+ </property>
+ </widget>
+ <widget>
+ <class>QToolButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>cmdAdd</cstring>
+ </property>
+ <property stdset="1">
+ <name>focusPolicy</name>
+ <enum>TabFocus</enum>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Add</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QToolButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>cmdDel</cstring>
+ </property>
+ <property stdset="1">
+ <name>focusPolicy</name>
+ <enum>TabFocus</enum>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string></string>
+ </property>
+ <property stdset="1">
+ <name>pixmap</name>
+ <pixmap>image0</pixmap>
+ </property>
+ </widget>
+ <widget>
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>chkGlobal</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Global</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+</widget>
+<images>
+ <image>
+ <name>image0</name>
+ <data format="XPM.GZ" length="499">789ccd904d6ac3301046f73e85f0ec4c71a2ca2a36214748e9b250b2188d4649164e203f8b527af7ea934963e805fa49a0790f4948b368ccfbdbc6348bea72e5eb418cecf96c9a781bc7cf8fedfaabaaed8bc97330b67eaaead688793d1d1535e59a9625c01dd059b77465a7003dfbc13330017bd7dbde0103903bb6dc0115285e9ec503191815031881a9a4bc0121626aa74c8eb2092479a1bba318a3aa26520d74771cb46811a1dfb38939e4a4448ffb0a8ba4dddcc5c0b0ffc1f15f87aee48fa4d28276d6aba92970dfabea074d4776b4</data>
+ </image>
+</images>
+<connections>
+ <connection>
+ <sender>lvView</sender>
+ <signal>selectionChanged(QListViewItem*)</signal>
+ <receiver>CategoryEditBase</receiver>
+ <slot>slotSetText( QListViewItem* )</slot>
+ </connection>
+ <connection>
+ <sender>cmdAdd</sender>
+ <signal>clicked()</signal>
+ <receiver>CategoryEditBase</receiver>
+ <slot>slotAdd()</slot>
+ </connection>
+ <connection>
+ <sender>cmdDel</sender>
+ <signal>clicked()</signal>
+ <receiver>CategoryEditBase</receiver>
+ <slot>slotRemove()</slot>
+ </connection>
+ <connection>
+ <sender>txtCat</sender>
+ <signal>textChanged(const QString&amp;)</signal>
+ <receiver>CategoryEditBase</receiver>
+ <slot>slotTextChanged(const QString &amp;)</slot>
+ </connection>
+ <connection>
+ <sender>chkGlobal</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>CategoryEditBase</receiver>
+ <slot>slotSetGlobal( bool )</slot>
+ </connection>
+ <slot access="public">slotSetGlobal( bool )</slot>
+ <slot access="public">slotAdd()</slot>
+ <slot access="public">slotRemove()</slot>
+ <slot access="public">slotSetText( QListViewItem* )</slot>
+ <slot access="public">slotTextChanged(const QString &amp;)</slot>
+</connections>
+</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 @@
+/**********************************************************************
+** Copyright (C) 2001 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "categorymenu.h"
+#include "backend/categories.h"
+#include "categoryselect.h"
+#include <qstring.h>
+#include <qmap.h>
+
+CategoryMenu::CategoryMenu( const QString &n, bool ig = TRUE,
+ QWidget *parent = 0, const char *name = 0 ) :
+ QPopupMenu(parent, name),
+ appName(n),
+ includeGlobal(ig)
+{
+ currentMid = 1;
+ reload();
+ connect(this, SIGNAL(activated(int)), this, SLOT(mapMenuId(int)));
+}
+
+CategoryMenu::~CategoryMenu( )
+{
+}
+
+void CategoryMenu::reload()
+{
+ clear();
+ Categories c;
+
+ c.load(categoryFileName());
+
+ QStringList sl = c.labels(appName, includeGlobal);
+ int mid = 1;
+
+ insertItem(tr("All"), mid);
+ mid++;
+ insertItem(tr("Unfiled"), mid);
+ mid++;
+
+ for (QStringList::Iterator it = sl.begin();
+ it != sl.end(); ++it ) {
+ int cid = c.id(appName, *it);
+ insertItem(*it, mid);
+ menuToId.insert(mid, cid);
+ idToMenu.insert(cid, mid);
+ mid++;
+ }
+
+ setItemChecked(currentMid, TRUE );
+}
+
+void CategoryMenu::mapMenuId(int id)
+{
+ if (id == currentMid)
+ return;
+ setItemChecked( currentMid, FALSE );
+ setItemChecked( id, TRUE );
+ currentMid = id;
+
+ emit categoryChange();
+}
+
+bool CategoryMenu::isSelected(const QArray<int> &cUids) const
+{
+ if (currentMid == 1)
+ return TRUE;
+
+ if (currentMid == 2 && cUids.count() == 0)
+ return TRUE;
+
+ if (cUids.contains(menuToId[currentMid]))
+ return TRUE;
+
+ return FALSE;
+}
+
+void CategoryMenu::setCurrentCategory( int newCatUid )
+{
+ if (!idToMenu.contains(newCatUid))
+ return;
+
+ mapMenuId(idToMenu[newCatUid]);
+}
+
+void CategoryMenu::setCurrentCategoryAll( )
+{
+ mapMenuId(1);
+}
+
+void CategoryMenu::setCurrentCategoryUnfiled( )
+{
+ mapMenuId(2);
+}
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 @@
+/**********************************************************************
+** Copyright (C) 2001 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef __CATEGORYMENU_H__
+#define __CATEGORYMENU_H__
+
+#include <qpopupmenu.h>
+#include <qstring.h>
+#include <qarray.h>
+#include <qmap.h>
+
+class CategoryMenuPrivate;
+class CategoryMenu : public QPopupMenu
+{
+ Q_OBJECT
+public:
+ CategoryMenu( const QString &appName, bool, QWidget *parent = 0,
+ const char *name = 0 );
+ ~CategoryMenu();
+
+ bool isSelected(const QArray<int> &cUids) const;
+
+ void setCurrentCategory( int newCatUid );
+ void setCurrentCategoryAll( );
+ void setCurrentCategoryUnfiled( );
+
+signals:
+ void categoryChange();
+
+public slots:
+ void reload();
+
+private slots:
+ void mapMenuId(int);
+
+private:
+ QString appName;
+ bool includeGlobal;
+
+ QMap<int, int> menuToId;
+ QMap<int, int> idToMenu;
+ int currentMid;
+
+ CategoryMenuPrivate *d;
+};
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2001 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include <qpe/categories.h>
+
+#include <qdialog.h>
+#include <qlayout.h>
+#include <qtoolbutton.h>
+
+#include "categorywidget.h"
+#include "categoryselect.h"
+
+
+class CategoryComboPrivate
+{
+public:
+ CategoryComboPrivate(QObject *o)
+ : mCat( o )
+ {
+ }
+ QArray<int> mAppCats;
+ QString mStrAppName;
+ QString mStrVisibleName;
+ Categories mCat;
+};
+
+class CategorySelectPrivate
+{
+public:
+ CategorySelectPrivate( const QArray<int> &cats)
+ : mRec( cats ),
+ usingAll( false )
+ {
+ }
+ CategorySelectPrivate()
+ {
+ }
+ QArray<int> mRec;
+ bool usingAll;
+ QString mVisibleName;
+};
+
+CategoryCombo::CategoryCombo( QWidget *parent, const char *name )
+ : QComboBox( parent, name )
+{
+ d = new CategoryComboPrivate(this);
+}
+
+void CategoryCombo::initCombo( const QArray<int> &recCats,
+ const QString &appName )
+{
+ initCombo( recCats, appName, appName );
+}
+
+void CategoryCombo::initCombo( const QArray<int> &recCats,
+ const QString &appName,
+ const QString &visibleName )
+{
+ d->mStrAppName = appName;
+ d->mStrVisibleName = visibleName;
+ clear();
+ QStringList slApp;
+
+ QObject::connect( this, SIGNAL(activated(int)),
+ this, SLOT(slotValueChanged(int)) );
+ bool loadOk = d->mCat.load( categoryFileName() );
+ slApp = d->mCat.labels( d->mStrAppName, TRUE, Categories::UnfiledLabel );
+ d->mAppCats = d->mCat.ids( d->mStrAppName );
+
+ int i,
+ j,
+ saveMe,
+ recCount;
+ QStringList::Iterator it;
+ // now add in all the items...
+ recCount = recCats.count();
+ saveMe = -1;
+ if ( recCount > 1 && loadOk ) {
+ it = slApp.begin();
+ insertItem( *it );
+ ++it;
+ for ( j = 0; it != slApp.end(); ++it, j++ ) {
+ // grr... we have to go through and compare...
+ if ( j < int(d->mAppCats.size()) ) {
+ for ( i = 0; i < recCount; i++ ) {
+ if ( recCats[i] == d->mAppCats[j] ) {
+ (*it).append( tr(" (Multi.)") );
+ if ( saveMe < 0 )
+ saveMe = j;
+ // no need to continue through the list.
+ break;
+ }
+ }
+ }
+ insertItem( *it );
+ }
+ } else
+ insertStringList( slApp );
+
+ if ( recCount > 0 && loadOk ) {
+ for ( i = 0; i < int(d->mAppCats.size()); i++ ) {
+ if ( d->mAppCats[i] == recCats[0] ) {
+ setCurrentItem( i + 1 );
+ break;
+ }
+ }
+ } else
+ setCurrentItem( 0 ); // unfiled
+ QObject::connect( this, SIGNAL(activated(int)),
+ this, SLOT(slotValueChanged(int)) );
+}
+
+CategoryCombo::~CategoryCombo()
+{
+ delete d;
+}
+
+int CategoryCombo::currentCategory() const
+{
+ int returnMe;
+ returnMe = currentItem();
+ // unfiled is now 0...
+ if ( returnMe == 0 )
+ returnMe = -1;
+ else if ( returnMe > (int)d->mAppCats.count() ) // only happen on "All"
+ returnMe = -2;
+ else
+ returnMe = d->mAppCats[returnMe - 1];
+ return returnMe;
+}
+
+void CategoryCombo::setCurrentCategory( int newCatUid )
+{
+ int i;
+ for ( i = 0; i < int(d->mAppCats.size()); i++ ) {
+ if ( d->mAppCats[i] == newCatUid )
+ setCurrentItem( i );
+ }
+}
+
+void CategoryCombo::setCurrentText( const QString &str )
+{
+ int i;
+ int stop;
+ stop = count();
+ for ( i = 0; i < stop; i++ ) {
+ if ( text( i ) == str ) {
+ setCurrentItem( i );
+ break;
+ }
+ }
+}
+
+void CategoryCombo::slotValueChanged( int )
+{
+ emit sigCatChanged( currentCategory() );
+}
+
+CategorySelect::CategorySelect( QWidget *parent, const char *name )
+ : QHBox( parent, name ),
+ cmbCat( 0 ),
+ cmdCat( 0 ),
+ d( 0 )
+{
+ d = new CategorySelectPrivate();
+ init();
+}
+
+CategorySelect::CategorySelect( const QArray<int> &vl,
+ const QString &appName, QWidget *parent,
+ const char *name )
+ : QHBox( parent, name )
+{
+ d = new CategorySelectPrivate( vl );
+ init();
+ setCategories( vl, appName, appName );
+}
+
+CategorySelect::CategorySelect( const QArray<int> &vl,
+ const QString &appName,
+ const QString &visibleName,
+ QWidget *parent, const char *name )
+ : QHBox( parent, name )
+{
+ d = new CategorySelectPrivate( vl );
+ init();
+ setCategories( vl, appName, visibleName );
+}
+
+CategorySelect::~CategorySelect()
+{
+ delete d;
+}
+
+void CategorySelect::slotDialog()
+{
+ QDialog editDlg( this, 0, TRUE );
+ editDlg.setCaption( tr("Edit Categories") );
+ QVBoxLayout *vb = new QVBoxLayout( &editDlg );
+ QScrollView *sv = new QScrollView( &editDlg );
+ sv->setResizePolicy( QScrollView::AutoOneFit );
+ sv->setHScrollBarMode( QScrollView::AlwaysOff );
+ vb->addWidget( sv );
+ CategoryWidget ce( d->mRec, mStrAppName, d->mVisibleName, &editDlg );
+ sv->addChild( &ce );
+ editDlg.showMaximized();
+
+ if ( editDlg.exec() ) {
+ d->mRec = ce.newCategories();
+ cmbCat->initCombo( d->mRec, mStrAppName );
+ }
+}
+
+void CategorySelect::slotNewCat( int newUid )
+{
+ if ( newUid != -1 ) {
+ bool alreadyIn = false;
+ for ( uint it = 0; it < d->mRec.count(); ++it ) {
+ if ( d->mRec[it] == newUid ) {
+ alreadyIn = true;
+ break;
+ }
+ }
+ if ( !alreadyIn ) {
+ d->mRec.resize( 1 );
+ d->mRec[ 0 ] = newUid;
+ }
+ } else
+ d->mRec.resize(0); // now Unfiled.
+ emit signalSelected( currentCategory() );
+}
+
+void CategorySelect::setCategories( const QArray<int> &rec,
+ const QString &appName )
+{
+ setCategories( rec, appName, appName );
+}
+
+void CategorySelect::setCategories( const QArray<int> &rec,
+ const QString &appName,
+ const QString &visibleName )
+{
+ d->mRec = rec;
+ d->mVisibleName = visibleName;
+ mStrAppName = appName;
+ cmbCat->initCombo( rec, appName );
+}
+
+void CategorySelect::init()
+{
+ cmbCat = new CategoryCombo( this );
+ QObject::connect( cmbCat, SIGNAL(sigCatChanged(int)),
+ this, SLOT(slotNewCat(int)) );
+ cmdCat = new QToolButton( this );
+ QObject::connect( cmdCat, SIGNAL(clicked()), this, SLOT(slotDialog()) );
+ cmdCat->setTextLabel( "...", FALSE );
+ cmdCat->setUsesTextLabel( true );
+ cmdCat->setMaximumSize( cmdCat->sizeHint() );
+ cmdCat->setFocusPolicy( TabFocus );
+}
+
+
+int CategorySelect::currentCategory() const
+{
+ return cmbCat->currentCategory();
+}
+
+void CategorySelect::setCurrentCategory( int newCatUid )
+{
+ cmbCat->setCurrentCategory( newCatUid );
+}
+
+
+const QArray<int> &CategorySelect::currentCategories() const
+{
+ return d->mRec;
+}
+
+void CategorySelect::setRemoveCategoryEdit( bool remove )
+{
+ if ( remove ) {
+ cmdCat->setEnabled( FALSE );
+ cmdCat->hide();
+ } else {
+ cmdCat->setEnabled( TRUE );
+ cmdCat->show();
+ }
+}
+
+void CategorySelect::setAllCategories( bool add )
+{
+ d->usingAll = add;
+ if ( add ) {
+ cmbCat->insertItem( tr( "All" ), cmbCat->count() );
+ cmbCat->setCurrentItem( cmbCat->count() - 1 );
+ } else
+ cmbCat->removeItem( cmbCat->count() - 1 );
+}
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 @@
+/**********************************************************************
+** Copyright (C) 2001 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef __CATEGORYCOMBO_H__
+#define __CATEGORYCOMBO_H__
+
+#include <qcombobox.h>
+#include <qhbox.h>
+#include <qstring.h>
+#include <qarray.h>
+
+extern QString categoryFileName();
+
+class QToolButton;
+
+class CategoryComboPrivate;
+class CategoryCombo : public QComboBox
+{
+ Q_OBJECT
+
+public:
+ CategoryCombo( QWidget *parent, const char* name = 0 );
+ ~CategoryCombo();
+
+ int currentCategory() const;
+ void setCurrentCategory( int id );
+ // depreciated.
+ void initCombo( const QArray<int> &recCats, const QString &appName );
+ void initCombo( const QArray<int> &recCats, const QString &appName,
+ const QString &visibleName /* = appName */ );
+
+signals:
+ void sigCatChanged( int newUid );
+
+private slots:
+ void slotValueChanged( int );
+
+private:
+ void setCurrentText( const QString &str );
+ CategoryComboPrivate *d;
+};
+
+#endif
+
+class CategorySelectPrivate;
+class CategorySelect : public QHBox
+{
+ Q_OBJECT
+public:
+ // we need two constructors, the first gets around designer limitations
+ CategorySelect( QWidget *parent = 0, const char *name = 0 );
+
+ CategorySelect( const QArray<int> &vlCats, const QString &appName,
+ QWidget *parent = 0, const char *name = 0 );
+ CategorySelect( const QArray<int> &vlCats, const QString &appName,
+ const QString &visibleName, QWidget *parent = 0,
+ const char *name = 0 );
+ ~CategorySelect();
+
+ const QArray<int> &currentCategories() const;
+ int currentCategory() const;
+ void setCurrentCategory( int newCatUid );
+ // pretty much if you don't set it the constructor, you need to
+ // call it here ASAP!
+ // however this call is depreciated...
+ void setCategories( const QArray<int> &vlCats, const QString &appName );
+ // use this one instead (for translating )
+ void setCategories( const QArray<int> &vlCats, const QString &appName,
+ const QString &visibleName );
+
+ // these were added for find dialog.
+ void setRemoveCategoryEdit( bool remove );
+ void setAllCategories( bool add );
+
+signals:
+ void signalSelected( int );
+
+private slots:
+ void slotDialog();
+ void slotNewCat( int id );
+
+private:
+ void init();
+ QString mStrAppName;
+ CategoryCombo *cmbCat;
+ QToolButton *cmdCat;
+ CategorySelectPrivate *d;
+};
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 @@
+/**********************************************************************
+** Copyright (C) 2001 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "categoryedit_p.h"
+#include "categorywidget.h"
+
+CategoryWidget::CategoryWidget( QWidget *parent, const char *name )
+ : QVBox( parent, name )
+{
+ ce = new CategoryEdit( this, name );
+}
+
+CategoryWidget::CategoryWidget( const QArray<int> &vlRecs,
+ const QString &appName, QWidget *parent,
+ const char *name )
+ : QVBox( parent, name )
+{
+ ce = new CategoryEdit( vlRecs, appName, appName, this, name );
+}
+
+CategoryWidget::CategoryWidget( const QArray<int> &vlRecs,
+ const QString &appName, const QString &visibleName,
+ QWidget *parent, const char *name )
+ : QVBox( parent, name )
+{
+ ce = new CategoryEdit( vlRecs, appName, visibleName, this, name );
+}
+
+CategoryWidget::~CategoryWidget()
+{
+}
+
+void CategoryWidget::setCategories( const QArray<int> &vlRecs,
+ const QString &appName )
+{
+ ce->setCategories( vlRecs, appName, appName );
+}
+
+void CategoryWidget::setCategories( const QArray<int> &vlRecs,
+ const QString &appName,
+ const QString &visibleName )
+{
+ ce->setCategories( vlRecs, appName, visibleName );
+}
+
+QArray<int> CategoryWidget::newCategories()
+{
+ return ce->newCategories();
+}
+
+void CategoryWidget::kludge()
+{
+ ce->kludge();
+}
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 @@
+/**********************************************************************
+** Copyright (C) 2001 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef __CATEGORYWIDGET_H__
+#define __CATEGORYWIDGET_H__
+
+#include <qvbox.h>
+#include <qarray.h>
+
+class CategoryEdit;
+
+class CategoryWidget : public QVBox
+{
+public:
+ CategoryWidget( QWidget *parent = 0, const char *name = 0 );
+ CategoryWidget( const QArray<int> &vlRecs, const QString &appName,
+ QWidget *parent = 0, const char *name = 0 );
+ CategoryWidget( const QArray<int> &vlRecs, const QString &appName,
+ const QString &visibleName,
+ QWidget *parent = 0, const char *name = 0 );
+ ~CategoryWidget();
+ void setCategories( const QArray<int> &vlRecs, const QString &appName );
+ void setCategories( const QArray<int> &vlRecs, const QString &appName,
+ const QString &visibleName );
+ QArray<int> newCategories();
+ void kludge();
+
+private:
+ CategoryEdit *ce;
+};
+
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include <qdir.h>
+#include <qfile.h>
+#include <qfileinfo.h>
+#include <qmessagebox.h>
+#if QT_VERSION <= 230 && defined(QT_NO_CODECS)
+#include <qtextcodec.h>
+#endif
+#include <qtextstream.h>
+
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "config.h"
+
+
+/*!
+ \internal
+*/
+QString Config::configFilename(const QString& name, Domain d)
+{
+ switch (d) {
+ case File:
+ return name;
+ case User: {
+ QDir dir = (QString(getenv("HOME")) + "/Settings");
+ if ( !dir.exists() )
+ mkdir(dir.path().local8Bit(),0700);
+ return dir.path() + "/" + name + ".conf";
+ }
+ }
+ return name;
+}
+
+/*!
+ \class Config config.h
+ \brief The Config class provides for saving application cofniguration state.
+
+ You should keep a Config in existence only while you do not want others
+ to be able to change the state. There is no locking currently, but there
+ may be in the future.
+*/
+
+/*!
+ \enum Config::ConfigGroup
+ \internal
+*/
+
+/*!
+ \enum Config::Domain
+
+ \value File
+ \value User
+
+ See Config for details.
+*/
+
+/*!
+ Constructs a config that will load or create a configuration with the
+ given \a name in the given \a domain.
+
+ You must call setGroup() before doing much else with the Config.
+
+ In the default Domain, \e User,
+ the configuration is user-specific. \a name should not contain "/" in
+ this case, and in general should be the name of the C++ class that is
+ primarily responsible for maintaining the configuration.
+
+ In the File Domain, \a name is an absolute filename.
+*/
+Config::Config( const QString &name, Domain domain )
+ : filename( configFilename(name,domain) )
+{
+ git = groups.end();
+ read();
+
+ lang = getenv("LANG");
+ int i = lang.find(".");
+ if ( i > 0 )
+ lang = lang.left( i );
+ i = lang.find( "_" );
+ if ( i > 0 )
+ glang = lang.left(i);
+}
+
+/*!
+ Writes any changes to disk and destroys the in-memory object.
+*/
+Config::~Config()
+{
+ if ( changed )
+ write();
+}
+
+/*!
+ Returns whether the current group has an entry called \a key.
+*/
+bool Config::hasKey( const QString &key ) const
+{
+ if ( groups.end() == git )
+ return FALSE;
+ ConfigGroup::ConstIterator it = ( *git ).find( key );
+ return it != ( *git ).end();
+}
+
+/*!
+ Sets the current group for subsequent reading and writing of
+ entries to \a gname. Grouping allows the application to partition the namespace.
+
+ This function must be called prior to any reading or writing
+ of entries.
+
+ The \a gname must not be empty.
+*/
+void Config::setGroup( const QString &gname )
+{
+ QMap< QString, ConfigGroup>::Iterator it = groups.find( gname );
+ if ( it == groups.end() ) {
+ git = groups.insert( gname, ConfigGroup() );
+ changed = TRUE;
+ return;
+ }
+ git = it;
+}
+
+/*!
+ Writes a (\a key, \a value) entry to the current group.
+
+ \sa readEntry()
+*/
+void Config::writeEntry( const QString &key, const char* value )
+{
+ writeEntry(key,QString(value));
+}
+
+/*!
+ Writes a (\a key, \a value) entry to the current group.
+
+ \sa readEntry()
+*/
+void Config::writeEntry( const QString &key, const QString &value )
+{
+ if ( git == groups.end() ) {
+ qWarning( "no group set" );
+ return;
+ }
+ if ( (*git)[key] != value ) {
+ ( *git ).insert( key, value );
+ changed = TRUE;
+ }
+}
+
+/*
+ Note that the degree of protection offered by the encryption here is
+ only sufficient to avoid the most casual observation of the configuration
+ files. People with access to the files can write down the contents and
+ decrypt it using this source code.
+
+ Conceivably, and at some burden to the user, this encryption could
+ be improved.
+*/
+static QString encipher(const QString& plain)
+{
+ // mainly, we make it long
+ QString cipher;
+ int mix=28730492;
+ for (int i=0; i<(int)plain.length(); i++) {
+ int u = plain[i].unicode();
+ int c = u ^ mix;
+ QString x = QString::number(c,36);
+ cipher.append(QChar('a'+x.length()));
+ cipher.append(x);
+ mix *= u;
+ }
+ return cipher;
+}
+
+static QString decipher(const QString& cipher)
+{
+ QString plain;
+ int mix=28730492;
+ for (int i=0; i<(int)cipher.length();) {
+ int l = cipher[i].unicode()-'a';
+ QString x = cipher.mid(i+1,l); i+=l+1;
+ int u = x.toInt(0,36) ^ mix;
+ plain.append(QChar(u));
+ mix *= u;
+ }
+ return plain;
+}
+
+/*!
+ Writes an encrypted (\a key, \a value) entry to the current group.
+
+ Note that the degree of protection offered by the encryption is
+ only sufficient to avoid the most casual observation of the configuration
+ files.
+
+ \sa readEntry()
+*/
+void Config::writeEntryCrypt( const QString &key, const QString &value )
+{
+ if ( git == groups.end() ) {
+ qWarning( "no group set" );
+ return;
+ }
+ QString evalue = encipher(value);
+ if ( (*git)[key] != evalue ) {
+ ( *git ).insert( key, evalue );
+ changed = TRUE;
+ }
+}
+
+/*!
+ Writes a (\a key, \a num) entry to the current group.
+
+ \sa readNumEntry()
+*/
+void Config::writeEntry( const QString &key, int num )
+{
+ QString s;
+ s.setNum( num );
+ writeEntry( key, s );
+}
+
+#ifdef Q_HAS_BOOL_TYPE
+/*!
+ Writes a (\a key, \a b) entry to the current group. This is equivalent
+ to writing a 0 or 1 as an integer entry.
+
+ \sa readBoolEntry()
+*/
+void Config::writeEntry( const QString &key, bool b )
+{
+ QString s;
+ s.setNum( ( int )b );
+ writeEntry( key, s );
+}
+#endif
+
+/*!
+ Writes a (\a key, \a lst) entry to the current group. The list
+ is separated by \a sep, so the strings must not contain that character.
+
+ \sa readListEntry()
+*/
+void Config::writeEntry( const QString &key, const QStringList &lst, const QChar &sep )
+{
+ QString s;
+ QStringList::ConstIterator it = lst.begin();
+ for ( ; it != lst.end(); ++it )
+ s += *it + sep;
+ writeEntry( key, s );
+}
+
+/*!
+ Removes the \a key entry from the current group. Does nothing if
+ there is no such entry.
+*/
+
+void Config::removeEntry( const QString &key )
+{
+ if ( git == groups.end() ) {
+ qWarning( "no group set" );
+ return;
+ }
+ ( *git ).remove( key );
+ changed = TRUE;
+}
+
+/*!
+ \fn bool Config::operator == ( const Config & other ) const
+
+ Tests for equality with \a other. Config objects are equal if they refer to the same filename.
+*/
+
+/*!
+ \fn bool Config::operator != ( const Config & other ) const
+
+ Tests for inequality with \a other. Config objects are equal if they refer to the same filename.
+*/
+
+/*!
+ \fn QString Config::readEntry( const QString &key, const QString &deflt ) const
+
+ Reads a string entry stored with \a key, defaulting to \a deflt if there is no entry.
+*/
+
+/*!
+ \internal
+ For compatibility, non-const version.
+*/
+QString Config::readEntry( const QString &key, const QString &deflt )
+{
+ QString res = readEntryDirect( key+"["+lang+"]" );
+ if ( !res.isNull() )
+ return res;
+ if ( !glang.isEmpty() ) {
+ res = readEntryDirect( key+"["+glang+"]" );
+ if ( !res.isNull() )
+ return res;
+ }
+ return readEntryDirect( key, deflt );
+}
+
+/*!
+ \fn QString Config::readEntryCrypt( const QString &key, const QString &deflt ) const
+
+ Reads an encrypted string entry stored with \a key, defaulting to \a deflt if there is no entry.
+*/
+
+/*!
+ \internal
+ For compatibility, non-const version.
+*/
+QString Config::readEntryCrypt( const QString &key, const QString &deflt )
+{
+ QString res = readEntryDirect( key+"["+lang+"]" );
+ if ( res.isNull() && glang.isEmpty() )
+ res = readEntryDirect( key+"["+glang+"]" );
+ if ( res.isNull() )
+ res = readEntryDirect( key, QString::null );
+ if ( res.isNull() )
+ return deflt;
+ return decipher(res);
+}
+
+/*!
+ \fn QString Config::readEntryDirect( const QString &key, const QString &deflt ) const
+ \internal
+*/
+
+/*!
+ \internal
+ For compatibility, non-const version.
+*/
+QString Config::readEntryDirect( const QString &key, const QString &deflt )
+{
+ if ( git == groups.end() ) {
+ //qWarning( "no group set" );
+ return deflt;
+ }
+ ConfigGroup::ConstIterator it = ( *git ).find( key );
+ if ( it != ( *git ).end() )
+ return *it;
+ else
+ return deflt;
+}
+
+/*!
+ \fn int Config::readNumEntry( const QString &key, int deflt ) const
+ Reads a numeric entry stored with \a key, defaulting to \a deflt if there is no entry.
+*/
+
+/*!
+ \internal
+ For compatibility, non-const version.
+*/
+int Config::readNumEntry( const QString &key, int deflt )
+{
+ QString s = readEntry( key );
+ if ( s.isEmpty() )
+ return deflt;
+ else
+ return s.toInt();
+}
+
+/*!
+ \fn bool Config::readBoolEntry( const QString &key, bool deflt ) const
+ Reads a bool entry stored with \a key, defaulting to \a deflt if there is no entry.
+*/
+
+/*!
+ \internal
+ For compatibility, non-const version.
+*/
+bool Config::readBoolEntry( const QString &key, bool deflt )
+{
+ QString s = readEntry( key );
+ if ( s.isEmpty() )
+ return deflt;
+ else
+ return (bool)s.toInt();
+}
+
+/*!
+ \fn QStringList Config::readListEntry( const QString &key, const QChar &sep ) const
+ Reads a string list entry stored with \a key, and with \a sep as the separator.
+*/
+
+/*!
+ \internal
+ For compatibility, non-const version.
+*/
+QStringList Config::readListEntry( const QString &key, const QChar &sep )
+{
+ QString s = readEntry( key );
+ if ( s.isEmpty() )
+ return QStringList();
+ else
+ return QStringList::split( sep, s );
+}
+
+/*!
+ Removes all entries from the current group.
+*/
+void Config::clearGroup()
+{
+ if ( git == groups.end() ) {
+ qWarning( "no group set" );
+ return;
+ }
+ if ( !(*git).isEmpty() ) {
+ ( *git ).clear();
+ changed = TRUE;
+ }
+}
+
+/*!
+ \internal
+*/
+void Config::write( const QString &fn )
+{
+ QString strNewFile;
+ if ( !fn.isEmpty() )
+ filename = fn;
+ strNewFile = filename + ".new";
+
+ QFile f( strNewFile );
+ if ( !f.open( IO_WriteOnly|IO_Raw ) ) {
+ qWarning( "could not open for writing `%s'", strNewFile.latin1() );
+ git = groups.end();
+ return;
+ }
+
+ QString str;
+ QCString cstr;
+ QMap< QString, ConfigGroup >::Iterator g_it = groups.begin();
+
+ for ( ; g_it != groups.end(); ++g_it ) {
+ str += "[" + g_it.key() + "]\n";
+ ConfigGroup::Iterator e_it = ( *g_it ).begin();
+ for ( ; e_it != ( *g_it ).end(); ++e_it )
+ str += e_it.key() + " = " + *e_it + "\n";
+ }
+ cstr = str.utf8();
+
+ int total_length;
+ total_length = f.writeBlock( cstr.data(), cstr.length() );
+ if ( total_length != int(cstr.length()) ) {
+ QMessageBox::critical( 0, QObject::tr("Out of Space"),
+ QObject::tr("There was a problem creating\nConfiguration Information \nfor this program.\n\nPlease free up some space and\ntry again.") );
+ f.close();
+ QFile::remove( strNewFile );
+ return;
+ }
+
+ f.close();
+ // now rename the file...
+ if ( rename( strNewFile, filename ) < 0 ) {
+ qWarning( "problem renaming the file %s to %s", strNewFile.latin1(),
+ filename.latin1() );
+ QFile::remove( strNewFile );
+ }
+}
+
+/*!
+ Returns whether the Config is in a valid state.
+*/
+bool Config::isValid() const
+{
+ return groups.end() != git;
+}
+
+/*!
+ \internal
+*/
+void Config::read()
+{
+ changed = FALSE;
+
+ if ( !QFileInfo( filename ).exists() ) {
+ git = groups.end();
+ return;
+ }
+
+ QFile f( filename );
+ if ( !f.open( IO_ReadOnly ) ) {
+ git = groups.end();
+ return;
+ }
+
+ QTextStream s( &f );
+#if QT_VERSION <= 230 && defined(QT_NO_CODECS)
+ // The below should work, but doesn't in Qt 2.3.0
+ s.setCodec( QTextCodec::codecForMib( 106 ) );
+#else
+ s.setEncoding( QTextStream::UnicodeUTF8 );
+#endif
+
+ QStringList list = QStringList::split('\n', s.read() );
+ f.close();
+
+ for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
+ if ( !parse( *it ) ) {
+ git = groups.end();
+ return;
+ }
+ }
+}
+
+/*!
+ \internal
+*/
+bool Config::parse( const QString &l )
+{
+ QString line = l.stripWhiteSpace();
+ if ( line[ 0 ] == QChar( '[' ) ) {
+ QString gname = line;
+ gname = gname.remove( 0, 1 );
+ if ( gname[ (int)gname.length() - 1 ] == QChar( ']' ) )
+ gname = gname.remove( gname.length() - 1, 1 );
+ git = groups.insert( gname, ConfigGroup() );
+ } else if ( !line.isEmpty() ) {
+ if ( git == groups.end() )
+ return FALSE;
+ int eq = line.find( '=' );
+ if ( eq == -1 )
+ return FALSE;
+ QString key = line.left(eq).stripWhiteSpace();
+ QString value = line.mid(eq+1).stripWhiteSpace();
+ ( *git ).insert( key, value );
+ }
+ return TRUE;
+}
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+// ##### could use QSettings with Qt 3.0
+
+#include <qmap.h>
+#include <qstringlist.h>
+
+class ConfigPrivate;
+class Config
+{
+public:
+ typedef QMap< QString, QString > ConfigGroup;
+
+ enum Domain { File, User };
+ Config( const QString &name, Domain domain=User );
+ ~Config();
+
+ bool operator == ( const Config & other ) const { return (filename == other.filename); }
+ bool operator != ( const Config & other ) const { return (filename != other.filename); }
+
+ bool isValid() const;
+ bool hasKey( const QString &key ) const;
+
+ void setGroup( const QString &gname );
+ void writeEntry( const QString &key, const char* value );
+ void writeEntry( const QString &key, const QString &value );
+ void writeEntryCrypt( const QString &key, const QString &value );
+ void writeEntry( const QString &key, int num );
+#ifdef Q_HAS_BOOL_TYPE
+ void writeEntry( const QString &key, bool b );
+#endif
+ void writeEntry( const QString &key, const QStringList &lst, const QChar &sep );
+ void removeEntry( const QString &key );
+
+ QString readEntry( const QString &key, const QString &deflt = QString::null ) const;
+ QString readEntryCrypt( const QString &key, const QString &deflt = QString::null ) const;
+ QString readEntryDirect( const QString &key, const QString &deflt = QString::null ) const;
+ int readNumEntry( const QString &key, int deflt = -1 ) const;
+ bool readBoolEntry( const QString &key, bool deflt = FALSE ) const;
+ QStringList readListEntry( const QString &key, const QChar &sep ) const;
+
+ // For compatibility, non-const versions.
+ QString readEntry( const QString &key, const QString &deflt );
+ QString readEntryCrypt( const QString &key, const QString &deflt );
+ QString readEntryDirect( const QString &key, const QString &deflt );
+ int readNumEntry( const QString &key, int deflt );
+ bool readBoolEntry( const QString &key, bool deflt );
+ QStringList readListEntry( const QString &key, const QChar &sep );
+
+ void clearGroup();
+
+ void write( const QString &fn = QString::null );
+
+protected:
+ void read();
+ bool parse( const QString &line );
+
+ QMap< QString, ConfigGroup > groups;
+ QMap< QString, ConfigGroup >::Iterator git;
+ QString filename;
+ QString lang;
+ QString glang;
+ bool changed;
+ ConfigPrivate *d;
+ static QString configFilename(const QString& name, Domain);
+};
+
+inline QString Config::readEntry( const QString &key, const QString &deflt ) const
+{ return ((Config*)this)->readEntry(key,deflt); }
+inline QString Config::readEntryCrypt( const QString &key, const QString &deflt ) const
+{ return ((Config*)this)->readEntryCrypt(key,deflt); }
+inline QString Config::readEntryDirect( const QString &key, const QString &deflt ) const
+{ return ((Config*)this)->readEntryDirect(key,deflt); }
+inline int Config::readNumEntry( const QString &key, int deflt ) const
+{ return ((Config*)this)->readNumEntry(key,deflt); }
+inline bool Config::readBoolEntry( const QString &key, bool deflt ) const
+{ return ((Config*)this)->readBoolEntry(key,deflt); }
+inline QStringList Config::readListEntry( const QString &key, const QChar &sep ) const
+{ return ((Config*)this)->readListEntry(key,sep); }
+
+#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 @@
+#define QPE_OWNAPM
+#define QPE_HAVE_TOGGLELIGHT
+#define QPE_NOCIBAUD
+#define QPE_STARTMENU
+#include <asm/sharp_apm.h>
+#ifndef APM_IOC_BATTERY_BACK_CHK
+#define APM_IOC_BATTERY_BACK_CHK _IO(APM_IOC_MAGIC, 32)
+#endif
+#ifndef APM_IOC_BATTERY_MAIN_CHK
+#define APM_IOC_BATTERY_MAIN_CHK _IO(APM_IOC_MAGIC, 33)
+#endif
+
+#include <unistd.h>
+#include <stdio.h>
+#include <signal.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#define SHARP_DEV_IOCTL_COMMAND_START 0x5680
+
+/* --- for SHARP_BUZZER device --- */
+#define SHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START)
+#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START)
+#define SHARP_BUZZER_SETVOLUME (SHARP_BUZZER_IOCTL_START+1)
+#define SHARP_BUZZER_GETVOLUME (SHARP_BUZZER_IOCTL_START+2)
+#define SHARP_BUZZER_ISSUPPORTED (SHARP_BUZZER_IOCTL_START+3)
+#define SHARP_BUZZER_SETMUTE (SHARP_BUZZER_IOCTL_START+4)
+#define SHARP_BUZZER_STOPSOUND (SHARP_BUZZER_IOCTL_START+5)
+
+#define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */
+#define SHARP_BUZ_KEYSOUND 2 /* key sound */
+#define SHARP_PDA_ILLCLICKSOUND 3 /* illegal click */
+#define SHARP_PDA_WARNSOUND 4 /* warning occurred */
+#define SHARP_PDA_ERRORSOUND 5 /* error occurred */
+#define SHARP_PDA_CRITICALSOUND 6 /* critical error occurred */
+#define SHARP_PDA_SYSSTARTSOUND 7 /* system start */
+#define SHARP_PDA_SYSTEMENDSOUND 8 /* system shutdown */
+#define SHARP_PDA_APPSTART 9 /* application start */
+#define SHARP_PDA_APPQUIT 10 /* application ends */
+#define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */
+#define SHARP_BUZ_DAILY_ALARM 12 /* daily alarm */
+#define SHARP_BUZ_GOT_PHONE_CALL 13 /* phone call sound */
+#define SHARP_BUZ_GOT_MAIL 14 /* mail sound */
+
+
+#define CUSTOM_BUZZER( sound ) \
+{ \
+ static int fd = open( "/dev/sharp_buz", O_RDWR|O_NONBLOCK ); \
+ ioctl( fd, SHARP_BUZZER_MAKESOUND, sound ); \
+}
+
+#define CUSTOM_SOUND_ALARM CUSTOM_BUZZER( SHARP_BUZ_SCHEDULE_ALARM )
+
+#include <sys/ioctl.h>
+#include <asm/sharp_char.h>
+
+// a bit awkward, as this value is defined in emailclient.cpp aswell...
+#define LED_MAIL 0
+#define SHARP_LED_MAIL 9
+
+#define CUSTOM_LEDS( led, status ) \
+{ \
+ if ( led == LED_MAIL ) \
+ led = SHARP_LED_MAIL; \
+ static int fd = open( "/dev/sharp_led", O_RDWR|O_NONBLOCK ); \
+ sharp_led_status leds; \
+ memset(&leds, 0, sizeof(leds)); \
+ leds.which = led; \
+ leds.status = status; \
+ ioctl( fd, SHARP_LED_SETSTATUS, (char*)&leds ); \
+}
+
+#define QPE_HAVE_MEMALERTER
+
+#define QPE_MEMALERTER_IMPL \
+static void sig_handler(int sig) \
+{ \
+ switch (sig) { \
+ case SIGHUP: \
+ memstate = VeryLow; \
+ break; \
+ case SIGUSR1: \
+ memstate = Normal; \
+ break; \
+ case SIGUSR2: \
+ memstate = Low; \
+ break; \
+ } \
+} \
+static void initMemalerter() \
+{ \
+ struct sigaction sa; \
+ memset(&sa, '\0', sizeof sa); \
+ sa.sa_handler = sig_handler; \
+ sa.sa_flags = SA_RESTART; \
+ if (sigaction(SIGHUP, &sa, NULL) < 0) { \
+ return; \
+ } \
+ if (sigaction(SIGUSR1, &sa, NULL) < 0) { \
+ return; \
+ } \
+ if (sigaction(SIGUSR2, &sa, NULL) < 0) { \
+ return; \
+ } \
+ FILE *fo = fopen("/proc/sys/vm/freepg_signal_proc", "w"); \
+ \
+ if (!fo) \
+ return; \
+ fprintf(fo, "qpe\n"); \
+ fclose(fo); \
+}
+
+#define QPE_INITIAL_NUMLOCK_STATE \
+{ \
+ bool numLock = FALSE; \
+ sharp_kbdctl_modifstat st; \
+ int dev = ::open("/dev/sharp_kbdctl", O_RDWR); \
+ if( dev >= 0 ) { \
+ memset(&st, 0, sizeof(st)); \
+ st.which = 3; \
+ int ret = ioctl(dev, SHARP_KBDCTL_GETMODIFSTAT, (char*)&st); \
+ if( !ret ) \
+ numLock = (bool)st.stat; \
+ ::close(dev); \
+ } \
+ return numLock; \
+}
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include <qasciidict.h>
+#include <qfile.h>
+#include <qmessagebox.h>
+#include <qstring.h>
+#include <qtextcodec.h>
+#include <qtextstream.h>
+#include <qtl.h>
+
+#include <qpe/alarmserver.h>
+#include <qpe/global.h>
+#include "datebookdb.h"
+#include <qpe/stringutil.h>
+#include <qpe/timeconversion.h>
+
+#include <errno.h>
+#include <stdlib.h>
+
+
+class DateBookDBPrivate
+{
+public:
+ bool clean; // indcate whether we need to write to disk...
+};
+
+
+// Helper functions
+
+static QString dateBookJournalFile()
+{
+ QString str = getenv("HOME");
+ return QString( str +"/.caljournal" );
+}
+
+static QString dateBookFilename()
+{
+ return Global::applicationFileName("datebook","datebook.xml");
+}
+
+/* Calculating the next event of a recuring event is actually
+ computationally inexpensive, esp. compared to checking each day
+ individually. There are bad worse cases for say the 29th of
+ february or the 31st of some other months. However
+ these are still bounded */
+bool nextOccurance(const Event &e, const QDate &from, QDateTime &next)
+{
+ // easy checks, first are we too far in the future or too far in the past?
+ QDate tmpDate;
+ int freq = e.repeatPattern().frequency;
+ int diff, diff2, a;
+ int iday, imonth, iyear;
+ int dayOfWeek = 0;
+ int firstOfWeek = 0;
+ int weekOfMonth;
+
+
+ if (e.repeatPattern().hasEndDate && e.repeatPattern().endDate() < from)
+ return FALSE;
+
+ if (e.start() >= from) {
+ next = e.start();
+ return TRUE;
+ }
+
+ switch ( e.repeatPattern().type ) {
+ case Event::Weekly:
+ /* weekly is just daily by 7 */
+ /* first convert the repeatPattern.Days() mask to the next
+ day of week valid after from */
+ dayOfWeek = from.dayOfWeek();
+ dayOfWeek--; /* we want 0-6, doco for above specs 1-7 */
+
+ /* this is done in case freq > 1 and from in week not
+ for this round */
+ // firstOfWeek = 0; this is already done at decl.
+ while(!((1 << firstOfWeek) & e.repeatPattern().days))
+ firstOfWeek++;
+
+ /* there is at least one 'day', or there would be no event */
+ while(!((1 << (dayOfWeek % 7)) & e.repeatPattern().days))
+ dayOfWeek++;
+
+ dayOfWeek = dayOfWeek % 7; /* the actual day of week */
+ dayOfWeek -= e.start().date().dayOfWeek() -1;
+
+ firstOfWeek = firstOfWeek % 7; /* the actual first of week */
+ firstOfWeek -= e.start().date().dayOfWeek() -1;
+
+ // dayOfWeek may be negitive now
+ // day of week is number of days to add to start day
+
+ freq *= 7;
+ // FALL-THROUGH !!!!!
+ case Event::Daily:
+ // the add is for the possible fall through from weekly */
+ if(e.start().date().addDays(dayOfWeek) > from) {
+ /* first week exception */
+ next = QDateTime(e.start().date().addDays(dayOfWeek),
+ e.start().time());
+ if ((next.date() > e.repeatPattern().endDate())
+ && e.repeatPattern().hasEndDate)
+ return FALSE;
+ return TRUE;
+ }
+ /* if from is middle of a non-week */
+
+ diff = e.start().date().addDays(dayOfWeek).daysTo(from) % freq;
+ diff2 = e.start().date().addDays(firstOfWeek).daysTo(from) % freq;
+
+ if(diff != 0)
+ diff = freq - diff;
+ if(diff2 != 0)
+ diff2 = freq - diff2;
+ diff = QMIN(diff, diff2);
+
+ next = QDateTime(from.addDays(diff), e.start().time());
+ if ( (next.date() > e.repeatPattern().endDate())
+ && e.repeatPattern().hasEndDate )
+ return FALSE;
+ return TRUE;
+ case Event::MonthlyDay:
+ iday = from.day();
+ iyear = from.year();
+ imonth = from.month();
+ /* find equivelent day of month for this month */
+ dayOfWeek = e.start().date().dayOfWeek();
+ weekOfMonth = (e.start().date().day() - 1) / 7;
+
+ /* work out when the next valid month is */
+ a = from.year() - e.start().date().year();
+ a *= 12;
+ a = a + (imonth - e.start().date().month());
+ /* a is e.start()monthsFrom(from); */
+ if(a % freq) {
+ a = freq - (a % freq);
+ imonth = from.month() + a;
+ if (imonth > 12) {
+ imonth--;
+ iyear += imonth / 12;
+ imonth = imonth % 12;
+ imonth++;
+ }
+ }
+ /* imonth is now the first month after or on
+ from that matches the frequency given */
+
+ /* find for this month */
+ tmpDate = QDate( iyear, imonth, 1 );
+
+ iday = 1;
+ iday += (7 + dayOfWeek - tmpDate.dayOfWeek()) % 7;
+ iday += 7 * weekOfMonth;
+ while (iday > tmpDate.daysInMonth()) {
+ imonth += freq;
+ if (imonth > 12) {
+ imonth--;
+ iyear += imonth / 12;
+ imonth = imonth % 12;
+ imonth++;
+ }
+ tmpDate = QDate( iyear, imonth, 1 );
+ /* these loops could go for a while, check end case now */
+ if ((tmpDate > e.repeatPattern().endDate()) && e.repeatPattern().hasEndDate)
+ return FALSE;
+ iday = 1;
+ iday += (7 + dayOfWeek - tmpDate.dayOfWeek()) % 7;
+ iday += 7 * weekOfMonth;
+ }
+ tmpDate = QDate(iyear, imonth, iday);
+
+ if (tmpDate >= from) {
+ next = QDateTime(tmpDate, e.start().time());
+ if ((next.date() > e.repeatPattern().endDate()) && e.repeatPattern().hasEndDate)
+ return FALSE;
+ return TRUE;
+ }
+
+ /* need to find the next iteration */
+ do {
+ imonth += freq;
+ if (imonth > 12) {
+ imonth--;
+ iyear += imonth / 12;
+ imonth = imonth % 12;
+ imonth++;
+ }
+ tmpDate = QDate( iyear, imonth, 1 );
+ /* these loops could go for a while, check end case now */
+ if ((tmpDate > e.repeatPattern().endDate()) && e.repeatPattern().hasEndDate)
+ return FALSE;
+ iday = 1;
+ iday += (7 + dayOfWeek - tmpDate.dayOfWeek()) % 7;
+ iday += 7 * weekOfMonth;
+ } while (iday > tmpDate.daysInMonth());
+ tmpDate = QDate(iyear, imonth, iday);
+
+ next = QDateTime(tmpDate, e.start().time());
+ if ((next.date() > e.repeatPattern().endDate()) && e.repeatPattern().hasEndDate)
+ return FALSE;
+ return TRUE;
+ case Event::MonthlyDate:
+ iday = e.start().date().day();
+ iyear = from.year();
+ imonth = from.month();
+
+ a = from.year() - e.start().date().year();
+ a *= 12;
+ a = a + (imonth - e.start().date().month());
+ /* a is e.start()monthsFrom(from); */
+ if(a % freq) {
+ a = freq - (a % freq);
+ imonth = from.month() + a;
+ if (imonth > 12) {
+ imonth--;
+ iyear += imonth / 12;
+ imonth = imonth % 12;
+ imonth++;
+ }
+ }
+ /* imonth is now the first month after or on
+ from that matches the frequencey given */
+
+ /* this could go for a while, worse case, 4*12 iterations, probably */
+ while(!QDate::isValid(iyear, imonth, iday) ) {
+ imonth += freq;
+ if (imonth > 12) {
+ imonth--;
+ iyear += imonth / 12;
+ imonth = imonth % 12;
+ imonth++;
+ }
+ /* these loops could go for a while, check end case now */
+ if ((QDate(iyear, imonth, 1) > e.repeatPattern().endDate()) && e.repeatPattern().hasEndDate)
+ return FALSE;
+ }
+
+ if(QDate(iyear, imonth, iday) >= from) {
+ /* done */
+ next = QDateTime(QDate(iyear, imonth, iday),
+ e.start().time());
+ if ((next.date() > e.repeatPattern().endDate()) && e.repeatPattern().hasEndDate)
+ return FALSE;
+ return TRUE;
+ }
+
+ /* ok, need to cycle */
+ imonth += freq;
+ imonth--;
+ iyear += imonth / 12;
+ imonth = imonth % 12;
+ imonth++;
+
+ while(!QDate::isValid(iyear, imonth, iday) ) {
+ imonth += freq;
+ imonth--;
+ iyear += imonth / 12;
+ imonth = imonth % 12;
+ imonth++;
+ if ((QDate(iyear, imonth, 1) > e.repeatPattern().endDate()) && e.repeatPattern().hasEndDate)
+ return FALSE;
+ }
+
+ next = QDateTime(QDate(iyear, imonth, iday), e.start().time());
+ if ((next.date() > e.repeatPattern().endDate()) && e.repeatPattern().hasEndDate)
+ return FALSE;
+ return TRUE;
+ case Event::Yearly:
+ iday = e.start().date().day();
+ imonth = e.start().date().month();
+ iyear = from.year(); // after all, we want to start in this year
+
+ diff = 1;
+ if(imonth == 2 && iday > 28) {
+ /* leap year, and it counts, calculate actual frequency */
+ if(freq % 4)
+ if (freq % 2)
+ freq = freq * 4;
+ else
+ freq = freq * 2;
+ /* else divides by 4 already, leave freq alone */
+ diff = 4;
+ }
+
+ a = from.year() - e.start().date().year();
+ if(a % freq) {
+ a = freq - (a % freq);
+ iyear = iyear + a;
+ }
+
+ /* under the assumption we won't hit one of the special not-leap years twice */
+ if(!QDate::isValid(iyear, imonth, iday)) {
+ /* must have been skipping by leap years and hit one that wasn't, (e.g. 2100) */
+ iyear += freq;
+ }
+
+ if(QDate(iyear, imonth, iday) >= from) {
+ next = QDateTime(QDate(iyear, imonth, iday),
+ e.start().time());
+ if ((next.date() > e.repeatPattern().endDate()) && e.repeatPattern().hasEndDate)
+ return FALSE;
+ return TRUE;
+ }
+ /* iyear == from.year(), need to advance again */
+ iyear += freq;
+ /* under the assumption we won't hit one of the special not-leap years twice */
+ if(!QDate::isValid(iyear, imonth, iday)) {
+ /* must have been skipping by leap years and hit one that wasn't, (e.g. 2100) */
+ iyear += freq;
+ }
+
+ next = QDateTime(QDate(iyear, imonth, iday), e.start().time());
+ if ((next.date() > e.repeatPattern().endDate()) && e.repeatPattern().hasEndDate)
+ return FALSE;
+ return TRUE;
+ default:
+ return FALSE;
+ }
+}
+
+static bool nextAlarm( const Event &ev, QDateTime& when, int& warn)
+{
+ QDateTime now = QDateTime::currentDateTime();
+ if ( ev.hasRepeat() ) {
+ QDateTime ralarm;
+ if (nextOccurance(ev, now.date(), ralarm)) {
+ ralarm = ralarm.addSecs(-ev.alarmTime()*60);
+ if ( ralarm > now ) {
+ when = ralarm;
+ warn = ev.alarmTime();
+ } else if ( nextOccurance(ev, now.date().addDays(1), ralarm) ) {
+ ralarm = ralarm.addSecs( -ev.alarmTime()*60 );
+ if ( ralarm > now ) {
+ when = ralarm;
+ warn = ev.alarmTime();
+ }
+ }
+ }
+ } else {
+ warn = ev.alarmTime();
+ when = ev.start().addSecs( -ev.alarmTime()*60 );
+ }
+ return when > now;
+}
+
+static void addEventAlarm( const Event &ev )
+{
+ QDateTime when;
+ int warn;
+ if ( nextAlarm(ev,when,warn) )
+ AlarmServer::addAlarm( when,
+ "QPE/Application/datebook",
+ "alarm(QDateTime,int)", warn );
+}
+
+static void delEventAlarm( const Event &ev )
+{
+ QDateTime when;
+ int warn;
+ if ( nextAlarm(ev,when,warn) )
+ AlarmServer::deleteAlarm( when,
+ "QPE/Application/datebook",
+ "alarm(QDateTime,int)", warn );
+}
+
+
+DateBookDB::DateBookDB()
+{
+ init();
+}
+
+DateBookDB::~DateBookDB()
+{
+ save();
+ eventList.clear();
+ repeatEvents.clear();
+}
+
+
+//#### Why is this code duplicated in getEffectiveEvents ?????
+//#### Addendum. Don't use this function, lets faze it out if we can.
+QValueList<Event> DateBookDB::getEvents( const QDate &from, const QDate &to )
+{
+ QValueList<Event> tmpList;
+ tmpList = getNonRepeatingEvents( from, to );
+
+ // check for repeating events...
+ for (QValueList<Event>::ConstIterator it = repeatEvents.begin();
+ it != repeatEvents.end(); ++it) {
+ QDate itDate = from;
+ QDateTime due;
+
+ /* create a false end date, to short circuit on hard
+ MonthlyDay recurences */
+ Event dummy_event = *it;
+ Event::RepeatPattern r = dummy_event.repeatPattern();
+ if ( !r.hasEndDate || r.endDate() > to ) {
+ r.setEndDate( to );
+ r.hasEndDate = TRUE;
+ }
+ dummy_event.setRepeat(TRUE, r);
+
+ while (nextOccurance(dummy_event, itDate, due)) {
+ if (due.date() > to)
+ break;
+ Event newEvent = *it;
+ newEvent.setStart(due);
+ newEvent.setEnd(due.addSecs((*it).start().secsTo((*it).end())));
+
+ tmpList.append(newEvent);
+ itDate = due.date().addDays(1); /* the next event */
+ }
+ }
+ qHeapSort(tmpList);
+ return tmpList;
+}
+
+QValueList<Event> DateBookDB::getEvents( const QDateTime &start )
+{
+ QValueList<Event> day = getEvents(start.date(),start.date());
+
+ QValueListConstIterator<Event> it;
+ QDateTime dtTmp;
+ QValueList<Event> tmpList;
+ for (it = day.begin(); it != day.end(); ++it ) {
+ dtTmp = (*it).start(TRUE);
+ if ( dtTmp == start )
+ tmpList.append( *it );
+ }
+ return tmpList;
+}
+
+//#### Why is this code duplicated in getEvents ?????
+
+QValueList<EffectiveEvent> DateBookDB::getEffectiveEvents( const QDate &from,
+ const QDate &to )
+{
+ QValueList<EffectiveEvent> tmpList;
+ QValueListIterator<Event> it;
+
+ EffectiveEvent effEv;
+ QDateTime dtTmp,
+ dtEnd;
+
+ for (it = eventList.begin(); it != eventList.end(); ++it ) {
+ dtTmp = (*it).start(TRUE);
+ dtEnd = (*it).end(TRUE);
+
+ if ( dtTmp.date() >= from && dtTmp.date() <= to ) {
+ Event tmpEv = *it;
+ effEv.setEvent(tmpEv);
+ effEv.setDate( dtTmp.date() );
+ effEv.setStart( dtTmp.time() );
+ if ( dtTmp.date() != dtEnd.date() )
+ effEv.setEnd( QTime(23, 59, 0) );
+ else
+ effEv.setEnd( dtEnd.time() );
+ tmpList.append( effEv );
+ }
+ // we must also check for end date information...
+ if ( dtEnd.date() != dtTmp.date() && dtEnd.date() >= from ) {
+ QDateTime dt = dtTmp.addDays( 1 );
+ dt.setTime( QTime(0, 0, 0) );
+ QDateTime dtStop;
+ if ( dtEnd > to ) {
+ dtStop = to;
+ } else
+ dtStop = dtEnd;
+ while ( dt <= dtStop ) {
+ Event tmpEv = *it;
+ effEv.setEvent( tmpEv );
+ effEv.setDate( dt.date() );
+ if ( dt >= from ) {
+ effEv.setStart( QTime(0, 0, 0) );
+ if ( dt.date() == dtEnd.date() )
+ effEv.setEnd( dtEnd.time() );
+ else
+ effEv.setEnd( QTime(23, 59, 59) );
+ tmpList.append( effEv );
+ }
+ dt = dt.addDays( 1 );
+ }
+ }
+ }
+ // check for repeating events...
+ QDateTime repeat;
+ for ( it = repeatEvents.begin(); it != repeatEvents.end(); ++it ) {
+
+ /* create a false end date, to short circuit on hard
+ MonthlyDay recurences */
+ Event dummy_event = *it;
+ int duration = (*it).start().date().daysTo( (*it).end().date() );
+ QDate itDate = from.addDays(-duration);
+
+ Event::RepeatPattern r = dummy_event.repeatPattern();
+ if ( !r.hasEndDate || r.endDate() > to ) {
+ r.setEndDate( to );
+ r.hasEndDate = TRUE;
+ }
+ dummy_event.setRepeat(TRUE, r);
+
+ while (nextOccurance(dummy_event, itDate, repeat)) {
+ if(repeat.date() > to)
+ break;
+ effEv.setDate( repeat.date() );
+ if ((*it).type() == Event::AllDay) {
+ effEv.setStart( QTime(0,0,0) );
+ effEv.setEnd( QTime(23,59,59) );
+ } else {
+ /* we only occur by days, not hours/minutes/seconds. Hence
+ the actual end and start times will be the same for
+ every repeated event. For multi day events this is
+ fixed up later if on wronge day span */
+ effEv.setStart( (*it).start().time() );
+ effEv.setEnd( (*it).end().time() );
+ }
+ if ( duration != 0 ) {
+ // multi-day repeating events
+ QDate sub_it = QMAX( repeat.date(), from );
+ QDate startDate = repeat.date();
+ QDate endDate = startDate.addDays( duration );
+
+ while ( sub_it <= endDate && sub_it <= to ) {
+ EffectiveEvent tmpEffEv = effEv;
+ Event tmpEv = *it;
+ tmpEffEv.setEvent( tmpEv );
+
+ if ( sub_it != startDate )
+ tmpEffEv.setStart( QTime(0,0,0) );
+ if ( sub_it != endDate )
+ tmpEffEv.setEnd( QTime(23,59,59) );
+ tmpEffEv.setDate( sub_it );
+ tmpEffEv.setEffectiveDates( startDate, endDate );
+ tmpList.append( tmpEffEv );
+ sub_it = sub_it.addDays( 1 );
+ }
+ itDate = endDate;
+ } else {
+ Event tmpEv = *it;
+ effEv.setEvent( tmpEv );
+ tmpList.append( effEv );
+ itDate = repeat.date().addDays( 1 );
+ }
+ }
+ }
+
+ qHeapSort( tmpList );
+ return tmpList;
+}
+
+QValueList<EffectiveEvent> DateBookDB::getEffectiveEvents( const QDateTime &dt)
+{
+ QValueList<EffectiveEvent> day = getEffectiveEvents(dt.date(), dt.date());
+ QValueListConstIterator<EffectiveEvent> it;
+ QValueList<EffectiveEvent> tmpList;
+ QDateTime dtTmp;
+
+ for (it = day.begin(); it != day.end(); ++it ) {
+ dtTmp = QDateTime( (*it).date(), (*it).start() );
+ // at the moment we don't have second granularity, be nice about that..
+ if ( QABS(dt.secsTo(dtTmp)) < 60 )
+ tmpList.append( *it );
+ }
+ return tmpList;
+}
+
+
+void DateBookDB::addEvent( const Event &ev, bool doalarm )
+{
+ // write to the journal...
+ saveJournalEntry( ev, ACTION_ADD, -1, false );
+ addJFEvent( ev, doalarm );
+ d->clean = false;
+}
+
+void DateBookDB::addJFEvent( const Event &ev, bool doalarm )
+{
+ if ( doalarm && ev.hasAlarm() )
+ addEventAlarm( ev );
+ if ( ev.hasRepeat() )
+ repeatEvents.append( ev );
+ else
+ eventList.append( ev );
+}
+
+void DateBookDB::editEvent( const Event &old, Event &editedEv )
+{
+ int oldIndex=0;
+ bool oldHadRepeat = old.hasRepeat();
+ Event orig;
+
+ // write to the journal...
+ if ( oldHadRepeat ) {
+ if ( origRepeat( old, orig ) ) // should work always...
+ oldIndex = repeatEvents.findIndex( orig );
+ } else
+ oldIndex = eventList.findIndex( old );
+ saveJournalEntry( editedEv, ACTION_REPLACE, oldIndex, oldHadRepeat );
+
+ if ( old.hasAlarm() )
+ delEventAlarm( old );
+ if ( oldHadRepeat ) {
+ if ( oldHadRepeat && editedEv.hasRepeat() ) {
+ // assumption, when someone edits a repeating event, they
+ // want to change them all, maybe not perfect, but it works
+ // for the moment...
+ repeatEvents.remove( orig );
+ } else
+ removeRepeat( old );
+ } else {
+ QValueList<Event>::Iterator it = eventList.find( old );
+ if ( it != eventList.end() )
+ eventList.remove( it );
+ }
+ if ( editedEv.hasAlarm() )
+ addEventAlarm( editedEv );
+ if ( editedEv.hasRepeat() )
+ repeatEvents.append( editedEv );
+ else
+ eventList.append( editedEv );
+ d->clean = false;
+}
+
+void DateBookDB::removeEvent( const Event &ev )
+{
+ // write to the journal...
+ saveJournalEntry( ev, ACTION_REMOVE, -1, false );
+ removeJFEvent( ev );
+ d->clean = false;
+}
+
+void DateBookDB::removeJFEvent( const Event&ev )
+{
+ if ( ev.hasAlarm() )
+ delEventAlarm( ev );
+ if ( ev.hasRepeat() ) {
+ removeRepeat( ev );
+ } else {
+ QValueList<Event>::Iterator it = eventList.find( ev );
+ if ( it != eventList.end() )
+ eventList.remove( it );
+ }
+}
+
+// also handles journaling...
+void DateBookDB::loadFile( const QString &strFile )
+{
+
+ QFile f( strFile );
+ if ( !f.open( IO_ReadOnly ) )
+ return;
+
+ enum Attribute {
+ FDescription = 0,
+ FLocation,
+ FCategories,
+ FUid,
+ FType,
+ FAlarm,
+ FSound,
+ FRType,
+ FRWeekdays,
+ FRPosition,
+ FRFreq,
+ FRHasEndDate,
+ FREndDate,
+ FRStart,
+ FREnd,
+ FNote,
+ FCreated,
+ FAction,
+ FActionKey,
+ FJournalOrigHadRepeat
+ };
+
+ QAsciiDict<int> dict( 97 );
+ dict.setAutoDelete( TRUE );
+ dict.insert( "description", new int(FDescription) );
+ dict.insert( "location", new int(FLocation) );
+ dict.insert( "categories", new int(FCategories) );
+ dict.insert( "uid", new int(FUid) );
+ dict.insert( "type", new int(FType) );
+ dict.insert( "alarm", new int(FAlarm) );
+ dict.insert( "sound", new int(FSound) );
+ dict.insert( "rtype", new int(FRType) );
+ dict.insert( "rweekdays", new int(FRWeekdays) );
+ dict.insert( "rposition", new int(FRPosition) );
+ dict.insert( "rfreq", new int(FRFreq) );
+ dict.insert( "rhasenddate", new int(FRHasEndDate) );
+ dict.insert( "enddt", new int(FREndDate) );
+ dict.insert( "start", new int(FRStart) );
+ dict.insert( "end", new int(FREnd) );
+ dict.insert( "note", new int(FNote) );
+ dict.insert( "created", new int(FCreated) );
+ dict.insert( "action", new int(FAction) );
+ dict.insert( "actionkey", new int(FActionKey) );
+ dict.insert( "actionorig", new int (FJournalOrigHadRepeat) );
+
+
+ QByteArray ba = f.readAll();
+ char* dt = ba.data();
+ int len = ba.size();
+ int currentAction,
+ journalKey,
+ origHadRepeat; // should be bool, but we need tri-state(not being used)
+
+ int i = 0;
+ char *point;
+ while ( ( point = strstr( dt+i, "<event " ) ) != 0 ) {
+ i = point - dt;
+ // if we are reading in events in the general case,
+ // we are just adding them, so let the actions represent that...
+ currentAction = ACTION_ADD;
+ journalKey = -1;
+ origHadRepeat = -1;
+ // some temporary variables for dates and times ...
+ //int startY = 0, startM = 0, startD = 0, starth = 0, startm = 0, starts = 0;
+ //int endY = 0, endM = 0, endD = 0, endh = 0, endm = 0, ends = 0;
+ //int enddtY = 0, enddtM = 0, enddtD = 0;
+
+ // ... for the alarm settings ...
+ int alarmTime = -1; Event::SoundTypeChoice alarmSound = Event::Silent;
+ // ... and for the recurrence
+ Event::RepeatPattern rp;
+ Event e;
+
+ i += 7;
+
+ while( 1 ) {
+ while ( i < len && (dt[i] == ' ' || dt[i] == '\n' || dt[i] == '\r') )
+ ++i;
+ if ( i >= len-2 || (dt[i] == '/' && dt[i+1] == '>') )
+ break;
+ // we have another attribute, read it.
+ int j = i;
+ while ( j < len && dt[j] != '=' )
+ ++j;
+ char *attr = dt+i;
+ dt[j] = '\0';
+ i = ++j; // skip =
+ while ( i < len && dt[i] != '"' )
+ ++i;
+ j = ++i;
+ bool haveAmp = FALSE;
+ bool haveUtf = FALSE;
+ while ( j < len && dt[j] != '"' ) {
+ if ( dt[j] == '&' )
+ haveAmp = TRUE;
+ if ( ((unsigned char)dt[j]) > 0x7f )
+ haveUtf = TRUE;
+ ++j;
+ }
+
+ if ( i == j ) {
+ // leave out empty attributes
+ i = j + 1;
+ continue;
+ }
+
+ QString value = haveUtf ? QString::fromUtf8( dt+i, j-i )
+ : QString::fromLatin1( dt+i, j-i );
+ if ( haveAmp )
+ value = Qtopia::plainString( value );
+ i = j + 1;
+
+ //qDebug("attr='%s' value='%s'", attr.data(), value.latin1() );
+ int * find = dict[ attr ];
+#if 1
+ if ( !find ) {
+ // custom field
+ e.setCustomField(attr, value);
+ continue;
+ }
+
+ switch( *find ) {
+ case FDescription:
+ e.setDescription( value );
+ break;
+ case FLocation:
+ e.setLocation( value );
+ break;
+ case FCategories:
+ e.setCategories( Qtopia::Record::idsFromString( value ) );
+ break;
+ case FUid:
+ e.setUid( value.toInt() );
+ break;
+ case FType:
+ if ( value == "AllDay" )
+ e.setType( Event::AllDay );
+ else
+ e.setType( Event::Normal );
+ break;
+ case FAlarm:
+ alarmTime = value.toInt();
+ break;
+ case FSound:
+ alarmSound = value == "loud" ? Event::Loud : Event::Silent;
+ break;
+ // recurrence stuff
+ case FRType:
+ if ( value == "Daily" )
+ rp.type = Event::Daily;
+ else if ( value == "Weekly" )
+ rp.type = Event::Weekly;
+ else if ( value == "MonthlyDay" )
+ rp.type = Event::MonthlyDay;
+ else if ( value == "MonthlyDate" )
+ rp.type = Event::MonthlyDate;
+ else if ( value == "Yearly" )
+ rp.type = Event::Yearly;
+ else
+ rp.type = Event::NoRepeat;
+ break;
+ case FRWeekdays:
+ rp.days = value.toInt();
+ break;
+ case FRPosition:
+ rp.position = value.toInt();
+ break;
+ case FRFreq:
+ rp.frequency = value.toInt();
+ break;
+ case FRHasEndDate:
+ rp.hasEndDate = value.toInt();
+ break;
+ case FREndDate: {
+ rp.endDateUTC = (time_t) value.toLong();
+ break;
+ }
+ case FRStart: {
+ e.setStart( (time_t) value.toLong() );
+ break;
+ }
+ case FREnd: {
+ e.setEnd( (time_t) value.toLong() );
+ break;
+ }
+ case FNote:
+ e.setNotes( value );
+ break;
+ case FCreated:
+ rp.createTime = value.toInt();
+ break;
+ case FAction:
+ currentAction = value.toInt();
+ break;
+ case FActionKey:
+ journalKey = value.toInt();
+ break;
+ case FJournalOrigHadRepeat:
+ origHadRepeat = value.toInt();
+ break;
+ default:
+ qDebug( "huh??? missing enum? -- attr.: %s", attr );
+ break;
+ }
+#endif
+ }
+ // "post processing" (dates, times, alarm, recurrence)
+ // start date/time
+ e.setRepeat( rp.type != Event::NoRepeat, rp );
+
+ if ( alarmTime != -1 )
+ e.setAlarm( TRUE, alarmTime, alarmSound );
+
+ // now do our action based on the current action...
+ switch ( currentAction ) {
+ case ACTION_ADD:
+ addJFEvent( e );
+ break;
+ case ACTION_REMOVE:
+ removeJFEvent( e );
+ break;
+ case ACTION_REPLACE:
+ // be a little bit careful,
+ // in case of a messed up journal...
+ if ( journalKey > -1 && origHadRepeat > -1 ) {
+ // get the original from proper list...
+ if ( origHadRepeat )
+ removeJFEvent( *(repeatEvents.at(journalKey)) );
+ else
+ removeJFEvent( *(eventList.at(journalKey)) );
+ addJFEvent( e );
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ f.close();
+}
+
+void DateBookDB::init()
+{
+ d = new DateBookDBPrivate;
+ d->clean = false;
+ QString str = dateBookFilename();
+ if ( str.isNull() ) {
+ QMessageBox::warning( 0, QObject::tr("Out of Space"),
+ QObject::tr("Unable to create start up files\n"
+ "Please free up some space\n"
+ "before entering data") );
+ }
+ // continuing along, we call this datebook filename again,
+ // because they may fix it before continuing, though it seems
+ // pretty unlikely...
+ loadFile( dateBookFilename() );
+
+ if ( QFile::exists( dateBookJournalFile() ) ) {
+ // merge the journal
+ loadFile( dateBookJournalFile() );
+ // save in our changes and remove the journal...
+ save();
+ }
+ d->clean = true;
+}
+
+bool DateBookDB::save()
+{
+ if ( d->clean == true )
+ return true;
+ QValueListIterator<Event> it;
+ int total_written;
+ QString strFileNew = dateBookFilename() + ".new";
+
+ QFile f( strFileNew );
+ if ( !f.open( IO_WriteOnly|IO_Raw ) )
+ return FALSE;
+
+ QString buf( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" );
+ buf += "<!DOCTYPE DATEBOOK><DATEBOOK>\n";
+ buf += "<events>\n";
+ QCString str = buf.utf8();
+ total_written = f.writeBlock( str.data(), str.length() );
+ if ( total_written != int(str.length()) ) {
+ f.close();
+ QFile::remove( strFileNew );
+ return false;
+ }
+
+ for ( it = eventList.begin(); it != eventList.end(); ++it ) {
+ buf = "<event";
+ (*it).save( buf );
+ buf += " />\n";
+ str = buf.utf8();
+ total_written = f.writeBlock( str.data(), str.length() );
+ if ( total_written != int(str.length()) ) {
+ f.close();
+ QFile::remove( strFileNew );
+ return false;
+ }
+ }
+ for ( it = repeatEvents.begin(); it != repeatEvents.end(); ++it ) {
+ buf = "<event";
+ (*it).save( buf );
+ buf += " />\n";
+ str = buf.utf8();
+ total_written = f.writeBlock( str.data(), str.length() );
+ if ( total_written != int(str.length()) ) {
+ f.close();
+ QFile::remove( strFileNew );
+ return false;
+ }
+ }
+ buf = "</events>\n</DATEBOOK>\n";
+ str = buf.utf8();
+ total_written = f.writeBlock( str.data(), str.length() );
+ if ( total_written != int(str.length()) ) {
+ f.close();
+ QFile::remove( strFileNew );
+ return false;
+ }
+ f.close();
+
+ // now rename... I like to use the systemcall
+ if ( ::rename( strFileNew, dateBookFilename() ) < 0 ) {
+ qWarning( "problem renaming file %s to %s errno %d",
+ strFileNew.latin1(), dateBookFilename().latin1(), errno );
+ // remove the file, otherwise it will just stick around...
+ QFile::remove( strFileNew );
+ }
+
+ // may as well remove the journal file...
+ QFile::remove( dateBookJournalFile() );
+ d->clean = true;
+ return true;
+}
+
+void DateBookDB::reload()
+{
+ QValueList<Event>::Iterator it = eventList.begin();
+ for ( ; it != eventList.end(); ++it ) {
+ if ( (*it).hasAlarm() )
+ delEventAlarm( *it );
+ if ( (*it).hasRepeat() )
+ removeRepeat( *it );
+ }
+ eventList.clear();
+ repeatEvents.clear(); // should be a NOP
+ init();
+}
+
+bool DateBookDB::removeRepeat( const Event &ev )
+{
+ time_t removeMe = ev.repeatPattern().createTime;
+ QValueListIterator<Event> it;
+ for ( it = repeatEvents.begin(); it != repeatEvents.end(); ++it ) {
+ if ( removeMe == (*it).repeatPattern().createTime ) {
+ repeatEvents.remove( *it );
+ // best break, or we are going into undefined territory!
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+bool DateBookDB::origRepeat( const Event &ev, Event &orig ) const
+{
+ time_t removeMe = ev.repeatPattern().createTime;
+ QValueListConstIterator<Event> it;
+ for ( it = repeatEvents.begin(); it != repeatEvents.end(); ++it ) {
+ if ( removeMe == (*it).repeatPattern().createTime ) {
+ orig = (*it);
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+void DateBookDB::saveJournalEntry( const Event &ev, journal_action action )
+{
+ saveJournalEntry( ev, action, -1, false );
+}
+
+bool DateBookDB::saveJournalEntry( const Event &evOld, journal_action action,
+ int key, bool origHadRepeat )
+{
+ bool status = false;
+ Event ev = evOld;
+ // write our log based on the action
+ QFile f( dateBookJournalFile() );
+ if ( !f.open( IO_WriteOnly|IO_Append ) )
+ return false;
+ QString buf = "<event";
+ ev.save( buf );
+ buf += " action=";
+ buf += "\"" + QString::number(action) + "\"";
+ buf += " actionkey=\"" + QString::number(key) + "\"";
+ buf += " actionorig=\"" + QString::number(origHadRepeat) +"\"";
+ buf += " />\n";
+ QString str = buf.utf8();
+ status = ( f.writeBlock( str.data(), str.length() ) == int(str.length()) );
+ f.close();
+ return status;
+}
+
+QValueList<Event> DateBookDB::getRawRepeats() const
+{
+ return repeatEvents;
+}
+
+QValueList<Event> DateBookDB::getNonRepeatingEvents( const QDate &from,
+ const QDate &to ) const
+{
+ QValueListConstIterator<Event> it;
+ QDateTime dtTmp, dtEnd;
+ QValueList<Event> tmpList;
+ for (it = eventList.begin(); it != eventList.end(); ++it ) {
+ dtTmp = (*it).start(TRUE);
+ dtEnd = (*it).end(TRUE);
+
+ if ( dtTmp.date() >= from && dtTmp.date() <= to ) {
+ Event e = *it;
+ if ( dtTmp.date() != dtEnd.date() )
+ e.setEnd( QDateTime(dtTmp.date(), QTime(23, 59, 0)) );
+ tmpList.append( e );
+ }
+ // we must also check for end date information...
+ if ( dtEnd.date() != dtTmp.date() && dtEnd.date() >= from ) {
+ QDateTime dt = dtTmp.addDays( 1 );
+ dt.setTime( QTime(0, 0, 0) );
+ QDateTime dtStop;
+ if ( dtEnd > to ) {
+ dtStop = to;
+ } else
+ dtStop = dtEnd;
+ while ( dt <= dtStop ) {
+ Event ev = *it;
+ if ( dt >= from ) {
+ ev.setStart( QDateTime(dt.date(), QTime(0, 0, 0)) );
+ if ( dt.date() == dtEnd.date() )
+ ev.setEnd( QDateTime(dt.date(), dtEnd.time()) );
+ else
+ ev.setEnd( QDateTime(dt.date(), QTime(23, 59, 0)) );
+ tmpList.append( ev );
+ }
+ dt = dt.addDays( 1 );
+ }
+ }
+ }
+ return tmpList;
+}
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef DATEBOOKDB_H
+#define DATEBOOKDB_H
+
+#include <qdatetime.h>
+#include <qfile.h>
+#include <qvaluelist.h>
+#include <qpe/event.h>
+
+// journal actions...
+enum journal_action { ACTION_ADD, ACTION_REMOVE, ACTION_REPLACE };
+
+class DateBookDBPrivate;
+class DateBookDB
+{
+public:
+ DateBookDB();
+ ~DateBookDB();
+
+ // very depreciated now!!!
+ QValueList<Event> getEvents( const QDate &from, const QDate &to );
+ QValueList<Event> getEvents( const QDateTime &start );
+
+ // USE THESE!!!
+ QValueList<EffectiveEvent> getEffectiveEvents( const QDate &from,
+ const QDate &to );
+ QValueList<EffectiveEvent> getEffectiveEvents( const QDateTime &start );
+
+ QValueList<Event> getRawRepeats() const;
+ QValueList<Event> getNonRepeatingEvents( const QDate &from,
+ const QDate &to ) const;
+
+ // Use these when dealing with adding removing events...
+ void addEvent( const Event &ev, bool doalarm=TRUE );
+ void removeEvent( const Event &ev );
+ void editEvent( const Event &old, Event &ev );
+ // add/remove event without journaling ( these ended up in public by accident, never
+ // use them unless you know what you are doing...),
+ // please put them in private if we ever can change the class...
+ void addJFEvent( const Event &ev, bool doalarm=TRUE );
+ void removeJFEvent( const Event &ev );
+
+ bool save();
+ void reload();
+private:
+ //find the real repeat...
+ bool origRepeat( const Event &ev, Event &orig ) const;
+ bool removeRepeat( const Event &ev );
+ void init();
+ void loadFile( const QString &strFile );
+ // depreciated...
+ void saveJournalEntry( const Event &ev, journal_action action );
+ // new version, uncomment the "= -1" when we remove the above
+ // function..
+ bool saveJournalEntry( const Event &ev, journal_action action,
+ int key/* = -1*/, bool origHadRepeat = false );
+
+ QValueList<Event> eventList; // non-repeating events...
+ QValueList<Event> repeatEvents; // the repeating events...
+ DateBookDBPrivate *d;
+ QFile journalFile;
+};
+
+/* helper functions, also useful to other apps. */
+bool nextOccurance( const Event &e, const QDate &from, QDateTime &next);
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#include "config.h"
+#include "datebookmonth.h"
+#include "datebookdb.h"
+#include <qpe/event.h>
+#include "resource.h"
+#include "qpeapplication.h"
+#include "timestring.h"
+
+#include <qtoolbutton.h>
+#include <qspinbox.h>
+#include <qcombobox.h>
+#include <qdatetime.h>
+#include <qpainter.h>
+#include <qpopupmenu.h>
+
+
+DateBookMonthHeader::DateBookMonthHeader( QWidget *parent, const char *name )
+ : QHBox( parent, name )
+{
+ setBackgroundMode( PaletteButton );
+
+ begin = new QToolButton( this );
+ begin->setFocusPolicy(NoFocus);
+ begin->setPixmap( Resource::loadPixmap( "start" ) );
+ begin->setAutoRaise( TRUE );
+ begin->setFixedSize( begin->sizeHint() );
+
+ back = new QToolButton( this );
+ back->setFocusPolicy(NoFocus);
+ back->setPixmap( Resource::loadPixmap( "back" ) );
+ back->setAutoRaise( TRUE );
+ back->setFixedSize( back->sizeHint() );
+
+ month = new QComboBox( FALSE, this );
+ for ( int i = 0; i < 12; ++i )
+ month->insertItem( Calendar::nameOfMonth( i + 1 ) );
+
+ year = new QSpinBox( 1970, 2037, 1, this );
+
+ next = new QToolButton( this );
+ next->setFocusPolicy(NoFocus);
+ next->setPixmap( Resource::loadPixmap( "forward" ) );
+ next->setAutoRaise( TRUE );
+ next->setFixedSize( next->sizeHint() );
+
+ end = new QToolButton( this );
+ end->setFocusPolicy(NoFocus);
+ end->setPixmap( Resource::loadPixmap( "finish" ) );
+ end->setAutoRaise( TRUE );
+ end->setFixedSize( end->sizeHint() );
+
+ connect( month, SIGNAL( activated( int ) ),
+ this, SLOT( updateDate() ) );
+ connect( year, SIGNAL( valueChanged( int ) ),
+ this, SLOT( updateDate() ) );
+ connect( begin, SIGNAL( clicked() ),
+ this, SLOT( firstMonth() ) );
+ connect( end, SIGNAL( clicked() ),
+ this, SLOT( lastMonth() ) );
+ connect( back, SIGNAL( clicked() ),
+ this, SLOT( monthBack() ) );
+ connect( next, SIGNAL( clicked() ),
+ this, SLOT( monthForward() ) );
+ back->setAutoRepeat( TRUE );
+ next->setAutoRepeat( TRUE );
+}
+
+
+DateBookMonthHeader::~DateBookMonthHeader()
+{
+
+}
+
+void DateBookMonthHeader::updateDate()
+{
+ emit dateChanged( year->value(), month->currentItem() + 1 );
+}
+
+void DateBookMonthHeader::firstMonth()
+{
+ emit dateChanged( year->value(), 1 );
+ month->setCurrentItem( 0 );
+}
+
+void DateBookMonthHeader::lastMonth()
+{
+ emit dateChanged( year->value(), 12 );
+ month->setCurrentItem( 11 );
+}
+
+void DateBookMonthHeader::monthBack()
+{
+ if ( month->currentItem() > 0 ) {
+ emit dateChanged( year->value(), month->currentItem() );
+ month->setCurrentItem( month->currentItem() - 1 );
+ } else {
+ emit dateChanged( year->value() - 1, 12 );
+ // we have a signal set to a changed value in year so we only need to change
+ // year to get the result...
+ month->setCurrentItem( 11 );
+ year->setValue( year->value() - 1 );
+ }
+}
+
+void DateBookMonthHeader::monthForward()
+{
+ if ( month->currentItem() < 11 ) {
+ emit dateChanged( year->value(), month->currentItem() + 2 );
+ month->setCurrentItem( month->currentItem() + 1 );
+ } else {
+ // we have a signal set to a changed value in year so we only need to change
+ // year to get the result...
+ month->setCurrentItem( 0 );
+ year->setValue( year->value() + 1 );
+ }
+}
+
+void DateBookMonthHeader::setDate( int y, int m )
+{
+ year->setValue( y );
+ month->setCurrentItem( m - 1 );
+}
+
+//---------------------------------------------------------------------------
+
+class DateBookMonthTablePrivate
+{
+public:
+ DateBookMonthTablePrivate() {};
+ ~DateBookMonthTablePrivate() { mMonthEvents.clear(); };
+
+ QValueList<EffectiveEvent> mMonthEvents;
+ bool onMonday;
+};
+
+DateBookMonthTable::DateBookMonthTable( QWidget *parent, const char *name,
+ DateBookDB *newDb )
+ : QTable( 6, 7, parent, name ),
+ db( newDb )
+{
+ d = new DateBookMonthTablePrivate();
+ selYear = -1;
+ selMonth = -1;
+ selDay = -1;
+
+ Config cfg( "qpe" );
+ cfg.setGroup( "Time" );
+ d->onMonday = cfg.readBoolEntry( "MONDAY" );
+
+ horizontalHeader()->setResizeEnabled( FALSE );
+ // we have to do this here... or suffer the consequences later...
+ for ( int i = 0; i < 7; i++ ){
+ horizontalHeader()->resizeSection( i, 30 );
+ setColumnStretchable( i, TRUE );
+ }
+ setupLabels();
+
+ verticalHeader()->hide();
+ setLeftMargin( 0 );
+ for ( int i = 0; i < 6; ++i )
+ setRowStretchable( i, TRUE );
+
+ setSelectionMode( NoSelection );
+
+ connect( this, SIGNAL( clicked( int, int, int, const QPoint & ) ),
+ this, SLOT( dayClicked( int, int ) ) );
+ connect( this, SIGNAL( currentChanged( int, int ) ),
+ this, SLOT( dragDay( int, int ) ) );
+ setVScrollBarMode( AlwaysOff );
+ setHScrollBarMode( AlwaysOff );
+}
+
+DateBookMonthTable::~DateBookMonthTable()
+{
+ monthsEvents.clear();
+ delete d;
+}
+
+void DateBookMonthTable::setDate(int y, int m, int d)
+{
+ if (month == m && year == y) {
+ if ( selYear == -1 )
+ year = selYear;
+ if ( selMonth == -1 )
+ month = selMonth;
+ int r1, c1, r2, c2;
+ findDay(selDay, r1, c1);
+ selDay = day = d;
+ findDay(selDay, r2, c2);
+ setCurrentCell( r2, c2 );
+ //updateCell(r1,c1);
+ //updateCell(r2,c2);
+ } else {
+ selYear = year = y;
+ selMonth = month = m;
+ selDay = day = d;
+ setupTable();
+ }
+}
+
+void DateBookMonthTable::redraw()
+{
+ setupLabels();
+ setupTable();
+}
+
+void DateBookMonthTable::setWeekStart( bool onMonday )
+{
+ d->onMonday = onMonday;
+ setupLabels();
+ setupTable();
+}
+
+void DateBookMonthTable::setupTable()
+{
+ QValueList<Calendar::Day> days = Calendar::daysOfMonth( year, month, d->onMonday );
+ QValueList<Calendar::Day>::Iterator it = days.begin();
+ int row = 0, col = 0;
+ int crow = 0;
+ int ccol = 0;
+ for ( ; it != days.end(); ++it ) {
+ DayItemMonth *i = (DayItemMonth *)item( row, col );
+ if ( !i ) {
+ i = new DayItemMonth( this, QTableItem::Never, "" );
+ setItem( row, col, i );
+ }
+ Calendar::Day calDay = *it;
+ i->clearEffEvents();
+ i->setDay( calDay.date );
+ i->setType( calDay.type );
+ if ( i->day() == day && calDay.type == Calendar::Day::ThisMonth ) {
+ crow = row;
+ ccol = col;
+ }
+
+ updateCell( row, col );
+
+ if ( col == 6 ) {
+ ++row;
+ col = 0;
+ } else {
+ ++col;
+ }
+ }
+ setCurrentCell( crow, ccol );
+ getEvents();
+}
+
+void DateBookMonthTable::findDay( int day, int &row, int &col )
+{
+ QDate dtBegin( year, month, 1 );
+ int skips = dtBegin.dayOfWeek();
+ int effective_day = day + skips - 1; // row/columns begin at 0
+ // make an extra adjustment if we start on Mondays.
+ if ( d->onMonday )
+ effective_day--;
+ row = effective_day / 7;
+ col = effective_day % 7;
+}
+
+void DateBookMonthTable::dayClicked( int row, int col )
+{
+ changeDaySelection( row, col );
+ emit dateClicked( selYear, selMonth, selDay );
+}
+
+void DateBookMonthTable::dragDay( int row, int col )
+{
+ changeDaySelection( row, col );
+}
+
+void DateBookMonthTable::changeDaySelection( int row, int col )
+{
+ DayItemMonth *i = (DayItemMonth*)item( row, col );
+ if ( !i )
+ return;
+ switch ( i->type() ) {
+ case Calendar::Day::ThisMonth:
+ selMonth = month;
+ break;
+ case Calendar::Day::PrevMonth:
+ selMonth = month-1;
+ break;
+ default:
+ selMonth = month+1;
+ }
+
+ selYear = year;
+ if ( selMonth <= 0 ) {
+ selMonth = 12;
+ selYear--;
+ } else if ( selMonth > 12 ) {
+ selMonth = 1;
+ selYear++;
+ }
+ selDay = i->day();
+}
+
+
+void DateBookMonthTable::viewportMouseReleaseEvent( QMouseEvent * )
+{
+ dayClicked( currentRow(), currentColumn() );
+}
+
+void DateBookMonthTable::getEvents()
+{
+ if ( !db )
+ return;
+
+ QDate dtStart( year, month, 1 );
+ d->mMonthEvents = db->getEffectiveEvents( dtStart,
+ QDate( year, month,
+ dtStart.daysInMonth() ) );
+ QValueListIterator<EffectiveEvent> it = d->mMonthEvents.begin();
+ // now that the events are sorted, basically go through the list, make
+ // a small list for every day and set it for each item...
+ // clear all the items...
+ while ( it != d->mMonthEvents.end() ) {
+ QValueList<EffectiveEvent> dayEvent;
+ EffectiveEvent e = *it;
+ ++it;
+ dayEvent.append( e );
+ while ( it != d->mMonthEvents.end()
+ && e.date() == (*it).date() ) {
+ dayEvent.append( *it );
+ ++it;
+ }
+ int row, col;
+ findDay( e.date().day(), row, col );
+ DayItemMonth* w = static_cast<DayItemMonth*>( item( row, col ) );
+ w->setEvents( dayEvent );
+ updateCell( row, col );
+ dayEvent.clear();
+ }
+}
+
+
+void DateBookMonthTable::setupLabels()
+{
+ for ( int i = 0; i < 7; ++i ) {
+// horizontalHeader()->resizeSection( i, 30 );
+// setColumnStretchable( i, TRUE );
+ if ( d->onMonday )
+ horizontalHeader()->setLabel( i, Calendar::nameOfDay( i + 1 ) );
+ else {
+ if ( i == 0 )
+ horizontalHeader()->setLabel( i, Calendar::nameOfDay( 7 ) );
+ else
+ horizontalHeader()->setLabel( i, Calendar::nameOfDay( i ) );
+ }
+ }
+}
+
+
+//---------------------------------------------------------------------------
+
+DateBookMonth::DateBookMonth( QWidget *parent, const char *name, bool ac,
+ DateBookDB *data )
+ : QVBox( parent, name ),
+ autoClose( ac )
+{
+ setFocusPolicy(StrongFocus);
+ year = QDate::currentDate().year();
+ month = QDate::currentDate().month();
+ day = QDate::currentDate().day();
+ header = new DateBookMonthHeader( this, "DateBookMonthHeader" );
+ table = new DateBookMonthTable( this, "DateBookMonthTable", data );
+ header->setDate( year, month );
+ table->setDate( year, month, QDate::currentDate().day() );
+ header->setFocusPolicy(NoFocus);
+ table->setFocusPolicy(NoFocus);
+ connect( header, SIGNAL( dateChanged( int, int ) ),
+ this, SLOT( setDate( int, int ) ) );
+ connect( table, SIGNAL( dateClicked( int, int, int ) ),
+ this, SLOT( finalDate(int, int, int) ) );
+ connect( qApp, SIGNAL(weekChanged(bool)), this,
+ SLOT(slotWeekChange(bool)) );
+ table->setFocus();
+}
+
+DateBookMonth::~DateBookMonth()
+{
+
+}
+
+void DateBookMonth::setDate( int y, int m )
+{
+ /* only change the date if this is a different date,
+ * other wise we may mistakenly overide the day */
+ if ( (y != year) || (m != month) ) {
+ year = y;
+ month = m;
+ QDate nd( y, m, 1 );
+ if ( nd.daysInMonth() < day )
+ day = nd.daysInMonth();
+ table->setDate( year, month, day );
+ }
+}
+
+void DateBookMonth::setDate( int y, int m, int d )
+{
+ header->setDate( y, m);
+ table->setDate( y, m, d);
+ year = y;
+ month = m;
+ day = d;
+}
+
+/* called when we wish to close or pass back the date */
+void DateBookMonth::finalDate(int y, int m, int d)
+{
+ setDate( y, m, d );
+
+ emit dateClicked(y, m, d);
+ // emit dateClicked(QDate(y, m, d).toString());
+
+ if ( autoClose && parentWidget() )
+ parentWidget()->close();
+}
+
+void DateBookMonth::setDate( QDate d)
+{
+ setDate(d.year(), d.month(), d.day());
+}
+
+void DateBookMonth::redraw()
+{
+ table->setDate( year, month, day );
+ table->redraw();
+}
+
+QDate DateBookMonth::selectedDate() const
+{
+ if ( !table )
+ return QDate::currentDate();
+ int y, m, d;
+ table->getDate( y, m, d );
+ qDebug( "got %d %d %d", y, m, d );
+ return QDate( y, m, d );
+}
+
+void DateBookMonth::slotWeekChange( bool startOnMonday )
+{
+ table->setWeekStart( startOnMonday );
+}
+
+void DateBookMonth::keyPressEvent( QKeyEvent *e )
+{
+ switch(e->key()) {
+ case Key_Up:
+ setDate(QDate(year, month, day).addDays(-7));
+ break;
+ case Key_Down:
+ setDate(QDate(year, month, day).addDays(7));
+ break;
+ case Key_Left:
+ setDate(QDate(year, month, day).addDays(-1));
+ break;
+ case Key_Right:
+ setDate(QDate(year, month, day).addDays(1));
+ break;
+ case Key_Space:
+ qWarning("space");
+ emit dateClicked(year, month, day);
+ if ( autoClose && parentWidget() )
+ parentWidget()->close();
+ break;
+ default:
+ qWarning("ignore");
+ e->ignore();
+ break;
+ }
+}
+
+//---------------------------------------------------------------------------
+class DayItemMonthPrivate
+{
+public:
+ DayItemMonthPrivate() {};
+ ~DayItemMonthPrivate() { mDayEvents.clear(); };
+ QValueList<EffectiveEvent> mDayEvents;
+};
+
+DayItemMonth::DayItemMonth( QTable *table, EditType et, const QString &t )
+ : QTableItem( table, et, t )
+{
+ d = new DayItemMonthPrivate();
+}
+
+DayItemMonth::~DayItemMonth()
+{
+ daysEvents.clear();
+ delete d;
+}
+
+void DayItemMonth::setEvents( const QValueList<EffectiveEvent> &effEv )
+{
+ d->mDayEvents = effEv;
+}
+
+void DayItemMonth::clearEffEvents()
+{
+ d->mDayEvents.clear();
+}
+
+void DayItemMonth::paint( QPainter *p, const QColorGroup &cg,
+ const QRect &cr, bool selected )
+{
+ QColorGroup g( cg );
+ g.setBrush( QColorGroup::Base, back );
+ g.setColor( QColorGroup::Text, forg );
+ p->fillRect( 0, 0, cr.width(), cr.height(), selected ? g.brush( QColorGroup::Highlight ) : g.brush( QColorGroup::Base ) );
+
+ if ( selected )
+ p->setPen( g.highlightedText() );
+ else
+ p->setPen( g.text() );
+
+ p->save();
+ QFont f = p->font();
+ f.setPointSize( ( f.pointSize() / 3 ) * 2 );
+ p->setFont( f );
+ QFontMetrics fm( f );
+ p->drawText( 1, 1 + fm.ascent(), QString::number( day() ) );
+ p->restore();
+ // Put indicators for something like this, (similar to PalmOS)
+ // Before noon: item at top of the day
+ // At noon: put a small item at the middle
+ // After noon: put an indicator at the bottom of the day
+ // an all day event: mark with a circle in the middle (a la DateBook+)
+ bool beforeNoon = false;
+ bool atNoon = false;
+ bool afterNoon = false;
+ bool bAllDay = false;
+ bool bRepeatAfter = false;
+ bool bRepeatBefore = false;
+ bool bRepeatNoon = false;
+ bool straddleAfter = false;
+ bool straddleBefore = false;
+ QValueListIterator<EffectiveEvent> itDays = d->mDayEvents.begin();
+ for ( ; itDays != d->mDayEvents.end(); ++itDays ) {
+ if ( (*itDays).event().type() == Event::AllDay )
+ bAllDay = TRUE;
+ else if ( (*itDays).start().hour() < 12 ) {
+ beforeNoon = TRUE;
+ if ( (*itDays).end().hour() > 12 ) {
+ atNoon = TRUE;
+ straddleBefore = TRUE;
+ }
+ if ( (*itDays).end().hour() > 14 ||
+ (*itDays).end().hour() == 14 && (*itDays).end().minute() > 0 ) {
+ afterNoon = TRUE;
+ straddleAfter = TRUE;
+ }
+ if ( (*itDays).event().hasRepeat() )
+ bRepeatBefore = TRUE;
+ } else if ( (*itDays).start().hour() == 12 ) {
+ if ( !atNoon )
+ atNoon = TRUE;
+ if ( (*itDays).event().hasRepeat() )
+ bRepeatNoon = TRUE;
+ if ( (*itDays).end().hour() > 14 ||
+ (*itDays).end().hour() == 14 && (*itDays).end().minute() > 0 ) {
+ afterNoon = TRUE;
+ straddleAfter = TRUE;
+ }
+ } else if ( (*itDays).start().hour() > 12 ) {
+ afterNoon = TRUE;
+ if ( (*itDays).event().hasRepeat() )
+ bRepeatAfter = TRUE;
+ }
+ }
+ int x = cr.width() - 13;
+ if ( beforeNoon ) {
+ p->setBrush( blue );
+ p->drawRect( x, 2, 10, 10 );
+ if ( bRepeatBefore )
+ p->fillRect( x + 5, 4, 3, 3, white );
+ }
+ if ( atNoon ) {
+ p->setBrush( blue );
+ p->drawRect( x, 14, 10, 5 );
+ if ( bRepeatNoon )
+ p->fillRect( x + 5, 16, 3, 2, white );
+ }
+ if ( straddleBefore ) {
+ p->drawLine( x, 11, x, 14 );
+ p->fillRect( x + 1, 11, 8, 4, blue );
+ p->drawLine( x + 9, 11, x + 9, 14 );
+ }
+ if ( afterNoon ) {
+ p->setBrush( blue );
+ p->drawRect( x, 21, 10, 10 );
+ if ( bRepeatAfter )
+ p->fillRect( x + 5, 23, 3, 3, white );
+ }
+ if ( straddleAfter ) {
+ p->drawLine( x, 18, x, 21 );
+ p->fillRect( x + 1, 18, 8, 4, blue );
+ p->drawLine( x + 9, 18, x + 9, 21 );
+ }
+ if ( bAllDay ) {
+ p->setBrush( green );
+ p->drawEllipse( cr.width() / 2 - 7, cr.height() / 2 - 5, 10, 10 );
+ }
+}
+
+
+
+void DayItemMonth::setType( Calendar::Day::Type t )
+{
+ switch ( t ) {
+ case Calendar::Day::PrevMonth:
+ case Calendar::Day::NextMonth:
+ back = QBrush( QColor( 224, 224, 224 ) );
+ forg = black;
+ break;
+ case Calendar::Day::ThisMonth:
+ back = QBrush( white );
+ forg = black;
+ break;
+ }
+ typ = t;
+}
+
+
+
+DateButton::DateButton( bool longDate, QWidget *parent, const char * name )
+ :QPushButton( parent, name )
+{
+ longFormat = longDate;
+ df = DateFormat('/', DateFormat::MonthDayYear, DateFormat::MonthDayYear);
+ setDate( QDate::currentDate() );
+
+ connect(this,SIGNAL(pressed()),this,SLOT(pickDate()));
+
+
+}
+
+
+void DateButton::pickDate()
+{
+ static QPopupMenu *m1 = 0;
+ static DateBookMonth *picker = 0;
+ if ( !m1 ) {
+ m1 = new QPopupMenu( this );
+ picker = new DateBookMonth( m1, 0, TRUE );
+ m1->insertItem( picker );
+ connect( picker, SIGNAL( dateClicked( int, int, int ) ),
+ this, SLOT( setDate( int, int, int ) ) );
+ connect( picker, SIGNAL( dateClicked( int, int, int ) ),
+ this, SIGNAL( dateSelected( int, int, int ) ) );
+ connect( m1, SIGNAL( aboutToHide() ),
+ this, SLOT( gotHide() ) );
+ }
+ picker->slotWeekChange( weekStartsMonday );
+ picker->setDate( currDate.year(), currDate.month(), currDate.day() );
+ m1->popup(mapToGlobal(QPoint(0,height())));
+ picker->setFocus();
+}
+
+
+void DateButton::gotHide()
+{
+ // we have to redo the button...
+ setDown( false );
+}
+
+
+// void dateSelected( int year, int month, int day );
+
+void DateButton::setWeekStartsMonday( int b )
+{
+ weekStartsMonday = b;
+}
+
+void DateButton::setDate( int y, int m, int d )
+{
+ setDate( QDate( y,m,d) );
+}
+
+void DateButton::setDate( QDate d )
+{
+ currDate = d;
+ setText( longFormat ? TimeString::longDateString( d, df ) :
+ TimeString::shortDate( d, df ) );
+
+}
+
+void DateButton::setDateFormat( DateFormat f )
+{
+ df = f;
+ setDate( currDate );
+}
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef DATEBOOKMONTH
+#define DATEBOOKMONTH
+
+#include <qpe/event.h>
+
+#include <qvbox.h>
+#include <qhbox.h>
+#include <qdatetime.h>
+#include <qvaluelist.h>
+#include <qtable.h>
+#include <qpushbutton.h>
+
+#include "calendar.h"
+#include "timestring.h"
+
+class QToolButton;
+class QComboBox;
+class QSpinBox;
+class Event;
+class DateBookDB;
+
+class DateBookMonthHeaderPrivate;
+class DateBookMonthHeader : public QHBox
+{
+ Q_OBJECT
+
+public:
+ DateBookMonthHeader( QWidget *parent = 0, const char *name = 0 );
+ ~DateBookMonthHeader();
+ void setDate( int year, int month );
+
+signals:
+ void dateChanged( int year, int month );
+
+protected slots:
+ void keyPressEvent(QKeyEvent *e ) {
+ e->ignore();
+ }
+
+private slots:
+ void updateDate();
+ void firstMonth();
+ void lastMonth();
+ void monthBack();
+ void monthForward();
+
+private:
+ QToolButton *begin, *back, *next, *end;
+ QComboBox *month;
+ QSpinBox *year;
+ DateBookMonthHeaderPrivate *d;
+};
+
+class DayItemMonthPrivate;
+class DayItemMonth : public QTableItem
+{
+public:
+ DayItemMonth( QTable *table, EditType et, const QString &t );
+ ~DayItemMonth();
+ void paint( QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected );
+ void setDay( int d ) { dy = d; }
+ void setEvents( const QValueList<Event> &events ) { daysEvents = events; };
+ void setEvents( const QValueList<EffectiveEvent> &effEvents );
+ void clearEvents() { daysEvents.clear(); };
+ void clearEffEvents();
+ int day() const { return dy; }
+ void setType( Calendar::Day::Type t );
+ Calendar::Day::Type type() const { return typ; }
+
+private:
+ QBrush back;
+ QColor forg;
+ int dy;
+ Calendar::Day::Type typ;
+ QValueList<Event> daysEvents; // not used anymore...
+ DayItemMonthPrivate *d;
+};
+
+class DateBookMonthTablePrivate;
+class DateBookMonthTable : public QTable
+{
+ Q_OBJECT
+
+public:
+ DateBookMonthTable( QWidget *parent = 0, const char *name = 0,
+ DateBookDB *newDb = 0 );
+ ~DateBookMonthTable();
+ void setDate( int y, int m, int d );
+ void redraw();
+
+ QSize minimumSizeHint() const { return sizeHint(); }
+ QSize minimumSize() const { return sizeHint(); }
+ void getDate( int& y, int &m, int &d ) const {y=selYear;m=selMonth;d=selDay;}
+ void setWeekStart( bool onMonday );
+signals:
+ void dateClicked( int year, int month, int day );
+
+protected:
+ void viewportMouseReleaseEvent( QMouseEvent * );
+
+protected slots:
+
+ void keyPressEvent(QKeyEvent *e ) {
+ e->ignore();
+ }
+
+private slots:
+ void dayClicked( int row, int col );
+ void dragDay( int row, int col );
+
+private:
+ void setupTable();
+ void setupLabels();
+
+ void findDay( int day, int &row, int &col );
+ void getEvents();
+ void changeDaySelection( int row, int col );
+
+ int year, month, day;
+ int selYear, selMonth, selDay;
+ QValueList<Event> monthsEvents; // not used anymore...
+ DateBookDB *db;
+ DateBookMonthTablePrivate *d;
+};
+
+class DateBookMonthPrivate;
+class DateBookMonth : public QVBox
+{
+ Q_OBJECT
+
+public:
+ DateBookMonth( QWidget *parent = 0, const char *name = 0, bool ac = FALSE,
+ DateBookDB *data = 0 );
+ ~DateBookMonth();
+ QDate selectedDate() const;
+
+signals:
+ void dateClicked( int year, int month, int day );
+
+public slots:
+ void setDate( int y, int m );
+ void setDate( int y, int m, int d );
+ void setDate( QDate );
+ void redraw();
+ void slotWeekChange( bool );
+
+protected slots:
+ virtual void keyPressEvent(QKeyEvent *e);
+
+private slots:
+ void forwardDateClicked( int y, int m, int d ) { emit dateClicked( y, m, d ); }
+ void finalDate(int, int, int);
+
+private:
+ DateBookMonthHeader *header;
+ DateBookMonthTable *table;
+ int year, month, day;
+ bool autoClose;
+ class DateBookMonthPrivate *d;
+};
+
+class DateButton : public QPushButton
+{
+ Q_OBJECT
+
+public:
+ DateButton( bool longDate, QWidget *parent, const char * name = 0 );
+ QDate date() const { return currDate; }
+
+signals:
+ void dateSelected( int year, int month, int day );
+
+public slots:
+ void setDate( int y, int m, int d );
+ void setDate( QDate );
+ void setWeekStartsMonday( int );
+ void setDateFormat( DateFormat );
+
+private slots:
+ void pickDate();
+ void gotHide();
+
+private:
+ bool longFormat;
+ bool weekStartsMonday;
+ QDate currDate;
+ DateFormat df;
+};
+
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#include "filemanager.h"
+#include "applnk.h"
+
+#include <qdir.h>
+#include <qfile.h>
+#include <qfileinfo.h>
+#include <qtextstream.h>
+#include <qtextcodec.h>
+
+#include <errno.h>
+#include <stdlib.h>
+
+/*!
+ \class FileManager
+ \brief The FileManager class assists with AppLnk input/output.
+*/
+
+/*!
+ Constructs a FileManager.
+*/
+FileManager::FileManager()
+{
+}
+
+/*!
+ Destroys a FileManager.
+*/
+FileManager::~FileManager()
+{
+
+}
+
+/*!
+ Saves \a data as the document specified by \a f.
+
+ Returns whether the operation succeeded.
+*/
+bool FileManager::saveFile( const DocLnk &f, const QByteArray &data )
+{
+ QString fn = f.file() + ".new";
+ ensurePathExists( fn );
+ QFile fl( fn );
+ if ( !fl.open( IO_WriteOnly|IO_Raw ) )
+ return FALSE;
+ int total_written = fl.writeBlock( data );
+ fl.close();
+ if ( total_written != int(data.size()) || !f.writeLink() ) {
+ QFile::remove( fn );
+ return FALSE;
+ }
+ // else rename the file...
+ if ( ::rename( fn.latin1(), f.file().latin1() ) < 0 ) {
+ qWarning( "problem renaming file %s to %s, errno: %d", fn.latin1(),
+ f.file().latin1(), errno );
+ // remove the file...
+ QFile::remove( fn );
+ }
+ return TRUE;
+}
+
+/*!
+ Saves \a text as the document specified by \a f.
+
+ The text is saved in UTF8 format.
+
+ Returns whether the operation succeeded.
+*/
+bool FileManager::saveFile( const DocLnk &f, const QString &text )
+{
+ QString fn = f.file() + ".new";
+ ensurePathExists( fn );
+ QFile fl( fn );
+ if ( !fl.open( IO_WriteOnly|IO_Raw ) ) {
+ qDebug( "open failed: %s", fn.latin1() );
+ return FALSE;
+ }
+
+ QCString cstr = text.utf8();
+ int total_written;
+ total_written = fl.writeBlock( cstr.data(), cstr.length() );
+ fl.close();
+ if ( total_written != int(cstr.length()) || !f.writeLink() ) {
+ QFile::remove( fn );
+ return FALSE;
+ }
+ // okay now rename the file...
+ if ( ::rename( fn.latin1(), f.file().latin1() ) < 0 ) {
+ qWarning( "problem renaming file %s to %s, errno: %d", fn.latin1(),
+ f.file().latin1(), errno );
+ // remove the tmp file, otherwise, it will just lay around...
+ QFile::remove( fn.latin1() );
+ }
+ return TRUE;
+}
+
+
+/*!
+ Loads \a text from the document specified by \a f.
+
+ The text is required to be in UTF8 format.
+
+ Returns whether the operation succeeded.
+*/
+bool FileManager::loadFile( const DocLnk &f, QString &text )
+{
+ QString fn = f.file();
+ QFile fl( fn );
+ if ( !fl.open( IO_ReadOnly ) )
+ return FALSE;
+ QTextStream ts( &fl );
+#if QT_VERSION <= 230 && defined(QT_NO_CODECS)
+ // The below should work, but doesn't in Qt 2.3.0
+ ts.setCodec( QTextCodec::codecForMib( 106 ) );
+#else
+ ts.setEncoding( QTextStream::UnicodeUTF8 );
+#endif
+ text = ts.read();
+ fl.close();
+ return TRUE;
+}
+
+
+/*!
+ Loads \a ba from the document specified by \a f.
+
+ Returns whether the operation succeeded.
+*/
+bool FileManager::loadFile( const DocLnk &f, QByteArray &ba )
+{
+ QString fn = f.file();
+ QFile fl( fn );
+ if ( !fl.open( IO_ReadOnly ) )
+ return FALSE;
+ ba.resize( fl.size() );
+ if ( fl.size() > 0 )
+ fl.readBlock( ba.data(), fl.size() );
+ fl.close();
+ return TRUE;
+}
+
+/*!
+ Copies the document specified by \a src to the document specified
+ by \a dest.
+
+ Returns whether the operation succeeded.
+*/
+bool FileManager::copyFile( const AppLnk &src, const AppLnk &dest )
+{
+ QFile sf( src.file() );
+ if ( !sf.open( IO_ReadOnly ) )
+ return FALSE;
+
+ QString fn = dest.file() + ".new";
+ ensurePathExists( fn );
+ QFile df( fn );
+ if ( !df.open( IO_WriteOnly|IO_Raw ) )
+ return FALSE;
+
+ const int bufsize = 16384;
+ char buffer[bufsize];
+ bool ok = TRUE;
+ int bytesRead = 0;
+ while ( ok && !sf.atEnd() ) {
+ bytesRead = sf.readBlock( buffer, bufsize );
+ if ( bytesRead < 0 )
+ ok = FALSE;
+ while ( ok && bytesRead > 0 ) {
+ int bytesWritten = df.writeBlock( buffer, bytesRead );
+ if ( bytesWritten < 0 )
+ ok = FALSE;
+ else
+ bytesRead -= bytesWritten;
+ }
+ }
+
+ if ( ok )
+ ok = dest.writeLink();
+
+ if ( ok ) {
+ // okay now rename the file...
+ if ( ::rename( fn.latin1(), dest.file().latin1() ) < 0 ) {
+ qWarning( "problem renaming file %s to %s, errno: %d", fn.latin1(),
+ dest.file().latin1(), errno );
+ // remove the tmp file, otherwise, it will just lay around...
+ QFile::remove( fn.latin1() );
+ }
+ } else {
+ QFile::remove( fn.latin1() );
+ }
+
+ return ok;
+}
+
+/*!
+ Opens the document specified by \a f as a readable QIODevice.
+ The caller must delete the return value.
+
+ Returns 0 if the operation fails.
+*/
+QIODevice* FileManager::openFile( const DocLnk& f )
+{
+ QString fn = f.file();
+ QFile* fl = new QFile( fn );
+ if ( !fl->open( IO_ReadOnly ) ) {
+ delete fl;
+ fl = 0;
+ }
+ return fl;
+}
+
+/*!
+ Opens the document specified by \a f as a writable QIODevice.
+ The caller must delete the return value.
+
+ Returns 0 if the operation fails.
+*/
+QIODevice* FileManager::saveFile( const DocLnk& f )
+{
+ QString fn = f.file();
+ ensurePathExists( fn );
+ QFile* fl = new QFile( fn );
+ if ( fl->open( IO_WriteOnly ) ) {
+ f.writeLink();
+ } else {
+ delete fl;
+ fl = 0;
+ }
+ return fl;
+}
+
+/*!
+ Returns whether the document specified by \a f current exists
+ as a file on disk.
+*/
+bool FileManager::exists( const DocLnk &f )
+{
+ return QFile::exists(f.file());
+}
+
+
+/*!
+ Ensures that the path \a fn exists, by creating required directories.
+ Returns TRUE if successful.
+*/
+bool FileManager::ensurePathExists( const QString &fn )
+{
+ QFileInfo fi(fn);
+ fi.setFile( fi.dirPath(TRUE) );
+ if ( !fi.exists() ) {
+ if ( system(("mkdir -p "+fi.filePath())) )
+ return FALSE;
+ }
+
+ return TRUE;
+}
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef FILEMANAGER_H
+#define FILEMANAGER_H
+
+#include <qstring.h>
+#include <qstringlist.h>
+
+class AppLnk;
+class DocLnk;
+class FileManagerPrivate;
+
+class FileManager
+{
+public:
+ FileManager();
+ ~FileManager();
+
+ bool saveFile( const DocLnk&, const QByteArray &data );
+ bool saveFile( const DocLnk&, const QString &text );
+ bool loadFile( const DocLnk&, QByteArray &data );
+ bool loadFile( const DocLnk&, QString &text );
+ bool copyFile( const AppLnk &src, const AppLnk &dest );
+
+ // The caller must delete the return values.
+ QIODevice* openFile( const DocLnk& );
+ QIODevice* saveFile( const DocLnk& );
+
+ bool exists( const DocLnk& );
+
+protected:
+ bool ensurePathExists( const QString &fn );
+
+private:
+ FileManagerPrivate *d;
+};
+
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#include "fileselector.h"
+#include "global.h"
+#include "resource.h"
+#include "config.h"
+#include "applnk.h"
+#include "storage.h"
+#include "qpemenubar.h"
+#include "qcopchannel_qws.h"
+#include "lnkproperties.h"
+#include "applnk.h"
+#include "qpeapplication.h"
+#include "categorymenu.h"
+
+#include <stdlib.h>
+
+#include <qdir.h>
+#include <qwidget.h>
+#include <qpopupmenu.h>
+#include <qtoolbutton.h>
+#include <qpushbutton.h>
+#include <qheader.h>
+#include <qtooltip.h>
+
+
+FileSelectorItem::FileSelectorItem( QListView *parent, const DocLnk &f )
+ : QListViewItem( parent ), fl( f )
+{
+ setText( 0, f.name() );
+ setPixmap( 0, f.pixmap() );
+}
+
+FileSelectorItem::~FileSelectorItem()
+{
+}
+
+class FileSelectorViewPrivate
+{
+public:
+ CategoryMenu *cm;
+};
+
+FileSelectorView::FileSelectorView( const QString &f, QWidget *parent, const char *name )
+ : QListView( parent, name ), filter( f ), count( 0 )
+{
+ d = new FileSelectorViewPrivate();
+ d->cm = 0;
+ setAllColumnsShowFocus( TRUE );
+ addColumn( tr( "Name" ) );
+ header()->hide();
+
+ fileManager = new FileManager;
+ reread();
+ QCopChannel *channel = new QCopChannel( "QPE/Card", this );
+ connect( channel, SIGNAL(received(const QCString &, const QByteArray &)),
+ this, SLOT(cardMessage( const QCString &, const QByteArray &)) );
+}
+
+FileSelectorView::~FileSelectorView()
+{
+}
+
+void FileSelectorView::reread()
+{
+ FileSelectorItem *item = (FileSelectorItem *)selectedItem();
+ QString oldFile;
+ if ( item )
+ oldFile = item->file().file();
+ clear();
+ DocLnkSet files;
+ Global::findDocuments(&files, filter);
+ count = files.children().count();
+ QListIterator<DocLnk> dit( files.children() );
+ for ( ; dit.current(); ++dit ) {
+ if (d->cm)
+ if (!d->cm->isSelected((**dit).categories()))
+ continue;
+ item = new FileSelectorItem( this, **dit );
+ if ( item->file().file() == oldFile )
+ setCurrentItem( item );
+ }
+ if ( !selectedItem() )
+ setCurrentItem( firstChild() );
+}
+
+void FileSelectorView::setCategoryFilter(CategoryMenu *cm)
+{
+ d->cm = cm;
+ connect(cm, SIGNAL(categoryChange()), this, SLOT(categoryChanged()) );
+}
+
+void FileSelectorView::categoryChanged() { reread(); }
+
+void FileSelectorView::cardMessage( const QCString &msg, const QByteArray &)
+{
+ if ( msg == "mtabChanged()" )
+ reread();
+}
+
+void FileSelectorView::keyPressEvent( QKeyEvent *e )
+{
+ QString txt = e->text();
+ if (e->key() == Key_Space)
+ emit returnPressed( currentItem() );
+ else if ( !txt.isNull() && txt[0] > ' ' && e->key() < 0x1000 )
+ e->ignore();
+ else
+ QListView::keyPressEvent(e);
+}
+
+class FileSelectorPrivate
+{
+public:
+ CategoryMenu *cm;
+ QMenuBar *mb;
+};
+
+/*!
+ \class FileSelector fileselector.h
+ \brief The FileSelector widget allows the user to select DocLnk objects.
+*/
+
+/*!
+ Constructs a FileSelector with mime filter \a f.
+ The standard Qt \a parent and \a name parameters are passed to the
+ parent.
+
+ If \a newVisible is TRUE, the widget has an button allowing the user
+ the create "new" documents - editor applications will have this while
+ viewer applications will not.
+
+ If \a closeVisible is TRUE, the widget has an button allowinf the user
+ to select "no document".
+
+ \sa DocLnkSet::DocLnkSet()
+*/
+FileSelector::FileSelector( const QString &f, QWidget *parent, const char *name, bool newVisible, bool closeVisible )
+ : QVBox( parent, name ), filter( f )
+{
+ setMargin( 0 );
+ setSpacing( 0 );
+ QHBox *top = new QHBox( this );
+ top->setBackgroundMode( PaletteButton ); // same colour as toolbars
+ top->setSpacing( 0 );
+
+ QWidget *spacer = new QWidget( top );
+ spacer->setBackgroundMode( PaletteButton );
+
+ d = new FileSelectorPrivate();
+ d->mb = new QMenuBar(spacer);
+ d->cm = new CategoryMenu("Document View", this);
+ QPEMenuToolFocusManager::manager()->addWidget( d->mb );
+ d->mb->insertItem(tr("View"), d->cm);
+
+
+ QToolButton *tb = new QToolButton( top );
+ tb->setPixmap( Resource::loadPixmap( "new" ) );
+ connect( tb, SIGNAL( clicked() ), this, SLOT( createNew() ) );
+ buttonNew = tb;
+ tb->setFixedSize( 18, 20 ); // tb->sizeHint() );
+ tb->setAutoRaise( TRUE );
+ QToolTip::add( tb, tr( "Create a new Document" ) );
+ QPEMenuToolFocusManager::manager()->addWidget( tb );
+
+ tb = new QToolButton( top );
+ tb->setPixmap( Resource::loadPixmap( "close" ) );
+ connect( tb, SIGNAL( clicked() ), this, SIGNAL( closeMe() ) );
+ buttonClose = tb;
+ tb->setFixedSize( 18, 20 ); // tb->sizeHint() );
+ tb->setAutoRaise( TRUE );
+ QToolTip::add( tb, tr( "Close the File Selector" ) );
+ QPEMenuToolFocusManager::manager()->addWidget( tb );
+
+ view = new FileSelectorView( filter, this, "fileview" );
+ view->setCategoryFilter(d->cm);
+ QPEApplication::setStylusOperation( view->viewport(), QPEApplication::RightOnHold );
+ connect( view, SIGNAL( mouseButtonClicked( int, QListViewItem *, const QPoint &, int ) ),
+ this, SLOT( fileClicked( int, QListViewItem *, const QPoint &, int ) ) );
+ connect( view, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint &, int ) ),
+ this, SLOT( filePressed( int, QListViewItem *, const QPoint &, int ) ) );
+ connect( view, SIGNAL( returnPressed( QListViewItem * ) ),
+ this, SLOT( fileClicked( QListViewItem * ) ) );
+
+ setNewVisible( newVisible );
+ setCloseVisible( closeVisible );
+}
+
+/*!
+ Destroys the widget.
+*/
+FileSelector::~FileSelector()
+{
+
+}
+
+/*!
+ Returns the number of files in the view. If this is zero, and editor
+ application might avoid using the selector and immediately start with
+ a "new" document.
+*/
+int FileSelector::fileCount()
+{
+ return view->fileCount();
+}
+
+/*!
+ Causes the file selector to act as if the "new" button was chosen.
+
+ \sa newSelected(), closeMe()
+*/
+void FileSelector::createNew()
+{
+ DocLnk f;
+ emit newSelected( f );
+ emit closeMe();
+}
+
+void FileSelector::fileClicked( int button, QListViewItem *i, const QPoint &, int )
+{
+ if ( !i )
+ return;
+ if ( button == Qt::LeftButton ) {
+ fileClicked( i );
+ }
+}
+
+void FileSelector::filePressed( int button, QListViewItem *i, const QPoint &, int )
+{
+ if ( !i )
+ return;
+ if ( button == Qt::RightButton ) {
+ DocLnk l = ((FileSelectorItem *)i)->file();
+ LnkProperties prop( &l );
+ prop.showMaximized();
+ prop.exec();
+ d->cm->reload();
+ reread();
+ }
+}
+
+void FileSelector::fileClicked( QListViewItem *i )
+{
+ if ( !i )
+ return;
+ emit fileSelected( ( (FileSelectorItem*)i )->file() );
+ emit closeMe();
+}
+
+/*!
+ Returns the selected DocLnk. The caller is responsible for deleting
+ the returned value.
+*/
+const DocLnk *FileSelector::selected()
+{
+ FileSelectorItem *item = (FileSelectorItem *)view->selectedItem();
+ if ( item )
+ return new DocLnk( item->file() );
+ return NULL;
+}
+
+/*!
+ \fn void FileSelector::fileSelected( const DocLnk &f )
+
+ This signal is emitted when the user selects a file.
+ \a f is the file.
+*/
+
+/*!
+ \fn void FileSelector::newSelected( const DocLnk &f )
+
+ This signal is emitted when the user selects "new" file.
+ \a f is a DocLnk for the file. You will need to set the type
+ of the value after copying it.
+*/
+
+/*!
+ \fn void FileSelector::closeMe()
+
+ This signal is emitted when the user no longer needs to view the widget.
+*/
+
+
+/*!
+ Sets whether a "new document" button is visible, according to \a b.
+*/
+void FileSelector::setNewVisible( bool b )
+{
+ if ( b )
+ buttonNew->show();
+ else
+ buttonNew->hide();
+}
+
+/*!
+ Sets whether a "no document" button is visible, according to \a b.
+*/
+void FileSelector::setCloseVisible( bool b )
+{
+ if ( b )
+ buttonClose->show();
+ else
+ buttonClose->hide();
+}
+
+/*!
+ Sets whether a categories menu is visible, according to \a b.
+*/
+void FileSelector::setCategoriesVisible( bool b )
+{
+ if ( b )
+ d->mb->show();
+ else
+ d->mb->hide();
+}
+
+/*!
+ Rereads the list of files.
+*/
+void FileSelector::reread()
+{
+ view->reread();
+}
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef FILESELECTOR_H
+#define FILESELECTOR_H
+
+#include <qhbox.h>
+#include <qvbox.h>
+#include <qlistview.h>
+#include <qtoolbutton.h>
+
+#include "filemanager.h"
+#include "applnk.h"
+
+class QPopupMenu;
+class QPushButton;
+
+class FileSelectorItem : public QListViewItem
+{
+public:
+ FileSelectorItem( QListView *parent, const DocLnk& f );
+ ~FileSelectorItem();
+
+ DocLnk file() const { return fl; }
+
+private:
+ DocLnk fl;
+};
+
+class CategoryMenu;
+class FileSelectorViewPrivate;
+class FileSelectorView : public QListView
+{
+ Q_OBJECT
+
+public:
+ FileSelectorView( const QString &mimefilter, QWidget *parent, const char *name );
+ ~FileSelectorView();
+ void reread();
+ int fileCount() { return count; }
+
+ void setCategoryFilter(CategoryMenu *);
+protected:
+ void keyPressEvent( QKeyEvent *e );
+
+protected slots:
+ void cardMessage( const QCString &, const QByteArray &);
+
+ void categoryChanged();
+
+private:
+ QString filter;
+ FileManager *fileManager;
+ int count;
+ FileSelectorViewPrivate *d;
+};
+
+class FileSelectorPrivate;
+class FileSelector : public QVBox
+{
+ Q_OBJECT
+
+public:
+ FileSelector( const QString &mimefilter, QWidget *parent, const char *name, bool newVisible = TRUE, bool closeVisible = TRUE );
+ ~FileSelector();
+ void setNewVisible( bool b );
+ void setCloseVisible( bool b );
+ void setCategoriesVisible( bool b );
+ void reread();
+ int fileCount();
+ const DocLnk *selected();
+
+signals:
+ void fileSelected( const DocLnk & );
+ void newSelected( const DocLnk & );
+ void closeMe();
+
+private slots:
+ void createNew();
+ void fileClicked( int, QListViewItem *, const QPoint &, int );
+ // pressed to get 'right down'
+ void filePressed( int, QListViewItem *, const QPoint &, int );
+ void fileClicked( QListViewItem *);
+
+private:
+ FileSelectorView *view;
+ QString filter;
+ QToolButton *buttonNew, *buttonClose;
+ FileSelectorPrivate *d;
+};
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2001 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "finddialog.h"
+#include "findwidget_p.h"
+
+#include <qlayout.h>
+#include <qpushbutton.h>
+
+FindDialog::FindDialog( const QString &appName, QWidget *parent,
+ const char *name, bool modal )
+ : QDialog( parent, name, modal )
+{
+ QVBoxLayout *vb;
+ vb = new QVBoxLayout( this );
+ fw = new FindWidget( appName, this, "Find Widget" );
+ vb->addWidget( fw );
+ QObject::connect( fw, SIGNAL(signalFindClicked(const QString&,
+ bool,bool,int)),
+ this, SIGNAL(signalFindClicked(const QString&,
+ bool,bool,int)) );
+ QObject::connect( fw, SIGNAL(signalFindClicked(const QString&,const QDate&,
+ bool,bool,int)),
+ this, SIGNAL(signalFindClicked(const QString&,
+ const QDate&,bool,bool,int)) );
+ d = 0;
+}
+
+FindDialog::~FindDialog()
+{
+}
+
+QString FindDialog::findText() const
+{
+ return fw->findText();
+}
+
+void FindDialog::setUseDate( bool show )
+{
+ fw->setUseDate( show );
+}
+
+void FindDialog::setDate( const QDate &dt )
+{
+ fw->setDate( dt );
+}
+
+void FindDialog::slotNotFound()
+{
+ fw->slotNotFound();
+}
+
+void FindDialog::slotWrapAround()
+{
+ fw->slotWrapAround();
+}
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 @@
+/**********************************************************************
+** Copyright (C) 2001 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef __FINDDIALOG_H__
+#define __FINDDIALOG_H__
+
+#include <qdatetime.h>
+#include <qdialog.h>
+
+class FindWidget;
+
+class FindDialogPrivate;
+class FindDialog : public QDialog
+{
+ Q_OBJECT
+public:
+ FindDialog( const QString &appName,
+ QWidget *parent = 0, const char *name = 0, bool modal = TRUE );
+ ~FindDialog();
+
+ QString findText() const;
+ void setUseDate( bool show );
+ void setDate( const QDate &dt );
+
+public slots:
+ void slotNotFound();
+ void slotWrapAround();
+
+signals:
+ void signalFindClicked( const QString &txt, bool caseSensitive,
+ bool backwards, int category );
+ void signalFindClicked( const QString &txt, const QDate &dt,
+ bool caseSensitive, bool backwards, int category );
+
+private:
+ FindWidget *fw;
+ FindDialogPrivate *d;
+};
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2001 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "findwidget_p.h"
+
+#include <qpe/categories.h>
+#include <qpe/categoryselect.h>
+#include <qpe/datebookmonth.h>
+#include <qpe/timestring.h>
+
+#include <qcheckbox.h>
+#include <qlabel.h>
+#include <qlineedit.h>
+#include <qmessagebox.h>
+#include <qpushbutton.h>
+#include <qpopupmenu.h>
+#include <qtoolbutton.h>
+
+FindWidget::FindWidget( const QString &appName, QWidget *parent,
+ const char *name )
+ : FindWidgetBase( parent, name ),
+ mStrApp( appName ),
+ mDate( QDate::currentDate() )
+{
+ setMaximumSize( sizeHint() );
+ QArray<int> vl(0);
+ cmbCat->setCategories( vl, mStrApp );
+ cmbCat->setRemoveCategoryEdit( TRUE );
+ cmbCat->setAllCategories( TRUE );
+ // hide junk for the moment...
+ lblStartDate->hide();
+ cmdStartDate->hide();
+ QPopupMenu *m1 = new QPopupMenu( this );
+ dtPicker = new DateBookMonth( m1, 0, TRUE );
+ dtPicker->setDate( mDate.year(), mDate.month(), mDate.day() );
+ m1->insertItem( dtPicker );
+ cmdStartDate->setPopup( m1 );
+ cmdStartDate->setText( TimeString::shortDate(mDate) );
+ QObject::connect( dtPicker, SIGNAL(dateClicked(int, int, int)),
+ this, SLOT(slotDateChanged(int, int, int)) );
+
+ QObject::connect( cmdFind, SIGNAL(clicked()),
+ this, SLOT(slotFindClicked()) );
+}
+
+FindWidget::~FindWidget()
+{
+}
+
+QString FindWidget::findText() const
+{
+ return txtFind->text();
+}
+
+void FindWidget::slotFindClicked()
+{
+ lblStatus->setText( "" );
+ if ( cmdStartDate->isVisible() )
+ emit signalFindClicked( findText(),
+ mDate,
+ chkCase->isChecked(),
+ chkBackwards->isChecked(),
+ cmbCat->currentCategory() );
+ else
+ emit signalFindClicked( findText(), chkCase->isChecked(),
+ chkBackwards->isChecked(),
+ cmbCat->currentCategory() );
+}
+
+void FindWidget::setUseDate( bool show )
+{
+ if ( show ) {
+ lblStartDate->show();
+ cmdStartDate->show();
+ } else {
+ lblStartDate->hide();
+ cmdStartDate->hide();
+ }
+ chkBackwards->setDisabled( show );
+}
+
+void FindWidget::setDate( const QDate &dt )
+{
+ slotDateChanged( dt.year(), dt.month(), dt.day() );
+}
+
+void FindWidget::slotNotFound()
+{
+ lblStatus->setText( tr("String Not Found.") );
+}
+
+void FindWidget::slotWrapAround()
+{
+ lblStatus->setText( tr("End reached, starting at beginning") );
+}
+
+void FindWidget::slotDateChanged( int year, int month, int day )
+{
+ mDate.setYMD( year, month, day );
+ cmdStartDate->setText( TimeString::shortDate( mDate ) );
+ dtPicker->setDate( year, month, day );
+}
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 @@
+/**********************************************************************
+** Copyright (C) 2001 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef __FINDWIDGET_H__
+#define __FINDWIDGET_H__
+
+#include "findwidgetbase_p.h"
+
+#include <qdatetime.h>
+
+class Categories;
+class DateBookMonth;
+
+class FindWidgetPrivate;
+class FindWidget : public FindWidgetBase
+{
+ Q_OBJECT
+public:
+ FindWidget( const QString &appName,
+ QWidget *parent = 0, const char *name = 0 );
+ ~FindWidget();
+
+ QString findText() const;
+ void setUseDate( bool show );
+ void setDate( const QDate &dt );
+
+public slots:
+ void slotNotFound();
+ void slotWrapAround();
+ void slotDateChanged( int year, int month, int day );
+
+signals:
+ void signalFindClicked( const QString &txt, bool caseSensitive,
+ bool backwards, int category );
+ void signalFindClicked( const QString &txt, const QDate &dt,
+ bool caseSensitive, bool backwards, int category );
+
+private slots:
+ void slotFindClicked();
+
+private:
+ QString mStrApp;
+ Categories *mpCat;
+ DateBookMonth *dtPicker;
+ QDate mDate;
+};
+
+#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 @@
+<!DOCTYPE UI><UI>
+<class>FindWidgetBase</class>
+<widget>
+ <class>QWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>FindWidgetBase</cstring>
+ </property>
+ <property stdset="1">
+ <name>geometry</name>
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>245</width>
+ <height>183</height>
+ </rect>
+ </property>
+ <property stdset="1">
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>1</vsizetype>
+ </sizepolicy>
+ </property>
+ <property stdset="1">
+ <name>caption</name>
+ <string>Find</string>
+ </property>
+ <property>
+ <name>layoutMargin</name>
+ </property>
+ <property>
+ <name>layoutSpacing</name>
+ </property>
+ <vbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>0</number>
+ </property>
+ <widget>
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout1</cstring>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>lblFindWhat</cstring>
+ </property>
+ <property stdset="1">
+ <name>frameShape</name>
+ <enum>MShape</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>MShadow</enum>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Find what:</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QLineEdit</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>txtFind</cstring>
+ </property>
+ </widget>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>cmdFind</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&amp;Find</string>
+ </property>
+ <property stdset="1">
+ <name>default</name>
+ <bool>true</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget>
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout2</cstring>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>lblCategory</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Category:</string>
+ </property>
+ </widget>
+ <widget>
+ <class>CategorySelect</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>cmbCat</cstring>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget>
+ <class>QFrame</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Frame3</cstring>
+ </property>
+ <property stdset="1">
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>1</vsizetype>
+ </sizepolicy>
+ </property>
+ <property stdset="1">
+ <name>frameShape</name>
+ <enum>NoFrame</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>Raised</enum>
+ </property>
+ <property>
+ <name>layoutMargin</name>
+ </property>
+ <property>
+ <name>layoutSpacing</name>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>0</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>lblStartDate</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Start Search at:</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>cmdStartDate</cstring>
+ </property>
+ <property stdset="1">
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>1</vsizetype>
+ </sizepolicy>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Dec 02 01</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget>
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>chkCase</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Case Sensitive</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>chkBackwards</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Search Backwards</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>lblStatus</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string></string>
+ </property>
+ </widget>
+ </vbox>
+</widget>
+<customwidgets>
+ <customwidget>
+ <class>CategorySelect</class>
+ <header location="global">qpe/categoryselect.h</header>
+ <sizehint>
+ <width>-1</width>
+ <height>-1</height>
+ </sizehint>
+ <container>0</container>
+ <sizepolicy>
+ <hordata>7</hordata>
+ <verdata>1</verdata>
+ </sizepolicy>
+ <pixmap>image0</pixmap>
+ </customwidget>
+</customwidgets>
+<images>
+ <image>
+ <name>image0</name>
+ <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
+ </image>
+</images>
+</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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "qpeapplication.h"
+#include "fontfactoryinterface.h"
+#include "fontdatabase.h"
+
+#include <qpe/qlibrary.h>
+
+#include <qfontmanager_qws.h>
+#include <qdir.h>
+#include <qdict.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+static QString fontDir()
+{
+ QString qtdir = getenv("QTDIR");
+ if ( qtdir.isEmpty() ) qtdir = "/usr/local/qt-embedded";
+ return qtdir+"/lib/fonts/";
+}
+
+#ifdef QT_NO_FONTDATABASE
+static QString fontFamily( const QString& key )
+{
+ int u0 = key.find('_');
+ int u1 = key.find('_',u0+1);
+ int u2 = key.find('_',u1+1);
+ QString family = key.left(u0);
+ //int pointSize = key.mid(u0+1,u1-u0-1).toInt();
+ //int weight = key.mid(u1+1,u2-u1-1).toInt();
+ //bool italic = key.mid(u2-1,1) == "i";
+ // #### ignores _t and _I fields
+ return family;
+}
+#endif
+
+QValueList<FontFactory> *FontDatabase::factoryList = 0;
+
+/*!
+ \class FontDatabase fontdatabase.h
+ \brief The FontDatabase class provides information about available fonts.
+
+ Provides information about available fonts.
+
+ FontDatabase provides information about the available fonts of the
+ underlying window system.
+
+ Most often you will simply want to query the database for all font
+ families(), and their respective pointSizes(), styles() and charSets().
+
+ Use FontDatabase rather than QFontDatabase when you may need access to
+ fonts not normally available. For example, if the freetype library and
+ Qtopia freetype plugin are installed TrueType fonts will be available
+ to your application. Font renderer plugins have greater resource
+ requirements than the system fonts so they should be used only when
+ necessary.
+*/
+
+/*!
+ Constructs the FontDatabase class.
+*/
+FontDatabase::FontDatabase()
+#ifndef QT_NO_FONTDATABASE
+ : QFontDatabase()
+#endif
+{
+ if ( !factoryList )
+ loadRenderers();
+}
+
+/*!
+ Returns a list of names of all available font families.
+*/
+QStringList FontDatabase::families() const
+{
+#ifndef QT_NO_FONTDATABASE
+ return QFontDatabase::families();
+#else
+ QStringList list;
+ QDict<void> familyDict;
+ QDiskFont *qdf;
+ for ( qdf=qt_fontmanager->diskfonts.first(); qdf!=0;
+ qdf=qt_fontmanager->diskfonts.next()) {
+ QString familyname = qdf->name;
+ if ( !familyDict.find( familyname ) ) {
+ familyDict.insert( familyname, (void *)1 );
+ list.append( familyname );
+ }
+ }
+
+ QDir dir(fontDir(),"*.qpf");
+ for (int i=0; i<(int)dir.count(); i++) {
+ QString familyname = fontFamily(dir[i]);
+ if ( !familyDict.find( familyname ) ) {
+ familyDict.insert( familyname, (void *)1 );
+ list.append( familyname );
+ }
+ }
+
+ return list;
+#endif
+}
+
+#ifdef QT_NO_FONTDATABASE
+/*!
+ Returns a list of standard fontsizes.
+*/
+QValueList<int> FontDatabase::standardSizes()
+{
+ static int s[]={ 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28,
+ 36, 48, 72, 0 };
+ static bool first = TRUE;
+ static QValueList<int> sList;
+ if ( first ) {
+ first = FALSE;
+ int i = 0;
+ while( s[i] )
+ sList.append( s[i++] );
+ }
+ return sList;
+}
+
+#endif
+
+/*!
+ Load any font renderer plugins that are available and make fonts that
+ the plugins can read available.
+*/
+void FontDatabase::loadRenderers()
+{
+#ifndef QT_NO_COMPONENT
+ if ( !factoryList )
+ factoryList = new QValueList<FontFactory>;
+
+ QValueList<FontFactory>::Iterator mit;
+ for ( mit = factoryList->begin(); mit != factoryList->end(); ++mit ) {
+ qt_fontmanager->factories.setAutoDelete( false );
+ qt_fontmanager->factories.removeRef( (*mit).factory );
+ qt_fontmanager->factories.setAutoDelete( true );
+ (*mit).interface->release();
+ (*mit).library->unload();
+ delete (*mit).library;
+ }
+ factoryList->clear();
+
+ QString path = QPEApplication::qpeDir() + "/plugins/fontfactories";
+ QDir dir( path, "lib*.so" );
+ QStringList list = dir.entryList();
+ QStringList::Iterator it;
+ for ( it = list.begin(); it != list.end(); ++it ) {
+ FontFactoryInterface *iface = 0;
+ QLibrary *lib = new QLibrary( path + "/" + *it );
+ if ( lib->queryInterface( IID_FontFactory, (QUnknownInterface**)&iface ) == QS_OK ) {
+ FontFactory factory;
+ factory.library = lib;
+ factory.interface = iface;
+ factory.factory = factory.interface->fontFactory();
+ factoryList->append( factory );
+ qt_fontmanager->factories.append( factory.factory );
+ readFonts( factory.factory );
+ } else {
+ delete lib;
+ }
+ }
+#endif
+}
+
+/*!
+ \internal
+*/
+void FontDatabase::readFonts( QFontFactory *factory )
+{
+
+ // Load in font definition file
+ QString fn = fontDir() + "fontdir";
+ FILE* fontdef=fopen(fn.local8Bit(),"r");
+ if(!fontdef) {
+ QCString temp=fn.local8Bit();
+ qWarning("Cannot find font definition file %s - is $QTDIR set correctly?",
+ temp.data());
+ return;
+ }
+ char buf[200]="";
+ char name[200]="";
+ char render[200]="";
+ char file[200]="";
+ char flags[200]="";
+ char isitalic[10]="";
+ fgets(buf,200,fontdef);
+ while(!feof(fontdef)) {
+ if ( buf[0] != '#' ) {
+ int weight=50;
+ int size=0;
+ flags[0]=0;
+ sscanf(buf,"%s %s %s %s %d %d %s",name,file,render,isitalic,&weight,&size,flags);
+ QString filename;
+ if ( file[0] != '/' )
+ filename = fontDir();
+ filename += file;
+ if ( QFile::exists(filename) ) {
+ if( factory->name() == render ) {
+ QDiskFont * qdf=new QDiskFont(factory,name,isitalic[0]=='y',
+ weight,size,flags,filename);
+ qt_fontmanager->diskfonts.append(qdf);
+#ifndef QT_NO_FONTDATABASE
+#if QT_VERSION >= 232
+ QFontDatabase::qwsAddDiskFont( qdf );
+#endif
+#endif
+ }
+ }
+ }
+ fgets(buf,200,fontdef);
+ }
+ fclose(fontdef);
+}
+
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef FONTFACTORY_H
+#define FONTFACTORY_H
+
+#include <qpe/fontfactoryinterface.h>
+
+#include <qfontdatabase.h>
+#include <qvaluelist.h>
+
+class QLibrary;
+
+struct FontFactory
+{
+#ifndef QT_NO_COMPONENT
+ QLibrary *library;
+#endif
+ FontFactoryInterface *interface;
+ QFontFactory *factory;
+};
+
+class FontDatabase
+#ifndef QT_NO_FONTDATABASE
+ : public QFontDatabase
+#endif
+{
+public:
+ FontDatabase();
+
+ // minimal functionality
+ QStringList families () const;
+#ifdef QT_NO_FONTDATABASE
+ static QValueList<int> standardSizes ();
+#endif
+
+ static void loadRenderers();
+
+private:
+ static void readFonts( QFontFactory *factory );
+
+private:
+ static QValueList<FontFactory> *factoryList;
+};
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef FONTFACTORYINTERFACE_H
+#define FONTFACTORYINTERFACE_H
+
+#include <qnamespace.h>
+#include <qstring.h>
+#include <qpe/qcom.h>
+
+class QFontFactory;
+
+#ifndef QT_NO_COMPONENT
+// {7F194DD6-FAA3-498F-8F30-9C297A570DFA}
+#ifndef IID_FontFactory
+#define IID_FontFactory QUuid( 0x7f194dd6, 0xfaa3, 0x498f, 0x8f, 0x30, 0x9c, 0x29, 0x7a, 0x57, 0x0d, 0xfa)
+#endif
+#endif
+
+struct FontFactoryInterface : public QUnknownInterface
+{
+ virtual QFontFactory *fontFactory() = 0;
+};
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "fontmanager.h"
+#include <qfile.h>
+#include <stdlib.h>
+#include <qgfx_qws.h>
+
+
+
+/*
+ QFontInfo doesn't work in QWS at the moment,
+ otherwise we would just have used that to check
+ the real values
+
+ For now, there are only two Unicode fonts in
+ the known universe...
+
+*/
+
+bool FontManager::hasUnicodeFont()
+{
+ QString fontDir = getenv("QTDIR") + QString("/lib/fonts/");
+
+ QString suffix;
+ if ( qt_screen->isTransformed() ) {
+ suffix += "_t";
+ QPoint a = qt_screen->mapToDevice(QPoint(0,0),QSize(2,2));
+ QPoint b = qt_screen->mapToDevice(QPoint(1,1),QSize(2,2));
+ suffix += QString::number( a.x()*8+a.y()*4+(1-b.x())*2+(1-b.y()) );
+ }
+ suffix += ".qpf";
+
+ return QFile::exists( fontDir+"cyberbit_120_50"+suffix )
+ || QFile::exists( fontDir+"unifont_160_50"+suffix ) ||
+ QFile::exists( fontDir+"arial_140_50" + suffix );
+}
+
+QFont FontManager::unicodeFont( Spacing sp )
+{
+ QString key;
+ QString fontName;
+ QString fontDir = getenv("QTDIR") + QString("/lib/fonts/");
+
+ int size;
+ if ( sp == Proportional ) {
+ fontName = "Arial";
+ size=14;
+ key = "arial_140_50";
+ } else {
+ fontName = "Unifont";
+ size=16;
+ key = "unifont_160_50";
+ }
+
+ QString suffix;
+ if ( qt_screen->isTransformed() ) {
+ suffix += "_t";
+ QPoint a = qt_screen->mapToDevice(QPoint(0,0),QSize(2,2));
+ QPoint b = qt_screen->mapToDevice(QPoint(1,1),QSize(2,2));
+ suffix += QString::number( a.x()*8+a.y()*4+(1-b.x())*2+(1-b.y()) );
+ }
+ suffix += ".qpf";
+
+ // if we cannot find it, try the other one
+
+ if ( !QFile::exists(fontDir+key+suffix) ) {
+ key = (sp == Fixed ) ? "arial_140_50" : "unifont_160_50";
+ if ( QFile::exists(fontDir+key+suffix) ) {
+ fontName = (sp == Fixed) ? "Arial" : "Unifont";
+ size = (sp == Fixed) ? 14 : 16;
+ } else {
+ key = "cyberbit_120_50";
+ if ( QFile::exists(fontDir+key+suffix) ) {
+ fontName = "Cyberbit";
+ size = 12;
+ } else {
+ fontName = "Helvetica";
+ size = 14;
+ }
+ }
+ }
+ return QFont(fontName,size);
+}
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef FONTMANAGER_H
+#define FONTMANAGER_H
+
+#include <qfont.h>
+
+class FontManager
+{
+public:
+ enum Spacing { Fixed, Proportional };
+ static bool hasUnicodeFont();
+ static QFont unicodeFont( Spacing );
+
+};
+
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#include <qpe/qpedebug.h>
+#include <qpe/global.h>
+#include <qpe/qdawg.h>
+#include <qpe/qpeapplication.h>
+#include <qpe/resource.h>
+#include <qpe/storage.h>
+#include <qpe/applnk.h>
+#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
+#include "qpe/qcopenvelope_qws.h"
+#endif
+
+#include <qfile.h>
+#include <qlabel.h>
+#include <qtimer.h>
+#include <qmap.h>
+#include <qdict.h>
+#include <qdir.h>
+#include <qmessagebox.h>
+#include <qregexp.h>
+
+#include <stdlib.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include <qwindowsystem_qws.h> // for qwsServer
+#include <qdatetime.h>
+
+//#include "quickexec_p.h"
+
+class Emitter : public QObject {
+ Q_OBJECT
+public:
+ Emitter( QWidget* receiver, const QString& document )
+ {
+ connect(this, SIGNAL(setDocument(const QString&)),
+ receiver, SLOT(setDocument(const QString&)));
+ emit setDocument(document);
+ disconnect(this, SIGNAL(setDocument(const QString&)),
+ receiver, SLOT(setDocument(const QString&)));
+ }
+
+signals:
+ void setDocument(const QString&);
+};
+
+
+class StartingAppList : public QObject {
+ Q_OBJECT
+public:
+ static void add( const QString& name );
+ static bool isStarting( const QString name );
+private slots:
+ void handleNewChannel( const QString &);
+private:
+ StartingAppList( QObject *parent=0, const char* name=0 ) ;
+
+ QDict<QTime> dict;
+ static StartingAppList *appl;
+};
+
+StartingAppList* StartingAppList::appl = 0;
+
+StartingAppList::StartingAppList( QObject *parent, const char* name )
+ :QObject( parent, name )
+{
+#if QT_VERSION >= 232 && !defined(QT_NO_COP)
+ connect( qwsServer, SIGNAL( newChannel(const QString&)),
+ this, SLOT( handleNewChannel(const QString&)) );
+ dict.setAutoDelete( TRUE );
+#endif
+}
+
+void StartingAppList::add( const QString& name )
+{
+#if QT_VERSION >= 232 && !defined(QT_NO_COP)
+ if ( !appl )
+ appl = new StartingAppList;
+ QTime *t = new QTime;
+ t->start();
+ appl->dict.insert( "QPE/Application/" + name, t );
+#endif
+}
+
+bool StartingAppList::isStarting( const QString name )
+{
+#if QT_VERSION >= 232 && !defined(QT_NO_COP)
+ if ( appl ) {
+ QTime *t = appl->dict.find( "QPE/Application/" + name );
+ if ( !t )
+ return FALSE;
+ if ( t->elapsed() > 10000 ) {
+ // timeout in case of crash or something
+ appl->dict.remove( "QPE/Application/" + name );
+ return FALSE;
+ }
+ return TRUE;
+ }
+#endif
+ return FALSE;
+}
+
+void StartingAppList::handleNewChannel( const QString & name )
+{
+#if QT_VERSION >= 232 && !defined(QT_NO_COP)
+ dict.remove( name );
+#endif
+}
+
+static bool docDirCreated = FALSE;
+static QDawg* fixed_dawg = 0;
+static QDict<QDawg> *named_dawg = 0;
+
+static QString qpeDir()
+{
+ QString dir = getenv("QPEDIR");
+ if ( dir.isEmpty() ) dir = "..";
+ return dir;
+}
+
+static QString dictDir()
+{
+ return qpeDir() + "/etc/dict";
+}
+
+/*!
+ \class Global global.h
+ \brief The Global class collects application-wide global functions.
+*/
+
+/*!
+ \internal
+*/
+Global::Global()
+{
+}
+
+/*!
+ Returns the unchangeable QDawg that contains general
+ words for the current locale.
+
+ \sa addedDawg()
+*/
+const QDawg& Global::fixedDawg()
+{
+ if ( !fixed_dawg ) {
+ if ( !docDirCreated )
+ createDocDir();
+
+ fixed_dawg = new QDawg;
+ QString dawgfilename = dictDir() + "/dawg";
+ QString lang = getenv( "LANG" );
+ QString dawgfilename_lang = dawgfilename + "." + lang;
+ QString words_lang = dictDir() + "/words." + lang;
+ if ( QFile::exists(dawgfilename_lang) ||
+ QFile::exists(words_lang) )
+ dawgfilename = dawgfilename_lang;
+ QFile dawgfile(dawgfilename);
+
+ if ( !dawgfile.exists() ) {
+ QString fn = dictDir() + "/words";
+ if ( QFile::exists(words_lang) )
+ fn = words_lang;
+ QFile in(fn);
+ if ( in.open(IO_ReadOnly) ) {
+ fixed_dawg->createFromWords(&in);
+ dawgfile.open(IO_WriteOnly);
+ fixed_dawg->write(&dawgfile);
+ dawgfile.close();
+ }
+ } else {
+ fixed_dawg->readFile(dawgfilename);
+ }
+ }
+
+ return *fixed_dawg;
+}
+
+/*!
+ Returns the changeable QDawg that contains general
+ words for the current locale.
+
+ \sa fixedDawg()
+*/
+const QDawg& Global::addedDawg()
+{
+ return dawg("local");
+}
+
+/*!
+ Returns the QDawg with the given \a name.
+ This is an application-specific word list.
+
+ \a name should not contain "/".
+*/
+const QDawg& Global::dawg(const QString& name)
+{
+ createDocDir();
+ if ( !named_dawg )
+ named_dawg = new QDict<QDawg>;
+ QDawg* r = named_dawg->find(name);
+ if ( !r ) {
+ r = new QDawg;
+ named_dawg->insert(name,r);
+ QString dawgfilename = dictDir() + "/" + name + ".dawg";
+ QFile dawgfile(dawgfilename);
+ if ( dawgfile.open(IO_ReadOnly) )
+ r->readFile(dawgfilename);
+ }
+ return *r;
+}
+
+/*!
+ Adds \a wordlist to the addedDawg().
+*/
+void Global::addWords(const QStringList& wordlist)
+{
+ addWords("local",wordlist);
+}
+
+/*!
+ Adds \a wordlist to the dawg() named \a dictname.
+*/
+void Global::addWords(const QString& dictname, const QStringList& wordlist)
+{
+ QDawg& d = (QDawg&)dawg(dictname);
+ QStringList all = d.allWords() + wordlist;
+ d.createFromWords(all);
+
+ QString dawgfilename = dictDir() + "/" + dictname + ".dawg";
+ QFile dawgfile(dawgfilename);
+ if ( dawgfile.open(IO_WriteOnly) ) {
+ d.write(&dawgfile);
+ dawgfile.close();
+ }
+
+ // #### Re-read the dawg here if we use mmap().
+
+ // #### Signal other processes to re-read.
+}
+
+
+/*!
+ Returns a full path for the application named \a appname, with the
+ given \a filename or QString::null if there was a problem creating
+ the directory tree for \a appname.
+ If \a filename contains "/", it is the caller's responsibility to
+ ensure those directories exist.
+*/
+QString Global::applicationFileName(const QString& appname, const QString& filename)
+{
+ QDir d;
+ QString r = getenv("HOME");
+ r += "/Applications/";
+ if ( !QFile::exists( r ) )
+ if ( d.mkdir(r) == false )
+ return QString::null;
+ r += appname;
+ if ( !QFile::exists( r ) )
+ if ( d.mkdir(r) == false )
+ return QString::null;
+ r += "/"; r += filename;
+ return r;
+}
+
+/*!
+ \internal
+*/
+void Global::createDocDir()
+{
+ if ( !docDirCreated ) {
+ docDirCreated = TRUE;
+ mkdir( QPEApplication::documentDir().latin1(), 0755 );
+ }
+}
+
+
+/*!
+ Displays a status \a message to the user. This generally appears
+ in the taskbar for some amount of time, then disappears.
+*/
+void Global::statusMessage(const QString& message)
+{
+#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
+ QCopEnvelope e( "QPE/TaskBar", "message(QString)" );
+ e << message;
+#endif
+}
+
+/*!
+ \internal
+*/
+void Global::applyStyle()
+{
+#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
+ QCopChannel::send( "QPE/System", "applyStyle()" );
+#else
+ ((QPEApplication *)qApp)->applyStyle(); // apply without needing QCop for floppy version
+#endif
+}
+
+/*!
+ \internal
+*/
+QWidget *Global::shutdown( bool )
+{
+#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
+ QCopChannel::send( "QPE/System", "shutdown()" );
+#endif
+ return 0;
+}
+
+/*!
+ \internal
+*/
+QWidget *Global::restart( bool )
+{
+#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
+ QCopChannel::send( "QPE/System", "restart()" );
+#endif
+ return 0;
+}
+
+/*!
+ Explicitly show the current input method.
+*/
+void Global::showInputMethod()
+{
+#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
+ QCopChannel::send( "QPE/TaskBar", "showInputMethod()" );
+#endif
+}
+
+/*!
+ Explicitly hide the current input method.
+*/
+void Global::hideInputMethod()
+{
+#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
+ QCopChannel::send( "QPE/TaskBar", "hideInputMethod()" );
+#endif
+}
+
+
+/*!
+ \internal
+*/
+bool Global::isBuiltinCommand( const QString &name )
+{
+ if(!builtin)
+ return FALSE; // yes, it can happen
+ for (int i = 0; builtin[i].file; i++) {
+ if ( builtin[i].file == name ) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+Global::Command* Global::builtin=0;
+QGuardedPtr<QWidget> *Global::running=0;
+
+/*!
+ \class Global::Command
+ \brief The Global::Command class is internal.
+ \internal
+*/
+
+/*!
+ \internal
+*/
+void Global::setBuiltinCommands( Command* list )
+{
+ if ( running )
+ delete [] running;
+
+ builtin = list;
+ int count = 0;
+ if (!builtin)
+ return;
+ while ( builtin[count].file )
+ count++;
+
+ running = new QGuardedPtr<QWidget> [ count ];
+}
+
+/*!
+ \internal
+*/
+void Global::setDocument( QWidget* receiver, const QString& document )
+{
+ Emitter emitter(receiver,document);
+}
+
+/*!
+ \internal
+*/
+bool Global::terminateBuiltin( const QString& n )
+{
+ if (!builtin)
+ return FALSE;
+ for (int i = 0; builtin[i].file; i++) {
+ if ( builtin[i].file == n ) {
+ delete running[i];
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+/*!
+ \internal
+*/
+void Global::terminate( const AppLnk* app )
+{
+ //if ( terminateBuiltin(app->exec()) ) return; // maybe? haven't tried this
+
+ QCString channel = "QPE/Application/" + app->exec().utf8();
+ if ( QCopChannel::isRegistered(channel) ) {
+ QCopEnvelope e(channel, "quit()");
+ }
+}
+
+/*!
+ Low-level function to run command \a c. Not recommended.
+*/
+void Global::invoke(const QString &c)
+{
+ // Convert the command line in to a list of arguments
+ QStringList list = QStringList::split(QRegExp(" *"),c);
+
+#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
+ QString ap=list[0];
+ // see if the application is already running
+ // XXX should lock file /tmp/qcop-msg-ap
+ if ( QCopChannel::isRegistered( ("QPE/Application/" + ap).latin1() ) ) {
+ QCopEnvelope e("QPE/System", "notBusy(QString)" );
+ e << ap;
+ return;
+ }
+ // XXX should unlock file /tmp/qcop-msg-ap
+ //see if it is being started
+ if ( StartingAppList::isStarting( ap ) ) {
+ QCopEnvelope e("QPE/System", "notBusy(QString)" );
+ e << ap;
+ return;
+ }
+
+#endif
+
+#ifdef QT_NO_QWS_MULTIPROCESS
+ QMessageBox::warning( 0, "Error", "Could not find the application " + c, "Ok", 0, 0, 0, 1 );
+#else
+
+ QStrList slist;
+ unsigned int j;
+ for ( j = 0; j < list.count(); j++ )
+ slist.append( list[j].utf8() );
+
+ const char **args = new (const char *)[slist.count() + 1];
+ for ( j = 0; j < slist.count(); j++ )
+ args[j] = slist.at(j);
+ args[j] = NULL;
+
+#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
+ // an attempt to show a wait...
+ // more logic should be used, but this will be fine for the moment...
+ QCopEnvelope ( "QPE/System", "busy()" );
+#endif
+
+#ifdef HAVE_QUICKEXEC
+ QString libexe = qpeDir()+"/binlib/lib"+args[0] + ".so";
+ qDebug("libfile = %s", libexe.latin1() );
+ if ( QFile::exists( libexe ) ) {
+ qDebug("calling quickexec %s", libexe.latin1() );
+ quickexecv( libexe.utf8().data(), (const char **)args );
+ } else
+#endif
+ {
+ if ( !::vfork() ) {
+ for ( int fd = 3; fd < 100; fd++ )
+ ::close( fd );
+ ::setpgid( ::getpid(), ::getppid() );
+ // Try bindir first, so that foo/bar works too
+ ::execv( qpeDir()+"/bin/"+args[0], (char * const *)args );
+ ::execvp( args[0], (char * const *)args );
+ exit( -1 );
+ }
+ }
+ StartingAppList::add( list[0] );
+#endif //QT_NO_QWS_MULTIPROCESS
+}
+
+/*!
+ Executes application identfied by \a c, passing \a document.
+
+ Note that you might be better off sending a QCop message to
+ the application's QPE/Application/<i>appname</i> channel.
+*/
+void Global::execute( const QString &c, const QString& document )
+{
+ if ( qApp->type() != QApplication::GuiServer ) {
+ // ask the server to do the work
+#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
+ if ( document.isNull() ) {
+ QCopEnvelope e( "QPE/System", "execute(QString)" );
+ e << c;
+ } else {
+ QCopEnvelope e( "QPE/System", "execute(QString,QString)" );
+ e << c << document;
+ }
+#endif
+ return;
+ }
+
+ // Attempt to execute the app using a builtin class for the app first
+ // else try and find it in the bin directory
+ if (builtin) {
+ for (int i = 0; builtin[i].file; i++) {
+ if ( builtin[i].file == c ) {
+ if ( running[i] ) {
+ if ( !document.isNull() && builtin[i].documentary )
+ setDocument(running[i], document);
+ running[i]->raise();
+ running[i]->show();
+ running[i]->setActiveWindow();
+ } else {
+ running[i] = builtin[i].func( builtin[i].maximized );
+ }
+ QCopEnvelope e("QPE/System", "notBusy(QString)" );
+ e << c; // that was quick ;-)
+ return;
+ }
+ }
+ }
+
+ //Global::invoke(c, document);
+
+ // Convert the command line in to a list of arguments
+ QStringList list = QStringList::split(QRegExp(" *"),c);
+
+#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
+ QString ap=list[0];
+
+ qDebug("executing %s", ap.latin1() );
+ if ( ap == "suspend" ) {
+ QWSServer::sendKeyEvent( 0xffff, Qt::Key_F34, FALSE, TRUE, FALSE );
+ return;
+ }
+
+ /* if need be, sending a qcop message will result in an invoke, see
+ preceeding function */
+ { QCopEnvelope env( ("QPE/Application/" + ap).latin1(), "raise()" ); }
+ if ( !document.isEmpty() ) {
+ QCopEnvelope env( ("QPE/Application/" + ap).latin1(), "setDocument(QString)" );
+ env << document;
+ }
+#endif
+}
+
+/*!
+ Returns the string \a s with the characters backslash, ", and $
+ quoted by a preceeding backslash.
+*/
+QString Global::shellQuote(const QString& s)
+{
+ QString r="\"";
+ for (int i=0; i<(int)s.length(); i++) {
+ char c = s[i].latin1();
+ switch (c) {
+ case '\\': case '"': case '$':
+ r+="\\";
+ }
+ r += s[i];
+ }
+ r += "\"";
+ return r;
+}
+
+/*!
+ Returns the string \a s with the characters backslash and "
+ quoted by a preceeding backslash.
+*/
+QString Global::stringQuote(const QString& s)
+{
+ QString r="\"";
+ for (int i=0; i<(int)s.length(); i++) {
+ char c = s[i].latin1();
+ switch (c) {
+ case '\\': case '"':
+ r+="\\";
+ }
+ r += s[i];
+ }
+ r += "\"";
+ return r;
+}
+
+/*!
+ Finds all documents on the system's document directories which
+ match the filter \a mimefilter, and appends the resulting DocLnk
+ objects to \a folder.
+*/
+void Global::findDocuments(DocLnkSet* folder, const QString &mimefilter)
+{
+ QString homedocs = QString(getenv("HOME")) + "/Documents";
+ DocLnkSet d(homedocs,mimefilter);
+ folder->appendFrom(d);
+ StorageInfo storage;
+ const QList<FileSystem> &fs = storage.fileSystems();
+ QListIterator<FileSystem> it ( fs );
+ for ( ; it.current(); ++it ) {
+ if ( (*it)->isRemovable() ) {
+ QString path = (*it)->path();
+ DocLnkSet ide( path, mimefilter );
+ folder->appendFrom(ide);
+ }
+ }
+}
+
+
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef GLOBAL_H
+#define GLOBAL_H
+
+#include <qstringlist.h>
+#include <qguardedptr.h>
+class QDawg;
+class QLabel;
+class QWidget;
+class AppLnk;
+class DocLnkSet;
+
+class Global
+{
+public:
+ Global();
+
+ // Dictionaries
+ static const QDawg& fixedDawg();
+ static const QDawg& addedDawg();
+ static const QDawg& dawg(const QString& name);
+
+ static void addWords(const QStringList& word);
+ static void addWords(const QString& dictname, const QStringList& word);
+ // static void removeWords(const QStringList& word); -- if someone wants it
+
+ static void createDocDir();
+
+ static void findDocuments(DocLnkSet* folder, const QString &mimefilter=QString::null);
+
+ static QString applicationFileName(const QString& appname, const QString& filename);
+
+ struct Command {
+ const char *file;
+ QWidget *(*func)( bool );
+ bool maximized;
+ bool documentary;
+ };
+ static void setBuiltinCommands( Command* );
+
+ static void invoke( const QString &exec);
+ static void execute( const QString &exec, const QString &document=QString::null );
+ static void setDocument( QWidget* receiver, const QString& document );
+ static bool terminateBuiltin( const QString& );
+ static void terminate( const AppLnk* );
+
+ static bool isBuiltinCommand( const QString &name );
+
+ // system messaging
+ static void applyStyle();
+ static void statusMessage(const QString&);
+ static QWidget *shutdown( bool = FALSE );
+ static QWidget *restart( bool = FALSE );
+ static void hideInputMethod();
+ static void showInputMethod();
+
+ static void writeHWClock();
+
+ static QString shellQuote(const QString& s);
+ static QString stringQuote(const QString& s);
+
+private:
+ static Command* builtin;
+ static QGuardedPtr<QWidget> *running;
+};
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#include "imageedit.h"
+#include <qpainter.h>
+
+ImageEdit::ImageEdit( QWidget *parent = 0, const char *name = 0 )
+ : QScrollView( parent, name, WNorthWestGravity | WResizeNoErase ), buffer()
+{
+ buffer.resize( size() );
+ buffer.fill( colorGroup().color( QColorGroup::Base ) );
+}
+
+ImageEdit::~ImageEdit()
+{
+
+}
+
+void ImageEdit::contentsMousePressEvent( QMouseEvent *e )
+{
+ lastPos = e->pos();
+}
+
+void ImageEdit::contentsMouseMoveEvent( QMouseEvent *e )
+{
+ QPainter pw( viewport() );
+ QPainter pb( &buffer );
+ pb.drawLine( lastPos, e->pos() );
+ pw.drawLine( contentsToViewport( lastPos ),
+ contentsToViewport( e->pos() ) );
+ lastPos = e->pos();
+}
+
+void ImageEdit::contentsMouseReleaseEvent( QMouseEvent * )
+{
+}
+
+void ImageEdit::viewportResizeEvent( QResizeEvent *e )
+{
+ enlargeBuffer(e->size());
+}
+
+void ImageEdit::enlargeBuffer( const QSize& sz )
+{
+ QSize osz = buffer.size();
+ QSize nsz( QMAX( osz.width(), sz.width() ), QMAX( osz.height(), sz.height() ) );
+ buffer.resize( nsz.width(), nsz.height() );
+ // clear new area
+ QPainter p( &buffer );
+ if ( sz.width() > osz.width() )
+ p.fillRect( osz.width(), 0, sz.width() - osz.width(), nsz.height(), colorGroup().color( QColorGroup::Base ) );
+ if ( sz.height() > osz.height() )
+ p.fillRect( 0, osz.height(), nsz.width(), sz.height() - osz.height(), colorGroup().color( QColorGroup::Base ) );
+ p.end();
+}
+
+void ImageEdit::drawContents( QPainter *p, int cx, int cy, int cw, int ch )
+{
+ p->drawPixmap( cx, cy, buffer, cx, cy, cw, ch );
+}
+
+void ImageEdit::setPixmap( const QPixmap &pm )
+{
+ QSize osz = buffer.size();
+ if ( pm.width() < osz.width() || pm.height() < osz.height() ) {
+ buffer.fill(white);
+ enlargeBuffer( pm.size() );
+ QPainter p(&buffer);
+ p.drawPixmap(0,0,pm);
+ } else {
+ buffer = pm;
+ }
+ resizeContents( buffer.width(), buffer.height() );
+ viewport()->repaint( FALSE );
+}
+
+QPixmap ImageEdit::pixmap() const
+{
+ return buffer;
+}
+
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef IMAGEEDIT_H
+#define IMAGEEDIT_H
+
+#include <qscrollview.h>
+#include <qpixmap.h>
+
+class ImageEditPrivate;
+class ImageEdit : public QScrollView
+{
+ Q_OBJECT
+
+public:
+ ImageEdit( QWidget *parent = 0, const char *name = 0 );
+ ~ImageEdit();
+
+ void setPixmap( const QPixmap &pm );
+ QPixmap pixmap() const;
+
+protected:
+ void drawContents( QPainter *p, int cx, int cy, int cw, int ch );
+ void contentsMousePressEvent( QMouseEvent *e );
+ void contentsMouseMoveEvent( QMouseEvent *e );
+ void contentsMouseReleaseEvent( QMouseEvent *e );
+ void viewportResizeEvent( QResizeEvent *e );
+
+private:
+ QPoint lastPos;
+ QPixmap buffer;
+ ImageEditPrivate *d;
+ void enlargeBuffer( const QSize& sz );
+};
+
+#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 @@
+/* Generated by qembed */
+#ifndef _2110060599
+#define _2110060599
+#include <qimage.h>
+#include <stdlib.h>
+static const QRgb _to1_data[] = {
+ 0x2000000,0x5000000,0x9000000,0xd000000,0x11000000,0x12000000,0xe000000,0xc000000,0xc000000,0xc000000,0xd000000,0x11000000,0x12000000,0xe000000,
+ 0x6000000,0xf000000,0x1d000000,0x3a000000,0x4c000000,0x39000000,0x21000000,0x1c000000,0x1c000000,0x22000000,0x3a000000,0x4c000000,0x39000000,0x1f000000,
+ 0x10000000,0x25000000,0x51000000,0xb46b6b6b,0xffffffff,0x76000000,0x42000000,0x3b000000,0x3e000000,0x5b000000,0xb46b6b6b,0xffffffff,0x72000000,0x38000000,
+ 0x1e000000,0x54000000,0xbc676767,0xffffffff,0xffffffff,0xa6000000,0x6d000000,0x65000000,0x7a000000,0xc4646464,0xffffffff,0xffffffff,0x9d000000,0x57000000,
+ 0x45000000,0xb56b6b6b,0xffffffff,0xffffffff,0xffffffff,0xcf000000,0xaa000000,0xa3000000,0xce606060,0xffffffff,0xffffffff,0xffffffff,0xb8000000,0x74000000,
+ 0x88878787,0xffffffff,0xf4a7a7a7,0xffffffff,0xffffffff,0xf2535353,0xffffffff,0xdc5b5b5b,0xffffffff,0xf7a5a5a5,0xffffffff,0xffffffff,0xcd000000,0x8a000000,
+ 0x48000000,0x84000000,0xc6000000,0xffffffff,0xffffffff,0xfa515151,0xf9cfcfcf,0xd5000000,0xcd000000,0xdd000000,0xffffffff,0xffffffff,0xd9000000,0x97000000,
+ 0x2c000000,0x5e000000,0xb1000000,0xffffffff,0xffffffff,0xf8000000,0xdc000000,0xcc000000,0xc3000000,0xd3000000,0xffffffff,0xffffffff,0xdb000000,0x9a000000,
+ 0x25000000,0x53000000,0xa7000000,0xffffffff,0xffffffff,0xf0000000,0xd2000000,0xc2000000,0xb6000000,0xc8000000,0xffffffff,0xffffffff,0xd3000000,0x92000000,
+ 0x1d000000,0x44000000,0x99000000,0xffffffff,0xffffffff,0xf1545454,0xf5d1d1d1,0xbc000000,0xa3000000,0xba000000,0xffffffff,0xffffffff,0xc4000000,0x83000000,
+ 0x14000000,0x34000000,0x7d000000,0xffffffff,0xffffffff,0xe5585858,0xffffffff,0xab000000,0x8c000000,0x9e000000,0xffffffff,0xffffffff,0xa8000000,0x6e000000,
+ 0xc000000,0x25000000,0x4d000000,0x84000000,0xa0000000,0xa2000000,0x92000000,0x7f000000,0x6c000000,0x6f000000,0x88000000,0x94000000,0x79000000,0x56000000,
+ 0x8000000,0x18000000,0x2a000000,0x41000000,0x58000000,0x5e000000,0x55000000,0x50000000,0x4a000000,0x43000000,0x45000000,0x4e000000,0x49000000,0x39000000,
+ 0x5000000,0xf000000,0x19000000,0x28000000,0x36000000,0x3b000000,0x36000000,0x34000000,0x2f000000,0x2a000000,0x2b000000,0x30000000,0x2c000000,0x22000000
+};
+
+static const QRgb AddressBook_data[] = {
+ 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
+ 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
+ 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff040437,0xff040437,0xff040437,0xff040434,
+ 0xff04042f,0xff030327,0xff05043c,0xff070565,0xff0a068a,0xff0a068a,0xff080574,0xff07055c,0xff06044c,0xff06044b,0xff05044a,0xff080569,0xff090682,0xff0a068a,
+ 0xff0a068a,0xff080567,0xff03032c,0xff01030b,0xff010309,0xff010307,0xff010303,0xff010300,0xff010300,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
+ 0xff040437,0xff70b365,0xff67a75d,0xff58904e,0xff678f61,0xffc8d4c6,0xffffffff,0xffffffff,0xffa3b8a0,0xff5b8854,0xff4a8342,0xff4c8a42,0xff4a8b3f,0xff46893b,
+ 0xff408434,0xff387c2d,0xff2c6e22,0xff789b72,0xffeff3ef,0xffffffff,0xffffffff,0xff7fa07a,0xff166c09,0xff157e04,0xff148400,0xff138100,0xff010300,0x5c000000,
+ 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff040436,0xff65a45b,0xff518849,0xff94ad91,0xffffffff,0xffffffff,0xffc8d3c6,0xff5b8754,0xff548d4b,0xff5d9d53,
+ 0xff60a454,0xff5da551,0xff57a24a,0xff509f43,0xff4b9d3d,0xff429735,0xff378c29,0xff2a781d,0xff2a6720,0xffd1dad0,0xffffffff,0xffffffff,0xff6c9466,0xff0f6a00,
+ 0xff127a00,0xff127c00,0xff010300,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff040431,0xff4f8547,0xffaebfac,0xffffffff,0xffffffff,0xffaebfab,
+ 0xff4c8244,0xff5e9b54,0xff67a95c,0xff68ae5d,0xff63a957,0xff59a24d,0xff529c45,0xff4a963d,0xff469738,0xff3e942f,0xff368f27,0xff2a841c,0xff1f7111,0xff3f7337,
+ 0xffffffff,0xffffffff,0xffeef2ee,0xff2a6a20,0xff0f6d00,0xff117600,0xff010300,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff030326,0xffadbfab,
+ 0xffffffff,0xffffffff,0xff92aa8e,0xff4f8647,0xff62a158,0xff6bae60,0xff69ae5e,0xff61a556,0xff539548,0xff47873d,0xff548b4c,0xff6b9964,0xff327627,0xff2d7722,
+ 0xff26731a,0xff206f13,0xff1a6b0d,0xff125d06,0xff9cb199,0xffffffff,0xffffffff,0xff8da889,0xff0e6100,0xff106f00,0xff010300,0x93000000,0x62000000,0x3b000000,
+ 0x1f000000,0x3d000000,0xff07045d,0xffffffff,0xffffffff,0xffacbdaa,0xff4e8546,0xff63a359,0xff6db061,0xff69ad5e,0xff5e9f54,0xff4b8542,0xff88a883,0xffe4ebe3,
+ 0xffffffff,0xffffffff,0xffd3dcd2,0xff819b7e,0xffffffff,0xffffffff,0xffbed1bb,0xff0f5e02,0xff5b8455,0xffffffff,0xffffffff,0xffdfe5de,0xff0c5700,0xff0f6900,
+ 0xff010200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a068a,0xffffffff,0xffe3e8e3,0xff53834b,0xff609f56,0xff6cb061,0xff6aae5f,0xff5b9b52,
+ 0xff52854a,0xffc8d4c6,0xffffffff,0xff8da98a,0xff396d32,0xff86a082,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff6c9566,0xff0e6200,0xff1a5b10,0xffffffff,
+ 0xffffffff,0xffffffff,0xff0a4e00,0xff0e6200,0xff010200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a068a,0xffffffff,0xff6f926a,0xff599550,
+ 0xff69ac5e,0xff69ad5d,0xff5b9c52,0xff4f8248,0xffd6dfd5,0xffffffff,0xff9eb49a,0xff3a7831,0xff397d2e,0xff255e1c,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+ 0xff1b6210,0xff0f6a00,0xff0c5600,0xffffffff,0xffffffff,0xffffffff,0xff4b7744,0xff0d5b00,0xff010200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff0a068a,0xffc5d0c4,0xff4d8344,0xff64a55a,0xff69ad5d,0xff5d9e53,0xff518449,0xffd6ded5,0xffffffff,0xffe3e8e2,0xff457d3d,0xff448d38,0xff3c8730,0xff407538,
+ 0xffffffff,0xffffffff,0xffffffff,0xff9cb399,0xff0d6300,0xff106d00,0xff0c5700,0xffffffff,0xffffffff,0xffffffff,0xff4a7444,0xff0d5700,0xff010200,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a068a,0xff7a9a76,0xff58964e,0xff66ab5b,0xff5fa355,0xff48823f,0xffb8c7b6,0xffffffff,0xffffffff,0xff819f7d,
+ 0xff438738,0xff449437,0xff368029,0xff769871,0xffffffff,0xffffffff,0xffffffff,0xff5c8855,0xff0f6800,0xff0f6a00,0xff0b5200,0xffffffff,0xffffffff,0xffffffff,
+ 0xff376530,0xff0c5400,0xff010200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff090682,0xff447b3c,0xff5da051,0xff60a655,0xff4f8f44,0xff90aa8c,
+ 0xffffffff,0xffffffff,0xfff0f3f0,0xff38752f,0xff459238,0xff3c8d2f,0xff286d1d,0xffbfccbd,0xffffffff,0xffffffff,0xffeef2ee,0xff0c5600,0xff0f6900,0xff0e6300,
+ 0xff376930,0xffffffff,0xffffffff,0xffffffff,0xff094400,0xff0c5300,0xff010200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff070562,0xff49853f,
+ 0xff5aa24f,0xff539948,0xff487f41,0xfff0f3f0,0xffffffff,0xffffffff,0xff9ab096,0xff3a802f,0xff3d8f2f,0xff2f7d23,0xff668e60,0xffffffff,0xffffffff,0xffffffff,
+ 0xff9cb199,0xff0d5c00,0xff0f6700,0xff0c5800,0xff698865,0xffffffff,0xffffffff,0xffacbaaa,0xff0a4600,0xff0c5200,0xff000200,0x99000000,0x66000000,0x3d000000,
+ 0x1f000000,0x3d000000,0xff05044a,0xff498a3f,0xff549c47,0xff478a3c,0xff8ca788,0xffffffff,0xffffffff,0xffffffff,0xff51804b,0xff38852b,0xff318324,0xff2e7025,
+ 0xffe0e6df,0xffffffff,0xffffffff,0xffffffff,0xff5b8455,0xff0d5f00,0xff0e6100,0xff0a4c00,0xffacb9aa,0xffffffff,0xffffffff,0xff496c44,0xff0b4900,0xff0c4f00,
+ 0xff000200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff040334,0xff478b3c,0xff4a943e,0xff38772e,0xfff0f3ef,0xffffffff,0xffffffff,0xffffffff,
+ 0xff296a1f,0xff2f7f23,0xff236e17,0xffb0c3ad,0xffeef1ee,0xffffffff,0xffffffff,0xffffffff,0xff0a4e00,0xff0d5d00,0xff0c5500,0xff275620,0xffffffff,0xffffffff,
+ 0xffbbc6ba,0xff083e00,0xff0b4b00,0xff0c4d00,0xff000200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff040333,0xff428836,0xff418a34,0xff648e5d,
+ 0xffffffff,0xffffffff,0xffffffff,0xffbfcabe,0xff216217,0xff216a15,0xff729a6c,0xffd0dacf,0xff9aa899,0xffffffff,0xffffffff,0xffbcc8ba,0xff0a4d00,0xff0c5400,
+ 0xff094600,0xff9bac99,0xffffffff,0xffeef1ee,0xff265120,0xff0a4600,0xff0b4b00,0xff0b4b00,0xff000200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff040332,0xff3b8330,0xff37812b,0xff87a583,0xffffffff,0xffffffff,0xffffffff,0xffd0d8cf,0xff144d0c,0xff70976a,0xffeff3ee,0xff265420,0xffeef1ee,0xffffffff,
+ 0xffffffff,0xff8b9f89,0xff094300,0xff094300,0xff698465,0xffffffff,0xffeef1ee,0xff365a30,0xff0a4200,0xff0a4800,0xff0b4900,0xff0b4800,0xff000200,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff040338,0xff347e28,0xff317f25,0xff86a681,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffd0dacf,0xffeff3ee,
+ 0xff397130,0xff285b20,0xffffffff,0xffffffff,0xffffffff,0xff8b9c89,0xff073600,0xff789175,0xffffffff,0xffbcc6ba,0xff265020,0xff094000,0xff0a4700,0xff0b4900,
+ 0xff0a4700,0xff0a4500,0xff000200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff050445,0xff2b7620,0xff2d801f,0xff3c7b32,0xffeff3ef,0xffffffff,
+ 0xffffffff,0xffffffff,0xffbdceba,0xff1b6410,0xff0d5f00,0xff397130,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffacbbaa,0xff5a7855,0xff083b00,
+ 0xff094200,0xff0a4600,0xff0b4800,0xff0a4600,0xff0a4500,0xff0a4200,0xff000200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff080571,0xff226717,
+ 0xff287f19,0xff217913,0xff35772a,0xff7da278,0xff7ba076,0xff2a6e20,0xff0e6500,0xff106e00,0xff106c00,0xff0d5f00,0xff4b7a44,0xff799475,0xff799375,0xff496e44,
+ 0xff184910,0xff093f00,0xff094100,0xff0a4400,0xff0b4700,0xff0b4700,0xff0a4600,0xff0a4400,0xff0a4300,0xff0a4200,0xff000200,0x99000000,0x66000000,0x3d000000,
+ 0x1f000000,0x3d000000,0xff0a068a,0xff73966d,0xff1f7312,0xff208010,0xff197c09,0xff137403,0xff107000,0xff107300,0xff117600,0xff117600,0xff107200,0xff0f6800,
+ 0xff0d5c00,0xff0c5200,0xff0b4e00,0xff0b4b00,0xff0b4b00,0xff0b4a00,0xff0b4800,0xff0b4900,0xff0b4700,0xff0a4600,0xff0a4500,0xff0a4400,0xff0a4200,0xff0a4200,
+ 0xff000200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a068a,0xffe0e6df,0xff246519,0xff177408,0xff157e03,0xff137f00,0xff127d00,0xff127b00,
+ 0xff127b00,0xff117600,0xff107000,0xff106900,0xff0e6200,0xff0d5b00,0xff0c5600,0xff0c5100,0xff0c4f00,0xff0b4c00,0xff0b4a00,0xff0b4800,0xff0a4600,0xff0a4500,
+ 0xff0a4400,0xff0a4300,0xff0a4200,0xff0a4200,0xff000200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a068a,0xffffffff,0xffd0dacf,0xff1c6212,
+ 0xff0f6900,0xff117300,0xff127700,0xff117400,0xff107300,0xff106e00,0xff0f6900,0xff0e6300,0xff0d5d00,0xff0d5600,0xff0c5000,0xff0b4a00,0xff0a4800,0xff0b4800,
+ 0xff0b4800,0xff0a4600,0xff0a4500,0xff0a4400,0xff0a4300,0xff0a4200,0xff0a4200,0xff0a4200,0xff000200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff0a068a,0xffffffff,0xffffffff,0xffeef2ee,0xff6a9065,0xff0b5500,0xff0d5d00,0xff0d6000,0xff0e5f00,0xff0d5c00,0xff0c5700,0xff0c5100,0xff0b4c00,0xff094500,
+ 0xff083e00,0xff6a8965,0xff184c10,0xff0a4400,0xff0a4500,0xff0a4500,0xff0a4400,0xff0a4300,0xff0a4300,0xff0a4200,0xff0a4200,0xff0a4200,0xff000200,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff030328,0xffdfe6de,0xffffffff,0xffffffff,0xffffffff,0xffdfe5de,0xff8ca589,0xff5a8055,0xff4a7444,0xff4a7344,
+ 0xff4a7144,0xff496e44,0xff799175,0xffacb9aa,0xffeef1ee,0xffeef1ee,0xff4a6f44,0xff094000,0xff0a4300,0xff0a4400,0xff0a4300,0xff0a4200,0xff0a4200,0xff0a4200,
+ 0xff0a4200,0xff0a4200,0xff000200,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff010303,0xff0d5f00,0xff6b9265,0xffacbeaa,0xffffffff,0xffffffff,
+ 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffcfd7ce,0xff788f75,0xff174410,0xff083d00,0xff094200,0xff0a4200,0xff0a4200,
+ 0xff0a4200,0xff0a4200,0xff0a4200,0xff0a4200,0xff0a4200,0xff0a4300,0xff000200,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff010300,0xff117500,
+ 0xff0e6700,0xff0d5c00,0xff0b5200,0xff376b30,0xff4b7444,0xff799475,0xff799375,0xff799275,0xff5a7955,0xff4a6e44,0xff083b00,0xff093d00,0xff093e00,0xff0a4000,
+ 0xff094200,0xff0a4100,0xff0a4200,0xff0a4200,0xff0a4200,0xff0a4200,0xff0a4200,0xff0a4200,0xff0a4300,0xff0a4400,0xff000200,0x87000000,0x5a000000,0x36000000,
+ 0x17000000,0x2e000000,0xff010300,0xff010300,0xff010300,0xff010300,0xff010200,0xff010200,0xff000200,0xff000200,0xff000200,0xff000200,0xff000200,0xff000200,
+ 0xff000200,0xff000200,0xff000200,0xff000200,0xff000200,0xff000200,0xff000200,0xff000200,0xff000200,0xff000200,0xff000200,0xff000200,0xff000200,0xff000200,
+ 0xff000200,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
+ 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,
+ 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
+ 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
+ 0x18000000,0xf000000
+};
+
+static const QRgb Appearance_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3000000,0x6000000,0xb000000,0x12000000,0x19000000,0x21000000,0x29000000,0x2f000000,
+ 0x34000000,0x37000000,0x38000000,0x37000000,0x34000000,0x2f000000,0x29000000,0x21000000,0x19000000,0x12000000,0xb000000,0x6000000,0x3000000,0x1000000,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,
+ 0x5d494b73,0x93666a9d,0xbe777cb4,0xde8186c0,0xf3878dc9,0xfe888ecc,0xf37c82c4,0xe06d73b8,0xc4595ea4,0x9f404686,0x70222756,0x3f000000,0x33000000,0x26000000,
+ 0x1b000000,0x11000000,0xa000000,0x5000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,
+ 0x16000000,0x23000000,0x6f5c608b,0xba7f84b6,0xf5989dcf,0xff9b9fd3,0xff979cd2,0xff9297d0,0xff8e93cf,0xff888ecc,0xff8287ca,0xff7b82c8,0xff737ac5,0xff6b72c3,
+ 0xf76067bb,0xc6404797,0x881f2562,0x45000000,0x33000000,0x23000000,0x16000000,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,
+ 0x2000000,0x7000000,0xe000000,0x1a000000,0x47414464,0xa77b7fb1,0xf59da1d2,0xff9fa4d5,0xff9ea3d5,0xff9b9fd3,0xff979cd2,0xff9297d0,0xff8e93cf,0xff868dcc,
+ 0xff8186ca,0xff787fc7,0xff7077c4,0xff666fc1,0xff5e67be,0xff5660bc,0xf84953b3,0xbc273185,0x6c090b35,0x3e000000,0x2a000000,0x1a000000,0xe000000,0x7000000,
+ 0x2000000,0x1000000,0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x5f575a83,0xc68a8fc0,0xffa3a7d7,0xffa1a5d6,0xffa0a4d5,0xff9ea3d5,0xff9b9fd3,
+ 0xff979cd2,0xff9297d0,0xff8c91ce,0xff868ccc,0xff7e85c9,0xff757cc6,0xff6d74c3,0xff646cc0,0xff5a63bd,0xff505aba,0xff4551b8,0xff3a47b5,0xd71e2d91,0x850a1048,
+ 0x46000000,0x2e000000,0x1b000000,0xe000000,0x6000000,0x2000000,0x1000000,0x5000000,0xd000000,0x1a000000,0x5f575a83,0xd09094c5,0xffa4a8d7,0xffa3a7d7,
+ 0xffa1a5d6,0xffa0a4d5,0xff9ea3d5,0xff9b9fd3,0xff969bd1,0xff9096cf,0xff8b90cd,0xff8389ca,0xff7b82c8,0xff737ac5,0xff6770c1,0xff5d66be,0xff525dbb,0xff4753b8,
+ 0xff3c49b5,0xff2d40b2,0xff2b3eaf,0xe0202d92,0x8a0a0f43,0x48000000,0x2e000000,0x1a000000,0xd000000,0x5000000,0x3000000,0xa000000,0x16000000,0x47414464,
+ 0xc68a8fc0,0xffa4a8d7,0xffa4a8d7,0xffa3a7d7,0xffa1a5d6,0xffa0a4d5,0xff9da1d4,0xff9a9ed3,0xff959ad1,0xff9095cf,0xff888ecc,0xff8186ca,0xff787fc7,0xff6e75c3,
+ 0xff646cc0,0xff5761bd,0xff4c56b9,0xff3e4cb6,0xff2f41b3,0xff2d3eb0,0xff2b3ead,0xff2b3caa,0xdb1a2886,0x7b050829,0x46000000,0x2a000000,0x16000000,0xa000000,
+ 0x6000000,0x11000000,0x23000000,0xa77b7fb1,0xffa3a7d7,0xffa3a7d7,0xffa3a7d7,0xffa3a7d7,0xffa0a4d5,0xff9fa4d4,0xff9ca0d3,0xff979bd1,0xff9297cf,0xff8d91cc,
+ 0xff848aca,0xff7c83c6,0xff7279c3,0xff6970bf,0xff5c65bc,0xff505ab9,0xff4350b5,0xff3445b3,0xff2d3eaf,0xff2b3ead,0xff2b3caa,0xff283aa8,0xff283aa4,0xc8131e6d,
+ 0x60000000,0x3e000000,0x23000000,0x11000000,0xb000000,0x1b000000,0x6f5c608b,0xf59da1d2,0xffa1a5d6,0xffa1a5d6,0xffa1a5d6,0xffa0a4d5,0xff9ea3d3,0xff9ba0d1,
+ 0xff989bcf,0xff9398cc,0xff868ac1,0xff666b98,0xff575a86,0xff505583,0xff494d7f,0xff41467d,0xff41478d,0xff4650b1,0xff3845af,0xff2b3ead,0xff2b3cab,0xff2b3ca8,
+ 0xff283aa5,0xff2838a4,0xff2638a0,0xf9253298,0xa20a0e42,0x55000000,0x33000000,0x1b000000,0x12000000,0x26000000,0xba7f84b6,0xff9fa4d5,0xffa0a4d5,0xffa0a4d5,
+ 0xffa0a4d4,0xff9ca1d1,0xff999dcf,0xff7d80ab,0xff4a4c65,0xff1e3446,0xff2f6079,0xff5584a2,0xff5383a3,0xff286a8e,0xff034d6e,0xff004969,0xff002b41,0xff000000,
+ 0xff06092b,0xff121e63,0xff202f8e,0xff2636a0,0xff26369f,0xff26369d,0xff26369b,0xff233499,0xd7141e6d,0x6c000000,0x45000000,0x26000000,0x19000000,0x5d494b73,
+ 0xf5989dcf,0xff9ea3d4,0xff9da2d4,0xff9ba0d2,0xff999dcf,0xff8a8ebb,0xff404157,0xff000000,0xff414c51,0xff4989b2,0xff80abc9,0xffacbdca,0xffacb4b9,0xff818d96,
+ 0xff345569,0xff00638c,0xff006f9e,0xff006794,0xff004967,0xff000000,0xff000000,0xff090934,0xff15206f,0xff233294,0xff203295,0xff233294,0xfa222d8c,0x9c040a2b,
+ 0x57000000,0x33000000,0x21000000,0x93666a9d,0xff9b9fd3,0xff9a9ed2,0xff989bcf,0xff9699cc,0xff74769f,0xff12121e,0xff8d8d8d,0xffe5e5e5,0xff8aaec8,0xff5091b9,
+ 0xff99abb9,0xffc9c9c9,0xffcacaca,0xff989898,0xff525252,0xff060606,0xff00618a,0xff006c99,0xff00648f,0xff8093a2,0xff848584,0xff000000,0xff000000,0xff060620,
+ 0xff121e67,0xff1e2d8a,0xff1e2d8b,0xc40d134c,0x69000000,0x41000000,0x29000000,0xbe757bb3,0xff969bd0,0xff9499ce,0xff9196c9,0xff5c5e80,0xff5e5e5e,0xffe0e0e0,
+ 0xfff3f3f3,0xfff8f8f8,0xff3282af,0xff418dba,0xff818486,0xffacacac,0xffacacac,0xff7f7f7f,0xff414141,0xff090909,0xff003a55,0xff006e9c,0xff006691,0xff3e7496,
+ 0xff909191,0xff8a8a89,0xff797878,0xff232323,0xff000000,0xff03061e,0xff152069,0xe010175e,0x7a000000,0x4d000000,0x30000000,0xdf7f85be,0xff8f94cb,0xff8b8fc6,
+ 0xff4c4d6a,0xff969696,0xffe4e4e4,0xffedeeed,0xfff4f5f5,0xfffafafa,0xff0677a9,0xff1e85b6,0xff494949,0xff636363,0xff626262,0xff474747,0xff1b1b1b,0xff030303,
+ 0xff001b2d,0xff006f9d,0xff006692,0xff2f7093,0xff8c8c8b,0xff7c7a7a,0xff6e6667,0xff644e50,0xff635051,0xff000000,0xff000000,0xfa080d39,0x89000000,0x58000000,
+ 0x36000000,0xf38388c5,0xff878cc6,0xff494c6a,0xffb3a7a8,0xffdbd1d1,0xffe4e3e3,0xffececec,0xfff3f3f3,0xfff8f8f8,0xff0076a8,0xff007cb1,0xff121212,0xff1e1e1e,
+ 0xff1e1e1e,0xff121212,0xff060606,0xff000000,0xff00324a,0xff006e9c,0xff006691,0xff2d6e91,0xff848484,0xff737272,0xff645657,0xff552f2f,0xff4a1212,0xff562628,
+ 0xff1b1b1b,0xff03030e,0x95000000,0x60000000,0x3a000000,0xfe8489c6,0xff474a6b,0xffb88081,0xffce8687,0xffd8b7b8,0xffe1dada,0xffe9e8e8,0xffefefef,0xfff3f3f3,
+ 0xff0073a4,0xff0079ad,0xff034966,0xff030303,0xff000000,0xff000000,0xff000000,0xff000000,0xff005c83,0xff006c99,0xff00648f,0xff286c8f,0xff797879,0xff6a6666,
+ 0xff5a4c4a,0xff4c2023,0xff400c0f,0xff400909,0xff383232,0xff000003,0x9c000000,0x67000000,0x3d000000,0xf4767cbb,0xffb87278,0xffc1494c,0xffca6061,0xffd39c9c,
+ 0xffdccfcf,0xffe3e1e1,0xffe8e8e8,0xffebecec,0xff729dbb,0xff0075a6,0xff0074a6,0xff004c6d,0xff000000,0xff000000,0xff000f18,0xff004d6e,0xff006f9d,0xff006794,
+ 0xff00628b,0xff53758c,0xff6e6e6e,0xff5d5b5b,0xff504646,0xff3e2020,0xff381212,0xff413240,0xff0c1250,0xfc0e1754,0x9e000000,0x68000000,0x3c000000,0xe2676dae,
+ 0xff9b85a2,0xffaa7a8b,0xffc76365,0xffce9999,0xffd6c8c8,0xffdcdbdb,0xffe1e1e1,0xffe4e4e4,0xffccd3d9,0xff1b76a2,0xff0073a4,0xff0076a8,0xff0076a8,0xff0076a8,
+ 0xff0073a4,0xff006f9d,0xff006a96,0xff00648e,0xff1b678d,0xff717171,0xff636363,0xff535353,0xff464343,0xff3e3234,0xff282846,0xff0c1553,0xff0f1b60,0xf5101558,
+ 0x9b000000,0x66000000,0x39000000,0xc854589b,0xff6a70b5,0xff6166a8,0xff696b9c,0xffaea3b0,0xffcfc8c8,0xffd2d1d1,0xffd4d4d4,0xffd4d5d4,0xffd3d3d3,0xff8da7ba,
+ 0xff15719d,0xff006e9c,0xff006f9d,0xff006e9c,0xff006c99,0xff006794,0xff00648e,0xff12658c,0xff657581,0xff6b6b6b,0xff5d5d5d,0xff515151,0xff3c3e49,0xff090f46,
+ 0xff0c1250,0xff0f185a,0xff121e63,0xe9091048,0x94000000,0x60000000,0x33000000,0xa43c437f,0xff646cb8,0xff5c63ad,0xff535aa0,0xff474e92,0xff555a8d,0xffa8a8b3,
+ 0xffc3c3c4,0xffc4c4c4,0xffc3c3c3,0xffbebebe,0xffa4aeb5,0xff5282a1,0xff006692,0xff006691,0xff00648f,0xff266586,0xff5e7585,0xff7a7b7d,0xff727272,0xff636364,
+ 0xff464651,0xff181e46,0xff0c1249,0xff0c1252,0xff0f185a,0xff121b61,0xff151e69,0xd6080b34,0x88000000,0x57000000,0x2c000000,0x741d224e,0xf85b62b3,0xff5861b2,
+ 0xff5058a8,0xff46509f,0xff3a4593,0xff2d3886,0xff202d7b,0xff777992,0xff95969e,0xffa0a0a3,0xffaaaaa9,0xffa3a3a3,0xff9e9d9e,0xff989899,0xff919191,0xff888989,
+ 0xff787979,0xff636369,0xff404355,0xff0c0f47,0xff0c124c,0xff0c1552,0xff0f1557,0xff12185c,0xff121b62,0xff151e66,0xfc141d66,0xb9010419,0x79000000,0x4c000000,
+ 0x23000000,0x42000000,0xc83d4593,0xff535cb5,0xff4c55af,0xff414da9,0xff3443a0,0xff283897,0xff202f8e,0xff1b2b83,0xff182679,0xff152070,0xff151e67,0xff121b61,
+ 0xff0f185b,0xff0c1556,0xff0c1553,0xff0c1551,0xff0c1551,0xff0c1552,0xff0f1553,0xff0f1556,0xff0f185a,0xff12185d,0xff121b61,0xff121e65,0xff121e69,0xff121e6c,
+ 0xe70e1047,0x96000000,0x69000000,0x40000000,0x19000000,0x34000000,0x891e2562,0xf84852b1,0xff4350b3,0xff3a46af,0xff2b3ea9,0xff2838a1,0xff23369b,0xff233292,
+ 0xff1e2d8a,0xff1e2883,0xff1b267b,0xff182375,0xff15206f,0xff151e6b,0xff121e66,0xff121b64,0xff121b62,0xff121b61,0xff121b61,0xff121b62,0xff121b64,0xff151e66,
+ 0xff121e69,0xff121e6a,0xff151e6c,0xfc141d69,0xc4050824,0x82000000,0x56000000,0x33000000,0x12000000,0x26000000,0x45000000,0xbc273184,0xff3a47b5,0xff2d40b0,
+ 0xff2b3cac,0xff283ca7,0xff2838a1,0xff23349b,0xff233295,0xff202d8f,0xff1e2d88,0xff1b2b82,0xff18287c,0xff182377,0xff182373,0xff152370,0xff15206d,0xff121e6b,
+ 0xff15206b,0xff151e6a,0xff15206a,0xff121e6c,0xff151e6c,0xff15206d,0xff15206e,0xdf060f3f,0x94000000,0x6c000000,0x45000000,0x26000000,0xb000000,0x1b000000,
+ 0x33000000,0x6c090b35,0xd71e2d91,0xff2b3eaf,0xff2b3eac,0xff2b3ca8,0xff2838a4,0xff2636a0,0xff23369a,0xff233294,0xff202f8f,0xff1e2d89,0xff1e2b84,0xff1b287f,
+ 0xff1b267b,0xff182377,0xff182374,0xff152370,0xff152070,0xff18206e,0xff15206e,0xff15206e,0xff15206e,0xff15206f,0xed0c1350,0xae010310,0x7b000000,0x55000000,
+ 0x33000000,0x1b000000,0x6000000,0x11000000,0x23000000,0x3e000000,0x850a1048,0xe0202d92,0xff2b3caa,0xff283aa8,0xff2838a4,0xff2638a0,0xff26369b,0xff233496,
+ 0xff233291,0xff202d8d,0xff1e2b87,0xff1e2883,0xff1b287f,0xff1b287b,0xff182678,0xff182374,0xff182372,0xff152371,0xff15206f,0xff15206f,0xff15206f,0xf00f1655,
+ 0xbc03041c,0x85000000,0x60000000,0x3e000000,0x23000000,0x11000000,0x3000000,0xa000000,0x16000000,0x2a000000,0x46000000,0x8a0a0f43,0xdb1a2886,0xff2838a4,
+ 0xff2638a0,0xff26369d,0xff23349a,0xff233296,0xff203291,0xff202f8d,0xff1e2d88,0xff1e2b84,0xff1b2880,0xff1b267c,0xff182678,0xff182375,0xff182372,0xff152071,
+ 0xff152070,0xff15206f,0xed0c1350,0xbc03041c,0x88000000,0x66000000,0x46000000,0x2a000000,0x16000000,0xa000000,0x1000000,0x5000000,0xd000000,0x1a000000,
+ 0x2e000000,0x48000000,0x7b050829,0xc8131e6d,0xf9253298,0xff23349a,0xff233497,0xff203293,0xff202f8f,0xff1e2d8a,0xff1e2b86,0xff1b2b82,0xff1b287e,0xff18267b,
+ 0xff182677,0xff182374,0xff182372,0xff152071,0xfc141d6b,0xdf080f41,0xae010310,0x85000000,0x66000000,0x48000000,0x2e000000,0x1a000000,0xd000000,0x5000000,
+ 0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x2e000000,0x46000000,0x60000000,0xa20a0e42,0xd7141e6e,0xfa222d8e,0xff202f90,0xff202f8d,0xff1e2d88,
+ 0xff1e2b85,0xff1b2881,0xff1b287d,0xff18267a,0xff182677,0xff182375,0xfc171f6d,0xe60e124b,0xc3050824,0x94000000,0x7b000000,0x60000000,0x46000000,0x2e000000,
+ 0x1b000000,0xe000000,0x6000000,0x2000000,0xffffff,0x1000000,0x2000000,0x7000000,0xe000000,0x1a000000,0x2a000000,0x3e000000,0x55000000,0x6c000000,
+ 0x9b06082c,0xc20b134d,0xde121b64,0xef182374,0xf91a267d,0xfe1b2881,0xfa1a2475,0xf2121c67,0xe50e1552,0xd1080d39,0xb503061b,0x93000000,0x81000000,0x6c000000,
+ 0x55000000,0x3e000000,0x2a000000,0x1a000000,0xe000000,0x7000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,
+ 0x16000000,0x23000000,0x33000000,0x45000000,0x56000000,0x67000000,0x75000000,0x81000000,0x89000000,0x8e000000,0x90000000,0x8e000000,0x89000000,0x81000000,
+ 0x75000000,0x67000000,0x56000000,0x45000000,0x33000000,0x23000000,0x16000000,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,0x33000000,0x3f000000,0x4a000000,0x53000000,0x59000000,0x5e000000,
+ 0x5f000000,0x5e000000,0x59000000,0x53000000,0x4a000000,0x3f000000,0x33000000,0x26000000,0x1b000000,0x11000000,0xa000000,0x5000000,0x2000000,0x1000000,
+ 0xffffff,0xffffff
+};
+
+static const QRgb AppsIcon_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0x6c000000,0x5c000000,0xff000000,0xff000000,0xff000000,0xff000000,0x24000000,0xc000000,
+ 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0x9c000000,0x6c000000,0xffa7d400,0xffa7d400,0xffa7d400,0xff000000,0x6b000000,0x24000000,
+ 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xb4000000,0x74000000,0xffa7d400,0xffa7d400,0xffa7d400,0xff000000,0x8f000000,0x30000000,
+ 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xb4000000,0x74000000,0xffa7d400,0xffa7d400,0xffa7d400,0xff000000,0x8f000000,0x30000000,
+ 0xffffff,0xffffff,0x6c000000,0x9c000000,0xb4000000,0xb4000000,0x9c000000,0x6c000000,0x6c000000,0x9c000000,0xb4000000,0xb4000000,0x6b000000,0x24000000,
+ 0xffffff,0xffffff,0x5c000000,0x6c000000,0x74000000,0x74000000,0x6c000000,0x5c000000,0x5c000000,0x6c000000,0x74000000,0x74000000,0x24000000,0xc000000,
+ 0xffffff,0xffffff,0xff000000,0xffa7d400,0xffa7d400,0xffa7d400,0x6c000000,0x5c000000,0xffa7d400,0xffa7d400,0xffa7d400,0xff000000,0x24000000,0xc000000,
+ 0xffffff,0xffffff,0xff000000,0xffa7d400,0xffa7d400,0xffa7d400,0x9c000000,0x6c000000,0xffa7d400,0xffa7d400,0xffa7d400,0xff000000,0x6b000000,0x24000000,
+ 0xffffff,0xffffff,0xff000000,0xffa7d400,0xffa7d400,0xffa7d400,0xb4000000,0x74000000,0xffa7d400,0xffa7d400,0xffa7d400,0xff000000,0x8f000000,0x30000000,
+ 0xffffff,0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xb4000000,0x74000000,0xff000000,0xff000000,0xff000000,0xff000000,0x8f000000,0x30000000,
+ 0xffffff,0xffffff,0x24000000,0x6b000000,0x8f000000,0x8f000000,0x6b000000,0x24000000,0x24000000,0x6b000000,0x8f000000,0x8f000000,0x6b000000,0x24000000,
+ 0xffffff,0xffffff,0xc000000,0x24000000,0x30000000,0x30000000,0x24000000,0xc000000,0xc000000,0x24000000,0x30000000,0x30000000,0x24000000,0xc000000
+};
+
+static const QRgb Calculator_data[] = {
+ 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
+ 0x1f000000,0x1f000000,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x1d000000,0x1b000000,
+ 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3e040404,0x3f080808,0x3f080808,0x3f0c0c0c,0x3f0c0c0c,0x3f0c0c0c,0x3f0c0c0c,0x3f0c0c0c,0x3f080808,
+ 0x3f080808,0x3e040404,0x3c040404,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff447420,0xff447421,0xff457521,0xff457521,
+ 0xff457521,0xff457521,0xff457521,0xff457521,0xff447421,0xff437220,0xff41711e,0xff3f6e1d,0xff3d6c1c,0xff3a6a1a,0xff376518,0xff356316,0xff315f14,0xff2d5b11,
+ 0xff2b570f,0xff29550e,0xff26520c,0xff234f0a,0xff1f4b07,0xff1c4805,0xff184303,0xff153f00,0xff133c00,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
+ 0xff447421,0xff7f9a69,0xff7f9a69,0xff809a6a,0xff809a6a,0xff809a6a,0xff7f9a69,0xff7f9a69,0xff7e9867,0xff7b9664,0xff799461,0xff74915b,0xff6f8d56,0xff6a8a51,
+ 0xff65844a,0xff608044,0xff597b3c,0xff527634,0xff4c712d,0xff476d27,0xff426921,0xff3b6419,0xff355f12,0xff2d5909,0xff285403,0xff265002,0xff133b00,0x5c000000,
+ 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff457521,0xff7f9a69,0xff809a6a,0xff809a6a,0xff809a6a,0xff809a6a,0xff7f9a69,0xff7e9867,0xff7e9867,0xff7b9664,
+ 0xff77935f,0xff738f5a,0xff6e8c54,0xff68874e,0xff638448,0xff5e7f42,0xff577939,0xff507431,0xff4a702a,0xff446b24,0xff3f671e,0xff396216,0xff315c0d,0xff2c5608,
+ 0xff295306,0xff264f04,0xff133801,0x75020202,0x4f030303,0x2e000000,0x1b000000,0x36000000,0xff457521,0xff809a6a,0xff809a6a,0xff809a6a,0xff809a6a,0xff7f9969,
+ 0xff7f9969,0xff7e9767,0xff7e9767,0xff7b9664,0xff779360,0xff718d58,0xff6d8a54,0xff68854d,0xff628147,0xff5b7d3e,0xff557837,0xff4e722f,0xff486e28,0xff436a23,
+ 0xff3e661b,0xff376014,0xff325b0f,0xff2e570c,0xff2b5209,0xff284e07,0xff133801,0x88060606,0x5b030303,0x37050505,0x1d000000,0x3b000000,0xff7db049,0xffe1e1e1,
+ 0xffdadada,0xffdadada,0xffdadada,0xffdadada,0xffdadada,0xffdadada,0xffdadada,0xffdadada,0xffdadada,0xffdadada,0xffdadada,0xffdadada,0xffdadada,0xffdadada,
+ 0xffdadada,0xffdadada,0xffdadada,0xffd6d6d6,0xffb2b9ad,0xff5d7747,0xff345c14,0xff315711,0xff2d520e,0xff294c0a,0xff133602,0x95070707,0x63050505,0x3c040404,
+ 0x1f000000,0x3d000000,0xff7aab47,0xffd8d8d8,0xffcecece,0xffcecece,0xffcecece,0xffcecece,0xffcecece,0xffcecece,0xffcecece,0xffcecece,0xffcecece,0xffcecece,
+ 0xffcecece,0xffcecece,0xffcecece,0xffcecece,0xffcecece,0xffcecece,0xffcecece,0xffcccccc,0xffb1b1b1,0xff666c61,0xff375a19,0xff345616,0xff2e5111,0xff2a4c0e,
+ 0xff143603,0x9b0a0a0a,0x68070707,0x3e040404,0x1f000000,0x3d000000,0xff76a645,0xffcecece,0xffc2c2c2,0xffc2c2c2,0xffc2c2c2,0xffc2c2c2,0xffc2c2c2,0xffc2c2c2,
+ 0xffc2c2c2,0xffc2c2c2,0xffc2c2c2,0xffc2c2c2,0xffc2c2c2,0xffc2c2c2,0xffc2c2c2,0xffc2c2c2,0xffc2c2c2,0xffc2c2c2,0xffc1c1c1,0xffbfbfbf,0xff909090,0xff444543,
+ 0xff37561c,0xff345319,0xff2f4f15,0xff2b4a11,0xff163404,0x9c0d0d0d,0x690c0c0c,0x3f080808,0x1f000000,0x3d000000,0xff50712f,0xff6a6a6a,0xff616161,0xff626262,
+ 0xff626262,0xff626262,0xff626262,0xff626262,0xff626262,0xff626262,0xff626262,0xff626262,0xff626262,0xff626262,0xff626262,0xff626262,0xff737373,0xff9d9d9d,
+ 0xffbdbdbd,0xffbdbdbd,0xff848484,0xff363735,0xff324c1c,0xff324b1b,0xff2e4918,0xff2b4714,0xff163405,0x9d121212,0x6a0e0e0e,0x3f0c0c0c,0x1f000000,0x3d000000,
+ 0xff3d5524,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xffc2c2c2,0xffb8b8b8,0xff7d7d7d,0xff30342d,0xff293d18,0xff2a3e19,0xff2a4118,0xff294115,0xff163106,0x9e151515,
+ 0x6b131313,0x40101010,0x1f000000,0x3d000000,0xff3b5323,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0xff73716b,0xffe5e1d5,0xff000000,0xff73716b,0xffe5e1d5,0xff73716b,0xff000000,0xffc2c2c2,0xffb7b7b7,0xff7a7a7a,0xff2e312b,0xff1e2c13,0xff213015,
+ 0xff253517,0xff273a16,0xff152e06,0xa01b1b1b,0x6c181818,0x41141414,0x1f000000,0x3d000000,0xff3c5423,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffe5e1d5,0xff000000,0xffe5e1d5,0xff000000,0xffe5e1d5,0xff000000,0xffc2c2c2,0xffb7b7b7,
+ 0xff7a7a7a,0xff2e302d,0xff131c0c,0xff182210,0xff1e2a13,0xff223216,0xff132b07,0xa1202020,0x6d1c1c1c,0x42171717,0x20000000,0x3f000000,0xff456128,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff6e6d67,0xffdcd8cd,0xff6e6d67,0xff6e6d67,0xffddd9cd,
+ 0xff706e68,0xff000000,0xffc0c0c0,0xffb6b6b6,0xff7a7a7a,0xff2d2e2c,0xff0c1108,0xff11180c,0xff192211,0xff202d15,0xff132807,0xa2232323,0x6e202020,0x421b1b1b,
+ 0x21000000,0x41000000,0xff5c8136,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffbababa,0xffb3b3b3,0xff797979,0xff2c2d2c,0xff080b05,0xff0e130a,0xff171e10,0xff1f2a15,
+ 0xff132707,0xa3262626,0x6f222222,0x44222222,0x22000000,0x46040404,0xff6a953e,0xffb7b7b7,0xffa2a2a2,0xff9a9a9a,0xff959595,0xff959595,0xff939393,0xff939393,
+ 0xff939393,0xff959595,0xff939393,0xff939393,0xff939393,0xff959595,0xff959595,0xff9a9a9a,0xffa2a2a2,0xffacacac,0xffb3b3b3,0xffb0b0b0,0xff797979,0xff2c2c2b,
+ 0xff060804,0xff0c1009,0xff161c10,0xff1e2916,0xff132607,0xa3292929,0x70242424,0x44222222,0x24070707,0x4a070707,0xff68933d,0xff383838,0xff303030,0xff2c2c2c,
+ 0xff2a2a2a,0xff2a2a2a,0xff292929,0xff292929,0xff292929,0xff2a2a2a,0xff292929,0xff292929,0xff292929,0xff2a2a2a,0xff2a2a2a,0xff2c2c2c,0xff303030,0xff353535,
+ 0xffacacac,0xffacacac,0xff787878,0xff2b2c2b,0xff050704,0xff0c1009,0xff161c10,0xff1e2916,0xff132507,0xa3292929,0x70242424,0x44222222,0x26070707,0x4f060606,
+ 0xff628a3a,0xff333333,0xffffffe9,0xfffeffdd,0xffe4e5ad,0xff202020,0xffffffe9,0xfffeffdd,0xffe4e5ad,0xff202020,0xffffffe9,0xfffeffdd,0xffe4e5ad,0xff202020,
+ 0xffffffe9,0xfffeffdd,0xffe4e5ad,0xff303030,0xffa2a2a2,0xffa8a8a8,0xff777777,0xff2b2c2b,0xff050704,0xff0c0f09,0xff161c11,0xff1e2816,0xff132508,0xa3272727,
+ 0x6f222222,0x431e1e1e,0x28060606,0x53090909,0xff5e8437,0xff2f2f2f,0xfffeffdd,0xfffeffc1,0xff575742,0xff191919,0xfffeffdd,0xfffeffc1,0xff575742,0xff191919,
+ 0xfffeffdd,0xfffeffc1,0xff575742,0xff191919,0xfffeffdd,0xfffeffc1,0xff575742,0xff2c2c2c,0xff9a9a9a,0xffa4a4a4,0xff767676,0xff2b2c2b,0xff060704,0xff0d100a,
+ 0xff161c11,0xff1e2816,0xff122407,0xa3262626,0x6f222222,0x431e1e1e,0x29060606,0x55090909,0xff5b8035,0xff2d2d2d,0xffe4e5ad,0xff575742,0xff29291f,0xff141414,
+ 0xffe4e5ad,0xff575742,0xff29291f,0xff141414,0xffe4e5ad,0xff575742,0xff29291f,0xff141414,0xffe4e5ad,0xff575742,0xff29291f,0xff2a2a2a,0xff959595,0xffa2a2a2,
+ 0xff757575,0xff2b2c2b,0xff060705,0xff0d100a,0xff161b11,0xff1d2615,0xff122207,0xa2232323,0x6e1e1e1e,0x421b1b1b,0x29060606,0x55090909,0xff5b8035,0xff2d2d2d,
+ 0xff202020,0xff191919,0xff141414,0xff141414,0xff111111,0xff111111,0xff111111,0xff141414,0xff111111,0xff111111,0xff111111,0xff131313,0xff121212,0xff171717,
+ 0xff1f1f1f,0xff292929,0xff939393,0xffa1a1a1,0xff757575,0xff2b2c2b,0xff060705,0xff0c0f0a,0xff151b10,0xff1b2514,0xff112106,0xa11e1e1e,0x6d1c1c1c,0x42171717,
+ 0x29060606,0x56060606,0xff597e34,0xff2b2b2b,0xffffffe9,0xfffeffdd,0xffe4e5ad,0xff111111,0xffffffe9,0xfffeffdd,0xffe4e5ad,0xff111111,0xffffffe9,0xfffeffdd,
+ 0xffe4e5ad,0xff0f0f0f,0xffffffe9,0xfffeffdd,0xffe4e5ad,0xff262626,0xff8e8e8e,0xff9f9f9f,0xff757575,0xff2b2c2b,0xff060705,0xff0c0f09,0xff14190f,0xff192312,
+ 0xff0f1f06,0x9f1a1a1a,0x6b151515,0x40101010,0x29060606,0x56060606,0xff597e34,0xff2b2b2b,0xfffeffdd,0xfffeffc1,0xff575742,0xff111111,0xfffeffdd,0xfffeffc1,
+ 0xff575742,0xff111111,0xfffeffdd,0xfffeffc1,0xff575742,0xff0e0e0e,0xfffeffdd,0xfffeffc1,0xff575742,0xff252525,0xff8b8b8b,0xff9d9d9d,0xff747474,0xff2b2c2b,
+ 0xff060704,0xff0b0e09,0xff12180d,0xff17210f,0xff0e1e04,0x9e151515,0x6a111111,0x3f0c0c0c,0x29060606,0x56030303,0xff597e34,0xff2b2b2b,0xffe4e5ad,0xff575742,
+ 0xff29291f,0xff111111,0xffe4e5ad,0xff575742,0xff29291f,0xff111111,0xffe4e5ad,0xff575742,0xff29291f,0xff0d0d0d,0xfffeffdd,0xfffeffc1,0xff575742,0xff242424,
+ 0xff898989,0xff9c9c9c,0xff747474,0xff2b2c2b,0xff050704,0xff0a0d08,0xff10170b,0xff141e0c,0xff0c1b04,0x9d101010,0x690c0c0c,0x3f080808,0x29060606,0x55060606,
+ 0xff5b8035,0xff2d2d2d,0xff202020,0xff191919,0xff141414,0xff141414,0xff111111,0xff111111,0xff111111,0xff141414,0xff111111,0xff0f0f0f,0xff0d0d0d,0xff0e0e0e,
+ 0xfffeffdd,0xfffeffc1,0xff575742,0xff242424,0xff898989,0xff9c9c9c,0xff747474,0xff2b2c2b,0xff050604,0xff090c06,0xff0e1509,0xff121c0a,0xff0b1a03,0x9c0b0b0b,
+ 0x68070707,0x3e040404,0x29060606,0x54030303,0xff5b8035,0xff2d2d2d,0xffffffe9,0xfffeffdd,0xffe4e5ad,0xff141414,0xffffffe9,0xfffeffdd,0xffe4e5ad,0xff141414,
+ 0xffffffe9,0xfffeffdd,0xffe4e5ad,0xff0f0f0f,0xfffeffdd,0xfffeffc1,0xff575742,0xff252525,0xff8b8b8b,0xff9d9d9d,0xff747474,0xff2b2b2b,0xff040603,0xff080b05,
+ 0xff0c1307,0xff0f1a07,0xff091802,0x9b080808,0x67050505,0x3e040404,0x25000000,0x50030303,0xff5e8437,0xff2f2f2f,0xfffeffdd,0xfffeffc1,0xff575742,0xff191919,
+ 0xfffeffdd,0xfffeffc1,0xff575742,0xff191919,0xfffeffdd,0xfffeffc1,0xff575742,0xff151515,0xfffeffdd,0xfffeffc1,0xff575742,0xff292929,0xff939393,0xffa1a1a1,
+ 0xff757575,0xff2b2b2b,0xff030502,0xff070a04,0xff0a1105,0xff0d1804,0xff091801,0x94050505,0x63030303,0x3b000000,0x21000000,0x47000000,0xff5f8538,0xff2e2e2e,
+ 0xffe4e5ad,0xff575742,0xff29291f,0xff181818,0xffe4e5ad,0xff575742,0xff29291f,0xff181818,0xffe4e5ad,0xff575742,0xff29291f,0xff161616,0xffe4e5ad,0xff575742,
+ 0xff29291f,0xff222222,0xff767676,0xff7c7c7c,0xff585858,0xff252525,0xff030402,0xff050902,0xff091003,0xff0c1602,0xff081801,0x87020202,0x5a000000,0x36000000,
+ 0x1c000000,0x3a000000,0xff50712f,0xff0e1308,0xff080b04,0xff070a04,0xff060904,0xff060904,0xff060904,0xff060904,0xff060904,0xff060904,0xff060904,0xff060904,
+ 0xff060904,0xff060904,0xff060904,0xff070a04,0xff080b04,0xff080b05,0xff1b2610,0xff1c2710,0xff1a250f,0xff141c0c,0xff010300,0xff020600,0xff040b01,0xff061100,
+ 0xff081700,0x74000000,0x4e000000,0x2e000000,0x15000000,0x2e000000,0x4c000000,0x6f000000,0x8c040404,0xa0030303,0xae060606,0xb2060606,0xb4080808,0xb50b0b0b,
+ 0xb60e0e0e,0xb6121212,0xb8151515,0xb9171717,0xb9191919,0xb81c1c1c,0xb81c1c1c,0xb61c1c1c,0xb21d1d1d,0xad1d1d1d,0xa81a1a1a,0xa3191919,0x9f151515,0x9d101010,
+ 0x9c0b0b0b,0x9b080808,0x94050505,0x87020202,0x74000000,0x5c000000,0x3d000000,0x25000000,0xe000000,0x1d000000,0x31000000,0x48000000,0x5d030303,0x6c020202,
+ 0x75040404,0x79040404,0x7b080808,0x7c0a0a0a,0x7d0e0e0e,0x7d121212,0x7f161616,0x801a1a1a,0x811c1c1c,0x801c1c1c,0x801c1c1c,0x7e1c1c1c,0x7b1d1d1d,0x771c1c1c,
+ 0x731b1b1b,0x6e151515,0x6b111111,0x690c0c0c,0x68070707,0x67050505,0x63030303,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x8000000,0x11000000,
+ 0x1b000000,0x29000000,0x34000000,0x3e040404,0x44040404,0x46040404,0x47070707,0x470b0b0b,0x470b0b0b,0x480e0e0e,0x49111111,0x49151515,0x4b1b1b1b,0x4b1b1b1b,
+ 0x4b1b1b1b,0x4a1c1c1c,0x481c1c1c,0x46191919,0x44161616,0x410c0c0c,0x400c0c0c,0x3f080808,0x3e040404,0x3e040404,0x3b000000,0x36000000,0x2e000000,0x25000000,
+ 0x18000000,0xf000000
+};
+
+static const QRgb Calibrate_data[] = {
+ 0xffffff,0xffffff,0x1ffffff,0x3ffffff,0x5ffffff,0x8dfdfdf,0xdc4c4c4,0x13aeaeae,0x1ba1a1a1,0x258a8a8a,0x2f828282,0x39797979,0x41727272,0x486e6e6e,
+ 0x4d6a6a6a,0x51686868,0x51656565,0x4f646464,0x4b636363,0x45646464,0x3d646464,0x32666666,0x286c6c6c,0x1e6f6f6f,0x15797979,0xd898989,0x104f4f4f,0x4bfbfbf,
+ 0x1ffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1ffffff,0x3ffffff,0x6d5d5d5,0xacccccc,0x11b4b4b4,0x1aa7a7a7,0x26949494,0x33878787,0x417e7e7e,
+ 0x9c84939a,0xda74889d,0xf461749c,0xfd52659b,0xff48589b,0xff46599e,0xff4c5e9a,0xfd586c99,0xf5657b97,0xdd728791,0xa6758484,0x575e5e5e,0x495e5e5e,0x39626262,
+ 0x2a676767,0x4e1f1f1f,0xaa040404,0xffb0b0b0,0x5999999,0x2808080,0xffffff,0xffffff,0x1ffffff,0x3ffffff,0x6d5d5d5,0xbd1d1d1,0x14b3b3b3,0x209f9f9f,
+ 0x2e909090,0x3f868686,0xb681939e,0xf365799d,0xff596fa4,0xff6d89ab,0xff84a7af,0xff97c0b4,0xffa2d0b5,0xffa8d7b7,0xffa2d0b4,0xff97c1af,0xff87aeaa,0xff7696a3,
+ 0xff658199,0xf4657d8d,0xc3728384,0x5d5a5a5a,0x702e2e2e,0xf0020202,0xffc2c2c2,0xffa7a7a7,0xff636363,0x5999999,0x2808080,0xffffff,0x3ffffff,0x6d5d5d5,
+ 0xbd1d1d1,0x16aeaeae,0x229e9e9e,0x348e8e8e,0x8089999b,0xe97186a1,0xff647da7,0xff81a4b0,0xffa4d2ba,0xffb5e8bc,0xffbcf0bf,0xffbef4be,0xffbff6be,0xffbff6bc,
+ 0xffbef4bc,0xffb7edb7,0xffb3e7b5,0xffaadcae,0xff98c5a5,0xff7ca197,0xff638086,0xf249595e,0xf7040405,0xffc2c2c2,0xffaaaaaa,0xff6b6b6b,0xff2e2e2e,0xff0f0f0f,
+ 0x5999999,0x2808080,0x5ffffff,0xacccccc,0x14b3b3b3,0x229e9e9e,0x358c8c8c,0xa48697a0,0xf7687ca2,0xff7c9db0,0xffa4d2b9,0xffbbefc0,0xffc2f9c1,0xffc4fbc1,
+ 0xffc3fac0,0xffc3fac0,0xffc1f8be,0xffc0f7bd,0xffbdf4ba,0xffbbf1b8,0xffb6ebb3,0xffaee2ab,0xffa3d4a1,0xff90bc92,0xff050707,0xff060808,0xff8b89b4,0xff9b9ba6,
+ 0xff6b6b6b,0xff2f2e2e,0xff0b0b0b,0x8c070707,0xb747474,0x4808080,0x8dfdfdf,0x10afafaf,0x1f9c9c9c,0x338c8c8c,0xa38396a0,0xfa6379a2,0xff87aab2,0xffb3e5be,
+ 0xffc3fac2,0xffc6fdc3,0xffc5fcc2,0xffc4fbc1,0xffc2f9bf,0xffc1f8be,0xffc0f7bd,0xffbdf4ba,0xffbbf1b8,0xffb6ebb3,0xffaee2ab,0xffa4d5a1,0xff96c294,0xff919291,
+ 0xff080b08,0xffb8b8c0,0xff8d8ca3,0xff4d4d64,0xff2b2a2d,0xff0b0b0b,0xf1020202,0x541a1a1a,0x14595959,0x8606060,0xcbfbfbf,0x19a3a3a3,0x2c8b8b8b,0x7e88989a,
+ 0xf7667ca1,0xff87aab2,0xffb6e9be,0xffc6fdc3,0xffc5fcc2,0xffc5fcc2,0xffc4fbc1,0xffc3fac0,0xffc1f8be,0xffc0f7bd,0xffbdf4ba,0xffbaf0b7,0xffb5eab2,0xffaee2ab,
+ 0xffa3d4a0,0xff95c092,0xff0f1210,0xff080b08,0xffc2c2c2,0xffaaaaaa,0xff67676a,0xff27272d,0xff08080a,0xf8040404,0x7f252525,0x374a4a4a,0x1e4d4d4d,0xf555555,
+ 0x11a5a5a5,0x238a8a8a,0x3c7b7b7b,0xe97184a0,0xff7c9db0,0xffb3e5be,0xffc6fdc3,0xffc6fdc3,0xffc5fcc2,0xffc4fbc1,0xffc2f9bf,0xffc1f8be,0xffbff6bc,0xffbcf3b9,
+ 0xffb9efb6,0xffb4e9b1,0xfface0a9,0xffa1d29e,0xff95c192,0xff878b85,0xff080b08,0xffc2c2c2,0xffaaaaaa,0xff6b6b6b,0xff2f2f2f,0xff0b0b0b,0xff020303,0xf72e3a39,
+ 0x72414141,0x4c404040,0x2c404040,0x17434343,0x18959595,0x307a7a7a,0xb57f919c,0xff637ca6,0xffa4d1b8,0xffc2f9c1,0xffbdf4ba,0xff96cd93,0xff71a86e,0xff50874d,
+ 0xff356c32,0xff235a20,0xff2b6228,0xff3f763c,0xff5a9058,0xff7baf78,0xff98c996,0xff93be91,0xff202520,0xff090b08,0xffc2c2c2,0xffaaaaaa,0xff6b6b6b,0xff2f2e2e,
+ 0xff0b0b0b,0xff030403,0xff212d21,0xff33463c,0xd34c5c55,0x643b3b3b,0x3e3a3a3a,0x223c3c3c,0x217c7c7c,0x3c6f6f6f,0xf263779a,0xff80a2af,0xffb9edbe,0xff8ec58b,
+ 0xff5a9157,0xff5f965c,0xff80b77d,0xff9ad197,0xffb0e7ad,0xffb9f0b6,0xffa9dfa6,0xff8ac087,0xff679b64,0xff3c6d39,0xff366134,0xff787f78,0xff080a08,0xffa8a9a8,
+ 0xffa8a8a8,0xff6b6b6c,0xff2e2f2e,0xff0b0b0b,0xff030403,0xff243123,0xff3b523b,0xff425c48,0xf7475d56,0x7b363636,0x51323232,0x2f363636,0x29707070,0x977b8c93,
+ 0xff576da2,0xff94c1a6,0xff6ea56c,0xff659c62,0xff9ad197,0xffc1f8be,0xffc0f7bd,0xffbef5bb,0xffbbf2b8,0xffb9efb6,0xffb3e8b0,0xfface0a9,0xffa1d29e,0xff94bf91,
+ 0xff212720,0xff050704,0xffbdbdbd,0xff000000,0xff606160,0xff2e2e2e,0xff0b0b0b,0xff030403,0xff233022,0xff3c543b,0xff4c6b4b,0xff557857,0xff50715d,0xbe48554c,
+ 0x622f2f2f,0x3c2f2f2f,0x32616161,0xd8738598,0xff627e98,0xff5b8e5d,0xff7fb67c,0xffc0f7bd,0xffc1f8be,0xffa7dea4,0xff76ad73,0xff487f45,0xff235a20,0xff0b4108,
+ 0xff1b5018,0xff366834,0xff588456,0xff778178,0xff080b08,0xffc2c2c2,0xffa9a9a9,0xff686868,0xff000000,0xff111111,0xff030402,0xff222f21,0xff3b533a,0xff4c6a4a,
+ 0xff5a7f58,0xff618b60,0xff5c8663,0xe64e6458,0x722b2b2b,0x47282828,0x39555555,0xf35f7397,0xff466b5c,0xff77ab77,0xffc0f7bd,0xffbff6bc,0xff80b77d,0xff3d743a,
+ 0xff60975d,0xff84bb81,0xffa0d69d,0xffaee4ab,0xff93c690,0xff6b9a69,0xff192219,0xff030603,0xffc2c2c2,0xffaaaaaa,0xff6b6b6b,0xff2f2e2f,0xff0c0c0c,0xff020302,
+ 0xff202e1f,0xff395038,0xff486747,0xff587d56,0xff638e60,0xff689766,0xff629167,0xf74d6a5b,0x7f262626,0x53252525,0x3e4e4e4e,0xfd3b4e79,0xff456f51,0xffb9efb9,
+ 0xffbff6bc,0xff73aa70,0xff60975d,0xff9dd49a,0xffb9f0b6,0xffb5ebb2,0xffb1e7af,0xffabdfa8,0xff9ecf9c,0xff87b185,0xff1d261d,0xffc2c2c2,0xffaaaaaa,0xff6b6b6b,
+ 0xff2f2f2f,0xff0b0b0b,0xff010201,0xff152214,0xff364d35,0xff456343,0xff537851,0xff608b5d,0xff679765,0xff6a9b67,0xff649665,0xfd51745d,0x8a232323,0x5b222222,
+ 0x43484848,0xff1d2f45,0xff7aa888,0xffbbf1b9,0xff7eb57b,0xff60975d,0xffb9f0b6,0xffb9f0b6,0xff8ec58b,0xff548a51,0xff245921,0xff063904,0xff1b4a19,0xff152515,
+ 0xffbfbfbf,0xffaaaaaa,0xff6b6b6b,0xff2e2f2e,0xff0b0b0b,0xff020302,0xff162315,0xff112810,0xff3e5c3c,0xff4f744d,0xff5a8558,0xff639260,0xff679a64,0xff689d65,
+ 0xff629761,0xff537f5b,0x92212121,0x61202020,0x45434343,0xff1c2f3e,0xffa3d3b2,0xffa2d99f,0xff3e753b,0xff9cd399,0xffb8efb5,0xff7bb278,0xff356c32,0xff659b62,
+ 0xff89be86,0xff97c894,0xff486547,0xff0c140c,0xffb6b6b6,0xff6b6b6b,0xff2e2e2e,0xff0b0b0b,0xff010200,0xff192718,0xff324a31,0xff173616,0xff355a33,0xff558052,
+ 0xff5d8c5a,0xff62955f,0xff659a62,0xff649b61,0xff5e945d,0xff548459,0x961f1f1f,0x651c1c1c,0x443c3c3c,0xff2f4264,0xff9eccaf,0xff73aa71,0xff639a60,0xffb7eeb4,
+ 0xff91c88e,0xff397036,0xff96cc93,0xffabe1a8,0xffa2d69f,0xff93c391,0xff040504,0xffbfbfbf,0xff6b6b6b,0xff232423,0xff0b0b0b,0xff0a0e0a,0xff0f1d0e,0xff1c351b,
+ 0xff3d5b3b,0xff2b5029,0xff2a5527,0xff588755,0xff5d8f5a,0xff60955d,0xff60975e,0xff5d945a,0xff5a8f59,0xff4e7b53,0x971b1b1b,0x65191919,0x42363636,0xfd465a7f,
+ 0xff92bcaa,0xff497e47,0xff86bd83,0xffb5ecb2,0xff5c9359,0xff6ba268,0xffade3aa,0xff85bb82,0xff3c703a,0xff0a3908,0xff000000,0xff636363,0xff191919,0xff0a120a,
+ 0xff040704,0xff273927,0xff253f24,0xff143312,0xff456b43,0xff3c673a,0xff1e4d1b,0xff588b55,0xff5b9058,0xff5d935a,0xff5b9258,0xff598e56,0xff548952,0xfd446a4a,
+ 0x94181818,0x64171717,0x3e313131,0xf45a708a,0xff83a9a4,0xff295e27,0xffa0d79d,0xffb2e9af,0xff336a30,0xff91c88e,0xfface2a9,0xff437940,0xff063903,0xff033201,
+ 0xff000000,0xff000000,0xff040504,0xff192719,0xff0b2409,0xff3c593a,0xff395b37,0xff0b3209,0xff4a7648,0xff497946,0xff144711,0xff558a52,0xff578d54,0xff568d53,
+ 0xff568c53,0xff538950,0xff4d824b,0xf73d5c43,0x8f151515,0x5e161616,0x372e2e2e,0xd9677d87,0xff72939f,0xff154913,0xffafe6ac,0xffb0e7ad,0xff195016,0xffa8dfa5,
+ 0xffa9dfa6,0xff144911,0xff073a04,0xff043502,0xff022e00,0xff072d05,0xff537551,0xff476845,0xff022300,0xff476c45,0xff487146,0xff043102,0xff4d7d4a,0xff4e824c,
+ 0xff0e440c,0xff52884f,0xff50874d,0xff51874e,0xff50874d,0xff4c834a,0xff497f48,0xea344d3b,0x86131313,0x57121212,0x302b2b2b,0x9f607273,0xff638096,0xff1f4f1f,
+ 0xff9ad198,0xffade4aa,0xff2f662c,0xff8ec58b,0xffa6dca3,0xff437940,0xff093d06,0xff053803,0xff043302,0xff295427,0xff5d855a,0xff456d43,0xff113a0e,0xff507b4d,
+ 0xff457442,0xff0e400c,0xff4e824b,0xff487d45,0xff154b12,0xff4d844a,0xff4d834a,0xff4c8349,0xff4a8147,0xff477e45,0xff427342,0xc929382c,0x79111111,0x4e101010,
+ 0x26282828,0x46212121,0xf2617888,0xff2f5938,0xff77ac77,0xffabe2a8,0xff548b51,0xff659c62,0xffa2d99f,0xff7cb279,0xff3e733b,0xff0f430c,0xff31642f,0xff598956,
+ 0xff659463,0xff356433,0xff295927,0xff558652,0xff3a6d38,0xff1e521b,0xff4d824a,0xff3c7339,0xff1d531a,0xff4a8047,0xff498046,0xff498046,0xff457c42,0xff427840,
+ 0xf7335338,0x970f0f0f,0x6b0e0e0e,0x410c0c0c,0x1d232323,0x391f1f1f,0xb8607473,0xff42645d,0xff497a4d,0xffa7dea5,0xff82b97f,0xff31682e,0xff86bd83,0xff96cd93,
+ 0xff8fc68c,0xff87bc84,0xff7bb079,0xff73a770,0xff598c56,0xff1b4e18,0xff477b44,0xff588c55,0xff2a5f27,0xff2f652c,0xff4b8148,0xff2f662c,0xff285f25,0xff477e44,
+ 0xff457c42,0xff437a40,0xff42783f,0xff3d6f3d,0xd9283b2d,0x840e0e0e,0x590b0b0b,0x350a0a0a,0x15242424,0x29191919,0x49151515,0xeb5b727b,0xff1e4922,0xff80b483,
+ 0xffa1d89e,0xff689f65,0xff2d642a,0xff568c53,0xff73a970,0xff7eb57c,0xff659b62,0xff42783f,0xff1e541b,0xff41773e,0xff5c9159,0xff477d44,0xff164c13,0xff40773e,
+ 0xff497f46,0xff1f561c,0xff31682e,0xff437a40,0xff41783e,0xff40773d,0xff3d743b,0xf32e4b32,0x970c0c0c,0x6e090909,0x470b0b0b,0x27070707,0xd272727,0x1e1a1a1a,
+ 0x36131313,0x88495852,0xf948626d,0xff39663f,0xff93c894,0xff94cb91,0xff6fa66c,0xff42793f,0xff1f561c,0xff0b4208,0xff1c5219,0xff356b32,0xff4f864c,0xff5f965c,
+ 0xff578e54,0xff275e24,0xff31682e,0xff487f45,0xff356c32,0xff195016,0xff3e753b,0xff3f763c,0xff3e753b,0xff3c733a,0xfb335435,0xbd1c241e,0x7d080808,0x57090909,
+ 0x350a0a0a,0x1c090909,0x7242424,0x120e0e0e,0x250e0e0e,0x400c0c0c,0xac52625f,0xfb3e5a5f,0xff35633a,0xff70a571,0xff89c087,0xff84bb81,0xff7eb57b,0xff77ae74,
+ 0xff71a86e,0xff6aa067,0xff62985f,0xff4b8148,0xff265d23,0xff2b6228,0xff4b8248,0xff447b41,0xff1d541a,0xff2c6329,0xff3d743a,0xff3c7339,0xff3b7239,0xfb305531,
+ 0xd0213024,0x86060606,0x61050505,0x3f040404,0x24070707,0x11000000,0x3000000,0xb171717,0x170b0b0b,0x2c0c0c0c,0x47070707,0xae4b5b56,0xf9425d5f,0xff174518,
+ 0xff386b38,0xff568c55,0xff6aa067,0xff70a76d,0xff5e955b,0xff467d43,0xff2d642a,0xff144b11,0xff32692f,0xff4c8349,0xff487f45,0xff285f25,0xff1d541a,0xff3d743a,
+ 0xff3b7138,0xff397037,0xfa2e5131,0xd0202d24,0x89040404,0x67050505,0x47040404,0x2b060606,0x16000000,0xa000000,0x1000000,0x5000000,0xd000000,0x1b090909,
+ 0x2f050505,0x49030303,0x9236423d,0xed4b6461,0xff3a6346,0xff215122,0xff0f430d,0xff033900,0xff0e440b,0xff1e551b,0xff32692f,0xff467d43,0xff4d844a,0xff487f45,
+ 0xff275e24,0xff194f16,0xff356c33,0xff3a7038,0xff376835,0xf22a462d,0xbc18221a,0x85020202,0x67020202,0x49030303,0x2e000000,0x1a000000,0xd000000,0x5000000,
+ 0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x2e000000,0x47040404,0x61030303,0xc3415249,0xf349675a,0xff578063,0xff5a8a61,0xff598b5c,0xff568a57,
+ 0xff538851,0xff4e844d,0xff366c34,0xff194f17,0xff1c511a,0xff376d36,0xff3a6a39,0xf72b4b2f,0xd8223426,0x94020202,0x7c020202,0x60000000,0x46000000,0x2e000000,
+ 0x1b000000,0xe000000,0x6000000,0x2000000,0xffffff,0x1000000,0x2000000,0x7000000,0xe000000,0x1a000000,0x2a000000,0x3e000000,0x55000000,0x6c000000,
+ 0xb6314039,0xe23e5648,0xf63d5a4b,0xfd355a44,0xff295432,0xff174817,0xff15421e,0xfd284f34,0xf7315236,0xe82b422e,0xc71d2c20,0x93000000,0x81000000,0x6c000000,
+ 0x55000000,0x3e000000,0x2a000000,0x1a000000,0xe000000,0x7000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,
+ 0x16000000,0x23000000,0x33000000,0x45000000,0x56000000,0x67000000,0x75000000,0x81000000,0x89000000,0x8e000000,0x90000000,0x8e000000,0x89000000,0x81000000,
+ 0x75000000,0x67000000,0x56000000,0x45000000,0x33000000,0x23000000,0x16000000,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,0x33000000,0x3f000000,0x4a000000,0x53000000,0x59000000,0x5e000000,
+ 0x5f000000,0x5e000000,0x59000000,0x53000000,0x4a000000,0x3f000000,0x33000000,0x26000000,0x1b000000,0x11000000,0xa000000,0x5000000,0x2000000,0x1000000,
+ 0xffffff,0xffffff
+};
+
+static const QRgb CityTime_data[] = {
+ 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
+ 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
+ 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff05034a,0xff05034b,0xff05034c,0xff05034d,
+ 0xff05034d,0xff05034e,0xff05034e,0xff05034e,0xff05034d,0xff05034c,0xff050349,0xff040347,0xff040244,0xff040240,0xff03023c,0xff030238,0xff030233,0xff02012f,
+ 0xff02012a,0xff020128,0xff010124,0xff010121,0xff01011d,0xff01001a,0xff000016,0xff000013,0xff000012,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
+ 0xff05034e,0xff838393,0xff848495,0xff878797,0xff898999,0xff898999,0xff898999,0xff898999,0xff878797,0xff848495,0xff7f7f90,0xff77778a,0xff707083,0xff67677c,
+ 0xff5d5d73,0xff53536a,0xff474760,0xff3b3b56,0xff30304d,0xff282846,0xff1f1f3e,0xff171736,0xff101030,0xff070729,0xff020224,0xff010122,0xff000012,0x5c000000,
+ 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff050354,0xff8e8e9d,0xff9191a0,0xff9393a2,0xff9595a3,0xff9696a4,0xff9696a4,0xff9397a7,0xff92a1b5,0xff8cadca,
+ 0xff8ab7dc,0xff8bbfe6,0xff83b9e0,0xff7baace,0xff6e8bac,0xff5d6985,0xff4a4b65,0xff3d3d57,0xff31314d,0xff262644,0xff1c1c3b,0xff121233,0xff09092b,0xff040426,
+ 0xff030324,0xff020222,0xff000011,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff06045a,0xff9c9ca9,0xff9f9fac,0xffa1a1ae,0xffa3a3b0,0xffa2a5b3,
+ 0xff96b7d1,0xff95cced,0xff90d6f9,0xff8ad6fc,0xff69bfee,0xff4ba8dc,0xff7ecff9,0xff89d7fa,0xff7dcff8,0xff6cbdec,0xff5e9ccc,0xff506688,0xff333451,0xff272745,
+ 0xff1a1a3a,0xff0f0f30,0xff080829,0xff060626,0xff040424,0xff030322,0xff000011,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff070461,0xffababb6,
+ 0xffaeaeb9,0xffb1b1bb,0xff85accc,0xff5bb0d3,0xffa4eafa,0xffb6f5ff,0xff93e6f6,0xff8de1f9,0xff67c9e8,0xff33a1c2,0xff83d8f3,0xff87dbf1,0xff8fe0f8,0xff8ddcf8,
+ 0xff6ec7ec,0xff49addc,0xff4f95c9,0xff3f5275,0xff1b1b3a,0xff121232,0xff0c0c2c,0xff080827,0xff060624,0xff040421,0xff000010,0x93000000,0x62000000,0x3b000000,
+ 0x1f000000,0x3d000000,0xff070468,0xffbbbbc4,0xffb9bdc9,0xff72aed0,0xff0d7e9d,0xff83d8dd,0xffcefdfe,0xff7fbec1,0xff337570,0xff74bbb7,0xffc1faff,0xffb4f1fd,
+ 0xffb1eefb,0xffafedfa,0xffa8ebfa,0xffa4e9fa,0xffa0e8ff,0xff62c3da,0xff03709f,0xff309add,0xff4a6e95,0xff191a38,0xff121230,0xff0c0c2a,0xff080825,0xff050522,
+ 0xff000010,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08056f,0xffc7cad3,0xff73b9d9,0xff047589,0xff127577,0xff68b3a8,0xff397e69,0xff0e451c,
+ 0xff317042,0xffa2dfd4,0xff9ce3d6,0xffbbf0f4,0xffb9f1f8,0xffb1eef8,0xffacebfa,0xffa8eafa,0xffa9edfe,0xff89dbec,0xff0d6b82,0xff027cb4,0xff57c5f5,0xff6190b6,
+ 0xff181935,0xff11112d,0xff0b0b27,0xff070721,0xff000010,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff080577,0xff9cd4eb,0xff1e8c8e,0xff0b665e,
+ 0xff186957,0xff0d522f,0xff13541f,0xff8cc1a9,0xffd4f9f7,0xffd4fbfe,0xffa1e2d5,0xffbef0f2,0xffbff1f7,0xffb6eff7,0xffb1edf7,0xffaaeaf8,0xffa7eafb,0xff97e3fb,
+ 0xff6bc5e4,0xff62c4e8,0xff49bbe8,0xff67ccf8,0xff527697,0xff171731,0xff0f0f29,0xff0a0a23,0xff000010,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff080583,0xff58babd,0xff127a5d,0xff1b663b,0xff196026,0xff125511,0xff88c09e,0xffefffff,0xffdffbfe,0xffd4f8fa,0xffd3f9fd,0xffc8f5f8,0xffc3f2f7,0xffbdf1f6,
+ 0xffb6eef6,0xffafebf8,0xffaae8f9,0xff98e3fb,0xff7edbff,0xff52b1d3,0xff036d9f,0xff0b8cd6,0xff57b8ed,0xff394b68,0xff14142d,0xff0d0d26,0xff000011,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff080687,0xff38a08b,0xff116637,0xff1a6329,0xff16641a,0xff62b27f,0xffe1fcfa,0xffe5fcfd,0xffdcf8fb,0xffd7f8fa,
+ 0xffd2f6f8,0xffcdf6f7,0xffc7f4f7,0xffc1f2f7,0xffb9eff6,0xffb1ecf7,0xffabe9f8,0xffa4e8f9,0xff97e8ff,0xff4ea5b5,0xff045573,0xff0071c6,0xff098bdb,0xff63afe0,
+ 0xff1d1f37,0xff111127,0xff000012,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff07057c,0xff198156,0xff287946,0xff9adccf,0xffa8e0cd,0xffd4f9f5,
+ 0xffebfcfe,0xffe2fafa,0xffdef9fa,0xffdaf8fa,0xffd6f7f9,0xffd1f6f8,0xffcbf5f7,0xffc4f2f7,0xffbdf0f6,0xffb4edf6,0xfface9f7,0xffa8e9f9,0xffabeeff,0xff6fb6b9,
+ 0xff075360,0xff0072bc,0xff0084d7,0xff249ee5,0xff415c7b,0xff16162b,0xff010013,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff07067a,0xff298f53,
+ 0xff95d3b8,0xfff0ffff,0xffeefeff,0xffe6fafc,0xffe5faf9,0xffe3fafc,0xffe1f9fc,0xffddf9fa,0xffd9f7f9,0xffd4f6f8,0xffcef5f8,0xffc7f4f8,0xffc0f0f6,0xffb7eef5,
+ 0xffaeebf6,0xffa8e7f8,0xffacecfd,0xff82cbd3,0xff0c5453,0xff01679a,0xff0085d8,0xff018dde,0xff4595cc,0xff1a1a2e,0xff010014,0x99000000,0x66000000,0x3d000000,
+ 0x1f000000,0x3d000000,0xff090688,0xff70c998,0xffd6f7f0,0xffe9fbfb,0xffeffcfe,0xffaee3ce,0xffb8e8db,0xff9bd8c4,0xffe3fcfd,0xffe1f9fb,0xffdbf8f9,0xffd8f7f8,
+ 0xffcff5f7,0xffc9f3f6,0xffc2f1f6,0xffbaeff5,0xffb0ebf6,0xffaae8f8,0xffa8e8fb,0xff9ce3f4,0xff256250,0xff014f60,0xff017ecd,0xff008be0,0xff1391d8,0xff1f1f31,
+ 0xff010015,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff09068a,0xff75c39a,0xff3fa666,0xff8dd0af,0xfff8ffff,0xffd8f5ee,0xffe0fbf8,0xffd6f6f3,
+ 0xffe5fafb,0xffe3fafb,0xffd9f7fb,0xffcbf5f8,0xffcef5f7,0xffc9f4f7,0xffc3f2f6,0xffbbeff5,0xffb2ecf6,0xffabe8f7,0xffa5e7f8,0xffa8ebfc,0xff75bac4,0xff0e4f48,
+ 0xff005c95,0xff007acf,0xff0283d1,0xff242435,0xff010116,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff090689,0xffbae7d7,0xff7bc9a0,0xff8dd0b1,
+ 0xffc7eadf,0xfff3ffff,0xffe2f8f5,0xffe7fbfa,0xffe7fdfe,0xffedffff,0xffdbfafc,0xffc2f4f9,0xffc9f4f6,0xffcaf4f6,0xffc3f2f6,0xffbceff5,0xffb4ecf6,0xfface8f6,
+ 0xffa5e6f6,0xffa1e4f7,0xffa5ecfe,0xff70bdcc,0xff4fa5c1,0xff4db3df,0xff0881c6,0xff292939,0xff010117,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff090688,0xffeefdfe,0xfff6ffff,0xffdbf5f2,0xffabe6d3,0xff7bb59d,0xff255a2c,0xff3d8753,0xff3d8a52,0xff7bb89d,0xffddfbfb,0xffdfffff,0xffd2fafb,0xffcbf5f7,
+ 0xffc5f2f6,0xffbceff5,0xffb4ecf6,0xfface8f6,0xffa5e6f6,0xff9fe3f6,0xff9ae2f8,0xff9be7fe,0xff9fedff,0xff8ee2fc,0xff1584bf,0xff2d2d3c,0xff010118,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff090688,0xffe6f9f9,0xffe8f9fa,0xffebfbfc,0xfff6ffff,0xff91b8a5,0xff165b1d,0xff20752c,0xff1b6a19,0xff155d18,
+ 0xff397b50,0xff548d75,0xffbceded,0xffddfeff,0xffcbf9fe,0xffc0f1f9,0xffb4ecf4,0xffabe7f5,0xffa4e5f6,0xff9ee2f5,0xff98e0f6,0xff93dff8,0xff90e0fd,0xff8ce1fe,
+ 0xff278ebd,0xff31313f,0xff01011a,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff090688,0xffe6f9fa,0xffe5f9fa,0xffe6fafb,0xfff4feff,0xffa2d4be,
+ 0xff27873f,0xff29842f,0xff267423,0xff246720,0xff185515,0xff0a370a,0xff3c755a,0xff9ed6d1,0xffa5e0e0,0xffb9f2f8,0xffb8f1fa,0xffabe8f6,0xffa3e5f5,0xff9de2f5,
+ 0xff98e0f6,0xff92def7,0xff8edefc,0xff8ee3ff,0xff43a0c6,0xff333341,0xff01011b,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff090687,0xffe5f9f9,
+ 0xffe4f9fa,0xffe5f9fb,0xfff4ffff,0xff88c6ab,0xff1e7037,0xff24782a,0xff277125,0xff205f1f,0xff1e571d,0xff1f531b,0xff124212,0xff0f3f18,0xff154923,0xff26604c,
+ 0xff93d6de,0xffb0edfc,0xffa2e4f5,0xff9de1f4,0xff97dff6,0xff91ddf7,0xff8edefc,0xff8de0fe,0xff46a4cb,0xff353542,0xff01011b,0x99000000,0x66000000,0x3d000000,
+ 0x1f000000,0x3d000000,0xff090687,0xffe2fafa,0xffe1f9fa,0xffe2f8f9,0xffefffff,0xffb0ddd1,0xff2a764b,0xff206c2c,0xff287839,0xff236729,0xff1e511c,0xff1f511b,
+ 0xff1e501d,0xff19461a,0xff0f340d,0xff1a452d,0xff96d8e2,0xffadedfc,0xffa0e2f4,0xff9be0f5,0xff95def6,0xff8fdcf7,0xff8cddfb,0xff89dcfd,0xff339dcb,0xff363643,
+ 0xff01011c,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff090687,0xffdef8fa,0xffdff9fa,0xffdff9fa,0xffe3fbfd,0xffe7f9fb,0xff577c75,0xff125826,
+ 0xff2f894a,0xff1f5c2e,0xff1e541d,0xff1c491a,0xff1c4c1c,0xff1b4c1d,0xff0b330d,0xff639d97,0xffbdf8ff,0xffa5e6f6,0xff9fe1f4,0xff9ae0f4,0xff93ddf5,0xff8edbf7,
+ 0xff8bdcfb,0xff7ed6f8,0xff319dcf,0xff363643,0xff01011c,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff080687,0xffd9f8fa,0xffdaf8fa,0xffdcf8fb,
+ 0xffdcf9fb,0xffe6fefe,0xffc6dce5,0xff32574d,0xff135024,0xff216739,0xff1b4f26,0xff1e4e1c,0xff1d4a1c,0xff194918,0xff072908,0xff67a5a1,0xffb7f6ff,0xffa1e3f6,
+ 0xff9de0f4,0xff98e0f4,0xff91dbf5,0xff8cd9f7,0xff88dafb,0xff6ecbf3,0xff4185b0,0xff353542,0xff01011b,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff080686,0xffd2f6fb,0xffd3f7fa,0xffd6f7fa,0xffd7f7fa,0xffd5f8fa,0xffddfeff,0xffd0f3f7,0xff5c8483,0xff165422,0xff1f6026,0xff1d501d,0xff1b4a1a,0xff1a4c22,
+ 0xff4b8979,0xff9adbe9,0xffaaeafb,0xff9ee1f4,0xff99e0f5,0xff94ddf4,0xff88d6f4,0xff81d3f6,0xff7fd5fb,0xff64c2f3,0xff48596d,0xff333341,0xff01011b,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff070687,0xffc7f4f9,0xffccf5fa,0xffcef6f9,0xffcff6f8,0xffcff7f8,0xffccf6fa,0xffd7fdff,0xffb3eced,0xff194b33,
+ 0xff184a1b,0xff1a4a1a,0xff0e3c0d,0xff518d79,0xffc1fbff,0xffacecfc,0xff9fe1f5,0xff9bdff4,0xff97def4,0xff87d5f2,0xff6ac5ee,0xff6ec8f3,0xff72ccf8,0xff5f9bc3,
+ 0xff454551,0xff30303e,0xff010119,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff090689,0xffb0eaf9,0xffc2f3f9,0xffc2f2f9,0xffbbf0f8,0xffc1f1f7,
+ 0xffc5f3f8,0xffc9f7fc,0xffb2e9ed,0xff195742,0xff15441e,0xff154116,0xff0b3010,0xff72b4b5,0xffb2f3ff,0xffa1e3f5,0xff9ce0f4,0xff97def4,0xff92dcf4,0xff79cff2,
+ 0xff5ebeed,0xff6cc7f5,0xff63b5e5,0xff585d6a,0xff40404d,0xff2d2d3c,0xff010118,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff0a068a,0xffcdecfc,
+ 0xfface9fa,0xffb3edf9,0xff8eddf9,0xff92e0f7,0xffb6edf7,0xffbef3fb,0xffb3eff6,0xff206254,0xff0c3810,0xff2b664e,0xff76bac2,0xff9ce4f7,0xff9fe3f8,0xff9adff4,
+ 0xff95ddf3,0xff91dbf4,0xff8edbf5,0xff82d3f6,0xff74c9f5,0xff63bdf1,0xff67798c,0xff52525e,0xff3c3c4a,0xff292938,0xff010117,0x87000000,0x5a000000,0x36000000,
+ 0x17000000,0x2e000000,0xff0a068a,0xff0a068a,0xff080688,0xff060587,0xff060587,0xff050586,0xff070586,0xff070688,0xff070688,0xff02033b,0xff01010f,0xff04045f,
+ 0xff07068a,0xff060587,0xff060585,0xff060584,0xff060584,0xff060585,0xff050586,0xff050586,0xff040480,0xff050359,0xff04023c,0xff030230,0xff020125,0xff02011d,
+ 0xff010116,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
+ 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,
+ 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
+ 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
+ 0x18000000,0xf000000
+};
+
+static const QRgb Clock_data[] = {
+ 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
+ 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
+ 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff040264,0xff040263,0xff040263,0xff040262,
+ 0xff040262,0xff040261,0xff040261,0xff040260,0xff04025f,0xff04025f,0xff04025e,0xff03025d,0xff03025c,0xff03025b,0xff030259,0xff030259,0xff020158,0xff020156,
+ 0xff020155,0xff020154,0xff020152,0xff010151,0xff010150,0xff01004e,0xff01004c,0xff00004a,0xff000047,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
+ 0xff040262,0xff6a68b6,0xff6765b4,0xff6563b2,0xff6260b0,0xff5f5dad,0xff5b59aa,0xff5957a9,0xff5655a7,0xff5452a6,0xff504ea4,0xff4c4aa1,0xff4946a0,0xff46439f,
+ 0xff413e9d,0xff3e3b9d,0xff38359b,0xff312e9a,0xff2c2897,0xff272396,0xff211e94,0xff1b1891,0xff161290,0xff0e0a8c,0xff0a0688,0xff090683,0xff000045,0x5c000000,
+ 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff040261,0xff6361b1,0xff5f5dae,0xff5a58a9,0xff5453a5,0xff504ea1,0xff4b4a9e,0xff47459a,0xff454499,0xff424096,
+ 0xff3f3d95,0xff3d3a93,0xff393792,0xff363491,0xff343291,0xff322f92,0xff2d2a91,0xff282591,0xff242090,0xff1f1b90,0xff1a178f,0xff14108d,0xff0d098a,0xff0a0687,
+ 0xff090683,0xff09057e,0xff000042,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff04025e,0xff5a58a9,0xff5250a3,0xff4a499d,0xff474778,0xff49495b,
+ 0xff4e4e46,0xff555539,0xff5c5c33,0xff5f5f38,0xff64633d,0xff686842,0xff64654e,0xff5c5c5b,0xff504f6a,0xff3c3a77,0xff222085,0xff1f1c86,0xff1a1787,0xff171589,
+ 0xff120f89,0xff0c0988,0xff0a0685,0xff090682,0xff09057e,0xff09057a,0xff00003f,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff030259,0xff4c4a9e,
+ 0xff48466f,0xff4b4a45,0xff565626,0xff93936b,0xffc0c0a4,0xffdfdfce,0xfff2f2e9,0xfff4f4ef,0xfff8f9f4,0xfff4f4ec,0xffe4e4d5,0xffcdcdb6,0xffacac8e,0xff828260,
+ 0xff62626a,0xff3d3b74,0xff12107c,0xff0f0c7f,0xff0b0880,0xff090581,0xff090680,0xff09067d,0xff090579,0xff080575,0xff00003d,0x93000000,0x62000000,0x3b000000,
+ 0x1f000000,0x3d000000,0xff03024b,0xff484853,0xff525225,0xff9e9e7a,0xffd9d9c6,0xffffffff,0xffffffff,0xfffbfbf9,0xffd4d4c1,0xffb6b696,0xffc3c3a9,0xffeeeee7,
+ 0xffffffff,0xffffffff,0xffffffff,0xffe6e6d7,0xffbfbfa6,0xff8d8d71,0xff585774,0xff1c1a75,0xff070478,0xff070579,0xff080579,0xff090578,0xff090575,0xff080571,
+ 0xff00003a,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff030225,0xff727244,0xffc6c6aa,0xfff8f8f5,0xfff8f8f5,0xfffdfdfd,0xffffffff,0xfff2f2ec,
+ 0xffb4b391,0xffb0b08c,0xffb2b38f,0xffd2d2bd,0xffffffff,0xfffffffe,0xfffefefe,0xfffbfbf9,0xfffbfbf9,0xffddddcc,0xffadae93,0xff6d6c7b,0xff242273,0xff070470,
+ 0xff080472,0xff080572,0xff080570,0xff08056c,0xff000038,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff05032c,0xffd5d5c5,0xffe7e8df,0xffbcbca3,
+ 0xffb2b292,0xffd8d8c7,0xfffefefd,0xfff4f4f0,0xffb4b492,0xffa8a88d,0xffb4b490,0xffd2d2bb,0xfffffffe,0xfff7f7f2,0xffd7d7c3,0xffc6c6ac,0xffdfdfd1,0xfffcfcfa,
+ 0xffe6e6dd,0xffbcbca6,0xff737382,0xff1c1a6d,0xff07046a,0xff07046c,0xff07056a,0xff080567,0xff000036,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff08056a,0xfffcfcfb,0xffcdcdbb,0xffa7a784,0xffabab88,0xffb9b998,0xfff9f9f7,0xfff8f8f7,0xffcecebc,0xff77768f,0xffc2c2a8,0xffeaeae3,0xfffdfdfd,0xffddddca,
+ 0xffbbba96,0xffb7b792,0xffb8b796,0xffedece4,0xfffffffe,0xffe7e7df,0xffbdbca8,0xff656481,0xff050361,0xff060464,0xff070466,0xff070464,0xff000034,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a0687,0xfffafaf8,0xffddddd0,0xffafaf8e,0xffafaf8b,0xffc8c7ad,0xfffafaf7,0xfff3f3f3,0xffe7e7e6,0xff605da8,
+ 0xffe3e3e1,0xfff2f2f2,0xfffcfcfa,0xffd6d5bc,0xffbfbf9a,0xffbcbb96,0xffb7b793,0xffe4e4d8,0xfffffffe,0xffffffff,0xffe6e6db,0xffb2b2a1,0xff434174,0xff06045d,
+ 0xff06035f,0xff06045e,0xff000032,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08055f,0xffd8d8ca,0xffeeeee7,0xffdfdfd1,0xffd6d6c3,0xfff0f0e8,
+ 0xfffefefd,0xffefefef,0xffdddddd,0xff312e97,0xffd7d7d9,0xffececec,0xfffcfcfa,0xffe9e9db,0xffc6c6a3,0xffbfbf9a,0xffc5c4a6,0xfff1f1eb,0xfff9f9f6,0xfffbfbf9,
+ 0xfffcfcfc,0xffdadacc,0xff848491,0xff060455,0xff060358,0xff060458,0xff00002f,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff060443,0xffacac8d,
+ 0xffe4e4d9,0xfffefefd,0xfffdfdfc,0xffffffff,0xfffefefe,0xffececec,0xffd4d4d4,0xff17148e,0xffb2b2c5,0xffe6e6e6,0xfffcfcfc,0xfffbfbf8,0xffeeeee3,0xffe5e5d5,
+ 0xfff0f0e8,0xffe2e2d4,0xffc0bfa1,0xffbebea1,0xffe0e0d4,0xffeeeee7,0xffc7c6b7,0xff39386c,0xff050351,0xff050353,0xff00002c,0x99000000,0x66000000,0x3d000000,
+ 0x1f000000,0x3d000000,0xff060444,0xffadad8e,0xffe3e3d8,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xffe8e8e8,0xffc5c5ca,0xff0a068a,0xff908fb3,0xffdfdfdf,
+ 0xfff9f9f9,0xffffffff,0xfffefefd,0xffffffff,0xfff9f9f5,0xffc7c7a9,0xffb3b38f,0xffaeae8a,0xffb9b99c,0xfff3f3ef,0xffdeddd1,0xff6b6a86,0xff04034b,0xff05034d,
+ 0xff00002a,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff080560,0xffd9d9cb,0xfff7f7f3,0xffffffff,0xffffffff,0xffffffff,0xfffcfcfc,0xffe3e3e3,
+ 0xffa7a7ba,0xff0a068a,0xff7271a6,0xffd9d9d9,0xfff7f7f7,0xffffffff,0xffffffff,0xffffffff,0xfffcfcfa,0xffd2d2ba,0xffb4b490,0xffafaf8c,0xffc2c1a8,0xfff5f5f1,
+ 0xffedece5,0xff9797a2,0xff040346,0xff050249,0xff000028,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a0687,0xfffdfdfd,0xffffffff,0xffffffff,
+ 0xffffffff,0xffffffff,0xfffafafa,0xffdfdfdf,0xff8c8bad,0xff0a068a,0xff57559b,0xffd4d4d4,0xfff4f4f4,0xffffffff,0xffffffff,0xffffffff,0xfffefefd,0xfff2f2ea,
+ 0xffd5d5c1,0xffcfcfba,0xffe9e9e0,0xfffdfdfc,0xfff7f7f2,0xffbdbcbc,0xff040242,0xff040245,0xff000026,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff0a068a,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff7f7f7,0xffdadada,0xff706fa1,0xff0a068a,0xff3b3992,0xffcecece,0xfff1f1f1,0xffffffff,
+ 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfc,0xffefefe8,0xffd7d7c7,0xffe0e0d4,0xfff2f2ed,0xffd8d8d1,0xff03023e,0xff040242,0xff000024,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a068a,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff5f5f5,0xffd6d6d6,0xff5a5899,0xff0a068a,
+ 0xff2a278e,0xffcacaca,0xffefefef,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff9faf7,0xffc5c5ab,0xffa7a784,0xffa2a280,0xffbebfaa,0xffd6d6d0,
+ 0xff03023a,0xff04023f,0xff000023,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a068a,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+ 0xfff5f5f5,0xffd7d7d7,0xff494696,0xff0a068a,0xff15118b,0xffc3c3c3,0xffe4e4e4,0xfff5f5f5,0xfff8f8f8,0xfffcfcfc,0xfffefefe,0xffffffff,0xfff6f6f1,0xffb2b292,
+ 0xffa5a482,0xff9f9f7d,0xff9f9f81,0xffd3d4cf,0xff030239,0xff04023c,0xff000022,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a068a,0xffffffff,
+ 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff8f8f8,0xffdddddd,0xff5c5a9f,0xff0a068a,0xff2b288f,0xffb9b9b9,0xffcbcbcb,0xffd6d6d6,0xffdddddd,0xffe9e9e9,
+ 0xfff2f2f2,0xfff8f8f8,0xfff8f8f6,0xffd1d1bf,0xffa7a786,0xffa1a180,0xffbdbdac,0xffdfdfdc,0xff030238,0xff04023c,0xff000021,0x99000000,0x66000000,0x3d000000,
+ 0x1f000000,0x3d000000,0xff0a068a,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xffe9e9e9,0xffcacace,0xff272492,0xff9595ac,0xff8c8ba8,
+ 0xff1c188e,0xff4b4898,0xff8786aa,0xffc8c8c8,0xffd8d8d8,0xffe6e6e6,0xfff1f1f1,0xfff1f1ee,0xfff2f2ee,0xfff5f5f1,0xfff8f8f5,0xffd0d0d4,0xff030238,0xff04023c,
+ 0xff000021,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a068a,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfff5f5f5,
+ 0xffebebeb,0xffd0d0d7,0xffcccccc,0xff3c3996,0xff0a068a,0xff0a068a,0xff0a068a,0xff16128d,0xff5350a0,0xff9b9abe,0xffcfcfc6,0xffc3c3b1,0xffe3e3db,0xfffefefe,
+ 0xfffafaf8,0xffadacba,0xff030239,0xff04023c,0xff000022,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a068a,0xffffffff,0xffffffff,0xffffffff,
+ 0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffafafa,0xfff2f2f2,0xffe3e3e3,0xffa1a0bd,0xff4e4c9b,0xff4a4796,0xff4a4897,0xff4e4c9b,0xff5350a0,0xff5654a2,
+ 0xff504e88,0xff777778,0xffaaaa90,0xfff8f8f7,0xfff9f9f6,0xff7e7e96,0xff040239,0xff04033d,0xff000022,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff0a068a,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffcfcfc,0xfff5f5f5,0xffe7e7e7,0xffdadada,0xffd3d3d3,
+ 0xffd1d1d1,0xffd4d4d4,0xffdadada,0xffd7d7d5,0xff969678,0xff919171,0xff9a9a7b,0xffededea,0xfff9f9f8,0xff45456b,0xff04023b,0xff04033e,0xff000023,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a068a,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,
+ 0xfffdfdfd,0xfff9f9f9,0xfff5f5f5,0xfff3f3f3,0xfff2f2f2,0xfff2f2f2,0xfff2f2f2,0xffefefee,0xffbebeac,0xff9b9b7d,0xffc1c1b1,0xfff3f3f1,0xffacabbb,0xff040339,
+ 0xff04023d,0xff040340,0xff000024,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff0a068a,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+ 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffafaf8,0xffe3e3da,0xffd7d7ca,0xffecece5,0xfff6f6f3,
+ 0xfff9f9f8,0xfff6f5f6,0xff585779,0xff04023a,0xff04033e,0xff050342,0xff000024,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff090575,0xffffffff,
+ 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff3f3f0,0xffc8c8b7,
+ 0xff9d9e7f,0xff969575,0xffc2c2b0,0xfff0f0f0,0xfffdfcfc,0xff8f8fa5,0xff030238,0xff04023d,0xff040341,0xff050342,0xff000025,0x87000000,0x5a000000,0x36000000,
+ 0x17000000,0x2e000000,0xff07045b,0xff090577,0xff0a068a,0xff0a068a,0xff0a068a,0xff0a068a,0xff0a068a,0xff0a068a,0xff0a068a,0xff0a068a,0xff0a068a,0xff0a068a,
+ 0xff0a068a,0xff0a0689,0xff090574,0xff060444,0xff06033c,0xff06033b,0xff060448,0xff0a0684,0xff070465,0xff01012c,0xff000020,0xff000022,0xff000024,0xff000025,
+ 0xff000026,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
+ 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,
+ 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
+ 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
+ 0x18000000,0xf000000
+};
+
+static const QRgb CloseButton_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0x3edcdcdc,0x93dbdbdb,0xd5dedede,0xfadcdcdc,0xd8d1d1d1,0x9ec8c8c8,0x509d9d9d,0xc000000,0x3000000,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0x60dcdcdc,0xdbe3e3e3,0xffe2e2e2,0xffd3d3d3,0xffcecece,0xffcdcdcd,0xffd7d7d7,0xe6c5c5c5,0x838d8d8d,0x18000000,0x4000000,0xffffff,
+ 0xffffff,0x3edddcdc,0xdbdadada,0xffcbcbcb,0xff353535,0xff888888,0xffc2c1c2,0xff878687,0xff343434,0xffb1b2b1,0xec9e9d9e,0x75595959,0x18000000,0x3000000,
+ 0xffffff,0x94d5d6d5,0xffd1d0d0,0xff8c8c8c,0xff000000,0xff000000,0xff5a5a5a,0xff000000,0xff000000,0xff868786,0xffabaaaa,0xc8616161,0x3d000000,0xc000000,
+ 0xffffff,0xd5cbcbcb,0xffbbbbbb,0xffadadad,0xff7a7a7a,0xff000000,0xff000000,0xff000000,0xff777777,0xffb1b1b1,0xffb1b1b1,0xef616161,0x61000000,0x1a000000,
+ 0xffffff,0xfabfbfbf,0xffababab,0xffa4a4a4,0xff7a7a7a,0xff000000,0xff000000,0xff000000,0xff747474,0xffaeaeae,0xffa2a2a2,0xfd5d5d5d,0x7c000000,0x25000000,
+ 0xffffff,0xd9b0b0b0,0xffa0a0a0,0xff7d7d7d,0xff000000,0xff000000,0xff4a4a4a,0xff000000,0xff000000,0xff7a7a7a,0xff8c8c8c,0xf2484848,0x85000000,0x2b000000,
+ 0xffffff,0xa0949494,0xff9b9b9a,0xff959696,0xff383838,0xff6a6a6a,0xffa1a1a0,0xff6e6e6e,0xff353535,0xff969796,0xff6a696a,0xdf363636,0x7c000000,0x25000000,
+ 0xffffff,0x516f6f6f,0xe7818181,0xff8d8d8d,0xff949494,0xff999a9a,0xff9b9b9b,0xff9e9e9e,0xff8f8f8f,0xff737273,0xf5414141,0xbb1a1a1a,0x61000000,0x1a000000,
+ 0xffffff,0xc000000,0x84505050,0xed626262,0xff6f6e6e,0xff7b7b7a,0xff7d7d7d,0xff767576,0xff636263,0xf5414140,0xcd1f1f1f,0x83000000,0x3d000000,0xc000000,
+ 0xffffff,0x3000000,0x18000000,0x762f2f2f,0xc93b3b3b,0xf0404040,0xfd464646,0xf3393939,0xdf2a2a2a,0xbb161616,0x83000000,0x4b000000,0x18000000,0x3000000,
+ 0xffffff,0xffffff,0x4000000,0x18000000,0x3d000000,0x61000000,0x7c000000,0x85000000,0x7c000000,0x61000000,0x3d000000,0x18000000,0x4000000,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0x3000000,0xc000000,0x1a000000,0x25000000,0x2b000000,0x25000000,0x1a000000,0xc000000,0x3000000,0xffffff,0xffffff
+};
+
+static const QRgb DateBook_data[] = {
+ 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
+ 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
+ 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff0b471e,0xff0b471e,0xff0b471e,0xff0b471e,
+ 0xff0b461e,0xff0b461e,0xff0b461d,0xff0b451d,0xff0a441c,0xff0a431c,0xff0a411b,0xff093f1a,0xff093d19,0xff083a17,0xff083716,0xff073514,0xff073213,0xff062e11,
+ 0xff052b0f,0xff05280e,0xff04250c,0xff03220b,0xff031f09,0xff021708,0xff011305,0xff011705,0xff011504,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
+ 0xff0b471e,0xffd8d9d8,0xffd7d8d8,0xffd4d7d5,0xffd2d4d2,0xffced2cf,0xffc9cecb,0xffc4cbc6,0xffbdc6bf,0xffb4bfb8,0xffabb9af,0xffa0b0a5,0xff93a699,0xff879d8d,
+ 0xff7a9481,0xff6c8975,0xff5e7f69,0xff52775d,0xff466c52,0xff3a6347,0xff2b4e37,0xff465658,0xff9492ae,0xffe1daff,0xff6a6b7f,0xff0d3a1b,0xff011404,0x5c000000,
+ 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff0b461e,0xffd4d7d5,0xffd1d3d2,0xffccd0cd,0xffc5ccc7,0xffbfc6c1,0xffb6c1b9,0xffaebab2,0xffa3b3a7,0xff97ab9d,
+ 0xff8aa191,0xff7e9785,0xff708d78,0xff61836c,0xff567961,0xff4a7056,0xff3f684b,0xff2b4e35,0xff4a5c59,0xff7d7f95,0xffd9d2fd,0xffd3ccf2,0xffcfc8ee,0xffcac3ef,
+ 0xffaba6c9,0xff072510,0xff011303,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff0b451d,0xffccd1ce,0xffc4cbc6,0xffbac4bd,0xffb1bdb4,0xffa5b4aa,
+ 0xff9aada0,0xff8ea495,0xff819b89,0xff73917d,0xff678771,0xff597d65,0xff4d7458,0xff406b4e,0xff2e533b,0xff354c42,0xff8a8ba1,0xffb6aed4,0xffc4bde8,0xffc1bbe8,
+ 0xffbdb6d9,0xffbbb7d9,0xffbbb5da,0xffb9b2dc,0xffcfc9f1,0xff23322f,0xff001103,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff0a431c,0xffc0c7c2,
+ 0xffb2beb5,0xffa2b3a7,0xff93a799,0xff859d8c,0xff769480,0xff698a74,0xff5c8168,0xff50785c,0xff436f52,0xff355d42,0xff2e463b,0xff83889a,0xffb8b3d9,0xffd8d0fb,
+ 0xffc2bae2,0xffbcb7db,0xffb4afd3,0xffb7b0d5,0xffbcb6d7,0xffbbb4dc,0xffb0aad3,0xffc0b8e1,0xffd3cdef,0xff6a6a7b,0xff000e03,0x93000000,0x62000000,0x3b000000,
+ 0x1f000000,0x3d000000,0xff0a411b,0xffaebbb2,0xff98ac9e,0xff849d8c,0xff71907b,0xff61846b,0xff527b5f,0xff467154,0xff396346,0xff344d41,0xff58626a,0xffbfb8df,
+ 0xffcfcaf5,0xffc2bde6,0xff908aaa,0xffb5afd3,0xffccc4ea,0xffc1bee1,0xffc1bbdc,0xffbeb8db,0xffbab2da,0xffbeb9dd,0xffc5c0e6,0xffbdb8e0,0xffbfb9df,0xffb9b4d5,
+ 0xff000a02,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff093e19,0xff98ac9e,0xff7d9886,0xff648770,0xff51785d,0xff3d664a,0xff325340,0xff57626a,
+ 0xffbdb8d8,0xffc0bae2,0xffccc5ed,0xffc0b9e2,0xffbab2d8,0xff34303f,0xff33313d,0xff9c95b1,0xffb1a8ce,0xffa49fc1,0xffb5afd6,0xffbfb8e1,0xffb8b2db,0xffc6c2e9,
+ 0xffa9a5c7,0xffafa8c9,0xffc1bbe3,0xffd0c9f1,0xff020f06,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff083a17,0xff829d8b,0xff63856e,0xff3b5945,
+ 0xff626d76,0xff9390ab,0xffcec8f0,0xffccc6f1,0xffc1badd,0xffc0badd,0xffb9b2d2,0xffb1a7c7,0xffbfb7d6,0xff5d5c6e,0xff464356,0xffaba3c5,0xffc3bddf,0xffc4c0e7,
+ 0xffcdcaf5,0xffb5afd5,0xff9f96b0,0xff82777f,0xff5a4b38,0xff9f959f,0xffc9c2ee,0xffd5cff7,0xff062814,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff073615,0xff6f8e79,0xff4d635a,0xffe7e1ff,0xffc4bfe6,0xffc4bde5,0xffb5b0d4,0xffb8b3d5,0xffb9b2d7,0xffb3accc,0xffbab3d1,0xffb4abd2,0xffc6c0e7,0xffd5cff2,
+ 0xffcec8ef,0xffc6c0e9,0xffb3aed4,0xff8f899e,0xff83787e,0xff726767,0xff6f5d43,0xffaaa1b5,0xff56432a,0xff948687,0xffc3bee8,0xffc7c0e2,0xff0a3c1e,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff073313,0xff60856d,0xff7a7b89,0xffbdb7da,0xffbab5db,0xffbdb8dc,0xffb9b2d7,0xffbdb7dd,0xffc5bee6,0xffc0bae0,
+ 0xffc9c3e8,0xffc5bfe6,0xffb7b4db,0xffafabce,0xffa5a0c4,0xff847c8e,0xff7a7074,0xff999098,0xff5e4f41,0xff766866,0xff716458,0xffcecaee,0xff746a76,0xff8d7f7c,
+ 0xffbfbade,0xffb6b0d3,0xff0b4221,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff063112,0xff4f615b,0xffb1aac4,0xffa49ec1,0xffb9b3dc,0xffc8c1e7,
+ 0xffbeb9dd,0xffbbb5dd,0xff9f97ac,0xffc7c1e1,0xffb7b2d3,0xffb8b2d7,0xff79707c,0xff615546,0xff8b828f,0xff655850,0xff6c5e50,0xff756859,0xff655545,0xff7c6e61,
+ 0xffa097a7,0xffc5c2eb,0xff8f8799,0xffa79fb5,0xffb7b2dd,0xffbfbbe0,0xff0b4322,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff063012,0xff43594c,
+ 0xffb4aecd,0xffa59dbc,0xffcbc5ea,0xffbdb6db,0xffbbb5dc,0xffb0abd3,0xff4e4034,0xff9c939a,0xff83787e,0xff786a5d,0xff817675,0xff6f6254,0xff877a71,0xff7f757b,
+ 0xff6c5b45,0xffa79da9,0xffafa6c2,0xffc7c2eb,0xffa9a4d2,0xff7f7585,0xff786c68,0xff6e5e54,0xff7d6f6f,0xffb7aed2,0xff0a3f20,0x99000000,0x66000000,0x3d000000,
+ 0x1f000000,0x3d000000,0xff063112,0xff557861,0xff8581a0,0xff9f97b5,0xffc0badd,0xffbdb7d8,0xffb4add0,0xffbfbaea,0xff716878,0xff75665f,0xff887e8d,0xff5f4e36,
+ 0xff736458,0xff867b77,0xffa195a0,0xffb1a9cb,0xffc6bfe2,0xffc6c0e7,0xffc6c2ea,0xff787082,0xff4f3d2c,0xff523d1d,0xff513d1a,0xff624b27,0xff604c2a,0xff74624a,
+ 0xff0a3a1c,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff073213,0xff5f816a,0xff445454,0xffb9b0cd,0xffa39dba,0xffbeb9dd,0xffc4c0e3,0xffafaac7,
+ 0xff6c6267,0xff615440,0xff8d8087,0xff7f7067,0xffc4bccf,0xffd6d4f8,0xffd6d1fe,0xffd2cbf2,0xffc1bbde,0xffc9c1eb,0xff7d7488,0xff3e2b0e,0xff67502e,0xff7a684f,
+ 0xff8f817f,0xff74645c,0xff624e33,0xff604b27,0xff082f13,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff073414,0xff698873,0xff405b4c,0xffb6b0d1,
+ 0xffaea6c3,0xffb9b3dc,0xffc0badf,0xffbcb5d1,0xff776964,0xffaca0a8,0xffd2cef9,0xffc4bfe8,0xffa199ad,0xff8c8186,0xff7b7073,0xff9b95ac,0xffcdcaf5,0xffbbb7e0,
+ 0xff4f4339,0xff624b28,0xff736047,0xffbbb5cc,0xffcbc6f5,0xffaca6d3,0xff544336,0xff5b4525,0xff072b11,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff083615,0xff748f7d,0xff4f745b,0xff908ea8,0xffaca2bd,0xffb8b0d6,0xffb9b0d5,0xffbeb6d8,0xffcac3e6,0xffcbc6ee,0xff817a91,0xff554737,0xff544122,0xff533f1e,
+ 0xff4d3817,0xff5a472c,0xff8b7c74,0xffb5b0d4,0xff4c4035,0xff51390e,0xff837155,0xffd7d3f8,0xffc4bee7,0xff797286,0xff56432d,0xff715d3d,0xff093a1a,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff083816,0xff7e9585,0xff5b7c66,0xff435152,0xffbab3d3,0xffaca3c1,0xffb8b0d4,0xffb8b3d6,0xffc6bfe1,0xff696172,
+ 0xff4b391c,0xff685432,0xff6b5739,0xff6f5d44,0xff685336,0xff675336,0xff5e4724,0xffa09699,0xff8a7e7c,0xff97897e,0xffb7aebc,0xffb5adce,0xff5b4e44,0xff5c4826,
+ 0xff675130,0xff745e40,0xff061f0a,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff083a17,0xff899c8e,0xff668470,0xff3b5945,0xffb8aed6,0xffa49eba,
+ 0xffbfb7d9,0xffc5bfe3,0xffaea9cd,0xff4b3b31,0xff604c2e,0xff604c2f,0xffaa9ea2,0xffcdc8ed,0xff81757c,0xff5a462c,0xff654f31,0xff84725d,0xffccc5e8,0xffd2ccef,
+ 0xffd4cff4,0xffb7b2d3,0xff5c4e3d,0xff6e5835,0xff826e5b,0xff6b573a,0xff051805,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff093b18,0xff91a297,
+ 0xff708a78,0xff4e7158,0xff767689,0xffada7c4,0xffa8a0c1,0xffbeb5dc,0xff9890b1,0xff51402b,0xff5e492a,0xff7a6854,0xffcbc8eb,0xffd4d0fe,0xff9892b3,0xff54422b,
+ 0xff634d2c,0xff908068,0xffc2bae1,0xffb7aed2,0xffc3bbdf,0xffc3bee2,0xffb8b1ca,0xffc0b7ce,0xffc3bbe2,0xff867c8c,0xff041605,0x99000000,0x66000000,0x3d000000,
+ 0x1f000000,0x3d000000,0xff093d19,0xff9aa79e,0xff7b9282,0xff597862,0xff455452,0xffa7a0bf,0xffa79fbf,0xffc1bae0,0xff9893b4,0xff453521,0xff4f3a16,0xff7a6850,
+ 0xffc4bcde,0xffc7c0ef,0xff797182,0xff544222,0xff5f4a2b,0xffa79ca2,0xffc4bce3,0xffb7afd0,0xff9791a9,0xff9a8e98,0xffccc3e6,0xffd0c6ec,0xffcdc3ed,0xff807a92,
+ 0xff041606,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff093e19,0xffa2ada5,0xff85988b,0xff64806d,0xff375542,0xffaaa2c1,0xffa59ebb,0xffc4bde4,
+ 0xffaea9cd,0xff7c6f69,0xff95877c,0xffb5abc2,0xffc9c0eb,0xff918bad,0xff423426,0xff5b4523,0xff816f57,0xffcac3e0,0xffc9c3e5,0xff6e656a,0xff463314,0xff553e1f,
+ 0xff988b93,0xffada5c7,0xff8d8495,0xff4f4135,0xff051605,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff093e1a,0xffa8b0ab,0xff8e9e93,0xff6f8777,
+ 0xff4c6c56,0xff68687e,0xffb2acc9,0xffafa8c6,0xffc5bddf,0xffc6bfdf,0xffcdc8f3,0xffd4cdf5,0xffbdb7dc,0xff453933,0xff4d3817,0xff6e593d,0xffbdb3c6,0xffcac5ec,
+ 0xffc9c1e8,0xff8b8196,0xff564121,0xff634a28,0xff5e482c,0xff5b4a35,0xff4d391e,0xff5a421f,0xff051805,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff0a3e1a,0xffaeb4af,0xff97a49a,0xff768b7c,0xff55715e,0xff3c4d47,0xffc4bee1,0xffa8a1c0,0xffbfbadb,0xffb6b0d3,0xffb9b3d7,0xffc0bce1,0xff655b61,0xff564122,
+ 0xff645130,0xffbcb1bc,0xffcac3ed,0xff9d99b6,0xff726974,0xff978b92,0xff91878b,0xff685235,0xff634b27,0xff68512a,0xff6c5432,0xff7d6950,0xff093517,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a3e1a,0xffb1b7b3,0xff9aa59e,0xff7d8e83,0xff5c7463,0xff36503e,0xff9d96b5,0xffb2a8ce,0xffb5aed2,0xffbab6d6,
+ 0xffc2bcdf,0xff746f82,0xff473316,0xff665031,0xff837268,0xff8c829a,0xff665758,0xff594831,0xff59431e,0xff69532d,0xffb6aec5,0xffc2b8d3,0xff9e9096,0xffa3969a,
+ 0xffb6adbc,0xffcac1dd,0xff0a3e1f,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff0a3e1a,0xffb2b6b3,0xff9da5a0,0xff828f86,0xff637869,0xff43604d,
+ 0xff707283,0xffafaaca,0xffb2accb,0xffb6b1d4,0xffb5afd8,0xff4f423f,0xff5c4624,0xff655135,0xff69553e,0xff584528,0xff57401b,0xff59431f,0xff644e2f,0xff7a6953,
+ 0xffc1b6c5,0xffc8c2e0,0xffc2bbdf,0xffc8bfe8,0xffc7c0de,0xffc6bfdc,0xff0a3b1d,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff0a3e1a,0xffafb2af,
+ 0xff9da29e,0xff869089,0xff67796d,0xff496352,0xff2c3c36,0xffbbb5d7,0xffa49dbb,0xffc1bae1,0xffa8a1c3,0xff483929,0xff604c2d,0xff604c30,0xff614d2a,0xff6a5533,
+ 0xff7c6a56,0xff938587,0xffb4abc0,0xffc5bbdb,0xffbdb3cd,0xffb2a7c4,0xffb4acc7,0xffa398b6,0xffaea5bd,0xffb2a8c2,0xff09381b,0x87000000,0x5a000000,0x36000000,
+ 0x17000000,0x2e000000,0xff093c19,0xff093818,0xff083416,0xff072f13,0xff05280f,0xff04210c,0xff021708,0xff08311a,0xff09371b,0xff09391d,0xff09351b,0xff041306,
+ 0xff051906,0xff061f0b,0xff072a11,0xff093518,0xff0a3e1e,0xff0a3b1e,0xff09381c,0xff09371b,0xff09341a,0xff09351b,0xff09371b,0xff09361b,0xff09371b,0xff09381c,
+ 0xff09371b,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
+ 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,
+ 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
+ 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
+ 0x18000000,0xf000000
+};
+
+static const QRgb DateTime_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3000000,0x6000000,0xb000000,0x12000000,0x19000000,0x21000000,0x29000000,0x2f000000,
+ 0x34000000,0x37000000,0x38000000,0x37000000,0x34000000,0x2f000000,0x29000000,0x21000000,0x19000000,0x12000000,0xb000000,0x6000000,0x3000000,0x1000000,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,
+ 0x5d3f5669,0x9352718b,0xbe5a7e9c,0xde5c85a5,0xf35c88ac,0xfe5a87ad,0xf3507fa5,0xe047759a,0xc43a6689,0x9f2c5371,0x701b354a,0x3f000000,0x33000000,0x26000000,
+ 0x1b000000,0x11000000,0xa000000,0x5000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,
+ 0x16000000,0x24000000,0x724a6577,0xbf587790,0xf75e7e98,0xff53728b,0xff476379,0xff3e586e,0xff39536a,0xff365268,0xff335169,0xff335470,0xff325a7a,0xff326085,
+ 0xf82f628a,0xc8245277,0x89163652,0x46000000,0x33000000,0x23000000,0x16000000,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,
+ 0x2000000,0x7000000,0xe000000,0x1a000000,0x49384d5b,0xab5b798f,0xf762819b,0xff4f6a80,0xff3f5465,0xff435662,0xff74837b,0xffa4af93,0xffcad1a7,0xffcad1a7,
+ 0xffc9d1a8,0xffbbc5a2,0xff93a492,0xff4d6a77,0xff234d6f,0xff23547c,0xf81f5684,0xbd134268,0x6d071c2c,0x3f000000,0x2a000000,0x1a000000,0xe000000,0x7000000,
+ 0x2000000,0x1000000,0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x614a6174,0xca617f99,0xff5d7991,0xff44596b,0xff475964,0xffb4bc9b,0xfff2f4bb,
+ 0xfffeffc1,0xfffeffc1,0xffcfd0a6,0xffbabc9b,0xfff2f4ba,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffe2e8b6,0xff708c8b,0xff174b74,0xff155080,0xd80e426d,0x8508233a,
+ 0x47000000,0x2e000000,0x1b000000,0xe000000,0x6000000,0x2000000,0x1000000,0x5000000,0xd000000,0x1a000000,0x614a6174,0xd465839c,0xff5a768c,0xff3e5161,
+ 0xff78867d,0xfff2f4bb,0xffd5d7aa,0xffecedb7,0xfffeffc1,0xfffafbbf,0xffadaf93,0xffadaf93,0xffbbbd9b,0xfffeffc1,0xfffeffc1,0xffd5d7aa,0xffebecb6,0xfffeffc1,
+ 0xffd2dcb2,0xff2c5d7d,0xff0f4b7c,0xe00d426c,0x8a071f36,0x49000000,0x2e000000,0x1a000000,0xd000000,0x5000000,0x3000000,0xa000000,0x16000000,0x48354a59,
+ 0xca64819a,0xff5b778e,0xff3e5060,0xff859183,0xfffeffc1,0xffc1c39f,0xffadaf93,0xffadaf93,0xfffbfcbf,0xfffeffc1,0xffadaf93,0xff0f448d,0xff0f448d,0xff96aeaa,
+ 0xffc2c49f,0xffadaf93,0xffadaf93,0xfff8f9be,0xfffeffc1,0xffeff3bc,0xff3b6a84,0xff0f4a7a,0xdb0d3e64,0x7c061723,0x46000000,0x2a000000,0x16000000,0xa000000,
+ 0x6000000,0x11000000,0x23000000,0xaa5e7c93,0xff617f98,0xff415465,0xff859183,0xfffeffc1,0xfffeffc1,0xffc9cba3,0xffadaf93,0xffadaf93,0xfff9fabe,0xfffeffc1,
+ 0xfffeffc1,0xff0f448d,0xff0f448d,0xffafc1b0,0xffc2c49f,0xffadaf93,0xffadaf93,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffeff4bc,0xff2d6081,0xff124b7a,0xc80d3353,
+ 0x61000000,0x3e000000,0x23000000,0x11000000,0xb000000,0x1b000000,0x6f4e697e,0xf6698ba6,0xff4c6477,0xff606f71,0xfffeffc1,0xfff1f3ba,0xfffeffc1,0xfffeffc1,
+ 0xffdddfae,0xfff2f4ba,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xff0f448d,0xff0f448d,0xffc8d4b5,0xfffeffc1,0xffdddfae,0xfff3f5bb,0xfffeffc1,0xfffeffc1,0xfffeffc1,
+ 0xfffeffc1,0xffd2ddb4,0xff174d78,0xf9174871,0xa2082134,0x55000000,0x33000000,0x1b000000,0x12000000,0x26000000,0xba6384a0,0xff5c7b95,0xff3b4e5e,0xffcdd3a8,
+ 0xffb3b596,0xffadaf93,0xffc9cba3,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xff0f448d,0xff0f448d,0xffcdd9b6,0xfffeffc1,0xfffeffc1,
+ 0xfffeffc1,0xfffbfcbf,0xffadaf93,0xffadaf93,0xffebecb6,0xfffeffc1,0xff749394,0xff1f4f76,0xd8113553,0x6d000000,0x45000000,0x26000000,0x19000000,0x5d3f5669,
+ 0xf56f96b5,0xff4e687d,0xff5e6f70,0xfffeffc1,0xffadaf93,0xffadaf93,0xffb4b697,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffeff3be,0xff0f448d,
+ 0xff0f448d,0xffccd8b6,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffdddfae,0xffadaf93,0xffadaf93,0xffd5d7aa,0xfffeffc1,0xffe3eab8,0xff2a5679,0xfa1b476a,0x9b051724,
+ 0x56000000,0x33000000,0x21000000,0x9352718b,0xff6e97b8,0xff40586b,0xffa7b095,0xfffeffc1,0xffe6e7b3,0xffb4b697,0xffecedb7,0xfffeffc1,0xfffeffc1,0xfffeffc1,
+ 0xfffeffc1,0xfffeffc1,0xffccd8b6,0xff0f448d,0xff0f448d,0xffccd8b6,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffc1c39f,0xffc2c49f,0xfffeffc1,0xfffeffc1,
+ 0xfffeffc1,0xff587a88,0xff254e70,0xc30c263b,0x67000000,0x3f000000,0x29000000,0xbe5a7e9c,0xff6b94b6,0xff394f61,0xffe5e8b4,0xfffeffc1,0xfffeffc1,0xfffeffc1,
+ 0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffacbeaf,0xff0f448d,0xff0f448d,0xffcdd9b6,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,
+ 0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xff9caf9f,0xff2f5674,0xdf15334b,0x75000000,0x4a000000,0x2f000000,0xde5c85a5,0xff6590b3,0xff354c5e,
+ 0xfffeffc1,0xffcfd0a6,0xffbbbd9b,0xfff3f5bb,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xff87a2a7,0xff0f448d,0xff0f448d,0xffcdd9b6,
+ 0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffd1d2a7,0xffbbbd9b,0xfff2f4ba,0xfffeffc1,0xffc3ceac,0xff3c5d79,0xf01c3f59,0x81000000,0x53000000,
+ 0x34000000,0xf35c88ac,0xff5f8cb1,0xff324a5e,0xfffeffc1,0xffadaf93,0xffadaf93,0xffbabc9b,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,
+ 0xff5d819e,0xff0f448d,0xff0f448d,0xffcedab7,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfff1f3ba,0xffadaf93,0xffadaf93,0xffbabc9b,0xfffeffc1,0xffd0d9b1,
+ 0xff44627b,0xfa224360,0x89000000,0x59000000,0x37000000,0xfe5a87ad,0xff5a88ae,0xff2f485c,0xfffeffc1,0xffadaf93,0xffadaf93,0xffd0d1a7,0xfffeffc1,0xfffeffc1,
+ 0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffcedab7,0xff15488e,0xff0f448d,0xffd5dfb8,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffadaf93,
+ 0xffadaf93,0xffd6d8ab,0xfffeffc1,0xffd2dab1,0xff47647b,0xfe244662,0x8e000000,0x5e000000,0x38000000,0xf3507fa5,0xff5283aa,0xff2d485e,0xfffeffc1,0xfffeffc1,
+ 0xfffafbbf,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xff92abaa,0xff3c6797,0xff436c98,0xfffeffc1,0xfffeffc1,
+ 0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffafbbf,0xfffeffc1,0xfffeffc1,0xffd3dab1,0xff4b667c,0xfb24425b,0x90000000,0x5f000000,0x37000000,0xe047759a,
+ 0xff4c7ea7,0xff2c4b65,0xfff1f3bb,0xfffeffc1,0xfffeffc1,0xfff3f5bb,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xff0f448d,
+ 0xff0f448d,0xff0f448d,0xff0f448d,0xff5c809e,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffbfcbf,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffb6c1a7,0xff4d667b,0xf3213b51,
+ 0x8e000000,0x5e000000,0x34000000,0xc43a6689,0xff4378a3,0xff2e5371,0xffbbc6a4,0xfffeffc1,0xffb4b697,0xffadaf93,0xffc1c39f,0xfffeffc1,0xfffeffc1,0xfffeffc1,
+ 0xfffeffc1,0xfffeffc1,0xfffeffc1,0xff809da6,0xff164a8f,0xff0f448d,0xff0f448d,0xff0f448d,0xff0f448d,0xffadbeac,0xffadaf93,0xffadaf93,0xffecedb7,0xfffeffc1,
+ 0xfffeffc1,0xff90a099,0xff486074,0xe7193143,0x89000000,0x59000000,0x2f000000,0x9f2c5371,0xff3c739f,0xff2d5b7f,0xff768e8a,0xfffeffc1,0xffadaf93,0xffadaf93,
+ 0xffb4b697,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfff8fbc0,0xff61859f,0xff0f448d,0xff0f448d,0xff2c5a92,
+ 0xffadaf93,0xffadaf93,0xffd5d7aa,0xfffeffc1,0xfff4f6bd,0xff687d89,0xff3b556b,0xd311222f,0x81000000,0x53000000,0x29000000,0x701b354a,0xf7346b98,0xff2d618c,
+ 0xff224d71,0xffe2e8b6,0xffe4e5b2,0xffbabc9b,0xfff3f5bb,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,
+ 0xfffeffc1,0xfffeffc1,0xff7695a3,0xffecf1bd,0xffc2c49f,0xffc1c39f,0xfffeffc1,0xfffeffc1,0xffc6cdad,0xff596f80,0xfc2b4559,0xb6061118,0x75000000,0x4a000000,
+ 0x21000000,0x3f000000,0xc625557b,0xff296391,0xff1f537d,0xff6e8c8d,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffedeeb7,0xffb4b697,0xffc8caa2,0xfffeffc1,0xfffeffc1,
+ 0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffe4e5b2,0xffb4b697,0xffc9cba3,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfff5f7be,0xff71838d,0xff485f71,
+ 0xe8192d3e,0x93020202,0x67000000,0x3f000000,0x19000000,0x33000000,0x88163752,0xf8225d8d,0xff1b5888,0xff144b76,0xffb3c5a8,0xfffeffc1,0xfffeffc1,0xffb3b596,
+ 0xffadaf93,0xffadaf93,0xfff2f4ba,0xfffeffc1,0xffd0d1a7,0xffbabc9b,0xfff3f5bb,0xfffeffc1,0xffb4b697,0xffadaf93,0xffadaf93,0xfff9fabe,0xfffeffc1,0xfffeffc1,
+ 0xfffeffc1,0xff9ba79e,0xff596d7e,0xfc2c4558,0xc409151f,0x81000000,0x56000000,0x33000000,0x12000000,0x26000000,0x45000000,0xbc14446a,0xff17578b,0xff104e80,
+ 0xff1e537b,0xffd1dcb3,0xfffeffc1,0xffe4e5b2,0xffadaf93,0xffb4b697,0xfffeffc1,0xfffafbbf,0xffadaf93,0xffadaf93,0xffbbbd9b,0xfffeffc1,0xffe6e7b3,0xffadaf93,
+ 0xffb3b596,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffa5b0a2,0xff607383,0xff395165,0xe1122432,0x94020202,0x6c000000,0x45000000,0x26000000,0xb000000,0x1b000000,
+ 0x33000000,0x6c071c2e,0xd70e446e,0xff105083,0xff0f4c7d,0xff1e547d,0xffb3c6aa,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffadaf93,0xffadaf93,
+ 0xffcfd0a6,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffa5b0a2,0xff627584,0xff3e5668,0xee1a2d3f,0xaf040a10,0x7b000000,0x55000000,
+ 0x33000000,0x1b000000,0x6000000,0x11000000,0x23000000,0x3e000000,0x8508233a,0xe00e436d,0xff104d7e,0xff0f4b7b,0xff134b79,0xff709195,0xffe3e9b8,0xfffeffc1,
+ 0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffd8deb3,0xff869595,0xff5d7181,0xff3d5568,0xf11a3042,
+ 0xbd071018,0x85000000,0x60000000,0x3e000000,0x23000000,0x11000000,0x3000000,0xa000000,0x16000000,0x2a000000,0x46000000,0x8a071f36,0xdb0d3e64,0xff104978,
+ 0xff144a76,0xff1b4d76,0xff235278,0xff7a9694,0xffbfccab,0xfff2f5bd,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xfffeffc1,0xffeaedb9,0xffb9c3a8,0xff809192,0xff5e7282,
+ 0xff4f6476,0xff334b5f,0xee182b3d,0xbd071018,0x88000000,0x66000000,0x46000000,0x2a000000,0x16000000,0xa000000,0x1000000,0x5000000,0xd000000,0x1a000000,
+ 0x2e000000,0x48000000,0x7b041522,0xc80a3052,0xf90f436d,0xff13456e,0xff19496f,0xff244f71,0xff335978,0xff40617d,0xff47667f,0xff4b687f,0xff4c677c,0xff4f687d,
+ 0xff536a7e,0xff536a7c,0xff486072,0xff344d61,0xfc1f3b4e,0xe00e202f,0xaf040a10,0x85000000,0x66000000,0x48000000,0x2e000000,0x1a000000,0xd000000,0x5000000,
+ 0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x2e000000,0x46000000,0x60000000,0xa2061f33,0xd7092f4e,0xfa0e3d62,0xff133f64,0xff1b4567,0xff244a68,
+ 0xff294c69,0xff2b4c66,0xff2b4b65,0xff2b4962,0xff29465d,0xff224058,0xfc18354c,0xe70d2234,0xc305111b,0x94000000,0x7b000000,0x60000000,0x46000000,0x2e000000,
+ 0x1b000000,0xe000000,0x6000000,0x2000000,0xffffff,0x1000000,0x2000000,0x7000000,0xe000000,0x1a000000,0x2a000000,0x3e000000,0x55000000,0x6c000000,
+ 0x9b041522,0xc2072137,0xde082943,0xef092e4b,0xf9092f4f,0xfe0a304f,0xfa092b48,0xf208253e,0xe5061f33,0xd1051725,0xb5020c14,0x93000000,0x81000000,0x6c000000,
+ 0x55000000,0x3e000000,0x2a000000,0x1a000000,0xe000000,0x7000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,
+ 0x16000000,0x23000000,0x33000000,0x45000000,0x56000000,0x67000000,0x75000000,0x81000000,0x89000000,0x8e000000,0x90000000,0x8e000000,0x89000000,0x81000000,
+ 0x75000000,0x67000000,0x56000000,0x45000000,0x33000000,0x23000000,0x16000000,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,0x33000000,0x3f000000,0x4a000000,0x53000000,0x59000000,0x5e000000,
+ 0x5f000000,0x5e000000,0x59000000,0x53000000,0x4a000000,0x3f000000,0x33000000,0x26000000,0x1b000000,0x11000000,0xa000000,0x5000000,0x2000000,0x1000000,
+ 0xffffff,0xffffff
+};
+
+static const QRgb DocsIcon_data[] = {
+ 0xffffff,0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff676767,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffe4e4e4,0xffbebebe,0xffffffff,0xff676767,0x3c000000,0xc000000,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffdbdbdb,0xff999999,0xffffffff,0xffffffff,0xff676767,0x3c000000,0xc000000,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xff000000,0xfffdfdfd,0xfffdfdfd,0xffd9d9d9,0xff8d8d8d,0xffffffff,0xffffffff,0xffffffff,0xff676767,0x3c000000,0xc000000,0xffffff,
+ 0xffffff,0xffffff,0xff000000,0xfffcfcfc,0xfffcfcfc,0xffd7d7d7,0xff8c8c8c,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff676767,0x3c000000,0xc000000,
+ 0xffffff,0xffffff,0xff000000,0xfff9f9f9,0xfff8f8f8,0xffdddddd,0xffa7a7a7,0xff8a8a8a,0xff8a8a8a,0xff949494,0xffbababa,0xff000000,0x77000000,0x24000000,
+ 0xffffff,0xffffff,0xff000000,0xfff5f5f5,0xfff3f3f3,0xffe9e9e9,0xffd7d7d7,0xffcfcfcf,0xffd0d0d0,0xffd1d1d1,0xffdcdcdc,0xff000000,0x8f000000,0x30000000,
+ 0xffffff,0xffffff,0xff000000,0xfff0f0f0,0xffededed,0xffebebeb,0xffe9e9e9,0xffe9e9e9,0xffebebeb,0xffededed,0xfff0f0f0,0xff000000,0x8f000000,0x30000000,
+ 0xffffff,0xffffff,0xff000000,0xffebebeb,0xffe7e7e7,0xffe3e3e3,0xffe2e2e2,0xffe2e2e2,0xffe3e3e3,0xffe7e7e7,0xffebebeb,0xff000000,0x8f000000,0x30000000,
+ 0xffffff,0xffffff,0xff000000,0xffe5e5e5,0xffe0e0e0,0xffdcdcdc,0xffdadada,0xffdadada,0xffdcdcdc,0xffe0e0e0,0xffe5e5e5,0xff000000,0x8f000000,0x30000000,
+ 0xffffff,0xffffff,0xff000000,0xffdfdfdf,0xffd8d8d8,0xffd3d3d3,0xffd1d1d1,0xffd1d1d1,0xffd3d3d3,0xffd8d8d8,0xffdfdfdf,0xff000000,0x8f000000,0x30000000,
+ 0xffffff,0xffffff,0xff000000,0xffdfdfdf,0xffd8d8d8,0xffd3d3d3,0xffd1d1d1,0xffd1d1d1,0xffd3d3d3,0xffd8d8d8,0xffdfdfdf,0xff000000,0x8f000000,0x30000000,
+ 0xffffff,0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x8f000000,0x30000000,
+ 0xffffff,0xffffff,0x24000000,0x6b000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x6b000000,0x24000000
+};
+
+static const QRgb DocumentTypeExcel_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000500,0x2000500,0x5000500,0x9000500,0x10000500,0x18000500,0x22000500,
+ 0x2c000500,0x36000500,0x3f000500,0x45000500,0x4a000500,0x4d000500,0x4e000500,0x4e000500,0x4e000500,0x4c000500,0x49000500,0x45000500,0x3f000500,0x37000500,
+ 0x2e000500,0x25000500,0x1c000500,0x13000500,0xd000500,0x8000500,0x4000500,0x2000500,0xffffff,0xffffff,0xffffff,0x1000500,0x3000500,0x7000500,
+ 0xd000500,0x16000500,0x22000500,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0xfd373737,0x72545754,0x44000500,0x37000500,0x2b000500,0x1f000500,0x15000500,0xd000500,0x8000500,0x4000500,0xffffff,0xffffff,
+ 0xffffff,0x1000500,0x4000500,0x9000500,0x11000500,0x1d000500,0x2c000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,
+ 0xfffefefe,0xfffdfdfd,0xfffafafa,0xfff5f5f5,0xffededed,0xffe3e3e3,0xffd1d1d1,0xfd363636,0x76404240,0x4e000500,0x3d000500,0x2e000500,0x21000500,0x16000500,
+ 0xe000500,0x8000500,0xffffff,0xffffff,0xffffff,0x2000500,0x5000500,0xb000500,0x15000500,0x24000500,0x36000500,0xff000000,0xffffffff,0xffffffff,
+ 0xffffffff,0xffffffff,0xfffefefe,0xfffefefe,0xfffdfdfd,0xfffdfdfd,0xfff8f8f8,0xfff0f0f0,0xffe3e3e3,0xffd4d4d4,0xfffefefe,0xffbebebe,0xfd383838,0x803e403e,
+ 0x53000500,0x40000500,0x2f000500,0x21000500,0x16000500,0xd000500,0xffffff,0xffffff,0xffffff,0x2000500,0x6000500,0xd000500,0x18000500,0x29000500,
+ 0x3f000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffdfdfd,0xfffdfdfd,0xfffbfbfb,0xfff6f6f6,0xffededed,0xffdbdbdb,0xffc6c6c6,
+ 0xffffffff,0xfffdfdfd,0xffaeaeae,0xfd3b3b3b,0x7e353735,0x55000500,0x41000500,0x2f000500,0x20000500,0x15000500,0xffffff,0xffffff,0x1000500,0x2000500,
+ 0x6000500,0xe000500,0x1b000500,0x2d000500,0x45000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfffafafa,
+ 0xfff4f4f4,0xffe8e8e8,0xffd5d5d5,0xffbababa,0xffffffff,0xffffffff,0xfffdfdfd,0xffa3a3a3,0xfd3e3e3e,0x7a2a2d2a,0x55000500,0x40000500,0x2d000500,0x1e000500,
+ 0xffffff,0xffffff,0x1000500,0x2000500,0x7000500,0xf000500,0x1d000500,0x30000500,0x4a000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+ 0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfff8f8f8,0xfff3f3f3,0xffe7e7e7,0xffd1d1d1,0xffb4b4b4,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff9d9d9d,0xfd454545,
+ 0x782b2b2b,0x52000500,0x3c000500,0x29000500,0xffffff,0xffffff,0x1000500,0x3000500,0x7000500,0x10000500,0x1e000500,0x32000500,0x4d000500,0xff000000,
+ 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffcfcfc,0xfffbfbfb,0xfff8f8f8,0xfff3f3f3,0xffe6e6e6,0xffd1d1d1,0xffb3b3b3,0xffffffff,0xffffffff,
+ 0xffffffff,0xffffffff,0xfff9f9f9,0xff9e9e9e,0xfc4c4c4c,0x701f231f,0x4c000500,0x36000500,0x1000000,0x2000000,0x5000000,0x9000000,0xf000000,0x18000000,
+ 0x27000000,0x3b000000,0x55000600,0xff000000,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7,0xfff8f8f8,0xfff6f6f6,0xfff7f7f7,0xfff7f7f7,0xfff6f6f6,0xfff2f2f2,0xffe8e8e8,
+ 0xffd4d4d4,0xffb9b9b9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xffa1a1a1,0xfb545454,0x5c000500,0x42000500,0x4000000,0x7000000,
+ 0xd000000,0x16000000,0x1e000000,0x2a000000,0x39000000,0x4d000000,0x65000000,0xff000000,0xffe3e3e3,0xffe3e3e3,0xffe5e5e5,0xffe8e8e8,0xffe8e8e8,0xffebebeb,
+ 0xffefefef,0xfff3f3f3,0xfff0f0f0,0xffeaeaea,0xffdddddd,0xffc9c9c9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xff3e3e3e,
+ 0x6a000500,0x4e000500,0x7000000,0xf000000,0x1b000000,0x2b000000,0x39000000,0x49000000,0x58000000,0x69000000,0x7e000500,0xff000000,0xffc4c4c4,0xffc4c4c4,
+ 0xffc6c6c6,0xffcccccc,0xffd3d3d3,0xffdbdbdb,0xffe6e6e6,0xffececec,0xffefefef,0xffefefef,0xffe7e7e7,0xffc5c5c5,0xff9f9f9f,0xff7f7f7f,0xff6f6f6f,0xff6b6b6b,
+ 0xff717171,0xff8c8c8c,0xffb5b5b5,0xff000000,0x76000500,0x58000500,0xc000000,0x19000000,0xfff1656a,0xffec6165,0xffef9699,0xffe56c70,0xffde5157,0xffe26469,
+ 0xffe88b8d,0xffdb4348,0xffe36d72,0xffe67f83,0xffe14b50,0xffe2292f,0xffe3252d,0xffc4c4c4,0xffd7d7d7,0xffe5e5e5,0xffeeeeee,0xfff2f2f2,0xffcfcfcf,0xffa0a0a0,
+ 0xff8d8d8d,0xff828282,0xff828282,0xff7d7d7d,0xff717171,0xff707070,0xff747474,0xff000000,0x80000500,0x60000500,0x12000000,0x26000000,0xffee6266,0xfff1a8aa,
+ 0xffffffff,0xffedbdbe,0xffcb474b,0xffeababb,0xffffffff,0xffdf9699,0xffedc1c2,0xffffffff,0xffdd787a,0xffd22329,0xffd6232a,0xffa7a7a7,0xffc6c6c6,0xffdcdcdc,
+ 0xffececec,0xffd9d9d9,0xffababab,0xff9a9a9a,0xffa4a4a4,0xffc0c0c0,0xffcecece,0xffcfcfcf,0xffc4c4c4,0xff919191,0xff6e6e6e,0xff000000,0x87000500,0x66000500,
+ 0x17000000,0x2f000000,0xffec5e62,0xffe36d71,0xfffefbfb,0xfffefcfc,0xffc87578,0xfffdfcfc,0xfffdfbfb,0xffb94b4f,0xffe6bebf,0xffffffff,0xffcf7477,0xffc22025,
+ 0xffc92227,0xff919191,0xffb6b6b6,0xffd6d6d6,0xffdedede,0xffbdbdbd,0xffa8a8a8,0xffb5b5b5,0xffe6e6e6,0xfff3f3f3,0xfff7f7f7,0xfff3f3f3,0xffd1d1d1,0xffe7e7e7,
+ 0xff9f9f9f,0xff000000,0x8b000500,0x6a000500,0x1b000000,0x37000000,0xffec5a5f,0xffdd5056,0xffecbebf,0xffffffff,0xfff3e7e8,0xffffffff,0xffdab6b6,0xff9e2327,
+ 0xffe2bdbd,0xffffffff,0xffc57375,0xffb41e23,0xffbe2025,0xff7e7e7e,0xffacacac,0xffcecece,0xffcbcbcb,0xffb3b3b3,0xffb1b1b1,0xffe3e3e3,0xfffafafa,0xfff8f8f8,
+ 0xfff7f7f7,0xffafafaf,0xff7a7a7a,0xffb6b6b6,0xffe1e1e1,0xff000000,0x8e000500,0x6d000500,0x1d000000,0x3c000000,0xffec565b,0xffde4c50,0xffd26265,0xfffefdfd,
+ 0xffffffff,0xfffdfdfd,0xffa0494b,0xff951b1f,0xffdfbbbc,0xffffffff,0xffbf7274,0xffaa1d20,0xffb61e23,0xff737373,0xffa5a5a5,0xffc8c8c8,0xffc0c0c0,0xffb2b2b2,
+ 0xffc5c5c5,0xfff5f5f5,0xfffbfbfb,0xfffafafa,0xffb6b6b6,0xff7c7c7c,0xff777777,0xff9b9b9b,0xffefefef,0xff000000,0x8f000500,0x6e000500,0x1f000000,0x3e000000,
+ 0xffee5056,0xffe1484c,0xffcb3c40,0xfff6ebeb,0xffffffff,0xfff3e9e9,0xff891a1d,0xff91191d,0xffddbbbc,0xffffffff,0xffbd7274,0xffa41b20,0xffb11d22,0xff6e6e6e,
+ 0xffa2a2a2,0xffc5c5c5,0xffbababa,0xffb2b2b2,0xffcecece,0xfffdfdfd,0xfffcfcfc,0xffbababa,0xff828282,0xff7a7a7a,0xff808080,0xffe4e4e4,0xffffffff,0xff000000,
+ 0x90000500,0x6e000500,0x1f000000,0x3d000000,0xffef4c51,0xffe14247,0xffd76468,0xfffffefe,0xffffffff,0xfffefefe,0xffa04f51,0xff8e171b,0xffddbbbc,0xffffffff,
+ 0xffb97174,0xff9f1b1f,0xffab1d22,0xff6d6d6d,0xffa1a1a1,0xffc5c5c5,0xffbdbdbd,0xffaeaeae,0xffc6c6c6,0xfff9f9f9,0xffbcbcbc,0xff868686,0xff7e7e7e,0xff777777,
+ 0xff747474,0xffa4a4a4,0xfff4f4f4,0xff000000,0x90000500,0x6f000500,0x1f000000,0x3e000000,0xffed464b,0xffdf3c41,0xffefc9cb,0xffffffff,0xfff5eded,0xffffffff,
+ 0xffddc4c4,0xff88171b,0xffdbbbbc,0xffffffff,0xffb57072,0xff95191e,0xffa21b1f,0xff6b6b6b,0xff9f9f9f,0xffc7c7c7,0xffc6c6c6,0xffa8a8a8,0xffadadad,0xffeaeaea,
+ 0xffb9b9b9,0xff7e7e7e,0xff9b9b9b,0xff9a9a9a,0xff696969,0xff676767,0xff939393,0xff000000,0x90000500,0x6f000500,0x1f000000,0x3e000000,0xffec3e42,0xffe4696d,
+ 0xffffffff,0xffffffff,0xffbb7b7d,0xffffffff,0xffffffff,0xffa4575a,0xffdabbbc,0xffffffff,0xffe5d1d2,0xffdbbbbc,0xff9a1a1e,0xff6a6a6a,0xff9d9d9d,0xffc7c7c7,
+ 0xffd4d4d4,0xffa8a8a8,0xff949494,0xffb5b5b5,0xfff0f0f0,0xffc5c5c5,0xffebebeb,0xfffcfcfc,0xff9e9e9e,0xff686868,0xff686868,0xff000000,0x90000500,0x6f000500,
+ 0x1d000000,0x3c000000,0xffe9353c,0xffe77a7e,0xfffdf8f8,0xffe9c9ca,0xff95191d,0xffe2c8c9,0xfffbf8f8,0xffb47173,0xffdabbbc,0xffffffff,0xffffffff,0xffffffff,
+ 0xff96191d,0xff6d6d6d,0xffa0a0a0,0xffc6c6c6,0xffe3e3e3,0xffc5c5c5,0xff8d8d8d,0xff818181,0xffa5a5a5,0xffdddddd,0xffe8e8e8,0xffeaeaea,0xffcbcbcb,0xff707070,
+ 0xff696969,0xff000000,0x90000500,0x6f000500,0x1b000000,0x37000000,0xffe82e34,0xffdc242b,0xffcc353b,0xffbd4043,0xffa31b20,0xffaa3d41,0xff9e2e33,0xff96191d,
+ 0xff95191e,0xff8e171d,0xff8d171b,0xff92191d,0xff981a1e,0xff7a7a7a,0xffa5a5a5,0xffc9c9c9,0xffe4e4e4,0xffeeeeee,0xffb7b7b7,0xff7d7d7d,0xff767676,0xff797979,
+ 0xff868686,0xff868686,0xff7c7c7c,0xff6d6d6d,0xff6d6d6d,0xff000000,0x90000500,0x6f000500,0x17000000,0x2f000000,0xffe8272e,0xffdb242a,0xffcd2229,0xffbf1f25,
+ 0xffb31e23,0xffaf1d23,0xffa91d20,0xffa61d20,0xffa41b20,0xff9e1b1f,0xff9c1a1e,0xff9d1a1f,0xffa01a20,0xff8d8d8d,0xffb2b2b2,0xffd1d1d1,0xffe3e3e3,0xfff3f3f3,
+ 0xfff5f5f5,0xffc7c7c7,0xff969696,0xff727272,0xff727272,0xff727272,0xff727272,0xff939393,0xffbebebe,0xff000000,0x90000500,0x6e000500,0x12000000,0x26000000,
+ 0x41000000,0x64000000,0x7f000000,0x98000000,0xa9000000,0xb5000000,0xbf000000,0xff000000,0xff6e6e6e,0xff6d6d6d,0xff737373,0xff7d7d7d,0xff8d8d8d,0xffa6a6a6,
+ 0xffc3c3c3,0xffd7d7d7,0xffe8e8e8,0xffefefef,0xfff7f7f7,0xfff9f9f9,0xffebebeb,0xffd7d7d7,0xffc9c9c9,0xffc9c9c9,0xffd6d6d6,0xffeaeaea,0xfffafafa,0xff000000,
+ 0x8e000500,0x6d000500,0xc000000,0x18000000,0x2b000000,0x41000000,0x55000000,0x68000000,0x78000000,0x88000000,0x98000000,0xff000000,0xffa3a3a3,0xffa2a2a2,
+ 0xffa5a5a5,0xffadadad,0xffb6b6b6,0xffc4c4c4,0xffd6d6d6,0xffe3e3e3,0xffededed,0xfff2f2f2,0xfff4f4f4,0xfff5f5f5,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,
+ 0xfff8f8f8,0xfff7f7f7,0xfff4f4f4,0xff000000,0x8c000500,0x6b000500,0x7000000,0xf000000,0x19000000,0x27000000,0x34000000,0x43000000,0x52000000,0x63000000,
+ 0x76000000,0xff000000,0xffcbcbcb,0xffcbcbcb,0xffcdcdcd,0xffd1d1d1,0xffd6d6d6,0xffdcdcdc,0xffe6e6e6,0xffececec,0xfff2f2f2,0xfff5f5f5,0xfff6f6f6,0xfff6f6f6,
+ 0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xff000000,0x87000500,0x68000500,0x4000000,0x7000000,0xd000000,0x14000000,
+ 0x1c000000,0x28000000,0x35000000,0x47000000,0x5c000600,0xff000000,0xffe5e5e5,0xffe5e5e5,0xffe7e7e7,0xffe8e8e8,0xffe8e8e8,0xffececec,0xfff1f1f1,0xfff3f3f3,
+ 0xfff5f5f5,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xff000000,0x7f000500,0x61000500,
+ 0x1000000,0x2000000,0x4000000,0x8000000,0xe000000,0x16000000,0x21000000,0x31000000,0x47000000,0xff000000,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7,0xfff8f8f8,
+ 0xfff8f8f8,0xfffafafa,0xfffcfcfc,0xfffdfdfd,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+ 0xffffffff,0xff000000,0x73000500,0x58000500,0xffffff,0xffffff,0xffffff,0x2000500,0x5000500,0xb000500,0x15000500,0x24000500,0x36000500,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x63000500,0x4c000500,0xffffff,0xffffff,0xffffff,0x1000500,0x4000500,0x9000500,
+ 0x11000500,0x1d000500,0x2c000500,0x3e000500,0x51000500,0x63000500,0x73000500,0x7f000500,0x87000500,0x8c000500,0x8e000500,0x90000500,0x90000500,0x90000500,
+ 0x90000500,0x90000500,0x90000500,0x90000500,0x8e000500,0x8c000500,0x87000500,0x7f000500,0x73000500,0x63000500,0x51000500,0x3e000500,0xffffff,0xffffff,
+ 0xffffff,0x1000500,0x3000500,0x7000500,0xd000500,0x16000500,0x22000500,0x30000500,0x3e000500,0x4c000500,0x58000500,0x61000500,0x68000500,0x6b000500,
+ 0x6d000500,0x6e000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6e000500,0x6d000500,0x6b000500,0x68000500,0x61000500,0x58000500,0x4c000500,
+ 0x3e000500,0x30000500
+};
+
+static const QRgb DocumentTypeNone_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000500,0x2000500,0x5000500,0x9000500,0x10000500,0x18000500,0x22000500,
+ 0x2c000500,0x36000500,0x3f000500,0x45000500,0x4a000500,0x4d000500,0x4e000500,0x4e000500,0x4e000500,0x4c000500,0x49000500,0x45000500,0x3f000500,0x37000500,
+ 0x2e000500,0x25000500,0x1c000500,0x13000500,0xd000500,0x8000500,0x4000500,0x2000500,0xffffff,0xffffff,0xffffff,0x1000500,0x3000500,0x7000500,
+ 0xd000500,0x16000500,0x22000500,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0xfd373737,0x72545754,0x44000500,0x37000500,0x2b000500,0x1f000500,0x15000500,0xd000500,0x8000500,0x4000500,0xffffff,0xffffff,
+ 0xffffff,0x1000500,0x4000500,0x9000500,0x11000500,0x1d000500,0x2c000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,
+ 0xfffefefe,0xfffdfdfd,0xfffafafa,0xfff5f5f5,0xffededed,0xffe3e3e3,0xffd1d1d1,0xfd363636,0x76404240,0x4e000500,0x3d000500,0x2e000500,0x21000500,0x16000500,
+ 0xe000500,0x8000500,0xffffff,0xffffff,0xffffff,0x2000500,0x5000500,0xb000500,0x15000500,0x24000500,0x36000500,0xff000000,0xfffefefe,0xfffefefe,
+ 0xffffffff,0xffffffff,0xfffefefe,0xfffefefe,0xfffdfdfd,0xfffdfdfd,0xfff8f8f8,0xfff0f0f0,0xffe3e3e3,0xffd4d4d4,0xfffefefe,0xffbebebe,0xfd383838,0x803e403e,
+ 0x53000500,0x40000500,0x2f000500,0x21000500,0x16000500,0xd000500,0xffffff,0xffffff,0xffffff,0x3000500,0x7000500,0xe000500,0x19000500,0x2a000500,
+ 0x40000500,0xff000000,0xfffdfdfd,0xfffdfdfd,0xfffdfdfd,0xfffdfdfd,0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfffbfbfb,0xfff6f6f6,0xffededed,0xffdbdbdb,0xffc6c6c6,
+ 0xffffffff,0xfffdfdfd,0xffaeaeae,0xfd3b3b3b,0x7e353735,0x55000500,0x41000500,0x2f000500,0x20000500,0x15000500,0x1000500,0x1000500,0x3000500,0x4000500,
+ 0x9000500,0x11000500,0x1e000500,0x2f000500,0x47000500,0xff000000,0xfff9f9f9,0xfffafafa,0xfffafafa,0xfffbfbfb,0xfffafafa,0xfffbfbfb,0xfffafafa,0xfff9f9f9,
+ 0xfff3f3f3,0xffe8e8e8,0xffd5d5d5,0xffbababa,0xffffffff,0xffffffff,0xfffdfdfd,0xffa3a3a3,0xfd3e3e3e,0x7a2a2d2a,0x55000500,0x40000500,0x2d000500,0x1e000500,
+ 0x2000500,0x3000500,0x5000500,0x7000500,0xd000500,0x16000500,0x23000500,0x36000500,0x50000500,0xff000000,0xfff3f3f3,0xfff3f3f3,0xfff4f4f4,0xfff6f6f6,
+ 0xfff6f6f6,0xfff7f7f7,0xfff8f8f8,0xfff6f6f6,0xfff1f1f1,0xffe6e6e6,0xffd1d1d1,0xffb4b4b4,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff9d9d9d,0xfd454545,
+ 0x782b2b2b,0x52000500,0x3c000500,0x29000500,0x4000500,0x6000500,0x9000500,0xd000500,0x13000500,0x1c000500,0x2a000500,0x3e000500,0x57000500,0xff000000,
+ 0xffe7e7e7,0xffe8e8e8,0xffebebeb,0xffeeeeee,0xffeeeeee,0xfff1f1f1,0xfff3f3f3,0xfff3f3f3,0xfff0f0f0,0xffe4e4e4,0xffd0d0d0,0xffb3b3b3,0xffffffff,0xffffffff,
+ 0xffffffff,0xffffffff,0xfff9f9f9,0xff9e9e9e,0xfc4c4c4c,0x701f231f,0x4c000500,0x36000500,0x8000500,0xb000500,0xf000500,0x15000500,0x1a000500,0x25000500,
+ 0x33000500,0x47000500,0x5f000500,0xff000000,0xffd7d7d7,0xffd9d9d9,0xffdddddd,0xffe1e1e1,0xffe4e5e4,0xffe9eae9,0xffedeeed,0xffefefef,0xffeeeeee,0xffe6e6e6,
+ 0xffd3d3d3,0xffb9b9b9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xffa1a1a1,0xfb545454,0x5c000500,0x42000500,0xc000500,0x11000500,
+ 0x17000500,0x1e000500,0x25000500,0x30000500,0x3f000500,0x51000500,0x69000500,0xff000300,0xffc0c1c0,0xffc4c5c4,0xffcacaca,0xffd1d1d1,0xffd7d7d7,0xffdfdfdf,
+ 0xffe6e6e6,0xffececec,0xffecedec,0xffe7e8e7,0xffdcdcdc,0xffc8c8c8,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xff3e3e3e,
+ 0x6a000500,0x4e000500,0x11000500,0x18000500,0x20000500,0x29000500,0x32000500,0x3d000500,0x4c000500,0x5d000500,0x74000500,0xff000300,0xffa5a6a5,0xffacadac,
+ 0xffb4b5b4,0xffbebfbe,0xffc8c8c8,0xffd3d3d3,0xffdedede,0xffe6e6e6,0xffebebeb,0xffebeceb,0xffe4e4e4,0xffc4c4c4,0xff9f9f9f,0xff7f7f7f,0xff6f6f6f,0xff6b6b6b,
+ 0xff717171,0xff8c8c8c,0xffb5b5b5,0xff000000,0x76000500,0x58000500,0x16000500,0x1f000500,0xf8fefefe,0xf0fcfcfc,0xecfafafa,0xecf8f8f8,0xedf7f7f7,0xeff5f5f5,
+ 0xf1f3f3f3,0xffe8e8e8,0xfff3f3f3,0xfff4f4f4,0xfff6f6f6,0xfff9f9f9,0xfffdfdfd,0xffc7c8c7,0xffd6d6d6,0xffe1e1e1,0xffebebeb,0xffeeeeee,0xffcccccc,0xff9f9f9f,
+ 0xff8d8d8d,0xff828282,0xff828282,0xff7d7d7d,0xff717171,0xff707070,0xff747474,0xff000000,0x80000500,0x60000500,0x1b000500,0x26000500,0xf0fcfcfc,0xe0f6f6f6,
+ 0xd8efefef,0xd8ebebeb,0xdbe8e8e8,0xdfe3e3e3,0xe3e0e1e0,0xffcbcccb,0xffdedede,0xffe1e1e1,0xffe6e6e6,0xffefefef,0xfff9f9f9,0xffbbbbbb,0xffcdcecd,0xffdddddd,
+ 0xffe9eae9,0xffd6d6d6,0xffa8a8a8,0xff9a9a9a,0xffa4a4a4,0xffc0c0c0,0xffcecece,0xffcfcfcf,0xffc4c4c4,0xff919191,0xff6e6e6e,0xff000000,0x87000500,0x66000500,
+ 0x1f000500,0x2c000500,0xecfafafa,0xd8f0f0f0,0xcee5e5e5,0xcedfdfdf,0xd3dadada,0xd7d7d7d7,0xddd1d2d1,0xffbabbba,0xffcccccc,0xffd1d1d1,0xffd7d7d7,0xffe6e6e6,
+ 0xfff5f6f5,0xffb0b1b0,0xffc5c5c5,0xffdadada,0xffdddddd,0xffbababa,0xffa4a4a4,0xffb4b4b4,0xffe6e6e6,0xfff3f3f3,0xfff7f7f7,0xfff3f3f3,0xffd1d1d1,0xffe7e7e7,
+ 0xff9f9f9f,0xff000000,0x8b000500,0x6a000500,0x22000500,0x30000500,0xebf9f9f9,0xd6ededed,0xcde0e0e0,0xcedadada,0xd3d5d5d5,0xd8d1d1d1,0xddcdcdcd,0xffb6b7b6,
+ 0xffc4c4c4,0xffc8c9c8,0xffd1d1d1,0xffe1e1e1,0xfff4f4f4,0xffa8a9a8,0xffc1c1c1,0xffd6d6d6,0xffcbcbcb,0xffb0b0b0,0xffadadad,0xffe2e2e2,0xfff9f9f9,0xfff8f8f8,
+ 0xfff7f7f7,0xffafafaf,0xff7a7a7a,0xffb6b6b6,0xffe1e1e1,0xff000000,0x8e000500,0x6d000500,0x25000500,0x33000500,0xebf8f8f8,0xd7ebeceb,0xcededede,0xd0d7d7d7,
+ 0xd5d4d4d4,0xdad0d0d0,0xdfcbcbcb,0xffb6b7b6,0xffc0c1c0,0xffc4c4c4,0xffcccdcc,0xffdedede,0xfff3f3f3,0xffa3a4a3,0xffbdbdbd,0xffd1d1d1,0xffc0c0c0,0xffafafaf,
+ 0xffc1c1c1,0xfff3f3f3,0xfffafafa,0xfffafafa,0xffb6b6b6,0xff7c7c7c,0xff777777,0xff9b9b9b,0xffefefef,0xff000000,0x8f000500,0x6e000500,0x26000500,0x35000500,
+ 0xebf8f8f8,0xd7ebebeb,0xcedddedd,0xd1d7d7d7,0xd6d3d3d3,0xdbcfcfcf,0xe0cbcbcb,0xffb6b7b6,0xffbebebe,0xffc2c3c2,0xffcbcbcb,0xffdddddd,0xfff3f3f3,0xffa0a1a0,
+ 0xffbbbbbb,0xffcfcfcf,0xffbbbbbb,0xffaeaeae,0xffcacaca,0xfffafafa,0xfffbfbfb,0xffbababa,0xff828282,0xff7a7a7a,0xff808080,0xffe4e4e4,0xffffffff,0xff000000,
+ 0x90000500,0x6e000500,0x26000500,0x35000500,0xebf8f8f8,0xd7ebebeb,0xcedddedd,0xd1d7d7d7,0xd6d3d3d3,0xdbcfcfcf,0xe0cbcbcb,0xffb6b7b6,0xffbebebe,0xffc2c3c2,
+ 0xffcbcbcb,0xffdddddd,0xfff3f3f3,0xffa0a1a0,0xffbbbbbb,0xffd0d0d0,0xffbdbdbd,0xffabacab,0xffc2c2c2,0xfff7f7f7,0xffbbbbbb,0xff868686,0xff7e7e7e,0xff777777,
+ 0xff747474,0xffa4a4a4,0xfff4f4f4,0xff000000,0x90000500,0x6f000500,0x25000500,0x33000500,0xebf8f8f8,0xd7ebeceb,0xcededede,0xd0d7d7d7,0xd5d4d4d4,0xdad0d0d0,
+ 0xdfcbcbcb,0xffb6b7b6,0xffc0c1c0,0xffc4c4c4,0xffcccdcc,0xffdedede,0xfff3f3f3,0xffa3a4a3,0xffbdbdbd,0xffd3d3d3,0xffc8c8c8,0xffa5a5a5,0xffa9a9a9,0xffe8e8e8,
+ 0xffb8b8b8,0xff7e7e7e,0xff9b9b9b,0xff9a9a9a,0xff696969,0xff676767,0xff939393,0xff000000,0x90000500,0x6f000500,0x22000500,0x30000500,0xebf9f9f9,0xd6ededed,
+ 0xcde0e0e0,0xcedadada,0xd3d5d5d5,0xd8d1d1d1,0xddcdcdcd,0xffb6b7b6,0xffc4c4c4,0xffc8c9c8,0xffd1d1d1,0xffe1e1e1,0xfff4f4f4,0xffa8a9a8,0xffc0c0c0,0xffd7d7d7,
+ 0xffd7d7d7,0xffa5a5a5,0xff919191,0xffb4b4b4,0xffefefef,0xffc5c5c5,0xffebebeb,0xfffcfcfc,0xff9e9e9e,0xff686868,0xff686868,0xff000000,0x90000500,0x6f000500,
+ 0x1f000500,0x2c000500,0xecfafafa,0xd8f0f0f0,0xcee5e5e5,0xcedfdfdf,0xd3dadada,0xd7d7d7d7,0xddd1d2d1,0xffbabbba,0xffcccccc,0xffd1d1d1,0xffd7d7d7,0xffe6e6e6,
+ 0xfff5f6f5,0xffb0b1b0,0xffc5c6c5,0xffd7d7d7,0xffe7e8e7,0xffc4c4c4,0xff8a8a8a,0xff808080,0xffa5a5a5,0xffdddddd,0xffe8e8e8,0xffeaeaea,0xffcbcbcb,0xff707070,
+ 0xff696969,0xff000000,0x90000500,0x6f000500,0x1b000500,0x26000500,0xf0fcfcfc,0xe0f6f6f6,0xd8efefef,0xd8ebebeb,0xdbe8e8e8,0xdfe3e3e3,0xe3e0e1e0,0xffcbcccb,
+ 0xffdedede,0xffe1e1e1,0xffe6e6e6,0xffefefef,0xfff9f9f9,0xffbbbcbb,0xffcccdcc,0xffdadbda,0xffe8e9e8,0xffedeeed,0xffb5b5b5,0xff7c7c7c,0xff767676,0xff797979,
+ 0xff868686,0xff868686,0xff7c7c7c,0xff6d6d6d,0xff6d6d6d,0xff000000,0x90000500,0x6f000500,0x16000500,0x1f000500,0xf8fefefe,0xf0fcfcfc,0xecfafafa,0xecf8f8f8,
+ 0xedf7f7f7,0xeff5f5f5,0xf1f3f3f3,0xffe8e8e8,0xfff3f3f3,0xfff4f4f4,0xfff6f6f6,0xfff9f9f9,0xfffdfdfd,0xffc6c7c6,0xffd5d6d5,0xffe0e0e0,0xffe8e8e8,0xfff2f2f2,
+ 0xfff2f2f2,0xffc6c6c6,0xff969696,0xff727272,0xff727272,0xff727272,0xff727272,0xff939393,0xffbebebe,0xff000000,0x90000500,0x6e000500,0x11000500,0x18000500,
+ 0x20000500,0x29000500,0x32000500,0x3d000500,0x4c000500,0x5d000500,0x73000500,0xff000300,0xffa5a6a5,0xffacadac,0xffb4b5b4,0xffbebfbe,0xffc7c8c7,0xffd2d3d2,
+ 0xffdddddd,0xffe6e6e6,0xffededed,0xffeeeeee,0xfff4f4f4,0xfff8f8f8,0xffebebeb,0xffd7d7d7,0xffc9c9c9,0xffc9c9c9,0xffd6d6d6,0xffeaeaea,0xfffafafa,0xff000000,
+ 0x8e000500,0x6d000500,0xc000500,0x11000500,0x17000500,0x1e000500,0x25000500,0x30000500,0x3f000500,0x51000500,0x68000500,0xff000300,0xffc0c1c0,0xffc4c5c4,
+ 0xffcacaca,0xffd1d1d1,0xffd7d7d7,0xffdedede,0xffe6e6e6,0xffebebeb,0xffefefef,0xfff1f1f1,0xfff3f3f3,0xfff4f4f4,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,
+ 0xfff8f8f8,0xfff7f7f7,0xfff4f4f4,0xff000000,0x8c000500,0x6b000500,0x8000500,0xb000500,0xf000500,0x14000500,0x1a000500,0x24000500,0x32000500,0x44000500,
+ 0x5c000500,0xff000000,0xffd7d7d7,0xffd9d9d9,0xffdddddd,0xffe1e1e1,0xffe3e4e3,0xffe8e8e8,0xffecedec,0xfff0f0f0,0xfff3f3f3,0xfff4f4f4,0xfff5f5f5,0xfff6f6f6,
+ 0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xff000000,0x87000500,0x68000500,0x4000500,0x6000500,0x9000500,0xc000500,
+ 0x12000500,0x1a000500,0x28000500,0x39000500,0x50000500,0xff000000,0xffe7e7e7,0xffe8e8e8,0xffebebeb,0xffeeeeee,0xffeeeeee,0xfff0f0f0,0xfff3f3f3,0xfff4f4f4,
+ 0xfff6f6f6,0xfff7f7f7,0xfff7f7f7,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xff000000,0x7f000500,0x61000500,
+ 0x2000500,0x3000500,0x4000500,0x7000500,0xc000500,0x14000500,0x1e000500,0x30000500,0x45000500,0xff000000,0xfff3f3f3,0xfff3f3f3,0xfff4f4f4,0xfff6f6f6,
+ 0xfff8f8f8,0xfff9f9f9,0xfffbfbfb,0xfffdfdfd,0xfffdfdfd,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+ 0xffffffff,0xff000000,0x73000500,0x58000500,0x1000500,0x1000500,0x2000500,0x4000500,0x8000500,0xe000500,0x18000500,0x27000500,0x38000500,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x63000500,0x4c000500,0xffffff,0xffffff,0xffffff,0x2000500,0x5000500,0xa000500,
+ 0x12000500,0x1e000500,0x2d000500,0x3f000500,0x52000500,0x64000500,0x74000500,0x80000500,0x87000500,0x8c000500,0x8e000500,0x90000500,0x90000500,0x90000500,
+ 0x90000500,0x90000500,0x90000500,0x90000500,0x8e000500,0x8c000500,0x87000500,0x7f000500,0x73000500,0x63000500,0x51000500,0x3e000500,0xffffff,0xffffff,
+ 0xffffff,0x1000500,0x3000500,0x7000500,0xd000500,0x16000500,0x22000500,0x30000500,0x3e000500,0x4c000500,0x58000500,0x61000500,0x68000500,0x6b000500,
+ 0x6d000500,0x6e000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6e000500,0x6d000500,0x6b000500,0x68000500,0x61000500,0x58000500,0x4c000500,
+ 0x3e000500,0x30000500
+};
+
+static const QRgb DocumentTypePowerPoint_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000500,0x2000500,0x5000500,0x9000500,0x10000500,0x18000500,0x22000500,
+ 0x2c000500,0x36000500,0x3f000500,0x45000500,0x4a000500,0x4d000500,0x4e000500,0x4e000500,0x4e000500,0x4c000500,0x49000500,0x45000500,0x3f000500,0x37000500,
+ 0x2e000500,0x25000500,0x1c000500,0x13000500,0xd000500,0x8000500,0x4000500,0x2000500,0xffffff,0xffffff,0xffffff,0x1000500,0x3000500,0x7000500,
+ 0xd000500,0x16000500,0x22000500,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0xfd373737,0x72545754,0x44000500,0x37000500,0x2b000500,0x1f000500,0x15000500,0xd000500,0x8000500,0x4000500,0xffffff,0xffffff,
+ 0xffffff,0x1000500,0x4000500,0x9000500,0x11000500,0x1d000500,0x2c000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,
+ 0xfffefefe,0xfffdfdfd,0xfffafafa,0xfff5f5f5,0xffededed,0xffe3e3e3,0xffd1d1d1,0xfd363636,0x76404240,0x4e000500,0x3d000500,0x2e000500,0x21000500,0x16000500,
+ 0xe000500,0x8000500,0xffffff,0xffffff,0xffffff,0x2000500,0x5000500,0xb000500,0x15000500,0x24000500,0x36000500,0xff000000,0xffffffff,0xffffffff,
+ 0xffffffff,0xffffffff,0xfffefefe,0xfffefefe,0xfffdfdfd,0xfffdfdfd,0xfff8f8f8,0xfff0f0f0,0xffe3e3e3,0xffd4d4d4,0xfffefefe,0xffbebebe,0xfd383838,0x803e403e,
+ 0x53000500,0x40000500,0x2f000500,0x21000500,0x16000500,0xd000500,0xffffff,0xffffff,0xffffff,0x2000500,0x6000500,0xd000500,0x18000500,0x29000500,
+ 0x3f000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffdfdfd,0xfffdfdfd,0xfffbfbfb,0xfff6f6f6,0xffededed,0xffdbdbdb,0xffc6c6c6,
+ 0xffffffff,0xfffdfdfd,0xffaeaeae,0xfd3b3b3b,0x7e353735,0x55000500,0x41000500,0x2f000500,0x20000500,0x15000500,0xffffff,0xffffff,0x1000500,0x2000500,
+ 0x6000500,0xe000500,0x1b000500,0x2d000500,0x45000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfffafafa,
+ 0xfff4f4f4,0xffe8e8e8,0xffd5d5d5,0xffbababa,0xffffffff,0xffffffff,0xfffdfdfd,0xffa3a3a3,0xfd3e3e3e,0x7a2a2d2a,0x55000500,0x40000500,0x2d000500,0x1e000500,
+ 0xffffff,0xffffff,0x1000500,0x2000500,0x7000500,0xf000500,0x1d000500,0x30000500,0x4a000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+ 0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfff8f8f8,0xfff3f3f3,0xffe7e7e7,0xffd1d1d1,0xffb4b4b4,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff9d9d9d,0xfd454545,
+ 0x782b2b2b,0x52000500,0x3c000500,0x29000500,0xffffff,0xffffff,0x1000500,0x3000500,0x7000500,0x10000500,0x1e000500,0x32000500,0x4d000500,0xff000000,
+ 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffcfcfc,0xfffbfbfb,0xfff8f8f8,0xfff3f3f3,0xffe6e6e6,0xffd1d1d1,0xffb3b3b3,0xffffffff,0xffffffff,
+ 0xffffffff,0xffffffff,0xfff9f9f9,0xff9e9e9e,0xfc4c4c4c,0x701f231f,0x4c000500,0x36000500,0x1000000,0x2000000,0x5000000,0x9000000,0xf000000,0x18000000,
+ 0x27000000,0x3b000000,0x55000600,0xff000000,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7,0xfff8f8f8,0xfff6f6f6,0xfff7f7f7,0xfff7f7f7,0xfff6f6f6,0xfff2f2f2,0xffe8e8e8,
+ 0xffd4d4d4,0xffb9b9b9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xffa1a1a1,0xfb545454,0x5c000500,0x42000500,0x4000000,0x7000000,
+ 0xd000000,0x15000000,0x1d000000,0x29000000,0x38000000,0x4c000000,0x64000000,0xff000000,0xffe5e5e5,0xffe5e5e5,0xffe7e7e7,0xffe8e8e8,0xffe8e8e8,0xffececec,
+ 0xffefefef,0xfff3f3f3,0xfff0f0f0,0xffeaeaea,0xffdddddd,0xffc9c9c9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xff3e3e3e,
+ 0x6a000500,0x4e000500,0x7000000,0xf000000,0x19000000,0x28000000,0x34000000,0x43000000,0x52000000,0x64000000,0x79000500,0xff000000,0xffcbcbcb,0xffcbcbcb,
+ 0xffcdcdcd,0xffd1d1d1,0xffd6d6d6,0xffdddddd,0xffe7e7e7,0xffececec,0xffefefef,0xffefefef,0xffe7e7e7,0xffc5c5c5,0xff9f9f9f,0xff7f7f7f,0xff6f6f6f,0xff6b6b6b,
+ 0xff717171,0xff8c8c8c,0xffb5b5b5,0xff000000,0x76000500,0x58000500,0xc000000,0x19000000,0xff78cf7b,0xff75cd78,0xff71cb75,0xff6ec872,0xff69c56d,0xff67c56b,
+ 0xff62c466,0xff5ec463,0xff58c15d,0xff51bf57,0xff4dbd50,0xff45bc4a,0xff42b948,0xffc6c6c6,0xffd7d7d7,0xffe5e5e5,0xffeeeeee,0xfff2f2f2,0xffcfcfcf,0xffa0a0a0,
+ 0xff8d8d8d,0xff828282,0xff828282,0xff7d7d7d,0xff717171,0xff707070,0xff747474,0xff000000,0x80000500,0x60000500,0x12000000,0x27000000,0xff74cb77,0xff6fc673,
+ 0xff6ac16d,0xff64bc68,0xff61ba65,0xff5db860,0xff59b95d,0xff53b757,0xff4db552,0xff48b24c,0xff41b047,0xff3ead43,0xff3ead42,0xffa7a7a7,0xffc4c4c4,0xffdbdbdb,
+ 0xffececec,0xffd9d9d9,0xffababab,0xff9a9a9a,0xffa4a4a4,0xffc0c0c0,0xffcecece,0xffcfcfcf,0xffc4c4c4,0xff919191,0xff6e6e6e,0xff000000,0x87000500,0x66000500,
+ 0x17000000,0x31000000,0xff6fc673,0xffffffff,0xffffffff,0xffffffff,0xfff4f9f5,0xffa5d1a7,0xff4ca74f,0xffffffff,0xffffffff,0xffffffff,0xfff3f9f3,0xff9acb9c,
+ 0xff399e3d,0xff8d8d8d,0xffb1b1b1,0xffd3d3d3,0xffdddddd,0xffbdbdbd,0xffa8a8a8,0xffb5b5b5,0xffe6e6e6,0xfff3f3f3,0xfff7f7f7,0xfff3f3f3,0xffd1d1d1,0xffe7e7e7,
+ 0xff9f9f9f,0xff000000,0x8b000500,0x6a000500,0x1b000000,0x3c000000,0xff69bf6c,0xffffffff,0xffe0eee1,0xff7fb582,0xffc6ddc7,0xffffffff,0xff78b07a,0xffffffff,
+ 0xffdceadd,0xff6fa972,0xffc0d9c1,0xffffffff,0xff70ad73,0xff767676,0xffa2a2a2,0xffc8c8c8,0xffcacaca,0xffb3b3b3,0xffb1b1b1,0xffe3e3e3,0xfffafafa,0xfff8f8f8,
+ 0xfff7f7f7,0xffafafaf,0xff7a7a7a,0xffb6b6b6,0xffe1e1e1,0xff000000,0x8e000500,0x6d000500,0x1d000000,0x43000000,0xff62ba66,0xffffffff,0xffd1e3d2,0xff418943,
+ 0xff77a778,0xffffffff,0xff99bd9a,0xffffffff,0xffcbddcc,0xff2a772e,0xff6b9f6d,0xffffffff,0xff96bc98,0xff666666,0xff979797,0xffbfbfbf,0xffbfbfbf,0xffb2b2b2,
+ 0xffc5c5c5,0xfff5f5f5,0xfffbfbfb,0xfffafafa,0xffb6b6b6,0xff7c7c7c,0xff777777,0xff9b9b9b,0xffefefef,0xff000000,0x8f000500,0x6e000500,0x1f000000,0x45000000,
+ 0xff5eb661,0xffffffff,0xffd1e2d1,0xff3b803d,0xff9abc9a,0xffffffff,0xff88af8a,0xffffffff,0xffcbdacb,0xff276c29,0xff93b495,0xffffffff,0xff88b089,0xff606060,
+ 0xff919191,0xffbcbcbc,0xffb8b8b8,0xffb2b2b2,0xffcecece,0xfffdfdfd,0xfffcfcfc,0xffbababa,0xff828282,0xff7a7a7a,0xff808080,0xffe4e4e4,0xffffffff,0xff000000,
+ 0x90000500,0x6e000500,0x1f000000,0x46000000,0xff58b35d,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffdbe7dc,0xff397e3d,0xffffffff,0xffffffff,0xffffffff,
+ 0xffffffff,0xffdae5db,0xff3b803e,0xff616161,0xff929292,0xffbdbdbd,0xffbbbbbb,0xffaeaeae,0xffc6c6c6,0xfff9f9f9,0xffbcbcbc,0xff868686,0xff7e7e7e,0xff777777,
+ 0xff747474,0xffa4a4a4,0xfff4f4f4,0xff000000,0x90000500,0x6f000500,0x1f000000,0x46000000,0xff53b257,0xffffffff,0xffdde9dd,0xff70a473,0xff5d9a5f,0xff2d7d30,
+ 0xff2b7a2f,0xffffffff,0xffdae4da,0xff68936a,0xff578c5a,0xff29722b,0xff2b7a2f,0xff656565,0xff969696,0xffc2c2c2,0xffc5c5c5,0xffa8a8a8,0xffadadad,0xffeaeaea,
+ 0xffb9b9b9,0xff7e7e7e,0xff9b9b9b,0xff9a9a9a,0xff696969,0xff676767,0xff939393,0xff000000,0x90000500,0x6f000500,0x1f000000,0x46000000,0xff4eaf51,0xffffffff,
+ 0xffcee1ce,0xff2f8334,0xff308734,0xff2f8634,0xff2f8433,0xffffffff,0xffcbdbcb,0xff286f2a,0xff29732b,0xff2b7a2f,0xff2f8233,0xff6b6b6b,0xff9b9b9b,0xffc5c5c5,
+ 0xffd3d3d3,0xffa8a8a8,0xff949494,0xffb5b5b5,0xfff0f0f0,0xffc5c5c5,0xffebebeb,0xfffcfcfc,0xff9e9e9e,0xff686868,0xff686868,0xff000000,0x90000500,0x6f000500,
+ 0x1d000000,0x43000000,0xff49b04e,0xffffffff,0xffcde2ce,0xff318834,0xff338d37,0xff348e37,0xff318c36,0xffffffff,0xffcbdccc,0xff29752d,0xff2b7a2f,0xff2e7f31,
+ 0xff318834,0xff757575,0xffa4a4a4,0xffc7c7c7,0xffe3e3e3,0xffc5c5c5,0xff8d8d8d,0xff818181,0xffa5a5a5,0xffdddddd,0xffe8e8e8,0xffeaeaea,0xffcbcbcb,0xff707070,
+ 0xff696969,0xff000000,0x90000500,0x6f000500,0x1b000000,0x3e000000,0xff45b148,0xffffffff,0xffcde3ce,0xff348f37,0xff359439,0xff359539,0xff349138,0xffffffff,
+ 0xffcbddcc,0xff2d7b30,0xff2e8031,0xff308734,0xff338d37,0xff858585,0xffadadad,0xffcbcbcb,0xffe4e4e4,0xffeeeeee,0xffb7b7b7,0xff7d7d7d,0xff767676,0xff797979,
+ 0xff868686,0xff868686,0xff7c7c7c,0xff6d6d6d,0xff6d6d6d,0xff000000,0x90000500,0x6f000500,0x17000000,0x34000000,0xff3fb245,0xff3ba43f,0xff36993b,0xff369639,
+ 0xff369a3c,0xff36993b,0xff359539,0xff338e37,0xff2f8433,0xff2f8331,0xff308634,0xff318a35,0xff338e37,0xff979797,0xffb8b8b8,0xffd2d2d2,0xffe3e3e3,0xfff3f3f3,
+ 0xfff5f5f5,0xffc7c7c7,0xff969696,0xff727272,0xff727272,0xff727272,0xff727272,0xff939393,0xffbebebe,0xff000000,0x90000500,0x6e000500,0x12000000,0x28000000,
+ 0x47000000,0x6b000000,0x87000000,0x9a000000,0xa7000000,0xb2000000,0xbc000000,0xff000000,0xff6d6d6d,0xff6e6e6e,0xff767676,0xff848484,0xff969696,0xffadadad,
+ 0xffc6c6c6,0xffd9d9d9,0xffe8e8e8,0xffefefef,0xfff7f7f7,0xfff9f9f9,0xffebebeb,0xffd7d7d7,0xffc9c9c9,0xffc9c9c9,0xffd6d6d6,0xffeaeaea,0xfffafafa,0xff000000,
+ 0x8e000500,0x6d000500,0xc000000,0x1a000000,0x2f000000,0x47000000,0x5b000000,0x6c000000,0x79000000,0x87000000,0x97000000,0xff000000,0xffa0a0a0,0xffa0a0a0,
+ 0xffa5a5a5,0xffafafaf,0xffbababa,0xffc7c7c7,0xffd7d7d7,0xffe4e4e4,0xffededed,0xfff2f2f2,0xfff4f4f4,0xfff5f5f5,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,
+ 0xfff8f8f8,0xfff7f7f7,0xfff4f4f4,0xff000000,0x8c000500,0x6b000500,0x7000000,0x10000000,0x1b000000,0x2a000000,0x37000000,0x45000000,0x53000000,0x63000000,
+ 0x76000000,0xff000000,0xffc9c9c9,0xffc9c9c9,0xffcbcbcb,0xffd1d1d1,0xffd5d5d5,0xffdcdcdc,0xffe6e6e6,0xffececec,0xfff2f2f2,0xfff5f5f5,0xfff6f6f6,0xfff6f6f6,
+ 0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xff000000,0x87000500,0x68000500,0x4000000,0x7000000,0xd000000,0x14000000,
+ 0x1c000000,0x28000000,0x35000000,0x47000000,0x5c000600,0xff000000,0xffe5e5e5,0xffe5e5e5,0xffe7e7e7,0xffe8e8e8,0xffe8e8e8,0xffececec,0xfff1f1f1,0xfff3f3f3,
+ 0xfff5f5f5,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xff000000,0x7f000500,0x61000500,
+ 0x1000000,0x2000000,0x4000000,0x8000000,0xe000000,0x16000000,0x21000000,0x31000000,0x47000000,0xff000000,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7,0xfff8f8f8,
+ 0xfff8f8f8,0xfffafafa,0xfffcfcfc,0xfffdfdfd,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+ 0xffffffff,0xff000000,0x73000500,0x58000500,0xffffff,0xffffff,0xffffff,0x2000500,0x5000500,0xb000500,0x15000500,0x24000500,0x36000500,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x63000500,0x4c000500,0xffffff,0xffffff,0xffffff,0x1000500,0x4000500,0x9000500,
+ 0x11000500,0x1d000500,0x2c000500,0x3e000500,0x51000500,0x63000500,0x73000500,0x7f000500,0x87000500,0x8c000500,0x8e000500,0x90000500,0x90000500,0x90000500,
+ 0x90000500,0x90000500,0x90000500,0x90000500,0x8e000500,0x8c000500,0x87000500,0x7f000500,0x73000500,0x63000500,0x51000500,0x3e000500,0xffffff,0xffffff,
+ 0xffffff,0x1000500,0x3000500,0x7000500,0xd000500,0x16000500,0x22000500,0x30000500,0x3e000500,0x4c000500,0x58000500,0x61000500,0x68000500,0x6b000500,
+ 0x6d000500,0x6e000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6e000500,0x6d000500,0x6b000500,0x68000500,0x61000500,0x58000500,0x4c000500,
+ 0x3e000500,0x30000500
+};
+
+static const QRgb DocumentTypeWord_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000500,0x2000500,0x5000500,0x9000500,0x10000500,0x18000500,0x22000500,
+ 0x2c000500,0x36000500,0x3f000500,0x45000500,0x4a000500,0x4d000500,0x4e000500,0x4e000500,0x4e000500,0x4c000500,0x49000500,0x45000500,0x3f000500,0x37000500,
+ 0x2e000500,0x25000500,0x1c000500,0x13000500,0xd000500,0x8000500,0x4000500,0x2000500,0xffffff,0xffffff,0xffffff,0x1000500,0x3000500,0x7000500,
+ 0xd000500,0x16000500,0x22000500,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0xfd373737,0x72545754,0x44000500,0x37000500,0x2b000500,0x1f000500,0x15000500,0xd000500,0x8000500,0x4000500,0xffffff,0xffffff,
+ 0xffffff,0x1000500,0x4000500,0x9000500,0x11000500,0x1d000500,0x2c000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,
+ 0xfffefefe,0xfffdfdfd,0xfffafafa,0xfff5f5f5,0xffededed,0xffe3e3e3,0xffd1d1d1,0xfd363636,0x76404240,0x4e000500,0x3d000500,0x2e000500,0x21000500,0x16000500,
+ 0xe000500,0x8000500,0xffffff,0xffffff,0xffffff,0x2000500,0x5000500,0xb000500,0x15000500,0x24000500,0x36000500,0xff000000,0xffffffff,0xffffffff,
+ 0xffffffff,0xffffffff,0xfffefefe,0xfffefefe,0xfffdfdfd,0xfffdfdfd,0xfff8f8f8,0xfff0f0f0,0xffe3e3e3,0xffd4d4d4,0xfffefefe,0xffbebebe,0xfd383838,0x803e403e,
+ 0x53000500,0x40000500,0x2f000500,0x21000500,0x16000500,0xd000500,0xffffff,0xffffff,0xffffff,0x2000500,0x6000500,0xd000500,0x18000500,0x29000500,
+ 0x3f000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffdfdfd,0xfffdfdfd,0xfffbfbfb,0xfff6f6f6,0xffededed,0xffdbdbdb,0xffc6c6c6,
+ 0xffffffff,0xfffdfdfd,0xffaeaeae,0xfd3b3b3b,0x7e353735,0x55000500,0x41000500,0x2f000500,0x20000500,0x15000500,0xffffff,0xffffff,0x1000500,0x2000500,
+ 0x6000500,0xe000500,0x1b000500,0x2d000500,0x45000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfffafafa,
+ 0xfff4f4f4,0xffe8e8e8,0xffd5d5d5,0xffbababa,0xffffffff,0xffffffff,0xfffdfdfd,0xffa3a3a3,0xfd3e3e3e,0x7a2a2d2a,0x55000500,0x40000500,0x2d000500,0x1e000500,
+ 0xffffff,0xffffff,0x1000500,0x2000500,0x7000500,0xf000500,0x1d000500,0x30000500,0x4a000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+ 0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfff8f8f8,0xfff3f3f3,0xffe7e7e7,0xffd1d1d1,0xffb4b4b4,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff9d9d9d,0xfd454545,
+ 0x782b2b2b,0x52000500,0x3c000500,0x29000500,0xffffff,0xffffff,0x1000500,0x3000500,0x7000500,0x10000500,0x1e000500,0x32000500,0x4d000500,0xff000000,
+ 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffcfcfc,0xfffbfbfb,0xfff8f8f8,0xfff3f3f3,0xffe6e6e6,0xffd1d1d1,0xffb3b3b3,0xffffffff,0xffffffff,
+ 0xffffffff,0xffffffff,0xfff9f9f9,0xff9e9e9e,0xfc4c4c4c,0x701f231f,0x4c000500,0x36000500,0x1000000,0x2000000,0x5000000,0x9000000,0xf000000,0x18000000,
+ 0x27000000,0x3b000000,0x55000600,0xff000000,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7,0xfff8f8f8,0xfff6f6f6,0xfff7f7f7,0xfff7f7f7,0xfff6f6f6,0xfff2f2f2,0xffe8e8e8,
+ 0xffd4d4d4,0xffb9b9b9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xffa1a1a1,0xfb545454,0x5c000500,0x42000500,0x4000000,0x7000000,
+ 0xd000000,0x15000000,0x1d000000,0x29000000,0x38000000,0x4c000000,0x64000000,0xff000000,0xffe5e5e5,0xffe5e5e5,0xffe7e7e7,0xffe8e8e8,0xffe8e8e8,0xffececec,
+ 0xffefefef,0xfff3f3f3,0xfff0f0f0,0xffeaeaea,0xffdddddd,0xffc9c9c9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xff3e3e3e,
+ 0x6a000500,0x4e000500,0x7000000,0xf000000,0x19000000,0x28000000,0x34000000,0x43000000,0x52000000,0x64000000,0x79000500,0xff000000,0xffcbcbcb,0xffcbcbcb,
+ 0xffcdcdcd,0xffd1d1d1,0xffd6d6d6,0xffdddddd,0xffe7e7e7,0xffececec,0xffefefef,0xffefefef,0xffe7e7e7,0xffc5c5c5,0xff9f9f9f,0xff7f7f7f,0xff6f6f6f,0xff6b6b6b,
+ 0xff717171,0xff8c8c8c,0xffb5b5b5,0xff000000,0x76000500,0x58000500,0xc000000,0x18000000,0xff6568f3,0xff6365f3,0xff5f61f3,0xff5b5ef2,0xff5759f2,0xff5256f2,
+ 0xff4e50f2,0xff494bf1,0xff4246f1,0xff3b3ef0,0xff3437f0,0xff2a2eee,0xff2529ea,0xffc7c7c7,0xffd7d7d7,0xffe5e5e5,0xffeeeeee,0xfff2f2f2,0xffcfcfcf,0xffa0a0a0,
+ 0xff8d8d8d,0xff828282,0xff828282,0xff7d7d7d,0xff717171,0xff707070,0xff747474,0xff000000,0x80000500,0x60000500,0x12000000,0x26000000,0xff6264f1,0xff5e60ee,
+ 0xff595ced,0xff5457eb,0xff5053eb,0xff4c4eec,0xff4749eb,0xff3e41eb,0xff383cea,0xff3335ea,0xff2a2ee8,0xff2428e3,0xff2327dd,0xffa9a9a9,0xffc4c4c4,0xffdbdbdb,
+ 0xffececec,0xffd9d9d9,0xffababab,0xff9a9a9a,0xffa4a4a4,0xffc0c0c0,0xffcecece,0xffcfcfcf,0xffc4c4c4,0xff919191,0xff6e6e6e,0xff000000,0x87000500,0x66000500,
+ 0x17000000,0x30000000,0xff5e60ee,0xffa9abf3,0xffa6a7f0,0xff6666e3,0xff484add,0xff5e5fe3,0xff9b9dee,0xff5356e2,0xff2f33dd,0xff494be1,0xff9193e9,0xff9193e8,
+ 0xff2224d0,0xff919191,0xffb4b4b4,0xffd4d4d4,0xffdedede,0xffbdbdbd,0xffa8a8a8,0xffb5b5b5,0xffe6e6e6,0xfff3f3f3,0xfff7f7f7,0xfff3f3f3,0xffd1d1d1,0xffe7e7e7,
+ 0xff9f9f9f,0xff000000,0x8b000500,0x6a000500,0x1b000000,0x38000000,0xff595cec,0xffb4b5f1,0xffffffff,0xff9fa0e5,0xff3b3dcb,0xff9a9ae3,0xffffffff,0xff9596e2,
+ 0xff2427c7,0xff9091e0,0xffffffff,0xffa1a2e2,0xff1f22c0,0xff7b7b7b,0xffa8a8a8,0xffcccccc,0xffcbcbcb,0xffb3b3b3,0xffb1b1b1,0xffe3e3e3,0xfffafafa,0xfff8f8f8,
+ 0xfff7f7f7,0xffafafaf,0xff7a7a7a,0xffb6b6b6,0xffe1e1e1,0xff000000,0x8e000500,0x6d000500,0x1d000000,0x3d000000,0xff5256e9,0xff6566e1,0xffffffff,0xffe8e8f7,
+ 0xff3033b5,0xffe7e7f5,0xffffffff,0xffe6e6f5,0xff1b1eab,0xffe5e5f4,0xffffffff,0xff3f41b7,0xff1d1fb3,0xff6f6f6f,0xffa0a0a0,0xffc6c6c6,0xffc0c0c0,0xffb2b2b2,
+ 0xffc5c5c5,0xfff5f5f5,0xfffbfbfb,0xfffafafa,0xffb6b6b6,0xff7c7c7c,0xff777777,0xff9b9b9b,0xffefefef,0xff000000,0x8f000500,0x6e000500,0x1f000000,0x3f000000,
+ 0xff4f51ea,0xff4547da,0xffc3c4ee,0xffffffff,0xff9394cf,0xffffffff,0xffffffff,0xffffffff,0xff8d8ec4,0xffffffff,0xffbbbbdd,0xff191b9d,0xff1d1eac,0xff6a6a6a,
+ 0xff9d9d9d,0xffc4c4c4,0xffbababa,0xffb2b2b2,0xffcecece,0xfffdfdfd,0xfffcfcfc,0xffbababa,0xff828282,0xff7a7a7a,0xff808080,0xffe4e4e4,0xffffffff,0xff000000,
+ 0x90000500,0x6e000500,0x1f000000,0x3e000000,0xff4a4deb,0xff3f42dd,0xff7373d9,0xffffffff,0xffffffff,0xffffffff,0xff6061a9,0xffffffff,0xffffffff,0xffffffff,
+ 0xff6061ab,0xff191a99,0xff1b1da8,0xff6b6b6b,0xff9e9e9e,0xffc5c5c5,0xffbdbdbd,0xffaeaeae,0xffc6c6c6,0xfff9f9f9,0xffbcbcbc,0xff868686,0xff7e7e7e,0xff777777,
+ 0xff747474,0xffa4a4a4,0xfff4f4f4,0xff000000,0x90000500,0x6f000500,0x1f000000,0x3e000000,0xff4548ee,0xff3c3ee3,0xff2f33d0,0xffdadaf2,0xffffffff,0xffadadd4,
+ 0xff161987,0xffacadd0,0xffffffff,0xffe5e5f0,0xff16198c,0xff191b9a,0xff1b1ea9,0xff6e6e6e,0xffa0a0a0,0xffc7c7c7,0xffc6c6c6,0xffa8a8a8,0xffadadad,0xffeaeaea,
+ 0xffb9b9b9,0xff7e7e7e,0xff9b9b9b,0xff9a9a9a,0xff696969,0xff676767,0xff939393,0xff000000,0x90000500,0x6f000500,0x1f000000,0x3d000000,0xff3e40f0,0xff3538e8,
+ 0xff2b2fd9,0xff8384dc,0xffffffff,0xff6263b9,0xff171a94,0xff6062af,0xffffffff,0xff7e7fbc,0xff171a94,0xff191da0,0xff1b1ead,0xff717171,0xffa3a3a3,0xffc9c9c9,
+ 0xffd4d4d4,0xffa8a8a8,0xff949494,0xffb5b5b5,0xfff0f0f0,0xffc5c5c5,0xffebebeb,0xfffcfcfc,0xff9e9e9e,0xff686868,0xff686868,0xff000000,0x90000500,0x6f000500,
+ 0x1d000000,0x3b000000,0xff3639f1,0xff2d30eb,0xff2428df,0xff2024cd,0xff6465cd,0xff1d1ead,0xff1b1ea6,0xff1a1da1,0xff6262b9,0xff2b2fa3,0xff191da0,0xff1b1ea7,
+ 0xff1b1eae,0xff787878,0xffa6a6a6,0xffc9c9c9,0xffe3e3e3,0xffc5c5c5,0xff8d8d8d,0xff818181,0xffa5a5a5,0xffdddddd,0xffe8e8e8,0xffeaeaea,0xffcbcbcb,0xff707070,
+ 0xff696969,0xff000000,0x90000500,0x6f000500,0x1b000000,0x36000000,0xff2e31f1,0xff272aee,0xff2428e2,0xff2225d4,0xff2023c7,0xff1e22bd,0xff1d20b6,0xff1d1fb3,
+ 0xff1d1eae,0xff1b1eac,0xff1b1eac,0xff1b1faf,0xff1d1fb3,0xff858585,0xffadadad,0xffcbcbcb,0xffe4e4e4,0xffeeeeee,0xffb7b7b7,0xff7d7d7d,0xff767676,0xff797979,
+ 0xff868686,0xff868686,0xff7c7c7c,0xff6d6d6d,0xff6d6d6d,0xff000000,0x90000500,0x6f000500,0x17000000,0x2e000000,0xff272aee,0xff2529e7,0xff2427de,0xff2225d7,
+ 0xff2224cc,0xff1f23c6,0xff1e22c0,0xff1e20bc,0xff1e20b7,0xff1e1fb5,0xff1d1fb2,0xff1d1fb3,0xff1e20b4,0xff979797,0xffb8b8b8,0xffd2d2d2,0xffe3e3e3,0xfff3f3f3,
+ 0xfff5f5f5,0xffc7c7c7,0xff969696,0xff727272,0xff727272,0xff727272,0xff727272,0xff939393,0xffbebebe,0xff000000,0x90000500,0x6e000500,0x12000000,0x25000000,
+ 0x3e000000,0x5e000000,0x79000000,0x91000000,0xa2000000,0xaf000000,0xba000000,0xff000000,0xff757575,0xff757575,0xff7b7b7b,0xff878787,0xff979797,0xffacacac,
+ 0xffc6c6c6,0xffd9d9d9,0xffe8e8e8,0xffefefef,0xfff7f7f7,0xfff9f9f9,0xffebebeb,0xffd7d7d7,0xffc9c9c9,0xffc9c9c9,0xffd6d6d6,0xffeaeaea,0xfffafafa,0xff000000,
+ 0x8e000500,0x6d000500,0xc000000,0x18000000,0x2a000000,0x3f000000,0x52000000,0x65000000,0x75000000,0x84000000,0x94000000,0xff000000,0xffa6a6a6,0xffa6a6a6,
+ 0xffaaaaaa,0xffb1b1b1,0xffbbbbbb,0xffc7c7c7,0xffd7d7d7,0xffe4e4e4,0xffededed,0xfff2f2f2,0xfff4f4f4,0xfff5f5f5,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,
+ 0xfff8f8f8,0xfff7f7f7,0xfff4f4f4,0xff000000,0x8c000500,0x6b000500,0x7000000,0xf000000,0x19000000,0x27000000,0x34000000,0x42000000,0x51000000,0x62000000,
+ 0x75000000,0xff000000,0xffcbcbcb,0xffcbcbcb,0xffcdcdcd,0xffd1d1d1,0xffd6d6d6,0xffdcdcdc,0xffe6e6e6,0xffececec,0xfff2f2f2,0xfff5f5f5,0xfff6f6f6,0xfff6f6f6,
+ 0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xff000000,0x87000500,0x68000500,0x4000000,0x7000000,0xd000000,0x14000000,
+ 0x1c000000,0x28000000,0x35000000,0x47000000,0x5c000600,0xff000000,0xffe5e5e5,0xffe5e5e5,0xffe7e7e7,0xffe8e8e8,0xffe8e8e8,0xffececec,0xfff1f1f1,0xfff3f3f3,
+ 0xfff5f5f5,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xff000000,0x7f000500,0x61000500,
+ 0x1000000,0x2000000,0x4000000,0x8000000,0xe000000,0x16000000,0x21000000,0x31000000,0x47000000,0xff000000,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7,0xfff8f8f8,
+ 0xfff8f8f8,0xfffafafa,0xfffcfcfc,0xfffdfdfd,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+ 0xffffffff,0xff000000,0x73000500,0x58000500,0xffffff,0xffffff,0xffffff,0x2000500,0x5000500,0xb000500,0x15000500,0x24000500,0x36000500,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x63000500,0x4c000500,0xffffff,0xffffff,0xffffff,0x1000500,0x4000500,0x9000500,
+ 0x11000500,0x1d000500,0x2c000500,0x3e000500,0x51000500,0x63000500,0x73000500,0x7f000500,0x87000500,0x8c000500,0x8e000500,0x90000500,0x90000500,0x90000500,
+ 0x90000500,0x90000500,0x90000500,0x90000500,0x8e000500,0x8c000500,0x87000500,0x7f000500,0x73000500,0x63000500,0x51000500,0x3e000500,0xffffff,0xffffff,
+ 0xffffff,0x1000500,0x3000500,0x7000500,0xd000500,0x16000500,0x22000500,0x30000500,0x3e000500,0x4c000500,0x58000500,0x61000500,0x68000500,0x6b000500,
+ 0x6d000500,0x6e000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6e000500,0x6d000500,0x6b000500,0x68000500,0x61000500,0x58000500,0x4c000500,
+ 0x3e000500,0x30000500
+};
+
+static const QRgb FileBrowser_data[] = {
+ 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
+ 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
+ 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff0f4120,0xff0c3119,0xff0c3119,0xff0c3819,
+ 0xff0c3619,0xff0c3319,0xff0c3119,0xff0c3119,0xff13592b,0xff13592b,0xff13592b,0xff13582b,0xff13582b,0xff13572a,0xff13572a,0xff13562a,0xff13562a,0xff135429,
+ 0xff125329,0xff125329,0xff125329,0xff125228,0xff125228,0xff125128,0xff125028,0xff124f27,0xff104d25,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
+ 0xff135429,0xffd0d0d0,0xffa7a7a7,0xff7e7e7e,0xff7e7e7e,0xff889786,0xff879286,0xff838882,0xff7e7e7e,0xff7e7e7e,0xffdfdfdf,0xffdedede,0xffdddddd,0xffdcdcdc,
+ 0xffdadada,0xffd8d8d8,0xffd7d7d7,0xffd5d5d5,0xffd3d3d3,0xffd1d1d1,0xffd1d1d1,0xffcfcfcf,0xffcecece,0xffcccccc,0xffc9c9c9,0xffc3c3c3,0xff104b24,0x5c000000,
+ 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff125329,0xffd5d5d5,0xffd6d6d6,0xffd1d1d1,0xffadadad,0xff7e7e7e,0xff7e7e7e,0xff92a390,0xff93a391,0xff8b948a,
+ 0xff7d7d7d,0xff7c7c7c,0xffdcdcdc,0xffdadada,0xff7a7a7a,0xff7a7a7a,0xff787878,0xffd3d3d3,0xffd1d1d1,0xffd1d1d1,0xffcfcfcf,0xffcdcdcd,0xffcccccc,0xffc7c7c7,
+ 0xffc3c3c3,0xffbdbdbd,0xff104923,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff124f27,0xffd1d0d0,0xffd4d3d3,0xffd5d5d5,0xffd6d6d6,0xffd1d1d1,
+ 0xffafafaf,0xff7e7e7e,0xff7e7e7e,0xff9caf9a,0xff9fb19d,0xff95a294,0xff7b7b7b,0xff7a7a7a,0xff919e90,0xff909d8f,0xff7e817d,0xff777777,0xff767676,0xffcfcfcf,
+ 0xffcdcdcd,0xffcccccc,0xffc7c7c7,0xffc3c3c3,0xffbdbdbd,0xffb7b7b7,0xff0f4623,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff104723,0xffc3bfbf,
+ 0xffcbcaca,0xffd1d0d0,0xffd4d3d3,0xffd5d5d5,0xffd6d6d6,0xffd2d2d2,0xffb2b2b2,0xff7d7d7d,0xff7d7d7d,0xffa5b9a4,0xffa6baa4,0xffa4b7a3,0xffa6bba4,0xffa4b9a3,
+ 0xffa3b6a1,0xff92a091,0xff7c7f7b,0xff747474,0xff737373,0xffc7c7c7,0xffc3c3c3,0xffbdbdbd,0xffb7b7b7,0xffb1b1b1,0xff0f4322,0x93000000,0x62000000,0x3b000000,
+ 0x1f000000,0x3d000000,0xff0d3c1e,0xffaba4a4,0xffb8b3b3,0xffc3bfbf,0xffcbcaca,0xffd1d0d0,0xffd4d3d3,0xffd5d5d5,0xffd5d5d5,0xffd3d3d3,0xffb2b2b2,0xff7b7b7b,
+ 0xff7a7a7a,0xffacc0aa,0xffadc1ab,0xffacc0ab,0xffabbfa9,0xffa8bda6,0xffa5baa4,0xff93a192,0xff7a7d79,0xff6e6e6e,0xffbdbdbd,0xffb9b9b9,0xffb3b3b3,0xffadadad,
+ 0xff0f4120,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0c341a,0xff978d8d,0xffa09797,0xffaba4a4,0xffb8b3b3,0xffc3bfbf,0xffcbc9c9,0xffd1d0d0,
+ 0xffd3d2d2,0xffd4d4d4,0xffd3d3d3,0xffd3d3d3,0xffb4b4b4,0xff7a7a7a,0xff797979,0xffb2c7b0,0xffb2c7b0,0xffb0c5ae,0xffadc3ac,0xffaabea8,0xffa4b8a2,0xffc6e0c5,
+ 0xff686868,0xffb4b4b4,0xffadadad,0xffa7a7a7,0xff0d401f,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0c3119,0xff7e7e7e,0xff8c8383,0xff978d8d,
+ 0xffa09797,0xffaba4a4,0xffb7b3b3,0xffc2bebe,0xffcac8c8,0xffd0cfcf,0xffd1d1d1,0xffd2d2d2,0xffd1d1d1,0xffd1d1d1,0xffb3b3b3,0xff777777,0xff757575,0xffb6ccb5,
+ 0xffb5cbb3,0xffb0c6ae,0xffaac0a9,0xffc4ddc2,0xff656565,0xffaeaeae,0xffa8a8a8,0xffa3a3a3,0xff0d3e1e,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3e000000,
+ 0xff105425,0xff9ca69b,0xff7c7c7c,0xff7c7c7c,0xff877f7f,0xff948a8a,0xff9d9494,0xffa8a1a1,0xffb6b1b1,0xffc0bdbd,0xffc9c7c7,0xffcdcccc,0xffd0cfcf,0xffd0d0d0,
+ 0xffcfcfcf,0xffcecece,0xffb5b5b5,0xff737373,0xff6f6f6f,0xffb4cbb3,0xffb0c7ae,0xffbed7bd,0xff636363,0xffa9a9a9,0xffa4a4a4,0xff9e9e9e,0xff0d3c1e,0x99000000,
+ 0x66000000,0x3d000000,0x21000000,0x42000000,0xff125725,0xffbdd3bc,0xffb0c4af,0xff909a8f,0xff717171,0xff727272,0xff7c7777,0xff8c8282,0xff988f8f,0xffa59f9f,
+ 0xffb4afaf,0xffbebbbb,0xffc6c4c4,0xffcbcaca,0xffcccccc,0xffcccccc,0xffcbcbcb,0xffcacaca,0xffafafaf,0xff686868,0xffaec5ad,0xffb8d0b6,0xff5f5f5f,0xffa4a4a4,
+ 0xff9e9e9e,0xff989898,0xff0d391d,0x99000000,0x66000000,0x3d000000,0x2a000000,0x4f000000,0xff0f4d22,0xff9daf9c,0xff8f9f8d,0xff859584,0xff7f8d7e,0xff6e776e,
+ 0xff5b5b5b,0xff636363,0xff746e6e,0xff887e7e,0xff988e8e,0xffa49d9d,0xffb2adad,0xffbbb8b8,0xffc3c1c1,0xffc7c6c6,0xffc8c8c8,0xffc5c4c4,0xffc2c2c2,0xff656565,
+ 0xffa7bda6,0xffb0c6ae,0xff5c5c5c,0xff9d9d9d,0xff989898,0xff919191,0xff0c371b,0x99000000,0x66000000,0x3d000000,0x40000000,0x6a000000,0xff0d3c1a,0xff6e7b6d,
+ 0xff5b655a,0xff4f584e,0xff4a524a,0xff4c564b,0xff545e53,0xff596059,0xff535353,0xff636363,0xff777272,0xff8b8181,0xff988e8e,0xffa39b9b,0xffaeaaaa,0xffb8b6b6,
+ 0xffbebdbd,0xffbfbfbf,0xffbebebe,0xff606060,0xff9bb09a,0xffa7bda6,0xff585858,0xff979797,0xff919191,0xff8c8c8c,0xff0c351a,0x99000000,0x66000000,0x3d000000,
+ 0x64000000,0x91000000,0xff082812,0xff767a75,0xffaeb0ad,0xffdddedd,0xfffbfbfb,0xffdddedd,0xffadafad,0xff717771,0xff525d52,0xff646d63,0xff616161,0xff6e6e6e,
+ 0xff7a7777,0xff8b8080,0xff968d8d,0xffa19a9a,0xffb0adad,0xffb9b8b8,0xffbababa,0xff5d5d5d,0xff8fa38e,0xff9eb29c,0xff545454,0xff909090,0xff8b8b8b,0xff858585,
+ 0xff0c3319,0x99000000,0x66000000,0x3d000000,0x92000000,0xb8000000,0xff6f7972,0xffd0d1d0,0xffb3b5b3,0xff9ca19c,0xff959a94,0xff9b9f9b,0xffb1b5b1,0xffcfd0cf,
+ 0xff878b87,0xff505a4f,0xff727f71,0xff828d80,0xff6f6f6f,0xff727272,0xff777272,0xff898181,0xffa09a9a,0xffafadad,0xffb5b4b4,0xff595959,0xff839682,0xff96a895,
+ 0xff505050,0xff8a8a8a,0xff858585,0xff818181,0xff0a3119,0x99000000,0x66000000,0x3d000000,0xbd000000,0xdd575757,0xffc7cac7,0xffa4a8a4,0xffa0a69f,0xffacb4ab,
+ 0xffaeb6ae,0xffaab1a9,0xff9ca39c,0xffa2a6a2,0xffcfd0ce,0xff6f736f,0xff5b675b,0xff7e8e7c,0xff92a491,0xff8b9a8a,0xff696969,0xff656565,0xff8a8383,0xffa29e9e,
+ 0xffadadad,0xff545454,0xff798a77,0xff8c9d8b,0xff4d4d4d,0xff858585,0xff808080,0xff7c7c7c,0xff0a2f17,0x99000000,0x66000000,0x3d000000,0xd9000000,0xf0a5a5a5,
+ 0xffa3a8a4,0xffa0a69f,0xffb5bdb4,0xffbcc6bb,0xffbcc6bc,0xffb9c3b8,0xffafb8ae,0xff9ba19a,0xffb0b3b0,0xffabadab,0xff4a534a,0xff728071,0xff899b88,0xff8da18c,
+ 0xff899c87,0xff81947f,0xff5b5b5b,0xff938d8d,0xffa4a3a3,0xff505050,0xff6e7f6d,0xff839281,0xff494949,0xff7f7f7f,0xff7a7a7a,0xff787878,0xff0a2e16,0x99000000,
+ 0x66000000,0x3d000000,0xe7000000,0xf9dcdcdc,0xff808b83,0xffabb4ab,0xffbcc6bb,0xffbec9bd,0xffbdc8bd,0xffbcc6bb,0xffb6c0b6,0xffa5ada5,0xff989c98,0xffdddddd,
+ 0xff404940,0xff667466,0xff81937f,0xff869984,0xff81957f,0xff7a8d79,0xff565656,0xff7a7474,0xff989494,0xff4c4c4c,0xff647563,0xff7a887a,0xff464646,0xff7a7a7a,
+ 0xff767676,0xff747474,0xff0a2d16,0x99000000,0x66000000,0x3d000000,0xec000000,0xfefbfbfb,0xff757a77,0xffa6aca6,0xffbcc6bc,0xffbdc8bd,0xffbcc6bb,0xffbac4b9,
+ 0xffb7c0b6,0xffa7b0a7,0xff90948f,0xfffbfbfb,0xff394039,0xff5f6c5e,0xff7a8c79,0xff7e927c,0xff7a8d79,0xff748772,0xff6e806c,0xff4d4d4d,0xff898383,0xff494949,
+ 0xff5b6b59,0xff717e71,0xff434343,0xff767676,0xff737373,0xff707070,0xff0a2b14,0x99000000,0x66000000,0x3d000000,0xe7000000,0xf9dcdcdc,0xff818b85,0xff959595,
+ 0xff9f9f9f,0xffb2b9b1,0xffbac4b9,0xffb8c3b7,0xffb3bdb3,0xffa3aaa2,0xff969a95,0xffd9dad9,0xff343c34,0xff576356,0xff71826f,0xff778975,0xff758874,0xff6f816d,
+ 0xff687b66,0xff4a4a4a,0xff6d6767,0xff464646,0xff51624f,0xff6a7569,0xff424242,0xff727272,0xff717171,0xff6f6f6f,0xff0a2b14,0x99000000,0x66000000,0x3d000000,
+ 0xd9000000,0xf0a5a5a5,0xffa3a8a4,0xffa6a6a6,0xffbebebe,0xff9f9f9f,0xff9f9f9f,0xffacb2ab,0xffa9b2a9,0xff969b96,0xffabadaa,0xffa0a2a0,0xff2e352d,0xff4a5449,
+ 0xff617160,0xff6c7d6a,0xff6d7f6b,0xff697c68,0xff647762,0xff5f715c,0xff464646,0xff454545,0xff4c5d4a,0xff636c62,0xff404040,0xff727272,0xff707070,0xff6f6f6f,
+ 0xff0a2b14,0x99000000,0x66000000,0x3d000000,0xbd000000,0xdd575757,0xffc7cac8,0xffa8a8a8,0xffa6a6a6,0xffb4b4b4,0xffb8b8b8,0xff939393,0xff8b8b8b,0xff999a99,
+ 0xffc1c2c1,0xff6a6b6a,0xff2d312b,0xff374036,0xff4c574a,0xff596858,0xff61725f,0xff637660,0xff60735e,0xff5b6d59,0xff454545,0xff434343,0xff475845,0xff5b635b,
+ 0xff404040,0xff717171,0xff707070,0xff6f6f6f,0xff0a2b14,0x99000000,0x66000000,0x3d000000,0x92000000,0xb8000000,0xff6f7972,0xffd1d1d1,0xffb5b5b5,0xffa0a0a0,
+ 0xff999999,0xff9d9d9d,0xffafafaf,0xffc0c0c0,0xff7c7c7c,0xffe8e8e8,0xffd2d3d2,0xff2b312b,0xff313b31,0xff424e41,0xff505e4f,0xff576856,0xff596b58,0xff566853,
+ 0xff526550,0xff424242,0xff435441,0xff535a53,0xff3f3f3f,0xff707070,0xff6f6f6f,0xff6f6f6f,0xff0a2b14,0x99000000,0x66000000,0x3d000000,0x64000000,0x91000000,
+ 0xff082512,0xff797979,0xffafafaf,0xffdedede,0xfffbfbfb,0xffdcdcdc,0xffa5a5a5,0xff606060,0xffe6e6e6,0xffffffff,0xffffffff,0xffd1d1d1,0xff272a25,0xff2b332a,
+ 0xff3b4639,0xff485647,0xff4f5f4d,0xff50624e,0xff4f604d,0xff404040,0xff425340,0xff4d514d,0xff3f3f3f,0xff707070,0xff707070,0xff6f6f6f,0xff0a2b16,0x99000000,
+ 0x66000000,0x3d000000,0x40000000,0x6a000000,0xff0d381b,0xff727272,0xff5d5d5d,0xff505050,0xff4a4a4a,0xff474747,0xff414141,0xff363636,0xff767676,0xfffbfbfb,
+ 0xffffffff,0xffffffff,0xffd1d1d1,0xff222322,0xff252d25,0xff364135,0xff425041,0xff495946,0xff495c48,0xff4a5b47,0xff3f3f3f,0xff474947,0xff3f3f3f,0xff707070,
+ 0xff707070,0xff707070,0xff0a2d16,0x99000000,0x66000000,0x3d000000,0x28000000,0x4e000000,0xff0f4623,0xffa0a0a0,0xff8d8d8d,0xff818181,0xff7a7a7a,0xff757575,
+ 0xff696969,0xff535353,0xff3b3b3b,0xff747474,0xfffbfbfb,0xffffffff,0xffffffff,0xffd1d1d1,0xff1e1e1e,0xff232823,0xff354033,0xff404f3e,0xff455642,0xff465843,
+ 0xff3f3f3f,0xff414241,0xff3f3f3f,0xff707070,0xff707070,0xff717171,0xff0a2d16,0x93000000,0x62000000,0x3b000000,0x1d000000,0x3b000000,0xff124c25,0xffb6b6b6,
+ 0xffadadad,0xffa6a6a6,0xff9f9f9f,0xff989898,0xff8a8a8a,0xff727272,0xff535353,0xff343434,0xff707070,0xfffbfbfb,0xffffffff,0xffffffff,0xffd2d2d2,0xff222222,
+ 0xff242424,0xff353e34,0xff40503f,0xff435441,0xff435440,0xff3e3e3e,0xff3e3e3e,0xff707070,0xff717171,0xff727272,0xff0a2e16,0x87000000,0x5a000000,0x36000000,
+ 0x17000000,0x2f000000,0xff104d25,0xff104a24,0xff104823,0xff0f4523,0xff0f4220,0xff0f401f,0xff0d3c1e,0xff0c3519,0xff082914,0xff061d0f,0xff031208,0xff666866,
+ 0xfffbfbfb,0xffffffff,0xffffffff,0xff797b7a,0xff05170c,0xff051208,0xff05160c,0xff05190c,0xff05190c,0xff05190c,0xff0a2b16,0xff0a2d16,0xff0a2d16,0xff0a2e16,
+ 0xff0a2f17,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x9b000000,0xa1000000,
+ 0xad000000,0xc0000000,0xd5000000,0xe9000000,0xf8676767,0xfffbfbfb,0xfa959595,0xe6000000,0xcf000000,0xb7000000,0xa4000000,0x9c000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
+ 0x62000000,0x66000000,0x67000000,0x6a000000,0x74000000,0x89000000,0xab000000,0xce000000,0xe8000000,0xf4404040,0xeb000000,0xd3000000,0xaf000000,0x8c000000,
+ 0x75000000,0x6a000000,0x67000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
+ 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3e000000,0x3f000000,0x44000000,0x4b000000,0x54000000,0x5d000000,0x63000000,
+ 0x65000000,0x60000000,0x57000000,0x4e000000,0x45000000,0x40000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
+ 0x18000000,0xf000000
+};
+
+static const QRgb Games_data[] = {
+ 0xffffff,0xffffff,0x0,0x3ceee7c6,0x9dd6ceaa,0xf4cac092,0xfff2e396,0xfff2dd78,0xf4cab549,0x9dd6b92f,0x3ceeca15,0x0,0xffffff,0xffffff,
+ 0xffffff,0xfff8d8,0x7ac4c0ac,0xfbdbd6bd,0xfff6eec9,0xfffbefb5,0xffffee9c,0xffffe878,0xfffbdd4f,0xfff6d225,0xfbd9b400,0x7ab79800,0xe4be00,0xffffff,
+ 0x0,0x7ac4c0ac,0xffdbd7c2,0xff84763c,0xff84763c,0xff84763c,0xffac9f5e,0xffac9b47,0xff84763c,0xff84763c,0xff84763c,0xffc09f00,0x7aa28700,0x1000000,
+ 0x38fff8d4,0xfadbd6bd,0xff84763c,0xffa9a9a9,0xffd9d9d9,0xffe0e0e0,0xfff5e594,0xfff5e182,0xffe0e0e0,0xffd9d9d9,0xffa9a9a9,0xff84763c,0xfaa68900,0x33b99a00,
+ 0x9dd6ceaa,0xfffbf3cd,0xff84763c,0xffffffff,0xffa3a3a4,0xff777777,0xffd3bd52,0xffd3ba44,0xff777777,0xffa3a3a4,0xffffffff,0xff84763c,0xffad9000,0x98887100,
+ 0xf4cac092,0xfffbefb5,0xff84763c,0xffd2d0cb,0xff1e1f23,0xff000000,0xffac920f,0xffac9008,0xff000000,0xff1e1f23,0xffd2d0cb,0xff84763c,0xff9d8200,0xf36f5d00,
+ 0xfff2e396,0xffffee9c,0xff84763c,0xff81784c,0xff3b3415,0xff1d1800,0xffb39504,0xffb29400,0xff1d1800,0xff3b3415,0xff81784c,0xff84763c,0xff8e7600,0xfe766300,
+ 0xfff2dd78,0xffffe878,0xffffe66a,0xff8b7511,0xff917a03,0xffc7a500,0xffdab500,0xffd8b400,0xffc7a500,0xff8e7700,0xff7b6600,0xff957c00,0xff7f6a00,0xfe766300,
+ 0xf4cab549,0xfffbdd4f,0xff84763c,0xffd9bb2b,0xffffd816,0xfffdd200,0xfff8ce00,0xfff3ca00,0xffe5be00,0xffc7a500,0xff887100,0xff84763c,0xff7d6800,0xf3625100,
+ 0x9dd6b92f,0xfffbd725,0xff312900,0xff0a0800,0xffc7a500,0xffc7a500,0xffc7a500,0xffc7a500,0xffc7a500,0xffc7a500,0xff0a0800,0xff332b00,0xff7d6800,0x98695800,
+ 0x38ffd816,0xfad9b400,0xfff2c900,0xff8e7600,0xff4b3f00,0xff181500,0xff161200,0xff161200,0xff151300,0xff312a00,0xff645400,0xff7f6a00,0xfa6d5b00,0x337f6a00,
+ 0x0,0x7ab79800,0xffc09f00,0xffd1ae00,0xffc3a200,0xff625200,0xff564900,0xff544700,0xff4d4100,0xff7f6a00,0xff7f6a00,0xff6d5b00,0x7a625100,0x0,
+ 0xffffff,0x8e4be00,0x7aa18700,0xfba68900,0xffaa8d00,0xff9d8200,0xff8e7600,0xff7f6a00,0xff7d6800,0xff7b6600,0xfb6d5b00,0x7a625100,0x7f6a00,0xffffff,
+ 0xffffff,0xffffff,0x0,0x37ab8f00,0x98887100,0xf36f5d00,0xfe766300,0xfe766300,0xf3625100,0x98695800,0x37766200,0x1000000,0xffffff,0xffffff
+};
+
+static const QRgb Go_black_highlight_data[] = {
+ 0x28999b9c,0x2d949697,0x32959798,0x43868788,0x776f6f70,0x9a626263,0x93606060,0x60646565,0x31818384,0x22969899,0x1e939596,0x1b919394,0x2e9a9b9c,0x369c9d9f,
+ 0x6b7c7d7e,0xbc737474,0xe2696a6a,0xed656565,0xed616162,0xe35a5a5a,0xb24b4c4c,0x51555555,0x25818384,0x1c919394,0x34949697,0x6a848586,0xce7d7e7e,0xf97b7c7d,
+ 0xff767777,0xff767777,0xff727373,0xff5e5e5f,0xfa494a4a,0xcd393939,0x5b414243,0x237d7e7f,0x409c9e9f,0xb97f8080,0xf9838484,0xffaaabac,0xffa6a7a8,0xff9b9c9c,
+ 0xff717272,0xff5e5e5e,0xff505151,0xfc3f3f3f,0xb62e2f2f,0x46464748,0x68848585,0xde828283,0xffa0a1a2,0xffe5e6e6,0xffffffff,0xffa6a8a8,0xff7b7c7c,0xff666666,
+ 0xff545555,0xff434343,0xeb2d2d2e,0x7a2d2d2e,0x82777878,0xea757676,0xff919292,0xffbdbebe,0xffe6e6e7,0xffa2a3a4,0xff7f8080,0xff646565,0xff515152,0xff404040,
+ 0xfa2d2d2d,0xa3232324,0x766f7071,0xea6e6f6f,0xff787a7a,0xff7e8080,0xff949595,0xff757676,0xff646464,0xff575858,0xff4d4d4e,0xff404040,0xfc2d2d2d,0xb2202020,
+ 0x4a7c7e7e,0xda59595a,0xfe565757,0xff6c6d6d,0xff787878,0xff626262,0xff525354,0xff484849,0xff3c3c3c,0xff373838,0xfa242424,0xa91e1e1e,0x2e8d8f90,0x9b464747,
+ 0xf7484949,0xff5a5a5b,0xff636364,0xff515152,0xff454545,0xff3c3c3c,0xff373838,0xff2a2a2a,0xee191919,0x871e1f1f,0x26909293,0x4b585859,0xc0393939,0xfa414141,
+ 0xff4e4e4f,0xff434343,0xff3b3c3c,0xff333334,0xff2a2b2b,0xf81b1b1c,0xc0171717,0x572b2b2c,0x218e9091,0x28818384,0x5d444445,0xb52d2d2d,0xeb2e2f2f,0xfa2d2d2d,
+ 0xfd272728,0xfb1f2020,0xf1181818,0xc4171717,0x6f232424,0x2e4b4c4d,0x1e8e9091,0x1f929495,0x28787a7b,0x4b434445,0x842c2c2c,0xaf232323,0xc01c1d1d,0xb71a1a1b,
+ 0x931c1c1c,0x5c282929,0x2f4a4b4c,0x1b7c7e7e
+};
+
+static const QRgb Go_black_data[] = {
+ 0x0,0x0,0x0,0x184a4a4a,0x664a4a4a,0x89454545,0x763c3c3c,0x302d2d2d,0x2000000,0x0,0x0,0x0,0x0,0x0,
+ 0x6d505050,0xf5535353,0xff525252,0xff4d4d4d,0xff454545,0xfd393939,0xb3272727,0x18080808,0x1000000,0x0,0x0,0x64505050,0xfe575757,0xff595959,
+ 0xff585858,0xff4d4d4d,0xff464646,0xff3d3d3d,0xff313131,0xce1a1a1a,0x1d000000,0x1000000,0xb474747,0xec525252,0xff575757,0xff989898,0xffa2a2a2,0xff4f4f4f,
+ 0xff434343,0xff3b3b3b,0xff313131,0xff212121,0x98090909,0x12000000,0x48474747,0xff515151,0xff545454,0xff888888,0xff787878,0xff474747,0xff3f3f3f,0xff373737,
+ 0xff2d2d2d,0xff212121,0xe80f0f0f,0x3f000000,0x64424242,0xff4b4b4b,0xff4c4c4c,0xff4c4c4c,0xff474747,0xff404040,0xff3a3a3a,0xff323232,0xff282828,0xff1e1e1e,
+ 0xf8111111,0x6e000000,0x4b363636,0xff434343,0xff444444,0xff424242,0xff3f3f3f,0xff3a3a3a,0xff333333,0xff2b2b2b,0xff222222,0xff1b1b1b,0xfa0e0e0e,0x82000000,
+ 0x101b1b1b,0xf1343434,0xff3b3b3b,0xff3a3a3a,0xff363636,0xff313131,0xff2b2b2b,0xff232323,0xff1c1c1c,0xff1a1a1a,0xf3050505,0x75000000,0x2000000,0x861d1d1d,
+ 0xff2d2d2d,0xff2f2f2f,0xff2c2c2c,0xff282828,0xff212121,0xff1c1c1c,0xff1b1b1b,0xfe0f0f0f,0xd8000000,0x4a000000,0x0,0x15000000,0xb4101010,0xfe1e1e1e,
+ 0xff1f1f1f,0xff1d1d1d,0xff1b1b1b,0xff1a1a1a,0xfe0e0e0e,0xed000000,0x8f000000,0x18000000,0x0,0x2000000,0x28000000,0x97020202,0xe90a0a0a,0xf90d0d0d,
+ 0xfb0a0a0a,0xf6030303,0xdf000000,0x95000000,0x2c000000,0x3000000,0x0,0x0,0x2000000,0x1b000000,0x55000000,0x89000000,0x9c000000,0x8b000000,
+ 0x58000000,0x1d000000,0x3000000,0x0
+};
+
+static const QRgb Go_white_data[] = {
+ 0x0,0x0,0x0,0x0,0x10d0d0d,0x730302c,0xb282825,0x7000000,0x2000000,0x0,0x0,0x0,0x0,0x0,
+ 0x1000000,0x50bdbdac,0xc7cecebb,0xf5d3d3c0,0xf8c3c3b1,0xde99998b,0x875b5b52,0x17030303,0x2000000,0x0,0x0,0x0,0x86cdcdba,0xfef7f7e2,
+ 0xfffdfde8,0xfff8f8e1,0xffe7e7d2,0xffcdcdba,0xffa6a697,0xd355554d,0x2a020202,0x2000000,0x0,0x4dc5c5b2,0xfef7f7e2,0xfffffff0,0xfffffff1,0xfffdfde9,
+ 0xffeeeed8,0xffd7d7c3,0xffb7b7a6,0xff87877a,0xbf2b2b27,0x1a000000,0x1000000,0xc4d1d1be,0xfffdfde8,0xfffffff1,0xfffffffd,0xfffffff7,0xffececd6,0xffd5d5c1,
+ 0xffb7b7a6,0xff8e8e81,0xfa474740,0x51000000,0x53e3e38,0xf4d4d4c0,0xfff8f8e1,0xfffdfde9,0xfffffff7,0xfffafaec,0xffe2e2cd,0xffcbcbb8,0xffafaf9e,0xff88887b,
+ 0xff4c4c45,0x8b070706,0x8383833,0xf7c3c3b2,0xffe7e7d2,0xffeeeed8,0xffececd6,0xffe2e2cd,0xffd1d1be,0xffbcbcaa,0xff9f9f90,0xff79796d,0xff40403a,0x9d070706,
+ 0x3000000,0xd89d9d8f,0xffcdcdba,0xffd7d7c3,0xffd5d5c1,0xffcbcbb8,0xffbcbcaa,0xffa6a697,0xff89897c,0xff616158,0xfe2c2c28,0x87010101,0x1000000,0x7a65655b,
+ 0xffa6a697,0xffb7b7a6,0xffb7b7a6,0xffafaf9e,0xff9f9f90,0xff89897c,0xff6a6a60,0xff3f3f39,0xf2161613,0x5b000000,0x0,0xe060605,0xca585851,0xff87877a,
+ 0xff8e8e81,0xff88887b,0xff79796d,0xff616158,0xff3f3f39,0xfc1e1e1b,0xa7010101,0x23000000,0x0,0x1000000,0x1f030303,0xb62d2d29,0xfa474740,0xff4c4c45,
+ 0xff40403a,0xfe2c2c28,0xf2161613,0xa7010101,0x39000000,0x5000000,0x0,0x0,0x1000000,0x14000000,0x44010100,0x7e080807,0x8e080807,0x7a010101,
+ 0x55000000,0x22000000,0x5000000,0x0
+};
+
+static const QRgb Go_data[] = {
+ 0x5000000,0x8000000,0xd000000,0x14000000,0x19000000,0x1d000000,0x20000000,0x22000000,0x22000000,0x22000000,0x22000000,0x22000000,0x22000000,0x22000000,
+ 0x22000000,0x22000000,0x22000000,0x22000000,0x22000000,0x22000000,0x22000000,0x22000000,0x22000000,0x22000000,0x22000000,0x22000000,0x20000000,0x1e000000,
+ 0x19000000,0x14000000,0xe000000,0x9000000,0x8000000,0x11010112,0x2a04033b,0x3803022d,0x40020221,0x4702021d,0x4b02021b,0x4d02021a,0x4d02021a,0x4d02021a,
+ 0x4d02021a,0x4d02021b,0x4d02021b,0x4c02021b,0x4c02021b,0x4c02021c,0x4c02021c,0x4c02021c,0x4c02021c,0x4c02021c,0x4c02021c,0x4c02021c,0x4c02021c,0x4c02021c,
+ 0x4c02021c,0x4c02021c,0x4a02021b,0x46010115,0x3e010108,0x27000001,0x19000000,0x10000000,0xd000000,0x2a04023a,0xbf09076c,0xde121764,0xe00f1752,0xe10e164e,
+ 0xe20e164e,0xe20d154d,0xe20d154d,0xe20e164d,0xe20e164e,0xe20e164f,0xe20e174f,0xe20e174f,0xe20e174f,0xe20e1750,0xe20e1750,0xe20e1750,0xe20e1750,0xe20e1750,
+ 0xe20e1750,0xe20e1750,0xe20e1750,0xe20e1750,0xe20e1750,0xe20e1750,0xe20e174d,0xe1071135,0xd0020513,0x53000105,0x2a000000,0x1a000000,0x14000000,0x3803022d,
+ 0xde121764,0xffb5a364,0xffd6d66a,0xffd5d867,0xffd5d96d,0xffd5d562,0xffd5d769,0xffd5d764,0xffd5d76a,0xffd5d663,0xffd5d866,0xffd6da6f,0xffd6d86a,0xffd6d968,
+ 0xffd6da6d,0xffd6d763,0xffd6d86a,0xffd6d865,0xffd6d96a,0xffd6d764,0xffd6d966,0xffd6da70,0xffd6d86a,0xffd6d968,0xffd5da6c,0xffcfd25b,0xf2ac9e48,0x70000002,
+ 0x3e000000,0x28000000,0x19000000,0x41020221,0xe00f1752,0xff9f7f42,0xfff7ba50,0xfffdc155,0xfffdc35a,0xfffcbf53,0xfffcc056,0xffdaa342,0xffc8973e,0xfffcbf52,
+ 0xfffdbf50,0xfffdc359,0xfffcbf53,0xfffdc155,0xfffdc35a,0xfffcbf53,0xfffcc056,0xffdaa342,0xffc8973e,0xfffcbf52,0xfffdbf50,0xfffdc359,0xfffcbf53,0xfffdc155,
+ 0xfffdc35a,0xfffcc053,0xf5c49142,0x84000000,0x4f000000,0x32000000,0x1e000001,0x4802011e,0xe10d154d,0xff987a40,0xfff2af4a,0xfffcb853,0xfffcb751,0xfffab64f,
+ 0xfffab54f,0xffc9903b,0xffb07d33,0xfffab54d,0xfffcb64f,0xfffcba56,0xfffab54c,0xfffcb853,0xfffcb751,0xfffab64f,0xfffab54f,0xffc9903b,0xffb07d33,0xfffab54d,
+ 0xfffcb64f,0xfffcba56,0xfffab54c,0xfffcb853,0xfffcb751,0xfffab64f,0xf6be893d,0x93000000,0x5c000000,0x3b000000,0x20000001,0x4d02011c,0xe20c144b,0xff98793f,
+ 0xfff2b04c,0xfffcb853,0xfffcb64f,0xfff8b24c,0xfff2b04d,0xffbe8737,0xffa4742e,0xffeead4c,0xfff7b24d,0xfffbb753,0xfffab54e,0xfffcb853,0xfffcb64f,0xfffab44d,
+ 0xfffab650,0xffca903b,0xffb07d32,0xfffab650,0xfffcb64f,0xfffcb854,0xfffab54e,0xfffcb853,0xfffcb64f,0xfffab54d,0xf7bd8a3d,0x9d000000,0x65000000,0x40000000,
+ 0x22000001,0x5102011d,0xe30c134a,0xff987940,0xfff2b04e,0xfffcb64e,0xfff9b451,0xffe8a745,0xffd8ba84,0xffd7d1b6,0xffc3c0a9,0xffac9972,0xffd09945,0xfff2b04f,
+ 0xfff9b54f,0xfffcb64e,0xfffcb752,0xfffab349,0xfffab54f,0xffc98f39,0xffaf7d32,0xfffab54d,0xfffcb64e,0xfffcb853,0xfffab650,0xfffcb64e,0xfffcb752,0xfffab44a,
+ 0xf8bd893c,0xa3000000,0x6a000000,0x43000000,0x23000001,0x5202011c,0xe30c1249,0xff97783f,0xfff2b251,0xfffbb54c,0xffedad4e,0xffd9c293,0xfffefeed,0xfffefeea,
+ 0xffeaead4,0xffc1c1af,0xff827b66,0xffd29945,0xfff3b250,0xfffcb64d,0xfffcb853,0xfffab44c,0xfffab54e,0xffc9903b,0xffae7c31,0xfffab651,0xfffcb64f,0xfffcb752,
+ 0xfffab853,0xfffcb64d,0xfffcb853,0xfffab54d,0xf8bb883d,0xa5000002,0x6c000001,0x44000000,0x23000001,0x5202011c,0xe30b1249,0xff97773e,0xffcb9543,0xffc78f3d,
+ 0xffaf8442,0xfff0f0d9,0xfffffff2,0xfffffffb,0xffe9e9d4,0xffc2c2b0,0xff87877a,0xff715831,0xffba883c,0xffc9903d,0xffc99342,0xffc8913f,0xffc8913e,0xffa17533,
+ 0xff8b6429,0xffc8913e,0xffc9913d,0xffca9240,0xffc89241,0xffca913e,0xffc99342,0xffc8913f,0xf8ac7e39,0xa7000003,0x6e000002,0x46000001,0x23000001,0x5202011c,
+ 0xe30b1248,0xff97763c,0xffb7863c,0xffad7d36,0xff967846,0xffe4e4cf,0xfff4f4df,0xfff0f0dd,0xffd5d5c1,0xffb1b1a1,0xff79796e,0xff504128,0xff9d7232,0xffae7e36,
+ 0xffaf7f38,0xffb07f36,0xffaf7f37,0xff8d6428,0xff7a5927,0xffaf7f37,0xffb07e34,0xffb07e35,0xffaf7f38,0xffb07f37,0xffaf7f38,0xffb17f36,0xf9a57938,0xab000005,
+ 0x71000005,0x49000004,0x23000001,0x5202011c,0xe30b1248,0xff97773e,0xfff2b04d,0xfff8b24c,0xffc89446,0xffbab9a6,0xffd2d2be,0xffcbcbb8,0xffb5b5a4,0xff919183,
+ 0xff56564e,0xff75592d,0xffe2a448,0xfffab34d,0xfffab751,0xfffbb44c,0xfffab651,0xffc9903d,0xffae7d33,0xfffbb54c,0xfffcb54e,0xfffcb751,0xfffab650,0xfffcb54e,
+ 0xfffab751,0xfffbb54c,0xf9bc8a41,0xb1000008,0x77000007,0x4d000007,0x23000001,0x5202011c,0xe30b1248,0xff97783f,0xfff2b04d,0xfffab34c,0xffdea24a,0xff8e7952,
+ 0xff99998b,0xff9a9a8b,0xff858578,0xff5c5c54,0xff3c3629,0xffb7863d,0xffebab4a,0xfffbb44c,0xfffcb854,0xfffab34a,0xfffbb650,0xffc9903b,0xffaf7e35,0xfffab44b,
+ 0xfffcb64e,0xfffcb854,0xfffab64f,0xfffcb54d,0xfffcb854,0xfffab44a,0xfabb883f,0xb700000b,0x7e00000a,0x51000008,0x23000001,0x5202011c,0xe30b1248,0xff97783f,
+ 0xfff2b14e,0xfffbb54d,0xfff0af4f,0xffcb923c,0xff7b6139,0xff514a3b,0xff403c32,0xff4f3f26,0xffa47632,0xffdfa34b,0xfff5b24e,0xfffcb64e,0xfffcb853,0xfffab34a,
+ 0xfffab651,0xffc9903a,0xffaf7e36,0xfffab44b,0xfffcb54c,0xfffcb955,0xfffab650,0xfffcb64e,0xfffcb853,0xfffab44a,0xfabb883e,0xbd00000e,0x8400000c,0x5500000a,
+ 0x23000001,0x5202011c,0xe30b1248,0xff97773e,0xfff2b04c,0xfffcb751,0xfffab754,0xffecab4a,0xffd79d46,0xff9b6e2b,0xff835c24,0xffc9923f,0xffe3a344,0xfff5b351,
+ 0xfff9b44d,0xfffcb751,0xfffcb955,0xfff9b54f,0xfffab652,0xffc98f38,0xffaf7c31,0xfffab54e,0xfffcb54c,0xfffcb954,0xfffab54e,0xfffcb751,0xfffcb955,0xfffab64f,
+ 0xfabb8840,0xc0000010,0x8700000e,0x5700000b,0x23000001,0x5202011c,0xe30c1249,0xff97783f,0xfff2af4a,0xfffcb853,0xfffcb751,0xfff9b54e,0xfff4b04d,0xffbe8837,
+ 0xffa4752f,0xffeeac49,0xfff7b24d,0xfffbb955,0xfffab54c,0xfffcb853,0xfffcb751,0xfff9b54e,0xfff4b04d,0xffbd8837,0xffa4742f,0xffecab48,0xfff6b14d,0xfffbb955,
+ 0xfffab54c,0xfffcb853,0xfffcb751,0xfffab64f,0xfabb873e,0xc0000010,0x8700000e,0x5700000b,0x23000002,0x5102011d,0xe30c134a,0xff97783e,0xfff2b04c,0xfffcb853,
+ 0xfffcb64f,0xfff5b04b,0xffac7d41,0xff614631,0xff4e3829,0xff7a592f,0xffda9d44,0xfff4b251,0xfff9b44d,0xfffcb853,0xfffab44e,0xffecaa4a,0xffdbbd85,0xffd7d1b6,
+ 0xffc4c0a9,0xffaa9872,0xffcb9545,0xffefae4f,0xfff8b34d,0xfffcb853,0xfffcb64f,0xfffab54d,0xfabb883f,0xbd00000e,0x8400000d,0x5500000a,0x23000001,0x5002011c,
+ 0xe30c144b,0xff987940,0xfff2b04e,0xfffbb54d,0xfff7b350,0xff966c3b,0xff543e3a,0xff503c38,0xff402f2c,0xff312421,0xff3a2a1a,0xffd69c45,0xfff3b14d,0xfffbb54d,
+ 0xfff2af4e,0xffddc593,0xfffefeed,0xfffefeea,0xffeaead4,0xffc1c1af,0xff807966,0xffc89243,0xfff0ae4c,0xfffbb54d,0xfffcb752,0xfffab44a,0xfabb883d,0xb800000c,
+ 0x7e00000a,0x52000008,0x22000001,0x4f02011c,0xe20d154c,0xff987a40,0xfff2b251,0xfffab44c,0xffe1a44b,0xff4f3a35,0xff6c5854,0xff65534f,0xff3a2b28,0xff2d211f,
+ 0xff1b1312,0xff755528,0xffe4a84b,0xfff9b34c,0xffe0a853,0xfff1f0d9,0xfffffff2,0xfffffffb,0xffe9e9d4,0xffc2c2b0,0xff87877a,0xff7d6136,0xffe2a64b,0xfffab44c,
+ 0xfffcb853,0xfffab54d,0xf9ba883e,0xb2000008,0x78000008,0x4d000007,0x22000000,0x4e02021b,0xe20e164e,0xff997a3f,0xffcb9543,0xffc78f3d,0xff9a7137,0xff45332f,
+ 0xff45332f,0xff3d2d2a,0xff322422,0xff251b19,0xff150f0e,0xff3b2b15,0xffaa7c37,0xffc58d3c,0xffaf8a4f,0xffe4e4cf,0xfff4f4df,0xfff0f0dd,0xffd5d5c1,0xffb1b1a1,
+ 0xff79796e,0xff504229,0xffac7d38,0xffc68e3d,0xffc99342,0xffc8913f,0xf9ac7e39,0xac000006,0x72000005,0x49000004,0x22000000,0x4d02021b,0xe20e174f,0xff997a3e,
+ 0xffb7863c,0xffae7e36,0xff90692f,0xff362824,0xff362825,0xff302320,0xff261c1a,0xff191311,0xff100b0a,0xff3b2a13,0xff926a2e,0xffab7b35,0xff967035,0xffb9b9a6,
+ 0xffd2d2be,0xffcbcbb8,0xffb5b5a4,0xff919183,0xff56564e,0xff4d3b20,0xff976e30,0xffad7d36,0xffaf7f38,0xffb17f36,0xf8a57937,0xa8000003,0x6e000002,0x46000001,
+ 0x22000000,0x4d02021b,0xe20e174f,0xff997b40,0xfff2b04d,0xfffbb44d,0xffe3a649,0xff594022,0xff251b19,0xff201816,0xff171110,0xff100c0b,0xff16100b,0xff8d662d,
+ 0xffda9f45,0xfff8b24c,0xffe5a74a,0xff967f55,0xff99998b,0xff9a9a8b,0xff858578,0xff5c5c54,0xff393428,0xffa77a35,0xffe5a749,0xfffab34d,0xfffab751,0xfffbb54c,
+ 0xf8bc8b41,0xa5000002,0x6c000001,0x44000000,0x22000000,0x4c02021b,0xe20e1750,0xff997c42,0xfff2b04d,0xfffcb54d,0xfff2b050,0xffc68e3a,0xff503a1c,0xff17110c,
+ 0xff110d0a,0xff241a0e,0xff705123,0xffbf8b3f,0xffebab4a,0xfffbb44c,0xfff4b251,0xffd4983e,0xff82663b,0xff524b3c,0xff403c32,0xff4b3d25,0xff996f30,0xffd69c47,
+ 0xfff2b04c,0xfffcb54d,0xfffcb854,0xfffab44a,0xf8bc893e,0xa4000000,0x6a000000,0x43000000,0x22000000,0x4c02021c,0xe20e1750,0xff997c41,0xfff2b14e,0xfffcb64e,
+ 0xfffab652,0xffeaa745,0xffcb9442,0xff876127,0xff6a4c20,0xffa37531,0xffc68e3b,0xffe7a94e,0xfff6b34e,0xfffcb64e,0xfffbb752,0xfff1ac47,0xffdda147,0xff9f722d,
+ 0xff835e28,0xffc68e3b,0xffdfa043,0xfff3b252,0xfff9b54f,0xfffcb64e,0xfffcb853,0xfffab44a,0xf8bc893d,0xa3000000,0x6a000000,0x43000000,0x22000000,0x4c02021c,
+ 0xe20e1750,0xff997b40,0xfff2b04c,0xfffcb751,0xfffcb955,0xfff7b34e,0xfff0ae4e,0xffb88333,0xff9c6e2b,0xffe4a547,0xfff1ad48,0xfff9b653,0xfffab54e,0xfffcb751,
+ 0xfffcb955,0xfff8b44e,0xfff7b351,0xffc28a36,0xffa8772f,0xfff2af4b,0xfff9b24b,0xfffbb853,0xfffab54e,0xfffcb751,0xfffcb955,0xfffab64f,0xf8bd8a3f,0xa3000000,
+ 0x6a000000,0x43000000,0x22000000,0x4c02021c,0xe20e1750,0xff997c41,0xfff2af4a,0xfffcb853,0xfffcb751,0xfffab64f,0xfffab54f,0xffc9903b,0xffb07d33,0xfffab54d,
+ 0xfffcb64f,0xfffcba56,0xfffab54c,0xfffcb853,0xfffcb751,0xfffab64f,0xfffab54f,0xffc9903b,0xffb07d33,0xfffab54d,0xfffcb64f,0xfffcba56,0xfffab54c,0xfffcb853,
+ 0xfffcb751,0xfffab64f,0xf8bd893c,0xa3000000,0x69000000,0x43000000,0x20000000,0x4a02021b,0xe20e174d,0xff987b3f,0xfff2b04c,0xfffcb853,0xfffcb64f,0xfffab44d,
+ 0xfffab650,0xffca903b,0xffb07d32,0xfffab650,0xfffcb64f,0xfffcb854,0xfffab54e,0xfffcb853,0xfffcb64f,0xfffab44d,0xfffab650,0xffca903b,0xffb07d32,0xfffab650,
+ 0xfffcb64f,0xfffcb854,0xfffab54e,0xfffcb853,0xfffcb64f,0xfffab54d,0xf7bd893d,0x9e000000,0x65000000,0x41000000,0x1e000000,0x46010115,0xe1071135,0xff8f7438,
+ 0xffe2a448,0xffebaa49,0xffebab4c,0xffe9a744,0xffe9a94a,0xffbf8736,0xffa97830,0xffe9a848,0xffeba949,0xffebab4d,0xffe9a94b,0xffebaa49,0xffebab4c,0xffe9a744,
+ 0xffe9a94a,0xffbf8736,0xffa97830,0xffe9a848,0xffeba949,0xffebab4d,0xffe9a94b,0xffeaaa49,0xffebab4c,0xffeaa745,0xf7b6843a,0x94000000,0x5d000000,0x3b000000,
+ 0x19000000,0x3e010108,0xcf020513,0xf6624a23,0xf93e2d15,0xfa3c2b12,0xfb3d2c14,0xfb3c2b12,0xfb3c2b13,0xfb3d2b12,0xfb3c2b12,0xfb3c2b13,0xfb3c2b13,0xfb3c2c14,
+ 0xfb3c2c14,0xfb3c2b13,0xfc3d2c15,0xfc3c2b13,0xfd3c2b13,0xfd3c2b13,0xfd3c2b13,0xfd3c2b14,0xfc3c2b14,0xfc3c2c14,0xfc3c2c14,0xfb3c2b13,0xfb3c2c14,0xfa3e2c13,
+ 0xef5f451e,0x83000000,0x51000000,0x33000000,0x14000000,0x27000001,0x53000105,0x70000002,0x84000000,0x93000000,0x9d000000,0xa3000000,0xa3000000,0xa3000000,
+ 0xa3000000,0xa3000000,0xa4000002,0xa6000002,0xa9000003,0xaf000007,0xb801010c,0xc102010e,0xc9020112,0xce020113,0xce020113,0xca010112,0xc201010f,0xb900000c,
+ 0xb0000007,0xa9000004,0xa1000002,0x95000002,0x84000000,0x60000000,0x40000000,0x29000000,0xe000000,0x19000000,0x2a000000,0x3e000000,0x4f000000,0x5c000000,
+ 0x65000000,0x69000000,0x6a000000,0x6a000000,0x6a000000,0x6a000000,0x6b000000,0x6d000002,0x70000004,0x77000007,0x8100000c,0x8d000010,0x96000013,0x9b000014,
+ 0x9b000014,0x97000013,0x8e000011,0x8300000d,0x78000008,0x71000005,0x68000003,0x5e000001,0x50000000,0x40000000,0x2c000000,0x1c000000,0x8000000,0x10000000,
+ 0x1a000000,0x28000000,0x32000000,0x3b000000,0x40000000,0x43000000,0x43000000,0x43000000,0x43000000,0x43000000,0x44000000,0x45000001,0x49000004,0x4e000007,
+ 0x5600000c,0x5f00000f,0x66000011,0x6b000012,0x6b000012,0x67000011,0x6000000f,0x5700000d,0x4f000008,0x49000004,0x43000001,0x3c000000,0x33000000,0x29000000,
+ 0x1c000000,0x12000000
+};
+
+static const QRgb HelpBrowser_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3000000,0x6000000,0xb000000,0x12000000,0x19000000,0x21000000,0x29000000,0x2f000000,
+ 0x34000000,0x37000000,0x39040404,0x38050505,0x35050505,0x30050505,0x2a060606,0x22080808,0x1a0a0a0a,0x130d0d0d,0xc151515,0x7242424,0x3000000,0x1000000,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,
+ 0x5d686839,0x938a8a4a,0xbe9a9a50,0xdea5a552,0xf3aaaa52,0xfeabab4f,0xf3a5a545,0xe09a9a3d,0xc58a8a33,0xa0737327,0x724f4f1a,0x410c0c0c,0x350e0e0e,0x280d0d0d,
+ 0x1d121212,0x120e0e0e,0xb171717,0x5000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,
+ 0x16000000,0x23000000,0x6f7d7d47,0xba9f9f5a,0xf7aca55c,0xffa69750,0xff9c8744,0xff937a3a,0xff8c6e31,0xff86672b,0xff856729,0xff866b27,0xff887327,0xff8c7d26,
+ 0xf9908928,0xc77d7d20,0x8a575716,0x49111111,0x36131313,0x26141414,0x18151515,0xe121212,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,
+ 0x2000000,0x7000000,0xe000000,0x1a000000,0x475c5c36,0xa79b9b5b,0xf8ada35f,0xffa28e4e,0xff977b41,0xff95783c,0xff93783b,0xff917638,0xff8d7333,0xff896e2f,
+ 0xff856a2a,0xff816424,0xff7d5e20,0xff78591b,0xff755617,0xff7e6918,0xfa837a17,0xbe6f6f14,0x6f39390f,0x42131313,0x2d111111,0x1c121212,0xf111111,0x7000000,
+ 0x2000000,0x1000000,0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x5f777746,0xcba5a15f,0xffa79655,0xff9a7e44,0xff997d44,0xff9a8044,0xff987f43,
+ 0xff988041,0xff947e3c,0xff907a38,0xff8b7433,0xff866e2d,0xff816727,0xff7b6122,0xff765c1e,0xff725619,0xff6f5015,0xff6c4d12,0xff786610,0xdc726e0d,0x8945450f,
+ 0x4a151515,0x31151515,0x1d121212,0xf111111,0x7242424,0x2000000,0x1000000,0x5000000,0xd000000,0x1a000000,0x5f777746,0xd8a69f5e,0xffa28c4f,0xff997d44,
+ 0xff9b8347,0xff9e8649,0xff9e894b,0xff9e8948,0xff9a8845,0xff958240,0xff8e7c3a,0xff887533,0xff806c2c,0xff7b6627,0xff755f22,0xff705a1d,0xff6e561a,0xff6b5117,
+ 0xff684c14,0xff654510,0xff6c550f,0xe66d670e,0x8e414110,0x4d171717,0x31151515,0x1d1a1a1a,0xe121212,0x62b2b2b,0x3000000,0xa000000,0x16000000,0x475c5c36,
+ 0xcba5a15f,0xffa28b4f,0xff997d45,0xff9e8549,0xffa18a4c,0xffa18d50,0xffa1914e,0xff9e8f4d,0xff998a48,0xff928341,0xff8f8245,0xffa09669,0xffb4ad8c,0xffb1a888,
+ 0xffaea586,0xff908258,0xff6f5c26,0xff654f17,0xff644c14,0xff634914,0xff5f4313,0xff675011,0xe0686410,0x80323212,0x4a151515,0x2d171717,0x18151515,0xb171717,
+ 0x6000000,0x11000000,0x23000000,0xa79b9b5b,0xffa69454,0xff997b43,0xff9d8248,0xffa18b4d,0xffa28f51,0xffa39553,0xffa29652,0xff9d924d,0xff9a9053,0xffcfcbb2,
+ 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff4f3ef,0xffa69c80,0xff5c4716,0xff5e4718,0xff5e4418,0xff5c3f16,0xff685612,0xcb5c5c12,
+ 0x66171717,0x43171717,0x26141414,0x120e0e0e,0xb000000,0x1b000000,0x6f7d7d47,0xf8aca25e,0xff987941,0xff9a7f44,0xff9e884a,0xffa18e50,0xffa49554,0xffa49955,
+ 0xffa19752,0xff9e9758,0xffe8e7db,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffa19881,0xff584319,
+ 0xff5b441b,0xff5a411a,0xff583d16,0xfb696113,0xa7424214,0x5a171717,0x37171717,0x1d121212,0x12000000,0x26000000,0xba9f9f5a,0xff9f8b4b,0xff967840,0xff9b8146,
+ 0xffa08a4d,0xffa49251,0xffa59a55,0xffa49a54,0xff9d9651,0xffe9e9dc,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+ 0xffffffff,0xffffffff,0xfff3f2ef,0xff4f3e19,0xff56431d,0xff59421e,0xff573d1b,0xff5f4d17,0xda5b5b14,0x72191919,0x49151515,0x29131313,0x19000000,0x5d686839,
+ 0xf7aba45b,0xff93743c,0xff95793f,0xff9b8246,0xffa08c4b,0xffa59552,0xffa59a54,0xffa29a53,0xffc8c59f,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffc4c3b2,
+ 0xff777451,0xff807c5e,0xfff2f1ef,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff473a18,0xff52411e,0xff564120,0xff583e1f,0xff553a1b,0xfb655f15,0xa0343415,
+ 0x5b161616,0x36131313,0x21000000,0x938a8a4a,0xffa4944e,0xff907037,0xff957a3d,0xff9b8243,0xffa08c4a,0xffa3934e,0xffa49851,0xff9d9850,0xfff1f1e8,0xffffffff,
+ 0xffffffff,0xffffffff,0xffeae9e2,0xff4e4a15,0xff46420f,0xff40390a,0xffd9d7cf,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff433617,0xff503f1f,0xff564223,
+ 0xff574124,0xff523a1f,0xff5e5218,0xc6474716,0x6d171717,0x43131313,0x29000000,0xbe9a9a50,0xff998240,0xff8e6f35,0xff93783c,0xff988141,0xff9d8946,0xff9f9149,
+ 0xffa0954c,0xff9b9449,0xffa7a367,0xffa6a36f,0xffb4b38f,0xffacac88,0xff929066,0xff514d12,0xff49440b,0xff989478,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+ 0xffafab9f,0xff423618,0xff4e3e20,0xff564425,0xff574226,0xff543c23,0xff59481c,0xe1535317,0x7b191919,0x4e141414,0x2f000000,0xdea5a552,0xff8e7336,0xff8c6b32,
+ 0xff907537,0xff957e3d,0xff9b8642,0xff9c8e45,0xff9d9045,0xff999042,0xff928b3d,0xff858235,0xff79752a,0xff6b6820,0xff5f5b16,0xff5e591c,0xffc3c1ac,0xffffffff,
+ 0xffffffff,0xffffffff,0xffffffff,0xfff1f1ef,0xff443a20,0xff443619,0xff4f4023,0xff564529,0xff59442b,0xff543d26,0xff523e1f,0xf05a5a17,0x881a1a1a,0x58141414,
+ 0x34000000,0xf3aaaa52,0xff86662c,0xff88692d,0xff8d7133,0xff927a39,0xff96813c,0xff98863e,0xff9a8b3e,0xff968b3b,0xff8f8735,0xff86802c,0xff7a7523,0xff6e6819,
+ 0xff7e793c,0xffe9e8df,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffd7d5cf,0xff4d452a,0xff3c3113,0xff473a1d,0xff524226,0xff59472d,0xff59442d,0xff543e2a,
+ 0xff4d3821,0xfa5f5f18,0x901b1b1b,0x5f181818,0x37000000,0xfeabab4f,0xff805d25,0xff856329,0xff8a6d2f,0xff8d7432,0xff917a35,0xff938037,0xff928234,0xff928532,
+ 0xff8c822c,0xff857b23,0xff79711a,0xff7e772f,0xfff4f4ef,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff9f9b8b,0xff3f3517,0xff392e0e,0xff423616,0xff4c3e20,
+ 0xff544429,0xff594830,0xff584630,0xff543f2c,0xff4b3323,0xfe60601a,0x951b1b1b,0x64171717,0x39040404,0xf3a5a545,0xff815e24,0xff815f25,0xff85672a,0xff886e2d,
+ 0xff8c742f,0xff8e792f,0xff8e7d2d,0xff8c7d2a,0xff877a23,0xff7f741b,0xff746a12,0xffd6d3bc,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff837d66,0xff312805,
+ 0xff372c0a,0xff3e3211,0xff47391a,0xff504125,0xff57462d,0xff5b4933,0xff584632,0xff523e2d,0xff4b3623,0xfb5a5a1a,0x971b1b1b,0x65171717,0x38050505,0xe09a9a3d,
+ 0xff816224,0xff7d5b21,0xff816225,0xff846929,0xff866d28,0xff877229,0xff887326,0xff867522,0xff81711a,0xff786a13,0xff766a19,0xffffffff,0xffffffff,0xffffffff,
+ 0xffffffff,0xff908b76,0xff312803,0xff352a07,0xff3b2f0d,0xff423515,0xff4d3d1f,0xff55452b,0xff594a32,0xff5b4935,0xff594735,0xff503d2d,0xff4c3b24,0xf351511a,
+ 0x951a1a1a,0x63151515,0x35050505,0xc58a8a33,0xff846c24,0xff78551c,0xff7c5b20,0xff7e6222,0xff816725,0xff826a24,0xff826c21,0xff7f6b1b,0xff7a6715,0xff72610c,
+ 0xff786a25,0xffa39c77,0xff9b9577,0xff959076,0xff918c76,0xff4c4323,0xff332906,0xff392d0b,0xff403412,0xff493b1c,0xff514226,0xff584830,0xff5c4b36,0xff5c4b39,
+ 0xff574535,0xff4e3b2d,0xff4c3f22,0xe747471a,0x901b1b1b,0x5e161616,0x30050505,0xa0737327,0xff897925,0xff734f17,0xff77561c,0xff7a5c1e,0xff7c6120,0xff7d6420,
+ 0xff7c651d,0xff796318,0xff736011,0xff69570c,0xff7b6e37,0xff7c7349,0xff736b48,0xff6c6447,0xff696148,0xff332907,0xff372c0a,0xff3d3110,0xff453719,0xff4e4023,
+ 0xff56472e,0xff5a4b35,0xff5c4d3a,0xff5a493a,0xff544234,0xff4b372b,0xff4f4620,0xd53b3b1a,0x87191919,0x58141414,0x2a060606,0x724f4f1a,0xf98f8727,0xff714d16,
+ 0xff725018,0xff75561b,0xff765b1c,0xff79601d,0xff78601b,0xff745e17,0xff6d5815,0xff635011,0xffd1cdbe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff352a0c,
+ 0xff3b2f11,0xff433518,0xff4b3d22,0xff53442b,0xff594a34,0xff5c4d3a,0xff5c4d3c,0xff574739,0xff503f32,0xff483528,0xfd4f4c1e,0xbb2c2c1a,0x7b191919,0x4e141414,
+ 0x22080808,0x410c0c0c,0xc77d7d20,0xff7b6317,0xff6d4915,0xff6f4f18,0xff72551b,0xff74591b,0xff745b1c,0xff70591b,0xff695519,0xff604c17,0xffffffff,0xffffffff,
+ 0xffffffff,0xffffffff,0xffc8c5be,0xff372c12,0xff413319,0xff483a21,0xff50422a,0xff574833,0xff5c4d3a,0xff5d4d3d,0xff5a4a3c,0xff544437,0xff4b392e,0xff4a3f24,
+ 0xe943431c,0x9a1a1a1a,0x6c151515,0x420f0f0f,0x1a0a0a0a,0x350e0e0e,0x8a575716,0xfa837717,0xff694612,0xff694814,0xff6d4e17,0xff6f531c,0xff71551f,0xff6d541f,
+ 0xff67521f,0xff706038,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffafaaa1,0xff3c3019,0xff443821,0xff4d3f29,0xff554632,0xff5a4c39,0xff5d4d3d,0xff5c4c3e,
+ 0xff564539,0xff4f3e33,0xff483629,0xfd4c471f,0xc830301b,0x87191919,0x5b141414,0x350e0e0e,0x130d0d0d,0x280d0d0d,0x480e0e0e,0xbe6f6f14,0xff77610f,0xff634011,
+ 0xff674616,0xff694b1c,0xff6c4f20,0xff685022,0xff634e23,0xff92856b,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff958f84,0xff413621,0xff4a3d29,0xff524330,
+ 0xff564937,0xff5b4c3c,0xff5b4b3d,0xff57473b,0xff513f34,0xff48362c,0xff4b4023,0xe23f3f1c,0x9b1c1c1c,0x72161616,0x49111111,0x280d0d0d,0xc151515,0x1d121212,
+ 0x36131313,0x703a3a11,0xdc726d0d,0xff6b520f,0xff603d14,0xff63431a,0xff65481f,0xff644a22,0xff614824,0xff5b4524,0xff524022,0xff493920,0xff433520,0xff413420,
+ 0xff423623,0xff473a28,0xff4f402f,0xff544535,0xff58483a,0xff59493b,0xff554539,0xff514035,0xff4a382e,0xff493b25,0xf146441e,0xb427271c,0x81181818,0x5a141414,
+ 0x350e0e0e,0x1c090909,0x7242424,0x120e0e0e,0x26141414,0x42131313,0x8947470f,0xe66d660d,0xff664d11,0xff5c3a17,0xff5e401c,0xff5f4320,0xff5d4324,0xff594326,
+ 0xff544026,0xff4f3d26,0xff4b3b27,0xff493a28,0xff4a3b2a,0xff4e3e2e,0xff524333,0xff554537,0xff554437,0xff534236,0xff4f3e33,0xff48362c,0xff493b25,0xf446421e,
+ 0xc22e2e1c,0x8c1a1a1a,0x65141414,0x42131313,0x250e0e0e,0x120e0e0e,0x3000000,0xb171717,0x18151515,0x2d111111,0x4a151515,0x8e434310,0xe0686510,0xff685412,
+ 0xff593a17,0xff57391c,0xff583c20,0xff563e24,0xff543d26,0xff523d28,0xff503c29,0xff4d3c2b,0xff4f3d2d,0xff503f30,0xff514032,0xff504032,0xff4f3d31,0xff4b392e,
+ 0xff473629,0xff4b3f23,0xf146441e,0xc22e2e1c,0x8f1b1b1b,0x6b151515,0x4a111111,0x2d111111,0x170b0b0b,0xa000000,0x1000000,0x5000000,0xe121212,0x1c121212,
+ 0x31151515,0x4d171717,0x80333314,0xcb5c5c12,0xfb696013,0xff5f4a17,0xff52361b,0xff51351f,0xff503723,0xff4e3825,0xff4e3827,0xff4e3929,0xff4c392a,0xff4d382b,
+ 0xff4c372c,0xff4a362a,0xff483528,0xff4a3e24,0xfd4c471f,0xe23f3f1c,0xb427271c,0x8c1a1a1a,0x6b151515,0x4c111111,0x30101010,0x1b090909,0xd000000,0x5000000,
+ 0xffffff,0x2000000,0x6000000,0xf111111,0x1d121212,0x31151515,0x4a151515,0x66171717,0xa7424214,0xda5b5b14,0xfb655e15,0xff5c4f18,0xff56441c,0xff4f3b1f,
+ 0xff4b3420,0xff483122,0xff483322,0xff4b3823,0xff4b3f22,0xff504621,0xfd4f4c1e,0xe943431c,0xc830301b,0x9b1c1c1c,0x81181818,0x65141414,0x4a111111,0x30101010,
+ 0x1c090909,0xe000000,0x6000000,0x2000000,0xffffff,0x1000000,0x2000000,0x7000000,0x10202020,0x1d1a1a1a,0x2d171717,0x43171717,0x5a171717,0x72191919,
+ 0xa0343415,0xc6474716,0xe1535317,0xf05a5a17,0xfa5f5f18,0xfe60601a,0xfb5a5a1a,0xf351511a,0xe747471a,0xd53b3b1a,0xbb2c2c1a,0x9a1a1a1a,0x87191919,0x72161616,
+ 0x5a141414,0x42131313,0x2d111111,0x1b090909,0xe000000,0x7000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,0x2000000,0x7242424,0xe121212,
+ 0x18151515,0x26141414,0x37171717,0x49151515,0x5b161616,0x6d171717,0x7b191919,0x881a1a1a,0x901b1b1b,0x951b1b1b,0x971b1b1b,0x951a1a1a,0x901b1b1b,0x87191919,
+ 0x7b191919,0x6c151515,0x5b141414,0x49111111,0x350e0e0e,0x250e0e0e,0x170b0b0b,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0x1000000,0x2000000,0x62b2b2b,0xb171717,0x120e0e0e,0x1d121212,0x29131313,0x36131313,0x43131313,0x4e141414,0x58141414,0x5f181818,0x64171717,
+ 0x65171717,0x63151515,0x5e161616,0x58141414,0x4e141414,0x420f0f0f,0x350e0e0e,0x280d0d0d,0x1c090909,0x120e0e0e,0xa000000,0x5000000,0x2000000,0x1000000,
+ 0xffffff,0xffffff
+};
+
+static const QRgb HelpButton_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0x3edcdcdc,0x93dbdbdb,0xd5dedede,0xfadcdcdc,0xd8d1d1d1,0x9ec8c8c8,0x509d9d9d,0xc000000,0x3000000,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0x60dcdcdc,0xdbe3e3e3,0xffe2e2e2,0xffd3d3d3,0xffcecece,0xffcdcdcd,0xffd7d7d7,0xe6c5c5c5,0x838d8d8d,0x18000000,0x4000000,0xffffff,
+ 0xffffff,0x3edddcdc,0xdbdadada,0xffd8d8d8,0xffaaa9a9,0xff434343,0xff424142,0xff686768,0xffc4c4c4,0xffbdbdbd,0xec9e9d9e,0x75595959,0x18000000,0x3000000,
+ 0xffffff,0x94d5d6d5,0xffd1d0d0,0xffbdbdbd,0xff000000,0xff737373,0xffbdbdbd,0xff000000,0xff717171,0xffb6b7b6,0xffabaaaa,0xc8616161,0x3d000000,0xc000000,
+ 0xffffff,0xd5cbcbcb,0xffbbbbbb,0xffadadad,0xff6d6d6d,0xff868686,0xffb5b5b5,0xff000000,0xff6a6a6a,0xffb1b1b1,0xffb1b1b1,0xef616161,0x61000000,0x1a000000,
+ 0xffffff,0xfabfbfbf,0xffababab,0xffa4a4a4,0xffb2b2b2,0xffa6a6a6,0xff545454,0xff2a2a2a,0xff979797,0xffaeaeae,0xffa2a2a2,0xfd5d5d5d,0x7c000000,0x25000000,
+ 0xffffff,0xd9b0b0b0,0xffa0a0a0,0xffa6a6a6,0xff9f9f9f,0xff606060,0xff000000,0xffa0a0a0,0xffa6a6a6,0xffa3a3a3,0xff8c8c8c,0xf2484848,0x85000000,0x2b000000,
+ 0xffffff,0xa0949494,0xff9b9b9a,0xff9a9a9a,0xffa5a5a5,0xff9d9d9d,0xffa1a1a0,0xffa4a4a4,0xff9b9b9b,0xff9a9b9a,0xff6a696a,0xdf363636,0x7c000000,0x25000000,
+ 0xffffff,0x516f6f6f,0xe7818181,0xff8d8d8d,0xff949494,0xff545454,0xff353535,0xff9e9e9e,0xff8f8f8f,0xff737273,0xf5414141,0xbb1a1a1a,0x61000000,0x1a000000,
+ 0xffffff,0xc000000,0x84505050,0xed626262,0xff6f6e6e,0xff656565,0xff353535,0xff767576,0xff636263,0xf5414140,0xcd1f1f1f,0x83000000,0x3d000000,0xc000000,
+ 0xffffff,0x3000000,0x18000000,0x762f2f2f,0xc93b3b3b,0xf0404040,0xfd464646,0xf3393939,0xdf2a2a2a,0xbb161616,0x83000000,0x4b000000,0x18000000,0x3000000,
+ 0xffffff,0xffffff,0x4000000,0x18000000,0x3d000000,0x61000000,0x7c000000,0x85000000,0x7c000000,0x61000000,0x3d000000,0x18000000,0x4000000,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0x3000000,0xc000000,0x1a000000,0x25000000,0x2b000000,0x25000000,0x1a000000,0xc000000,0x3000000,0xffffff,0xffffff
+};
+
+static const QRgb ImageViewer_data[] = {
+ 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
+ 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
+ 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xfff0dc5c,0xfff0dc5c,0xfff0dc5c,0xfff0dc5c,0xfff0dc5c,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0xfff0dc5c,0xfff0dc5c,0xfff0dc5c,0xfff0dc5c,0xfff0dc5c,0x18000000,0xf000000,0xc000000,0xfff0dc5c,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,
+ 0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,
+ 0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xff7c4000,0x29000000,0x18000000,0x12000000,0xfff0dc5c,
+ 0xffbc8000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,
+ 0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xff9c6000,0xff7c4000,
+ 0x3d000000,0x25000000,0x17000000,0xfff0dc5c,0xffbc8000,0xffac7000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,
+ 0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,
+ 0xffd09c14,0xffac7000,0xff9c6000,0xff7c4000,0x4e000000,0x2e000000,0x1b000000,0xfff0dc5c,0xffbc8000,0xffac7000,0xff9c6000,0xff7c4000,0xff7c4000,0xff7c4000,
+ 0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,
+ 0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,0xffd09c14,0xffac7000,0xff9c6000,0xff7c4000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xffbc8000,0xffac7000,
+ 0xff9c6000,0xff7c4000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+ 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,0xff9c6000,0x93000000,0x62000000,0x3b000000,
+ 0x1f000000,0x3d000000,0xffbc8000,0xffac7000,0xff9c6000,0xff7c4000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+ 0xffffffff,0xff020204,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,
+ 0xff9c6000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xffbc8000,0xffac7000,0xff9c6000,0xff7c4000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+ 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff020204,0xff020204,0xff060507,0xff1f1e1d,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+ 0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,0xff9c6000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xffbc8000,0xffac7000,0xff9c6000,0xff7c4000,
+ 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff020204,0xff030305,0xff020204,0xff030304,0xff020204,0xff020204,0xffffffff,
+ 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,0xff9c6000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3e000000,
+ 0xffbc8000,0xffac7000,0xff9c6000,0xff7c4000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff020204,0xffd6d6d5,0xff030204,
+ 0xff8a8a89,0xff121214,0xff020204,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,0xff9c6000,0x99000000,
+ 0x66000000,0x3d000000,0x21000000,0x42000000,0xffbc8000,0xffac7000,0xff9c6000,0xff7c4000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+ 0xffffffff,0xff020204,0xff795407,0xffd7b00b,0xff4d3c06,0xff1d1d1e,0xff020204,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffbc8000,
+ 0xffd09c14,0xffac7000,0xff9c6000,0x99000000,0x66000000,0x3d000000,0x2a000000,0x4f000000,0xffbc8000,0xffac7000,0xff9c6000,0xff7c4000,0xffffffff,0xffffffff,
+ 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff020204,0xffedb50b,0xfff2d523,0xffb68608,0xff302305,0xff020204,0xffffffff,0xffffffff,0xffffffff,
+ 0xffffffff,0xffffffff,0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,0xff9c6000,0x99000000,0x66000000,0x3d000000,0x40000000,0x6a000000,0xffbc8000,0xffac7000,
+ 0xff645730,0xff524428,0xff7b807b,0xff7c827b,0xff434c42,0xff707570,0xffffffff,0xffffffff,0xffffffff,0xff020204,0xffbdbbba,0xff9c7226,0xffc3c3c2,0xfff4f4f3,
+ 0xff030304,0xff6a696a,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,0xff9c6000,0x99000000,0x66000000,0x3d000000,
+ 0x64000000,0x91000000,0xffbc8000,0xff7c6b42,0xffa1a3a0,0xffd7d8d7,0xfffafafa,0xffd7d8d7,0xff9fa29f,0xff5f655f,0xff808780,0xffffffff,0xff8a8a8b,0xfff9f9f7,
+ 0xfffefefc,0xfffdfdfb,0xfffefefc,0xfffefefc,0xff020204,0xff020204,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,
+ 0xff9c6000,0x99000000,0x66000000,0x3d000000,0x92000000,0xb8000000,0xff7c6f40,0xffc7c9c7,0xffa28c67,0xff825e35,0xffdcdddb,0xffd3d5d3,0xffc6c8c6,0xffc6c7c6,
+ 0xff767a76,0xff3f483e,0xff020204,0xffd5d5d4,0xfffdfdfb,0xfffdfdfb,0xfff9f9f8,0xffcccccc,0xffd2d2d2,0xff151515,0xff020204,0xffffffff,0xffffffff,0xffffffff,
+ 0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,0xff9c6000,0x99000000,0x66000000,0x3d000000,0xbd000000,0xf1454545,0xffbdc0bd,0xffa18344,0xff987029,0xff855d2c,
+ 0xffe4e6e4,0xffe2e4e2,0xffdee0de,0xffcdcfcd,0xffc6c7c5,0xff5d615d,0xff596159,0xfffcfcfa,0xfffcfcfa,0xfffcfcfa,0xfffcfcfa,0xfffdfdfb,0xfffcfcfa,0xff1e1e1d,
+ 0xff080709,0xff343436,0xffffffff,0xffffffff,0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,0xff9c6000,0x99000000,0x66000000,0x3d000000,0xef000000,0xfe979797,
+ 0xffa3905c,0xffa47b29,0xff9f772f,0xff8a6332,0xffe8ebe8,0xffe7eae7,0xffe4e7e4,0xffdedfdd,0xffc5c7c5,0xff9d9f9d,0xff394239,0xfffcfcfa,0xffeaeae9,0xfffdfdfb,
+ 0xfffdfdfb,0xfffcfcfa,0xfffdfdfb,0xff1f1f21,0xff2f2f2f,0xff020204,0xffffffff,0xffffffff,0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,0xff9c6000,0x99000000,
+ 0x66000000,0x3d000000,0xfd000000,0xffd5d5d5,0xff9f7d2a,0xffa77f2c,0xffa17a32,0xff8b6432,0xffe8ece8,0xffe8ebe8,0xffe6e9e6,0xffe1e3e1,0xff535554,0xffd6d7d6,
+ 0xff303830,0xfffdfdfb,0xffe5e5e5,0xfffcfcfa,0xfffbfbf9,0xfffcfcfb,0xfffcfcfa,0xff454546,0xff070709,0xff020204,0xffffffff,0xffffffff,0xffffffff,0xffbc8000,
+ 0xffd09c14,0xffac7000,0xff9c6000,0x99000000,0x66000000,0x3d000000,0xfe000000,0xfffafafa,0xffa2791c,0xffa67d2b,0xffa17a32,0xff8b6432,0xffe8ebe8,0xffe7ebe7,
+ 0xffe6e9e6,0xffe1e4e1,0xffb89031,0xfffafafa,0xff2a302a,0xfffdfdfb,0xffe5e5e5,0xfffdfdfb,0xfffcfcfa,0xfffcfcfa,0xfff4e8c8,0xff654f0c,0xff020204,0xff211f19,
+ 0xffffffff,0xffffffff,0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,0xff9c6000,0x99000000,0x66000000,0x3d000000,0xfd000000,0xffd5d5d5,0xff9f7d2b,0xffa07626,
+ 0xff986d29,0xff875f2e,0xffe7ebe7,0xffe7eae6,0xffe5e8e5,0xffd5af32,0xffcba939,0xffd2d3d2,0xff252c25,0xff4d4d4d,0xfffdfdfb,0xfffcfcfb,0xfffdfdfb,0xfffcfcfa,
+ 0xffccb688,0xffc08708,0xff684907,0xffecb50b,0xffffffff,0xffffffff,0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,0xff9c6000,0x99000000,0x66000000,0x3d000000,
+ 0xe4000000,0xfe979797,0xffa3905d,0xffa67b2b,0xffa27733,0xff815629,0xffdfdfdf,0xffe3e5e2,0xffe2e5e2,0xffd4ae2e,0xffbeaa65,0xff919391,0xff20261f,0xff020204,
+ 0xfffdfdfb,0xfffcfcfa,0xfffcfcfb,0xfffdfdfb,0xff604309,0xfff3ba0c,0xfff2b90c,0xfff5bd0c,0xfff4bc0c,0xffffffff,0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,
+ 0xff9c6000,0x99000000,0x66000000,0x3d000000,0xbd000000,0xe7454545,0xffbdc0be,0xffa38346,0xff9a702b,0xff885d2f,0xffe7e7e7,0xffdbdbdb,0xffa57c29,0xffc2a445,
+ 0xffb6b7b6,0xff585958,0xff1f231e,0xff62561d,0xfff2f2f0,0xfffcfcfa,0xffc0c0be,0xff020204,0xff7d5306,0xfff5bd0c,0xfff5bd0c,0xfff5bc0c,0xffe2a60c,0xffffffff,
+ 0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,0xff9c6000,0x99000000,0x66000000,0x3d000000,0x92000000,0xb8000000,0xff9c7720,0xffc8c8c8,0xffa38c68,0xff835e36,
+ 0xffdddddd,0xffd4d4d4,0xffc5c5c5,0xffb5b5b5,0xff6b6b6b,0xffe4e4e4,0xffcacbca,0xff1e231e,0xff262c27,0xff2e2e30,0xff2e2e30,0xff2e2e31,0xff754a04,0xffe2a90a,
+ 0xffd29609,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,0xff9c6000,0x99000000,0x66000000,0x3d000000,0x64000000,0x91000000,
+ 0xffbc8000,0xff956d22,0xffa2a2a2,0xffd8d8d8,0xfffafafa,0xffd5d5d5,0xff979797,0xff4e4e4e,0xffe1e1e1,0xffffffff,0xffffffff,0xffc9c9c9,0xff1a1d19,0xff696d68,
+ 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffbc8000,0xffd09c14,0xffac7000,0xff9c6000,0x99000000,
+ 0x66000000,0x3d000000,0x40000000,0xfff0dc5c,0xffbc8000,0xffac7000,0xff815919,0xff926a15,0xff906813,0xff8f6712,0xff8d6510,0xff8a620d,0xff646464,0xfffafafa,
+ 0xffffffff,0xffffffff,0xffc8c8c8,0xff161716,0xff191f19,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,0xffbc8000,
+ 0xffd09c14,0xffac7000,0xff9c6000,0xff7c4000,0x66000000,0x3d000000,0x28000000,0xfff0dc5c,0xffbc8000,0xffac7000,0xffd09c14,0xffd09c14,0xffd09c14,0xffd09c14,
+ 0xffd09c14,0xffd09c14,0xff2b2b2b,0xff626262,0xfffafafa,0xffffffff,0xffffffff,0xffc8c8c8,0xff131313,0xff171b17,0xffd09c14,0xffd09c14,0xffd09c14,0xffd09c14,
+ 0xffd09c14,0xffd09c14,0xffd09c14,0xffd09c14,0xffd09c14,0xffac7000,0xff9c6000,0xff7c4000,0x62000000,0x3b000000,0x1d000000,0xfff0dc5c,0xffbc8000,0xffac7000,
+ 0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xff252525,0xff5e5e5e,0xfffafafa,0xffffffff,0xffffffff,0xffcacaca,0xff161616,
+ 0xff181818,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xffac7000,0xff9c6000,0xff7c4000,0x5a000000,0x36000000,
+ 0x17000000,0xfff0dc5c,0xffbc8000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff010a04,0xff545654,
+ 0xfffafafa,0xffffffff,0xffffffff,0xff676a68,0xff020e06,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,0xff9c6000,
+ 0xff9c6000,0xff7c4000,0x4e000000,0x2e000000,0x12000000,0xfff0dc5c,0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,0x93000000,0x99000000,0x9b000000,0xa1000000,
+ 0xad000000,0xc0000000,0xd5000000,0xe9000000,0xf8555555,0xfffafafa,0xfa858585,0xe6000000,0xcf000000,0xb7000000,0xa4000000,0x9c000000,0x99000000,0x99000000,
+ 0x99000000,0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,0xff7c4000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
+ 0x62000000,0x66000000,0x67000000,0x6a000000,0x74000000,0x89000000,0xab000000,0xce000000,0xe8000000,0xf4303030,0xeb000000,0xd3000000,0xaf000000,0x8c000000,
+ 0x75000000,0x6a000000,0x67000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
+ 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3e000000,0x3f000000,0x44000000,0x4b000000,0x54000000,0x5d000000,0x63000000,
+ 0x65000000,0x60000000,0x57000000,0x4e000000,0x45000000,0x40000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
+ 0x18000000,0xf000000
+};
+
+static const QRgb Ipkg_data[] = {
+ 0xffffff,0xffffff,0xffffff,0x1242424,0x1242424,0x2242424,0x3242424,0x4000000,0x7333333,0xf1b1b1b,0x1e1b1b1b,0x30202020,0x44222222,0x51222222,
+ 0x591f1f1f,0x5b222222,0x5a1f1f1f,0x541d1d1d,0x4a202020,0x3e202020,0x2f222222,0x22222222,0x1a1f1f1f,0x12171717,0xb232323,0x82e2e2e,0x4242424,0x3242424,
+ 0x2242424,0x1242424,0x1242424,0xffffff,0xffffff,0x1242424,0x2242424,0x3242424,0x5242424,0x7242424,0xb232323,0x101a1a1a,0x1a1f1f1f,0x2f222222,
+ 0x50222222,0x751f1f1f,0x94202020,0xa8202020,0xb21f1f1f,0xb31f1f1f,0xaf1f1f1f,0xaa202020,0x9d202020,0x8a1f1f1f,0x74222222,0x5d222222,0x481d1d1d,0x36242424,
+ 0x271f1f1f,0x1b1e1e1e,0x13282828,0xc242424,0x7242424,0x5242424,0x2242424,0x1242424,0x1242424,0x3242424,0x6242424,0xc242424,0x13242424,0x1b1e1e1e,
+ 0x24202020,0x30202020,0x47222222,0x6d232323,0x9a222222,0xc0202020,0xe45b7076,0xf380a5af,0xfb99cad7,0xfea1ddef,0xf988c4d7,0xf1659cac,0xe6426772,0xd21e1e1e,
+ 0xc4202020,0xaf222222,0x961f1f1f,0x7d222222,0x641f1f1f,0x4e232323,0x39222222,0x28252525,0x1a242424,0x10242424,0x8242424,0x3242424,0x3242424,0x7242424,
+ 0x15242424,0x27242424,0x3c242424,0x4f232323,0x61242424,0x75242424,0x90202020,0xb4202020,0xd9333b3d,0xf47797a1,0xffb0e3f1,0xffb1e4f3,0xffabe3f3,0xffa0dff1,
+ 0xff92daef,0xff7fd4ed,0xff6ecde8,0xff4d8696,0xfc524238,0xf24e3323,0xda2a2522,0xc7222222,0xb1222222,0x9b232323,0x81242424,0x66252525,0x4c242424,0x32242424,
+ 0x18242424,0x9242424,0x6242424,0x14242424,0x33242424,0x5f242424,0x83202020,0x9c252525,0xaf232323,0xc1242424,0xd4232323,0xe72b1f1f,0xf87b929c,0xffade3f3,
+ 0xffafe3f3,0xffade3f3,0xffa7e1f2,0xff9addf0,0xff89d7ee,0xff74d1eb,0xff60cbe8,0xff4ec5e6,0xff5e8b93,0xff583523,0xff2e2520,0xfc503424,0xf25e3925,0xdc453024,
+ 0xc3222222,0xb2242424,0x96242424,0x6d242424,0x3a242424,0x16242424,0xe242424,0x25242424,0x59242424,0x9c282323,0xcb3e1e1e,0xdf501616,0xec621212,0xf66f0a0a,
+ 0xfd7a0505,0xff86575e,0xffa2ddef,0xffa7e1f2,0xffa8e2f3,0xffa7e1f2,0xff9fdef1,0xff92daef,0xff7bd3ec,0xff65cce9,0xff4ec5e6,0xff3dbde0,0xff3bafce,0xff997961,
+ 0xffcc652d,0xffad5a2a,0xff7e4728,0xff452f25,0xfe422f25,0xf6633d29,0xe3603c28,0xa8302925,0x5e242424,0x24242424,0x21242424,0x3d242424,0x77242424,0xc53d1e1e,
+ 0xfd880303,0xff890000,0xff860000,0xff820000,0xff7d0000,0xff88919f,0xff97dcf0,0xff9addf0,0xff9bddf0,0xff9addf0,0xff92daef,0xff81d5ed,0xff6acee9,0xff4fc5e6,
+ 0xff3cbbdd,0xff37accb,0xff34a0bd,0xff6a8080,0xffca642b,0xffd86b2e,0xffe67331,0xfff07834,0xffdc7134,0xffa85b2f,0xff5a3929,0xd2583829,0x71242424,0x2f242424,
+ 0x53242424,0x6c242424,0x99242424,0xcc242424,0xed501717,0xff890000,0xff850000,0xff800000,0xff7a0000,0xff7fb9cd,0xff86d7ee,0xff87d7ee,0xff87d7ee,0xff85d6ee,
+ 0xff7ad3ec,0xff67cde9,0xff4bc4e6,0xff3bb6d7,0xff35a4c3,0xff3097b2,0xff2d8ca5,0xff427e8d,0xffc1612b,0xffd36a2f,0xffe17133,0xffed7837,0xfff57d3b,0xffad5e34,
+ 0xf9633e2b,0xc1242424,0x7b242424,0x3a242424,0x9a242424,0xab242424,0xc3242424,0xdd242424,0xea242424,0xf6660f0f,0xff840000,0xff7f0000,0xff790000,0xff70cce6,
+ 0xff70d0ea,0xff6dcfea,0xff6acee9,0xff63cbe8,0xff56c8e7,0xff3ec1e4,0xff37accb,0xff3199b5,0xff2d8aa4,0xff297e96,0xff25778c,0xff277387,0xff9d5129,0xffcd6931,
+ 0xffdd7237,0xffea7a39,0xffe5793c,0xff473327,0xe7382d27,0xcc242424,0x92242424,0x5e242424,0xd96b4e2d,0xf49a6a33,0xf1825c2f,0xf06b4e2d,0xf14f3e29,0xf5663e28,
+ 0xfd6f190d,0xfe662212,0xff582914,0xff59b3cb,0xff56c8e7,0xff4ec5e6,0xff45c3e5,0xff3dbddf,0xff38b0d0,0xff339ebc,0xff2d8ba4,0xff287a91,0xff236e82,0xff20677a,
+ 0xff1f6173,0xff205968,0xff30231d,0xff31251e,0xff724229,0xffb26034,0xff7d4a2f,0xf6613e2b,0xed242424,0xe1242424,0xbd242424,0x93242424,0xbd242424,0xe5674b2b,
+ 0xffb57a36,0xffb67b36,0xffb67b36,0xffb67b36,0xffb77333,0xff6e481f,0xff583c1a,0xff49909d,0xff3dbde0,0xff3bb5d6,0xff37accb,0xff34a0bd,0xff2e90ab,0xff297e96,
+ 0xff236d81,0xff1e5f70,0xff1b5766,0xff1a5161,0xff1a5160,0xff193f49,0xff1a1a1a,0xff1e1e1d,0xff362822,0xfe703f25,0xffa8672f,0xffcb913e,0xffd7a747,0xfed2a346,
+ 0xeda17e3c,0xbc5d4d2e,0x93242424,0xbc242424,0xe25c452a,0xfeb37a36,0xffb67b36,0xffb67b36,0xffb67b36,0xffba7a36,0xff9e612a,0xff4a645f,0xff37abca,0xff34a2bf,
+ 0xff3096b1,0xff2b89a2,0xff27798e,0xff22687a,0xff1d5868,0xff194b59,0xff164652,0xff16434f,0xff164651,0xff20272b,0xff5f301b,0xffa0622b,0xffcb903d,0xffd7a747,
+ 0xffd7a747,0xffce923e,0xf27e6635,0xd9353027,0xb5242424,0x91242424,0x57242424,0x8a242424,0xbc242424,0xde513f29,0xfdb07835,0xffb67b36,0xffb67b36,0xffb67b36,
+ 0xffb67b36,0xffbb7634,0xff657369,0xff2f92ad,0xff2a859d,0xff25768b,0xff206678,0xff1b5665,0xff174854,0xff143e4a,0xff283640,0xff623f31,0xff9e632e,0xffc8903e,
+ 0xffd7a747,0xffd7a747,0xffd6a446,0xffbc7a34,0xff863819,0xff4d0303,0xc9242424,0xa3242424,0x76242424,0x53242424,0x28242424,0x52242424,0x8c242424,0xbe242424,
+ 0xdf483828,0xffaf7734,0xffb67b36,0xffb67b36,0xffb67b36,0xffb67b36,0xffb97b36,0xffa57345,0xff2b7689,0xff20677a,0xff1f5767,0xff363943,0xff6c3b2b,0xffa4622e,
+ 0xffc9903d,0xffd7a747,0xffd7a747,0xffd7a747,0xffcc9940,0xff9a5e28,0xff501a0c,0xff410000,0xff4a0303,0xff510505,0x9b252525,0x6a242424,0x40242424,0x25242424,
+ 0x10242424,0x29242424,0x56242424,0x93242424,0xc5252525,0xff7d5125,0xff92632b,0xff98672d,0xff9f6c2f,0xffaf7536,0xffc17f3e,0xffbd7c38,0xffbe7936,0xff7b3b28,
+ 0xffaa612b,0xffca903d,0xffd7a747,0xffd7a747,0xffd7a747,0xffd7a747,0xffb18439,0xff6b4620,0xff390806,0xff420000,0xff4e0000,0xff5b0000,0xff630303,0xff670d0d,
+ 0x7b232323,0x4a242424,0x26242424,0x12242424,0x8242424,0x15242424,0x33242424,0x65242424,0x9d242424,0xffd17848,0xffac683b,0xffa6673b,0xff996137,0xff8f5d34,
+ 0xff8d5c33,0xffc47a4e,0xfff88f5c,0xffad602a,0xffd7a747,0xffd7a747,0xffd7a747,0xffcd9d42,0xff91682d,0xff4b2816,0xff311010,0xff3d0c0c,0xff4d0505,0xff5c0000,
+ 0xff6a0000,0xff780303,0xff7b0d0d,0xff7a1919,0x6d232323,0x3f242424,0x1f242424,0xd242424,0x5242424,0xf242424,0x23242424,0x49242424,0x7d242424,0xffdd7e4f,
+ 0xfff28d5b,0xfffd9865,0xffff9d6e,0xfffea173,0xfffda174,0xfffc9f73,0xfff99b6d,0xff580505,0xff8f5f29,0xffb88a3b,0xff774b20,0xff3e0a05,0xff3c0505,0xff400c0c,
+ 0xff421010,0xff510c0c,0xff670505,0xff790000,0xff880303,0xff8f0f0f,0xff8f1a1a,0xff872222,0x6a242424,0x3d242424,0x1e242424,0xd242424,0x4242424,0xd242424,
+ 0x1e242424,0x3f242424,0x6c242424,0xffd87d50,0xfff08d5d,0xfffc9968,0xffffa071,0xffffa478,0xfffea57a,0xfffca479,0xfff99e73,0xff4b0505,0xff470303,0xff460000,
+ 0xff480000,0xff4d0000,0xff530505,0xff560c0c,0xff531010,0xff680c0c,0xff820505,0xff940606,0xff9e1313,0xffa41d1d,0xff9c2424,0xff8d2a2a,0x68242424,0x3c242424,
+ 0x1d242424,0xc242424,0x4242424,0xc242424,0x1d242424,0x3b242424,0x66242424,0xffd37c50,0xffee8d5d,0xfffc9a6b,0xffffa274,0xffffa67a,0xfffda77d,0xfffba57d,
+ 0xfff8a278,0xff590606,0xff5a0303,0xff5e0303,0xff620000,0xff690000,0xff6e0505,0xff6c0c0c,0xff671010,0xff7d0c0c,0xff990c0c,0xffa71616,0xffae1f1f,0xffb02929,
+ 0xffa32f2f,0xff8d2f2f,0x68242424,0x3c242424,0x1d242424,0xc242424,0x4242424,0xb242424,0x1b242424,0x39242424,0x63242424,0xffd07a50,0xffed8d5e,0xfffc9a6b,
+ 0xffffa376,0xffffa77c,0xfffda97f,0xfffba77f,0xfff8a37a,0xff650a0a,0xff6d0505,0xff750303,0xff7c0000,0xff830000,0xff870505,0xff7f0c0c,0xff771212,0xff8c1212,
+ 0xffa61a1a,0xffb52424,0xffba2e2e,0xffb73131,0xffa63535,0xff8a3434,0x67242424,0x3b242424,0x1d242424,0xc242424,0x3242424,0xa242424,0x19242424,0x35242424,
+ 0x5d242424,0xffca794f,0xffe98c5d,0xfffb9a6b,0xfffea275,0xffffa77c,0xfffda980,0xfffaa880,0xfff7a47b,0xff6f0c0c,0xff7c0606,0xff890303,0xff900000,0xff990000,
+ 0xff9a0505,0xff8d1010,0xff801a1a,0xff961e1e,0xffaf2828,0xffbd3131,0xffbf3838,0xffbc3d3d,0xffa53c3c,0xff863636,0x65242424,0x3a242424,0x1c242424,0xc242424,
+ 0x3242424,0x9242424,0x16242424,0x2e242424,0x52242424,0xffc3744d,0xffe2885b,0xfff79768,0xfffda073,0xfffea77b,0xfffda97f,0xfff9a780,0xfff6a47c,0xff730f0f,
+ 0xff860808,0xff980303,0xffa10000,0xffa80000,0xffa60a0a,0xff971b1b,0xff872323,0xff9c2929,0xffb63535,0xffc13e3e,0xffc34343,0xffbc4545,0xffa44040,0xff7f3737,
+ 0x60242424,0x37242424,0x1b242424,0xb242424,0x2242424,0x7242424,0x11242424,0x25242424,0x43242424,0xc6ac6f51,0xffd38058,0xffed9165,0xfff99c70,0xfffda479,
+ 0xfffca67d,0xfff8a67e,0xfff5a37a,0xff731010,0xff8c0808,0xffa10303,0xffad0000,0xffb30808,0xffaf1b1b,0xff9b2828,0xff8a2d2d,0xffa03636,0xffb94141,0xffc24747,
+ 0xffc04b4b,0xffb64949,0xff9a4141,0xff773838,0x57242424,0x31242424,0x18242424,0xa242424,0x1242424,0x5242424,0xc242424,0x1a242424,0x32242424,0x5a474747,
+ 0xc5a97459,0xfedb8860,0xffef976b,0xfffaa074,0xfffca47a,0xfff7a47a,0xfff3a179,0xff721212,0xff900a0a,0xffa90303,0xffb60808,0xffb91a1a,0xffb42b2b,0xff9f3333,
+ 0xff8c3737,0xffa03f3f,0xffb44949,0xffb74e4e,0xffad4c4c,0xff9c4848,0xff823e3e,0xff6a3636,0x48242424,0x29242424,0x13242424,0x8242424,0x1242424,0x3242424,
+ 0x7242424,0x11242424,0x21242424,0x39242424,0x61484848,0xc1aa7a63,0xfddf8d66,0xfff0996e,0xfff89f75,0xfff5a077,0xfff19d75,0xff721313,0xff930a0a,0xffae0808,
+ 0xffb91a1a,0xffbd2b2b,0xffb63838,0xff9e3d3d,0xff873d3d,0xff954343,0xff9f4a4a,0xff984949,0xff884343,0xfb7a3f3f,0xd8753c3c,0x835f3333,0x36242424,0x1e242424,
+ 0xe242424,0x6242424,0xffffff,0x1242424,0x4242424,0xa242424,0x14242424,0x24242424,0x3b242424,0x62484848,0xb9a47b67,0xfedf8d66,0xffee986e,0xfff09a71,
+ 0xffed9970,0xff701313,0xff950d0d,0xffb01a1a,0xffb92b2b,0xffb63838,0xffaa4040,0xff8e4040,0xff743c3c,0xff794040,0xfe7a4040,0xee794141,0xba6b3b3b,0x6a332929,
+ 0x4d242424,0x37242424,0x23242424,0x13242424,0x9242424,0x4242424,0xffffff,0x1242424,0x2242424,0x5242424,0xa242424,0x15242424,0x24242424,0x3a242424,
+ 0x5f434343,0xb3a37a69,0xfcde8d65,0xffe69268,0xffe69268,0xff6d1616,0xff901a1a,0xffa62828,0xffa93636,0xff9f3e3e,0xff8c4040,0xff703c3c,0xfb5f3838,0xd96a3c3c,
+ 0x8d4e3131,0x5e242424,0x4d242424,0x3d242424,0x2d242424,0x1f242424,0x14242424,0xa242424,0x5242424,0x2242424,0xffffff,0xffffff,0x1242424,0x2242424,
+ 0x5242424,0xb242424,0x14242424,0x23242424,0x38242424,0x5a404040,0xa9997766,0xfad78661,0xffdd8a61,0xff631d1d,0xff7c2424,0xff8a2f2f,0xff843636,0xfe773939,
+ 0xe8723b3b,0xb45f3737,0x692a2525,0x55242424,0x46242424,0x38242424,0x2b242424,0x21242424,0x17242424,0xf242424,0x9242424,0x5242424,0x2242424,0x1242424,
+ 0xffffff,0xffffff,0xffffff,0x1242424,0x2242424,0x5242424,0xa242424,0x14242424,0x22242424,0x36242424,0x55393939,0x9a937463,0xf7d28259,0xff562222,
+ 0xff602828,0xf66e2f2f,0xca6d3434,0x7e422b2b,0x5b242424,0x4c242424,0x3d242424,0x31242424,0x26242424,0x1d242424,0x15242424,0xf242424,0xa242424,0x6242424,
+ 0x4242424,0x2242424,0x1242424,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1242424,0x2242424,0x4242424,0xa242424,0x12242424,0x20242424,
+ 0x31242424,0x48363636,0xa7925b50,0xdb692424,0x975d2929,0x5a242424,0x4f242424,0x42242424,0x35242424,0x2a242424,0x20242424,0x18242424,0x12242424,0xd242424,
+ 0x9242424,0x6242424,0x4242424,0x2242424,0x1242424,0x1242424,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1242424,
+ 0x2242424,0x4242424,0x9242424,0x10242424,0x1b242424,0x27242424,0x34363636,0x38242424,0x39242424,0x34242424,0x2c242424,0x23242424,0x1b242424,0x14242424,
+ 0xe242424,0xa242424,0x7242424,0x5242424,0x3242424,0x2242424,0x1242424,0x1242424,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0x1242424,0x2242424,0x4242424,0x7242424,0xd242424,0x14242424,0x19242424,0x1d242424,0x1d242424,0x1a242424,
+ 0x15242424,0x10242424,0xc242424,0x8242424,0x5242424,0x4242424,0x2242424,0x1242424,0x1242424,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff
+};
+
+static const QRgb Language_data[] = {
+ 0x1000000,0x4000000,0xb000000,0x17000000,0x27000000,0x39000000,0x49000000,0x58000000,0x805f3131,0x90773939,0x90763434,0x73461b1b,0x50000000,0x3d000000,
+ 0x28000000,0x16000000,0xb000000,0x7000000,0xb000000,0x18000000,0x26000000,0x31000000,0x34000000,0x2e000000,0x21000000,0x13000000,0x8000000,0x2000000,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0x4000000,0xd000000,0x1d000000,0x32000000,0x4b000000,0x8c7b4848,0xc8c17272,0xfffc8b8b,0xfffc7576,0xfffb6666,
+ 0xfffb5e5f,0xfffb5859,0xefe94849,0xa6981a1b,0x4c000000,0x2d000000,0x17000000,0x10000000,0x18000000,0x2b000000,0x82a66d6f,0xdfe98d8f,0xfffb777a,0xc5d83c40,
+ 0x47350506,0x22000000,0x10000000,0x5000000,0x1000000,0xffffff,0xffffff,0xffffff,0x9000000,0x19000000,0x32000000,0x5c2b1a1a,0xcfcf8586,0xfffc8787,
+ 0xfffb5253,0xfff90e0f,0xffe40506,0xfff30607,0xfff70607,0xfff70607,0xfff90a0b,0xfff90e0f,0xc7ac0405,0x49000000,0x29000000,0x1d000000,0x26000000,0x5a5a3738,
+ 0xfffd9fa2,0xfffb5a5e,0xfff9282e,0xfff5161c,0xdea50f13,0x33000000,0x19000000,0x8000000,0x1000000,0xffffff,0xffffff,0xffffff,0xe000000,0x23000000,
+ 0x4f341f1f,0xe2e69596,0xfffb6464,0xffc40506,0xff610203,0xf1430202,0xe3490202,0xf9960404,0xffde0506,0xfff70607,0xfff90607,0xfff70607,0xffc60506,0xa1630303,
+ 0x3b000000,0x2b000000,0x36000000,0xa4b46b6d,0xfffb7579,0xfff9161c,0xfff9161c,0xfff7161c,0xff7a0b0e,0x63360506,0x1f000000,0xa000000,0x1000000,0xffffff,
+ 0xffffff,0xffffff,0x10000000,0x28000000,0xcde46667,0xfffb5253,0xff950404,0xe6320102,0x99150000,0x6a000000,0x6e000000,0x83000000,0xdaa10404,0xfff91011,
+ 0xfff90607,0xfff90607,0xffca0506,0xda570204,0x49000000,0x37000000,0x42000000,0xd6db8183,0xfffb5459,0xfff9161c,0xfff9161c,0xffeb151a,0xff5b080a,0x66240304,
+ 0x20000000,0xb000000,0x1000000,0xffffff,0xffffff,0xffffff,0xe000000,0x23000000,0x62740303,0xde900404,0xe1350102,0x67090000,0x53000000,0x4c000000,
+ 0x7d000000,0xb1000000,0xd9000000,0xfffb4849,0xfff90607,0xfff90607,0xffb90405,0xfe380101,0xfb000000,0xf0000000,0xe0000000,0xfffc8f92,0xfffa3035,0xfff9161c,
+ 0xfff9161c,0xffb31014,0xed360506,0x4c000000,0x29000000,0x12000000,0x6000000,0x3000000,0x1000000,0x1000000,0xa000000,0x18000000,0x29000000,0x442c0101,
+ 0x572b0101,0x4b000000,0x89000000,0xc7000000,0xfd000000,0xff000000,0xff000000,0xfffc7f80,0xfff90607,0xfff90607,0xff820304,0xff1f0101,0xff000000,0xff000000,
+ 0xff432627,0xfffc8083,0xfff9161c,0xfff9161c,0xffeb151a,0xff67090c,0xb41a0203,0x52000000,0x31000000,0x1a000000,0xe000000,0x7000000,0x4000000,0x2000000,
+ 0x5000000,0xe000000,0x18000000,0x21000000,0x67000000,0xbe000000,0xff000000,0xff000000,0xff000000,0xff212121,0xff8d6565,0xfffc7778,0xfff90607,0xffb90405,
+ 0xff410202,0xff8f8787,0xffa8a8a8,0xff909090,0xffa97879,0xfffb6a6e,0xfff9161c,0xfff9161c,0xffb31014,0xff340406,0xd9000000,0x8f000000,0x43000000,0x2b000000,
+ 0x1a000000,0x10000000,0x8000000,0x4000000,0x1000000,0x7000000,0xf000000,0x71000000,0xe0000000,0xff000000,0xfc180f0f,0xff765858,0xff8d6d6d,0xffc38888,
+ 0xfffc8787,0xfffa3536,0xffb50405,0xff4f0202,0xff655656,0xffb4b4b4,0xffc4c4c4,0xffb7b7b7,0xffe09496,0xfffb5459,0xfff9161c,0xfff1151b,0xff6a090c,0xfe160606,
+ 0xff000000,0xec000000,0x9d000000,0x46000000,0x30000000,0x1e000000,0x11000000,0x9000000,0xffffff,0x8000000,0x65000000,0xe8000000,0xff000000,0xf9383838,
+ 0xff8d8484,0xfffc8f8f,0xfffb6a6a,0xfffb5e5f,0xfffa2f30,0xffbc0505,0xff540808,0xff625151,0xffaeaeae,0xffcbcbcb,0xffcdcdcd,0xffb7b7b7,0xfffc8f92,0xfffa3035,
+ 0xfff9161c,0xffbc1115,0xff430e10,0xff7b7b7b,0xfc353535,0xff000000,0xf2000000,0x9d000000,0x4d000000,0x33000000,0x1f000000,0x11000000,0xffffff,0x35000000,
+ 0xcd000000,0xff000000,0xf9505050,0xffc1c1c1,0xffc2c2c2,0xffe06768,0xfff91213,0xfff90607,0xffdc0506,0xff860304,0xff624747,0xffa9a9a9,0xffcccccc,0xffdcdcdc,
+ 0xffd6d6d6,0xffccb0b0,0xfffc8083,0xfff9161c,0xfff1151b,0xff740a0d,0xff6e5b5c,0xffc9c9c9,0xffc5c5c5,0xfd4f4f4f,0xff000000,0xe6000000,0x84000000,0x4d000000,
+ 0x31000000,0x1c000000,0xffffff,0x83000000,0xff000000,0xf9212121,0xffc2c2c2,0xffe6e6e6,0xffc9c9c9,0xffca7373,0xffcc0506,0xff700303,0xff4d0202,0xff4a2223,
+ 0xff846969,0xffc1c1c1,0xffdcdcdc,0xffe5e5e5,0xffdadada,0xffda7e81,0xffe7141a,0xffc81217,0xffb31014,0xff471011,0xffb5b1b1,0xffdadada,0xffefefef,0xffc4c4c4,
+ 0xfd202020,0xff000000,0xc3000000,0x69000000,0x47000000,0x2a000000,0xffffff,0xc3000000,0xff000000,0xff787878,0xfffafafa,0xffededed,0xffd7d7d7,0xffc29697,
+ 0xff954040,0xff705a5a,0xff807a7a,0xff909090,0xffacacac,0xffcacaca,0xffe0e0e0,0xffe3e3e3,0xffd6d6d6,0xffc2c2c2,0xffaa9899,0xff8e5c5e,0xff601d1e,0xff7b6667,
+ 0xffd2d2d2,0xffe8e8e8,0xfff6f6f6,0xfffefefe,0xff787878,0xff000000,0xe8000000,0x84000000,0x5c000000,0x38000000,0xffffff,0xef000000,0xff000000,0xffbbbbbb,
+ 0xfffdfdfd,0xfff6f6f6,0xffe7e7e7,0xffcfcfcf,0xffb2b2b2,0xff979797,0xff908788,0xffaa8585,0xffa79999,0xffbdbdbd,0xffd1d1d1,0xffd5d5d5,0xffc9c9c9,0xffb9b9b9,
+ 0xffadadad,0xffafafaf,0xffbcbcbc,0xffd0d0d0,0xffe4e4e4,0xfff3f3f3,0xfffbfbfb,0xfffefefe,0xffbbbbbb,0xff000000,0xfa000000,0x9a000000,0x6f000000,0x46000000,
+ 0xffffff,0xef000000,0xff000000,0xffececec,0xfffefefe,0xfffbfbfb,0xfff0f0f0,0xffd9d9d9,0xffb9b9b9,0xffb69898,0xfff39393,0xfffb6c6c,0xfff02d2e,0xffaa8485,
+ 0xffb9b9b9,0xffbdbdbd,0xffd9abac,0xfff68c8f,0xffef6d71,0xffc76f71,0xffc2c2c2,0xffdbdbdb,0xffeeeeee,0xfff9f9f9,0xfffefefe,0xffffffff,0xffececec,0xff000000,
+ 0xfb000000,0xaa000000,0x7e000000,0x52000000,0xffffff,0xf0000000,0xff000000,0xffececec,0xffffffff,0xfffefefe,0xfff4f4f4,0xffdddddd,0xffb9b9b9,0xfff49292,
+ 0xfffb4c4d,0xfff90e0f,0xffe20606,0xff7a1d1d,0xffa7a7a7,0xffc9a4a5,0xfffc9093,0xfffa4449,0xfff92127,0xff9d0e12,0xffbdabac,0xffdedede,0xfff2f2f2,0xfffdfdfd,
+ 0xffffffff,0xffffffff,0xffececec,0xff000000,0xfc000000,0xb4000000,0x88000000,0x5a000000,0xffffff,0xf0000000,0xff000000,0xffbbbbbb,0xffffffff,0xffffffff,
+ 0xfff5f5f5,0xffdfdfdf,0xffbbbbbb,0xfffb6c6c,0xfff90e0f,0xfff90607,0xffc10506,0xff490a0a,0xffa2a2a2,0xffd88c8e,0xfffb585c,0xfff9161c,0xfff9161c,0xff700a0d,
+ 0xffa49090,0xffe0e0e0,0xfff4f4f4,0xfffefefe,0xffffffff,0xffffffff,0xffbbbbbb,0xff000000,0xfc000000,0xb9000000,0x8c000000,0x5e000000,0xffffff,0xc9000000,
+ 0xff000000,0xff787878,0xffffffff,0xffffffff,0xfff7f7f7,0xffe3e3e3,0xffc4c4c4,0xffe03d3e,0xffc40506,0xffaf0405,0xff580202,0xff5c4646,0xffacacac,0xffca8183,
+ 0xfffa3137,0xffe9151a,0xffb31014,0xff410607,0xffb7aeae,0xffe3e3e3,0xfff5f5f5,0xfffefefe,0xffffffff,0xffffffff,0xff787878,0xff000000,0xf5000000,0xb9000000,
+ 0x8c000000,0x5e000000,0xffffff,0x92000000,0xff000000,0xfb212121,0xffc7c7c7,0xffffffff,0xfffafafa,0xffececec,0xffd6d6d6,0xffbbaeae,0xff985959,0xff672b2b,
+ 0xff705858,0xffb6b6b6,0xffc4c4c4,0xffc1c1c1,0xffb75b5e,0xff65090b,0xff491b1b,0xff847374,0xffd5d5d5,0xffeaeaea,0xfff8f8f8,0xfffefefe,0xffffffff,0xffc7c7c7,
+ 0xff202020,0xff000000,0xe9000000,0xb4000000,0x88000000,0x5a000000,0xffffff,0x4f000000,0xd9000000,0xff000000,0xfc525252,0xffdadada,0xfffcfcfc,0xfff5f5f5,
+ 0xffe9e9e9,0xffd9d9d9,0xffcbcbcb,0xffc7c7c7,0xffcccccc,0xffd7d7d7,0xffdedede,0xffdcdcdc,0xffd3d3d3,0xffcecece,0xffcfcfcf,0xffd8d8d8,0xffe7e7e7,0xfff4f4f4,
+ 0xfffbfbfb,0xfffefefe,0xffdadada,0xff515151,0xff000000,0xf9000000,0xd5000000,0xaa000000,0x7e000000,0x52000000,0xffffff,0x26000000,0x88000000,0xf0000000,
+ 0xff000000,0xfc3e3e3e,0xffd9d9d9,0xfffbfbfb,0xfff6f6f6,0xffefefef,0xffe9e9e9,0xffe7e7e7,0xffeaeaea,0xffeeeeee,0xfff1f1f1,0xfff0f0f0,0xffebebeb,0xffe8e8e8,
+ 0xffe9e9e9,0xffededed,0xfff5f5f5,0xfffafafa,0xfffefefe,0xffadadad,0xff3e3e3e,0xff000000,0xfd000000,0xe7000000,0xbf000000,0x9a000000,0x6f000000,0x46000000,
+ 0xffffff,0x1e000000,0x39000000,0x9b000000,0xee000000,0xff000000,0xff464646,0xfff7f7f7,0xfffdfdfd,0xfffbfbfb,0xfffafafa,0xfff9f9f9,0xfffafafa,0xfffbfbfb,
+ 0xfffcfcfc,0xfffcfcfc,0xfffafafa,0xfff8f8f8,0xfff8f8f8,0xfffafafa,0xfff9f9f9,0xffb1b1b1,0xff626262,0xff0a0a0a,0xff000000,0xfc000000,0xea000000,0xc8000000,
+ 0xa9000000,0x84000000,0x5c000000,0x38000000,0xffffff,0x16000000,0x2b000000,0x4a000000,0xae000000,0xff000000,0xff2a2a2a,0xffffffff,0xffffffff,0xffffffff,
+ 0xffe0e0e0,0xffa8a8a8,0xffc7c7c7,0xffe5e5e5,0xfff9f9f9,0xfff9f9f9,0xffe5e5e5,0xffc7c7c7,0xff9f9f9f,0xff707070,0xff393939,0xff000000,0xff000000,0xff000000,
+ 0xf7000000,0xe4000000,0xc7000000,0xae000000,0x8d000000,0x69000000,0x47000000,0x2a000000,0xffffff,0xf000000,0x1f000000,0x39000000,0xcd000000,0xff000000,
+ 0xff6f6f6f,0xffffffff,0xffffffff,0xffacacac,0xff080808,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0xf7000000,0xe9000000,0xd3000000,0xbf000000,0xa8000000,0x8c000000,0x6d000000,0x4d000000,0x31000000,0x1c000000,0xffffff,0xa000000,
+ 0x16000000,0x30000000,0xf2000000,0xff000000,0xffb0b0b0,0xffffffff,0xff909090,0xff000000,0xff000000,0xfd000000,0xfd000000,0xfe000000,0xfe000000,0xfe000000,
+ 0xfe000000,0xfc000000,0xf8000000,0xf2000000,0xe9000000,0xdc000000,0xca000000,0xbe000000,0xae000000,0x9a000000,0x82000000,0x68000000,0x4d000000,0x33000000,
+ 0x1f000000,0x11000000,0xffffff,0x7000000,0x11000000,0x55000000,0xff000000,0xff050505,0xffececec,0xff6f6f6f,0xff000000,0xff000000,0xf8000000,0xe4000000,
+ 0xd9000000,0xd0000000,0xc9000000,0xc5000000,0xc2000000,0xc0000000,0xbe000000,0xba000000,0xb5000000,0xae000000,0xa3000000,0x95000000,0x85000000,0x71000000,
+ 0x5b000000,0x45000000,0x30000000,0x1e000000,0x11000000,0x9000000,0xffffff,0x6000000,0x10000000,0x8b000000,0xff000000,0xff383838,0xff535353,0xff000000,
+ 0xff000000,0xf0000000,0xd8000000,0xcb000000,0xbb000000,0xac000000,0xa1000000,0x9a000000,0x97000000,0x94000000,0x92000000,0x8e000000,0x88000000,0x80000000,
+ 0x76000000,0x69000000,0x5a000000,0x49000000,0x38000000,0x28000000,0x1a000000,0x10000000,0x8000000,0x4000000,0xffffff,0x6000000,0x10000000,0xb8000000,
+ 0xff000000,0xfe3a3a3a,0xff000000,0xff000000,0xe2000000,0xcc000000,0xbf000000,0xab000000,0x95000000,0x81000000,0x74000000,0x6b000000,0x68000000,0x65000000,
+ 0x63000000,0x5f000000,0x5a000000,0x53000000,0x4a000000,0x40000000,0x35000000,0x29000000,0x1e000000,0x14000000,0xd000000,0x7000000,0x4000000,0x2000000,
+ 0xffffff,0x7000000,0x11000000,0xb8000000,0xfd060606,0xfb020202,0xfb000000,0xca000000,0xba000000,0xb3000000,0x9f000000,0x85000000,0x6c000000,0x57000000,
+ 0x49000000,0x40000000,0x3c000000,0x3a000000,0x38000000,0x36000000,0x32000000,0x2e000000,0x28000000,0x21000000,0x1a000000,0x14000000,0xe000000,0x9000000,
+ 0x5000000,0x3000000,0x1000000,0x1000000,0xffffff,0x7000000,0x11000000,0xb8000000,0xc90c0c0c,0xce000000,0xa5000000,0x9d000000,0x9f000000,0x92000000,
+ 0x7a000000,0x5f000000,0x47000000,0x34000000,0x28000000,0x21000000,0x1e000000,0x1c000000,0x1b000000,0x1a000000,0x18000000,0x15000000,0x12000000,0xf000000,
+ 0xb000000,0x8000000,0x5000000,0x3000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,0x6000000,0x10000000,0x3a000000,0x52000000,0x6c000000,
+ 0x74000000,0x80000000,0x7d000000,0x6d000000,0x56000000,0x3e000000,0x2a000000,0x1c000000,0x13000000,0xe000000,0xd000000,0xc000000,0xb000000,0xa000000,
+ 0xa000000,0x8000000,0x7000000,0x6000000,0x4000000,0x3000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x5000000,
+ 0xd000000,0x1b000000,0x30000000,0x46000000,0x57000000,0x5e000000,0x58000000,0x49000000,0x36000000,0x25000000,0x17000000,0xd000000,0x8000000,0x5000000,
+ 0x4000000,0x4000000,0x4000000,0x3000000,0x3000000,0x3000000,0x2000000,0x2000000,0x1000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff
+};
+
+static const QRgb Light_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3000000,0x6000000,0xb000000,0x12000000,0x19000000,0x21000000,0x29000000,0x2f000000,
+ 0x34000000,0x37000000,0x39040404,0x38050505,0x35050505,0x30050505,0x2a060606,0x22080808,0x1a0a0a0a,0x130d0d0d,0xc151515,0x7242424,0x3000000,0x1000000,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,
+ 0x5d393939,0x934a4a4a,0xbe505050,0xde525252,0xf3525252,0xfe4f4f4f,0xf3454545,0xe03d3d3d,0xc5333333,0xa0272727,0x721a1a1a,0x410c0c0c,0x350e0e0e,0x280d0d0d,
+ 0x1d121212,0x120e0e0e,0xb171717,0x5000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,
+ 0x16000000,0x23000000,0x70474747,0xba595959,0xf7615e5c,0xff59524f,0xff514743,0xff4b3f3a,0xff433631,0xff3e302b,0xff392d29,0xff352b27,0xff312927,0xff2c2826,
+ 0xf92a2828,0xc7202020,0x8a161616,0x49111111,0x36131313,0x26141414,0x18151515,0xe121212,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,
+ 0x2000000,0x7000000,0xe000000,0x1a000000,0x48353535,0xa75a5a5a,0xf865605e,0xff5c514d,0xff54443f,0xff4e3f3a,0xff4c3d39,0xff473a36,0xff433631,0xff3e312d,
+ 0xff382d29,0xff322823,0xff2d2420,0xff271f1b,0xff221a17,0xff1e1a18,0xfa1a1817,0xbe141414,0x6f0f0f0f,0x42131313,0x2d111111,0x1c121212,0xf111111,0x7000000,
+ 0x2000000,0x1000000,0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x60454545,0xcb625f5e,0xff605854,0xff564742,0xff544541,0xff51443f,0xff58483b,
+ 0xff4a3e3b,0xff463a37,0xff463b32,0xff3d3430,0xff372e2b,0xff322b27,0xff2c2623,0xff28201e,0xff221c1a,0xff1b1616,0xff161312,0xff111010,0xdc0f0e0d,0x890f0f0f,
+ 0x4a151515,0x31151515,0x1d121212,0xf111111,0x7242424,0x2000000,0x1000000,0x5000000,0xd000000,0x1a000000,0x60454545,0xd864605d,0xff5e524d,0xff574741,
+ 0xff544642,0xff725f3c,0xff705f3f,0xff90793f,0xff9c8541,0xff84703b,0xff6a5934,0xff54472d,0xff3e3429,0xff312a27,0xff2a2523,0xff26211f,0xff221e1c,0xff1c1919,
+ 0xff171515,0xff111111,0xff0f0f0f,0xe6100e0e,0x8e101010,0x4d171717,0x31151515,0x1d1a1a1a,0xe121212,0x62b2b2b,0x3000000,0xa000000,0x16000000,0x48353535,
+ 0xcb625f5e,0xff5d514d,0xff564741,0xff554742,0xff8f773a,0xffb99c45,0xffe8c75a,0xffdbbe62,0xfff8d970,0xfff2d369,0xffd2b554,0xffab903c,0xff7a652a,0xff2a2523,
+ 0xff282321,0xff23201f,0xff201d1b,0xff1c1b1a,0xff181817,0xff161616,0xff141414,0xff111111,0xe0121110,0x80141414,0x4a151515,0x2d171717,0x18151515,0xb171717,
+ 0x6000000,0x11000000,0x23000000,0xa75a5a5a,0xff605652,0xff554540,0xff544641,0xff9f8235,0xffedc647,0xfff4d465,0xfffde080,0xfffee590,0xfffee696,0xfffde490,
+ 0xfffde17f,0xfffeda68,0xffe4bf44,0xff9d8024,0xff372e1b,0xff201c1c,0xff1c1a1a,0xff1a1a1a,0xff1b1b1b,0xff1c1c1c,0xff1a1a1a,0xff171717,0xff121212,0xcb121212,
+ 0x66171717,0x43171717,0x26141414,0x120e0e0e,0xb000000,0x1b000000,0x70474747,0xf8655f5d,0xff55433e,0xff53443e,0xff876e31,0xfffccf38,0xfffbd75e,0xfffde07f,
+ 0xfffde89e,0xfffeeeb6,0xfffef0bf,0xfffeedb6,0xfffee89e,0xfffee17f,0xfffdd85e,0xfffcd039,0xff8a6e17,0xff201c16,0xff191817,0xff191919,0xff1e1e1e,0xff1f1f1f,
+ 0xff1f1f1f,0xff1c1c1c,0xff171717,0xfb131313,0xa7141414,0x5a171717,0x37171717,0x1d121212,0x12000000,0x26000000,0xba595959,0xff594e49,0xff52423c,0xff695534,
+ 0xffe1b523,0xfffcd344,0xfffddb6c,0xfffee590,0xfffeedb6,0xfffff5d6,0xfffff9e5,0xfffff5d6,0xffffeeb6,0xfffee490,0xfffedc6d,0xfffdd344,0xffd2a71b,0xff4d3e0d,
+ 0xff131313,0xff181818,0xff1e1e1e,0xff222222,0xff232323,0xff212121,0xff1c1c1c,0xff171717,0xda141414,0x72191919,0x49151515,0x29131313,0x19000000,0x5d393939,
+ 0xf7605c5a,0xff503f3a,0xff4e3f3a,0xff9a7922,0xfffac821,0xfffdd348,0xfffddd71,0xfffee697,0xfffef0bf,0xfffff9e5,0xffffffff,0xfffff9e5,0xfffef0bf,0xfffde696,
+ 0xfffddd70,0xfffdd449,0xfff9c822,0xff977507,0xff101010,0xff161616,0xff1d1d1d,0xff222222,0xff272727,0xff252525,0xff212121,0xff1b1b1b,0xfb161515,0xa0151515,
+ 0x5b161616,0x36131313,0x21000000,0x934a4a4a,0xff58504d,0xff4a3a34,0xff4e4035,0xffba9115,0xfffcc91f,0xfffdd245,0xfffedb6c,0xfffee590,0xfffeedb6,0xfffef5d7,
+ 0xfffff9e5,0xfffff5d6,0xfffeedb6,0xfffee490,0xfffddb6c,0xfffdd345,0xfffcc91e,0xffc29604,0xff211c0b,0xff131313,0xff1c1c1c,0xff232323,0xff282828,0xff292929,
+ 0xff262626,0xff202020,0xff181818,0xc6161616,0x6d171717,0x43131313,0x29000000,0xbe505050,0xff50443f,0xff473732,0xff56462f,0xffd0a10c,0xfffcc816,0xfffdcf39,
+ 0xfffdd95e,0xfffee180,0xfffde89e,0xfffeedb6,0xfffff0c0,0xfffeeeb6,0xfffde89d,0xfffee07f,0xfffdd95e,0xfffdcf39,0xfffcc816,0xffdeab01,0xff392d08,0xff121212,
+ 0xff1b1b1b,0xff232323,0xff292929,0xff2b2b2b,0xff292929,0xff242424,0xff1c1c1c,0xe1171717,0x7b191919,0x4e141414,0x2f000000,0xde525252,0xff483a35,0xff42342f,
+ 0xff554429,0xffcfa00b,0xfffcc40b,0xfffccb27,0xfffdd349,0xfffedb68,0xfffee080,0xfffee590,0xfffee696,0xfffee590,0xfffde07f,0xfffedb68,0xfffdd349,0xfffccb27,
+ 0xfffcc50c,0xffdfac00,0xff372c06,0xff101010,0xff191919,0xff232323,0xff2b2b2b,0xff2e2e2e,0xff2d2d2d,0xff272727,0xff1f1f1f,0xf0171717,0x881a1a1a,0x58141414,
+ 0x34000000,0xf3525252,0xff41312b,0xff3f302a,0xff483a29,0xffbb910e,0xfffcc200,0xfffcc714,0xfffdcd2e,0xfffcd348,0xfffdd95e,0xfffddb6d,0xfffddd71,0xfffedc6c,
+ 0xfffdd85e,0xfffdd348,0xfffccd2e,0xfffcc713,0xfffcc200,0xffd1a101,0xff1f1906,0xff0f0f0f,0xff191919,0xff242424,0xff2c2c2c,0xff313131,0xff2f2f2f,0xff2a2a2a,
+ 0xff212121,0xfa181818,0x901b1b1b,0x5f181818,0x37000000,0xfe4f4f4f,0xff3b2a24,0xff392b26,0xff372d29,0xff957413,0xfff9c001,0xfffcc302,0xfffcc714,0xfffdcb27,
+ 0xfffcd039,0xfffdd344,0xfffcd348,0xfffdd244,0xfffcd039,0xfffccc27,0xfffcc714,0xfffcc303,0xfffcc200,0xffa57f01,0xff0a0907,0xff0f0f0f,0xff191919,0xff242424,
+ 0xff2e2e2e,0xff333333,0xff313131,0xff2c2c2c,0xff232323,0xfe1a1a1a,0x951b1b1b,0x64171717,0x39040404,0xf3454545,0xff352923,0xff352823,0xff322925,0xff55431c,
+ 0xffd1a206,0xfffcc200,0xfffcc200,0xfffcc40b,0xfffcc716,0xfffdca1e,0xfffcca21,0xfffcc91f,0xfffcc716,0xfffcc50b,0xfffcc200,0xfffcc200,0xfffbc100,0xff9b7801,
+ 0xff080808,0xff101010,0xff1b1b1b,0xff262626,0xff2f2f2f,0xff343434,0xff333333,0xff2d2d2d,0xff232323,0xfb1a1a1a,0x971b1b1b,0x65171717,0x38050505,0xe03d3d3d,
+ 0xff332824,0xff302520,0xff2e2522,0xff2c2422,0xff846710,0xfff9bf00,0xfffcc200,0xfffcc200,0xfffcc200,0xfffcc303,0xfffcc304,0xfffcc302,0xfffcc200,0xfffcc200,
+ 0xfffcc200,0xfffcc200,0xfffcc200,0xfffcc200,0xffb68d03,0xff121212,0xff1c1c1c,0xff282828,0xff313131,0xff353535,0xff353535,0xff2d2d2d,0xff242424,0xf31a1a1a,
+ 0x951a1a1a,0x63151515,0x35050505,0xc5333333,0xff302724,0xff2b1f1b,0xff2a221e,0xff27201d,0xff3a2f1a,0xffad8608,0xfffcc200,0xfffcc200,0xfffcc200,0xfffbc100,
+ 0xfffcc200,0xfffcc200,0xfffcc200,0xfffcc200,0xfffcc200,0xfffcc200,0xfffcc200,0xfffcc200,0xff806406,0xff2d2713,0xff1f1f1f,0xff2a2a2a,0xff333333,0xff373737,
+ 0xff343434,0xff2d2d2d,0xff222222,0xe71a1a1a,0x901b1b1b,0x5e161616,0x30050505,0xa0272727,0xff2c2725,0xff241b17,0xff251e1b,0xff231e1b,0xff201d1b,0xff252017,
+ 0xff745b0b,0xffaf8805,0xfff2ba00,0xfffbc100,0xffecb500,0xffe6b100,0xfffcc200,0xffd5a400,0xffefb800,0xfffcc200,0xfffcc200,0xff816405,0xff1a180f,0xffdeab03,
+ 0xffa9850d,0xff2c2c2c,0xff343434,0xff373737,0xff333333,0xff2b2b2b,0xff202020,0xd51a1a1a,0x87191919,0x58141414,0x2a060606,0x721a1a1a,0xf92a2827,0xff201816,
+ 0xff201917,0xff201b1a,0xff1e1b19,0xff1b1918,0xff161414,0xff31290e,0xff55440a,0xff866805,0xff957404,0xff7c6004,0xff654f04,0xff433405,0xff8a6b03,0xfffcc200,
+ 0xff8d6e05,0xff17150e,0xffdaa903,0xfffcc200,0xffd6a607,0xff2d2d2d,0xff343434,0xff353535,0xff303030,0xff282828,0xfd1f1f1e,0xbb1a1a1a,0x7b191919,0x4e141414,
+ 0x22080808,0x410c0c0c,0xc7202020,0xff1d1917,0xff1b1715,0xff1b1817,0xff1a1919,0xff191918,0xff181818,0xff1a1916,0xff141414,0xff121212,0xff211d0f,0xff28220c,
+ 0xff0d0d0d,0xff0e0e0e,0xff2a230c,0xff8f7007,0xff131313,0xffddab03,0xfffcc200,0xffc69a08,0xff292928,0xff2e2e2e,0xff323232,0xff323232,0xff2c2c2c,0xff232323,
+ 0xe91c1c1c,0x9a1a1a1a,0x6c151515,0x420f0f0f,0x1a0a0a0a,0x350e0e0e,0x8a161616,0xfa191817,0xff161212,0xff171514,0xff171616,0xff1b1b1b,0xff1c1c1c,0xff1c1c1c,
+ 0xff1c1c1c,0xff1a1a1a,0xff181818,0xff171717,0xff171717,0xff171717,0xff181818,0xff1a1a1a,0xff655213,0xfffcc200,0xffca9e08,0xff292826,0xffa88511,0xff615324,
+ 0xff2f2f2f,0xff2e2e2e,0xff272727,0xfd1f1e1e,0xc81b1b1b,0x87191919,0x5b141414,0x350e0e0e,0x130d0d0d,0x280d0d0d,0x480e0e0e,0xbe141414,0xff11100f,0xff111111,
+ 0xff161616,0xff1b1b1b,0xff1f1f1f,0xff212121,0xff222222,0xff222222,0xff222222,0xff212121,0xff222222,0xff222222,0xff232323,0xff252525,0xff52461f,0xffa78410,
+ 0xff2e2d28,0xff826a19,0xfffcc200,0xffa08014,0xff2b2b2b,0xff272727,0xff212121,0xe31c1c1c,0x9b1c1c1c,0x72161616,0x49111111,0x280d0d0d,0xc151515,0x1d121212,
+ 0x36131313,0x70111111,0xdc0f0d0d,0xff0f0f0f,0xff141414,0xff1a1a1a,0xff1f1f1f,0xff222222,0xff252525,0xff262626,0xff282828,0xff292929,0xff2a2a2a,0xff2c2c2c,
+ 0xff2d2d2d,0xff2e2e2e,0xff2f2f2f,0xff34332f,0xff2f2f2f,0xff8b7119,0xffedb703,0xff443d25,0xff272727,0xff212121,0xf21c1c1c,0xb61b1b1b,0x81161616,0x5a141414,
+ 0x350e0e0e,0x1c090909,0x7242424,0x120e0e0e,0x26141414,0x42131313,0x890f0f0f,0xe6100e0d,0xff111111,0xff171717,0xff1c1c1c,0xff212121,0xff252525,0xff292929,
+ 0xff2b2b2b,0xff2d2d2d,0xff303030,0xff323232,0xff333333,0xff343434,0xff353535,0xff343434,0xff313131,0xff2d2d2d,0xff534822,0xff252525,0xff212121,0xf51e1d1c,
+ 0xc51a1a1a,0x8f191919,0x66141414,0x42131313,0x250e0e0e,0x120e0e0e,0x3000000,0xb171717,0x18151515,0x2d111111,0x4a151515,0x8e101010,0xe0121110,0xff121212,
+ 0xff171717,0xff1c1c1c,0xff212121,0xff262626,0xff292929,0xff2d2d2d,0xff2f2f2f,0xff313131,0xff323232,0xff343434,0xff333333,0xff313131,0xff2e2e2e,0xff292929,
+ 0xff242424,0xff1f1f1f,0xf21b1b1a,0xc5191919,0x931a1a1a,0x6d151515,0x4b111111,0x2d111111,0x170b0b0b,0xa000000,0x1000000,0x5000000,0xe121212,0x1c121212,
+ 0x31151515,0x4d171717,0x80141414,0xcb121212,0xfb131313,0xff171717,0xff1b1b1b,0xff202020,0xff242424,0xff272727,0xff2a2a2a,0xff2c2c2c,0xff2d2d2d,0xff2d2d2d,
+ 0xff2c2c2c,0xff2a2a2a,0xff262626,0xff222222,0xfd1e1d1d,0xe41b1b1b,0xb81a1a1a,0x90171717,0x6e131313,0x4e101010,0x31101010,0x1b090909,0xd000000,0x5000000,
+ 0xffffff,0x2000000,0x6000000,0xf111111,0x1d121212,0x31151515,0x4a151515,0x66171717,0xa7141414,0xda141414,0xfb161515,0xff181818,0xff1c1c1c,0xff1f1f1f,
+ 0xff212121,0xff232323,0xff232323,0xff242424,0xff222222,0xff212121,0xfd1e1d1d,0xea1c1c1c,0xca1b1b1b,0x9e1a1a1a,0x84151515,0x68141414,0x4c111111,0x31101010,
+ 0x1c090909,0xe000000,0x6000000,0x2000000,0xffffff,0x1000000,0x2000000,0x7000000,0x10202020,0x1d1a1a1a,0x2d171717,0x43171717,0x5a171717,0x72191919,
+ 0xa0151515,0xc6161616,0xe1171717,0xf0171717,0xfa181818,0xfe1a1a1a,0xfb1a1a1a,0xf31a1a1a,0xe71a1a1a,0xd51a1a1a,0xbb1a1a1a,0x9a1a1a1a,0x88181818,0x74161616,
+ 0x5b141414,0x43131313,0x2e111111,0x1c090909,0xe000000,0x7000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,0x2000000,0x7242424,0xe121212,
+ 0x18151515,0x26141414,0x37171717,0x49151515,0x5b161616,0x6d171717,0x7b191919,0x881a1a1a,0x901b1b1b,0x951b1b1b,0x971b1b1b,0x951a1a1a,0x901b1b1b,0x87191919,
+ 0x7b191919,0x6c151515,0x5b141414,0x49111111,0x350e0e0e,0x250e0e0e,0x170b0b0b,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0x1000000,0x2000000,0x62b2b2b,0xb171717,0x120e0e0e,0x1d121212,0x29131313,0x36131313,0x43131313,0x4e141414,0x58141414,0x5f181818,0x64171717,
+ 0x65171717,0x63151515,0x5e161616,0x58141414,0x4e141414,0x420f0f0f,0x350e0e0e,0x280d0d0d,0x1c090909,0x120e0e0e,0xa000000,0x5000000,0x2000000,0x1000000,
+ 0xffffff,0xffffff
+};
+
+static const QRgb MPEGPlayer_data[] = {
+ 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
+ 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
+ 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff1d6366,0xff1d6367,0xff1d6469,0xff1d6469,
+ 0xff1d6469,0xff1d6469,0xff1d6469,0xff000000,0xff1d81e1,0xff1d8afe,0xff1d80df,0xff000000,0xff1d8afe,0xff1d8afe,0xff1d8afe,0xff1d8afe,0xff1d8afe,0xff1d8afe,
+ 0xff1d8afe,0xff1d8afe,0xff1d8afe,0xff1d8afe,0xff000000,0xff1d7bcf,0xff1d8afe,0xff1d7acc,0xff000000,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
+ 0xff1d6266,0xfffab667,0xfffab667,0xfffab668,0xfffab668,0xfffab668,0xfffbb768,0xff000000,0xffbaa673,0xfffdecde,0xffbba46e,0xff000000,0xfffffffe,0xfffffffe,
+ 0xfffffffe,0xfffffffe,0xfffffffe,0xfffffffe,0xfffffffe,0xfffffffe,0xfffffffe,0xfffffffe,0xff000000,0xffb97e1a,0xfffde2cc,0xffaf7516,0xff000000,0x5c000000,
+ 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff1c6165,0xfff6b264,0xfff6b265,0xfff5b165,0xfff6b265,0xfff6b265,0xfff6b365,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0xfffefbf9,0xfffffdfa,0xfffffcfa,0xfffffcfa,0xfffffcfb,0xfffffcfb,0xfffffcfb,0xfffffbf9,0xfffffcf8,0xfffffcf8,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff1b5b5f,0xffeba85f,0xffeaa75e,0xffeaa75e,0xffeaa75e,0xffeba85e,
+ 0xffeca95f,0xff000000,0xffac9968,0xfff5e0cf,0xffb09863,0xff000000,0xfffdf7f3,0xfffef7f4,0xfffef8f4,0xfffff9f5,0xfffff8f4,0xfffff8f4,0xfffff8f3,0xfffff8f3,
+ 0xfffff7f3,0xfffff7f2,0xff000000,0xffaa7210,0xfff6d8c2,0xff9e6a10,0xff000000,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff195254,0xffd79653,
+ 0xffd69552,0xffd69552,0xffd69552,0xffd79652,0xffda9852,0xff000000,0xffe4c9b5,0xffebded6,0xfff0d5c1,0xff000000,0xfff9ddc9,0xfffcf3ec,0xfffef3ed,0xfffef4ed,
+ 0xfffff4ed,0xfffff4ec,0xfffff3eb,0xfffff3eb,0xfffff3ea,0xfffbd7ba,0xff000000,0xfff5d4ba,0xfffbf1ea,0xffefd1ba,0xff000000,0x93000000,0x62000000,0x3b000000,
+ 0x1f000000,0x3d000000,0xff164543,0xffbb7c41,0xffb97a40,0xffb97a3f,0xffba7a40,0xffbc7c40,0xffbf7f42,0xff000000,0xff89744a,0xffd8b7a0,0xff97814d,0xff000000,
+ 0xffa28647,0xfff7e9df,0xfffbede2,0xfffdeee3,0xfffdeee3,0xfffeeee3,0xfffeeee1,0xfffeede0,0xfffeece0,0xffa16c06,0xff000000,0xff956606,0xffeecbb2,0xff895e06,
+ 0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff123530,0xff9b5e2d,0xff995c2c,0xff985c2c,0xff995c2b,0xff9c5e2d,0xffa0622f,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0f261e,0xff7e421b,0xff7b4019,0xff7b4019,
+ 0xff7b4019,0xff7e421a,0xff82461c,0xff000000,0xff5d4524,0xffa3785c,0xff70582e,0xff000000,0xff866c32,0xffe5cbb6,0xfff0d7c2,0xfff7dcc8,0xfffbe0ca,0xfffde1ca,
+ 0xfffce0c9,0xfffbe0ca,0xfff8dfca,0xff8d6200,0xff000000,0xff835a00,0xffe2bda2,0xff785200,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff1b80e9,0xfffdfcfb,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff3efec,0xffc3c3c3,0xffb59b8b,0xff9a775f,0xff9a6b4d,0xff000000,0xffc29473,0xffd6b59e,
+ 0xffe6c6ad,0xfff1d1b8,0xfff8d5bd,0xfffbd7bd,0xfff9d9bd,0xfff7d7c0,0xfff5d7c0,0xffe9bb96,0xff000000,0xffdfb596,0xffead1be,0xffd6b196,0xff000000,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff1d88fb,0xffe5e5e5,0xffaaaaaa,0xff888888,0xffa5a5a5,0xffdbdbdb,0xfffafafa,0xfffafafa,0xfff1f1f0,0xffe1d6d0,
+ 0xff816e5a,0xff020202,0xffae8469,0xffc49c80,0xffd9b195,0xffe7c0a3,0xfff2c9ab,0xfff5cdaf,0xfff5d0b1,0xfff1cfb1,0xffefceb4,0xffecccb4,0xff000000,0xff714f00,
+ 0xffd2a98a,0xff664800,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff1978df,0xff7d7d7d,0xff797979,0xff9d9d9d,0xffa7a7a7,0xffadadad,
+ 0xffdedede,0xfff9f9f9,0xfff6f6f6,0xfff5f5f5,0xffe2e2e2,0xff676767,0xff926449,0xffb18264,0xffc89a7a,0xffddae8b,0xffeabb98,0xffedc2a1,0xffecc3a5,0xffebc4a7,
+ 0xffe8c3a8,0xffe4c1a8,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff115195,0xff797979,
+ 0xffb5b5b5,0xffb9b9b9,0xffb9b9b9,0xffb5b5b5,0xffc3c7c3,0xffececea,0xfff3f3f3,0xfff0f1f1,0xfff1f1f1,0xffe5e5e6,0xffad9384,0xff956545,0xffb98561,0xffd09b74,
+ 0xffddab86,0xffe1b592,0xffe3b998,0xffe2ba9b,0xffdeb999,0xffdbb89c,0xff000000,0xff5d4200,0xffbc9476,0xff553c00,0xff000000,0x99000000,0x66000000,0x3d000000,
+ 0x1f000000,0x3d000000,0xff0c3969,0xffa2a2a2,0xffb5b5b5,0xffb2b2b2,0xffb2b2b2,0xffb2b2b2,0xffb9b9b8,0xffe0e0df,0xffeeeeec,0xffeaeaea,0xffeaeaea,0xffeaeaea,
+ 0xffe2dedc,0xff91705c,0xffa96e4b,0xffbe8963,0xffcf9d75,0xffd7a885,0xffd8ad8c,0xffd8af90,0xffd4ae91,0xffd1ad92,0xff000000,0xffb68c6c,0xffc4a792,0xffab876c,
+ 0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0d3f75,0xffa6a7a7,0xffadaaad,0xffaaadad,0xffaaadaa,0xffadadad,0xffb8b8b8,0xffd9d9da,
+ 0xffe4e4e4,0xffe1e3e3,0xffe1e3e1,0xffe3e3e3,0xffe4e4e5,0xffc5bcb7,0xff7c5137,0xffaf7753,0xffc08c66,0xffc99874,0xffcc9f7f,0xffcca281,0xffc8a183,0xff533b00,
+ 0xff000000,0xff4c3700,0xffa57f62,0xff473200,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff1359a4,0xff939593,0xffa5a5a5,0xffa4a4a4,
+ 0xffa4a4a4,0xffa8a8aa,0xffbfbfbd,0xffd5d5d5,0xffdcdcdb,0xffdcdcdc,0xffdcdbdc,0xffdadbdb,0xffd9d9da,0xffe0e0e0,0xff4c4c4c,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff176cc9,0xffaaaaaa,0xffa2a2a2,0xff9f9f9f,0xffa6a6a6,0xffb4b4b4,0xffc7c7c7,0xffd2d2d2,0xffc9c9c9,0xffbcbcbc,0xffb9b9b9,0xffc4c4c7,0xffcfcfcf,0xffd5d5d5,
+ 0xffaba4a0,0xff835a40,0xffa37150,0xffae7f5f,0xffb28669,0xffb3896d,0xffb28a6f,0xff463100,0xff000000,0xff412e00,0xff8c6850,0xff3c2a00,0xff000000,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff176cc7,0xffc3c3c3,0xffb8b9b9,0xffb4b2b2,0xffb8b8b9,0xffc0c0c1,0xffc9c9c9,0xffaeaeae,0xff6d6d6d,0xff525252,
+ 0xff595959,0xff7c7c7c,0xffadadad,0xffc7c7c7,0xffb7b7b7,0xff866551,0xff966746,0xffa07454,0xffa37b5e,0xffa67f63,0xffa57e65,0xff8d6346,0xff000000,0xff845e46,
+ 0xff967966,0xff7d5b46,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff1566bd,0xffc0bfbf,0xffc3c3c1,0xffc1c1c1,0xffc0c0bf,0xffc3c3c1,
+ 0xffb2b2b2,0xff5b5a5b,0xff565656,0xff848484,0xff919191,0xff868686,0xff8c8c8c,0xffb1b1b1,0xffb6b8b8,0xff8d7261,0xff8a5c3e,0xff93684b,0xff956d53,0xff977257,
+ 0xff967259,0xff92705a,0xff000000,0xff372600,0xff75513c,0xff332400,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff1461b4,0xffa4a5a5,
+ 0xff969896,0xffa2a4a4,0xffb4b4b4,0xffbcbcbc,0xff8c8c8c,0xff4c4c4a,0xff7e8181,0xff89898a,0xff888688,0xff888888,0xff868688,0xff9b9d9b,0xffb2b2b2,0xff90796b,
+ 0xff805436,0xff865e41,0xff8a6248,0xff8a654c,0xff89654f,0xff87644e,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x99000000,0x66000000,0x3d000000,
+ 0x1f000000,0x3d000000,0xff135ba8,0xff868686,0xff7c7c7c,0xff848484,0xffa8a8a8,0xffb4b5b5,0xff777977,0xff545454,0xff818281,0xff7e7e7e,0xff7e7e7e,0xff7e7e7e,
+ 0xff818181,0xff929393,0xffadadad,0xff8d776a,0xff774b2e,0xff7d5338,0xff7f573d,0xff805a40,0xff7e5941,0xff7c5942,0xff000000,0xff302200,0xff634128,0xff2d2000,
+ 0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff12589f,0xff818181,0xff757575,0xff818182,0xff9f9f9f,0xffa7a8a7,0xff848684,0xff5f5f5f,
+ 0xff757575,0xff777777,0xff777777,0xff777777,0xff7e7d7e,0xff929292,0xffa2a2a2,0xff7c685c,0xff6d4427,0xff734a2e,0xff744d32,0xff754f35,0xff724e38,0xff724e38,
+ 0xff000000,0xff5e3f1c,0xff6d4b38,0xff5b3d1c,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff115298,0xff8e9191,0xff888988,0xff919191,
+ 0xff989898,0xff9a9a9a,0xff939393,0xff707070,0xff6c6c6c,0xff6f6f6f,0xff707070,0xff757575,0xff818181,0xff939393,0xff929292,0xff6a5545,0xff643d21,0xff684226,
+ 0xff6a4329,0xff6b4529,0xff6a452a,0xff2a1d00,0xff000000,0xff291d00,0xff55390e,0xff281d00,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff104c8c,0xff919191,0xff929292,0xff929292,0xff929291,0xff919191,0xff8e8e8e,0xff888888,0xff797979,0xff717171,0xff717171,0xff7d7c7d,0xff888888,0xff919191,
+ 0xff7e817e,0xff1e1e1e,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0f4784,0xff838384,0xff676867,0xff3e3d3e,0xff2e2e2c,0xff4a4a4a,0xff6f706f,0xff838483,0xff838383,0xff838383,
+ 0xff828283,0xff838383,0xff848383,0xff888988,0xff61605d,0xff382308,0xff55380d,0xff573a0f,0xff57390f,0xff583a10,0xff583b10,0xff241a00,0xff000000,0xff241a00,
+ 0xff4a3400,0xff241a00,0xff000000,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff0e437c,0xff595959,0xff202020,0xff39393a,0xff505050,0xff4d4d4d,
+ 0xff505050,0xff6f6f6f,0xff7a7a7a,0xff7a7a7a,0xff7c7a7a,0xff7a7a7c,0xff7a7a7c,0xff7d7d7d,0xff342b20,0xff402a02,0xff503504,0xff513604,0xff513704,0xff513704,
+ 0xff513704,0xff453000,0xff000000,0xff453100,0xff513704,0xff463200,0xff000000,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff0c3b6d,0xff262626,
+ 0xff353737,0xff545452,0xff515151,0xff515151,0xff505050,0xff5a5a5a,0xff707070,0xff717171,0xff717171,0xff747170,0xff757575,0xff575552,0xff251800,0xff462f00,
+ 0xff4b3300,0xff493200,0xff493200,0xff4a3300,0xff4a3300,0xff4a3300,0xff000000,0xff201700,0xff432f00,0xff211700,0xff000000,0x87000000,0x5a000000,0x36000000,
+ 0x17000000,0x2e000000,0xff0b335f,0xff020b14,0xff082748,0xff082748,0xff082748,0xff082748,0xff082648,0xff092c51,0xff0c3968,0xff0c3a6b,0xff0c3a6b,0xff0c3a6c,
+ 0xff0b345e,0xff030900,0xff061500,0xff081a00,0xff081a00,0xff081900,0xff081900,0xff081900,0xff081a00,0xff081a00,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
+ 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,
+ 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
+ 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
+ 0x18000000,0xf000000
+};
+
+static const QRgb Mindbreaker_data[] = {
+ 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
+ 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
+ 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff522300,0xff522300,0xff522300,0xff522300,
+ 0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,
+ 0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
+ 0xff522300,0xff9b4326,0xffa14322,0xffa64422,0xffa04425,0xff944025,0xff974326,0xffa64623,0xffa34623,0xff924226,0xff8a3f25,0xff944628,0xff914227,0xff8f3f26,
+ 0xff883f26,0xff823f25,0xff823f25,0xff843d23,0xff863d25,0xff8b3f26,0xff883b23,0xff8b3a23,0xff8d3d25,0xff883f28,0xff7d3c27,0xff843f28,0xff522300,0x5c000000,
+ 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff522300,0xff743825,0xff863d25,0xff8d4025,0xff923f22,0xff944222,0xff914022,0xff964022,0xff974223,0xff974223,
+ 0xff8f4225,0xff8f4226,0xff914326,0xff8f4226,0xff8f4026,0xff8f4023,0xff8f4325,0xff8d4225,0xff843d23,0xff7b3b23,0xff7d3d26,0xff7d3823,0xff863c25,0xff743825,
+ 0xff7d3b25,0xff843c23,0xff522300,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff522300,0xff7d3c23,0xff793823,0xff793723,0xff863b23,0xff944225,
+ 0xff8d4225,0xff803c25,0xff883f23,0xff924625,0xff9b4725,0xffa44823,0xffa64a23,0xffae4a22,0xffaf4d22,0xffb24e22,0xffab4a21,0xffa84821,0xffa84721,0xffa04221,
+ 0xffa84721,0xffa84821,0xffa94721,0xffa14422,0xffb14a21,0xffb24a21,0xff522300,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff522300,0xff974726,
+ 0xff9c4725,0xffa04825,0xff9d4420,0xff8b5641,0xff83736d,0xff848484,0xff80706a,0xff764836,0xff70311a,0xff7d3922,0xff894025,0xff8f4227,0xff863f25,0xff843f23,
+ 0xff823f25,0xffae8777,0xffe5dbd6,0xffffffff,0xffe0d4d1,0xff9d7668,0xff6d341f,0xff753b23,0xff834125,0xff864226,0xff522300,0x93000000,0x62000000,0x3b000000,
+ 0x1f000000,0x3d000000,0xff522300,0xff743a26,0xff793823,0xff7b3822,0xff794f41,0xff777777,0xff4a4a4a,0xff383838,0xff4a4a4a,0xff777777,0xff4d362f,0xff4e2718,
+ 0xff603022,0xff733a25,0xff7d3f27,0xff8d3f21,0xffb68778,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff7e5f55,0xff69311b,0xff833b21,0xff853d24,
+ 0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff974022,0xff8a3f23,0xff883c23,0xff7d716d,0xff4a4a4a,0xff171717,0xff000000,
+ 0xff171717,0xff4a4a4a,0xff6f6460,0xff401d10,0xff692f1c,0xff843c24,0xff883f25,0xff8f3f22,0xffe7dbd7,0xffffffff,0xffbbbaba,0xff8c8989,0xffbbbaba,0xffffffff,
+ 0xffc7bab6,0xff471e0f,0xff7c391c,0xff9d4520,0xff502200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xffaf4621,0xffa44421,0xffa44321,
+ 0xff848484,0xff383838,0xff000000,0xff000000,0xff000000,0xff383838,0xff848484,0xff31140a,0xff612b17,0xff883d22,0xff963e21,0xff973c22,0xffffffff,0xffffffff,
+ 0xff8c8989,0xff8c8989,0xff8c8989,0xffffffff,0xffffffff,0xff271108,0xff5d2812,0xff8b3d1c,0xff4f2100,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff522300,0xffb14621,0xffb74b21,0xffb94b20,0xff81706a,0xff4a4a4a,0xff171717,0xff000000,0xff171717,0xff4a4a4a,0xff685e5b,0xff25110a,0xff4d2516,0xff6c3520,
+ 0xff723a25,0xff723b28,0xffddd4d1,0xffffffff,0xffbbbaba,0xff8c8989,0xffbbbaba,0xffffffff,0xffb3aaa6,0xff170b06,0xff3e1d11,0xff6a311d,0xff4d2100,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff994b27,0xff944827,0xff974426,0xff6f4839,0xff777777,0xff4a4a4a,0xff383838,0xff4a4a4a,0xff777777,
+ 0xff2c1f1b,0xff21120c,0xff3f2017,0xff542d1f,0xff5b3022,0xff563025,0xff826e68,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff3a2b24,0xff1b0c06,
+ 0xff492210,0xff813e1d,0xff4c2000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff803c27,0xff743823,0xff743a26,0xff5a2e1d,0xff4f392f,
+ 0xff6d6461,0xff848484,0xff6b5f5a,0xff39221a,0xff251008,0xff461d0f,0xff6c2e1a,0xff7e3b22,0xff864027,0xff8b3f26,0xff773620,0xff856256,0xffc7bbb6,0xffffffff,
+ 0xffb8aba6,0xff402c23,0xff150903,0xff2d1409,0xff532413,0xff7c341d,0xff4d2100,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xffbb4b20,
+ 0xffc35421,0xffc05020,0xffa7441b,0xff803415,0xff55250f,0xff3c1c0c,0xff2f1409,0xff2e150b,0xff381a10,0xff4b2517,0xff5b301e,0xff5b3022,0xff5c3123,0xff643223,
+ 0xff5e2f20,0xff4a2519,0xff2d1710,0xff170d09,0xff100906,0xff120a06,0xff1b0f09,0xff35180e,0xff4e2919,0xff603221,0xff4f2100,0x99000000,0x66000000,0x3d000000,
+ 0x1f000000,0x3d000000,0xff522300,0xffa94a22,0xffa84d25,0xffa04625,0xff903f20,0xff79371d,0xff6a2e19,0xff612715,0xff5d2614,0xff5d2919,0xff73311a,0xff8b371c,
+ 0xff963f20,0xff974325,0xff9b4423,0xffa34221,0xffa34220,0xff98431f,0xff77361b,0xff5c2a15,0xff4b2211,0xff4c200f,0xff582410,0xff742f15,0xff953c1b,0xffa2461f,
+ 0xff502200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff863f26,0xff8d3a22,0xff924226,0xff9c4b27,0xff994825,0xff8b4023,0xff7d3b23,
+ 0xff7a3b23,0xff853b1e,0xff843e22,0xff733924,0xff703a27,0xff6b3826,0xff6d3b27,0xff703826,0xff753c27,0xff6f3b26,0xff663624,0xff653521,0xff60331f,0xff61341e,
+ 0xff67351f,0xff77381f,0xff813d22,0xff8a4225,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff7f3d26,0xff864227,0xff8b4627,
+ 0xff924a27,0xff9b4726,0xff974623,0xff813c25,0xff6f3c27,0xff633726,0xff643827,0xff633827,0xff573326,0xff513126,0xff5c3326,0xff643223,0xff683827,0xff6b3a27,
+ 0xff673725,0xff623624,0xff673725,0xff6a3b24,0xff763c25,0xff7b3f28,0xff834129,0xff8d4427,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff522300,0xff8f4627,0xff864225,0xff863f22,0xff8f4025,0xff964225,0xff8f4426,0xff803f27,0xff7b3d27,0xff703b26,0xff663625,0xff663625,0xff643525,0xff5f3325,
+ 0xff613525,0xff643523,0xff693725,0xff6b3825,0xff6e3a25,0xff793b25,0xff844227,0xff8a4427,0xff8b4626,0xff844226,0xff884326,0xff8a4025,0xff522300,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xffa14723,0xff9c4625,0xff994222,0xff924023,0xffbb8c78,0xffe9dcd7,0xffffffff,0xffe0d5d1,0xff9d7669,
+ 0xff793821,0xff844124,0xff8c4226,0xff8b4328,0xff884628,0xff8f4627,0xff8f4627,0xff8f4427,0xff944627,0xff8b4427,0xff8d4227,0xff944426,0xff994626,0xff8f4226,
+ 0xff8f4226,0xff8f4225,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff964a27,0xff8d4627,0xff884627,0xffb18978,0xffffffff,
+ 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff836255,0xff6f331c,0xff904121,0xff964424,0xff924225,0xff964325,0xff944426,0xff76361e,0xff210f09,0xff000000,
+ 0xff231109,0xff7d3a1f,0xff9b4623,0xff964323,0xff924425,0xff914727,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff964626,
+ 0xff864027,0xff8b4326,0xffe8dbd6,0xffffffff,0xffbbbaba,0xff8c8989,0xffbbbaba,0xffffffff,0xffc8bcb6,0xff4d2110,0xff7c3518,0xff97411f,0xff964424,0xffa04622,
+ 0xffa04a25,0xff241109,0xff000000,0xff000000,0xff000000,0xff281208,0xffae5125,0xffae4d22,0xffab4721,0xffa64a25,0xff522300,0x99000000,0x66000000,0x3d000000,
+ 0x1f000000,0x3d000000,0xff522300,0xff6d3a27,0xff743d27,0xff8d4027,0xffffffff,0xffffffff,0xff8c8989,0xff8c8989,0xff8c8989,0xffffffff,0xffffffff,0xff271109,
+ 0xff4e2515,0xff723921,0xff7b3d25,0xff7f3f26,0xff844026,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff863f27,0xff864627,0xff864025,0xff7d3f27,
+ 0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xffa34423,0xff9e4625,0xffa84a23,0xffe8d8d0,0xffffffff,0xffbbbaba,0xff8c8989,
+ 0xffbbbaba,0xffffffff,0xffb7aba6,0xff190c06,0xff3e1d11,0xff69321d,0xff833f24,0xff974826,0xff9b4a26,0xff271209,0xff000000,0xff000000,0xff000000,0xff291309,
+ 0xffa14a26,0xffa84823,0xffa84823,0xffa44723,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xffa94a21,0xffa44825,0xffa84a25,
+ 0xffae7e68,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff3f2c23,0xff1e0e06,0xff4c2410,0xff833f1d,0xffa34d23,0xffaf5326,0xffaf5326,0xff91451f,
+ 0xff2a1408,0xff000000,0xff291309,0xff91451f,0xffaf5326,0xffaf5326,0xffac5326,0xffac5326,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff522300,0xffb85121,0xffb85021,0xffb45023,0xff95401e,0xff906654,0xffc8bbb6,0xffffffff,0xffb7aba6,0xff3b2b24,0xff120804,0xff2b1409,0xff592913,0xff88401f,
+ 0xffa74a21,0xffb95021,0xffaf5025,0xffa84d26,0xffa65027,0xffa95327,0xffa04d27,0xffa85127,0xffac5126,0xffa84a23,0xffb25023,0xffa84a25,0xff522300,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xffb85322,0xffb75323,0xffb85725,0xffae5122,0xff89401b,0xff532710,0xff2a140a,0xff210e05,0xff220f05,
+ 0xff301708,0xff4d230e,0xff793717,0xff99451e,0xffa84b23,0xffa64e27,0xff974a27,0xff944728,0xff9c4d27,0xffa34a25,0xffa14825,0xffa64b25,0xffa04625,0xffa14722,
+ 0xff9e4826,0xffa04a26,0xff522300,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff522300,0xffc55721,0xffc85b21,0xffc55721,0xffc15520,0xffb2501d,
+ 0xff944419,0xff713413,0xff5d2a0f,0xff59280e,0xff662e10,0xff7c3716,0xff9a441b,0xffb04e1e,0xffb85221,0xffb55325,0xffaf5026,0xffaf4e27,0xffae5026,0xffa85025,
+ 0xffac5326,0xffaf5326,0xffaf5325,0xffac5326,0xffac5326,0xffac5326,0xff522300,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff522300,0xff9b4826,
+ 0xffaf4a21,0xffb44d22,0xffbc5623,0xffb95421,0xffb54f1e,0xffa6491c,0xff9c4519,0xff964219,0xff9c421a,0xffa1471c,0xffae4d1e,0xffb34c20,0xffac4822,0xff9e4426,
+ 0xff974427,0xff964627,0xff9e4627,0xffa04627,0xff9b4327,0xffa64a26,0xff9e4427,0xffa64b25,0xffaf5125,0xffae5025,0xff522300,0x87000000,0x5a000000,0x36000000,
+ 0x17000000,0x2e000000,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff502200,0xff4f2100,0xff4d2100,0xff4c2000,0xff4d2100,0xff4f2100,
+ 0xff502200,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,
+ 0xff522300,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
+ 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,
+ 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
+ 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
+ 0x18000000,0xf000000
+};
+
+static const QRgb MineHunt_data[] = {
+ 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
+ 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
+ 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff010114,0xff010009,0xff010008,0xff000008,
+ 0xff050340,0xff05033f,0xff050349,0xff06034f,0xff070465,0xff06045d,0xff050346,0xff03022c,0xff020119,0xff020119,0xff02011e,0xff040237,0xff050346,0xff05033f,
+ 0xff040237,0xff03022a,0xff03022b,0xff030225,0xff02011f,0xff04022b,0xff03021f,0xff07033b,0xff080224,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
+ 0xff01010c,0xff0c0b0c,0xff060606,0xff393939,0xff676b68,0xff808481,0xff848684,0xff8e9392,0xff969997,0xff868b8c,0xff616262,0xff3f3e3e,0xff2f2f2f,0xff2d2d2d,
+ 0xff3a3a3a,0xff6c6968,0xff7f7b7a,0xff72736e,0xff646464,0xff474848,0xff292a2c,0xff1b2121,0xff141313,0xff0c0a09,0xff181413,0xffd35555,0xff030112,0x5c000000,
+ 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff030223,0xff2e3032,0xff414343,0xffb5b5b5,0xffefefef,0xffd8d7d7,0xffc3c4c3,0xff9a9d9b,0xff848684,0xff757877,
+ 0xff5f6160,0xff4e5150,0xff454747,0xff3f4446,0xff3d3c3e,0xff5f605f,0xff6d6c69,0xff62625f,0xff4e4e4e,0xff2d2d30,0xff1e2022,0xff111111,0xff000000,0xff161617,
+ 0xffbc706e,0xff9e5c5c,0xff020119,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff050344,0xff747677,0xff8c8988,0xfff7f7f8,0xffe4e4e4,0xffd1d0d0,
+ 0xffb4b7b6,0xff8d9190,0xff727374,0xff707370,0xff606262,0xff535453,0xff494c4c,0xff424445,0xff434245,0xff4b4b4b,0xff4d4d4d,0xff404043,0xff29282a,0xff1e1e1e,
+ 0xff0a0a0a,0xff000000,0xff353536,0xffb19696,0xffa78686,0xff966f6e,0xff030121,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff05034a,0xff808484,
+ 0xff8e8e8b,0xff878784,0xffe5e4e5,0xffcccbcb,0xff9da6a6,0xff696f6b,0xff4b4d4d,0xff656967,0xff636563,0xff5b5d60,0xff515356,0xff4c4f51,0xff4a4c4c,0xff444849,
+ 0xff27292c,0xff252427,0xff171e1c,0xff060606,0xff010101,0xff2d2f2d,0xffb0acac,0xffa19696,0xffa38282,0xff966564,0xff020117,0x93000000,0x62000000,0x3b000000,
+ 0x1f000000,0x3d000000,0xff06034f,0xff909291,0xff72726f,0xff6b6a68,0xff484a46,0xffc4c7c6,0xff6f7270,0xff403f3f,0xff272727,0xff525455,0xff5b5d5d,0xff5d5f60,
+ 0xff575a59,0xff616262,0xff757775,0xff727472,0xff2c2e2e,0xff161a19,0xff111111,0xff020202,0xff1d1c1e,0xff050505,0xff121212,0xff9a7f7f,0xffbd7271,0xff9e4e4e,
+ 0xff01000a,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff050349,0xff8f9190,0xff555656,0xff464948,0xff323335,0xff636564,0xff343333,0xff232622,
+ 0xff272626,0xff4c4f51,0xff4e5052,0xff656865,0xff999999,0xffaaaaaa,0xff999e9d,0xff8d8f8d,0xff767878,0xff121111,0xff000000,0xff212727,0xff232324,0xff5f5c5c,
+ 0xffb78e8e,0xffc57474,0xffde6161,0xffa63e3e,0xff010003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff02011e,0xff7f8282,0xff5c5f5f,0xff39383a,
+ 0xff303334,0xff282928,0xff1f1f1f,0xff212121,0xff393838,0xff444749,0xff45474a,0xffa3a8a7,0xffababab,0xffa2a2a2,0xff939292,0xff818384,0xff747777,0xff535758,
+ 0xff2c2e31,0xff2f2f30,0xff5b5a5a,0xffbe8d8e,0xffcb7271,0xffe15f5f,0xfff25656,0xffa83737,0xff010003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff010110,0xff686a69,0xff727574,0xff4e4f4f,0xff252525,0xff151817,0xff1b1a1a,0xff383838,0xff46484a,0xff424445,0xff545856,0xffa8a7a7,0xff9e9e9e,0xff939896,
+ 0xff8e8a89,0xff787b7c,0xff636464,0xff545756,0xff3a3a3e,0xff29292a,0xff8c7775,0xffd17070,0xffe65e5e,0xfff45555,0xfffa5252,0xffa83737,0xff010003,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff01010c,0xff535758,0xff606363,0xff6a6d6b,0xff626565,0xff565857,0xff4b4e51,0xff454748,0xff454547,0xff434747,
+ 0xff505350,0xff9a9695,0xff8a8886,0xff7d8180,0xff747877,0xff5d6061,0xff454746,0xff3f3e3e,0xff373939,0xff292e30,0xffc57a7a,0xffe6605f,0xfff55555,0xfffa5252,
+ 0xfffa5252,0xffa83737,0xff010003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff020119,0xff484a4c,0xff4f5453,0xff5d6263,0xff616361,0xff545758,
+ 0xff4c4d50,0xff494c4e,0xff494d4c,0xff4c4e4e,0xff4b504f,0xff787777,0xff727675,0xff626663,0xff535353,0xff3d3c3c,0xff272a2a,0xff222323,0xff202121,0xff1e211d,
+ 0xffa77878,0xffe46160,0xfff55555,0xfffa5252,0xfffa5252,0xffa83737,0xff010003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff020123,0xff3f4445,
+ 0xff494c4e,0xff575a5b,0xff5f6164,0xff686a68,0xff606161,0xff535758,0xff535556,0xff535556,0xff535558,0xff535658,0xff595c59,0xff434548,0xff313533,0xff202121,
+ 0xff1e231e,0xff201f1f,0xff171b19,0xff262727,0xff585758,0xffce6e6e,0xffe85b5b,0xfff75353,0xfffa5252,0xffa83737,0xff010003,0x99000000,0x66000000,0x3d000000,
+ 0x1f000000,0x3d000000,0xff020122,0xff434344,0xff45494a,0xff646565,0xff908e8d,0xff8c8b87,0xff7e7d7e,0xff6d6c6c,0xff545958,0xff505454,0xff535556,0xff4f5253,
+ 0xff444949,0xff383737,0xff2c2d2f,0xff2a2d2d,0xff302f32,0xff2b3030,0xff2b2c2f,0xffb4a4a5,0xffa98f8e,0xffbb7676,0xffd96161,0xfff15655,0xfffa5252,0xffa83737,
+ 0xff010003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff020123,0xff424244,0xff525151,0xff959595,0xff929190,0xff848481,0xff6e6e6e,0xff5c5e5e,
+ 0xff4f5352,0xff484c4e,0xff4b4e4f,0xff4f5050,0xff46494b,0xff3f4343,0xff37393a,0xff343639,0xff303335,0xff343334,0xff131212,0xff70615e,0xffbc7e7e,0xffc46f6f,
+ 0xffd9605f,0xfff05757,0xfff95253,0xffa83737,0xff010003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff030225,0xff434648,0xff747373,0xff8a8a86,
+ 0xff898985,0xff7d7b79,0xff616464,0xff474b49,0xff363836,0xff38383d,0xff444645,0xff444748,0xff454848,0xff474a4c,0xff3f4345,0xff303033,0xff353839,0xff222223,
+ 0xff000000,0xff000000,0xffcf6161,0xffe65d5c,0xffee5758,0xfff65353,0xfff95252,0xffa83737,0xff010003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff020224,0xff464a4a,0xff777676,0xff7a7a7a,0xff777777,0xff696c6c,0xff4e5051,0xff313333,0xff212020,0xff202322,0xff333837,0xff474b4c,0xff989693,0xff9da2a1,
+ 0xff343335,0xff151a1a,0xff3d3c3d,0xffde6a69,0xffcb5b5a,0xff9b4e4e,0xffac4e4c,0xfffa5252,0xfff95252,0xfffa5252,0xfffa5252,0xffa83737,0xff010003,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff040234,0xff424447,0xff525252,0xff696a6a,0xff626364,0xff535654,0xff363939,0xff1a1c1c,0xff191818,0xff28292b,
+ 0xff4a4a49,0xffa4a3a4,0xff989898,0xff949393,0xff8d9191,0xff0b0d0e,0xff5e4c4c,0xffdb6c6c,0xffeb5b5b,0xfffa5252,0xfffa5252,0xfffa5252,0xfffa5252,0xfffa5252,
+ 0xfffa5252,0xffa83737,0xff010003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff030229,0xff444444,0xff3d4243,0xff575957,0xff505151,0xff403f42,
+ 0xff242323,0xff181818,0xff222222,0xff323335,0xff999594,0xff969596,0xff8d908b,0xff878987,0xff808487,0xff5e6262,0xff222122,0xffbd7d7c,0xffd66464,0xfff15656,
+ 0xfffa5252,0xfffa5252,0xfffa5252,0xfffa5252,0xfffa5252,0xffa83737,0xff010003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff020115,0xff2b2e2e,
+ 0xff373939,0xff414647,0xff464848,0xff313332,0xff191919,0xff191919,0xff2a292b,0xff535252,0xff909391,0xff888b89,0xff818383,0xff7f8282,0xff696b6a,0xff484a4a,
+ 0xff3b3e3d,0xffa78585,0xffc46b6b,0xffea5959,0xfff95252,0xfffa5252,0xfffa5252,0xfffa5252,0xfffa5252,0xffa83737,0xff010003,0x99000000,0x66000000,0x3d000000,
+ 0x1f000000,0x3d000000,0xff010111,0xff353836,0xff29292a,0xff2d3334,0xff383b3d,0xff2a2929,0xff111111,0xff1c1f1f,0xff1b2121,0xff3e4144,0xff717678,0xff7e807f,
+ 0xff747876,0xff666767,0xff4d5050,0xff3a3939,0xff202120,0xff8e807e,0xffb97171,0xffe25a5a,0xfff85353,0xfffa5252,0xfffa5252,0xfffa5252,0xfffa5252,0xffa83737,
+ 0xff010003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff060452,0xff74716f,0xff010101,0xff5e4b4b,0xffb67373,0xff1b1a1c,0xff222222,0xffada1a1,
+ 0xffaa9898,0xffbd8282,0xffa05e5d,0xff222426,0xff575858,0xff4a4d4d,0xff3a3c41,0xff2d2c2d,0xff1a1d1d,0xff6a6a6a,0xffad7373,0xffda5e5d,0xfff55353,0xfffa5252,
+ 0xfffa5252,0xfffa5252,0xfffa5252,0xffa83737,0xff010003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff060454,0xff716c6c,0xff2b2b2b,0xffdb6d6d,
+ 0xffef5a5a,0xff353535,0xff98706d,0xffa88b8b,0xffaa8383,0xffc96f6f,0xffe55f5f,0xffa15a57,0xff655050,0xff636363,0xff303130,0xff272828,0xff1a1b1b,0xff4c4c4c,
+ 0xffa67676,0xffd06161,0xfff15555,0xfffa5252,0xfffa5252,0xfffa5252,0xfffa5252,0xffa83737,0xff010003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff070451,0xffbe8989,0xffd76868,0xffea5b5b,0xfff75353,0xffef5757,0xffd26969,0xffb57676,0xffbd7171,0xffdb6161,0xfff25656,0xfff25656,0xffe15f5f,0xffcb6c6c,
+ 0xff947573,0xff414141,0xff1b1a1a,0xff323533,0xff9f7b7b,0xffc46565,0xffeb5757,0xfffa5252,0xfffa5252,0xfffa5252,0xfffa5252,0xffa83737,0xff010003,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff080454,0xffe08181,0xffef5857,0xfff85353,0xfffa5252,0xfff75454,0xffe45c5c,0xffd06363,0xffd76161,0xffed5858,
+ 0xfffa5252,0xfffa5252,0xfff55555,0xffe75a5a,0xffd56262,0xffbf6e6e,0xff736a6a,0xff262c2c,0xff9b7979,0xffbb6868,0xffe55959,0xfff85252,0xfffa5252,0xfffa5252,
+ 0xfffa5252,0xffa83737,0xff010003,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff09045b,0xfff68080,0xfffa5252,0xfffa5252,0xfffa5252,0xfffa5252,
+ 0xfff45454,0xffec5857,0xffef5656,0xfff75353,0xfffa5252,0xfffa5252,0xfffa5252,0xfff85353,0xfff15555,0xffe25b5b,0xffcd6464,0xffb56d6d,0xffa8706e,0xffbb6868,
+ 0xffe15a5a,0xfff75353,0xfffa5252,0xfffa5252,0xfffa5252,0xffa83737,0xff010003,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff0a034c,0xffec4d4d,
+ 0xffa83737,0xffa83737,0xffa83737,0xffa83737,0xffa83737,0xffa73838,0xffa83838,0xffa83737,0xffa83737,0xffa83737,0xffa83737,0xffa83737,0xffa83737,0xffa73939,
+ 0xffa43f3f,0xff9d4947,0xff985151,0xff994f4f,0xffa24141,0xffa83938,0xffa83737,0xffa83737,0xffa83737,0xff672222,0xff000000,0x87000000,0x5a000000,0x36000000,
+ 0x17000000,0x2e000000,0xff080224,0xff03010d,0xff010003,0xff010003,0xff010003,0xff010003,0xff010003,0xff010003,0xff010003,0xff010003,0xff010003,0xff010003,
+ 0xff010003,0xff010003,0xff010003,0xff010003,0xff010003,0xff010006,0xff01000a,0xff01000b,0xff010006,0xff010003,0xff010003,0xff010003,0xff010003,0xff000000,
+ 0xff000000,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
+ 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,
+ 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
+ 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
+ 0x18000000,0xf000000
+};
+
+static const QRgb NetHack_data[] = {
+ 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
+ 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
+ 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff521e00,0xff521b00,0xff521800,0xff521800,
+ 0xff541a00,0xff561a00,0xff571c00,0xff581c00,0xff5b1d00,0xff5c1f00,0xff5f2000,0xff602100,0xff632300,0xff662400,0xff682600,0xff6a2700,0xff6c2900,0xff6f2a00,
+ 0xff722d00,0xff752e00,0xff772f00,0xff793100,0xff7c3200,0xff7a3200,0xff6e2f00,0xff5c2200,0xff4d1200,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
+ 0xff521b00,0xfffdadad,0xfffa8585,0xfff67d7d,0xfff47a7a,0xfff37a7a,0xfff37a7a,0xfff37a7a,0xfff37a7a,0xfff37a7a,0xfff37a7a,0xfff37a7a,0xfff37a7a,0xfff37a7a,
+ 0xfff37a7a,0xfff37a7a,0xfff37a7a,0xfff37a7a,0xfff37a7a,0xfff37a7a,0xfff37a7a,0xfff37a7a,0xfff27a7a,0xffe97778,0xffc76e6f,0xff924848,0xff2b1200,0x5c000000,
+ 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff511800,0xfffa8584,0xffee4242,0xffdd2e2e,0xffd12828,0xffce2727,0xffcd2727,0xffcd2727,0xffcd2727,0xffcd2727,
+ 0xffcd2727,0xffcd2727,0xffcd2727,0xffcd2727,0xffcd2727,0xffcd2727,0xffcd2727,0xffcd2727,0xffcd2727,0xffcd2727,0xffcd2727,0xffce2727,0xffce2727,0xffc92727,
+ 0xffaa2727,0xff5b2424,0xff110900,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff521800,0xfff67d7d,0xffdd2e2e,0xffaf1313,0xff930b0b,0xff8b0a0a,
+ 0xff8a0a0a,0xff8a0a0a,0xff8a0a0a,0xff8a0a0a,0xff8a0a0a,0xff8a0a0a,0xff8a0a0a,0xff8a0a0a,0xff8a0a0a,0xff8a0a0a,0xff8a0a0a,0xff8a0a0a,0xff8a0a0a,0xff8a0a0a,
+ 0xff8a0a0a,0xff8a0a0a,0xff8e0a0a,0xff940a0a,0xff8a0a0a,0xff430909,0xff070200,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff531a00,0xfff47a7a,
+ 0xffd12828,0xff930b0b,0xff6a0202,0xff600101,0xff5e0101,0xff5e0101,0xff5e0101,0xff5e0101,0xff5e0101,0xff5e0101,0xff5e0101,0xff5e0101,0xff5e0101,0xff5e0101,
+ 0xff5e0101,0xff5e0101,0xff5e0101,0xff5e0101,0xff5e0101,0xff5f0101,0xff640101,0xff730101,0xff780101,0xff3b0101,0xff040000,0x93000000,0x62000000,0x3b000000,
+ 0x1f000000,0x3d000000,0xff551a00,0xfff37a7a,0xffce2727,0xff8b0a0a,0xff600101,0xffd8bd8c,0xffdfc693,0xffdec591,0xffdcc28b,0xffdbbf86,0xffd9ba7d,0xffd7b775,
+ 0xffd4b36b,0xffd2ae61,0xffcea855,0xffcba146,0xffc79a39,0xffc49328,0xffbf8a17,0xffb98105,0xffb07802,0xff722a00,0xff580000,0xff690000,0xff730000,0xff390000,
+ 0xff030000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff561b00,0xfff37a7a,0xffcd2727,0xff8a0a0a,0xff5e0101,0xffe0c996,0xffe6d09a,0xffe5cd96,
+ 0xffe3cb92,0xffe2c88b,0xffe0c482,0xffddc079,0xffdabb6e,0xffd8b462,0xffd4af54,0xffd1a845,0xffcc9f34,0xffc7961f,0xffc28c0c,0xffb98405,0xffaf7d02,0xff722c00,
+ 0xff560000,0xff680000,0xff720000,0xff390000,0xff030000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff581c00,0xfff37a7a,0xffcd2727,0xff8a0a0a,
+ 0xff5e0101,0xffdbc390,0xffe1cb96,0xffe2ca94,0xffdfc88d,0xffdec486,0xffdcc07d,0xffd9bb73,0xffd6b667,0xffd3b05a,0xffcfa94b,0xffcba13a,0xffc69827,0xffc08e13,
+ 0xffb98509,0xffaf7e05,0xffa37402,0xff6d2900,0xff560000,0xff680000,0xff720000,0xff390000,0xff040000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff5a1d00,0xfff37a7a,0xffcd2727,0xff8a0a0a,0xff5e0101,0xffd6be8c,0xffdcc691,0xffdbc58e,0xffdac288,0xffd8be7f,0xffd7bb77,0xffd4b66c,0xffd0af5e,0xffcda951,
+ 0xffc9a241,0xffc5982e,0xffbe901a,0xffb8860d,0xffae7e09,0xffa47605,0xff9a6c02,0xff6a2700,0xff560000,0xff680000,0xff720000,0xff390000,0xff040000,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff5b1e00,0xfff37a7a,0xffcd2727,0xff8a0a0a,0xff5e0101,0xffd1b884,0xffd7c089,0xffd6bf86,0xffd4bb7f,0xffd3b878,
+ 0xffcfb46d,0xffcdad62,0xffc87843,0xffc57138,0xffc29836,0xffbd9022,0xffb88711,0xffad7e0c,0xffa37708,0xff986e05,0xff8f6502,0xff672400,0xff560000,0xff680000,
+ 0xff720000,0xff390000,0xff040000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff5d2000,0xfff37a7a,0xffcd2727,0xff8a0a0a,0xff5e0101,0xffccb17d,
+ 0xffd1ba81,0xffd0b87e,0xffceb576,0xffcbb16e,0xffc9ac64,0xffc57d48,0xffbf2923,0xffbb231e,0xffb96723,0xffb58615,0xffac7f11,0xffa2760c,0xff996e08,0xff8e6605,
+ 0xff865e02,0xff632200,0xff560000,0xff670000,0xff710000,0xff390000,0xff040000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff602100,0xfff37a7a,
+ 0xffcd2727,0xff8a0a0a,0xff5e0101,0xffc5ac76,0xffcab279,0xffc8b072,0xffc7ad6c,0xffc5a863,0xffc17c49,0xffbb2d26,0xffb81f1f,0xffb31c1c,0xffae1e18,0xffa95915,
+ 0xffa17610,0xff976e0c,0xff8e6708,0xff845f04,0xff7c5702,0xff622300,0xff550000,0xff650000,0xff6f0000,0xff390000,0xff040000,0x99000000,0x66000000,0x3d000000,
+ 0x1f000000,0x3d000000,0xff622200,0xfff37a7a,0xffcd2727,0xff8a0a0a,0xff5e0101,0xffc0a56d,0xffc2ab6f,0xffc1a76a,0xffc0a461,0xffbc7b49,0xffb7312b,0xffb32323,
+ 0xffb01f1f,0xffab1b1b,0xffa51818,0xff9c1b14,0xff954d10,0xff8d670b,0xff846008,0xff7c5904,0xff755302,0xff642e00,0xff540000,0xff630000,0xff6b0000,0xff380000,
+ 0xff030000,0x9a000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff652400,0xfff37a7a,0xffcd2727,0xff8a0a0a,0xff5e0101,0xffb99f65,0xffbca265,0xffbba05e,
+ 0xffb77848,0xffb2322d,0xffaf2626,0xffac2222,0xffa81e1e,0xffa31a1a,0xff9a1717,0xff921313,0xff8a140f,0xff84420b,0xff7b5908,0xff745204,0xff6c4d02,0xff5d2300,
+ 0xff540000,0xff630000,0xff6b0000,0xff380000,0xff030000,0x9a000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff662400,0xfff37a7a,0xffcd2727,0xff8a0a0a,
+ 0xff5e0101,0xffb3985c,0xffb59b5b,0xffb27647,0xffae332e,0xffab2828,0xffa82525,0xffa42121,0xffa01e1e,0xff981a1a,0xff911616,0xff881212,0xff800f0f,0xff780f0b,
+ 0xff723807,0xff6c4d04,0xff664802,0xff591c00,0xff550000,0xff650000,0xff6f0000,0xff390000,0xff040000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff692600,0xfff37a7a,0xffcd2727,0xff8a0a0a,0xff5e0101,0xffad9154,0xffae7447,0xffa93631,0xffa62b2b,0xffa32727,0xffa12424,0xff9c2020,0xff951e1c,0xff8d1a19,
+ 0xff861616,0xff7f1212,0xff780e0e,0xff700a0a,0xff690c07,0xff642f04,0xff5f4302,0xff581b00,0xff560000,0xff670000,0xff720000,0xff390000,0xff040000,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff6b2800,0xfff37a7a,0xffce2727,0xff8b0a0a,0xff5f0101,0xffa48446,0xffa43831,0xffa22d2d,0xff9f2a2a,0xff9c2626,
+ 0xff972323,0xff91211f,0xff8c471c,0xff854618,0xff7c1715,0xff761211,0xff6f0e0e,0xff690a0a,0xff620707,0xff5b0904,0xff5a3e02,0xff541200,0xff570000,0xff690000,
+ 0xff730000,0xff3a0000,0xff040000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff6e2a00,0xfff47a7a,0xffd02727,0xff900a0a,0xff620101,0xff8b5929,
+ 0xff9d2e2e,0xff9b2c2c,0xff982929,0xff922525,0xff8d2222,0xff88461e,0xff83651b,0xff7c5e18,0xff753d14,0xff6d1211,0xff670e0e,0xff600a0a,0xff5b0707,0xff560404,
+ 0xff563402,0xff510300,0xff580000,0xff6d0000,0xff770000,0xff3b0000,0xff040000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff712b00,0xfff57b7a,
+ 0xffd82727,0xff9d0a0a,0xff6c0101,0xff621308,0xff8f3526,0xff922b2b,0xff8d2828,0xff882724,0xff844821,0xff80631d,0xff7a5e1a,0xff735817,0xff6d5314,0xff663610,
+ 0xff5f100d,0xff590909,0xff550707,0xff520604,0xff521901,0xff520000,0xff5c0000,0xff760000,0xff800000,0xff3c0000,0xff040000,0x99000000,0x66000000,0x3d000000,
+ 0x1f000000,0x3d000000,0xff732d00,0xfff87c7c,0xffe22727,0xffb20a0a,0xff7f0101,0xff5f0000,0xff621709,0xff853123,0xff842827,0xff814823,0xff7c6120,0xff775c1c,
+ 0xff715719,0xff6b5216,0xff664d13,0xff604810,0xff5a2e0d,0xff540b09,0xff500806,0xff511202,0xff510000,0xff550000,0xff680000,0xff870000,0xff8c0000,0xff3f0000,
+ 0xff040000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff752e00,0xfffa7d7d,0xffed2727,0xffcd0a0a,0xff9d0101,0xff730000,0xff5c0000,0xff5b0d05,
+ 0xff79401b,0xff7b6021,0xff765c1f,0xff70581c,0xff6b5318,0xff664e15,0xff614a13,0xff5b450f,0xff57410c,0xff532909,0xff521303,0xff510000,0xff540000,0xff610000,
+ 0xff7d0000,0xffa00000,0xff980000,0xff400000,0xff040000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff782f00,0xfffc7d7d,0xfff62727,0xffe40a0a,
+ 0xffc10101,0xff960000,0xff720000,0xff5d0000,0xff540000,0xff693110,0xff71521b,0xff6d541b,0xff685018,0xff624c16,0xff5e4812,0xff59430e,0xff583209,0xff541403,
+ 0xff510000,0xff550000,0xff600000,0xff790000,0xffa10000,0xffbd0000,0xffa20000,0xff410000,0xff040000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff7a3100,0xfffb7d7d,0xfff72727,0xfff10a0a,0xffde0101,0xffbe0000,0xff980000,0xff760000,0xff600000,0xff550000,0xff591006,0xff663710,0xff6d5416,0xff664e14,
+ 0xff5d370d,0xff571d06,0xff500000,0xff510000,0xff560000,0xff620000,0xff7a0000,0xffa00000,0xffc60000,0xffd20000,0xffa80000,0xff410000,0xff040000,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff783100,0xfff07a7a,0xffe92727,0xffe50a0a,0xffdf0101,0xffd00000,0xffb60000,0xff960000,0xff780000,0xff610000,
+ 0xff540000,0xff4d0000,0xff6c4700,0xff684400,0xff4b0000,0xff4c0000,0xff4e0000,0xff560000,0xff630000,0xff7a0000,0xff990000,0xffbb0000,0xffd20000,0xffd00000,
+ 0xff9f0000,0xff3e0000,0xff040000,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff6d2e00,0xffcb6f71,0xffba2727,0xffb00a0a,0xffac0101,0xffa80000,
+ 0xffa00000,0xff900000,0xff7c0000,0xff650000,0xff520000,0xff460000,0xff3e0000,0xff3c0000,0xff3c0000,0xff410000,0xff480000,0xff550000,0xff670000,0xff7d0000,
+ 0xff920000,0xffa10000,0xffa80000,0xff9f0000,0xff790000,0xff330000,0xff040000,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff5a2100,0xff934848,
+ 0xff5e2424,0xff490909,0xff430101,0xff420000,0xff410000,0xff3f0000,0xff3b0000,0xff340000,0xff2d0000,0xff250000,0xff200000,0xff1d0000,0xff1e0000,0xff220000,
+ 0xff270000,0xff2e0000,0xff350000,0xff3b0000,0xff3f0000,0xff410000,0xff410000,0xff3e0000,0xff320000,0xff190000,0xff000000,0x87000000,0x5a000000,0x36000000,
+ 0x17000000,0x2e000000,0xff4c1100,0xff2a1200,0xff110900,0xff070200,0xff040000,0xff030000,0xff030000,0xff040000,0xff040000,0xff030000,0xff030000,0xff030000,
+ 0xff030000,0xff030000,0xff030000,0xff030000,0xff030000,0xff030000,0xff030000,0xff040000,0xff040000,0xff040000,0xff040000,0xff040000,0xff040000,0xff000000,
+ 0xff000000,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
+ 0x9a000000,0x9b020000,0x9f030200,0xa4050200,0xab090300,0xb00a0400,0xaf0a0400,0xa9080500,0xa2050200,0x9d020000,0x9b020200,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
+ 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x67020000,0x67000000,0x69020000,0x6c050200,0x6e070200,0x6d050200,0x6b050200,0x68000000,0x67020000,
+ 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
+ 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3e000000,0x3e000000,
+ 0x3e000000,0x3e000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
+ 0x18000000,0xf000000
+};
+
+static const QRgb OKButton_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0x3edcdcdc,0x93dbdbdb,0xd5dfdfdf,0xfededede,0xf8d9d9d9,0xeedcdcdc,0xe1d8d8d8,0xdcdadada,0xe1dadada,0xe6dbdbdb,
+ 0xecdddddd,0xf1dcdcdc,0xf6dcdcdc,0xfbdddddd,0xfedddddd,0xffdedede,0xffdddddd,0xd9d2d2d2,0xa1c8c8c8,0x519e9e9e,0xc000000,0x3000000,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0x5fdcdcdc,0xdbe3e3e3,0xffe2e2e2,0xffd3d3d3,0xffcecece,0xffcccccc,0xffd5d5d5,0xffd0d0d0,0xffcdcdcd,0xffcecece,0xffcecece,
+ 0xffcdcdcd,0xffcccccc,0xffcdcdcd,0xffcecece,0xffd1d1d1,0xffd2d2d2,0xffd3d3d3,0xffd4d4d4,0xffdcdcdc,0xe7c7c7c7,0x848e8e8e,0x18000000,0x4000000,0xffffff,
+ 0xffffff,0xffffff,0x3edddcdc,0xdbdadada,0xffd8d8d8,0xffcac9c9,0xffc6c6c6,0xffc2c1c2,0xffc4c3c4,0xffa6a6a6,0xff414141,0xff424242,0xff676767,0xffc4c4c4,
+ 0xffa4a4a4,0xff424242,0xffa6a5a6,0xffcbcacb,0xff8a898a,0xffb3b2b3,0xffd6d5d6,0xffd6d5d6,0xffd3d3d3,0xffc5c6c5,0xeda2a1a2,0x765a5a5a,0x18000000,0x3000000,
+ 0xffffff,0xffffff,0x93d4d5d4,0xffd1d0d0,0xffbcbcbc,0xffbab9b9,0xffbdbdbd,0xffbcbcbc,0xffbbbaba,0xff000000,0xff6d6e6d,0xffbdbdbd,0xff000000,0xff727272,
+ 0xff929292,0xff000000,0xff979797,0xff7b7b7b,0xff272727,0xffb1b1b1,0xffd1d1d1,0xffd1d1d1,0xffd0d0d0,0xffc7c8c7,0xffb3b2b2,0xc9626262,0x3d000000,0xc000000,
+ 0xffffff,0xffffff,0xd5cbcbcb,0xffb8b8b8,0xffa7a7a7,0xffaeaeae,0xffa9a8a8,0xffb1b1b1,0xffa6a6a6,0xff000000,0xff686868,0xffb6b6b6,0xff000000,0xff686868,
+ 0xff868686,0xff000000,0xff595959,0xff252525,0xff9d9d9d,0xffc4c4c4,0xffc0c0c0,0xffbcbcbc,0xffc6c6c6,0xffc5c5c5,0xffbbbbbb,0xf0666666,0x61000000,0x1a000000,
+ 0xffffff,0xffffff,0xfabebebe,0xffa4a4a4,0xff979797,0xffa8a8a8,0xffa0a0a0,0xff9b9b9b,0xffa1a1a1,0xff000000,0xff636363,0xffa4a4a4,0xff000000,0xff5f5f5f,
+ 0xff7a7a7a,0xff000000,0xff000000,0xff9f9f9f,0xffbbbbbb,0xffadadad,0xffa7a7a7,0xffb2b2b2,0xffbcbcbc,0xffc2c2c2,0xffadadad,0xfd626262,0x7c000000,0x25000000,
+ 0xffffff,0xffffff,0xd8adadad,0xff989898,0xff959595,0xff8b8b8b,0xff939393,0xff9a9a9a,0xff939393,0xff000000,0xff585858,0xff979797,0xff000000,0xff5b5b5b,
+ 0xff757575,0xff000000,0xff2b2b2b,0xff2f2f2f,0xffa9a9a9,0xffb3b3b3,0xffadadad,0xffadadad,0xffb8b8b8,0xffb4b4b4,0xff959595,0xf24a4a4a,0x85000000,0x2b000000,
+ 0xffffff,0xffffff,0x9e919191,0xff949493,0xff868787,0xff8c8c8c,0xff818181,0xff888887,0xff8a8a8a,0xff000000,0xff545654,0xff848384,0xff000000,0xff4f4f4f,
+ 0xff676766,0xff000000,0xff737372,0xff4e4e4d,0xff3c3c3c,0xff9e9e9e,0xffaeaeae,0xffb2b2b2,0xffacacac,0xffa5a6a5,0xff706f70,0xdf373737,0x7c000000,0x25000000,
+ 0xffffff,0xffffff,0x506d6d6d,0xe67b7b7b,0xff7d7d7d,0xff7a7a7a,0xff777878,0xff777777,0xff7d7e7d,0xff484848,0xff161616,0xff292929,0xff1e1f1f,0xff6a6b6b,
+ 0xff5c5c5c,0xff000000,0xff616161,0xff838383,0xff484848,0xff7e7e7e,0xffa5a5a5,0xffa6a7a6,0xff979797,0xff787778,0xf5434343,0xbb1a1a1a,0x61000000,0x1a000000,
+ 0xffffff,0xffffff,0xc000000,0x834d4d4d,0xec595959,0xff5e5d5d,0xff656564,0xff696969,0xff696869,0xff6b6a6b,0xff6a6a69,0xff666665,0xff646463,0xff656564,
+ 0xff666666,0xff686868,0xff6c6c6c,0xff727272,0xff7a7a7a,0xff828282,0xff818181,0xff787778,0xff656465,0xf5424241,0xce222222,0x83000000,0x3d000000,0xc000000,
+ 0xffffff,0xffffff,0x3000000,0x18000000,0x752d2d2d,0xc8353535,0xef363636,0xff3e3e3e,0xfd373737,0xfa353535,0xf5333333,0xf3313131,0xf5353535,0xf7353535,
+ 0xf9373737,0xfa383838,0xfc3c3c3c,0xfe3d3d3d,0xff424242,0xff454545,0xff454545,0xf3383838,0xdf2a2a2a,0xbb161616,0x83000000,0x4b000000,0x18000000,0x3000000,
+ 0xffffff,0xffffff,0xffffff,0x4000000,0x18000000,0x3d000000,0x61000000,0x7c000000,0x8a000000,0x8b000000,0x87000000,0x82000000,0x81000000,0x82000000,
+ 0x84000000,0x87000000,0x89000000,0x8b000000,0x8e000000,0x8e000000,0x8f000000,0x8b000000,0x7c000000,0x61000000,0x3d000000,0x18000000,0x4000000,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0x3000000,0xc000000,0x1a000000,0x26000000,0x2d000000,0x2e000000,0x2b000000,0x29000000,0x28000000,0x29000000,
+ 0x2a000000,0x2b000000,0x2d000000,0x2e000000,0x2e000000,0x2f000000,0x30000000,0x2e000000,0x26000000,0x1a000000,0xc000000,0x3000000,0xffffff,0xffffff
+};
+
+static const QRgb Opera_data[] = {
+ 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
+ 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
+ 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3e000000,0x3e000000,0x3e000000,0x3e000000,0x3e000000,0x3e000000,0x3e000000,0x3e000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5323,
+ 0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5223,0xff0d5223,0xff0d5223,0xff0d5223,0xff0d5222,0xff0d5222,0xff0d5223,0xff0d5223,0xff0d5223,0xff0d5323,
+ 0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5323,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
+ 0xff0d5323,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffdfdfd,0xfffcfcfc,0xfffafafa,0xfff8f8f8,0xfff7f7f7,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,
+ 0xfff6f6f6,0xfff8f8f8,0xfff9f9f9,0xfffbfbfb,0xfffcfcfc,0xfffefefe,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff0d5323,0x5c000000,
+ 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff0d5323,0xffffffff,0xffffffff,0xfffefefe,0xfffdfdfd,0xfffcfcfc,0xfff9f9f9,0xfff6f6f6,0xfff3f3f3,0xffefefef,
+ 0xffededed,0xffececec,0xffebebeb,0xffebebeb,0xffececec,0xffeeeeee,0xfff1f1f1,0xfff4f4f4,0xfff8f8f8,0xfffbfbfb,0xfffdfdfd,0xfffefefe,0xffffffff,0xffffffff,
+ 0xffffffff,0xffffffff,0xff0d5323,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff0d5323,0xffffffff,0xfffefefe,0xfffdfdfd,0xfffbfbfb,0xfff7f7f7,
+ 0xfff2f2f2,0xffebebeb,0xffe5e5e5,0xffe0e0e0,0xffdddddd,0xffdbdbdb,0xffdbdbdb,0xffdbdbdb,0xffdbdbdb,0xffdedede,0xffe2e2e2,0xffe8e8e8,0xffefefef,0xfff5f5f5,
+ 0xfff9f9f9,0xfffcfcfc,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xff0d5323,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff0d5323,0xffffffff,
+ 0xfffdfdfd,0xfffbfbfb,0xfff6f6f6,0xffeeeeee,0xffe4e4e4,0xffdadada,0xffd0d0d0,0xffcbcbcb,0xffc8c8c8,0xffcfb6b6,0xffd6a0a0,0xffd6a0a0,0xffc8c8c8,0xffc8c8c8,
+ 0xffcdcdcd,0xffd4d4d4,0xffdfdfdf,0xffeaeaea,0xfff3f3f3,0xfff9f9f9,0xfffcfcfc,0xfffefefe,0xffffffff,0xffffffff,0xff0d5323,0x93000000,0x62000000,0x3b000000,
+ 0x1f000000,0x3d000000,0xff0d5323,0xfffefefe,0xfffcfcfc,0xfff7f7f7,0xffeeeeee,0xffe1e1e1,0xffd1d1d1,0xffc2c2c2,0xffc0acac,0xffdf6f6f,0xfff62323,0xffed0d0d,
+ 0xffdf3434,0xffed2c2c,0xfffa2727,0xffed4a4a,0xffd07a7a,0xffbcbcbc,0xffc9c9c9,0xffdadada,0xffe8e8e8,0xfff3f3f3,0xfffafafa,0xfffdfdfd,0xfffefefe,0xffffffff,
+ 0xff0d5323,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0d5323,0xfffdfdfd,0xfff8f8f8,0xfff0f0f0,0xffe1e1e1,0xffcecece,0xffb9b9b9,0xffc98c8c,
+ 0xfff54b4b,0xfff10000,0xffa64545,0xffb5acac,0xffbdbdbd,0xffbbbbbb,0xffc28383,0xfff42424,0xfffa2121,0xffe23535,0xffb4a5a5,0xffc4c4c4,0xffd8d8d8,0xffe9e9e9,
+ 0xfff5f5f5,0xfffbfbfb,0xfffefefe,0xffffffff,0xff0d5323,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0d5323,0xfffbfbfb,0xfff4f4f4,0xffe6e6e6,
+ 0xffd2d2d2,0xffb8b8b8,0xffc38888,0xfffb5151,0xfff70000,0xff8a1e1e,0xffadadad,0xffbebebe,0xffc6c6c6,0xffc3c3c3,0xffb5b5b5,0xffbf7272,0xfffa1e1e,0xfff90c0c,
+ 0xffd71d1d,0xffafa1a1,0xffc6c6c6,0xffdddddd,0xffeeeeee,0xfff8f8f8,0xfffcfcfc,0xfffefefe,0xff0d5323,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3e000000,
+ 0xff0d5223,0xfff8f8f8,0xffeeeeee,0xffdbdbdb,0xffc0c0c0,0xffb39696,0xfffb5d5d,0xfffa2121,0xff9d0000,0xff866666,0xffb4b4b4,0xffc9c9c9,0xffd4d4d4,0xffd0d0d0,
+ 0xffbfbfbf,0xffa5a5a5,0xffec3131,0xfff91515,0xffe70000,0xffb73131,0xffb1b1b1,0xffcecece,0xffe5e5e5,0xfff4f4f4,0xfffbfbfb,0xfffefefe,0xff0d5323,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3e000000,0xff0d5222,0xfff5f5f5,0xffe7e7e7,0xffcfcfcf,0xffafafaf,0xffdd6d6d,0xfffb4040,0xffe20000,0xff740000,0xff9d9d9d,
+ 0xffbdbdbd,0xffd5d5d5,0xffdfdfdf,0xffdcdcdc,0xffcacaca,0xffacacac,0xffbe6262,0xfffa2222,0xfff50000,0xffc00000,0xffa47474,0xffbfbfbf,0xffdcdcdc,0xffefefef,
+ 0xfff9f9f9,0xfffdfdfd,0xff0d5323,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3e000000,0xff0d5122,0xfff1f1f1,0xffe0e0e0,0xffc4c4c4,0xffab9696,0xfffb5555,
+ 0xfffa2222,0xffbb0000,0xff712323,0xffa2a2a2,0xffc5c5c5,0xffdedede,0xffe8e8e8,0xffe5e5e5,0xffd3d3d3,0xffb4b4b4,0xffac7878,0xfffa3131,0xfff90c0c,0xffc80000,
+ 0xff983838,0xffb1b1b1,0xffd3d3d3,0xffeaeaea,0xfff6f6f6,0xfffcfcfc,0xff0d5323,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3f000000,0xff0d5122,0xffeeeeee,
+ 0xffd9d9d9,0xffbababa,0xffc37777,0xfffb4646,0xfff90c0c,0xffa90000,0xff773434,0xffa8a8a8,0xffcbcbcb,0xffe3e3e3,0xffededed,0xffeaeaea,0xffd9d9d9,0xffbababa,
+ 0xffa08888,0xfffa3a3a,0xfff91515,0xffd40000,0xff950909,0xffa6a6a6,0xffcbcbcb,0xffe5e5e5,0xfff4f4f4,0xfffbfbfb,0xff0d5223,0x99000000,0x66000000,0x3d000000,
+ 0x20000000,0x3f000000,0xff0d5022,0xffebebeb,0xffd5d5d5,0xffb3b3b3,0xffce6868,0xfffa3939,0xfff70000,0xffa30000,0xff7e4747,0xffacacac,0xffcfcfcf,0xffe7e7e7,
+ 0xfff0f0f0,0xffeeeeee,0xffdedede,0xffbfbfbf,0xff969696,0xfffb4040,0xfffa1919,0xffda0000,0xff950000,0xff9a8888,0xffc4c4c4,0xffe0e0e0,0xfff0f0f0,0xfff6f6f6,
+ 0xff0d5122,0x99000000,0x66000000,0x3d000000,0x20000000,0x3f000000,0xff0d5022,0xffeaeaea,0xffd2d2d2,0xffafafaf,0xffdb5b5b,0xfffa3030,0xfff10000,0xffa30000,
+ 0xff814848,0xffaeaeae,0xffd1d1d1,0xffe8e8e8,0xfff2f2f2,0xffefefef,0xffdfdfdf,0xffc1c1c1,0xff989898,0xfffb4545,0xfffa1b1b,0xffda0000,0xff930000,0xff906d6d,
+ 0xffb9b9b9,0xffd4d4d4,0xffe2e2e2,0xffe5e5e5,0xff0c4b20,0x99000000,0x66000000,0x3d000000,0x20000000,0x3f000000,0xff0d5022,0xffeaeaea,0xffd2d2d2,0xffaeaeae,
+ 0xffdb5555,0xfffa2a2a,0xffef0000,0xffa50000,0xff824949,0xffaeaeae,0xffd2d2d2,0xffe8e8e8,0xfff2f2f2,0xffefefef,0xffe0e0e0,0xffc1c1c1,0xff979797,0xfffb4646,
+ 0xfffa1c1c,0xffd80000,0xff8c0000,0xff856464,0xffa7a7a7,0xffbababa,0xffc6c6c6,0xffcbcbcb,0xff0b431c,0x99000000,0x66000000,0x3d000000,0x20000000,0x3f000000,
+ 0xff0d5022,0xffebebeb,0xffd4d4d4,0xffb2b2b2,0xffd55656,0xfffa2727,0xfff30000,0xffab0000,0xff844848,0xffacacac,0xffd0d0d0,0xffe7e7e7,0xfff1f1f1,0xffeeeeee,
+ 0xffdddddd,0xffbdbdbd,0xff939393,0xfffb4848,0xfffa1b1b,0xffce0000,0xff7e0000,0xff715c5c,0xff878787,0xff9b9b9b,0xffafafaf,0xffc2c2c2,0xff0a421c,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3f000000,0xff0d5122,0xffededed,0xffd8d8d8,0xffb8b8b8,0xffc16767,0xfffa2828,0xfff90303,0xffb90000,0xff863c3c,0xffa9a9a9,
+ 0xffcccccc,0xffe4e4e4,0xffeeeeee,0xffe9e9e9,0xffd6d6d6,0xffb3b3b3,0xff8e8383,0xfffb4949,0xfff91515,0xffbb0000,0xff6e0000,0xff5f5f5f,0xff888888,0xffaeaeae,
+ 0xffc8c8c8,0xffd5d5d5,0xff0b451d,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3f000000,0xff0d5122,0xfff0f0f0,0xffdedede,0xffc1c1c1,0xffaf8888,0xfffa2a2a,
+ 0xfff90c0c,0xffc80000,0xff8c2323,0xffa4a4a4,0xffc7c7c7,0xffdfdfdf,0xffe8e8e8,0xffe1e1e1,0xffc5c5c5,0xff949494,0xff8a5e5e,0xfffb4646,0xfff90707,0xff9b0000,
+ 0xff602020,0xff8a8a8a,0xffb3b3b3,0xffcfcfcf,0xffdbdbdb,0xffd6d6d6,0xff0a3f1a,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3e000000,0xff0d5222,0xfff4f4f4,
+ 0xffe5e5e5,0xffcccccc,0xffababab,0xffeb2f2f,0xfff91010,0xffda0000,0xff990808,0xff9e9e9e,0xffbfbfbf,0xffd6d6d6,0xffd9d9d9,0xffc2c2c2,0xff969696,0xff6c6c6c,
+ 0xff9f5454,0xfffa3a3a,0xffde0000,0xff780000,0xff775252,0xffacacac,0xffc7c7c7,0xffd3d3d3,0xffc9c9c9,0xffb3b3b3,0xff072f14,0x99000000,0x66000000,0x3d000000,
+ 0x1f000000,0x3e000000,0xff0d5223,0xfff7f7f7,0xffececec,0xffd8d8d8,0xffbcbcbc,0xffbc6f6f,0xfff90c0c,0xffeb0000,0xffb50000,0xff9c7d7d,0xffb5b5b5,0xffc5c5c5,
+ 0xffbababa,0xff9d9d9d,0xff818181,0xff707070,0xffd35a5a,0xfffa1c1c,0xffa10000,0xff611919,0xffa0a0a0,0xffb8b8b8,0xffbfbfbf,0xffb3b3b3,0xff9b9b9b,0xff828282,
+ 0xff062710,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0d5223,0xfffafafa,0xfff2f2f2,0xffe4e4e4,0xffcecece,0xffb3b3b3,0xffd13e3e,0xffeb0000,
+ 0xffd40000,0xffb33333,0xffaaaaaa,0xffb0b0b0,0xffa4a4a4,0xff969696,0xff8d8d8d,0xff9f8181,0xfffa3a3a,0xffca0000,0xff670909,0xff8d7b7b,0xffa6a6a6,0xffa6a6a6,
+ 0xff959595,0xff868686,0xff808080,0xff898989,0xff083215,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0d5323,0xfffcfcfc,0xfff7f7f7,0xffeeeeee,
+ 0xffdedede,0xffc9c9c9,0xffb3b3b3,0xffc54141,0xffd20000,0xffce0000,0xffbe6565,0xffa7a7a7,0xffa1a1a1,0xff9e9e9e,0xffa49999,0xffe74b4b,0xffe00000,0xff760a0a,
+ 0xff877676,0xff8c8c8c,0xff818181,0xff7c7c7c,0xff898989,0xffa0a0a0,0xffb4b4b4,0xffc8c8c8,0xff0b461d,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff0d5323,0xfffdfdfd,0xfffbfbfb,0xfff5f5f5,0xffebebeb,0xffdddddd,0xffcccccc,0xffbcbcbc,0xffb77777,0xffb31717,0xffbe0000,0xffd62f2f,0xffce6363,0xffd45e5e,
+ 0xfff31a1a,0xffcc0000,0xff873939,0xff837d7d,0xff848484,0xff919191,0xffaaaaaa,0xffc2c2c2,0xffd3d3d3,0xffdddddd,0xffe6e6e6,0xffefefef,0xff0c5022,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0d5323,0xfffefefe,0xfffdfdfd,0xfffafafa,0xfff5f5f5,0xffececec,0xffe0e0e0,0xffd4d4d4,0xffcacaca,0xffc5c5c5,
+ 0xffbd9d9d,0xffb97474,0xffbe6666,0xffbe6464,0xffb18383,0xffafa6a6,0xffb5b5b5,0xffbfbfbf,0xffcbcbcb,0xffd8d8d8,0xffe3e3e3,0xffebebeb,0xfff2f2f2,0xfff7f7f7,
+ 0xfffafafa,0xfffdfdfd,0xff0d5223,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff0d5323,0xffffffff,0xfffefefe,0xfffdfdfd,0xfffafafa,0xfff6f6f6,
+ 0xffefefef,0xffe8e8e8,0xffe0e0e0,0xffdbdbdb,0xffd8d8d8,0xffd7d7d7,0xffd7d7d7,0xffd6d6d6,0xffd6d6d6,0xffd7d7d7,0xffdbdbdb,0xffe0e0e0,0xffe8e8e8,0xffefefef,
+ 0xfff5f5f5,0xfff9f9f9,0xfffcfcfc,0xfffefefe,0xfffefefe,0xffffffff,0xff0d5323,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff0d5323,0xffffffff,
+ 0xffffffff,0xfffefefe,0xfffdfdfd,0xfffbfbfb,0xfff8f8f8,0xfff4f4f4,0xfff0f0f0,0xffececec,0xffe9e9e9,0xffe8e8e8,0xffe8e8e8,0xffe8e8e8,0xffe9e9e9,0xffebebeb,
+ 0xffeeeeee,0xfff2f2f2,0xfff5f5f5,0xfffafafa,0xfffcfcfc,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff0d5323,0x87000000,0x5a000000,0x36000000,
+ 0x17000000,0x2e000000,0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5223,0xff0d5222,0xff0d5122,0xff0d5022,0xff0c5022,0xff0c4f21,
+ 0xff0c4f21,0xff0c4f21,0xff0c5022,0xff0d5022,0xff0d5122,0xff0d5122,0xff0d5223,0xff0d5223,0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5323,0xff0d5323,
+ 0xff0d5323,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
+ 0x9a000000,0x9a000000,0x9b000000,0x9b000000,0x9b000000,0x9b000000,0x9b000000,0x9a000000,0x9a000000,0x9a000000,0x99000000,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
+ 0x62000000,0x66000000,0x66000000,0x66000000,0x67000000,0x67000000,0x67000000,0x67000000,0x67000000,0x67000000,0x67000000,0x67000000,0x67000000,0x66000000,
+ 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
+ 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
+ 0x18000000,0xf000000
+};
+
+static const QRgb PPPConnect_data[] = {
+ 0xffffff,0xffffff,0x1000000,0x4000000,0x7000000,0xc313520,0xd000000,0xd000000,0xb353923,0x5000000,0x2000000,0x2000000,0x3000000,0x5000000,
+ 0x9000000,0xc000000,0xd000000,0xd000000,0xb000000,0x8000000,0x6000000,0x4000000,0x6000000,0xa1b2000,0xd000000,0xd000000,0xb191d00,0x7000000,
+ 0x4000000,0x1000000,0xffffff,0xffffff,0x1000000,0x6000000,0x13000000,0x344a5225,0x7699a553,0x5e747e3e,0x98aab75e,0x8aa3b059,0x6994a14f,0x48828d45,
+ 0x26636b37,0x12000000,0x12000000,0x1a000000,0x23000000,0x2b000000,0x2f000000,0x2e000000,0x29000000,0x21000000,0x1e000000,0x2a39410c,0x3e5e6b08,0x57768610,
+ 0x73849713,0x7f8b9f12,0x5156620c,0x6278890f,0x30373f0a,0x13000000,0x6000000,0x1000000,0x7000000,0x325e6631,0xa9aab760,0xe3c2d078,0xf2cbd881,0xf5ccda84,
+ 0xd8bdcb71,0xd7becc72,0xd1c1cc7e,0xc7bfcb7c,0xa9b7c472,0x5c868f5a,0x3c1b202b,0x623f5868,0x99567c92,0xc4638aa3,0xd8668ea7,0xd3638da6,0xb95b859e,0x874c6f86,
+ 0x6f526940,0x968ca01d,0xab9aae1d,0xb69eb41d,0xc2a2b917,0xc2a2b817,0xedb4cc1b,0xe7afc81b,0xd3a4bb1a,0x938b9d14,0x2c454e0c,0x7000000,0x24515a29,0xb5aebc62,
+ 0xfad1de88,0xffd5e28d,0xd6b8c66c,0x71808c43,0x6f94a052,0x648d9852,0x6d8d9853,0x859fa777,0x93a4aa9e,0xb8a4b4b6,0xe39ab3bf,0xff86acbd,0xff76a6bc,0xff5d9ab6,
+ 0xff4087a9,0xff70a6bf,0xff75a8bd,0xff6c9fb7,0xf95f91ad,0xc9597f8f,0x9261784e,0x755b6b25,0x605d6a13,0x63707e16,0x66616e0f,0xc49bb01a,0xffbdd620,0xf7b6d01f,
+ 0xa08fa417,0x2240480f,0x658b9748,0xefc8d67a,0xffd5e38a,0xe2bcca6e,0x31000000,0x1027291a,0xe000000,0x19000000,0x35191f2b,0x7d355e78,0xe04a869a,0xff8eb5bd,
+ 0xffbcd4d4,0xffafd0d2,0xff9dccd5,0xff7ec4d7,0xff50a7bd,0xff92cedf,0xff92ccda,0xff93c9d6,0xff82b8c9,0xff5a99b0,0xff3b7fa0,0xbc467896,0x60375367,0x2a000000,
+ 0x1c0c0d00,0x34000000,0xd5a1b61e,0xffbdd724,0xe5adc420,0x58707e14,0x95a0ad53,0xf8cedc7d,0xffd3e285,0xb7a4b258,0x18000000,0x6000000,0x14000000,0x32252d33,
+ 0x9448768e,0xf9166c84,0xff418d92,0xffa0cbc7,0xff87b1ab,0xff679385,0xffadcfc9,0xffd8f5f2,0xffd3f6fa,0xffc5eff7,0xffbdecf4,0xffafe4ef,0xffaadeeb,0xff93d0dd,
+ 0xff33859a,0xff00608a,0xe24686ab,0x734d6d82,0x270d1616,0x25000000,0xa78a9b1b,0xffbed728,0xf3b5cc25,0x8586981b,0xa2a2af54,0xfcd0de7d,0xffd2e181,0xafa2af53,
+ 0x1f35391a,0x12000000,0x2f1a2228,0x9d638b9c,0xff237887,0xff036264,0xff3f877c,0xff377b61,0xff226238,0xff61946f,0xffc4eae3,0xffc5ede3,0xffddf7f7,0xffd1f4f8,
+ 0xffbdf0f8,0xffb7edf8,0xffb4ecf8,0xffaee9f7,0xff6ab2c2,0xff277d9a,0xff3c97b8,0xf364a1bb,0x724d6e81,0x381d1f0a,0xa3889a1f,0xffc0d82e,0xfabcd32d,0x938a9b1e,
+ 0x969baa4e,0xfed1e07b,0xfecfde7a,0xc0a9b757,0x25000000,0x25000000,0x856a848f,0xff4e939a,0xff0c6c5c,0xff206c51,0xff0d5b2b,0xff1d6528,0xffa7ceb9,0xffeeffff,
+ 0xffe7ffff,0xffcaf1ee,0xffd7f6f7,0xffdff8f9,0xffd3f5f8,0xffc1f0f8,0xffb7eef9,0xffafeafc,0xff97e0f9,0xff7bcce8,0xff459ebf,0xff348eb6,0xe05b95b1,0x632d3e4a,
+ 0xb990a323,0xfec0d731,0xfec0d833,0x88869820,0x718a9641,0xf4c7d76d,0xffcedd76,0xddb6c45e,0x3d17190f,0x594d5a5f,0xea86a8ad,0xff2e8477,0xff0f6738,0xff136117,
+ 0xff19711d,0xff98cbaa,0xfff2ffff,0xffedfdff,0xffdef8fb,0xffdefafe,0xffd3f8f9,0xffd3f6f9,0xffdaf7f8,0xffd3f4f8,0xffc0eef9,0xffb4ebfa,0xffa6ecfe,0xff7ccfe5,
+ 0xff1e7995,0xff006ba6,0xff207eaf,0xca51798e,0xdaa2b62e,0xffc2d938,0xf1b6cc34,0x69798822,0x364e5424,0xe2b9ca5e,0xffcddd71,0xf4c1d165,0x81666f2f,0xb87d9299,
+ 0xff7ea6a4,0xff10734d,0xff378354,0xff72b592,0xff97d0b2,0xffe4fcf8,0xfff0feff,0xffe4fafb,0xffe0f9fb,0xffdcf8f9,0xffd7f8f9,0xffd1f7f8,0xffd1f4f8,0xffd6f5f8,
+ 0xffd0f2f8,0xffbcedf8,0xffb8f3ff,0xff95d8e1,0xff2e7980,0xff006da5,0xff0072b0,0xff4a807e,0xf6b4ca3b,0xffc4db3f,0xdbacc035,0x34414912,0x1a2b3012,0xb0a1b04b,
+ 0xfecadb69,0xffcbdc6a,0xc592a147,0xf78da2a5,0xff7cac9f,0xff248550,0xffa5d4c1,0xffecfefd,0xffeeffff,0xfff3ffff,0xfff0feff,0xffe8fbfd,0xffe3fafb,0xffdff8fa,
+ 0xffdaf8f9,0xffd4f7f9,0xffcef5f9,0xffcbf2f8,0xffd1f3f8,0xffccf1f8,0xffc0f2fe,0xffabe6ef,0xff3d8380,0xff006d95,0xff0077b1,0xff69965e,0xffc5dc45,0xfec4da43,
+ 0xab94a52f,0x1b282d10,0x9000000,0x5e788331,0xefbccd5a,0xffc8da64,0xf3b2c357,0xff90a190,0xffa4c2b9,0xff7bc49d,0xfff3fdfd,0xfffdffff,0xffdff5f0,0xffc7eee2,
+ 0xffb4e3d5,0xffdcf7f4,0xffe7fbfd,0xffe2f9fa,0xffdff8f9,0xffd6f7f8,0xffd1f5f8,0xffcaf3f8,0xffc3f2f7,0xffcbf1f8,0xffcbf0fa,0xffbdf3fd,0xff549389,0xff00595f,
+ 0xff1f7893,0xffa3be4e,0xffc7dd4a,0xefb6c941,0x63687423,0xb000000,0x2000000,0x1d272a10,0xad98a73f,0xfdc4d75d,0xfec4d65c,0xffa2b268,0xffb2c3bb,0xff6ebb8f,
+ 0xff94d1ad,0xffe1f4ec,0xffeefcf9,0xffd9f7ef,0xffd3f3ee,0xffe4f9f8,0xffe8fbfc,0xffe0f8fc,0xffd6f7f9,0xffd7f7f8,0xffd1f6f8,0xffcbf3f8,0xffc3f1f7,0xffbfeef8,
+ 0xffc9eff8,0xffcbf4fc,0xff9ad2d9,0xff286254,0xff729352,0xffc6db50,0xffc4d850,0xb8899831,0x2b1d1f0c,0x4000000,0xffffff,0x9000000,0x50576023,0xe8b0c24b,
+ 0xffc4d757,0xffb9cc54,0xffb0bd93,0xffafd7c5,0xff9ed7b8,0xffb8e3d1,0xffeffcfb,0xfff8ffff,0xfff3ffff,0xfff5ffff,0xfff8ffff,0xffe3fcfd,0xffcbf5fa,0xffd1f6f8,
+ 0xffd1f6f8,0xffcbf3f8,0xffc4f1f7,0xffbdeef8,0xffbcecf8,0xffc4eef7,0xffbde7ef,0xff8bb28d,0xffbdd257,0xffcbde57,0xfea5be52,0x6f3f4617,0x18000000,0x2000000,
+ 0xffffff,0x3000000,0x20000000,0x9c737f2a,0xfeb7cb4f,0xffc0d453,0xffc3d17b,0xffd6ddce,0xffebf3f3,0xffcdf2e9,0xffa5dcca,0xff578a67,0xff488959,0xff4e9a65,
+ 0xff82bda1,0xffe2fcfb,0xffe7ffff,0xffd8fafc,0xffd1f6f8,0xffccf3f8,0xffc4f1f7,0xffbdeef8,0xffb4eaf7,0xffb4e3ef,0xffb1d2ca,0xffc3d682,0xffcde062,0xffbfd45d,
+ 0xfb567f62,0x47000000,0x12000000,0x2000000,0xffffff,0x2000000,0x14000000,0x5720240c,0xfc9aaf56,0xffc9da6f,0xffd1df8a,0xffc1ce89,0xffc8d4c5,0xfff1f6f6,
+ 0xffd7e8e3,0xff4f895c,0xff237c30,0xff2a802a,0xff1b6c1a,0xff408557,0xff60977f,0xffc9f2f3,0xffe3fffe,0xffcff8fd,0xffc6f2f8,0xffbbedf5,0xffade2ee,0xff9dc9c4,
+ 0xffbacf8c,0xffd7e58c,0xffd2e27a,0xffa1bc6c,0xf92a677a,0x3d000000,0x11000000,0x2000000,0xffffff,0x2000000,0xf000000,0x3c000000,0xf2829c8b,0xffc7d58d,
+ 0xffd0de81,0xffbbcd51,0xffadbf65,0xffccd7c4,0xffd4eae5,0xff61af7f,0xff30933f,0xff378a34,0xff357b30,0xff24681e,0xff0d4508,0xff488165,0xffa3d5d1,0xffa8dcda,
+ 0xffbcedf2,0xffb6e8f1,0xff9fcac3,0xffadc678,0xffcddf70,0xffd7e688,0xffc4d48b,0xff87ad9d,0xf839778b,0x3a000000,0x11000000,0x2000000,0xffffff,0x1000000,
+ 0xf000000,0x40505440,0xdc98aeb9,0xffb6c6aa,0xffc0d06b,0xffb7cc3c,0xffb4c83c,0xffaebe61,0xffb4cdb6,0xff4f9770,0xff288037,0xff368638,0xff2f7530,0xff2b692b,
+ 0xff2f682a,0xff174f14,0xff05410c,0xff0c481b,0xff488177,0xffa3d0ca,0xffb2ca7b,0xffcee06f,0xffd1e370,0xffc7d87c,0xffa6c2a3,0xff8ab2b7,0xf8457e8c,0x3c000000,
+ 0x11000000,0x2000000,0xffffff,0x3000000,0x1a222512,0x7da8b17a,0xc4b3bec4,0xffb3c4c0,0xffa7b975,0xffb0c53d,0xffb4ca36,0xffaec439,0xffaabc69,0xff739c7c,
+ 0xff246f39,0xff368d4e,0xff337b3f,0xff2b642a,0xff2b6128,0xff2d622b,0xff245624,0xff19431a,0xff638b76,0xffafc985,0xffcdde74,0xffd4e477,0xffcadc73,0xffa4c38d,
+ 0xff96c3c7,0xff89b0b0,0xfb5c8b75,0x46121308,0x12000000,0x2000000,0xffffff,0xa000000,0x5f8d994c,0xc9c8d38b,0xabb9bfc0,0xffa7bcbf,0xffa6bab0,0xffa6b974,
+ 0xffadc23b,0xffb0c630,0xffabbf35,0xff9eb053,0xff4a6e43,0xff257740,0xff2f7547,0xff2a652f,0xff295c27,0xff295c29,0xff205220,0xff406133,0xffadc478,0xffcdde79,
+ 0xffd6e57c,0xffc9da77,0xffa4c38d,0xff8fc6cf,0xff8fc4d2,0xff7aa09c,0xfa819d4d,0x7f606b1d,0x17000000,0x2000000,0x3000000,0x26434a1f,0xbab5c268,0xefd2df8a,
+ 0x9fb6b9b1,0xe48ba6af,0xffa6bebf,0xffb3c9c3,0xffa6bb78,0xffa9be35,0xffadc22a,0xffaabe2a,0xff9aae3f,0xff5a7946,0xff2a6b3c,0xff286937,0xff2a6029,0xff2a5927,
+ 0xff4e702f,0xffadc067,0xffd6e581,0xffd7e682,0xffcadb7b,0xffa4c390,0xff94cad5,0xff8fcee7,0xff82bbcf,0xff6a8f83,0xf894a82b,0xc9829320,0x2f343b0c,0x4000000,
+ 0xa000000,0x6e8b9746,0xf1cddc7a,0xefd1dd8e,0xa8b4bb8b,0x8e647c88,0xff95b5b9,0xffb2ccce,0xffb3cec8,0xffa5bb6a,0xffa6bc2e,0xffa8be25,0xffa6bc25,0xff9cb236,
+ 0xff68852f,0xff316227,0xff366129,0xff789143,0xffbdcf73,0xffd8e887,0xffd8e887,0xffcede80,0xffadc88c,0xff94cbd2,0xff8bcfe9,0xff7bc0de,0xff6da7be,0xfa6f8e64,
+ 0xf48c9d22,0xf48ea21b,0x796c7a14,0xa000000,0x16141414,0xb5adbc5f,0xfed8e78a,0xf3d2dd91,0xb0adb96d,0x48252e36,0xc5779bab,0xff9cbdc1,0xffb1d1d4,0xffaccbb8,
+ 0xff9fb867,0xffa2b72e,0xffa4bc22,0xffa2b820,0xff9ab022,0xff889b36,0xff98a759,0xffc7d57f,0xffd8e68c,0xffd9e88c,0xffcbdc82,0xffadc78d,0xff9acac4,0xff92d3e9,
+ 0xff70bdde,0xff66aece,0xff5b96b2,0xd8748c37,0xf686981b,0xfe889b17,0xc17e8f14,0x16050500,0x22353535,0xdcc2d173,0xffdce991,0xfcd8e68d,0xb5afbb6f,0x310a0a0a,
+ 0x583e5863,0xdc79a1af,0xff9cc0c4,0xff9ac7d1,0xff8dc0be,0xff96b470,0xff9db42d,0xffa5ba2a,0xffafc24c,0xffc0cd78,0xffcbd496,0xffcbd695,0xffd0db91,0xffc6d685,
+ 0xffa4c191,0xff95c7c9,0xff96d3e5,0xff8ccce3,0xff71b3d1,0xff619fc0,0xb73e7593,0xc5768617,0xfd889c14,0xff819414,0xe67f9212,0x271a1d0c,0x2d5c5c5c,0xeacbd97f,
+ 0xffdde995,0xffdde995,0xd7becb79,0x4e666e3b,0x2f191a13,0x6c455e6e,0xdf739bac,0xff81acb8,0xff79acb3,0xff8bad9a,0xff9baf6c,0xffb6c46e,0xffcbd68d,0xffd0da9c,
+ 0xffd0d99c,0xffcad494,0xffb7c47a,0xff96ac6c,0xff85ac94,0xff86babd,0xff85bdd1,0xff7bb4c8,0xff669eb9,0xbf457c9c,0x7941522e,0xdf7e9114,0xff819512,0xff7b8e12,
+ 0xf27c8f10,0x37272a0f,0x2f696969,0xe7cad77f,0xffddea99,0xffdeeb9a,0xf8d4e18c,0xb4abb66b,0x75858f47,0x74767f40,0x9b728254,0xe27e987a,0xffa7bb7f,0xffb7c980,
+ 0xffc6d389,0xffd1db9a,0xffcfd89d,0xffd0d99e,0xffc8d28c,0xffb6c469,0xff9fb239,0xff8da425,0xff87a034,0xff819d48,0xff709372,0xff658e7b,0xc658795d,0x94586b1e,
+ 0xc0728210,0xfa819512,0xff7b8d10,0xff77890f,0xf07a8d0d,0x39282d0f,0x24676767,0xd0bfcd75,0xffdfeb9c,0xffe0ec9e,0xffe0ec9e,0xf8d4e28e,0xebcad781,0xe9c9d681,
+ 0xe8c4d17c,0xf6d0dd8b,0xffdde89a,0xffdfeb9e,0xffdeea9e,0xffdbe69c,0xffc8d38f,0xffb7c47c,0xffa7b75b,0xff97ab2d,0xff8fa513,0xff8da313,0xff8ca013,0xff8a9e14,
+ 0xfc869b19,0xf1819616,0xef829610,0xef829510,0xfa809310,0xff7a8d0f,0xff778a0f,0xff74860d,0xdd7a8d0c,0x2c252a0a,0x114d4d4d,0x88a4b05d,0xefd0dd8a,0xffe1eca1,
+ 0xffe1eca1,0xffe1eca1,0xffe0eb9f,0xffe1eca1,0xffe1eca1,0xffe1eca1,0xffe0eca0,0xffe0eb9f,0xfcd6e294,0xf7becd81,0xf49aaf78,0xf77e9976,0xfb6d8c60,0xfc708d3d,
+ 0xfc809922,0xfe8a9f16,0xff8a9e12,0xff879b12,0xff859912,0xff839712,0xff80930f,0xff7e900f,0xff7a8d0f,0xff778a0d,0xff74860d,0xf5798c0d,0x9573840c,0x13171b00,
+ 0x4000000,0x1f464a25,0x8ba2ad5d,0xe2c8d581,0xf9d7e496,0xfedfeaa0,0xffe2eda4,0xfee0eba2,0xfedee99f,0xfbdae599,0xf6d7e394,0xe1c4d07d,0xb5a5b162,0x8885904b,
+ 0x5d4f542b,0x43000000,0x45000000,0x63374008,0x8d5e6b0a,0xba72830c,0xe482950f,0xf8869a10,0xfb839810,0xfe809410,0xfe7d900f,0xff7a8d0f,0xfe798b0f,0xfb798b0d,
+ 0xea7a8d0c,0x9772820c,0x20343b03,0x4000000,0xffffff,0x4000000,0x13000000,0x6c98a456,0xb8b6c36f,0xdac4d17e,0xe2c7d482,0xe6cbd887,0xd1becb78,0xc1b8c571,
+ 0x99a9b664,0x507a8443,0x25414720,0x1d414727,0x12000000,0x11000000,0x12000000,0x14000000,0x20282d03,0x2b2a3103,0x54576408,0x9d76870d,0xc57c8f0d,0xd67d900d,
+ 0xeb7f920d,0xe87d900d,0xe17c8e0d,0xc2798b0a,0x756c7c08,0x13000000,0x4000000,0xffffff,0xffffff,0xffffff,0x3000000,0x12626a3b,0x27636b36,0x558f9a50,
+ 0x6a9aa558,0x6194a053,0x3c727a3f,0x347f8a47,0x1952592d,0x7000000,0x3000000,0x2000000,0x1000000,0x2000000,0x2000000,0x2000000,0x3000000,0x3000000,
+ 0x8000000,0x193c4503,0x365f6d0d,0x3e56620c,0x666a7a08,0x706d7d08,0x5b68770a,0x29495303,0x12434e03,0x3000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0x1000000,0x3000000,0x6000000,0x8000000,0x93f4229,0x4000000,0x3000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3000000,0x4000000,0x9242a00,0x8000000,0x6000000,0x3000000,0x1000000,0xffffff,
+ 0xffffff,0xffffff
+};
+
+static const QRgb ParaShoot_data[] = {
+ 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
+ 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
+ 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff03035a,0xff03035e,0xff03035f,0xff03035e,
+ 0xff03035e,0xff03035e,0xff03035e,0xff03035e,0xff03035e,0xff03035e,0xff03035e,0xff03035e,0xff03035e,0xff03035e,0xff03035e,0xff03035e,0xff03035e,0xff03035e,
+ 0xff03035e,0xff03035e,0xff03035e,0xff03035e,0xff03035e,0xff03035b,0xff030354,0xff030249,0xff02023c,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
+ 0xff03035e,0xff688eb6,0xff6187b3,0xff5981af,0xff567fae,0xff567fae,0xff567fae,0xff567fae,0xff567fae,0xff809fc2,0xff95aecc,0xffaabed6,0xffaabed5,0xffa9bed5,
+ 0xff8aa5c5,0xff7f9cbf,0xff567dab,0xff567dab,0xff567dab,0xff567dac,0xff567eac,0xff567ead,0xff567eac,0xff557ba8,0xff537096,0xff4b5b78,0xff020126,0x5c000000,
+ 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff03035f,0xff6087b3,0xff4971a8,0xff35629f,0xff305e9c,0xff2f5d9c,0xff7090bb,0xffbecce0,0xfffefefe,0xfffefefe,
+ 0xfffdfdfd,0xfffcfcfc,0xfffafafa,0xfff8f8f8,0xfff6f6f6,0xfff2f2f2,0xffefefef,0xffb1bfd0,0xff7690b4,0xff3a6299,0xff2e5a94,0xff2f5b98,0xff2f5c99,0xff2e5993,
+ 0xff2c4d7d,0xff26334b,0xff010111,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff04035f,0xff5b83b1,0xff3966a2,0xff1f5295,0xff5278ae,0xffd3ddea,
+ 0xfffefefe,0xffe7e7e7,0xffdedede,0xffdedede,0xfff4f4f4,0xfff3f3f3,0xffdcdcdc,0xffdadada,0xffbbbbbb,0xffb8b8b8,0xffcacaca,0xffcbcbcb,0xffdadada,0xffcfd2d6,
+ 0xff7990ae,0xff224e89,0xff164788,0xff164686,0xff13376d,0xff0c1a34,0xff000006,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff040361,0xff5c83b2,
+ 0xff3565a2,0xff8da7ca,0xfff6f6f6,0xffaeaeae,0xff868686,0xff8e8e8e,0xff9e9e9e,0xff969696,0xff7f7f7f,0xff7f7f7f,0xff8e8e8e,0xff9d9d9d,0xffacacac,0xffb3b3b3,
+ 0xff999999,0xff8f8f8f,0xff757575,0xff848484,0xffadadad,0xffadb6c1,0xff1c4782,0xff103f7e,0xff0d326a,0xff051430,0xff000003,0x93000000,0x62000000,0x3b000000,
+ 0x1f000000,0x3d000000,0xff040362,0xff6188b5,0xffb4c5dc,0xffd8d8d8,0xff868686,0xffaeaeae,0xffeeeeee,0xfffefefe,0xfffefefe,0xff979797,0xffa7a7a7,0xffbfbfbf,
+ 0xff7f7f7f,0xffcfcfcf,0xffffffff,0xfffefefe,0xfffdfdfd,0xfffbfbfb,0xffefefef,0xffc2c2c2,0xff7e7e7e,0xff747474,0xff949ba5,0xff123b76,0xff0e3167,0xff05142f,
+ 0xff000002,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff040364,0xff9fb6d3,0xffd5d5d5,0xff8b8b8b,0xffd5d5d5,0xfffefefe,0xffffffff,0xffffffff,
+ 0xffb7b7b7,0xff979797,0xffffffff,0xffffffff,0xffe7e7e7,0xff878787,0xffcfcfcf,0xffffffff,0xffffffff,0xfffefefe,0xfffcfcfc,0xfff7f7f7,0xffe9e9e9,0xffa2a2a2,
+ 0xff616161,0xff425772,0xff113264,0xff071530,0xff000002,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff05046b,0xffe5e6e9,0xff989898,0xffdddddd,
+ 0xfffefefe,0xffffffff,0xffffffff,0xffefefef,0xff7f7f7f,0xffefefef,0xffffffff,0xffffffff,0xffffffff,0xffe7e7e7,0xff7f7f7f,0xffe7e7e7,0xffffffff,0xfffefefe,
+ 0xfff8f8f8,0xffededed,0xffdbdbdb,0xffc2c2c2,0xff878787,0xff494c4f,0xff112f59,0xff081630,0xff000002,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff08057c,0xffb4b4b4,0xffc5c5c5,0xfffdfdfd,0xffffffff,0xffffffff,0xffffffff,0xffafafaf,0xffbfbfbf,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+ 0xffbfbfbf,0xff979797,0xfffefefe,0xfff9f9f9,0xffe9e9e9,0xffd3d3d3,0xffbbbbbb,0xffa9a9a9,0xff9a9a9a,0xff88888a,0xff2c456b,0xff0a1732,0xff000003,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff080574,0xffadadad,0xfffbfbfb,0xfffefefe,0xffffffff,0xffffffff,0xffefefef,0xff7f7f7f,0xffefefef,0xffffffff,
+ 0xfffefefe,0xfffefefe,0xfffefefe,0xfffefefe,0xffffffff,0xff8e8e8e,0xffcccccc,0xffececec,0xffd2d2d2,0xffb3b6b9,0xff4f6a8c,0xff47658b,0xff3d4d63,0xff3c4d66,
+ 0xff2b4874,0xff0c1a35,0xff000003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff07045c,0xffdcdcdc,0xfffcfcfc,0xfffefefe,0xffffffff,0xffffffff,
+ 0xffc7c7c7,0xffa7a7a7,0xfffefefe,0xfffdfdfd,0xfffafafa,0xfff9f9f9,0xfff8f8f8,0xfff9f9f9,0xfffbfbfb,0xffcccccc,0xff888888,0xffd9d9d9,0xffbbbbbb,0xff687f9b,
+ 0xff183d71,0xff2c5a96,0xff13273f,0xff234777,0xff23477b,0xff0d1c38,0xff000003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff07045b,0xfff5f5f5,
+ 0xfff9f9f9,0xfffcfcfc,0xfffefefe,0xfffefefe,0xffa6a6a6,0xffcecece,0xfffafafa,0xfff2f2f2,0xffe9e9e9,0xffe2e2e2,0xffe0e0e0,0xffe2e2e2,0xffe8e8e8,0xffeaeaea,
+ 0xff7c7c7c,0xffa3a3a3,0xff9ea3a9,0xff2a5489,0xff204a85,0xff386dad,0xff0e1b2b,0xff3465a3,0xff284e86,0xff101f3a,0xff000003,0x99000000,0x66000000,0x3d000000,
+ 0x1f000000,0x3d000000,0xff08056b,0xffededed,0xffeeeeee,0xfff1f1f1,0xfff6f6f6,0xfffbfbfb,0xff858585,0xffe8e8e8,0xffebebeb,0xffd9d9d9,0xffc8c8c8,0xffbdbdbd,
+ 0xffbababa,0xffbbbbbb,0xffc0c0c0,0xffc3c3c3,0xff909090,0xff747474,0xff70839b,0xff2d5990,0xff2d5c9b,0xff37659d,0xff172c43,0xff3d70af,0xff2d548b,0xff11203c,
+ 0xff000003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff080572,0xffdfdfdf,0xffdbdbdb,0xffdadada,0xffe3e3e3,0xffdfdfdf,0xff7f7f7f,0xffe4e4e4,
+ 0xffcfcfcf,0xffbebebe,0xff8695a7,0xff5d7491,0xff6f8199,0xff78889c,0xff9299a2,0xffa4a4a4,0xff929292,0xff818181,0xff466994,0xff2e5b96,0xff3b6eaf,0xff2e537e,
+ 0xff28456a,0xff4275b5,0xff32578f,0xff13223e,0xff000003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff080571,0xffaebccb,0xff889fbc,0xffa0acbd,
+ 0xffcccccc,0xffb9b9b9,0xff858585,0xffc8c8c8,0xffacb0b6,0xff5d7da2,0xff3f6ba1,0xff376399,0xff2f5992,0xff406ea5,0xff3e699e,0xff426998,0xff667f9d,0xff6f747a,
+ 0xff406ca4,0xff2b5796,0xff497fc0,0xff253f5e,0xff395f8f,0xff477aba,0xff355c93,0xff142440,0xff000003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff040349,0xff8ca9c9,0xff658ebf,0xff4d79af,0xff7590af,0xffadadad,0xff8b8b8b,0xffa2a9b2,0xff325788,0xff4776b0,0xff4d81bd,0xff497bba,0xff3463a2,0xff5084c3,
+ 0xff4e81bf,0xff4c7eba,0xff4979b4,0xff121e2c,0xff4a7dbb,0xff305ea0,0xff5389cc,0xff18283b,0xff4b7eba,0xff4c7fbf,0xff3a6097,0xff162541,0xff000003,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff05034c,0xff6f7e8f,0xff6f9bcf,0xff5b8cc5,0xff4e7eb4,0xff7690b0,0xffa2a8ae,0xff4e76a5,0xff37639e,0xff4778b7,
+ 0xff598fcf,0xff588ecf,0xff3364a5,0xff5a90d2,0xff5990d0,0xff598fd0,0xff5487c3,0xff19293a,0xff4b7ebf,0xff3f72b3,0xff5284c0,0xff1b2c3f,0xff5990d1,0xff5386c5,
+ 0xff3e659b,0xff182743,0xff000003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff07057a,0xff738293,0xff4d617a,0xff6396d3,0xff5d8fcc,0xff5787c1,
+ 0xff304b6b,0xff2a425d,0xff578bca,0xff386aab,0xff5f95d5,0xff6198d8,0xff3a6cae,0xff5d92d4,0xff6197d8,0xff6198d9,0xff5787c1,0xff21344b,0xff477abc,0xff5084c5,
+ 0xff466e9d,0xff314d6e,0xff6096d6,0xff598bca,0xff436a9f,0xff1a2945,0xff000003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff07057e,0xffa5c3e6,
+ 0xff4f647d,0xff384f6c,0xff659ad8,0xff649ad9,0xff6297d4,0xff293f58,0xff436892,0xff4d80c1,0xff4f83c4,0xff679ede,0xff4679bb,0xff5a8fd0,0xff689ede,0xff679ede,
+ 0xff5987be,0xff2a405a,0xff3f72b3,0xff5f95d6,0xff39577a,0xff476e9a,0xff669ddc,0xff5f92cf,0xff476ea4,0xff1c2a47,0xff000003,0x99000000,0x66000000,0x3d000000,
+ 0x1f000000,0x3d000000,0xff070580,0xffabcaec,0xff82b0e4,0xff3a526f,0xff334c6a,0xff6ca1df,0xff6ea3e3,0xff6699d4,0xff213245,0xff5885b9,0xff4073b5,0xff689fde,
+ 0xff5388c8,0xff578ccd,0xff6ea5e4,0xff6ea5e4,0xff5581b2,0xff314a67,0xff3e71b3,0xff6ea5e4,0xff273b52,0xff5f8fc6,0xff6da3e2,0xff6598d5,0xff4c73a8,0xff1e2c49,
+ 0xff000003,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff080582,0xffb1cef0,0xff89b8ec,0xff78abe7,0xff364f6c,0xff354e6b,0xff72a8e6,0xff74abe9,
+ 0xff5e8bbd,0xff233446,0xff5789c7,0xff5387c9,0xff6096d6,0xff5388c9,0xff74abe9,0xff74abea,0xff547caa,0xff345072,0xff4f83c5,0xff71a6e3,0xff1f2e3f,0xff74abea,
+ 0xff73aae8,0xff6b9eda,0xff5177ad,0xff1f2e4b,0xff000004,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff080584,0xffb5d3f4,0xff8ebdf1,0xff7fb4f0,
+ 0xff79aeeb,0xff38516e,0xff38516e,0xff78aeeb,0xff7ab1ef,0xff4f739c,0xff334a64,0xff497dbe,0xff679ddd,0xff4e83c5,0xff7ab1ef,0xff7ab1ef,0xff51759e,0xff345277,
+ 0xff6197d7,0xff618dbe,0xff354c67,0xff7ab1ef,0xff79b0ed,0xff70a3df,0xff557bb0,0xff212f4d,0xff000004,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff080585,0xffbad6f6,0xff93c1f4,0xff83b9f2,0xff7fb6f2,0xff7cb3ee,0xff3b536f,0xff3b536f,0xff7cb3ee,0xff7eb6f2,0xff3b536e,0xff3f6085,0xff5288c7,0xff487dbe,
+ 0xff7fb6f2,0xff7fb6f2,0xff4e7096,0xff33557f,0xff72a9e7,0xff4e7096,0xff4e7096,0xff7eb5f2,0xff7eb4f0,0xff75a7e2,0xff587eb3,0xff22304e,0xff000004,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff080584,0xffb7d1f0,0xff8eb9eb,0xff80b0e9,0xff7bace7,0xff7bade7,0xff78aae4,0xff384f6a,0xff384f6a,0xff79aae4,
+ 0xff74a5dd,0xff293a4d,0xff3b6190,0xff4779b8,0xff74a6e2,0xff7aace8,0xff446082,0xff2f527e,0xff7aace7,0xff354b64,0xff628ab8,0xff7aade8,0xff79ace6,0xff709fd9,
+ 0xff5578ac,0xff212f4d,0xff000004,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff070578,0xffa1b5d2,0xff7898c5,0xff658abd,0xff6085ba,0xff5f85ba,
+ 0xff5f85ba,0xff5e82b7,0xff2c3d55,0xff2c3d55,0xff5e83b7,0xff5373a1,0xff43618a,0xff355b91,0xff5277ad,0xff5f85ba,0xff4c6fa0,0xff3a5e91,0xff5e85ba,0xff5779a9,
+ 0xff5e82b7,0xff5f85ba,0xff5f84b9,0xff577baf,0xff435d8e,0xff1c2844,0xff000004,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff060466,0xff7282a2,
+ 0xff45516a,0xff2d3b58,0xff263553,0xff253452,0xff253452,0xff253452,0xff253350,0xff172033,0xff24324f,0xff253452,0xff253452,0xff162543,0xff1a2845,0xff253452,
+ 0xff1d2c48,0xff1d2b48,0xff253452,0xff253452,0xff253452,0xff253452,0xff253351,0xff23304e,0xff1c2844,0xff0e1425,0xff000000,0x87000000,0x5a000000,0x36000000,
+ 0x17000000,0x2e000000,0xff040356,0xff03022e,0xff010112,0xff000008,0xff000004,0xff000004,0xff000004,0xff000004,0xff000004,0xff000004,0xff000004,0xff000004,
+ 0xff000004,0xff000004,0xff000004,0xff000004,0xff000004,0xff000004,0xff000004,0xff000004,0xff000004,0xff000004,0xff000004,0xff000004,0xff000004,0xff000000,
+ 0xff000000,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
+ 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,
+ 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
+ 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
+ 0x18000000,0xf000000
+};
+
+static const QRgb Rotation_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3000000,0x6000000,0xb000000,0x12000000,0x19000000,0x21000000,0x29000000,0x2f000000,
+ 0x35000000,0x38000000,0x3b040404,0x4d535353,0x5a828282,0x3d3f3f3f,0x2d060606,0x24070707,0x1b090909,0x140d0d0d,0xc151515,0x7242424,0x3000000,0x1000000,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,
+ 0x6e647e80,0xab7da6a7,0xd387b7b9,0xeb8bc0c2,0xf98dc6c8,0xfe8ac8ca,0xf97ec0c2,0xed6fb6b7,0xd8629ea2,0xcc90aeb0,0xa1849698,0x460b0b0b,0x390d0d0d,0x2b0c0c0c,
+ 0x1f101010,0x130d0d0d,0xb171717,0x5000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,
+ 0x16000000,0x23000000,0x84759496,0xd091b9bb,0xfaabcecf,0xffa9d0d2,0xffa1ccce,0xff9acacc,0xff90c6c8,0xff89c4c6,0xff7fc1c3,0xff74bfc1,0xff69bcbe,0xff60b9bc,
+ 0xfd88c1c4,0xe78bb4b7,0xa0395f62,0x4f101010,0x3a121212,0x28131313,0x19141414,0xe121212,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,
+ 0x2000000,0x7000000,0xe000000,0x1a000000,0x545f7474,0xc08eb5b6,0xfaafcfd1,0xffafcfd0,0xffadcccd,0xffa3c8ca,0xff9ac4c6,0xff93c0c2,0xff8abfbf,0xff80bbbd,
+ 0xff79babc,0xff6fb8bb,0xff65b8ba,0xff5cb6b9,0xff50b2b5,0xff69a2a7,0xfe76b0b5,0xd2377579,0x7f293d3d,0x47121212,0x2f101010,0x1d121212,0xf111111,0x7000000,
+ 0x2000000,0x1000000,0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x73728f8f,0xda9fc1c3,0xffb6d1d3,0xffb0cdce,0xffaac6c8,0xffa2bfc1,0xff96b8b9,
+ 0xff8db3b5,0xff84adaf,0xff7cabac,0xff76aaac,0xff6fadae,0xff6ab1b3,0xff63b4b5,0xff58b4b6,0xff4eadb3,0xff61a1a6,0xff4f8a8f,0xff5f9ea3,0xe82d777c,0x9d2a4a4c,
+ 0x50131313,0x33141414,0x1e111111,0xf111111,0x7242424,0x2000000,0x1000000,0x5000000,0xd000000,0x1a000000,0x736f8f8f,0xe2a1c3c5,0xffb5cfd1,0xffaec9cb,
+ 0xffa2bec0,0xff98b4b5,0xff8ba6a8,0xff7e9a9d,0xff739395,0xff6b8c8e,0xff658c8d,0xff639092,0xff70a1a4,0xff88b3b6,0xff5aadaf,0xff53adb3,0xff4ba9b2,0xff40a0a8,
+ 0xff5c9398,0xff4a8488,0xff418d95,0xef2b7378,0xa2294449,0x53161616,0x33141414,0x1e1a1a1a,0xe121212,0x62b2b2b,0x3000000,0xa000000,0x16000000,0x545c7174,
+ 0xda9abec2,0xffb2cfd2,0xffacc8cb,0xffa2bdc0,0xff91abae,0xff80989b,0xff788e90,0xff9dadae,0xffa9babb,0xffb6c9ca,0xffc0d5d7,0xffb9d2d4,0xffb3cdce,0xff8fb4b7,
+ 0xff52a4a7,0xff4da8b1,0xff45a6ad,0xff3b9da6,0xff6fa2a7,0xff5b9095,0xff498086,0xff297e86,0xec2a676e,0x91243537,0x4e141414,0x2f161616,0x18151515,0xb171717,
+ 0x6000000,0x11000000,0x23000000,0xbf88b0b4,0xffafced2,0xffaac9cd,0xffa2bfc3,0xff92adb0,0xffb0c7c9,0xffc0d5d6,0xffcadcde,0xffd1e1e1,0xffd4e3e4,0xffd2e3e4,
+ 0xffcedfe1,0xffc7dcdd,0xffbfd6d7,0xff4c8b8f,0xff4c9ca2,0xff47a2ab,0xff40a0ab,0xff399aa4,0xff6aa2a9,0xff6b9da1,0xff598c91,0xff427d83,0xff28767e,0xdd2a585d,
+ 0x6c151515,0x45161616,0x27141414,0x120e0e0e,0xb000000,0x1b000000,0x846f8e93,0xfaa3c7cd,0xffa5c9cd,0xff9fc2c6,0xff92b2b6,0xff7f9a9e,0xff667e80,0xffd0dfe0,
+ 0xffd9e6e6,0xffe0eaea,0xffe2eced,0xffe0eced,0xffdbe8e9,0xffd3e3e3,0xffa4bcbe,0xff43868c,0xff44969f,0xff429da8,0xff3a9ea8,0xff3796a1,0xff45949c,0xff77a6a9,
+ 0xff65979b,0xff5c888b,0xff296c73,0xfc276b74,0xbb284146,0x5f151515,0x39161616,0x1d121212,0x12000000,0x26000000,0xd085afb6,0xff9dc7cd,0xff9dc3c9,0xff94b8be,
+ 0xff84a4aa,0xff6d898d,0xff687b7e,0xffd9e6e8,0xffe4eded,0xffecf2f3,0xffeef3f4,0xffebf3f3,0xffe4eef0,0xffdbe8ea,0xff628a8e,0xff3f848c,0xff3c919d,0xff3796a2,
+ 0xff3396a2,0xff36929d,0xff45919a,0xff7eabaf,0xff6e9ea2,0xff5c8e92,0xff2b646c,0xff28676e,0xe9285659,0x79171717,0x4b141414,0x2a121212,0x19000000,0x6e59747b,
+ 0xfa93c0c7,0xff98c2ca,0xff92bbc3,0xff87acb3,0xff73959b,0xff5c767b,0xffd2e2e2,0xffdfeaeb,0xffebf2f3,0xfff4f7f8,0xfff8fafb,0xfff4f8f8,0xffebf2f3,0xffe1ebec,
+ 0xff356f76,0xff37848e,0xff348e99,0xff2c909d,0xff308f9c,0xff328c98,0xff72a3a9,0xff83aeb2,0xff75a4a8,0xff639598,0xff2e5e65,0xff295f66,0xfc266069,0xb0233437,
+ 0x5e161616,0x37131313,0x21000000,0xab6b969e,0xff8ebec7,0xff8bbbc3,0xff84b1ba,0xff779fa7,0xff62858c,0xffaabcbe,0xffd5e4e5,0xffe3eded,0xffedf4f4,0xfff7fafa,
+ 0xffffffff,0xfff8fafa,0xffedf4f4,0xff8fa8ab,0xff30727c,0xff2e808e,0xff288795,0xff278795,0xff2b8795,0xff2f8491,0xff88aeb2,0xff85b0b3,0xff7aa7ab,0xff69999e,
+ 0xff305960,0xff2b5a61,0xff265e66,0xd6264448,0x71171717,0x45121212,0x29000000,0xd370a1ac,0xff83b9c4,0xff80b4be,0xff78a8b2,0xff68939c,0xff54767d,0xffc4d8da,
+ 0xffd3e2e3,0xffe0ecec,0xffebf2f2,0xfff3f8f8,0xfff7fafb,0xfff4f8f8,0xffebf2f3,0xff2b656f,0xff2a7481,0xff257d8e,0xff1f808e,0xff23818e,0xff277e8d,0xff2c7c87,
+ 0xff8fb6ba,0xff86b1b4,0xff7aa8ab,0xff6c9b9f,0xff32545a,0xff2e545b,0xff285961,0xed264d51,0x80181818,0x4f131313,0x2f000000,0xeb70a7b3,0xff79b3bf,0xff75aeb9,
+ 0xff6c9fa9,0xff5b858f,0xff81989c,0xffc1d7d8,0xffd0e1e1,0xffdbe8e9,0xffe5eeef,0xffebf2f3,0xff98a8ab,0xffd7e1e3,0xffe4edee,0xff276c7a,0xff237585,0xff1b7787,
+ 0xff1e7888,0xff1e7585,0xff227382,0xff5c8f98,0xff8db6b8,0xff84b0b3,0xff7aa8ac,0xff6d9da2,0xff345056,0xff2f5056,0xff2a555c,0xf7264f57,0x8d191919,0x5a141414,
+ 0x34000000,0xf96da9b8,0xff6dacba,0xff69a5b3,0xff5f95a1,0xff507b85,0xffa7c1c3,0xffbcd3d6,0xffc9dbdd,0xffd2e3e4,0xffdbe8e9,0xffb3c2c5,0xff28525c,0xff29606c,
+ 0xff64929d,0xff206f7f,0xff187283,0xff1a7183,0xff1a6f81,0xff1a6b7c,0xff1f6978,0xff92b9bb,0xff8ab3b7,0xff82afb2,0xff79a8ab,0xff6e9ea2,0xff364c51,0xff324d53,
+ 0xff2b5157,0xfc265259,0x961a1a1a,0x61181818,0x37000000,0xfe65a7b7,0xff64a6b6,0xff5f9ead,0xff558d9b,0xff47737e,0xffa7c5c7,0xffb4ced0,0xffc0d6d9,0xffc9dbdd,
+ 0xffcfe1e2,0xff26535e,0xff28616e,0xff266a7a,0xff1f6e7f,0xff166e80,0xff166e80,0xff548d9a,0xff186677,0xff196071,0xff87abae,0xff8db6b9,0xff87b2b4,0xff7facb0,
+ 0xff77a6a9,0xff749c9f,0xff36494d,0xff324b50,0xff2c4e56,0xfe25515b,0x9a1a1a1a,0x66171717,0x39040404,0xf9599daf,0xff5a9fb1,0xff5596a8,0xff4c8795,0xff3e6d78,
+ 0xffa0c0c3,0xffabc8ca,0xffb6cfd2,0xffbdd5d7,0xff5c7b82,0xff265d6b,0xff25687a,0xff206d81,0xff176e81,0xff166c7f,0xff166a7d,0xffa9c7c9,0xff9ab9be,0xff769aa1,
+ 0xff8fb7ba,0xff88b3b6,0xff83afb2,0xff7babae,0xff74a5a8,0xff6d7e80,0xff37484c,0xff334a4f,0xff2c4c52,0xfc244a53,0x9c1a1a1a,0x66171717,0x38050505,0xed4d8fa2,
+ 0xff5099ac,0xff4c91a4,0xff448091,0xff396a77,0xff97bbbd,0xffa3c2c5,0xffabc8cb,0xffb1cccf,0xff235362,0xff216172,0xff1e687e,0xff176a80,0xff166a7e,0xff15667b,
+ 0xff156175,0xff9fc1c4,0xff97bcbf,0xff90b8bb,0xff8ab4b7,0xff83afb3,0xff7eacb0,0xff79a9ab,0xff71a3a7,0xff394649,0xff39484c,0xff32494e,0xff2c4c53,0xf924444b,
+ 0x98191919,0x64141414,0x35050505,0xd7447d90,0xff4691a7,0xff428a9f,0xff3d7b8e,0xff336675,0xff8fb4b8,0xff99bec1,0xffa0c1c3,0xff8ca6ab,0xff215667,0xff1c6274,
+ 0xff19667b,0xff19677d,0xff16637b,0xff166074,0xff7097a1,0xff96bbbe,0xff8fb7ba,0xff88b4b7,0xff84b1b3,0xff7eadaf,0xff7aa9ac,0xff75a6a9,0xff7a9799,0xff3b4649,
+ 0xff38474c,0xff32494f,0xff294851,0xf1233d44,0x931a1a1a,0x5f151515,0x30050505,0xb5366775,0xff3d88a2,0xff39829a,0xff36778c,0xff2e6376,0xff85aeb1,0xff8fb7b9,
+ 0xff96bcbe,0xff6a878f,0xff1e5769,0xff1c6073,0xff1b6478,0xff196378,0xff185f74,0xff175a6e,0xff92b9bb,0xff8db6b8,0xff87b3b6,0xff82afb2,0xff7eadb0,0xff7aa9ad,
+ 0xff77a6aa,0xff71a2a6,0xff3c4346,0xff3c4649,0xff37474c,0xff30474e,0xff274650,0xe121353b,0x89181818,0x59141414,0x2a060606,0x81294953,0xfb357e99,0xff337c97,
+ 0xff30738b,0xff2c6377,0xff79a6aa,0xff85afb3,0xff8cb6b8,0xff315966,0xff225869,0xff215e72,0xff206177,0xff1c5f74,0xff1b5c72,0xff467483,0xff89b4b7,0xff85b1b4,
+ 0xff81afb2,0xff7eacaf,0xff7aaaad,0xff76a7a9,0xff73a4a7,0xff545a5b,0xff3e4447,0xff3b464a,0xff36474d,0xff2d464f,0xfd25434c,0xc51f2a2d,0x7d181818,0x4f131313,
+ 0x22080808,0x420c0c0c,0xd92c647a,0xff2d7593,0xff2a6d88,0xff276177,0xff6f9399,0xff78a6aa,0xff82adb2,0xff365b69,0xff265769,0xff265d72,0xff256074,0xff245e73,
+ 0xff225a6f,0xff7e9fa5,0xff82afb2,0xff7fadb0,0xff7cabaf,0xff79a8ac,0xff75a6aa,0xff72a3a7,0xff6ea0a4,0xff3f4446,0xff3e4649,0xff3a474b,0xff33464c,0xff2a444c,
+ 0xf2223940,0x9d1a1a1a,0x6d151515,0x420f0f0f,0x1a0a0a0a,0x350e0e0e,0x9d244b57,0xfb256b88,0xff246985,0xff236078,0xff456d7c,0xff6c9b9f,0xff76a5a8,0xff69858d,
+ 0xff2b5769,0xff2a5d70,0xff295e73,0xff295d72,0xff295a6e,0xff7eacb0,0xff7cabaf,0xff78a9ad,0xff76a6a9,0xff74a5a9,0xff71a2a6,0xff6ca0a4,0xff689b9e,0xff6b9395,
+ 0xff3b4549,0xff36454c,0xff2d434c,0xfd254049,0xd31f2c30,0x89181818,0x5c131313,0x350e0e0e,0x130d0d0d,0x280d0d0d,0x490e0e0e,0xd1215669,0xff1e6581,0xff1e5e7a,
+ 0xff21576d,0xff5c8e93,0xff68999e,0xff74949a,0xff2e5768,0xff2f5c6d,0xff305e72,0xff2f5d71,0xff77959d,0xff76a7ab,0xff75a6a9,0xff73a5a8,0xff7a9fa3,0xff7b969a,
+ 0xff788a8d,0xff4e5558,0xff3f474a,0xff3d474b,0xff36454b,0xff30434b,0xff28404b,0xec20343a,0x9e1b1b1b,0x73161616,0x49111111,0x280d0d0d,0xc151515,0x1d121212,
+ 0x36131313,0x7b193339,0xe71a556a,0xff1c5b77,0xff20576f,0xff486b7a,0xff588a8f,0xff619497,0xff2e5465,0xff30596a,0xff325c6e,0xff335d6f,0xff718d95,0xff516d7b,
+ 0xff375663,0xff39515c,0xff3b4e56,0xff3d4b52,0xff3e4b50,0xff3e4a4e,0xff3b484d,0xff38464e,0xff32434c,0xff29404b,0xf522383f,0xbe1e2528,0x83171717,0x5b141414,
+ 0x350e0e0e,0x1c090909,0x7242424,0x120e0e0e,0x26141414,0x43131313,0x97173a46,0xee1a5167,0xff1c5670,0xff21526a,0xff507981,0xff508389,0xff638089,0xff315567,
+ 0xff335a6b,0xff355b6c,0xff385b6c,0xff395a69,0xff3b5765,0xff3c555f,0xff3d515b,0xff3d4e56,0xff3c4c53,0xff394951,0xff364850,0xff2f434c,0xff29404b,0xf8233841,
+ 0xcc1e282c,0x8e191919,0x66141414,0x42131313,0x250e0e0e,0x120e0e0e,0x3000000,0xb171717,0x18151515,0x2d111111,0x4b141414,0x9e193642,0xea1a4a5f,0xff1c4f6a,
+ 0xff1f4e64,0xff3c6e75,0xff46787e,0xff2d5164,0xff315365,0xff345668,0xff365868,0xff375666,0xff395563,0xff3a5360,0xff3a505d,0xff384d57,0xff354a55,0xff324750,
+ 0xff2d444f,0xff273f4b,0xf521363f,0xcc1e282c,0x921a1a1a,0x6c151515,0x4b111111,0x2d111111,0x170b0b0b,0xa000000,0x1000000,0x5000000,0xe121212,0x1c121212,
+ 0x31151515,0x4e171717,0x8b182c33,0xdb194251,0xfc1c4b64,0xff1f4a62,0xff39666d,0xff386a70,0xff2b4e60,0xff2d4f61,0xff305062,0xff325161,0xff33505e,0xff324d5c,
+ 0xff324b59,0xff2f4855,0xff2c4653,0xff28414e,0xfd243d49,0xeb1f323a,0xbc1e2526,0x8e191919,0x6c151515,0x4d111111,0x30101010,0x1b090909,0xd000000,0x5000000,
+ 0xffffff,0x2000000,0x6000000,0xf111111,0x1d121212,0x31151515,0x4b141414,0x68161616,0xb719333e,0xe81c404f,0xfc1c465b,0xff5b7984,0xff50727b,0xff25485c,
+ 0xff27495a,0xff29495a,0xff294658,0xff294757,0xff274252,0xff264251,0xfd223f4c,0xf1213640,0xd11e2b30,0x9d1c1c1c,0x82181818,0x66141414,0x4a111111,0x30101010,
+ 0x1c090909,0xe000000,0x6000000,0x2000000,0xffffff,0x1000000,0x2000000,0x7000000,0x10202020,0x1d1a1a1a,0x2d171717,0x44171717,0x5c161616,0x75181818,
+ 0xad192b32,0xd41a3841,0xed39555f,0xfa6f858f,0xfd466371,0xfe214253,0xfc20404f,0xf81f3c4a,0xef1f3842,0xde1e3139,0xc31c282e,0x9b1a1a1a,0x87191919,0x73161616,
+ 0x5a141414,0x42131313,0x2d111111,0x1b090909,0xe000000,0x7000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,0x2000000,0x7242424,0xe121212,
+ 0x18151515,0x26141414,0x38171717,0x4a151515,0x5d161616,0x6f171717,0x7e181818,0x8b1a1a1a,0x9c3a3a3a,0xa9575757,0xa74c4c4c,0x9f3a3a3a,0x98353535,0x8a252525,
+ 0x7d181818,0x6c151515,0x5b141414,0x49111111,0x350e0e0e,0x250e0e0e,0x170b0b0b,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0x1000000,0x2000000,0x62b2b2b,0xb171717,0x120e0e0e,0x1d121212,0x29131313,0x37131313,0x44131313,0x4f131313,0x59141414,0x60181818,0x65171717,
+ 0x66171717,0x64141414,0x5f151515,0x58141414,0x4e141414,0x420f0f0f,0x350e0e0e,0x280d0d0d,0x1c090909,0x120e0e0e,0xa000000,0x5000000,0x2000000,0x1000000,
+ 0xffffff,0xffffff
+};
+
+static const QRgb SettingsIcon_data[] = {
+ 0xff889157,0xff899258,0xff899258,0xff889156,0xff879152,0xff86904e,0xff848f48,0xff828d41,0xff7f8d38,0xff7c8b2e,0xff7a8925,0xff79881d,0xff74831b,0x24000000,
+ 0xff899258,0xffd5e57b,0xffd5e57b,0xffd4e478,0xffd1e370,0xffc2d461,0xff6e783c,0xff8d8f8a,0xff939493,0xff575e31,0xff93a816,0xffa7c108,0xff6f7d1b,0x6b000000,
+ 0xff899258,0xffd5e57b,0xffd5e57a,0xffd3e476,0xffd1e36d,0xffc7d95f,0xff7a8440,0xff97989b,0xffe3e3ed,0xffadadb3,0xff3c4124,0xff879a1a,0xff6a781b,0x8f000000,
+ 0xff889156,0xffd4e478,0xffd3e476,0xffd1e370,0xffcfe166,0xffcbdf58,0xffbed247,0xff69742b,0xff8c8d8e,0xffd7d7e2,0xff6d6d73,0xff4d571e,0xff64711b,0x8f000000,
+ 0xff879152,0xffd1e370,0xffd1e36d,0xffa5b458,0xffaebe52,0xffc6dc48,0xffbdd335,0xffa8be23,0xff4c541d,0xffbdbdc5,0xff9f9fa5,0xff2e311e,0xff5f6b1b,0x8f000000,
+ 0xff86904e,0xffcee164,0xffc1d25c,0xff60634e,0xff6a7051,0xffa1b435,0xffb9d123,0xffb3cf03,0xff515d0d,0xffc3c3c8,0xff9c9ca4,0xff1a1d12,0xff59641b,0x8f000000,
+ 0xff848f48,0xffcbdf58,0xff909f42,0xffa5a5a9,0xffc3c3cb,0xff5b613f,0xff8a9e0d,0xff76870c,0xff818473,0xffd9d9e0,0xffb1b1b9,0xff303130,0xff545f1b,0x8f000000,
+ 0xff828d41,0xffc6dc48,0xffa3b63c,0xff72736e,0xffe0e0ea,0xffb8b8c0,0xff676a5c,0xff8c8d84,0xffd5d5db,0xffb6b6bd,0xffacacb4,0xff96969c,0xff515b1b,0x8f000000,
+ 0xff7f8d38,0xffc0d834,0xffbbd329,0xff667320,0xff717175,0xffc3c3cb,0xffd8d8e1,0xffdfdfe8,0xffc0c0ca,0xff9d9da4,0xffc5c5cb,0xffc9c9d2,0xff4e581b,0x8f000000,
+ 0xff7c8b2e,0xffbcd61e,0xffb6d00d,0xffa0b710,0xff525d1a,0xff3b3c36,0xff525256,0xff606065,0xff9e9ea6,0xffbdbdc5,0xffe7e7ec,0xffececf1,0xff4c541b,0x8f000000,
+ 0xff7a8925,0xffb6d203,0xffadc900,0xffa0b806,0xff8c9f13,0xff6a7722,0xff4e5627,0xff2e3317,0xff3f403f,0xffa5a5ad,0xffd5d5dc,0xfff3f3f6,0xff4b531b,0x8f000000,
+ 0xff79881d,0xffaeca00,0xffa5bf00,0xff9ab203,0xff8da206,0xff7d8f0f,0xff707f1a,0xff667222,0xff464e1b,0xff434540,0xffb1b1b9,0xffdadae3,0xff4c541b,0x8f000000,
+ 0xff74831b,0xff6f7d1b,0xff6a781b,0xff64711b,0xff5f6b1b,0xff59641b,0xff545f1b,0xff515b1b,0xff4e581b,0xff4c541b,0xff4b531b,0xff4c541b,0xff4d571b,0x8f000000,
+ 0x24000000,0x6b000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x6b000000
+};
+
+static const QRgb Shutdown_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3000000,0x6000000,0xb000000,0x12000000,0x19000000,0x21000000,0x29000000,0x2f000000,
+ 0x34000000,0x37000000,0x38000000,0x37000000,0x34000000,0x2f000000,0x29000000,0x21000000,0x19000000,0x12000000,0xb000000,0x6000000,0x3000000,0x1000000,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,
+ 0x5d9a5254,0x93c36569,0xbed86d71,0xdee47175,0xf3ec7075,0xfef16f73,0xf3eb6669,0xe0e25d5f,0xc4d04f53,0x9fb44042,0x70832a2e,0x3f000000,0x33000000,0x26000000,
+ 0x1b000000,0x11000000,0xa000000,0x5000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,
+ 0x16000000,0x23000000,0x6fb26366,0xbad9787b,0xf5f18388,0xfff38386,0xfff27e82,0xffee797b,0xffed7276,0xffec6d70,0xffec656a,0xffed6065,0xffef5a5e,0xfff05258,
+ 0xf7ec4a4f,0xc6cb393e,0x88942529,0x45000000,0x33000000,0x23000000,0x16000000,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,
+ 0x2000000,0x7000000,0xe000000,0x1a000000,0x478a4e4f,0xa7d4787a,0xf5f38a8d,0xfff6898d,0xfff5888c,0xfff28285,0xffed7b7f,0xffe87578,0xffe36d71,0xffe1666a,
+ 0xffe36165,0xffe75b60,0xffeb545a,0xffee4e53,0xfff1484d,0xfff24047,0xf8eb373e,0xbcbc272b,0x6c5f1013,0x3e000000,0x2a000000,0x1a000000,0xe000000,0x7000000,
+ 0x2000000,0x1000000,0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x5fa96163,0xc6e18183,0xfff78d90,0xfff78c8e,0xfff68b8d,0xfff3868a,0xffee7f82,
+ 0xffe7797b,0xffde7073,0xffd76669,0xffd46063,0xffd75a5d,0xffdd5659,0xffe34f54,0xffeb4a4e,0xffee4248,0xfff03b41,0xfff13338,0xfff02a31,0xd7cb1f25,0x85791216,
+ 0x46000000,0x2e000000,0x1b000000,0xe000000,0x6000000,0x2000000,0x1000000,0x5000000,0xd000000,0x1a000000,0x5fa96163,0xd0e58387,0xfff78d91,0xfff68d8f,
+ 0xfff68c8e,0xfff48a8d,0xffef8488,0xffe87c7f,0xffdc7175,0xffd1686b,0xffffffff,0xffffffff,0xffffffff,0xffcf4d51,0xffd9484c,0xffe34248,0xffec3d41,0xffee3539,
+ 0xffef2b33,0xffee242b,0xffe9232a,0xe0c71e24,0x8a701214,0x48000000,0x2e000000,0x1a000000,0xd000000,0x5000000,0x3000000,0xa000000,0x16000000,0x478a4e4f,
+ 0xc6e18183,0xfff78d91,0xfff68d90,0xfff58d8f,0xfff38a8d,0xfff0878a,0xffe87e82,0xffdd7779,0xffd06a6d,0xffc46063,0xffffffff,0xffffffff,0xffffffff,0xffc24549,
+ 0xffcd4045,0xffda3b41,0xffe3343b,0xffeb2d34,0xffec252b,0xffe8232a,0xffe32329,0xffdf2228,0xdbb61b22,0x7b4c0c0d,0x46000000,0x2a000000,0x16000000,0xa000000,
+ 0x6000000,0x11000000,0x23000000,0xa7d4787a,0xfff78d90,0xfff68d8f,0xfff48d8e,0xfff18b8d,0xffed8588,0xffe78084,0xffdd787b,0xffd16e71,0xffc16164,0xffb5575a,
+ 0xffffffff,0xffffffff,0xffffffff,0xffb33d40,0xffbe373c,0xffcd3337,0xffd92d33,0xffe1252d,0xffe02229,0xffdf2228,0xffdd2228,0xffd92028,0xffd52027,0xc89a171b,
+ 0x60000000,0x3e000000,0x23000000,0x11000000,0xb000000,0x1b000000,0x6fb26366,0xf5f38a8d,0xfff68c8e,0xfff58b8d,0xfff1898c,0xffec8487,0xffe27d81,0xffda777a,
+ 0xffcf6f72,0xffcb7f82,0xffd5a7a8,0xffa74e51,0xffffffff,0xffffffff,0xffffffff,0xffa63437,0xffd39496,0xffc85156,0xffca2429,0xffd22027,0xffd32025,0xffd52027,
+ 0xffd31f25,0xffd22027,0xffcd1f25,0xf9c41d23,0xa2691013,0x55000000,0x33000000,0x1b000000,0x12000000,0x26000000,0xbad9787b,0xfff6898d,0xfff68b8d,0xfff3898c,
+ 0xffed8588,0xffe27d81,0xffd67578,0xffcb6e70,0xffd9a7a8,0xfff0e2e2,0xffffffff,0xff9b4749,0xffffffff,0xffffffff,0xffffffff,0xff9a2e31,0xffffffff,0xfff0d9da,
+ 0xffd68486,0xffbf1d23,0xffc21e24,0xffc81e24,0xffcb1f25,0xffcb1f25,0xffc71e24,0xffc31e23,0xd796161b,0x6c000000,0x45000000,0x26000000,0x19000000,0x5d9a5254,
+ 0xf5f28488,0xfff5888c,0xfff3868a,0xffee8387,0xffe47c80,0xffd87579,0xffc86c6e,0xffddb3b5,0xfffefefe,0xffffffff,0xffffffff,0xff974245,0xffffffff,0xffffffff,
+ 0xffffffff,0xff95282b,0xffffffff,0xffffffff,0xfffefdfd,0xffd69597,0xffb21a20,0xffba1d22,0xffbd1d23,0xffc11d23,0xffbf1e23,0xffbd1d22,0xfab31b20,0x9b4c0c0f,
+ 0x56000000,0x33000000,0x21000000,0x93c4676a,0xfff68487,0xfff58487,0xfff18184,0xffe97d80,0xffdd7679,0xffcc6c6f,0xffd7a5a7,0xfffefefe,0xffffffff,0xffffffff,
+ 0xffefe4e4,0xff963e41,0xffffffff,0xffffffff,0xffffffff,0xff942327,0xffefe0e0,0xffffffff,0xffffffff,0xfffefdfd,0xffc88284,0xffa91a1f,0xffb11b20,0xffb61b22,
+ 0xffb71d20,0xffb51b20,0xffb21b20,0xc2711214,0x67000000,0x3f000000,0x29000000,0xbeda6f73,0xfff68084,0xfff47f83,0xffee7c80,0xffe47679,0xffd56d70,0xffcb7c7e,
+ 0xfff0e1e2,0xffffffff,0xffffffff,0xffd8b9ba,0xffae6b6c,0xff9b3c3e,0xffffffff,0xffffffff,0xffffffff,0xff9a1e23,0xffaa4d50,0xffd4aaac,0xffffffff,0xffffffff,
+ 0xffebd7d8,0xffab4548,0xffa4191e,0xffab1a1f,0xffad1a1f,0xffad1a1f,0xffac1a1f,0xde841419,0x75000000,0x4a000000,0x2f000000,0xdee77376,0xfff57b7e,0xfff27a7c,
+ 0xffeb7779,0xffdd6e72,0xffcb6468,0xffd8a7a8,0xffffffff,0xffffffff,0xfff1e4e5,0xffb56c6e,0xffa43f42,0xffa6393d,0xffffffff,0xffffffff,0xffffffff,0xffa3191e,
+ 0xff9a171b,0xffa64d4f,0xffeedfdf,0xffffffff,0xffffffff,0xffc28a8c,0xff97171b,0xffa0191e,0xffa4191e,0xffa4191e,0xffa4191e,0xef91161a,0x81000000,0x53000000,
+ 0x34000000,0xf3ef7377,0xfff5767a,0xfff27478,0xffe86e72,0xffda666a,0xffc65b5e,0xffe7cccd,0xffffffff,0xffffffff,0xffd7b0b1,0xffac4045,0xffb03d40,0xffb4373b,
+ 0xffffffff,0xffffffff,0xffffffff,0xffa91a1e,0xff9e171d,0xff93161a,0xffcba1a3,0xffffffff,0xffffffff,0xffdabebf,0xff8c1419,0xff95171a,0xff9c171d,0xff9e191d,
+ 0xff9d171d,0xf997161b,0x89000000,0x59000000,0x37000000,0xfef47175,0xfff57175,0xfff06d71,0xffe6686b,0xffd65e62,0xffc25357,0xfff5ebeb,0xffffffff,0xffffffff,
+ 0xffc47f81,0xffb43c3f,0xffbc383c,0xffc13136,0xffffffff,0xffffffff,0xffffffff,0xffae1a20,0xffa2191d,0xff93161b,0xffac696b,0xffffffff,0xffffffff,0xfff0e6e7,
+ 0xff831317,0xff8c1619,0xff93161b,0xff97171d,0xff98171b,0xfe97171b,0x8e000000,0x5e000000,0x38000000,0xf3ee676b,0xfff4696e,0xfff0676b,0xffe56063,0xffd3565b,
+ 0xffc04b4f,0xfffefdfd,0xffffffff,0xffffffff,0xffb65256,0xffb93538,0xffc53135,0xffcd2a30,0xffce1f25,0xffc71e23,0xffbe1d23,0xffb31a20,0xffa3191e,0xff91161a,
+ 0xff91383b,0xffffffff,0xffffffff,0xfffdfdfd,0xff7b1216,0xff851419,0xff8d161a,0xff90161b,0xff92161a,0xfa8c1419,0x90000000,0x5f000000,0x37000000,0xe0e45e61,
+ 0xfff36368,0xffef5e63,0xffe5595c,0xffd54f53,0xffc14348,0xfff5e9ea,0xffffffff,0xffffffff,0xffc57679,0xffb92b30,0xffc7272d,0xffd12027,0xffcd1f25,0xffc61e24,
+ 0xffbd1d22,0xffaf1a20,0xff9d171d,0xff8a1419,0xffa5686a,0xffffffff,0xffffffff,0xffeee6e6,0xff771316,0xff801317,0xff871419,0xff8c161a,0xff8d161a,0xf27b1317,
+ 0x8e000000,0x5e000000,0x34000000,0xc4d15054,0xfff35b60,0xfff0575c,0xffe65054,0xffd7484c,0xffc43e41,0xffe7c5c6,0xffffffff,0xffffffff,0xffd7a6a7,0xffb21f24,
+ 0xffbd1d22,0xffc41d23,0xffc41d24,0xffbd1d22,0xffb21b20,0xffa4191d,0xff90161a,0xff7e1317,0xffc2a0a1,0xffffffff,0xffffffff,0xffd3bebe,0xff741214,0xff7d1317,
+ 0xff831317,0xff871419,0xff881419,0xe56a1013,0x89000000,0x59000000,0x2f000000,0x9fb64045,0xfff35359,0xffef4e53,0xffe8494e,0xffdb4045,0xffc9363c,0xffd79395,
+ 0xffffffff,0xffffffff,0xfff1dfe0,0xffb74e51,0xffad1a1f,0xffb11a1f,0xffb21b20,0xffad1a1f,0xffa2191d,0xff93161a,0xff821417,0xff8f4a4c,0xffe8dedf,0xffffffff,
+ 0xffffffff,0xffb08889,0xff721214,0xff7a1316,0xff7f1317,0xff811417,0xff851419,0xd1510c0f,0x81000000,0x53000000,0x29000000,0x70832a2e,0xf7ed4a4f,0xfff0484d,
+ 0xffeb4147,0xffe0393f,0xffd13036,0xffc84f53,0xffefd9d9,0xffffffff,0xffffffff,0xffd6abac,0xffae4d51,0xff9d171d,0xff9d171d,0xff97171b,0xff8e161a,0xff821317,
+ 0xff904a4d,0xffc4a9a9,0xffffffff,0xffffffff,0xffe3d7d7,0xff844041,0xff731216,0xff791216,0xff7d1317,0xff801317,0xfc7d1216,0xb5300808,0x75000000,0x4a000000,
+ 0x21000000,0x3f000000,0xc6cb393e,0xfff14047,0xffec3940,0xffe43337,0xffd8292f,0xffc82227,0xffd28385,0xfffefdfd,0xffffffff,0xffffffff,0xffeedfdf,0xffcca1a3,
+ 0xffae696b,0xff92383c,0xffa5686a,0xffc2a0a1,0xffe8dedf,0xffffffff,0xffffffff,0xfffefdfd,0xffa87e80,0xff6d1213,0xff741214,0xff7a1216,0xff7b1317,0xff7e1317,
+ 0xe6600f12,0x93000000,0x67000000,0x3f000000,0x19000000,0x33000000,0x88942529,0xf8ea373e,0xffee3137,0xffe82a31,0xffdf2329,0xffce1f25,0xffbc1d22,0xffd39597,
+ 0xfffefdfd,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefdfd,0xffb49193,0xff6b1013,0xff721014,
+ 0xff761216,0xff7a1316,0xff7b1317,0xfc7a1216,0xc33b080a,0x81000000,0x56000000,0x33000000,0x12000000,0x26000000,0x45000000,0xbcbc272b,0xffef2a31,0xffeb242a,
+ 0xffe02229,0xffd12025,0xffc21e24,0xffb21a20,0xffc88284,0xffebd7d8,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe3d7d7,
+ 0xffa87e80,0xff6b1013,0xff701014,0xff741216,0xff781216,0xff7a1316,0xff7b1316,0xdf540d10,0x94000000,0x6c000000,0x45000000,0x26000000,0xb000000,0x1b000000,
+ 0x33000000,0x6c5f1013,0xd7ca1f25,0xffe8232a,0xffdf2228,0xffd52027,0xffc71e23,0xffba1d22,0xffaa1a1f,0xffac4548,0xffc38a8c,0xffdabebf,0xfff0e6e7,0xfffdfdfd,
+ 0xffeee6e6,0xffd4bebe,0xffb18889,0xff854041,0xff6f1214,0xff721014,0xff741216,0xff781216,0xff791316,0xff7a1316,0xed620f12,0xae220506,0x7b000000,0x55000000,
+ 0x33000000,0x1b000000,0x6000000,0x11000000,0x23000000,0x3e000000,0x85791216,0xe0c61e24,0xffdd2228,0xffd51f27,0xffcb1f25,0xffbf1d23,0xffb31b20,0xffa5191e,
+ 0xff9a171d,0xff8f161a,0xff851417,0xff7e1316,0xff7a1317,0xff771216,0xff761216,0xff741216,0xff751214,0xff771216,0xff781216,0xff791316,0xff7a1316,0xf0660f12,
+ 0xbc300608,0x85000000,0x60000000,0x3e000000,0x23000000,0x11000000,0x3000000,0xa000000,0x16000000,0x2a000000,0x46000000,0x8a701214,0xdbb61b22,0xffd22027,
+ 0xffcb1f25,0xffc21d23,0xffb81d22,0xffad1a1f,0xffa2191e,0xff99171b,0xff90161a,0xff881419,0xff831417,0xff7f1317,0xff7d1316,0xff7b1317,0xff7a1216,0xff7a1316,
+ 0xff7b1317,0xff7a1316,0xed620f12,0xbc300608,0x88000000,0x66000000,0x46000000,0x2a000000,0x16000000,0xa000000,0x1000000,0x5000000,0xd000000,0x1a000000,
+ 0x2e000000,0x48000000,0x7b4c0c0d,0xc89a171b,0xf9c31d23,0xffc01e23,0xffba1d20,0xffb01a1f,0xffa7191e,0xff9d171d,0xff97171b,0xff90161b,0xff8b141a,0xff861419,
+ 0xff831317,0xff7f1417,0xff7e1317,0xff7c1317,0xfc7a1216,0xdf540d10,0xae220506,0x85000000,0x66000000,0x48000000,0x2e000000,0x1a000000,0xd000000,0x5000000,
+ 0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x2e000000,0x46000000,0x60000000,0xa2691013,0xd795161b,0xfab21b20,0xffb11b20,0xffaa1a1f,0xffa3191e,
+ 0xff9a171d,0xff95171b,0xff8f161a,0xff8c161a,0xff861419,0xff841419,0xfc7d1216,0xe6600f12,0xc33b080a,0x94000000,0x7b000000,0x60000000,0x46000000,0x2e000000,
+ 0x1b000000,0xe000000,0x6000000,0x2000000,0xffffff,0x1000000,0x2000000,0x7000000,0xe000000,0x1a000000,0x2a000000,0x3e000000,0x55000000,0x6c000000,
+ 0x9b4c0c0f,0xc2711214,0xde841419,0xef91161a,0xf997161b,0xfe97171b,0xfa8c1419,0xf27b1317,0xe56a1013,0xd1510c0f,0xb5300808,0x93000000,0x81000000,0x6c000000,
+ 0x55000000,0x3e000000,0x2a000000,0x1a000000,0xe000000,0x7000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,
+ 0x16000000,0x23000000,0x33000000,0x45000000,0x56000000,0x67000000,0x75000000,0x81000000,0x89000000,0x8e000000,0x90000000,0x8e000000,0x89000000,0x81000000,
+ 0x75000000,0x67000000,0x56000000,0x45000000,0x33000000,0x23000000,0x16000000,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,0x33000000,0x3f000000,0x4a000000,0x53000000,0x59000000,0x5e000000,
+ 0x5f000000,0x5e000000,0x59000000,0x53000000,0x4a000000,0x3f000000,0x33000000,0x26000000,0x1b000000,0x11000000,0xa000000,0x5000000,0x2000000,0x1000000,
+ 0xffffff,0xffffff
+};
+
+static const QRgb Snake_data[] = {
+ 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
+ 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
+ 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff522300,0xff522300,0xff522300,0xff522300,
+ 0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,
+ 0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
+ 0xff522300,0xff282d0c,0xff285b16,0xff326f18,0xff42a025,0xff409d25,0xff2f6213,0xff337219,0xff2e6415,0xff3b8a1e,0xff43a325,0xff38861e,0xff367f1d,0xff3f9824,
+ 0xff234b10,0xff2b5b12,0xff326e18,0xff387d1a,0xff2f6615,0xff2b5711,0xff255112,0xff254e0f,0xff326a15,0xff2e5e12,0xff1c3609,0xff0d4b00,0xff522300,0x5c000000,
+ 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff522300,0xff347117,0xff126d00,0xff0c3d00,0xff072000,0xff093200,0xff126000,0xff157b00,0xff147500,0xff178100,
+ 0xff199d00,0xff126e00,0xff116800,0xff0b4000,0xff093100,0xff115e00,0xff146a00,0xff115b00,0xff0d3b00,0xff105200,0xff0f4b00,0xff146300,0xff1a9400,0xff1da800,
+ 0xff105600,0xff062600,0xff522300,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff522300,0xff1e450e,0xff0e5600,0xff126f00,0xff0e5300,0xff0f5800,
+ 0xff115e00,0xff157f00,0xff126600,0xff0e5900,0xff0d4f00,0xff062400,0xff083300,0xff0a3d00,0xff0a3600,0xff0f5500,0xff0d4a00,0xff0d4400,0xff0c4200,0xff0f4e00,
+ 0xff0e4b00,0xff0f5800,0xff167700,0xff178400,0xff0e5000,0xff051a00,0xff522300,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff522300,0xff122a08,
+ 0xff0c4900,0xff0e5e00,0xff0c5200,0xff0c4d00,0xff0c4e00,0xff0c5300,0xff083800,0xff072e00,0xff062a00,0xff052200,0xff052000,0xff062500,0xff062300,0xff072400,
+ 0xff072700,0xff0d5600,0xff105f00,0xff116400,0xff0b3600,0xff0c4000,0xff147500,0xff1a9600,0xff147400,0xff0d4b00,0xff522300,0x93000000,0x62000000,0x3b000000,
+ 0x1f000000,0x3d000000,0xff522300,0xff143508,0xff073700,0xff094700,0xff084a00,0xff063600,0xff042100,0xff042600,0xff021300,0xff021400,0xff021200,0xff021900,
+ 0xff021b00,0xff021c00,0xff021b00,0xff020f00,0xff031a00,0xff073400,0xff083a00,0xff0a4500,0xff051b00,0xff041400,0xff0e5900,0xff147800,0xff189600,0xff116600,
+ 0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff0b3206,0xff032c00,0xff032e00,0xff022800,0xff011100,0xff010f00,0xff000b00,
+ 0xff000d00,0xff001600,0xff001400,0xff000e00,0xff000c00,0xff000b00,0xff011400,0xff011600,0xff011a00,0xff022100,0xff032700,0xff042c00,0xff052c00,0xff052600,
+ 0xff093a00,0xff0f6100,0xff127200,0xff093700,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff041c02,0xff011200,0xff001300,
+ 0xff000f00,0xff001000,0xff001900,0xff001800,0xff0a1b07,0xff182f0e,0xff293a1d,0xff384427,0xff435030,0xff3f4b27,0xff35451d,0xff273810,0xff1b320a,0xff061901,
+ 0xff000f00,0xff010f00,0xff021800,0xff021800,0xff042100,0xff052400,0xff062600,0xff083000,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff522300,0xff021000,0xff001600,0xff001b00,0xff001800,0xff001500,0xff061f04,0xff365025,0xff7f9354,0xffaeb874,0xffabac96,0xff9c9c93,0xff7e7e79,0xff4e4e49,
+ 0xff1b1a10,0xff232314,0xff4a4f24,0xff485c15,0xff273d0b,0xff0a1f02,0xff001a00,0xff000f00,0xff010f00,0xff010c00,0xff021300,0xff052500,0xff522300,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff021200,0xff001700,0xff001c00,0xff001c00,0xff0c2209,0xff799359,0xffbbc988,0xffd9da95,0xffcbc891,
+ 0xffa2a19b,0xff919191,0xff696969,0xff212121,0xff000000,0xff111006,0xff726c22,0xffa8b528,0xff97b621,0xff527b09,0xff1f4103,0xff031300,0xff000900,0xff000700,
+ 0xff010e00,0xff031b00,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff031601,0xff001800,0xff001900,0xff001700,0xff89a168,
+ 0xffe1ebb3,0xffebeebb,0xffe9e9a0,0xffc2be99,0xff95948e,0xff818181,0xff4b4b4b,0xff000000,0xff000000,0xff443e14,0xffad9f2d,0xffbdc927,0xffb7d138,0xff8eba01,
+ 0xff7ea32c,0xff2e5305,0xff050f01,0xff000500,0xff000a00,0xff010700,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff051b02,
+ 0xff001000,0xff000e00,0xff374b29,0xffe2eebc,0xffdfe9a5,0xffe1e69a,0xffe5e595,0xffb6af6f,0xff797979,0xff616161,0xff1c1c1c,0xff000000,0xff030201,0xff918743,
+ 0xffc4bc29,0xffc0cb2c,0xff9fb412,0xffb5cd4c,0xff7db20c,0xff5f9816,0xff204204,0xff020600,0xff000a00,0xff010c00,0xff522300,0x99000000,0x66000000,0x3d000000,
+ 0x1f000000,0x3d000000,0xff522300,0xff081e03,0xff010b00,0xff26371c,0xffadc586,0xffdfecb4,0xffd3e096,0xffd8df80,0xffe6e192,0xffa39951,0xff5e5d59,0xff383837,
+ 0xff000000,0xff000000,0xff2c2605,0xffc0af61,0xffc1bc18,0xffc3d036,0xffb9d23a,0xffbdc969,0xff8cbd2f,0xff6aa71b,0xff4b8318,0xff0f2803,0xff010e00,0xff021200,
+ 0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff091e03,0xff011300,0xff81a261,0xffc2dc94,0xffcee191,0xffc7d27f,0xffdae185,
+ 0xffd5d85a,0xffa39f3d,0xff59563a,0xff181818,0xff000000,0xff000000,0xff564e1a,0xffb8ae06,0xffd4d154,0xffbdce2b,0xff91a301,0xff78a800,0xff639c00,0xff57940f,
+ 0xff60972e,0xff1e4b04,0xff011000,0xff031500,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff154007,0xff042000,0xff96bb69,
+ 0xffbdd88a,0xffb3cf73,0xffd7ddad,0xffced973,0xffbcc729,0xff9c9916,0xff514f25,0xff080807,0xff000000,0xff080700,0xff716b26,0xffc2c627,0xffb2bd01,0xffa5be01,
+ 0xff9ec316,0xff8aba1f,0xff478400,0xff3f7d01,0xff609137,0xff3e6923,0xff032000,0xff052200,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff522300,0xff1e630a,0xff0b4600,0xff8db163,0xffa3c072,0xffa1c35b,0xffb9ce70,0xff9ebc28,0xffc3cf51,0xff9c9c07,0xff595913,0xff030300,0xff000000,0xff131301,
+ 0xff626200,0xffa4af00,0xffa4bb00,0xffb3ce37,0xff9cc623,0xff5f9900,0xff5f9919,0xff2d6a00,0xff052400,0xff072e02,0xff093900,0xff083b00,0xff522300,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff2c8e0e,0xff177a00,0xff5b8c31,0xff749945,0xff78a233,0xff75a220,0xff96b835,0xff819a03,0xff9bb310,
+ 0xff727d20,0xff070800,0xff000000,0xff090900,0xff596300,0xff90a300,0xffbecc52,0xff9cc423,0xff8fbe25,0xff4f8c00,0xff236100,0xff568535,0xff5a7e3e,0xff174902,
+ 0xff106000,0xff106100,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff3aad12,0xff21a700,0xff327810,0xff426e1b,0xff627f37,
+ 0xff6b8d2d,0xff618c08,0xff709710,0xff678900,0xff637e01,0xff30390a,0xff010100,0xff050601,0xff595e2b,0xff7a9d00,0xff85b107,0xff74a601,0xff9ab056,0xff427e02,
+ 0xff748651,0xff6a7a4e,0xff2d5f12,0xff3c5e26,0xff188400,0xff178100,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff42b818,
+ 0xff26ba00,0xff27a203,0xff265a04,0xff1d4900,0xff255100,0xff4f6c27,0xff426a06,0xff476e00,0xff567c0b,0xff415c01,0xff111604,0xff000000,0xff253500,0xff598102,
+ 0xff568800,0xff3a6400,0xff3f7606,0xff184c00,0xff002a00,0xff002100,0xff3e6627,0xff155f03,0xff1c9300,0xff178100,0xff522300,0x99000000,0x66000000,0x3d000000,
+ 0x1f000000,0x3d000000,0xff522300,0xff44ae19,0xff27b800,0xff25b600,0xff28a002,0xff274f0f,0xff1d4006,0xff153800,0xff2d4f11,0xff1c3700,0xff315408,0xff3d6014,
+ 0xff172c00,0xff020400,0xff0a1200,0xff284a00,0xff1f4500,0xff586f38,0xff335e19,0xff2f591a,0xff093100,0xff012800,0xff265a11,0xff1d8e01,0xff1e9800,0xff157100,
+ 0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff4eb821,0xff26c000,0xff25b500,0xff23a800,0xff229701,0xff164701,0xff1a380c,
+ 0xff153306,0xff203b10,0xff203f0c,0xff1f3f0a,0xff264411,0xff071500,0xff040800,0xff202c14,0xff062400,0xff0c2c00,0xff0e2e00,0xff404931,0xff022100,0xff124203,
+ 0xff1d8202,0xff1c8b00,0xff1a8000,0xff0c4600,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff4fbd26,0xff20b000,0xff1b8300,
+ 0xff1d9100,0xff1f9700,0xff1d8d00,0xff1e6c02,0xff1a4406,0xff15300a,0xff0a2300,0xff051d00,0xff0c2600,0xff233118,0xff071501,0xff020c00,0xff021400,0xff1a3511,
+ 0xff000900,0xff17350a,0xff194b06,0xff176b01,0xff146900,0xff156200,0xff135f00,0xff093300,0xff522300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff522300,0xff3b861a,0xff146c00,0xff198600,0xff1da200,0xff1a8e00,0xff1c9300,0xff20a300,0xff24b900,0xff195f02,0xff0c2f01,0xff0d2704,0xff0f2807,0xff0e2607,
+ 0xff122a0c,0xff071601,0xff10220a,0xff0c2801,0xff0e3303,0xff124703,0xff145d00,0xff146500,0xff0a3a00,0xff0d3d00,0xff135e00,0xff0b3b00,0xff522300,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff522300,0xff2f6c17,0xff198a00,0xff1da400,0xff20c200,0xff1fb900,0xff1a9100,0xff188200,0xff177b00,0xff136500,
+ 0xff198700,0xff1a7f02,0xff196d02,0xff1c8103,0xff1d7506,0xff165a04,0xff124803,0xff0e4401,0xff072d00,0xff072d00,0xff082d00,0xff0f5300,0xff093900,0xff072100,
+ 0xff0a3700,0xff0b3900,0xff522300,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff522300,0xff46ae2a,0xff1ca600,0xff1b9a00,0xff21d100,0xff1fba00,
+ 0xff136200,0xff156f00,0xff146e00,0xff157400,0xff1a9d00,0xff188c00,0xff157400,0xff1b9d00,0xff1eb200,0xff136700,0xff135900,0xff125300,0xff0c4200,0xff041e00,
+ 0xff041b00,0xff105e00,0xff177a00,0xff0b3a00,0xff052100,0xff051a00,0xff522300,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff522300,0xff1db500,
+ 0xff116700,0xff0e4b00,0xff0e5400,0xff0c4200,0xff0e4e00,0xff116700,0xff0d4f00,0xff0c4500,0xff127300,0xff127300,0xff0e5900,0xff0b4200,0xff0c4a00,0xff0b3e00,
+ 0xff106000,0xff0b3700,0xff072700,0xff031300,0xff031000,0xff0b3c00,0xff0f5800,0xff093600,0xff041a00,0xff030e00,0xff522300,0x87000000,0x5a000000,0x36000000,
+ 0x17000000,0x2e000000,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,
+ 0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,0xff522300,
+ 0xff522300,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
+ 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,
+ 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
+ 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
+ 0x18000000,0xf000000
+};
+
+static const QRgb Solitaire_data[] = {
+ 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
+ 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
+ 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff0a4c00,0xff084700,0xff074100,0xff074100,
+ 0xff074000,0xff074000,0xff073f00,0xff073e00,0xff063d00,0xff063c00,0xff063b00,0xff063b00,0xff063c00,0xff063d00,0xff063d00,0xff073e00,0xff073f00,0xff073f00,
+ 0xff074000,0xff074000,0xff074000,0xff074000,0xff074000,0xff073f00,0xff063e00,0xff043500,0xff012100,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
+ 0xff084700,0xff87c28d,0xff53a75c,0xff52a75b,0xff52a55b,0xff50a259,0xff4e9d56,0xff4b9753,0xff48914f,0xff458c4d,0xff44894b,0xff43884b,0xff448a4c,0xff468e4e,
+ 0xff489250,0xff4b9753,0xff4c9a54,0xff4e9e57,0xff4fa058,0xff50a259,0xff51a35a,0xff51a45a,0xff51a35a,0xff50a058,0xff4f9b57,0xff177220,0xff010d00,0x5c000000,
+ 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff074100,0xff53a75c,0xff158821,0xff158720,0xff148420,0xff14801f,0xff13791d,0xff11701b,0xff106819,0xff0f6117,
+ 0xff0e5d17,0xff0e5d16,0xff0f5f17,0xff0f6318,0xff106819,0xff116d1a,0xff12721c,0xff12771d,0xff137b1d,0xff137e1e,0xff14801f,0xff158221,0xff148120,0xff178021,
+ 0xff177a21,0xff135019,0xff000500,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff074000,0xff52a55b,0xff158620,0xff148420,0xff14801f,0xff13791d,
+ 0xff116f1b,0xff0f6318,0xff0d5715,0xff0c4e13,0xff0b4812,0xff0b4711,0xff0b4a12,0xff0c4f13,0xff0d5414,0xff0e5b16,0xff0f6118,0xff106819,0xff116d1a,0xff12721c,
+ 0xff12771d,0xff147b1f,0xff147c1f,0xff15781f,0xff177421,0xff134c19,0xff010600,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff073e00,0xff4fa158,
+ 0xff14821f,0xff147f1f,0xff137a1d,0xff11701b,0xff106419,0xff185b1e,0xff1c5121,0xff28522b,0xff456445,0xff365838,0xff284e2a,0xff506e4e,0xff426943,0xff306033,
+ 0xff4f7a51,0xff467a49,0xff327137,0xff568b58,0xff49894d,0xff38833e,0xff5a945b,0xff519055,0xff3b7e41,0xff476847,0xff031700,0x93000000,0x62000000,0x3b000000,
+ 0x1f000000,0x3d000000,0xff063b00,0xff4a9652,0xff137a1d,0xff12761c,0xff11701b,0xff0f6418,0xff3c7540,0xff8a9d84,0xffafb3a6,0xffcfcec3,0xffb7bbad,0xffbbbfb2,
+ 0xffd5d1c7,0xffcac6bc,0xffc0bab2,0xffd2ccc4,0xffcbccc2,0xffbabfb1,0xffcccac0,0xffcfcfc2,0xffb9bfaf,0xffcbcac0,0xffcecfc4,0xffaeb9a8,0xffa8a9a2,0xffa1a29b,
+ 0xff062d00,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff053400,0xff428549,0xff106b1a,0xff106819,0xff0f6117,0xff3e7440,0xffc3c0b0,0xffc8c5b8,
+ 0xffd3d9cd,0xffd1d6c9,0xffcfd2c6,0xffd4d3c9,0xffdad7ce,0xffdbd7cf,0xffdadad1,0xffd0d3c8,0xffd8d9cc,0xffd6d4c6,0xffd7d7cc,0xffd7d6cc,0xffd3d4cb,0xffd6d8cf,
+ 0xffd2d3cb,0xffc3c5bd,0xffb5b7b0,0xffa4a69f,0xff073100,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff042a00,0xff356c3b,0xff0d5715,0xff0d5414,
+ 0xff0f5015,0xff8da286,0xffd4cdbc,0xffdddbc8,0xffcdd5c7,0xffd6dbce,0xffe2e2d7,0xffd9d9ce,0xffd2d0c8,0xffd7d9d0,0xffd5dfd2,0xffd0e5d5,0xffd5e0cf,0xffdad8ce,
+ 0xffd7d8cf,0xffdddfd6,0xffdee0d6,0xffdbddd4,0xffd6d8d0,0xffcacbc3,0xffb5b6af,0xffa2a39c,0xff073200,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff032000,0xff28522d,0xff0a4110,0xff0a400f,0xff0d3d11,0xffaeb5a2,0xffcdcdbe,0xffd9dac8,0xffe0dfd4,0xfff0e9df,0xffdcd6cd,0xffe2e4db,0xffebebe1,0xffdae2d7,
+ 0xffdad6d2,0xffd6e7db,0xffd7dcd2,0xffdadcd4,0xffdbdcd4,0xffdee1d6,0xffdfe1d6,0xffdbddd4,0xffd5d8cf,0xffc9cac2,0xffb5b7b0,0xffa3a49e,0xff073100,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff021600,0xff1c391f,0xff072d0b,0xff072c0b,0xff0f3113,0xffaeb5a5,0xffd4d4c9,0xffd6d8ce,0xffe0e0d7,0xffbdada9,
+ 0xffae8e8d,0xffb1676e,0xffca9b98,0xffe0e3d7,0xffdee4df,0xffd8dbd6,0xffecd5d6,0xffe0e2d8,0xffdddfd6,0xffdde0d6,0xffdfe1d6,0xffddded5,0xffd7dad1,0xffcbcdc4,
+ 0xffb8bab2,0xffa3a59e,0xff073100,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff020f00,0xff142816,0xff052008,0xff051f08,0xff263c28,0xffbfc8bc,
+ 0xffd1d3c7,0xffd9e2da,0xffceb9ae,0xff93454e,0xffbc6d72,0xffbc827c,0xff9d404a,0xffc58b8c,0xffe0e3db,0xffddded9,0xffdde1dd,0xffdce7db,0xffe1e2d8,0xffe0e2d7,
+ 0xffe0e2d7,0xffe0e2d8,0xffdcded4,0xffcfd2c8,0xffbabdb5,0xffa5a7a1,0xff073300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff010c00,0xff0f1f11,
+ 0xff041806,0xff041806,0xff1c2d1d,0xffd0c0ba,0xffdcdbe4,0xffd6fbf9,0xffcc8b88,0xffc1606f,0xffedf6e8,0xffefffe4,0xffb9807a,0xffb15d66,0xffe8e8d9,0xffe2dfd9,
+ 0xffe1dcda,0xffe0e3dd,0xffe2e4d9,0xffe2e4d9,0xffe1e3d8,0xffdfe1d7,0xffdcded4,0xffd0d2c8,0xffbabcb4,0xffa5a6a0,0xff073300,0x99000000,0x66000000,0x3d000000,
+ 0x1f000000,0x3d000000,0xff010a00,0xff1d281d,0xff536054,0xff797c71,0xff44392c,0xffb0958c,0xffeaf2f0,0xffdbf4f2,0xffcc888a,0xffbe636b,0xffdcfff7,0xffe6ebd8,
+ 0xffd8a19d,0xffa14953,0xffe6f2db,0xffe9eae0,0xffddddd9,0xffe6dfdc,0xffe0e0d7,0xffe2e4d9,0xffe1e3d8,0xffdee0d6,0xffdbddd3,0xffd0d3c9,0xffbbbeb5,0xffa6a8a1,
+ 0xff073400,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff073200,0xffd9cfcc,0xffd9d7d0,0xffc7bfbd,0xff3c2a26,0xff9d9a86,0xffd1d3c7,0xffd9e2da,
+ 0xffceb9ae,0xffb25254,0xffe9eff6,0xffdceae2,0xffd09195,0xffbe5c68,0xffdedecd,0xffe1e0d8,0xffd8e5db,0xffdce9d8,0xffdbebd9,0xffe5e5dc,0xffe8e8dd,0xffe4e7dc,
+ 0xffdcded4,0xffdcd6d1,0xffc7c2ba,0xffa4a7a1,0xff073400,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff094100,0xffd5d4d0,0xffd8dad2,0xffd8e4d9,
+ 0xff292720,0xffb5bca2,0xffdcdbe4,0xffd6fbf9,0xffcc8b88,0xffb86e64,0xffe0e8df,0xffe2ffff,0xffc89796,0xffbb676d,0xffe4ebda,0xffe1eee6,0xffe7f1eb,0xffcfc5bc,
+ 0xffcdd3c0,0xfff0f1e8,0xffc6d2c8,0xffc7c4c3,0xffe5dddb,0xffcdb9bd,0xffa0a79f,0xffa6b2a9,0xff072e00,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff0a4200,0xffd2d1cd,0xffced8d2,0xffc4cfc5,0xff3a342e,0xffa7b19c,0xffeaf2f0,0xffdbf4f2,0xffcc888a,0xff892c2e,0xffbd8486,0xffe4e2dd,0xffe3bdb5,0xff983f4b,
+ 0xffe9f0e0,0xffcce0da,0xff696c6b,0xff8c7577,0xffa1958a,0xff707471,0xff788e86,0xff949996,0xff696665,0xff6e6c6a,0xff757d79,0xff5b5656,0xff041d00,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a4400,0xffcecdc9,0xffe8edea,0xffc5c0c0,0xff4a3a35,0xffa9ae9d,0xffe6e2d7,0xffcdf5e3,0xffcc9895,0xff9b2e3a,
+ 0xffb65667,0xffae5e63,0xffce8082,0xffb94756,0xffd6edda,0xffb5b7b4,0xff8a7c7f,0xffaaafa7,0xffb9c5b7,0xffd9d7cf,0xffe1c7c2,0xffc1b0a8,0xffc5d9ce,0xffbeb0ae,
+ 0xff979a98,0xff99a89d,0xff073300,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a4500,0xffd5d4d0,0xffdededb,0xffe0dadb,0xff423131,0xffb5baa6,
+ 0xffd2e5d6,0xffe7fcf2,0xffb47c7a,0xffca6f70,0xffd3c4b8,0xffb47e82,0xffa42132,0xffa05a5b,0xffe1ffe8,0xffb6bfb5,0xff73696b,0xffebfff7,0xffcbb9b6,0xffb34f5c,
+ 0xffb02d3b,0xffbe696b,0xffcf9d9b,0xffd1e5d6,0xffccd6ce,0xffa78d8e,0xff061100,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a4500,0xffd7d7d4,
+ 0xffe5e5e1,0xffd1cbcc,0xff37302f,0xff93a28e,0xffe9faeb,0xffe0f6ec,0xffcd838a,0xffaa4c4c,0xffffffff,0xffd0dad4,0xffa9353e,0xff81282d,0xfff4e4d0,0xffc6ccbe,
+ 0xff76706e,0xfff7d4d0,0xff8f1727,0xff7a020c,0xff76050a,0xff600101,0xff911923,0xffb9a190,0xffc5beac,0xff772531,0xff040500,0x99000000,0x66000000,0x3d000000,
+ 0x1f000000,0x3d000000,0xff0a4500,0xffd6d6d4,0xffeaebe7,0xffbcbab8,0xff2a2525,0xff998b81,0xfff8f8ea,0xffe8ece0,0xffd2b1a4,0xff9f2e39,0xffbe7077,0xffdca5ad,
+ 0xff9d4b49,0xff9b1826,0xffbb3d52,0xffc1a9a5,0xff869082,0xffb36b67,0xff750004,0xff6c0608,0xff6b090b,0xff70080c,0xff760207,0xff914646,0xffab6c66,0xff550b0e,
+ 0xff040600,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a4500,0xffd5d4d1,0xffdededa,0xffdbdbd8,0xff291f21,0xffb0b3a0,0xffe0e9d6,0xffdde6df,
+ 0xfff4ede7,0xffc9848b,0xffb36973,0xffa23e50,0xffb1726e,0xffe1bcb6,0xffeadcd9,0xffaca8a7,0xff757269,0xffc26365,0xff690102,0xff770910,0xff7f0812,0xff6d080c,
+ 0xff6a090d,0xff80161d,0xff811f25,0xff5e0e14,0xff040700,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a4600,0xffdadcd8,0xffe7d9dd,0xffcfcfd1,
+ 0xff3c2328,0xff949485,0xffe8f5e8,0xffd6e9e9,0xfffbfefe,0xffe8f3e8,0xffe9e2de,0xfff2efe8,0xfff4ecd8,0xfff2dfdb,0xffedf6ed,0xffc5c8c5,0xff71786e,0xffae5058,
+ 0xff720a11,0xff7c060f,0xff6f0813,0xff7e0810,0xff63090e,0xff700911,0xff5c090c,0xff611113,0xff040600,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff0a4a00,0xffe2ede8,0xffe3fcfc,0xffb8adb4,0xff312b26,0xff9a837a,0xfff4faf4,0xffe3e8e9,0xffc27f86,0xffb24351,0xffc29f9d,0xffdecbc2,0xff85202d,0xffa8424c,
+ 0xffd6cbb7,0xffc1bcb0,0xff8d9f92,0xffaf6f72,0xff890c17,0xff720209,0xff6f0a10,0xff730910,0xff6c0a12,0xff6e0a11,0xff650d11,0xff5f1013,0xff040600,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0a4500,0xffc0c7bd,0xff987d7e,0xff8c555a,0xff15140e,0xff9f9c88,0xffd3e8d7,0xffdababb,0xff85232c,0xff5f0202,
+ 0xff82252a,0xffaa3943,0xff7b030e,0xff750202,0xffc47770,0xffb7c3b0,0xff7c7d7b,0xffd0c4ba,0xff8e1b24,0xff6f0205,0xff780c10,0xff6e0b11,0xff6d0913,0xff680b12,
+ 0xff690d13,0xff611117,0xff040600,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff062400,0xff89635f,0xff771b23,0xff600308,0xff150303,0xff929486,
+ 0xffe6eaea,0xffc69192,0xff7d0a12,0xff5d0507,0xff770f13,0xff740a12,0xff6d090f,0xff70050d,0xffac6765,0xffd0ded0,0xff605f5e,0xffd7e4d8,0xffa35b5f,0xff770d12,
+ 0xff6f070b,0xff680c11,0xff640c11,0xff630d12,0xff591014,0xff531217,0xff040600,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff050f00,0xff4a151a,
+ 0xff39080d,0xff1e0609,0xff17110d,0xff91928c,0xffd6cbd4,0xffbcafa3,0xff811c23,0xff68090e,0xff660c13,0xff670c12,0xff680d11,0xff610b0f,0xffb5928f,0xffa0a9a0,
+ 0xff6e6a64,0xffb9c2ba,0xffbb9e9b,0xff87393c,0xff5c0707,0xff610e12,0xff600e13,0xff610f12,0xff551114,0xff4c1316,0xff040700,0x87000000,0x5a000000,0x36000000,
+ 0x17000000,0x2e000000,0xff010300,0xff010200,0xff000300,0xff000400,0xff010800,0xff062c00,0xff083400,0xff083e00,0xff071b00,0xff040700,0xff040500,0xff050600,
+ 0xff040400,0xff050c00,0xff093a00,0xff072e00,0xff041e00,0xff083800,0xff083700,0xff072900,0xff040600,0xff040500,0xff040500,0xff050600,0xff040600,0xff040700,
+ 0xff040700,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
+ 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,
+ 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
+ 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
+ 0x18000000,0xf000000
+};
+
+static const QRgb Sound_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3000000,0x6000000,0xb000000,0x12000000,0x19000000,0x21000000,0x29000000,0x2f000000,
+ 0x34000000,0x37000000,0x38000000,0x37000000,0x34000000,0x2f000000,0x29000000,0x21000000,0x19000000,0x12000000,0xb000000,0x6000000,0x3000000,0x1000000,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,
+ 0x5d5f4144,0x937e5559,0xbe8d5e62,0xde956166,0xf39a6267,0xfe995f65,0xf392565b,0xe0874c52,0xc4773f45,0x9f613136,0x70401e21,0x3f000000,0x33000000,0x26000000,
+ 0x1b000000,0x11000000,0xa000000,0x5000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,
+ 0x16000000,0x23000000,0x6f735254,0xba92676a,0xf5a67479,0xffa77378,0xffa57075,0xffa16a6f,0xff9e656a,0xff9a5f65,0xff96585e,0xff925258,0xff8d4a50,0xff884249,
+ 0xf7803a41,0xc6672b30,0x88451a1e,0x45000000,0x33000000,0x23000000,0x16000000,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,
+ 0x2000000,0x7000000,0xe000000,0x1a000000,0x47553d3f,0xa78f666a,0xf5a9797d,0xffaa797d,0xffaa787c,0xffa77378,0xffa57075,0xffa16a6f,0xff9e656a,0xff995e63,
+ 0xff95575d,0xff904f55,0xff8b474d,0xff863f46,0xff81383f,0xff7d3139,0xf8752930,0xbc571b20,0x6c24090c,0x3e000000,0x2a000000,0x1a000000,0xe000000,0x7000000,
+ 0x2000000,0x1000000,0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x5f6d4f52,0xc69b7074,0xffad7d82,0xffac7b80,0xffab7a7f,0xffaa787c,0xffa77378,
+ 0xffa47075,0xffa06a6f,0xff9c6368,0xff985d62,0xff93555a,0xff8d4c53,0xff88444b,0xff833c43,0xff7e343b,0xff792b32,0xff74252b,0xff701e26,0xd759151b,0x852e0a0c,
+ 0x47000000,0x2e000000,0x1b000000,0xe000000,0x6000000,0x2000000,0x1000000,0x5000000,0xd000000,0x1a000000,0x5f6d4f52,0xd09f7378,0xffae7e83,0xffad7d82,
+ 0xffac7b80,0xffab7a7f,0xffa9787c,0xffa67378,0xffa26d72,0xff9d666c,0xff9a6066,0xff95595e,0xff905157,0xff8b494f,0xff843f45,0xff7e363d,0xff792e35,0xff72252c,
+ 0xff6e1e25,0xff6a1820,0xff67171f,0xe156141a,0x8b2a090d,0x49000000,0x2e000000,0x1a000000,0xd000000,0x5000000,0x3000000,0xa000000,0x16000000,0x47553d3f,
+ 0xc69b7074,0xffae7e83,0xffae7e83,0xffad7d82,0xffac7b80,0xffab7a7f,0xffa8767b,0xffa37075,0xff764f52,0xff362325,0xff321e20,0xff46292c,0xff8a4c52,0xff854249,
+ 0xff7f3a40,0xff2b1113,0xff000000,0xff000000,0xff000000,0xff150506,0xff60161c,0xff61161d,0xdc4c1116,0x7d1b0608,0x47000000,0x2a000000,0x16000000,0xa000000,
+ 0x6000000,0x11000000,0x23000000,0xa78f666a,0xffad7d82,0xffad7d82,0xffad7d82,0xffad7d82,0xffab7a7f,0xffa9797d,0xffa57378,0xff875b60,0xff0f090a,0xff2c2c2c,
+ 0xff828282,0xff130b0c,0xff7e4448,0xff371b1d,0xff2c1215,0xff17080a,0xff4d5e8b,0xff7996e3,0xff4361ae,0xff000000,0xff24080b,0xff59141b,0xff5a151c,0xc93f0e12,
+ 0x61000000,0x3e000000,0x23000000,0x11000000,0xb000000,0x1b000000,0x6f735254,0xf5a9797d,0xffac7b80,0xffac7b80,0xffac7b80,0xffab7a7f,0xffa9797d,0xffa67479,
+ 0xff885e62,0xff120c0c,0xff000000,0xffffffff,0xfff2f2f2,0xff100909,0xff613135,0xff010000,0xff3c496c,0xff25304b,0xff1e2841,0xff6385df,0xff4a71da,0xff1a284f,
+ 0xff020001,0xff380d10,0xff541319,0xf9521219,0xa327080b,0x56000000,0x33000000,0x1b000000,0x12000000,0x26000000,0xba92676a,0xffaa797d,0xffab7a7f,0xffab7a7f,
+ 0xffab7a7f,0xffa9797d,0xffa67479,0xff865c60,0xff110b0c,0xff000000,0xffe3e3e5,0xfffbfbfd,0xff939396,0xff030101,0xff070304,0xff010000,0xff7b98e4,0xff6284df,
+ 0xff0d1325,0xff212e56,0xff4a71da,0xff3f62bf,0xff04070d,0xff110405,0xff491115,0xff4f1218,0xd83c0e12,0x6d000000,0x45000000,0x26000000,0x19000000,0x5d5f4144,
+ 0xf5a67479,0xffa9787c,0xffa9787c,0xffa8777b,0xffa67479,0xffa37277,0xff835a5e,0xff100a0b,0xff000000,0xffd9dbdd,0xfff5f5fc,0xffe0e2e9,0xff75757a,0xff222324,
+ 0xff708fe1,0xff1f2943,0xff324373,0xff5479dc,0xff4369ce,0xff010000,0xff3f5ba9,0xff446bd1,0xff263b73,0xff010000,0xff350c10,0xff4a1117,0xfa491016,0x9d1a0608,
+ 0x57000000,0x33000000,0x21000000,0x937e5559,0xffa67378,0xffa57277,0xffa47176,0xffa26f74,0xff9e6c71,0xff80575b,0xff0f0b0b,0xff000000,0xffdcdde3,0xffedeffa,
+ 0xffe7ebf9,0xffbdbfcb,0xff616269,0xff424348,0xff6687df,0xff4e75da,0xff010001,0xff405dad,0xff456cd3,0xff273c76,0xff010001,0xff5076db,0xff3a5bb3,0xff020305,
+ 0xff1e0609,0xff451015,0xff471016,0xc32a090c,0x68000000,0x3f000000,0x29000000,0xbe8d5e62,0xffa47075,0xffa26e73,0xff140d0e,0xff120c0d,0xff120c0d,0xff060404,
+ 0xff000000,0xffd0d3dd,0xffe6e9f9,0xffdee3f6,0xffd6dcf3,0xffaeb1c3,0xff5f6169,0xff000000,0xff4a69bb,0xff476fd8,0xff2c4383,0xff010001,0xff5076db,0xff3d5fba,
+ 0xff010001,0xff4662ae,0xff4065c5,0xff121d38,0xff0e0304,0xff400f13,0xff431014,0xdf320a0f,0x76000000,0x4a000000,0x2f000000,0xde956166,0xff9f696e,0xff9b666b,
+ 0xff000000,0xffe2e6f7,0xffbbbfcf,0xffa1a4b2,0xffd6dbec,0xffdde2f6,0xffd3d9f4,0xffcdd6f1,0xffc7cde9,0xffa5abc3,0xff5e616f,0xff010101,0xff070910,0xff557adc,
+ 0xff3d5fba,0xff010000,0xff5377d5,0xff3e60bc,0xff0c1223,0xff222f52,0xff4971d9,0xff223568,0xff070102,0xff3b0d11,0xff3e0e13,0xf0390e11,0x82000000,0x53000000,
+ 0x34000000,0xf39a6267,0xff9c6368,0xff966065,0xff000000,0xffd7ddf5,0xffcfd7f3,0xffcbd3f2,0xffcbd3f2,0xffc7cfef,0xffc4cbef,0xffc2cbee,0xffbbc4e7,0xff9da4c2,
+ 0xff585c6e,0xff060202,0xff020101,0xff5d7bcb,0xff3f62bf,0xff090d18,0xff2a3966,0xff4165c6,0xff162242,0xff0a0e18,0xff567bdc,0xff2c4587,0xff070102,0xff370c10,
+ 0xff3a0d12,0xf93b0d12,0x8b000000,0x59000000,0x37000000,0xfe995f65,0xff975d63,0xff8f585d,0xff000000,0xffcbd2f1,0xffbfc9ed,0xffb8c2ec,0xffb7c2ec,0xffb7c1eb,
+ 0xffb6c0ec,0xffb6c1ec,0xffb0bae4,0xff949dc0,0xff53586d,0xff0a0203,0xff070202,0xff5d77bc,0xff4064c4,0xff1c284d,0xff242f53,0xff446bd0,0xff1d2e59,0xff000000,
+ 0xff5d80dd,0xff2d468a,0xff060102,0xff340c0f,0xff370c11,0xfe3b0d12,0x90000000,0x5e000000,0x38000000,0xf392565b,0xff92565c,0xff8a5156,0xff000000,0xffbbc5ed,
+ 0xffa8b9e8,0xff9ca8d7,0xffa2b0e3,0xffa8b5e5,0xffa9b6e8,0xffaab5e8,0xffa4b0e1,0xff8995bc,0xff4f556b,0xff080202,0xff040101,0xff617bc0,0xff3f63c1,0xff141d38,
+ 0xff253052,0xff456cd3,0xff1c2b54,0xff000000,0xff5b7fdd,0xff2c4586,0xff060101,0xff310b0e,0xff340c10,0xfa350c0f,0x92000000,0x5f000000,0x37000000,0xe0874c52,
+ 0xff8f5056,0xff864a4f,0xff000000,0xff95a5e5,0xff7482b2,0xff6c79a7,0xff8190c5,0xff93a3dd,0xff99a9e6,0xff99a9e5,0xff94a2dd,0xff7b88b8,0xff4b516c,0xff020001,
+ 0xff000000,0xff6e8de1,0xff3d5fba,0xff010000,0xff435a98,0xff4368cc,0xff121d38,0xff171f34,0xff5378db,0xff253a71,0xff050101,0xff2f0a0e,0xff320b0f,0xf32e090d,
+ 0x90000000,0x5e000000,0x34000000,0xc4773f45,0xff8a494e,0xff834348,0xff010101,0xff24293a,0xff12151d,0xff090a0e,0xff272e43,0xff7a8fd1,0xff869ae0,0xff879be2,
+ 0xff8395d7,0xff6c7db4,0xff404a6d,0xff000000,0xff364263,0xff587ddd,0xff3b5db5,0xff010000,0xff5d80dd,0xff3f62bf,0xff06080f,0xff3a4c7b,0xff446bd0,0xff172345,
+ 0xff070102,0xff2d0b0e,0xff300b0f,0xe727090c,0x8b000000,0x59000000,0x2f000000,0x9f613136,0xff864148,0xff813d43,0xff462024,0xff3f1b1e,0xff3a171a,0xff210c0e,
+ 0xff000000,0xff232c47,0xff6e85d6,0xff728cdc,0xff7189d5,0xff6073b3,0xff344066,0xff000000,0xff6587df,0xff4369ce,0xff0e1426,0xff1e2948,0xff4c73da,0xff324d97,
+ 0xff010000,0xff6385df,0xff3a5bb2,0xff070b16,0xff0d0304,0xff2b0a0d,0xff300b0e,0xd31c0607,0x83000000,0x53000000,0x29000000,0x70401e21,0xf77f3940,0xff7d363d,
+ 0xff793138,0xff722b32,0xff68242b,0xff601e23,0xff270a0d,0xff000000,0xff1c2644,0xff5678d3,0xff5e79d2,0xff516ab4,0xff2e3c65,0xff29375b,0xff446bd0,0xff2e488d,
+ 0xff010102,0xff5b7fdd,0xff4267c9,0xff121b35,0xff1b233d,0xff4e75da,0xff2f488e,0xff000000,0xff180508,0xff2c0a0d,0xfc2e0a0d,0xb80f0406,0x76000000,0x4a000000,
+ 0x21000000,0x3f000000,0xc6662a30,0xff7b3038,0xff772b32,0xff72252c,0xff6b1f26,0xff651920,0xff5c151b,0xff25090b,0xff000000,0xff162243,0xff4d6fd0,0xff4161ba,
+ 0xff283763,0xff000000,0xff1b2a52,0xff090f1d,0xff557adc,0xff466ed6,0xff2b4382,0xff010000,0xff5f82de,0xff3a5bb3,0xff0e162a,0xff030101,0xff22070a,0xff2b090d,
+ 0xe821080a,0x96000000,0x68000000,0x3f000000,0x19000000,0x33000000,0x8843181c,0xf8752930,0xff74252b,0xff701f26,0xff6c1921,0xff66171e,0xff60161d,0xff59141a,
+ 0xff24080b,0xff000000,0xff122348,0xff345dbb,0xff1f3d7f,0xff050101,0xff140506,0xff06070f,0xff4166c7,0xff3d5eb9,0xff020305,0xff5879d1,0xff4267c9,0xff263b73,
+ 0xff000000,0xff110405,0xff29090c,0xfc2a090c,0xc6120405,0x83000000,0x57000000,0x33000000,0x12000000,0x26000000,0x45000000,0xbc571b20,0xff711e26,0xff6e1921,
+ 0xff6b1820,0xff67181f,0xff62161d,0xff5c151b,0xff541319,0xff22070a,0xff000000,0xff233a71,0xff243e7f,0xff080102,0xff26090c,0xff030101,0xff010001,0xff010000,
+ 0xff3554a3,0xff4267ca,0xff2e498e,0xff010103,0xff040101,0xff22080a,0xff2a090d,0xe21c0709,0x98000000,0x6e000000,0x45000000,0x26000000,0xb000000,0x1b000000,
+ 0x33000000,0x6c24090c,0xd75a151b,0xff6a1820,0xff68181f,0xff65171e,0xff60161d,0xff5b141b,0xff561419,0xff4e1217,0xff1b0609,0xff060102,0xff0c0c18,0xff0d0304,
+ 0xff350c10,0xff290a0d,0xff25080b,0xff090202,0xff18264b,0xff2e478c,0xff0b1223,0xff010001,0xff1c0608,0xff29090d,0xef21060a,0xb2090001,0x7e000000,0x56000000,
+ 0x33000000,0x1b000000,0x6000000,0x11000000,0x23000000,0x3e000000,0x85300b0e,0xe058141a,0xff65171e,0xff62161d,0xff5e151c,0xff5a151b,0xff561319,0xff4f1218,
+ 0xff471015,0xff3b0d12,0xff350c10,0xff320b0f,0xff380d11,0xff360c10,0xff330b0f,0xff1f0709,0xff100405,0xff0f0405,0xff0f0305,0xff1c0609,0xff29090d,0xf223070b,
+ 0xc00f0104,0x89000000,0x62000000,0x3f000000,0x23000000,0x11000000,0x3000000,0xa000000,0x16000000,0x2a000000,0x46000000,0x8a2c0a0d,0xdb4f1217,0xff5e151c,
+ 0xff5b151b,0xff58141a,0xff541319,0xff4f1217,0xff4a1116,0xff451015,0xff400f14,0xff3d0e13,0xff3a0d12,0xff370c11,0xff350c10,0xff310b0f,0xff2e0b0e,0xff2c0a0d,
+ 0xff2b0a0d,0xff2b0a0d,0xef21070a,0xc00f0104,0x8d000000,0x68000000,0x47000000,0x2a000000,0x16000000,0xa000000,0x1000000,0x5000000,0xd000000,0x1a000000,
+ 0x2e000000,0x48000000,0x7b1b0608,0xc8410f13,0xf956131a,0xff55131a,0xff521319,0xff4e1218,0xff4a1116,0xff451015,0xff410f13,0xff3e0f12,0xff3b0e12,0xff380d11,
+ 0xff360d10,0xff330c0f,0xff310b0f,0xff2f0a0e,0xfc2c090d,0xe11c0608,0xb20a0103,0x89000000,0x68000000,0x49000000,0x2e000000,0x1a000000,0xd000000,0x5000000,
+ 0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x2e000000,0x46000000,0x60000000,0xa229090c,0xd73f0e13,0xfa4d1117,0xff4c1117,0xff491116,0xff451015,
+ 0xff410f14,0xff3f0e13,0xff3c0e12,0xff3a0d11,0xff360d11,0xff350c10,0xfc320b0f,0xe722080b,0xc5130506,0x97000000,0x7e000000,0x62000000,0x47000000,0x2f000000,
+ 0x1b000000,0xe000000,0x6000000,0x2000000,0xffffff,0x1000000,0x2000000,0x7000000,0xe000000,0x1a000000,0x2a000000,0x3e000000,0x55000000,0x6c000000,
+ 0x9b1b0608,0xc22c0a0d,0xde350c10,0xef3c0e12,0xf93f0e13,0xfe3f0e13,0xfa390d11,0xf2310b0e,0xe529090c,0xd11f0709,0xb50f0406,0x93000000,0x82000000,0x6d000000,
+ 0x56000000,0x3f000000,0x2b000000,0x1a000000,0xe000000,0x7000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,
+ 0x16000000,0x23000000,0x33000000,0x45000000,0x56000000,0x67000000,0x75000000,0x81000000,0x89000000,0x8e000000,0x90000000,0x8e000000,0x89000000,0x81000000,
+ 0x75000000,0x67000000,0x56000000,0x45000000,0x33000000,0x23000000,0x16000000,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,0x33000000,0x3f000000,0x4a000000,0x53000000,0x59000000,0x5e000000,
+ 0x5f000000,0x5e000000,0x59000000,0x53000000,0x4a000000,0x3f000000,0x33000000,0x26000000,0x1b000000,0x11000000,0xa000000,0x5000000,0x2000000,0x1000000,
+ 0xffffff,0xffffff
+};
+
+static const QRgb SoundPlayer_data[] = {
+ 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
+ 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
+ 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3e000000,0x3e000000,0x3f000000,0x3f000000,0x3f000000,0x3f000000,0x3e000000,0x3e000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff070566,0xff08056e,0xff08056d,0xff07056c,
+ 0xff07056c,0xff07056c,0xff07056c,0xff07056c,0xff07056c,0xff07056c,0xff07056c,0xff07056b,0xff07056b,0xff07056b,0xff07056b,0xff07056b,0xff07056b,0xff07056b,
+ 0xff07056c,0xff07056c,0xff07056c,0xff07056c,0xff07056c,0xff07056b,0xff070567,0xff06045d,0xff040346,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
+ 0xff070567,0xffcfd8d5,0xffbfcec8,0xffb0c3bc,0xffabbfb8,0xffaabfb7,0xffaabfb7,0xffaabeb7,0xffaabeb7,0xffaabeb6,0xffaabcb5,0xffa9bcb5,0xffa9bab4,0xffa8bab4,
+ 0xffa8bab3,0xffa8bab3,0xffa9bbb4,0xffa9bcb4,0xffaabdb6,0xffaabeb6,0xffaabeb7,0xffaabeb7,0xffaabeb6,0xffa9bcb6,0xffa5b4af,0xff929e9c,0xff04033d,0x5c000000,
+ 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff08056d,0xffc2d6cf,0xff8cb8a8,0xff67a28d,0xff5b9b84,0xff5a9983,0xff5a9882,0xff5a9781,0xff5a947f,0xff59927e,
+ 0xff588f7c,0xff588b79,0xff578876,0xff578674,0xff578474,0xff648f7f,0xff578977,0xff588d7a,0xff58917d,0xff5a947f,0xff5a9780,0xff5a9881,0xff5a9881,0xff5a937f,
+ 0xff568174,0xff4c5e5a,0xff02011e,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff070567,0xffafc3bc,0xff649282,0xff316d58,0xff22614b,0xff1f5e49,
+ 0xff1f5b46,0xff1f5743,0xff1d5441,0xff1d4f3d,0xff1d4a3a,0xff1b4436,0xff1a4033,0xff5c766d,0xffb8c3bf,0xfffafbfb,0xff1b4334,0xff1b493a,0xff1c4f3d,0xff1d543f,
+ 0xff1e5641,0xff1e5843,0xff1e5844,0xff1e5541,0xff1b473a,0xff162623,0xff010008,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff07056c,0xffb0cac1,
+ 0xff5b9b84,0xff26795b,0xff156b4c,0xff136446,0xff115c41,0xff0f553c,0xff0e4c36,0xff0d4230,0xff375d4f,0xff90a29b,0xffe9eceb,0xffffffff,0xffffffff,0xffffffff,
+ 0xff093121,0xff0b3b28,0xff0b422c,0xff0d4931,0xff0e4e34,0xff0e5137,0xff0f5339,0xff0f5239,0xff0c4130,0xff061c17,0xff000002,0x93000000,0x62000000,0x3b000000,
+ 0x1f000000,0x3d000000,0xff070566,0xffaabfb7,0xff578877,0xff205e49,0xff0e4e37,0xff0b4531,0xff0a3d2b,0xff1a4334,0xff6f847c,0xffd2d7d6,0xffffffff,0xffffffff,
+ 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff03180e,0xff031d11,0xff052314,0xff052616,0xff052a18,0xff062c1a,0xff062f1c,0xff062f1e,0xff06271b,0xff02100d,
+ 0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff07056c,0xffafcac1,0xff5a9983,0xff247456,0xff116044,0xff0d533a,0xffb3c5bf,0xfffafbfb,
+ 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff021209,0xff03170b,0xff031c0c,0xff092211,0xff0d2816,0xff0f2c18,
+ 0xff153320,0xff0d2c1a,0xff072517,0xff02100c,0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff070566,0xffaabfb7,0xff578776,0xff1f5b47,
+ 0xff0d4632,0xff093a29,0xfff6f8f7,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe8e9e8,0xffd1d2d2,0xff767977,0xff09100a,0xff202520,
+ 0xff3d423c,0xff4b4d49,0xff5f605e,0xff565755,0xff585a57,0xff464846,0xff282c29,0xff101314,0xff000005,0x9b020202,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff07056c,0xffafcac1,0xff5a9882,0xff247055,0xff115940,0xff0c4732,0xffe6eae9,0xffffffff,0xffffffff,0xffffffff,0xfff6f6f6,0xffa7aaa9,0xff4b4f4c,0xff010702,
+ 0xffa5a6a5,0xff6f706f,0xff343434,0xff5d5959,0xff5e5b5a,0xff716a68,0xff7a6f6a,0xff656060,0xff5b524e,0xff5f595a,0xff2f2f31,0xff1a1a1f,0xff010110,0xb9212117,
+ 0x7d242419,0x3f060604,0x1f000000,0x3d000000,0xff070566,0xffaabfb7,0xff578776,0xff1f5945,0xff0c4230,0xff083425,0xffeef0f0,0xffffffff,0xffc7cbc9,0xff626865,
+ 0xff0f1612,0xff010602,0xff050a06,0xff1a1c1a,0xffb2b1b1,0xff838181,0xff534c4b,0xff635a5a,0xff8c8383,0xff9d908e,0xff827777,0xff736a69,0xff695d57,0xff5a595a,
+ 0xff474a4a,0xff222429,0xff020119,0xcc313122,0xac4f4f37,0x6e57573d,0x1f000000,0x3d000000,0xff07056c,0xffafcac1,0xff5a9882,0xff236e53,0xff0f543c,0xff0b422d,
+ 0xffe9eceb,0xff3c5048,0xff03140b,0xff010e07,0xff010a04,0xff171c17,0xff343434,0xff423f3e,0xffbfbcba,0xff898485,0xff484141,0xff5f5757,0xff847a7a,0xff928380,
+ 0xff776c6c,0xff695e5b,0xff5d5757,0xff515552,0xff3b3f3f,0xff25272c,0xff02011b,0xcc313122,0xb354543b,0x9e777754,0x1f000000,0x3d000000,0xff070566,0xffaabfb7,
+ 0xff578676,0xff1f5643,0xff0c402c,0xff072f20,0xffe8ebea,0xff192a22,0xff020e06,0xff010b03,0xff1f241f,0xff414040,0xff5a5150,0xff5c5050,0xffbdb9b8,0xff898484,
+ 0xff4b4344,0xff5d5455,0xff877d7d,0xff90837f,0xff756967,0xff645954,0xff595b59,0xff4f5650,0xff3f4343,0xff2a2c33,0xff02011e,0xcc313122,0xb354543b,0x9e777754,
+ 0x1f000000,0x3e000000,0xff07056c,0xffafc9c0,0xff5a9580,0xff22684e,0xff0e4b34,0xff083724,0xffe8ebea,0xff1a2c21,0xff011005,0xff2a2f2a,0xff4b4b48,0xff655c54,
+ 0xff645954,0xff544949,0xffbfbbbb,0xff8f8784,0xff4e4444,0xff5a5151,0xff837879,0xff8c8080,0xff6d6260,0xff5d595a,0xff555c55,0xff535954,0xff4a4d4d,0xff303039,
+ 0xff020122,0xcc313122,0xb354543b,0x9e777754,0x1f000000,0x3e000000,0xff070566,0xffaabeb6,0xff568172,0xff1d4d3c,0xff0a3323,0xff052215,0xffe8eae9,0xff18241c,
+ 0xff161d16,0xff4a4a49,0xff766856,0xffaba195,0xffdad7d4,0xffd6d3d2,0xffd3d1d1,0xff8f8888,0xff524848,0xff584f4f,0xff7b7171,0xff83736f,0xff675e5b,0xff535853,
+ 0xff555c54,0xff5f6460,0xff56575c,0xff363540,0xff020122,0xcc313122,0xb354543b,0x9e777754,0x1f000000,0x3e000000,0xff07056b,0xffadc6be,0xff588c7a,0xff1f5642,
+ 0xff0a3624,0xff052314,0xffe8eae9,0xff1d2920,0xff444643,0xff655b4f,0xff877451,0xffdcd8d1,0xffffffff,0xffffffff,0xffefeeee,0xff908988,0xff554948,0xff5f5454,
+ 0xff978d8d,0xffa3948c,0xff8d8e8d,0xff7d857d,0xff797e7a,0xff737375,0xff656064,0xff3d383e,0xff030123,0xcc313122,0xb354543b,0x9e777754,0x1f000000,0x3f000000,
+ 0xff070565,0xffa8bab4,0xff557a6c,0xff677f76,0xffc1c8c5,0xffc0c5c3,0xfff0f1f0,0xff363a35,0xff474441,0xff7e6743,0xff715c38,0xffdad6ce,0xffffffff,0xffffffff,
+ 0xffd7d5cf,0xff5f5446,0xff70635e,0xff827978,0xff4b4746,0xff383737,0xff363837,0xff6e6f6d,0xffb0adad,0xff9f938c,0xff726764,0xff443e44,0xff030226,0xcc313122,
+ 0xb354543b,0x9e777754,0x1f000000,0x3f000000,0xff07056b,0xffacc3bb,0xff568373,0xffc7d2cd,0xffffffff,0xffffffff,0xffd8dad9,0xff3a3b39,0xff574736,0xff6c4e26,
+ 0xff694c28,0xff978570,0xffd7d1ca,0xffd5d0ca,0xff928572,0xff736340,0xff837968,0xff1c1b19,0xff111810,0xff131e14,0xff131912,0xff111310,0xff3a3837,0xffbeb4ae,
+ 0xff817571,0xff4c454d,0xff03022a,0xcc313122,0xb354543b,0x9e777754,0x1f000000,0x3f000000,0xff070465,0xffa8b9b2,0xff547569,0xffc6ceca,0xffffffff,0xffffffff,
+ 0xffc6c8c6,0xff383735,0xff664d33,0xff705133,0xff735333,0xff6f4f30,0xff65472d,0xff5f442a,0xff5f442c,0xff856f5d,0xff26211d,0xff080c08,0xff11291b,0xff031b0d,
+ 0xff011406,0xff2f362e,0xff373737,0xffc4bbb5,0xff8b7e7a,0xff4e464e,0xff03022a,0xcc313122,0xb354543b,0x9e777754,0x1f000000,0x3f000000,0xff07056b,0xffacc2bb,
+ 0xff568371,0xff678378,0xffc1c8c5,0xffc0c5c2,0xff6c706c,0xff463f35,0xff7b5e3b,0xff83643e,0xff896840,0xff886942,0xff836541,0xff7d5f3e,0xff876d51,0xff86796d,
+ 0xff070706,0xff102517,0xff04230f,0xff021c0a,0xff091d0d,0xff575c56,0xff696763,0xffc9beb3,0xff837871,0xff4c454b,0xff030229,0xcc313122,0xb354543b,0x9e777754,
+ 0x1f000000,0x3e000000,0xff070565,0xffa8bab4,0xff54786b,0xff1a3d2f,0xff061e12,0xff06140b,0xff313331,0xff564935,0xff947749,0xff987b4e,0xff9f8154,0xffa3845a,
+ 0xffa08460,0xff9f8765,0xffbcae93,0xff868276,0xff080907,0xff212d22,0xff19261b,0xff1f2a1f,0xff515650,0xff696a69,0xffb2b5b2,0xff9a9a96,0xff706c6a,0xff444147,
+ 0xff030226,0xcc313122,0xb354543b,0x9e777754,0x1f000000,0x3e000000,0xff07056b,0xffadc5bd,0xff588a78,0xff1d523d,0xff082f1c,0xff102518,0xff474844,0xff766244,
+ 0xffa58a62,0xffa88c68,0xffb39677,0xffbaa182,0xffbcac8e,0xffbdb097,0xffbfb09f,0xffb6a9a3,0xff433f3e,0xff262725,0xff474846,0xff595b58,0xff606060,0xff9c9f9c,
+ 0xffb0b7b0,0xff7b857e,0xff65686c,0xff3b3b47,0xff020126,0xcc313122,0xb354543b,0x9e777754,0x1f000000,0x3e000000,0xff070566,0xffa9bcb5,0xff567f70,0xff1b4938,
+ 0xff072b1b,0xff12271a,0xff484847,0xff8a745a,0xffbba084,0xffbaa089,0xffc0a793,0xffc7b99f,0xffc7b9a5,0xffc2ad9d,0xffb99f91,0xffd0b9af,0xffd0c0ba,0xff9e9898,
+ 0xff857f7f,0xff888787,0xffd0d1d0,0xffa1a4a1,0xff7f867f,0xff7b847e,0xff5e6564,0xff373a42,0xff020126,0xcc313122,0xb354543b,0x9e777754,0x1f000000,0x3d000000,
+ 0xff07056c,0xffafc8bf,0xff59927d,0xff216149,0xff0c412b,0xff103320,0xff4f524c,0xff897665,0xffc6ae9d,0xffc1ac9c,0xffc4b4a4,0xffc4b4a3,0xffc2ad9c,0xffbfa899,
+ 0xffc0a599,0xffb89a90,0xffae9a8e,0xff9e9191,0xff998f8f,0xffb4b0b0,0xffacb0ac,0xff909390,0xff80847f,0xff797d7a,0xff5a5f5f,0xff33373d,0xff020123,0xcc313122,
+ 0xb354543b,0x9e777754,0x1f000000,0x3d000000,0xff070465,0xffa9bcb5,0xff568172,0xff1d503e,0xff093725,0xff09291b,0xff414641,0xff9a8778,0xffc0b0a4,0xffb7aa9c,
+ 0xffb6a798,0xffb5a092,0xffb49e92,0xffb39d94,0xffac9189,0xffa38d82,0xff8d7c78,0xff736769,0xff786d6f,0xff888385,0xffa1a3a4,0xff9d9f9f,0xff7e7f80,0xff6c6f6f,
+ 0xff54575a,0xff31333b,0xff020120,0xcc313122,0xb354543b,0x9e777754,0x1d000000,0x3b000000,0xff070567,0xffa9bcb7,0xff558173,0xff1e5443,0xff0b3d2c,0xff072f1f,
+ 0xff18241b,0xff4c4746,0xff978b87,0xff8b7e78,0xff877772,0xff877571,0xff877673,0xff85706f,0xff7e6b68,0xff776865,0xff63565a,0xff574e53,0xff5d565c,0xff6b666c,
+ 0xff78777e,0xff797b81,0xff6b6d72,0xff55575c,0xff3f4048,0xff282a34,0xff020120,0xc9343425,0xb157573d,0x9d797955,0x1b000000,0x36000000,0xff060459,0xff929e9c,
+ 0xff4b5855,0xff152623,0xff051512,0xff02100d,0xff040d0a,0xff101013,0xff4f464d,0xff4f464b,0xff4e444b,0xff4e444d,0xff4c4048,0xff483d44,0xff473f44,0xff41383e,
+ 0xff352e38,0xff332f39,0xff34313c,0xff3d3a46,0xff444452,0xff464855,0xff41424f,0xff363743,0xff262733,0xff20212d,0xff020122,0xc33b3b2a,0xad5d5d41,0x9b7e7e59,
+ 0x17000000,0x2e000000,0xff040346,0xff04033e,0xff02011e,0xff010009,0xff000002,0xff000001,0xff000001,0xff000003,0xff010113,0xff03022a,0xff03022b,0xff030226,
+ 0xff030125,0xff030225,0xff030123,0xff02011f,0xff02011e,0xff02011e,0xff020120,0xff020126,0xff03022c,0xff03022e,0xff03022d,0xff020129,0xff020122,0xff020120,
+ 0xff03022a,0xba494933,0xa7676749,0x7e7b7b56,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x9b020202,
+ 0xbc242419,0xcc313122,0xcc313122,0xcc313122,0xcc313122,0xcc313122,0xcc313122,0xcc313122,0xcc313122,0xcc313122,0xcc313122,0xcc313122,0xcc313122,0xcc313122,
+ 0xcc313122,0xcc313122,0xc9343425,0xc33b3b2a,0xba494933,0xad5b5b3f,0x7b626245,0x2f29291d,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
+ 0x62000000,0x66000000,0x66000000,0x66000000,0x7113130d,0x9941412d,0xb354543b,0xb354543b,0xb354543b,0xb354543b,0xb354543b,0xb354543b,0xb354543b,0xb354543b,
+ 0xb354543b,0xb354543b,0xb354543b,0xb354543b,0xb354543b,0xb354543b,0xb157573d,0xad5d5d41,0xa4676748,0x735b5b40,0x3326261b,0x18000000,0x7000000,0xf000000,
+ 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x481e1e15,0x735b5b40,0x98747452,0x9e777754,0x9e777754,
+ 0x9e777754,0x9e777754,0x9e777754,0x9e777754,0x9e777754,0x9e777754,0x9e777754,0x9e777754,0x9e777754,0x9e777754,0x9d797955,0x7f70704e,0x5052523a,0x25000000,
+ 0x18000000,0xf000000
+};
+
+static const QRgb Spreadsheet_data[] = {
+ 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
+ 0x1f000000,0x1f000000,0x20000000,0x20000000,0x20000000,0x20000000,0x20000000,0x20000000,0x20000000,0x20000000,0x20000000,0x20000000,0x1d000000,0x1b000000,
+ 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3e000000,0x3f000000,0x3f000000,0x3f000000,0x3f000000,0x3f000000,0x3f000000,0x3f000000,0x3f000000,
+ 0x3f000000,0x3e000000,0x3c000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff09068a,0xff09068a,0xff09068a,0xff090689,
+ 0xff090689,0xff090689,0xff090689,0xff090689,0xff090689,0xff090689,0xff090689,0xff080688,0xff080688,0xff080688,0xff080687,0xff080687,0xff080686,0xff080686,
+ 0xff080686,0xff080686,0xff080686,0xff080686,0xff080687,0xff080687,0xff080688,0xff070686,0xff070682,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
+ 0xff09068a,0xffddffff,0xffdbfefd,0xffd9fcfa,0xffd2f8f3,0xffcef7ef,0xffcdf6ee,0xffcdf6ee,0xffccf6ee,0xffccf6ee,0xffcbf5ed,0xffc8f4ec,0xffc7f3eb,0xffc5f2ea,
+ 0xffc2f1e9,0xffbff0e8,0xffbceee7,0xffb9ede6,0xffb8ede6,0xffb7ede6,0xffb6ede6,0xffb5eee7,0xffb6f0e8,0xffb4f1e9,0xffb2efe7,0xffade7e0,0xff070575,0x5c000000,
+ 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff09068a,0xffdcfefe,0xffd9fcfa,0xffc9f3e9,0xffb1e5cf,0xffa3ddbf,0xff9fdbba,0xff9ddab9,0xff9ddab9,0xff9cd9b8,
+ 0xff9bd8b8,0xff99d7b7,0xff97d6b5,0xff95d4b4,0xff92d3b3,0xff90d1b2,0xff8ed1b1,0xff8cd0b0,0xff8bcfb0,0xff89cfb0,0xff88cfb0,0xff87d0b0,0xff87d1b2,0xff85ceaf,
+ 0xff82caab,0xff7fc4a6,0xff050458,0x75000000,0x4f000000,0x2e000000,0x1b000000,0x36000000,0xff09068a,0xffdcfffe,0xffd2f9f3,0xffb2e6cf,0xff7dc897,0xff5bb472,
+ 0xff52af68,0xff51ae67,0xff51ad67,0xff50ad66,0xff4fab65,0xff4dab65,0xff4da964,0xff4ba863,0xff4ba763,0xff49a562,0xff48a461,0xff46a361,0xff45a260,0xff45a260,
+ 0xff44a260,0xff44a260,0xff43a05f,0xff429d5d,0xff40995b,0xff3e9659,0xff02032f,0x88000000,0x5b000000,0x37000000,0x1d000000,0x3b000000,0xff09068a,0xffdbfefd,
+ 0xffcff7f0,0xffa2ddbe,0xff5db573,0xff86c28c,0xff63b06b,0xff63af6b,0xff62af6a,0xff61ad69,0xff61ad69,0xff60ab68,0xff60aa68,0xff5fa967,0xff5ea866,0xff5ea665,
+ 0xff5ca464,0xff5ca363,0xff5ba262,0xff5aa061,0xff5aa061,0xff5aa162,0xff5ba263,0xff5ca464,0xff5ea665,0xff5fa967,0xff040438,0x95000000,0x63000000,0x3c000000,
+ 0x1f000000,0x3d000000,0xff09068a,0xffdbfefd,0xffcdf6ee,0xff9fdbba,0xff52ae68,0xff63b06b,0xff158821,0xff158821,0xff158720,0xff158620,0xff158620,0xff148520,
+ 0xff148420,0xff148320,0xff14821f,0xff14811f,0xff147f1f,0xff137e1e,0xff137d1e,0xff137b1e,0xff137a1d,0xff137a1d,0xff137b1e,0xff137d1e,0xff147f1f,0xff14811f,
+ 0xff010311,0x9b000000,0x68000000,0x3e000000,0x1f000000,0x3d000000,0xff09068a,0xffdbfefd,0xffcdf6ee,0xff9edab9,0xff51ae67,0xff63af6b,0xff158721,0xff158720,
+ 0xff158620,0xff158620,0xff148520,0xff148520,0xff148420,0xff148420,0xff14831f,0xff14811f,0xff14801f,0xff137e1e,0xff137c1e,0xff137a1d,0xff12781d,0xff12781d,
+ 0xff12781d,0xff137a1d,0xff137d1e,0xff147f1f,0xff010311,0x9c000000,0x69000000,0x3f000000,0x1f000000,0x3d000000,0xff09068a,0xffdbfefd,0xffccf6ee,0xff9ddab9,
+ 0xff51ad67,0xff137e1f,0xff0b4411,0xff0b4411,0xff0b4311,0xff0b4311,0xff0b4311,0xff0b4311,0xff0b4310,0xff0b4310,0xff0b4210,0xff0a4210,0xff0a4110,0xff0a4010,
+ 0xff0a3f0f,0xff0a3d0f,0xff0a3c0f,0xff093c0f,0xff093c0f,0xff0a3c0f,0xff0a3d0f,0xff0a3f0f,0xff000209,0x9d000000,0x6a000000,0x3f000000,0x1f000000,0x3d000000,
+ 0xff09068a,0xffdafefd,0xffccf6ee,0xff9cd9b8,0xff50ad66,0xff4a4a4a,0xff616161,0xff6c6c6c,0xff6c6c6c,0xff6c6c6c,0xff6c6c6c,0xff6c6c6c,0xff6c6c6c,0xff6c6c6c,
+ 0xff6c6c6c,0xff6b6b6b,0xff6a6a6a,0xff686868,0xff656565,0xff636363,0xff616161,0xff5f5f5f,0xff5e5e5e,0xff5f5f5f,0xff616161,0xff636363,0xff040237,0x9e000000,
+ 0x6b000000,0x40000000,0x1f000000,0x3d000000,0xff09068a,0xffdafefd,0xffcbf5ed,0xff9cd8b8,0xff4fab65,0xff616161,0xffa6a6a6,0xffc8c8c8,0xffc9c9c9,0xffc9c9c9,
+ 0xffcacaca,0xffcbcbcb,0xffcbcbcb,0xffcbcbcb,0xffcacaca,0xff9a9a9a,0xffc7c7c7,0xffc3c3c3,0xffbfbfbf,0xff8f8f8f,0xffb4b4b4,0xffb0b0b0,0xffadadad,0xff858585,
+ 0xffafafaf,0xffb4b4b4,0xff070465,0xa0000000,0x6c000000,0x41000000,0x1f000000,0x3d000000,0xff09068a,0xffd8fdfc,0xffc9f4ec,0xff9ad7b6,0xff4eab65,0xff6c6c6c,
+ 0xffc8c8c8,0xfff8f8f8,0xfff9f9f9,0xfffafafa,0xfffbfbfb,0xfffcfcfc,0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xffc1c1c1,0xfff8f8f8,0xfff4f4f4,0xffeeeeee,0xffb2b2b2,
+ 0xffe0e0e0,0xffd9d9d9,0xffd5d5d5,0xffa3a3a3,0xffd6d6d6,0xffdbdbdb,0xff09057b,0xa1000000,0x6d000000,0x42000000,0x1f000000,0x3d000000,0xff090689,0xffd5fcfb,
+ 0xffc8f3eb,0xff97d6b5,0xff4da964,0xff6c6c6c,0xffc8c8c8,0xfff8f8f8,0xfff9f9f9,0xfffbfbfb,0xfffcfcfc,0xfffdfdfd,0xfffefefe,0xfffefefe,0xfffdfdfd,0xffc2c2c2,
+ 0xfffafafa,0xfff7f7f7,0xfff1f1f1,0xffb3b3b3,0xffe1e1e1,0xffd9d9d9,0xffd3d3d3,0xffa1a1a1,0xffd2d2d2,0xffd8d8d8,0xff090579,0xa2000000,0x6e000000,0x42000000,
+ 0x1f000000,0x3d000000,0xff080689,0xffd3fbfa,0xffc4f1e9,0xff96d4b4,0xff4ca863,0xff484848,0xff606060,0xff6c6c6c,0xff6c6c6c,0xff6d6d6d,0xff6e6e6e,0xff6f6f6f,
+ 0xff6f6f6f,0xff6f6f6f,0xff6f6f6f,0xff545454,0xff6d6d6d,0xff6c6c6c,0xff696969,0xff4e4e4e,0xff626262,0xff5e5e5e,0xff5b5b5b,0xff454545,0xff5b5b5b,0xff5d5d5d,
+ 0xff040234,0xa3000000,0x6f000000,0x44000000,0x1f000000,0x3e000000,0xff080689,0xffd2faf9,0xffc2efe7,0xff93d2b2,0xff4ba763,0xff5f5f5f,0xffa3a3a3,0xffc7c7c7,
+ 0xffc9c9c9,0xffcbcbcb,0xffcccccc,0xffcdcdcd,0xffcecece,0xffcecece,0xffcecece,0xff9d9d9d,0xffcbcbcb,0xffc8c8c8,0xffc3c3c3,0xff909090,0xffb5b5b5,0xffaeaeae,
+ 0xffa8a8a8,0xff7e7e7e,0xffa6a6a6,0xffaaaaaa,0xff070460,0xa3000000,0x70000000,0x44000000,0x20000000,0x3f000000,0xff080688,0xffcff9f8,0xffbfeee7,0xff90d1b2,
+ 0xff49a662,0xff696969,0xffc4c4c4,0xfff5f5f5,0xfff8f8f8,0xfffafafa,0xfffcfcfc,0xfffdfdfd,0xfffefefe,0xffffffff,0xfffefefe,0xffc2c2c2,0xfffbfbfb,0xfff7f7f7,
+ 0xfff0f0f0,0xffb2b2b2,0xffdedede,0xffd5d5d5,0xffcecece,0xff9b9b9b,0xffcccccc,0xffd2d2d2,0xff090577,0xa3000000,0x70000000,0x44000000,0x20000000,0x3f000000,
+ 0xff080688,0xffcbf7f6,0xffbbece5,0xff8dcfb0,0xff48a461,0xff686868,0xffc3c3c3,0xfff3f3f3,0xfff6f6f6,0xfff9f9f9,0xfffbfbfb,0xfffdfdfd,0xfffdfdfd,0xfffefefe,
+ 0xfffdfdfd,0xffc2c2c2,0xfff9f9f9,0xfff4f4f4,0xffededed,0xffb0b0b0,0xffdbdbdb,0xffd1d1d1,0xffcbcbcb,0xff9a9a9a,0xffcacaca,0xffd2d2d2,0xff090577,0xa3000000,
+ 0x6f000000,0x43000000,0x20000000,0x3f000000,0xff080687,0xffc9f6f5,0xffb9ebe4,0xff8cceaf,0xff46a260,0xff464646,0xff5c5c5c,0xff686868,0xff6a6a6a,0xff6b6b6b,
+ 0xff6c6c6c,0xff6d6d6d,0xff6d6d6d,0xff6d6d6d,0xff6d6d6d,0xff535353,0xff6b6b6b,0xff686868,0xff656565,0xff4a4a4a,0xff5d5d5d,0xff595959,0xff575757,0xff424242,
+ 0xff585858,0xff5b5b5b,0xff040234,0xa3000000,0x6f000000,0x43000000,0x20000000,0x3f000000,0xff080687,0xffc7f6f5,0xffb6eae3,0xff89ccad,0xff45a15f,0xff5b5b5b,
+ 0xff9c9c9c,0xffbfbfbf,0xffc0c0c0,0xffc3c3c3,0xffc5c5c5,0xffc7c7c7,0xffc8c8c8,0xffc8c8c8,0xffc8c8c8,0xff979797,0xffc2c2c2,0xffbdbdbd,0xffb7b7b7,0xff868686,
+ 0xffa8a8a8,0xffa2a2a2,0xff9f9f9f,0xff7a7a7a,0xffa4a4a4,0xffababab,0xff070461,0xa2000000,0x6e000000,0x42000000,0x20000000,0x3f000000,0xff080687,0xffc4f5f4,
+ 0xffb4e9e2,0xff86cbac,0xff44a05f,0xff656565,0xffbbbbbb,0xffe8e8e8,0xffe9e9e9,0xffececec,0xffeeeeee,0xfff1f1f1,0xfff2f2f2,0xfff2f2f2,0xfff0f0f0,0xffb6b6b6,
+ 0xffe8e8e8,0xffe2e2e2,0xffdadada,0xffa1a1a1,0xffcacaca,0xffc5c5c5,0xffc3c3c3,0xff989898,0xffcdcdcd,0xffd7d7d7,0xff09057a,0xa1000000,0x6d000000,0x42000000,
+ 0x20000000,0x3f000000,0xff080687,0xffc3f5f4,0xffb2e8e1,0xff85cbac,0xff429e5e,0xff646464,0xffb7b7b7,0xffe3e3e3,0xffe4e4e4,0xffe5e5e5,0xffe7e7e7,0xffe9e9e9,
+ 0xffeaeaea,0xffe9e9e9,0xffe8e8e8,0xffafafaf,0xffdfdfdf,0xffd9d9d9,0xffd2d2d2,0xff9c9c9c,0xffc5c5c5,0xffc2c2c2,0xffc3c3c3,0xff9a9a9a,0xffd1d1d1,0xffdbdbdb,
+ 0xff09057c,0x9f000000,0x6b000000,0x40000000,0x20000000,0x3f000000,0xff080687,0xffc2f5f4,0xffb1e9e2,0xff84cbac,0xff429e5e,0xff434343,0xff575757,0xff616161,
+ 0xff616161,0xff616161,0xff626262,0xff626262,0xff626262,0xff626262,0xff616161,0xff494949,0xff5d5d5d,0xff5b5b5b,0xff585858,0xff424242,0xff545454,0xff545454,
+ 0xff565656,0xff444444,0xff5d5d5d,0xff626262,0xff040237,0x9e000000,0x6a000000,0x3f000000,0x20000000,0x3f000000,0xff080688,0xffc1f6f5,0xffb0eae3,0xff84cbad,
+ 0xff419b5c,0xff585858,0xff959595,0xffb2b2b2,0xffb0b0b0,0xffafafaf,0xffafafaf,0xffafafaf,0xffaeaeae,0xffaeaeae,0xffacacac,0xff818181,0xffa6a6a6,0xffa2a2a2,
+ 0xff9f9f9f,0xff787878,0xff9d9d9d,0xff9e9e9e,0xffa4a4a4,0xff838383,0xffb2b2b2,0xffbababa,0xff080568,0x9d000000,0x69000000,0x3f000000,0x20000000,0x3f000000,
+ 0xff080688,0xffc1f7f6,0xffb1ece5,0xff81c8aa,0xff40985a,0xff646464,0xffb5b5b5,0xffdcdcdc,0xffd9d9d9,0xffd7d7d7,0xffd5d5d5,0xffd4d4d4,0xffd2d2d2,0xffd0d0d0,
+ 0xffcecece,0xff9c9c9c,0xffc8c8c8,0xffc5c5c5,0xffc3c3c3,0xff969696,0xffc6c6c6,0xffcacaca,0xffd1d1d1,0xffa8a8a8,0xffe3e3e3,0xffebebeb,0xff0a0684,0x9c000000,
+ 0x68000000,0x3e000000,0x20000000,0x3e000000,0xff080688,0xffc0f9f8,0xffade8e1,0xff7fc5a7,0xff3e9559,0xff656565,0xffb7b7b7,0xffdedede,0xffdadada,0xffd6d6d6,
+ 0xffd3d3d3,0xffd1d1d1,0xffcecece,0xffcccccc,0xffcacaca,0xff9a9a9a,0xffc6c6c6,0xffc5c5c5,0xffc6c6c6,0xff9a9a9a,0xffcccccc,0xffd3d3d3,0xffdadada,0xffaeaeae,
+ 0xffeaeaea,0xfff1f1f1,0xff0a0686,0x9b000000,0x67000000,0x3e000000,0x1d000000,0x3c000000,0xff080689,0xffbef7f6,0xffaae4dd,0xff7cc1a4,0xff3d9157,0xff464646,
+ 0xff5a5a5a,0xff636363,0xff616161,0xff5e5e5e,0xff5d5d5d,0xff5b5b5b,0xff5b5b5b,0xff5a5a5a,0xff595959,0xff434343,0xff585858,0xff585858,0xff595959,0xff464646,
+ 0xff5d5d5d,0xff606060,0xff636363,0xff4e4e4e,0xff686868,0xff6b6b6b,0xff04033b,0x94000000,0x63000000,0x3b000000,0x1b000000,0x36000000,0xff080687,0xffb9efee,
+ 0xffa6ded8,0xff7cbea3,0xff43935d,0xff5e5e5e,0xff9e9e9e,0xffbbbbbb,0xffb8b8b8,0xffb4b4b4,0xffb1b1b1,0xffaeaeae,0xffacacac,0xffaaaaaa,0xffaaaaaa,0xff828282,
+ 0xffaaaaaa,0xffababab,0xffaeaeae,0xff888888,0xffb5b5b5,0xffbababa,0xffbebebe,0xff959595,0xffc7c7c7,0xffcacaca,0xff08056e,0x87000000,0x5a000000,0x36000000,
+ 0x17000000,0x2e000000,0xff070684,0xff07057e,0xff060573,0xff05055d,0xff030441,0xff04033a,0xff08056a,0xff090681,0xff09067f,0xff09057d,0xff09057b,0xff090579,
+ 0xff090578,0xff090577,0xff090577,0xff07045b,0xff090578,0xff090578,0xff09057a,0xff07045f,0xff09067f,0xff090681,0xff0a0684,0xff070467,0xff0a0687,0xff0a0688,
+ 0xff0a0689,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x75000000,0x88000000,0x95000000,0x9b000000,0x9c000000,0x9d000000,
+ 0x9e000000,0xa0000000,0xa1000000,0xa2000000,0xa3000000,0xa3000000,0xa3000000,0xa3000000,0xa3000000,0xa2000000,0xa1000000,0x9f000000,0x9e000000,0x9d000000,
+ 0x9c000000,0x9b000000,0x94000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4e000000,0x5b000000,
+ 0x63000000,0x68000000,0x69000000,0x6a000000,0x6b000000,0x6c000000,0x6d000000,0x6e000000,0x6f000000,0x70000000,0x70000000,0x6f000000,0x6f000000,0x6e000000,
+ 0x6d000000,0x6b000000,0x6a000000,0x69000000,0x68000000,0x67000000,0x63000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
+ 0x18000000,0x25000000,0x2e000000,0x37000000,0x3c000000,0x3e000000,0x3f000000,0x3f000000,0x40000000,0x41000000,0x42000000,0x42000000,0x44000000,0x44000000,
+ 0x44000000,0x43000000,0x43000000,0x42000000,0x42000000,0x40000000,0x3f000000,0x3f000000,0x3e000000,0x3e000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
+ 0x18000000,0xf000000
+};
+
+static const QRgb SystemInfo_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3000000,0x6000000,0xb000000,0x12000000,0x19000000,0x21000000,0x29000000,0x2f000000,
+ 0x34000000,0x37000000,0x39040404,0x38050505,0x35050505,0x30050505,0x2a060606,0x22080808,0x1a0a0a0a,0x130d0d0d,0xc151515,0x7242424,0x3000000,0x1000000,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,
+ 0x5d406844,0x93548a59,0xbe5b9b62,0xde5fa566,0xf35fab67,0xfe5eac66,0xf354a55c,0xe04b9b53,0xc5408a48,0xa033743a,0x72224f27,0x410c0c0c,0x350e0e0e,0x280d0d0d,
+ 0x1d121212,0x120e0e0e,0xb171717,0x5000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,
+ 0x16000000,0x23000000,0x6f507d54,0xba64a06a,0xf7639d6b,0xff50825a,0xff3f684a,0xff30523c,0xff254131,0xff1e3529,0xff1e3829,0xff23422c,0xff265231,0xff2c6736,
+ 0xf933803d,0xc72f7e36,0x8a205826,0x49111111,0x36131313,0x26141414,0x18151515,0xe121212,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,
+ 0x2000000,0x7000000,0xe000000,0x1a000000,0x473c5c3f,0xa7659b6a,0xf863976b,0xff497354,0xff335240,0xff2e4a3a,0xff2d493a,0xff2b4837,0xff284533,0xff23402f,
+ 0xff203b2b,0xff1b3626,0xff183023,0xff162a1f,0xff15291d,0xff1d4b27,0xfa246e2e,0xbe22702a,0x6f163919,0x42131313,0x2d111111,0x1c121212,0xf111111,0x7000000,
+ 0x2000000,0x1000000,0xffffff,0x2000000,0x6000000,0xe000000,0x1b000000,0x5f4e7752,0xcb679c6f,0xff54805f,0xff395946,0xff375643,0xff375743,0xff365742,
+ 0xff355541,0xff31543d,0xff2e503a,0xff2b4b37,0xff264630,0xff21402c,0xff1d3828,0xff193223,0xff172c1e,0xff14251b,0xff132619,0xff184f21,0xdc1a6b25,0x8917471c,
+ 0x4a151515,0x31151515,0x1d121212,0xf111111,0x7242424,0x2000000,0x1000000,0x5000000,0xd000000,0x1a000000,0x5f4e7752,0xd866986e,0xff4c7457,0xff3a5947,
+ 0xff3d5e49,0xff3e604a,0xff3e634b,0xff3e6249,0xff3b6247,0xff385f44,0xff355b3f,0xff305539,0xff2a4e34,0xff27482f,0xff214029,0xff1d3925,0xff1c3323,0xff182d1f,
+ 0xff16271b,0xff132018,0xff163b1c,0xe6196122,0x8e17441c,0x4d171717,0x31151515,0x1d1a1a1a,0xe121212,0x62b2b2b,0x3000000,0xa000000,0x16000000,0x473c5c3f,
+ 0xcb679d6f,0xff4d7658,0xff3d5e4a,0xff41634d,0xff43684f,0xff476e52,0xff456f51,0xff466f50,0xff436e4e,0xff3f6a4a,0xff396343,0xff325c3c,0xff3a5f43,0xff8a9e8f,
+ 0xff7a8f7f,0xff1f3e26,0xff1d3924,0xff1c3523,0xff1a2e20,0xff19281e,0xff16201a,0xff18381d,0xe01c6225,0x8019331b,0x4a151515,0x2d171717,0x18151515,0xb171717,
+ 0x6000000,0x11000000,0x23000000,0xa7659b6a,0xff568461,0xff3e5e4a,0xff43664f,0xff476d53,0xff4b7456,0xff4d7857,0xff4e7b59,0xff4d7c56,0xff497853,0xff44744e,
+ 0xff3c6b47,0xff35623e,0xffd6dfd8,0xffffffff,0xffffffff,0xff788c7b,0xff1d3c23,0xff1d3a24,0xff1e3524,0xff1f2f23,0xff1c2820,0xff181f1c,0xff1a4621,0xcb1d5d24,
+ 0x66171717,0x43171717,0x26141414,0x120e0e0e,0xb000000,0x1b000000,0x6f507d54,0xf8659a6c,0xff40624b,0xff41664d,0xff476f53,0xff4d7858,0xff527f5c,0xff55855f,
+ 0xff55875f,0xff54875d,0xff4f8459,0xff487e53,0xff3f7349,0xff35663e,0xfff1f4f2,0xffffffff,0xffffffff,0xff778d7b,0xff1d3f23,0xff1f3c24,0xff213b27,0xff223627,
+ 0xff222f26,0xff1e2621,0xff19211c,0xfb1d5a24,0xa71b421f,0x5a171717,0x37171717,0x1d121212,0x12000000,0x26000000,0xba64a06a,0xff4f7d59,0xff40624b,0xff466d51,
+ 0xff4d7858,0xff52815c,0xff588a62,0xff5a8e63,0xff5b9264,0xff599161,0xff538e5d,0xff4a8553,0xff3f7a49,0xff346b3e,0xff709376,0xffc3d0c5,0xff849b88,0xff1a4220,
+ 0xff1b4120,0xff1f3e24,0xff233c28,0xff253a2b,0xff26332a,0xff232c26,0xff1d2120,0xff1c3c22,0xda1f5b26,0x72191919,0x49151515,0x29131313,0x19000000,0x5d406844,
+ 0xf766a16d,0xff3d624a,0xff41674c,0xff497454,0xff4f7e59,0xff578861,0xff5c9164,0xff5f9868,0xff5e9b67,0xff5c9b65,0xff55975f,0xff4b8d54,0xff3e7f47,0xff326e3b,
+ 0xff27602f,0xff1e5226,0xff184820,0xff16421d,0xff1a4121,0xff1e4024,0xff233e28,0xff263b2c,0xff2a382e,0xff27302a,0xff222725,0xff1c231f,0xfb1f5c26,0xa01a341c,
+ 0x5b161616,0x36131313,0x21000000,0x93548a59,0xff568c5f,0xff3a5e46,0xff426a4d,0xff497654,0xff52825c,0xff578e61,0xff5e9767,0xff609f67,0xff60a369,0xff5ca265,
+ 0xff559d5d,0xff499151,0xff3a8044,0xff2d7036,0xff215f2b,0xff185222,0xff14481a,0xff13421a,0xff18401e,0xff1e3f23,0xff243f28,0xff273d2d,0xff2c3b30,0xff2b352e,
+ 0xff272d2a,0xff212323,0xff1f4825,0xc61d4822,0x6d171717,0x43131313,0x29000000,0xbe5b9b62,0xff487752,0xff3a6146,0xff416b4d,0xff497954,0xff50855a,0xff579160,
+ 0xff5c9a64,0xff5ea266,0xff5ea667,0xff5aa762,0xff509e59,0xff418f4b,0xff347d3c,0xff266d30,0xff387040,0xff407046,0xff104616,0xff134018,0xff163f1d,0xff1c3f23,
+ 0xff233e29,0xff293f2f,0xff2d3c31,0xff2d3730,0xff2a302d,0xff242727,0xff203825,0xe1205326,0x7b191919,0x4e141414,0x2f000000,0xde5fa566,0xff3d6747,0xff396043,
+ 0xff406d4a,0xff487951,0xff4f8459,0xff54915d,0xff579860,0xff59a160,0xff58a561,0xff54a85c,0xff469a50,0xff3b8b43,0xff529159,0xffc2d6c5,0xffffffff,0xffffffff,
+ 0xff4e7453,0xff0f3c14,0xff143b19,0xff1a3b20,0xff213c27,0xff293e2e,0xff2e3d33,0xff303933,0xff2e3331,0xff272a2a,0xff212e24,0xf0215a27,0x881a1a1a,0x58141414,
+ 0x34000000,0xf35fab67,0xff335a3e,0xff355f41,0xff3c6a47,0xff44764e,0xff4a8353,0xff4d8c56,0xff50955a,0xff509b59,0xff4d9d56,0xff469c50,0xff3c9044,0xff55985d,
+ 0xffc3d7c5,0xffe1eae2,0xffffffff,0xffffffff,0xff395e3f,0xff0d3614,0xff133617,0xff19381e,0xff213b26,0xff2a3d2f,0xff2f3d33,0xff333b35,0xff303532,0xff2a2d2d,
+ 0xff222624,0xfa235f29,0x901b1b1b,0x5f181818,0x37000000,0xfe5eac66,0xff2d5137,0xff325c3d,0xff3a6843,0xff3f7249,0xff437c4d,0xff478550,0xff478d50,0xff479250,
+ 0xff43944b,0xff398f43,0xff499452,0xffc3d9c6,0xff256b2c,0xffd0ddd2,0xffffffff,0xffdfe5e0,0xff0a3310,0xff0d3112,0xff113216,0xff19351e,0xff223927,0xff2b3c2f,
+ 0xff313d34,0xff353c37,0xff323634,0xff2c2e2e,0xff232426,0xfe25602b,0x951b1b1b,0x64171717,0x39040404,0xf354a55c,0xff2c5336,0xff2e5739,0xff35633d,0xff396c43,
+ 0xff3d7646,0xff3e7e48,0xff3f8448,0xff3b8745,0xff37863f,0xff2d8138,0xff24772c,0xff26712f,0xff2b6933,0xffffffff,0xffffffff,0xff8d9f8f,0xff092d0e,0xff0d2d11,
+ 0xff133017,0xff1a341e,0xff233827,0xff2d3c30,0xff333d36,0xff373d39,0xff343736,0xff2d2f2f,0xff242826,0xfb245a29,0x971b1b1b,0x65171717,0x38050505,0xe04b9b53,
+ 0xff2d5b37,0xff2a5334,0xff2f5d39,0xff34663d,0xff366e3f,0xff377541,0xff367a3e,0xff327b3c,0xff2c7a36,0xff22742d,0xff1a6a22,0xff0f5a18,0xff7c9d80,0xffffffff,
+ 0xffffffff,0xff36533b,0xff0a2a0f,0xff0e2b12,0xff152e18,0xff1c3320,0xff26382a,0xff303d33,0xff363e38,0xff373c39,0xff363837,0xff2d2e2f,0xff263028,0xf3225227,
+ 0x951a1a1a,0x63151515,0x35050505,0xc5408a48,0xff2f6539,0xff254d2f,0xff2a5733,0xff2d5f37,0xff316639,0xff306c3a,0xff2f6f37,0xff297033,0xff246f2d,0xff1b6924,
+ 0xff145d1c,0xff104e18,0xffd0dad2,0xffffffff,0xffdfe4e0,0xff0a270e,0xff0b2710,0xff112a14,0xff192f1c,0xff213525,0xff2b3a2e,0xff343e37,0xff39403b,0xff3a3e3c,
+ 0xff353737,0xff2d2e2f,0xff253828,0xe7214725,0x901b1b1b,0x5e161616,0x30050505,0xa033743a,0xff31743b,0xff1f4629,0xff25502e,0xff285731,0xff2a5f33,0xff2b6333,
+ 0xff296732,0xff25662d,0xff1e6427,0xff185e22,0xff15521d,0xff2f5c34,0xffffffff,0xffffffff,0xff7b8a7d,0xff0d260f,0xff0f2713,0xff152b18,0xff1e3020,0xff27372a,
+ 0xff303c33,0xff38403a,0xff3b413d,0xff3b3e3c,0xff343636,0xff2b2b2d,0xff254129,0xd51f3b22,0x87191919,0x58141414,0x2a060606,0x72224f27,0xf935853f,0xff1d4526,
+ 0xff204929,0xff25502d,0xff26572f,0xff275d2f,0xff265f2d,0xff225e2a,0xff215c29,0xff1c5625,0xff184b1f,0xff7f9783,0xffffffff,0xffffffff,0xff3b503f,0xff3d5040,
+ 0xff637065,0xff1b2f1f,0xff243528,0xff2d3b30,0xff373f39,0xff3c423e,0xff3d413f,0xff3a3c3b,0xff323334,0xff292b2b,0xfd254a29,0xbb1d2c1e,0x7b191919,0x4e141414,
+ 0x22080808,0x410c0c0c,0xc72f7e36,0xff235b2c,0xff1c4124,0xff1f4927,0xff234f2a,0xff24542c,0xff25582c,0xff25592c,0xff24562a,0xff215027,0xff1d4623,0xffd3dad4,
+ 0xffffffff,0xffffffff,0xff707d72,0xffc0c5c1,0xff2a3a2d,0xff233126,0xff2b382f,0xff343e37,0xff3b413c,0xff3e4340,0xff3d403e,0xff373939,0xff2e2e30,0xff27382a,
+ 0xe9224326,0x9a1a1a1a,0x6c151515,0x420f0f0f,0x1a0a0a0a,0x350e0e0e,0x8a205826,0xfa267431,0xff173d20,0xff1b4022,0xff1f4726,0xff234d2a,0xff27522d,0xff28522e,
+ 0xff29522e,0xff254c2b,0xff214426,0xffffffff,0xffffffff,0xfff0f1f0,0xff959d96,0xff2b3a2e,0xff233126,0xff2a372e,0xff333d36,0xff3a413c,0xff3e433f,0xff3f4340,
+ 0xff393b3b,0xff333435,0xff2a2c2c,0xfd254529,0xc81f3120,0x87191919,0x5b141414,0x350e0e0e,0x130d0d0d,0x280d0d0d,0x480e0e0e,0xbe22702a,0xff1b5b24,0xff17361d,
+ 0xff1c3d22,0xff224528,0xff264a2c,0xff2a4c2f,0xff2a4c30,0xff2a4a2f,0xff27442c,0xff4e6250,0xff5e6c60,0xff213224,0xff223125,0xff263429,0xff2b372e,0xff323c35,
+ 0xff39403b,0xff3d433f,0xff3e413f,0xff3c3d3d,0xff343536,0xff2c2c2e,0xff263b2a,0xe2213f24,0x9b1c1c1c,0x72161616,0x49111111,0x280d0d0d,0xc151515,0x1d121212,
+ 0x36131313,0x70173a1b,0xdc1b6d26,0xff18491f,0xff19331e,0xff1f3a25,0xff24402a,0xff28442d,0xff2b4530,0xff2c442f,0xff2b4230,0xff2a3e2d,0xff293a2c,0xff29372c,
+ 0xff2a372d,0xff2e3831,0xff333b35,0xff383e3a,0xff3b413d,0xff3c403e,0xff3a3c3b,0xff353737,0xff2e2e30,0xff28352a,0xf1244328,0xb41e281f,0x81181818,0x5a141414,
+ 0x350e0e0e,0x1c090909,0x7242424,0x120e0e0e,0x26141414,0x42131313,0x8917471c,0xe61a6323,0xff19451f,0xff1b3020,0xff203625,0xff243b2a,0xff293e2e,0xff2b3e30,
+ 0xff2d3f31,0xff2e3d31,0xff2e3c32,0xff2f3b33,0xff313b34,0xff343b35,0xff373d39,0xff383d3a,0xff393d3a,0xff373938,0xff333535,0xff2c2c2e,0xff28352a,0xf4234027,
+ 0xc21f2e20,0x8c1a1a1a,0x65141414,0x42131313,0x250e0e0e,0x120e0e0e,0x3000000,0xb171717,0x18151515,0x2d111111,0x4a151515,0x8e17441c,0xe01d6425,0xff1b4e22,
+ 0xff1b2f1f,0xff1f3023,0xff243428,0xff29372c,0xff2b382e,0xff2d3a31,0xff2f3931,0xff303833,0xff323834,0xff333935,0xff343936,0xff343735,0xff323434,0xff2e2f30,
+ 0xff2a2c2c,0xff263b2a,0xf1244328,0xc21f2e20,0x8f1b1b1b,0x6b151515,0x4a111111,0x2d111111,0x170b0b0b,0xa000000,0x1000000,0x5000000,0xe121212,0x1c121212,
+ 0x31151515,0x4d171717,0x8019331b,0xcb1d5d24,0xfb1e5c26,0xff1d4324,0xff1e2d21,0xff222c25,0xff262f29,0xff28302a,0xff2b322d,0xff2c322e,0xff2d322f,0xff2d302e,
+ 0xff2d2f2e,0xff2b2d2d,0xff292c2b,0xff27382a,0xfd254529,0xe2213f24,0xb41e281f,0x8c1a1a1a,0x6b151515,0x4c111111,0x30101010,0x1b090909,0xd000000,0x5000000,
+ 0xffffff,0x2000000,0x6000000,0xf111111,0x1d121212,0x31151515,0x4a151515,0x66171717,0xa71b421f,0xda1f5b26,0xfb205d27,0xff204c26,0xff213d26,0xff223225,
+ 0xff232b25,0xff242826,0xff252b26,0xff263229,0xff253829,0xff26422a,0xfd254a29,0xe9224326,0xc81f3120,0x9b1c1c1c,0x81181818,0x65141414,0x4a111111,0x30101010,
+ 0x1c090909,0xe000000,0x6000000,0x2000000,0xffffff,0x1000000,0x2000000,0x7000000,0x10202020,0x1d1a1a1a,0x2d171717,0x43171717,0x5a171717,0x72191919,
+ 0xa01a341c,0xc61d4822,0xe1205326,0xf0215a27,0xfa235f29,0xfe25602b,0xfb245a29,0xf3225227,0xe7214725,0xd51f3b22,0xbb1d2c1e,0x9a1a1a1a,0x87191919,0x72161616,
+ 0x5a141414,0x42131313,0x2d111111,0x1b090909,0xe000000,0x7000000,0x2000000,0x1000000,0xffffff,0xffffff,0x1000000,0x2000000,0x7242424,0xe121212,
+ 0x18151515,0x26141414,0x37171717,0x49151515,0x5b161616,0x6d171717,0x7b191919,0x881a1a1a,0x901b1b1b,0x951b1b1b,0x971b1b1b,0x951a1a1a,0x901b1b1b,0x87191919,
+ 0x7b191919,0x6c151515,0x5b141414,0x49111111,0x350e0e0e,0x250e0e0e,0x170b0b0b,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0x1000000,0x2000000,0x62b2b2b,0xb171717,0x120e0e0e,0x1d121212,0x29131313,0x36131313,0x43131313,0x4e141414,0x58141414,0x5f181818,0x64171717,
+ 0x65171717,0x63151515,0x5e161616,0x58141414,0x4e141414,0x420f0f0f,0x350e0e0e,0x280d0d0d,0x1c090909,0x120e0e0e,0xa000000,0x5000000,0x2000000,0x1000000,
+ 0xffffff,0xffffff
+};
+
+static const QRgb Terminal_data[] = {
+ 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
+ 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
+ 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff050343,0xff050343,0xff050344,0xff050344,
+ 0xff050344,0xff050344,0xff050344,0xff050344,0xff050343,0xff050342,0xff050340,0xff04033e,0xff04033c,0xff040239,0xff040236,0xff040233,0xff03022f,0xff03022b,
+ 0xff030228,0xff030225,0xff030223,0xff020120,0xff02011c,0xff020119,0xff020116,0xff010113,0xff010112,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
+ 0xff050343,0xff7e7e7e,0xff7e7e7e,0xff7f7f7f,0xff7f7f7f,0xff7f7f7f,0xff7e7e7e,0xff7e7e7e,0xff7c7c7c,0xff7a7a7a,0xff767676,0xff717171,0xff6c6c6c,0xff676767,
+ 0xff606060,0xff5a5a5a,0xff525252,0xff4b4b4b,0xff444444,0xff3f3f3f,0xff393939,0xff333333,0xff2e2e2e,0xff272727,0xff232323,0xff222222,0xff010112,0x5c000000,
+ 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff050344,0xff7e7e7e,0xff7f7f7f,0xff7f7f7f,0xff7e7e7e,0xff7e7e7e,0xff7d7d7d,0xff7b7b7b,0xff7c7c7c,0xff797979,
+ 0xff757575,0xff707070,0xff6a6a6a,0xff636363,0xff5d5d5d,0xff565656,0xff4d4d4d,0xff454545,0xff3f3f3f,0xff393939,0xff333333,0xff2d2d2d,0xff272727,0xff232323,
+ 0xff222222,0xff212121,0xff010111,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff050344,0xff7f7f7f,0xff7e7e7e,0xff7d7d7d,0xff7b7b7b,0xff787878,
+ 0xff787878,0xff777777,0xff797979,0xff787878,0xff747474,0xff6d6d6d,0xff686868,0xff606060,0xff5a5a5a,0xff515151,0xff494949,0xff404040,0xff393939,0xff333333,
+ 0xff2d2d2d,0xff272727,0xff232323,0xff222222,0xff212121,0xff202020,0xff010110,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff050344,0xff7f7f7f,
+ 0xff7c7c7c,0xff787878,0xff727272,0xff6d6d6d,0xff6a6a6a,0xff6e6e6e,0xff717171,0xff737373,0xff707070,0xff6c6c6c,0xff656565,0xff5e5e5e,0xff565656,0xff4d4d4d,
+ 0xff444444,0xff3b3b3b,0xff333333,0xff2d2d2d,0xff272727,0xff232323,0xff222222,0xff212121,0xff202020,0xff1e1e1e,0xff010110,0x93000000,0x62000000,0x3b000000,
+ 0x1f000000,0x3d000000,0xff050344,0xff7e7e7e,0xff7a7a7a,0xff717171,0xff666666,0xff52864b,0xff4b9b40,0xff5d5d5d,0xff656565,0xff6a6a6a,0xff6c6c6c,0xff696969,
+ 0xff626262,0xff5a5a5a,0xff525252,0xff494949,0xff404040,0xff363636,0xff2d2d2d,0xff272727,0xff232323,0xff222222,0xff212121,0xff202020,0xff1f1f1f,0xff1e1e1e,
+ 0xff01010f,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff050344,0xff7d7d7d,0xff777777,0xff6b6b6b,0xff51844a,0xff37f91c,0xff36ff1a,0xff419236,
+ 0xff545454,0xff5f5f5f,0xff636363,0xff636363,0xff5e5e5e,0xff585858,0xff4e4e4e,0xff454545,0xff3b3b3b,0xff313131,0xff272727,0xff232323,0xff222222,0xff212121,
+ 0xff202020,0xff1f1f1f,0xff1e1e1e,0xff1c1c1c,0xff01010f,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff050344,0xff7c7c7c,0xff747474,0xff686868,
+ 0xff40c82e,0xff36ff1a,0xff36ff1a,0xff36ff1a,0xff3d8d31,0xff4e4e4e,0xff565656,0xff5b5b5b,0xff5a5a5a,0xff525252,0xff4b4b4b,0xff404040,0xff363636,0xff2c2c2c,
+ 0xff242424,0xff232323,0xff212121,0xff202020,0xff1f1f1f,0xff1e1e1e,0xff1d1d1d,0xff1b1b1b,0xff01010e,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff050343,0xff7b7b7b,0xff767676,0xff6b6b6b,0xff585c58,0xff3ac926,0xff36ff1a,0xff36ff1a,0xff36ff1a,0xff3a8b2f,0xff474747,0xff4e4e4e,0xff505050,0xff4d4d4d,
+ 0xff454545,0xff3c3c3c,0xff313131,0xff252525,0xff232323,0xff212121,0xff202020,0xff1f1f1f,0xff1e1e1e,0xff1d1d1d,0xff1c1c1c,0xff1b1b1b,0xff01010e,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff050342,0xff797979,0xff757575,0xff6e6e6e,0xff5f5f5f,0xff4d504c,0xff38c624,0xff36ff1a,0xff36ff1a,0xff36ff1a,
+ 0xff37872b,0xff3e3e3e,0xff444444,0xff444444,0xff3e3e3e,0xff333333,0xff2a2a2a,0xff232323,0xff212121,0xff202020,0xff1f1f1f,0xff1e1e1e,0xff1d1d1d,0xff1c1c1c,
+ 0xff1b1b1b,0xff191919,0xff01010d,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff050340,0xff767676,0xff737373,0xff6f6f6f,0xff646464,0xff575757,
+ 0xff454944,0xff35c422,0xff36ff1a,0xff36ff1a,0xff36ff1a,0xff318125,0xff343434,0xff363636,0xff333333,0xff2b2b2b,0xff232323,0xff212121,0xff202020,0xff1f1f1f,
+ 0xff1e1e1e,0xff1d1d1d,0xff1b1b1b,0xff1a1a1a,0xff191919,0xff181818,0xff01010c,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff04033e,0xff717171,
+ 0xff707070,0xff6b6b6b,0xff666666,0xff5d5d5d,0xff4e4e4e,0xff3c403b,0xff33c11f,0xff36ff1a,0xff36ff1a,0xff36ff1a,0xff2d7d22,0xff2b2b2b,0xff292929,0xff232323,
+ 0xff222222,0xff202020,0xff1e1e1e,0xff1d1d1d,0xff1c1c1c,0xff1b1b1b,0xff1a1a1a,0xff191919,0xff181818,0xff171717,0xff01010c,0x99000000,0x66000000,0x3d000000,
+ 0x1f000000,0x3d000000,0xff04033c,0xff6c6c6c,0xff6a6a6a,0xff686868,0xff636363,0xff5b5b5b,0xff4e4e4e,0xff3e3e3e,0xff2a2e2a,0xff2fc41a,0xff36ff1a,0xff36ff1a,
+ 0xff36ff1a,0xff28751e,0xff1f1f1f,0xff202020,0xff202020,0xff1e1e1e,0xff1d1d1d,0xff1c1c1c,0xff1b1b1b,0xff1a1a1a,0xff191919,0xff181818,0xff171717,0xff161616,
+ 0xff01000b,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff040239,0xff676767,0xff636363,0xff606060,0xff5c5c5c,0xff535353,0xff484848,0xff363636,
+ 0xff283e25,0xff32df1a,0xff36ff1a,0xff36ff1a,0xff35f41a,0xff1f401a,0xff1d1d1d,0xff1e1e1e,0xff1e1e1e,0xff1d1d1d,0xff1b1b1b,0xff1a1a1a,0xff191919,0xff181818,
+ 0xff181818,0xff161616,0xff161616,0xff151515,0xff01000b,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff040236,0xff606060,0xff5d5d5d,0xff585858,
+ 0xff515151,0xff464646,0xff393939,0xff2c4229,0xff33de1b,0xff36ff1a,0xff36ff1a,0xff35fa1a,0xff216717,0xff1a1a1a,0xff1c1c1c,0xff1e1e1e,0xff1d1d1d,0xff1b1b1b,
+ 0xff1a1a1a,0xff191919,0xff181818,0xff171717,0xff161616,0xff151515,0xff151515,0xff141414,0xff01000a,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff040233,0xff5a5a5a,0xff545454,0xff4c4c4c,0xff424242,0xff373737,0xff2b4128,0xff33de1b,0xff36ff1a,0xff36ff1a,0xff34f21a,0xff1c4816,0xff181818,0xff1b1b1b,
+ 0xff1d1d1d,0xff1c1c1c,0xff1a1a1a,0xff181818,0xff171717,0xff161616,0xff161616,0xff151515,0xff141414,0xff141414,0xff131313,0xff131313,0xff01000a,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff03022f,0xff515151,0xff4b4b4b,0xff414141,0xff343434,0xff2a4026,0xff32de1a,0xff36ff1a,0xff36ff1a,0xff34f21a,
+ 0xff1b4815,0xff181818,0xff1b1b1b,0xff1b1b1b,0xff1b1b1b,0xff191919,0xff161616,0xff151515,0xff131313,0xff121212,0xff121212,0xff121212,0xff121212,0xff121212,
+ 0xff121212,0xff121212,0xff01000a,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff03022b,0xff4a4a4a,0xff404040,0xff363636,0xff2a4027,0xff32de1a,
+ 0xff36ff1a,0xff36ff1a,0xff34f21a,0xff1b4815,0xff181818,0xff1b1b1b,0xff1c1c1c,0xff1b1b1b,0xff191919,0xff151515,0xff131313,0xff101010,0xff0e0e0e,0xff0e0e0e,
+ 0xff0d0d0d,0xff0d0d0d,0xff0f0f0f,0xff0f0f0f,0xff101010,0xff101010,0xff010009,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff030228,0xff434343,
+ 0xff3a3a3a,0xff2e352d,0xff33db1b,0xff36ff1a,0xff36ff1a,0xff34f21a,0xff1b4815,0xff181818,0xff1b1b1b,0xff1c1c1c,0xff1c1c1c,0xff191919,0xff171717,0xff1a4614,
+ 0xff2ecf18,0xff2ece17,0xff2dce17,0xff2dce17,0xff2dce17,0xff2dce17,0xff2dce17,0xff1a5411,0xff101010,0xff101010,0xff010009,0x99000000,0x66000000,0x3d000000,
+ 0x1f000000,0x3d000000,0xff030225,0xff3e3e3e,0xff353535,0xff2a2a2a,0xff28711e,0xff35fa1a,0xff34f21a,0xff1d4917,0xff181818,0xff1b1b1b,0xff1d1d1d,0xff1c1c1c,
+ 0xff1c1c1c,0xff181818,0xff151515,0xff1b5213,0xff36ff1a,0xff36ff1a,0xff36ff1a,0xff36ff1a,0xff36ff1a,0xff36ff1a,0xff36ff1a,0xff1c6512,0xff0e0e0e,0xff101010,
+ 0xff010009,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff030223,0xff383838,0xff303030,0xff282828,0xff1f1f1f,0xff246e1a,0xff1f4c19,0xff1a1a1a,
+ 0xff1b1b1b,0xff1d1d1d,0xff1d1d1d,0xff1c1c1c,0xff1b1b1b,0xff181818,0xff151515,0xff1b5213,0xff36ff1a,0xff36ff1a,0xff36ff1a,0xff36ff1a,0xff36ff1a,0xff36ff1a,
+ 0xff36ff1a,0xff1c6512,0xff0e0e0e,0xff101010,0xff010009,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff020120,0xff333333,0xff2c2c2c,0xff252525,
+ 0xff1f1f1f,0xff1d1d1d,0xff1d1d1d,0xff1d1d1d,0xff1d1d1d,0xff1d1d1d,0xff1d1d1d,0xff1b1b1b,0xff1a1a1a,0xff171717,0xff151515,0xff141f12,0xff173f11,0xff143d0f,
+ 0xff143d0f,0xff143c0e,0xff143c0e,0xff143d0f,0xff153d10,0xff11200f,0xff0f0f0f,0xff101010,0xff010009,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff02011c,0xff2e2e2e,0xff272727,0xff222222,0xff212121,0xff1f1f1f,0xff1e1e1e,0xff1e1e1e,0xff1d1d1d,0xff1d1d1d,0xff1b1b1b,0xff1a1a1a,0xff191919,0xff171717,
+ 0xff151515,0xff131313,0xff111111,0xff0f0f0f,0xff0e0e0e,0xff0e0e0e,0xff0e0e0e,0xff0f0f0f,0xff0f0f0f,0xff0f0f0f,0xff101010,0xff111111,0xff010009,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff020119,0xff272727,0xff232323,0xff222222,0xff212121,0xff202020,0xff1f1f1f,0xff1e1e1e,0xff1d1d1d,0xff1c1c1c,
+ 0xff1a1a1a,0xff191919,0xff181818,0xff161616,0xff151515,0xff131313,0xff121212,0xff111111,0xff111111,0xff101010,0xff111111,0xff101010,0xff101010,0xff101010,
+ 0xff111111,0xff111111,0xff010009,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff020116,0xff232323,0xff222222,0xff212121,0xff202020,0xff1f1f1f,
+ 0xff1e1e1e,0xff1d1d1d,0xff1c1c1c,0xff1b1b1b,0xff191919,0xff181818,0xff171717,0xff161616,0xff151515,0xff141414,0xff131313,0xff121212,0xff121212,0xff111111,
+ 0xff111111,0xff111111,0xff111111,0xff111111,0xff111111,0xff121212,0xff01000a,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff010113,0xff222222,
+ 0xff212121,0xff202020,0xff1e1e1e,0xff1e1e1e,0xff1c1c1c,0xff1b1b1b,0xff1b1b1b,0xff191919,0xff181818,0xff171717,0xff161616,0xff151515,0xff141414,0xff131313,
+ 0xff121212,0xff111111,0xff111111,0xff111111,0xff111111,0xff111111,0xff111111,0xff111111,0xff121212,0xff121212,0xff01000a,0x87000000,0x5a000000,0x36000000,
+ 0x17000000,0x2e000000,0xff010112,0xff010112,0xff010111,0xff010110,0xff010110,0xff01010f,0xff01010f,0xff01010e,0xff01010e,0xff01010d,0xff01010c,0xff01010c,
+ 0xff01000b,0xff01000b,0xff01000a,0xff01000a,0xff01000a,0xff010009,0xff010009,0xff010009,0xff010009,0xff010009,0xff010009,0xff010009,0xff01000a,0xff01000a,
+ 0xff01000a,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
+ 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,
+ 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
+ 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
+ 0x18000000,0xf000000
+};
+
+static const QRgb Tetrix_data[] = {
+ 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
+ 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
+ 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x26000000,0x30000000,0x38000000,0x3d000000,0x3f000000,0x3f000000,0x3f000000,
+ 0x3f000000,0x3f000000,0x3e000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x19000000,0xff080573,0xff070562,0xff060551,0xff060550,
+ 0xff060550,0xff05054f,0xff05054f,0xff060550,0xff060550,0xff060551,0xff060551,0xff060551,0xff060551,0xff060552,0xff060552,0xff060552,0xff060552,0xff060552,
+ 0xff060552,0xff060552,0xff060552,0xff060552,0xff060552,0xff060552,0xff060552,0xff04043a,0xff01030f,0x3d000000,0x29000000,0x18000000,0x12000000,0x26000000,
+ 0xff070562,0xff83bd8a,0xff4fa05a,0xff4d9d58,0xff4c9a57,0xff4b9856,0xff4b9856,0xff4c9a57,0xff4d9d58,0xff4fa05a,0xff51a35a,0xff52a65b,0xff53a75c,0xff53a85c,
+ 0xff53a85c,0xff53a85c,0xff53a85c,0xff53a85c,0xff53a85c,0xff53a85c,0xff53a85c,0xff53a85c,0xff53a85c,0xff53a85c,0xff53a85c,0xff14811f,0xff000105,0x5c000000,
+ 0x3d000000,0x25000000,0x17000000,0x30000000,0xff060550,0xff4e9f59,0xff137c22,0xff127621,0xff117121,0xff116e22,0xff116e22,0xff117121,0xff127621,0xff137c22,
+ 0xff148121,0xff148521,0xff158721,0xff158821,0xff158921,0xff158921,0xff158921,0xff158921,0xff158921,0xff158921,0xff158921,0xff158921,0xff158921,0xff158921,
+ 0xff158921,0xff0e5c16,0xff000001,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x3a000004,0xff05044f,0xff4b9856,0xfffdc1a4,0xfffc9f72,0xfffc9f72,0xfffc9f72,
+ 0xfffc9f72,0xffe74c00,0xff106822,0xff127221,0xff137c21,0xff148321,0xff158621,0xff158821,0xff158921,0xff158921,0xff158921,0xff158921,0xff158921,0xff158921,
+ 0xff158921,0xff158921,0xff158921,0xff158921,0xff158921,0xff0e5c16,0xff000001,0x87000000,0x5a000000,0x36000000,0x1d000000,0x40000004,0xff05044d,0xff479054,
+ 0xfffc9f72,0xfffa5200,0xfffa5200,0xfffa5200,0xfffa5200,0xff7e2900,0xff0f5a22,0xff106822,0xff127621,0xff147f21,0xff148521,0xff158722,0xff158821,0xff158821,
+ 0xff158821,0xff158821,0xff158821,0xff158821,0xff158821,0xff158821,0xff158821,0xff158821,0xff158821,0xff0e5c16,0xff000001,0x93000000,0x62000000,0x3b000000,
+ 0x1f000000,0x44000008,0xff05044c,0xff448a51,0xfffc9f72,0xfffa5200,0xfffa5200,0xfffa5200,0xfffa5200,0xff7e2900,0xff0c4c22,0xff0e5d22,0xff116f22,0xff137b22,
+ 0xff148221,0xff158521,0xff158621,0xff158721,0xff158621,0xff158721,0xff158721,0xff158721,0xff158721,0xff158721,0xff158721,0xff158721,0xff158721,0xff0e5b16,
+ 0xff000001,0x9a000000,0x67000000,0x3d000000,0x1f000000,0x45000007,0xff05044c,0xff428550,0xfffc9f72,0xfffa5200,0xfffa5200,0xfffa5200,0xfffa5200,0xff7e2900,
+ 0xff0b4022,0xff0d5422,0xff106821,0xff127521,0xff137d21,0xff148021,0xff148221,0xff148221,0xff148221,0xff148222,0xff148222,0xff148321,0xff148321,0xff148321,
+ 0xff148321,0xff148322,0xff148322,0xff0e5916,0xff000002,0x9b000002,0x68000000,0x3e000000,0x1f000000,0x45000007,0xff05044b,0xff40824f,0xfffc9f72,0xfffa5200,
+ 0xfffa5200,0xfffa5200,0xfffa5200,0xff7e2900,0xff093723,0xff0b4b23,0xff0e5f22,0xff116c21,0xff127421,0xff127822,0xff137a21,0xff137a21,0xff127a21,0xff137a22,
+ 0xff137a21,0xff137a21,0xff137921,0xff137921,0xff137a21,0xff137a21,0xff137b22,0xff0d5417,0xff000002,0x9e000003,0x6a000002,0x3f000000,0x1f000000,0x46000007,
+ 0xff05044b,0xff40814f,0xffe74c00,0xff7e2900,0xff7e2900,0xff7e2900,0xff7e2900,0xff5d1f00,0xff082d23,0xff0a3f23,0xff0c5121,0xff0e5d22,0xff0f6522,0xff106822,
+ 0xff106a22,0xff106b22,0xff106a22,0xff116a22,0xff106922,0xff106921,0xff106921,0xff106921,0xff106921,0xff106a22,0xff116d22,0xff0b4b19,0xff000004,0xa3000006,
+ 0x6e000005,0x42000004,0x1f000000,0x46000007,0xff05044b,0xff3f804e,0xfffdc1a4,0xfffc9f72,0xfffc9f72,0xfffc9f72,0xfffc9f72,0xffe74c00,0xfffdc1a4,0xfffc9f72,
+ 0xfffc9f72,0xfffc9f72,0xfffc9f72,0xffe74c00,0xffeaffad,0xffdeff7f,0xffdeff7f,0xffdeff7f,0xffdeff7f,0xffb4ec16,0xffeaffad,0xffdeff7f,0xffdeff7f,0xffdeff7f,
+ 0xffdeff7f,0xffb4ec16,0xff000006,0xaa000009,0x74000007,0x46000007,0x1f000000,0x46000007,0xff05044b,0xff3f804e,0xfffc9f72,0xfffa5200,0xfffa5200,0xfffa5200,
+ 0xfffa5200,0xff7e2900,0xfffc9f72,0xfffa5200,0xfffa5200,0xfffa5200,0xfffa5200,0xff7e2900,0xffdeff7f,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,
+ 0xffdeff7f,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,0xff000007,0xb100000d,0x7b00000a,0x4a000007,0x1f000000,0x46000007,0xff05044b,0xff40814f,
+ 0xfffc9f72,0xfffa5200,0xfffa5200,0xfffa5200,0xfffa5200,0xff7e2900,0xfffc9f72,0xfffa5200,0xfffa5200,0xfffa5200,0xfffa5200,0xff7e2900,0xffdeff7f,0xffc3ff18,
+ 0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,0xffdeff7f,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,0xff000009,0xb800000f,0x8100000c,0x4e00000a,
+ 0x1f000000,0x45000007,0xff05044b,0xff40824f,0xfffc9f72,0xfffa5200,0xfffa5200,0xfffa5200,0xfffa5200,0xff7e2900,0xfffc9f72,0xfffa5200,0xfffa5200,0xfffa5200,
+ 0xfffa5200,0xff7e2900,0xffdeff7f,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,0xffdeff7f,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,
+ 0xff00000a,0xbc000012,0x8400000e,0x4f00000a,0x1f000000,0x45000007,0xff05044c,0xff428550,0xfffc9f72,0xfffa5200,0xfffa5200,0xfffa5200,0xfffa5200,0xff7e2900,
+ 0xfffc9f72,0xfffa5200,0xfffa5200,0xfffa5200,0xfffa5200,0xff7e2900,0xffdeff7f,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,0xffdeff7f,0xffc3ff18,
+ 0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,0xff00000a,0xbc000012,0x8400000e,0x4f00000a,0x1f000000,0x44000008,0xff05044c,0xff448a51,0xffe74c00,0xff7e2900,
+ 0xff7e2900,0xff7e2900,0xff7e2900,0xff5d1f00,0xffe74c00,0xff7e2900,0xff7e2900,0xff7e2900,0xff7e2900,0xff5d1f00,0xffb4ec16,0xff63810c,0xff63810c,0xff63810c,
+ 0xff63810c,0xff495f09,0xffb4ec16,0xff63810c,0xff63810c,0xff63810c,0xff63810c,0xff495f09,0xff000009,0xb800000f,0x8100000c,0x4e00000a,0x1f000000,0x42000004,
+ 0xff05044d,0xff479054,0xff106822,0xff0f5a21,0xff0c4b23,0xff0b3f23,0xff093623,0xff072d22,0xfffdc1a4,0xfffc9f72,0xfffc9f72,0xfffc9f72,0xfffc9f72,0xffe74c00,
+ 0xffeaffad,0xffdeff7f,0xffdeff7f,0xffdeff7f,0xffdeff7f,0xffb4ec16,0xff041823,0xff062323,0xff082d23,0xff093723,0xff0b4023,0xff08331d,0xff000007,0xb100000d,
+ 0x7b00000a,0x4a000007,0x1f000000,0x41000004,0xff05044f,0xff4b9856,0xff127221,0xff106822,0xff0e5d22,0xff0d5422,0xff0b4b22,0xff0a3f22,0xfffc9f72,0xfffa5200,
+ 0xfffa5200,0xfffa5200,0xfffa5200,0xff7e2900,0xffdeff7f,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,0xff062323,0xff073024,0xff0a3f22,0xff0b4b22,
+ 0xff0d5422,0xff093e1b,0xff000006,0xaa000009,0x74000007,0x46000007,0x1f000000,0x3f000000,0xff060550,0xff4e9f59,0xff137c22,0xff127621,0xff116f22,0xff106822,
+ 0xff0e5f22,0xff0c5121,0xfffc9f72,0xfffa5200,0xfffa5200,0xfffa5200,0xfffa5200,0xff7e2900,0xffdeff7f,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,
+ 0xff072c24,0xff0a3e23,0xff0c5121,0xff0e5f22,0xff106822,0xff0b4a19,0xff000004,0xa3000006,0x6e000005,0x42000004,0x1f000000,0x3e000000,0xff060551,0xff51a35a,
+ 0xff148321,0xff147f21,0xff137c22,0xff127621,0xff116d21,0xff0e5f22,0xfffc9f72,0xfffa5200,0xfffa5200,0xfffa5200,0xfffa5200,0xff7e2900,0xffdeff7f,0xffc3ff18,
+ 0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,0xff093323,0xff0b4822,0xff0e5d21,0xff116d21,0xff127621,0xff0d5318,0xff000002,0x9e000003,0x6a000002,0x3f000000,
+ 0x1f000000,0x3e000000,0xff060551,0xff52a65b,0xff158621,0xff148521,0xff148221,0xff137e21,0xff127621,0xff106821,0xfffc9f72,0xfffa5200,0xfffa5200,0xfffa5200,
+ 0xfffa5200,0xff7e2900,0xffdeff7f,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,0xff093723,0xff0c4d23,0xff0f6421,0xff127421,0xff137d21,0xff0d5717,
+ 0xff000002,0x9b000002,0x68000000,0x3e000000,0x1f000000,0x3d000000,0xff060552,0xff53a75c,0xff158821,0xff158721,0xff158621,0xff148221,0xff137b22,0xff116f22,
+ 0xffe74c00,0xff7e2900,0xff7e2900,0xff7e2900,0xff7e2900,0xff5d1f00,0xffb4ec16,0xff63810c,0xff63810c,0xff63810c,0xff63810c,0xff495f09,0xff0a3922,0xff0c5022,
+ 0xff106721,0xff127821,0xff148121,0xff0e5916,0xff000001,0x9a000000,0x67000000,0x3d000000,0x1f000000,0x3d000000,0xff060552,0xff53a85c,0xff158921,0xff158821,
+ 0xff158722,0xff148521,0xff147f21,0xff127621,0xff106822,0xff0f5a22,0xff0d4c22,0xff0b4322,0xff0b3e22,0xff0a3b22,0xffeaffad,0xffdeff7f,0xffdeff7f,0xffdeff7f,
+ 0xffdeff7f,0xffb4ec16,0xff0a3a23,0xff0c5122,0xff106821,0xff137921,0xff148221,0xff0e5a17,0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff060552,0xff53a85c,0xff158921,0xff158921,0xff158821,0xff158621,0xff148321,0xff137c21,0xff127221,0xff106722,0xff0f5e22,0xff0d5622,0xff0d5022,0xff0b4922,
+ 0xffdeff7f,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,0xff0a3a23,0xff0c5123,0xff106921,0xff137921,0xff148321,0xff0e5b17,0xff000001,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff060552,0xff53a85c,0xff158921,0xff158921,0xff158821,0xff158721,0xff148521,0xff148121,0xff137c22,0xff127521,
+ 0xff116f21,0xff106922,0xff0f6122,0xff0d5621,0xffdeff7f,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,0xff0a3b23,0xff0d5223,0xff106921,0xff137921,
+ 0xff148321,0xff0e5b17,0xff000001,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff060552,0xff53a85c,0xff158921,0xff158921,0xff158921,0xff158821,
+ 0xff158721,0xff148521,0xff148321,0xff147f21,0xff137b21,0xff127722,0xff116f21,0xff0f6122,0xffdeff7f,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,
+ 0xff0a3d23,0xff0d5422,0xff106a22,0xff137a21,0xff148322,0xff0e5b17,0xff000001,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff04043a,0xff14811f,
+ 0xff0e5c16,0xff0e5c16,0xff0e5c16,0xff0e5c16,0xff0e5c16,0xff0e5b16,0xff0e5a17,0xff0e5916,0xff0e5817,0xff0c5517,0xff0c5018,0xff0b4618,0xffdeff7f,0xffc3ff18,
+ 0xffc3ff18,0xffc3ff18,0xffc3ff18,0xff63810c,0xff082d1d,0xff093b1b,0xff0b4918,0xff0d5318,0xff0d5817,0xff09370f,0xff000000,0x87000000,0x5a000000,0x36000000,
+ 0x17000000,0x2e000000,0xff01030f,0xff000105,0xff000001,0xff000001,0xff000001,0xff000001,0xff000001,0xff000001,0xff000001,0xff000001,0xff000002,0xff000002,
+ 0xff000003,0xff000004,0xff07060c,0xff040306,0xff040306,0xff040306,0xff040306,0xff030205,0xff000009,0xff000006,0xff000004,0xff000003,0xff000002,0xff000001,
+ 0xff000000,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x9a000002,0x9c000002,0xa0000003,0xa7000008,0xb200000d,0xbd010110,0xc6010115,0xcc010116,0xcc010116,0xc6010115,0xbd010110,0xb200000d,
+ 0xa7000008,0xa0000003,0x96000002,0x88000002,0x75000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
+ 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x67000000,0x69000002,0x6d000005,0x74000007,0x7f00000c,0x8b000011,0x95000013,0x9a000014,
+ 0x9a000014,0x95000013,0x8b000011,0x7f00000c,0x74000007,0x6d000005,0x65000003,0x5b000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
+ 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3e000000,0x3f000000,0x42000004,0x48000007,
+ 0x4f00000d,0x5800000e,0x5f000010,0x63000012,0x63000012,0x5f000010,0x5800000e,0x4f00000d,0x48000007,0x42000004,0x3d000000,0x37000000,0x2e000000,0x25000000,
+ 0x18000000,0xf000000
+};
+
+static const QRgb TextEditor_data[] = {
+ 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
+ 0x1f000000,0x1f000000,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x1d000000,0x1b000000,
+ 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3e040404,0x3f080808,0x3f080808,0x3f0c0c0c,0x3f0c0c0c,0x3f0c0c0c,0x3f0c0c0c,0x3f0c0c0c,0x3f080808,
+ 0x3f080808,0x3e040404,0x3c040404,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff888800,0xff888800,0xff888800,0xff888800,
+ 0xff888800,0xff888800,0xff888800,0xff888800,0xff888800,0xff888800,0xff888800,0xff888800,0xff888800,0xff888800,0xff878700,0xff868600,0xff848400,0xff808000,
+ 0xff7a7900,0xff736100,0xff835a00,0xff805e00,0xff775b00,0xff7d5900,0xff6f5300,0xff624600,0xff573600,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
+ 0xff888800,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffefefc,
+ 0xfffdfdf9,0xfff9f9f1,0xfff2f2e4,0xffe9e6cb,0xffe8c697,0xffeeac4f,0xffe89f3a,0xffe89a25,0xffec9025,0xffbe851e,0xffb76f0c,0xff944f02,0xff261b00,0x5c000000,
+ 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff888800,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+ 0xffffffff,0xfffefefe,0xfffefefd,0xfffcfcf9,0xfff9f9f2,0xfff3f3e6,0xffeae9d2,0xffe1cda9,0xffeba958,0xffe8a22c,0xffe39313,0xffe18c13,0xffca790c,0xffa36511,
+ 0xff824e06,0xff4b2f0d,0xff343400,0x75020202,0x4f030303,0x2e000000,0x1b000000,0x36000000,0xff888800,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+ 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffefefd,0xfffcfcf9,0xfffafaf3,0xfff4f4e8,0xffecebd5,0xffe5d6b5,0xffe8aa60,0xfff3a837,0xffe3981f,
+ 0xffec9017,0xffca7a11,0xffae700f,0xff90550c,0xff4d3811,0xff60602c,0xff535300,0x88060606,0x5b030303,0x37050505,0x1d000000,0x3b000000,0xff888800,0xffffffff,
+ 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffefefd,0xfffdfdfa,0xfffafaf4,0xfff4f4e9,0xffedecd6,0xffdecfa3,
+ 0xffefb067,0xfffaac3f,0xffea9829,0xffe9931d,0xffd38117,0xffb06d1a,0xff905a18,0xff593d14,0xff5d5b2d,0xff999956,0xff565600,0x95070707,0x63050505,0x3c040404,
+ 0x1f000000,0x3d000000,0xff888800,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffefefd,0xfffdfdfb,0xfff9f9f4,
+ 0xfff5f5eb,0xffeeeedb,0xffdbd3bc,0xffe7b26e,0xffeda240,0xffe9a326,0xffef9523,0xffd8851c,0xffb47a20,0xff97631c,0xff6b491b,0xff605f36,0xff9d9d5a,0xffa4a46f,
+ 0xff5a5a00,0x9b0a0a0a,0x68070707,0x3e040404,0x1f000000,0x3d000000,0xff888800,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+ 0xfffffffe,0xfffdfdfb,0xfffbfbf6,0xfff5f5ec,0xffefefdc,0xffe6dec2,0xffe2ac63,0xfff6a541,0xffe3a024,0xffec981d,0xffd4831b,0xffb97b20,0xff9d6d22,0xff765121,
+ 0xff5f5c37,0xff9d9d5d,0xffa8a872,0xffaaaa85,0xff5c5c00,0x9c0d0d0d,0x690c0c0c,0x3f080808,0x1f000000,0x3d000000,0xff888800,0xffffffff,0xffffffff,0xffffffff,
+ 0xffffffff,0xffffffff,0xffffffff,0xfffffffe,0xfffefefc,0xfffbfbf7,0xfff7f7ee,0xfff0f0df,0xffebe6cf,0xffe7b172,0xffeca33f,0xfff89e24,0xffe79712,0xffdd8615,
+ 0xffbb7f1f,0xffa26b26,0xff7c5520,0xff463e32,0xff9d9d5e,0xffabab76,0xffafaf89,0xffb2b298,0xff5e5e00,0x9d121212,0x6a0e0e0e,0x3f0c0c0c,0x1f000000,0x3d000000,
+ 0xff888800,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffdfdfc,0xfffcfcf8,0xfff8f8f0,0xfff1f1e2,0xffe8e6c8,0xffe2be7f,0xffe59d42,
+ 0xffe3a022,0xffeb9114,0xffe38410,0xffc07c11,0xffa46c1c,0xff7d571c,0xff4c402c,0xffa4a45e,0xffadad77,0xffb1b18b,0xffb7b79c,0xffb5b5a6,0xff5f5f00,0x9e151515,
+ 0x6b131313,0x40101010,0x1f000000,0x3d000000,0xff888800,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffefefd,0xfffdfdfa,0xfff9f9f2,0xfff3f3e6,
+ 0xffe8e8cf,0xffdbc8a4,0xffe99c48,0xfff2972b,0xffde990d,0xffe3870a,0xffc77e13,0xffa7690d,0xff895313,0xff4c4223,0xff8c8c51,0xffaaaa72,0xffb2b28a,0xffb7b79d,
+ 0xffb8b8a8,0xffb5b5ab,0xff5d5d00,0xa01b1b1b,0x6c181818,0x41141414,0x1f000000,0x3d000000,0xff888800,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffffffe,
+ 0xfffdfdfb,0xfffafaf5,0xfff5f5ea,0xffebebd6,0xffc1bdb8,0xffab8850,0xfff89f24,0xffe09219,0xffec8d06,0xffc57004,0xff9c6c09,0xff8d530b,0xff533718,0xff6e7240,
+ 0xffa5a56a,0xffaeae84,0xffb4b498,0xffb7b7a6,0xffb7b7ae,0xffb2b2ad,0xff5b5b00,0xa1202020,0x6d1c1c1c,0x42171717,0x1f000000,0x3d000000,0xff888800,0xffffffff,
+ 0xffffffff,0xffffffff,0xfffefefe,0xfffdfdfc,0xfffbfbf7,0xfff6f6ed,0xffefefdd,0xffe0dacc,0xff716a63,0xffac7c4d,0xfffeaa0d,0xffe79602,0xffd0710a,0xffa86c09,
+ 0xff895006,0xff4f360b,0xff5c5b31,0xff9c9c5e,0xffa8a87a,0xffb0b092,0xffb5b5a3,0xffb7b7ad,0xffb5b5b0,0xffaeaeac,0xff595900,0xa2232323,0x6e202020,0x421b1b1b,
+ 0x1f000000,0x3d000000,0xff888800,0xffffffff,0xffffffff,0xffffffff,0xfffefefd,0xfffcfcf9,0xfff9f9f2,0xfff2f2e4,0xffe0deca,0xffa09692,0xff796550,0xff805b56,
+ 0xff9c7040,0xff895538,0xffae640c,0xff8b4b02,0xff543509,0xff4c4a23,0xff959553,0xffa0a070,0xffa9a98a,0xffb0b09d,0xffb5b5aa,0xffb4b4ae,0xffb0b0ad,0xffa9a9a8,
+ 0xff565600,0xa3262626,0x6f222222,0x44222222,0x1f000000,0x3e040404,0xff888800,0xffffffff,0xffffffff,0xfffefefe,0xfffdfdfb,0xfffbfbf6,0xfff5f5eb,0xffebebd6,
+ 0xff999f9e,0xff7e7168,0xff7d604d,0xff7b563c,0xff685c45,0xff59383f,0xff955802,0xff543609,0xff4f4e24,0xff8b8c49,0xff979765,0xffa2a280,0xffaaaa95,0xffb0b0a4,
+ 0xffb2b2ac,0xffb0b0ad,0xffababaa,0xffa5a5a5,0xff535300,0xa3292929,0x70242424,0x44222222,0x20080808,0x3f080808,0xff888800,0xffffffff,0xfffefefe,0xfffefefd,
+ 0xfffdfdf9,0xfff8f8f1,0xfff1f1e1,0xffd5d4be,0xff8a8779,0xff796249,0xff7c6151,0xff8c6452,0xff604933,0xff483d31,0xff423322,0xff3b3f1f,0xff828443,0xff93935d,
+ 0xff9a9a77,0xffa3a38c,0xffaaaa9d,0xffadada6,0xffaeaeab,0xffadadab,0xffa7a7a7,0xff9f9f9f,0xff515100,0xa3292929,0x70242424,0x44222222,0x20080808,0x3f080808,
+ 0xff888800,0xffffffff,0xfffffffe,0xfffdfdfb,0xfffafaf5,0xfff5f5e8,0xffeaead4,0xffbbb2b1,0xff614f47,0xff7e6046,0xff846156,0xff725149,0xff402f23,0xff1d2015,
+ 0xff23262e,0xff6a6e3c,0xff919159,0xff96966f,0xff9c9c83,0xffa2a294,0xffa7a7a1,0xffaaaaa6,0xffa9a9a7,0xffa7a7a7,0xffa2a2a2,0xff9b9b9b,0xff4e4e00,0xa3272727,
+ 0x6f222222,0x431e1e1e,0x20080808,0x3f0c0c0c,0xff888800,0xfffefefe,0xfffdfdfc,0xfffcfcf8,0xfff8f8ef,0xfff0f0de,0xffe5e6d0,0xff796e5d,0xff8b6b5f,0xff76605b,
+ 0xff4e423d,0xff242211,0xff161c21,0xff2e302b,0xff737141,0xff8f8f57,0xff93936b,0xff98987f,0xff9c9c8d,0xffa1a19a,0xffa5a5a2,0xffa6a6a4,0xffa5a5a4,0xffa3a3a3,
+ 0xff9e9e9e,0xff979797,0xff4c4c00,0xa3262626,0x6f222222,0x431e1e1e,0x20080808,0x3f0c0c0c,0xff888800,0xfffefefd,0xfffcfcfa,0xfffafaf4,0xfff3f3e6,0xffe4e3ce,
+ 0xffa2a198,0xff81766a,0xff896c64,0xff4c3f39,0xff122417,0xff181e1a,0xff454534,0xff878847,0xff919159,0xff94946d,0xff97977d,0xff99998a,0xff9b9b92,0xffa0a09b,
+ 0xffa2a2a0,0xffa2a2a1,0xffa2a2a2,0xff9f9f9f,0xff9a9a9a,0xff919191,0xff494900,0xa2232323,0x6e1e1e1e,0x421b1b1b,0x20080808,0x3f0c0c0c,0xff888800,0xfffefefc,
+ 0xfffafaf6,0xfff6f6ec,0xffeeeedb,0xffb3b7b0,0xff706d62,0xff827568,0xff504740,0xff2c2e2a,0xff292e2b,0xff5f5f3e,0xff929252,0xff979762,0xff989873,0xff9b9b81,
+ 0xff9c9c8b,0xff9a9a91,0xff9c9c98,0xff9f9f9d,0xffa1a1a0,0xffa2a2a1,0xffa0a0a0,0xff9b9b9b,0xff969696,0xff8f8f8f,0xff484800,0xa11e1e1e,0x6d1c1c1c,0x42171717,
+ 0x20080808,0x3f0c0c0c,0xff888800,0xfffcfcf9,0xfff8f8f2,0xfff3f3e4,0xffd2d2c1,0xff767a7c,0xff937e75,0xff4e483a,0xff282b22,0xff3e4339,0xff818350,0xff9f9f63,
+ 0xffa1a171,0xffa2a27e,0xffa2a28a,0xffa1a192,0xffa1a198,0xff9f9f9b,0xff9f9f9c,0xffa0a09f,0xffa2a2a1,0xffa1a1a1,0xff9e9e9e,0xff9a9a9a,0xff939393,0xff8d8d8d,
+ 0xff474700,0x9f1a1a1a,0x6b151515,0x40101010,0x20080808,0x3f0c0c0c,0xff888800,0xfffbfbf6,0xfff6f6eb,0xffececd8,0xff898981,0xff514f4d,0xff635446,0xff2e312a,
+ 0xff5a5b45,0xff9e9f67,0xffa9a973,0xffa9a97f,0xffa9a98a,0xffaaaa94,0xffa9a99c,0xffa7a79f,0xffa5a5a0,0xffa2a2a0,0xffa1a1a0,0xffa1a1a1,0xffa0a0a0,0xffa0a0a0,
+ 0xff9b9b9b,0xff979797,0xff909090,0xff8a8a8a,0xff464600,0x9e151515,0x6a111111,0x3f0c0c0c,0x20080808,0x3f080808,0xff888800,0xfff8f8f1,0xfff3f3e3,0xffc5c5b2,
+ 0xff4e4e4e,0xff1c1c1c,0xff282825,0xff78785a,0xffaeae78,0xffb2b282,0xffb2b28c,0xffb2b296,0xffb1b19e,0xffb0b0a4,0xffadada6,0xffaaaaa6,0xffa6a6a3,0xffa2a2a1,
+ 0xffa1a1a1,0xffa0a0a0,0xff9f9f9f,0xff9c9c9c,0xff989898,0xff929292,0xff8c8c8c,0xff878787,0xff454500,0x9d101010,0x690c0c0c,0x3f080808,0x20080808,0x3f080808,
+ 0xff888800,0xfff6f6ed,0xffdedecd,0xff63635e,0xff141414,0xff2b2b26,0xff848462,0xffb5b584,0xffb6b68b,0xffb6b696,0xffb6b69f,0xffb7b7a7,0xffb6b6ab,0xffb2b2ad,
+ 0xffadadab,0xffa9a9a7,0xffa5a5a4,0xffa2a2a2,0xff9f9f9f,0xff9e9e9e,0xff9b9b9b,0xff989898,0xff949494,0xff8e8e8e,0xff898989,0xff848484,0xff444400,0x9c0b0b0b,
+ 0x68070707,0x3e040404,0x20080808,0x3e040404,0xff888800,0xffefefe4,0xff7d7d74,0xff0c0c0c,0xff3c3c33,0xffa2a27d,0xffbaba8e,0xffb8b893,0xffbaba9c,0xffbcbca6,
+ 0xffb9b9ac,0xffb8b8af,0xffb5b5b0,0xffb1b1ad,0xffacacab,0xffa7a7a7,0xffa3a3a3,0xff9f9f9f,0xff9b9b9b,0xff999999,0xff979797,0xff929292,0xff8e8e8e,0xff8a8a8a,
+ 0xff868686,0xff828282,0xff444400,0x9b080808,0x67050505,0x3e040404,0x1d000000,0x3c040404,0xff888800,0xffe3e3d8,0xff111110,0xff67675a,0xffc4c4a2,0xffbebe9a,
+ 0xffbaba99,0xffbabaa0,0xffbcbca9,0xffbbbbaf,0xffb9b9b1,0xffb5b5b2,0xffb1b1af,0xffacacab,0xffa7a7a7,0xffa3a3a3,0xff9e9e9e,0xff9a9a9a,0xff969696,0xff939393,
+ 0xff909090,0xff8c8c8c,0xff898989,0xff868686,0xff838383,0xff828282,0xff444400,0x94050505,0x63030303,0x3b000000,0x1b000000,0x36000000,0xff868600,0xfff2f2f2,
+ 0xffe9e9e9,0xffe2e2e2,0xffdadada,0xffd4d4d4,0xffcdcdcd,0xffc8c8c8,0xffc3c3c3,0xffbdbdbd,0xffb6b6b6,0xffb0b0b0,0xffaaaaaa,0xffa6a6a6,0xffa0a0a0,0xff9b9b9b,
+ 0xff979797,0xff919191,0xff8f8f8f,0xff8d8d8d,0xff8a8a8a,0xff878787,0xff848484,0xff828282,0xff828282,0xff818181,0xff454500,0x87020202,0x5a000000,0x36000000,
+ 0x17000000,0x2e000000,0xff828200,0xff7d7d00,0xff787800,0xff747400,0xff6f6f00,0xff6c6c00,0xff686800,0xff656500,0xff636300,0xff5f5f00,0xff5c5c00,0xff595900,
+ 0xff565600,0xff535300,0xff515100,0xff4e4e00,0xff4c4c00,0xff494900,0xff484800,0xff474700,0xff464600,0xff454500,0xff444400,0xff444400,0xff444400,0xff454500,
+ 0xff464600,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x75040404,0x88060606,0x95070707,0x9b0a0a0a,0x9c0d0d0d,0x9d121212,
+ 0x9e151515,0xa01b1b1b,0xa1202020,0xa2232323,0xa3262626,0xa3292929,0xa3292929,0xa3272727,0xa3262626,0xa2232323,0xa11e1e1e,0x9f1a1a1a,0x9e151515,0x9d101010,
+ 0x9c0b0b0b,0x9b080808,0x94050505,0x87020202,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4e030303,0x5b030303,
+ 0x63050505,0x68070707,0x690c0c0c,0x6a0e0e0e,0x6b131313,0x6c181818,0x6d1c1c1c,0x6e202020,0x6f222222,0x70242424,0x70242424,0x6f222222,0x6f222222,0x6e1e1e1e,
+ 0x6d1c1c1c,0x6b151515,0x6a111111,0x690c0c0c,0x68070707,0x67050505,0x63030303,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
+ 0x18000000,0x25000000,0x2e000000,0x37050505,0x3c040404,0x3e040404,0x3f080808,0x3f0c0c0c,0x40101010,0x41141414,0x42171717,0x421b1b1b,0x44222222,0x44222222,
+ 0x44222222,0x431e1e1e,0x431e1e1e,0x421b1b1b,0x42171717,0x40101010,0x3f0c0c0c,0x3f080808,0x3e040404,0x3e040404,0x3b000000,0x36000000,0x2e000000,0x25000000,
+ 0x18000000,0xf000000
+};
+
+static const QRgb TodoList_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x1000000,0x1000000,0x1000000,0x1000000,0x1000000,0x1000000,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x4000000,0x5000000,0x7000000,0x7000000,0x6000000,
+ 0x4000000,0x3000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,
+ 0xd000000,0x11000000,0x12000000,0x10000000,0xc000000,0x8000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,
+ 0x2000000,0x6000000,0xd000000,0x14000000,0x56a17f7f,0xc7a65151,0x30210000,0x20000000,0x19000000,0x11000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0x1000000,0x2000000,0x6000000,0xd000000,0x19000000,0x5d977979,0xf8d2a5a5,0xffa64646,0xd4660000,0x461e0000,0x2b000000,0x1d000000,
+ 0x1000000,0x2000000,0x4000000,0x6000000,0x8000000,0x9000000,0xa000000,0xa000000,0xa000000,0xa000000,0xa000000,0xa000000,0xa000000,0xa000000,
+ 0xa000000,0xa000000,0xa000000,0xa000000,0xa000000,0xa000000,0xa000000,0xc000000,0x11000000,0x1b000000,0x60937676,0xf8d2a5a5,0xffb66767,0xff870404,
+ 0xff780000,0xd8550000,0x48140000,0x29000000,0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,
+ 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1e000000,0x1d000000,0x1c000000,0x1e000000,0x24000000,0x658b7070,
+ 0xf8d2a5a5,0xffb66767,0xff880606,0xff850000,0xff6f0000,0xff220000,0xb11b0000,0x33000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,
+ 0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3e000000,0x3d000000,0x3b000000,
+ 0x39000000,0x3a000000,0x6f7e6666,0xf9d2a4a4,0xffb66767,0xff880606,0xff850000,0xff6f0000,0xff210000,0xda1d0000,0x59030000,0x37000000,0xc000000,0x18000000,
+ 0xff474747,0xff474747,0xff474747,0xff474747,0xff474747,0xff464646,0xff464646,0xff464646,0xff454545,0xff454545,0xff444444,0xff444444,0xff434343,0xff424242,
+ 0xff414141,0xff404040,0xff3e3e3e,0xff3c3c3c,0xff363636,0x86695555,0xf9d2a4a4,0xffb66767,0xff880606,0xff850000,0xff6f0000,0xff210000,0xdf1c0000,0x6f030000,
+ 0x4f000000,0x34000000,0x12000000,0x25000000,0xff474747,0xffdadada,0xffdadada,0xffd9d9d9,0xffd8d8d8,0xffd8d8d8,0xffd6d6d6,0xffd5d5d5,0xffd3d3d3,0xffd2d2d2,
+ 0xffd0d0d0,0xffcecece,0xffcccccc,0xffc9c9c9,0xffc5c5c5,0xffc0c0c0,0xffb8b8b8,0xffa7a7a7,0xff5b5050,0xfbd0a3a3,0xffb66767,0xff880606,0xff850000,0xff6f0000,
+ 0xff210000,0xe11c0000,0x7c020000,0x5e000000,0x43000000,0x2b000000,0x17000000,0x2e000000,0xff474747,0xffdadada,0xffd9d9d9,0xffd8d8d8,0xffd8d8d8,0xffd6d6d6,
+ 0xffd4d4d4,0xffd3d3d3,0xffd1d1d1,0xffcfcfcf,0xffcdcdcd,0xffcbcbcb,0xffc9c9c9,0xffc6c6c6,0xffc0c0c0,0xffb8b8b8,0xffa8a8a8,0xffa59a9a,0xffcea2a2,0xffb66767,
+ 0xff880606,0xff850000,0xff6f0000,0xff210000,0xe11c0000,0x80020000,0x64000000,0x4b000000,0x33000000,0x1f000000,0x1b000000,0x36000000,0xff474747,0xffd9d9d9,
+ 0xffd8d8d8,0xffd8d8d8,0xffd6d6d6,0xffd4d4d4,0xffd2d2d2,0xffd0d0d0,0xffcccccc,0xffc8c8c8,0xffc8c8c8,0xffc6c6c6,0xffc4c4c4,0xffc1c1c1,0xffb9b9b9,0xffa9a9a9,
+ 0xffa59b9b,0xffd1a5a5,0xffb66767,0xff880606,0xff850000,0xff6f0000,0xff210000,0xe21c0000,0x81020000,0x65000000,0x4d000000,0x35000000,0x22000000,0x13000000,
+ 0x1d000000,0x3b000000,0xff474747,0xffd8d8d8,0xffd8d8d8,0xffd6d6d6,0xffd4d4d4,0xffd1d1d1,0xffcccccc,0xffc6c6c6,0xffc2c0c0,0xffbfbfbf,0xffbdbdbd,0xffbcbcbc,
+ 0xffbababa,0xffb5b5b5,0xffa9a9a9,0xffa79c9c,0xffd1a5a5,0xffb66767,0xff880606,0xff850000,0xff6f0000,0xff210000,0xe51b0000,0x85020000,0x65000000,0x4d000000,
+ 0x36000000,0x22000000,0x13000000,0xa000000,0x1f000000,0x3d000000,0xff464646,0xffd8d8d8,0xffd6d6d6,0xffd4d4d4,0xffd1d1d1,0xffcbcbcb,0xffc1c1c1,0xffbcb7b7,
+ 0xffb87b7b,0xffa89b9b,0xffadadad,0xffadadad,0xffacacac,0xffa3a3a3,0xffa59b9b,0xffd1a5a5,0xffb66767,0xff880606,0xff850000,0xff6f0000,0xff210000,0xe91b0000,
+ 0x90020000,0x6b000000,0x4d000000,0x36000000,0x22000000,0x13000000,0xa000000,0x4000000,0x1f000000,0x3d000000,0xff464646,0xffd6d6d6,0xffd4d4d4,0xffd2d2d2,
+ 0xffcccccc,0xffc1c1c1,0xffbab5b5,0xffd2acac,0xffb36161,0xff761111,0xff928686,0xff979797,0xff979797,0xff9f9595,0xffd1a5a5,0xffb66767,0xff880606,0xff850000,
+ 0xff6f0000,0xff210000,0xed1a0000,0x9f020000,0x78000000,0x54000000,0x36000000,0x22000000,0x13000000,0xa000000,0x4000000,0x1000000,0x1f000000,0x3d000000,
+ 0xff464646,0xffd5d5d5,0xffd3d3d3,0xffd0d0d0,0xffc6c6c6,0xffbcb7b7,0xffd2acac,0xffc07b7b,0xff8d1010,0xff7b0000,0xff6f0e0e,0xff827777,0xff918585,0xffd1a4a4,
+ 0xffb66767,0xff880606,0xff850000,0xff6f0000,0xff210000,0xf31a0000,0xb3020000,0x8a000000,0x63000000,0x3e000000,0x22000000,0x13000000,0xa000000,0x4000000,
+ 0x1000000,0xffffff,0x1f000000,0x3d000000,0xff454545,0xffd3d3d3,0xffd1d1d1,0xffcccccc,0xffc2c0c0,0xffb87b7b,0xffb36161,0xff8d1010,0xff850000,0xff840000,
+ 0xff7d0000,0xff953030,0xffc68d8d,0xffb66767,0xff880606,0xff850000,0xff6f0000,0xff210000,0xff1d0505,0xcd010000,0xa3000000,0x78000000,0x4e000000,0x2b000000,
+ 0x13000000,0xa000000,0x4000000,0x1000000,0xffffff,0xffffff,0x1f000000,0x3d000000,0xff454545,0xffd2d2d2,0xffcfcfcf,0xffc8c8c8,0xffbfbfbf,0xffa89b9b,
+ 0xff761111,0xff7b0000,0xff840000,0xff850000,0xff840000,0xff880707,0xff8c0f0f,0xff880606,0xff850000,0xff6f0000,0xff210000,0xff270f0f,0xff141313,0xc2000000,
+ 0x94000000,0x66000000,0x3d000000,0x1c000000,0xa000000,0x4000000,0x1000000,0xffffff,0xffffff,0xffffff,0x1f000000,0x3d000000,0xff444444,0xffd0d0d0,
+ 0xffcdcdcd,0xffc8c8c8,0xffbebebe,0xffafafaf,0xff968a8a,0xff6e0e0e,0xff7b0000,0xff840000,0xff850000,0xff850000,0xff850000,0xff850000,0xff720000,0xff220000,
+ 0xff270f0f,0xff3d3c3c,0xff171717,0xb8000000,0x86000000,0x57000000,0x30000000,0x14000000,0x4000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0x1f000000,0x3d000000,0xff444444,0xffcecece,0xffcbcbcb,0xffc7c7c7,0xffbebebe,0xffb1b1b1,0xffa0a0a0,0xff877b7b,0xff6c0c0c,0xff7b0000,0xff840000,0xff850000,
+ 0xff850000,0xff840000,0xff410000,0xff260d0d,0xff3d3c3c,0xff464646,0xff1a1a1a,0xaf000000,0x7a000000,0x4b000000,0x28000000,0xe000000,0x1000000,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0x1f000000,0x3d000000,0xff434343,0xffcccccc,0xffc9c9c9,0xffc6c6c6,0xffbfbfbf,0xffb5b5b5,0xffa6a6a6,0xff909090,
+ 0xff776c6c,0xff6a0b0b,0xff7b0000,0xff840000,0xff830000,0xff490000,0xff210000,0xff352b2b,0xff464646,0xff4d4d4d,0xff1b1b1b,0xa7000000,0x71000000,0x45000000,
+ 0x23000000,0xb000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1f000000,0x3d000000,0xff424242,0xffcacaca,0xffc8c8c8,0xffc5c5c5,
+ 0xffc0c0c0,0xffb5b5b5,0xffa7a7a7,0xff969696,0xff828282,0xff6d6161,0xff690a0a,0xff780000,0xff460000,0xff220202,0xff362c2c,0xff454545,0xff4e4e4e,0xff555555,
+ 0xff1e1e1e,0xa1000000,0x6c000000,0x40000000,0x20000000,0xa000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1f000000,0x3d000000,
+ 0xff414141,0xffc7c7c7,0xffc5c5c5,0xffc2c2c2,0xffbcbcbc,0xffb0b0b0,0xffa6a6a6,0xff999999,0xff898989,0xff767676,0xff665a5a,0xff460909,0xff230303,0xff3d3434,
+ 0xff4a4a4a,0xff4f4f4f,0xff545454,0xff5a5a5a,0xff1f1f1f,0x9d000000,0x68000000,0x3e000000,0x1f000000,0xa000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0x1f000000,0x3d000000,0xff414141,0xffc5c5c5,0xffc2c2c2,0xffbbbbbb,0xffb3b3b3,0xffaaaaaa,0xffa1a1a1,0xff969696,0xff8a8a8a,0xff7b7b7b,
+ 0xff6d6d6d,0xff605656,0xff494040,0xff545454,0xff545454,0xff575757,0xff5a5a5a,0xff5d5d5d,0xff1f1f1f,0x9b000000,0x67000000,0x3d000000,0x1f000000,0xa000000,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1d000000,0x3b000000,0xff404040,0xffc2c2c2,0xffbababa,0xffb1b1b1,0xffaaaaaa,0xffa1a1a1,
+ 0xff9a9a9a,0xff919191,0xff888888,0xff7d7d7d,0xff727272,0xff686868,0xff616161,0xff5d5d5d,0xff5b5b5b,0xff5d5d5d,0xff5f5f5f,0xff5f5f5f,0xff202020,0x94000000,
+ 0x63000000,0x3b000000,0x1d000000,0xa000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1b000000,0x36000000,0xff3f3f3f,0xffb9b9b9,
+ 0xffb0b0b0,0xffa8a8a8,0xffa0a0a0,0xff999999,0xff919191,0xff8a8a8a,0xff838383,0xff7b7b7b,0xff727272,0xff6b6b6b,0xff656565,0xff626262,0xff616161,0xff5f5f5f,
+ 0xff5f5f5f,0xff606060,0xff202020,0x87000000,0x5a000000,0x36000000,0x1b000000,0x9000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0x17000000,0x2e000000,0xff3c3c3c,0xff3a3a3a,0xff373737,0xff343434,0xff313131,0xff2f2f2f,0xff2d2d2d,0xff2b2b2b,0xff292929,0xff262626,0xff252525,0xff242424,
+ 0xff212121,0xff212121,0xff212121,0xff202020,0xff202020,0xff202020,0xff212121,0x74000000,0x4e000000,0x2e000000,0x17000000,0x8000000,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x9a000000,0x9a000000,0x9b000000,0x9b000000,0x9a000000,0x9a000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,
+ 0x12000000,0x6000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
+ 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x67000000,0x67000000,0x67000000,0x66000000,0x62000000,0x5a000000,
+ 0x4d000000,0x3d000000,0x29000000,0x18000000,0xc000000,0x4000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x7000000,0xf000000,
+ 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0x7000000,0x2000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff
+};
+
+static const QRgb Tux_data[] = {
+ 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
+ 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
+ 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff090684,0xff090682,0xff090680,0xff090680,
+ 0xff090681,0xff090681,0xff090682,0xff090683,0xff060456,0xff060454,0xff060454,0xff060454,0xff060454,0xff060454,0xff060454,0xff060454,0xff060454,0xff060454,
+ 0xff060454,0xff060454,0xff060454,0xff060457,0xff070465,0xff070467,0xff060456,0xff06034d,0xff04033a,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
+ 0xff090682,0xffe4f8f0,0xffd2f3e7,0xffccf1e2,0xffcdf1e2,0xffd2f3e4,0xffd9f4e7,0xffafafae,0xff9b9b9b,0xff9c9c9c,0xff9c9c9c,0xff9c9c9c,0xff9c9c9c,0xff9c9c9c,
+ 0xff9c9c9c,0xff9c9c9c,0xff9c9c9c,0xff9c9c9c,0xff9c9c9c,0xff9c9c9c,0xff9c9c9c,0xff9d9d9d,0xffb1b1b1,0xffb4b4b5,0xffa1a1a1,0xff8f8f8f,0xff04033a,0x5c000000,
+ 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff08067f,0xffcff2e5,0xff97e3c7,0xff7ddcb8,0xff7fdcb7,0xff8ee0bc,0xffa1e5c3,0xff565656,0xff4f4f4f,0xff4f4f4f,
+ 0xff4f4f4f,0xff4f4f4f,0xff4f4f4f,0xff4f4f4f,0xff4f4f4f,0xff4f4f4f,0xff4f4f4f,0xff4f4f4f,0xff4f4f4f,0xff4f4f4f,0xff4f4f4f,0xff505050,0xff595858,0xff525253,
+ 0xff4e4e4e,0xff494949,0xff02011d,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff08067e,0xffc4efdf,0xff76d9b5,0xff50cfa0,0xff53d09f,0xff69d6a7,
+ 0xff605f5c,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,
+ 0xff161616,0xff161616,0xff161616,0xff161616,0xff151515,0xff131313,0xff010008,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff08067e,0xffc0eede,
+ 0xff6ad6af,0xff43cc99,0xff46cd98,0xff5fd3a0,0xff3a3937,0xff030303,0xff040404,0xff040404,0xff040404,0xff040404,0xff040404,0xff040404,0xff040404,0xff040404,
+ 0xff040404,0xff040404,0xff040404,0xff040404,0xff040404,0xff040404,0xff030303,0xff040404,0xff030303,0xff030303,0xff000001,0x93000000,0x62000000,0x3b000000,
+ 0x1f000000,0x3d000000,0xff08067e,0xffbfeedd,0xff69d6ae,0xff41cb98,0xff46cc97,0xff61d4a1,0xff2a2928,0xff000000,0xff020202,0xff020202,0xff020202,0xff020202,
+ 0xff010101,0xff000201,0xff020202,0xff020202,0xff020202,0xff020202,0xff020202,0xff020202,0xff010101,0xff050505,0xff0f0e0e,0xff060606,0xff010101,0xff010101,
+ 0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08067e,0xffbfeedd,0xff69d6ae,0xff41cb98,0xff47cc97,0xff63d4a1,0xff242523,0xff000000,
+ 0xff020202,0xff010101,0xff020202,0xff131111,0xff171515,0xff020202,0xff000201,0xff020202,0xff020202,0xff020202,0xff010101,0xff030303,0xff060606,0xff060606,
+ 0xff161615,0xff383535,0xff050505,0xff010101,0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08067e,0xffbfeedd,0xff69d6ae,0xff42cb98,
+ 0xff48cd98,0xff64d5a1,0xff20201f,0xff000000,0xff010101,0xff090909,0xff1b1918,0xff0e0e0d,0xff141414,0xff100f0f,0xff020202,0xff020202,0xff020202,0xff010101,
+ 0xff252220,0xff716d6c,0xff73706f,0xff565352,0xff1b1b1b,0xff090908,0xff0c0c0c,0xff010101,0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff08067e,0xffbfeedd,0xff69d6ae,0xff42cb98,0xff48cd98,0xff64d5a2,0xff20201f,0xff000000,0xff090909,0xff7f7c7b,0xff888888,0xff797979,0xff2f2d2b,0xff020202,
+ 0xff020202,0xff020202,0xff010101,0xff181717,0xffb2b2b2,0xffa9a9a9,0xffa4a4a4,0xff9a9a9a,0xff9e9e9e,0xff383534,0xff010101,0xff010101,0xff000001,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08067e,0xffbfeedd,0xff69d6ae,0xff42cb98,0xff48cd98,0xff64d5a2,0xff252423,0xff000000,0xff2e2c2a,0xffdddddd,
+ 0xffefefef,0xfff3f3f3,0xffe1e1e1,0xff1e1c1b,0xff000101,0xff020202,0xff010101,0xff6f6866,0xfff3f3f3,0xffeaeaea,0xff7d7d7d,0xff8a8a8a,0xffdcdcdc,0xffbcbcbe,
+ 0xff0d0c0c,0xff000000,0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08067e,0xffbfeedd,0xff69d6ae,0xff42cb98,0xff48cd98,0xff64d5a2,
+ 0xff252624,0xff000000,0xff5f5856,0xfff3f3f3,0xff868686,0xff8b8b8b,0xfffefefe,0xff6a6663,0xff010101,0xff010101,0xff030303,0xffb9b3b0,0xffffffff,0xff595959,
+ 0xff000000,0xff050505,0xff949494,0xffebebee,0xff2f2c2d,0xff000000,0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08067e,0xffbfeedd,
+ 0xff69d6ae,0xff42cb98,0xff48cd98,0xff64d5a2,0xff282826,0xff000000,0xff837c78,0xff6d6d6d,0xff050505,0xff202020,0xff868686,0xff908c88,0xff020202,0xff060606,
+ 0xff0b0a09,0xffbfbab8,0xffd4d4d4,0xff070707,0xff030303,0xff282828,0xff3f3f3f,0xffebebee,0xff504c4e,0xff000000,0xff000001,0x99000000,0x66000000,0x3d000000,
+ 0x1f000000,0x3d000000,0xff08067e,0xffbfeedd,0xff69d6ae,0xff42cb98,0xff48cd98,0xff64d5a2,0xff2b2c2a,0xff000000,0xff837c7a,0xff484848,0xff020202,0xff1b1b1b,
+ 0xff525252,0xff757072,0xff020202,0xff050505,0xff070707,0xff837d7f,0xffc7c7c7,0xff090909,0xff080808,0xff0b0b0b,0xff1c1c1c,0xffeaeaed,0xff575255,0xff000000,
+ 0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08067e,0xffbfeedd,0xff69d6ae,0xff42cb98,0xff48cd98,0xff64d5a2,0xff31302f,0xff000000,
+ 0xff6d6765,0xff636363,0xff020202,0xff000000,0xff524f47,0xff9f8948,0xff7e6717,0xff8b741b,0xff5f4f20,0xff968343,0xffddd3a1,0xff101010,0xff050505,0xff020202,
+ 0xff383838,0xffebebee,0xff443f42,0xff000000,0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08067e,0xffbfeedd,0xff69d6ae,0xff42cb98,
+ 0xff48cd98,0xff64d5a2,0xff363634,0xff000000,0xff44403e,0xffa1a1a1,0xff020202,0xff39362b,0xffb89421,0xffc7a21f,0xfff2c711,0xfff0c915,0xffd1b333,0xffc2a228,
+ 0xffe8bf12,0xff97833d,0xff353229,0xff0e0e0e,0xffa8a8a8,0xffebebee,0xff1d1b1c,0xff000000,0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff08067e,0xffbfeedd,0xff69d6ae,0xff42cb98,0xff48cd98,0xff64d5a2,0xff3a3937,0xff000000,0xff0b0b0b,0xffc6c7cd,0xffa28f5a,0xffd3a200,0xffe4b200,0xffe7bb10,
+ 0xffe9c51f,0xffeac827,0xffedcc2c,0xffefcd2e,0xffedcc2c,0xffe9bf0c,0xffe2b70b,0xffcda833,0xffeccd91,0xff938577,0xff030304,0xff000000,0xff000001,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08067e,0xffbfeedd,0xff69d6ae,0xff42cb98,0xff48cd98,0xff64d5a1,0xff42413e,0xff000101,0xff000000,0xff564a2d,
+ 0xffd6a200,0xffdca900,0xffe4b600,0xffe6be14,0xffe9c521,0xffedcc2d,0xffeed436,0xfff2d949,0xfff5e164,0xfff3dc51,0xffeecc27,0xffe6b700,0xffd5a200,0xff9d6d05,
+ 0xff241c0f,0xff000000,0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08067e,0xffbfeedd,0xff69d6ae,0xff42cb98,0xff47cc98,0xff64d5a1,
+ 0xff474642,0xff000000,0xff14110d,0xffa07300,0xffcd9800,0xffddaa00,0xffe6b300,0xffe7bb10,0xffe9c51f,0xffecca28,0xffedce2e,0xfff4db58,0xfffae97f,0xfff0d547,
+ 0xffeec310,0xffae8a0e,0xff564214,0xffa37605,0xff3c2f11,0xff000000,0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08067e,0xffbfeedd,
+ 0xff69d6ae,0xff41cb98,0xff47cc97,0xff62d4a1,0xff4b4a47,0xff000000,0xff3c2e17,0xffbe8600,0xffc79400,0xffd9a700,0xffe3b200,0xffe6b90d,0xffe9c018,0xffe9c51f,
+ 0xffefd135,0xfff5e462,0xfff3d644,0xffeec30c,0xffb08c14,0xff624e17,0xffa2780b,0xffb68400,0xff2e2411,0xff000000,0xff000001,0x99000000,0x66000000,0x3d000000,
+ 0x1f000000,0x3d000000,0xff08067e,0xffbfeedd,0xff69d6ae,0xff41cb98,0xff46cc97,0xff62d4a1,0xff504f4c,0xff010101,0xff2d2414,0xff815c0e,0xffb68700,0xffd5a100,
+ 0xffe2b100,0xffe7b700,0xffe9bc0f,0xffecc214,0xfff8d625,0xfff2cf26,0xffb6941c,0xff6e561b,0xff785d18,0xffd3a100,0xffcb9700,0xffaf7b00,0xff1f1a0e,0xff000000,
+ 0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08067e,0xffbfeedd,0xff69d6ae,0xff41cb98,0xff46cc98,0xff61d4a1,0xff595854,0xff020202,
+ 0xff070706,0xff523f20,0xff755414,0xff7f6213,0xffac8408,0xffbf9500,0xffc09809,0xffba9413,0xff886d1b,0xff5c4b1a,0xff5f4918,0xff9d7610,0xffe2ae00,0xffce9d00,
+ 0xffc6992b,0xffbfa262,0xff242120,0xff000000,0xff000001,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08067e,0xffc0eedd,0xff6ad7ae,0xff44cc99,
+ 0xff48cd98,0xff64d5a1,0xff82ddad,0xff030303,0xff020202,0xff96928d,0xffbe9643,0xff926407,0xff795d15,0xff7b6820,0xff7c661f,0xff7e681f,0xff957819,0xffbc920e,
+ 0xffe3af00,0xffe0ac00,0xffcf9d00,0xffd0b262,0xffcecbc3,0xffc3c3c6,0xff716f77,0xff020203,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xff08067e,0xffc0eddd,0xff6cd5af,0xff49cb99,0xff4ecd9a,0xff69d4a3,0xff494845,0xff010101,0xff090908,0xffcbcbce,0xffdad2c5,0xffba8d2a,0xffb77f00,0xffd8a90b,
+ 0xffecc110,0xffeaba00,0xffdcad00,0xffd3a100,0xffcc9800,0xffcb9b15,0xffd4bf87,0xffd2d2d2,0xffd3d3d3,0xffc9c9cc,0xff9696a0,0xff08080a,0xff000000,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff08067c,0xffbee8da,0xff6dcdaa,0xff4bc094,0xff53c293,0xff6cc89d,0xff0f0f0f,0xff000000,0xff060606,0xffbab6b8,
+ 0xffd0d0d3,0xffcbc3ba,0xffaf8735,0xffa07100,0xffaa7a00,0xffad7e00,0xffb08000,0xffb88d22,0xffcaaf71,0xffcfc8be,0xffcbcbcd,0xffcdcdcf,0xffdedee1,0xffd8d8de,
+ 0xffa0a0ac,0xff1d1c21,0xff000000,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xff080577,0xffb7d6cd,0xff69af98,0xff45987c,0xff489579,0xff1a1a1b,
+ 0xff000000,0xff010101,0xff080707,0xffa0a0a9,0xffababb5,0xff9e9ea7,0xffa0a0a9,0xff95866e,0xff907b52,0xff927d55,0xff9a8c75,0xff9e9da2,0xff9e9ea7,0xff9e9ea7,
+ 0xffa2a2ac,0xffacacb7,0xffafafba,0xffa3a3b0,0xff7c7c8f,0xff3e3d4f,0xff000002,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xff070568,0xff98b4ae,
+ 0xff59736d,0xff314e48,0xff202025,0xff010101,0xff000000,0xff000000,0xff232227,0xff65657a,0xff65657a,0xff616174,0xff5f5f72,0xff5e5e71,0xff5e5e71,0xff5e5e71,
+ 0xff5e5e71,0xff5f5f72,0xff5f5f72,0xff616174,0xff646478,0xff656579,0xff646479,0xff5e5e74,0xff4d4d65,0xff40405a,0xff01000c,0x87000000,0x5a000000,0x36000000,
+ 0x17000000,0x2e000000,0xff050451,0xff050343,0xff030226,0xff020117,0xff000005,0xff000000,0xff000000,0xff000002,0xff030238,0xff040242,0xff040241,0xff040241,
+ 0xff040240,0xff040240,0xff040240,0xff040240,0xff040240,0xff040240,0xff040241,0xff040241,0xff040241,0xff040241,0xff040241,0xff040241,0xff040240,0xff040242,
+ 0xff03022c,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
+ 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,
+ 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
+ 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
+ 0x18000000,0xf000000
+};
+
+static const QRgb UtilsIcon_data[] = {
+ 0x0,0x1000000,0x5000000,0x171b2b1d,0x4b416845,0x85487a4f,0xa2457d4d,0x9d397341,0x7b2a5f31,0x4419381d,0x1e111311,0xb131313,0x2040404,0x0,
+ 0x1000000,0x8000000,0x35416346,0xaf53805c,0xf6446c4f,0xff345640,0xff274433,0xff203d2a,0xff1e4028,0xe81f4e27,0x911a5121,0x36142015,0x10101010,0x30e0e0e,
+ 0x5000000,0x35416446,0xce527d5c,0xfe41634d,0xff40644b,0xff3c6348,0xff335a3e,0xff3e5d46,0xff284330,0xff192e1f,0xfa17331c,0xaa194a1f,0x39161c17,0xe181818,
+ 0x171b2b1d,0xaf56845d,0xfe446950,0xff4c7657,0xff51805b,0xff4b7d55,0xff3b6b44,0xffe4eae6,0xff819485,0xff1e3a24,0xff1f2f24,0xf81b3420,0x8c1b3d1e,0x29151515,
+ 0x4b426a46,0xf64b7856,0xff497454,0xff588b61,0xff5d9866,0xff53935c,0xff3a7843,0xff4c7853,0xff244d2b,0xff1f3f25,0xff27392c,0xff222b25,0xd71d4222,0x50161c17,
+ 0x854a7e51,0xff406a4b,0xff4a7a54,0xff589461,0xff5ca464,0xff4d9a55,0xff4a8a52,0xff678f6d,0xff19461e,0xff1d3e23,0xff2a3d2f,0xff2a312d,0xf5213c25,0x7419251a,
+ 0xa2488250,0xff355f40,0xff43774d,0xff4c8d55,0xff4a9953,0xff569e5e,0xff9fbfa2,0xffdee4df,0xff173d1c,0xff1b3820,0xff2d3d31,0xff313633,0xfe253928,0x891c291d,
+ 0x9d3c7843,0xff2d5837,0xff36693f,0xff397a42,0xff307d3a,0xff1e6d27,0xff9ebaa2,0xff95a497,0xff0e2c12,0xff1e3522,0xff323d34,0xff343836,0xfc263a29,0x8b1b261c,
+ 0x7b2c6232,0xff275831,0xff295932,0xff2b6633,0xff21652a,0xff225c29,0xffe0e7e1,0xff4b5f4e,0xff1c311f,0xff29382c,0xff39403b,0xff353736,0xf1253a28,0x7c191f1a,
+ 0x441a391d,0xe8235d2c,0xff1f4827,0xff25552c,0xff25552b,0xff57775c,0xfff7f8f7,0xff6a766c,0xff2b392e,0xff363f38,0xff3c403e,0xff2f3431,0xd2213624,0x5d151615,
+ 0x1e101210,0x911b5422,0xfa194420,0xff224228,0xff2a482f,0xff334b37,0xff415044,0xff2c392f,0xff343c36,0xff3b403d,0xff343636,0xf0263729,0x911b231c,0x37101010,
+ 0xb131313,0x36142015,0xaa194d20,0xf81d4022,0xff243728,0xff2b392e,0xff2e3931,0xff323834,0xff343735,0xff2f3531,0xf0263729,0xa51d291e,0x4f141414,0x170c0c0c,
+ 0x2040404,0x10111111,0x39171c17,0x8c1b3e1f,0xd71e4623,0xf5224026,0xfe253d29,0xfc273b29,0xf1253a28,0xd2213624,0x911b231c,0x4f141414,0x1d0b0b0b,0x6010101,
+ 0x0,0x3101010,0xe181818,0x29151515,0x50161c17,0x7419251a,0x891c291d,0x8b1b261c,0x7c191f1a,0x5d151615,0x37101010,0x170c0c0c,0x6010101,0x1000000
+};
+
+static const QRgb WordGame_data[] = {
+ 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,
+ 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000,
+ 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xffffffdd,0xfff8edc5,0xffe9d9aa,0xffe9d9aa,
+ 0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,
+ 0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffe9d9aa,0xffd2bd87,0xff8d7132,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000,
+ 0xfff8edc5,0xffe4d2a3,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,
+ 0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffcab37a,0xffa38441,0xff312600,0x5c000000,
+ 0x3d000000,0x25000000,0x17000000,0x2e000000,0xffe9d9aa,0xffcab37a,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,
+ 0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,
+ 0xffac8b46,0xff755d22,0xff000000,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xffe9d9aa,0xffcab37a,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,
+ 0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,
+ 0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xff755d22,0xff000000,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xffe7d7a8,0xffc7b079,
+ 0xffa88744,0xffa58543,0xffa08141,0xff997b3d,0xff92763b,0xff8d7139,0xff7d6432,0xff544120,0xff3d2e16,0xff382914,0xff3b2b15,0xff594522,0xff796030,0xffac8b46,
+ 0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xff755d22,0xff000000,0x93000000,0x62000000,0x3b000000,
+ 0x1f000000,0x3d000000,0xffe5d5a7,0xffc1aa74,0xff9d7f40,0xff96783c,0xff8a6f38,0xff7a6030,0xff6b552a,0xff392b15,0xff0a0502,0xff0b0502,0xff0d0602,0xff0f0703,
+ 0xff110803,0xff120903,0xff120903,0xff2f200f,0xff896a34,0xffa37e3d,0xffa17b3b,0xffa07a3a,0xffa07a3a,0xffa17b3b,0xffa27d3c,0xffa4803e,0xffa78441,0xff735a21,
+ 0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xffe9d9aa,0xffcab37a,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xff503d1e,0xff120903,
+ 0xff120903,0xff120903,0xff1c1207,0xff3c2c15,0xff302210,0xff120903,0xff120903,0xff120803,0xff1b1007,0xff886832,0xffa17b3b,0xffa07a3a,0xffa07a3a,0xffa17b3a,
+ 0xffa27d3c,0xffa4803e,0xffa78441,0xff735a21,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xffe9d9aa,0xffcab37a,0xffac8b46,0xffac8b46,
+ 0xffac8b46,0xff836834,0xff120903,0xff120903,0xff1c1207,0xff6f582b,0xffac8b46,0xffac8b46,0xffac8b46,0xff997b3e,0xff453419,0xff120903,0xff120903,0xff3c2c15,
+ 0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xff755d22,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xffd4b784,0xffba9a62,0xffa27c3b,0xffa68340,0xffaa8944,0xff453419,0xff120903,0xff120903,0xff836834,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,
+ 0xffac8b46,0xff3c2c15,0xff120903,0xff120903,0xff8f7339,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xff755d22,0xff000000,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xffa38b63,0xff967b4e,0xff8f6d34,0xff9f7c3d,0xffaa8944,0xff120903,0xff120903,0xff302210,0xffac8b46,0xffac8b46,
+ 0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xff796030,0xff120903,0xff120903,0xff5f4b25,0xff997b3e,0xff91743b,0xff8d7139,0xff8d7139,0xff91743b,
+ 0xff97793d,0xff6c561f,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff887b5f,0xff84724d,0xff876c36,0xff9d7e40,0xff836834,0xff120903,
+ 0xff120903,0xff594522,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffa28342,0xff120903,0xff120803,0xff332512,0xff7e6432,
+ 0xff6a542a,0xff604b25,0xff604b25,0xff685228,0xff765d2e,0xff5b481b,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xffe9d9aa,0xffcab37a,
+ 0xffac8b46,0xffac8b46,0xff836834,0xff120903,0xff120903,0xff644d26,0xffa88542,0xffa78341,0xffa68340,0xffa68240,0xffa68340,0xffa78341,0xffa88542,0xffa98643,
+ 0xff120903,0xff120903,0xff3c2c15,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xff755d22,0xff000000,0x99000000,0x66000000,0x3d000000,
+ 0x1f000000,0x3d000000,0xffe9d9aa,0xffcab37a,0xffac8b46,0xffac8b46,0xff836834,0xff120903,0xff120803,0xff604822,0xff9f7939,0xff9c7536,0xff9b7234,0xff9a7134,
+ 0xff9a7234,0xff9d7536,0xff9f7939,0xffa37e3d,0xff120803,0xff120903,0xff3c2c15,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xff755d22,
+ 0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xffe9d9aa,0xffcab37a,0xffac8b46,0xffac8b46,0xff997b3e,0xff120903,0xff120903,0xff453419,
+ 0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xff836834,0xff120903,0xff120903,0xff503d1e,0xffac8b46,0xffac8b46,0xffac8b46,
+ 0xffac8b46,0xffac8b46,0xffac8b46,0xff755d22,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xffdfd0a3,0xffb19c6a,0xff876c36,0xff7a6030,
+ 0xff6f582c,0xff170f07,0xff0b0502,0xff110a05,0xff685229,0xff796030,0xff886d36,0xff624c26,0xff3a2a14,0xff836834,0xffac8b46,0xff453419,0xff120903,0xff120903,
+ 0xff6f582b,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xff755d22,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xffe6d6a7,0xffc1ab74,0xff9f8040,0xff9a7c3f,0xff96783c,0xff574422,0xff0f0703,0xff100703,0xff46351a,0xff9a7c3f,0xffa08140,0xff2d200f,0xff120903,0xff120903,
+ 0xff453419,0xff120903,0xff120903,0xff120903,0xffa28342,0xffac8b46,0xffac8b46,0xffac8b46,0xffa68743,0xffa28342,0xff9c7e3f,0xff634e1c,0xff000000,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xffe8d7a7,0xffcab37a,0xffac8b46,0xffac8b46,0xffac8b46,0xffa28342,0xff1c1207,0xff120903,0xff120903,0xff302210,
+ 0xff6f582b,0xff836834,0xff3c2c15,0xff120903,0xff120803,0xff110803,0xff110703,0xff5a401d,0xff997033,0xff9d7536,0xffa27d3c,0xffa88642,0xffaa8945,0xffa98844,
+ 0xffa68743,0xff6f5820,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xffe8d8a9,0xffcab37a,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,
+ 0xff8f7339,0xff1c1207,0xff120903,0xff120903,0xff120903,0xff120903,0xff120903,0xff110803,0xff100703,0xff0d0602,0xff0c0502,0xff443218,0xff6c5227,0xff765a2b,
+ 0xff866833,0xff93763a,0xff9f8040,0xffa58443,0xffa78744,0xff745c22,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xffe9d9aa,0xffcab37a,
+ 0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffa28342,0xff503d1e,0xff1c1207,0xff120903,0xff120903,0xff120903,0xff110803,0xff2a1d0e,0xff160d05,
+ 0xff0c0602,0xff0c0602,0xff20160a,0xff755c2e,0xff8a6e37,0xff95783c,0xff9f8040,0xffa58443,0xffa78744,0xff745c22,0xff000000,0x99000000,0x66000000,0x3d000000,
+ 0x1f000000,0x3d000000,0xffe9d9aa,0xffcab37a,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xff8f7339,0xff836834,
+ 0xff836834,0xffa28342,0xffac8b46,0xffa28342,0xff453419,0xff120903,0xff3c2c15,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xff755d22,
+ 0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xffb7a883,0xffa99465,0xff9b7c3f,0xffa58543,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,
+ 0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xff836834,0xff8f7339,0xffac8b46,0xffac8b46,0xffac8b46,
+ 0xffac8b46,0xffac8b46,0xffac8b46,0xff755d22,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xffb7a984,0xffa99565,0xff9b7c3f,0xffa58543,
+ 0xffac8b46,0xffaa8944,0xffa5803e,0xff9f7939,0xff9a7133,0xff976e31,0xff986f32,0xff9b7335,0xff9f7939,0xffa47f3e,0xffa78341,0xffa98643,0xffaa8844,0xffab8a45,
+ 0xff7c6233,0xff1b100c,0xffac8b46,0xff7c6233,0xff1b100c,0xff7c6233,0xffac8b46,0xff755d22,0xff000000,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,
+ 0xffe9d9aa,0xffcab37a,0xffac8b46,0xffac8b46,0xffac8b46,0xffab8a45,0xffa98743,0xffa78441,0xffa5813f,0xffa4803e,0xffa5803e,0xffa68240,0xffa88541,0xffa98743,
+ 0xffaa8944,0xffab8945,0xffab8a45,0xffac8b46,0xffac8b46,0xff1b100c,0xffac8b46,0xff1b100c,0xffac8b46,0xff1b100c,0xffac8b46,0xff755d22,0xff000000,0x99000000,
+ 0x66000000,0x3d000000,0x1f000000,0x3d000000,0xffe9d9aa,0xffcab37a,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,
+ 0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xff7c6233,0xff1b100c,0xff7c6233,0xff7c6233,0xff1b100c,0xff765d30,
+ 0xff9c7e3f,0xff634e1c,0xff000000,0x99000000,0x66000000,0x3d000000,0x1d000000,0x3b000000,0xffe9d9aa,0xffcab37a,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,
+ 0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,0xffac8b46,
+ 0xffac8b46,0xffac8b46,0xffaa8945,0xffa98844,0xffa68743,0xff6f5820,0xff000000,0x93000000,0x62000000,0x3b000000,0x1b000000,0x36000000,0xffd2bd87,0xffa38441,
+ 0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,
+ 0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff755d22,0xff483900,0xff000000,0x87000000,0x5a000000,0x36000000,
+ 0x17000000,0x2e000000,0xff8d7132,0xff312600,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,0x99000000,
+ 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000,
+ 0x62000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,
+ 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000,
+ 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,
+ 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,
+ 0x18000000,0xf000000
+};
+
+static const QRgb accessories_data[] = {
+ 0x0,0x0,0x0,0x0,0xffffff,0xcc9900,0xcc9900,0xcccc33,0xcc9900,0xcc9900,0xcc9900,0xcccc33,0xcc9900,0xffcc66,
+ 0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x9999ff,
+ 0x0,0x0,0xffcc66,0x0,0xff000000,0xffffcc99,0xffffcc99,0xffffcc99,0xffffcc99,0xffffcc99,0xffffcc99,0xffffcc99,0xff000000,0xffcc66,
+ 0x0,0xffff99,0x0,0xff000000,0xffffcc99,0xffffcc99,0xffffcc99,0xffffcc99,0xffffcc99,0xffffcc99,0xffffcc99,0xff000000,0xffcc66,0x0,
+ 0xffcc66,0xffcc99,0xffffcc99,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffff99,0xffcc66,
+ 0xffff66,0xffffcc99,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffffcc99,0xffffcc99,0xff000000,0xffcc66,
+ 0xffffcc99,0xff000000,0xff000000,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xff000000,0xffffcc99,0xffffcc99,0xffffcc99,0xff000000,
+ 0xff000000,0xffcc99,0xff000000,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xff000000,0xff666633,0xffffcc99,0xff000000,0x0,
+ 0xffff66,0xcccc33,0xff000000,0xffffcc66,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xff000000,0xff666633,0xff000000,0xffff99,0x0,
+ 0x0,0xcc9900,0xff000000,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xff000000,0xff666633,0xff000000,0x6666cc,0x0,
+ 0x0,0xcc9933,0xff000000,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xff000000,0xff666633,0xff000000,0x0,0x0,
+ 0x0,0x0,0xff000000,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xffffcc33,0xff000000,0xff000000,0x0,0x0,0x0,
+ 0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,
+ 0x0,0xcc9900,0x0,0x0,0x0,0xcc9933,0xcc9933,0xcc9933,0xcc9933,0xffcc33,0x0,0x0,0x0,0x0
+};
+
+static const QRgb appearance_data[] = {
+ 0x0,0x0,0x0,0x0,0x0,0xff404000,0xff404000,0xff404000,0xff404000,0xff404000,0xff404000,0xff404000,0x0,0x0,
+ 0x0,0x0,0x0,0xc0c0c0,0x0,0xff404000,0xff404000,0xff404000,0xff404000,0xff404000,0xff404000,0xff404000,0xff404000,0xff404000,
+ 0xff404000,0xff404000,0xdcdcdc,0x0,0x0,0x0,0xff404000,0xff404000,0xff404000,0xff404000,0xff404000,0xff404000,0xff404000,0xff404000,
+ 0xff404000,0xff404000,0xff404000,0xff404000,0xff404000,0x0,0x0,0xff404000,0xff404000,0xff404000,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,
+ 0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xff404000,0xff404000,0xff404000,0x0,0xff404000,0xff000000,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,
+ 0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xff000000,0xff404000,0x0,0xff404000,0xff000000,0xffdcdcdc,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xffdcdcdc,0xff000000,0xff000000,0xff000000,0xff000000,0xffdcdcdc,0xff000000,0xff404000,0x0,0x0,
+ 0xff000000,0xff000000,0xff000000,0xff585858,0xff585858,0xff000000,0xff000000,0xff000000,0xff585858,0xff585858,0xff000000,0xff000000,0xff000000,0x0,
+ 0x0,0xffffff,0xff000000,0xffdcdcdc,0xff000000,0xff000000,0xff000000,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xff000000,0xff000000,0xff000000,0xffdcdcdc,
+ 0xff000000,0x0,0x0,0x0,0xff000000,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,
+ 0xffdcdcdc,0xffdcdcdc,0xff000000,0x0,0x0,0xffffff,0xff000000,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xff400000,0xffdcdcdc,0xff400000,
+ 0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xff000000,0x0,0x0,0x0,0xff000000,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,
+ 0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xff000000,0x0,0x0,0x0,0x0,0xff000000,0xffdcdcdc,0xffdcdcdc,
+ 0xff800000,0xff400000,0xff400000,0xff400000,0xff800000,0xffdcdcdc,0xffdcdcdc,0xff000000,0x585858,0x0,0x0,0xdcdcdc,0xdcdcdc,0xdcdcdc,
+ 0xff000000,0xffdcdcdc,0xffdcdcdc,0xff800000,0xff800000,0xff800000,0xffdcdcdc,0xffdcdcdc,0xff000000,0xdcdcdc,0xdcdcdc,0x0,0x0,0xdcdcdc,
+ 0x0,0x0,0xdcdcdc,0xff000000,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xffdcdcdc,0xff000000,0xdcdcdc,0x0,0xdcdcdc,0x0,
+ 0x0,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0xdcdcdc,0xdcdcdc,
+ 0xdcdcdc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0
+};
+
+static const QRgb back_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x7a6c7375,0xff000000,0xff000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xff000000,0x6b000000,0x24000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xfffcfcfc,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xffffffff,0xfff8f8f8,0xff000000,0xff000000,0xff000000,0xff000000,0x24000000,0xc000000,0xffffff,
+ 0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xffffffff,0xffffffff,0xfff5f5f5,0xff000000,0x6b000000,0x24000000,0xffffff,
+ 0xffffff,0xe0494e4f,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff6f6f6,0xfff6f6f6,0xffeeeeee,0xffd3d3d3,0xff000000,0x8f000000,0x30000000,0xffffff,
+ 0xffffff,0x69666c6d,0xfd202323,0xfffcfcfc,0xfffcfcfc,0xfff4f4f4,0xffdddddd,0xffcccccc,0xffc9c9c9,0xffc9c9c9,0xff000000,0x8f000000,0x30000000,0xffffff,
+ 0xffffff,0xd000000,0x83565b5c,0xfd202223,0xfff4f4f4,0xffededed,0xffcccccc,0xff000000,0xff000000,0xff000000,0xff000000,0x8f000000,0x30000000,0xffffff,
+ 0xffffff,0x2000000,0x14000000,0x8852585a,0xfe202324,0xffe8e8e8,0xffcbcbcb,0xff000000,0xb3000000,0x9b000000,0x8f000000,0x6b000000,0x24000000,0xffffff,
+ 0xffffff,0xffffff,0x2000000,0x14000000,0x8852585a,0xfe202324,0xffd3d3d3,0xff000000,0x9b000000,0x54000000,0x30000000,0x24000000,0xc000000,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0x2000000,0x14000000,0x8852585a,0xff000000,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0x2000000,0x14000000,0x45000000,0x7b000000,0x6b000000,0x24000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x2000000,0x10000000,0x26000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,0xffffff
+};
+
+static const QRgb back_inactive_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x3d707070,0x7f000000,0x7f000000,0x12000000,0x6000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0x3d707070,0x7e222222,0x7fffffff,0x7f000000,0x35000000,0x12000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0x3d707070,0x7e222222,0x7fffffff,0x7ffcfcfc,0x7f000000,0x47000000,0x18000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0x3d707070,0x7e222222,0x7fffffff,0x7fffffff,0x7ff8f8f8,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x12000000,0x6000000,0xffffff,
+ 0xffffff,0x3d707070,0x7e222222,0x7fffffff,0x7fffffff,0x7fffffff,0x7ffefefe,0x7fffffff,0x7fffffff,0x7ff5f5f5,0x7f000000,0x35000000,0x12000000,0xffffff,
+ 0xffffff,0x704c4c4c,0x7fffffff,0x7fffffff,0x7fffffff,0x7fffffff,0x7ff6f6f6,0x7ff6f6f6,0x7feeeeee,0x7fd3d3d3,0x7f000000,0x47000000,0x18000000,0xffffff,
+ 0xffffff,0x34696969,0x7e222222,0x7ffcfcfc,0x7ffcfcfc,0x7ff4f4f4,0x7fdddddd,0x7fcccccc,0x7fc9c9c9,0x7fc9c9c9,0x7f000000,0x47000000,0x18000000,0xffffff,
+ 0xffffff,0x6000000,0x41595959,0x7e222222,0x7ff4f4f4,0x7fededed,0x7fcccccc,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x47000000,0x18000000,0xffffff,
+ 0xffffff,0x1000000,0xa000000,0x44565656,0x7f222222,0x7fe8e8e8,0x7fcbcbcb,0x7f000000,0x59000000,0x4d000000,0x47000000,0x35000000,0x12000000,0xffffff,
+ 0xffffff,0xffffff,0x1000000,0xa000000,0x44565656,0x7f222222,0x7fd3d3d3,0x7f000000,0x4d000000,0x2a000000,0x18000000,0x12000000,0x6000000,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0x1000000,0xa000000,0x44565656,0x7f000000,0x7f000000,0x47000000,0x18000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0xa000000,0x22000000,0x3d000000,0x35000000,0x12000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x8000000,0x13000000,0x12000000,0x6000000,0xffffff,0xffffff,0xffffff,0xffffff
+};
+
+static const QRgb background_data[] = {
+ 0x81a1a1a1,0x81a5a5a5,0x81a9a9a9,0x81acacac,0x81adadad,0x81ababab,0x81a4a4a4,0x819d9d9d,0x81989898,0x81989898,0x819f9f9f,0x81a7a7a7,0x81acacac,0x81adadad,
+ 0x81a9a9a9,0x81a4a4a4,0x819d9d9d,0x81989898,0x81969696,0x81999999,0x81a1a1a1,0x81a9a9a9,0x81aeaeae,0x81aeaeae,0x81a9a9a9,0x81a1a1a1,0x81999999,0x81939393,
+ 0x81909090,0x81939393,0x81989898,0x819d9d9d,0x81a4a4a4,0x81a5a5a5,0x81a8a8a8,0x81a8a8a8,0x81a8a8a8,0x81a7a7a7,0x81a0a0a0,0x819b9b9b,0x81959595,0x81989898,
+ 0x819d9d9d,0x81a5a5a5,0x81a9a9a9,0x81a9a9a9,0x81a4a4a4,0x819f9f9f,0x81989898,0x81959595,0x81939393,0x81999999,0x81a1a1a1,0x81a9a9a9,0x81adadad,0x81adadad,
+ 0x81a7a7a7,0x819d9d9d,0x81959595,0x81929292,0x81939393,0x81999999,0x819f9f9f,0x81a3a3a3,0x81a8a8a8,0x81a7a7a7,0x81a5a5a5,0x81a5a5a5,0x81a5a5a5,0x81a3a3a3,
+ 0x819d9d9d,0x81999999,0x81959595,0x81989898,0x819d9d9d,0x81a3a3a3,0x81a7a7a7,0x81a4a4a4,0x819f9f9f,0x819b9b9b,0x81959595,0x81939393,0x81969696,0x819c9c9c,
+ 0x81a1a1a1,0x81a8a8a8,0x81ababab,0x81ababab,0x81a5a5a5,0x819c9c9c,0x81959595,0x81959595,0x819b9b9b,0x81a1a1a1,0x81a7a7a7,0x81a8a8a8,0x81ababab,0x81a8a8a8,
+ 0x81a4a4a4,0x81a4a4a4,0x81a4a4a4,0x81a1a1a1,0x819d9d9d,0x81999999,0x81969696,0x81999999,0x819f9f9f,0x81a3a3a3,0x81a4a4a4,0x81a1a1a1,0x819f9f9f,0x819b9b9b,
+ 0x81999999,0x81999999,0x819b9b9b,0x819f9f9f,0x81a1a1a1,0x81a7a7a7,0x81a9a9a9,0x81a9a9a9,0x81a4a4a4,0x819f9f9f,0x819b9b9b,0x819c9c9c,0x81a3a3a3,0x81a9a9a9,
+ 0x81adadad,0x81adadad,0x81acacac,0x81a8a8a8,0x81a4a4a4,0x81a4a4a4,0x81a4a4a4,0x81a1a1a1,0x819f9f9f,0x819b9b9b,0x81999999,0x819c9c9c,0x81a0a0a0,0x81a3a3a3,
+ 0x81a4a4a4,0x81a3a3a3,0x81a1a1a1,0x81a1a1a1,0x81a0a0a0,0x81a0a0a0,0x81a0a0a0,0x81a1a1a1,0x81a3a3a3,0x81a5a5a5,0x81a8a8a8,0x81a8a8a8,0x81a5a5a5,0x81a1a1a1,
+ 0x81a0a0a0,0x81a3a3a3,0x81a9a9a9,0x81b0b0b0,0x81b1b1b1,0x81b0b0b0,0x81ababab,0x81a7a7a7,0x81a3a3a3,0x81a3a3a3,0x81a3a3a3,0x81a1a1a1,0x81a0a0a0,0x819f9f9f,
+ 0x819f9f9f,0x81a0a0a0,0x81a3a3a3,0x81a7a7a7,0x81a8a8a8,0x81a9a9a9,0x81a9a9a9,0x81a8a8a8,0x81a8a8a8,0x81a7a7a7,0x81a5a5a5,0x81a5a5a5,0x81a4a4a4,0x81a5a5a5,
+ 0x81a5a5a5,0x81a7a7a7,0x81a5a5a5,0x81a4a4a4,0x81a3a3a3,0x81a7a7a7,0x81acacac,0x81b0b0b0,0x81b1b1b1,0x81aeaeae,0x81a5a5a5,0x81a1a1a1,0x819f9f9f,0x819f9f9f,
+ 0x81a0a0a0,0x81a1a1a1,0x81a1a1a1,0x81a1a1a1,0x81a1a1a1,0x81a3a3a3,0x81a7a7a7,0x81a9a9a9,0x81adadad,0x81aeaeae,0x81aeaeae,0x81aeaeae,0x81adadad,0x81acacac,
+ 0x81a9a9a9,0x81a9a9a9,0x81a7a7a7,0x81a5a5a5,0x81a5a5a5,0x81a5a5a5,0x81a5a5a5,0x81a4a4a4,0x81a4a4a4,0x81a5a5a5,0x81a9a9a9,0x81acacac,0x81acacac,0x81a8a8a8,
+ 0x819f9f9f,0x819b9b9b,0x81999999,0x819b9b9b,0x819c9c9c,0x81a0a0a0,0x81a1a1a1,0x81a3a3a3,0x81a3a3a3,0x81a5a5a5,0x81a8a8a8,0x81acacac,0x81b0b0b0,0x81b2b2b2,
+ 0x81b1b1b1,0x81b0b0b0,0x81aeaeae,0x81acacac,0x81a9a9a9,0x81a9a9a9,0x81a7a7a7,0x81a5a5a5,0x81a4a4a4,0x81a4a4a4,0x81a4a4a4,0x81a3a3a3,0x81a1a1a1,0x81a3a3a3,
+ 0x81a4a4a4,0x81a4a4a4,0x81a3a3a3,0x81a0a0a0,0x81989898,0x81969696,0x81959595,0x81969696,0x819b9b9b,0x819f9f9f,0x81a1a1a1,0x81a3a3a3,0x81a4a4a4,0x81a5a5a5,
+ 0x81a9a9a9,0x81adadad,0x81b0b0b0,0x81b0b0b0,0x81b0b0b0,0x81acacac,0x81a9a9a9,0x81a7a7a7,0x81a4a4a4,0x81a4a4a4,0x81a5a5a5,0x81a5a5a5,0x81a4a4a4,0x81a4a4a4,
+ 0x81a3a3a3,0x81a3a3a3,0x81a1a1a1,0x81a0a0a0,0x819f9f9f,0x819d9d9d,0x819c9c9c,0x819b9b9b,0x81969696,0x81959595,0x81969696,0x81999999,0x819c9c9c,0x81a0a0a0,
+ 0x81a3a3a3,0x81a4a4a4,0x81a4a4a4,0x81a5a5a5,0x81a9a9a9,0x81acacac,0x81b0b0b0,0x81b0b0b0,0x81acacac,0x81a7a7a7,0x81a1a1a1,0x819d9d9d,0x819c9c9c,0x81a0a0a0,
+ 0x81a3a3a3,0x81a4a4a4,0x81a4a4a4,0x81a3a3a3,0x81a3a3a3,0x81a3a3a3,0x81a1a1a1,0x81a0a0a0,0x819d9d9d,0x819b9b9b,0x81999999,0x81989898,0x819c9c9c,0x819b9b9b,
+ 0x819c9c9c,0x819d9d9d,0x81a0a0a0,0x81a3a3a3,0x81a5a5a5,0x81a8a8a8,0x81a8a8a8,0x81a8a8a8,0x81ababab,0x81aeaeae,0x81b0b0b0,0x81adadad,0x81a7a7a7,0x819f9f9f,
+ 0x81989898,0x81959595,0x81969696,0x819c9c9c,0x81a1a1a1,0x81a4a4a4,0x81a3a3a3,0x81a1a1a1,0x81a1a1a1,0x81a1a1a1,0x81a1a1a1,0x81a1a1a1,0x81a0a0a0,0x81a0a0a0,
+ 0x819d9d9d,0x819c9c9c,0x81a3a3a3,0x81a3a3a3,0x81a1a1a1,0x81a1a1a1,0x81a3a3a3,0x81a7a7a7,0x81a9a9a9,0x81ababab,0x81ababab,0x81acacac,0x81aeaeae,0x81b0b0b0,
+ 0x81b0b0b0,0x81acacac,0x81a3a3a3,0x81999999,0x81929292,0x81929292,0x81969696,0x819d9d9d,0x81a4a4a4,0x81a7a7a7,0x81a5a5a5,0x81a1a1a1,0x81a1a1a1,0x81a1a1a1,
+ 0x81a3a3a3,0x81a4a4a4,0x81a4a4a4,0x81a4a4a4,0x81a4a4a4,0x81a4a4a4,0x81ababab,0x81a8a8a8,0x81a5a5a5,0x81a4a4a4,0x81a4a4a4,0x81a8a8a8,0x81acacac,0x81b0b0b0,
+ 0x81b0b0b0,0x81b0b0b0,0x81b0b0b0,0x81b1b1b1,0x81aeaeae,0x81a7a7a7,0x819c9c9c,0x81939393,0x81929292,0x81959595,0x819c9c9c,0x81a4a4a4,0x81ababab,0x81acacac,
+ 0x81a8a8a8,0x81a3a3a3,0x819f9f9f,0x819f9f9f,0x81a1a1a1,0x81a5a5a5,0x81a9a9a9,0x81ababab,0x81acacac,0x81acacac,0x81adadad,0x81a9a9a9,0x81a4a4a4,0x81a3a3a3,
+ 0x81a4a4a4,0x81a9a9a9,0x81aeaeae,0x81b1b1b1,0x81b0b0b0,0x81b0b0b0,0x81aeaeae,0x81adadad,0x81a8a8a8,0x819f9f9f,0x81959595,0x81929292,0x81939393,0x819b9b9b,
+ 0x81a4a4a4,0x81acacac,0x81b1b1b1,0x81b0b0b0,0x81a9a9a9,0x81a3a3a3,0x819d9d9d,0x819d9d9d,0x81a1a1a1,0x81a7a7a7,0x81acacac,0x81b0b0b0,0x81b1b1b1,0x81b0b0b0,
+ 0x81ababab,0x81a5a5a5,0x81a0a0a0,0x81a0a0a0,0x81a3a3a3,0x81a9a9a9,0x81aeaeae,0x81b1b1b1,0x81b0b0b0,0x81acacac,0x81a8a8a8,0x81a3a3a3,0x819c9c9c,0x81959595,
+ 0x81929292,0x81939393,0x819b9b9b,0x81a1a1a1,0x81a9a9a9,0x81b0b0b0,0x81b2b2b2,0x81b1b1b1,0x81a9a9a9,0x81a0a0a0,0x819b9b9b,0x819b9b9b,0x81a1a1a1,0x81a8a8a8,
+ 0x81aeaeae,0x81b2b2b2,0x81b1b1b1,0x81aeaeae,0x81a7a7a7,0x81a0a0a0,0x819c9c9c,0x819c9c9c,0x81a1a1a1,0x81a9a9a9,0x81aeaeae,0x81b1b1b1,0x81acacac,0x81a7a7a7,
+ 0x81a0a0a0,0x819b9b9b,0x81939393,0x81929292,0x81939393,0x81999999,0x81a0a0a0,0x81a5a5a5,0x81ababab,0x81b0b0b0,0x81b0b0b0,0x81adadad,0x81a5a5a5,0x819d9d9d,
+ 0x81999999,0x819b9b9b,0x81a0a0a0,0x81a8a8a8,0x81aeaeae,0x81b2b2b2,0x81b0b0b0,0x81acacac,0x819f9f9f,0x819b9b9b,0x81969696,0x81999999,0x81a0a0a0,0x81a8a8a8,
+ 0x81aeaeae,0x81aeaeae,0x81a9a9a9,0x81a1a1a1,0x81999999,0x81939393,0x81929292,0x81939393,0x819b9b9b,0x81a0a0a0,0x81a3a3a3,0x81a5a5a5,0x81a9a9a9,0x81ababab,
+ 0x81ababab,0x81a8a8a8,0x81a1a1a1,0x819b9b9b,0x81969696,0x81989898,0x819f9f9f,0x81a8a8a8,0x81adadad,0x81aeaeae,0x81ababab,0x81a4a4a4,0x81999999,0x81969696,
+ 0x81959595,0x81999999,0x81a0a0a0,0x81a8a8a8,0x81acacac,0x81adadad,0x81a7a7a7,0x819f9f9f,0x81959595,0x81929292,0x81959595,0x819b9b9b,0x81a1a1a1,0x81a5a5a5,
+ 0x81a7a7a7,0x81a7a7a7,0x81a7a7a7,0x81a7a7a7,0x81a7a7a7,0x81a4a4a4,0x819f9f9f,0x81999999,0x81959595,0x81989898,0x819f9f9f,0x81a7a7a7,0x81ababab,0x81a9a9a9,
+ 0x81a4a4a4,0x819f9f9f,0x81969696,0x81959595,0x81959595,0x819b9b9b,0x81a0a0a0,0x81a5a5a5,0x81ababab,0x81ababab,0x81a5a5a5,0x819d9d9d,0x81989898,0x81989898,
+ 0x819c9c9c,0x81a4a4a4,0x81a9a9a9,0x81ababab,0x81a9a9a9,0x81a7a7a7,0x81a4a4a4,0x81a4a4a4,0x81a4a4a4,0x81a1a1a1,0x819c9c9c,0x81999999,0x81959595,0x81999999,
+ 0x819f9f9f,0x81a4a4a4,0x81a7a7a7,0x81a4a4a4,0x819f9f9f,0x819b9b9b,0x81989898,0x81989898,0x81999999,0x819c9c9c,0x81a0a0a0,0x81a5a5a5,0x81a9a9a9,0x81a9a9a9,
+ 0x81a5a5a5,0x81a0a0a0,0x819c9c9c,0x819f9f9f,0x81a4a4a4,0x81acacac,0x81b0b0b0,0x81b0b0b0,0x81ababab,0x81a8a8a8,0x81a4a4a4,0x81a4a4a4,0x81a3a3a3,0x81a1a1a1,
+ 0x819d9d9d,0x81999999,0x81989898,0x819b9b9b,0x81a0a0a0,0x81a4a4a4,0x81a4a4a4,0x81a1a1a1,0x819d9d9d,0x819b9b9b,0x819f9f9f,0x819f9f9f,0x819f9f9f,0x81a0a0a0,
+ 0x81a1a1a1,0x81a4a4a4,0x81a7a7a7,0x81a8a8a8,0x81a5a5a5,0x81a3a3a3,0x81a1a1a1,0x81a4a4a4,0x81a9a9a9,0x81b0b0b0,0x81b2b2b2,0x81b0b0b0,0x81ababab,0x81a7a7a7,
+ 0x81a4a4a4,0x81a3a3a3,0x81a3a3a3,0x81a1a1a1,0x819f9f9f,0x819c9c9c,0x819b9b9b,0x819f9f9f,0x81a1a1a1,0x81a3a3a3,0x81a3a3a3,0x81a1a1a1,0x81a1a1a1,0x819f9f9f,
+ 0x81a7a7a7,0x81a5a5a5,0x81a5a5a5,0x81a4a4a4,0x81a4a4a4,0x81a4a4a4,0x81a5a5a5,0x81a5a5a5,0x81a5a5a5,0x81a4a4a4,0x81a4a4a4,0x81a7a7a7,0x81ababab,0x81b0b0b0,
+ 0x81b0b0b0,0x81adadad,0x81a9a9a9,0x81a4a4a4,0x81a1a1a1,0x81a1a1a1,0x81a1a1a1,0x81a1a1a1,0x81a1a1a1,0x81a0a0a0,0x81a0a0a0,0x81a1a1a1,0x81a4a4a4,0x81a7a7a7,
+ 0x81a8a8a8,0x81a8a8a8,0x81a8a8a8,0x81a8a8a8,0x81adadad,0x81ababab,0x81a9a9a9,0x81a8a8a8,0x81a7a7a7,0x81a5a5a5,0x81a4a4a4,0x81a4a4a4,0x81a4a4a4,0x81a3a3a3,
+ 0x81a3a3a3,0x81a4a4a4,0x81a7a7a7,0x81a9a9a9,0x81a8a8a8,0x81a5a5a5,0x81a1a1a1,0x819f9f9f,0x819c9c9c,0x819d9d9d,0x819f9f9f,0x81a1a1a1,0x81a1a1a1,0x81a3a3a3,
+ 0x81a3a3a3,0x81a5a5a5,0x81a8a8a8,0x81ababab,0x81adadad,0x81aeaeae,0x81aeaeae,0x81aeaeae,0x81b0b0b0,0x81adadad,0x81ababab,0x81a9a9a9,0x81a7a7a7,0x81a5a5a5,
+ 0x81a4a4a4,0x81a4a4a4,0x81a3a3a3,0x81a3a3a3,0x81a1a1a1,0x81a1a1a1,0x81a1a1a1,0x81a1a1a1,0x81a0a0a0,0x819d9d9d,0x819b9b9b,0x81999999,0x81999999,0x81999999,
+ 0x819c9c9c,0x81a0a0a0,0x81a3a3a3,0x81a4a4a4,0x81a8a8a8,0x81ababab,0x81aeaeae,0x81b1b1b1,0x81b2b2b2,0x81b2b2b2,0x81b1b1b1,0x81b0b0b0,0x81a9a9a9,0x81a8a8a8,
+ 0x81a5a5a5,0x81a5a5a5,0x81a5a5a5,0x81a5a5a5,0x81a4a4a4,0x81a4a4a4,0x81a3a3a3,0x81a3a3a3,0x81a1a1a1,0x81a0a0a0,0x819d9d9d,0x819c9c9c,0x819b9b9b,0x81999999,
+ 0x81969696,0x81959595,0x81959595,0x81969696,0x819b9b9b,0x81a0a0a0,0x81a3a3a3,0x81a8a8a8,0x81acacac,0x81b0b0b0,0x81b3b3b3,0x81b5b5b5,0x81b3b3b3,0x81b1b1b1,
+ 0x81aeaeae,0x81acacac,0x81a3a3a3,0x81a0a0a0,0x819f9f9f,0x81a0a0a0,0x81a3a3a3,0x81a4a4a4,0x81a4a4a4,0x81a3a3a3,0x81a3a3a3,0x81a3a3a3,0x81a1a1a1,0x81a1a1a1,
+ 0x819f9f9f,0x819d9d9d,0x819b9b9b,0x81999999,0x81989898,0x81989898,0x81989898,0x819b9b9b,0x819d9d9d,0x81a1a1a1,0x81a7a7a7,0x81ababab,0x81b0b0b0,0x81b5b5b5,
+ 0x81b5b5b5,0x81b2b2b2,0x81aeaeae,0x81acacac,0x81a9a9a9,0x81a7a7a7,0x819b9b9b,0x81969696,0x81969696,0x819c9c9c,0x81a0a0a0,0x81a3a3a3,0x81a3a3a3,0x81a1a1a1,
+ 0x81a1a1a1,0x81a1a1a1,0x81a3a3a3,0x81a3a3a3,0x81a1a1a1,0x81a1a1a1,0x81a0a0a0,0x81a0a0a0,0x819f9f9f,0x819f9f9f,0x819f9f9f,0x81a0a0a0,0x81a1a1a1,0x81a4a4a4,
+ 0x81a9a9a9,0x81aeaeae,0x81b3b3b3,0x81b5b5b5,0x81b1b1b1,0x81aeaeae,0x81a9a9a9,0x81a7a7a7,0x81a3a3a3,0x819d9d9d,0x81939393,0x81929292,0x81959595,0x819c9c9c,
+ 0x81a3a3a3,0x81a7a7a7,0x81a5a5a5,0x81a1a1a1,0x81a1a1a1,0x81a1a1a1,0x81a3a3a3,0x81a4a4a4,0x81a7a7a7,0x81a8a8a8,0x81a8a8a8,0x81a8a8a8,0x81a7a7a7,0x81a5a5a5,
+ 0x81a4a4a4,0x81a3a3a3,0x81a4a4a4,0x81a7a7a7,0x81acacac,0x81b1b1b1,0x81b5b5b5,0x81b2b2b2,0x81adadad,0x81a8a8a8,0x81a4a4a4,0x81a1a1a1,0x819c9c9c,0x81989898,
+ 0x81909090,0x81939393,0x819b9b9b,0x81a3a3a3,0x81a9a9a9,0x81ababab,0x81a8a8a8,0x81a3a3a3,0x819f9f9f,0x81a0a0a0,0x81a1a1a1,0x81a7a7a7,0x81a9a9a9,0x81adadad,
+ 0x81aeaeae,0x81aeaeae,0x81acacac,0x81a9a9a9,0x81a5a5a5,0x81a3a3a3,0x81a4a4a4,0x81a9a9a9,0x81aeaeae,0x81b3b3b3,0x81b2b2b2,0x81aeaeae,0x81a9a9a9,0x81a4a4a4,
+ 0x81a1a1a1,0x819c9c9c,0x81969696,0x81929292,0x81939393,0x81999999,0x81a1a1a1,0x81a9a9a9,0x81b0b0b0,0x81b0b0b0,0x81ababab,0x81a3a3a3,0x819d9d9d,0x819d9d9d,
+ 0x81a1a1a1,0x81a8a8a8,0x81adadad,0x81b1b1b1,0x81b1b1b1,0x81b1b1b1,0x81adadad,0x81a8a8a8,0x81a3a3a3,0x81a1a1a1,0x81a4a4a4,0x81a9a9a9,0x81b0b0b0,0x81b3b3b3,
+ 0x81b1b1b1,0x81ababab,0x81a5a5a5,0x81a1a1a1,0x819c9c9c,0x81989898,0x81929292,0x81909090,0x81999999,0x81a0a0a0,0x81a8a8a8,0x81aeaeae,0x81b2b2b2,0x81b1b1b1,
+ 0x81ababab,0x81a1a1a1,0x819c9c9c,0x819b9b9b,0x81a0a0a0,0x81a8a8a8,0x81aeaeae,0x81b1b1b1,0x81b1b1b1,0x81aeaeae,0x81a9a9a9,0x81a3a3a3,0x819f9f9f,0x819d9d9d,
+ 0x81a3a3a3,0x81a9a9a9,0x81b0b0b0,0x81b1b1b1,0x81adadad,0x81a8a8a8,0x81a1a1a1,0x819c9c9c,0x81969696,0x81929292,0x81909090,0x81939393,0x819d9d9d,0x81a3a3a3,
+ 0x81a9a9a9,0x81b0b0b0,0x81b1b1b1,0x81aeaeae,0x81a7a7a7,0x819f9f9f,0x81999999,0x81999999,0x819f9f9f,0x81a7a7a7,0x81aeaeae,0x81b1b1b1,0x81aeaeae,0x81ababab,
+ 0x81a3a3a3,0x819d9d9d,0x81999999,0x819c9c9c,0x81a1a1a1,0x81a9a9a9,0x81b0b0b0,0x81b0b0b0,0x81ababab,0x81a4a4a4,0x819c9c9c,0x81989898,0x81929292,0x81909090,
+ 0x81939393,0x81999999
+};
+
+static const QRgb beam_data[] = {
+ 0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,
+ 0xdcdcdc,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xdcdcdc,
+ 0xffc3c3c3,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xffc3c3c3,
+ 0xdcdcdc,0xdcdcdc,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xdcdcdc,0xdcdcdc,
+ 0xdcdcdc,0xffa0a0a0,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xffa0a0a0,0xdcdcdc,
+ 0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff808080,0xff808080,0xff808080,0xff808080,0xff808080,0xff808080,0xff808080,0xff808080,0xdcdcdc,0xdcdcdc,0xdcdcdc,
+ 0xdcdcdc,0xdcdcdc,0xff808080,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff808080,0xdcdcdc,0xdcdcdc,
+ 0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff585858,0xff585858,0xff585858,0xff585858,0xff585858,0xff585858,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,
+ 0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff585858,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff585858,0xdcdcdc,0xdcdcdc,0xdcdcdc,
+ 0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff303030,0xff303030,0xff303030,0xff303030,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,
+ 0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff303030,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff303030,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,
+ 0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff303030,0xff303030,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,
+ 0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff303030,0xff303030,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,
+ 0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc
+};
+
+static const QRgb bell_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x95050505,0x1c000000,0x32000000,0x2d000000,0x10000000,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0x56000000,0xb6959595,0xc58c8c8c,0x62000000,0x14000000,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffcacaca,0xff000000,0x8e000000,0x93000000,0xffe2e2e2,0xe69b9b9b,0x69000000,0x14000000,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffcacaca,0xffffffff,0xff000000,0xc6585858,0xba5c5c5c,0xb7000000,0xffe2e2e2,0xe39c9c9c,0x47000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xffcacaca,0xffffffff,0xffffffff,0xff000000,0xb6000000,0xffe2e2e2,0xc4595959,0xc1000000,0xffe2e2e2,0x71000000,
+ 0xff000000,0xffbababa,0xffbababa,0xffbababa,0xffeaeaea,0xffeaeaea,0xffeaeaea,0xff000000,0x9e000000,0xae000000,0xffe2e2e2,0xc4000000,0xffe2e2e2,0x7d000000,
+ 0xff000000,0xffcfcfcf,0xffcfcfcf,0xffcfcfcf,0xffcfcfcf,0xffcfcfcf,0xffcfcfcf,0xff000000,0x8f000000,0x95000000,0xffe2e2e2,0xd1000000,0xffe2e2e2,0x7d000000,
+ 0xff000000,0xff8d8d8d,0xff8d8d8d,0xff8d8d8d,0xffb4b4b4,0xffb3b3b3,0xffb3b3b3,0xff000000,0x9e000000,0xae000000,0xffe2e2e2,0xc4000000,0xffe2e2e2,0x7d000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff7c7c7c,0xff9d9d9d,0xff9d9d9d,0xff000000,0xb6000000,0xffe2e2e2,0xc4595959,0xc1000000,0xffe2e2e2,0x71000000,
+ 0x24000000,0x6b000000,0x8f000000,0x8f000000,0xff000000,0xff7c7c7c,0xff9d9d9d,0xff000000,0xc6585858,0xba5c5c5c,0xb7000000,0xffe2e2e2,0xe39c9c9c,0x47000000,
+ 0xc000000,0x24000000,0x30000000,0x30000000,0x48000000,0xff000000,0xff7c7c7c,0xff000000,0xa1000000,0x96000000,0xffe2e2e2,0xe69b9b9b,0x69000000,0x14000000,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x3c000000,0xff000000,0xff000000,0x9c000000,0xbd909090,0xc58c8c8c,0x62000000,0x14000000,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x3c000000,0xc8030303,0x82000000,0x51000000,0x2d000000,0x10000000,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x31000000,0x3f000000,0x19000000,0xffffff,0xffffff,0xffffff,0xffffff
+};
+
+static const unsigned char bg_data[] = {
+ 0x50,0x1a,0x0e,0x03,0x2d,0x2f,0x44,0x29,0x34,0x13,0x52,0x10,0x35,0x2d,
+ 0x05,0x44,0x29,0x13,0x3f,0x01,0x50,0x05,0x22,0x4d,0x38,0x1c,0x0a,0x4f,
+ 0x18,0x15,0x2c,0x07,0x44,0x1a,0x39,0x30,0x30,0x10,0x47,0x32,0x14,0x34,
+ 0x28,0x3b,0x38,0x0e,0x44,0x52,0x13,0x14,0x40,0x0a,0x50,0x0e,0x2e,0x2e,
+ 0x10,0x28,0x14,0x41,0x4f,0x3e,0x1e,0x1b,0x39,0x10,0x1a,0x1a,0x3b,0x1b,
+ 0x28,0x0a,0x14,0x13,0x28,0x1b,0x10,0x44,0x51,0x32,0x14,0x40,0x0c,0x08,
+ 0x50,0x39,0x2f,0x2f,0x3b,0x53,0x14,0x14,0x32,0x50,0x10,0x30,0x2f,0x39,
+ 0x44,0x44,0x44,0x46,0x28,0x0a,0x3f,0x0a,0x52,0x1b,0x44,0x46,0x52,0x2a,
+ 0x0a,0x0a,0x32,0x52,0x46,0x10,0x38,0x0e,0x44,0x52,0x32,0x53,0x25,0x0e,
+ 0x4e,0x0b,0x03,0x39,0x44,0x44,0x44,0x46,0x52,0x2a,0x01,0x53,0x47,0x1b,
+ 0x44,0x1b,0x46,0x50,0x27,0x27,0x47,0x1c,0x1b,0x1a,0x39,0x39,0x1a,0x46,
+ 0x47,0x1b,0x0e,0x2b,0x4b,0x21,0x37,0x10,0x1b,0x1b,0x1b,0x46,0x47,0x52,
+ 0x52,0x1d,0x1b,0x10,0x39,0x0e,0x0e,0x30,0x39,0x10,0x1a,0x1a,0x44,0x1a,
+ 0x1a,0x10,0x1a,0x44,0x1b,0x43,0x35,0x21,0x4b,0x22,0x3b,0x1c,0x51,0x51,
+ 0x47,0x1c,0x46,0x46,0x46,0x1b,0x10,0x05,0x2e,0x4d,0x4d,0x4d,0x4e,0x03,
+ 0x38,0x0e,0x10,0x1a,0x1a,0x1a,0x1a,0x44,0x44,0x1a,0x0e,0x03,0x04,0x30,
+ 0x52,0x2a,0x01,0x32,0x53,0x27,0x46,0x1b,0x1b,0x1a,0x0f,0x03,0x21,0x1f,
+ 0x4b,0x21,0x22,0x03,0x05,0x0e,0x10,0x1a,0x44,0x44,0x44,0x1b,0x46,0x1b,
+ 0x44,0x44,0x1b,0x26,0x13,0x3f,0x14,0x3f,0x32,0x1e,0x46,0x1b,0x44,0x1a,
+ 0x0e,0x2e,0x21,0x21,0x2b,0x03,0x0e,0x10,0x44,0x44,0x1a,0x1a,0x44,0x44,
+ 0x1b,0x1b,0x46,0x47,0x51,0x28,0x08,0x32,0x3f,0x14,0x0c,0x0a,0x53,0x1d,
+ 0x1b,0x44,0x44,0x1a,0x0e,0x03,0x4c,0x2b,0x04,0x10,0x1c,0x28,0x53,0x27,
+ 0x45,0x44,0x44,0x1b,0x1b,0x1b,0x46,0x47,0x28,0x2a,0x33,0x34,0x08,0x2a,
+ 0x08,0x29,0x27,0x1b,0x1a,0x39,0x39,0x39,0x0d,0x02,0x4c,0x2e,0x10,0x51,
+ 0x34,0x36,0x3f,0x31,0x1c,0x44,0x1b,0x46,0x46,0x46,0x46,0x46,0x47,0x27,
+ 0x28,0x53,0x1b,0x1b,0x46,0x46,0x1b,0x10,0x0e,0x2f,0x2f,0x04,0x02,0x21,
+ 0x21,0x35,0x25,0x0a,0x16,0x41,0x3f,0x28,0x44,0x43,0x1a,0x46,0x1c,0x1c,
+ 0x1b,0x44,0x44,0x44,0x44,0x44,0x37,0x0f,0x1a,0x44,0x44,0x39,0x03,0x4c,
+ 0x2b,0x2b,0x21,0x4b,0x02,0x10,0x08,0x40,0x24,0x36,0x31,0x44,0x37,0x35,
+ 0x39,0x1b,0x52,0x1e,0x46,0x1a,0x0e,0x0d,0x04,0x04,0x2d,0x38,0x44,0x1b,
+ 0x44,0x0e,0x22,0x4b,0x21,0x4c,0x22,0x2e,0x19,0x52,0x14,0x41,0x40,0x2a,
+ 0x11,0x04,0x00,0x21,0x05,0x45,0x29,0x28,0x46,0x43,0x04,0x21,0x4b,0x21,
+ 0x2f,0x1a,0x26,0x27,0x1b,0x05,0x4d,0x4b,0x2b,0x03,0x39,0x1b,0x53,0x14,
+ 0x41,0x40,0x32,0x46,0x0e,0x2b,0x1f,0x00,0x0e,0x47,0x09,0x2a,0x50,0x39,
+ 0x02,0x1f,0x4b,0x4d,0x10,0x1d,0x54,0x53,0x46,0x0e,0x4d,0x20,0x03,0x06,
+ 0x27,0x32,0x40,0x41,0x40,0x3d,0x27,0x3b,0x0d,0x2b,0x21,0x23,0x1a,0x28,
+ 0x0a,0x32,0x27,0x39,0x4d,0x1f,0x4c,0x04,0x48,0x32,0x3f,0x01,0x47,0x0f,
+ 0x02,0x22,0x38,0x1c,0x0a,0x15,0x41,0x40,0x32,0x27,0x1b,0x1a,0x0e,0x2f,
+ 0x2f,0x17,0x46,0x2a,0x3f,0x13,0x51,0x39,0x2e,0x22,0x0d,0x44,0x0a,0x3f,
+ 0x14,0x0a,0x27,0x19,0x03,0x2e,0x10,0x52,0x14,0x16,0x14,0x2a,0x46,0x3b,
+ 0x10,0x10,0x10,0x43,0x10,0x44,0x52,0x0a,0x14,0x13,0x51,0x10,0x37,0x05,
+ 0x44,0x52,0x3f,0x14,0x14,0x32,0x27,0x1a,0x37,0x37,0x3b,0x28,0x34,0x34,
+ 0x53,0x11,0x0e,0x0d,0x0e,0x10,0x44,0x44,0x44,0x46,0x53,0x0a,0x14,0x0a,
+ 0x51,0x44,0x43,0x44,0x51,0x32,0x13,0x13,0x0a,0x53,0x1d,0x1a,0x0e,0x0e,
+ 0x1a,0x1d,0x53,0x52,0x44,0x04,0x2b,0x2b,0x2f,0x39,0x44,0x44,0x1b,0x1c,
+ 0x07,0x0a,0x34,0x09,0x27,0x44,0x44,0x1c,0x29,0x32,0x52,0x52,0x1e,0x47,
+ 0x46,0x44,0x10,0x39,0x1a,0x1b,0x46,0x44,0x05,0x21,0x1f,0x21,0x2f,0x10,
+ 0x44,0x1b,0x1b,0x46,0x1e,0x31,0x2a,0x52,0x1c,0x1b,0x1b,0x46,0x50,0x51,
+ 0x10,0x1a,0x3b,0x44,0x44,0x44,0x1a,0x1a,0x1a,0x44,0x44,0x10,0x2f,0x4c,
+ 0x21,0x4e,0x0e,0x44,0x46,0x1c,0x46,0x46,0x50,0x47,0x47,0x46,0x44,0x10,
+ 0x19,0x39,0x39,0x19,0x2e,0x2f,0x38,0x39,0x10,0x1a,0x44,0x44,0x44,0x1b,
+ 0x1b,0x44,0x43,0x0e,0x0f,0x1a,0x46,0x1e,0x53,0x07,0x52,0x1c,0x46,0x1b,
+ 0x1b,0x1a,0x30,0x2f,0x2d,0x02,0x02,0x02,0x4c,0x2e,0x2f,0x0e,0x10,0x1a,
+ 0x44,0x44,0x1b,0x1b,0x46,0x46,0x46,0x46,0x47,0x28,0x2a,0x0a,0x0a,0x0a,
+ 0x31,0x27,0x1b,0x44,0x39,0x2f,0x02,0x4b,0x1f,0x1f,0x4b,0x21,0x05,0x39,
+ 0x1a,0x1a,0x1a,0x1a,0x44,0x44,0x1b,0x1b,0x46,0x47,0x28,0x53,0x32,0x0a,
+ 0x0c,0x14,0x14,0x3f,0x2a,0x27,0x1b,0x39,0x04,0x21,0x12,0x3c,0x12,0x4b,
+ 0x22,0x03,0x1b,0x27,0x52,0x27,0x1b,0x44,0x44,0x1b,0x1b,0x1b,0x46,0x1c,
+ 0x52,0x29,0x09,0x0a,0x13,0x13,0x13,0x09,0x28,0x46,0x10,0x2f,0x21,0x3c,
+ 0x3c,0x1f,0x4d,0x03,0x38,0x10,0x32,0x0c,0x3f,0x08,0x1d,0x1b,0x1b,0x46,
+ 0x46,0x46,0x1b,0x1b,0x46,0x46,0x47,0x27,0x52,0x52,0x52,0x27,0x1c,0x44,
+ 0x0e,0x4d,0x49,0x3c,0x4b,0x02,0x38,0x10,0x45,0x4a,0x15,0x41,0x14,0x53,
+ 0x1b,0x10,0x1a,0x46,0x1c,0x1c,0x1b,0x44,0x10,0x19,0x39,0x39,0x10,0x3b,
+ 0x44,0x1b,0x44,0x43,0x03,0x4b,0x3c,0x1f,0x2e,0x30,0x44,0x50,0x53,0x34,
+ 0x18,0x15,0x32,0x25,0x0e,0x2f,0x39,0x1b,0x1e,0x27,0x46,0x10,0x05,0x2e,
+ 0x02,0x02,0x03,0x0e,0x1a,0x1b,0x44,0x0e,0x4d,0x12,0x1f,0x4d,0x0e,0x44,
+ 0x50,0x53,0x3f,0x41,0x4f,0x0a,0x1c,0x05,0x2b,0x21,0x0d,0x1b,0x28,0x28,
+ 0x46,0x19,0x2e,0x4b,0x4b,0x20,0x2e,0x0f,0x1b,0x46,0x44,0x05,0x21,0x12,
+ 0x00,0x2f,0x3b,0x50,0x53,0x34,0x16,0x18,0x0a,0x27,0x39,0x22,0x1f,0x4b,
+ 0x37,0x46,0x08,0x2a,0x47,0x19,0x02,0x4b,0x4b,0x4d,0x42,0x1b,0x52,0x28,
+ 0x45,0x05,0x21,0x4b,0x2d,0x30,0x46,0x53,0x3f,0x41,0x18,0x40,0x28,0x1b,
+ 0x05,0x2b,0x4b,0x22,0x3a,0x51,0x0a,0x33,0x51,0x10,0x02,0x20,0x02,0x37,
+ 0x1b,0x07,0x33,0x08,0x46,0x05,0x2b,0x21,0x2f,0x44,0x53,0x34,0x16,0x18,
+ 0x40,0x3d
+};
+
+static const QRgb bg_ctable[] = {
+ 0xff618b80,0xff52776e,0xff5f897e,0xff5e877d,0xff5d877c,0xff5c857b,0xff5a8379,0xff557a70,0xff54786f,0xff53786e,0xff52766d,0xff5f887d,0xff50746b,0xff5d867b,
+ 0xff5c847a,0xff5b8479,0xff5a8278,0xff588076,0xff628e83,0xff52756c,0xff50736a,0xff4f7169,0xff4e7168,0xff5c8379,0xff4d6f67,0xff5b8378,0xff5a8177,0xff587f75,
+ 0xff577d74,0xff567d73,0xff557b72,0xff628d82,0xff618b81,0xff608b80,0xff5f897f,0xff5e897e,0xff4e7067,0xff587e74,0xff577c73,0xff567c72,0xff557a71,0xff547a70,
+ 0xff53786f,0xff608a7f,0xff51766d,0xff5f887e,0xff5e887d,0xff5d867c,0xff5b847a,0xff54796f,0xff53776e,0xff52776d,0xff51756c,0xff5e877c,0xff4f736a,0xff5d857b,
+ 0xff5c857a,0xff5b8379,0xff5a8378,0xff598177,0xff638f84,0xff53766d,0xff52766c,0xff51746b,0xff4f7269,0xff4e7068,0xff5c8479,0xff5b8278,0xff598076,0xff587e75,
+ 0xff577e74,0xff567c73,0xff557c72,0xff638e83,0xff547a71,0xff618c81,0xff608a80,0xff5f8a7f,0xff5e887e,0xff4f7168,0xff577d73,0xff567b72,0xff557b71,0xff547970,
+ 0xff53796f
+};
+
+static const QRgb binary_data[] = {
+ 0x7000000,0xe000000,0x23000000,0x42000000,0x55000000,0x5b000000,0x5d000000,0x5a000000,0x49000000,0x34000000,0x24000000,0x1a000000,0x11000000,0xffffff,
+ 0xc000000,0x18000000,0x48000000,0xffffffff,0xfffdfdfd,0xffeaeaea,0xffb0b0b0,0xffffffff,0xf3c8c8c8,0x6b000000,0x44000000,0x2d000000,0x1d000000,0xc000000,
+ 0x11000000,0x24000000,0x62000000,0xffffffff,0xfffcfcfc,0xffe2e2e2,0xff969696,0xffffffff,0xffffffff,0xf7c1c1c1,0x75000000,0x46000000,0x2a000000,0x11000000,
+ 0x16000000,0x2e000000,0x71000000,0xffffffff,0xfffcfcfc,0xffe2e2e2,0xff939393,0xffffffff,0xffffffff,0xffffffff,0xf5c6c6c6,0x65000000,0x36000000,0x16000000,
+ 0x1a000000,0x35000000,0x7b000000,0xffffffff,0xfffdfdfd,0xffe8e8e8,0xffababab,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x7c000000,0x3e000000,0x1a000000,
+ 0x1c000000,0x39000000,0x80000000,0xffffffff,0xfffdfdfd,0xfff5f5f5,0xffd7d7d7,0xffababab,0xff939393,0xff969696,0xffb0b0b0,0x85000000,0x43000000,0x1c000000,
+ 0x1d000000,0x3b000000,0x83000000,0xffffffff,0xffffffff,0xfffcfcfc,0xfff5f5f5,0xffe8e8e8,0xffe2e2e2,0xffe2e2e2,0xffeaeaea,0x88000000,0x46000000,0x1d000000,
+ 0x1d000000,0x3c000000,0x84000000,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfffcfcfc,0xfffdfdfd,0x88000000,0x47000000,0x1d000000,
+ 0x1d000000,0x3b000000,0x83000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x88000000,0x46000000,0x1d000000,
+ 0x1c000000,0x39000000,0x81000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x85000000,0x44000000,0x1c000000,
+ 0x1a000000,0x36000000,0x7b000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x80000000,0x3f000000,0x1a000000,
+ 0x17000000,0x30000000,0x73000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x77000000,0x38000000,0x16000000,
+ 0x14000000,0x28000000,0x5e000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x61000000,0x2e000000,0x11000000,
+ 0x10000000,0x20000000,0x3e000000,0x64000000,0x7e000000,0x89000000,0x8f000000,0x8f000000,0x89000000,0x7f000000,0x65000000,0x40000000,0x25000000,0xc000000
+};
+
+static const QRgb bold_data[] = {
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,
+ 0xff000000,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0xff000000,0xff000000,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,
+ 0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,
+ 0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,
+ 0xff000000,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0xff000000,0xff000000,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0
+};
+
+static const unsigned char c_src_data[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x15,0x01,0x01,0x01,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x15,0x0d,0x15,0x0d,
+ 0x15,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0d,0x08,
+ 0x0d,0x0d,0x0d,0x15,0x0d,0x15,0x01,0x01,0x00,0x00,0x00,0x00,0x01,0x15,
+ 0x0d,0x0d,0x08,0x08,0x08,0x0d,0x15,0x0d,0x15,0x01,0x00,0x00,0x00,0x00,
+ 0x01,0x15,0x0d,0x0d,0x0d,0x15,0x0d,0x08,0x08,0x15,0x15,0x01,0x00,0x00,
+ 0x00,0x01,0x15,0x0d,0x08,0x0d,0x15,0x0d,0x15,0x0d,0x15,0x15,0x15,0x01,
+ 0x00,0x00,0x00,0x01,0x0d,0x15,0x0d,0x08,0x08,0x08,0x0d,0x15,0x0d,0x15,
+ 0x08,0x01,0x00,0x00,0x01,0x0d,0x15,0x0d,0x15,0x0d,0x15,0x0d,0x08,0x08,
+ 0x15,0x15,0x01,0x00,0x00,0x01,0x15,0x15,0x08,0x15,0x15,0x15,0x0d,0x15,
+ 0x15,0x15,0x15,0x15,0x01,0x00,0x01,0x15,0x15,0x15,0x15,0x08,0x08,0x08,
+ 0x15,0x0d,0x15,0x0d,0x15,0x15,0x01,0x00,0x01,0x08,0x15,0x15,0x15,0x15,
+ 0x15,0x15,0x08,0x08,0x08,0x15,0x15,0x08,0x01,0x00,0x00,0x01,0x01,0x08,
+ 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x01,0x00,0x00,0x00,0x00,
+ 0x00,0x01,0x01,0x01,0x08,0x15,0x15,0x15,0x15,0x15,0x08,0x01,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x08,0x15,0x08,0x01,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,
+ 0x00,0x00,0x00,0x00
+};
+
+static const QRgb c_src_ctable[] = {
+ 0xc6c6c6,0xff000000,0xffc3c3c3,0xff303030,0xffc0c0ff,0xffff0000,0xff008080,0xff800000,0xffc0c000,0xff0000c0,0xff808080,0xffc0ffc0,0xff00ffff,0xffffffff,
+ 0xffa0a0a0,0xff00ff00,0xffffff00,0xffffc0ff,0xff404000,0xff00c000,0xff000080,0xffffffc0,0xff400000,0xffc05800,0xff800080,0xff008000,0xff00c0c0,0xffdcdcdc,
+ 0xffff8000,0xffffc0c0,0xff585858,0xffc00000,0xffffdca8,0xff808000,0xffffa858,0xff004000,0xffc000c0,0xff0000ff,0xffff00ff,0xffc0ffff,0xff004040
+};
+
+static const QRgb calculator_data[] = {
+ 0x2000000,0xfff9f9f9,0xfff3f3f3,0xffe6e6e6,0xffdbdbdb,0xffe4e4e4,0xffeeeeee,0xffeeeeee,0xffeeeeee,0xffeeeeee,0xffeeeeee,0xffeeeeee,0x13000000,0xe000000,
+ 0x7000000,0xff76aa76,0xff66a166,0xff4d874d,0xffffffff,0xff4d874d,0xff589958,0xff589958,0xff589958,0xff589958,0xff589958,0xff3e8a3e,0xff006a00,0x2b000000,
+ 0xe000000,0xff629a62,0xff3c7c3c,0xff1e5c1e,0xffffffff,0xff1e5c1e,0xff247024,0xff287a28,0xff297f29,0xff297f29,0xff297f29,0xff006d00,0xff005400,0x55000000,
+ 0x13000000,0xff508d50,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff006500,0xff006e00,0xff006e00,0xff006e00,0xff006300,0xff004b00,0x71000000,
+ 0x15000000,0xff549354,0xff247024,0xff004f00,0xffffffff,0xff004a00,0xff005300,0xff005800,0xff005d00,0xff005d00,0xff006100,0xff005f00,0xff004b00,0x7f000000,
+ 0x15000000,0xff589958,0xff297f29,0xff006100,0xffffffff,0xff005800,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff005b00,0xff004b00,0x7f000000,
+ 0x15000000,0xff549354,0xff257625,0xff006500,0xff006500,0xff006100,0xff005800,0xff005800,0xff005800,0xff005300,0xff005d00,0xff005f00,0xff004b00,0x7f000000,
+ 0x15000000,0xff508d50,0xffffffff,0xff8fb28f,0xff006500,0xff8fb28f,0xffffffff,0xff006500,0xff8fb68f,0xffffffff,0xff8fb68f,0xff006300,0xff004b00,0x7f000000,
+ 0x15000000,0xff549354,0xff9ab89a,0xffffffff,0xff8fad8f,0xffffffff,0xff8faf8f,0xff005d00,0xff005800,0xff005300,0xff005800,0xff005800,0xff004800,0x7f000000,
+ 0x15000000,0xff589958,0xff257625,0xff8fad8f,0xffffffff,0xff8fad8f,0xff005d00,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff004600,0x7f000000,
+ 0x15000000,0xff549354,0xff9ab89a,0xffffffff,0xff8fad8f,0xffffffff,0xff8faf8f,0xff005d00,0xff005800,0xff005300,0xff005800,0xff005800,0xff004800,0x7f000000,
+ 0x15000000,0xff397f39,0xffffffff,0xff8fad8f,0xff005b00,0xff8fad8f,0xffffffff,0xff005b00,0xff8fb18f,0xffffffff,0xff8fb18f,0xff005a00,0xff004700,0x7f000000,
+ 0x13000000,0xff006600,0xff004e00,0xff004800,0xff004b00,0xff004800,0xff004600,0xff004800,0xff004800,0xff004600,0xff004800,0xff004700,0xff004000,0x71000000,
+ 0xe000000,0x2b000000,0x55000000,0x71000000,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x71000000,0x55000000
+};
+
+static const QRgb center_data[] = {
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0
+};
+
+static const unsigned char citytime_icon_data[] = {
+ 0x0c,0x0c,0x0c,0x0c,0x0c,0x06,0x06,0x06,0x06,0x06,0x06,0x0c,0x0c,0x0c,
+ 0x0c,0x0c,0x0c,0x0c,0x0c,0x06,0x06,0x0d,0x02,0x0d,0x02,0x0d,0x0d,0x06,
+ 0x06,0x0c,0x0c,0x0c,0x0c,0x0c,0x06,0x02,0x00,0x02,0x00,0x03,0x00,0x03,
+ 0x00,0x02,0x0d,0x06,0x0c,0x0c,0x0c,0x06,0x0b,0x00,0x09,0x08,0x09,0x00,
+ 0x00,0x08,0x03,0x00,0x03,0x00,0x06,0x0c,0x0c,0x06,0x0b,0x08,0x08,0x08,
+ 0x08,0x08,0x00,0x02,0x00,0x02,0x00,0x03,0x06,0x0c,0x06,0x0b,0x08,0x03,
+ 0x02,0x03,0x08,0x07,0x03,0x00,0x02,0x01,0x02,0x00,0x03,0x06,0x06,0x0b,
+ 0x07,0x0a,0x00,0x0a,0x00,0x02,0x07,0x08,0x00,0x08,0x01,0x02,0x0b,0x06,
+ 0x06,0x0b,0x02,0x00,0x0a,0x00,0x0a,0x00,0x00,0x04,0x08,0x01,0x08,0x01,
+ 0x0b,0x06,0x06,0x0b,0x08,0x02,0x03,0x02,0x07,0x02,0x00,0x07,0x01,0x08,
+ 0x05,0x08,0x0b,0x06,0x06,0x0b,0x08,0x01,0x08,0x03,0x02,0x07,0x02,0x01,
+ 0x08,0x01,0x08,0x05,0x0b,0x06,0x06,0x0b,0x08,0x08,0x01,0x03,0x00,0x02,
+ 0x03,0x08,0x01,0x08,0x01,0x08,0x0b,0x06,0x0c,0x06,0x0b,0x01,0x08,0x01,
+ 0x0a,0x00,0x08,0x01,0x00,0x01,0x08,0x0b,0x06,0x0c,0x0c,0x06,0x0b,0x08,
+ 0x08,0x08,0x07,0x02,0x01,0x08,0x01,0x08,0x0b,0x0b,0x06,0x0c,0x0c,0x0c,
+ 0x06,0x05,0x05,0x08,0x08,0x01,0x08,0x08,0x01,0x0b,0x05,0x06,0x0c,0x0c,
+ 0x0c,0x0c,0x0c,0x06,0x06,0x05,0x08,0x05,0x05,0x08,0x05,0x06,0x06,0x0c,
+ 0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x06,0x06,0x06,0x06,0x06,0x06,0x0c,
+ 0x0c,0x0c,0x0c,0x0c
+};
+
+static const QRgb citytime_icon_ctable[] = {
+ 0xffffa858,0xff000080,0xffc0c000,0xff808000,0xffc05800,0xffc0c0ff,0xff000000,0xffff8000,0xff0000c0,0xff800000,0xffffdca8,0xff0000ff,0xc6c6c6,0xffffffff
+};
+
+static const QRgb close_data[] = {
+ 0xffffff,0xffffff,0xffffff,0x66b16d6d,0xba985f5f,0xeb7b4a4a,0xfd693c3c,0xeb7a3e3e,0xba934242,0x66a93f3f,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0x1bcb7676,0x9db97272,0xfda96a6a,0xffa76565,0xffa75f5f,0xffa65757,0xffa44c4c,0xffa04040,0xfda03535,0x9dad2a2a,0x1bbd1f1f,0xffffff,0xffffff,
+ 0xffffff,0x9db86c6c,0xffb36c6c,0xffc69898,0xffca7373,0xffcf6565,0xffcf5c5c,0xffcb4f4f,0xffc34949,0xffc07474,0xffa61b1b,0x9caa0c0c,0xffffff,0xffffff,
+ 0x66ae5c5c,0xfda65e5e,0xffc59494,0xffe9e9e9,0xffefd7d7,0xffdd5e5e,0xffdb4848,0xffda4b4b,0xffeecdcd,0xffe9e9e9,0xffbd6464,0xfd9a0000,0x60a30000,0xffffff,
+ 0xba944a4a,0xffa45151,0xffc96565,0xffefd5d5,0xfffdfdfd,0xfff6d5d5,0xffdd4242,0xfff6d1d1,0xfffdfdfd,0xffedc7c7,0xffb51313,0xff930000,0xaf910000,0xffffff,
+ 0xeb783434,0xffa34343,0xffca4b4b,0xffdb4c4c,0xfff7d5d5,0xffffffff,0xfffdf4f4,0xffffffff,0xfff5cfcf,0xffc81616,0xffb00000,0xff8e0000,0xe37f0000,0xffffff,
+ 0xfd662323,0xffa13434,0xffc93737,0xffd72d2d,0xffdb3737,0xfffdf4f4,0xffffffff,0xfffdf4f4,0xffd12727,0xffbe0000,0xffa80000,0xff870000,0xfc740000,0xffffff,
+ 0xeb741d1d,0xff9d1f1f,0xffc31e1e,0xffd52525,0xfff6cfcf,0xffffffff,0xfffdf4f4,0xffffffff,0xfff2cece,0xffb71616,0xff9a0000,0xff7b0000,0xe36f0000,0xffffff,
+ 0xba8c1010,0xff990808,0xffba1313,0xffecc7c7,0xfffdfdfd,0xfff2cece,0xffcb2828,0xfff0cece,0xfffdfdfd,0xffe3c7c7,0xff8d1313,0xff6f0000,0xaf700000,0xffffff,
+ 0x669e0000,0xfd930000,0xffb56060,0xffe9e9e9,0xffe8c7c7,0xffb91717,0xffb10000,0xffad1717,0xffe3c7c7,0xffe9e9e9,0xff9a6060,0xfd660000,0x60740000,0xffffff,
+ 0xffffff,0x9d990000,0xff8e0000,0xffad6161,0xff9b1414,0xff9a0000,0xff960000,0xff8c0000,0xff851414,0xff986161,0xff650000,0x9c6b0000,0xffffff,0xffffff,
+ 0xffffff,0x1ba40000,0x9c8d0000,0xfd7c0000,0xff7a0000,0xff760000,0xff730000,0xff6b0000,0xff630000,0xfd5f0000,0x9c680000,0x1b780000,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0x60850000,0xaf750000,0xe2670000,0xfc5f0000,0xe25e0000,0xaf620000,0x60690000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff
+};
+
+static const QRgb copy_data[] = {
+ 0xffffff,0x4200,0x1200,0x800,0x28000000,0xa6000000,0x9b000000,0xa6000000,0xb72b2b2b,0x6666666,0x30303,0x0,0x0,0x0,
+ 0xffffff,0x4200,0x1200,0x800,0x28000000,0xa6474747,0x9bb4b4b4,0xa6929292,0xaebdbdbd,0x7b777777,0xe000000,0x2000000,0x0,0x0,
+ 0xffffff,0x4200,0x1200,0x500,0x26000000,0xa5686768,0x9affffff,0xa6c1c1c1,0xa9eaeaea,0xb3eeeeee,0x8e5c5c5c,0x1c000000,0x2000000,0x0,
+ 0xffffff,0x5004200,0xc2001200,0xe21a1f1a,0xe9191a19,0xf9253525,0xd5a8bba8,0xa0b0afb0,0xa9dcdbdc,0xaaffffff,0xb1f3f3f3,0x91606060,0x1e0a0a0a,0x2000000,
+ 0xffffff,0x5004100,0xd2051905,0xf5eef2ee,0xf9d7ead7,0xffc6e3c6,0xffc8d2c8,0xde4f6a4f,0xb0b6bab6,0xa9edeced,0xaaefefef,0xb3dedede,0x86363636,0x5000000,
+ 0xffffff,0x5004100,0xd0051905,0xf3edf1ed,0xf7c4dec4,0xff9ac29a,0xffffffff,0xffc1cfc1,0xe3496649,0xb27b857b,0xa8adadad,0xafa8a8a8,0x8a000000,0x10000000,
+ 0xffffff,0x5004100,0xd0051905,0xf3ebefeb,0xf7c0dbc0,0xff9abd9a,0xffffffff,0xffffffff,0xffc9d2c9,0xe37a967a,0xafc4ccc4,0xa8c8c8c8,0x89000000,0x15000000,
+ 0xffffff,0x4004200,0xd0051a05,0xf3e7eee7,0xf7cbe3cb,0xfe89b889,0xffabc8ab,0xffabccab,0xffd4edd4,0xff475847,0xbb97a797,0xa0c9c9c9,0x81000000,0x13000000,
+ 0xffffff,0x4004300,0xd0051905,0xf1dde8dd,0xf4ddeedd,0xfeb2d3b2,0xfda0c6a0,0xfda3caa3,0xfdc4e4c4,0xfe292e29,0xc17a8c7a,0x9dc3c3c3,0x7e000000,0x10000000,
+ 0xffffff,0x4004600,0xcf051905,0xefd3e2d3,0xefd9ecd9,0xfcd0e5d0,0xfbd9ebd9,0xfbdbecdb,0xfbedfaed,0xfc393f39,0xc57c8e7c,0xa5c2c2c2,0x80000000,0xc000000,
+ 0xffffff,0x3004800,0xce051a05,0xeecadcca,0xeccae3ca,0xf7bdd9bd,0xf7bfdcbf,0xf7c4dec4,0xf7d4eed4,0xf8303730,0xc2101410,0xa41f1f1f,0x7a000000,0x4000000,
+ 0xffffff,0x3004700,0xce061a06,0xeecbe2cb,0xe9cdebcd,0xefc7e6c7,0xf0c8e6c8,0xf0cce8cc,0xefe3fde3,0xf1343c34,0x74173317,0x27414141,0x1c000000,0x2000000,
+ 0xffffff,0xa004000,0xdb000f00,0xfa8c9a8c,0xf98fa38f,0xff8b9f8b,0xff8c9f8c,0xff90a290,0xffa0afa0,0xff242724,0x51002900,0x1000000,0x2000000,0x0,
+ 0xffffff,0xd003900,0x821e401e,0xaa294729,0xb8173017,0xae132e13,0xab132e13,0xab132e13,0xab142f14,0xa7052205,0x2a003b00,0x0,0x0,0x0
+};
+
+static const QRgb copy_inactive_data[] = {
+ 0xffffff,0x4200,0x1200,0x800,0x14000000,0x53000000,0x4d000000,0x53000000,0x5b2b2b2b,0x3666666,0x30303,0x0,0x0,0x0,
+ 0xffffff,0x4200,0x1200,0x800,0x14000000,0x53474747,0x4db4b4b4,0x53929292,0x57bdbdbd,0x3d777777,0x7000000,0x1000000,0x0,0x0,
+ 0xffffff,0x4200,0x1200,0x500,0x13000000,0x52676767,0x4dffffff,0x53c1c1c1,0x54eaeaea,0x59eeeeee,0x475c5c5c,0xe000000,0x1000000,0x0,
+ 0xffffff,0x2252525,0x610a0a0a,0x711d1d1d,0x74191919,0x7c2d2d2d,0x6ab1b1b1,0x50afafaf,0x54dbdbdb,0x55ffffff,0x58f3f3f3,0x48606060,0xf0a0a0a,0x1000000,
+ 0xffffff,0x2242424,0x690f0f0f,0x7af0f0f0,0x7ce0e0e0,0x7fd4d4d4,0x7fcdcdcd,0x6f5d5d5d,0x58b7b7b7,0x54ececec,0x55efefef,0x59dedede,0x43363636,0x2000000,
+ 0xffffff,0x2242424,0x680f0f0f,0x79eeeeee,0x7bd1d1d1,0x7fadadad,0x7fffffff,0x7fc8c8c8,0x71585858,0x59808080,0x54adadad,0x57a8a8a8,0x45000000,0x8000000,
+ 0xffffff,0x2242424,0x680f0f0f,0x79ededed,0x7bcdcdcd,0x7fababab,0x7fffffff,0x7fffffff,0x7fcdcdcd,0x71888888,0x57c8c8c8,0x54c8c8c8,0x44000000,0xa000000,
+ 0xffffff,0x2252525,0x68101010,0x79eaeaea,0x7bd7d7d7,0x7fa1a1a1,0x7fb9b9b9,0x7fbcbcbc,0x7fe0e0e0,0x7f4f4f4f,0x5d9f9f9f,0x50c9c9c9,0x40000000,0x9000000,
+ 0xffffff,0x2252525,0x680f0f0f,0x78e3e3e3,0x7ae5e5e5,0x7fc3c3c3,0x7eb3b3b3,0x7eb6b6b6,0x7ed4d4d4,0x7f2b2b2b,0x60828282,0x4ec3c3c3,0x3f000000,0x8000000,
+ 0xffffff,0x2272727,0x670f0f0f,0x77dadada,0x77e3e3e3,0x7edadada,0x7de2e2e2,0x7de3e3e3,0x7df3f3f3,0x7e3c3c3c,0x62858585,0x52c2c2c2,0x40000000,0x6000000,
+ 0xffffff,0x1282828,0x67101010,0x77d2d2d2,0x76d7d7d7,0x7bcbcbcb,0x7bcdcdcd,0x7bd1d1d1,0x7be1e1e1,0x7c343434,0x61121212,0x521f1f1f,0x3d000000,0x2000000,
+ 0xffffff,0x1282828,0x67101010,0x77d7d7d7,0x74dcdcdc,0x77d7d7d7,0x78d7d7d7,0x78dadada,0x77f0f0f0,0x78373737,0x3a252525,0x13414141,0xe000000,0x1000000,
+ 0xffffff,0x5242424,0x6d080808,0x7d939393,0x7c999999,0x7f959595,0x7f959595,0x7f999999,0x7fa7a7a7,0x7f252525,0x28171717,0x0,0x1000000,0x0,
+ 0xffffff,0x6202020,0x412f2f2f,0x55383838,0x5c242424,0x57202020,0x55202020,0x55202020,0x55222222,0x53141414,0x15202020,0x0,0x0,0x0
+};
+
+static const QRgb cut_data[] = {
+ 0xc000000,0x9000000,0xa75b5b5b,0xe7545454,0x5d353535,0x4000000,0x12000000,0xb000000,0xb000000,0xd000000,0x3f535353,0x9e787878,0x423f3f3f,0xe000000,
+ 0x7000000,0x821a1a1a,0xe5313131,0xfb232323,0xd0252525,0x881a1a1a,0xd000000,0x14000000,0x16000000,0x53494949,0xbb676767,0xe2393939,0xb3474747,0x382e2e2e,
+ 0x13000000,0xc30a0a0a,0xff1f1f1f,0xcc4a4a4a,0xf95d5d5d,0xff242424,0x911b1b1b,0x1e000000,0x6e4b4b4b,0xe06a6a6a,0xff2e2e2e,0xff282828,0xff373737,0x97272727,
+ 0x11000000,0x9d4c4c4c,0xfd4a4a4a,0xf22b2b2b,0x982d2d2d,0xe56d6d6d,0xfe252525,0xba4c4c4c,0xda4c4c4c,0xfe343434,0x8d141414,0x6b121212,0xc5393939,0xb4191919,
+ 0x12000000,0x27000000,0x9b5f5f5f,0xf84b4b4b,0xf82f2f2f,0xe2434343,0xff404040,0xff2b2b2b,0xff161616,0xe42b2b2b,0xa6232323,0xaf333333,0xfd4f4f4f,0xaa272727,
+ 0xc000000,0x15000000,0x2e000000,0x8f606060,0xd4282828,0xed2f2f2f,0xff484848,0xff6d6d6d,0xff343434,0xff1b1b1b,0xf7686868,0xf5747474,0xea707070,0x7b3e3e3e,
+ 0x7000000,0xd000000,0x1a000000,0x2b000000,0x5c030303,0xda1d1d1d,0xff707070,0xfff7f7f7,0xffa7a7a7,0xff272727,0xa7656565,0x96747474,0x735d5d5d,0x37080808,
+ 0x4000000,0x8000000,0x14000000,0x32000000,0xca1f1f1f,0xff757575,0xff5a5a5a,0xfe919191,0xfef2f2f2,0xffaeaeae,0xc5000000,0x52000000,0x3e000000,0x2a000000,
+ 0x5000000,0xe000000,0x25000000,0xc6202020,0xffa8a8a8,0xfed1d1d1,0xff717171,0xff202020,0xfdafafaf,0xfdf9f9f9,0xffb1b1b1,0xbe0f0f0f,0x3d000000,0x2b000000,
+ 0xe000000,0x1e000000,0xc5202020,0xffa8a8a8,0xfff0f0f0,0xffaeaeae,0xd61b1b1b,0x7d000000,0xdd2b2b2b,0xffb7b7b7,0xfff6f6f6,0xffaeaeae,0xb7101010,0x2d000000,
+ 0x3000000,0xab171717,0xff9a9a9a,0xffe8e8e8,0xffb9b9b9,0xf42b2b2b,0xb3171717,0x43000000,0x4f000000,0xda2d2d2d,0xffbababa,0xfef7f7f7,0xffaaaaaa,0x98050505,
+ 0x6000000,0xb7161616,0xffb6b6b6,0xffbcbcbc,0xd1202020,0x53000000,0x44000000,0x38000000,0x31000000,0x3a000000,0xd72e2e2e,0xffc4c4c4,0xffc1c1c1,0xa7030303,
+ 0x0,0xc01d1d1d,0xff898989,0xcc2d2d2d,0x4a030303,0x3a000000,0x2f000000,0x22000000,0x1c000000,0x1f000000,0x30000000,0xd33b3b3b,0xff8d8d8d,0xae131313,
+ 0x5000000,0x65141414,0x97101010,0x38101010,0x2a000000,0x24000000,0x1a000000,0xf000000,0xb000000,0xe000000,0x13000000,0x2d000000,0x99121212,0x65121212
+};
+
+static const QRgb cut_inactive_data[] = {
+ 0x6000000,0x4000000,0x535b5b5b,0x73545454,0x2e353535,0x2000000,0x9000000,0x5000000,0x5000000,0x6000000,0x1f535353,0x4f787878,0x213f3f3f,0x7000000,
+ 0x3000000,0x411a1a1a,0x72313131,0x7d232323,0x68252525,0x441a1a1a,0x6000000,0xa000000,0xb000000,0x29494949,0x5d676767,0x71393939,0x59474747,0x1c2e2e2e,
+ 0x9000000,0x610a0a0a,0x7f1f1f1f,0x664a4a4a,0x7c5d5d5d,0x7f242424,0x481b1b1b,0xf000000,0x374b4b4b,0x706a6a6a,0x7f2e2e2e,0x7f282828,0x7f373737,0x4b272727,
+ 0x8000000,0x4e4c4c4c,0x7e4a4a4a,0x792b2b2b,0x4c2d2d2d,0x726d6d6d,0x7f252525,0x5d4c4c4c,0x6d4c4c4c,0x7f343434,0x46141414,0x35121212,0x62393939,0x5a191919,
+ 0x9000000,0x13000000,0x4d5f5f5f,0x7c4b4b4b,0x7c2f2f2f,0x71434343,0x7f404040,0x7f2b2b2b,0x7f161616,0x722b2b2b,0x53232323,0x57333333,0x7e4f4f4f,0x55272727,
+ 0x6000000,0xa000000,0x17000000,0x47606060,0x6a282828,0x762f2f2f,0x7f484848,0x7f6d6d6d,0x7f343434,0x7f1b1b1b,0x7b686868,0x7a747474,0x75707070,0x3d3e3e3e,
+ 0x3000000,0x6000000,0xd000000,0x15000000,0x2e030303,0x6d1d1d1d,0x7f707070,0x7ff7f7f7,0x7fa7a7a7,0x7f272727,0x53656565,0x4b747474,0x395d5d5d,0x1b080808,
+ 0x2000000,0x4000000,0xa000000,0x19000000,0x651f1f1f,0x7f757575,0x7f5a5a5a,0x7f919191,0x7ff2f2f2,0x7faeaeae,0x62000000,0x29000000,0x1f000000,0x15000000,
+ 0x2000000,0x7000000,0x12000000,0x63202020,0x7fa8a8a8,0x7fd1d1d1,0x7f717171,0x7f202020,0x7eafafaf,0x7ef9f9f9,0x7fb1b1b1,0x5f0f0f0f,0x1e000000,0x15000000,
+ 0x7000000,0xf000000,0x62202020,0x7fa8a8a8,0x7ff0f0f0,0x7faeaeae,0x6b1b1b1b,0x3e000000,0x6e2b2b2b,0x7fb7b7b7,0x7ff6f6f6,0x7faeaeae,0x5b101010,0x16000000,
+ 0x1000000,0x55171717,0x7f9a9a9a,0x7fe8e8e8,0x7fb9b9b9,0x7a2b2b2b,0x59171717,0x21000000,0x27000000,0x6d2d2d2d,0x7fbababa,0x7ff7f7f7,0x7faaaaaa,0x4c050505,
+ 0x3000000,0x5b161616,0x7fb6b6b6,0x7fbcbcbc,0x68202020,0x29000000,0x22000000,0x1c000000,0x18000000,0x1d000000,0x6b2e2e2e,0x7fc4c4c4,0x7fc1c1c1,0x53030303,
+ 0x0,0x601d1d1d,0x7f898989,0x662d2d2d,0x25030303,0x1d000000,0x17000000,0x11000000,0xe000000,0xf000000,0x18000000,0x693b3b3b,0x7f8d8d8d,0x57131313,
+ 0x2000000,0x32141414,0x4b101010,0x1c101010,0x15000000,0x12000000,0xd000000,0x7000000,0x5000000,0x7000000,0x9000000,0x16000000,0x4c121212,0x32121212
+};
+
+static const QRgb datebook_icon_data[] = {
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,
+ 0xff000000,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff00008b,0xff0000ff,0xff00008b,0xff0000ff,0xff00008b,0xff0000ff,0xff000000,0xff000000,
+ 0xff000000,0xff0000ff,0xff0000ff,0xff00008b,0xff0000ff,0xff00008b,0xff0000ff,0xff00008b,0xff0000ff,0xff00008b,0xff00008b,0xff00008b,0xff000000,0xff000000,
+ 0xff000000,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffa0a0a0,0xff000000,
+ 0xff000000,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffa0a0a0,0xff000000,
+ 0xff000000,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffa0a0a0,0xff000000,
+ 0xff000000,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffa0a0a0,0xff000000,
+ 0xff000000,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffa0a0a0,0xff000000,
+ 0xff000000,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffa0a0a0,0xff000000,
+ 0xff000000,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffc3c3c3,0xffa0a0a0,0xff000000,
+ 0xff000000,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffa0a0a0,0xff000000,
+ 0xff000000,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffc3c3c3,0xffffffff,0xffffffff,0xffa0a0a0,0xff000000,
+ 0x0,0xff000000,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xffa0a0a0,0xff000000,
+ 0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000
+};
+
+static const QRgb day_data[] = {
+ 0xe000000,0x18000000,0x23000000,0x2e000000,0x35000000,0x39000000,0x3b000000,0x3b000000,0x3b000000,0x39000000,0x35000000,0x2e000000,0x23000000,0x18000000,
+ 0x18000000,0xff7a7fbb,0xff6b71b3,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff454ca2,0xff0d1986,0x3d000000,0x2a000000,
+ 0x24000000,0xff6b71b3,0xff4a51a4,0xff303999,0xff303999,0xff303999,0xff303999,0xff303999,0xff303999,0xff303999,0xff0d1a8b,0xff0a146c,0x5a000000,0x3e000000,
+ 0x2e000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe5e5e5,0xffaeaeae,0x74000000,0x50000000,
+ 0x35000000,0xffffffff,0xffffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffe5e5e5,0xffaeaeae,0x86000000,0x5c000000,
+ 0x39000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xffe5e5e5,0xffaeaeae,0x90000000,0x63000000,
+ 0x3b000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xffe5e5e5,0xffaeaeae,0x95000000,0x66000000,
+ 0x3c000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xffe5e5e5,0xffaeaeae,0x96000000,0x67000000,
+ 0x3b000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xffe5e5e5,0xffaeaeae,0x95000000,0x66000000,
+ 0x39000000,0xffffffff,0xffffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffe5e5e5,0xffaeaeae,0x90000000,0x63000000,
+ 0x35000000,0xffffffff,0xfffdfdfd,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffd1d1d1,0xffa4a4a4,0x86000000,0x5c000000,
+ 0x2e000000,0xfff5f5f5,0xffc4c4c4,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffa4a4a4,0xff969696,0x74000000,0x50000000,
+ 0x24000000,0x3e000000,0x5a000000,0x74000000,0x86000000,0x90000000,0x95000000,0x96000000,0x95000000,0x90000000,0x86000000,0x74000000,0x5a000000,0x3e000000,
+ 0x18000000,0x2a000000,0x3d000000,0x4f000000,0x5c000000,0x63000000,0x66000000,0x67000000,0x66000000,0x63000000,0x5c000000,0x4f000000,0x3d000000,0x2a000000
+};
+
+static const QRgb done_data[] = {
+ 0xffffff,0xffffff,0xffffff,0x666da16d,0xba5f8a5f,0xeb4a704a,0xfd3c5e3c,0xeb3e6b3e,0xba428042,0x663f903f,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0x1b76b676,0x9d72a872,0xfd6a9a6a,0xff659765,0xff5f965f,0xff579457,0xff4c8f4c,0xff408a40,0xfd358735,0xa1369236,0x2b7bb87b,0xffffff,0xffffff,
+ 0xffffff,0x9d6ca56c,0xff6ca26c,0xff71ac71,0xff6db36d,0xff65b665,0xff5cb45c,0xff4fad4f,0xff3fa33f,0xff3d993d,0xff98a698,0xd28db18d,0xffffff,0xffffff,
+ 0x665c9a5c,0xfd5e965e,0xff69a969,0xff6cb96c,0xff62be62,0xff53bc53,0xff48b848,0xff3fb53f,0xff48b348,0xffb8c8b8,0xffbababa,0xffa6a8a6,0x9482ae82,0xffffff,
+ 0xba4a824a,0xff518f51,0xff63af63,0xff62bd62,0xff49ba49,0xff35b435,0xff29b129,0xff41b641,0xffcad9ca,0xffdadada,0xffc6c6c6,0xffaaaaaa,0xc7589158,0xffffff,
+ 0xeb346834,0xff438c43,0xff9fc19f,0xffbdd5bd,0xff39b639,0xff1aad1a,0xff37b337,0xffcddccd,0xffe2e2e2,0xffdedede,0xffcecece,0xff639063,0xe3006400,0xffffff,
+ 0xfd275727,0xff7c9a7c,0xffcfcfcf,0xffdfdfdf,0xffbad6ba,0xff45b645,0xffd0ddd0,0xffe2e2e2,0xffe2e2e2,0xffdfdfdf,0xff76ac76,0xff006a00,0xfc005c00,0xffffff,
+ 0xec226222,0xff889b88,0xffcccccc,0xffdedede,0xffe2e2e2,0xffdee1de,0xffe2e2e2,0xffe2e2e2,0xffe2e2e2,0xff7db77d,0xff007a00,0xff006100,0xe3005800,0xffffff,
+ 0xba107010,0xff137a13,0xffa0baa0,0xffdadada,0xffe0e0e0,0xffe1e1e1,0xffe2e2e2,0xffe1e1e1,0xff7eb87e,0xff007f00,0xff006b00,0xff005800,0xaf005800,0xffffff,
+ 0x66007d00,0xfd007400,0xff108310,0xffa7c0a7,0xffdadada,0xffdddddd,0xffdfdfdf,0xff7cb37c,0xff007a00,0xff006c00,0xff005c00,0xfd005000,0x60005b00,0xffffff,
+ 0xffffff,0x9d007900,0xff007000,0xff107810,0xff99b199,0xff98b498,0xff76a476,0xff006f00,0xff006500,0xff005900,0xff005000,0x9c005400,0xffffff,0xffffff,
+ 0xffffff,0x1b008000,0x9c007000,0xfd006200,0xff005f00,0xff005e00,0xff005a00,0xff005400,0xff004e00,0xfd004a00,0x9c005100,0x1b005f00,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0x60006900,0xaf005d00,0xe2005100,0xfc004a00,0xe2004a00,0xaf004c00,0x60005300,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff
+};
+
+static const QRgb edit_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3000000,0x36000000,0xff000000,0xff000000,0xff000000,0x2c000000,0x18000000,0x8000000,0x1000000,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0x1000000,0x3f000000,0xff000000,0xff882f2f,0xfff24545,0xffff0c0c,0xff000000,0x40000000,0x19000000,0x5000000,
+ 0xffffff,0xffffff,0xffffff,0x1000000,0x5000000,0x8f000000,0xff000000,0xff000000,0xff2d0000,0xff730000,0xff000000,0x68000000,0x2c000000,0xa000000,
+ 0xffffff,0xffffff,0xffffff,0x1000000,0x14000000,0xff000000,0xfff9f9a6,0xffffff93,0xff000000,0xff000000,0xff000000,0x79000000,0x36000000,0xd000000,
+ 0xffffff,0xffffff,0xffffff,0x4000000,0x78000000,0xff000000,0xffffffa4,0xffffff82,0xffd8d866,0xff000000,0xbe000000,0x71000000,0x31000000,0xb000000,
+ 0xffffff,0xffffff,0x1000000,0xd000000,0xff000000,0xffe3e394,0xffffff91,0xffdbdb67,0xff989848,0xff000000,0x92000000,0x58000000,0x21000000,0x7000000,
+ 0xffffff,0xffffff,0x4000000,0x62000000,0xff000000,0xffffff9f,0xffffff78,0xffb4b454,0xff000000,0xc4000000,0x79000000,0x3c000000,0x12000000,0x3000000,
+ 0xffffff,0x1000000,0x7000000,0xff000000,0xffc0c072,0xffffff7f,0xffc4c45c,0xff81813d,0xff000000,0x95000000,0x5b000000,0x24000000,0x8000000,0x1000000,
+ 0xffffff,0x1000000,0x35000000,0xff000000,0xffe7e76d,0xffb6b656,0xff919145,0xff000000,0xc9000000,0x7b000000,0x3d000000,0x13000000,0x4000000,0xffffff,
+ 0xffffff,0x2000000,0x11000000,0xff000000,0xff000000,0xff000000,0xff000000,0xfe000000,0xa0000000,0x5c000000,0x26000000,0xa000000,0x1000000,0xffffff,
+ 0xffffff,0x2000000,0x11000000,0xff000000,0xff000000,0xff000000,0xed000000,0xa6000000,0x73000000,0x3d000000,0x16000000,0x4000000,0x1000000,0xffffff,
+ 0x1000000,0x6000000,0x17000000,0xff000000,0xff000000,0xdc000000,0xa0000000,0x7b000000,0x4d000000,0x25000000,0xf000000,0x7000000,0x6000000,0x3000000,
+ 0x4000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x3d000000,0xff000000,0x19000000,0xff000000,0x14000000,0xb000000,
+ 0x6000000,0x17000000,0x37000000,0x67000000,0x70000000,0x78000000,0x6d000000,0x56000000,0x3d000000,0x2a000000,0x25000000,0x22000000,0x20000000,0x11000000
+};
+
+static const QRgb editdelete_data[] = {
+ 0x0,0x352424,0x9c6a6a,0xdd000000,0x0,0x5000000,0x0,0x0,0x0,0x0,0xde000000,0x784b4b,0x5000000,0x1000000,
+ 0x0,0x352424,0x8e2e1e1e,0xdf875959,0x90000000,0x0,0x4000000,0x0,0x0,0x8b000000,0xdf8a6565,0x93201616,0x4000000,0xa000000,
+ 0x0,0x8f352424,0xff9a7171,0xf7e59393,0xf38e5050,0xa2000000,0x1000000,0x0,0x98000000,0xeca37d7d,0xf6eba4a4,0xff925252,0xaa000000,0x181a0f0f,
+ 0xdc000000,0xdf875a5a,0xf6e59393,0xffda8282,0xf7d77979,0xf8894d4d,0x8b050303,0x8a080606,0xeda37d7d,0xf4eca9a9,0xffd27a7a,0xfaa35c5c,0xfc522f2f,0x88050303,
+ 0x1000000,0x90000000,0xf38f5050,0xf8d77a7a,0xffd57878,0xf6db7d7d,0xf17a4949,0xea8a6969,0xf1eda8a8,0xffd27a7a,0xfb9a5656,0xfb4e2b2b,0xbe000000,0x2e000000,
+ 0x3000000,0x0,0xa2000000,0xf9874c4c,0xf6db7e7e,0xffd57a7a,0xfddd8989,0xfee19393,0xffd07a7a,0xf99e5858,0xfb4c2a2a,0xc5000000,0x48000000,0x22000000,
+ 0x0,0x4000000,0x1000000,0x8a000000,0xf27a4848,0xfcdd8888,0xffd77d7d,0xffd67878,0xfdb76767,0xf6472828,0xb8000000,0x4e000000,0x29000000,0xb000000,
+ 0x0,0x0,0x0,0x88000000,0xea896a6a,0xfce19292,0xffd67979,0xffd17575,0xfdc46e6e,0xf5693c3c,0xb6000000,0x27000000,0x11000000,0x1000000,
+ 0x0,0x0,0x95000000,0xeda17c7c,0xf2eea9a9,0xffd17a7a,0xfeb76666,0xfec46e6e,0xffd17676,0xf8cf7575,0xf5834a4a,0xa8000000,0x2000000,0x4000000,
+ 0x0,0x8e000000,0xeca47d7d,0xf4eca9a9,0xffd27a7a,0xf99e5858,0xf6472828,0xf6693c3c,0xf9d07575,0xffd77a7a,0xf9d27777,0xf6824a4a,0xa2000000,0x2000000,
+ 0xdc000000,0xd7896262,0xf3eba4a4,0xffd27a7a,0xfa9a5656,0xfa4d2b2b,0xb8000000,0xb6050303,0xf6854b4b,0xf9d27777,0xffc77070,0xf8ae6363,0xf6603636,0x81000000,
+ 0x0,0x8d000000,0xff985656,0xfaa45c5c,0xfa4e2d2d,0xc5000000,0x4e000000,0x28000000,0xa8000000,0xf6824949,0xf9af6262,0xff663838,0xbc000000,0x29000000,
+ 0x2000000,0x0,0xa5000000,0xf6522f2f,0xbc000000,0x46000000,0x29000000,0x10000000,0x2000000,0xa3000000,0xf75d3434,0xbc000000,0x4c000000,0x2a000000,
+ 0x1000000,0x7000000,0xb000000,0x84000000,0x28000000,0x21000000,0xb000000,0x0,0x3000000,0x3000000,0x81000000,0x29000000,0x29000000,0x11000000
+};
+
+static const QRgb enter_data[] = {
+ 0xffffff,0xffffff,0xffffff,0x666da16d,0xba5f8a5f,0xeb4a704a,0xfd3c5e3c,0xeb3e6b3e,0xba428042,0x663f903f,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0x1b76b676,0x9d72a872,0xfd6a9a6a,0xff659765,0xff5f965f,0xff579457,0xff4c8f4c,0xff408a40,0xfd358735,0xa1369236,0x2b7bb87b,0xffffff,0xffffff,
+ 0xffffff,0x9d6ca56c,0xff6ca26c,0xff71ac71,0xff6db36d,0xff65b665,0xff5cb45c,0xff4fad4f,0xff3fa33f,0xff3d993d,0xff98a698,0xd28db18d,0xffffff,0xffffff,
+ 0x665c9a5c,0xfd5e965e,0xff69a969,0xff6cb96c,0xff62be62,0xff53bc53,0xff48b848,0xff3fb53f,0xff48b348,0xffb8c8b8,0xffbababa,0xffa6a8a6,0x9482ae82,0xffffff,
+ 0xba4a824a,0xff518f51,0xff63af63,0xff62bd62,0xff49ba49,0xff35b435,0xff29b129,0xff41b641,0xffcad9ca,0xffdadada,0xffc6c6c6,0xffaaaaaa,0xc7589158,0xffffff,
+ 0xeb346834,0xff438c43,0xff9fc19f,0xffbdd5bd,0xff39b639,0xff1aad1a,0xff37b337,0xffcddccd,0xffe2e2e2,0xffdedede,0xffcecece,0xff639063,0xe3006400,0xffffff,
+ 0xfd275727,0xff7c9a7c,0xffcfcfcf,0xffdfdfdf,0xffbad6ba,0xff45b645,0xffd0ddd0,0xffe2e2e2,0xffe2e2e2,0xffdfdfdf,0xff76ac76,0xff006a00,0xfc005c00,0xffffff,
+ 0xec226222,0xff889b88,0xffcccccc,0xffdedede,0xffe2e2e2,0xffdee1de,0xffe2e2e2,0xffe2e2e2,0xffe2e2e2,0xff7db77d,0xff007a00,0xff006100,0xe3005800,0xffffff,
+ 0xba107010,0xff137a13,0xffa0baa0,0xffdadada,0xffe0e0e0,0xffe1e1e1,0xffe2e2e2,0xffe1e1e1,0xff7eb87e,0xff007f00,0xff006b00,0xff005800,0xaf005800,0xffffff,
+ 0x66007d00,0xfd007400,0xff108310,0xffa7c0a7,0xffdadada,0xffdddddd,0xffdfdfdf,0xff7cb37c,0xff007a00,0xff006c00,0xff005c00,0xfd005000,0x60005b00,0xffffff,
+ 0xffffff,0x9d007900,0xff007000,0xff107810,0xff99b199,0xff98b498,0xff76a476,0xff006f00,0xff006500,0xff005900,0xff005000,0x9c005400,0xffffff,0xffffff,
+ 0xffffff,0x1b008000,0x9c007000,0xfd006200,0xff005f00,0xff005e00,0xff005a00,0xff005400,0xff004e00,0xfd004a00,0x9c005100,0x1b005f00,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0x60006900,0xaf005d00,0xe2005100,0xfc004a00,0xe2004a00,0xaf004c00,0x60005300,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff
+};
+
+static const unsigned char exec_data[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x01,0x02,0x02,0x01,0x00,0x01,
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x03,0x01,0x03,0x04,0x04,0x03,
+ 0x01,0x03,0x02,0x01,0x00,0x00,0x00,0x00,0x01,0x03,0x02,0x05,0x03,0x06,
+ 0x06,0x03,0x05,0x02,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x05,0x06,
+ 0x06,0x07,0x06,0x07,0x06,0x05,0x01,0x00,0x00,0x00,0x00,0x01,0x01,0x02,
+ 0x03,0x06,0x07,0x05,0x05,0x06,0x07,0x03,0x02,0x01,0x01,0x00,0x01,0x02,
+ 0x04,0x03,0x06,0x07,0x06,0x03,0x03,0x07,0x08,0x06,0x03,0x04,0x02,0x01,
+ 0x01,0x05,0x03,0x02,0x05,0x07,0x08,0x07,0x07,0x09,0x08,0x05,0x02,0x03,
+ 0x05,0x01,0x00,0x01,0x0a,0x0a,0x02,0x05,0x07,0x08,0x09,0x07,0x05,0x02,
+ 0x0a,0x0a,0x01,0x00,0x00,0x00,0x01,0x05,0x04,0x02,0x02,0x05,0x05,0x02,
+ 0x02,0x04,0x05,0x01,0x00,0x00,0x00,0x01,0x03,0x09,0x05,0x0a,0x05,0x02,
+ 0x02,0x05,0x0a,0x05,0x09,0x03,0x01,0x00,0x00,0x01,0x02,0x03,0x0a,0x01,
+ 0x01,0x03,0x03,0x01,0x01,0x0a,0x03,0x02,0x01,0x00,0x00,0x00,0x01,0x01,
+ 0x01,0x00,0x01,0x02,0x09,0x01,0x00,0x01,0x01,0x01,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x01,0x0a,0x05,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00
+};
+
+static const QRgb exec_ctable[] = {
+ 0xc6c6c6,0xff000000,0xffdcdcdc,0xffa0a0a0,0xffc3c3c3,0xff808080,0xffffa858,0xffffdca8,0xffffffc0,0xffffffff,0xff585858
+};
+
+static const unsigned char faded_bg_data[] = {
+ 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x08,0x0b,0x04,0x05,
+ 0x03,0x07,0x08,0x0a,0x0c,0x0d,0x01,0x03,0x0e,0x0e,0x03,0x01,0x0a,0x0f,
+ 0x10,0x0f,0x09,0x08,0x07,0x02,0x11,0x12,0x12,0x0b,0x13,0x0d,0x14,0x09,
+ 0x08,0x02,0x03,0x03,0x07,0x08,0x0a,0x14,0x15,0x0a,0x01,0x03,0x04,0x04,
+ 0x0b,0x08,0x14,0x0f,0x0f,0x0a,0x16,0x17,0x11,0x0b,0x02,0x02,0x02,0x17,
+ 0x08,0x0a,0x14,0x0a,0x08,0x17,0x0b,0x07,0x18,0x0d,0x14,0x15,0x19,0x1a,
+ 0x01,0x11,0x06,0x06,0x02,0x08,0x14,0x14,0x0d,0x01,0x0b,0x12,0x06,0x11,
+ 0x07,0x07,0x07,0x1b,0x08,0x0a,0x0c,0x0a,0x08,0x17,0x07,0x1b,0x08,0x1a,
+ 0x0a,0x0a,0x0d,0x08,0x1b,0x0b,0x03,0x03,0x07,0x08,0x0d,0x08,0x1b,0x03,
+ 0x05,0x04,0x04,0x11,0x07,0x07,0x07,0x1b,0x08,0x1a,0x0d,0x08,0x13,0x17,
+ 0x07,0x17,0x1b,0x01,0x13,0x13,0x13,0x01,0x17,0x02,0x11,0x11,0x02,0x1b,
+ 0x13,0x17,0x03,0x1c,0x1d,0x1d,0x03,0x0b,0x17,0x17,0x17,0x1b,0x13,0x08,
+ 0x08,0x13,0x17,0x0b,0x11,0x03,0x03,0x12,0x11,0x0b,0x02,0x02,0x07,0x02,
+ 0x02,0x0b,0x02,0x07,0x17,0x0b,0x04,0x1d,0x1d,0x0e,0x02,0x01,0x18,0x18,
+ 0x13,0x01,0x1b,0x1b,0x1b,0x17,0x0b,0x03,0x04,0x0e,0x0e,0x0e,0x05,0x04,
+ 0x03,0x03,0x0b,0x02,0x02,0x02,0x02,0x07,0x07,0x02,0x03,0x04,0x1e,0x12,
+ 0x08,0x1a,0x0d,0x0d,0x08,0x13,0x1b,0x17,0x17,0x02,0x12,0x04,0x1d,0x1f,
+ 0x1d,0x1d,0x0e,0x04,0x03,0x03,0x0b,0x02,0x07,0x07,0x07,0x17,0x1b,0x17,
+ 0x07,0x07,0x17,0x01,0x0a,0x0c,0x14,0x0c,0x0d,0x16,0x1b,0x17,0x07,0x02,
+ 0x03,0x04,0x1d,0x1d,0x1c,0x04,0x03,0x0b,0x07,0x07,0x02,0x02,0x07,0x07,
+ 0x17,0x17,0x1b,0x13,0x18,0x08,0x1a,0x0d,0x0c,0x14,0x19,0x0a,0x08,0x13,
+ 0x17,0x07,0x07,0x02,0x03,0x04,0x1c,0x1c,0x1e,0x0b,0x01,0x08,0x08,0x13,
+ 0x20,0x07,0x07,0x17,0x17,0x17,0x1b,0x13,0x08,0x1a,0x0d,0x09,0x1a,0x1a,
+ 0x1a,0x08,0x13,0x17,0x02,0x11,0x11,0x11,0x03,0x21,0x1c,0x04,0x0b,0x18,
+ 0x09,0x14,0x0c,0x22,0x01,0x07,0x17,0x1b,0x1b,0x1b,0x1b,0x1b,0x13,0x13,
+ 0x08,0x08,0x17,0x17,0x1b,0x1b,0x17,0x0b,0x03,0x06,0x06,0x1e,0x21,0x1d,
+ 0x1d,0x04,0x1b,0x0a,0x0f,0x0f,0x0c,0x08,0x07,0x0b,0x02,0x1b,0x01,0x01,
+ 0x17,0x07,0x07,0x07,0x07,0x07,0x03,0x12,0x02,0x07,0x07,0x11,0x04,0x1c,
+ 0x1c,0x1c,0x1d,0x1d,0x21,0x0b,0x1a,0x15,0x0f,0x14,0x22,0x07,0x03,0x04,
+ 0x11,0x17,0x08,0x16,0x1b,0x02,0x03,0x03,0x1e,0x1e,0x05,0x03,0x07,0x17,
+ 0x07,0x03,0x0e,0x1d,0x1d,0x1c,0x0e,0x04,0x0b,0x08,0x14,0x0f,0x15,0x1a,
+ 0x17,0x1e,0x1d,0x1d,0x03,0x20,0x08,0x08,0x1b,0x0b,0x1e,0x1d,0x1d,0x1d,
+ 0x06,0x02,0x01,0x13,0x17,0x03,0x0e,0x1d,0x1c,0x04,0x11,0x17,0x08,0x14,
+ 0x0f,0x15,0x0d,0x1b,0x03,0x1c,0x1f,0x1d,0x03,0x13,0x0d,0x1a,0x01,0x11,
+ 0x21,0x1f,0x1d,0x0e,0x0b,0x13,0x22,0x08,0x1b,0x03,0x0e,0x1d,0x04,0x11,
+ 0x13,0x0d,0x15,0x0f,0x15,0x0a,0x13,0x02,0x03,0x1c,0x1d,0x21,0x02,0x08,
+ 0x0a,0x0d,0x13,0x11,0x0e,0x1f,0x1c,0x1e,0x23,0x0d,0x0c,0x0d,0x13,0x12,
+ 0x21,0x0e,0x03,0x01,0x0a,0x0f,0x0f,0x15,0x0d,0x13,0x17,0x02,0x03,0x06,
+ 0x06,0x24,0x1b,0x1a,0x0c,0x0a,0x18,0x11,0x04,0x0e,0x03,0x07,0x0a,0x0c,
+ 0x14,0x0a,0x13,0x0b,0x04,0x04,0x0b,0x08,0x14,0x0f,0x14,0x1a,0x1b,0x02,
+ 0x0b,0x0b,0x0b,0x0b,0x0b,0x07,0x08,0x0a,0x14,0x0a,0x18,0x0b,0x03,0x03,
+ 0x07,0x08,0x0c,0x14,0x14,0x0d,0x13,0x02,0x03,0x03,0x02,0x08,0x09,0x09,
+ 0x08,0x17,0x03,0x03,0x03,0x0b,0x07,0x07,0x07,0x1b,0x08,0x0a,0x14,0x0a,
+ 0x18,0x07,0x0b,0x07,0x18,0x0d,0x0a,0x0a,0x0a,0x08,0x13,0x02,0x03,0x03,
+ 0x02,0x13,0x08,0x08,0x07,0x1e,0x1c,0x1c,0x06,0x11,0x07,0x07,0x17,0x01,
+ 0x08,0x0a,0x09,0x0d,0x13,0x07,0x07,0x01,0x08,0x0d,0x08,0x08,0x16,0x13,
+ 0x1b,0x07,0x0b,0x11,0x02,0x17,0x1b,0x07,0x03,0x1d,0x1f,0x1d,0x06,0x0b,
+ 0x07,0x17,0x17,0x1b,0x16,0x22,0x1a,0x08,0x01,0x17,0x17,0x1b,0x01,0x18,
+ 0x0b,0x02,0x02,0x07,0x07,0x07,0x02,0x02,0x02,0x07,0x07,0x0b,0x06,0x1c,
+ 0x1d,0x05,0x03,0x07,0x1b,0x01,0x1b,0x1b,0x01,0x13,0x13,0x1b,0x07,0x0b,
+ 0x0b,0x11,0x11,0x0b,0x04,0x06,0x03,0x11,0x0b,0x02,0x07,0x07,0x07,0x17,
+ 0x17,0x07,0x0b,0x03,0x12,0x02,0x1b,0x16,0x08,0x08,0x08,0x01,0x1b,0x17,
+ 0x17,0x02,0x12,0x06,0x05,0x21,0x21,0x21,0x1c,0x04,0x06,0x03,0x0b,0x02,
+ 0x07,0x07,0x17,0x17,0x1b,0x1b,0x1b,0x1b,0x13,0x08,0x1a,0x0a,0x0a,0x0a,
+ 0x22,0x13,0x17,0x07,0x11,0x06,0x21,0x1d,0x1f,0x1f,0x1d,0x1d,0x03,0x11,
+ 0x02,0x02,0x02,0x02,0x07,0x07,0x17,0x17,0x1b,0x13,0x08,0x08,0x0d,0x0a,
+ 0x19,0x14,0x14,0x0c,0x1a,0x13,0x17,0x11,0x1e,0x1d,0x25,0x26,0x25,0x1d,
+ 0x0e,0x04,0x17,0x13,0x08,0x13,0x17,0x07,0x07,0x17,0x17,0x17,0x1b,0x01,
+ 0x08,0x08,0x0d,0x0a,0x0a,0x0a,0x0a,0x0d,0x08,0x1b,0x0b,0x06,0x1d,0x26,
+ 0x26,0x1f,0x0e,0x04,0x03,0x0b,0x0d,0x19,0x0c,0x1a,0x13,0x17,0x17,0x1b,
+ 0x1b,0x1b,0x17,0x17,0x1b,0x1b,0x13,0x13,0x08,0x08,0x08,0x13,0x01,0x07,
+ 0x03,0x0e,0x27,0x26,0x1d,0x21,0x03,0x0b,0x20,0x08,0x0f,0x0f,0x14,0x08,
+ 0x17,0x0b,0x02,0x1b,0x01,0x01,0x17,0x07,0x0b,0x0b,0x11,0x11,0x0b,0x02,
+ 0x07,0x17,0x07,0x0b,0x04,0x1d,0x26,0x1f,0x04,0x12,0x07,0x01,0x08,0x09,
+ 0x10,0x0f,0x0d,0x1b,0x03,0x06,0x11,0x17,0x16,0x13,0x1b,0x0b,0x03,0x04,
+ 0x21,0x21,0x04,0x03,0x02,0x17,0x07,0x03,0x0e,0x25,0x1f,0x0e,0x03,0x07,
+ 0x01,0x08,0x0c,0x0f,0x0f,0x0a,0x01,0x03,0x1c,0x1d,0x03,0x17,0x08,0x08,
+ 0x1b,0x0b,0x04,0x1d,0x1d,0x1d,0x04,0x12,0x17,0x1b,0x07,0x03,0x1d,0x25,
+ 0x1d,0x06,0x02,0x01,0x08,0x09,0x0f,0x10,0x0a,0x13,0x11,0x0e,0x1f,0x1d,
+ 0x03,0x1b,0x1a,0x1a,0x13,0x0b,0x21,0x1d,0x1d,0x0e,0x03,0x17,0x08,0x08,
+ 0x20,0x03,0x1d,0x1d,0x05,0x12,0x1b,0x08,0x0c,0x0f,0x10,0x15,0x08,0x17,
+ 0x03,0x1c,0x1d,0x0e,0x0b,0x18,0x0a,0x0d,0x18,0x0b,0x21,0x1d,0x21,0x03,
+ 0x17,0x08,0x0d,0x1a,0x1b,0x03,0x1c,0x1d,0x06,0x07,0x08,0x09,0x0f,0x10,
+ 0x15,0x0a
+};
+
+static const QRgb faded_bg_ctable[] = {
+ 0xc6c6c6,0xffb5c5c1,0xffb6c7c3,0xffb7c9c4,0xffb8cac5,0xffb8cac6,0xffb7c9c5,0xffb6c7c2,0xffb3c4c0,0xffb2c2be,0xffb3c2be,0xffb6c8c3,0xffb2c1be,0xffb3c3be,
+ 0xffb8cbc7,0xffb1c0bc,0xffb1bfbc,0xffb6c8c4,0xffb6c9c4,0xffb4c5c1,0xffb1c1bd,0xffb1c1bc,0xffb3c4c1,0xffb5c7c2,0xffb4c4c1,0xffb1c1be,0xffb3c3bf,0xffb5c6c1,
+ 0xffb9cbc7,0xffb9ccc7,0xffb7cac5,0xffb9ccc8,0xffb5c6c2,0xffb8cbc6,0xffb3c4bf,0xffb3c5c1,0xffb7c8c4,0xffb9cdc8,0xffbacdc9,0xffbacdc8
+};
+
+static const QRgb fastback_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xff000000,0xffffff,0xffffff,0xffffff,0xffffff,0x7a6c7375,0xff000000,0xff000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xff000000,0xffffff,0xffffff,0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xff000000,0x6b000000,0x24000000,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xff000000,0xffffff,0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xfffcfcfc,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xff000000,0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xffffffff,0xfff8f8f8,0xff000000,0xff000000,0xff000000,0xff000000,0x24000000,0xc000000,
+ 0xffffff,0xff000000,0x7a6c7375,0xfc202323,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xffffffff,0xffffffff,0xfff5f5f5,0xff000000,0x6b000000,0x24000000,
+ 0xffffff,0xff000000,0xe0494e4f,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff6f6f6,0xfff6f6f6,0xffeeeeee,0xffd3d3d3,0xff000000,0x8f000000,0x30000000,
+ 0xffffff,0xff000000,0x69666c6d,0xfd202323,0xfffcfcfc,0xfffcfcfc,0xfff4f4f4,0xffdddddd,0xffcccccc,0xffc9c9c9,0xffc9c9c9,0xff000000,0x8f000000,0x30000000,
+ 0xffffff,0xff000000,0xd000000,0x83565b5c,0xfd202223,0xfff4f4f4,0xffededed,0xffcccccc,0xff000000,0xff000000,0xff000000,0xff000000,0x8f000000,0x30000000,
+ 0xffffff,0xff000000,0x2000000,0x14000000,0x8852585a,0xfe202324,0xffe8e8e8,0xffcbcbcb,0xff000000,0xb3000000,0x9b000000,0x8f000000,0x6b000000,0x24000000,
+ 0xffffff,0xff000000,0xffffff,0x2000000,0x14000000,0x8852585a,0xfe202324,0xffd3d3d3,0xff000000,0x9b000000,0x54000000,0x30000000,0x24000000,0xc000000,
+ 0xffffff,0xff000000,0xffffff,0xffffff,0x2000000,0x14000000,0x8852585a,0xff000000,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x2000000,0x14000000,0x45000000,0x7b000000,0x6b000000,0x24000000,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x2000000,0x10000000,0x26000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff
+};
+
+static const QRgb fastforward_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0x8d606667,0x13000000,0x3000000,0xffffff,0xffffff,0xff000000,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xfd202223,0x9f575d5e,0x18000000,0x3000000,0xffffff,0xff000000,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xfe202324,0xa0575c5d,0x18000000,0x3000000,0xff000000,0xffffff,0xffffff,
+ 0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xffffffff,0xffffffff,0xfff4f4f4,0xfe202324,0xa0575c5d,0x18000000,0xff000000,0xffffff,0xffffff,
+ 0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff7f7f7,0xffededed,0xfe202324,0xa0575c5d,0xff000000,0x3000000,0xffffff,
+ 0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffeeeeee,0xffd6d6d6,0xffd1d1d1,0xef464a4b,0xff000000,0xe000000,0xffffff,
+ 0xffffff,0xff000000,0xfff5f5f5,0xffe1e1e1,0xffe9e9e9,0xfff9f9f9,0xffefefef,0xffd1d1d1,0xffc9c9c9,0xfe202323,0xc13e4142,0xff000000,0x15000000,0xffffff,
+ 0x1000000,0xff000000,0xff000000,0xff000000,0xff000000,0xfff8f8f8,0xffd8d8d8,0xffc9c9c9,0xfe202323,0xcd3c3f3f,0x82000000,0xff000000,0xd000000,0xffffff,
+ 0xffffff,0x24000000,0x6b000000,0x8f000000,0xff000000,0xfff4f4f4,0xffc9c9c9,0xfe202323,0xcd3c3f3f,0x85000000,0x45000000,0xff000000,0x2000000,0xffffff,
+ 0xffffff,0xc000000,0x24000000,0x30000000,0xff000000,0xffe9e9e9,0xfe202323,0xcd3c3f3f,0x85000000,0x45000000,0x14000000,0xff000000,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0xce3b3e3f,0x86000000,0x45000000,0x14000000,0x2000000,0xff000000,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0x24000000,0x6b000000,0x7b000000,0x45000000,0x14000000,0x2000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x24000000,0x26000000,0x10000000,0x2000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff
+};
+
+static const QRgb fileopen_data[] = {
+ 0x5000000,0x8000000,0xb000000,0xd000000,0xd000000,0xb000000,0x8000000,0x5000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xf000000,0x19000000,0x24000000,0x29000000,0x29000000,0x24000000,0x1b000000,0x10000000,0x9000000,0x3000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0x20000000,0x43000000,0x72000000,0x87000000,0x89000000,0x79000000,0x53000000,0x36000000,0x2b000000,0x23000000,0x1b000000,0x17000000,0x11000000,0xa000000,
+ 0x39000000,0x84000000,0xffb6b6b6,0xffb6b6b6,0xffb4b4b4,0xffb0b0b0,0xab000000,0x7b000000,0x67000000,0x5a000000,0x4d000000,0x3e000000,0x2e000000,0x1b000000,
+ 0x5b000000,0xc9464646,0xffb6b6b6,0xffb6b6b6,0xffb0b0b0,0xffa9a9a9,0xfa676767,0xd8000000,0xca000000,0xc1000000,0xad000000,0x89000000,0x5f000000,0x39000000,
+ 0x74000000,0xdc414141,0xffb6b6b6,0xffb3b3b3,0xffababab,0xff9d9d9d,0xff878787,0xff696969,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x56000000,
+ 0x85000000,0xe83e3e3e,0xffb4b4b4,0xffadadad,0xff9e9e9e,0xff888888,0xff656565,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xb4000000,0x6e000000,
+ 0x91000000,0xef3b3b3b,0xffadadad,0xffa1a1a1,0xff8c8c8c,0xff6a6a6a,0xff3c3c3c,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xc0000000,0x77000000,
+ 0x92000000,0xf0393939,0xffa7a7a7,0xff959595,0xff777777,0xff4c4c4c,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xf8000000,0xc0000000,0x77000000,
+ 0x89000000,0xe93d3d3d,0xff9b9b9b,0xff858585,0xff8b8b8b,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xf1000000,0xb2000000,0x6b000000,
+ 0x78000000,0xd83c3c3c,0xfeb3b3b3,0xffb6b6b6,0xffbcbcbc,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfd000000,0xdd000000,0x9b000000,0x59000000,
+ 0x5d000000,0x9d000000,0xd7000000,0xf7000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xfa000000,0xe4000000,0xaf000000,0x73000000,0x3c000000,
+ 0x3e000000,0x65000000,0x92000000,0xb6000000,0xd0000000,0xe1000000,0xe8000000,0xe7000000,0xdf000000,0xcc000000,0xa9000000,0x7a000000,0x4b000000,0x25000000,
+ 0x26000000,0x41000000,0x5f000000,0x7a000000,0x90000000,0xa2000000,0xaa000000,0xa9000000,0x9e000000,0x8a000000,0x6b000000,0x48000000,0x2a000000,0x14000000
+};
+
+static const QRgb find_data[] = {
+ 0x1ffffff,0x42141414,0x9c131313,0xe1171717,0xe21a1a1a,0xe21a1a1a,0xe1171717,0x9c131313,0x42141414,0x1ffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0x42141414,0xcf1a1a1a,0xff666867,0xffb2b6b4,0xffe3e7e5,0xffe0e6e3,0xffadb4b1,0xff626665,0xd01a1a1a,0x44131313,0x1000000,0x1000000,0xffffff,0xffffff,
+ 0x9c131313,0xff656767,0xf6dfe3e2,0xfff8fcfa,0xfff7fbf9,0xfff3faf8,0xfff1f8f6,0xf6d6dfdb,0xff606362,0xa0131313,0x82e2e2e,0x4000000,0x1000000,0x1000000,
+ 0xe1171717,0xffb0b5b2,0xfff6faf9,0xfff6fbfa,0xfff3faf8,0xfff2f9f7,0xfff0f8f6,0xffe6efec,0xff9ca4a2,0xe4161616,0x11191919,0x9000000,0x4000000,0x1000000,
+ 0xe21a1a1a,0xffdde5e2,0xfff3f9f7,0xfff2f9f7,0xffeef8f3,0xffebf7f3,0xffe7f1ed,0xffdce4e1,0xffbac3bf,0xe61a1a1a,0x1e101010,0x11000000,0x9000000,0x4000000,
+ 0xe31a1a1a,0xffd9e3df,0xffeff8f4,0xffeef8f4,0xffe8f4f0,0xffe4efeb,0xffdde6e3,0xffd0d7d5,0xffaeb6b4,0xe9191919,0x300c0c0c,0x1c000000,0xf000000,0x7000000,
+ 0xe2171717,0xffa6adac,0xffe5eeeb,0xffe4edea,0xffdee7e4,0xffd8e1de,0xffd1d8d7,0xffc5ccca,0xff878d8b,0xec161616,0x41080808,0x28000000,0x16000000,0xa000000,
+ 0xa1131313,0xff5c615f,0xf8c0c8c5,0xffd1dad7,0xffccd4d1,0xffc6cdcb,0xffc5ccca,0xfbabb2af,0xff505351,0xdc0a0a0a,0x76050505,0x33000000,0x1c000000,0xd000000,
+ 0x4c121212,0xd41a1a1a,0xff575a59,0xff8c928f,0xffa9b1ae,0xffa9b1ae,0xff878d8b,0xff505351,0xed312923,0xdb937c6b,0xf3000000,0x64000000,0x20000000,0xe000000,
+ 0xf1b1b1b,0x5a101010,0xb1121212,0xec161616,0xef191919,0xf2191919,0xf4161616,0xe50a0a0a,0xe4634935,0xffc1906b,0xe0c8b2a4,0xf0000000,0x51000000,0xe000000,
+ 0xd000000,0x1c000000,0x340a0a0a,0x50060606,0x6d050505,0x82050505,0x8f050505,0xc0030303,0xec0a0605,0xf257402e,0xffc49471,0xc9c1ad9e,0xee000000,0x42000000,
+ 0xa000000,0x16000000,0x28000000,0x40000000,0x58000000,0x6c000000,0x77000000,0x77000000,0xac000000,0xe3000000,0xe6523d2b,0xffc2916d,0xc1c2a895,0xed000000,
+ 0x7000000,0xf000000,0x1c000000,0x2e000000,0x40000000,0x4f000000,0x58000000,0x58000000,0x4f000000,0x93000000,0xdd000000,0xde614734,0xdcaf805e,0xa0000000,
+ 0x4000000,0x9000000,0x11000000,0x1c000000,0x28000000,0x33000000,0x38000000,0x38000000,0x33000000,0x28000000,0x7f000000,0xd8000000,0xb4000000,0x71000000
+};
+
+static const QRgb finish_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0x8d606667,0x13000000,0x3000000,0xffffff,0xffffff,0xff000000,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xfd202223,0x9f575d5e,0x18000000,0x3000000,0xffffff,0xff000000,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xfe202324,0xa0575c5d,0x18000000,0x3000000,0xff000000,0xffffff,0xffffff,
+ 0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xffffffff,0xffffffff,0xfff4f4f4,0xfe202324,0xa0575c5d,0x18000000,0xff000000,0xffffff,0xffffff,
+ 0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff7f7f7,0xffededed,0xfe202324,0xa0575c5d,0xff000000,0x3000000,0xffffff,
+ 0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffeeeeee,0xffd6d6d6,0xffd1d1d1,0xef464a4b,0xff000000,0xe000000,0xffffff,
+ 0xffffff,0xff000000,0xfff5f5f5,0xffe1e1e1,0xffe9e9e9,0xfff9f9f9,0xffefefef,0xffd1d1d1,0xffc9c9c9,0xfe202323,0xc13e4142,0xff000000,0x15000000,0xffffff,
+ 0x1000000,0xff000000,0xff000000,0xff000000,0xff000000,0xfff8f8f8,0xffd8d8d8,0xffc9c9c9,0xfe202323,0xcd3c3f3f,0x82000000,0xff000000,0xd000000,0xffffff,
+ 0xffffff,0x24000000,0x6b000000,0x8f000000,0xff000000,0xfff4f4f4,0xffc9c9c9,0xfe202323,0xcd3c3f3f,0x85000000,0x45000000,0xff000000,0x2000000,0xffffff,
+ 0xffffff,0xc000000,0x24000000,0x30000000,0xff000000,0xffe9e9e9,0xfe202323,0xcd3c3f3f,0x85000000,0x45000000,0x14000000,0xff000000,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0xce3b3e3f,0x86000000,0x45000000,0x14000000,0x2000000,0xff000000,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0x24000000,0x6b000000,0x7b000000,0x45000000,0x14000000,0x2000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x24000000,0x26000000,0x10000000,0x2000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff
+};
+
+static const QRgb folder_data[] = {
+ 0x1000000,0x4000000,0x7000000,0x19000000,0x11000000,0x2c000000,0x19000000,0x19000000,0x16000000,0x13000000,0xe000000,0xa000000,0x7000000,0x4000000,
+ 0x5000000,0xa000000,0x5d2d2d2d,0xca4f4f4f,0xf54e584d,0xfe808c7f,0xb02a312a,0x40000000,0x2c000000,0x26000000,0x1f000000,0x19000000,0x13000000,0xd000000,
+ 0xc000000,0x15000000,0x9c2f2e2e,0xffc3c2c2,0xffa2a3a2,0xff868686,0xff939592,0xfa858f83,0xbb293029,0xc4373e35,0xe22a302a,0x7b000000,0x82000000,0x1a000000,
+ 0xc04e5a4e,0xc64c584b,0xcd1b1a1a,0xff857a7a,0xffb6b3b3,0xffcac9c9,0xffa8a8a8,0xff868786,0xff888f88,0xffb2bcb1,0xffc3c9c2,0xfc919e90,0xc44b5449,0x63000000,
+ 0xff8a9d88,0xffd3ebd1,0xfaa0b69e,0xfa595c54,0xff594c4c,0xff6f6666,0xffb6b3b3,0xffcbcaca,0xffa4a5a4,0xff7b827b,0xff8d9b8c,0xffb6c5b5,0xfe92a791,0x9f1a201a,
+ 0xc31e221e,0xffc2dbc1,0xffd1e9cf,0xffc9e1c7,0xff9fb59e,0xff91978c,0xff5a4d4d,0xff6f6666,0xffb6b3b3,0xffc9c8c8,0xff9ea39e,0xff5d685d,0xff87a385,0xaf1b221b,
+ 0x41000000,0xf4748673,0xffcde6cc,0xffc9e0c7,0xffc4dac2,0xffbad1b8,0xff90a58f,0xff8d9187,0xff5d5251,0xff6f6767,0xffbdbbbb,0xff878d87,0xff5d6f5c,0xb4171d17,
+ 0x25000000,0xae171a16,0xffbcd2bb,0xffc4dcc3,0xffbfd5bd,0xffbad0b8,0xffb5cab3,0xffaabfa9,0xff849682,0xff8a8f85,0xff5e5958,0xff898b89,0xff606c5e,0xba131713,
+ 0x1f000000,0x49000000,0xf46a7a69,0xffbcd2bb,0xffbbd1b9,0xffb6cbb4,0xffb0c5af,0xffacbfaa,0xffa6baa5,0xff9caf9b,0xff50574d,0xff868584,0xff616c60,0xbc101310,
+ 0x17000000,0x29000000,0x64000000,0xdb363f35,0xfd819580,0xffacc0aa,0xffadc1ab,0xffa8bca6,0xffa3b6a1,0xff9cae9a,0xff7e907c,0xff626361,0xff656d65,0xbd0c0f0c,
+ 0xe000000,0x1b000000,0x2c000000,0x41000000,0x83000000,0xdd303830,0xfd758774,0xff9eb19c,0xff9eb09c,0xff99aa97,0xff93a491,0xff505c4f,0xff697168,0xba080a08,
+ 0x7000000,0x10000000,0x1b000000,0x2b000000,0x3b000000,0x4d000000,0x84000000,0xdc252d25,0xfd687766,0xff8fa18d,0xff8e9f8d,0xff758573,0xff414a41,0x99060806,
+ 0x4000000,0x7000000,0xf000000,0x18000000,0x24000000,0x31000000,0x40000000,0x4f000000,0x84000000,0xda232923,0xfc495447,0xff7a8a78,0xfd2a3128,0x88000000,
+ 0x1000000,0x3000000,0x7000000,0xb000000,0x13000000,0x1c000000,0x26000000,0x32000000,0x40000000,0x4c000000,0x6d000000,0xa9050605,0x830f120d,0x42000000
+};
+
+static const unsigned char folder_open_data[] = {
+ 0x0a,0x0a,0x0a,0x0a,0x00,0x00,0x00,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+ 0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x00,0x03,0x04,0x00,0x00,0x0a,0x0a,0x0a,
+ 0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x00,0x03,0x07,0x03,0x04,0x00,
+ 0x00,0x00,0x00,0x0a,0x0a,0x0a,0x00,0x00,0x00,0x0a,0x00,0x03,0x07,0x07,
+ 0x07,0x07,0x07,0x07,0x03,0x00,0x0a,0x0a,0x00,0x05,0x05,0x02,0x06,0x03,
+ 0x03,0x03,0x07,0x07,0x07,0x07,0x07,0x03,0x00,0x0a,0x00,0x04,0x05,0x05,
+ 0x05,0x04,0x03,0x03,0x03,0x03,0x07,0x07,0x07,0x03,0x04,0x00,0x0a,0x02,
+ 0x05,0x05,0x05,0x05,0x04,0x04,0x03,0x03,0x03,0x03,0x07,0x03,0x04,0x00,
+ 0x0a,0x00,0x04,0x05,0x05,0x01,0x01,0x05,0x04,0x04,0x03,0x03,0x03,0x03,
+ 0x04,0x00,0x0a,0x0a,0x02,0x05,0x01,0x05,0x01,0x01,0x01,0x01,0x04,0x04,
+ 0x03,0x03,0x04,0x00,0x0a,0x0a,0x00,0x04,0x01,0x01,0x01,0x01,0x08,0x01,
+ 0x08,0x05,0x03,0x03,0x04,0x00,0x0a,0x0a,0x0a,0x02,0x04,0x08,0x01,0x01,
+ 0x01,0x08,0x09,0x07,0x06,0x03,0x04,0x00,0x0a,0x0a,0x0a,0x0a,0x00,0x02,
+ 0x05,0x08,0x08,0x09,0x09,0x09,0x05,0x03,0x04,0x00,0x0a,0x0a,0x0a,0x0a,
+ 0x0a,0x0a,0x00,0x02,0x01,0x09,0x09,0x09,0x07,0x06,0x04,0x00,0x0a,0x0a,
+ 0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x00,0x02,0x01,0x09,0x09,0x04,0x04,0x00,
+ 0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x00,0x02,0x01,0x09,
+ 0x04,0x00,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+ 0x00,0x02,0x02,0x00
+};
+
+static const QRgb folder_open_ctable[] = {
+ 0xff000000,0xffc0c0c0,0xff303030,0xffffa858,0xff808080,0xffa0a0a4,0xff585858,0xffffdca8,0xffdcdcdc,0xffffffff,0xc6c6c6
+};
+
+static const QRgb forward_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0x8d606667,0x13000000,0x3000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xfd202223,0x9f575d5e,0x18000000,0x3000000,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xfe202324,0xa0575c5d,0x18000000,0x3000000,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xffffffff,0xffffffff,0xfff4f4f4,0xfe202324,0xa0575c5d,0x18000000,0x3000000,0xffffff,
+ 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff7f7f7,0xffededed,0xfe202324,0xa0575c5d,0x18000000,0x3000000,
+ 0x1000000,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffeeeeee,0xffd6d6d6,0xffd1d1d1,0xef464a4b,0x41000000,0xe000000,
+ 0x1000000,0xffffff,0xff000000,0xfff5f5f5,0xffe1e1e1,0xffe9e9e9,0xfff9f9f9,0xffefefef,0xffd1d1d1,0xffc9c9c9,0xfe202323,0xc13e4142,0x57000000,0x15000000,
+ 0x1000000,0x1000000,0xff000000,0xff000000,0xff000000,0xff000000,0xfff8f8f8,0xffd8d8d8,0xffc9c9c9,0xfe202323,0xcd3c3f3f,0x82000000,0x3d000000,0xd000000,
+ 0x1000000,0xffffff,0x24000000,0x6b000000,0x8f000000,0xff000000,0xfff4f4f4,0xffc9c9c9,0xfe202323,0xcd3c3f3f,0x85000000,0x45000000,0x14000000,0x2000000,
+ 0x1000000,0xffffff,0xc000000,0x24000000,0x30000000,0xff000000,0xffe9e9e9,0xfe202323,0xcd3c3f3f,0x85000000,0x45000000,0x14000000,0x2000000,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0xce3b3e3f,0x86000000,0x45000000,0x14000000,0x2000000,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x24000000,0x6b000000,0x7b000000,0x45000000,0x14000000,0x2000000,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x24000000,0x26000000,0x10000000,0x2000000,0xffffff,0xffffff,0xffffff,0xffffff
+};
+
+static const QRgb forward_inactive_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x7f000000,0x7f000000,0x46636363,0x9000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x7f000000,0x7fffffff,0x7e222222,0x4f5a5a5a,0xc000000,0x1000000,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x7f000000,0x7fffffff,0x7fffffff,0x7f222222,0x505a5a5a,0xc000000,0x1000000,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x7fffffff,0x7fffffff,0x7ff4f4f4,0x7f222222,0x505a5a5a,0xc000000,0x1000000,0xffffff,
+ 0xffffff,0xffffff,0x7f000000,0x7fffffff,0x7fffffff,0x7fffffff,0x7fffffff,0x7fffffff,0x7ff7f7f7,0x7fededed,0x7f222222,0x505a5a5a,0xc000000,0x1000000,
+ 0xffffff,0xffffff,0x7f000000,0x7fffffff,0x7fffffff,0x7fffffff,0x7fffffff,0x7fffffff,0x7feeeeee,0x7fd6d6d6,0x7fd1d1d1,0x77484848,0x20000000,0x7000000,
+ 0xffffff,0xffffff,0x7f000000,0x7ff5f5f5,0x7fe1e1e1,0x7fe9e9e9,0x7ff9f9f9,0x7fefefef,0x7fd1d1d1,0x7fc9c9c9,0x7f222222,0x60404040,0x2b000000,0xa000000,
+ 0xffffff,0xffffff,0x7f000000,0x7f000000,0x7f000000,0x7f000000,0x7ff8f8f8,0x7fd8d8d8,0x7fc9c9c9,0x7f222222,0x663d3d3d,0x41000000,0x1e000000,0x6000000,
+ 0xffffff,0xffffff,0x12000000,0x35000000,0x47000000,0x7f000000,0x7ff4f4f4,0x7fc9c9c9,0x7f222222,0x663d3d3d,0x42000000,0x22000000,0xa000000,0x1000000,
+ 0xffffff,0xffffff,0x6000000,0x12000000,0x18000000,0x7f000000,0x7fe9e9e9,0x7f222222,0x663d3d3d,0x42000000,0x22000000,0xa000000,0x1000000,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x7f000000,0x7f000000,0x673d3d3d,0x43000000,0x22000000,0xa000000,0x1000000,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x12000000,0x35000000,0x3d000000,0x22000000,0xa000000,0x1000000,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x6000000,0x12000000,0x13000000,0x8000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff
+};
+
+static const QRgb fullscreen_data[] = {
+ 0x2e000000,0x5e000000,0x7d000000,0x86000000,0x87000000,0x76000000,0x54000000,0x4b000000,0x68000000,0x7e000000,0x84000000,0x88000000,0x79000000,0x55000000,
+ 0x5f000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x86000000,0x7a000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x93000000,
+ 0x7e000000,0xffffffff,0xffffffff,0xffffffff,0xfeeeeeee,0xd81b1b1b,0xa9000000,0x95000000,0xcc464646,0xfffafafa,0xffffffff,0xffffffff,0xffffffff,0xc1000000,
+ 0x86000000,0xffffffff,0xffffffff,0xffffffff,0xfdb4b4b4,0xe0000000,0xb9000000,0xa0000000,0xbe000000,0xfab8b8b8,0xffffffff,0xffffffff,0xffffffff,0xd3000000,
+ 0x88000000,0xffffffff,0xfffafafa,0xfdb6b6b6,0xfee8e8e8,0xf6aeaeae,0xbf000000,0xa7000000,0xebb5b5b5,0xfde8e8e8,0xfcb5b5b5,0xffededed,0xffffffff,0xd6000000,
+ 0x77000000,0xffffffff,0xe0404040,0xe3000000,0xf6afafaf,0xee989898,0xb9000000,0xa1000000,0xdfa0a0a0,0xefb3b3b3,0xda000000,0xe7191919,0xffffffff,0xc8000000,
+ 0x55000000,0x89000000,0xac000000,0xba000000,0xc0000000,0xb9000000,0x9f000000,0x88000000,0x93000000,0xa9000000,0xb3000000,0xbc000000,0xc0000000,0xa8000000,
+ 0x4b000000,0x79000000,0x95000000,0x9f000000,0xa7000000,0xa1000000,0x88000000,0x74000000,0x81000000,0x94000000,0x9a000000,0xa4000000,0xaa000000,0x93000000,
+ 0x68000000,0xffffffff,0xc01e1e1e,0xbc000000,0xebb5b5b5,0xdfa0a0a0,0x93000000,0x81000000,0xd4a7a7a7,0xe6b8b8b8,0xba000000,0xd3434343,0xffffffff,0xa5000000,
+ 0x7d000000,0xffffffff,0xfeeeeeee,0xf9b6b6b6,0xfde8e8e8,0xefb3b3b3,0xa9000000,0x94000000,0xe7b8b8b8,0xfce9e9e9,0xfab8b8b8,0xfffafafa,0xffffffff,0xbe000000,
+ 0x83000000,0xffffffff,0xffffffff,0xffffffff,0xfcb8b8b8,0xdb000000,0xb4000000,0x99000000,0xb8000000,0xf9b6b6b6,0xffffffff,0xffffffff,0xffffffff,0xcf000000,
+ 0x87000000,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xec3d3d3d,0xbe000000,0xa2000000,0xc81d1d1d,0xfeeeeeee,0xffffffff,0xffffffff,0xffffffff,0xd7000000,
+ 0x79000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xc3000000,0xa9000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xd0000000,
+ 0x54000000,0x92000000,0xc1000000,0xd4000000,0xd7000000,0xc9000000,0xaa000000,0x94000000,0xa4000000,0xbd000000,0xcd000000,0xd6000000,0xcf000000,0xae000000
+};
+
+static const QRgb go_data[] = {
+ 0xffd2e7a7,0xffc5e18f,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,0xffb9da77,
+ 0xffb9da77,0xffb9da77,0xffb9da77,0xffa7d156,0xff77a719,0xffc5e18f,0xffb5d86f,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,
+ 0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xffa1ce4a,0xff85ba1c,0xff415b0e,0xffb9da77,0xffa1ce4a,0xff8ac21d,0xff8ac21d,
+ 0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff82b71b,0xff5a7f13,0xff5a7f13,0xff5a7f13,0xff8ac21d,0xff689216,
+ 0xff293909,0xffb9da77,0xffa1ce4a,0xff8ac21d,0xff8ac21d,0xff84ba1c,0xff567812,0xff2a3b09,0xff0d1203,0xff000000,0xff060901,0xff223007,0xff47640f,0xff3b530c,
+ 0xff0b0f03,0xff3e4a25,0xff0a0e02,0xff82b71b,0xff689216,0xff293909,0xffb9da77,0xffa1ce4a,0xff8ac21d,0xff7db01a,0xff364c0b,0xff010100,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff010200,0xff616c4b,0xffe4e8dc,0xff080b02,0xff415c0e,0xff689216,0xff293909,0xffb9da77,0xffa1ce4a,0xff87bd1c,
+ 0xff374e0c,0xff000000,0xff000000,0xff131b04,0xff374e0c,0xff4e6e10,0xff415b0e,0xff1d2906,0xff000000,0xff030303,0xffeeefee,0xffffffff,0xff68764d,0xff050701,
+ 0xff5d8214,0xff293909,0xffb9da77,0xffa1ce4a,0xff5e8414,0xff020200,0xff000000,0xff2c3e09,0xff75a519,0xff87be1c,0xff8ac21d,0xff7fb21b,0xff74a419,0xff161f05,
+ 0xff747474,0xffffffff,0xffffffff,0xfff2f4ee,0xff101606,0xff4b6a10,0xff293909,0xffb9da77,0xffa1ce4a,0xff33480b,0xff000000,0xff0c1103,0xff6d9a17,0xff8ac21d,
+ 0xff8ac21d,0xff5f8514,0xff0c1103,0xff49660f,0xff2c3c0d,0xff55584e,0xff4c4c4c,0xff52544d,0xff6a7752,0xff2f3a19,0xff4b6a10,0xff293909,0xffb9da77,0xffa1ce4a,
+ 0xff161e05,0xff000000,0xff283808,0xff84b91c,0xff8ac21d,0xff628a15,0xff0b1002,0xff000000,0xff121a04,0xff39510c,0xff222f07,0xff000000,0xff020300,0xff32470a,
+ 0xff3f580d,0xff4b6a10,0xff293909,0xffb9da77,0xffa1ce4a,0xff080b02,0xff000000,0xff374d0b,0xff8ac21d,0xff5f8514,0xff0a0e02,0xff000000,0xff000000,0xff2f420a,
+ 0xff8ac21d,0xff5d8314,0xff000000,0xff000000,0xff6a9516,0xff8ac21d,0xff689216,0xff293909,0xffb9da77,0xffa1ce4a,0xff172105,0xff000000,0xff283808,0xff80b41b,
+ 0xff1c2706,0xff000000,0xff000000,0xff000000,0xff050801,0xff445f0e,0xff46630f,0xff000000,0xff050701,0xff709d18,0xff8ac21d,0xff689216,0xff293909,0xffb9da77,
+ 0xffa1ce4a,0xff354b0b,0xff000000,0xff0c1103,0xff6c9717,0xff719e18,0xff1e2b06,0xff537411,0xff273708,0xff000000,0xff020200,0xff0e1403,0xff000000,0xff1b2506,
+ 0xff7cae1a,0xff8ac21d,0xff689216,0xff293909,0xffb9da77,0xffa1ce4a,0xff608714,0xff030401,0xff000000,0xff293909,0xff73a118,0xff83b81c,0xff8ac21d,0xff77a719,
+ 0xff182105,0xff000000,0xff000000,0xff000000,0xff435e0e,0xff8ac21d,0xff8ac21d,0xff689216,0xff293909,0xffb9da77,0xffa1ce4a,0xff88bf1d,0xff3b530c,0xff000000,
+ 0xff000000,0xff101703,0xff32460a,0xff47640f,0xff3d560d,0xff182105,0xff000000,0xff000000,0xff000000,0xff3f590d,0xff82b71b,0xff8ac21d,0xff689216,0xff293909,
+ 0xffb9da77,0xffa1ce4a,0xff8ac21d,0xff7fb31b,0xff3c540d,0xff020300,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff080b02,0xff000000,
+ 0xff030401,0xff709d18,0xff8ac21d,0xff689216,0xff293909,0xffb9da77,0xffa1ce4a,0xff8ac21d,0xff8ac21d,0xff85ba1c,0xff587c13,0xff2c3e09,0xff0f1503,0xff000000,
+ 0xff080b02,0xff243308,0xff4d6c10,0xff6a9416,0xff233107,0xff435e0e,0xff84ba1c,0xff8ac21d,0xff689216,0xff293909,0xffb9da77,0xffa1ce4a,0xff8ac21d,0xff8ac21d,
+ 0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff8ac21d,0xff689216,
+ 0xff293909,0xffa7d156,0xff85ba1c,0xff689216,0xff689216,0xff689216,0xff689216,0xff689216,0xff689216,0xff689216,0xff689216,0xff689216,0xff689216,0xff689216,
+ 0xff689216,0xff689216,0xff689216,0xff689216,0xff4d6d10,0xff233107,0xff77a719,0xff415b0e,0xff293909,0xff293909,0xff293909,0xff293909,0xff293909,0xff293909,
+ 0xff293909,0xff293909,0xff293909,0xff293909,0xff293909,0xff293909,0xff293909,0xff293909,0xff293909,0xff233107,0xff233107
+};
+
+static const unsigned char h_src_data[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x15,0x01,0x01,0x01,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x15,0x0d,0x15,0x0d,
+ 0x15,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0d,0x08,
+ 0x0d,0x0d,0x0d,0x15,0x0d,0x15,0x01,0x01,0x00,0x00,0x00,0x00,0x01,0x15,
+ 0x0d,0x0d,0x08,0x08,0x08,0x0d,0x15,0x0d,0x15,0x01,0x00,0x00,0x00,0x00,
+ 0x01,0x15,0x0d,0x0d,0x0d,0x15,0x0d,0x08,0x08,0x15,0x15,0x01,0x00,0x00,
+ 0x00,0x01,0x15,0x0d,0x08,0x0d,0x15,0x0d,0x15,0x0d,0x15,0x15,0x15,0x01,
+ 0x00,0x00,0x00,0x01,0x0d,0x15,0x0d,0x08,0x08,0x08,0x0d,0x15,0x0d,0x15,
+ 0x08,0x01,0x00,0x00,0x01,0x0d,0x15,0x0d,0x15,0x0d,0x15,0x0d,0x08,0x08,
+ 0x15,0x15,0x01,0x00,0x00,0x01,0x15,0x15,0x08,0x15,0x15,0x15,0x0d,0x15,
+ 0x15,0x15,0x15,0x15,0x01,0x00,0x01,0x15,0x15,0x15,0x15,0x08,0x08,0x08,
+ 0x15,0x0d,0x15,0x0d,0x15,0x15,0x01,0x00,0x01,0x08,0x15,0x15,0x15,0x15,
+ 0x15,0x15,0x08,0x08,0x08,0x15,0x15,0x08,0x01,0x00,0x00,0x01,0x01,0x08,
+ 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x01,0x00,0x00,0x00,0x00,
+ 0x00,0x01,0x01,0x01,0x08,0x15,0x15,0x15,0x15,0x15,0x08,0x01,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x08,0x15,0x08,0x01,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,
+ 0x00,0x00,0x00,0x00
+};
+
+static const QRgb h_src_ctable[] = {
+ 0xc6c6c6,0xff000000,0xffc3c3c3,0xff303030,0xffc0c0ff,0xffff0000,0xff008080,0xff800000,0xffc0c000,0xff0000c0,0xff808080,0xffc0ffc0,0xff00ffff,0xffffffff,
+ 0xffa0a0a0,0xff00ff00,0xffffff00,0xffffc0ff,0xff404000,0xff00c000,0xff000080,0xffffffc0,0xff400000,0xffc05800,0xff800080,0xff008000,0xff00c0c0,0xffdcdcdc,
+ 0xffff8000,0xffffc0c0,0xff585858,0xffc00000,0xffffdca8,0xff808000,0xffffa858,0xff004000,0xffc000c0,0xff0000ff,0xffff00ff,0xffc0ffff,0xff004040
+};
+
+static const QRgb help_icon_data[] = {
+ 0xffffff,0x2000000,0x6000000,0xa000000,0x11000000,0x16000000,0x1a000000,0x1a000000,0x18000000,0x12000000,0xc000000,0x6000000,0x3000000,0x1000000,
+ 0x2000000,0x7000000,0x10000000,0x1b000000,0x2f000000,0x47000000,0x58000000,0x59000000,0x4b000000,0x33000000,0x1e000000,0x12000000,0x9000000,0x3000000,
+ 0x5000000,0xe000000,0x1d000000,0x3b000000,0x72000000,0xbf6d6d6d,0xdf969696,0xe0959595,0xca7c7c7c,0x81000000,0x48000000,0x24000000,0x13000000,0x7000000,
+ 0x7000000,0x16000000,0x30000000,0x71000000,0xeab4b4b4,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xf9dadada,0x93292929,0x42000000,0x1e000000,0xb000000,
+ 0xa000000,0x1c000000,0x45000000,0xb6717171,0xffffffff,0xffffffff,0xfdb7b7b7,0xfd9a9a9a,0xffffffff,0xffffffff,0xdf969696,0x63000000,0x2a000000,0x10000000,
+ 0xb000000,0x20000000,0x4c000000,0xb1747474,0xe9909090,0xfbc7c7c7,0xf91a1a1a,0xfe404040,0xffffffff,0xffffffff,0xe2949494,0x6d000000,0x31000000,0x13000000,
+ 0xa000000,0x1e000000,0x40000000,0x72000000,0xad000000,0xe0000000,0xfc787878,0xfff1f1f1,0xffffffff,0xfbc7c7c7,0xb0000000,0x62000000,0x31000000,0x13000000,
+ 0x8000000,0x17000000,0x33000000,0x5d000000,0x99000000,0xe3474747,0xffffffff,0xffffffff,0xfda8a8a8,0xd3000000,0x8e000000,0x53000000,0x2a000000,0xf000000,
+ 0x5000000,0x12000000,0x2c000000,0x55000000,0x92000000,0xe7808080,0xfdc5c5c5,0xfdc5c5c5,0xe0000000,0xaa000000,0x72000000,0x41000000,0x1f000000,0xb000000,
+ 0x3000000,0xc000000,0x23000000,0x48000000,0x83000000,0xd7636363,0xf68a8a8a,0xf48b8b8b,0xbc000000,0x83000000,0x56000000,0x2e000000,0x13000000,0x6000000,
+ 0x1000000,0x7000000,0x1b000000,0x3d000000,0x77000000,0xe2949494,0xffffffff,0xffffffff,0xaa000000,0x66000000,0x3f000000,0x1d000000,0x9000000,0x3000000,
+ 0xffffff,0x5000000,0x18000000,0x37000000,0x6a000000,0xd9999999,0xffffffff,0xffffffff,0x93000000,0x50000000,0x2e000000,0x12000000,0x3000000,0x1000000,
+ 0xffffff,0x5000000,0x14000000,0x2e000000,0x4e000000,0x7b000000,0x9a000000,0x92000000,0x62000000,0x3b000000,0x21000000,0xb000000,0xffffff,0xffffff,
+ 0xffffff,0x3000000,0xe000000,0x1f000000,0x31000000,0x42000000,0x4d000000,0x4a000000,0x38000000,0x27000000,0x15000000,0x7000000,0xffffff,0xffffff
+};
+
+static const QRgb home_data[] = {
+ 0xffffff,0x1000000,0x2000000,0x6000000,0xb000000,0x13000000,0x1c000000,0x21000000,0x21000000,0x20000000,0x1d000000,0x13000000,0xc000000,0x6000000,
+ 0x1000000,0x2000000,0x8000000,0x12000000,0x21000000,0x31000000,0x43000000,0x4e000000,0x51000000,0x4a000000,0x40000000,0x2e000000,0x1f000000,0x11000000,
+ 0x2000000,0x8000000,0x14000000,0x27000000,0x42000000,0x5e000000,0xa37b7b7b,0xaf717171,0x8e131313,0xab6a6a6a,0x93626262,0x57000000,0x3b000000,0x22000000,
+ 0x7000000,0x13000000,0x28000000,0x4c000000,0x71000000,0xb76a6a6a,0xfff3f3f3,0xfff2f2f2,0xdd656565,0xffb1b1b1,0xf9b3b3b3,0x88000000,0x5f000000,0x39000000,
+ 0xf000000,0x23000000,0x47000000,0x75000000,0xbf646464,0xffeeeeee,0xffffffff,0xffffffff,0xffe8e8e8,0xff939393,0xfc8e8e8e,0xb3000000,0x86000000,0x56000000,
+ 0x1a000000,0x38000000,0x66000000,0xbd6f6f6f,0xffeeeeee,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe3e3e3,0xfe858585,0xd0000000,0xa4000000,0x6f000000,
+ 0x21000000,0x4d000000,0xa1646464,0xffebebeb,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffcbcbcb,0xe8343434,0xb9000000,0x82000000,
+ 0x2a000000,0x80747474,0xfcd5d5d5,0xfff1f1f1,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffcfcfcf,0xfe9c9c9c,0xd23f3f3f,0x8d000000,
+ 0x2d000000,0x73464646,0xb75c5c5c,0xfddedede,0xffffffff,0xfff8f8f8,0xfff1f1f1,0xfff0f0f0,0xfff8f8f8,0xffffffff,0xffb8b8b8,0xee303030,0xcc242424,0x90000000,
+ 0x2b000000,0x5d000000,0x94000000,0xfadddddd,0xffffffff,0xffb2b2b2,0xff565656,0xff4c4c4c,0xffa4a4a4,0xffffffff,0xfdaeaeae,0xdf000000,0xb9000000,0x83000000,
+ 0x23000000,0x51000000,0x85000000,0xfbe5e5e5,0xffffffff,0xffbebebe,0xff6c6c6c,0xff646464,0xffb4b4b4,0xffffffff,0xfbbcbcbc,0xcd000000,0xa4000000,0x73000000,
+ 0x1d000000,0x40000000,0x6c000000,0xddb6b6b6,0xfcd6d6d6,0xfdb0b0b0,0xfa7c7c7c,0xfb797979,0xfea6a6a6,0xfdcccccc,0xe88b8b8b,0xaf000000,0x87000000,0x5b000000,
+ 0x12000000,0x2c000000,0x4d000000,0x71000000,0x94000000,0xab000000,0xb8000000,0xbf000000,0xbd000000,0xb3000000,0xa2000000,0x85000000,0x61000000,0x3e000000,
+ 0x9000000,0x18000000,0x30000000,0x48000000,0x61000000,0x74000000,0x81000000,0x86000000,0x83000000,0x7b000000,0x6a000000,0x55000000,0x3b000000,0x25000000
+};
+
+static const unsigned char install_data[] = {
+ 0x00,0x00,0x00,0x02,0x00,0x00,0x03,0x03,0x03,0x03,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x02,0x02,0x00,0x03,0x04,0x04,0x05,0x03,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x02,0x00,0x03,0x04,0x05,0x05,0x03,
+ 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x02,0x06,0x03,0x05,0x05,
+ 0x05,0x03,0x06,0x06,0x07,0x07,0x00,0x00,0x00,0x02,0x02,0x06,0x06,0x06,
+ 0x03,0x03,0x03,0x06,0x06,0x07,0x07,0x07,0x00,0x00,0x00,0x02,0x06,0x06,
+ 0x06,0x06,0x06,0x06,0x06,0x06,0x07,0x07,0x07,0x00,0x00,0x00,0x08,0x08,
+ 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x07,0x07,0x07,0x02,0x00,0x00,0x00,
+ 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x07,0x07,0x02,0x09,0x09,0x00,
+ 0x00,0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x07,0x02,0x02,0x09,
+ 0x02,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x09,0x07,0x07,0x07,0x07,0x07,
+ 0x09,0x09,0x02,0x00,0x00,0x00,0x00,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+ 0x09,0x09,0x02,0x09,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x09,0x07,
+ 0x07,0x07,0x07,0x07,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x07,
+ 0x09,0x07,0x07,0x07,0x07,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+};
+
+static const QRgb install_ctable[] = {
+ 0x40ffffff,0xffffff00,0xffff0000,0xff0000ff,0xffffffff,0xff00b6ff,0xff000000,0xffff6d00,0xffffb696,0xffb64500
+};
+
+static const QRgb installed_data[] = {
+ 0xff,0xff3300,0xff,0xff3300,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff0000ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff0000ff,0xff0000ff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff00b6ff,0xff00b6ff,0xffffffff,0xffffffff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff0000ff,0xffff,0xff,0xffff,
+ 0xff,0xffff,0xff0000ff,0xff00b6ff,0xffffffff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff0000ff,0xff,0xff,
+ 0xff,0xff,0xff0000ff,0xff00b6ff,0xffffffff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff0000ff,0xff,0xffff,
+ 0xff,0xffff,0xff0000ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff0000ff,0xff,0xff,
+ 0xff,0xff,0xff0000ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff0000ff,0xff,0xffff,
+ 0xff,0xffff,0xff,0xff0000ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff0000ff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff0000ff,0xff0000ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff0000ff,0xff0000ff,0xffff,0xff,0xffff,
+ 0xff,0xffff,0xff,0xffff,0xff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xffff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xffff,0xff,0xffff,0xff,0xffff,0xff,0xffff,0xff,0xffff,
+ 0xff,0xffff,0xff,0xffff,0xff,0xffff,0xff,0xffff,0xff,0xffff,0xff,0xff,0xff,0xff
+};
+
+static const QRgb italic_data[] = {
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,
+ 0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0
+};
+
+static const unsigned char konsole_data[] = {
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+ 0x03,0x03,0x03,0x01,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+ 0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x04,0x00,0x03,0x03,0x03,
+ 0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x00,0x03,0x03,0x04,0x00,0x03,
+ 0x02,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x00,0x03,0x03,0x04,
+ 0x00,0x03,0x02,0x03,0x02,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x00,0x03,
+ 0x03,0x04,0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,
+ 0x00,0x03,0x03,0x04,0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+ 0x03,0x04,0x00,0x03,0x03,0x04,0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+ 0x03,0x03,0x03,0x04,0x00,0x03,0x03,0x04,0x00,0x03,0x03,0x03,0x03,0x03,
+ 0x03,0x03,0x03,0x03,0x03,0x04,0x00,0x03,0x03,0x04,0x00,0x03,0x03,0x03,
+ 0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x00,0x03,0x03,0x04,0x04,0x04,
+ 0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00,0x03,0x03,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,
+ 0x01,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+ 0x03,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01
+};
+
+static const QRgb konsole_ctable[] = {
+ 0xff808080,0xc6c6c6,0xffc0ffff,0xff000000,0xffffffff
+};
+
+static const QRgb language_data[] = {
+ 0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0x404000,0x404000,0x404000,0x404000,0x404000,0x404000,0x0,0x0,
+ 0x0,0x0,0xff000000,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0x404000,0x404000,0x404000,0xff000000,0xff000000,
+ 0x0,0x404000,0xdcdcdc,0x0,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,0xff000000,
+ 0xffffffff,0xff000000,0x0,0x0,0x404000,0x0,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+ 0xffffffff,0xffffffff,0xffffffff,0xff000000,0x0,0x0,0x404000,0x404000,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xffffffff,0xffffffff,0xff000000,0x0,0x0,0x0,0x404000,0xff000000,0xffffffff,0xffffffff,0xff000000,
+ 0xff000000,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff000000,0xffffffff,0xff000000,0x0,0xff000000,0xff000000,0x404000,0xff000000,0xffffffff,
+ 0xffffffff,0xff000000,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff000000,0xff000000,0xff000000,0xff0000ff,0xff000000,0x0,
+ 0xff000000,0xffffffff,0xff000000,0xff000000,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,
+ 0xff000000,0x0,0xff000000,0xff000000,0x80,0xff000000,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,
+ 0xff0000ff,0xff0000ff,0xff000000,0x0,0xff000000,0x0,0x0,0xff000000,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,
+ 0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff000000,0x0,0xff000000,0x0,0x0,0xff000000,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,
+ 0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff000000,0x0,0xff000000,0x0,0x0,0xff000000,0xff0000ff,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff000000,0x0,0xff000000,0x0,0xdcdcdc,0xff000000,
+ 0xff000000,0xdcdcdc,0xdcdcdc,0x800000,0x800000,0xff000000,0xff0000ff,0xff0000ff,0xff0000ff,0xff000000,0xff000000,0x0,0x0,0x0,
+ 0x0,0xff000000,0xdcdcdc,0x0,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff000000,0xff000000,0xff000000,0x0,0xdcdcdc,0x0,
+ 0x0,0x0,0xdcdcdc,0xff000000,0xdcdcdc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xdcdcdc,0xdcdcdc,
+ 0xdcdcdc,0x0,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0
+};
+
+static const QRgb launching_data[] = {
+ 0xb000000,0x2d000000,0x0,0x48000000,0x53000000,0x51000000,0x23000000,0x0,0x0,0x2f3b3700,0x25b3a700,0x6b282500,0x5a0e0d00,0x190a0900,
+ 0xadffee00,0x76ffee00,0x0,0x2d000000,0xb000000,0x0,0x5ffee00,0x8ffee00,0x5ffee00,0x0,0x0,0x0,0x0,0x0,
+ 0xcffee00,0xaffee00,0x0,0x0,0x17000000,0x5c050500,0x71635c00,0x9b887f00,0xbd8f8500,0xb9877e00,0x6a282600,0x57000000,0x2c000000,0x69242200,
+ 0x78413d00,0x83363300,0x8b151300,0x59000000,0x7be8d800,0xe6ffee00,0x0,0x59000000,0x48000000,0x6ffee00,0x14ffee00,0x15ffee00,0x58171500,0x61000000,
+ 0x58000000,0xf000000,0xcffee00,0x3dffee00,0x27ffee00,0x5ffee00,0x0,0x0,0xb000000,0x63010100,0x68060500,0x5f181600,0x51dccd00,0xc7ffee00,
+ 0xf5e6d600,0xaa7f7700,0x5a000000,0x8c131200,0x7a665f00,0x8e665f00,0x7e464100,0x90040400,0x4b000000,0xf4ffee00,0x5cffee00,0x54000000,0x55060500,0x1dffee00,
+ 0x2dffee00,0x42776f00,0x780e0d00,0x71000000,0x4d000000,0x40f7e600,0x94ffee00,0x4bffee00,0x4ffee00,0x0,0x0,0x0,0x53000000,0x5d080700,
+ 0x6f0d0c00,0x990a0900,0x94060600,0x71030200,0xb0efdf00,0xfdffee00,0xa9aca000,0x960a0900,0xa1474200,0x74ffee00,0x7eb8ab00,0x7f262300,0x44000000,0xfbffee00,
+ 0x87fbea00,0x59000000,0x57403c00,0x48ffee00,0x45ffee00,0x73383400,0x92030300,0x53090800,0x98ffee00,0xdcffee00,0x68c4b700,0x52000000,0x100f0e00,0x0,
+ 0x0,0x0,0x4f000000,0x5c080700,0x1f6a6300,0x48514c00,0x90222000,0xa0131200,0x94050500,0xd6a19600,0xeefcec00,0x6f040400,0x9c433e00,0x9affee00,
+ 0xa2ffee00,0x93696200,0x56000000,0xfdffee00,0x88787000,0x69262400,0x72faed37,0x80fff131,0x61e2d300,0x9a121100,0xbf625c00,0xf5fcec00,0xf3ffee00,0x88b2a600,
+ 0x5d080700,0x590e0d00,0x28131100,0x54030200,0x0,0x0,0x2000000,0x57020200,0x5e100f00,0x31a69b00,0x39ffee00,0x58b3a800,0x9c2a2700,0x9b0a0900,
+ 0x63000000,0x36000000,0x613e3a00,0x94f0e00e,0xd2f2e20c,0xb9cec000,0x6b282500,0xaeb2a600,0x61151300,0x7b797100,0x11fffef5,0x2fffcda,0x413c3800,0xac222000,
+ 0xfdd2c400,0xd5ffee00,0x693c3800,0x68222000,0x5e2b2800,0x30454000,0x5f0d0c00,0x4b030300,0x0,0xbffee00,0x54000000,0x4a000000,0x59020200,0x63191800,
+ 0x42bdb000,0x63ffee00,0x3affee00,0x17b0a400,0x61232100,0x5a000000,0x3191700,0x2fefefe,0x4f5f4eb,0x17ffffff,0x887b7300,0x5a000000,0x905f5900,0x0,
+ 0x0,0x0,0x73141300,0x70000000,0xeffee00,0x694b4600,0x834e4900,0x56857c00,0x57494400,0x64191700,0x50060500,0x0,0x14ffee00,0x22ffee00,
+ 0x57000000,0x5a000000,0x5d000000,0x59010100,0x68232001,0x74cdc00b,0x44f8e806,0x0,0x5ffee00,0x52615a00,0x4000000,0x0,0x0,0x0,
+ 0x7ffee09,0x4a09e85,0x1bfb85c,0x0,0x0,0x1736c00,0x71080700,0x35a89d00,0x96706800,0xaa706807,0x79aea206,0x74655e00,0x6d2c2900,0x3d191700,
+ 0x0,0x3cffee00,0x61ffee00,0xeffee00,0x36000000,0x5a000000,0x5a000000,0x5b000000,0x8e000000,0x84474204,0xacc6ba1e,0x20f1ea96,0x0,0x1ffee08,
+ 0xbffee00,0x0,0x0,0x0,0x0,0x1fffefc,0x0,0x0,0x0,0x3f1f0e4,0x54ffee00,0x6df6e610,0x20a49d4d,0xaea59b10,
+ 0x73c9bc00,0x71333000,0x42171500,0x1ffee00,0x6dffee00,0xadffee00,0x1fffee00,0x0,0x0,0x2c000000,0x59000000,0x5a000000,0x5b000000,0x70141200,
+ 0x94615b05,0xeaebe59b,0x1dfefefd,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x1fefefe,0x1faf9ef,0x75fbea00,0x733e3900,0x59080800,0x1affee00,0xd5ffee00,0xe4ffee00,0x43ffee00,0x0,0x0,0x0,0x0,
+ 0x0,0x3d000000,0x5a000000,0x5a000000,0x61121100,0xa77e7600,0xdee8e080,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x163e3900,0x5b050500,0xb5e7d700,0xfdffee00,0xefffee00,0x21ffee00,0x0,
+ 0x0,0x0,0x0,0x13ffee00,0x6fffee00,0xc6ffee00,0xe2e9d900,0xe8c9bb00,0x90c1b400,0x67201e00,0xb6a89c00,0x1cf6ef9f,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x12c2900,0x56000000,0x23000000,0xbbccbe00,
+ 0xd2a19600,0x53000000,0x53000000,0x58000000,0x55000000,0x0,0xa1ffee00,0xbcffee00,0xc9ffee00,0xcaffee00,0xe0ffee00,0xe2ffee00,0x7effee00,0x48000000,
+ 0x6b2a2800,0x30ffee00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x56000000,0x60000000,0x5a000000,0x5a000000,0x57000000,0x53000000,0x53000000,0x4e000000,0x20000000,0x0,0x1ffee00,0x0,0x0,0x0,
+ 0x0,0x0,0x2000000,0x50000000,0x5a000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x3ad0d0d0,0x5a000000,0x5a000000,0x59000000,0x51000000,0x28000000,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x2000000,0x46000000,0x59000000,0x5d100f00,0x6cfcb95,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xd5ffee00,0xd7f4e400,0xd3aa9f00,0xbd8c8200,0xa4736b00,
+ 0x93645d00,0x6f625c00,0x22ffee00,0x16ffee00,0x0,0x0,0x0,0xb000000,0x58000000,0x60121100,0x32756d00,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe4aca784,
+ 0xf3c5ba39,0xe0e0d21e,0xc5f1e10d,0x96f6e503,0x98867d00,0x8e5d5700,0x47938900,0x1effee00,0x0,0x0,0x18000000,0x58000000,0x66232000,0x6fd5c700,
+ 0x5acdc131,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x5bfffcd7,0xf8ffee00,0xecffee00,0xd6ffee00,0xc2fceb00,0xaebbaf00,0x988c8300,0x92655e00,0x7e4c4700,0x24f0e000,0x16ffee00,0x0,0x11000000,
+ 0x5e0d0c00,0x682e2b00,0x5ff9e800,0xb0e1d31d,0xdbada452,0x56e6e090,0x15fffef0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x5a000000,0x5a000000,0x59000000,0x5a000000,0x59000000,0x5a000000,0x53000000,0x11000000,
+ 0x0,0x0,0x0,0x56111000,0x6e332f00,0x47f7e700,0x7cf7e607,0xa4ded021,0xadf9e805,0x83ffee00,0x4baa9e00,0x10f0e00,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3a69b00,0x67222000,0x59000000,0x3a000000,0x28928800,
+ 0x19ffee00,0x0,0x0,0x0,0x0,0x0,0x7ffee00,0x66282500,0x70464100,0x48ffee00,0x60f9e900,0x887b7300,0x76454000,0x5f0d0c00,
+ 0x5a000000,0x16282500,0x5ebdb00,0x0,0x0,0x0,0x3bffee00,0x14f7f7fb,0x0,0x0,0x1ffee00,0x2ccc68e,0x0,0x26dbce23,
+ 0x7ffdec01,0x6d333000,0x5b050500,0xc0fceb00,0xfcffee00,0xd6ffee00,0x40ffee00,0x0,0x0,0x0,0xcffee00,0x68242200,0x5f484300,0x575a5400,
+ 0x6d2e2b00,0x600f0e00,0x6a262300,0x6a262300,0x410b0a00,0x7ecabc00,0xef2eb8e,0x0,0x0,0x0,0x45030300,0xb3faea12,0x0,0x0,
+ 0x0,0x96ffee00,0x76e7d817,0xd7c9bd35,0xbce0d21e,0x82e3d404,0x7c454100,0x48383400,0xb3ffee00,0xe4ffee00,0xf6ffee00,0xbbffee00,0x69ffee00,0x6ffee00,
+ 0x9ffee00,0x5e1d1b00,0x62141300,0x5d080700,0x5b020200,0x5d080700,0xf9b2a600,0xbafceb00,0x682e2b00,0xcd8b8202,0x16ede8b1,0x11faf7ce,0x4fbea00,0x2b0f0e00,
+ 0x5a000000,0x72ffee00,0x26eae6af,0x0,0x13dad36f,0x6d2e2b00,0x7baa9e00,0xa1ffee00,0xa6f9e805,0x88f4e40a,0x926f6800,0x77464200,0x12ffee00,0x3ffee00,
+ 0x1dffee00,0x70ffee00,0x84ffee00,0x68ffee00,0x3ffee00,0xc3f3b00,0x6b000000,0x90000000,0x57080700,0xebfceb00,0xf7ffee00,0x70565000,0x8d5c5600,0xd28e8505,
+ 0xccf1e20d,0x9cffee00,0x5c343100,0x5a000000,0x5a000000,0x307f7700,0xa7ffee00,0x1bcb672,0x8867f3c,0x70322e00,0x5f0d0c00,0x54615a00,0x53ffee00,0x65fceb02,
+ 0x62c0b300,0x7e484400,0x2cbfb200,0xdffee00,0x3ffee00,0x0,0x0,0xcffee00,0x0,0x4a000000,0x94000000,0x6b020200,0xb9fceb00,0xebffee00,
+ 0x66464100,0x67201e00,0xa4736b00,0xabc5b804,0x97fbeb03,0x39ffee00,0x59000000,0x34000000,0x56000000,0x51000000,0x61ffee00,0x4ce6d718,0x596f6928,0x814d4807,
+ 0x46000000,0x5a000000,0x47030300,0xdffee00,0x1fffee00,0x72373400,0x484d4800,0xfffee00,0x6ffee00,0x2ffee00,0x0,0x0,0x18000000,0x7e000000,
+ 0x7a010100,0x91fbea00,0xbfffee00,0x513e3a00,0x5d080700,0x75413d00,0x99716900,0x77ffee00,0x4bffee00,0x1f393500,0x5a000000,0x99ffee00,0x42000000,0x59000000,
+ 0x36ffee00,0x79ffee00,0xad7a7208,0x86595404,0x47ffee00,0x99a89d00,0x5a000000,0x58000000,0x36040400,0x5c080700,0x3b222000,0x9ffee00,0x4ffee00,0x2ffee00,
+ 0x0,0x0,0x56000000,0x7a040400,0x71807800,0x6bffee00,0x4f1d1b00,0x5b020200,0x4c2a2700,0x9a2d2a00,0x9a433e00,0x3fffee00,0x13ffee00,0x57000000,
+ 0xb2857c00,0xffffee00,0x44000000,0x85000000,0x443c3800,0x4dffee00,0x926e6600,0x835d5700,0x6bffee00,0xffffee00,0xbaefdf00,0x51000000,0x59000000,0x5a000000,
+ 0x25000000,0x0,0x0,0x0,0x0,0x0,0x59000000,0x534c4700,0x29f2e200,0x4e030300,0x5a000000,0x540c0b00,0x94111000,0xa3181600,
+ 0x73373300,0x54242200,0x39040400,0x5a000000,0xf7eddd00,0xc8ffee00,0x90000000,0xaa000000,0x5b020200,0x29958b00,0x79504a00,0x764b4600,0x1dffee00,0x8affee00,
+ 0xf8ffee00,0xd4ffee00,0x17ffee00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x5a0e0d00,0x62171500,0x59000000,0x5a000000,
+ 0x23000000,0x600f0e00,0x970d0c00,0x7b151400,0x61121100,0x5d030300,0x5a000000,0x7e6b6400,0xf5ffee00,0x18ffee00,0x90000000,0x7b000000,0x57000000,0x5a050500,
+ 0x63292600,0x69353100,0x18ffee00,0x7ffee00,0x1effee00,0xc1ffee00,0xbfffee00,0x2bffee00,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0xf443f00,0x4c000000,0x42000000,0x2000000,0x1ffee00,0x57070700,0x680b0a00,0x19262300,0x46000000,0x59000000,0x55000000,0x94ffee00,0xa2ffee00,0x0,
+ 0x70000000,0x59000000,0xb000000,0x5a000000,0x5d080700,0x541b1900,0xeffee00,0x8ffee00,0x1ffee00,0x0,0x49ffee00,0x77ffee00,0x2bffee00,0x6ffee00,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x29060500,0x5b020200,0x58000000,0x5a000000,0x49000000,
+ 0x8bfb200,0xa0ffee00,0x3bffee00,0x0,0x2000000,0x47000000,0x0,0x40000000,0x58000000,0x47f7700,0x6ffee00,0x4ffee00,0x1ffee00,0x0,
+ 0x0,0x9ffee00,0x22ffee00,0x1cffee00,0x1ffee00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x12000000,
+ 0x59000000,0x53000000,0x12000000,0x0,0x32ffee00,0x51ffee00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x1ffee00,0x1ffee00,0x0,0x0,0x0,0x0,0x0,0x7ffee00,0x5ffee00,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ffee00,0x31ffee00,0x11ffee00,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0
+};
+
+static const QRgb left_data[] = {
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0
+};
+
+static const QRgb library_data[] = {
+ 0x6000000,0x10000000,0x26000000,0x3c000000,0x3b000000,0x28000000,0x19000000,0x18000000,0x26000000,0x3a000000,0x3e000000,0x2e000000,0x1b000000,0xf000000,
+ 0xa000000,0x27000000,0xb3c1c1c1,0xffffffff,0xffffffff,0x818d8d8d,0x31000000,0x30000000,0x7f8e8e8e,0xffffffff,0xffffffff,0xb8bdbdbd,0x3a000000,0x1a000000,
+ 0xe000000,0x40000000,0xffffffff,0xffffffff,0xffffffff,0xa2757575,0x55000000,0x55000000,0xa0767676,0xffffffff,0xffffffff,0xffffffff,0x5a000000,0x28000000,
+ 0x13000000,0x4c000000,0xffffffff,0xffffffff,0xffffffff,0xe4c8c8c8,0xae6e6e6e,0xae6e6e6e,0xe4c8c8c8,0xffffffff,0xffffffff,0xffffffff,0x6e000000,0x35000000,
+ 0x17000000,0x50000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x7a000000,0x3f000000,
+ 0x19000000,0x54000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x84000000,0x46000000,
+ 0x1a000000,0x55000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x88000000,0x4a000000,
+ 0x19000000,0x54000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x88000000,0x48000000,
+ 0x17000000,0x4b000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x7e000000,0x42000000,
+ 0x14000000,0x37000000,0xbdb9b9b9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xd1aaaaaa,0x68000000,0x39000000,
+ 0x10000000,0x20000000,0x42000000,0x67000000,0x91000000,0xf0d4d4d4,0xffffffff,0xffffffff,0xf3d1d1d1,0xaf000000,0x90000000,0x71000000,0x4c000000,0x2d000000,
+ 0xb000000,0x12000000,0x20000000,0x35000000,0x62000000,0xe8dadada,0xffffffff,0xffffffff,0xecd7d7d7,0x84000000,0x61000000,0x4b000000,0x34000000,0x1f000000,
+ 0x8000000,0xe000000,0x19000000,0x2b000000,0x4b000000,0xa8919191,0xe9d9d9d9,0xead8d8d8,0xb5898989,0x6b000000,0x4e000000,0x3a000000,0x27000000,0x15000000,
+ 0xe000000,0x19000000,0x2c000000,0x41000000,0x5b000000,0x75000000,0x89000000,0x8e000000,0x83000000,0x70000000,0x58000000,0x41000000,0x28000000,0x16000000
+};
+
+static const unsigned char locked_data[] = {
+ 0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,
+ 0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x06,0x03,0x03,0x03,0x04,
+ 0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x06,0x07,0x06,0x07,
+ 0x06,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x07,0x07,
+ 0x07,0x07,0x07,0x06,0x07,0x06,0x03,0x03,0x04,0x04,0x04,0x04,0x03,0x06,
+ 0x07,0x07,0x07,0x07,0x06,0x07,0x06,0x07,0x06,0x03,0x04,0x04,0x04,0x04,
+ 0x03,0x05,0x07,0x07,0x00,0x06,0x07,0x06,0x06,0x06,0x06,0x03,0x04,0x04,
+ 0x04,0x03,0x05,0x05,0x05,0x00,0x00,0x00,0x00,0x07,0x06,0x06,0x06,0x03,
+ 0x04,0x04,0x04,0x03,0x01,0x05,0x00,0x00,0x05,0x05,0x05,0x00,0x07,0x06,
+ 0x02,0x03,0x04,0x04,0x03,0x07,0x06,0x00,0x00,0x05,0x05,0x05,0x00,0x00,
+ 0x05,0x06,0x03,0x04,0x04,0x03,0x06,0x06,0x07,0x01,0x00,0x00,0x00,0x00,
+ 0x00,0x05,0x05,0x05,0x03,0x04,0x03,0x06,0x06,0x06,0x06,0x07,0x06,0x01,
+ 0x00,0x00,0x01,0x05,0x05,0x05,0x03,0x04,0x03,0x02,0x06,0x06,0x06,0x06,
+ 0x06,0x06,0x07,0x06,0x06,0x06,0x01,0x02,0x03,0x04,0x04,0x03,0x03,0x02,
+ 0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x03,0x04,0x04,0x04,0x04,
+ 0x04,0x03,0x03,0x03,0x02,0x06,0x06,0x06,0x06,0x06,0x02,0x03,0x04,0x04,
+ 0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x02,0x06,0x02,0x03,0x04,
+ 0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x03,
+ 0x04,0x04,0x04,0x04
+};
+
+static const QRgb locked_ctable[] = {
+ 0xffffa858,0xffa0a0a0,0xffc0c000,0xff000000,0xc6c6c6,0xff800000,0xffffffc0,0xffffffff
+};
+
+static const unsigned char lockedfolder_data[] = {
+ 0x06,0x06,0x04,0x07,0x04,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+ 0x06,0x06,0x06,0x04,0x07,0x01,0x05,0x04,0x04,0x04,0x04,0x06,0x06,0x06,
+ 0x06,0x06,0x06,0x06,0x06,0x04,0x09,0x07,0x07,0x04,0x03,0x03,0x03,0x04,
+ 0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x04,0x09,0x09,0x02,0x04,0x03,0x04,
+ 0x04,0x01,0x04,0x06,0x06,0x06,0x06,0x06,0x06,0x04,0x09,0x02,0x09,0x04,
+ 0x03,0x04,0x01,0x05,0x01,0x04,0x04,0x06,0x06,0x06,0x06,0x04,0x02,0x09,
+ 0x05,0x05,0x05,0x04,0x09,0x07,0x07,0x07,0x01,0x04,0x06,0x06,0x06,0x04,
+ 0x09,0x02,0x01,0x01,0x01,0x05,0x05,0x08,0x02,0x08,0x04,0x01,0x07,0x06,
+ 0x06,0x04,0x02,0x02,0x01,0x04,0x03,0x01,0x01,0x02,0x08,0x08,0x04,0x01,
+ 0x07,0x06,0x06,0x04,0x02,0x02,0x01,0x01,0x03,0x04,0x01,0x08,0x08,0x08,
+ 0x04,0x01,0x07,0x06,0x06,0x04,0x02,0x02,0x02,0x01,0x01,0x03,0x01,0x08,
+ 0x08,0x08,0x04,0x01,0x07,0x06,0x06,0x04,0x04,0x00,0x02,0x04,0x03,0x01,
+ 0x01,0x08,0x08,0x08,0x04,0x01,0x07,0x06,0x06,0x06,0x06,0x04,0x04,0x04,
+ 0x03,0x04,0x08,0x08,0x08,0x08,0x04,0x01,0x07,0x06,0x06,0x06,0x06,0x06,
+ 0x06,0x04,0x03,0x04,0x08,0x08,0x08,0x08,0x04,0x01,0x07,0x06,0x06,0x06,
+ 0x06,0x06,0x06,0x06,0x04,0x04,0x04,0x08,0x08,0x08,0x04,0x01,0x04,0x04,
+ 0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x04,0x04,0x08,0x04,0x01,
+ 0x04,0x04,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x04,
+ 0x04,0x04,0x04,0x06
+};
+
+static const QRgb lockedfolder_ctable[] = {
+ 0xff808080,0xffffa858,0xffc0c0c0,0xffc05800,0xff000000,0xffffdca8,0xc6c6c6,0xff585858,0xffa0a0a4,0xffffffff
+};
+
+static const QRgb mag_data[] = {
+ 0xffdbdbdb,0xff000000,0xff000000,0xff000000,0xff000000,0xffdbdbdb,0xffdadada,0xffd7d7d7,0xdcdcdc,0xdcdcdc,0xff000000,0xff000000,0xff2effff,0xff52ffff,
+ 0xff000000,0xff000000,0xffd9d9d9,0xffd7d7d7,0xdcdcdc,0xdcdcdc,0xff000000,0xff00ffff,0xff00ffff,0xff00ffff,0xff00ffff,0xff000000,0xdcdcdc,0xdcdcdc,
+ 0xdcdcdc,0xdcdcdc,0xff000000,0xff00ffff,0xff00ffff,0xff00ffff,0xff00ffff,0xff000000,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff000000,0xff000000,
+ 0xff00ffff,0xff00ffff,0xff000000,0xff000000,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff000000,0xff000000,0xff000000,0xff000000,0xffc0c000,
+ 0xff000000,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff000000,0xffc0c000,0xffc0c000,0xff000000,0xdcdcdc,0xdcdcdc,
+ 0xdcdcdc,0xffd7d7d7,0xffd7d7d7,0xdcdcdc,0xdcdcdc,0xff000000,0xffc0c000,0xffc0c000,0xff000000,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,
+ 0xdcdcdc,0xdcdcdc,0xff000000,0xffc0c000,0xff000000,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xdcdcdc,0xff000000,
+ 0xdcdcdc,0xdcdcdc
+};
+
+static const QRgb month_data[] = {
+ 0xe000000,0x18000000,0x23000000,0x2e000000,0x35000000,0x39000000,0x3b000000,0x3b000000,0x3b000000,0x39000000,0x35000000,0x2e000000,0x23000000,0x18000000,
+ 0x18000000,0xff7a7fbb,0xff6b71b3,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff454ca2,0xff0d1986,0x3d000000,0x2a000000,
+ 0x24000000,0xff6b71b3,0xff4a51a4,0xff303999,0xff303999,0xff303999,0xff303999,0xff303999,0xff303999,0xff303999,0xff0d1a8b,0xff0a146c,0x5a000000,0x3e000000,
+ 0x2e000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe5e5e5,0xffaeaeae,0x74000000,0x50000000,
+ 0x35000000,0xffffffff,0xff000000,0xff000000,0xffffffff,0xff000000,0xff000000,0xffffffff,0xff000000,0xff000000,0xffe5e5e5,0xffaeaeae,0x86000000,0x5c000000,
+ 0x39000000,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffe5e5e5,0xffaeaeae,0x90000000,0x63000000,
+ 0x3b000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe5e5e5,0xffaeaeae,0x95000000,0x66000000,
+ 0x3c000000,0xffffffff,0xff000000,0xff000000,0xffffffff,0xff000000,0xff000000,0xffffffff,0xff000000,0xff000000,0xffe5e5e5,0xffaeaeae,0x96000000,0x67000000,
+ 0x3b000000,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffe5e5e5,0xffaeaeae,0x95000000,0x66000000,
+ 0x39000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe5e5e5,0xffaeaeae,0x90000000,0x63000000,
+ 0x35000000,0xffffffff,0xfffdfdfd,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffd1d1d1,0xffa4a4a4,0x86000000,0x5c000000,
+ 0x2e000000,0xfff5f5f5,0xffc4c4c4,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffa4a4a4,0xff969696,0x74000000,0x50000000,
+ 0x24000000,0x3e000000,0x5a000000,0x74000000,0x86000000,0x90000000,0x95000000,0x96000000,0x95000000,0x90000000,0x86000000,0x74000000,0x5a000000,0x3e000000,
+ 0x18000000,0x2a000000,0x3d000000,0x4f000000,0x5c000000,0x63000000,0x66000000,0x67000000,0x66000000,0x63000000,0x5c000000,0x4f000000,0x3d000000,0x2a000000
+};
+
+static const QRgb mute_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x95050505,0xd000000,0x7000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0x3f000000,0x19000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffcacaca,0xff000000,0x79000000,0x2b000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffcacaca,0xffffffff,0xff030303,0xe3050505,0xcb050505,0x2f050505,0xbf050505,0xbf050505,0xbf050505,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xffcacaca,0xffffffff,0xffffffff,0xff030303,0xffffffff,0xbb696969,0xbf050505,0xab717171,0xffffffff,0xbf050505,
+ 0xff000000,0xffbababa,0xffbababa,0xffbababa,0xffeaeaea,0xffeaeaea,0xffeaeaea,0xff030303,0xda5d5d5d,0xffffffff,0xab717171,0xffffffff,0xab717171,0xbf050505,
+ 0xff000000,0xffcfcfcf,0xffcfcfcf,0xffcfcfcf,0xffcfcfcf,0xffcfcfcf,0xffcfcfcf,0xff000000,0xe3050505,0xbb696969,0xffffffff,0xab717171,0xbf050505,0x2f050505,
+ 0xff000000,0xff8d8d8d,0xff8d8d8d,0xff8d8d8d,0xffb4b4b4,0xffb3b3b3,0xffb3b3b3,0xff030303,0xda5d5d5d,0xffffffff,0xab717171,0xffffffff,0xab717171,0xbf050505,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff7c7c7c,0xff9d9d9d,0xff9d9d9d,0xff030303,0xffffffff,0xbb696969,0xbf050505,0xab717171,0xffffffff,0xbf050505,
+ 0x24000000,0x6b000000,0x8f000000,0x8f000000,0xff000000,0xff7c7c7c,0xff9d9d9d,0xff030303,0xe3050505,0xcb050505,0x2f050505,0xbf050505,0xbf050505,0xbf050505,
+ 0xc000000,0x24000000,0x30000000,0x30000000,0x48000000,0xff000000,0xff7c7c7c,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x3c000000,0xff000000,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x3c000000,0xc8030303,0x79000000,0x2b000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x31000000,0x3f000000,0x19000000,0xffffff,0xffffff,0xffffff,0xffffff
+};
+
+static const QRgb new_data[] = {
+ 0x16000000,0x4f000000,0x9c000000,0xbb000000,0xbe000000,0xbe000000,0xc1000000,0xc4000000,0xbf000000,0xa2000000,0x6d000000,0x3e000000,0x21000000,0x12000000,
+ 0x18000000,0x4b000000,0x86000000,0xffffffff,0xfffdfdfd,0xffeaeaea,0xffb0b0b0,0xffffffff,0xf5c6c6c6,0xae000000,0x99000000,0x6e000000,0x3f000000,0x21000000,
+ 0x19000000,0x4b000000,0x7c000000,0xffffffff,0xfffcfcfc,0xffe2e2e2,0xff969696,0xffffffff,0xffffffff,0xf8c1c1c1,0xb5000000,0x99000000,0x61000000,0x33000000,
+ 0x1a000000,0x4d000000,0x7e000000,0xffffffff,0xfffcfcfc,0xffe2e2e2,0xff939393,0xffffffff,0xffffffff,0xffffffff,0xf8c4c4c4,0xb0000000,0x7b000000,0x43000000,
+ 0x1c000000,0x50000000,0x81000000,0xffffffff,0xfffdfdfd,0xffe8e8e8,0xffababab,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xb9000000,0x87000000,0x4c000000,
+ 0x1c000000,0x51000000,0x84000000,0xffffffff,0xfffdfdfd,0xfff5f5f5,0xffd7d7d7,0xffababab,0xff939393,0xff969696,0xffb0b0b0,0xbd000000,0x8d000000,0x50000000,
+ 0x1d000000,0x52000000,0x85000000,0xffffffff,0xffffffff,0xfffcfcfc,0xfff5f5f5,0xffe8e8e8,0xffe2e2e2,0xffe2e2e2,0xffeaeaea,0xbf000000,0x8f000000,0x53000000,
+ 0x1d000000,0x52000000,0x85000000,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfffcfcfc,0xfffdfdfd,0xc0000000,0x8f000000,0x54000000,
+ 0x1d000000,0x52000000,0x85000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xbf000000,0x8f000000,0x53000000,
+ 0x1d000000,0x51000000,0x84000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xbd000000,0x8c000000,0x51000000,
+ 0x1c000000,0x51000000,0x86000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xb8000000,0x88000000,0x4d000000,
+ 0x1a000000,0x4e000000,0x87000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xb2000000,0x7f000000,0x45000000,
+ 0x16000000,0x41000000,0x79000000,0x92000000,0xa0000000,0xae000000,0xba000000,0xbf000000,0xbf000000,0xbd000000,0xb4000000,0x9e000000,0x6a000000,0x39000000,
+ 0xd000000,0x26000000,0x4b000000,0x64000000,0x76000000,0x85000000,0x90000000,0x95000000,0x95000000,0x91000000,0x86000000,0x6e000000,0x49000000,0x2a000000
+};
+
+static const QRgb newfolder_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xff000000,0xffe9d4b5,0xffffffd4,0xffffffd4,0xffffffd4,0xffffffd4,0xffd4a764,0xff000000,0xff000000,0xff000000,0xff000000,0xffffff,0xffffff,0xffffff,
+ 0xff000000,0xffe9d4b5,0xffd4a764,0xffd4a764,0xffd4a764,0xffd4a764,0xffd4a764,0xffd3a664,0xffd3a664,0xffd3a664,0xffd3a664,0xff000000,0xffc49a6f,0xffffff,
+ 0xff000000,0xffe9d4b5,0xffd4a764,0xffd4a764,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0xffe9d4b5,0xffd4a764,0xff000000,0xffffffff,0xfffefefe,0xfff7f7f7,0xffdadada,0xffb4b4b4,0xffafafaf,0xffd1d1d1,0xffededed,0xfff7f7f7,0xff000000,
+ 0xff000000,0xffe9d4b5,0xffb06e2f,0xff505042,0xfffdfdd1,0xfff7f7cd,0xffe1e1bb,0xffa1a186,0xff78ff78,0xff78ff78,0xff93937a,0xffccccaa,0xff48483c,0x8782826b,
+ 0xff000000,0xffe9d4b5,0xff000000,0xfffefefe,0xfff8f8ce,0xffdadab6,0xffa1a186,0xff5a5a4b,0xff78ff78,0xff78ff78,0xff4a4a3e,0xff84846e,0xff000000,0x6b000000,
+ 0xff000000,0xffb06e2f,0xff505042,0xfffefed3,0xfff1f1c8,0xffb3b394,0xff78ff78,0xff78ff78,0xff78ff78,0xff78ff78,0xff78ff78,0xff78ff78,0xe4313129,0x67000000,
+ 0xff000000,0xffd4a764,0xffffffff,0xfffefed3,0xffefefc7,0xffaeae91,0xff78ff78,0xff78ff78,0xff78ff78,0xff78ff78,0xff78ff78,0xff78ff78,0xc6000000,0x4d000000,
+ 0xff000000,0xffffffff,0xffffffd4,0xfffefed3,0xfff4f4cb,0xffd1d1ad,0xff93937a,0xff4a4a3e,0xff78ff78,0xff78ff78,0xff0f0f0d,0xee20201b,0x99000000,0x37000000,
+ 0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff78ff78,0xff78ff78,0xff000000,0xb0000000,0x5f000000,0x28000000,
+ 0xffffff,0x17000000,0x43000000,0x57000000,0x59000000,0x5e000000,0x6c000000,0x8c000000,0xac000000,0xb5000000,0x99000000,0x5f000000,0x34000000,0x19000000
+};
+
+static const QRgb next_data[] = {
+ 0x1000000,0x3000000,0x8000000,0xf000000,0x16000000,0x1b000000,0x1d000000,0x1c000000,0x19000000,0x16000000,0x12000000,0xf000000,0xb000000,0x8000000,
+ 0x3000000,0xa000000,0x15000000,0x30000000,0x5c171717,0x6c141414,0x59000000,0x48000000,0x41000000,0x45000000,0x44000000,0x30000000,0x1b000000,0x12000000,
+ 0x8000000,0x15000000,0x36000000,0x7d121212,0xebc3c3c3,0xffffffff,0xc9595959,0x95000000,0x8d000000,0xb14e4e4e,0xd7b7b7b7,0x68000000,0x34000000,0x22000000,
+ 0xe000000,0x2e000000,0x7c121212,0xefbdbdbd,0xffffffff,0xffffffff,0xffffffff,0xf04d4d4d,0xea3e3e3e,0xffffffff,0xffffffff,0x9f000000,0x55000000,0x37000000,
+ 0x14000000,0x55000000,0xeac1c1c1,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xffffffff,0xffffffff,0xffffffff,0xca000000,0x79000000,0x4d000000,
+ 0x19000000,0x65000000,0xffffffff,0xffffffff,0xffefefef,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xec000000,0x9a000000,0x5f000000,
+ 0x1b000000,0x55000000,0xc0494949,0xfee8e8e8,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xb2000000,0x6d000000,
+ 0x1a000000,0x44000000,0x8f000000,0xec3d3d3d,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xc2000000,0x76000000,
+ 0x17000000,0x3e000000,0x86000000,0xe63f3f3f,0xffffffff,0xffffffff,0xffffffff,0xfff9f9f9,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xc2000000,0x75000000,
+ 0x14000000,0x41000000,0xab505050,0xfde6e6e6,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xb3000000,0x6c000000,
+ 0x11000000,0x3e000000,0xc9a8a8a8,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xed000000,0x9b000000,0x5d000000,
+ 0xe000000,0x2d000000,0x63000000,0x9b000000,0xc6000000,0xea000000,0xff000000,0xff000000,0xff000000,0xff000000,0xed000000,0xbc000000,0x7a000000,0x49000000,
+ 0xa000000,0x1a000000,0x32000000,0x52000000,0x76000000,0x97000000,0xb0000000,0xc1000000,0xc1000000,0xb3000000,0x9b000000,0x7a000000,0x52000000,0x31000000,
+ 0x7000000,0x11000000,0x20000000,0x35000000,0x4b000000,0x5e000000,0x6c000000,0x75000000,0x74000000,0x6c000000,0x5d000000,0x49000000,0x31000000,0x1d000000
+};
+
+static const unsigned char oneoverx_data[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x01,
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+};
+
+static const QRgb oneoverx_ctable[] = {
+ 0xc6c6c6,0xff000000
+};
+
+static const unsigned char pass_data[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00,
+ 0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x02,0x02,0x01,0x00,
+ 0x00,0x00,0x01,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x02,0x02,
+ 0x01,0x00,0x00,0x01,0x02,0x02,0x02,0x01,0x00,0x00,0x00,0x00,0x01,0x02,
+ 0x02,0x02,0x01,0x00,0x01,0x02,0x02,0x02,0x02,0x02,0x01,0x00,0x00,0x00,
+ 0x01,0x02,0x02,0x02,0x01,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,
+ 0x01,0x01,0x01,0x02,0x02,0x02,0x01,0x01,0x01,0x01,0x02,0x02,0x02,0x01,
+ 0x01,0x01,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x01,0x02,0x02,
+ 0x02,0x01,0x00,0x00,0x00,0x01,0x02,0x02,0x02,0x02,0x02,0x01,0x00,0x01,
+ 0x02,0x02,0x02,0x01,0x00,0x00,0x00,0x00,0x01,0x02,0x02,0x02,0x01,0x00,
+ 0x00,0x01,0x02,0x02,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x01,
+ 0x00,0x00,0x00,0x01,0x02,0x02,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x01,0x00,0x00,0x00,0x00,0x01,0x02,0x02,0x02,0x01,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x00,0x00
+};
+
+static const QRgb pass_ctable[] = {
+ 0xc6c6c6,0xff000000,0xffffff00
+};
+
+static const QRgb paste_data[] = {
+ 0xffffff,0x0,0x0,0x0,0x38000000,0xff000000,0xff000000,0xff000000,0x57000000,0x0,0x0,0x0,0x0,0x9d9d9d,
+ 0xffffff,0x0,0x8b000000,0xaa000000,0xc41f1f1f,0xffa5a5a5,0xffb9b9b9,0xffaeaeae,0xcd313131,0xa9000000,0x9e000000,0x0,0x0,0x363738,
+ 0xffffff,0x8e000000,0xe3383838,0xff777777,0xff282828,0xffc5c5c5,0xffc4c4c4,0xffcbcbcb,0xff3b3b3b,0xff606060,0xe22e2e2e,0xb0000000,0x30240f,0x33250d,
+ 0xffffff,0xac000000,0xfc939393,0xfe8f8f8f,0xff656565,0xff686868,0xff5e5e5e,0xff5c5c5c,0xff585959,0xff6f6f6d,0xfb49494a,0xda000000,0x392b12,0x47371d,
+ 0xffffff,0xa7000000,0xff909090,0xff7f7f7f,0xff7b7b7b,0xff51504e,0xff1b1a1a,0xff42413f,0xff332f2a,0xff7c7566,0xff46433d,0xd4000000,0x382a12,0x45361b,
+ 0xffffff,0xa7000000,0xff8f8f8f,0xff7f7f7f,0xff7a7a7a,0xff42423f,0xff82807c,0xffffffff,0xffd6c8b1,0xfffdfbf6,0xffa19a8e,0xd81b1405,0x36280f,0x46371d,
+ 0xffffff,0xa7000000,0xff8f8f8f,0xff7f7f7f,0xff7a7a7a,0xff434340,0xff7b7a77,0xfffffff6,0xffb0a38b,0xffece9e4,0xffffffff,0xf0a69f90,0x7137270c,0x33c2e14,
+ 0xffffff,0xa7000000,0xff8f8f8f,0xff7f7f7f,0xff7a7a7a,0xff454341,0xff7b7a75,0xfffffef3,0xffac9d85,0xfff1eeeb,0xffffffff,0xffffffff,0xfaada79d,0x6a42351d,
+ 0xffffff,0xa7000000,0xff8f8f8f,0xff7f7f7f,0xff7a7a7a,0xff454341,0xff7a7772,0xfffffcf1,0xffc2b59f,0xffb6ab99,0xffbaaf9f,0xffcdc3b1,0xffb5aea3,0xb21e170d,
+ 0xffffff,0xa7000000,0xff8f8f8f,0xff808080,0xff7a7979,0xff41403e,0xff76736d,0xfffdf5ea,0xffe2d8c6,0xffd0c2ab,0xffcdbea8,0xfeddd0b9,0xffa59e93,0xb6000000,
+ 0xffffff,0xa7000000,0xff919191,0xff818182,0xff7b7a7a,0xff454341,0xff746e65,0xfff1e7d6,0xffdfd5c4,0xffe0d5c3,0xffddd2be,0xfceadecc,0xf2b5afa7,0xbf000000,
+ 0xffffff,0xb1000000,0xf97a7a7a,0xfe7a7a7a,0xff747474,0xff41403f,0xff787165,0xfff5e8d2,0xffded2bd,0xffddd0bb,0xffdaceb8,0xfceaddc9,0xf1b8b1a5,0xb3000000,
+ 0xffffff,0x79000000,0xe6161616,0xff353535,0xff303030,0xff0d0f10,0xff4b4740,0xffa89f8f,0xff9a9182,0xff9a9081,0xff9c9384,0xffa89f8f,0xff7b7871,0xb10a0805,
+ 0xffffff,0x0,0x6e000000,0x85000000,0x85000000,0x90241e12,0xa9453e33,0xbd393429,0xb82a251b,0xae2b271b,0xae2d281d,0xac2f291f,0xae272016,0x682e2310
+};
+
+static const QRgb paste_inactive_data[] = {
+ 0xffffff,0x0,0x0,0x0,0x1c000000,0x7f000000,0x7f000000,0x7f000000,0x2b000000,0x0,0x0,0x0,0x0,0x9d9d9d,
+ 0xffffff,0x0,0x45000000,0x55000000,0x621f1f1f,0x7fa5a5a5,0x7fb9b9b9,0x7faeaeae,0x66313131,0x54000000,0x4f000000,0x0,0x0,0x363738,
+ 0xffffff,0x47000000,0x71383838,0x7f777777,0x7f282828,0x7fc5c5c5,0x7fc4c4c4,0x7fcbcbcb,0x7f3b3b3b,0x7f606060,0x712e2e2e,0x58000000,0x30240f,0x33250d,
+ 0xffffff,0x56000000,0x7e939393,0x7f8f8f8f,0x7f656565,0x7f686868,0x7f5e5e5e,0x7f5c5c5c,0x7f585858,0x7f6e6e6e,0x7d494949,0x6d000000,0x392b12,0x47371d,
+ 0xffffff,0x53000000,0x7f909090,0x7f7f7f7f,0x7f7b7b7b,0x7f4f4f4f,0x7f1a1a1a,0x7f404040,0x7f2e2e2e,0x7f717171,0x7f414141,0x6a000000,0x382a12,0x45361b,
+ 0xffffff,0x53000000,0x7f8f8f8f,0x7f7f7f7f,0x7f7a7a7a,0x7f404040,0x7f7f7f7f,0x7fffffff,0x7fc4c4c4,0x7ff9f9f9,0x7f989898,0x6c101010,0x36280f,0x46371d,
+ 0xffffff,0x53000000,0x7f8f8f8f,0x7f7f7f7f,0x7f7a7a7a,0x7f414141,0x7f797979,0x7ffafafa,0x7f9d9d9d,0x7fe8e8e8,0x7fffffff,0x789b9b9b,0x38232323,0x1292929,
+ 0xffffff,0x53000000,0x7f8f8f8f,0x7f7f7f7f,0x7f7a7a7a,0x7f424242,0x7f787878,0x7ff9f9f9,0x7f999999,0x7feeeeee,0x7fffffff,0x7fffffff,0x7da5a5a5,0x35303030,
+ 0xffffff,0x53000000,0x7f8f8f8f,0x7f7f7f7f,0x7f7a7a7a,0x7f424242,0x7f767676,0x7ff8f8f8,0x7fb0b0b0,0x7fa7a7a7,0x7fadadad,0x7fbfbfbf,0x7facacac,0x59161616,
+ 0xffffff,0x53000000,0x7f8f8f8f,0x7f808080,0x7f797979,0x7f3f3f3f,0x7f717171,0x7ff3f3f3,0x7fd4d4d4,0x7fbdbdbd,0x7fbbbbbb,0x7fcbcbcb,0x7f9c9c9c,0x5b000000,
+ 0xffffff,0x53000000,0x7f919191,0x7f818181,0x7f7a7a7a,0x7f424242,0x7f6c6c6c,0x7fe3e3e3,0x7fd1d1d1,0x7fd1d1d1,0x7fcecece,0x7edbdbdb,0x79adadad,0x5f000000,
+ 0xffffff,0x58000000,0x7c7a7a7a,0x7f7a7a7a,0x7f747474,0x7f404040,0x7f6e6e6e,0x7fe3e3e3,0x7fcecece,0x7fcbcbcb,0x7fc9c9c9,0x7ed9d9d9,0x78aeaeae,0x59000000,
+ 0xffffff,0x3c000000,0x73161616,0x7f353535,0x7f303030,0x7f0f0f0f,0x7f464646,0x7f9b9b9b,0x7f8e8e8e,0x7f8d8d8d,0x7f909090,0x7f9b9b9b,0x7f767676,0x58060606,
+ 0xffffff,0x0,0x37000000,0x42000000,0x42000000,0x481b1b1b,0x543c3c3c,0x5e313131,0x5c232323,0x57232323,0x57242424,0x56272727,0x571e1e1e,0x341f1f1f
+};
+
+static const unsigned char pixmap_data[] = {
+ 0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x0b,0x0b,
+ 0x0b,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x0b,
+ 0x11,0x0c,0x0c,0x0b,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+ 0x0b,0x07,0x0c,0x11,0x0c,0x0b,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+ 0x03,0x0b,0x07,0x0c,0x00,0x00,0x0b,0x03,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+ 0x03,0x03,0x0b,0x07,0x0c,0x00,0x00,0x0b,0x03,0x03,0x0b,0x10,0x10,0x12,
+ 0x12,0x0b,0x03,0x03,0x0b,0x11,0x00,0x00,0x0b,0x03,0x03,0x03,0x0b,0x10,
+ 0x10,0x12,0x12,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x03,0x03,0x03,0x03,
+ 0x0b,0x07,0x07,0x00,0x0c,0x00,0x00,0x0b,0x03,0x03,0x03,0x03,0x03,0x03,
+ 0x03,0x03,0x0b,0x00,0x00,0x00,0x0c,0x00,0x00,0x0b,0x0b,0x0b,0x03,0x03,
+ 0x03,0x03,0x03,0x03,0x0b,0x08,0x08,0x0e,0x0d,0x0e,0x0e,0x09,0x09,0x0b,
+ 0x03,0x03,0x03,0x03,0x03,0x03,0x0b,0x0e,0x0e,0x0e,0x0d,0x0e,0x0e,0x09,
+ 0x09,0x0b,0x0b,0x0b,0x03,0x03,0x03,0x03,0x0b,0x04,0x04,0x0a,0x06,0x0a,
+ 0x0a,0x01,0x01,0x01,0x01,0x0b,0x03,0x03,0x03,0x03,0x0b,0x0a,0x0a,0x0a,
+ 0x06,0x0a,0x0a,0x01,0x01,0x01,0x01,0x0b,0x03,0x03,0x03,0x03,0x0b,0x13,
+ 0x13,0x02,0x0f,0x02,0x02,0x05,0x02,0x05,0x05,0x0b,0x03,0x03,0x03,0x03,
+ 0x0b,0x13,0x13,0x02,0x0f,0x02,0x02,0x05,0x02,0x05,0x05,0x0b,0x03,0x03,
+ 0x03,0x03,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+ 0x03,0x03,0x03,0x03
+};
+
+static const QRgb pixmap_ctable[] = {
+ 0xffff8000,0xff008000,0xff0000c0,0xc6c6c6,0xffc0ffc0,0xff000080,0xff00ff00,0xffffdca8,0xffffffc0,0xff808000,0xff00c000,0xff000000,0xffffa858,0xffffff00,
+ 0xffc0c000,0xff0000ff,0xffffc0c0,0xffc05800,0xffff0000,0xffc0c0ff
+};
+
+static const QRgb play_data[] = {
+ 0xc6000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xc6000000,
+ 0xff000000,0xffdddddd,0xffe6e6e6,0xffe2e2e2,0xffd7d7d7,0xffd4d4d4,0xffd3d3d3,0xffd3d3d3,0xffcccccc,0xffbababa,0xffa2a2a2,0xff818181,0xff525252,0xff000000,
+ 0xff000000,0xffd1d1d1,0xffdddddd,0xffcacaca,0xffa7a7a7,0xffafafaf,0xffc3c3c3,0xffc8c8c8,0xffbdbdbd,0xffa4a4a4,0xff818181,0xff525252,0xff3c3c3c,0xff000000,
+ 0xff000000,0xffbebebe,0xffcbcbcb,0xffaaaaaa,0xff686868,0xffb8b8b8,0xff979797,0xffaeaeae,0xffa6a6a6,0xff828282,0xff585858,0xff3d3d3d,0xff313131,0xff000000,
+ 0xff000000,0xffa9a9a9,0xffb3b3b3,0xff909090,0xff3f3f3f,0xffffffff,0xffadadad,0xff7b7b7b,0xff7e7e7e,0xff5a5a5a,0xff3e3e3e,0xff343434,0xff292929,0xff000000,
+ 0xff000000,0xff919191,0xff969696,0xff747474,0xff2b2b2b,0xffffffff,0xffffffff,0xffa3a3a3,0xff424242,0xff3c3c3c,0xff343434,0xff2a2a2a,0xff222222,0xff000000,
+ 0xff000000,0xff868686,0xff848484,0xff646464,0xff242424,0xffffffff,0xffffffff,0xffffffff,0xff9e9e9e,0xff343434,0xff2e2e2e,0xff252525,0xff1e1e1e,0xff000000,
+ 0xff000000,0xff868686,0xff848484,0xff646464,0xff242424,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffa2a2a2,0xff2e2e2e,0xff252525,0xff1e1e1e,0xff000000,
+ 0xff000000,0xff7a7a7a,0xff727272,0xff515151,0xff1d1d1d,0xffffffff,0xffffffff,0xffffffff,0xffa3a3a3,0xff313131,0xff292929,0xff222222,0xff1b1b1b,0xff000000,
+ 0xff000000,0xff5b5b5b,0xff474747,0xff343434,0xff1d1d1d,0xffffffff,0xffffffff,0xff9e9e9e,0xff2b2b2b,0xff242424,0xff1f1f1f,0xff1a1a1a,0xff161616,0xff000000,
+ 0xff000000,0xff414141,0xff3b3b3b,0xff2d2d2d,0xff222222,0xffffffff,0xff999999,0xff202020,0xff1e1e1e,0xff191919,0xff161616,0xff161616,0xff161616,0xff000000,
+ 0xff000000,0xff383838,0xff2f2f2f,0xff252525,0xff1d1d1d,0xff969696,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff000000,
+ 0xff000000,0xff2f2f2f,0xff232323,0xff191919,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff161616,0xff000000,
+ 0xc6000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xc6000000
+};
+
+static const QRgb play2_data[] = {
+ 0xffffff,0x3000000,0x8000000,0x11000000,0x1a000000,0x1b000000,0x16000000,0x12000000,0xd000000,0x8000000,0x2000000,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0x6000000,0xf000000,0x33000000,0x86898989,0x57000000,0x38000000,0x2a000000,0x1f000000,0x14000000,0x8000000,0x2000000,0xffffff,0xffffff,
+ 0xffffff,0x9000000,0x19000000,0x5f000000,0xffffffff,0xdca2a2a2,0x7f000000,0x56000000,0x3e000000,0x2a000000,0x14000000,0x8000000,0x2000000,0xffffff,
+ 0xffffff,0xd000000,0x24000000,0x7a000000,0xffffffff,0xffffffff,0xe99a9a9a,0xa0000000,0x72000000,0x4d000000,0x2b000000,0x14000000,0x8000000,0x2000000,
+ 0xffffff,0x10000000,0x2e000000,0x88000000,0xffffffff,0xffffffff,0xffffffff,0xf2969696,0xb8000000,0x7d000000,0x47000000,0x24000000,0xf000000,0x5000000,
+ 0xffffff,0x12000000,0x35000000,0x94000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xf7939393,0xb7000000,0x69000000,0x35000000,0x17000000,0x7000000,
+ 0xffffff,0x14000000,0x3a000000,0x9b000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xec999999,0x84000000,0x43000000,0x1e000000,0xa000000,
+ 0xffffff,0x14000000,0x3c000000,0x9e000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff8f8f8f,0xdb000000,0x88000000,0x49000000,0x22000000,0xb000000,
+ 0xffffff,0x14000000,0x3a000000,0x9b000000,0xffffffff,0xffffffff,0xffffffff,0xff8f8f8f,0xfd000000,0xc4000000,0x7a000000,0x43000000,0x1e000000,0xa000000,
+ 0xffffff,0x12000000,0x35000000,0x94000000,0xffffffff,0xffffffff,0xfe909090,0xf9000000,0xd7000000,0xa2000000,0x63000000,0x35000000,0x17000000,0x7000000,
+ 0xffffff,0x10000000,0x2e000000,0x7f000000,0xffffffff,0xf0979797,0xd5000000,0xc2000000,0xa3000000,0x78000000,0x47000000,0x24000000,0xf000000,0x5000000,
+ 0xffffff,0xd000000,0x24000000,0x57000000,0xa8727272,0x9c000000,0x94000000,0x85000000,0x6d000000,0x4d000000,0x2b000000,0x14000000,0x8000000,0x2000000,
+ 0xffffff,0x9000000,0x19000000,0x2f000000,0x48000000,0x5a000000,0x5a000000,0x50000000,0x3e000000,0x2a000000,0x14000000,0x8000000,0x2000000,0xffffff,
+ 0xffffff,0x6000000,0xf000000,0x1a000000,0x25000000,0x31000000,0x31000000,0x2a000000,0x1f000000,0x14000000,0x8000000,0x2000000,0xffffff,0xffffff
+};
+
+static const QRgb programs_data[] = {
+ 0x0,0x0,0x1000000,0x1000000,0x1000000,0x1000000,0x1000000,0x1000000,0x0,0x6000000,0x0,0xb2b2b2,0x0,0xf9e07c,
+ 0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0xf9e07c,
+ 0x0,0xff000000,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff000000,0x0,0xf9e07c,
+ 0x0,0xff000000,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff0000db,0xff000000,0x0,0x0,
+ 0x1000000,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xdb,0x0,
+ 0x0,0xff000000,0xffffffff,0xff5743cc,0xffffffff,0xffd1aa10,0xffdd3ee0,0xffffffff,0xff5743cc,0xff49cccc,0xffffffff,0xff000000,0xdb,0x0,
+ 0x0,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xffffff,0x0,
+ 0x0,0xff000000,0xffffffff,0xffdd3ee0,0xffffffff,0xff3fdb80,0xff49cccc,0xffffffff,0xff9740d6,0xffdd3ee0,0xffffffff,0xff000000,0xffffff,0x0,
+ 0x1000000,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xffffff,0x0,
+ 0x1b000000,0xff000000,0xffffffff,0xffadcc47,0xffffffff,0xff49cccc,0xff9740d6,0xffffffff,0xffcc4b85,0xffd1aa10,0xffffffff,0xff000000,0xffffff,0x0,
+ 0x0,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xffffff,0x0,
+ 0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffffff,0x0,
+ 0x0,0x7000000,0x2000000,0xd000000,0x15000000,0x15000000,0x15000000,0x13000000,0x17000000,0x17000000,0x17000000,0x17000000,0xffffff,0x0,
+ 0x0,0xa8a8a8,0xb2b2b2,0xb2b2b2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0
+};
+
+static const QRgb quit_icon_data[] = {
+ 0xffffff,0xffffff,0xffffff,0x55e8a5a5,0xa2e79e9e,0xdbe68f8f,0xfbe67d7d,0xdedc5f5f,0xabcd3f3f,0x65b61e1e,0xf000000,0x4000000,0xffffff,0xffffff,
+ 0xffffff,0x18e8acac,0x8febb0b0,0xfcf1b4b4,0xffeeaaaa,0xffea9292,0xffe67979,0xffe05a5a,0xffdd4242,0xfdd61a1a,0xaca40000,0x365b0000,0x9000000,0x1000000,
+ 0xffffff,0x8febb0b0,0xfff1b5b5,0xfff9e2e2,0xfffbeaea,0xffe98f8f,0xffe46f6f,0xffe05959,0xfff7d3d3,0xffecadad,0xffb40000,0xb8810000,0x2a000000,0x9000000,
+ 0x55e8a5a5,0xfcf1b4b4,0xfff9e2e2,0xffffffff,0xffffffff,0xfff9e2e2,0xffe36c6c,0xfff7d7d7,0xffffffff,0xffffffff,0xffddacac,0xfe931313,0x944f0000,0x22000000,
+ 0xa2e79e9e,0xffeeaaaa,0xfffbeaea,0xffffffff,0xffffffff,0xffffffff,0xfffdf6f6,0xffffffff,0xffffffff,0xffffffff,0xffe8cece,0xff801616,0xd5520000,0x48000000,
+ 0xdbe68f8f,0xffea9292,0xffe98f8f,0xfff9e2e2,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffeacece,0xff861616,0xff630000,0xf24a0000,0x69000000,
+ 0xfbe67d7d,0xffe67979,0xffe46f6f,0xffe36c6c,0xfffdf6f6,0xffffffff,0xffffffff,0xffffffff,0xfffcf4f4,0xff9a2525,0xff6a0000,0xff4b0000,0xfe420000,0x7e000000,
+ 0xdedc5f5f,0xffe05a5a,0xffe05959,0xfff7d7d7,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe2cece,0xff5a1616,0xff430000,0xf43d0000,0x87000000,
+ 0xabcd3f3f,0xffdb3636,0xfff5cbcb,0xffffffff,0xffffffff,0xffffffff,0xfffcf4f4,0xffffffff,0xffffffff,0xffffffff,0xffd1c5c5,0xff430000,0xe3310000,0x7e000000,
+ 0x65b61e1e,0xfdd40c0c,0xffdf7171,0xffffffff,0xffffffff,0xffeacfcf,0xff9a2828,0xffe3cfcf,0xffffffff,0xffffffff,0xff8f7171,0xfe430000,0xc7200000,0x69000000,
+ 0xf000000,0xaca40000,0xffb40000,0xffc77272,0xffe3c5c5,0xff871717,0xff6a0000,0xff5b1717,0xffd1c5c5,0xff907272,0xff430000,0xdf2e0000,0x93000000,0x48000000,
+ 0x4000000,0x365b0000,0xb8810000,0xfe8d0000,0xff790000,0xff630000,0xff4b0000,0xff430000,0xff430000,0xfe430000,0xdf2e0000,0xa70d0000,0x62000000,0x22000000,
+ 0xffffff,0x9000000,0x2a000000,0x944f0000,0xd5520000,0xf24a0000,0xfe420000,0xf43d0000,0xe3310000,0xc7200000,0x93000000,0x62000000,0x2a000000,0x9000000,
+ 0xffffff,0x1000000,0x9000000,0x22000000,0x48000000,0x69000000,0x7e000000,0x87000000,0x7e000000,0x69000000,0x48000000,0x22000000,0x9000000,0x1000000
+};
+
+static const QRgb repeat_data[] = {
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0xff000000,0xff000000,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,0xff000000,0x0,
+ 0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,
+ 0x0,0xff000000,0x0,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0xff000000,0xff000000,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0
+};
+
+static const unsigned char reset_data[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
+ 0x01,0x01,0x00,0x00,0x00,0x01,0x02,0x02,0x01,0x00,0x00,0x00,0x00,0x01,
+ 0x01,0x02,0x02,0x01,0x00,0x00,0x01,0x02,0x02,0x02,0x02,0x01,0x00,0x01,
+ 0x01,0x02,0x02,0x02,0x02,0x01,0x00,0x00,0x00,0x01,0x01,0x02,0x02,0x02,
+ 0x01,0x02,0x02,0x02,0x02,0x02,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x01,
+ 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x01,0x02,0x02,0x02,0x02,0x02,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x01,0x02,0x02,0x02,0x02,0x02,0x01,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+ 0x02,0x01,0x00,0x00,0x00,0x00,0x01,0x02,0x02,0x02,0x02,0x01,0x01,0x01,
+ 0x02,0x02,0x02,0x02,0x01,0x00,0x00,0x00,0x01,0x02,0x02,0x02,0x01,0x00,
+ 0x00,0x01,0x01,0x02,0x02,0x02,0x01,0x00,0x00,0x00,0x01,0x02,0x02,0x02,
+ 0x01,0x00,0x00,0x00,0x01,0x02,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x01,
+ 0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00
+};
+
+static const QRgb reset_ctable[] = {
+ 0xc6c6c6,0xff000000,0xffff0000
+};
+
+static const QRgb right_data[] = {
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0
+};
+
+static const QRgb rotate_data[] = {
+ 0xb000000,0x16000000,0x26000000,0x3f000000,0x5d000000,0x75000000,0x84000000,0x84000000,0x75000000,0x5d000000,0x3f000000,0x26000000,0x16000000,0xb000000,
+ 0x18000000,0x2e000000,0x55000000,0x98414141,0xd9949494,0xf5c8c8c8,0xfdefefef,0xfdefefef,0xf5c8c8c8,0xda939393,0x99404040,0x56000000,0x2e000000,0x18000000,
+ 0x2d000000,0x5b000000,0xb5626262,0xf4c3c3c3,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xf4c3c3c3,0xb6626262,0x5c000000,0x2e000000,
+ 0x4c000000,0xa13e3e3e,0xf5c2c2c2,0xffffffff,0xfee8e8e8,0xf8a2a2a2,0xf25e5e5e,0xf35e5e5e,0xfaa1a1a1,0xffe7e7e7,0xffffffff,0xf6c1c1c1,0xa53d3d3d,0x50000000,
+ 0x70000000,0xe0909090,0xffffffff,0xfee8e8e8,0xf0666666,0xdc000000,0xd9000000,0xde000000,0xeb000000,0xfcb6b6b6,0xffe7e7e7,0xffffffff,0xe38e8e8e,0x77000000,
+ 0x8e000000,0xf7c7c7c7,0xffffffff,0xf8a2a2a2,0xd5000000,0xc1000000,0xb9000000,0xc2000000,0xdc000000,0xf4000000,0xffd0d0d0,0xffffffff,0xf9c5c5c5,0x9e000000,
+ 0xa1000000,0xfeeeeeee,0xffffffff,0xee5f5f5f,0xc1000000,0xa4000000,0x97000000,0xa5000000,0xe69c9c9c,0xfbcbcbcb,0xfff2f2f2,0xffe4e4e4,0xfde6e6e6,0xd7a5a5a5,
+ 0xa8000000,0xfeeeeeee,0xffffffff,0xec606060,0xb5000000,0x8e000000,0x7a000000,0x84000000,0xb1000000,0xf0979797,0xfdcbcbcb,0xfee5e5e5,0xee989898,0x9c000000,
+ 0xa2000000,0xfac5c5c5,0xffffffff,0xf7a3a3a3,0xbd000000,0x8e000000,0x74000000,0x74000000,0x90000000,0xbd000000,0xed999999,0xec999999,0xb2000000,0x76000000,
+ 0x90000000,0xeb8b8b8b,0xffffffff,0xfee8e8e8,0xe8696969,0xb3000000,0x95000000,0x8a000000,0x94000000,0xac000000,0xbe000000,0xb2000000,0x89000000,0x5a000000,
+ 0x77000000,0xc5353535,0xfabfbfbf,0xffffffff,0xfee8e8e8,0xf4a4a4a4,0xdf646464,0xd5686868,0xc2000000,0xe59c9c9c,0xe39e9e9e,0xd3a7a7a7,0x70000000,0x43000000,
+ 0x5c000000,0x94000000,0xd8545454,0xfabfbfbf,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xf0c5c5c5,0xaf656565,0x5a000000,0x32000000,
+ 0x42000000,0x6b000000,0x9c000000,0xce333333,0xef888888,0xfbc4c4c4,0xfeeeeeee,0xfeeeeeee,0xf8c6c6c6,0xe48d8d8d,0xac3b3b3b,0x6b000000,0x3d000000,0x22000000,
+ 0x2b000000,0x48000000,0x6a000000,0x8e000000,0xac000000,0xbf000000,0xc5000000,0xbf000000,0xac000000,0x90000000,0x6a000000,0x45000000,0x29000000,0x16000000
+};
+
+static const QRgb start_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xff000000,0xffffff,0xffffff,0xffffff,0xffffff,0x7a6c7375,0xff000000,0xff000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xff000000,0xffffff,0xffffff,0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xff000000,0x6b000000,0x24000000,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xff000000,0xffffff,0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xfffcfcfc,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xff000000,0xffffff,0x7a6c7375,0xfc202323,0xffffffff,0xffffffff,0xfff8f8f8,0xff000000,0xff000000,0xff000000,0xff000000,0x24000000,0xc000000,
+ 0xffffff,0xff000000,0x7a6c7375,0xfc202323,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xffffffff,0xffffffff,0xfff5f5f5,0xff000000,0x6b000000,0x24000000,
+ 0xffffff,0xff000000,0xe0494e4f,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff6f6f6,0xfff6f6f6,0xffeeeeee,0xffd3d3d3,0xff000000,0x8f000000,0x30000000,
+ 0xffffff,0xff000000,0x69666c6d,0xfd202323,0xfffcfcfc,0xfffcfcfc,0xfff4f4f4,0xffdddddd,0xffcccccc,0xffc9c9c9,0xffc9c9c9,0xff000000,0x8f000000,0x30000000,
+ 0xffffff,0xff000000,0xd000000,0x83565b5c,0xfd202223,0xfff4f4f4,0xffededed,0xffcccccc,0xff000000,0xff000000,0xff000000,0xff000000,0x8f000000,0x30000000,
+ 0xffffff,0xff000000,0x2000000,0x14000000,0x8852585a,0xfe202324,0xffe8e8e8,0xffcbcbcb,0xff000000,0xb3000000,0x9b000000,0x8f000000,0x6b000000,0x24000000,
+ 0xffffff,0xff000000,0xffffff,0x2000000,0x14000000,0x8852585a,0xfe202324,0xffd3d3d3,0xff000000,0x9b000000,0x54000000,0x30000000,0x24000000,0xc000000,
+ 0xffffff,0xff000000,0xffffff,0xffffff,0x2000000,0x14000000,0x8852585a,0xff000000,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x2000000,0x14000000,0x45000000,0x7b000000,0x6b000000,0x24000000,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x2000000,0x10000000,0x26000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff
+};
+
+static const QRgb stop_data[] = {
+ 0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,
+ 0xf000000,0x2e000000,0x5f000000,0x7f000000,0x8d000000,0x98000000,0x9e000000,0xa2000000,0x9e000000,0x98000000,0x81000000,0x57000000,0x31000000,0x1d000000,
+ 0x18000000,0x5f000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x98000000,0x52000000,0x31000000,
+ 0x25000000,0x7f000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xcd000000,0x7a000000,0x49000000,
+ 0x2e000000,0x8d000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xf0000000,0x9b000000,0x5d000000,
+ 0x36000000,0x98000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xb4000000,0x6c000000,
+ 0x3b000000,0x9e000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xc4000000,0x75000000,
+ 0x3d000000,0xa2000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xcc000000,0x7a000000,
+ 0x3b000000,0x9e000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xc4000000,0x75000000,
+ 0x36000000,0x98000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xb4000000,0x6c000000,
+ 0x2e000000,0x81000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xee000000,0x9b000000,0x5d000000,
+ 0x25000000,0x57000000,0x98000000,0xcd000000,0xef000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xed000000,0xbd000000,0x7a000000,0x49000000,
+ 0x18000000,0x31000000,0x52000000,0x7a000000,0x9b000000,0xb3000000,0xc4000000,0xcc000000,0xc4000000,0xb3000000,0x9b000000,0x7a000000,0x52000000,0x31000000,
+ 0xf000000,0x1d000000,0x31000000,0x49000000,0x5d000000,0x6c000000,0x75000000,0x7a000000,0x75000000,0x6c000000,0x5d000000,0x49000000,0x31000000,0x1d000000
+};
+
+static const QRgb style_data[] = {
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xffdcdcdc,0xff000000,0xff000000,0xffdcdcdc,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xffdcdcdc,
+ 0x0,0x0,0x0,0xff000000,0xff000000,0xffdcdcdc,0xff000000,0xffdcdcdc,0x0,0x0,0x0,0x0,0xff000000,0xff000000,
+ 0xff000000,0xffdcdcdc,0x0,0x0,0x0,0x0,0xff000000,0xffdcdcdc,0xff000000,0xffdcdcdc,0x0,0x0,0x0,0x0,
+ 0xff000000,0xff000000,0xff000000,0xffdcdcdc,0x0,0x0,0x0,0x0,0xff000000,0xffdcdcdc,0x0,0x0,0x0,0x0,
+ 0x0,0xff000000,0xff000000,0xff000000,0xffdcdcdc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xffdcdcdc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xffdcdcdc,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xffdcdcdc,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xffdcdcdc,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xffdcdcdc,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,
+ 0xff000000,0xffdcdcdc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0xff000000,0xff000000,0xff000000,0xffdcdcdc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0xff000000,0xff000000,0xff000000,0xffdcdcdc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xffdcdcdc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffdcdcdc,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0
+};
+
+static const QRgb table_pattern_data[] = {
+ 0xff598076,0xff5c857b,0xff5c857b,0xff567b72,0xff51756c,0xff577e74,0xff5d867c,0xff598076,0xff52766d,0xff51756c,0xff5a8177,0xff5f897e,0xff598076,0xff50736a,
+ 0xff4f7269,0xff557b71,0xff5b847a,0xff5a8177,0xff588076,0xff54786f,0xff51756c,0xff577d73,0xff598076,0xff547970,0xff51746b,0xff53786e,0xff598076,0xff5d857b,
+ 0xff577d74,0xff52766d,0xff587e74,0xff5d867b,0xff5c847a,0xff598076,0xff587f75,0xff557b71,0xff547a71,0xff587f75,0xff5a8278,0xff598177,0xff587f75,0xff587f75,
+ 0xff598076,0xff5b8278,0xff598076,0xff587f75,0xff5f887d,0xff608b80,0xff567c73,0xff547970,0xff567c72,0xff577e74,0xff587f75,0xff5c857a,0xff608b80,0xff608b80,
+ 0xff5e887e,0xff5c857a,0xff5a8278,0xff5a8177,0xff598076,0xff598076,0xff5b8379,0xff5a8278,0xff51746b,0xff51746b,0xff557a71,0xff587f75,0xff5a8177,0xff5d867c,
+ 0xff608b80,0xff5d877c,0xff597f76,0xff577d74,0xff598076,0xff598076,0xff587f75,0xff577d74,0xff557a71,0xff53776e,0xff567c72,0xff567c72,0xff587f75,0xff5c847a,
+ 0xff5c857b,0xff5f897e,0xff5f897e,0xff577c73,0xff4f726a,0xff53776e,0xff598076,0xff587f75,0xff577e74,0xff587f75,0xff587e74,0xff577d73,0xff5d867b,0xff598076,
+ 0xff5a8278,0xff608a7f,0xff608a80,0xff608a7f,0xff5a8278,0xff50736b,0xff50736a,0xff598076,0xff5f897e,0xff5a8178,0xff557b71,0xff598076,0xff5e877c,0xff5f897e,
+ 0xff5a8278,0xff557b71,0xff5a8278,0xff608b80,0xff5e877d,0xff577d74,0xff50746b,0xff50736a,0xff567d73,0xff5e887d,0xff608b80,0xff587f75,0xff53776e,0xff598076,
+ 0xff618b80,0xff5f8a7f,0xff53776e,0xff51756c,0xff598076,0xff5f887e,0xff598076,0xff50736a,0xff50736b,0xff567d73,0xff5a8177,0xff5c847a,0xff5b8379,0xff547a70,
+ 0xff51746b,0xff587f75,0xff5e877d,0xff598076,0xff51746b,0xff52766d,0xff587f75,0xff5d857b,0xff587e75,0xff53786e,0xff598076,0xff5e887d,0xff5c847a,0xff598076,
+ 0xff587f75,0xff53786f,0xff52766c,0xff587e74,0xff598076,0xff547970,0xff587e74,0xff577e75,0xff598076,0xff5a8278,0xff598076,0xff598076,0xff5e887e,0xff608b80,
+ 0xff5b8379,0xff587f75,0xff577e74,0xff567b72,0xff557b72,0xff598076,0xff598177,0xff598076,0xff5e887e,0xff5c857a,0xff5a8278,0xff598076,0xff587f75,0xff587f75,
+ 0xff598177,0xff587f75,0xff547a71,0xff53786f,0xff567b72,0xff587f75,0xff5b8278,0xff5e887d,0xff618b80,0xff608a7f,0xff598177,0xff587e74,0xff598076,0xff598076,
+ 0xff587f75,0xff577d74,0xff557a71,0xff53776e,0xff51746b,0xff52756c,0xff557b72,0xff5b8379,0xff608b80,0xff638e83,0xff608b80,0xff5d867c,0xff50736b,0xff52766d,
+ 0xff587f75,0xff587f75,0xff577e74,0xff587f75,0xff598076,0xff598076,0xff577e74,0xff577e74,0xff598076,0xff5f887e,0xff638e83,0xff5e887e,0xff5a8177,0xff547a71,
+ 0xff4f7269,0xff587e74,0xff5e887d,0xff5a8278,0xff557b72,0xff598076,0xff5e887e,0xff608a80,0xff5d867b,0xff587f75,0xff5b8278,0xff618c81,0xff608a7f,0xff598177,
+ 0xff547970,0xff4f7169,0xff557b71,0xff5e877d,0xff618c81,0xff598076,0xff53776e,0xff587f75,0xff608a80,0xff5f897e,0xff587f75,0xff547970,0xff5a8278,0xff608b80,
+ 0xff5c857b,0xff547970,0xff4f7169,0xff50726a
+};
+
+static const unsigned char tgz_data[] = {
+ 0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x01,0x02,0x02,0x02,0x02,0x02,0x02,
+ 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x04,0x01,0x01,0x01,0x02,
+ 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x06,0x02,0x01,0x04,0x05,0x04,0x05,
+ 0x04,0x01,0x01,0x01,0x02,0x02,0x02,0x02,0x06,0x06,0x02,0x01,0x05,0x05,
+ 0x05,0x05,0x05,0x04,0x05,0x04,0x01,0x01,0x02,0x06,0x06,0x06,0x01,0x04,
+ 0x05,0x05,0x05,0x05,0x04,0x05,0x04,0x05,0x04,0x01,0x03,0x03,0x03,0x03,
+ 0x01,0x04,0x05,0x05,0x05,0x04,0x05,0x04,0x04,0x04,0x04,0x01,0x02,0x02,
+ 0x02,0x01,0x04,0x05,0x04,0x05,0x04,0x05,0x04,0x05,0x04,0x04,0x04,0x01,
+ 0x02,0x02,0x02,0x01,0x05,0x04,0x05,0x04,0x05,0x04,0x05,0x04,0x05,0x04,
+ 0x00,0x01,0x02,0x02,0x01,0x05,0x04,0x05,0x04,0x05,0x04,0x05,0x04,0x05,
+ 0x04,0x04,0x01,0x02,0x02,0x01,0x04,0x04,0x05,0x04,0x04,0x04,0x05,0x04,
+ 0x04,0x04,0x04,0x04,0x01,0x02,0x01,0x04,0x04,0x04,0x04,0x05,0x04,0x05,
+ 0x04,0x05,0x04,0x05,0x04,0x04,0x01,0x02,0x01,0x00,0x04,0x04,0x04,0x04,
+ 0x04,0x04,0x05,0x04,0x04,0x04,0x04,0x00,0x01,0x02,0x02,0x01,0x01,0x00,
+ 0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x02,0x02,
+ 0x02,0x01,0x01,0x01,0x00,0x04,0x04,0x04,0x04,0x04,0x06,0x06,0x06,0x02,
+ 0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x01,0x01,0x00,0x04,0x00,0x06,0x06,
+ 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x01,0x01,
+ 0x06,0x02,0x02,0x02
+};
+
+static const QRgb tgz_ctable[] = {
+ 0xffc0c000,0xff000000,0xc6c6c6,0xff800000,0xffffffc0,0xffffffff,0xffff0000
+};
+
+static const QRgb toys_data[] = {
+ 0xffffff,0xffffff,0xcccc33,0x0,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x990099,0x663399,0x0,0x0,
+ 0xffffff,0xccff33,0x996666,0x996666,0xff0000,0xffff0000,0xffcc9966,0xff66cccc,0xff6666cc,0xffffff,0xffffff,0xffffff,0x9966cc,0xffffff,
+ 0xcccc33,0x0,0x0,0xffff0000,0xfff4b0b0,0xffffffff,0xff00cc00,0xff00cc00,0xff6666cc,0xff6666cc,0xff6666cc,0xffffff,0xffffff,0x660099,
+ 0xffff33,0x0,0xffff0000,0xfff4b0b0,0xffffffff,0xffffffff,0xffb8efb8,0xff00cc00,0xff66cc99,0xff6666cc,0xff6666cc,0xff6666cc,0xffffff,0x663366,
+ 0x0,0x0,0xffff0000,0xfff4b0b0,0xffffffff,0xffffffff,0xffb8efb8,0xff00cc00,0xff00cc00,0xff6666cc,0xff6666cc,0xff6666cc,0xffffff,0xffffff,
+ 0x0,0xffff0000,0xffff0000,0xffff0000,0xffffffff,0xffb8efb8,0xff00cc00,0xff33cc00,0xff00cc00,0xff66cc99,0xff6666cc,0xff6666cc,0xff3366cc,0xffffff,
+ 0x0,0xff996666,0xffff0000,0xffff0000,0xffcc9966,0xff00cc00,0xff33cc00,0xff00cc00,0xff00cc00,0xff66cccc,0xff6666cc,0xff6666cc,0xff3366cc,0xffffff,
+ 0x0,0xff996666,0xffff0000,0xffff0000,0xffcc9966,0xff33cc00,0xff00cc00,0xff00cc00,0xff00cc00,0xff66cc99,0xff6666cc,0xff6666cc,0xff333366,0x333366,
+ 0x0,0xff996666,0xff996666,0xffff0000,0xffcc9966,0xff00cc00,0xff00cc00,0xff00cc00,0xff00cc00,0xff66cccc,0xff6666cc,0xff6666cc,0xff336666,0x0,
+ 0x0,0xff663333,0xff996666,0xffff0000,0xffff0000,0xff00cc00,0xff33cc00,0xff00cc00,0xff00cc00,0xff6666cc,0xff6666cc,0xff6666cc,0xff000000,0x0,
+ 0xffff33,0x333333,0xff663333,0xff996666,0xffff0000,0xffcc6666,0xff00cc00,0xff00cc00,0xff66cccc,0xff6666cc,0xff6666cc,0xff663366,0x663366,0x660099,
+ 0xcccc33,0x0,0xff000000,0xff663333,0xff996666,0xff996666,0xff497a49,0xff497a49,0xff6666cc,0xff6666cc,0xff663366,0xff000000,0x0,0x663366,
+ 0x0,0xffff33,0x0,0x0,0xff000000,0xff663333,0xff663333,0xff663366,0xff663366,0xff663366,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0x0,0x0,0xcccc33,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000
+};
+
+static const unsigned char trash_data[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x02,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x02,0x03,0x01,0x04,0x01,0x01,0x01,
+ 0x01,0x00,0x00,0x00,0x00,0x01,0x05,0x05,0x05,0x06,0x06,0x06,0x07,0x01,
+ 0x06,0x06,0x03,0x01,0x00,0x00,0x00,0x01,0x02,0x03,0x06,0x05,0x05,0x05,
+ 0x06,0x06,0x04,0x04,0x04,0x01,0x00,0x00,0x00,0x00,0x01,0x07,0x02,0x02,
+ 0x03,0x03,0x03,0x03,0x07,0x07,0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x03,
+ 0x03,0x03,0x07,0x07,0x04,0x04,0x07,0x08,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x01,0x03,0x05,0x03,0x02,0x09,0x07,0x07,0x04,0x08,0x01,0x00,0x00,0x00,
+ 0x00,0x00,0x01,0x03,0x05,0x03,0x02,0x09,0x07,0x07,0x04,0x08,0x01,0x00,
+ 0x00,0x00,0x00,0x00,0x01,0x03,0x05,0x03,0x02,0x09,0x07,0x07,0x04,0x08,
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x05,0x03,0x02,0x09,0x07,0x07,
+ 0x04,0x08,0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x05,0x03,0x02,0x09,
+ 0x07,0x07,0x04,0x08,0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x05,0x03,
+ 0x02,0x09,0x07,0x07,0x04,0x08,0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x03,
+ 0x05,0x03,0x02,0x09,0x07,0x07,0x04,0x08,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x01,0x02,0x05,0x03,0x02,0x09,0x07,0x07,0x04,0x08,0x01,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x01,0x01,0x02,0x02,0x03,0x03,0x07,0x01,0x01,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x00,0x00,
+ 0x00,0x00,0x00,0x00
+};
+
+static const QRgb trash_ctable[] = {
+ 0xc6c6c6,0xff000000,0xffdcdcdc,0xffa0a0a4,0xff585858,0xffffffff,0xffc0c0c0,0xff808080,0xff303030,0xffa0a0a0
+};
+
+static const unsigned char txt_data[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x15,0x01,0x01,0x01,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x15,0x0d,0x15,0x0d,
+ 0x15,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0d,0x0d,
+ 0x0d,0x0d,0x0d,0x15,0x0d,0x15,0x01,0x01,0x00,0x00,0x00,0x00,0x01,0x15,
+ 0x0d,0x0d,0x0d,0x0d,0x15,0x0d,0x15,0x0d,0x15,0x01,0x00,0x00,0x00,0x00,
+ 0x01,0x15,0x0d,0x0d,0x0d,0x15,0x0d,0x15,0x15,0x15,0x15,0x01,0x00,0x00,
+ 0x00,0x01,0x15,0x0d,0x15,0x0d,0x15,0x0d,0x15,0x0d,0x15,0x15,0x15,0x01,
+ 0x00,0x00,0x00,0x01,0x0d,0x15,0x0d,0x15,0x0d,0x15,0x0d,0x15,0x0d,0x15,
+ 0x08,0x01,0x00,0x00,0x01,0x0d,0x15,0x0d,0x15,0x0d,0x15,0x0d,0x15,0x0d,
+ 0x15,0x15,0x01,0x00,0x00,0x01,0x15,0x15,0x0d,0x15,0x15,0x15,0x0d,0x15,
+ 0x15,0x15,0x15,0x15,0x01,0x00,0x01,0x15,0x15,0x15,0x15,0x0d,0x15,0x0d,
+ 0x15,0x0d,0x15,0x0d,0x15,0x15,0x01,0x00,0x01,0x08,0x15,0x15,0x15,0x15,
+ 0x15,0x15,0x0d,0x15,0x15,0x15,0x15,0x08,0x01,0x00,0x00,0x01,0x01,0x08,
+ 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x01,0x00,0x00,0x00,0x00,
+ 0x00,0x01,0x01,0x01,0x08,0x15,0x15,0x15,0x15,0x15,0x08,0x01,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x08,0x15,0x08,0x01,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,
+ 0x00,0x00,0x00,0x00
+};
+
+static const QRgb txt_ctable[] = {
+ 0xc6c6c6,0xff000000,0xffc3c3c3,0xff303030,0xffc0c0ff,0xffff0000,0xff008080,0xff800000,0xffc0c000,0xff0000c0,0xff808080,0xffc0ffc0,0xff00ffff,0xffffffff,
+ 0xffa0a0a0,0xff00ff00,0xffffff00,0xffffc0ff,0xff404000,0xff00c000,0xff000080,0xffffffc0,0xff400000,0xffc05800,0xff800080,0xff008000,0xff00c0c0,0xffdcdcdc,
+ 0xffff8000,0xffffc0c0,0xff585858,0xffc00000,0xffffdca8,0xff808000,0xffffa858,0xff004000,0xffc000c0,0xff0000ff,0xffff00ff,0xffc0ffff,0xff004040
+};
+
+static const QRgb underline_data[] = {
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,
+ 0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,
+ 0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,
+ 0x0,0x0,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0xff000000,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0xff000000,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,0x0,0x0,
+ 0x0,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,0xff000000,0x0,0x0,
+ 0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff000000,
+ 0xff000000,0x0,0x0,0x0,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x0,
+ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ 0x0,0x0,0x0,0x0
+};
+
+static const QRgb uninstall_data[] = {
+ 0xff,0xff3300,0xff,0xff3300,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xfff80000,0xfff80000,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfff80000,0xfff80000,0xff,
+ 0xff,0xfff80000,0xfff80000,0xfff80000,0xff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff,0xfff80000,0xfff80000,0xfff80000,0xff,
+ 0xff,0xff,0xfff80000,0xfff80000,0xfff80000,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xfff80000,0xfff80000,0xfff80000,0xff,0xff,
+ 0xff,0xff,0xff,0xfff80000,0xfff80000,0xfff80000,0xffffffff,0xff00b6ff,0xfff80000,0xfff80000,0xfff80000,0xffff,0xff,0xffff,
+ 0xff,0xffff,0xff0000ff,0xff00b6ff,0xfff80000,0xfff80000,0xfff80000,0xfff80000,0xfff80000,0xfff80000,0xff00b6ff,0xff0000ff,0xff,0xff,
+ 0xff,0xff,0xff0000ff,0xff00b6ff,0xffffffff,0xfff80000,0xfff80000,0xfff80000,0xfff80000,0xff00b6ff,0xff00b6ff,0xff0000ff,0xff,0xffff,
+ 0xff,0xffff,0xff0000ff,0xff00b6ff,0xff00b6ff,0xfff80000,0xfff80000,0xfff80000,0xfff80000,0xff00b6ff,0xff00b6ff,0xff0000ff,0xff,0xff,
+ 0xff,0xff,0xff0000ff,0xff00b6ff,0xfff80000,0xfff80000,0xfff80000,0xfff80000,0xfff80000,0xfff80000,0xff00b6ff,0xff0000ff,0xff,0xffff,
+ 0xff,0xffff,0xff,0xfff80000,0xfff80000,0xfff80000,0xff00b6ff,0xff00b6ff,0xfff80000,0xfff80000,0xfff80000,0xff,0xff,0xff,
+ 0xff,0xff,0xfff80000,0xfff80000,0xfff80000,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xff00b6ff,0xfff80000,0xfff80000,0xfff80000,0xff,0xffff,
+ 0xff,0xfff80000,0xfff80000,0xfff80000,0xff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xffff,0xfff80000,0xfff80000,0xfff80000,0xff,
+ 0xff,0xfff80000,0xfff80000,0xff,0xff,0xffff,0xff,0xffff,0xff,0xffff,0xff,0xfff80000,0xfff80000,0xffff,
+ 0xff,0xffff,0xff,0xffff,0xff,0xffff,0xff,0xffff,0xff,0xffff,0xff,0xff,0xff,0xff
+};
+
+static const unsigned char uninstalled_data[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x02,0x03,
+ 0x02,0x02,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x03,
+ 0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x02,0x02,
+ 0x02,0x03,0x02,0x02,0x02,0x02,0x04,0x03,0x04,0x00,0x00,0x00,0x00,0x02,
+ 0x05,0x02,0x03,0x02,0x05,0x02,0x05,0x04,0x04,0x03,0x04,0x00,0x00,0x00,
+ 0x00,0x05,0x05,0x05,0x03,0x05,0x05,0x05,0x05,0x05,0x04,0x03,0x03,0x00,
+ 0x00,0x00,0x00,0x05,0x05,0x05,0x03,0x05,0x05,0x05,0x05,0x04,0x04,0x03,
+ 0x04,0x00,0x00,0x00,0x00,0x05,0x05,0x05,0x03,0x05,0x05,0x05,0x05,0x05,
+ 0x03,0x03,0x04,0x00,0x00,0x00,0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+ 0x03,0x03,0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x05,0x05,0x05,0x03,0x05,
+ 0x05,0x05,0x05,0x05,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x05,0x05,
+ 0x03,0x05,0x05,0x05,0x05,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+};
+
+static const QRgb uninstalled_ctable[] = {
+ 0x40ffffff,0xfff8fcf8,0xfff8b490,0xffb04400,0xfff80000,0xfff86c00
+};
+
+static const QRgb up_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x5d707779,0xe0494e4f,0x84666d6e,0xe000000,0x3000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0x5d707779,0xfc202323,0xffffffff,0xfd202323,0x9b595f61,0x18000000,0x3000000,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0x5d707779,0xfc202323,0xffffffff,0xffffffff,0xfffcfcfc,0xfe202324,0xa0575c5d,0x18000000,0x3000000,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0x5d707779,0xfc202323,0xffffffff,0xffffffff,0xffffffff,0xfffcfcfc,0xfff4f4f4,0xfe202324,0xa0575c5d,0x18000000,0x3000000,0xffffff,
+ 0xffffff,0x5d707779,0xfc202323,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfff4f4f4,0xffededed,0xffe8e8e8,0xfe202324,0xa0575c5d,0x18000000,0x3000000,
+ 0xffffff,0xff000000,0xffffffff,0xfffcfcfc,0xfff8f8f8,0xfffefefe,0xfff6f6f6,0xffdddddd,0xffcccccc,0xffcbcbcb,0xffd3d3d3,0xff000000,0x49000000,0x13000000,
+ 0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xffffffff,0xfff6f6f6,0xffcccccc,0xff000000,0xff000000,0xff000000,0xff000000,0x7c000000,0x27000000,
+ 0xffffff,0x24000000,0x6b000000,0x8f000000,0xff000000,0xffffffff,0xffeeeeee,0xffc9c9c9,0xff000000,0xb3000000,0x9b000000,0x8f000000,0x6b000000,0x24000000,
+ 0xffffff,0xc000000,0x24000000,0x30000000,0xff000000,0xfff5f5f5,0xffd3d3d3,0xffc9c9c9,0xff000000,0x9b000000,0x54000000,0x30000000,0x24000000,0xc000000,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x8f000000,0x30000000,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0x24000000,0x6b000000,0x8f000000,0x8f000000,0x8f000000,0x6b000000,0x24000000,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x24000000,0x30000000,0x30000000,0x30000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0x1000000,0x1000000,0x2000000,0x2000000,0x3000000,0x1000000,0x1000000,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff
+};
+
+static const QRgb volume_data[] = {
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xff000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xff000000,0x6b000000,0x24000000,0xff000000,0x18000000,0xc000000,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0x8f000000,0x30000000,0x18000000,0xff000000,0x30000000,0xc000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xff000000,0x8f000000,0xff000000,0x24000000,0x3c000000,0xff000000,0x30000000,
+ 0xff000000,0xffd5eaff,0xffd6eaff,0xffd6eaff,0xffd5e9ff,0xffd6e9ff,0xffd6e9ff,0xff000000,0x8f000000,0x48000000,0xff000000,0x3c000000,0xff000000,0x54000000,
+ 0xff000000,0xff9dceff,0xff9dceff,0xff9dceff,0xff9dceff,0xff9dcdff,0xff9dcdff,0xff000000,0x8f000000,0x3c000000,0xff000000,0x54000000,0xff000000,0x60000000,
+ 0xff000000,0xff60b0ff,0xff60b1ff,0xff60b0ff,0xff61b1ff,0xff60b1ff,0xff60b1ff,0xff000000,0x8f000000,0x30000000,0xff000000,0x60000000,0xff000000,0x60000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff2a9aff,0xff2a9aff,0xff2a9aff,0xff000000,0x8f000000,0xff000000,0x3c000000,0x54000000,0xff000000,0x60000000,
+ 0x24000000,0x6b000000,0x8f000000,0x8f000000,0xff000000,0xff2a9aff,0xff2a9aff,0xff000000,0x8f000000,0x48000000,0x3c000000,0xff000000,0x48000000,0x54000000,
+ 0xc000000,0x24000000,0x30000000,0x30000000,0x48000000,0xff000000,0xff2a9aff,0xff000000,0x8f000000,0x3c000000,0xff000000,0x3c000000,0x48000000,0x30000000,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x3c000000,0xff000000,0xff000000,0x8f000000,0x30000000,0x18000000,0x3c000000,0x30000000,0xc000000,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x3c000000,0x77000000,0x6b000000,0x24000000,0xc000000,0x18000000,0xc000000,0xffffff,
+ 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xc000000,0x24000000,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,0xffffff
+};
+
+static const QRgb wait_data[] = {
+ 0x1000000,0x1d000000,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0x28000000,0xb000000,0x5000000,
+ 0x3000000,0x15000000,0x33000000,0xff888888,0xff8e8e8e,0xff949494,0xff9b9b9b,0xffa1a1a1,0xffa6a6a6,0xffababab,0x4b000000,0x29000000,0x12000000,0x9000000,
+ 0x4000000,0xc000000,0x19000000,0xff9a9a9a,0xffa1a1a1,0xffa6a6a6,0xffadadad,0xffb3b3b3,0xffb7b7b7,0xffbbbbbb,0x41000000,0x2b000000,0x19000000,0xc000000,
+ 0x4000000,0xe000000,0x1d000000,0xff888888,0xff8b8b8b,0xff8e8e8e,0xff919191,0xff929292,0xff949494,0xff929292,0x4d000000,0x32000000,0x1d000000,0xe000000,
+ 0x4000000,0xe000000,0x1e000000,0xcc515151,0xff7a7a7a,0xff7b7b7b,0xff7c7c7c,0xff7c7c7c,0xff7b7b7b,0xda4d4d4d,0x51000000,0x34000000,0x1e000000,0xe000000,
+ 0x4000000,0xc000000,0x1b000000,0x31000000,0xd24e4e4e,0xff7a7a7a,0xff7a7a7a,0xff7a7a7a,0xde4b4b4b,0x6a000000,0x4f000000,0x31000000,0x1b000000,0xc000000,
+ 0x2000000,0xa000000,0x17000000,0x2c000000,0x48000000,0xd74f4f4f,0xff838383,0xde4e4e4e,0x78000000,0x63000000,0x48000000,0x2c000000,0x17000000,0xa000000,
+ 0x2000000,0x7000000,0x13000000,0x28000000,0x41000000,0xd5595959,0xffa1a1a1,0xdc5b5b5b,0x70000000,0x5b000000,0x41000000,0x28000000,0x13000000,0x7000000,
+ 0x2000000,0x7000000,0x13000000,0x28000000,0xce636363,0xffadadad,0xffb6b6b6,0xffbdbdbd,0xdb6f6f6f,0x5b000000,0x41000000,0x28000000,0x13000000,0x7000000,
+ 0x2000000,0xa000000,0x17000000,0xca646464,0xffababab,0xffaeaeae,0xffadadad,0xffc2c2c2,0xffc7c7c7,0xd87b7b7b,0x48000000,0x2c000000,0x17000000,0xa000000,
+ 0x4000000,0xc000000,0x1b000000,0xffa3a3a3,0xffababab,0xffa4a4a4,0xff909090,0xffc2c2c2,0xffc8c8c8,0xffcecece,0x4f000000,0x31000000,0x1b000000,0xc000000,
+ 0x4000000,0xe000000,0x1e000000,0xffa0a0a0,0xff999999,0xff848484,0xff7b7b7b,0xff888888,0xff8e8e8e,0xff8d8d8d,0x51000000,0x34000000,0x1e000000,0xe000000,
+ 0x4000000,0x19000000,0x3d000000,0xff707070,0xff696969,0xff656565,0xff656565,0xff656565,0xff656565,0xff656565,0x66000000,0x3c000000,0x1d000000,0xe000000,
+ 0x4000000,0x23000000,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0xffa77843,0x3f000000,0x19000000,0xc000000
+};
+
+static const QRgb week_data[] = {
+ 0xe000000,0x18000000,0x23000000,0x2e000000,0x35000000,0x39000000,0x3b000000,0x3b000000,0x3b000000,0x39000000,0x35000000,0x2e000000,0x23000000,0x18000000,
+ 0x18000000,0xff7a7fbb,0xff6b71b3,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff5d64ad,0xff454ca2,0xff0d1986,0x3d000000,0x2a000000,
+ 0x24000000,0xff6b71b3,0xff4a51a4,0xff303999,0xff303999,0xff303999,0xff303999,0xff303999,0xff303999,0xff303999,0xff0d1a8b,0xff0a146c,0x5a000000,0x3e000000,
+ 0x2e000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffe5e5e5,0xffaeaeae,0x74000000,0x50000000,
+ 0x35000000,0xffffffff,0xff000000,0xff000000,0xffffffff,0xff000000,0xff000000,0xffffffff,0xff000000,0xff000000,0xffe5e5e5,0xffaeaeae,0x86000000,0x5c000000,
+ 0x39000000,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffe5e5e5,0xffaeaeae,0x90000000,0x63000000,
+ 0x3b000000,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffe5e5e5,0xffaeaeae,0x95000000,0x66000000,
+ 0x3c000000,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffe5e5e5,0xffaeaeae,0x96000000,0x67000000,
+ 0x3b000000,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffe5e5e5,0xffaeaeae,0x95000000,0x66000000,
+ 0x39000000,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffffffff,0xff000000,0xffffffff,0xffe5e5e5,0xffaeaeae,0x90000000,0x63000000,
+ 0x35000000,0xffffffff,0xfffdfdfd,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffe5e5e5,0xffd1d1d1,0xffa4a4a4,0x86000000,0x5c000000,
+ 0x2e000000,0xfff5f5f5,0xffc4c4c4,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffaeaeae,0xffa4a4a4,0xff969696,0x74000000,0x50000000,
+ 0x24000000,0x3e000000,0x5a000000,0x74000000,0x86000000,0x90000000,0x95000000,0x96000000,0x95000000,0x90000000,0x86000000,0x74000000,0x5a000000,0x3e000000,
+ 0x18000000,0x2a000000,0x3d000000,0x4f000000,0x5c000000,0x63000000,0x66000000,0x67000000,0x66000000,0x63000000,0x5c000000,0x4f000000,0x3d000000,0x2a000000
+};
+
+static const QRgb wordgame_data[] = {
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xffffff,
+ 0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,
+ 0xff000000,0xffffffff,0xffffffff,0xffaaaaaa,0xff727272,0xffaaaaaa,0xff8e8e8e,0xff555555,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,
+ 0xff000000,0xffffffff,0xffaaaaaa,0xff555555,0xffffffff,0xffffffff,0xffffffff,0xffaaaaaa,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,
+ 0xff000000,0xffffffff,0xff555555,0xffaaaaaa,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,
+ 0xff000000,0xffffffff,0xff555555,0xffaaaaaa,0xffffffff,0xffffffff,0xff8e8e8e,0xff555555,0xff8e8e8e,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,
+ 0xff000000,0xffffffff,0xff727272,0xff8e8e8e,0xffffffff,0xffffffff,0xffffffff,0xff555555,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,
+ 0xff000000,0xffffffff,0xffe3e3e3,0xff555555,0xffc7c7c7,0xffffffff,0xffc7c7c7,0xff1d1d1d,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,
+ 0xff000000,0xffffffff,0xffffffff,0xffe3e3e3,0xff727272,0xff8e8e8e,0xff8e8e8e,0xffc7c7c7,0xffffffff,0xff737373,0xffb6b6b6,0xffffffff,0xff000000,0xff000000,
+ 0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff747474,0xff525252,0xffffffff,0xff000000,0xff000000,
+ 0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffc7c7c7,0xff909090,0xffffffff,0xff000000,0xff000000,
+ 0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,
+ 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
+ 0x0,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000
+};
+
+static const unsigned char wordgame_shapes_data[] = {
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02,
+ 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+ 0x01,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+ 0x03,0x03,0x01,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+ 0x04,0x04,0x04,0x04,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+ 0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+ 0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x01,0x05,0x05,0x05,0x05,0x05,
+ 0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x02,0x02,0x02,
+ 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x03,
+ 0x03,0x07,0x07,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+ 0x01,0x04,0x04,0x08,0x08,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+ 0x04,0x04,0x01,0x05,0x05,0x07,0x07,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+ 0x05,0x05,0x05,0x05,0x01,0x06,0x06,0x08,0x08,0x06,0x06,0x06,0x06,0x06,
+ 0x06,0x06,0x06,0x06,0x06,0x06,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+ 0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x02,0x02,0x02,0x02,0x02,
+ 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x03,0x07,0x03,
+ 0x03,0x07,0x03,0x03,0x07,0x03,0x03,0x03,0x07,0x03,0x03,0x03,0x01,0x04,
+ 0x08,0x04,0x04,0x08,0x04,0x04,0x08,0x04,0x04,0x04,0x08,0x04,0x04,0x04,
+ 0x01,0x05,0x07,0x05,0x05,0x07,0x05,0x05,0x07,0x05,0x05,0x05,0x07,0x05,
+ 0x05,0x05,0x01,0x06,0x08,0x06,0x06,0x08,0x06,0x06,0x08,0x06,0x06,0x06,
+ 0x08,0x06,0x06,0x06,0x01,0x05,0x05,0x08,0x08,0x05,0x05,0x05,0x05,0x05,
+ 0x05,0x05,0x08,0x08,0x05,0x05,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+ 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x03,0x03,0x03,0x03,0x07,
+ 0x03,0x03,0x03,0x07,0x03,0x07,0x03,0x03,0x03,0x03,0x01,0x04,0x04,0x04,
+ 0x08,0x04,0x04,0x04,0x04,0x08,0x04,0x08,0x04,0x04,0x04,0x04,0x01,0x05,
+ 0x05,0x05,0x05,0x07,0x05,0x05,0x05,0x07,0x05,0x07,0x05,0x05,0x05,0x05,
+ 0x01,0x06,0x06,0x06,0x08,0x06,0x06,0x06,0x06,0x08,0x06,0x08,0x06,0x06,
+ 0x06,0x06,0x01,0x05,0x05,0x08,0x08,0x08,0x05,0x05,0x05,0x05,0x05,0x08,
+ 0x08,0x08,0x05,0x05,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+ 0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x03,0x03,0x03,0x07,0x03,0x03,0x03,
+ 0x03,0x03,0x07,0x03,0x03,0x03,0x03,0x03,0x01,0x04,0x04,0x04,0x04,0x08,
+ 0x04,0x04,0x04,0x04,0x08,0x04,0x04,0x04,0x04,0x04,0x01,0x05,0x05,0x05,
+ 0x07,0x05,0x05,0x05,0x05,0x05,0x07,0x05,0x05,0x05,0x05,0x05,0x01,0x06,
+ 0x06,0x06,0x06,0x08,0x06,0x06,0x06,0x06,0x08,0x06,0x06,0x06,0x06,0x06,
+ 0x01,0x05,0x05,0x05,0x08,0x08,0x08,0x05,0x05,0x05,0x08,0x08,0x08,0x05,
+ 0x05,0x05,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+ 0x02,0x02,0x02,0x02,0x01,0x03,0x03,0x07,0x03,0x03,0x03,0x03,0x03,0x07,
+ 0x03,0x07,0x03,0x03,0x03,0x03,0x01,0x04,0x08,0x04,0x04,0x08,0x04,0x04,
+ 0x04,0x08,0x04,0x08,0x04,0x04,0x04,0x04,0x01,0x05,0x05,0x07,0x05,0x05,
+ 0x05,0x05,0x05,0x07,0x05,0x07,0x05,0x05,0x05,0x05,0x01,0x06,0x08,0x06,
+ 0x06,0x08,0x06,0x06,0x06,0x08,0x06,0x08,0x06,0x06,0x06,0x06,0x01,0x05,
+ 0x05,0x05,0x05,0x08,0x08,0x08,0x05,0x08,0x08,0x08,0x05,0x05,0x05,0x05,
+ 0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+ 0x02,0x02,0x01,0x03,0x07,0x07,0x07,0x07,0x03,0x03,0x07,0x03,0x03,0x03,
+ 0x07,0x03,0x03,0x03,0x01,0x04,0x04,0x08,0x08,0x04,0x04,0x04,0x08,0x04,
+ 0x04,0x04,0x08,0x04,0x04,0x04,0x01,0x05,0x07,0x07,0x07,0x07,0x05,0x05,
+ 0x07,0x05,0x05,0x05,0x07,0x05,0x05,0x05,0x01,0x06,0x06,0x08,0x08,0x06,
+ 0x06,0x06,0x08,0x06,0x06,0x06,0x08,0x06,0x06,0x06,0x01,0x05,0x05,0x05,
+ 0x05,0x05,0x08,0x08,0x08,0x08,0x08,0x05,0x05,0x05,0x05,0x05,0x01,0x02,
+ 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+ 0x01,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+ 0x03,0x03,0x01,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+ 0x04,0x04,0x04,0x04,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+ 0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+ 0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x01,0x05,0x05,0x05,0x05,0x05,
+ 0x05,0x08,0x08,0x08,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x02,0x02,0x02,
+ 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x03,
+ 0x03,0x07,0x07,0x03,0x03,0x07,0x03,0x03,0x07,0x03,0x07,0x07,0x07,0x03,
+ 0x01,0x04,0x04,0x08,0x08,0x04,0x04,0x08,0x04,0x04,0x08,0x04,0x08,0x08,
+ 0x08,0x04,0x01,0x05,0x05,0x05,0x07,0x07,0x05,0x05,0x07,0x05,0x05,0x05,
+ 0x07,0x05,0x05,0x05,0x01,0x06,0x06,0x06,0x08,0x08,0x06,0x06,0x08,0x06,
+ 0x06,0x06,0x08,0x06,0x06,0x06,0x01,0x05,0x05,0x05,0x05,0x05,0x08,0x08,
+ 0x08,0x08,0x08,0x05,0x05,0x05,0x05,0x05,0x01,0x02,0x02,0x02,0x02,0x02,
+ 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x03,0x07,0x03,
+ 0x03,0x07,0x03,0x07,0x07,0x03,0x07,0x03,0x07,0x03,0x03,0x03,0x01,0x04,
+ 0x08,0x04,0x04,0x08,0x04,0x08,0x08,0x04,0x08,0x04,0x08,0x04,0x04,0x04,
+ 0x01,0x05,0x05,0x07,0x05,0x05,0x07,0x05,0x07,0x05,0x05,0x05,0x07,0x05,
+ 0x05,0x05,0x01,0x06,0x06,0x08,0x06,0x06,0x08,0x06,0x08,0x06,0x06,0x06,
+ 0x08,0x06,0x06,0x06,0x01,0x05,0x05,0x05,0x05,0x08,0x08,0x08,0x05,0x08,
+ 0x08,0x08,0x05,0x05,0x05,0x05,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+ 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x03,0x07,0x03,0x03,0x07,
+ 0x03,0x07,0x03,0x07,0x07,0x03,0x07,0x07,0x03,0x03,0x01,0x04,0x08,0x04,
+ 0x04,0x08,0x04,0x08,0x04,0x08,0x08,0x04,0x08,0x08,0x04,0x04,0x01,0x05,
+ 0x05,0x07,0x07,0x07,0x07,0x05,0x07,0x05,0x05,0x05,0x07,0x05,0x05,0x05,
+ 0x01,0x06,0x06,0x08,0x08,0x08,0x08,0x06,0x08,0x06,0x06,0x06,0x08,0x06,
+ 0x06,0x06,0x01,0x05,0x05,0x05,0x08,0x08,0x08,0x05,0x05,0x05,0x08,0x08,
+ 0x08,0x05,0x05,0x05,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+ 0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x03,0x07,0x03,0x03,0x07,0x03,0x07,
+ 0x03,0x03,0x07,0x03,0x07,0x03,0x03,0x03,0x01,0x04,0x08,0x04,0x04,0x08,
+ 0x04,0x08,0x04,0x04,0x08,0x04,0x08,0x04,0x04,0x04,0x01,0x05,0x05,0x07,
+ 0x05,0x05,0x07,0x05,0x07,0x05,0x05,0x05,0x07,0x05,0x05,0x05,0x01,0x06,
+ 0x06,0x08,0x06,0x06,0x08,0x06,0x08,0x06,0x06,0x06,0x08,0x06,0x06,0x06,
+ 0x01,0x05,0x05,0x08,0x08,0x08,0x05,0x05,0x05,0x05,0x05,0x08,0x08,0x08,
+ 0x05,0x05,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+ 0x02,0x02,0x02,0x02,0x01,0x03,0x07,0x03,0x03,0x07,0x03,0x07,0x03,0x03,
+ 0x07,0x03,0x07,0x03,0x03,0x03,0x01,0x04,0x08,0x04,0x04,0x08,0x04,0x08,
+ 0x04,0x04,0x08,0x04,0x08,0x04,0x04,0x04,0x01,0x05,0x05,0x07,0x05,0x05,
+ 0x07,0x05,0x07,0x05,0x05,0x05,0x07,0x05,0x05,0x05,0x01,0x06,0x06,0x08,
+ 0x06,0x06,0x08,0x06,0x08,0x06,0x06,0x06,0x08,0x06,0x06,0x06,0x01,0x05,
+ 0x05,0x08,0x08,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x08,0x08,0x05,0x05,
+ 0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+ 0x02,0x02,0x01,0x03,0x03,0x07,0x07,0x03,0x03,0x07,0x03,0x03,0x07,0x03,
+ 0x07,0x07,0x07,0x03,0x01,0x04,0x04,0x08,0x08,0x04,0x04,0x08,0x04,0x04,
+ 0x08,0x04,0x08,0x08,0x08,0x04,0x01,0x05,0x05,0x07,0x05,0x05,0x07,0x05,
+ 0x07,0x07,0x07,0x05,0x07,0x07,0x07,0x05,0x01,0x06,0x06,0x08,0x06,0x06,
+ 0x08,0x06,0x08,0x08,0x08,0x06,0x08,0x08,0x08,0x06,0x01,0x05,0x05,0x05,
+ 0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x02,
+ 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+ 0x01,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+ 0x03,0x03,0x01,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+ 0x04,0x04,0x04,0x04,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+ 0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+ 0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x01,0x05,0x05,0x05,0x05,0x05,
+ 0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05
+};
+
+static const QRgb wordgame_shapes_ctable[] = {
+ 0xc6c6c6,0xff005e5e,0xff007f7f,0xff00ffff,0xff0000ff,0xffffa100,0xffff0000,0xff000000,0xffffffff
+};
+
+static const unsigned char xtopowerofy_data[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x01,0x01,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,
+ 0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x01,0x01,
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+};
+
+static const QRgb xtopowerofy_ctable[] = {
+ 0xc6c6c6,0xff000000
+};
+
+static const unsigned char ythrootofx_data[] = {
+ 0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x00,0x00,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x01,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x00,0x01,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x01,
+ 0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x01,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,
+ 0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+};
+
+static const QRgb ythrootofx_ctable[] = {
+ 0xc6c6c6,0xff000000
+};
+
+static const unsigned char zoom_data[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x04,0x04,
+ 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x04,0x03,0x03,0x03,0x03,0x03,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x03,0x03,0x00,0x00,0x00,0x00,0x03,
+ 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x03,0x03,
+ 0x03,0x03,0x03,0x00,0x00,0x00,0x03,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x00,0x03,0x04,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x03,0x03,0x03,0x03,
+ 0x03,0x03,0x03,0x00,0x03,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x03,0x03,0x03,0x03,0x03,0x03,
+ 0x03,0x03,0x03,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x03,0x03,0x03,0x03,0x03,0x04,
+ 0x05,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x04,0x04,0x04,0x04,0x04,0x00,0x04,0x05,0x05,0x04,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x05,
+ 0x01,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x04,0x05,0x01,0x02,0x04,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x05,
+ 0x01,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x04,0x05,0x01,0x02,0x04,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x02,
+ 0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+};
+
+static const QRgb zoom_ctable[] = {
+ 0xc6c6c6,0xffffa858,0xffc05800,0xff00ffff,0xff000000,0xffffdca8,0xffffffff
+};
+
+static struct EmbedImage {
+ int width, height, depth;
+ const unsigned char *data;
+ int numColors;
+ const QRgb *colorTable;
+ bool alpha;
+ const char *name;
+} embed_image_vec[] = {
+ { 14, 14, 32, (const unsigned char*)_to1_data, 0, 0, TRUE, "1to1" },
+ { 32, 32, 32, (const unsigned char*)AddressBook_data, 0, 0, TRUE, "AddressBook" },
+ { 32, 32, 32, (const unsigned char*)Appearance_data, 0, 0, TRUE, "Appearance" },
+ { 14, 14, 32, (const unsigned char*)AppsIcon_data, 0, 0, TRUE, "AppsIcon" },
+ { 32, 32, 32, (const unsigned char*)Calculator_data, 0, 0, TRUE, "Calculator" },
+ { 32, 32, 32, (const unsigned char*)Calibrate_data, 0, 0, TRUE, "Calibrate" },
+ { 32, 32, 32, (const unsigned char*)CityTime_data, 0, 0, TRUE, "CityTime" },
+ { 32, 32, 32, (const unsigned char*)Clock_data, 0, 0, TRUE, "Clock" },
+ { 14, 14, 32, (const unsigned char*)CloseButton_data, 0, 0, TRUE, "CloseButton" },
+ { 32, 32, 32, (const unsigned char*)DateBook_data, 0, 0, TRUE, "DateBook" },
+ { 32, 32, 32, (const unsigned char*)DateTime_data, 0, 0, TRUE, "DateTime" },
+ { 14, 14, 32, (const unsigned char*)DocsIcon_data, 0, 0, TRUE, "DocsIcon" },
+ { 32, 32, 32, (const unsigned char*)DocumentTypeExcel_data, 0, 0, TRUE, "DocumentTypeExcel" },
+ { 32, 32, 32, (const unsigned char*)DocumentTypeNone_data, 0, 0, TRUE, "DocumentTypeNone" },
+ { 32, 32, 32, (const unsigned char*)DocumentTypePowerPoint_data, 0, 0, TRUE, "DocumentTypePowerPoint" },
+ { 32, 32, 32, (const unsigned char*)DocumentTypeWord_data, 0, 0, TRUE, "DocumentTypeWord" },
+ { 32, 32, 32, (const unsigned char*)FileBrowser_data, 0, 0, TRUE, "FileBrowser" },
+ { 14, 14, 32, (const unsigned char*)Games_data, 0, 0, TRUE, "Games" },
+ { 32, 32, 32, (const unsigned char*)Go_data, 0, 0, TRUE, "Go" },
+ { 12, 12, 32, (const unsigned char*)Go_black_data, 0, 0, TRUE, "Go-black" },
+ { 12, 12, 32, (const unsigned char*)Go_black_highlight_data, 0, 0, TRUE, "Go-black-highlight" },
+ { 12, 12, 32, (const unsigned char*)Go_white_data, 0, 0, TRUE, "Go-white" },
+ { 32, 32, 32, (const unsigned char*)HelpBrowser_data, 0, 0, TRUE, "HelpBrowser" },
+ { 14, 14, 32, (const unsigned char*)HelpButton_data, 0, 0, TRUE, "HelpButton" },
+ { 32, 32, 32, (const unsigned char*)ImageViewer_data, 0, 0, TRUE, "ImageViewer" },
+ { 32, 32, 32, (const unsigned char*)Ipkg_data, 0, 0, TRUE, "Ipkg" },
+ { 32, 32, 32, (const unsigned char*)Language_data, 0, 0, TRUE, "Language" },
+ { 32, 32, 32, (const unsigned char*)Light_data, 0, 0, TRUE, "Light" },
+ { 32, 32, 32, (const unsigned char*)MPEGPlayer_data, 0, 0, TRUE, "MPEGPlayer" },
+ { 32, 32, 32, (const unsigned char*)Mindbreaker_data, 0, 0, TRUE, "Mindbreaker" },
+ { 32, 32, 32, (const unsigned char*)MineHunt_data, 0, 0, TRUE, "MineHunt" },
+ { 32, 32, 32, (const unsigned char*)NetHack_data, 0, 0, TRUE, "NetHack" },
+ { 28, 14, 32, (const unsigned char*)OKButton_data, 0, 0, TRUE, "OKButton" },
+ { 32, 32, 32, (const unsigned char*)Opera_data, 0, 0, TRUE, "Opera" },
+ { 32, 32, 32, (const unsigned char*)PPPConnect_data, 0, 0, TRUE, "PPPConnect" },
+ { 32, 32, 32, (const unsigned char*)ParaShoot_data, 0, 0, TRUE, "ParaShoot" },
+ { 32, 32, 32, (const unsigned char*)Rotation_data, 0, 0, TRUE, "Rotation" },
+ { 14, 14, 32, (const unsigned char*)SettingsIcon_data, 0, 0, TRUE, "SettingsIcon" },
+ { 32, 32, 32, (const unsigned char*)Shutdown_data, 0, 0, TRUE, "Shutdown" },
+ { 32, 32, 32, (const unsigned char*)Snake_data, 0, 0, TRUE, "Snake" },
+ { 32, 32, 32, (const unsigned char*)Solitaire_data, 0, 0, TRUE, "Solitaire" },
+ { 32, 32, 32, (const unsigned char*)Sound_data, 0, 0, TRUE, "Sound" },
+ { 32, 32, 32, (const unsigned char*)SoundPlayer_data, 0, 0, TRUE, "SoundPlayer" },
+ { 32, 32, 32, (const unsigned char*)Spreadsheet_data, 0, 0, TRUE, "Spreadsheet" },
+ { 32, 32, 32, (const unsigned char*)SystemInfo_data, 0, 0, TRUE, "SystemInfo" },
+ { 32, 32, 32, (const unsigned char*)Terminal_data, 0, 0, TRUE, "Terminal" },
+ { 32, 32, 32, (const unsigned char*)Tetrix_data, 0, 0, TRUE, "Tetrix" },
+ { 32, 32, 32, (const unsigned char*)TextEditor_data, 0, 0, TRUE, "TextEditor" },
+ { 32, 32, 32, (const unsigned char*)TodoList_data, 0, 0, TRUE, "TodoList" },
+ { 32, 32, 32, (const unsigned char*)Tux_data, 0, 0, TRUE, "Tux" },
+ { 14, 14, 32, (const unsigned char*)UtilsIcon_data, 0, 0, TRUE, "UtilsIcon" },
+ { 32, 32, 32, (const unsigned char*)WordGame_data, 0, 0, TRUE, "WordGame" },
+ { 14, 14, 32, (const unsigned char*)accessories_data, 0, 0, TRUE, "accessories" },
+ { 16, 16, 32, (const unsigned char*)appearance_data, 0, 0, TRUE, "appearance" },
+ { 14, 14, 32, (const unsigned char*)back_data, 0, 0, TRUE, "back" },
+ { 14, 14, 32, (const unsigned char*)back_inactive_data, 0, 0, TRUE, "back_inactive" },
+ { 32, 32, 32, (const unsigned char*)background_data, 0, 0, TRUE, "background" },
+ { 14, 14, 32, (const unsigned char*)beam_data, 0, 0, TRUE, "beam" },
+ { 14, 14, 32, (const unsigned char*)bell_data, 0, 0, TRUE, "bell" },
+ { 32, 32, 8, (const unsigned char*)bg_data, 85, bg_ctable, FALSE, "bg" },
+ { 14, 14, 32, (const unsigned char*)binary_data, 0, 0, TRUE, "binary" },
+ { 16, 16, 32, (const unsigned char*)bold_data, 0, 0, TRUE, "bold" },
+ { 16, 16, 8, (const unsigned char*)c_src_data, 41, c_src_ctable, TRUE, "c_src" },
+ { 14, 14, 32, (const unsigned char*)calculator_data, 0, 0, TRUE, "calculator" },
+ { 16, 16, 32, (const unsigned char*)center_data, 0, 0, TRUE, "center" },
+ { 16, 16, 8, (const unsigned char*)citytime_icon_data, 14, citytime_icon_ctable, TRUE, "citytime_icon" },
+ { 14, 14, 32, (const unsigned char*)close_data, 0, 0, TRUE, "close" },
+ { 14, 14, 32, (const unsigned char*)copy_data, 0, 0, TRUE, "copy" },
+ { 14, 14, 32, (const unsigned char*)copy_inactive_data, 0, 0, TRUE, "copy_inactive" },
+ { 14, 14, 32, (const unsigned char*)cut_data, 0, 0, TRUE, "cut" },
+ { 14, 14, 32, (const unsigned char*)cut_inactive_data, 0, 0, TRUE, "cut_inactive" },
+ { 14, 14, 32, (const unsigned char*)datebook_icon_data, 0, 0, TRUE, "datebook_icon" },
+ { 14, 14, 32, (const unsigned char*)day_data, 0, 0, TRUE, "day" },
+ { 14, 14, 32, (const unsigned char*)done_data, 0, 0, TRUE, "done" },
+ { 14, 14, 32, (const unsigned char*)edit_data, 0, 0, TRUE, "edit" },
+ { 14, 14, 32, (const unsigned char*)editdelete_data, 0, 0, TRUE, "editdelete" },
+ { 14, 14, 32, (const unsigned char*)enter_data, 0, 0, TRUE, "enter" },
+ { 16, 16, 8, (const unsigned char*)exec_data, 11, exec_ctable, TRUE, "exec" },
+ { 32, 32, 8, (const unsigned char*)faded_bg_data, 40, faded_bg_ctable, TRUE, "faded_bg" },
+ { 14, 14, 32, (const unsigned char*)fastback_data, 0, 0, TRUE, "fastback" },
+ { 14, 14, 32, (const unsigned char*)fastforward_data, 0, 0, TRUE, "fastforward" },
+ { 14, 14, 32, (const unsigned char*)fileopen_data, 0, 0, TRUE, "fileopen" },
+ { 14, 14, 32, (const unsigned char*)find_data, 0, 0, TRUE, "find" },
+ { 14, 14, 32, (const unsigned char*)finish_data, 0, 0, TRUE, "finish" },
+ { 14, 14, 32, (const unsigned char*)folder_data, 0, 0, TRUE, "folder" },
+ { 16, 16, 8, (const unsigned char*)folder_open_data, 11, folder_open_ctable, TRUE, "folder_open" },
+ { 14, 14, 32, (const unsigned char*)forward_data, 0, 0, TRUE, "forward" },
+ { 14, 14, 32, (const unsigned char*)forward_inactive_data, 0, 0, TRUE, "forward_inactive" },
+ { 14, 14, 32, (const unsigned char*)fullscreen_data, 0, 0, TRUE, "fullscreen" },
+ { 19, 19, 32, (const unsigned char*)go_data, 0, 0, FALSE, "go" },
+ { 16, 16, 8, (const unsigned char*)h_src_data, 41, h_src_ctable, TRUE, "h_src" },
+ { 14, 14, 32, (const unsigned char*)help_icon_data, 0, 0, TRUE, "help_icon" },
+ { 14, 14, 32, (const unsigned char*)home_data, 0, 0, TRUE, "home" },
+ { 14, 14, 8, (const unsigned char*)install_data, 10, install_ctable, TRUE, "install" },
+ { 14, 14, 32, (const unsigned char*)installed_data, 0, 0, TRUE, "installed" },
+ { 16, 16, 32, (const unsigned char*)italic_data, 0, 0, TRUE, "italic" },
+ { 16, 16, 8, (const unsigned char*)konsole_data, 5, konsole_ctable, TRUE, "konsole" },
+ { 16, 16, 32, (const unsigned char*)language_data, 0, 0, TRUE, "language" },
+ { 32, 32, 32, (const unsigned char*)launching_data, 0, 0, TRUE, "launching" },
+ { 16, 16, 32, (const unsigned char*)left_data, 0, 0, TRUE, "left" },
+ { 14, 14, 32, (const unsigned char*)library_data, 0, 0, TRUE, "library" },
+ { 16, 16, 8, (const unsigned char*)locked_data, 8, locked_ctable, TRUE, "locked" },
+ { 16, 16, 8, (const unsigned char*)lockedfolder_data, 10, lockedfolder_ctable, TRUE, "lockedfolder" },
+ { 10, 10, 32, (const unsigned char*)mag_data, 0, 0, TRUE, "mag" },
+ { 14, 14, 32, (const unsigned char*)month_data, 0, 0, TRUE, "month" },
+ { 14, 14, 32, (const unsigned char*)mute_data, 0, 0, TRUE, "mute" },
+ { 14, 14, 32, (const unsigned char*)new_data, 0, 0, TRUE, "new" },
+ { 14, 14, 32, (const unsigned char*)newfolder_data, 0, 0, TRUE, "newfolder" },
+ { 14, 14, 32, (const unsigned char*)next_data, 0, 0, TRUE, "next" },
+ { 13, 11, 8, (const unsigned char*)oneoverx_data, 2, oneoverx_ctable, TRUE, "oneoverx" },
+ { 16, 14, 8, (const unsigned char*)pass_data, 3, pass_ctable, TRUE, "pass" },
+ { 14, 14, 32, (const unsigned char*)paste_data, 0, 0, TRUE, "paste" },
+ { 14, 14, 32, (const unsigned char*)paste_inactive_data, 0, 0, TRUE, "paste_inactive" },
+ { 16, 16, 8, (const unsigned char*)pixmap_data, 20, pixmap_ctable, TRUE, "pixmap" },
+ { 14, 14, 32, (const unsigned char*)play_data, 0, 0, TRUE, "play" },
+ { 14, 14, 32, (const unsigned char*)play2_data, 0, 0, TRUE, "play2" },
+ { 14, 14, 32, (const unsigned char*)programs_data, 0, 0, TRUE, "programs" },
+ { 14, 14, 32, (const unsigned char*)quit_icon_data, 0, 0, TRUE, "quit_icon" },
+ { 15, 15, 32, (const unsigned char*)repeat_data, 0, 0, TRUE, "repeat" },
+ { 14, 14, 8, (const unsigned char*)reset_data, 3, reset_ctable, TRUE, "reset" },
+ { 16, 16, 32, (const unsigned char*)right_data, 0, 0, TRUE, "right" },
+ { 14, 14, 32, (const unsigned char*)rotate_data, 0, 0, TRUE, "rotate" },
+ { 14, 14, 32, (const unsigned char*)start_data, 0, 0, TRUE, "start" },
+ { 14, 14, 32, (const unsigned char*)stop_data, 0, 0, TRUE, "stop" },
+ { 16, 16, 32, (const unsigned char*)style_data, 0, 0, TRUE, "style" },
+ { 16, 16, 32, (const unsigned char*)table_pattern_data, 0, 0, TRUE, "table_pattern" },
+ { 16, 16, 8, (const unsigned char*)tgz_data, 7, tgz_ctable, TRUE, "tgz" },
+ { 14, 14, 32, (const unsigned char*)toys_data, 0, 0, TRUE, "toys" },
+ { 16, 16, 8, (const unsigned char*)trash_data, 10, trash_ctable, TRUE, "trash" },
+ { 16, 16, 8, (const unsigned char*)txt_data, 41, txt_ctable, TRUE, "txt" },
+ { 16, 16, 32, (const unsigned char*)underline_data, 0, 0, TRUE, "underline" },
+ { 14, 14, 32, (const unsigned char*)uninstall_data, 0, 0, TRUE, "uninstall" },
+ { 14, 14, 8, (const unsigned char*)uninstalled_data, 6, uninstalled_ctable, TRUE, "uninstalled" },
+ { 14, 14, 32, (const unsigned char*)up_data, 0, 0, TRUE, "up" },
+ { 14, 14, 32, (const unsigned char*)volume_data, 0, 0, TRUE, "volume" },
+ { 14, 14, 32, (const unsigned char*)wait_data, 0, 0, TRUE, "wait" },
+ { 14, 14, 32, (const unsigned char*)week_data, 0, 0, TRUE, "week" },
+ { 14, 14, 32, (const unsigned char*)wordgame_data, 0, 0, TRUE, "wordgame" },
+ { 96, 16, 8, (const unsigned char*)wordgame_shapes_data, 9, wordgame_shapes_ctable, TRUE, "wordgame_shapes" },
+ { 9, 8, 8, (const unsigned char*)xtopowerofy_data, 2, xtopowerofy_ctable, TRUE, "xtopowerofy" },
+ { 13, 11, 8, (const unsigned char*)ythrootofx_data, 2, ythrootofx_ctable, TRUE, "ythrootofx" },
+ { 20, 20, 8, (const unsigned char*)zoom_data, 7, zoom_ctable, TRUE, "zoom" },
+};
+
+static int cmpEmbedImage(const void *a, const void *b)
+{
+ const EmbedImage* ea = (const EmbedImage*)a;
+ const EmbedImage* eb = (const EmbedImage*)b;
+ return strcmp(ea->name,eb->name);
+}
+inline const QImage& qembed_findImage(const char* name)
+{
+ EmbedImage key; key.name = name;
+ EmbedImage* r = (EmbedImage*)bsearch( &key, embed_image_vec,
+ sizeof(embed_image_vec)/sizeof(EmbedImage), sizeof(EmbedImage), cmpEmbedImage );
+ QImage* img;
+ if ( r ) {
+ img = new QImage((uchar*)r->data,
+ r->width,
+ r->height,
+ r->depth,
+#ifdef _WS_QWS_
+ (r->width*r->depth+31)/32*4,
+#endif
+ (QRgb*)r->colorTable,
+ r->numColors,
+ QImage::BigEndian
+ );
+ if ( r->alpha )
+ img->setAlphaBuffer(TRUE);
+ } else {
+ static QImage dummy;
+ img = &dummy;
+ }
+ return *img;
+}
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef INPUTMETHODINTERFACE_H
+#define INPUTMETHODINTERFACE_H
+
+#include <qpe/qcom.h>
+
+#include <qnamespace.h>
+#include <qstring.h>
+
+#ifndef QT_NO_COMPONENT
+// {637A8A14-AF98-41DA-969A-2BD16ECDA8C7}
+# ifndef IID_InputMethod
+# define IID_InputMethod QUuid( 0x637a8a14, 0xaf98, 0x41da, 0x96, 0x9a, 0x2b, 0xd1, 0x6e, 0xcd, 0xa8, 0xc7)
+# endif
+#endif
+
+class QWidget;
+class QPixmap;
+class QObject;
+
+struct InputMethodInterface : public QUnknownInterface
+{
+ virtual QWidget *inputMethod( QWidget *parent, Qt::WFlags f ) = 0;
+ virtual void resetState() = 0;
+ virtual QPixmap *icon() = 0;
+ virtual QString name() = 0;
+ virtual void onKeyPress( QObject *receiver, const char *slot ) = 0;
+};
+
+#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 @@
+#include "ir.h"
+
+#include <qstring.h>
+#include "qcopenvelope_qws.h"
+#include <qcopchannel_qws.h>
+#include "applnk.h"
+
+/*!
+ \class Ir ir.h
+ \brief The Ir class implements basic support for sending objects over an
+ infrared communication link.
+
+ The Ir class is a small helper class to enable sending of objects over an infrared communication link.
+*/
+
+/*!
+ Constructs an Ir object. The \a parent and \a name classes are the
+ standard QObject parameters.
+*/
+Ir::Ir( QObject *parent, const char *name )
+ : QObject( parent, name )
+{
+ ch = new QCopChannel( "QPE/Obex" );
+ connect( ch, SIGNAL(received(const QCString &, const QByteArray &)),
+ this, SLOT(obexMessage( const QCString &, const QByteArray &)) );
+}
+
+/*!
+ Returns TRUE if the system supports infrared communication.
+*/
+bool Ir::supported()
+{
+ return QCopChannel::isRegistered( "QPE/Obex" );
+}
+
+/*!
+ Send the object in the file \a fn over the infrared link.
+ The \a description will be shown to the user while
+ sending is in progress.
+ The optional \a mimetype parameter specifies the mimetype of the object. If this parameter is not
+ set, it will be determined by the extension of the filename.
+*/
+void Ir::send( const QString &fn, const QString &description, const QString &mimetype)
+{
+ if ( !filename.isEmpty() ) return;
+ filename = fn;
+ QCopEnvelope e("QPE/Obex", "send(QString,QString,QString)");
+ e << description << filename << mimetype;
+}
+
+/*!
+ \overload
+
+ Uses the DocLnk::file() and DocLnk::type() of \a doc.
+*/
+void Ir::send( const DocLnk &doc, const QString &description )
+{
+ send( doc.file(), description, doc.type() );
+}
+
+/*!
+ \fn Ir::done( Ir *ir );
+
+ This signal is emitted by \a ir, when the send comand has been processed.
+*/
+
+/*!\internal
+ */
+void Ir::obexMessage( const QCString &msg, const QByteArray &data)
+{
+ if ( msg == "done(QString)" ) {
+ QString fn;
+ QDataStream stream( data, IO_ReadOnly );
+ stream >> fn;
+ if ( fn == filename )
+ emit done( this );
+ }
+}
+
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 @@
+#ifndef IR_H
+#define IR_H
+
+#include <qstring.h>
+#include <qobject.h>
+class DocLnk;
+class QCopChannel;
+
+class Ir : public QObject
+{
+ Q_OBJECT
+public:
+ static bool supported();
+
+ Ir( QObject *parent = 0, const char *name = 0);
+
+ void send( const QString &filename, const QString &description, const QString &mimetype = QString::null );
+ void send( const DocLnk &doc, const QString &description );
+
+signals:
+ void done( Ir * );
+
+private slots:
+ void obexMessage( const QCString &msg, const QByteArray &data);
+private:
+ QString filename;
+ QCopChannel *ch;
+};
+
+
+#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 @@
+TEMPLATE = lib
+CONFIG += qt warn_on release
+HEADERS = calendar.h \
+ global.h \
+ resource.h \
+ xmlreader.h \
+ mimetype.h \
+ menubutton.h \
+ network.h \
+ networkinterface.h \
+ proxies.h \
+ filemanager.h \
+ fontmanager.h \
+ qdawg.h \
+ datebookmonth.h \
+ fileselector.h \
+ imageedit.h \
+ qcopenvelope_qws.h \
+ qpedecoration_qws.h \
+ qpeapplication.h \
+ qpestyle.h \
+ qpedialog.h \
+ lightstyle.h \
+ config.h \
+ applnk.h \
+ sound.h \
+ tzselect.h \
+ qmath.h \
+ datebookdb.h \
+ alarmserver.h \
+ process.h \
+ password.h \
+ timestring.h \
+ fontfactoryinterface.h \
+ fontdatabase.h \
+ power.h \
+ storage.h \
+ qpemessagebox.h \
+ backend/timeconversion.h \
+ qpedebug.h \
+ qpemenubar.h \
+ qpetoolbar.h \
+ backend/categories.h \
+ backend/stringutil.h \
+ backend/palmtopuid.h \
+ backend/palmtoprecord.h \
+ backend/task.h \
+ backend/event.h \
+ backend/contact.h\
+ categorymenu.h \
+ categoryedit_p.h \
+ categoryselect.h \
+ categorywidget.h \
+ ir.h \
+ backend/vobject_p.h \
+ findwidget_p.h \
+ finddialog.h \
+ lnkproperties.h
+
+SOURCES = calendar.cpp \
+ global.cpp \
+ xmlreader.cpp \
+ mimetype.cpp \
+ menubutton.cpp \
+ network.cpp \
+ networkinterface.cpp \
+ proxies.cpp \
+ filemanager.cpp \
+ fontmanager.cpp \
+ qdawg.cpp \
+ datebookmonth.cpp \
+ fileselector.cpp \
+ imageedit.cpp \
+ resource.cpp \
+ qpedecoration_qws.cpp \
+ qcopenvelope_qws.cpp \
+ qpeapplication.cpp \
+ qpestyle.cpp \
+ qpedialog.cpp \
+ lightstyle.cpp \
+ config.cpp \
+ applnk.cpp \
+ sound.cpp \
+ tzselect.cpp \
+ qmath.c \
+ datebookdb.cpp \
+ alarmserver.cpp \
+ password.cpp \
+ process.cpp \
+ process_unix.cpp \
+ timestring.cpp \
+ fontdatabase.cpp \
+ power.cpp \
+ storage.cpp \
+ qpemessagebox.cpp \
+ backend/timeconversion.cpp \
+ qpedebug.cpp \
+ qpemenubar.cpp \
+ qpetoolbar.cpp \
+ backend/categories.cpp \
+ backend/stringutil.cpp \
+ backend/palmtoprecord.cpp \
+ backend/task.cpp \
+ backend/event.cpp \
+ backend/contact.cpp \
+ categorymenu.cpp \
+ categoryedit_p.cpp \
+ categoryselect.cpp \
+ categorywidget.cpp \
+ ir.cpp \
+ backend/vcc_yacc.cpp \
+ backend/vobject.cpp \
+ findwidget_p.cpp \
+ finddialog.cpp \
+ lnkproperties.cpp
+
+# Qt 3 compatibility
+qt2:HEADERS += quuid.h qcom.h qlibrary.h qlibrary_p.h qprocess.h
+qt2:SOURCES += quuid.cpp qlibrary.cpp qlibrary_unix.cpp qprocess.cpp \
+ qprocess_unix.cpp
+
+INCLUDEPATH += $(QPEDIR)/include backend
+LIBS += -ldl -lcrypt -lm
+
+INTERFACES = passwordbase_p.ui proxiesbase_p.ui categoryeditbase_p.ui findwidgetbase_p.ui lnkpropertiesbase_p.ui
+
+TARGET = qpe
+DESTDIR = $(QTDIR)/lib$(PROJMAK)
+# This is set by configure$(QPEDIR).
+VERSION = 1.5.0
+
+TRANSLATIONS = ../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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#include "lightstyle.h"
+
+#if QT_VERSION < 300
+
+#define INCLUDE_MENUITEM_DEF
+#include "qmenubar.h"
+#include "qapplication.h"
+#include "qpainter.h"
+#include "qpalette.h"
+#include "qframe.h"
+#include "qpushbutton.h"
+#include "qdrawutil.h"
+#include "qscrollbar.h"
+#include "qtabbar.h"
+#include "qguardedptr.h"
+#include "qlayout.h"
+#include "qlineedit.h"
+
+
+class LightStylePrivate
+{
+public:
+ LightStylePrivate()
+ : hoverWidget(0), ref(1), savePalette(0)
+ {
+ }
+
+ QGuardedPtr<QWidget> hoverWidget;
+ QPalette oldPalette, hoverPalette;
+ int ref;
+ QPoint mousePos;
+ QPalette *savePalette;
+};
+
+
+static LightStylePrivate *singleton = 0;
+
+
+LightStyle::LightStyle()
+ : QWindowsStyle()
+{
+ if (! singleton) {
+ singleton = new LightStylePrivate;
+
+ QPalette pal = QApplication::palette();
+ singleton->oldPalette = pal;
+
+ QColor bg = pal.color(QPalette::Active, QColorGroup::Background);
+ QColor prelight;
+
+ if ( (bg.red() + bg.green() + bg.blue()) / 3 > 128)
+ prelight = pal.color(QPalette::Active,
+ QColorGroup::Background).light(110);
+ else
+ prelight = pal.color(QPalette::Active,
+ QColorGroup::Background).light(120);
+
+ QColorGroup active2(pal.color(QPalette::Active,
+ QColorGroup::Foreground), // foreground
+ prelight, // button
+ prelight.light(), // light
+ prelight.dark(), // dark
+ prelight.dark(120), // mid
+ pal.color(QPalette::Active,
+ QColorGroup::Text), // text
+ pal.color(QPalette::Active,
+ QColorGroup::BrightText), // bright text
+ pal.color(QPalette::Active,
+ QColorGroup::Base), // base
+ bg); // background
+ active2.setColor(QColorGroup::Highlight,
+ pal.color(QPalette::Active, QColorGroup::Highlight));
+
+ singleton->hoverPalette = pal;
+ singleton->hoverPalette.setActive(active2);
+ singleton->hoverPalette.setInactive(active2);
+ } else
+ singleton->ref++;
+}
+
+
+LightStyle::~LightStyle()
+{
+ if (singleton && singleton->ref-- <= 0) {
+ delete singleton;
+ singleton = 0;
+ }
+}
+
+
+QSize LightStyle::scrollBarExtent() const
+{
+ return QSize(12 + defaultFrameWidth(), 12 + defaultFrameWidth());
+}
+
+
+int LightStyle::buttonDefaultIndicatorWidth() const
+{
+ return 2;
+}
+
+
+int LightStyle::sliderThickness() const
+{
+ return 16;
+}
+
+int LightStyle::sliderLength() const
+{
+ return 13;
+}
+
+
+int LightStyle::buttonMargin() const
+{
+ return 4;
+}
+
+
+QSize LightStyle::exclusiveIndicatorSize() const
+{
+ return QSize(13, 13);
+}
+
+
+int LightStyle::defaultFrameWidth() const
+{
+ return 2;
+}
+
+
+QSize LightStyle::indicatorSize() const
+{
+ return QSize(13, 13);
+}
+
+
+void LightStyle::polish(QWidget *widget)
+{
+ if (widget->inherits("QPushButton"))
+ widget->installEventFilter(this);
+
+#if QT_VERSION >= 300
+ if (widget->inherits("QLineEdit")) {
+ QLineEdit *lineedit = (QLineEdit *) widget;
+ lineedit->setFrameShape(QFrame::StyledPanel);
+ lineedit->setLineWidth(2);
+ }
+#endif
+
+ QWindowsStyle::polish(widget);
+}
+
+
+void LightStyle::unPolish(QWidget *widget)
+{
+ if (widget->inherits("QPushButton"))
+ widget->removeEventFilter(this);
+
+#if QT_VERSION >= 300
+ if (widget->inherits("QLineEdit")) {
+ QLineEdit *lineedit = (QLineEdit *) widget;
+ lineedit->setLineWidth(1);
+ lineedit->setFrameShape(QFrame::WinPanel);
+ }
+#endif
+
+ QWindowsStyle::unPolish(widget);
+}
+
+
+void LightStyle::polish(QApplication *app)
+{
+ QPalette pal = app->palette();
+
+ QColorGroup active(pal.color(QPalette::Active,
+ QColorGroup::Foreground), // foreground
+ pal.color(QPalette::Active,
+ QColorGroup::Button), // button
+ pal.color(QPalette::Active,
+ QColorGroup::Background).light(), // light
+ pal.color(QPalette::Active,
+ QColorGroup::Background).dark(175), // dark
+ pal.color(QPalette::Active,
+ QColorGroup::Background).dark(110), // mid
+ pal.color(QPalette::Active,
+ QColorGroup::Text), // text
+ pal.color(QPalette::Active,
+ QColorGroup::BrightText), // bright text
+ pal.color(QPalette::Active,
+ QColorGroup::Base), // base
+ pal.color(QPalette::Active,
+ QColorGroup::Background)), // background
+
+
+ disabled(pal.color(QPalette::Disabled,
+ QColorGroup::Foreground), // foreground
+ pal.color(QPalette::Disabled,
+ QColorGroup::Button), // button
+ pal.color(QPalette::Disabled,
+ QColorGroup::Background).light(), // light
+ pal.color(QPalette::Disabled,
+ QColorGroup::Background).dark(), // dark
+ pal.color(QPalette::Disabled,
+ QColorGroup::Background).dark(110), // mid
+ pal.color(QPalette::Disabled,
+ QColorGroup::Text), // text
+ pal.color(QPalette::Disabled,
+ QColorGroup::BrightText), // bright text
+ pal.color(QPalette::Disabled,
+ QColorGroup::Base), // base
+ pal.color(QPalette::Disabled,
+ QColorGroup::Background)); // background
+
+ active.setColor(QColorGroup::Highlight,
+ pal.color(QPalette::Active, QColorGroup::Highlight));
+ disabled.setColor(QColorGroup::Highlight,
+ pal.color(QPalette::Disabled, QColorGroup::Highlight));
+
+ active.setColor(QColorGroup::HighlightedText,
+ pal.color(QPalette::Active, QColorGroup::HighlightedText));
+ disabled.setColor(QColorGroup::HighlightedText,
+ pal.color(QPalette::Disabled, QColorGroup::HighlightedText));
+
+ pal.setActive(active);
+ pal.setInactive(active);
+ pal.setDisabled(disabled);
+
+ singleton->oldPalette = pal;
+
+ QColor bg = pal.color(QPalette::Active, QColorGroup::Background);
+ QColor prelight;
+
+ if ( (bg.red() + bg.green() + bg.blue()) / 3 > 128)
+ prelight = pal.color(QPalette::Active,
+ QColorGroup::Background).light(110);
+ else
+ prelight = pal.color(QPalette::Active,
+ QColorGroup::Background).light(120);
+
+ QColorGroup active2(pal.color(QPalette::Active,
+ QColorGroup::Foreground), // foreground
+ prelight, // button
+ prelight.light(), // light
+ prelight.dark(), // dark
+ prelight.dark(120), // mid
+ pal.color(QPalette::Active,
+ QColorGroup::Text), // text
+ pal.color(QPalette::Active,
+ QColorGroup::BrightText), // bright text
+ pal.color(QPalette::Active,
+ QColorGroup::Base), // base
+ bg); // background
+ active2.setColor(QColorGroup::Highlight,
+ pal.color(QPalette::Active, QColorGroup::Highlight));
+
+ singleton->hoverPalette = pal;
+ singleton->hoverPalette.setActive(active2);
+ singleton->hoverPalette.setInactive(active2);
+
+ app->setPalette(pal);
+}
+
+
+void LightStyle::unPolish(QApplication *app)
+{
+ app->setPalette(singleton->oldPalette);
+}
+
+
+void LightStyle::polishPopupMenu(QPopupMenu *menu)
+{
+ menu->setMouseTracking(TRUE);
+}
+
+
+void LightStyle::drawPushButton(QPushButton *button, QPainter *p)
+{
+ int x1, y1, x2, y2;
+ button->rect().coords(&x1, &y1, &x2, &y2);
+
+ if (button->isDefault()) {
+ p->save();
+ p->setPen(button->palette().active().color(QColorGroup::Highlight));
+ p->setBrush(button->palette().active().brush(QColorGroup::Highlight));
+ p->drawRoundRect(x1, y1, x2 - x1 + 1, y2 - y1 + 1, 15, 15);
+ p->restore();
+ }
+
+ if (button->isDefault() || button->autoDefault()) {
+ x1 += buttonDefaultIndicatorWidth();
+ y1 += buttonDefaultIndicatorWidth();
+ x2 -= buttonDefaultIndicatorWidth();
+ y2 -= buttonDefaultIndicatorWidth();
+
+ if (button->isDefault()) {
+ QPointArray pa(8);
+ pa.setPoint(0, x1 + 2, y1 );
+ pa.setPoint(1, x2 - 1, y1 );
+ pa.setPoint(2, x2 + 1, y1 + 2);
+ pa.setPoint(3, x2 + 1, y2 - 2);
+ pa.setPoint(4, x2 - 2, y2 + 1);
+ pa.setPoint(5, x1 + 2, y2 + 1);
+ pa.setPoint(6, x1, y2 - 1);
+ pa.setPoint(7, x1, y1 + 2);
+ QRegion r(pa);
+ p->setClipRegion(r);
+ }
+ }
+
+ QBrush fill;
+ if (button->isDown() || button->isOn())
+ fill = button->colorGroup().brush(QColorGroup::Mid);
+ else
+ fill = button->colorGroup().brush(QColorGroup::Button);
+
+ if ( !button->isFlat() || button->isOn() || button->isDown() )
+ drawButton(p, x1, y1, x2 - x1 + 1, y2 - y1 + 1,
+ button->colorGroup(), button->isOn() || button->isDown(), &fill);
+}
+
+
+void LightStyle::drawButton(QPainter *p, int x, int y, int w, int h,
+ const QColorGroup &g,
+ bool sunken, const QBrush *fill)
+{
+ p->save();
+ if ( fill )
+ p->fillRect(x + 2, y + 2, w - 4, h - 4, *fill);
+ else
+ p->fillRect(x + 2, y + 2, w - 4, h - 4,
+ QBrush(sunken ? g.mid() : g.button()));
+
+ // frame
+ p->setPen(g.dark());
+ p->drawLine(x, y + 2, x, y + h - 3); // left
+ p->drawLine(x + 2, y, x + w - 3, y); // top
+ p->drawLine(x + w - 1, y + 2, x + w - 1, y + h - 3); // right
+ p->drawLine(x + 2, y + h - 1, x + w - 3, y + h - 1); // bottom
+ p->drawPoint(x + 1, y + 1);
+ p->drawPoint(x + 1, y + h - 2);
+ p->drawPoint(x + w - 2, y + 1);
+ p->drawPoint(x + w - 2, y + h - 2);
+
+ // bevel
+ if (sunken)
+ p->setPen(g.mid());
+ else
+ p->setPen(g.light());
+
+ p->drawLine(x + 1, y + 2, x + 1, y + h - 3); // left
+ p->drawLine(x + 2, y + 1, x + w - 3, y + 1); // top
+
+ if (sunken)
+ p->setPen(g.light());
+ else
+ p->setPen(g.mid());
+
+ p->drawLine(x + w - 2, y + 2, x + w - 2, y + h - 3); // right + 1
+ p->drawLine(x + 2, y + h - 2, x + w - 3, y + h - 2); // bottom + 1
+
+ p->restore();
+}
+
+
+void LightStyle::drawBevelButton(QPainter *p, int x, int y, int w, int h,
+ const QColorGroup &g,
+ bool sunken, const QBrush *fill)
+{
+ drawButton(p, x, y, w, h, g, sunken, fill);
+}
+
+
+void LightStyle::getButtonShift(int &x, int &y) const
+{
+ x = y = 0;
+}
+
+
+void LightStyle::drawComboButton(QPainter *p, int x, int y, int w, int h,
+ const QColorGroup &g, bool,
+ bool editable, bool,
+ const QBrush *fill)
+{
+ drawButton(p, x, y, w, h, g, FALSE, fill);
+
+ if (editable) {
+ QRect r = comboButtonRect(x, y, w, h);
+ qDrawShadePanel(p, r.x() - 1, r.y() - 1,
+ r.width() + defaultFrameWidth(),
+ r.height() + defaultFrameWidth(),
+ g, TRUE);
+ }
+
+ int indent = ((y + h) / 2) - 3;
+ int xpos = x;
+
+#if QT_VERSION >= 300
+ if( QApplication::reverseLayout() )
+ xpos += indent;
+ else
+#endif
+ xpos += w - indent - 5;
+
+ drawArrow(p, Qt::DownArrow, TRUE, xpos, indent, 5, 5, g, TRUE, fill);
+}
+
+
+QRect LightStyle::comboButtonRect( int x, int y, int w, int h ) const
+{
+ QRect r(x + 3, y + 3, w - 6, h - 6);
+ int indent = ((y + h) / 2) - 3;
+ r.setRight(r.right() - indent - 10);
+
+#if QT_VERSION >= 300
+ if( QApplication::reverseLayout() )
+ r.moveBy( indent + 10, 0 );
+#endif
+
+ return r;
+}
+
+
+QRect LightStyle::comboButtonFocusRect(int x, int y, int w, int h ) const
+{
+ return comboButtonRect(x, y, w, h);
+}
+
+
+void LightStyle::drawPanel(QPainter *p, int x, int y, int w, int h,
+ const QColorGroup &g, bool sunken,
+ int lw, const QBrush *fill)
+{
+ if (lw >= 2) {
+ if ( fill )
+ p->fillRect(x + 2, y + 2, w - 4, h - 4, *fill);
+
+ QPen oldpen = p->pen();
+
+ // frame
+ p->setPen(g.dark());
+ p->drawLine(x, y + 2, x, y + h - 3); // left
+ p->drawLine(x + 2, y, x + w - 3, y); // top
+ p->drawLine(x + w - 1, y + 2, x + w - 1, y + h - 3); // right
+ p->drawLine(x + 2, y + h - 1, x + w - 3, y + h - 1); // bottom
+ p->drawPoint(x + 1, y + 1);
+ p->drawPoint(x + 1, y + h - 2);
+ p->drawPoint(x + w - 2, y + 1);
+ p->drawPoint(x + w - 2, y + h - 2);
+
+ // bevel
+ if (sunken)
+ p->setPen(g.mid());
+ else
+ p->setPen(g.light());
+
+ p->drawLine(x + 1, y + 2, x + 1, y + h - 3); // left
+ p->drawLine(x + 2, y + 1, x + w - 3, y + 1); // top
+
+ if (sunken)
+ p->setPen(g.light());
+ else
+ p->setPen(g.mid());
+
+ p->drawLine(x + w - 2, y + 2, x + w - 2, y + h - 3); // right + 1
+ p->drawLine(x + 2, y + h - 2, x + w - 3, y + h - 2); // bottom + 1
+
+ // corners
+ p->setPen(g.background());
+ p->drawLine(x, y, x + 1, y);
+ p->drawLine(x, y + h - 1, x + 1, y + h - 1);
+ p->drawLine(x + w - 2, y, x + w - 1, y);
+ p->drawLine(x + w - 2, y + h - 1, x + w - 1, y + h - 1);
+ p->drawPoint(x, y + 1);
+ p->drawPoint(x, y + h - 2);
+ p->drawPoint(x + w - 1, y + 1);
+ p->drawPoint(x + w - 1, y + h - 2);
+
+ p->setPen(oldpen);
+ } else
+ qDrawShadePanel(p, x, y, w, h, g, sunken, lw, fill);
+}
+
+
+void LightStyle::drawIndicator(QPainter *p, int x, int y ,int w, int h,
+ const QColorGroup &g, int state,
+ bool down, bool)
+{
+ drawButton(p, x, y, w, h, g, TRUE,
+ &g.brush(down ? QColorGroup::Mid : QColorGroup::Base));
+
+ p->save();
+
+ p->setPen(g.foreground());
+ if (state == QButton::NoChange) {
+ p->drawLine(x + 3, y + h / 2, x + w - 4, y + h / 2);
+ p->drawLine(x + 3, y + 1 + h / 2, x + w - 4, y + 1 + h / 2);
+ p->drawLine(x + 3, y - 1 + h / 2, x + w - 4, y - 1 + h / 2);
+ } else if (state == QButton::On) {
+ p->drawLine(x + 4, y + 3, x + w - 4, y + h - 5);
+ p->drawLine(x + 3, y + 3, x + w - 4, y + h - 4);
+ p->drawLine(x + 3, y + 4, x + w - 5, y + h - 4);
+ p->drawLine(x + 3, y + h - 5, x + w - 5, y + 3);
+ p->drawLine(x + 3, y + h - 4, x + w - 4, y + 3);
+ p->drawLine(x + 4, y + h - 4, x + w - 4, y + 4);
+ }
+
+ p->restore();
+}
+
+
+void LightStyle::drawExclusiveIndicator(QPainter *p, int x, int y, int w, int h,
+ const QColorGroup &g, bool on,
+ bool down, bool)
+{
+ p->save();
+
+ p->fillRect(x, y, w, h, g.brush(QColorGroup::Background));
+
+ p->setPen(g.dark());
+ p->drawArc(x, y, w, h, 0, 16*360);
+ p->setPen(g.mid());
+ p->drawArc(x + 1, y + 1, w - 2, h - 2, 45*16, 180*16);
+ p->setPen(g.light());
+ p->drawArc(x + 1, y + 1, w - 2, h - 2, 235*16, 180*16);
+
+ p->setPen(down ? g.mid() : g.base());
+ p->setBrush(down ? g.mid() : g.base());
+ p->drawEllipse(x + 2, y + 2, w - 4, h - 4);
+
+ if (on) {
+ p->setBrush(g.foreground());
+ p->drawEllipse(x + 3, y + 3, w - x - 6, h - y - 6);
+ }
+
+ p->restore();
+}
+
+
+
+#if 1
+//copied from QPE style
+void LightStyle::drawTab( QPainter *p, const QTabBar *tb, QTab *t, bool selected )
+{
+#if 0
+ //We can't do this, because QTabBar::focusInEvent redraws the
+ // tab label with the default font.
+ QFont f = tb->font();
+ f.setBold( selected );
+ p->setFont( f );
+#endif
+ QRect r( t->rect() );
+ if ( tb->shape() == QTabBar::RoundedAbove ) {
+ p->setPen( tb->colorGroup().light() );
+ p->drawLine( r.left(), r.bottom(), r.right(), r.bottom() );
+ if ( r.left() == 0 )
+ p->drawPoint( tb->rect().bottomLeft() );
+ else {
+ p->setPen( tb->colorGroup().light() );
+ p->drawLine( r.left(), r.bottom(), r.right(), r.bottom() );
+ }
+
+ if ( selected ) {
+ p->setPen( tb->colorGroup().background() );
+ p->drawLine( r.left()+2, r.top()+1, r.right()-2, r.top()+1 );
+ p->fillRect( QRect( r.left()+1, r.top()+2, r.width()-2, r.height()-2),
+ tb->colorGroup().brush( QColorGroup::Background ));
+
+ } else {
+ r.setRect( r.left() + 2, r.top() + 2,
+ r.width() - 4, r.height() - 2 );
+ p->setPen( tb->colorGroup().button() );
+ p->drawLine( r.left()+2, r.top()+1, r.right()-2, r.top()+1 );
+ p->fillRect( QRect( r.left()+1, r.top()+2, r.width()-2, r.height()-3),
+ tb->colorGroup().brush( QColorGroup::Button ));
+ //do shading; will not work for pixmap brushes
+ QColor bg = tb->colorGroup().button();
+ // int h,s,v;
+ // bg.hsv( &h, &s, &v );
+ int n = r.height()/2;
+ int dark = 100;
+ for ( int i = 1; i < n; i++ ) {
+ dark = (dark * (100+(i*15)/n) )/100;
+ p->setPen( bg.dark( dark ) );
+ int y = r.bottom()-n+i;
+ int x1 = r.left()+1;
+ int x2 = r.right()-1;
+ p->drawLine( x1, y, x2, y );
+ }
+
+ }
+
+ p->setPen( tb->colorGroup().light() );
+ p->drawLine( r.left(), r.bottom()-1, r.left(), r.top() + 2 );
+ p->drawPoint( r.left()+1, r.top() + 1 );
+ p->drawLine( r.left()+2, r.top(),
+ r.right() - 2, r.top() );
+
+ p->setPen( tb->colorGroup().dark() );
+ p->drawPoint( r.right() - 1, r.top() + 1 );
+ p->drawLine( r.right(), r.top() + 2, r.right(), r.bottom() - 1);
+ } else if ( tb->shape() == QTabBar::RoundedBelow ) {
+ if ( selected ) {
+ p->setPen( tb->colorGroup().background() );
+ p->drawLine( r.left()+2, r.bottom()-1, r.right()-2, r.bottom()-1 );
+ p->fillRect( QRect( r.left()+1, r.top(), r.width()-2, r.height()-2),
+ tb->palette().normal().brush( QColorGroup::Background ));
+ } else {
+ p->setPen( tb->colorGroup().dark() );
+ p->drawLine( r.left(), r.top(),
+ r.right(), r.top() );
+ r.setRect( r.left() + 2, r.top(),
+ r.width() - 4, r.height() - 2 );
+ p->setPen( tb->colorGroup().button() );
+ p->drawLine( r.left()+2, r.bottom()-1, r.right()-2, r.bottom()-1 );
+ p->fillRect( QRect( r.left()+1, r.top()+1, r.width()-2, r.height()-3),
+ tb->palette().normal().brush( QColorGroup::Button ));
+ }
+
+ p->setPen( tb->colorGroup().dark() );
+ p->drawLine( r.right(), r.top(),
+ r.right(), r.bottom() - 2 );
+ p->drawPoint( r.right() - 1, r.bottom() - 1 );
+ p->drawLine( r.right() - 2, r.bottom(),
+ r.left() + 2, r.bottom() );
+
+ p->setPen( tb->colorGroup().light() );
+ p->drawLine( r.left(), r.top()+1,
+ r.left(), r.bottom() - 2 );
+ p->drawPoint( r.left() + 1, r.bottom() - 1 );
+ if ( r.left() == 0 )
+ p->drawPoint( tb->rect().topLeft() );
+
+ } else {
+ QCommonStyle::drawTab( p, tb, t, selected );
+ }
+}
+
+#else
+
+void LightStyle::drawTab(QPainter *p, const QTabBar *tabbar, QTab *tab,
+ bool selected)
+{
+ p->save();
+
+ QColorGroup g = tabbar->colorGroup();
+ QRect fr(tab->r);
+ fr.setLeft(fr.left() + 2);
+
+ if (! selected) {
+ if (tabbar->shape() == QTabBar::RoundedAbove ||
+ tabbar->shape() == QTabBar::TriangularAbove) {
+
+ fr.setTop(fr.top() + 2);
+ } else {
+ fr.setBottom(fr.bottom() - 2);
+ }
+ }
+
+ QRegion tabr(tab->r);
+
+ QPointArray cliptri(4);
+ cliptri.setPoint(0, fr.left(), fr.top());
+ cliptri.setPoint(1, fr.left(), fr.top() + 5);
+ cliptri.setPoint(2, fr.left() + 5, fr.top());
+ cliptri.setPoint(3, fr.left(), fr.top());
+ QRegion trir(cliptri);
+ p->setClipRegion(tabr - trir);
+
+ p->setPen( NoPen );
+ p->setBrush(g.brush(selected ? QColorGroup::Background : QColorGroup::Mid));
+
+ fr.setWidth(fr.width() - 1);
+ p->drawRect(fr.left() + 1, fr.top() + 1, fr.width() - 2, fr.height() - 2);
+
+ if (tabbar->shape() == QTabBar::RoundedAbove) {
+ // "rounded" tabs on top
+ fr.setBottom(fr.bottom() - 1);
+
+ p->setPen(g.dark());
+ p->drawLine(fr.left(), fr.top() + 5, fr.left(), fr.bottom() - 1);
+ p->drawLine(fr.left(), fr.top() + 5, fr.left() + 5, fr.top());
+ p->drawLine(fr.left() + 5, fr.top(), fr.right() - 1, fr.top());
+ p->drawLine(fr.right(), fr.top() + 1, fr.right(), fr.bottom() - 1);
+
+ if (selected) {
+ p->drawLine(fr.right(), fr.bottom(), fr.right() + 2, fr.bottom());
+ p->drawPoint(fr.left(), fr.bottom());
+ } else
+ p->drawLine(fr.left(), fr.bottom(), fr.right() + 2, fr.bottom());
+
+ if (fr.left() == 2) {
+ p->drawPoint(fr.left() - 1, fr.bottom() + 1);
+ p->drawPoint(fr.left() - 2, fr.bottom() + 2);
+ }
+
+ if (selected) {
+ p->setPen(g.mid());
+ p->drawLine(fr.right() - 1, fr.top() + 1, fr.right() - 1, fr.bottom() - 2);
+ }
+
+ p->setPen(g.light()); p->setPen(red);
+ p->drawLine(fr.left() + 1, fr.top() + 6, fr.left() + 1,
+ fr.bottom() - (selected ? 0 : 1));
+ p->drawLine(fr.left() + 1, fr.top() + 5, fr.left() + 5, fr.top() + 1);
+ p->drawLine(fr.left() + 6, fr.top() + 1, fr.right() - 3, fr.top() + 1);
+ if (selected) {
+ p->drawLine(fr.right() + 1, fr.bottom() + 1,
+ fr.right() + 2, fr.bottom() + 1);
+ p->drawLine(fr.left(), fr.bottom() + 1, fr.left() + 1, fr.bottom() + 1);
+ } else
+ p->drawLine(fr.left(), fr.bottom() + 1,
+ fr.right() + 2, fr.bottom() + 1);
+ } else if (tabbar->shape() == QTabBar::RoundedBelow) {
+ // "rounded" tabs on bottom
+ fr.setTop(fr.top() + 1);
+
+ p->setPen(g.dark());
+ p->drawLine(fr.left(), fr.top(), fr.left(), fr.bottom() - 1);
+ p->drawLine(fr.left() + 1, fr.bottom(), fr.right() - 1, fr.bottom());
+ p->drawLine(fr.right(), fr.top(), fr.right(), fr.bottom() - 1);
+
+ if (! selected)
+ p->drawLine(fr.left(), fr.top(), fr.right() + 3, fr.top());
+ else
+ p->drawLine(fr.right(), fr.top(), fr.right() + 3, fr.top());
+
+ p->setPen(g.mid());
+ if (selected)
+ p->drawLine(fr.right() - 1, fr.top() + 1, fr.right() - 1, fr.bottom() - 1);
+ else
+ p->drawLine(fr.left(), fr.top() - 1, fr.right() + 3, fr.top() - 1);
+
+ p->setPen(g.light());
+ p->drawLine(fr.left() + 1, fr.top() + (selected ? -1 : 2),
+ fr.left() + 1, fr.bottom() - 1);
+
+ } else {
+ // triangular drawing code
+ QCommonStyle::drawTab(p, tabbar, tab, selected);
+ }
+
+ p->restore();
+}
+#endif
+
+void LightStyle::drawSlider(QPainter *p, int x, int y, int w, int h,
+ const QColorGroup &g, Qt::Orientation orientation,
+ bool above, bool below)
+{
+ drawButton(p, x, y, w, h, g, FALSE, &g.brush(QColorGroup::Button));
+
+ if (orientation == Horizontal) {
+ if (above && below) {
+ drawArrow(p, Qt::UpArrow, FALSE, x + 1, y + 1, w, h / 2, g, TRUE);
+ drawArrow(p, Qt::DownArrow, FALSE, x + 1, y + (h / 2) - 1,
+ w, h / 2, g, TRUE);
+ } else
+ drawArrow(p, (above) ? Qt::UpArrow : Qt::DownArrow,
+ FALSE, x + 1, y, w, h, g, TRUE);
+ } else {
+ if (above && below) {
+ drawArrow(p, Qt::LeftArrow, FALSE, x + 1, y, w / 2, h, g, TRUE);
+ drawArrow(p, Qt::RightArrow, FALSE, x + (w / 2) - 2, y, w / 2, h, g, TRUE);
+ } else
+ drawArrow(p, (above) ? Qt::LeftArrow : Qt::RightArrow,
+ FALSE, x, y, w, h, g, TRUE);
+ }
+}
+
+
+void LightStyle::drawSliderGroove(QPainter *p, int x, int y, int w, int h,
+ const QColorGroup& g, QCOORD c,
+ Qt::Orientation orientation)
+{
+ if (orientation == Horizontal)
+ drawButton(p, x, y+c - 3, w, 6, g, TRUE, &g.brush(QColorGroup::Mid));
+ else
+ drawButton(p, x+c - 3, y, 6, h, g, TRUE, &g.brush(QColorGroup::Mid));
+}
+
+
+void LightStyle::scrollBarMetrics(const QScrollBar *scrollbar,
+ int &sliderMin, int &sliderMax,
+ int &sliderLength, int &buttonDim) const
+{
+ int maxLength;
+ int length = ((scrollbar->orientation() == Horizontal) ?
+ scrollbar->width() : scrollbar->height());
+ int extent = ((scrollbar->orientation() == Horizontal) ?
+ scrollbar->height() : scrollbar->width());
+ extent--;
+
+ if (length > (extent + defaultFrameWidth() - 1) * 2 + defaultFrameWidth())
+ buttonDim = extent - defaultFrameWidth();
+ else
+ buttonDim = (length - defaultFrameWidth()) / 2 - 1;
+
+ sliderMin = buttonDim;
+ maxLength = length - buttonDim * 3;
+
+ if (scrollbar->maxValue() != scrollbar->minValue()) {
+ uint range = scrollbar->maxValue() - scrollbar->minValue();
+ sliderLength = (scrollbar->pageStep() * maxLength) /
+ (range + scrollbar->pageStep());
+
+ if (sliderLength < buttonDim || range > INT_MAX / 2)
+ sliderLength = buttonDim;
+ if (sliderLength > maxLength)
+ sliderLength = maxLength;
+ } else
+ sliderLength = maxLength;
+
+ sliderMax = sliderMin + maxLength - sliderLength;
+}
+
+
+QStyle::ScrollControl LightStyle::scrollBarPointOver(const QScrollBar *scrollbar,
+ int sliderStart, const QPoint &p)
+{
+ if (! scrollbar->rect().contains(p))
+ return NoScroll;
+
+ int sliderMin, sliderMax, sliderLength, buttonDim, pos;
+ scrollBarMetrics( scrollbar, sliderMin, sliderMax, sliderLength, buttonDim );
+
+ if (scrollbar->orientation() == Horizontal)
+ pos = p.x();
+ else
+ pos = p.y();
+
+ if (pos < buttonDim)
+ return SubLine;
+ if (pos < sliderStart)
+ return SubPage;
+ if (pos < sliderStart + sliderLength)
+ return Slider;
+ if (pos < sliderMax + sliderLength)
+ return AddPage;
+ if (pos < sliderMax + sliderLength + buttonDim)
+ return SubLine;
+ return AddLine;
+}
+
+
+
+void LightStyle::drawScrollBarControls( QPainter* p, const QScrollBar* scrollbar,
+ int sliderStart, uint controls,
+ uint activeControl )
+{
+ QColorGroup g = scrollbar->colorGroup();
+
+ int sliderMin, sliderMax, sliderLength, buttonDim;
+ scrollBarMetrics( scrollbar, sliderMin, sliderMax, sliderLength, buttonDim );
+
+ if (sliderStart > sliderMax) { // sanity check
+ sliderStart = sliderMax;
+ }
+
+ QRect addR, subR, subR2, addPageR, subPageR, sliderR;
+ int length = ((scrollbar->orientation() == Horizontal) ?
+ scrollbar->width() : scrollbar->height());
+ int extent = ((scrollbar->orientation() == Horizontal) ?
+ scrollbar->height() : scrollbar->width());
+
+
+ int fudge = 3; //####disgusting hack
+
+ if (scrollbar->orientation() == Horizontal) {
+ subR.setRect(0, defaultFrameWidth(),
+ buttonDim + fudge, buttonDim);
+ subR2.setRect(length - (buttonDim * 2), defaultFrameWidth() ,
+ buttonDim, buttonDim);
+ addR.setRect(length - buttonDim, defaultFrameWidth(),
+ buttonDim, buttonDim);
+ } else {
+ subR.setRect(defaultFrameWidth() + 1, 0,
+ buttonDim, buttonDim + fudge);
+ subR2.setRect(defaultFrameWidth() + 1, length - (buttonDim * 2),
+ buttonDim, buttonDim);
+ addR.setRect(defaultFrameWidth() + 1, length - buttonDim,
+ buttonDim, buttonDim);
+ }
+
+ int sliderEnd = sliderStart + sliderLength;
+ int sliderW = extent - defaultFrameWidth() - 1;
+ if (scrollbar->orientation() == Horizontal) {
+ subPageR.setRect( subR.right() + 1, defaultFrameWidth(),
+ sliderStart - subR.right() - 1 , sliderW );
+ addPageR.setRect( sliderEnd, defaultFrameWidth(),
+ subR2.left() - sliderEnd, sliderW );
+ sliderR.setRect( sliderStart, defaultFrameWidth(), sliderLength, sliderW );
+ } else {
+ subPageR.setRect( defaultFrameWidth(), subR.bottom() + 1,
+ sliderW, sliderStart - subR.bottom() - 1 );
+ addPageR.setRect( defaultFrameWidth(), sliderEnd,
+ sliderW, subR2.top() - sliderEnd );
+ sliderR .setRect( defaultFrameWidth(), sliderStart,
+ sliderW, sliderLength );
+ }
+
+ if ( controls == ( AddLine | SubLine | AddPage | SubPage |
+ Slider | First | Last ) ) {
+ if (scrollbar->orientation() == Horizontal)
+ qDrawShadePanel(p, 0, 0, length, 2, g, TRUE, 1,
+ &g.brush(QColorGroup::Background));
+ else
+ qDrawShadePanel(p, 0, 0, 2, length, g, TRUE, 1,
+ &g.brush(QColorGroup::Background));
+ }
+
+ if ( controls & AddLine )
+ drawArrow( p, (scrollbar->orientation() == Vertical) ? DownArrow : RightArrow,
+ FALSE, addR.x(), addR.y(),
+ addR.width(), addR.height(),
+ (( activeControl == AddLine ) ?
+ singleton->hoverPalette.active() : g),
+ TRUE, &g.brush(QColorGroup::Background));
+ if ( controls & SubLine ) {
+ drawArrow( p, (scrollbar->orientation() == Vertical) ? UpArrow : LeftArrow,
+ FALSE, subR.x(), subR.y(),
+ subR.width(), subR.height(),
+ (( activeControl == SubLine ) ?
+ singleton->hoverPalette.active() : g),
+ TRUE, &g.brush(QColorGroup::Background));
+ drawArrow( p, (scrollbar->orientation() == Vertical) ? UpArrow : LeftArrow,
+ FALSE, subR2.x(), subR2.y(),
+ subR2.width(), subR2.height(),
+ (( activeControl == SubLine ) ?
+ singleton->hoverPalette.active() : g),
+ TRUE, &g.brush(QColorGroup::Background));
+ }
+
+ if ( controls & SubPage )
+ p->fillRect( subPageR,
+ ((activeControl == SubPage) ?
+ g.brush( QColorGroup::Dark ) :
+ g.brush( QColorGroup::Mid )));
+ if ( controls & AddPage )
+ p->fillRect( addPageR,
+ ((activeControl == AddPage) ?
+ g.brush( QColorGroup::Dark ) :
+ g.brush( QColorGroup::Mid )));
+
+ if ( controls & Slider ) {
+
+ QPoint bo = p->brushOrigin();
+ p->setBrushOrigin(sliderR.topLeft());
+ if ( sliderR.isValid() ) {
+ p->fillRect( sliderR.x(), sliderR.y(), 2, 2,
+ g.brush( QColorGroup::Mid ));
+ p->fillRect( sliderR.x() + sliderR.width() - 2,
+ sliderR.y(), 2, 2,
+ g.brush( QColorGroup::Mid ));
+ p->fillRect( sliderR.x() + sliderR.width() - 2,
+ sliderR.y() + sliderR.height() - 2, 2, 2,
+ g.brush( QColorGroup::Mid ));
+ p->fillRect( sliderR.x(),
+ sliderR.y() + sliderR.height() - 2, 2, 2,
+ g.brush( QColorGroup::Mid ));
+
+ QColorGroup cg( g );
+ cg.setBrush( QColorGroup::Background, g.brush( QColorGroup::Mid ) );
+ drawBevelButton( p, sliderR.x(), sliderR.y(),
+ sliderR.width(), sliderR.height(),
+ cg, FALSE, &g.brush( QColorGroup::Button ) );
+ }
+
+ p->setBrushOrigin(bo);
+ }
+}
+
+
+void LightStyle::drawToolBarHandle(QPainter *p, const QRect &rect,
+ Qt::Orientation orientation,
+ bool, const QColorGroup &g, bool)
+{
+ p->save();
+ p->setPen(g.mid());
+ p->setBrush(g.brush(QColorGroup::Mid));
+
+ if (orientation == Qt::Horizontal) {
+ QRect l, r;
+ l.setRect(rect.x() + 1, rect.y() + 1, rect.width() - 5, rect.height() - 2);
+ r.setRect(l.right() + 1, l.y(), 3, l.height());
+
+ p->drawRect(l);
+ qDrawShadePanel(p, r, g, FALSE);
+ } else {
+ QRect t, b;
+ t.setRect(rect.x() + 1, rect.y() + 1, rect.width() - 2, rect.height() - 5);
+ b.setRect(t.x(), t.bottom() + 1, t.width(), 3);
+
+ p->drawRect(t);
+ qDrawShadePanel(p, b, g, FALSE);
+ }
+
+ p->restore();
+}
+
+
+bool LightStyle::eventFilter(QObject *object, QEvent *event)
+{
+ switch(event->type()) {
+ case QEvent::Enter:
+ {
+ if (! object->isWidgetType() ||
+ ! object->inherits("QPushButton"))
+ break;
+
+ singleton->hoverWidget = (QWidget *) object;
+ if (! singleton->hoverWidget->isEnabled()) {
+ singleton->hoverWidget = 0;
+ break;
+ }
+
+ QPalette pal = singleton->hoverWidget->palette();
+ if (singleton->hoverWidget->ownPalette())
+ singleton->savePalette = new QPalette(pal);
+
+ singleton->hoverWidget->setPalette(singleton->hoverPalette);
+
+ break;
+ }
+
+ case QEvent::Leave:
+ {
+ if (object != singleton->hoverWidget)
+ break;
+
+ if (singleton->savePalette) {
+ singleton->hoverWidget->setPalette(*(singleton->savePalette));
+ delete singleton->savePalette;
+ singleton->savePalette = 0;
+ } else
+ singleton->hoverWidget->unsetPalette();
+
+ singleton->hoverWidget = 0;
+
+ break;
+ }
+
+ default:
+ {
+ ;
+ }
+ }
+
+ return QWindowsStyle::eventFilter(object, event);
+}
+
+
+static const int motifItemFrame = 1; // menu item frame width
+static const int motifSepHeight = 2; // separator item height
+static const int motifItemHMargin = 1; // menu item hor text margin
+static const int motifItemVMargin = 2; // menu item ver text margin
+static const int motifArrowHMargin = 0; // arrow horizontal margin
+static const int motifTabSpacing = 12; // space between text and tab
+static const int motifCheckMarkHMargin = 1; // horiz. margins of check mark
+static const int windowsRightBorder = 8; // right border on windows
+static const int windowsCheckMarkWidth = 2; // checkmarks width on windows
+
+/*! \reimp
+*/
+int LightStyle::extraPopupMenuItemWidth( bool checkable, int maxpmw, QMenuItem* mi, const QFontMetrics& /*fm*/ )
+{
+#ifndef QT_NO_MENUDATA
+ int w = 2*motifItemHMargin + 2*motifItemFrame; // a little bit of border can never harm
+
+ if ( mi->isSeparator() )
+ return 10; // arbitrary
+ else if ( mi->pixmap() )
+ w += mi->pixmap()->width(); // pixmap only
+
+ if ( !mi->text().isNull() ) {
+ if ( mi->text().find('\t') >= 0 ) // string contains tab
+ w += motifTabSpacing;
+ }
+
+ if ( maxpmw ) { // we have iconsets
+ w += maxpmw;
+ w += 6; // add a little extra border around the iconset
+ }
+
+ if ( checkable && maxpmw < windowsCheckMarkWidth ) {
+ w += windowsCheckMarkWidth - maxpmw; // space for the checkmarks
+ }
+
+ if ( maxpmw > 0 || checkable ) // we have a check-column ( iconsets or checkmarks)
+ w += motifCheckMarkHMargin; // add space to separate the columns
+
+ w += windowsRightBorder; // windows has a strange wide border on the right side
+
+ return w;
+#endif
+}
+
+/*! \reimp
+*/
+int LightStyle::popupMenuItemHeight( bool /*checkable*/, QMenuItem* mi, const QFontMetrics& fm )
+{
+#ifndef QT_NO_MENUDATA
+ int h = 0;
+ if ( mi->isSeparator() ) // separator height
+ h = motifSepHeight;
+ else if ( mi->pixmap() ) // pixmap height
+ h = mi->pixmap()->height() + 2*motifItemFrame;
+ else // text height
+ h = fm.height() + 2*motifItemVMargin + 2*motifItemFrame;
+
+ if ( !mi->isSeparator() && mi->iconSet() != 0 ) {
+ h = QMAX( h, mi->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).height() + 2*motifItemFrame );
+ }
+ if ( mi->custom() )
+ h = QMAX( h, mi->custom()->sizeHint().height() + 2*motifItemVMargin + 2*motifItemFrame ) - 1;
+ return h;
+#endif
+}
+
+void LightStyle::drawPopupMenuItem( QPainter* p, bool checkable, int maxpmw, int tab, QMenuItem* mi,
+ const QPalette& pal,
+ bool act, bool enabled, int x, int y, int w, int h)
+{
+#ifndef QT_NO_MENUDATA
+ const QColorGroup & g = pal.active();
+ bool dis = !enabled;
+ QColorGroup itemg = dis ? pal.disabled() : pal.active();
+
+ if ( checkable )
+ maxpmw = QMAX( maxpmw, 8 ); // space for the checkmarks
+
+ int checkcol = maxpmw;
+
+ if ( mi && mi->isSeparator() ) { // draw separator
+ p->setPen( g.dark() );
+ p->drawLine( x, y, x+w, y );
+ p->setPen( g.light() );
+ p->drawLine( x, y+1, x+w, y+1 );
+ return;
+ }
+
+ QBrush fill = act? g.brush( QColorGroup::Highlight ) :
+ g.brush( QColorGroup::Button );
+ p->fillRect( x, y, w, h, fill);
+
+ if ( !mi )
+ return;
+
+ if ( mi->isChecked() ) {
+ if ( act && !dis ) {
+ qDrawShadePanel( p, x, y, checkcol, h,
+ g, TRUE, 1, &g.brush( QColorGroup::Button ) );
+ } else {
+ qDrawShadePanel( p, x, y, checkcol, h,
+ g, TRUE, 1, &g.brush( QColorGroup::Midlight ) );
+ }
+ } else if ( !act ) {
+ p->fillRect(x, y, checkcol , h,
+ g.brush( QColorGroup::Button ));
+ }
+
+ if ( mi->iconSet() ) { // draw iconset
+ QIconSet::Mode mode = dis ? QIconSet::Disabled : QIconSet::Normal;
+ if (act && !dis )
+ mode = QIconSet::Active;
+ QPixmap pixmap = mi->iconSet()->pixmap( QIconSet::Small, mode );
+ int pixw = pixmap.width();
+ int pixh = pixmap.height();
+ if ( act && !dis ) {
+ if ( !mi->isChecked() )
+ qDrawShadePanel( p, x, y, checkcol, h, g, FALSE, 1, &g.brush( QColorGroup::Button ) );
+ }
+ QRect cr( x, y, checkcol, h );
+ QRect pmr( 0, 0, pixw, pixh );
+ pmr.moveCenter( cr.center() );
+ p->setPen( itemg.text() );
+ p->drawPixmap( pmr.topLeft(), pixmap );
+
+ QBrush fill = act? g.brush( QColorGroup::Highlight ) :
+ g.brush( QColorGroup::Button );
+ p->fillRect( x+checkcol + 1, y, w - checkcol - 1, h, fill);
+ } else if ( checkable ) { // just "checking"...
+ int mw = checkcol + motifItemFrame;
+ int mh = h - 2*motifItemFrame;
+ if ( mi->isChecked() ) {
+ drawCheckMark( p, x + motifItemFrame + 2,
+ y+motifItemFrame, mw, mh, itemg, act, dis );
+ }
+ }
+
+ p->setPen( act ? g.highlightedText() : g.buttonText() );
+
+ QColor discol;
+ if ( dis ) {
+ discol = itemg.text();
+ p->setPen( discol );
+ }
+
+ int xm = motifItemFrame + checkcol + motifItemHMargin;
+
+ if ( mi->custom() ) {
+ int m = motifItemVMargin;
+ p->save();
+ if ( dis && !act ) {
+ p->setPen( g.light() );
+ mi->custom()->paint( p, itemg, act, enabled,
+ x+xm+1, y+m+1, w-xm-tab+1, h-2*m );
+ p->setPen( discol );
+ }
+ mi->custom()->paint( p, itemg, act, enabled,
+ x+xm, y+m, w-xm-tab+1, h-2*m );
+ p->restore();
+ }
+ QString s = mi->text();
+ if ( !s.isNull() ) { // draw text
+ int t = s.find( '\t' );
+ int m = motifItemVMargin;
+ const int text_flags = AlignVCenter|ShowPrefix | DontClip | SingleLine;
+ if ( t >= 0 ) { // draw tab text
+ if ( dis && !act ) {
+ p->setPen( g.light() );
+ p->drawText( x+w-tab-windowsRightBorder-motifItemHMargin-motifItemFrame+1,
+ y+m+1, tab, h-2*m, text_flags, s.mid( t+1 ));
+ p->setPen( discol );
+ }
+ p->drawText( x+w-tab-windowsRightBorder-motifItemHMargin-motifItemFrame,
+ y+m, tab, h-2*m, text_flags, s.mid( t+1 ) );
+ }
+ if ( dis && !act ) {
+ p->setPen( g.light() );
+ p->drawText( x+xm+1, y+m+1, w-xm+1, h-2*m, text_flags, s, t );
+ p->setPen( discol );
+ }
+ p->drawText( x+xm, y+m, w-xm-tab+1, h-2*m, text_flags, s, t );
+ } else if ( mi->pixmap() ) { // draw pixmap
+ QPixmap *pixmap = mi->pixmap();
+ if ( pixmap->depth() == 1 )
+ p->setBackgroundMode( OpaqueMode );
+ p->drawPixmap( x+xm, y+motifItemFrame, *pixmap );
+ if ( pixmap->depth() == 1 )
+ p->setBackgroundMode( TransparentMode );
+ }
+ if ( mi->popup() ) { // draw sub menu arrow
+ int dim = (h-2*motifItemFrame) / 2;
+ if ( act ) {
+ if ( !dis )
+ discol = white;
+ QColorGroup g2( discol, g.highlight(),
+ white, white,
+ dis ? discol : white,
+ discol, white );
+ drawArrow( p, RightArrow, FALSE,
+ x+w - motifArrowHMargin - motifItemFrame - dim, y+h/2-dim/2,
+ dim, dim, g2, TRUE );
+ } else {
+ drawArrow( p, RightArrow,
+ FALSE,
+ x+w - motifArrowHMargin - motifItemFrame - dim, y+h/2-dim/2,
+ dim, dim, g, mi->isEnabled() );
+ }
+ }
+#endif
+}
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef LIGHTSTYLE_H
+#define LIGHTSTYLE_H
+
+
+#ifndef QT_H
+#include <qstyle.h>
+#include <qwindowsstyle.h>
+#endif // QT_H
+
+#if QT_VERSION < 300
+
+#ifdef QT_PLUGIN_STYLE_LIGHT
+# define Q_EXPORT_STYLE_LIGHT
+#else
+# define Q_EXPORT_STYLE_LIGHT Q_EXPORT
+#endif // QT_PLUGIN_STYLE_LIGHT
+
+
+class Q_EXPORT_STYLE_LIGHT LightStyle : public QWindowsStyle
+{
+public:
+ LightStyle();
+ virtual ~LightStyle();
+
+ void polish(QWidget *widget);
+ void unPolish(QWidget*widget);
+
+ void polish(QApplication *app);
+ void unPolish(QApplication *app);
+
+ void polishPopupMenu(QPopupMenu *menu);
+
+ void drawPushButton(QPushButton *button, QPainter *p);
+ void drawButton(QPainter *p, int x, int y, int w, int h,
+ const QColorGroup &g, bool sunken = FALSE,
+ const QBrush *fill = 0);
+ void drawBevelButton(QPainter *p, int x, int y, int w, int h,
+ const QColorGroup &g, bool sunken = FALSE,
+ const QBrush *fill = 0);
+ void getButtonShift(int &x, int &y) const;
+
+ void drawComboButton(QPainter *p, int x, int y, int w, int h,
+ const QColorGroup &g, bool sunken = FALSE,
+ bool editable = FALSE, bool = TRUE,
+ const QBrush *fill = 0);
+ QRect comboButtonRect(int x, int y, int w, int h) const;
+ QRect comboButtonFocusRect(int x, int y, int w, int h) const;
+
+ void drawIndicator(QPainter *p, int x, int y ,int w, int h,
+ const QColorGroup &g, int state,
+ bool = FALSE, bool = TRUE);
+ QSize indicatorSize() const;
+
+ void drawExclusiveIndicator(QPainter *p, int x, int y ,int w, int h,
+ const QColorGroup &g, bool on,
+ bool = FALSE, bool = TRUE);
+ QSize exclusiveIndicatorSize() const;
+
+ void drawPanel(QPainter * p, int x, int y, int w, int h,
+ const QColorGroup &g, bool sunken = FALSE,
+ int = 1, const QBrush * = 0);
+
+ void scrollBarMetrics( const QScrollBar *,
+ int &, int &, int &, int & ) const;
+ void drawScrollBarControls(QPainter* p, const QScrollBar* sb,
+ int sliderStart, uint controls,
+ uint activeControl);
+ QStyle::ScrollControl scrollBarPointOver(const QScrollBar *, int, const QPoint& p);
+
+ void drawTab(QPainter *p, const QTabBar *tabbar, QTab *tab, bool selected);
+
+ void drawSlider(QPainter *p, int x, int y, int w, int h,
+ const QColorGroup &g, Qt::Orientation orientation,
+ bool, bool);
+ void drawSliderGroove(QPainter *p, int x, int y, int w, int h,
+ const QColorGroup& g, QCOORD,
+ Qt::Orientation );
+
+ void drawToolBarHandle(QPainter *, const QRect &, Qt::Orientation,
+ bool, const QColorGroup &, bool = FALSE );
+
+ QSize scrollBarExtent() const;
+ int buttonDefaultIndicatorWidth() const;
+ int buttonMargin() const;
+ int sliderThickness() const;
+ int sliderLength() const;
+ int defaultFrameWidth() const;
+
+ int extraPopupMenuItemWidth( bool checkable, int maxpmw, QMenuItem*, const QFontMetrics& );
+ int popupMenuItemHeight( bool checkable, QMenuItem*, const QFontMetrics& );
+ void drawPopupMenuItem( QPainter* p, bool checkable, int maxpmw, int tab, QMenuItem* mi,
+ const QPalette& pal,
+ bool act, bool enabled, int x, int y, int w, int h);
+
+protected:
+ bool eventFilter(QObject *, QEvent *);
+};
+
+#endif
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "lnkproperties.h"
+#include "lnkpropertiesbase_p.h"
+#include "ir.h"
+
+#include <qpe/applnk.h>
+#include <qpe/global.h>
+#include <qpe/categorywidget.h>
+#include <qpe/qcopenvelope_qws.h>
+#include <qpe/filemanager.h>
+#include <qpe/config.h>
+#include <qpe/storage.h>
+#include <qpe/qpemessagebox.h>
+
+#include <qlineedit.h>
+#include <qtoolbutton.h>
+#include <qpushbutton.h>
+#include <qgroupbox.h>
+#include <qcheckbox.h>
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qfile.h>
+#include <qfileinfo.h>
+#include <qmessagebox.h>
+#include <qsize.h>
+#include <qcombobox.h>
+#include <qregexp.h>
+
+#include <stdlib.h>
+
+LnkProperties::LnkProperties( AppLnk* l, QWidget* parent )
+ : QDialog( parent, 0, TRUE ), lnk(l), fileSize( 0 )
+{
+ QVBoxLayout *vbox = new QVBoxLayout( this );
+ d = new LnkPropertiesBase( this );
+ vbox->add( d );
+
+ d->docname->setText(l->name());
+ QString inf;
+ if ( l->type().isEmpty() ) {
+ d->type->hide();
+ d->typeLabel->hide();
+ } else {
+ d->type->setText( l->type() );
+ }
+
+ if ( l->comment().isEmpty() ) {
+ d->comment->hide();
+ d->commentLabel->hide();
+ } else {
+ d->comment->setText( l->comment() );
+ }
+
+ connect(d->beam,SIGNAL(clicked()),this,SLOT(beamLnk()));
+ if ( lnk->type().contains('/') ) { // A document? (#### better predicate needed)
+ connect(d->unlink,SIGNAL(clicked()),this,SLOT(unlinkLnk()));
+ connect(d->duplicate,SIGNAL(clicked()),this,SLOT(duplicateLnk()));
+
+ d->docname->setReadOnly( FALSE );
+ d->preload->hide();
+ d->spacer->hide();
+
+ // ### THIS MUST GO, FIX WIERD BUG in QLAYOUT
+ d->categoryEdit->kludge();
+
+ d->categoryEdit->setCategories( lnk->categories(),
+ "Document View",
+ tr("Document View") );
+ setupLocations();
+ } else {
+ d->unlink->hide();
+ d->duplicate->hide();
+ d->beam->hide();
+ d->hline->hide();
+ d->locationLabel->hide();
+ d->locationCombo->hide();
+
+ // Can't edit categories, since the app .desktop files are global,
+ // possibly read-only.
+ d->categoryEdit->hide();
+
+ d->docname->setReadOnly( TRUE );
+
+ if ( l->property("CanFastload") == "0" )
+ d->preload->hide();
+
+ Config cfg("Launcher");
+ cfg.setGroup("Preload");
+ QStringList apps = cfg.readListEntry("Apps",',');
+ d->preload->setChecked( apps.contains(l->exec()) );
+ if ( Global::isBuiltinCommand(lnk->exec()) )
+ d->preload->hide(); // builtins are always fast
+
+ currentLocation = 0; // apps not movable (yet)
+ }
+}
+
+LnkProperties::~LnkProperties()
+{
+}
+
+void LnkProperties::unlinkLnk()
+{
+ if ( QPEMessageBox::confirmDelete( this, tr("Delete"), lnk->name() ) ) {
+ lnk->removeFiles();
+ if ( QFile::exists(lnk->file()) ) {
+ QMessageBox::warning( this, tr("Delete"), tr("File deletion failed.") );
+ } else {
+ reject();
+ }
+ }
+}
+
+void LnkProperties::setupLocations()
+{
+ QFileInfo fi( lnk->file() );
+ fileSize = fi.size();
+ StorageInfo storage;
+ const QList<FileSystem> &fs = storage.fileSystems();
+ QListIterator<FileSystem> it ( fs );
+ QString s;
+ QString homeDir = getenv("HOME");
+ QString hardDiskHome;
+ QString hardDiskPath;
+ int index = 0;
+ currentLocation = -1;
+ for ( ; it.current(); ++it ) {
+ // we add 10k to the file size so we are sure we can also save the desktop file
+ if ( (*it)->availBlocks() * (*it)->blockSize() > fileSize + 10000 ) {
+ if ( (*it)->isRemovable() ||
+ (*it)->disk() == "/dev/mtdblock1" ||
+ (*it)->disk() == "/dev/mtdblock/1" ) {
+ d->locationCombo->insertItem( (*it)->name(), index );
+ locations.append( ((*it)->isRemovable() ? (*it)->path() : homeDir) );
+ if ( lnk->file().contains( (*it)->path() ) ) {
+ d->locationCombo->setCurrentItem( index );
+ currentLocation = index;
+ }
+ index++;
+ } else if ( (*it)->name().contains( "Hard Disk") &&
+ homeDir.contains( (*it)->path() ) &&
+ (*it)->path().length() > hardDiskHome.length() ) {
+ hardDiskHome = (*it)->name();
+ hardDiskPath = (*it)->path();
+ }
+ }
+ }
+ if ( !hardDiskHome.isEmpty() ) {
+ d->locationCombo->insertItem( hardDiskHome );
+ locations.append( hardDiskPath );
+ if ( currentLocation == -1 ) { // assume it's the hard disk
+ d->locationCombo->setCurrentItem( index );
+ currentLocation = index;
+ }
+ }
+}
+
+void LnkProperties::duplicateLnk()
+{
+ // The duplicate takes the new properties.
+ DocLnk newdoc( *((DocLnk *)lnk) );
+ if ( d->docname->text() == lnk->name() )
+ newdoc.setName(tr("Copy of ")+d->docname->text());
+ else
+ newdoc.setName(d->docname->text());
+
+ if ( !copyFile( newdoc ) ) {
+ QMessageBox::warning( this, tr("Duplicate"), tr("File copy failed.") );
+ return;
+ }
+ reject();
+}
+
+bool LnkProperties::moveLnk()
+{
+ DocLnk newdoc( *((DocLnk *)lnk) );
+ newdoc.setName(d->docname->text());
+
+ if ( !copyFile( newdoc ) ) {
+ QMessageBox::warning( this, tr("Details"), tr("Moving Document failed.") );
+ return FALSE;
+ }
+ // remove old lnk
+ lnk->removeFiles();
+
+ return TRUE;
+}
+
+void LnkProperties::beamLnk()
+{
+ Ir ir;
+ DocLnk doc( *((DocLnk *)lnk) );
+ ir.send( doc, doc.comment() );
+}
+
+bool LnkProperties::copyFile( DocLnk &newdoc )
+{
+ const char *linkExtn = ".desktop";
+ QString fileExtn;
+ int extnPos = lnk->file().findRev( '.' );
+ if ( extnPos > 0 )
+ fileExtn = lnk->file().mid( extnPos );
+
+ QString safename = newdoc.name();
+ safename.replace(QRegExp("/"),"_");
+
+ QString fn = locations[ d->locationCombo->currentItem() ]
+ + "/Documents/" + newdoc.type() + "/" + safename;
+ if ( QFile::exists(fn + fileExtn) || QFile::exists(fn + linkExtn) ) {
+ int n=1;
+ QString nn = fn + "_" + QString::number(n);
+ while ( QFile::exists(nn+fileExtn) || QFile::exists(nn+linkExtn) ) {
+ n++;
+ nn = fn + "_" + QString::number(n);
+ }
+ fn = nn;
+ }
+ newdoc.setFile( fn + fileExtn );
+ newdoc.setLinkFile( fn + linkExtn );
+
+ // Copy file
+ FileManager fm;
+ if ( !fm.copyFile( *lnk, newdoc ) )
+ return FALSE;
+ return TRUE;
+}
+
+void LnkProperties::done(int ok)
+{
+ if ( ok ) {
+ bool changed=FALSE;
+ if ( lnk->name() != d->docname->text() ) {
+ lnk->setName(d->docname->text());
+ changed=TRUE;
+ }
+ if ( d->categoryEdit->isVisible() ) {
+ QArray<int> tmp = d->categoryEdit->newCategories();
+ if ( lnk->categories() != tmp ) {
+ lnk->setCategories( tmp );
+ changed = TRUE;
+ }
+ }
+ if ( d->preload->isHidden() && d->locationCombo->currentItem() != currentLocation ) {
+ moveLnk();
+ } else if ( changed ) {
+ lnk->writeLink();
+ }
+
+ if ( !d->preload->isHidden() ) {
+ Config cfg("Launcher");
+ cfg.setGroup("Preload");
+ QStringList apps = cfg.readListEntry("Apps",',');
+ QString exe = lnk->exec();
+ if ( apps.contains(exe) != d->preload->isChecked() ) {
+ if ( d->preload->isChecked() ) {
+ apps.append(exe);
+ QCopEnvelope e("QPE/Application/"+exe.local8Bit(),
+ "enablePreload()");
+ } else {
+ apps.remove(exe);
+ QCopEnvelope e("QPE/Application/"+exe.local8Bit(),
+ "quitIfInvisible()");
+ }
+ cfg.writeEntry("Apps",apps,',');
+ }
+ }
+ }
+ QDialog::done( ok );
+}
+
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef LNKPROPERTIES_H
+#define LNKPROPERTIES_H
+#include <qstringlist.h>
+#include <qdialog.h>
+
+class AppLnk;
+class QListViewItem;
+class DocLnk;
+
+class LnkPropertiesBase;
+
+class LnkProperties : public QDialog
+{
+ Q_OBJECT
+
+public:
+ LnkProperties( AppLnk* lnk, QWidget* parent = 0 );
+ ~LnkProperties();
+
+ void done(int);
+private slots:
+ void beamLnk();
+ void unlinkLnk();
+ void duplicateLnk();
+
+signals:
+ void select(const AppLnk *);
+
+private:
+ void setupLocations();
+ bool moveLnk();
+ bool copyFile( DocLnk &newdoc );
+
+ AppLnk* lnk;
+ int fileSize;
+ int currentLocation;
+ QStringList locations;
+ LnkPropertiesBase *d;
+};
+
+#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 @@
+<!DOCTYPE UI><UI>
+<class>LnkPropertiesBase</class>
+<widget>
+ <class>QWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Form1</cstring>
+ </property>
+ <property stdset="1">
+ <name>geometry</name>
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>297</width>
+ <height>449</height>
+ </rect>
+ </property>
+ <property stdset="1">
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ </sizepolicy>
+ </property>
+ <property stdset="1">
+ <name>font</name>
+ <font>
+ </font>
+ </property>
+ <property stdset="1">
+ <name>caption</name>
+ <string>Details</string>
+ </property>
+ <property>
+ <name>layoutMargin</name>
+ </property>
+ <property>
+ <name>layoutSpacing</name>
+ </property>
+ <vbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>0</number>
+ </property>
+ <widget>
+ <class>QFrame</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Frame8</cstring>
+ </property>
+ <property stdset="1">
+ <name>focusPolicy</name>
+ <enum>NoFocus</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShape</name>
+ <enum>NoFrame</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>Plain</enum>
+ </property>
+ <property>
+ <name>layoutMargin</name>
+ </property>
+ <property>
+ <name>layoutSpacing</name>
+ </property>
+ <grid>
+ <property stdset="1">
+ <name>margin</name>
+ <number>3</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>3</number>
+ </property>
+ <widget row="6" column="0" rowspan="1" colspan="2" >
+ <class>CategoryWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>categoryEdit</cstring>
+ </property>
+ <property stdset="1">
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>7</vsizetype>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget row="5" column="0" rowspan="1" colspan="2" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>spacer</cstring>
+ </property>
+ <property stdset="1">
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>7</vsizetype>
+ </sizepolicy>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string></string>
+ </property>
+ </widget>
+ <widget row="3" column="0" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>commentLabel</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Comment:</string>
+ </property>
+ </widget>
+ <widget row="2" column="0" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>typeLabel</cstring>
+ </property>
+ <property stdset="1">
+ <name>focusPolicy</name>
+ <enum>NoFocus</enum>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Type:</string>
+ </property>
+ <property>
+ <name>layoutMargin</name>
+ </property>
+ <property>
+ <name>layoutSpacing</name>
+ </property>
+ </widget>
+ <widget row="1" column="1" >
+ <class>QComboBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>locationCombo</cstring>
+ </property>
+ <property stdset="1">
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget row="0" column="1" >
+ <class>QLineEdit</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>docname</cstring>
+ </property>
+ <property stdset="1">
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ </sizepolicy>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string></string>
+ </property>
+ </widget>
+ <widget row="0" column="0" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>MShadow</enum>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Name:</string>
+ </property>
+ </widget>
+ <widget row="1" column="0" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>locationLabel</cstring>
+ </property>
+ <property stdset="1">
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>1</vsizetype>
+ </sizepolicy>
+ </property>
+ <property stdset="1">
+ <name>caption</name>
+ <string></string>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Location:</string>
+ </property>
+ <property>
+ <name>layoutMargin</name>
+ </property>
+ <property>
+ <name>layoutSpacing</name>
+ </property>
+ </widget>
+ <widget row="2" column="1" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>type</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string></string>
+ </property>
+ </widget>
+ <widget row="3" column="1" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>comment</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string></string>
+ </property>
+ </widget>
+ <widget row="4" column="0" rowspan="1" colspan="2" >
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>preload</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Fast load (consumes memory)</string>
+ </property>
+ <property>
+ <name>layoutMargin</name>
+ </property>
+ <property>
+ <name>layoutSpacing</name>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget>
+ <class>Line</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>hline</cstring>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>Sunken</enum>
+ </property>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Horizontal</enum>
+ </property>
+ <property>
+ <name>layoutMargin</name>
+ </property>
+ <property>
+ <name>layoutSpacing</name>
+ </property>
+ </widget>
+ <widget>
+ <class>QFrame</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Frame9</cstring>
+ </property>
+ <property stdset="1">
+ <name>frameShape</name>
+ <enum>NoFrame</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>Plain</enum>
+ </property>
+ <property>
+ <name>layoutMargin</name>
+ </property>
+ <property>
+ <name>layoutSpacing</name>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>3</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>5</number>
+ </property>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>unlink</cstring>
+ </property>
+ <property stdset="1">
+ <name>focusPolicy</name>
+ <enum>TabFocus</enum>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Delete</string>
+ </property>
+ <property stdset="1">
+ <name>autoDefault</name>
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>duplicate</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Copy</string>
+ </property>
+ <property stdset="1">
+ <name>autoDefault</name>
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>beam</cstring>
+ </property>
+ <property stdset="1">
+ <name>focusPolicy</name>
+ <enum>TabFocus</enum>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Beam</string>
+ </property>
+ <property stdset="1">
+ <name>autoDefault</name>
+ <bool>false</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+</widget>
+<customwidgets>
+ <customwidget>
+ <class>CategoryWidget</class>
+ <header location="global">qpe/categorywidget.h</header>
+ <sizehint>
+ <width>-1</width>
+ <height>-1</height>
+ </sizehint>
+ <container>0</container>
+ <sizepolicy>
+ <hordata>7</hordata>
+ <verdata>7</verdata>
+ </sizepolicy>
+ <pixmap>image0</pixmap>
+ </customwidget>
+</customwidgets>
+<images>
+ <image>
+ <name>image0</name>
+ <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
+ </image>
+</images>
+<tabstops>
+ <tabstop>docname</tabstop>
+ <tabstop>preload</tabstop>
+ <tabstop>locationCombo</tabstop>
+ <tabstop>unlink</tabstop>
+ <tabstop>duplicate</tabstop>
+ <tabstop>beam</tabstop>
+</tabstops>
+</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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "menubutton.h"
+#include <qpopupmenu.h>
+
+/*!
+ \class MenuButton menubutton.h
+ \brief The MenuButton class is a pushbutton with a menu.
+
+ Similar in function to a QComboBox.
+*/
+
+/*!
+ \fn void MenuButton::selected(int index)
+
+ This signal is emitted when the item at \a index is selected.
+*/
+
+/*!
+ \fn void MenuButton::selected(const QString& text)
+
+ This signal is emitted when the item with the given \a text is selected.
+*/
+
+
+/*!
+ Constructs a MenuButton with the given \a items added (see insertItems()).
+ The standard \a parent an \a name arguments are passed to the base class.
+*/
+MenuButton::MenuButton( const QStringList& items, QWidget* parent, const char* name) :
+ QPushButton(parent,name)
+{
+ init();
+ insertItems(items);
+}
+
+/*!
+ Constructs an empty MenuButton.
+ The standard \a parent an \a name arguments are passed to the base class.
+
+ \sa insertItems()
+*/
+MenuButton::MenuButton( QWidget* parent, const char* name) :
+ QPushButton(parent,name)
+{
+ init();
+}
+
+void MenuButton::init()
+{
+ setAutoDefault(FALSE);
+ pop = new QPopupMenu(this);
+ nitems=0;
+ connect(pop, SIGNAL(activated(int)), this, SLOT(select(int)));
+ setPopup(pop);
+ //setPopupDelay(0);
+}
+
+/*!
+ Removes all items from the button and menu.
+*/
+void MenuButton::clear()
+{
+ delete pop;
+ init();
+}
+
+/*!
+ Inserts string \a items into the menu. The string "--" represents
+ a separator.
+*/
+void MenuButton::insertItems( const QStringList& items )
+{
+ QStringList::ConstIterator it=items.begin();
+ for (; it!=items.end(); ++it) {
+ if ( (*it) == "--" )
+ insertSeparator();
+ else
+ insertItem(*it);
+ }
+}
+
+/*!
+ Inserts an \a icon and \a text into the menu.
+*/
+void MenuButton::insertItem( const QIconSet& icon, const QString& text=QString::null )
+{
+ pop->insertItem(icon, text, nitems++);
+ if ( nitems==1 ) select(0);
+}
+
+/*!
+ Inserts \a text into the menu.
+*/
+void MenuButton::insertItem( const QString& text )
+{
+ pop->insertItem(text, nitems++);
+ if ( nitems==1 ) select(0);
+}
+
+/*!
+ Inserts a visual separator into the menu.
+*/
+void MenuButton::insertSeparator()
+{
+ pop->insertSeparator();
+}
+
+/*!
+ Selects the items with text \a s.
+*/
+void MenuButton::select(const QString& s)
+{
+ for (int i=0; i<nitems; i++) {
+ if ( pop->text(i) == s ) {
+ select(i);
+ break;
+ }
+ }
+}
+
+/*!
+ Selects the item at index \a s.
+*/
+void MenuButton::select(int s)
+{
+ cur = s;
+ updateLabel();
+ if ( pop->iconSet(cur) )
+ setIconSet(*pop->iconSet(cur));
+ emit selected(cur);
+ emit selected(currentText());
+}
+
+/*!
+ Returns the index of the current item.
+*/
+int MenuButton::currentItem() const
+{
+ return cur;
+}
+
+/*!
+ Returns the text of the current item.
+*/
+QString MenuButton::currentText() const
+{
+ return pop->text(cur);
+}
+
+/*!
+ Sets the label. If \a label is empty, the
+ current item text is displayed, otherwise \a label should contain
+ "%1", which will be replaced by the current item text.
+*/
+void MenuButton::setLabel(const QString& label)
+{
+ lab = label;
+ updateLabel();
+}
+
+void MenuButton::updateLabel()
+{
+ QString t = pop->text(cur);
+ if ( !lab.isEmpty() )
+ t = lab.arg(t);
+ setText(t);
+}
+
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef MENUBUTTON_H
+#define MENUBUTTON_H
+
+#include <qpushbutton.h>
+#include <qstringlist.h>
+
+class MenuButton : public QPushButton {
+ Q_OBJECT
+public:
+ MenuButton( QWidget* parent, const char* name=0);
+ MenuButton( const QStringList& items, QWidget* parent, const char* name=0);
+
+ void clear();
+
+ int currentItem() const;
+ QString currentText() const;
+
+ void insertItems( const QStringList& items );
+ void insertItem( const QIconSet& icon, const QString& text=QString::null );
+ void insertItem( const QString& text );
+ void insertSeparator();
+
+ void setLabel(const QString& label);
+
+signals:
+ void selected(int);
+ void selected(const QString&);
+
+public slots:
+ void select(int);
+ void select(const QString&);
+
+private:
+ void init();
+ QStringList txts;
+ QPopupMenu* pop;
+ int nitems;
+ int cur;
+ QString lab;
+ void updateLabel();
+};
+
+#endif
+
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "mimetype.h"
+#include "applnk.h"
+#include "resource.h"
+#include "qpeapplication.h"
+#include <qfile.h>
+#include <qdict.h>
+#include <qregexp.h>
+#include <qstringlist.h>
+#include <qtextstream.h>
+#include <qmap.h>
+
+class MimeTypeData {
+public:
+ MimeTypeData(const QString& i, const AppLnk& lnk, const QString& icon ) :
+ id(i),
+ desc(lnk.name()+" document"),
+ app(lnk)
+ {
+ if ( icon.isEmpty() ) {
+ regIcon = lnk.pixmap();
+ bigIcon = lnk.bigPixmap();
+ } else {
+ QImage unscaledIcon = Resource::loadImage( icon );
+ regIcon.convertFromImage( unscaledIcon.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
+ bigIcon.convertFromImage( unscaledIcon.smoothScale( AppLnk::bigIconSize(), AppLnk::bigIconSize() ) );
+ }
+ }
+ QString id;
+ QString desc;
+ QPixmap regIcon;
+ QPixmap bigIcon;
+ AppLnk app;
+};
+
+class MimeType::Dict : public QDict<MimeTypeData> {
+public:
+ Dict() {}
+};
+
+MimeType::Dict* MimeType::d=0;
+static QMap<QString,QString> *typeFor = 0;
+
+MimeType::Dict& MimeType::dict()
+{
+ if ( !d ) {
+ d = new Dict;
+ d->setAutoDelete(TRUE);
+ }
+ return *d;
+}
+
+MimeType::MimeType( const QString& ext_or_id )
+{
+ init(ext_or_id);
+}
+
+MimeType::MimeType( const DocLnk& lnk )
+{
+ init(lnk.type());
+}
+
+QString MimeType::id() const
+{
+ return i;
+}
+
+QString MimeType::description() const
+{
+ MimeTypeData* d = data(i);
+ return d ? d->desc : QString::null;
+}
+
+QPixmap MimeType::pixmap() const
+{
+ MimeTypeData* d = data(i);
+ return d ? d->regIcon : QPixmap();
+}
+
+QPixmap MimeType::bigPixmap() const
+{
+ MimeTypeData* d = data(i);
+ return d ? d->bigIcon : QPixmap();
+}
+
+const AppLnk* MimeType::application() const
+{
+ MimeTypeData* d = data(i);
+ return d ? &d->app : 0;
+}
+
+void MimeType::registerApp( const AppLnk& lnk )
+{
+ QStringList list = lnk.mimeTypes();
+ QStringList icons = lnk.mimeTypeIcons();
+ QStringList::ConstIterator icon = icons.begin();
+ for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it, ++icon) {
+ MimeTypeData *item = new MimeTypeData( *it, lnk, *icon );
+ dict().replace( *it, item );
+ }
+}
+
+void MimeType::clear()
+{
+ delete d;
+ d = 0;
+}
+
+void MimeType::loadExtensions()
+{
+ if ( !typeFor ) {
+ typeFor = new QMap<QString,QString>;
+ loadExtensions("/etc/mime.types");
+ loadExtensions(QPEApplication::qpeDir()+"etc/mime.types");
+ }
+}
+
+void MimeType::loadExtensions(const QString& filename)
+{
+ QFile file(filename);
+ if ( file.open(IO_ReadOnly) ) {
+ QTextStream in(&file);
+ QRegExp space("[ \t]+");
+ while (!in.atEnd()) {
+ QStringList tokens = QStringList::split(space, in.readLine());
+ QStringList::ConstIterator it = tokens.begin();
+ if ( it != tokens.end() ) {
+ QString id = *it; ++it;
+ while (it != tokens.end()) {
+ (*typeFor)[*it] = id;
+ ++it;
+ }
+ }
+ }
+ }
+}
+
+void MimeType::init( const QString& ext_or_id )
+{
+ if ( ext_or_id[0] != '/' && ext_or_id.contains('/') ) {
+ i = ext_or_id.lower();
+ } else {
+ loadExtensions();
+ int dot = ext_or_id.findRev('.');
+ QString ext = dot >= 0 ? ext_or_id.mid(dot+1) : ext_or_id;
+ i = (*typeFor)[ext.lower()];
+ if ( i.isNull() )
+ i = "application/octet-stream";
+ }
+ static bool appsUpdated = FALSE;
+ if ( !appsUpdated ) {
+ appsUpdated = TRUE;
+ updateApplications();
+ }
+}
+
+MimeTypeData* MimeType::data(const QString& id)
+{
+ MimeTypeData* d = dict()[id];
+ if ( !d ) {
+ int s = id.find('/');
+ QString idw = id.left(s)+"/*";
+ d = dict()[idw];
+ }
+ return d;
+}
+
+QString MimeType::appsFolderName()
+{
+ return QPEApplication::qpeDir() + "apps";
+}
+
+void MimeType::updateApplications()
+{
+ clear();
+ AppLnkSet apps( appsFolderName() );
+ updateApplications(&apps);
+}
+
+void MimeType::updateApplications(AppLnkSet* folder)
+{
+ for ( QListIterator<AppLnk> it( folder->children() ); it.current(); ++it ) {
+ registerApp(*it.current());
+ }
+}
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef MIMETYPE_H
+#define MIMETYPE_H
+
+#include <qstring.h>
+#include <qpixmap.h>
+
+class AppLnk;
+class DocLnk;
+class QStringList;
+class MimeTypeData;
+class AppLnkSet;
+
+class MimeType
+{
+public:
+ MimeType( const QString& ext_or_id );
+ MimeType( const DocLnk& );
+
+ QString id() const;
+ QString description() const;
+ QPixmap pixmap() const;
+ QPixmap bigPixmap() const;
+
+ const AppLnk* application() const;
+
+ static QString appsFolderName();
+ static void updateApplications();
+
+ // These shouldn't be needed
+ static void clear();
+ static void registerApp( const AppLnk& );
+
+private:
+ static void updateApplications(AppLnkSet* folder);
+ static void loadExtensions();
+ static void loadExtensions(const QString&);
+ void init( const QString& ext_or_id );
+ class Dict;
+ static Dict* d;
+ static Dict& dict();
+ static MimeTypeData* data(const QString& id);
+ QString i;
+};
+
+#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 @@
+# NOTE: Only qembed in Qt > 2.3.1 includes the #ifdef _WS_QWS_, so if you
+# re-run this, be sure to use such a version, or to add it manually.
+qembed --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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "qpe/network.h"
+#include "qpe/networkinterface.h"
+#include "qpe/global.h"
+#include "qpe/config.h"
+#include "qpe/resource.h"
+#include "qpe/qpeapplication.h"
+#include <qpe/qcopenvelope_qws.h>
+#include <qpe/qlibrary.h>
+
+#include <qlistbox.h>
+#include <qdir.h>
+#include <qlayout.h>
+#include <qdict.h>
+#include <qtranslator.h>
+
+#include <stdlib.h>
+
+class NetworkEmitter : public QCopChannel {
+ Q_OBJECT
+public:
+ NetworkEmitter() : QCopChannel("QPE/Network",qApp)
+ {
+ }
+
+ void receive(const QCString &msg, const QByteArray&)
+ {
+ if ( msg == "choicesChanged()" )
+ emit changed();
+ }
+
+signals:
+ void changed();
+};
+
+/*!
+ \internal
+
+ Requests that the service \a choice be started. The \a password is
+ the password to use if required.
+*/
+void Network::start(const QString& choice, const QString& password)
+{
+ QCopEnvelope e("QPE/Network", "start(QString,QString)");
+ e << choice << password;
+}
+
+/*!
+ \class Network network.h
+ \brief The Network class provides network access functionality.
+*/
+
+// copy the proxy settings of the active config over to the Proxies.conf file
+/*!
+ \internal
+*/
+void Network::writeProxySettings( Config &cfg )
+{
+ Config proxy( Network::settingsDir() + "/Proxies.conf", Config::File );
+ proxy.setGroup("Properties");
+ cfg.setGroup("Proxy");
+ proxy.writeEntry("type", cfg.readEntry("type") );
+ proxy.writeEntry("autoconfig", cfg.readEntry("autoconfig") );
+ proxy.writeEntry("httphost", cfg.readEntry("httphost") );
+ proxy.writeEntry("httpport", cfg.readEntry("httpport") );
+ proxy.writeEntry("ftphost", cfg.readEntry("ftphost") );
+ proxy.writeEntry("ftpport", cfg.readEntry("ftpport") );
+ proxy.writeEntry("noproxies", cfg.readEntry("noproxies") );
+ cfg.setGroup("Properties");
+}
+
+
+
+/*!
+ \internal
+
+ Stops the current network service.
+*/
+void Network::stop()
+{
+ QCopEnvelope e("QPE/Network", "stop()");
+}
+
+static NetworkEmitter *emitter = 0;
+
+/*!
+ \internal
+*/
+void Network::connectChoiceChange(QObject* receiver, const char* slot)
+{
+ if ( !emitter )
+ emitter = new NetworkEmitter;
+ QObject::connect(emitter,SIGNAL(changed()),receiver,slot);
+}
+
+/*!
+ \internal
+*/
+QString Network::settingsDir()
+{
+ return Global::applicationFileName("Network", "modules");
+}
+
+/*!
+ \internal
+*/
+QStringList Network::choices(QListBox* lb, const QString& dir)
+{
+ QStringList list;
+
+ if ( lb )
+ lb->clear();
+
+ QString adir = dir.isEmpty() ? settingsDir() : dir;
+ QDir settingsdir(adir);
+ settingsdir.mkdir(adir);
+
+ QStringList files = settingsdir.entryList("*.conf");
+ for (QStringList::ConstIterator it=files.begin(); it!=files.end(); ++it ) {
+ QString filename = settingsdir.filePath(*it);
+ Config cfg(filename, Config::File);
+ cfg.setGroup("Info");
+ if ( lb )
+ lb->insertItem(Resource::loadPixmap("Network/" + cfg.readEntry("Type")),
+ cfg.readEntry("Name"));
+ list.append(filename);
+ }
+
+ return list;
+}
+
+class NetworkServer : public QCopChannel {
+ Q_OBJECT
+public:
+ NetworkServer(QObject* parent) : QCopChannel("QPE/Network",parent)
+ {
+ up = FALSE;
+ examineNetworks( TRUE );
+ QCopChannel* card = new QCopChannel("QPE/Card",parent);
+ connect(card,SIGNAL(received(const QCString &, const QByteArray&)),
+ this,SLOT(cardMessage(const QCString &, const QByteArray&)));
+ }
+
+ ~NetworkServer()
+ {
+ stop();
+ }
+
+ bool networkOnline() const
+ {
+ return up;
+ }
+
+private:
+ void receive(const QCString &msg, const QByteArray& data)
+ {
+ if ( msg == "start(QString,QString)" ) {
+ QDataStream stream(data,IO_ReadOnly);
+ QString file,password;
+ stream >> file >> password;
+ if ( file.isEmpty() ) {
+ QStringList l = Network::choices();
+ for (QStringList::ConstIterator i=l.begin(); i!=l.end(); ++i) {
+ Config cfg(*i,Config::File);
+ cfg.setGroup("Info");
+ QString type = cfg.readEntry("Type");
+ NetworkInterface* plugin = Network::loadPlugin(type);
+ cfg.setGroup("Properties");
+ if ( plugin && plugin->isAvailable(cfg) ) {
+ file = *i;
+ break;
+ }
+ }
+ if ( file.isEmpty() ) {
+ QCopEnvelope("QPE/Network", "failed()");
+ return;
+ }
+ }
+ start(file,password);
+ } else if ( msg == "stop()" ) {
+ stop();
+ } else if ( msg == "choicesChanged()" ) {
+ examineNetworks();
+ }
+ }
+
+private slots:
+ void cardMessage(const QCString &msg, const QByteArray&)
+ {
+ if ( msg == "stabChanged()" )
+ examineNetworks();
+ }
+
+private:
+ void examineNetworks( bool firstStart = FALSE )
+ {
+ QStringList l = Network::choices();
+ bool wasup = up; up=FALSE;
+ QStringList pavailable = available;
+ available.clear();
+ for (QStringList::ConstIterator it=l.begin(); it!=l.end(); ++it) {
+ Config cfg(*it,Config::File);
+ cfg.setGroup("Info");
+ QString type = cfg.readEntry("Type");
+ NetworkInterface* plugin = Network::loadPlugin(type);
+ cfg.setGroup("Properties");
+ if ( plugin ) {
+ if ( plugin->isActive(cfg) ) {
+ up = TRUE;
+ if ( firstStart )
+ plugin->start( cfg );
+ }
+ if ( plugin->isAvailable(cfg) )
+ available.append(*it);
+ }
+ }
+
+ // Try to work around unreproducible bug whereby
+ // the netmon applet shows wrong state.
+ bool reannounce = wait<0;
+
+ if ( available != pavailable || reannounce ) {
+ QCopEnvelope e("QPE/Network", "available(QStringList)");
+ e << available;
+ }
+ if ( up != wasup || reannounce ) {
+ QCopEnvelope("QPE/Network", up ? "up()" : "down()");
+ }
+ }
+
+ void start( const QString& file, const QString& password )
+ {
+ if ( !current.isEmpty() )
+ stop();
+ current = QString::null;
+ Config cfg(file, Config::File);
+ cfg.setGroup("Info");
+ QString type = cfg.readEntry("Type");
+ NetworkInterface* plugin = Network::loadPlugin(type);
+ bool started = FALSE;
+ if ( plugin ) {
+ cfg.setGroup("Properties");
+ if ( plugin->start(cfg,password) ) {
+ Network::writeProxySettings( cfg );
+ current = file;
+ wait=0;
+ startTimer(400);
+ started = TRUE;
+ }
+ }
+ if ( !started ) {
+ QCopEnvelope("QPE/Network", "failed()");
+ }
+ }
+
+ void stop()
+ {
+ bool stopped = FALSE;
+ if ( !current.isEmpty() ) {
+ Config cfg(current, Config::File);
+ cfg.setGroup("Info");
+ QString type = cfg.readEntry("Type");
+ NetworkInterface* plugin = Network::loadPlugin(type);
+ if ( plugin ) {
+ cfg.setGroup("Properties");
+ if ( plugin->stop(cfg) ) {
+ current = QString::null;
+ wait=0;
+ startTimer(400);
+ stopped = TRUE;
+ }
+ }
+ }
+ if ( !stopped ) {
+ QCopEnvelope("QPE/Network", "failed()");
+ }
+ }
+
+ void timerEvent(QTimerEvent*)
+ {
+ examineNetworks();
+ if ( wait >= 0 ) {
+ if ( up == !current.isNull() ) {
+ // done
+ killTimers();
+ if ( up ) {
+ startTimer(3000); // monitor link
+ wait = -1;
+ }
+ } else {
+ wait++;
+ if ( wait == 600 ) {
+ killTimers(); // forget about it after 240 s
+ QCopEnvelope("QPE/Network", "failed()");
+ up = !current.isNull();
+ }
+ }
+ } else if ( !up ) {
+ killTimers();
+ }
+ }
+
+private:
+ QStringList available;
+ QString current;
+ bool up;
+ int wait;
+};
+
+static NetworkServer* ns=0;
+
+/*!
+ \internal
+*/
+QString Network::serviceName(const QString& service)
+{
+ Config cfg(service, Config::File);
+ cfg.setGroup("Info");
+ return cfg.readEntry("Name");
+}
+
+/*!
+ \internal
+*/
+QString Network::serviceType(const QString& service)
+{
+ Config cfg(service, Config::File);
+ cfg.setGroup("Info");
+ return cfg.readEntry("Type");
+}
+
+/*!
+ \internal
+*/
+bool Network::serviceNeedsPassword(const QString& service)
+{
+ Config cfg(service,Config::File);
+ cfg.setGroup("Info");
+ QString type = cfg.readEntry("Type");
+ NetworkInterface* plugin = Network::loadPlugin(type);
+ cfg.setGroup("Properties");
+ return plugin ? plugin->needPassword(cfg) : FALSE;
+}
+
+/*!
+ \internal
+*/
+bool Network::networkOnline()
+{
+ return ns && ns->networkOnline();
+}
+
+/*!
+ \internal
+*/
+void Network::createServer(QObject* parent)
+{
+ ns = new NetworkServer(parent);
+}
+
+/*!
+ \internal
+*/
+int Network::addStateWidgets(QWidget* parent)
+{
+ int n=0;
+ QStringList l = Network::choices();
+ QVBoxLayout* vb = new QVBoxLayout(parent);
+ for (QStringList::ConstIterator it=l.begin(); it!=l.end(); ++it) {
+ Config cfg(*it,Config::File);
+ cfg.setGroup("Info");
+ QString type = cfg.readEntry("Type");
+ NetworkInterface* plugin = Network::loadPlugin(type);
+ cfg.setGroup("Properties");
+ if ( plugin ) {
+ QWidget* w;
+ if ( (w=plugin->addStateWidget(parent,cfg)) ) {
+ n++;
+ vb->addWidget(w);
+ }
+ }
+ }
+ return n;
+}
+
+static QDict<NetworkInterface> *ifaces;
+
+/*!
+ \internal
+*/
+NetworkInterface* Network::loadPlugin(const QString& type)
+{
+#ifndef QT_NO_COMPONENT
+ if ( !ifaces ) ifaces = new QDict<NetworkInterface>;
+ NetworkInterface *iface = ifaces->find(type);
+ if ( !iface ) {
+ QString libfile = QPEApplication::qpeDir() + "/plugins/network/lib" + type + ".so";
+ QLibrary lib(libfile);
+ if ( !lib.queryInterface( IID_Network, (QUnknownInterface**)&iface ) == QS_OK )
+ return 0;
+ ifaces->insert(type,iface);
+ QString lang = getenv( "LANG" );
+ QTranslator * trans = new QTranslator(qApp);
+ QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/lib"+type+".qm";
+ if ( trans->load( tfn ))
+ qApp->installTranslator( trans );
+ else
+ delete trans;
+
+ }
+ return iface;
+#else
+ return 0;
+#endif
+}
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef NETWORK_H
+#define NETWORK_H
+
+#include <qstringlist.h>
+class QListBox;
+class QObject;
+class QWidget;
+struct NetworkInterface;
+class Config;
+
+class Network {
+public:
+ static void start(const QString& service=QString::null, const QString& password=QString::null);
+ static void stop();
+
+ static QString settingsDir();
+ static QString serviceName(const QString& service);
+ static QString serviceType(const QString& service);
+ static bool serviceNeedsPassword(const QString& service);
+ static void connectChoiceChange(QObject* receiver, const char* slot);
+ static QStringList choices(QListBox* = 0, const QString& dir=QString::null);
+ static void writeProxySettings( Config &cfg );
+
+ static NetworkInterface* loadPlugin(const QString& type);
+
+ static int addStateWidgets(QWidget* parent);
+
+ // Server only
+ static void createServer(QObject* parent);
+ static bool networkOnline();
+};
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "networkinterface.h"
+#include "network.h"
+#include "config.h"
+#include <stdio.h>
+
+QString NetworkInterface::device( Config& cfg ) const
+{
+ return cfg.readEntry("Device");
+}
+
+bool NetworkInterface::isActive( Config& cfg ) const
+{
+ QString dev = device(cfg);
+ if ( dev.isEmpty() )
+ return FALSE;
+ QString dev0 = dev+'0';
+
+ FILE* f;
+ f = fopen("/proc/net/dev", "r");
+ if ( f ) {
+ char line[1024];
+ char devname[80];
+ while ( fgets( line, 1024, f ) ) {
+ if ( sscanf(line," %[^:]:", devname)==1 )
+ {
+ if ( devname == dev || devname == dev0 ) {
+ fclose(f);
+ Network::writeProxySettings( cfg );
+ return TRUE;
+ }
+ }
+ }
+ fclose(f);
+ }
+ return FALSE;
+}
+
+QString NetworkInterface::cardType( Config& cfg ) const
+{
+ return cfg.readEntry("CardType");
+}
+
+bool NetworkInterface::isAvailable( Config& cfg ) const
+{
+ QString ct = cardType(cfg);
+ if ( ct.isEmpty() )
+ return FALSE;
+
+ FILE* f = fopen("/var/run/stab", "r");
+ if (!f) f = fopen("/var/state/pcmcia/stab", "r");
+ if (!f) f = fopen("/var/lib/pcmcia/stab", "r");
+
+ if ( f ) {
+ char line[1024];
+ char devtype[80];
+ while ( fgets( line, 1024, f ) ) {
+ if ( sscanf(line,"%*d %s %*s", devtype )==1 )
+ {
+ if ( ct == devtype ) {
+ fclose(f);
+ return TRUE;
+ }
+ }
+ }
+ fclose(f);
+ }
+
+ return FALSE;
+}
+
+bool NetworkInterface::start( Config& cfg, const QString& /*password*/ )
+{
+ return start(cfg);
+}
+
+bool NetworkInterface::needPassword( Config& ) const
+{
+ return FALSE;
+}
+
+QWidget* NetworkInterface::addStateWidget( QWidget*, Config& ) const
+{
+ return 0;
+}
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef NETWORKINTERFACE_H
+#define NETWORKINTERFACE_H
+
+#include <qnamespace.h>
+#include <qstring.h>
+#include <qpe/qcom.h>
+
+#ifndef QT_NO_COMPONENT
+// {09794290-69d5-4c42-8a53-230cf2e53c50}
+# ifndef IID_Network
+# define IID_Network QUuid( 0x09794290, 0x69d5, 0x4c42, 0x8a, 0x53, 0x23, 0x0c, 0xf2, 0xe5, 0x3c, 0x50)
+# endif
+#endif
+
+class QWidget;
+class Config;
+
+struct NetworkInterface : public QUnknownInterface
+{
+ virtual bool doProperties( QWidget *parent, Config& ) = 0;
+ virtual bool create( Config& ) = 0;
+ virtual bool remove( Config& ) = 0;
+ virtual QString device( Config& ) const;
+ virtual QString cardType( Config& ) const;
+ virtual bool isActive( Config& ) const;
+ virtual bool isAvailable( Config& ) const;
+ virtual bool start( Config& ) = 0;
+ virtual bool start( Config&, const QString& password );
+ virtual bool stop( Config& ) = 0;
+ virtual bool needPassword( Config& ) const;
+ virtual QWidget* addStateWidget( QWidget* parent, Config& ) const;
+};
+
+#endif
+
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#include "password.h"
+#include "config.h"
+#include "global.h"
+#include "backend/contact.h"
+#include <qlabel.h>
+#include <qlineedit.h>
+#include <qtextview.h>
+#include <qstring.h>
+#include <qapplication.h>
+#include <qfile.h>
+#include <qwindowsystem_qws.h>
+
+#include <qdialog.h>
+
+#include <unistd.h> //for sleep
+#include "passwordbase_p.h"
+
+class PasswordDialog : public PasswordBase
+{
+ Q_OBJECT
+
+public:
+ PasswordDialog( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ ~PasswordDialog();
+
+ void clear();
+ void setPrompt( const QString& );
+
+signals:
+ void passwordEntered( const QString& );
+
+protected:
+ bool eventFilter( QObject*, QEvent* );
+ void keyPressEvent( QKeyEvent * );
+
+private:
+ void input( QString );
+ friend class Password;
+ QString text;
+};
+
+
+extern "C" char *crypt(const char *key, const char *salt);
+static QString qcrypt(const QString& k, const char *salt)
+{
+ return QString::fromUtf8(crypt(k.utf8(),salt));
+}
+
+/*
+ * Constructs a PasswordDialog which is a child of 'parent', with the
+ * name 'name' and widget flags set to 'f'
+ */
+PasswordDialog::PasswordDialog( QWidget* parent, const char* name, WFlags fl )
+ : PasswordBase( parent, name, fl )
+{
+ button_0->installEventFilter( this );
+ button_1->installEventFilter( this );
+ button_2->installEventFilter( this );
+ button_3->installEventFilter( this );
+ button_4->installEventFilter( this );
+ button_5->installEventFilter( this );
+ button_6->installEventFilter( this );
+ button_7->installEventFilter( this );
+ button_8->installEventFilter( this );
+ button_9->installEventFilter( this );
+ button_OK->installEventFilter( this );
+ setFocus();
+}
+
+/*
+ * Destroys the object and frees any allocated resources
+ */
+PasswordDialog::~PasswordDialog()
+{
+ // no need to delete child widgets, Qt does it all for us
+}
+
+
+
+/*!
+ \reimp
+*/
+
+bool PasswordDialog::eventFilter( QObject*o, QEvent*e )
+{
+ if ( e->type() == QEvent::MouseButtonRelease ) {
+ if ( o == button_OK ) {
+ emit passwordEntered( text );
+ } else {
+ QLabel *l = (QLabel*)o;
+ input(l->text());
+ }
+ }
+ return FALSE;
+}
+
+
+/*!
+ \reimp
+*/
+
+void PasswordDialog::keyPressEvent( QKeyEvent * )
+{
+#if 0
+ if ( e->key() == Key_Enter || e->key() == Key_Return )
+ emit passwordEntered( text );
+ else
+ input( e->text() );
+#endif
+}
+
+
+/*!
+
+*/
+
+void PasswordDialog::input( QString c )
+{
+ text += c;
+ display->setText( text );
+}
+
+/*!
+
+*/
+
+void PasswordDialog::setPrompt( const QString& s )
+{
+ prompt->setText( s );
+}
+
+void PasswordDialog::clear()
+{
+ text = "";
+ input("");
+}
+
+class PasswdDlg : public QDialog
+{
+public:
+ PasswdDlg( QWidget *parent, const char * name, bool modal, bool fullscreen = FALSE )
+ : QDialog( parent, name, modal, fullscreen ? WStyle_NoBorder | WStyle_Customize | WStyle_StaysOnTop : 0 ),
+ modl(modal)
+ {
+ passw = new PasswordDialog( this );
+
+ if ( fullscreen ) {
+ QRect desk = qApp->desktop()->geometry();
+ setGeometry( 0, 0, desk.width(), desk.height() );
+ }
+
+ connect( passw, SIGNAL(passwordEntered(const QString&)),
+ this, SLOT(accept()) );
+ }
+
+ void resizeEvent( QResizeEvent * )
+ {
+ passw->resize( size() );
+ }
+
+ void reset()
+ {
+ passw->clear();
+ }
+
+ void execNonModal()
+ {
+ if ( !modl ) {
+ reset();
+ showFullScreen();
+ do {
+ qApp->enter_loop();
+ } while (result()!=1);
+ }
+ }
+
+ void accept()
+ {
+ if ( !modl )
+ qApp->exit_loop();
+ QDialog::accept();
+ }
+
+ PasswordDialog *passw;
+ bool modl;
+};
+
+class OwnerDlg : public QDialog
+{
+public:
+
+ OwnerDlg( QWidget *parent, const char * name, Contact c,
+ bool modal, bool fullscreen = FALSE )
+ : QDialog( parent, name, modal,
+ fullscreen ?
+ WStyle_NoBorder | WStyle_Customize | WStyle_StaysOnTop : 0 )
+ {
+ if ( fullscreen ) {
+ QRect desk = qApp->desktop()->geometry();
+ setGeometry( 0, 0, desk.width(), desk.height() );
+ }
+
+ // set up contents.
+ QString text = "<H1>" + tr("Owner Information") + "</H1>";
+ text += c.toRichText();
+ tv = new QTextView(this);
+ tv->setText(text);
+
+ tv->viewport()->installEventFilter(this);
+ }
+
+ void resizeEvent( QResizeEvent * )
+ {
+ tv->resize( size() );
+ }
+
+ bool eventFilter(QObject *o, QEvent *e)
+ {
+ if (e->type() == QEvent::KeyPress || e->type() == QEvent::MouseButtonPress ) {
+ accept();
+ return TRUE;
+ }
+ return QWidget::eventFilter(o, e);
+ }
+
+ void mousePressEvent( QMouseEvent * ) { accept(); }
+
+private:
+ QTextView *tv;
+};
+
+/*!
+ Returns a crypted password entered by the user when prompted with \a prompt
+ The returned value is QString::null if the user cancels the operation,
+ or the empty string if the user enters no password (but confirms the
+ dialog).
+*/
+
+QString Password::getPassword( const QString& prompt )
+{
+ PasswdDlg pd(0,0,TRUE);
+ pd.passw->setPrompt( prompt );
+
+ pd.showMaximized();
+ int r = pd.exec();
+
+ if ( r == QDialog::Accepted ) {
+ if (pd.passw->text.isEmpty())
+ return "";
+ else
+ return qcrypt(pd.passw->text,"a0");
+ } else {
+ return QString::null;
+ }
+}
+
+
+/*!
+ Prompt, fullscreen, for the user's passcode until they get it right.
+
+ If \a at_poweron is TRUE, the dialog is only used if the user's
+ preference request it at poweron; either way, the screen is always repainted
+ by this function. (this functionality may move to the caller of this function).
+*/
+
+void Password::authenticate(bool at_poweron)
+{
+ Config cfg("Security");
+ cfg.setGroup("Passcode");
+ QString passcode = cfg.readEntry("passcode");
+ if ( !passcode.isEmpty()
+ && (!at_poweron || cfg.readNumEntry("passcode_poweron",0)) )
+ {
+ // Do it as a fullscreen modal dialog
+ PasswdDlg pd(0,0,TRUE,TRUE);
+
+ // see if there is contact information.
+ OwnerDlg *oi = 0;
+ QString vfilename = Global::applicationFileName("addressbook",
+ "businesscard.vcf");
+ if (QFile::exists(vfilename)) {
+ Contact c;
+ c = Contact::readVCard( vfilename )[0];
+
+ oi = new OwnerDlg(0, 0, c, TRUE, TRUE);
+ }
+
+ pd.reset();
+ pd.exec();
+ while (qcrypt(pd.passw->text, "a0") != passcode) {
+ if (oi)
+ oi->exec();
+ pd.reset();
+ pd.exec();
+ }
+ } else if ( at_poweron ) {
+ // refresh screen #### should probably be in caller
+ // Not needed (we took away the screen blacking)
+ //if ( qwsServer )
+ //qwsServer->refresh();
+ }
+}
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef PASSWORD_H
+#define PASSWORD_H
+
+#include <qstring.h>
+
+class Password
+{
+public:
+ static void authenticate(bool atpoweron=FALSE);
+ static QString getPassword( const QString& prompt );
+};
+
+#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 @@
+<!DOCTYPE UI><UI>
+<class>PasswordBase</class>
+<widget>
+ <class>QWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>PasswordBase</cstring>
+ </property>
+ <property stdset="1">
+ <name>geometry</name>
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>251</width>
+ <height>443</height>
+ </rect>
+ </property>
+ <property stdset="1">
+ <name>font</name>
+ <font>
+ <pointsize>24</pointsize>
+ </font>
+ </property>
+ <property stdset="1">
+ <name>caption</name>
+ <string>Form1</string>
+ </property>
+ <grid>
+ <property stdset="1">
+ <name>margin</name>
+ <number>11</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget row="2" column="0" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>button_1</cstring>
+ </property>
+ <property stdset="1">
+ <name>frameShape</name>
+ <enum>Box</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>Raised</enum>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>1</string>
+ </property>
+ <property stdset="1">
+ <name>alignment</name>
+ <set>AlignCenter</set>
+ </property>
+ <property>
+ <name>hAlign</name>
+ </property>
+ </widget>
+ <widget row="2" column="1" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>button_2</cstring>
+ </property>
+ <property stdset="1">
+ <name>frameShape</name>
+ <enum>Box</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>Raised</enum>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>2</string>
+ </property>
+ <property stdset="1">
+ <name>alignment</name>
+ <set>AlignCenter</set>
+ </property>
+ <property>
+ <name>hAlign</name>
+ </property>
+ </widget>
+ <widget row="2" column="2" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>button_3</cstring>
+ </property>
+ <property stdset="1">
+ <name>frameShape</name>
+ <enum>Box</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>Raised</enum>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>3</string>
+ </property>
+ <property stdset="1">
+ <name>alignment</name>
+ <set>AlignCenter</set>
+ </property>
+ <property>
+ <name>hAlign</name>
+ </property>
+ </widget>
+ <widget row="3" column="0" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>button_4</cstring>
+ </property>
+ <property stdset="1">
+ <name>frameShape</name>
+ <enum>Box</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>Raised</enum>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>4</string>
+ </property>
+ <property stdset="1">
+ <name>alignment</name>
+ <set>AlignCenter</set>
+ </property>
+ <property>
+ <name>hAlign</name>
+ </property>
+ </widget>
+ <widget row="3" column="1" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>button_5</cstring>
+ </property>
+ <property stdset="1">
+ <name>frameShape</name>
+ <enum>Box</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>Raised</enum>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>5</string>
+ </property>
+ <property stdset="1">
+ <name>alignment</name>
+ <set>AlignCenter</set>
+ </property>
+ <property>
+ <name>hAlign</name>
+ </property>
+ </widget>
+ <widget row="3" column="2" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>button_6</cstring>
+ </property>
+ <property stdset="1">
+ <name>frameShape</name>
+ <enum>Box</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>Raised</enum>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>6</string>
+ </property>
+ <property stdset="1">
+ <name>alignment</name>
+ <set>AlignCenter</set>
+ </property>
+ <property>
+ <name>hAlign</name>
+ </property>
+ </widget>
+ <widget row="4" column="0" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>button_7</cstring>
+ </property>
+ <property stdset="1">
+ <name>frameShape</name>
+ <enum>Box</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>Raised</enum>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>7</string>
+ </property>
+ <property stdset="1">
+ <name>alignment</name>
+ <set>AlignCenter</set>
+ </property>
+ <property>
+ <name>hAlign</name>
+ </property>
+ </widget>
+ <widget row="4" column="1" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>button_8</cstring>
+ </property>
+ <property stdset="1">
+ <name>frameShape</name>
+ <enum>Box</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>Raised</enum>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>8</string>
+ </property>
+ <property stdset="1">
+ <name>alignment</name>
+ <set>AlignCenter</set>
+ </property>
+ <property>
+ <name>hAlign</name>
+ </property>
+ </widget>
+ <widget row="4" column="2" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>button_9</cstring>
+ </property>
+ <property stdset="1">
+ <name>frameShape</name>
+ <enum>Box</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>Raised</enum>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>9</string>
+ </property>
+ <property stdset="1">
+ <name>alignment</name>
+ <set>AlignCenter</set>
+ </property>
+ <property>
+ <name>hAlign</name>
+ </property>
+ <property>
+ <name>layoutMargin</name>
+ </property>
+ <property>
+ <name>layoutSpacing</name>
+ </property>
+ </widget>
+ <widget row="5" column="0" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>button_0</cstring>
+ </property>
+ <property stdset="1">
+ <name>frameShape</name>
+ <enum>Box</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>Raised</enum>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>0</string>
+ </property>
+ <property stdset="1">
+ <name>alignment</name>
+ <set>AlignCenter</set>
+ </property>
+ <property>
+ <name>hAlign</name>
+ </property>
+ <property>
+ <name>layoutMargin</name>
+ </property>
+ <property>
+ <name>layoutSpacing</name>
+ </property>
+ </widget>
+ <widget row="5" column="1" rowspan="1" colspan="2" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>button_OK</cstring>
+ </property>
+ <property stdset="1">
+ <name>frameShape</name>
+ <enum>Box</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>Raised</enum>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>OK</string>
+ </property>
+ <property stdset="1">
+ <name>alignment</name>
+ <set>AlignCenter</set>
+ </property>
+ <property>
+ <name>hAlign</name>
+ </property>
+ </widget>
+ <widget row="0" column="0" rowspan="1" colspan="3" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>prompt</cstring>
+ </property>
+ <property stdset="1">
+ <name>font</name>
+ <font>
+ <pointsize>18</pointsize>
+ </font>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Enter passcode</string>
+ </property>
+ </widget>
+ <widget row="1" column="0" rowspan="1" colspan="3" >
+ <class>QLineEdit</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>display</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ <property stdset="1">
+ <name>palette</name>
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>228</red>
+ <green>228</green>
+ <blue>228</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>242</red>
+ <green>242</green>
+ <blue>242</blue>
+ </color>
+ <color>
+ <red>78</red>
+ <green>78</green>
+ <blue>78</blue>
+ </color>
+ <color>
+ <red>183</red>
+ <green>183</green>
+ <blue>183</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>220</red>
+ <green>220</green>
+ <blue>220</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </active>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>228</red>
+ <green>228</green>
+ <blue>228</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>114</red>
+ <green>114</green>
+ <blue>114</blue>
+ </color>
+ <color>
+ <red>152</red>
+ <green>152</green>
+ <blue>152</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>220</red>
+ <green>220</green>
+ <blue>220</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </disabled>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>228</red>
+ <green>228</green>
+ <blue>228</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>242</red>
+ <green>242</green>
+ <blue>242</blue>
+ </color>
+ <color>
+ <red>78</red>
+ <green>78</green>
+ <blue>78</blue>
+ </color>
+ <color>
+ <red>183</red>
+ <green>183</green>
+ <blue>183</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>220</red>
+ <green>220</green>
+ <blue>220</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </inactive>
+ </palette>
+ </property>
+ <property stdset="1">
+ <name>echoMode</name>
+ <enum>Password</enum>
+ </property>
+ </widget>
+ </grid>
+</widget>
+</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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "power.h"
+
+#ifdef QT_QWS_CUSTOM
+#include "custom.h"
+#endif
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#ifdef QT_QWS_IPAQ_NO_APM
+#include <linux/h3600_ts.h>
+#endif
+
+PowerStatusManager *PowerStatusManager::powerManager = 0;
+PowerStatus *PowerStatusManager::ps = 0;
+
+static bool haveProcApm = false;
+
+PowerStatusManager::PowerStatusManager()
+{
+ powerManager = this;
+ ps = new PowerStatus;
+ FILE *f = fopen("/proc/apm", "r");
+ if ( f ) {
+ fclose(f);
+ haveProcApm = TRUE;
+ }
+}
+
+const PowerStatus &PowerStatusManager::readStatus()
+{
+ if ( !powerManager )
+ (void)new PowerStatusManager;
+
+ powerManager->getStatus();
+
+ return *ps;
+}
+
+// Standard /proc/apm reader
+bool PowerStatusManager::getProcApmStatus( int &ac, int &bs, int &bf, int &pc, int &sec )
+{
+ bool ok = false;
+
+ ac = 0xff;
+ bs = 0xff;
+ bf = 0xff;
+ pc = -1;
+ sec = -1;
+
+ FILE *f = fopen("/proc/apm", "r");
+ if ( f ) {
+ //I 1.13 1.2 0x02 0x00 0xff 0xff 49% 147 sec
+ char u;
+ fscanf(f, "%*[^ ] %*d.%*d 0x%*x 0x%x 0x%x 0x%x %d%% %i %c",
+ &ac, &bs, &bf, &pc, &sec, &u);
+ fclose(f);
+ switch ( u ) {
+ case 'm': sec *= 60;
+ case 's': break; // ok
+ default: sec = -1; // unknown
+ }
+
+ // extract data
+ switch ( bs ) {
+ case 0x00:
+ ps->bs = PowerStatus::High;
+ break;
+ case 0x01:
+ ps->bs = PowerStatus::Low;
+ break;
+ case 0x7f:
+ ps->bs = PowerStatus::VeryLow;
+ break;
+ case 0x02:
+ ps->bs = PowerStatus::Critical;
+ break;
+ case 0x03:
+ ps->bs = PowerStatus::Charging;
+ break;
+ case 0x04:
+ ps->bs = PowerStatus::NotPresent;
+ break;
+ }
+
+ switch ( ac ) {
+ case 0x00:
+ ps->ac = PowerStatus::Offline;
+ break;
+ case 0x01:
+ ps->ac = PowerStatus::Online;
+ break;
+ case 0x02:
+ ps->ac = PowerStatus::Backup;
+ break;
+ }
+
+ if ( pc > 100 )
+ pc = -1;
+
+ ps->percentRemain = pc;
+ ps->secsRemain = sec;
+
+ ok = true;
+ }
+
+ return ok;
+}
+
+#ifdef QT_QWS_CUSTOM
+
+void PowerStatusManager::getStatus()
+{
+ int ac, bs, bf, pc, sec;
+ ps->percentAccurate = TRUE; // not for long...
+
+ if ( haveProcApm && getProcApmStatus( ac, bs, bf, pc, sec ) ) {
+ // special case
+ if ( bs == 0x7f )
+ ps->bs = PowerStatus::VeryLow;
+ pc = -1; // fake percentage
+ if ( pc < 0 ) {
+ switch ( bs ) {
+ case 0x00: ps->percentRemain = 100; break; // High
+ case 0x01: ps->percentRemain = 30; break; // Low
+ case 0x7f: ps->percentRemain = 10; break; // Very Low
+ case 0x02: ps->percentRemain = 5; break; // Critical
+ case 0x03: ps->percentRemain = -1; break; // Charging
+ }
+ ps->percentAccurate = FALSE;
+ }
+ }
+
+ char *device = "/dev/apm_bios";
+ int fd = ::open (device, O_WRONLY);
+ if ( fd >= 0 ) {
+ int bbat_status = ioctl( fd, APM_IOC_BATTERY_BACK_CHK, 0 );
+ switch ( bbat_status ) {
+ case 0x00:
+ ps->bbs = PowerStatus::High;
+ break;
+ case 0x01:
+ ps->bbs = PowerStatus::Low;
+ break;
+ case 0x7f:
+ ps->bbs = PowerStatus::VeryLow;
+ break;
+ case 0x02:
+ ps->bbs = PowerStatus::Critical;
+ break;
+ case 0x03:
+ ps->bbs = PowerStatus::Charging;
+ break;
+ case 0x04:
+ ps->bbs = PowerStatus::NotPresent;
+ break;
+ }
+ ::close(fd);
+ }
+}
+
+#else
+
+void PowerStatusManager::getStatus()
+{
+ bool usedApm = FALSE;
+
+ ps->percentAccurate = TRUE;
+
+ // Some iPAQ kernel builds don't have APM. If this is not the case we
+ // save ourselves an ioctl by testing if /proc/apm exists in the
+ // constructor and we use /proc/apm instead
+ int ac, bs, bf, pc, sec;
+ if ( haveProcApm )
+ usedApm = getProcApmStatus( ac, bs, bf, pc, sec );
+
+ if ( !usedApm ) {
+#ifdef QT_QWS_IPAQ_NO_APM
+ int fd;
+ int err;
+ struct bat_dev batt_info;
+
+ memset(&batt_info, 0, sizeof(batt_info));
+
+ fd = ::open("/dev/ts",O_RDONLY);
+ if( fd < 0 )
+ return;
+
+ ioctl(fd, GET_BATTERY_STATUS, &batt_info);
+ ac_status = batt_info.ac_status;
+ ps->percentRemain = ( 425 * batt_info.batt1_voltage ) / 1000 - 298; // from h3600_ts.c
+ ps->secsRemain = -1; // seconds is bogus on iPAQ
+ ::close (fd);
+#else
+ ps->percentRemain = 100;
+ ps->secsRemain = -1;
+ ps->percentAccurate = FALSE;
+#endif
+ }
+}
+
+#endif
+
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef POWER_H
+#define POWER_H
+
+#include <qobject.h>
+
+class PowerStatus
+{
+public:
+ PowerStatus() {
+ ac = Offline;
+ bs = NotPresent;
+ bbs = NotPresent;
+ percentRemain = -1;
+ secsRemain = -1;
+ }
+
+ enum ACStatus { Offline, Online, Backup };
+ ACStatus acStatus() const { return ac; }
+
+ enum BatteryStatus { High=0x01, Low=0x02, VeryLow=0x04, Critical=0x08,
+ Charging=0x10, NotPresent=0x20 };
+ BatteryStatus batteryStatus() const { return bs; }
+ BatteryStatus backupBatteryStatus() const { return bbs; }
+
+ bool batteryPercentAccurate() const { return percentAccurate; }
+ int batteryPercentRemaining() const { return percentRemain; }
+ int batteryTimeRemaining() const { return secsRemain; }
+
+ bool operator!=( const PowerStatus &ps ) {
+ return (ps.ac != ac) || (ps.bs != bs) || (ps.bbs != bbs) ||
+ (ps.percentRemain != percentRemain) ||
+ (ps.secsRemain != secsRemain );
+ }
+
+private:
+ ACStatus ac;
+ BatteryStatus bs;
+ BatteryStatus bbs;
+ int percentRemain;
+ int secsRemain;
+ bool percentAccurate;
+
+ friend class PowerStatusManager;
+};
+
+
+class PowerStatusManager
+{
+public:
+ PowerStatusManager();
+
+ static const PowerStatus &readStatus();
+
+protected:
+ bool getProcApmStatus( int &ac, int &bs, int &bf, int &pc, int &sec );
+ void getStatus();
+
+private:
+ static PowerStatus *ps;
+ static PowerStatusManager *powerManager;
+};
+
+
+#endif
+
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "process.h"
+
+#ifndef QT_NO_PROCESS
+
+#include "qapplication.h"
+
+
+Process::Process( QObject *parent, const char *name )
+ : QObject( parent, name ), ioRedirection( FALSE ), notifyOnExit( FALSE ),
+ wroteToStdinConnected( FALSE )
+{
+ init();
+}
+
+Process::Process( const QString& arg0, QObject *parent, const char *name )
+ : QObject( parent, name ), ioRedirection( FALSE ), notifyOnExit( FALSE ),
+ wroteToStdinConnected( FALSE )
+{
+ init();
+ addArgument( arg0 );
+}
+
+Process::Process( const QStringList& args, QObject *parent, const char *name )
+ : QObject( parent, name ), ioRedirection( FALSE ), notifyOnExit( FALSE ),
+ wroteToStdinConnected( FALSE )
+{
+ init();
+ setArguments( args );
+}
+
+
+QStringList Process::arguments() const
+{
+ return _arguments;
+}
+
+void Process::setArguments( const QStringList& args )
+{
+ _arguments = args;
+}
+
+void Process::addArgument( const QString& arg )
+{
+ _arguments.append( arg );
+}
+
+bool Process::exec( const QString& in, QString& out, QStringList *env )
+{
+ QByteArray sout;
+ QByteArray sin = in.local8Bit(); sin.resize(sin.size()-1); // cut nul
+ bool r = exec( sin, sout, env );
+ out = QString::fromLocal8Bit(sout);
+ return r;
+}
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef PROCESS_H
+#define PROCESS_H
+
+//#ifndef QT_H
+#include "qobject.h"
+#include "qstringlist.h"
+#include "qdir.h"
+//#endif // QT_H
+
+//#ifndef QT_NO_PROCESS
+
+class ProcessPrivate;
+
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+// This is a subset of the Process API found in Qt 3.0
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+
+class Q_EXPORT Process : public QObject
+{
+ Q_OBJECT
+public:
+ Process( QObject *parent=0, const char *name=0 );
+ Process( const QString& arg0, QObject *parent=0, const char *name=0 );
+ Process( const QStringList& args, QObject *parent=0, const char *name=0 );
+ ~Process();
+
+ // set and get the arguments and working directory
+ QStringList arguments() const;
+ virtual void setArguments( const QStringList& args );
+ virtual void addArgument( const QString& arg );
+ // control the execution
+ virtual bool exec( const QString& in, QString& out, QStringList *env=0 );
+ virtual bool exec( const QByteArray& in, QByteArray& out, QStringList *env=0 );
+
+private:
+ void init();
+
+private:
+ ProcessPrivate *d;
+ QStringList _arguments;
+
+ int exitStat; // exit status
+ bool exitNormal; // normal exit?
+ bool ioRedirection; // automatically set be (dis)connectNotify
+ bool notifyOnExit; // automatically set be (dis)connectNotify
+ bool wroteToStdinConnected; // automatically set be (dis)connectNotify
+
+ friend class ProcessPrivate;
+ friend class ProcessManager;
+ friend class Proc;
+};
+
+//#endif // QT_NO_PROCESS
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QT_H
+# include <qfeatures.h>
+#endif // QT_H
+
+#ifndef QT_NO_PROCESS
+
+//#include "qplatformdefs.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <signal.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <fcntl.h>
+
+#include "process.h"
+#include "qapplication.h"
+//#include "qptrqueue.h"
+//#include "qptrlist.h"
+#include "qsocketnotifier.h"
+#include "qtimer.h"
+//#include "qcleanuphandler.h"
+#include "qregexp.h"
+
+#include <stdlib.h>
+#include <errno.h>
+
+#define QPtrList QList
+
+//#define QT_QPROCESS_DEBUG
+
+
+class Proc;
+class ProcessManager;
+class ProcessPrivate
+{
+public:
+ ProcessPrivate();
+ ~ProcessPrivate();
+
+ void closeOpenSocketsForChild();
+ void newProc( pid_t pid, Process *process );
+
+ QByteArray bufStdout;
+ QByteArray bufStderr;
+
+ QSocketNotifier *notifierStdin;
+ QSocketNotifier *notifierStdout;
+ QSocketNotifier *notifierStderr;
+
+ ssize_t stdinBufRead;
+ Proc *proc;
+
+ bool exitValuesCalculated;
+ bool socketReadCalled;
+
+ static ProcessManager *procManager;
+};
+
+
+/***********************************************************************
+ *
+ * Proc
+ *
+ **********************************************************************/
+/*
+ The class Process does not necessarily map exactly to the running
+ child processes: if the process is finished, the Process class may still be
+ there; furthermore a user can use Process to start more than one process.
+
+ The helper-class Proc has the semantics that one instance of this class maps
+ directly to a running child process.
+*/
+class Proc
+{
+public:
+ Proc( pid_t p, Process *proc=0 ) : pid(p), process(proc)
+ {
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "Proc: Constructor for pid %d and Process %p", pid, process );
+#endif
+ socketStdin = 0;
+ socketStdout = 0;
+ socketStderr = 0;
+ }
+ ~Proc()
+ {
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "Proc: Destructor for pid %d and Process %p", pid, process );
+#endif
+ if ( process != 0 ) {
+ if ( process->d->notifierStdin )
+ process->d->notifierStdin->setEnabled( FALSE );
+ if ( process->d->notifierStdout )
+ process->d->notifierStdout->setEnabled( FALSE );
+ if ( process->d->notifierStderr )
+ process->d->notifierStderr->setEnabled( FALSE );
+ process->d->proc = 0;
+ }
+ if( socketStdin != 0 )
+ ::close( socketStdin );
+ // ### close these sockets even on parent exit or is it better only on
+ // sigchld (but what do I have to do with them on exit then)?
+ if( socketStdout != 0 )
+ ::close( socketStdout );
+ if( socketStderr != 0 )
+ ::close( socketStderr );
+ }
+
+ pid_t pid;
+ int socketStdin;
+ int socketStdout;
+ int socketStderr;
+ Process *process;
+};
+
+/***********************************************************************
+ *
+ * ProcessManager
+ *
+ **********************************************************************/
+class ProcessManager : public QObject
+{
+ Q_OBJECT
+
+public:
+ ProcessManager();
+ ~ProcessManager();
+
+ void append( Proc *p );
+ void remove( Proc *p );
+
+public slots:
+ void removeMe();
+
+public:
+ struct sigaction oldactChld;
+ struct sigaction oldactPipe;
+ QPtrList<Proc> *procList;
+ int sigchldFd[2];
+};
+
+
+ProcessManager::ProcessManager()
+{
+ procList = new QPtrList<Proc>;
+ procList->setAutoDelete( TRUE );
+}
+
+ProcessManager::~ProcessManager()
+{
+ delete procList;
+}
+
+void ProcessManager::append( Proc *p )
+{
+ procList->append( p );
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "ProcessManager: append process (procList.count(): %d)", procList->count() );
+#endif
+}
+
+void ProcessManager::remove( Proc *p )
+{
+ procList->remove( p );
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "ProcessManager: remove process (procList.count(): %d)", procList->count() );
+#endif
+ if ( procList->count() == 0 ) {
+ QTimer::singleShot( 0, this, SLOT(removeMe()) );
+ }
+}
+
+void ProcessManager::removeMe()
+{
+ ProcessPrivate::procManager = 0;
+ delete this;
+}
+
+#include "process_unix.moc"
+
+
+/***********************************************************************
+ *
+ * ProcessPrivate
+ *
+ **********************************************************************/
+ProcessManager *ProcessPrivate::procManager = 0;
+
+ProcessPrivate::ProcessPrivate()
+{
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "ProcessPrivate: Constructor" );
+#endif
+ stdinBufRead = 0;
+
+ notifierStdin = 0;
+ notifierStdout = 0;
+ notifierStderr = 0;
+
+ exitValuesCalculated = FALSE;
+ socketReadCalled = FALSE;
+
+ proc = 0;
+}
+
+ProcessPrivate::~ProcessPrivate()
+{
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "ProcessPrivate: Destructor" );
+#endif
+
+ if ( proc != 0 ) {
+ if ( proc->socketStdin != 0 ) {
+ ::close( proc->socketStdin );
+ proc->socketStdin = 0;
+ }
+ proc->process = 0;
+ }
+
+ delete notifierStdin;
+ delete notifierStdout;
+ delete notifierStderr;
+}
+
+/*
+ Closes all open sockets in the child process that are not needed by the child
+ process. Otherwise one child may have an open socket on standard input, etc.
+ of another child.
+*/
+void ProcessPrivate::closeOpenSocketsForChild()
+{
+ if ( procManager != 0 ) {
+ if ( procManager->sigchldFd[0] != 0 )
+ ::close( procManager->sigchldFd[0] );
+ if ( procManager->sigchldFd[1] != 0 )
+ ::close( procManager->sigchldFd[1] );
+
+ // close also the sockets from other Process instances
+ Proc *proc;
+ for ( proc=procManager->procList->first(); proc!=0; proc=procManager->procList->next() ) {
+ ::close( proc->socketStdin );
+ ::close( proc->socketStdout );
+ ::close( proc->socketStderr );
+ }
+ }
+}
+
+void ProcessPrivate::newProc( pid_t pid, Process *process )
+{
+ proc = new Proc( pid, process );
+ if ( procManager == 0 ) {
+ procManager = new ProcessManager;
+ }
+ // the ProcessManager takes care of deleting the Proc instances
+ procManager->append( proc );
+}
+
+
+/***********************************************************************
+ *
+ * Process
+ *
+ **********************************************************************/
+/*!
+ This private class does basic initialization.
+*/
+void Process::init()
+{
+ d = new ProcessPrivate();
+ exitStat = 0;
+ exitNormal = FALSE;
+}
+
+/*!
+ Destroys the class.
+
+ If the process is running, it is NOT terminated! Standard input, standard
+ output and standard error of the process are closed.
+
+ \sa hangUp() kill()
+*/
+Process::~Process()
+{
+ delete d;
+}
+
+bool Process::exec( const QByteArray& in, QByteArray& out, QStringList *env )
+{
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "Process::exec()" );
+#endif
+
+ int sStdin[2];
+ int sStdout[2];
+ int sStderr[2];
+
+ // open sockets for piping
+ if ( ::socketpair( AF_UNIX, SOCK_STREAM, 0, sStdin ) ) {
+ return FALSE;
+ }
+ if ( ::socketpair( AF_UNIX, SOCK_STREAM, 0, sStderr ) ) {
+ return FALSE;
+ }
+ if ( ::socketpair( AF_UNIX, SOCK_STREAM, 0, sStdout ) ) {
+ return FALSE;
+ }
+
+ // the following pipe is only used to determine if the process could be
+ // started
+ int fd[2];
+ if ( pipe( fd ) < 0 ) {
+ // non critical error, go on
+ fd[0] = 0;
+ fd[1] = 0;
+ }
+
+ // construct the arguments for exec
+ QCString *arglistQ = new QCString[ _arguments.count() + 1 ];
+ const char** arglist = new const char*[ _arguments.count() + 1 ];
+ int i = 0;
+ for ( QStringList::Iterator it = _arguments.begin(); it != _arguments.end(); ++it ) {
+ arglistQ[i] = (*it).local8Bit();
+ arglist[i] = arglistQ[i];
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "Process::start(): arg %d = %s", i, arglist[i] );
+#endif
+ i++;
+ }
+ arglist[i] = 0;
+
+ // fork and exec
+ QApplication::flushX();
+ pid_t pid = fork();
+ if ( pid == 0 ) {
+ // child
+ d->closeOpenSocketsForChild();
+ ::close( sStdin[1] );
+ ::close( sStdout[0] );
+ ::close( sStderr[0] );
+ ::dup2( sStdin[0], STDIN_FILENO );
+ ::dup2( sStdout[1], STDOUT_FILENO );
+ ::dup2( sStderr[1], STDERR_FILENO );
+ if ( fd[0] )
+ ::close( fd[0] );
+ if ( fd[1] )
+ ::fcntl( fd[1], F_SETFD, FD_CLOEXEC ); // close on exec shows sucess
+
+ if ( env == 0 ) { // inherit environment and start process
+ ::execvp( arglist[0], (char*const*)arglist ); // ### cast not nice
+ } else { // start process with environment settins as specified in env
+ // construct the environment for exec
+ int numEntries = env->count();
+ bool setLibraryPath =
+ env->grep( QRegExp( "^LD_LIBRARY_PATH=" ) ).isEmpty() &&
+ getenv( "LD_LIBRARY_PATH" ) != 0;
+ if ( setLibraryPath )
+ numEntries++;
+ QCString *envlistQ = new QCString[ numEntries + 1 ];
+ const char** envlist = new const char*[ numEntries + 1 ];
+ int i = 0;
+ if ( setLibraryPath ) {
+ envlistQ[i] = QString( "LD_LIBRARY_PATH=%1" ).arg( getenv( "LD_LIBRARY_PATH" ) ).local8Bit();
+ envlist[i] = envlistQ[i];
+ i++;
+ }
+ for ( QStringList::Iterator it = env->begin(); it != env->end(); ++it ) {
+ envlistQ[i] = (*it).local8Bit();
+ envlist[i] = envlistQ[i];
+ i++;
+ }
+ envlist[i] = 0;
+
+ // look for the executable in the search path
+ if ( _arguments.count()>0 && getenv("PATH")!=0 ) {
+ QString command = _arguments[0];
+ if ( !command.contains( '/' ) ) {
+ QStringList pathList = QStringList::split( ':', getenv( "PATH" ) );
+ for (QStringList::Iterator it = pathList.begin(); it != pathList.end(); ++it ) {
+ QFileInfo fileInfo( *it, command );
+ if ( fileInfo.isExecutable() ) {
+ arglistQ[0] = fileInfo.filePath().local8Bit();
+ arglist[0] = arglistQ[0];
+ break;
+ }
+ }
+ }
+ }
+ ::execve( arglist[0], (char*const*)arglist, (char*const*)envlist ); // ### casts not nice
+ }
+ if ( fd[1] ) {
+ char buf = 0;
+ ::write( fd[1], &buf, 1 );
+ ::close( fd[1] );
+ }
+ ::exit( -1 );
+ } else if ( pid == -1 ) {
+ // error forking
+ goto error;
+ }
+ // test if exec was successful
+ if ( fd[1] )
+ close( fd[1] );
+ if ( fd[0] ) {
+ char buf;
+ for ( ;; ) {
+ int n = ::read( fd[0], &buf, 1 );
+ if ( n==1 ) {
+ // socket was not closed => error
+ goto error;
+ } else if ( n==-1 ) {
+ if ( errno==EAGAIN || errno==EINTR )
+ // try it again
+ continue;
+ }
+ break;
+ }
+ }
+
+
+ ::close( sStdin[0] );
+ ::close( sStdout[1] );
+ ::close( sStderr[1] );
+
+ // DIFFERENT
+
+ {
+ int written=0;
+ int readden=0; // sic.
+ while (1) {
+ const int bufsize=4096;
+ struct timeval *timeout = 0; // #### could have this
+ fd_set r; FD_ZERO(&r);
+ fd_set w; FD_ZERO(&w);
+ FD_SET( sStdout[0], &r );
+ out.resize( readden+bufsize );
+ if ( int(in.size()) > written )
+ FD_SET( sStdin[1], &w );
+ int highest = QMAX(sStdout[0],sStdin[1])+1;
+ select(highest, &r, &w, 0, timeout);
+ if ( FD_ISSET( sStdout[0], &r ) ) {
+ int n = read( sStdout[0], out.data()+readden, bufsize );
+ if ( n > 0 )
+ readden += n;
+ else
+ break;
+ }
+ if ( FD_ISSET( sStdin[1], &w ) ) {
+ int n = write( sStdin[1], in.data()+written, in.size()-written );
+ if ( n > 0 )
+ written += n;
+ }
+ }
+ out.resize(readden);
+ }
+
+ // cleanup and return
+ delete[] arglistQ;
+ delete[] arglist;
+ ::close( sStdin[1] );
+ ::close( sStdout[0] );
+ ::close( sStderr[0] );
+ return TRUE;
+
+error:
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "Process::start(): error starting process" );
+#endif
+ ::close( sStdin[1] );
+ ::close( sStdout[0] );
+ ::close( sStderr[0] );
+ ::close( sStdin[0] );
+ ::close( sStdout[1] );
+ ::close( sStderr[1] );
+ ::close( fd[0] );
+ ::close( fd[1] );
+ delete[] arglistQ;
+ delete[] arglist;
+ return FALSE;
+}
+
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "proxies.h"
+#include "proxiesbase_p.h"
+#include "config.h"
+
+#include <qcombobox.h>
+#include <qlineedit.h>
+#include <qframe.h>
+#include <qvalidator.h>
+#include <qspinbox.h>
+#include <qradiobutton.h>
+
+Proxies::Proxies( QWidget* parent ) :
+ QVBox(parent)
+{
+ d = new ProxiesBase( this );
+ connect(d->type,SIGNAL(activated(int)),this,SLOT(typeChanged(int)));
+}
+
+void Proxies::typeChanged(int t)
+{
+ switch (t) {
+ case 0: d->autopanel->hide(); d->setpanel->hide(); break;
+ case 1: d->setpanel->hide(); d->autopanel->show(); break;
+ case 2: d->autopanel->hide(); d->setpanel->show(); break;
+ }
+}
+
+class ProxyValidator : public QValidator {
+public:
+ ProxyValidator( QWidget * parent, const char *name = 0 ) :
+ QValidator(parent,name)
+ {
+ }
+
+ State validate( QString &s, int &pos ) const
+ {
+ int i;
+ for (i=0; i<(int)s.length(); i++) {
+ if ( s[i] == ',' || s[i] == ';' || s[i] == '\n' || s[i] == '\r' )
+ s[i] = ' ';
+ }
+ for (i=0; i<(int)s.length()-1; ) {
+ if ( s[i] == ' ' && s[i+1] == ' ' ) {
+ if (pos>i) pos--;
+ s = s.left(i)+s.mid(i+2);
+ } else
+ i++;
+ }
+ return Valid;
+ }
+};
+
+void Proxies::readConfig(Config& cfg)
+{
+ int t = cfg.readNumEntry("type",0);
+ d->type->setCurrentItem(t);
+ typeChanged(t);
+
+ QString s;
+
+ s = cfg.readEntry("autoconfig");
+ if ( !s.isEmpty() )
+ d->autoconfig->insertItem(s);
+
+
+ s = cfg.readEntry("httphost");
+ if ( !s.isEmpty() )
+ d->httphost->setText(s);
+
+ int i;
+ i = cfg.readNumEntry("httpport");
+ if ( i>0 )
+ d->httpport->setValue(i);
+
+ s = cfg.readEntry("ftphost");
+ if ( !s.isEmpty() )
+ d->ftphost->setText(s);
+
+ i = cfg.readNumEntry("ftpport");
+ if ( i>0 )
+ d->ftpport->setValue(i);
+
+ s = cfg.readEntry("noproxies");
+ d->noproxies->setValidator(new ProxyValidator(this));
+ d->noproxies->setText(s);
+}
+
+void Proxies::writeConfig( Config &cfg )
+{
+ cfg.writeEntry("type",d->type->currentItem());
+ cfg.writeEntry("autoconfig", d->autoconfig->currentText());
+ cfg.writeEntry("httphost", d->httphost->text());
+ cfg.writeEntry("httpport", d->httpport->text());
+ cfg.writeEntry("ftphost", d->ftphost->text());
+ cfg.writeEntry("ftpport", d->ftpport->text());
+ cfg.writeEntry("noproxies", d->noproxies->text());
+}
+
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef PROXIESSETTINGS_H
+#define PROXIESSETTINGS_H
+
+#include <qvbox.h>
+#include "config.h"
+
+class ProxiesBase;
+
+class Proxies : public QVBox {
+ Q_OBJECT
+
+public:
+ Proxies( QWidget* parent );
+
+ void readConfig( Config &cfg );
+ void writeConfig( Config &cfg );
+
+private slots:
+ void typeChanged(int);
+
+private:
+ ProxiesBase* d;
+};
+
+#endif
+
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 @@
+<!DOCTYPE UI><UI>
+<class>ProxiesBase</class>
+<widget>
+ <class>QWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>ProxiesBase</cstring>
+ </property>
+ <property stdset="1">
+ <name>geometry</name>
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>321</width>
+ <height>366</height>
+ </rect>
+ </property>
+ <property stdset="1">
+ <name>caption</name>
+ <string>Proxy Settings</string>
+ </property>
+ <property>
+ <name>layoutMargin</name>
+ </property>
+ <property>
+ <name>layoutSpacing</name>
+ </property>
+ <vbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>2</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>0</number>
+ </property>
+ <widget>
+ <class>QComboBox</class>
+ <item>
+ <property>
+ <name>text</name>
+ <string>No proxies</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Auto configure proxies</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Set proxies</string>
+ </property>
+ </item>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>type</cstring>
+ </property>
+ </widget>
+ <widget>
+ <class>QFrame</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>autopanel</cstring>
+ </property>
+ <property stdset="1">
+ <name>frameShape</name>
+ <enum>NoFrame</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>Raised</enum>
+ </property>
+ <property>
+ <name>layoutMargin</name>
+ </property>
+ <property>
+ <name>layoutSpacing</name>
+ </property>
+ <vbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>1</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>0</number>
+ </property>
+ <spacer>
+ <property>
+ <name>name</name>
+ <cstring>Spacer5</cstring>
+ </property>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Vertical</enum>
+ </property>
+ <property stdset="1">
+ <name>sizeType</name>
+ <enum>Fixed</enum>
+ </property>
+ <property>
+ <name>sizeHint</name>
+ <size>
+ <width>20</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ <widget>
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout6</cstring>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel10</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Config:</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QComboBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>autoconfig</cstring>
+ </property>
+ <property stdset="1">
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ </sizepolicy>
+ </property>
+ <property stdset="1">
+ <name>editable</name>
+ <bool>true</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <spacer>
+ <property>
+ <name>name</name>
+ <cstring>Spacer27</cstring>
+ </property>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Vertical</enum>
+ </property>
+ <property stdset="1">
+ <name>sizeType</name>
+ <enum>Expanding</enum>
+ </property>
+ <property>
+ <name>sizeHint</name>
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+ </widget>
+ <widget>
+ <class>QFrame</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>setpanel</cstring>
+ </property>
+ <property stdset="1">
+ <name>frameShape</name>
+ <enum>NoFrame</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>Raised</enum>
+ </property>
+ <property>
+ <name>layoutMargin</name>
+ </property>
+ <property>
+ <name>layoutSpacing</name>
+ </property>
+ <grid>
+ <property stdset="1">
+ <name>margin</name>
+ <number>11</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget row="0" column="2" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel9</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Port:</string>
+ </property>
+ </widget>
+ <widget row="1" column="0" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>HTTP:</string>
+ </property>
+ </widget>
+ <widget row="2" column="0" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>FTP:</string>
+ </property>
+ </widget>
+ <widget row="0" column="1" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel8</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Host:</string>
+ </property>
+ </widget>
+ <widget row="1" column="2" >
+ <class>QSpinBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>httpport</cstring>
+ </property>
+ <property stdset="1">
+ <name>buttonSymbols</name>
+ <enum>PlusMinus</enum>
+ </property>
+ <property stdset="1">
+ <name>maxValue</name>
+ <number>32767</number>
+ </property>
+ <property stdset="1">
+ <name>value</name>
+ <number>8080</number>
+ </property>
+ </widget>
+ <widget row="2" column="2" >
+ <class>QSpinBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>ftpport</cstring>
+ </property>
+ <property stdset="1">
+ <name>buttonSymbols</name>
+ <enum>PlusMinus</enum>
+ </property>
+ <property stdset="1">
+ <name>maxValue</name>
+ <number>32767</number>
+ </property>
+ <property stdset="1">
+ <name>value</name>
+ <number>8080</number>
+ </property>
+ </widget>
+ <widget row="4" column="0" rowspan="1" colspan="3" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel3</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>No proxies for:</string>
+ </property>
+ </widget>
+ <widget row="5" column="0" rowspan="1" colspan="3" >
+ <class>QLineEdit</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>noproxies</cstring>
+ </property>
+ </widget>
+ <widget row="1" column="1" >
+ <class>QLineEdit</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>httphost</cstring>
+ </property>
+ </widget>
+ <widget row="2" column="1" >
+ <class>QLineEdit</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>ftphost</cstring>
+ </property>
+ </widget>
+ <widget row="3" column="0" rowspan="1" colspan="3" >
+ <class>Line</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Line1</cstring>
+ </property>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Horizontal</enum>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer>
+ <property>
+ <name>name</name>
+ <cstring>Spacer6</cstring>
+ </property>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Vertical</enum>
+ </property>
+ <property stdset="1">
+ <name>sizeType</name>
+ <enum>Expanding</enum>
+ </property>
+ <property>
+ <name>sizeHint</name>
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+</widget>
+</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 @@
+#ifndef QCLEANUPHANDLER_H
+#define QCLEANUPHANDLER_H
+
+#ifndef QT_H
+#include <qlist.h>
+#endif // QT_H
+
+template<class Type>
+class Q_EXPORT QCleanupHandler
+{
+public:
+ QCleanupHandler() : cleanupObjects( 0 ) {}
+ ~QCleanupHandler() { clear(); }
+
+ Type* add( Type **object ) {
+ if ( !cleanupObjects )
+ cleanupObjects = new QList<Type*>;
+ cleanupObjects->insert( 0, object );
+ return *object;
+ }
+
+ void remove( Type **object ) {
+ if ( !cleanupObjects )
+ return;
+ if ( cleanupObjects->findRef( object ) >= 0 )
+ (void) cleanupObjects->take();
+ }
+
+ bool isEmpty() const {
+ return cleanupObjects ? cleanupObjects->isEmpty() : TRUE;
+ }
+
+ void clear() {
+ if ( !cleanupObjects )
+ return;
+ QListIterator<Type*> it( *cleanupObjects );
+ Type **object;
+ while ( ( object = it.current() ) ) {
+ delete *object;
+ *object = 0;
+ cleanupObjects->remove( object );
+ }
+ delete cleanupObjects;
+ cleanupObjects = 0;
+ }
+
+private:
+ QList<Type*> *cleanupObjects;
+};
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QCOM_H
+#define QCOM_H
+
+#include <qstringlist.h>
+
+#ifndef QT_NO_COMPONENT
+
+#include <qpe/quuid.h>
+
+#define QRESULT unsigned long
+#define QS_OK (QRESULT)0x00000000
+#define QS_FALSE (QRESULT)0x00000001
+
+#define QE_NOTIMPL (QRESULT)0x80000001
+#define QE_OUTOFMEMORY (QRESULT)0x80000002
+#define QE_INVALIDARG (QRESULT)0x80000003
+#define QE_NOINTERFACE (QRESULT)0x80000004
+#define QE_NOCOMPONENT (QRESULT)0x80000005
+
+// {1D8518CD-E8F5-4366-99E8-879FD7E482DE}
+#ifndef IID_QUnknown
+#define IID_QUnknown QUuid(0x1d8518cd, 0xe8f5, 0x4366, 0x99, 0xe8, 0x87, 0x9f, 0xd7, 0xe4, 0x82, 0xde)
+#endif
+
+struct Q_EXPORT QUnknownInterface
+{
+ virtual QRESULT queryInterface( const QUuid&, QUnknownInterface** ) = 0;
+ virtual ulong addRef() = 0;
+ virtual ulong release() = 0;
+};
+
+// {D16111D4-E1E7-4C47-8599-24483DAE2E07}
+#ifndef IID_QLibrary
+#define IID_QLibrary QUuid( 0xd16111d4, 0xe1e7, 0x4c47, 0x85, 0x99, 0x24, 0x48, 0x3d, 0xae, 0x2e, 0x07)
+#endif
+
+struct Q_EXPORT QLibraryInterface : public QUnknownInterface
+{
+ virtual bool init() = 0;
+ virtual void cleanup() = 0;
+ virtual bool canUnload() const = 0;
+};
+
+#define Q_CREATE_INSTANCE( IMPLEMENTATION ) \
+ IMPLEMENTATION *i = new IMPLEMENTATION; \
+ QUnknownInterface* iface = 0; \
+ i->queryInterface( IID_QUnknown, &iface ); \
+ return iface;
+
+#define Q_EXPORT_INTERFACE() \
+ extern "C" QUnknownInterface* ucm_instantiate()
+
+#define Q_REFCOUNT ulong addRef() {return ref++;}ulong release() {if(!--ref){delete this;return 0;}return ref;}
+
+#else // QT_NO_COMPONENT
+
+struct Q_EXPORT QUnknownInterface
+{
+};
+
+#endif // QT_NO_COMPONENT
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "qcopenvelope_qws.h"
+#include "global.h"
+#include <qbuffer.h>
+#include <qdatastream.h>
+#include <qfile.h>
+#include <unistd.h>
+#include <errno.h>
+#include <sys/file.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <time.h>
+
+#ifndef QT_NO_COP
+
+/*!
+ \class QCopEnvelope qcopenvelope_qws.h
+ \brief The QCopEnvelope class encapsulates QCop message sending.
+
+ QCop messages allow applications to communicate with each other.
+ These messages are send using QCopEnvelope, and received by connecting
+ to a QCopChannel.
+
+ To send a message, use the following protocol:
+
+ \code
+ QCopEnvelope e(channelname, messagename);
+ e << parameter1 << parameter2 << ...;
+ \endcode
+
+ For messages without parameters, you can simply use:
+
+ \code
+ QCopEnvelope (channelname, messagename);
+ \endcode
+
+ Do not try to simplify further as some compilers may not do
+ as you expect.
+
+ The <tt>channelname</tt> of channels within Qtopia all start with "QPE/".
+ The <tt>messagename</tt> is a function identifier followed by a list of types
+ in parentheses. There are no spaces in the message name.
+
+ To receive a message, you will generally just use your applications
+ predefined QPE/Application/<i>appname</i> channel
+ (see QPEApplication::appMessage()), but you can make another channel
+ and connect it to a slot with:
+
+ \code
+ myChannel = new QCopChannel( "QPE/FooBar", this );
+ connect( myChannel, SIGNAL(received(const QCString &, const QByteArray &)),
+ this, SLOT(fooBarMessage( const QCString &, const QByteArray &)) );
+ \endcode
+
+ See also, the \link qcop.html list of Qtopia messages\endlink.
+*/
+
+/*!
+ Constructs a QCopEnvelope that will write \a message to \a channel.
+ If \a message has parameters, you must then user operator<<() to
+ write the parameters.
+*/
+QCopEnvelope::QCopEnvelope( const QCString& channel, const QCString& message ) :
+ QDataStream(new QBuffer),
+ ch(channel), msg(message)
+{
+ device()->open(IO_WriteOnly);
+}
+
+/*!
+ Writes the completed message and destroys the QCopEnvelope.
+*/
+QCopEnvelope::~QCopEnvelope()
+{
+ QByteArray data = ((QBuffer*)device())->buffer();
+ const int pref=16;
+ if ( qstrncmp(ch.data(),"QPE/Application/",pref)==0 ) {
+ QString qcopfn("/tmp/qcop-msg-");
+ qcopfn += ch.mid(pref);
+ QFile qcopfile(qcopfn);
+
+ if ( qcopfile.open(IO_WriteOnly | IO_Append) ) {
+ if(flock(qcopfile.handle(), LOCK_EX)) {
+ /* some error occured */
+ qWarning(QString("Failed to obtain file lock on %1 (%2)")
+ .arg(qcopfn).arg( errno ));
+ }
+ /* file locked, but might be stale (e.g. program for whatever
+ reason did not start). I modified more than 1 minute ago,
+ truncate the file */
+ struct stat buf;
+ time_t t;
+ if (!fstat(qcopfile.handle(), &buf) && (time(&t) != (time_t)-1) ) {
+ // success on fstat, lets compare times
+ if (buf.st_mtime + 60 < t) {
+ qWarning("stale file " + qcopfn + " found. Truncating");
+ ftruncate(qcopfile.handle(), 0);
+ qcopfile.reset();
+ }
+ }
+
+ if ( !QCopChannel::isRegistered(ch) ) {
+ int fsize = qcopfile.size();
+ {
+ QDataStream ds(&qcopfile);
+ ds << ch << msg << data;
+ flock(qcopfile.handle(), LOCK_UN);
+ qcopfile.close();
+ }
+
+ if (fsize == 0) {
+ QString cmd = ch.mid(pref);
+ cmd += " -qcop " + qcopfn;
+ Global::invoke(cmd);
+ }
+
+ char c;
+ for (int i=0; (c=msg[i]); i++) {
+ if ( c == ' ' ) {
+ // Return-value required
+ // ###### wait for it
+ break;
+ } else if ( c == '(' ) {
+ // No return value
+ break;
+ }
+ }
+ goto end;
+ } // endif isRegisterd
+ flock(qcopfile.handle(), LOCK_UN);
+ qcopfile.close();
+ qcopfile.remove();
+ } else {
+ qWarning(QString("Failed to obtain file lock on %1")
+ .arg(qcopfn));
+ } // endif open
+ }
+ QCopChannel::send(ch,msg,data);
+end:
+ delete device();
+}
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef QCOPENVELOPE_H
+#define QCOPENVELOPE_H
+
+#ifndef QT_H
+#include <qcopchannel_qws.h>
+#include <qdatastream.h>
+#endif // QT_H
+
+#ifndef QT_NO_COP
+
+class QCopEnvelope : public QDataStream {
+ QCString ch, msg;
+public:
+ QCopEnvelope( const QCString& channel, const QCString& message );
+ ~QCopEnvelope();
+};
+
+#endif
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#include "qdawg.h"
+#include <qintdict.h>
+#include <qvaluelist.h>
+#include <qtextstream.h>
+#include <qfile.h>
+#include <qtl.h>
+
+#include <limits.h>
+#include <stdio.h>
+
+// for mmap
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <unistd.h>
+
+class QDawgPrivate;
+class QTrie;
+
+typedef QValueList<QTrie*> TrieClub;
+typedef QIntDict<TrieClub> TrieClubDirectory;
+
+class TriePtr {
+public:
+ QChar letter;
+ QTrie* p;
+ int operator <(const TriePtr& o) const;
+ int operator >(const TriePtr& o) const;
+ int operator <=(const TriePtr& o) const;
+};
+
+class TrieList : public QValueList<TriePtr> {
+ bool sorted;
+public:
+ TrieList()
+ {
+ sorted=TRUE;
+ }
+
+ QTrie* findAdd(QChar c);
+ bool equal(TrieList& l);
+
+ void sort()
+ {
+ if ( !sorted ) {
+ qHeapSort(*this);
+ sorted = TRUE;
+ }
+ }
+};
+
+// A fast but memory-wasting temporary class. The Dawg is the goal.
+class QTrie {
+public:
+ QTrie();
+ ~QTrie();
+
+ void insertWord(const QString& s, uint index=0);
+ bool equal(QTrie* o);
+ void dump(int indent=0);
+
+private:
+ TrieList children;
+ bool isword;
+
+ friend class QDawgPrivate;
+ int maxdepth;
+ int decendants;
+ int key;
+ void distributeKeys(TrieClubDirectory& directory);
+ QTrie* clubLeader(TrieClubDirectory& directory);
+ int collectKeys();
+ friend class TriePtr;
+ friend class TrieList;
+};
+
+QTrie::QTrie()
+{
+ key = 0;
+ isword = FALSE;
+}
+
+QTrie::~QTrie()
+{
+ // NOTE: we do not delete the children - after conversion to DAWG
+ // it's too difficult. The QTrie's are deleted via the directory.
+}
+
+void QTrie::insertWord(const QString& s, uint index)
+{
+ if ( index == s.length() ) {
+ isword = TRUE;
+ } else {
+ QTrie* t = children.findAdd(s[index]);
+ t->insertWord(s,index+1);
+ }
+}
+
+bool QTrie::equal(QTrie* o)
+{
+ if ( o == this ) return TRUE;
+ if ( isword != o->isword )
+ return FALSE;
+ return children.equal(o->children);
+}
+
+void QTrie::dump(int indent)
+{
+ for (TrieList::Iterator it=children.begin(); it!=children.end(); ++it) {
+ QTrie* s = (*it).p;
+ for (int in=0; in<indent; in++)
+ fputc(' ',stderr);
+ fprintf(stderr," %c %d %s %p\n",(*it).letter.unicode(),
+ s->key,s->isword?"word":"",s);
+ s->dump(indent+2);
+ }
+}
+
+void QTrie::distributeKeys(TrieClubDirectory& directory)
+{
+ maxdepth = INT_MIN;
+ decendants = children.count();
+ key = 0;
+ for (TrieList::Iterator it=children.begin(); it!=children.end(); ++it) {
+ QTrie* s = (*it).p;
+ QChar l = (*it).letter;
+ s->distributeKeys(directory);
+ key = key*64+l.unicode()+s->key*5;
+ decendants += s->decendants;
+ if ( s->maxdepth+1 > maxdepth )
+ maxdepth = s->maxdepth+1;
+ }
+ if ( decendants ) {
+ key += decendants + maxdepth*256 + children.count() * 65536;
+ if ( !key ) key++; // unlikely
+ }
+ TrieClub* c = directory[key];
+ if ( !c ) directory.insert(key, (c = new TrieClub) );
+ c->prepend(this);
+}
+
+QTrie* QTrie::clubLeader(TrieClubDirectory& directory)
+{
+ if ( !key ) return directory[0]->first();
+ for (TrieList::Iterator it=children.begin(); it!=children.end(); ++it) {
+ QTrie* t= (*it).p->clubLeader(directory);
+ (*it).p = t;
+ }
+ TrieClub *club = directory[key];
+ for (TrieClub::Iterator it = club->begin(); it != club->end(); ++it) {
+ QTrie* o = *it;
+ if ( o->equal(this) )
+ return o;
+ }
+ return this;
+}
+
+int QTrie::collectKeys()
+{
+ int n=0;
+ if ( key ) key=0,n+=children.count();
+ for (TrieList::Iterator it=children.begin(); it!=children.end(); ++it)
+ n += (*it).p->collectKeys();
+ return n;
+}
+
+int TriePtr::operator <(const TriePtr& o) const
+ { return letter < o.letter; }
+int TriePtr::operator >(const TriePtr& o) const
+ { return letter > o.letter; }
+int TriePtr::operator <=(const TriePtr& o) const
+ { return letter <= o.letter; }
+
+bool TrieList::equal(TrieList& l)
+{
+ if ( count() != l.count() )
+ return FALSE;
+ sort(); l.sort();
+ ConstIterator it2 = begin();
+ ConstIterator it = l.begin();
+ for( ; it != l.end(); ++it, ++it2 )
+ if ( (*it).letter != (*it2).letter || ! (*it).p->equal((*it2).p) )
+ return FALSE;
+ return TRUE;
+}
+QTrie* TrieList::findAdd(QChar c)
+{
+ for (Iterator it=begin(); it!=end(); ++it) {
+ if ( (*it).letter == c )
+ return (*it).p;
+ }
+ TriePtr p;
+ p.p = new QTrie;
+ p.letter = c;
+ prepend(p);
+ sorted=FALSE;
+ sort();
+ return p.p;
+}
+
+static const char* dawg_sig = "QDAWG100";
+
+class QDawgPrivate {
+public:
+ QDawgPrivate(QIODevice* dev)
+ {
+ QDataStream ds(dev);
+ char sig[8];
+ ds.readRawBytes(sig,8);
+ if ( !strncmp(dawg_sig,sig,8) ) {
+ uint n;
+ char* nn;
+ ds.readBytes(nn,n);
+
+ // #### endianness problem ignored.
+ node = (QDawg::Node*)nn;
+ nodes = n / sizeof(QDawg::Node);
+ } else {
+ node = 0;
+ }
+ }
+
+ bool ok() const { return node; }
+
+ QDawgPrivate(uchar* mem)
+ {
+ if ( !strncmp(dawg_sig,(char*)mem,8) ) {
+ mem += 8;
+
+ int n = ((mem[0]*256+mem[1])*256+mem[2])*256+mem[3];
+ mem += 4;
+
+ // #### endianness problem ignored.
+ node = (QDawg::Node*)((char*)mem);
+ nodes = n / sizeof(QDawg::Node);
+ }
+ }
+
+ QDawgPrivate(QTrie* t) // destroys the QTrie.
+ {
+ TrieClubDirectory directory(9973);
+ t->distributeKeys(directory);
+ QTrie* l = t->clubLeader(directory);
+ ASSERT(l==t);
+ generateArray(t);
+
+ TrieClub *club;
+ for (QIntDictIterator<TrieClub> dit(directory); (club=dit); ++dit)
+ {
+ for (TrieClub::Iterator it = club->begin(); it != club->end(); ++it) {
+ delete *it;
+ }
+ delete club;
+ }
+ }
+
+ bool write(QIODevice* dev)
+ {
+ QDataStream ds(dev);
+ ds.writeRawBytes(dawg_sig,8);
+ // #### endianness problem ignored.
+ ds.writeBytes((char*)node,sizeof(QDawg::Node)*nodes);
+ return dev->state() == IO_Ok;
+ }
+
+ void dumpWords(int nid=0, int index=0)
+ {
+ static char word[256]; // ick latin1
+ int i=0;
+ do {
+ QDawg::Node& n = node[nid+i];
+ word[index] = n.let;
+ if ( n.isword )
+ fprintf(stderr,"%.*s\n",index+1,word);
+ if ( n.offset ) dumpWords(n.offset+nid+i,index+1);
+ } while (!node[nid+i++].islast);
+ }
+
+ void dump(int nid=0, int indent=0)
+ {
+ int i=0;
+ do {
+ QDawg::Node& n = node[nid+i];
+ fprintf(stderr,"%d: ",nid+i);
+ for (int in=0; in<indent; in++)
+ fputc(' ',stderr);
+ fprintf(stderr," %c %d %d %d\n",n.let,
+ n.isword,n.islast,n.offset);
+ if ( n.offset ) dump(n.offset+nid+i,indent+2);
+ } while (!node[nid+i++].islast);
+ }
+
+ int countWords(int nid=0)
+ {
+ int t=0;
+ int i=0;
+ do {
+ QDawg::Node& n = node[nid+i];
+ if ( n.isword )
+ t++;
+ if ( n.offset )
+ t+=countWords(n.offset+nid+i);
+ } while (!node[nid+i++].islast);
+ return t;
+ }
+
+ bool contains(const QString& s, int nid=0, int index=0) const
+ {
+ int i=0;
+ do {
+ QDawg::Node& n = node[nid+i];
+ if ( s[index] == QChar((ushort)n.let) ) {
+ if ( n.isword && index == (int)s.length()-1 )
+ return TRUE;
+ if ( n.offset )
+ return contains(s,n.offset+nid+i,index+1);
+ }
+ } while (!node[nid+i++].islast);
+ return FALSE;
+ }
+
+ void appendAllWords(QStringList& list, int nid=0, QString s="") const
+ {
+ int i=0;
+ int next = s.length();
+ do {
+ QDawg::Node& n = node[nid+i];
+ s[next] = QChar((ushort)n.let);
+ if ( n.isword )
+ list.append(s);
+ if ( n.offset )
+ appendAllWords(list, n.offset+nid+i, s);
+ } while (!node[nid+i++].islast);
+ }
+
+ const QDawg::Node* root() { return node; }
+
+private:
+ void generateArray(QTrie* t)
+ {
+ nodes = 0;
+ int n = t->collectKeys();
+ node = new QDawg::Node[n];
+ appendToArray(t);
+ ASSERT(n == nodes);
+ }
+
+ int appendToArray(QTrie* t)
+ {
+ if ( !t->key ) {
+ if ( !t->children.count() )
+ return 0;
+ t->key = nodes;
+ nodes += t->children.count();
+ QDawg::Node* n = &node[t->key-1];
+ int here = t->key;
+ for (TrieList::Iterator it=t->children.begin(); it!=t->children.end(); ++it) {
+ QTrie* s = (*it).p;
+ ++n;
+ n->let = (*it).letter.unicode();
+ n->isword = s->isword;
+ n->islast = 0;
+ n->offset = appendToArray(s);
+ if ( n->offset ) {
+ int t = n->offset-here;
+ n->offset=t;
+ if ( n->offset != t )
+ qWarning("Overflow: too many words");
+ }
+ here++;
+ }
+ n->islast = 1;
+ }
+ return t->key;
+ }
+
+private:
+ int nodes;
+ QDawg::Node *node;
+};
+
+
+QDawg::QDawg()
+{
+ d = 0;
+}
+
+QDawg::~QDawg()
+{
+ delete d;
+}
+
+bool QDawg::createFromWords(QIODevice* dev)
+{
+ delete d;
+
+ QTextStream i(dev);
+ QTrie* trie = new QTrie;
+ int n=0;
+ while (!i.atEnd()) {
+ trie->insertWord(QString::fromUtf8(i.readLine()));
+ n++;
+ }
+ if ( n )
+ d = new QDawgPrivate(trie);
+ else
+ d = 0;
+ return TRUE;
+}
+
+void QDawg::createFromWords(const QStringList& list)
+{
+ delete d;
+
+ if ( list.count() ) {
+ QTrie* trie = new QTrie;
+ for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ trie->insertWord(*it);
+ }
+ d = new QDawgPrivate(trie);
+ } else {
+ d = 0;
+ }
+}
+
+QStringList QDawg::allWords() const
+{
+ QStringList result;
+ if ( d ) d->appendAllWords(result);
+ return result;
+}
+
+
+bool QDawg::readFile(const QString& filename)
+{
+ delete d;
+ d = 0;
+ int f = ::open( QFile::encodeName(filename), O_RDONLY );
+ if ( f < 0 )
+ return FALSE;
+ struct stat st;
+ if ( !fstat( f, &st ) ) {
+ char * tmp = (char*)mmap( 0, st.st_size, // any address, whole file
+ PROT_READ, // read-only memory
+ MAP_FILE | MAP_PRIVATE, // swap-backed map from file
+ f, 0 ); // from offset 0 of f
+ if ( tmp && tmp != (char*)MAP_FAILED )
+ d = new QDawgPrivate((uchar*)tmp);
+ }
+ ::close( f );
+ return d;
+}
+
+bool QDawg::read(QIODevice* dev)
+{
+ delete d;
+ d = new QDawgPrivate(dev);
+ if ( d->ok() )
+ return TRUE;
+ delete d;
+ d = 0;
+ return FALSE;
+}
+
+bool QDawg::write(QIODevice* dev) const
+{
+ return d ? d->write(dev) : TRUE;
+}
+
+int QDawg::countWords() const
+{
+ return d ? d->countWords() : 0;
+}
+
+const QDawg::Node* QDawg::root() const
+{
+ return d ? d->root() : 0;
+}
+
+bool QDawg::contains(const QString& s) const
+{
+ return d ? d->contains(s) : FALSE;
+}
+
+void QDawg::dump() const
+{
+ if ( d ) d->dump();
+}
+
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef QDAWG_H
+#define QDAWG_H
+
+#include <qstringlist.h>
+
+class QIODevice;
+class QDawgPrivate;
+
+class QDawg {
+public:
+ QDawg();
+ ~QDawg();
+
+ bool readFile(const QString&); // may mmap
+ bool read(QIODevice* dev);
+ bool write(QIODevice* dev) const;
+ bool createFromWords(QIODevice* dev);
+ void createFromWords(const QStringList&);
+ QStringList allWords() const;
+
+ bool contains(const QString&) const;
+ int countWords() const;
+
+ // Unicode 0..3FFF; an offset can be used for other ranges
+ static const int nodebits=18;
+
+ class Node {
+ friend class QDawgPrivate;
+ uint let:(30-nodebits);
+ uint isword:1;
+ uint islast:1;
+ int offset:nodebits;
+ Node() { }
+ public:
+ QChar letter() const { return QChar((ushort)let); }
+ bool isWord() const { return isword; }
+ bool isLast() const { return islast; }
+ const Node* next() const { return islast ? 0 : this+1; }
+ const Node* jump() const { return offset ? this+offset : 0; }
+ };
+
+ const Node* root() const;
+
+ void dump() const; // debug
+
+private:
+ friend class QDawgPrivate;
+ QDawgPrivate* d;
+};
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+
+#include "qlibrary_p.h"
+
+// uncomment this to get error messages
+//#define QT_DEBUG_COMPONENT 1
+// uncomment this to get error and success messages
+//#define QT_DEBUG_COMPONENT 2
+
+#ifndef QT_DEBUG_COMPONENT
+# if defined(QT_DEBUG)
+# define QT_DEBUG_COMPONENT 1
+# endif
+#endif
+
+#ifndef QT_NO_COMPONENT
+
+// KAI C++ has at the moment problems with unloading the Qt plugins. So don't
+// unload them as a workaround for now.
+#if defined(Q_CC_KAI) || defined(Q_OS_MAC)
+#define QT_NO_LIBRARY_UNLOAD
+#endif
+
+#if defined(Q_WS_WIN) && !defined(QT_MAKEDLL)
+#define QT_NO_LIBRARY_UNLOAD
+#endif
+
+/* Platform independent QLibraryPrivate implementations */
+#ifndef QT_LITE_COMPONENT
+
+#include "qtimer.h"
+
+extern Q_EXPORT QApplication *qApp;
+
+QLibraryPrivate::QLibraryPrivate( QLibrary *lib )
+ : QObject( 0, lib->library().latin1() ), pHnd( 0 ), libIface( 0 ), unloadTimer( 0 ), library( lib )
+{
+}
+
+QLibraryPrivate::~QLibraryPrivate()
+{
+ if ( libIface )
+ libIface->release();
+ killTimer();
+}
+
+/*
+ Only components that implement the QLibraryInterface can
+ be unloaded automatically.
+*/
+void QLibraryPrivate::tryUnload()
+{
+ if ( library->policy() == QLibrary::Manual || !pHnd || !libIface )
+ return;
+
+ if ( !libIface->canUnload() )
+ return;
+
+#if defined(QT_DEBUG_COMPONENT) && QT_DEBUG_COMPONENT == 2
+ if ( library->unload() )
+ qDebug( "%s has been automatically unloaded", library->library().latin1() );
+#else
+ library->unload();
+#endif
+}
+
+#else // QT_LITE_COMPOINENT
+
+QLibraryPrivate::QLibraryPrivate( QLibrary *lib )
+ : pHnd( 0 ), libIface( 0 ), library( lib )
+{
+}
+
+#endif // QT_LITE_COMPOINENT
+
+void QLibraryPrivate::startTimer()
+{
+#ifndef QT_LITE_COMPONENT
+ unloadTimer = new QTimer( this );
+ connect( unloadTimer, SIGNAL( timeout() ), this, SLOT( tryUnload() ) );
+ unloadTimer->start( 5000, FALSE );
+#endif
+}
+
+void QLibraryPrivate::killTimer()
+{
+#ifndef QT_LITE_COMPONENT
+ delete unloadTimer;
+ unloadTimer = 0;
+#endif
+}
+
+/*!
+ \class QLibrary qlibrary.h
+
+ \brief The QLibrary class provides a wrapper for handling shared libraries.
+
+ This class is temporarily copied from Qt 3.0.
+*/
+
+/*!
+ \enum QLibrary::Policy
+
+ This enum type defines the various policies a QLibrary can have with respect to
+ loading and unloading the shared library.
+
+ The \e policy can be:
+
+ \value Delayed The library get's loaded as soon as needed and unloaded in the destructor
+ \value Immediately The library is loaded immediately and unloaded in the destructor
+ \value Manual Like delayed, and library has to be unloaded manually
+*/
+
+/*!
+ Creates a QLibrary object for the shared library \a filename.
+ The library get's loaded if \a pol is Immediately.
+
+ Note that \a filename does not need to include the (platform specific)
+ file extension, so calling
+
+ \code
+ QLibrary lib( "mylib" );
+ \endcode
+
+ would be equivalent to
+
+ \code
+ QLibrary lib( "mylib.dll" );
+ \endcode
+
+ on Windows. But \e "mylib.dll" will obviously not work on other platforms.
+
+ \sa setPolicy(), unload()
+*/
+QLibrary::QLibrary( const QString& filename, Policy pol )
+ : libfile( filename ), libPol( pol ), entry( 0 )
+{
+ d = new QLibraryPrivate( this );
+ if ( pol == Immediately )
+ load();
+}
+
+/*!
+ Deletes the QLibrary object.
+ The library will be unloaded if the policy is not Manual.
+
+ \sa unload(), setPolicy()
+*/
+QLibrary::~QLibrary()
+{
+ if ( libPol == Manual || !unload() ) {
+ if ( entry ) {
+ entry->release();
+ entry = 0;
+ }
+ }
+ delete d;
+}
+
+void QLibrary::createInstanceInternal()
+{
+ if ( libfile.isEmpty() )
+ return;
+
+ if ( !d->pHnd ) {
+ ASSERT( entry == 0 );
+ load();
+ }
+
+ if ( d->pHnd && !entry ) {
+#if defined(QT_DEBUG_COMPONENT) && QT_DEBUG_COMPONENT == 2
+ qWarning( "%s has been loaded.", library().latin1() );
+#endif
+ typedef QUnknownInterface* (*UCMInstanceProc)();
+ UCMInstanceProc ucmInstanceProc;
+ ucmInstanceProc = (UCMInstanceProc) resolve( "ucm_instantiate" );
+ entry = ucmInstanceProc ? ucmInstanceProc() : 0;
+ if ( entry ) {
+ entry->queryInterface( IID_QLibrary, (QUnknownInterface**)&d->libIface);
+ if ( d->libIface ) {
+ if ( !d->libIface->init() ) {
+#if defined(QT_DEBUG_COMPONENT)
+ qWarning( "%s: QLibraryInterface::init() failed.", library().latin1() );
+#endif
+ unload();
+ return;
+ }
+
+ d->killTimer();
+ if ( libPol != Manual )
+ d->startTimer();
+ }
+ } else {
+#if defined(QT_DEBUG_COMPONENT)
+ qWarning( "%s: No interface implemented.", library().latin1() );
+#endif
+ unload();
+ }
+ }
+}
+
+/*!
+ Returns the address of the exported symbol \a symb. The library gets
+ loaded if necessary. The function returns NULL if the symbol could
+ not be resolved, or if loading the library failed.
+
+ \code
+ typedef int (*addProc)( int, int );
+
+ addProc add = (addProc) library->resolve( "add" );
+ if ( add )
+ return add( 5, 8 );
+ else
+ return 5 + 8;
+ \endcode
+
+ \sa queryInterface()
+*/
+void *QLibrary::resolve( const char* symb )
+{
+ if ( !d->pHnd )
+ load();
+ if ( !d->pHnd )
+ return 0;
+
+ void *address = d->resolveSymbol( symb );
+ if ( !address ) {
+#if defined(QT_DEBUG_COMPONENT)
+ // resolveSymbol() might give a warning; so let that warning look so fatal
+ qWarning( QString("Trying to resolve symbol \"_%1\" instead").arg( symb ) );
+#endif
+ address = d->resolveSymbol( QString( "_" ) + symb );
+ }
+ return address;
+}
+
+/*!
+ \overload
+
+ Loads the library \a filename and returns the address of the exported symbol \a symb.
+ Note that like for the constructor, \a filename does not need to include the (platform specific)
+ file extension. The library staying loaded until the process exits.
+
+ The function returns a null pointer if the symbol could not be resolved or if loading
+ the library failed.
+*/
+void *QLibrary::resolve( const QString &filename, const char *symb )
+{
+ QLibrary lib( filename, Manual );
+ return lib.resolve( symb );
+}
+
+/*!
+ Returns whether the library is loaded.
+
+ \sa unload()
+*/
+bool QLibrary::isLoaded() const
+{
+ return d->pHnd != 0;
+}
+
+/*!
+ Loads the library.
+*/
+bool QLibrary::load()
+{
+ return d->loadLibrary();
+}
+
+/*!
+ Releases the component and unloads the library when successful.
+ Returns TRUE if the library could be unloaded, otherwise FALSE.
+ If the component implements the QLibraryInterface, the cleanup()
+ function of this interface will be called. The unloading will be
+ cancelled if the subsequent call to canUnload() returns FALSE.
+
+ This function gets called automatically in the destructor if
+ the policy is not Manual.
+
+ \warning
+ If \a force is set to TRUE, the library gets unloaded at any cost,
+ which is in most cases a segmentation fault, so you should know what
+ you're doing!
+
+ \sa queryInterface(), resolve()
+*/
+bool QLibrary::unload( bool force )
+{
+ if ( !d->pHnd )
+ return TRUE;
+
+ if ( entry ) {
+ if ( d->libIface ) {
+ d->libIface->cleanup();
+
+ bool can = d->libIface->canUnload();
+ can = ( d->libIface->release() <= 1 ) && can;
+ // the "entry" member must be the last reference to the component
+ if ( can || force ) {
+ d->libIface = 0;
+ } else {
+#if defined(QT_DEBUG_COMPONENT)
+ qWarning( "%s prevents unloading!", library().latin1() );
+#endif
+ d->libIface->addRef();
+ return FALSE;
+ }
+ }
+
+ if ( entry->release() ) {
+#if defined(QT_DEBUG_COMPONENT)
+ qWarning( "%s is still in use!", library().latin1() );
+#endif
+ if ( force ) {
+ delete entry;
+ } else {
+ entry->addRef();
+ return FALSE;
+ }
+ }
+ d->killTimer();
+
+ entry = 0;
+ }
+
+// ### this is a hack to solve problems with plugin unloading und KAI C++
+// (other compilers may have the same problem)
+#if !defined(QT_NO_LIBRARY_UNLOAD)
+ if ( !d->freeLibrary() ) {
+#if defined(QT_DEBUG_COMPONENT)
+ qWarning( "%s could not be unloaded.", library().latin1() );
+#endif
+ return FALSE;
+#else
+ return TRUE;
+#endif
+#if !defined(QT_NO_LIBRARY_UNLOAD)
+ }
+
+#if defined(QT_DEBUG_COMPONENT) && QT_DEBUG_COMPONENT == 2
+ qWarning( "%s has been unloaded.", library().latin1() );
+#endif
+
+ d->pHnd = 0;
+ return TRUE;
+#endif
+}
+
+/*!
+ Sets the current policy to \a pol.
+ The library is loaded if \a pol is set to Immediately.
+*/
+void QLibrary::setPolicy( Policy pol )
+{
+ libPol = pol;
+
+ if ( libPol == Immediately && !d->pHnd )
+ load();
+}
+
+/*!
+ Returns the current policy.
+
+ \sa setPolicy()
+*/
+QLibrary::Policy QLibrary::policy() const
+{
+ return libPol;
+}
+
+/*!
+ Returns the filename of the shared library this QLibrary object handles,
+ including the platform specific file extension.
+
+ \code
+ QLibrary lib( "mylib" );
+ QString str = lib.library();
+ \endcode
+
+ will set \e str to "mylib.dll" on Windows, and "libmylib.so" on Linux.
+*/
+QString QLibrary::library() const
+{
+ if ( libfile.isEmpty() )
+ return libfile;
+
+ QString filename = libfile;
+#if defined(Q_WS_WIN)
+ if ( filename.find( ".dll" ) == -1 )
+ filename += ".dll";
+#elif defined(Q_OS_MACX)
+ if ( filename.find( ".dylib" ) == -1 )
+ filename += ".dylib";
+#else
+ if ( filename.find( ".so" ) == -1 )
+ filename = QString( "lib%1.so" ).arg( filename );
+#endif
+
+ return filename;
+}
+
+/*!
+ Forwards the query to the component and returns the result. \a request and \a iface
+ are propagated to the component's queryInterface implementation.
+
+ The library gets loaded if necessary.
+*/
+QRESULT QLibrary::queryInterface( const QUuid& request, QUnknownInterface** iface )
+{
+ if ( !entry ) {
+ createInstanceInternal();
+ }
+
+ return entry ? entry->queryInterface( request, iface ) : QE_NOINTERFACE;
+}
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QLIBRARY_H
+#define QLIBRARY_H
+
+#include <qstring.h>
+
+#ifndef QT_NO_COMPONENT
+
+#include <qpe/qcom.h>
+
+class QLibraryPrivate;
+
+class Q_EXPORT QLibrary
+{
+public:
+ enum Policy
+ {
+ Delayed,
+ Immediately,
+ Manual
+ };
+
+ QLibrary( const QString& filename, Policy = Delayed );
+ ~QLibrary();
+
+ void *resolve( const char* );
+ static void *resolve( const QString &filename, const char * );
+
+ bool unload( bool force = FALSE );
+ bool isLoaded() const;
+
+ void setPolicy( Policy pol );
+ Policy policy() const;
+
+ QString library() const;
+
+ QRESULT queryInterface( const QUuid&, QUnknownInterface** );
+
+private:
+ bool load();
+ void createInstanceInternal();
+
+ QLibraryPrivate *d;
+
+ QString libfile;
+ Policy libPol;
+ QUnknownInterface *entry;
+
+private: // Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+ QLibrary( const QLibrary & );
+ QLibrary &operator=( const QLibrary & );
+#endif
+};
+
+#endif // QT_NO_COMPONENT
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QLIBRARY_P_H
+#define QLIBRARY_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of the QLibrary class. This header file may change from
+// version to version without notice, or even be removed.
+//
+// We mean it.
+//
+//
+
+#include "qlibrary.h"
+
+//#ifndef QT_NO_COMPONENT
+
+//#ifndef QT_H
+#include "qwindowdefs.h"
+//#ifndef QT_LITE_COMPONENT
+#include "qobject.h"
+//#endif
+//#endif // QT_H
+
+class QTimer;
+class QLibrary;
+class QLibraryInterface;
+
+/*
+ Private helper class that saves the platform dependent handle
+ and does the unload magic using a QTimer.
+*/
+//#ifndef QT_LITE_COMPONENT
+class QLibraryPrivate : public QObject
+{
+ Q_OBJECT
+public:
+ QLibraryPrivate( QLibrary *lib );
+ ~QLibraryPrivate();
+
+ void startTimer();
+ void killTimer();
+
+#ifdef Q_WS_WIN
+ HINSTANCE pHnd;
+#else
+ void *pHnd;
+#endif
+
+ QLibraryInterface *libIface;
+
+ bool loadLibrary();
+ bool freeLibrary();
+ void *resolveSymbol( const char * );
+
+private slots:
+ void tryUnload();
+
+private:
+ QTimer *unloadTimer;
+ QLibrary *library;
+};
+
+#else // QT_LITE_COMPONENT
+class QLibraryPrivate
+{
+public:
+ QLibraryPrivate( QLibrary *lib );
+
+ void startTimer();
+ void killTimer();
+
+#ifdef Q_WS_WIN
+ HINSTANCE pHnd;
+#else
+ void *pHnd;
+#endif
+ QLibraryInterface *libIface;
+
+ bool loadLibrary();
+ bool freeLibrary();
+ void *resolveSymbol( const char * );
+
+private:
+ QLibrary *library;
+};
+//#endif // QT_LITE_COMPONENT
+
+//#endif // QT_NO_COMPONENT
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "qlibrary_p.h"
+
+#ifndef QT_NO_COMPONENT
+
+/*
+ The platform dependent implementations of
+ - loadLibrary
+ - freeLibrary
+ - resolveSymbol
+
+ It's not too hard to guess what the functions do.
+*/
+#if defined(Q_OS_HPUX)
+// for HP-UX < 11.x and 32 bit
+#include <dl.h>
+
+bool QLibraryPrivate::loadLibrary()
+{
+ if ( pHnd )
+ return TRUE;
+
+ QString filename = library->library();
+
+ pHnd = (void*)shl_load( filename.latin1(), BIND_DEFERRED | BIND_NONFATAL | DYNAMIC_PATH, 0 );
+#if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT)
+ if ( !pHnd )
+ qDebug( "Failed to load library %s!", filename.latin1() );
+#endif
+ return pHnd != 0;
+}
+
+bool QLibraryPrivate::freeLibrary()
+{
+ if ( !pHnd )
+ return TRUE;
+
+ if ( !shl_unload( (shl_t)pHnd ) ) {
+ pHnd = 0;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+void* QLibraryPrivate::resolveSymbol( const char* symbol )
+{
+ if ( !pHnd )
+ return 0;
+
+ void* address = 0;
+ if ( shl_findsym( (shl_t*)&pHnd, symbol, TYPE_UNDEFINED, address ) < 0 ) {
+#if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT)
+ qDebug( "Couldn't resolve symbol \"%s\"", symbol );
+#endif
+ return 0;
+ }
+ return address;
+}
+
+#else // Q_OS_HPUX
+// Something else, assuming POSIX
+#include <dlfcn.h>
+
+bool QLibraryPrivate::loadLibrary()
+{
+ if ( pHnd )
+ return TRUE;
+
+ QString filename = library->library();
+
+ pHnd = dlopen( filename.latin1() , RTLD_LAZY );
+#if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT)
+ if ( !pHnd )
+ qWarning( "%s", dlerror() );
+#endif
+ return pHnd != 0;
+}
+
+bool QLibraryPrivate::freeLibrary()
+{
+ if ( !pHnd )
+ return TRUE;
+
+ int ec = dlclose( pHnd );
+ if ( !ec )
+ pHnd = 0;
+#if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT)
+ else {
+ const char* error = dlerror();
+ if ( error )
+ qWarning( "%s", error );
+ }
+#endif
+ return pHnd == 0;
+}
+
+void* QLibraryPrivate::resolveSymbol( const char* f )
+{
+ if ( !pHnd )
+ return 0;
+
+ void* address = dlsym( pHnd, f );
+#if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT)
+ const char* error = dlerror();
+ if ( error )
+ qWarning( "%s", error );
+#endif
+ return address;
+}
+
+#endif // POSIX
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include <math.h>
+#include <float.h>
+#include "qmath.h"
+
+#ifdef QT_QWS_CASSIOPEIA
+
+double qFabs( double a )
+{
+ if ( a < 0.0 )
+ return -a;
+ return a;
+}
+
+double qSqrt( double value )
+{
+ const double tol = 0.000005; // relative error tolerance
+ double old_app, new_app;
+ if (value == 0.0)
+ return 0.0;
+ old_app = value; // take value as first approximation
+ new_app = (old_app + value/old_app)/2;
+ while (qFabs((new_app-old_app)/new_app) > tol)
+ {
+ old_app = new_app;
+ new_app = (old_app + value/old_app)/2;
+ }
+
+ return new_app;
+}
+
+const double Q_PI = 3.14159265358979323846; // pi
+const double Q_2PI = 6.28318530717958647693; // 2*pi
+const double Q_PI2 = 1.57079632679489661923; // pi/2
+
+static double qsincos( double a, int calcCos )
+{
+ int sign;
+ double a2;
+ double a3;
+ double a5;
+ double a7;
+ double a9;
+ double a11;
+
+ if ( calcCos ) // calculate cosine
+ a -= Q_PI2;
+ if ( a >= Q_2PI || a <= -Q_2PI ) { // fix range: -2*pi < a < 2*pi
+ int m = (int)(a/Q_2PI);
+ a -= Q_2PI*m;
+ }
+ if ( a < 0.0 ) // 0 <= a < 2*pi
+ a += Q_2PI;
+ sign = a > Q_PI ? -1 : 1;
+ if ( a >= Q_PI )
+ a = Q_2PI - a;
+ if ( a >= Q_PI2 )
+ a = Q_PI - a;
+ if ( calcCos )
+ sign = -sign;
+ a2 = a*a; // here: 0 <= a < pi/4
+ a3 = a2*a; // make taylor sin sum
+ a5 = a3*a2;
+ a7 = a5*a2;
+ a9 = a7*a2;
+ a11 = a9*a2;
+ return (a-a3/6+a5/120-a7/5040+a9/362880-a11/39916800)*sign;
+}
+
+double qSin( double a ) { return qsincos(a,0); }
+double qCos( double a ) { return qsincos(a,1); }
+
+//atan2 returns values from -PI to PI, so we have to do the same
+double qATan2( double y, double x )
+{
+ double r;
+ if ( x != 0.0 ) {
+ double a = qFabs(y/x);
+ if ( a <= 1 )
+ r = a/(1+ 0.28*a*a);
+ else
+ r = Q_PI2 - a/(a*a + 0.28);
+ } else {
+ r = Q_PI2;
+ }
+
+ if ( y >= 0.0 ) {
+ if ( x >= 0.0 )
+ return r;
+ else
+ return Q_PI - r;
+ } else {
+ if ( x >= 0.0 )
+ return 0.0 - r;
+ else
+ return -Q_PI + r;
+ }
+}
+
+double qATan( double a )
+{
+ return qATan2( a, 1.0 );
+}
+
+double qASin( double a )
+{
+ return qATan2( a, qSqrt(1-a*a) );
+}
+
+double qTan( double a )
+{
+ double ca = qCos(a);
+ if ( ca != 0.0 )
+ return qSin( a ) / ca;
+
+ return MAXDOUBLE;
+}
+
+double qFloor( double a )
+{
+ long i = (long) a;
+ return (double) i;
+}
+
+#else
+
+double qSqrt( double value ) { return sqrt( value ); }
+double qSin( double a ) { return sin(a); }
+double qCos( double a ) { return cos(a); }
+double qATan2( double y, double x ) { return atan2(y,x); }
+double qATan( double a ) { return atan(a); }
+double qASin( double a ) { return asin(a); }
+double qTan( double a ) { return tan(a); }
+double qFloor( double a ) { return floor(a); }
+double qFabs( double a ) { return fabs(a); }
+
+#endif
+
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef QMATH_H
+#define QMATH_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+double qSqrt( double value );
+double qSin( double a );
+double qCos( double a );
+double qATan2( double y, double x );
+double qATan( double a );
+double qASin( double a );
+double qTan( double a );
+double qFloor( double a );
+double qFabs( double a );
+
+#ifdef __cplusplus
+}
+#endif
+
+#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 @@
+Files: 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
+Priority: required
+Section: qpe/system
+Maintainer: Warwick Allison <warwick@trolltech.com>
+Architecture: arm
+Version: $QPE_VERSION-4
+Depends: qt-embedded (>=$QTE_VERSION), qpe-qcop, qpe-taskbar, qpe-pics, qpe-sounds, atd, apmd
+Description: Base Qtopia environment
+ A complete GUI environment for handhelds.
+ 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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+** $Id$
+**
+**********************************************************************/
+#include <stdlib.h>
+#include <unistd.h>
+#include <qfile.h>
+#ifdef Q_WS_QWS
+#ifndef QT_NO_COP
+#if QT_VERSION <= 231
+#define private public
+#define sendLocally processEvent
+#include "qcopenvelope_qws.h"
+#undef private
+#else
+#include "qcopenvelope_qws.h"
+#endif
+#endif
+#include <qwindowsystem_qws.h>
+#endif
+#include <qtextstream.h>
+#include <qpalette.h>
+#include <qbuffer.h>
+#include <qptrdict.h>
+#include <qregexp.h>
+#include <qdir.h>
+#include <qlabel.h>
+#include <qdialog.h>
+#include <qdragobject.h>
+#include <qevent.h>
+#include <qtooltip.h>
+#include <qsignal.h>
+#include "qpeapplication.h"
+#include "qpestyle.h"
+#if QT_VERSION >= 300
+#include <qstylefactory.h>
+#else
+#include <qplatinumstyle.h>
+#include <qwindowsstyle.h>
+#include <qmotifstyle.h>
+#include <qmotifplusstyle.h>
+#include "lightstyle.h"
+#endif
+#include "global.h"
+#include "resource.h"
+#if QT_VERSION <= 230 && defined(QT_NO_CODECS)
+#include "qutfcodec.h"
+#endif
+#include "config.h"
+#include "network.h"
+#include "fontmanager.h"
+#include "power.h"
+#include "alarmserver.h"
+#include "applnk.h"
+#include "qpemenubar.h"
+
+#include <unistd.h>
+#include <sys/file.h>
+#include <sys/ioctl.h>
+#include <sys/soundcard.h>
+
+// for setBacklight()
+#if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX)
+#include <linux/fb.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#endif
+#include <stdlib.h>
+
+
+class QPEApplicationData {
+public:
+ QPEApplicationData() : presstimer(0), presswidget(0), rightpressed(FALSE),
+ kbgrabber(0), kbregrab(FALSE), notbusysent(FALSE), preloaded(FALSE),
+ forceshow(FALSE), nomaximize(FALSE), qpe_main_widget(0),
+ keep_running(TRUE)
+ {
+ qcopq.setAutoDelete(TRUE);
+ }
+
+ int presstimer;
+ QWidget* presswidget;
+ QPoint presspos;
+ bool rightpressed;
+ int kbgrabber;
+ bool kbregrab;
+ bool notbusysent;
+ QString appName;
+ struct QCopRec {
+ QCopRec(const QCString &ch, const QCString &msg,
+ const QByteArray &d) :
+ channel(ch), message(msg), data(d) { }
+
+ QCString channel;
+ QCString message;
+ QByteArray data;
+ };
+ bool preloaded;
+ bool forceshow;
+ bool nomaximize;
+ QWidget* qpe_main_widget;
+ bool keep_running;
+ QList<QCopRec> qcopq;
+
+ void enqueueQCop(const QCString &ch, const QCString &msg,
+ const QByteArray &data)
+ {
+ qcopq.append(new QCopRec(ch,msg,data));
+ }
+ void sendQCopQ()
+ {
+ QCopRec* r;
+ for (QListIterator<QCopRec> it(qcopq); (r=it.current()); ++it)
+ QCopChannel::sendLocally(r->channel,r->message,r->data);
+ qcopq.clear();
+ }
+};
+
+class ResourceMimeFactory : public QMimeSourceFactory {
+public:
+ ResourceMimeFactory()
+ {
+ QStringList path;
+ QString lang = getenv("LANG");
+ if ( !lang.isEmpty() )
+ path += QPEApplication::qpeDir() + "/help/" + lang + "/html";
+ path += QPEApplication::qpeDir() + "/pics";
+ path += QPEApplication::qpeDir() + "/help/en/html";
+ path += QPEApplication::qpeDir() + "/docs";
+ QString dir = QDir::current().canonicalPath();
+ if ( dir == "/" )
+ dir += "/docs";
+ else {
+ path += dir + "/../pics";
+ dir += "/../docs";
+ path += dir;
+ }
+ setFilePath( path );
+ setExtensionType("html","text/html;charset=UTF-8");
+ }
+
+ const QMimeSource* data(const QString& abs_name) const
+ {
+ const QMimeSource* r = QMimeSourceFactory::data(abs_name);
+ if ( !r ) {
+ int sl = abs_name.length();
+ do {
+ sl = abs_name.findRev('/',sl-1);
+ QString name = sl>=0 ? abs_name.mid(sl+1) : abs_name;
+ int dot = name.findRev('.');
+ if ( dot >= 0 )
+ name = name.left(dot);
+ QImage img = Resource::loadImage(name);
+ if ( !img.isNull() )
+ r = new QImageDrag(img);
+ } while (!r && sl>0);
+ }
+ return r;
+ }
+};
+
+static int muted=0;
+
+static void setVolume(int t=0, int percent=-1)
+{
+ switch (t) {
+ case 0: {
+ Config cfg("Sound");
+ cfg.setGroup("System");
+ if ( percent < 0 )
+ percent = cfg.readNumEntry("Volume",50);
+ int fd = 0;
+ if ((fd = open("/dev/mixer", O_RDWR))>=0) {
+ int vol = muted ? 0 : percent;
+ // set both channels to same volume
+ vol |= vol << 8;
+ ioctl(fd, MIXER_WRITE(0), &vol);
+ ::close(fd);
+ }
+ } break;
+ }
+}
+
+int qpe_sysBrightnessSteps()
+{
+#if defined(QT_QWS_IPAQ)
+ return 255;
+#elif defined(QT_QWS_EBX)
+ return 4;
+#else
+ return 255; // ?
+#endif
+}
+
+
+static int& hack(int& i)
+{
+#if QT_VERSION <= 230 && defined(QT_NO_CODECS)
+ // These should be created, but aren't in Qt 2.3.0
+ (void)new QUtf8Codec;
+ (void)new QUtf16Codec;
+#endif
+ return i;
+}
+
+static bool forced_off = FALSE;
+static int curbl=-1;
+
+static int backlight()
+{
+ if ( curbl == -1 ) {
+ // Read from config
+ Config config( "qpe" );
+ config.setGroup( "Screensaver" );
+ curbl = config.readNumEntry("Brightness",255);
+ }
+ return curbl;
+}
+
+static void setBacklight(int bright)
+{
+ if ( bright == -3 ) {
+ // Forced on
+ forced_off = FALSE;
+ bright = -1;
+ }
+ if ( forced_off && bright != -2 )
+ return;
+ if ( bright == -2 ) {
+ // Toggle between off and on
+ bright = curbl ? 0 : -1;
+ forced_off = !bright;
+ }
+ if ( bright == -1 ) {
+ // Read from config
+ Config config( "qpe" );
+ config.setGroup( "Screensaver" );
+ bright = config.readNumEntry("Brightness",255);
+ }
+#if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX)
+ if ( QFile::exists("/usr/bin/bl") ) {
+ QString cmd = "/usr/bin/bl 1 ";
+ cmd += bright<=0 ? "0 " : "1 ";
+ cmd += QString::number(bright);
+ system(cmd.latin1());
+#if defined(QT_QWS_EBX)
+ } else if ( QFile::exists("/dev/fl") ) {
+#define FL_IOCTL_STEP_CONTRAST 100
+ int fd = open("/dev/fl", O_WRONLY);
+ if (fd >= 0 ) {
+ int steps = qpe_sysBrightnessSteps();
+ int bl = ( bright * steps + 127 ) / 255;
+ if ( bright && !bl ) bl = 1;
+ bl = ioctl(fd, FL_IOCTL_STEP_CONTRAST, bl);
+ close(fd);
+ }
+ }
+#elif defined(QT_QWS_IPAQ)
+ } else if ( QFile::exists("/dev/ts") || QFile::exists("/dev/h3600_ts") ) {
+ typedef struct {
+ unsigned char mode;
+ unsigned char pwr;
+ unsigned char brightness;
+ } FLITE_IN;
+# ifndef FLITE_ON
+# ifndef _LINUX_IOCTL_H
+# include <linux/ioctl.h>
+# endif
+# define FLITE_ON _IOW('f', 7, FLITE_IN)
+# endif
+ int fd;
+ if ( QFile::exists("/dev/ts") )
+ fd = open("/dev/ts", O_WRONLY);
+ else
+ fd = open("/dev/h3600_ts", O_WRONLY);
+ if (fd >= 0 ) {
+ FLITE_IN bl;
+ bl.mode = 1;
+ bl.pwr = bright ? 1 : 0;
+ bl.brightness = bright;
+ ioctl(fd, FLITE_ON, &bl);
+ close(fd);
+ }
+ }
+#endif
+#endif
+ curbl = bright;
+}
+
+void qpe_setBacklight(int bright) { setBacklight(bright); }
+
+static bool dim_on = FALSE;
+static bool lightoff_on = FALSE;
+static int disable_suspend = 100;
+
+static bool powerOnline()
+{
+ return PowerStatusManager::readStatus().acStatus() == PowerStatus::Online;
+}
+
+static bool networkOnline()
+{
+ return Network::networkOnline();
+}
+
+class QPEScreenSaver : public QWSScreenSaver
+{
+
+public:
+ QPEScreenSaver()
+ {
+ }
+ void restore()
+ {
+ setBacklight(-1);
+ }
+ bool save(int level)
+ {
+ switch ( level ) {
+ case 0:
+ if ( disable_suspend > 0 && dim_on ) {
+ if (backlight() > 1)
+ setBacklight(1); // lowest non-off
+ }
+ return TRUE;
+ break;
+ case 1:
+ if ( disable_suspend > 1 && lightoff_on ) {
+ setBacklight(0); // off
+ }
+ return TRUE;
+ break;
+ case 2:
+ if ( disable_suspend > 2 && !powerOnline() && !networkOnline() ) {
+ QWSServer::sendKeyEvent( 0xffff, Qt::Key_F34, FALSE, TRUE, FALSE );
+ return TRUE;
+ }
+ break;
+ }
+ return FALSE;
+ }
+};
+
+static int ssi(int interval, Config &config, const QString &enable, const QString& value, int def)
+{
+ if ( !enable.isEmpty() && config.readNumEntry(enable,0) == 0 )
+ return 0;
+
+ if ( interval < 0 ) {
+ // Restore screen blanking and power saving state
+ interval = config.readNumEntry( value, def );
+ }
+ return interval;
+}
+
+static void setScreenSaverIntervals(int i1, int i2, int i3)
+{
+ Config config( "qpe" );
+ config.setGroup( "Screensaver" );
+
+ int v[4];
+ i1 = ssi(i1, config, "Dim","Interval_Dim", 30);
+ i2 = ssi(i2, config, "LightOff","Interval_LightOff", 20);
+ i3 = ssi(i3, config, "","Interval", 60);
+
+ //qDebug("screen saver intervals: %d %d %d", i1, i2, i3);
+
+ v[0] = QMAX( 1000*i1, 100);
+ v[1] = QMAX( 1000*i2, 100);
+ v[2] = QMAX( 1000*i3, 100);
+ v[3] = 0;
+ dim_on = ( (i1 != 0) ? config.readNumEntry("Dim",1) : FALSE );
+ lightoff_on = ( (i2 != 0 ) ? config.readNumEntry("LightOff",1) : FALSE );
+ if ( !i1 && !i2 && !i3 )
+ QWSServer::setScreenSaverInterval(0);
+ else
+ QWSServer::setScreenSaverIntervals(v);
+}
+
+static void setScreenSaverInterval(int interval)
+{
+ setScreenSaverIntervals(-1,-1,interval);
+}
+
+
+/*!
+ \class QPEApplication qpeapplication.h
+ \brief The QPEApplication class implements various system services
+ that are available to all Qtopia applications.
+
+ Simply by using QPEApplication instead of QApplication, a plain Qt
+ application becomes a Qtopia application. It automatically follows
+ style changes, quits and raises, and in the
+ case of \link docwidget.html document-oriented\endlink applications,
+ changes the current displayed document in response to the environment.
+*/
+
+/*!
+ \fn void QPEApplication::clientMoused()
+
+ \internal
+*/
+
+/*!
+ \fn void QPEApplication::timeChanged();
+
+ This signal is emitted when the time jumps forward or backwards
+ by more than the normal passage of time.
+*/
+
+/*!
+ \fn void QPEApplication::clockChanged( bool ampm );
+
+ This signal is emitted when the user changes the style
+ of clock. If \a ampm is TRUE, the user wants a 12-hour
+ AM/PM close, otherwise, they want a 24-hour clock.
+*/
+
+/*!
+ \fn void QPEApplication::appMessage( const QCString& msg, const QByteArray& data )
+
+ This signal is emitted when a message is received on the
+ QPE/Application/<i>appname</i> QCop channel for this application.
+
+ The slot to which you connect this signal uses \a msg and \a data
+ in the following way:
+
+\code
+ void MyWidget::receive( const QCString& msg, const QByteArray& data )
+ {
+ QDataStream stream( data, IO_ReadOnly );
+ if ( msg == "someMessage(int,int,int)" ) {
+ int a,b,c;
+ stream >> a >> b >> c;
+ ...
+ } else if ( msg == "otherMessage(QString)" ) {
+ ...
+ }
+ }
+\endcode
+
+ \sa qcop.html
+*/
+
+/*!
+ Constructs a QPEApplication just as you would construct
+ a QApplication, passing \a argc, \a argv, and \a t.
+*/
+QPEApplication::QPEApplication( int& argc, char **argv, Type t )
+ : QApplication( hack(argc), argv, t )
+{
+ int dw = desktop()->width();
+ if ( dw < 200 ) {
+ setFont( QFont( "helvetica", 8 ) );
+ AppLnk::setSmallIconSize(10);
+ AppLnk::setBigIconSize(28);
+ }
+
+ d = new QPEApplicationData;
+ QMimeSourceFactory::setDefaultFactory(new ResourceMimeFactory);
+
+ connect(this, SIGNAL(lastWindowClosed()), this, SLOT(hideOrQuit()));
+#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
+
+ QString qcopfn("/tmp/qcop-msg-");
+ qcopfn += QString(argv[0]); // append command name
+
+ QFile f(qcopfn);
+ if ( f.open(IO_ReadOnly) ) {
+ flock(f.handle(), LOCK_EX);
+ }
+
+ sysChannel = new QCopChannel( "QPE/System", this );
+ connect( sysChannel, SIGNAL(received(const QCString &, const QByteArray &)),
+ this, SLOT(systemMessage( const QCString &, const QByteArray &)) );
+
+ QCString channel = QCString(argv[0]);
+ channel.replace(QRegExp(".*/"),"");
+ d->appName = channel;
+ channel = "QPE/Application/" + channel;
+ pidChannel = new QCopChannel( channel, this);
+ connect( pidChannel, SIGNAL(received(const QCString &, const QByteArray &)),
+ this, SLOT(pidMessage(const QCString &, const QByteArray &)));
+
+ if ( f.isOpen() ) {
+ d->keep_running = FALSE;
+ QDataStream ds(&f);
+ QCString channel, message;
+ QByteArray data;
+ while(!ds.atEnd()) {
+ ds >> channel >> message >> data;
+ d->enqueueQCop(channel,message,data);
+ }
+
+ flock(f.handle(), LOCK_UN);
+ f.close();
+ f.remove();
+ }
+
+ for (int a=0; a<argc; a++) {
+ if ( qstrcmp(argv[a],"-preload")==0 ) {
+ argv[a] = argv[a+1];
+ a++;
+ d->preloaded = TRUE;
+ argc-=1;
+ } else if ( qstrcmp(argv[a],"-preload-show")==0 ) {
+ argv[a] = argv[a+1];
+ a++;
+ d->preloaded = TRUE;
+ d->forceshow = TRUE;
+ argc-=1;
+ }
+ }
+
+ /* overide stored arguments */
+ setArgs(argc, argv);
+
+#endif
+
+ qwsSetDecoration( new QPEDecoration() );
+
+#ifndef QT_NO_TRANSLATION
+ char *l = getenv( "LANG" );
+ QString lang;
+ if ( l ) {
+ lang = l;
+
+ /*
+ Config config("qpe");
+ config.setGroup( "Appearance" );
+ lang = config.readEntry( "Language", lang );
+ */
+
+ QTranslator * trans = new QTranslator(this);
+ QString tfn = qpeDir()+"/i18n/"+lang+"/"+d->appName+".qm";
+ if ( trans->load( tfn ))
+ installTranslator( trans );
+ else
+ delete trans;
+
+ trans = new QTranslator(this);
+ tfn = qpeDir()+"/i18n/"+lang+"/libqpe.qm";
+ if ( trans->load( tfn ))
+ installTranslator( trans );
+ else
+ delete trans;
+
+ //###language/font hack; should look it up somewhere
+ if ( lang == "ja" || lang == "zh_CN" || lang == "zh_TW" || lang == "ko" ) {
+ QFont fn = FontManager::unicodeFont( FontManager::Proportional );
+ setFont( fn );
+ }
+ }
+#endif
+
+ applyStyle();
+
+ if ( type() == GuiServer ) {
+ setScreenSaverInterval(-1);
+ setVolume();
+ QWSServer::setScreenSaver(new QPEScreenSaver);
+ }
+
+ installEventFilter( this );
+
+ QPEMenuToolFocusManager::initialize();
+
+#ifdef QT_NO_QWS_CURSOR
+ // if we have no cursor, probably don't want tooltips
+ QToolTip::setEnabled( FALSE );
+#endif
+}
+
+static QPtrDict<void>* inputMethodDict=0;
+static void createInputMethodDict()
+{
+ if ( !inputMethodDict )
+ inputMethodDict = new QPtrDict<void>;
+}
+
+/*!
+ Returns the currently set hint to the system as to whether
+ \a w has any use for text input methods.
+
+ \sa setInputMethodHint()
+*/
+QPEApplication::InputMethodHint QPEApplication::inputMethodHint( QWidget* w )
+{
+ if ( inputMethodDict && w )
+ return (InputMethodHint)(int)inputMethodDict->find(w);
+ return Normal;
+}
+
+/*!
+ \enum QPEApplication::InputMethodHint
+
+ \value Normal the application sometimes needs text input (the default).
+ \value AlwaysOff the application never needs text input.
+ \value AlwaysOn the application always needs text input.
+*/
+
+/*!
+ Hints to the system that \a w has use for text input methods
+ as specified by \a mode.
+
+ \sa inputMethodHint()
+*/
+void QPEApplication::setInputMethodHint( QWidget* w, InputMethodHint mode )
+{
+ createInputMethodDict();
+ if ( mode == Normal ) {
+ inputMethodDict->remove(w);
+ } else {
+ inputMethodDict->insert(w,(void*)mode);
+ }
+}
+
+class HackDialog : public QDialog
+{
+public:
+ void acceptIt() { accept(); }
+ void rejectIt() { reject(); }
+};
+
+
+void QPEApplication::mapToDefaultAction( QWSKeyEvent *ke, int key )
+{
+ // specialised actions for certain widgets. May want to
+ // add more stuff here.
+ if ( activePopupWidget() && activePopupWidget()->inherits( "QListBox" )
+ && activePopupWidget()->parentWidget()
+ && activePopupWidget()->parentWidget()->inherits( "QComboBox" ) )
+ key = Qt::Key_Return;
+
+ if ( activePopupWidget() && activePopupWidget()->inherits( "QPopupMenu" ) )
+ key = Qt::Key_Return;
+
+ ke->simpleData.keycode = key;
+}
+
+class HackWidget : public QWidget
+{
+public:
+ bool needsOk()
+ { return (getWState() & WState_Reserved1 ); }
+};
+
+/*!
+ \internal
+*/
+bool QPEApplication::qwsEventFilter( QWSEvent *e )
+{
+ if ( !d->notbusysent && e->type == QWSEvent::Focus ) {
+ if ( qApp->type() != QApplication::GuiServer ) {
+ QCopEnvelope e("QPE/System", "notBusy(QString)" );
+ e << d->appName;
+ }
+ d->notbusysent=TRUE;
+ }
+ if ( type() == GuiServer ) {
+ switch ( e->type ) {
+ case QWSEvent::Mouse:
+ if ( e->asMouse()->simpleData.state && !QWidget::find(e->window()) )
+ emit clientMoused();
+ }
+ }
+ if ( e->type == QWSEvent::Key ) {
+ if ( d->kbgrabber == 1 )
+ return TRUE;
+ QWSKeyEvent *ke = (QWSKeyEvent *)e;
+ if ( ke->simpleData.keycode == Qt::Key_F33 ) {
+ // Use special "OK" key to press "OK" on top level widgets
+ QWidget *active = activeWindow();
+ QWidget *popup = 0;
+ if ( active && active->isPopup() ) {
+ popup = active;
+ active = active->parentWidget();
+ }
+ if ( active && (int)active->winId() == ke->simpleData.window &&
+ !active->testWFlags( WStyle_Customize|WType_Popup|WType_Desktop )) {
+ if ( ke->simpleData.is_press ) {
+ if ( popup )
+ popup->close();
+ if ( active->inherits( "QDialog" ) ) {
+ HackDialog *d = (HackDialog *)active;
+ d->acceptIt();
+ return TRUE;
+ } else if ( ((HackWidget *)active)->needsOk() ) {
+ QSignal s;
+ s.connect( active, SLOT( accept() ) );
+ s.activate();
+ } else {
+ // do the same as with the select key: Map to the default action of the widget:
+ mapToDefaultAction( ke, Qt::Key_Return );
+ }
+ }
+ }
+ } else if ( ke->simpleData.keycode == Qt::Key_F30 ) {
+ // Use special "select" key to do whatever default action a widget has
+ mapToDefaultAction( ke, Qt::Key_Space );
+ } else if ( ke->simpleData.keycode == Qt::Key_Escape &&
+ ke->simpleData.is_press ) {
+ // Escape key closes app if focus on toplevel
+ QWidget *active = activeWindow();
+ if ( active && active->testWFlags( WType_TopLevel ) &&
+ (int)active->winId() == ke->simpleData.window &&
+ !active->testWFlags( WStyle_Dialog|WStyle_Customize|WType_Popup|WType_Desktop )) {
+ if ( active->inherits( "QDialog" ) ) {
+ HackDialog *d = (HackDialog *)active;
+ d->rejectIt();
+ return TRUE;
+ } else if ( strcmp( argv()[0], "embeddedkonsole") != 0 ) {
+ active->close();
+ }
+ }
+ }
+
+#if QT_VERSION < 231
+ // Filter out the F4/Launcher key from apps
+ // ### The launcher key may not always be F4 on all devices
+ if ( ((QWSKeyEvent *)e)->simpleData.keycode == Qt::Key_F4 )
+ return TRUE;
+#endif
+ }
+ if ( e->type == QWSEvent::Focus ) {
+ QWSFocusEvent *fe = (QWSFocusEvent*)e;
+ QWidget* nfw = QWidget::find(e->window());
+ if ( !fe->simpleData.get_focus ) {
+ QWidget *active = activeWindow();
+ while ( active && active->isPopup() ) {
+ active->close();
+ active = activeWindow();
+ }
+ if ( !nfw && d->kbgrabber == 2 ) {
+ ungrabKeyboard();
+ d->kbregrab = TRUE; // want kb back when we're active
+ }
+ } else {
+ // make sure our modal widget is ALWAYS on top
+ QWidget *topm = activeModalWidget();
+ if ( topm ) {
+ topm->raise();
+ }
+ if ( d->kbregrab ) {
+ grabKeyboard();
+ d->kbregrab = FALSE;
+ }
+ }
+ if ( fe->simpleData.get_focus && inputMethodDict ) {
+ InputMethodHint m = inputMethodHint( QWidget::find(e->window()) );
+ if ( m == AlwaysOff )
+ Global::hideInputMethod();
+ if ( m == AlwaysOn )
+ Global::showInputMethod();
+ }
+ }
+ return QApplication::qwsEventFilter( e );
+}
+
+/*!
+ Destroys the QPEApplication.
+*/
+QPEApplication::~QPEApplication()
+{
+ ungrabKeyboard();
+#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
+ // Need to delete QCopChannels early, since the display will
+ // be gone by the time we get to ~QObject().
+ delete sysChannel;
+ delete pidChannel;
+#endif
+ delete d;
+}
+
+/*!
+ Returns <tt>$QPEDIR/</tt>.
+*/
+QString QPEApplication::qpeDir()
+{
+ const char *base = getenv( "QPEDIR" );
+ if ( base )
+ return QString( base ) + "/";
+
+ return QString( "../" );
+}
+
+/*!
+ Returns the user's current Document directory. There is a trailing "/".
+*/
+QString QPEApplication::documentDir()
+{
+ const char *base = getenv( "HOME" );
+ if ( base )
+ return QString( base ) + "/Documents/";
+
+ return QString( "../Documents/" );
+}
+
+static int deforient=-1;
+
+/*!
+ \internal
+*/
+int QPEApplication::defaultRotation()
+{
+ if ( deforient < 0 ) {
+ QString d = getenv("QWS_DISPLAY");
+ if ( d.contains("Rot90") ) {
+ deforient = 90;
+ } else if ( d.contains("Rot180") ) {
+ deforient = 180;
+ } else if ( d.contains("Rot270") ) {
+ deforient = 270;
+ } else {
+ deforient=0;
+ }
+ }
+ return deforient;
+}
+
+/*!
+ \internal
+*/
+void QPEApplication::setDefaultRotation(int r)
+{
+ if ( qApp->type() == GuiServer ) {
+ deforient = r;
+ setenv("QWS_DISPLAY", QString("Transformed:Rot%1:0").arg(r).latin1(), 1);
+ } else {
+ QCopEnvelope("QPE/System", "setDefaultRotation(int)") << r;
+ }
+}
+
+/*!
+ \internal
+*/
+void QPEApplication::applyStyle()
+{
+ Config config( "qpe" );
+
+ config.setGroup( "Appearance" );
+
+ // Widget style
+ QString style = config.readEntry( "Style", "Light" );
+ internalSetStyle( style );
+
+ // Colors
+ QColor bgcolor( config.readEntry( "Background", "#E5E1D5" ) );
+ QColor btncolor( config.readEntry( "Button", "#D6CDBB" ) );
+ QPalette pal( btncolor, bgcolor );
+ QString color = config.readEntry( "Highlight", "#800000" );
+ pal.setColor( QColorGroup::Highlight, QColor(color) );
+ color = config.readEntry( "HighlightedText", "#FFFFFF" );
+ pal.setColor( QColorGroup::HighlightedText, QColor(color) );
+ color = config.readEntry( "Text", "#000000" );
+ pal.setColor( QColorGroup::Text, QColor(color) );
+ color = config.readEntry( "ButtonText", "#000000" );
+ pal.setColor( QPalette::Active, QColorGroup::ButtonText, QColor(color) );
+ color = config.readEntry( "Base", "#FFFFFF" );
+ pal.setColor( QColorGroup::Base, QColor(color) );
+
+ pal.setColor( QPalette::Disabled, QColorGroup::Text,
+ pal.color(QPalette::Active, QColorGroup::Background).dark() );
+
+ setPalette( pal, TRUE );
+}
+
+void QPEApplication::systemMessage( const QCString &msg, const QByteArray &data)
+{
+#ifdef Q_WS_QWS
+ QDataStream stream( data, IO_ReadOnly );
+ if ( msg == "applyStyle()" ) {
+ applyStyle();
+ } else if ( msg == "setScreenSaverInterval(int)" ) {
+ if ( type() == GuiServer ) {
+ int time;
+ stream >> time;
+ setScreenSaverInterval(time);
+ }
+ } else if ( msg == "setScreenSaverIntervals(int,int,int)" ) {
+ if ( type() == GuiServer ) {
+ int t1,t2,t3;
+ stream >> t1 >> t2 >> t3;
+ setScreenSaverIntervals(t1,t2,t3);
+ }
+ } else if ( msg == "setBacklight(int)" ) {
+ if ( type() == GuiServer ) {
+ int bright;
+ stream >> bright;
+ setBacklight(bright);
+ }
+ } else if ( msg == "setDefaultRotation(int)" ) {
+ if ( type() == GuiServer ) {
+ int r;
+ stream >> r;
+ setDefaultRotation(r);
+ }
+ } else if ( msg == "shutdown()" ) {
+ if ( type() == GuiServer )
+ shutdown();
+ } else if ( msg == "quit()" ) {
+ if ( type() != GuiServer )
+ tryQuit();
+ } else if ( msg == "forceQuit()" ) {
+ if ( type() != GuiServer )
+ quit();
+ } else if ( msg == "restart()" ) {
+ if ( type() == GuiServer )
+ restart();
+ } else if ( msg == "grabKeyboard(QString)" ) {
+ QString who;
+ stream >> who;
+ if ( who.isEmpty() )
+ d->kbgrabber = 0;
+ else if ( who != d->appName )
+ d->kbgrabber = 1;
+ else
+ d->kbgrabber = 2;
+ } else if ( msg == "language(QString)" ) {
+ if ( type() == GuiServer ) {
+ QString l;
+ stream >> l;
+ QString cl = getenv("LANG");
+ if ( cl != l ) {
+ if ( l.isNull() )
+ unsetenv( "LANG" );
+ else
+ setenv( "LANG", l.latin1(), 1 );
+ restart();
+ }
+ }
+ } else if ( msg == "timeChange(QString)" ) {
+ QString t;
+ stream >> t;
+ if ( t.isNull() )
+ unsetenv( "TZ" );
+ else
+ setenv( "TZ", t.latin1(), 1 );
+ // emit the signal so everyone else knows...
+ emit timeChanged();
+ } else if ( msg == "execute(QString)" ) {
+ if ( type() == GuiServer ) {
+ QString t;
+ stream >> t;
+ Global::execute( t );
+ }
+ } else if ( msg == "execute(QString,QString)" ) {
+ if ( type() == GuiServer ) {
+ QString t,d;
+ stream >> t >> d;
+ Global::execute( t, d );
+ }
+ } else if ( msg == "addAlarm(QDateTime,QCString,QCString,int)" ) {
+ if ( type() == GuiServer ) {
+ QDateTime when;
+ QCString channel, message;
+ int data;
+ stream >> when >> channel >> message >> data;
+ AlarmServer::addAlarm( when, channel, message, data );
+ }
+ } else if ( msg == "deleteAlarm(QDateTime,QCString,QCString,int)" ) {
+ if ( type() == GuiServer ) {
+ QDateTime when;
+ QCString channel, message;
+ int data;
+ stream >> when >> channel >> message >> data;
+ AlarmServer::deleteAlarm( when, channel, message, data );
+ }
+ } else if ( msg == "clockChange(bool)" ) {
+ int tmp;
+ stream >> tmp;
+ emit clockChanged( tmp );
+ } else if ( msg == "weekChange(bool)" ) {
+ int tmp;
+ stream >> tmp;
+ emit weekChanged( tmp );
+ } else if ( msg == "setDateFormat(DateFormat)" ) {
+ DateFormat tmp;
+ stream >> tmp;
+ emit dateFormatChanged( tmp );
+ } else if ( msg == "setVolume(int,int)" ) {
+ int t,v;
+ stream >> t >> v;
+ setVolume(t,v);
+ emit volumeChanged( muted );
+ } else if ( msg == "volumeChange(bool)" ) {
+ stream >> muted;
+ setVolume();
+ emit volumeChanged( muted );
+ } else if ( msg == "setScreenSaverMode(int)" ) {
+ if ( type() == GuiServer ) {
+ int old = disable_suspend;
+ stream >> disable_suspend;
+ //qDebug("setScreenSaverMode(%d)", disable_suspend );
+ if ( disable_suspend > old )
+ setScreenSaverInterval( -1 );
+ }
+ }
+#endif
+}
+
+/*!
+ \internal
+*/
+bool QPEApplication::raiseAppropriateWindow()
+{
+ bool r=FALSE;
+ // ########## raise()ing main window should raise and set active
+ // ########## it and then all childen. This belongs in Qt/Embedded
+ QWidget *top = d->qpe_main_widget;
+ if ( !top ) top =mainWidget();
+ if ( top && d->keep_running ) {
+ if ( top->isVisible() )
+ r = TRUE;
+#ifdef Q_WS_QWS
+ if ( !d->nomaximize )
+ top->showMaximized();
+ else
+#endif
+ top->show();
+ top->raise();
+ top->setActiveWindow();
+ }
+ QWidget *topm = activeModalWidget();
+ if ( topm && topm != top ) {
+ topm->show();
+ topm->raise();
+ topm->setActiveWindow();
+ r = FALSE;
+ }
+ return r;
+}
+
+void QPEApplication::pidMessage( const QCString &msg, const QByteArray & data)
+{
+#ifdef Q_WS_QWS
+
+ if ( msg == "quit()" ) {
+ tryQuit();
+ } else if ( msg == "quitIfInvisible()" ) {
+ if ( d->qpe_main_widget && !d->qpe_main_widget->isVisible() )
+ quit();
+ } else if ( msg == "close()" ) {
+ hideOrQuit();
+ } else if ( msg == "disablePreload()" ) {
+ d->preloaded = FALSE;
+ d->keep_running = TRUE;
+ /* so that quit will quit */
+ } else if ( msg == "enablePreload()" ) {
+ d->preloaded = TRUE;
+ d->keep_running = TRUE;
+ /* so next quit won't quit */
+ } else if ( msg == "raise()" ) {
+ d->keep_running = TRUE;
+ d->notbusysent = FALSE;
+ raiseAppropriateWindow();
+ } else if ( msg == "flush()" ) {
+ emit flush();
+ // we need to tell the desktop
+ QCopEnvelope e( "QPE/Desktop", "flushDone(QString)" );
+ e << d->appName;
+ } else if ( msg == "reload()" ) {
+ emit reload();
+ } else if ( msg == "setDocument(QString)" ) {
+ d->keep_running = TRUE;
+ QDataStream stream( data, IO_ReadOnly );
+ QString doc;
+ stream >> doc;
+ QWidget *mw = mainWidget();
+ if ( !mw )
+ mw = d->qpe_main_widget;
+ if ( mw )
+ Global::setDocument( mw, doc );
+ } else if ( msg == "nextView()" ) {
+ if ( raiseAppropriateWindow() )
+ emit appMessage( msg, data);
+ } else {
+ emit appMessage( msg, data);
+ }
+#endif
+}
+
+
+static bool setWidgetCaptionFromAppName( QWidget* /*mw*/, const QString& /*appName*/, const QString& /*appsPath*/ )
+{
+/*
+ // This works but disable it for now until it is safe to apply
+ // What is does is scan the .desktop files of all the apps for
+ // the applnk that has the corresponding argv[0] as this program
+ // then it uses the name stored in the .desktop file as the caption
+ // for the main widget. This saves duplicating translations for
+ // the app name in the program and in the .desktop files.
+
+ AppLnkSet apps( appsPath );
+
+ QList<AppLnk> appsList = apps.children();
+ for ( QListIterator<AppLnk> it(appsList); it.current(); ++it ) {
+ if ( (*it)->exec() == appName ) {
+ mw->setCaption( (*it)->name() );
+ return TRUE;
+ }
+ }
+*/
+ return FALSE;
+}
+
+
+/*!
+ Sets \a mw as the mainWidget() and shows it. For small windows,
+ consider passing TRUE for \a nomaximize rather than the default FALSE.
+
+ \sa showMainDocumentWidget()
+*/
+void QPEApplication::showMainWidget( QWidget* mw, bool nomaximize )
+{
+ setWidgetCaptionFromAppName( mw, d->appName, qpeDir() + "apps" );
+
+ d->nomaximize = nomaximize;
+ d->qpe_main_widget = mw;
+ d->sendQCopQ();
+ if ( d->preloaded ) {
+ if(d->forceshow) {
+#ifdef Q_WS_QWS
+ if ( !nomaximize )
+ mw->showMaximized();
+ else
+#endif
+ mw->show();
+ }
+ } else if ( d->keep_running ) {
+#ifdef Q_WS_QWS
+ if ( !nomaximize )
+ mw->showMaximized();
+ else
+#endif
+ mw->show();
+ }
+}
+
+/*!
+ Sets \a mw as the mainWidget() and shows it. For small windows,
+ consider passing TRUE for \a nomaximize rather than the default FALSE.
+
+ This calls designates the application as
+ a \link docwidget.html document-oriented\endlink application.
+
+ The \a mw widget must have a slot: setDocument(const QString&).
+
+ \sa showMainWidget()
+*/
+void QPEApplication::showMainDocumentWidget( QWidget* mw, bool nomaximize )
+{
+ setWidgetCaptionFromAppName( mw, d->appName, qpeDir() + "apps" );
+
+ if ( mw && argc() == 2 )
+ Global::setDocument( mw, QString::fromUtf8(argv()[1]) );
+ d->nomaximize = nomaximize;
+ d->qpe_main_widget = mw;
+ d->sendQCopQ();
+ if ( d->preloaded ) {
+ if(d->forceshow) {
+#ifdef Q_WS_QWS
+ if ( !nomaximize )
+ mw->showMaximized();
+ else
+#endif
+ mw->show();
+ }
+ } else if ( d->keep_running ) {
+#ifdef Q_WS_QWS
+ if ( !nomaximize )
+ mw->showMaximized();
+ else
+#endif
+ mw->show();
+ }
+}
+
+
+/*!
+ Sets that the application should continue running after processing
+ qcop messages. Normally if an application is started via a qcop message,
+ the application will process the qcop message and then quit. If while
+ processing the qcop message it calls this function, then the application
+ will show and start proper once it has finished processing qcop messages.
+
+ \sa keepRunning()
+*/
+void QPEApplication::setKeepRunning()
+{
+ if ( qApp && qApp->inherits( "QPEApplication" ) ) {
+ QPEApplication *qpeApp = (QPEApplication*)qApp;
+ qpeApp->d->keep_running = TRUE;
+ }
+}
+
+/*!
+ Returns whether the application will quit after processing the current
+ list of qcop messages.
+
+ \sa setKeepRunning()
+*/
+bool QPEApplication::keepRunning() const
+{
+ return d->keep_running;
+}
+
+/*!
+ \internal
+*/
+void QPEApplication::internalSetStyle( const QString &style )
+{
+#if QT_VERSION >= 300
+ if ( style == "QPE" ) {
+ setStyle( new QPEStyle );
+ } else {
+ QStyle *s = QStyleFactory::create(style);
+ if ( s ) setStyle(s);
+ }
+#else
+ if ( style == "Windows" ) {
+ setStyle( new QWindowsStyle );
+ } else if ( style == "QPE" ) {
+ setStyle( new QPEStyle );
+ } else if ( style == "Light" ) {
+ setStyle( new LightStyle );
+ }
+#ifndef QT_NO_STYLE_PLATINUM
+ else if ( style == "Platinum" ) {
+ setStyle( new QPlatinumStyle );
+ }
+#endif
+#ifndef QT_NO_STYLE_MOTIF
+ else if ( style == "Motif" ) {
+ setStyle( new QMotifStyle );
+ }
+#endif
+#ifndef QT_NO_STYLE_MOTIFPLUS
+ else if ( style == "MotifPlus" ) {
+ setStyle( new QMotifPlusStyle );
+ }
+#endif
+#endif
+}
+
+/*!
+ \internal
+*/
+void QPEApplication::prepareForTermination(bool willrestart)
+{
+ if ( willrestart ) {
+ // Draw a big wait icon, the image can be altered in later revisions
+// QWidget *d = QApplication::desktop();
+ QImage img = Resource::loadImage( "wait" );
+ QPixmap pix;
+ pix.convertFromImage(img.smoothScale(3*img.width(), 3*img.height()));
+ QLabel *lblWait = new QLabel(0, "wait hack!", QWidget::WStyle_Customize |
+ QWidget::WStyle_NoBorder | QWidget::WStyle_Tool );
+ lblWait->setPixmap( pix );
+ lblWait->setAlignment( QWidget::AlignCenter );
+ lblWait->show();
+ lblWait->showMaximized();
+ }
+#ifndef SINGLE_APP
+ { QCopEnvelope envelope("QPE/System", "forceQuit()"); }
+ processEvents(); // ensure the message goes out.
+ sleep(1); // You have 1 second to comply.
+#endif
+}
+
+/*!
+ \internal
+*/
+void QPEApplication::shutdown()
+{
+ // Implement in server's QPEApplication subclass
+}
+
+/*!
+ \internal
+*/
+void QPEApplication::restart()
+{
+ // Implement in server's QPEApplication subclass
+}
+
+static QPtrDict<void>* stylusDict=0;
+static void createDict()
+{
+ if ( !stylusDict )
+ stylusDict = new QPtrDict<void>;
+}
+
+/*!
+ Returns the current StylusMode for \a w.
+
+ \sa setStylusOperation()
+*/
+QPEApplication::StylusMode QPEApplication::stylusOperation( QWidget* w )
+{
+ if ( stylusDict )
+ return (StylusMode)(int)stylusDict->find(w);
+ return LeftOnly;
+}
+
+/*!
+ \enum QPEApplication::StylusMode
+
+ \value LeftOnly the stylus only generates LeftButton
+ events (the default).
+ \value RightOnHold the stylus generates RightButton events
+ if the user uses the press-and-hold gesture.
+
+ See setStylusOperation().
+*/
+
+/*!
+ Causes \a w to receive mouse events according to \a mode.
+
+ \sa stylusOperation()
+*/
+void QPEApplication::setStylusOperation( QWidget* w, StylusMode mode )
+{
+ createDict();
+ if ( mode == LeftOnly ) {
+ stylusDict->remove(w);
+ w->removeEventFilter(qApp);
+ } else {
+ stylusDict->insert(w,(void*)mode);
+ connect(w,SIGNAL(destroyed()),qApp,SLOT(removeSenderFromStylusDict()));
+ w->installEventFilter(qApp);
+ }
+}
+
+
+/*!
+ \reimp
+*/
+bool QPEApplication::eventFilter( QObject *o, QEvent *e )
+{
+ if ( stylusDict && e->type() >= QEvent::MouseButtonPress && e->type() <= QEvent::MouseMove ) {
+ QMouseEvent* me = (QMouseEvent*)e;
+ if ( me->button() == LeftButton ) {
+ StylusMode mode = (StylusMode)(int)stylusDict->find(o);
+ switch (mode) {
+ case RightOnHold:
+ switch ( me->type() ) {
+ case QEvent::MouseButtonPress:
+ d->presstimer = startTimer(500); // #### pref.
+ d->presswidget = (QWidget*)o;
+ d->presspos = me->pos();
+ d->rightpressed = FALSE;
+ break;
+ case QEvent::MouseButtonRelease:
+ if ( d->presstimer ) {
+ killTimer(d->presstimer);
+ d->presstimer = 0;
+ }
+ if ( d->rightpressed && d->presswidget ) {
+ // Right released
+ postEvent( d->presswidget,
+ new QMouseEvent( QEvent::MouseButtonRelease, me->pos(),
+ RightButton, LeftButton+RightButton ) );
+ // Left released, off-widget
+ postEvent( d->presswidget,
+ new QMouseEvent( QEvent::MouseMove, QPoint(-1,-1),
+ LeftButton, LeftButton ) );
+ postEvent( d->presswidget,
+ new QMouseEvent( QEvent::MouseButtonRelease, QPoint(-1,-1),
+ LeftButton, LeftButton ) );
+ d->rightpressed = FALSE;
+ return TRUE; // don't send the real Left release
+ }
+ break;
+ default:
+ break;
+ }
+ break;
+ default:
+ ;
+ }
+ }
+ } else if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease ) {
+ QKeyEvent *ke = (QKeyEvent *)e;
+ if ( ke->key() == Key_Enter ) {
+ if ( o->isA( "QRadioButton" ) || o->isA( "QCheckBox" ) ) {
+ postEvent( o, new QKeyEvent( e->type(), Key_Space, ' ',
+ ke->state(), " ", ke->isAutoRepeat(), ke->count() ) );
+ return TRUE;
+ }
+ }
+ }
+
+ return FALSE;
+}
+
+/*!
+ \reimp
+*/
+void QPEApplication::timerEvent( QTimerEvent *e )
+{
+ if ( e->timerId() == d->presstimer && d->presswidget ) {
+ // Right pressed
+ postEvent( d->presswidget,
+ new QMouseEvent( QEvent::MouseButtonPress, d->presspos,
+ RightButton, LeftButton ) );
+ killTimer( d->presstimer );
+ d->presstimer = 0;
+ d->rightpressed = TRUE;
+ }
+}
+
+void QPEApplication::removeSenderFromStylusDict()
+{
+ stylusDict->remove((void*)sender());
+ if ( d->presswidget == sender() )
+ d->presswidget = 0;
+}
+
+/*!
+ \internal
+*/
+bool QPEApplication::keyboardGrabbed() const
+{
+ return d->kbgrabber;
+}
+
+
+/*!
+ Reverses the effect of grabKeyboard(). This is called automatically
+ on program exit.
+*/
+void QPEApplication::ungrabKeyboard()
+{
+ QPEApplicationData* d = ((QPEApplication*)qApp)->d;
+ if ( d->kbgrabber == 2 ) {
+ QCopEnvelope e("QPE/System", "grabKeyboard(QString)" );
+ e << QString::null;
+ d->kbregrab = FALSE;
+ d->kbgrabber = 0;
+ }
+}
+
+/*!
+ Grabs the keyboard such that the system's application launching
+ keys no longer work, and instead they are receivable by this
+ application.
+
+ \sa ungrabKeyboard()
+*/
+void QPEApplication::grabKeyboard()
+{
+ QPEApplicationData* d = ((QPEApplication*)qApp)->d;
+ if ( qApp->type() == QApplication::GuiServer )
+ d->kbgrabber = 0;
+ else {
+ QCopEnvelope e("QPE/System", "grabKeyboard(QString)" );
+ e << d->appName;
+ d->kbgrabber = 2; // me
+ }
+}
+
+/*!
+ \reimp
+*/
+int QPEApplication::exec()
+{
+ d->sendQCopQ();
+ if ( d->keep_running)
+ //|| d->qpe_main_widget && d->qpe_main_widget->isVisible() )
+ return QApplication::exec();
+
+ {
+ QCopEnvelope e("QPE/System", "closing(QString)" );
+ e << d->appName;
+ }
+ processEvents();
+ return 0;
+}
+
+/*!
+ \internal
+ External request for application to quit. Quits if possible without
+ loosing state.
+*/
+void QPEApplication::tryQuit()
+{
+ if ( activeModalWidget() || strcmp( argv()[0], "embeddedkonsole") == 0 )
+ return; // Inside modal loop or konsole. Too hard to save state.
+ {
+ QCopEnvelope e("QPE/System", "closing(QString)" );
+ e << d->appName;
+ }
+ processEvents();
+
+ quit();
+}
+
+/*!
+ \internal
+ User initiated quit. Makes the window 'Go Away'. If preloaded this means
+ hiding the window. If not it means quitting the application.
+ As this is user initiated we don't need to check state.
+*/
+void QPEApplication::hideOrQuit()
+{
+ // notify of our demise :)
+ {
+ QCopEnvelope e("QPE/System", "closing(QString)" );
+ e << d->appName;
+ }
+ processEvents();
+ if ( d->preloaded && d->qpe_main_widget )
+ d->qpe_main_widget->hide();
+ else
+ quit();
+}
+
+#if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX)
+
+// The libraries with the skiff package (and possibly others) have
+// completely useless implementations of builtin new and delete that
+// use about 50% of your CPU. Here we revert to the simple libc
+// functions.
+
+void* operator new[](size_t size)
+{
+ return malloc(size);
+}
+
+void* operator new(size_t size)
+{
+ return malloc(size);
+}
+
+void operator delete[](void* p)
+{
+ free(p);
+}
+
+void operator delete[](void* p, size_t /*size*/)
+{
+ free(p);
+}
+
+void operator delete(void* p)
+{
+ free(p);
+}
+
+void operator delete(void* p, size_t /*size*/)
+{
+ free(p);
+}
+
+#endif
+
+#if ( QT_VERSION <= 230 ) && !defined(SINGLE_APP)
+#include <qwidgetlist.h>
+#include <qgfx_qws.h>
+extern QRect qt_maxWindowRect;
+void qt_setMaxWindowRect(const QRect& r)
+{
+ qt_maxWindowRect = qt_screen->mapFromDevice(r,
+ qt_screen->mapToDevice(QSize(qt_screen->width(),qt_screen->height())));
+ // Re-resize any maximized windows
+ QWidgetList* l = QApplication::topLevelWidgets();
+ if ( l ) {
+ QWidget *w = l->first();
+ while ( w ) {
+ if ( w->isVisible() && w->isMaximized() )
+ {
+ w->showMaximized();
+ }
+ w = l->next();
+ }
+ delete l;
+ }
+}
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef __QPE_APPLICATION_H__
+#define __QPE_APPLICATION_H__
+
+
+#include <qapplication.h>
+#if defined(_WS_QWS_) && !defined(Q_WS_QWS)
+#define Q_WS_QWS
+#endif
+#include "qpedecoration_qws.h"
+#include "timestring.h"
+
+class QCopChannel;
+class QPEApplicationData;
+class QWSEvent;
+class QWSKeyEvent;
+
+class QPEApplication : public QApplication
+{
+ Q_OBJECT
+public:
+ QPEApplication( int& argc, char **argv, Type=GuiClient );
+ ~QPEApplication();
+
+ static QString qpeDir();
+ static QString documentDir();
+ void applyStyle();
+ static int defaultRotation();
+ static void setDefaultRotation(int r);
+ static void grabKeyboard();
+ static void ungrabKeyboard();
+
+ enum StylusMode {
+ LeftOnly,
+ RightOnHold
+ // RightOnHoldLeftDelayed, etc.
+ };
+ static void setStylusOperation( QWidget*, StylusMode );
+ static StylusMode stylusOperation( QWidget* );
+
+ enum InputMethodHint {
+ Normal,
+ AlwaysOff,
+ AlwaysOn
+ };
+
+ enum screenSaverHint {
+ Disable = 0,
+ DisableLightOff = 1,
+ DisableSuspend = 2,
+ Enable = 100
+ };
+
+ static void setInputMethodHint( QWidget *, InputMethodHint );
+ static InputMethodHint inputMethodHint( QWidget * );
+
+ void showMainWidget( QWidget*, bool nomax=FALSE );
+ void showMainDocumentWidget( QWidget*, bool nomax=FALSE );
+
+ static void setKeepRunning();
+ bool keepRunning() const;
+
+ int exec();
+
+signals:
+ void clientMoused();
+ void timeChanged();
+ void clockChanged( bool pm );
+ void volumeChanged( bool muted );
+ void appMessage( const QCString& msg, const QByteArray& data);
+ void weekChanged( bool startOnMonday );
+ void dateFormatChanged( DateFormat );
+ void flush();
+ void reload();
+
+private slots:
+ void systemMessage( const QCString &msg, const QByteArray &data );
+ void pidMessage( const QCString &msg, const QByteArray &data );
+ void removeSenderFromStylusDict();
+ void hideOrQuit();
+
+protected:
+ bool qwsEventFilter( QWSEvent * );
+ void internalSetStyle( const QString &style );
+ void prepareForTermination(bool willrestart);
+ virtual void restart();
+ virtual void shutdown();
+ bool eventFilter( QObject *, QEvent * );
+ void timerEvent( QTimerEvent * );
+ bool keyboardGrabbed() const;
+ bool raiseAppropriateWindow();
+ virtual void tryQuit();
+
+private:
+ void mapToDefaultAction( QWSKeyEvent *ke, int defKey );
+
+#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
+ QCopChannel *sysChannel;
+ QCopChannel *pidChannel;
+#endif
+ QPEApplicationData *d;
+};
+
+
+#endif
+
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "qpedebug.h"
+#include <stdio.h>
+#include <sys/time.h>
+#include <unistd.h>
+
+struct timeval qpe_debuglast;
+
+void qpe_debugTime( const char *file, int line, const char *desc )
+{
+ struct timeval tv;
+ gettimeofday( &tv, 0 );
+
+ int tdiff = tv.tv_usec - qpe_debuglast.tv_usec;
+ tdiff += (tv.tv_sec - qpe_debuglast.tv_sec) * 1000000;
+
+ fprintf( stderr, "%s:%d Time: %ld.%06ld", file, line, tv.tv_sec, tv.tv_usec);
+
+ static int pid = getpid();
+
+ if ( qpe_debuglast.tv_sec )
+ fprintf( stderr, " (pid %d delta %dus)", pid, tdiff );
+
+ if ( desc )
+ fprintf( stderr, " (%s)", desc );
+
+ fprintf( stderr, "\n" );
+
+ qpe_debuglast = tv;
+}
+
+
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef QPEDEBUG_H
+#define QPEDEBUG_H
+
+#define QPE_DEBUGTIMEDESC(X) qpe_debugTime( __FILE__, __LINE__, X );
+#define QPE_DEBUGTIME qpe_debugTime( __FILE__, __LINE__ );
+
+void qpe_debugTime( const char *file, int line, const char *desc=0 );
+
+#endif
+
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#include <qapplication.h>
+#include <qstyle.h>
+#include <qwidget.h>
+#include <qpainter.h>
+#include <qtimer.h>
+#include <qwhatsthis.h>
+#include "qcopenvelope_qws.h"
+#include "qpedecoration_qws.h"
+#include <qdialog.h>
+#include <qdrawutil.h>
+#include <qgfx_qws.h>
+#include "qpeapplication.h"
+#include "resource.h"
+#include "global.h"
+#include <qfile.h>
+#include <qsignal.h>
+
+#include <stdlib.h>
+
+extern QRect qt_maxWindowRect;
+
+//#define MINIMIZE_HELP_HACK // use minimize button when not a dialog
+
+//#define WHATSTHIS_MODE
+
+#ifndef QT_NO_QWS_QPE_WM_STYLE
+
+#ifndef QT_NO_IMAGEIO_XPM
+
+/* XPM */
+static const char * const qpe_close_xpm[] = {
+"16 16 3 1",
+" c None",
+". c #FFFFFF",
+"+ c #000000",
+" ",
+" ",
+" ..... ",
+" ..+++++.. ",
+" .+++++++++. ",
+" .+..+++..+. ",
+" .++...+...++. ",
+" .+++.....+++. ",
+" .++++...++++. ",
+" .+++.....+++. ",
+" .++...+...++. ",
+" .+..+++..+. ",
+" .+++++++++. ",
+" ..+++++.. ",
+" ..... ",
+" "};
+
+/* XPM */
+static const char * const qpe_accept_xpm[] = {
+"16 16 3 1",
+" c None",
+". c #FFFFFF",
+"+ c #000000",
+" ",
+" ",
+" ..... ",
+" ..+++++.. ",
+" .+++++++++. ",
+" .+++++++++. ",
+" .+++++++..++. ",
+" .++.+++...++. ",
+" .+...+...+++. ",
+" .+......++++. ",
+" .++....+++++. ",
+" .++..+++++. ",
+" .+++++++++. ",
+" ..+++++.. ",
+" ..... ",
+" "};
+
+#endif // QT_NO_IMAGEIO_XPM
+
+class TLWidget : public QWidget
+{
+public:
+ QWSManager *manager()
+ {
+ return topData()->qwsManager;
+ }
+
+ QTLWExtra *topExtra()
+ {
+ return topData();
+ }
+};
+
+QPEManager::QPEManager( QPEDecoration *d, QObject *parent )
+ : QObject( parent ), decoration( d ), helpState(0)
+{
+ wtTimer = new QTimer( this );
+ connect( wtTimer, SIGNAL(timeout()), this, SLOT(whatsThisTimeout()) );
+}
+
+
+void QPEManager::updateActive()
+{
+ QWidget *newActive = qApp->activeWindow();
+ if ( (QWidget*)active == newActive )
+ return;
+
+ if ( active ) {
+ ((TLWidget *)(QWidget*)active)->manager()->removeEventFilter( this );
+ }
+
+ if ( newActive && ((TLWidget *)newActive)->manager() ) {
+ active = newActive;
+ ((TLWidget *)(QWidget*)active)->manager()->installEventFilter( this );
+ } else {
+ active = 0;
+ }
+}
+
+int QPEManager::pointInQpeRegion( QWidget *w, const QPoint &p )
+{
+ if ( decoration->region( w, w->geometry(),
+ (QWSDecoration::Region)QPEDecoration::Help ).contains(p) ) {
+ return QPEDecoration::Help;
+ }
+
+ return QWSDecoration::None;
+}
+
+bool QPEManager::eventFilter( QObject *o, QEvent *e )
+{
+ QWSManager *mgr = (QWSManager *)o;
+ QWidget *w = mgr->widget();
+ switch ( e->type() ) {
+ case QEvent::MouseButtonPress:
+ {
+ if ( QWhatsThis::inWhatsThisMode() ) {
+ QWhatsThis::leaveWhatsThisMode();
+ return true;
+ }
+ pressTime = QTime::currentTime();
+ QPoint p = ((QMouseEvent*)e)->globalPos();
+ if ( pointInQpeRegion( w, p ) == QPEDecoration::Help ) {
+ helpState = QWSButton::Clicked|QWSButton::MouseOver;
+ drawButton( w, QPEDecoration::Help, helpState );
+ return true;
+ }
+ }
+ break;
+ case QEvent::MouseButtonRelease:
+ if ( helpState & QWSButton::Clicked ) {
+ helpState = 0;
+ drawButton( w, QPEDecoration::Help, helpState );
+ QPoint p = ((QMouseEvent*)e)->globalPos();
+ if ( pointInQpeRegion( w, p ) == QPEDecoration::Help ) {
+#ifdef WHATSTHIS_MODE
+ if ( pressTime.msecsTo( QTime::currentTime() ) > 250 ) {
+ decoration->help( w );
+ } else {
+ QWhatsThis::enterWhatsThisMode();
+ wtTimer->start( 200 );
+ }
+#else
+ decoration->help( w );
+#endif
+ }
+ return true;
+ }
+ break;
+ case QEvent::MouseMove:
+ if ( helpState & QWSButton::Clicked ) {
+ int oldState = helpState;
+ QPoint p = ((QMouseEvent*)e)->globalPos();
+ if ( pointInQpeRegion( w, p ) == QPEDecoration::Help )
+ helpState = QWSButton::Clicked|QWSButton::MouseOver;
+ else
+ helpState = 0;
+ if ( helpState != oldState )
+ drawButton( w, QPEDecoration::Help, helpState );
+ }
+ break;
+ default:
+ break;
+ }
+ return QObject::eventFilter( o, e );
+}
+
+void QPEManager::drawButton( QWidget *w, QPEDecoration::QPERegion r, int state )
+{
+ QPainter painter(w);
+ QRegion rgn = ((TLWidget *)w)->topExtra()->decor_allocated_region;
+ painter.internalGfx()->setWidgetDeviceRegion( rgn );
+ painter.setClipRegion(decoration->region(w, w->rect(),QWSDecoration::All));
+ decoration->paintButton( &painter, w, (QWSDecoration::Region)r, state );
+}
+
+void QPEManager::whatsThisTimeout()
+{
+ if ( !QWhatsThis::inWhatsThisMode() ) {
+ wtTimer->stop();
+ if ( active )
+ drawButton( active, QPEDecoration::Help, 0 );
+ } else if ( active ) {
+ static int state = 0;
+ if ( !state )
+ state = QWSButton::Clicked|QWSButton::MouseOver;
+ else
+ state = 0;
+ drawButton( active, QPEDecoration::Help, state );
+ }
+}
+
+//=========
+
+class HackWidget : public QWidget
+{
+public:
+ bool needsOk() { return (getWState() & WState_Reserved1 ); }
+};
+
+//===========================================================================
+
+QPEDecoration::QPEDecoration()
+ : QWSDefaultDecoration()
+{
+ imageOk = Resource::loadImage( "OKButton" );
+ imageClose = Resource::loadImage( "CloseButton" );
+ imageHelp = Resource::loadImage( "HelpButton" );
+ helpFile = QString(qApp->argv()[0]) + ".html";
+ QString lang = getenv( "LANG" );
+ helpExists = QFile::exists( QPEApplication::qpeDir() + "/help/" + lang + "/html/" + helpFile );
+ if ( !helpExists )
+ helpExists = QFile::exists( QPEApplication::qpeDir() + "/help/en/html/" + helpFile );
+#ifndef MINIMIZE_HELP_HACK
+ qpeManager = new QPEManager( this );
+#else
+ qpeManager = 0;
+#endif
+}
+
+QPEDecoration::~QPEDecoration()
+{
+ delete qpeManager;
+}
+
+const char **QPEDecoration::menuPixmap()
+{
+ return (const char **)0;
+}
+
+const char **QPEDecoration::closePixmap()
+{
+ return (const char **)qpe_close_xpm;
+}
+
+const char **QPEDecoration::minimizePixmap()
+{
+ return (const char **)qpe_accept_xpm;
+}
+
+const char **QPEDecoration::maximizePixmap()
+{
+ return (const char **)0;
+}
+
+const char **QPEDecoration::normalizePixmap()
+{
+ return (const char **)0;
+}
+
+int QPEDecoration::getTitleHeight(const QWidget *)
+{
+ return 15;
+}
+
+/*
+ If rect is empty, no frame is added. (a hack, really)
+*/
+QRegion QPEDecoration::region(const QWidget *widget, const QRect &rect, QWSDecoration::Region type)
+{
+ int titleHeight = getTitleHeight(widget);
+// int titleWidth = getTitleWidth(widget);
+// int bw = rect.isEmpty() ? 0 : BORDER_WIDTH;
+ QRegion region;
+
+#ifndef MINIMIZE_HELP_HACK
+ qpeManager->updateActive();
+#endif
+
+ switch ((int)type) {
+ case Menu:
+ case Maximize:
+ break;
+ case Minimize: {
+ if ( ((HackWidget *)widget)->needsOk() ||
+ (widget->inherits( "QDialog" ) && !widget->inherits( "QMessageBox" ) ) ) {
+ QRect r(rect.right() - imageOk.width(),
+ rect.top() - titleHeight - 2,
+ imageOk.width(), titleHeight);
+ if (r.left() > rect.left() + titleHeight)
+ region = r;
+ }
+#ifdef MINIMIZE_HELP_HACK
+ else if ( helpExists ) {
+ QRect r;
+ r = QRect(rect.right() - imageClose.width() - imageHelp.width(),
+ rect.top() - titleHeight - 2,
+ imageHelp.width(), titleHeight);
+ if (r.left() > rect.left() + titleHeight)
+ region = r;
+ }
+#endif
+ }
+ break;
+ case Close: {
+ if ( ((HackWidget *)widget)->needsOk() ||
+ (widget->inherits( "QDialog" ) && !widget->inherits( "QMessageBox" ) ) ) {
+ QRect r;
+ r = QRect(rect.right() - imageOk.width() - imageClose.width(),
+ rect.top() - titleHeight - 2,
+ imageClose.width(), titleHeight);
+ if (r.left() > rect.left() + titleHeight)
+ region = r;
+ } else {
+ QRect r(rect.right() - imageClose.width(),
+ rect.top() - titleHeight - 2,
+ imageClose.width(), titleHeight);
+ if (r.left() > rect.left() + titleHeight)
+ region = r;
+ }
+ break;
+ }
+ case Title: {
+ if ( widget->isMaximized() ) {
+ region = QRegion();
+ } else {
+ int btnWidth = imageClose.width();
+ if ( ((HackWidget *)widget)->needsOk() ||
+ (widget->inherits( "QDialog" ) && !widget->inherits( "QMessageBox" ) ) )
+ btnWidth += imageOk.width();
+ QRect r(rect.left() + 1, rect.top() - titleHeight,
+ rect.width() - btnWidth - 2, titleHeight);
+ if (r.width() > 0)
+ region = r;
+ }
+ break;
+ }
+ case Help: {
+ if ( helpExists ) {
+ QRect r;
+ int l = rect.right() - imageClose.width() - imageHelp.width();
+ if ( ((HackWidget *)widget)->needsOk() ||
+ (widget->inherits( "QDialog" ) && !widget->inherits( "QMessageBox" ) ) )
+ l -= imageOk.width();
+ r = QRect(l, rect.top() - titleHeight - 2,
+ imageHelp.width(), titleHeight);
+ if (r.left() > rect.left() + titleHeight)
+ region = r;
+ }
+ break;
+ }
+ case Top:
+ case Left:
+ case Right:
+ case Bottom:
+ case TopLeft:
+ case TopRight:
+ case BottomLeft:
+ case BottomRight:
+ if ( widget->isMaximized() ) {
+ region = QRegion();
+ break;
+ }
+ //else fallthrough!!!
+ case All:
+ default:
+ region = QWSDefaultDecoration::region(widget, rect, type);
+ break;
+ }
+
+ return region;
+}
+
+void QPEDecoration::paint(QPainter *painter, const QWidget *widget)
+{
+#ifndef QT_NO_STYLE
+// QStyle &style = QApplication::style();
+#endif
+
+ int titleWidth = getTitleWidth(widget);
+ int titleHeight = getTitleHeight(widget);
+
+ QRect rect(widget->rect());
+
+ // Border rect
+ QRect br( rect.left() - BORDER_WIDTH,
+ rect.top() - BORDER_WIDTH - titleHeight,
+ rect.width() + 2 * BORDER_WIDTH,
+ rect.height() + BORDER_WIDTH + BOTTOM_BORDER_WIDTH + titleHeight );
+
+ // title bar rect
+ QRect tr;
+
+ tr = QRect( rect.left(), rect.top() - titleHeight, rect.width(), titleHeight );
+
+ QRegion oldClip = painter->clipRegion();
+ painter->setClipRegion( oldClip - QRegion( tr ) ); // reduce flicker
+
+#ifndef QT_NO_PALETTE
+ // const QColorGroup &cg = QApplication::palette().active();
+ const QColorGroup &cg = widget->palette().active();
+
+ qDrawWinPanel(painter, br.x(), br.y(), br.width(),
+ br.height() - 4, cg, FALSE,
+ &cg.brush(QColorGroup::Background));
+
+ painter->setClipRegion( oldClip );
+
+ if (titleWidth > 0) {
+ QBrush titleBrush;
+ QPen titlePen;
+ QPen titleLines;
+ int titleLeft = titleHeight + 4;
+
+ if (widget == qApp->activeWindow()) {
+ titleBrush = cg.brush(QColorGroup::Highlight);
+ titlePen = cg.color(QColorGroup::HighlightedText);
+ } else {
+ titleBrush = cg.brush(QColorGroup::Background);
+ titlePen = cg.color(QColorGroup::Text);
+ }
+
+ titleLines = titleBrush.color().dark(150);
+
+#define CLAMP(x, y) ( ((x) > (y)) ? (y) : (x) )
+
+ titleLeft = rect.left() + 5;
+ painter->setPen( cg.midlight() );
+ painter->drawLine( rect.left() - BORDER_WIDTH + 2,
+ rect.bottom() + 1, rect.right() + BORDER_WIDTH - 2,
+ rect.bottom() + 1 );
+
+ fillTitle( painter, widget, rect.left() - 2,
+ rect.top() - titleHeight - 2,
+ rect.width() + 3, titleHeight + 2 );
+/*
+ painter->fillRect(rect.left() - 2,
+ rect.top() - titleHeight - 2,
+ rect.width() + 3, titleHeight + 2,
+ titleBrush);
+
+ painter->setPen( titleLines );
+ for ( int i = rect.top() - titleHeight - 2; i < rect.top(); i += 2 )
+ painter->drawLine( rect.left() - 2, i, rect.left() + rect.width() + 2, i );
+*/
+ painter->setPen(titlePen);
+ QFont f( QApplication::font() );
+ f.setWeight( QFont::Bold );
+ painter->setFont(f);
+ painter->drawText( titleLeft, -titleHeight,
+ rect.width() - titleHeight - 10, titleHeight-1,
+ QPainter::AlignVCenter, widget->caption());
+ }
+
+#endif //QT_NO_PALETTE
+
+#ifndef MINIMIZE_HELP_HACK
+ paintButton( painter, widget, (QWSDecoration::Region)Help, 0 );
+#endif
+}
+
+void QPEDecoration::paintButton(QPainter *painter, const QWidget *w,
+ QWSDecoration::Region type, int state)
+{
+#ifndef QT_NO_PALETTE
+#ifndef QT_NO_STYLE
+// QStyle &style = QApplication::style();
+#endif
+ const QColorGroup &cg = w->palette().active();
+
+ QRect brect(region(w, w->rect(), type).boundingRect());
+
+// int xoff=2;
+// int yoff=2;
+
+// const QPixmap *pm=pixmapFor(w,type,state & QWSButton::On, xoff, yoff);
+
+ const QImage *img = 0;
+
+ switch ((int)type) {
+ case Close:
+ img = &imageClose;
+ break;
+ case Minimize:
+ if ( ((HackWidget *)w)->needsOk() ||
+ (w->inherits( "QDialog" ) && !w->inherits( "QMessageBox" ) ) )
+ img = &imageOk;
+ else if ( helpExists )
+ img = &imageHelp;
+ break;
+ case Help:
+ img = &imageHelp;
+ break;
+ default:
+ return;
+ }
+
+ QBrush titleBrush;
+
+ if (w == qApp->activeWindow()) {
+ titleBrush = cg.brush(QColorGroup::Highlight);
+ } else {
+ titleBrush = cg.brush(QColorGroup::Background);
+ }
+
+ fillTitle( painter, w, brect.x(), brect.y(), brect.width()+1,
+ brect.height()+1 );
+ if ((state & QWSButton::MouseOver) && (state & QWSButton::Clicked)) {
+ if (img) painter->drawImage(brect.x()+1, brect.y()+3, *img);
+ } else {
+ if (img) painter->drawImage(brect.x(), brect.y()+2, *img);
+ }
+
+#endif
+
+}
+
+void QPEDecoration::fillTitle( QPainter *p, const QWidget *widget,
+ int x, int y, int w, int h )
+{
+ QBrush titleBrush;
+ QPen topLine;
+ QPen titleLines;
+
+ const QColorGroup &cg = widget->palette().active();
+
+ if (widget == qApp->activeWindow()) {
+ titleBrush = cg.brush(QColorGroup::Highlight);
+ titleLines = titleBrush.color().dark();
+ topLine = titleBrush.color().light();
+ } else {
+ titleBrush = cg.brush(QColorGroup::Background);
+ titleLines = titleBrush.color();
+ topLine = titleBrush.color();
+ }
+
+ p->fillRect( x, y, w, h, titleBrush);
+
+ p->setPen( topLine );
+ p->drawLine( x, y+1, x+w-1, y+1 );
+ p->setPen( titleLines );
+ for ( int i = y; i < y+h; i += 2 )
+ p->drawLine( x, i, x+w-1, i );
+}
+
+//#define QPE_DONT_SHOW_TITLEBAR
+
+void QPEDecoration::maximize( QWidget *widget )
+{
+#ifdef QPE_DONT_SHOW_TITLEBAR
+ if ( !widget->inherits( "QDialog" ) ) {
+ widget->setGeometry( qt_maxWindowRect );
+ } else
+#endif
+ {
+ QWSDecoration::maximize( widget );
+ }
+}
+
+#ifndef QT_NO_DIALOG
+class HackDialog : public QDialog
+{
+public:
+ void acceptIt() {
+ if ( isA( "QMessageBox" ) )
+ qApp->postEvent( this, new QKeyEvent( QEvent::KeyPress, Key_Enter, '\n', 0, "\n" ) );
+ else
+ accept();
+ }
+};
+#endif
+
+
+void QPEDecoration::minimize( QWidget *widget )
+{
+#ifndef QT_NO_DIALOG
+ // We use the minimize button as an "accept" button.
+ if ( widget->inherits( "QDialog" ) ) {
+ HackDialog *d = (HackDialog *)widget;
+ d->acceptIt();
+ }
+#endif
+ else if ( ((HackWidget *)widget)->needsOk() ) {
+ QSignal s;
+ s.connect( widget, SLOT( accept() ) );
+ s.activate();
+ } else {
+ help( widget );
+ }
+}
+
+void QPEDecoration::help( QWidget * )
+{
+ if ( helpExists ) {
+ Global::execute( "helpbrowser", helpFile );
+ }
+}
+
+
+/*
+#ifndef QT_NO_POPUPMENU
+QPopupMenu *QPEDecoration::menu(QWSManager*, const QWidget*, const QPoint&)
+{
+ return 0;
+}
+#endif
+*/
+
+
+
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef QPE_DECORATION_QWS_H__
+#define QPE_DECORATION_QWS_H__
+
+
+#include <qwsdefaultdecoration_qws.h>
+#include <qimage.h>
+#include <qdatetime.h>
+#include <qguardedptr.h>
+
+
+#ifndef QT_NO_QWS_QPE_WM_STYLE
+
+class QPEManager;
+class QTimer;
+
+class QPEDecoration : public QWSDefaultDecoration
+{
+public:
+ QPEDecoration();
+ virtual ~QPEDecoration();
+
+ virtual QRegion region(const QWidget *, const QRect &rect, Region);
+ virtual void paint(QPainter *, const QWidget *);
+ virtual void paintButton(QPainter *, const QWidget *, Region, int state);
+
+ void maximize( QWidget * );
+ void minimize( QWidget * );
+ virtual void help( QWidget * );
+
+ enum QPERegion { Help=LastRegion+1 };
+ void buttonClicked( QPERegion r );
+
+protected:
+ void fillTitle( QPainter *p, const QWidget *w, int x, int y, int w, int h );
+// virtual int getTitleWidth(const QWidget *);
+ virtual int getTitleHeight(const QWidget *);
+ virtual const char **menuPixmap();
+ virtual const char **closePixmap();
+ virtual const char **minimizePixmap();
+ virtual const char **maximizePixmap();
+ virtual const char **normalizePixmap();
+
+protected:
+ QImage imageOk;
+ QImage imageClose;
+ QImage imageHelp;
+ QString helpFile;
+ bool helpExists;
+ QPEManager *qpeManager;
+};
+
+
+class QPEManager : public QObject
+{
+ Q_OBJECT
+ friend class QPEDecoration;
+public:
+ QPEManager( QPEDecoration *d, QObject *parent=0 );
+
+ void updateActive();
+
+protected:
+ int pointInQpeRegion( QWidget *w, const QPoint &p );
+ virtual bool eventFilter( QObject *, QEvent * );
+ void drawButton( QWidget *w, QPEDecoration::QPERegion r, int state );
+
+protected slots:
+ void whatsThisTimeout();
+
+protected:
+ QPEDecoration *decoration;
+ QGuardedPtr<QWidget> active;
+ int helpState;
+ QTime pressTime;
+ QTimer *wtTimer;
+};
+
+
+#endif // QT_NO_QWS_QPE_WM_STYLE
+
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "qpedialog.h"
+#include "qpeapplication.h"
+
+#define protected public
+#include <qdialog.h>
+
+QPEDialogListener::QPEDialogListener(QDialog *di ) : QObject(di)
+{
+ dialog = di;
+ connect(qApp, SIGNAL(appMessage(const QCString&, const QByteArray&)),
+ this, SLOT(appMessage(const QCString&, const QByteArray&)) );
+}
+
+QPEDialogListener::~QPEDialogListener() {}
+
+void QPEDialogListener::appMessage( const QCString &msg, const QByteArray &data )
+{
+ if (!dialog)
+ return;
+ if (msg == "accept()") {
+ dialog->accept();
+ } else if (msg == "reject()") {
+ dialog->reject();
+ }
+}
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef __QPE_DIALOG_H__
+#define __QPE_DIALOG_H__
+
+#include <qobject.h>
+
+class QPEDialogListenerData;
+
+class QPEDialogListener : public QObject
+{
+ Q_OBJECT
+public:
+ QPEDialogListener(QDialog *di);
+ ~QPEDialogListener();
+
+private slots:
+ void appMessage( const QCString &msg, const QByteArray &data );
+
+private:
+
+ QDialog *dialog;
+ QPEDialogListenerData *d;
+};
+
+#endif
+
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 @@
+/**********************************************************************
+** Copyright (C) 2001 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#define INCLUDE_MENUITEM_DEF
+
+#include "qpemenubar.h"
+#include <qapplication.h>
+#include <qguardedptr.h>
+#include <qtimer.h>
+
+
+class QMenuBarHack : public QMenuBar
+{
+public:
+ int activeItem() const { return actItem; }
+
+ void goodbye()
+ {
+ activateItemAt(-1);
+ for ( unsigned int i = 0; i < count(); i++ ) {
+ QMenuItem *mi = findItem( idAt(i) );
+ if ( mi->popup() ) {
+ mi->popup()->hide();
+ }
+ }
+ }
+};
+
+
+QPEMenuToolFocusManager *QPEMenuToolFocusManager::me = 0;
+
+QPEMenuToolFocusManager::QPEMenuToolFocusManager() : QObject()
+{
+ qApp->installEventFilter( this );
+}
+
+void QPEMenuToolFocusManager::addWidget( QWidget *w )
+{
+ list.append( GuardedWidget(w) );
+}
+
+void QPEMenuToolFocusManager::removeWidget( QWidget *w )
+{
+ list.remove( GuardedWidget(w) );
+}
+
+void QPEMenuToolFocusManager::setActive( bool a )
+{
+ if ( a ) {
+ oldFocus = qApp->focusWidget();
+ QValueList<GuardedWidget>::Iterator it;
+ it = list.begin();
+ while ( it != list.end() ) {
+ QWidget *w = (*it);
+ if ( w && w->isEnabled() && w->isVisible() &&
+ w->topLevelWidget() == qApp->activeWindow() ) {
+ setFocus( w );
+ return;
+ }
+ ++it;
+ }
+ } else {
+ if ( inFocus ) {
+ if ( inFocus->inherits( "QMenuBar" ) )
+ ((QMenuBarHack *)(QWidget *)inFocus)->goodbye();
+ if ( inFocus->hasFocus() ) {
+ if ( oldFocus && oldFocus->isVisible() && oldFocus->isEnabled() ) {
+ oldFocus->setFocus();
+ } else {
+ inFocus->clearFocus();
+ }
+ }
+ }
+ inFocus = 0;
+ oldFocus = 0;
+ }
+}
+
+bool QPEMenuToolFocusManager::isActive() const
+{
+ return !inFocus.isNull();
+}
+
+void QPEMenuToolFocusManager::moveFocus( bool next )
+{
+ if ( !isActive() )
+ return;
+
+ int n = list.count();
+ QValueList<GuardedWidget>::Iterator it;
+ it = list.find( inFocus );
+ if ( it == list.end() )
+ it = list.begin();
+ while ( --n ) {
+ if ( next ) {
+ ++it;
+ if ( it == list.end() )
+ it = list.begin();
+ } else {
+ if ( it == list.begin() )
+ it = list.end();
+ --it;
+ }
+ QWidget *w = (*it);
+ if ( w && w->isEnabled() && w->isVisible() &&
+ w->topLevelWidget() == qApp->activeWindow() ) {
+ setFocus( w, next );
+ return;
+ }
+ }
+}
+
+void QPEMenuToolFocusManager::initialize()
+{
+ if ( !me )
+ me = new QPEMenuToolFocusManager;
+}
+
+QPEMenuToolFocusManager *QPEMenuToolFocusManager::manager()
+{
+ if ( !me )
+ me = new QPEMenuToolFocusManager;
+
+ return me;
+}
+
+void QPEMenuToolFocusManager::setFocus( QWidget *w, bool next )
+{
+ inFocus = w;
+// qDebug( "Set focus on %s", w->className() );
+ if ( inFocus->inherits( "QMenuBar" ) ) {
+ QMenuBar *mb = (QMenuBar *)(QWidget *)inFocus;
+ if ( next )
+ mb->activateItemAt( 0 );
+ else
+ mb->activateItemAt( mb->count()-1 );
+ }
+ inFocus->setFocus();
+}
+
+bool QPEMenuToolFocusManager::eventFilter( QObject *object, QEvent *event )
+{
+ if ( event->type() == QEvent::KeyPress ) {
+ QKeyEvent *ke = (QKeyEvent *)event;
+ if ( isActive() ) {
+ if ( object->inherits( "QButton" ) ) {
+ switch ( ke->key() ) {
+ case Key_Left:
+ moveFocus( FALSE );
+ return TRUE;
+
+ case Key_Right:
+ moveFocus( TRUE );
+ return TRUE;
+
+ case Key_Up:
+ case Key_Down:
+ return TRUE;
+ }
+ } else if ( object->inherits( "QPopupMenu" ) ) {
+ // Deactivate when a menu item is selected
+ if ( ke->key() == Key_Enter || ke->key() == Key_Return ||
+ ke->key() == Key_Escape ) {
+ QTimer::singleShot( 0, this, SLOT(deactivate()) );
+ }
+ } else if ( object->inherits( "QMenuBar" ) ) {
+ int dx = 0;
+ switch ( ke->key() ) {
+ case Key_Left:
+ dx = -1;
+ break;
+
+ case Key_Right:
+ dx = 1;
+ break;
+ }
+
+ QMenuBarHack *mb = (QMenuBarHack *)object;
+ if ( dx && mb->activeItem() >= 0 ) {
+ int i = mb->activeItem();
+ int c = mb->count();
+ int n = c;
+ while ( n-- ) {
+ i = i + dx;
+ if ( i == c ) {
+ mb->goodbye();
+ moveFocus( TRUE );
+ return TRUE;
+ } else if ( i < 0 ) {
+ mb->goodbye();
+ moveFocus( FALSE );
+ return TRUE;
+ }
+ QMenuItem *mi = mb->findItem( mb->idAt(i) );
+ if ( mi->isEnabled() && !mi->isSeparator() ) {
+ break;
+ }
+ }
+ }
+ }
+ }
+ if ( ke->key() == Key_F11 ) {
+ setActive( !isActive() );
+ return TRUE;
+ }
+ } else if ( event->type() == QEvent::KeyRelease ) {
+ QKeyEvent *ke = (QKeyEvent *)event;
+ if ( isActive() ) {
+ if ( object->inherits( "QButton" ) ) {
+ // Deactivate when a button is selected
+ if ( ke->key() == Key_Space )
+ QTimer::singleShot( 0, this, SLOT(deactivate()) );
+ }
+ }
+ } else if ( event->type() == QEvent::FocusIn ) {
+ if ( isActive() ) {
+ // A non-menu/tool widget has been selected - we're deactivated
+ QWidget *w = (QWidget *)object;
+ if ( !w->isPopup() && !list.contains( GuardedWidget( w ) ) ) {
+ inFocus = 0;
+ }
+ }
+ } else if ( event->type() == QEvent::Hide ) {
+ if ( isActive() ) {
+ // Deaticvate if a menu/tool has been hidden
+ QWidget *w = (QWidget *)object;
+ if ( !w->isPopup() && !list.contains( GuardedWidget( w ) ) ) {
+ setActive( FALSE );
+ }
+ }
+ } else if ( event->type() == QEvent::ChildInserted ) {
+ QChildEvent *ce = (QChildEvent *)event;
+ if ( ce->child()->inherits( "QMenuBar" ) ) {
+ addWidget( (QWidget *)ce->child() );
+ ce->child()->installEventFilter( this );
+ } else if ( object->inherits( "QToolBar" ) && ce->child()->isWidgetType() ) {
+ addWidget( (QWidget *)ce->child() );
+ }
+ } else if ( event->type() == QEvent::ChildRemoved ) {
+ QChildEvent *ce = (QChildEvent *)event;
+ if ( ce->child()->inherits( "QMenuBar" ) ) {
+ removeWidget( (QWidget *)ce->child() );
+ ce->child()->removeEventFilter( this );
+ } else if ( object->inherits( "QToolBar" ) && ce->child()->isWidgetType() ) {
+ removeWidget( (QWidget *)ce->child() );
+ }
+ }
+
+ return FALSE;
+}
+
+void QPEMenuToolFocusManager::deactivate()
+{
+ setActive( FALSE );
+}
+
+/*!
+ \class QPEMenuBar qpemenubar.h
+ \brief The QPEMenuBar class is obsolete. Use QMenuBar instead.
+
+ \obsolete
+
+ This class is obsolete. Use QMenuBar instead.
+
+ \sa QMenuBar
+*/
+
+/*!
+ Constructs a QPEMenuBar just as you would construct
+ a QMenuBar, passing \a parent and \a name.
+*/
+QPEMenuBar::QPEMenuBar( QWidget *parent, const char *name )
+ : QMenuBar( parent, name )
+{
+}
+
+/*!
+ \reimp
+*/
+QPEMenuBar::~QPEMenuBar()
+{
+}
+
+/*!
+ \internal
+*/
+void QPEMenuBar::keyPressEvent( QKeyEvent *e )
+{
+ QMenuBar::keyPressEvent( e );
+}
+
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 @@
+/**********************************************************************
+** Copyright (C) 2001 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QPEMENUBAR_H
+#define QPEMENUBAR_H
+
+#include <qmenubar.h>
+#include <qguardedptr.h>
+#include <qvaluelist.h>
+
+class QPEMenuToolFocusManager : public QObject
+{
+ Q_OBJECT
+public:
+ QPEMenuToolFocusManager();
+
+ void addWidget( QWidget *w );
+ void removeWidget( QWidget *w );
+ void setActive( bool a );
+ bool isActive() const;
+ void moveFocus( bool next );
+
+ static QPEMenuToolFocusManager *manager();
+ static void initialize();
+
+protected:
+ void setFocus( QWidget *w, bool next=TRUE );
+ bool eventFilter( QObject *object, QEvent *event );
+
+private slots:
+ void deactivate();
+
+private:
+ typedef QGuardedPtr<QWidget> GuardedWidget;
+ QValueList<GuardedWidget> list;
+ GuardedWidget inFocus;
+ GuardedWidget oldFocus;
+ static QPEMenuToolFocusManager *me;
+};
+
+
+class QPEMenuBar : public QMenuBar
+{
+ Q_OBJECT
+public:
+ QPEMenuBar( QWidget *parent=0, const char* name=0 );
+ ~QPEMenuBar();
+
+protected:
+ virtual void keyPressEvent( QKeyEvent *e );
+};
+
+#endif
+
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 @@
+#include "qpemessagebox.h"
+#include <qmessagebox.h>
+
+bool QPEMessageBox::confirmDelete( QWidget *parent, const QString & caption,
+ const QString & object )
+{
+ QString msg = QObject::tr("Are you sure you want to delete\n %1?").arg( object );
+ int r = QMessageBox::warning( parent, caption, msg, QMessageBox::Yes,
+ QMessageBox::No|QMessageBox::Default|
+ QMessageBox::Escape, 0 );
+
+ return r == QMessageBox::Yes;
+}
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 @@
+#include <qstring.h>
+
+class QWidget;
+
+class QPEMessageBox
+{
+public:
+ static bool confirmDelete( QWidget *parent, const QString & caption,
+ const QString & object );
+
+};
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "qpestyle.h"
+#include "qpeapplication.h"
+#include <qpushbutton.h>
+
+#include <qpainter.h>
+
+#define QCOORDARRLEN(x) sizeof(x)/(sizeof(QCOORD)*2)
+
+#if QT_VERSION >= 300
+
+#include <qdrawutil.h>
+#include <qcombobox.h>
+#include <qtabbar.h>
+
+QPEStyle::QPEStyle()
+{
+}
+
+QPEStyle::~QPEStyle()
+{
+}
+
+void QPEStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRect &r,
+ const QColorGroup &cg, SFlags flags, const QStyleOption &data) const
+{
+ switch ( pe ) {
+ case PE_ButtonTool:
+ {
+ QColorGroup mycg = cg;
+ if ( flags & Style_On ) {
+ QBrush fill( cg.mid(), Dense4Pattern );
+ mycg.setBrush( QColorGroup::Button, fill );
+ }
+ drawPrimitive( PE_ButtonBevel, p, r, mycg, flags, data );
+ break;
+ }
+ case PE_ButtonCommand:
+ case PE_ButtonDefault:
+ case PE_ButtonBevel:
+ case PE_HeaderSection:
+ {
+ QPen oldPen = p->pen();
+ p->fillRect( r.x()+1, r.y()+1, r.width()-2, r.height()-2, cg.brush(QColorGroup::Button) );
+
+ int x2 = r.right();
+ int y2 = r.bottom();
+
+ if ( flags & (Style_Sunken | Style_Down | Style_On) )
+ p->setPen( cg.dark() );
+ else
+ p->setPen( cg.light() );
+ p->drawLine( r.x(), r.y()+1, r.x(), y2-1 );
+ p->drawLine( r.x()+1, r.y(), x2-1, r.y() );
+
+ if ( flags & (Style_Sunken | Style_Down | Style_On) )
+ p->setPen( cg.light() );
+ else
+ p->setPen( cg.dark() );
+ p->drawLine( x2, r.y()+1, x2, y2-1 );
+ p->drawLine( r.x()+1, y2, x2-1, y2 );
+ p->setPen( oldPen );
+ break;
+ }
+ case PE_FocusRect:
+ break;
+ case PE_Indicator:
+ {
+ QColorGroup mycg( cg );
+ QBrush fill;
+ if ( flags & Style_Down )
+ fill = cg.brush( QColorGroup::Button );
+ else
+ fill = cg.brush( (flags&Style_Enabled) ? QColorGroup::Base : QColorGroup::Background );
+ mycg.setBrush( QColorGroup::Button, fill );
+ if ( flags&Style_Enabled )
+ flags |= Style_Sunken;
+ drawPrimitive( PE_ButtonBevel, p, r, mycg, flags );
+ if ( flags & Style_On ) {
+ QPointArray a( 7*2 );
+ int i, xx, yy;
+ xx = r.x()+3;
+ yy = r.y()+5;
+ for ( i=0; i<3; i++ ) {
+ a.setPoint( 2*i, xx, yy );
+ a.setPoint( 2*i+1, xx, yy+2 );
+ xx++; yy++;
+ }
+ yy -= 2;
+ for ( i=3; i<7; i++ ) {
+ a.setPoint( 2*i, xx, yy );
+ a.setPoint( 2*i+1, xx, yy+2 );
+ xx++; yy--;
+ }
+ if ( flags & Style_NoChange ) {
+ p->setPen( mycg.dark() );
+ } else {
+ p->setPen( mycg.text() );
+ }
+ p->drawLineSegments( a );
+ }
+ break;
+ }
+ case PE_ExclusiveIndicator:
+ {
+ static const QCOORD pts1[] = { // dark lines
+ 1,9, 1,8, 0,7, 0,4, 1,3, 1,2, 2,1, 3,1, 4,0, 7,0, 8,1, 9,1 };
+ static const QCOORD pts4[] = { // white lines
+ 2,10, 3,10, 4,11, 7,11, 8,10, 9,10, 10,9, 10,8, 11,7,
+ 11,4, 10,3, 10,2 };
+ static const QCOORD pts5[] = { // inner fill
+ 4,2, 7,2, 9,4, 9,7, 7,9, 4,9, 2,7, 2,4 };
+
+ int x, y, w, h;
+ r.rect( &x, &y, &w, &h );
+ p->eraseRect( x, y, w, h );
+ QPointArray a( QCOORDARRLEN(pts1), pts1 );
+ a.translate( x, y );
+ p->setPen( cg.dark() );
+ p->drawPolyline( a );
+ a.setPoints( QCOORDARRLEN(pts4), pts4 );
+ a.translate( x, y );
+ p->setPen( cg.light() );
+ p->drawPolyline( a );
+ a.setPoints( QCOORDARRLEN(pts5), pts5 );
+ a.translate( x, y );
+ QColor fillColor = ( flags&Style_Down || !(flags&Style_Enabled) ) ? cg.button() : cg.base();
+ p->setPen( fillColor );
+ p->setBrush( fillColor ) ;
+ p->drawPolygon( a );
+ if ( flags&Style_On ) {
+ p->setPen( NoPen );
+ p->setBrush( cg.text() );
+ p->drawRect( x+5, y+4, 2, 4 );
+ p->drawRect( x+4, y+5, 4, 2 );
+ }
+ break;
+ }
+ default:
+ QWindowsStyle::drawPrimitive( pe, p, r, cg, flags, data );
+ break;
+ }
+}
+
+void QPEStyle::drawControl( ControlElement ce, QPainter *p,
+ const QWidget *widget, const QRect &r,
+ const QColorGroup &cg, SFlags how, const QStyleOption &data) const
+{
+ switch ( ce ) {
+ case CE_PushButton:
+ {
+ const QPushButton *btn = (QPushButton*)widget;
+ SFlags flags;
+ flags = Style_Default;
+ if ( btn->isDown() )
+ flags |= Style_Down;
+ if ( btn->isOn() )
+ flags |= Style_On;
+ if ( btn->isEnabled() )
+ flags |= Style_Enabled;
+ if ( btn->isDefault() )
+ flags |= Style_Default;
+ if (! btn->isFlat() && !(flags & Style_Down))
+ flags |= Style_Raised;
+ p->setPen( cg.foreground() );
+ p->setBrush( QBrush(cg.button(), NoBrush) );
+ QColorGroup mycg( cg );
+ if ( flags & Style_On ) {
+ QBrush fill = QBrush( cg.mid(), Dense4Pattern );
+ mycg.setBrush( QColorGroup::Button, fill );
+ }
+ drawPrimitive( PE_ButtonBevel, p, r, mycg, flags, data );
+ break;
+ }
+ case CE_TabBarTab:
+ {
+ if ( !widget || !widget->parentWidget() )
+ break;
+
+ const QTabBar *tb = (const QTabBar *) widget;
+ bool selected = how & Style_Selected;
+
+ QRect r2(r);
+ if ( tb->shape() == QTabBar::RoundedAbove ) {
+ p->setPen( cg.light() );
+ p->drawLine( r2.left(), r2.bottom(), r2.right(), r2.bottom() );
+ if ( r2.left() == 0 )
+ p->drawPoint( tb->rect().bottomLeft() );
+ else {
+ p->setPen( cg.light() );
+ p->drawLine( r2.left(), r2.bottom(), r2.right(), r2.bottom() );
+ }
+
+ if ( selected ) {
+ p->setPen( cg.background() );
+ p->drawLine( r2.left()+2, r2.top()+1, r2.right()-2, r2.top()+1 );
+ p->fillRect( QRect( r2.left()+1, r2.top()+2, r2.width()-2, r2.height()-2),
+ cg.brush( QColorGroup::Background ));
+ } else {
+ r2.setRect( r2.left() + 2, r2.top() + 2,
+ r2.width() - 4, r2.height() - 2 );
+ p->setPen( cg.button() );
+ p->drawLine( r2.left()+2, r2.top()+1, r2.right()-2, r2.top()+1 );
+ p->fillRect( QRect( r2.left()+1, r2.top()+2, r2.width()-2, r2.height()-3),
+ cg.brush( QColorGroup::Button ));
+
+ //do shading; will not work for pixmap brushes
+ QColor bg = cg.button();
+ // int h,s,v;
+ // bg.hsv( &h, &s, &v );
+ int n = r2.height()/2;
+ int dark = 100;
+ for ( int i = 1; i < n; i++ ) {
+ dark = (dark * (100+(i*15)/n) )/100;
+ p->setPen( bg.dark( dark ) );
+ int y = r2.bottom()-n+i;
+ int x1 = r2.left()+1;
+ int x2 = r2.right()-1;
+ p->drawLine( x1, y, x2, y );
+ }
+ }
+
+ p->setPen( cg.light() );
+ p->drawLine( r2.left(), r2.bottom()-1, r2.left(), r2.top() + 2 );
+ p->drawPoint( r2.left()+1, r2.top() + 1 );
+ p->drawLine( r2.left()+2, r2.top(),
+ r2.right() - 2, r2.top() );
+
+ p->setPen( cg.dark() );
+ p->drawPoint( r2.right() - 1, r2.top() + 1 );
+ p->drawLine( r2.right(), r2.top() + 2, r2.right(), r2.bottom() - 1);
+ } else if ( tb->shape() == QTabBar::RoundedBelow ) {
+ if ( selected ) {
+ p->setPen( cg.background() );
+ p->drawLine( r2.left()+2, r2.bottom()-1, r2.right()-2, r2.bottom()-1 );
+ p->fillRect( QRect( r2.left()+1, r2.top(), r2.width()-2, r2.height()-2),
+ tb->palette().normal().brush( QColorGroup::Background ));
+ } else {
+ p->setPen( cg.dark() );
+ p->drawLine( r2.left(), r2.top(),
+ r2.right(), r2.top() );
+ r2.setRect( r2.left() + 2, r2.top(),
+ r2.width() - 4, r2.height() - 2 );
+ p->setPen( cg.button() );
+ p->drawLine( r2.left()+2, r2.bottom()-1, r2.right()-2, r2.bottom()-1 );
+ p->fillRect( QRect( r2.left()+1, r2.top()+1, r2.width()-2, r2.height()-3),
+ tb->palette().normal().brush( QColorGroup::Button ));
+ }
+
+ p->setPen( cg.dark() );
+ p->drawLine( r2.right(), r2.top(),
+ r2.right(), r2.bottom() - 2 );
+ p->drawPoint( r2.right() - 1, r2.bottom() - 1 );
+ p->drawLine( r2.right() - 2, r2.bottom(),
+ r2.left() + 2, r2.bottom() );
+
+ p->setPen( cg.light() );
+ p->drawLine( r2.left(), r2.top()+1,
+ r2.left(), r2.bottom() - 2 );
+ p->drawPoint( r2.left() + 1, r2.bottom() - 1 );
+ if ( r2.left() == 0 )
+ p->drawPoint( tb->rect().topLeft() );
+
+ } else {
+ QCommonStyle::drawControl( ce, p, widget, r, cg, how, data );
+ }
+ break;
+ }
+ default:
+ QWindowsStyle::drawControl( ce, p, widget, r, cg, how, data );
+ break;
+ }
+}
+
+void QPEStyle::drawComplexControl( ComplexControl control, QPainter *p,
+ const QWidget *widget, const QRect &r,
+ const QColorGroup &cg, SFlags how,
+ SCFlags sub, SCFlags subActive, const QStyleOption &data) const
+{
+ switch ( control ) {
+ case CC_ComboBox:
+ if ( sub & SC_ComboBoxArrow ) {
+ SFlags flags = Style_Default;
+
+ drawPrimitive( PE_ButtonBevel, p, r, cg, flags, data );
+
+ QRect ar =
+ QStyle::visualRect( querySubControlMetrics( CC_ComboBox, widget,
+ SC_ComboBoxArrow ), widget );
+
+ if ( subActive == SC_ComboBoxArrow ) {
+ p->setPen( cg.dark() );
+ p->setBrush( cg.brush( QColorGroup::Button ) );
+ p->drawRect( ar );
+ }
+
+ ar.addCoords( 2, 2, -2, -2 );
+ if ( widget->isEnabled() )
+ flags |= Style_Enabled;
+
+ if ( subActive & Style_Sunken ) {
+ flags |= Style_Sunken;
+ }
+ drawPrimitive( PE_ArrowDown, p, ar, cg, flags );
+ }
+
+ if ( sub & SC_ComboBoxEditField ) {
+ const QComboBox * cb = (const QComboBox *) widget;
+ QRect re =
+ QStyle::visualRect( querySubControlMetrics( CC_ComboBox, widget,
+ SC_ComboBoxEditField ), widget );
+ if ( cb->hasFocus() && !cb->editable() )
+ p->fillRect( re.x(), re.y(), re.width(), re.height(),
+ cg.brush( QColorGroup::Highlight ) );
+
+ if ( cb->hasFocus() ) {
+ p->setPen( cg.highlightedText() );
+ p->setBackgroundColor( cg.highlight() );
+
+ } else {
+ p->setPen( cg.text() );
+ p->setBackgroundColor( cg.background() );
+ }
+
+ if ( cb->hasFocus() && !cb->editable() ) {
+ QRect re =
+ QStyle::visualRect( subRect( SR_ComboBoxFocusRect, cb ), widget );
+ drawPrimitive( PE_FocusRect, p, re, cg, Style_FocusAtBorder, QStyleOption(cg.highlight()));
+ }
+ }
+ break;
+ default:
+ QWindowsStyle::drawComplexControl( control, p, widget, r, cg, how,
+ sub, subActive, data );
+ break;
+ }
+}
+
+int QPEStyle::pixelMetric( PixelMetric metric, const QWidget *widget ) const
+{
+ int ret;
+ switch( metric ) {
+ case PM_ButtonMargin:
+ ret = 2;
+ break;
+ case PM_DefaultFrameWidth:
+ ret = 1;
+ break;
+ case PM_ButtonDefaultIndicator:
+ ret = 2;
+ break;
+ case PM_ButtonShiftHorizontal:
+ case PM_ButtonShiftVertical:
+ ret = -1;
+ break;
+ case PM_IndicatorWidth:
+ ret = 15;
+ break;
+ case PM_IndicatorHeight:
+ ret = 13;
+ break;
+ case PM_ExclusiveIndicatorHeight:
+ case PM_ExclusiveIndicatorWidth:
+ ret = 15;
+ break;
+ case PM_ScrollBarExtent:
+ ret = 13;
+ break;
+ case PM_SliderLength:
+ ret = 12;
+ break;
+ default:
+ ret = QWindowsStyle::pixelMetric( metric, widget );
+ break;
+ }
+ return ret;
+}
+
+QSize QPEStyle::sizeFromContents( ContentsType contents, const QWidget *widget,
+ const QSize &contentsSize, const QStyleOption &data) const
+{
+ QSize sz(contentsSize);
+
+ switch ( contents ) {
+ case CT_PopupMenuItem:
+ {
+ if ( !widget || data.isDefault() )
+ break;
+ sz = QWindowsStyle::sizeFromContents( contents, widget, contentsSize, data );
+ sz = QSize( sz.width(), sz.height()-2 );
+ break;
+ }
+ default:
+ sz = QWindowsStyle::sizeFromContents( contents, widget, contentsSize, data );
+ break;
+ }
+
+ return sz;
+}
+
+#else
+
+#include <qfontmetrics.h>
+#include <qpalette.h>
+#include <qdrawutil.h>
+#include <qscrollbar.h>
+#include <qbutton.h>
+#include <qframe.h>
+#include <qtabbar.h>
+
+#define INCLUDE_MENUITEM_DEF
+#include <qmenudata.h>
+
+QPEStyle::QPEStyle()
+{
+#if QT_VERSION < 300
+ setButtonMargin(buttonMargin());
+ setScrollBarExtent(scrollBarExtent().width(),scrollBarExtent().height());
+#endif
+}
+
+QPEStyle::~QPEStyle()
+{
+}
+
+int QPEStyle::buttonMargin() const
+{
+ return 2;
+}
+
+QSize QPEStyle::scrollBarExtent() const
+{
+ return QSize(13,13);
+}
+
+void QPEStyle::polish ( QPalette & )
+{
+}
+
+void QPEStyle::polish( QWidget *w )
+{
+ if ( w->inherits( "QListBox" ) ||
+ w->inherits( "QListView" ) ||
+ w->inherits( "QPopupMenu" ) ||
+ w->inherits( "QSpinBox" ) ) {
+ QFrame *f = (QFrame *)w;
+ f->setFrameShape( QFrame::StyledPanel );
+ f->setLineWidth( 1 );
+ }
+}
+
+void QPEStyle::unPolish( QWidget *w )
+{
+ if ( w->inherits( "QListBox" ) ||
+ w->inherits( "QListView" ) ||
+ w->inherits( "QPopupMenu" ) ||
+ w->inherits( "QSpinBox" ) ) {
+ QFrame *f = (QFrame *)w;
+ f->setFrameShape( QFrame::StyledPanel );
+ f->setLineWidth( 2 );
+ }
+}
+
+int QPEStyle::defaultFrameWidth() const
+{
+ return 1;
+}
+
+void QPEStyle::drawPanel ( QPainter * p, int x, int y, int w, int h,
+ const QColorGroup &g, bool sunken, int lineWidth, const QBrush * fill )
+{
+ qDrawShadePanel( p, QRect(x, y, w, h), g, sunken, lineWidth, fill );
+}
+
+void QPEStyle::drawButton( QPainter *p, int x, int y, int w, int h,
+ const QColorGroup &g, bool sunken, const QBrush* fill )
+{
+ QPen oldPen = p->pen();
+ if ( sunken )
+ p->setPen( g.dark() );
+ else
+ p->setPen( g.light() );
+
+ int x2 = x+w-1;
+ int y2 = y+h-1;
+
+ p->drawLine( x, y, x, y2 );
+ p->drawLine( x, y, x2, y );
+
+ if ( sunken )
+ p->setPen( g.light() );
+ else
+ p->setPen( g.dark() );
+
+ p->drawLine( x2, y, x2, y2 );
+ p->drawLine( x, y2, x2, y2 );
+ p->setPen( oldPen );
+
+ p->fillRect( x+1, y+1, w-2, h-2, fill?(*fill):g.brush(QColorGroup::Button) );
+}
+
+void QPEStyle::drawButtonMask ( QPainter * p, int x, int y, int w, int h )
+{
+ p->fillRect( x, y, w, h, color1 );
+}
+
+void QPEStyle::drawBevelButton( QPainter *p, int x, int y, int w, int h,
+ const QColorGroup &g, bool sunken, const QBrush* fill )
+{
+ drawButton( p, x, y, w, h, g, sunken, fill );
+}
+
+QRect QPEStyle::comboButtonRect( int x, int y, int w, int h)
+{
+ return QRect(x+1, y+1, w-2-14, h-2);
+}
+
+
+QRect QPEStyle::comboButtonFocusRect( int x, int y, int w, int h)
+{
+ return QRect(x+2, y+2, w-4-14, h-4);
+}
+
+void QPEStyle::drawComboButton( QPainter *p, int x, int y, int w, int h,
+ const QColorGroup &g, bool sunken,
+ bool /*editable*/,
+ bool enabled,
+ const QBrush *fill )
+{
+ drawBevelButton( p, x, y, w, h, g, FALSE, fill );
+ drawBevelButton( p, x+w-14, y, 14, h, g, sunken, fill );
+ drawArrow( p, QStyle::DownArrow, sunken,
+ x+w-14+ 2, y+ 2, 14- 4, h- 4, g, enabled,
+ &g.brush( QColorGroup::Button ) );
+
+}
+
+
+void QPEStyle::drawExclusiveIndicator ( QPainter * p, int x, int y, int w,
+ int h, const QColorGroup & g, bool on, bool down, bool enabled )
+{
+ static const QCOORD pts1[] = { // dark lines
+ 1,9, 1,8, 0,7, 0,4, 1,3, 1,2, 2,1, 3,1, 4,0, 7,0, 8,1, 9,1 };
+ static const QCOORD pts4[] = { // white lines
+ 2,10, 3,10, 4,11, 7,11, 8,10, 9,10, 10,9, 10,8, 11,7,
+ 11,4, 10,3, 10,2 };
+ static const QCOORD pts5[] = { // inner fill
+ 4,2, 7,2, 9,4, 9,7, 7,9, 4,9, 2,7, 2,4 };
+
+ p->eraseRect( x, y, w, h );
+ QPointArray a( QCOORDARRLEN(pts1), pts1 );
+ a.translate( x, y );
+ p->setPen( g.dark() );
+ p->drawPolyline( a );
+ a.setPoints( QCOORDARRLEN(pts4), pts4 );
+ a.translate( x, y );
+ p->setPen( g.light() );
+ p->drawPolyline( a );
+ a.setPoints( QCOORDARRLEN(pts5), pts5 );
+ a.translate( x, y );
+ QColor fillColor = ( down || !enabled ) ? g.button() : g.base();
+ p->setPen( fillColor );
+ p->setBrush( fillColor ) ;
+ p->drawPolygon( a );
+ if ( on ) {
+ p->setPen( NoPen );
+ p->setBrush( g.text() );
+ p->drawRect( x+5, y+4, 2, 4 );
+ p->drawRect( x+4, y+5, 4, 2 );
+ }
+}
+
+void QPEStyle::drawIndicator ( QPainter * p, int x, int y, int w, int h,
+ const QColorGroup & g, int state, bool down, bool enabled )
+{
+
+ QBrush fill;
+ if ( state == QButton::NoChange ) {
+ QBrush b = p->brush();
+ QColor c = p->backgroundColor();
+ p->setBackgroundMode( TransparentMode );
+ p->setBackgroundColor( green );
+ fill = QBrush(g.base(), Dense4Pattern);
+ p->setBackgroundColor( c );
+ p->setBrush( b );
+ } else if ( down )
+ fill = g.brush( QColorGroup::Button );
+ else
+ fill = g.brush( enabled ? QColorGroup::Base : QColorGroup::Background );
+ drawPanel( p, x, y, w, h, g, TRUE, 1, &fill );
+ if ( state != QButton::Off ) {
+ QPointArray a( 7*2 );
+ int i, xx, yy;
+ xx = x+3;
+ yy = y+5;
+ for ( i=0; i<3; i++ ) {
+ a.setPoint( 2*i, xx, yy );
+ a.setPoint( 2*i+1, xx, yy+2 );
+ xx++; yy++;
+ }
+ yy -= 2;
+ for ( i=3; i<7; i++ ) {
+ a.setPoint( 2*i, xx, yy );
+ a.setPoint( 2*i+1, xx, yy+2 );
+ xx++; yy--;
+ }
+ if ( state == QButton::NoChange ) {
+ p->setPen( g.dark() );
+ } else {
+ p->setPen( g.text() );
+ }
+ p->drawLineSegments( a );
+ }
+}
+
+#define HORIZONTAL (sb->orientation() == QScrollBar::Horizontal)
+#define VERTICAL !HORIZONTAL
+#define MOTIF_BORDER 2
+#define SLIDER_MIN 9 // ### motif says 6 but that's too small
+
+/*! \reimp */
+
+void QPEStyle::scrollBarMetrics( const QScrollBar* sb, int &sliderMin, int &sliderMax, int &sliderLength, int& buttonDim )
+{
+ int maxLength;
+ int length = HORIZONTAL ? sb->width() : sb->height();
+ int extent = HORIZONTAL ? sb->height() : sb->width();
+
+ if ( length > (extent - 1)*2 )
+ buttonDim = extent;
+ else
+ buttonDim = length/2 - 1;
+
+ sliderMin = 0;
+ maxLength = length - buttonDim*2;
+
+ if ( sb->maxValue() == sb->minValue() ) {
+ sliderLength = maxLength;
+ } else {
+ sliderLength = (sb->pageStep()*maxLength)/
+ (sb->maxValue()-sb->minValue()+sb->pageStep());
+ uint range = sb->maxValue()-sb->minValue();
+ if ( sliderLength < SLIDER_MIN || range > INT_MAX/2 )
+ sliderLength = SLIDER_MIN;
+ if ( sliderLength > maxLength )
+ sliderLength = maxLength;
+ }
+
+ sliderMax = sliderMin + maxLength - sliderLength;
+}
+
+/*!\reimp
+ */
+QStyle::ScrollControl QPEStyle::scrollBarPointOver( const QScrollBar* sb, int sliderStart, const QPoint& p )
+{
+ if ( !sb->rect().contains( p ) )
+ return NoScroll;
+ int sliderMin, sliderMax, sliderLength, buttonDim, pos;
+ scrollBarMetrics( sb, sliderMin, sliderMax, sliderLength, buttonDim );
+
+ if (sb->orientation() == QScrollBar::Horizontal)
+ pos = p.x();
+ else
+ pos = p.y();
+
+ if (pos < sliderStart)
+ return SubPage;
+ if (pos < sliderStart + sliderLength)
+ return Slider;
+ if (pos < sliderMax + sliderLength)
+ return AddPage;
+ if (pos < sliderMax + sliderLength + buttonDim)
+ return SubLine;
+ return AddLine;
+}
+
+/*! \reimp */
+
+void QPEStyle::drawScrollBarControls( QPainter* p, const QScrollBar* sb, int sliderStart, uint controls, uint activeControl )
+{
+#define ADD_LINE_ACTIVE ( activeControl == AddLine )
+#define SUB_LINE_ACTIVE ( activeControl == SubLine )
+ QColorGroup g = sb->colorGroup();
+
+ int sliderMin, sliderMax, sliderLength, buttonDim;
+ scrollBarMetrics( sb, sliderMin, sliderMax, sliderLength, buttonDim );
+
+ if ( controls == (AddLine | SubLine | AddPage | SubPage | Slider | First | Last ) )
+ p->fillRect( 0, 0, sb->width(), sb->height(), g.brush( QColorGroup::Mid ));
+
+ if (sliderStart > sliderMax) { // sanity check
+ sliderStart = sliderMax;
+ }
+
+ int dimB = buttonDim;
+ QRect addB;
+ QRect subB;
+ QRect addPageR;
+ QRect subPageR;
+ QRect sliderR;
+ int addX, addY, subX, subY;
+ int length = HORIZONTAL ? sb->width() : sb->height();
+ int extent = HORIZONTAL ? sb->height() : sb->width();
+
+ if ( HORIZONTAL ) {
+ subY = addY = ( extent - dimB ) / 2;
+ subX = length - dimB - dimB;
+ addX = length - dimB;
+ } else {
+ subX = addX = ( extent - dimB ) / 2;
+ subY = length - dimB - dimB;
+ addY = length - dimB;
+ }
+
+ int sliderEnd = sliderStart + sliderLength;
+ int sliderW = extent;
+ if ( HORIZONTAL ) {
+ subB.setRect( subX,subY+1,dimB,dimB-1 );
+ addB.setRect( addX,addY+1,dimB,dimB-1 );
+
+ subPageR.setRect( 0, 0,
+ sliderStart+1, sliderW );
+ addPageR.setRect( sliderEnd-1, 0, subX - sliderEnd+1, sliderW );
+ sliderR .setRect( sliderStart, 1, sliderLength, sliderW-1 );
+
+ } else {
+ subB.setRect( subX+1,subY,dimB-1,dimB );
+ addB.setRect( addX+1,addY,dimB-1,dimB );
+
+ subPageR.setRect( 0, 0, sliderW,
+ sliderStart+1 );
+ addPageR.setRect( 0, sliderEnd-1, sliderW, subY - sliderEnd+1 );
+ sliderR .setRect( 1, sliderStart, sliderW-1, sliderLength );
+ }
+
+ bool maxedOut = (sb->maxValue() == sb->minValue());
+ if ( controls & AddLine ) {
+ drawBevelButton( p, addB.x(), addB.y(),
+ addB.width(), addB.height(), g,
+ ADD_LINE_ACTIVE);
+ p->setPen(g.shadow());
+ drawArrow( p, VERTICAL ? DownArrow : RightArrow,
+ FALSE, addB.x()+2, addB.y()+2,
+ addB.width()-4, addB.height()-4, g, !maxedOut,
+ &g.brush( QColorGroup::Button ));
+ }
+ if ( controls & SubLine ) {
+ drawBevelButton( p, subB.x(), subB.y(),
+ subB.width(), subB.height(), g,
+ SUB_LINE_ACTIVE );
+ p->setPen(g.shadow());
+ drawArrow( p, VERTICAL ? UpArrow : LeftArrow,
+ FALSE, subB.x()+2, subB.y()+2,
+ subB.width()-4, subB.height()-4, g, !maxedOut,
+ &g.brush( QColorGroup::Button ));
+ }
+
+
+ if ( controls & SubPage )
+ p->fillRect( subPageR.x(), subPageR.y(), subPageR.width(),
+ subPageR.height(), g.brush( QColorGroup::Mid ));
+ if ( controls & AddPage )
+ p->fillRect( addPageR.x(), addPageR.y(), addPageR.width(),
+ addPageR.height(), g.brush( QColorGroup::Mid ));
+ if ( controls & Slider ) {
+ QPoint bo = p->brushOrigin();
+ p->setBrushOrigin(sliderR.topLeft());
+ drawBevelButton( p, sliderR.x(), sliderR.y(),
+ sliderR.width(), sliderR.height(), g,
+ FALSE, &g.brush( QColorGroup::Button ) );
+ p->setBrushOrigin(bo);
+ drawRiffles( p, sliderR.x(), sliderR.y(),
+ sliderR.width(), sliderR.height(), g, HORIZONTAL );
+ }
+
+ // ### perhaps this should not be able to accept focus if maxedOut?
+ if ( sb->hasFocus() && (controls & Slider) )
+ p->drawWinFocusRect( sliderR.x()+2, sliderR.y()+2,
+ sliderR.width()-5, sliderR.height()-5,
+ sb->backgroundColor() );
+
+}
+
+void QPEStyle::drawRiffles( QPainter* p, int x, int y, int w, int h,
+ const QColorGroup &g, bool horizontal )
+{
+ if (!horizontal) {
+ if (h > 20) {
+ y += (h-20)/2 ;
+ h = 20;
+ }
+ if (h > 12) {
+ int n = 3;
+ int my = y+h/2-4;
+ int i ;
+ p->setPen(g.light());
+ for (i=0; i<n; i++) {
+ p->drawLine(x+2, my+3*i, x+w-4, my+3*i);
+ }
+ p->setPen(g.dark());
+ my++;
+ for (i=0; i<n; i++) {
+ p->drawLine(x+2, my+3*i, x+w-4, my+3*i);
+ }
+ }
+ }
+ else {
+ if (w > 20) {
+ x += (w-20)/2 ;
+ w = 20;
+ }
+ if (w > 12) {
+ int n = 3;
+ int mx = x+w/2-4;
+ int i ;
+ p->setPen(g.light());
+ for (i=0; i<n; i++) {
+ p->drawLine(mx+3*i, y+2, mx + 3*i, y+h-4);
+ }
+ p->setPen(g.dark());
+ mx++;
+ for (i=0; i<n; i++) {
+ p->drawLine(mx+3*i, y+2, mx + 3*i, y+h-4);
+ }
+ }
+ }
+}
+
+int QPEStyle::sliderLength() const
+{
+ return 12;
+}
+
+void QPEStyle::drawSlider( QPainter *p, int x, int y, int w, int h,
+ const QColorGroup &g, Orientation o, bool tickAbove, bool tickBelow )
+{
+ int a = tickAbove ? 3 : 0;
+ int b = tickBelow ? 3 : 0;
+
+ if ( o == Horizontal ) {
+ drawBevelButton( p, x, y+a, w, h-a-b, g, FALSE, &g.brush( QColorGroup::Button ) );
+ int xp = x + w/2;
+ qDrawShadeLine( p, xp, y+a+2, xp, y+h-b-3, g );
+ } else {
+ drawBevelButton( p, x+a, y, w-a-b, h, g, FALSE, &g.brush( QColorGroup::Button ) );
+ int yp = y + h/2;
+ qDrawShadeLine( p, x+a+2, yp, x+w-b-3, yp, g );
+ }
+}
+
+void QPEStyle::drawSliderMask ( QPainter * p, int x, int y, int w, int h,
+ Orientation o, bool tickAbove, bool tickBelow )
+{
+ int a = tickAbove ? 3 : 0;
+ int b = tickBelow ? 3 : 0;
+ if ( o == Horizontal )
+ p->fillRect( x, y+a, w, h-a-b, color1 );
+ else
+ p->fillRect( x+a, y, w-a-b, h, color1 );
+}
+
+/*!\reimp
+ */
+void QPEStyle::drawSliderGrooveMask( QPainter *p,
+ int x, int y, int w, int h,
+ const QColorGroup& , QCOORD c,
+ Orientation orient )
+{
+ if ( orient == Horizontal )
+ p->fillRect( x, y + c - 2, w, 4, color1 );
+ else
+ p->fillRect( x + c - 2, y, 4, h, color1 );
+}
+
+void QPEStyle::drawTab( QPainter *p, const QTabBar *tb, QTab *t, bool selected )
+{
+ QRect r( t->rect() );
+ if ( tb->shape() == QTabBar::RoundedAbove ) {
+ p->setPen( tb->colorGroup().light() );
+ p->drawLine( r.left(), r.bottom(), r.right(), r.bottom() );
+ if ( r.left() == 0 )
+ p->drawPoint( tb->rect().bottomLeft() );
+ else {
+ p->setPen( tb->colorGroup().light() );
+ p->drawLine( r.left(), r.bottom(), r.right(), r.bottom() );
+ }
+
+ if ( selected ) {
+ p->setPen( tb->colorGroup().background() );
+ p->drawLine( r.left()+2, r.top()+1, r.right()-2, r.top()+1 );
+ p->fillRect( QRect( r.left()+1, r.top()+2, r.width()-2, r.height()-2),
+ tb->colorGroup().brush( QColorGroup::Background ));
+ } else {
+ r.setRect( r.left() + 2, r.top() + 2,
+ r.width() - 4, r.height() - 2 );
+ p->setPen( tb->colorGroup().button() );
+ p->drawLine( r.left()+2, r.top()+1, r.right()-2, r.top()+1 );
+ p->fillRect( QRect( r.left()+1, r.top()+2, r.width()-2, r.height()-3),
+ tb->colorGroup().brush( QColorGroup::Button ));
+
+ //do shading; will not work for pixmap brushes
+ QColor bg = tb->colorGroup().button();
+ // int h,s,v;
+ // bg.hsv( &h, &s, &v );
+ int n = r.height()/2;
+ int dark = 100;
+ for ( int i = 1; i < n; i++ ) {
+ dark = (dark * (100+(i*15)/n) )/100;
+ p->setPen( bg.dark( dark ) );
+ int y = r.bottom()-n+i;
+ int x1 = r.left()+1;
+ int x2 = r.right()-1;
+ p->drawLine( x1, y, x2, y );
+ }
+ }
+
+ p->setPen( tb->colorGroup().light() );
+ p->drawLine( r.left(), r.bottom()-1, r.left(), r.top() + 2 );
+ p->drawPoint( r.left()+1, r.top() + 1 );
+ p->drawLine( r.left()+2, r.top(),
+ r.right() - 2, r.top() );
+
+ p->setPen( tb->colorGroup().dark() );
+ p->drawPoint( r.right() - 1, r.top() + 1 );
+ p->drawLine( r.right(), r.top() + 2, r.right(), r.bottom() - 1);
+ } else if ( tb->shape() == QTabBar::RoundedBelow ) {
+ if ( selected ) {
+ p->setPen( tb->colorGroup().background() );
+ p->drawLine( r.left()+2, r.bottom()-1, r.right()-2, r.bottom()-1 );
+ p->fillRect( QRect( r.left()+1, r.top(), r.width()-2, r.height()-2),
+ tb->palette().normal().brush( QColorGroup::Background ));
+ } else {
+ p->setPen( tb->colorGroup().dark() );
+ p->drawLine( r.left(), r.top(),
+ r.right(), r.top() );
+ r.setRect( r.left() + 2, r.top(),
+ r.width() - 4, r.height() - 2 );
+ p->setPen( tb->colorGroup().button() );
+ p->drawLine( r.left()+2, r.bottom()-1, r.right()-2, r.bottom()-1 );
+ p->fillRect( QRect( r.left()+1, r.top()+1, r.width()-2, r.height()-3),
+ tb->palette().normal().brush( QColorGroup::Button ));
+ }
+
+ p->setPen( tb->colorGroup().dark() );
+ p->drawLine( r.right(), r.top(),
+ r.right(), r.bottom() - 2 );
+ p->drawPoint( r.right() - 1, r.bottom() - 1 );
+ p->drawLine( r.right() - 2, r.bottom(),
+ r.left() + 2, r.bottom() );
+
+ p->setPen( tb->colorGroup().light() );
+ p->drawLine( r.left(), r.top()+1,
+ r.left(), r.bottom() - 2 );
+ p->drawPoint( r.left() + 1, r.bottom() - 1 );
+ if ( r.left() == 0 )
+ p->drawPoint( tb->rect().topLeft() );
+
+ } else {
+ QCommonStyle::drawTab( p, tb, t, selected );
+ }
+}
+
+static const int motifItemFrame = 0; // menu item frame width
+static const int motifSepHeight = 2; // separator item height
+static const int motifItemHMargin = 1; // menu item hor text margin
+static const int motifItemVMargin = 2; // menu item ver text margin
+static const int motifArrowHMargin = 0; // arrow horizontal margin
+static const int motifTabSpacing = 12; // space between text and tab
+static const int motifCheckMarkHMargin = 1; // horiz. margins of check mark
+static const int windowsRightBorder = 8; // right border on windows
+static const int windowsCheckMarkWidth = 2; // checkmarks width on windows
+
+/*! \reimp
+*/
+int QPEStyle::extraPopupMenuItemWidth( bool checkable, int maxpmw, QMenuItem* mi, const QFontMetrics& /*fm*/ )
+{
+#ifndef QT_NO_MENUDATA
+ int w = 2*motifItemHMargin + 2*motifItemFrame; // a little bit of border can never harm
+
+ if ( mi->isSeparator() )
+ return 10; // arbitrary
+ else if ( mi->pixmap() )
+ w += mi->pixmap()->width(); // pixmap only
+
+ if ( !mi->text().isNull() ) {
+ if ( mi->text().find('\t') >= 0 ) // string contains tab
+ w += motifTabSpacing;
+ }
+
+ if ( maxpmw ) { // we have iconsets
+ w += maxpmw;
+ w += 6; // add a little extra border around the iconset
+ }
+
+ if ( checkable && maxpmw < windowsCheckMarkWidth ) {
+ w += windowsCheckMarkWidth - maxpmw; // space for the checkmarks
+ }
+
+ if ( maxpmw > 0 || checkable ) // we have a check-column ( iconsets or checkmarks)
+ w += motifCheckMarkHMargin; // add space to separate the columns
+
+ w += windowsRightBorder; // windows has a strange wide border on the right side
+
+ return w;
+#endif
+}
+
+/*! \reimp
+*/
+int QPEStyle::popupMenuItemHeight( bool /*checkable*/, QMenuItem* mi, const QFontMetrics& fm )
+{
+#ifndef QT_NO_MENUDATA
+ int h = 0;
+ if ( mi->isSeparator() ) // separator height
+ h = motifSepHeight;
+ else if ( mi->pixmap() ) // pixmap height
+ h = mi->pixmap()->height() + 2*motifItemFrame;
+ else // text height
+ h = fm.height() + 2*motifItemVMargin + 2*motifItemFrame - 1;
+
+ if ( !mi->isSeparator() && mi->iconSet() != 0 ) {
+ h = QMAX( h, mi->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).height() + 2*motifItemFrame );
+ }
+ if ( mi->custom() )
+ h = QMAX( h, mi->custom()->sizeHint().height() + 2*motifItemVMargin + 2*motifItemFrame ) - 1;
+ return h;
+#endif
+}
+
+void QPEStyle::drawPopupMenuItem( QPainter* p, bool checkable, int maxpmw, int tab, QMenuItem* mi,
+ const QPalette& pal,
+ bool act, bool enabled, int x, int y, int w, int h)
+{
+#ifndef QT_NO_MENUDATA
+ const QColorGroup & g = pal.active();
+ bool dis = !enabled;
+ QColorGroup itemg = dis ? pal.disabled() : pal.active();
+
+ if ( checkable )
+ maxpmw = QMAX( maxpmw, 8 ); // space for the checkmarks
+
+ int checkcol = maxpmw;
+
+ if ( mi && mi->isSeparator() ) { // draw separator
+ p->setPen( g.dark() );
+ p->drawLine( x, y, x+w, y );
+ p->setPen( g.light() );
+ p->drawLine( x, y+1, x+w, y+1 );
+ return;
+ }
+
+ QBrush fill = act? g.brush( QColorGroup::Highlight ) :
+ g.brush( QColorGroup::Button );
+ p->fillRect( x, y, w, h, fill);
+
+ if ( !mi )
+ return;
+
+ if ( mi->isChecked() ) {
+ if ( act && !dis ) {
+ qDrawShadePanel( p, x, y, checkcol, h,
+ g, TRUE, 1, &g.brush( QColorGroup::Button ) );
+ } else {
+ qDrawShadePanel( p, x, y, checkcol, h,
+ g, TRUE, 1, &g.brush( QColorGroup::Midlight ) );
+ }
+ } else if ( !act ) {
+ p->fillRect(x, y, checkcol , h,
+ g.brush( QColorGroup::Button ));
+ }
+
+ if ( mi->iconSet() ) { // draw iconset
+ QIconSet::Mode mode = dis ? QIconSet::Disabled : QIconSet::Normal;
+ if (act && !dis )
+ mode = QIconSet::Active;
+ QPixmap pixmap = mi->iconSet()->pixmap( QIconSet::Small, mode );
+ int pixw = pixmap.width();
+ int pixh = pixmap.height();
+ if ( act && !dis ) {
+ if ( !mi->isChecked() )
+ qDrawShadePanel( p, x, y, checkcol, h, g, FALSE, 1, &g.brush( QColorGroup::Button ) );
+ }
+ QRect cr( x, y, checkcol, h );
+ QRect pmr( 0, 0, pixw, pixh );
+ pmr.moveCenter( cr.center() );
+ p->setPen( itemg.text() );
+ p->drawPixmap( pmr.topLeft(), pixmap );
+
+ QBrush fill = act? g.brush( QColorGroup::Highlight ) :
+ g.brush( QColorGroup::Button );
+ p->fillRect( x+checkcol + 1, y, w - checkcol - 1, h, fill);
+ } else if ( checkable ) { // just "checking"...
+ int mw = checkcol + motifItemFrame;
+ int mh = h - 2*motifItemFrame;
+ if ( mi->isChecked() ) {
+ drawCheckMark( p, x + motifItemFrame + 2,
+ y+motifItemFrame, mw, mh, itemg, act, dis );
+ }
+ }
+
+ p->setPen( act ? g.highlightedText() : g.buttonText() );
+
+ QColor discol;
+ if ( dis ) {
+ discol = itemg.text();
+ p->setPen( discol );
+ }
+
+ int xm = motifItemFrame + checkcol + motifItemHMargin;
+
+ if ( mi->custom() ) {
+ int m = motifItemVMargin;
+ p->save();
+ if ( dis && !act ) {
+ p->setPen( g.light() );
+ mi->custom()->paint( p, itemg, act, enabled,
+ x+xm+1, y+m+1, w-xm-tab+1, h-2*m );
+ p->setPen( discol );
+ }
+ mi->custom()->paint( p, itemg, act, enabled,
+ x+xm, y+m, w-xm-tab+1, h-2*m );
+ p->restore();
+ }
+ QString s = mi->text();
+ if ( !s.isNull() ) { // draw text
+ int t = s.find( '\t' );
+ int m = motifItemVMargin;
+ const int text_flags = AlignVCenter|ShowPrefix | DontClip | SingleLine;
+ if ( t >= 0 ) { // draw tab text
+ if ( dis && !act ) {
+ p->setPen( g.light() );
+ p->drawText( x+w-tab-windowsRightBorder-motifItemHMargin-motifItemFrame+1,
+ y+m+1, tab, h-2*m, text_flags, s.mid( t+1 ));
+ p->setPen( discol );
+ }
+ p->drawText( x+w-tab-windowsRightBorder-motifItemHMargin-motifItemFrame,
+ y+m, tab, h-2*m, text_flags, s.mid( t+1 ) );
+ }
+ if ( dis && !act ) {
+ p->setPen( g.light() );
+ p->drawText( x+xm+1, y+m+1, w-xm+1, h-2*m, text_flags, s, t );
+ p->setPen( discol );
+ }
+ p->drawText( x+xm, y+m, w-xm-tab+1, h-2*m, text_flags, s, t );
+ } else if ( mi->pixmap() ) { // draw pixmap
+ QPixmap *pixmap = mi->pixmap();
+ if ( pixmap->depth() == 1 )
+ p->setBackgroundMode( OpaqueMode );
+ p->drawPixmap( x+xm, y+motifItemFrame, *pixmap );
+ if ( pixmap->depth() == 1 )
+ p->setBackgroundMode( TransparentMode );
+ }
+ if ( mi->popup() ) { // draw sub menu arrow
+ int dim = (h-2*motifItemFrame) / 2;
+ if ( act ) {
+ if ( !dis )
+ discol = white;
+ QColorGroup g2( discol, g.highlight(),
+ white, white,
+ dis ? discol : white,
+ discol, white );
+ drawArrow( p, RightArrow, FALSE,
+ x+w - motifArrowHMargin - motifItemFrame - dim, y+h/2-dim/2,
+ dim, dim, g2, TRUE );
+ } else {
+ drawArrow( p, RightArrow,
+ FALSE,
+ x+w - motifArrowHMargin - motifItemFrame - dim, y+h/2-dim/2,
+ dim, dim, g, mi->isEnabled() );
+ }
+ }
+#endif
+}
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QPESTYLE_H
+#define QPESTYLE_H
+
+#ifndef QT_H
+#include "qwindowsstyle.h"
+#endif // QT_H
+
+#if QT_VERSION >= 300
+
+class Q_EXPORT QPEStyle : public QWindowsStyle
+{
+public:
+ QPEStyle();
+ virtual ~QPEStyle();
+
+ virtual void drawPrimitive( PrimitiveElement pe, QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags=Style_Default, const QStyleOption & = QStyleOption::Default) const;
+ 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;
+ 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;
+ virtual int pixelMetric( PixelMetric metric, const QWidget *widget=0 ) const;
+ virtual QSize sizeFromContents( ContentsType contents, const QWidget *widget, const QSize &contentsSize, const QStyleOption & = QStyleOption::Default) const;
+};
+
+#else
+
+class Q_EXPORT QPEStyle : public QWindowsStyle
+{
+public:
+ QPEStyle();
+ virtual ~QPEStyle();
+ virtual void polish( QPalette &p );
+ virtual void polish( QWidget *w );
+ virtual void unPolish( QWidget *w );
+
+ int defaultFrameWidth () const;
+ void drawPanel ( QPainter * p, int x, int y, int w, int h,
+ const QColorGroup &, bool sunken=FALSE, int lineWidth = 1, const QBrush * fill = 0 );
+ void drawButton( QPainter *p, int x, int y, int w, int h,
+ const QColorGroup &g, bool sunken, const QBrush* fill );
+ void drawButtonMask ( QPainter * p, int x, int y, int w, int h );
+ void drawBevelButton( QPainter *p, int x, int y, int w, int h,
+ const QColorGroup &g, bool sunken=FALSE, const QBrush* fill=0 );
+ QRect comboButtonRect( int x, int y, int w, int h);
+ QRect comboButtonFocusRect( int x, int y, int w, int h);
+ void drawComboButton( QPainter *p, int x, int y, int w, int h,
+ const QColorGroup &g, bool sunken, bool, bool enabled,
+ const QBrush *fill );
+ void drawExclusiveIndicator ( QPainter * p, int x, int y, int w, int h,
+ const QColorGroup & g, bool on, bool down = FALSE, bool enabled = TRUE );
+ void drawIndicator ( QPainter * p, int x, int y, int w, int h,
+ const QColorGroup & g, int state, bool down = FALSE, bool enabled = TRUE );
+ void scrollBarMetrics( const QScrollBar*, int&, int&, int&, int&);
+ void drawScrollBarControls( QPainter*, const QScrollBar*, int sliderStart, uint controls, uint activeControl );
+ ScrollControl scrollBarPointOver( const QScrollBar* sb, int sliderStart, const QPoint& p );
+ void drawRiffles( QPainter* p, int x, int y, int w, int h,
+ const QColorGroup &g, bool horizontal );
+ int sliderLength() const;
+ void drawSlider( QPainter *p, int x, int y, int w, int h,
+ const QColorGroup &g, Orientation, bool tickAbove, bool tickBelow );
+ void drawSliderMask( QPainter *p, int x, int y, int w, int h,
+ Orientation, bool tickAbove, bool tickBelow );
+ void drawSliderGrooveMask( QPainter *p, int x, int y, int w, int h,
+ const QColorGroup& , QCOORD c, Orientation orient );
+ void drawTab( QPainter *, const QTabBar *, QTab *, bool selected );
+ int extraPopupMenuItemWidth( bool checkable, int maxpmw, QMenuItem*, const QFontMetrics& );
+ int popupMenuItemHeight( bool checkable, QMenuItem*, const QFontMetrics& );
+ void drawPopupMenuItem( QPainter* p, bool checkable, int maxpmw, int tab, QMenuItem* mi,
+ const QPalette& pal,
+ bool act, bool enabled, int x, int y, int w, int h);
+
+ int buttonMargin() const;
+ QSize scrollBarExtent() const;
+
+private: // Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+ QPEStyle( const QPEStyle & );
+ QPEStyle& operator=( const QPEStyle & );
+#endif
+};
+
+#endif
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2001 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "qpetoolbar.h"
+#include "qpemenubar.h"
+#include <qtoolbutton.h>
+
+/*!
+ \class QPEToolBar qpemenubar.h
+ \brief The QPEToolBar class is obsolete. Use QToolBar instead.
+
+ \obsolete
+
+ The QPEToolBar class is obsolete. Use QToolBar instead.
+
+ \sa QToolBar
+ */
+
+/*!
+ Constructs a QPEToolBar just as you would construct
+ a QToolBar, passing \a parent and \a name.
+ */
+QPEToolBar::QPEToolBar( QMainWindow *parent, const char *name )
+ : QToolBar( parent, name )
+{
+}
+
+/*!
+ \internal
+*/
+void QPEToolBar::childEvent( QChildEvent *e )
+{
+ QToolBar::childEvent( e );
+}
+
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 @@
+/**********************************************************************
+** Copyright (C) 2001 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QPETOOLBAR_H
+#define QPETOOLBAR_H
+
+#include <qtoolbar.h>
+
+class QMainWindow;
+
+class QPEToolBar : public QToolBar
+{
+ Q_OBJECT
+public:
+ QPEToolBar( QMainWindow *parent = 0, const char *name = 0 );
+
+protected:
+ virtual void childEvent( QChildEvent *e );
+};
+
+#endif
+
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 @@
+/****************************************************************************
+** $Id$
+**
+** Implementation of QProcess class
+**
+** Created : 20000905
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the kernel module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "qprocess.h"
+
+#ifndef QT_NO_PROCESS
+
+#include "qapplication.h"
+
+
+//#define QT_QPROCESS_DEBUG
+
+
+/*!
+ \class QProcess qprocess.h
+
+ \brief The QProcess class is used to start external programs and to
+ communicate with them.
+
+ This is a temporary class. This will be replaced by Qt 3's QProcess class.
+*/
+
+/*!
+ \enum QProcess::Communication
+
+ This enum type defines the communication channels connected to the
+ process.
+
+ \value Stdin Data can be written to the process's standard input.
+
+ \value Stdout Data can be read from the process's standard output.
+
+ \value Stderr Data can be read from the process's standard error.
+
+ \value DupStderr Duplicates standard error to standard output for new
+ processes; i.e. everything that the process writes to standard error, is
+ reported by QProcess on standard output instead. This is especially useful if
+ your application requires that the output on standard output and standard
+ error is read in the same order as the process output it. Please note that
+ this is a binary flag, so if you want to activate this together with standard
+ input, output and error redirection (the default), you have to specify
+ \c{Stdin|Stdout|Stderr|DupStderr} for the setCommunication() call.
+
+ \sa setCommunication() communication()
+*/
+
+/*!
+ Constructs a QProcess object. The \a parent and \a name parameters are passed
+ to the QObject constructor.
+
+ \sa setArguments() addArgument() start()
+*/
+QProcess::QProcess( QObject *parent, const char *name )
+ : QObject( parent, name ), ioRedirection( FALSE ), notifyOnExit( FALSE ),
+ wroteToStdinConnected( FALSE ),
+ readStdoutCalled( FALSE ), readStderrCalled( FALSE ),
+ comms( Stdin|Stdout|Stderr )
+{
+ init();
+}
+
+/*!
+ Constructs a QProcess with \a arg0 as the command to be executed. The
+ \a parent and \a name parameters are passed to the QObject constructor.
+
+ The process is not started. You must call start() or launch()
+ to start the process.
+
+ \sa setArguments() addArgument() start()
+*/
+QProcess::QProcess( const QString& arg0, QObject *parent, const char *name )
+ : QObject( parent, name ), ioRedirection( FALSE ), notifyOnExit( FALSE ),
+ wroteToStdinConnected( FALSE ),
+ readStdoutCalled( FALSE ), readStderrCalled( FALSE ),
+ comms( Stdin|Stdout|Stderr )
+{
+ init();
+ addArgument( arg0 );
+}
+
+/*!
+ Constructs a QProcess with \a args as the arguments of the process. The first
+ element in the list is the command to be executed. The other elements in the
+ list are the arguments to this command. The \a parent and \a name
+ parameters are passed to the QObject constructor.
+
+ The process is not started. You must call start() or launch()
+ to start the process.
+
+ \sa setArguments() addArgument() start()
+*/
+QProcess::QProcess( const QStringList& args, QObject *parent, const char *name )
+ : QObject( parent, name ), ioRedirection( FALSE ), notifyOnExit( FALSE ),
+ wroteToStdinConnected( FALSE ),
+ readStdoutCalled( FALSE ), readStderrCalled( FALSE ),
+ comms( Stdin|Stdout|Stderr )
+{
+ init();
+ setArguments( args );
+}
+
+
+/*!
+ Returns the list of arguments that are set for the process. Arguments can be
+ specified with the constructor or with the functions setArguments() and
+ addArgument().
+
+ \sa setArguments() addArgument()
+*/
+QStringList QProcess::arguments() const
+{
+ return _arguments;
+}
+
+/*!
+ Clears the list of arguments that are set for the process.
+
+ \sa setArguments() addArgument()
+*/
+void QProcess::clearArguments()
+{
+ _arguments.clear();
+}
+
+/*!
+ Sets \a args as the arguments for the process. The first element in the list
+ is the command to be executed. The other elements in the list are the
+ arguments to the command. Any previous arguments are deleted.
+
+ \sa arguments() addArgument()
+*/
+void QProcess::setArguments( const QStringList& args )
+{
+ _arguments = args;
+}
+
+/*!
+ Adds \a arg to the end of the list of arguments.
+
+ The first element in the list of arguments is the command to be
+ executed; the following elements are the arguments to the command.
+
+ \sa arguments() setArguments()
+*/
+void QProcess::addArgument( const QString& arg )
+{
+ _arguments.append( arg );
+}
+
+#ifndef QT_NO_DIR
+/*!
+ Returns the working directory that was set with
+ setWorkingDirectory(), or the current directory if none has been
+ set.
+
+ \sa setWorkingDirectory() QDir::current()
+*/
+QDir QProcess::workingDirectory() const
+{
+ return workingDir;
+}
+
+/*!
+ Sets \a dir as the working directory for a process. This does not affect
+ running processes; only processes that are started afterwards are affected.
+
+ Setting the working directory is especially useful for processes that try to
+ access files with relative filenames.
+
+ \sa workingDirectory() start()
+*/
+void QProcess::setWorkingDirectory( const QDir& dir )
+{
+ workingDir = dir;
+}
+#endif //QT_NO_DIR
+
+/*!
+ Returns the communication required with the process.
+
+ \sa setCommunication()
+*/
+int QProcess::communication() const
+{
+ return comms;
+}
+
+/*!
+ Sets \a commFlags as the communication required with the process.
+
+ \a commFlags is a bitwise OR between the flags defined in \c Communication.
+
+ The default is \c{Stdin|Stdout|Stderr}.
+
+ \sa communication()
+*/
+void QProcess::setCommunication( int commFlags )
+{
+ comms = commFlags;
+}
+
+/*!
+ Returns TRUE if the process has exited normally; otherwise returns
+ FALSE. This implies that this function returns FALSE if the process
+ is still running.
+
+ \sa isRunning() exitStatus() processExited()
+*/
+bool QProcess::normalExit() const
+{
+ // isRunning() has the side effect that it determines the exit status!
+ if ( isRunning() )
+ return FALSE;
+ else
+ return exitNormal;
+}
+
+/*!
+ Returns the exit status of the process or 0 if the process is still
+ running. This function returns immediately and does not wait until
+ the process is finished.
+
+ If normalExit() is FALSE (e.g. if the program was killed or
+ crashed), this function returns 0, so you should check the return
+ value of normalExit() before relying on this value.
+
+ \sa normalExit() processExited()
+*/
+int QProcess::exitStatus() const
+{
+ // isRunning() has the side effect that it determines the exit status!
+ if ( isRunning() )
+ return 0;
+ else
+ return exitStat;
+}
+
+
+/*!
+ Reads the data that the process has written to standard output. When
+ new data is written to standard output, the class emits the signal
+ readyReadStdout().
+
+ If there is no data to read, this function returns a QByteArray of
+ size 0: it does not wait until there is something to read.
+
+ \sa readyReadStdout() readLineStdout() readStderr() writeToStdin()
+*/
+QByteArray QProcess::readStdout()
+{
+ if ( readStdoutCalled ) {
+ return QByteArray();
+ }
+ readStdoutCalled = TRUE;
+
+ QByteArray buf = bufStdout()->copy();
+ consumeBufStdout( -1 ); // consume everything
+
+ readStdoutCalled = FALSE;
+ return buf;
+}
+
+/*!
+ Reads the data that the process has written to standard error. When
+ new data is written to standard error, the class emits the signal
+ readyReadStderr().
+
+ If there is no data to read, this function returns a QByteArray of
+ size 0: it does not wait until there is something to read.
+
+ \sa readyReadStderr() readLineStderr() readStdout() writeToStdin()
+*/
+QByteArray QProcess::readStderr()
+{
+ if ( readStderrCalled ) {
+ return QByteArray();
+ }
+ readStderrCalled = TRUE;
+
+ QByteArray buf = bufStderr()->copy();
+ consumeBufStderr( -1 ); // consume everything
+
+ readStderrCalled = FALSE;
+ return buf;
+}
+
+/*!
+ Returns TRUE if it's possible to read an entire line of text from
+ standard output at this time; otherwise returns FALSE.
+
+ \sa readLineStdout() canReadLineStderr()
+*/
+bool QProcess::canReadLineStdout() const
+{
+ QProcess *that = (QProcess*)this;
+ return that->scanNewline( TRUE, 0 );
+}
+
+/*!
+ Returns TRUE if it's possible to read an entire line of text from
+ standard error at this time; otherwise returns FALSE.
+
+ \sa readLineStderr() canReadLineStdout()
+*/
+bool QProcess::canReadLineStderr() const
+{
+ QProcess *that = (QProcess*)this;
+ return that->scanNewline( FALSE, 0 );
+}
+
+/*!
+ Reads a line of text from standard output, excluding any trailing newline or
+ carriage return characters, and returns it. Returns QString::null if
+ canReadLineStdout() returns FALSE.
+
+ \sa canReadLineStdout() readyReadStdout() readStdout() readLineStderr()
+*/
+QString QProcess::readLineStdout()
+{
+ QByteArray a;
+ QString s;
+ if ( scanNewline( TRUE, &a ) ) {
+ if ( a.isEmpty() )
+ s = "";
+ else
+ s = QString( a );
+ }
+ return s;
+}
+
+/*!
+ Reads a line of text from standard error, excluding any trailing newline or
+ carriage return characters and returns it. Returns QString::null if
+ canReadLineStderr() returns FALSE.
+
+ \sa canReadLineStderr() readyReadStderr() readStderr() readLineStdout()
+*/
+QString QProcess::readLineStderr()
+{
+ QByteArray a;
+ QString s;
+ if ( scanNewline( FALSE, &a ) ) {
+ if ( a.isEmpty() )
+ s = "";
+ else
+ s = QString( a );
+ }
+ return s;
+}
+
+/*!
+ This private function scans for any occurrence of \n or \r\n in the
+ buffer \e buf. It stores the text in the byte array \a store if it is
+ non-null.
+*/
+bool QProcess::scanNewline( bool stdOut, QByteArray *store )
+{
+ QByteArray *buf;
+ if ( stdOut )
+ buf = bufStdout();
+ else
+ buf = bufStderr();
+ uint n = buf->size();
+ uint i;
+ for ( i=0; i<n; i++ ) {
+ if ( buf->at(i) == '\n' ) {
+ break;
+ }
+ }
+ if ( i >= n )
+ return FALSE;
+
+ if ( store ) {
+ uint lineLength = i;
+ if ( lineLength>0 && buf->at(lineLength-1) == '\r' )
+ lineLength--; // (if there are two \r, let one stay)
+ store->resize( lineLength );
+ memcpy( store->data(), buf->data(), lineLength );
+ if ( stdOut )
+ consumeBufStdout( i+1 );
+ else
+ consumeBufStderr( i+1 );
+ }
+ return TRUE;
+}
+
+/*!
+ \fn void QProcess::launchFinished()
+
+ This signal is emitted when the process was started with launch().
+ If the start was successful, this signal is emitted after all the
+ data has been written to standard input. If the start failed, then
+ this signal is emitted immediately.
+
+ \sa launch() QObject::deleteLater()
+*/
+
+/*!
+ Runs the process and writes the data \a buf to the process's standard input.
+ If all the data is written to standard input, standard input is
+ closed. The command is searched for in the path for executable programs;
+ you can also use an absolute path in the command itself.
+
+ If \a env is null, then the process is started with the same environment as
+ the starting process. If \a env is non-null, then the values in the
+ stringlist are interpreted as environment setttings of the form \c
+ {key=value} and the process is started with these environment settings. For
+ convenience, there is a small exception to this rule under Unix: if \a env
+ does not contain any settings for the environment variable \c
+ LD_LIBRARY_PATH, then this variable is inherited from the starting process.
+
+ Returns TRUE if the process could be started; otherwise returns FALSE.
+
+ Note that you should not use the slots writeToStdin() and closeStdin() on
+ processes started with launch(), since the result is not well-defined. If you
+ need these slots, use start() instead.
+
+ The process may or may not read the \a buf data sent to its standard
+ input.
+
+ You can call this function even when a process that was started with
+ this instance is still running. Be aware that if you do this the
+ standard input of the process that was launched first will be
+ closed, with any pending data being deleted, and the process will be
+ left to run out of your control. Similarly, if the process could not
+ be started the standard input will be closed and the pending data
+ deleted. (On operating systems that have zombie processes, Qt will
+ also wait() on the old process.)
+
+ The object emits the signal launchFinished() when this function
+ call is finished. If the start was successful, this signal is
+ emitted after all the data has been written to standard input. If
+ the start failed, then this signal is emitted immediately.
+
+ \sa start() launchFinished();
+*/
+bool QProcess::launch( const QByteArray& buf, QStringList *env )
+{
+ if ( start( env ) ) {
+ if ( !buf.isEmpty() ) {
+ connect( this, SIGNAL(wroteToStdin()),
+ this, SLOT(closeStdinLaunch()) );
+ writeToStdin( buf );
+ } else {
+ closeStdin();
+ emit launchFinished();
+ }
+ return TRUE;
+ } else {
+ emit launchFinished();
+ return FALSE;
+ }
+}
+
+/*! \overload
+
+ The data \a buf is written to standard input with writeToStdin()
+ using the QString::local8Bit() representation of the strings.
+*/
+bool QProcess::launch( const QString& buf, QStringList *env )
+{
+ if ( start( env ) ) {
+ if ( !buf.isEmpty() ) {
+ connect( this, SIGNAL(wroteToStdin()),
+ this, SLOT(closeStdinLaunch()) );
+ writeToStdin( buf );
+ } else {
+ closeStdin();
+ emit launchFinished();
+ }
+ return TRUE;
+ } else {
+ emit launchFinished();
+ return FALSE;
+ }
+}
+
+/*!
+ This private slot is used by the launch() functions to close standard input.
+*/
+void QProcess::closeStdinLaunch()
+{
+ disconnect( this, SIGNAL(wroteToStdin()),
+ this, SLOT(closeStdinLaunch()) );
+ closeStdin();
+ emit launchFinished();
+}
+
+
+/*!
+ \fn void QProcess::readyReadStdout()
+
+ This signal is emitted when the process has written data to standard output.
+ You can read the data with readStdout().
+
+ Note that this signal is only emitted when there is new data and not
+ when there is old, but unread data. In the slot connected to this signal, you
+ should always read everything that is available at that moment to make sure
+ that you don't lose any data.
+
+ \sa readStdout() readLineStdout() readyReadStderr()
+*/
+/*!
+ \fn void QProcess::readyReadStderr()
+
+ This signal is emitted when the process has written data to standard error.
+ You can read the data with readStderr().
+
+ Note that this signal is only emitted when there is new data and not
+ when there is old, but unread data. In the slot connected to this signal, you
+ should always read everything that is available at that moment to make sure
+ that you don't lose any data.
+
+ \sa readStderr() readLineStderr() readyReadStdout()
+*/
+/*!
+ \fn void QProcess::processExited()
+
+ This signal is emitted when the process has exited.
+
+ \sa isRunning() normalExit() exitStatus() start() launch()
+*/
+/*!
+ \fn void QProcess::wroteToStdin()
+
+ This signal is emitted if the data sent to standard input (via
+ writeToStdin()) was actually written to the process. This does not
+ imply that the process really read the data, since this class only detects
+ when it was able to write the data to the operating system. But it is now
+ safe to close standard input without losing pending data.
+
+ \sa writeToStdin() closeStdin()
+*/
+
+
+/*! \overload
+
+ The string \a buf is handled as text using
+ the QString::local8Bit() representation.
+*/
+void QProcess::writeToStdin( const QString& buf )
+{
+ QByteArray tmp = buf.local8Bit();
+ tmp.resize( buf.length() );
+ writeToStdin( tmp );
+}
+
+
+/*
+ * Under Windows the implementation is not so nice: it is not that easy to
+ * detect when one of the signals should be emitted; therefore there are some
+ * timers that query the information.
+ * To keep it a little efficient, use the timers only when they are needed.
+ * They are needed, if you are interested in the signals. So use
+ * connectNotify() and disconnectNotify() to keep track of your interest.
+ */
+/*! \reimp
+*/
+void QProcess::connectNotify( const char * signal )
+{
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcess::connectNotify(): signal %s has been connected", signal );
+#endif
+ if ( !ioRedirection )
+ if ( qstrcmp( signal, SIGNAL(readyReadStdout()) )==0 ||
+ qstrcmp( signal, SIGNAL(readyReadStderr()) )==0
+ ) {
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcess::connectNotify(): set ioRedirection to TRUE" );
+#endif
+ setIoRedirection( TRUE );
+ return;
+ }
+ if ( !notifyOnExit && qstrcmp( signal, SIGNAL(processExited()) )==0 ) {
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcess::connectNotify(): set notifyOnExit to TRUE" );
+#endif
+ setNotifyOnExit( TRUE );
+ return;
+ }
+ if ( !wroteToStdinConnected && qstrcmp( signal, SIGNAL(wroteToStdin()) )==0 ) {
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcess::connectNotify(): set wroteToStdinConnected to TRUE" );
+#endif
+ setWroteStdinConnected( TRUE );
+ return;
+ }
+}
+
+/*! \reimp
+*/
+void QProcess::disconnectNotify( const char * )
+{
+ if ( ioRedirection &&
+ receivers( SIGNAL(readyReadStdout()) ) ==0 &&
+ receivers( SIGNAL(readyReadStderr()) ) ==0
+ ) {
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcess::disconnectNotify(): set ioRedirection to FALSE" );
+#endif
+ setIoRedirection( FALSE );
+ }
+ if ( notifyOnExit && receivers( SIGNAL(processExited()) ) == 0 ) {
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcess::disconnectNotify(): set notifyOnExit to FALSE" );
+#endif
+ setNotifyOnExit( FALSE );
+ }
+ if ( wroteToStdinConnected && receivers( SIGNAL(wroteToStdin()) ) == 0 ) {
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcess::disconnectNotify(): set wroteToStdinConnected to FALSE" );
+#endif
+ setWroteStdinConnected( FALSE );
+ }
+}
+
+#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 @@
+/****************************************************************************
+** $Id$
+**
+** Implementation of QProcess class
+**
+** Created : 20000905
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the kernel module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QPROCESS_H
+#define QPROCESS_H
+
+#ifndef QT_H
+#include "qobject.h"
+#include "qstringlist.h"
+#include "qdir.h"
+#endif // QT_H
+
+#ifndef QT_NO_PROCESS
+
+class QProcessPrivate;
+
+
+class Q_EXPORT QProcess : public QObject
+{
+ Q_OBJECT
+public:
+ QProcess( QObject *parent=0, const char *name=0 );
+ QProcess( const QString& arg0, QObject *parent=0, const char *name=0 );
+ QProcess( const QStringList& args, QObject *parent=0, const char *name=0 );
+ ~QProcess();
+
+ // set and get the arguments and working directory
+ QStringList arguments() const;
+ void clearArguments();
+ virtual void setArguments( const QStringList& args );
+ virtual void addArgument( const QString& arg );
+#ifndef QT_NO_DIR
+ QDir workingDirectory() const;
+ virtual void setWorkingDirectory( const QDir& dir );
+#endif
+
+ // set and get the comms wanted
+ enum Communication { Stdin=0x01, Stdout=0x02, Stderr=0x04, DupStderr=0x08 };
+ void setCommunication( int c );
+ int communication() const;
+
+ // start the execution
+ virtual bool start( QStringList *env=0 );
+ virtual bool launch( const QString& buf, QStringList *env=0 );
+ virtual bool launch( const QByteArray& buf, QStringList *env=0 );
+
+ // inquire the status
+ bool isRunning() const;
+ bool normalExit() const;
+ int exitStatus() const;
+
+ // reading
+ virtual QByteArray readStdout();
+ virtual QByteArray readStderr();
+ bool canReadLineStdout() const;
+ bool canReadLineStderr() const;
+ virtual QString readLineStdout();
+ virtual QString readLineStderr();
+
+ // get platform dependent process information
+#if defined(Q_OS_WIN32)
+ typedef void* PID;
+#else
+ typedef long Q_LONG;
+ typedef Q_LONG PID;
+#endif
+ PID processIdentifier();
+
+ void flushStdin();
+
+signals:
+ void readyReadStdout();
+ void readyReadStderr();
+ void processExited();
+ void wroteToStdin();
+ void launchFinished();
+
+public slots:
+ // end the execution
+ void tryTerminate() const;
+ void kill() const;
+
+ // input
+ virtual void writeToStdin( const QByteArray& buf );
+ virtual void writeToStdin( const QString& buf );
+ virtual void closeStdin();
+
+protected: // ### or private?
+ void connectNotify( const char * signal );
+ void disconnectNotify( const char * signal );
+private:
+ void setIoRedirection( bool value );
+ void setNotifyOnExit( bool value );
+ void setWroteStdinConnected( bool value );
+
+ void init();
+ void reset();
+#if defined(Q_OS_WIN32)
+ uint readStddev( HANDLE dev, char *buf, uint bytes );
+#endif
+ bool scanNewline( bool stdOut, QByteArray *store );
+
+ QByteArray* bufStdout();
+ QByteArray* bufStderr();
+ void consumeBufStdout( int consume );
+ void consumeBufStderr( int consume );
+
+private slots:
+ void socketRead( int fd );
+ void socketWrite( int fd );
+ void timeout();
+ void closeStdinLaunch();
+
+private:
+ QProcessPrivate *d;
+#ifndef QT_NO_DIR
+ QDir workingDir;
+#endif
+ QStringList _arguments;
+
+ int exitStat; // exit status
+ bool exitNormal; // normal exit?
+ bool ioRedirection; // automatically set be (dis)connectNotify
+ bool notifyOnExit; // automatically set be (dis)connectNotify
+ bool wroteToStdinConnected; // automatically set be (dis)connectNotify
+
+ bool readStdoutCalled;
+ bool readStderrCalled;
+ int comms;
+
+ friend class QProcessPrivate;
+#if defined(Q_OS_UNIX) || defined(_OS_UNIX) || defined(UNIX)
+ friend class QProcessManager;
+ friend class QProc;
+#endif
+};
+
+#endif // QT_NO_PROCESS
+
+#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 @@
+/****************************************************************************
+** $Id$
+**
+** Implementation of QProcess class for Unix
+**
+** Created : 20000905
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the kernel module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+//#include "qplatformdefs.h"
+
+// Solaris redefines connect -> __xnet_connect with _XOPEN_SOURCE_EXTENDED.
+#if defined(connect)
+#undef connect
+#endif
+
+#include "qprocess.h"
+
+#ifndef QT_NO_PROCESS
+
+#include "qapplication.h"
+#include "qqueue.h"
+#include "qlist.h"
+#include "qsocketnotifier.h"
+#include "qtimer.h"
+#include "qcleanuphandler_p.h"
+#include "qregexp.h"
+
+#include <stdlib.h>
+
+// ### FOR Qt 2.3 compat
+#include <unistd.h>
+#include <signal.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+#include <sys/wait.h>
+#include <sys/fcntl.h>
+
+#include <errno.h>
+
+#ifdef __MIPSEL__
+# ifndef SOCK_DGRAM
+# define SOCK_DGRAM 1
+# endif
+# ifndef SOCK_STREAM
+# define SOCK_STREAM 2
+# endif
+#endif
+
+//#define QT_QPROCESS_DEBUG
+
+
+#ifdef Q_C_CALLBACKS
+extern "C" {
+#endif // Q_C_CALLBACKS
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+ QT_SIGNAL_RETTYPE qt_C_sigchldHnd(QT_SIGNAL_ARGS);
+
+#ifdef Q_C_CALLBACKS
+}
+#endif // Q_C_CALLBACKS
+
+
+class QProc;
+class QProcessManager;
+class QProcessPrivate
+{
+public:
+ QProcessPrivate();
+ ~QProcessPrivate();
+
+ void closeOpenSocketsForChild();
+ void newProc( pid_t pid, QProcess *process );
+
+ QByteArray bufStdout;
+ QByteArray bufStderr;
+
+ QQueue<QByteArray> stdinBuf;
+
+ QSocketNotifier *notifierStdin;
+ QSocketNotifier *notifierStdout;
+ QSocketNotifier *notifierStderr;
+
+ ssize_t stdinBufRead;
+ QProc *proc;
+
+ bool exitValuesCalculated;
+ bool socketReadCalled;
+
+ static QProcessManager *procManager;
+};
+
+
+/***********************************************************************
+ *
+ * QProc
+ *
+ **********************************************************************/
+/*
+ The class QProcess does not necessarily map exactly to the running
+ child processes: if the process is finished, the QProcess class may still be
+ there; furthermore a user can use QProcess to start more than one process.
+
+ The helper-class QProc has the semantics that one instance of this class maps
+ directly to a running child process.
+*/
+class QProc
+{
+public:
+ QProc( pid_t p, QProcess *proc=0 ) : pid(p), process(proc)
+ {
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProc: Constructor for pid %d and QProcess %p", pid, process );
+#endif
+ socketStdin = 0;
+ socketStdout = 0;
+ socketStderr = 0;
+ }
+ ~QProc()
+ {
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProc: Destructor for pid %d and QProcess %p", pid, process );
+#endif
+ if ( process != 0 ) {
+ if ( process->d->notifierStdin )
+ process->d->notifierStdin->setEnabled( FALSE );
+ if ( process->d->notifierStdout )
+ process->d->notifierStdout->setEnabled( FALSE );
+ if ( process->d->notifierStderr )
+ process->d->notifierStderr->setEnabled( FALSE );
+ process->d->proc = 0;
+ }
+ if( socketStdin != 0 )
+ ::close( socketStdin );
+ // ### close these sockets even on parent exit or is it better only on
+ // sigchld (but what do I have to do with them on exit then)?
+ if( socketStdout != 0 )
+ ::close( socketStdout );
+ if( socketStderr != 0 )
+ ::close( socketStderr );
+ }
+
+ pid_t pid;
+ int socketStdin;
+ int socketStdout;
+ int socketStderr;
+ QProcess *process;
+};
+
+/***********************************************************************
+ *
+ * QProcessManager
+ *
+ **********************************************************************/
+class QProcessManager : public QObject
+{
+ Q_OBJECT
+
+public:
+ QProcessManager();
+ ~QProcessManager();
+
+ void append( QProc *p );
+ void remove( QProc *p );
+
+ void cleanup();
+
+public slots:
+ void removeMe();
+ void sigchldHnd( int );
+
+public:
+ struct sigaction oldactChld;
+ struct sigaction oldactPipe;
+ QList<QProc> *procList;
+ int sigchldFd[2];
+};
+
+QCleanupHandler<QProcessManager> qprocess_cleanup_procmanager;
+
+QProcessManager::QProcessManager()
+{
+ procList = new QList<QProc>;
+ procList->setAutoDelete( TRUE );
+
+ // The SIGCHLD handler writes to a socket to tell the manager that
+ // something happened. This is done to get the processing in sync with the
+ // event reporting.
+ if ( ::socketpair( AF_UNIX, SOCK_STREAM, 0, sigchldFd ) ) {
+ sigchldFd[0] = 0;
+ sigchldFd[1] = 0;
+ } else {
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcessManager: install socket notifier (%d)", sigchldFd[1] );
+#endif
+ QSocketNotifier *sn = new QSocketNotifier( sigchldFd[1],
+ QSocketNotifier::Read, this );
+ connect( sn, SIGNAL(activated(int)),
+ this, SLOT(sigchldHnd(int)) );
+ sn->setEnabled( TRUE );
+ }
+
+ // install a SIGCHLD handler and ignore SIGPIPE
+ struct sigaction act;
+
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcessManager: install a SIGCHLD handler" );
+#endif
+ act.sa_handler = qt_C_sigchldHnd;
+ sigemptyset( &(act.sa_mask) );
+ sigaddset( &(act.sa_mask), SIGCHLD );
+ act.sa_flags = SA_NOCLDSTOP;
+#if defined(SA_RESTART)
+ act.sa_flags |= SA_RESTART;
+#endif
+ if ( sigaction( SIGCHLD, &act, &oldactChld ) != 0 )
+ qWarning( "Error installing SIGCHLD handler" );
+
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcessManager: install a SIGPIPE handler (SIG_IGN)" );
+#endif
+ act.sa_handler = QT_SIGNAL_IGNORE;
+ sigemptyset( &(act.sa_mask) );
+ sigaddset( &(act.sa_mask), SIGPIPE );
+ act.sa_flags = 0;
+ if ( sigaction( SIGPIPE, &act, &oldactPipe ) != 0 )
+ qWarning( "Error installing SIGPIPE handler" );
+}
+
+QProcessManager::~QProcessManager()
+{
+ delete procList;
+
+ if ( sigchldFd[0] != 0 )
+ ::close( sigchldFd[0] );
+ if ( sigchldFd[1] != 0 )
+ ::close( sigchldFd[1] );
+
+ // restore SIGCHLD handler
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcessManager: restore old sigchild handler" );
+#endif
+ if ( sigaction( SIGCHLD, &oldactChld, 0 ) != 0 )
+ qWarning( "Error restoring SIGCHLD handler" );
+
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcessManager: restore old sigpipe handler" );
+#endif
+ if ( sigaction( SIGPIPE, &oldactPipe, 0 ) != 0 )
+ qWarning( "Error restoring SIGPIPE handler" );
+}
+
+void QProcessManager::append( QProc *p )
+{
+ procList->append( p );
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcessManager: append process (procList.count(): %d)", procList->count() );
+#endif
+}
+
+void QProcessManager::remove( QProc *p )
+{
+ procList->remove( p );
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcessManager: remove process (procList.count(): %d)", procList->count() );
+#endif
+ cleanup();
+}
+
+void QProcessManager::cleanup()
+{
+ if ( procList->count() == 0 ) {
+ QTimer::singleShot( 0, this, SLOT(removeMe()) );
+ }
+}
+
+void QProcessManager::removeMe()
+{
+ if ( procList->count() == 0 ) {
+ qprocess_cleanup_procmanager.remove( &QProcessPrivate::procManager );
+ QProcessPrivate::procManager = 0;
+ delete this;
+ }
+}
+
+void QProcessManager::sigchldHnd( int fd )
+{
+ char tmp;
+ ::read( fd, &tmp, sizeof(tmp) );
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcessManager::sigchldHnd()" );
+#endif
+ QProc *proc;
+ QProcess *process;
+ bool removeProc;
+ proc = procList->first();
+ while ( proc != 0 ) {
+ removeProc = FALSE;
+ process = proc->process;
+ if ( process != 0 ) {
+ if ( !process->isRunning() ) {
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcessManager::sigchldHnd() (PID: %d): process exited (QProcess available)", proc->pid );
+#endif
+ // read pending data
+ int nbytes = 0;
+ if ( ::ioctl(proc->socketStdout, FIONREAD, (char*)&nbytes)==0 && nbytes>0 ) {
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcessManager::sigchldHnd() (PID: %d): reading %d bytes of pending data on stdout", proc->pid, nbytes );
+#endif
+ process->socketRead( proc->socketStdout );
+ }
+ nbytes = 0;
+ if ( ::ioctl(proc->socketStderr, FIONREAD, (char*)&nbytes)==0 && nbytes>0 ) {
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcessManager::sigchldHnd() (PID: %d): reading %d bytes of pending data on stderr", proc->pid, nbytes );
+#endif
+ process->socketRead( proc->socketStderr );
+ }
+
+ if ( process->notifyOnExit )
+ emit process->processExited();
+
+ removeProc = TRUE;
+ }
+ } else {
+ int status;
+ if ( ::waitpid( proc->pid, &status, WNOHANG ) == proc->pid ) {
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcessManager::sigchldHnd() (PID: %d): process exited (QProcess not available)", proc->pid );
+#endif
+ removeProc = TRUE;
+ }
+ }
+ if ( removeProc ) {
+ QProc *oldproc = proc;
+ proc = procList->next();
+ remove( oldproc );
+ } else {
+ proc = procList->next();
+ }
+ }
+}
+
+#include "qprocess_unix.moc"
+
+
+/***********************************************************************
+ *
+ * QProcessPrivate
+ *
+ **********************************************************************/
+QProcessManager *QProcessPrivate::procManager = 0;
+
+QProcessPrivate::QProcessPrivate()
+{
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcessPrivate: Constructor" );
+#endif
+ stdinBufRead = 0;
+
+ notifierStdin = 0;
+ notifierStdout = 0;
+ notifierStderr = 0;
+
+ exitValuesCalculated = FALSE;
+ socketReadCalled = FALSE;
+
+ proc = 0;
+}
+
+QProcessPrivate::~QProcessPrivate()
+{
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcessPrivate: Destructor" );
+#endif
+
+ if ( proc != 0 ) {
+ if ( proc->socketStdin != 0 ) {
+ ::close( proc->socketStdin );
+ proc->socketStdin = 0;
+ }
+ proc->process = 0;
+ }
+
+ while ( !stdinBuf.isEmpty() ) {
+ delete stdinBuf.dequeue();
+ }
+ delete notifierStdin;
+ delete notifierStdout;
+ delete notifierStderr;
+}
+
+/*
+ Closes all open sockets in the child process that are not needed by the child
+ process. Otherwise one child may have an open socket on standard input, etc.
+ of another child.
+*/
+void QProcessPrivate::closeOpenSocketsForChild()
+{
+ if ( procManager != 0 ) {
+ if ( procManager->sigchldFd[0] != 0 )
+ ::close( procManager->sigchldFd[0] );
+ if ( procManager->sigchldFd[1] != 0 )
+ ::close( procManager->sigchldFd[1] );
+
+ // close also the sockets from other QProcess instances
+ QProc *proc;
+ for ( proc=procManager->procList->first(); proc!=0; proc=procManager->procList->next() ) {
+ ::close( proc->socketStdin );
+ ::close( proc->socketStdout );
+ ::close( proc->socketStderr );
+ }
+ }
+}
+
+void QProcessPrivate::newProc( pid_t pid, QProcess *process )
+{
+ proc = new QProc( pid, process );
+ if ( procManager == 0 ) {
+ procManager = new QProcessManager;
+ qprocess_cleanup_procmanager.add( &procManager );
+ }
+ // the QProcessManager takes care of deleting the QProc instances
+ procManager->append( proc );
+}
+
+/***********************************************************************
+ *
+ * sigchld handler callback
+ *
+ **********************************************************************/
+QT_SIGNAL_RETTYPE qt_C_sigchldHnd( QT_SIGNAL_ARGS )
+{
+ if ( QProcessPrivate::procManager == 0 )
+ return;
+ if ( QProcessPrivate::procManager->sigchldFd[0] == 0 )
+ return;
+
+ char a = 1;
+ ::write( QProcessPrivate::procManager->sigchldFd[0], &a, sizeof(a) );
+}
+
+
+/***********************************************************************
+ *
+ * QProcess
+ *
+ **********************************************************************/
+/*!
+ This private class does basic initialization.
+*/
+void QProcess::init()
+{
+ d = new QProcessPrivate();
+ exitStat = 0;
+ exitNormal = FALSE;
+}
+
+/*!
+ This private class resets the process variables, etc. so that it can be used
+ for another process to start.
+*/
+void QProcess::reset()
+{
+ delete d;
+ d = new QProcessPrivate();
+ exitStat = 0;
+ exitNormal = FALSE;
+ d->bufStdout.resize( 0 );
+ d->bufStderr.resize( 0 );
+}
+
+QByteArray* QProcess::bufStdout()
+{
+ if ( d->proc && d->proc->socketStdout ) {
+ // ### can this cause a blocking behaviour (maybe do a ioctl() to see
+ // if data is available)?
+ socketRead( d->proc->socketStdout );
+ }
+ return &d->bufStdout;
+}
+
+QByteArray* QProcess::bufStderr()
+{
+ if ( d->proc && d->proc->socketStderr ) {
+ // ### can this cause a blocking behaviour (maybe do a ioctl() to see
+ // if data is available)?
+ socketRead( d->proc->socketStderr );
+ }
+ return &d->bufStderr;
+}
+
+void QProcess::consumeBufStdout( int consume )
+{
+ uint n = d->bufStdout.size();
+ if ( consume==-1 || (uint)consume >= n ) {
+ d->bufStdout.resize( 0 );
+ } else {
+ QByteArray tmp( n - consume );
+ memcpy( tmp.data(), d->bufStdout.data()+consume, n-consume );
+ d->bufStdout = tmp;
+ }
+}
+
+void QProcess::consumeBufStderr( int consume )
+{
+ uint n = d->bufStderr.size();
+ if ( consume==-1 || (uint)consume >= n ) {
+ d->bufStderr.resize( 0 );
+ } else {
+ QByteArray tmp( n - consume );
+ memcpy( tmp.data(), d->bufStderr.data()+consume, n-consume );
+ d->bufStderr = tmp;
+ }
+}
+
+/*!
+ Destroys the class.
+
+ If the process is running, it is NOT terminated! Standard input, standard
+ output and standard error of the process are closed.
+
+ You can connect the destroyed() signal to the kill() slot, if you want the
+ process to be terminated automatically when the class is destroyed.
+
+ \sa tryTerminate() kill()
+*/
+QProcess::~QProcess()
+{
+ delete d;
+}
+
+/*!
+ Tries to run a process for the command and arguments that were specified with
+ setArguments(), addArgument() or that were specified in the constructor. The
+ command is searched in the path for executable programs; you can also use an
+ absolute path to the command.
+
+ If \a env is null, then the process is started with the same environment as
+ the starting process. If \a env is non-null, then the values in the
+ stringlist are interpreted as environment setttings of the form \c
+ {key=value} and the process is started in these environment settings. For
+ convenience, there is a small exception to this rule: under Unix, if \a env
+ does not contain any settings for the environment variable \c
+ LD_LIBRARY_PATH, then this variable is inherited from the starting process;
+ under Windows the same applies for the enverionment varialbe \c PATH.
+
+ Returns TRUE if the process could be started, otherwise FALSE.
+
+ You can write data to standard input of the process with
+ writeToStdin(), you can close standard input with closeStdin() and you can
+ terminate the process tryTerminate() resp. kill().
+
+ You can call this function even when there already is a running
+ process in this object. In this case, QProcess closes standard input
+ of the old process and deletes pending data, i.e., you loose all
+ control over that process, but the process is not terminated. This applies
+ also if the process could not be started. (On operating systems that have
+ zombie processes, Qt will also wait() on the old process.)
+
+ \sa launch() closeStdin()
+*/
+bool QProcess::start( QStringList *env )
+{
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcess::start()" );
+#endif
+ reset();
+
+ int sStdin[2];
+ int sStdout[2];
+ int sStderr[2];
+
+ // open sockets for piping
+ if ( (comms & Stdin) && ::socketpair( AF_UNIX, SOCK_STREAM, 0, sStdin ) == -1 ) {
+ return FALSE;
+ }
+ if ( (comms & Stderr) && ::socketpair( AF_UNIX, SOCK_STREAM, 0, sStderr ) == -1 ) {
+ return FALSE;
+ }
+ if ( (comms & Stdout) && ::socketpair( AF_UNIX, SOCK_STREAM, 0, sStdout ) == -1 ) {
+ return FALSE;
+ }
+
+ // the following pipe is only used to determine if the process could be
+ // started
+ int fd[2];
+ if ( pipe( fd ) < 0 ) {
+ // non critical error, go on
+ fd[0] = 0;
+ fd[1] = 0;
+ }
+
+ // construct the arguments for exec
+ QCString *arglistQ = new QCString[ _arguments.count() + 1 ];
+ const char** arglist = new const char*[ _arguments.count() + 1 ];
+ int i = 0;
+ for ( QStringList::Iterator it = _arguments.begin(); it != _arguments.end(); ++it ) {
+ arglistQ[i] = (*it).local8Bit();
+ arglist[i] = arglistQ[i];
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcess::start(): arg %d = %s", i, arglist[i] );
+#endif
+ i++;
+ }
+ arglist[i] = 0;
+
+ // Must make sure signal handlers are installed before exec'ing
+ // in case the process exits quickly.
+ if ( d->procManager == 0 ) {
+ d->procManager = new QProcessManager;
+ qprocess_cleanup_procmanager.add( &d->procManager );
+ }
+
+ // fork and exec
+ QApplication::flushX();
+ pid_t pid = fork();
+ if ( pid == 0 ) {
+ // child
+ d->closeOpenSocketsForChild();
+ if ( comms & Stdin ) {
+ ::close( sStdin[1] );
+ ::dup2( sStdin[0], STDIN_FILENO );
+ }
+ if ( comms & Stdout ) {
+ ::close( sStdout[0] );
+ ::dup2( sStdout[1], STDOUT_FILENO );
+ }
+ if ( comms & Stderr ) {
+ ::close( sStderr[0] );
+ ::dup2( sStderr[1], STDERR_FILENO );
+ }
+ if ( comms & DupStderr ) {
+ ::dup2( STDOUT_FILENO, STDERR_FILENO );
+ }
+#ifndef QT_NO_DIR
+ ::chdir( workingDir.absPath().latin1() );
+#endif
+ if ( fd[0] )
+ ::close( fd[0] );
+ if ( fd[1] )
+ ::fcntl( fd[1], F_SETFD, FD_CLOEXEC ); // close on exec shows sucess
+
+ if ( env == 0 ) { // inherit environment and start process
+ ::execvp( arglist[0], (char*const*)arglist ); // ### cast not nice
+ } else { // start process with environment settins as specified in env
+ // construct the environment for exec
+ int numEntries = env->count();
+ bool setLibraryPath =
+ env->grep( QRegExp( "^LD_LIBRARY_PATH=" ) ).isEmpty() &&
+ getenv( "LD_LIBRARY_PATH" ) != 0;
+ if ( setLibraryPath )
+ numEntries++;
+ QCString *envlistQ = new QCString[ numEntries + 1 ];
+ const char** envlist = new const char*[ numEntries + 1 ];
+ int i = 0;
+ if ( setLibraryPath ) {
+ envlistQ[i] = QString( "LD_LIBRARY_PATH=%1" ).arg( getenv( "LD_LIBRARY_PATH" ) ).local8Bit();
+ envlist[i] = envlistQ[i];
+ i++;
+ }
+ for ( QStringList::Iterator it = env->begin(); it != env->end(); ++it ) {
+ envlistQ[i] = (*it).local8Bit();
+ envlist[i] = envlistQ[i];
+ i++;
+ }
+ envlist[i] = 0;
+
+ // look for the executable in the search path
+ if ( _arguments.count()>0 && getenv("PATH")!=0 ) {
+ QString command = _arguments[0];
+ if ( !command.contains( '/' ) ) {
+ QStringList pathList = QStringList::split( ':', getenv( "PATH" ) );
+ for (QStringList::Iterator it = pathList.begin(); it != pathList.end(); ++it ) {
+ QString dir = *it;
+#ifdef Q_OS_MACX
+ if(QFile::exists(dir + "/" + command + ".app")) //look in a bundle
+ dir += "/" + command + ".app/Contents/MacOS";
+#endif
+#ifndef QT_NO_DIR
+ QFileInfo fileInfo( dir, command );
+#else
+ QFileInfo fileInfo( dir + "/" + command );
+#endif
+ if ( fileInfo.isExecutable() ) {
+ arglistQ[0] = fileInfo.filePath().local8Bit();
+ arglist[0] = arglistQ[0];
+ break;
+ }
+ }
+ }
+ }
+ ::execve( arglist[0], (char*const*)arglist, (char*const*)envlist ); // ### casts not nice
+ }
+ if ( fd[1] ) {
+ char buf = 0;
+ ::write( fd[1], &buf, 1 );
+ ::close( fd[1] );
+ }
+ ::exit( -1 );
+ } else if ( pid == -1 ) {
+ // error forking
+ goto error;
+ }
+
+ // test if exec was successful
+ if ( fd[1] )
+ ::close( fd[1] );
+ if ( fd[0] ) {
+ char buf;
+ for ( ;; ) {
+ int n = ::read( fd[0], &buf, 1 );
+ if ( n==1 ) {
+ // socket was not closed => error
+ d->proc = 0;
+ goto error;
+ } else if ( n==-1 ) {
+ if ( errno==EAGAIN || errno==EINTR )
+ // try it again
+ continue;
+ }
+ break;
+ }
+ ::close( fd[0] );
+ }
+
+ d->newProc( pid, this );
+
+ if ( comms & Stdin ) {
+ ::close( sStdin[0] );
+ d->proc->socketStdin = sStdin[1];
+ d->notifierStdin = new QSocketNotifier( sStdin[1], QSocketNotifier::Write );
+ connect( d->notifierStdin, SIGNAL(activated(int)),
+ this, SLOT(socketWrite(int)) );
+ // setup notifiers for the sockets
+ if ( !d->stdinBuf.isEmpty() ) {
+ d->notifierStdin->setEnabled( TRUE );
+ }
+ }
+ if ( comms & Stdout ) {
+ ::close( sStdout[1] );
+ d->proc->socketStdout = sStdout[0];
+ d->notifierStdout = new QSocketNotifier( sStdout[0], QSocketNotifier::Read );
+ connect( d->notifierStdout, SIGNAL(activated(int)),
+ this, SLOT(socketRead(int)) );
+ if ( ioRedirection )
+ d->notifierStdout->setEnabled( TRUE );
+ }
+ if ( comms & Stderr ) {
+ ::close( sStderr[1] );
+ d->proc->socketStderr = sStderr[0];
+ d->notifierStderr = new QSocketNotifier( sStderr[0], QSocketNotifier::Read );
+ connect( d->notifierStderr, SIGNAL(activated(int)),
+ this, SLOT(socketRead(int)) );
+ if ( ioRedirection )
+ d->notifierStderr->setEnabled( TRUE );
+ }
+
+ // cleanup and return
+ delete[] arglistQ;
+ delete[] arglist;
+ return TRUE;
+
+error:
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcess::start(): error starting process" );
+#endif
+ if ( d->procManager )
+ d->procManager->cleanup();
+ if ( comms & Stdin ) {
+ ::close( sStdin[1] );
+ ::close( sStdin[0] );
+ }
+ if ( comms & Stdout ) {
+ ::close( sStdout[0] );
+ ::close( sStdout[1] );
+ }
+ if ( comms & Stderr ) {
+ ::close( sStderr[0] );
+ ::close( sStderr[1] );
+ }
+ ::close( fd[0] );
+ ::close( fd[1] );
+ delete[] arglistQ;
+ delete[] arglist;
+ return FALSE;
+}
+
+
+/*!
+ Asks the process to terminate. Processes can ignore this wish. If you want to
+ be sure that the process really terminates, you must use kill() instead.
+
+ The slot returns immediately: it does not wait until the process has
+ finished. When the process really exited, the signal processExited() is
+ emitted.
+
+ \sa kill() processExited()
+*/
+void QProcess::tryTerminate() const
+{
+ if ( d->proc != 0 )
+ ::kill( d->proc->pid, SIGTERM );
+}
+
+/*!
+ Terminates the process. This is not a safe way to end a process since the
+ process will not be able to do cleanup. tryTerminate() is a safer way to do
+ it, but processes might ignore a tryTerminate().
+
+ The nice way to end a process and to be sure that it is finished, is doing
+ something like this:
+ \code
+ process->tryTerminate();
+ QTimer::singleShot( 5000, process, SLOT( kill() ) );
+ \endcode
+
+ This tries to terminate the process the nice way. If the process is still
+ running after 5 seconds, it terminates the process the hard way. The timeout
+ should be chosen depending on the time the process needs to do all the
+ cleanup: use a higher value if the process is likely to do heavy computation
+ on cleanup.
+
+ The slot returns immediately: it does not wait until the process has
+ finished. When the process really exited, the signal processExited() is
+ emitted.
+
+ \sa tryTerminate() processExited()
+*/
+void QProcess::kill() const
+{
+ if ( d->proc != 0 )
+ ::kill( d->proc->pid, SIGKILL );
+}
+
+/*!
+ Returns TRUE if the process is running, otherwise FALSE.
+
+ \sa normalExit() exitStatus() processExited()
+*/
+bool QProcess::isRunning() const
+{
+ if ( d->exitValuesCalculated ) {
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcess::isRunning(): FALSE (already computed)" );
+#endif
+ return FALSE;
+ }
+ if ( d->proc == 0 )
+ return FALSE;
+ int status;
+ if ( ::waitpid( d->proc->pid, &status, WNOHANG ) == d->proc->pid )
+ {
+ // compute the exit values
+ QProcess *that = (QProcess*)this; // mutable
+ that->exitNormal = WIFEXITED( status ) != 0;
+ if ( exitNormal ) {
+ that->exitStat = (char)WEXITSTATUS( status );
+ }
+ d->exitValuesCalculated = TRUE;
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcess::isRunning() (PID: %d): FALSE", d->proc->pid );
+#endif
+ return FALSE;
+ }
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcess::isRunning() (PID: %d): TRUE", d->proc->pid );
+#endif
+ return TRUE;
+}
+
+/*!
+ Writes the data \a buf to the standard input of the process. The process may
+ or may not read this data.
+
+ This function returns immediately; the QProcess class might write the data at
+ a later point (you have to enter the event loop for that). When all the data
+ is written to the process, the signal wroteToStdin() is emitted. This does
+ not mean that the process really read the data, since this class only detects
+ when it was able to write the data to the operating system.
+
+ \sa wroteToStdin() closeStdin() readStdout() readStderr()
+*/
+void QProcess::writeToStdin( const QByteArray& buf )
+{
+#if defined(QT_QPROCESS_DEBUG)
+// qDebug( "QProcess::writeToStdin(): write to stdin (%d)", d->socketStdin );
+#endif
+ d->stdinBuf.enqueue( new QByteArray(buf) );
+ if ( d->notifierStdin != 0 )
+ d->notifierStdin->setEnabled( TRUE );
+}
+
+
+/*!
+ Closes standard input of the process.
+
+ This function also deletes pending data that is not written to standard input
+ yet.
+
+ \sa wroteToStdin()
+*/
+void QProcess::closeStdin()
+{
+ if ( d->proc == 0 )
+ return;
+ if ( d->proc->socketStdin !=0 ) {
+ while ( !d->stdinBuf.isEmpty() ) {
+ delete d->stdinBuf.dequeue();
+ }
+ delete d->notifierStdin;
+ d->notifierStdin = 0;
+ if ( ::close( d->proc->socketStdin ) != 0 ) {
+ qWarning( "Could not close stdin of child process" );
+ }
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcess::closeStdin(): stdin (%d) closed", d->proc->socketStdin );
+#endif
+ d->proc->socketStdin = 0;
+ }
+}
+
+
+/*
+ This private slot is called when the process has outputted data to either
+ standard output or standard error.
+*/
+void QProcess::socketRead( int fd )
+{
+ if ( d->socketReadCalled ) {
+ // the slots that are connected to the readyRead...() signals might
+ // trigger a recursive call of socketRead(). Avoid this since you get a
+ // blocking read otherwise.
+ return;
+ }
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcess::socketRead(): %d", fd );
+#endif
+ if ( fd == 0 )
+ return;
+ const int bufsize = 4096;
+ QByteArray *buffer = 0;
+ uint oldSize;
+ int n;
+ if ( fd == d->proc->socketStdout ) {
+ buffer = &d->bufStdout;
+ } else if ( fd == d->proc->socketStderr ) {
+ buffer = &d->bufStderr;
+ } else {
+ // this case should never happen, but just to be safe
+ return;
+ }
+
+ // read data
+ oldSize = buffer->size();
+ buffer->resize( oldSize + bufsize );
+ n = ::read( fd, buffer->data()+oldSize, bufsize );
+ if ( n > 0 )
+ buffer->resize( oldSize + n );
+ else
+ buffer->resize( oldSize );
+ // eof or error?
+ if ( n == 0 || n == -1 ) {
+ if ( fd == d->proc->socketStdout ) {
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcess::socketRead(): stdout (%d) closed", fd );
+#endif
+ d->notifierStdout->setEnabled( FALSE );
+ delete d->notifierStdout;
+ d->notifierStdout = 0;
+ ::close( d->proc->socketStdout );
+ d->proc->socketStdout = 0;
+ return;
+ } else if ( fd == d->proc->socketStderr ) {
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcess::socketRead(): stderr (%d) closed", fd );
+#endif
+ d->notifierStderr->setEnabled( FALSE );
+ delete d->notifierStderr;
+ d->notifierStderr = 0;
+ ::close( d->proc->socketStderr );
+ d->proc->socketStderr = 0;
+ return;
+ }
+ }
+ // read all data that is available
+ while ( n == bufsize ) {
+ oldSize = buffer->size();
+ buffer->resize( oldSize + bufsize );
+ n = ::read( fd, buffer->data()+oldSize, bufsize );
+ if ( n > 0 )
+ buffer->resize( oldSize + n );
+ else
+ buffer->resize( oldSize );
+ }
+
+ d->socketReadCalled = TRUE;
+ if ( fd == d->proc->socketStdout ) {
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcess::socketRead(): %d bytes read from stdout (%d)",
+ buffer->size()-oldSize, fd );
+#endif
+ emit readyReadStdout();
+ } else if ( fd == d->proc->socketStderr ) {
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcess::socketRead(): %d bytes read from stderr (%d)",
+ buffer->size()-oldSize, fd );
+#endif
+ emit readyReadStderr();
+ }
+ d->socketReadCalled = FALSE;
+}
+
+
+/*
+ This private slot is called when the process tries to read data from standard
+ input.
+*/
+void QProcess::socketWrite( int fd )
+{
+ if ( fd != d->proc->socketStdin || d->proc->socketStdin == 0 )
+ return;
+ if ( d->stdinBuf.isEmpty() ) {
+ d->notifierStdin->setEnabled( FALSE );
+ return;
+ }
+#if defined(QT_QPROCESS_DEBUG)
+ qDebug( "QProcess::socketWrite(): write to stdin (%d)", fd );
+#endif
+ ssize_t ret = ::write( fd,
+ d->stdinBuf.head()->data() + d->stdinBufRead,
+ d->stdinBuf.head()->size() - d->stdinBufRead );
+ if ( ret > 0 )
+ d->stdinBufRead += ret;
+ if ( d->stdinBufRead == (ssize_t)d->stdinBuf.head()->size() ) {
+ d->stdinBufRead = 0;
+ delete d->stdinBuf.dequeue();
+ if ( wroteToStdinConnected && d->stdinBuf.isEmpty() )
+ emit wroteToStdin();
+ socketWrite( fd );
+ }
+}
+
+/*!
+ \internal
+ Flushes standard input. This is useful if you want to use QProcess in a
+ synchronous manner.
+
+ This function should probably go into the public API.
+*/
+void QProcess::flushStdin()
+{
+ socketWrite( d->proc->socketStdin );
+}
+
+/*
+ This private slot is only used under Windows (but moc does not know about #if
+ defined()).
+*/
+void QProcess::timeout()
+{
+}
+
+
+/*
+ This private function is used by connectNotify() and disconnectNotify() to
+ change the value of ioRedirection (and related behaviour)
+*/
+void QProcess::setIoRedirection( bool value )
+{
+ ioRedirection = value;
+ if ( ioRedirection ) {
+ if ( d->notifierStdout )
+ d->notifierStdout->setEnabled( TRUE );
+ if ( d->notifierStderr )
+ d->notifierStderr->setEnabled( TRUE );
+ } else {
+ if ( d->notifierStdout )
+ d->notifierStdout->setEnabled( FALSE );
+ if ( d->notifierStderr )
+ d->notifierStderr->setEnabled( FALSE );
+ }
+}
+
+/*
+ This private function is used by connectNotify() and
+ disconnectNotify() to change the value of notifyOnExit (and related
+ behaviour)
+*/
+void QProcess::setNotifyOnExit( bool value )
+{
+ notifyOnExit = value;
+}
+
+/*
+ This private function is used by connectNotify() and disconnectNotify() to
+ change the value of wroteToStdinConnected (and related behaviour)
+*/
+void QProcess::setWroteStdinConnected( bool value )
+{
+ wroteToStdinConnected = value;
+}
+
+/*! \enum QProcess::PID
+ \internal
+*/
+/*!
+ Returns platform dependent information about the process. This can be used
+ together with platform specific system calls.
+
+ Under Unix the return value is the PID of the process, or -1 if no process is
+ belonging to this object.
+
+ Under Windows it is a pointer to the \c PROCESS_INFORMATION struct, or 0 if
+ no process is belonging to this object.
+*/
+QProcess::PID QProcess::processIdentifier()
+{
+ if ( d->proc == 0 )
+ return -1;
+ return d->proc->pid;
+}
+
+#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 @@
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <fcntl.h>
+
+#define QUICKEXEC "/tmp/.quickexec"
+
+int quickexecv( const char *path, const char *argv[] )
+{
+ int fd = open( QUICKEXEC, O_WRONLY );
+ if ( fd == -1 ) {
+ perror( "quickexec pipe" );
+ return -1;
+ }
+ write( fd, path, strlen( path )+1 );
+ const char **s = argv;
+ while( *s ) {
+ write( fd, *s, strlen( *s )+1 );
+ ++s;
+ }
+ close(fd);
+ return 0;
+}
+
+int quickexec( const char *path, const char *, ...)
+{
+ int fd = open( QUICKEXEC, O_WRONLY );
+ if ( fd == -1 ) {
+ perror( "quickexec pipe" );
+ return -1;
+ }
+ const char** s = &path;
+ do {
+ write( fd, *s, strlen( *s )+1 );
+ } while ( *(++s) );
+
+ close( fd );
+
+ return 0;
+}
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 @@
+#ifndef QUICKEXEC_H
+#define QUICKEXEC_H
+
+#define HAVE_QUICKEXEC
+/*
+ A special version of execl that opens a shared library and executes the main() function in
+ the lib. Requires the quickexec daemon to run.
+
+ Note: You do not need to call fork() before calling quickexec, the function actually returns.
+
+ WARNING: path has to be a shared library, otherwise quickexec will hang
+*/
+
+extern int quickexecl( const char *path, const char *, ...);
+extern int quickexecv( const char *path, const char *argv[] );
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "quuid.h"
+
+/*!
+ \class QUuid quuid.h
+ \brief The QUuid class defines a Universally Unique Identifier (UUID).
+
+ This class is temporarily copied from Qt 3.0.
+*/
+
+/*!
+ \fn QUuid::QUuid()
+
+ Creates the null UUID {00000000-0000-0000-0000-000000000000}.
+*/
+
+/*!
+ \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 )
+
+ Creates an UUID with the value specified by the parameters, \a l, \a
+ w1, \a w2, \a b1, \a b2, \a b3, \a b4, \a b5, \a b6, \a b7, \a b8.
+
+ Example:
+ \code
+ // {67C8770B-44F1-410A-AB9A-F9B5446F13EE}
+ QUuid IID_MyInterface( 0x67c8770b, 0x44f1, 0x410a, 0xab, 0x9a, 0xf9, 0xb5, 0x44, 0x6f, 0x13, 0xee )
+ \endcode
+*/
+
+/*!
+ \fn QUuid::QUuid( const QUuid &orig )
+
+ Creates a copy of the QUuid \a orig.
+*/
+#ifndef QT_NO_QUUID_STRING
+/*!
+ Creates a QUuid object from the string \a text. Right now, the function
+ can only convert the format {12345678-1234-1234-1234-123456789ABC} and
+ will create the null UUID when the conversion fails.
+*/
+QUuid::QUuid( const QString &text )
+{
+ bool ok;
+ QString temp = text.upper();
+
+ data1 = temp.mid( 1, 8 ).toULong( &ok, 16 );
+ if ( !ok ) {
+ *this = QUuid();
+ return;
+ }
+
+ data2 = temp.mid( 10, 4 ).toUInt( &ok, 16 );
+ if ( !ok ) {
+ *this = QUuid();
+ return;
+ }
+ data3 = temp.mid( 15, 4 ).toUInt( &ok, 16 );
+ if ( !ok ) {
+ *this = QUuid();
+ return;
+ }
+ data4[0] = temp.mid( 20, 2 ).toUInt( &ok, 16 );
+ if ( !ok ) {
+ *this = QUuid();
+ return;
+ }
+ data4[1] = temp.mid( 22, 2 ).toUInt( &ok, 16 );
+ if ( !ok ) {
+ *this = QUuid();
+ return;
+ }
+ for ( int i = 2; i<8; i++ ) {
+ data4[i] = temp.mid( 25 + (i-2)*2, 2 ).toUShort( &ok, 16 );
+ if ( !ok ) {
+ *this = QUuid();
+ return;
+ }
+ }
+}
+#endif
+/*!
+ \fn QUuid QUuid::operator=(const QUuid &uuid )
+
+ Assigns the value of \a uuid to this QUuid object.
+*/
+
+/*!
+ \fn bool QUuid::operator==(const QUuid &other) const
+
+ Returns TRUE if this QUuid and the \a other QUuid are identical, otherwise returns FALSE.
+*/
+
+/*!
+ \fn bool QUuid::operator!=(const QUuid &other) const
+
+ Returns TRUE if this QUuid and the \a other QUuid are different, otherwise returns FALSE.
+*/
+#ifndef QT_NO_QUUID_STRING
+/*!
+ QString QUuid::toString() const
+
+ Returns a string in {12345678-1234-1234-1234-123456789ABC} format.
+*/
+QString QUuid::toString() const
+{
+ QString result;
+
+ result = "{" + QString::number( data1, 16 ).rightJustify( 8, '0' ) + "-";
+ result += QString::number( (int)data2, 16 ).rightJustify( 4, '0' ) + "-";
+ result += QString::number( (int)data3, 16 ).rightJustify( 4, '0' ) + "-";
+ result += QString::number( (int)data4[0], 16 ).rightJustify( 2, '0' );
+ result += QString::number( (int)data4[1], 16 ).rightJustify( 2, '0' ) + "-";
+ for ( int i = 2; i < 8; i++ )
+ result += QString::number( (int)data4[i], 16 ).rightJustify( 2, '0' );
+
+ return result + "}";
+}
+#endif
+/*!
+ Returns TRUE if this is the null UUID {00000000-0000-0000-0000-000000000000}, otherwise returns FALSE.
+*/
+bool QUuid::isNull() const
+{
+ return data4[0] == 0 && data4[1] == 0 && data4[2] == 0 && data4[3] == 0 &&
+ data4[4] == 0 && data4[5] == 0 && data4[6] == 0 && data4[7] == 0 &&
+ data1 == 0 && data2 == 0 && data3 == 0;
+}
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QUUID_H
+#define QUUID_H
+
+#ifndef QT_H
+#include <qstring.h>
+#endif // QT_H
+
+#include <memory.h>
+
+#if defined(Q_OS_WIN32)
+#ifndef GUID_DEFINED
+#define GUID_DEFINED
+typedef struct _GUID
+{
+ ulong Data1;
+ ushort Data2;
+ ushort Data3;
+ uchar Data4[ 8 ];
+} GUID;
+#endif
+#endif
+
+#if defined( Q_WS_QWS ) && !defined( UUID_H_INCLUDED )
+typedef unsigned char uuid_t[16];
+#endif
+
+struct Q_EXPORT QUuid
+{
+ QUuid()
+ {
+ memset( this, 0, sizeof(QUuid) );
+ }
+ QUuid( uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8 )
+ {
+ data1 = l;
+ data2 = w1;
+ data3 = w2;
+ data4[0] = b1;
+ data4[1] = b2;
+ data4[2] = b3;
+ data4[3] = b4;
+ data4[4] = b5;
+ data4[5] = b6;
+ data4[6] = b7;
+ data4[7] = b8;
+ }
+ QUuid( const QUuid &uuid )
+ {
+ memcpy( this, &uuid, sizeof(QUuid) );
+ }
+#ifndef QT_NO_QUUID_STRING
+ QUuid( const QString & );
+ QString toString() const;
+#endif
+ bool isNull() const;
+
+ QUuid &operator=(const QUuid &orig )
+ {
+ memcpy( this, &orig, sizeof(QUuid) );
+ return *this;
+ }
+
+ bool operator==(const QUuid &orig ) const
+ {
+ return !memcmp( this, &orig, sizeof(QUuid) );
+ }
+
+ bool operator!=(const QUuid &orig ) const
+ {
+ return !( *this == orig );
+ }
+
+#if defined(Q_OS_WIN32)
+ // On Windows we have a type GUID that is used by the platform API, so we
+ // provide convenience operators to cast from and to this type.
+ QUuid( const GUID &guid )
+ {
+ memcpy( this, &guid, sizeof(GUID) );
+ }
+
+ QUuid &operator=(const GUID &orig )
+ {
+ memcpy( this, &orig, sizeof(QUuid) );
+ return *this;
+ }
+
+ operator GUID() const
+ {
+ GUID guid = { data1, data2, data3, { data4[0], data4[1], data4[2], data4[3], data4[4], data4[5], data4[6], data4[7] } };
+ return guid;
+ }
+
+ bool operator==( const GUID &guid ) const
+ {
+ return !memcmp( this, &guid, sizeof(QUuid) );
+ }
+
+ bool operator!=( const GUID &guid ) const
+ {
+ return !( *this == guid );
+ }
+#endif
+#if defined (Q_WS_QWS)
+ QUuid( uuid_t uuid )
+ {
+ memcpy( this, &uuid, sizeof(uuid_t) );
+ }
+
+ QUuid &operator=(const uuid_t &orig )
+ {
+ memcpy( this, &orig, sizeof(uuid_t) );
+ return *this;
+ }
+#endif
+
+ ulong data1;
+ ushort data2;
+ ushort data3;
+ uchar data4[ 8 ];
+};
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "qpeapplication.h"
+#include "resource.h"
+#include <qdir.h>
+#include <qfile.h>
+#include <qregexp.h>
+#include <qpixmapcache.h>
+#include <qpainter.h>
+
+#include "inlinepics_p.h"
+
+/*!
+ \class Resource resource.h
+ \brief The Resource class provides access to named resources.
+
+ The resources may be provided from files or other sources.
+*/
+
+/*!
+ \fn Resource::Resource()
+ \internal
+*/
+
+/*!
+ Returns the QPixmap named \a pix. You should avoid including
+ any filename type extension (eg. .png, .xpm).
+*/
+QPixmap Resource::loadPixmap( const QString &pix )
+{
+ QPixmap pm;
+ QString key="QPE_"+pix;
+ if ( !QPixmapCache::find(key,pm) ) {
+ pm.convertFromImage(loadImage(pix));
+ QPixmapCache::insert(key,pm);
+ }
+ return pm;
+}
+
+/*!
+ Returns the QBitmap named \a pix. You should avoid including
+ any filename type extension (eg. .png, .xpm).
+*/
+QBitmap Resource::loadBitmap( const QString &pix )
+{
+ QBitmap bm;
+ bm = loadPixmap(pix);
+ return bm;
+}
+
+/*!
+ Returns the filename of a pixmap named \a pix. You should avoid including
+ any filename type extension (eg. .png, .xpm).
+
+ Normally you will use loadPixmap() rather than this function.
+*/
+QString Resource::findPixmap( const QString &pix )
+{
+ QString picsPath = QPEApplication::qpeDir() + "pics/";
+
+ if ( QFile( picsPath + pix + ".png").exists() )
+ return picsPath + pix + ".png";
+ else if ( QFile( picsPath + pix + ".xpm").exists() )
+ return picsPath + pix + ".xpm";
+ else if ( QFile( picsPath + pix ).exists() )
+ return picsPath + pix;
+
+ //qDebug("Cannot find pixmap: %s", pix.latin1());
+ return QString();
+}
+
+/*!
+ Returns a sound file for a sound named \a name.
+ You should avoid including any filename type extension (eg. .wav, .au, .mp3).
+*/
+QString Resource::findSound( const QString &name )
+{
+ QString picsPath = QPEApplication::qpeDir() + "sounds/";
+
+ QString result;
+ if ( QFile( (result = picsPath + name + ".wav") ).exists() )
+ return result;
+
+ return QString();
+}
+
+/*!
+ Returns a list of all sound names.
+*/
+QStringList Resource::allSounds()
+{
+ QDir resourcedir( QPEApplication::qpeDir() + "sounds/", "*.wav" );
+ QStringList entries = resourcedir.entryList();
+ QStringList result;
+ for (QStringList::Iterator i=entries.begin(); i != entries.end(); ++i)
+ result.append((*i).replace(QRegExp("\\.wav"),""));
+ return result;
+}
+
+/*!
+ Returns the QImage named \a name. You should avoid including
+ any filename type extension (eg. .png, .xpm).
+*/
+QImage Resource::loadImage( const QString &name)
+{
+ QImage img = qembed_findImage(name.latin1());
+ if ( img.isNull() )
+ return QImage(findPixmap(name));
+ return img;
+}
+
+/*!
+ \fn QIconSet Resource::loadIconSet( const QString &name )
+
+ Returns a QIconSet for the pixmap named \a name. A disabled icon is
+ generated that conforms to the Qtopia look & feel. You should avoid
+ including any filename type extension (eg. .png, .xpm).
+*/
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef PIXMAPLOADER_H
+#define PIXMAPLOADER_H
+
+#include <qimage.h>
+#include <qbitmap.h>
+#include <qiconset.h>
+#include <qstringlist.h>
+
+class Resource
+{
+public:
+ Resource() {}
+
+ static QImage loadImage( const QString &name);
+
+ static QPixmap loadPixmap( const QString &name );
+ static QBitmap loadBitmap( const QString &name );
+ static QString findPixmap( const QString &name );
+
+ static QIconSet loadIconSet( const QString &name );
+
+ static QString findSound( const QString &name );
+ static QStringList allSounds();
+};
+
+// Inline for compatibility with SHARP ROMs
+inline QIconSet Resource::loadIconSet( const QString &pix )
+{
+ QImage img = loadImage( pix );
+ QPixmap pm;
+ pm.convertFromImage( img );
+ QIconSet is( pm );
+ QIconSet::Size size = pm.width() <= 22 ? QIconSet::Small : QIconSet::Large;
+
+ QPixmap dpm = loadPixmap( pix + "_disabled" );
+
+#ifndef QT_NO_DEPTH_32 // have alpha-blended pixmaps
+ if ( dpm.isNull() ) {
+ QImage dimg( img.width(), img.height(), 32 );
+ for ( int y = 0; y < img.height(); y++ ) {
+ for ( int x = 0; x < img.width(); x++ ) {
+ QRgb p = img.pixel( x, y );
+ uint a = (p & 0xff000000) / 3;
+ p = (p & 0x00ffffff) | (a & 0xff000000);
+ dimg.setPixel( x, y, p );
+ }
+ }
+
+ dimg.setAlphaBuffer( TRUE );
+ dpm.convertFromImage( dimg );
+ }
+#endif
+
+ if ( !dpm.isNull() )
+ is.setPixmap( dpm, size, QIconSet::Disabled );
+
+ return is;
+}
+
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include <qpe/resource.h>
+#include <qpe/sound.h>
+#include <qpe/qcopenvelope_qws.h>
+
+#include <qsound.h>
+#include <qfile.h>
+
+#ifndef QT_NO_SOUND
+static int WAVsoundDuration(const QString& filename)
+{
+ // bad solution
+
+ // most of this is copied from qsoundqss.cpp
+
+ QFile input(filename);
+ if ( !input.open(IO_ReadOnly) )
+ return 0;
+
+ struct QRiffChunk {
+ char id[4];
+ Q_UINT32 size;
+ char data[4/*size*/];
+ } chunk;
+
+ struct {
+ Q_INT16 formatTag;
+ Q_INT16 channels;
+ Q_INT32 samplesPerSec;
+ Q_INT32 avgBytesPerSec;
+ Q_INT16 blockAlign;
+ Q_INT16 wBitsPerSample;
+ } chunkdata;
+
+ int total = 0;
+
+ while(1) {
+ // Keep reading chunks...
+ const int n = sizeof(chunk)-sizeof(chunk.data);
+ if ( input.readBlock((char*)&chunk,n) != n )
+ break;
+ if ( qstrncmp(chunk.id,"data",4) == 0 ) {
+ total += chunkdata.avgBytesPerSec ?
+ chunk.size * 1000 / chunkdata.avgBytesPerSec : 0;
+//qDebug("%d bytes of PCM (%dms)", chunk.size,chunkdata.avgBytesPerSec ? chunk.size * 1000 / chunkdata.avgBytesPerSec : 0);
+ input.at(input.at()+chunk.size-4);
+ } else if ( qstrncmp(chunk.id,"RIFF",4) == 0 ) {
+ char d[4];
+ if ( input.readBlock(d,4) != 4 )
+ return 0;
+ if ( qstrncmp(d,"WAVE",4) != 0 ) {
+ // skip
+//qDebug("skip %.4s RIFF chunk",d);
+ if ( chunk.size < 10000000 )
+ (void)input.at(input.at()+chunk.size-4);
+ }
+ } else if ( qstrncmp(chunk.id,"fmt ",4) == 0 ) {
+ if ( input.readBlock((char*)&chunkdata,sizeof(chunkdata)) != sizeof(chunkdata) )
+ return 0;
+#define WAVE_FORMAT_PCM 1
+ if ( chunkdata.formatTag != WAVE_FORMAT_PCM ) {
+ //qDebug("WAV file: UNSUPPORTED FORMAT %d",chunkdata.formatTag);
+ return 0;
+ }
+ } else {
+//qDebug("skip %.4s chunk",chunk.id);
+ // ignored chunk
+ if ( chunk.size < 10000000 )
+ (void)input.at(input.at()+chunk.size);
+ }
+ }
+
+//qDebug("%dms",total);
+ return total;
+}
+
+class SoundData : public QSound {
+public:
+ SoundData(const QString& name) :
+ QSound(Resource::findSound(name)),
+ filename(Resource::findSound(name))
+ {
+ }
+
+ void playLoop()
+ {
+ // needs server support
+
+ int ms = WAVsoundDuration(filename);
+ if ( ms )
+ startTimer(ms > 50 ? ms-50 : 0); // 50 for latency
+ play();
+ }
+
+ void timerEvent(QTimerEvent*)
+ {
+ play();
+ }
+
+private:
+ QString filename;
+};
+#endif
+
+Sound::Sound(const QString& name)
+{
+#ifndef QT_NO_SOUND
+ d = new SoundData(name);
+#endif
+}
+
+Sound::~Sound()
+{
+#ifndef QT_NO_SOUND
+ delete d;
+#endif
+}
+
+void Sound::play()
+{
+#ifndef QT_NO_SOUND
+ d->killTimers();
+ d->play();
+#endif
+}
+
+void Sound::playLoop()
+{
+#ifndef QT_NO_SOUND
+ d->killTimers();
+ d->playLoop();
+#endif
+}
+
+void Sound::stop()
+{
+#ifndef QT_NO_SOUND
+ d->killTimers();
+#endif
+}
+
+
+void Sound::soundAlarm()
+{
+#ifdef QT_QWS_CUSTOM
+# ifndef QT_NO_COP
+ QCopEnvelope( "QPE/TaskBar", "soundAlarm()" );
+# endif
+#else
+# ifndef QT_NO_SOUND
+ QSound::play(Resource::findSound("alarm"));
+# endif
+#endif
+}
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef SOUND_H
+#define SOUND_H
+
+class QString;
+class SoundData;
+
+class Sound {
+public:
+ Sound(const QString& name);
+ ~Sound();
+
+ void play();
+ void playLoop();
+ void stop();
+
+ static void soundAlarm();
+ //static void soundClick();
+ //static void soundTap();
+
+private:
+ SoundData* d;
+};
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include <qpe/storage.h>
+#ifdef QT_QWS_CUSTOM
+#include <qpe/custom.h>
+#endif
+
+#include <qtimer.h>
+#include <qcopchannel_qws.h>
+
+#include <stdio.h>
+
+#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
+#include <sys/vfs.h>
+#include <mntent.h>
+#endif
+
+#include <qstringlist.h>
+
+static bool isCF(const QString& m)
+{
+ FILE* f = fopen("/var/run/stab", "r");
+ if (!f) f = fopen("/var/state/pcmcia/stab", "r");
+ if (!f) f = fopen("/var/lib/pcmcia/stab", "r");
+ if ( f ) {
+ char line[1024];
+ char devtype[80];
+ char devname[80];
+ while ( fgets( line, 1024, f ) ) {
+ // 0 ide ide-cs 0 hda 3 0
+ if ( sscanf(line,"%*d %s %*s %*s %s", devtype, devname )==2 )
+ {
+ if ( QString(devtype) == "ide" && m.find(devname)>0 ) {
+ fclose(f);
+ return TRUE;
+ }
+ }
+ }
+ fclose(f);
+ }
+ return FALSE;
+}
+
+StorageInfo::StorageInfo( QObject *parent )
+ : QObject( parent )
+{
+ mFileSystems.setAutoDelete( TRUE );
+ channel = new QCopChannel( "QPE/Card", this );
+ connect( channel, SIGNAL(received(const QCString &, const QByteArray &)),
+ this, SLOT(cardMessage( const QCString &, const QByteArray &)) );
+ update();
+}
+
+const FileSystem *StorageInfo::fileSystemOf( const QString &filename )
+{
+ for (QListIterator<FileSystem> i(mFileSystems); i.current(); ++i) {
+ if ( filename.startsWith( (*i)->path() ) )
+ return (*i);
+ }
+ return 0;
+}
+
+
+void StorageInfo::cardMessage( const QCString& msg, const QByteArray& )
+{
+ if ( msg == "mtabChanged()" )
+ update();
+}
+
+void StorageInfo::update()
+{
+ //qDebug("StorageInfo::updating");
+#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
+ struct mntent *me;
+ FILE *mntfp = setmntent( "/etc/mtab", "r" );
+
+ QStringList curdisks;
+ QStringList curopts;
+ QStringList curfs;
+ bool rebuild = FALSE;
+ int n=0;
+ if ( mntfp ) {
+ while ( (me = getmntent( mntfp )) != 0 ) {
+ QString fs = me->mnt_fsname;
+ if ( fs.left(7)=="/dev/hd" || fs.left(7)=="/dev/sd"
+ || fs.left(8)=="/dev/mtd" || fs.left(9) == "/dev/mmcd" )
+ {
+ n++;
+ curdisks.append(fs);
+ curopts.append( me->mnt_opts );
+ //qDebug("-->fs %s opts %s", fs.latin1(), me->mnt_opts );
+ curfs.append( me->mnt_dir );
+ bool found = FALSE;
+ for (QListIterator<FileSystem> i(mFileSystems); i.current(); ++i) {
+ if ( (*i)->disk() == fs ) {
+ found = TRUE;
+ break;
+ }
+ }
+ if ( !found )
+ rebuild = TRUE;
+ }
+ }
+ endmntent( mntfp );
+ }
+ if ( rebuild || n != (int)mFileSystems.count() ) {
+ mFileSystems.clear();
+ QStringList::ConstIterator it=curdisks.begin();
+ QStringList::ConstIterator fsit=curfs.begin();
+ QStringList::ConstIterator optsIt=curopts.begin();
+ for (; it!=curdisks.end(); ++it, ++fsit, ++optsIt) {
+ QString opts = *optsIt;
+
+ QString disk = *it;
+ QString humanname;
+ bool removable = FALSE;
+ if ( isCF(disk) ) {
+ humanname = tr("CF Card");
+ removable = TRUE;
+ } else if ( disk == "/dev/hda1" ) {
+ humanname = tr("Hard Disk");
+ } else if ( disk.left(9) == "/dev/mmcd" ) {
+ humanname = tr("SD Card");
+ removable = TRUE;
+ } else if ( disk.left(7) == "/dev/hd" )
+ humanname = tr("Hard Disk") + " " + humanname.mid(7);
+ else if ( disk.left(7) == "/dev/sd" )
+ humanname = tr("SCSI Hard Disk") + " " + humanname.mid(7);
+ else if ( disk == "/dev/mtdblock1" || humanname == "/dev/mtdblock/1" )
+ humanname = tr("Internal Storage");
+ else if ( disk.left(14) == "/dev/mtdblock/" )
+ humanname = tr("Internal Storage") + " " + humanname.mid(14);
+ else if ( disk.left(13) == "/dev/mtdblock" )
+ humanname = tr("Internal Storage") + " " + humanname.mid(13);
+ FileSystem *fs = new FileSystem( disk, *fsit, humanname, removable, opts );
+ mFileSystems.append( fs );
+ }
+ emit disksChanged();
+ } else {
+ // just update them
+ for (QListIterator<FileSystem> i(mFileSystems); i.current(); ++i)
+ i.current()->update();
+ }
+#endif
+}
+
+//---------------------------------------------------------------------------
+
+FileSystem::FileSystem( const QString &disk, const QString &path, const QString &name, bool rem, const QString &o )
+ : fsdisk( disk ), fspath( path ), humanname( name ), blkSize(512), totalBlks(0), availBlks(0), removable( rem ), opts( o )
+{
+ update();
+}
+
+void FileSystem::update()
+{
+#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
+ struct statfs fs;
+ if ( !statfs( fspath.latin1(), &fs ) ) {
+ blkSize = fs.f_bsize;
+ totalBlks = fs.f_blocks;
+ availBlks = fs.f_bavail;
+ } else {
+ blkSize = 0;
+ totalBlks = 0;
+ availBlks = 0;
+ }
+#endif
+}
+
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef __storage_h__
+#define __storage_h__
+
+#include <qobject.h>
+#include <qlist.h>
+
+class FileSystem;
+class QCopChannel;
+
+class StorageInfo : public QObject
+{
+ Q_OBJECT
+public:
+ StorageInfo( QObject *parent=0 );
+
+ const QList<FileSystem> &fileSystems() const { return mFileSystems; }
+ const FileSystem *fileSystemOf( const QString &filename );
+
+signals:
+ void disksChanged();
+
+public slots:
+ void update();
+
+private slots:
+ void cardMessage( const QCString& msg, const QByteArray& data );
+private:
+ QList<FileSystem> mFileSystems;
+ QCopChannel *channel;
+};
+
+class FileSystem
+{
+public:
+ const QString &disk() const { return fsdisk; }
+ const QString &path() const { return fspath; }
+ const QString &name() const { return humanname; }
+ const QString &options() const { return opts; }
+ long blockSize() const { return blkSize; }
+ long totalBlocks() const { return totalBlks; }
+ long availBlocks() const { return availBlks; }
+ bool isRemovable() const { return removable; }
+ bool isWritable() const { return opts.contains("rw"); }
+
+private:
+ friend class StorageInfo;
+ FileSystem( const QString &disk, const QString &path, const QString &humanname, bool rem, const QString &opts );
+ void update();
+
+ QString fsdisk;
+ QString fspath;
+ QString humanname;
+ long blkSize;
+ long totalBlks;
+ long availBlks;
+ bool removable;
+ QString opts;
+};
+
+
+#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 @@
+Files:
+Priority: required
+Section: qpe/system
+Maintainer: Warwick Allison <warwick@trolltech.com>
+Architecture: arm
+Version: $QPE_VERSION-3
+Depends: qpe-qipkg qpe-base
+Description: Bootstrap Qtopia environment
+ A complete GUI environment for handhelds.
+ 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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef TASKBARAPPLETINTERFACE_H
+#define TASKBARAPPLETINTERFACE_H
+
+#include <qpe/qcom.h>
+
+#ifndef QT_NO_COMPONENT
+// {6CA34D0B-C637-4865-A667-7D4CD8A70407}
+# ifndef IID_TaskbarApplet
+# define IID_TaskbarApplet QUuid( 0x6ca34d0b, 0xc637, 0x4865, 0xa6, 0x67, 0x7d, 0x4c, 0xd8, 0xa7, 0x04, 0x07)
+# endif
+#endif
+
+class QWidget;
+
+struct TaskbarAppletInterface : public QUnknownInterface
+{
+ virtual QWidget *applet( QWidget *parent ) = 0;
+ virtual int position() const = 0;
+};
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "timestring.h"
+#include <qobject.h>
+#include "qpeapplication.h" //for qApp
+#include "config.h"
+
+
+class TimeStringFormatKeeper : public QObject
+{
+ Q_OBJECT
+public:
+ static DateFormat currentFormat()
+ {
+ if ( !self )
+ self = new TimeStringFormatKeeper;
+ return self->format;
+ }
+private slots:
+ void formatChanged( DateFormat f )
+ {
+ format = f;
+ }
+private:
+ static TimeStringFormatKeeper *self;
+ DateFormat format;
+
+ TimeStringFormatKeeper()
+ : QObject( qApp )
+ {
+ Config config("qpe");
+ config.setGroup( "Date" );
+ format = DateFormat(QChar(config.readEntry("Separator", "/")[0]),
+ (DateFormat::Order)config .readNumEntry("ShortOrder", DateFormat::DayMonthYear),
+ (DateFormat::Order)config.readNumEntry("LongOrder", DateFormat::DayMonthYear));
+
+ connect( qApp, SIGNAL( dateFormatChanged(DateFormat) ),
+ this, SLOT( formatChanged( DateFormat ) ) );
+ }
+};
+
+TimeStringFormatKeeper *TimeStringFormatKeeper::self = 0;
+
+QString DateFormat::toNumberString() const
+{
+ QString buf = "";
+ // for each part of the order
+ for (int i = 0; i < 3; i++) {
+ // switch on the relavent 3 bits.
+ switch((_shortOrder >> (i * 3)) & 0x0007) {
+ case 0x0001:
+ buf += QObject::tr( "D" );
+ break;
+ case 0x0002:
+ buf += QObject::tr( "M" );
+ break;
+ case 0x0004:
+ buf += QObject::tr( "Y" );
+ break;
+ }
+ if (i < 2)
+ buf += _shortSeparator;
+ }
+ return buf;
+}
+
+QString DateFormat::toWordString() const
+{
+ QString buf = "";
+ // for each part of the order
+ for (int i = 0; i < 3; i++) {
+ // switch on the relavent 3 bits.
+ switch((_longOrder >> (i * 3)) & 0x0007) {
+ case 0x0001:
+ buf += QObject::tr( "day" );
+ if (i < 2) {
+ if ((_shortOrder << ((i+1) * 3)) & 0x0007)
+ buf += ", ";
+ else
+ buf += " ";
+ }
+ break;
+ case 0x0002:
+ buf += QObject::tr( "month" );
+ if (i < 2)
+ buf += " ";
+ break;
+ case 0x0004:
+ buf += QObject::tr( "year" );
+ if (i < 2)
+ buf += ", ";
+ break;
+ }
+ }
+ return buf;
+}
+
+QString DateFormat::numberDate(const QDate &d, int v) const
+{
+ QString buf = "";
+
+ int pad = 0;
+ if (v & padNumber)
+ pad = 2;
+
+ // for each part of the order
+ for (int i = 0; i < 3; i++) {
+ // switch on the relavent 3 bits.
+ switch((_shortOrder >> (i * 3)) & 0x0007) {
+ case 0x0001:
+ buf += QString("%1").arg(d.day(), pad);
+ break;
+ case 0x0002:
+ buf += QString("%1").arg(d.month(), pad);
+ break;
+ case 0x0004:
+ {
+ int year = d.year();
+ if (!(v & longNumber))
+ year = year % 100;
+
+ if (year < 10)
+ buf += "0";
+
+ buf += QString::number(year);
+
+ }
+ break;
+ }
+ if (i < 2)
+ buf = _shortSeparator;
+ }
+ return buf;
+}
+
+QString DateFormat::wordDate(const QDate &d, int v) const
+{
+ QString buf = "";
+ // for each part of the order
+ if (v & showWeekDay) {
+ QString weekDay = d.dayName(d.dayOfWeek());
+ if (!(v & longWord)) {
+ weekDay = weekDay.left(3);
+ }
+ buf += weekDay;
+ if (_longOrder & 0x0007 == 0x0002)
+ buf += ' ';
+ else
+ buf += ", ";
+ }
+
+ int pad = 0;
+ if (v & padNumber)
+ pad = 2;
+
+ for (int i = 0; i < 3; i++) {
+ // switch on the relavent 3 bits.
+ switch((_longOrder >> (i * 3)) & 0x0007) {
+ case 0x0001:
+ buf += QString("%1").arg(d.day(), pad);
+ if (i < 2) {
+ if ((_shortOrder << ((i+1) * 3)) & 0x0007)
+ buf += ", ";
+ else
+ buf += " ";
+ }
+ break;
+ case 0x0002:
+ {
+ QString monthName = d.monthName(d.month());
+ if (!(v & longWord)) {
+ monthName = monthName.left(3);
+ }
+ buf += monthName;
+ }
+ if (i < 2)
+ buf += " ";
+ break;
+ case 0x0004:
+ {
+ int year = d.year();
+ if (!(v & longNumber))
+ year = year % 100;
+
+ if (year < 10)
+ buf += "0";
+
+ buf += QString::number(year);
+ }
+ if (i < 2)
+ buf += ", ";
+ break;
+ }
+ }
+ return buf;
+}
+
+#ifndef QT_NO_DATASTREAM
+void DateFormat::save(QDataStream &d) const
+{
+ d << _shortSeparator.unicode();
+ uint v= _shortOrder;
+ d << v;
+ v = _longOrder;
+ d << v;
+}
+
+void DateFormat::load(QDataStream &d)
+{
+ ushort value;
+ d >> value;
+ _shortSeparator = QChar(value);
+ uint v = 0;
+ d >> v;
+ _shortOrder = (Order)v;
+ v = 0;
+ d >> v;
+ _longOrder = (Order)v;
+}
+
+QDataStream &operator<<(QDataStream &s, const DateFormat&df)
+{
+ df.save(s);
+ return s;
+}
+QDataStream &operator>>(QDataStream &s, DateFormat&df)
+{
+ df.load(s);
+ return s;
+}
+#endif
+
+QString TimeString::shortDate( const QDate &d, DateFormat dtf )
+{
+ return dtf.wordDate(d);
+}
+
+QString TimeString::dateString( const QDate &d, DateFormat dtf )
+{
+ return dtf.wordDate(d, DateFormat::longNumber | DateFormat::longWord);
+}
+
+
+QString TimeString::longDateString( const QDate &d, DateFormat dtf )
+{
+ return dtf.wordDate(d, DateFormat::showWeekDay | DateFormat::longNumber
+ | DateFormat::longWord);
+}
+
+DateFormat TimeString::currentDateFormat()
+{
+ return TimeStringFormatKeeper::currentFormat();
+}
+
+
+QString TimeString::dateString( const QDateTime &dt, bool ampm, bool seconds, DateFormat dtf )
+{
+ const QDate& d = dt.date();
+ const QTime& t = dt.time();
+
+ // based on QDateTime::toString()
+ QString buf = timeString(t,ampm,seconds);
+ buf += " ";
+ buf += longDateString( d, dtf );
+
+ return buf;
+}
+
+QString TimeString::timeString( const QTime &t, bool ampm, bool seconds )
+{
+ if ( !ampm ) {
+ if ( seconds )
+ return t.toString();
+ QString r = QString::number(t.hour());
+ if ( t.hour() < 10 ) r.prepend( "0" );
+ r.append( ":" );
+ if ( t.minute() < 10 ) r.append( "0" );
+ r.append(QString::number(t.minute()));
+ return r;
+ }
+ // ### else the hard case that should disappear in Qt 3.0
+ QString argString = seconds ? "%4:%5:%6 %7" : "%4:%5 %7";
+ int hour = t.hour();
+ QString strMin = QString::number( t.minute() );
+ QString strSec = QString::number( t.second() );
+ if ( hour > 12 )
+ argString = argString.arg( hour - 12, 2 );
+ else {
+ if ( hour == 0 )
+ argString = argString.arg( 12 );
+ else
+ argString = argString.arg( hour, 2 );
+ }
+ if ( t.minute() < 10 )
+ strMin.prepend( "0" );
+ if ( t.second() < 10 )
+ strSec.prepend( "0" );
+ argString = argString.arg( strMin );
+ if ( seconds )
+ argString = argString.arg( strSec );
+ if ( hour >= 12 )
+ argString = argString.arg( QObject::tr("PM") );
+ else
+ argString = argString.arg( QObject::tr("AM") );
+ return argString;
+}
+
+QString TimeString::shortTime( bool ampm, bool seconds )
+{
+ static const char* const day[] = {
+ QT_TRANSLATE_NOOP( "QObject", "Mon" ),
+ QT_TRANSLATE_NOOP( "QObject", "Tue" ),
+ QT_TRANSLATE_NOOP( "QObject", "Wed" ),
+ QT_TRANSLATE_NOOP( "QObject", "Thu" ),
+ QT_TRANSLATE_NOOP( "QObject", "Fri" ),
+ QT_TRANSLATE_NOOP( "QObject", "Sat" ),
+ QT_TRANSLATE_NOOP( "QObject", "Sun" )
+ };
+ // just create a shorter time String
+ QDateTime dtTmp = QDateTime::currentDateTime();
+ QString strTime;
+ strTime = QObject::tr( day[dtTmp.date().dayOfWeek()-1] ) + " " +
+ timeString( dtTmp.time(), ampm, seconds );
+ return strTime;
+}
+
+QString TimeString::dateString( const QDateTime &t, bool ampm )
+{
+ return dateString(t,ampm,FALSE);
+}
+
+QString TimeString::timeString( const QTime &t, bool ampm)
+{
+ return timeString(t,ampm,FALSE);
+}
+
+QString TimeString::shortTime( bool ampm )
+{
+ return shortTime(ampm,FALSE);
+}
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef _TIMESTRING_H_
+#define _TIMESTRING_H_
+#include <qdatetime.h>
+#include <qstring.h>
+
+// return a string with the time based on whether or not you want
+// you want it in 12 hour form. if ampm is true, then return
+// it in 12 hour (am/pm) form otherwise return it in 24 hour form
+// in theory Qt 3,0 handles this better (hopefully obsoleteing this)
+class DateFormat
+{
+public:
+ // date format type 001,010,100 = day month year
+ enum Order {
+ DayMonthYear = 0x0111, // 0x001 + 0x010(0x2 << 3) + 0x100(0x4 << 3)
+ MonthDayYear = 0x010A,
+ YearMonthDay = 0x0054
+ };
+
+ DateFormat(QChar s = '/', Order so = MonthDayYear) : _shortOrder(so),
+ _longOrder(so), _shortSeparator(s) { }
+ DateFormat(QChar s, Order so, Order lo) : _shortOrder(so),
+ _longOrder(lo), _shortSeparator(s) { }
+ DateFormat(const DateFormat &o) : _shortOrder(o._shortOrder),
+ _longOrder(o._longOrder), _shortSeparator(o._shortSeparator) { }
+
+ bool operator==(const DateFormat &o)
+ {
+ if (o._shortOrder == _shortOrder && o._longOrder == _longOrder &&
+ o._shortSeparator == _shortSeparator)
+ return TRUE;
+ return FALSE;
+ }
+
+ // verbosity specifiers
+ enum Verbosity {
+ shortNumber = 0x01, // default
+ longNumber = 0x02,
+
+ padNumber = 0x04,
+
+ shortWord = 0x08, // default
+ longWord = 0x10,
+
+ showWeekDay = 0x20
+ };
+
+ QString toNumberString() const; // the M/D/Y string.
+ QString toWordString() const; // the Month day, year string.
+
+ QString numberDate(const QDate &d, int v = 0) const;
+ QString wordDate(const QDate &d, int v = 0) const;
+
+#ifndef QT_NO_DATASTREAM
+ void load(QDataStream&);
+ void save(QDataStream&) const;
+#endif
+
+ QChar separator() const { return _shortSeparator; };
+ Order shortOrder() const { return _shortOrder; };
+ Order longOrder() const { return _longOrder; };
+
+private:
+ Order _shortOrder;
+ Order _longOrder;
+ QChar _shortSeparator;
+};
+
+#ifndef QT_NO_DATASTREAM
+QDataStream &operator<<(QDataStream &s, const DateFormat&df);
+QDataStream &operator>>(QDataStream &s, DateFormat&df);
+#endif
+
+class TimeString
+{
+public:
+
+ //enum DateFormat { MonthDayYear, DayMonthYear, ISO8601,
+ //YearMonthDay = ISO8601 };
+
+
+ static QString shortDate( const QDate &d )
+ { return shortDate( d, currentDateFormat() ); }
+ static QString dateString( const QDate &d )
+ { return dateString( d, currentDateFormat() ); }
+ static QString longDateString( const QDate &d )
+ { return longDateString( d, currentDateFormat() ); }
+ static QString dateString( const QDateTime &dt, bool ampm, bool seconds )
+ { return dateString( dt, ampm, seconds, currentDateFormat() ); }
+
+ static QString dateString( const QDateTime &t, bool ampm = false );
+ static QString timeString( const QTime &t, bool ampm, bool seconds );
+ static QString timeString( const QTime &t, bool ampm = false );
+ static QString shortTime( bool ampm, bool seconds );
+ static QString shortTime( bool ampm = false );
+
+
+
+ static QString shortDate( const QDate &, DateFormat );
+ static QString dateString( const QDate &, DateFormat );
+ static QString longDateString( const QDate &, DateFormat );
+
+ static DateFormat currentDateFormat();
+
+private:
+ static QString dateString( const QDateTime &t, bool ampm, bool seconds, DateFormat );
+
+
+};
+#endif
+
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "tzselect.h"
+#include "resource.h"
+#include "global.h"
+#include "config.h"
+#include <qtoolbutton.h>
+#include <qfile.h>
+#include <stdlib.h>
+
+#ifdef Q_WS_QWS
+#include <qcopchannel_qws.h>
+#endif
+
+TZCombo::TZCombo( QWidget *p, const char* n )
+ : QComboBox( p, n )
+{
+ updateZones();
+ // check to see if TZ is set, if it is set the current item to that
+ QString tz = getenv("TZ");
+ if ( !tz.isNull() ) {
+ int n = 0,
+ index = 0;
+ for ( QStringList::Iterator it=identifiers.begin();
+ it!=identifiers.end(); ++it) {
+ if ( *it == tz )
+ index = n;
+ n++;
+ }
+ setCurrentItem(index);
+ } else {
+ setCurrentItem(0);
+ }
+
+
+
+ // listen on QPE/System
+#if defined(Q_WS_QWS)
+#if !defined(QT_NO_COP)
+ QCopChannel *channel = new QCopChannel( "QPE/System", this );
+ connect( channel, SIGNAL(received(const QCString&, const QByteArray&)),
+ this, SLOT(handleSystemChannel(const QCString&, const QByteArray&)) );
+#endif
+#endif
+
+
+}
+
+TZCombo::~TZCombo()
+{
+}
+
+void TZCombo::updateZones()
+{
+ QString cur = currentText();
+ clear();
+ identifiers.clear();
+ int curix=0;
+ QString tz = getenv("TZ");
+ bool tzFound = FALSE;
+ Config cfg("CityTime");
+ cfg.setGroup("TimeZones");
+ int i=0;
+ for ( ; 1; i++ ) {
+ QString zn = cfg.readEntry("Zone"+QString::number(i), QString::null);
+ if ( zn.isNull() )
+ break;
+ if ( zn == tz )
+ tzFound = TRUE;
+ QString nm = cfg.readEntry("ZoneName"+QString::number(i));
+ identifiers.append(zn);
+ insertItem(nm);
+ if ( nm == cur )
+ curix = i;
+ }
+ if ( !tzFound && !tz.isEmpty()) {
+ int i = tz.find( '/' );
+ QString nm = tz.mid( i+1 );
+ identifiers.append(tz);
+ insertItem(nm);
+ if ( nm == cur )
+ curix = i;
+ ++i;
+ }
+ for (QStringList::Iterator it=extras.begin(); it!=extras.end(); ++it) {
+ insertItem(*it);
+ identifiers.append(*it);
+ if ( *it == cur )
+ curix = i;
+ ++i;
+ }
+ if ( !i ) {
+ QStringList list = timezoneDefaults();
+ for ( QStringList::Iterator it = list.begin(); it!=list.end(); ++it ) {
+ identifiers.append(*it); ++it;
+ insertItem(*it);
+ }
+ }
+ setCurrentItem(curix);
+}
+
+
+void TZCombo::keyPressEvent( QKeyEvent *e )
+{
+ // ### should popup() in Qt 3.0 (it's virtual there)
+// updateZones();
+ QComboBox::keyPressEvent(e);
+}
+
+void TZCombo::mousePressEvent(QMouseEvent*e)
+{
+ // ### should popup() in Qt 3.0 (it's virtual there)
+// updateZones();
+ QComboBox::mousePressEvent(e);
+}
+
+QString TZCombo::currZone() const
+{
+ return identifiers[currentItem()];
+}
+
+void TZCombo::setCurrZone( const QString& id )
+{
+ for (int i=0; i< count(); i++) {
+ if ( identifiers[i] == id ) {
+ setCurrentItem(i);
+ return;
+ }
+ }
+ insertItem(id);
+ setCurrentItem( count() - 1);
+ identifiers.append(id);
+ extras.append(id);
+}
+
+
+
+void TZCombo::handleSystemChannel(const QCString&msg, const QByteArray&)
+{
+ if ( msg == "timeZoneListChange()" ) {
+ updateZones();
+ }
+}
+
+
+TimeZoneSelector::TimeZoneSelector(QWidget* p, const char* n) :
+ QHBox(p,n)
+{
+ // build the combobox before we do any updates...
+ cmbTz = new TZCombo( this, "timezone combo" );
+
+ cmdTz = new QToolButton( this, "timezone button" );
+ QPixmap pixGlobe = Resource::loadPixmap( "citytime_icon" );
+ cmdTz->setPixmap( pixGlobe );
+ cmdTz->setMaximumSize( cmdTz->sizeHint() );
+
+ // set up a connection to catch a newly selected item and throw our
+ // signal
+ QObject::connect( cmbTz, SIGNAL( activated( int ) ),
+ this, SLOT( slotTzActive( int ) ) );
+ QObject::connect( cmdTz, SIGNAL( clicked() ),
+ this, SLOT( slotExecute() ) );
+}
+
+TimeZoneSelector::~TimeZoneSelector()
+{
+}
+
+
+QString TimeZoneSelector::currentZone() const
+{
+ return cmbTz->currZone();
+}
+
+void TimeZoneSelector::setCurrentZone( const QString& id )
+{
+ cmbTz->setCurrZone( id );
+}
+
+void TimeZoneSelector::slotTzActive( int )
+{
+ emit signalNewTz( cmbTz->currZone() );
+}
+
+void TimeZoneSelector::slotExecute( void )
+{
+ // execute the city time application...
+ Global::execute( "citytime" );
+}
+
+QStringList timezoneDefaults( void )
+{
+ QStringList tzs;
+ // load up the list just like the file format (citytime.cpp)
+ tzs.append( "America/New_York" );
+ tzs.append( "New York" );
+ tzs.append( "America/Los_Angeles" );
+ tzs.append( "Los Angeles" );
+ tzs.append( "Australia/Brisbane" );
+ tzs.append( "Brisbane" );
+ tzs.append( "Europe/Oslo" );
+ tzs.append( "Oslo" );
+ tzs.append( "Asia/Tokyo" );
+ tzs.append( "Tokyo" );
+ tzs.append( "Asia/Hong_Kong" );
+ tzs.append( "Hong Kong" );
+ return tzs;
+}
+
+
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef TZSELECT_H
+#define TZSELECT_H
+
+#include <qhbox.h>
+#include <qcombobox.h>
+#include <qstringlist.h>
+
+class QToolButton;
+
+// a function to load defaults in case there is no file
+QStringList timezoneDefaults( void );
+
+class TZCombo : public QComboBox
+{
+ Q_OBJECT
+public:
+ TZCombo( QWidget* parent, const char* name = 0 );
+ ~TZCombo();
+
+ QString currZone() const;
+ void setCurrZone( const QString& id );
+
+protected:
+ void keyPressEvent( QKeyEvent *e );
+ void mousePressEvent(QMouseEvent*e);
+ void updateZones();
+
+private slots:
+ void handleSystemChannel(const QCString&, const QByteArray&);
+
+private:
+ QStringList identifiers;
+ QStringList extras;
+};
+
+class TimeZoneSelectorPrivate;
+class TimeZoneSelector : public QHBox
+{
+ Q_OBJECT
+public:
+ TimeZoneSelector( QWidget* parent = 0, const char* name=0 );
+ ~TimeZoneSelector();
+
+ QString currentZone() const;
+ void setCurrentZone( const QString& id );
+
+signals:
+ void signalNewTz( const QString& id );
+
+private slots:
+ void slotTzActive( int index );
+ void slotExecute( void );
+
+private:
+ TZCombo *cmbTz;
+ QToolButton *cmdTz;
+ TimeZoneSelectorPrivate *d;
+};
+
+#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 @@
+//#define QPE_VENDOR "Your Name Here"
+#define QPE_VERSION "1.5.0"
+
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#include "xmlreader.h"
+
+Node::Node()
+ : parent( 0 ), prev( 0 ),
+ next( 0 ), first( 0 ), last( 0 )
+{
+}
+
+
+Node::~Node()
+{
+ Node *n = first, *m;
+
+ while ( n ) {
+ m = n->next;
+ delete n;
+ n = m;
+ }
+}
+
+
+void Node::addChild( Node *child )
+{
+ child->parent = this;
+
+ if ( last )
+ last->next = child;
+ child->prev = last;
+
+ if ( !first )
+ first = child;
+ last = child;
+}
+
+QString Node::attribute( const QString& name )
+{
+ return attributes[name];
+}
+
+void Node::setAttributes( const QXmlAttributes &a )
+{
+ for ( int i = 0; i < a.length(); i++ )
+ attributes[ a.qName( i ) ] = a.value( i );
+}
+
+QMap<QString, QString> Node::attributeMap()
+{
+ return attributes;
+}
+
+QString Node::subData(const QString& tag) const
+{
+ Node* c = firstChild();
+ while ( c ) {
+ if ( c->tagName() == tag )
+ return c->data();
+ c = c->nextNode();
+ }
+ return QString::null;
+}
+
+XmlHandler::XmlHandler()
+ : node( 0 ), tree( 0 )
+{
+}
+
+XmlHandler::~XmlHandler()
+{
+}
+
+
+bool XmlHandler::startDocument()
+{
+ tree = node = new Node;
+ node->setTagName( "DOCUMENT" );
+
+ return TRUE;
+}
+
+
+bool XmlHandler::endDocument()
+{
+ if ( node != tree )
+ return FALSE;
+
+ return TRUE;
+}
+
+bool XmlHandler::startElement( const QString &, const QString &,
+ const QString &qName, const QXmlAttributes &attr )
+{
+ Node *nnode = new Node;
+ nnode->setAttributes( attr );
+ nnode->setTagName( qName );
+
+ node->addChild( nnode );
+ node = nnode;
+
+ return TRUE;
+}
+
+
+bool XmlHandler::endElement( const QString &, const QString &, const QString & )
+{
+ if ( node == tree )
+ return FALSE;
+
+ node = node->parentNode();
+ return TRUE;
+}
+
+
+bool XmlHandler::characters( const QString &ch )
+{
+ node->appendData( ch );
+
+ return TRUE;
+}
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 @@
+/**********************************************************************
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+#ifndef XMLREADER_H
+#define XMLREADER_H
+
+#include <qstring.h>
+#include <qxml.h>
+#include <qmap.h>
+
+class Node
+{
+public:
+ Node();
+ ~Node();
+
+ void addChild( Node *child );
+
+ void setAttributes( const QXmlAttributes &a );
+ QMap<QString, QString> attributeMap();
+ QString attribute( const QString& name );
+
+ Node *nextNode() const { return next; }
+ Node *prevNode() const { return prev; }
+ Node *parentNode() const { return parent; }
+ Node *lastChild() const { return last; }
+ Node *firstChild() const { return first; }
+
+ void setTagName( const QString &s ) { tagN = s; }
+ QString tagName() const { return tagN; }
+ void setData( const QString &s ) { dt = s; }
+ QString data() const { return dt; }
+ QString subData(const QString& tag) const;
+ void appendData( const QString s ) { dt += s; }
+
+
+private:
+ QMap<QString, QString> attributes;
+ QString dt, tagN;
+
+ Node *parent, *prev, *next, *first, *last;
+};
+
+class XmlHandlerPrivate;
+class XmlHandler : public QXmlDefaultHandler
+{
+public:
+ XmlHandler();
+ ~XmlHandler();
+
+ bool startDocument();
+ bool endDocument();
+ bool startElement( const QString &ns, const QString &ln, const QString &qName,
+ const QXmlAttributes &attr );
+ bool endElement( const QString &ns, const QString &ln, const QString &qName );
+ bool characters( const QString &ch );
+
+ Node *firstNode() const { return tree; }
+
+private:
+ Node *node, *tree;
+ XmlHandlerPrivate *d;
+};
+
+
+
+#endif